|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[297,3,5,6,7,8,9,14,19,141],{"+Axu":function(j,H,b){},"+NIl":function(j,H,b){(function(I){I(b("VrN/"))})(function(I){"use strict";I.defineMode("stex",function(v,T){"use strict";function y(i,t){i.cmdState.push(t)}function g(i){return i.cmdState.length>0?i.cmdState[i.cmdState.length-1]:null}function s(i){var t=i.cmdState.pop();t&&t.closeBracket()}function _(i){for(var t=i.cmdState,a=t.length-1;a>=0;a--){var c=t[a];if(c.name=="DEFAULT")continue;return c}return{styleIdentifier:function(){return null}}}function p(i,t,a){return function(){this.name=i,this.bracketNo=0,this.style=t,this.styles=a,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var e={};e.importmodule=p("importmodule","tag",["string","builtin"]),e.documentclass=p("documentclass","tag",["","atom"]),e.usepackage=p("usepackage","tag",["atom"]),e.begin=p("begin","tag",["atom"]),e.end=p("end","tag",["atom"]),e.label=p("label","tag",["atom"]),e.ref=p("ref","tag",["atom"]),e.eqref=p("eqref","tag",["atom"]),e.cite=p("cite","tag",["atom"]),e.bibitem=p("bibitem","tag",["atom"]),e.Bibitem=p("Bibitem","tag",["atom"]),e.RBibitem=p("RBibitem","tag",["atom"]),e.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function o(i,t){i.f=t}function n(i,t){var a;if(i.match(/^\\[a-zA-Z@]+/)){var c=i.current().slice(1);return a=e.hasOwnProperty(c)?e[c]:e.DEFAULT,a=new a,y(t,a),o(t,r),a.style}if(i.match(/^\\[$&%#{}_]/))return"tag";if(i.match(/^\\[,;!\/\\]/))return"tag";if(i.match("\\["))return o(t,function(f,h){return l(f,h,"\\]")}),"keyword";if(i.match("\\("))return o(t,function(f,h){return l(f,h,"\\)")}),"keyword";if(i.match("$$"))return o(t,function(f,h){return l(f,h,"$$")}),"keyword";if(i.match("$"))return o(t,function(f,h){return l(f,h,"$")}),"keyword";var d=i.next();if(d=="%")return i.skipToEnd(),"comment";if(d=="}"||d=="]"){if(a=g(t),a)a.closeBracket(d),o(t,r);else return"error";return"bracket"}else return d=="{"||d=="["?(a=e.DEFAULT,a=new a,y(t,a),"bracket"):/\d/.test(d)?(i.eatWhile(/[\w.%]/),"atom"):(i.eatWhile(/[\w\-_]/),a=_(t),a.name=="begin"&&(a.argument=i.current()),a.styleIdentifier())}function l(i,t,a){if(i.eatSpace())return null;if(a&&i.match(a))return o(t,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 r(i,t){var a=i.peek(),c;return a=="{"||a=="["?(c=g(t),c.openBracket(a),i.eat(a),o(t,n),"bracket"):/[ \t\r]/.test(a)?(i.eat(a),null):(o(t,n),s(t),n(i,t))}return{startState:function(){var i=T.inMathMode?function(t,a){return l(t,a)}:n;return{cmdState:[],f:i}},copyState:function(i){return{cmdState:i.cmdState.slice(),f:i.f}},token:function(i,t){return t.f(i,t)},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(j,H,b){"use strict";var I=b("E9nw"),v={"text/plain":"Text","text/html":"Url",default:"Text"},T="Copy to clipboard: #{key}, Enter";function y(s){var _=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return s.replace(/#{\s*key\s*}/g,_)}function g(s,_){var p,e,o,n,l,r,i=!1;_||(_={}),p=_.debug||!1;try{o=I(),n=document.createRange(),l=document.getSelection(),r=document.createElement("span"),r.textContent=s,r.style.all="unset",r.style.position="fixed",r.style.top=0,r.style.clip="rect(0, 0, 0, 0)",r.style.whiteSpace="pre",r.style.webkitUserSelect="text",r.style.MozUserSelect="text",r.style.msUserSelect="text",r.style.userSelect="text",r.addEventListener("copy",function(a){if(a.stopPropagation(),_.format)if(a.preventDefault(),typeof a.clipboardData=="undefined"){p&&console.warn("unable to use e.clipboardData"),p&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var c=v[_.format]||v.default;window.clipboardData.setData(c,s)}else a.clipboardData.clearData(),a.clipboardData.setData(_.format,s);_.onCopy&&(a.preventDefault(),_.onCopy(a.clipboardData))}),document.body.appendChild(r),n.selectNodeContents(r),l.addRange(n);var t=document.execCommand("copy");if(!t)throw new Error("copy command was unsuccessful");i=!0}catch(a){p&&console.error("unable to copy using execCommand: ",a),p&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(_.format||"text",s),_.onCopy&&_.onCopy(window.clipboardData),i=!0}catch(c){p&&console.error("unable to copy using clipboardData: ",c),p&&console.error("falling back to prompt"),e=y("message"in _?_.message:T),window.prompt(e,s)}}finally{l&&(typeof l.removeRange=="function"?l.removeRange(n):l.removeAllRanges()),r&&document.body.removeChild(r),o()}return i}j.exports=g},"+ua5":function(j,H,b){},"/GNS":function(j,H,b){j.exports=b.p+"static/search1.c4136dd4.png"},"/POA":function(j,H,b){!function(I,v){if(!0)j.exports=v();else var T,y}(window,function(){return function(I){var v={};function T(y){if(v[y])return v[y].exports;var g=v[y]={i:y,l:!1,exports:{}};return I[y].call(g.exports,g,g.exports,T),g.l=!0,g.exports}return T.m=I,T.c=v,T.d=function(y,g,s){T.o(y,g)||Object.defineProperty(y,g,{enumerable:!0,get:s})},T.r=function(y){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(y,"__esModule",{value:!0})},T.t=function(y,g){if(1&g&&(y=T(y)),8&g)return y;if(4&g&&typeof y=="object"&&y&&y.__esModule)return y;var s=Object.create(null);if(T.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:y}),2&g&&typeof y!="string")for(var _ in y)T.d(s,_,function(p){return y[p]}.bind(null,_));return s},T.n=function(y){var g=y&&y.__esModule?function(){return y.default}:function(){return y};return T.d(g,"a",g),g},T.o=function(y,g){return Object.prototype.hasOwnProperty.call(y,g)},T.p="",T(T.s=34)}([function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.forwardEvent=v.EventEmitter=void 0;var y=function(){function g(){this._listeners=[],this._disposed=!1}return Object.defineProperty(g.prototype,"event",{get:function(){var s=this;return this._event||(this._event=function(_){return s._listeners.push(_),{dispose:function(){if(!s._disposed){for(var p=0;p<s._listeners.length;p++)if(s._listeners[p]===_)return void s._listeners.splice(p,1)}}}}),this._event},enumerable:!1,configurable:!0}),g.prototype.fire=function(s,_){for(var p=[],e=0;e<this._listeners.length;e++)p.push(this._listeners[e]);for(e=0;e<p.length;e++)p[e].call(void 0,s,_)},g.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},g}();v.EventEmitter=y,v.forwardEvent=function(g,s){return g(function(_){return s.fire(_)})}},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.IUnicodeService=v.IOptionsService=v.ILogService=v.IInstantiationService=v.IDirtyRowService=v.ICharsetService=v.ICoreService=v.ICoreMouseService=v.IBufferService=void 0;var y=T(14);v.IBufferService=y.createDecorator("BufferService"),v.ICoreMouseService=y.createDecorator("CoreMouseService"),v.ICoreService=y.createDecorator("CoreService"),v.ICharsetService=y.createDecorator("CharsetService"),v.IDirtyRowService=y.createDecorator("DirtyRowService"),v.IInstantiationService=y.createDecorator("InstantiationService"),v.ILogService=y.createDecorator("LogService"),v.IOptionsService=y.createDecorator("OptionsService"),v.IUnicodeService=y.createDecorator("UnicodeService")},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.getDisposeArrayDisposable=v.disposeArray=v.Disposable=void 0;var y=function(){function s(){this._disposables=[],this._isDisposed=!1}return s.prototype.dispose=function(){this._isDisposed=!0;for(var _=0,p=this._disposables;_<p.length;_++)p[_].dispose();this._disposables.length=0},s.prototype.register=function(_){return this._disposables.push(_),_},s.prototype.unregister=function(_){var p=this._disposables.indexOf(_);p!==-1&&this._disposables.splice(p,1)},s}();function g(s){for(var _=0,p=s;_<p.length;_++)p[_].dispose();s.length=0}v.Disposable=y,v.disposeArray=g,v.getDisposeArrayDisposable=function(s){return{dispose:function(){return g(s)}}}},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.WHITESPACE_CELL_CODE=v.WHITESPACE_CELL_WIDTH=v.WHITESPACE_CELL_CHAR=v.NULL_CELL_CODE=v.NULL_CELL_WIDTH=v.NULL_CELL_CHAR=v.CHAR_DATA_CODE_INDEX=v.CHAR_DATA_WIDTH_INDEX=v.CHAR_DATA_CHAR_INDEX=v.CHAR_DATA_ATTR_INDEX=v.DEFAULT_ATTR=v.DEFAULT_COLOR=void 0,v.DEFAULT_COLOR=256,v.DEFAULT_ATTR=256|v.DEFAULT_COLOR<<9,v.CHAR_DATA_ATTR_INDEX=0,v.CHAR_DATA_CHAR_INDEX=1,v.CHAR_DATA_WIDTH_INDEX=2,v.CHAR_DATA_CODE_INDEX=3,v.NULL_CELL_CHAR="",v.NULL_CELL_WIDTH=1,v.NULL_CELL_CODE=0,v.WHITESPACE_CELL_CHAR=" ",v.WHITESPACE_CELL_WIDTH=1,v.WHITESPACE_CELL_CODE=32},function(I,v,T){"use strict";var y,g=this&&this.__extends||(y=function(o,n){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,r){l.__proto__=r}||function(l,r){for(var i in r)r.hasOwnProperty(i)&&(l[i]=r[i])})(o,n)},function(o,n){function l(){this.constructor=o}y(o,n),o.prototype=n===null?Object.create(n):(l.prototype=n.prototype,new l)});Object.defineProperty(v,"__esModule",{value:!0}),v.CellData=void 0;var s=T(8),_=T(3),p=T(6),e=function(o){function n(){var l=o!==null&&o.apply(this,arguments)||this;return l.content=0,l.fg=0,l.bg=0,l.extended=new p.ExtendedAttrs,l.combinedData="",l}return g(n,o),n.fromCharData=function(l){var r=new n;return r.setFromCharData(l),r},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?s.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(l){this.fg=l[_.CHAR_DATA_ATTR_INDEX],this.bg=0;var r=!1;if(l[_.CHAR_DATA_CHAR_INDEX].length>2)r=!0;else if(l[_.CHAR_DATA_CHAR_INDEX].length===2){var i=l[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=i&&i<=56319){var t=l[_.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=t&&t<=57343?this.content=1024*(i-55296)+t-56320+65536|l[_.CHAR_DATA_WIDTH_INDEX]<<22:r=!0}else r=!0}else this.content=l[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|l[_.CHAR_DATA_WIDTH_INDEX]<<22;r&&(this.combinedData=l[_.CHAR_DATA_CHAR_INDEX],this.content=2097152|l[_.CHAR_DATA_WIDTH_INDEX]<<22)},n.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},n}(p.AttributeData);v.CellData=e},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.ISoundService=v.ISelectionService=v.IRenderService=v.IMouseService=v.ICoreBrowserService=v.ICharSizeService=void 0;var y=T(14);v.ICharSizeService=y.createDecorator("CharSizeService"),v.ICoreBrowserService=y.createDecorator("CoreBrowserService"),v.IMouseService=y.createDecorator("MouseService"),v.IRenderService=y.createDecorator("RenderService"),v.ISelectionService=y.createDecorator("SelectionService"),v.ISoundService=y.createDecorator("SoundService")},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.ExtendedAttrs=v.AttributeData=void 0;var y=function(){function s(){this.fg=0,this.bg=0,this.extended=new g}return s.toColorRGB=function(_){return[_>>>16&255,_>>>8&255,255&_]},s.fromColorRGB=function(_){return(255&_[0])<<16|(255&_[1])<<8|255&_[2]},s.prototype.clone=function(){var _=new s;return _.fg=this.fg,_.bg=this.bg,_.extended=this.extended.clone(),_},s.prototype.isInverse=function(){return 67108864&this.fg},s.prototype.isBold=function(){return 134217728&this.fg},s.prototype.isUnderline=function(){return 268435456&this.fg},s.prototype.isBlink=function(){return 536870912&this.fg},s.prototype.isInvisible=function(){return 1073741824&this.fg},s.prototype.isItalic=function(){return 67108864&this.bg},s.prototype.isDim=function(){return 134217728&this.bg},s.prototype.getFgColorMode=function(){return 50331648&this.fg},s.prototype.getBgColorMode=function(){return 50331648&this.bg},s.prototype.isFgRGB=function(){return(50331648&this.fg)==50331648},s.prototype.isBgRGB=function(){return(50331648&this.bg)==50331648},s.prototype.isFgPalette=function(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432},s.prototype.isBgPalette=function(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432},s.prototype.isFgDefault=function(){return(50331648&this.fg)==0},s.prototype.isBgDefault=function(){return(50331648&this.bg)==0},s.prototype.isAttributeDefault=function(){return this.fg===0&&this.bg===0},s.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},s.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},s.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},s.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},s.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()},s.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},s.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()},s.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()},s.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()},s.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},s}();v.AttributeData=y;var g=function(){function s(_,p){_===void 0&&(_=0),p===void 0&&(p=-1),this.underlineStyle=_,this.underlineColor=p}return s.prototype.clone=function(){return new s(this.underlineStyle,this.underlineColor)},s.prototype.isEmpty=function(){return this.underlineStyle===0},s}();v.ExtendedAttrs=g},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.addDisposableDomListener=void 0,v.addDisposableDomListener=function(y,g,s,_){y.addEventListener(g,s,_);var p=!1;return{dispose:function(){p||(p=!0,y.removeEventListener(g,s,_))}}}},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.Utf8ToUtf32=v.StringToUtf32=v.utf32ToString=v.stringFromCodePoint=void 0,v.stringFromCodePoint=function(s){return s>65535?(s-=65536,String.fromCharCode(55296+(s>>10))+String.fromCharCode(s%1024+56320)):String.fromCharCode(s)},v.utf32ToString=function(s,_,p){_===void 0&&(_=0),p===void 0&&(p=s.length);for(var e="",o=_;o<p;++o){var n=s[o];n>65535?(n-=65536,e+=String.fromCharCode(55296+(n>>10))+String.fromCharCode(n%1024+56320)):e+=String.fromCharCode(n)}return e};var y=function(){function s(){this._interim=0}return s.prototype.clear=function(){this._interim=0},s.prototype.decode=function(_,p){var e=_.length;if(!e)return 0;var o=0,n=0;this._interim&&(56320<=(i=_.charCodeAt(n++))&&i<=57343?p[o++]=1024*(this._interim-55296)+i-56320+65536:(p[o++]=this._interim,p[o++]=i),this._interim=0);for(var l=n;l<e;++l){var r=_.charCodeAt(l);if(55296<=r&&r<=56319){if(++l>=e)return this._interim=r,o;var i;56320<=(i=_.charCodeAt(l))&&i<=57343?p[o++]=1024*(r-55296)+i-56320+65536:(p[o++]=r,p[o++]=i)}else p[o++]=r}return o},s}();v.StringToUtf32=y;var g=function(){function s(){this.interim=new Uint8Array(3)}return s.prototype.clear=function(){this.interim.fill(0)},s.prototype.decode=function(_,p){var e=_.length;if(!e)return 0;var o,n,l,r,i=0,t=0,a=0;if(this.interim[0]){var c=!1,d=this.interim[0];d&=(224&d)==192?31:(240&d)==224?15:7;for(var f=0,h=void 0;(h=63&this.interim[++f])&&f<4;)d<<=6,d|=h;for(var u=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,E=u-f;a<E;){if(a>=e)return 0;if((192&(h=_[a++]))!=128){a--,c=!0;break}this.interim[f++]=h,d<<=6,d|=63&h}c||(u===2?d<128?a--:p[i++]=d:u===3?d<2048||d>=55296&&d<=57343||(p[i++]=d):d<65536||d>1114111||(p[i++]=d)),this.interim.fill(0)}for(var x=e-4,O=a;O<e;){for(;!(!(O<x)||128&(o=_[O])||128&(n=_[O+1])||128&(l=_[O+2])||128&(r=_[O+3]));)p[i++]=o,p[i++]=n,p[i++]=l,p[i++]=r,O+=4;if((o=_[O++])<128)p[i++]=o;else if((224&o)==192){if(O>=e)return this.interim[0]=o,i;if((192&(n=_[O++]))!=128){O--;continue}if((t=(31&o)<<6|63&n)<128){O--;continue}p[i++]=t}else if((240&o)==224){if(O>=e)return this.interim[0]=o,i;if((192&(n=_[O++]))!=128){O--;continue}if(O>=e)return this.interim[0]=o,this.interim[1]=n,i;if((192&(l=_[O++]))!=128){O--;continue}if((t=(15&o)<<12|(63&n)<<6|63&l)<2048||t>=55296&&t<=57343)continue;p[i++]=t}else if((248&o)==240){if(O>=e)return this.interim[0]=o,i;if((192&(n=_[O++]))!=128){O--;continue}if(O>=e)return this.interim[0]=o,this.interim[1]=n,i;if((192&(l=_[O++]))!=128){O--;continue}if(O>=e)return this.interim[0]=o,this.interim[1]=n,this.interim[2]=l,i;if((192&(r=_[O++]))!=128){O--;continue}if((t=(7&o)<<18|(63&n)<<12|(63&l)<<6|63&r)<65536||t>1114111)continue;p[i++]=t}}return i},s}();v.Utf8ToUtf32=g},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.CHAR_ATLAS_CELL_SPACING=v.DIM_OPACITY=v.INVERTED_DEFAULT_COLOR=void 0,v.INVERTED_DEFAULT_COLOR=257,v.DIM_OPACITY=.5,v.CHAR_ATLAS_CELL_SPACING=1},function(I,v,T){"use strict";var y,g,s,_;function p(o){var n=o.toString(16);return n.length<2?"0"+n:n}function e(o,n){return o<n?(n+.05)/(o+.05):(o+.05)/(n+.05)}Object.defineProperty(v,"__esModule",{value:!0}),v.contrastRatio=v.toPaddedHex=v.rgba=v.rgb=v.css=v.color=v.channels=void 0,function(o){o.toCss=function(n,l,r,i){return i!==void 0?"#"+p(n)+p(l)+p(r)+p(i):"#"+p(n)+p(l)+p(r)},o.toRgba=function(n,l,r,i){return i===void 0&&(i=255),(n<<24|l<<16|r<<8|i)>>>0}}(y=v.channels||(v.channels={})),(g=v.color||(v.color={})).blend=function(o,n){var l=(255&n.rgba)/255;if(l===1)return{css:n.css,rgba:n.rgba};var r=n.rgba>>24&255,i=n.rgba>>16&255,t=n.rgba>>8&255,a=o.rgba>>24&255,c=o.rgba>>16&255,d=o.rgba>>8&255,f=a+Math.round((r-a)*l),h=c+Math.round((i-c)*l),u=d+Math.round((t-d)*l);return{css:y.toCss(f,h,u),rgba:y.toRgba(f,h,u)}},g.isOpaque=function(o){return(255&o.rgba)==255},g.ensureContrastRatio=function(o,n,l){var r=_.ensureContrastRatio(o.rgba,n.rgba,l);if(r)return _.toColor(r>>24&255,r>>16&255,r>>8&255)},g.opaque=function(o){var n=(255|o.rgba)>>>0,l=_.toChannels(n),r=l[0],i=l[1],t=l[2];return{css:y.toCss(r,i,t),rgba:n}},g.opacity=function(o,n){var l=Math.round(255*n),r=_.toChannels(o.rgba),i=r[0],t=r[1],a=r[2];return{css:y.toCss(i,t,a,l),rgba:y.toRgba(i,t,a,l)}},(v.css||(v.css={})).toColor=function(o){switch(o.length){case 7:return{css:o,rgba:(parseInt(o.slice(1),16)<<8|255)>>>0};case 9:return{css:o,rgba:parseInt(o.slice(1),16)>>>0}}throw new Error("css.toColor: Unsupported css format")},function(o){function n(l,r,i){var t=l/255,a=r/255,c=i/255;return .2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4))+.0722*(c<=.03928?c/12.92:Math.pow((c+.055)/1.055,2.4))}o.relativeLuminance=function(l){return n(l>>16&255,l>>8&255,255&l)},o.relativeLuminance2=n}(s=v.rgb||(v.rgb={})),function(o){function n(r,i,t){for(var a=r>>24&255,c=r>>16&255,d=r>>8&255,f=i>>24&255,h=i>>16&255,u=i>>8&255,E=e(s.relativeLuminance2(f,u,h),s.relativeLuminance2(a,c,d));E<t&&(f>0||h>0||u>0);)f-=Math.max(0,Math.ceil(.1*f)),h-=Math.max(0,Math.ceil(.1*h)),u-=Math.max(0,Math.ceil(.1*u)),E=e(s.relativeLuminance2(f,u,h),s.relativeLuminance2(a,c,d));return(f<<24|h<<16|u<<8|255)>>>0}function l(r,i,t){for(var a=r>>24&255,c=r>>16&255,d=r>>8&255,f=i>>24&255,h=i>>16&255,u=i>>8&255,E=e(s.relativeLuminance2(f,u,h),s.relativeLuminance2(a,c,d));E<t&&(f<255||h<255||u<255);)f=Math.min(255,f+Math.ceil(.1*(255-f))),h=Math.min(255,h+Math.ceil(.1*(255-h))),u=Math.min(255,u+Math.ceil(.1*(255-u))),E=e(s.relativeLuminance2(f,u,h),s.relativeLuminance2(a,c,d));return(f<<24|h<<16|u<<8|255)>>>0}o.ensureContrastRatio=function(r,i,t){var a=s.relativeLuminance(r>>8),c=s.relativeLuminance(i>>8);if(e(a,c)<t)return c<a?n(r,i,t):l(r,i,t)},o.reduceLuminance=n,o.increaseLuminance=l,o.toChannels=function(r){return[r>>24&255,r>>16&255,r>>8&255,255&r]},o.toColor=function(r,i,t){return{css:y.toCss(r,i,t),rgba:y.toRgba(r,i,t)}}}(_=v.rgba||(v.rgba={})),v.toPaddedHex=p,v.contrastRatio=e},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.isLinux=v.isWindows=v.isIphone=v.isIpad=v.isMac=v.isSafari=v.isFirefox=void 0;var y=typeof navigator=="undefined",g=y?"node":navigator.userAgent,s=y?"node":navigator.platform;function _(p,e){return p.indexOf(e)>=0}v.isFirefox=!!~g.indexOf("Firefox"),v.isSafari=/^((?!chrome|android).)*safari/i.test(g),v.isMac=_(["Macintosh","MacIntel","MacPPC","Mac68K"],s),v.isIpad=s==="iPad",v.isIphone=s==="iPhone",v.isWindows=_(["Windows","Win16","Win32","WinCE"],s),v.isLinux=s.indexOf("Linux")>=0},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.C1=v.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"}(v.C0||(v.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"}(v.C1||(v.C1={}))},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.BaseRenderLayer=void 0;var y=T(3),g=T(9),s=T(25),_=T(6),p=T(28),e=T(10),o=T(17),n=function(){function l(r,i,t,a,c,d,f,h){this._container=r,this._alpha=a,this._colors=c,this._rendererId=d,this._bufferService=f,this._optionsService=h,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=t.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return l.prototype.dispose=function(){var r;o.removeElementFromParent(this._canvas),(r=this._charAtlas)===null||r===void 0||r.dispose()},l.prototype._initCanvas=function(){this._ctx=p.throwIfFalsy(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},l.prototype.onOptionsChanged=function(){},l.prototype.onBlur=function(){},l.prototype.onFocus=function(){},l.prototype.onCursorMove=function(){},l.prototype.onGridChanged=function(r,i){},l.prototype.onSelectionChanged=function(r,i,t){t===void 0&&(t=!1)},l.prototype.setColors=function(r){this._refreshCharAtlas(r)},l.prototype._setTransparency=function(r){if(r!==this._alpha){var i=this._canvas;this._alpha=r,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,i),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},l.prototype._refreshCharAtlas=function(r){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=s.acquireCharAtlas(this._optionsService.options,this._rendererId,r,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},l.prototype.resize=function(r){this._scaledCellWidth=r.scaledCellWidth,this._scaledCellHeight=r.scaledCellHeight,this._scaledCharWidth=r.scaledCharWidth,this._scaledCharHeight=r.scaledCharHeight,this._scaledCharLeft=r.scaledCharLeft,this._scaledCharTop=r.scaledCharTop,this._canvas.width=r.scaledCanvasWidth,this._canvas.height=r.scaledCanvasHeight,this._canvas.style.width=r.canvasWidth+"px",this._canvas.style.height=r.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},l.prototype._fillCells=function(r,i,t,a){this._ctx.fillRect(r*this._scaledCellWidth,i*this._scaledCellHeight,t*this._scaledCellWidth,a*this._scaledCellHeight)},l.prototype._fillBottomLineAtCells=function(r,i,t){t===void 0&&(t=1),this._ctx.fillRect(r*this._scaledCellWidth,(i+1)*this._scaledCellHeight-window.devicePixelRatio-1,t*this._scaledCellWidth,window.devicePixelRatio)},l.prototype._fillLeftLineAtCell=function(r,i,t){this._ctx.fillRect(r*this._scaledCellWidth,i*this._scaledCellHeight,window.devicePixelRatio*t,this._scaledCellHeight)},l.prototype._strokeRectAtCell=function(r,i,t,a){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(r*this._scaledCellWidth+window.devicePixelRatio/2,i*this._scaledCellHeight+window.devicePixelRatio/2,t*this._scaledCellWidth-window.devicePixelRatio,a*this._scaledCellHeight-window.devicePixelRatio)},l.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))},l.prototype._clearCells=function(r,i,t,a){this._alpha?this._ctx.clearRect(r*this._scaledCellWidth,i*this._scaledCellHeight,t*this._scaledCellWidth,a*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(r*this._scaledCellWidth,i*this._scaledCellHeight,t*this._scaledCellWidth,a*this._scaledCellHeight))},l.prototype._fillCharTrueColor=function(r,i,t){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline="middle",this._clipRow(t),this._ctx.fillText(r.getChars(),i*this._scaledCellWidth+this._scaledCharLeft,t*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2)},l.prototype._drawChars=function(r,i,t){var a,c,d=this._getContrastColor(r);d||r.isFgRGB()||r.isBgRGB()?this._drawUncachedChars(r,i,t,d):(r.isInverse()?(a=r.isBgDefault()?g.INVERTED_DEFAULT_COLOR:r.getBgColor(),c=r.isFgDefault()?g.INVERTED_DEFAULT_COLOR:r.getFgColor()):(c=r.isBgDefault()?y.DEFAULT_COLOR:r.getBgColor(),a=r.isFgDefault()?y.DEFAULT_COLOR:r.getFgColor()),a+=this._optionsService.options.drawBoldTextInBrightColors&&r.isBold()&&a<8?8:0,this._currentGlyphIdentifier.chars=r.getChars()||y.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=r.getCode()||y.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=c,this._currentGlyphIdentifier.fg=a,this._currentGlyphIdentifier.bold=!!r.isBold(),this._currentGlyphIdentifier.dim=!!r.isDim(),this._currentGlyphIdentifier.italic=!!r.isItalic(),this._charAtlas&&this._charAtlas.draw(this._ctx,this._currentGlyphIdentifier,i*this._scaledCellWidth+this._scaledCharLeft,t*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(r,i,t))},l.prototype._drawUncachedChars=function(r,i,t,a){if(this._ctx.save(),this._ctx.font=this._getFont(!!r.isBold(),!!r.isItalic()),this._ctx.textBaseline="middle",r.isInverse())if(a)this._ctx.fillStyle=a.css;else if(r.isBgDefault())this._ctx.fillStyle=e.color.opaque(this._colors.background).css;else if(r.isBgRGB())this._ctx.fillStyle="rgb("+_.AttributeData.toColorRGB(r.getBgColor()).join(",")+")";else{var c=r.getBgColor();this._optionsService.options.drawBoldTextInBrightColors&&r.isBold()&&c<8&&(c+=8),this._ctx.fillStyle=this._colors.ansi[c].css}else if(a)this._ctx.fillStyle=a.css;else if(r.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(r.isFgRGB())this._ctx.fillStyle="rgb("+_.AttributeData.toColorRGB(r.getFgColor()).join(",")+")";else{var d=r.getFgColor();this._optionsService.options.drawBoldTextInBrightColors&&r.isBold()&&d<8&&(d+=8),this._ctx.fillStyle=this._colors.ansi[d].css}this._clipRow(t),r.isDim()&&(this._ctx.globalAlpha=g.DIM_OPACITY),this._ctx.fillText(r.getChars(),i*this._scaledCellWidth+this._scaledCharLeft,t*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2),this._ctx.restore()},l.prototype._clipRow=function(r){this._ctx.beginPath(),this._ctx.rect(0,r*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},l.prototype._getFont=function(r,i){return(i?"italic":"")+" "+(r?this._optionsService.options.fontWeightBold:this._optionsService.options.fontWeight)+" "+this._optionsService.options.fontSize*window.devicePixelRatio+"px "+this._optionsService.options.fontFamily},l.prototype._getContrastColor=function(r){if(this._optionsService.options.minimumContrastRatio!==1){var i=this._colors.contrastCache.getColor(r.bg,r.fg);if(i!==void 0)return i||void 0;var t=r.getFgColor(),a=r.getFgColorMode(),c=r.getBgColor(),d=r.getBgColorMode(),f=!!r.isInverse(),h=!!r.isInverse();if(f){var u=t;t=c,c=u;var E=a;a=d,d=E}var x=this._resolveBackgroundRgba(d,c,f),O=this._resolveForegroundRgba(a,t,f,h),C=e.rgba.ensureContrastRatio(x,O,this._optionsService.options.minimumContrastRatio);if(C){var w={css:e.channels.toCss(C>>24&255,C>>16&255,C>>8&255),rgba:C};return this._colors.contrastCache.setColor(r.bg,r.fg,w),w}this._colors.contrastCache.setColor(r.bg,r.fg,null)}},l.prototype._resolveBackgroundRgba=function(r,i,t){switch(r){case 16777216:case 33554432:return this._colors.ansi[i].rgba;case 50331648:return i<<8;case 0:default:return t?this._colors.foreground.rgba:this._colors.background.rgba}},l.prototype._resolveForegroundRgba=function(r,i,t,a){switch(r){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&a&&i<8&&(i+=8),this._colors.ansi[i].rgba;case 50331648:return i<<8;case 0:default:return t?this._colors.background.rgba:this._colors.foreground.rgba}},l}();v.BaseRenderLayer=n},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.createDecorator=v.getServiceDependencies=v.serviceRegistry=void 0;function y(g,s,_){s.di$target===s?s.di$dependencies.push({id:g,index:_}):(s.di$dependencies=[{id:g,index:_}],s.di$target=s)}v.serviceRegistry=new Map,v.getServiceDependencies=function(g){return g.di$dependencies||[]},v.createDecorator=function(g){if(v.serviceRegistry.has(g))return v.serviceRegistry.get(g);var s=function(_,p,e){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");y(s,_,e)};return s.toString=function(){return g},v.serviceRegistry.set(g,s),s}},function(I,v,T){"use strict";function y(g,s,_,p){if(_===void 0&&(_=0),p===void 0&&(p=g.length),_>=g.length)return g;_=(g.length+_)%g.length,p=p>=g.length?g.length:(g.length+p)%g.length;for(var e=_;e<p;++e)g[e]=s;return g}Object.defineProperty(v,"__esModule",{value:!0}),v.concat=v.fillFallback=v.fill=void 0,v.fill=function(g,s,_,p){return g.fill?g.fill(s,_,p):y(g,s,_,p)},v.fillFallback=y,v.concat=function(g,s){var _=new g.constructor(g.length+s.length);return _.set(g),_.set(s,g.length),_}},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.BufferLine=v.DEFAULT_ATTR_DATA=void 0;var y=T(8),g=T(3),s=T(4),_=T(6);v.DEFAULT_ATTR_DATA=Object.freeze(new _.AttributeData);var p=function(){function e(o,n,l){l===void 0&&(l=!1),this.isWrapped=l,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*o);for(var r=n||s.CellData.fromCharData([0,g.NULL_CELL_CHAR,g.NULL_CELL_WIDTH,g.NULL_CELL_CODE]),i=0;i<o;++i)this.setCell(i,r);this.length=o}return e.prototype.get=function(o){var n=this._data[3*o+0],l=2097151&n;return[this._data[3*o+1],2097152&n?this._combined[o]:l?y.stringFromCodePoint(l):"",n>>22,2097152&n?this._combined[o].charCodeAt(this._combined[o].length-1):l]},e.prototype.set=function(o,n){this._data[3*o+1]=n[g.CHAR_DATA_ATTR_INDEX],n[g.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[o]=n[1],this._data[3*o+0]=2097152|o|n[g.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*o+0]=n[g.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|n[g.CHAR_DATA_WIDTH_INDEX]<<22},e.prototype.getWidth=function(o){return this._data[3*o+0]>>22},e.prototype.hasWidth=function(o){return 12582912&this._data[3*o+0]},e.prototype.getFg=function(o){return this._data[3*o+1]},e.prototype.getBg=function(o){return this._data[3*o+2]},e.prototype.hasContent=function(o){return 4194303&this._data[3*o+0]},e.prototype.getCodePoint=function(o){var n=this._data[3*o+0];return 2097152&n?this._combined[o].charCodeAt(this._combined[o].length-1):2097151&n},e.prototype.isCombined=function(o){return 2097152&this._data[3*o+0]},e.prototype.getString=function(o){var n=this._data[3*o+0];return 2097152&n?this._combined[o]:2097151&n?y.stringFromCodePoint(2097151&n):""},e.prototype.loadCell=function(o,n){var l=3*o;return n.content=this._data[l+0],n.fg=this._data[l+1],n.bg=this._data[l+2],2097152&n.content&&(n.combinedData=this._combined[o]),268435456&n.bg&&(n.extended=this._extendedAttrs[o]),n},e.prototype.setCell=function(o,n){2097152&n.content&&(this._combined[o]=n.combinedData),268435456&n.bg&&(this._extendedAttrs[o]=n.extended),this._data[3*o+0]=n.content,this._data[3*o+1]=n.fg,this._data[3*o+2]=n.bg},e.prototype.setCellFromCodePoint=function(o,n,l,r,i,t){268435456&i&&(this._extendedAttrs[o]=t),this._data[3*o+0]=n|l<<22,this._data[3*o+1]=r,this._data[3*o+2]=i},e.prototype.addCodepointToCell=function(o,n){var l=this._data[3*o+0];2097152&l?this._combined[o]+=y.stringFromCodePoint(n):(2097151&l?(this._combined[o]=y.stringFromCodePoint(2097151&l)+y.stringFromCodePoint(n),l&=-2097152,l|=2097152):l=n|1<<22,this._data[3*o+0]=l)},e.prototype.insertCells=function(o,n,l,r){if((o%=this.length)&&this.getWidth(o-1)===2&&this.setCellFromCodePoint(o-1,0,1,(r==null?void 0:r.fg)||0,(r==null?void 0:r.bg)||0,(r==null?void 0:r.extended)||new _.ExtendedAttrs),n<this.length-o){for(var i=new s.CellData,t=this.length-o-n-1;t>=0;--t)this.setCell(o+n+t,this.loadCell(o+t,i));for(t=0;t<n;++t)this.setCell(o+t,l)}else for(t=o;t<this.length;++t)this.setCell(t,l);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,(r==null?void 0:r.fg)||0,(r==null?void 0:r.bg)||0,(r==null?void 0:r.extended)||new _.ExtendedAttrs)},e.prototype.deleteCells=function(o,n,l,r){if(o%=this.length,n<this.length-o){for(var i=new s.CellData,t=0;t<this.length-o-n;++t)this.setCell(o+t,this.loadCell(o+n+t,i));for(t=this.length-n;t<this.length;++t)this.setCell(t,l)}else for(t=o;t<this.length;++t)this.setCell(t,l);o&&this.getWidth(o-1)===2&&this.setCellFromCodePoint(o-1,0,1,(r==null?void 0:r.fg)||0,(r==null?void 0:r.bg)||0,(r==null?void 0:r.extended)||new _.ExtendedAttrs),this.getWidth(o)!==0||this.hasContent(o)||this.setCellFromCodePoint(o,0,1,(r==null?void 0:r.fg)||0,(r==null?void 0:r.bg)||0,(r==null?void 0:r.extended)||new _.ExtendedAttrs)},e.prototype.replaceCells=function(o,n,l,r){for(o&&this.getWidth(o-1)===2&&this.setCellFromCodePoint(o-1,0,1,(r==null?void 0:r.fg)||0,(r==null?void 0:r.bg)||0,(r==null?void 0:r.extended)||new _.ExtendedAttrs),n<this.length&&this.getWidth(n-1)===2&&this.setCellFromCodePoint(n,0,1,(r==null?void 0:r.fg)||0,(r==null?void 0:r.bg)||0,(r==null?void 0:r.extended)||new _.ExtendedAttrs);o<n&&o<this.length;)this.setCell(o++,l)},e.prototype.resize=function(o,n){if(o!==this.length){if(o>this.length){var l=new Uint32Array(3*o);this.length&&(3*o<this._data.length?l.set(this._data.subarray(0,3*o)):l.set(this._data)),this._data=l;for(var r=this.length;r<o;++r)this.setCell(r,n)}else if(o){(l=new Uint32Array(3*o)).set(this._data.subarray(0,3*o)),this._data=l;var i=Object.keys(this._combined);for(r=0;r<i.length;r++){var t=parseInt(i[r],10);t>=o&&delete this._combined[t]}}else this._data=new Uint32Array(0),this._combined={};this.length=o}},e.prototype.fill=function(o){this._combined={},this._extendedAttrs={};for(var n=0;n<this.length;++n)this.setCell(n,o)},e.prototype.copyFrom=function(o){for(var n in this.length!==o.length?this._data=new Uint32Array(o._data):this._data.set(o._data),this.length=o.length,this._combined={},o._combined)this._combined[n]=o._combined[n];for(var n in this._extendedAttrs={},o._extendedAttrs)this._extendedAttrs[n]=o._extendedAttrs[n];this.isWrapped=o.isWrapped},e.prototype.clone=function(){var o=new e(0);for(var n in o._data=new Uint32Array(this._data),o.length=this.length,this._combined)o._combined[n]=this._combined[n];for(var n in this._extendedAttrs)o._extendedAttrs[n]=this._extendedAttrs[n];return o.isWrapped=this.isWrapped,o},e.prototype.getTrimmedLength=function(){for(var o=this.length-1;o>=0;--o)if(4194303&this._data[3*o+0])return o+(this._data[3*o+0]>>22);return 0},e.prototype.copyCellsFrom=function(o,n,l,r,i){var t=o._data;if(i)for(var a=r-1;a>=0;a--)for(var c=0;c<3;c++)this._data[3*(l+a)+c]=t[3*(n+a)+c];else for(a=0;a<r;a++)for(c=0;c<3;c++)this._data[3*(l+a)+c]=t[3*(n+a)+c];var d=Object.keys(o._combined);for(c=0;c<d.length;c++){var f=parseInt(d[c],10);f>=n&&(this._combined[f-n+l]=o._combined[f])}},e.prototype.translateToString=function(o,n,l){o===void 0&&(o=!1),n===void 0&&(n=0),l===void 0&&(l=this.length),o&&(l=Math.min(l,this.getTrimmedLength()));for(var r="";n<l;){var i=this._data[3*n+0],t=2097151&i;r+=2097152&i?this._combined[n]:t?y.stringFromCodePoint(t):g.WHITESPACE_CELL_CHAR,n+=i>>22||1}return r},e}();v.BufferLine=p},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.removeElementFromParent=void 0,v.removeElementFromParent=function(){for(var y,g=[],s=0;s<arguments.length;s++)g[s]=arguments[s];for(var _=0,p=g;_<p.length;_++){var e=p[_];(y=e==null?void 0:e.parentElement)===null||y===void 0||y.removeChild(e)}}},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.tooMuchOutput=v.promptLabel=void 0,v.promptLabel="Terminal input",v.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},function(I,v,T){"use strict";var y,g=this&&this.__extends||(y=function(O,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])})(O,C)},function(O,C){function w(){this.constructor=O}y(O,C),O.prototype=C===null?Object.create(C):(w.prototype=C.prototype,new w)});Object.defineProperty(v,"__esModule",{value:!0}),v.InputHandler=v.WindowsOptionsReportType=void 0;var s,_=T(12),p=T(20),e=T(39),o=T(2),n=T(15),l=T(8),r=T(16),i=T(0),t=T(3),a=T(4),c=T(6),d=T(22),f=T(24),h={"(":0,")":1,"*":2,"+":3,"-":1,".":2};function u(O,C){if(O>24)return C.setWinLines||!1;switch(O){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(O){O[O.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",O[O.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"}(s=v.WindowsOptionsReportType||(v.WindowsOptionsReportType={}));var E=function(){function O(C,w,S,A){this._bufferService=C,this._coreService=w,this._logService=S,this._optionsService=A,this._data=new Uint32Array(0)}return O.prototype.hook=function(C){this._data=new Uint32Array(0)},O.prototype.put=function(C,w,S){this._data=n.concat(this._data,C.subarray(w,S))},O.prototype.unhook=function(C){if(C){var w=l.utf32ToString(this._data);switch(this._data=new Uint32Array(0),w){case'"q':return this._coreService.triggerDataEvent(_.C0.ESC+'P1$r0"q'+_.C0.ESC+"\\");case'"p':return this._coreService.triggerDataEvent(_.C0.ESC+'P1$r61;1"p'+_.C0.ESC+"\\");case"r":var S=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";return this._coreService.triggerDataEvent(_.C0.ESC+"P1$r"+S+_.C0.ESC+"\\");case"m":return this._coreService.triggerDataEvent(_.C0.ESC+"P1$r0m"+_.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(_.C0.ESC+"P1$r"+A+" q"+_.C0.ESC+"\\");default:this._logService.debug("Unknown DCS $q %s",w),this._coreService.triggerDataEvent(_.C0.ESC+"P0$r"+_.C0.ESC+"\\")}}else this._data=new Uint32Array(0)},O}(),x=function(O){function C(w,S,A,D,M,N,P,z,X){X===void 0&&(X=new e.EscapeSequenceParser);var k=O.call(this)||this;k._bufferService=w,k._charsetService=S,k._coreService=A,k._dirtyRowService=D,k._logService=M,k._optionsService=N,k._coreMouseService=P,k._unicodeService=z,k._parser=X,k._parseBuffer=new Uint32Array(4096),k._stringDecoder=new l.StringToUtf32,k._utf8Decoder=new l.Utf8ToUtf32,k._workCell=new a.CellData,k._windowTitle="",k._iconName="",k._windowTitleStack=[],k._iconNameStack=[],k._curAttrData=r.DEFAULT_ATTR_DATA.clone(),k._eraseAttrDataInternal=r.DEFAULT_ATTR_DATA.clone(),k._onRequestBell=new i.EventEmitter,k._onRequestRefreshRows=new i.EventEmitter,k._onRequestReset=new i.EventEmitter,k._onRequestScroll=new i.EventEmitter,k._onRequestSyncScrollBar=new i.EventEmitter,k._onRequestWindowsOptionsReport=new i.EventEmitter,k._onA11yChar=new i.EventEmitter,k._onA11yTab=new i.EventEmitter,k._onCursorMove=new i.EventEmitter,k._onLineFeed=new i.EventEmitter,k._onScroll=new i.EventEmitter,k._onTitleChange=new i.EventEmitter,k.register(k._parser),k._parser.setCsiHandlerFallback(function(B,Z){k._logService.debug("Unknown CSI code: ",{identifier:k._parser.identToString(B),params:Z.toArray()})}),k._parser.setEscHandlerFallback(function(B){k._logService.debug("Unknown ESC code: ",{identifier:k._parser.identToString(B)})}),k._parser.setExecuteHandlerFallback(function(B){k._logService.debug("Unknown EXECUTE code: ",{code:B})}),k._parser.setOscHandlerFallback(function(B,Z,re){k._logService.debug("Unknown OSC code: ",{identifier:B,action:Z,data:re})}),k._parser.setDcsHandlerFallback(function(B,Z,re){Z==="HOOK"&&(re=re.toArray()),k._logService.debug("Unknown DCS code: ",{identifier:k._parser.identToString(B),action:Z,payload:re})}),k._parser.setPrintHandler(function(B,Z,re){return k.print(B,Z,re)}),k._parser.setCsiHandler({final:"@"},function(B){return k.insertChars(B)}),k._parser.setCsiHandler({intermediates:" ",final:"@"},function(B){return k.scrollLeft(B)}),k._parser.setCsiHandler({final:"A"},function(B){return k.cursorUp(B)}),k._parser.setCsiHandler({intermediates:" ",final:"A"},function(B){return k.scrollRight(B)}),k._parser.setCsiHandler({final:"B"},function(B){return k.cursorDown(B)}),k._parser.setCsiHandler({final:"C"},function(B){return k.cursorForward(B)}),k._parser.setCsiHandler({final:"D"},function(B){return k.cursorBackward(B)}),k._parser.setCsiHandler({final:"E"},function(B){return k.cursorNextLine(B)}),k._parser.setCsiHandler({final:"F"},function(B){return k.cursorPrecedingLine(B)}),k._parser.setCsiHandler({final:"G"},function(B){return k.cursorCharAbsolute(B)}),k._parser.setCsiHandler({final:"H"},function(B){return k.cursorPosition(B)}),k._parser.setCsiHandler({final:"I"},function(B){return k.cursorForwardTab(B)}),k._parser.setCsiHandler({final:"J"},function(B){return k.eraseInDisplay(B)}),k._parser.setCsiHandler({prefix:"?",final:"J"},function(B){return k.eraseInDisplay(B)}),k._parser.setCsiHandler({final:"K"},function(B){return k.eraseInLine(B)}),k._parser.setCsiHandler({prefix:"?",final:"K"},function(B){return k.eraseInLine(B)}),k._parser.setCsiHandler({final:"L"},function(B){return k.insertLines(B)}),k._parser.setCsiHandler({final:"M"},function(B){return k.deleteLines(B)}),k._parser.setCsiHandler({final:"P"},function(B){return k.deleteChars(B)}),k._parser.setCsiHandler({final:"S"},function(B){return k.scrollUp(B)}),k._parser.setCsiHandler({final:"T"},function(B){return k.scrollDown(B)}),k._parser.setCsiHandler({final:"X"},function(B){return k.eraseChars(B)}),k._parser.setCsiHandler({final:"Z"},function(B){return k.cursorBackwardTab(B)}),k._parser.setCsiHandler({final:"`"},function(B){return k.charPosAbsolute(B)}),k._parser.setCsiHandler({final:"a"},function(B){return k.hPositionRelative(B)}),k._parser.setCsiHandler({final:"b"},function(B){return k.repeatPrecedingCharacter(B)}),k._parser.setCsiHandler({final:"c"},function(B){return k.sendDeviceAttributesPrimary(B)}),k._parser.setCsiHandler({prefix:">",final:"c"},function(B){return k.sendDeviceAttributesSecondary(B)}),k._parser.setCsiHandler({final:"d"},function(B){return k.linePosAbsolute(B)}),k._parser.setCsiHandler({final:"e"},function(B){return k.vPositionRelative(B)}),k._parser.setCsiHandler({final:"f"},function(B){return k.hVPosition(B)}),k._parser.setCsiHandler({final:"g"},function(B){return k.tabClear(B)}),k._parser.setCsiHandler({final:"h"},function(B){return k.setMode(B)}),k._parser.setCsiHandler({prefix:"?",final:"h"},function(B){return k.setModePrivate(B)}),k._parser.setCsiHandler({final:"l"},function(B){return k.resetMode(B)}),k._parser.setCsiHandler({prefix:"?",final:"l"},function(B){return k.resetModePrivate(B)}),k._parser.setCsiHandler({final:"m"},function(B){return k.charAttributes(B)}),k._parser.setCsiHandler({final:"n"},function(B){return k.deviceStatus(B)}),k._parser.setCsiHandler({prefix:"?",final:"n"},function(B){return k.deviceStatusPrivate(B)}),k._parser.setCsiHandler({intermediates:"!",final:"p"},function(B){return k.softReset(B)}),k._parser.setCsiHandler({intermediates:" ",final:"q"},function(B){return k.setCursorStyle(B)}),k._parser.setCsiHandler({final:"r"},function(B){return k.setScrollRegion(B)}),k._parser.setCsiHandler({final:"s"},function(B){return k.saveCursor(B)}),k._parser.setCsiHandler({final:"t"},function(B){return k.windowOptions(B)}),k._parser.setCsiHandler({final:"u"},function(B){return k.restoreCursor(B)}),k._parser.setCsiHandler({intermediates:"'",final:"}"},function(B){return k.insertColumns(B)}),k._parser.setCsiHandler({intermediates:"'",final:"~"},function(B){return k.deleteColumns(B)}),k._parser.setExecuteHandler(_.C0.BEL,function(){return k.bell()}),k._parser.setExecuteHandler(_.C0.LF,function(){return k.lineFeed()}),k._parser.setExecuteHandler(_.C0.VT,function(){return k.lineFeed()}),k._parser.setExecuteHandler(_.C0.FF,function(){return k.lineFeed()}),k._parser.setExecuteHandler(_.C0.CR,function(){return k.carriageReturn()}),k._parser.setExecuteHandler(_.C0.BS,function(){return k.backspace()}),k._parser.setExecuteHandler(_.C0.HT,function(){return k.tab()}),k._parser.setExecuteHandler(_.C0.SO,function(){return k.shiftOut()}),k._parser.setExecuteHandler(_.C0.SI,function(){return k.shiftIn()}),k._parser.setExecuteHandler(_.C1.IND,function(){return k.index()}),k._parser.setExecuteHandler(_.C1.NEL,function(){return k.nextLine()}),k._parser.setExecuteHandler(_.C1.HTS,function(){return k.tabSet()}),k._parser.setOscHandler(0,new d.OscHandler(function(B){k.setTitle(B),k.setIconName(B)})),k._parser.setOscHandler(1,new d.OscHandler(function(B){return k.setIconName(B)})),k._parser.setOscHandler(2,new d.OscHandler(function(B){return k.setTitle(B)})),k._parser.setEscHandler({final:"7"},function(){return k.saveCursor()}),k._parser.setEscHandler({final:"8"},function(){return k.restoreCursor()}),k._parser.setEscHandler({final:"D"},function(){return k.index()}),k._parser.setEscHandler({final:"E"},function(){return k.nextLine()}),k._parser.setEscHandler({final:"H"},function(){return k.tabSet()}),k._parser.setEscHandler({final:"M"},function(){return k.reverseIndex()}),k._parser.setEscHandler({final:"="},function(){return k.keypadApplicationMode()}),k._parser.setEscHandler({final:">"},function(){return k.keypadNumericMode()}),k._parser.setEscHandler({final:"c"},function(){return k.fullReset()}),k._parser.setEscHandler({final:"n"},function(){return k.setgLevel(2)}),k._parser.setEscHandler({final:"o"},function(){return k.setgLevel(3)}),k._parser.setEscHandler({final:"|"},function(){return k.setgLevel(3)}),k._parser.setEscHandler({final:"}"},function(){return k.setgLevel(2)}),k._parser.setEscHandler({final:"~"},function(){return k.setgLevel(1)}),k._parser.setEscHandler({intermediates:"%",final:"@"},function(){return k.selectDefaultCharset()}),k._parser.setEscHandler({intermediates:"%",final:"G"},function(){return k.selectDefaultCharset()});var F=function(B){U._parser.setEscHandler({intermediates:"(",final:B},function(){return k.selectCharset("("+B)}),U._parser.setEscHandler({intermediates:")",final:B},function(){return k.selectCharset(")"+B)}),U._parser.setEscHandler({intermediates:"*",final:B},function(){return k.selectCharset("*"+B)}),U._parser.setEscHandler({intermediates:"+",final:B},function(){return k.selectCharset("+"+B)}),U._parser.setEscHandler({intermediates:"-",final:B},function(){return k.selectCharset("-"+B)}),U._parser.setEscHandler({intermediates:".",final:B},function(){return k.selectCharset("."+B)}),U._parser.setEscHandler({intermediates:"/",final:B},function(){return k.selectCharset("/"+B)})},U=this;for(var L in p.CHARSETS)F(L);return k._parser.setEscHandler({intermediates:"#",final:"8"},function(){return k.screenAlignmentPattern()}),k._parser.setErrorHandler(function(B){return k._logService.error("Parsing error: ",B),B}),k._parser.setDcsHandler({intermediates:"$",final:"q"},new E(k._bufferService,k._coreService,k._logService,k._optionsService)),k}return g(C,O),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(){O.prototype.dispose.call(this)},C.prototype.parse=function(w){var S=this._bufferService.buffer,A=S.x,D=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 M=0;M<w.length;M+=131072){var N=M+131072<w.length?M+131072:w.length,P=typeof w=="string"?this._stringDecoder.decode(w.substring(M,N),this._parseBuffer):this._utf8Decoder.decode(w.subarray(M,N),this._parseBuffer);this._parser.parse(this._parseBuffer,P)}else P=typeof w=="string"?this._stringDecoder.decode(w,this._parseBuffer):this._utf8Decoder.decode(w,this._parseBuffer),this._parser.parse(this._parseBuffer,P);(S=this._bufferService.buffer).x===A&&S.y===D||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},C.prototype.print=function(w,S,A){var D,M,N=this._bufferService.buffer,P=this._charsetService.charset,z=this._optionsService.options.screenReaderMode,X=this._bufferService.cols,k=this._coreService.decPrivateModes.wraparound,F=this._coreService.modes.insertMode,U=this._curAttrData,L=N.lines.get(N.ybase+N.y);this._dirtyRowService.markDirty(N.y),N.x&&A-S>0&&L.getWidth(N.x-1)===2&&L.setCellFromCodePoint(N.x-1,0,1,U.fg,U.bg,U.extended);for(var B=S;B<A;++B){if(D=w[B],M=this._unicodeService.wcwidth(D),D<127&&P){var Z=P[String.fromCharCode(D)];Z&&(D=Z.charCodeAt(0))}if(z&&this._onA11yChar.fire(l.stringFromCodePoint(D)),M||!N.x){if(N.x+M-1>=X){if(k){for(;N.x<X;)L.setCellFromCodePoint(N.x++,0,1,U.fg,U.bg,U.extended);N.x=0,N.y++,N.y===N.scrollBottom+1?(N.y--,this._onRequestScroll.fire(this._eraseAttrData(),!0)):(N.y>=this._bufferService.rows&&(N.y=this._bufferService.rows-1),N.lines.get(N.ybase+N.y).isWrapped=!0),L=N.lines.get(N.ybase+N.y)}else if(N.x=X-1,M===2)continue}if(F&&(L.insertCells(N.x,M,N.getNullCell(U),U),L.getWidth(X-1)===2&&L.setCellFromCodePoint(X-1,t.NULL_CELL_CODE,t.NULL_CELL_WIDTH,U.fg,U.bg,U.extended)),L.setCellFromCodePoint(N.x++,D,M,U.fg,U.bg,U.extended),M>0)for(;--M;)L.setCellFromCodePoint(N.x++,0,0,U.fg,U.bg,U.extended)}else L.getWidth(N.x-1)?L.addCodepointToCell(N.x-1,D):L.addCodepointToCell(N.x-2,D)}A-S>0&&(L.loadCell(N.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),N.x<X&&A-S>0&&L.getWidth(N.x)===0&&!L.hasContent(N.x)&&L.setCellFromCodePoint(N.x,0,1,U.fg,U.bg,U.extended),this._dirtyRowService.markDirty(N.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(D){return!u(D.params[0],A._optionsService.options.windowOptions)||S(D)})},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 d.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,D){D===void 0&&(D=!1);var M=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+w);M.replaceCells(S,A,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),D&&(M.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 D=A.ybase+A.y,M=this._bufferService.rows-1-A.scrollBottom,N=this._bufferService.rows-1+A.ybase-M+1;S--;)A.lines.splice(N-1,1),A.lines.splice(D,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 D,M=A.ybase+A.y;for(D=this._bufferService.rows-1-A.scrollBottom,D=this._bufferService.rows-1+A.ybase-D;S--;)A.lines.splice(M,1),A.lines.splice(D,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(r.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,D=S.scrollTop;D<=S.scrollBottom;++D){var M=S.lines.get(S.ybase+D);M.deleteCells(0,A,S.getNullCell(this._eraseAttrData()),this._eraseAttrData()),M.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,D=S.scrollTop;D<=S.scrollBottom;++D){var M=S.lines.get(S.ybase+D);M.insertCells(0,A,S.getNullCell(this._eraseAttrData()),this._eraseAttrData()),M.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,D=S.scrollTop;D<=S.scrollBottom;++D){var M=this._bufferService.buffer.lines.get(S.ybase+D);M.insertCells(S.x,A,S.getNullCell(this._eraseAttrData()),this._eraseAttrData()),M.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,D=S.scrollTop;D<=S.scrollBottom;++D){var M=S.lines.get(S.ybase+D);M.deleteCells(S.x,A,S.getNullCell(this._eraseAttrData()),this._eraseAttrData()),M.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),D=0;D<S;++D)A[D]=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(_.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(_.C0.ESC+"[?6c"))},C.prototype.sendDeviceAttributesSecondary=function(w){w.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(_.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(_.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(w.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(_.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,D,M){return S===2?(w|=50331648,w&=-16777216,w|=c.AttributeData.fromColorRGB([A,D,M])):S===5&&(w&=-50331904,w|=33554432|255&A),w},C.prototype._extractColor=function(w,S,A){var D=[0,0,-1,0,0,0],M=0,N=0;do{if(D[N+M]=w.params[S+N],w.hasSubParams(S+N)){var P=w.getSubParams(S+N),z=0;do D[1]===5&&(M=1),D[N+z+1+M]=P[z];while(++z<P.length&&z+N+1+M<D.length);break}if(D[1]===5&&N+M>=2||D[1]===2&&N+M>=5)break;D[1]&&(M=1)}while(++N+S<w.length&&N+M<D.length);for(z=2;z<D.length;++z)D[z]===-1&&(D[z]=0);switch(D[0]){case 38:A.fg=this._updateAttrColor(A.fg,D[1],D[3],D[4],D[5]);break;case 48:A.bg=this._updateAttrColor(A.bg,D[1],D[3],D[4],D[5]);break;case 58:A.extended=A.extended.clone(),A.extended.underlineColor=this._updateAttrColor(A.extended.underlineColor,D[1],D[3],D[4],D[5])}return N},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=r.DEFAULT_ATTR_DATA.fg,void(this._curAttrData.bg=r.DEFAULT_ATTR_DATA.bg);for(var S,A=w.length,D=this._curAttrData,M=0;M<A;M++)(S=w.params[M])>=30&&S<=37?(D.fg&=-50331904,D.fg|=16777216|S-30):S>=40&&S<=47?(D.bg&=-50331904,D.bg|=16777216|S-40):S>=90&&S<=97?(D.fg&=-50331904,D.fg|=16777224|S-90):S>=100&&S<=107?(D.bg&=-50331904,D.bg|=16777224|S-100):S===0?(D.fg=r.DEFAULT_ATTR_DATA.fg,D.bg=r.DEFAULT_ATTR_DATA.bg):S===1?D.fg|=134217728:S===3?D.bg|=67108864:S===4?(D.fg|=268435456,this._processUnderline(w.hasSubParams(M)?w.getSubParams(M)[0]:1,D)):S===5?D.fg|=536870912:S===7?D.fg|=67108864:S===8?D.fg|=1073741824:S===2?D.bg|=134217728:S===21?this._processUnderline(2,D):S===22?(D.fg&=-134217729,D.bg&=-134217729):S===23?D.bg&=-67108865:S===24?D.fg&=-268435457:S===25?D.fg&=-536870913:S===27?D.fg&=-67108865:S===28?D.fg&=-1073741825:S===39?(D.fg&=-67108864,D.fg|=16777215&r.DEFAULT_ATTR_DATA.fg):S===49?(D.bg&=-67108864,D.bg|=16777215&r.DEFAULT_ATTR_DATA.bg):S===38||S===48||S===58?M+=this._extractColor(w,M,D):S===59?(D.extended=D.extended.clone(),D.extended.underlineColor=-1,D.updateExtended()):S===100?(D.fg&=-67108864,D.fg|=16777215&r.DEFAULT_ATTR_DATA.fg,D.bg&=-67108864,D.bg|=16777215&r.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(_.C0.ESC+"[0n");break;case 6:var S=this._bufferService.buffer.y+1,A=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(_.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(_.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=r.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(u(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(s.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(s.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(_.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(h[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=r.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=r.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 a.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 D=S.ybase+S.y+A,M=S.lines.get(D);M&&(M.fill(w),M.isWrapped=!1)}this._dirtyRowService.markAllDirty(),this._setCursor(0,0)},C}(o.Disposable);v.InputHandler=x},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.DEFAULT_CHARSET=v.CHARSETS=void 0,v.CHARSETS={},v.DEFAULT_CHARSET=v.CHARSETS.B,v.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"},v.CHARSETS.A={"#":"\xA3"},v.CHARSETS.B=void 0,v.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},v.CHARSETS.C=v.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},v.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},v.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},v.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},v.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},v.CHARSETS.E=v.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},v.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},v.CHARSETS.H=v.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},v.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.Params=void 0;var y=function(){function g(s,_){if(s===void 0&&(s=32),_===void 0&&(_=32),this.maxLength=s,this.maxSubParamsLength=_,_>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(s),this.length=0,this._subParams=new Int32Array(_),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(s),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return g.fromArray=function(s){var _=new g;if(!s.length)return _;for(var p=s[0]instanceof Array?1:0;p<s.length;++p){var e=s[p];if(e instanceof Array)for(var o=0;o<e.length;++o)_.addSubParam(e[o]);else _.addParam(e)}return _},g.prototype.clone=function(){var s=new g(this.maxLength,this.maxSubParamsLength);return s.params.set(this.params),s.length=this.length,s._subParams.set(this._subParams),s._subParamsLength=this._subParamsLength,s._subParamsIdx.set(this._subParamsIdx),s._rejectDigits=this._rejectDigits,s._rejectSubDigits=this._rejectSubDigits,s._digitIsSub=this._digitIsSub,s},g.prototype.toArray=function(){for(var s=[],_=0;_<this.length;++_){s.push(this.params[_]);var p=this._subParamsIdx[_]>>8,e=255&this._subParamsIdx[_];e-p>0&&s.push(Array.prototype.slice.call(this._subParams,p,e))}return s},g.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},g.prototype.addParam=function(s){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(s<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=s>2147483647?2147483647:s}},g.prototype.addSubParam=function(s){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(s<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=s>2147483647?2147483647:s,this._subParamsIdx[this.length-1]++}},g.prototype.hasSubParams=function(s){return(255&this._subParamsIdx[s])-(this._subParamsIdx[s]>>8)>0},g.prototype.getSubParams=function(s){var _=this._subParamsIdx[s]>>8,p=255&this._subParamsIdx[s];return p-_>0?this._subParams.subarray(_,p):null},g.prototype.getSubParamsAll=function(){for(var s={},_=0;_<this.length;++_){var p=this._subParamsIdx[_]>>8,e=255&this._subParamsIdx[_];e-p>0&&(s[_]=this._subParams.slice(p,e))}return s},g.prototype.addDigit=function(s){var _;if(!(this._rejectDigits||!(_=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var p=this._digitIsSub?this._subParams:this.params,e=p[_-1];p[_-1]=~e?Math.min(10*e+s,2147483647):s}},g}();v.Params=y},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.OscHandler=v.OscParser=void 0;var y=T(23),g=T(8),s=function(){function p(){this._state=0,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){}}return p.prototype.addHandler=function(e,o){this._handlers[e]===void 0&&(this._handlers[e]=[]);var n=this._handlers[e];return n.push(o),{dispose:function(){var l=n.indexOf(o);l!==-1&&n.splice(l,1)}}},p.prototype.setHandler=function(e,o){this._handlers[e]=[o]},p.prototype.clearHandler=function(e){this._handlers[e]&&delete this._handlers[e]},p.prototype.setHandlerFallback=function(e){this._handlerFb=e},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 e=this._handlers[this._id];if(e)for(var o=e.length-1;o>=0;o--)e[o].start();else this._handlerFb(this._id,"START")},p.prototype._put=function(e,o,n){var l=this._handlers[this._id];if(l)for(var r=l.length-1;r>=0;r--)l[r].put(e,o,n);else this._handlerFb(this._id,"PUT",g.utf32ToString(e,o,n))},p.prototype._end=function(e){var o=this._handlers[this._id];if(o){for(var n=o.length-1;n>=0&&o[n].end(e)===!1;n--);for(n--;n>=0;n--)o[n].end(!1)}else this._handlerFb(this._id,"END",e)},p.prototype.start=function(){this.reset(),this._id=-1,this._state=1},p.prototype.put=function(e,o,n){if(this._state!==3){if(this._state===1)for(;o<n;){var l=e[o++];if(l===59){this._state=2,this._start();break}if(l<48||57<l)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+l-48}this._state===2&&n-o>0&&this._put(e,o,n)}},p.prototype.end=function(e){this._state!==0&&(this._state!==3&&(this._state===1&&this._start(),this._end(e)),this._id=-1,this._state=0)},p}();v.OscParser=s;var _=function(){function p(e){this._handler=e,this._data="",this._hitLimit=!1}return p.prototype.start=function(){this._data="",this._hitLimit=!1},p.prototype.put=function(e,o,n){this._hitLimit||(this._data+=g.utf32ToString(e,o,n),this._data.length>y.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},p.prototype.end=function(e){var o;return this._hitLimit?o=!1:e&&(o=this._handler(this._data)),this._data="",this._hitLimit=!1,o},p}();v.OscHandler=_},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.PAYLOAD_LIMIT=void 0,v.PAYLOAD_LIMIT=1e7},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.DcsHandler=v.DcsParser=void 0;var y=T(8),g=T(21),s=T(23),_=[],p=function(){function o(){this._handlers=Object.create(null),this._active=_,this._ident=0,this._handlerFb=function(){}}return o.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},o.prototype.addHandler=function(n,l){this._handlers[n]===void 0&&(this._handlers[n]=[]);var r=this._handlers[n];return r.push(l),{dispose:function(){var i=r.indexOf(l);i!==-1&&r.splice(i,1)}}},o.prototype.setHandler=function(n,l){this._handlers[n]=[l]},o.prototype.clearHandler=function(n){this._handlers[n]&&delete this._handlers[n]},o.prototype.setHandlerFallback=function(n){this._handlerFb=n},o.prototype.reset=function(){this._active.length&&this.unhook(!1),this._active=_,this._ident=0},o.prototype.hook=function(n,l){if(this.reset(),this._ident=n,this._active=this._handlers[n]||_,this._active.length)for(var r=this._active.length-1;r>=0;r--)this._active[r].hook(l);else this._handlerFb(this._ident,"HOOK",l)},o.prototype.put=function(n,l,r){if(this._active.length)for(var i=this._active.length-1;i>=0;i--)this._active[i].put(n,l,r);else this._handlerFb(this._ident,"PUT",y.utf32ToString(n,l,r))},o.prototype.unhook=function(n){if(this._active.length){for(var l=this._active.length-1;l>=0&&this._active[l].unhook(n)===!1;l--);for(l--;l>=0;l--)this._active[l].unhook(!1)}else this._handlerFb(this._ident,"UNHOOK",n);this._active=_,this._ident=0},o}();v.DcsParser=p;var e=function(){function o(n){this._handler=n,this._data="",this._hitLimit=!1}return o.prototype.hook=function(n){this._params=n.clone(),this._data="",this._hitLimit=!1},o.prototype.put=function(n,l,r){this._hitLimit||(this._data+=y.utf32ToString(n,l,r),this._data.length>s.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},o.prototype.unhook=function(n){var l;return this._hitLimit?l=!1:n&&(l=this._handler(this._data,this._params||new g.Params)),this._params=void 0,this._data="",this._hitLimit=!1,l},o}();v.DcsHandler=e},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.removeTerminalFromCache=v.acquireCharAtlas=void 0;var y=T(26),g=T(43),s=[];v.acquireCharAtlas=function(_,p,e,o,n){for(var l=y.generateConfig(o,n,_,e),r=0;r<s.length;r++){var i=(t=s[r]).ownedBy.indexOf(p);if(i>=0){if(y.configEquals(t.config,l))return t.atlas;t.ownedBy.length===1?(t.atlas.dispose(),s.splice(r,1)):t.ownedBy.splice(i,1);break}}for(r=0;r<s.length;r++){var t=s[r];if(y.configEquals(t.config,l))return t.ownedBy.push(p),t.atlas}var a={atlas:new g.DynamicCharAtlas(document,l),config:l,ownedBy:[p]};return s.push(a),a.atlas},v.removeTerminalFromCache=function(_){for(var p=0;p<s.length;p++){var e=s[p].ownedBy.indexOf(_);if(e!==-1){s[p].ownedBy.length===1?(s[p].atlas.dispose(),s.splice(p,1)):s[p].ownedBy.splice(e,1);break}}}},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.is256Color=v.configEquals=v.generateConfig=void 0;var y=T(3);v.generateConfig=function(g,s,_,p){var e={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:g,scaledCharHeight:s,fontFamily:_.fontFamily,fontSize:_.fontSize,fontWeight:_.fontWeight,fontWeightBold:_.fontWeightBold,allowTransparency:_.allowTransparency,colors:e}},v.configEquals=function(g,s){for(var _=0;_<g.colors.ansi.length;_++)if(g.colors.ansi[_].rgba!==s.colors.ansi[_].rgba)return!1;return g.devicePixelRatio===s.devicePixelRatio&&g.fontFamily===s.fontFamily&&g.fontSize===s.fontSize&&g.fontWeight===s.fontWeight&&g.fontWeightBold===s.fontWeightBold&&g.allowTransparency===s.allowTransparency&&g.scaledCharWidth===s.scaledCharWidth&&g.scaledCharHeight===s.scaledCharHeight&&g.colors.foreground===s.colors.foreground&&g.colors.background===s.colors.background},v.is256Color=function(g){return g<y.DEFAULT_COLOR}},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.ColorManager=v.DEFAULT_ANSI_COLORS=void 0;var y=T(10),g=T(45),s=y.css.toColor("#ffffff"),_=y.css.toColor("#000000"),p=y.css.toColor("#ffffff"),e=y.css.toColor("#000000"),o={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};v.DEFAULT_ANSI_COLORS=function(){for(var l=[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")],r=[0,95,135,175,215,255],i=0;i<216;i++){var t=r[i/36%6|0],a=r[i/6%6|0],c=r[i%6];l.push({css:y.channels.toCss(t,a,c),rgba:y.channels.toRgba(t,a,c)})}for(i=0;i<24;i++){var d=8+10*i;l.push({css:y.channels.toCss(d,d,d),rgba:y.channels.toRgba(d,d,d)})}return l}();var n=function(){function l(r,i){this.allowTransparency=i;var t=r.createElement("canvas");t.width=1,t.height=1;var a=t.getContext("2d");if(!a)throw new Error("Could not get rendering context");this._ctx=a,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new g.ColorContrastCache,this.colors={foreground:s,background:_,cursor:p,cursorAccent:e,selectionTransparent:o,selectionOpaque:y.color.blend(_,o),ansi:v.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache}}return l.prototype.onOptionsChange=function(r){r==="minimumContrastRatio"&&this._contrastCache.clear()},l.prototype.setTheme=function(r){(r===void 0&&(r={}),this.colors.foreground=this._parseColor(r.foreground,s),this.colors.background=this._parseColor(r.background,_),this.colors.cursor=this._parseColor(r.cursor,p,!0),this.colors.cursorAccent=this._parseColor(r.cursorAccent,e,!0),this.colors.selectionTransparent=this._parseColor(r.selection,o,!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(r.black,v.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(r.red,v.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(r.green,v.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(r.yellow,v.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(r.blue,v.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(r.magenta,v.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(r.cyan,v.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(r.white,v.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(r.brightBlack,v.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(r.brightRed,v.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(r.brightGreen,v.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(r.brightYellow,v.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(r.brightBlue,v.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(r.brightMagenta,v.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(r.brightCyan,v.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(r.brightWhite,v.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear()},l.prototype._parseColor=function(r,i,t){if(t===void 0&&(t=this.allowTransparency),r===void 0)return i;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=r,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+r+" is invalid using fallback "+i.css),i;this._ctx.fillRect(0,0,1,1);var a=this._ctx.getImageData(0,0,1,1).data;if(a[3]!==255){if(!t)return console.warn("Color: "+r+" 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(x){return Number(x)}),d=c[0],f=c[1],h=c[2],u=c[3],E=Math.round(255*u);return{rgba:y.channels.toRgba(d,f,h,E),css:r}}return{css:this._ctx.fillStyle,rgba:y.channels.toRgba(a[0],a[1],a[2],a[3])}},l}();v.ColorManager=n},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.throwIfFalsy=void 0,v.throwIfFalsy=function(y){if(!y)throw new Error("value must not be falsy");return y}},function(I,v,T){"use strict";var y,g=this&&this.__extends||(y=function(n,l){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var t in i)i.hasOwnProperty(t)&&(r[t]=i[t])})(n,l)},function(n,l){function r(){this.constructor=n}y(n,l),n.prototype=l===null?Object.create(l):(r.prototype=l.prototype,new r)});Object.defineProperty(v,"__esModule",{value:!0}),v.CharacterJoinerRegistry=v.JoinedCellData=void 0;var s=T(6),_=T(3),p=T(4),e=function(n){function l(r,i,t){var a=n.call(this)||this;return a.content=0,a.combinedData="",a.fg=r.fg,a.bg=r.bg,a.combinedData=i,a._width=t,a}return g(l,n),l.prototype.isCombined=function(){return 2097152},l.prototype.getWidth=function(){return this._width},l.prototype.getChars=function(){return this.combinedData},l.prototype.getCode=function(){return 2097151},l.prototype.setFromCharData=function(r){throw new Error("not implemented")},l.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},l}(s.AttributeData);v.JoinedCellData=e;var o=function(){function n(l){this._bufferService=l,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new p.CellData}return n.prototype.registerCharacterJoiner=function(l){var r={id:this._nextCharacterJoinerId++,handler:l};return this._characterJoiners.push(r),r.id},n.prototype.deregisterCharacterJoiner=function(l){for(var r=0;r<this._characterJoiners.length;r++)if(this._characterJoiners[r].id===l)return this._characterJoiners.splice(r,1),!0;return!1},n.prototype.getJoinedCharacters=function(l){if(this._characterJoiners.length===0)return[];var r=this._bufferService.buffer.lines.get(l);if(!r||r.length===0)return[];for(var i=[],t=r.translateToString(!0),a=0,c=0,d=0,f=r.getFg(0),h=r.getBg(0),u=0;u<r.getTrimmedLength();u++)if(r.loadCell(u,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==f||this._workCell.bg!==h){if(u-a>1)for(var E=this._getJoinedRanges(t,d,c,r,a),x=0;x<E.length;x++)i.push(E[x]);a=u,d=c,f=this._workCell.fg,h=this._workCell.bg}c+=this._workCell.getChars().length||_.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-a>1)for(E=this._getJoinedRanges(t,d,c,r,a),x=0;x<E.length;x++)i.push(E[x]);return i},n.prototype._getJoinedRanges=function(l,r,i,t,a){for(var c=l.substring(r,i),d=this._characterJoiners[0].handler(c),f=1;f<this._characterJoiners.length;f++)for(var h=this._characterJoiners[f].handler(c),u=0;u<h.length;u++)n._mergeRanges(d,h[u]);return this._stringRangesToCellRanges(d,t,a),d},n.prototype._stringRangesToCellRanges=function(l,r,i){var t=0,a=!1,c=0,d=l[t];if(d){for(var f=i;f<this._bufferService.cols;f++){var h=r.getWidth(f),u=r.getString(f).length||_.WHITESPACE_CELL_CHAR.length;if(h!==0){if(!a&&d[0]<=c&&(d[0]=f,a=!0),d[1]<=c){if(d[1]=f,!(d=l[++t]))break;d[0]<=c?(d[0]=f,a=!0):a=!1}c+=u}}d&&(d[1]=this._bufferService.cols)}},n._mergeRanges=function(l,r){for(var i=!1,t=0;t<l.length;t++){var a=l[t];if(i){if(r[1]<=a[0])return l[t-1][1]=r[1],l;if(r[1]<=a[1])return l[t-1][1]=Math.max(r[1],a[1]),l.splice(t,1),l;l.splice(t,1),t--}else{if(r[1]<=a[0])return l.splice(t,0,r),l;if(r[1]<=a[1])return a[0]=Math.min(r[0],a[0]),l;r[0]<a[1]&&(a[0]=Math.min(r[0],a[0]),i=!0)}}return i?l[l.length-1][1]=r[1]:l.push(r),l},n}();v.CharacterJoinerRegistry=o},function(I,v,T){"use strict";function y(g,s){var _=s.getBoundingClientRect();return[g.clientX-_.left,g.clientY-_.top]}Object.defineProperty(v,"__esModule",{value:!0}),v.getRawByteCoords=v.getCoords=v.getCoordsRelativeToElement=void 0,v.getCoordsRelativeToElement=y,v.getCoords=function(g,s,_,p,e,o,n,l){if(e){var r=y(g,s);if(r)return r[0]=Math.ceil((r[0]+(l?o/2:0))/o),r[1]=Math.ceil(r[1]/n),r[0]=Math.min(Math.max(r[0],1),_+(l?1:0)),r[1]=Math.min(Math.max(r[1],1),p),r}},v.getRawByteCoords=function(g){if(g)return{x:g[0]+32,y:g[1]+32}}},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.RenderDebouncer=void 0;var y=function(){function g(s){this._renderCallback=s}return g.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},g.prototype.refresh=function(s,_,p){var e=this;this._rowCount=p,s=s!==void 0?s:0,_=_!==void 0?_:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,s):s,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,_):_,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return e._innerRefresh()}))},g.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var s=Math.max(this._rowStart,0),_=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._animationFrame=void 0,this._renderCallback(s,_)}},g}();v.RenderDebouncer=y},function(I,v,T){"use strict";var y,g=this&&this.__extends||(y=function(_,p){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,o){e.__proto__=o}||function(e,o){for(var n in o)o.hasOwnProperty(n)&&(e[n]=o[n])})(_,p)},function(_,p){function e(){this.constructor=_}y(_,p),_.prototype=p===null?Object.create(p):(e.prototype=p.prototype,new e)});Object.defineProperty(v,"__esModule",{value:!0}),v.ScreenDprMonitor=void 0;var s=function(_){function p(){var e=_!==null&&_.apply(this,arguments)||this;return e._currentDevicePixelRatio=window.devicePixelRatio,e}return g(p,_),p.prototype.setListener=function(e){var o=this;this._listener&&this.clearListener(),this._listener=e,this._outerListener=function(){o._listener&&(o._listener(window.devicePixelRatio,o._currentDevicePixelRatio),o._updateDpr())},this._updateDpr()},p.prototype.dispose=function(){_.prototype.dispose.call(this),this.clearListener()},p.prototype._updateDpr=function(){var e;this._outerListener&&((e=this._resolutionMediaMatchList)===null||e===void 0||e.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}(T(2).Disposable);v.ScreenDprMonitor=s},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.clone=void 0,v.clone=function y(g,s){if(s===void 0&&(s=5),typeof g!="object")return g;var _=Array.isArray(g)?[]:{};for(var p in g)_[p]=s<=1?g[p]:g[p]?y(g[p],s-1):g[p];return _}},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.Terminal=void 0;var y=T(4),g=T(35),s=T(18),_=T(0),p=T(83),e=function(){function t(a){this._core=new g.Terminal(a),this._addonManager=new p.AddonManager}return t.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(t.prototype,"onCursorMove",{get:function(){return this._core.onCursorMove},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onLineFeed",{get:function(){return this._core.onLineFeed},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onSelectionChange",{get:function(){return this._core.onSelectionChange},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onData",{get:function(){return this._core.onData},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onBinary",{get:function(){return this._core.onBinary},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onTitleChange",{get:function(){return this._core.onTitleChange},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onScroll",{get:function(){return this._core.onScroll},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onKey",{get:function(){return this._core.onKey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onRender",{get:function(){return this._core.onRender},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onResize",{get:function(){return this._core.onResize},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this._core.element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parser",{get:function(){return this._checkProposedApi(),this._parser||(this._parser=new r(this._core)),this._parser},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"unicode",{get:function(){return this._checkProposedApi(),new i(this._core)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textarea",{get:function(){return this._core.textarea},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rows",{get:function(){return this._core.rows},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cols",{get:function(){return this._core.cols},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buffer",{get:function(){return this._checkProposedApi(),new n(this._core.buffers)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"markers",{get:function(){return this._checkProposedApi(),this._core.markers},enumerable:!1,configurable:!0}),t.prototype.blur=function(){this._core.blur()},t.prototype.focus=function(){this._core.focus()},t.prototype.resize=function(a,c){this._verifyIntegers(a,c),this._core.resize(a,c)},t.prototype.open=function(a){this._core.open(a)},t.prototype.attachCustomKeyEventHandler=function(a){this._core.attachCustomKeyEventHandler(a)},t.prototype.registerLinkMatcher=function(a,c,d){return this._checkProposedApi(),this._core.registerLinkMatcher(a,c,d)},t.prototype.deregisterLinkMatcher=function(a){this._checkProposedApi(),this._core.deregisterLinkMatcher(a)},t.prototype.registerLinkProvider=function(a){return this._checkProposedApi(),this._core.registerLinkProvider(a)},t.prototype.registerCharacterJoiner=function(a){return this._checkProposedApi(),this._core.registerCharacterJoiner(a)},t.prototype.deregisterCharacterJoiner=function(a){this._checkProposedApi(),this._core.deregisterCharacterJoiner(a)},t.prototype.registerMarker=function(a){return this._checkProposedApi(),this._verifyIntegers(a),this._core.addMarker(a)},t.prototype.addMarker=function(a){return this.registerMarker(a)},t.prototype.hasSelection=function(){return this._core.hasSelection()},t.prototype.select=function(a,c,d){this._verifyIntegers(a,c,d),this._core.select(a,c,d)},t.prototype.getSelection=function(){return this._core.getSelection()},t.prototype.getSelectionPosition=function(){return this._core.getSelectionPosition()},t.prototype.clearSelection=function(){this._core.clearSelection()},t.prototype.selectAll=function(){this._core.selectAll()},t.prototype.selectLines=function(a,c){this._verifyIntegers(a,c),this._core.selectLines(a,c)},t.prototype.dispose=function(){this._addonManager.dispose(),this._core.dispose()},t.prototype.scrollLines=function(a){this._verifyIntegers(a),this._core.scrollLines(a)},t.prototype.scrollPages=function(a){this._verifyIntegers(a),this._core.scrollPages(a)},t.prototype.scrollToTop=function(){this._core.scrollToTop()},t.prototype.scrollToBottom=function(){this._core.scrollToBottom()},t.prototype.scrollToLine=function(a){this._verifyIntegers(a),this._core.scrollToLine(a)},t.prototype.clear=function(){this._core.clear()},t.prototype.write=function(a,c){this._core.write(a,c)},t.prototype.writeUtf8=function(a,c){this._core.write(a,c)},t.prototype.writeln=function(a,c){this._core.write(a),this._core.write(`\r
|
|
|
`,c)},t.prototype.paste=function(a){this._core.paste(a)},t.prototype.getOption=function(a){return this._core.optionsService.getOption(a)},t.prototype.setOption=function(a,c){this._core.optionsService.setOption(a,c)},t.prototype.refresh=function(a,c){this._verifyIntegers(a,c),this._core.refresh(a,c)},t.prototype.reset=function(){this._core.reset()},t.prototype.loadAddon=function(a){return this._addonManager.loadAddon(this,a)},Object.defineProperty(t,"strings",{get:function(){return s},enumerable:!1,configurable:!0}),t.prototype._verifyIntegers=function(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];for(var d=0,f=a;d<f.length;d++){var h=f[d];if(h===1/0||isNaN(h)||h%1!=0)throw new Error("This API only accepts integers")}},t}();v.Terminal=e;var o=function(){function t(a,c){this._buffer=a,this.type=c}return t.prototype.init=function(a){return this._buffer=a,this},Object.defineProperty(t.prototype,"cursorY",{get:function(){return this._buffer.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cursorX",{get:function(){return this._buffer.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewportY",{get:function(){return this._buffer.ydisp},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"baseY",{get:function(){return this._buffer.ybase},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this._buffer.lines.length},enumerable:!1,configurable:!0}),t.prototype.getLine=function(a){var c=this._buffer.lines.get(a);if(c)return new l(c)},t.prototype.getNullCell=function(){return new y.CellData},t}(),n=function(){function t(a){var c=this;this._buffers=a,this._onBufferChange=new _.EventEmitter,this._normal=new o(this._buffers.normal,"normal"),this._alternate=new o(this._buffers.alt,"alternate"),this._buffers.onBufferActivate(function(){return c._onBufferChange.fire(c.active)})}return Object.defineProperty(t.prototype,"onBufferChange",{get:function(){return this._onBufferChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.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(t.prototype,"normal",{get:function(){return this._normal.init(this._buffers.normal)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"alternate",{get:function(){return this._alternate.init(this._buffers.alt)},enumerable:!1,configurable:!0}),t}(),l=function(){function t(a){this._line=a}return Object.defineProperty(t.prototype,"isWrapped",{get:function(){return this._line.isWrapped},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this._line.length},enumerable:!1,configurable:!0}),t.prototype.getCell=function(a,c){if(!(a<0||a>=this._line.length))return c?(this._line.loadCell(a,c),c):this._line.loadCell(a,new y.CellData)},t.prototype.translateToString=function(a,c,d){return this._line.translateToString(a,c,d)},t}(),r=function(){function t(a){this._core=a}return t.prototype.registerCsiHandler=function(a,c){return this._core.addCsiHandler(a,function(d){return c(d.toArray())})},t.prototype.addCsiHandler=function(a,c){return this.registerCsiHandler(a,c)},t.prototype.registerDcsHandler=function(a,c){return this._core.addDcsHandler(a,function(d,f){return c(d,f.toArray())})},t.prototype.addDcsHandler=function(a,c){return this.registerDcsHandler(a,c)},t.prototype.registerEscHandler=function(a,c){return this._core.addEscHandler(a,c)},t.prototype.addEscHandler=function(a,c){return this.registerEscHandler(a,c)},t.prototype.registerOscHandler=function(a,c){return this._core.addOscHandler(a,c)},t.prototype.addOscHandler=function(a,c){return this.registerOscHandler(a,c)},t}(),i=function(){function t(a){this._core=a}return t.prototype.register=function(a){this._core.unicodeService.register(a)},Object.defineProperty(t.prototype,"versions",{get:function(){return this._core.unicodeService.versions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activeVersion",{get:function(){return this._core.unicodeService.activeVersion},set:function(a){this._core.unicodeService.activeVersion=a},enumerable:!1,configurable:!0}),t}()},function(I,v,T){"use strict";var y,g=this&&this.__extends||(y=function(X,k){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(F,U){F.__proto__=U}||function(F,U){for(var L in U)U.hasOwnProperty(L)&&(F[L]=U[L])})(X,k)},function(X,k){function F(){this.constructor=X}y(X,k),X.prototype=k===null?Object.create(k):(F.prototype=k.prototype,new F)});Object.defineProperty(v,"__esModule",{value:!0}),v.Terminal=void 0;var s=T(36),_=T(37),p=T(38),e=T(12),o=T(19),n=T(40),l=T(50),r=T(51),i=T(11),t=T(7),a=T(18),c=T(54),d=T(55),f=T(56),h=T(57),u=T(59),E=T(0),x=T(16),O=T(27),C=T(60),w=T(5),S=T(61),A=T(62),D=T(63),M=T(64),N=T(65),P=typeof window!="undefined"?window.document:null,z=function(X){function k(F){F===void 0&&(F={});var U=X.call(this,F)||this;return U.browser=i,U._keyDownHandled=!1,U._onCursorMove=new E.EventEmitter,U._onKey=new E.EventEmitter,U._onRender=new E.EventEmitter,U._onSelectionChange=new E.EventEmitter,U._onTitleChange=new E.EventEmitter,U._onFocus=new E.EventEmitter,U._onBlur=new E.EventEmitter,U._onA11yCharEmitter=new E.EventEmitter,U._onA11yTabEmitter=new E.EventEmitter,U._setup(),U.linkifier=U._instantiationService.createInstance(l.Linkifier),U.linkifier2=U.register(U._instantiationService.createInstance(D.Linkifier2)),U.register(U._inputHandler.onRequestBell(function(){return U.bell()})),U.register(U._inputHandler.onRequestRefreshRows(function(L,B){return U.refresh(L,B)})),U.register(U._inputHandler.onRequestReset(function(){return U.reset()})),U.register(U._inputHandler.onRequestScroll(function(L,B){return U.scroll(L,B||void 0)})),U.register(U._inputHandler.onRequestWindowsOptionsReport(function(L){return U._reportWindowsOptions(L)})),U.register(E.forwardEvent(U._inputHandler.onCursorMove,U._onCursorMove)),U.register(E.forwardEvent(U._inputHandler.onTitleChange,U._onTitleChange)),U.register(E.forwardEvent(U._inputHandler.onA11yChar,U._onA11yCharEmitter)),U.register(E.forwardEvent(U._inputHandler.onA11yTab,U._onA11yTabEmitter)),U.register(U._bufferService.onResize(function(L){return U._afterResize(L.cols,L.rows)})),U}return g(k,X),Object.defineProperty(k.prototype,"options",{get:function(){return this.optionsService.options},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),k.prototype.dispose=function(){var F,U,L;this._isDisposed||(X.prototype.dispose.call(this),(F=this._renderService)===null||F===void 0||F.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(L=(U=this.element)===null||U===void 0?void 0:U.parentNode)===null||L===void 0||L.removeChild(this.element))},k.prototype._setup=function(){X.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(k.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),k.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},k.prototype._updateOptions=function(F){var U,L,B,Z;switch(X.prototype._updateOptions.call(this,F),F){case"fontFamily":case"fontSize":(U=this._renderService)===null||U===void 0||U.clear(),(L=this._charSizeService)===null||L===void 0||L.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)):((Z=this._accessibilityManager)===null||Z===void 0||Z.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.options.theme)}},k.prototype._onTextAreaFocus=function(F){this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(e.C0.ESC+"[I"),this.updateCursorStyle(F),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},k.prototype.blur=function(){var F;return(F=this.textarea)===null||F===void 0?void 0:F.blur()},k.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(e.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},k.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing){var F=Math.ceil(this._charSizeService.height*this.optionsService.options.lineHeight),U=this._bufferService.buffer.y*F,L=this._bufferService.buffer.x*this._charSizeService.width;this.textarea.style.left=L+"px",this.textarea.style.top=U+"px",this.textarea.style.width=this._charSizeService.width+"px",this.textarea.style.height=F+"px",this.textarea.style.lineHeight=F+"px",this.textarea.style.zIndex="-5"}},k.prototype._initGlobal=function(){var F=this;this._bindKeys(),this.register(t.addDisposableDomListener(this.element,"copy",function(L){F.hasSelection()&&p.copyHandler(L,F._selectionService)}));var U=function(L){return p.handlePasteEvent(L,F.textarea,F._coreService)};this.register(t.addDisposableDomListener(this.textarea,"paste",U)),this.register(t.addDisposableDomListener(this.element,"paste",U)),i.isFirefox?this.register(t.addDisposableDomListener(this.element,"mousedown",function(L){L.button===2&&p.rightClickHandler(L,F.textarea,F.screenElement,F._selectionService,F.options.rightClickSelectsWord)})):this.register(t.addDisposableDomListener(this.element,"contextmenu",function(L){p.rightClickHandler(L,F.textarea,F.screenElement,F._selectionService,F.options.rightClickSelectsWord)})),i.isLinux&&this.register(t.addDisposableDomListener(this.element,"auxclick",function(L){L.button===1&&p.moveTextAreaUnderMouseCursor(L,F.textarea,F.screenElement)}))},k.prototype._bindKeys=function(){var F=this;this.register(t.addDisposableDomListener(this.textarea,"keyup",function(U){return F._keyUp(U)},!0)),this.register(t.addDisposableDomListener(this.textarea,"keydown",function(U){return F._keyDown(U)},!0)),this.register(t.addDisposableDomListener(this.textarea,"keypress",function(U){return F._keyPress(U)},!0)),this.register(t.addDisposableDomListener(this.textarea,"compositionstart",function(){return F._compositionHelper.compositionstart()})),this.register(t.addDisposableDomListener(this.textarea,"compositionupdate",function(U){return F._compositionHelper.compositionupdate(U)})),this.register(t.addDisposableDomListener(this.textarea,"compositionend",function(){return F._compositionHelper.compositionend()})),this.register(this.onRender(function(){return F._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(U){return F._queueLinkification(U.start,U.end)}))},k.prototype.open=function(F){var U=this;if(!F)throw new Error("Terminal requires a parent element.");P.body.contains(F)||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=F.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"),F.appendChild(this.element);var L=P.createDocumentFragment();this._viewportElement=P.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),L.appendChild(this._viewportElement),this._viewportScrollArea=P.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=P.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=P.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),L.appendChild(this.screenElement),this.textarea=P.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",a.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(t.addDisposableDomListener(this.textarea,"focus",function(re){return U._onTextAreaFocus(re)})),this.register(t.addDisposableDomListener(this.textarea,"blur",function(){return U._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var B=this._instantiationService.createInstance(M.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=P.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(s.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(L),this._theme=this.options.theme||this._theme,this._colorManager=new O.ColorManager(P,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(re){return U._colorManager.onOptionsChange(re)})),this._colorManager.setTheme(this._theme);var Z=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(C.RenderService,Z,this.rows,this.screenElement)),this._instantiationService.setService(w.IRenderService,this._renderService),this.register(this._renderService.onRenderedBufferChange(function(re){return U._onRender.fire(re)})),this.onResize(function(re){return U._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(_.Viewport,function(re,he){return U.scrollLines(re,he)},this._viewportElement,this._viewportScrollArea),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return U.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){U._renderService.onCursorMove(),U._syncTextArea()})),this.register(this.onResize(function(){return U._renderService.onResize(U.cols,U.rows)})),this.register(this.onBlur(function(){return U._renderService.onBlur()})),this.register(this.onFocus(function(){return U._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return U.viewport.syncScrollArea()})),this._selectionService=this.register(this._instantiationService.createInstance(r.SelectionService,this.element,this.screenElement)),this._instantiationService.setService(w.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(function(re){return U.scrollLines(re.amount,re.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return U._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(re){return U._renderService.onSelectionChanged(re.start,re.end,re.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(re){U.textarea.value=re,U.textarea.focus(),U.textarea.select()})),this.register(this.onScroll(function(){U.viewport.syncScrollArea(),U._selectionService.refresh()})),this.register(t.addDisposableDomListener(this._viewportElement,"scroll",function(){return U._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(d.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return U._mouseZoneManager.clearAll()})),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.linkifier2.attachToDom(this.element,this._mouseService,this._renderService),this.register(t.addDisposableDomListener(this.element,"mousedown",function(re){return U._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()},k.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(h.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier,this.linkifier2);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},k.prototype._setTheme=function(F){var U,L,B;this._theme=F,(U=this._colorManager)===null||U===void 0||U.setTheme(F),(L=this._renderService)===null||L===void 0||L.setColors(this._colorManager.colors),(B=this.viewport)===null||B===void 0||B.onThemeChange(this._colorManager.colors)},k.prototype.bindMouse=function(){var F=this,U=this,L=this.element;function B(te){var Re,Te,pe=U._mouseService.getRawByteCoords(te,U.screenElement,U.cols,U.rows);if(!pe)return!1;switch(te.overrideType||te.type){case"mousemove":Te=32,te.buttons===void 0?(Re=3,te.button!==void 0&&(Re=te.button<3?te.button:3)):Re=1&te.buttons?0:4&te.buttons?1:2&te.buttons?2:3;break;case"mouseup":Te=0,Re=te.button<3?te.button:3;break;case"mousedown":Te=1,Re=te.button<3?te.button:3;break;case"wheel":te.deltaY!==0&&(Te=te.deltaY<0?0:1),Re=4;break;default:return!1}return!(Te===void 0||Re===void 0||Re>4)&&U._coreMouseService.triggerMouseEvent({col:pe.x-33,row:pe.y-33,button:Re,action:Te,ctrl:te.ctrlKey,alt:te.altKey,shift:te.shiftKey})}var Z={mouseup:null,wheel:null,mousedrag:null,mousemove:null},re=function(te){return B(te),te.buttons||(F._document.removeEventListener("mouseup",Z.mouseup),Z.mousedrag&&F._document.removeEventListener("mousemove",Z.mousedrag)),F.cancel(te)},he=function(te){return B(te),te.preventDefault(),F.cancel(te)},Ce=function(te){te.buttons&&B(te)},ke=function(te){te.buttons||B(te)};this.register(this._coreMouseService.onProtocolChange(function(te){te?(F.optionsService.options.logLevel==="debug"&&F._logService.debug("Binding to mouse events:",F._coreMouseService.explainEvents(te)),F.element.classList.add("enable-mouse-events"),F._selectionService.disable()):(F._logService.debug("Unbinding from mouse events."),F.element.classList.remove("enable-mouse-events"),F._selectionService.enable()),8&te?Z.mousemove||(L.addEventListener("mousemove",ke),Z.mousemove=ke):(L.removeEventListener("mousemove",Z.mousemove),Z.mousemove=null),16&te?Z.wheel||(L.addEventListener("wheel",he,{passive:!1}),Z.wheel=he):(L.removeEventListener("wheel",Z.wheel),Z.wheel=null),2&te?Z.mouseup||(Z.mouseup=re):(F._document.removeEventListener("mouseup",Z.mouseup),Z.mouseup=null),4&te?Z.mousedrag||(Z.mousedrag=Ce):(F._document.removeEventListener("mousemove",Z.mousedrag),Z.mousedrag=null)})),this._coreMouseService.activeProtocol=this._coreMouseService.activeProtocol,this.register(t.addDisposableDomListener(L,"mousedown",function(te){if(te.preventDefault(),F.focus(),F._coreMouseService.areMouseEventsActive&&!F._selectionService.shouldForceSelection(te))return B(te),Z.mouseup&&F._document.addEventListener("mouseup",Z.mouseup),Z.mousedrag&&F._document.addEventListener("mousemove",Z.mousedrag),F.cancel(te)})),this.register(t.addDisposableDomListener(L,"wheel",function(te){if(!Z.wheel){if(!F.buffer.hasScrollback){var Re=F.viewport.getLinesScrolled(te);if(Re===0)return;for(var Te=e.C0.ESC+(F._coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(te.deltaY<0?"A":"B"),pe="",me=0;me<Math.abs(Re);me++)pe+=Te;F._coreService.triggerDataEvent(pe,!0)}}},{passive:!0})),this.register(t.addDisposableDomListener(L,"wheel",function(te){if(!Z.wheel)return F.viewport.onWheel(te)?void 0:F.cancel(te)},{passive:!1})),this.register(t.addDisposableDomListener(L,"touchstart",function(te){if(!F._coreMouseService.areMouseEventsActive)return F.viewport.onTouchStart(te),F.cancel(te)},{passive:!0})),this.register(t.addDisposableDomListener(L,"touchmove",function(te){if(!F._coreMouseService.areMouseEventsActive)return F.viewport.onTouchMove(te)?void 0:F.cancel(te)},{passive:!1}))},k.prototype.refresh=function(F,U){var L;(L=this._renderService)===null||L===void 0||L.refreshRows(F,U)},k.prototype._queueLinkification=function(F,U){var L;(L=this.linkifier)===null||L===void 0||L.linkifyRows(F,U)},k.prototype.updateCursorStyle=function(F){this._selectionService&&this._selectionService.shouldColumnSelect(F)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},k.prototype._showCursor=function(){this._coreService.isCursorInitialized||(this._coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},k.prototype.scrollLines=function(F,U){X.prototype.scrollLines.call(this,F,U),this.refresh(0,this.rows-1)},k.prototype.paste=function(F){p.paste(F,this.textarea,this._coreService)},k.prototype.attachCustomKeyEventHandler=function(F){this._customKeyEventHandler=F},k.prototype.registerLinkMatcher=function(F,U,L){var B=this.linkifier.registerLinkMatcher(F,U,L);return this.refresh(0,this.rows-1),B},k.prototype.deregisterLinkMatcher=function(F){this.linkifier.deregisterLinkMatcher(F)&&this.refresh(0,this.rows-1)},k.prototype.registerLinkProvider=function(F){return this.linkifier2.registerLinkProvider(F)},k.prototype.registerCharacterJoiner=function(F){var U=this._renderService.registerCharacterJoiner(F);return this.refresh(0,this.rows-1),U},k.prototype.deregisterCharacterJoiner=function(F){this._renderService.deregisterCharacterJoiner(F)&&this.refresh(0,this.rows-1)},Object.defineProperty(k.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),k.prototype.addMarker=function(F){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+F)},k.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},k.prototype.select=function(F,U,L){this._selectionService.setSelection(F,U,L)},k.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},k.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]}},k.prototype.clearSelection=function(){var F;(F=this._selectionService)===null||F===void 0||F.clearSelection()},k.prototype.selectAll=function(){var F;(F=this._selectionService)===null||F===void 0||F.selectAll()},k.prototype.selectLines=function(F,U){var L;(L=this._selectionService)===null||L===void 0||L.selectLines(F,U)},k.prototype._keyDown=function(F){if(this._keyDownHandled=!1,this._customKeyEventHandler&&this._customKeyEventHandler(F)===!1)return!1;if(!this._compositionHelper.keydown(F))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var U=u.evaluateKeyboardEvent(F,this._coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(F),U.type===3||U.type===2){var L=this.rows-1;return this.scrollLines(U.type===2?-L:L),this.cancel(F,!0)}return U.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,F)||(U.cancel&&this.cancel(F,!0),!U.key||(U.key!==e.C0.ETX&&U.key!==e.C0.CR||(this.textarea.value=""),this._onKey.fire({key:U.key,domEvent:F}),this._showCursor(),this._coreService.triggerDataEvent(U.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(F,!0)))},k.prototype._isThirdLevelShift=function(F,U){var L=F.isMac&&!this.options.macOptionIsMeta&&U.altKey&&!U.ctrlKey&&!U.metaKey||F.isWindows&&U.altKey&&U.ctrlKey&&!U.metaKey;return U.type==="keypress"?L:L&&(!U.keyCode||U.keyCode>47)},k.prototype._keyUp=function(F){this._customKeyEventHandler&&this._customKeyEventHandler(F)===!1||(function(U){return U.keyCode===16||U.keyCode===17||U.keyCode===18}(F)||this.focus(),this.updateCursorStyle(F))},k.prototype._keyPress=function(F){var U;if(this._keyDownHandled)return!1;if(this._customKeyEventHandler&&this._customKeyEventHandler(F)===!1)return!1;if(this.cancel(F),F.charCode)U=F.charCode;else if(F.which===null||F.which===void 0)U=F.keyCode;else{if(F.which===0||F.charCode===0)return!1;U=F.which}return!(!U||(F.altKey||F.ctrlKey||F.metaKey)&&!this._isThirdLevelShift(this.browser,F))&&(U=String.fromCharCode(U),this._onKey.fire({key:U,domEvent:F}),this._showCursor(),this._coreService.triggerDataEvent(U,!0),!0)},k.prototype.bell=function(){this._soundBell()&&this._soundService.playBellSound()},k.prototype.resize=function(F,U){F!==this.cols||U!==this.rows?X.prototype.resize.call(this,F,U):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},k.prototype._afterResize=function(F,U){var L,B;(L=this._charSizeService)===null||L===void 0||L.measure(),(B=this.viewport)===null||B===void 0||B.syncScrollArea(!0)},k.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 F=1;F<this.rows;F++)this.buffer.lines.push(this.buffer.getBlankLine(x.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire(this.buffer.ydisp)}},k.prototype.reset=function(){var F,U;this.options.rows=this.rows,this.options.cols=this.cols;var L=this._customKeyEventHandler;this._setup(),X.prototype.reset.call(this),(F=this._selectionService)===null||F===void 0||F.reset(),this._customKeyEventHandler=L,this.refresh(0,this.rows-1),(U=this.viewport)===null||U===void 0||U.syncScrollArea()},k.prototype._reportWindowsOptions=function(F){if(this._renderService)switch(F){case o.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var U=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),L=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this._coreService.triggerDataEvent(e.C0.ESC+"[4;"+L+";"+U+"t");break;case o.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var B=this._renderService.dimensions.scaledCellWidth.toFixed(0),Z=this._renderService.dimensions.scaledCellHeight.toFixed(0);this._coreService.triggerDataEvent(e.C0.ESC+"[6;"+Z+";"+B+"t")}},k.prototype.cancel=function(F,U){if(this.options.cancelEvents||U)return F.preventDefault(),F.stopPropagation(),!1},k.prototype._visualBell=function(){return!1},k.prototype._soundBell=function(){return this.options.bellStyle==="sound"},k}(N.CoreTerminal);v.Terminal=z},function(I,v,T){"use strict";var y=this&&this.__decorate||function(e,o,n,l){var r,i=arguments.length,t=i<3?o:l===null?l=Object.getOwnPropertyDescriptor(o,n):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(e,o,n,l);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(t=(i<3?r(t):i>3?r(o,n,t):r(o,n))||t);return i>3&&t&&Object.defineProperty(o,n,t),t},g=this&&this.__param||function(e,o){return function(n,l){o(n,l,e)}};Object.defineProperty(v,"__esModule",{value:!0}),v.CompositionHelper=void 0;var s=T(5),_=T(1),p=function(){function e(o,n,l,r,i,t){this._textarea=o,this._compositionView=n,this._bufferService=l,this._optionsService=r,this._charSizeService=i,this._coreService=t,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0}}return Object.defineProperty(e.prototype,"isComposing",{get:function(){return this._isComposing},enumerable:!1,configurable:!0}),e.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._compositionView.classList.add("active")},e.prototype.compositionupdate=function(o){var n=this;this._compositionView.textContent=o.data,this.updateCompositionElements(),setTimeout(function(){n._compositionPosition.end=n._textarea.value.length},0)},e.prototype.compositionend=function(){this._finalizeComposition(!0)},e.prototype.keydown=function(o){if(this._isComposing||this._isSendingComposition){if(o.keyCode===229)return!1;if(o.keyCode===16||o.keyCode===17||o.keyCode===18)return!1;this._finalizeComposition(!1)}return o.keyCode!==229||(this._handleAnyTextareaChanges(),!1)},e.prototype._finalizeComposition=function(o){var n=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,o){var l={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(l.start,l.end):n._textarea.value.substring(l.start),n._coreService.triggerDataEvent(i,!0)}},0)}else{this._isSendingComposition=!1;var r=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(r,!0)}},e.prototype._handleAnyTextareaChanges=function(){var o=this,n=this._textarea.value;setTimeout(function(){if(!o._isComposing){var l=o._textarea.value.replace(n,"");l.length>0&&o._coreService.triggerDataEvent(l,!0)}},0)},e.prototype.updateCompositionElements=function(o){var n=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var l=Math.ceil(this._charSizeService.height*this._optionsService.options.lineHeight),r=this._bufferService.buffer.y*l,i=this._bufferService.buffer.x*this._charSizeService.width;this._compositionView.style.left=i+"px",this._compositionView.style.top=r+"px",this._compositionView.style.height=l+"px",this._compositionView.style.lineHeight=l+"px",this._compositionView.style.fontFamily=this._optionsService.options.fontFamily,this._compositionView.style.fontSize=this._optionsService.options.fontSize+"px";var t=this._compositionView.getBoundingClientRect();this._textarea.style.left=i+"px",this._textarea.style.top=r+"px",this._textarea.style.width=t.width+"px",this._textarea.style.height=t.height+"px",this._textarea.style.lineHeight=t.height+"px"}o||setTimeout(function(){return n.updateCompositionElements(!0)},0)}},e=y([g(2,_.IBufferService),g(3,_.IOptionsService),g(4,s.ICharSizeService),g(5,_.ICoreService)],e)}();v.CompositionHelper=p},function(I,v,T){"use strict";var y,g=this&&this.__extends||(y=function(r,i){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,a){t.__proto__=a}||function(t,a){for(var c in a)a.hasOwnProperty(c)&&(t[c]=a[c])})(r,i)},function(r,i){function t(){this.constructor=r}y(r,i),r.prototype=i===null?Object.create(i):(t.prototype=i.prototype,new t)}),s=this&&this.__decorate||function(r,i,t,a){var c,d=arguments.length,f=d<3?i:a===null?a=Object.getOwnPropertyDescriptor(i,t):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(r,i,t,a);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(f=(d<3?c(f):d>3?c(i,t,f):c(i,t))||f);return d>3&&f&&Object.defineProperty(i,t,f),f},_=this&&this.__param||function(r,i){return function(t,a){i(t,a,r)}};Object.defineProperty(v,"__esModule",{value:!0}),v.Viewport=void 0;var p=T(2),e=T(7),o=T(5),n=T(1),l=function(r){function i(t,a,c,d,f,h,u){var E=r.call(this)||this;return E._scrollLines=t,E._viewportElement=a,E._scrollArea=c,E._bufferService=d,E._optionsService=f,E._charSizeService=h,E._renderService=u,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(e.addDisposableDomListener(E._viewportElement,"scroll",E._onScroll.bind(E))),setTimeout(function(){return E.syncScrollArea()},0),E}return g(i,r),i.prototype.onThemeChange=function(t){this._viewportElement.style.backgroundColor=t.background.css},i.prototype._refresh=function(t){var a=this;if(t)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=requestAnimationFrame(function(){return a._innerRefresh()}))},i.prototype._innerRefresh=function(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;var t=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.canvasHeight);this._lastRecordedBufferHeight!==t&&(this._lastRecordedBufferHeight=t,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}var a=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==a&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=a),this._refreshAnimationFrame=null},i.prototype.syncScrollArea=function(t){if(t===void 0&&(t=!1),this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(t);if(this._lastRecordedViewportHeight===this._renderService.dimensions.canvasHeight){var a=this._bufferService.buffer.ydisp*this._currentRowHeight;this._lastScrollTop===a&&this._lastScrollTop===this._viewportElement.scrollTop&&this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio===this._currentRowHeight||this._refresh(t)}else this._refresh(t)},i.prototype._onScroll=function(t){if(this._lastScrollTop=this._viewportElement.scrollTop,this._viewportElement.offsetParent)if(this._ignoreNextScrollEvent)this._ignoreNextScrollEvent=!1;else{var a=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(a,!0)}},i.prototype._bubbleScroll=function(t,a){var c=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(a<0&&this._viewportElement.scrollTop!==0||a>0&&c<this._lastRecordedBufferHeight)||(t.cancelable&&t.preventDefault(),!1)},i.prototype.onWheel=function(t){var a=this._getPixelsScrolled(t);return a!==0&&(this._viewportElement.scrollTop+=a,this._bubbleScroll(t,a))},i.prototype._getPixelsScrolled=function(t){if(t.deltaY===0)return 0;var a=this._applyScrollModifier(t.deltaY,t);return t.deltaMode===WheelEvent.DOM_DELTA_LINE?a*=this._currentRowHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(a*=this._currentRowHeight*this._bufferService.rows),a},i.prototype.getLinesScrolled=function(t){if(t.deltaY===0)return 0;var a=this._applyScrollModifier(t.deltaY,t);return t.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(a/=this._currentRowHeight+0,this._wheelPartialScroll+=a,a=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(a*=this._bufferService.rows),a},i.prototype._applyScrollModifier=function(t,a){var c=this._optionsService.options.fastScrollModifier;return c==="alt"&&a.altKey||c==="ctrl"&&a.ctrlKey||c==="shift"&&a.shiftKey?t*this._optionsService.options.fastScrollSensitivity*this._optionsService.options.scrollSensitivity:t*this._optionsService.options.scrollSensitivity},i.prototype.onTouchStart=function(t){this._lastTouchY=t.touches[0].pageY},i.prototype.onTouchMove=function(t){var a=this._lastTouchY-t.touches[0].pageY;return this._lastTouchY=t.touches[0].pageY,a!==0&&(this._viewportElement.scrollTop+=a,this._bubbleScroll(t,a))},i=s([_(3,n.IBufferService),_(4,n.IOptionsService),_(5,o.ICharSizeService),_(6,o.IRenderService)],i)}(p.Disposable);v.Viewport=l},function(I,v,T){"use strict";function y(p){return p.replace(/\r?\n/g,"\r")}function g(p,e){return e?"[200~"+p+"[201~":p}function s(p,e,o){p=g(p=y(p),o.decPrivateModes.bracketedPasteMode),o.triggerDataEvent(p,!0),e.value=""}function _(p,e,o){var n=o.getBoundingClientRect(),l=p.clientX-n.left-10,r=p.clientY-n.top-10;e.style.width="20px",e.style.height="20px",e.style.left=l+"px",e.style.top=r+"px",e.style.zIndex="1000",e.focus()}Object.defineProperty(v,"__esModule",{value:!0}),v.rightClickHandler=v.moveTextAreaUnderMouseCursor=v.paste=v.handlePasteEvent=v.copyHandler=v.bracketTextForPaste=v.prepareTextForTerminal=void 0,v.prepareTextForTerminal=y,v.bracketTextForPaste=g,v.copyHandler=function(p,e){p.clipboardData&&p.clipboardData.setData("text/plain",e.selectionText),p.preventDefault()},v.handlePasteEvent=function(p,e,o){p.stopPropagation(),p.clipboardData&&s(p.clipboardData.getData("text/plain"),e,o)},v.paste=s,v.moveTextAreaUnderMouseCursor=_,v.rightClickHandler=function(p,e,o,n,l){_(p,e,o),l&&!n.isClickInSelection(p)&&n.selectWordAtCursor(p),e.value=n.selectionText,e.select()}},function(I,v,T){"use strict";var y,g=this&&this.__extends||(y=function(r,i){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,a){t.__proto__=a}||function(t,a){for(var c in a)a.hasOwnProperty(c)&&(t[c]=a[c])})(r,i)},function(r,i){function t(){this.constructor=r}y(r,i),r.prototype=i===null?Object.create(i):(t.prototype=i.prototype,new t)});Object.defineProperty(v,"__esModule",{value:!0}),v.EscapeSequenceParser=v.VT500_TRANSITION_TABLE=v.TransitionTable=void 0;var s=T(2),_=T(15),p=T(21),e=T(22),o=T(24),n=function(){function r(i){this.table=new Uint8Array(i)}return r.prototype.setDefault=function(i,t){_.fill(this.table,i<<4|t)},r.prototype.add=function(i,t,a,c){this.table[t<<8|i]=a<<4|c},r.prototype.addMany=function(i,t,a,c){for(var d=0;d<i.length;d++)this.table[t<<8|i[d]]=a<<4|c},r}();v.TransitionTable=n,v.VT500_TRANSITION_TABLE=function(){var r=new n(4095),i=Array.apply(null,Array(256)).map(function(h,u){return u}),t=function(h,u){return i.slice(h,u)},a=t(32,127),c=t(0,24);c.push(25),c.push.apply(c,t(28,32));var d,f=t(0,14);for(d in r.setDefault(1,0),r.addMany(a,0,2,0),f)r.addMany([24,26,153,154],d,3,0),r.addMany(t(128,144),d,3,0),r.addMany(t(144,152),d,3,0),r.add(156,d,0,0),r.add(27,d,11,1),r.add(157,d,4,8),r.addMany([152,158,159],d,0,7),r.add(155,d,11,3),r.add(144,d,11,9);return r.addMany(c,0,3,0),r.addMany(c,1,3,1),r.add(127,1,0,1),r.addMany(c,8,0,8),r.addMany(c,3,3,3),r.add(127,3,0,3),r.addMany(c,4,3,4),r.add(127,4,0,4),r.addMany(c,6,3,6),r.addMany(c,5,3,5),r.add(127,5,0,5),r.addMany(c,2,3,2),r.add(127,2,0,2),r.add(93,1,4,8),r.addMany(a,8,5,8),r.add(127,8,5,8),r.addMany([156,27,24,26,7],8,6,0),r.addMany(t(28,32),8,0,8),r.addMany([88,94,95],1,0,7),r.addMany(a,7,0,7),r.addMany(c,7,0,7),r.add(156,7,0,0),r.add(127,7,0,7),r.add(91,1,11,3),r.addMany(t(64,127),3,7,0),r.addMany(t(48,60),3,8,4),r.addMany([60,61,62,63],3,9,4),r.addMany(t(48,60),4,8,4),r.addMany(t(64,127),4,7,0),r.addMany([60,61,62,63],4,0,6),r.addMany(t(32,64),6,0,6),r.add(127,6,0,6),r.addMany(t(64,127),6,0,0),r.addMany(t(32,48),3,9,5),r.addMany(t(32,48),5,9,5),r.addMany(t(48,64),5,0,6),r.addMany(t(64,127),5,7,0),r.addMany(t(32,48),4,9,5),r.addMany(t(32,48),1,9,2),r.addMany(t(32,48),2,9,2),r.addMany(t(48,127),2,10,0),r.addMany(t(48,80),1,10,0),r.addMany(t(81,88),1,10,0),r.addMany([89,90,92],1,10,0),r.addMany(t(96,127),1,10,0),r.add(80,1,11,9),r.addMany(c,9,0,9),r.add(127,9,0,9),r.addMany(t(28,32),9,0,9),r.addMany(t(32,48),9,9,12),r.addMany(t(48,60),9,8,10),r.addMany([60,61,62,63],9,9,10),r.addMany(c,11,0,11),r.addMany(t(32,128),11,0,11),r.addMany(t(28,32),11,0,11),r.addMany(c,10,0,10),r.add(127,10,0,10),r.addMany(t(28,32),10,0,10),r.addMany(t(48,60),10,8,10),r.addMany([60,61,62,63],10,0,11),r.addMany(t(32,48),10,9,12),r.addMany(c,12,0,12),r.add(127,12,0,12),r.addMany(t(28,32),12,0,12),r.addMany(t(32,48),12,9,12),r.addMany(t(48,64),12,0,11),r.addMany(t(64,127),12,12,13),r.addMany(t(64,127),10,12,13),r.addMany(t(64,127),9,12,13),r.addMany(c,13,13,13),r.addMany(a,13,13,13),r.add(127,13,0,13),r.addMany([27,156,24,26],13,14,0),r.add(160,0,2,0),r.add(160,8,5,8),r.add(160,6,0,6),r.add(160,11,0,11),r.add(160,13,13,13),r}();var l=function(r){function i(t){t===void 0&&(t=v.VT500_TRANSITION_TABLE);var a=r.call(this)||this;return a._transitions=t,a.initialState=0,a.currentState=a.initialState,a._params=new p.Params,a._params.addParam(0),a._collect=0,a.precedingCodepoint=0,a._printHandlerFb=function(c,d,f){},a._executeHandlerFb=function(c){},a._csiHandlerFb=function(c,d){},a._escHandlerFb=function(c){},a._errorHandlerFb=function(c){return c},a._printHandler=a._printHandlerFb,a._executeHandlers=Object.create(null),a._csiHandlers=Object.create(null),a._escHandlers=Object.create(null),a._oscParser=new e.OscParser,a._dcsParser=new o.DcsParser,a._errorHandler=a._errorHandlerFb,a.setEscHandler({final:"\\"},function(){}),a}return g(i,r),i.prototype._identifier=function(t,a){a===void 0&&(a=[64,126]);var c=0;if(t.prefix){if(t.prefix.length>1)throw new Error("only one byte as prefix supported");if((c=t.prefix.charCodeAt(0))&&60>c||c>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(t.intermediates){if(t.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(var d=0;d<t.intermediates.length;++d){var f=t.intermediates.charCodeAt(d);if(32>f||f>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");c<<=8,c|=f}}if(t.final.length!==1)throw new Error("final must be a single byte");var h=t.final.charCodeAt(0);if(a[0]>h||h>a[1])throw new Error("final must be in range "+a[0]+" .. "+a[1]);return c<<=8,c|=h},i.prototype.identToString=function(t){for(var a=[];t;)a.push(String.fromCharCode(255&t)),t>>=8;return a.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(t){this._printHandler=t},i.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},i.prototype.addEscHandler=function(t,a){var c=this._identifier(t,[48,126]);this._escHandlers[c]===void 0&&(this._escHandlers[c]=[]);var d=this._escHandlers[c];return d.push(a),{dispose:function(){var f=d.indexOf(a);f!==-1&&d.splice(f,1)}}},i.prototype.setEscHandler=function(t,a){this._escHandlers[this._identifier(t,[48,126])]=[a]},i.prototype.clearEscHandler=function(t){this._escHandlers[this._identifier(t,[48,126])]&&delete this._escHandlers[this._identifier(t,[48,126])]},i.prototype.setEscHandlerFallback=function(t){this._escHandlerFb=t},i.prototype.setExecuteHandler=function(t,a){this._executeHandlers[t.charCodeAt(0)]=a},i.prototype.clearExecuteHandler=function(t){this._executeHandlers[t.charCodeAt(0)]&&delete this._executeHandlers[t.charCodeAt(0)]},i.prototype.setExecuteHandlerFallback=function(t){this._executeHandlerFb=t},i.prototype.addCsiHandler=function(t,a){var c=this._identifier(t);this._csiHandlers[c]===void 0&&(this._csiHandlers[c]=[]);var d=this._csiHandlers[c];return d.push(a),{dispose:function(){var f=d.indexOf(a);f!==-1&&d.splice(f,1)}}},i.prototype.setCsiHandler=function(t,a){this._csiHandlers[this._identifier(t)]=[a]},i.prototype.clearCsiHandler=function(t){this._csiHandlers[this._identifier(t)]&&delete this._csiHandlers[this._identifier(t)]},i.prototype.setCsiHandlerFallback=function(t){this._csiHandlerFb=t},i.prototype.addDcsHandler=function(t,a){return this._dcsParser.addHandler(this._identifier(t),a)},i.prototype.setDcsHandler=function(t,a){this._dcsParser.setHandler(this._identifier(t),a)},i.prototype.clearDcsHandler=function(t){this._dcsParser.clearHandler(this._identifier(t))},i.prototype.setDcsHandlerFallback=function(t){this._dcsParser.setHandlerFallback(t)},i.prototype.addOscHandler=function(t,a){return this._oscParser.addHandler(t,a)},i.prototype.setOscHandler=function(t,a){this._oscParser.setHandler(t,a)},i.prototype.clearOscHandler=function(t){this._oscParser.clearHandler(t)},i.prototype.setOscHandlerFallback=function(t){this._oscParser.setHandlerFallback(t)},i.prototype.setErrorHandler=function(t){this._errorHandler=t},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(t,a){for(var c=0,d=0,f=this.currentState,h=this._oscParser,u=this._dcsParser,E=this._collect,x=this._params,O=this._transitions.table,C=0;C<a;++C){switch((d=O[f<<8|((c=t[C])<160?c:160)])>>4){case 2:for(var w=C+1;;++w){if(w>=a||(c=t[w])<32||c>126&&c<160){this._printHandler(t,C,w),C=w-1;break}if(++w>=a||(c=t[w])<32||c>126&&c<160){this._printHandler(t,C,w),C=w-1;break}if(++w>=a||(c=t[w])<32||c>126&&c<160){this._printHandler(t,C,w),C=w-1;break}if(++w>=a||(c=t[w])<32||c>126&&c<160){this._printHandler(t,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:x,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](x)===!1;A--);A<0&&this._csiHandlerFb(E<<8|c,x),this.precedingCodepoint=0;break;case 8:do switch(c){case 59:x.addParam(0);break;case 58:x.addSubParam(-1);break;default:x.addDigit(c-48)}while(++C<a&&(c=t[C])>47&&c<60);C--;break;case 9:E<<=8,E|=c;break;case 10:for(var D=this._escHandlers[E<<8|c],M=D?D.length-1:-1;M>=0&&D[M]()===!1;M--);M<0&&this._escHandlerFb(E<<8|c),this.precedingCodepoint=0;break;case 11:x.reset(),x.addParam(0),E=0;break;case 12:u.hook(E<<8|c,x);break;case 13:for(var N=C+1;;++N)if(N>=a||(c=t[N])===24||c===26||c===27||c>127&&c<160){u.put(t,C,N),C=N-1;break}break;case 14:u.unhook(c!==24&&c!==26),c===27&&(d|=1),x.reset(),x.addParam(0),E=0,this.precedingCodepoint=0;break;case 4:h.start();break;case 5:for(var P=C+1;;P++)if(P>=a||(c=t[P])<32||c>127&&c<=159){h.put(t,C,P),C=P-1;break}break;case 6:h.end(c!==24&&c!==26),c===27&&(d|=1),x.reset(),x.addParam(0),E=0,this.precedingCodepoint=0}f=15&d}this._collect=E,this.currentState=f},i}(s.Disposable);v.EscapeSequenceParser=l},function(I,v,T){"use strict";var y,g=this&&this.__extends||(y=function(h,u){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,x){E.__proto__=x}||function(E,x){for(var O in x)x.hasOwnProperty(O)&&(E[O]=x[O])})(h,u)},function(h,u){function E(){this.constructor=h}y(h,u),h.prototype=u===null?Object.create(u):(E.prototype=u.prototype,new E)}),s=this&&this.__decorate||function(h,u,E,x){var O,C=arguments.length,w=C<3?u:x===null?x=Object.getOwnPropertyDescriptor(u,E):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(h,u,E,x);else for(var S=h.length-1;S>=0;S--)(O=h[S])&&(w=(C<3?O(w):C>3?O(u,E,w):O(u,E))||w);return C>3&&w&&Object.defineProperty(u,E,w),w},_=this&&this.__param||function(h,u){return function(E,x){u(E,x,h)}};Object.defineProperty(v,"__esModule",{value:!0}),v.Renderer=void 0;var p=T(41),e=T(47),o=T(48),n=T(49),l=T(29),r=T(2),i=T(5),t=T(1),a=T(25),c=T(0),d=1,f=function(h){function u(E,x,O,C,w,S,A,D,M){var N=h.call(this)||this;N._colors=E,N._screenElement=x,N._bufferService=w,N._charSizeService=S,N._optionsService=A,N._id=d++,N._onRequestRedraw=new c.EventEmitter;var P=N._optionsService.options.allowTransparency;return N._characterJoinerRegistry=new l.CharacterJoinerRegistry(N._bufferService),N._renderLayers=[new p.TextRenderLayer(N._screenElement,0,N._colors,N._characterJoinerRegistry,P,N._id,N._bufferService,A),new e.SelectionRenderLayer(N._screenElement,1,N._colors,N._id,N._bufferService,A),new n.LinkRenderLayer(N._screenElement,2,N._colors,N._id,O,C,N._bufferService,A),new o.CursorRenderLayer(N._screenElement,3,N._colors,N._id,N._onRequestRedraw,N._bufferService,A,D,M)],N.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},N._devicePixelRatio=window.devicePixelRatio,N._updateDimensions(),N.onOptionsChanged(),N}return g(u,h),Object.defineProperty(u.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),u.prototype.dispose=function(){for(var E=0,x=this._renderLayers;E<x.length;E++)x[E].dispose();h.prototype.dispose.call(this),a.removeTerminalFromCache(this._id)},u.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._bufferService.cols,this._bufferService.rows))},u.prototype.setColors=function(E){this._colors=E;for(var x=0,O=this._renderLayers;x<O.length;x++){var C=O[x];C.setColors(this._colors),C.reset()}},u.prototype.onResize=function(E,x){this._updateDimensions();for(var O=0,C=this._renderLayers;O<C.length;O++)C[O].resize(this.dimensions);this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},u.prototype.onCharSizeChanged=function(){this.onResize(this._bufferService.cols,this._bufferService.rows)},u.prototype.onBlur=function(){this._runOperation(function(E){return E.onBlur()})},u.prototype.onFocus=function(){this._runOperation(function(E){return E.onFocus()})},u.prototype.onSelectionChanged=function(E,x,O){O===void 0&&(O=!1),this._runOperation(function(C){return C.onSelectionChanged(E,x,O)})},u.prototype.onCursorMove=function(){this._runOperation(function(E){return E.onCursorMove()})},u.prototype.onOptionsChanged=function(){this._runOperation(function(E){return E.onOptionsChanged()})},u.prototype.clear=function(){this._runOperation(function(E){return E.reset()})},u.prototype._runOperation=function(E){for(var x=0,O=this._renderLayers;x<O.length;x++)E(O[x])},u.prototype.renderRows=function(E,x){for(var O=0,C=this._renderLayers;O<C.length;O++)C[O].onGridChanged(E,x)},u.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)},u.prototype.registerCharacterJoiner=function(E){return this._characterJoinerRegistry.registerCharacterJoiner(E)},u.prototype.deregisterCharacterJoiner=function(E){return this._characterJoinerRegistry.deregisterCharacterJoiner(E)},u=s([_(4,t.IBufferService),_(5,i.ICharSizeService),_(6,t.IOptionsService),_(7,t.ICoreService),_(8,i.ICoreBrowserService)],u)}(r.Disposable);v.Renderer=f},function(I,v,T){"use strict";var y,g=this&&this.__extends||(y=function(r,i){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,a){t.__proto__=a}||function(t,a){for(var c in a)a.hasOwnProperty(c)&&(t[c]=a[c])})(r,i)},function(r,i){function t(){this.constructor=r}y(r,i),r.prototype=i===null?Object.create(i):(t.prototype=i.prototype,new t)});Object.defineProperty(v,"__esModule",{value:!0}),v.TextRenderLayer=void 0;var s=T(42),_=T(13),p=T(6),e=T(3),o=T(29),n=T(4),l=function(r){function i(t,a,c,d,f,h,u,E){var x=r.call(this,t,"text",a,f,c,h,u,E)||this;return x._characterWidth=0,x._characterFont="",x._characterOverlapCache={},x._workCell=new n.CellData,x._state=new s.GridCache,x._characterJoinerRegistry=d,x}return g(i,r),i.prototype.resize=function(t){r.prototype.resize.call(this,t);var a=this._getFont(!1,!1);this._characterWidth===t.scaledCharWidth&&this._characterFont===a||(this._characterWidth=t.scaledCharWidth,this._characterFont=a,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(t,a,c,d){for(var f=t;f<=a;f++)for(var h=f+this._bufferService.buffer.ydisp,u=this._bufferService.buffer.lines.get(h),E=c?c.getJoinedCharacters(h):[],x=0;x<this._bufferService.cols;x++){u.loadCell(x,this._workCell);var O=this._workCell,C=!1,w=x;if(O.getWidth()!==0){if(E.length>0&&x===E[0][0]){C=!0;var S=E.shift();O=new o.JoinedCellData(this._workCell,u.translateToString(!0,S[0],S[1]),S[1]-S[0]),w=S[1]-1}!C&&this._isOverlapping(O)&&w<u.length-1&&u.getCodePoint(w+1)===e.NULL_CELL_CODE&&(O.content&=-12582913,O.content|=2<<22),d(O,x,f),x=w}}},i.prototype._drawBackground=function(t,a){var c=this,d=this._ctx,f=this._bufferService.cols,h=0,u=0,E=null;d.save(),this._forEachCell(t,a,null,function(x,O,C){var w=null;x.isInverse()?w=x.isFgDefault()?c._colors.foreground.css:x.isFgRGB()?"rgb("+p.AttributeData.toColorRGB(x.getFgColor()).join(",")+")":c._colors.ansi[x.getFgColor()].css:x.isBgRGB()?w="rgb("+p.AttributeData.toColorRGB(x.getBgColor()).join(",")+")":x.isBgPalette()&&(w=c._colors.ansi[x.getBgColor()].css),E===null&&(h=O,u=C),C!==u?(d.fillStyle=E||"",c._fillCells(h,u,f-h,1),h=O,u=C):E!==w&&(d.fillStyle=E||"",c._fillCells(h,u,O-h,1),h=O,u=C),E=w}),E!==null&&(d.fillStyle=E,this._fillCells(h,u,f-h,1)),d.restore()},i.prototype._drawForeground=function(t,a){var c=this;this._forEachCell(t,a,this._characterJoinerRegistry,function(d,f,h){if(!d.isInvisible()&&(c._drawChars(d,f,h),d.isUnderline())){if(c._ctx.save(),d.isInverse())if(d.isBgDefault())c._ctx.fillStyle=c._colors.background.css;else if(d.isBgRGB())c._ctx.fillStyle="rgb("+p.AttributeData.toColorRGB(d.getBgColor()).join(",")+")";else{var u=d.getBgColor();c._optionsService.options.drawBoldTextInBrightColors&&d.isBold()&&u<8&&(u+=8),c._ctx.fillStyle=c._colors.ansi[u].css}else if(d.isFgDefault())c._ctx.fillStyle=c._colors.foreground.css;else if(d.isFgRGB())c._ctx.fillStyle="rgb("+p.AttributeData.toColorRGB(d.getFgColor()).join(",")+")";else{var E=d.getFgColor();c._optionsService.options.drawBoldTextInBrightColors&&d.isBold()&&E<8&&(E+=8),c._ctx.fillStyle=c._colors.ansi[E].css}c._fillBottomLineAtCells(f,h,d.getWidth()),c._ctx.restore()}})},i.prototype.onGridChanged=function(t,a){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,t,this._bufferService.cols,a-t+1),this._drawBackground(t,a),this._drawForeground(t,a))},i.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.options.allowTransparency)},i.prototype._isOverlapping=function(t){if(t.getWidth()!==1)return!1;if(t.getCode()<256)return!1;var a=t.getChars();if(this._characterOverlapCache.hasOwnProperty(a))return this._characterOverlapCache[a];this._ctx.save(),this._ctx.font=this._characterFont;var c=Math.floor(this._ctx.measureText(a).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[a]=c,c},i}(_.BaseRenderLayer);v.TextRenderLayer=l},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.GridCache=void 0;var y=function(){function g(){this.cache=[]}return g.prototype.resize=function(s,_){for(var p=0;p<s;p++){this.cache.length<=p&&this.cache.push([]);for(var e=this.cache[p].length;e<_;e++)this.cache[p].push(void 0);this.cache[p].length=_}this.cache.length=s},g.prototype.clear=function(){for(var s=0;s<this.cache.length;s++)for(var _=0;_<this.cache[s].length;_++)this.cache[s][_]=void 0},g}();v.GridCache=y},function(I,v,T){"use strict";var y,g=this&&this.__extends||(y=function(c,d){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var u in h)h.hasOwnProperty(u)&&(f[u]=h[u])})(c,d)},function(c,d){function f(){this.constructor=c}y(c,d),c.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)});Object.defineProperty(v,"__esModule",{value:!0}),v.NoneCharAtlas=v.DynamicCharAtlas=v.getGlyphCacheKey=void 0;var s=T(9),_=T(44),p=T(27),e=T(46),o=T(11),n=T(28),l=T(10),r={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)}v.getGlyphCacheKey=i;var t=function(c){function d(f,h){var u=c.call(this)||this;u._config=h,u._drawToCacheCount=0,u._glyphsWaitingOnBitmap=[],u._bitmapCommitTimeout=null,u._bitmap=null,u._cacheCanvas=f.createElement("canvas"),u._cacheCanvas.width=1024,u._cacheCanvas.height=1024,u._cacheCtx=n.throwIfFalsy(u._cacheCanvas.getContext("2d",{alpha:!0}));var E=f.createElement("canvas");E.width=u._config.scaledCharWidth,E.height=u._config.scaledCharHeight,u._tmpCtx=n.throwIfFalsy(E.getContext("2d",{alpha:u._config.allowTransparency})),u._width=Math.floor(1024/u._config.scaledCharWidth),u._height=Math.floor(1024/u._config.scaledCharHeight);var x=u._width*u._height;return u._cacheMap=new e.LRUMap(x),u._cacheMap.prealloc(x),u}return g(d,c),d.prototype.dispose=function(){this._bitmapCommitTimeout!==null&&(window.clearTimeout(this._bitmapCommitTimeout),this._bitmapCommitTimeout=null)},d.prototype.beginFrame=function(){this._drawToCacheCount=0},d.prototype.draw=function(f,h,u,E){if(h.code===32)return!0;if(!this._canCache(h))return!1;var x=i(h),O=this._cacheMap.get(x);if(O!=null)return this._drawFromCache(f,O,u,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(h,C);return this._cacheMap.set(x,w),this._drawFromCache(f,w,u,E),!0}return!1},d.prototype._canCache=function(f){return f.code<256},d.prototype._toCoordinateX=function(f){return f%this._width*this._config.scaledCharWidth},d.prototype._toCoordinateY=function(f){return Math.floor(f/this._width)*this._config.scaledCharHeight},d.prototype._drawFromCache=function(f,h,u,E){if(!h.isEmpty){var x=this._toCoordinateX(h.index),O=this._toCoordinateY(h.index);f.drawImage(h.inBitmap?this._bitmap:this._cacheCanvas,x,O,this._config.scaledCharWidth,this._config.scaledCharHeight,u,E,this._config.scaledCharWidth,this._config.scaledCharHeight)}},d.prototype._getColorFromAnsiIndex=function(f){return f<this._config.colors.ansi.length?this._config.colors.ansi[f]:p.DEFAULT_ANSI_COLORS[f]},d.prototype._getBackgroundColor=function(f){return this._config.allowTransparency?r:f.bg===s.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:f.bg<256?this._getColorFromAnsiIndex(f.bg):this._config.colors.background},d.prototype._getForegroundColor=function(f){return f.fg===s.INVERTED_DEFAULT_COLOR?l.color.opaque(this._config.colors.background):f.fg<256?this._getColorFromAnsiIndex(f.fg):this._config.colors.foreground},d.prototype._drawToCache=function(f,h){this._drawToCacheCount++,this._tmpCtx.save();var u=this._getBackgroundColor(f);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=u.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,x=f.italic?"italic":"";this._tmpCtx.font=x+" "+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=s.DIM_OPACITY),this._tmpCtx.fillText(f.chars,0,this._config.scaledCharHeight/2),this._tmpCtx.restore();var O=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),C=!1;this._config.allowTransparency||(C=function(D,M){for(var N=!0,P=M.rgba>>>24,z=M.rgba>>>16&255,X=M.rgba>>>8&255,k=0;k<D.data.length;k+=4)D.data[k]===P&&D.data[k+1]===z&&D.data[k+2]===X?D.data[k+3]=0:N=!1;return N}(O,u));var w=this._toCoordinateX(h),S=this._toCoordinateY(h);this._cacheCtx.putImageData(O,w,S);var A={index:h,isEmpty:C,inBitmap:!1};return this._addGlyphToBitmap(A),A},d.prototype._addGlyphToBitmap=function(f){var h=this;!("createImageBitmap"in window)||o.isFirefox||o.isSafari||(this._glyphsWaitingOnBitmap.push(f),this._bitmapCommitTimeout===null&&(this._bitmapCommitTimeout=window.setTimeout(function(){return h._generateBitmap()},100)))},d.prototype._generateBitmap=function(){var f=this,h=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then(function(u){f._bitmap=u;for(var E=0;E<h.length;E++)h[E].inBitmap=!0}),this._bitmapCommitTimeout=null},d}(_.BaseCharAtlas);v.DynamicCharAtlas=t;var a=function(c){function d(f,h){return c.call(this)||this}return g(d,c),d.prototype.draw=function(f,h,u,E){return!1},d}(_.BaseCharAtlas);v.NoneCharAtlas=a},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.BaseCharAtlas=void 0;var y=function(){function g(){this._didWarmUp=!1}return g.prototype.dispose=function(){},g.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},g.prototype._doWarmUp=function(){},g.prototype.beginFrame=function(){},g}();v.BaseCharAtlas=y},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.ColorContrastCache=void 0;var y=function(){function g(){this._color={},this._rgba={}}return g.prototype.clear=function(){this._color={},this._rgba={}},g.prototype.setCss=function(s,_,p){this._rgba[s]||(this._rgba[s]={}),this._rgba[s][_]=p},g.prototype.getCss=function(s,_){return this._rgba[s]?this._rgba[s][_]:void 0},g.prototype.setColor=function(s,_,p){this._color[s]||(this._color[s]={}),this._color[s][_]=p},g.prototype.getColor=function(s,_){return this._color[s]?this._color[s][_]:void 0},g}();v.ColorContrastCache=y},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.LRUMap=void 0;var y=function(){function g(s){this.capacity=s,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return g.prototype._unlinkNode=function(s){var _=s.prev,p=s.next;s===this._head&&(this._head=p),s===this._tail&&(this._tail=_),_!==null&&(_.next=p),p!==null&&(p.prev=_)},g.prototype._appendNode=function(s){var _=this._tail;_!==null&&(_.next=s),s.prev=_,s.next=null,this._tail=s,this._head===null&&(this._head=s)},g.prototype.prealloc=function(s){for(var _=this._nodePool,p=0;p<s;p++)_.push({prev:null,next:null,key:null,value:null})},g.prototype.get=function(s){var _=this._map[s];return _!==void 0?(this._unlinkNode(_),this._appendNode(_),_.value):null},g.prototype.peekValue=function(s){var _=this._map[s];return _!==void 0?_.value:null},g.prototype.peek=function(){var s=this._head;return s===null?null:s.value},g.prototype.set=function(s,_){var p=this._map[s];if(p!==void 0)p=this._map[s],this._unlinkNode(p),p.value=_;else if(this.size>=this.capacity)p=this._head,this._unlinkNode(p),delete this._map[p.key],p.key=s,p.value=_,this._map[s]=p;else{var e=this._nodePool;e.length>0?((p=e.pop()).key=s,p.value=_):p={prev:null,next:null,key:s,value:_},this._map[s]=p,this.size++}this._appendNode(p)},g}();v.LRUMap=y},function(I,v,T){"use strict";var y,g=this&&this.__extends||(y=function(_,p){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,o){e.__proto__=o}||function(e,o){for(var n in o)o.hasOwnProperty(n)&&(e[n]=o[n])})(_,p)},function(_,p){function e(){this.constructor=_}y(_,p),_.prototype=p===null?Object.create(p):(e.prototype=p.prototype,new e)});Object.defineProperty(v,"__esModule",{value:!0}),v.SelectionRenderLayer=void 0;var s=function(_){function p(e,o,n,l,r,i){var t=_.call(this,e,"selection",o,!0,n,l,r,i)||this;return t._clearState(),t}return g(p,_),p.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},p.prototype.resize=function(e){_.prototype.resize.call(this,e),this._clearState()},p.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},p.prototype.onSelectionChanged=function(e,o,n){if(this._didStateChange(e,o,n,this._bufferService.buffer.ydisp))if(this._clearAll(),e&&o){var l=e[1]-this._bufferService.buffer.ydisp,r=o[1]-this._bufferService.buffer.ydisp,i=Math.max(l,0),t=Math.min(r,this._bufferService.rows-1);if(!(i>=this._bufferService.rows||t<0)){if(this._ctx.fillStyle=this._colors.selectionTransparent.css,n){var a=e[0],c=o[0]-a,d=t-i+1;this._fillCells(a,i,c,d)}else{a=l===i?e[0]:0;var f=i===t?o[0]:this._bufferService.cols;this._fillCells(a,i,f-a,1);var h=Math.max(t-i-1,0);if(this._fillCells(0,i+1,this._bufferService.cols,h),i!==t){var u=r===t?o[0]:this._bufferService.cols;this._fillCells(0,t,u,1)}}this._state.start=[e[0],e[1]],this._state.end=[o[0],o[1]],this._state.columnSelectMode=n,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},p.prototype._didStateChange=function(e,o,n,l){return!this._areCoordinatesEqual(e,this._state.start)||!this._areCoordinatesEqual(o,this._state.end)||n!==this._state.columnSelectMode||l!==this._state.ydisp},p.prototype._areCoordinatesEqual=function(e,o){return!(!e||!o)&&e[0]===o[0]&&e[1]===o[1]},p}(T(13).BaseRenderLayer);v.SelectionRenderLayer=s},function(I,v,T){"use strict";var y,g=this&&this.__extends||(y=function(o,n){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,r){l.__proto__=r}||function(l,r){for(var i in r)r.hasOwnProperty(i)&&(l[i]=r[i])})(o,n)},function(o,n){function l(){this.constructor=o}y(o,n),o.prototype=n===null?Object.create(n):(l.prototype=n.prototype,new l)});Object.defineProperty(v,"__esModule",{value:!0}),v.CursorRenderLayer=void 0;var s=T(13),_=T(4),p=function(o){function n(l,r,i,t,a,c,d,f,h){var u=o.call(this,l,"cursor",r,!0,i,t,c,d)||this;return u._onRequestRedraw=a,u._coreService=f,u._coreBrowserService=h,u._cell=new _.CellData,u._state={x:0,y:0,isFocused:!1,style:"",width:0},u._cursorRenderers={bar:u._renderBarCursor.bind(u),block:u._renderBlockCursor.bind(u),underline:u._renderUnderlineCursor.bind(u)},u}return g(n,o),n.prototype.resize=function(l){o.prototype.resize.call(this,l),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 l,r=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new e(this._coreBrowserService.isFocused,function(){r._render(!0)})):((l=this._cursorBlinkStateManager)===null||l===void 0||l.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(l,r){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},n.prototype._render=function(l){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var r=this._bufferService.buffer.ybase+this._bufferService.buffer.y,i=r-this._bufferService.buffer.ydisp;if(i<0||i>=this._bufferService.rows)this._clearCursor();else{var t=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(r).loadCell(t,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var a=this._optionsService.options.cursorStyle;return a&&a!=="block"?this._cursorRenderers[a](t,i,this._cell):this._renderBlurCursor(t,i,this._cell),this._ctx.restore(),this._state.x=t,this._state.y=i,this._state.isFocused=!1,this._state.style=a,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===t&&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"](t,i,this._cell),this._ctx.restore(),this._state.x=t,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(l,r,i){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(l,r,this._optionsService.options.cursorWidth),this._ctx.restore()},n.prototype._renderBlockCursor=function(l,r,i){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(l,r,i.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(i,l,r),this._ctx.restore()},n.prototype._renderUnderlineCursor=function(l,r,i){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(l,r),this._ctx.restore()},n.prototype._renderBlurCursor=function(l,r,i){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(l,r,i.getWidth(),1),this._ctx.restore()},n}(s.BaseRenderLayer);v.CursorRenderLayer=p;var e=function(){function o(n,l){this._renderCallback=l,this.isCursorVisible=!0,n&&this._restartInterval()}return Object.defineProperty(o.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),o.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)},o.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})))},o.prototype._restartInterval=function(n){var l=this;n===void 0&&(n=600),this._blinkInterval&&window.clearInterval(this._blinkInterval),this._blinkStartTimeout=window.setTimeout(function(){if(l._animationTimeRestarted){var r=600-(Date.now()-l._animationTimeRestarted);if(l._animationTimeRestarted=void 0,r>0)return void l._restartInterval(r)}l.isCursorVisible=!1,l._animationFrame=window.requestAnimationFrame(function(){l._renderCallback(),l._animationFrame=void 0}),l._blinkInterval=window.setInterval(function(){if(l._animationTimeRestarted){var i=600-(Date.now()-l._animationTimeRestarted);return l._animationTimeRestarted=void 0,void l._restartInterval(i)}l.isCursorVisible=!l.isCursorVisible,l._animationFrame=window.requestAnimationFrame(function(){l._renderCallback(),l._animationFrame=void 0})},600)},n)},o.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)},o.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},o}()},function(I,v,T){"use strict";var y,g=this&&this.__extends||(y=function(o,n){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,r){l.__proto__=r}||function(l,r){for(var i in r)r.hasOwnProperty(i)&&(l[i]=r[i])})(o,n)},function(o,n){function l(){this.constructor=o}y(o,n),o.prototype=n===null?Object.create(n):(l.prototype=n.prototype,new l)});Object.defineProperty(v,"__esModule",{value:!0}),v.LinkRenderLayer=void 0;var s=T(13),_=T(9),p=T(26),e=function(o){function n(l,r,i,t,a,c,d,f){var h=o.call(this,l,"link",r,!0,i,t,d,f)||this;return a.onShowLinkUnderline(function(u){return h._onShowLinkUnderline(u)}),a.onHideLinkUnderline(function(u){return h._onHideLinkUnderline(u)}),c.onShowLinkUnderline(function(u){return h._onShowLinkUnderline(u)}),c.onHideLinkUnderline(function(u){return h._onHideLinkUnderline(u)}),h}return g(n,o),n.prototype.resize=function(l){o.prototype.resize.call(this,l),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 l=this._state.y2-this._state.y1-1;l>0&&this._clearCells(0,this._state.y1+1,this._state.cols,l),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},n.prototype._onShowLinkUnderline=function(l){if(l.fg===_.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:l.fg&&p.is256Color(l.fg)?this._ctx.fillStyle=this._colors.ansi[l.fg].css:this._ctx.fillStyle=this._colors.foreground.css,l.y1===l.y2)this._fillBottomLineAtCells(l.x1,l.y1,l.x2-l.x1);else{this._fillBottomLineAtCells(l.x1,l.y1,l.cols-l.x1);for(var r=l.y1+1;r<l.y2;r++)this._fillBottomLineAtCells(0,r,l.cols);this._fillBottomLineAtCells(0,l.y2,l.x2)}this._state=l},n.prototype._onHideLinkUnderline=function(l){this._clearCurrentLink()},n}(s.BaseRenderLayer);v.LinkRenderLayer=e},function(I,v,T){"use strict";var y=this&&this.__decorate||function(o,n,l,r){var i,t=arguments.length,a=t<3?n:r===null?r=Object.getOwnPropertyDescriptor(n,l):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,n,l,r);else for(var c=o.length-1;c>=0;c--)(i=o[c])&&(a=(t<3?i(a):t>3?i(n,l,a):i(n,l))||a);return t>3&&a&&Object.defineProperty(n,l,a),a},g=this&&this.__param||function(o,n){return function(l,r){n(l,r,o)}};Object.defineProperty(v,"__esModule",{value:!0}),v.MouseZone=v.Linkifier=void 0;var s=T(0),_=T(1),p=function(){function o(n,l,r){this._bufferService=n,this._logService=l,this._unicodeService=r,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new s.EventEmitter,this._onHideLinkUnderline=new s.EventEmitter,this._onLinkTooltip=new s.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(o.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),o.prototype.attachToDom=function(n,l){this._element=n,this._mouseZoneManager=l},o.prototype.linkifyRows=function(n,l){var r=this;this._mouseZoneManager&&(this._rowsToLinkify.start===void 0||this._rowsToLinkify.end===void 0?(this._rowsToLinkify.start=n,this._rowsToLinkify.end=l):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,n),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,l)),this._mouseZoneManager.clearAll(n,l),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return r._linkifyRows()},o._timeBeforeLatency))},o.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var n=this._bufferService.buffer;if(this._rowsToLinkify.start!==void 0&&this._rowsToLinkify.end!==void 0){var l=n.ydisp+this._rowsToLinkify.start;if(!(l>=n.lines.length)){for(var r=n.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,i=Math.ceil(2e3/this._bufferService.cols),t=this._bufferService.buffer.iterator(!1,l,r,i,i);t.hasNext();)for(var a=t.next(),c=0;c<this._linkMatchers.length;c++)this._doLinkifyRow(a.range.first,a.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")},o.prototype.registerLinkMatcher=function(n,l,r){if(r===void 0&&(r={}),!l)throw new Error("handler must be defined");var i={id:this._nextLinkMatcherId++,regex:n,handler:l,matchIndex:r.matchIndex,validationCallback:r.validationCallback,hoverTooltipCallback:r.tooltipCallback,hoverLeaveCallback:r.leaveCallback,willLinkActivate:r.willLinkActivate,priority:r.priority||0};return this._addLinkMatcherToList(i),i.id},o.prototype._addLinkMatcherToList=function(n){if(this._linkMatchers.length!==0){for(var l=this._linkMatchers.length-1;l>=0;l--)if(n.priority<=this._linkMatchers[l].priority)return void this._linkMatchers.splice(l+1,0,n);this._linkMatchers.splice(0,0,n)}else this._linkMatchers.push(n)},o.prototype.deregisterLinkMatcher=function(n){for(var l=0;l<this._linkMatchers.length;l++)if(this._linkMatchers[l].id===n)return this._linkMatchers.splice(l,1),!0;return!1},o.prototype._doLinkifyRow=function(n,l,r){for(var i,t=this,a=new RegExp(r.regex.source,(r.regex.flags||"")+"g"),c=-1,d=function(){var h=i[typeof r.matchIndex!="number"?0:r.matchIndex];if(!h)return f._logService.debug("match found without corresponding matchIndex",i,r),"break";if(c=l.indexOf(h,c+1),a.lastIndex=c+h.length,c<0)return"break";var u=f._bufferService.buffer.stringIndexToBufferIndex(n,c);if(u[0]<0)return"break";var E=f._bufferService.buffer.lines.get(u[0]);if(!E)return"break";var x=E.getFg(u[1]),O=x?x>>9&511:void 0;r.validationCallback?r.validationCallback(h,function(C){t._rowsTimeoutId||C&&t._addLink(u[1],u[0]-t._bufferService.buffer.ydisp,h,r,O)}):f._addLink(u[1],u[0]-f._bufferService.buffer.ydisp,h,r,O)},f=this;(i=a.exec(l))!==null&&!(d()==="break"););},o.prototype._addLink=function(n,l,r,i,t){var a=this;if(this._mouseZoneManager&&this._element){var c=this._unicodeService.getStringCellWidth(r),d=n%this._bufferService.cols,f=l+Math.floor(n/this._bufferService.cols),h=(d+c)%this._bufferService.cols,u=f+Math.floor((d+c)/this._bufferService.cols);h===0&&(h=this._bufferService.cols,u--),this._mouseZoneManager.add(new e(d+1,f+1,h+1,u+1,function(E){if(i.handler)return i.handler(E,r);var x=window.open();x?(x.opener=null,x.location.href=r):console.warn("Opening link blocked as opener could not be cleared")},function(){a._onShowLinkUnderline.fire(a._createLinkHoverEvent(d,f,h,u,t)),a._element.classList.add("xterm-cursor-pointer")},function(E){a._onLinkTooltip.fire(a._createLinkHoverEvent(d,f,h,u,t)),i.hoverTooltipCallback&&i.hoverTooltipCallback(E,r,{start:{x:d,y:f},end:{x:h,y:u}})},function(){a._onHideLinkUnderline.fire(a._createLinkHoverEvent(d,f,h,u,t)),a._element.classList.remove("xterm-cursor-pointer"),i.hoverLeaveCallback&&i.hoverLeaveCallback()},function(E){return!i.willLinkActivate||i.willLinkActivate(E,r)}))}},o.prototype._createLinkHoverEvent=function(n,l,r,i,t){return{x1:n,y1:l,x2:r,y2:i,cols:this._bufferService.cols,fg:t}},o._timeBeforeLatency=200,o=y([g(0,_.IBufferService),g(1,_.ILogService),g(2,_.IUnicodeService)],o)}();v.Linkifier=p;var e=function(o,n,l,r,i,t,a,c,d){this.x1=o,this.y1=n,this.x2=l,this.y2=r,this.clickCallback=i,this.hoverCallback=t,this.tooltipCallback=a,this.leaveCallback=c,this.willLinkActivate=d};v.MouseZone=e},function(I,v,T){"use strict";var y,g=this&&this.__extends||(y=function(h,u){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,x){E.__proto__=x}||function(E,x){for(var O in x)x.hasOwnProperty(O)&&(E[O]=x[O])})(h,u)},function(h,u){function E(){this.constructor=h}y(h,u),h.prototype=u===null?Object.create(u):(E.prototype=u.prototype,new E)}),s=this&&this.__decorate||function(h,u,E,x){var O,C=arguments.length,w=C<3?u:x===null?x=Object.getOwnPropertyDescriptor(u,E):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(h,u,E,x);else for(var S=h.length-1;S>=0;S--)(O=h[S])&&(w=(C<3?O(w):C>3?O(u,E,w):O(u,E))||w);return C>3&&w&&Object.defineProperty(u,E,w),w},_=this&&this.__param||function(h,u){return function(E,x){u(E,x,h)}};Object.defineProperty(v,"__esModule",{value:!0}),v.SelectionService=void 0;var p=T(11),e=T(52),o=T(4),n=T(0),l=T(5),r=T(1),i=T(30),t=T(53),a=T(2),c=String.fromCharCode(160),d=new RegExp(c,"g"),f=function(h){function u(E,x,O,C,w,S,A){var D=h.call(this)||this;return D._element=E,D._screenElement=x,D._bufferService=O,D._coreService=C,D._mouseService=w,D._optionsService=S,D._renderService=A,D._dragScrollAmount=0,D._enabled=!0,D._workCell=new o.CellData,D._mouseDownTimeStamp=0,D._onLinuxMouseSelection=D.register(new n.EventEmitter),D._onRedrawRequest=D.register(new n.EventEmitter),D._onSelectionChange=D.register(new n.EventEmitter),D._onRequestScrollLines=D.register(new n.EventEmitter),D._mouseMoveListener=function(M){return D._onMouseMove(M)},D._mouseUpListener=function(M){return D._onMouseUp(M)},D._coreService.onUserInput(function(){D.hasSelection&&D.clearSelection()}),D._trimListener=D._bufferService.buffer.lines.onTrim(function(M){return D._onTrim(M)}),D.register(D._bufferService.buffers.onBufferActivate(function(M){return D._onBufferActivate(M)})),D.enable(),D._model=new e.SelectionModel(D._bufferService),D._activeSelectionMode=0,D}return g(u,h),Object.defineProperty(u.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),u.prototype.dispose=function(){this._removeMouseDownListeners()},u.prototype.reset=function(){this.clearSelection()},u.prototype.disable=function(){this.clearSelection(),this._enabled=!1},u.prototype.enable=function(){this._enabled=!0},Object.defineProperty(u.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"hasSelection",{get:function(){var E=this._model.finalSelectionStart,x=this._model.finalSelectionEnd;return!(!E||!x)&&(E[0]!==x[0]||E[1]!==x[1])},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"selectionText",{get:function(){var E=this._model.finalSelectionStart,x=this._model.finalSelectionEnd;if(!E||!x)return"";var O=this._bufferService.buffer,C=[];if(this._activeSelectionMode===3){if(E[0]===x[0])return"";for(var w=E[1];w<=x[1];w++){var S=O.translateBufferLineToString(w,!0,E[0],x[0]);C.push(S)}}else{var A=E[1]===x[1]?x[0]:void 0;for(C.push(O.translateBufferLineToString(E[1],!0,E[0],A)),w=E[1]+1;w<=x[1]-1;w++){var D=O.lines.get(w);S=O.translateBufferLineToString(w,!0),D&&D.isWrapped?C[C.length-1]+=S:C.push(S)}E[1]!==x[1]&&(D=O.lines.get(x[1]),S=O.translateBufferLineToString(x[1],!0,0,x[0]),D&&D.isWrapped?C[C.length-1]+=S:C.push(S))}return C.map(function(M){return M.replace(d," ")}).join(p.isWindows?`\r
|
|
|
`:`
|
|
|
`)},enumerable:!1,configurable:!0}),u.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},u.prototype.refresh=function(E){var x=this;(this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return x._refresh()})),p.isLinux&&E)&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},u.prototype._refresh=function(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})},u.prototype.isClickInSelection=function(E){var x=this._getMouseBufferCoords(E),O=this._model.finalSelectionStart,C=this._model.finalSelectionEnd;return!!(O&&C&&x)&&this._areCoordsInSelection(x,O,C)},u.prototype._areCoordsInSelection=function(E,x,O){return E[1]>x[1]&&E[1]<O[1]||x[1]===O[1]&&E[1]===x[1]&&E[0]>=x[0]&&E[0]<O[0]||x[1]<O[1]&&E[1]===O[1]&&E[0]<O[0]||x[1]<O[1]&&E[1]===x[1]&&E[0]>=x[0]},u.prototype.selectWordAtCursor=function(E){var x=this._getMouseBufferCoords(E);x&&(this._selectWordAt(x,!1),this._model.selectionEnd=void 0,this.refresh(!0))},u.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},u.prototype.selectLines=function(E,x){this._model.clearSelection(),E=Math.max(E,0),x=Math.min(x,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,E],this._model.selectionEnd=[this._bufferService.cols,x],this.refresh(),this._onSelectionChange.fire()},u.prototype._onTrim=function(E){this._model.onTrim(E)&&this.refresh()},u.prototype._getMouseBufferCoords=function(E){var x=this._mouseService.getCoords(E,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(x)return x[0]--,x[1]--,x[1]+=this._bufferService.buffer.ydisp,x},u.prototype._getMouseEventScrollAmount=function(E){var x=i.getCoordsRelativeToElement(E,this._screenElement)[1],O=this._renderService.dimensions.canvasHeight;return x>=0&&x<=O?0:(x>O&&(x-=O),x=Math.min(Math.max(x,-50),50),(x/=50)/Math.abs(x)+Math.round(14*x))},u.prototype.shouldForceSelection=function(E){return p.isMac?E.altKey&&this._optionsService.options.macOptionClickForcesSelection:E.shiftKey},u.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)}},u.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)},u.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},u.prototype._onIncrementalClick=function(E){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(E))},u.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 x=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);x&&x.length!==this._model.selectionStart[0]&&x.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}},u.prototype._onDoubleClick=function(E){var x=this._getMouseBufferCoords(E);x&&(this._activeSelectionMode=1,this._selectWordAt(x,!0))},u.prototype._onTripleClick=function(E){var x=this._getMouseBufferCoords(E);x&&(this._activeSelectionMode=2,this._selectLineAt(x[1]))},u.prototype.shouldColumnSelect=function(E){return E.altKey&&!(p.isMac&&this._optionsService.options.macOptionClickForcesSelection)},u.prototype._onMouseMove=function(E){if(E.stopImmediatePropagation(),this._model.selectionStart){var x=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 O=this._bufferService.buffer;if(this._model.selectionEnd[1]<O.lines.length){var C=O.lines.get(this._model.selectionEnd[1]);C&&C.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}x&&x[0]===this._model.selectionEnd[0]&&x[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)}},u.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()}},u.prototype._onMouseUp=function(E){var x=E.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&x<500&&E.altKey){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var O=this._mouseService.getCoords(E,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(O&&O[0]!==void 0&&O[1]!==void 0){var C=t.moveToCellSequence(O[0]-1,O[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(C,!0)}}}else this.hasSelection&&this._onSelectionChange.fire()},u.prototype._onBufferActivate=function(E){var x=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=E.activeBuffer.lines.onTrim(function(O){return x._onTrim(O)})},u.prototype._convertViewportColToCharacterIndex=function(E,x){for(var O=x[0],C=0;x[0]>=C;C++){var w=E.loadCell(C,this._workCell).getChars().length;this._workCell.getWidth()===0?O--:w>1&&x[0]!==C&&(O+=w-1)}return O},u.prototype.setSelection=function(E,x,O){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[E,x],this._model.selectionStartLength=O,this.refresh()},u.prototype._getWordAt=function(E,x,O,C){if(O===void 0&&(O=!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),D=this._convertViewportColToCharacterIndex(S,E),M=D,N=E[0]-D,P=0,z=0,X=0,k=0;if(A.charAt(D)===" "){for(;D>0&&A.charAt(D-1)===" ";)D--;for(;M<A.length&&A.charAt(M+1)===" ";)M++}else{var F=E[0],U=E[0];S.getWidth(F)===0&&(P++,F--),S.getWidth(U)===2&&(z++,U++);var L=S.getString(U).length;for(L>1&&(k+=L-1,M+=L-1);F>0&&D>0&&!this._isCharWordSeparator(S.loadCell(F-1,this._workCell));){S.loadCell(F-1,this._workCell);var B=this._workCell.getChars().length;this._workCell.getWidth()===0?(P++,F--):B>1&&(X+=B-1,D-=B-1),D--,F--}for(;U<S.length&&M+1<A.length&&!this._isCharWordSeparator(S.loadCell(U+1,this._workCell));){S.loadCell(U+1,this._workCell);var Z=this._workCell.getChars().length;this._workCell.getWidth()===2?(z++,U++):Z>1&&(k+=Z-1,M+=Z-1),M++,U++}}M++;var re=D+N-P+X,he=Math.min(this._bufferService.cols,M-D+P+z-X-k);if(x||A.slice(D,M).trim()!==""){if(O&&re===0&&S.getCodePoint(0)!==32){var Ce=w.lines.get(E[1]-1);if(Ce&&S.isWrapped&&Ce.getCodePoint(this._bufferService.cols-1)!==32){var ke=this._getWordAt([this._bufferService.cols-1,E[1]-1],!1,!0,!1);if(ke){var te=this._bufferService.cols-ke.start;re-=te,he+=te}}}if(C&&re+he===this._bufferService.cols&&S.getCodePoint(this._bufferService.cols-1)!==32){var Re=w.lines.get(E[1]+1);if(Re&&Re.isWrapped&&Re.getCodePoint(0)!==32){var Te=this._getWordAt([0,E[1]+1],!1,!1,!0);Te&&(he+=Te.length)}}return{start:re,length:he}}}}},u.prototype._selectWordAt=function(E,x){var O=this._getWordAt(E,x);if(O){for(;O.start<0;)O.start+=this._bufferService.cols,E[1]--;this._model.selectionStart=[O.start,E[1]],this._model.selectionStartLength=O.length}},u.prototype._selectToWordAt=function(E){var x=this._getWordAt(E,!0);if(x){for(var O=E[1];x.start<0;)x.start+=this._bufferService.cols,O--;if(!this._model.areSelectionValuesReversed())for(;x.start+x.length>this._bufferService.cols;)x.length-=this._bufferService.cols,O++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?x.start:x.start+x.length,O]}},u.prototype._isCharWordSeparator=function(E){return E.getWidth()!==0&&this._optionsService.options.wordSeparator.indexOf(E.getChars())>=0},u.prototype._selectLineAt=function(E){var x=this._bufferService.buffer.getWrappedRangeForLine(E);this._model.selectionStart=[0,x.first],this._model.selectionEnd=[this._bufferService.cols,x.last],this._model.selectionStartLength=0},u=s([_(2,r.IBufferService),_(3,r.ICoreService),_(4,l.IMouseService),_(5,r.IOptionsService),_(6,l.IRenderService)],u)}(a.Disposable);v.SelectionService=f},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.SelectionModel=void 0;var y=function(){function g(s){this._bufferService=s,this.isSelectAllActive=!1,this.selectionStartLength=0}return g.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(g.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(g.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 s=this.selectionStart[0]+this.selectionStartLength;return s>this._bufferService.cols?[s%this._bufferService.cols,this.selectionStart[1]+Math.floor(s/this._bufferService.cols)]:[s,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}),g.prototype.areSelectionValuesReversed=function(){var s=this.selectionStart,_=this.selectionEnd;return!(!s||!_)&&(s[1]>_[1]||s[1]===_[1]&&s[0]>_[0])},g.prototype.onTrim=function(s){return this.selectionStart&&(this.selectionStart[1]-=s),this.selectionEnd&&(this.selectionEnd[1]-=s),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},g}();v.SelectionModel=y},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.moveToCellSequence=void 0;var y=T(12);function g(n,l,r,i){var t=n-s(r,n),a=l-s(r,l);return o(Math.abs(t-a)-function(c,d,f){for(var h=0,u=c-s(f,c),E=d-s(f,d),x=0;x<Math.abs(u-E);x++){var O=_(c,d)==="A"?-1:1,C=f.buffer.lines.get(u+O*x);C&&C.isWrapped&&h++}return h}(n,l,r),e(_(n,l),i))}function s(n,l){for(var r=0,i=n.buffer.lines.get(l),t=i&&i.isWrapped;t&&l>=0&&l<n.rows;)r++,t=(i=n.buffer.lines.get(--l))&&i.isWrapped;return r}function _(n,l){return n>l?"A":"B"}function p(n,l,r,i,t,a){for(var c=n,d=l,f="";c!==r||d!==i;)c+=t?1:-1,t&&c>a.cols-1?(f+=a.buffer.translateBufferLineToString(d,!1,n,c),c=0,n=0,d++):!t&&c<0&&(f+=a.buffer.translateBufferLineToString(d,!1,0,n+1),n=c=a.cols-1,d--);return f+a.buffer.translateBufferLineToString(d,!1,n,c)}function e(n,l){var r=l?"O":"[";return y.C0.ESC+r+n}function o(n,l){n=Math.floor(n);for(var r="",i=0;i<n;i++)r+=l;return r}v.moveToCellSequence=function(n,l,r,i){var t,a=r.buffer.x,c=r.buffer.y;if(!r.buffer.hasScrollback)return function(f,h,u,E,x,O){return g(h,E,x,O).length===0?"":o(p(f,h,f,h-s(x,h),!1,x).length,e("D",O))}(a,c,0,l,r,i)+g(c,l,r,i)+function(f,h,u,E,x,O){var C;C=g(h,E,x,O).length>0?E-s(x,E):h;var w=E,S=function(A,D,M,N,P,z){var X;return X=g(M,N,P,z).length>0?N-s(P,N):D,A<M&&X<=N||A>=M&&X<N?"C":"D"}(f,h,u,E,x,O);return o(p(f,C,u,w,S==="C",x).length,e(S,O))}(a,c,n,l,r,i);if(c===l)return t=a>n?"D":"C",o(Math.abs(a-n),e(t,i));t=c>l?"D":"C";var d=Math.abs(c-l);return o(function(f,h){return h.cols-f}(c>l?n:a,r)+(d-1)*r.cols+1+((c>l?a:n)-1),e(t,i))}},function(I,v,T){"use strict";var y=this&&this.__decorate||function(p,e,o,n){var l,r=arguments.length,i=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(p,e,o,n);else for(var t=p.length-1;t>=0;t--)(l=p[t])&&(i=(r<3?l(i):r>3?l(e,o,i):l(e,o))||i);return r>3&&i&&Object.defineProperty(e,o,i),i},g=this&&this.__param||function(p,e){return function(o,n){e(o,n,p)}};Object.defineProperty(v,"__esModule",{value:!0}),v.SoundService=void 0;var s=T(1),_=function(){function p(e){this._optionsService=e}return Object.defineProperty(p,"audioContext",{get:function(){if(!p._audioContext){var e=window.AudioContext||window.webkitAudioContext;if(!e)return console.warn("Web Audio API is not supported by this browser. Consider upgrading to the latest version"),null;p._audioContext=new e}return p._audioContext},enumerable:!1,configurable:!0}),p.prototype.playBellSound=function(){var e=p.audioContext;if(e){var o=e.createBufferSource();e.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.options.bellSound)),function(n){o.buffer=n,o.connect(e.destination),o.start(0)})}},p.prototype._base64ToArrayBuffer=function(e){for(var o=window.atob(e),n=o.length,l=new Uint8Array(n),r=0;r<n;r++)l[r]=o.charCodeAt(r);return l.buffer},p.prototype._removeMimeType=function(e){return e.split(",")[1]},p=y([g(0,s.IOptionsService)],p)}();v.SoundService=_},function(I,v,T){"use strict";var y,g=this&&this.__extends||(y=function(r,i){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,a){t.__proto__=a}||function(t,a){for(var c in a)a.hasOwnProperty(c)&&(t[c]=a[c])})(r,i)},function(r,i){function t(){this.constructor=r}y(r,i),r.prototype=i===null?Object.create(i):(t.prototype=i.prototype,new t)}),s=this&&this.__decorate||function(r,i,t,a){var c,d=arguments.length,f=d<3?i:a===null?a=Object.getOwnPropertyDescriptor(i,t):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(r,i,t,a);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(f=(d<3?c(f):d>3?c(i,t,f):c(i,t))||f);return d>3&&f&&Object.defineProperty(i,t,f),f},_=this&&this.__param||function(r,i){return function(t,a){i(t,a,r)}};Object.defineProperty(v,"__esModule",{value:!0}),v.MouseZoneManager=void 0;var p=T(2),e=T(7),o=T(5),n=T(1),l=function(r){function i(t,a,c,d,f,h){var u=r.call(this)||this;return u._element=t,u._screenElement=a,u._bufferService=c,u._mouseService=d,u._selectionService=f,u._optionsService=h,u._zones=[],u._areZonesActive=!1,u._lastHoverCoords=[void 0,void 0],u._initialSelectionLength=0,u.register(e.addDisposableDomListener(u._element,"mousedown",function(E){return u._onMouseDown(E)})),u._mouseMoveListener=function(E){return u._onMouseMove(E)},u._mouseLeaveListener=function(E){return u._onMouseLeave(E)},u._clickListener=function(E){return u._onClick(E)},u}return g(i,r),i.prototype.dispose=function(){r.prototype.dispose.call(this),this._deactivate()},i.prototype.add=function(t){this._zones.push(t),this._zones.length===1&&this._activate()},i.prototype.clearAll=function(t,a){if(this._zones.length!==0){t&&a||(t=0,a=this._bufferService.rows-1);for(var c=0;c<this._zones.length;c++){var d=this._zones[c];(d.y1>t&&d.y1<=a+1||d.y2>t&&d.y2<=a+1||d.y1<t&&d.y2>a+1)&&(this._currentZone&&this._currentZone===d&&(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(t){this._lastHoverCoords[0]===t.pageX&&this._lastHoverCoords[1]===t.pageY||(this._onHover(t),this._lastHoverCoords=[t.pageX,t.pageY])},i.prototype._onHover=function(t){var a=this,c=this._findZoneEventAt(t);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(t),this._tooltipTimeout=window.setTimeout(function(){return a._onTooltip(t)},this._optionsService.options.linkTooltipHoverDuration)))},i.prototype._onTooltip=function(t){this._tooltipTimeout=void 0;var a=this._findZoneEventAt(t);a&&a.tooltipCallback&&a.tooltipCallback(t)},i.prototype._onMouseDown=function(t){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var a=this._findZoneEventAt(t);(a==null?void 0:a.willLinkActivate(t))&&(t.preventDefault(),t.stopImmediatePropagation())}},i.prototype._onMouseLeave=function(t){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},i.prototype._onClick=function(t){var a=this._findZoneEventAt(t),c=this._getSelectionLength();a&&c===this._initialSelectionLength&&(a.clickCallback(t),t.preventDefault(),t.stopImmediatePropagation())},i.prototype._getSelectionLength=function(){var t=this._selectionService.selectionText;return t?t.length:0},i.prototype._findZoneEventAt=function(t){var a=this._mouseService.getCoords(t,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(a)for(var c=a[0],d=a[1],f=0;f<this._zones.length;f++){var h=this._zones[f];if(h.y1===h.y2){if(d===h.y1&&c>=h.x1&&c<h.x2)return h}else if(d===h.y1&&c>=h.x1||d===h.y2&&c<h.x2||d>h.y1&&d<h.y2)return h}},i=s([_(2,n.IBufferService),_(3,o.IMouseService),_(4,o.ISelectionService),_(5,n.IOptionsService)],i)}(p.Disposable);v.MouseZoneManager=l},function(I,v,T){"use strict";var y,g=this&&this.__extends||(y=function(i,t){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,c){a.__proto__=c}||function(a,c){for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])})(i,t)},function(i,t){function a(){this.constructor=i}y(i,t),i.prototype=t===null?Object.create(t):(a.prototype=t.prototype,new a)});Object.defineProperty(v,"__esModule",{value:!0}),v.AccessibilityManager=void 0;var s=T(18),_=T(11),p=T(31),e=T(7),o=T(2),n=T(32),l=T(17),r=function(i){function t(a,c){var d=i.call(this)||this;d._terminal=a,d._renderService=c,d._liveRegionLineCount=0,d._charsToConsume=[],d._charsToAnnounce="",d._accessibilityTreeRoot=document.createElement("div"),d._accessibilityTreeRoot.classList.add("xterm-accessibility"),d._rowContainer=document.createElement("div"),d._rowContainer.classList.add("xterm-accessibility-tree"),d._rowContainer.setAttribute("role","list"),d._rowElements=[];for(var f=0;f<d._terminal.rows;f++)d._rowElements[f]=d._createAccessibilityTreeNode(),d._rowContainer.appendChild(d._rowElements[f]);if(d._topBoundaryFocusListener=function(h){return d._onBoundaryFocus(h,0)},d._bottomBoundaryFocusListener=function(h){return d._onBoundaryFocus(h,1)},d._rowElements[0].addEventListener("focus",d._topBoundaryFocusListener),d._rowElements[d._rowElements.length-1].addEventListener("focus",d._bottomBoundaryFocusListener),d._refreshRowsDimensions(),d._accessibilityTreeRoot.appendChild(d._rowContainer),d._renderRowsDebouncer=new p.RenderDebouncer(d._renderRows.bind(d)),d._refreshRows(),d._liveRegion=document.createElement("div"),d._liveRegion.classList.add("live-region"),d._liveRegion.setAttribute("aria-live","assertive"),d._accessibilityTreeRoot.appendChild(d._liveRegion),!d._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return d._terminal.element.insertAdjacentElement("afterbegin",d._accessibilityTreeRoot),d.register(d._renderRowsDebouncer),d.register(d._terminal.onResize(function(h){return d._onResize(h.rows)})),d.register(d._terminal.onRender(function(h){return d._refreshRows(h.start,h.end)})),d.register(d._terminal.onScroll(function(){return d._refreshRows()})),d.register(d._terminal.onA11yChar(function(h){return d._onChar(h)})),d.register(d._terminal.onLineFeed(function(){return d._onChar(`
|
|
|
`)})),d.register(d._terminal.onA11yTab(function(h){return d._onTab(h)})),d.register(d._terminal.onKey(function(h){return d._onKey(h.key)})),d.register(d._terminal.onBlur(function(){return d._clearLiveRegion()})),d.register(d._renderService.onDimensionsChange(function(){return d._refreshRowsDimensions()})),d._screenDprMonitor=new n.ScreenDprMonitor,d.register(d._screenDprMonitor),d._screenDprMonitor.setListener(function(){return d._refreshRowsDimensions()}),d.register(e.addDisposableDomListener(window,"resize",function(){return d._refreshRowsDimensions()})),d}return g(t,i),t.prototype.dispose=function(){i.prototype.dispose.call(this),l.removeElementFromParent(this._accessibilityTreeRoot),this._rowElements.length=0},t.prototype._onBoundaryFocus=function(a,c){var d=a.target,f=this._rowElements[c===0?1:this._rowElements.length-2];if(d.getAttribute("aria-posinset")!==(c===0?"1":""+this._terminal.buffer.lines.length)&&a.relatedTarget===f){var h,u;if(c===0?(h=d,u=this._rowElements.pop(),this._rowContainer.removeChild(u)):(h=this._rowElements.shift(),u=d,this._rowContainer.removeChild(h)),h.removeEventListener("focus",this._topBoundaryFocusListener),u.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(),a.preventDefault(),a.stopImmediatePropagation()}},t.prototype._onResize=function(a){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>a;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},t.prototype._createAccessibilityTreeNode=function(){var a=document.createElement("div");return a.setAttribute("role","listitem"),a.tabIndex=-1,this._refreshRowDimensions(a),a},t.prototype._onTab=function(a){for(var c=0;c<a;c++)this._onChar(" ")},t.prototype._onChar=function(a){var c=this;this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==a&&(this._charsToAnnounce+=a):this._charsToAnnounce+=a,a===`
|
|
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=s.tooMuchOutput)),_.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(function(){c._accessibilityTreeRoot.appendChild(c._liveRegion)},0))},t.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,_.isMac&&l.removeElementFromParent(this._liveRegion)},t.prototype._onKey=function(a){this._clearLiveRegion(),this._charsToConsume.push(a)},t.prototype._refreshRows=function(a,c){this._renderRowsDebouncer.refresh(a,c,this._terminal.rows)},t.prototype._renderRows=function(a,c){for(var d=this._terminal.buffer,f=d.lines.length.toString(),h=a;h<=c;h++){var u=d.translateBufferLineToString(d.ydisp+h,!0),E=(d.ydisp+h+1).toString(),x=this._rowElements[h];x&&(u.length===0?x.innerHTML=" ":x.textContent=u,x.setAttribute("aria-posinset",E),x.setAttribute("aria-setsize",f))}this._announceCharacters()},t.prototype._refreshRowsDimensions=function(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(var a=0;a<this._terminal.rows;a++)this._refreshRowDimensions(this._rowElements[a])}},t.prototype._refreshRowDimensions=function(a){a.style.height=this._renderService.dimensions.actualCellHeight+"px"},t.prototype._announceCharacters=function(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")},t}(o.Disposable);v.AccessibilityManager=r},function(I,v,T){"use strict";var y,g=this&&this.__extends||(y=function(d,f){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,u){h.__proto__=u}||function(h,u){for(var E in u)u.hasOwnProperty(E)&&(h[E]=u[E])})(d,f)},function(d,f){function h(){this.constructor=d}y(d,f),d.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)}),s=this&&this.__decorate||function(d,f,h,u){var E,x=arguments.length,O=x<3?f:u===null?u=Object.getOwnPropertyDescriptor(f,h):u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(d,f,h,u);else for(var C=d.length-1;C>=0;C--)(E=d[C])&&(O=(x<3?E(O):x>3?E(f,h,O):E(f,h))||O);return x>3&&O&&Object.defineProperty(f,h,O),O},_=this&&this.__param||function(d,f){return function(h,u){f(h,u,d)}};Object.defineProperty(v,"__esModule",{value:!0}),v.DomRenderer=void 0;var p=T(58),e=T(9),o=T(2),n=T(5),l=T(1),r=T(0),i=T(10),t=T(17),a=1,c=function(d){function f(h,u,E,x,O,C,w,S,A){var D=d.call(this)||this;return D._colors=h,D._element=u,D._screenElement=E,D._viewportElement=x,D._linkifier=O,D._linkifier2=C,D._charSizeService=w,D._optionsService=S,D._bufferService=A,D._terminalClass=a++,D._rowElements=[],D._rowContainer=document.createElement("div"),D._rowContainer.classList.add("xterm-rows"),D._rowContainer.style.lineHeight="normal",D._rowContainer.setAttribute("aria-hidden","true"),D._refreshRowElements(D._bufferService.cols,D._bufferService.rows),D._selectionContainer=document.createElement("div"),D._selectionContainer.classList.add("xterm-selection"),D._selectionContainer.setAttribute("aria-hidden","true"),D.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},D._updateDimensions(),D._injectCss(),D._rowFactory=new p.DomRendererRowFactory(document,D._optionsService,D._colors),D._element.classList.add("xterm-dom-renderer-owner-"+D._terminalClass),D._screenElement.appendChild(D._rowContainer),D._screenElement.appendChild(D._selectionContainer),D._linkifier.onShowLinkUnderline(function(M){return D._onLinkHover(M)}),D._linkifier.onHideLinkUnderline(function(M){return D._onLinkLeave(M)}),D._linkifier2.onShowLinkUnderline(function(M){return D._onLinkHover(M)}),D._linkifier2.onHideLinkUnderline(function(M){return D._onLinkLeave(M)}),D}return g(f,d),Object.defineProperty(f.prototype,"onRequestRedraw",{get:function(){return new r.EventEmitter().event},enumerable:!1,configurable:!0}),f.prototype.dispose=function(){this._element.classList.remove("xterm-dom-renderer-owner-"+this._terminalClass),t.removeElementFromParent(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),d.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 h=0,u=this._rowElements;h<u.length;h++){var E=u[h];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 x=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.innerHTML=x,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(h){this._colors=h,this._injectCss()},f.prototype._injectCss=function(){var h=this;this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));var u=this._terminalSelector+" .xterm-rows { color: "+this._colors.foreground.css+"; font-family: "+this._optionsService.options.fontFamily+"; font-size: "+this._optionsService.options.fontSize+"px;}";u+=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;}",u+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { box-shadow: none; }}",u+="@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+"; }}",u+=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;}",u+=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,x){u+=h._terminalSelector+" .xterm-fg-"+x+" { color: "+E.css+"; }"+h._terminalSelector+" .xterm-bg-"+x+" { background-color: "+E.css+"; }"}),u+=this._terminalSelector+" .xterm-fg-"+e.INVERTED_DEFAULT_COLOR+" { color: "+i.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" .xterm-bg-"+e.INVERTED_DEFAULT_COLOR+" { background-color: "+this._colors.foreground.css+"; }",this._themeStyleElement.innerHTML=u},f.prototype.onDevicePixelRatioChange=function(){this._updateDimensions()},f.prototype._refreshRowElements=function(h,u){for(var E=this._rowElements.length;E<=u;E++){var x=document.createElement("div");this._rowContainer.appendChild(x),this._rowElements.push(x)}for(;this._rowElements.length>u;)this._rowContainer.removeChild(this._rowElements.pop())},f.prototype.onResize=function(h,u){this._refreshRowElements(h,u),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(h,u,E){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(h&&u){var x=h[1]-this._bufferService.buffer.ydisp,O=u[1]-this._bufferService.buffer.ydisp,C=Math.max(x,0),w=Math.min(O,this._bufferService.rows-1);if(!(C>=this._bufferService.rows||w<0)){var S=document.createDocumentFragment();if(E)S.appendChild(this._createSelectionElement(C,h[0],u[0],w-C+1));else{var A=x===C?h[0]:0,D=C===w?u[0]:this._bufferService.cols;S.appendChild(this._createSelectionElement(C,A,D));var M=w-C-1;if(S.appendChild(this._createSelectionElement(C+1,0,this._bufferService.cols,M)),C!==w){var N=O===w?u[0]:this._bufferService.cols;S.appendChild(this._createSelectionElement(w,0,N))}}this._selectionContainer.appendChild(S)}}},f.prototype._createSelectionElement=function(h,u,E,x){x===void 0&&(x=1);var O=document.createElement("div");return O.style.height=x*this.dimensions.actualCellHeight+"px",O.style.top=h*this.dimensions.actualCellHeight+"px",O.style.left=u*this.dimensions.actualCellWidth+"px",O.style.width=this.dimensions.actualCellWidth*(E-u)+"px",O},f.prototype.onCursorMove=function(){},f.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},f.prototype.clear=function(){for(var h=0,u=this._rowElements;h<u.length;h++)u[h].innerHTML=""},f.prototype.renderRows=function(h,u){for(var E=this._bufferService.buffer.ybase+this._bufferService.buffer.y,x=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),O=this._optionsService.options.cursorBlink,C=h;C<=u;C++){var w=this._rowElements[C];w.innerHTML="";var S=C+this._bufferService.buffer.ydisp,A=this._bufferService.buffer.lines.get(S),D=this._optionsService.options.cursorStyle;w.appendChild(this._rowFactory.createRow(A,S===E,D,x,O,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(h){return-1},f.prototype.deregisterCharacterJoiner=function(h){return!1},f.prototype._onLinkHover=function(h){this._setCellUnderline(h.x1,h.x2,h.y1,h.y2,h.cols,!0)},f.prototype._onLinkLeave=function(h){this._setCellUnderline(h.x1,h.x2,h.y1,h.y2,h.cols,!1)},f.prototype._setCellUnderline=function(h,u,E,x,O,C){for(;h!==u||E!==x;){var w=this._rowElements[E];if(!w)return;var S=w.children[h];S&&(S.style.textDecoration=C?"underline":"none"),++h>=O&&(h=0,E++)}},f=s([_(6,n.ICharSizeService),_(7,l.IOptionsService),_(8,l.IBufferService)],f)}(o.Disposable);v.DomRenderer=c},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.DomRendererRowFactory=v.CURSOR_STYLE_UNDERLINE_CLASS=v.CURSOR_STYLE_BAR_CLASS=v.CURSOR_STYLE_BLOCK_CLASS=v.CURSOR_BLINK_CLASS=v.CURSOR_CLASS=v.UNDERLINE_CLASS=v.ITALIC_CLASS=v.DIM_CLASS=v.BOLD_CLASS=void 0;var y=T(9),g=T(3),s=T(4),_=T(10);v.BOLD_CLASS="xterm-bold",v.DIM_CLASS="xterm-dim",v.ITALIC_CLASS="xterm-italic",v.UNDERLINE_CLASS="xterm-underline",v.CURSOR_CLASS="xterm-cursor",v.CURSOR_BLINK_CLASS="xterm-cursor-blink",v.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",v.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",v.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var p=function(){function o(n,l,r){this._document=n,this._optionsService=l,this._colors=r,this._workCell=new s.CellData}return o.prototype.setColors=function(n){this._colors=n},o.prototype.createRow=function(n,l,r,i,t,a,c){for(var d=this._document.createDocumentFragment(),f=0,h=Math.min(n.length,c)-1;h>=0;h--)if(n.loadCell(h,this._workCell).getCode()!==g.NULL_CELL_CODE||l&&h===i){f=h+1;break}for(h=0;h<f;h++){n.loadCell(h,this._workCell);var u=this._workCell.getWidth();if(u!==0){var E=this._document.createElement("span");if(u>1&&(E.style.width=a*u+"px"),l&&h===i)switch(E.classList.add(v.CURSOR_CLASS),t&&E.classList.add(v.CURSOR_BLINK_CLASS),r){case"bar":E.classList.add(v.CURSOR_STYLE_BAR_CLASS);break;case"underline":E.classList.add(v.CURSOR_STYLE_UNDERLINE_CLASS);break;default:E.classList.add(v.CURSOR_STYLE_BLOCK_CLASS)}this._workCell.isBold()&&E.classList.add(v.BOLD_CLASS),this._workCell.isItalic()&&E.classList.add(v.ITALIC_CLASS),this._workCell.isDim()&&E.classList.add(v.DIM_CLASS),this._workCell.isUnderline()&&E.classList.add(v.UNDERLINE_CLASS),this._workCell.isInvisible()?E.textContent=g.WHITESPACE_CELL_CHAR:E.textContent=this._workCell.getChars()||g.WHITESPACE_CELL_CHAR;var x=this._workCell.getFgColor(),O=this._workCell.getFgColorMode(),C=this._workCell.getBgColor(),w=this._workCell.getBgColorMode(),S=!!this._workCell.isInverse();if(S){var A=x;x=C,C=A;var D=O;O=w,w=D}switch(O){case 16777216:case 33554432:this._workCell.isBold()&&x<8&&this._optionsService.options.drawBoldTextInBrightColors&&(x+=8),this._applyMinimumContrast(E,this._colors.background,this._colors.ansi[x])||E.classList.add("xterm-fg-"+x);break;case 50331648:var M=_.rgba.toColor(x>>16&255,x>>8&255,255&x);this._applyMinimumContrast(E,this._colors.background,M)||this._addStyle(E,"color:#"+e(x.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:#"+e(C.toString(16),"0",6));break;case 0:default:S&&E.classList.add("xterm-bg-"+y.INVERTED_DEFAULT_COLOR)}d.appendChild(E)}}return d},o.prototype._applyMinimumContrast=function(n,l,r){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=_.color.ensureContrastRatio(l,r,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)},o.prototype._addStyle=function(n,l){n.setAttribute("style",""+(n.getAttribute("style")||"")+l+";")},o}();function e(o,n,l){for(;o.length<l;)o=n+o;return o}v.DomRendererRowFactory=p},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.evaluateKeyboardEvent=void 0;var y=T(12),g={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:["'",'"']};v.evaluateKeyboardEvent=function(s,_,p,e){var o={type:0,cancel:!1,key:void 0},n=(s.shiftKey?1:0)|(s.altKey?2:0)|(s.ctrlKey?4:0)|(s.metaKey?8:0);switch(s.keyCode){case 0:s.key==="UIKeyInputUpArrow"?o.key=_?y.C0.ESC+"OA":y.C0.ESC+"[A":s.key==="UIKeyInputLeftArrow"?o.key=_?y.C0.ESC+"OD":y.C0.ESC+"[D":s.key==="UIKeyInputRightArrow"?o.key=_?y.C0.ESC+"OC":y.C0.ESC+"[C":s.key==="UIKeyInputDownArrow"&&(o.key=_?y.C0.ESC+"OB":y.C0.ESC+"[B");break;case 8:if(s.shiftKey){o.key=y.C0.BS;break}if(s.altKey){o.key=y.C0.ESC+y.C0.DEL;break}o.key=y.C0.DEL;break;case 9:if(s.shiftKey){o.key=y.C0.ESC+"[Z";break}o.key=y.C0.HT,o.cancel=!0;break;case 13:o.key=s.altKey?y.C0.ESC+y.C0.CR:y.C0.CR,o.cancel=!0;break;case 27:o.key=y.C0.ESC,s.altKey&&(o.key=y.C0.ESC+y.C0.ESC),o.cancel=!0;break;case 37:if(s.metaKey)break;n?(o.key=y.C0.ESC+"[1;"+(n+1)+"D",o.key===y.C0.ESC+"[1;3D"&&(o.key=y.C0.ESC+(p?"b":"[1;5D"))):o.key=_?y.C0.ESC+"OD":y.C0.ESC+"[D";break;case 39:if(s.metaKey)break;n?(o.key=y.C0.ESC+"[1;"+(n+1)+"C",o.key===y.C0.ESC+"[1;3C"&&(o.key=y.C0.ESC+(p?"f":"[1;5C"))):o.key=_?y.C0.ESC+"OC":y.C0.ESC+"[C";break;case 38:if(s.metaKey)break;n?(o.key=y.C0.ESC+"[1;"+(n+1)+"A",p||o.key!==y.C0.ESC+"[1;3A"||(o.key=y.C0.ESC+"[1;5A")):o.key=_?y.C0.ESC+"OA":y.C0.ESC+"[A";break;case 40:if(s.metaKey)break;n?(o.key=y.C0.ESC+"[1;"+(n+1)+"B",p||o.key!==y.C0.ESC+"[1;3B"||(o.key=y.C0.ESC+"[1;5B")):o.key=_?y.C0.ESC+"OB":y.C0.ESC+"[B";break;case 45:s.shiftKey||s.ctrlKey||(o.key=y.C0.ESC+"[2~");break;case 46:o.key=n?y.C0.ESC+"[3;"+(n+1)+"~":y.C0.ESC+"[3~";break;case 36:o.key=n?y.C0.ESC+"[1;"+(n+1)+"H":_?y.C0.ESC+"OH":y.C0.ESC+"[H";break;case 35:o.key=n?y.C0.ESC+"[1;"+(n+1)+"F":_?y.C0.ESC+"OF":y.C0.ESC+"[F";break;case 33:s.shiftKey?o.type=2:o.key=y.C0.ESC+"[5~";break;case 34:s.shiftKey?o.type=3:o.key=y.C0.ESC+"[6~";break;case 112:o.key=n?y.C0.ESC+"[1;"+(n+1)+"P":y.C0.ESC+"OP";break;case 113:o.key=n?y.C0.ESC+"[1;"+(n+1)+"Q":y.C0.ESC+"OQ";break;case 114:o.key=n?y.C0.ESC+"[1;"+(n+1)+"R":y.C0.ESC+"OR";break;case 115:o.key=n?y.C0.ESC+"[1;"+(n+1)+"S":y.C0.ESC+"OS";break;case 116:o.key=n?y.C0.ESC+"[15;"+(n+1)+"~":y.C0.ESC+"[15~";break;case 117:o.key=n?y.C0.ESC+"[17;"+(n+1)+"~":y.C0.ESC+"[17~";break;case 118:o.key=n?y.C0.ESC+"[18;"+(n+1)+"~":y.C0.ESC+"[18~";break;case 119:o.key=n?y.C0.ESC+"[19;"+(n+1)+"~":y.C0.ESC+"[19~";break;case 120:o.key=n?y.C0.ESC+"[20;"+(n+1)+"~":y.C0.ESC+"[20~";break;case 121:o.key=n?y.C0.ESC+"[21;"+(n+1)+"~":y.C0.ESC+"[21~";break;case 122:o.key=n?y.C0.ESC+"[23;"+(n+1)+"~":y.C0.ESC+"[23~";break;case 123:o.key=n?y.C0.ESC+"[24;"+(n+1)+"~":y.C0.ESC+"[24~";break;default:if(!s.ctrlKey||s.shiftKey||s.altKey||s.metaKey)if(p&&!e||!s.altKey||s.metaKey)p&&!s.altKey&&!s.ctrlKey&&s.metaKey?s.keyCode===65&&(o.type=1):s.key&&!s.ctrlKey&&!s.altKey&&!s.metaKey&&s.keyCode>=48&&s.key.length===1?o.key=s.key:s.key&&s.ctrlKey&&s.key==="_"&&(o.key=y.C0.US);else{var l=g[s.keyCode],r=l&&l[s.shiftKey?1:0];if(r)o.key=y.C0.ESC+r;else if(s.keyCode>=65&&s.keyCode<=90){var i=s.ctrlKey?s.keyCode-64:s.keyCode+32;o.key=y.C0.ESC+String.fromCharCode(i)}}else s.keyCode>=65&&s.keyCode<=90?o.key=String.fromCharCode(s.keyCode-64):s.keyCode===32?o.key=y.C0.NUL:s.keyCode>=51&&s.keyCode<=55?o.key=String.fromCharCode(s.keyCode-51+27):s.keyCode===56?o.key=y.C0.DEL:s.keyCode===219?o.key=y.C0.ESC:s.keyCode===220?o.key=y.C0.FS:s.keyCode===221&&(o.key=y.C0.GS)}return o}},function(I,v,T){"use strict";var y,g=this&&this.__extends||(y=function(a,c){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var h in f)f.hasOwnProperty(h)&&(d[h]=f[h])})(a,c)},function(a,c){function d(){this.constructor=a}y(a,c),a.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}),s=this&&this.__decorate||function(a,c,d,f){var h,u=arguments.length,E=u<3?c:f===null?f=Object.getOwnPropertyDescriptor(c,d):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(a,c,d,f);else for(var x=a.length-1;x>=0;x--)(h=a[x])&&(E=(u<3?h(E):u>3?h(c,d,E):h(c,d))||E);return u>3&&E&&Object.defineProperty(c,d,E),E},_=this&&this.__param||function(a,c){return function(d,f){c(d,f,a)}};Object.defineProperty(v,"__esModule",{value:!0}),v.RenderService=void 0;var p=T(31),e=T(0),o=T(2),n=T(32),l=T(7),r=T(1),i=T(5),t=function(a){function c(d,f,h,u,E,x){var O=a.call(this)||this;if(O._renderer=d,O._rowCount=f,O._isPaused=!1,O._needsFullRefresh=!1,O._isNextRenderRedrawOnly=!0,O._needsSelectionRefresh=!1,O._canvasWidth=0,O._canvasHeight=0,O._selectionState={start:void 0,end:void 0,columnSelectMode:!1},O._onDimensionsChange=new e.EventEmitter,O._onRender=new e.EventEmitter,O._onRefreshRequest=new e.EventEmitter,O.register({dispose:function(){return O._renderer.dispose()}}),O._renderDebouncer=new p.RenderDebouncer(function(w,S){return O._renderRows(w,S)}),O.register(O._renderDebouncer),O._screenDprMonitor=new n.ScreenDprMonitor,O._screenDprMonitor.setListener(function(){return O.onDevicePixelRatioChange()}),O.register(O._screenDprMonitor),O.register(x.onResize(function(w){return O._fullRefresh()})),O.register(u.onOptionChange(function(){return O._renderer.onOptionsChanged()})),O.register(E.onCharSizeChange(function(){return O.onCharSizeChanged()})),O._renderer.onRequestRedraw(function(w){return O.refreshRows(w.start,w.end,!0)}),O.register(l.addDisposableDomListener(window,"resize",function(){return O.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var C=new IntersectionObserver(function(w){return O._onIntersectionChange(w[w.length-1])},{threshold:0});C.observe(h),O.register({dispose:function(){return C.disconnect()}})}return O}return g(c,a),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(d){this._isPaused=d.intersectionRatio===0,!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},c.prototype.refreshRows=function(d,f,h){h===void 0&&(h=!1),this._isPaused?this._needsFullRefresh=!0:(h||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(d,f,this._rowCount))},c.prototype._renderRows=function(d,f){this._renderer.renderRows(d,f),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRender.fire({start:d,end:f}),this._isNextRenderRedrawOnly=!0},c.prototype.resize=function(d,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(){a.prototype.dispose.call(this)},c.prototype.setRenderer=function(d){var f=this;this._renderer.dispose(),this._renderer=d,this._renderer.onRequestRedraw(function(h){return f.refreshRows(h.start,h.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(d){this._renderer.setColors(d),this._fullRefresh()},c.prototype.onDevicePixelRatioChange=function(){this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},c.prototype.onResize=function(d,f){this._renderer.onResize(d,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(d,f,h){this._selectionState.start=d,this._selectionState.end=f,this._selectionState.columnSelectMode=h,this._renderer.onSelectionChanged(d,f,h)},c.prototype.onCursorMove=function(){this._renderer.onCursorMove()},c.prototype.clear=function(){this._renderer.clear()},c.prototype.registerCharacterJoiner=function(d){return this._renderer.registerCharacterJoiner(d)},c.prototype.deregisterCharacterJoiner=function(d){return this._renderer.deregisterCharacterJoiner(d)},c=s([_(3,r.IOptionsService),_(4,i.ICharSizeService),_(5,r.IBufferService)],c)}(o.Disposable);v.RenderService=t},function(I,v,T){"use strict";var y=this&&this.__decorate||function(o,n,l,r){var i,t=arguments.length,a=t<3?n:r===null?r=Object.getOwnPropertyDescriptor(n,l):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,n,l,r);else for(var c=o.length-1;c>=0;c--)(i=o[c])&&(a=(t<3?i(a):t>3?i(n,l,a):i(n,l))||a);return t>3&&a&&Object.defineProperty(n,l,a),a},g=this&&this.__param||function(o,n){return function(l,r){n(l,r,o)}};Object.defineProperty(v,"__esModule",{value:!0}),v.CharSizeService=void 0;var s=T(1),_=T(0),p=function(){function o(n,l,r){this._optionsService=r,this.width=0,this.height=0,this._onCharSizeChange=new _.EventEmitter,this._measureStrategy=new e(n,l,this._optionsService)}return Object.defineProperty(o.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),o.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())},o=y([g(2,s.IOptionsService)],o)}();v.CharSizeService=p;var e=function(){function o(n,l,r){this._document=n,this._parentElement=l,this._optionsService=r,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 o.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},o}()},function(I,v,T){"use strict";var y=this&&this.__decorate||function(e,o,n,l){var r,i=arguments.length,t=i<3?o:l===null?l=Object.getOwnPropertyDescriptor(o,n):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(e,o,n,l);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(t=(i<3?r(t):i>3?r(o,n,t):r(o,n))||t);return i>3&&t&&Object.defineProperty(o,n,t),t},g=this&&this.__param||function(e,o){return function(n,l){o(n,l,e)}};Object.defineProperty(v,"__esModule",{value:!0}),v.MouseService=void 0;var s=T(5),_=T(30),p=function(){function e(o,n){this._renderService=o,this._charSizeService=n}return e.prototype.getCoords=function(o,n,l,r,i){return _.getCoords(o,n,l,r,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,i)},e.prototype.getRawByteCoords=function(o,n,l,r){var i=this.getCoords(o,n,l,r);return _.getRawByteCoords(i)},e=y([g(0,s.IRenderService),g(1,s.ICharSizeService)],e)}();v.MouseService=p},function(I,v,T){"use strict";var y,g=this&&this.__extends||(y=function(r,i){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,a){t.__proto__=a}||function(t,a){for(var c in a)a.hasOwnProperty(c)&&(t[c]=a[c])})(r,i)},function(r,i){function t(){this.constructor=r}y(r,i),r.prototype=i===null?Object.create(i):(t.prototype=i.prototype,new t)}),s=this&&this.__decorate||function(r,i,t,a){var c,d=arguments.length,f=d<3?i:a===null?a=Object.getOwnPropertyDescriptor(i,t):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(r,i,t,a);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(f=(d<3?c(f):d>3?c(i,t,f):c(i,t))||f);return d>3&&f&&Object.defineProperty(i,t,f),f},_=this&&this.__param||function(r,i){return function(t,a){i(t,a,r)}};Object.defineProperty(v,"__esModule",{value:!0}),v.Linkifier2=void 0;var p=T(1),e=T(0),o=T(2),n=T(7),l=function(r){function i(t){var a=r.call(this)||this;return a._bufferService=t,a._linkProviders=[],a._linkCacheDisposables=[],a._isMouseOut=!0,a._activeLine=-1,a._onShowLinkUnderline=a.register(new e.EventEmitter),a._onHideLinkUnderline=a.register(new e.EventEmitter),a.register(o.getDisposeArrayDisposable(a._linkCacheDisposables)),a}return g(i,r),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(t){var a=this;return this._linkProviders.push(t),{dispose:function(){var c=a._linkProviders.indexOf(t);c!==-1&&a._linkProviders.splice(c,1)}}},i.prototype.attachToDom=function(t,a,c){var d=this;this._element=t,this._mouseService=a,this._renderService=c,this.register(n.addDisposableDomListener(this._element,"mouseleave",function(){d._isMouseOut=!0,d._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(t){if(this._lastMouseEvent=t,this._element&&this._mouseService){var a=this._positionFromMouseEvent(t,this._element,this._mouseService);if(a){this._isMouseOut=!1;for(var c=t.composedPath(),d=0;d<c.length;d++){var f=c[d];if(f.classList.contains("xterm"))break;if(f.classList.contains("xterm-hover"))return}this._lastBufferCell&&a.x===this._lastBufferCell.x&&a.y===this._lastBufferCell.y||(this._onHover(a),this._lastBufferCell=a)}}},i.prototype._onHover=function(t){if(this._activeLine!==t.y)return this._clearCurrentLink(),void this._askForLink(t,!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,t)||(this._clearCurrentLink(),this._askForLink(t,!0))},i.prototype._askForLink=function(t,a){var c=this;this._activeProviderReplies&&a||(this._activeProviderReplies=new Map,this._activeLine=t.y);var d=!1;this._linkProviders.forEach(function(f,h){var u;a?((u=c._activeProviderReplies)===null||u===void 0?void 0:u.get(h))&&(d=c._checkLinkProviderResult(h,t,d)):f.provideLinks(t.y,function(E){var x,O;if(!c._isMouseOut){var C=E==null?void 0:E.map(function(w){return{link:w}});(x=c._activeProviderReplies)===null||x===void 0||x.set(h,C),d=c._checkLinkProviderResult(h,t,d),((O=c._activeProviderReplies)===null||O===void 0?void 0:O.size)===c._linkProviders.length&&c._removeIntersectingLinks(t.y,c._activeProviderReplies)}})})},i.prototype._removeIntersectingLinks=function(t,a){for(var c=new Set,d=0;d<a.size;d++){var f=a.get(d);if(f)for(var h=0;h<f.length;h++)for(var u=f[h],E=u.link.range.start.y<t?0:u.link.range.start.x,x=u.link.range.end.y>t?this._bufferService.cols:u.link.range.end.x,O=E;O<=x;O++){if(c.has(O)){f.splice(h--,1);break}c.add(O)}}},i.prototype._checkLinkProviderResult=function(t,a,c){var d,f=this;if(!this._activeProviderReplies)return c;for(var h=this._activeProviderReplies.get(t),u=!1,E=0;E<t;E++)this._activeProviderReplies.has(E)&&!this._activeProviderReplies.get(E)||(u=!0);if(!u&&h){var x=h.find(function(C){return f._linkAtPosition(C.link,a)});x&&(c=!0,this._handleNewLink(x))}if(this._activeProviderReplies.size===this._linkProviders.length&&!c)for(E=0;E<this._activeProviderReplies.size;E++){var O=(d=this._activeProviderReplies.get(E))===null||d===void 0?void 0:d.find(function(C){return f._linkAtPosition(C.link,a)});if(O){c=!0,this._handleNewLink(O);break}}return c},i.prototype._onClick=function(t){if(this._element&&this._mouseService&&this._currentLink){var a=this._positionFromMouseEvent(t,this._element,this._mouseService);a&&this._linkAtPosition(this._currentLink.link,a)&&this._currentLink.link.activate(t,this._currentLink.link.text)}},i.prototype._clearCurrentLink=function(t,a){this._element&&this._currentLink&&this._lastMouseEvent&&(!t||!a||this._currentLink.link.range.start.y>=t&&this._currentLink.link.range.end.y<=a)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,o.disposeArray(this._linkCacheDisposables))},i.prototype._handleNewLink=function(t){var a=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var c=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);c&&this._linkAtPosition(t.link,c)&&(this._currentLink=t,this._currentLink.state={decorations:{underline:t.link.decorations===void 0||t.link.decorations.underline,pointerCursor:t.link.decorations===void 0||t.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,t.link,this._lastMouseEvent),t.link.decorations={},Object.defineProperties(t.link.decorations,{pointerCursor:{get:function(){var d,f;return(f=(d=a._currentLink)===null||d===void 0?void 0:d.state)===null||f===void 0?void 0:f.decorations.pointerCursor},set:function(d){var f,h;((f=a._currentLink)===null||f===void 0?void 0:f.state)&&a._currentLink.state.decorations.pointerCursor!==d&&(a._currentLink.state.decorations.pointerCursor=d,a._currentLink.state.isHovered&&((h=a._element)===null||h===void 0||h.classList.toggle("xterm-cursor-pointer",d)))}},underline:{get:function(){var d,f;return(f=(d=a._currentLink)===null||d===void 0?void 0:d.state)===null||f===void 0?void 0:f.decorations.underline},set:function(d){var f,h,u;((f=a._currentLink)===null||f===void 0?void 0:f.state)&&((u=(h=a._currentLink)===null||h===void 0?void 0:h.state)===null||u===void 0?void 0:u.decorations.underline)!==d&&(a._currentLink.state.decorations.underline=d,a._currentLink.state.isHovered&&a._fireUnderlineEvent(t.link,d))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange(function(d){var f=d.start===0?0:d.start+1+a._bufferService.buffer.ydisp;a._clearCurrentLink(f,d.end+1+a._bufferService.buffer.ydisp)})))}},i.prototype._linkHover=function(t,a,c){var d;((d=this._currentLink)===null||d===void 0?void 0:d.state)&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(a,!0),this._currentLink.state.decorations.pointerCursor&&t.classList.add("xterm-cursor-pointer")),a.hover&&a.hover(c,a.text)},i.prototype._fireUnderlineEvent=function(t,a){var c=t.range,d=this._bufferService.buffer.ydisp,f=this._createLinkUnderlineEvent(c.start.x-1,c.start.y-d-1,c.end.x,c.end.y-d-1,void 0);(a?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(f)},i.prototype._linkLeave=function(t,a,c){var d;((d=this._currentLink)===null||d===void 0?void 0:d.state)&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(a,!1),this._currentLink.state.decorations.pointerCursor&&t.classList.remove("xterm-cursor-pointer")),a.leave&&a.leave(c,a.text)},i.prototype._linkAtPosition=function(t,a){var c=t.range.start.y===t.range.end.y,d=t.range.start.y<a.y,f=t.range.end.y>a.y;return(c&&t.range.start.x<=a.x&&t.range.end.x>=a.x||d&&t.range.end.x>=a.x||f&&t.range.start.x<=a.x||d&&f)&&t.range.start.y<=a.y&&t.range.end.y>=a.y},i.prototype._positionFromMouseEvent=function(t,a,c){var d=c.getCoords(t,a,this._bufferService.cols,this._bufferService.rows);if(d)return{x:d[0],y:d[1]+this._bufferService.buffer.ydisp}},i.prototype._createLinkUnderlineEvent=function(t,a,c,d,f){return{x1:t,y1:a,x2:c,y2:d,cols:this._bufferService.cols,fg:f}},i=s([_(0,p.IBufferService)],i)}(o.Disposable);v.Linkifier2=l},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.CoreBrowserService=void 0;var y=function(){function g(s){this._textarea=s}return Object.defineProperty(g.prototype,"isFocused",{get:function(){return document.activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),g}();v.CoreBrowserService=y},function(I,v,T){"use strict";var y,g=this&&this.__extends||(y=function(E,x){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,C){O.__proto__=C}||function(O,C){for(var w in C)C.hasOwnProperty(w)&&(O[w]=C[w])})(E,x)},function(E,x){function O(){this.constructor=E}y(E,x),E.prototype=x===null?Object.create(x):(O.prototype=x.prototype,new O)});Object.defineProperty(v,"__esModule",{value:!0}),v.CoreTerminal=void 0;var s=T(2),_=T(1),p=T(66),e=T(67),o=T(68),n=T(74),l=T(75),r=T(0),i=T(76),t=T(77),a=T(78),c=T(80),d=T(81),f=T(19),h=T(82),u=function(E){function x(O){var C=E.call(this)||this;return C._onBinary=new r.EventEmitter,C._onData=new r.EventEmitter,C._onLineFeed=new r.EventEmitter,C._onResize=new r.EventEmitter,C._onScroll=new r.EventEmitter,C._instantiationService=new p.InstantiationService,C.optionsService=new n.OptionsService(O),C._instantiationService.setService(_.IOptionsService,C.optionsService),C._bufferService=C.register(C._instantiationService.createInstance(o.BufferService)),C._instantiationService.setService(_.IBufferService,C._bufferService),C._logService=C._instantiationService.createInstance(e.LogService),C._instantiationService.setService(_.ILogService,C._logService),C._coreService=C.register(C._instantiationService.createInstance(l.CoreService,function(){return C.scrollToBottom()})),C._instantiationService.setService(_.ICoreService,C._coreService),C._coreMouseService=C._instantiationService.createInstance(i.CoreMouseService),C._instantiationService.setService(_.ICoreMouseService,C._coreMouseService),C._dirtyRowService=C._instantiationService.createInstance(t.DirtyRowService),C._instantiationService.setService(_.IDirtyRowService,C._dirtyRowService),C.unicodeService=C._instantiationService.createInstance(a.UnicodeService),C._instantiationService.setService(_.IUnicodeService,C.unicodeService),C._charsetService=C._instantiationService.createInstance(c.CharsetService),C._instantiationService.setService(_.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(r.forwardEvent(C._inputHandler.onLineFeed,C._onLineFeed)),C.register(C._inputHandler),C.register(r.forwardEvent(C._bufferService.onResize,C._onResize)),C.register(r.forwardEvent(C._coreService.onData,C._onData)),C.register(r.forwardEvent(C._coreService.onBinary,C._onBinary)),C.register(C.optionsService.onOptionChange(function(w){return C._updateOptions(w)})),C._writeBuffer=new h.WriteBuffer(function(w){return C._inputHandler.parse(w)}),C}return g(x,E),Object.defineProperty(x.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),x.prototype.dispose=function(){var O;this._isDisposed||(E.prototype.dispose.call(this),(O=this._windowsMode)===null||O===void 0||O.dispose(),this._windowsMode=void 0)},x.prototype.write=function(O,C){this._writeBuffer.write(O,C)},x.prototype.writeSync=function(O){this._writeBuffer.writeSync(O)},x.prototype.resize=function(O,C){isNaN(O)||isNaN(C)||(O=Math.max(O,o.MINIMUM_COLS),C=Math.max(C,o.MINIMUM_ROWS),this._bufferService.resize(O,C))},x.prototype.scroll=function(O,C){C===void 0&&(C=!1);var w,S=this._bufferService.buffer;(w=this._cachedBlankLine)&&w.length===this.cols&&w.getFg(0)===O.fg&&w.getBg(0)===O.bg||(w=S.getBlankLine(O,C),this._cachedBlankLine=w),w.isWrapped=C;var A=S.ybase+S.scrollTop,D=S.ybase+S.scrollBottom;if(S.scrollTop===0){var M=S.lines.isFull;D===S.lines.length-1?M?S.lines.recycle().copyFrom(w):S.lines.push(w.clone()):S.lines.splice(D+1,0,w.clone()),M?this._bufferService.isUserScrolling&&(S.ydisp=Math.max(S.ydisp-1,0)):(S.ybase++,this._bufferService.isUserScrolling||S.ydisp++)}else{var N=D-A+1;S.lines.shiftElements(A+1,N-1,-1),S.lines.set(D,w.clone())}this._bufferService.isUserScrolling||(S.ydisp=S.ybase),this._dirtyRowService.markRangeDirty(S.scrollTop,S.scrollBottom),this._onScroll.fire(S.ydisp)},x.prototype.scrollLines=function(O,C){var w=this._bufferService.buffer;if(O<0){if(w.ydisp===0)return;this._bufferService.isUserScrolling=!0}else O+w.ydisp>=w.ybase&&(this._bufferService.isUserScrolling=!1);var S=w.ydisp;w.ydisp=Math.max(Math.min(w.ydisp+O,w.ybase),0),S!==w.ydisp&&(C||this._onScroll.fire(w.ydisp))},x.prototype.scrollPages=function(O){this.scrollLines(O*(this.rows-1))},x.prototype.scrollToTop=function(){this.scrollLines(-this._bufferService.buffer.ydisp)},x.prototype.scrollToBottom=function(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)},x.prototype.scrollToLine=function(O){var C=O-this._bufferService.buffer.ydisp;C!==0&&this.scrollLines(C)},x.prototype.addEscHandler=function(O,C){return this._inputHandler.addEscHandler(O,C)},x.prototype.addDcsHandler=function(O,C){return this._inputHandler.addDcsHandler(O,C)},x.prototype.addCsiHandler=function(O,C){return this._inputHandler.addCsiHandler(O,C)},x.prototype.addOscHandler=function(O,C){return this._inputHandler.addOscHandler(O,C)},x.prototype._setup=function(){this.optionsService.options.windowsMode&&this._enableWindowsMode()},x.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this._coreService.reset(),this._coreMouseService.reset()},x.prototype._updateOptions=function(O){var C;switch(O){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)}},x.prototype._enableWindowsMode=function(){var O=this;if(!this._windowsMode){var C=[];C.push(this.onLineFeed(d.updateWindowsModeWrappedState.bind(null,this._bufferService))),C.push(this.addCsiHandler({final:"H"},function(){return d.updateWindowsModeWrappedState(O._bufferService),!1})),this._windowsMode={dispose:function(){for(var w=0,S=C;w<S.length;w++)S[w].dispose()}}}},x}(s.Disposable);v.CoreTerminal=u},function(I,v,T){"use strict";var y=this&&this.__spreadArrays||function(){for(var e=0,o=0,n=arguments.length;o<n;o++)e+=arguments[o].length;var l=Array(e),r=0;for(o=0;o<n;o++)for(var i=arguments[o],t=0,a=i.length;t<a;t++,r++)l[r]=i[t];return l};Object.defineProperty(v,"__esModule",{value:!0}),v.InstantiationService=v.ServiceCollection=void 0;var g=T(1),s=T(14),_=function(){function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];this._entries=new Map;for(var l=0,r=o;l<r.length;l++){var i=r[l],t=i[0],a=i[1];this.set(t,a)}}return e.prototype.set=function(o,n){var l=this._entries.get(o);return this._entries.set(o,n),l},e.prototype.forEach=function(o){this._entries.forEach(function(n,l){return o(l,n)})},e.prototype.has=function(o){return this._entries.has(o)},e.prototype.get=function(o){return this._entries.get(o)},e}();v.ServiceCollection=_;var p=function(){function e(){this._services=new _,this._services.set(g.IInstantiationService,this)}return e.prototype.setService=function(o,n){this._services.set(o,n)},e.prototype.getService=function(o){return this._services.get(o)},e.prototype.createInstance=function(o){for(var n=[],l=1;l<arguments.length;l++)n[l-1]=arguments[l];for(var r=s.getServiceDependencies(o).sort(function(h,u){return h.index-u.index}),i=[],t=0,a=r;t<a.length;t++){var c=a[t],d=this._services.get(c.id);if(!d)throw new Error("[createInstance] "+o.name+" depends on UNKNOWN service "+c.id+".");i.push(d)}var f=r.length>0?r[0].index:n.length;if(n.length!==f)throw new Error("[createInstance] First service dependency of "+o.name+" at position "+(f+1)+" conflicts with "+n.length+" static arguments");return new(o.bind.apply(o,y([void 0],y(n,i))))},e}();v.InstantiationService=p},function(I,v,T){"use strict";var y=this&&this.__decorate||function(n,l,r,i){var t,a=arguments.length,c=a<3?l:i===null?i=Object.getOwnPropertyDescriptor(l,r):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(n,l,r,i);else for(var d=n.length-1;d>=0;d--)(t=n[d])&&(c=(a<3?t(c):a>3?t(l,r,c):t(l,r))||c);return a>3&&c&&Object.defineProperty(l,r,c),c},g=this&&this.__param||function(n,l){return function(r,i){l(r,i,n)}},s=this&&this.__spreadArrays||function(){for(var n=0,l=0,r=arguments.length;l<r;l++)n+=arguments[l].length;var i=Array(n),t=0;for(l=0;l<r;l++)for(var a=arguments[l],c=0,d=a.length;c<d;c++,t++)i[t]=a[c];return i};Object.defineProperty(v,"__esModule",{value:!0}),v.LogService=v.LogLevel=void 0;var _,p=T(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"}(_=v.LogLevel||(v.LogLevel={}));var e={debug:_.DEBUG,info:_.INFO,warn:_.WARN,error:_.ERROR,off:_.OFF},o=function(){function n(l){var r=this;this._optionsService=l,this._updateLogLevel(),this._optionsService.onOptionChange(function(i){i==="logLevel"&&r._updateLogLevel()})}return n.prototype._updateLogLevel=function(){this._logLevel=e[this._optionsService.options.logLevel]},n.prototype._evalLazyOptionalParams=function(l){for(var r=0;r<l.length;r++)typeof l[r]=="function"&&(l[r]=l[r]())},n.prototype._log=function(l,r,i){this._evalLazyOptionalParams(i),l.call.apply(l,s([console,"xterm.js: "+r],i))},n.prototype.debug=function(l){for(var r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];this._logLevel<=_.DEBUG&&this._log(console.log,l,r)},n.prototype.info=function(l){for(var r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];this._logLevel<=_.INFO&&this._log(console.info,l,r)},n.prototype.warn=function(l){for(var r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];this._logLevel<=_.WARN&&this._log(console.warn,l,r)},n.prototype.error=function(l){for(var r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];this._logLevel<=_.ERROR&&this._log(console.error,l,r)},n=y([g(0,p.IOptionsService)],n)}();v.LogService=o},function(I,v,T){"use strict";var y,g=this&&this.__extends||(y=function(r,i){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,a){t.__proto__=a}||function(t,a){for(var c in a)a.hasOwnProperty(c)&&(t[c]=a[c])})(r,i)},function(r,i){function t(){this.constructor=r}y(r,i),r.prototype=i===null?Object.create(i):(t.prototype=i.prototype,new t)}),s=this&&this.__decorate||function(r,i,t,a){var c,d=arguments.length,f=d<3?i:a===null?a=Object.getOwnPropertyDescriptor(i,t):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(r,i,t,a);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(f=(d<3?c(f):d>3?c(i,t,f):c(i,t))||f);return d>3&&f&&Object.defineProperty(i,t,f),f},_=this&&this.__param||function(r,i){return function(t,a){i(t,a,r)}};Object.defineProperty(v,"__esModule",{value:!0}),v.BufferService=v.MINIMUM_ROWS=v.MINIMUM_COLS=void 0;var p=T(1),e=T(69),o=T(0),n=T(2);v.MINIMUM_COLS=2,v.MINIMUM_ROWS=1;var l=function(r){function i(t){var a=r.call(this)||this;return a._optionsService=t,a.isUserScrolling=!1,a._onResize=new o.EventEmitter,a.cols=Math.max(t.options.cols,v.MINIMUM_COLS),a.rows=Math.max(t.options.rows,v.MINIMUM_ROWS),a.buffers=new e.BufferSet(t,a),a}return g(i,r),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(){r.prototype.dispose.call(this),this.buffers.dispose()},i.prototype.resize=function(t,a){this.cols=t,this.rows=a,this.buffers.resize(t,a),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:t,rows:a})},i.prototype.reset=function(){this.buffers.dispose(),this.buffers=new e.BufferSet(this._optionsService,this),this.isUserScrolling=!1},i=s([_(0,p.IOptionsService)],i)}(n.Disposable);v.BufferService=l},function(I,v,T){"use strict";var y,g=this&&this.__extends||(y=function(e,o){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,l){n.__proto__=l}||function(n,l){for(var r in l)l.hasOwnProperty(r)&&(n[r]=l[r])})(e,o)},function(e,o){function n(){this.constructor=e}y(e,o),e.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)});Object.defineProperty(v,"__esModule",{value:!0}),v.BufferSet=void 0;var s=T(70),_=T(0),p=function(e){function o(n,l){var r=e.call(this)||this;return r._onBufferActivate=r.register(new _.EventEmitter),r._normal=new s.Buffer(!0,n,l),r._normal.fillViewportRows(),r._alt=new s.Buffer(!1,n,l),r._activeBuffer=r._normal,r.setupTabStops(),r}return g(o,e),Object.defineProperty(o.prototype,"onBufferActivate",{get:function(){return this._onBufferActivate.event},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"alt",{get:function(){return this._alt},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"normal",{get:function(){return this._normal},enumerable:!1,configurable:!0}),o.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}))},o.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}))},o.prototype.resize=function(n,l){this._normal.resize(n,l),this._alt.resize(n,l)},o.prototype.setupTabStops=function(n){this._normal.setupTabStops(n),this._alt.setupTabStops(n)},o}(T(2).Disposable);v.BufferSet=p},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.BufferStringIterator=v.Buffer=v.MAX_BUFFER_SIZE=void 0;var y=T(71),g=T(16),s=T(4),_=T(3),p=T(72),e=T(73),o=T(20),n=T(6);v.MAX_BUFFER_SIZE=4294967295;var l=function(){function i(t,a,c){this._hasScrollback=t,this._optionsService=a,this._bufferService=c,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=g.DEFAULT_ATTR_DATA.clone(),this.savedCharset=o.DEFAULT_CHARSET,this.markers=[],this._nullCell=s.CellData.fromCharData([0,_.NULL_CELL_CHAR,_.NULL_CELL_WIDTH,_.NULL_CELL_CODE]),this._whitespaceCell=s.CellData.fromCharData([0,_.WHITESPACE_CELL_CHAR,_.WHITESPACE_CELL_WIDTH,_.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(t){return t?(this._nullCell.fg=t.fg,this._nullCell.bg=t.bg,this._nullCell.extended=t.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new n.ExtendedAttrs),this._nullCell},i.prototype.getWhitespaceCell=function(t){return t?(this._whitespaceCell.fg=t.fg,this._whitespaceCell.bg=t.bg,this._whitespaceCell.extended=t.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new n.ExtendedAttrs),this._whitespaceCell},i.prototype.getBlankLine=function(t,a){return new g.BufferLine(this._bufferService.cols,this.getNullCell(t),a)},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 t=this.ybase+this.y-this.ydisp;return t>=0&&t<this._rows},enumerable:!1,configurable:!0}),i.prototype._getCorrectBufferLength=function(t){if(!this._hasScrollback)return t;var a=t+this._optionsService.options.scrollback;return a>v.MAX_BUFFER_SIZE?v.MAX_BUFFER_SIZE:a},i.prototype.fillViewportRows=function(t){if(this.lines.length===0){t===void 0&&(t=g.DEFAULT_ATTR_DATA);for(var a=this._rows;a--;)this.lines.push(this.getBlankLine(t))}},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(t,a){var c=this.getNullCell(g.DEFAULT_ATTR_DATA),d=this._getCorrectBufferLength(a);if(d>this.lines.maxLength&&(this.lines.maxLength=d),this.lines.length>0){if(this._cols<t)for(var f=0;f<this.lines.length;f++)this.lines.get(f).resize(t,c);var h=0;if(this._rows<a)for(var u=this._rows;u<a;u++)this.lines.length<a+this.ybase&&(this._optionsService.options.windowsMode?this.lines.push(new g.BufferLine(t,c)):this.ybase>0&&this.lines.length<=this.ybase+this.y+h+1?(this.ybase--,h++,this.ydisp>0&&this.ydisp--):this.lines.push(new g.BufferLine(t,c)));else for(u=this._rows;u>a;u--)this.lines.length>a+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(d<this.lines.maxLength){var E=this.lines.length-d;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=d}this.x=Math.min(this.x,t-1),this.y=Math.min(this.y,a-1),h&&(this.y+=h),this.savedX=Math.min(this.savedX,t-1),this.scrollTop=0}if(this.scrollBottom=a-1,this._isReflowEnabled&&(this._reflow(t,a),this._cols>t))for(f=0;f<this.lines.length;f++)this.lines.get(f).resize(t,c);this._cols=t,this._rows=a},Object.defineProperty(i.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.options.windowsMode},enumerable:!1,configurable:!0}),i.prototype._reflow=function(t,a){this._cols!==t&&(t>this._cols?this._reflowLarger(t,a):this._reflowSmaller(t,a))},i.prototype._reflowLarger=function(t,a){var c=p.reflowLargerGetLinesToRemove(this.lines,this._cols,t,this.ybase+this.y,this.getNullCell(g.DEFAULT_ATTR_DATA));if(c.length>0){var d=p.reflowLargerCreateNewLayout(this.lines,c);p.reflowLargerApplyNewLayout(this.lines,d.layout),this._reflowLargerAdjustViewport(t,a,d.countRemoved)}},i.prototype._reflowLargerAdjustViewport=function(t,a,c){for(var d=this.getNullCell(g.DEFAULT_ATTR_DATA),f=c;f-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<a&&this.lines.push(new g.BufferLine(t,d))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-c,0)},i.prototype._reflowSmaller=function(t,a){for(var c=this.getNullCell(g.DEFAULT_ATTR_DATA),d=[],f=0,h=this.lines.length-1;h>=0;h--){var u=this.lines.get(h);if(!(!u||!u.isWrapped&&u.getTrimmedLength()<=t)){for(var E=[u];u.isWrapped&&h>0;)u=this.lines.get(--h),E.unshift(u);var x=this.ybase+this.y;if(!(x>=h&&x<h+E.length)){var O=E[E.length-1].getTrimmedLength(),C=p.reflowSmallerGetNewLineLengths(E,this._cols,t),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=[],D=0;D<w;D++){var M=this.getBlankLine(g.DEFAULT_ATTR_DATA,!0);A.push(M)}A.length>0&&(d.push({start:h+E.length+f,newLines:A}),f+=A.length),E.push.apply(E,A);var N=C.length-1,P=C[N];P===0&&(P=C[--N]);for(var z=E.length-w-1,X=O;z>=0;){var k=Math.min(X,P);if(E[N].copyCellsFrom(E[z],X-k,P-k,k,!0),(P-=k)===0&&(P=C[--N]),(X-=k)===0){z--;var F=Math.max(z,0);X=p.getWrappedLineTrimmedLength(E,F,this._cols)}}for(D=0;D<E.length;D++)C[D]<t&&E[D].setCell(C[D],c);for(var U=w-S;U-- >0;)this.ybase===0?this.y<a-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+f)-a&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+w,this.ybase+a-1)}}}if(d.length>0){var L=[],B=[];for(D=0;D<this.lines.length;D++)B.push(this.lines.get(D));var Z=this.lines.length,re=Z-1,he=0,Ce=d[he];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+f);var ke=0;for(D=Math.min(this.lines.maxLength-1,Z+f-1);D>=0;D--)if(Ce&&Ce.start>re+ke){for(var te=Ce.newLines.length-1;te>=0;te--)this.lines.set(D--,Ce.newLines[te]);D++,L.push({index:re+1,amount:Ce.newLines.length}),ke+=Ce.newLines.length,Ce=d[++he]}else this.lines.set(D,B[re--]);var Re=0;for(D=L.length-1;D>=0;D--)L[D].index+=Re,this.lines.onInsertEmitter.fire(L[D]),Re+=L[D].amount;var Te=Math.max(0,Z+f-this.lines.maxLength);Te>0&&this.lines.onTrimEmitter.fire(Te)}},i.prototype.stringIndexToBufferIndex=function(t,a,c){for(c===void 0&&(c=!1);a;){var d=this.lines.get(t);if(!d)return[-1,-1];for(var f=c?d.getTrimmedLength():d.length,h=0;h<f;++h)if(d.get(h)[_.CHAR_DATA_WIDTH_INDEX]&&(a-=d.get(h)[_.CHAR_DATA_CHAR_INDEX].length||1),a<0)return[t,h];t++}return[t,0]},i.prototype.translateBufferLineToString=function(t,a,c,d){c===void 0&&(c=0);var f=this.lines.get(t);return f?f.translateToString(a,c,d):""},i.prototype.getWrappedRangeForLine=function(t){for(var a=t,c=t;a>0&&this.lines.get(a).isWrapped;)a--;for(;c+1<this.lines.length&&this.lines.get(c+1).isWrapped;)c++;return{first:a,last:c}},i.prototype.setupTabStops=function(t){for(t!=null?this.tabs[t]||(t=this.prevStop(t)):(this.tabs={},t=0);t<this._cols;t+=this._optionsService.options.tabStopWidth)this.tabs[t]=!0},i.prototype.prevStop=function(t){for(t==null&&(t=this.x);!this.tabs[--t]&&t>0;);return t>=this._cols?this._cols-1:t<0?0:t},i.prototype.nextStop=function(t){for(t==null&&(t=this.x);!this.tabs[++t]&&t<this._cols;);return t>=this._cols?this._cols-1:t<0?0:t},i.prototype.addMarker=function(t){var a=this,c=new e.Marker(t);return this.markers.push(c),c.register(this.lines.onTrim(function(d){c.line-=d,c.line<0&&c.dispose()})),c.register(this.lines.onInsert(function(d){c.line>=d.index&&(c.line+=d.amount)})),c.register(this.lines.onDelete(function(d){c.line>=d.index&&c.line<d.index+d.amount&&c.dispose(),c.line>d.index&&(c.line-=d.amount)})),c.register(c.onDispose(function(){return a._removeMarker(c)})),c},i.prototype._removeMarker=function(t){this.markers.splice(this.markers.indexOf(t),1)},i.prototype.iterator=function(t,a,c,d,f){return new r(this,t,a,c,d,f)},i}();v.Buffer=l;var r=function(){function i(t,a,c,d,f,h){c===void 0&&(c=0),d===void 0&&(d=t.lines.length),f===void 0&&(f=0),h===void 0&&(h=0),this._buffer=t,this._trimRight=a,this._startIndex=c,this._endIndex=d,this._startOverscan=f,this._endOverscan=h,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 t=this._buffer.getWrappedRangeForLine(this._current);t.first<this._startIndex-this._startOverscan&&(t.first=this._startIndex-this._startOverscan),t.last>this._endIndex+this._endOverscan&&(t.last=this._endIndex+this._endOverscan),t.first=Math.max(t.first,0),t.last=Math.min(t.last,this._buffer.lines.length);for(var a="",c=t.first;c<=t.last;++c)a+=this._buffer.translateBufferLineToString(c,this._trimRight);return this._current=t.last+1,{range:t,content:a}},i}();v.BufferStringIterator=r},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.CircularList=void 0;var y=T(0),g=function(){function s(_){this._maxLength=_,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(s.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"maxLength",{get:function(){return this._maxLength},set:function(_){if(this._maxLength!==_){for(var p=new Array(_),e=0;e<Math.min(_,this.length);e++)p[e]=this._array[this._getCyclicIndex(e)];this._array=p,this._maxLength=_,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"length",{get:function(){return this._length},set:function(_){if(_>this._length)for(var p=this._length;p<_;p++)this._array[p]=void 0;this._length=_},enumerable:!1,configurable:!0}),s.prototype.get=function(_){return this._array[this._getCyclicIndex(_)]},s.prototype.set=function(_,p){this._array[this._getCyclicIndex(_)]=p},s.prototype.push=function(_){this._array[this._getCyclicIndex(this._length)]=_,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++},s.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(s.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),s.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},s.prototype.splice=function(_,p){for(var e=[],o=2;o<arguments.length;o++)e[o-2]=arguments[o];if(p){for(var n=_;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>=_;n--)this._array[this._getCyclicIndex(n+e.length)]=this._array[this._getCyclicIndex(n)];for(n=0;n<e.length;n++)this._array[this._getCyclicIndex(_+n)]=e[n];if(this._length+e.length>this._maxLength){var l=this._length+e.length-this._maxLength;this._startIndex+=l,this._length=this._maxLength,this.onTrimEmitter.fire(l)}else this._length+=e.length},s.prototype.trimStart=function(_){_>this._length&&(_=this._length),this._startIndex+=_,this._length-=_,this.onTrimEmitter.fire(_)},s.prototype.shiftElements=function(_,p,e){if(!(p<=0)){if(_<0||_>=this._length)throw new Error("start argument out of range");if(_+e<0)throw new Error("Cannot shift elements in list beyond index 0");if(e>0){for(var o=p-1;o>=0;o--)this.set(_+o+e,this.get(_+o));var n=_+p+e-this._length;if(n>0)for(this._length+=n;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(o=0;o<p;o++)this.set(_+o+e,this.get(_+o))}},s.prototype._getCyclicIndex=function(_){return(this._startIndex+_)%this._maxLength},s}();v.CircularList=g},function(I,v,T){"use strict";function y(g,s,_){if(s===g.length-1)return g[s].getTrimmedLength();var p=!g[s].hasContent(_-1)&&g[s].getWidth(_-1)===1,e=g[s+1].getWidth(0)===2;return p&&e?_-1:_}Object.defineProperty(v,"__esModule",{value:!0}),v.getWrappedLineTrimmedLength=v.reflowSmallerGetNewLineLengths=v.reflowLargerApplyNewLayout=v.reflowLargerCreateNewLayout=v.reflowLargerGetLinesToRemove=void 0,v.reflowLargerGetLinesToRemove=function(g,s,_,p,e){for(var o=[],n=0;n<g.length-1;n++){var l=n,r=g.get(++l);if(r.isWrapped){for(var i=[g.get(n)];l<g.length&&r.isWrapped;)i.push(r),r=g.get(++l);if(p>=n&&p<l)n+=i.length-1;else{for(var t=0,a=y(i,t,s),c=1,d=0;c<i.length;){var f=y(i,c,s),h=f-d,u=_-a,E=Math.min(h,u);i[t].copyCellsFrom(i[c],d,a,E,!1),(a+=E)===_&&(t++,a=0),(d+=E)===f&&(c++,d=0),a===0&&t!==0&&i[t-1].getWidth(_-1)===2&&(i[t].copyCellsFrom(i[t-1],_-1,a++,1,!1),i[t-1].setCell(_-1,e))}i[t].replaceCells(a,_,e);for(var x=0,O=i.length-1;O>0&&(O>t||i[O].getTrimmedLength()===0);O--)x++;x>0&&(o.push(n+i.length-x),o.push(x)),n+=i.length-1}}}return o},v.reflowLargerCreateNewLayout=function(g,s){for(var _=[],p=0,e=s[p],o=0,n=0;n<g.length;n++)if(e===n){var l=s[++p];g.onDeleteEmitter.fire({index:n-o,amount:l}),n+=l-1,o+=l,e=s[++p]}else _.push(n);return{layout:_,countRemoved:o}},v.reflowLargerApplyNewLayout=function(g,s){for(var _=[],p=0;p<s.length;p++)_.push(g.get(s[p]));for(p=0;p<_.length;p++)g.set(p,_[p]);g.length=s.length},v.reflowSmallerGetNewLineLengths=function(g,s,_){for(var p=[],e=g.map(function(a,c){return y(g,c,s)}).reduce(function(a,c){return a+c}),o=0,n=0,l=0;l<e;){if(e-l<_){p.push(e-l);break}o+=_;var r=y(g,n,s);o>r&&(o-=r,n++);var i=g[n].getWidth(o-1)===2;i&&o--;var t=i?_-1:_;p.push(t),l+=t}return p},v.getWrappedLineTrimmedLength=y},function(I,v,T){"use strict";var y,g=this&&this.__extends||(y=function(p,e){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var l in n)n.hasOwnProperty(l)&&(o[l]=n[l])})(p,e)},function(p,e){function o(){this.constructor=p}y(p,e),p.prototype=e===null?Object.create(e):(o.prototype=e.prototype,new o)});Object.defineProperty(v,"__esModule",{value:!0}),v.Marker=void 0;var s=T(0),_=function(p){function e(o){var n=p.call(this)||this;return n.line=o,n._id=e._nextId++,n.isDisposed=!1,n._onDispose=new s.EventEmitter,n}return g(e,p),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire())},e._nextId=1,e}(T(2).Disposable);v.Marker=_},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.OptionsService=v.DEFAULT_OPTIONS=v.DEFAULT_BELL_SOUND=void 0;var y=T(0),g=T(11),s=T(33);v.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",v.DEFAULT_OPTIONS=Object.freeze({cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,bellSound:v.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:g.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",convertEol:!1,termName:"xterm",cancelEvents:!1});var _=["cols","rows"],p=function(){function e(o){this._onOptionChange=new y.EventEmitter,this.options=s.clone(v.DEFAULT_OPTIONS);for(var n=0,l=Object.keys(o);n<l.length;n++){var r=l[n];if(r in this.options){var i=o[r];this.options[r]=i}}}return Object.defineProperty(e.prototype,"onOptionChange",{get:function(){return this._onOptionChange.event},enumerable:!1,configurable:!0}),e.prototype.setOption=function(o,n){if(!(o in v.DEFAULT_OPTIONS))throw new Error('No option with key "'+o+'"');if(_.indexOf(o)!==-1)throw new Error('Option "'+o+'" can only be set in the constructor');this.options[o]!==n&&(n=this._sanitizeAndValidateOption(o,n),this.options[o]!==n&&(this.options[o]=n,this._onOptionChange.fire(o)))},e.prototype._sanitizeAndValidateOption=function(o,n){switch(o){case"bellStyle":case"cursorStyle":case"fontWeight":case"fontWeightBold":case"rendererType":case"wordSeparator":n||(n=v.DEFAULT_OPTIONS[o]);break;case"cursorWidth":n=Math.floor(n);case"lineHeight":case"tabStopWidth":if(n<1)throw new Error(o+" 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(o+" cannot be less than 0, value: "+n);break;case"fastScrollSensitivity":case"scrollSensitivity":if(n<=0)throw new Error(o+" cannot be less than or equal to 0, value: "+n)}return n},e.prototype.getOption=function(o){if(!(o in v.DEFAULT_OPTIONS))throw new Error('No option with key "'+o+'"');return this.options[o]},e}();v.OptionsService=p},function(I,v,T){"use strict";var y,g=this&&this.__extends||(y=function(t,a){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)d.hasOwnProperty(f)&&(c[f]=d[f])})(t,a)},function(t,a){function c(){this.constructor=t}y(t,a),t.prototype=a===null?Object.create(a):(c.prototype=a.prototype,new c)}),s=this&&this.__decorate||function(t,a,c,d){var f,h=arguments.length,u=h<3?a:d===null?d=Object.getOwnPropertyDescriptor(a,c):d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(t,a,c,d);else for(var E=t.length-1;E>=0;E--)(f=t[E])&&(u=(h<3?f(u):h>3?f(a,c,u):f(a,c))||u);return h>3&&u&&Object.defineProperty(a,c,u),u},_=this&&this.__param||function(t,a){return function(c,d){a(c,d,t)}};Object.defineProperty(v,"__esModule",{value:!0}),v.CoreService=void 0;var p=T(1),e=T(0),o=T(33),n=T(2),l=Object.freeze({insertMode:!1}),r=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),i=function(t){function a(c,d,f,h){var u=t.call(this)||this;return u._bufferService=d,u._logService=f,u._optionsService=h,u.isCursorInitialized=!1,u.isCursorHidden=!1,u._onData=u.register(new e.EventEmitter),u._onUserInput=u.register(new e.EventEmitter),u._onBinary=u.register(new e.EventEmitter),u._scrollToBottom=c,u.register({dispose:function(){return u._scrollToBottom=void 0}}),u.modes=o.clone(l),u.decPrivateModes=o.clone(r),u}return g(a,t),Object.defineProperty(a.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),a.prototype.reset=function(){this.modes=o.clone(l),this.decPrivateModes=o.clone(r)},a.prototype.triggerDataEvent=function(c,d){if(d===void 0&&(d=!1),!this._optionsService.options.disableStdin){var f=this._bufferService.buffer;f.ybase!==f.ydisp&&this._scrollToBottom(),d&&this._onUserInput.fire(),this._logService.debug('sending data "'+c+'"',function(){return c.split("").map(function(h){return h.charCodeAt(0)})}),this._onData.fire(c)}},a.prototype.triggerBinaryEvent=function(c){this._optionsService.options.disableStdin||(this._logService.debug('sending binary "'+c+'"',function(){return c.split("").map(function(d){return d.charCodeAt(0)})}),this._onBinary.fire(c))},a=s([_(1,p.IBufferService),_(2,p.ILogService),_(3,p.IOptionsService)],a)}(n.Disposable);v.CoreService=i},function(I,v,T){"use strict";var y=this&&this.__decorate||function(r,i,t,a){var c,d=arguments.length,f=d<3?i:a===null?a=Object.getOwnPropertyDescriptor(i,t):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(r,i,t,a);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(f=(d<3?c(f):d>3?c(i,t,f):c(i,t))||f);return d>3&&f&&Object.defineProperty(i,t,f),f},g=this&&this.__param||function(r,i){return function(t,a){i(t,a,r)}};Object.defineProperty(v,"__esModule",{value:!0}),v.CoreMouseService=void 0;var s=T(1),_=T(0),p={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(r){return r.button!==4&&r.action===1&&(r.ctrl=!1,r.alt=!1,r.shift=!1,!0)}},VT200:{events:19,restrict:function(r){return r.action!==32}},DRAG:{events:23,restrict:function(r){return r.action!==32||r.button!==3}},ANY:{events:31,restrict:function(r){return!0}}};function e(r,i){var t=(r.ctrl?16:0)|(r.shift?4:0)|(r.alt?8:0);return r.button===4?(t|=64,t|=r.action):(t|=3&r.button,4&r.button&&(t|=64),8&r.button&&(t|=128),r.action===32?t|=32:r.action!==0||i||(t|=3)),t}var o=String.fromCharCode,n={DEFAULT:function(r){var i=[e(r,!1)+32,r.col+32,r.row+32];return i[0]>255||i[1]>255||i[2]>255?"":"[M"+o(i[0])+o(i[1])+o(i[2])},SGR:function(r){var i=r.action===0&&r.button!==4?"m":"M";return"[<"+e(r,!0)+";"+r.col+";"+r.row+i}},l=function(){function r(i,t){this._bufferService=i,this._coreService=t,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new _.EventEmitter,this._lastEvent=null;for(var a=0,c=Object.keys(p);a<c.length;a++){var d=c[a];this.addProtocol(d,p[d])}for(var f=0,h=Object.keys(n);f<h.length;f++){var u=h[f];this.addEncoding(u,n[u])}this.reset()}return r.prototype.addProtocol=function(i,t){this._protocols[i]=t},r.prototype.addEncoding=function(i,t){this._encodings[i]=t},Object.defineProperty(r.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(r.prototype,"areMouseEventsActive",{get:function(){return this._protocols[this._activeProtocol].events!==0},enumerable:!1,configurable:!0}),Object.defineProperty(r.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}),r.prototype.reset=function(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null},Object.defineProperty(r.prototype,"onProtocolChange",{get:function(){return this._onProtocolChange.event},enumerable:!1,configurable:!0}),r.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 t=this._encodings[this._activeEncoding](i);return t&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=i,!0},r.prototype.explainEvents=function(i){return{down:!!(1&i),up:!!(2&i),drag:!!(4&i),move:!!(8&i),wheel:!!(16&i)}},r.prototype._compareEvents=function(i,t){return i.col===t.col&&(i.row===t.row&&(i.button===t.button&&(i.action===t.action&&(i.ctrl===t.ctrl&&i.alt===t.alt))))&&i.shift===t.shift},r=y([g(0,s.IBufferService),g(1,s.ICoreService)],r)}();v.CoreMouseService=l},function(I,v,T){"use strict";var y=this&&this.__decorate||function(p,e,o,n){var l,r=arguments.length,i=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(p,e,o,n);else for(var t=p.length-1;t>=0;t--)(l=p[t])&&(i=(r<3?l(i):r>3?l(e,o,i):l(e,o))||i);return r>3&&i&&Object.defineProperty(e,o,i),i},g=this&&this.__param||function(p,e){return function(o,n){e(o,n,p)}};Object.defineProperty(v,"__esModule",{value:!0}),v.DirtyRowService=void 0;var s=T(1),_=function(){function p(e){this._bufferService=e,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(e){e<this._start?this._start=e:e>this._end&&(this._end=e)},p.prototype.markRangeDirty=function(e,o){if(e>o){var n=e;e=o,o=n}e<this._start&&(this._start=e),o>this._end&&(this._end=o)},p.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},p=y([g(0,s.IBufferService)],p)}();v.DirtyRowService=_},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.UnicodeService=void 0;var y=T(0),g=T(79),s=function(){function _(){this._providers=Object.create(null),this._active="",this._onChange=new y.EventEmitter;var p=new g.UnicodeV6;this.register(p),this._active=p.version,this._activeProvider=p}return Object.defineProperty(_.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(_.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}),_.prototype.register=function(p){this._providers[p.version]=p},_.prototype.wcwidth=function(p){return this._activeProvider.wcwidth(p)},_.prototype.getStringCellWidth=function(p){for(var e=0,o=p.length,n=0;n<o;++n){var l=p.charCodeAt(n);if(55296<=l&&l<=56319){if(++n>=o)return e+this.wcwidth(l);var r=p.charCodeAt(n);56320<=r&&r<=57343?l=1024*(l-55296)+r-56320+65536:e+=this.wcwidth(r)}e+=this.wcwidth(l)}return e},_}();v.UnicodeService=s},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.UnicodeV6=void 0;var y,g=T(15),s=[[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]],_=[[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 e(){if(this.version="6",!y){y=new Uint8Array(65536),g.fill(y,1),y[0]=0,g.fill(y,0,1,32),g.fill(y,0,127,160),g.fill(y,2,4352,4448),y[9001]=2,y[9002]=2,g.fill(y,2,11904,42192),y[12351]=1,g.fill(y,2,44032,55204),g.fill(y,2,63744,64256),g.fill(y,2,65040,65050),g.fill(y,2,65072,65136),g.fill(y,2,65280,65377),g.fill(y,2,65504,65511);for(var o=0;o<s.length;++o)g.fill(y,0,s[o][0],s[o][1]+1)}}return e.prototype.wcwidth=function(o){return o<32?0:o<127?1:o<65536?y[o]:function(n,l){var r,i=0,t=l.length-1;if(n<l[0][0]||n>l[t][1])return!1;for(;t>=i;)if(n>l[r=i+t>>1][1])i=r+1;else{if(!(n<l[r][0]))return!0;t=r-1}return!1}(o,_)?0:o>=131072&&o<=196605||o>=196608&&o<=262141?2:1},e}();v.UnicodeV6=p},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.CharsetService=void 0;var y=function(){function g(){this.glevel=0,this._charsets=[]}return g.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},g.prototype.setgLevel=function(s){this.glevel=s,this.charset=this._charsets[s]},g.prototype.setgCharset=function(s,_){this._charsets[s]=_,this.glevel===s&&(this.charset=_)},g}();v.CharsetService=y},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.updateWindowsModeWrappedState=void 0;var y=T(3);v.updateWindowsModeWrappedState=function(g){var s=g.buffer.lines.get(g.buffer.ybase+g.buffer.y-1),_=s==null?void 0:s.get(g.cols-1),p=g.buffer.lines.get(g.buffer.ybase+g.buffer.y);p&&_&&(p.isWrapped=_[y.CHAR_DATA_CODE_INDEX]!==y.NULL_CELL_CODE&&_[y.CHAR_DATA_CODE_INDEX]!==y.WHITESPACE_CELL_CODE)}},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.WriteBuffer=void 0;var y=function(){function g(s){this._action=s,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0}return g.prototype.writeSync=function(s){if(this._writeBuffer.length){for(var _=this._bufferOffset;_<this._writeBuffer.length;++_){var p=this._writeBuffer[_],e=this._callbacks[_];this._action(p),e&&e()}this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=2147483647}this._action(s)},g.prototype.write=function(s,_){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+=s.length,this._writeBuffer.push(s),this._callbacks.push(_)},g.prototype._innerWrite=function(){for(var s=this,_=Date.now();this._writeBuffer.length>this._bufferOffset;){var p=this._writeBuffer[this._bufferOffset],e=this._callbacks[this._bufferOffset];if(this._bufferOffset++,this._action(p),this._pendingData-=p.length,e&&e(),Date.now()-_>=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 s._innerWrite()},0)):(this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0)},g}();v.WriteBuffer=y},function(I,v,T){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.AddonManager=void 0;var y=function(){function g(){this._addons=[]}return g.prototype.dispose=function(){for(var s=this._addons.length-1;s>=0;s--)this._addons[s].instance.dispose()},g.prototype.loadAddon=function(s,_){var p=this,e={instance:_,dispose:_.dispose,isDisposed:!1};this._addons.push(e),_.dispose=function(){return p._wrappedAddonDispose(e)},_.activate(s)},g.prototype._wrappedAddonDispose=function(s){if(!s.isDisposed){for(var _=-1,p=0;p<this._addons.length;p++)if(this._addons[p]===s){_=p;break}if(_===-1)throw new Error("Could not dispose an addon that has not been loaded");s.isDisposed=!0,s.dispose.apply(s.instance),this._addons.splice(_,1)}},g}();v.AddonManager=y}])})},"/cxE":function(j,H,b){"use strict";b.d(H,"f",function(){return T}),b.d(H,"g",function(){return y}),b.d(H,"h",function(){return g}),b.d(H,"e",function(){return _}),b.d(H,"b",function(){return p}),b.d(H,"c",function(){return e}),b.d(H,"d",function(){return o}),b.d(H,"a",function(){return n});class I{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(l){setTimeout(()=>{throw l.stack?new Error(l.message+`
|
|
|
|
|
|
`+l.stack):l},0)}}emit(l){this.listeners.forEach(r=>{r(l)})}onUnexpectedError(l){this.unexpectedErrorHandler(l),this.emit(l)}onUnexpectedExternalError(l){this.unexpectedErrorHandler(l)}}const v=new I;function T(l){_(l)||v.onUnexpectedError(l);return}function y(l){_(l)||v.onUnexpectedExternalError(l);return}function g(l){if(l instanceof Error){let{name:r,message:i}=l;const t=l.stacktrace||l.stack;return{$isError:!0,name:r,message:i,stack:t}}return l}const s="Canceled";function _(l){return l instanceof Error&&l.name===s&&l.message===s}function p(){const l=new Error(s);return l.name=l.message,l}function e(l){return l?new Error(`Illegal argument: ${l}`):new Error("Illegal argument")}function o(l){return l?new Error(`Illegal state: ${l}`):new Error("Illegal state")}class n extends Error{constructor(l){super("NotSupported");l&&(this.message=l)}}},"/omn":function(j,H,b){},"0/SM":function(j,H,b){j.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(j,H,b){j.exports={ldsRing:"ldsRing___2F8W7",idsRingWrapper:"idsRingWrapper___fC2cF",ldsring:"ldsring___3A88y"}},"0i5U":function(j,H){j.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(j,H,b){(function(I){I(b("VrN/"))})(function(I){I.defineOption("placeholder","",function(p,e,o){var n=o&&o!=I.Init;if(e&&!n)p.on("blur",g),p.on("change",s),p.on("swapDoc",s),I.on(p.getInputField(),"compositionupdate",p.state.placeholderCompose=function(){y(p)}),s(p);else if(!e&&n){p.off("blur",g),p.off("change",s),p.off("swapDoc",s),I.off(p.getInputField(),"compositionupdate",p.state.placeholderCompose),v(p);var l=p.getWrapperElement();l.className=l.className.replace(" CodeMirror-empty","")}e&&!p.hasFocus()&&g(p)});function v(p){p.state.placeholder&&(p.state.placeholder.parentNode.removeChild(p.state.placeholder),p.state.placeholder=null)}function T(p){v(p);var e=p.state.placeholder=document.createElement("pre");e.style.cssText="height: 0; overflow: visible",e.style.direction=p.getOption("direction"),e.className="CodeMirror-placeholder CodeMirror-line-like";var o=p.getOption("placeholder");typeof o=="string"&&(o=document.createTextNode(o)),e.appendChild(o),p.display.lineSpace.insertBefore(e,p.display.lineSpace.firstChild)}function y(p){setTimeout(function(){var e=!1,o=p.getInputField();o.nodeName=="TEXTAREA"?e=!o.value:p.lineCount()==1&&(e=!/[^\u200b]/.test(o.querySelector(".CodeMirror-line").textContent)),e?T(p):v(p)},20)}function g(p){_(p)&&T(p)}function s(p){var e=p.getWrapperElement(),o=_(p);e.className=e.className.replace(" CodeMirror-empty","")+(o?" CodeMirror-empty":""),o?T(p):v(p)}function _(p){return p.lineCount()===1&&p.getLine(0)===""}})},"1A8V":function(j,H,b){},"1Zrr":function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAgCAYAAAB6kdqOAAABZ0lEQVRYR+2YrU7FQBBGzzwEPAMSi+M6MARDggNJgiIkWLiSBIFCkyCuQECCQFIcEstb8AYf2ZvmhpbuT9ttUpJWdma+OZ3O7k5rRC5Jh8ARsBPzjdhvgXczew75WSyJpCdgP+aXaP8ws63OQJK2gbdSYJ6Y1Od2WRpmZlb4nIIVqgEFhUKwbXTGByRpDzgBdnu+kr7hD8CLSboGLvqqZYp/dEDK1LR9mZZNXwEys6u+ql3iJbm8E5C3eFOFYn2VrUKS1oADYL1M+gW8mtl3DOK3PQuQpE1gAWzUkn8CZ6Hzqg6bC+gcuPFU4s7MTlOrlAvITQFuGijMbOaSS/pzLwXKB+QdCQKiXqAUkJqP06rs1B00liFNFeqqVQEaXYXmbc6ypn7J3UNtgUa3ysa1D5XLfDw7dedl1BCYZWOcgHJWIKb1f15Z7EkGtq+G/NXEP3DCFPl79xnkTln3u+U4JWJAH/czo/gBVkc5pun3NGoAAAAASUVORK5CYII="},"1dTM":function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;var I=b("GQ8N"),v=S(b("Lo0S")),T=b("VSMT"),y=b("GdRQ"),g=b("SZEN"),s=b("vewr"),_=C(b("YJ9k")),p=C(b("MZdM")),e=C(b("ItS6")),o=C(b("whVF")),n=C(b("Fv0C")),l=C(b("LCi9")),r=C(b("rwxt")),i=C(b("Mmt2")),t=C(b("iUHT")),a=C(b("mHUz")),c=C(b("P2ho")),d=b("NBmB");b("mdZa");var f=C(b("34/K")),h=C(b("hXwI")),u=C(b("SgaC")),E=C(b("3690")),x=C(b("8K/p")),O=C(b("xO64"));function C(oe){return oe&&oe.__esModule?oe:{default:oe}}function w(){if(typeof WeakMap!="function")return null;var oe=new WeakMap;return w=function(){return oe},oe}function S(oe){if(oe&&oe.__esModule)return oe;if(oe===null||A(oe)!=="object"&&typeof oe!="function")return{default:oe};var le=w();if(le&&le.has(oe))return le.get(oe);var Ee={},Le=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var ge in oe)if(Object.prototype.hasOwnProperty.call(oe,ge)){var De=Le?Object.getOwnPropertyDescriptor(oe,ge):null;De&&(De.get||De.set)?Object.defineProperty(Ee,ge,De):Ee[ge]=oe[ge]}return Ee.default=oe,le&&le.set(oe,Ee),Ee}function A(oe){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?A=function(Ee){return typeof Ee}:A=function(Ee){return Ee&&typeof Symbol=="function"&&Ee.constructor===Symbol&&Ee!==Symbol.prototype?"symbol":typeof Ee},A(oe)}function D(oe,le){if(!(oe instanceof le))throw new TypeError("Cannot call a class as a function")}function M(oe,le){for(var Ee=0;Ee<le.length;Ee++){var Le=le[Ee];Le.enumerable=Le.enumerable||!1,Le.configurable=!0,"value"in Le&&(Le.writable=!0),Object.defineProperty(oe,Le.key,Le)}}function N(oe,le,Ee){return le&&M(oe.prototype,le),Ee&&M(oe,Ee),oe}function P(oe,le){if(typeof le!="function"&&le!==null)throw new TypeError("Super expression must either be null or a function");oe.prototype=Object.create(le&&le.prototype,{constructor:{value:oe,writable:!0,configurable:!0}}),le&&z(oe,le)}function z(oe,le){return z=Object.setPrototypeOf||function(Le,ge){return Le.__proto__=ge,Le},z(oe,le)}function X(oe){var le=U();return function(){var Le=L(oe),ge;if(le){var De=L(this).constructor;ge=Reflect.construct(Le,arguments,De)}else ge=Le.apply(this,arguments);return k(this,ge)}}function k(oe,le){return le&&(A(le)==="object"||typeof le=="function")?le:F(oe)}function F(oe){if(oe===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return oe}function U(){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(oe){return!1}}function L(oe){return L=Object.setPrototypeOf?Object.getPrototypeOf:function(Ee){return Ee.__proto__||Object.getPrototypeOf(Ee)},L(oe)}var B=3,Z="rgb(40, 40, 40)",re=17,he=50,Ce=19,ke=75,te=50,Re=1e3,Te=50,pe=1,me=1<<1,se=1<<2,be=1<<3,ae=1<<4,fe=1<<24,Fe=1<<25,ie=1<<26,q=1<<27,Q=1<<28,Y=function(oe){P(Ee,oe);var le=X(Ee);function Ee(Le,ge,De){var _e;if(D(this,Ee),!Le)throw new Error("Must specify target");if(!ge)throw new Error("Must specify URL");_e=le.call(this),_e._target=Le,_e._url=ge,De=De||{},_e._rfbCredentials=De.credentials||{},_e._shared="shared"in De?!!De.shared:!0,_e._repeaterID=De.repeaterID||"",_e._wsProtocols=De.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(F(_e)),windowResize:_e._windowResize.bind(F(_e)),handleMouse:_e._handleMouse.bind(F(_e)),handleWheel:_e._handleWheel.bind(F(_e)),handleGesture:_e._handleGesture.bind(F(_e))},v.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=Z,_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 r.default,_e._cursorImage=Ee.cursors.none,_e._decoders[d.encodings.encodingRaw]=new f.default,_e._decoders[d.encodings.encodingCopyRect]=new h.default,_e._decoders[d.encodings.encodingRRE]=new u.default,_e._decoders[d.encodings.encodingHextile]=new E.default,_e._decoders[d.encodings.encodingTight]=new x.default,_e._decoders[d.encodings.encodingTightPNG]=new O.default;try{_e._display=new p.default(_e._canvas)}catch(Xe){throw v.Error("Display exception: "+Xe),Xe}return _e._display.onflush=_e._onFlush.bind(F(_e)),_e._keyboard=new n.default(_e._canvas),_e._keyboard.onkeyevent=_e._handleKeyEvent.bind(F(_e)),_e._gestures=new l.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",v.Debug("Starting VNC handshake")):_e._fail("Unexpected server connection while "+_e._rfbConnectionState)}),_e._sock.on("close",function(Xe){v.Debug("WebSocket on-close event");var tt="";Xe.code&&(tt="(code: "+Xe.code,Xe.reason&&(tt+=", reason: "+Xe.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(Xe){return v.Warn("WebSocket on-error event")}),setTimeout(_e._updateConnectionState.bind(F(_e),"connecting")),v.Debug("<< RFB.constructor"),_e.dragViewport=!1,_e.focusOnClick=!0,_e._viewOnly=!1,_e._clipViewport=!1,_e._scaleViewport=!1,_e._resizeSession=!1,_e._showDotCursor=!1,De.showDotCursor!==void 0&&(v.Warn("Specifying showDotCursor as a RFB constructor argument is deprecated"),_e._showDotCursor=De.showDotCursor),_e._qualityLevel=6,_e._compressionLevel=2,_e}return N(Ee,[{key:"disconnect",value:function(){this._updateConnectionState("disconnecting"),this._sock.off("error"),this._sock.off("message"),this._sock.off("open")}},{key:"sendCredentials",value:function(ge){this._rfbCredentials=ge,setTimeout(this._initMsg.bind(this),0)}},{key:"sendCtrlAltDel",value:function(){if(this._rfbConnectionState!=="connected"||this._viewOnly)return;v.Info("Sending Ctrl-Alt-Del"),this.sendKey(a.default.XK_Control_L,"ControlLeft",!0),this.sendKey(a.default.XK_Alt_L,"AltLeft",!0),this.sendKey(a.default.XK_Delete,"Delete",!0),this.sendKey(a.default.XK_Delete,"Delete",!1),this.sendKey(a.default.XK_Alt_L,"AltLeft",!1),this.sendKey(a.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(ge,De,_e){if(this._rfbConnectionState!=="connected"||this._viewOnly)return;if(_e===void 0){this.sendKey(ge,De,!0),this.sendKey(ge,De,!1);return}var Xe=c.default[De];if(this._qemuExtKeyEventSupported&&Xe)ge=ge||0,v.Info("Sending key ("+(_e?"down":"up")+"): keysym "+ge+", scancode "+Xe),Ee.messages.QEMUExtendedKeyEvent(this._sock,ge,_e,Xe);else{if(!ge)return;v.Info("Sending keysym ("+(_e?"down":"up")+"): "+ge),Ee.messages.keyEvent(this._sock,ge,_e?1:0)}}},{key:"focus",value:function(){this._canvas.focus()}},{key:"blur",value:function(){this._canvas.blur()}},{key:"clipboardPasteFrom",value:function(ge){if(this._rfbConnectionState!=="connected"||this._viewOnly)return;if(this._clipboardServerCapabilitiesFormats[pe]&&this._clipboardServerCapabilitiesActions[q])this._clipboardText=ge,Ee.messages.extendedClipboardNotify(this._sock,[pe]);else{for(var De=new Uint8Array(ge.length),_e=0;_e<ge.length;_e++)De[_e]=ge.charCodeAt(_e);Ee.messages.clientCutText(this._sock,De)}}},{key:"_connect",value:function(){v.Debug(">> RFB.connect"),v.Info("connecting to "+this._url);try{this._sock.open(this._url,this._wsProtocols)}catch(ge){ge.name==="SyntaxError"?this._fail("Invalid host or port ("+ge+")"):this._fail("Error when opening socket ("+ge+")")}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),v.Debug("<< RFB.connect")}},{key:"_disconnect",value:function(){v.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(ge){if(!(ge.name==="NotFoundError"))throw ge}clearTimeout(this._resizeTimeout),clearTimeout(this._mouseMoveTimer),v.Debug("<< RFB.disconnect")}},{key:"_focusCanvas",value:function(ge){if(!this.focusOnClick)return;this.focus()}},{key:"_setDesktopName",value:function(ge){this._fbName=ge,this.dispatchEvent(new CustomEvent("desktopname",{detail:{name:this._fbName}}))}},{key:"_windowResize",value:function(ge){var De=this;window.requestAnimationFrame(function(){De._updateClip(),De._updateScale()}),this._resizeSession&&(clearTimeout(this._resizeTimeout),this._resizeTimeout=setTimeout(this._requestRemoteResize.bind(this),500))}},{key:"_updateClip",value:function(){var ge=this._display.clipViewport,De=this._clipViewport;if(this._scaleViewport&&(De=!1),ge!==De&&(this._display.clipViewport=De),De){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 ge=this._screenSize();this._display.autoscale(ge.w,ge.h)}this._fixScrollbars()}},{key:"_requestRemoteResize",value:function(){if(clearTimeout(this._resizeTimeout),this._resizeTimeout=null,!this._resizeSession||this._viewOnly||!this._supportsSetDesktopSize)return;var ge=this._screenSize();Ee.messages.setDesktopSize(this._sock,Math.floor(ge.w),Math.floor(ge.h),this._screenID,this._screenFlags),v.Debug("Requested new desktop size: "+ge.w+"x"+ge.h)}},{key:"_screenSize",value:function(){var ge=this._screen.getBoundingClientRect();return{w:ge.width,h:ge.height}}},{key:"_fixScrollbars",value:function(){var ge=this._screen.style.overflow;this._screen.style.overflow="hidden",this._screen.getBoundingClientRect(),this._screen.style.overflow=ge}},{key:"_updateConnectionState",value:function(ge){var De=this,_e=this._rfbConnectionState;if(ge===_e){v.Debug("Already in state '"+ge+"', ignoring");return}if(_e==="disconnected"){v.Error("Tried changing state of a disconnected RFB object");return}switch(ge){case"connected":if(_e!=="connecting"){v.Error("Bad transition to connected state, previous connection state: "+_e);return}break;case"disconnected":if(_e!=="disconnecting"){v.Error("Bad transition to disconnected state, previous connection state: "+_e);return}break;case"connecting":if(_e!==""){v.Error("Bad transition to connecting state, previous connection state: "+_e);return}break;case"disconnecting":if(_e!=="connected"&&_e!=="connecting"){v.Error("Bad transition to disconnecting state, previous connection state: "+_e);return}break;default:v.Error("Unknown connection state: "+ge);return}this._rfbConnectionState=ge,v.Debug("New state '"+ge+"', was '"+_e+"'."),this._disconnTimer&&ge!=="disconnecting"&&(v.Debug("Clearing disconnect timer"),clearTimeout(this._disconnTimer),this._disconnTimer=null,this._sock.off("close"));switch(ge){case"connecting":this._connect();break;case"connected":this.dispatchEvent(new CustomEvent("connect",{detail:{}}));break;case"disconnecting":this._disconnect(),this._disconnTimer=setTimeout(function(){v.Error("Disconnection timed out."),De._updateConnectionState("disconnected")},B*1e3);break;case"disconnected":this.dispatchEvent(new CustomEvent("disconnect",{detail:{clean:this._rfbCleanDisconnect}}));break}}},{key:"_fail",value:function(ge){switch(this._rfbConnectionState){case"disconnecting":v.Error("Failed when disconnecting: "+ge);break;case"connected":v.Error("Failed while connected: "+ge);break;case"connecting":v.Error("Failed when connecting: "+ge);break;default:v.Error("RFB failure: "+ge);break}return this._rfbCleanDisconnect=!1,this._updateConnectionState("disconnecting"),this._updateConnectionState("disconnected"),!1}},{key:"_setCapability",value:function(ge,De){this._capabilities[ge]=De,this.dispatchEvent(new CustomEvent("capabilities",{detail:{capabilities:this._capabilities}}))}},{key:"_handleMessage",value:function(){if(this._sock.rQlen===0){v.Warn("handleMessage called on an empty receive queue");return}switch(this._rfbConnectionState){case"disconnected":v.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(ge,De,_e){this.sendKey(ge,De,_e)}},{key:"_handleMouse",value:function(ge){if(ge.type==="click"&&ge.target!==this._canvas)return;if(ge.stopPropagation(),ge.preventDefault(),ge.type==="click"||ge.type==="contextmenu")return;var De=(0,g.clientToElement)(ge.clientX,ge.clientY,this._canvas);switch(ge.type){case"mousedown":(0,s.setCapture)(this._canvas),this._handleMouseButton(De.x,De.y,!0,1<<ge.button);break;case"mouseup":this._handleMouseButton(De.x,De.y,!1,1<<ge.button);break;case"mousemove":this._handleMouseMove(De.x,De.y);break}}},{key:"_handleMouseButton",value:function(ge,De,_e,Xe){if(this.dragViewport)if(_e&&!this._viewportDragging){this._viewportDragging=!0,this._viewportDragPos={x:ge,y:De},this._viewportHasMoved=!1;return}else{if(this._viewportDragging=!1,this._viewportHasMoved)return;this._sendMouse(ge,De,Xe)}this._mouseMoveTimer!==null&&(clearTimeout(this._mouseMoveTimer),this._mouseMoveTimer=null,this._sendMouse(ge,De,this._mouseButtonMask)),_e?this._mouseButtonMask|=Xe:this._mouseButtonMask&=~Xe,this._sendMouse(ge,De,this._mouseButtonMask)}},{key:"_handleMouseMove",value:function(ge,De){var _e=this;if(this._viewportDragging){var Xe=this._viewportDragPos.x-ge,tt=this._viewportDragPos.y-De;(this._viewportHasMoved||Math.abs(Xe)>y.dragThreshold||Math.abs(tt)>y.dragThreshold)&&(this._viewportHasMoved=!0,this._viewportDragPos={x:ge,y:De},this._display.viewportChangePos(Xe,tt));return}if(this._mousePos={x:ge,y:De},this._mouseMoveTimer==null){var ze=Date.now()-this._mouseLastMoveTime;ze>re?(this._sendMouse(ge,De,this._mouseButtonMask),this._mouseLastMoveTime=Date.now()):this._mouseMoveTimer=setTimeout(function(){_e._handleDelayedMouseMove()},re-ze)}}},{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(ge,De,_e){if(this._rfbConnectionState!=="connected")return;if(this._viewOnly)return;Ee.messages.pointerEvent(this._sock,this._display.absX(ge),this._display.absY(De),_e)}},{key:"_handleWheel",value:function(ge){if(this._rfbConnectionState!=="connected")return;if(this._viewOnly)return;ge.stopPropagation(),ge.preventDefault();var De=(0,g.clientToElement)(ge.clientX,ge.clientY,this._canvas),_e=ge.deltaX,Xe=ge.deltaY;ge.deltaMode!==0&&(_e*=Ce,Xe*=Ce),this._accumulatedWheelDeltaX+=_e,this._accumulatedWheelDeltaY+=Xe,Math.abs(this._accumulatedWheelDeltaX)>=he&&(this._accumulatedWheelDeltaX<0?(this._handleMouseButton(De.x,De.y,!0,1<<5),this._handleMouseButton(De.x,De.y,!1,1<<5)):this._accumulatedWheelDeltaX>0&&(this._handleMouseButton(De.x,De.y,!0,1<<6),this._handleMouseButton(De.x,De.y,!1,1<<6)),this._accumulatedWheelDeltaX=0),Math.abs(this._accumulatedWheelDeltaY)>=he&&(this._accumulatedWheelDeltaY<0?(this._handleMouseButton(De.x,De.y,!0,1<<3),this._handleMouseButton(De.x,De.y,!1,1<<3)):this._accumulatedWheelDeltaY>0&&(this._handleMouseButton(De.x,De.y,!0,1<<4),this._handleMouseButton(De.x,De.y,!1,1<<4)),this._accumulatedWheelDeltaY=0)}},{key:"_fakeMouseMove",value:function(ge,De,_e){this._handleMouseMove(De,_e),this._cursor.move(ge.detail.clientX,ge.detail.clientY)}},{key:"_handleTapEvent",value:function(ge,De){var _e=(0,g.clientToElement)(ge.detail.clientX,ge.detail.clientY,this._canvas);if(this._gestureLastTapTime!==null&&Date.now()-this._gestureLastTapTime<Re&&this._gestureFirstDoubleTapEv.detail.type===ge.detail.type){var Xe=this._gestureFirstDoubleTapEv.detail.clientX-ge.detail.clientX,tt=this._gestureFirstDoubleTapEv.detail.clientY-ge.detail.clientY,ze=Math.hypot(Xe,tt);ze<Te?_e=(0,g.clientToElement)(this._gestureFirstDoubleTapEv.detail.clientX,this._gestureFirstDoubleTapEv.detail.clientY,this._canvas):this._gestureFirstDoubleTapEv=ge}else this._gestureFirstDoubleTapEv=ge;this._gestureLastTapTime=Date.now(),this._fakeMouseMove(this._gestureFirstDoubleTapEv,_e.x,_e.y),this._handleMouseButton(_e.x,_e.y,!0,De),this._handleMouseButton(_e.x,_e.y,!1,De)}},{key:"_handleGesture",value:function(ge){var De,_e=(0,g.clientToElement)(ge.detail.clientX,ge.detail.clientY,this._canvas);switch(ge.type){case"gesturestart":switch(ge.detail.type){case"onetap":this._handleTapEvent(ge,1);break;case"twotap":this._handleTapEvent(ge,4);break;case"threetap":this._handleTapEvent(ge,2);break;case"drag":this._fakeMouseMove(ge,_e.x,_e.y),this._handleMouseButton(_e.x,_e.y,!0,1);break;case"longpress":this._fakeMouseMove(ge,_e.x,_e.y),this._handleMouseButton(_e.x,_e.y,!0,4);break;case"twodrag":this._gestureLastMagnitudeX=ge.detail.magnitudeX,this._gestureLastMagnitudeY=ge.detail.magnitudeY,this._fakeMouseMove(ge,_e.x,_e.y);break;case"pinch":this._gestureLastMagnitudeX=Math.hypot(ge.detail.magnitudeX,ge.detail.magnitudeY),this._fakeMouseMove(ge,_e.x,_e.y);break}break;case"gesturemove":switch(ge.detail.type){case"onetap":case"twotap":case"threetap":break;case"drag":case"longpress":this._fakeMouseMove(ge,_e.x,_e.y);break;case"twodrag":for(this._fakeMouseMove(ge,_e.x,_e.y);ge.detail.magnitudeY-this._gestureLastMagnitudeY>te;)this._handleMouseButton(_e.x,_e.y,!0,8),this._handleMouseButton(_e.x,_e.y,!1,8),this._gestureLastMagnitudeY+=te;for(;ge.detail.magnitudeY-this._gestureLastMagnitudeY<-te;)this._handleMouseButton(_e.x,_e.y,!0,16),this._handleMouseButton(_e.x,_e.y,!1,16),this._gestureLastMagnitudeY-=te;for(;ge.detail.magnitudeX-this._gestureLastMagnitudeX>te;)this._handleMouseButton(_e.x,_e.y,!0,32),this._handleMouseButton(_e.x,_e.y,!1,32),this._gestureLastMagnitudeX+=te;for(;ge.detail.magnitudeX-this._gestureLastMagnitudeX<-te;)this._handleMouseButton(_e.x,_e.y,!0,64),this._handleMouseButton(_e.x,_e.y,!1,64),this._gestureLastMagnitudeX-=te;break;case"pinch":if(this._fakeMouseMove(ge,_e.x,_e.y),De=Math.hypot(ge.detail.magnitudeX,ge.detail.magnitudeY),Math.abs(De-this._gestureLastMagnitudeX)>ke){for(this._handleKeyEvent(a.default.XK_Control_L,"ControlLeft",!0);De-this._gestureLastMagnitudeX>ke;)this._handleMouseButton(_e.x,_e.y,!0,8),this._handleMouseButton(_e.x,_e.y,!1,8),this._gestureLastMagnitudeX+=ke;for(;De-this._gestureLastMagnitudeX<-ke;)this._handleMouseButton(_e.x,_e.y,!0,16),this._handleMouseButton(_e.x,_e.y,!1,16),this._gestureLastMagnitudeX-=ke}this._handleKeyEvent(a.default.XK_Control_L,"ControlLeft",!1);break}break;case"gestureend":switch(ge.detail.type){case"onetap":case"twotap":case"threetap":case"pinch":case"twodrag":break;case"drag":this._fakeMouseMove(ge,_e.x,_e.y),this._handleMouseButton(_e.x,_e.y,!1,1);break;case"longpress":this._fakeMouseMove(ge,_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 ge=this._sock.rQshiftStr(12).substr(4,7);v.Info("Server ProtocolVersion: "+ge);var De=0;switch(ge){case"000.000":De=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 "+ge)}if(De){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 Xe="00"+parseInt(this._rfbVersion,10)+".00"+this._rfbVersion*10%10;this._sock.sendString("RFB "+Xe+`
|
|
|
`),v.Debug("Sent ProtocolVersion: "+Xe),this._rfbInitState="Security"}},{key:"_negotiateSecurity",value:function(){function ge(Xe,tt){for(var ze=0;ze<tt.length;ze++)if(tt[ze]===Xe)return!0;return!1}if(this._rfbVersion>=3.7){var De=this._sock.rQshift8();if(this._sock.rQwait("security type",De,1))return!1;if(De===0)return this._rfbInitState="SecurityReason",this._securityContext="no security types",this._securityStatus=1,this._initMsg();var _e=this._sock.rQshiftBytes(De);if(v.Debug("Server security types: "+_e),ge(1,_e))this._rfbAuthScheme=1;else if(ge(22,_e))this._rfbAuthScheme=22;else if(ge(16,_e))this._rfbAuthScheme=16;else if(ge(2,_e))this._rfbAuthScheme=2;else if(ge(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",v.Debug("Authenticating using scheme: "+this._rfbAuthScheme),this._initMsg()}},{key:"_handleSecurityReason",value:function(){if(this._sock.rQwait("reason length",4))return!1;var ge=this._sock.rQshift32(),De="";if(ge>0){if(this._sock.rQwait("reason",ge,4))return!1;De=this._sock.rQshiftStr(ge)}return De!==""?(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:this._securityStatus,reason:De}})),this._fail("Security negotiation failed on "+this._securityContext+" (reason: "+De+")")):(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 ge=String.fromCharCode(this._rfbCredentials.username.length)+String.fromCharCode(this._rfbCredentials.target.length)+this._rfbCredentials.username+this._rfbCredentials.target;return this._sock.sendString(ge),this._rfbAuthScheme=2,this._negotiateAuthentication()}},{key:"_negotiateVeNCryptAuth",value:function(){if(this._rfbVeNCryptState==0){if(this._sock.rQwait("vencrypt version",2))return!1;var ge=this._sock.rQshift8(),De=this._sock.rQshift8();if(!(ge==0&&De==2))return this._fail("Unsupported VeNCrypt version "+ge+"."+De);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 Xe=this._sock.rQshift8();if(Xe<1)return this._fail("VeNCrypt subtypes empty");this._rfbVeNCryptSubtypesLength=Xe,this._rfbVeNCryptState=3}if(this._rfbVeNCryptState==3){if(this._sock.rQwait("vencrypt subtypes",4*this._rfbVeNCryptSubtypesLength))return!1;for(var tt=[],ze=0;ze<this._rfbVeNCryptSubtypesLength;ze++)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 Me=(0,T.encodeUTF8)(this._rfbCredentials.username),Et=(0,T.encodeUTF8)(this._rfbCredentials.password);return this._sock.send([0,0,0,Me.length]),this._sock.send([0,0,0,Et.length]),this._sock.sendString(Me),this._sock.sendString(Et),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 ge=Array.prototype.slice.call(this._sock.rQshiftBytes(16)),De=Ee.genDES(this._rfbCredentials.password,ge);return this._sock.send(De),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(ge){for(var De={0:{vendor:"TGHT",signature:"NOTUNNEL"}},_e={},Xe=0;Xe<ge;Xe++){var tt=this._sock.rQshift32(),ze=this._sock.rQshiftStr(4),Me=this._sock.rQshiftStr(8);_e[tt]={vendor:ze,signature:Me}}return v.Debug("Server Tight tunnel types: "+_e),_e[1]&&_e[1].vendor==="SICR"&&_e[1].signature==="SCHANNEL"&&(v.Debug("Detected Siemens server. Assuming NOTUNNEL support."),_e[0]={vendor:"TGHT",signature:"NOTUNNEL"}),_e[0]?_e[0].vendor!=De[0].vendor||_e[0].signature!=De[0].signature?this._fail("Client's tunnel type had the incorrect vendor or signature"):(v.Debug("Selected tunnel type: "+De[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 ge=this._sock.rQshift32();if(ge>0&&this._sock.rQwait("tunnel capabilities",16*ge,4))return!1;if(this._rfbTightVNC=!0,ge>0)return this._negotiateTightTunnels(ge),!1}if(this._sock.rQwait("sub auth count",4))return!1;var De=this._sock.rQshift32();if(De===0)return this._rfbInitState="SecurityResult",!0;if(this._sock.rQwait("sub auth capabilities",16*De,4))return!1;for(var _e={STDVNOAUTH__:1,STDVVNCAUTH_:2,TGHTULGNAUTH:129},Xe=[],tt=0;tt<De;tt++){this._sock.rQshift32();var ze=this._sock.rQshiftStr(12);Xe.push(ze)}v.Debug("Server Tight authentication types: "+Xe);for(var Me in _e)if(Xe.indexOf(Me)!=-1){this._sock.send([0,0,0,_e[Me]]),v.Debug("Selected authentication type: "+Me);switch(Me){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: "+Me+")")}}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 ge=this._sock.rQshift32();return ge===0?(this._rfbInitState="ClientInitialisation",v.Debug("Authentication OK"),this._initMsg()):this._rfbVersion>=3.8?(this._rfbInitState="SecurityReason",this._securityContext="security result",this._securityStatus=ge,this._initMsg()):(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:ge}})),this._fail("Security handshake failed"))}},{key:"_negotiateServerInit",value:function(){if(this._sock.rQwait("server initialization",24))return!1;var ge=this._sock.rQshift16(),De=this._sock.rQshift16(),_e=this._sock.rQshift8(),Xe=this._sock.rQshift8(),tt=this._sock.rQshift8(),ze=this._sock.rQshift8(),Me=this._sock.rQshift16(),Et=this._sock.rQshift16(),Oe=this._sock.rQshift16(),Ve=this._sock.rQshift8(),Je=this._sock.rQshift8(),Ye=this._sock.rQshift8();this._sock.rQskipBytes(3);var Pe=this._sock.rQshift32();if(this._sock.rQwait("server init name",Pe,24))return!1;var He=this._sock.rQshiftStr(Pe);if(He=(0,T.decodeUTF8)(He,!0),this._rfbTightVNC){if(this._sock.rQwait("TightVNC extended server init header",8,24+Pe))return!1;var ve=this._sock.rQshift16(),xe=this._sock.rQshift16(),de=this._sock.rQshift16();this._sock.rQskipBytes(2);var je=(ve+xe+de)*16;if(this._sock.rQwait("TightVNC extended server init header",je,32+Pe))return!1;this._sock.rQskipBytes(16*ve),this._sock.rQskipBytes(16*xe),this._sock.rQskipBytes(16*de)}return v.Info("Screen: "+ge+"x"+De+", bpp: "+_e+", depth: "+Xe+", bigEndian: "+tt+", trueColor: "+ze+", redMax: "+Me+", greenMax: "+Et+", blueMax: "+Oe+", redShift: "+Ve+", greenShift: "+Je+", blueShift: "+Ye),this._setDesktopName(He),this._resize(ge,De),this._viewOnly||this._keyboard.grab(),this._fbDepth=24,this._fbName==="Intel(r) AMT KVM"&&(v.Warn("Intel AMT KVM only supports 8/16 bit depths. Using low color mode."),this._fbDepth=8),Ee.messages.pixelFormat(this._sock,this._fbDepth,!0),this._sendEncodings(),Ee.messages.fbUpdateRequest(this._sock,!1,0,0,this._fbWidth,this._fbHeight),this._updateConnectionState("connected"),!0}},{key:"_sendEncodings",value:function(){var ge=[];ge.push(d.encodings.encodingCopyRect),this._fbDepth==24&&(ge.push(d.encodings.encodingTight),ge.push(d.encodings.encodingTightPNG),ge.push(d.encodings.encodingHextile),ge.push(d.encodings.encodingRRE)),ge.push(d.encodings.encodingRaw),ge.push(d.encodings.pseudoEncodingQualityLevel0+this._qualityLevel),ge.push(d.encodings.pseudoEncodingCompressLevel0+this._compressionLevel),ge.push(d.encodings.pseudoEncodingDesktopSize),ge.push(d.encodings.pseudoEncodingLastRect),ge.push(d.encodings.pseudoEncodingQEMUExtendedKeyEvent),ge.push(d.encodings.pseudoEncodingExtendedDesktopSize),ge.push(d.encodings.pseudoEncodingXvp),ge.push(d.encodings.pseudoEncodingFence),ge.push(d.encodings.pseudoEncodingContinuousUpdates),ge.push(d.encodings.pseudoEncodingDesktopName),ge.push(d.encodings.pseudoEncodingExtendedClipboard),this._fbDepth==24&&(ge.push(d.encodings.pseudoEncodingVMwareCursor),ge.push(d.encodings.pseudoEncodingCursor)),Ee.messages.clientEncodings(this._sock,ge)}},{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 v.Debug("SetColorMapEntries"),this._fail("Unexpected SetColorMapEntries message")}},{key:"_handleServerCutText",value:function(){if(v.Debug("ServerCutText"),this._sock.rQwait("ServerCutText header",7,1))return!1;this._sock.rQskipBytes(3);var ge=this._sock.rQshift32();if(ge=(0,I.toSigned32bit)(ge),this._sock.rQwait("ServerCutText content",Math.abs(ge),8))return!1;if(ge>=0){var De=this._sock.rQshiftStr(ge);if(this._viewOnly)return!0;this.dispatchEvent(new CustomEvent("clipboard",{detail:{text:De}}))}else{ge=Math.abs(ge);var _e=this._sock.rQshift32(),Xe=_e&65535,tt=_e&4278190080,ze=!!(tt&fe);if(ze){this._clipboardServerCapabilitiesFormats={},this._clipboardServerCapabilitiesActions={};for(var Me=0;Me<=15;Me++){var Et=1<<Me;Xe&Et&&(this._clipboardServerCapabilitiesFormats[Et]=!0,this._sock.rQshift32())}for(var Oe=24;Oe<=31;Oe++){var Ve=1<<Oe;this._clipboardServerCapabilitiesActions[Ve]=!!(tt&Ve)}var Je=[fe,Fe,ie,q,Q];Ee.messages.extendedClipboardCaps(this._sock,Je,{extendedClipboardFormatText:0})}else if(tt===Fe){if(this._viewOnly)return!0;this._clipboardText!=null&&this._clipboardServerCapabilitiesActions[Q]&&(Xe&pe&&Ee.messages.extendedClipboardProvide(this._sock,[pe],[this._clipboardText]))}else if(tt===ie){if(this._viewOnly)return!0;this._clipboardServerCapabilitiesActions[q]&&(this._clipboardText!=null?Ee.messages.extendedClipboardNotify(this._sock,[pe]):Ee.messages.extendedClipboardNotify(this._sock,[]))}else if(tt===q){if(this._viewOnly)return!0;this._clipboardServerCapabilitiesActions[Fe]&&(Xe&pe&&Ee.messages.extendedClipboardRequest(this._sock,[pe]))}else if(tt===Q){if(this._viewOnly)return!0;if(!(Xe&pe))return!0;this._clipboardText=null;var Ye=this._sock.rQshiftBytes(ge-4),Pe=new e.default,He=null;Pe.setInput(Ye);for(var ve=0;ve<=15;ve++){var xe=1<<ve;if(Xe&xe){var de=0,je=Pe.inflate(4);de|=je[0]<<24,de|=je[1]<<16,de|=je[2]<<8,de|=je[3];var Qe=Pe.inflate(de);xe===pe&&(He=Qe)}}if(Pe.setInput(null),He!==null){for(var ne="",Ze=0;Ze<He.length;Ze++)ne+=String.fromCharCode(He[Ze]);He=ne,He=(0,T.decodeUTF8)(He),He.length>0&&He.charAt(He.length-1)==="\0"&&(He=He.slice(0,-1)),He=He.replace(`\r
|
|
|
`,`
|
|
|
`),this.dispatchEvent(new CustomEvent("clipboard",{detail:{text:He}}))}}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 ge=this._sock.rQshift32(),De=this._sock.rQshift8();if(this._sock.rQwait("ServerFence payload",De,9))return!1;De>64&&(v.Warn("Bad payload length ("+De+") in fence response"),De=64);var _e=this._sock.rQshiftStr(De);return this._supportsFence=!0,ge&1<<31?(ge&=1<<0|1<<1,Ee.messages.clientFence(this._sock,ge,_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 ge=this._sock.rQshift8(),De=this._sock.rQshift8();switch(De){case 0:v.Error("XVP Operation Failed");break;case 1:this._rfbXvpVer=ge,v.Info("XVP extensions enabled (version "+this._rfbXvpVer+")"),this._setCapability("power",!0);break;default:this._fail("Illegal server XVP message (msg: "+De+")");break}return!0}},{key:"_normalMsg",value:function(){var ge;this._FBU.rects>0?ge=0:ge=this._sock.rQshift8();var De,_e;switch(ge){case 0:return _e=this._framebufferUpdate(),_e&&!this._enabledContinuousUpdates&&Ee.messages.fbUpdateRequest(this._sock,!0,0,0,this._fbWidth,this._fbHeight),_e;case 1:return this._handleSetColourMapMsg();case 2:return v.Debug("Bell"),this.dispatchEvent(new CustomEvent("bell",{detail:{}})),!0;case 3:return this._handleServerCutText();case 150:return De=!this._supportsContinuousUpdates,this._supportsContinuousUpdates=!0,this._enabledContinuousUpdates=!1,De&&(this._enabledContinuousUpdates=!0,this._updateContinuousUpdates(),v.Info("Enabling continuous updates.")),!0;case 248:return this._handleServerFenceMsg();case 250:return this._handleXvpMsg();default:return this._fail("Unexpected server message (type "+ge+")"),v.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 ge=this._sock.rQshiftBytes(12);this._FBU.x=(ge[0]<<8)+ge[1],this._FBU.y=(ge[2]<<8)+ge[3],this._FBU.width=(ge[4]<<8)+ge[5],this._FBU.height=(ge[6]<<8)+ge[7],this._FBU.encoding=parseInt((ge[8]<<24)+(ge[9]<<16)+(ge[10]<<8)+ge[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 d.encodings.pseudoEncodingLastRect:return this._FBU.rects=1,!0;case d.encodings.pseudoEncodingVMwareCursor:return this._handleVMwareCursor();case d.encodings.pseudoEncodingCursor:return this._handleCursor();case d.encodings.pseudoEncodingQEMUExtendedKeyEvent:try{var ge=document.createEvent("keyboardEvent");ge.code!==void 0&&(this._qemuExtKeyEventSupported=!0)}catch(De){}return!0;case d.encodings.pseudoEncodingDesktopName:return this._handleDesktopName();case d.encodings.pseudoEncodingDesktopSize:return this._resize(this._FBU.width,this._FBU.height),!0;case d.encodings.pseudoEncodingExtendedDesktopSize:return this._handleExtendedDesktopSize();default:return this._handleDataRect()}}},{key:"_handleVMwareCursor",value:function(){var ge=this._FBU.x,De=this._FBU.y,_e=this._FBU.width,Xe=this._FBU.height;if(this._sock.rQwait("VMware cursor encoding",1))return!1;var tt=this._sock.rQshift8();this._sock.rQshift8();var ze,Me=4;if(tt==0){var Et=4294967040|0;if(ze=new Array(_e*Xe*Me),this._sock.rQwait("VMware cursor classic encoding",_e*Xe*Me*2,2))return!1;for(var Oe=new Array(_e*Xe),Ve=0;Ve<_e*Xe;Ve++)Oe[Ve]=this._sock.rQshift32();for(var Je=new Array(_e*Xe),Ye=0;Ye<_e*Xe;Ye++)Je[Ye]=this._sock.rQshift32();for(var Pe=0;Pe<_e*Xe;Pe++)if(Oe[Pe]==0){var He=Je[Pe],ve=He>>8&255,xe=He>>16&255,de=He>>24&255;ze[Pe*Me]=ve,ze[Pe*Me+1]=xe,ze[Pe*Me+2]=de,ze[Pe*Me+3]=255}else(Oe[Pe]&Et)==Et?Je[Pe]==0?(ze[Pe*Me]=0,ze[Pe*Me+1]=0,ze[Pe*Me+2]=0,ze[Pe*Me+3]=0):((Je[Pe]&Et)==Et,ze[Pe*Me]=0,ze[Pe*Me+1]=0,ze[Pe*Me+2]=0,ze[Pe*Me+3]=255):(ze[Pe*Me]=0,ze[Pe*Me+1]=0,ze[Pe*Me+2]=0,ze[Pe*Me+3]=255)}else if(tt==1){if(this._sock.rQwait("VMware cursor alpha encoding",_e*Xe*4,2))return!1;ze=new Array(_e*Xe*Me);for(var je=0;je<_e*Xe;je++){var Qe=this._sock.rQshift32();ze[je*4]=Qe>>24&255,ze[je*4+1]=Qe>>16&255,ze[je*4+2]=Qe>>8&255,ze[je*4+3]=Qe&255}}else return v.Warn("The given cursor type is not supported: "+tt+" given."),!1;return this._updateCursor(ze,ge,De,_e,Xe),!0}},{key:"_handleCursor",value:function(){var ge=this._FBU.x,De=this._FBU.y,_e=this._FBU.width,Xe=this._FBU.height,tt=_e*Xe*4,ze=Math.ceil(_e/8)*Xe,Me=tt+ze;if(this._sock.rQwait("cursor encoding",Me))return!1;for(var Et=this._sock.rQshiftBytes(tt),Oe=this._sock.rQshiftBytes(ze),Ve=new Uint8Array(_e*Xe*4),Je=0,Ye=0;Ye<Xe;Ye++)for(var Pe=0;Pe<_e;Pe++){var He=Ye*Math.ceil(_e/8)+Math.floor(Pe/8),ve=Oe[He]<<Pe%8&128?255:0;Ve[Je]=Et[Je+2],Ve[Je+1]=Et[Je+1],Ve[Je+2]=Et[Je],Ve[Je+3]=ve,Je+=4}return this._updateCursor(Ve,ge,De,_e,Xe),!0}},{key:"_handleDesktopName",value:function(){if(this._sock.rQwait("DesktopName",4))return!1;var ge=this._sock.rQshift32();if(this._sock.rQwait("DesktopName",ge,4))return!1;var De=this._sock.rQshiftStr(ge);return De=(0,T.decodeUTF8)(De,!0),this._setDesktopName(De),!0}},{key:"_handleExtendedDesktopSize",value:function(){if(this._sock.rQwait("ExtendedDesktopSize",4))return!1;var ge=this._sock.rQpeek8(),De=4+ge*16;if(this._sock.rQwait("ExtendedDesktopSize",De))return!1;var _e=!this._supportsSetDesktopSize;this._supportsSetDesktopSize=!0,_e&&this._requestRemoteResize(),this._sock.rQskipBytes(1),this._sock.rQskipBytes(3);for(var Xe=0;Xe<ge;Xe+=1)Xe===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}v.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 ge=this._decoders[this._FBU.encoding];if(!ge)return this._fail("Unsupported encoding (encoding: "+this._FBU.encoding+")"),!1;try{return ge.decodeRect(this._FBU.x,this._FBU.y,this._FBU.width,this._FBU.height,this._sock,this._display,this._fbDepth)}catch(De){return this._fail("Error decoding rect: "+De),!1}}},{key:"_updateContinuousUpdates",value:function(){if(!this._enabledContinuousUpdates)return;Ee.messages.enableContinuousUpdates(this._sock,!0,0,0,this._fbWidth,this._fbHeight)}},{key:"_resize",value:function(ge,De){this._fbWidth=ge,this._fbHeight=De,this._display.resize(this._fbWidth,this._fbHeight),this._updateClip(),this._updateScale(),this._updateContinuousUpdates()}},{key:"_xvpOp",value:function(ge,De){if(this._rfbXvpVer<ge)return;v.Info("Sending XVP operation "+De+" (version "+ge+")"),Ee.messages.xvpOp(this._sock,ge,De)}},{key:"_updateCursor",value:function(ge,De,_e,Xe,tt){this._cursorImage={rgbaPixels:ge,hotx:De,hoty:_e,w:Xe,h:tt},this._refreshCursor()}},{key:"_shouldShowDotCursor",value:function(){if(!this._showDotCursor)return!1;for(var ge=3;ge<this._cursorImage.rgbaPixels.length;ge+=4)if(this._cursorImage.rgbaPixels[ge])return!1;return!0}},{key:"_refreshCursor",value:function(){if(this._rfbConnectionState!=="connecting"&&this._rfbConnectionState!=="connected")return;var ge=this._shouldShowDotCursor()?Ee.cursors.dot:this._cursorImage;this._cursor.change(ge.rgbaPixels,ge.hotx,ge.hoty,ge.w,ge.h)}},{key:"viewOnly",get:function(){return this._viewOnly},set:function(ge){this._viewOnly=ge,(this._rfbConnectionState==="connecting"||this._rfbConnectionState==="connected")&&(ge?this._keyboard.ungrab():this._keyboard.grab())}},{key:"capabilities",get:function(){return this._capabilities}},{key:"touchButton",get:function(){return 0},set:function(ge){v.Warn("Using old API!")}},{key:"clipViewport",get:function(){return this._clipViewport},set:function(ge){this._clipViewport=ge,this._updateClip()}},{key:"scaleViewport",get:function(){return this._scaleViewport},set:function(ge){this._scaleViewport=ge,ge&&this._clipViewport&&this._updateClip(),this._updateScale(),!ge&&this._clipViewport&&this._updateClip()}},{key:"resizeSession",get:function(){return this._resizeSession},set:function(ge){this._resizeSession=ge,ge&&this._requestRemoteResize()}},{key:"showDotCursor",get:function(){return this._showDotCursor},set:function(ge){this._showDotCursor=ge,this._refreshCursor()}},{key:"background",get:function(){return this._screen.style.background},set:function(ge){this._screen.style.background=ge}},{key:"qualityLevel",get:function(){return this._qualityLevel},set:function(ge){if(!Number.isInteger(ge)||ge<0||ge>9){v.Error("qualityLevel must be an integer between 0 and 9");return}if(this._qualityLevel===ge)return;this._qualityLevel=ge,this._rfbConnectionState==="connected"&&this._sendEncodings()}},{key:"compressionLevel",get:function(){return this._compressionLevel},set:function(ge){if(!Number.isInteger(ge)||ge<0||ge>9){v.Error("compressionLevel must be an integer between 0 and 9");return}if(this._compressionLevel===ge)return;this._compressionLevel=ge,this._rfbConnectionState==="connected"&&this._sendEncodings()}}],[{key:"genDES",value:function(ge,De){var _e=ge.split("").map(function(Xe){return Xe.charCodeAt(0)});return new t.default(_e).encrypt(De)}}]),Ee}(_.default);H.default=Y,Y.messages={keyEvent:function(le,Ee,Le){var ge=le._sQ,De=le._sQlen;ge[De]=4,ge[De+1]=Le,ge[De+2]=0,ge[De+3]=0,ge[De+4]=Ee>>24,ge[De+5]=Ee>>16,ge[De+6]=Ee>>8,ge[De+7]=Ee,le._sQlen+=8,le.flush()},QEMUExtendedKeyEvent:function(le,Ee,Le,ge){function De(ze){var Me=ge>>8,Et=ge&255;return Me===224&&Et<127?Et|128:ze}var _e=le._sQ,Xe=le._sQlen;_e[Xe]=255,_e[Xe+1]=0,_e[Xe+2]=Le>>8,_e[Xe+3]=Le,_e[Xe+4]=Ee>>24,_e[Xe+5]=Ee>>16,_e[Xe+6]=Ee>>8,_e[Xe+7]=Ee;var tt=De(ge);_e[Xe+8]=tt>>24,_e[Xe+9]=tt>>16,_e[Xe+10]=tt>>8,_e[Xe+11]=tt,le._sQlen+=12,le.flush()},pointerEvent:function(le,Ee,Le,ge){var De=le._sQ,_e=le._sQlen;De[_e]=5,De[_e+1]=ge,De[_e+2]=Ee>>8,De[_e+3]=Ee,De[_e+4]=Le>>8,De[_e+5]=Le,le._sQlen+=6,le.flush()},_buildExtendedClipboardFlags:function(le,Ee){for(var Le=new Uint8Array(4),ge=0,De=0,_e=0;_e<le.length;_e++)De|=le[_e];for(var Xe=0;Xe<Ee.length;Xe++)ge|=Ee[Xe];return Le[0]=De>>24,Le[1]=0,Le[2]=0,Le[3]=ge,Le},extendedClipboardProvide:function(le,Ee,Le){for(var ge=new o.default,De=[],_e=0;_e<Ee.length;_e++){if(Ee[_e]!=pe)throw new Error("Unsupported extended clipboard format for Provide message.");Le[_e]=Le[_e].replace(/\r\n|\r|\n/gm,`\r
|
|
|
`);var Xe=(0,T.encodeUTF8)(Le[_e]+"\0");De.push(Xe.length>>24&255,Xe.length>>16&255,Xe.length>>8&255,Xe.length&255);for(var tt=0;tt<Xe.length;tt++)De.push(Xe.charCodeAt(tt))}var ze=ge.deflate(new Uint8Array(De)),Me=new Uint8Array(4+ze.length);Me.set(Y.messages._buildExtendedClipboardFlags([Q],Ee)),Me.set(ze,4),Y.messages.clientCutText(le,Me,!0)},extendedClipboardNotify:function(le,Ee){var Le=Y.messages._buildExtendedClipboardFlags([q],Ee);Y.messages.clientCutText(le,Le,!0)},extendedClipboardRequest:function(le,Ee){var Le=Y.messages._buildExtendedClipboardFlags([Fe],Ee);Y.messages.clientCutText(le,Le,!0)},extendedClipboardCaps:function(le,Ee,Le){var ge=Object.keys(Le),De=new Uint8Array(4+4*ge.length);ge.map(function(tt){return parseInt(tt)}),ge.sort(function(tt,ze){return tt-ze}),De.set(Y.messages._buildExtendedClipboardFlags(Ee,[]));for(var _e=4,Xe=0;Xe<ge.length;Xe++)De[_e]=Le[ge[Xe]]>>24,De[_e+1]=Le[ge[Xe]]>>16,De[_e+2]=Le[ge[Xe]]>>8,De[_e+3]=Le[ge[Xe]]>>0,_e+=4,De[3]|=1<<ge[Xe];Y.messages.clientCutText(le,De,!0)},clientCutText:function(le,Ee){var Le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ge=le._sQ,De=le._sQlen;ge[De]=6,ge[De+1]=0,ge[De+2]=0,ge[De+3]=0;var _e;Le?_e=(0,I.toUnsigned32bit)(-Ee.length):_e=Ee.length,ge[De+4]=_e>>24,ge[De+5]=_e>>16,ge[De+6]=_e>>8,ge[De+7]=_e,le._sQlen+=8;for(var Xe=0,tt=Ee.length;tt>0;){for(var ze=Math.min(tt,le._sQbufferSize-le._sQlen),Me=0;Me<ze;Me++)ge[le._sQlen+Me]=Ee[Xe+Me];le._sQlen+=ze,le.flush(),tt-=ze,Xe+=ze}},setDesktopSize:function(le,Ee,Le,ge,De){var _e=le._sQ,Xe=le._sQlen;_e[Xe]=251,_e[Xe+1]=0,_e[Xe+2]=Ee>>8,_e[Xe+3]=Ee,_e[Xe+4]=Le>>8,_e[Xe+5]=Le,_e[Xe+6]=1,_e[Xe+7]=0,_e[Xe+8]=ge>>24,_e[Xe+9]=ge>>16,_e[Xe+10]=ge>>8,_e[Xe+11]=ge,_e[Xe+12]=0,_e[Xe+13]=0,_e[Xe+14]=0,_e[Xe+15]=0,_e[Xe+16]=Ee>>8,_e[Xe+17]=Ee,_e[Xe+18]=Le>>8,_e[Xe+19]=Le,_e[Xe+20]=De>>24,_e[Xe+21]=De>>16,_e[Xe+22]=De>>8,_e[Xe+23]=De,le._sQlen+=24,le.flush()},clientFence:function(le,Ee,Le){var ge=le._sQ,De=le._sQlen;ge[De]=248,ge[De+1]=0,ge[De+2]=0,ge[De+3]=0,ge[De+4]=Ee>>24,ge[De+5]=Ee>>16,ge[De+6]=Ee>>8,ge[De+7]=Ee;var _e=Le.length;ge[De+8]=_e;for(var Xe=0;Xe<_e;Xe++)ge[De+9+Xe]=Le.charCodeAt(Xe);le._sQlen+=9+_e,le.flush()},enableContinuousUpdates:function(le,Ee,Le,ge,De,_e){var Xe=le._sQ,tt=le._sQlen;Xe[tt]=150,Xe[tt+1]=Ee,Xe[tt+2]=Le>>8,Xe[tt+3]=Le,Xe[tt+4]=ge>>8,Xe[tt+5]=ge,Xe[tt+6]=De>>8,Xe[tt+7]=De,Xe[tt+8]=_e>>8,Xe[tt+9]=_e,le._sQlen+=10,le.flush()},pixelFormat:function(le,Ee,Le){var ge=le._sQ,De=le._sQlen,_e;Ee>16?_e=32:Ee>8?_e=16:_e=8;var Xe=Math.floor(Ee/3);ge[De]=0,ge[De+1]=0,ge[De+2]=0,ge[De+3]=0,ge[De+4]=_e,ge[De+5]=Ee,ge[De+6]=0,ge[De+7]=Le?1:0,ge[De+8]=0,ge[De+9]=(1<<Xe)-1,ge[De+10]=0,ge[De+11]=(1<<Xe)-1,ge[De+12]=0,ge[De+13]=(1<<Xe)-1,ge[De+14]=Xe*2,ge[De+15]=Xe*1,ge[De+16]=Xe*0,ge[De+17]=0,ge[De+18]=0,ge[De+19]=0,le._sQlen+=20,le.flush()},clientEncodings:function(le,Ee){var Le=le._sQ,ge=le._sQlen;Le[ge]=2,Le[ge+1]=0,Le[ge+2]=Ee.length>>8,Le[ge+3]=Ee.length;for(var De=ge+4,_e=0;_e<Ee.length;_e++){var Xe=Ee[_e];Le[De]=Xe>>24,Le[De+1]=Xe>>16,Le[De+2]=Xe>>8,Le[De+3]=Xe,De+=4}le._sQlen+=De-ge,le.flush()},fbUpdateRequest:function(le,Ee,Le,ge,De,_e){var Xe=le._sQ,tt=le._sQlen;typeof Le=="undefined"&&(Le=0),typeof ge=="undefined"&&(ge=0),Xe[tt]=3,Xe[tt+1]=Ee?1:0,Xe[tt+2]=Le>>8&255,Xe[tt+3]=Le&255,Xe[tt+4]=ge>>8&255,Xe[tt+5]=ge&255,Xe[tt+6]=De>>8&255,Xe[tt+7]=De&255,Xe[tt+8]=_e>>8&255,Xe[tt+9]=_e&255,le._sQlen+=10,le.flush()},xvpOp:function(le,Ee,Le){var ge=le._sQ,De=le._sQlen;ge[De]=250,ge[De+1]=0,ge[De+2]=Ee,ge[De+3]=Le,le._sQlen+=4,le.flush()}},Y.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(j,H,b){(function(I){I(b("VrN/"))})(function(I){"use strict";var v={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},T={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};I.defineMode("xml",function(y,g){var s=y.indentUnit,_={},p=g.htmlMode?v:T;for(var e in p)_[e]=p[e];for(var e in g)_[e]=g[e];var o,n;function l(D,M){function N(X){return M.tokenize=X,X(D,M)}var P=D.next();if(P=="<")return D.eat("!")?D.eat("[")?D.match("CDATA[")?N(t("atom","]]>")):null:D.match("--")?N(t("comment","-->")):D.match("DOCTYPE",!0,!0)?(D.eatWhile(/[\w\._\-]/),N(a(1))):null:D.eat("?")?(D.eatWhile(/[\w\._\-]/),M.tokenize=t("meta","?>"),"meta"):(o=D.eat("/")?"closeTag":"openTag",M.tokenize=r,"tag bracket");if(P=="&"){var z;return D.eat("#")?D.eat("x")?z=D.eatWhile(/[a-fA-F\d]/)&&D.eat(";"):z=D.eatWhile(/[\d]/)&&D.eat(";"):z=D.eatWhile(/[\w\.\-:]/)&&D.eat(";"),z?"atom":"error"}else return D.eatWhile(/[^&<]/),null}l.isInText=!0;function r(D,M){var N=D.next();if(N==">"||N=="/"&&D.eat(">"))return M.tokenize=l,o=N==">"?"endTag":"selfcloseTag","tag bracket";if(N=="=")return o="equals",null;if(N=="<"){M.tokenize=l,M.state=h,M.tagName=M.tagStart=null;var P=M.tokenize(D,M);return P?P+" tag error":"tag error"}else return/[\'\"]/.test(N)?(M.tokenize=i(N),M.stringStartCol=D.column(),M.tokenize(D,M)):(D.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function i(D){var M=function(N,P){for(;!N.eol();)if(N.next()==D){P.tokenize=r;break}return"string"};return M.isInAttribute=!0,M}function t(D,M){return function(N,P){for(;!N.eol();){if(N.match(M)){P.tokenize=l;break}N.next()}return D}}function a(D){return function(M,N){for(var P;(P=M.next())!=null;){if(P=="<")return N.tokenize=a(D+1),N.tokenize(M,N);if(P==">")if(D==1){N.tokenize=l;break}else return N.tokenize=a(D-1),N.tokenize(M,N)}return"meta"}}function c(D,M,N){this.prev=D.context,this.tagName=M,this.indent=D.indented,this.startOfLine=N,(_.doNotIndent.hasOwnProperty(M)||D.context&&D.context.noIndent)&&(this.noIndent=!0)}function d(D){D.context&&(D.context=D.context.prev)}function f(D,M){for(var N;;){if(!D.context)return;if(N=D.context.tagName,!_.contextGrabbers.hasOwnProperty(N)||!_.contextGrabbers[N].hasOwnProperty(M))return;d(D)}}function h(D,M,N){return D=="openTag"?(N.tagStart=M.column(),u):D=="closeTag"?E:h}function u(D,M,N){return D=="word"?(N.tagName=M.current(),n="tag",C):_.allowMissingTagName&&D=="endTag"?(n="tag bracket",C(D,M,N)):(n="error",u)}function E(D,M,N){if(D=="word"){var P=M.current();return N.context&&N.context.tagName!=P&&_.implicitlyClosed.hasOwnProperty(N.context.tagName)&&d(N),N.context&&N.context.tagName==P||_.matchClosing===!1?(n="tag",x):(n="tag error",O)}else return _.allowMissingTagName&&D=="endTag"?(n="tag bracket",x(D,M,N)):(n="error",O)}function x(D,M,N){return D!="endTag"?(n="error",x):(d(N),h)}function O(D,M,N){return n="error",x(D,M,N)}function C(D,M,N){if(D=="word")return n="attribute",w;if(D=="endTag"||D=="selfcloseTag"){var P=N.tagName,z=N.tagStart;return N.tagName=N.tagStart=null,D=="selfcloseTag"||_.autoSelfClosers.hasOwnProperty(P)?f(N,P):(f(N,P),N.context=new c(N,P,z==N.indented)),h}return n="error",C}function w(D,M,N){return D=="equals"?S:(_.allowMissing||(n="error"),C(D,M,N))}function S(D,M,N){return D=="string"?A:D=="word"&&_.allowUnquoted?(n="string",C):(n="error",C(D,M,N))}function A(D,M,N){return D=="string"?A:C(D,M,N)}return{startState:function(D){var M={tokenize:l,state:h,indented:D||0,tagName:null,tagStart:null,context:null};return D!=null&&(M.baseIndent=D),M},token:function(D,M){if(!M.tagName&&D.sol()&&(M.indented=D.indentation()),D.eatSpace())return null;o=null;var N=M.tokenize(D,M);return(N||o)&&N!="comment"&&(n=null,M.state=M.state(o||N,D,M),n&&(N=n=="error"?N+" error":n)),N},indent:function(D,M,N){var P=D.context;if(D.tokenize.isInAttribute)return D.tagStart==D.indented?D.stringStartCol+1:D.indented+s;if(P&&P.noIndent)return I.Pass;if(D.tokenize!=r&&D.tokenize!=l)return N?N.match(/^(\s*)/)[0].length:0;if(D.tagName)return _.multilineTagIndentPastTag!==!1?D.tagStart+D.tagName.length+2:D.tagStart+s*(_.multilineTagIndentFactor||1);if(_.alignCDATA&&/<!\[CDATA\[/.test(M))return 0;var z=M&&/^<(\/)?([\w_:\.-]*)/.exec(M);if(z&&z[1])for(;P;)if(P.tagName==z[2]){P=P.prev;break}else if(_.implicitlyClosed.hasOwnProperty(P.tagName))P=P.prev;else break;else if(z)for(;P;){var X=_.contextGrabbers[P.tagName];if(X&&X.hasOwnProperty(z[2]))P=P.prev;else break}for(;P&&P.prev&&!P.startOfLine;)P=P.prev;return P?P.indent+s:D.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:_.htmlMode?"html":"xml",helperType:_.htmlMode?"html":"xml",skipAttribute:function(D){D.state==S&&(D.state=C)},xmlCurrentTag:function(D){return D.tagName?{name:D.tagName,close:D.type=="closeTag"}:null},xmlCurrentContext:function(D){for(var M=[],N=D.context;N;N=N.prev)N.tagName&&M.push(N.tagName);return M.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(j,H,b){"use strict";b.d(H,"d",function(){return Le}),b.d(H,"b",function(){return Qe}),b.d(H,"c",function(){return Ze}),b.d(H,"a",function(){return Be});var I=b("VTBJ"),v=b("1OyB"),T=b("vuIU"),y=b("JX7q"),g=b("Ji7U"),s=b("LK+K"),_=b("q1tI"),p=b("I8Z2"),e=b("BGR+"),o=b("wx14"),n=b("rePB"),l=b("4IlW"),r=b("2GS6"),i=b("Gytx"),t=b.n(i),a=b("TSYQ"),c=b.n(a),d=b("U8pU"),f=b("ODXe"),h=/iPhone/i,u=/iPod/i,E=/iPad/i,x=/\bAndroid(?:.+)Mobile\b/i,O=/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,D=/BlackBerry/i,M=/BB10/i,N=/Opera Mini/i,P=/\b(CriOS|Chrome)(?:.+)Mobile/i,z=/Mobile(?:.+)Firefox\b/i;function X(rt,xt){return rt.test(xt)}function k(rt){var xt=rt||(typeof navigator!="undefined"?navigator.userAgent:""),ft=xt.split("[FBAN");if(typeof ft[1]!="undefined"){var st=ft,Ne=Object(f.a)(st,1);xt=Ne[0]}if(ft=xt.split("Twitter"),typeof ft[1]!="undefined"){var Ge=ft,yt=Object(f.a)(Ge,1);xt=yt[0]}var pt={apple:{phone:X(h,xt)&&!X(S,xt),ipod:X(u,xt),tablet:!X(h,xt)&&X(E,xt)&&!X(S,xt),device:(X(h,xt)||X(u,xt)||X(E,xt))&&!X(S,xt)},amazon:{phone:X(C,xt),tablet:!X(C,xt)&&X(w,xt),device:X(C,xt)||X(w,xt)},android:{phone:!X(S,xt)&&X(C,xt)||!X(S,xt)&&X(x,xt),tablet:!X(S,xt)&&!X(C,xt)&&!X(x,xt)&&(X(w,xt)||X(O,xt)),device:!X(S,xt)&&(X(C,xt)||X(w,xt)||X(x,xt)||X(O,xt))||X(/\bokhttp\b/i,xt)},windows:{phone:X(S,xt),tablet:X(A,xt),device:X(S,xt)||X(A,xt)},other:{blackberry:X(D,xt),blackberry10:X(M,xt),opera:X(N,xt),firefox:X(z,xt),chrome:X(P,xt),device:X(D,xt)||X(M,xt)||X(N,xt)||X(z,xt)||X(P,xt)},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 F=Object(I.a)(Object(I.a)({},k()),{},{isMobile:k}),U=F;function L(){}function B(rt,xt,ft){var st=xt||"";return rt.key||"".concat(st,"item_").concat(ft)}function Z(rt){return"".concat(rt,"-menu-")}function re(rt,xt){var ft=-1;_.Children.forEach(rt,function(st){ft+=1,st&&st.type&&st.type.isMenuItemGroup?_.Children.forEach(st.props.children,function(Ne){ft+=1,xt(Ne,ft)}):xt(st,ft)})}function he(rt,xt,ft){if(!rt||ft.find)return;_.Children.forEach(rt,function(st){if(st){var Ne=st.type;if(!Ne||!(Ne.isSubMenu||Ne.isMenuItem||Ne.isMenuItemGroup))return;xt.indexOf(st.key)!==-1?ft.find=!0:st.props.children&&he(st.props.children,xt,ft)}})}var Ce=["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(xt){var ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,st=xt&&typeof xt.getBoundingClientRect=="function"&&xt.getBoundingClientRect().width;if(st){if(ft){var Ne=getComputedStyle(xt),Ge=Ne.marginLeft,yt=Ne.marginRight;st+=+Ge.replace("px","")+ +yt.replace("px","")}st=+st.toFixed(6)}return st||0},te=function(xt,ft,st){xt&&Object(d.a)(xt.style)==="object"&&(xt.style[ft]=st)},Re=function(){return U.any},Te=b("KQm4"),pe=b("Ff2n"),me=b("i8i4"),se=b("bdgK"),be=b("uciX"),ae=b("8XRh"),fe={adjustX:1,adjustY:1},Fe={topLeft:{points:["bl","tl"],overflow:fe,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:fe,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:fe,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:fe,offset:[4,0]}},ie={topLeft:{points:["bl","tl"],overflow:fe,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:fe,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:fe,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:fe,offset:[4,0]}},q=Fe,Q=0,Y={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},oe=function(xt,ft,st){var Ne=Z(ft),Ge=xt.getState();xt.setState({defaultActiveFirst:Object(I.a)(Object(I.a)({},Ge.defaultActiveFirst),{},Object(n.a)({},Ne,st))})},le=function(rt){Object(g.a)(ft,rt);var xt=Object(s.a)(ft);function ft(st){var Ne;Object(v.a)(this,ft),Ne=xt.call(this,st),Ne.onDestroy=function(gt){Ne.props.onDestroy(gt)},Ne.onKeyDown=function(gt){var Ht=gt.keyCode,Ut=Ne.menuInstance,Nt=Ne.props,Wt=Nt.isOpen,Qt=Nt.store;if(Ht===l.a.ENTER)return Ne.onTitleClick(gt),oe(Qt,Ne.props.eventKey,!0),!0;if(Ht===l.a.RIGHT)return Wt?Ut.onKeyDown(gt):(Ne.triggerOpenChange(!0),oe(Qt,Ne.props.eventKey,!0)),!0;if(Ht===l.a.LEFT){var pn;if(Wt)pn=Ut.onKeyDown(gt);else return;return pn||(Ne.triggerOpenChange(!1),pn=!0),pn}return Wt&&(Ht===l.a.UP||Ht===l.a.DOWN)?Ut.onKeyDown(gt):void 0},Ne.onOpenChange=function(gt){Ne.props.onOpenChange(gt)},Ne.onPopupVisibleChange=function(gt){Ne.triggerOpenChange(gt,gt?"mouseenter":"mouseleave")},Ne.onMouseEnter=function(gt){var Ht=Ne.props,Ut=Ht.eventKey,Nt=Ht.onMouseEnter,Wt=Ht.store;oe(Wt,Ne.props.eventKey,!1),Nt({key:Ut,domEvent:gt})},Ne.onMouseLeave=function(gt){var Ht=Ne.props,Ut=Ht.parentMenu,Nt=Ht.eventKey,Wt=Ht.onMouseLeave;Ut.subMenuInstance=Object(y.a)(Ne),Wt({key:Nt,domEvent:gt})},Ne.onTitleMouseEnter=function(gt){var Ht=Ne.props,Ut=Ht.eventKey,Nt=Ht.onItemHover,Wt=Ht.onTitleMouseEnter;Nt({key:Ut,hover:!0}),Wt({key:Ut,domEvent:gt})},Ne.onTitleMouseLeave=function(gt){var Ht=Ne.props,Ut=Ht.parentMenu,Nt=Ht.eventKey,Wt=Ht.onItemHover,Qt=Ht.onTitleMouseLeave;Ut.subMenuInstance=Object(y.a)(Ne),Wt({key:Nt,hover:!1}),Qt({key:Nt,domEvent:gt})},Ne.onTitleClick=function(gt){var Ht=Object(y.a)(Ne),Ut=Ht.props;if(Ut.onTitleClick({key:Ut.eventKey,domEvent:gt}),Ut.triggerSubMenuAction==="hover")return;Ne.triggerOpenChange(!Ut.isOpen,"click"),oe(Ut.store,Ne.props.eventKey,!1)},Ne.onSubMenuClick=function(gt){typeof Ne.props.onClick=="function"&&Ne.props.onClick(Ne.addKeyPath(gt))},Ne.onSelect=function(gt){Ne.props.onSelect(gt)},Ne.onDeselect=function(gt){Ne.props.onDeselect(gt)},Ne.getPrefixCls=function(){return"".concat(Ne.props.rootPrefixCls,"-submenu")},Ne.getActiveClassName=function(){return"".concat(Ne.getPrefixCls(),"-active")},Ne.getDisabledClassName=function(){return"".concat(Ne.getPrefixCls(),"-disabled")},Ne.getSelectedClassName=function(){return"".concat(Ne.getPrefixCls(),"-selected")},Ne.getOpenClassName=function(){return"".concat(Ne.props.rootPrefixCls,"-submenu-open")},Ne.saveMenuInstance=function(gt){Ne.menuInstance=gt},Ne.addKeyPath=function(gt){return Object(I.a)(Object(I.a)({},gt),{},{keyPath:(gt.keyPath||[]).concat(Ne.props.eventKey)})},Ne.triggerOpenChange=function(gt,Ht){var Ut=Ne.props.eventKey,Nt=function(){Ne.onOpenChange({key:Ut,item:Object(y.a)(Ne),trigger:Ht,open:gt})};Ht==="mouseenter"?Ne.mouseenterTimeout=setTimeout(function(){Nt()},0):Nt()},Ne.isChildrenSelected=function(){var gt={find:!1};return he(Ne.props.children,Ne.props.selectedKeys,gt),gt.find},Ne.isOpen=function(){return Ne.props.openKeys.indexOf(Ne.props.eventKey)!==-1},Ne.adjustWidth=function(){if(!Ne.subMenuTitle||!Ne.menuInstance)return;var gt=me.findDOMNode(Ne.menuInstance);if(gt.offsetWidth>=Ne.subMenuTitle.offsetWidth)return;gt.style.minWidth="".concat(Ne.subMenuTitle.offsetWidth,"px")},Ne.saveSubMenuTitle=function(gt){Ne.subMenuTitle=gt},Ne.getBaseProps=function(){var gt=Object(y.a)(Ne),Ht=gt.props;return{mode:Ht.mode==="horizontal"?"vertical":Ht.mode,visible:Ne.props.isOpen,level:Ht.level+1,inlineIndent:Ht.inlineIndent,focusable:!1,onClick:Ne.onSubMenuClick,onSelect:Ne.onSelect,onDeselect:Ne.onDeselect,onDestroy:Ne.onDestroy,selectedKeys:Ht.selectedKeys,eventKey:"".concat(Ht.eventKey,"-menu-"),openKeys:Ht.openKeys,motion:Ht.motion,onOpenChange:Ne.onOpenChange,subMenuOpenDelay:Ht.subMenuOpenDelay,parentMenu:Object(y.a)(Ne),subMenuCloseDelay:Ht.subMenuCloseDelay,forceSubMenuRender:Ht.forceSubMenuRender,triggerSubMenuAction:Ht.triggerSubMenuAction,builtinPlacements:Ht.builtinPlacements,defaultActiveFirst:Ht.store.getState().defaultActiveFirst[Z(Ht.eventKey)],multiple:Ht.multiple,prefixCls:Ht.rootPrefixCls,id:Ne.internalMenuId,manualRef:Ne.saveMenuInstance,itemIcon:Ht.itemIcon,expandIcon:Ht.expandIcon,direction:Ht.direction}},Ne.getMotion=function(gt,Ht){var Ut=Object(y.a)(Ne),Nt=Ut.haveRendered,Wt=Ne.props,Qt=Wt.motion,pn=Wt.rootPrefixCls,qt=Object(I.a)(Object(I.a)({},Qt),{},{leavedClassName:"".concat(pn,"-hidden"),removeOnLeave:!1,motionAppear:Nt||!Ht||gt!=="inline"});return qt};var Ge=st.store,yt=st.eventKey,pt=Ge.getState(),jt=pt.defaultActiveFirst;Ne.isRootMenu=!1;var Bt=!1;return jt&&(Bt=jt[yt]),oe(Ge,yt,Bt),Ne}return Object(T.a)(ft,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Ne=this,Ge=this.props,yt=Ge.mode,pt=Ge.parentMenu,jt=Ge.manualRef;if(jt&&jt(this),yt!=="horizontal"||!pt.isRootMenu||!this.props.isOpen)return;this.minWidthTimeout=setTimeout(function(){return Ne.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var Ne=this.props,Ge=Ne.onDestroy,yt=Ne.eventKey;Ge&&Ge(yt),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(Ne){var Ge=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 _.createElement("div",null);var jt=yt.direction;return _.createElement(ae.default,Object.assign({visible:yt.visible},pt),function(Bt){var gt=Bt.className,Ht=Bt.style,Ut=c()("".concat(yt.prefixCls,"-sub"),gt,Object(n.a)({},"".concat(yt.prefixCls,"-rtl"),jt==="rtl"));return _.createElement(Ye,Object.assign({},yt,{id:Ge.internalMenuId,className:Ut,style:Ht}),Ne)})}},{key:"render",value:function(){var Ne,Ge=Object(I.a)({},this.props),yt=Ge.isOpen,pt=this.getPrefixCls(),jt=Ge.mode==="inline",Bt=c()(pt,"".concat(pt,"-").concat(Ge.mode),(Ne={},Object(n.a)(Ne,Ge.className,!!Ge.className),Object(n.a)(Ne,this.getOpenClassName(),yt),Object(n.a)(Ne,this.getActiveClassName(),Ge.active||yt&&!jt),Object(n.a)(Ne,this.getDisabledClassName(),Ge.disabled),Object(n.a)(Ne,this.getSelectedClassName(),this.isChildrenSelected()),Ne));this.internalMenuId||(Ge.eventKey?this.internalMenuId="".concat(Ge.eventKey,"$Menu"):(Q+=1,this.internalMenuId="$__$".concat(Q,"$Menu")));var gt={},Ht={},Ut={};Ge.disabled||(gt={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},Ht={onClick:this.onTitleClick},Ut={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Nt={},Wt=Ge.direction;jt&&(Wt==="rtl"?Nt.paddingRight=Ge.inlineIndent*Ge.level:Nt.paddingLeft=Ge.inlineIndent*Ge.level);var Qt={};this.props.isOpen&&(Qt={"aria-owns":this.internalMenuId});var pn=null;Ge.mode!=="horizontal"&&(pn=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(pn=_.createElement(this.props.expandIcon,Object(I.a)({},this.props))));var qt=_.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:Nt,className:"".concat(pt,"-title"),role:"button"},Ut,Ht,{"aria-expanded":yt},Qt,{"aria-haspopup":"true",title:typeof Ge.title=="string"?Ge.title:void 0}),Ge.title,pn||_.createElement("i",{className:"".concat(pt,"-arrow")})),en=this.renderChildren(Ge.children),qn=Ge.parentMenu.isRootMenu?Ge.parentMenu.props.getPopupContainer:function(Tn){return Tn.parentNode},$t=Y[Ge.mode],cn=Ge.popupOffset?{offset:Ge.popupOffset}:{},mn=Ge.mode==="inline"?"":Ge.popupClassName;mn+=Wt==="rtl"?" ".concat(pt,"-rtl"):"";var yn=Ge.disabled,Vn=Ge.triggerSubMenuAction,$n=Ge.subMenuOpenDelay,zt=Ge.forceSubMenuRender,xn=Ge.subMenuCloseDelay,wr=Ge.builtinPlacements;Ce.forEach(function(Tn){return delete Ge[Tn]}),delete Ge.onClick;var nr=Wt==="rtl"?Object.assign({},ie,wr):Object.assign({},Fe,wr);return delete Ge.direction,_.createElement("li",Object.assign({},Ge,gt,{className:Bt,role:"menuitem"}),jt&&qt,jt&&en,!jt&&_.createElement(be.a,{prefixCls:pt,popupClassName:c()("".concat(pt,"-popup"),mn),getPopupContainer:qn,builtinPlacements:nr,popupPlacement:$t,popupVisible:yt,popupAlign:cn,popup:en,action:yn?[]:[Vn],mouseEnterDelay:$n,mouseLeaveDelay:xn,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:zt},qt))}}]),ft}(_.Component);le.defaultProps={onMouseEnter:L,onMouseLeave:L,onTitleMouseEnter:L,onTitleMouseLeave:L,onTitleClick:L,manualRef:L,mode:"vertical",title:""};var Ee=Object(p.b)(function(rt,xt){var ft=rt.openKeys,st=rt.activeKey,Ne=rt.selectedKeys,Ge=xt.eventKey,yt=xt.subMenuKey;return{isOpen:ft.indexOf(Ge)>-1,active:st[yt]===Ge,selectedKeys:Ne}})(le);Ee.isSubMenu=!0;var Le=Ee,ge="menuitem-overflowed",De=.5,_e=function(rt){Object(g.a)(ft,rt);var xt=Object(s.a)(ft);function ft(){var st;return Object(v.a)(this,ft),st=xt.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 Ne=st.props.prefixCls,Ge=me.findDOMNode(Object(y.a)(st));return Ge?[].slice.call(Ge.children).filter(function(yt){return yt.className.split(" ").indexOf("".concat(Ne,"-overflowed-submenu"))<0}):[]},st.getOverflowedSubMenuItem=function(Ne,Ge,yt){var pt=st.props,jt=pt.overflowedIndicator,Bt=pt.level,gt=pt.mode,Ht=pt.prefixCls,Ut=pt.theme;if(Bt!==1||gt!=="horizontal")return null;var Nt=st.props.children[0],Wt=Nt.props,Qt=Wt.children,pn=Wt.title,qt=Wt.style,en=Object(pe.a)(Wt,["children","title","style"]),qn=Object(I.a)({},qt),$t="".concat(Ne,"-overflowed-indicator"),cn="".concat(Ne,"-overflowed-indicator");Ge.length===0&&yt!==!0?qn=Object(I.a)(Object(I.a)({},qn),{},{display:"none"}):yt&&(qn=Object(I.a)(Object(I.a)({},qn),{},{visibility:"hidden",position:"absolute"}),$t="".concat($t,"-placeholder"),cn="".concat(cn,"-placeholder"));var mn=Ut?"".concat(Ht,"-").concat(Ut):"",yn={};return Ce.forEach(function(Vn){en[Vn]!==void 0&&(yn[Vn]=en[Vn])}),_.createElement(Le,Object.assign({title:jt,className:"".concat(Ht,"-overflowed-submenu"),popupClassName:mn},yn,{key:$t,eventKey:cn,disabled:!1,style:qn}),Ge)},st.setChildrenWidthAndResize=function(){if(st.props.mode!=="horizontal")return;var Ne=me.findDOMNode(Object(y.a)(st));if(!Ne)return;var Ge=Ne.children;if(!Ge||Ge.length===0)return;var yt=Ne.children[Ge.length-1];te(yt,"display","inline-block");var pt=st.getMenuItemNodes(),jt=pt.filter(function(Bt){return Bt.className.split(" ").indexOf(ge)>=0});jt.forEach(function(Bt){te(Bt,"display","inline-block")}),st.menuItemSizes=pt.map(function(Bt){return ke(Bt,!0)}),jt.forEach(function(Bt){te(Bt,"display","none")}),st.overflowedIndicatorWidth=ke(Ne.children[Ne.children.length-1],!0),st.originalTotalWidth=st.menuItemSizes.reduce(function(Bt,gt){return Bt+gt},0),st.handleResize(),te(yt,"display","none")},st.handleResize=function(){if(st.props.mode!=="horizontal")return;var Ne=me.findDOMNode(Object(y.a)(st));if(!Ne)return;var Ge=ke(Ne);st.overflowedItems=[];var yt=0,pt;st.originalTotalWidth>Ge+De&&(pt=-1,st.menuItemSizes.forEach(function(jt){yt+=jt,yt+st.overflowedIndicatorWidth<=Ge&&(pt+=1)})),st.setState({lastVisibleIndex:pt})},st}return Object(T.a)(ft,[{key:"componentDidMount",value:function(){var Ne=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Ge=me.findDOMNode(this);if(!Ge)return;this.resizeObserver=new se.default(function(yt){yt.forEach(function(){var pt=Ne.cancelFrameId;cancelAnimationFrame(pt),Ne.cancelFrameId=requestAnimationFrame(Ne.setChildrenWidthAndResize)})}),[].slice.call(Ge.children).concat(Ge).forEach(function(yt){Ne.resizeObserver.observe(yt)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){Ne.resizeObserver.disconnect(),[].slice.call(Ge.children).concat(Ge).forEach(function(yt){Ne.resizeObserver.observe(yt)}),Ne.setChildrenWidthAndResize()}),this.mutationObserver.observe(Ge,{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(Ne){var Ge=this,yt=this.state.lastVisibleIndex;return(Ne||[]).reduce(function(pt,jt,Bt){var gt=jt;if(Ge.props.mode==="horizontal"){var Ht=Ge.getOverflowedSubMenuItem(jt.props.eventKey,[]);yt!==void 0&&Ge.props.className.indexOf("".concat(Ge.props.prefixCls,"-root"))!==-1&&(Bt>yt&&(gt=_.cloneElement(jt,{style:{display:"none"},eventKey:"".concat(jt.props.eventKey,"-hidden"),className:"".concat(ge)})),Bt===yt+1&&(Ge.overflowedItems=Ne.slice(yt+1).map(function(Nt){return _.cloneElement(Nt,{key:Nt.props.eventKey,mode:"vertical-left"})}),Ht=Ge.getOverflowedSubMenuItem(jt.props.eventKey,Ge.overflowedItems)));var Ut=[].concat(Object(Te.a)(pt),[Ht,gt]);return Bt===Ne.length-1&&Ut.push(Ge.getOverflowedSubMenuItem(jt.props.eventKey,[],!0)),Ut}return[].concat(Object(Te.a)(pt),[gt])},[])}},{key:"render",value:function(){var Ne=this.props,Ge=Ne.visible,yt=Ne.prefixCls,pt=Ne.overflowedIndicator,jt=Ne.mode,Bt=Ne.level,gt=Ne.tag,Ht=Ne.children,Ut=Ne.theme,Nt=Object(pe.a)(Ne,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),Wt=gt;return _.createElement(Wt,Object.assign({},Nt),this.renderChildren(Ht))}}]),ft}(_.Component);_e.defaultProps={tag:"div",className:""};var Xe=_e;function tt(rt){return rt.length?rt.every(function(xt){return!!xt.props.disabled}):!0}function ze(rt,xt,ft){var st=rt.getState();rt.setState({activeKey:Object(I.a)(Object(I.a)({},st.activeKey),{},Object(n.a)({},xt,ft))})}function Me(rt){return rt.eventKey||"0-menu-"}function Et(rt,xt){var ft=xt,st=rt.children,Ne=rt.eventKey;if(ft){var Ge;if(re(st,function(yt,pt){yt&&yt.props&&!yt.props.disabled&&ft===B(yt,Ne,pt)&&(Ge=!0)}),Ge)return ft}return ft=null,rt.defaultActiveFirst&&re(st,function(yt,pt){!ft&&yt&&!yt.props.disabled&&(ft=B(yt,Ne,pt))}),ft}function Oe(rt){if(rt){var xt=this.instanceArray.indexOf(rt);xt!==-1?this.instanceArray[xt]=rt:this.instanceArray.push(rt)}}var Ve=function(rt){Object(g.a)(ft,rt);var xt=Object(s.a)(ft);function ft(st){var Ne;return Object(v.a)(this,ft),Ne=xt.call(this,st),Ne.onKeyDown=function(Ge,yt){var pt=Ge.keyCode,jt;if(Ne.getFlatInstanceArray().forEach(function(gt){gt&>.props.active&>.onKeyDown&&(jt=gt.onKeyDown(Ge))}),jt)return 1;var Bt=null;return(pt===l.a.UP||pt===l.a.DOWN)&&(Bt=Ne.step(pt===l.a.UP?-1:1)),Bt?(Ge.preventDefault(),ze(Ne.props.store,Me(Ne.props),Bt.props.eventKey),typeof yt=="function"&&yt(Bt),1):void 0},Ne.onItemHover=function(Ge){var yt=Ge.key,pt=Ge.hover;ze(Ne.props.store,Me(Ne.props),pt?yt:null)},Ne.onDeselect=function(Ge){Ne.props.onDeselect(Ge)},Ne.onSelect=function(Ge){Ne.props.onSelect(Ge)},Ne.onClick=function(Ge){Ne.props.onClick(Ge)},Ne.onOpenChange=function(Ge){Ne.props.onOpenChange(Ge)},Ne.onDestroy=function(Ge){Ne.props.onDestroy(Ge)},Ne.getFlatInstanceArray=function(){return Ne.instanceArray},Ne.step=function(Ge){var yt=Ne.getFlatInstanceArray(),pt=Ne.props.store.getState().activeKey[Me(Ne.props)],jt=yt.length;if(!jt)return null;Ge<0&&(yt=yt.concat().reverse());var Bt=-1;if(yt.every(function(Nt,Wt){return Nt&&Nt.props.eventKey===pt?(Bt=Wt,!1):!0}),!Ne.props.defaultActiveFirst&&Bt!==-1&&tt(yt.slice(Bt,jt-1)))return;var gt=(Bt+1)%jt,Ht=gt;do{var Ut=yt[Ht];if(!Ut||Ut.props.disabled)Ht=(Ht+1)%jt;else return Ut}while(Ht!==gt);return null},Ne.renderCommonMenuItem=function(Ge,yt,pt){var jt=Ne.props.store.getState(),Bt=Object(y.a)(Ne),gt=Bt.props,Ht=B(Ge,gt.eventKey,yt),Ut=Ge.props;if(!Ut||typeof Ge.type=="string")return Ge;var Nt=Ht===jt.activeKey,Wt=Object(I.a)(Object(I.a)({mode:Ut.mode||gt.mode,level:gt.level,inlineIndent:gt.inlineIndent,renderMenuItem:Ne.renderMenuItem,rootPrefixCls:gt.prefixCls,index:yt,parentMenu:gt.parentMenu,manualRef:Ut.disabled?void 0:Object(r.a)(Ge.ref,Oe.bind(Object(y.a)(Ne))),eventKey:Ht,active:!Ut.disabled&&Nt,multiple:gt.multiple,onClick:function(pn){(Ut.onClick||L)(pn),Ne.onClick(pn)},onItemHover:Ne.onItemHover,motion:gt.motion,subMenuOpenDelay:gt.subMenuOpenDelay,subMenuCloseDelay:gt.subMenuCloseDelay,forceSubMenuRender:gt.forceSubMenuRender,onOpenChange:Ne.onOpenChange,onDeselect:Ne.onDeselect,onSelect:Ne.onSelect,builtinPlacements:gt.builtinPlacements,itemIcon:Ut.itemIcon||Ne.props.itemIcon,expandIcon:Ut.expandIcon||Ne.props.expandIcon},pt),{},{direction:gt.direction});return(gt.mode==="inline"||Re())&&(Wt.triggerSubMenuAction="click"),_.cloneElement(Ge,Wt)},Ne.renderMenuItem=function(Ge,yt,pt){if(!Ge)return null;var jt=Ne.props.store.getState(),Bt={openKeys:jt.openKeys,selectedKeys:jt.selectedKeys,triggerSubMenuAction:Ne.props.triggerSubMenuAction,subMenuKey:pt};return Ne.renderCommonMenuItem(Ge,yt,Bt)},st.store.setState({activeKey:Object(I.a)(Object(I.a)({},st.store.getState().activeKey),{},Object(n.a)({},st.eventKey,Et(st,st.activeKey)))}),Ne.instanceArray=[],Ne}return Object(T.a)(ft,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(Ne){return this.props.visible||Ne.visible||this.props.className!==Ne.className||!t()(this.props.style,Ne.style)}},{key:"componentDidUpdate",value:function(Ne){var Ge=this.props,yt="activeKey"in Ge?Ge.activeKey:Ge.store.getState().activeKey[Me(Ge)],pt=Et(Ge,yt);if(pt!==yt)ze(Ge.store,Me(Ge),pt);else if("activeKey"in Ne){var jt=Et(Ne,Ne.activeKey);pt!==jt&&ze(Ge.store,Me(Ge),pt)}}},{key:"render",value:function(){var Ne=this,Ge=Object(o.a)({},this.props);this.instanceArray=[];var yt=c()(Ge.prefixCls,Ge.className,"".concat(Ge.prefixCls,"-").concat(Ge.mode)),pt={className:yt,role:Ge.role||"menu"};Ge.id&&(pt.id=Ge.id),Ge.focusable&&(pt.tabIndex=0,pt.onKeyDown=this.onKeyDown);var jt=Ge.prefixCls,Bt=Ge.eventKey,gt=Ge.visible,Ht=Ge.level,Ut=Ge.mode,Nt=Ge.overflowedIndicator,Wt=Ge.theme;return Ce.forEach(function(Qt){return delete Ge[Qt]}),delete Ge.onClick,_.createElement(Xe,Object.assign({},Ge,{prefixCls:jt,mode:Ut,tag:"ul",level:Ht,theme:Wt,visible:gt,overflowedIndicator:Nt},pt),_.Children.map(Ge.children,function(Qt,pn){return Ne.renderMenuItem(Qt,pn,Bt||"0-menu-")}))}}]),ft}(_.Component);Ve.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:L};var Je=Object(p.b)()(Ve),Ye=Je,Pe=b("Kwbf");function He(rt,xt,ft){var st=rt.prefixCls,Ne=rt.motion,Ge=rt.defaultMotions,yt=Ge===void 0?{}:Ge,pt=rt.openAnimation,jt=rt.openTransitionName,Bt=xt.switchingModeFromInline;if(Ne)return Ne;if(Object(d.a)(pt)==="object"&&pt)Object(Pe.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(jt)return{motionName:jt};var gt=yt[ft];return gt||(Bt?null:yt.other)}var ve=function(rt){Object(g.a)(ft,rt);var xt=Object(s.a)(ft);function ft(st){var Ne;Object(v.a)(this,ft),Ne=xt.call(this,st),Ne.inlineOpenKeys=[],Ne.onSelect=function(pt){var jt=Object(y.a)(Ne),Bt=jt.props;if(Bt.selectable){var gt=Ne.store.getState(),Ht=gt.selectedKeys,Ut=pt.key;Bt.multiple?Ht=Ht.concat([Ut]):Ht=[Ut],"selectedKeys"in Bt||Ne.store.setState({selectedKeys:Ht}),Bt.onSelect(Object(I.a)(Object(I.a)({},pt),{},{selectedKeys:Ht}))}},Ne.onClick=function(pt){var jt=Ne.getRealMenuMode(),Bt=Object(y.a)(Ne),gt=Bt.store,Ht=Bt.props.onOpenChange;jt!=="inline"&&!("openKeys"in Ne.props)&&(gt.setState({openKeys:[]}),Ht([])),Ne.props.onClick(pt)},Ne.onKeyDown=function(pt,jt){Ne.innerMenu.getWrappedInstance().onKeyDown(pt,jt)},Ne.onOpenChange=function(pt){var jt=Object(y.a)(Ne),Bt=jt.props,gt=Ne.store.getState().openKeys.concat(),Ht=!1,Ut=function(Wt){var Qt=!1;if(Wt.open)Qt=gt.indexOf(Wt.key)===-1,Qt&>.push(Wt.key);else{var pn=gt.indexOf(Wt.key);Qt=pn!==-1,Qt&>.splice(pn,1)}Ht=Ht||Qt};Array.isArray(pt)?pt.forEach(Ut):Ut(pt),Ht&&("openKeys"in Ne.props||Ne.store.setState({openKeys:gt}),Bt.onOpenChange(gt))},Ne.onDeselect=function(pt){var jt=Object(y.a)(Ne),Bt=jt.props;if(Bt.selectable){var gt=Ne.store.getState().selectedKeys.concat(),Ht=pt.key,Ut=gt.indexOf(Ht);Ut!==-1&>.splice(Ut,1),"selectedKeys"in Bt||Ne.store.setState({selectedKeys:gt}),Bt.onDeselect(Object(I.a)(Object(I.a)({},pt),{},{selectedKeys:gt}))}},Ne.onMouseEnter=function(pt){Ne.restoreModeVerticalFromInline();var jt=Ne.props.onMouseEnter;jt&&jt(pt)},Ne.onTransitionEnd=function(pt){var jt=pt.propertyName==="width"&&pt.target===pt.currentTarget,Bt=pt.target.className,gt=Object.prototype.toString.call(Bt)==="[object SVGAnimatedString]"?Bt.animVal:Bt,Ht=pt.propertyName==="font-size"&>.indexOf("anticon")>=0;(jt||Ht)&&Ne.restoreModeVerticalFromInline()},Ne.setInnerMenu=function(pt){Ne.innerMenu=pt},Ne.isRootMenu=!0;var Ge=st.defaultSelectedKeys,yt=st.defaultOpenKeys;return"selectedKeys"in st&&(Ge=st.selectedKeys||[]),"openKeys"in st&&(yt=st.openKeys||[]),Ne.store=Object(p.c)({selectedKeys:Ge,openKeys:yt,activeKey:{"0-menu-":Et(st,st.activeKey)}}),Ne.state={switchingModeFromInline:!1},Ne}return Object(T.a)(ft,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(Ne){this.updateOpentKeysWhenSwitchMode(Ne),this.updateMiniStore();var Ge=this.props,yt=Ge.siderCollapsed,pt=Ge.inlineCollapsed,jt=Ge.onOpenChange;(!Ne.inlineCollapsed&&pt||!Ne.siderCollapsed&&yt)&&jt([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(Ne){var Ge=this.props,yt=this.store,pt=this.inlineOpenKeys,jt=yt.getState(),Bt={};Ne.mode==="inline"&&Ge.mode!=="inline"&&this.setState({switchingModeFromInline:!0}),"openKeys"in Ge||((Ge.inlineCollapsed&&!Ne.inlineCollapsed||Ge.siderCollapsed&&!Ne.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=jt.openKeys.concat(),Bt.openKeys=[]),(!Ge.inlineCollapsed&&Ne.inlineCollapsed||!Ge.siderCollapsed&&Ne.siderCollapsed)&&(Bt.openKeys=pt,this.inlineOpenKeys=[])),Object.keys(Bt).length&&yt.setState(Bt)}},{key:"updateMenuDisplay",value:function(){var Ne=this.props.collapsedWidth,Ge=this.store,yt=this.prevOpenKeys,pt=this.getInlineCollapsed()&&(Ne===0||Ne==="0"||Ne==="0px");pt?(this.prevOpenKeys=Ge.getState().openKeys.concat(),this.store.setState({openKeys:[]})):yt&&(this.store.setState({openKeys:yt}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var Ne=this.props.mode,Ge=this.state.switchingModeFromInline,yt=this.getInlineCollapsed();return Ge&&yt?"inline":yt?"vertical":Ne}},{key:"getInlineCollapsed",value:function(){var Ne=this.props,Ge=Ne.inlineCollapsed,yt=Ne.siderCollapsed;return yt!==void 0?yt:Ge}},{key:"restoreModeVerticalFromInline",value:function(){var Ne=this.state.switchingModeFromInline;Ne&&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 Ne=Object(I.a)({},Object(e.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Ge=this.getRealMenuMode();return Ne.className+=" ".concat(Ne.prefixCls,"-root"),Ne.direction==="rtl"&&(Ne.className+=" ".concat(Ne.prefixCls,"-rtl")),Ne=Object(I.a)(Object(I.a)({},Ne),{},{mode:Ge,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:He(this.props,this.state,Ge)}),delete Ne.openAnimation,delete Ne.openTransitionName,_.createElement(p.a,{store:this.store},_.createElement(Ye,Object.assign({},Ne,{ref:this.setInnerMenu}),this.props.children))}}]),ft}(_.Component);ve.defaultProps={selectable:!0,onClick:L,onSelect:L,onOpenChange:L,onDeselect:L,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:_.createElement("span",null,"\xB7\xB7\xB7")};var xe=ve,de=function(rt){Object(g.a)(ft,rt);var xt=Object(s.a)(ft);function ft(){var st;return Object(v.a)(this,ft),st=xt.apply(this,arguments),st.onKeyDown=function(Ne){var Ge=Ne.keyCode;return Ge===l.a.ENTER?(st.onClick(Ne),!0):void 0},st.onMouseLeave=function(Ne){var Ge=st.props,yt=Ge.eventKey,pt=Ge.onItemHover,jt=Ge.onMouseLeave;pt({key:yt,hover:!1}),jt({key:yt,domEvent:Ne})},st.onMouseEnter=function(Ne){var Ge=st.props,yt=Ge.eventKey,pt=Ge.onItemHover,jt=Ge.onMouseEnter;pt({key:yt,hover:!0}),jt({key:yt,domEvent:Ne})},st.onClick=function(Ne){var Ge=st.props,yt=Ge.eventKey,pt=Ge.multiple,jt=Ge.onClick,Bt=Ge.onSelect,gt=Ge.onDeselect,Ht=Ge.isSelected,Ut={key:yt,keyPath:[yt],item:Object(y.a)(st),domEvent:Ne};jt(Ut),pt?Ht?gt(Ut):Bt(Ut):Ht||Bt(Ut)},st.saveNode=function(Ne){st.node=Ne},st}return Object(T.a)(ft,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var Ne=this.props;Ne.onDestroy&&Ne.onDestroy(Ne.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 Ne,Ge=Object(I.a)({},this.props),yt=c()(this.getPrefixCls(),Ge.className,(Ne={},Object(n.a)(Ne,this.getActiveClassName(),!Ge.disabled&&Ge.active),Object(n.a)(Ne,this.getSelectedClassName(),Ge.isSelected),Object(n.a)(Ne,this.getDisabledClassName(),Ge.disabled),Ne)),pt=Object(I.a)(Object(I.a)({},Ge.attribute),{},{title:typeof Ge.title=="string"?Ge.title:void 0,className:yt,role:Ge.role||"menuitem","aria-disabled":Ge.disabled});Ge.role==="option"?pt=Object(I.a)(Object(I.a)({},pt),{},{role:"option","aria-selected":Ge.isSelected}):(Ge.role===null||Ge.role==="none")&&(pt.role="none");var jt={onClick:Ge.disabled?null:this.onClick,onMouseLeave:Ge.disabled?null:this.onMouseLeave,onMouseEnter:Ge.disabled?null:this.onMouseEnter},Bt=Object(I.a)({},Ge.style);Ge.mode==="inline"&&(Ge.direction==="rtl"?Bt.paddingRight=Ge.inlineIndent*Ge.level:Bt.paddingLeft=Ge.inlineIndent*Ge.level),Ce.forEach(function(Ht){return delete Ge[Ht]}),delete Ge.direction;var gt=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(gt=_.createElement(this.props.itemIcon,this.props)),_.createElement("li",Object.assign({},Object(e.default)(Ge,["onClick","onMouseEnter","onMouseLeave","onSelect"]),pt,jt,{style:Bt,ref:this.saveNode}),Ge.children,gt)}}]),ft}(_.Component);de.isMenuItem=!0,de.defaultProps={onSelect:L,onMouseEnter:L,onMouseLeave:L,manualRef:L};var je=Object(p.b)(function(rt,xt){var ft=rt.activeKey,st=rt.selectedKeys,Ne=xt.eventKey,Ge=xt.subMenuKey;return{active:ft[Ge]===Ne,isSelected:st.indexOf(Ne)!==-1}})(de),Qe=je,ne=function(rt){Object(g.a)(ft,rt);var xt=Object(s.a)(ft);function ft(){var st;return Object(v.a)(this,ft),st=xt.apply(this,arguments),st.renderInnerMenuItem=function(Ne){var Ge=st.props,yt=Ge.renderMenuItem,pt=Ge.index;return yt(Ne,pt,st.props.subMenuKey)},st}return Object(T.a)(ft,[{key:"render",value:function(){var Ne=Object(o.a)({},this.props),Ge=Ne.className,yt=Ge===void 0?"":Ge,pt=Ne.rootPrefixCls,jt="".concat(pt,"-item-group-title"),Bt="".concat(pt,"-item-group-list"),gt=Ne.title,Ht=Ne.children;return Ce.forEach(function(Ut){return delete Ne[Ut]}),delete Ne.onClick,delete Ne.direction,_.createElement("li",Object.assign({},Ne,{className:"".concat(yt," ").concat(pt,"-item-group")}),_.createElement("div",{className:jt,title:typeof gt=="string"?gt:void 0},gt),_.createElement("ul",{className:Bt},_.Children.map(Ht,this.renderInnerMenuItem)))}}]),ft}(_.Component);ne.isMenuItemGroup=!0,ne.defaultProps={disabled:!0};var Ze=ne,lt=function(xt){var ft=xt.className,st=xt.rootPrefixCls,Ne=xt.style;return _.createElement("li",{className:"".concat(ft," ").concat(st,"-item-divider"),style:Ne})};lt.defaultProps={disabled:!0,className:"",style:{}};var Be=lt,$e=H.e=xe},"1q3G":function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.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(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("MlIO"))})(this,function(I){return function(){var v=I,T=v.lib,y=T.Hasher,g=v.x64,s=g.Word,_=g.WordArray,p=v.algo;function e(){return s.create.apply(s,arguments)}var o=[e(1116352408,3609767458),e(1899447441,602891725),e(3049323471,3964484399),e(3921009573,2173295548),e(961987163,4081628472),e(1508970993,3053834265),e(2453635748,2937671579),e(2870763221,3664609560),e(3624381080,2734883394),e(310598401,1164996542),e(607225278,1323610764),e(1426881987,3590304994),e(1925078388,4068182383),e(2162078206,991336113),e(2614888103,633803317),e(3248222580,3479774868),e(3835390401,2666613458),e(4022224774,944711139),e(264347078,2341262773),e(604807628,2007800933),e(770255983,1495990901),e(1249150122,1856431235),e(1555081692,3175218132),e(1996064986,2198950837),e(2554220882,3999719339),e(2821834349,766784016),e(2952996808,2566594879),e(3210313671,3203337956),e(3336571891,1034457026),e(3584528711,2466948901),e(113926993,3758326383),e(338241895,168717936),e(666307205,1188179964),e(773529912,1546045734),e(1294757372,1522805485),e(1396182291,2643833823),e(1695183700,2343527390),e(1986661051,1014477480),e(2177026350,1206759142),e(2456956037,344077627),e(2730485921,1290863460),e(2820302411,3158454273),e(3259730800,3505952657),e(3345764771,106217008),e(3516065817,3606008344),e(3600352804,1432725776),e(4094571909,1467031594),e(275423344,851169720),e(430227734,3100823752),e(506948616,1363258195),e(659060556,3750685593),e(883997877,3785050280),e(958139571,3318307427),e(1322822218,3812723403),e(1537002063,2003034995),e(1747873779,3602036899),e(1955562222,1575990012),e(2024104815,1125592928),e(2227730452,2716904306),e(2361852424,442776044),e(2428436474,593698344),e(2756734187,3733110249),e(3204031479,2999351573),e(3329325298,3815920427),e(3391569614,3928383900),e(3515267271,566280711),e(3940187606,3454069534),e(4118630271,4000239992),e(116418474,1914138554),e(174292421,2731055270),e(289380356,3203993006),e(460393269,320620315),e(685471733,587496836),e(852142971,1086792851),e(1017036298,365543100),e(1126000580,2618297676),e(1288033470,3409855158),e(1501505948,4234509866),e(1607167915,987167468),e(1816402316,1246189591)],n=[];(function(){for(var r=0;r<80;r++)n[r]=e()})();var l=p.SHA512=y.extend({_doReset:function(){this._hash=new _.init([new s.init(1779033703,4089235720),new s.init(3144134277,2227873595),new s.init(1013904242,4271175723),new s.init(2773480762,1595750129),new s.init(1359893119,2917565137),new s.init(2600822924,725511199),new s.init(528734635,4215389547),new s.init(1541459225,327033209)])},_doProcessBlock:function(r,i){for(var t=this._hash.words,a=t[0],c=t[1],d=t[2],f=t[3],h=t[4],u=t[5],E=t[6],x=t[7],O=a.high,C=a.low,w=c.high,S=c.low,A=d.high,D=d.low,M=f.high,N=f.low,P=h.high,z=h.low,X=u.high,k=u.low,F=E.high,U=E.low,L=x.high,B=x.low,Z=O,re=C,he=w,Ce=S,ke=A,te=D,Re=M,Te=N,pe=P,me=z,se=X,be=k,ae=F,fe=U,Fe=L,ie=B,q=0;q<80;q++){var Q,Y,oe=n[q];if(q<16)Y=oe.high=r[i+q*2]|0,Q=oe.low=r[i+q*2+1]|0;else{var le=n[q-15],Ee=le.high,Le=le.low,ge=(Ee>>>1|Le<<31)^(Ee>>>8|Le<<24)^Ee>>>7,De=(Le>>>1|Ee<<31)^(Le>>>8|Ee<<24)^(Le>>>7|Ee<<25),_e=n[q-2],Xe=_e.high,tt=_e.low,ze=(Xe>>>19|tt<<13)^(Xe<<3|tt>>>29)^Xe>>>6,Me=(tt>>>19|Xe<<13)^(tt<<3|Xe>>>29)^(tt>>>6|Xe<<26),Et=n[q-7],Oe=Et.high,Ve=Et.low,Je=n[q-16],Ye=Je.high,Pe=Je.low;Q=De+Ve,Y=ge+Oe+(Q>>>0<De>>>0?1:0),Q=Q+Me,Y=Y+ze+(Q>>>0<Me>>>0?1:0),Q=Q+Pe,Y=Y+Ye+(Q>>>0<Pe>>>0?1:0),oe.high=Y,oe.low=Q}var He=pe&se^~pe&ae,ve=me&be^~me&fe,xe=Z&he^Z&ke^he&ke,de=re&Ce^re&te^Ce&te,je=(Z>>>28|re<<4)^(Z<<30|re>>>2)^(Z<<25|re>>>7),Qe=(re>>>28|Z<<4)^(re<<30|Z>>>2)^(re<<25|Z>>>7),ne=(pe>>>14|me<<18)^(pe>>>18|me<<14)^(pe<<23|me>>>9),Ze=(me>>>14|pe<<18)^(me>>>18|pe<<14)^(me<<23|pe>>>9),lt=o[q],Be=lt.high,$e=lt.low,rt=ie+Ze,xt=Fe+ne+(rt>>>0<ie>>>0?1:0),rt=rt+ve,xt=xt+He+(rt>>>0<ve>>>0?1:0),rt=rt+$e,xt=xt+Be+(rt>>>0<$e>>>0?1:0),rt=rt+Q,xt=xt+Y+(rt>>>0<Q>>>0?1:0),ft=Qe+de,st=je+xe+(ft>>>0<Qe>>>0?1:0);Fe=ae,ie=fe,ae=se,fe=be,se=pe,be=me,me=Te+rt|0,pe=Re+xt+(me>>>0<Te>>>0?1:0)|0,Re=ke,Te=te,ke=he,te=Ce,he=Z,Ce=re,re=rt+ft|0,Z=xt+st+(re>>>0<rt>>>0?1:0)|0}C=a.low=C+re,a.high=O+Z+(C>>>0<re>>>0?1:0),S=c.low=S+Ce,c.high=w+he+(S>>>0<Ce>>>0?1:0),D=d.low=D+te,d.high=A+ke+(D>>>0<te>>>0?1:0),N=f.low=N+Te,f.high=M+Re+(N>>>0<Te>>>0?1:0),z=h.low=z+me,h.high=P+pe+(z>>>0<me>>>0?1:0),k=u.low=k+be,u.high=X+se+(k>>>0<be>>>0?1:0),U=E.low=U+fe,E.high=F+ae+(U>>>0<fe>>>0?1:0),B=x.low=B+ie,x.high=L+Fe+(B>>>0<ie>>>0?1:0)},_doFinalize:function(){var r=this._data,i=r.words,t=this._nDataBytes*8,a=r.sigBytes*8;i[a>>>5]|=128<<24-a%32,i[(a+128>>>10<<5)+30]=Math.floor(t/4294967296),i[(a+128>>>10<<5)+31]=t,r.sigBytes=i.length*4,this._process();var c=this._hash.toX32();return c},clone:function(){var r=y.clone.call(this);return r._hash=this._hash.clone(),r},blockSize:1024/32});v.SHA512=y._createHelper(l),v.HmacSHA512=y._createHmacHelper(l)}(),I.SHA512})},"24hK":function(j,H,b){"use strict";b.d(H,"a",function(){return v});class I{constructor(T){this.element=T,this.next=I.Undefined,this.prev=I.Undefined}}I.Undefined=new I(void 0);class v{constructor(){this._first=I.Undefined,this._last=I.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===I.Undefined}clear(){let T=this._first;for(;T!==I.Undefined;){const y=T.next;T.prev=I.Undefined,T.next=I.Undefined,T=y}this._first=I.Undefined,this._last=I.Undefined,this._size=0}unshift(T){return this._insert(T,!1)}push(T){return this._insert(T,!0)}_insert(T,y){const g=new I(T);if(this._first===I.Undefined)this._first=g,this._last=g;else if(y){const _=this._last;this._last=g,g.prev=_,_.next=g}else{const _=this._first;this._first=g,g.next=_,_.prev=g}this._size+=1;let s=!1;return()=>{s||(s=!0,this._remove(g))}}shift(){if(this._first===I.Undefined)return;{const T=this._first.element;return this._remove(this._first),T}}pop(){if(this._last===I.Undefined)return;{const T=this._last.element;return this._remove(this._last),T}}_remove(T){if(T.prev!==I.Undefined&&T.next!==I.Undefined){const y=T.prev;y.next=T.next,T.next.prev=y}else T.prev===I.Undefined&&T.next===I.Undefined?(this._first=I.Undefined,this._last=I.Undefined):T.next===I.Undefined?(this._last=this._last.prev,this._last.next=I.Undefined):T.prev===I.Undefined&&(this._first=this._first.next,this._first.prev=I.Undefined);this._size-=1}*[Symbol.iterator](){let T=this._first;for(;T!==I.Undefined;)yield T.element,T=T.next}}},"25Vc":function(j,H,b){j.exports={wrap:"wrap___3gf4v",title:"title___BnbVm",path:"path___1Prpu",colorBlue:"colorBlue___1sUTa"}},"3/fG":function(j,H,b){"use strict";b.d(H,"a",function(){return v});function I(T,y){let g;return y.length===0?g=T:g=T.replace(/\{(\d+)\}/g,function(s,_){const p=_[0];return typeof y[p]!="undefined"?y[p]:s}),g}function v(T,y,...g){return I(y,g)}},"34/K":function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;function I(g,s){if(!(g instanceof s))throw new TypeError("Cannot call a class as a function")}function v(g,s){for(var _=0;_<s.length;_++){var p=s[_];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(g,p.key,p)}}function T(g,s,_){return s&&v(g.prototype,s),_&&v(g,_),g}var y=function(){function g(){I(this,g),this._lines=0}return T(g,[{key:"decodeRect",value:function(_,p,e,o,n,l,r){this._lines===0&&(this._lines=o);var i=r==8?1:4,t=e*i;if(n.rQwait("RAW",t))return!1;var a=p+(o-this._lines),c=Math.min(this._lines,Math.floor(n.rQlen/t)),d=n.rQ,f=n.rQi;if(r==8){for(var h=e*c,u=new Uint8Array(h*4),E=0;E<h;E++)u[E*4+0]=(d[f+E]>>0&3)*255/3,u[E*4+1]=(d[f+E]>>2&3)*255/3,u[E*4+2]=(d[f+E]>>4&3)*255/3,u[E*4+4]=0;d=u,f=0}return l.blitImage(_,a,e,c,d,f),n.rQskipBytes(c*t),this._lines-=c,!(this._lines>0)}}]),g}();H.default=y},"362i":function(j,H,b){j.exports=b.p+"static/passpart.cc679602.png"},"3690":function(j,H,b){"use strict";function I(e){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(e)}Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;var v=y(b("Lo0S"));function T(){if(typeof WeakMap!="function")return null;var e=new WeakMap;return T=function(){return e},e}function y(e){if(e&&e.__esModule)return e;if(e===null||I(e)!=="object"&&typeof e!="function")return{default:e};var o=T();if(o&&o.has(e))return o.get(e);var n={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=l?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(n,r,i):n[r]=e[r]}return n.default=e,o&&o.set(e,n),n}function g(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}function s(e,o){for(var n=0;n<o.length;n++){var l=o[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}function _(e,o,n){return o&&s(e.prototype,o),n&&s(e,n),e}var p=function(){function e(){g(this,e),this._tiles=0,this._lastsubencoding=0}return _(e,[{key:"decodeRect",value:function(n,l,r,i,t,a,c){for(this._tiles===0&&(this._tilesX=Math.ceil(r/16),this._tilesY=Math.ceil(i/16),this._totalTiles=this._tilesX*this._tilesY,this._tiles=this._totalTiles);this._tiles>0;){var d=1;if(t.rQwait("HEXTILE",d))return!1;var f=t.rQ,h=t.rQi,u=f[h];if(u>30)throw new Error("Illegal hextile subencoding (subencoding: "+u+")");var E=this._totalTiles-this._tiles,x=E%this._tilesX,O=Math.floor(E/this._tilesX),C=n+x*16,w=l+O*16,S=Math.min(16,n+r-C),A=Math.min(16,l+i-w);if(u&1)d+=S*A*4;else if(u&2&&(d+=4),u&4&&(d+=4),u&8){if(d++,t.rQwait("HEXTILE",d))return!1;var D=f[h+d-1];u&16?d+=D*(4+2):d+=D*2}if(t.rQwait("HEXTILE",d))return!1;if(h++,u===0)this._lastsubencoding&1?v.Debug(" Ignoring blank after RAW"):a.fillRect(C,w,S,A,this._background);else if(u&1)a.blitImage(C,w,S,A,f,h),h+=d-1;else{if(u&2&&(this._background=[f[h],f[h+1],f[h+2],f[h+3]],h+=4),u&4&&(this._foreground=[f[h],f[h+1],f[h+2],f[h+3]],h+=4),a.startTile(C,w,S,A,this._background),u&8){var M=f[h];h++;for(var N=0;N<M;N++){var P=void 0;u&16?(P=[f[h],f[h+1],f[h+2],f[h+3]],h+=4):P=this._foreground;var z=f[h];h++;var X=z>>4,k=z&15,F=f[h];h++;var U=(F>>4)+1,L=(F&15)+1;a.subTile(X,k,U,L,P)}}a.finishTile()}t.rQi=h,this._lastsubencoding=u,this._tiles--}return!0}}]),e}();H.default=p},"3y9D":function(j,H,b){(function(I,v){j.exports=H=v(b("Ib8C"))})(this,function(I){return function(){var v=I,T=v.lib,y=T.WordArray,g=T.Hasher,s=v.algo,_=[],p=s.SHA1=g.extend({_doReset:function(){this._hash=new y.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,o){for(var n=this._hash.words,l=n[0],r=n[1],i=n[2],t=n[3],a=n[4],c=0;c<80;c++){if(c<16)_[c]=e[o+c]|0;else{var d=_[c-3]^_[c-8]^_[c-14]^_[c-16];_[c]=d<<1|d>>>31}var f=(l<<5|l>>>27)+a+_[c];c<20?f+=(r&i|~r&t)+1518500249:c<40?f+=(r^i^t)+1859775393:c<60?f+=(r&i|r&t|i&t)-1894007588:f+=(r^i^t)-899497514,a=t,t=i,i=r<<30|r>>>2,r=l,l=f}n[0]=n[0]+l|0,n[1]=n[1]+r|0,n[2]=n[2]+i|0,n[3]=n[3]+t|0,n[4]=n[4]+a|0},_doFinalize:function(){var e=this._data,o=e.words,n=this._nDataBytes*8,l=e.sigBytes*8;return o[l>>>5]|=128<<24-l%32,o[(l+64>>>9<<4)+14]=Math.floor(n/4294967296),o[(l+64>>>9<<4)+15]=n,e.sigBytes=o.length*4,this._process(),this._hash},clone:function(){var e=g.clone.call(this);return e._hash=this._hash.clone(),e}});v.SHA1=g._createHelper(p),v.HmacSHA1=g._createHmacHelper(p)}(),I.SHA1})},4:function(j,H){},"4K8j":function(j,H,b){"use strict";b.r(H);var I=b("14J3"),v=b("BMrR"),T=b("jCWc"),y=b("kPKH"),g=b("q1tI"),s=b.n(g),_=b("bntm"),p=b("1vsH"),e=b("0/SM"),o=b.n(e),n=b("2qtc"),l=b("kLXV"),r=b("+L6B"),i=b("2/Rp"),t=b("T2oS"),a=b("W9HT"),c=b("lUTK"),d=b("BvKs"),f=b("miYZ"),h=b("tsqr"),u=b("9og8"),E=b("5Dmo"),x=b("3S7+"),O=b("k1fw"),C=b("tJVT"),w=b("PpiC"),S=b("Znn+"),A=b("ZTPi"),D=b("WmNS"),M=b.n(D),N=b("5DcX"),P=b.n(N),z=b("Ty5D"),X=b("9kvl"),k=b("oBTY"),F=b("qVdP"),U=b("jsC+"),L=b("ozfa"),B=b("MJZm"),Z=b("IZBM"),re=b("P5Jw"),he=b("5NDa"),Ce=b("5rEg"),ke=b("y8nQ"),te=b("Vl3Y"),Re=b("FfZY"),Te=b.n(Re),pe=function(Ge){var yt=Ge.shixunsDetail,pt=Ge.globalSetting,jt=Ge.loading,Bt=Ge.user,gt=Ge.dispatch,Ht=Ge.taskData,Ut=Ge.isRepository,Nt=Object(w.a)(Ge,["shixunsDetail","globalSetting","loading","user","dispatch","taskData","isRepository"]),Wt=Object(z.h)(),Qt=Object(O.a)(Object(O.a)({},Object(z.i)()),Object(z.h)().query),pn=Object(g.useState)({}),qt=Object(C.a)(pn,2),en=qt[0],qn=qt[1],$t=Object(g.useRef)(),cn=te.a.useForm(),mn=Object(C.a)(cn,1),yn=mn[0],Vn=Object(g.useState)(""),$n=Object(C.a)(Vn,2),zt=$n[0],xn=$n[1];Object(g.useEffect)(function(){Nt.visible&&yn.resetFields()},[Nt.visible]),Object(g.useEffect)(function(){var Tn=sessionStorage.getItem("pathArray");if(Tn){var Yn=Tn.split(",").join("/"),ce=Yn.indexOf("/")===0?Yn.substr(1):Yn;xn(ce)}},[]),Object(g.useEffect)(function(){var Tn,Yn;$t.current=(Tn=Wt.pathname)===null||Tn===void 0||((Yn=Tn.split("/"))===null||Yn===void 0)?void 0:Yn[2]},[]);var wr=function(){var Tn=Object(u.a)(M.a.mark(function Yn(){var ce,V,J=arguments;return M.a.wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:return ce=J.length>0&&J[0]!==void 0?J[0]:{},Se.next=3,gt({type:"shixunsDetail/addRepositoryFile",payload:{id:Ht.myshixun.identifier,message:ce.commitMessage,content:"",path:(Nt.defaultPath?Nt.defaultPath+"/":"")+ce.path+"/"+(ce.file||".gitkeep"),secret_repository:Ut?void 0:!0}});case 3:V=Se.sent,(V==null?void 0:V.status)===0&&(h.b.success("\u6DFB\u52A0\u6210\u529F"),Nt.onOK({path:(Nt.defaultPath?Nt.defaultPath+"/":"")+ce.path+"/"+(ce.file||".gitkeep"),name:ce.path.split("/")[ce.path.split("/").length-1]}),Nt.onClose());case 5:case"end":return Se.stop()}},Yn)}));return function(){return Tn.apply(this,arguments)}}(),nr=function(){var Yn,ce;X.d.push("/shixuns/".concat($t.current,"/").concat((Yn=Wt.pathname)===null||Yn===void 0||((ce=Yn.split("/"))===null||ce===void 0)?void 0:ce[3]).concat(zt?"/master/shixun_show/".concat(zt):""))};return s.a.createElement(l.a,{width:"60%",centered:!0,visible:Nt.visible,wrapClassName:Te.a.modal,onOk:function(){yn.submit()},onCancel:Nt.onClose,title:"\u65B0\u5EFA\u6587\u4EF6\u5939"},s.a.createElement("section",{className:Te.a.bg},s.a.createElement("div",{className:Te.a.wrap},s.a.createElement(te.a,{className:"mt10",form:yn,scrollToFirstError:!0,layout:"vertical",onFinish:wr,onChange:function(){var Yn,ce,V,J,ee=Object(O.a)({},yn.getFieldsValue()),Se=ee==null||((Yn=ee.path)===null||Yn===void 0)?void 0:Yn.split(""),ue=ee==null||((ce=ee.file)===null||ce===void 0)?void 0:ce.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)),ue!=null&&(J=ue.filter(function(nt){return nt=="/"}))!==null&&J!==void 0&&J.length&&(ee.file=ee.file.substring(0,ee.path.length-1)),yn.setFieldsValue(Object(O.a)({},ee)),qn(ee)}},s.a.createElement(te.a.Item,{label:"\u6587\u4EF6\u5939\u540D\u79F0\uFF1A",name:"path"},s.a.createElement(v.a,null,s.a.createElement(y.a,null,s.a.createElement("span",{className:Te.a.filePath},Nt.defaultPath+"/")),s.a.createElement(y.a,{flex:"1"},s.a.createElement(te.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"}]},s.a.createElement(Ce.a,{placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5939\u540D\u79F0",size:"large"}))))),s.a.createElement(te.a.Item,{label:"\u6587\u4EF6\u540D\u79F0\uFF1A",name:"file"},s.a.createElement(Ce.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"})),s.a.createElement(te.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"}]},s.a.createElement(Ce.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"}))))))},me=Object(X.a)(function(Ne){var Ge=Ne.shixunsDetail,yt=Ne.loading,pt=Ne.globalSetting,jt=Ne.user;return{shixunsDetail:Ge,globalSetting:pt,user:jt,loading:yt.models.index}})(pe),se=b("7ahc"),be=function(Ge){var yt=Ge.shixunsDetail,pt=Ge.globalSetting,jt=Ge.loading,Bt=Ge.user,gt=Ge.taskData,Ht=Ge.dispatch,Ut=Ge.isRepository,Nt=Ge.onClose,Wt=Object(w.a)(Ge,["shixunsDetail","globalSetting","loading","user","taskData","dispatch","isRepository","onClose"]),Qt=Object(z.h)(),pn=Object(O.a)(Object(O.a)({},Object(z.i)()),Object(z.h)().query),qt=Object(g.useState)({}),en=Object(C.a)(qt,2),qn=en[0],$t=en[1],cn=Object(g.useRef)(),mn=te.a.useForm(),yn=Object(C.a)(mn,1),Vn=yn[0],$n=Object(g.useState)(""),zt=Object(C.a)($n,2),xn=zt[0],wr=zt[1];Object(g.useEffect)(function(){Wt.visible&&Vn.resetFields()},[Wt.visible]),Object(g.useEffect)(function(){var Yn=sessionStorage.getItem("pathArray");if(Yn){var ce=Yn.split(",").join("/"),V=ce.indexOf("/")===0?ce.substr(1):ce;wr(V)}},[]),Object(g.useEffect)(function(){var Yn,ce;cn.current=(Yn=Qt.pathname)===null||Yn===void 0||((ce=Yn.split("/"))===null||ce===void 0)?void 0:ce[2]},[]);var nr=function(){var Yn=Object(u.a)(M.a.mark(function ce(){var V,J,ee=arguments;return M.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return V=ee.length>0&&ee[0]!==void 0?ee[0]:{},ue.next=3,Object(Z.b)({id:gt.myshixun.identifier,message:V.commitMessage,content:V.codeMirror,path:(Wt.defaultPath?Wt.defaultPath+"/":"")+V.path,secret_repository:Ut?void 0:!0});case 3:J=ue.sent,(J==null?void 0:J.status)===0&&(h.b.success("\u6DFB\u52A0\u6210\u529F"),Wt.onOK({path:(Wt.defaultPath?Wt.defaultPath+"/":"")+V.path,name:V.path.split("/")[V.path.split("/").length-1]}),Nt());case 5:case"end":return ue.stop()}},ce)}));return function(){return Yn.apply(this,arguments)}}(),Tn=function(){var ce,V;X.d.push("/shixuns/".concat(cn.current,"/").concat((ce=Qt.pathname)===null||ce===void 0||((V=ce.split("/"))===null||V===void 0)?void 0:V[3]).concat(xn?"/master/shixun_show/".concat(xn):""))};return s.a.createElement(l.a,{width:"60%",visible:Wt.visible,wrapClassName:Te.a.modal,centered:!0,onOk:function(){Vn.submit()},onCancel:Nt,title:"\u65B0\u5EFA\u6587\u4EF6"},s.a.createElement("section",{className:Te.a.bg},s.a.createElement("div",{className:Te.a.wrap},s.a.createElement(te.a,{className:"mt10",form:Vn,scrollToFirstError:!0,layout:"vertical",onFinish:nr,onChange:function(){var ce,V,J=Object(O.a)({},Vn.getFieldsValue()),ee=J==null||((ce=J.path)===null||ce===void 0)?void 0:ce.split("");(ee==null||((V=ee.filter(function(Se){return Se=="/"}))===null||V===void 0)?void 0:V.length)>1&&(J.path=J.path.substring(0,J.path.length-1)),Vn.setFieldsValue(Object(O.a)({},J)),$t(J)}},s.a.createElement(te.a.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A",name:"path"},s.a.createElement(v.a,null,s.a.createElement(y.a,null,s.a.createElement("span",{className:Te.a.filePath},Wt.defaultPath+"/")),s.a.createElement(y.a,{flex:"1"},s.a.createElement(te.a.Item,{name:"path",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},s.a.createElement(Ce.a,{placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0",size:"large"}))))),s.a.createElement(te.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"}]},s.a.createElement(Ce.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"})),s.a.createElement("div",{className:"mt10 mb20"},s.a.createElement(te.a.Item,{name:"codeMirror",label:"\u6587\u4EF6\u5185\u5BB9\uFF1A",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5185\u5BB9"}]},s.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"]}})))))))},ae=Object(X.a)(function(Ne){var Ge=Ne.shixunsDetail,yt=Ne.loading,pt=Ne.globalSetting,jt=Ne.user;return{shixunsDetail:Ge,globalSetting:pt,user:jt,loading:yt.models.index}})(be),fe=function(Ge){var yt=Ge.shixunsDetail,pt=Ge.globalSetting,jt=Ge.loading,Bt=Ge.user,gt=Ge.dispatch,Ht=Ge.isRepository,Ut=Ge.taskData,Nt=Object(w.a)(Ge,["shixunsDetail","globalSetting","loading","user","dispatch","isRepository","taskData"]),Wt=Object(z.h)(),Qt=Object(O.a)(Object(O.a)({},Object(z.i)()),Object(z.h)().query),pn=Object(g.useState)({}),qt=Object(C.a)(pn,2),en=qt[0],qn=qt[1],$t=Object(g.useRef)(),cn=te.a.useForm(),mn=Object(C.a)(cn,1),yn=mn[0],Vn=Object(g.useState)(""),$n=Object(C.a)(Vn,2),zt=$n[0],xn=$n[1],wr=Object(g.useState)(""),nr=Object(C.a)(wr,2),Tn=nr[0],Yn=nr[1];Object(g.useEffect)(function(){Nt.visible&&yn.resetFields()},[Nt.visible]),Object(g.useEffect)(function(){var J=Nt.defaultPath.split("/");J.length===1?(xn(""),Yn(Nt.defaultPath)):(Yn(J.pop()),xn(J.join("/")+"/"))},[Nt.defaultPath]),Object(g.useEffect)(function(){var J,ee;$t.current=(J=Wt.pathname)===null||J===void 0||((ee=J.split("/"))===null||ee===void 0)?void 0:ee[2]},[]);var ce=function(){var J=Object(u.a)(M.a.mark(function ee(){var Se,ue,nt,Dt=arguments;return M.a.wrap(function(an){for(;;)switch(an.prev=an.next){case 0:return ue=Dt.length>0&&Dt[0]!==void 0?Dt[0]:{},an.next=3,Object(Z.w)({id:Ut==null||((Se=Ut.shixun)===null||Se===void 0)?void 0:Se.identifier,from:Nt.defaultPath,to:zt+ue.path,message:ue.commitMessage||"".concat(Nt.defaultPath," rename to ").concat(zt).concat(ue.path," ")});case 3:nt=an.sent,(nt==null?void 0:nt.status)===0&&(h.b.success("\u64CD\u4F5C\u6210\u529F"),Nt.onOK({path:ue.path,name:ue.path}),Nt.onClose());case 5:case"end":return an.stop()}},ee)}));return function(){return J.apply(this,arguments)}}(),V=function(){var ee,Se;X.d.push("/shixuns/".concat($t.current,"/").concat((ee=Wt.pathname)===null||ee===void 0||((Se=ee.split("/"))===null||Se===void 0)?void 0:Se[3]).concat(zt?"/master/shixun_show/".concat(zt):""))};return s.a.createElement(l.a,{width:"40%",visible:Nt.visible,wrapClassName:Te.a.modal,centered:!0,onOk:function(){yn.submit()},onCancel:Nt.onClose,title:"\u63D0\u4EA4\u8BF4\u660E"},s.a.createElement("section",{className:Te.a.bg},s.a.createElement("div",{className:Te.a.wrap},s.a.createElement(te.a,{className:"mt10",form:yn,scrollToFirstError:!0,layout:"vertical",onFinish:ce,onChange:function(){var ee,Se,ue=Object(O.a)({},yn.getFieldsValue()),nt=ue==null||((ee=ue.path)===null||ee===void 0)?void 0:ee.split("");(nt==null||((Se=nt.filter(function(Dt){return Dt=="/"}))===null||Se===void 0)?void 0:Se.length)>1&&(ue.path=ue.path.substring(0,ue.path.length-1)),yn.setFieldsValue(Object(O.a)({},ue)),qn(ue)}},s.a.createElement(te.a.Item,{label:"\u91CD\u547D\u540D\uFF1A",name:"path"},s.a.createElement(v.a,null,s.a.createElement(y.a,{flex:"1"},s.a.createElement(te.a.Item,{name:"path",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},s.a.createElement(Ce.a,{placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0",size:"large",defaultValue:Tn}))))),s.a.createElement(te.a.Item,{label:"\u63D0\u4EA4\u4FE1\u606F\uFF1A",name:"commitMessage"},s.a.createElement(Ce.a,{placeholder:"\u5982\u4E0D\u586B\u5199\uFF0C\u9ED8\u8BA4\u63D0\u4EA4\u4FE1\u606F\u662F\uFF08".concat(Nt.defaultPath," rename to \u65B0\u7684\u540D\u79F0 \uFF09"),size:"large"}))))))},Fe=Object(X.a)(function(Ne){var Ge=Ne.shixunsDetail,yt=Ne.loading,pt=Ne.globalSetting,jt=Ne.user;return{shixunsDetail:Ge,globalSetting:pt,user:jt,loading:yt.models.index}})(fe),ie=b("DZo9"),q=b("8z0m"),Q=b("m3rI"),Y=b("8j3D"),oe=b("25Vc"),le=b.n(oe),Ee=q.a.Dragger,Le=function(Ge){var yt,pt=Ge.shixunsDetail,jt=Ge.globalSetting,Bt=Ge.loading,gt=Ge.user,Ht=Ge.taskData,Ut=Ge.dispatch,Nt=Ge.isRepository,Wt=Object(w.a)(Ge,["shixunsDetail","globalSetting","loading","user","taskData","dispatch","isRepository"]),Qt=Object(z.h)(),pn=Object(O.a)(Object(O.a)({},Object(z.i)()),Object(z.h)().query),qt=Object(g.useState)({}),en=Object(C.a)(qt,2),qn=en[0],$t=en[1],cn=Object(g.useRef)(),mn=te.a.useForm(),yn=Object(C.a)(mn,1),Vn=yn[0],$n=Object(g.useState)([]),zt=Object(C.a)($n,2),xn=zt[0],wr=zt[1],nr=Object(g.useState)(),Tn=Object(C.a)(nr,2),Yn=Tn[0],ce=Tn[1],V;Object(g.useEffect)(function(){Wt.visible&&(Vn.resetFields(),wr([]))},[Wt.visible]),Object(g.useEffect)(function(){cn.current=pn.id},[]),Object(g.useEffect)(function(){var Dt=sessionStorage.getItem("pathArray");if(Dt){var Yt=Dt.split(",").join("/"),an=Yt.indexOf("/")===0?Yt.substr(1):Yt;ce(an)}},[]);var J=function(Yt){if(V=Yt.file.name,Yt.file.status==="done"||Yt.file.status==="uploading"){var an,Xt,Rn;if(wr(Yt.fileList),!Yt.file.response)return;if(((an=Yt.file.response)===null||an===void 0?void 0:an.status)===0){h.b.success("\u4E0A\u4F20\u6210\u529F\uFF01");return}wr(xn.filter(function(Kn){return Kn.uid!==Yt.file.uid})),((Xt=Yt.file.response)===null||Xt===void 0?void 0:Xt.message)&&h.b.info((Rn=Yt.file.response)===null||Rn===void 0?void 0:Rn.message)}},ee=function(){var Dt=Object(u.a)(M.a.mark(function Yt(an){var Xt;return M.a.wrap(function(Kn){for(;;)switch(Kn.prev=Kn.next){case 0:if(an.response){Kn.next=3;break}return h.b.info("\u8FD8\u672A\u4E0A\u4F20\u5B8C\u6210\uFF0C\u65E0\u6CD5\u8FDB\u884C\u5220\u9664\u64CD\u4F5C\uFF01"),Kn.abrupt("return");case 3:return Kn.next=5,Ut({type:"shixunsDetail/deleteGitFile",payload:{id:pn.id,path:Yn?"".concat(Yn,"/").concat(an.name):an.name,message:Vn.getFieldValue("commitMessage")||"\u5220\u9664\u4E86".concat(Yn?"".concat(Yn,"/").concat(an.name):an.name),secret_repository:Nt?null:!0}});case 5:Xt=Kn.sent,Xt.status===0&&(wr(xn.filter(function(ar){return ar.uid!==an.uid})),h.b.info("\u5220\u9664\u6210\u529F"));case 7:case"end":return Kn.stop()}},Yt)}));return function(an){return Dt.apply(this,arguments)}}(),Se={height:300,multiple:!0,withCredentials:!0,data:function(){var Dt=Object(u.a)(M.a.mark(function an(){return M.a.wrap(function(Rn){for(;;)switch(Rn.prev=Rn.next){case 0:return Rn.abrupt("return",new Promise(function(){var Kn=Object(u.a)(M.a.mark(function ar(vr,lr){return M.a.wrap(function(Tr){for(;;)switch(Tr.prev=Tr.next){case 0:setTimeout(Object(u.a)(M.a.mark(function Ji(){var Vr,oi;return M.a.wrap(function(Bi){for(;;)switch(Bi.prev=Bi.next){case 0:return Bi.next=2,Vn.getFieldsValue();case 2:Vr=Bi.sent,oi=Object(O.a)(Object(O.a)({},{path:Wt.defaultPath?Wt.defaultPath:"",message:qn.commitMessage||"\u4E0A\u4F20\u4E86".concat(V)}),Nt?{}:{secret_repository:!0}),vr(oi);case 5:case"end":return Bi.stop()}},Ji)})),200);case 1:case"end":return Tr.stop()}},ar)}));return function(ar,vr){return Kn.apply(this,arguments)}}()));case 1:case"end":return Rn.stop()}},an)}));function Yt(){return Dt.apply(this,arguments)}return Yt}(),fileList:xn,method:"post",action:"".concat(Q.a.API_SERVER,"/api/myshixuns/").concat(Ht==null||((yt=Ht.myshixun)===null||yt===void 0)?void 0:yt.identifier,"/upload_git_file.json"),onChange:J,onRemove:ee,beforeUpload:function(Yt){V=Yt.name}},ue=function(){var Dt=Object(u.a)(M.a.mark(function Yt(an){return M.a.wrap(function(Rn){for(;;)switch(Rn.prev=Rn.next){case 0:return Rn.next=2,Vn.validateFields();case 2:Wt.onClose(),Wt.onOK({path:Wt.defaultPath}),nt();case 5:case"end":return Rn.stop()}},Yt)}));return function(an){return Dt.apply(this,arguments)}}(),nt=function(){};return s.a.createElement(l.a,{visible:Wt.visible,onOk:ue,centered:!0,onCancel:Wt.onClose,width:"70%"},s.a.createElement("section",{className:le.a.bg},s.a.createElement("div",{className:le.a.wrap},s.a.createElement("div",{className:le.a.title},"\u4E0A\u4F20\u6587\u4EF6"),s.a.createElement(te.a,{className:"mt10",form:Vn,scrollToFirstError:!0,layout:"vertical",onFinish:ue,onValuesChange:function(){return $t(Object(O.a)({},Vn.getFieldsValue()))}},s.a.createElement(te.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"}]},s.a.createElement(Ce.a,{placeholder:"\u5FC5\u586B\uFF0C\u63CF\u8FF0\u4E3B\u8981\u4FEE\u6539\u5185\u5BB9\uFF08\u76F8\u5F53\u4E8EGit Commit message\u7684Header\uFF09"})),s.a.createElement(te.a.Item,{label:"\u9009\u62E9\u6587\u4EF6",name:"file",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6587\u4EF6"}]},s.a.createElement(Ee,Se,s.a.createElement("div",null,s.a.createElement("i",{className:"iconfont icon-shangchuan font50 ".concat(le.a.colorBlue)})),s.a.createElement("div",{className:"font14 mt30"},"\u62D6\u62FD\u6587\u4EF6\u6216",s.a.createElement("span",{className:"".concat(le.a.colorBlue," ml5")},"\u70B9\u51FB\u6B64\u5904\u4E0A\u4F20")))))),s.a.createElement(Y.a,{onFinish:function(Yt){return ce(Yt)}})))},ge=Object(X.a)(function(Ne){var Ge=Ne.shixunsDetail,yt=Ne.loading,pt=Ne.globalSetting,jt=Ne.user;return{shixunsDetail:Ge,globalSetting:pt,user:jt,loading:yt.models.index}})(Le),De=b("aVK0"),_e=b.n(De),Xe=b("TXba"),tt=b.n(Xe),ze=function(Ge){var yt=Ge.shixunsDetail,pt=Ge.globalSetting,jt=Ge.loading,Bt=Ge.dispatch,gt=Ge.title,Ht=Ge.pathList,Ut=Ht===void 0?[]:Ht,Nt=Ge.showInputPath,Wt=Nt===void 0?!1:Nt,Qt=Ge.isMergeSelectFile,pn=Qt===void 0?!1:Qt,qt=Ge.onFinish,en=qt===void 0?function(){}:qt,qn=te.a.useForm(),$t=Object(C.a)(qn,1),cn=$t[0],mn=Object(O.a)(Object(O.a)({},Object(z.i)()),Object(z.h)().query),yn=Object(z.h)(),Vn=Object(g.useRef)(),$n=Object(g.useState)(""),zt=Object(C.a)($n,2),xn=zt[0],wr=zt[1],nr=Object(g.useState)(""),Tn=Object(C.a)(nr,2),Yn=Tn[0],ce=Tn[1],V=Object(g.useState)([]),J=Object(C.a)(V,2),ee=J[0],Se=J[1],ue=Object(g.useState)([]),nt=Object(C.a)(ue,2),Dt=nt[0],Yt=nt[1];Object(g.useEffect)(function(){var vr,lr;Vn.current=((vr=yn.pathname)===null||vr===void 0||((lr=vr.split("/"))===null||lr===void 0)?void 0:lr[3])==="repository"},[]),Object(g.useEffect)(function(){if(yt.actionTabs.key!=="Repository-SelectFilePath")return;var vr=Ut.join("/"),lr=[];Ut.map(function(Jn,Tr){Tr===0?lr.push({val:"\u6839\u76EE\u5F55",path:""},{val:"/".concat(Jn),path:vr}):lr.push({val:"/".concat(Jn),path:vr})}),Se(lr),wr(vr),ce(vr),an(vr)},[yt.actionTabs.key]);var an=function(){var vr=Object(u.a)(M.a.mark(function lr(Jn){var Tr;return M.a.wrap(function(Vr){for(;;)switch(Vr.prev=Vr.next){case 0:return Vr.next=2,Bt({type:Vn.current?"shixunsDetail/getRepository":"shixunsDetail/getSecretRepository",payload:{id:mn.id,path:Jn}});case 2:Tr=Vr.sent,Tr&&Yt(Tr.trees||[]);case 4:case"end":return Vr.stop()}},lr)}));return function(Jn){return vr.apply(this,arguments)}}(),Xt=function(lr){var Jn=xn;lr.type==="tree"&&(ee.length?ee.push({val:"/".concat(lr.name),path:lr.name}):ee.push({val:"\u6839\u76EE\u5F55",path:""},{val:"/".concat(lr.name),path:lr.name}),Se(ee),Jn=xn?"".concat(xn,"/").concat(lr.name):lr.name,wr(Jn)),an(Jn)},Rn=function(lr,Jn){var Tr=ee.filter(function(Vr,oi){return oi<=Jn});Se(Tr);var Ji=Tr.filter(function(Vr,oi){return oi!==0}).map(function(Vr){return Vr.val}).join("").substr(1);wr(Ji),an(Ji)},Kn=function(){var vr=Object(u.a)(M.a.mark(function lr(){var Jn,Tr,Ji;return M.a.wrap(function(oi){for(;;)switch(oi.prev=oi.next){case 0:if(Jn=cn==null?void 0:cn.getFieldsValue(),Tr=xn?"".concat(xn).concat(Jn!=null&&Jn.name?"/".concat(Jn==null?void 0:Jn.name):""):Jn==null?void 0:Jn.name,!pn){oi.next=6;break}return en(Tr),ar(),oi.abrupt("return");case 6:if(!Wt){oi.next=16;break}return oi.next=9,cn.validateFields();case 9:return oi.next=11,Bt({type:"shixunsDetail/uploadGitFolder",payload:Object(O.a)(Object(O.a)({},{id:mn.id,path:Tr}),Vn.current?{}:{secret_repository:!0})});case 11:Ji=oi.sent,en(Yn),Ji.status===0&&h.b.info("\u65B0\u5EFA\u6210\u529F"),oi.next=18;break;case 16:en(Tr),h.b.success("\u9009\u62E9\u6587\u4EF6\u76EE\u5F55\u6210\u529F");case 18:ar();case 19:case"end":return oi.stop()}},lr)}));return function(){return vr.apply(this,arguments)}}(),ar=function(){Bt({type:"shixunsDetail/setActionTabs",payload:{}}),cn.resetFields()};return s.a.createElement(l.a,{centered:!0,title:gt||"\u65B0\u5EFA\u6587\u4EF6\u5939",closable:!1,keyboard:!1,visible:yt.actionTabs.key==="Repository-SelectFilePath",onOk:Kn,onCancel:ar},s.a.createElement("div",{className:tt.a.wrap},s.a.createElement("div",{className:tt.a.content},s.a.createElement("div",{className:tt.a.mainPathWrap},!!(ee!=null&&ee.length)&&ee.map(function(vr,lr){return s.a.createElement("a",{key:lr,onClick:function(){return Rn(vr,lr)}},vr.val)})),!!(Dt!=null&&Dt.length)&&Dt.map(function(vr,lr){return vr.type==="tree"&&s.a.createElement("a",{key:lr,onClick:function(){return Xt(vr)}},s.a.createElement("i",{className:"iconfont icon-wenjianjia ".concat(tt.a.colorBlue)}),vr.name)})),s.a.createElement("label",{className:"mt5"},"\u9009\u4E2D\u7684\u65B0\u5EFA\u6587\u4EF6\u5939\u76EE\u5F55\uFF1A"),s.a.createElement("div",{className:"mt5 mb5"},xn),Wt&&s.a.createElement(te.a,{form:cn,scrollToFirstError:!0,className:"mt20"},s.a.createElement(te.a.Item,{name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u540D\u79F0"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},s.a.createElement(Ce.a,{placeholder:"\u8BF7\u8F93\u5165\u65B0\u6587\u4EF6\u5939\u540D/\u5B50\u6587\u4EF6\u5939\u540D\u3002\uFF08\u5982\uFF1Asrc/step1\uFF09"})))))},Me=Object(X.a)(function(Ne){var Ge=Ne.shixunsDetail,yt=Ne.loading,pt=Ne.globalSetting;return{shixunsDetail:Ge,globalSetting:pt,loading:yt.models.index}})(ze),Et=b("GZ0F"),Oe=b("8Skl"),Ve=b("HBuW"),Je=b("LvDl"),Ye=b("NLgs"),Pe=b("lzim"),He=B.a.DirectoryTree,ve=function(Ge){var yt,pt,jt,Bt=Ge.shixunsDetail,gt=Ge.globalSetting,Ht=Ge.loading,Ut=Ge.user,Nt=Ge.activeKey,Wt=Ge.dispatch,Qt=Ge.taskData,pn=Ge.practiceSetting,qt=Ge.isRepository,en=Ge.treeData,qn=Ge.setTreeData,$t=Ge.params,cn=Object(w.a)(Ge,["shixunsDetail","globalSetting","loading","user","activeKey","dispatch","taskData","practiceSetting","isRepository","treeData","setTreeData","params"]),mn=Object(z.h)(),yn=Object(g.useState)(),Vn=Object(C.a)(yn,2),$n=Vn[0],zt=Vn[1],xn=Object(g.useState)(!1),wr=Object(C.a)(xn,2),nr=wr[0],Tn=wr[1],Yn=Object(g.useState)(!1),ce=Object(C.a)(Yn,2),V=ce[0],J=ce[1],ee=Object(g.useState)(!1),Se=Object(C.a)(ee,2),ue=Se[0],nt=Se[1],Dt=Object(g.useState)(!1),Yt=Object(C.a)(Dt,2),an=Yt[0],Xt=Yt[1],Rn=Object(g.useState)(""),Kn=Object(C.a)(Rn,2),ar=Kn[0],vr=Kn[1],lr=Object(g.useState)([]),Jn=Object(C.a)(lr,2),Tr=Jn[0],Ji=Jn[1],Vr=Object(g.useState)([]),oi=Object(C.a)(Vr,2),pa=oi[0],Bi=oi[1],ta=Object(g.useState)([]),Da=Object(C.a)(ta,2),_o=Da[0],lo=Da[1],wo=Object(g.useState)(!1),Fa=Object(C.a)(wo,2),Gi=Fa[0],Nr=Fa[1],qr=Object(g.useState)(),_i=Object(C.a)(qr,2),Ur=_i[0],Ar=_i[1],ti=Object(g.useState)(),yr=Object(C.a)(ti,2),si=yr[0],cr=yr[1],Hi=Object(g.useState)(""),Ni=Object(C.a)(Hi,2),Zi=Ni[0],yo=Ni[1],Vi=Object(g.useState)(),Qa=Object(C.a)(Vi,2),ja=Qa[0],ni=Qa[1],Wo=Object(g.useState)(!1),Ja=Object(C.a)(Wo,2),bo=Ja[0],Ao=Ja[1];Object(g.useEffect)(function(){qn([]),fr(""),localStorage.warehouseHideTip||Nr(!0)},[mn.pathname,qt]),Object(g.useEffect)(function(){var Mn;if(Qt!=null&&(Mn=Qt.challenge)!==null&&Mn!==void 0&&Mn.path&&en!==null&&en!==void 0&&en.length){var nn,Un,En,ur=Qt==null||((nn=Qt.challenge)===null||nn===void 0||((Un=nn.path)===null||Un===void 0))?void 0:Un.replaceAll("\uFF1B",""),Dr=(En=Object(Je.cloneDeep)(en))===null||En===void 0?void 0:En.filter(function(di){var yi;return di.name===(ur==null||((yi=ur.split("/"))===null||yi===void 0)?void 0:yi[0])});Za(ur),(en==null?void 0:en.length)!==1&&(console.log(Dr,"filterTreeData"),qn(Dr))}},[Qt==null||((yt=Qt.challenge)===null||yt===void 0)?void 0:yt.path,en]);var Za=function(nn){tr(nn),pa=[nn],Bi([nn])},Xo=function(){var Mn=Object(u.a)(M.a.mark(function nn(){var Un,En,ur=arguments;return M.a.wrap(function(di){for(;;)switch(di.prev=di.next){case 0:return Un=ur.length>0&&ur[0]!==void 0?ur[0]:"",di.next=3,Object(Ve.Gb)({id:$t.id,secret_dir_path:Un});case 3:En=di.sent,En&&ni(Un);case 5:case"end":return di.stop()}},nn)}));return function(){return Mn.apply(this,arguments)}}(),er=function(nn){return s.a.createElement(d.a,{className:_e.a.menu,onClick:function(En){vr(nn.path||"");switch(En.key){case"1":Object(p.cb)(["\u5B9E\u8DF5\u9879\u76EE","\u8BBE\u7F6E","\u4EE3\u7801\u4ED3\u5E93","\u65B0\u5EFA\u6587\u4EF6"]),Tn(!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"]),Xt(!0);break;case"4":Object(p.cb)(["\u5B9E\u8DF5\u9879\u76EE","\u8BBE\u7F6E","\u4EE3\u7801\u4ED3\u5E93","\u91CD\u547D\u540D"]),J(!0);break;case"5":Object(p.cb)(["\u5B9E\u8DF5\u9879\u76EE","\u8BBE\u7F6E","\u4EE3\u7801\u4ED3\u5E93","\u5220\u9664"]),jr(nn.path,nn.name,nn);break;case"6":Object(p.cb)(["\u5B9E\u8DF5\u9879\u76EE","\u8BBE\u7F6E","\u4EE3\u7801\u4ED3\u5E93","\u590D\u5236\u8DEF\u5F84"]),ro(nn);break}}},(nn.type==="topTree"||nn.type==="tree")&&s.a.createElement(d.a.Item,{key:"1"},"\u65B0\u5EFA\u6587\u4EF6"),(nn.type==="topTree"||nn.type==="tree")&&s.a.createElement(d.a.Item,{key:"2"},"\u65B0\u5EFA\u6587\u4EF6\u5939"),(nn.type==="topTree"||nn.type==="tree")&&s.a.createElement(d.a.Item,{key:"3"},"\u4E0A\u4F20"),nn.type!=="topTree"&&nn.type!=="tree"&&s.a.createElement(d.a.Item,{key:"4"},"\u91CD\u547D\u540D"),nn.type!=="topTree"&&s.a.createElement(re.CopyToClipboard,{text:"/data/workspace/myshixun/".concat(qt?"":"secret/").concat(nn==null?void 0:nn.path),onCopy:function(){return h.b.success("\u590D\u5236\u6210\u529F")}},s.a.createElement(d.a.Item,{key:"6"},s.a.createElement(s.a.Fragment,null,"\u590D\u5236\u8DEF\u5F84"))),nn.type!=="topTree"&&s.a.createElement(d.a.Item,{key:"5"},"\u5220\u9664"))},_r=function(nn,Un){return nn.map(function(En){return Un==""?En.path=Un+En.name:En.path=Un+"/"+En.name,En.title=s.a.createElement(v.a,{className:"font14"},s.a.createElement(y.a,{flex:"1"},s.a.createElement(v.a,null,s.a.createElement(y.a,{flex:"20px"},En.type==="blob"&&s.a.createElement("span",{className:"iconfont icon-wenjian11 font12"})),s.a.createElement(y.a,{flex:"1"},s.a.createElement("span",{className:" multi_ellipsis1"},En.name)))),s.a.createElement(y.a,null,(En.type==="blob"||En.type==="tree")&&s.a.createElement(U.a,{overlay:er(En),className:_e.a.ellipsis},s.a.createElement("i",{className:"iconfont icon-gengduo2 c-555a88"})))),En.disableCheckbox=$n&&$n!==En.name,En.className=En.type==="tree"?_e.a.pl23:"",En.checkable=En.type!=="tree",En.isLeaf=En.type!=="tree",En.children=En.type==="tree"&&[],En.key=En.path,En})},tr=function(nn){Wt({type:"practiceSetting/setSideBarTabs",payload:{selectPath:nn}})},Mr=function(){var Mn=Object(u.a)(M.a.mark(function nn(Un,En){var ur;return M.a.wrap(function(di){for(;;)switch(di.prev=di.next){case 0:return ur=Un.split("/"),di.next=3,fr(ar);case 3:setTimeout(function(){tr(Un),Tr=[ur[0]||""],pa=[Un],Bi(Object(k.a)(pa)),Ji(Object(k.a)(Tr))},150);case 4:case"end":return di.stop()}},nn)}));return function(Un,En){return Mn.apply(this,arguments)}}(),Hr=function(nn,Un){if(console.log(nn,"data"),Un=="")qn(Object(k.a)(nn));else{var En=mi(en,Un,nn);qn(Object(k.a)(En))}};function mi(Mn,nn,Un){return Mn.map(function(En){return En.key===nn?(En.children=Object(k.a)(Un),Object(O.a)({},En)):En.children?Object(O.a)(Object(O.a)({},En),{},{children:mi(En.children,nn,Un)}):En})}var fr=function(){var Mn=Object(u.a)(M.a.mark(function nn(){var Un,En,ur,Dr,di,yi,Yi=arguments;return M.a.wrap(function(Xi){for(;;)switch(Xi.prev=Xi.next){case 0:return En=Yi.length>0&&Yi[0]!==void 0?Yi[0]:"",console.log("location:",mn),Xi.next=4,Object(Z.m)(Qt==null||((Un=Qt.myshixun)===null||Un===void 0)?void 0:Un.identifier,{path:En});case 4:return ur=Xi.sent,ur&&((Dr=ur.trees)!==null&&Dr!==void 0&&Dr.length?(yi=_r(Object(k.a)(ur.trees),En),Hr(yi,En),lo(ur.trees||[]),cr((ur==null?void 0:ur.secret_dir_path)||""),console.log("handleGetRepository:",yi,En),setTimeout(function(){return console.log(en)},2e3)):En==""&&qn([]),Ar(((di=ur.commits)===null||di===void 0?void 0:di[0])||{})),Xi.abrupt("return",ur);case 7:case"end":return Xi.stop()}},nn)}));return function(){return Mn.apply(this,arguments)}}(),Wi=function(){var Mn=Object(u.a)(M.a.mark(function nn(Un){return M.a.wrap(function(ur){for(;;)switch(ur.prev=ur.next){case 0:return ur.abrupt("return",new Promise(function(){var Dr=Object(u.a)(M.a.mark(function di(yi,Yi){return M.a.wrap(function(Xi){for(;;)switch(Xi.prev=Xi.next){case 0:return Un.children.length&&yi(),yo(Un.path),Xi.next=4,fr(Un.path);case 4:yi();case 5:case"end":return Xi.stop()}},di)}));return function(di,yi){return Dr.apply(this,arguments)}}()));case 1:case"end":return ur.stop()}},nn)}));return function(Un){return Mn.apply(this,arguments)}}(),Ea=function(){var Mn=Object(u.a)(M.a.mark(function nn(Un,En){var ur,Dr;return M.a.wrap(function(yi){for(;;)switch(yi.prev=yi.next){case 0:if(console.log("handleSelectTree",Un,En.nativeEvent.target.nodeName,En),ur=function(){tr(En.node.path),Un=[En.node.path],Bi(Object(k.a)(Un))},!(En.nativeEvent.target.nodeName==="svg"||En.nativeEvent.target.nodeName==="LI"||En.nativeEvent.target.nodeName==="I")){yi.next=4;break}return yi.abrupt("return");case 4:En.node.type==="blob"&&(pn!=null&&(Dr=pn.sideBar)!==null&&Dr!==void 0&&Dr.confirmLeave?l.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(){ur(),Wt({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!1}})}}):ur());case 5:case"end":return yi.stop()}},nn)}));return function(Un,En){return Mn.apply(this,arguments)}}(),jr=function(nn,Un,En){l.a.confirm({centered:!0,title:"\u786E\u8BA4\u9700\u8981\u5220\u9664\u8BE5\u6587\u4EF6".concat(En.children?"\u5939":"","?"),okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:function(){var ur=Object(u.a)(M.a.mark(function di(){var yi,Yi,Ui,Xi;return M.a.wrap(function(Ta){for(;;)switch(Ta.prev=Ta.next){case 0:return Ta.next=2,Object(Z.h)({id:Qt==null||((yi=Qt.myshixun)===null||yi===void 0)?void 0:yi.identifier,path:nn,message:"\u5220\u9664".concat(nn)});case 2:if(Yi=Ta.sent,Ui=nn.split("/"),!((Yi==null?void 0:Yi.status)===0)){Ta.next=20;break}return h.b.info("\u5220\u9664\u6210\u529F"),Ui.splice(Ui.length-1,1),Ta.next=9,fr(Ui.length>1?Ui.join("/"):"");case 9:if(Xi=Ta.sent,!(Xi!=null&&Xi.trees)){Ta.next=13;break}Ta.next=16;break;case 13:return Ui.splice(Ui.length-1,1),Ta.next=16,fr(Ui.length>1?Ui.join("/"):"");case 16:return tr(""),Ta.abrupt("return",!0);case 20:(Yi==null?void 0:Yi.status)===-3&&l.a.info({title:"\u5220\u9664\u5931\u8D25",content:s.a.createElement("div",null,"\u8BE5\u6587\u4EF6\u201C",nn,"\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 Ta.stop()}},di)}));function Dr(){return ur.apply(this,arguments)}return Dr}()})},ro=function(nn){console.log(nn,"item")},ui=function(){var Mn=Object(u.a)(M.a.mark(function nn(Un,En){return M.a.wrap(function(Dr){for(;;)switch(Dr.prev=Dr.next){case 0:if(console.log("handleExpand",En),!(En.nativeEvent.target.nodeName==="svg"||En.nativeEvent.target.nodeName==="path"||En.nativeEvent.target.nodeName==="LI")){Dr.next=5;break}return Dr.abrupt("return",!0);case 5:return Dr.next=7,Wi(En.node);case 7:Tr.includes(En.node.path)?Tr.splice(Tr.indexOf(En.node.path),1):Tr.push(En.node.path);case 8:Ji(Object(k.a)(Tr));case 9:case"end":return Dr.stop()}},nn)}));return function(Un,En){return Mn.apply(this,arguments)}}(),Oi=function(){Nr(!1),localStorage.warehouseHideTip=!0},xa=function(){var Mn=Object(u.a)(M.a.mark(function nn(Un){var En,ur,Dr,di,yi;return M.a.wrap(function(Ui){for(;;)switch(Ui.prev=Ui.next){case 0:Dr="",Ui.t0=qt,Ui.next=Ui.t0===!0?4:Ui.t0===!1?9:11;break;case 4:return Dr="\u5F00\u542F\u7248\u672C\u5E93",di="\u5F00\u542F",yi="\u4E0D\u5F00\u542F",ur=s.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"),Ui.abrupt("break",11);case 9:return Bt!=null&&(En=Bt.detail)!==null&&En!==void 0&&En.secret_repository?(Dr="\u5173\u95ED\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93",di="\u786E\u5B9A",yi="\u53D6\u6D88",ur=s.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")):(Dr="\u5F00\u542F\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93",di="\u4E0D\u4F7F\u7528",yi="\u4F7F\u7528",ur=s.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")),Ui.abrupt("break",11);case 11:if(!(!qt&&Object(Ye.b)(Wt,"\u4E0D\u80FD\u5F00\u542F/\u5173\u95ED\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93"))){Ui.next=13;break}return Ui.abrupt("return");case 13:l.a.confirm({title:Dr,okText:di,cancelText:yi,content:ur,onOk:function(){var Oo;Object(p.cb)(["\u5B9E\u8DF5\u9879\u76EE","\u8BBE\u7F6E","\u4EE3\u7801\u4ED3\u5E93",Dr]),!qt&&!(Bt!=null&&(Oo=Bt.detail)!==null&&Oo!==void 0&&Oo.secret_repository)||Ba(Un)},onCancel:function(){var Oo;!qt&&!(Bt!=null&&(Oo=Bt.detail)!==null&&Oo!==void 0&&Oo.secret_repository)&&Ba(Un)}});case 14:case"end":return Ui.stop()}},nn)}));return function(Un){return Mn.apply(this,arguments)}}(),Ba=function(){var Mn=Object(u.a)(M.a.mark(function nn(Un){return M.a.wrap(function(ur){for(;;)switch(ur.prev=ur.next){case 0:if(!qt){ur.next=6;break}return ur.next=3,Object(Ve.r)(Object(O.a)({},$t));case 3:Wt({type:"practiceSetting/getCommonData",payload:Object(O.a)({},$t)}),ur.next=8;break;case 6:return ur.next=8,Object(Ve.t)(Object(O.a)(Object(O.a)({},$t),{},{is_secret_repository:Un}));case 8:fr(),Wt({type:"shixunsDetail/getShixunsDetail",payload:{id:$t.id}});case 10:case"end":return ur.stop()}},nn)}));return function(Un){return Mn.apply(this,arguments)}}(),zo=function(nn){console.log(nn)},ci=function(){var Mn=Object(u.a)(M.a.mark(function nn(Un){var En,ur,Dr,di,yi,Yi,Ui,Xi,Oo,Ta,Fs;return M.a.wrap(function(Aa){for(;;)switch(Aa.prev=Aa.next){case 0:if(console.log(Un),En=Un.node.key,ur=Un.dragNode.key,Dr=Un.node.pos.split("-"),di=Un.dropPosition-Number(Dr[Dr.length-1]),!(Un.node.type!=="tree"||Un.dragNode.path.split("/").length===1)){Aa.next=8;break}return h.b.warn("\u672A\u79FB\u52A8\u6587\u4EF6\u76EE\u5F55\u4F4D\u7F6E"),Aa.abrupt("return");case 8:return Aa.next=10,Wt({type:"shixunsDetail/moveGitFile",payload:{id:$t.id,from:Un.dragNode.path,to:Un.node.path+"/"+Un.dragNode.name,message:"".concat(Un.dragNode.path," move to ").concat(Un.node.path+"/"+Un.dragNode.name," ")}});case 10:if(yi=Aa.sent,!(yi.status===0)){Aa.next=22;break}return tr(""),Yi=Un.dragNode.path.split("/"),Yi.pop(),Aa.next=17,fr(Un.node.path);case 17:return Aa.next=19,fr(Yi.join("/"));case 19:return Yi.pop(),Aa.next=22,fr(Yi.join("/"));case 22:return Aa.abrupt("return");case 28:case"end":return Aa.stop()}},nn)}));return function(Un){return Mn.apply(this,arguments)}}();return s.a.createElement("section",{className:_e.a.bg},s.a.createElement("div",{className:_e.a.contentbg},s.a.createElement("div",{className:_e.a.wrap},s.a.createElement(v.a,{className:_e.a.gitCode},s.a.createElement(y.a,{flex:"1"},s.a.createElement("span",{className:"iconfont icon-daimacangku2 mr8"}),qt?"\u4EE3\u7801\u4ED3\u5E93":"\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93"),s.a.createElement(y.a,null,s.a.createElement(U.a,{overlay:er({type:"topTree"}),className:"current"},s.a.createElement(x.a,{visible:Gi,title:s.a.createElement("div",{className:"font16"},s.a.createElement(Et.a,{style:{position:"relative",left:-35},onClick:function(){return Oi()}}),"\u70B9\u51FB\u6B64\u5904\u65B0\u5EFA\u6587\u4EF6\u3001\u65B0\u5EFA\u6587\u4EF6\u5939\u3001\u4E0A\u4F20\u6587\u4EF6\u3002",s.a.createElement("span",{onClick:function(){return Oi()},className:"iconfont icon-guanbi1 ml8 current font14"})),overlayClassName:_e.a.overlayClass,overlayStyle:{maxWidth:500},arrowPointAtCenter:!0,placement:"right",color:"#F7B500"})))),!!en.length&&!qt&&s.a.createElement("div",{className:"mt20 pl20 pr20 font14 c-white"},s.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")),en.length?s.a.createElement(s.a.Fragment,null,s.a.createElement("div",{className:_e.a.content},s.a.createElement(He,{disabled:!!Ht.effects["shixunsDetail/getFileContent"],multiple:!0,showIcon:!1,treeData:en,switcherIcon:s.a.createElement(Oe.a,{style:{fontWeight:"bold",fontSize:14,position:"relative",top:3,marginLeft:22}}),onExpand:ui,expandedKeys:Tr,selectedKeys:pa,onSelect:Ea,draggable:!0,onDragEnter:zo,onDrop:ci,allowDrop:function(nn){var Un=nn.dropNode,En=nn.dropPosition;return!1}}))):"",!en.length&&qt&&(Bt==null||((pt=Bt.detail)===null||pt===void 0)?void 0:pt.init_repository)&&s.a.createElement(xe,null),!en.length&&!qt&&(Bt==null||((jt=Bt.detail)===null||jt===void 0)?void 0:jt.secret_repository)&&s.a.createElement(xe,null))),s.a.createElement(Fe,{taskData:Qt,visible:V,defaultPath:ar,onClose:function(){return J(!1)},isRepository:!qt,onOK:function(){var Mn=Object(u.a)(M.a.mark(function nn(Un){var En;return M.a.wrap(function(Dr){for(;;)switch(Dr.prev=Dr.next){case 0:return En=ar.split("/"),En.pop(),Dr.next=4,fr(En.join("/"));case 4:tr("");case 5:case"end":return Dr.stop()}},nn)}));return function(nn){return Mn.apply(this,arguments)}}()}),s.a.createElement(ae,{taskData:Qt,visible:nr,defaultPath:ar,onClose:function(){return Tn(!1)},isRepository:qt,onOK:function(nn){Mr(nn.path,nn.name)}}),s.a.createElement(me,{taskData:Qt,visible:ue,defaultPath:ar,onClose:function(){return nt(!1)},isRepository:qt,onOK:function(nn){Mr(nn.path,nn.name)}}),s.a.createElement(ge,{taskData:Qt,defaultPath:ar,visible:an,isRepository:qt,onClose:function(){return Xt(!1)},onOK:function(){var Mn=Object(u.a)(M.a.mark(function nn(Un){var En;return M.a.wrap(function(Dr){for(;;)switch(Dr.prev=Dr.next){case 0:return En=ar.split("/"),Dr.next=3,fr(ar);case 3:Tr=[En[0]||""],pa=[ar],Bi(Object(k.a)(pa)),Ji(Object(k.a)(Tr));case 7:case"end":return Dr.stop()}},nn)}));return function(nn){return Mn.apply(this,arguments)}}()}),s.a.createElement(Me,{pathList:ar==null?void 0:ar.split("/"),showInputPath:!0,isMergeSelectFile:bo,onFinish:function(nn){bo?Xo(nn):fr(nn),Ao(!1)}}))},xe=function(){return s.a.createElement("div",{className:"mt20 pb50 ".concat(_e.a.nodata)},s.a.createElement("div",{className:_e.a.headLeft},"\u63D0\u793A\uFF1A",s.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",s.a.createElement("br",null),"\u4E24\u79CD\u65B9\u5F0F\u6765\u4F7F\u7528\uFF1A",s.a.createElement("br",null),"1\u3001",s.a.createElement("a",{href:"/forums/2784",target:"_blank"},"Git\u5BA2\u6237\u7AEF")," ","\u4E0A\u4F20\u5DF2\u6709\u6587\u4EF6\u6765\u5F00\u59CB\u4F7F\u7528\u3002",s.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"),s.a.createElement("img",{width:"100%",src:Pe.u}))},de=Object(X.a)(function(Ne){var Ge=Ne.shixunsDetail,yt=Ne.loading,pt=Ne.globalSetting,jt=Ne.practiceSetting,Bt=Ne.user;return{shixunsDetail:Ge,globalSetting:pt,user:Bt,practiceSetting:jt,loading:yt}})(ve),je=b("/zsF"),Qe=b("PArb"),ne=b("5GGG"),Ze=b.n(ne),lt=function(Ge){var yt=Ge.shixunsDetail,pt=Ge.globalSetting,jt=Ge.loading,Bt=Ge.user,gt=Ge.dispatch,Ht=Ge.isRepository,Ut=Object(w.a)(Ge,["shixunsDetail","globalSetting","loading","user","dispatch","isRepository"]),Nt=Object(O.a)(Object(O.a)({},Object(z.i)()),Object(z.h)().query),Wt=Object(g.useState)([]),Qt=Object(C.a)(Wt,2),pn=Qt[0],qt=Qt[1];Object(g.useEffect)(function(){en()},[Ht]);var en=function(){var qn=Object(u.a)(M.a.mark(function $t(){var cn;return M.a.wrap(function(yn){for(;;)switch(yn.prev=yn.next){case 0:return yn.next=2,gt({type:"shixunsDetail/getRepositoryCommit",payload:{id:Nt.id,secret_repository:Ht?void 0:!0}});case 2:cn=yn.sent,cn&&qt(cn.commits||[]);case 4:case"end":return yn.stop()}},$t)}));return function(){return qn.apply(this,arguments)}}();return s.a.createElement(s.a.Fragment,null,pn==""&&s.a.createElement("div",{className:Ze.a.empty},s.a.createElement("img",{src:Pe.k,width:"258"}),s.a.createElement("br",null),s.a.createElement("span",{className:"c-grey-c font14"},"\u6682\u65E0\u63D0\u4EA4\u8BB0\u5F55")),pn!=""&&s.a.createElement("section",{className:Ze.a.bg},s.a.createElement("div",{className:Ze.a.wrap},s.a.createElement("div",{className:Ze.a.content},pn==null?void 0:pn.map(function(qn){var $t,cn;return s.a.createElement("div",null,s.a.createElement(v.a,{align:"middle",className:"c-white font16"},s.a.createElement(y.a,null,qn.title)),s.a.createElement(v.a,{align:"middle",className:"mt20 "},s.a.createElement(y.a,null,s.a.createElement("img",{className:Ze.a.imageUrl,src:Q.a.IMG_SERVER+"/"+(($t=qn.author)===null||$t===void 0?void 0:$t.image_url)})),s.a.createElement(y.a,{className:Ze.a.blueLight},s.a.createElement("span",{className:"ml20"},(cn=qn.author)===null||cn===void 0?void 0:cn.username)),s.a.createElement(y.a,null,s.a.createElement("span",{className:"ml20 ".concat(Ze.a.blueLight)},"\u63D0\u4EA4\u4E8E"),s.a.createElement("span",{className:"ml20 ".concat(Ze.a.blueLight)},qn.time))),s.a.createElement(Qe.a,{className:Ze.a.divider}))})))))},Be=Object(X.a)(function(Ne){var Ge=Ne.shixunsDetail,yt=Ne.loading,pt=Ne.globalSetting,jt=Ne.user;return{shixunsDetail:Ge,globalSetting:pt,user:jt,loading:yt.models.index}})(lt),$e=b("p5ED"),rt=A.a.TabPane,xt=function(Ge){var yt,pt,jt,Bt,gt,Ht,Ut=Ge.globalSetting,Nt=Ge.loading,Wt=Ge.dispatch,Qt=Ge.practiceSetting,pn=Ge.shixunsDetail,qt=Ge.taskData,en=Ge.taskId,qn=Ge.onEditRepCode,$t=Object(w.a)(Ge,["globalSetting","loading","dispatch","practiceSetting","shixunsDetail","taskData","taskId","onEditRepCode"]),cn=!(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),mn=Object(g.useState)("1"),yn=Object(C.a)(mn,2),Vn=yn[0],$n=yn[1],zt=Object(g.useState)("1"),xn=Object(C.a)(zt,2),wr=xn[0],nr=xn[1],Tn=Object(g.useState)(!0),Yn=Object(C.a)(Tn,2),ce=Yn[0],V=Yn[1],J=Object(g.useState)({}),ee=Object(C.a)(J,2),Se=ee[0],ue=ee[1],nt=Object(g.useRef)(),Dt=Object(g.useState)(!0),Yt=Object(C.a)(Dt,2),an=Yt[0],Xt=Yt[1],Rn=Object(g.useState)(["2","1"]),Kn=Object(C.a)(Rn,2),ar=Kn[0],vr=Kn[1],lr=Object(g.useState)([]),Jn=Object(C.a)(lr,2),Tr=Jn[0],Ji=Jn[1],Vr=Object(g.useRef)(),oi=Object(O.a)(Object(O.a)({},Object(z.i)()),{},{taskId:en}),pa=Object(g.useState)(!1),Bi=Object(C.a)(pa,2),ta=Bi[0],Da=Bi[1],_o=[{id:"1",name:"\u4EE3\u7801\u4ED3\u5E93"},{id:"2",name:s.a.createElement("span",null,s.a.createElement("span",null,"\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93"),s.a.createElement(x.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"},s.a.createElement("i",{className:"iconfont icon-xiaowenhao",style:{marginLeft:2,fontSize:14}})))}];Object(g.useEffect)(function(){var Nr,qr=Qt==null||((Nr=Qt.sideBar)===null||Nr===void 0)?void 0:Nr.selectPath.split("/");vr(qr)},[Qt==null||((pt=Qt.sideBar)===null||pt===void 0)?void 0:pt.selectPath]);var lo=function(qr){qr.data==="compileResltDone"&&Da(!1)};Object(g.useEffect)(function(){return window.addEventListener("message",lo),function(){window.removeEventListener("message",lo)}},[]);var wo=function(qr){(Se==null?void 0:Se.file_type)==="txt"&&(Se.content=qr,ue(Object(O.a)({},Se)),qn(qr))};Object(g.useEffect)(function(){var Nr;console.log(Qt==null||((Nr=Qt.sideBar)===null||Nr===void 0)?void 0:Nr.selectPath,"sideBar"),new Promise(function(){var qr=Object(u.a)(M.a.mark(function _i(Ur,Ar){var ti,yr,si,cr,Hi,Ni,Zi;return M.a.wrap(function(Vi){for(;;)switch(Vi.prev=Vi.next){case 0:if(!((Qt==null||((ti=Qt.sideBar)===null||ti===void 0)?void 0:ti.selectPath)!==""&&Qt!==null&&Qt!==void 0&&(yr=Qt.sideBar)!==null&&yr!==void 0&&yr.selectPath)){Vi.next=5;break}return Vi.next=3,Object(Z.j)(en,{path:Qt==null||((si=Qt.sideBar)===null||si===void 0)?void 0:si.selectPath});case 3:if(cr=Vi.sent,cr!=null&&cr.content||(cr==null?void 0:cr.content)=="")try{(cr==null?void 0:cr.file_type)==="txt"?(cr.content=window.decodeURIComponent(escape(window.atob((Hi=cr.content)===null||Hi===void 0?void 0:Hi.content))),ue(Object(O.a)({},cr))):(cr.content=(Ni=cr.content)===null||Ni===void 0?void 0:Ni.content,ue(Object(O.a)({},cr)))}catch(Qa){Se.content&&(cr.content=window.atob((Zi=cr.content)===null||Zi===void 0?void 0:Zi.content)),ue(Object(O.a)({},cr)),h.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 Vi.stop()}},_i)}));return function(_i,Ur){return qr.apply(this,arguments)}}())},[Qt==null||((jt=Qt.sideBar)===null||jt===void 0)?void 0:jt.selectPath]);var Fa=s.a.createElement(d.a,{className:P.a.menu,onClick:function(qr){var _i;!(pn!=null&&(_i=pn.detail)!==null&&_i!==void 0&&_i.secret_repository)&&qr.key==="2"&&nr("1"),$n(qr.key),qr.key==="1"?Xt(!0):Xt(!1)}},s.a.createElement(d.a.Item,{disabled:!0,key:"0"},"\u5207\u6362\u4ED3\u5E93"),_o.filter(function(Nr){var qr,_i;return!(pn!=null&&(qr=pn.detail)!==null&&qr!==void 0&&qr.init_repository)||pn!=null&&(_i=pn.detail)!==null&&_i!==void 0&&_i.is_jupyter_lab?Nr.id!=="2":Nr}).map(function(Nr,qr){return s.a.createElement(d.a.Item,{className:"leaveClick",key:Nr.id},Nr.name)})),Gi=function(){var Nr=Object(u.a)(M.a.mark(function qr(){var _i,Ur,Ar,ti,yr,si;return M.a.wrap(function(Hi){for(;;)switch(Hi.prev=Hi.next){case 0:return Da(!0),Hi.next=3,Object(Z.L)(qt==null||((_i=qt.myshixun)===null||_i===void 0)?void 0:_i.identifier,Object(O.a)(Object(O.a)({path:Qt==null||((Ur=Qt.sideBar)===null||Ur===void 0)?void 0:Ur.selectPath},Se),{},{evaluate:0,game_id:qt==null||((Ar=qt.game)===null||Ar===void 0)?void 0:Ar.id}));case 3:si=Hi.sent,(ti=document.getElementById("latexIframeRef"))===null||ti===void 0||((yr=ti.contentWindow)===null||yr===void 0)||yr.postMessage("compile","*"),si!=null&&si.content&&Wt({type:"practiceSetting/setSideBarTabs",payload:Object(O.a)(Object(O.a)({},Qt.sideBar),{},{confirmLeave:!1})});case 6:case"end":return Hi.stop()}},qr)}));return function(){return Nr.apply(this,arguments)}}();return s.a.createElement("div",{className:P.a.warehouse},s.a.createElement("div",{className:P.a.content},wr==="1"&&s.a.createElement(s.a.Fragment,null,s.a.createElement("aside",{className:P.a.left,id:"latex-drawer",style:{width:ce?"36%":"0%"}},s.a.createElement(a.a,{spinning:!!Nt.effects["shixunsDetail/getRepository"],wrapperClassName:"".concat(P.a.loading," ").concat(P.a.bottom0)},s.a.createElement(de,{taskData:qt,params:oi,setTreeData:Ji,treeData:Tr,activeKey:Vn,isRepository:an})),s.a.createElement("span",{onClick:function(){return V(!1)},className:"".concat(P.a.close," iconfont icon-quxiao")})),s.a.createElement("aside",{className:P.a.right,ref:Vr},(Qt==null||((Bt=Qt.sideBar)===null||Bt===void 0)?void 0:Bt.selectPath)!==""&&s.a.createElement(s.a.Fragment,null,s.a.createElement(a.a,{spinning:!!Nt.effects["shixunsDetail/getFileContent"],wrapperClassName:P.a.loading},s.a.createElement("div",{className:P.a.filePathWrp},s.a.createElement(v.a,{align:"middle",className:"w100"},s.a.createElement(y.a,null,s.a.createElement("span",{onClick:function(){return V(!0)},className:"iconfont icon-daimacangku2 c-white current"})),s.a.createElement(y.a,{flex:"40px"},s.a.createElement("div",{className:P.a.line,style:{marginLeft:20}})),s.a.createElement(y.a,{className:P.a.filePath},ar.map(function(Nr,qr){return s.a.createElement("span",{className:"c-blue"},Nr)})))),s.a.createElement("div",{className:Nt.effects["shixunsDetail/getFileContent"]?"hide":"show"},s.a.createElement($e.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 wo(qr)},options:{fontSize:14,minimap:{enabled:!1}}}}))),(Se==null?void 0:Se.file_type)==="txt"&&s.a.createElement("div",{className:P.a.footer},(qt==null?void 0:qt.prev_game)&&s.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"),s.a.createElement(i.a,{type:"primary",size:"large",loading:ta,onClick:Gi},"\u5F00\u59CB\u7F16\u8BD1"),cn&&s.a.createElement("a",{href:"/tasks/".concat(qt==null?void 0:qt.next_game).concat(location.search),style:{marginLeft:"auto"},onClick:function(qr){var _i,Ur;if(qr.preventDefault(),qt!=null&&(_i=qt.shixun)!==null&&_i!==void 0&&_i.task_pass||(qt==null?void 0:qt.game.status)===2||(qt==null||((Ur=qt.user)===null||Ur===void 0)?void 0:Ur.identity)<5){setTimeout(function(){return window.location.href="/tasks/".concat(qt==null?void 0:qt.next_game).concat(location.search)},300);return}l.a.warning({centered:!0,width:530,title:"\u63D0\u793A",okText:"\u6211\u77E5\u9053\u4E86",content:s.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"))),(Qt==null||((gt=Qt.sideBar)===null||gt===void 0)?void 0:gt.selectPath)==""&&(pn==null||((Ht=pn.detail)===null||Ht===void 0)?void 0:Ht.init_repository)&&s.a.createElement("div",{className:P.a.empty},s.a.createElement("img",{src:Pe.j,width:"258"}),s.a.createElement("br",null),s.a.createElement("span",{className:"c-grey-c"},!!(Tr!=null&&Tr.length)&&"\u5728\u5DE6\u4FA7\u4EE3\u7801\u4ED3\u5E93\u533A\u57DF\u70B9\u51FB\u76EE\u5F55\u6253\u5F00\u6587\u4EF6",!(Tr!=null&&Tr.length)&&"\u8BF7\u5148\u5728\u5DE6\u4FA7\u4E0A\u4F20\u6587\u4EF6\u6216\u65B0\u5EFA\u6587\u4EF6\uFF01")))),wr==="2"&&s.a.createElement("div",{className:P.a.commit},s.a.createElement(Be,{isRepository:an}))))},ft=Object(X.a)(function(Ne){var Ge=Ne.loading,yt=Ne.globalSetting,pt=Ne.practiceSetting,jt=Ne.shixunsDetail;return{globalSetting:yt,loading:Ge,practiceSetting:pt,shixunsDetail:jt}})(xt),st=H.default=function(Ne){var Ge=Ne.taskId,yt=Ne.taskData,pt=Ne.onEditRepCode,jt=Object(g.useRef)(),Bt=Object(g.useRef)(),gt=Object(g.useMemo)(function(){if(yt){var Ht,Ut,Nt,Wt,Qt,pn=yt==null||((Ht=yt.challenge)===null||Ht===void 0||((Ut=Ht.path)===null||Ut===void 0||((Nt=Ut.replace("\uFF1B",";"))===null||Nt===void 0)))?void 0:Nt.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(pn,"&taskId=").concat(Ge,"&myshixunId=").concat(yt==null||((Qt=yt.myshixun)===null||Qt===void 0)?void 0:Qt.identifier,"&token=").concat(Object(p.F)("_educoder_session"))}},[yt]);return s.a.createElement(v.a,{style:{height:"100vh"},ref:Bt},s.a.createElement(y.a,{flex:"1"},(yt==null?void 0:yt.shixun)&&s.a.createElement(ft,{taskId:Ge,taskData:yt,onEditRepCode:pt})),s.a.createElement(y.a,{flex:"1",className:o.a.wrap},s.a.createElement("iframe",{ref:jt,id:"latexIframeRef",style:{width:"100%",border:"none",height:"100%"},src:gt}),s.a.createElement("span",{className:o.a.full,onClick:function(){Object(_.a)()?Object(_.b)():Object(_.d)(Bt.current)}},s.a.createElement("span",{className:"iconfont icon-quanping mr5 font12"}),"\u5168\u5C4F / \u9000\u51FA\u5168\u5C4F")))}},"4qgm":function(j,H){j.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(j,H){j.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(j,H,b){"use strict";b.d(H,"a",function(){return E});var I=b("+L6B"),v=b("2/Rp"),T=b("2qtc"),y=b("kLXV"),g=b("9og8"),s=b("k1fw"),_=b("miYZ"),p=b("tsqr"),e=b("oBTY"),o=b("tJVT"),n=b("DZo9"),l=b("8z0m"),r=b("WmNS"),i=b.n(r),t=b("q1tI"),a=b.n(t),c=b("m3rI"),d=b("wzkS"),f=b("y5JW"),h=b("LtfV"),u=l.a.Dragger;function E(x){var O=[];return x&&x.length>0&&(O=x.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}}})),O}H.b=function(x){var O=x.value,C=x.onChange,w=x.action,S=x.className,A=x.maxSize,D=A===void 0?150:A,M=x.title,N=M===void 0?"\u4E0A\u4F20\u9644\u4EF6":M,P=x.showRemoveModal,z=P===void 0?!1:P,X=x.accept,k=X===void 0?"":X,F=x.additionalText,U=x.isDragger,L=x.number,B=L===void 0?1e3:L,Z=x.aloneClear,re=Z===void 0?!1:Z,he=Object(t.useState)(!1),Ce=Object(o.a)(he,2),ke=Ce[0],te=Ce[1],Re=Object(t.useState)(O||[]),Te=Object(o.a)(Re,2),pe=Te[0],me=Te[1];Object(t.useEffect)(function(){O&&(me(Object(e.a)(O)),B===(O==null?void 0:O.length)&&te(!0))},[O]);var se=function(){setTimeout(function(){pe.pop(),me(Object(e.a)(pe))},500)},be={multiple:!0,disabled:ke,accept:k,withCredentials:!0,fileList:pe,beforeUpload:function(Fe,ie){var q=Fe.size/1024/1024;return pe.concat(ie).length>B?(pe.pop(),me(Object(e.a)(pe)),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 ie,q,Q=Object(e.a)(Fe.fileList);if(Fe.file.status==="done"&&((ie=Fe.file)===null||ie===void 0||((q=ie.response)===null||q===void 0)?void 0:q.status)===-1){var Y,oe;p.b.error((Y=Fe.file)===null||Y===void 0||((oe=Y.response)===null||oe===void 0)?void 0:oe.message);return}Q.length>=B?te(!0):te(!1),me(Object(e.a)(Q)),Q=Q.map(function(le){var Ee;if(le!=null&&(Ee=le.response)!==null&&Ee!==void 0&&Ee.id){var Le;le.url="/api/attachments/".concat(le==null||((Le=le.response)===null||Le===void 0)?void 0:Le.id)}return le.name.indexOf(f.c)===-1&&(le.name="".concat(le.name).concat(f.c).concat(Object(f.a)(le.size))),Object(s.a)({},le)}),console.log("info:",Fe),C(Q)},onRemove:function(){var fe=Object(g.a)(i.a.mark(function ie(q){var Q;return i.a.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:if(Q=function(){var le=Object(g.a)(i.a.mark(function Ee(){var Le,ge;return i.a.wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:if(Le=q.response?q.response.id:q.id,!Le){_e.next=8;break}return _e.next=4,Object(d.d)(q.response?q.response.id:q.uid);case 4:return ge=_e.sent,_e.abrupt("return",ge);case 8:return _e.abrupt("return",!0);case 9:case"end":return _e.stop()}},Ee)}));return function(){return le.apply(this,arguments)}}(),!z){oe.next=5;break}return oe.abrupt("return",new Promise(function(le,Ee){y.a.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:a.a.createElement("div",{className:"tc font16"},"\u662F\u5426\u786E\u8BA4\u5220\u9664?"),onOk:function(){var Le=Object(g.a)(i.a.mark(function De(){var _e;return i.a.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return tt.next=2,Q();case 2:_e=tt.sent,p.b.success("\u5220\u9664\u6210\u529F"),le(!0);case 5:case"end":return tt.stop()}},De)}));function ge(){return Le.apply(this,arguments)}return ge}(),onCancel:function(){return le(!1)}})}));case 5:return oe.next=7,Q();case 7:return oe.abrupt("return",oe.sent);case 8:case"end":return oe.stop()}},ie)}));function Fe(ie){return fe.apply(this,arguments)}return Fe}()};function ae(fe){fe.preventDefault(),fe.stopPropagation()}return a.a.createElement("div",{className:"multi-upload ".concat(S||"")},U&&a.a.createElement(u,be,a.a.createElement("p",{className:"ant-upload-drag-icon"},a.a.createElement(h.a,null)),a.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",a.a.createElement("br",null),"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927\u9650\u5236\u4E3A",D,"MB)"," "),F),!U&&a.a.createElement(l.a,be,a.a.createElement(v.a,{style:{width:"108px",height:"32px",background:"#F6F7F9 linear-gradient(180deg, #FFFFFF 0%, #F6F7F9 100%)",boxShadow:"0px 2px 4px 0px #E0DFE1, inset 0px 1px 3px 0px rgba(255,255,255,0.5)",borderRadius:"2px",border:"1px solid #BACFFE",color:"#3061D0"},icon:a.a.createElement("i",{className:"iconfont icon-shangchuan3",style:{marginRight:"6px"}}),disabled:ke},N),a.a.createElement("span",{onClick:ae,style:{marginLeft:10,color:"#FA6400"}},"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927",D,"MB)"," ")))}},"55Ip":function(j,H,b){"use strict";b.d(H,"a",function(){return f});var I=b("Ty5D"),v=b("dI71"),T=b("q1tI"),y=b.n(T),g=b("YS25"),s=b("17x9"),_=b.n(s),p=b("wx14"),e=b("zLVn"),o=b("9R94"),n=function(S){Object(v.a)(A,S);function A(){for(var M,N=arguments.length,P=new Array(N),z=0;z<N;z++)P[z]=arguments[z];return M=S.call.apply(S,[this].concat(P))||this,M.history=Object(g.a)(M.props),M}var D=A.prototype;return D.render=function(){return y.a.createElement(I.c,{history:this.history,children:this.props.children})},A}(y.a.Component),l=function(S){Object(v.a)(A,S);function A(){for(var M,N=arguments.length,P=new Array(N),z=0;z<N;z++)P[z]=arguments[z];return M=S.call.apply(S,[this].concat(P))||this,M.history=Object(g.b)(M.props),M}var D=A.prototype;return D.render=function(){return y.a.createElement(I.c,{history:this.history,children:this.props.children})},A}(y.a.Component),r=function(A,D){return typeof A=="function"?A(D):A},i=function(A,D){return typeof A=="string"?Object(g.c)(A,null,null,D):A},t=function(A){return A},a=y.a.forwardRef;typeof a=="undefined"&&(a=t);function c(S){return!!(S.metaKey||S.altKey||S.ctrlKey||S.shiftKey)}var d=a(function(S,A){var D=S.innerRef,M=S.navigate,N=S.onClick,P=Object(e.a)(S,["innerRef","navigate","onClick"]),z=P.target,X=Object(p.a)({},P,{onClick:function(F){try{N&&N(F)}catch(U){throw F.preventDefault(),U}!F.defaultPrevented&&F.button===0&&(!z||z==="_self")&&!c(F)&&(F.preventDefault(),M())}});return t!==a?X.ref=A||D:X.ref=D,y.a.createElement("a",X)}),f=a(function(S,A){var D=S.component,M=D===void 0?d:D,N=S.replace,P=S.to,z=S.innerRef,X=Object(e.a)(S,["component","replace","to","innerRef"]);return y.a.createElement(I.e.Consumer,null,function(k){k||Object(o.a)(!1);var F=k.history,U=i(r(P,k.location),k.location),L=U?F.createHref(U):"",B=Object(p.a)({},X,{href:L,navigate:function(){var re=r(P,k.location),he=N?F.replace:F.push;he(re)}});return t!==a?B.ref=A||z:B.innerRef=z,y.a.createElement(M,B)})});if(!1)var h,u;var E=function(A){return A},x=y.a.forwardRef;typeof x=="undefined"&&(x=E);function O(){for(var S=arguments.length,A=new Array(S),D=0;D<S;D++)A[D]=arguments[D];return A.filter(function(M){return M}).join(" ")}var C=x(function(S,A){var D=S["aria-current"],M=D===void 0?"page":D,N=S.activeClassName,P=N===void 0?"active":N,z=S.activeStyle,X=S.className,k=S.exact,F=S.isActive,U=S.location,L=S.sensitive,B=S.strict,Z=S.style,re=S.to,he=S.innerRef,Ce=Object(e.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(o.a)(!1);var te=U||ke.location,Re=i(r(re,te),te),Te=Re.pathname,pe=Te&&Te.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),me=pe?Object(I.f)(te.pathname,{path:pe,exact:k,sensitive:L,strict:B}):null,se=!!(F?F(me,te):me),be=se?O(X,P):X,ae=se?Object(p.a)({},Z,{},z):Z,fe=Object(p.a)({"aria-current":se&&M||null,className:be,style:ae,to:Re},Ce);return E!==x?fe.ref=A||he:fe.innerRef=he,y.a.createElement(f,fe)})});if(!1)var w},"5D2P":function(j,H){j.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(j,H,b){j.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(j,H,b){j.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(j,H,b){"use strict";var I,v;function T(y,g,s){var _=function(p,e){return y.js_beautify(p,e)};return _.js=y.js_beautify,_.css=g.css_beautify,_.html=s.html_beautify,_.js_beautify=y.js_beautify,_.css_beautify=g.css_beautify,_.html_beautify=s.html_beautify,_}!(I=[b("6UM0"),b("TXwP"),b("psGv")],v=function(y,g,s){return T(y,g,s)}.apply(H,I),v!==void 0&&(j.exports=v))},"5Y4S":function(j,H,b){"use strict";b.d(H,"a",function(){return T});var I=b("MNsG");const v=I.b.performance&&typeof I.b.performance.now=="function";class T{constructor(y){this._highResolution=v&&y,this._startTime=this._now(),this._stopTime=-1}static create(y=!0){return new T(y)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?I.b.performance.now():Date.now()}}},"5hvy":function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("MlIO"))})(this,function(I){return function(v){var T=I,y=T.lib,g=y.WordArray,s=y.Hasher,_=T.x64,p=_.Word,e=T.algo,o=[],n=[],l=[];(function(){for(var t=1,a=0,c=0;c<24;c++){o[t+5*a]=(c+1)*(c+2)/2%64;var d=a%5,f=(2*t+3*a)%5;t=d,a=f}for(var t=0;t<5;t++)for(var a=0;a<5;a++)n[t+5*a]=a+(2*t+3*a)%5*5;for(var h=1,u=0;u<24;u++){for(var E=0,x=0,O=0;O<7;O++){if(h&1){var C=(1<<O)-1;C<32?x^=1<<C:E^=1<<C-32}h&128?h=h<<1^113:h<<=1}l[u]=p.create(E,x)}})();var r=[];(function(){for(var t=0;t<25;t++)r[t]=p.create()})();var i=e.SHA3=s.extend({cfg:s.cfg.extend({outputLength:512}),_doReset:function(){for(var t=this._state=[],a=0;a<25;a++)t[a]=new p.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(t,a){for(var c=this._state,d=this.blockSize/2,f=0;f<d;f++){var h=t[a+2*f],u=t[a+2*f+1];h=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360,u=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360;var E=c[f];E.high^=u,E.low^=h}for(var x=0;x<24;x++){for(var O=0;O<5;O++){for(var C=0,w=0,S=0;S<5;S++){var E=c[O+5*S];C^=E.high,w^=E.low}var A=r[O];A.high=C,A.low=w}for(var O=0;O<5;O++)for(var D=r[(O+4)%5],M=r[(O+1)%5],N=M.high,P=M.low,C=D.high^(N<<1|P>>>31),w=D.low^(P<<1|N>>>31),S=0;S<5;S++){var E=c[O+5*S];E.high^=C,E.low^=w}for(var z=1;z<25;z++){var C,w,E=c[z],X=E.high,k=E.low,F=o[z];F<32?(C=X<<F|k>>>32-F,w=k<<F|X>>>32-F):(C=k<<F-32|X>>>64-F,w=X<<F-32|k>>>64-F);var U=r[n[z]];U.high=C,U.low=w}var L=r[0],B=c[0];L.high=B.high,L.low=B.low;for(var O=0;O<5;O++)for(var S=0;S<5;S++){var z=O+5*S,E=c[z],Z=r[z],re=r[(O+1)%5+5*S],he=r[(O+2)%5+5*S];E.high=Z.high^~re.high&he.high,E.low=Z.low^~re.low&he.low}var E=c[0],Ce=l[x];E.high^=Ce.high,E.low^=Ce.low}},_doFinalize:function(){var t=this._data,a=t.words,c=this._nDataBytes*8,d=t.sigBytes*8,f=this.blockSize*32;a[d>>>5]|=1<<24-d%32,a[(v.ceil((d+1)/f)*f>>>5)-1]|=128,t.sigBytes=a.length*4,this._process();for(var h=this._state,u=this.cfg.outputLength/8,E=u/8,x=[],O=0;O<E;O++){var C=h[O],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,x.push(S),x.push(w)}return new g.init(x,u)},clone:function(){for(var t=s.clone.call(this),a=t._state=this._state.slice(0),c=0;c<25;c++)a[c]=a[c].clone();return t}});T.SHA3=s._createHelper(i),T.HmacSHA3=s._createHmacHelper(i)}(Math),I.SHA3})},"5nXd":function(j,H,b){var I=b("MFOe"),v=I.slice,T=I.pluck,y=I.each,g=I.bind,s=I.create,_=I.isList,p=I.isFunction,e=I.isObject;j.exports={createStore:l};var o={version:"2.0.12",enabled:!1,get:function(r,i){var t=this.storage.read(this._namespacePrefix+r);return this._deserialize(t,i)},set:function(r,i){return i===void 0?this.remove(r):(this.storage.write(this._namespacePrefix+r,this._serialize(i)),i)},remove:function(r){this.storage.remove(this._namespacePrefix+r)},each:function(r){var i=this;this.storage.each(function(t,a){r.call(i,i._deserialize(t),(a||"").replace(i._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(r){return this._namespacePrefix=="__storejs_"+r+"_"},createStore:function(){return l.apply(this,arguments)},addPlugin:function(r){this._addPlugin(r)},namespace:function(r){return l(this.storage,this.plugins,r)}};function n(){var r=typeof console=="undefined"?null:console;if(!r)return;var i=r.warn?r.warn:r.log;i.apply(r,arguments)}function l(r,i,t){t||(t=""),r&&!_(r)&&(r=[r]),i&&!_(i)&&(i=[i]);var a=t?"__storejs_"+t+"_":"",c=t?new RegExp("^"+a):null,d=/^[a-zA-Z0-9_\-]*$/;if(!d.test(t))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var f={_namespacePrefix:a,_namespaceRegexp:c,_testStorage:function(u){try{var E="__storejs__test__";u.write(E,E);var x=u.read(E)===E;return u.remove(E),x}catch(O){return!1}},_assignPluginFnProp:function(u,E){var x=this[E];this[E]=function(){var C=v(arguments,0),w=this;function S(){return x?(y(arguments,function(D,M){C[M]=D}),x.apply(w,C)):void 0}var A=[S].concat(C);return u.apply(w,A)}},_serialize:function(u){return JSON.stringify(u)},_deserialize:function(u,E){if(!u)return E;var x="";try{x=JSON.parse(u)}catch(O){x=u}return x!==void 0?x:E},_addStorage:function(u){if(this.enabled)return;this._testStorage(u)&&(this.storage=u,this.enabled=!0)},_addPlugin:function(u){var E=this;if(_(u)){y(u,function(C){E._addPlugin(C)});return}var x=T(this.plugins,function(C){return u===C});if(x)return;if(this.plugins.push(u),!p(u))throw new Error("Plugins must be function values that return objects");var O=u.call(this);if(!e(O))throw new Error("Plugins must return an object of function properties");y(O,function(C,w){if(!p(C))throw new Error("Bad plugin property: "+w+" from plugin "+u.name+". Plugins should only return functions.");E._assignPluginFnProp(C,w)})},addStorage:function(u){n("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(u)}},h=s(f,o,{plugins:[]});return h.raw={},y(h,function(u,E){p(u)&&(h.raw[E]=g(h,u))}),y(r,function(u){h._addStorage(u)}),y(i,function(u){h._addPlugin(u)}),h}},"6+eU":function(j,H,b){"use strict";b.d(H,"a",function(){return x});var I=b("wx14"),v=b("rePB"),T=b("VTBJ"),y=b("1OyB"),g=b("vuIU"),s=b("Ji7U"),_=b("LK+K"),p=b("q1tI"),e=b.n(p),o=b("TSYQ"),n=b.n(o),l=function(C){var w,S="".concat(C.rootPrefixCls,"-item"),A=n()(S,"".concat(S,"-").concat(C.page),(w={},Object(v.a)(w,"".concat(S,"-active"),C.active),Object(v.a)(w,C.className,!!C.className),Object(v.a)(w,"".concat(S,"-disabled"),!C.page),w)),D=function(){C.onClick(C.page)},M=function(P){C.onKeyPress(P,C.onClick,C.page)};return e.a.createElement("li",{title:C.showTitle?C.page:null,className:A,onClick:D,onKeyPress:M,tabIndex:"0"},C.itemRender(C.page,"page",e.a.createElement("a",{rel:"nofollow"},C.page)))},r=l,i={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},t=function(O){Object(s.a)(w,O);var C=Object(_.a)(w);function w(){var S;Object(y.a)(this,w);for(var A=arguments.length,D=new Array(A),M=0;M<A;M++)D[M]=arguments[M];return S=C.call.apply(C,[this].concat(D)),S.state={goInputText:""},S.buildOptionText=function(N){return"".concat(N," ").concat(S.props.locale.items_per_page)},S.changeSize=function(N){S.props.changeSize(Number(N))},S.handleChange=function(N){S.setState({goInputText:N.target.value})},S.handleBlur=function(N){var P=S.props,z=P.goButton,X=P.quickGo,k=P.rootPrefixCls,F=S.state.goInputText;if(z||F==="")return;if(N.relatedTarget&&(N.relatedTarget.className.indexOf("".concat(k,"-prev"))>=0||N.relatedTarget.className.indexOf("".concat(k,"-next"))>=0))return;S.setState({goInputText:""}),X(S.getValidValue())},S.go=function(N){var P=S.state.goInputText;if(P==="")return;(N.keyCode===i.ENTER||N.type==="click")&&(S.setState({goInputText:""}),S.props.quickGo(S.getValidValue()))},S}return Object(g.a)(w,[{key:"getValidValue",value:function(){var A=this.state,D=A.goInputText,M=A.current;return!D||isNaN(D)?M:Number(D)}},{key:"getPageSizeOptions",value:function(){var A=this.props,D=A.pageSize,M=A.pageSizeOptions;return M.some(function(N){return N.toString()===D.toString()})?M:M.concat([D.toString()]).sort(function(N,P){var z=isNaN(Number(N))?0:Number(N),X=isNaN(Number(P))?0:Number(P);return z-X})}},{key:"render",value:function(){var A=this,D=this.props,M=D.pageSize,N=D.locale,P=D.rootPrefixCls,z=D.changeSize,X=D.quickGo,k=D.goButton,F=D.selectComponentClass,U=D.buildOptionText,L=D.selectPrefixCls,B=D.disabled,Z=this.state.goInputText,re="".concat(P,"-options"),he=F,Ce=null,ke=null,te=null;if(!z&&!X)return null;var Re=this.getPageSizeOptions();if(z&&he){var Te=Re.map(function(pe,me){return e.a.createElement(he.Option,{key:me,value:pe.toString()},(U||A.buildOptionText)(pe))});Ce=e.a.createElement(he,{disabled:B,prefixCls:L,showSearch:!1,className:"".concat(re,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(M||Re[0]).toString(),onChange:this.changeSize,getPopupContainer:function(me){return me.parentNode}},Te)}return X&&(k&&(te=typeof k=="boolean"?e.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:B,className:"".concat(re,"-quick-jumper-button")},N.jump_to_confirm):e.a.createElement("span",{onClick:this.go,onKeyUp:this.go},k)),ke=e.a.createElement("div",{className:"".concat(re,"-quick-jumper")},N.jump_to,e.a.createElement("input",{disabled:B,type:"text",value:Z,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),N.page,te)),e.a.createElement("li",{className:"".concat(re)},Ce,ke)}}]),w}(e.a.Component);t.defaultProps={pageSizeOptions:["10","20","50","100"]};var a=t,c=b("N2Kk");function d(){}function f(O){return typeof O=="number"&&isFinite(O)&&Math.floor(O)===O}function h(O,C,w){return w}function u(O,C,w){var S=typeof O=="undefined"?C.pageSize:O;return Math.floor((w.total-1)/S)+1}var E=function(O){Object(s.a)(w,O);var C=Object(_.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(u(void 0,A.state,A.props),A.state.current+(A.props.showLessItems?3:5))},A.getItemIcon=function(z,X){var k=A.props.prefixCls,F=z||e.a.createElement("button",{type:"button","aria-label":X,className:"".concat(k,"-item-link")});return typeof z=="function"&&(F=e.a.createElement(z,Object(T.a)({},A.props))),F},A.savePaginationNode=function(z){A.paginationNode=z},A.isValid=function(z){return f(z)&&z!==A.state.current},A.shouldDisplayQuickJumper=function(){var z=A.props,X=z.showQuickJumper,k=z.pageSize,F=z.total;return F<=k?!1:X},A.handleKeyDown=function(z){(z.keyCode===i.ARROW_UP||z.keyCode===i.ARROW_DOWN)&&z.preventDefault()},A.handleKeyUp=function(z){var X=A.getValidValue(z),k=A.state.currentInputValue;X!==k&&A.setState({currentInputValue:X}),z.keyCode===i.ENTER?A.handleChange(X):z.keyCode===i.ARROW_UP?A.handleChange(X-1):z.keyCode===i.ARROW_DOWN&&A.handleChange(X+1)},A.changePageSize=function(z){var X=A.state.current,k=u(z,A.state,A.props);X=X>k?k:X,k===0&&(X=A.state.current),typeof z=="number"&&("pageSize"in A.props||A.setState({pageSize:z}),"current"in A.props||A.setState({current:X,currentInputValue:X})),A.props.onShowSizeChange(X,z),"onChange"in A.props&&A.props.onChange&&A.props.onChange(X,z)},A.handleChange=function(z){var X=A.props.disabled,k=z;if(A.isValid(k)&&!X){var F=u(void 0,A.state,A.props);k>F?k=F:k<1&&(k=1),"current"in A.props||A.setState({current:k,currentInputValue:k});var U=A.state.pageSize;return A.props.onChange(k,U),k}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<u(void 0,A.state,A.props)},A.runIfEnter=function(z,X){if(z.key==="Enter"||z.charCode===13){for(var k=arguments.length,F=new Array(k>2?k-2:0),U=2;U<k;U++)F[U-2]=arguments[U];X.apply(void 0,F)}},A.runIfEnterPrev=function(z){A.runIfEnter(z,A.prev)},A.runIfEnterNext=function(z){A.runIfEnter(z,A.next)},A.runIfEnterJumpPrev=function(z){A.runIfEnter(z,A.jumpPrev)},A.runIfEnterJumpNext=function(z){A.runIfEnter(z,A.jumpNext)},A.handleGoTO=function(z){(z.keyCode===i.ENTER||z.type==="click")&&A.handleChange(A.state.currentInputValue)};var D=S.onChange!==d,M="current"in S;M&&!D&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var N=S.defaultCurrent;"current"in S&&(N=S.current);var P=S.defaultPageSize;return"pageSize"in S&&(P=S.pageSize),N=Math.min(N,u(P,void 0,S)),A.state={current:N,currentInputValue:N,pageSize:P},A}return Object(g.a)(w,[{key:"componentDidUpdate",value:function(A,D){var M=this.props.prefixCls;if(D.current!==this.state.current&&this.paginationNode){var N=this.paginationNode.querySelector(".".concat(M,"-item-").concat(D.current));N&&document.activeElement===N&&N.blur()}}},{key:"getValidValue",value:function(A){var D=A.target.value,M=u(void 0,this.state,this.props),N=this.state.currentInputValue,P;return D===""?P=D:isNaN(Number(D))?P=N:D>=M?P=M:P=Number(D),P}},{key:"getShowSizeChanger",value:function(){var A=this.props,D=A.showSizeChanger,M=A.total,N=A.totalBoundaryShowSizeChanger;return typeof D!="undefined"?D:M>N}},{key:"renderPrev",value:function(A){var D=this.props,M=D.prevIcon,N=D.itemRender,P=N(A,"prev",this.getItemIcon(M,"prev page")),z=!this.hasPrev();return Object(p.isValidElement)(P)?Object(p.cloneElement)(P,{disabled:z}):P}},{key:"renderNext",value:function(A){var D=this.props,M=D.nextIcon,N=D.itemRender,P=N(A,"next",this.getItemIcon(M,"next page")),z=!this.hasNext();return Object(p.isValidElement)(P)?Object(p.cloneElement)(P,{disabled:z}):P}},{key:"render",value:function(){var A=this,D=this.props,M=D.prefixCls,N=D.className,P=D.style,z=D.disabled,X=D.hideOnSinglePage,k=D.total,F=D.locale,U=D.showQuickJumper,L=D.showLessItems,B=D.showTitle,Z=D.showTotal,re=D.simple,he=D.itemRender,Ce=D.showPrevNextJumpers,ke=D.jumpPrevIcon,te=D.jumpNextIcon,Re=D.selectComponentClass,Te=D.selectPrefixCls,pe=D.pageSizeOptions,me=this.state,se=me.current,be=me.pageSize,ae=me.currentInputValue;if(X===!0&&k<=be)return null;var fe=u(void 0,this.state,this.props),Fe=[],ie=null,q=null,Q=null,Y=null,oe=null,le=U&&U.goButton,Ee=L?1:2,Le=se-1>0?se-1:0,ge=se+1<fe?se+1:fe,De=Object.keys(this.props).reduce(function(ve,xe){return(xe.substr(0,5)==="data-"||xe.substr(0,5)==="aria-"||xe==="role")&&(ve[xe]=A.props[xe]),ve},{});if(re)return le&&(typeof le=="boolean"?oe=e.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},F.jump_to_confirm):oe=e.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},le),oe=e.a.createElement("li",{title:B?"".concat(F.jump_to).concat(se,"/").concat(fe):null,className:"".concat(M,"-simple-pager")},oe)),e.a.createElement("ul",Object(I.a)({className:n()(M,"".concat(M,"-simple"),Object(v.a)({},"".concat(M,"-disabled"),z),N),style:P,ref:this.savePaginationNode},De),e.a.createElement("li",{title:B?F.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:n()("".concat(M,"-prev"),Object(v.a)({},"".concat(M,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(Le)),e.a.createElement("li",{title:B?"".concat(se,"/").concat(fe):null,className:"".concat(M,"-simple-pager")},e.a.createElement("input",{type:"text",value:ae,disabled:z,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),e.a.createElement("span",{className:"".concat(M,"-slash")},"/"),fe),e.a.createElement("li",{title:B?F.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:n()("".concat(M,"-next"),Object(v.a)({},"".concat(M,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(ge)),oe);if(fe<=3+Ee*2){var _e={locale:F,rootPrefixCls:M,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:B,itemRender:he};fe||Fe.push(e.a.createElement(r,Object(I.a)({},_e,{key:"noPager",page:fe,className:"".concat(M,"-disabled")})));for(var Xe=1;Xe<=fe;Xe+=1){var tt=se===Xe;Fe.push(e.a.createElement(r,Object(I.a)({},_e,{key:Xe,page:Xe,active:tt})))}}else{var ze=L?F.prev_3:F.prev_5,Me=L?F.next_3:F.next_5;Ce&&(ie=e.a.createElement("li",{title:B?ze:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:n()("".concat(M,"-jump-prev"),Object(v.a)({},"".concat(M,"-jump-prev-custom-icon"),!!ke))},he(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(ke,"prev page"))),q=e.a.createElement("li",{title:B?Me:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:n()("".concat(M,"-jump-next"),Object(v.a)({},"".concat(M,"-jump-next-custom-icon"),!!te))},he(this.getJumpNextPage(),"jump-next",this.getItemIcon(te,"next page")))),Y=e.a.createElement(r,{locale:F,last:!0,rootPrefixCls:M,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:fe,page:fe,active:!1,showTitle:B,itemRender:he}),Q=e.a.createElement(r,{locale:F,rootPrefixCls:M,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:B,itemRender:he});var Et=Math.max(1,se-Ee),Oe=Math.min(se+Ee,fe);se-1<=Ee&&(Oe=1+Ee*2),fe-se<=Ee&&(Et=fe-Ee*2);for(var Ve=Et;Ve<=Oe;Ve+=1){var Je=se===Ve;Fe.push(e.a.createElement(r,{locale:F,rootPrefixCls:M,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ve,page:Ve,active:Je,showTitle:B,itemRender:he}))}se-1>=Ee*2&&se!==1+2&&(Fe[0]=Object(p.cloneElement)(Fe[0],{className:"".concat(M,"-item-after-jump-prev")}),Fe.unshift(ie)),fe-se>=Ee*2&&se!==fe-2&&(Fe[Fe.length-1]=Object(p.cloneElement)(Fe[Fe.length-1],{className:"".concat(M,"-item-before-jump-next")}),Fe.push(q)),Et!==1&&Fe.unshift(Q),Oe!==fe&&Fe.push(Y)}var Ye=null;Z&&(Ye=e.a.createElement("li",{className:"".concat(M,"-total-text")},Z(k,[k===0?0:(se-1)*be+1,se*be>k?k:se*be])));var Pe=!this.hasPrev()||!fe,He=!this.hasNext()||!fe;return e.a.createElement("ul",Object(I.a)({className:n()(M,N,Object(v.a)({},"".concat(M,"-disabled"),z)),style:P,unselectable:"unselectable",ref:this.savePaginationNode},De),Ye,e.a.createElement("li",{title:B?F.prev_page:null,onClick:this.prev,tabIndex:Pe?null:0,onKeyPress:this.runIfEnterPrev,className:n()("".concat(M,"-prev"),Object(v.a)({},"".concat(M,"-disabled"),Pe)),"aria-disabled":Pe},this.renderPrev(Le)),Fe,e.a.createElement("li",{title:B?F.next_page:null,onClick:this.next,tabIndex:He?null:0,onKeyPress:this.runIfEnterNext,className:n()("".concat(M,"-next"),Object(v.a)({},"".concat(M,"-disabled"),He)),"aria-disabled":He},this.renderNext(ge)),e.a.createElement(a,{disabled:z,locale:F,rootPrefixCls:M,selectComponentClass:Re,selectPrefixCls:Te,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:se,pageSize:be,pageSizeOptions:pe,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:le}))}}],[{key:"getDerivedStateFromProps",value:function(A,D){var M={};if("current"in A&&(M.current=A.current,A.current!==D.current&&(M.currentInputValue=M.current)),"pageSize"in A&&A.pageSize!==D.pageSize){var N=D.current,P=u(A.pageSize,D,A);N=N>P?P:N,"current"in A||(M.current=N,M.currentInputValue=N),M.pageSize=A.pageSize}return M}}]),w}(e.a.Component);E.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:d,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:d,locale:c.a,style:{},itemRender:h,totalBoundaryShowSizeChanger:50};var x=E},"6/vW":function(j,H,b){"use strict";b.d(H,"b",function(){return _});var I=b("tJVT"),v=b("q1tI"),T=b.n(v),y=b("9VGf"),g=b("dhSg");function s(p){return p.toString().padStart(2,"0")}function _(p){var e=Math.floor(p/60),o=p%60,n=Math.floor(e/60);return"".concat(s(n),":").concat(s(e-n*60),":").concat(s(o))}H.a=function(p){var e=p.defaultTime,o=p.status,n=p.onUpdateCostTime,l=p.lastedGetTaskInfoTime,r=p.title,i=r===void 0?"":r,t=Object(v.useState)(e||0),a=Object(I.a)(t,2),c=a[0],d=a[1],f=Object(v.useRef)();return Object(v.useEffect)(function(){l&&(d(e),f.current=e)},[e,l]),Object(v.useEffect)(function(){if(l){var h=g.a.subscribe("update-cost-time",function(){o!==2&&n(f.current)});return h}},[l]),Object(y.a)(function(){d(c+1),f.current=f.current+1},o===2?null:1e3),T.a.createElement("span",null,i?"".concat(i,"\uFF1A"):null,_(c))}},"6BzB":function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.shrinkBuf=I,H.arraySet=v,H.flattenChunks=T,H.Buf32=H.Buf16=H.Buf8=void 0;function I(_,p){return _.length===p?_:_.subarray?_.subarray(0,p):(_.length=p,_)}function v(_,p,e,o,n){if(p.subarray&&_.subarray){_.set(p.subarray(e,e+o),n);return}for(var l=0;l<o;l++)_[n+l]=p[e+l]}function T(_){var p,e,o,n,l,r;for(o=0,p=0,e=_.length;p<e;p++)o+=_[p].length;for(r=new Uint8Array(o),n=0,p=0,e=_.length;p<e;p++)l=_[p],r.set(l,n),n+=l.length;return r}var y=Uint8Array;H.Buf8=y;var g=Uint16Array;H.Buf16=g;var s=Int32Array;H.Buf32=s},"6Qwc":function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.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"};H.default=I},"6RRn":function(j,H,b){"use strict";var I=b("wCXF"),v=b("n6Qo");b.d(H,"b",function(){return v.a});var T=b("IBYe"),y=b("6eGT"),g=b("hW8S");b.d(H,"a",function(){return g.a}),H.c=I.b},"6UM0":function(j,H,b){var I,v;(function(){var T;(function(){"use strict";var g=[function(e,o,n){var l=n(1).Beautifier,r=n(5).Options;function i(t,a){var c=new l(t,a);return c.beautify()}e.exports=i,e.exports.defaultOptions=function(){return new r}},function(e,o,n){var l=n(2).Output,r=n(3).Token,i=n(4),t=n(5).Options,a=n(7).Tokenizer,c=n(7).line_starters,d=n(7).positionable_operators,f=n(7).TOKEN;function h(L,B){return B.indexOf(L)!==-1}function u(L){return L.replace(/^\s+/g,"")}function E(L){for(var B={},Z=0;Z<L.length;Z++)B[L[Z].replace(/-/g,"_")]=L[Z];return B}function x(L,B){return L&&L.type===f.RESERVED&&L.text===B}function O(L,B){return L&&L.type===f.RESERVED&&h(L.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],D={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function M(L,B){if(B.multiline_frame||B.mode===D.ForInitializer||B.mode===D.Conditional)return;L.remove_indent(B.start_line_index)}function N(L){L=L.replace(i.allLineBreaks,`
|
|
|
`);for(var B=[],Z=L.indexOf(`
|
|
|
`);Z!==-1;)B.push(L.substring(0,Z)),L=L.substring(Z+1),Z=L.indexOf(`
|
|
|
`);return L.length&&B.push(L),B}function P(L){return L===D.ArrayLiteral}function z(L){return h(L,[D.Expression,D.ForInitializer,D.Conditional])}function X(L,B){for(var Z=0;Z<L.length;Z++){var re=L[Z].trim();if(re.charAt(0)!==B)return!1}return!0}function k(L,B){for(var Z=0,re=L.length,he;Z<re;Z++)if(he=L[Z],he&&he.indexOf(B)!==0)return!1;return!0}function F(L,B){B=B||{},this._source_text=L||"",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 t(B)}F.prototype.create_flags=function(L,B){var Z=0;L&&(Z=L.indentation_level,!this._output.just_added_newline()&&L.line_indent_level>Z&&(Z=L.line_indent_level));var re={mode:B,parent:L,last_token:L?L.last_token:new r(f.START_BLOCK,""),last_word:L?L.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:Z,alignment:0,line_indent_level:L?L.line_indent_level:Z,start_line_index:this._output.get_line_number(),ternary_depth:0};return re},F.prototype._reset=function(L){var B=L.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new l(this._options,B),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(D.BlockStatement);var Z=new a(L,this._options);return this._tokens=Z.tokenize(),L},F.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var L,B=this._reset(this._source_text),Z=this._options.eol;this._options.eol==="auto"&&(Z=`
|
|
|
`,B&&i.lineBreak.test(B||"")&&(Z=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 L=this._output.get_code(Z),L},F.prototype.handle_token=function(L,B){L.type===f.START_EXPR?this.handle_start_expr(L):L.type===f.END_EXPR?this.handle_end_expr(L):L.type===f.START_BLOCK?this.handle_start_block(L):L.type===f.END_BLOCK?this.handle_end_block(L):L.type===f.WORD?this.handle_word(L):L.type===f.RESERVED?this.handle_word(L):L.type===f.SEMICOLON?this.handle_semicolon(L):L.type===f.STRING?this.handle_string(L):L.type===f.EQUALS?this.handle_equals(L):L.type===f.OPERATOR?this.handle_operator(L):L.type===f.COMMA?this.handle_comma(L):L.type===f.BLOCK_COMMENT?this.handle_block_comment(L,B):L.type===f.COMMENT?this.handle_comment(L,B):L.type===f.DOT?this.handle_dot(L):L.type===f.EOF?this.handle_eof(L):L.type===f.UNKNOWN?this.handle_unknown(L,B):this.handle_unknown(L,B)},F.prototype.handle_whitespace_and_comments=function(L,B){var Z=L.newlines,re=this._options.keep_array_indentation&&P(this._flags.mode);if(L.comments_before)for(var he=L.comments_before.next();he;)this.handle_whitespace_and_comments(he,B),this.handle_token(he,B),he=L.comments_before.next();if(re)for(var Ce=0;Ce<Z;Ce+=1)this.print_newline(Ce>0,B);else if(this._options.max_preserve_newlines&&Z>this._options.max_preserve_newlines&&(Z=this._options.max_preserve_newlines),this._options.preserve_newlines&&Z>1){this.print_newline(!1,B);for(var ke=1;ke<Z;ke+=1)this.print_newline(!0,B)}};var U=["async","break","continue","return","throw","yield"];F.prototype.allow_wrap_or_preserved_newline=function(L,B){if(B=B===void 0?!1:B,this._output.just_added_newline())return;var Z=this._options.preserve_newlines&&L.newlines||B,re=h(this._flags.last_token.text,d)||h(L.text,d);if(re){var he=h(this._flags.last_token.text,d)&&h(this._options.operator_position,A)||h(L.text,d);Z=Z&&he}if(Z)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(O(this._flags.last_token,U))return;this._output.set_wrap_point()}},F.prototype.print_newline=function(L,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 Z=this._tokens.peek();this._flags.mode===D.Statement&&!(this._flags.if_block&&x(Z,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(L)&&(this._flags.multiline_frame=!0)},F.prototype.print_token_line_indentation=function(L){this._output.just_added_newline()&&(this._options.keep_array_indentation&&L.newlines&&(L.text==="["||P(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(L.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))},F.prototype.print_token=function(L){if(this._output.raw){this._output.add_raw_token(L);return}if(this._options.comma_first&&L.previous&&L.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(L),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(L),this._output.non_breaking_space=!0,this._output.add_token(L.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},F.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},F.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))},F.prototype.set_mode=function(L){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,L),this._flags=this.create_flags(this._previous_flags,L),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},F.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===D.Statement&&M(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},F.prototype.start_of_object_property=function(){return this._flags.parent.mode===D.ObjectLiteral&&this._flags.mode===D.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||O(this._flags.last_token,["get","set"]))},F.prototype.start_of_statement=function(L){var B=!1;return B=B||O(this._flags.last_token,["var","let","const"])&&L.type===f.WORD,B=B||x(this._flags.last_token,"do"),B=B||!(this._flags.parent.mode===D.ObjectLiteral&&this._flags.mode===D.Statement)&&O(this._flags.last_token,U)&&!L.newlines,B=B||x(this._flags.last_token,"else")&&!(x(L,"if")&&!L.comments_before),B=B||this._flags.last_token.type===f.END_EXPR&&(this._previous_flags.mode===D.ForInitializer||this._previous_flags.mode===D.Conditional),B=B||this._flags.last_token.type===f.WORD&&this._flags.mode===D.BlockStatement&&!this._flags.in_case&&!(L.text==="--"||L.text==="++")&&this._last_last_text!=="function"&&L.type!==f.WORD&&L.type!==f.RESERVED,B=B||this._flags.mode===D.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||O(this._flags.last_token,["get","set"])),B?(this.set_mode(D.Statement),this.indent(),this.handle_whitespace_and_comments(L,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(L,O(L,["do","for","if","while"])),!0):!1},F.prototype.handle_start_expr=function(L){this.start_of_statement(L)||this.handle_whitespace_and_comments(L);var B=D.Expression;if(L.text==="["){if(this._flags.last_token.type===f.WORD||this._flags.last_token.text===")"){O(this._flags.last_token,c)&&(this._output.space_before_token=!0),this.print_token(L),this.set_mode(B),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}B=D.ArrayLiteral,P(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())),h(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=D.ForInitializer):h(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,B=D.Conditional):h(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&L.whitespace_before===""?this._output.space_before_token=!1:(h(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(L);else if(this._flags.last_token.type===f.WORD){this._output.space_before_token=!1;var Z=this._tokens.peek(-3);if(this._options.space_after_named_function&&Z){var re=this._tokens.peek(-4);O(Z,["async","function"])||Z.text==="*"&&O(re,["async","function"])?this._output.space_before_token=!0:this._flags.mode===D.ObjectLiteral?(Z.text==="{"||Z.text===","||Z.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(L);(this._flags.last_token.type===f.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(h(this._last_last_text,["function","yield"])||this._flags.mode===D.ObjectLiteral&&h(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(L,L.newlines),this.print_token(L),this.set_mode(B),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},F.prototype.handle_end_expr=function(L){for(;this._flags.mode===D.Statement;)this.restore_mode();this.handle_whitespace_and_comments(L),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(L,L.text==="]"&&P(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(L),this.restore_mode(),M(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===D.Conditional&&(this._previous_flags.mode=D.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},F.prototype.handle_start_block=function(L){this.handle_whitespace_and_comments(L);var B=this._tokens.peek(),Z=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===f.END_EXPR?(this.set_mode(D.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(D.BlockStatement):Z&&(h(Z.text,[":",","])&&h(B.type,[f.STRING,f.WORD,f.RESERVED])||h(B.text,["get","set","..."])&&h(Z.type,[f.WORD,f.RESERVED]))?h(this._last_last_text,["class","interface"])&&!h(Z.text,[":",","])?this.set_mode(D.BlockStatement):this.set_mode(D.ObjectLiteral):this._flags.last_token.type===f.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(D.BlockStatement):h(this._flags.last_token.type,[f.EQUALS,f.START_EXPR,f.COMMA,f.OPERATOR])||O(this._flags.last_token,["return","throw","import","default"])?this.set_mode(D.ObjectLiteral):this.set_mode(D.BlockStatement),this._flags.last_token&&(O(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 Ce=0,ke=null;this._flags.inline_frame=!0;do if(Ce+=1,ke=this._tokens.peek(Ce-1),ke.newlines){this._flags.inline_frame=!1;break}while(ke.type!==f.EOF&&!(ke.type===f.END_BLOCK&&ke.opened===L))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&L.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==f.OPERATOR&&(he||this._flags.last_token.type===f.EQUALS||O(this._flags.last_token,C)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(P(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(L),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(L),this.indent(),!re&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},F.prototype.handle_end_block=function(L){for(this.handle_whitespace_and_comments(L);this._flags.mode===D.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||(P(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(L)},F.prototype.handle_word=function(L){if(L.type===f.RESERVED){if(h(L.text,["set","get"])&&this._flags.mode!==D.ObjectLiteral)L.type=f.WORD;else if(L.text==="import"&&h(this._tokens.peek().text,["(","."]))L.type=f.WORD;else if(h(L.text,["as","from"])&&!this._flags.import_block)L.type=f.WORD;else if(this._flags.mode===D.ObjectLiteral){var B=this._tokens.peek();B.text===":"&&(L.type=f.WORD)}}if(this.start_of_statement(L)?O(this._flags.last_token,["var","let","const"])&&L.type===f.WORD&&(this._flags.declaration_statement=!0):L.newlines&&!z(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||!O(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(L),this.print_newline()):this.handle_whitespace_and_comments(L),this._flags.do_block&&!this._flags.do_while)if(x(L,"while")){this._output.space_before_token=!0,this.print_token(L),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&&x(L,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===D.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&O(L,["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(L),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(L)),x(L,"function")){(h(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(h(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===f.OPERATOR))&&(!this._output.just_added_blankline()&&!L.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===f.RESERVED||this._flags.last_token.type===f.WORD?O(this._flags.last_token,["get","set","new","export"])||O(this._flags.last_token,U)?this._output.space_before_token=!0:x(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&&(z(this._flags.mode)||P(this._flags.mode))||this.print_newline(),this.print_token(L),this._flags.last_word=L.text;return}var Z="NONE";if(this._flags.last_token.type===f.END_BLOCK?this._previous_flags.inline_frame?Z="SPACE":O(L,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&L.newlines?Z="NEWLINE":(Z="SPACE",this._output.space_before_token=!0):Z="NEWLINE":this._flags.last_token.type===f.SEMICOLON&&this._flags.mode===D.BlockStatement?Z="NEWLINE":this._flags.last_token.type===f.SEMICOLON&&z(this._flags.mode)?Z="SPACE":this._flags.last_token.type===f.STRING?Z="NEWLINE":this._flags.last_token.type===f.RESERVED||this._flags.last_token.type===f.WORD||this._flags.last_token.text==="*"&&(h(this._last_last_text,["function","yield"])||this._flags.mode===D.ObjectLiteral&&h(this._last_last_text,["{",","]))?Z="SPACE":this._flags.last_token.type===f.START_BLOCK?this._flags.inline_frame?Z="SPACE":Z="NEWLINE":this._flags.last_token.type===f.END_EXPR&&(this._output.space_before_token=!0,Z="NEWLINE"),O(L,c)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?Z="SPACE":Z="NEWLINE"),O(L,["else","catch","finally"]))if((!(this._flags.last_token.type===f.END_BLOCK&&this._previous_flags.mode===D.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&L.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 Z==="NEWLINE"?O(this._flags.last_token,C)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&O(L,["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||!O(L,["var","let","const"]))&&this._flags.last_token.text!==":"&&(x(L,"if")&&x(L.previous,"else")?this._output.space_before_token=!0:this.print_newline()):O(L,c)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&P(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():Z==="SPACE"&&(this._output.space_before_token=!0);L.previous&&(L.previous.type===f.WORD||L.previous.type===f.RESERVED)&&(this._output.space_before_token=!0),this.print_token(L),this._flags.last_word=L.text,L.type===f.RESERVED&&(L.text==="do"?this._flags.do_block=!0:L.text==="if"?this._flags.if_block=!0:L.text==="import"?this._flags.import_block=!0:this._flags.import_block&&x(L,"from")&&(this._flags.import_block=!1))},F.prototype.handle_semicolon=function(L){this.start_of_statement(L)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(L);for(var B=this._tokens.peek();this._flags.mode===D.Statement&&!(this._flags.if_block&&x(B,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(L)},F.prototype.handle_string=function(L){L.text.startsWith("`")&&L.newlines===0&&L.whitespace_before===""&&(L.previous.text===")"||this._flags.last_token.type===f.WORD)||(this.start_of_statement(L)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(L),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(L):L.text.startsWith("`")&&this._flags.last_token.type===f.END_EXPR&&(L.previous.text==="]"||L.previous.text===")")&&L.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(L)},F.prototype.handle_equals=function(L){this.start_of_statement(L)||this.handle_whitespace_and_comments(L),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(L),this._output.space_before_token=!0},F.prototype.handle_comma=function(L){this.handle_whitespace_and_comments(L,!0),this.print_token(L),this._output.space_before_token=!0,this._flags.declaration_statement?(z(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(L)):this._flags.mode===D.ObjectLiteral||this._flags.mode===D.Statement&&this._flags.parent.mode===D.ObjectLiteral?(this._flags.mode===D.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(L)},F.prototype.handle_operator=function(L){var B=L.text==="*"&&(O(this._flags.last_token,["function","yield"])||h(this._flags.last_token.type,[f.START_BLOCK,f.COMMA,f.END_BLOCK,f.SEMICOLON])),Z=h(L.text,["-","+"])&&(h(this._flags.last_token.type,[f.START_BLOCK,f.START_EXPR,f.EQUALS,f.OPERATOR])||h(this._flags.last_token.text,c)||this._flags.last_token.text===",");if(!this.start_of_statement(L)){var re=!B;this.handle_whitespace_and_comments(L,re)}if(L.text==="*"&&this._flags.last_token.type===f.DOT){this.print_token(L);return}if(L.text==="::"){this.print_token(L);return}if(this._flags.last_token.type===f.OPERATOR&&h(this._options.operator_position,A)&&this.allow_wrap_or_preserved_newline(L),L.text===":"&&this._flags.in_case){this.print_token(L),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,Ce=!0,ke=!1;if(L.text===":"?this._flags.ternary_depth===0?he=!1:(this._flags.ternary_depth-=1,ke=!0):L.text==="?"&&(this._flags.ternary_depth+=1),!Z&&!B&&this._options.preserve_newlines&&h(L.text,d)){var te=L.text===":",Re=te&&ke,Te=te&&!ke;switch(this._options.operator_position){case S.before_newline:this._output.space_before_token=!Te,this.print_token(L),(!te||Re)&&this.allow_wrap_or_preserved_newline(L),this._output.space_before_token=!0;return;case S.after_newline:this._output.space_before_token=!0,!te||Re?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(L):this._output.space_before_token=!1,this.print_token(L),this._output.space_before_token=!0;return;case S.preserve_newline:Te||this.allow_wrap_or_preserved_newline(L),he=!(this._output.just_added_newline()||Te),this._output.space_before_token=he,this.print_token(L),this._output.space_before_token=!0;return}}if(B){this.allow_wrap_or_preserved_newline(L),he=!1;var pe=this._tokens.peek();Ce=pe&&h(pe.type,[f.WORD,f.RESERVED])}else if(L.text==="...")this.allow_wrap_or_preserved_newline(L),he=this._flags.last_token.type===f.START_BLOCK,Ce=!1;else if(h(L.text,["--","++","!","~"])||Z){if((this._flags.last_token.type===f.COMMA||this._flags.last_token.type===f.START_EXPR)&&this.allow_wrap_or_preserved_newline(L),he=!1,Ce=!1,L.newlines&&(L.text==="--"||L.text==="++"||L.text==="~")){var me=O(this._flags.last_token,C)&&L.newlines;me&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(me,!0)}this._flags.last_token.text===";"&&z(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==="]"&&(L.text==="--"||L.text==="++")):this._flags.last_token.type===f.OPERATOR&&(he=h(L.text,["--","-","++","+"])&&h(this._flags.last_token.text,["--","-","++","+"]),h(L.text,["+","-"])&&h(this._flags.last_token.text,["--","++"])&&(Ce=!0)),(this._flags.mode===D.BlockStatement&&!this._flags.inline_frame||this._flags.mode===D.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(L),this._output.space_before_token=Ce},F.prototype.handle_block_comment=function(L,B){if(this._output.raw){this._output.add_raw_token(L),L.directives&&L.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(L.directives){this.print_newline(!1,B),this.print_token(L),L.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!i.newline.test(L.text)&&!L.newlines){this._output.space_before_token=!0,this.print_token(L),this._output.space_before_token=!0;return}else this.print_block_commment(L,B)},F.prototype.print_block_commment=function(L,B){var Z=N(L.text),re,he=!1,Ce=!1,ke=L.whitespace_before,te=ke.length;if(this.print_newline(!1,B),this.print_token_line_indentation(L),this._output.add_token(Z[0]),this.print_newline(!1,B),Z.length>1){for(Z=Z.slice(1),he=X(Z,"*"),Ce=k(Z,ke),he&&(this._flags.alignment=1),re=0;re<Z.length;re++)he?(this.print_token_line_indentation(L),this._output.add_token(u(Z[re]))):Ce&&Z[re]?(this.print_token_line_indentation(L),this._output.add_token(Z[re].substring(te))):(this._output.current_line.set_indent(-1),this._output.add_token(Z[re])),this.print_newline(!1,B);this._flags.alignment=0}},F.prototype.handle_comment=function(L,B){L.newlines?this.print_newline(!1,B):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(L),this.print_newline(!1,B)},F.prototype.handle_dot=function(L){this.start_of_statement(L)||this.handle_whitespace_and_comments(L,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),O(this._flags.last_token,C)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(L,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(L)},F.prototype.handle_unknown=function(L,B){this.print_token(L),L.text[L.text.length-1]===`
|
|
|
`&&this.print_newline(!1,B)},F.prototype.handle_eof=function(L){for(;this._flags.mode===D.Statement;)this.restore_mode();this.handle_whitespace_and_comments(L)},e.exports.Beautifier=F},function(e){function o(r){this.__parent=r,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=[]}o.prototype.clone_empty=function(){var r=new o(this.__parent);return r.set_indent(this.__indent_count,this.__alignment_count),r},o.prototype.item=function(r){return r<0?this.__items[this.__items.length+r]:this.__items[r]},o.prototype.has_match=function(r){for(var i=this.__items.length-1;i>=0;i--)if(this.__items[i].match(r))return!0;return!1},o.prototype.set_indent=function(r,i){this.is_empty()&&(this.__indent_count=r||0,this.__alignment_count=i||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},o.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)},o.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},o.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var r=this.__parent.current_line;return r.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),r.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),r.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,r.__items[0]===" "&&(r.__items.splice(0,1),r.__character_count-=1),!0}return!1},o.prototype.is_empty=function(){return this.__items.length===0},o.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},o.prototype.push=function(r){this.__items.push(r);var i=r.lastIndexOf(`
|
|
|
`);i!==-1?this.__character_count=r.length-i:this.__character_count+=r.length},o.prototype.pop=function(){var r=null;return this.is_empty()||(r=this.__items.pop(),this.__character_count-=r.length),r},o.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},o.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},o.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},o.prototype.toString=function(){var r="";return this.is_empty()?this.__parent.indent_empty_lines&&(r=this.__parent.get_indent_string(this.__indent_count)):(r=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),r+=this.__items.join("")),r};function n(r,i){this.__cache=[""],this.__indent_size=r.indent_size,this.__indent_string=r.indent_char,r.indent_with_tabs||(this.__indent_string=new Array(r.indent_size+1).join(r.indent_char)),i=i||"",r.indent_level>0&&(i=new Array(r.indent_level+1).join(this.__indent_string)),this.__base_string=i,this.__base_string_length=i.length}n.prototype.get_indent_size=function(r,i){var t=this.__base_string_length;return i=i||0,r<0&&(t=0),t+=r*this.__indent_size,t+=i,t},n.prototype.get_indent_string=function(r,i){var t=this.__base_string;return i=i||0,r<0&&(r=0,t=""),i+=r*this.__indent_size,this.__ensure_cache(i),t+=this.__cache[i],t},n.prototype.__ensure_cache=function(r){for(;r>=this.__cache.length;)this.__add_column()},n.prototype.__add_column=function(){var r=this.__cache.length,i=0,t="";this.__indent_size&&r>=this.__indent_size&&(i=Math.floor(r/this.__indent_size),r-=i*this.__indent_size,t=new Array(i+1).join(this.__indent_string)),r&&(t+=new Array(r+1).join(" ")),this.__cache.push(t)};function l(r,i){this.__indent_cache=new n(r,i),this.raw=!1,this._end_with_newline=r.end_with_newline,this.indent_size=r.indent_size,this.wrap_line_length=r.wrap_line_length,this.indent_empty_lines=r.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new o(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}l.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},l.prototype.get_line_number=function(){return this.__lines.length},l.prototype.get_indent_string=function(r,i){return this.__indent_cache.get_indent_string(r,i)},l.prototype.get_indent_size=function(r,i){return this.__indent_cache.get_indent_size(r,i)},l.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},l.prototype.add_new_line=function(r){return this.is_empty()||!r&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},l.prototype.get_code=function(r){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 t=this.__lines.join(`
|
|
|
`);return r!==`
|
|
|
`&&(t=t.replace(/[\n]/g,r)),t},l.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},l.prototype.set_indent=function(r,i){return r=r||0,i=i||0,this.next_line.set_indent(r,i),this.__lines.length>1?(this.current_line.set_indent(r,i),!0):(this.current_line.set_indent(),!1)},l.prototype.add_raw_token=function(r){for(var i=0;i<r.newlines;i++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(r.whitespace_before),this.current_line.push(r.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},l.prototype.add_token=function(r){this.__add_space_before_token(),this.current_line.push(r),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},l.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(" "))},l.prototype.remove_indent=function(r){for(var i=this.__lines.length;r<i;)this.__lines[r]._remove_indent(),r++;this.current_line._remove_wrap_indent()},l.prototype.trim=function(r){for(r=r===void 0?!1:r,this.current_line.trim();r&&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},l.prototype.just_added_newline=function(){return this.current_line.is_empty()},l.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},l.prototype.ensure_empty_line_above=function(r,i){for(var t=this.__lines.length-2;t>=0;){var a=this.__lines[t];if(a.is_empty())break;if(a.item(0).indexOf(r)!==0&&a.item(-1)!==i){this.__lines.splice(t+1,0,new o(this)),this.previous_line=this.__lines[this.__lines.length-2];break}t--}},e.exports.Output=l},function(e){function o(n,l,r,i){this.type=n,this.text=l,this.comments_before=null,this.newlines=r||0,this.whitespace_before=i||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}e.exports.Token=o},function(e,o){var n="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",l="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",r="\\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",t="(?:\\\\u[0-9a-fA-F]{4}|["+n+r+"])",a="(?:\\\\u[0-9a-fA-F]{4}|["+l+r+i+"])*";o.identifier=new RegExp(t+a,"g"),o.identifierStart=new RegExp(t),o.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+l+r+i+"])+");var c=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;o.newline=/[\n\r\u2028\u2029]/,o.lineBreak=new RegExp(`\r
|
|
|
|`+o.newline.source),o.allLineBreaks=new RegExp(o.lineBreak.source,"g")},function(e,o,n){var l=n(6).Options,r=["before-newline","after-newline","preserve-newline"];function i(t){l.call(this,t,"js");var a=this.raw_options.brace_style||null;a==="expand-strict"?this.raw_options.brace_style="expand":a==="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 d=0;d<c.length;d++)c[d]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=c[d];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",r),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}i.prototype=new l,e.exports.Options=i},function(e){function o(r,i){this.raw_options=n(r,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"])}o.prototype._get_array=function(r,i){var t=this.raw_options[r],a=i||[];return typeof t=="object"?t!==null&&typeof t.concat=="function"&&(a=t.concat()):typeof t=="string"&&(a=t.split(/[^a-zA-Z0-9_\/\-]+/)),a},o.prototype._get_boolean=function(r,i){var t=this.raw_options[r],a=t===void 0?!!i:!!t;return a},o.prototype._get_characters=function(r,i){var t=this.raw_options[r],a=i||"";return typeof t=="string"&&(a=t.replace(/\\r/,"\r").replace(/\\n/,`
|
|
|
`).replace(/\\t/," ")),a},o.prototype._get_number=function(r,i){var t=this.raw_options[r];i=parseInt(i,10),isNaN(i)&&(i=0);var a=parseInt(t,10);return isNaN(a)&&(a=i),a},o.prototype._get_selection=function(r,i,t){var a=this._get_selection_list(r,i,t);if(a.length!==1)throw new Error("Invalid Option Value: The option '"+r+`' can only be one of the following values:
|
|
|
`+i+`
|
|
|
You passed in: '`+this.raw_options[r]+"'");return a[0]},o.prototype._get_selection_list=function(r,i,t){if(!i||i.length===0)throw new Error("Selection list cannot be empty.");if(t=t||[i[0]],!this._is_valid_selection(t,i))throw new Error("Invalid Default Value!");var a=this._get_array(r,t);if(!this._is_valid_selection(a,i))throw new Error("Invalid Option Value: The option '"+r+`' can contain only the following values:
|
|
|
`+i+`
|
|
|
You passed in: '`+this.raw_options[r]+"'");return a},o.prototype._is_valid_selection=function(r,i){return r.length&&i.length&&!r.some(function(t){return i.indexOf(t)===-1})};function n(r,i){var t={};r=l(r);var a;for(a in r)a!==i&&(t[a]=r[a]);if(i&&r[i])for(a in r[i])t[a]=r[i][a];return t}function l(r){var i={},t;for(t in r){var a=t.replace(/-/g,"_");i[a]=r[t]}return i}e.exports.Options=o,e.exports.normalizeOpts=l,e.exports.mergeOpts=n},function(e,o,n){var l=n(8).InputScanner,r=n(9).Tokenizer,i=n(9).TOKEN,t=n(13).Directives,a=n(4),c=n(12).Pattern,d=n(14).TemplatablePattern;function f(X,k){return k.indexOf(X)!==-1}var h={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},u=new t(/\/\*/,/\*\//),E=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,x=/[0-9]/,O=/[^\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(","),D=A.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),M=new RegExp("^(?:"+D.join("|")+")$"),N,P=function(X,k){r.call(this,X,k),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var F=new c(this._input),U=new d(this._input).read_options(this._options);this.__patterns={template:U,identifier:U.starting_with(a.identifier).matching(a.identifierMatch),number:F.matching(E),punct:F.matching(S),comment:F.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:F.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:F.matching(/<!--/),html_comment_end:F.matching(/-->/),include:F.starting_with(/#include/).until_after(a.lineBreak),shebang:F.starting_with(/#!/).until_after(a.lineBreak),xml:F.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:U.until(/['\\\n\r\u2028\u2029]/),double_quote:U.until(/["\\\n\r\u2028\u2029]/),template_text:U.until(/[`\\$]/),template_expression:U.until(/[`}\\]/)}};P.prototype=new r,P.prototype._is_comment=function(X){return X.type===h.COMMENT||X.type===h.BLOCK_COMMENT||X.type===h.UNKNOWN},P.prototype._is_opening=function(X){return X.type===h.START_BLOCK||X.type===h.START_EXPR},P.prototype._is_closing=function(X,k){return(X.type===h.END_BLOCK||X.type===h.END_EXPR)&&k&&(X.text==="]"&&k.text==="["||X.text===")"&&k.text==="("||X.text==="}"&&k.text==="{")},P.prototype._reset=function(){N=!1},P.prototype._get_next_token=function(X,k){var F=null;this._readWhitespace();var U=this._input.peek();return U===null?this._create_token(h.EOF,""):(F=F||this._read_non_javascript(U),F=F||this._read_string(U),F=F||this._read_word(X),F=F||this._read_singles(U),F=F||this._read_comment(U),F=F||this._read_regexp(U,X),F=F||this._read_xml(U,X),F=F||this._read_punctuation(),F=F||this._create_token(h.UNKNOWN,this._input.next()),F)},P.prototype._read_word=function(X){var k;if(k=this.__patterns.identifier.read(),k!=="")return k=k.replace(a.allLineBreaks,`
|
|
|
`),!(X.type===h.DOT||X.type===h.RESERVED&&(X.text==="set"||X.text==="get"))&&M.test(k)?(k==="in"||k==="of")&&(X.type===h.WORD||X.type===h.STRING)?this._create_token(h.OPERATOR,k):this._create_token(h.RESERVED,k):this._create_token(h.WORD,k);if(k=this.__patterns.number.read(),k!=="")return this._create_token(h.WORD,k)},P.prototype._read_singles=function(X){var k=null;return X==="("||X==="["?k=this._create_token(h.START_EXPR,X):X===")"||X==="]"?k=this._create_token(h.END_EXPR,X):X==="{"?k=this._create_token(h.START_BLOCK,X):X==="}"?k=this._create_token(h.END_BLOCK,X):X===";"?k=this._create_token(h.SEMICOLON,X):X==="."&&O.test(this._input.peek(1))?k=this._create_token(h.DOT,X):X===","&&(k=this._create_token(h.COMMA,X)),k&&this._input.next(),k},P.prototype._read_punctuation=function(){var X=this.__patterns.punct.read();if(X!=="")return X==="="?this._create_token(h.EQUALS,X):X==="?."?this._create_token(h.DOT,X):this._create_token(h.OPERATOR,X)},P.prototype._read_non_javascript=function(X){var k="";if(X==="#"){if(this._is_first_token()&&(k=this.__patterns.shebang.read(),k))return this._create_token(h.UNKNOWN,k.trim()+`
|
|
|
`);if(k=this.__patterns.include.read(),k)return this._create_token(h.UNKNOWN,k.trim()+`
|
|
|
`);X=this._input.next();var F="#";if(this._input.hasNext()&&this._input.testChar(x)){do X=this._input.next(),F+=X;while(this._input.hasNext()&&X!=="#"&&X!=="=");return X==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(F+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(F+="{}",this._input.next(),this._input.next())),this._create_token(h.WORD,F)}this._input.back()}else if(X==="<"&&this._is_first_token()){if(k=this.__patterns.html_comment_start.read(),k){for(;this._input.hasNext()&&!this._input.testChar(a.newline);)k+=this._input.next();return N=!0,this._create_token(h.COMMENT,k)}}else if(N&&X==="-"&&(k=this.__patterns.html_comment_end.read(),k))return N=!1,this._create_token(h.COMMENT,k);return null},P.prototype._read_comment=function(X){var k=null;if(X==="/"){var F="";if(this._input.peek(1)==="*"){F=this.__patterns.block_comment.read();var U=u.get_directives(F);U&&U.ignore==="start"&&(F+=u.readIgnored(this._input)),F=F.replace(a.allLineBreaks,`
|
|
|
`),k=this._create_token(h.BLOCK_COMMENT,F),k.directives=U}else this._input.peek(1)==="/"&&(F=this.__patterns.comment.read(),k=this._create_token(h.COMMENT,F))}return k},P.prototype._read_string=function(X){if(X==="`"||X==="'"||X==='"'){var k=this._input.next();return this.has_char_escapes=!1,X==="`"?k+=this._read_string_recursive("`",!0,"${"):k+=this._read_string_recursive(X),this.has_char_escapes&&this._options.unescape_strings&&(k=z(k)),this._input.peek()===X&&(k+=this._input.next()),k=k.replace(a.allLineBreaks,`
|
|
|
`),this._create_token(h.STRING,k)}return null},P.prototype._allow_regexp_or_xml=function(X){return X.type===h.RESERVED&&f(X.text,["return","case","throw","else","do","typeof","yield"])||X.type===h.END_EXPR&&X.text===")"&&X.opened.previous.type===h.RESERVED&&f(X.opened.previous.text,["if","while","for"])||f(X.type,[h.COMMENT,h.START_EXPR,h.START_BLOCK,h.START,h.END_BLOCK,h.OPERATOR,h.EQUALS,h.EOF,h.SEMICOLON,h.COMMA])},P.prototype._read_regexp=function(X,k){if(X==="/"&&this._allow_regexp_or_xml(k)){for(var F=this._input.next(),U=!1,L=!1;this._input.hasNext()&&(U||L||this._input.peek()!==X)&&!this._input.testChar(a.newline);)F+=this._input.peek(),U?U=!1:(U=this._input.peek()==="\\",this._input.peek()==="["?L=!0:this._input.peek()==="]"&&(L=!1)),this._input.next();return this._input.peek()===X&&(F+=this._input.next(),F+=this._input.read(a.identifier)),this._create_token(h.STRING,F)}return null},P.prototype._read_xml=function(X,k){if(this._options.e4x&&X==="<"&&this._allow_regexp_or_xml(k)){var F="",U=this.__patterns.xml.read_match();if(U){for(var L=U[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),B=L.indexOf("{")===0,Z=0;U;){var re=!!U[1],he=U[2],Ce=!!U[U.length-1]||he.slice(0,8)==="![CDATA[";if(!Ce&&(he===L||B&&he.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(re?--Z:++Z),F+=U[0],Z<=0)break;U=this.__patterns.xml.read_match()}return U||(F+=this._input.match(/[\s\S]*/g)[0]),F=F.replace(a.allLineBreaks,`
|
|
|
`),this._create_token(h.STRING,F)}}return null};function z(X){for(var k="",F=0,U=new l(X),L=null;U.hasNext();)if(L=U.match(/([\s]|[^\\]|\\\\)+/g),L&&(k+=L[0]),U.peek()==="\\"){if(U.next(),U.peek()==="x")L=U.match(/x([0-9A-Fa-f]{2})/g);else if(U.peek()==="u")L=U.match(/u([0-9A-Fa-f]{4})/g);else{k+="\\",U.hasNext()&&(k+=U.next());continue}if(!L)return X;if(F=parseInt(L[1],16),F>126&&F<=255&&L[0].indexOf("x")===0)return X;if(F>=0&&F<32){k+="\\"+L[0];continue}else F===34||F===39||F===92?k+="\\"+String.fromCharCode(F):k+=String.fromCharCode(F)}return k}P.prototype._read_string_recursive=function(X,k,F){var U,L;X==="'"?L=this.__patterns.single_quote:X==='"'?L=this.__patterns.double_quote:X==="`"?L=this.__patterns.template_text:X==="}"&&(L=this.__patterns.template_expression);for(var B=L.read(),Z="";this._input.hasNext();){if(Z=this._input.next(),Z===X||!k&&a.newline.test(Z)){this._input.back();break}else Z==="\\"&&this._input.hasNext()?(U=this._input.peek(),U==="x"||U==="u"?this.has_char_escapes=!0:U==="\r"&&this._input.peek(1)===`
|
|
|
`&&this._input.next(),Z+=this._input.next()):F&&(F==="${"&&Z==="$"&&this._input.peek()==="{"&&(Z+=this._input.next()),F===Z&&(X==="`"?Z+=this._read_string_recursive("}",k,"`"):Z+=this._read_string_recursive("`",k,"${"),this._input.hasNext()&&(Z+=this._input.next())));Z+=L.read(),B+=Z}return B},e.exports.Tokenizer=P,e.exports.TOKEN=h,e.exports.positionable_operators=C.slice(),e.exports.line_starters=A.slice()},function(e){var o=RegExp.prototype.hasOwnProperty("sticky");function n(l){this.__input=l||"",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 l=null;return this.hasNext()&&(l=this.__input.charAt(this.__position),this.__position+=1),l},n.prototype.peek=function(l){var r=null;return l=l||0,l+=this.__position,l>=0&&l<this.__input_length&&(r=this.__input.charAt(l)),r},n.prototype.__match=function(l,r){l.lastIndex=r;var i=l.exec(this.__input);return i&&!(o&&l.sticky)&&(i.index!==r&&(i=null)),i},n.prototype.test=function(l,r){return r=r||0,r+=this.__position,r>=0&&r<this.__input_length?!!this.__match(l,r):!1},n.prototype.testChar=function(l,r){var i=this.peek(r);return l.lastIndex=0,i!==null&&l.test(i)},n.prototype.match=function(l){var r=this.__match(l,this.__position);return r?this.__position+=r[0].length:r=null,r},n.prototype.read=function(l,r,i){var t="",a;return l&&(a=this.match(l),a&&(t+=a[0])),r&&(a||!l)&&(t+=this.readUntil(r,i)),t},n.prototype.readUntil=function(l,r){var i="",t=this.__position;l.lastIndex=this.__position;var a=l.exec(this.__input);return a?(t=a.index,r&&(t+=a[0].length)):t=this.__input_length,i=this.__input.substring(this.__position,t),this.__position=t,i},n.prototype.readUntilAfter=function(l){return this.readUntil(l,!0)},n.prototype.get_regexp=function(l,r){var i=null,t="g";return r&&o&&(t="y"),typeof l=="string"&&l!==""?i=new RegExp(l,t):l&&(i=new RegExp(l.source,t)),i},n.prototype.get_literal_regexp=function(l){return RegExp(l.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},n.prototype.peekUntilAfter=function(l){var r=this.__position,i=this.readUntilAfter(l);return this.__position=r,i},n.prototype.lookBack=function(l){var r=this.__position-1;return r>=l.length&&this.__input.substring(r-l.length,r).toLowerCase()===l},e.exports.InputScanner=n},function(e,o,n){var l=n(8).InputScanner,r=n(3).Token,i=n(10).TokenStream,t=n(11).WhitespacePattern,a={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},c=function(d,f){this._input=new l(d),this._options=f||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new t(this._input)};c.prototype.tokenize=function(){this._input.restart(),this.__tokens=new i,this._reset();for(var d,f=new r(a.START,""),h=null,u=[],E=new i;f.type!==a.EOF;){for(d=this._get_next_token(f,h);this._is_comment(d);)E.add(d),d=this._get_next_token(f,h);E.isEmpty()||(d.comments_before=E,E=new i),d.parent=h,this._is_opening(d)?(u.push(h),h=d):h&&this._is_closing(d,h)&&(d.opened=h,h.closed=d,h=u.pop(),d.parent=h),d.previous=f,f.next=d,this.__tokens.add(d),f=d}return this.__tokens},c.prototype._is_first_token=function(){return this.__tokens.isEmpty()},c.prototype._reset=function(){},c.prototype._get_next_token=function(d,f){this._readWhitespace();var h=this._input.read(/.+/g);return h?this._create_token(a.RAW,h):this._create_token(a.EOF,"")},c.prototype._is_comment=function(d){return!1},c.prototype._is_opening=function(d){return!1},c.prototype._is_closing=function(d,f){return!1},c.prototype._create_token=function(d,f){var h=new r(d,f,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return h},c.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},e.exports.Tokenizer=c,e.exports.TOKEN=a},function(e){function o(n){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=n}o.prototype.restart=function(){this.__position=0},o.prototype.isEmpty=function(){return this.__tokens_length===0},o.prototype.hasNext=function(){return this.__position<this.__tokens_length},o.prototype.next=function(){var n=null;return this.hasNext()&&(n=this.__tokens[this.__position],this.__position+=1),n},o.prototype.peek=function(n){var l=null;return n=n||0,n+=this.__position,n>=0&&n<this.__tokens_length&&(l=this.__tokens[n]),l},o.prototype.add=function(n){this.__parent_token&&(n.parent=this.__parent_token),this.__tokens.push(n),this.__tokens_length+=1},e.exports.TokenStream=o},function(e,o,n){var l=n(12).Pattern;function r(i,t){l.call(this,i,t),t?this._line_regexp=this._input.get_regexp(t._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}r.prototype=new l,r.prototype.__set_whitespace_patterns=function(i,t){i+="\\t ",t+="\\n\\r",this._match_pattern=this._input.get_regexp("["+i+t+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+t+"]")},r.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 t=this.__split(this._newline_regexp,i);this.newline_count=t.length-1,this.whitespace_before_token=t[this.newline_count]}return i},r.prototype.matching=function(i,t){var a=this._create();return a.__set_whitespace_patterns(i,t),a._update(),a},r.prototype._create=function(){return new r(this._input,this)},r.prototype.__split=function(i,t){i.lastIndex=0;for(var a=0,c=[],d=i.exec(t);d;)c.push(t.substring(a,d.index)),a=d.index+d[0].length,d=i.exec(t);return a<t.length?c.push(t.substring(a,t.length)):c.push(""),c},e.exports.WhitespacePattern=r},function(e){function o(n,l){this._input=n,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,l&&(this._starting_pattern=this._input.get_regexp(l._starting_pattern,!0),this._match_pattern=this._input.get_regexp(l._match_pattern,!0),this._until_pattern=this._input.get_regexp(l._until_pattern),this._until_after=l._until_after)}o.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},o.prototype.read_match=function(){return this._input.match(this._match_pattern)},o.prototype.until_after=function(n){var l=this._create();return l._until_after=!0,l._until_pattern=this._input.get_regexp(n),l._update(),l},o.prototype.until=function(n){var l=this._create();return l._until_after=!1,l._until_pattern=this._input.get_regexp(n),l._update(),l},o.prototype.starting_with=function(n){var l=this._create();return l._starting_pattern=this._input.get_regexp(n,!0),l._update(),l},o.prototype.matching=function(n){var l=this._create();return l._match_pattern=this._input.get_regexp(n,!0),l._update(),l},o.prototype._create=function(){return new o(this._input,this)},o.prototype._update=function(){},e.exports.Pattern=o},function(e){function o(n,l){n=typeof n=="string"?n:n.source,l=typeof l=="string"?l:l.source,this.__directives_block_pattern=new RegExp(n+/ beautify( \w+[:]\w+)+ /.source+l,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(n+/\sbeautify\signore:end\s/.source+l,"g")}o.prototype.get_directives=function(n){if(!n.match(this.__directives_block_pattern))return null;var l={};this.__directive_pattern.lastIndex=0;for(var r=this.__directive_pattern.exec(n);r;)l[r[1]]=r[2],r=this.__directive_pattern.exec(n);return l},o.prototype.readIgnored=function(n){return n.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=o},function(e,o,n){var l=n(12).Pattern,r={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function i(t,a){l.call(this,t,a),this.__template_pattern=null,this._disabled=Object.assign({},r),this._excluded=Object.assign({},r),a&&(this.__template_pattern=this._input.get_regexp(a.__template_pattern),this._excluded=Object.assign(this._excluded,a._excluded),this._disabled=Object.assign(this._disabled,a._disabled));var c=new l(t);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 l,i.prototype._create=function(){return new i(this._input,this)},i.prototype._update=function(){this.__set_templated_pattern()},i.prototype.disable=function(t){var a=this._create();return a._disabled[t]=!0,a._update(),a},i.prototype.read_options=function(t){var a=this._create();for(var c in r)a._disabled[c]=t.templating.indexOf(c)===-1;return a._update(),a},i.prototype.exclude=function(t){var a=this._create();return a._excluded[t]=!0,a._update(),a},i.prototype.read=function(){var t="";this._match_pattern?t=this._input.read(this._starting_pattern):t=this._input.read(this._starting_pattern,this.__template_pattern);for(var a=this._read_template();a;)this._match_pattern?a+=this._input.read(this._match_pattern):a+=this._input.readUntil(this.__template_pattern),t+=a,a=this._read_template();return this._until_after&&(t+=this._input.readUntilAfter(this._until_pattern)),t},i.prototype.__set_templated_pattern=function(){var t=[];this._disabled.php||t.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||t.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||t.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(t.push(this.__patterns.django._starting_pattern.source),t.push(this.__patterns.django_value._starting_pattern.source),t.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||t.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&t.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+t.join("|")+")")},i.prototype._read_template=function(){var t="",a=this._input.peek();if(a==="<"){var c=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&c==="?"&&(t=t||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&c==="%"&&(t=t||this.__patterns.erb.read())}else a==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(t=t||this.__patterns.handlebars_comment.read(),t=t||this.__patterns.handlebars_unescaped.read(),t=t||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(t=t||this.__patterns.django_value.read()),this._excluded.django||(t=t||this.__patterns.django_comment.read(),t=t||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(t=t||this.__patterns.smarty_comment.read(),t=t||this.__patterns.smarty_literal.read(),t=t||this.__patterns.smarty.read()));return t},e.exports.TemplatablePattern=i}],s={};function _(e){var o=s[e];if(o!==void 0)return o.exports;var n=s[e]={exports:{}};return g[e](n,n.exports,_),n.exports}var p=_(0);T=p})();var y=T;!(I=[],v=function(){return{js_beautify:y}}.apply(H,I),v!==void 0&&(j.exports=v))})()},"6eGT":function(j,H,b){"use strict";function I(v){return null}H.a=I},"6lC8":function(j,H,b){},"746U":function(j,H,b){"use strict";b.d(H,"f",function(){return I}),b.d(H,"l",function(){return v}),b.d(H,"k",function(){return T}),b.d(H,"j",function(){return y}),b.d(H,"g",function(){return g}),b.d(H,"m",function(){return s}),b.d(H,"h",function(){return _}),b.d(H,"n",function(){return p}),b.d(H,"c",function(){return e}),b.d(H,"a",function(){return o}),b.d(H,"i",function(){return n}),b.d(H,"o",function(){return l}),b.d(H,"e",function(){return t}),b.d(H,"d",function(){return a}),b.d(H,"p",function(){return c}),b.d(H,"b",function(){return d});function I(f){return Array.isArray(f)}function v(f){return typeof f=="string"}function T(f){return typeof f=="object"&&f!==null&&!Array.isArray(f)&&!(f instanceof RegExp)&&!(f instanceof Date)}function y(f){return typeof f=="number"&&!isNaN(f)}function g(f){return f===!0||f===!1}function s(f){return typeof f=="undefined"}function _(f){return!p(f)}function p(f){return s(f)||f===null}function e(f,h){if(!f)throw new Error(h?`Unexpected type, expected '${h}'`:"Unexpected type")}function o(f){if(p(f))throw new Error("Assertion Failed: argument is undefined or null");return f}function n(f){return typeof f=="function"}function l(f,h){const u=Math.min(f.length,h.length);for(let E=0;E<u;E++)r(f[E],h[E])}function r(f,h){if(v(h)){if(typeof f!==h)throw new Error(`argument does not match constraint: typeof ${h}`)}else if(n(h)){try{if(f instanceof h)return}catch(u){}if(!p(f)&&f.constructor===h)return;if(h.length===1&&h.call(void 0,f)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function i(f){let h=[],u=Object.getPrototypeOf(f);for(;Object.prototype!==u;)h=h.concat(Object.getOwnPropertyNames(u)),u=Object.getPrototypeOf(u);return h}function t(f){const h=[];for(const u of i(f))typeof f[u]=="function"&&h.push(u);return h}function a(f,h){const u=x=>function(){const O=Array.prototype.slice.call(arguments,0);return h(x,O)};let E={};for(const x of f)E[x]=u(x);return E}function c(f){return f===null?void 0:f}function d(f,h="Unreachable"){throw new Error(h)}},"7Cbv":function(j,H,b){"use strict";var I=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),v=new Uint8Array(16);function T(){if(!I)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return I(v)}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 g(r){return typeof r=="string"&&y.test(r)}for(var s=g,_=[],p=0;p<256;++p)_.push((p+256).toString(16).substr(1));function e(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=(_[r[i+0]]+_[r[i+1]]+_[r[i+2]]+_[r[i+3]]+"-"+_[r[i+4]]+_[r[i+5]]+"-"+_[r[i+6]]+_[r[i+7]]+"-"+_[r[i+8]]+_[r[i+9]]+"-"+_[r[i+10]]+_[r[i+11]]+_[r[i+12]]+_[r[i+13]]+_[r[i+14]]+_[r[i+15]]).toLowerCase();if(!s(t))throw TypeError("Stringified UUID is invalid");return t}var o=e;function n(r,i,t){r=r||{};var a=r.random||(r.rng||T)();if(a[6]=a[6]&15|64,a[8]=a[8]&63|128,i){t=t||0;for(var c=0;c<16;++c)i[t+c]=a[c];return i}return o(a)}var l=H.a=n},"7ZXX":function(j,H,b){j.exports=b.p+"static/err.6e7c5817.png"},"7ahc":function(j,H,b){"use strict";b.d(H,"a",function(){return u});var I=b("k1fw"),v=b("0Owb"),T=b("+L6B"),y=b("2/Rp"),g=b("y8nQ"),s=b("Vl3Y"),_=b("tJVT"),p=b("OaEy"),e=b("2fM7"),o=b("q1tI"),n=b.n(o),l=b("VrN/"),r=b.n(l),i=b("p77/"),t=b.n(i),a=b("c5Ni"),c=b.n(a),d=e.a.Option,f={labelCol:{span:4},wrapperCol:{span:20}},h={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"]};H.b=function(E){var x=E.callback,O=E.onCancel,C=Object(o.useState)("python"),w=Object(_.a)(C,2),S=w[0],A=w[1];function D(N){A(h[N][1])}function M(N){x(N)}return n.a.createElement(s.a,Object(v.a)({},f,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:M}),n.a.createElement(s.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},n.a.createElement(e.a,{onChange:D},Object.keys(h).map(function(N){return n.a.createElement(d,{key:N,value:N},h[N][0])}))),n.a.createElement(s.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},n.a.createElement(u,{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:O},"\u53D6\u6D88")))};function u(E){var x=E.value,O=E.onChange,C=E.mode,w=E.options,S=w===void 0?{}:w,A=Object(o.useRef)(),D=Object(o.useState)(),M=Object(_.a)(D,2),N=M[0],P=M[1];return Object(o.useEffect)(function(){if(N){function z(X){var k=X.getValue();O&&O(k)}return N.on("change",z),function(){N.off("change",z)}}},[N,O]),Object(o.useEffect)(function(){N&&N.setOption("mode",C)},[N,C]),Object(o.useEffect)(function(){N&&((x!==N.getValue()||x==="")&&setTimeout(function(){N.setValue(x||" ")},300))},[N,x]),Object(o.useEffect)(function(){if(A.current&&!N){var z=r.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));P(z)}},[A.current,N]),n.a.createElement("div",{className:"my-codemirror-container"},n.a.createElement("textarea",{ref:A}))}},"7ixt":function(j,H,b){"use strict";b.d(H,"a",function(){return T});var I={adjustX:1,adjustY:1},v=[0,0],T={left:{points:["cr","cl"],overflow:I,offset:[-4,0],targetOffset:v},right:{points:["cl","cr"],overflow:I,offset:[4,0],targetOffset:v},top:{points:["bc","tc"],overflow:I,offset:[0,-4],targetOffset:v},bottom:{points:["tc","bc"],overflow:I,offset:[0,4],targetOffset:v},topLeft:{points:["bl","tl"],overflow:I,offset:[0,-4],targetOffset:v},leftTop:{points:["tr","tl"],overflow:I,offset:[-4,0],targetOffset:v},topRight:{points:["br","tr"],overflow:I,offset:[0,-4],targetOffset:v},rightTop:{points:["tl","tr"],overflow:I,offset:[4,0],targetOffset:v},bottomRight:{points:["tr","br"],overflow:I,offset:[0,4],targetOffset:v},rightBottom:{points:["bl","br"],overflow:I,offset:[4,0],targetOffset:v},bottomLeft:{points:["tl","bl"],overflow:I,offset:[0,4],targetOffset:v},leftBottom:{points:["br","bl"],overflow:I,offset:[-4,0],targetOffset:v}},y=T},"7v3h":function(j,H,b){j.exports=b.p+"static/empty2.dd73f390.png"},"8+yF":function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.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},v={lookup:function(y){if(y>=32&&y<=255)return y;var g=I[y];return g!==void 0?g:16777216|y}};H.default=v},"8/bI":function(j,H,b){j.exports=b.p+"static/empty.8918e228.png"},"815F":function(j,H,b){"use strict";b.d(H,"e",function(){return _}),b.d(H,"c",function(){return e}),b.d(H,"d",function(){return o}),b.d(H,"a",function(){return l}),b.d(H,"f",function(){return r}),b.d(H,"b",function(){return i});var I=b("KQm4"),v=b("VTBJ"),T=b("Ff2n"),y=b("Zm9Q"),g=b("Kwbf"),s=b("OZM5");function _(t,a){return t!=null?t:a}function p(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],a=new Map;function c(d){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(d||[]).forEach(function(h){var u=h.key,E=h.children;Object(g.a)(u!=null,"Tree node must have a certain key: [".concat(f).concat(u,"]"));var x=String(u);Object(g.a)(!a.has(x)||u===null||u===void 0,"Same 'key' exist in the Tree: ".concat(x)),a.set(x,!0),c(E,"".concat(f).concat(x," > "))})}c(t)}function e(t){function a(c){var d=Object(y.a)(c);return d.map(function(f){if(!Object(s.i)(f))return Object(g.a)(!f,"Tree/TreeNode can only accept TreeNode as children."),null;var h=f.key,u=f.props,E=u.children,x=Object(T.a)(u,["children"]),O=Object(v.a)({key:h},x),C=a(E);return C.length&&(O.children=C),O}).filter(function(f){return f})}return a(t)}function o(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],c=new Set(a===!0?[]:a),d=[];function f(h){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return h.map(function(E,x){var O=Object(s.h)(u?u.pos:"0",x),C=_(E.key,O),w=Object(v.a)(Object(v.a)({},E),{},{parent:u,pos:O,children:null,data:E,isStart:[].concat(Object(I.a)(u?u.isStart:[]),[x===0]),isEnd:[].concat(Object(I.a)(u?u.isEnd:[]),[x===h.length-1])});return d.push(w),a===!0||c.has(C)?w.children=f(E.children||[],w):w.children=[],w})}return f(t),d}function n(t,a,c){var d;c?typeof c=="string"?d=function(u){return u[c]}:typeof c=="function"&&(d=function(u){return c(u)}):d=function(u,E){return _(u.key,E)};function f(h,u,E){var x=h?h.children:t,O=h?Object(s.h)(E.pos,u):"0";if(h){var C=d(h,O),w={node:h,index:u,pos:O,key:C,parentPos:E.node?E.pos:null,level:E.level+1};a(w)}x&&x.forEach(function(S,A){f(S,A,{node:h,pos:O,level:E?E.level+1:-1})})}f(null)}function l(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=a.initWrapper,d=a.processEntity,f=a.onProcessFinished,h=arguments.length>2?arguments[2]:void 0,u={},E={},x={posEntities:u,keyEntities:E};return c&&(x=c(x)||x),n(t,function(O){var C=O.node,w=O.index,S=O.pos,A=O.key,D=O.parentPos,M=O.level,N={node:C,index:w,key:A,pos:S,level:M},P=_(A,S);u[S]=N,E[P]=N,N.parent=u[D],N.parent&&(N.parent.children=N.parent.children||[],N.parent.children.push(N)),d&&d(N,x)},h),f&&f(x),x}function r(t,a){var c=a.expandedKeys,d=a.selectedKeys,f=a.loadedKeys,h=a.loadingKeys,u=a.checkedKeys,E=a.halfCheckedKeys,x=a.dragOverNodeKey,O=a.dropPosition,C=a.keyEntities,w=C[t],S={eventKey:t,expanded:c.indexOf(t)!==-1,selected:d.indexOf(t)!==-1,loaded:f.indexOf(t)!==-1,loading:h.indexOf(t)!==-1,checked:u.indexOf(t)!==-1,halfChecked:E.indexOf(t)!==-1,pos:String(w?w.pos:""),dragOver:x===t&&O===0,dragOverGapTop:x===t&&O===-1,dragOverGapBottom:x===t&&O===1};return S}function i(t){var a=t.data,c=t.expanded,d=t.selected,f=t.checked,h=t.loaded,u=t.loading,E=t.halfChecked,x=t.dragOver,O=t.dragOverGapTop,C=t.dragOverGapBottom,w=t.pos,S=t.active,A=Object(v.a)(Object(v.a)({},a),{},{expanded:c,selected:d,checked:f,loaded:h,loading:u,halfChecked:E,dragOver:x,dragOverGapTop:O,dragOverGapBottom:C,pos:w,active:S});return"props"in A||Object.defineProperty(A,"props",{get:function(){return Object(g.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),t}}),A}},"88g3":function(j,H,b){j.exports={tree:"tree___noxec"}},"8Abk":function(j,H,b){},"8CQX":function(j,H,b){"use strict";function I(i){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(a){return typeof a}:I=function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},I(i)}Object.defineProperty(H,"__esModule",{value:!0}),H.getKeycode=n,H.getKey=l,H.getKeysym=r;var v=o(b("mHUz")),T=o(b("8+yF")),y=o(b("6Qwc")),g=o(b("gIYZ")),s=o(b("mTgk")),_=e(b("GdRQ"));function p(){if(typeof WeakMap!="function")return null;var i=new WeakMap;return p=function(){return i},i}function e(i){if(i&&i.__esModule)return i;if(i===null||I(i)!=="object"&&typeof i!="function")return{default:i};var t=p();if(t&&t.has(i))return t.get(i);var a={},c=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var d in i)if(Object.prototype.hasOwnProperty.call(i,d)){var f=c?Object.getOwnPropertyDescriptor(i,d):null;f&&(f.get||f.set)?Object.defineProperty(a,d,f):a[d]=i[d]}return a.default=i,t&&t.set(i,a),a}function o(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 t=y.default[i.keyCode];if(_.isMac()&&t==="ContextMenu"&&(t="MetaRight"),i.location===2)switch(t){case"ShiftLeft":return"ShiftRight";case"ControlLeft":return"ControlRight";case"AltLeft":return"AltRight"}if(i.location===3)switch(t){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 t}return"Unidentified"}function l(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(!_.isIE()&&!_.isEdge())return i.key;if(i.key.length!==1&&i.key!=="Unidentified")return i.key}var t=n(i);return t in g.default?g.default[t]:i.charCode?String.fromCharCode(i.charCode):"Unidentified"}function r(i){var t=l(i);if(t==="Unidentified")return null;if(t in s.default){var a=i.location;if(t==="Meta"&&a===0&&(a=2),t==="Clear"&&a===3){var c=n(i);c==="NumLock"&&(a=0)}if((a===void 0||a>3)&&(a=0),t==="Meta"){var d=n(i);if(d==="AltLeft")return v.default.XK_Meta_L;if(d==="AltRight")return v.default.XK_Meta_R}if(t==="Clear"){var f=n(i);if(f==="NumLock")return v.default.XK_Num_Lock}return s.default[t][a]}if(t.length!==1)return null;var h=t.charCodeAt();return h?T.default.lookup(h):null}},"8EBN":function(j,H,b){(function(I){I(b("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 v=0;v<I.modeInfo.length;v++){var T=I.modeInfo[v];T.mimes&&(T.mime=T.mimes[0])}I.findModeByMIME=function(y){y=y.toLowerCase();for(var g=0;g<I.modeInfo.length;g++){var s=I.modeInfo[g];if(s.mime==y)return s;if(s.mimes){for(var _=0;_<s.mimes.length;_++)if(s.mimes[_]==y)return s}}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 g=0;g<I.modeInfo.length;g++){var s=I.modeInfo[g];if(s.ext){for(var _=0;_<s.ext.length;_++)if(s.ext[_]==y)return s}}},I.findModeByFileName=function(y){for(var g=0;g<I.modeInfo.length;g++){var s=I.modeInfo[g];if(s.file&&s.file.test(y))return s}var _=y.lastIndexOf("."),p=_>-1&&y.substring(_+1,y.length);if(p)return I.findModeByExtension(p)},I.findModeByName=function(y){y=y.toLowerCase();for(var g=0;g<I.modeInfo.length;g++){var s=I.modeInfo[g];if(s.name.toLowerCase()==y)return s;if(s.alias){for(var _=0;_<s.alias.length;_++)if(s.alias[_].toLowerCase()==y)return s}}}})},"8Enf":function(j,H,b){},"8HAY":function(j,H,b){"use strict";b.d(H,"a",function(){return g}),b.d(H,"b",function(){return s}),b.d(H,"d",function(){return _}),b.d(H,"e",function(){return p}),b.d(H,"c",function(){return e});var I=b("MI8n"),v=b("pmY6"),T=b("3/fG"),y=function(o,n,l,r){function i(t){return t instanceof l?t:new l(function(a){a(t)})}return new(l||(l=Promise))(function(t,a){function c(h){try{f(r.next(h))}catch(u){a(u)}}function d(h){try{f(r.throw(h))}catch(u){a(u)}}function f(h){h.done?t(h.value):i(h.value).then(c,d)}f((r=r.apply(o,n||[])).next())})};class g extends v.a{constructor(o,n="",l="",r=!0,i){super();this._onDidChange=this._register(new I.b),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=o,this._label=n,this._cssClass=l,this._enabled=r,this._actionCallback=i}get id(){return this._id}get label(){return this._label}set label(o){this._setLabel(o)}_setLabel(o){this._label!==o&&(this._label=o,this._onDidChange.fire({label:o}))}get tooltip(){return this._tooltip||""}set tooltip(o){this._setTooltip(o)}_setTooltip(o){this._tooltip!==o&&(this._tooltip=o,this._onDidChange.fire({tooltip:o}))}get class(){return this._cssClass}set class(o){this._setClass(o)}_setClass(o){this._cssClass!==o&&(this._cssClass=o,this._onDidChange.fire({class:o}))}get enabled(){return this._enabled}set enabled(o){this._setEnabled(o)}_setEnabled(o){this._enabled!==o&&(this._enabled=o,this._onDidChange.fire({enabled:o}))}get checked(){return this._checked}set checked(o){this._setChecked(o)}_setChecked(o){this._checked!==o&&(this._checked=o,this._onDidChange.fire({checked:o}))}run(o,n){return y(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(o))})}}class s extends v.a{constructor(){super(...arguments);this._onBeforeRun=this._register(new I.b),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new I.b),this.onDidRun=this._onDidRun.event}run(o,n){return y(this,void 0,void 0,function*(){if(!o.enabled)return;this._onBeforeRun.fire({action:o});let l;try{yield this.runAction(o,n)}catch(r){l=r}this._onDidRun.fire({action:o,error:l})})}runAction(o,n){return y(this,void 0,void 0,function*(){yield o.run(n)})}}class _ extends g{constructor(o){super(_.ID,o,o?"separator text":"separator");this.checked=!1,this.enabled=!1}}_.ID="vs.actions.separator";class p{constructor(o,n,l,r){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=o,this.label=n,this.class=r,this._actions=l}get actions(){return this._actions}dispose(){}run(){return y(this,void 0,void 0,function*(){})}}class e extends g{constructor(){super(e.ID,T.a("submenu.empty","(empty)"),void 0,!1)}}e.ID="vs.actions.empty"},"8K/p":function(j,H,b){"use strict";function I(n){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(n)}Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;var v=s(b("Lo0S")),T=y(b("ItS6"));function y(n){return n&&n.__esModule?n:{default:n}}function g(){if(typeof WeakMap!="function")return null;var n=new WeakMap;return g=function(){return n},n}function s(n){if(n&&n.__esModule)return n;if(n===null||I(n)!=="object"&&typeof n!="function")return{default:n};var l=g();if(l&&l.has(n))return l.get(n);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var t in n)if(Object.prototype.hasOwnProperty.call(n,t)){var a=i?Object.getOwnPropertyDescriptor(n,t):null;a&&(a.get||a.set)?Object.defineProperty(r,t,a):r[t]=n[t]}return r.default=n,l&&l.set(n,r),r}function _(n,l){if(!(n instanceof l))throw new TypeError("Cannot call a class as a function")}function p(n,l){for(var r=0;r<l.length;r++){var i=l[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function e(n,l,r){return l&&p(n.prototype,l),r&&p(n,r),n}var o=function(){function n(){_(this,n),this._ctl=null,this._filter=null,this._numColors=0,this._palette=new Uint8Array(1024),this._len=0,this._zlibs=[];for(var l=0;l<4;l++)this._zlibs[l]=new T.default}return e(n,[{key:"decodeRect",value:function(r,i,t,a,c,d,f){if(this._ctl===null){if(c.rQwait("TIGHT compression-control",1))return!1;this._ctl=c.rQshift8();for(var h=0;h<4;h++)this._ctl>>h&1&&(this._zlibs[h].reset(),v.Info("Reset zlib stream "+h));this._ctl=this._ctl>>4}var u;if(this._ctl===8)u=this._fillRect(r,i,t,a,c,d,f);else if(this._ctl===9)u=this._jpegRect(r,i,t,a,c,d,f);else if(this._ctl===10)u=this._pngRect(r,i,t,a,c,d,f);else if((this._ctl&128)==0)u=this._basicRect(this._ctl,r,i,t,a,c,d,f);else throw new Error("Illegal tight compression received (ctl: "+this._ctl+")");return u&&(this._ctl=null),u}},{key:"_fillRect",value:function(r,i,t,a,c,d,f){if(c.rQwait("TIGHT",3))return!1;var h=c.rQi,u=c.rQ;return d.fillRect(r,i,t,a,[u[h+2],u[h+1],u[h]],!1),c.rQskipBytes(3),!0}},{key:"_jpegRect",value:function(r,i,t,a,c,d,f){var h=this._readData(c);return h===null?!1:(d.imageRect(r,i,t,a,"image/jpeg",h),!0)}},{key:"_pngRect",value:function(r,i,t,a,c,d,f){throw new Error("PNG received in standard Tight rect")}},{key:"_basicRect",value:function(r,i,t,a,c,d,f,h){if(this._filter===null)if(r&4){if(d.rQwait("TIGHT",1))return!1;this._filter=d.rQshift8()}else this._filter=0;var u=r&3,E;switch(this._filter){case 0:E=this._copyFilter(u,i,t,a,c,d,f,h);break;case 1:E=this._paletteFilter(u,i,t,a,c,d,f,h);break;case 2:E=this._gradientFilter(u,i,t,a,c,d,f,h);break;default:throw new Error("Illegal tight filter received (ctl: "+this._filter+")")}return E&&(this._filter=null),E}},{key:"_copyFilter",value:function(r,i,t,a,c,d,f,h){var u=a*c*3,E;if(u<12){if(d.rQwait("TIGHT",u))return!1;E=d.rQshiftBytes(u)}else{if(E=this._readData(d),E===null)return!1;this._zlibs[r].setInput(E),E=this._zlibs[r].inflate(u),this._zlibs[r].setInput(null)}return f.blitRgbImage(i,t,a,c,E,0,!1),!0}},{key:"_paletteFilter",value:function(r,i,t,a,c,d,f,h){if(this._numColors===0){if(d.rQwait("TIGHT palette",1))return!1;var u=d.rQpeek8()+1,E=u*3;if(d.rQwait("TIGHT palette",1+E))return!1;this._numColors=u,d.rQskipBytes(1),d.rQshiftTo(this._palette,E)}var x=this._numColors<=2?1:8,O=Math.floor((a*x+7)/8),C=O*c,w;if(C<12){if(d.rQwait("TIGHT",C))return!1;w=d.rQshiftBytes(C)}else{if(w=this._readData(d),w===null)return!1;this._zlibs[r].setInput(w),w=this._zlibs[r].inflate(C),this._zlibs[r].setInput(null)}return this._numColors==2?this._monoRect(i,t,a,c,w,this._palette,f):this._paletteRect(i,t,a,c,w,this._palette,f),this._numColors=0,!0}},{key:"_monoRect",value:function(r,i,t,a,c,d,f){for(var h=this._getScratchBuffer(t*a*4),u=Math.floor((t+7)/8),E=Math.floor(t/8),x=0;x<a;x++){var O=void 0,C=void 0,w=void 0;for(w=0;w<E;w++)for(var S=7;S>=0;S--)O=(x*t+w*8+7-S)*4,C=(c[x*u+w]>>S&1)*3,h[O]=d[C],h[O+1]=d[C+1],h[O+2]=d[C+2],h[O+3]=255;for(var A=7;A>=8-t%8;A--)O=(x*t+w*8+7-A)*4,C=(c[x*u+w]>>A&1)*3,h[O]=d[C],h[O+1]=d[C+1],h[O+2]=d[C+2],h[O+3]=255}f.blitRgbxImage(r,i,t,a,h,0,!1)}},{key:"_paletteRect",value:function(r,i,t,a,c,d,f){for(var h=this._getScratchBuffer(t*a*4),u=t*a*4,E=0,x=0;E<u;E+=4,x++){var O=c[x]*3;h[E]=d[O],h[E+1]=d[O+1],h[E+2]=d[O+2],h[E+3]=255}f.blitRgbxImage(r,i,t,a,h,0,!1)}},{key:"_gradientFilter",value:function(r,i,t,a,c,d,f,h){throw new Error("Gradient filter not implemented")}},{key:"_readData",value:function(r){if(this._len===0){if(r.rQwait("TIGHT",3))return null;var i;i=r.rQshift8(),this._len=i&127,i&128&&(i=r.rQshift8(),this._len|=(i&127)<<7,i&128&&(i=r.rQshift8(),this._len|=i<<14))}if(r.rQwait("TIGHT",this._len))return null;var t=r.rQshiftBytes(this._len);return this._len=0,t}},{key:"_getScratchBuffer",value:function(r){return(!this._scratchBuffer||this._scratchBuffer.length<r)&&(this._scratchBuffer=new Uint8Array(r)),this._scratchBuffer}}]),n}();H.default=o},"8hTe":function(j,H,b){j.exports={button:"button___1wy9m"}},"8j3D":function(j,H,b){"use strict";var I=b("2qtc"),v=b("kLXV"),T=b("5NDa"),y=b("5rEg"),g=b("miYZ"),s=b("tsqr"),_=b("k1fw"),p=b("9og8"),e=b("y8nQ"),o=b("Vl3Y"),n=b("tJVT"),l=b("WmNS"),r=b.n(l),i=b("q1tI"),t=b.n(i),a=b("Ty5D"),c=b("9kvl"),d=b("KVXO"),f=b.n(d),h=function(E){var x=E.shixunsDetail,O=E.globalSetting,C=E.loading,w=E.dispatch,S=E.title,A=E.pathList,D=A===void 0?[]:A,M=E.showInputPath,N=M===void 0?!1:M,P=E.isMergeSelectFile,z=P===void 0?!1:P,X=E.onFinish,k=X===void 0?function(){}:X,F=o.a.useForm(),U=Object(n.a)(F,1),L=U[0],B=Object(a.i)(),Z=Object(a.h)(),re=Object(i.useRef)(),he=Object(i.useState)(""),Ce=Object(n.a)(he,2),ke=Ce[0],te=Ce[1],Re=Object(i.useState)(""),Te=Object(n.a)(Re,2),pe=Te[0],me=Te[1],se=Object(i.useState)([]),be=Object(n.a)(se,2),ae=be[0],fe=be[1],Fe=Object(i.useState)([]),ie=Object(n.a)(Fe,2),q=ie[0],Q=ie[1];Object(i.useEffect)(function(){var ge,De;re.current=((ge=Z.pathname)===null||ge===void 0||((De=ge.split("/"))===null||De===void 0)?void 0:De[3])==="repository"},[]),Object(i.useEffect)(function(){if(x.actionTabs.key!=="Repository-SelectFilePath")return;var ge=D.join("/"),De=[];D.map(function(_e,Xe){Xe===0?De.push({val:"\u6839\u76EE\u5F55",path:""},{val:"/".concat(_e),path:ge}):De.push({val:"/".concat(_e),path:ge})}),fe(De),te(ge),me(ge),Y(ge)},[x.actionTabs.key]);var Y=function(){var ge=Object(p.a)(r.a.mark(function De(_e){var Xe;return r.a.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:return ze.next=2,w({type:re.current?"shixunsDetail/getRepository":"shixunsDetail/getSecretRepository",payload:{id:B.id,path:_e}});case 2:Xe=ze.sent,Xe&&Q(Xe.trees||[]);case 4:case"end":return ze.stop()}},De)}));return function(_e){return ge.apply(this,arguments)}}(),oe=function(De){var _e=ke;De.type==="tree"&&(ae.length?ae.push({val:"/".concat(De.name),path:De.name}):ae.push({val:"\u6839\u76EE\u5F55",path:""},{val:"/".concat(De.name),path:De.name}),fe(ae),_e=ke?"".concat(ke,"/").concat(De.name):De.name,te(_e)),Y(_e)},le=function(De,_e){var Xe=ae.filter(function(ze,Me){return Me<=_e});fe(Xe);var tt=Xe.filter(function(ze,Me){return Me!==0}).map(function(ze){return ze.val}).join("").substr(1);te(tt),Y(tt)},Ee=function(){var ge=Object(p.a)(r.a.mark(function De(){var _e,Xe,tt;return r.a.wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:if(_e=L==null?void 0:L.getFieldsValue(),Xe=ke?"".concat(ke).concat(_e!=null&&_e.name?"/".concat(_e==null?void 0:_e.name):""):_e==null?void 0:_e.name,!z){Me.next=6;break}return k(Xe),Le(),Me.abrupt("return");case 6:if(!N){Me.next=16;break}return Me.next=9,L.validateFields();case 9:return Me.next=11,w({type:"shixunsDetail/uploadGitFolder",payload:Object(_.a)(Object(_.a)({},{id:B.id,path:Xe}),re.current?{}:{secret_repository:!0})});case 11:tt=Me.sent,k(pe),tt.status===0&&s.b.info("\u65B0\u5EFA\u6210\u529F"),Me.next=18;break;case 16:k(Xe),s.b.success("\u9009\u62E9\u6587\u4EF6\u76EE\u5F55\u6210\u529F");case 18:Le();case 19:case"end":return Me.stop()}},De)}));return function(){return ge.apply(this,arguments)}}(),Le=function(){w({type:"shixunsDetail/setActionTabs",payload:{}}),L.resetFields()};return t.a.createElement(v.a,{centered:!0,title:S||"\u65B0\u5EFA\u6587\u4EF6\u5939",closable:!1,keyboard:!1,visible:x.actionTabs.key==="Repository-SelectFilePath",onOk:Ee,onCancel:Le},t.a.createElement("div",{className:f.a.wrap},t.a.createElement("div",{className:f.a.content},t.a.createElement("div",{className:f.a.mainPathWrap},!!(ae!=null&&ae.length)&&ae.map(function(ge,De){return t.a.createElement("a",{key:De,onClick:function(){return le(ge,De)}},ge.val)})),!!(q!=null&&q.length)&&q.map(function(ge,De){return ge.type==="tree"&&t.a.createElement("a",{key:De,onClick:function(){return oe(ge)}},t.a.createElement("i",{className:"iconfont icon-wenjianjia ".concat(f.a.colorBlue)}),ge.name)})),t.a.createElement("label",{className:"mt5"},"\u9009\u4E2D\u7684\u65B0\u5EFA\u6587\u4EF6\u5939\u76EE\u5F55\uFF1A"),t.a.createElement("div",{className:"mt5 mb5"},ke),N&&t.a.createElement(o.a,{form:L,scrollToFirstError:!0,className:"mt20"},t.a.createElement(o.a.Item,{name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u540D\u79F0"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},t.a.createElement(y.a,{placeholder:"\u8BF7\u8F93\u5165\u65B0\u6587\u4EF6\u5939\u540D/\u5B50\u6587\u4EF6\u5939\u540D\u3002\uFF08\u5982\uFF1Asrc/step1\uFF09"})))))};H.a=Object(c.a)(function(u){var E=u.shixunsDetail,x=u.loading,O=u.globalSetting;return{shixunsDetail:E,globalSetting:O,loading:x.models.index}})(h)},"8mKB":function(j,H,b){"use strict";var I=b("rePB"),v=b("1OyB"),T=b("vuIU"),y=b("Ji7U"),g=b("md7G"),s=b("foSv"),_=b("q1tI"),p=b.n(_),e=b("m+aA"),o=b("TSYQ"),n=b.n(o),l=b("4IlW");function r(S){var A=S.pageXOffset,D="scrollLeft";if(typeof A!="number"){var M=S.document;A=M.documentElement[D],typeof A!="number"&&(A=M.body[D])}return A}function i(S){var A,D,M=S.ownerDocument,N=M.body,P=M&&M.documentElement,z=S.getBoundingClientRect();return A=z.left,D=z.top,A-=P.clientLeft||N.clientLeft||0,D-=P.clientTop||N.clientTop||0,{left:A,top:D}}function t(S){var A=i(S),D=S.ownerDocument,M=D.defaultView||D.parentWindow;return A.left+=r(M),A.left}function a(S){var A=c();return function(){var M=Object(s.a)(S),N;if(A){var P=Object(s.a)(this).constructor;N=Reflect.construct(M,arguments,P)}else N=M.apply(this,arguments);return Object(g.a)(this,N)}}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 d=function(S){Object(y.a)(D,S);var A=a(D);function D(){var M;return Object(v.a)(this,D),M=A.apply(this,arguments),M.onHover=function(N){var P=M.props,z=P.onHover,X=P.index;z(N,X)},M.onClick=function(N){var P=M.props,z=P.onClick,X=P.index;z(N,X)},M.onKeyDown=function(N){var P=M.props,z=P.onClick,X=P.index;N.keyCode===13&&z(N,X)},M}return Object(T.a)(D,[{key:"getClassName",value:function(){var N=this.props,P=N.prefixCls,z=N.index,X=N.value,k=N.allowHalf,F=N.focused,U=z+1,L=P;return X===0&&z===0&&F?L+=" ".concat(P,"-focused"):k&&X+.5>=U&&X<U?(L+=" ".concat(P,"-half ").concat(P,"-active"),F&&(L+=" ".concat(P,"-focused"))):(L+=U<=X?" ".concat(P,"-full"):" ".concat(P,"-zero"),U===X&&F&&(L+=" ".concat(P,"-focused"))),L}},{key:"render",value:function(){var N=this.onHover,P=this.onClick,z=this.onKeyDown,X=this.props,k=X.disabled,F=X.prefixCls,U=X.character,L=X.characterRender,B=X.index,Z=X.count,re=X.value,he=typeof U=="function"?U(this.props):U,Ce=p.a.createElement("li",{className:this.getClassName()},p.a.createElement("div",{onClick:k?null:P,onKeyDown:k?null:z,onMouseMove:k?null:N,role:"radio","aria-checked":re>B?"true":"false","aria-posinset":B+1,"aria-setsize":Z,tabIndex:k?-1:0},p.a.createElement("div",{className:"".concat(F,"-first")},he),p.a.createElement("div",{className:"".concat(F,"-second")},he)));return L&&(Ce=L(Ce,this.props)),Ce}}]),D}(p.a.Component);function f(S,A){var D=Object.keys(S);if(Object.getOwnPropertySymbols){var M=Object.getOwnPropertySymbols(S);A&&(M=M.filter(function(N){return Object.getOwnPropertyDescriptor(S,N).enumerable})),D.push.apply(D,M)}return D}function h(S){for(var A=1;A<arguments.length;A++){var D=arguments[A]!=null?arguments[A]:{};A%2?f(Object(D),!0).forEach(function(M){Object(I.a)(S,M,D[M])}):Object.getOwnPropertyDescriptors?Object.defineProperties(S,Object.getOwnPropertyDescriptors(D)):f(Object(D)).forEach(function(M){Object.defineProperty(S,M,Object.getOwnPropertyDescriptor(D,M))})}return S}function u(S){var A=E();return function(){var M=Object(s.a)(S),N;if(A){var P=Object(s.a)(this).constructor;N=Reflect.construct(M,arguments,P)}else N=M.apply(this,arguments);return Object(g.a)(this,N)}}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 x(){}var O=function(S){Object(y.a)(D,S);var A=u(D);function D(M){var N;Object(v.a)(this,D),N=A.call(this,M),N.onHover=function(z,X){var k=N.props.onHoverChange,F=N.getStarValue(X,z.pageX),U=N.state.cleanedValue;F!==U&&N.setState({hoverValue:F,cleanedValue:null}),k(F)},N.onMouseLeave=function(){var z=N.props.onHoverChange;N.setState({hoverValue:void 0,cleanedValue:null}),z(void 0)},N.onClick=function(z,X){var k=N.props.allowClear,F=N.state.value,U=N.getStarValue(X,z.pageX),L=!1;k&&(L=U===F),N.onMouseLeave(),N.changeValue(L?0:U),N.setState({cleanedValue:L?U:null})},N.onFocus=function(){var z=N.props.onFocus;N.setState({focused:!0}),z&&z()},N.onBlur=function(){var z=N.props.onBlur;N.setState({focused:!1}),z&&z()},N.onKeyDown=function(z){var X=z.keyCode,k=N.props,F=k.count,U=k.allowHalf,L=k.onKeyDown,B=k.direction,Z=B==="rtl",re=N.state.value;X===l.a.RIGHT&&re<F&&!Z?(U?re+=.5:re+=1,N.changeValue(re),z.preventDefault()):X===l.a.LEFT&&re>0&&!Z||X===l.a.RIGHT&&re>0&&Z?(U?re-=.5:re-=1,N.changeValue(re),z.preventDefault()):X===l.a.LEFT&&re<F&&Z&&(U?re+=.5:re+=1,N.changeValue(re),z.preventDefault()),L&&L(z)},N.saveRef=function(z){return function(X){N.stars[z]=X}},N.saveRate=function(z){N.rate=z};var P=M.value;return P===void 0&&(P=M.defaultValue),N.stars={},N.state={value:P,focused:!1,cleanedValue:null},N}return Object(T.a)(D,[{key:"componentDidMount",value:function(){var N=this.props,P=N.autoFocus,z=N.disabled;P&&!z&&this.focus()}},{key:"getStarDOM",value:function(N){return Object(e.a)(this.stars[N])}},{key:"getStarValue",value:function(N,P){var z=this.props,X=z.allowHalf,k=z.direction,F=k==="rtl",U=N+1;if(X){var L=this.getStarDOM(N),B=t(L),Z=L.clientWidth;(F&&P-B>Z/2||!F&&P-B<Z/2)&&(U-=.5)}return U}},{key:"focus",value:function(){var N=this.props.disabled;N||this.rate.focus()}},{key:"blur",value:function(){var N=this.props.disabled;N||this.rate.blur()}},{key:"changeValue",value:function(N){var P=this.props.onChange;"value"in this.props||this.setState({value:N}),P(N)}},{key:"render",value:function(){for(var N=this.props,P=N.count,z=N.allowHalf,X=N.style,k=N.prefixCls,F=N.disabled,U=N.className,L=N.character,B=N.characterRender,Z=N.tabIndex,re=N.direction,he=this.state,Ce=he.value,ke=he.hoverValue,te=he.focused,Re=[],Te=F?"".concat(k,"-disabled"):"",pe=0;pe<P;pe+=1)Re.push(p.a.createElement(d,{ref:this.saveRef(pe),index:pe,count:P,disabled:F,prefixCls:"".concat(k,"-star"),allowHalf:z,value:ke===void 0?Ce:ke,onClick:this.onClick,onHover:this.onHover,key:pe,character:L,characterRender:B,focused:te}));var me=n()(k,Te,U,Object(I.a)({},"".concat(k,"-rtl"),re==="rtl"));return p.a.createElement("ul",{className:me,style:X,onMouseLeave:F?null:this.onMouseLeave,tabIndex:F?-1:Z,onFocus:F?null:this.onFocus,onBlur:F?null:this.onBlur,onKeyDown:F?null:this.onKeyDown,ref:this.saveRate,role:"radiogroup"},Re)}}],[{key:"getDerivedStateFromProps",value:function(N,P){return"value"in N&&N.value!==void 0?h(h({},P),{},{value:N.value}):P}}]),D}(p.a.Component);O.defaultProps={defaultValue:0,count:5,allowHalf:!1,allowClear:!0,style:{},prefixCls:"rc-rate",onChange:x,character:"\u2605",onHoverChange:x,tabIndex:0,direction:"ltr"};var C=O,w=H.a=C},"9Bee":function(j,H,b){"use strict";var I=b("DYRE"),v=b("zeV3"),T=b("+L6B"),y=b("2/Rp"),g=b("k1fw"),s=b("9og8"),_=b("tJVT"),p=b("WmNS"),e=b.n(p),o=b("q1tI"),n=b.n(o),l=b("vg9a"),r=b("DlQD"),i=b.n(r),t=b("rUJ1");function a(ce,V){var J=ce.match(/^(\s+)(?:```)/);if(J===null)return V;var ee=J[1];return V.split(`
|
|
|
`).map(function(Se){var ue=Se.match(/^\s+/);if(ue===null)return Se;var nt=Object(_.a)(ue,1),Dt=nt[0];return Dt.length>=ee.length?Se.slice(ee.length):Se}).join(`
|
|
|
`)}var c=[],d=["<ul>"],f=new i.a.Renderer,h=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function u(){c.length=0,d=["<ul>"]}var E={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function x(ce,V,J,ee){if(V>=ce.length||ce[V].level<=J)return V;var Se=ce[V];ee.push("<li><a href='#"+Se.anchor+"'>"+Se.text+"</a>"),V++;var ue=[];return V=x(ce,V,Se.level,ue),ue.length>0&&(ee.push("<ul>"),ue.forEach(function(nt){ee.push(nt)}),ee.push("</ul>")),ee.push("</li>"),V=x(ce,V,J,ee),V}function O(){return x(c,0,0,d),d.push("</ul>"),d.join("")}var C={heading:function(V){var J=h.exec(V);if(J)return{type:"heading",raw:J[0],depth:J[1].length,text:J[2]}},fences:function(V){var J=this.rules.block.fences.exec(V);if(J){var ee=J[0],Se=a(ee,J[3]||""),ue=J[2]?J[2].trim():J[2];if(["latex","katex","math"].indexOf(ue)>=0){var nt=A(),Dt=Se;Se=nt,D[nt]={type:"block",expression:Dt}}return{type:"code",raw:ee,lang:ue,text:Se}}}},w=/(?:\${2})([^\n`]+?)(?:\${2})/gi,S=0,A=function(){return"__special_katext_id_".concat(S++,"__")},D={};function M(){return D}function N(){S=0,D={}}function P(ce){return ce=ce.replace(w,function(V,J){var ee=A();return D[ee]={type:"inline",expression:J},ee}),ce}var z=f.listitem;f.listitem=function(ce){return z(P(ce))};var X=f.paragraph;f.paragraph=function(ce){return X(P(ce))};var k=f.tablecell;f.tablecell=function(ce,V){return k(P(ce),V)},f.code=function(ce,V,J){var ee=(V||"").match(/\S*/)[0];return ee?["latex","katex","math"].indexOf(ee)>=0?"<p class='editormd-tex'>".concat(ce,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(V,'">').concat(J?ce:Object(t.escape)(ce,!0),`</code></pre>
|
|
|
`):'<pre class="prettyprint linenums"><code>'+(J?ce:Object(t.escape)(ce,!0))+"</code></pre>"},f.heading=function(ce,V,J){var ee=this.options.headerPrefix+J.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return c.push({anchor:ee,level:V,text:ce}),"<h"+V+' id="'+ee+'">'+ce+"</h"+V+">"},i.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),i.a.use({tokenizer:C,renderer:f});var F=i.a,U=b("SJMd"),L=b("ulZh"),B=b.n(L),Z=b("m3rI"),re=b("Oy/b"),he=b("p5ED"),Ce=b("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(ce,V){return(ke=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,ee){J.__proto__=ee}||function(J,ee){for(var Se in ee)Object.prototype.hasOwnProperty.call(ee,Se)&&(J[Se]=ee[Se])})(ce,V)};function te(ce,V){function J(){this.constructor=ce}ke(ce,V),ce.prototype=V===null?Object.create(V):(J.prototype=V.prototype,new J)}function Re(ce,V,J,ee){return new(J||(J=Promise))(function(Se,ue){function nt(an){try{Yt(ee.next(an))}catch(Xt){ue(Xt)}}function Dt(an){try{Yt(ee.throw(an))}catch(Xt){ue(Xt)}}function Yt(an){var Xt;an.done?Se(an.value):(Xt=an.value,Xt instanceof J?Xt:new J(function(Rn){Rn(Xt)})).then(nt,Dt)}Yt((ee=ee.apply(ce,V||[])).next())})}function Te(ce,V){var J,ee,Se,ue,nt={label:0,sent:function(){if(1&Se[0])throw Se[1];return Se[1]},trys:[],ops:[]};return ue={next:Dt(0),throw:Dt(1),return:Dt(2)},typeof Symbol=="function"&&(ue[Symbol.iterator]=function(){return this}),ue;function Dt(Yt){return function(an){return function(Xt){if(J)throw new TypeError("Generator is already executing.");for(;nt;)try{if(J=1,ee&&(Se=2&Xt[0]?ee.return:Xt[0]?ee.throw||((Se=ee.return)&&Se.call(ee),0):ee.next)&&!(Se=Se.call(ee,Xt[1])).done)return Se;switch(ee=0,Se&&(Xt=[2&Xt[0],Se.value]),Xt[0]){case 0:case 1:Se=Xt;break;case 4:return nt.label++,{value:Xt[1],done:!1};case 5:nt.label++,ee=Xt[1],Xt=[0];continue;case 7:Xt=nt.ops.pop(),nt.trys.pop();continue;default:if(!(Se=nt.trys,(Se=Se.length>0&&Se[Se.length-1])||Xt[0]!==6&&Xt[0]!==2)){nt=0;continue}if(Xt[0]===3&&(!Se||Xt[1]>Se[0]&&Xt[1]<Se[3])){nt.label=Xt[1];break}if(Xt[0]===6&&nt.label<Se[1]){nt.label=Se[1],Se=Xt;break}if(Se&&nt.label<Se[2]){nt.label=Se[2],nt.ops.push(Xt);break}Se[2]&&nt.ops.pop(),nt.trys.pop();continue}Xt=V.call(ce,nt)}catch(Rn){Xt=[6,Rn],ee=0}finally{J=Se=0}if(5&Xt[0])throw Xt[1];return{value:Xt[0]?Xt[1]:void 0,done:!0}}([Yt,an])}}}function pe(){for(var ce=0,V=0,J=arguments.length;V<J;V++)ce+=arguments[V].length;var ee=Array(ce),Se=0;for(V=0;V<J;V++)for(var ue=arguments[V],nt=0,Dt=ue.length;nt<Dt;nt++,Se++)ee[Se]=ue[nt];return ee}var me=function(){function ce(){}return ce.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},ce.setAttributes=function(V,J){for(var ee=0,Se=J;ee<Se.length;ee++){var ue=Se[ee],nt=ue[0],Dt=ue[1];V.setAttribute(nt,Dt)}},ce.createRect=function(V,J,ee){var Se=document.createElementNS("http://www.w3.org/2000/svg","rect");return Se.setAttribute("width",V.toString()),Se.setAttribute("height",J.toString()),ee&&ce.setAttributes(Se,ee),Se},ce.createLine=function(V,J,ee,Se,ue){var nt=document.createElementNS("http://www.w3.org/2000/svg","line");return nt.setAttribute("x1",V.toString()),nt.setAttribute("y1",J.toString()),nt.setAttribute("x2",ee.toString()),nt.setAttribute("y2",Se.toString()),ue&&ce.setAttributes(nt,ue),nt},ce.createPolygon=function(V,J){var ee=document.createElementNS("http://www.w3.org/2000/svg","polygon");return ee.setAttribute("points",V),J&&ce.setAttributes(ee,J),ee},ce.createCircle=function(V,J){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()),J&&ce.setAttributes(ee,J),ee},ce.createEllipse=function(V,J,ee){var Se=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Se.setAttribute("cx",(V/2).toString()),Se.setAttribute("cy",(J/2).toString()),Se.setAttribute("rx",(V/2).toString()),Se.setAttribute("ry",(J/2).toString()),ee&&ce.setAttributes(Se,ee),Se},ce.createGroup=function(V){var J=document.createElementNS("http://www.w3.org/2000/svg","g");return V&&ce.setAttributes(J,V),J},ce.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},ce.createMarker=function(V,J,ee,Se,ue,nt,Dt){var Yt=document.createElementNS("http://www.w3.org/2000/svg","marker");return ce.setAttributes(Yt,[["id",V],["orient",J],["markerWidth",ee.toString()],["markerHeight",Se.toString()],["refX",ue.toString()],["refY",nt.toString()]]),Yt.appendChild(Dt),Yt},ce.createText=function(V){var J=document.createElementNS("http://www.w3.org/2000/svg","text");return J.setAttribute("x","0"),J.setAttribute("y","0"),V&&ce.setAttributes(J,V),J},ce.createTSpan=function(V,J){var ee=document.createElementNS("http://www.w3.org/2000/svg","tspan");return ee.textContent=V,J&&ce.setAttributes(ee,J),ee},ce.createImage=function(V){var J=document.createElementNS("http://www.w3.org/2000/svg","image");return V&&ce.setAttributes(J,V),J},ce.createPoint=function(V,J){var ee=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return ee.x=V,ee.y=J,ee},ce.createPath=function(V,J){var ee=document.createElementNS("http://www.w3.org/2000/svg","path");return ee.setAttribute("d",V),J&&ce.setAttributes(ee,J),ee},ce}(),se=function(){function ce(){}return ce.addKey=function(V){ce.key=V},Object.defineProperty(ce,"isLicensed",{get:function(){return!!ce.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(ce.key)},enumerable:!1,configurable:!0}),ce}(),be=function(){function ce(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return ce.prototype.rasterize=function(V,J,ee){var Se=this;return new Promise(function(ue){var nt=ee!==void 0?ee:document.createElement("canvas");V===null&&(Se.markersOnly=!0,Se.naturalSize=!1);var Dt=document.createElementNS("http://www.w3.org/2000/svg","svg");Dt.setAttribute("xmlns","http://www.w3.org/2000/svg"),Dt.setAttribute("width",J.width.baseVal.valueAsString),Dt.setAttribute("height",J.height.baseVal.valueAsString),Dt.setAttribute("viewBox","0 0 "+J.viewBox.baseVal.width.toString()+" "+J.viewBox.baseVal.height.toString()),Dt.innerHTML=J.innerHTML,Se.naturalSize===!0?(Dt.width.baseVal.value=V.naturalWidth,Dt.height.baseVal.value=V.naturalHeight):Se.width!==void 0&&Se.height!==void 0&&(Dt.width.baseVal.value=Se.width,Dt.height.baseVal.value=Se.height),nt.width=Dt.width.baseVal.value,nt.height=Dt.height.baseVal.value;var Yt=Dt.outerHTML,an=nt.getContext("2d");Se.markersOnly!==!0&&an.drawImage(V,0,0,nt.width,nt.height);var Xt=window.URL,Rn=new Image(nt.width,nt.height);Rn.setAttribute("crossOrigin","anonymous");var Kn=new Blob([Yt],{type:"image/svg+xml"}),ar=Xt.createObjectURL(Kn);Rn.onload=function(){an.drawImage(Rn,0,0),Xt.revokeObjectURL(ar);var vr=nt.toDataURL(Se.imageType,Se.imageQuality);ue(vr)},Rn.src=ar})},ce}(),ae=function(){},fe=function(){function ce(V){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+V+"_"}return Object.defineProperty(ce.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(ce.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(ce.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),ce.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},ce.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)},ce.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 ie("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new ie("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},ce.prototype.removeStyleSheet=function(){var V;this.styleSheet&&(((V=this.styleSheetRoot)!==null&&V!==void 0?V:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},ce}(),Fe=function(ce,V){this.selector=ce,this.style=V},ie=function(ce,V){this.localName=ce,this.style=V},q=function(){function ce(V,J,ee,Se,ue){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=V,this.displayMode=J,this.markerItems=ee,this.uiStyleSettings=Se,this.styles=ue,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return ce.prototype.show=function(V){var J=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(ue){var nt=document.createElement("div");nt.className=""+J.toolbarButtonStyleClass.name,nt.setAttribute("data-type-name",ue.typeName),nt.innerHTML=ue.icon,nt.addEventListener("click",function(){J.markerToolbarButtonClicked(nt,ue)}),J.buttons.push(nt),J.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()},ce.prototype.addButtonClickListener=function(V){this.buttonClickListeners.push(V)},ce.prototype.removeButtonClickListener=function(V){this.buttonClickListeners.indexOf(V)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(V),1)},ce.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},ce.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 J=0;J<this.markerButtons.length;J++)J<V||J===V&&this.markerButtons.length-1===V?this.markerButtonBlock.appendChild(this.markerButtons[J]):(J===V&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[J]))}},ce.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")},ce.prototype.resetButtonStyles=function(){var V=this;this.buttons.forEach(function(J){J.className=J.className.replace(V.uiStyleSettings.toolbarButtonStyleColorsClassName?V.uiStyleSettings.toolbarButtonStyleColorsClassName:V.toolbarButtonStyleColorsClass.name,"").trim(),J.className=J.className.replace(V.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?V.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:V.toolbarActiveButtonStyleColorsClass.name,"").trim(),J.className+=" "+(V.uiStyleSettings.toolbarButtonStyleColorsClassName?V.uiStyleSettings.toolbarButtonStyleColorsClassName:V.toolbarButtonStyleColorsClass.name)})},ce.prototype.addActionButton=function(V,J,ee){var Se=this,ue=document.createElement("div");switch(ue.className=""+this.toolbarButtonStyleClass.name,ue.innerHTML=J,ue.setAttribute("data-action",ee),ue.addEventListener("click",function(){Se.actionToolbarButtonClicked(ue,ee)}),ee){case"select":ue.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":ue.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":ue.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":ue.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":ue.style.fill=this.uiStyleSettings.closeButtonColor}V.appendChild(ue),this.buttons.push(ue)},ce.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new ie("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 ie("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new ie("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new ie("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 ie("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var V=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ie("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 ie("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ie("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+`
|
|
|
`))},ce.prototype.markerToolbarButtonClicked=function(V,J){this.setActiveButton(V),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ee){return ee("marker",J)}),this.markerButtonOverflowBlock.style.display="none"},ce.prototype.actionToolbarButtonClicked=function(V,J){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ee){return ee("action",J)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},ce.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)},ce.prototype.setActiveMarkerButton=function(V){var J=this.markerButtons.find(function(ee){return ee.getAttribute("data-type-name")===V});J&&this.setActiveButton(J)},ce.prototype.setCurrentMarker=function(V){var J=this;this.currentMarker=V,this.buttons.filter(function(ee){return/delete|notes/.test(ee.getAttribute("data-action"))}).forEach(function(ee){J.currentMarker===void 0?(ee.style.fillOpacity="0.4",ee.style.pointerEvents="none"):(ee.style.fillOpacity="1",ee.style.pointerEvents="all")})},ce}(),Q=function(){function ce(V,J,ee,Se){this.panels=[],this.panelButtons=[],this.markerjsContainer=V,this.displayMode=J,this.uiStyleSettings=ee,this.styles=Se,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return ce.prototype.addStyles=function(){var V;this.toolboxStyleClass=this.styles.addClass(new ie("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 ie("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var J=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ie("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ie("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ie("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 ie("toolbox-panel-row_colors",`
|
|
|
background-color: `+((V=this.uiStyleSettings.toolboxBackgroundColor)!==null&&V!==void 0?V:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ie("toolbox_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*J)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*J)+`px;
|
|
|
padding: `+J+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ie("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ie("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;
|
|
|
`))},ce.prototype.show=function(V){var J;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=V,this.uiContainer.className=this.toolboxStyleClass.name+" "+((J=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&J!==void 0?J:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},ce.prototype.setPanelButtons=function(V){var J,ee,Se=this;this.panels=V,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((J=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&J!==void 0?J: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(ue){var nt;ue.uiStyleSettings=Se.uiStyleSettings;var Dt=document.createElement("div");Dt.className=Se.toolboxButtonStyleClass.name+" "+((nt=Se.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&nt!==void 0?nt:Se.toolboxButtonStyleColorsClass.name),Dt.innerHTML=ue.icon,Dt.title=ue.title,Dt.addEventListener("click",function(){Se.panelButtonClick(ue)}),Se.panelButtons.push(Dt),Se.buttonRow.appendChild(Dt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},ce.prototype.panelButtonClick=function(V){var J=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(){J.displayMode==="inline"?J.panelRow.style.display="none":J.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(ue,nt){var Dt,Yt;ue.className=J.toolboxButtonStyleClass.name+" "+(nt===ee?""+((Dt=J.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Dt!==void 0?Dt:J.toolboxActiveButtonStyleColorsClass.name):""+((Yt=J.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Yt!==void 0?Yt:J.toolboxButtonStyleColorsClass.name))})},ce}(),Y=function(ce,V){this.title=ce,this.icon=V},oe=function(ce){function V(J,ee,Se,ue){var nt=ce.call(this,J,ue||'<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 te(V,ce),V.prototype.getUi=function(){var J=this,ee=document.createElement("div");return ee.style.overflow="hidden",ee.style.whiteSpace="nowrap",this.colors.forEach(function(Se){var ue=J.getColorBox(Se);ee.appendChild(ue),J.colorBoxes.push(ue)}),ee},V.prototype.getColorBox=function(J){var ee=this,Se=this.uiStyleSettings.toolbarHeight/4,ue=this.uiStyleSettings.toolbarHeight-Se,nt=document.createElement("div");nt.style.display="inline-block",nt.style.boxSizing="content-box",nt.style.width=ue-2+"px",nt.style.height=ue-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=(ue+2)/2+"px",nt.style.borderColor=J===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",nt.addEventListener("click",function(){ee.setCurrentColor(J,nt)});var Dt=document.createElement("div");return Dt.style.display="inline-block",Dt.style.width=ue-2+"px",Dt.style.height=ue-2+"px",Dt.style.backgroundColor=J,Dt.style.borderRadius=ue/2+"px",J==="transparent"&&(Dt.style.fill=this.uiStyleSettings.toolboxAccentColor,Dt.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(Dt),nt},V.prototype.setCurrentColor=function(J,ee){var Se=this;this.currentColor=J,this.colorBoxes.forEach(function(ue){ue.style.borderColor=ue===ee?Se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(J)},V}(Y),le=function(){function ce(V,J,ee){this._state="new",this._isSelected=!1,this._container=V,this._overlayContainer=J,this.globalSettings=ee,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(ce.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),ce.prototype.ownsTarget=function(V){return!1},Object.defineProperty(ce.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),ce.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},ce.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},ce.prototype.pointerDown=function(V,J){},ce.prototype.dblClick=function(V,J){},ce.prototype.manipulate=function(V){},ce.prototype.pointerUp=function(V){this.stateChanged()},ce.prototype.dispose=function(){},ce.prototype.addMarkerVisualToContainer=function(V){this.container.childNodes.length>0?this.container.insertBefore(V,this.container.childNodes[0]):this.container.appendChild(V)},ce.prototype.getState=function(){return{typeName:ce.typeName,state:this.state,notes:this.notes}},ce.prototype.restoreState=function(V){this._state=V.state,this.notes=V.notes},ce.prototype.scale=function(V,J){},ce.prototype.colorChanged=function(V){this.onColorChanged&&this.onColorChanged(V),this.stateChanged()},ce.prototype.fillColorChanged=function(V){this.onFillColorChanged&&this.onFillColorChanged(V),this.stateChanged()},ce.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)}},ce.typeName="MarkerBase",ce}(),Ee=function(){function ce(){this.findGripByVisual=this.findGripByVisual.bind(this)}return ce.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},ce}(),Le=function(){function ce(){this.GRIP_SIZE=10,this.visual=me.createGroup(),this.visual.appendChild(me.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(me.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ce.prototype.ownsTarget=function(V){return V===this.visual||V===this.visual.childNodes[0]||V===this.visual.childNodes[1]},ce}(),ge=function(){function ce(){}return ce.toITransformMatrix=function(V){return{a:V.a,b:V.b,c:V.c,d:V.d,e:V.e,f:V.f}},ce.toSVGMatrix=function(V,J){return V.a=J.a,V.b=J.b,V.c=J.c,V.d=J.d,V.e=J.e,V.f=J.f,V},ce}(),De=function(ce){function V(J,ee,Se){var ue=ce.call(this,J,ee,Se)||this;return ue.left=0,ue.top=0,ue.width=0,ue.height=0,ue.defaultSize={x:50,y:20},ue.offsetX=0,ue.offsetY=0,ue.rotationAngle=0,ue.CB_DISTANCE=10,ue._suppressMarkerCreateEvent=!1,ue.container.transform.baseVal.appendItem(me.createTransform()),ue.setupControlBox(),ue}return te(V,ce),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(J){this._visual=J;var ee=me.createTransform();this._visual.transform.baseVal.appendItem(ee)},enumerable:!1,configurable:!0}),V.prototype.ownsTarget=function(J){return!!ce.prototype.ownsTarget.call(this,J)||!!(this.controlGrips.findGripByVisual(J)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(J))},V.prototype.pointerDown=function(J,ee){ce.prototype.pointerDown.call(this,J,ee),this.state==="new"&&(this.left=J.x,this.top=J.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Se=this.unrotatePoint(J);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 ue=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=ue.x-this.width/2,this.top=ue.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(J){var ee=this.state;ce.prototype.pointerUp.call(this,J),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(J),this._state="select",ee==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},V.prototype.moveVisual=function(J){this.visual.style.transform="translate("+J.x+"px, "+J.y+"px)"},V.prototype.manipulate=function(J){var ee=this.unrotatePoint(J);this.state==="creating"?this.resize(J):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(J)},V.prototype.resize=function(J){var ee=this.manipulationStartLeft,Se=this.manipulationStartWidth,ue=this.manipulationStartTop,nt=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:ee=this.manipulationStartLeft+J.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+J.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:ue=this.manipulationStartTop+J.y-this.manipulationStartY,nt=this.manipulationStartHeight+this.manipulationStartTop-ue;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:nt=this.manipulationStartHeight+J.y-this.manipulationStartY}Se>=0?(this.left=ee,this.width=Se):(this.left=ee+Se,this.width=-Se),nt>=0?(this.top=ue,this.height=nt):(this.top=ue+nt,this.height=-nt),this.setSize()},V.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},V.prototype.rotate=function(J){if(Math.abs(J.x-this.centerX)>.1){var ee=Math.sign(J.x-this.centerX);this.rotationAngle=180*Math.atan((J.y-this.centerY)/(J.x-this.centerX))/Math.PI+90*ee,this.applyRotation()}},V.prototype.applyRotation=function(){var J=this.container.transform.baseVal.getItem(0);J.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(J,0)},V.prototype.rotatePoint=function(J){if(this.rotationAngle===0)return J;var ee=this.container.getCTM(),Se=me.createPoint(J.x,J.y);return{x:(Se=Se.matrixTransform(ee)).x,y:Se.y}},V.prototype.unrotatePoint=function(J){if(this.rotationAngle===0)return J;var ee=this.container.getCTM();ee=ee.inverse();var Se=me.createPoint(J.x,J.y);return{x:(Se=Se.matrixTransform(ee)).x,y:Se.y}},V.prototype.select=function(){ce.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},V.prototype.deselect=function(){ce.prototype.deselect.call(this),this.controlBox.style.display="none"},V.prototype.setupControlBox=function(){this.controlBox=me.createGroup();var J=me.createTransform();J.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(J),this.container.appendChild(this.controlBox),this.controlRect=me.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=me.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 Ee,this.addControlGrips(),this.controlBox.style.display="none"},V.prototype.adjustControlBox=function(){var J=this.controlBox.transform.baseVal.getItem(0);J.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(J,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 J=new Le;return J.visual.transform.baseVal.appendItem(me.createTransform()),this.controlBox.appendChild(J.visual),J},V.prototype.positionGrips=function(){var J=this.controlGrips.topLeft.GRIP_SIZE,ee=-J/2,Se=ee,ue=(this.width+this.CB_DISTANCE)/2-J/2,nt=(this.height+this.CB_DISTANCE)/2-J/2,Dt=this.height+this.CB_DISTANCE-J/2,Yt=this.width+this.CB_DISTANCE-J/2;this.positionGrip(this.controlGrips.topLeft.visual,ee,Se),this.positionGrip(this.controlGrips.topCenter.visual,ue,Se),this.positionGrip(this.controlGrips.topRight.visual,Yt,Se),this.positionGrip(this.controlGrips.centerLeft.visual,ee,nt),this.positionGrip(this.controlGrips.centerRight.visual,Yt,nt),this.positionGrip(this.controlGrips.bottomLeft.visual,ee,Dt),this.positionGrip(this.controlGrips.bottomCenter.visual,ue,Dt),this.positionGrip(this.controlGrips.bottomRight.visual,Yt,Dt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ue,Se-3*this.CB_DISTANCE)},V.prototype.positionGrip=function(J,ee,Se){var ue=J.transform.baseVal.getItem(0);ue.setTranslate(ee,Se),J.transform.baseVal.replaceItem(ue,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:ge.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ge.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},ce.prototype.getState.call(this))},V.prototype.restoreState=function(J){ce.prototype.restoreState.call(this,J);var ee=J;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(ge.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,ee.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ge.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,ee.containerTransformMatrix))},V.prototype.scale=function(J,ee){ce.prototype.scale.call(this,J,ee);var Se=this.rotatePoint({x:this.left,y:this.top}),ue=this.unrotatePoint({x:Se.x*J,y:Se.y*ee});this.left=ue.x,this.top=ue.y,this.width=this.width*J,this.height=this.height*ee,this.adjustControlBox()},V}(le),_e=function(ce){function V(J,ee,Se){var ue=ce.call(this,J,ee,Se)||this;return ue.fillColor="transparent",ue.strokeColor="transparent",ue.strokeWidth=0,ue.strokeDasharray="",ue.opacity=1,ue.setStrokeColor=ue.setStrokeColor.bind(ue),ue.setFillColor=ue.setFillColor.bind(ue),ue.setStrokeWidth=ue.setStrokeWidth.bind(ue),ue.setStrokeDasharray=ue.setStrokeDasharray.bind(ue),ue.createVisual=ue.createVisual.bind(ue),ue}return te(V,ce),V.prototype.ownsTarget=function(J){return!(!ce.prototype.ownsTarget.call(this,J)&&J!==this.visual)},V.prototype.createVisual=function(){this.visual=me.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(J,ee){ce.prototype.pointerDown.call(this,J,ee),this.state==="new"&&(this.createVisual(),this.moveVisual(J),this._state="creating")},V.prototype.manipulate=function(J){ce.prototype.manipulate.call(this,J)},V.prototype.resize=function(J){ce.prototype.resize.call(this,J),this.setSize()},V.prototype.setSize=function(){ce.prototype.setSize.call(this),me.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},V.prototype.pointerUp=function(J){ce.prototype.pointerUp.call(this,J),this.setSize()},V.prototype.setStrokeColor=function(J){this.strokeColor=J,this.visual&&me.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(J),this.stateChanged()},V.prototype.setFillColor=function(J){this.fillColor=J,this.visual&&me.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},V.prototype.setStrokeWidth=function(J){this.strokeWidth=J,this.visual&&me.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},V.prototype.setStrokeDasharray=function(J){this.strokeDasharray=J,this.visual&&me.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},ce.prototype.getState.call(this))},V.prototype.restoreState=function(J){var ee=J;this.fillColor=ee.fillColor,this.strokeColor=ee.strokeColor,this.strokeWidth=ee.strokeWidth,this.strokeDasharray=ee.strokeDasharray,this.opacity=ee.opacity,this.createVisual(),ce.prototype.restoreState.call(this,J),this.setSize()},V.prototype.scale=function(J,ee){ce.prototype.scale.call(this,J,ee),this.setSize()},V.title="Rectangle marker",V}(De),Xe=function(ce){function V(J,ee,Se,ue){var nt=ce.call(this,J,ue||'<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 te(V,ce),V.prototype.getUi=function(){var J=this,ee=document.createElement("div");return ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2",this.widths.forEach(function(Se){var ue=document.createElement("div");ue.style.display="flex",ue.style.flexGrow="2",ue.style.alignItems="center",ue.style.justifyContent="space-between",ue.style.padding="5px",ue.style.borderWidth="2px",ue.style.borderStyle="solid",ue.style.borderColor=Se===J.currentWidth?J.uiStyleSettings.toolboxAccentColor:"transparent",ue.addEventListener("click",function(){J.setCurrentWidth(Se,ue)}),ee.appendChild(ue);var nt=document.createElement("div");nt.innerText=Se.toString(),nt.style.marginRight="5px",ue.appendChild(nt);var Dt=document.createElement("div");Dt.style.minHeight="20px",Dt.style.flexGrow="2",Dt.style.display="flex",Dt.style.alignItems="center";var Yt=document.createElement("hr");Yt.style.minWidth="20px",Yt.style.border="0px",Yt.style.borderTop=Se+"px solid "+J.uiStyleSettings.toolboxColor,Yt.style.flexGrow="2",Dt.appendChild(Yt),ue.appendChild(Dt),J.widthBoxes.push(ue)}),ee},V.prototype.setCurrentWidth=function(J,ee){var Se=this;this.currentWidth=J,this.widthBoxes.forEach(function(ue){ue.style.borderColor=ue===ee?Se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},V}(Y),tt=function(ce){function V(J,ee,Se,ue){var nt=ce.call(this,J,ue||'<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 te(V,ce),V.prototype.getUi=function(){var J=this,ee=document.createElement("div");return ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2",this.styles.forEach(function(Se){var ue=document.createElement("div");ue.style.display="flex",ue.style.alignItems="center",ue.style.justifyContent="space-between",ue.style.padding="5px",ue.style.borderWidth="2px",ue.style.borderStyle="solid",ue.style.overflow="hidden",ue.style.maxWidth=100/J.styles.length-5+"%",ue.style.borderColor=Se===J.currentStyle?J.uiStyleSettings.toolboxAccentColor:"transparent",ue.addEventListener("click",function(){J.setCurrentStyle(Se,ue)}),ee.appendChild(ue);var nt=document.createElement("div");nt.style.minHeight="20px",nt.style.flexGrow="2",nt.style.overflow="hidden";var Dt=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+J.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Se!==""?'stroke-dasharray="'+Se+'"':"")+` />
|
|
|
</svg>`;nt.innerHTML=Dt,ue.appendChild(nt),J.styleBoxes.push(ue)}),ee},V.prototype.setCurrentStyle=function(J,ee){var Se=this;this.currentStyle=J,this.styleBoxes.forEach(function(ue){ue.style.borderColor=ue===ee?Se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},V}(Y),ze=function(ce){function V(J,ee,Se){var ue=ce.call(this,J,ee,Se)||this;return ue.strokeColor=Se.defaultColor,ue.strokeWidth=Se.defaultStrokeWidth,ue.strokeDasharray=Se.defaultStrokeDasharray,ue.strokePanel=new oe("Line color",Se.defaultColorSet,Se.defaultColor),ue.strokePanel.onColorChanged=ue.setStrokeColor,ue.strokeWidthPanel=new Xe("Line width",Se.defaultStrokeWidths,Se.defaultStrokeWidth),ue.strokeWidthPanel.onWidthChanged=ue.setStrokeWidth,ue.strokeStylePanel=new tt("Line style",Se.defaultStrokeDasharrays,Se.defaultStrokeDasharray),ue.strokeStylePanel.onStyleChanged=ue.setStrokeDasharray,ue}return te(V,ce),Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var J=ce.prototype.getState.call(this);return J.typeName=V.typeName,J},V.typeName="FrameMarker",V.title="Frame marker",V.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',V}(_e),Me=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},Et=function(ce){function V(J,ee,Se){var ue=ce.call(this,J,ee,Se)||this;return ue.x1=0,ue.y1=0,ue.x2=0,ue.y2=0,ue.defaultLength=50,ue.manipulationStartX=0,ue.manipulationStartY=0,ue.manipulationStartX1=0,ue.manipulationStartY1=0,ue.manipulationStartX2=0,ue.manipulationStartY2=0,ue.setupControlBox(),ue}return te(V,ce),V.prototype.ownsTarget=function(J){return!!ce.prototype.ownsTarget.call(this,J)||!(!this.grip1.ownsTarget(J)&&!this.grip2.ownsTarget(J))},V.prototype.pointerDown=function(J,ee){ce.prototype.pointerDown.call(this,J,ee),this.manipulationStartX=J.x,this.manipulationStartY=J.y,this.state==="new"&&(this.x1=J.x,this.y1=J.y,this.x2=J.x,this.y2=J.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(J){var ee=this.state;ce.prototype.pointerUp.call(this,J),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(J),this._state="select",ee==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},V.prototype.adjustVisual=function(){},V.prototype.manipulate=function(J){this.state==="creating"?this.resize(J):this.state==="move"?(this.x1=this.manipulationStartX1+J.x-this.manipulationStartX,this.y1=this.manipulationStartY1+J.y-this.manipulationStartY,this.x2=this.manipulationStartX2+J.x-this.manipulationStartX,this.y2=this.manipulationStartY2+J.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(J)},V.prototype.resize=function(J){switch(this.activeGrip){case this.grip1:this.x1=J.x,this.y1=J.y;break;case this.grip2:case void 0:this.x2=J.x,this.y2=J.y}this.adjustVisual(),this.adjustControlBox()},V.prototype.select=function(){ce.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},V.prototype.deselect=function(){ce.prototype.deselect.call(this),this.controlBox.style.display="none"},V.prototype.setupControlBox=function(){this.controlBox=me.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 J=new Le;return J.visual.transform.baseVal.appendItem(me.createTransform()),this.controlBox.appendChild(J.visual),J},V.prototype.positionGrips=function(){var J=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-J/2,this.y1-J/2),this.positionGrip(this.grip2.visual,this.x2-J/2,this.y2-J/2)},V.prototype.positionGrip=function(J,ee,Se){var ue=J.transform.baseVal.getItem(0);ue.setTranslate(ee,Se),J.transform.baseVal.replaceItem(ue,0)},V.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},ce.prototype.getState.call(this))},V.prototype.restoreState=function(J){ce.prototype.restoreState.call(this,J);var ee=J;this.x1=ee.x1,this.y1=ee.y1,this.x2=ee.x2,this.y2=ee.y2},V.prototype.scale=function(J,ee){ce.prototype.scale.call(this,J,ee),this.x1=this.x1*J,this.y1=this.y1*ee,this.x2=this.x2*J,this.y2=this.y2*ee,this.adjustVisual(),this.adjustControlBox()},V}(le),Oe=function(ce){function V(J,ee,Se){var ue=ce.call(this,J,ee,Se)||this;return ue.strokeColor="transparent",ue.strokeWidth=0,ue.strokeDasharray="",ue.setStrokeColor=ue.setStrokeColor.bind(ue),ue.setStrokeWidth=ue.setStrokeWidth.bind(ue),ue.setStrokeDasharray=ue.setStrokeDasharray.bind(ue),ue.strokeColor=Se.defaultColor,ue.strokeWidth=Se.defaultStrokeWidth,ue.strokeDasharray=Se.defaultStrokeDasharray,ue.strokePanel=new oe("Line color",Se.defaultColorSet,Se.defaultColor),ue.strokePanel.onColorChanged=ue.setStrokeColor,ue.strokeWidthPanel=new Xe("Line width",Se.defaultStrokeWidths,Se.defaultStrokeWidth),ue.strokeWidthPanel.onWidthChanged=ue.setStrokeWidth,ue.strokeStylePanel=new tt("Line style",Se.defaultStrokeDasharrays,Se.defaultStrokeDasharray),ue.strokeStylePanel.onStyleChanged=ue.setStrokeDasharray,ue}return te(V,ce),V.prototype.ownsTarget=function(J){return!(!ce.prototype.ownsTarget.call(this,J)&&J!==this.visual&&J!==this.selectorLine&&J!==this.visibleLine)},V.prototype.createVisual=function(){this.visual=me.createGroup(),this.selectorLine=me.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=me.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(J,ee){ce.prototype.pointerDown.call(this,J,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()),me.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),me.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),me.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},V.prototype.setStrokeColor=function(J){this.strokeColor=J,this.adjustVisual(),this.colorChanged(J)},V.prototype.setStrokeWidth=function(J){this.strokeWidth=J,this.adjustVisual()},V.prototype.setStrokeDasharray=function(J){this.strokeDasharray=J,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 J=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},ce.prototype.getState.call(this));return J.typeName=V.typeName,J},V.prototype.restoreState=function(J){ce.prototype.restoreState.call(this,J);var ee=J;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}(Et),Ve=function(ce){function V(J,ee,Se,ue){var nt=ce.call(this,J,ue||'<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 te(V,ce),V.prototype.getUi=function(){var J=this,ee=document.createElement("div");return ee.style.overflow="hidden",ee.style.flexGrow="2",this.fonts.forEach(function(Se){var ue=document.createElement("div");ue.style.display="inline-block",ue.style.alignItems="center",ue.style.justifyContent="space-between",ue.style.padding="5px",ue.style.borderWidth="2px",ue.style.borderStyle="solid",ue.style.overflow="hidden",ue.style.maxWidth=100/J.fonts.length-5+"%",ue.style.borderColor=Se===J.currentFont?J.uiStyleSettings.toolboxAccentColor:"transparent",ue.addEventListener("click",function(){J.setCurrentFont(Se,ue)}),ee.appendChild(ue);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 Dt=document.createElement("div");Dt.style.whiteSpace="nowrap",Dt.style.overflow="hidden",Dt.style.textOverflow="ellipsis",Dt.innerHTML="The quick brown fox jumps over the lazy dog",nt.appendChild(Dt),ue.appendChild(nt),J.fontBoxes.push(ue)}),ee},V.prototype.setCurrentFont=function(J,ee){var Se=this;this.currentFont=J,this.fontBoxes.forEach(function(ue){ue.style.borderColor=ue===ee?Se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},V}(Y),Je=function(ce){function V(J,ee,Se){var ue=ce.call(this,J,ee,Se)||this;return ue.color="transparent",ue.padding=5,ue.DEFAULT_TEXT="your text here",ue.text=ue.DEFAULT_TEXT,ue.isMoved=!1,ue.color=Se.defaultColor,ue.fontFamily=Se.defaultFontFamily,ue.defaultSize={x:100,y:30},ue.setColor=ue.setColor.bind(ue),ue.setFont=ue.setFont.bind(ue),ue.renderText=ue.renderText.bind(ue),ue.sizeText=ue.sizeText.bind(ue),ue.textEditDivClicked=ue.textEditDivClicked.bind(ue),ue.showTextEditor=ue.showTextEditor.bind(ue),ue.setSize=ue.setSize.bind(ue),ue.positionTextEditor=ue.positionTextEditor.bind(ue),ue.colorPanel=new oe("Color",Se.defaultColorSet,Se.defaultColor),ue.colorPanel.onColorChanged=ue.setColor,ue.fontFamilyPanel=new Ve("Font",Se.defaultFontFamilies,Se.defaultFontFamily),ue.fontFamilyPanel.onFontChanged=ue.setFont,ue}return te(V,ce),V.prototype.ownsTarget=function(J){if(ce.prototype.ownsTarget.call(this,J)||J===this.visual||J===this.textElement||J===this.bgRectangle)return!0;var ee=!1;return this.textElement.childNodes.forEach(function(Se){Se===J&&(ee=!0)}),ee},V.prototype.createVisual=function(){this.visual=me.createGroup(),this.bgRectangle=me.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=me.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(me.createTransform()),this.textElement.transform.baseVal.appendItem(me.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},V.prototype.pointerDown=function(J,ee){ce.prototype.pointerDown.call(this,J,ee),this.isMoved=!1,this.pointerDownPoint=J,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(J),this._state="creating")},V.prototype.renderText=function(){var J=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){J.textElement.appendChild(me.createTSpan(ee.trim()===""?" ":ee.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},V.prototype.getTextScale=function(){var J=this.textElement.getBBox(),ee=1;if(J.width>0&&J.height>0){var Se=(1*this.width-this.width*this.padding*2/100)/J.width,ue=(1*this.height-this.height*this.padding*2/100)/J.height;ee=Math.min(Se,ue)}return ee},V.prototype.getTextPosition=function(J){var ee=this.textElement.getBBox(),Se=0,ue=0;return ee.width>0&&ee.height>0&&(Se=(this.width-ee.width*J)/2,ue=this.height/2-ee.height*J/2),{x:Se,y:ue}},V.prototype.sizeText=function(){var J=this.textElement.getBBox(),ee=this.getTextScale(),Se=this.getTextPosition(ee);Se.y-=J.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(J){ce.prototype.manipulate.call(this,J),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(J.x-this.pointerDownPoint.x)>5||Math.abs(J.y-this.pointerDownPoint.y)>5)},V.prototype.resize=function(J){ce.prototype.resize.call(this,J),this.isMoved=!0,this.setSize(),this.sizeText()},V.prototype.setSize=function(){ce.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(me.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),me.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},V.prototype.pointerUp=function(J){var ee=this.state;ee==="creating"&&(this._suppressMarkerCreateEvent=!0),ce.prototype.pointerUp.call(this,J),this.setSize(),(ee==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},V.prototype.showTextEditor=function(){var J=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(J.textEditor.style.fontSize);J.textEditor.clientWidth>=Number.parseInt(J.textEditor.style.maxWidth)&&ee>.9;)ee-=.1,J.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"),ue=window.getSelection();if(!ue.rangeCount)return!1;ue.deleteFromDocument(),ue.getRangeAt(0).insertNode(document.createTextNode(Se)),ee.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){J.textEditDivClicked(J.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 J=this.getTextScale(),ee=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Se=this.textElement.getBBox(),ue={x:Se.width*J,y:Se.height*J};ee.x-=ue.x/2,ee.y-=ue.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*J,12)+"px",this.textElement.style.display="none"}},V.prototype.textEditDivClicked=function(J){this.text=J.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},V.prototype.select=function(){ce.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},V.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),ce.prototype.deselect.call(this)},V.prototype.dblClick=function(J,ee){ce.prototype.dblClick.call(this,J,ee),this.showTextEditor()},V.prototype.setColor=function(J){this.textElement&&me.setAttributes(this.textElement,[["fill",J]]),this.color=J,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(J)},V.prototype.setFont=function(J){this.textElement&&me.setAttributes(this.textElement,[["font-family",J]]),this.fontFamily=J,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 J=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},ce.prototype.getState.call(this));return J.typeName=V.typeName,J},V.prototype.restoreState=function(J){var ee=J;this.color=ee.color,this.fontFamily=ee.fontFamily,this.padding=ee.padding,this.text=ee.text,this.createVisual(),ce.prototype.restoreState.call(this,J),this.setSize()},V.prototype.scale=function(J,ee){ce.prototype.scale.call(this,J,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}(De),Ye=function(ce){function V(J,ee,Se){var ue=ce.call(this,J,ee,Se)||this;return ue.color="transparent",ue.lineWidth=3,ue.drawing=!1,ue.pixelRatio=1,ue.color=Se.defaultColor,ue.lineWidth=Se.defaultStrokeWidth,ue.pixelRatio=Se.freehandPixelRatio,ue.setColor=ue.setColor.bind(ue),ue.addCanvas=ue.addCanvas.bind(ue),ue.finishCreation=ue.finishCreation.bind(ue),ue.setLineWidth=ue.setLineWidth.bind(ue),ue.colorPanel=new oe("Color",Se.defaultColorSet,Se.defaultColor),ue.colorPanel.onColorChanged=ue.setColor,ue.lineWidthPanel=new Xe("Line width",Se.defaultStrokeWidths,Se.defaultStrokeWidth),ue.lineWidthPanel.onWidthChanged=ue.setLineWidth,ue}return te(V,ce),V.prototype.ownsTarget=function(J){return!(!ce.prototype.ownsTarget.call(this,J)&&J!==this.visual&&J!==this.drawingImage)},V.prototype.createVisual=function(){this.visual=me.createGroup(),this.drawingImage=me.createImage(),this.visual.appendChild(this.drawingImage);var J=me.createTransform();this.visual.transform.baseVal.appendItem(J),this.addMarkerVisualToContainer(this.visual)},V.prototype.pointerDown=function(J,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(J.x,J.y),this.drawing=!0):ce.prototype.pointerDown.call(this,J,ee)},V.prototype.manipulate=function(J){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(J.x,J.y),this.canvasContext.stroke()):ce.prototype.manipulate.call(this,J)},V.prototype.resize=function(J){ce.prototype.resize.call(this,J),me.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),me.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},V.prototype.pointerUp=function(J){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):ce.prototype.pointerUp.call(this,J)},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(),ce.prototype.select.call(this)},V.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),ce.prototype.deselect.call(this)},V.prototype.finishCreation=function(){for(var J=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],ue=ee[1],nt=ee[2],Dt=ee[3],Yt=!1,an=0;an<this.canvasElement.height;an++)for(var Xt=0;Xt<this.canvasElement.width;Xt++)J.data[an*this.canvasElement.width*4+4*Xt+3]>0&&(Yt=!0,an<ue&&(ue=an),Xt<Se&&(Se=Xt),an>Dt&&(Dt=an),Xt>nt&&(nt=Xt));if(Yt){this.left=Se/this.pixelRatio,this.top=ue/this.pixelRatio,this.width=(nt-Se)/this.pixelRatio,this.height=(Dt-ue)/this.pixelRatio;var Rn=document.createElement("canvas");Rn.width=nt-Se,Rn.height=Dt-ue,Rn.getContext("2d").putImageData(this.canvasContext.getImageData(Se,ue,nt-Se,Dt-ue),0,0),this.drawingImgUrl=Rn.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},V.prototype.setDrawingImage=function(){me.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),me.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},V.prototype.setColor=function(J){this.color=J,this.colorChanged(J)},V.prototype.setLineWidth=function(J){this.lineWidth=J},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 J=Object.assign({drawingImgUrl:this.drawingImgUrl},ce.prototype.getState.call(this));return J.typeName=V.typeName,J},V.prototype.restoreState=function(J){this.createVisual(),ce.prototype.restoreState.call(this,J),this.drawingImgUrl=J.drawingImgUrl,this.setDrawingImage()},V.prototype.scale=function(J,ee){ce.prototype.scale.call(this,J,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}(De),Pe=function(ce){function V(J,ee,Se){var ue=ce.call(this,J,Se||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return ue.typeBoxes=[],ue.currentType=ee,ue.setCurrentType=ue.setCurrentType.bind(ue),ue}return te(V,ce),V.prototype.getUi=function(){var J=this,ee=document.createElement("div");ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2";for(var Se=function(Dt){var Yt="both";switch(Dt){case 0:Yt="both";break;case 1:Yt="start";break;case 2:Yt="end";break;case 3:Yt="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=Yt===ue.currentType?ue.uiStyleSettings.toolboxAccentColor:"transparent",an.addEventListener("click",function(){J.setCurrentType(Yt,an)}),ee.appendChild(an),Yt==="both"||Yt==="start"){var Xt=document.createElement("div");Xt.style.display="flex",Xt.style.alignItems="center",Xt.style.minHeight="20px",Xt.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="`+(ue.uiStyleSettings!==void 0?ue.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Xt.style.marginLeft="5px",an.appendChild(Xt)}var Rn=document.createElement("div");Rn.style.display="flex",Rn.style.alignItems="center",Rn.style.minHeight="20px",Rn.style.flexGrow="2";var Kn=document.createElement("hr");if(Kn.style.minWidth="20px",Kn.style.border="0px",Kn.style.borderTop="3px solid "+(ue.uiStyleSettings!==void 0?ue.uiStyleSettings.toolboxColor:"#eeeeee"),Kn.style.flexGrow="2",Rn.appendChild(Kn),an.appendChild(Rn),Yt==="both"||Yt==="end"){var ar=document.createElement("div");ar.style.display="flex",ar.style.alignItems="center",ar.style.minHeight="20px",ar.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="`+(ue.uiStyleSettings!==void 0?ue.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,ar.style.marginRight="5px",an.appendChild(ar)}ue.typeBoxes.push(an)},ue=this,nt=0;nt<4;nt++)Se(nt);return ee},V.prototype.setCurrentType=function(J,ee){var Se=this;this.currentType=J,this.typeBoxes.forEach(function(ue){ue.style.borderColor=ue===ee?Se.uiStyleSettings!==void 0?Se.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},V}(Y),He=function(ce){function V(J,ee,Se){var ue=ce.call(this,J,ee,Se)||this;return ue.arrowType="end",ue.arrowBaseHeight=10,ue.arrowBaseWidth=10,ue.getArrowPoints=ue.getArrowPoints.bind(ue),ue.setArrowType=ue.setArrowType.bind(ue),ue.arrowTypePanel=new Pe("Arrow type","end"),ue.arrowTypePanel.onArrowTypeChanged=ue.setArrowType,ue}return te(V,ce),V.prototype.ownsTarget=function(J){return!(!ce.prototype.ownsTarget.call(this,J)&&J!==this.arrow1&&J!==this.arrow2)},V.prototype.getArrowPoints=function(J,ee){var Se=this.arrowBaseWidth+2*this.strokeWidth,ue=this.arrowBaseHeight+2*this.strokeWidth;return J-Se/2+","+(ee+ue/2)+" "+J+","+(ee-ue/2)+" "+(J+Se/2)+","+(ee+ue/2)},V.prototype.createTips=function(){this.arrow1=me.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(me.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=me.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(me.createTransform()),this.visual.appendChild(this.arrow2)},V.prototype.pointerDown=function(J,ee){ce.prototype.pointerDown.call(this,J,ee),this.state==="creating"&&this.createTips()},V.prototype.adjustVisual=function(){if(ce.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",me.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),me.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var J=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(J,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(ee,0);var Se=this.arrow2.transform.baseVal.getItem(0);Se.setRotate(J+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Se,0)}},V.prototype.setArrowType=function(J){this.arrowType=J,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 J=Object.assign({arrowType:this.arrowType},ce.prototype.getState.call(this));return J.typeName=V.typeName,J},V.prototype.restoreState=function(J){ce.prototype.restoreState.call(this,J);var ee=J;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}(Oe),ve=function(ce){function V(J,ee,Se){var ue=ce.call(this,J,ee,Se)||this;return ue.fillColor=Se.defaultFillColor,ue.strokeWidth=0,ue.fillPanel=new oe("Color",Se.defaultColorSet,Se.defaultFillColor),ue.fillPanel.onColorChanged=ue.setFillColor,ue}return te(V,ce),Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var J=ce.prototype.getState.call(this);return J.typeName=V.typeName,J},V.typeName="CoverMarker",V.title="Cover marker",V.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',V}(_e),xe=function(ce){function V(J,ee,Se,ue){var nt=ce.call(this,J,ue||'<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 te(V,ce),V.prototype.getUi=function(){var J=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 ue=document.createElement("div");ue.style.display="flex",ue.style.alignItems="center",ue.style.justifyContent="center",ue.style.padding="5px",ue.style.borderWidth="2px",ue.style.borderStyle="solid",ue.style.borderColor=Se===J.currentOpacity?J.uiStyleSettings.toolboxAccentColor:"transparent",ue.addEventListener("click",function(){J.setCurrentOpacity(Se,ue)}),ee.appendChild(ue);var nt=document.createElement("div");nt.innerText=100*Se+"%",ue.appendChild(nt),J.opacityBoxes.push(ue)}),ee},V.prototype.setCurrentOpacity=function(J,ee){var Se=this;this.currentOpacity=J,this.opacityBoxes.forEach(function(ue){ue.style.borderColor=ue===ee?Se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},V}(Y),de=function(ce){function V(J,ee,Se){var ue=ce.call(this,J,ee,Se)||this;return ue.setOpacity=ue.setOpacity.bind(ue),ue.fillColor=Se.defaultHighlightColor,ue.strokeWidth=0,ue.opacity=Se.defaultHighlightOpacity,ue.fillPanel=new oe("Color",Se.defaultColorSet,ue.fillColor),ue.fillPanel.onColorChanged=ue.setFillColor,ue.opacityPanel=new xe("Opacity",Se.defaultOpacitySteps,ue.opacity),ue.opacityPanel.onOpacityChanged=ue.setOpacity,ue}return te(V,ce),V.prototype.setOpacity=function(J){this.opacity=J,this.visual&&me.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 J=ce.prototype.getState.call(this);return J.typeName=V.typeName,J},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}(ve),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(ce){function V(J,ee,Se){var ue=ce.call(this,J,ee,Se)||this;return ue.bgColor="transparent",ue.tipPosition={x:0,y:0},ue.tipBase1Position={x:0,y:0},ue.tipBase2Position={x:0,y:0},ue.tipMoving=!1,ue.color=Se.defaultStrokeColor,ue.bgColor=Se.defaultFillColor,ue.fontFamily=Se.defaultFontFamily,ue.defaultSize={x:100,y:30},ue.setBgColor=ue.setBgColor.bind(ue),ue.getTipPoints=ue.getTipPoints.bind(ue),ue.positionTip=ue.positionTip.bind(ue),ue.setTipPoints=ue.setTipPoints.bind(ue),ue.colorPanel=new oe("Text color",Se.defaultColorSet,ue.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>'),ue.colorPanel.onColorChanged=ue.setColor,ue.bgColorPanel=new oe("Fill color",Se.defaultColorSet,ue.bgColor,je),ue.bgColorPanel.onColorChanged=ue.setBgColor,ue.fontFamilyPanel=new Ve("Font",Se.defaultFontFamilies,Se.defaultFontFamily),ue.fontFamilyPanel.onFontChanged=ue.setFont,ue.tipGrip=new Le,ue.tipGrip.visual.transform.baseVal.appendItem(me.createTransform()),ue.controlBox.appendChild(ue.tipGrip.visual),ue}return te(V,ce),V.prototype.ownsTarget=function(J){return ce.prototype.ownsTarget.call(this,J)||this.tipGrip.ownsTarget(J)||this.tip===J},V.prototype.createTip=function(){me.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=me.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},V.prototype.pointerDown=function(J,ee){this.state==="new"&&ce.prototype.pointerDown.call(this,J,ee),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(ee)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):ce.prototype.pointerDown.call(this,J,ee)},V.prototype.pointerUp=function(J){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,ce.prototype.pointerUp.call(this,J);else{var ee=this.state==="creating";ce.prototype.pointerUp.call(this,J),this.setTipPoints(ee),this.positionTip()}},V.prototype.manipulate=function(J){if(this.tipMoving){var ee=this.unrotatePoint(J);this.tipPosition={x:ee.x-this.manipulationStartLeft,y:ee.y-this.manipulationStartTop},this.positionTip()}else ce.prototype.manipulate.call(this,J)},V.prototype.setBgColor=function(J){this.bgRectangle&&this.tip&&(me.setAttributes(this.bgRectangle,[["fill",J]]),me.setAttributes(this.tip,[["fill",J]])),this.bgColor=J,this.fillColorChanged(J)},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(J){J===void 0&&(J=!1);var ee=Math.min(this.height/2,15),Se=this.height/5;J&&(this.tipPosition={x:ee+Se/2,y:this.height+20});var ue=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?ue<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?ue<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?ue<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}):ue<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(J){ce.prototype.resize.call(this,J),this.positionTip()},V.prototype.positionTip=function(){me.setAttributes(this.tip,[["points",this.getTipPoints()]]);var J=this.tipGrip.visual.transform.baseVal.getItem(0);J.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(J,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(),ce.prototype.select.call(this)},V.prototype.getState=function(){var J=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},ce.prototype.getState.call(this));return J.typeName=V.typeName,J},V.prototype.restoreState=function(J){var ee=J;this.bgColor=ee.bgColor,this.tipPosition=ee.tipPosition,ce.prototype.restoreState.call(this,J),this.createTip(),this.setTipPoints()},V.prototype.scale=function(J,ee){ce.prototype.scale.call(this,J,ee),this.tipPosition={x:this.tipPosition.x*J,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}(Je),ne=function(ce){function V(J,ee,Se){var ue=ce.call(this,J,ee,Se)||this;return ue.fillColor="transparent",ue.strokeColor="transparent",ue.strokeWidth=0,ue.strokeDasharray="",ue.opacity=1,ue.strokeColor=Se.defaultColor,ue.strokeWidth=Se.defaultStrokeWidth,ue.strokeDasharray=Se.defaultStrokeDasharray,ue.fillColor=Se.defaultFillColor,ue.setStrokeColor=ue.setStrokeColor.bind(ue),ue.setFillColor=ue.setFillColor.bind(ue),ue.setStrokeWidth=ue.setStrokeWidth.bind(ue),ue.setStrokeDasharray=ue.setStrokeDasharray.bind(ue),ue.setOpacity=ue.setOpacity.bind(ue),ue.createVisual=ue.createVisual.bind(ue),ue.strokePanel=new oe("Line color",pe(Se.defaultColorSet,["transparent"]),Se.defaultColor),ue.strokePanel.onColorChanged=ue.setStrokeColor,ue.fillPanel=new oe("Fill color",pe(Se.defaultColorSet,["transparent"]),ue.fillColor,je),ue.fillPanel.onColorChanged=ue.setFillColor,ue.strokeWidthPanel=new Xe("Line width",Se.defaultStrokeWidths,Se.defaultStrokeWidth),ue.strokeWidthPanel.onWidthChanged=ue.setStrokeWidth,ue.strokeStylePanel=new tt("Line style",Se.defaultStrokeDasharrays,Se.defaultStrokeDasharray),ue.strokeStylePanel.onStyleChanged=ue.setStrokeDasharray,ue.opacityPanel=new xe("Opacity",Se.defaultOpacitySteps,ue.opacity),ue.opacityPanel.onOpacityChanged=ue.setOpacity,ue}return te(V,ce),V.prototype.ownsTarget=function(J){return!(!ce.prototype.ownsTarget.call(this,J)&&J!==this.visual)},V.prototype.createVisual=function(){this.visual=me.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(J,ee){ce.prototype.pointerDown.call(this,J,ee),this.state==="new"&&(this.createVisual(),this.moveVisual(J),this._state="creating")},V.prototype.manipulate=function(J){ce.prototype.manipulate.call(this,J)},V.prototype.resize=function(J){ce.prototype.resize.call(this,J),this.setSize()},V.prototype.setSize=function(){ce.prototype.setSize.call(this),me.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(J){ce.prototype.pointerUp.call(this,J),this.setSize()},V.prototype.setStrokeColor=function(J){this.strokeColor=J,this.visual&&me.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(J),this.stateChanged()},V.prototype.setFillColor=function(J){this.fillColor=J,this.visual&&me.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(J),this.stateChanged()},V.prototype.setStrokeWidth=function(J){this.strokeWidth=J,this.visual&&me.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},V.prototype.setStrokeDasharray=function(J){this.strokeDasharray=J,this.visual&&me.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},V.prototype.setOpacity=function(J){this.opacity=J,this.visual&&me.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 J=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ce.prototype.getState.call(this));return J.typeName=V.typeName,J},V.prototype.restoreState=function(J){var ee=J;this.fillColor=ee.fillColor,this.strokeColor=ee.strokeColor,this.strokeWidth=ee.strokeWidth,this.strokeDasharray=ee.strokeDasharray,this.opacity=ee.opacity,this.createVisual(),ce.prototype.restoreState.call(this,J),this.setSize()},V.prototype.scale=function(J,ee){ce.prototype.scale.call(this,J,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}(De),Ze=function(ce){function V(J,ee,Se){return ce.call(this,J,ee,Se)||this}return te(V,ce),Object.defineProperty(V.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),V.prototype.ownsTarget=function(J){return!(!ce.prototype.ownsTarget.call(this,J)&&J!==this.tip1&&J!==this.tip2)},V.prototype.createTips=function(){this.tip1=me.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(me.createTransform()),this.visual.appendChild(this.tip1),this.tip2=me.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(me.createTransform()),this.visual.appendChild(this.tip2)},V.prototype.pointerDown=function(J,ee){ce.prototype.pointerDown.call(this,J,ee),this.state==="creating"&&this.createTips()},V.prototype.adjustVisual=function(){if(ce.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(me.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()]]),me.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 J=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(J,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(ee,0);var Se=this.tip2.transform.baseVal.getItem(0);Se.setRotate(J+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 J=ce.prototype.getState.call(this);return J.typeName=V.typeName,J},V.prototype.restoreState=function(J){ce.prototype.restoreState.call(this,J),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}(Oe),lt=function(ce){function V(J,ee,Se){var ue=ce.call(this,J,ee,Se)||this;return ue.strokePanel.colors=Se.defaultColorSet,ue.fillColor="transparent",ue}return te(V,ce),Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var J=ce.prototype.getState.call(this);return J.typeName=V.typeName,J},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}(ne),Be=function(){function ce(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(ce.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),ce.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))},ce.prototype.replaceLastUndoStep=function(V){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=V)},ce.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},ce.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}},ce.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},ce}(),$e=function(ce){function V(J,ee,Se){var ue=ce.call(this,J,ee,Se)||this;return ue.strokeColor="transparent",ue.strokeWidth=0,ue.strokeDasharray="",ue.curveX=0,ue.curveY=0,ue.manipulationStartCurveX=0,ue.manipulationStartCurveY=0,ue.setStrokeColor=ue.setStrokeColor.bind(ue),ue.setStrokeWidth=ue.setStrokeWidth.bind(ue),ue.setStrokeDasharray=ue.setStrokeDasharray.bind(ue),ue.positionGrips=ue.positionGrips.bind(ue),ue.addControlGrips=ue.addControlGrips.bind(ue),ue.adjustVisual=ue.adjustVisual.bind(ue),ue.setupControlBox=ue.setupControlBox.bind(ue),ue.resize=ue.resize.bind(ue),ue.strokeColor=Se.defaultColor,ue.strokeWidth=Se.defaultStrokeWidth,ue.strokeDasharray=Se.defaultStrokeDasharray,ue.strokePanel=new oe("Line color",Se.defaultColorSet,Se.defaultColor),ue.strokePanel.onColorChanged=ue.setStrokeColor,ue.strokeWidthPanel=new Xe("Line width",Se.defaultStrokeWidths,Se.defaultStrokeWidth),ue.strokeWidthPanel.onWidthChanged=ue.setStrokeWidth,ue.strokeStylePanel=new tt("Line style",Se.defaultStrokeDasharrays,Se.defaultStrokeDasharray),ue.strokeStylePanel.onStyleChanged=ue.setStrokeDasharray,ue}return te(V,ce),V.prototype.ownsTarget=function(J){return!(!ce.prototype.ownsTarget.call(this,J)&&J!==this.visual&&J!==this.selectorCurve&&J!==this.visibleCurve&&!this.curveGrip.ownsTarget(J))},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=me.createGroup(),this.selectorCurve=me.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=me.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(J,ee){ce.prototype.pointerDown.call(this,J,ee),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=J.x,this.curveY=J.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()),me.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),me.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),me.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},V.prototype.setupControlBox=function(){ce.prototype.setupControlBox.call(this),this.curveControlLine1=me.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=me.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,ce.prototype.addControlGrips.call(this)},V.prototype.positionGrips=function(){ce.prototype.positionGrips.call(this);var J=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-J/2,this.curveY-J/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(J){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+J.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+J.y-this.manipulationStartY),ce.prototype.manipulate.call(this,J)},V.prototype.resize=function(J){this.activeGrip===this.curveGrip&&(this.curveX=J.x,this.curveY=J.y),ce.prototype.resize.call(this,J),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(J){this.strokeColor=J,this.adjustVisual(),this.colorChanged(J)},V.prototype.setStrokeWidth=function(J){this.strokeWidth=J,this.adjustVisual()},V.prototype.setStrokeDasharray=function(J){this.strokeDasharray=J,this.adjustVisual()},V.prototype.scale=function(J,ee){this.curveX=this.curveX*J,this.curveY=this.curveY*ee,ce.prototype.scale.call(this,J,ee)},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var J=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},ce.prototype.getState.call(this));return J.typeName=V.typeName,J},V.prototype.restoreState=function(J){ce.prototype.restoreState.call(this,J);var ee=J;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}(Et),rt=function(){function ce(V,J){J===void 0&&(J=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=V,this.cancelable=J}return Object.defineProperty(ce.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),ce.prototype.preventDefault=function(){this._defaultPrevented=!0},ce}(),xt=function(ce){function V(J,ee,Se){var ue=ce.call(this,J,!1)||this;return ue.dataUrl=ee,ue.state=Se,ue}return te(V,ce),V}(rt),ft=function(ce){function V(J,ee,Se){Se===void 0&&(Se=!1);var ue=ce.call(this,J,Se)||this;return ue.marker=ee,ue}return te(V,ce),V}(rt),st=function(){function ce(){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 ce.prototype.addEventListener=function(V,J){this[V].push(J)},ce.prototype.removeEventListener=function(V,J){var ee=this[V].indexOf(J);ee>-1&&this[V].splice(ee,1)},ce}(),Ne=function(){function ce(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 Me,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=ce.instanceCounter++,this.styles=new fe(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(ce.prototype,"ALL_MARKER_TYPES",{get:function(){return[ze,Ye,He,Je,lt,ne,de,Qe,Ze,ve,Oe,$e]},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[ze,Ye,He,Je,ne,de,Qe]},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"BASIC_MARKER_TYPES",{get:function(){return[ze,Ye,He,Je,de]},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(V){var J=this;this._availableMarkerTypes.splice(0),V.forEach(function(ee){if(typeof ee=="string"){var Se=J.ALL_MARKER_TYPES.find(function(ue){return ue.typeName===ee});Se!==void 0&&J._availableMarkerTypes.push(Se)}else J._availableMarkerTypes.push(ee)})},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ce.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(ce.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),ce.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},ce.prototype.show=function(){var V=this;this.styles.styleSheetRoot===void 0&&ae.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=ae.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(J){return J(new rt(V))})},ce.prototype.render=function(){return Re(this,void 0,void 0,function(){var V;return Te(this,function(J){switch(J.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 J.sent(),[4,V.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,J.sent()]}})})},ce.prototype.close=function(V){var J=this;if(V===void 0&&(V=!1),this.isOpen){var ee=!1;V||this.eventListeners.beforeclose.forEach(function(Se){var ue=new rt(J,!0);Se(ue),ue.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 rt(J))}),this.detachEvents(),this._isOpen=!1)}},ce.prototype.addMarkersToToolbar=function(){for(var V,J=[],ee=0;ee<arguments.length;ee++)J[ee]=arguments[ee];(V=this._availableMarkerTypes).push.apply(V,J)},ce.prototype.addRenderEventListener=function(V){this.addEventListener("render",function(J){V(J.dataUrl,J.state)})},ce.prototype.removeRenderEventListener=function(V){},ce.prototype.addCloseEventListener=function(V){this.addEventListener("close",function(){V()})},ce.prototype.removeCloseEventListener=function(V){},ce.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))},ce.prototype.onPopupTargetResize=function(){var V=1*this.target.clientWidth/this.target.clientHeight,J=this.editorCanvas.clientWidth/V>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*V:this.editorCanvas.clientWidth,ee=J<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/V;this.resize(J,ee)},ce.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},ce.prototype.resize=function(V,J){this._isResizing=!0;var ee=V/this.imageWidth,Se=J/this.imageHeight;this.imageWidth=Math.round(V),this.imageHeight=Math.round(J),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},ce.prototype.scaleMarkers=function(V,J){var ee,Se=this;this._currentMarker&&this._currentMarker instanceof Je?this._currentMarker.scale(V,J):(ee=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(ue){ue!==Se._currentMarker&&ue.scale(V,J)}),ee!==void 0&&this.setCurrentMarker(ee)},ce.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"},ce.prototype.setTopLeft=function(){var V=this.editingTarget.getBoundingClientRect(),J=this.editorCanvas.getBoundingClientRect();this.left=V.left-J.left,this.top=V.top-J.top},ce.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)},ce.prototype.addDefs=function(){for(var V,J=[],ee=0;ee<arguments.length;ee++)J[ee]=arguments[ee];this.defs=me.createDefs(),this.addDefsToImage(),(V=this.defs).append.apply(V,J)},ce.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},ce.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)},ce.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},ce.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},ce.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)},ce.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},ce.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)},ce.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()},ce.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")},ce.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"},ce.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ce.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 q(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 Q(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},ce.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ce.prototype.removeMarker=function(V){this.markerImage.removeChild(V.container),this.markers.indexOf(V)>-1&&this.markers.splice(this.markers.indexOf(V),1),V.dispose()},ce.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())},ce.prototype.toolbarButtonClicked=function(V,J){if(V==="marker"&&J!==void 0)this.createNewMarker(J);else if(V==="action")switch(J){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()}},ce.prototype.deleteSelectedMarker=function(){var V=this;if(this._currentMarker!==void 0){var J=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Se){var ue=new ft(V,V._currentMarker,!0);Se(ue),ue.defaultPrevented&&(J=!0)}),!J){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))})}}},ce.prototype.clear=function(){var V=this,J=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(nt){var Dt=new ft(V,void 0,!0);nt(Dt),Dt.defaultPrevented&&(J=!0)}),!J)){this.setCurrentMarker();for(var ee=function(nt){var Dt=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(Yt){return Yt(new ft(V,Dt))})},Se=this,ue=this.markers.length-1;ue>=0;ue--)ee(ue);this.addUndoStep()}},Object.defineProperty(ce.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),ce.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))},ce.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)},ce.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},ce.prototype.addUndoStep=function(){var V=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var J=this.getState(),ee=this.undoRedoManager.getLastUndoStep();if(!ee||ee.width===J.width&&ee.height===J.height){var Se=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(J),Se<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(ue){return ue(new rt(V))})}else this.undoRedoManager.replaceLastUndoStep(J),this.eventListeners.statechange.forEach(function(ue){return ue(new rt(V))})}},ce.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},ce.prototype.undoStep=function(){var V=this,J=this.undoRedoManager.undo();J!==void 0&&(this.restoreState(J),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(ee){return ee(new rt(V))}))},ce.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},ce.prototype.redoStep=function(){var V=this,J=this.undoRedoManager.redo();J!==void 0&&(this.restoreState(J),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(ee){return ee(new rt(V))}))},ce.prototype.stepZoom=function(){var V=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=V<this.zoomSteps.length-1?this.zoomSteps[V+1]:this.zoomSteps[0]},ce.prototype.panTo=function(V){this.contentDiv.scrollBy({left:this.prevPanPoint.x-V.x,top:this.prevPanPoint.y-V.y}),this.prevPanPoint=V},ce.prototype.startRenderAndClose=function(){return Re(this,void 0,void 0,function(){var V,J,ee=this;return Te(this,function(Se){switch(Se.label){case 0:return[4,this.render()];case 1:return V=Se.sent(),J=this.getState(),this.eventListeners.render.forEach(function(ue){return ue(new xt(ee,V,J))}),this.close(!0),[2]}})})},ce.prototype.getState=function(V){V===!0&&this.setCurrentMarker();var J={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(ee){return J.markers.push(ee.getState())}),J},ce.prototype.restoreState=function(V){var J=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);V.markers.forEach(function(ee){var Se=J._availableMarkerTypes.find(function(nt){return nt.typeName===ee.typeName});if(Se!==void 0){var ue=J.addNewMarker(Se);ue.restoreState(ee),J.markers.push(ue)}}),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 rt(J))})},ce.prototype.addNewMarker=function(V){var J=me.createGroup();return this.markerImage.appendChild(J),new V(J,this.overlayContainer,this.settings)},ce.prototype.createNewMarker=function(V){var J,ee=this;(J=typeof V=="string"?this._availableMarkerTypes.find(function(Se){return Se.typeName===V}):V)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(J),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(J.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Se){return Se(new ft(ee,ee._currentMarker))}))},ce.prototype.markerCreated=function(V){var J=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(J,J._currentMarker))})},ce.prototype.colorChanged=function(V){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=V,this.settings.defaultStrokeColor=V)},ce.prototype.fillColorChanged=function(V){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=V)},ce.prototype.markerStateChanged=function(V){var J=this;this.eventListeners.markerchange.forEach(function(ee){return ee(new ft(J,V))})},ce.prototype.setCurrentMarker=function(V){var J=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(J,J._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(J,J._currentMarker))}))},ce.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 J=this.markers.find(function(ee){return ee.ownsTarget(V.target)});J!==void 0?(this.setCurrentMarker(J),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))},ce.prototype.onDblClick=function(V){if(this._isFocused||this.focus(),this.mode==="select"){var J=this.markers.find(function(ee){return ee.ownsTarget(V.target)});J!==void 0&&J!==this._currentMarker&&this.setCurrentMarker(J),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(V.clientX,V.clientY),V.target):this.setCurrentMarker()}},ce.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}))},ce.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()},ce.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},ce.prototype.onKeyUp=function(V){this._currentMarker===void 0||this.notesArea!==void 0||V.key!=="Delete"&&V.key!=="Backspace"||this.deleteSelectedMarker()},ce.prototype.clientToLocalCoordinates=function(V,J){var ee=this.markerImage.getBoundingClientRect();return{x:(V-ee.left)/this.zoomLevel,y:(J-ee.top)/this.zoomLevel}},ce.prototype.onWindowResize=function(){this.positionUI()},ce.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()},ce.prototype.addLicenseKey=function(V){se.addKey(V)},ce.prototype.addEventListener=function(V,J){this.eventListeners.addEventListener(V,J)},ce.prototype.removeEventListener=function(V,J){this.eventListeners.removeEventListener(V,J)},ce.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(ce.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),ce.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(J){return J(new rt(V))}))},ce.prototype.blur=function(){var V=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(J){return J(new rt(V))}))},ce.instanceCounter=0,ce}();/* **********************************
|
|
|
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 Ge=function(ce,V){return(Ge=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,ee){J.__proto__=ee}||function(J,ee){for(var Se in ee)Object.prototype.hasOwnProperty.call(ee,Se)&&(J[Se]=ee[Se])})(ce,V)};function yt(ce,V){if(typeof V!="function"&&V!==null)throw new TypeError("Class extends value "+String(V)+" is not a constructor or null");function J(){this.constructor=ce}Ge(ce,V),ce.prototype=V===null?Object.create(V):(J.prototype=V.prototype,new J)}function pt(ce,V,J,ee){return new(J||(J=Promise))(function(Se,ue){function nt(an){try{Yt(ee.next(an))}catch(Xt){ue(Xt)}}function Dt(an){try{Yt(ee.throw(an))}catch(Xt){ue(Xt)}}function Yt(an){var Xt;an.done?Se(an.value):(Xt=an.value,Xt instanceof J?Xt:new J(function(Rn){Rn(Xt)})).then(nt,Dt)}Yt((ee=ee.apply(ce,V||[])).next())})}function jt(ce,V){var J,ee,Se,ue,nt={label:0,sent:function(){if(1&Se[0])throw Se[1];return Se[1]},trys:[],ops:[]};return ue={next:Dt(0),throw:Dt(1),return:Dt(2)},typeof Symbol=="function"&&(ue[Symbol.iterator]=function(){return this}),ue;function Dt(Yt){return function(an){return function(Xt){if(J)throw new TypeError("Generator is already executing.");for(;nt;)try{if(J=1,ee&&(Se=2&Xt[0]?ee.return:Xt[0]?ee.throw||((Se=ee.return)&&Se.call(ee),0):ee.next)&&!(Se=Se.call(ee,Xt[1])).done)return Se;switch(ee=0,Se&&(Xt=[2&Xt[0],Se.value]),Xt[0]){case 0:case 1:Se=Xt;break;case 4:return nt.label++,{value:Xt[1],done:!1};case 5:nt.label++,ee=Xt[1],Xt=[0];continue;case 7:Xt=nt.ops.pop(),nt.trys.pop();continue;default:if(!(Se=nt.trys,(Se=Se.length>0&&Se[Se.length-1])||Xt[0]!==6&&Xt[0]!==2)){nt=0;continue}if(Xt[0]===3&&(!Se||Xt[1]>Se[0]&&Xt[1]<Se[3])){nt.label=Xt[1];break}if(Xt[0]===6&&nt.label<Se[1]){nt.label=Se[1],Se=Xt;break}if(Se&&nt.label<Se[2]){nt.label=Se[2],nt.ops.push(Xt);break}Se[2]&&nt.ops.pop(),nt.trys.pop();continue}Xt=V.call(ce,nt)}catch(Rn){Xt=[6,Rn],ee=0}finally{J=Se=0}if(5&Xt[0])throw Xt[1];return{value:Xt[0]?Xt[1]:void 0,done:!0}}([Yt,an])}}}var Bt=function(){function ce(){}return ce.addKey=function(V){ce.key=V},Object.defineProperty(ce,"isLicensed",{get:function(){return!!ce.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(ce.key)},enumerable:!1,configurable:!0}),ce}(),gt=function(){function ce(){}return ce.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},ce.setAttributes=function(V,J){for(var ee=0,Se=J;ee<Se.length;ee++){var ue=Se[ee],nt=ue[0],Dt=ue[1];V.setAttribute(nt,Dt)}},ce.createRect=function(V,J,ee){var Se=document.createElementNS("http://www.w3.org/2000/svg","rect");return Se.setAttribute("width",V.toString()),Se.setAttribute("height",J.toString()),ee&&ce.setAttributes(Se,ee),Se},ce.createLine=function(V,J,ee,Se,ue){var nt=document.createElementNS("http://www.w3.org/2000/svg","line");return nt.setAttribute("x1",V.toString()),nt.setAttribute("y1",J.toString()),nt.setAttribute("x2",ee.toString()),nt.setAttribute("y2",Se.toString()),ue&&ce.setAttributes(nt,ue),nt},ce.createPolygon=function(V,J){var ee=document.createElementNS("http://www.w3.org/2000/svg","polygon");return ee.setAttribute("points",V),J&&ce.setAttributes(ee,J),ee},ce.createCircle=function(V,J){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()),J&&ce.setAttributes(ee,J),ee},ce.createEllipse=function(V,J,ee){var Se=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Se.setAttribute("cx",(V/2).toString()),Se.setAttribute("cy",(J/2).toString()),Se.setAttribute("rx",(V/2).toString()),Se.setAttribute("ry",(J/2).toString()),ee&&ce.setAttributes(Se,ee),Se},ce.createGroup=function(V){var J=document.createElementNS("http://www.w3.org/2000/svg","g");return V&&ce.setAttributes(J,V),J},ce.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},ce.createMarker=function(V,J,ee,Se,ue,nt,Dt){var Yt=document.createElementNS("http://www.w3.org/2000/svg","marker");return ce.setAttributes(Yt,[["id",V],["orient",J],["markerWidth",ee.toString()],["markerHeight",Se.toString()],["refX",ue.toString()],["refY",nt.toString()]]),Yt.appendChild(Dt),Yt},ce.createText=function(V){var J=document.createElementNS("http://www.w3.org/2000/svg","text");return J.setAttribute("x","0"),J.setAttribute("y","0"),V&&ce.setAttributes(J,V),J},ce.createTSpan=function(V,J){var ee=document.createElementNS("http://www.w3.org/2000/svg","tspan");return ee.textContent=V,J&&ce.setAttributes(ee,J),ee},ce.createImage=function(V){var J=document.createElementNS("http://www.w3.org/2000/svg","image");return V&&ce.setAttributes(J,V),J},ce.createPoint=function(V,J){var ee=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return ee.x=V,ee.y=J,ee},ce.createPath=function(V,J){var ee=document.createElementNS("http://www.w3.org/2000/svg","path");return ee.setAttribute("d",V),J&&ce.setAttributes(ee,J),ee},ce.createElement=function(V,J){var ee=document.createElementNS("http://www.w3.org/2000/svg",V);return J&&ce.setAttributes(ee,J),ee},ce.getHollowRectanglePath=function(V,J,ee,Se,ue,nt,Dt,Yt){return"M"+V+","+J+"V"+(J+Se)+"H"+(V+ee)+"V"+J+"H"+ue+"V"+nt+"H"+(ue+Dt)+"V"+(nt+Yt)+"H"+ue+"V"+J+"Z"},ce}(),Ht=function(){function ce(V){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+V+"_"}return Object.defineProperty(ce.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(ce.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(ce.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),ce.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},ce.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)},ce.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 Ut("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Ut("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new Ut("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new Nt("_fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new Nt("_fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},ce.prototype.removeStyleSheet=function(){var V;this.styleSheet&&(((V=this.styleSheetRoot)!==null&&V!==void 0?V:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},ce}(),Ut=function(ce,V){this.selector=ce,this.style=V},Nt=function(ce,V){this.localName=ce,this.style=V},Wt=function(){function ce(){this.blocks=[],this.display=""}return ce.prototype.addButtonBlock=function(V){V.className=this.blockClassName,V.buttonClassName=this.buttonClassName,V.buttonColorsClassName=this.buttonColorsClassName,V.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(V)},ce.prototype.addElementBlock=function(V){V.className===void 0&&(V.className=this.blockClassName),this.blocks.push(V)},ce.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(J){return V.appendChild(J.getUI())}),V},ce}(),Qt=function(){function ce(){}return ce.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},ce}(),pn=function(ce){function V(){var J=ce!==null&&ce.apply(this,arguments)||this;return J.buttons=[],J}return yt(V,ce),V.prototype.addButton=function(J){J.className=this.buttonClassName,J.colorsClassName=this.buttonColorsClassName,J.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(J)},V.prototype.getUI=function(){var J=ce.prototype.getUI.call(this);return this.buttons.forEach(function(ee){return J.appendChild(ee.getUI())}),J},V}(Qt),qt=function(){function ce(V,J){this._isActive=!1,this._isHidden=!1,this._icon=V,this.title=J,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(ce.prototype,"icon",{get:function(){return this._icon},set:function(V){this._icon=V,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"isActive",{get:function(){return this._isActive},set:function(V){this._isActive=V,this.adjustClassName()},enumerable:!1,configurable:!0}),ce.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},ce.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,"")))},ce.prototype.hide=function(){this._isHidden=!0},ce}(),en=function(ce){function V(){var J=ce!==null&&ce.apply(this,arguments)||this;return J.elements=[],J}return yt(V,ce),V.prototype.addElement=function(J){this.elements.push(J)},V.prototype.getUI=function(){var J=ce.prototype.getUI.call(this);return this.elements.forEach(function(ee){return J.appendChild(ee)}),J},V}(Qt),qn=function(){function ce(V,J){this.horizontal=V,this.vertical=J}return Object.defineProperty(ce.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),ce.prototype.getVerticalLength=function(V){return V/this.ratio},ce.prototype.getHorizontalLength=function(V){return V*this.ratio},ce}(),$t=function(){function ce(){}return ce.getIcon=function(V,J){if(V>0&&J>0){var ee=new qn(V,J),Se=ee.ratio>=1?20:ee.getHorizontalLength(20),ue=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 Dt=gt.createDefs();nt.appendChild(Dt);var Yt=gt.createElement("clipPath",[["id","text-bg-clip"]]);Dt.appendChild(Yt);var an=gt.createPath(gt.getHollowRectanglePath((24-Se)/2,(24-ue)/2,Se,ue,(24-Se)/2+2,(24-ue)/2+2,Se-4,ue-4));nt.appendChild(an);var Xt=gt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Xt.appendChild(gt.createTSpan(V+":"+J)),nt.appendChild(Xt);var Rn=Xt.getBBox();gt.setAttributes(Xt,[["x",((24-Rn.width)/2).toString()],["y",((24-Rn.height)/2-Rn.y).toString()]]);var Kn=gt.createPath(gt.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Rn.width))/2,(24-Math.ceil(Rn.height))/2,Math.ceil(Rn.width),Math.ceil(Rn.height)));return Yt.appendChild(Kn),gt.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>'},ce}(),cn=function(ce){function V(J,ee,Se){var ue=ce.call(this,J,ee)||this;return ue.isDropdownOpen=!1,ue.onClick=ue.dropdownButtonClicked,ue.dropdownButtons=Se,ue}return yt(V,ce),V.prototype.setupDropdown=function(){var J=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=J.className,ee.colorsClassName=J.colorsClassName,J.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),mn=function(){function ce(V,J){this.GRIP_SIZE=10,this.color=V,this.fillColor=J,this.visual=gt.createGroup(),this.visual.appendChild(gt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(gt.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ce.prototype.ownsTarget=function(V){return V===this.visual||V===this.visual.childNodes[0]||V===this.visual.childNodes[1]},ce.prototype.setCenter=function(V,J){this.visual.childNodes.forEach(function(ee){return gt.setAttributes(ee,[["cx",V.toString()],["cy",J.toString()]])})},ce}(),yn=function(){function ce(V,J,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=J,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(ce.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(ce.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(ce.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(V){this._zoomFactor=V,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),ce.prototype.open=function(){var V=this;this.cropShadeElement=gt.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=gt.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var J=0;J<this.numberOfGridLines;J++)this.horizontalGridLines.push(gt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(gt.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=gt.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new mn(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new mn(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new mn(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new mn(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},ce.prototype.setCropRectangle=function(V){this.cropRect=V;var J=Object.assign({},this.cropRect);this.zoomFactor!==1&&(J.width=this.cropRect.width*this.zoomFactor,J.height=this.cropRect.height*this.zoomFactor,J.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-J.width/2,J.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-J.height/2),gt.setAttributes(this.cropRectElement,[["x",J.x.toString()],["y",J.y.toString()],["width",J.width.toString()],["height",J.height.toString()]]);var ee=J.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(ue,nt){var Dt=J.y+ee*(nt+1);gt.setAttributes(ue,[["x1",""+J.x],["y1",""+Dt],["x2",""+(J.x+J.width)],["y2",""+Dt]])});var Se=J.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(ue,nt){var Dt=J.x+Se*(nt+1);gt.setAttributes(ue,[["x1",""+Dt],["y1",""+J.y],["x2",""+Dt],["y2",""+(J.y+J.height)]])}),gt.setAttributes(this.cropShadeElement,[["d",gt.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,J.x,J.y,J.width,J.height)]]),this.topLeftGrip.setCenter(J.x,J.y),this.topRightGrip.setCenter(J.x+J.width,J.y),this.bottomLeftGrip.setCenter(J.x,J.y+J.height),this.bottomRightGrip.setCenter(J.x+J.width,J.y+J.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},ce.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)},ce.prototype.clientToLocalCoordinates=function(V,J){var ee=this.container.getBoundingClientRect();return{x:V-ee.left+this.margin,y:J-ee.top+this.margin}},ce.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)},ce.prototype.onPointerMove=function(V){if(this.isMoving)this.move(this.clientToLocalCoordinates(V.clientX,V.clientY));else if(this.activeGrip){var J=this.clientToLocalCoordinates(V.clientX,V.clientY);this.resize(J)}V.preventDefault()},ce.prototype.onPointerUp=function(V){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(V.pointerId)},ce.prototype.move=function(V){var J=V.x-this.previousPoint.x,ee=V.y-this.previousPoint.y;this.zoomFactor!==1&&(J=-J/this.zoomFactor,ee=-ee/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+J),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},ce.prototype.resize=function(V){var J=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:J.x+ee<this.margin&&(ee=this.margin-J.x),J.x+=ee,J.width=this.cropRect.x+this.cropRect.width-J.x;break;case this.bottomRightGrip:case this.topRightGrip:J.width+ee>this.canvasWidth*this.zoomFactor&&(ee=this.canvasWidth*this.zoomFactor-J.width),J.width+=ee}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(J.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(ee),J.height=this.aspectRatio.getVerticalLength(J.width)):(J.y+=Se,J.height=this.cropRect.y+this.cropRect.height-J.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?J.height=this.aspectRatio.getVerticalLength(J.width):J.height+=Se}J.width<10&&(J.x=this.cropRect.x,J.width=10),J.height<10&&(J.y=this.cropRect.y,J.height=10),this.previousPoint=V,J.x>=this.margin&&J.y>=this.margin&&J.x-this.margin+J.width<=this.canvasWidth&&J.y-this.margin+J.height<=this.canvasHeight&&(this.cropRect=J,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},ce.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,J=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=J-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)}},ce.prototype.getRescaledRect=function(V,J,ee,Se,ue,nt){var Dt=ee/V,Yt=Se/J;return{x:(ue.x-nt)*Dt+nt,y:(ue.y-nt)*Yt+nt,width:ue.width*Dt,height:ue.height*Yt}},ce.prototype.scaleCanvas=function(V,J){var ee=this.getRescaledRect(this.canvasWidth,this.canvasHeight,V,J,this.cropRect,this.margin);this.canvasWidth=V,this.canvasHeight=J,this.onCropChange&&this.onCropChange(ee),this.setCropRectangle(ee)},ce}(),Vn=function(){function ce(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(ce.prototype,"angle",{get:function(){return this._angle},set:function(V){this._angle=V,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),ce.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},ce.prototype.onPointerDown=function(V){this.controlContainer.setPointerCapture(V.pointerId),this.isDragging=!0,this.previousPoint={x:V.clientX,y:V.clientY}},ce.prototype.onPointerMove=function(V){this.isDragging&&(this.onAngleChange&&this.onAngleChange((V.clientX-this.previousPoint.x)/5),this.previousPoint.x=V.clientX)},ce.prototype.onPointerUp=function(V){this.isDragging&&this.onAngleChange&&this.onAngleChange((V.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(V.pointerId)},ce.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var V=this.angleLabelText.getBBox();gt.setAttributes(this.angleLabelElement,[["x",((this.width-V.width)/2).toString()],["y",(this.height/2).toString()]])}},ce.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)}},ce.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 J="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;J+="h4v"+-Se+"h1v"+Se}J+="v1H0Z",this.scaleShape=gt.createPath(J);var ue=gt.createTransform();this.scaleShape.transform.baseVal.appendItem(ue),V.appendChild(this.scaleShape),this.angleLabelElement=gt.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=gt.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var nt=gt.createTSpan("");return nt.innerHTML="°",this.angleLabelElement.appendChild(nt),V.appendChild(this.angleLabelElement),document.body.removeChild(V),V},ce}(),$n=function(){function ce(){this.naturalSize=!1,this.imageType="image/png"}return ce.prototype.rasterize=function(V,J,ee,Se,ue,nt,Dt){var Yt=this;return new Promise(function(an){var Xt=document.createElement("canvas");Xt.width=V.width.baseVal.value-2*Se,Xt.height=V.height.baseVal.value-2*Se;var Rn=1,Kn=1;Yt.naturalSize===!0?(Rn=J.naturalWidth/(V.width.baseVal.value-2*Se)/nt,Kn=J.naturalHeight/(V.height.baseVal.value-2*Se)/Dt,Xt.width=J.naturalWidth/nt,Xt.height=J.naturalHeight/Dt):Yt.width!==void 0&&Yt.height!==void 0&&(Rn=Yt.width/ee.width,Kn=Yt.height/ee.height,Xt.width*=Rn,Xt.height*=Kn);var ar=Xt.getContext("2d");ar.translate(Xt.width/2,Xt.height/2),ar.rotate(ue*Math.PI/180),ar.scale(nt,Dt),ar.translate(-Xt.width/2,-Xt.height/2),ar.drawImage(J,0,0,Xt.width,Xt.height);var vr=document.createElement("canvas");vr.width=ee.width*Rn,vr.height=ee.height*Kn,vr.getContext("2d").putImageData(ar.getImageData((ee.x-Se)*Rn,(ee.y-Se)*Kn,ee.width*Rn,ee.height*Kn),0,0),an(vr.toDataURL(Yt.imageType,Yt.imageQuality))})},ce}(),zt=function(){function ce(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=ce.instanceCounter++,this.styles=new Ht(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(ce.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(V){this._zoomToCropEnabled=V,V?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(ce.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(ce.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(ce.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(ce.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ce.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}),ce.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},ce.prototype.show=function(){this.showUI(),this.open()},ce.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(J){return J()}),this._isOpen=!1)},ce.prototype.addRenderEventListener=function(V){this.renderEventListeners.push(V)},ce.prototype.removeRenderEventListener=function(V){this.renderEventListeners.indexOf(V)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(V),1)},ce.prototype.addCloseEventListener=function(V){this.closeEventListeners.push(V)},ce.prototype.removeCloseEventListener=function(V){this.closeEventListeners.indexOf(V)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(V),1)},ce.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))},ce.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var V=1*this.target.clientWidth/this.target.clientHeight,J=this.contentDiv.clientWidth/V>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*V:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,ee=J+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/V;this.resize(J,ee)}},ce.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},ce.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",gt.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},ce.prototype.resize=function(V,J){this.imageWidth=Math.round(V),this.imageHeight=Math.round(J),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()},ce.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 J=V.toDataURL();gt.setAttributes(this.editingTarget,[["href",J]]),this.setEditingTargetSize()},ce.prototype.setTopLeft=function(){var V=this.target.getBoundingClientRect(),J=this.editorCanvas.getBoundingClientRect();this.left=V.left-J.left-this.CANVAS_MARGIN,this.top=V.top-J.top-this.CANVAS_MARGIN},ce.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=gt.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=gt.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=gt.createGroup(),this.editingTargetRotationScaleContainer=gt.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var V=gt.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(V);var J=gt.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(J),this.editingTargetContainer=gt.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)},ce.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},ce.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=gt.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new yn(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()},ce.prototype.zoomToCrop=function(){if(this.cropRect){var V=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,J=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 "+J+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-V+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-J+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},ce.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)},ce.prototype.cropRectChanged=function(V){this.cropRect=V,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},ce.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},ce.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"},ce.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ce.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,J=this.target.offsetTop>V+this.CANVAS_MARGIN?this.target.offsetTop-(V+this.CANVAS_MARGIN):0;this.coverDiv.style.top=J+"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},ce.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},ce.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 J=new pn;J.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(J);var ee=[];this.aspectRatios.forEach(function(Kn){var ar=new qt($t.getIcon(Kn.horizontal,Kn.vertical),Kn.horizontal===0&&Kn.vertical===0?"FREE":Kn.horizontal+":"+Kn.vertical);ar.onClick=function(){return V.ratioButtonClicked(Kn)},ee.push(ar)}),this.aspectRatioButton=new cn($t.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,J.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},J.addButton(Se);var ue=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(ue.isActive=this.zoomToCropEnabled,ue.onClick=function(){V.zoomToCropEnabled=!V.zoomToCropEnabled,ue.isActive=V.zoomToCropEnabled},J.addButton(ue),!Bt.isLicensed){var nt=new en;this.topToolbar.addElementBlock(nt);var Dt=document.createElement("div");Dt.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Yt=document.createElement("a");Yt.style.color="currentColor",Yt.href="https://markerjs.com/products/cropro",Yt.target="_blank",Yt.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>',Dt.appendChild(Yt),nt.addElement(Dt)}var an=new pn;an.minWidth=3*this.toolbarHeight+"px",an.contentAlign="end",this.topToolbar.addButtonBlock(an);var Xt=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");Xt.onClick=this.startRenderAndClose,an.addButton(Xt),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Xt.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Rn=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");Rn.onClick=this.close,an.addButton(Rn),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Rn.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},ce.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 J=new pn;J.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(J);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,J.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,J.addButton(Se);var ue=new en;ue.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(ue),this.straightener=new Vn("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},ue.addElement(this.straightener.getUI());var nt=new pn;nt.minWidth=2*this.toolbarHeight+"px",nt.contentAlign="end",this.bottomToolbar.addButtonBlock(nt);var Dt=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");Dt.onClick=this.flipHorizontallyButtonClicked,nt.addButton(Dt);var Yt=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");Yt.onClick=this.flipVerticallyButtonClicked,nt.addButton(Yt)},ce.prototype.ratioButtonClicked=function(V){this.aspectRatio=V,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},ce.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=$t.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},ce.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new qn(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},ce.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ce.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},ce.prototype.restoreState=function(V){if(V){var J=this.cropLayer.getRescaledRect(V.width,V.height,this.imageWidth,this.imageHeight,V.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(J),this.cropRectChanged(J),this.flippedHorizontally=V.flippedHorizontally,this.flippedVertically=V.flippedVertically,this.applyFlip(),this.rotationAngle=V.rotationAngle,this.applyRotation()}},ce.prototype.clientToLocalCoordinates=function(V,J){var ee=this.cropImage.getBoundingClientRect();return{x:V-ee.left,y:J-ee.top}},ce.prototype.onWindowResize=function(){this.positionUI()},ce.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()},ce.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)},ce.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)},ce.prototype.rotateTo=function(V){V=(V=V>180?V-360:V)<=-180?V+360:V,this.rotationAngle=V,this.applyRotation()},ce.prototype.rotateBy=function(V){this.rotateTo((this.rotationAngle+V)%360)},ce.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 J=this.editingTargetRotationContainer.transform.baseVal.getItem(0);J.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(J,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},ce.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},ce.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},ce.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},ce.prototype.startRenderAndClose=function(){return pt(this,void 0,void 0,function(){var V,J;return jt(this,function(ee){switch(ee.label){case 0:return[4,this.render()];case 1:return V=ee.sent(),J=this.getState(),this.renderEventListeners.forEach(function(Se){return Se(V,J)}),this.close(!0),[2]}})})},ce.prototype.render=function(){return pt(this,void 0,void 0,function(){var V;return jt(this,function(J){switch(J.label){case 0:return(V=new $n).naturalSize=this.renderAtNaturalSize,V.imageType=this.renderImageType,V.imageQuality=this.renderImageQuality,V.width=this.renderWidth,V.height=this.renderHeight,this.unzoomFromCrop(),gt.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 J.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,J.sent()]}})})},ce.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Nt("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 Nt("toolbar_colors",`
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Nt("toolbar-block",`
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
box-sizing: content-box;
|
|
|
`));var V=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Nt("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 Nt("toolbar_button_colors",`
|
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
|
fill: currentColor;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Nt("toolbar_active_button",`
|
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
|
fill: currentColor;
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
|
|
|
`)),this.styles.addRule(new Ut("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new Ut("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new Nt("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 Nt("toolbar_dropdown_colors",`
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Nt("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 Nt("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 Nt("toolbar_straightener_colors",`
|
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
|
fill: currentColor;
|
|
|
`))},ce.instanceCounter=0,ce}(),xn=b("8hTe"),wr=b.n(xn),nr=/<pre[^>]*>/g;function Tn(ce){var V=document.createElement("div");return V.innerHTML=ce,V.childNodes.length===0?"":V.childNodes[0].nodeValue}var Yn=H.a=function(ce){var V=ce.value,J=V===void 0?"":V,ee=ce.edit,Se=ee===void 0?!1:ee,ue=ce.className,nt=ce.showTextOnly,Dt=ce.showLines,Yt=ce.replaces,an=ce.zoomImg,Xt=ce.hasMask,Rn=ce.style,Kn=Rn===void 0?{}:Rn,ar=ce.stylesPrev,vr=ar===void 0?{}:ar,lr=String(J),Jn=Object(o.useRef)(),Tr=Object(o.useRef)(),Ji=Object(o.useState)(""),Vr=Object(_.a)(Ji,2),oi=Vr[0],pa=Vr[1],Bi=Object(o.useState)("office"),ta=Object(_.a)(Bi,2),Da=ta[0],_o=ta[1],lo=function(){var Ar=new zt(Tr.current);Ar.displayMode="popup",Ar.addRenderEventListener(function(){var ti=Object(s.a)(e.a.mark(function yr(si){var cr;return e.a.wrap(function(Ni){for(;;)switch(Ni.prev=Ni.next){case 0:return Jn.current.style.display="none",Ni.next=3,Object(Ce.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:si}});case 3:cr=Ni.sent,cr!=null&&cr.id&&Yt(Tr.current.getAttribute("src").replace(Z.a.API_SERVER,""),"/api/attachments/".concat(cr==null?void 0:cr.id,"?type=").concat(cr.content_type));case 5:case"end":return Ni.stop()}},yr)}));return function(yr){return ti.apply(this,arguments)}}()),Ar.show()},wo=function(){var Ar=new Ne(Tr.current);Ar.settings.displayMode="popup",Ar.addEventListener("render",function(){var ti=Object(s.a)(e.a.mark(function yr(si){var cr;return e.a.wrap(function(Ni){for(;;)switch(Ni.prev=Ni.next){case 0:if(Jn.current.style.display="none",!Tr.current){Ni.next=6;break}return Ni.next=4,Object(Ce.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:si.dataUrl}});case 4:cr=Ni.sent,cr!=null&&cr.id&&Yt(Tr.current.getAttribute("src").replace(Z.a.API_SERVER,""),"/api/attachments/".concat(cr==null?void 0:cr.id,"?type=").concat(cr.content_type));case 6:case"end":return Ni.stop()}},yr)}));return function(yr){return ti.apply(this,arguments)}}()),Ar.show(),window.markerArea=Ar},Fa=Object(o.useMemo)(function(){Jn.current&&(Jn.current.style.zIndex=-1);try{var Ur=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Ar=/\"\/api\/attachments\/|\"\/attachments\/download\//g,ti=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;lr=lr.replace(Ur,"("+Z.a.API_SERVER+"/api/attachments/").replace(Ar,'"'+Z.a.API_SERVER+"/api/attachments/").replace(ti,'"'+Z.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(Hi){}var yr=F(lr),si=M();if(lr.match(/\[TOC\]/)&&(yr=yr.replace("<p>[TOC]</p>",O()),u()),yr=yr.replace(/(__special_katext_id_\d+__)/g,function(Hi,Ni){var Zi=si[Ni],yo=Zi.type,Vi=Zi.expression;return Object(re.renderToString)(Tn(Vi)||"",{displayMode:yo==="block",throwOnError:!1,output:"html"})}),yr=yr.replace(/▁/g,"\u2581\u2581\u2581"),N(),nt){var cr=document.createElement("div");return cr.innerHTML=yr,cr.innerText}return setTimeout(function(){return qr()},500),yr},[lr]),Gi=Object(o.useRef)();E.WebkitLineClamp=Dt,Dt&&(Kn=Object(g.a)(Object(g.a)({},Kn),E));function Nr(Ur){var Ar=Ur.target;if(Ar.tagName.toUpperCase()==="IMG"){if(an){var ti=Ar.getAttribute("src");pa(ti),_o("image")}}else if(Ar.tagName.toUpperCase()==="A"){var yr=Ar.getAttribute("href");if(yr.indexOf("office")>-1)Ur.preventDefault(),pa(yr),_o("office");else if(yr.indexOf("application/pdf")>-1)Ur.preventDefault(),pa(yr),_o("pdf");else if(yr.indexOf("text/html")>-1)Ur.preventDefault(),pa(yr),_o("html");else if(yr.startsWith("#")){Ur.preventDefault();var si=document.getElementById(yr.replace("#",""));si&&si.scrollIntoView(!0)}}}var qr=function(){var Ar,ti=(Ar=Gi.current)===null||Ar===void 0?void 0:Ar.querySelectorAll("video");ti==null||ti.forEach(function(yr){if(yr.oncontextmenu=function(){return!1},yr.src.indexOf(".m3u8")>-1&&!yr.canPlayType("application/vnd.apple.mpegurl")){if(B.a.isSupported()){var si=new B.a;si.loadSource(yr.src),si.attachMedia(yr)}}})};Object(o.useEffect)(function(){if(Gi.current&&Fa&&(Fa.match(nr)&&window.PR.prettyPrint()),Gi.current)return Gi.current.addEventListener("click",Nr),function(){Gi.current.removeEventListener("click",Nr),N(),u()}},[Fa,Gi.current,Nr]);var _i=function(Ar){if(!Se)return;Ar.target.nodeName==="IMG"?(Jn.current.style.zIndex=1,Jn.current.style.display="flex",Jn.current.style.width=Ar.target.clientWidth+"px",Jn.current.style.height=Ar.target.clientHeight+"px",Jn.current.style.top=Ar.target.offsetTop+"px",Jn.current.style.left=Ar.target.offsetLeft+"px",Tr.current.src=Ar.target.getAttribute("src")):Jn.current.style.display="none"};return n.a.createElement("div",{style:{position:"relative"}},n.a.createElement("div",{ref:Gi,style:Object(g.a)({},Kn),className:"".concat(ue||""," markdown-body ").concat(wr.a.mdBody),onMouseOver:_i,dangerouslySetInnerHTML:{__html:Fa}}),n.a.createElement("div",{ref:Jn,className:wr.a.button},n.a.createElement(v.a,null,n.a.createElement(y.a,{onClick:function(){return lo()}},"\u88C1\u526A"),n.a.createElement(y.a,{onClick:function(){return wo()}},"\u7F16\u8F91"))),n.a.createElement("img",{ref:Tr,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),n.a.createElement(he.a,{close:!0,data:oi,type:oi!=null&&oi.length?Da:"",style:Object(g.a)({},vr),onClose:function(){return pa("")}}))}},"9OqN":function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("OLod"))})(this,function(I){return I.mode.CTR=function(){var v=I.lib.BlockCipherMode.extend(),T=v.Encryptor=v.extend({processBlock:function(y,g){var s=this._cipher,_=s.blockSize,p=this._iv,e=this._counter;p&&(e=this._counter=p.slice(0),this._iv=void 0);var o=e.slice(0);s.encryptBlock(o,0),e[_-1]=e[_-1]+1|0;for(var n=0;n<_;n++)y[g+n]^=o[n]}});return v.Decryptor=T,v}(),I.mode.CTR})},"9VGf":function(j,H,b){"use strict";b.d(H,"a",function(){return T});var I=b("q1tI"),v=b.n(I);function T(y,g){var s=Object(I.useRef)();Object(I.useEffect)(function(){s.current=y}),Object(I.useEffect)(function(){function _(){s.current()}if(g!==null){var p=setInterval(_,g);return function(){return clearInterval(p)}}},[g])}},"9odi":function(j,H,b){j.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(j,H){j.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(j,H,b){},ALsQ:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("OLod"))})(this,function(I){return I.mode.CFB=function(){var v=I.lib.BlockCipherMode.extend();v.Encryptor=v.extend({processBlock:function(y,g){var s=this._cipher,_=s.blockSize;T.call(this,y,g,_,s),this._prevBlock=y.slice(g,g+_)}}),v.Decryptor=v.extend({processBlock:function(y,g){var s=this._cipher,_=s.blockSize,p=y.slice(g,g+_);T.call(this,y,g,_,s),this._prevBlock=p}});function T(y,g,s,_){var p,e=this._iv;e?(p=e.slice(0),this._iv=void 0):p=this._prevBlock,_.encryptBlock(p,0);for(var o=0;o<s;o++)y[g+o]^=p[o]}return v}(),I.mode.CFB})},AMnG:function(j,H,b){"use strict";var I=b("miYZ"),v=b("tsqr"),T=b("tJVT"),y=b("q1tI"),g=b.n(y),s=b("nWbc"),_=b.n(s),p=b("Ot1p");H.a=function(e){var o=e.id,n=e.activeDiscussIndex,l=e.onReplyDiscuss,r=Object(y.useState)(""),i=Object(T.a)(r,2),t=i[0],a=i[1];function c(f){a(f)}function d(){if(!t){v.b.info("\u56DE\u590D\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A!");return}l(o,t),a("")}return g.a.createElement("div",{key:o,className:"discuss-item-editor",style:{display:n===o?"block":"none",width:"100%"}},g.a.createElement(p.a,{miniToolbar:!0,startInit:n===o,defaultValue:t,id:o,noStorage:!0,watch:!1,height:155,placeholder:"\u6211\u8981\u56DE\u590D",showResizeBar:!0,onChange:c}),g.a.createElement("a",{onClick:d,className:"btn-send"},"\u53D1\u9001"))}},ARon:function(j,H,b){},BU3w:function(j,H,b){"use strict";b.d(H,"a",function(){return s});var I=b("MNnm"),v="rc-util-key";function T(_){if(_.attachTo)return _.attachTo;var p=document.querySelector("head");return p||document.body}function y(_){var p,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(I.a)())return null;var o=document.createElement("style");if((p=e.csp)===null||p===void 0?void 0:p.nonce){var n;o.nonce=(n=e.csp)===null||n===void 0?void 0:n.nonce}o.innerHTML=_;var l=T(e),r=l.firstChild;return e.prepend&&l.prepend?l.prepend(o):e.prepend&&r?l.insertBefore(o,r):l.appendChild(o),o}var g=new Map;function s(_,p){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=T(e);if(!g.has(o)){var n=y("",e),l=n.parentNode;g.set(o,l),l.removeChild(n)}var r=Array.from(g.get(o).children).find(function(d){return d.tagName==="STYLE"&&d[v]===p});if(r){var i,t;if(((i=e.csp)===null||i===void 0?void 0:i.nonce)&&r.nonce!==((t=e.csp)===null||t===void 0?void 0:t.nonce)){var a;r.nonce=(a=e.csp)===null||a===void 0?void 0:a.nonce}return r.innerHTML!==_&&(r.innerHTML=_),r}var c=y(_,e);return c[v]=p,c}},Bd2K:function(j,H,b){(function(I){I(b("VrN/"),b("osHv"))})(function(I){I.defineOption("autoCloseTags",!1,function(e,o,n){if(n!=I.Init&&n&&e.removeKeyMap("autoCloseTags"),!o)return;var l={name:"autoCloseTags"};(typeof o!="object"||o.whenClosing!==!1)&&(l["'/'"]=function(r){return s(r)}),(typeof o!="object"||o.whenOpening!==!1)&&(l["'>'"]=function(r){return y(r)}),e.addKeyMap(l)});var v=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],T=["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(e){if(e.getOption("disableInput"))return I.Pass;for(var o=e.listSelections(),n=[],l=e.getOption("autoCloseTags"),r=0;r<o.length;r++){if(!o[r].empty())return I.Pass;var i=o[r].head,t=e.getTokenAt(i),a=I.innerMode(e.getMode(),t.state),c=a.state,d=a.mode.xmlCurrentTag&&a.mode.xmlCurrentTag(c),f=d&&d.name;if(!f)return I.Pass;var h=a.mode.configuration=="html",u=typeof l=="object"&&l.dontCloseTags||h&&v,E=typeof l=="object"&&l.indentTags||h&&T;t.end>i.ch&&(f=f.slice(0,f.length-t.end+i.ch));var x=f.toLowerCase();if(!f||t.type=="string"&&(t.end!=i.ch||!/[\"\']/.test(t.string.charAt(t.string.length-1))||t.string.length==1)||t.type=="tag"&&d.close||t.string.indexOf("/")==i.ch-t.start-1||u&&_(u,x)>-1||p(e,a.mode.xmlCurrentContext&&a.mode.xmlCurrentContext(c)||[],f,i,!0))return I.Pass;var O=typeof l=="object"&&l.emptyTags;if(O&&_(O,f)>-1){n[r]={text:"/>",newPos:I.Pos(i.line,i.ch+2)};continue}var C=E&&_(E,x)>-1;n[r]={indent:C,text:">"+(C?`
|
|
|
|
|
|
`:"")+"</"+f+">",newPos:C?I.Pos(i.line+1,0):I.Pos(i.line,i.ch+1)}}for(var w=typeof l=="object"&&l.dontIndentOnAutoClose,r=o.length-1;r>=0;r--){var S=n[r];e.replaceRange(S.text,o[r].head,o[r].anchor,"+insert");var A=e.listSelections().slice(0);A[r]={head:S.newPos,anchor:S.newPos},e.setSelections(A),!w&&S.indent&&(e.indentLine(S.newPos.line,null,!0),e.indentLine(S.newPos.line+1,null,!0))}}function g(e,o){for(var n=e.listSelections(),l=[],r=o?"/":"</",i=e.getOption("autoCloseTags"),t=typeof i=="object"&&i.dontIndentOnSlash,a=0;a<n.length;a++){if(!n[a].empty())return I.Pass;var c=n[a].head,d=e.getTokenAt(c),f=I.innerMode(e.getMode(),d.state),h=f.state;if(o&&(d.type=="string"||d.string.charAt(0)!="<"||d.start!=c.ch-1))return I.Pass;var u,E=f.mode.name!="xml"&&e.getMode().name=="htmlmixed";if(E&&f.mode.name=="javascript")u=r+"script";else if(E&&f.mode.name=="css")u=r+"style";else{var x=f.mode.xmlCurrentContext&&f.mode.xmlCurrentContext(h);if(!x||x.length&&p(e,x,x[x.length-1],c))return I.Pass;u=r+x[x.length-1]}e.getLine(c.line).charAt(d.end)!=">"&&(u+=">"),l[a]=u}if(e.replaceSelections(l),n=e.listSelections(),!t)for(var a=0;a<n.length;a++)(a==n.length-1||n[a].head.line<n[a+1].head.line)&&e.indentLine(n[a].head.line)}function s(e){return e.getOption("disableInput")?I.Pass:g(e,!0)}I.commands.closeTag=function(e){return g(e)};function _(e,o){if(e.indexOf)return e.indexOf(o);for(var n=0,l=e.length;n<l;++n)if(e[n]==o)return n;return-1}function p(e,o,n,l,r){if(!I.scanForClosingTag)return!1;var i=Math.min(e.lastLine()+1,l.line+500),t=I.scanForClosingTag(e,l,null,i);if(!t||t.tag!=n)return!1;for(var a=r?1:0,c=o.length-1;c>=0&&o[c]==n;c--)++a;l=t.to;for(var c=1;c<a;c++){var d=I.scanForClosingTag(e,l,null,i);if(!d||d.tag!=n)return!1;l=d.to}return!0}})},BdwD:function(j,H,b){"use strict";var I=b("+L6B"),v=b("2/Rp"),T=b("0Owb"),y=b("k1fw"),g=b("q1tI"),s=b.n(g),_=b("FOrL"),p=b.n(_),e=function(n){var l=n.buttonProps,r=l===void 0?{}:l,i=n.styles,t=i===void 0?{}:i,a=n.customText,c=n.ButtonText,d=n.ButtonClick,f=n.Buttonclass,h=n.ButtonTwo;return s.a.createElement("section",{className:"tc animated fadeIn",style:Object(y.a)(Object(y.a)({},{color:"#999",margin:"200px auto"}),t)},s.a.createElement("img",{src:p.a}),s.a.createElement("p",{className:"mt20 font14"},a||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),c&&s.a.createElement(v.a,Object(T.a)({className:f,onClick:d},r),c),h&&h)};H.a=e},BjJ7:function(j,H,b){"use strict";b.d(H,"d",function(){return v}),b.d(H,"c",function(){return T}),b.d(H,"e",function(){return y}),b.d(H,"b",function(){return g}),b.d(H,"a",function(){return _});var I=b("m3rI");function v(p){var e=!0;if(p.length>0){for(var o=0;o<p.length;o++)if(p[o].compile_success==0||!p[o].compile_success){e=!1;break}}else e=!1;return e}function T(p){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",o=[],n=0;n<p.length;n++){var l=p[n],r=e?"".concat(e,"/").concat(l.name):"".concat(l.name);o.push({title:l.name,isLeaf:!(l.type==="tree"),key:r})}return o}function y(p,e,o){for(var n=0;n<p.length;n++){var l=p[n];if(l.key===e){l.children=o;break}l.children&&y(l.children,e,o)}return p}function g(p,e,o){var n;return function(){var l=this,r=arguments,i=function(){n=null,o||p.apply(l,r)},t=o&&!n;clearTimeout(n),n=setTimeout(i,e),t&&p.apply(l,r)}}var s=!0,_=I.a.API_SERVER},Bwpq:function(j,H){j.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(j,H,b){},"C/vA":function(j,H,b){"use strict";b.d(H,"a",function(){return I});function I(v){const T=this;let y=!1,g;return function(){return y||(y=!0,g=v.apply(T,arguments)),g}}},"Cg/j":function(j,H,b){"use strict";b.d(H,"b",function(){return I}),b.d(H,"a",function(){return v}),b.d(H,"c",function(){return y}),b.d(H,"d",function(){return g});var I;(function(s){s.serviceIds=new Map,s.DI_TARGET="$di$target",s.DI_DEPENDENCIES="$di$dependencies";function _(p){return p[s.DI_DEPENDENCIES]||[]}s.getServiceDependencies=_})(I||(I={}));const v=y("instantiationService");function T(s,_,p,e){_[I.DI_TARGET]===_?_[I.DI_DEPENDENCIES].push({id:s,index:p,optional:e}):(_[I.DI_DEPENDENCIES]=[{id:s,index:p,optional:e}],_[I.DI_TARGET]=_)}function y(s){if(I.serviceIds.has(s))return I.serviceIds.get(s);const _=function(p,e,o){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");T(_,p,o,!1)};return _.toString=()=>s,I.serviceIds.set(s,_),_}function g(s){return function(_,p,e){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");T(s,_,e,!0)}}},CrYA:function(j,H,b){var I=b("MFOe"),v=I.Global;j.exports={name:"sessionStorage",read:y,write:g,each:s,remove:_,clearAll:p};function T(){return v.sessionStorage}function y(e){return T().getItem(e)}function g(e,o){return T().setItem(e,o)}function s(e){for(var o=T().length-1;o>=0;o--){var n=T().key(o);e(y(n),n)}}function _(e){return T().removeItem(e)}function p(){return T().clear()}},DVFL:function(j,H,b){},DlQD:function(j,H,b){(function(I,v){j.exports=v()})(this,function(){"use strict";function I(Ye,Pe){for(var He=0;He<Pe.length;He++){var ve=Pe[He];ve.enumerable=ve.enumerable||!1,ve.configurable=!0,"value"in ve&&(ve.writable=!0),Object.defineProperty(Ye,ve.key,ve)}}function v(Ye,Pe,He){return Pe&&I(Ye.prototype,Pe),He&&I(Ye,He),Ye}function T(Ye,Pe){if(!Ye)return;if(typeof Ye=="string")return y(Ye,Pe);var He=Object.prototype.toString.call(Ye).slice(8,-1);if(He==="Object"&&Ye.constructor&&(He=Ye.constructor.name),He==="Map"||He==="Set")return Array.from(Ye);if(He==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(He))return y(Ye,Pe)}function y(Ye,Pe){(Pe==null||Pe>Ye.length)&&(Pe=Ye.length);for(var He=0,ve=new Array(Pe);He<Pe;He++)ve[He]=Ye[He];return ve}function g(Ye,Pe){var He;if(typeof Symbol=="undefined"||Ye[Symbol.iterator]==null){if(Array.isArray(Ye)||(He=T(Ye))||Pe&&Ye&&typeof Ye.length=="number"){He&&(Ye=He);var ve=0;return function(){return ve>=Ye.length?{done:!0}:{done:!1,value:Ye[ve++]}}}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 He=Ye[Symbol.iterator](),He.next.bind(He)}function s(Ye,Pe){return Pe={exports:{}},Ye(Pe,Pe.exports),Pe.exports}var _=s(function(Ye){function Pe(){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 He(ve){Ye.exports.defaults=ve}Ye.exports={defaults:Pe(),getDefaults:Pe,changeDefaults:He}}),p=_.defaults,e=_.getDefaults,o=_.changeDefaults,n=/[&<>"']/,l=/[&<>"']/g,r=/[<>"']|&(?!#?\w+;)/,i=/[<>"']|&(?!#?\w+;)/g,t={"&":"&","<":"<",">":">",'"':""","'":"'"},a=function(Pe){return t[Pe]};function c(Ye,Pe){if(Pe){if(n.test(Ye))return Ye.replace(l,a)}else if(r.test(Ye))return Ye.replace(i,a);return Ye}var d=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function f(Ye){return Ye.replace(d,function(Pe,He){return He=He.toLowerCase(),He==="colon"?":":He.charAt(0)==="#"?He.charAt(1)==="x"?String.fromCharCode(parseInt(He.substring(2),16)):String.fromCharCode(+He.substring(1)):""})}var h=/(^|[^\[])\^/g;function u(Ye,Pe){Ye=Ye.source||Ye,Pe=Pe||"";var He={replace:function(xe,de){return de=de.source||de,de=de.replace(h,"$1"),Ye=Ye.replace(xe,de),He},getRegex:function(){return new RegExp(Ye,Pe)}};return He}var E=/[^\w:]/g,x=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function O(Ye,Pe,He){if(Ye){var ve;try{ve=decodeURIComponent(f(He)).replace(E,"").toLowerCase()}catch(xe){return null}if(ve.indexOf("javascript:")===0||ve.indexOf("vbscript:")===0||ve.indexOf("data:")===0)return null}Pe&&!x.test(He)&&(He=D(Pe,He));try{He=encodeURI(He).replace(/%25/g,"%")}catch(xe){return null}return He}var C={},w=/^[^:]+:\/*[^/]*$/,S=/^([^:]+:)[\s\S]*$/,A=/^([^:]+:\/*[^/]*)[\s\S]*$/;function D(Ye,Pe){C[" "+Ye]||(w.test(Ye)?C[" "+Ye]=Ye+"/":C[" "+Ye]=z(Ye,"/",!0)),Ye=C[" "+Ye];var He=Ye.indexOf(":")===-1;return Pe.substring(0,2)==="//"?He?Pe:Ye.replace(S,"$1")+Pe:Pe.charAt(0)==="/"?He?Pe:Ye.replace(A,"$1")+Pe:Ye+Pe}var M={exec:function(){}};function N(Ye){for(var Pe=1,He,ve;Pe<arguments.length;Pe++){He=arguments[Pe];for(ve in He)Object.prototype.hasOwnProperty.call(He,ve)&&(Ye[ve]=He[ve])}return Ye}function P(Ye,Pe){var He=Ye.replace(/\|/g,function(de,je,Qe){for(var ne=!1,Ze=je;--Ze>=0&&Qe[Ze]==="\\";)ne=!ne;return ne?"|":" |"}),ve=He.split(/ \|/),xe=0;if(ve.length>Pe)ve.splice(Pe);else for(;ve.length<Pe;)ve.push("");for(;xe<ve.length;xe++)ve[xe]=ve[xe].trim().replace(/\\\|/g,"|");return ve}function z(Ye,Pe,He){var ve=Ye.length;if(ve===0)return"";for(var xe=0;xe<ve;){var de=Ye.charAt(ve-xe-1);if(de===Pe&&!He)xe++;else if(de!==Pe&&He)xe++;else break}return Ye.substr(0,ve-xe)}function X(Ye,Pe){if(Ye.indexOf(Pe[1])===-1)return-1;for(var He=Ye.length,ve=0,xe=0;xe<He;xe++)if(Ye[xe]==="\\")xe++;else if(Ye[xe]===Pe[0])ve++;else if(Ye[xe]===Pe[1]&&(ve--,ve<0))return xe;return-1}function k(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 F={escape:c,unescape:f,edit:u,cleanUrl:O,resolveUrl:D,noopTest:M,merge:N,splitCells:P,rtrim:z,findClosingBracket:X,checkSanitizeDeprecation:k},U=_.defaults,L=F.rtrim,B=F.splitCells,Z=F.escape,re=F.findClosingBracket;function he(Ye,Pe,He){var ve=Pe.href,xe=Pe.title?Z(Pe.title):null,de=Ye[1].replace(/\\([\[\]])/g,"$1");return Ye[0].charAt(0)!=="!"?{type:"link",raw:He,href:ve,title:xe,text:de}:{type:"image",raw:He,href:ve,title:xe,text:Z(de)}}function Ce(Ye,Pe){var He=Ye.match(/^(\s+)(?:```)/);if(He===null)return Pe;var ve=He[1];return Pe.split(`
|
|
|
`).map(function(xe){var de=xe.match(/^\s+/);if(de===null)return xe;var je=de[0];return je.length>=ve.length?xe.slice(ve.length):xe}).join(`
|
|
|
`)}var ke=function(){function Ye(He){this.options=He||U}var Pe=Ye.prototype;return Pe.space=function(ve){var xe=this.rules.block.newline.exec(ve);if(xe)return xe[0].length>1?{type:"space",raw:xe[0]}:{raw:`
|
|
|
`}},Pe.code=function(ve,xe){var de=this.rules.block.code.exec(ve);if(de){var je=xe[xe.length-1];if(je&&je.type==="paragraph")return{raw:de[0],text:de[0].trimRight()};var Qe=de[0].replace(/^ {4}/gm,"");return{type:"code",raw:de[0],codeBlockStyle:"indented",text:this.options.pedantic?Qe:L(Qe,`
|
|
|
`)}}},Pe.fences=function(ve){var xe=this.rules.block.fences.exec(ve);if(xe){var de=xe[0],je=Ce(de,xe[3]||"");return{type:"code",raw:de,lang:xe[2]?xe[2].trim():xe[2],text:je}}},Pe.heading=function(ve){var xe=this.rules.block.heading.exec(ve);if(xe)return{type:"heading",raw:xe[0],depth:xe[1].length,text:xe[2]}},Pe.nptable=function(ve){var xe=this.rules.block.nptable.exec(ve);if(xe){var de={type:"table",header:B(xe[1].replace(/^ *| *\| *$/g,"")),align:xe[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:xe[3]?xe[3].replace(/\n$/,"").split(`
|
|
|
`):[],raw:xe[0]};if(de.header.length===de.align.length){var je=de.align.length,Qe;for(Qe=0;Qe<je;Qe++)/^ *-+: *$/.test(de.align[Qe])?de.align[Qe]="right":/^ *:-+: *$/.test(de.align[Qe])?de.align[Qe]="center":/^ *:-+ *$/.test(de.align[Qe])?de.align[Qe]="left":de.align[Qe]=null;for(je=de.cells.length,Qe=0;Qe<je;Qe++)de.cells[Qe]=B(de.cells[Qe],de.header.length);return de}}},Pe.hr=function(ve){var xe=this.rules.block.hr.exec(ve);if(xe)return{type:"hr",raw:xe[0]}},Pe.blockquote=function(ve){var xe=this.rules.block.blockquote.exec(ve);if(xe){var de=xe[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:xe[0],text:de}}},Pe.list=function(ve){var xe=this.rules.block.list.exec(ve);if(xe){for(var de=xe[0],je=xe[2],Qe=je.length>1,ne=je[je.length-1]===")",Ze={type:"list",raw:de,ordered:Qe,start:Qe?+je.slice(0,-1):"",loose:!1,items:[]},lt=xe[0].match(this.rules.block.item),Be=!1,$e,rt,xt,ft,st,Ne,Ge,yt=lt.length,pt=0;pt<yt;pt++)$e=lt[pt],de=$e,rt=$e.length,$e=$e.replace(/^ *([*+-]|\d+[.)]) */,""),~$e.indexOf(`
|
|
|
`)&&(rt-=$e.length,$e=this.options.pedantic?$e.replace(/^ {1,4}/gm,""):$e.replace(new RegExp("^ {1,"+rt+"}","gm"),"")),pt!==yt-1&&(xt=this.rules.block.bullet.exec(lt[pt+1])[0],(Qe?xt.length===1||!ne&&xt[xt.length-1]===")":xt.length>1||this.options.smartLists&&xt!==je)&&(ft=lt.slice(pt+1).join(`
|
|
|
`),Ze.raw=Ze.raw.substring(0,Ze.raw.length-ft.length),pt=yt-1)),st=Be||/\n\n(?!\s*$)/.test($e),pt!==yt-1&&(Be=$e.charAt($e.length-1)===`
|
|
|
`,st||(st=Be)),st&&(Ze.loose=!0),Ne=/^\[[ xX]\] /.test($e),Ge=void 0,Ne&&(Ge=$e[1]!==" ",$e=$e.replace(/^\[[ xX]\] +/,"")),Ze.items.push({type:"list_item",raw:de,task:Ne,checked:Ge,loose:st,text:$e});return Ze}},Pe.html=function(ve){var xe=this.rules.block.html.exec(ve);if(xe)return{type:this.options.sanitize?"paragraph":"html",raw:xe[0],pre:!this.options.sanitizer&&(xe[1]==="pre"||xe[1]==="script"||xe[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(xe[0]):Z(xe[0]):xe[0]}},Pe.def=function(ve){var xe=this.rules.block.def.exec(ve);if(xe){xe[3]&&(xe[3]=xe[3].substring(1,xe[3].length-1));var de=xe[1].toLowerCase().replace(/\s+/g," ");return{tag:de,raw:xe[0],href:xe[2],title:xe[3]}}},Pe.table=function(ve){var xe=this.rules.block.table.exec(ve);if(xe){var de={type:"table",header:B(xe[1].replace(/^ *| *\| *$/g,"")),align:xe[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:xe[3]?xe[3].replace(/\n$/,"").split(`
|
|
|
`):[]};if(de.header.length===de.align.length){de.raw=xe[0];var je=de.align.length,Qe;for(Qe=0;Qe<je;Qe++)/^ *-+: *$/.test(de.align[Qe])?de.align[Qe]="right":/^ *:-+: *$/.test(de.align[Qe])?de.align[Qe]="center":/^ *:-+ *$/.test(de.align[Qe])?de.align[Qe]="left":de.align[Qe]=null;for(je=de.cells.length,Qe=0;Qe<je;Qe++)de.cells[Qe]=B(de.cells[Qe].replace(/^ *\| *| *\| *$/g,""),de.header.length);return de}}},Pe.lheading=function(ve){var xe=this.rules.block.lheading.exec(ve);if(xe)return{type:"heading",raw:xe[0],depth:xe[2].charAt(0)==="="?1:2,text:xe[1]}},Pe.paragraph=function(ve){var xe=this.rules.block.paragraph.exec(ve);if(xe)return{type:"paragraph",raw:xe[0],text:xe[1].charAt(xe[1].length-1)===`
|
|
|
`?xe[1].slice(0,-1):xe[1]}},Pe.text=function(ve,xe){var de=this.rules.block.text.exec(ve);if(de){var je=xe[xe.length-1];return je&&je.type==="text"?{raw:de[0],text:de[0]}:{type:"text",raw:de[0],text:de[0]}}},Pe.escape=function(ve){var xe=this.rules.inline.escape.exec(ve);if(xe)return{type:"escape",raw:xe[0],text:Z(xe[1])}},Pe.tag=function(ve,xe,de){var je=this.rules.inline.tag.exec(ve);if(je)return!xe&&/^<a /i.test(je[0])?xe=!0:xe&&/^<\/a>/i.test(je[0])&&(xe=!1),!de&&/^<(pre|code|kbd|script)(\s|>)/i.test(je[0])?de=!0:de&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(je[0])&&(de=!1),{type:this.options.sanitize?"text":"html",raw:je[0],inLink:xe,inRawBlock:de,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(je[0]):Z(je[0]):je[0]}},Pe.link=function(ve){var xe=this.rules.inline.link.exec(ve);if(xe){var de=re(xe[2],"()");if(de>-1){var je=xe[0].indexOf("!")===0?5:4,Qe=je+xe[1].length+de;xe[2]=xe[2].substring(0,de),xe[0]=xe[0].substring(0,Qe).trim(),xe[3]=""}var ne=xe[2],Ze="";if(this.options.pedantic){var lt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(ne);lt?(ne=lt[1],Ze=lt[3]):Ze=""}else Ze=xe[3]?xe[3].slice(1,-1):"";ne=ne.trim().replace(/^<([\s\S]*)>$/,"$1");var Be=he(xe,{href:ne&&ne.replace(this.rules.inline._escapes,"$1"),title:Ze&&Ze.replace(this.rules.inline._escapes,"$1")},xe[0]);return Be}},Pe.reflink=function(ve,xe){var de;if((de=this.rules.inline.reflink.exec(ve))||(de=this.rules.inline.nolink.exec(ve))){var je=(de[2]||de[1]).replace(/\s+/g," ");if(je=xe[je.toLowerCase()],!je||!je.href){var Qe=de[0].charAt(0);return{type:"text",raw:Qe,text:Qe}}var ne=he(de,je,de[0]);return ne}},Pe.strong=function(ve,xe,de){de===void 0&&(de="");var je=this.rules.inline.strong.start.exec(ve);if(je&&(!je[1]||je[1]&&(de===""||this.rules.inline.punctuation.exec(de)))){xe=xe.slice(-1*ve.length);var Qe=je[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Qe.lastIndex=0;for(var ne;(je=Qe.exec(xe))!=null;)if(ne=this.rules.inline.strong.middle.exec(xe.slice(0,je.index+3)),ne)return{type:"strong",raw:ve.slice(0,ne[0].length),text:ve.slice(2,ne[0].length-2)}}},Pe.em=function(ve,xe,de){de===void 0&&(de="");var je=this.rules.inline.em.start.exec(ve);if(je&&(!je[1]||je[1]&&(de===""||this.rules.inline.punctuation.exec(de)))){xe=xe.slice(-1*ve.length);var Qe=je[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Qe.lastIndex=0;for(var ne;(je=Qe.exec(xe))!=null;)if(ne=this.rules.inline.em.middle.exec(xe.slice(0,je.index+2)),ne)return{type:"em",raw:ve.slice(0,ne[0].length),text:ve.slice(1,ne[0].length-1)}}},Pe.codespan=function(ve){var xe=this.rules.inline.code.exec(ve);if(xe){var de=xe[2].replace(/\n/g," "),je=/[^ ]/.test(de),Qe=de.startsWith(" ")&&de.endsWith(" ");return je&&Qe&&(de=de.substring(1,de.length-1)),de=Z(de,!0),{type:"codespan",raw:xe[0],text:de}}},Pe.br=function(ve){var xe=this.rules.inline.br.exec(ve);if(xe)return{type:"br",raw:xe[0]}},Pe.del=function(ve){var xe=this.rules.inline.del.exec(ve);if(xe)return{type:"del",raw:xe[0],text:xe[1]}},Pe.autolink=function(ve,xe){var de=this.rules.inline.autolink.exec(ve);if(de){var je,Qe;return de[2]==="@"?(je=Z(this.options.mangle?xe(de[1]):de[1]),Qe="mailto:"+je):(je=Z(de[1]),Qe=je),{type:"link",raw:de[0],text:je,href:Qe,tokens:[{type:"text",raw:je,text:je}]}}},Pe.url=function(ve,xe){var de;if(de=this.rules.inline.url.exec(ve)){var je,Qe;if(de[2]==="@")je=Z(this.options.mangle?xe(de[0]):de[0]),Qe="mailto:"+je;else{var ne;do ne=de[0],de[0]=this.rules.inline._backpedal.exec(de[0])[0];while(ne!==de[0]);je=Z(de[0]),de[1]==="www."?Qe="http://"+je:Qe=je}return{type:"link",raw:de[0],text:je,href:Qe,tokens:[{type:"text",raw:je,text:je}]}}},Pe.inlineText=function(ve,xe,de){var je=this.rules.inline.text.exec(ve);if(je){var Qe;return xe?Qe=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(je[0]):Z(je[0]):je[0]:Qe=Z(this.options.smartypants?de(je[0]):je[0]),{type:"text",raw:je[0],text:Qe}}},Ye}(),te=F.noopTest,Re=F.edit,Te=F.merge,pe={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:te,table:te,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};pe._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,pe._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,pe.def=Re(pe.def).replace("label",pe._label).replace("title",pe._title).getRegex(),pe.bullet=/(?:[*+-]|\d{1,9}[.)])/,pe.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,pe.item=Re(pe.item,"gm").replace(/bull/g,pe.bullet).getRegex(),pe.list=Re(pe.list).replace(/bull/g,pe.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+pe.def.source+")").getRegex(),pe._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",pe._comment=/<!--(?!-?>)[\s\S]*?-->/,pe.html=Re(pe.html,"i").replace("comment",pe._comment).replace("tag",pe._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),pe.paragraph=Re(pe._paragraph).replace("hr",pe.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",pe._tag).getRegex(),pe.blockquote=Re(pe.blockquote).replace("paragraph",pe.paragraph).getRegex(),pe.normal=Te({},pe),pe.gfm=Te({},pe.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*|$)"}),pe.gfm.nptable=Re(pe.gfm.nptable).replace("hr",pe.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",pe._tag).getRegex(),pe.gfm.table=Re(pe.gfm.table).replace("hr",pe.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",pe._tag).getRegex(),pe.pedantic=Te({},pe.normal,{html:Re(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",pe._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:te,paragraph:Re(pe.normal._paragraph).replace("hr",pe.hr).replace("heading",` *#{1,6} *[^
|
|
|
]`).replace("lheading",pe.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var me={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:te,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:te,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};me._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",me.punctuation=Re(me.punctuation).replace(/punctuation/g,me._punctuation).getRegex(),me._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",me._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",me.em.start=Re(me.em.start).replace(/punctuation/g,me._punctuation).getRegex(),me.em.middle=Re(me.em.middle).replace(/punctuation/g,me._punctuation).replace(/overlapSkip/g,me._overlapSkip).getRegex(),me.em.endAst=Re(me.em.endAst,"g").replace(/punctuation/g,me._punctuation).getRegex(),me.em.endUnd=Re(me.em.endUnd,"g").replace(/punctuation/g,me._punctuation).getRegex(),me.strong.start=Re(me.strong.start).replace(/punctuation/g,me._punctuation).getRegex(),me.strong.middle=Re(me.strong.middle).replace(/punctuation/g,me._punctuation).replace(/blockSkip/g,me._blockSkip).getRegex(),me.strong.endAst=Re(me.strong.endAst,"g").replace(/punctuation/g,me._punctuation).getRegex(),me.strong.endUnd=Re(me.strong.endUnd,"g").replace(/punctuation/g,me._punctuation).getRegex(),me.blockSkip=Re(me._blockSkip,"g").getRegex(),me.overlapSkip=Re(me._overlapSkip,"g").getRegex(),me._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,me._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,me._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])?)+(?![-_])/,me.autolink=Re(me.autolink).replace("scheme",me._scheme).replace("email",me._email).getRegex(),me._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,me.tag=Re(me.tag).replace("comment",pe._comment).replace("attribute",me._attribute).getRegex(),me._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,me._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,me._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,me.link=Re(me.link).replace("label",me._label).replace("href",me._href).replace("title",me._title).getRegex(),me.reflink=Re(me.reflink).replace("label",me._label).getRegex(),me.reflinkSearch=Re(me.reflinkSearch,"g").replace("reflink",me.reflink).replace("nolink",me.nolink).getRegex(),me.normal=Te({},me),me.pedantic=Te({},me.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:Re(/^!?\[(label)\]\((.*?)\)/).replace("label",me._label).getRegex(),reflink:Re(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",me._label).getRegex()}),me.gfm=Te({},me.normal,{escape:Re(me.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),me.gfm.url=Re(me.gfm.url,"i").replace("email",me.gfm._extended_email).getRegex(),me.breaks=Te({},me.gfm,{br:Re(me.br).replace("{2,}","*").getRegex(),text:Re(me.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var se={block:pe,inline:me},be=_.defaults,ae=se.block,fe=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 ie(Ye){var Pe="",He,ve,xe=Ye.length;for(He=0;He<xe;He++)ve=Ye.charCodeAt(He),Math.random()>.5&&(ve="x"+ve.toString(16)),Pe+="&#"+ve+";";return Pe}var q=function(){function Ye(He){this.tokens=[],this.tokens.links=Object.create(null),this.options=He||be,this.options.tokenizer=this.options.tokenizer||new ke,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ve={block:ae.normal,inline:fe.normal};this.options.pedantic?(ve.block=ae.pedantic,ve.inline=fe.pedantic):this.options.gfm&&(ve.block=ae.gfm,this.options.breaks?ve.inline=fe.breaks:ve.inline=fe.gfm),this.tokenizer.rules=ve}Ye.lex=function(ve,xe){var de=new Ye(xe);return de.lex(ve)};var Pe=Ye.prototype;return Pe.lex=function(ve){return ve=ve.replace(/\r\n|\r/g,`
|
|
|
`).replace(/\t/g," "),this.blockTokens(ve,this.tokens,!0),this.inline(this.tokens),this.tokens},Pe.blockTokens=function(ve,xe,de){xe===void 0&&(xe=[]),de===void 0&&(de=!0),ve=ve.replace(/^ +$/gm,"");for(var je,Qe,ne,Ze;ve;){if(je=this.tokenizer.space(ve)){ve=ve.substring(je.raw.length),je.type&&xe.push(je);continue}if(je=this.tokenizer.code(ve,xe)){ve=ve.substring(je.raw.length),je.type?xe.push(je):(Ze=xe[xe.length-1],Ze.raw+=`
|
|
|
`+je.raw,Ze.text+=`
|
|
|
`+je.text);continue}if(je=this.tokenizer.fences(ve)){ve=ve.substring(je.raw.length),xe.push(je);continue}if(je=this.tokenizer.heading(ve)){ve=ve.substring(je.raw.length),xe.push(je);continue}if(je=this.tokenizer.nptable(ve)){ve=ve.substring(je.raw.length),xe.push(je);continue}if(je=this.tokenizer.hr(ve)){ve=ve.substring(je.raw.length),xe.push(je);continue}if(je=this.tokenizer.blockquote(ve)){ve=ve.substring(je.raw.length),je.tokens=this.blockTokens(je.text,[],de),xe.push(je);continue}if(je=this.tokenizer.list(ve)){for(ve=ve.substring(je.raw.length),ne=je.items.length,Qe=0;Qe<ne;Qe++)je.items[Qe].tokens=this.blockTokens(je.items[Qe].text,[],!1);xe.push(je);continue}if(je=this.tokenizer.html(ve)){ve=ve.substring(je.raw.length),xe.push(je);continue}if(de&&(je=this.tokenizer.def(ve))){ve=ve.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(ve)){ve=ve.substring(je.raw.length),xe.push(je);continue}if(je=this.tokenizer.lheading(ve)){ve=ve.substring(je.raw.length),xe.push(je);continue}if(de&&(je=this.tokenizer.paragraph(ve))){ve=ve.substring(je.raw.length),xe.push(je);continue}if(je=this.tokenizer.text(ve,xe)){ve=ve.substring(je.raw.length),je.type?xe.push(je):(Ze=xe[xe.length-1],Ze.raw+=`
|
|
|
`+je.raw,Ze.text+=`
|
|
|
`+je.text);continue}if(ve){var lt="Infinite loop on byte: "+ve.charCodeAt(0);if(this.options.silent){console.error(lt);break}else throw new Error(lt)}}return xe},Pe.inline=function(ve){var xe,de,je,Qe,ne,Ze,lt=ve.length;for(xe=0;xe<lt;xe++){Ze=ve[xe];switch(Ze.type){case"paragraph":case"text":case"heading":{Ze.tokens=[],this.inlineTokens(Ze.text,Ze.tokens);break}case"table":{for(Ze.tokens={header:[],cells:[]},Qe=Ze.header.length,de=0;de<Qe;de++)Ze.tokens.header[de]=[],this.inlineTokens(Ze.header[de],Ze.tokens.header[de]);for(Qe=Ze.cells.length,de=0;de<Qe;de++)for(ne=Ze.cells[de],Ze.tokens.cells[de]=[],je=0;je<ne.length;je++)Ze.tokens.cells[de][je]=[],this.inlineTokens(ne[je],Ze.tokens.cells[de][je]);break}case"blockquote":{this.inline(Ze.tokens);break}case"list":{for(Qe=Ze.items.length,de=0;de<Qe;de++)this.inline(Ze.items[de].tokens);break}}}return ve},Pe.inlineTokens=function(ve,xe,de,je,Qe){xe===void 0&&(xe=[]),de===void 0&&(de=!1),je===void 0&&(je=!1),Qe===void 0&&(Qe="");var ne,Ze=ve,lt;if(this.tokens.links){var Be=Object.keys(this.tokens.links);if(Be.length>0)for(;(lt=this.tokenizer.rules.inline.reflinkSearch.exec(Ze))!=null;)Be.includes(lt[0].slice(lt[0].lastIndexOf("[")+1,-1))&&(Ze=Ze.slice(0,lt.index)+"["+"a".repeat(lt[0].length-2)+"]"+Ze.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(lt=this.tokenizer.rules.inline.blockSkip.exec(Ze))!=null;)Ze=Ze.slice(0,lt.index)+"["+"a".repeat(lt[0].length-2)+"]"+Ze.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;ve;){if(ne=this.tokenizer.escape(ve)){ve=ve.substring(ne.raw.length),xe.push(ne);continue}if(ne=this.tokenizer.tag(ve,de,je)){ve=ve.substring(ne.raw.length),de=ne.inLink,je=ne.inRawBlock,xe.push(ne);continue}if(ne=this.tokenizer.link(ve)){ve=ve.substring(ne.raw.length),ne.type==="link"&&(ne.tokens=this.inlineTokens(ne.text,[],!0,je)),xe.push(ne);continue}if(ne=this.tokenizer.reflink(ve,this.tokens.links)){ve=ve.substring(ne.raw.length),ne.type==="link"&&(ne.tokens=this.inlineTokens(ne.text,[],!0,je)),xe.push(ne);continue}if(ne=this.tokenizer.strong(ve,Ze,Qe)){ve=ve.substring(ne.raw.length),ne.tokens=this.inlineTokens(ne.text,[],de,je),xe.push(ne);continue}if(ne=this.tokenizer.em(ve,Ze,Qe)){ve=ve.substring(ne.raw.length),ne.tokens=this.inlineTokens(ne.text,[],de,je),xe.push(ne);continue}if(ne=this.tokenizer.codespan(ve)){ve=ve.substring(ne.raw.length),xe.push(ne);continue}if(ne=this.tokenizer.br(ve)){ve=ve.substring(ne.raw.length),xe.push(ne);continue}if(ne=this.tokenizer.del(ve)){ve=ve.substring(ne.raw.length),ne.tokens=this.inlineTokens(ne.text,[],de,je),xe.push(ne);continue}if(ne=this.tokenizer.autolink(ve,ie)){ve=ve.substring(ne.raw.length),xe.push(ne);continue}if(!de&&(ne=this.tokenizer.url(ve,ie))){ve=ve.substring(ne.raw.length),xe.push(ne);continue}if(ne=this.tokenizer.inlineText(ve,je,Fe)){ve=ve.substring(ne.raw.length),Qe=ne.raw.slice(-1),xe.push(ne);continue}if(ve){var $e="Infinite loop on byte: "+ve.charCodeAt(0);if(this.options.silent){console.error($e);break}else throw new Error($e)}}return xe},v(Ye,null,[{key:"rules",get:function(){return{block:ae,inline:fe}}}]),Ye}(),Q=_.defaults,Y=F.cleanUrl,oe=F.escape,le=function(){function Ye(He){this.options=He||Q}var Pe=Ye.prototype;return Pe.code=function(ve,xe,de){var je=(xe||"").match(/\S*/)[0];if(this.options.highlight){var Qe=this.options.highlight(ve,je);Qe!=null&&Qe!==ve&&(de=!0,ve=Qe)}return je?'<pre><code class="'+this.options.langPrefix+oe(je,!0)+'">'+(de?ve:oe(ve,!0))+`</code></pre>
|
|
|
`:"<pre><code>"+(de?ve:oe(ve,!0))+`</code></pre>
|
|
|
`},Pe.blockquote=function(ve){return`<blockquote>
|
|
|
`+ve+`</blockquote>
|
|
|
`},Pe.html=function(ve){return ve},Pe.heading=function(ve,xe,de,je){return this.options.headerIds?"<h"+xe+' id="'+this.options.headerPrefix+je.slug(de)+'">'+ve+"</h"+xe+`>
|
|
|
`:"<h"+xe+">"+ve+"</h"+xe+`>
|
|
|
`},Pe.hr=function(){return this.options.xhtml?`<hr/>
|
|
|
`:`<hr>
|
|
|
`},Pe.list=function(ve,xe,de){var je=xe?"ol":"ul",Qe=xe&&de!==1?' start="'+de+'"':"";return"<"+je+Qe+`>
|
|
|
`+ve+"</"+je+`>
|
|
|
`},Pe.listitem=function(ve){return"<li>"+ve+`</li>
|
|
|
`},Pe.checkbox=function(ve){return"<input "+(ve?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Pe.paragraph=function(ve){return"<p>"+ve+`</p>
|
|
|
`},Pe.table=function(ve,xe){return xe&&(xe="<tbody>"+xe+"</tbody>"),`<table>
|
|
|
<thead>
|
|
|
`+ve+`</thead>
|
|
|
`+xe+`</table>
|
|
|
`},Pe.tablerow=function(ve){return`<tr>
|
|
|
`+ve+`</tr>
|
|
|
`},Pe.tablecell=function(ve,xe){var de=xe.header?"th":"td",je=xe.align?"<"+de+' align="'+xe.align+'">':"<"+de+">";return je+ve+"</"+de+`>
|
|
|
`},Pe.strong=function(ve){return"<strong>"+ve+"</strong>"},Pe.em=function(ve){return"<em>"+ve+"</em>"},Pe.codespan=function(ve){return"<code>"+ve+"</code>"},Pe.br=function(){return this.options.xhtml?"<br/>":"<br>"},Pe.del=function(ve){return"<del>"+ve+"</del>"},Pe.link=function(ve,xe,de){if(ve=Y(this.options.sanitize,this.options.baseUrl,ve),ve===null)return de;var je='<a href="'+oe(ve)+'"';return xe&&(je+=' title="'+xe+'"'),je+=">"+de+"</a>",je},Pe.image=function(ve,xe,de){if(ve=Y(this.options.sanitize,this.options.baseUrl,ve),ve===null)return de;var je='<img src="'+ve+'" alt="'+de+'"';return xe&&(je+=' title="'+xe+'"'),je+=this.options.xhtml?"/>":">",je},Pe.text=function(ve){return ve},Ye}(),Ee=function(){function Ye(){}var Pe=Ye.prototype;return Pe.strong=function(ve){return ve},Pe.em=function(ve){return ve},Pe.codespan=function(ve){return ve},Pe.del=function(ve){return ve},Pe.html=function(ve){return ve},Pe.text=function(ve){return ve},Pe.link=function(ve,xe,de){return""+de},Pe.image=function(ve,xe,de){return""+de},Pe.br=function(){return""},Ye}(),Le=function(){function Ye(){this.seen={}}var Pe=Ye.prototype;return Pe.slug=function(ve){var xe=ve.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(xe)){var de=xe;do this.seen[de]++,xe=de+"-"+this.seen[de];while(this.seen.hasOwnProperty(xe))}return this.seen[xe]=0,xe},Ye}(),ge=_.defaults,De=F.unescape,_e=function(){function Ye(He){this.options=He||ge,this.options.renderer=this.options.renderer||new le,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ee,this.slugger=new Le}Ye.parse=function(ve,xe){var de=new Ye(xe);return de.parse(ve)};var Pe=Ye.prototype;return Pe.parse=function(ve,xe){xe===void 0&&(xe=!0);var de="",je,Qe,ne,Ze,lt,Be,$e,rt,xt,ft,st,Ne,Ge,yt,pt,jt,Bt,gt,Ht=ve.length;for(je=0;je<Ht;je++){ft=ve[je];switch(ft.type){case"space":continue;case"hr":{de+=this.renderer.hr();continue}case"heading":{de+=this.renderer.heading(this.parseInline(ft.tokens),ft.depth,De(this.parseInline(ft.tokens,this.textRenderer)),this.slugger);continue}case"code":{de+=this.renderer.code(ft.text,ft.lang,ft.escaped);continue}case"table":{for(rt="",$e="",Ze=ft.header.length,Qe=0;Qe<Ze;Qe++)$e+=this.renderer.tablecell(this.parseInline(ft.tokens.header[Qe]),{header:!0,align:ft.align[Qe]});for(rt+=this.renderer.tablerow($e),xt="",Ze=ft.cells.length,Qe=0;Qe<Ze;Qe++){for(Be=ft.tokens.cells[Qe],$e="",lt=Be.length,ne=0;ne<lt;ne++)$e+=this.renderer.tablecell(this.parseInline(Be[ne]),{header:!1,align:ft.align[ne]});xt+=this.renderer.tablerow($e)}de+=this.renderer.table(rt,xt);continue}case"blockquote":{xt=this.parse(ft.tokens),de+=this.renderer.blockquote(xt);continue}case"list":{for(st=ft.ordered,Ne=ft.start,Ge=ft.loose,Ze=ft.items.length,xt="",Qe=0;Qe<Ze;Qe++)pt=ft.items[Qe],jt=pt.checked,Bt=pt.task,yt="",pt.task&&(gt=this.renderer.checkbox(jt),Ge?pt.tokens.length>0&&pt.tokens[0].type==="text"?(pt.tokens[0].text=gt+" "+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=gt+" "+pt.tokens[0].tokens[0].text)):pt.tokens.unshift({type:"text",text:gt}):yt+=gt),yt+=this.parse(pt.tokens,Ge),xt+=this.renderer.listitem(yt,Bt,jt);de+=this.renderer.list(xt,st,Ne);continue}case"html":{de+=this.renderer.html(ft.text);continue}case"paragraph":{de+=this.renderer.paragraph(this.parseInline(ft.tokens));continue}case"text":{for(xt=ft.tokens?this.parseInline(ft.tokens):ft.text;je+1<Ht&&ve[je+1].type==="text";)ft=ve[++je],xt+=`
|
|
|
`+(ft.tokens?this.parseInline(ft.tokens):ft.text);de+=xe?this.renderer.paragraph(xt):xt;continue}default:{var Ut='Token with "'+ft.type+'" type was not found.';if(this.options.silent){console.error(Ut);return}else throw new Error(Ut)}}}return de},Pe.parseInline=function(ve,xe){xe=xe||this.renderer;var de="",je,Qe,ne=ve.length;for(je=0;je<ne;je++){Qe=ve[je];switch(Qe.type){case"escape":{de+=xe.text(Qe.text);break}case"html":{de+=xe.html(Qe.text);break}case"link":{de+=xe.link(Qe.href,Qe.title,this.parseInline(Qe.tokens,xe));break}case"image":{de+=xe.image(Qe.href,Qe.title,Qe.text);break}case"strong":{de+=xe.strong(this.parseInline(Qe.tokens,xe));break}case"em":{de+=xe.em(this.parseInline(Qe.tokens,xe));break}case"codespan":{de+=xe.codespan(Qe.text);break}case"br":{de+=xe.br();break}case"del":{de+=xe.del(this.parseInline(Qe.tokens,xe));break}case"text":{de+=xe.text(Qe.text);break}default:{var Ze='Token with "'+Qe.type+'" type was not found.';if(this.options.silent){console.error(Ze);return}else throw new Error(Ze)}}}return de},Ye}(),Xe=F.merge,tt=F.checkSanitizeDeprecation,ze=F.escape,Me=_.getDefaults,Et=_.changeDefaults,Oe=_.defaults;function Ve(Ye,Pe,He){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 Pe=="function"&&(He=Pe,Pe=null),Pe=Xe({},Ve.defaults,Pe||{}),tt(Pe),He){var ve=Pe.highlight,xe;try{xe=q.lex(Ye,Pe)}catch(ne){return He(ne)}var de=function(Ze){var lt;if(!Ze)try{lt=_e.parse(xe,Pe)}catch(Be){Ze=Be}return Pe.highlight=ve,Ze?He(Ze):He(null,lt)};if(!ve||ve.length<3)return de();if(delete Pe.highlight,!xe.length)return de();var je=0;Ve.walkTokens(xe,function(ne){ne.type==="code"&&(je++,setTimeout(function(){ve(ne.text,ne.lang,function(Ze,lt){if(Ze)return de(Ze);lt!=null&<!==ne.text&&(ne.text=lt,ne.escaped=!0),je--,je===0&&de()})},0))}),je===0&&de();return}try{var Qe=q.lex(Ye,Pe);return Pe.walkTokens&&Ve.walkTokens(Qe,Pe.walkTokens),_e.parse(Qe,Pe)}catch(ne){if(ne.message+=`
|
|
|
Please report this to https://github.com/markedjs/marked.`,Pe.silent)return"<p>An error occurred:</p><pre>"+ze(ne.message+"",!0)+"</pre>";throw ne}}Ve.options=Ve.setOptions=function(Ye){return Xe(Ve.defaults,Ye),Et(Ve.defaults),Ve},Ve.getDefaults=Me,Ve.defaults=Oe,Ve.use=function(Ye){var Pe=Xe({},Ye);if(Ye.renderer&&function(){var ve=Ve.defaults.renderer||new le,xe=function(Qe){var ne=ve[Qe];ve[Qe]=function(){for(var Ze=arguments.length,lt=new Array(Ze),Be=0;Be<Ze;Be++)lt[Be]=arguments[Be];var $e=Ye.renderer[Qe].apply(ve,lt);return $e===!1&&($e=ne.apply(ve,lt)),$e}};for(var de in Ye.renderer)xe(de);Pe.renderer=ve}(),Ye.tokenizer&&function(){var ve=Ve.defaults.tokenizer||new ke,xe=function(Qe){var ne=ve[Qe];ve[Qe]=function(){for(var Ze=arguments.length,lt=new Array(Ze),Be=0;Be<Ze;Be++)lt[Be]=arguments[Be];var $e=Ye.tokenizer[Qe].apply(ve,lt);return $e===!1&&($e=ne.apply(ve,lt)),$e}};for(var de in Ye.tokenizer)xe(de);Pe.tokenizer=ve}(),Ye.walkTokens){var He=Ve.defaults.walkTokens;Pe.walkTokens=function(ve){Ye.walkTokens(ve),He&&He(ve)}}Ve.setOptions(Pe)},Ve.walkTokens=function(Ye,Pe){for(var He=g(Ye),ve;!(ve=He()).done;){var xe=ve.value;Pe(xe);switch(xe.type){case"table":{for(var de=g(xe.tokens.header),je;!(je=de()).done;){var Qe=je.value;Ve.walkTokens(Qe,Pe)}for(var ne=g(xe.tokens.cells),Ze;!(Ze=ne()).done;)for(var lt=Ze.value,Be=g(lt),$e;!($e=Be()).done;){var rt=$e.value;Ve.walkTokens(rt,Pe)}break}case"list":{Ve.walkTokens(xe.items,Pe);break}default:xe.tokens&&Ve.walkTokens(xe.tokens,Pe)}}},Ve.Parser=_e,Ve.parser=_e.parse,Ve.Renderer=le,Ve.TextRenderer=Ee,Ve.Lexer=q,Ve.lexer=q.lex,Ve.Tokenizer=ke,Ve.Slugger=Le,Ve.parse=Ve;var Je=Ve;return Je})},"DlR+":function(j,H,b){var I=b("MFOe"),v=I.Global,T=I.trim;j.exports={name:"cookieStorage",read:g,write:_,each:s,remove:p,clearAll:e};var y=v.document;function g(n){if(!n||!o(n))return null;var l="(?:^|.*;\\s*)"+escape(n).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(y.cookie.replace(new RegExp(l),"$1"))}function s(n){for(var l=y.cookie.split(/; ?/g),r=l.length-1;r>=0;r--){if(!T(l[r]))continue;var i=l[r].split("="),t=unescape(i[0]),a=unescape(i[1]);n(a,t)}}function _(n,l){if(!n)return;y.cookie=escape(n)+"="+escape(l)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function p(n){if(!n||!o(n))return;y.cookie=escape(n)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function e(){s(function(n,l){p(l)})}function o(n){return new RegExp("(?:^|;\\s*)"+escape(n).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(y.cookie)}},Dqnf:function(j,H,b){"use strict";var I=b("k1fw"),v=b("tJVT"),T=b("rAM+"),y=b("q1tI"),g=b.n(y),s=b("J66h"),_=b.n(s),p=b("/POA"),e=b.n(p),o=b("q7KB"),n=b.n(o),l=b("ER/M"),r=b.n(l),i=b("dhSg"),t=b("bdgK");function a(f,h,u){var E=u._core._renderService.dimensions.actualCellWidth||9.5,x=u._core._renderService.dimensions.actualCellHeight||18,O=Math.floor(h/x),C=Math.floor(f/E);return[C,O]}function c(f,h){var u=new t.default(function(E){var x=Object(T.a)(E),O;try{for(x.s();!(O=x.n()).done;){var C=O.value;if(C.target.offsetHeight>0||C.target.offsetWidth>0){var w=a(C.target.offsetWidth,C.target.offsetHeight,f),S=Object(v.a)(w,2),A=S[0],D=S[1];console.log("cols, rows",A,D),i.a.publish("ssh-xterm-resize",{columns:A,rows:D,width:C.target.offsetWidth,height:C.target.offsetHeight}),f.resize(A,D);var M=s.Base64.decode("IA=="),N=s.Base64.decode("CBtbSw==");f.write(M),f.write(N)}}}catch(P){x.e(P)}finally{x.f()}});return u.observe(h),u}var d=3e4;H.a=function(f){var h=f.sshConfigData,u=f.sid,E=Object(y.useState)(null),x=Object(v.a)(E,2),O=x[0],C=x[1],w=h.link_url,S=h.password,A=h.port,D=Object(y.useRef)(),M=Object(y.useRef)(),N=Object(y.useRef)(!1);return Object(y.useEffect)(function(){if(D.current&&w){var P=new p.Terminal({fontSize:16,rendererType:"dom"});P.open(D.current),P.onData(function(X){M.current&&(M.current.readyState===1&&(M.current.send(JSON.stringify({tp:"client",data:X})),i.a.publish("on-operating-ssh")))}),P.write("Connecting..."),C(P);var z=c(P,D.current);return function(){P.dispose(),z.unobserve(D.current)}}},[w,D.current]),Object(y.useEffect)(function(){if(O&&w){function P(){var L=new WebSocket(w);M.current=L,L.onopen=function(){var B=O.element.parentElement;if(B){var Z=B.offsetWidth,re=B.offsetHeight;console.log("init",{tp:"init",data:Object(I.a)(Object(I.a)({},h),{},{secret:S,width:Z,height:re,rows:O.rows,columns:O.cols})}),L.send(JSON.stringify({tp:"init",data:Object(I.a)(Object(I.a)({},h),{},{secret:S,width:Z,height:re,rows:O.rows,columns:O.cols})}))}O.focus()},L.onerror=function(B){console.log("------in socket error----",B,L,w)},L.onmessage=function(B){N.current||(O.write("\r"),setTimeout(function(){},1e3)),N.current=!0,console.log("event:",B);var Z=s.Base64.decode(B.data.toString()),re=O._core._renderService.dimensions.actualCellWidth||9.5;console.log("data:",Z,re,O),O.write(Z)},L.onclose=function(B){z&&clearInterval(z),O.write(`\r
|
|
|
connection closed`)}}var z=setInterval(function(){M.current&&M.current.send(JSON.stringify({tp:"h"}))},d),X=i.a.subscribe("create-socket",function(L){u==L&&(M.current&&M.current.readyState===1?O.focus():P(),O.focus())}),k=i.a.subscribe("close-socket",function(L){u===L&&(M.current&&(M.current.close(),N.current=!1,O.clear()),M.current=null)}),F=i.a.subscribe("ssh-xterm-resize",function(L){M.current&&M.current.readyState===1&&M.current.send(JSON.stringify({tp:"resize",data:Object(I.a)({},L)}))}),U=i.a.subscribe("ssh-add-connect-time",function(){M.current&&M.current.readyState===1&&M.current.send(JSON.stringify({tp:"overtime"}))});return function(){k(),X(),F(),U(),M.current&&(M.current.close(),N.current=!1)}}},[O,w,A]),g.a.createElement("div",{ref:D,className:r.a["xterm-panel"]},w?null:g.a.createElement("p",{style:{color:"#fff"}},"\u6B63\u5728\u8FDE\u63A5\u547D\u4EE4\u884C\u670D\u52A1..."))}},E4JC:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("ETIr"),b("cv67"),b("K3mO"),b("OLod"))})(this,function(I){return function(){var v=I,T=v.lib,y=T.StreamCipher,g=v.algo,s=[],_=[],p=[],e=g.Rabbit=y.extend({_doReset:function(){for(var n=this._key.words,l=this.cfg.iv,r=0;r<4;r++)n[r]=(n[r]<<8|n[r]>>>24)&16711935|(n[r]<<24|n[r]>>>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],t=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 r=0;r<4;r++)o.call(this);for(var r=0;r<8;r++)t[r]^=i[r+4&7];if(l){var a=l.words,c=a[0],d=a[1],f=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360,h=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360,u=f>>>16|h&4294901760,E=h<<16|f&65535;t[0]^=f,t[1]^=u,t[2]^=h,t[3]^=E,t[4]^=f,t[5]^=u,t[6]^=h,t[7]^=E;for(var r=0;r<4;r++)o.call(this)}},_doProcessBlock:function(n,l){var r=this._X;o.call(this),s[0]=r[0]^r[5]>>>16^r[3]<<16,s[1]=r[2]^r[7]>>>16^r[5]<<16,s[2]=r[4]^r[1]>>>16^r[7]<<16,s[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)s[i]=(s[i]<<8|s[i]>>>24)&16711935|(s[i]<<24|s[i]>>>8)&4278255360,n[l+i]^=s[i]},blockSize:128/32,ivSize:64/32});function o(){for(var n=this._X,l=this._C,r=0;r<8;r++)_[r]=l[r];l[0]=l[0]+1295307597+this._b|0,l[1]=l[1]+3545052371+(l[0]>>>0<_[0]>>>0?1:0)|0,l[2]=l[2]+886263092+(l[1]>>>0<_[1]>>>0?1:0)|0,l[3]=l[3]+1295307597+(l[2]>>>0<_[2]>>>0?1:0)|0,l[4]=l[4]+3545052371+(l[3]>>>0<_[3]>>>0?1:0)|0,l[5]=l[5]+886263092+(l[4]>>>0<_[4]>>>0?1:0)|0,l[6]=l[6]+1295307597+(l[5]>>>0<_[5]>>>0?1:0)|0,l[7]=l[7]+3545052371+(l[6]>>>0<_[6]>>>0?1:0)|0,this._b=l[7]>>>0<_[7]>>>0?1:0;for(var r=0;r<8;r++){var i=n[r]+l[r],t=i&65535,a=i>>>16,c=((t*t>>>17)+t*a>>>15)+a*a,d=((i&4294901760)*i|0)+((i&65535)*i|0);p[r]=c^d}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}v.Rabbit=y._createHelper(e)}(),I.Rabbit})},E7E6:function(j,H){j.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(j,H){j.exports=function(){var b=document.getSelection();if(!b.rangeCount)return function(){};for(var I=document.activeElement,v=[],T=0;T<b.rangeCount;T++)v.push(b.getRangeAt(T));switch(I.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":I.blur();break;default:I=null;break}return b.removeAllRanges(),function(){b.type==="Caret"&&b.removeAllRanges(),b.rangeCount||v.forEach(function(y){b.addRange(y)}),I&&I.focus()}}},ELLl:function(j,H,b){(function(I){I(b("VrN/"))})(function(I){var v={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},T=I.Pos;I.defineOption("autoCloseBrackets",!1,function(t,a,c){c&&c!=I.Init&&(t.removeKeyMap(g),t.state.closeBrackets=null),a&&(s(y(a,"pairs")),t.state.closeBrackets=a,t.addKeyMap(g))});function y(t,a){return a=="pairs"&&typeof t=="string"?t:typeof t=="object"&&t[a]!=null?t[a]:v[a]}var g={Backspace:e,Enter:o};function s(t){for(var a=0;a<t.length;a++){var c=t.charAt(a),d="'"+c+"'";g[d]||(g[d]=_(c))}}s(v.pairs+"`");function _(t){return function(a){return l(a,t)}}function p(t){var a=t.state.closeBrackets;if(!a||a.override)return a;var c=t.getModeAt(t.getCursor());return c.closeBrackets||a}function e(t){var a=p(t);if(!a||t.getOption("disableInput"))return I.Pass;for(var c=y(a,"pairs"),d=t.listSelections(),f=0;f<d.length;f++){if(!d[f].empty())return I.Pass;var h=r(t,d[f].head);if(!h||c.indexOf(h)%2!=0)return I.Pass}for(var f=d.length-1;f>=0;f--){var u=d[f].head;t.replaceRange("",T(u.line,u.ch-1),T(u.line,u.ch+1),"+delete")}}function o(t){var a=p(t),c=a&&y(a,"explode");if(!c||t.getOption("disableInput"))return I.Pass;for(var d=t.listSelections(),f=0;f<d.length;f++){if(!d[f].empty())return I.Pass;var h=r(t,d[f].head);if(!h||c.indexOf(h)%2!=0)return I.Pass}t.operation(function(){var u=t.lineSeparator()||`
|
|
|
`;t.replaceSelection(u+u,null),t.execCommand("goCharLeft"),d=t.listSelections();for(var E=0;E<d.length;E++){var x=d[E].head.line;t.indentLine(x,null,!0),t.indentLine(x+1,null,!0)}})}function n(t){var a=I.cmpPos(t.anchor,t.head)>0;return{anchor:new T(t.anchor.line,t.anchor.ch+(a?-1:1)),head:new T(t.head.line,t.head.ch+(a?1:-1))}}function l(t,a){var c=p(t);if(!c||t.getOption("disableInput"))return I.Pass;var d=y(c,"pairs"),f=d.indexOf(a);if(f==-1)return I.Pass;for(var h=y(c,"closeBefore"),u=y(c,"triples"),E=d.charAt(f+1)==a,x=t.listSelections(),O=f%2==0,C,w=0;w<x.length;w++){var S=x[w],A=S.head,D,M=t.getRange(A,T(A.line,A.ch+1));if(O&&!S.empty())D="surround";else if((E||!O)&&M==a)E&&i(t,A)?D="both":u.indexOf(a)>=0&&t.getRange(A,T(A.line,A.ch+3))==a+a+a?D="skipThree":D="skip";else if(E&&A.ch>1&&u.indexOf(a)>=0&&t.getRange(T(A.line,A.ch-2),A)==a+a){if(A.ch>2&&/\bstring/.test(t.getTokenTypeAt(T(A.line,A.ch-2))))return I.Pass;D="addFour"}else if(E){var N=A.ch==0?" ":t.getRange(T(A.line,A.ch-1),A);if(!I.isWordChar(M)&&N!=a&&!I.isWordChar(N))D="both";else return I.Pass}else if(O&&(M.length===0||/\s/.test(M)||h.indexOf(M)>-1))D="both";else return I.Pass;if(!C)C=D;else if(C!=D)return I.Pass}var P=f%2?d.charAt(f-1):a,z=f%2?a:d.charAt(f+1);t.operation(function(){if(C=="skip")t.execCommand("goCharRight");else if(C=="skipThree")for(var X=0;X<3;X++)t.execCommand("goCharRight");else if(C=="surround"){for(var k=t.getSelections(),X=0;X<k.length;X++)k[X]=P+k[X]+z;t.replaceSelections(k,"around"),k=t.listSelections().slice();for(var X=0;X<k.length;X++)k[X]=n(k[X]);t.setSelections(k)}else C=="both"?(t.replaceSelection(P+z,null),t.triggerElectric(P+z),t.execCommand("goCharLeft")):C=="addFour"&&(t.replaceSelection(P+P+P+P,"before"),t.execCommand("goCharRight"))})}function r(t,a){var c=t.getRange(T(a.line,a.ch-1),T(a.line,a.ch+1));return c.length==2?c:null}function i(t,a){var c=t.getTokenAt(T(a.line,a.ch+1));return/\bstring/.test(c.type)&&c.start==a.ch&&(a.ch==0||!/\bstring/.test(t.getTokenTypeAt(a)))}})},ELcG:function(j,H,b){(function(I,v){j.exports=H=v(b("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(v){var T=I,y=T.lib,g=y.WordArray,s=y.Hasher,_=T.algo,p=g.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]),e=g.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]),o=g.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=g.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]),l=g.create([0,1518500249,1859775393,2400959708,2840853838]),r=g.create([1352829926,1548603684,1836072691,2053994217,0]),i=_.RIPEMD160=s.extend({_doReset:function(){this._hash=g.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(u,E){for(var x=0;x<16;x++){var O=E+x,C=u[O];u[O]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360}var w=this._hash.words,S=l.words,A=r.words,D=p.words,M=e.words,N=o.words,P=n.words,z,X,k,F,U,L,B,Z,re,he;L=z=w[0],B=X=w[1],Z=k=w[2],re=F=w[3],he=U=w[4];for(var Ce,x=0;x<80;x+=1)Ce=z+u[E+D[x]]|0,x<16?Ce+=t(X,k,F)+S[0]:x<32?Ce+=a(X,k,F)+S[1]:x<48?Ce+=c(X,k,F)+S[2]:x<64?Ce+=d(X,k,F)+S[3]:Ce+=f(X,k,F)+S[4],Ce=Ce|0,Ce=h(Ce,N[x]),Ce=Ce+U|0,z=U,U=F,F=h(k,10),k=X,X=Ce,Ce=L+u[E+M[x]]|0,x<16?Ce+=f(B,Z,re)+A[0]:x<32?Ce+=d(B,Z,re)+A[1]:x<48?Ce+=c(B,Z,re)+A[2]:x<64?Ce+=a(B,Z,re)+A[3]:Ce+=t(B,Z,re)+A[4],Ce=Ce|0,Ce=h(Ce,P[x]),Ce=Ce+he|0,L=he,he=re,re=h(Z,10),Z=B,B=Ce;Ce=w[1]+k+re|0,w[1]=w[2]+F+he|0,w[2]=w[3]+U+L|0,w[3]=w[4]+z+B|0,w[4]=w[0]+X+Z|0,w[0]=Ce},_doFinalize:function(){var u=this._data,E=u.words,x=this._nDataBytes*8,O=u.sigBytes*8;E[O>>>5]|=128<<24-O%32,E[(O+64>>>9<<4)+14]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,u.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 u=s.clone.call(this);return u._hash=this._hash.clone(),u}});function t(u,E,x){return u^E^x}function a(u,E,x){return u&E|~u&x}function c(u,E,x){return(u|~E)^x}function d(u,E,x){return u&x|E&~x}function f(u,E,x){return u^(E|~x)}function h(u,E){return u<<E|u>>>32-E}T.RIPEMD160=s._createHelper(i),T.HmacRIPEMD160=s._createHmacHelper(i)}(Math),I.RIPEMD160})},"ER/M":function(j,H,b){j.exports={"xterm-panel":"xterm-panel___2r2xx"}},ETIr:function(j,H,b){(function(I,v){j.exports=H=v(b("Ib8C"))})(this,function(I){return function(){var v=I,T=v.lib,y=T.WordArray,g=v.enc,s=g.Base64={stringify:function(p){var e=p.words,o=p.sigBytes,n=this._map;p.clamp();for(var l=[],r=0;r<o;r+=3)for(var i=e[r>>>2]>>>24-r%4*8&255,t=e[r+1>>>2]>>>24-(r+1)%4*8&255,a=e[r+2>>>2]>>>24-(r+2)%4*8&255,c=i<<16|t<<8|a,d=0;d<4&&r+d*.75<o;d++)l.push(n.charAt(c>>>6*(3-d)&63));var f=n.charAt(64);if(f)for(;l.length%4;)l.push(f);return l.join("")},parse:function(p){var e=p.length,o=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var l=0;l<o.length;l++)n[o.charCodeAt(l)]=l}var r=o.charAt(64);if(r){var i=p.indexOf(r);i!==-1&&(e=i)}return _(p,e,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function _(p,e,o){for(var n=[],l=0,r=0;r<e;r++)if(r%4){var i=o[p.charCodeAt(r-1)]<<r%4*2,t=o[p.charCodeAt(r)]>>>6-r%4*2,a=i|t;n[l>>>2]|=a<<24-l%4*8,l++}return y.create(n,l)}}(),I.enc.Base64})},"F+F2":function(j,H,b){(function(I,v){j.exports=H=v(b("Ib8C"))})(this,function(I){return function(){if(typeof ArrayBuffer!="function")return;var v=I,T=v.lib,y=T.WordArray,g=y.init,s=y.init=function(_){if(_ instanceof ArrayBuffer&&(_=new Uint8Array(_)),(_ instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&_ instanceof Uint8ClampedArray||_ instanceof Int16Array||_ instanceof Uint16Array||_ instanceof Int32Array||_ instanceof Uint32Array||_ instanceof Float32Array||_ instanceof Float64Array)&&(_=new Uint8Array(_.buffer,_.byteOffset,_.byteLength)),_ instanceof Uint8Array){for(var p=_.byteLength,e=[],o=0;o<p;o++)e[o>>>2]|=_[o]<<24-o%4*8;g.call(this,e,p)}else g.apply(this,arguments)};s.prototype=y}(),I.lib.WordArray})},FOrL:function(j,H,b){j.exports=b.p+"static/nodata.a6b3f948.png"},FPkq:function(j,H,b){j.exports=b.p+"static/qrCode.dd0fe9b2.png"},FWmy:function(j,H,b){"use strict";b.d(H,"a",function(){return I});function I(v,T){if(!v)throw new Error(T?`Assertion failed (${T})`:"Assertion Failed")}},FfZY:function(j,H,b){j.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(j,H,b){"use strict";function I(i){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(a){return typeof a}:I=function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},I(i)}Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;var v=e(b("Lo0S")),T=b("vewr"),y=e(b("8CQX")),g=_(b("mHUz")),s=e(b("GdRQ"));function _(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 e(i){if(i&&i.__esModule)return i;if(i===null||I(i)!=="object"&&typeof i!="function")return{default:i};var t=p();if(t&&t.has(i))return t.get(i);var a={},c=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var d in i)if(Object.prototype.hasOwnProperty.call(i,d)){var f=c?Object.getOwnPropertyDescriptor(i,d):null;f&&(f.get||f.set)?Object.defineProperty(a,d,f):a[d]=i[d]}return a.default=i,t&&t.set(i,a),a}function o(i,t){if(!(i instanceof t))throw new TypeError("Cannot call a class as a function")}function n(i,t){for(var a=0;a<t.length;a++){var c=t[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(i,c.key,c)}}function l(i,t,a){return t&&n(i.prototype,t),a&&n(i,a),i}var r=function(){function i(t){o(this,i),this._target=t||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 l(i,[{key:"_sendKeyEvent",value:function(a,c,d){if(d)this._keyDownList[c]=a;else{if(!(c in this._keyDownList))return;delete this._keyDownList[c]}v.Debug("onkeyevent "+(d?"down":"up")+", keysym: "+a,", code: "+c),this.onkeyevent(a,c,d)}},{key:"_getKeyCode",value:function(a){var c=y.getKeycode(a);if(c!=="Unidentified")return c;if(a.keyCode&&a.type!=="keypress"&&a.keyCode!==229)return"Platform"+a.keyCode;if(a.keyIdentifier){if(a.keyIdentifier.substr(0,2)!=="U+")return a.keyIdentifier;var d=parseInt(a.keyIdentifier.substr(2),16),f=String.fromCharCode(d).toUpperCase();return"Platform"+f.charCodeAt()}return"Unidentified"}},{key:"_handleKeyDown",value:function(a){var c=this._getKeyCode(a),d=y.getKeysym(a);if(this._altGrArmed&&(this._altGrArmed=!1,clearTimeout(this._altGrTimeout),c==="AltRight"&&a.timeStamp-this._altGrCtrlTime<50?d=g.default.XK_ISO_Level3_Shift:this._sendKeyEvent(g.default.XK_Control_L,"ControlLeft",!0)),c==="Unidentified"){d&&(this._sendKeyEvent(d,c,!0),this._sendKeyEvent(d,c,!1)),(0,T.stopEvent)(a);return}if(s.isMac()||s.isIOS())switch(d){case g.default.XK_Super_L:d=g.default.XK_Alt_L;break;case g.default.XK_Super_R:d=g.default.XK_Super_L;break;case g.default.XK_Alt_L:d=g.default.XK_Mode_switch;break;case g.default.XK_Alt_R:d=g.default.XK_ISO_Level3_Shift;break}if(c in this._keyDownList&&(d=this._keyDownList[c]),(s.isMac()||s.isIOS())&&c==="CapsLock"){this._sendKeyEvent(g.default.XK_Caps_Lock,"CapsLock",!0),this._sendKeyEvent(g.default.XK_Caps_Lock,"CapsLock",!1),(0,T.stopEvent)(a);return}if(!d&&(!a.key||s.isIE()||s.isEdge())){this._pendingKey=c,setTimeout(this._handleKeyPressTimeout.bind(this),10,a);return}if(this._pendingKey=null,(0,T.stopEvent)(a),c==="ControlLeft"&&s.isWindows()&&!("ControlLeft"in this._keyDownList)){this._altGrArmed=!0,this._altGrTimeout=setTimeout(this._handleAltGrTimeout.bind(this),100),this._altGrCtrlTime=a.timeStamp;return}this._sendKeyEvent(d,c,!0)}},{key:"_handleKeyPress",value:function(a){if((0,T.stopEvent)(a),this._pendingKey===null)return;var c=this._getKeyCode(a),d=y.getKeysym(a);if(c!=="Unidentified"&&c!=this._pendingKey)return;if(c=this._pendingKey,this._pendingKey=null,!d){v.Info("keypress with no keysym:",a);return}this._sendKeyEvent(d,c,!0)}},{key:"_handleKeyPressTimeout",value:function(a){if(this._pendingKey===null)return;var c,d=this._pendingKey;if(this._pendingKey=null,a.keyCode>=48&&a.keyCode<=57)c=a.keyCode;else if(a.keyCode>=65&&a.keyCode<=90){var f=String.fromCharCode(a.keyCode);a.shiftKey?f=f.toUpperCase():f=f.toLowerCase(),c=f.charCodeAt()}else c=0;this._sendKeyEvent(c,d,!0)}},{key:"_handleKeyUp",value:function(a){(0,T.stopEvent)(a);var c=this._getKeyCode(a);if(this._altGrArmed&&(this._altGrArmed=!1,clearTimeout(this._altGrTimeout),this._sendKeyEvent(g.default.XK_Control_L,"ControlLeft",!0)),(s.isMac()||s.isIOS())&&c==="CapsLock"){this._sendKeyEvent(g.default.XK_Caps_Lock,"CapsLock",!0),this._sendKeyEvent(g.default.XK_Caps_Lock,"CapsLock",!1);return}this._sendKeyEvent(this._keyDownList[c],c,!1),s.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(g.default.XK_Control_L,"ControlLeft",!0)}},{key:"_allKeysUp",value:function(){v.Debug(">> Keyboard.allKeysUp");for(var a in this._keyDownList)this._sendKeyEvent(this._keyDownList[a],a,!1);v.Debug("<< Keyboard.allKeysUp")}},{key:"_checkAlt",value:function(a){if(a.skipCheckAlt)return;if(a.altKey)return;var c=this._target,d=this._keyDownList;["AltLeft","AltRight"].forEach(function(f){if(!(f in d))return;var h=new KeyboardEvent("keyup",{key:d[f],code:f});h.skipCheckAlt=!0,c.dispatchEvent(h)})}},{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),s.isWindows()&&s.isFirefox()){var a=this._eventHandlers.checkalt;["mousedown","mouseup","mousemove","wheel","touchstart","touchend","touchmove","keydown","keyup"].forEach(function(c){return document.addEventListener(c,a,{capture:!0,passive:!0})})}}},{key:"ungrab",value:function(){if(s.isWindows()&&s.isFirefox()){var a=this._eventHandlers.checkalt;["mousedown","mouseup","mousemove","wheel","touchstart","touchend","touchmove","keydown","keyup"].forEach(function(c){return document.removeEventListener(c,a)})}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}();H.default=r},GABl:function(j,H){j.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(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.toUnsigned32bit=I,H.toSigned32bit=v;function I(T){return T>>>0}function v(T){return T|0}},GRuw:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("lPiR"))})(this,function(I){return function(){var v=I,T=v.lib,y=T.WordArray,g=v.algo,s=g.SHA256,_=g.SHA224=s.extend({_doReset:function(){this._hash=new y.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var p=s._doFinalize.call(this);return p.sigBytes-=4,p}});v.SHA224=s._createHelper(_),v.HmacSHA224=s._createHmacHelper(_)}(),I.SHA224})},GdRQ:function(j,H,b){"use strict";function I(O){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(O)}Object.defineProperty(H,"__esModule",{value:!0}),H.isMac=c,H.isWindows=d,H.isIOS=f,H.isSafari=h,H.isIE=u,H.isEdge=E,H.isFirefox=x,H.hasScrollbarGutter=H.supportsImageMetadata=H.supportsCursorURIs=H.dragThreshold=H.isTouchDevice=void 0;var v=y(b("Lo0S"));function T(){if(typeof WeakMap!="function")return null;var O=new WeakMap;return T=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 C=T();if(C&&C.has(O))return C.get(O);var w={},S=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in O)if(Object.prototype.hasOwnProperty.call(O,A)){var D=S?Object.getOwnPropertyDescriptor(O,A):null;D&&(D.get||D.set)?Object.defineProperty(w,A,D):w[A]=O[A]}return w.default=O,C&&C.set(O,w),w}var g="ontouchstart"in document.documentElement||document.ontouchstart!==void 0||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;H.isTouchDevice=g,window.addEventListener("touchstart",function O(){H.isTouchDevice=g=!0,window.removeEventListener("touchstart",O,!1)},!1);var s=10*(window.devicePixelRatio||1);H.dragThreshold=s;var _=!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?(v.Info("Data URI scheme cursor supported"),_=!0):v.Warn("Data URI scheme cursor not supported")}catch(O){v.Error("Data URI scheme cursor test exception: "+O)}var e=_;H.supportsCursorURIs=e;var o=!1;try{new ImageData(new Uint8ClampedArray(4),1,1),o=!0}catch(O){}var n=o;H.supportsImageMetadata=n;var l=!0;try{var r=document.createElement("div");r.style.visibility="hidden",r.style.overflow="scroll",document.body.appendChild(r);var i=document.createElement("div");r.appendChild(i);var t=r.offsetWidth-i.offsetWidth;r.parentNode.removeChild(r),l=t!=0}catch(O){v.Error("Scrollbar test exception: "+O)}var a=l;H.hasScrollbarGutter=a;function c(){return navigator&&!!/mac/i.exec(navigator.platform)}function d(){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 h(){return navigator&&navigator.userAgent.indexOf("Safari")!==-1&&navigator.userAgent.indexOf("Chrome")===-1}function u(){return navigator&&!!/trident/i.exec(navigator.userAgent)}function E(){return navigator&&!!/edge/i.exec(navigator.userAgent)}function x(){return navigator&&!!/firefox/i.exec(navigator.userAgent)}},GfqC:function(j,H,b){"use strict";var I=b("q1tI"),v=b.n(I),T=b("TSYQ"),y=b.n(T);function g(F,U){var L="cannot "+F.method+" "+F.action+" "+U.status+"'",B=new Error(L);return B.status=U.status,B.method=F.method,B.url=F.action,B}function s(F){var U=F.responseText||F.response;if(!U)return U;try{return JSON.parse(U)}catch(L){return U}}function _(F){var U=new XMLHttpRequest;F.onProgress&&U.upload&&(U.upload.onprogress=function(re){re.total>0&&(re.percent=re.loaded/re.total*100),F.onProgress(re)});var L=new FormData;F.data&&Object.keys(F.data).forEach(function(Z){var re=F.data[Z];if(Array.isArray(re)){re.forEach(function(he){L.append(Z+"[]",he)});return}L.append(Z,F.data[Z])}),F.file instanceof Blob?L.append(F.filename,F.file,F.file.name):L.append(F.filename,F.file),U.onerror=function(re){F.onError(re)},U.onload=function(){return U.status<200||U.status>=300?F.onError(g(F,U),s(U)):F.onSuccess(s(U),U)},U.open(F.method,F.action,!0),F.withCredentials&&"withCredentials"in U&&(U.withCredentials=!0);var B=F.headers||{};return B["X-Requested-With"]!==null&&U.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(B).forEach(function(Z){B[Z]!==null&&U.setRequestHeader(Z,B[Z])}),U.send(L),{abort:function(){U.abort()}}}var p=+new Date,e=0;function o(){return"rc-upload-"+p+"-"+ ++e}function n(F,U){return F.indexOf(U,F.length-U.length)!==-1}var l=function(F,U){if(F&&U){var L=Array.isArray(U)?U:U.split(","),B=F.name||"",Z=F.type||"",re=Z.replace(/\/.*$/,"");return L.some(function(he){var Ce=he.trim();return Ce.charAt(0)==="."?n(B.toLowerCase(),Ce.toLowerCase()):/\/\*$/.test(Ce)?re===Ce.replace(/\/.*$/,""):Z===Ce})}return!0};function r(F,U){var L=F.createReader(),B=[];function Z(){L.readEntries(function(re){var he=Array.prototype.slice.apply(re);B=B.concat(he);var Ce=!he.length;Ce?U(B):Z()})}Z()}var i=function(U,L,B){var Z=function re(he,Ce){Ce=Ce||"",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}})),L([ke]))}):he.isDirectory&&r(he,function(ke){ke.forEach(function(te){re(te,""+Ce+he.name+"/")})})};U.forEach(function(re){Z(re.webkitGetAsEntry())})},t=i,a=Object.assign||function(F){for(var U=1;U<arguments.length;U++){var L=arguments[U];for(var B in L)Object.prototype.hasOwnProperty.call(L,B)&&(F[B]=L[B])}return F},c=function(){function F(U,L){var B=[],Z=!0,re=!1,he=void 0;try{for(var Ce=U[Symbol.iterator](),ke;!(Z=(ke=Ce.next()).done)&&!(B.push(ke.value),L&&B.length===L);Z=!0);}catch(te){re=!0,he=te}finally{try{!Z&&Ce.return&&Ce.return()}finally{if(re)throw he}}return B}return function(U,L){if(Array.isArray(U))return U;if(Symbol.iterator in Object(U))return F(U,L);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),d=function(){function F(U,L){for(var B=0;B<L.length;B++){var Z=L[B];Z.enumerable=Z.enumerable||!1,Z.configurable=!0,"value"in Z&&(Z.writable=!0),Object.defineProperty(U,Z.key,Z)}}return function(U,L,B){return L&&F(U.prototype,L),B&&F(U,B),U}}();function f(F,U,L){return U in F?Object.defineProperty(F,U,{value:L,enumerable:!0,configurable:!0,writable:!0}):F[U]=L,F}function h(F,U){var L={};for(var B in F){if(U.indexOf(B)>=0)continue;if(!Object.prototype.hasOwnProperty.call(F,B))continue;L[B]=F[B]}return L}function u(F,U){if(!(F instanceof U))throw new TypeError("Cannot call a class as a function")}function E(F,U){if(!F)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:F}function x(F,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);F.prototype=Object.create(U&&U.prototype,{constructor:{value:F,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(F,U):F.__proto__=U)}var O=function(U){return Object.keys(U).reduce(function(L,B){return(B.substr(0,5)==="data-"||B.substr(0,5)==="aria-"||B==="role")&&(L[B]=U[B]),L},{})},C=function(F){x(U,F);function U(){var L,B,Z,re;u(this,U);for(var he=arguments.length,Ce=Array(he),ke=0;ke<he;ke++)Ce[ke]=arguments[ke];return re=(B=(Z=E(this,(L=U.__proto__||Object.getPrototypeOf(U)).call.apply(L,[this].concat(Ce))),Z),Z.state={uid:o()},Z.reqs={},Z.onChange=function(te){var Re=te.target.files;Z.uploadFiles(Re),Z.reset()},Z.onClick=function(te){var Re=Z.fileInput;if(!Re)return;var Te=Z.props,pe=Te.children,me=Te.onClick;pe&&pe.type==="button"&&(Re.parentNode.focus(),Re.parentNode.querySelector("button").blur()),Re.click(),me&&me(te)},Z.onKeyDown=function(te){te.key==="Enter"&&Z.onClick()},Z.onFileDrop=function(te){var Re=Z.props.multiple;if(te.preventDefault(),te.type==="dragover")return;if(Z.props.directory)t(Array.prototype.slice.call(te.dataTransfer.items),Z.uploadFiles,function(pe){return l(pe,Z.props.accept)});else{var Te=Array.prototype.slice.call(te.dataTransfer.files).filter(function(pe){return l(pe,Z.props.accept)});Re===!1&&(Te=Te.slice(0,1)),Z.uploadFiles(Te)}},Z.uploadFiles=function(te){var Re=Array.prototype.slice.call(te);Re.map(function(Te){return Te.uid=o(),Te}).forEach(function(Te){Z.upload(Te,Re)})},Z.saveFileInput=function(te){Z.fileInput=te},B),E(Z,re)}return d(U,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(B,Z){var re=this,he=this.props;if(!he.beforeUpload)return setTimeout(function(){return re.post(B)},0);var Ce=he.beforeUpload(B,Z);Ce&&Ce.then?Ce.then(function(ke){var te=Object.prototype.toString.call(ke);return te==="[object File]"||te==="[object Blob]"?re.post(ke):re.post(B)}).catch(function(ke){console.log(ke)}):Ce!==!1&&setTimeout(function(){return re.post(B)},0);return}},{key:"post",value:function(B){var Z=this;if(!this._isMounted)return;var re=this.props,he=re.onStart,Ce=re.onProgress,ke=re.transformFile,te=ke===void 0?function(Re){return Re}:ke;new Promise(function(Re){var Te=re.action;return typeof Te=="function"&&(Te=Te(B)),Re(Te)}).then(function(Re){var Te=B.uid,pe=re.customRequest||_,me=Promise.resolve(te(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)});me.then(function(se){var be=c(se,2),ae=be[0],fe=be[1],Fe={action:Re,filename:re.name,data:fe,file:ae,headers:re.headers,withCredentials:re.withCredentials,method:re.method||"post",onProgress:Ce?function(ie){Ce(ie,B)}:null,onSuccess:function(q,Q){delete Z.reqs[Te],re.onSuccess(q,B,Q)},onError:function(q,Q){delete Z.reqs[Te],re.onError(q,Q,B)}};he(B),Z.reqs[Te]=pe(Fe)})})}},{key:"reset",value:function(){this.setState({uid:o()})}},{key:"abort",value:function(B){var Z=this.reqs;if(B){var re=B;B&&B.uid&&(re=B.uid),Z[re]&&Z[re].abort&&Z[re].abort(),delete Z[re]}else Object.keys(Z).forEach(function(he){Z[he]&&Z[he].abort&&Z[he].abort(),delete Z[he]})}},{key:"render",value:function(){var B,Z=this.props,re=Z.component,he=Z.prefixCls,Ce=Z.className,ke=Z.disabled,te=Z.id,Re=Z.style,Te=Z.multiple,pe=Z.accept,me=Z.children,se=Z.directory,be=Z.openFileDialogOnClick,ae=Z.onMouseEnter,fe=Z.onMouseLeave,Fe=h(Z,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),ie=y()((B={},f(B,he,!0),f(B,he+"-disabled",ke),f(B,Ce,Ce),B)),q=ke?{}:{onClick:be?this.onClick:function(){},onKeyDown:be?this.onKeyDown:function(){},onMouseEnter:ae,onMouseLeave:fe,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return v.a.createElement(re,a({},q,{className:ie,role:"button",style:Re}),v.a.createElement("input",a({},O(Fe),{id:te,type:"file",ref:this.saveFileInput,onClick:function(Y){return Y.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:pe,directory:se?"directory":null,webkitdirectory:se?"webkitdirectory":null,multiple:Te,onChange:this.onChange})),me)}}]),U}(I.Component),w=C,S=Object.assign||function(F){for(var U=1;U<arguments.length;U++){var L=arguments[U];for(var B in L)Object.prototype.hasOwnProperty.call(L,B)&&(F[B]=L[B])}return F},A=function(){function F(U,L){for(var B=0;B<L.length;B++){var Z=L[B];Z.enumerable=Z.enumerable||!1,Z.configurable=!0,"value"in Z&&(Z.writable=!0),Object.defineProperty(U,Z.key,Z)}}return function(U,L,B){return L&&F(U.prototype,L),B&&F(U,B),U}}();function D(F,U){if(!(F instanceof U))throw new TypeError("Cannot call a class as a function")}function M(F,U){if(!F)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:F}function N(F,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);F.prototype=Object.create(U&&U.prototype,{constructor:{value:F,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(F,U):F.__proto__=U)}function P(){}var z=function(F){N(U,F);function U(){var L,B,Z,re;D(this,U);for(var he=arguments.length,Ce=Array(he),ke=0;ke<he;ke++)Ce[ke]=arguments[ke];return re=(B=(Z=M(this,(L=U.__proto__||Object.getPrototypeOf(U)).call.apply(L,[this].concat(Ce))),Z),Z.saveUploader=function(te){Z.uploader=te},B),M(Z,re)}return A(U,[{key:"abort",value:function(B){this.uploader.abort(B)}},{key:"render",value:function(){return v.a.createElement(w,S({},this.props,{ref:this.saveUploader}))}}]),U}(I.Component);z.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:P,onError:P,onSuccess:P,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var X=z,k=H.a=X},Gytx:function(j,H){j.exports=function(I,v,T,y){var g=T?T.call(y,I,v):void 0;if(g!==void 0)return!!g;if(I===v)return!0;if(typeof I!="object"||!I||typeof v!="object"||!v)return!1;var s=Object.keys(I),_=Object.keys(v);if(s.length!==_.length)return!1;for(var p=Object.prototype.hasOwnProperty.bind(v),e=0;e<s.length;e++){var o=s[e];if(!p(o))return!1;var n=I[o],l=v[o];if(g=T?T.call(y,n,l,o):void 0,g===!1||g===void 0&&n!==l)return!1}return!0}},H4Hw:function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAAAUFJREFUWEftWE1KxDAYzUsrRYqgOHtxIbgVPYJziB6g9AiewSOUFrprL+ERvIELca/MYihSbPMk4MAgDkkH2omQLtLF9/fy+sqXfBA/D0k0TXPedd1iGIZjknJjm+INQAVB8BlF0XuSJB8AqOtAL3meHwG4BHAyRXFTTpJrkq9Zln1BM1MUxdWhwGx9oXWapi+o63rRtu2FaRdz2OM4fkNVVdd938dzFDTVCMOwRVmWN1ML2ARkY9dC1/q5tQ2Yw88DMrH8fxkieU/yQQhxZtrlL/sKwCOAJ5s4a4aUUjrhqU3SP3xWUsqlTewYQM82CXf5SCnvbOI9IBNLniHPkP/LTBrwDHmGdjHgXHMVQiyVUvr4MbbjT3P82Fc7Y+Ose9nYxPv6e0Am5ty7KDp3lXZu2ODcOEaLzKmB1dbAyImR3jebF/Oh3a3UogAAAABJRU5ErkJggg=="},H65k:function(j,H,b){},HmJG:function(j,H,b){},HpTS:function(j,H,b){j.exports=b.p+"static/small_program.f74069ec.png"},I8Z2:function(j,H,b){"use strict";b.d(H,"a",function(){return y}),b.d(H,"b",function(){return r}),b.d(H,"c",function(){return t});var I=b("q1tI"),v=function(){var a=function(c,d){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var u in h)h.hasOwnProperty(u)&&(f[u]=h[u])},a(c,d)};return function(c,d){a(c,d);function f(){this.constructor=c}c.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}}(),T=I.createContext(null),y=function(a){v(c,a);function c(){return a!==null&&a.apply(this,arguments)||this}return c.prototype.render=function(){return I.createElement(T.Provider,{value:this.props.store},this.props.children)},c}(I.Component),g=b("Gytx"),s=b.n(g),_=b("2mql"),p=b.n(_),e=function(){var a=function(c,d){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var u in h)h.hasOwnProperty(u)&&(f[u]=h[u])},a(c,d)};return function(c,d){a(c,d);function f(){this.constructor=c}c.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}}(),o=function(){return o=Object.assign||function(a){for(var c,d=1,f=arguments.length;d<f;d++){c=arguments[d];for(var h in c)Object.prototype.hasOwnProperty.call(c,h)&&(a[h]=c[h])}return a},o.apply(this,arguments)};function n(a){return a.displayName||a.name||"Component"}var l=function(){return{}};function r(a,c){c===void 0&&(c={});var d=!!a,f=a||l;return function(u){var E=function(O){e(C,O);function C(w,S){var A=O.call(this,w,S)||this;return A.unsubscribe=null,A.handleChange=function(){if(!A.unsubscribe)return;var D=f(A.store.getState(),A.props);A.setState({subscribed:D})},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 a&&a.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!s()(this.props,w)||!s()(this.state.subscribed,S.subscribed)},C.prototype.trySubscribe=function(){d&&(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=o(o(o({},this.props),this.state.subscribed),{store:this.store});return I.createElement(u,o({},w,{ref:this.props.miniStoreForwardedRef}))},C.displayName="Connect("+n(u)+")",C.contextType=T,C}(I.Component);if(c.forwardRef){var x=I.forwardRef(function(O,C){return I.createElement(E,o({},O,{miniStoreForwardedRef:C}))});return p()(x,u)}return p()(E,u)}}var i=function(){return i=Object.assign||function(a){for(var c,d=1,f=arguments.length;d<f;d++){c=arguments[d];for(var h in c)Object.prototype.hasOwnProperty.call(c,h)&&(a[h]=c[h])}return a},i.apply(this,arguments)};function t(a){var c=a,d=[];function f(E){c=i(i({},c),E);for(var x=0;x<d.length;x++)d[x]()}function h(){return c}function u(E){return d.push(E),function(){var O=d.indexOf(E);d.splice(O,1)}}return{setState:f,getState:h,subscribe:u}}},IBYe:function(j,H,b){"use strict";function I(v){return null}H.a=I},IWh4:function(j,H){j.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(j,H,b){"use strict";b.d(H,"n",function(){return o}),b.d(H,"o",function(){return n}),b.d(H,"k",function(){return l}),b.d(H,"H",function(){return r}),b.d(H,"j",function(){return i}),b.d(H,"L",function(){return t}),b.d(H,"G",function(){return a}),b.d(H,"B",function(){return c}),b.d(H,"D",function(){return d}),b.d(H,"g",function(){return f}),b.d(H,"s",function(){return h}),b.d(H,"i",function(){return u}),b.d(H,"l",function(){return E}),b.d(H,"z",function(){return C}),b.d(H,"m",function(){return w}),b.d(H,"x",function(){return S}),b.d(H,"y",function(){return A}),b.d(H,"e",function(){return D}),b.d(H,"E",function(){return M}),b.d(H,"F",function(){return N}),b.d(H,"C",function(){return P}),b.d(H,"K",function(){return z}),b.d(H,"p",function(){return X}),b.d(H,"q",function(){return k}),b.d(H,"r",function(){return F}),b.d(H,"u",function(){return U}),b.d(H,"I",function(){return L}),b.d(H,"c",function(){return B}),b.d(H,"d",function(){return Z}),b.d(H,"a",function(){return re}),b.d(H,"t",function(){return he}),b.d(H,"f",function(){return Ce}),b.d(H,"A",function(){return ke}),b.d(H,"v",function(){return te}),b.d(H,"J",function(){return Re}),b.d(H,"b",function(){return Te}),b.d(H,"h",function(){return me}),b.d(H,"w",function(){return be});var I=b("9og8"),v=b("k1fw"),T=b("WmNS"),y=b.n(T),g=b("ErOA"),s=b("1vsH"),_,p,e=(_=Object(s.I)())!==null&&_!==void 0&&_.homework_common_id?{homework_common_id:(p=Object(s.I)())===null||p===void 0?void 0:p.homework_common_id}:{};function o(ie){return Object(g.c)("tasks/".concat(ie,".json"),e)}function n(ie){return Object(g.c)("myshixuns/".concat(ie,"/challenges.json"))}function l(ie,q){return Object(g.c)("myshixuns/".concat(ie,"/subject_challenges.json"),q)}function r(ie,q,Q){return Object(g.c)("tasks/".concat(ie,"/star.json?shixun_id=").concat(q,"&star=").concat(Q))}function i(ie,q){return Object(g.c)("tasks/".concat(ie,"/rep_content.json"),Object(v.a)(Object(v.a)({},q),e))}function t(ie,q){return Object(g.f)("myshixuns/".concat(ie,"/update_file.json"),q)}function a(ie,q){return Object(g.c)("tasks/".concat(ie,"/reset_original_code.json"),Object(v.a)(Object(v.a)({},q),e))}function c(ie,q){return Object(g.f)("myshixuns/".concat(ie,"/reset_repository.json"),q)}function d(ie,q){return Object(g.c)("tasks/".concat(ie,"/reset_passed_code.json"),Object(v.a)(Object(v.a)({},q),e))}function f(ie,q){return Object(g.f)("tasks/".concat(ie,"/game_build.json"),Object(v.a)(Object(v.a)({},q),e))}function h(ie,q){return Object(g.c)("tasks/".concat(ie,"/game_status.json"),Object(v.a)(Object(v.a)({},q),e))}function u(ie,q){return Object(g.f)("tasks/".concat(ie,"/choose_build.json"),Object(v.a)(Object(v.a)({},q),e))}function E(ie){return Object(g.c)("tasks/".concat(ie,"/picture_display.json"),e)}function x(ie,q){return Object(g.c)("tasks/".concat(ie,"/cost_time.json"),Object(v.a)(Object(v.a)({},q),e))}function O(ie,q){return Object(g.c)("courses/".concat(ie,"/inform_detail.json"),q)}function C(ie){return Object(g.f)("tasks/".concat(ie,"/plus_or_cancel_praise.json"))}function w(ie){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object(g.f)("myshixuns/".concat(ie,"/repository.json"),q)}function S(ie,q){return Object(g.c)("myshixuns/".concat(ie,"/start.json"),q||{})}function A(ie,q){return Object(g.c)("myshixuns/".concat(ie,"/start.json"),q||{})}function D(ie){return Object(g.c)("myshixuns/".concat(ie,"/reset_pod.json"))}function M(ie){return Object(g.c)("myshixuns/".concat(ie.myshixunId,"/reset_pod.json"),{game_id:ie.game_id})}function N(ie){return Object(g.c)("myshixuns/".concat(ie.myshixunId,"/reset_pod.json"),{game_id:ie.game_id})}function P(ie){var q=ie.myshixunId;return delete ie.myshixunId,Object(g.c)("myshixuns/".concat(q,"/reset_pod.json"),Object(v.a)({game_id:ie.game_id},ie))}function z(ie){return Object(g.c)("tasks/".concat(ie,"/check_test_sets.json"))}function X(ie){return Object(g.c)("tasks/".concat(ie,"/get_answer_info.json"))}function k(ie){return Object(g.c)("tasks/".concat(ie,"/get_choose_answer.json"))}function F(ie){return Object(g.c)("tasks/".concat(ie,"/unlock_choose_answer.json"))}function U(ie,q){return Object(g.c)("tasks/".concat(ie,"/unlock_answer.json?answer_id=").concat(q))}function L(ie,q,Q){return Object(g.f)("tasks/".concat(ie,"/set_games_status.json"),{result:q,data:Q})}function B(ie,q){return Object(g.c)("myshixuns/".concat(ie,"/active_pod.json?game_id=").concat(q))}function Z(ie,q){return Object(g.a)("/api/myshixuns/".concat(ie,"/active_pod.json"),{method:"get",params:{template_id:window.sessionStorage.imageId||"",game_id:q}})}function re(ie,q){return Object(g.c)("myshixuns/".concat(ie,"/active_pod.json?game_id=").concat(q))}function he(ie,q){return Object(g.c)("tasks/".concat(ie,"/rank_list.json"),q)}function Ce(ie,q){return Object(g.f)("tasks/".concat(ie,"/close_windows_vnc.json"),{tpi_id:q})}function ke(ie){return Object(g.c)("tasks/".concat(ie,"/pull_files.json"))}function te(ie,q){return Object(g.f)("tasks/".concat(ie,"/log_output"),q)}function Re(ie){return Object(g.c)("tasks/".concat(ie,"/stop_log_output.json"))}function Te(ie){return pe.apply(this,arguments)}function pe(){return pe=Object(I.a)(y.a.mark(function ie(q){return y.a.wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return Y.abrupt("return",Object(g.a)("/api/myshixuns/".concat(q.id,"/add_file.json"),{method:"post",body:q}));case 1:case"end":return Y.stop()}},ie)})),pe.apply(this,arguments)}function me(ie){return se.apply(this,arguments)}function se(){return se=Object(I.a)(y.a.mark(function ie(q){return y.a.wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return Y.abrupt("return",Object(g.a)("/api/myshixuns/".concat(q.id,"/delete_git_file.json"),{method:"Delete",body:q}));case 1:case"end":return Y.stop()}},ie)})),se.apply(this,arguments)}function be(ie){return ae.apply(this,arguments)}function ae(){return ae=Object(I.a)(y.a.mark(function ie(q){return y.a.wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return Y.abrupt("return",Object(g.a)("/api/myshixuns/".concat(q.id,"/mv_file.json"),{method:"post",body:q}));case 1:case"end":return Y.stop()}},ie)})),ae.apply(this,arguments)}function fe(ie){return Fe.apply(this,arguments)}function Fe(){return Fe=Object(I.a)(y.a.mark(function ie(q){return y.a.wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return Y.abrupt("return",Object(g.a)("/api/tasks/".concat(q.id,"/rep_content.json"),{method:"get",params:q}));case 1:case"end":return Y.stop()}},ie)})),Fe.apply(this,arguments)}},Ib8C:function(j,H,b){(function(I){(function(v,T){j.exports=H=T()})(this,function(){var v=v||function(T,y){var g;if(typeof window!="undefined"&&window.crypto&&(g=window.crypto),typeof self!="undefined"&&self.crypto&&(g=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(g=globalThis.crypto),!g&&typeof window!="undefined"&&window.msCrypto&&(g=window.msCrypto),!g&&typeof I!="undefined"&&I.crypto&&(g=I.crypto),!g&&!0)try{g=b(4)}catch(f){}var s=function(){if(g){if(typeof g.getRandomValues=="function")try{return g.getRandomValues(new Uint32Array(1))[0]}catch(f){}if(typeof g.randomBytes=="function")try{return g.randomBytes(4).readInt32LE()}catch(f){}}throw new Error("Native crypto module could not be used to get secure random number.")},_=Object.create||function(){function f(){}return function(h){var u;return f.prototype=h,u=new f,f.prototype=null,u}}(),p={},e=p.lib={},o=e.Base=function(){return{extend:function(f){var h=_(this);return f&&h.mixIn(f),(!h.hasOwnProperty("init")||this.init===h.init)&&(h.init=function(){h.$super.init.apply(this,arguments)}),h.init.prototype=h,h.$super=this,h},create:function(){var f=this.extend();return f.init.apply(f,arguments),f},init:function(){},mixIn:function(f){for(var h in f)f.hasOwnProperty(h)&&(this[h]=f[h]);f.hasOwnProperty("toString")&&(this.toString=f.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),n=e.WordArray=o.extend({init:function(f,h){f=this.words=f||[],h!=y?this.sigBytes=h:this.sigBytes=f.length*4},toString:function(f){return(f||r).stringify(this)},concat:function(f){var h=this.words,u=f.words,E=this.sigBytes,x=f.sigBytes;if(this.clamp(),E%4)for(var O=0;O<x;O++){var C=u[O>>>2]>>>24-O%4*8&255;h[E+O>>>2]|=C<<24-(E+O)%4*8}else for(var w=0;w<x;w+=4)h[E+w>>>2]=u[w>>>2];return this.sigBytes+=x,this},clamp:function(){var f=this.words,h=this.sigBytes;f[h>>>2]&=4294967295<<32-h%4*8,f.length=T.ceil(h/4)},clone:function(){var f=o.clone.call(this);return f.words=this.words.slice(0),f},random:function(f){for(var h=[],u=0;u<f;u+=4)h.push(s());return new n.init(h,f)}}),l=p.enc={},r=l.Hex={stringify:function(f){for(var h=f.words,u=f.sigBytes,E=[],x=0;x<u;x++){var O=h[x>>>2]>>>24-x%4*8&255;E.push((O>>>4).toString(16)),E.push((O&15).toString(16))}return E.join("")},parse:function(f){for(var h=f.length,u=[],E=0;E<h;E+=2)u[E>>>3]|=parseInt(f.substr(E,2),16)<<24-E%8*4;return new n.init(u,h/2)}},i=l.Latin1={stringify:function(f){for(var h=f.words,u=f.sigBytes,E=[],x=0;x<u;x++){var O=h[x>>>2]>>>24-x%4*8&255;E.push(String.fromCharCode(O))}return E.join("")},parse:function(f){for(var h=f.length,u=[],E=0;E<h;E++)u[E>>>2]|=(f.charCodeAt(E)&255)<<24-E%4*8;return new n.init(u,h)}},t=l.Utf8={stringify:function(f){try{return decodeURIComponent(escape(i.stringify(f)))}catch(h){throw new Error("Malformed UTF-8 data")}},parse:function(f){return i.parse(unescape(encodeURIComponent(f)))}},a=e.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new n.init,this._nDataBytes=0},_append:function(f){typeof f=="string"&&(f=t.parse(f)),this._data.concat(f),this._nDataBytes+=f.sigBytes},_process:function(f){var h,u=this._data,E=u.words,x=u.sigBytes,O=this.blockSize,C=O*4,w=x/C;f?w=T.ceil(w):w=T.max((w|0)-this._minBufferSize,0);var S=w*O,A=T.min(S*4,x);if(S){for(var D=0;D<S;D+=O)this._doProcessBlock(E,D);h=E.splice(0,S),u.sigBytes-=A}return new n.init(h,A)},clone:function(){var f=o.clone.call(this);return f._data=this._data.clone(),f},_minBufferSize:0}),c=e.Hasher=a.extend({cfg:o.extend(),init:function(f){this.cfg=this.cfg.extend(f),this.reset()},reset:function(){a.reset.call(this),this._doReset()},update:function(f){return this._append(f),this._process(),this},finalize:function(f){f&&this._append(f);var h=this._doFinalize();return h},blockSize:512/32,_createHelper:function(f){return function(h,u){return new f.init(u).finalize(h)}},_createHmacHelper:function(f){return function(h,u){return new d.HMAC.init(f,u).finalize(h)}}}),d=p.algo={};return p}(Math);return v})}).call(this,b("IyRk"))},ItS6:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;var I=b("eP3c"),v=T(b("1q3G"));function T(p){return p&&p.__esModule?p:{default:p}}function y(p,e){if(!(p instanceof e))throw new TypeError("Cannot call a class as a function")}function g(p,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(p,n.key,n)}}function s(p,e,o){return e&&g(p.prototype,e),o&&g(p,o),p}var _=function(){function p(){y(this,p),this.strm=new v.default,this.chunkSize=1024*10*10,this.strm.output=new Uint8Array(this.chunkSize),this.windowBits=5,(0,I.inflateInit)(this.strm,this.windowBits)}return s(p,[{key:"setInput",value:function(o){o?(this.strm.input=o,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(o){o>this.chunkSize&&(this.chunkSize=o,this.strm.output=new Uint8Array(this.chunkSize)),this.strm.next_out=0,this.strm.avail_out=o;var n=(0,I.inflate)(this.strm,0);if(n<0)throw new Error("zlib inflate failed");if(this.strm.next_out!=o)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}();H.default=_},IxHN:function(j,H,b){"use strict";var I=b("q1tI"),v=b.n(I),T=b("07cG"),y=b.n(T);H.a=function(g){var s=g.message,_=g.className,p=g.children,e=g.style,o=e===void 0?{}:e;return v.a.createElement("div",{className:"".concat(y.a.idsRingWrapper," ").concat(_)},v.a.createElement("div",{className:y.a.ldsRing},v.a.createElement("div",null),v.a.createElement("div",null),v.a.createElement("div",null),v.a.createElement("div",null)),s?v.a.createElement("p",{style:o},s):null,p)}},J66h:function(j,H,b){(function(I){var v,T;(function(y,g){j.exports=g(y)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof I!="undefined"?I:this,function(y){"use strict";y=y||{};var g=y.Base64,s="2.6.4",_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=function(P){for(var z={},X=0,k=P.length;X<k;X++)z[P.charAt(X)]=X;return z}(_),e=String.fromCharCode,o=function(P){if(P.length<2){var z=P.charCodeAt(0);return z<128?P:z<2048?e(192|z>>>6)+e(128|z&63):e(224|z>>>12&15)+e(128|z>>>6&63)+e(128|z&63)}else{var z=65536+(P.charCodeAt(0)-55296)*1024+(P.charCodeAt(1)-56320);return e(240|z>>>18&7)+e(128|z>>>12&63)+e(128|z>>>6&63)+e(128|z&63)}},n=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,l=function(P){return P.replace(n,o)},r=function(P){var z=[0,2,1][P.length%3],X=P.charCodeAt(0)<<16|(P.length>1?P.charCodeAt(1):0)<<8|(P.length>2?P.charCodeAt(2):0),k=[_.charAt(X>>>18),_.charAt(X>>>12&63),z>=2?"=":_.charAt(X>>>6&63),z>=1?"=":_.charAt(X&63)];return k.join("")},i=y.btoa&&typeof y.btoa=="function"?function(P){return y.btoa(P)}:function(P){if(P.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return P.replace(/[\s\S]{1,3}/g,r)},t=function(P){return i(l(String(P)))},a=function(P){return P.replace(/[+\/]/g,function(z){return z=="+"?"-":"_"}).replace(/=/g,"")},c=function(P,z){return z?a(t(P)):t(P)},d=function(P){return c(P,!0)},f;y.Uint8Array&&(f=function(P,z){for(var X="",k=0,F=P.length;k<F;k+=3){var U=P[k],L=P[k+1],B=P[k+2],Z=U<<16|L<<8|B;X+=_.charAt(Z>>>18)+_.charAt(Z>>>12&63)+(typeof L!="undefined"?_.charAt(Z>>>6&63):"=")+(typeof B!="undefined"?_.charAt(Z&63):"=")}return z?a(X):X});var h=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,u=function(P){switch(P.length){case 4:var z=(7&P.charCodeAt(0))<<18|(63&P.charCodeAt(1))<<12|(63&P.charCodeAt(2))<<6|63&P.charCodeAt(3),X=z-65536;return e((X>>>10)+55296)+e((X&1023)+56320);case 3:return e((15&P.charCodeAt(0))<<12|(63&P.charCodeAt(1))<<6|63&P.charCodeAt(2));default:return e((31&P.charCodeAt(0))<<6|63&P.charCodeAt(1))}},E=function(P){return P.replace(h,u)},x=function(P){var z=P.length,X=z%4,k=(z>0?p[P.charAt(0)]<<18:0)|(z>1?p[P.charAt(1)]<<12:0)|(z>2?p[P.charAt(2)]<<6:0)|(z>3?p[P.charAt(3)]:0),F=[e(k>>>16),e(k>>>8&255),e(k&255)];return F.length-=[0,0,2,1][X],F.join("")},O=y.atob&&typeof y.atob=="function"?function(P){return y.atob(P)}:function(P){return P.replace(/\S{1,4}/g,x)},C=function(P){return O(String(P).replace(/[^A-Za-z0-9\+\/]/g,""))},w=function(P){return E(O(P))},S=function(P){return String(P).replace(/[-_]/g,function(z){return z=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},A=function(P){return w(S(P))},D;y.Uint8Array&&(D=function(P){return Uint8Array.from(C(S(P)),function(z){return z.charCodeAt(0)})});var M=function(){var P=y.Base64;return y.Base64=g,P};if(y.Base64={VERSION:s,atob:C,btoa:i,fromBase64:A,toBase64:c,utob:l,encode:c,encodeURI:d,btou:E,decode:A,noConflict:M,fromUint8Array:f,toUint8Array:D},typeof Object.defineProperty=="function"){var N=function(P){return{value:P,enumerable:!1,writable:!0,configurable:!0}};y.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",N(function(){return A(this)})),Object.defineProperty(String.prototype,"toBase64",N(function(P){return c(this,P)})),Object.defineProperty(String.prototype,"toBase64URI",N(function(){return c(this,!0)}))}}return y.Meteor&&(Base64=y.Base64),j.exports?j.exports.Base64=y.Base64:!(v=[],T=function(){return y.Base64}.apply(H,v),T!==void 0&&(j.exports=T)),{Base64:y.Base64}})}).call(this,b("IyRk"))},JSwD:function(j,H,b){"use strict";function I(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(d){return typeof d}:I=function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},I(a)}Object.defineProperty(H,"__esModule",{value:!0}),H.default=t;var v=y(b("6BzB"));function T(){if(typeof WeakMap!="function")return null;var a=new WeakMap;return T=function(){return a},a}function y(a){if(a&&a.__esModule)return a;if(a===null||I(a)!=="object"&&typeof a!="function")return{default:a};var c=T();if(c&&c.has(a))return c.get(a);var d={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var h in a)if(Object.prototype.hasOwnProperty.call(a,h)){var u=f?Object.getOwnPropertyDescriptor(a,h):null;u&&(u.get||u.set)?Object.defineProperty(d,h,u):d[h]=a[h]}return d.default=a,c&&c.set(a,d),d}var g=15,s=852,_=592,p=0,e=1,o=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],l=[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],r=[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 t(a,c,d,f,h,u,E,x){var O=x.bits,C=0,w=0,S=0,A=0,D=0,M=0,N=0,P=0,z=0,X=0,k,F,U,L,B,Z=null,re=0,he,Ce=new v.Buf16(g+1),ke=new v.Buf16(g+1),te=null,Re=0,Te,pe,me;for(C=0;C<=g;C++)Ce[C]=0;for(w=0;w<f;w++)Ce[c[d+w]]++;for(D=O,A=g;A>=1&&!(Ce[A]!==0);A--);if(D>A&&(D=A),A===0)return h[u++]=1<<24|64<<16|0,h[u++]=1<<24|64<<16|0,x.bits=1,0;for(S=1;S<A&&!(Ce[S]!==0);S++);for(D<S&&(D=S),P=1,C=1;C<=g;C++)if(P<<=1,P-=Ce[C],P<0)return-1;if(P>0&&(a===p||A!==1))return-1;for(ke[1]=0,C=1;C<g;C++)ke[C+1]=ke[C]+Ce[C];for(w=0;w<f;w++)c[d+w]!==0&&(E[ke[c[d+w]]++]=w);if(a===p?(Z=te=E,he=19):a===e?(Z=n,re-=257,te=l,Re-=257,he=256):(Z=r,te=i,he=-1),X=0,w=0,C=S,B=u,M=D,N=0,U=-1,z=1<<D,L=z-1,a===e&&z>s||a===o&&z>_)return 1;for(;;){Te=C-N,E[w]<he?(pe=0,me=E[w]):E[w]>he?(pe=te[Re+E[w]],me=Z[re+E[w]]):(pe=32+64,me=0),k=1<<C-N,F=1<<M,S=F;do F-=k,h[B+(X>>N)+F]=Te<<24|pe<<16|me|0;while(F!==0);for(k=1<<C-1;X&k;)k>>=1;if(k!==0?(X&=k-1,X+=k):X=0,w++,--Ce[C]===0){if(C===A)break;C=c[d+E[w]]}if(C>D&&(X&L)!==U){for(N===0&&(N=D),B+=S,M=C-N,P=1<<M;M+N<A&&!(P-=Ce[M+N],P<=0);)M++,P<<=1;if(z+=1<<M,a===e&&z>s||a===o&&z>_)return 1;U=X&L,h[U]=D<<24|M<<16|B-u|0}}return X!==0&&(h[B+X]=C-N<<24|64<<16|0),x.bits=D,0}},JWDV:function(j,H,b){j.exports=b.p+"static/charpter-white.5fa14f93.svg"},JYp7:function(j,H,b){"use strict";b.d(H,"a",function(){return I});var I;(function(v){function T(h){return h&&typeof h=="object"&&typeof h[Symbol.iterator]=="function"}v.is=T;const y=Object.freeze([]);function g(){return y}v.empty=g;function*s(h){yield h}v.single=s;function _(h){return h||y}v.from=_;function p(h){return!h||h[Symbol.iterator]().next().done===!0}v.isEmpty=p;function e(h){return h[Symbol.iterator]().next().value}v.first=e;function o(h,u){for(const E of h)if(u(E))return!0;return!1}v.some=o;function n(h,u){for(const E of h)if(u(E))return E;return}v.find=n;function*l(h,u){for(const E of h)u(E)&&(yield E)}v.filter=l;function*r(h,u){let E=0;for(const x of h)yield u(x,E++)}v.map=r;function*i(...h){for(const u of h)for(const E of u)yield E}v.concat=i;function*t(h){for(const u of h)for(const E of u)yield E}v.concatNested=t;function a(h,u,E){let x=E;for(const O of h)x=u(x,O);return x}v.reduce=a;function*c(h,u,E=h.length){for(u<0&&(u+=h.length),E<0?E+=h.length:E>h.length&&(E=h.length);u<E;u++)yield h[u]}v.slice=c;function d(h,u=Number.POSITIVE_INFINITY){const E=[];if(u===0)return[E,h];const x=h[Symbol.iterator]();for(let O=0;O<u;O++){const C=x.next();if(C.done)return[E,v.empty()];E.push(C.value)}return[E,{[Symbol.iterator](){return x}}]}v.consume=d;function f(h,u,E=(x,O)=>x===O){const x=h[Symbol.iterator](),O=u[Symbol.iterator]();for(;;){const C=x.next(),w=O.next();if(C.done!==w.done)return!1;if(C.done)return!0;if(!E(C.value,w.value))return!1}}v.equals=f})(I||(I={}))},JeFH:function(j,H){j.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(j,H,b){j.exports=b.p+"static/qrcode.2267e4d5.png"},K3mO:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("3y9D"),b("WYAk"))})(this,function(I){return function(){var v=I,T=v.lib,y=T.Base,g=T.WordArray,s=v.algo,_=s.MD5,p=s.EvpKDF=y.extend({cfg:y.extend({keySize:128/32,hasher:_,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,o){for(var n,l=this.cfg,r=l.hasher.create(),i=g.create(),t=i.words,a=l.keySize,c=l.iterations;t.length<a;){n&&r.update(n),n=r.update(e).finalize(o),r.reset();for(var d=1;d<c;d++)n=r.finalize(n),r.reset();i.concat(n)}return i.sigBytes=a*4,i}});v.EvpKDF=function(e,o,n){return p.create(n).compute(e,o)}}(),I.EvpKDF})},KJ0q:function(j,H,b){},KVXO:function(j,H,b){j.exports={wrap:"wrap___1VfLE",content:"content___20B4M",mainPathWrap:"mainPathWrap___3qDeg",colorBlue:"colorBlue___2ZjUq"}},KmYQ:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("OLod"))})(this,function(I){return I.pad.ZeroPadding={pad:function(v,T){var y=T*4;v.clamp(),v.sigBytes+=y-(v.sigBytes%y||y)},unpad:function(v){for(var T=v.words,y=v.sigBytes-1,y=v.sigBytes-1;y>=0;y--)if(T[y>>>2]>>>24-y%4*8&255){v.sigBytes=y+1;break}}},I.pad.ZeroPadding})},LCi9:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;function I(h,u){if(!(h instanceof u))throw new TypeError("Cannot call a class as a function")}function v(h,u){for(var E=0;E<u.length;E++){var x=u[E];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(h,x.key,x)}}function T(h,u,E){return u&&v(h.prototype,u),E&&v(h,E),h}var y=0,g=1,s=2,_=4,p=8,e=16,o=32,n=64,l=127,r=50,i=90,t=250,a=1e3,c=1e3,d=50,f=function(){function h(){I(this,h),this._target=null,this._state=l,this._tracked=[],this._ignored=[],this._waitingRelease=!1,this._releaseStart=0,this._longpressTimeoutId=null,this._twoTouchTimeoutId=null,this._boundEventHandler=this._eventHandler.bind(this)}return T(h,[{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 x;E.stopPropagation(),E.preventDefault();switch(E.type){case"touchstart":x=this._touchStart;break;case"touchmove":x=this._touchMove;break;case"touchend":case"touchcancel":x=this._touchEnd;break}for(var O=0;O<E.changedTouches.length;O++){var C=E.changedTouches[O];x.call(this,C.identifier,C.clientX,C.clientY)}}},{key:"_touchStart",value:function(E,x,O){if(this._hasDetectedGesture()||this._state===y){this._ignored.push(E);return}if(this._tracked.length>0&&Date.now()-this._tracked[0].started>t){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:x,firstY:O,lastX:x,lastY:O,angle:0});switch(this._tracked.length){case 1:this._startLongpressTimeout();break;case 2:this._state&=~(g|p|e),this._stopLongpressTimeout();break;case 3:this._state&=~(s|o|n);break;default:this._state=y}}},{key:"_touchMove",value:function(E,x,O){var C=this._tracked.find(function(N){return N.id===E});if(C===void 0)return;C.lastX=x,C.lastY=O;var w=x-C.firstX,S=O-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)<r)return;if(this._state&=~(g|s|_|e),this._stopLongpressTimeout(),this._tracked.length!==1&&(this._state&=~p),this._tracked.length!==2&&(this._state&=~(o|n)),this._tracked.length===2){var A=this._tracked.find(function(N){return N.id!==E}),D=Math.hypot(A.firstX-A.lastX,A.firstY-A.lastY);if(D>r){var M=Math.abs(C.angle-A.angle);M=Math.abs((M+180)%360-180),M>i?this._state&=~o: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,x,O){if(this._ignored.indexOf(E)!==-1){this._ignored.splice(this._ignored.indexOf(E),1),this._ignored.length===0&&this._tracked.length===0&&(this._state=l,this._waitingRelease=!1);return}if(!this._hasDetectedGesture()&&this._isTwoTouchTimeoutRunning()&&(this._stopTwoTouchTimeout(),this._state=y),!this._hasDetectedGesture()&&(this._state&=~(p|o|n),this._state&=~e,this._stopLongpressTimeout(),!this._waitingRelease)){this._releaseStart=Date.now(),this._waitingRelease=!0;switch(this._tracked.length){case 1:this._state&=~(s|_);break;case 2:this._state&=~(g|_);break}}if(this._waitingRelease){Date.now()-this._releaseStart>t&&(this._state=y),this._tracked.some(function(S){return Date.now()-S.started>a})&&(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=l,this._waitingRelease=!1)}},{key:"_hasDetectedGesture",value:function(){return this._state===y||this._state&this._state-1?!1:!(this._state&(g|s|_)&&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=e,this._pushEvent("gesturestart")}},{key:"_startTwoTouchTimeout",value:function(){var E=this;this._stopTwoTouchTimeout(),this._twoTouchTimeoutId=setTimeout(function(){return E._twoTouchTimeout()},d)}},{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(),x=Math.abs(E.x),O=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));O<w&&x<w?this._state=n:this._state=o,this._pushEvent("gesturestart"),this._pushEvent("gesturemove")}},{key:"_pushEvent",value:function(E){var x={type:this._stateToGesture(this._state)},O=this._getPosition(),C=O.last;E==="gesturestart"&&(C=O.first);switch(this._state){case o:case n:C=O.first;break}if(x.clientX=C.x,x.clientY=C.y,this._state===n){var w=this._getAverageDistance();E==="gesturestart"?(x.magnitudeX=w.first.x,x.magnitudeY=w.first.y):(x.magnitudeX=w.last.x,x.magnitudeY=w.last.y)}else if(this._state===o)if(E==="gesturestart")x.magnitudeX=0,x.magnitudeY=0;else{var S=this._getAverageMovement();x.magnitudeX=S.x,x.magnitudeY=S.y}var A=new CustomEvent(E,{detail:x});this._target.dispatchEvent(A)}},{key:"_stateToGesture",value:function(E){switch(E){case g:return"onetap";case s:return"twotap";case _:return"threetap";case p:return"drag";case e:return"longpress";case o: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,x=0,O=0,C=0,w=0,S=0;S<this._tracked.length;S++)x+=this._tracked[S].firstX,O+=this._tracked[S].firstY,C+=this._tracked[S].lastX,w+=this._tracked[S].lastY;return{first:{x:x/E,y:O/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,x;E=x=0;for(var O=this._tracked.length,C=0;C<this._tracked.length;C++)E+=this._tracked[C].lastX-this._tracked[C].firstX,x+=this._tracked[C].lastY-this._tracked[C].firstY;return{x:E/O,y:x/O}}},{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],x=this._tracked[this._tracked.length-1],O=Math.abs(x.firstX-E.firstX),C=Math.abs(x.firstY-E.firstY),w=Math.abs(x.lastX-E.lastX),S=Math.abs(x.lastY-E.lastY);return{first:{x:O,y:C},last:{x:w,y:S}}}}]),h}();H.default=f},LYID:function(j,H,b){j.exports=b.p+"static/failer.5e83e9b8.svg"},LdHM:function(j,H,b){"use strict";b.d(H,"b",function(){return h}),b.d(H,"a",function(){return E});var I=b("1OyB"),v=b("vuIU"),T=b("Ji7U"),y=b("LK+K"),g=b("q1tI"),s=b("rePB"),_=b("Ff2n"),p=b("ODXe"),e=b("4IlW"),o=b("bX4T"),n=b("YrtM"),l=b("TSYQ"),r=b.n(l),i=b("+nKL"),t=b("8OUc"),a=function(B,Z){var re=B.prefixCls,he=B.id,Ce=B.flattenOptions,ke=B.childrenAsData,te=B.values,Re=B.searchValue,Te=B.multiple,pe=B.defaultActiveFirstOption,me=B.height,se=B.itemHeight,be=B.notFoundContent,ae=B.open,fe=B.menuItemSelectedIcon,Fe=B.virtual,ie=B.onSelect,q=B.onToggleOpen,Q=B.onActiveValue,Y=B.onScroll,oe=B.onMouseEnter,le="".concat(re,"-item"),Ee=Object(n.a)(function(){return Ce},[ae,Ce],function(Je,Ye){return Ye[0]&&Je[1]!==Ye[1]}),Le=g.useRef(null),ge=function(Ye){Ye.preventDefault()},De=function(Ye){Le.current&&Le.current.scrollTo({index:Ye})},_e=function(Ye){for(var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,He=Ee.length,ve=0;ve<He;ve+=1){var xe=(Ye+ve*Pe+He)%He,de=Ee[xe],je=de.group,Qe=de.data;if(!je&&!Qe.disabled)return xe}return-1},Xe=g.useState(function(){return _e(0)}),tt=Object(p.a)(Xe,2),ze=tt[0],Me=tt[1],Et=function(Ye){Me(Ye);var Pe=Ee[Ye];if(!Pe){Q(null,-1);return}Q(Pe.data.value,Ye)};g.useEffect(function(){Et(pe!==!1?_e(0):-1)},[Ee.length,Re]),g.useEffect(function(){var Je=setTimeout(function(){if(!Te&&ae&&te.size===1){var Ye=Array.from(te)[0],Pe=Ee.findIndex(function(He){var ve=He.data;return ve.value===Ye});Et(Pe),De(Pe)}});return function(){return clearTimeout(Je)}},[ae]);var Oe=function(Ye){Ye!==void 0&&ie(Ye,{selected:!te.has(Ye)}),Te||q(!1)};if(g.useImperativeHandle(Z,function(){return{onKeyDown:function(Ye){var Pe=Ye.which;switch(Pe){case e.a.UP:case e.a.DOWN:{var He=0;if(Pe===e.a.UP?He=-1:Pe===e.a.DOWN&&(He=1),He!==0){var ve=_e(ze+He,He);De(ve),Et(ve)}break}case e.a.ENTER:{var xe=Ee[ze];xe&&!xe.data.disabled?Oe(xe.data.value):Oe(void 0),ae&&Ye.preventDefault();break}case e.a.ESC:q(!1)}},onKeyUp:function(){},scrollTo:function(Ye){De(Ye)}}}),Ee.length===0)return g.createElement("div",{role:"listbox",id:"".concat(he,"_list"),className:"".concat(le,"-empty"),onMouseDown:ge},be);function Ve(Je){var Ye=Ee[Je];if(!Ye)return null;var Pe=Ye.data||{},He=Pe.value,ve=Pe.label,xe=Pe.children,de=Object(o.a)(Pe,!0),je=ke?xe:ve;return Ye?g.createElement("div",Object.assign({"aria-label":typeof je=="string"?je:null},de,{key:Je,role:"option",id:"".concat(he,"_list_").concat(Je),"aria-selected":te.has(He)}),He):null}return g.createElement(g.Fragment,null,g.createElement("div",{role:"listbox",id:"".concat(he,"_list"),style:{height:0,width:0,overflow:"hidden"}},Ve(ze-1),Ve(ze),Ve(ze+1)),g.createElement(i.a,{itemKey:"key",ref:Le,data:Ee,height:me,itemHeight:se,fullHeight:!1,onMouseDown:ge,onScroll:Y,virtual:Fe,onMouseEnter:oe},function(Je,Ye){var Pe,He=Je.group,ve=Je.groupOption,xe=Je.data,de=xe.label,je=xe.key;if(He)return g.createElement("div",{className:r()(le,"".concat(le,"-group"))},de!==void 0?de:je);var Qe=xe.disabled,ne=xe.value,Ze=xe.title,lt=xe.children,Be=xe.style,$e=xe.className,rt=Object(_.a)(xe,["disabled","value","title","children","style","className"]),xt=te.has(ne),ft="".concat(le,"-option"),st=r()(le,ft,$e,(Pe={},Object(s.a)(Pe,"".concat(ft,"-grouped"),ve),Object(s.a)(Pe,"".concat(ft,"-active"),ze===Ye&&!Qe),Object(s.a)(Pe,"".concat(ft,"-disabled"),Qe),Object(s.a)(Pe,"".concat(ft,"-selected"),xt),Pe)),Ne=ke?lt:de,Ge=!fe||typeof fe=="function"||xt;return g.createElement("div",Object.assign({},rt,{"aria-selected":xt,className:st,title:Ze,onMouseMove:function(){if(ze===Ye||Qe)return;Et(Ye)},onClick:function(){Qe||Oe(ne)},style:Be}),g.createElement("div",{className:"".concat(ft,"-content")},Ne||ne),g.isValidElement(fe)||xt,Ge&&g.createElement(t.a,{className:"".concat(le,"-option-state"),customizeIcon:fe,customizeIconProps:{isSelected:xt}},xt?"\u2713":null))}))},c=g.forwardRef(a);c.displayName="OptionList";var d=c,f=function(){return null};f.isSelectOption=!0;var h=f,u=function(){return null};u.isSelectOptGroup=!0;var E=u,x=b("VTBJ"),O=b("Zm9Q");function C(L){var B=L.key,Z=L.props,re=Z.children,he=Z.value,Ce=Object(_.a)(Z,["children","value"]);return Object(x.a)({key:B,value:he!==void 0?he:B,children:re},Ce)}function w(L){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(O.a)(L).map(function(Z,re){if(!g.isValidElement(Z)||!Z.type)return null;var he=Z.type.isSelectOptGroup,Ce=Z.key,ke=Z.props,te=ke.children,Re=Object(_.a)(ke,["children"]);return B||!he?C(Z):Object(x.a)(Object(x.a)({key:"__RC_SELECT_GRP__".concat(Ce===null?re:Ce,"__"),label:Ce},Re),{},{options:w(te)})}).filter(function(Z){return Z})}var S=b("2Qr1"),A=b("qNPg"),D=b("U8pU"),M=b("Kwbf"),N=b("WKfj");function P(L){var B=L.mode,Z=L.options,re=L.children,he=L.backfill,Ce=L.allowClear,ke=L.placeholder,te=L.getInputElement,Re=L.showSearch,Te=L.onSearch,pe=L.defaultOpen,me=L.autoFocus,se=L.labelInValue,be=L.value,ae=L.inputValue,fe=L.optionLabelProp,Fe=B==="multiple"||B==="tags",ie=Re!==void 0?Re:Fe||B==="combobox",q=Z||w(re);if(Object(M.a)(B!=="tags"||q.every(function(le){return!le.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),B==="tags"||B==="combobox"){var Q=q.some(function(le){return le.options?le.options.some(function(Ee){return typeof("value"in Ee?Ee.value:Ee.key)=="number"}):typeof("value"in le?le.value:le.key)=="number"});Object(M.a)(!Q,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(M.a)(B!=="combobox"||!fe,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(M.a)(B==="combobox"||!he,"`backfill` only works with `combobox` mode."),Object(M.a)(B==="combobox"||!te,"`getInputElement` only work with `combobox` mode."),Object(M.b)(B!=="combobox"||!te||!Ce||!ke,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Te&&!ie&&B!=="combobox"&&B!=="tags"&&Object(M.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(M.b)(!pe||me,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),be!=null){var Y=Object(N.d)(be);Object(M.a)(!se||Y.every(function(le){return Object(D.a)(le)==="object"&&("key"in le||"value"in le)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(M.a)(!Fe||Array.isArray(be),"`value` should be array when `mode` is `multiple` or `tags`")}if(re){var oe=null;Object(O.a)(re).some(function(le){if(!g.isValidElement(le)||!le.type)return!1;var Ee=le.type;if(Ee.isSelectOption)return!1;if(Ee.isSelectOptGroup){var Le=Object(O.a)(le.props.children).every(function(ge){return!g.isValidElement(ge)||!le.type||ge.type.isSelectOption?!0:(oe=ge.type,!1)});return!Le}return oe=Ee,!0}),oe&&Object(M.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(oe.displayName||oe.name||oe,"`.")),Object(M.a)(ae===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var z=P,X=Object(A.a)({prefixCls:"rc-select",components:{optionList:d},convertChildrenToData:w,flattenOptions:S.d,getLabeledValue:S.e,filterOptions:S.b,isValueDisabled:S.g,findValueOption:S.c,warningProps:z,fillOptionsWithMissingValue:S.a}),k=function(L){Object(T.a)(Z,L);var B=Object(y.a)(Z);function Z(){var re;return Object(I.a)(this,Z),re=B.apply(this,arguments),re.selectRef=g.createRef(),re.focus=function(){re.selectRef.current.focus()},re.blur=function(){re.selectRef.current.blur()},re}return Object(v.a)(Z,[{key:"render",value:function(){return g.createElement(X,Object.assign({ref:this.selectRef},this.props))}}]),Z}(g.Component);k.Option=h,k.OptGroup=E;var F=k,U=H.c=F},Lmeb:function(j,H,b){},Lo0S:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.initLogging=s,H.getLogging=_,H.Error=H.Warn=H.Info=H.Debug=void 0;var I="warn",v=function(){};H.Debug=v;var T=function(){};H.Info=T;var y=function(){};H.Warn=y;var g=function(){};H.Error=g;function s(p){if(typeof p=="undefined"?p=I:I=p,H.Debug=v=H.Info=T=H.Warn=y=H.Error=g=function(){},typeof window.console!="undefined")switch(p){case"debug":H.Debug=v=console.debug.bind(window.console);case"info":H.Info=T=console.info.bind(window.console);case"warn":H.Warn=y=console.warn.bind(window.console);case"error":H.Error=g=console.error.bind(window.console);case"none":break;default:throw new window.Error("invalid logging type '"+p+"'")}}function _(){return I}s()},M8RZ:function(j,H,b){"use strict";b.d(H,"a",function(){return e});var I=b("fWQN"),v=b("mtLc"),T=b("yKVA"),y=b("879j"),g=b("q1tI"),s=b.n(g),_=b("i8i4"),p=b.n(_),e=function(o){Object(T.a)(l,o);var n=Object(y.a)(l);function l(r){var i;Object(I.a)(this,l),i=n.call(this,r);var t=window.document;return i.node=t.createElement("div"),t.body.appendChild(i.node),i}return Object(v.a)(l,[{key:"render",value:function(){var i=this.props.children;return Object(_.createPortal)(i,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),l}(s.a.Component)},MAU4:function(j,H,b){j.exports=b.p+"static/disappoint1.7e763f4d.svg"},MFOe:function(j,H,b){(function(I){var v=s(),T=_(),y=p(),g=typeof window!="undefined"?window:I;j.exports={assign:v,create:T,trim:y,bind:e,slice:o,each:n,map:l,pluck:r,isList:i,isFunction:t,isObject:a,Global:g};function s(){return Object.assign?Object.assign:function(d,f,h,u){for(var E=1;E<arguments.length;E++)n(Object(arguments[E]),function(x,O){d[O]=x});return d}}function _(){if(Object.create)return function(f,h,u,E){var x=o(arguments,1);return v.apply(this,[Object.create(f)].concat(x))};{function c(){}return function(f,h,u,E){var x=o(arguments,1);return c.prototype=f,v.apply(this,[new c].concat(x))}}}function p(){return String.prototype.trim?function(d){return String.prototype.trim.call(d)}:function(d){return d.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function e(c,d){return function(){return d.apply(c,Array.prototype.slice.call(arguments,0))}}function o(c,d){return Array.prototype.slice.call(c,d||0)}function n(c,d){r(c,function(f,h){return d(f,h),!1})}function l(c,d){var f=i(c)?[]:{};return r(c,function(h,u){return f[u]=d(h,u),!1}),f}function r(c,d){if(i(c)){for(var f=0;f<c.length;f++)if(d(c[f],f))return c[f]}else for(var h in c)if(c.hasOwnProperty(h)&&d(c[h],h))return c[h]}function i(c){return c!=null&&typeof c!="function"&&typeof c.length=="number"}function t(c){return c&&{}.toString.call(c)==="[object Function]"}function a(c){return c&&{}.toString.call(c)==="[object Object]"}}).call(this,b("IyRk"))},MI8n:function(j,H,b){"use strict";b.d(H,"c",function(){return g}),b.d(H,"b",function(){return e}),b.d(H,"e",function(){return o}),b.d(H,"a",function(){return n}),b.d(H,"d",function(){return l}),b.d(H,"f",function(){return r});var I=b("/cxE"),v=b("pmY6"),T=b("24hK"),y=b("5Y4S"),g;(function(i){i.None=()=>v.a.None;function t(P){return(z,X=null,k)=>{let F=!1,U;return U=P(L=>F?void 0:(U?U.dispose():F=!0,z.call(X,L)),null,k),F&&U.dispose(),U}}i.once=t;function a(P,z){return E((X,k=null,F)=>P(U=>X.call(k,z(U)),null,F))}i.map=a;function c(P,z){return E((X,k=null,F)=>P(U=>{z(U),X.call(k,U)},null,F))}i.forEach=c;function d(P,z){return E((X,k=null,F)=>P(U=>z(U)&&X.call(k,U),null,F))}i.filter=d;function f(P){return P}i.signal=f;function h(...P){return(z,X=null,k)=>Object(v.e)(...P.map(F=>F(U=>z.call(X,U),null,k)))}i.any=h;function u(P,z,X){let k=X;return a(P,F=>(k=z(k,F),k))}i.reduce=u;function E(P){let z;const X=new e({onFirstListenerAdd(){z=P(X.fire,X)},onLastListenerRemove(){z.dispose()}});return X.event}function x(P,z,X=100,k=!1,F){let U,L,B,Z=0;const re=new e({leakWarningThreshold:F,onFirstListenerAdd(){U=P(he=>{Z++,L=z(L,he),k&&!B&&(re.fire(L),L=void 0),clearTimeout(B),B=setTimeout(()=>{const Ce=L;L=void 0,B=void 0,(!k||Z>1)&&re.fire(Ce),Z=0},X)})},onLastListenerRemove(){U.dispose()}});return re.event}i.debounce=x;function O(P,z=(X,k)=>X===k){let X=!0,k;return d(P,F=>{const U=X||!z(F,k);return X=!1,k=F,U})}i.latch=O;function C(P,z){return[i.filter(P,z),i.filter(P,X=>!z(X))]}i.split=C;function w(P,z=!1,X=[]){let k=X.slice(),F=P(B=>{k?k.push(B):L.fire(B)});const U=()=>{k&&k.forEach(B=>L.fire(B)),k=null},L=new e({onFirstListenerAdd(){F||(F=P(B=>L.fire(B)))},onFirstListenerDidAdd(){k&&(z?setTimeout(U):U())},onLastListenerRemove(){F&&F.dispose(),F=null}});return L.event}i.buffer=w;class S{constructor(P){this.event=P}map(P){return new S(a(this.event,P))}forEach(P){return new S(c(this.event,P))}filter(P){return new S(d(this.event,P))}reduce(P,z){return new S(u(this.event,P,z))}latch(){return new S(O(this.event))}debounce(P,z=100,X=!1,k){return new S(x(this.event,P,z,X,k))}on(P,z,X){return this.event(P,z,X)}once(P,z,X){return t(this.event)(P,z,X)}}function A(P){return new S(P)}i.chain=A;function D(P,z,X=k=>k){const k=(...B)=>L.fire(X(...B)),F=()=>P.on(z,k),U=()=>P.removeListener(z,k),L=new e({onFirstListenerAdd:F,onLastListenerRemove:U});return L.event}i.fromNodeEventEmitter=D;function M(P,z,X=k=>k){const k=(...B)=>L.fire(X(...B)),F=()=>P.addEventListener(z,k),U=()=>P.removeEventListener(z,k),L=new e({onFirstListenerAdd:F,onLastListenerRemove:U});return L.event}i.fromDOMEventEmitter=M;function N(P){return new Promise(z=>t(P)(z))}i.toPromise=N})(g||(g={}));class s{constructor(i){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${i}_${s._idPool++}`}start(i){this._stopWatch=new y.a(!0),this._listenerCount=i}stop(){if(this._stopWatch){const i=this._stopWatch.elapsed();this._elapsedOverall+=i,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${i.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}s._idPool=0;let _=-1;class p{constructor(i,t=Math.random().toString(18).slice(2,5)){this.customThreshold=i,this.name=t,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(i){let t=_;if(typeof this.customThreshold=="number"&&(t=this.customThreshold),t<=0||i<t)return;this._stacks||(this._stacks=new Map);const a=new Error().stack.split(`
|
|
|
`).slice(3).join(`
|
|
|
`),c=this._stacks.get(a)||0;if(this._stacks.set(a,c+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=t*.5;let d,f=0;for(const[h,u]of this._stacks)(!d||f<u)&&(d=h,f=u);console.warn(`[${this.name}] potential listener LEAK detected, having ${i} listeners already. MOST frequent listener (${f}):`),console.warn(d)}return()=>{const d=this._stacks.get(a)||0;this._stacks.set(a,d-1)}}}class e{constructor(i){var t;this._disposed=!1,this._options=i,this._leakageMon=_>0?new p(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((t=this._options)===null||t===void 0?void 0:t._profName)?new s(this._options._profName):void 0}get event(){return this._event||(this._event=(i,t,a)=>{var c;this._listeners||(this._listeners=new T.a);const d=this._listeners.isEmpty();d&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const f=this._listeners.push(t?[i,t]:i);d&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,i,t);const h=(c=this._leakageMon)===null||c===void 0?void 0:c.check(this._listeners.size),u=Object(v.i)(()=>{if(h&&h(),!this._disposed&&(f(),this._options&&this._options.onLastListenerRemove)){const E=this._listeners&&!this._listeners.isEmpty();E||this._options.onLastListenerRemove(this)}});return a instanceof v.b?a.add(u):Array.isArray(a)&&a.push(u),u}),this._event}fire(i){var t,a;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new T.a);for(let c of this._listeners)this._deliveryQueue.push([c,i]);for((t=this._perfMon)===null||t===void 0||t.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[c,d]=this._deliveryQueue.shift();try{typeof c=="function"?c.call(void 0,d):c[0].call(c[1],d)}catch(f){Object(I.f)(f)}}(a=this._perfMon)===null||a===void 0||a.stop()}}dispose(){var i,t,a,c,d;this._disposed||(this._disposed=!0,(i=this._listeners)===null||i===void 0||i.clear(),(t=this._deliveryQueue)===null||t===void 0||t.clear(),(c=(a=this._options)===null||a===void 0?void 0:a.onLastListenerRemove)===null||c===void 0||c.call(a),(d=this._leakageMon)===null||d===void 0||d.dispose())}}class o extends e{constructor(i){super(i);this._isPaused=0,this._eventQueue=new T.a,this._mergeFn=i==null?void 0:i.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const i=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(i))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(i){this._listeners&&(this._isPaused!==0?this._eventQueue.push(i):super.fire(i))}}class n extends o{constructor(i){var t;super(i);this._delay=(t=i.delay)!==null&&t!==void 0?t:100}fire(i){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(i)}}class l{constructor(){this.buffers=[]}wrapEvent(i){return(t,a,c)=>i(d=>{const f=this.buffers[this.buffers.length-1];f?f.push(()=>t.call(a,d)):t.call(a,d)},void 0,c)}bufferEvents(i){const t=[];this.buffers.push(t);const a=i();return this.buffers.pop(),t.forEach(c=>c()),a}}class r{constructor(){this.listening=!1,this.inputEvent=g.None,this.inputEventListener=v.a.None,this.emitter=new e({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(i){this.inputEvent=i,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=i(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(j,H,b){"use strict";(function(I,v){b.d(H,"b",function(){return a}),b.d(H,"i",function(){return h}),b.d(H,"f",function(){return u}),b.d(H,"d",function(){return E}),b.d(H,"g",function(){return x}),b.d(H,"h",function(){return O}),b.d(H,"c",function(){return C}),b.d(H,"k",function(){return w}),b.d(H,"j",function(){return S}),b.d(H,"a",function(){return A}),b.d(H,"e",function(){return N});var T;const y="en";let g=!1,s=!1,_=!1,p=!1,e=!1,o=!1,n=!1,l,r=y,i,t;const a=typeof self=="object"?self:typeof I=="object"?I:{};let c;typeof a.vscode!="undefined"&&typeof a.vscode.process!="undefined"?c=a.vscode.process:typeof v!="undefined"&&(c=v);const d=typeof((T=c==null?void 0:c.versions)===null||T===void 0?void 0:T.electron)=="string"&&c.type==="renderer";if(typeof navigator=="object"&&!d)t=navigator.userAgent,g=t.indexOf("Windows")>=0,s=t.indexOf("Macintosh")>=0,n=(t.indexOf("Macintosh")>=0||t.indexOf("iPad")>=0||t.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,_=t.indexOf("Linux")>=0,o=!0,l=navigator.language,r=l;else if(typeof c=="object"){g=c.platform==="win32",s=c.platform==="darwin",_=c.platform==="linux",p=_&&!!c.env.SNAP&&!!c.env.SNAP_REVISION,l=y,r=y;const P=c.env.VSCODE_NLS_CONFIG;if(P)try{const z=JSON.parse(P),X=z.availableLanguages["*"];l=z.locale,r=X||y,i=z._translationsConfigFile}catch(z){}e=!0}else console.error("Unable to resolve platform.");let f=0;s?f=1:g?f=3:_&&(f=2);const h=g,u=s,E=_,x=e,O=o,C=n,w=t,S=function(){if(a.setImmediate)return a.setImmediate.bind(a);if(typeof a.postMessage=="function"&&!a.importScripts){let X=[];a.addEventListener("message",F=>{if(F.data&&F.data.vscodeSetImmediateId)for(let U=0,L=X.length;U<L;U++){const B=X[U];if(B.id===F.data.vscodeSetImmediateId){X.splice(U,1),B.callback();return}}});let k=0;return F=>{const U=++k;X.push({id:U,callback:F}),a.postMessage({vscodeSetImmediateId:U},"*")}}if(typeof(c==null?void 0:c.nextTick)=="function")return c.nextTick.bind(c);const z=Promise.resolve();return X=>z.then(X)}(),A=s||n?2:g?1:3;let D=!0,M=!1;function N(){if(!M){M=!0;const P=new Uint8Array(2);P[0]=1,P[1]=2;const z=new Uint16Array(P.buffer);D=z[0]===(2<<8)+1}return D}}).call(this,b("IyRk"),b("Q2Ig"))},MZdM:function(j,H,b){"use strict";function I(r){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(r)}Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;var v=p(b("Lo0S")),T=s(b("N/zr")),y=b("GdRQ"),g=b("GQ8N");function s(r){return r&&r.__esModule?r:{default:r}}function _(){if(typeof WeakMap!="function")return null;var r=new WeakMap;return _=function(){return r},r}function p(r){if(r&&r.__esModule)return r;if(r===null||I(r)!=="object"&&typeof r!="function")return{default:r};var i=_();if(i&&i.has(r))return i.get(r);var t={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var c in r)if(Object.prototype.hasOwnProperty.call(r,c)){var d=a?Object.getOwnPropertyDescriptor(r,c):null;d&&(d.get||d.set)?Object.defineProperty(t,c,d):t[c]=r[c]}return t.default=r,i&&i.set(r,t),t}function e(r,i){if(!(r instanceof i))throw new TypeError("Cannot call a class as a function")}function o(r,i){for(var t=0;t<i.length;t++){var a=i[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,a.key,a)}}function n(r,i,t){return i&&o(r.prototype,i),t&&o(r,t),r}var l=function(){function r(i){if(e(this,r),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,v.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},v.Debug("User Agent: "+navigator.userAgent),!("createImageData"in this._drawCtx))throw new Error("Canvas does not support createImageData");this._tile16x16=this._drawCtx.createImageData(16,16),v.Debug("<< Display.constructor"),this._scale=1,this._clipViewport=!1,this.onflush=function(){}}return n(r,[{key:"viewportChangePos",value:function(t,a){var c=this._viewportLoc;t=Math.floor(t),a=Math.floor(a),this._clipViewport||(t=-c.w,a=-c.h);var d=c.x+c.w-1,f=c.y+c.h-1;if(t<0&&c.x+t<0&&(t=-c.x),d+t>=this._fbWidth&&(t-=d+t-this._fbWidth+1),c.y+a<0&&(a=-c.y),f+a>=this._fbHeight&&(a-=f+a-this._fbHeight+1),t===0&&a===0)return;v.Debug("viewportChange deltaX: "+t+", deltaY: "+a),c.x+=t,c.y+=a,this._damage(c.x,c.y,c.w,c.h),this.flip()}},{key:"viewportChangeSize",value:function(t,a){(!this._clipViewport||typeof t=="undefined"||typeof a=="undefined")&&(v.Debug("Setting viewport to full display region"),t=this._fbWidth,a=this._fbHeight),t=Math.floor(t),a=Math.floor(a),t>this._fbWidth&&(t=this._fbWidth),a>this._fbHeight&&(a=this._fbHeight);var c=this._viewportLoc;if(c.w!==t||c.h!==a){c.w=t,c.h=a;var d=this._target;d.width=t,d.height=a,this.viewportChangePos(0,0),this._damage(c.x,c.y,c.w,c.h),this.flip(),this._rescale(this._scale)}}},{key:"absX",value:function(t){return this._scale===0?0:(0,g.toSigned32bit)(t/this._scale+this._viewportLoc.x)}},{key:"absY",value:function(t){return this._scale===0?0:(0,g.toSigned32bit)(t/this._scale+this._viewportLoc.y)}},{key:"resize",value:function(t,a){this._prevDrawStyle="",this._fbWidth=t,this._fbHeight=a;var c=this._backbuffer;if(c.width!==t||c.height!==a){var d=null;c.width>0&&c.height>0&&(d=this._drawCtx.getImageData(0,0,c.width,c.height)),c.width!==t&&(c.width=t),c.height!==a&&(c.height=a),d&&this._drawCtx.putImageData(d,0,0)}var f=this._viewportLoc;this.viewportChangeSize(f.w,f.h),this.viewportChangePos(0,0)}},{key:"_damage",value:function(t,a,c,d){t<this._damageBounds.left&&(this._damageBounds.left=t),a<this._damageBounds.top&&(this._damageBounds.top=a),t+c>this._damageBounds.right&&(this._damageBounds.right=t+c),a+d>this._damageBounds.bottom&&(this._damageBounds.bottom=a+d)}},{key:"flip",value:function(t){if(this._renderQ.length!==0&&!t)this._renderQPush({type:"flip"});else{var a=this._damageBounds.left,c=this._damageBounds.top,d=this._damageBounds.right-a,f=this._damageBounds.bottom-c,h=a-this._viewportLoc.x,u=c-this._viewportLoc.y;h<0&&(d+=h,a-=h,h=0),u<0&&(f+=u,c-=u,u=0),h+d>this._viewportLoc.w&&(d=this._viewportLoc.w-h),u+f>this._viewportLoc.h&&(f=this._viewportLoc.h-u),d>0&&f>0&&this._targetCtx.drawImage(this._backbuffer,a,c,d,f,h,u,d,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(t,a,c,d,f,h){this._renderQ.length!==0&&!h?this._renderQPush({type:"fill",x:t,y:a,width:c,height:d,color:f}):(this._setFillColor(f),this._drawCtx.fillRect(t,a,c,d),this._damage(t,a,c,d))}},{key:"copyImage",value:function(t,a,c,d,f,h,u){this._renderQ.length!==0&&!u?this._renderQPush({type:"copy",oldX:t,oldY:a,x:c,y:d,width:f,height:h}):(this._drawCtx.mozImageSmoothingEnabled=!1,this._drawCtx.webkitImageSmoothingEnabled=!1,this._drawCtx.msImageSmoothingEnabled=!1,this._drawCtx.imageSmoothingEnabled=!1,this._drawCtx.drawImage(this._backbuffer,t,a,f,h,c,d,f,h),this._damage(c,d,f,h))}},{key:"imageRect",value:function(t,a,c,d,f,h){if(c===0||d===0)return;var u=new Image;u.src="data: "+f+";base64,"+T.default.encode(h),this._renderQPush({type:"img",img:u,x:t,y:a,width:c,height:d})}},{key:"startTile",value:function(t,a,c,d,f){this._tileX=t,this._tileY=a,c===16&&d===16?this._tile=this._tile16x16:this._tile=this._drawCtx.createImageData(c,d);for(var h=f[2],u=f[1],E=f[0],x=this._tile.data,O=0;O<c*d*4;O+=4)x[O]=h,x[O+1]=u,x[O+2]=E,x[O+3]=255}},{key:"subTile",value:function(t,a,c,d,f){for(var h=f[2],u=f[1],E=f[0],x=t+c,O=a+d,C=this._tile.data,w=this._tile.width,S=a;S<O;S++)for(var A=t;A<x;A++){var D=(A+S*w)*4;C[D]=h,C[D+1]=u,C[D+2]=E,C[D+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(t,a,c,d,f,h,u){if(this._renderQ.length!==0&&!u){var E=new Uint8Array(c*d*4);E.set(new Uint8Array(f.buffer,0,E.length)),this._renderQPush({type:"blit",data:E,x:t,y:a,width:c,height:d})}else this._bgrxImageData(t,a,c,d,f,h)}},{key:"blitRgbImage",value:function(t,a,c,d,f,h,u){if(this._renderQ.length!==0&&!u){var E=new Uint8Array(c*d*3);E.set(new Uint8Array(f.buffer,0,E.length)),this._renderQPush({type:"blitRgb",data:E,x:t,y:a,width:c,height:d})}else this._rgbImageData(t,a,c,d,f,h)}},{key:"blitRgbxImage",value:function(t,a,c,d,f,h,u){if(this._renderQ.length!==0&&!u){var E=new Uint8Array(c*d*4);E.set(new Uint8Array(f.buffer,0,E.length)),this._renderQPush({type:"blitRgbx",data:E,x:t,y:a,width:c,height:d})}else this._rgbxImageData(t,a,c,d,f,h)}},{key:"drawImage",value:function(t,a,c){this._drawCtx.drawImage(t,a,c),this._damage(a,c,t.width,t.height)}},{key:"autoscale",value:function(t,a){var c;if(t===0||a===0)c=0;else{var d=this._viewportLoc,f=t/a,h=d.w/d.h;h>=f?c=t/d.w:c=a/d.h}this._rescale(c)}},{key:"_rescale",value:function(t){this._scale=t;var a=this._viewportLoc,c=t*a.w+"px",d=t*a.h+"px";(this._target.style.width!==c||this._target.style.height!==d)&&(this._target.style.width=c,this._target.style.height=d)}},{key:"_setFillColor",value:function(t){var a="rgb("+t[2]+","+t[1]+","+t[0]+")";a!==this._prevDrawStyle&&(this._drawCtx.fillStyle=a,this._prevDrawStyle=a)}},{key:"_rgbImageData",value:function(t,a,c,d,f,h){for(var u=this._drawCtx.createImageData(c,d),E=u.data,x=0,O=h;x<c*d*4;x+=4,O+=3)E[x]=f[O],E[x+1]=f[O+1],E[x+2]=f[O+2],E[x+3]=255;this._drawCtx.putImageData(u,t,a),this._damage(t,a,u.width,u.height)}},{key:"_bgrxImageData",value:function(t,a,c,d,f,h){for(var u=this._drawCtx.createImageData(c,d),E=u.data,x=0,O=h;x<c*d*4;x+=4,O+=4)E[x]=f[O+2],E[x+1]=f[O+1],E[x+2]=f[O],E[x+3]=255;this._drawCtx.putImageData(u,t,a),this._damage(t,a,u.width,u.height)}},{key:"_rgbxImageData",value:function(t,a,c,d,f,h){var u;y.supportsImageMetadata?u=new ImageData(new Uint8ClampedArray(f.buffer,f.byteOffset,c*d*4),c,d):(u=this._drawCtx.createImageData(c,d),u.data.set(new Uint8ClampedArray(f.buffer,f.byteOffset,c*d*4))),this._drawCtx.putImageData(u,t,a),this._damage(t,a,u.width,u.height)}},{key:"_renderQPush",value:function(t){this._renderQ.push(t),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 t=!0;t&&this._renderQ.length>0;){var a=this._renderQ[0];switch(a.type){case"flip":this.flip(!0);break;case"copy":this.copyImage(a.oldX,a.oldY,a.x,a.y,a.width,a.height,!0);break;case"fill":this.fillRect(a.x,a.y,a.width,a.height,a.color,!0);break;case"blit":this.blitImage(a.x,a.y,a.width,a.height,a.data,0,!0);break;case"blitRgb":this.blitRgbImage(a.x,a.y,a.width,a.height,a.data,0,!0);break;case"blitRgbx":this.blitRgbxImage(a.x,a.y,a.width,a.height,a.data,0,!0);break;case"img":if(a.img.complete&&a.img.width!==0&&a.img.height!==0){if(a.img.width!==a.width||a.img.height!==a.height){v.Error("Decoded image has incorrect dimensions. Got "+a.img.width+"x"+a.img.height+". Expected "+a.width+"x"+a.height+".");return}this.drawImage(a.img,a.x,a.y)}else a.img._noVNCDisplay=this,a.img.addEventListener("load",this._resumeRenderQ),t=!1;break}t&&this._renderQ.shift()}this._renderQ.length===0&&this._flushing&&(this._flushing=!1,this.onflush())}},{key:"scale",get:function(){return this._scale},set:function(t){this._rescale(t)}},{key:"clipViewport",get:function(){return this._clipViewport},set:function(t){this._clipViewport=t;var a=this._viewportLoc;this.viewportChangeSize(a.w,a.h),this.viewportChangePos(0,0)}},{key:"width",get:function(){return this._fbWidth}},{key:"height",get:function(){return this._fbHeight}}]),r}();H.default=l},MlIO:function(j,H,b){(function(I,v){j.exports=H=v(b("Ib8C"))})(this,function(I){return function(v){var T=I,y=T.lib,g=y.Base,s=y.WordArray,_=T.x64={},p=_.Word=g.extend({init:function(o,n){this.high=o,this.low=n}}),e=_.WordArray=g.extend({init:function(o,n){o=this.words=o||[],n!=v?this.sigBytes=n:this.sigBytes=o.length*8},toX32:function(){for(var o=this.words,n=o.length,l=[],r=0;r<n;r++){var i=o[r];l.push(i.high),l.push(i.low)}return s.create(l,this.sigBytes)},clone:function(){for(var o=g.clone.call(this),n=o.words=this.words.slice(0),l=n.length,r=0;r<l;r++)n[r]=n[r].clone();return o}})}(),I})},Mm8t:function(j,H){j.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(j,H,b){"use strict";function I(n){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(n)}Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;var v=y(b("Lo0S"));function T(){if(typeof WeakMap!="function")return null;var n=new WeakMap;return T=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 l=T();if(l&&l.has(n))return l.get(n);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var t in n)if(Object.prototype.hasOwnProperty.call(n,t)){var a=i?Object.getOwnPropertyDescriptor(n,t):null;a&&(a.get||a.set)?Object.defineProperty(r,t,a):r[t]=n[t]}return r.default=n,l&&l.set(n,r),r}function g(n,l){if(!(n instanceof l))throw new TypeError("Cannot call a class as a function")}function s(n,l){for(var r=0;r<l.length;r++){var i=l[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function _(n,l,r){return l&&s(n.prototype,l),r&&s(n,r),n}var p=!1,e=40*1024*1024,o=function(){function n(){g(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 _(n,[{key:"rQpeek8",value:function(){return this._rQ[this._rQi]}},{key:"rQskipBytes",value:function(r){this._rQi+=r}},{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(r){for(var i=0,t=r-1;t>=0;t--)i+=this._rQ[this._rQi++]<<t*8;return i}},{key:"rQshiftStr",value:function(r){typeof r=="undefined"&&(r=this.rQlen);for(var i="",t=0;t<r;t+=4096){var a=this.rQshiftBytes(Math.min(4096,r-t));i+=String.fromCharCode.apply(null,a)}return i}},{key:"rQshiftBytes",value:function(r){return typeof r=="undefined"&&(r=this.rQlen),this._rQi+=r,new Uint8Array(this._rQ.buffer,this._rQi-r,r)}},{key:"rQshiftTo",value:function(r,i){i===void 0&&(i=this.rQlen),r.set(new Uint8Array(this._rQ.buffer,this._rQi,i)),this._rQi+=i}},{key:"rQslice",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.rQlen;return new Uint8Array(this._rQ.buffer,this._rQi+r,i-r)}},{key:"rQwait",value:function(r,i,t){if(this.rQlen<i){if(t){if(this._rQi<t)throw new Error("rQwait cannot backup "+t+" bytes");this._rQi-=t}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(r){this._sQ.set(r,this._sQlen),this._sQlen+=r.length,this.flush()}},{key:"sendString",value:function(r){this.send(r.split("").map(function(i){return i.charCodeAt(0)}))}},{key:"off",value:function(r){this._eventHandlers[r]=function(){}}},{key:"on",value:function(r,i){this._eventHandlers[r]=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(r,i){var t=this;this.init(),this._websocket=new WebSocket(r,i),this._websocket.binaryType="arraybuffer",this._websocket.onmessage=this._recvMessage.bind(this),this._websocket.onopen=function(){v.Debug(">> WebSock.onopen"),t._websocket.protocol&&v.Info("Server choose sub-protocol: "+t._websocket.protocol),t._eventHandlers.open(),v.Debug("<< WebSock.onopen")},this._websocket.onclose=function(a){v.Debug(">> WebSock.onclose"),t._eventHandlers.close(a),v.Debug("<< WebSock.onclose")},this._websocket.onerror=function(a){v.Debug(">> WebSock.onerror: "+a),t._eventHandlers.error(a),v.Debug("<< WebSock.onerror: "+a)}}},{key:"close",value:function(){this._websocket&&((this._websocket.readyState===WebSocket.OPEN||this._websocket.readyState===WebSocket.CONNECTING)&&(v.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(r){var i=(this._rQlen-this._rQi+r)*8,t=this._rQbufferSize<i;if(t&&(this._rQbufferSize=Math.max(this._rQbufferSize*2,i)),this._rQbufferSize>e&&(this._rQbufferSize=e,this._rQbufferSize-this.rQlen<r))throw new Error("Receive Queue buffer exceeded "+e+" bytes, and the new message could not fit");if(t){var a=this._rQ.buffer;this._rQ=new Uint8Array(this._rQbufferSize),this._rQ.set(new Uint8Array(a,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(r){var i=new Uint8Array(r);i.length>this._rQbufferSize-this._rQlen&&this._expandCompactRQ(i.length),this._rQ.set(i,this._rQlen),this._rQlen+=i.length}},{key:"_recvMessage",value:function(r){this._DecodeMessage(r.data),this.rQlen>0?(this._eventHandlers.message(),this._rQlen==this._rQi&&(this._rQlen=0,this._rQi=0)):v.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(r){this._rQi=r}},{key:"rQlen",get:function(){return this._rQlen-this._rQi}}]),n}();H.default=o},"N/zr":function(j,H,b){"use strict";function I(s){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(s)}Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;var v=y(b("Lo0S"));function T(){if(typeof WeakMap!="function")return null;var s=new WeakMap;return T=function(){return s},s}function y(s){if(s&&s.__esModule)return s;if(s===null||I(s)!=="object"&&typeof s!="function")return{default:s};var _=T();if(_&&_.has(s))return _.get(s);var p={},e=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in s)if(Object.prototype.hasOwnProperty.call(s,o)){var n=e?Object.getOwnPropertyDescriptor(s,o):null;n&&(n.get||n.set)?Object.defineProperty(p,o,n):p[o]=s[o]}return p.default=s,_&&_.set(s,p),p}var g={toBase64Table:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split(""),base64Pad:"=",encode:function(_){"use strict";for(var p="",e=_.length,o=e%3,n=0;n<e-2;n+=3)p+=this.toBase64Table[_[n]>>2],p+=this.toBase64Table[((_[n]&3)<<4)+(_[n+1]>>4)],p+=this.toBase64Table[((_[n+1]&15)<<2)+(_[n+2]>>6)],p+=this.toBase64Table[_[n+2]&63];var l=e-o;return o===2?(p+=this.toBase64Table[_[l]>>2],p+=this.toBase64Table[((_[l]&3)<<4)+(_[l+1]>>4)],p+=this.toBase64Table[(_[l+1]&15)<<2],p+=this.toBase64Table[64]):o===1&&(p+=this.toBase64Table[_[l]>>2],p+=this.toBase64Table[(_[l]&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(_){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=_.indexOf("=")-p;e<0&&(e=_.length-p);for(var o=(e>>2)*3+Math.floor(e%4/1.5),n=new Array(o),l=0,r=0,i=0,t=p;t<_.length;t++){var a=this.toBinaryTable[_.charCodeAt(t)&127],c=_.charAt(t)===this.base64Pad;if(a===-1){v.Error("Illegal character code "+_.charCodeAt(t)+" at position "+t);continue}r=r<<6|a,l+=6,l>=8&&(l-=8,c||(n[i++]=r>>l&255),r&=(1<<l)-1)}if(l){var d=new Error("Corrupted base64 string");throw d.name="Base64-Error",d}return n}};H.default=g},N0LK:function(j,H,b){"use strict";b.d(H,"C",function(){return I}),b.d(H,"v",function(){return T}),b.d(H,"s",function(){return y}),b.d(H,"t",function(){return g}),b.d(H,"U",function(){return s}),b.d(H,"J",function(){return _}),b.d(H,"O",function(){return p}),b.d(H,"p",function(){return e}),b.d(H,"T",function(){return o}),b.d(H,"q",function(){return n}),b.d(H,"N",function(){return l}),b.d(H,"M",function(){return r}),b.d(H,"Q",function(){return i}),b.d(H,"u",function(){return t}),b.d(H,"x",function(){return a}),b.d(H,"I",function(){return c}),b.d(H,"f",function(){return d}),b.d(H,"h",function(){return f}),b.d(H,"g",function(){return h}),b.d(H,"i",function(){return u}),b.d(H,"G",function(){return E}),b.d(H,"H",function(){return x}),b.d(H,"r",function(){return O}),b.d(H,"R",function(){return C}),b.d(H,"d",function(){return w}),b.d(H,"e",function(){return S}),b.d(H,"E",function(){return A}),b.d(H,"F",function(){return D}),b.d(H,"j",function(){return M}),b.d(H,"z",function(){return N}),b.d(H,"K",function(){return z}),b.d(H,"L",function(){return X}),b.d(H,"m",function(){return F}),b.d(H,"k",function(){return L}),b.d(H,"A",function(){return Z}),b.d(H,"a",function(){return re}),b.d(H,"n",function(){return he}),b.d(H,"l",function(){return Ce}),b.d(H,"D",function(){return ke}),b.d(H,"B",function(){return te}),b.d(H,"b",function(){return Re}),b.d(H,"S",function(){return Te}),b.d(H,"o",function(){return pe}),b.d(H,"P",function(){return me}),b.d(H,"w",function(){return se}),b.d(H,"c",function(){return be}),b.d(H,"y",function(){return Fe});function I(Y){return!Y||typeof Y!="string"?!0:Y.trim().length===0}const v=/{(\d+)}/g;function T(Y,...oe){return oe.length===0?Y:Y.replace(v,function(le,Ee){const Le=parseInt(Ee,10);return isNaN(Le)||Le<0||Le>=oe.length?le:oe[Le]})}function y(Y){return Y.replace(/[<>&]/g,function(oe){switch(oe){case"<":return"<";case">":return">";case"&":return"&";default:return oe}})}function g(Y){return Y.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function s(Y,oe=" "){const le=_(Y,oe);return p(le,oe)}function _(Y,oe){if(!Y||!oe)return Y;const le=oe.length;if(le===0||Y.length===0)return Y;let Ee=0;for(;Y.indexOf(oe,Ee)===Ee;)Ee=Ee+le;return Y.substring(Ee)}function p(Y,oe){if(!Y||!oe)return Y;const le=oe.length,Ee=Y.length;if(le===0||Ee===0)return Y;let Le=Ee,ge=-1;for(;!(ge=Y.lastIndexOf(oe,Le-1),ge===-1||ge+le!==Le);){if(ge===0)return"";Le=ge}return Y.substring(0,Le)}function e(Y){return Y.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function o(Y){return Y.replace(/\*/g,"")}function n(Y,oe,le={}){if(!Y)throw new Error("Cannot create regex from empty string");oe||(Y=g(Y)),le.wholeWord&&(/\B/.test(Y.charAt(0))||(Y="\\b"+Y),/\B/.test(Y.charAt(Y.length-1))||(Y=Y+"\\b"));let Ee="";return le.global&&(Ee+="g"),le.matchCase||(Ee+="i"),le.multiline&&(Ee+="m"),le.unicode&&(Ee+="u"),new RegExp(Y,Ee)}function l(Y){if(Y.source==="^"||Y.source==="^$"||Y.source==="$"||Y.source==="^\\s*$")return!1;const oe=Y.exec("");return!!(oe&&Y.lastIndex===0)}function r(Y){return(Y.global?"g":"")+(Y.ignoreCase?"i":"")+(Y.multiline?"m":"")+(Y.unicode?"u":"")}function i(Y){return Y.split(/\r\n|\r|\n/)}function t(Y){for(let oe=0,le=Y.length;oe<le;oe++){const Ee=Y.charCodeAt(oe);if(Ee!==32&&Ee!==9)return oe}return-1}function a(Y,oe=0,le=Y.length){for(let Ee=oe;Ee<le;Ee++){const Le=Y.charCodeAt(Ee);if(Le!==32&&Le!==9)return Y.substring(oe,Ee)}return Y.substring(oe,le)}function c(Y,oe=Y.length-1){for(let le=oe;le>=0;le--){const Ee=Y.charCodeAt(le);if(Ee!==32&&Ee!==9)return le}return-1}function d(Y,oe){return Y<oe?-1:Y>oe?1:0}function f(Y,oe,le=0,Ee=Y.length,Le=0,ge=oe.length){for(;le<Ee&&Le<ge;le++,Le++){let Xe=Y.charCodeAt(le),tt=oe.charCodeAt(Le);if(Xe<tt)return-1;if(Xe>tt)return 1}const De=Ee-le,_e=ge-Le;return De<_e?-1:De>_e?1:0}function h(Y,oe){return u(Y,oe,0,Y.length,0,oe.length)}function u(Y,oe,le=0,Ee=Y.length,Le=0,ge=oe.length){for(;le<Ee&&Le<ge;le++,Le++){let Xe=Y.charCodeAt(le),tt=oe.charCodeAt(Le);if(Xe===tt)continue;if(Xe>=128||tt>=128)return f(Y.toLowerCase(),oe.toLowerCase(),le,Ee,Le,ge);E(Xe)&&(Xe-=32),E(tt)&&(tt-=32);const ze=Xe-tt;if(ze===0)continue;return ze}const De=Ee-le,_e=ge-Le;return De<_e?-1:De>_e?1:0}function E(Y){return Y>=97&&Y<=122}function x(Y){return Y>=65&&Y<=90}function O(Y,oe){return Y.length===oe.length&&u(Y,oe)===0}function C(Y,oe){const le=oe.length;return oe.length>Y.length?!1:u(Y,oe,0,le)===0}function w(Y,oe){let le,Ee=Math.min(Y.length,oe.length);for(le=0;le<Ee;le++)if(Y.charCodeAt(le)!==oe.charCodeAt(le))return le;return Ee}function S(Y,oe){let le,Ee=Math.min(Y.length,oe.length);const Le=Y.length-1,ge=oe.length-1;for(le=0;le<Ee;le++)if(Y.charCodeAt(Le-le)!==oe.charCodeAt(ge-le))return le;return Ee}function A(Y){return 55296<=Y&&Y<=56319}function D(Y){return 56320<=Y&&Y<=57343}function M(Y,oe){return(Y-55296<<10)+(oe-56320)+65536}function N(Y,oe,le){const Ee=Y.charCodeAt(le);if(A(Ee)&&le+1<oe){const Le=Y.charCodeAt(le+1);if(D(Le))return M(Ee,Le)}return Ee}function P(Y,oe){const le=Y.charCodeAt(oe-1);if(D(le)&&oe>1){const Ee=Y.charCodeAt(oe-2);if(A(Ee))return M(Ee,le)}return le}function z(Y,oe){const le=ae.getInstance(),Ee=oe,Le=Y.length,ge=N(Y,Le,oe);oe+=ge>=65536?2:1;let De=le.getGraphemeBreakType(ge);for(;oe<Le;){const _e=N(Y,Le,oe),Xe=le.getGraphemeBreakType(_e);if(be(De,Xe))break;oe+=_e>=65536?2:1,De=Xe}return oe-Ee}function X(Y,oe){const le=ae.getInstance(),Ee=oe,Le=P(Y,oe);oe-=Le>=65536?2:1;let ge=le.getGraphemeBreakType(Le);for(;oe>0;){const De=P(Y,oe),_e=le.getGraphemeBreakType(De);if(be(_e,ge))break;oe-=De>=65536?2:1,ge=_e}return Ee-oe}const k=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function F(Y){return k.test(Y)}const U=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function L(Y){return U.test(Y)}const B=/^[\t\n\r\x20-\x7E]*$/;function Z(Y){return B.test(Y)}const re=/[\u2028\u2029]/;function he(Y){return re.test(Y)}function Ce(Y){for(let oe=0,le=Y.length;oe<le;oe++)if(ke(Y.charCodeAt(oe)))return!0;return!1}function ke(Y){return Y=+Y,Y>=11904&&Y<=55215||Y>=63744&&Y<=64255||Y>=65281&&Y<=65374}function te(Y){return Y>=127462&&Y<=127487||Y===8986||Y===8987||Y===9200||Y===9203||Y>=9728&&Y<=10175||Y===11088||Y===11093||Y>=127744&&Y<=128591||Y>=128640&&Y<=128764||Y>=128992&&Y<=129003||Y>=129280&&Y<=129535||Y>=129648&&Y<=129750}const Re=String.fromCharCode(65279);function Te(Y){return!!(Y&&Y.length>0&&Y.charCodeAt(0)===65279)}function pe(Y,oe=!1){return Y?(oe&&(Y=Y.replace(/\\./g,"")),Y.toLowerCase()!==Y):!1}function me(Y){const oe=90-65+1;return Y=Y%(2*oe),Y<oe?String.fromCharCode(97+Y):String.fromCharCode(65+Y-oe)}function se(Y){const oe=ae.getInstance();return oe.getGraphemeBreakType(Y)}function be(Y,oe){return Y===0?oe!==5&&oe!==7:Y===2&&oe===3?!1:Y===4||Y===2||Y===3||(oe===4||oe===2||oe===3)?!0:Y===8&&(oe===8||oe===9||oe===11||oe===12)||((Y===11||Y===9)&&(oe===9||oe===10)||((Y===12||Y===10)&&oe===10||(oe===5||oe===13||(oe===7||(Y===1||Y===13&&oe===14)))))?!1:!(Y===6&&oe===6)}class ae{constructor(){this._data=fe()}static getInstance(){return ae._INSTANCE||(ae._INSTANCE=new ae),ae._INSTANCE}getGraphemeBreakType(Y){if(Y<32)return Y===10?3:Y===13?2:4;if(Y<127)return 0;const oe=this._data,le=oe.length/3;let Ee=1;for(;Ee<=le;)if(Y<oe[3*Ee])Ee=2*Ee;else if(Y>oe[3*Ee+1])Ee=2*Ee+1;else return oe[3*Ee+2];return 0}}ae._INSTANCE=null;function fe(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function Fe(Y,oe){if(Y===0)return 0;const le=ie(Y,oe);if(le!==void 0)return le;const Ee=P(oe,Y);return Y-=q(Ee),Y}function ie(Y,oe){let le=P(oe,Y);for(Y-=q(le);Q(le)||le===65039||le===8419;){if(Y===0)return;le=P(oe,Y),Y-=q(le)}if(!te(le))return;if(Y>=0){const Ee=P(oe,Y);Ee===8205&&(Y-=q(Ee))}return Y}function q(Y){return Y>=65536?2:1}function Q(Y){return 127995<=Y&&Y<=127999}},NBmB:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.encodingName=v,H.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};H.encodings=I;function v(T){switch(T){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 "+T+"]"}}},NFKh:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("MlIO"),b("F+F2"),b("qM6L"),b("ETIr"),b("wbyO"),b("cv67"),b("3y9D"),b("lPiR"),b("GRuw"),b("1uat"),b("uGsb"),b("5hvy"),b("ELcG"),b("WYAk"),b("e7zE"),b("K3mO"),b("OLod"),b("ALsQ"),b("9OqN"),b("qu8F"),b("S6kV"),b("gb/T"),b("qBft"),b("oRuE"),b("jO9C"),b("KmYQ"),b("uGxW"),b("bQjk"),b("wZgz"),b("pA7S"),b("w7YG"),b("E4JC"),b("PVpz"))})(this,function(I){return I})},NLgs:function(j,H,b){"use strict";b.d(H,"e",function(){return c}),b.d(H,"f",function(){return d}),b.d(H,"d",function(){return h}),b.d(H,"c",function(){return u}),b.d(H,"a",function(){return E}),b.d(H,"b",function(){return x});var I=b("miYZ"),v=b("tsqr"),T=b("9og8"),y=b("2qtc"),g=b("kLXV"),s=b("WmNS"),_=b.n(s),p=b("q1tI"),e=b.n(p),o=b("9kvl"),n=b("xKgJ"),l=b("1vsH"),r=b("RCxd"),i=b("yTi+"),t=b.n(i),a=b("m3rI"),c=function(C){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!!(d(C)&&f(w))},d=function(C){return Object(n.p)()?!0:(C({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},f=function(){var C,w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,S=Object(o.c)()._store.getState(),A=S.user;return(C=A.userInfo)!==null&&C!==void 0&&C.profile_completed?!0:(g.a.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:w?"\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(){o.d.push("/account/profile/edit")}}),!1)},h=function(){var C,w=Object(o.c)()._store.getState(),S=w.user;return(C=S.userInfo)!==null&&C!==void 0&&C.professional_certification?!0:(g.a.confirm({title:"\u63D0\u793A",centered:!0,content:e.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(l.S)("/account/certification")}}),!1)},u=function(){var C;if(Object(n.a)())return!0;var w=Object(o.c)()._store.getState(),S=w.user,A=w.globalSetting;return g.a.warning({centered:!0,width:530,title:"\u63D0\u793A",content:e.a.createElement("div",{className:"tc",style:{marginLeft:-38}},e.a.createElement("p",null,"\u626B\u7801\u6DFB\u52A0\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650"),e.a.createElement("img",{src:a.a.IMG_SERVER+(A==null||((C=A.setting)===null||C===void 0)?void 0:C.authority_qrcode_url),width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1},E=function(C,w){var S;if(C)return!0;var A=Object(o.c)()._store.getState(),D=A.user,M=A.globalSetting;return g.a.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:e.a.createElement("div",null,e.a.createElement("p",null,w||"\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"),e.a.createElement("div",{style:{marginLeft:"110px"}},e.a.createElement("img",{src:a.a.IMG_SERVER+(M==null||((S=M.setting)===null||S===void 0)?void 0:S.authority_qrcode_url),width:200}),e.a.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:function(){Object(l.S)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1},x=function(C){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",S=Object(o.c)()._store.getState(),A=S.shixunsDetail.detail;return(A==null?void 0:A.public)===2||(A==null?void 0:A.public)===1||(A==null?void 0:A.shixun_status)===3?(g.a.info({centered:!0,icon:e.a.createElement(r.a,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:e.a.createElement("div",{className:"tc",style:{marginLeft:-38}},e.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},e.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",(A==null?void 0:A.public)===2?"\u5DF2\u516C\u5F00":(A==null?void 0:A.public)===1?"\u5F85\u5BA1\u6838":"\u5DF2\u5173\u95ED","\uFF0C",w,"\u3002"),e.a.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),e.a.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:t.a,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0):(A==null?void 0:A.shixun_status)===2?(g.a.confirm({centered:!0,icon:e.a.createElement(r.a,null),title:"\u63D0\u793A",content:e.a.createElement("div",null,e.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",w,"\u3002"),e.a.createElement("br",null),e.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(){g.a.confirm({width:440,centered:!0,icon:e.a.createElement(r.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 M=Object(T.a)(_.a.mark(function P(){var z;return _.a.wrap(function(k){for(;;)switch(k.prev=k.next){case 0:return k.next=2,C({type:"shixunsDetail/cancelRelease",payload:{id:A==null?void 0:A.identifier}});case 2:z=k.sent,z.status!==401&&(v.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),C({type:"shixunsDetail/getShixunsDetail",payload:{id:A==null?void 0:A.identifier}}),C({type:"practiceSetting/getCommonData",payload:{id:A==null?void 0:A.identifier}}));case 4:case"end":return k.stop()}},P)}));function N(){return M.apply(this,arguments)}return N}()})}}),!0):!1}},Nmxd:function(j,H){j.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=="},NvD2:function(j,H,b){"use strict";b.d(H,"a",function(){return s});var I=b("Kwbf");function v(_,p){var e=new Set;return _.forEach(function(o){p.has(o)||e.add(o)}),e}function T(_){var p=_||{},e=p.disabled,o=p.disableCheckbox,n=p.checkable;return!!(e||o)||n===!1}function y(_,p,e,o){for(var n=new Set(_),l=new Set,r=0;r<=e;r+=1){var i=p.get(r)||new Set;i.forEach(function(d){var f=d.key,h=d.node,u=d.children,E=u===void 0?[]:u;n.has(f)&&!o(h)&&E.filter(function(x){return!o(x.node)}).forEach(function(x){n.add(x.key)})})}for(var t=new Set,a=e;a>=0;a-=1){var c=p.get(a)||new Set;c.forEach(function(d){var f=d.parent,h=d.node;if(o(h)||!d.parent||t.has(d.parent.key))return;if(o(d.parent.node)){t.add(f.key);return}var u=!0,E=!1;(f.children||[]).filter(function(x){return!o(x.node)}).forEach(function(x){var O=x.key,C=n.has(O);u&&!C&&(u=!1),!E&&(C||l.has(O))&&(E=!0)}),u&&n.add(f.key),E&&l.add(f.key),t.add(f.key)})}return{checkedKeys:Array.from(n),halfCheckedKeys:Array.from(v(l,n))}}function g(_,p,e,o,n){for(var l=new Set(_),r=new Set(p),i=0;i<=o;i+=1){var t=e.get(i)||new Set;t.forEach(function(f){var h=f.key,u=f.node,E=f.children,x=E===void 0?[]:E;!l.has(h)&&!r.has(h)&&!n(u)&&x.filter(function(O){return!n(O.node)}).forEach(function(O){l.delete(O.key)})})}r=new Set;for(var a=new Set,c=o;c>=0;c-=1){var d=e.get(c)||new Set;d.forEach(function(f){var h=f.parent,u=f.node;if(n(u)||!f.parent||a.has(f.parent.key))return;if(n(f.parent.node)){a.add(h.key);return}var E=!0,x=!1;(h.children||[]).filter(function(O){return!n(O.node)}).forEach(function(O){var C=O.key,w=l.has(C);E&&!w&&(E=!1),!x&&(w||r.has(C))&&(x=!0)}),E||l.delete(h.key),x&&r.add(h.key),a.add(h.key)})}return{checkedKeys:Array.from(l),halfCheckedKeys:Array.from(v(r,l))}}function s(_,p,e,o){var n=[],l;o?l=o:l=T;var r=new Set(_.filter(function(c){var d=!!e[c];return d||n.push(c),d})),i=new Map,t=0;Object.keys(e).forEach(function(c){var d=e[c],f=d.level,h=i.get(f);h||(h=new Set,i.set(f,h)),h.add(d),t=Math.max(t,f)}),Object(I.a)(!n.length,"Tree missing follow keys: ".concat(n.slice(0,100).map(function(c){return"'".concat(c,"'")}).join(", ")));var a;return p===!0?a=y(r,i,t,l):a=g(r,p.halfCheckedKeys,i,t,l),a}},OLES:function(j,H,b){"use strict";var I=b("U8pU"),v=b("VTBJ"),T=b("Ff2n"),y=b("q1tI"),g=b("uciX"),s=b("7ixt"),_=function(r){var i=r.overlay,t=r.prefixCls,a=r.id,c=r.overlayInnerStyle;return y.createElement("div",{className:"".concat(t,"-inner"),id:a,role:"tooltip",style:c},typeof i=="function"?i():i)},p=_,e=function(r,i){var t=r.overlayClassName,a=r.trigger,c=a===void 0?["hover"]:a,d=r.mouseEnterDelay,f=d===void 0?0:d,h=r.mouseLeaveDelay,u=h===void 0?.1:h,E=r.overlayStyle,x=r.prefixCls,O=x===void 0?"rc-tooltip":x,C=r.children,w=r.onVisibleChange,S=r.afterVisibleChange,A=r.transitionName,D=r.animation,M=r.placement,N=M===void 0?"right":M,P=r.align,z=P===void 0?{}:P,X=r.destroyTooltipOnHide,k=X===void 0?!1:X,F=r.defaultVisible,U=r.getTooltipContainer,L=r.overlayInnerStyle,B=Object(T.a)(r,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),Z=Object(y.useRef)(null);Object(y.useImperativeHandle)(i,function(){return Z.current});var re=Object(v.a)({},B);"visible"in r&&(re.popupVisible=r.visible);var he=function(){var Te=r.arrowContent,pe=Te===void 0?null:Te,me=r.overlay,se=r.id;return[y.createElement("div",{className:"".concat(O,"-arrow"),key:"arrow"},pe),y.createElement(p,{key:"content",prefixCls:O,id:se,overlay:me,overlayInnerStyle:L})]},Ce=!1,ke=!1;if(typeof k=="boolean")Ce=k;else if(k&&Object(I.a)(k)==="object"){var te=k.keepParent;Ce=te===!0,ke=te===!1}return y.createElement(g.a,Object.assign({popupClassName:t,prefixCls:O,popup:he,action:c,builtinPlacements:s.a,popupPlacement:N,ref:Z,popupAlign:z,getPopupContainer:U,onPopupVisibleChange:w,afterPopupVisibleChange:S,popupTransitionName:A,popupAnimation:D,defaultPopupVisible:F,destroyPopupOnHide:Ce,autoDestroy:ke,mouseLeaveDelay:u,popupStyle:E,mouseEnterDelay:f},re),C)},o=Object(y.forwardRef)(e),n=H.a=o},OLod:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("K3mO"))})(this,function(I){I.lib.Cipher||function(v){var T=I,y=T.lib,g=y.Base,s=y.WordArray,_=y.BufferedBlockAlgorithm,p=T.enc,e=p.Utf8,o=p.Base64,n=T.algo,l=n.EvpKDF,r=y.Cipher=_.extend({cfg:g.extend(),createEncryptor:function(A,D){return this.create(this._ENC_XFORM_MODE,A,D)},createDecryptor:function(A,D){return this.create(this._DEC_XFORM_MODE,A,D)},init:function(A,D,M){this.cfg=this.cfg.extend(M),this._xformMode=A,this._key=D,this.reset()},reset:function(){_.reset.call(this),this._doReset()},process:function(A){return this._append(A),this._process()},finalize:function(A){A&&this._append(A);var D=this._doFinalize();return D},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function A(D){return typeof D=="string"?S:O}return function(D){return{encrypt:function(M,N,P){return A(N).encrypt(D,M,N,P)},decrypt:function(M,N,P){return A(N).decrypt(D,M,N,P)}}}}()}),i=y.StreamCipher=r.extend({_doFinalize:function(){var A=this._process(!0);return A},blockSize:1}),t=T.mode={},a=y.BlockCipherMode=g.extend({createEncryptor:function(A,D){return this.Encryptor.create(A,D)},createDecryptor:function(A,D){return this.Decryptor.create(A,D)},init:function(A,D){this._cipher=A,this._iv=D}}),c=t.CBC=function(){var A=a.extend();A.Encryptor=A.extend({processBlock:function(M,N){var P=this._cipher,z=P.blockSize;D.call(this,M,N,z),P.encryptBlock(M,N),this._prevBlock=M.slice(N,N+z)}}),A.Decryptor=A.extend({processBlock:function(M,N){var P=this._cipher,z=P.blockSize,X=M.slice(N,N+z);P.decryptBlock(M,N),D.call(this,M,N,z),this._prevBlock=X}});function D(M,N,P){var z,X=this._iv;X?(z=X,this._iv=v):z=this._prevBlock;for(var k=0;k<P;k++)M[N+k]^=z[k]}return A}(),d=T.pad={},f=d.Pkcs7={pad:function(A,D){for(var M=D*4,N=M-A.sigBytes%M,P=N<<24|N<<16|N<<8|N,z=[],X=0;X<N;X+=4)z.push(P);var k=s.create(z,N);A.concat(k)},unpad:function(A){var D=A.words[A.sigBytes-1>>>2]&255;A.sigBytes-=D}},h=y.BlockCipher=r.extend({cfg:r.cfg.extend({mode:c,padding:f}),reset:function(){var A;r.reset.call(this);var D=this.cfg,M=D.iv,N=D.mode;this._xformMode==this._ENC_XFORM_MODE?A=N.createEncryptor:(A=N.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==A?this._mode.init(this,M&&M.words):(this._mode=A.call(N,this,M&&M.words),this._mode.__creator=A)},_doProcessBlock:function(A,D){this._mode.processBlock(A,D)},_doFinalize:function(){var A,D=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(D.pad(this._data,this.blockSize),A=this._process(!0)):(A=this._process(!0),D.unpad(A)),A},blockSize:128/32}),u=y.CipherParams=g.extend({init:function(A){this.mixIn(A)},toString:function(A){return(A||this.formatter).stringify(this)}}),E=T.format={},x=E.OpenSSL={stringify:function(A){var D,M=A.ciphertext,N=A.salt;return N?D=s.create([1398893684,1701076831]).concat(N).concat(M):D=M,D.toString(o)},parse:function(A){var D,M=o.parse(A),N=M.words;return N[0]==1398893684&&N[1]==1701076831&&(D=s.create(N.slice(2,4)),N.splice(0,4),M.sigBytes-=16),u.create({ciphertext:M,salt:D})}},O=y.SerializableCipher=g.extend({cfg:g.extend({format:x}),encrypt:function(A,D,M,N){N=this.cfg.extend(N);var P=A.createEncryptor(M,N),z=P.finalize(D),X=P.cfg;return u.create({ciphertext:z,key:M,iv:X.iv,algorithm:A,mode:X.mode,padding:X.padding,blockSize:A.blockSize,formatter:N.format})},decrypt:function(A,D,M,N){N=this.cfg.extend(N),D=this._parse(D,N.format);var P=A.createDecryptor(M,N).finalize(D.ciphertext);return P},_parse:function(A,D){return typeof A=="string"?D.parse(A,this):A}}),C=T.kdf={},w=C.OpenSSL={execute:function(A,D,M,N){N||(N=s.random(64/8));var P=l.create({keySize:D+M}).compute(A,N),z=s.create(P.words.slice(D),M*4);return P.sigBytes=D*4,u.create({key:P,iv:z,salt:N})}},S=y.PasswordBasedCipher=O.extend({cfg:O.cfg.extend({kdf:w}),encrypt:function(A,D,M,N){N=this.cfg.extend(N);var P=N.kdf.execute(M,A.keySize,A.ivSize);N.iv=P.iv;var z=O.encrypt.call(this,A,D,P.key,N);return z.mixIn(P),z},decrypt:function(A,D,M,N){N=this.cfg.extend(N),D=this._parse(D,N.format);var P=N.kdf.execute(M,A.keySize,A.ivSize,D.salt);N.iv=P.iv;var z=O.decrypt.call(this,A,D,P.key,N);return z}})}()})},OZM5:function(j,H,b){"use strict";b.d(H,"b",function(){return o}),b.d(H,"a",function(){return n}),b.d(H,"k",function(){return l}),b.d(H,"h",function(){return r}),b.d(H,"i",function(){return i}),b.d(H,"g",function(){return t}),b.d(H,"c",function(){return a}),b.d(H,"d",function(){return c}),b.d(H,"j",function(){return h}),b.d(H,"e",function(){return u}),b.d(H,"f",function(){return E});var I=b("KQm4"),v=b("U8pU"),T=b("Ff2n"),y=b("q1tI"),g=b.n(y),s=b("Kwbf"),_=b("WaYH"),p=.25,e=2;function o(x,O){var C=x.slice(),w=C.indexOf(O);return w>=0&&C.splice(w,1),C}function n(x,O){var C=x.slice();return C.indexOf(O)===-1&&C.push(O),C}function l(x){return x.split("-")}function r(x,O){return"".concat(x,"-").concat(O)}function i(x){return x&&x.type&&x.type.isTreeNode}function t(x,O){var C=[x],w=O[x];function S(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];A.forEach(function(D){var M=D.key,N=D.children;C.push(M),S(N)})}return S(w.children),C}function a(x,O){var C=x.clientY,w=O.selectHandle.getBoundingClientRect(),S=w.top,A=w.bottom,D=w.height,M=Math.max(D*p,e);return C<=S+M?-1:C>=A-M?1:0}function c(x,O){if(!x)return;var C=O.multiple;return C?x.slice():x.length?[x[0]]:x}var d=function(O){return O};function f(x,O){if(!x)return[];var C=O||{},w=C.processProps,S=w===void 0?d:w,A=Array.isArray(x)?x:[x];return A.map(function(D){var M=D.children,N=Object(T.a)(D,["children"]),P=f(M,O);return g.a.createElement(_.a,Object.assign({},S(N)),P)})}function h(x){if(!x)return null;var O;if(Array.isArray(x))O={checkedKeys:x,halfCheckedKeys:void 0};else if(Object(v.a)(x)==="object")O={checkedKeys:x.checked||void 0,halfCheckedKeys:x.halfChecked||void 0};else return Object(s.a)(!1,"`checkedKeys` is not an array or an object"),null;return O}function u(x,O){var C=new Set;function w(S){if(C.has(S))return;var A=O[S];if(!A)return;C.add(S);var D=A.parent,M=A.node;if(M.disabled)return;D&&w(D.key)}return(x||[]).forEach(function(S){w(S)}),Object(I.a)(C)}function E(x){var O={};return Object.keys(x).forEach(function(C){(C.startsWith("data-")||C.startsWith("aria-"))&&(O[C]=x[C])}),O}},Ohmc:function(j,H,b){j.exports=b.p+"static/certificate.fc32dc1b.jpg"},OoWo:function(j,H,b){},Ot1p:function(j,H,b){"use strict";var I=b("2qtc"),v=b("kLXV"),T=b("rAM+"),y=b("miYZ"),g=b("tsqr"),s=b("9og8"),_=b("tJVT"),p=b("jrin"),e=b("WmNS"),o=b.n(e),n=b("q1tI"),l=b.n(n),r=b("VrN/"),i=b.n(r),t=b("bdgK"),a=b("p77/"),c=b("Bd2K"),d=b("ELLl"),f=b("19Vz"),h=b("lZu9"),u=b("+NIl"),E=b("kSUc"),x=b("9Bee"),O=function(Qe){var ne=Qe.value,Ze=ne===void 0?"":ne,lt=Qe.className,Be=Qe.showTextOnly,$e=Qe.showLines,rt=Qe.style,xt=rt===void 0?{}:rt,ft=Object(n.useMemo)(function(){return""},[Ze]);return l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{dangerouslySetInnerHTML:{__html:ft}}))},C=b("0Owb"),w=b("dejd"),S=b("C+DQ"),A=b("1vsH"),D=b("m3rI"),M=[{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 N(Qe){var ne=Qe.onActionCallback,Ze=Qe.title,lt=Qe.icon,Be=Qe.actionName,$e=Qe.className,rt=$e===void 0?"":$e,xt=Qe.children;function ft(){ne(Be)}return l.a.createElement("a",{title:Ze,className:rt,onClick:ft},l.a.createElement("i",{className:"md-iconfont ".concat(lt)}),xt)}var P=function(Qe){var ne=Qe.watch,Ze=Qe.showNullButton,lt=Qe.onActionCallback,Be=Qe.fullScreen,$e=Qe.insertTemp,rt=Qe.hidetoolBar,xt=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(xt,"&api=").concat(encodeURIComponent(D.a.PROXY_SERVER)));var st=[].concat(M,[{title:"".concat(ne?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(ne?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return l.a.createElement("ul",{className:"markdown-toolbar-container"},!rt&&st.map(function(Ne,Ge){return l.a.createElement("li",{key:Ge},Ne.actionName?l.a.createElement(N,Object(C.a)({},Ne,{onActionCallback:lt})):l.a.createElement("span",{className:"v-line"}))}),Ze?l.a.createElement("li",null,l.a.createElement(N,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:lt},l.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,$e&&l.a.createElement("li",null,l.a.createElement(N,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat($e),onActionCallback:lt},l.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),l.a.createElement("li",{className:"btn-full-screen"},l.a.createElement(N,{icon:"".concat(Be?"icon-shrink":"icon-enlarge"),title:Be?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:lt})))},z=b("M8RZ"),X=b("+L6B"),k=b("2/Rp"),F=b("y8nQ"),U=b("Vl3Y"),L=b("5NDa"),B=b("5rEg"),Z={labelCol:{span:4},wrapperCol:{span:20}},re=function(Qe){var ne=Qe.callback,Ze=Qe.onCancel;function lt(Be){ne(Be)}return l.a.createElement(U.a,Object(C.a)({},Z,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:lt}),l.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},l.a.createElement(B.a,null)),l.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},l.a.createElement(B.a,null)),l.a.createElement("div",{className:"flex-container flex-end"},l.a.createElement(k.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(k.a,{type:"ghost",onClick:Ze},"\u53D6\u6D88")))},he=b("7ahc"),Ce=b("HmJG"),ke=b("BjJ7"),te=U.a.useForm,Re={width:280,marginRight:10},Te={labelCol:{span:5},wrapperCol:{span:19}},pe=function(Qe){var ne=Qe.callback,Ze=Qe.onCancel,lt=te(),Be=Object(_.a)(lt,1),$e=Be[0];function rt(st){ne(st)}function xt(st,Ne){if(st.status===-1){g.b.error(st.message);return}$e.setFieldsValue({src:"/api/attachments/".concat(st.id),type:Ne.type})}function ft(st){var Ne=st.target.files[0];se(Ne,xt)}return l.a.createElement(U.a,Object(C.a)({form:$e},Te,{className:"upload-image-panel",onFinish:rt}),l.a.createElement(U.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},l.a.createElement("div",{className:"flex-container"},l.a.createElement(U.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},l.a.createElement(B.a,{style:Re})),l.a.createElement(me,{onFileChange:ft}))),l.a.createElement(U.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},l.a.createElement(B.a,{style:{width:264}})),l.a.createElement(U.a.Item,{style:{textAlign:"right"}},l.a.createElement(k.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(k.a,{type:"ghost",onClick:Ze},"\u53D6\u6D88")))};function me(Qe){var ne=Qe.onFileChange;return l.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",l.a.createElement("input",{type:"file",onChange:ne}))}function se(Qe,ne){if(!Qe)throw new String("\u6CA1\u6709\u6587\u4EF6");var Ze=new FormData;Ze.append("editormd-image-file",Qe),Ze.append("file_param_name","editormd-image-file"),Ze.append("byxhr","true");var lt=new window.XMLHttpRequest;lt.withCredentials=!0,lt.addEventListener("load",function(Be){ne(JSON.parse(Be.target.responseText),Qe)},!1),lt.addEventListener("error",function(Be){console.error(Be)},!1),lt.open("POST","".concat(ke.a,"/api/attachments.json")),lt.send(Ze)}var be=b("giR+"),ae=b("fyUT"),fe=b("7Kak"),Fe=b("9yH6"),ie=Fe.a.Group,q={margin:"0 8px"},Q=function(Qe){var ne=Qe.callback,Ze=Qe.onCancel;function lt(Be){ne(Be)}return l.a.createElement(U.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:lt},l.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},l.a.createElement("span",{style:q},"\u5355\u5143\u683C\u6570\uFF1A"),l.a.createElement("span",{style:q},"\u884C\u6570"),l.a.createElement(U.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},l.a.createElement(ae.a,null)),l.a.createElement("span",{style:q},"\u5217\u6570"),l.a.createElement(U.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},l.a.createElement(ae.a,null))),l.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},l.a.createElement("span",{style:q},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),l.a.createElement(U.a.Item,{name:"align"},l.a.createElement(ie,null,l.a.createElement(Fe.a,{value:"default"},l.a.createElement("i",{className:"fa fa-align-justify"})),l.a.createElement(Fe.a,{value:"left"},l.a.createElement("i",{className:"fa fa-align-left"})),l.a.createElement(Fe.a,{value:"center"},l.a.createElement("i",{className:"fa fa-align-center"})),l.a.createElement(Fe.a,{value:"right"},l.a.createElement("i",{className:"fa fa-align-right"}))))),l.a.createElement("div",{className:"flex-container flex-end"},l.a.createElement(k.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(k.a,{type:"ghost",onClick:Ze},"\u53D6\u6D88")))},Y=b("ErOA"),oe=b("7Cbv"),le="link",Ee="upload-image",Le="code-block",ge="add-table",De="------------",_e={default:De,left:":".concat(De),center:":".concat(De,":"),right:"".concat(De,":")},Xe=b("9VGf"),tt,ze;function Me(){}var Et=0,Oe=1e4,Ve="\u2581",Je=`
|
|
|
**\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 Pe=navigator.platform.toUpperCase().indexOf("MAC")>=0,He=Pe?"Cmd":"Ctrl",ve=["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"],xe=(tt={},Object(p.a)(tt,He+"-B","bold"),Object(p.a)(tt,He+"-I","italic"),tt),de=(ze={},Object(p.a)(ze,le,"\u6DFB\u52A0\u94FE\u63A5"),Object(p.a)(ze,Le,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(p.a)(ze,Ee,"\u6DFB\u52A0\u6587\u4EF6"),Object(p.a)(ze,ge,"\u6DFB\u52A0\u8868\u683C"),ze),je=H.a=function(Qe){var ne=Qe.defaultValue,Ze=ne===void 0?"":ne,lt=Qe.onChange,Be=Qe.width,$e=Be===void 0?"100%":Be,rt=Qe.height,xt=rt===void 0?400:rt,ft=Qe.miniToolbar,st=ft===void 0?!1:ft,Ne=Qe.isFocus,Ge=Ne===void 0?!1:Ne,yt=Qe.watch,pt=Qe.insertTemp,jt=Qe.mode,Bt=jt===void 0?"markdown":jt,gt=Qe.id,Ht=gt===void 0?"markdown-editor-id":gt,Ut=Qe.showResizeBar,Nt=Ut===void 0?!1:Ut,Wt=Qe.noStorage,Qt=Wt===void 0?!1:Wt,pn=Qe.showNullButton,qt=pn===void 0?!1:pn,en=Qe.hidetoolBar,qn=en===void 0?!1:en,$t=Qe.fullScreen,cn=$t===void 0?!1:$t,mn=Qe.onBlur,yn=Qe.onCMBeforeChange,Vn=Qe.onFullScreen,$n=Qe.className,zt=$n===void 0?"":$n,xn=Qe.disablePaste,wr=xn===void 0?!1:xn,nr=Qe.placeholder,Tn=nr===void 0?"":nr,Yn=Qe.values,ce=Yn===void 0?"":Yn,V=Object(n.useState)(null),J=Object(_.a)(V,2),ee=J[0],Se=J[1],ue=Object(n.useState)(Ze),nt=Object(_.a)(ue,2),Dt=nt[0],Yt=nt[1],an=Object(n.useState)(yt),Xt=Object(_.a)(an,2),Rn=Xt[0],Kn=Xt[1],ar=Object(n.useState)(cn),vr=Object(_.a)(ar,2),lr=vr[0],Jn=vr[1],Tr=Object(n.useState)(""),Ji=Object(_.a)(Tr,2),Vr=Ji[0],oi=Ji[1],pa=Object(n.useState)(0),Bi=Object(_.a)(pa,2),ta=Bi[0],Da=Bi[1],_o=Object(n.useState)(xt),lo=Object(_.a)(_o,2),wo=lo[0],Fa=lo[1],Gi=Object(n.useState)(!1),Nr=Object(_.a)(Gi,2),qr=Nr[0],_i=Nr[1],Ur=Object(n.useRef)(Object(oe.a)()),Ar=Object(n.useRef)(!1),ti=Object(n.useRef)(),yr=Object(n.useRef)(),si=Object(n.useRef)(),cr=Object(n.useRef)(),Hi=Object(n.useRef)(),Ni=function(){var er=Object(s.a)(o.a.mark(function _r(){var tr,Mr;return o.a.wrap(function(mi){for(;;)switch(mi.prev=mi.next){case 0:return mi.next=2,Object(Y.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Ur.current}});case 2:Mr=mi.sent,Mr!=null&&(tr=Mr.attachments)!==null&&tr!==void 0&&tr.length&&(console.log("cm:",ee,yr),Mr.attachments.map(function(fr){fr.content_type.indexOf("image")>-1?ee.replaceSelection(".concat(fr.content_type,")")):fr.content_type.indexOf("video")>-1?ee.replaceSelection('<video width="100%" controls src="'.concat(D.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):fr.content_type.indexOf("pdf")>-1?ee.replaceSelection('<a href="'.concat(D.a.API_SERVER,"/api/attachments/").concat(fr.id,"?type=").concat(fr.content_type,'&disposition=inline" target="_blank">').concat(fr.name,"</a>")):ee.replaceSelection("[".concat(fr.name,"](").concat(D.a.API_SERVER,"/api/attachments/").concat(fr.id,"?type=").concat(fr.content_type,")"))}));case 4:case"end":return mi.stop()}},_r)}));return function(){return er.apply(this,arguments)}}();Object(n.useEffect)(function(){Yt(ce),ee==null||ee.setValue(ce)},[ce]),Object(n.useEffect)(function(){Vn==null||Vn(lr)},[lr]),Object(n.useEffect)(function(){if(yr.current){var er=i.a.fromTextArea(yr.current,{mode:Bt,lineNumbers:!st,lineWrapping:!0,value:Ze,autoCloseTags:!0,autoCloseBrackets:!0});Ge&&er.focus();function _r(tr,Mr){if(wr){Mr.preventDefault();return}var Hr=Mr.clipboardData;if(Hr){var mi=Hr.types.toString(),fr=Hr.items;if(mi==="Files"||Hr.types.indexOf("Files")>-1){if(Mr.preventDefault(),Bt=="stex")return;try{var Wi,Ea=fr[1];((Wi=fr[0])===null||Wi===void 0?void 0:Wi.kind)==="file"&&(Ea=fr[0]);var jr=Ea.getAsFile(),ro=jr.name.split(".").pop();se(jr,function(ui){if(ui.id){var Oi,xa,Ba;(jr==null||((Oi=jr.type)===null||Oi===void 0)?void 0:Oi.indexOf("image"))>-1?er.replaceSelection(".concat(ui.content_type,")")):(jr==null||((xa=jr.type)===null||xa===void 0)?void 0:xa.indexOf("video"))>-1?er.replaceSelection('<video width="100%" controls src="'.concat(D.a.API_SERVER,"/api/attachments/").concat(ui.id,'"></video>')):(jr==null||((Ba=jr.type)===null||Ba===void 0)?void 0:Ba.indexOf("pdf"))>-1?er.replaceSelection('<a href="'.concat(D.a.API_SERVER,"/api/attachments/").concat(ui.id,"?type=").concat(jr.type,'&disposition=inline" target="_blank">').concat(jr.name,"</a>")):ve.includes(ro)?er.replaceSelection('<a href="'.concat(D.a.API_SERVER,"/api/attachments/").concat(ui.id,'?type=office&disposition=inline" target="_blank">').concat(jr.name,"</a>")):er.replaceSelection("[".concat(jr.name,"](").concat(D.a.API_SERVER,"/api/attachments/").concat(ui.id,"?type=").concat(ui.content_type,")"))}else(ui==null?void 0:ui.status)===401&&(document.location.href="/user/login")})}catch(ui){g.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return er.on("paste",_r),er.on("dragleave",function(tr,Mr){si.current.classList.remove("mouse-hover-md")}),er.on("dragover",function(tr,Mr){si.current.classList.add("mouse-hover-md")}),er.on("drop",function(tr,Mr){si.current.classList.add("mouse-hover-md");var Hr;if(Hr=Mr.dataTransfer.files,Hr.length>0){Mr.preventDefault(),Mr.stopPropagation();for(var mi=function(Ea){var jr=Hr[Ea],ro=jr.name.split(".").pop();se(jr,function(ui){if(ui.id){var Oi,xa,Ba;(jr==null||((Oi=jr.type)===null||Oi===void 0)?void 0:Oi.indexOf("image"))>-1?er.replaceSelection(".concat(ui.content_type,")")):(jr==null||((xa=jr.type)===null||xa===void 0)?void 0:xa.indexOf("video"))>-1?er.replaceSelection('<video width="100%" controls src="'.concat(D.a.API_SERVER,"/api/attachments/").concat(ui.id,'"></video>')):(jr==null||((Ba=jr.type)===null||Ba===void 0)?void 0:Ba.indexOf("pdf"))>-1?er.replaceSelection('<a href="'.concat(D.a.API_SERVER,"/api/attachments/").concat(ui.id,"?type=").concat(jr.type,'&disposition=inline" target="_blank">').concat(jr.name,"</a>")):ve.includes(ro)?er.replaceSelection('<a href="'.concat(D.a.API_SERVER,"/api/attachments/").concat(ui.id,'?type=office&disposition=inline" target="_blank">').concat(jr.name,"</a>")):er.replaceSelection("[".concat(jr.name,"](").concat(D.a.API_SERVER,"/api/attachments/").concat(ui.id,"?type=").concat(ui.content_type,")"))}else(ui==null?void 0:ui.status)===401&&(document.location.href="/user/login")})},fr=0;fr<Hr.length;fr++)mi(fr)}}),Se(er),function(){er.off("paste",_r)}}},[]);var Zi=Object(n.useCallback)(function(){if(si.current)try{}catch(er){console.log(er,"---- to set md editor body height")}},[wo,si,lr]);Object(n.useEffect)(function(){function er(){var tr=new t.default(function(Mr){var Hr=Object(T.a)(Mr),mi;try{for(Hr.s();!(mi=Hr.n()).done;){var fr=mi.value;(fr.target.offsetHeight>0||fr.target.offsetWidth>0)&&(Zi(),ee.setSize("100%","100%"),ee.refresh())}}catch(Wi){Hr.e(Wi)}finally{Hr.f()}});return tr.observe(yr.current.parentElement),tr}if(ee){var _r=er();return function(){_r.unobserve(yr.current.parentElement)}}},[ee,Zi]),Object(n.useEffect)(function(){if(ee){for(var er=[],_r=function(){var fr=Mr[tr];Hr=Object(_.a)(fr,2);var Wi=Hr[0],Ea=Hr[1],jr=Object(p.a)({},Wi,function(){yo(Ea)});er.push(jr),ee.addKeyMap(jr)},tr=0,Mr=Object.entries(xe);tr<Mr.length;tr++){var Hr;_r()}return ti.current=setInterval(function(){Ar.current&&Ni()},4e3),function(){clearInterval(ti.current);var mi=Object(T.a)(er),fr;try{for(mi.s();!(fr=mi.n()).done;){var Wi=fr.value;ee.removeKeyMap(Wi)}}catch(Ea){mi.e(Ea)}finally{mi.f()}}}},[ee]),Object(n.useEffect)(function(){cn!==lr&&Jn(cn)},[cn]),Object(Xe.a)(function(){if(!Qt&&ta>0){var er=new Date().getTime(),_r=window.sessionStorage.getItem(Ht);er>=ta+Oe&&(!_r||_r!==Dt)&&(window.sessionStorage.setItem(Ht,Dt),_i(!0))}},Oe),Object(n.useEffect)(function(){Kn(yt)},[ee,yt]),Object(n.useEffect)(function(){ee&&(Ge&&ee.focus())},[ee,Ge]),Object(n.useEffect)(function(){if(Rn&&ee){var er=ee.getScrollerElement();function _r(tr){var Mr=tr.target;if(Hi.current){var Hr=Mr.scrollTop/Mr.scrollHeight;Hi.current.scrollTop=Hi.current.scrollHeight*Hr}}return er.addEventListener("scroll",_r),function(){er.removeEventListener("scroll",_r)}}},[ee,Rn]),Object(n.useEffect)(function(){if(ee&&yn){function er(_r,tr){yn(_r,tr)}return ee.on("beforeChange",er),function(){ee.off("beforeChange",er)}}},[ee,yn]),Object(n.useEffect)(function(){if(ee&&mn){function er(){mn(ee.getValue())}return ee.on("blur",er),function(){ee.off("blur",er)}}},[ee,mn]),Object(n.useEffect)(function(){if(ee){function er(_r){var tr=_r.getValue();Yt(tr),Da(new Date().getTime()),_r.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),lt&<(tr)}return ee.on("change",er),function(){ee.off("change",er)}}},[ee,lt]),Object(n.useEffect)(function(){ee&&(Ze==null?(ee.setValue(""),Yt("")):Ze!==ee.getValue()&&(ee.setValue(Ze),Yt(Ze),ee.setCursor(ee.lineCount(),0)))},[ee,Ze]);var yo=Object(n.useCallback)(function(er){var _r=ee.getCursor(),tr=ee.getSelection(),Mr=tr.split(`
|
|
|
`);switch(er){case"bold":return ee.replaceSelection("**"+tr+"**"),tr===""&&ee.setCursor(_r.line,_r.ch+2),ee.focus();case"italic":return ee.replaceSelection("*"+tr+"*"),tr===""&&ee.setCursor(_r.line,_r.ch+1),ee.focus();case"code":return ee.replaceSelection("`"+tr+"`"),tr===""&&ee.setCursor(_r.line,_r.ch+1),ee.focus();case"inline-latex":return ee.replaceSelection("`$$"+tr+"$$`"),tr===""&&ee.setCursor(_r.line,_r.ch+3),ee.focus();case"latex":return ee.replaceSelection("```latex\n"+tr+"\n```"),ee.setCursor(_r.line+1,tr.length+1),ee.focus();case"line-break":return ee.replaceSelection(`<br/>
|
|
|
`),ee.focus();case"list-ul":return tr===""?ee.replaceSelection("- "+tr):ee.replaceSelection(Mr.map(function(Hr){return Hr===""?"":"- ".concat(Hr)}).join(`
|
|
|
`)),ee.focus();case"list-ol":return tr===""?ee.replaceSelection("1. "+tr):ee.replaceSelection(Mr.map(function(Hr,mi){return Hr===""?"":"".concat(mi+1,". ").concat(Hr)}).join(`
|
|
|
`)),ee.focus();case"add-null-ch":return tr===""&&ee.setCursor(_r.line,_r.ch+1),ee.replaceSelection(Ve),ee.focus();case"inster-template-1":return tr===""&&ee.setCursor(_r.line,_r.ch),ee.replaceSelection(Je),ee.focus();case"eraser":return ee.setValue(""),ee.focus();case"trigger-watch":return Kn(!Rn),ee.focus();case"trigger-full-screen":return Jn(!lr),ee.focus();case le:oi(le);return;case Le:oi(Le);return;case Ee:oi(Ee);return;case ge:oi(ge);return;default:throw new Error}},[ee,Rn,lr]),Vi=Object(n.useCallback)(function(er){oi("");switch(Vr){case le:var _r=er.title,tr=er.link;return ee.replaceSelection("[".concat(_r,"](").concat(tr,")")),ee.focus();case Le:var Mr=er.language,Hr=er.content;return ee.replaceSelection(["```"+Mr,Hr,"```"].join(`
|
|
|
`)),ee.focus();case Ee:var mi=er.src,fr=er.alt;return fr?ee.replaceSelection(".concat(mi,' "').concat(fr,'" )')):ee.replaceSelection("")),ee.focus();case ge:for(var Wi=er.row,Ea=er.col,jr=er.align,ro=`
|
|
|
`,ui=0;ui<Wi;ui++){for(var Oi=[],xa=[],Ba=0;Ba<Ea;Ba++)ui===1&&xa.push(_e[jr]),Oi.push(" ");ui===1&&(ro+="| ".concat(xa.join(" | "),` |
|
|
|
`)),ro+="| ".concat(Oi.join(Ea===1?"":" | "),` |
|
|
|
`)}return ee.replaceSelection(ro+`
|
|
|
`),ee.focus();default:throw new Error}},[ee,Vr]),Qa=Object(n.useMemo)(function(){switch(Vr){case le:return l.a.createElement(re,{callback:Vi,onCancel:ja});case Le:return l.a.createElement(he.b,{callback:Vi,onCancel:ja});case Ee:return l.a.createElement(pe,{callback:Vi,onCancel:ja});case ge:return l.a.createElement(Q,{callback:Vi,onCancel:ja});default:return null}},[Vr]);function ja(){oi("")}Object(n.useEffect)(function(){if(cr.current){var er=cr.current,_r=!1,tr=0;function Mr(fr){_r=!0,tr=fr.pageY}function Hr(){_r=!1}function mi(fr){if(_r){var Wi=fr.pageY-tr;Wi<0&&(Wi=0),Wi>300&&(Wi=300);var Ea=xt+Wi+"px";Fa(Ea)}}return er.addEventListener("mousedown",Mr),document.addEventListener("mousemove",mi),document.addEventListener("mouseup",Hr),function(){er.removeEventListener("mousedown",Mr),document.removeEventListener("mousemove",mi),document.removeEventListener("mouseup",Hr)}}},[ee,cr]),Object(n.useEffect)(function(){Fa(xt)},[xt]);var ni=Ye($e),Wo=Ye(wo),Ja={width:ni,height:Wo},bo=Object(n.useMemo)(function(){if(ta){var er=new Date(ta),_r=er.getHours(),tr=er.getMinutes(),Mr=er.getSeconds();return _r=_r<10?"0"+_r:_r,tr=tr<10?"0"+tr:tr,Mr=Mr<10?"0"+Mr:Mr,"".concat(_r,":").concat(tr,":").concat(Mr)}return 0},[ta]);function Ao(){window.sessionStorage.removeItem(Ht),_i(!1),Da(0)}function Za(){_i(!1),Da(0),ee.setValue(window.sessionStorage.getItem(Ht))}function Xo(er,_r){var tr=ee.getValue();tr=tr.replace(er,_r),Yt(tr),ee==null||ee.setValue(tr)}return l.a.createElement(n.Fragment,null,l.a.createElement("div",{className:"markdown-editor-wrapper",ref:si},l.a.createElement("div",{className:"markdown-editor-container ".concat(zt," ").concat(Rn?"on-preview":""," ").concat(st?"mini":""," ").concat(lr?"full-screen":""),style:Ja},l.a.createElement(P,{insertTemp:pt,watch:Rn,fullScreen:lr,showNullButton:qt,onActionCallback:yo,hidetoolBar:qn,uuid:Ur.current,setOpenPhones:function(){Ar.current=!0}}),l.a.createElement("div",{className:"markdown-editor-body"},l.a.createElement("div",{className:"codemirror-container"},l.a.createElement("textarea",{ref:yr,placeholder:Tn})),Rn?l.a.createElement("div",{ref:Hi,className:"preview-container"},Bt==="stex"&&l.a.createElement(O,{value:Dt}),Bt!=="stex"&&l.a.createElement(x.a,{edit:!0,value:Dt,replaces:Xo})):null))),Nt?l.a.createElement("a",{ref:cr,className:"editor-resize"}):null,l.a.createElement(z.a,null,de[Vr]?l.a.createElement(v.a,{centered:!0,title:de[Vr],visible:!0,onCancel:ja,footer:null,className:"markdown-popup-form"},Qa):null))}},P2ho:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.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};H.default=I},P5Jw:function(j,H,b){"use strict";var I=b("rHrb"),v=I.CopyToClipboard;v.CopyToClipboard=v,j.exports=v},PD8m:function(j,H){j.exports={name:"memoryStorage",read:I,write:v,each:T,remove:y,clearAll:g};var b={};function I(s){return b[s]}function v(s,_){b[s]=_}function T(s){for(var _ in b)b.hasOwnProperty(_)&&s(b[_],_)}function y(s){delete b[s]}function g(s){b={}}},PVpz:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("ETIr"),b("cv67"),b("K3mO"),b("OLod"))})(this,function(I){return function(){var v=I,T=v.lib,y=T.StreamCipher,g=v.algo,s=[],_=[],p=[],e=g.RabbitLegacy=y.extend({_doReset:function(){var n=this._key.words,l=this.cfg.iv,r=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 t=0;t<4;t++)o.call(this);for(var t=0;t<8;t++)i[t]^=r[t+4&7];if(l){var a=l.words,c=a[0],d=a[1],f=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360,h=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360,u=f>>>16|h&4294901760,E=h<<16|f&65535;i[0]^=f,i[1]^=u,i[2]^=h,i[3]^=E,i[4]^=f,i[5]^=u,i[6]^=h,i[7]^=E;for(var t=0;t<4;t++)o.call(this)}},_doProcessBlock:function(n,l){var r=this._X;o.call(this),s[0]=r[0]^r[5]>>>16^r[3]<<16,s[1]=r[2]^r[7]>>>16^r[5]<<16,s[2]=r[4]^r[1]>>>16^r[7]<<16,s[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)s[i]=(s[i]<<8|s[i]>>>24)&16711935|(s[i]<<24|s[i]>>>8)&4278255360,n[l+i]^=s[i]},blockSize:128/32,ivSize:64/32});function o(){for(var n=this._X,l=this._C,r=0;r<8;r++)_[r]=l[r];l[0]=l[0]+1295307597+this._b|0,l[1]=l[1]+3545052371+(l[0]>>>0<_[0]>>>0?1:0)|0,l[2]=l[2]+886263092+(l[1]>>>0<_[1]>>>0?1:0)|0,l[3]=l[3]+1295307597+(l[2]>>>0<_[2]>>>0?1:0)|0,l[4]=l[4]+3545052371+(l[3]>>>0<_[3]>>>0?1:0)|0,l[5]=l[5]+886263092+(l[4]>>>0<_[4]>>>0?1:0)|0,l[6]=l[6]+1295307597+(l[5]>>>0<_[5]>>>0?1:0)|0,l[7]=l[7]+3545052371+(l[6]>>>0<_[6]>>>0?1:0)|0,this._b=l[7]>>>0<_[7]>>>0?1:0;for(var r=0;r<8;r++){var i=n[r]+l[r],t=i&65535,a=i>>>16,c=((t*t>>>17)+t*a>>>15)+a*a,d=((i&4294901760)*i|0)+((i&65535)*i|0);p[r]=c^d}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}v.RabbitLegacy=y._createHelper(e)}(),I.RabbitLegacy})},Plam:function(j,H,b){"use strict";var I=b("giR+"),v=b("fyUT"),T=b("2qtc"),y=b("kLXV"),g=b("DjyN"),s=b("NUBc"),_=b("+L6B"),p=b("2/Rp"),e=b("9og8"),o=b("tJVT"),n=b("k1fw"),l=b("WmNS"),r=b.n(l),i=b("q1tI"),t=b.n(i),a=b("8Abk"),c=b("IxHN"),d=b("M8RZ"),f=b("BdwD"),h=b("cWXX"),u=b("/ezw"),E=b("14J3"),x=b("BMrR"),O=b("jCWc"),C=b("kPKH"),w=b("Q9mQ"),S=b("diRs"),A=b("y8nQ"),D=b("Vl3Y"),M=b("9kvl"),N=b("dhSg"),P=b("mCJh"),z=b("lzim"),X=function(le){var Ee=le.pathsList,Le=le.dispatch,ge=D.a.useForm(),De=Object(o.a)(ge,1),_e=De[0],Xe=Object(i.useState)(),tt=Object(o.a)(Xe,2),ze=tt[0],Me=tt[1],Et=Object(i.useState)(!0),Oe=Object(o.a)(Et,2),Ve=Oe[0],Je=Oe[1],Ye=Object(i.useState)(!1),Pe=Object(o.a)(Ye,2),He=Pe[0],ve=Pe[1],xe=Object(i.useState)({}),de=Object(o.a)(xe,2),je=de[0],Qe=de[1],ne=Object(i.useState)({keyword:je,robot:!0,page:1}),Ze=Object(o.a)(ne,2),lt=Ze[0],Be=Ze[1];Object(i.useEffect)(function(){N.a.subscribe("ai-replay-show",function(ft){Qe(ft),ve(!0)})},[]),Object(i.useEffect)(function(){je!=null&&je.id&&$e()},[je]);var $e=function(){var ft=Object(e.a)(r.a.mark(function st(Ne){var Ge;return r.a.wrap(function(pt){for(;;)switch(pt.prev=pt.next){case 0:return Je(!0),pt.next=3,Object(P.a)(Object(n.a)(Object(n.a)({},lt),{},{keyword:je==null?void 0:je.content,id:je==null?void 0:je.id}));case 3:Ge=pt.sent,Je(!1),Ge!=null&&Ge.data&&(lt.page++,Be(Object(n.a)({},lt)),Me(Ge==null?void 0:Ge.data));case 6:case"end":return pt.stop()}},st)}));return function(Ne){return ft.apply(this,arguments)}}(),rt=function(){var ft=Object(e.a)(r.a.mark(function st(){return r.a.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:$e();case 1:case"end":return Ge.stop()}},st)}));return function(){return ft.apply(this,arguments)}}(),xt=t.a.createElement("div",null,t.a.createElement("img",{src:z.s,width:150}));return t.a.createElement(t.a.Fragment,null,t.a.createElement(y.a,{title:"\u5176\u4ED6\u56DE\u7B54",mask:!0,visible:He,okText:"\u6362\u4E00\u6362",cancelText:"",onOk:rt,width:800,height:500,footer:t.a.createElement(x.a,{align:"middle",justify:"center"},t.a.createElement(C.a,{className:"tc"},t.a.createElement(p.a,{type:"primary",onClick:$e},"\u6362\u4E00\u6362"),t.a.createElement(S.a,{content:xt,title:"\u6559\u5E08\u4EA4\u6D41\u793E\u533A"},t.a.createElement(p.a,{type:"dashed"},"\u4EBA\u5DE5\u670D\u52A1")))),onCancel:function(){ve(!1)}},t.a.createElement("aside",{style:{minHeight:300}},t.a.createElement(x.a,null,t.a.createElement(u.a,{loading:Ve},ze==null?void 0:ze.map(function(ft){return t.a.createElement(C.a,{style:{background:"#e9f3f1",padding:"8px 20px",marginBottom:10,borderRadius:20},span:24},ft.text)}),!(ze!=null&&ze.length)&&t.a.createElement("div",{style:{width:"100%",textAlign:"center"}},t.a.createElement("br",null),t.a.createElement("img",{src:z.s,width:150}),t.a.createElement("br",null),t.a.createElement("br",null),"\u6559\u5E08\u4EA4\u6D41\u793E\u533A"))))))},k=Object(M.a)(function(oe){var le=oe.pathsList;return{pathsList:le}})(X),F=b("fXAG"),U=b("5Dmo"),L=b("3S7+"),B=b("m3rI"),Z=b("9Bee"),re=b("Ypxr"),he=b("AMnG"),Ce=b("kaH+"),ke=b("xKgJ"),te=b("dPi7"),Re=b.n(te),Te=b("SzL9"),pe=b.n(Te),me=b("MAU4"),se=b.n(me),be=b("n0Id"),ae=b.n(be),fe=b("Ty5D");function Fe(oe){var le=oe.data,Ee=oe.index,Le=oe.adminOrOperator,ge=oe.parentDiscussIndex,De=oe.shixunIdentifier,_e=oe.user,Xe=oe.onSetRewardData,tt=oe.onSetActionType,ze=oe.onHandleSubmitDiscusses,Me=oe.onTopOrDownDiscuss,Et=oe.handleChildrenPlus,Oe=oe.anserAuthor,Ve=oe.onPlus,Je=oe.onHandleRepaly,Ye=oe.userInfomation,Pe=le.author,He=le.can_delete,ve=le.content,xe=le.hidden,de=le.id,je=le.reward,Qe=le.time,ne=le.reply_status,Ze=le.user_praise,lt=le.praise_count,Be=Object(i.useState)(!1),$e=Object(o.a)(Be,2),rt=$e[0],xt=$e[1],ft=Object(i.useState)(!1),st=Object(o.a)(ft,2),Ne=st[0],Ge=st[1],yt=Object(i.useState)(!1),pt=Object(o.a)(yt,2),jt=pt[0],Bt=pt[1],gt=Object(i.useState)(!1),Ht=Object(o.a)(gt,2),Ut=Ht[0],Nt=Ht[1],Wt=function(){if(!rt)return;ze(de,{reply_status:2})},Qt=function(){if(!Ne)return;ze(de,{reply_status:3})},pn=function(){ze(de,{reply_status:1})},qt=function(){ze(de,{reply_status:4})},en=function(){switch(ne){case 0:return t.a.createElement(t.a.Fragment,null,t.a.createElement("div",{onClick:pn,className:"whether-satisfied ".concat(jt?"cursorPoint blue-text-color":""),onMouseEnter:function(){Bt(!0)},onMouseLeave:function(){Bt(!1)}},t.a.createElement("img",{src:jt?pe.a:Re.a,className:"whether-img SVGColor"}),"\u6EE1\u610F"),t.a.createElement(S.a,{placement:"bottomLeft",content:t.a.createElement("div",{className:"content"},t.a.createElement("div",{className:"content-disappoint"},"\u62B1\u6B49\u8BA9\u4F60\u5931\u671B\u4E86\uFF0C\u8BF7\u7EE7\u7EED\u5C1D\u8BD5:"),t.a.createElement("div",{className:"radius-box marg15 height30-line black6c-optcity ".concat(rt?"blue-background cursorPoint blue-background-write":"gray-background"),onMouseEnter:function(){xt(!0)},onMouseLeave:function(){xt(!1)},onClick:Wt},"\u8BF7",Pe==null?void 0:Pe.name.trim(),"\u8001\u5E08\u518D\u5C1D\u8BD5\u56DE\u7B54\u4E00\u6B21\u3002"),t.a.createElement("div",{className:"radius-box marg15 height30-line black6c-optcity ".concat(Ne?"blue-background cursorPoint blue-background-write":"gray-background"),onMouseEnter:function(){Ge(!0)},onMouseLeave:function(){Ge(!1)},onClick:Qt},"\u53EF\u80FD\u542F\u7528\u4E86\u673A\u5668\u4EBA\uFF0C\u8BF7\u5176\u4ED6\u8001\u5E08\u56DE\u7B54\u3002")),trigger:"click"},t.a.createElement("div",{className:"whether-satisfied ".concat(Ut?"cursorPoint blue-text-color":""),onMouseEnter:function(){Nt(!0)},onMouseLeave:function(){Nt(!1)}},t.a.createElement("img",{src:Ut?ae.a:se.a,className:"whether-img SVGColor"}),"\u4E0D\u6EE1\u610F")));case 1:return t.a.createElement("div",{className:"radius-box cursorPoint height30 ".concat(Ee>0?"gray-background":"blue-background"),onClick:qt},"\u6211\u5F88\u6EE1\u610F");case 2:return t.a.createElement("div",{className:"radius-box height30 ".concat(Ee>0?"gray-background":"blue-background")},"\u4E0D\u6EE1\u610F \u7B49\u5F85\u8001\u5E08\u518D\u6B21\u56DE\u7B54");case 3:return t.a.createElement("div",{className:"radius-box height30 ".concat(Ee>0?"gray-background":"blue-background")},"\u4E0D\u6EE1\u610F \u7B49\u5F85\u5176\u4ED6\u8001\u5E08\u518D\u6B21\u56DE\u7B54");case 4:return t.a.createElement("div",{className:"radius-box height30 ".concat(Ee>0?"gray-background":"blue-background")},"\u6211\u5F88\u6EE1\u610F");default:return t.a.createElement(t.a.Fragment,null)}};function qn(){Xe({id:de,index:Ee,user_id:Pe.user_id,parentDiscussIndex:ge})}function $t(){tt({id:de,index:Ee,params:{hidden:xe?"0":"1",container_identifier:De},type:"hidden-discuss",parentDiscussIndex:ge,message:xe?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}function cn(){tt({id:de,index:Ee,type:"delete-discuss",parentDiscussIndex:ge,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}var mn=function(){Je(de,!Ze,ge,Ee)},yn=Le||He||Pe.user_id===_e.user_id||Pe.login===_e.login,Vn=Object(fe.h)().pathname.split("/")[1]==="tasks";return t.a.createElement(t.a.Fragment,null,t.a.createElement("div",{className:"second-level-discuss"},t.a.createElement("div",{className:"discuss-info-body"},t.a.createElement("div",{className:"discuss-info"},t.a.createElement("a",{href:"/users/".concat(Pe.login),target:"_blank"},Pe.name),t.a.createElement("span",{className:"grey"},Qe),je?t.a.createElement("a",{className:"c-orange gift",title:"\u5DF2\u5956\u52B1\u91D1\u5E01".concat(je)},t.a.createElement("i",{className:"iconfont icon-gift c-orange "}),t.a.createElement("span",null,je)):null)),t.a.createElement(Z.a,{className:"discuss-content ".concat(Ee>0?"content-gray":""),value:ve})),Vn&&t.a.createElement("div",{className:"btn-group-succes"},t.a.createElement("div",{className:"btn-group-gratify"},en()),t.a.createElement("div",{className:"btn-group-other"},t.a.createElement("div",{className:"discuss-info-body"},t.a.createElement("div",{className:"btn-group"},_e.identity===1?t.a.createElement("a",{onClick:qn,title:"\u7ED9TA\u5956\u52B1\u91D1\u5E01"},t.a.createElement("i",{className:"iconfont icon-jiangli"})):null,Le?t.a.createElement("a",{onClick:$t,title:xe?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},t.a.createElement("i",{className:xe?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,yn?t.a.createElement("a",{onClick:cn,title:"\u5220\u9664"},t.a.createElement("i",{className:"iconfont icon-shanchu"})):null,t.a.createElement("a",{onClick:mn,className:Ze?"c-orange":""},t.a.createElement("i",{className:Ze?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),t.a.createElement("span",null,lt||"")))))))}var ie=function(oe){var le=oe.data,Ee=oe.index,Le=oe.shixunIdentifier,ge=oe.adminOrOperator,De=oe.identity,_e=oe.onTopOrDownDiscuss,Xe=oe.onPlusDiscuss,tt=oe.onDisableDiscuss,ze=oe.onSetActionType,Me=oe.onSetRewardData,Et=oe.user,Oe=oe.activeDiscussIndex,Ve=oe.onReplyDiscuss,Je=oe.onSetActiveDiscussIndex,Ye=oe.allowDisableDiscuss,Pe=oe.onHandleSubmitDiscusses,He=oe.onHandleRepaly,ve=oe.userInfomation,xe=le.content,de=le.children,je=le.game_url,Qe=le.hidden,ne=le.id,Ze=le.position,lt=le.praise_count,Be=le.reward,$e=le.sticky,rt=le.time,xt=le.user_praise,ft=le.game_passed,st=le.ai_reply_text,Ne=le.ai_reply_flag,Ge=le.author,yt=le.disable_discuss_status,pt=le.reply_status,jt=Object(i.useState)(!1),Bt=Object(o.a)(jt,2),gt=Bt[0],Ht=Bt[1];Object(i.useEffect)(function(){gt&&setTimeout(function(){return Ht(!1)},800)},[gt]);function Ut(){var $t;if(!(($t=Object(ke.x)())!==null&&$t!==void 0&&$t.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}Je(ne)}function Nt(){_e(ne,!$e,Ee)}function Wt(){Xe(ne,!xt,Ee)}function Qt(){Me({id:ne,index:Ee,user_id:Ge.user_id})}function pn(){ze({id:ne,index:Ee,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function qt(){ze({id:ne,index:Ee,params:{hidden:Qe?"0":"1",container_identifier:Le},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 en(){tt(ne,yt===0?2:0,Ee)}var qn=function(cn){var mn=cn.target,yn=mn.nodeName,Vn=mn.src;yn==="IMG"&&(N.a.publish("preview-image",Vn),console.log("src:",Vn))};return t.a.createElement("div",{className:"discuss-item-container",key:ne},t.a.createElement("a",{href:"/users/".concat(Ge.login),target:"_blank"},t.a.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",height:"50",src:"".concat(B.a.IMG_SERVER,"/images/").concat(Ge.image_url),width:"50"})),t.a.createElement("section",null,t.a.createElement("div",{className:"discuss-info"},t.a.createElement("a",{href:"/users/".concat(Ge.login),target:"_blank"},Ge.name),t.a.createElement("span",{className:"grey"},rt),Ze?t.a.createElement("span",{className:"c-green"}," [\u7B2C",Ze,"\u5173] "):null,je?t.a.createElement("a",{href:je,target:"_blank",className:"view-code",title:"\u70B9\u51FB\u67E5\u770BTA\u7684\u4EE3\u7801\u9875\u9762"},"\u67E5\u770B"):null,Ye&&t.a.createElement(t.a.Fragment,null,yt===0&&t.a.createElement(L.a,{title:"\u7981\u6B62\u8BE5\u7528\u6237\u5728\u6B64\u9879\u76EE\u7684\u8BC4\u8BBA\u529F\u80FD"},t.a.createElement("span",{onClick:en,className:"c-red current"},"\u7981\u6B62\u8BC4\u8BBA\u529F\u80FD")),yt===2&&t.a.createElement(L.a,{title:"\u6062\u590D\u8BE5\u7528\u6237\u5728\u6B64\u5B9E\u8DF5\u9879\u76EE\u7684\u8BC4\u8BBA\u529F\u80FD"},t.a.createElement("span",{onClick:en,className:"c-light-primary current"},"\u6062\u590D\u8BC4\u8BBA\u529F\u80FD")),yt===1&&t.a.createElement(L.a,{title:"\u8BE5\u7528\u6237\u5DF2\u88AB\u7CFB\u7EDF\u7BA1\u7406\u5458\u7981\u8A00"},t.a.createElement("span",{className:"c-red"},"\u88AB\u7BA1\u7406\u5458\u7981\u6B62\u8BC4\u8BBA"))),$e?t.a.createElement("span",{className:"top"},"\u7F6E\u9876"):null,Be?t.a.createElement("a",{className:"c-orange gift",title:"\u5DF2\u5956\u52B1\u91D1\u5E01".concat(Be)},t.a.createElement("i",{className:"iconfont icon-gift c-orange "}),t.a.createElement("span",null,Be)):null,De<=5?t.a.createElement("span",{style:{flex:"1",textAlign:"right",color:ft===1?"#29bd8b":""}},ft===1?"\u5DF2\u901A\u5173":"\u672A\u901A\u5173"):null),t.a.createElement("div",{onClick:qn},t.a.createElement(Z.a,{className:"discuss-content",value:xe})),Ne&&t.a.createElement("div",{style:{padding:10,borderRadius:4,background:"#f4f4f4"}},t.a.createElement("br",null),t.a.createElement("div",{style:{padding:"6px 0"}},st),t.a.createElement(p.a,{style:{background:"#d1e5f9",borderRadius:25,border:"none",display:"inline-flex",justifyItems:"center",alignItems:"center"},onClick:function(){return Ht(!0)},className:"mr10 mr5 relative c-blue"},t.a.createElement("span",{className:gt?"plus-one-animate":"hide",style:{position:"absolute"}}," ","+1"),t.a.createElement("span",{className:"c-blue icon-duiwoyouyong mr5"}),t.a.createElement("span",{className:"c-blue"},"\u5BF9\u6211\u6709\u7528")),t.a.createElement("span",{className:"c-orange current",onClick:function(){N.a.publish("ai-replay-show",{content:xe,id:ne})}},"\u5176\u4ED6\u56DE\u7B54")),de&&de.length>0?t.a.createElement("div",{className:"reply-discuss-containerActive",onClick:qn},de.map(function($t,cn){return t.a.createElement(Fe,{key:$t.id,data:$t,index:cn,userInfomation:ve,onTopOrDownDiscuss:_e,shixunIdentifier:Le,onHandleSubmitDiscusses:Pe,adminOrOperator:ge,user:Et,onSetRewardData:Me,onSetActionType:ze,parentDiscussIndex:Ee,anserAuthor:Ge,onHandleRepaly:He})})):null,t.a.createElement("div",{className:"btn-group"},t.a.createElement("div",{className:"btn-group-other"},Et.identity===1?t.a.createElement("a",{onClick:Qt,title:"\u7ED9TA\u5956\u52B1\u91D1\u5E01"},t.a.createElement("i",{className:"iconfont icon-jiangli"})):null,ge?t.a.createElement("a",{onClick:qt,title:Qe?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},t.a.createElement("i",{className:Qe?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,De<=5?t.a.createElement("a",{onClick:Nt,className:$e?"btn-top":"btn-down",title:$e?"\u53D6\u6D88\u7F6E\u9876":"\u7F6E\u9876"},t.a.createElement("i",{className:"iconfont icon-zhiding1 "})):null,ge&&(!de||de.length==0)?t.a.createElement("a",{onClick:pn,title:"\u5220\u9664"},t.a.createElement("i",{className:"iconfont icon-shanchu"})):null,t.a.createElement("a",{onClick:Ut,title:"\u56DE\u590D"},t.a.createElement("i",{className:"iconfont icon-huifu1"})),t.a.createElement("a",{onClick:Wt,className:xt?"c-orange":""},t.a.createElement("i",{className:xt?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),t.a.createElement("span",null,lt||"")))),t.a.createElement(he.a,{id:ne,activeDiscussIndex:Oe,onReplyDiscuss:Ve})))},q={showRewardDialog:!1,data:null,page:1,loading:!1,actionType:null,activeDiscussIndex:null};function Q(oe,le){switch(le.type){case F.Q:return Object(n.a)(Object(n.a)({},oe),{},{loading:!0});case F.X:return Object(n.a)(Object(n.a)({},oe),{},{showRewardDialog:!0});case F.b:return Object(n.a)(Object(n.a)({},oe),{},{showRewardDialog:!1});case F.l:return Object(n.a)(Object(n.a)({},oe),le.payload);case F.ab:return Object(n.a)(Object(n.a)({},oe),le.payload);case F.x:return Object(n.a)(Object(n.a)({},oe),le.payload);case F.c:return Object(n.a)(Object(n.a)({},oe),le.payload);case F.z:return Object(n.a)(Object(n.a)({},oe),le.payload);case F.H:return Object(n.a)(Object(n.a)({},oe),le.payload);case F.a:return Object(n.a)(Object(n.a)({},oe),le.payload);default:throw new Error}}var Y=H.a=function(oe){var le=oe.shixunIdentifier,Ee=oe.identity,Le=oe.activeIndex,ge=oe.user,De=oe.allowDisableDiscuss,_e=oe.userInfo,Xe=oe.isShixunDetail,tt=Xe===void 0?!1:Xe,ze=oe.taskData,Me=Object(i.useReducer)(Q,q),Et=Object(o.a)(Me,2),Oe=Et[0],Ve=Et[1],Je=Object(i.useState)(!0),Ye=Object(o.a)(Je,2),Pe=Ye[0],He=Ye[1],ve=Object(i.useState)(null),xe=Object(o.a)(ve,2),de=xe[0],je=xe[1],Qe=Oe.page,ne=Oe.loading,Ze=Oe.data,lt=Oe.actionType,Be=Oe.showRewardDialog,$e=Oe.activeDiscussIndex,rt=Object(i.useRef)(),xt=Object(i.useRef)();function ft(ce,V){return st.apply(this,arguments)}function st(){return st=Object(e.a)(r.a.mark(function ce(V,J){var ee;return r.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:if(!ne){ue.next=2;break}return ue.abrupt("return");case 2:return ue.prev=2,Ve({type:F.Q}),ue.next=6,Object(P.e)(le,V);case 6:ee=ue.sent,Ve({type:F.l,payload:{activeDiscussIndex:J?$e:null,page:V,data:ee,loading:!1}}),ue.next=13;break;case 10:ue.prev=10,ue.t0=ue.catch(2),console.log(ue.t0);case 13:case"end":return ue.stop()}},ce,null,[[2,10]])})),st.apply(this,arguments)}Object(i.useEffect)(function(){return Pe||(clearInterval(de),je(setInterval(function(){ft(Qe,!0)},5e3))),function(){clearInterval(de)}},[Pe,Qe,$e]);function Ne(ce){ft(ce)}function Ge(ce,V,J){return yt.apply(this,arguments)}function yt(){return yt=Object(e.a)(r.a.mark(function ce(V,J,ee){var Se;return r.a.wrap(function(nt){for(;;)switch(nt.prev=nt.next){case 0:return nt.prev=0,nt.next=3,Object(P.g)(V,J);case 3:Se=nt.sent,nr[ee].user_praise=J,nr[ee].praise_count=Se.praise_count,Ve({type:F.x,payload:{data:Object(n.a)(Object(n.a)({},Ze),{},{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()}},ce,null,[[0,9]])})),yt.apply(this,arguments)}function pt(ce,V,J,ee){return jt.apply(this,arguments)}function jt(){return jt=Object(e.a)(r.a.mark(function ce(V,J,ee,Se){var ue;return r.a.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:return Dt.prev=0,Dt.next=3,Object(P.g)(V,J);case 3:ue=Dt.sent,nr[ee].children[Se].user_praise=J,nr[ee].children[Se].praise_count=ue.praise_count,Ve({type:F.x,payload:{data:Object(n.a)(Object(n.a)({},Ze),{},{comments:nr})}}),Dt.next=12;break;case 9:Dt.prev=9,Dt.t0=Dt.catch(0),console.log(Dt.t0);case 12:case"end":return Dt.stop()}},ce,null,[[0,9]])})),jt.apply(this,arguments)}function Bt(ce,V,J){return gt.apply(this,arguments)}function gt(){return gt=Object(e.a)(r.a.mark(function ce(V,J,ee){var Se,ue,nt;return r.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:return Yt.prev=0,Yt.next=3,Object(P.d)(V,J);case 3:if(Se=Yt.sent,!(Se.status!==0)){Yt.next=6;break}return Yt.abrupt("return");case 6:ue=nr[ee].author.user_id,nt=nr.map(function(an){return an.author.user_id===ue?Object(n.a)(Object(n.a)({},an),{},{disable_discuss_status:J}):an}),Ve({type:F.c,payload:{data:Object(n.a)(Object(n.a)({},Ze),{},{comments:nt})}}),Yt.next=14;break;case 11:Yt.prev=11,Yt.t0=Yt.catch(0),console.log(Yt.t0);case 14:case"end":return Yt.stop()}},ce,null,[[0,11]])})),gt.apply(this,arguments)}function Ht(ce,V,J){return Ut.apply(this,arguments)}function Ut(){return Ut=Object(e.a)(r.a.mark(function ce(V,J,ee){return r.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return ue.prev=0,ue.next=3,Object(P.k)(V,J);case 3:nr[ee].sticky=J,Ve({type:F.ab,payload:{data:Object(n.a)(Object(n.a)({},Ze),{},{comments:nr})}}),ft(Oe.page),ue.next=11;break;case 8:ue.prev=8,ue.t0=ue.catch(0),console.log(ue.t0);case 11:case"end":return ue.stop()}},ce,null,[[0,8]])})),Ut.apply(this,arguments)}function Nt(){Ve({type:F.z,payload:{actionType:null}})}function Wt(){return Qt.apply(this,arguments)}function Qt(){return Qt=Object(e.a)(r.a.mark(function ce(){var V,J,ee,Se,ue,nt,Dt,Yt;return r.a.wrap(function(Xt){for(;;)switch(Xt.prev=Xt.next){case 0:if(V=lt.id,J=lt.params,ee=lt.type,Se=lt.index,ue=lt.parentDiscussIndex,!(ee==="hidden-discuss")){Xt.next=6;break}return Xt.next=4,Object(P.f)(V,J);case 4:ue?nr[ue].children[Se].hidden=J.hidden==1:nr[Se].hidden=J.hidden==1,Ve({type:F.z,payload:{actionType:null,data:Object(n.a)(Object(n.a)({},Ze),{},{comments:nr})}});case 6:if(!(ee==="delete-discuss")){Xt.next=31;break}return Xt.next=9,Object(P.c)(V);case 9:if(!(ue||ue===0)){Xt.next=22;break}nt=nr[ue].children,Dt=nt.length-1;case 12:if(!(Dt>=0)){Xt.next=19;break}if(!(nt[Dt].id===V)){Xt.next=16;break}return nt.splice(Dt,1),Xt.abrupt("break",19);case 16:Dt--,Xt.next=12;break;case 19:nr[ue].children=nt,Xt.next=30;break;case 22:Yt=nr.length-1;case 23:if(!(Yt>=0)){Xt.next=30;break}if(!(nr[Yt].id===V)){Xt.next=27;break}return nr.splice(Yt,1),Xt.abrupt("break",30);case 27:Yt--,Xt.next=23;break;case 30:Ve({type:F.z,payload:{actionType:null,data:Object(n.a)(Object(n.a)({},Ze),{},{comments:nr})}});case 31:case"end":return Xt.stop()}},ce)})),Qt.apply(this,arguments)}function pn(ce){Ve({type:F.z,payload:{actionType:ce}})}function qt(){Ve({type:F.b})}function en(){return qn.apply(this,arguments)}function qn(){return qn=Object(e.a)(r.a.mark(function ce(){var V,J,ee,Se,ue,nt,Dt;return r.a.wrap(function(an){for(;;)switch(an.prev=an.next){case 0:return V=rt.current,J=V.id,ee=V.index,Se=V.score,ue=V.user_id,nt=V.parentDiscussIndex,an.next=3,Object(P.i)(J,{container_type:"Discusses",score:Se,user_id:ue});case 3:Dt=an.sent,nt?nr[nt].children[ee].reward=Dt.code:nr[ee].reward=Dt.code,Ve({type:F.H,payload:{showRewardDialog:!1,data:Object(n.a)(Object(n.a)({},Ze),{},{comments:nr})}}),rt.current=null;case 7:case"end":return an.stop()}},ce)})),qn.apply(this,arguments)}function $t(ce){rt.current=ce,Ve({type:F.X})}function cn(ce){rt.current.score=ce}function mn(ce,V){return yn.apply(this,arguments)}function yn(){return yn=Object(e.a)(r.a.mark(function ce(V,J){var ee;return r.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return ue.prev=0,ue.next=3,Object(P.h)(V,J);case 3:if(ee=ue.sent,!(ee.status===-3)){ue.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"}),zt(null),ue.abrupt("return");case 8:ft(Qe),ue.next=14;break;case 11:ue.prev=11,ue.t0=ue.catch(0),console.log(ue.t0);case 14:case"end":return ue.stop()}},ce,null,[[0,11]])})),yn.apply(this,arguments)}function Vn(ce,V){return $n.apply(this,arguments)}function $n(){return $n=Object(e.a)(r.a.mark(function ce(V,J){var ee,Se;return r.a.wrap(function(nt){for(;;)switch(nt.prev=nt.next){case 0:return nt.prev=0,nt.next=3,Object(P.j)(V,J);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()}},ce,null,[[0,10]])})),$n.apply(this,arguments)}function zt(ce){$e===ce?Ve({type:F.a,payload:{activeDiscussIndex:null}}):Ve({type:F.a,payload:{activeDiscussIndex:ce}})}if(Object(i.useEffect)(function(){function ce(){return V.apply(this,arguments)}function V(){return V=Object(e.a)(r.a.mark(function J(){return r.a.wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:if(!(Le===3&&!Ze&&le)){Se.next=3;break}return Se.next=3,ft(Qe);case 3:case"end":return Se.stop()}},J)})),V.apply(this,arguments)}ce()},[le,Le,Qe,Ve]),Object(i.useEffect)(function(){var ce=N.a.subscribe("create-discuss",function(){ft(Qe)});return ce},[le]),!Ze)return t.a.createElement(c.a,null);var xn=function(){He(!Pe),Pe?je(setInterval(function(){ft(Qe,!0)},5e3)):clearInterval(de)},wr=Ze.disscuss_count,nr=Ze.comments,Tn=Ze.all,Yn=Ze.can_hidden;return t.a.createElement(i.Fragment,null,t.a.createElement("div",{className:"discuss-container",ref:xt},(ze==null?void 0:ze.myshixun_manager)&&t.a.createElement(p.a,{style:{float:"right",marginBottom:10},type:"primary",onClick:xn},Pe?"\u5F00\u542F\u5B9E\u65F6\u5237\u65B0":"\u505C\u6B62\u5B9E\u65F6\u5237\u65B0"),wr===0?t.a.createElement(f.a,{styles:{clear:"both",pointerEvents:"none"}}):null,nr.map(function(ce,V){return t.a.createElement(ie,{user:ge,key:ce.id,userInfomation:_e,data:ce,index:V,identity:Ee,onPaginationChange:Ne,shixunIdentifier:le,onSetActionType:pn,onTopOrDownDiscuss:Ht,adminOrOperator:Yn,onPlusDiscuss:Ge,onDisableDiscuss:Bt,onSetRewardData:$t,activeDiscussIndex:$e,onHandleSubmitDiscusses:Vn,onSetActiveDiscussIndex:zt,onReplyDiscuss:mn,allowDisableDiscuss:De,onHandleRepaly:pt})}),wr>10?t.a.createElement("div",{className:"pagination-container"},t.a.createElement(s.a,{showQuickJumper:!0,showSizeChanger:!1,onChange:Ne,current:Qe,total:wr})):null,t.a.createElement(k,null)),t.a.createElement(d.a,null,t.a.createElement(y.a,{centered:!0,title:"\u63D0\u793A",visible:!!lt,onOk:Wt,onCancel:Nt},t.a.createElement("p",null,lt?lt.message:"")),t.a.createElement(y.a,{centered:!0,width:400,title:"\u5956\u52B1\u8BBE\u7F6E",visible:Be,onCancel:qt,onOk:en},t.a.createElement(v.a,{placeholder:"\u8BF7\u8F93\u5165\u5956\u52B1\u7684\u91D1\u5E01\u6570\u91CF",min:1,onChange:cn,style:{width:"228px"}}))))}},"Q+I+":function(j,H){j.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(j,H,b){},QV2g:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=I;function I(){for(var y,g=[],s=0;s<256;s++){y=s;for(var _=0;_<8;_++)y=y&1?3988292384^y>>>1:y>>>1;g[s]=y}return g}var v=I();function T(y,g,s,_){var p=v,e=_+s;y^=-1;for(var o=_;o<e;o++)y=y>>>8^p[(y^g[o])&255];return y^-1}},RELg:function(j,H,b){var I=b("MFOe"),v=I.Global;j.exports={name:"oldIE-userDataStorage",write:_,read:p,each:e,remove:o,clearAll:n};var T="storejs",y=v.document,g=i(),s=(v.navigator?v.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function _(t,a){if(s)return;var c=r(t);g(function(d){d.setAttribute(c,a),d.save(T)})}function p(t){if(s)return;var a=r(t),c=null;return g(function(d){c=d.getAttribute(a)}),c}function e(t){g(function(a){for(var c=a.XMLDocument.documentElement.attributes,d=c.length-1;d>=0;d--){var f=c[d];t(a.getAttribute(f.name),f.name)}})}function o(t){var a=r(t);g(function(c){c.removeAttribute(a),c.save(T)})}function n(){g(function(t){var a=t.XMLDocument.documentElement.attributes;t.load(T);for(var c=a.length-1;c>=0;c--)t.removeAttribute(a[c].name);t.save(T)})}var l=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function r(t){return t.replace(/^\d/,"___$&").replace(l,"___")}function i(){if(!y||!y.documentElement||!y.documentElement.addBehavior)return null;var t="script",a,c,d;try{c=new ActiveXObject("htmlfile"),c.open(),c.write("<"+t+">document.w=window</"+t+'><iframe src="/favicon.ico"></iframe>'),c.close(),a=c.w.frames[0].document,d=a.createElement("div")}catch(f){d=y.createElement("div"),a=y.body}return function(f){var h=[].slice.call(arguments,0);h.unshift(d),a.appendChild(d),d.addBehavior("#default#userData"),d.load(T),f.apply(this,h),a.removeChild(d);return}}},RMFE:function(j,H){j.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(j,H,b){j.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(j,H){j.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(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("OLod"))})(this,function(I){return I.mode.OFB=function(){var v=I.lib.BlockCipherMode.extend(),T=v.Encryptor=v.extend({processBlock:function(y,g){var s=this._cipher,_=s.blockSize,p=this._iv,e=this._keystream;p&&(e=this._keystream=p.slice(0),this._iv=void 0),s.encryptBlock(e,0);for(var o=0;o<_;o++)y[g+o]^=e[o]}});return v.Decryptor=T,v}(),I.mode.OFB})},"SA+Z":function(j,H,b){var I=b("wTVA"),v=b("EbDI"),T=b("ZhPi"),y=b("wkBT");function g(s){return I(s)||v(s)||T(s)||y()}j.exports=g,j.exports.__esModule=!0,j.exports.default=j.exports},SJMd:function(j,H){/**
|
|
|
* @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 b,I,v,T=!1,y,g;window.PR_SHOULD_USE_CONTINUATION=!0;var s,_;(function(){var p=window,e=["break,continue,do,else,for,if,return,while"],o=[e,"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=[o,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],l=[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"],r=[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"],t="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",a=[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",d=[e,"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=[e,"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"],h=[e,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],u=[l,i,r,a,c,d,f,h],E=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,x="str",O="kwd",C="com",w="typ",S="lit",A="pun",D="pln",M="tag",N="dec",P="src",z="atn",X="atv",k="nocode",F="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function U(ie){for(var q=0,Q=!1,Y=!1,oe=0,le=ie.length;oe<le;++oe){var Ee=ie[oe];if(Ee.ignoreCase)Y=!0;else if(/[a-z]/i.test(Ee.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Q=!0,Y=!1;break}}var Le={b:8,t:9,n:10,v:11,f:12,r:13};function ge(ze){var Me=ze.charCodeAt(0);if(Me!==92)return Me;var Et=ze.charAt(1);return Me=Le[Et],Me||("0"<=Et&&Et<="7"?parseInt(ze.substring(1),8):Et==="u"||Et==="x"?parseInt(ze.substring(2),16):ze.charCodeAt(1))}function De(ze){if(ze<32)return(ze<16?"\\x0":"\\x")+ze.toString(16);var Me=String.fromCharCode(ze);return Me==="\\"||Me==="-"||Me==="]"||Me==="^"?"\\"+Me:Me}function _e(ze){var Me=ze.substring(1,ze.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")),Et=[],Oe=Me[0]==="^",Ve=["["];Oe&&Ve.push("^");for(var Je=Oe?1:0,Ye=Me.length;Je<Ye;++Je){var Pe=Me[Je];if(/\\[bdsw]/i.test(Pe))Ve.push(Pe);else{var He=ge(Pe),ve;Je+2<Ye&&Me[Je+1]==="-"?(ve=ge(Me[Je+2]),Je+=2):ve=He,Et.push([He,ve]),ve<65||He>122||(ve<65||He>90||Et.push([Math.max(65,He)|32,Math.min(ve,90)|32]),ve<97||He>122||Et.push([Math.max(97,He)&~32,Math.min(ve,122)&~32]))}}Et.sort(function(Qe,ne){return Qe[0]-ne[0]||ne[1]-Qe[1]});for(var xe=[],de=[],Je=0;Je<Et.length;++Je){var je=Et[Je];je[0]<=de[1]+1?de[1]=Math.max(de[1],je[1]):xe.push(de=je)}for(var Je=0;Je<xe.length;++Je){var je=xe[Je];Ve.push(De(je[0])),je[1]>je[0]&&(je[1]+1>je[0]&&Ve.push("-"),Ve.push(De(je[1])))}return Ve.push("]"),Ve.join("")}function Xe(ze){for(var Me=ze.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")),Et=Me.length,Oe=[],Ve=0,Je=0;Ve<Et;++Ve){var Ye=Me[Ve];if(Ye==="(")++Je;else if(Ye.charAt(0)==="\\"){var Pe=+Ye.substring(1);Pe&&(Pe<=Je?Oe[Pe]=-1:Me[Ve]=De(Pe))}}for(var Ve=1;Ve<Oe.length;++Ve)Oe[Ve]===-1&&(Oe[Ve]=++q);for(var Ve=0,Je=0;Ve<Et;++Ve){var Ye=Me[Ve];if(Ye==="(")++Je,Oe[Je]||(Me[Ve]="(?:");else if(Ye.charAt(0)==="\\"){var Pe=+Ye.substring(1);Pe&&Pe<=Je&&(Me[Ve]="\\"+Oe[Pe])}}for(var Ve=0;Ve<Et;++Ve)Me[Ve]==="^"&&Me[Ve+1]!=="^"&&(Me[Ve]="");if(ze.ignoreCase&&Q)for(var Ve=0;Ve<Et;++Ve){var Ye=Me[Ve],He=Ye.charAt(0);Ye.length>=2&&He==="["?Me[Ve]=_e(Ye):He!=="\\"&&(Me[Ve]=Ye.replace(/[a-zA-Z]/g,function(de){var je=de.charCodeAt(0);return"["+String.fromCharCode(je&~32,je|32)+"]"}))}return Me.join("")}for(var tt=[],oe=0,le=ie.length;oe<le;++oe){var Ee=ie[oe];if(Ee.global||Ee.multiline)throw new Error(""+Ee);tt.push("(?:"+Xe(Ee)+")")}return new RegExp(tt.join("|"),Y?"gi":"g")}function L(ie,q){var Q=/(?:^|\s)nocode(?:\s|$)/,Y=[],oe=0,le=[],Ee=0;function Le(ge){var De=ge.nodeType;if(De==1){if(Q.test(ge.className))return;for(var _e=ge.firstChild;_e;_e=_e.nextSibling)Le(_e);var Xe=ge.nodeName.toLowerCase();(Xe==="br"||Xe==="li")&&(Y[Ee]=`
|
|
|
`,le[Ee<<1]=oe++,le[Ee++<<1|1]=ge)}else if(De==3||De==4){var tt=ge.nodeValue;tt.length&&(q?tt=tt.replace(/\r\n?/g,`
|
|
|
`):tt=tt.replace(/[ \t\r\n]+/g," "),Y[Ee]=tt,le[Ee<<1]=oe,oe+=tt.length,le[Ee++<<1|1]=ge)}}return Le(ie),{sourceCode:Y.join("").replace(/\n$/,""),spans:le}}function B(ie,q,Q,Y,oe){if(!Q)return;var le={sourceNode:ie,pre:1,langExtension:null,numberLines:null,sourceCode:Q,spans:null,basePos:q,decorations:null};Y(le),oe.push.apply(oe,le.decorations)}var Z=/\S/;function re(ie){for(var q=void 0,Q=ie.firstChild;Q;Q=Q.nextSibling){var Y=Q.nodeType;q=Y===1?q?ie:Q:Y===3&&Z.test(Q.nodeValue)?ie:q}return q===ie?void 0:q}function he(ie,q){var Q={},Y;(function(){for(var Ee=ie.concat(q),Le=[],ge={},De=0,_e=Ee.length;De<_e;++De){var Xe=Ee[De],tt=Xe[3];if(tt)for(var ze=tt.length;--ze>=0;)Q[tt.charAt(ze)]=Xe;var Me=Xe[1],Et=""+Me;ge.hasOwnProperty(Et)||(Le.push(Me),ge[Et]=null)}Le.push(/[\0-\uffff]/),Y=U(Le)})();var oe=q.length,le=function(Ee){for(var Le=Ee.sourceCode,ge=Ee.basePos,De=Ee.sourceNode,_e=[ge,D],Xe=0,tt=Le.match(Y)||[],ze={},Me=0,Et=tt.length;Me<Et;++Me){var Oe=tt[Me],Ve=ze[Oe],Je=void 0,Ye;if(typeof Ve=="string")Ye=!1;else{var Pe=Q[Oe.charAt(0)];if(Pe)Je=Oe.match(Pe[1]),Ve=Pe[0];else{for(var He=0;He<oe;++He)if(Pe=q[He],Je=Oe.match(Pe[1]),Je){Ve=Pe[0];break}Je||(Ve=D)}Ye=Ve.length>=5&&Ve.substring(0,5)==="lang-",Ye&&!(Je&&typeof Je[1]=="string")&&(Ye=!1,Ve=P),Ye||(ze[Oe]=Ve)}var ve=Xe;if(Xe+=Oe.length,!Ye)_e.push(ge+ve,Ve);else{var xe=Je[1],de=Oe.indexOf(xe),je=de+xe.length;Je[2]&&(je=Oe.length-Je[2].length,de=je-xe.length);var Qe=Ve.substring(5);B(De,ge+ve,Oe.substring(0,de),le,_e),B(De,ge+ve+de,xe,me(Qe,xe),_e),B(De,ge+ve+je,Oe.substring(je),le,_e)}}Ee.decorations=_e};return le}function Ce(ie){var q=[],Q=[];ie.tripleQuotedStrings?q.push([x,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ie.multiLineStrings?q.push([x,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):q.push([x,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ie.verbatimStrings&&Q.push([x,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Y=ie.hashComments;Y&&(ie.cStyleComments?(Y>1?q.push([C,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):q.push([C,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Q.push([x,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):q.push([C,/^#[^\r\n]*/,null,"#"])),ie.cStyleComments&&(Q.push([C,/^\/\/[^\r\n]*/,null]),Q.push([C,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var oe=ie.regexLiterals;if(oe){var le=oe>1?"":`
|
|
|
\r`,Ee=le?".":"[\\S\\s]",Le="/(?=[^/*"+le+"])(?:[^/\\x5B\\x5C"+le+"]|\\x5C"+Ee+"|\\x5B(?:[^\\x5C\\x5D"+le+"]|\\x5C"+Ee+")*(?:\\x5D|$))+/";Q.push(["lang-regex",RegExp("^"+F+"("+Le+")")])}var ge=ie.types;ge&&Q.push([w,ge]);var De=(""+ie.keywords).replace(/^ | $/g,"");De.length&&Q.push([O,new RegExp("^(?:"+De.replace(/[\s,]+/g,"|")+")\\b"),null]),q.push([D,/^\s+/,null,` \r
|
|
|
\xA0`]);var _e="^.[^\\s\\w.$@'\"`/\\\\]*";return ie.regexLiterals&&(_e+="(?!s*/)"),Q.push([S,/^@[a-z_$][a-z_$@0-9]*/i,null],[w,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[D,/^[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"],[D,/^\\[\s\S]?/,null],[A,new RegExp(_e),null]),he(q,Q)}var ke=Ce({keywords:u,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function te(ie,q,Q){for(var Y=/(?:^|\s)nocode(?:\s|$)/,oe=/\r\n?|\n/,le=ie.ownerDocument,Ee=le.createElement("li");ie.firstChild;)Ee.appendChild(ie.firstChild);var Le=[Ee];function ge(Me){var Et=Me.nodeType;if(Et==1&&!Y.test(Me.className))if(Me.nodeName==="br")De(Me),Me.parentNode&&Me.parentNode.removeChild(Me);else for(var Oe=Me.firstChild;Oe;Oe=Oe.nextSibling)ge(Oe);else if((Et==3||Et==4)&&Q){var Ve=Me.nodeValue,Je=Ve.match(oe);if(Je){var Ye=Ve.substring(0,Je.index);Me.nodeValue=Ye;var Pe=Ve.substring(Je.index+Je[0].length);if(Pe){var He=Me.parentNode;He.insertBefore(le.createTextNode(Pe),Me.nextSibling)}De(Me),Ye||Me.parentNode.removeChild(Me)}}}function De(Me){for(;!Me.nextSibling;)if(Me=Me.parentNode,!Me)return;function Et(Je,Ye){var Pe=Ye?Je.cloneNode(!1):Je,He=Je.parentNode;if(He){var ve=Et(He,1),xe=Je.nextSibling;ve.appendChild(Pe);for(var de=xe;de;de=xe)xe=de.nextSibling,ve.appendChild(de)}return Pe}for(var Oe=Et(Me.nextSibling,0),Ve;(Ve=Oe.parentNode)&&Ve.nodeType===1;)Oe=Ve;Le.push(Oe)}for(var _e=0;_e<Le.length;++_e)ge(Le[_e]);q===(q|0)&&Le[0].setAttribute("value",q);var Xe=le.createElement("ol");Xe.className="linenums";for(var tt=Math.max(0,q-1|0)||0,_e=0,ze=Le.length;_e<ze;++_e)Ee=Le[_e],Ee.className="L"+(_e+tt)%10,Ee.firstChild||Ee.appendChild(le.createTextNode("\xA0")),Xe.appendChild(Ee);ie.appendChild(Xe)}function Re(ie){var q=/\bMSIE\s(\d+)/.exec(navigator.userAgent);q=q&&+q[1]<=8;var Q=/\n/g,Y=ie.sourceCode,oe=Y.length,le=0,Ee=ie.spans,Le=Ee.length,ge=0,De=ie.decorations,_e=De.length,Xe=0;De[_e]=oe;var tt,ze;for(ze=tt=0;ze<_e;)De[ze]!==De[ze+2]?(De[tt++]=De[ze++],De[tt++]=De[ze++]):ze+=2;for(_e=tt,ze=tt=0;ze<_e;){for(var Me=De[ze],Et=De[ze+1],Oe=ze+2;Oe+2<=_e&&De[Oe+1]===Et;)Oe+=2;De[tt++]=Me,De[tt++]=Et,ze=Oe}_e=De.length=tt;var Ve=ie.sourceNode,Je="";Ve&&(Je=Ve.style.display,Ve.style.display="none");try{for(var Ye=null;ge<Le;){var Pe=Ee[ge],He=Ee[ge+2]||oe,ve=De[Xe+2]||oe,Oe=Math.min(He,ve),xe=Ee[ge+1],de;if(xe.nodeType!==1&&(de=Y.substring(le,Oe))){q&&(de=de.replace(Q,"\r")),xe.nodeValue=de;var je=xe.ownerDocument,Qe=je.createElement("span");Qe.className=De[Xe+1];var ne=xe.parentNode;ne.replaceChild(Qe,xe),Qe.appendChild(xe),le<He&&(Ee[ge+1]=xe=je.createTextNode(Y.substring(Oe,He)),ne.insertBefore(xe,Qe.nextSibling))}le=Oe,le>=He&&(ge+=2),le>=ve&&(Xe+=2)}}finally{Ve&&(Ve.style.display=Je)}}var Te={};function pe(ie,q){for(var Q=q.length;--Q>=0;){var Y=q[Q];Te.hasOwnProperty(Y)?p.console&&console.warn("cannot override language handler %s",Y):Te[Y]=ie}}function me(ie,q){return ie&&Te.hasOwnProperty(ie)||(ie=/^\s*</.test(q)?"default-markup":"default-code"),Te[ie]}pe(ke,["default-code"]),pe(he([],[[D,/^[^<?]+/],[N,/^<!\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"]),pe(he([[D,/^[\s]+/,null,` \r
|
|
|
`],[X,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[M,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[z,/^(?!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"]),pe(he([],[[X,/^[\s\S]+/]]),["uq.val"]),pe(Ce({keywords:l,hashComments:!0,cStyleComments:!0,types:E}),["c","cc","cpp","cxx","cyc","m"]),pe(Ce({keywords:"null,true,false"}),["json"]),pe(Ce({keywords:i,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:E}),["cs"]),pe(Ce({keywords:r,cStyleComments:!0}),["java"]),pe(Ce({keywords:h,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),pe(Ce({keywords:d,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),pe(Ce({keywords:c,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),pe(Ce({keywords:f,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),pe(Ce({keywords:a,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),pe(Ce({keywords:t,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),pe(he([],[[x,/^[\s\S]+/]]),["regex"]);function se(ie){var q=ie.langExtension;try{var Q=L(ie.sourceNode,ie.pre),Y=Q.sourceCode;ie.sourceCode=Y,ie.spans=Q.spans,ie.basePos=0,me(q,Y)(ie),Re(ie)}catch(oe){p.console&&console.log(oe&&oe.stack||oe)}}function be(ie,q,Q){var Y=Q||!1,oe=q||null,le=document.createElement("div");le.innerHTML="<pre>"+ie+"</pre>",le=le.firstChild,Y&&te(le,Y,!0);var Ee={langExtension:oe,numberLines:Y,sourceNode:le,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return se(Ee),le.innerHTML}function ae(ie,q){var Q=q||document.body,Y=Q.ownerDocument||document;function oe(Pe){return Q.getElementsByTagName(Pe)}for(var le=[oe("pre"),oe("code"),oe("xmp")],Ee=[],Le=0;Le<le.length;++Le)for(var ge=0,De=le[Le].length;ge<De;++ge)Ee.push(le[Le][ge]);le=null;var _e=Date;_e.now||(_e={now:function(){return+new Date}});var Xe=0,tt=/\blang(?:uage)?-([\w.]+)(?!\S)/,ze=/\bprettyprint\b/,Me=/\bprettyprinted\b/,Et=/pre|xmp/i,Oe=/^code$/i,Ve=/^(?:pre|code|xmp)$/i,Je={};function Ye(){for(var Pe=p.PR_SHOULD_USE_CONTINUATION?_e.now()+250:Infinity;Xe<Ee.length&&_e.now()<Pe;Xe++){for(var He=Ee[Xe],ve=Je,xe=He;xe=xe.previousSibling;){var de=xe.nodeType,je=(de===7||de===8)&&xe.nodeValue;if(je?!/^\??prettify\b/.test(je):de!==3||/\S/.test(xe.nodeValue))break;if(je){ve={},je.replace(/\b(\w+)=([\w:.%+-]+)/g,function(yt,pt,jt){ve[pt]=jt});break}}var Qe=He.className;if((ve!==Je||ze.test(Qe))&&!Me.test(Qe)){for(var ne=!1,Ze=He.parentNode;Ze;Ze=Ze.parentNode){var lt=Ze.tagName;if(Ve.test(lt)&&Ze.className&&ze.test(Ze.className)){ne=!0;break}}if(!ne){He.className+=" prettyprinted";var Be=ve.lang;if(!Be){Be=Qe.match(tt);var $e;!Be&&($e=re(He))&&Oe.test($e.tagName)&&(Be=$e.className.match(tt)),Be&&(Be=Be[1])}var rt;if(Et.test(He.tagName))rt=1;else{var xt=He.currentStyle,ft=Y.defaultView,st=xt?xt.whiteSpace:ft&&ft.getComputedStyle?ft.getComputedStyle(He,null).getPropertyValue("white-space"):0;rt=st&&st.substring(0,3)==="pre"}var Ne=ve.linenums;(Ne=Ne==="true"||+Ne)||(Ne=Qe.match(/\blinenums\b(?::(\d+))?/),Ne=Ne?Ne[1]&&Ne[1].length?+Ne[1]:!0:!1),Ne&&te(He,Ne,rt);var Ge={langExtension:Be,sourceNode:He,numberLines:Ne,pre:rt,sourceCode:null,basePos:null,spans:null,decorations:null};se(Ge)}}}Xe<Ee.length?p.setTimeout(Ye,250):typeof ie=="function"&&ie()}Ye()}var fe=p.PR={createSimpleLexer:he,registerLangHandler:pe,sourceDecorator:Ce,PR_ATTRIB_NAME:z,PR_ATTRIB_VALUE:X,PR_COMMENT:C,PR_DECLARATION:N,PR_KEYWORD:O,PR_LITERAL:S,PR_NOCODE:k,PR_PLAIN:D,PR_PUNCTUATION:A,PR_SOURCE:P,PR_STRING:x,PR_TAG:M,PR_TYPE:w,prettyPrintOne:T?p.prettyPrintOne=be:s=be,prettyPrint:_=T?p.prettyPrint=ae:_=ae},Fe=p.define;typeof Fe=="function"&&Fe.amd&&Fe("google-code-prettify",[],function(){return fe})})()},SMhR:function(j,H){j.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(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.clientToElement=I;function I(v,T,y){var g=y.getBoundingClientRect(),s={x:0,y:0};return v<g.left?s.x=0:v>=g.right?s.x=g.width-1:s.x=v-g.left,T<g.top?s.y=0:T>=g.bottom?s.y=g.height-1:s.y=T-g.top,s}},Sa5k:function(j,H,b){j.exports=b.p+"static/nothing.4d201a0a.png"},Scqh:function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAAAZ5JREFUWEftmM9Kw0AQxuebJBQJnuxREA+CV+mLeO0DlD6AZ1+gV6tQWqhe2ptUBX0JEQ/iQQ8ieFQshCDBZEdWGglCSVKbdJHmkBxmsvPbb2f/DWjyiAiGw+FaEATVKIpWRIRjWxFfAMqyrI9KpfJar9ffAIiOA/3qdDoOgE0Aq0UET2tTRDwReWo2m5/QynS73a1FwSRGyGs0Go8YDAZV3/c30npRht113Wf0+/3tMAzdMgKmxbBt20ev19spOoHTQGK7TnSdP7WsP5ThtwRKU/lfKFRTSu0DCIjoGMBVWq/z2HMrpJQaEdF6YmbcAmgR0UOewNN8ZwG6/t0YgEhETpn5iIi8v4DNBSgBMAbQtizrTCn1vVnmfeYNFMe/J6IWM9+ZAkST48S5bdvtKIres4IVpVAyvgdgD8BNFqgygDTHCzPvLoGmKGDGkOmkFpELx3EOTEhqY6b9mJkPmXm00IVx0VuHWZsrEf0cP0TkhJkvs6wvWX1yL4xZG57VbwmUppx5Chl3UTTuKm1cscG4cozOeqMKVvE0NKWk9wWBdSawQzyy4QAAAABJRU5ErkJggg=="},SgaC:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;function I(g,s){if(!(g instanceof s))throw new TypeError("Cannot call a class as a function")}function v(g,s){for(var _=0;_<s.length;_++){var p=s[_];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(g,p.key,p)}}function T(g,s,_){return s&&v(g.prototype,s),_&&v(g,_),g}var y=function(){function g(){I(this,g),this._subrects=0}return T(g,[{key:"decodeRect",value:function(_,p,e,o,n,l,r){if(this._subrects===0){if(n.rQwait("RRE",4+4))return!1;this._subrects=n.rQshift32();var i=n.rQshiftBytes(4);l.fillRect(_,p,e,o,i)}for(;this._subrects>0;){if(n.rQwait("RRE",4+8))return!1;var t=n.rQshiftBytes(4),a=n.rQshift16(),c=n.rQshift16(),d=n.rQshift16(),f=n.rQshift16();l.fillRect(_+a,p+c,d,f,t),this._subrects--}return!0}}]),g}();H.default=y},SzL9:function(j,H,b){j.exports=b.p+"static/appoint2.ec9f16d8.svg"},T8No:function(j,H,b){"use strict";b.d(H,"a",function(){return _}),b.d(H,"e",function(){return p}),b.d(H,"c",function(){return A}),b.d(H,"b",function(){return D}),b.d(H,"d",function(){return M}),b.d(H,"f",function(){return z});var I=b("MNsG"),v=b("N0LK"),T=b("Cg/j");let y=I.k||"";const g=new Map;g.set("false",!1),g.set("true",!0),g.set("isMac",I.f),g.set("isLinux",I.d),g.set("isWindows",I.i),g.set("isWeb",I.h),g.set("isMacNative",I.f&&!I.h),g.set("isEdge",y.indexOf("Edg/")>=0),g.set("isFirefox",y.indexOf("Firefox")>=0),g.set("isChrome",y.indexOf("Chrome")>=0),g.set("isSafari",y.indexOf("Safari")>=0);const s=Object.prototype.hasOwnProperty;class _{static has(k){return l.create(k)}static equals(k,F){return r.create(k,F)}static regex(k,F){return x.create(k,F)}static not(k){return c.create(k)}static and(...k){return w.create(k,null)}static or(...k){return S.create(k,null,!0)}static deserialize(k,F=!1){return k?this._deserializeOrExpression(k,F):void 0}static _deserializeOrExpression(k,F){let U=k.split("||");return S.create(U.map(L=>this._deserializeAndExpression(L,F)),null,!0)}static _deserializeAndExpression(k,F){let U=k.split("&&");return w.create(U.map(L=>this._deserializeOne(L,F)),null)}static _deserializeOne(k,F){if(k=k.trim(),k.indexOf("!=")>=0){let U=k.split("!=");return a.create(U[0].trim(),this._deserializeValue(U[1],F))}if(k.indexOf("==")>=0){let U=k.split("==");return r.create(U[0].trim(),this._deserializeValue(U[1],F))}if(k.indexOf("=~")>=0){let U=k.split("=~");return x.create(U[0].trim(),this._deserializeRegexValue(U[1],F))}if(k.indexOf(" in ")>=0){let U=k.split(" in ");return i.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(k)){const U=k.split(">=");return h.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(k)){const U=k.split(">");return f.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(k)){const U=k.split("<=");return E.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(k)){const U=k.split("<");return u.create(U[0].trim(),U[1].trim())}return/^\!\s*/.test(k)?c.create(k.substr(1).trim()):l.create(k)}static _deserializeValue(k,F){if(k=k.trim(),k==="true")return!0;if(k==="false")return!1;let U=/^'([^']*)'$/.exec(k);return U?U[1].trim():k}static _deserializeRegexValue(k,F){if(Object(v.C)(k)){if(F)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let U=k.indexOf("/"),L=k.lastIndexOf("/");if(U===L||U<0){if(F)throw new Error(`bad regexp-value '${k}', missing /-enclosure`);return console.warn(`bad regexp-value '${k}', missing /-enclosure`),null}let B=k.slice(U+1,L),Z=k[L+1]==="i"?"i":"";try{return new RegExp(B,Z)}catch(re){if(F)throw new Error(`bad regexp-value '${k}', parse error: ${re}`);return console.warn(`bad regexp-value '${k}', parse error: ${re}`),null}}}function p(k,F){const U=k?k.substituteConstants():void 0,L=F?F.substituteConstants():void 0;return!U&&!L?!0:!U||!L?!1:U.equals(L)}function e(k,F){return k.cmp(F)}class o{constructor(){this.type=0}cmp(k){return this.type-k.type}equals(k){return k.type===this.type}substituteConstants(){return this}evaluate(k){return!1}serialize(){return"false"}keys(){return[]}negate(){return n.INSTANCE}}o.INSTANCE=new o;class n{constructor(){this.type=1}cmp(k){return this.type-k.type}equals(k){return k.type===this.type}substituteConstants(){return this}evaluate(k){return!0}serialize(){return"true"}keys(){return[]}negate(){return o.INSTANCE}}n.INSTANCE=new n;class l{constructor(k,F){this.key=k,this.negated=F,this.type=2}static create(k,F=null){const U=g.get(k);return typeof U=="boolean"?U?n.INSTANCE:o.INSTANCE:new l(k,F)}cmp(k){return k.type!==this.type?this.type-k.type:N(this.key,k.key)}equals(k){return k.type===this.type?this.key===k.key:!1}substituteConstants(){const k=g.get(this.key);return typeof k=="boolean"?k?n.INSTANCE:o.INSTANCE:this}evaluate(k){return!!k.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=c.create(this.key,this)),this.negated}}class r{constructor(k,F,U){this.key=k,this.value=F,this.negated=U,this.type=4}static create(k,F,U=null){if(typeof F=="boolean")return F?l.create(k,U):c.create(k,U);const L=g.get(k);if(typeof L=="boolean"){const B=L?"true":"false";return F===B?n.INSTANCE:o.INSTANCE}return new r(k,F,U)}cmp(k){return k.type!==this.type?this.type-k.type:P(this.key,this.value,k.key,k.value)}equals(k){return k.type===this.type?this.key===k.key&&this.value===k.value:!1}substituteConstants(){const k=g.get(this.key);if(typeof k=="boolean"){const F=k?"true":"false";return this.value===F?n.INSTANCE:o.INSTANCE}return this}evaluate(k){return k.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=a.create(this.key,this.value,this)),this.negated}}class i{constructor(k,F){this.key=k,this.valueKey=F,this.type=10,this.negated=null}static create(k,F){return new i(k,F)}cmp(k){return k.type!==this.type?this.type-k.type:P(this.key,this.valueKey,k.key,k.valueKey)}equals(k){return k.type===this.type?this.key===k.key&&this.valueKey===k.valueKey:!1}substituteConstants(){return this}evaluate(k){const F=k.getValue(this.valueKey),U=k.getValue(this.key);return Array.isArray(F)?F.indexOf(U)>=0:typeof U=="string"&&typeof F=="object"&&F!==null?s.call(F,U):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=t.create(this)),this.negated}}class t{constructor(k){this._actual=k,this.type=11}static create(k){return new t(k)}cmp(k){return k.type!==this.type?this.type-k.type:this._actual.cmp(k._actual)}equals(k){return k.type===this.type?this._actual.equals(k._actual):!1}substituteConstants(){return this}evaluate(k){return!this._actual.evaluate(k)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class a{constructor(k,F,U){this.key=k,this.value=F,this.negated=U,this.type=5}static create(k,F,U=null){if(typeof F=="boolean")return F?c.create(k,U):l.create(k,U);const L=g.get(k);if(typeof L=="boolean"){const B=L?"true":"false";return F===B?o.INSTANCE:n.INSTANCE}return new a(k,F,U)}cmp(k){return k.type!==this.type?this.type-k.type:P(this.key,this.value,k.key,k.value)}equals(k){return k.type===this.type?this.key===k.key&&this.value===k.value:!1}substituteConstants(){const k=g.get(this.key);if(typeof k=="boolean"){const F=k?"true":"false";return this.value===F?o.INSTANCE:n.INSTANCE}return this}evaluate(k){return k.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=r.create(this.key,this.value,this)),this.negated}}class c{constructor(k,F){this.key=k,this.negated=F,this.type=3}static create(k,F=null){const U=g.get(k);return typeof U=="boolean"?U?o.INSTANCE:n.INSTANCE:new c(k,F)}cmp(k){return k.type!==this.type?this.type-k.type:N(this.key,k.key)}equals(k){return k.type===this.type?this.key===k.key:!1}substituteConstants(){const k=g.get(this.key);return typeof k=="boolean"?k?o.INSTANCE:n.INSTANCE:this}evaluate(k){return!k.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=l.create(this.key,this)),this.negated}}function d(k,F){if(typeof k=="string"){const U=parseFloat(k);isNaN(U)||(k=U)}return typeof k=="string"||typeof k=="number"?F(k):o.INSTANCE}class f{constructor(k,F,U){this.key=k,this.value=F,this.negated=U,this.type=12}static create(k,F,U=null){return d(F,L=>new f(k,L,U))}cmp(k){return k.type!==this.type?this.type-k.type:P(this.key,this.value,k.key,k.value)}equals(k){return k.type===this.type?this.key===k.key&&this.value===k.value:!1}substituteConstants(){return this}evaluate(k){return typeof this.value=="string"?!1:parseFloat(k.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=E.create(this.key,this.value,this)),this.negated}}class h{constructor(k,F,U){this.key=k,this.value=F,this.negated=U,this.type=13}static create(k,F,U=null){return d(F,L=>new h(k,L,U))}cmp(k){return k.type!==this.type?this.type-k.type:P(this.key,this.value,k.key,k.value)}equals(k){return k.type===this.type?this.key===k.key&&this.value===k.value:!1}substituteConstants(){return this}evaluate(k){return typeof this.value=="string"?!1:parseFloat(k.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=u.create(this.key,this.value,this)),this.negated}}class u{constructor(k,F,U){this.key=k,this.value=F,this.negated=U,this.type=14}static create(k,F,U=null){return d(F,L=>new u(k,L,U))}cmp(k){return k.type!==this.type?this.type-k.type:P(this.key,this.value,k.key,k.value)}equals(k){return k.type===this.type?this.key===k.key&&this.value===k.value:!1}substituteConstants(){return this}evaluate(k){return typeof this.value=="string"?!1:parseFloat(k.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=h.create(this.key,this.value,this)),this.negated}}class E{constructor(k,F,U){this.key=k,this.value=F,this.negated=U,this.type=15}static create(k,F,U=null){return d(F,L=>new E(k,L,U))}cmp(k){return k.type!==this.type?this.type-k.type:P(this.key,this.value,k.key,k.value)}equals(k){return k.type===this.type?this.key===k.key&&this.value===k.value:!1}substituteConstants(){return this}evaluate(k){return typeof this.value=="string"?!1:parseFloat(k.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=f.create(this.key,this.value,this)),this.negated}}class x{constructor(k,F){this.key=k,this.regexp=F,this.type=7,this.negated=null}static create(k,F){return new x(k,F)}cmp(k){if(k.type!==this.type)return this.type-k.type;if(this.key<k.key)return-1;if(this.key>k.key)return 1;const F=this.regexp?this.regexp.source:"",U=k.regexp?k.regexp.source:"";return F<U?-1:F>U?1:0}equals(k){if(k.type===this.type){const F=this.regexp?this.regexp.source:"",U=k.regexp?k.regexp.source:"";return this.key===k.key&&F===U}return!1}substituteConstants(){return this}evaluate(k){let F=k.getValue(this.key);return this.regexp?this.regexp.test(F):!1}serialize(){const k=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${k}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=O.create(this)),this.negated}}class O{constructor(k){this._actual=k,this.type=8}static create(k){return new O(k)}cmp(k){return k.type!==this.type?this.type-k.type:this._actual.cmp(k._actual)}equals(k){return k.type===this.type?this._actual.equals(k._actual):!1}substituteConstants(){return this}evaluate(k){return!this._actual.evaluate(k)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function C(k){let F=null;for(let U=0,L=k.length;U<L;U++){const B=k[U].substituteConstants();if(k[U]!==B&&F===null){F=[];for(let Z=0;Z<U;Z++)F[Z]=k[Z]}F!==null&&(F[U]=B)}return F===null?k:F}class w{constructor(k,F){this.expr=k,this.negated=F,this.type=6}static create(k,F){return w._normalizeArr(k,F)}cmp(k){if(k.type!==this.type)return this.type-k.type;if(this.expr.length<k.expr.length)return-1;if(this.expr.length>k.expr.length)return 1;for(let F=0,U=this.expr.length;F<U;F++){const L=e(this.expr[F],k.expr[F]);if(L!==0)return L}return 0}equals(k){if(k.type===this.type){if(this.expr.length!==k.expr.length)return!1;for(let F=0,U=this.expr.length;F<U;F++)if(!this.expr[F].equals(k.expr[F]))return!1;return!0}return!1}substituteConstants(){const k=C(this.expr);return k===this.expr?this:w.create(k,this.negated)}evaluate(k){for(let F=0,U=this.expr.length;F<U;F++)if(!this.expr[F].evaluate(k))return!1;return!0}static _normalizeArr(k,F){const U=[];let L=!1;for(const B of k){if(!B)continue;if(B.type===1){L=!0;continue}if(B.type===0)return o.INSTANCE;if(B.type===6){U.push(...B.expr);continue}U.push(B)}if(U.length===0&&L)return n.INSTANCE;if(U.length===0)return;if(U.length===1)return U[0];U.sort(e);for(let B=1;B<U.length;B++)U[B-1].equals(U[B])&&(U.splice(B,1),B--);if(U.length===1)return U[0];for(;U.length>1;){const B=U[U.length-1];if(B.type!==9)break;U.pop();const Z=U.pop(),re=U.length===0,he=S.create(B.expr.map(Ce=>w.create([Ce,Z],null)),null,re);he&&(U.push(he),U.sort(e))}return U.length===1?U[0]:new w(U,F)}serialize(){return this.expr.map(k=>k.serialize()).join(" && ")}keys(){const k=[];for(let F of this.expr)k.push(...F.keys());return k}negate(){if(!this.negated){const k=[];for(let F of this.expr)k.push(F.negate());this.negated=S.create(k,this,!0)}return this.negated}}class S{constructor(k,F){this.expr=k,this.negated=F,this.type=9}static create(k,F,U){return S._normalizeArr(k,F,U)}cmp(k){if(k.type!==this.type)return this.type-k.type;if(this.expr.length<k.expr.length)return-1;if(this.expr.length>k.expr.length)return 1;for(let F=0,U=this.expr.length;F<U;F++){const L=e(this.expr[F],k.expr[F]);if(L!==0)return L}return 0}equals(k){if(k.type===this.type){if(this.expr.length!==k.expr.length)return!1;for(let F=0,U=this.expr.length;F<U;F++)if(!this.expr[F].equals(k.expr[F]))return!1;return!0}return!1}substituteConstants(){const k=C(this.expr);return k===this.expr?this:S.create(k,this.negated,!1)}evaluate(k){for(let F=0,U=this.expr.length;F<U;F++)if(this.expr[F].evaluate(k))return!0;return!1}static _normalizeArr(k,F,U){let L=[],B=!1;if(k){for(let Z=0,re=k.length;Z<re;Z++){const he=k[Z];if(!he)continue;if(he.type===0){B=!0;continue}if(he.type===1)return n.INSTANCE;if(he.type===9){L=L.concat(he.expr);continue}L.push(he)}if(L.length===0&&B)return o.INSTANCE;L.sort(e)}if(L.length===0)return;if(L.length===1)return L[0];for(let Z=1;Z<L.length;Z++)L[Z-1].equals(L[Z])&&(L.splice(Z,1),Z--);if(L.length===1)return L[0];if(U){for(let Z=0;Z<L.length;Z++)for(let re=Z+1;re<L.length;re++)z(L[Z],L[re])&&(L.splice(re,1),re--);if(L.length===1)return L[0]}return new S(L,F)}serialize(){return this.expr.map(k=>k.serialize()).join(" || ")}keys(){const k=[];for(let F of this.expr)k.push(...F.keys());return k}negate(){if(!this.negated){let k=[];for(let F of this.expr)k.push(F.negate());for(;k.length>1;){const F=k.shift(),U=k.shift(),L=[];for(const Z of X(F))for(const re of X(U))L.push(w.create([Z,re],null));const B=k.length===0;k.unshift(S.create(L,null,B))}this.negated=k[0]}return this.negated}}class A extends l{constructor(k,F,U){super(k,null);this._defaultValue=F,typeof U=="object"?A._info.push(Object.assign(Object.assign({},U),{key:k})):U!==!0&&A._info.push({key:k,description:U,type:F!=null?typeof F:void 0})}static all(){return A._info.values()}bindTo(k){return k.createKey(this.key,this._defaultValue)}getValue(k){return k.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(k){return r.create(this.key,k)}}A._info=[];const D=Object(T.c)("contextKeyService"),M="setContext";function N(k,F){return k<F?-1:k>F?1:0}function P(k,F,U,L){return k<U?-1:k>U?1:F<L?-1:F>L?1:0}function z(k,F){if(F.type===6&&k.type!==9&&k.type!==6){for(const B of F.expr)if(k.equals(B))return!0}const U=k.negate(),L=X(U).concat(X(F));L.sort(e);for(let B=0;B<L.length;B++){const Z=L[B],re=Z.negate();for(let he=B+1;he<L.length;he++){const Ce=L[he];if(re.equals(Ce))return!0}}return!1}function X(k){return k.type===9?k.expr:[k]}},TGq3:function(j,H,b){j.exports=b.p+"static/lockclose.365036e8.svg"},TXba:function(j,H,b){j.exports={wrap:"wrap___3g908",content:"content___DKfAL",mainPathWrap:"mainPathWrap___1gVR9",colorBlue:"colorBlue___10YHC"}},TXwP:function(j,H,b){var I,v;(function(){var T;(function(){"use strict";var g=[,,function(e){function o(r){this.__parent=r,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=[]}o.prototype.clone_empty=function(){var r=new o(this.__parent);return r.set_indent(this.__indent_count,this.__alignment_count),r},o.prototype.item=function(r){return r<0?this.__items[this.__items.length+r]:this.__items[r]},o.prototype.has_match=function(r){for(var i=this.__items.length-1;i>=0;i--)if(this.__items[i].match(r))return!0;return!1},o.prototype.set_indent=function(r,i){this.is_empty()&&(this.__indent_count=r||0,this.__alignment_count=i||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},o.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)},o.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},o.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var r=this.__parent.current_line;return r.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),r.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),r.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,r.__items[0]===" "&&(r.__items.splice(0,1),r.__character_count-=1),!0}return!1},o.prototype.is_empty=function(){return this.__items.length===0},o.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},o.prototype.push=function(r){this.__items.push(r);var i=r.lastIndexOf(`
|
|
|
`);i!==-1?this.__character_count=r.length-i:this.__character_count+=r.length},o.prototype.pop=function(){var r=null;return this.is_empty()||(r=this.__items.pop(),this.__character_count-=r.length),r},o.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},o.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},o.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},o.prototype.toString=function(){var r="";return this.is_empty()?this.__parent.indent_empty_lines&&(r=this.__parent.get_indent_string(this.__indent_count)):(r=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),r+=this.__items.join("")),r};function n(r,i){this.__cache=[""],this.__indent_size=r.indent_size,this.__indent_string=r.indent_char,r.indent_with_tabs||(this.__indent_string=new Array(r.indent_size+1).join(r.indent_char)),i=i||"",r.indent_level>0&&(i=new Array(r.indent_level+1).join(this.__indent_string)),this.__base_string=i,this.__base_string_length=i.length}n.prototype.get_indent_size=function(r,i){var t=this.__base_string_length;return i=i||0,r<0&&(t=0),t+=r*this.__indent_size,t+=i,t},n.prototype.get_indent_string=function(r,i){var t=this.__base_string;return i=i||0,r<0&&(r=0,t=""),i+=r*this.__indent_size,this.__ensure_cache(i),t+=this.__cache[i],t},n.prototype.__ensure_cache=function(r){for(;r>=this.__cache.length;)this.__add_column()},n.prototype.__add_column=function(){var r=this.__cache.length,i=0,t="";this.__indent_size&&r>=this.__indent_size&&(i=Math.floor(r/this.__indent_size),r-=i*this.__indent_size,t=new Array(i+1).join(this.__indent_string)),r&&(t+=new Array(r+1).join(" ")),this.__cache.push(t)};function l(r,i){this.__indent_cache=new n(r,i),this.raw=!1,this._end_with_newline=r.end_with_newline,this.indent_size=r.indent_size,this.wrap_line_length=r.wrap_line_length,this.indent_empty_lines=r.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new o(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}l.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},l.prototype.get_line_number=function(){return this.__lines.length},l.prototype.get_indent_string=function(r,i){return this.__indent_cache.get_indent_string(r,i)},l.prototype.get_indent_size=function(r,i){return this.__indent_cache.get_indent_size(r,i)},l.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},l.prototype.add_new_line=function(r){return this.is_empty()||!r&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},l.prototype.get_code=function(r){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 t=this.__lines.join(`
|
|
|
`);return r!==`
|
|
|
`&&(t=t.replace(/[\n]/g,r)),t},l.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},l.prototype.set_indent=function(r,i){return r=r||0,i=i||0,this.next_line.set_indent(r,i),this.__lines.length>1?(this.current_line.set_indent(r,i),!0):(this.current_line.set_indent(),!1)},l.prototype.add_raw_token=function(r){for(var i=0;i<r.newlines;i++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(r.whitespace_before),this.current_line.push(r.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},l.prototype.add_token=function(r){this.__add_space_before_token(),this.current_line.push(r),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},l.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(" "))},l.prototype.remove_indent=function(r){for(var i=this.__lines.length;r<i;)this.__lines[r]._remove_indent(),r++;this.current_line._remove_wrap_indent()},l.prototype.trim=function(r){for(r=r===void 0?!1:r,this.current_line.trim();r&&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},l.prototype.just_added_newline=function(){return this.current_line.is_empty()},l.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},l.prototype.ensure_empty_line_above=function(r,i){for(var t=this.__lines.length-2;t>=0;){var a=this.__lines[t];if(a.is_empty())break;if(a.item(0).indexOf(r)!==0&&a.item(-1)!==i){this.__lines.splice(t+1,0,new o(this)),this.previous_line=this.__lines[this.__lines.length-2];break}t--}},e.exports.Output=l},,,,function(e){function o(r,i){this.raw_options=n(r,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"])}o.prototype._get_array=function(r,i){var t=this.raw_options[r],a=i||[];return typeof t=="object"?t!==null&&typeof t.concat=="function"&&(a=t.concat()):typeof t=="string"&&(a=t.split(/[^a-zA-Z0-9_\/\-]+/)),a},o.prototype._get_boolean=function(r,i){var t=this.raw_options[r],a=t===void 0?!!i:!!t;return a},o.prototype._get_characters=function(r,i){var t=this.raw_options[r],a=i||"";return typeof t=="string"&&(a=t.replace(/\\r/,"\r").replace(/\\n/,`
|
|
|
`).replace(/\\t/," ")),a},o.prototype._get_number=function(r,i){var t=this.raw_options[r];i=parseInt(i,10),isNaN(i)&&(i=0);var a=parseInt(t,10);return isNaN(a)&&(a=i),a},o.prototype._get_selection=function(r,i,t){var a=this._get_selection_list(r,i,t);if(a.length!==1)throw new Error("Invalid Option Value: The option '"+r+`' can only be one of the following values:
|
|
|
`+i+`
|
|
|
You passed in: '`+this.raw_options[r]+"'");return a[0]},o.prototype._get_selection_list=function(r,i,t){if(!i||i.length===0)throw new Error("Selection list cannot be empty.");if(t=t||[i[0]],!this._is_valid_selection(t,i))throw new Error("Invalid Default Value!");var a=this._get_array(r,t);if(!this._is_valid_selection(a,i))throw new Error("Invalid Option Value: The option '"+r+`' can contain only the following values:
|
|
|
`+i+`
|
|
|
You passed in: '`+this.raw_options[r]+"'");return a},o.prototype._is_valid_selection=function(r,i){return r.length&&i.length&&!r.some(function(t){return i.indexOf(t)===-1})};function n(r,i){var t={};r=l(r);var a;for(a in r)a!==i&&(t[a]=r[a]);if(i&&r[i])for(a in r[i])t[a]=r[i][a];return t}function l(r){var i={},t;for(t in r){var a=t.replace(/-/g,"_");i[a]=r[t]}return i}e.exports.Options=o,e.exports.normalizeOpts=l,e.exports.mergeOpts=n},,function(e){var o=RegExp.prototype.hasOwnProperty("sticky");function n(l){this.__input=l||"",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 l=null;return this.hasNext()&&(l=this.__input.charAt(this.__position),this.__position+=1),l},n.prototype.peek=function(l){var r=null;return l=l||0,l+=this.__position,l>=0&&l<this.__input_length&&(r=this.__input.charAt(l)),r},n.prototype.__match=function(l,r){l.lastIndex=r;var i=l.exec(this.__input);return i&&!(o&&l.sticky)&&(i.index!==r&&(i=null)),i},n.prototype.test=function(l,r){return r=r||0,r+=this.__position,r>=0&&r<this.__input_length?!!this.__match(l,r):!1},n.prototype.testChar=function(l,r){var i=this.peek(r);return l.lastIndex=0,i!==null&&l.test(i)},n.prototype.match=function(l){var r=this.__match(l,this.__position);return r?this.__position+=r[0].length:r=null,r},n.prototype.read=function(l,r,i){var t="",a;return l&&(a=this.match(l),a&&(t+=a[0])),r&&(a||!l)&&(t+=this.readUntil(r,i)),t},n.prototype.readUntil=function(l,r){var i="",t=this.__position;l.lastIndex=this.__position;var a=l.exec(this.__input);return a?(t=a.index,r&&(t+=a[0].length)):t=this.__input_length,i=this.__input.substring(this.__position,t),this.__position=t,i},n.prototype.readUntilAfter=function(l){return this.readUntil(l,!0)},n.prototype.get_regexp=function(l,r){var i=null,t="g";return r&&o&&(t="y"),typeof l=="string"&&l!==""?i=new RegExp(l,t):l&&(i=new RegExp(l.source,t)),i},n.prototype.get_literal_regexp=function(l){return RegExp(l.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},n.prototype.peekUntilAfter=function(l){var r=this.__position,i=this.readUntilAfter(l);return this.__position=r,i},n.prototype.lookBack=function(l){var r=this.__position-1;return r>=l.length&&this.__input.substring(r-l.length,r).toLowerCase()===l},e.exports.InputScanner=n},,,,,function(e){function o(n,l){n=typeof n=="string"?n:n.source,l=typeof l=="string"?l:l.source,this.__directives_block_pattern=new RegExp(n+/ beautify( \w+[:]\w+)+ /.source+l,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(n+/\sbeautify\signore:end\s/.source+l,"g")}o.prototype.get_directives=function(n){if(!n.match(this.__directives_block_pattern))return null;var l={};this.__directive_pattern.lastIndex=0;for(var r=this.__directive_pattern.exec(n);r;)l[r[1]]=r[2],r=this.__directive_pattern.exec(n);return l},o.prototype.readIgnored=function(n){return n.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=o},,function(e,o,n){var l=n(16).Beautifier,r=n(17).Options;function i(t,a){var c=new l(t,a);return c.beautify()}e.exports=i,e.exports.defaultOptions=function(){return new r}},function(e,o,n){var l=n(17).Options,r=n(2).Output,i=n(8).InputScanner,t=n(13).Directives,a=new t(/\/\*/,/\*\//),c=/\r\n|[\r\n]/,d=/\r\n|[\r\n]/g,f=/\s/,h=/(?:\s|\n)+/g,u=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,E=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function x(O,C){this._source_text=O||"",this._options=new l(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"]}x.prototype.eatString=function(O){var C="";for(this._ch=this._input.next();this._ch;){if(C+=this._ch,this._ch==="\\")C+=this._input.next();else if(O.indexOf(this._ch)!==-1||this._ch===`
|
|
|
`)break;this._ch=this._input.next()}return C},x.prototype.eatWhitespace=function(O){for(var C=f.test(this._input.peek()),w=0;f.test(this._input.peek());)this._ch=this._input.next(),O&&this._ch===`
|
|
|
`&&((w===0||w<this._options.max_preserve_newlines)&&(w++,this._output.add_new_line(!0)));return C},x.prototype.foundNestedPseudoClass=function(){for(var O=0,C=1,w=this._input.peek(C);w;){if(w==="{")return!0;if(w==="(")O+=1;else if(w===")"){if(O===0)return!1;O-=1}else if(w===";"||w==="}")return!1;C++,w=this._input.peek(C)}return!1},x.prototype.print_string=function(O){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(O)},x.prototype.preserveSingleSpace=function(O){O&&(this._output.space_before_token=!0)},x.prototype.indent=function(){this._indentLevel++},x.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},x.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var O=this._source_text,C=this._options.eol;C==="auto"&&(C=`
|
|
|
`,O&&c.test(O||"")&&(C=O.match(c)[0])),O=O.replace(d,`
|
|
|
`);var w=O.match(/^[\t ]*/)[0];this._output=new r(this._options,w),this._input=new i(O),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var S=0,A=!1,D=!1,M=!1,N=!1,P=!1,z=!1,X=this._ch,k=!1,F,U,L;F=this._input.read(h),U=F!=="",L=X,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),X=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var B=this._input.read(u),Z=a.get_directives(B);Z&&Z.ignore==="start"&&(B+=a.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(U),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"?N=!0:re==="import"&&(P=!0),re in this.NESTED_AT_RULE?(this._nestedLevel+=1,re in this.CONDITIONAL_GROUP_RULE&&(M=!0)):!A&&S===0&&re.indexOf(":")!==-1&&(D=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(U),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")D&&(D=!1,this.outdent()),M?(M=!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)):(L==="("?this._output.space_before_token=!1:L!==","&&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(),L==="{"&&this._output.trim(!0),P=!1,N=!1,D&&(this.outdent(),D=!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])){k=!0;break}(A||M)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!N&&S===0?(this.print_string(":"),D||(D=!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 Ce=L==='"'||L==="'";this.preserveSingleSpace(Ce||U),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")k=!1,S===0?(D&&(this.outdent(),D=!1),N=!1,P=!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(U||ke),this.print_string(this._ch),D&&L==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),z=!0):(this.eatWhitespace(),S++,this.indent())}else if(this._ch===")")S&&(S--,this.outdent()),z&&this._input.peek()===";"&&this._options.selector_separator_newline&&(z=!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&&(!D||z)&&S===0&&!P&&!N?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!D&&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(U),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 te=L==='"'||L==="'";this.preserveSingleSpace(te||U),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
|
`&&k&&this._output.add_new_line()}var Re=this._output.get_code(C);return Re},e.exports.Beautifier=x},function(e,o,n){var l=n(6).Options;function r(i){l.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 t=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||t;var a=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var c=0;c<a.length;c++)a[c]!=="expand"?this.brace_style="collapse":this.brace_style=a[c]}r.prototype=new l,e.exports.Options=r}],s={};function _(e){var o=s[e];if(o!==void 0)return o.exports;var n=s[e]={exports:{}};return g[e](n,n.exports,_),n.exports}var p=_(15);T=p})();var y=T;!(I=[],v=function(){return{css_beautify:y}}.apply(H,I),v!==void 0&&(j.exports=v))})()},Tl6Z:function(j,H){j.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(j,H,b){},UbZX:function(j,H,b){j.exports=b.p+"static/success.2e2721eb.svg"},UlFV:function(j,H,b){},VPUa:function(j,H,b){j.exports=b.p+"static/passall.2673ac21.png"},VSMT:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.decodeUTF8=I,H.encodeUTF8=v;function I(T){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;try{return decodeURIComponent(escape(T))}catch(g){if(g instanceof URIError&&y)return T;throw g}}function v(T){return unescape(encodeURIComponent(T))}},Vbye:function(j,H,b){j.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"}},Vhoy:function(j,H,b){"use strict";b.d(H,"d",function(){return y}),b.d(H,"e",function(){return g}),b.d(H,"c",function(){return s}),b.d(H,"b",function(){return _}),b.d(H,"a",function(){return p});var I=b("MI8n");class v{constructor(){this._icons=new Map,this._onDidRegister=new I.b}add(e){const o=this._icons.get(e.id);o?e.description?o.description=e.description:console.error(`Duplicate registration of codicon ${e.id}`):(this._icons.set(e.id,e),this._onDidRegister.fire(e))}get(e){return this._icons.get(e)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const T=new v,y=T;function g(e,o){return new _(e,o)}function s(e){return e?e.replace(/\$\((.*?)\)/g,(o,n)=>` ${n} `).trim():""}class _{constructor(e,o,n){this.id=e,this.definition=o,this.description=n,T.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var p;(function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9\\-]+",e.iconModifierExpression="~[A-Za-z]+";const o=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function n(i){if(i instanceof _)return["codicon","codicon-"+i.id];const t=o.exec(i.id);if(!t)return n(_.error);let[,a,c]=t;const d=["codicon","codicon-"+a];return c&&d.push("codicon-modifier-"+c.substr(1)),d}e.asClassNameArray=n;function l(i){return n(i).join(" ")}e.asClassName=l;function r(i){return"."+n(i).join(".")}e.asCSSSelector=r})(p||(p={})),function(e){e.add=new e("add",{fontCharacter:"\\ea60"}),e.plus=new e("plus",e.add.definition),e.gistNew=new e("gist-new",e.add.definition),e.repoCreate=new e("repo-create",e.add.definition),e.lightbulb=new e("lightbulb",{fontCharacter:"\\ea61"}),e.lightBulb=new e("light-bulb",{fontCharacter:"\\ea61"}),e.repo=new e("repo",{fontCharacter:"\\ea62"}),e.repoDelete=new e("repo-delete",{fontCharacter:"\\ea62"}),e.gistFork=new e("gist-fork",{fontCharacter:"\\ea63"}),e.repoForked=new e("repo-forked",{fontCharacter:"\\ea63"}),e.gitPullRequest=new e("git-pull-request",{fontCharacter:"\\ea64"}),e.gitPullRequestAbandoned=new e("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),e.recordKeys=new e("record-keys",{fontCharacter:"\\ea65"}),e.keyboard=new e("keyboard",{fontCharacter:"\\ea65"}),e.tag=new e("tag",{fontCharacter:"\\ea66"}),e.tagAdd=new e("tag-add",{fontCharacter:"\\ea66"}),e.tagRemove=new e("tag-remove",{fontCharacter:"\\ea66"}),e.person=new e("person",{fontCharacter:"\\ea67"}),e.personFollow=new e("person-follow",{fontCharacter:"\\ea67"}),e.personOutline=new e("person-outline",{fontCharacter:"\\ea67"}),e.personFilled=new e("person-filled",{fontCharacter:"\\ea67"}),e.gitBranch=new e("git-branch",{fontCharacter:"\\ea68"}),e.gitBranchCreate=new e("git-branch-create",{fontCharacter:"\\ea68"}),e.gitBranchDelete=new e("git-branch-delete",{fontCharacter:"\\ea68"}),e.sourceControl=new e("source-control",{fontCharacter:"\\ea68"}),e.mirror=new e("mirror",{fontCharacter:"\\ea69"}),e.mirrorPublic=new e("mirror-public",{fontCharacter:"\\ea69"}),e.star=new e("star",{fontCharacter:"\\ea6a"}),e.starAdd=new e("star-add",{fontCharacter:"\\ea6a"}),e.starDelete=new e("star-delete",{fontCharacter:"\\ea6a"}),e.starEmpty=new e("star-empty",{fontCharacter:"\\ea6a"}),e.comment=new e("comment",{fontCharacter:"\\ea6b"}),e.commentAdd=new e("comment-add",{fontCharacter:"\\ea6b"}),e.alert=new e("alert",{fontCharacter:"\\ea6c"}),e.warning=new e("warning",{fontCharacter:"\\ea6c"}),e.search=new e("search",{fontCharacter:"\\ea6d"}),e.searchSave=new e("search-save",{fontCharacter:"\\ea6d"}),e.logOut=new e("log-out",{fontCharacter:"\\ea6e"}),e.signOut=new e("sign-out",{fontCharacter:"\\ea6e"}),e.logIn=new e("log-in",{fontCharacter:"\\ea6f"}),e.signIn=new e("sign-in",{fontCharacter:"\\ea6f"}),e.eye=new e("eye",{fontCharacter:"\\ea70"}),e.eyeUnwatch=new e("eye-unwatch",{fontCharacter:"\\ea70"}),e.eyeWatch=new e("eye-watch",{fontCharacter:"\\ea70"}),e.circleFilled=new e("circle-filled",{fontCharacter:"\\ea71"}),e.primitiveDot=new e("primitive-dot",{fontCharacter:"\\ea71"}),e.closeDirty=new e("close-dirty",{fontCharacter:"\\ea71"}),e.debugBreakpoint=new e("debug-breakpoint",{fontCharacter:"\\ea71"}),e.debugBreakpointDisabled=new e("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),e.debugHint=new e("debug-hint",{fontCharacter:"\\ea71"}),e.primitiveSquare=new e("primitive-square",{fontCharacter:"\\ea72"}),e.edit=new e("edit",{fontCharacter:"\\ea73"}),e.pencil=new e("pencil",{fontCharacter:"\\ea73"}),e.info=new e("info",{fontCharacter:"\\ea74"}),e.issueOpened=new e("issue-opened",{fontCharacter:"\\ea74"}),e.gistPrivate=new e("gist-private",{fontCharacter:"\\ea75"}),e.gitForkPrivate=new e("git-fork-private",{fontCharacter:"\\ea75"}),e.lock=new e("lock",{fontCharacter:"\\ea75"}),e.mirrorPrivate=new e("mirror-private",{fontCharacter:"\\ea75"}),e.close=new e("close",{fontCharacter:"\\ea76"}),e.removeClose=new e("remove-close",{fontCharacter:"\\ea76"}),e.x=new e("x",{fontCharacter:"\\ea76"}),e.repoSync=new e("repo-sync",{fontCharacter:"\\ea77"}),e.sync=new e("sync",{fontCharacter:"\\ea77"}),e.clone=new e("clone",{fontCharacter:"\\ea78"}),e.desktopDownload=new e("desktop-download",{fontCharacter:"\\ea78"}),e.beaker=new e("beaker",{fontCharacter:"\\ea79"}),e.microscope=new e("microscope",{fontCharacter:"\\ea79"}),e.vm=new e("vm",{fontCharacter:"\\ea7a"}),e.deviceDesktop=new e("device-desktop",{fontCharacter:"\\ea7a"}),e.file=new e("file",{fontCharacter:"\\ea7b"}),e.fileText=new e("file-text",{fontCharacter:"\\ea7b"}),e.more=new e("more",{fontCharacter:"\\ea7c"}),e.ellipsis=new e("ellipsis",{fontCharacter:"\\ea7c"}),e.kebabHorizontal=new e("kebab-horizontal",{fontCharacter:"\\ea7c"}),e.mailReply=new e("mail-reply",{fontCharacter:"\\ea7d"}),e.reply=new e("reply",{fontCharacter:"\\ea7d"}),e.organization=new e("organization",{fontCharacter:"\\ea7e"}),e.organizationFilled=new e("organization-filled",{fontCharacter:"\\ea7e"}),e.organizationOutline=new e("organization-outline",{fontCharacter:"\\ea7e"}),e.newFile=new e("new-file",{fontCharacter:"\\ea7f"}),e.fileAdd=new e("file-add",{fontCharacter:"\\ea7f"}),e.newFolder=new e("new-folder",{fontCharacter:"\\ea80"}),e.fileDirectoryCreate=new e("file-directory-create",{fontCharacter:"\\ea80"}),e.trash=new e("trash",{fontCharacter:"\\ea81"}),e.trashcan=new e("trashcan",{fontCharacter:"\\ea81"}),e.history=new e("history",{fontCharacter:"\\ea82"}),e.clock=new e("clock",{fontCharacter:"\\ea82"}),e.folder=new e("folder",{fontCharacter:"\\ea83"}),e.fileDirectory=new e("file-directory",{fontCharacter:"\\ea83"}),e.symbolFolder=new e("symbol-folder",{fontCharacter:"\\ea83"}),e.logoGithub=new e("logo-github",{fontCharacter:"\\ea84"}),e.markGithub=new e("mark-github",{fontCharacter:"\\ea84"}),e.github=new e("github",{fontCharacter:"\\ea84"}),e.terminal=new e("terminal",{fontCharacter:"\\ea85"}),e.console=new e("console",{fontCharacter:"\\ea85"}),e.repl=new e("repl",{fontCharacter:"\\ea85"}),e.zap=new e("zap",{fontCharacter:"\\ea86"}),e.symbolEvent=new e("symbol-event",{fontCharacter:"\\ea86"}),e.error=new e("error",{fontCharacter:"\\ea87"}),e.stop=new e("stop",{fontCharacter:"\\ea87"}),e.variable=new e("variable",{fontCharacter:"\\ea88"}),e.symbolVariable=new e("symbol-variable",{fontCharacter:"\\ea88"}),e.array=new e("array",{fontCharacter:"\\ea8a"}),e.symbolArray=new e("symbol-array",{fontCharacter:"\\ea8a"}),e.symbolModule=new e("symbol-module",{fontCharacter:"\\ea8b"}),e.symbolPackage=new e("symbol-package",{fontCharacter:"\\ea8b"}),e.symbolNamespace=new e("symbol-namespace",{fontCharacter:"\\ea8b"}),e.symbolObject=new e("symbol-object",{fontCharacter:"\\ea8b"}),e.symbolMethod=new e("symbol-method",{fontCharacter:"\\ea8c"}),e.symbolFunction=new e("symbol-function",{fontCharacter:"\\ea8c"}),e.symbolConstructor=new e("symbol-constructor",{fontCharacter:"\\ea8c"}),e.symbolBoolean=new e("symbol-boolean",{fontCharacter:"\\ea8f"}),e.symbolNull=new e("symbol-null",{fontCharacter:"\\ea8f"}),e.symbolNumeric=new e("symbol-numeric",{fontCharacter:"\\ea90"}),e.symbolNumber=new e("symbol-number",{fontCharacter:"\\ea90"}),e.symbolStructure=new e("symbol-structure",{fontCharacter:"\\ea91"}),e.symbolStruct=new e("symbol-struct",{fontCharacter:"\\ea91"}),e.symbolParameter=new e("symbol-parameter",{fontCharacter:"\\ea92"}),e.symbolTypeParameter=new e("symbol-type-parameter",{fontCharacter:"\\ea92"}),e.symbolKey=new e("symbol-key",{fontCharacter:"\\ea93"}),e.symbolText=new e("symbol-text",{fontCharacter:"\\ea93"}),e.symbolReference=new e("symbol-reference",{fontCharacter:"\\ea94"}),e.goToFile=new e("go-to-file",{fontCharacter:"\\ea94"}),e.symbolEnum=new e("symbol-enum",{fontCharacter:"\\ea95"}),e.symbolValue=new e("symbol-value",{fontCharacter:"\\ea95"}),e.symbolRuler=new e("symbol-ruler",{fontCharacter:"\\ea96"}),e.symbolUnit=new e("symbol-unit",{fontCharacter:"\\ea96"}),e.activateBreakpoints=new e("activate-breakpoints",{fontCharacter:"\\ea97"}),e.archive=new e("archive",{fontCharacter:"\\ea98"}),e.arrowBoth=new e("arrow-both",{fontCharacter:"\\ea99"}),e.arrowDown=new e("arrow-down",{fontCharacter:"\\ea9a"}),e.arrowLeft=new e("arrow-left",{fontCharacter:"\\ea9b"}),e.arrowRight=new e("arrow-right",{fontCharacter:"\\ea9c"}),e.arrowSmallDown=new e("arrow-small-down",{fontCharacter:"\\ea9d"}),e.arrowSmallLeft=new e("arrow-small-left",{fontCharacter:"\\ea9e"}),e.arrowSmallRight=new e("arrow-small-right",{fontCharacter:"\\ea9f"}),e.arrowSmallUp=new e("arrow-small-up",{fontCharacter:"\\eaa0"}),e.arrowUp=new e("arrow-up",{fontCharacter:"\\eaa1"}),e.bell=new e("bell",{fontCharacter:"\\eaa2"}),e.bold=new e("bold",{fontCharacter:"\\eaa3"}),e.book=new e("book",{fontCharacter:"\\eaa4"}),e.bookmark=new e("bookmark",{fontCharacter:"\\eaa5"}),e.debugBreakpointConditionalUnverified=new e("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),e.debugBreakpointConditional=new e("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),e.debugBreakpointConditionalDisabled=new e("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),e.debugBreakpointDataUnverified=new e("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),e.debugBreakpointData=new e("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),e.debugBreakpointDataDisabled=new e("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),e.debugBreakpointLogUnverified=new e("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),e.debugBreakpointLog=new e("debug-breakpoint-log",{fontCharacter:"\\eaab"}),e.debugBreakpointLogDisabled=new e("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),e.briefcase=new e("briefcase",{fontCharacter:"\\eaac"}),e.broadcast=new e("broadcast",{fontCharacter:"\\eaad"}),e.browser=new e("browser",{fontCharacter:"\\eaae"}),e.bug=new e("bug",{fontCharacter:"\\eaaf"}),e.calendar=new e("calendar",{fontCharacter:"\\eab0"}),e.caseSensitive=new e("case-sensitive",{fontCharacter:"\\eab1"}),e.check=new e("check",{fontCharacter:"\\eab2"}),e.checklist=new e("checklist",{fontCharacter:"\\eab3"}),e.chevronDown=new e("chevron-down",{fontCharacter:"\\eab4"}),e.dropDownButton=new e("drop-down-button",e.chevronDown.definition),e.chevronLeft=new e("chevron-left",{fontCharacter:"\\eab5"}),e.chevronRight=new e("chevron-right",{fontCharacter:"\\eab6"}),e.chevronUp=new e("chevron-up",{fontCharacter:"\\eab7"}),e.chromeClose=new e("chrome-close",{fontCharacter:"\\eab8"}),e.chromeMaximize=new e("chrome-maximize",{fontCharacter:"\\eab9"}),e.chromeMinimize=new e("chrome-minimize",{fontCharacter:"\\eaba"}),e.chromeRestore=new e("chrome-restore",{fontCharacter:"\\eabb"}),e.circleOutline=new e("circle-outline",{fontCharacter:"\\eabc"}),e.debugBreakpointUnverified=new e("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),e.circleSlash=new e("circle-slash",{fontCharacter:"\\eabd"}),e.circuitBoard=new e("circuit-board",{fontCharacter:"\\eabe"}),e.clearAll=new e("clear-all",{fontCharacter:"\\eabf"}),e.clippy=new e("clippy",{fontCharacter:"\\eac0"}),e.closeAll=new e("close-all",{fontCharacter:"\\eac1"}),e.cloudDownload=new e("cloud-download",{fontCharacter:"\\eac2"}),e.cloudUpload=new e("cloud-upload",{fontCharacter:"\\eac3"}),e.code=new e("code",{fontCharacter:"\\eac4"}),e.collapseAll=new e("collapse-all",{fontCharacter:"\\eac5"}),e.colorMode=new e("color-mode",{fontCharacter:"\\eac6"}),e.commentDiscussion=new e("comment-discussion",{fontCharacter:"\\eac7"}),e.compareChanges=new e("compare-changes",{fontCharacter:"\\eafd"}),e.creditCard=new e("credit-card",{fontCharacter:"\\eac9"}),e.dash=new e("dash",{fontCharacter:"\\eacc"}),e.dashboard=new e("dashboard",{fontCharacter:"\\eacd"}),e.database=new e("database",{fontCharacter:"\\eace"}),e.debugContinue=new e("debug-continue",{fontCharacter:"\\eacf"}),e.debugDisconnect=new e("debug-disconnect",{fontCharacter:"\\ead0"}),e.debugPause=new e("debug-pause",{fontCharacter:"\\ead1"}),e.debugRestart=new e("debug-restart",{fontCharacter:"\\ead2"}),e.debugStart=new e("debug-start",{fontCharacter:"\\ead3"}),e.debugStepInto=new e("debug-step-into",{fontCharacter:"\\ead4"}),e.debugStepOut=new e("debug-step-out",{fontCharacter:"\\ead5"}),e.debugStepOver=new e("debug-step-over",{fontCharacter:"\\ead6"}),e.debugStop=new e("debug-stop",{fontCharacter:"\\ead7"}),e.debug=new e("debug",{fontCharacter:"\\ead8"}),e.deviceCameraVideo=new e("device-camera-video",{fontCharacter:"\\ead9"}),e.deviceCamera=new e("device-camera",{fontCharacter:"\\eada"}),e.deviceMobile=new e("device-mobile",{fontCharacter:"\\eadb"}),e.diffAdded=new e("diff-added",{fontCharacter:"\\eadc"}),e.diffIgnored=new e("diff-ignored",{fontCharacter:"\\eadd"}),e.diffModified=new e("diff-modified",{fontCharacter:"\\eade"}),e.diffRemoved=new e("diff-removed",{fontCharacter:"\\eadf"}),e.diffRenamed=new e("diff-renamed",{fontCharacter:"\\eae0"}),e.diff=new e("diff",{fontCharacter:"\\eae1"}),e.discard=new e("discard",{fontCharacter:"\\eae2"}),e.editorLayout=new e("editor-layout",{fontCharacter:"\\eae3"}),e.emptyWindow=new e("empty-window",{fontCharacter:"\\eae4"}),e.exclude=new e("exclude",{fontCharacter:"\\eae5"}),e.extensions=new e("extensions",{fontCharacter:"\\eae6"}),e.eyeClosed=new e("eye-closed",{fontCharacter:"\\eae7"}),e.fileBinary=new e("file-binary",{fontCharacter:"\\eae8"}),e.fileCode=new e("file-code",{fontCharacter:"\\eae9"}),e.fileMedia=new e("file-media",{fontCharacter:"\\eaea"}),e.filePdf=new e("file-pdf",{fontCharacter:"\\eaeb"}),e.fileSubmodule=new e("file-submodule",{fontCharacter:"\\eaec"}),e.fileSymlinkDirectory=new e("file-symlink-directory",{fontCharacter:"\\eaed"}),e.fileSymlinkFile=new e("file-symlink-file",{fontCharacter:"\\eaee"}),e.fileZip=new e("file-zip",{fontCharacter:"\\eaef"}),e.files=new e("files",{fontCharacter:"\\eaf0"}),e.filter=new e("filter",{fontCharacter:"\\eaf1"}),e.flame=new e("flame",{fontCharacter:"\\eaf2"}),e.foldDown=new e("fold-down",{fontCharacter:"\\eaf3"}),e.foldUp=new e("fold-up",{fontCharacter:"\\eaf4"}),e.fold=new e("fold",{fontCharacter:"\\eaf5"}),e.folderActive=new e("folder-active",{fontCharacter:"\\eaf6"}),e.folderOpened=new e("folder-opened",{fontCharacter:"\\eaf7"}),e.gear=new e("gear",{fontCharacter:"\\eaf8"}),e.gift=new e("gift",{fontCharacter:"\\eaf9"}),e.gistSecret=new e("gist-secret",{fontCharacter:"\\eafa"}),e.gist=new e("gist",{fontCharacter:"\\eafb"}),e.gitCommit=new e("git-commit",{fontCharacter:"\\eafc"}),e.gitCompare=new e("git-compare",{fontCharacter:"\\eafd"}),e.gitMerge=new e("git-merge",{fontCharacter:"\\eafe"}),e.githubAction=new e("github-action",{fontCharacter:"\\eaff"}),e.githubAlt=new e("github-alt",{fontCharacter:"\\eb00"}),e.globe=new e("globe",{fontCharacter:"\\eb01"}),e.grabber=new e("grabber",{fontCharacter:"\\eb02"}),e.graph=new e("graph",{fontCharacter:"\\eb03"}),e.gripper=new e("gripper",{fontCharacter:"\\eb04"}),e.heart=new e("heart",{fontCharacter:"\\eb05"}),e.home=new e("home",{fontCharacter:"\\eb06"}),e.horizontalRule=new e("horizontal-rule",{fontCharacter:"\\eb07"}),e.hubot=new e("hubot",{fontCharacter:"\\eb08"}),e.inbox=new e("inbox",{fontCharacter:"\\eb09"}),e.issueClosed=new e("issue-closed",{fontCharacter:"\\eba4"}),e.issueReopened=new e("issue-reopened",{fontCharacter:"\\eb0b"}),e.issues=new e("issues",{fontCharacter:"\\eb0c"}),e.italic=new e("italic",{fontCharacter:"\\eb0d"}),e.jersey=new e("jersey",{fontCharacter:"\\eb0e"}),e.json=new e("json",{fontCharacter:"\\eb0f"}),e.kebabVertical=new e("kebab-vertical",{fontCharacter:"\\eb10"}),e.key=new e("key",{fontCharacter:"\\eb11"}),e.law=new e("law",{fontCharacter:"\\eb12"}),e.lightbulbAutofix=new e("lightbulb-autofix",{fontCharacter:"\\eb13"}),e.linkExternal=new e("link-external",{fontCharacter:"\\eb14"}),e.link=new e("link",{fontCharacter:"\\eb15"}),e.listOrdered=new e("list-ordered",{fontCharacter:"\\eb16"}),e.listUnordered=new e("list-unordered",{fontCharacter:"\\eb17"}),e.liveShare=new e("live-share",{fontCharacter:"\\eb18"}),e.loading=new e("loading",{fontCharacter:"\\eb19"}),e.location=new e("location",{fontCharacter:"\\eb1a"}),e.mailRead=new e("mail-read",{fontCharacter:"\\eb1b"}),e.mail=new e("mail",{fontCharacter:"\\eb1c"}),e.markdown=new e("markdown",{fontCharacter:"\\eb1d"}),e.megaphone=new e("megaphone",{fontCharacter:"\\eb1e"}),e.mention=new e("mention",{fontCharacter:"\\eb1f"}),e.milestone=new e("milestone",{fontCharacter:"\\eb20"}),e.mortarBoard=new e("mortar-board",{fontCharacter:"\\eb21"}),e.move=new e("move",{fontCharacter:"\\eb22"}),e.multipleWindows=new e("multiple-windows",{fontCharacter:"\\eb23"}),e.mute=new e("mute",{fontCharacter:"\\eb24"}),e.noNewline=new e("no-newline",{fontCharacter:"\\eb25"}),e.note=new e("note",{fontCharacter:"\\eb26"}),e.octoface=new e("octoface",{fontCharacter:"\\eb27"}),e.openPreview=new e("open-preview",{fontCharacter:"\\eb28"}),e.package_=new e("package",{fontCharacter:"\\eb29"}),e.paintcan=new e("paintcan",{fontCharacter:"\\eb2a"}),e.pin=new e("pin",{fontCharacter:"\\eb2b"}),e.play=new e("play",{fontCharacter:"\\eb2c"}),e.run=new e("run",{fontCharacter:"\\eb2c"}),e.plug=new e("plug",{fontCharacter:"\\eb2d"}),e.preserveCase=new e("preserve-case",{fontCharacter:"\\eb2e"}),e.preview=new e("preview",{fontCharacter:"\\eb2f"}),e.project=new e("project",{fontCharacter:"\\eb30"}),e.pulse=new e("pulse",{fontCharacter:"\\eb31"}),e.question=new e("question",{fontCharacter:"\\eb32"}),e.quote=new e("quote",{fontCharacter:"\\eb33"}),e.radioTower=new e("radio-tower",{fontCharacter:"\\eb34"}),e.reactions=new e("reactions",{fontCharacter:"\\eb35"}),e.references=new e("references",{fontCharacter:"\\eb36"}),e.refresh=new e("refresh",{fontCharacter:"\\eb37"}),e.regex=new e("regex",{fontCharacter:"\\eb38"}),e.remoteExplorer=new e("remote-explorer",{fontCharacter:"\\eb39"}),e.remote=new e("remote",{fontCharacter:"\\eb3a"}),e.remove=new e("remove",{fontCharacter:"\\eb3b"}),e.replaceAll=new e("replace-all",{fontCharacter:"\\eb3c"}),e.replace=new e("replace",{fontCharacter:"\\eb3d"}),e.repoClone=new e("repo-clone",{fontCharacter:"\\eb3e"}),e.repoForcePush=new e("repo-force-push",{fontCharacter:"\\eb3f"}),e.repoPull=new e("repo-pull",{fontCharacter:"\\eb40"}),e.repoPush=new e("repo-push",{fontCharacter:"\\eb41"}),e.report=new e("report",{fontCharacter:"\\eb42"}),e.requestChanges=new e("request-changes",{fontCharacter:"\\eb43"}),e.rocket=new e("rocket",{fontCharacter:"\\eb44"}),e.rootFolderOpened=new e("root-folder-opened",{fontCharacter:"\\eb45"}),e.rootFolder=new e("root-folder",{fontCharacter:"\\eb46"}),e.rss=new e("rss",{fontCharacter:"\\eb47"}),e.ruby=new e("ruby",{fontCharacter:"\\eb48"}),e.saveAll=new e("save-all",{fontCharacter:"\\eb49"}),e.saveAs=new e("save-as",{fontCharacter:"\\eb4a"}),e.save=new e("save",{fontCharacter:"\\eb4b"}),e.screenFull=new e("screen-full",{fontCharacter:"\\eb4c"}),e.screenNormal=new e("screen-normal",{fontCharacter:"\\eb4d"}),e.searchStop=new e("search-stop",{fontCharacter:"\\eb4e"}),e.server=new e("server",{fontCharacter:"\\eb50"}),e.settingsGear=new e("settings-gear",{fontCharacter:"\\eb51"}),e.settings=new e("settings",{fontCharacter:"\\eb52"}),e.shield=new e("shield",{fontCharacter:"\\eb53"}),e.smiley=new e("smiley",{fontCharacter:"\\eb54"}),e.sortPrecedence=new e("sort-precedence",{fontCharacter:"\\eb55"}),e.splitHorizontal=new e("split-horizontal",{fontCharacter:"\\eb56"}),e.splitVertical=new e("split-vertical",{fontCharacter:"\\eb57"}),e.squirrel=new e("squirrel",{fontCharacter:"\\eb58"}),e.starFull=new e("star-full",{fontCharacter:"\\eb59"}),e.starHalf=new e("star-half",{fontCharacter:"\\eb5a"}),e.symbolClass=new e("symbol-class",{fontCharacter:"\\eb5b"}),e.symbolColor=new e("symbol-color",{fontCharacter:"\\eb5c"}),e.symbolConstant=new e("symbol-constant",{fontCharacter:"\\eb5d"}),e.symbolEnumMember=new e("symbol-enum-member",{fontCharacter:"\\eb5e"}),e.symbolField=new e("symbol-field",{fontCharacter:"\\eb5f"}),e.symbolFile=new e("symbol-file",{fontCharacter:"\\eb60"}),e.symbolInterface=new e("symbol-interface",{fontCharacter:"\\eb61"}),e.symbolKeyword=new e("symbol-keyword",{fontCharacter:"\\eb62"}),e.symbolMisc=new e("symbol-misc",{fontCharacter:"\\eb63"}),e.symbolOperator=new e("symbol-operator",{fontCharacter:"\\eb64"}),e.symbolProperty=new e("symbol-property",{fontCharacter:"\\eb65"}),e.wrench=new e("wrench",{fontCharacter:"\\eb65"}),e.wrenchSubaction=new e("wrench-subaction",{fontCharacter:"\\eb65"}),e.symbolSnippet=new e("symbol-snippet",{fontCharacter:"\\eb66"}),e.tasklist=new e("tasklist",{fontCharacter:"\\eb67"}),e.telescope=new e("telescope",{fontCharacter:"\\eb68"}),e.textSize=new e("text-size",{fontCharacter:"\\eb69"}),e.threeBars=new e("three-bars",{fontCharacter:"\\eb6a"}),e.thumbsdown=new e("thumbsdown",{fontCharacter:"\\eb6b"}),e.thumbsup=new e("thumbsup",{fontCharacter:"\\eb6c"}),e.tools=new e("tools",{fontCharacter:"\\eb6d"}),e.triangleDown=new e("triangle-down",{fontCharacter:"\\eb6e"}),e.triangleLeft=new e("triangle-left",{fontCharacter:"\\eb6f"}),e.triangleRight=new e("triangle-right",{fontCharacter:"\\eb70"}),e.triangleUp=new e("triangle-up",{fontCharacter:"\\eb71"}),e.twitter=new e("twitter",{fontCharacter:"\\eb72"}),e.unfold=new e("unfold",{fontCharacter:"\\eb73"}),e.unlock=new e("unlock",{fontCharacter:"\\eb74"}),e.unmute=new e("unmute",{fontCharacter:"\\eb75"}),e.unverified=new e("unverified",{fontCharacter:"\\eb76"}),e.verified=new e("verified",{fontCharacter:"\\eb77"}),e.versions=new e("versions",{fontCharacter:"\\eb78"}),e.vmActive=new e("vm-active",{fontCharacter:"\\eb79"}),e.vmOutline=new e("vm-outline",{fontCharacter:"\\eb7a"}),e.vmRunning=new e("vm-running",{fontCharacter:"\\eb7b"}),e.watch=new e("watch",{fontCharacter:"\\eb7c"}),e.whitespace=new e("whitespace",{fontCharacter:"\\eb7d"}),e.wholeWord=new e("whole-word",{fontCharacter:"\\eb7e"}),e.window=new e("window",{fontCharacter:"\\eb7f"}),e.wordWrap=new e("word-wrap",{fontCharacter:"\\eb80"}),e.zoomIn=new e("zoom-in",{fontCharacter:"\\eb81"}),e.zoomOut=new e("zoom-out",{fontCharacter:"\\eb82"}),e.listFilter=new e("list-filter",{fontCharacter:"\\eb83"}),e.listFlat=new e("list-flat",{fontCharacter:"\\eb84"}),e.listSelection=new e("list-selection",{fontCharacter:"\\eb85"}),e.selection=new e("selection",{fontCharacter:"\\eb85"}),e.listTree=new e("list-tree",{fontCharacter:"\\eb86"}),e.debugBreakpointFunctionUnverified=new e("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),e.debugBreakpointFunction=new e("debug-breakpoint-function",{fontCharacter:"\\eb88"}),e.debugBreakpointFunctionDisabled=new e("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),e.debugStackframeActive=new e("debug-stackframe-active",{fontCharacter:"\\eb89"}),e.debugStackframeDot=new e("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),e.debugStackframe=new e("debug-stackframe",{fontCharacter:"\\eb8b"}),e.debugStackframeFocused=new e("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),e.debugBreakpointUnsupported=new e("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),e.symbolString=new e("symbol-string",{fontCharacter:"\\eb8d"}),e.debugReverseContinue=new e("debug-reverse-continue",{fontCharacter:"\\eb8e"}),e.debugStepBack=new e("debug-step-back",{fontCharacter:"\\eb8f"}),e.debugRestartFrame=new e("debug-restart-frame",{fontCharacter:"\\eb90"}),e.callIncoming=new e("call-incoming",{fontCharacter:"\\eb92"}),e.callOutgoing=new e("call-outgoing",{fontCharacter:"\\eb93"}),e.menu=new e("menu",{fontCharacter:"\\eb94"}),e.expandAll=new e("expand-all",{fontCharacter:"\\eb95"}),e.feedback=new e("feedback",{fontCharacter:"\\eb96"}),e.groupByRefType=new e("group-by-ref-type",{fontCharacter:"\\eb97"}),e.ungroupByRefType=new e("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),e.account=new e("account",{fontCharacter:"\\eb99"}),e.bellDot=new e("bell-dot",{fontCharacter:"\\eb9a"}),e.debugConsole=new e("debug-console",{fontCharacter:"\\eb9b"}),e.library=new e("library",{fontCharacter:"\\eb9c"}),e.output=new e("output",{fontCharacter:"\\eb9d"}),e.runAll=new e("run-all",{fontCharacter:"\\eb9e"}),e.syncIgnored=new e("sync-ignored",{fontCharacter:"\\eb9f"}),e.pinned=new e("pinned",{fontCharacter:"\\eba0"}),e.githubInverted=new e("github-inverted",{fontCharacter:"\\eba1"}),e.debugAlt=new e("debug-alt",{fontCharacter:"\\eb91"}),e.serverProcess=new e("server-process",{fontCharacter:"\\eba2"}),e.serverEnvironment=new e("server-environment",{fontCharacter:"\\eba3"}),e.pass=new e("pass",{fontCharacter:"\\eba4"}),e.stopCircle=new e("stop-circle",{fontCharacter:"\\eba5"}),e.playCircle=new e("play-circle",{fontCharacter:"\\eba6"}),e.record=new e("record",{fontCharacter:"\\eba7"}),e.debugAltSmall=new e("debug-alt-small",{fontCharacter:"\\eba8"}),e.vmConnect=new e("vm-connect",{fontCharacter:"\\eba9"}),e.cloud=new e("cloud",{fontCharacter:"\\ebaa"}),e.merge=new e("merge",{fontCharacter:"\\ebab"}),e.exportIcon=new e("export",{fontCharacter:"\\ebac"}),e.graphLeft=new e("graph-left",{fontCharacter:"\\ebad"}),e.magnet=new e("magnet",{fontCharacter:"\\ebae"}),e.notebook=new e("notebook",{fontCharacter:"\\ebaf"}),e.redo=new e("redo",{fontCharacter:"\\ebb0"}),e.checkAll=new e("check-all",{fontCharacter:"\\ebb1"}),e.pinnedDirty=new e("pinned-dirty",{fontCharacter:"\\ebb2"}),e.passFilled=new e("pass-filled",{fontCharacter:"\\ebb3"}),e.circleLargeFilled=new e("circle-large-filled",{fontCharacter:"\\ebb4"}),e.circleLargeOutline=new e("circle-large-outline",{fontCharacter:"\\ebb5"}),e.combine=new e("combine",{fontCharacter:"\\ebb6"}),e.gather=new e("gather",{fontCharacter:"\\ebb6"}),e.table=new e("table",{fontCharacter:"\\ebb7"}),e.variableGroup=new e("variable-group",{fontCharacter:"\\ebb8"}),e.typeHierarchy=new e("type-hierarchy",{fontCharacter:"\\ebb9"}),e.typeHierarchySub=new e("type-hierarchy-sub",{fontCharacter:"\\ebba"}),e.typeHierarchySuper=new e("type-hierarchy-super",{fontCharacter:"\\ebbb"}),e.gitPullRequestCreate=new e("git-pull-request-create",{fontCharacter:"\\ebbc"}),e.runAbove=new e("run-above",{fontCharacter:"\\ebbd"}),e.runBelow=new e("run-below",{fontCharacter:"\\ebbe"}),e.notebookTemplate=new e("notebook-template",{fontCharacter:"\\ebbf"}),e.debugRerun=new e("debug-rerun",{fontCharacter:"\\ebc0"}),e.workspaceTrusted=new e("workspace-trusted",{fontCharacter:"\\ebc1"}),e.workspaceUntrusted=new e("workspace-untrusted",{fontCharacter:"\\ebc2"}),e.workspaceUnspecified=new e("workspace-unspecified",{fontCharacter:"\\ebc3"}),e.terminalCmd=new e("terminal-cmd",{fontCharacter:"\\ebc4"}),e.terminalDebian=new e("terminal-debian",{fontCharacter:"\\ebc5"}),e.terminalLinux=new e("terminal-linux",{fontCharacter:"\\ebc6"}),e.terminalPowershell=new e("terminal-powershell",{fontCharacter:"\\ebc7"}),e.terminalTmux=new e("terminal-tmux",{fontCharacter:"\\ebc8"}),e.terminalUbuntu=new e("terminal-ubuntu",{fontCharacter:"\\ebc9"}),e.terminalBash=new e("terminal-bash",{fontCharacter:"\\ebca"}),e.arrowSwap=new e("arrow-swap",{fontCharacter:"\\ebcb"}),e.copy=new e("copy",{fontCharacter:"\\ebcc"}),e.personAdd=new e("person-add",{fontCharacter:"\\ebcd"}),e.filterFilled=new e("filter-filled",{fontCharacter:"\\ebce"}),e.wand=new e("wand",{fontCharacter:"\\ebcf"}),e.debugLineByLine=new e("debug-line-by-line",{fontCharacter:"\\ebd0"}),e.inspect=new e("inspect",{fontCharacter:"\\ebd1"}),e.layers=new e("layers",{fontCharacter:"\\ebd2"}),e.layersDot=new e("layers-dot",{fontCharacter:"\\ebd3"}),e.layersActive=new e("layers-active",{fontCharacter:"\\ebd4"}),e.compass=new e("compass",{fontCharacter:"\\ebd5"}),e.compassDot=new e("compass-dot",{fontCharacter:"\\ebd6"}),e.compassActive=new e("compass-active",{fontCharacter:"\\ebd7"}),e.azure=new e("azure",{fontCharacter:"\\ebd8"}),e.issueDraft=new e("issue-draft",{fontCharacter:"\\ebd9"}),e.gitPullRequestClosed=new e("git-pull-request-closed",{fontCharacter:"\\ebda"}),e.gitPullRequestDraft=new e("git-pull-request-draft",{fontCharacter:"\\ebdb"}),e.debugAll=new e("debug-all",{fontCharacter:"\\ebdc"}),e.debugCoverage=new e("debug-coverage",{fontCharacter:"\\ebdd"}),e.runErrors=new e("run-errors",{fontCharacter:"\\ebde"}),e.folderLibrary=new e("folder-library",{fontCharacter:"\\ebdf"}),e.debugContinueSmall=new e("debug-continue-small",{fontCharacter:"\\ebe0"}),e.beakerStop=new e("beaker-stop",{fontCharacter:"\\ebe1"}),e.graphLine=new e("graph-line",{fontCharacter:"\\ebe2"}),e.graphScatter=new e("graph-scatter",{fontCharacter:"\\ebe3"}),e.pieChart=new e("pie-chart",{fontCharacter:"\\ebe4"}),e.bracket=new e("bracket",e.json.definition),e.bracketDot=new e("bracket-dot",{fontCharacter:"\\ebe5"}),e.bracketError=new e("bracket-error",{fontCharacter:"\\ebe6"}),e.lockSmall=new e("lock-small",{fontCharacter:"\\ebe7"}),e.azureDevops=new e("azure-devops",{fontCharacter:"\\ebe8"}),e.verifiedFilled=new e("verified-filled",{fontCharacter:"\\ebe9"})}(_||(_={}))},VjRW:function(j,H){j.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(j,H,b){(function(I,v){j.exports=v()})(this,function(){"use strict";var I=navigator.userAgent,v=navigator.platform,T=/gecko\/\d/i.test(I),y=/MSIE \d/.test(I),g=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(I),s=/Edge\/(\d+)/.exec(I),_=y||g||s,p=_&&(y?document.documentMode||6:+(s||g)[1]),e=!s&&/WebKit\//.test(I),o=e&&/Qt\/\d+\.\d+/.test(I),n=!s&&/Chrome\//.test(I),l=/Opera\//.test(I),r=/Apple Computer/.test(navigator.vendor),i=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(I),t=/PhantomJS/.test(I),a=!s&&/AppleWebKit/.test(I)&&/Mobile\/\w+/.test(I),c=/Android/.test(I),d=a||c||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(I),f=a||/Mac/.test(v),h=/\bCrOS\b/.test(I),u=/win/i.test(v),E=l&&I.match(/Version\/(\d*\.\d*)/);E&&(E=Number(E[1])),E&&E>=15&&(l=!1,e=!0);var x=f&&(o||l&&(E==null||E<12.11)),O=T||_&&p>=9;function C(m){return new RegExp("(^|\\s)"+m+"(?:$|\\s)\\s*")}var w=function(m,R){var W=m.className,K=C(R).exec(W);if(K){var G=W.slice(K.index+K[0].length);m.className=W.slice(0,K.index)+(G?K[1]+G:"")}};function S(m){for(var R=m.childNodes.length;R>0;--R)m.removeChild(m.firstChild);return m}function A(m,R){return S(m).appendChild(R)}function D(m,R,W,K){var G=document.createElement(m);if(W&&(G.className=W),K&&(G.style.cssText=K),typeof R=="string")G.appendChild(document.createTextNode(R));else if(R)for(var $=0;$<R.length;++$)G.appendChild(R[$]);return G}function M(m,R,W,K){var G=D(m,R,W,K);return G.setAttribute("role","presentation"),G}var N;document.createRange?N=function(m,R,W,K){var G=document.createRange();return G.setEnd(K||m,W),G.setStart(m,R),G}:N=function(m,R,W){var K=document.body.createTextRange();try{K.moveToElementText(m.parentNode)}catch(G){return K}return K.collapse(!0),K.moveEnd("character",W),K.moveStart("character",R),K};function P(m,R){if(R.nodeType==3&&(R=R.parentNode),m.contains)return m.contains(R);do if(R.nodeType==11&&(R=R.host),R==m)return!0;while(R=R.parentNode)}function z(){var m;try{m=document.activeElement}catch(R){m=document.body||null}for(;m&&m.shadowRoot&&m.shadowRoot.activeElement;)m=m.shadowRoot.activeElement;return m}function X(m,R){var W=m.className;C(R).test(W)||(m.className+=(W?" ":"")+R)}function k(m,R){for(var W=m.split(" "),K=0;K<W.length;K++)W[K]&&!C(W[K]).test(R)&&(R+=" "+W[K]);return R}var F=function(m){m.select()};a?F=function(m){m.selectionStart=0,m.selectionEnd=m.value.length}:_&&(F=function(m){try{m.select()}catch(R){}});function U(m){var R=Array.prototype.slice.call(arguments,1);return function(){return m.apply(null,R)}}function L(m,R,W){R||(R={});for(var K in m)m.hasOwnProperty(K)&&(W!==!1||!R.hasOwnProperty(K))&&(R[K]=m[K]);return R}function B(m,R,W,K,G){R==null&&(R=m.search(/[^\s\u00a0]/),R==-1&&(R=m.length));for(var $=K||0,ye=G||0;;){var Ae=m.indexOf(" ",$);if(Ae<0||Ae>=R)return ye+(R-$);ye+=Ae-$,ye+=W-ye%W,$=Ae+1}}var Z=function(){this.id=null,this.f=null,this.time=0,this.handler=U(this.onTimeout,this)};Z.prototype.onTimeout=function(m){m.id=0,m.time<=+new Date?m.f():setTimeout(m.handler,m.time-+new Date)},Z.prototype.set=function(m,R){this.f=R;var W=+new Date+m;(!this.id||W<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,m),this.time=W)};function re(m,R){for(var W=0;W<m.length;++W)if(m[W]==R)return W;return-1}var he=50,Ce={toString:function(){return"CodeMirror.Pass"}},ke={scroll:!1},te={origin:"*mouse"},Re={origin:"+move"};function Te(m,R,W){for(var K=0,G=0;;){var $=m.indexOf(" ",K);$==-1&&($=m.length);var ye=$-K;if($==m.length||G+ye>=R)return K+Math.min(ye,R-G);if(G+=$-K,G+=W-G%W,K=$+1,G>=R)return K}}var pe=[""];function me(m){for(;pe.length<=m;)pe.push(se(pe)+" ");return pe[m]}function se(m){return m[m.length-1]}function be(m,R){for(var W=[],K=0;K<m.length;K++)W[K]=R(m[K],K);return W}function ae(m,R,W){for(var K=0,G=W(R);K<m.length&&W(m[K])<=G;)K++;m.splice(K,0,R)}function fe(){}function Fe(m,R){var W;return Object.create?W=Object.create(m):(fe.prototype=m,W=new fe),R&&L(R,W),W}var ie=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function q(m){return/\w/.test(m)||m>"\x80"&&(m.toUpperCase()!=m.toLowerCase()||ie.test(m))}function Q(m,R){return R?R.source.indexOf("\\w")>-1&&q(m)?!0:R.test(m):q(m)}function Y(m){for(var R in m)if(m.hasOwnProperty(R)&&m[R])return!1;return!0}var oe=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function le(m){return m.charCodeAt(0)>=768&&oe.test(m)}function Ee(m,R,W){for(;(W<0?R>0:R<m.length)&&le(m.charAt(R));)R+=W;return R}function Le(m,R,W){for(var K=R>W?-1:1;;){if(R==W)return R;var G=(R+W)/2,$=K<0?Math.ceil(G):Math.floor(G);if($==R)return m($)?R:W;m($)?W=$:R=$+K}}function ge(m,R,W,K){if(!m)return K(R,W,"ltr",0);for(var G=!1,$=0;$<m.length;++$){var ye=m[$];(ye.from<W&&ye.to>R||R==W&&ye.to==R)&&(K(Math.max(ye.from,R),Math.min(ye.to,W),ye.level==1?"rtl":"ltr",$),G=!0)}G||K(R,W,"ltr")}var De=null;function _e(m,R,W){var K;De=null;for(var G=0;G<m.length;++G){var $=m[G];if($.from<R&&$.to>R)return G;$.to==R&&($.from!=$.to&&W=="before"?K=G:De=G),$.from==R&&($.from!=$.to&&W!="before"?K=G:De=G)}return K!=null?K:De}var Xe=function(){var m="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",R="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function W(Ke){return Ke<=247?m.charAt(Ke):1424<=Ke&&Ke<=1524?"R":1536<=Ke&&Ke<=1785?R.charAt(Ke-1536):1774<=Ke&&Ke<=2220?"r":8192<=Ke&&Ke<=8203?"w":Ke==8204?"b":"L"}var K=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,G=/[stwN]/,$=/[LRr]/,ye=/[Lb1n]/,Ae=/[1n]/;function Ie(Ke,dt,bt){this.level=Ke,this.from=dt,this.to=bt}return function(Ke,dt){var bt=dt=="ltr"?"L":"R";if(Ke.length==0||dt=="ltr"&&!K.test(Ke))return!1;for(var Kt=Ke.length,Pt=[],tn=0;tn<Kt;++tn)Pt.push(W(Ke.charCodeAt(tn)));for(var un=0,Cn=bt;un<Kt;++un){var Fn=Pt[un];Fn=="m"?Pt[un]=Cn:Cn=Fn}for(var Zn=0,jn=bt;Zn<Kt;++Zn){var rr=Pt[Zn];rr=="1"&&jn=="r"?Pt[Zn]="n":$.test(rr)&&(jn=rr,rr=="r"&&(Pt[Zn]="R"))}for(var Rr=1,gr=Pt[0];Rr<Kt-1;++Rr){var ai=Pt[Rr];ai=="+"&&gr=="1"&&Pt[Rr+1]=="1"?Pt[Rr]="1":ai==","&&gr==Pt[Rr+1]&&(gr=="1"||gr=="n")&&(Pt[Rr]=gr),gr=ai}for(var ea=0;ea<Kt;++ea){var oo=Pt[ea];if(oo==",")Pt[ea]="N";else if(oo=="%"){var Ca=void 0;for(Ca=ea+1;Ca<Kt&&Pt[Ca]=="%";++Ca);for(var Ho=ea&&Pt[ea-1]=="!"||Ca<Kt&&Pt[Ca]=="1"?"1":"N",Po=ea;Po<Ca;++Po)Pt[Po]=Ho;ea=Ca-1}}for(var Va=0,No=bt;Va<Kt;++Va){var vo=Pt[Va];No=="L"&&vo=="1"?Pt[Va]="L":$.test(vo)&&(No=vo)}for(var no=0;no<Kt;++no)if(G.test(Pt[no])){var Ya=void 0;for(Ya=no+1;Ya<Kt&&G.test(Pt[Ya]);++Ya);for(var Ra=(no?Pt[no-1]:bt)=="L",Uo=(Ya<Kt?Pt[Ya]:bt)=="L",Pl=Ra==Uo?Ra?"L":"R":bt,al=no;al<Ya;++al)Pt[al]=Pl;no=Ya-1}for(var xo=[],Ts,so=0;so<Kt;)if(ye.test(Pt[so])){var $l=so;for(++so;so<Kt&&ye.test(Pt[so]);++so);xo.push(new Ie(0,$l,so))}else{var Us=so,xl=xo.length,wl=dt=="rtl"?1:0;for(++so;so<Kt&&Pt[so]!="L";++so);for(var To=Us;To<so;)if(Ae.test(Pt[To])){Us<To&&(xo.splice(xl,0,new Ie(1,Us,To)),xl+=wl);var Nl=To;for(++To;To<so&&Ae.test(Pt[To]);++To);xo.splice(xl,0,new Ie(2,Nl,To)),xl+=wl,Us=To}else++To;Us<so&&xo.splice(xl,0,new Ie(1,Us,so))}return dt=="ltr"&&(xo[0].level==1&&(Ts=Ke.match(/^\s+/))&&(xo[0].from=Ts[0].length,xo.unshift(new Ie(0,0,Ts[0].length))),se(xo).level==1&&(Ts=Ke.match(/\s+$/))&&(se(xo).to-=Ts[0].length,xo.push(new Ie(0,Kt-Ts[0].length,Kt)))),dt=="rtl"?xo.reverse():xo}}();function tt(m,R){var W=m.order;return W==null&&(W=m.order=Xe(m.text,R)),W}var ze=[],Me=function(m,R,W){if(m.addEventListener)m.addEventListener(R,W,!1);else if(m.attachEvent)m.attachEvent("on"+R,W);else{var K=m._handlers||(m._handlers={});K[R]=(K[R]||ze).concat(W)}};function Et(m,R){return m._handlers&&m._handlers[R]||ze}function Oe(m,R,W){if(m.removeEventListener)m.removeEventListener(R,W,!1);else if(m.detachEvent)m.detachEvent("on"+R,W);else{var K=m._handlers,G=K&&K[R];if(G){var $=re(G,W);$>-1&&(K[R]=G.slice(0,$).concat(G.slice($+1)))}}}function Ve(m,R){var W=Et(m,R);if(!W.length)return;for(var K=Array.prototype.slice.call(arguments,2),G=0;G<W.length;++G)W[G].apply(null,K)}function Je(m,R,W){return typeof R=="string"&&(R={type:R,preventDefault:function(){this.defaultPrevented=!0}}),Ve(m,W||R.type,m,R),de(R)||R.codemirrorIgnore}function Ye(m){var R=m._handlers&&m._handlers.cursorActivity;if(!R)return;for(var W=m.curOp.cursorActivityHandlers||(m.curOp.cursorActivityHandlers=[]),K=0;K<R.length;++K)re(W,R[K])==-1&&W.push(R[K])}function Pe(m,R){return Et(m,R).length>0}function He(m){m.prototype.on=function(R,W){Me(this,R,W)},m.prototype.off=function(R,W){Oe(this,R,W)}}function ve(m){m.preventDefault?m.preventDefault():m.returnValue=!1}function xe(m){m.stopPropagation?m.stopPropagation():m.cancelBubble=!0}function de(m){return m.defaultPrevented!=null?m.defaultPrevented:m.returnValue==!1}function je(m){ve(m),xe(m)}function Qe(m){return m.target||m.srcElement}function ne(m){var R=m.which;return R==null&&(m.button&1?R=1:m.button&2?R=3:m.button&4&&(R=2)),f&&m.ctrlKey&&R==1&&(R=3),R}var Ze=function(){if(_&&p<9)return!1;var m=D("div");return"draggable"in m||"dragDrop"in m}(),lt;function Be(m){if(lt==null){var R=D("span","\u200B");A(m,D("span",[R,document.createTextNode("x")])),m.firstChild.offsetHeight!=0&&(lt=R.offsetWidth<=1&&R.offsetHeight>2&&!(_&&p<8))}var W=lt?D("span","\u200B"):D("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return W.setAttribute("cm-text",""),W}var $e;function rt(m){if($e!=null)return $e;var R=A(m,document.createTextNode("A\u062EA")),W=N(R,0,1).getBoundingClientRect(),K=N(R,1,2).getBoundingClientRect();return S(m),!W||W.left==W.right?!1:$e=K.right-W.right<3}var xt=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(m){for(var R=0,W=[],K=m.length;R<=K;){var G=m.indexOf(`
|
|
|
`,R);G==-1&&(G=m.length);var $=m.slice(R,m.charAt(G-1)=="\r"?G-1:G),ye=$.indexOf("\r");ye!=-1?(W.push($.slice(0,ye)),R+=ye+1):(W.push($),R=G+1)}return W}:function(m){return m.split(/\r\n?|\n/)},ft=window.getSelection?function(m){try{return m.selectionStart!=m.selectionEnd}catch(R){return!1}}:function(m){var R;try{R=m.ownerDocument.selection.createRange()}catch(W){}return!R||R.parentElement()!=m?!1:R.compareEndPoints("StartToEnd",R)!=0},st=function(){var m=D("div");return"oncopy"in m?!0:(m.setAttribute("oncopy","return;"),typeof m.oncopy=="function")}(),Ne=null;function Ge(m){if(Ne!=null)return Ne;var R=A(m,D("span","x")),W=R.getBoundingClientRect(),K=N(R,0,1).getBoundingClientRect();return Ne=Math.abs(W.left-K.left)>1}var yt={},pt={};function jt(m,R){arguments.length>2&&(R.dependencies=Array.prototype.slice.call(arguments,2)),yt[m]=R}function Bt(m,R){pt[m]=R}function gt(m){if(typeof m=="string"&&pt.hasOwnProperty(m))m=pt[m];else if(m&&typeof m.name=="string"&&pt.hasOwnProperty(m.name)){var R=pt[m.name];typeof R=="string"&&(R={name:R}),m=Fe(R,m),m.name=R.name}else{if(typeof m=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(m))return gt("application/xml");if(typeof m=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(m))return gt("application/json")}return typeof m=="string"?{name:m}:m||{name:"null"}}function Ht(m,R){R=gt(R);var W=yt[R.name];if(!W)return Ht(m,"text/plain");var K=W(m,R);if(Ut.hasOwnProperty(R.name)){var G=Ut[R.name];for(var $ in G){if(!G.hasOwnProperty($))continue;K.hasOwnProperty($)&&(K["_"+$]=K[$]),K[$]=G[$]}}if(K.name=R.name,R.helperType&&(K.helperType=R.helperType),R.modeProps)for(var ye in R.modeProps)K[ye]=R.modeProps[ye];return K}var Ut={};function Nt(m,R){var W=Ut.hasOwnProperty(m)?Ut[m]:Ut[m]={};L(R,W)}function Wt(m,R){if(R===!0)return R;if(m.copyState)return m.copyState(R);var W={};for(var K in R){var G=R[K];G instanceof Array&&(G=G.concat([])),W[K]=G}return W}function Qt(m,R){for(var W;m.innerMode&&!(W=m.innerMode(R),!W||W.mode==m);)R=W.state,m=W.mode;return W||{mode:m,state:R}}function pn(m,R,W){return m.startState?m.startState(R,W):!0}var qt=function(m,R,W){this.pos=this.start=0,this.string=m,this.tabSize=R||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=W};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(m){var R=this.string.charAt(this.pos),W;if(typeof m=="string"?W=R==m:W=R&&(m.test?m.test(R):m(R)),W)return++this.pos,R},qt.prototype.eatWhile=function(m){for(var R=this.pos;this.eat(m););return this.pos>R},qt.prototype.eatSpace=function(){for(var m=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>m},qt.prototype.skipToEnd=function(){this.pos=this.string.length},qt.prototype.skipTo=function(m){var R=this.string.indexOf(m,this.pos);if(R>-1)return this.pos=R,!0},qt.prototype.backUp=function(m){this.pos-=m},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(m,R,W){if(typeof m=="string"){var K=function(ye){return W?ye.toLowerCase():ye},G=this.string.substr(this.pos,m.length);if(K(G)==K(m))return R!==!1&&(this.pos+=m.length),!0}else{var $=this.string.slice(this.pos).match(m);return $&&$.index>0?null:($&&R!==!1&&(this.pos+=$[0].length),$)}},qt.prototype.current=function(){return this.string.slice(this.start,this.pos)},qt.prototype.hideFirstChars=function(m,R){this.lineStart+=m;try{return R()}finally{this.lineStart-=m}},qt.prototype.lookAhead=function(m){var R=this.lineOracle;return R&&R.lookAhead(m)},qt.prototype.baseToken=function(){var m=this.lineOracle;return m&&m.baseToken(this.pos)};function en(m,R){if(R-=m.first,R<0||R>=m.size)throw new Error("There is no line "+(R+m.first)+" in the document.");for(var W=m;!W.lines;)for(var K=0;;++K){var G=W.children[K],$=G.chunkSize();if(R<$){W=G;break}R-=$}return W.lines[R]}function qn(m,R,W){var K=[],G=R.line;return m.iter(R.line,W.line+1,function($){var ye=$.text;G==W.line&&(ye=ye.slice(0,W.ch)),G==R.line&&(ye=ye.slice(R.ch)),K.push(ye),++G}),K}function $t(m,R,W){var K=[];return m.iter(R,W,function(G){K.push(G.text)}),K}function cn(m,R){var W=R-m.height;if(W)for(var K=m;K;K=K.parent)K.height+=W}function mn(m){if(m.parent==null)return null;for(var R=m.parent,W=re(R.lines,m),K=R.parent;K;R=K,K=K.parent)for(var G=0;!(K.children[G]==R);++G)W+=K.children[G].chunkSize();return W+R.first}function yn(m,R){var W=m.first;e:do{for(var K=0;K<m.children.length;++K){var G=m.children[K],$=G.height;if(R<$){m=G;continue e}R-=$,W+=G.chunkSize()}return W}while(!m.lines);for(var ye=0;ye<m.lines.length;++ye){var Ae=m.lines[ye],Ie=Ae.height;if(R<Ie)break;R-=Ie}return W+ye}function Vn(m,R){return R>=m.first&&R<m.first+m.size}function $n(m,R){return String(m.lineNumberFormatter(R+m.firstLineNumber))}function zt(m,R,W){if(W===void 0&&(W=null),!(this instanceof zt))return new zt(m,R,W);this.line=m,this.ch=R,this.sticky=W}function xn(m,R){return m.line-R.line||m.ch-R.ch}function wr(m,R){return m.sticky==R.sticky&&xn(m,R)==0}function nr(m){return zt(m.line,m.ch)}function Tn(m,R){return xn(m,R)<0?R:m}function Yn(m,R){return xn(m,R)<0?m:R}function ce(m,R){return Math.max(m.first,Math.min(R,m.first+m.size-1))}function V(m,R){if(R.line<m.first)return zt(m.first,0);var W=m.first+m.size-1;return R.line>W?zt(W,en(m,W).text.length):J(R,en(m,R.line).text.length)}function J(m,R){var W=m.ch;return W==null||W>R?zt(m.line,R):W<0?zt(m.line,0):m}function ee(m,R){for(var W=[],K=0;K<R.length;K++)W[K]=V(m,R[K]);return W}var Se=function(m,R){this.state=m,this.lookAhead=R},ue=function(m,R,W,K){this.state=R,this.doc=m,this.line=W,this.maxLookAhead=K||0,this.baseTokens=null,this.baseTokenPos=1};ue.prototype.lookAhead=function(m){var R=this.doc.getLine(this.line+m);return R!=null&&m>this.maxLookAhead&&(this.maxLookAhead=m),R},ue.prototype.baseToken=function(m){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=m;)this.baseTokenPos+=2;var R=this.baseTokens[this.baseTokenPos+1];return{type:R&&R.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-m}},ue.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ue.fromSaved=function(m,R,W){return R instanceof Se?new ue(m,Wt(m.mode,R.state),W,R.lookAhead):new ue(m,Wt(m.mode,R),W)},ue.prototype.save=function(m){var R=m!==!1?Wt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Se(R,this.maxLookAhead):R};function nt(m,R,W,K){var G=[m.state.modeGen],$={};lr(m,R.text,m.doc.mode,W,function(Ke,dt){return G.push(Ke,dt)},$,K);for(var ye=W.state,Ae=function(Ke){W.baseTokens=G;var dt=m.state.overlays[Ke],bt=1,Kt=0;W.state=!0,lr(m,R.text,dt.mode,W,function(Pt,tn){for(var un=bt;Kt<Pt;){var Cn=G[bt];Cn>Pt&&G.splice(bt,1,Pt,G[bt+1],Cn),bt+=2,Kt=Math.min(Pt,Cn)}if(!tn)return;if(dt.opaque)G.splice(un,bt-un,Pt,"overlay "+tn),bt=un+2;else for(;un<bt;un+=2){var Fn=G[un+1];G[un+1]=(Fn?Fn+" ":"")+"overlay "+tn}},$),W.state=ye,W.baseTokens=null,W.baseTokenPos=1},Ie=0;Ie<m.state.overlays.length;++Ie)Ae(Ie);return{styles:G,classes:$.bgClass||$.textClass?$:null}}function Dt(m,R,W){if(!R.styles||R.styles[0]!=m.state.modeGen){var K=Yt(m,mn(R)),G=R.text.length>m.options.maxHighlightLength&&Wt(m.doc.mode,K.state),$=nt(m,R,K);G&&(K.state=G),R.stateAfter=K.save(!G),R.styles=$.styles,$.classes?R.styleClasses=$.classes:R.styleClasses&&(R.styleClasses=null),W===m.doc.highlightFrontier&&(m.doc.modeFrontier=Math.max(m.doc.modeFrontier,++m.doc.highlightFrontier))}return R.styles}function Yt(m,R,W){var K=m.doc,G=m.display;if(!K.mode.startState)return new ue(K,!0,R);var $=Jn(m,R,W),ye=$>K.first&&en(K,$-1).stateAfter,Ae=ye?ue.fromSaved(K,ye,$):new ue(K,pn(K.mode),$);return K.iter($,R,function(Ie){an(m,Ie.text,Ae);var Ke=Ae.line;Ie.stateAfter=Ke==R-1||Ke%5==0||Ke>=G.viewFrom&&Ke<G.viewTo?Ae.save():null,Ae.nextLine()}),W&&(K.modeFrontier=Ae.line),Ae}function an(m,R,W,K){var G=m.doc.mode,$=new qt(R,m.options.tabSize,W);for($.start=$.pos=K||0,R==""&&Xt(G,W.state);!$.eol();)Rn(G,$,W.state),$.start=$.pos}function Xt(m,R){if(m.blankLine)return m.blankLine(R);if(!m.innerMode)return;var W=Qt(m,R);if(W.mode.blankLine)return W.mode.blankLine(W.state)}function Rn(m,R,W,K){for(var G=0;G<10;G++){K&&(K[0]=Qt(m,W).mode);var $=m.token(R,W);if(R.pos>R.start)return $}throw new Error("Mode "+m.name+" failed to advance stream.")}var Kn=function(m,R,W){this.start=m.start,this.end=m.pos,this.string=m.current(),this.type=R||null,this.state=W};function ar(m,R,W,K){var G=m.doc,$=G.mode,ye;R=V(G,R);var Ae=en(G,R.line),Ie=Yt(m,R.line,W),Ke=new qt(Ae.text,m.options.tabSize,Ie),dt;for(K&&(dt=[]);(K||Ke.pos<R.ch)&&!Ke.eol();)Ke.start=Ke.pos,ye=Rn($,Ke,Ie.state),K&&dt.push(new Kn(Ke,ye,Wt(G.mode,Ie.state)));return K?dt:new Kn(Ke,ye,Ie.state)}function vr(m,R){if(m)for(;;){var W=m.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!W)break;m=m.slice(0,W.index)+m.slice(W.index+W[0].length);var K=W[1]?"bgClass":"textClass";R[K]==null?R[K]=W[2]:new RegExp("(?:^|\\s)"+W[2]+"(?:$|\\s)").test(R[K])||(R[K]+=" "+W[2])}return m}function lr(m,R,W,K,G,$,ye){var Ae=W.flattenSpans;Ae==null&&(Ae=m.options.flattenSpans);var Ie=0,Ke=null,dt=new qt(R,m.options.tabSize,K),bt,Kt=m.options.addModeClass&&[null];for(R==""&&vr(Xt(W,K.state),$);!dt.eol();){if(dt.pos>m.options.maxHighlightLength?(Ae=!1,ye&&an(m,R,K,dt.pos),dt.pos=R.length,bt=null):bt=vr(Rn(W,dt,K.state,Kt),$),Kt){var Pt=Kt[0].name;Pt&&(bt="m-"+(bt?Pt+" "+bt:Pt))}if(!Ae||Ke!=bt){for(;Ie<dt.start;)Ie=Math.min(dt.start,Ie+5e3),G(Ie,Ke);Ke=bt}dt.start=dt.pos}for(;Ie<dt.pos;){var tn=Math.min(dt.pos,Ie+5e3);G(tn,Ke),Ie=tn}}function Jn(m,R,W){for(var K,G,$=m.doc,ye=W?-1:R-(m.doc.mode.innerMode?1e3:100),Ae=R;Ae>ye;--Ae){if(Ae<=$.first)return $.first;var Ie=en($,Ae-1),Ke=Ie.stateAfter;if(Ke&&(!W||Ae+(Ke instanceof Se?Ke.lookAhead:0)<=$.modeFrontier))return Ae;var dt=B(Ie.text,null,m.options.tabSize);(G==null||K>dt)&&(G=Ae-1,K=dt)}return G}function Tr(m,R){if(m.modeFrontier=Math.min(m.modeFrontier,R),m.highlightFrontier<R-10)return;for(var W=m.first,K=R-1;K>W;K--){var G=en(m,K).stateAfter;if(G&&(!(G instanceof Se)||K+G.lookAhead<R)){W=K+1;break}}m.highlightFrontier=Math.min(m.highlightFrontier,W)}var Ji=!1,Vr=!1;function oi(){Ji=!0}function pa(){Vr=!0}function Bi(m,R,W){this.marker=m,this.from=R,this.to=W}function ta(m,R){if(m)for(var W=0;W<m.length;++W){var K=m[W];if(K.marker==R)return K}}function Da(m,R){for(var W,K=0;K<m.length;++K)m[K]!=R&&(W||(W=[])).push(m[K]);return W}function _o(m,R){m.markedSpans=m.markedSpans?m.markedSpans.concat([R]):[R],R.marker.attachLine(m)}function lo(m,R,W){var K;if(m)for(var G=0;G<m.length;++G){var $=m[G],ye=$.marker,Ae=$.from==null||(ye.inclusiveLeft?$.from<=R:$.from<R);if(Ae||$.from==R&&ye.type=="bookmark"&&(!W||!$.marker.insertLeft)){var Ie=$.to==null||(ye.inclusiveRight?$.to>=R:$.to>R);(K||(K=[])).push(new Bi(ye,$.from,Ie?null:$.to))}}return K}function wo(m,R,W){var K;if(m)for(var G=0;G<m.length;++G){var $=m[G],ye=$.marker,Ae=$.to==null||(ye.inclusiveRight?$.to>=R:$.to>R);if(Ae||$.from==R&&ye.type=="bookmark"&&(!W||$.marker.insertLeft)){var Ie=$.from==null||(ye.inclusiveLeft?$.from<=R:$.from<R);(K||(K=[])).push(new Bi(ye,Ie?null:$.from-R,$.to==null?null:$.to-R))}}return K}function Fa(m,R){if(R.full)return null;var W=Vn(m,R.from.line)&&en(m,R.from.line).markedSpans,K=Vn(m,R.to.line)&&en(m,R.to.line).markedSpans;if(!W&&!K)return null;var G=R.from.ch,$=R.to.ch,ye=xn(R.from,R.to)==0,Ae=lo(W,G,ye),Ie=wo(K,$,ye),Ke=R.text.length==1,dt=se(R.text).length+(Ke?G:0);if(Ae)for(var bt=0;bt<Ae.length;++bt){var Kt=Ae[bt];if(Kt.to==null){var Pt=ta(Ie,Kt.marker);Pt?Ke&&(Kt.to=Pt.to==null?null:Pt.to+dt):Kt.to=G}}if(Ie)for(var tn=0;tn<Ie.length;++tn){var un=Ie[tn];if(un.to!=null&&(un.to+=dt),un.from==null){var Cn=ta(Ae,un.marker);Cn||(un.from=dt,Ke&&(Ae||(Ae=[])).push(un))}else un.from+=dt,Ke&&(Ae||(Ae=[])).push(un)}Ae&&(Ae=Gi(Ae)),Ie&&Ie!=Ae&&(Ie=Gi(Ie));var Fn=[Ae];if(!Ke){var Zn=R.text.length-2,jn;if(Zn>0&&Ae)for(var rr=0;rr<Ae.length;++rr)Ae[rr].to==null&&(jn||(jn=[])).push(new Bi(Ae[rr].marker,null,null));for(var Rr=0;Rr<Zn;++Rr)Fn.push(jn);Fn.push(Ie)}return Fn}function Gi(m){for(var R=0;R<m.length;++R){var W=m[R];W.from!=null&&W.from==W.to&&W.marker.clearWhenEmpty!==!1&&m.splice(R--,1)}return m.length?m:null}function Nr(m,R,W){var K=null;if(m.iter(R.line,W.line+1,function(Pt){if(Pt.markedSpans)for(var tn=0;tn<Pt.markedSpans.length;++tn){var un=Pt.markedSpans[tn].marker;un.readOnly&&(!K||re(K,un)==-1)&&(K||(K=[])).push(un)}}),!K)return null;for(var G=[{from:R,to:W}],$=0;$<K.length;++$)for(var ye=K[$],Ae=ye.find(0),Ie=0;Ie<G.length;++Ie){var Ke=G[Ie];if(xn(Ke.to,Ae.from)<0||xn(Ke.from,Ae.to)>0)continue;var dt=[Ie,1],bt=xn(Ke.from,Ae.from),Kt=xn(Ke.to,Ae.to);(bt<0||!ye.inclusiveLeft&&!bt)&&dt.push({from:Ke.from,to:Ae.from}),(Kt>0||!ye.inclusiveRight&&!Kt)&&dt.push({from:Ae.to,to:Ke.to}),G.splice.apply(G,dt),Ie+=dt.length-3}return G}function qr(m){var R=m.markedSpans;if(!R)return;for(var W=0;W<R.length;++W)R[W].marker.detachLine(m);m.markedSpans=null}function _i(m,R){if(!R)return;for(var W=0;W<R.length;++W)R[W].marker.attachLine(m);m.markedSpans=R}function Ur(m){return m.inclusiveLeft?-1:0}function Ar(m){return m.inclusiveRight?1:0}function ti(m,R){var W=m.lines.length-R.lines.length;if(W!=0)return W;var K=m.find(),G=R.find(),$=xn(K.from,G.from)||Ur(m)-Ur(R);if($)return-$;var ye=xn(K.to,G.to)||Ar(m)-Ar(R);return ye||R.id-m.id}function yr(m,R){var W=Vr&&m.markedSpans,K;if(W)for(var G=void 0,$=0;$<W.length;++$)G=W[$],G.marker.collapsed&&(R?G.from:G.to)==null&&(!K||ti(K,G.marker)<0)&&(K=G.marker);return K}function si(m){return yr(m,!0)}function cr(m){return yr(m,!1)}function Hi(m,R){var W=Vr&&m.markedSpans,K;if(W)for(var G=0;G<W.length;++G){var $=W[G];$.marker.collapsed&&($.from==null||$.from<R)&&($.to==null||$.to>R)&&(!K||ti(K,$.marker)<0)&&(K=$.marker)}return K}function Ni(m,R,W,K,G){var $=en(m,R),ye=Vr&&$.markedSpans;if(ye)for(var Ae=0;Ae<ye.length;++Ae){var Ie=ye[Ae];if(!Ie.marker.collapsed)continue;var Ke=Ie.marker.find(0),dt=xn(Ke.from,W)||Ur(Ie.marker)-Ur(G),bt=xn(Ke.to,K)||Ar(Ie.marker)-Ar(G);if(dt>=0&&bt<=0||dt<=0&&bt>=0)continue;if(dt<=0&&(Ie.marker.inclusiveRight&&G.inclusiveLeft?xn(Ke.to,W)>=0:xn(Ke.to,W)>0)||dt>=0&&(Ie.marker.inclusiveRight&&G.inclusiveLeft?xn(Ke.from,K)<=0:xn(Ke.from,K)<0))return!0}}function Zi(m){for(var R;R=si(m);)m=R.find(-1,!0).line;return m}function yo(m){for(var R;R=cr(m);)m=R.find(1,!0).line;return m}function Vi(m){for(var R,W;R=cr(m);)m=R.find(1,!0).line,(W||(W=[])).push(m);return W}function Qa(m,R){var W=en(m,R),K=Zi(W);return W==K?R:mn(K)}function ja(m,R){if(R>m.lastLine())return R;var W=en(m,R),K;if(!ni(m,W))return R;for(;K=cr(W);)W=K.find(1,!0).line;return mn(W)+1}function ni(m,R){var W=Vr&&R.markedSpans;if(W)for(var K=void 0,G=0;G<W.length;++G){if(K=W[G],!K.marker.collapsed)continue;if(K.from==null)return!0;if(K.marker.widgetNode)continue;if(K.from==0&&K.marker.inclusiveLeft&&Wo(m,R,K))return!0}}function Wo(m,R,W){if(W.to==null){var K=W.marker.find(1,!0);return Wo(m,K.line,ta(K.line.markedSpans,W.marker))}if(W.marker.inclusiveRight&&W.to==R.text.length)return!0;for(var G=void 0,$=0;$<R.markedSpans.length;++$)if(G=R.markedSpans[$],G.marker.collapsed&&!G.marker.widgetNode&&G.from==W.to&&(G.to==null||G.to!=W.from)&&(G.marker.inclusiveLeft||W.marker.inclusiveRight)&&Wo(m,R,G))return!0}function Ja(m){m=Zi(m);for(var R=0,W=m.parent,K=0;K<W.lines.length;++K){var G=W.lines[K];if(G==m)break;R+=G.height}for(var $=W.parent;$;W=$,$=W.parent)for(var ye=0;ye<$.children.length;++ye){var Ae=$.children[ye];if(Ae==W)break;R+=Ae.height}return R}function bo(m){if(m.height==0)return 0;for(var R=m.text.length,W,K=m;W=si(K);){var G=W.find(0,!0);K=G.from.line,R+=G.from.ch-G.to.ch}for(K=m;W=cr(K);){var $=W.find(0,!0);R-=K.text.length-$.from.ch,K=$.to.line,R+=K.text.length-$.to.ch}return R}function Ao(m){var R=m.display,W=m.doc;R.maxLine=en(W,W.first),R.maxLineLength=bo(R.maxLine),R.maxLineChanged=!0,W.iter(function(K){var G=bo(K);G>R.maxLineLength&&(R.maxLineLength=G,R.maxLine=K)})}var Za=function(m,R,W){this.text=m,_i(this,R),this.height=W?W(this):1};Za.prototype.lineNo=function(){return mn(this)},He(Za);function Xo(m,R,W,K){m.text=R,m.stateAfter&&(m.stateAfter=null),m.styles&&(m.styles=null),m.order!=null&&(m.order=null),qr(m),_i(m,W);var G=K?K(m):1;G!=m.height&&cn(m,G)}function er(m){m.parent=null,qr(m)}var _r={},tr={};function Mr(m,R){if(!m||/^\s*$/.test(m))return null;var W=R.addModeClass?tr:_r;return W[m]||(W[m]=m.replace(/\S+/g,"cm-$&"))}function Hr(m,R){var W=M("span",null,null,e?"padding-right: .1px":null),K={pre:M("pre",[W],"CodeMirror-line"),content:W,col:0,pos:0,cm:m,trailingSpace:!1,splitSpaces:m.getOption("lineWrapping")};R.measure={};for(var G=0;G<=(R.rest?R.rest.length:0);G++){var $=G?R.rest[G-1]:R.line,ye=void 0;K.pos=0,K.addToken=fr,rt(m.display.measure)&&(ye=tt($,m.doc.direction))&&(K.addToken=Ea(K.addToken,ye)),K.map=[];var Ae=R!=m.display.externalMeasured&&mn($);ro($,K,Dt(m,$,Ae)),$.styleClasses&&($.styleClasses.bgClass&&(K.bgClass=k($.styleClasses.bgClass,K.bgClass||"")),$.styleClasses.textClass&&(K.textClass=k($.styleClasses.textClass,K.textClass||""))),K.map.length==0&&K.map.push(0,0,K.content.appendChild(Be(m.display.measure))),G==0?(R.measure.map=K.map,R.measure.cache={}):((R.measure.maps||(R.measure.maps=[])).push(K.map),(R.measure.caches||(R.measure.caches=[])).push({}))}if(e){var Ie=K.content.lastChild;(/\bcm-tab\b/.test(Ie.className)||Ie.querySelector&&Ie.querySelector(".cm-tab"))&&(K.content.className="cm-tab-wrap-hack")}return Ve(m,"renderLine",m,R.line,K.pre),K.pre.className&&(K.textClass=k(K.pre.className,K.textClass||"")),K}function mi(m){var R=D("span","\u2022","cm-invalidchar");return R.title="\\u"+m.charCodeAt(0).toString(16),R.setAttribute("aria-label",R.title),R}function fr(m,R,W,K,G,$,ye){if(!R)return;var Ae=m.splitSpaces?Wi(R,m.trailingSpace):R,Ie=m.cm.state.specialChars,Ke=!1,dt;if(!Ie.test(R))m.col+=R.length,dt=document.createTextNode(Ae),m.map.push(m.pos,m.pos+R.length,dt),_&&p<9&&(Ke=!0),m.pos+=R.length;else{dt=document.createDocumentFragment();for(var bt=0;;){Ie.lastIndex=bt;var Kt=Ie.exec(R),Pt=Kt?Kt.index-bt:R.length-bt;if(Pt){var tn=document.createTextNode(Ae.slice(bt,bt+Pt));_&&p<9?dt.appendChild(D("span",[tn])):dt.appendChild(tn),m.map.push(m.pos,m.pos+Pt,tn),m.col+=Pt,m.pos+=Pt}if(!Kt)break;bt+=Pt+1;var un=void 0;if(Kt[0]==" "){var Cn=m.cm.options.tabSize,Fn=Cn-m.col%Cn;un=dt.appendChild(D("span",me(Fn),"cm-tab")),un.setAttribute("role","presentation"),un.setAttribute("cm-text"," "),m.col+=Fn}else Kt[0]=="\r"||Kt[0]==`
|
|
|
`?(un=dt.appendChild(D("span",Kt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),un.setAttribute("cm-text",Kt[0]),m.col+=1):(un=m.cm.options.specialCharPlaceholder(Kt[0]),un.setAttribute("cm-text",Kt[0]),_&&p<9?dt.appendChild(D("span",[un])):dt.appendChild(un),m.col+=1);m.map.push(m.pos,m.pos+1,un),m.pos++}}if(m.trailingSpace=Ae.charCodeAt(R.length-1)==32,W||K||G||Ke||$||ye){var Zn=W||"";K&&(Zn+=K),G&&(Zn+=G);var jn=D("span",[dt],Zn,$);if(ye)for(var rr in ye)ye.hasOwnProperty(rr)&&rr!="style"&&rr!="class"&&jn.setAttribute(rr,ye[rr]);return m.content.appendChild(jn)}m.content.appendChild(dt)}function Wi(m,R){if(m.length>1&&!/ /.test(m))return m;for(var W=R,K="",G=0;G<m.length;G++){var $=m.charAt(G);$==" "&&W&&(G==m.length-1||m.charCodeAt(G+1)==32)&&($="\xA0"),K+=$,W=$==" "}return K}function Ea(m,R){return function(W,K,G,$,ye,Ae,Ie){G=G?G+" cm-force-border":"cm-force-border";for(var Ke=W.pos,dt=Ke+K.length;;){for(var bt=void 0,Kt=0;Kt<R.length&&!(bt=R[Kt],bt.to>Ke&&bt.from<=Ke);Kt++);if(bt.to>=dt)return m(W,K,G,$,ye,Ae,Ie);m(W,K.slice(0,bt.to-Ke),G,$,null,Ae,Ie),$=null,K=K.slice(bt.to-Ke),Ke=bt.to}}}function jr(m,R,W,K){var G=!K&&W.widgetNode;G&&m.map.push(m.pos,m.pos+R,G),!K&&m.cm.display.input.needsContentAttribute&&(G||(G=m.content.appendChild(document.createElement("span"))),G.setAttribute("cm-marker",W.id)),G&&(m.cm.display.input.setUneditable(G),m.content.appendChild(G)),m.pos+=R,m.trailingSpace=!1}function ro(m,R,W){var K=m.markedSpans,G=m.text,$=0;if(!K){for(var ye=1;ye<W.length;ye+=2)R.addToken(R,G.slice($,$=W[ye]),Mr(W[ye+1],R.cm.options));return}for(var Ae=G.length,Ie=0,Ke=1,dt="",bt,Kt,Pt=0,tn,un,Cn,Fn,Zn;;){if(Pt==Ie){tn=un=Cn=Kt="",Zn=null,Fn=null,Pt=Infinity;for(var jn=[],rr=void 0,Rr=0;Rr<K.length;++Rr){var gr=K[Rr],ai=gr.marker;if(ai.type=="bookmark"&&gr.from==Ie&&ai.widgetNode)jn.push(ai);else if(gr.from<=Ie&&(gr.to==null||gr.to>Ie||ai.collapsed&&gr.to==Ie&&gr.from==Ie)){if(gr.to!=null&&gr.to!=Ie&&Pt>gr.to&&(Pt=gr.to,un=""),ai.className&&(tn+=" "+ai.className),ai.css&&(Kt=(Kt?Kt+";":"")+ai.css),ai.startStyle&&gr.from==Ie&&(Cn+=" "+ai.startStyle),ai.endStyle&&gr.to==Pt&&(rr||(rr=[])).push(ai.endStyle,gr.to),ai.title&&((Zn||(Zn={})).title=ai.title),ai.attributes)for(var ea in ai.attributes)(Zn||(Zn={}))[ea]=ai.attributes[ea];ai.collapsed&&(!Fn||ti(Fn.marker,ai)<0)&&(Fn=gr)}else gr.from>Ie&&Pt>gr.from&&(Pt=gr.from)}if(rr)for(var oo=0;oo<rr.length;oo+=2)rr[oo+1]==Pt&&(un+=" "+rr[oo]);if(!Fn||Fn.from==Ie)for(var Ca=0;Ca<jn.length;++Ca)jr(R,0,jn[Ca]);if(Fn&&(Fn.from||0)==Ie){if(jr(R,(Fn.to==null?Ae+1:Fn.to)-Ie,Fn.marker,Fn.from==null),Fn.to==null)return;Fn.to==Ie&&(Fn=!1)}}if(Ie>=Ae)break;for(var Ho=Math.min(Ae,Pt);;){if(dt){var Po=Ie+dt.length;if(!Fn){var Va=Po>Ho?dt.slice(0,Ho-Ie):dt;R.addToken(R,Va,bt?bt+tn:tn,Cn,Ie+Va.length==Pt?un:"",Kt,Zn)}if(Po>=Ho){dt=dt.slice(Ho-Ie),Ie=Ho;break}Ie=Po,Cn=""}dt=G.slice($,$=W[Ke++]),bt=Mr(W[Ke++],R.cm.options)}}}function ui(m,R,W){this.line=R,this.rest=Vi(R),this.size=this.rest?mn(se(this.rest))-W+1:1,this.node=this.text=null,this.hidden=ni(m,R)}function Oi(m,R,W){for(var K=[],G,$=R;$<W;$=G){var ye=new ui(m.doc,en(m.doc,$),$);G=$+ye.size,K.push(ye)}return K}var xa=null;function Ba(m){xa?xa.ops.push(m):m.ownsGroup=xa={ops:[m],delayedCallbacks:[]}}function zo(m){var R=m.delayedCallbacks,W=0;do{for(;W<R.length;W++)R[W].call(null);for(var K=0;K<m.ops.length;K++){var G=m.ops[K];if(G.cursorActivityHandlers)for(;G.cursorActivityCalled<G.cursorActivityHandlers.length;)G.cursorActivityHandlers[G.cursorActivityCalled++].call(null,G.cm)}}while(W<R.length)}function ci(m,R){var W=m.ownsGroup;if(!W)return;try{zo(W)}finally{xa=null,R(W)}}var Mn=null;function nn(m,R){var W=Et(m,R);if(!W.length)return;var K=Array.prototype.slice.call(arguments,2),G;xa?G=xa.delayedCallbacks:Mn?G=Mn:(G=Mn=[],setTimeout(Un,0));for(var $=function(Ae){G.push(function(){return W[Ae].apply(null,K)})},ye=0;ye<W.length;++ye)$(ye)}function Un(){var m=Mn;Mn=null;for(var R=0;R<m.length;++R)m[R]()}function En(m,R,W,K){for(var G=0;G<R.changes.length;G++){var $=R.changes[G];$=="text"?yi(m,R):$=="gutter"?Ui(m,R,W,K):$=="class"?Yi(m,R):$=="widget"&&Xi(m,R,K)}R.changes=null}function ur(m){return m.node==m.text&&(m.node=D("div",null,null,"position: relative"),m.text.parentNode&&m.text.parentNode.replaceChild(m.node,m.text),m.node.appendChild(m.text),_&&p<8&&(m.node.style.zIndex=2)),m.node}function Dr(m,R){var W=R.bgClass?R.bgClass+" "+(R.line.bgClass||""):R.line.bgClass;if(W&&(W+=" CodeMirror-linebackground"),R.background)W?R.background.className=W:(R.background.parentNode.removeChild(R.background),R.background=null);else if(W){var K=ur(R);R.background=K.insertBefore(D("div",null,W),K.firstChild),m.display.input.setUneditable(R.background)}}function di(m,R){var W=m.display.externalMeasured;return W&&W.line==R.line?(m.display.externalMeasured=null,R.measure=W.measure,W.built):Hr(m,R)}function yi(m,R){var W=R.text.className,K=di(m,R);R.text==R.node&&(R.node=K.pre),R.text.parentNode.replaceChild(K.pre,R.text),R.text=K.pre,K.bgClass!=R.bgClass||K.textClass!=R.textClass?(R.bgClass=K.bgClass,R.textClass=K.textClass,Yi(m,R)):W&&(R.text.className=W)}function Yi(m,R){Dr(m,R),R.line.wrapClass?ur(R).className=R.line.wrapClass:R.node!=R.text&&(R.node.className="");var W=R.textClass?R.textClass+" "+(R.line.textClass||""):R.line.textClass;R.text.className=W||""}function Ui(m,R,W,K){if(R.gutter&&(R.node.removeChild(R.gutter),R.gutter=null),R.gutterBackground&&(R.node.removeChild(R.gutterBackground),R.gutterBackground=null),R.line.gutterClass){var G=ur(R);R.gutterBackground=D("div",null,"CodeMirror-gutter-background "+R.line.gutterClass,"left: "+(m.options.fixedGutter?K.fixedPos:-K.gutterTotalWidth)+"px; width: "+K.gutterTotalWidth+"px"),m.display.input.setUneditable(R.gutterBackground),G.insertBefore(R.gutterBackground,R.text)}var $=R.line.gutterMarkers;if(m.options.lineNumbers||$){var ye=ur(R),Ae=R.gutter=D("div",null,"CodeMirror-gutter-wrapper","left: "+(m.options.fixedGutter?K.fixedPos:-K.gutterTotalWidth)+"px");if(m.display.input.setUneditable(Ae),ye.insertBefore(Ae,R.text),R.line.gutterClass&&(Ae.className+=" "+R.line.gutterClass),m.options.lineNumbers&&(!$||!$["CodeMirror-linenumbers"])&&(R.lineNumber=Ae.appendChild(D("div",$n(m.options,W),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+K.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+m.display.lineNumInnerWidth+"px"))),$)for(var Ie=0;Ie<m.display.gutterSpecs.length;++Ie){var Ke=m.display.gutterSpecs[Ie].className,dt=$.hasOwnProperty(Ke)&&$[Ke];dt&&Ae.appendChild(D("div",[dt],"CodeMirror-gutter-elt","left: "+K.gutterLeft[Ke]+"px; width: "+K.gutterWidth[Ke]+"px"))}}}function Xi(m,R,W){R.alignable&&(R.alignable=null);for(var K=C("CodeMirror-linewidget"),G=R.node.firstChild,$=void 0;G;G=$)$=G.nextSibling,K.test(G.className)&&R.node.removeChild(G);Ta(m,R,W)}function Oo(m,R,W,K){var G=di(m,R);return R.text=R.node=G.pre,G.bgClass&&(R.bgClass=G.bgClass),G.textClass&&(R.textClass=G.textClass),Yi(m,R),Ui(m,R,W,K),Ta(m,R,K),R.node}function Ta(m,R,W){if(Fs(m,R.line,R,W,!0),R.rest)for(var K=0;K<R.rest.length;K++)Fs(m,R.rest[K],R,W,!1)}function Fs(m,R,W,K,G){if(!R.widgets)return;for(var $=ur(W),ye=0,Ae=R.widgets;ye<Ae.length;++ye){var Ie=Ae[ye],Ke=D("div",[Ie.node],"CodeMirror-linewidget"+(Ie.className?" "+Ie.className:""));Ie.handleMouseEvents||Ke.setAttribute("cm-ignore-events","true"),ol(Ie,Ke,W,K),m.display.input.setUneditable(Ke),G&&Ie.above?$.insertBefore(Ke,W.gutter||W.text):$.appendChild(Ke),nn(Ie,"redraw")}}function ol(m,R,W,K){if(m.noHScroll){(W.alignable||(W.alignable=[])).push(R);var G=K.wrapperWidth;R.style.left=K.fixedPos+"px",m.coverGutter||(G-=K.gutterTotalWidth,R.style.paddingLeft=K.gutterTotalWidth+"px"),R.style.width=G+"px"}m.coverGutter&&(R.style.zIndex=5,R.style.position="relative",m.noHScroll||(R.style.marginLeft=-K.gutterTotalWidth+"px"))}function Aa(m){if(m.height!=null)return m.height;var R=m.doc.cm;if(!R)return 0;if(!P(document.body,m.node)){var W="position: relative;";m.coverGutter&&(W+="margin-left: -"+R.display.gutters.offsetWidth+"px;"),m.noHScroll&&(W+="width: "+R.display.wrapper.clientWidth+"px;"),A(R.display.measure,D("div",[m.node],null,W))}return m.height=m.node.parentNode.offsetHeight}function Go(m,R){for(var W=Qe(R);W!=m.wrapper;W=W.parentNode)if(!W||W.nodeType==1&&W.getAttribute("cm-ignore-events")=="true"||W.parentNode==m.sizer&&W!=m.mover)return!0}function sl(m){return m.lineSpace.offsetTop}function ot(m){return m.mover.offsetHeight-m.lineSpace.offsetHeight}function wt(m){if(m.cachedPaddingH)return m.cachedPaddingH;var R=A(m.measure,D("pre","x","CodeMirror-line-like")),W=window.getComputedStyle?window.getComputedStyle(R):R.currentStyle,K={left:parseInt(W.paddingLeft),right:parseInt(W.paddingRight)};return!isNaN(K.left)&&!isNaN(K.right)&&(m.cachedPaddingH=K),K}function Rt(m){return he-m.display.nativeBarWidth}function ut(m){return m.display.scroller.clientWidth-Rt(m)-m.display.barWidth}function Ue(m){return m.display.scroller.clientHeight-Rt(m)-m.display.barHeight}function et(m,R,W){var K=m.options.lineWrapping,G=K&&ut(m);if(!R.measure.heights||K&&R.measure.width!=G){var $=R.measure.heights=[];if(K){R.measure.width=G;for(var ye=R.text.firstChild.getClientRects(),Ae=0;Ae<ye.length-1;Ae++){var Ie=ye[Ae],Ke=ye[Ae+1];Math.abs(Ie.bottom-Ke.bottom)>2&&$.push((Ie.bottom+Ke.top)/2-W.top)}}$.push(W.bottom-W.top)}}function We(m,R,W){if(m.line==R)return{map:m.measure.map,cache:m.measure.cache};for(var K=0;K<m.rest.length;K++)if(m.rest[K]==R)return{map:m.measure.maps[K],cache:m.measure.caches[K]};for(var G=0;G<m.rest.length;G++)if(mn(m.rest[G])>W)return{map:m.measure.maps[G],cache:m.measure.caches[G],before:!0}}function ct(m,R){R=Zi(R);var W=mn(R),K=m.display.externalMeasured=new ui(m.doc,R,W);K.lineN=W;var G=K.built=Hr(m,K);return K.text=G.pre,A(m.display.lineMeasure,G.pre),K}function ht(m,R,W,K){return Mt(m,Tt(m,R),W,K)}function Ot(m,R){if(R>=m.display.viewFrom&&R<m.display.viewTo)return m.display.view[zi(m,R)];var W=m.display.externalMeasured;if(W&&R>=W.lineN&&R<W.lineN+W.size)return W}function Tt(m,R){var W=mn(R),K=Ot(m,W);K&&!K.text?K=null:K&&K.changes&&(En(m,K,W,na(m)),m.curOp.forceUpdate=!0),K||(K=ct(m,R));var G=We(K,R,W);return{line:R,view:K,rect:null,map:G.map,cache:G.cache,before:G.before,hasHeights:!1}}function Mt(m,R,W,K,G){R.before&&(W=-1);var $=W+(K||""),ye;return R.cache.hasOwnProperty($)?ye=R.cache[$]:(R.rect||(R.rect=R.view.text.getBoundingClientRect()),R.hasHeights||(et(m,R.view,R.rect),R.hasHeights=!0),ye=Pn(m,R,W,K),ye.bogus||(R.cache[$]=ye)),{left:ye.left,right:ye.right,top:G?ye.rtop:ye.top,bottom:G?ye.rbottom:ye.bottom}}var Jt={left:0,right:0,top:0,bottom:0};function dn(m,R,W){for(var K,G,$,ye,Ae,Ie,Ke=0;Ke<m.length;Ke+=3)if(Ae=m[Ke],Ie=m[Ke+1],R<Ae?(G=0,$=1,ye="left"):R<Ie?(G=R-Ae,$=G+1):(Ke==m.length-3||R==Ie&&m[Ke+3]>R)&&($=Ie-Ae,G=$-1,R>=Ie&&(ye="right")),G!=null){if(K=m[Ke+2],Ae==Ie&&W==(K.insertLeft?"left":"right")&&(ye=W),W=="left"&&G==0)for(;Ke&&m[Ke-2]==m[Ke-3]&&m[Ke-1].insertLeft;)K=m[(Ke-=3)+2],ye="left";if(W=="right"&&G==Ie-Ae)for(;Ke<m.length-3&&m[Ke+3]==m[Ke+4]&&!m[Ke+5].insertLeft;)K=m[(Ke+=3)+2],ye="right";break}return{node:K,start:G,end:$,collapse:ye,coverStart:Ae,coverEnd:Ie}}function fn(m,R){var W=Jt;if(R=="left")for(var K=0;K<m.length&&!((W=m[K]).left!=W.right);K++);else for(var G=m.length-1;G>=0&&!((W=m[G]).left!=W.right);G--);return W}function Pn(m,R,W,K){var G=dn(R.map,W,K),$=G.node,ye=G.start,Ae=G.end,Ie=G.collapse,Ke;if($.nodeType==3){for(var dt=0;dt<4;dt++){for(;ye&&le(R.line.text.charAt(G.coverStart+ye));)--ye;for(;G.coverStart+Ae<G.coverEnd&&le(R.line.text.charAt(G.coverStart+Ae));)++Ae;if(_&&p<9&&ye==0&&Ae==G.coverEnd-G.coverStart?Ke=$.parentNode.getBoundingClientRect():Ke=fn(N($,ye,Ae).getClientRects(),K),Ke.left||Ke.right||ye==0)break;Ae=ye,ye=ye-1,Ie="right"}_&&p<11&&(Ke=br(m.display.measure,Ke))}else{ye>0&&(Ie=K="right");var bt;m.options.lineWrapping&&(bt=$.getClientRects()).length>1?Ke=bt[K=="right"?bt.length-1:0]:Ke=$.getBoundingClientRect()}if(_&&p<9&&!ye&&(!Ke||!Ke.left&&!Ke.right)){var Kt=$.parentNode.getClientRects()[0];Kt?Ke={left:Kt.left,right:Kt.left+Ia(m.display),top:Kt.top,bottom:Kt.bottom}:Ke=Jt}for(var Pt=Ke.top-R.rect.top,tn=Ke.bottom-R.rect.top,un=(Pt+tn)/2,Cn=R.view.measure.heights,Fn=0;Fn<Cn.length-1&&!(un<Cn[Fn]);Fn++);var Zn=Fn?Cn[Fn-1]:0,jn=Cn[Fn],rr={left:(Ie=="right"?Ke.right:Ke.left)-R.rect.left,right:(Ie=="left"?Ke.left:Ke.right)-R.rect.left,top:Zn,bottom:jn};return!Ke.left&&!Ke.right&&(rr.bogus=!0),m.options.singleCursorHeightPerLine||(rr.rtop=Pt,rr.rbottom=tn),rr}function br(m,R){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Ge(m))return R;var W=screen.logicalXDPI/screen.deviceXDPI,K=screen.logicalYDPI/screen.deviceYDPI;return{left:R.left*W,right:R.right*W,top:R.top*K,bottom:R.bottom*K}}function Yr(m){if(m.measure&&(m.measure.cache={},m.measure.heights=null,m.rest))for(var R=0;R<m.rest.length;R++)m.measure.caches[R]={}}function Pr(m){m.display.externalMeasure=null,S(m.display.lineMeasure);for(var R=0;R<m.display.view.length;R++)Yr(m.display.view[R])}function Wr(m){Pr(m),m.display.cachedCharWidth=m.display.cachedTextHeight=m.display.cachedPaddingH=null,m.options.lineWrapping||(m.display.maxLineChanged=!0),m.display.lineNumChars=null}function Qr(){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(m){var R=0;if(m.widgets)for(var W=0;W<m.widgets.length;++W)m.widgets[W].above&&(R+=Aa(m.widgets[W]));return R}function li(m,R,W,K,G){if(!G){var $=zr(R);W.top+=$,W.bottom+=$}if(K=="line")return W;K||(K="local");var ye=Ja(R);if(K=="local"?ye+=sl(m.display):ye-=m.display.viewOffset,K=="page"||K=="window"){var Ae=m.display.lineSpace.getBoundingClientRect();ye+=Ae.top+(K=="window"?0:Xr());var Ie=Ae.left+(K=="window"?0:Qr());W.left+=Ie,W.right+=Ie}return W.top+=ye,W.bottom+=ye,W}function $r(m,R,W){if(W=="div")return R;var K=R.left,G=R.top;if(W=="page")K-=Qr(),G-=Xr();else if(W=="local"||!W){var $=m.display.sizer.getBoundingClientRect();K+=$.left,G+=$.top}var ye=m.display.lineSpace.getBoundingClientRect();return{left:K-ye.left,top:G-ye.top}}function Qi(m,R,W,K,G){return K||(K=en(m.doc,R.line)),li(m,K,ht(m,K,R.ch,G),W)}function ei(m,R,W,K,G,$){K=K||en(m.doc,R.line),G||(G=Tt(m,K));function ye(tn,un){var Cn=Mt(m,G,tn,un?"right":"left",$);return un?Cn.left=Cn.right:Cn.right=Cn.left,li(m,K,Cn,W)}var Ae=tt(K,m.doc.direction),Ie=R.ch,Ke=R.sticky;if(Ie>=K.text.length?(Ie=K.text.length,Ke="before"):Ie<=0&&(Ie=0,Ke="after"),!Ae)return ye(Ke=="before"?Ie-1:Ie,Ke=="before");function dt(tn,un,Cn){var Fn=Ae[un],Zn=Fn.level==1;return ye(Cn?tn-1:tn,Zn!=Cn)}var bt=_e(Ae,Ie,Ke),Kt=De,Pt=dt(Ie,bt,Ke=="before");return Kt!=null&&(Pt.other=dt(Ie,Kt,Ke!="before")),Pt}function pr(m,R){var W=0;R=V(m.doc,R),m.options.lineWrapping||(W=Ia(m.display)*R.ch);var K=en(m.doc,R.line),G=Ja(K)+sl(m.display);return{left:W,right:W,top:G,bottom:G+K.height}}function hr(m,R,W,K,G){var $=zt(m,R,W);return $.xRel=G,K&&($.outside=K),$}function ri(m,R,W){var K=m.doc;if(W+=m.display.viewOffset,W<0)return hr(K.first,0,null,-1,-1);var G=yn(K,W),$=K.first+K.size-1;if(G>$)return hr(K.first+K.size-1,en(K,$).text.length,null,1,1);R<0&&(R=0);for(var ye=en(K,G);;){var Ae=qi(m,ye,G,R,W),Ie=Hi(ye,Ae.ch+(Ae.xRel>0||Ae.outside>0?1:0));if(!Ie)return Ae;var Ke=Ie.find(1);if(Ke.line==G)return Ke;ye=en(K,G=Ke.line)}}function hi(m,R,W,K){K-=zr(R);var G=R.text.length,$=Le(function(ye){return Mt(m,W,ye-1).bottom<=K},G,0);return G=Le(function(ye){return Mt(m,W,ye).top>K},$,G),{begin:$,end:G}}function ir(m,R,W,K){W||(W=Tt(m,R));var G=li(m,R,Mt(m,W,K),"line").top;return hi(m,R,W,G)}function gi(m,R,W,K){return m.bottom<=W?!1:m.top>W?!0:(K?m.left:m.right)>R}function qi(m,R,W,K,G){G-=Ja(R);var $=Tt(m,R),ye=zr(R),Ae=0,Ie=R.text.length,Ke=!0,dt=tt(R,m.doc.direction);if(dt){var bt=(m.options.lineWrapping?Ti:bi)(m,R,W,$,dt,K,G);Ke=bt.level!=1,Ae=Ke?bt.from:bt.to-1,Ie=Ke?bt.to:bt.from-1}var Kt=null,Pt=null,tn=Le(function(Rr){var gr=Mt(m,$,Rr);return gr.top+=ye,gr.bottom+=ye,gi(gr,K,G,!1)?(gr.top<=G&&gr.left<=K&&(Kt=Rr,Pt=gr),!0):!1},Ae,Ie),un,Cn,Fn=!1;if(Pt){var Zn=K-Pt.left<Pt.right-K,jn=Zn==Ke;tn=Kt+(jn?0:1),Cn=jn?"after":"before",un=Zn?Pt.left:Pt.right}else{!Ke&&(tn==Ie||tn==Ae)&&tn++,Cn=tn==0?"after":tn==R.text.length?"before":Mt(m,$,tn-(Ke?1:0)).bottom+ye<=G==Ke?"after":"before";var rr=ei(m,zt(W,tn,Cn),"line",R,$);un=rr.left,Fn=G<rr.top?-1:G>=rr.bottom?1:0}return tn=Ee(R.text,tn,1),hr(W,tn,Cn,Fn,K-un)}function bi(m,R,W,K,G,$,ye){var Ae=Le(function(bt){var Kt=G[bt],Pt=Kt.level!=1;return gi(ei(m,zt(W,Pt?Kt.to:Kt.from,Pt?"before":"after"),"line",R,K),$,ye,!0)},0,G.length-1),Ie=G[Ae];if(Ae>0){var Ke=Ie.level!=1,dt=ei(m,zt(W,Ke?Ie.from:Ie.to,Ke?"after":"before"),"line",R,K);gi(dt,$,ye,!0)&&dt.top>ye&&(Ie=G[Ae-1])}return Ie}function Ti(m,R,W,K,G,$,ye){var Ae=hi(m,R,K,ye),Ie=Ae.begin,Ke=Ae.end;/\s/.test(R.text.charAt(Ke-1))&&Ke--;for(var dt=null,bt=null,Kt=0;Kt<G.length;Kt++){var Pt=G[Kt];if(Pt.from>=Ke||Pt.to<=Ie)continue;var tn=Pt.level!=1,un=Mt(m,K,tn?Math.min(Ke,Pt.to)-1:Math.max(Ie,Pt.from)).right,Cn=un<$?$-un+1e9:un-$;(!dt||bt>Cn)&&(dt=Pt,bt=Cn)}return dt||(dt=G[G.length-1]),dt.from<Ie&&(dt={from:Ie,to:dt.to,level:dt.level}),dt.to>Ke&&(dt={from:dt.from,to:Ke,level:dt.level}),dt}var Li;function ma(m){if(m.cachedTextHeight!=null)return m.cachedTextHeight;if(Li==null){Li=D("pre",null,"CodeMirror-line-like");for(var R=0;R<49;++R)Li.appendChild(document.createTextNode("x")),Li.appendChild(D("br"));Li.appendChild(document.createTextNode("x"))}A(m.measure,Li);var W=Li.offsetHeight/50;return W>3&&(m.cachedTextHeight=W),S(m.measure),W||1}function Ia(m){if(m.cachedCharWidth!=null)return m.cachedCharWidth;var R=D("span","xxxxxxxxxx"),W=D("pre",[R],"CodeMirror-line-like");A(m.measure,W);var K=R.getBoundingClientRect(),G=(K.right-K.left)/10;return G>2&&(m.cachedCharWidth=G),G||10}function na(m){for(var R=m.display,W={},K={},G=R.gutters.clientLeft,$=R.gutters.firstChild,ye=0;$;$=$.nextSibling,++ye){var Ae=m.display.gutterSpecs[ye].className;W[Ae]=$.offsetLeft+$.clientLeft+G,K[Ae]=$.clientWidth}return{fixedPos:io(R),gutterTotalWidth:R.gutters.offsetWidth,gutterLeft:W,gutterWidth:K,wrapperWidth:R.wrapper.clientWidth}}function io(m){return m.scroller.getBoundingClientRect().left-m.sizer.getBoundingClientRect().left}function Ro(m){var R=ma(m.display),W=m.options.lineWrapping,K=W&&Math.max(5,m.display.scroller.clientWidth/Ia(m.display)-3);return function(G){if(ni(m.doc,G))return 0;var $=0;if(G.widgets)for(var ye=0;ye<G.widgets.length;ye++)G.widgets[ye].height&&($+=G.widgets[ye].height);return W?$+(Math.ceil(G.text.length/K)||1)*R:$+R}}function Eo(m){var R=m.doc,W=Ro(m);R.iter(function(K){var G=W(K);G!=K.height&&cn(K,G)})}function ka(m,R,W,K){var G=m.display;if(!W&&Qe(R).getAttribute("cm-not-content")=="true")return null;var $,ye,Ae=G.lineSpace.getBoundingClientRect();try{$=R.clientX-Ae.left,ye=R.clientY-Ae.top}catch(bt){return null}var Ie=ri(m,$,ye),Ke;if(K&&Ie.xRel>0&&(Ke=en(m.doc,Ie.line).text).length==Ie.ch){var dt=B(Ke,Ke.length,m.options.tabSize)-Ke.length;Ie=zt(Ie.line,Math.max(0,Math.round(($-wt(m.display).left)/Ia(m.display))-dt))}return Ie}function zi(m,R){if(R>=m.display.viewTo)return null;if(R-=m.display.viewFrom,R<0)return null;for(var W=m.display.view,K=0;K<W.length;K++)if(R-=W[K].size,R<0)return K}function Ki(m,R,W,K){R==null&&(R=m.doc.first),W==null&&(W=m.doc.first+m.doc.size),K||(K=0);var G=m.display;if(K&&W<G.viewTo&&(G.updateLineNumbers==null||G.updateLineNumbers>R)&&(G.updateLineNumbers=R),m.curOp.viewChanged=!0,R>=G.viewTo)Vr&&Qa(m.doc,R)<G.viewTo&&$i(m);else if(W<=G.viewFrom)Vr&&ja(m.doc,W+K)>G.viewFrom?$i(m):(G.viewFrom+=K,G.viewTo+=K);else if(R<=G.viewFrom&&W>=G.viewTo)$i(m);else if(R<=G.viewFrom){var $=Do(m,W,W+K,1);$?(G.view=G.view.slice($.index),G.viewFrom=$.lineN,G.viewTo+=K):$i(m)}else if(W>=G.viewTo){var ye=Do(m,R,R,-1);ye?(G.view=G.view.slice(0,ye.index),G.viewTo=ye.lineN):$i(m)}else{var Ae=Do(m,R,R,-1),Ie=Do(m,W,W+K,1);Ae&&Ie?(G.view=G.view.slice(0,Ae.index).concat(Oi(m,Ae.lineN,Ie.lineN)).concat(G.view.slice(Ie.index)),G.viewTo+=K):$i(m)}var Ke=G.externalMeasured;Ke&&(W<Ke.lineN?Ke.lineN+=K:R<Ke.lineN+Ke.size&&(G.externalMeasured=null))}function ra(m,R,W){m.curOp.viewChanged=!0;var K=m.display,G=m.display.externalMeasured;if(G&&R>=G.lineN&&R<G.lineN+G.size&&(K.externalMeasured=null),R<K.viewFrom||R>=K.viewTo)return;var $=K.view[zi(m,R)];if($.node==null)return;var ye=$.changes||($.changes=[]);re(ye,W)==-1&&ye.push(W)}function $i(m){m.display.viewFrom=m.display.viewTo=m.doc.first,m.display.view=[],m.display.viewOffset=0}function Do(m,R,W,K){var G=zi(m,R),$,ye=m.display.view;if(!Vr||W==m.doc.first+m.doc.size)return{index:G,lineN:W};for(var Ae=m.display.viewFrom,Ie=0;Ie<G;Ie++)Ae+=ye[Ie].size;if(Ae!=R){if(K>0){if(G==ye.length-1)return null;$=Ae+ye[G].size-R,G++}else $=Ae-R;R+=$,W+=$}for(;Qa(m.doc,W)!=W;){if(G==(K<0?0:ye.length-1))return null;W+=K*ye[G-(K<0?1:0)].size,G+=K}return{index:G,lineN:W}}function Yo(m,R,W){var K=m.display,G=K.view;G.length==0||R>=K.viewTo||W<=K.viewFrom?(K.view=Oi(m,R,W),K.viewFrom=R):(K.viewFrom>R?K.view=Oi(m,R,K.viewFrom).concat(K.view):K.viewFrom<R&&(K.view=K.view.slice(zi(m,R))),K.viewFrom=R,K.viewTo<W?K.view=K.view.concat(Oi(m,K.viewTo,W)):K.viewTo>W&&(K.view=K.view.slice(0,zi(m,W)))),K.viewTo=W}function Qo(m){for(var R=m.display.view,W=0,K=0;K<R.length;K++){var G=R[K];!G.hidden&&(!G.node||G.changes)&&++W}return W}function Mi(m){m.display.input.showSelection(m.display.input.prepareSelection())}function Vo(m,R){R===void 0&&(R=!0);for(var W=m.doc,K={},G=K.cursors=document.createDocumentFragment(),$=K.selection=document.createDocumentFragment(),ye=0;ye<W.sel.ranges.length;ye++){if(!R&&ye==W.sel.primIndex)continue;var Ae=W.sel.ranges[ye];if(Ae.from().line>=m.display.viewTo||Ae.to().line<m.display.viewFrom)continue;var Ie=Ae.empty();(Ie||m.options.showCursorWhenSelecting)&&Jo(m,Ae.head,G),Ie||Ri(m,Ae,$)}return K}function Jo(m,R,W){var K=ei(m,R,"div",null,null,!m.options.singleCursorHeightPerLine),G=W.appendChild(D("div","\xA0","CodeMirror-cursor"));if(G.style.left=K.left+"px",G.style.top=K.top+"px",G.style.height=Math.max(0,K.bottom-K.top)*m.options.cursorHeight+"px",K.other){var $=W.appendChild(D("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));$.style.display="",$.style.left=K.other.left+"px",$.style.top=K.other.top+"px",$.style.height=(K.other.bottom-K.other.top)*.85+"px"}}function Fi(m,R){return m.top-R.top||m.left-R.left}function Ri(m,R,W){var K=m.display,G=m.doc,$=document.createDocumentFragment(),ye=wt(m.display),Ae=ye.left,Ie=Math.max(K.sizerWidth,ut(m)-K.sizer.offsetLeft)-ye.right,Ke=G.direction=="ltr";function dt(jn,rr,Rr,gr){rr<0&&(rr=0),rr=Math.round(rr),gr=Math.round(gr),$.appendChild(D("div",null,"CodeMirror-selected","position: absolute; left: "+jn+`px;
|
|
|
top: `+rr+"px; width: "+(Rr==null?Ie-jn:Rr)+`px;
|
|
|
height: `+(gr-rr)+"px"))}function bt(jn,rr,Rr){var gr=en(G,jn),ai=gr.text.length,ea,oo;function Ca(Va,No){return Qi(m,zt(jn,Va),"div",gr,No)}function Ho(Va,No,vo){var no=ir(m,gr,null,Va),Ya=No=="ltr"==(vo=="after")?"left":"right",Ra=vo=="after"?no.begin:no.end-(/\s/.test(gr.text.charAt(no.end-1))?2:1);return Ca(Ra,Ya)[Ya]}var Po=tt(gr,G.direction);return ge(Po,rr||0,Rr==null?ai:Rr,function(Va,No,vo,no){var Ya=vo=="ltr",Ra=Ca(Va,Ya?"left":"right"),Uo=Ca(No-1,Ya?"right":"left"),Pl=rr==null&&Va==0,al=Rr==null&&No==ai,xo=no==0,Ts=!Po||no==Po.length-1;if(Uo.top-Ra.top<=3){var so=(Ke?Pl:al)&&xo,$l=(Ke?al:Pl)&&Ts,Us=so?Ae:(Ya?Ra:Uo).left,xl=$l?Ie:(Ya?Uo:Ra).right;dt(Us,Ra.top,xl-Us,Ra.bottom)}else{var wl,To,Nl,eu;Ya?(wl=Ke&&Pl&&xo?Ae:Ra.left,To=Ke?Ie:Ho(Va,vo,"before"),Nl=Ke?Ae:Ho(No,vo,"after"),eu=Ke&&al&&Ts?Ie:Uo.right):(wl=Ke?Ho(Va,vo,"before"):Ae,To=!Ke&&Pl&&xo?Ie:Ra.right,Nl=!Ke&&al&&Ts?Ae:Uo.left,eu=Ke?Ho(No,vo,"after"):Ie),dt(wl,Ra.top,To-wl,Ra.bottom),Ra.bottom<Uo.top&&dt(Ae,Ra.bottom,null,Uo.top),dt(Nl,Uo.top,eu-Nl,Uo.bottom)}(!ea||Fi(Ra,ea)<0)&&(ea=Ra),Fi(Uo,ea)<0&&(ea=Uo),(!oo||Fi(Ra,oo)<0)&&(oo=Ra),Fi(Uo,oo)<0&&(oo=Uo)}),{start:ea,end:oo}}var Kt=R.from(),Pt=R.to();if(Kt.line==Pt.line)bt(Kt.line,Kt.ch,Pt.ch);else{var tn=en(G,Kt.line),un=en(G,Pt.line),Cn=Zi(tn)==Zi(un),Fn=bt(Kt.line,Kt.ch,Cn?tn.text.length+1:null).end,Zn=bt(Pt.line,Cn?0:null,Pt.ch).start;Cn&&(Fn.top<Zn.top-2?(dt(Fn.right,Fn.top,null,Fn.bottom),dt(Ae,Zn.top,Zn.left,Zn.bottom)):dt(Fn.right,Fn.top,Zn.left-Fn.right,Fn.bottom)),Fn.bottom<Zn.top&&dt(Ae,Fn.bottom,null,Zn.top)}W.appendChild($)}function La(m){if(!m.state.focused)return;var R=m.display;clearInterval(R.blinker);var W=!0;R.cursorDiv.style.visibility="",m.options.cursorBlinkRate>0?R.blinker=setInterval(function(){m.hasFocus()||as(m),R.cursorDiv.style.visibility=(W=!W)?"":"hidden"},m.options.cursorBlinkRate):m.options.cursorBlinkRate<0&&(R.cursorDiv.style.visibility="hidden")}function js(m){m.state.focused||(m.display.input.focus(),Zo(m))}function ll(m){m.state.delayingBlurEvent=!0,setTimeout(function(){m.state.delayingBlurEvent&&(m.state.delayingBlurEvent=!1,as(m))},100)}function Zo(m,R){if(m.state.delayingBlurEvent&&(m.state.delayingBlurEvent=!1),m.options.readOnly=="nocursor")return;m.state.focused||(Ve(m,"focus",m,R),m.state.focused=!0,X(m.display.wrapper,"CodeMirror-focused"),!m.curOp&&m.display.selForContextMenu!=m.doc.sel&&(m.display.input.reset(),e&&setTimeout(function(){return m.display.input.reset(!0)},20)),m.display.input.receivedFocus()),La(m)}function as(m,R){if(m.state.delayingBlurEvent)return;m.state.focused&&(Ve(m,"blur",m,R),m.state.focused=!1,w(m.display.wrapper,"CodeMirror-focused")),clearInterval(m.display.blinker),setTimeout(function(){m.state.focused||(m.display.shift=!1)},150)}function Bs(m){for(var R=m.display,W=R.lineDiv.offsetTop,K=0;K<R.view.length;K++){var G=R.view[K],$=m.options.lineWrapping,ye=void 0,Ae=0;if(G.hidden)continue;if(_&&p<8){var Ie=G.node.offsetTop+G.node.offsetHeight;ye=Ie-W,W=Ie}else{var Ke=G.node.getBoundingClientRect();ye=Ke.bottom-Ke.top,!$&&G.text.firstChild&&(Ae=G.text.firstChild.getBoundingClientRect().right-Ke.left-1)}var dt=G.line.height-ye;if((dt>.005||dt<-.005)&&(cn(G.line,ye),Sl(G.line),G.rest))for(var bt=0;bt<G.rest.length;bt++)Sl(G.rest[bt]);if(Ae>m.display.sizerWidth){var Kt=Math.ceil(Ae/Ia(m.display));Kt>m.display.maxLineLength&&(m.display.maxLineLength=Kt,m.display.maxLine=G.line,m.display.maxLineChanged=!0)}}}function Sl(m){if(m.widgets)for(var R=0;R<m.widgets.length;++R){var W=m.widgets[R],K=W.node.parentNode;K&&(W.height=K.offsetHeight)}}function Ks(m,R,W){var K=W&&W.top!=null?Math.max(0,W.top):m.scroller.scrollTop;K=Math.floor(K-sl(m));var G=W&&W.bottom!=null?W.bottom:K+m.wrapper.clientHeight,$=yn(R,K),ye=yn(R,G);if(W&&W.ensure){var Ae=W.ensure.from.line,Ie=W.ensure.to.line;Ae<$?($=Ae,ye=yn(R,Ja(en(R,Ae))+m.wrapper.clientHeight)):Math.min(Ie,R.lastLine())>=ye&&($=yn(R,Ja(en(R,Ie))-m.wrapper.clientHeight),ye=Ie)}return{from:$,to:Math.max(ye,$+1)}}function Cl(m,R){if(Je(m,"scrollCursorIntoView"))return;var W=m.display,K=W.sizer.getBoundingClientRect(),G=null;if(R.top+K.top<0?G=!0:R.bottom+K.top>(window.innerHeight||document.documentElement.clientHeight)&&(G=!1),G!=null&&!t){var $=D("div","\u200B",null,`position: absolute;
|
|
|
top: `+(R.top-W.viewOffset-sl(m.display))+`px;
|
|
|
height: `+(R.bottom-R.top+Rt(m)+W.barHeight)+`px;
|
|
|
left: `+R.left+"px; width: "+Math.max(2,R.right-R.left)+"px;");m.display.lineSpace.appendChild($),$.scrollIntoView(G),m.display.lineSpace.removeChild($)}}function Ul(m,R,W,K){K==null&&(K=0);var G;!m.options.lineWrapping&&R==W&&(R=R.ch?zt(R.line,R.sticky=="before"?R.ch-1:R.ch,"after"):R,W=R.sticky=="before"?zt(R.line,R.ch+1,"before"):R);for(var $=0;$<5;$++){var ye=!1,Ae=ei(m,R),Ie=!W||W==R?Ae:ei(m,W);G={left:Math.min(Ae.left,Ie.left),top:Math.min(Ae.top,Ie.top)-K,right:Math.max(Ae.left,Ie.left),bottom:Math.max(Ae.bottom,Ie.bottom)+K};var Ke=ul(m,G),dt=m.doc.scrollTop,bt=m.doc.scrollLeft;if(Ke.scrollTop!=null&&(ss(m,Ke.scrollTop),Math.abs(m.doc.scrollTop-dt)>1&&(ye=!0)),Ke.scrollLeft!=null&&(Io(m,Ke.scrollLeft),Math.abs(m.doc.scrollLeft-bt)>1&&(ye=!0)),!ye)break}return G}function Tl(m,R){var W=ul(m,R);W.scrollTop!=null&&ss(m,W.scrollTop),W.scrollLeft!=null&&Io(m,W.scrollLeft)}function ul(m,R){var W=m.display,K=ma(m.display);R.top<0&&(R.top=0);var G=m.curOp&&m.curOp.scrollTop!=null?m.curOp.scrollTop:W.scroller.scrollTop,$=Ue(m),ye={};R.bottom-R.top>$&&(R.bottom=R.top+$);var Ae=m.doc.height+ot(W),Ie=R.top<K,Ke=R.bottom>Ae-K;if(R.top<G)ye.scrollTop=Ie?0:R.top;else if(R.bottom>G+$){var dt=Math.min(R.top,(Ke?Ae:R.bottom)-$);dt!=G&&(ye.scrollTop=dt)}var bt=m.options.fixedGutter?0:W.gutters.offsetWidth,Kt=m.curOp&&m.curOp.scrollLeft!=null?m.curOp.scrollLeft:W.scroller.scrollLeft-bt,Pt=ut(m)-W.gutters.offsetWidth,tn=R.right-R.left>Pt;return tn&&(R.right=R.left+Pt),R.left<10?ye.scrollLeft=0:R.left<Kt?ye.scrollLeft=Math.max(0,R.left+bt-(tn?0:10)):R.right>Pt+Kt-3&&(ye.scrollLeft=R.right+(tn?0:10)-Pt),ye}function cl(m,R){if(R==null)return;As(m),m.curOp.scrollTop=(m.curOp.scrollTop==null?m.doc.scrollTop:m.curOp.scrollTop)+R}function vs(m){As(m);var R=m.getCursor();m.curOp.scrollToPos={from:R,to:R,margin:m.options.cursorScrollMargin}}function os(m,R,W){(R!=null||W!=null)&&As(m),R!=null&&(m.curOp.scrollLeft=R),W!=null&&(m.curOp.scrollTop=W)}function Fl(m,R){As(m),m.curOp.scrollToPos=R}function As(m){var R=m.curOp.scrollToPos;if(R){m.curOp.scrollToPos=null;var W=pr(m,R.from),K=pr(m,R.to);Os(m,W,K,R.margin)}}function Os(m,R,W,K){var G=ul(m,{left:Math.min(R.left,W.left),top:Math.min(R.top,W.top)-K,right:Math.max(R.right,W.right),bottom:Math.max(R.bottom,W.bottom)+K});os(m,G.scrollLeft,G.scrollTop)}function ss(m,R){if(Math.abs(m.doc.scrollTop-R)<2)return;T||zs(m,{top:R}),_s(m,R,!0),T&&zs(m),Rs(m,100)}function _s(m,R,W){if(R=Math.max(0,Math.min(m.display.scroller.scrollHeight-m.display.scroller.clientHeight,R)),m.display.scroller.scrollTop==R&&!W)return;m.doc.scrollTop=R,m.display.scrollbars.setScrollTop(R),m.display.scroller.scrollTop!=R&&(m.display.scroller.scrollTop=R)}function Io(m,R,W,K){if(R=Math.max(0,Math.min(R,m.display.scroller.scrollWidth-m.display.scroller.clientWidth)),(W?R==m.doc.scrollLeft:Math.abs(m.doc.scrollLeft-R)<2)&&!K)return;m.doc.scrollLeft=R,qe(m),m.display.scroller.scrollLeft!=R&&(m.display.scroller.scrollLeft=R),m.display.scrollbars.setScrollLeft(R)}function ls(m){var R=m.display,W=R.gutters.offsetWidth,K=Math.round(m.doc.height+ot(m.display));return{clientHeight:R.scroller.clientHeight,viewHeight:R.wrapper.clientHeight,scrollWidth:R.scroller.scrollWidth,clientWidth:R.scroller.clientWidth,viewWidth:R.wrapper.clientWidth,barLeft:m.options.fixedGutter?W:0,docHeight:K,scrollHeight:K+Rt(m)+R.barHeight,nativeBarWidth:R.nativeBarWidth,gutterWidth:W}}var qo=function(m,R,W){this.cm=W;var K=this.vert=D("div",[D("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),G=this.horiz=D("div",[D("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");K.tabIndex=G.tabIndex=-1,m(K),m(G),Me(K,"scroll",function(){K.clientHeight&&R(K.scrollTop,"vertical")}),Me(G,"scroll",function(){G.clientWidth&&R(G.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,_&&p<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};qo.prototype.update=function(m){var R=m.scrollWidth>m.clientWidth+1,W=m.scrollHeight>m.clientHeight+1,K=m.nativeBarWidth;if(W){this.vert.style.display="block",this.vert.style.bottom=R?K+"px":"0";var G=m.viewHeight-(R?K:0);this.vert.firstChild.style.height=Math.max(0,m.scrollHeight-m.clientHeight+G)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(R){this.horiz.style.display="block",this.horiz.style.right=W?K+"px":"0",this.horiz.style.left=m.barLeft+"px";var $=m.viewWidth-m.barLeft-(W?K:0);this.horiz.firstChild.style.width=Math.max(0,m.scrollWidth-m.clientWidth+$)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&m.clientHeight>0&&(K==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:W?K:0,bottom:R?K:0}},qo.prototype.setScrollLeft=function(m){this.horiz.scrollLeft!=m&&(this.horiz.scrollLeft=m),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},qo.prototype.setScrollTop=function(m){this.vert.scrollTop!=m&&(this.vert.scrollTop=m),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},qo.prototype.zeroWidthHack=function(){var m=f&&!i?"12px":"18px";this.horiz.style.height=this.vert.style.width=m,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Z,this.disableVert=new Z},qo.prototype.enableZeroWidthBar=function(m,R,W){m.style.pointerEvents="auto";function K(){var G=m.getBoundingClientRect(),$=W=="vert"?document.elementFromPoint(G.right-1,(G.top+G.bottom)/2):document.elementFromPoint((G.right+G.left)/2,G.bottom-1);$!=m?m.style.pointerEvents="none":R.set(1e3,K)}R.set(1e3,K)},qo.prototype.clear=function(){var m=this.horiz.parentNode;m.removeChild(this.horiz),m.removeChild(this.vert)};var us=function(){};us.prototype.update=function(){return{bottom:0,right:0}},us.prototype.setScrollLeft=function(){},us.prototype.setScrollTop=function(){},us.prototype.clear=function(){};function ys(m,R){R||(R=ls(m));var W=m.display.barWidth,K=m.display.barHeight;Hs(m,R);for(var G=0;G<4&&W!=m.display.barWidth||K!=m.display.barHeight;G++)W!=m.display.barWidth&&m.options.lineWrapping&&Bs(m),Hs(m,ls(m)),W=m.display.barWidth,K=m.display.barHeight}function Hs(m,R){var W=m.display,K=W.scrollbars.update(R);W.sizer.style.paddingRight=(W.barWidth=K.right)+"px",W.sizer.style.paddingBottom=(W.barHeight=K.bottom)+"px",W.heightForcer.style.borderBottom=K.bottom+"px solid transparent",K.right&&K.bottom?(W.scrollbarFiller.style.display="block",W.scrollbarFiller.style.height=K.bottom+"px",W.scrollbarFiller.style.width=K.right+"px"):W.scrollbarFiller.style.display="",K.bottom&&m.options.coverGutterNextToScrollbar&&m.options.fixedGutter?(W.gutterFiller.style.display="block",W.gutterFiller.style.height=K.bottom+"px",W.gutterFiller.style.width=R.gutterWidth+"px"):W.gutterFiller.style.display=""}var Al={native:qo,null:us};function Ws(m){m.display.scrollbars&&(m.display.scrollbars.clear(),m.display.scrollbars.addClass&&w(m.display.wrapper,m.display.scrollbars.addClass)),m.display.scrollbars=new Al[m.options.scrollbarStyle](function(R){m.display.wrapper.insertBefore(R,m.display.scrollbarFiller),Me(R,"mousedown",function(){m.state.focused&&setTimeout(function(){return m.display.input.focus()},0)}),R.setAttribute("cm-not-content","true")},function(R,W){W=="horizontal"?Io(m,R):ss(m,R)},m),m.display.scrollbars.addClass&&X(m.display.wrapper,m.display.scrollbars.addClass)}var dl=0;function $o(m){m.curOp={cm:m,viewChanged:!1,startHeight:m.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:++dl},Ba(m.curOp)}function cs(m){var R=m.curOp;R&&ci(R,function(W){for(var K=0;K<W.ops.length;K++)W.ops[K].cm.curOp=null;Ol(W)})}function Ol(m){for(var R=m.ops,W=0;W<R.length;W++)jl(R[W]);for(var K=0;K<R.length;K++)hl(R[K]);for(var G=0;G<R.length;G++)fl(R[G]);for(var $=0;$<R.length;$++)pl(R[$]);for(var ye=0;ye<R.length;ye++)Bl(R[ye])}function jl(m){var R=m.cm,W=R.display;Hl(R),m.updateMaxLine&&Ao(R),m.mustUpdate=m.viewChanged||m.forceUpdate||m.scrollTop!=null||m.scrollToPos&&(m.scrollToPos.from.line<W.viewFrom||m.scrollToPos.to.line>=W.viewTo)||W.maxLineChanged&&R.options.lineWrapping,m.update=m.mustUpdate&&new ko(R,m.mustUpdate&&{top:m.scrollTop,ensure:m.scrollToPos},m.forceUpdate)}function hl(m){m.updatedDisplay=m.mustUpdate&&ds(m.cm,m.update)}function fl(m){var R=m.cm,W=R.display;m.updatedDisplay&&Bs(R),m.barMeasure=ls(R),W.maxLineChanged&&!R.options.lineWrapping&&(m.adjustWidthTo=ht(R,W.maxLine,W.maxLine.text.length).left+3,R.display.sizerWidth=m.adjustWidthTo,m.barMeasure.scrollWidth=Math.max(W.scroller.clientWidth,W.sizer.offsetLeft+m.adjustWidthTo+Rt(R)+R.display.barWidth),m.maxScrollLeft=Math.max(0,W.sizer.offsetLeft+m.adjustWidthTo-ut(R))),(m.updatedDisplay||m.selectionChanged)&&(m.preparedSelection=W.input.prepareSelection())}function pl(m){var R=m.cm;m.adjustWidthTo!=null&&(R.display.sizer.style.minWidth=m.adjustWidthTo+"px",m.maxScrollLeft<R.doc.scrollLeft&&Io(R,Math.min(R.display.scroller.scrollLeft,m.maxScrollLeft),!0),R.display.maxLineChanged=!1);var W=m.focus&&m.focus==z();m.preparedSelection&&R.display.input.showSelection(m.preparedSelection,W),(m.updatedDisplay||m.startHeight!=R.doc.height)&&ys(R,m.barMeasure),m.updatedDisplay&&we(R,m.barMeasure),m.selectionChanged&&La(R),R.state.focused&&m.updateInput&&R.display.input.reset(m.typing),W&&js(m.cm)}function Bl(m){var R=m.cm,W=R.display,K=R.doc;if(m.updatedDisplay&&Xs(R,m.update),W.wheelStartX!=null&&(m.scrollTop!=null||m.scrollLeft!=null||m.scrollToPos)&&(W.wheelStartX=W.wheelStartY=null),m.scrollTop!=null&&_s(R,m.scrollTop,m.forceScroll),m.scrollLeft!=null&&Io(R,m.scrollLeft,!0,!0),m.scrollToPos){var G=Ul(R,V(K,m.scrollToPos.from),V(K,m.scrollToPos.to),m.scrollToPos.margin);Cl(R,G)}var $=m.maybeHiddenMarkers,ye=m.maybeUnhiddenMarkers;if($)for(var Ae=0;Ae<$.length;++Ae)$[Ae].lines.length||Ve($[Ae],"hide");if(ye)for(var Ie=0;Ie<ye.length;++Ie)ye[Ie].lines.length&&Ve(ye[Ie],"unhide");W.wrapper.offsetHeight&&(K.scrollTop=R.display.scroller.scrollTop),m.changeObjs&&Ve(R,"changes",R,m.changeObjs),m.update&&m.update.finish()}function uo(m,R){if(m.curOp)return R();$o(m);try{return R()}finally{cs(m)}}function ia(m,R){return function(){if(m.curOp)return R.apply(m,arguments);$o(m);try{return R.apply(m,arguments)}finally{cs(m)}}}function qa(m){return function(){if(this.curOp)return m.apply(this,arguments);$o(this);try{return m.apply(this,arguments)}finally{cs(this)}}}function wa(m){return function(){var R=this.cm;if(!R||R.curOp)return m.apply(this,arguments);$o(R);try{return m.apply(this,arguments)}finally{cs(R)}}}function Rs(m,R){m.doc.highlightFrontier<m.display.viewTo&&m.state.highlight.set(R,U(Kl,m))}function Kl(m){var R=m.doc;if(R.highlightFrontier>=m.display.viewTo)return;var W=+new Date+m.options.workTime,K=Yt(m,R.highlightFrontier),G=[];R.iter(K.line,Math.min(R.first+R.size,m.display.viewTo+500),function($){if(K.line>=m.display.viewFrom){var ye=$.styles,Ae=$.text.length>m.options.maxHighlightLength?Wt(R.mode,K.state):null,Ie=nt(m,$,K,!0);Ae&&(K.state=Ae),$.styles=Ie.styles;var Ke=$.styleClasses,dt=Ie.classes;dt?$.styleClasses=dt:Ke&&($.styleClasses=null);for(var bt=!ye||ye.length!=$.styles.length||Ke!=dt&&(!Ke||!dt||Ke.bgClass!=dt.bgClass||Ke.textClass!=dt.textClass),Kt=0;!bt&&Kt<ye.length;++Kt)bt=ye[Kt]!=$.styles[Kt];bt&&G.push(K.line),$.stateAfter=K.save(),K.nextLine()}else $.text.length<=m.options.maxHighlightLength&&an(m,$.text,K),$.stateAfter=K.line%5==0?K.save():null,K.nextLine();if(+new Date>W)return Rs(m,m.options.workDelay),!0}),R.highlightFrontier=K.line,R.modeFrontier=Math.max(R.modeFrontier,K.line),G.length&&uo(m,function(){for(var $=0;$<G.length;$++)ra(m,G[$],"text")})}var ko=function(m,R,W){var K=m.display;this.viewport=R,this.visible=Ks(K,m.doc,R),this.editorIsHidden=!K.wrapper.offsetWidth,this.wrapperHeight=K.wrapper.clientHeight,this.wrapperWidth=K.wrapper.clientWidth,this.oldDisplayWidth=ut(m),this.force=W,this.dims=na(m),this.events=[]};ko.prototype.signal=function(m,R){Pe(m,R)&&this.events.push(arguments)},ko.prototype.finish=function(){for(var m=0;m<this.events.length;m++)Ve.apply(null,this.events[m])};function Hl(m){var R=m.display;!R.scrollbarsClipped&&R.scroller.offsetWidth&&(R.nativeBarWidth=R.scroller.offsetWidth-R.scroller.clientWidth,R.heightForcer.style.height=Rt(m)+"px",R.sizer.style.marginBottom=-R.nativeBarWidth+"px",R.sizer.style.borderRightWidth=Rt(m)+"px",R.scrollbarsClipped=!0)}function Rl(m){if(m.hasFocus())return null;var R=z();if(!R||!P(m.display.lineDiv,R))return null;var W={activeElt:R};if(window.getSelection){var K=window.getSelection();K.anchorNode&&K.extend&&P(m.display.lineDiv,K.anchorNode)&&(W.anchorNode=K.anchorNode,W.anchorOffset=K.anchorOffset,W.focusNode=K.focusNode,W.focusOffset=K.focusOffset)}return W}function Wl(m){if(!m||!m.activeElt||m.activeElt==z())return;if(m.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(m.activeElt.nodeName)&&m.anchorNode&&P(document.body,m.anchorNode)&&P(document.body,m.focusNode)){var R=window.getSelection(),W=document.createRange();W.setEnd(m.anchorNode,m.anchorOffset),W.collapse(!1),R.removeAllRanges(),R.addRange(W),R.extend(m.focusNode,m.focusOffset)}}function ds(m,R){var W=m.display,K=m.doc;if(R.editorIsHidden)return $i(m),!1;if(!R.force&&R.visible.from>=W.viewFrom&&R.visible.to<=W.viewTo&&(W.updateLineNumbers==null||W.updateLineNumbers>=W.viewTo)&&W.renderedView==W.view&&Qo(m)==0)return!1;it(m)&&($i(m),R.dims=na(m));var G=K.first+K.size,$=Math.max(R.visible.from-m.options.viewportMargin,K.first),ye=Math.min(G,R.visible.to+m.options.viewportMargin);W.viewFrom<$&&$-W.viewFrom<20&&($=Math.max(K.first,W.viewFrom)),W.viewTo>ye&&W.viewTo-ye<20&&(ye=Math.min(G,W.viewTo)),Vr&&($=Qa(m.doc,$),ye=ja(m.doc,ye));var Ae=$!=W.viewFrom||ye!=W.viewTo||W.lastWrapHeight!=R.wrapperHeight||W.lastWrapWidth!=R.wrapperWidth;Yo(m,$,ye),W.viewOffset=Ja(en(m.doc,W.viewFrom)),m.display.mover.style.top=W.viewOffset+"px";var Ie=Qo(m);if(!Ae&&Ie==0&&!R.force&&W.renderedView==W.view&&(W.updateLineNumbers==null||W.updateLineNumbers>=W.viewTo))return!1;var Ke=Rl(m);return Ie>4&&(W.lineDiv.style.display="none"),Dl(m,W.updateLineNumbers,R.dims),Ie>4&&(W.lineDiv.style.display=""),W.renderedView=W.view,Wl(Ke),S(W.cursorDiv),S(W.selectionDiv),W.gutters.style.height=W.sizer.style.minHeight=0,Ae&&(W.lastWrapHeight=R.wrapperHeight,W.lastWrapWidth=R.wrapperWidth,Rs(m,400)),W.updateLineNumbers=null,!0}function Xs(m,R){for(var W=R.viewport,K=!0;;K=!1){if(!K||!m.options.lineWrapping||R.oldDisplayWidth==ut(m)){if(W&&W.top!=null&&(W={top:Math.min(m.doc.height+ot(m.display)-Ue(m),W.top)}),R.visible=Ks(m.display,m.doc,W),R.visible.from>=m.display.viewFrom&&R.visible.to<=m.display.viewTo)break}else K&&(R.visible=Ks(m.display,m.doc,W));if(!ds(m,R))break;Bs(m);var G=ls(m);Mi(m),ys(m,G),we(m,G),R.force=!1}R.signal(m,"update",m),(m.display.viewFrom!=m.display.reportedViewFrom||m.display.viewTo!=m.display.reportedViewTo)&&(R.signal(m,"viewportChange",m,m.display.viewFrom,m.display.viewTo),m.display.reportedViewFrom=m.display.viewFrom,m.display.reportedViewTo=m.display.viewTo)}function zs(m,R){var W=new ko(m,R);if(ds(m,W)){Bs(m),Xs(m,W);var K=ls(m);Mi(m),ys(m,K),we(m,K),W.finish()}}function Dl(m,R,W){var K=m.display,G=m.options.lineNumbers,$=K.lineDiv,ye=$.firstChild;function Ae(tn){var un=tn.nextSibling;return e&&f&&m.display.currentWheelTarget==tn?tn.style.display="none":tn.parentNode.removeChild(tn),un}for(var Ie=K.view,Ke=K.viewFrom,dt=0;dt<Ie.length;dt++){var bt=Ie[dt];if(!bt.hidden)if(!bt.node||bt.node.parentNode!=$){var Kt=Oo(m,bt,Ke,W);$.insertBefore(Kt,ye)}else{for(;ye!=bt.node;)ye=Ae(ye);var Pt=G&&R!=null&&R<=Ke&&bt.lineNumber;bt.changes&&(re(bt.changes,"gutter")>-1&&(Pt=!1),En(m,bt,Ke,W)),Pt&&(S(bt.lineNumber),bt.lineNumber.appendChild(document.createTextNode($n(m.options,Ke)))),ye=bt.node.nextSibling}Ke+=bt.size}for(;ye;)ye=Ae(ye)}function Gs(m){var R=m.gutters.offsetWidth;m.sizer.style.marginLeft=R+"px"}function we(m,R){m.display.sizer.style.minHeight=R.docHeight+"px",m.display.heightForcer.style.top=R.docHeight+"px",m.display.gutters.style.height=R.docHeight+m.display.barHeight+Rt(m)+"px"}function qe(m){var R=m.display,W=R.view;if(!R.alignWidgets&&(!R.gutters.firstChild||!m.options.fixedGutter))return;for(var K=io(R)-R.scroller.scrollLeft+m.doc.scrollLeft,G=R.gutters.offsetWidth,$=K+"px",ye=0;ye<W.length;ye++)if(!W[ye].hidden){m.options.fixedGutter&&(W[ye].gutter&&(W[ye].gutter.style.left=$),W[ye].gutterBackground&&(W[ye].gutterBackground.style.left=$));var Ae=W[ye].alignable;if(Ae)for(var Ie=0;Ie<Ae.length;Ie++)Ae[Ie].style.left=$}m.options.fixedGutter&&(R.gutters.style.left=K+G+"px")}function it(m){if(!m.options.lineNumbers)return!1;var R=m.doc,W=$n(m.options,R.first+R.size-1),K=m.display;if(W.length!=K.lineNumChars){var G=K.measure.appendChild(D("div",[D("div",W)],"CodeMirror-linenumber CodeMirror-gutter-elt")),$=G.firstChild.offsetWidth,ye=G.offsetWidth-$;return K.lineGutter.style.width="",K.lineNumInnerWidth=Math.max($,K.lineGutter.offsetWidth-ye)+1,K.lineNumWidth=K.lineNumInnerWidth+ye,K.lineNumChars=K.lineNumInnerWidth?W.length:-1,K.lineGutter.style.width=K.lineNumWidth+"px",Gs(m.display),!0}return!1}function At(m,R){for(var W=[],K=!1,G=0;G<m.length;G++){var $=m[G],ye=null;if(typeof $!="string"&&(ye=$.style,$=$.className),$=="CodeMirror-linenumbers")if(R)K=!0;else continue;W.push({className:$,style:ye})}return R&&!K&&W.push({className:"CodeMirror-linenumbers",style:null}),W}function kt(m){var R=m.gutters,W=m.gutterSpecs;S(R),m.lineGutter=null;for(var K=0;K<W.length;++K){var G=W[K],$=G.className,ye=G.style,Ae=R.appendChild(D("div",null,"CodeMirror-gutter "+$));ye&&(Ae.style.cssText=ye),$=="CodeMirror-linenumbers"&&(m.lineGutter=Ae,Ae.style.width=(m.lineNumWidth||1)+"px")}R.style.display=W.length?"":"none",Gs(m)}function vt(m){kt(m.display),Ki(m),qe(m)}function at(m,R,W,K){var G=this;this.input=W,G.scrollbarFiller=D("div",null,"CodeMirror-scrollbar-filler"),G.scrollbarFiller.setAttribute("cm-not-content","true"),G.gutterFiller=D("div",null,"CodeMirror-gutter-filler"),G.gutterFiller.setAttribute("cm-not-content","true"),G.lineDiv=M("div",null,"CodeMirror-code"),G.selectionDiv=D("div",null,null,"position: relative; z-index: 1"),G.cursorDiv=D("div",null,"CodeMirror-cursors"),G.measure=D("div",null,"CodeMirror-measure"),G.lineMeasure=D("div",null,"CodeMirror-measure"),G.lineSpace=M("div",[G.measure,G.lineMeasure,G.selectionDiv,G.cursorDiv,G.lineDiv],null,"position: relative; outline: none");var $=M("div",[G.lineSpace],"CodeMirror-lines");G.mover=D("div",[$],null,"position: relative"),G.sizer=D("div",[G.mover],"CodeMirror-sizer"),G.sizerWidth=null,G.heightForcer=D("div",null,null,"position: absolute; height: "+he+"px; width: 1px;"),G.gutters=D("div",null,"CodeMirror-gutters"),G.lineGutter=null,G.scroller=D("div",[G.sizer,G.heightForcer,G.gutters],"CodeMirror-scroll"),G.scroller.setAttribute("tabIndex","-1"),G.wrapper=D("div",[G.scrollbarFiller,G.gutterFiller,G.scroller],"CodeMirror"),_&&p<8&&(G.gutters.style.zIndex=-1,G.scroller.style.paddingRight=0),!e&&!(T&&d)&&(G.scroller.draggable=!0),m&&(m.appendChild?m.appendChild(G.wrapper):m(G.wrapper)),G.viewFrom=G.viewTo=R.first,G.reportedViewFrom=G.reportedViewTo=R.first,G.view=[],G.renderedView=null,G.externalMeasured=null,G.viewOffset=0,G.lastWrapHeight=G.lastWrapWidth=0,G.updateLineNumbers=null,G.nativeBarWidth=G.barHeight=G.barWidth=0,G.scrollbarsClipped=!1,G.lineNumWidth=G.lineNumInnerWidth=G.lineNumChars=null,G.alignWidgets=!1,G.cachedCharWidth=G.cachedTextHeight=G.cachedPaddingH=null,G.maxLine=null,G.maxLineLength=0,G.maxLineChanged=!1,G.wheelDX=G.wheelDY=G.wheelStartX=G.wheelStartY=null,G.shift=!1,G.selForContextMenu=null,G.activeTouch=null,G.gutterSpecs=At(K.gutters,K.lineNumbers),kt(G),W.init(G)}var Lt=0,Ct=null;_?Ct=-.53:T?Ct=15:n?Ct=-.7:r&&(Ct=-1/3);function _t(m){var R=m.wheelDeltaX,W=m.wheelDeltaY;return R==null&&m.detail&&m.axis==m.HORIZONTAL_AXIS&&(R=m.detail),W==null&&m.detail&&m.axis==m.VERTICAL_AXIS?W=m.detail:W==null&&(W=m.wheelDelta),{x:R,y:W}}function St(m){var R=_t(m);return R.x*=Ct,R.y*=Ct,R}function Gt(m,R){var W=_t(R),K=W.x,G=W.y,$=m.display,ye=$.scroller,Ae=ye.scrollWidth>ye.clientWidth,Ie=ye.scrollHeight>ye.clientHeight;if(!(K&&Ae||G&&Ie))return;if(G&&f&&e){e:for(var Ke=R.target,dt=$.view;Ke!=ye;Ke=Ke.parentNode)for(var bt=0;bt<dt.length;bt++)if(dt[bt].node==Ke){m.display.currentWheelTarget=Ke;break e}}if(K&&!T&&!l&&Ct!=null){G&&Ie&&ss(m,Math.max(0,ye.scrollTop+G*Ct)),Io(m,Math.max(0,ye.scrollLeft+K*Ct)),(!G||G&&Ie)&&ve(R),$.wheelStartX=null;return}if(G&&Ct!=null){var Kt=G*Ct,Pt=m.doc.scrollTop,tn=Pt+$.wrapper.clientHeight;Kt<0?Pt=Math.max(0,Pt+Kt-50):tn=Math.min(m.doc.height,tn+Kt+50),zs(m,{top:Pt,bottom:tn})}Lt<20&&($.wheelStartX==null?($.wheelStartX=ye.scrollLeft,$.wheelStartY=ye.scrollTop,$.wheelDX=K,$.wheelDY=G,setTimeout(function(){if($.wheelStartX==null)return;var un=ye.scrollLeft-$.wheelStartX,Cn=ye.scrollTop-$.wheelStartY,Fn=Cn&&$.wheelDY&&Cn/$.wheelDY||un&&$.wheelDX&&un/$.wheelDX;if($.wheelStartX=$.wheelStartY=null,!Fn)return;Ct=(Ct*Lt+Fn)/(Lt+1),++Lt},200)):($.wheelDX+=K,$.wheelDY+=G))}var Ft=function(m,R){this.ranges=m,this.primIndex=R};Ft.prototype.primary=function(){return this.ranges[this.primIndex]},Ft.prototype.equals=function(m){if(m==this)return!0;if(m.primIndex!=this.primIndex||m.ranges.length!=this.ranges.length)return!1;for(var R=0;R<this.ranges.length;R++){var W=this.ranges[R],K=m.ranges[R];if(!wr(W.anchor,K.anchor)||!wr(W.head,K.head))return!1}return!0},Ft.prototype.deepCopy=function(){for(var m=[],R=0;R<this.ranges.length;R++)m[R]=new It(nr(this.ranges[R].anchor),nr(this.ranges[R].head));return new Ft(m,this.primIndex)},Ft.prototype.somethingSelected=function(){for(var m=0;m<this.ranges.length;m++)if(!this.ranges[m].empty())return!0;return!1},Ft.prototype.contains=function(m,R){R||(R=m);for(var W=0;W<this.ranges.length;W++){var K=this.ranges[W];if(xn(R,K.from())>=0&&xn(m,K.to())<=0)return W}return-1};var It=function(m,R){this.anchor=m,this.head=R};It.prototype.from=function(){return Yn(this.anchor,this.head)},It.prototype.to=function(){return Tn(this.anchor,this.head)},It.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Vt(m,R,W){var K=m&&m.options.selectionsMayTouch,G=R[W];R.sort(function(Kt,Pt){return xn(Kt.from(),Pt.from())}),W=re(R,G);for(var $=1;$<R.length;$++){var ye=R[$],Ae=R[$-1],Ie=xn(Ae.to(),ye.from());if(K&&!ye.empty()?Ie>0:Ie>=0){var Ke=Yn(Ae.from(),ye.from()),dt=Tn(Ae.to(),ye.to()),bt=Ae.empty()?ye.from()==ye.head:Ae.from()==Ae.head;$<=W&&--W,R.splice(--$,2,new It(bt?dt:Ke,bt?Ke:dt))}}return new Ft(R,W)}function Zt(m,R){return new Ft([new It(m,R||m)],0)}function on(m){return m.text?zt(m.from.line+m.text.length-1,se(m.text).length+(m.text.length==1?m.from.ch:0)):m.to}function ln(m,R){if(xn(m,R.from)<0)return m;if(xn(m,R.to)<=0)return on(R);var W=m.line+R.text.length-(R.to.line-R.from.line)-1,K=m.ch;return m.line==R.to.line&&(K+=on(R).ch-R.to.ch),zt(W,K)}function On(m,R){for(var W=[],K=0;K<m.sel.ranges.length;K++){var G=m.sel.ranges[K];W.push(new It(ln(G.anchor,R),ln(G.head,R)))}return Vt(m.cm,W,m.sel.primIndex)}function Nn(m,R,W){return m.line==R.line?zt(W.line,m.ch-R.ch+W.ch):zt(W.line+(m.line-R.line),m.ch)}function Sn(m,R,W){for(var K=[],G=zt(m.first,0),$=G,ye=0;ye<R.length;ye++){var Ae=R[ye],Ie=Nn(Ae.from,G,$),Ke=Nn(on(Ae),G,$);if(G=Ae.to,$=Ke,W=="around"){var dt=m.sel.ranges[ye],bt=xn(dt.head,dt.anchor)<0;K[ye]=new It(bt?Ke:Ie,bt?Ie:Ke)}else K[ye]=new It(Ie,Ie)}return new Ft(K,m.sel.primIndex)}function wn(m){m.doc.mode=Ht(m.options,m.doc.modeOption),rn(m)}function rn(m){m.doc.iter(function(R){R.stateAfter&&(R.stateAfter=null),R.styles&&(R.styles=null)}),m.doc.modeFrontier=m.doc.highlightFrontier=m.doc.first,Rs(m,100),m.state.modeGen++,m.curOp&&Ki(m)}function Xn(m,R){return R.from.ch==0&&R.to.ch==0&&se(R.text)==""&&(!m.cm||m.cm.options.wholeLineUpdateBefore)}function mt(m,R,W,K){function G(Zn){return W?W[Zn]:null}function $(Zn,jn,rr){Xo(Zn,jn,rr,K),nn(Zn,"change",Zn,R)}function ye(Zn,jn){for(var rr=[],Rr=Zn;Rr<jn;++Rr)rr.push(new Za(Ke[Rr],G(Rr),K));return rr}var Ae=R.from,Ie=R.to,Ke=R.text,dt=en(m,Ae.line),bt=en(m,Ie.line),Kt=se(Ke),Pt=G(Ke.length-1),tn=Ie.line-Ae.line;if(R.full)m.insert(0,ye(0,Ke.length)),m.remove(Ke.length,m.size-Ke.length);else if(Xn(m,R)){var un=ye(0,Ke.length-1);$(bt,bt.text,Pt),tn&&m.remove(Ae.line,tn),un.length&&m.insert(Ae.line,un)}else if(dt==bt)if(Ke.length==1)$(dt,dt.text.slice(0,Ae.ch)+Kt+dt.text.slice(Ie.ch),Pt);else{var Cn=ye(1,Ke.length-1);Cn.push(new Za(Kt+dt.text.slice(Ie.ch),Pt,K)),$(dt,dt.text.slice(0,Ae.ch)+Ke[0],G(0)),m.insert(Ae.line+1,Cn)}else if(Ke.length==1)$(dt,dt.text.slice(0,Ae.ch)+Ke[0]+bt.text.slice(Ie.ch),G(0)),m.remove(Ae.line+1,tn);else{$(dt,dt.text.slice(0,Ae.ch)+Ke[0],G(0)),$(bt,Kt+bt.text.slice(Ie.ch),Pt);var Fn=ye(1,Ke.length-1);tn>1&&m.remove(Ae.line+1,tn-1),m.insert(Ae.line+1,Fn)}nn(m,"change",m,R)}function sn(m,R,W){function K(G,$,ye){if(G.linked)for(var Ae=0;Ae<G.linked.length;++Ae){var Ie=G.linked[Ae];if(Ie.doc==$)continue;var Ke=ye&&Ie.sharedHist;if(W&&!Ke)continue;R(Ie.doc,Ke),K(Ie.doc,G,Ke)}}K(m,null,!0)}function hn(m,R){if(R.cm)throw new Error("This document is already in use.");m.doc=R,R.cm=m,Eo(m),wn(m),gn(m),m.options.lineWrapping||Ao(m),m.options.mode=R.modeOption,Ki(m)}function gn(m){(m.doc.direction=="rtl"?X:w)(m.display.lineDiv,"CodeMirror-rtl")}function An(m){uo(m,function(){gn(m),Ki(m)})}function zn(m){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=m||1}function kn(m,R){var W={from:nr(R.from),to:on(R),text:qn(m,R.from,R.to)};return _n(m,W,R.from.line,R.to.line+1),sn(m,function(K){return _n(K,W,R.from.line,R.to.line+1)},!0),W}function bn(m){for(;m.length;){var R=se(m);if(R.ranges)m.pop();else break}}function vn(m,R){if(R)return bn(m.done),se(m.done);if(m.done.length&&!se(m.done).ranges)return se(m.done);if(m.done.length>1&&!m.done[m.done.length-2].ranges)return m.done.pop(),se(m.done)}function Ln(m,R,W,K){var G=m.history;G.undone.length=0;var $=+new Date,ye,Ae;if((G.lastOp==K||G.lastOrigin==R.origin&&R.origin&&(R.origin.charAt(0)=="+"&&G.lastModTime>$-(m.cm?m.cm.options.historyEventDelay:500)||R.origin.charAt(0)=="*"))&&(ye=vn(G,G.lastOp==K)))Ae=se(ye.changes),xn(R.from,R.to)==0&&xn(R.from,Ae.to)==0?Ae.to=on(R):ye.changes.push(kn(m,R));else{var Ie=se(G.done);for((!Ie||!Ie.ranges)&&Jr(m.sel,G.done),ye={changes:[kn(m,R)],generation:G.generation},G.done.push(ye);G.done.length>G.undoDepth;)G.done.shift(),G.done[0].ranges||G.done.shift()}G.done.push(W),G.generation=++G.maxGeneration,G.lastModTime=G.lastSelTime=$,G.lastOp=G.lastSelOp=K,G.lastOrigin=G.lastSelOrigin=R.origin,Ae||Ve(m,"historyAdded")}function Qn(m,R,W,K){var G=R.charAt(0);return G=="*"||G=="+"&&W.ranges.length==K.ranges.length&&W.somethingSelected()==K.somethingSelected()&&new Date-m.history.lastSelTime<=(m.cm?m.cm.options.historyEventDelay:500)}function Sr(m,R,W,K){var G=m.history,$=K&&K.origin;W==G.lastSelOp||$&&G.lastSelOrigin==$&&(G.lastModTime==G.lastSelTime&&G.lastOrigin==$||Qn(m,$,se(G.done),R))?G.done[G.done.length-1]=R:Jr(R,G.done),G.lastSelTime=+new Date,G.lastSelOrigin=$,G.lastSelOp=W,K&&K.clearRedo!==!1&&bn(G.undone)}function Jr(m,R){var W=se(R);W&&W.ranges&&W.equals(m)||R.push(m)}function _n(m,R,W,K){var G=R["spans_"+m.id],$=0;m.iter(Math.max(m.first,W),Math.min(m.first+m.size,K),function(ye){ye.markedSpans&&((G||(G=R["spans_"+m.id]={}))[$]=ye.markedSpans),++$})}function Er(m){if(!m)return null;for(var R,W=0;W<m.length;++W)m[W].marker.explicitlyCleared?R||(R=m.slice(0,W)):R&&R.push(m[W]);return R?R.length?R:null:m}function Ei(m,R){var W=R["spans_"+m.id];if(!W)return null;for(var K=[],G=0;G<R.text.length;++G)K.push(Er(W[G]));return K}function Zr(m,R){var W=Ei(m,R),K=Fa(m,R);if(!W)return K;if(!K)return W;for(var G=0;G<W.length;++G){var $=W[G],ye=K[G];if($&&ye){e:for(var Ae=0;Ae<ye.length;++Ae){for(var Ie=ye[Ae],Ke=0;Ke<$.length;++Ke)if($[Ke].marker==Ie.marker)continue e;$.push(Ie)}}else ye&&(W[G]=ye)}return W}function xr(m,R,W){for(var K=[],G=0;G<m.length;++G){var $=m[G];if($.ranges){K.push(W?Ft.prototype.deepCopy.call($):$);continue}var ye=$.changes,Ae=[];K.push({changes:Ae});for(var Ie=0;Ie<ye.length;++Ie){var Ke=ye[Ie],dt=void 0;if(Ae.push({from:Ke.from,to:Ke.to,text:Ke.text}),R)for(var bt in Ke)(dt=bt.match(/^spans_(\d+)$/))&&(re(R,Number(dt[1]))>-1&&(se(Ae)[bt]=Ke[bt],delete Ke[bt]))}}return K}function Fr(m,R,W,K){if(K){var G=m.anchor;if(W){var $=xn(R,G)<0;$!=xn(W,G)<0?(G=R,R=W):$!=xn(R,W)<0&&(R=W)}return new It(G,R)}else return new It(W||R,R)}function Dn(m,R,W,K,G){G==null&&(G=m.cm&&(m.cm.display.shift||m.extend)),fi(m,new Ft([Fr(m.sel.primary(),R,W,G)],0),K)}function kr(m,R,W){for(var K=[],G=m.cm&&(m.cm.display.shift||m.extend),$=0;$<m.sel.ranges.length;$++)K[$]=Fr(m.sel.ranges[$],R[$],null,G);var ye=Vt(m.cm,K,m.sel.primIndex);fi(m,ye,W)}function Pi(m,R,W,K){var G=m.sel.ranges.slice(0);G[R]=W,fi(m,Vt(m.cm,G,m.sel.primIndex),K)}function Di(m,R,W,K){fi(m,Zt(R,W),K)}function co(m,R,W){var K={ranges:R.ranges,update:function(G){this.ranges=[];for(var $=0;$<G.length;$++)this.ranges[$]=new It(V(m,G[$].anchor),V(m,G[$].head))},origin:W&&W.origin};return Ve(m,"beforeSelectionChange",m,K),m.cm&&Ve(m.cm,"beforeSelectionChange",m.cm,K),K.ranges!=R.ranges?Vt(m.cm,K.ranges,K.ranges.length-1):R}function Ma(m,R,W){var K=m.history.done,G=se(K);G&&G.ranges?(K[K.length-1]=R,Sa(m,R,W)):fi(m,R,W)}function fi(m,R,W){Sa(m,R,W),Sr(m,m.sel,m.cm?m.cm.curOp.id:NaN,W)}function Sa(m,R,W){(Pe(m,"beforeSelectionChange")||m.cm&&Pe(m.cm,"beforeSelectionChange"))&&(R=co(m,R,W));var K=W&&W.bias||(xn(R.primary().head,m.sel.primary().head)<0?-1:1);aa(m,Lo(m,R,K,!0)),!(W&&W.scroll===!1)&&m.cm&&vs(m.cm)}function aa(m,R){if(R.equals(m.sel))return;m.sel=R,m.cm&&(m.cm.curOp.updateInput=1,m.cm.curOp.selectionChanged=!0,Ye(m.cm)),nn(m,"cursorActivity",m)}function da(m){aa(m,Lo(m,m.sel,null,!1))}function Lo(m,R,W,K){for(var G,$=0;$<R.ranges.length;$++){var ye=R.ranges[$],Ae=R.ranges.length==m.sel.ranges.length&&m.sel.ranges[$],Ie=$a(m,ye.anchor,Ae&&Ae.anchor,W,K),Ke=$a(m,ye.head,Ae&&Ae.head,W,K);(G||Ie!=ye.anchor||Ke!=ye.head)&&(G||(G=R.ranges.slice(0,$)),G[$]=new It(Ie,Ke))}return G?Vt(m.cm,G,R.primIndex):R}function ho(m,R,W,K,G){var $=en(m,R.line);if($.markedSpans)for(var ye=0;ye<$.markedSpans.length;++ye){var Ae=$.markedSpans[ye],Ie=Ae.marker,Ke="selectLeft"in Ie?!Ie.selectLeft:Ie.inclusiveLeft,dt="selectRight"in Ie?!Ie.selectRight:Ie.inclusiveRight;if((Ae.from==null||(Ke?Ae.from<=R.ch:Ae.from<R.ch))&&(Ae.to==null||(dt?Ae.to>=R.ch:Ae.to>R.ch))){if(G&&(Ve(Ie,"beforeCursorEnter"),Ie.explicitlyCleared))if($.markedSpans){--ye;continue}else break;if(!Ie.atomic)continue;if(W){var bt=Ie.find(K<0?1:-1),Kt=void 0;if((K<0?dt:Ke)&&(bt=Pa(m,bt,-K,bt&&bt.line==R.line?$:null)),bt&&bt.line==R.line&&(Kt=xn(bt,W))&&(K<0?Kt<0:Kt>0))return ho(m,bt,R,K,G)}var Pt=Ie.find(K<0?-1:1);return(K<0?Ke:dt)&&(Pt=Pa(m,Pt,K,Pt.line==R.line?$:null)),Pt?ho(m,Pt,R,K,G):null}}return R}function $a(m,R,W,K,G){var $=K||1,ye=ho(m,R,W,$,G)||!G&&ho(m,R,W,$,!0)||ho(m,R,W,-$,G)||!G&&ho(m,R,W,-$,!0);return ye||(m.cantEdit=!0,zt(m.first,0))}function Pa(m,R,W,K){return W<0&&R.ch==0?R.line>m.first?V(m,zt(R.line-1)):null:W>0&&R.ch==(K||en(m,R.line)).text.length?R.line<m.first+m.size-1?zt(R.line+1,0):null:new zt(R.line,R.ch+W)}function ao(m){m.setSelection(zt(m.firstLine(),0),zt(m.lastLine()),ke)}function So(m,R,W){var K={canceled:!1,from:R.from,to:R.to,text:R.text,origin:R.origin,cancel:function(){return K.canceled=!0}};return W&&(K.update=function(G,$,ye,Ae){G&&(K.from=V(m,G)),$&&(K.to=V(m,$)),ye&&(K.text=ye),Ae!==void 0&&(K.origin=Ae)}),Ve(m,"beforeChange",m,K),m.cm&&Ve(m.cm,"beforeChange",m.cm,K),K.canceled?(m.cm&&(m.cm.curOp.updateInput=2),null):{from:K.from,to:K.to,text:K.text,origin:K.origin}}function Ka(m,R,W){if(m.cm){if(!m.cm.curOp)return ia(m.cm,Ka)(m,R,W);if(m.cm.state.suppressEdits)return}if((Pe(m,"beforeChange")||m.cm&&Pe(m.cm,"beforeChange"))&&(R=So(m,R,!0),!R))return;var K=Ji&&!W&&Nr(m,R.from,R.to);if(K)for(var G=K.length-1;G>=0;--G)Ha(m,{from:K[G].from,to:K[G].to,text:G?[""]:R.text,origin:R.origin});else Ha(m,R)}function Ha(m,R){if(R.text.length==1&&R.text[0]==""&&xn(R.from,R.to)==0)return;var W=On(m,R);Ln(m,R,W,m.cm?m.cm.curOp.id:NaN),Br(m,R,W,Fa(m,R));var K=[];sn(m,function(G,$){!$&&re(K,G.history)==-1&&(Ii(G.history,R),K.push(G.history)),Br(G,R,null,Fa(G,R))})}function oa(m,R,W){var K=m.cm&&m.cm.state.suppressEdits;if(K&&!W)return;for(var G=m.history,$,ye=m.sel,Ae=R=="undo"?G.done:G.undone,Ie=R=="undo"?G.undone:G.done,Ke=0;Ke<Ae.length&&!($=Ae[Ke],W?$.ranges&&!$.equals(m.sel):!$.ranges);Ke++);if(Ke==Ae.length)return;for(G.lastOrigin=G.lastSelOrigin=null;;)if($=Ae.pop(),$.ranges){if(Jr($,Ie),W&&!$.equals(m.sel)){fi(m,$,{clearRedo:!1});return}ye=$}else if(K){Ae.push($);return}else break;var dt=[];Jr(ye,Ie),Ie.push({changes:dt,generation:G.generation}),G.generation=$.generation||++G.maxGeneration;for(var bt=Pe(m,"beforeChange")||m.cm&&Pe(m.cm,"beforeChange"),Kt=function(un){var Cn=$.changes[un];if(Cn.origin=R,bt&&!So(m,Cn,!1))return Ae.length=0,{};dt.push(kn(m,Cn));var Fn=un?On(m,Cn):se(Ae);Br(m,Cn,Fn,Zr(m,Cn)),!un&&m.cm&&m.cm.scrollIntoView({from:Cn.from,to:on(Cn)});var Zn=[];sn(m,function(jn,rr){!rr&&re(Zn,jn.history)==-1&&(Ii(jn.history,Cn),Zn.push(jn.history)),Br(jn,Cn,null,Zr(jn,Cn))})},Pt=$.changes.length-1;Pt>=0;--Pt){var tn=Kt(Pt);if(tn)return tn.v}}function sa(m,R){if(R==0)return;if(m.first+=R,m.sel=new Ft(be(m.sel.ranges,function(G){return new It(zt(G.anchor.line+R,G.anchor.ch),zt(G.head.line+R,G.head.ch))}),m.sel.primIndex),m.cm){Ki(m.cm,m.first,m.first-R,R);for(var W=m.cm.display,K=W.viewFrom;K<W.viewTo;K++)ra(m.cm,K,"gutter")}}function Br(m,R,W,K){if(m.cm&&!m.cm.curOp)return ia(m.cm,Br)(m,R,W,K);if(R.to.line<m.first){sa(m,R.text.length-1-(R.to.line-R.from.line));return}if(R.from.line>m.lastLine())return;if(R.from.line<m.first){var G=R.text.length-1-(m.first-R.from.line);sa(m,G),R={from:zt(m.first,0),to:zt(R.to.line+G,R.to.ch),text:[se(R.text)],origin:R.origin}}var $=m.lastLine();R.to.line>$&&(R={from:R.from,to:zt($,en(m,$).text.length),text:[R.text[0]],origin:R.origin}),R.removed=qn(m,R.from,R.to),W||(W=On(m,R)),m.cm?la(m.cm,R,K):mt(m,R,K),Sa(m,W,ke),m.cantEdit&&$a(m,zt(m.firstLine(),0))&&(m.cantEdit=!1)}function la(m,R,W){var K=m.doc,G=m.display,$=R.from,ye=R.to,Ae=!1,Ie=$.line;m.options.lineWrapping||(Ie=mn(Zi(en(K,$.line))),K.iter(Ie,ye.line+1,function(Pt){if(Pt==G.maxLine)return Ae=!0,!0})),K.sel.contains(R.from,R.to)>-1&&Ye(m),mt(K,R,W,Ro(m)),m.options.lineWrapping||(K.iter(Ie,$.line+R.text.length,function(Pt){var tn=bo(Pt);tn>G.maxLineLength&&(G.maxLine=Pt,G.maxLineLength=tn,G.maxLineChanged=!0,Ae=!1)}),Ae&&(m.curOp.updateMaxLine=!0)),Tr(K,$.line),Rs(m,400);var Ke=R.text.length-(ye.line-$.line)-1;R.full?Ki(m):$.line==ye.line&&R.text.length==1&&!Xn(m.doc,R)?ra(m,$.line,"text"):Ki(m,$.line,ye.line+1,Ke);var dt=Pe(m,"changes"),bt=Pe(m,"change");if(bt||dt){var Kt={from:$,to:ye,text:R.text,removed:R.removed,origin:R.origin};bt&&nn(m,"change",m,Kt),dt&&(m.curOp.changeObjs||(m.curOp.changeObjs=[])).push(Kt)}m.display.selForContextMenu=null}function xi(m,R,W,K,G){var $;K||(K=W),xn(K,W)<0&&($=[K,W],W=$[0],K=$[1]),typeof R=="string"&&(R=m.splitLines(R)),Ka(m,{from:W,to:K,text:R,origin:G})}function wi(m,R,W,K){W<m.line?m.line+=K:R<m.line&&(m.line=R,m.ch=0)}function ji(m,R,W,K){for(var G=0;G<m.length;++G){var $=m[G],ye=!0;if($.ranges){$.copied||($=m[G]=$.deepCopy(),$.copied=!0);for(var Ae=0;Ae<$.ranges.length;Ae++)wi($.ranges[Ae].anchor,R,W,K),wi($.ranges[Ae].head,R,W,K);continue}for(var Ie=0;Ie<$.changes.length;++Ie){var Ke=$.changes[Ie];if(W<Ke.from.line)Ke.from=zt(Ke.from.line+K,Ke.from.ch),Ke.to=zt(Ke.to.line+K,Ke.to.ch);else if(R<=Ke.to.line){ye=!1;break}}ye||(m.splice(0,G+1),G=0)}}function Ii(m,R){var W=R.from.line,K=R.to.line,G=R.text.length-(K-W)-1;ji(m.done,W,K,G),ji(m.undone,W,K,G)}function ua(m,R,W,K){var G=R,$=R;return typeof R=="number"?$=en(m,ce(m,R)):G=mn(R),G==null?null:(K($,G)&&m.cm&&ra(m.cm,G,W),$)}function Oa(m){this.lines=m,this.parent=null;for(var R=0,W=0;W<m.length;++W)m[W].parent=this,R+=m[W].height;this.height=R}Oa.prototype={chunkSize:function(){return this.lines.length},removeInner:function(m,R){for(var W=m,K=m+R;W<K;++W){var G=this.lines[W];this.height-=G.height,er(G),nn(G,"delete")}this.lines.splice(m,R)},collapse:function(m){m.push.apply(m,this.lines)},insertInner:function(m,R,W){this.height+=W,this.lines=this.lines.slice(0,m).concat(R).concat(this.lines.slice(m));for(var K=0;K<R.length;++K)R[K].parent=this},iterN:function(m,R,W){for(var K=m+R;m<K;++m)if(W(this.lines[m]))return!0}};function fo(m){this.children=m;for(var R=0,W=0,K=0;K<m.length;++K){var G=m[K];R+=G.chunkSize(),W+=G.height,G.parent=this}this.size=R,this.height=W,this.parent=null}fo.prototype={chunkSize:function(){return this.size},removeInner:function(m,R){this.size-=R;for(var W=0;W<this.children.length;++W){var K=this.children[W],G=K.chunkSize();if(m<G){var $=Math.min(R,G-m),ye=K.height;if(K.removeInner(m,$),this.height-=ye-K.height,G==$&&(this.children.splice(W--,1),K.parent=null),(R-=$)==0)break;m=0}else m-=G}if(this.size-R<25&&(this.children.length>1||!(this.children[0]instanceof Oa))){var Ae=[];this.collapse(Ae),this.children=[new Oa(Ae)],this.children[0].parent=this}},collapse:function(m){for(var R=0;R<this.children.length;++R)this.children[R].collapse(m)},insertInner:function(m,R,W){this.size+=R.length,this.height+=W;for(var K=0;K<this.children.length;++K){var G=this.children[K],$=G.chunkSize();if(m<=$){if(G.insertInner(m,R,W),G.lines&&G.lines.length>50){for(var ye=G.lines.length%25+25,Ae=ye;Ae<G.lines.length;){var Ie=new Oa(G.lines.slice(Ae,Ae+=25));G.height-=Ie.height,this.children.splice(++K,0,Ie),Ie.parent=this}G.lines=G.lines.slice(0,ye),this.maybeSpill()}break}m-=$}},maybeSpill:function(){if(this.children.length<=10)return;var m=this;do{var R=m.children.splice(m.children.length-5,5),W=new fo(R);if(m.parent){m.size-=W.size,m.height-=W.height;var G=re(m.parent.children,m);m.parent.children.splice(G+1,0,W)}else{var K=new fo(m.children);K.parent=m,m.children=[K,W],m=K}W.parent=m.parent}while(m.children.length>10);m.parent.maybeSpill()},iterN:function(m,R,W){for(var K=0;K<this.children.length;++K){var G=this.children[K],$=G.chunkSize();if(m<$){var ye=Math.min(R,$-m);if(G.iterN(m,ye,W))return!0;if((R-=ye)==0)break;m=0}else m-=$}}};var eo=function(m,R,W){if(W)for(var K in W)W.hasOwnProperty(K)&&(this[K]=W[K]);this.doc=m,this.node=R};eo.prototype.clear=function(){var m=this.doc.cm,R=this.line.widgets,W=this.line,K=mn(W);if(K==null||!R)return;for(var G=0;G<R.length;++G)R[G]==this&&R.splice(G--,1);R.length||(W.widgets=null);var $=Aa(this);cn(W,Math.max(0,W.height-$)),m&&(uo(m,function(){ha(m,W,-$),ra(m,K,"widget")}),nn(m,"lineWidgetCleared",m,this,K))},eo.prototype.changed=function(){var m=this,R=this.height,W=this.doc.cm,K=this.line;this.height=null;var G=Aa(this)-R;if(!G)return;ni(this.doc,K)||cn(K,K.height+G),W&&uo(W,function(){W.curOp.forceUpdate=!0,ha(W,K,G),nn(W,"lineWidgetChanged",W,m,mn(K))})},He(eo);function ha(m,R,W){Ja(R)<(m.curOp&&m.curOp.scrollTop||m.doc.scrollTop)&&cl(m,W)}function Co(m,R,W,K){var G=new eo(m,W,K),$=m.cm;return $&&G.noHScroll&&($.display.alignWidgets=!0),ua(m,R,"widget",function(ye){var Ae=ye.widgets||(ye.widgets=[]);if(G.insertAt==null?Ae.push(G):Ae.splice(Math.min(Ae.length-1,Math.max(0,G.insertAt)),0,G),G.line=ye,$&&!ni(m,ye)){var Ie=Ja(ye)<m.scrollTop;cn(ye,ye.height+Aa(G)),Ie&&cl($,G.height),$.curOp.forceUpdate=!0}return!0}),$&&nn($,"lineWidgetAdded",$,G,typeof R=="number"?R:mn(R)),G}var ga=0,po=function(m,R){this.lines=[],this.type=R,this.doc=m,this.id=++ga};po.prototype.clear=function(){if(this.explicitlyCleared)return;var m=this.doc.cm,R=m&&!m.curOp;if(R&&$o(m),Pe(this,"clear")){var W=this.find();W&&nn(this,"clear",W.from,W.to)}for(var K=null,G=null,$=0;$<this.lines.length;++$){var ye=this.lines[$],Ae=ta(ye.markedSpans,this);m&&!this.collapsed?ra(m,mn(ye),"text"):m&&(Ae.to!=null&&(G=mn(ye)),Ae.from!=null&&(K=mn(ye))),ye.markedSpans=Da(ye.markedSpans,Ae),Ae.from==null&&this.collapsed&&!ni(this.doc,ye)&&m&&cn(ye,ma(m.display))}if(m&&this.collapsed&&!m.options.lineWrapping)for(var Ie=0;Ie<this.lines.length;++Ie){var Ke=Zi(this.lines[Ie]),dt=bo(Ke);dt>m.display.maxLineLength&&(m.display.maxLine=Ke,m.display.maxLineLength=dt,m.display.maxLineChanged=!0)}K!=null&&m&&this.collapsed&&Ki(m,K,G+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,m&&da(m.doc)),m&&nn(m,"markerCleared",m,this,K,G),R&&cs(m),this.parent&&this.parent.clear()},po.prototype.find=function(m,R){m==null&&this.type=="bookmark"&&(m=1);for(var W,K,G=0;G<this.lines.length;++G){var $=this.lines[G],ye=ta($.markedSpans,this);if(ye.from!=null&&(W=zt(R?$:mn($),ye.from),m==-1))return W;if(ye.to!=null&&(K=zt(R?$:mn($),ye.to),m==1))return K}return W&&{from:W,to:K}},po.prototype.changed=function(){var m=this,R=this.find(-1,!0),W=this,K=this.doc.cm;if(!R||!K)return;uo(K,function(){var G=R.line,$=mn(R.line),ye=Ot(K,$);if(ye&&(Yr(ye),K.curOp.selectionChanged=K.curOp.forceUpdate=!0),K.curOp.updateMaxLine=!0,!ni(W.doc,G)&&W.height!=null){var Ae=W.height;W.height=null;var Ie=Aa(W)-Ae;Ie&&cn(G,G.height+Ie)}nn(K,"markerChanged",K,m)})},po.prototype.attachLine=function(m){if(!this.lines.length&&this.doc.cm){var R=this.doc.cm.curOp;(!R.maybeHiddenMarkers||re(R.maybeHiddenMarkers,this)==-1)&&(R.maybeUnhiddenMarkers||(R.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(m)},po.prototype.detachLine=function(m){if(this.lines.splice(re(this.lines,m),1),!this.lines.length&&this.doc.cm){var R=this.doc.cm.curOp;(R.maybeHiddenMarkers||(R.maybeHiddenMarkers=[])).push(this)}},He(po);function fa(m,R,W,K,G){if(K&&K.shared)return vi(m,R,W,K,G);if(m.cm&&!m.cm.curOp)return ia(m.cm,fa)(m,R,W,K,G);var $=new po(m,G),ye=xn(R,W);if(K&&L(K,$,!1),ye>0||ye==0&&$.clearWhenEmpty!==!1)return $;if($.replacedWith&&($.collapsed=!0,$.widgetNode=M("span",[$.replacedWith],"CodeMirror-widget"),K.handleMouseEvents||$.widgetNode.setAttribute("cm-ignore-events","true"),K.insertLeft&&($.widgetNode.insertLeft=!0)),$.collapsed){if(Ni(m,R.line,R,W,$)||R.line!=W.line&&Ni(m,W.line,R,W,$))throw new Error("Inserting collapsed marker partially overlapping an existing one");pa()}$.addToHistory&&Ln(m,{from:R,to:W,origin:"markText"},m.sel,NaN);var Ae=R.line,Ie=m.cm,Ke;if(m.iter(Ae,W.line+1,function(bt){Ie&&$.collapsed&&!Ie.options.lineWrapping&&Zi(bt)==Ie.display.maxLine&&(Ke=!0),$.collapsed&&Ae!=R.line&&cn(bt,0),_o(bt,new Bi($,Ae==R.line?R.ch:null,Ae==W.line?W.ch:null)),++Ae}),$.collapsed&&m.iter(R.line,W.line+1,function(bt){ni(m,bt)&&cn(bt,0)}),$.clearOnEnter&&Me($,"beforeCursorEnter",function(){return $.clear()}),$.readOnly&&(oi(),(m.history.done.length||m.history.undone.length)&&m.clearHistory()),$.collapsed&&($.id=++ga,$.atomic=!0),Ie){if(Ke&&(Ie.curOp.updateMaxLine=!0),$.collapsed)Ki(Ie,R.line,W.line+1);else if($.className||$.startStyle||$.endStyle||$.css||$.attributes||$.title)for(var dt=R.line;dt<=W.line;dt++)ra(Ie,dt,"text");$.atomic&&da(Ie.doc),nn(Ie,"markerAdded",Ie,$)}return $}var Ai=function(m,R){this.markers=m,this.primary=R;for(var W=0;W<m.length;++W)m[W].parent=this};Ai.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var m=0;m<this.markers.length;++m)this.markers[m].clear();nn(this,"clear")},Ai.prototype.find=function(m,R){return this.primary.find(m,R)},He(Ai);function vi(m,R,W,K,G){K=L(K),K.shared=!1;var $=[fa(m,R,W,K,G)],ye=$[0],Ae=K.widgetNode;return sn(m,function(Ie){Ae&&(K.widgetNode=Ae.cloneNode(!0)),$.push(fa(Ie,V(Ie,R),V(Ie,W),K,G));for(var Ke=0;Ke<Ie.linked.length;++Ke)if(Ie.linked[Ke].isParent)return;ye=se($)}),new Ai($,ye)}function In(m){return m.findMarks(zt(m.first,0),m.clipPos(zt(m.lastLine())),function(R){return R.parent})}function or(m,R){for(var W=0;W<R.length;W++){var K=R[W],G=K.find(),$=m.clipPos(G.from),ye=m.clipPos(G.to);if(xn($,ye)){var Ae=fa(m,$,ye,K.primary,K.primary.type);K.markers.push(Ae),Ae.parent=K}}}function Cr(m){for(var R=function(K){var G=m[K],$=[G.primary.doc];sn(G.primary.doc,function(Ie){return $.push(Ie)});for(var ye=0;ye<G.markers.length;ye++){var Ae=G.markers[ye];re($,Ae.doc)==-1&&(Ae.parent=null,G.markers.splice(ye--,1))}},W=0;W<m.length;W++)R(W)}var Kr=0,Ir=function(m,R,W,K,G){if(!(this instanceof Ir))return new Ir(m,R,W,K,G);W==null&&(W=0),fo.call(this,[new Oa([new Za("",null)])]),this.first=W,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=W;var $=zt(W,0);this.sel=Zt($),this.history=new zn(null),this.id=++Kr,this.modeOption=R,this.lineSep=K,this.direction=G=="rtl"?"rtl":"ltr",this.extend=!1,typeof m=="string"&&(m=this.splitLines(m)),mt(this,{from:$,to:$,text:m}),fi(this,Zt($),ke)};Ir.prototype=Fe(fo.prototype,{constructor:Ir,iter:function(m,R,W){W?this.iterN(m-this.first,R-m,W):this.iterN(this.first,this.first+this.size,m)},insert:function(m,R){for(var W=0,K=0;K<R.length;++K)W+=R[K].height;this.insertInner(m-this.first,R,W)},remove:function(m,R){this.removeInner(m-this.first,R)},getValue:function(m){var R=$t(this,this.first,this.first+this.size);return m===!1?R:R.join(m||this.lineSeparator())},setValue:wa(function(m){var R=zt(this.first,0),W=this.first+this.size-1;Ka(this,{from:R,to:zt(W,en(this,W).text.length),text:this.splitLines(m),origin:"setValue",full:!0},!0),this.cm&&os(this.cm,0,0),fi(this,Zt(R),ke)}),replaceRange:function(m,R,W,K){R=V(this,R),W=W?V(this,W):R,xi(this,m,R,W,K)},getRange:function(m,R,W){var K=qn(this,V(this,m),V(this,R));return W===!1?K:K.join(W||this.lineSeparator())},getLine:function(m){var R=this.getLineHandle(m);return R&&R.text},getLineHandle:function(m){if(Vn(this,m))return en(this,m)},getLineNumber:function(m){return mn(m)},getLineHandleVisualStart:function(m){return typeof m=="number"&&(m=en(this,m)),Zi(m)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(m){return V(this,m)},getCursor:function(m){var R=this.sel.primary(),W;return m==null||m=="head"?W=R.head:m=="anchor"?W=R.anchor:m=="end"||m=="to"||m===!1?W=R.to():W=R.from(),W},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:wa(function(m,R,W){Di(this,V(this,typeof m=="number"?zt(m,R||0):m),null,W)}),setSelection:wa(function(m,R,W){Di(this,V(this,m),V(this,R||m),W)}),extendSelection:wa(function(m,R,W){Dn(this,V(this,m),R&&V(this,R),W)}),extendSelections:wa(function(m,R){kr(this,ee(this,m),R)}),extendSelectionsBy:wa(function(m,R){var W=be(this.sel.ranges,m);kr(this,ee(this,W),R)}),setSelections:wa(function(m,R,W){if(!m.length)return;for(var K=[],G=0;G<m.length;G++)K[G]=new It(V(this,m[G].anchor),V(this,m[G].head));R==null&&(R=Math.min(m.length-1,this.sel.primIndex)),fi(this,Vt(this.cm,K,R),W)}),addSelection:wa(function(m,R,W){var K=this.sel.ranges.slice(0);K.push(new It(V(this,m),V(this,R||m))),fi(this,Vt(this.cm,K,K.length-1),W)}),getSelection:function(m){for(var R=this.sel.ranges,W,K=0;K<R.length;K++){var G=qn(this,R[K].from(),R[K].to());W=W?W.concat(G):G}return m===!1?W:W.join(m||this.lineSeparator())},getSelections:function(m){for(var R=[],W=this.sel.ranges,K=0;K<W.length;K++){var G=qn(this,W[K].from(),W[K].to());m!==!1&&(G=G.join(m||this.lineSeparator())),R[K]=G}return R},replaceSelection:function(m,R,W){for(var K=[],G=0;G<this.sel.ranges.length;G++)K[G]=m;this.replaceSelections(K,R,W||"+input")},replaceSelections:wa(function(m,R,W){for(var K=[],G=this.sel,$=0;$<G.ranges.length;$++){var ye=G.ranges[$];K[$]={from:ye.from(),to:ye.to(),text:this.splitLines(m[$]),origin:W}}for(var Ae=R&&R!="end"&&Sn(this,K,R),Ie=K.length-1;Ie>=0;Ie--)Ka(this,K[Ie]);Ae?Ma(this,Ae):this.cm&&vs(this.cm)}),undo:wa(function(){oa(this,"undo")}),redo:wa(function(){oa(this,"redo")}),undoSelection:wa(function(){oa(this,"undo",!0)}),redoSelection:wa(function(){oa(this,"redo",!0)}),setExtending:function(m){this.extend=m},getExtending:function(){return this.extend},historySize:function(){for(var m=this.history,R=0,W=0,K=0;K<m.done.length;K++)m.done[K].ranges||++R;for(var G=0;G<m.undone.length;G++)m.undone[G].ranges||++W;return{undo:R,redo:W}},clearHistory:function(){var m=this;this.history=new zn(this.history.maxGeneration),sn(this,function(R){return R.history=m.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(m){return m&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(m){return this.history.generation==(m||this.cleanGeneration)},getHistory:function(){return{done:xr(this.history.done),undone:xr(this.history.undone)}},setHistory:function(m){var R=this.history=new zn(this.history.maxGeneration);R.done=xr(m.done.slice(0),null,!0),R.undone=xr(m.undone.slice(0),null,!0)},setGutterMarker:wa(function(m,R,W){return ua(this,m,"gutter",function(K){var G=K.gutterMarkers||(K.gutterMarkers={});return G[R]=W,!W&&Y(G)&&(K.gutterMarkers=null),!0})}),clearGutter:wa(function(m){var R=this;this.iter(function(W){W.gutterMarkers&&W.gutterMarkers[m]&&ua(R,W,"gutter",function(){return W.gutterMarkers[m]=null,Y(W.gutterMarkers)&&(W.gutterMarkers=null),!0})})}),lineInfo:function(m){var R;if(typeof m=="number"){if(!Vn(this,m))return null;if(R=m,m=en(this,m),!m)return null}else if(R=mn(m),R==null)return null;return{line:R,handle:m,text:m.text,gutterMarkers:m.gutterMarkers,textClass:m.textClass,bgClass:m.bgClass,wrapClass:m.wrapClass,widgets:m.widgets}},addLineClass:wa(function(m,R,W){return ua(this,m,R=="gutter"?"gutter":"class",function(K){var G=R=="text"?"textClass":R=="background"?"bgClass":R=="gutter"?"gutterClass":"wrapClass";if(!K[G])K[G]=W;else{if(C(W).test(K[G]))return!1;K[G]+=" "+W}return!0})}),removeLineClass:wa(function(m,R,W){return ua(this,m,R=="gutter"?"gutter":"class",function(K){var G=R=="text"?"textClass":R=="background"?"bgClass":R=="gutter"?"gutterClass":"wrapClass",$=K[G];if($)if(W==null)K[G]=null;else{var ye=$.match(C(W));if(!ye)return!1;var Ae=ye.index+ye[0].length;K[G]=$.slice(0,ye.index)+(!ye.index||Ae==$.length?"":" ")+$.slice(Ae)||null}else return!1;return!0})}),addLineWidget:wa(function(m,R,W){return Co(this,m,R,W)}),removeLineWidget:function(m){m.clear()},markText:function(m,R,W){return fa(this,V(this,m),V(this,R),W,W&&W.type||"range")},setBookmark:function(m,R){var W={replacedWith:R&&(R.nodeType==null?R.widget:R),insertLeft:R&&R.insertLeft,clearWhenEmpty:!1,shared:R&&R.shared,handleMouseEvents:R&&R.handleMouseEvents};return m=V(this,m),fa(this,m,m,W,"bookmark")},findMarksAt:function(m){m=V(this,m);var R=[],W=en(this,m.line).markedSpans;if(W)for(var K=0;K<W.length;++K){var G=W[K];(G.from==null||G.from<=m.ch)&&(G.to==null||G.to>=m.ch)&&R.push(G.marker.parent||G.marker)}return R},findMarks:function(m,R,W){m=V(this,m),R=V(this,R);var K=[],G=m.line;return this.iter(m.line,R.line+1,function($){var ye=$.markedSpans;if(ye)for(var Ae=0;Ae<ye.length;Ae++){var Ie=ye[Ae];!(Ie.to!=null&&G==m.line&&m.ch>=Ie.to||Ie.from==null&&G!=m.line||Ie.from!=null&&G==R.line&&Ie.from>=R.ch)&&(!W||W(Ie.marker))&&K.push(Ie.marker.parent||Ie.marker)}++G}),K},getAllMarks:function(){var m=[];return this.iter(function(R){var W=R.markedSpans;if(W)for(var K=0;K<W.length;++K)W[K].from!=null&&m.push(W[K].marker)}),m},posFromIndex:function(m){var R,W=this.first,K=this.lineSeparator().length;return this.iter(function(G){var $=G.text.length+K;if($>m)return R=m,!0;m-=$,++W}),V(this,zt(W,R))},indexFromPos:function(m){m=V(this,m);var R=m.ch;if(m.line<this.first||m.ch<0)return 0;var W=this.lineSeparator().length;return this.iter(this.first,m.line,function(K){R+=K.text.length+W}),R},copy:function(m){var R=new Ir($t(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return R.scrollTop=this.scrollTop,R.scrollLeft=this.scrollLeft,R.sel=this.sel,R.extend=!1,m&&(R.history.undoDepth=this.history.undoDepth,R.setHistory(this.getHistory())),R},linkedDoc:function(m){m||(m={});var R=this.first,W=this.first+this.size;m.from!=null&&m.from>R&&(R=m.from),m.to!=null&&m.to<W&&(W=m.to);var K=new Ir($t(this,R,W),m.mode||this.modeOption,R,this.lineSep,this.direction);return m.sharedHist&&(K.history=this.history),(this.linked||(this.linked=[])).push({doc:K,sharedHist:m.sharedHist}),K.linked=[{doc:this,isParent:!0,sharedHist:m.sharedHist}],or(K,In(this)),K},unlinkDoc:function(m){if(m instanceof ca&&(m=m.doc),this.linked)for(var R=0;R<this.linked.length;++R){var W=this.linked[R];if(W.doc!=m)continue;this.linked.splice(R,1),m.unlinkDoc(this),Cr(In(this));break}if(m.history==this.history){var K=[m.id];sn(m,function(G){return K.push(G.id)},!0),m.history=new zn(null),m.history.done=xr(this.history.done,K),m.history.undone=xr(this.history.undone,K)}},iterLinkedDocs:function(m){sn(this,m)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(m){return this.lineSep?m.split(this.lineSep):xt(m)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:wa(function(m){if(m!="rtl"&&(m="ltr"),m==this.direction)return;this.direction=m,this.iter(function(R){return R.order=null}),this.cm&&An(this.cm)})}),Ir.prototype.eachLine=Ir.prototype.iter;var ii=0;function Fo(m){var R=this;if(es(R),Je(R,m)||Go(R.display,m))return;ve(m),_&&(ii=+new Date);var W=ka(R,m,!0),K=m.dataTransfer.files;if(!W||R.isReadOnly())return;if(K&&K.length&&window.FileReader&&window.File)for(var G=K.length,$=Array(G),ye=0,Ae=function(){++ye==G&&ia(R,function(){W=V(R.doc,W);var Pt={from:W,to:W,text:R.doc.splitLines($.filter(function(tn){return tn!=null}).join(R.doc.lineSeparator())),origin:"paste"};Ka(R.doc,Pt),Ma(R.doc,Zt(V(R.doc,W),V(R.doc,on(Pt))))})()},Ie=function(Pt,tn){if(R.options.allowDropFileTypes&&re(R.options.allowDropFileTypes,Pt.type)==-1){Ae();return}var un=new FileReader;un.onerror=function(){return Ae()},un.onload=function(){var Cn=un.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Cn)){Ae();return}$[tn]=Cn,Ae()},un.readAsText(Pt)},Ke=0;Ke<K.length;Ke++)Ie(K[Ke],Ke);else{if(R.state.draggingText&&R.doc.sel.contains(W)>-1){R.state.draggingText(m),setTimeout(function(){return R.display.input.focus()},20);return}try{var dt=m.dataTransfer.getData("Text");if(dt){var bt;if(R.state.draggingText&&!R.state.draggingText.copy&&(bt=R.listSelections()),Sa(R.doc,Zt(W,W)),bt)for(var Kt=0;Kt<bt.length;++Kt)xi(R.doc,"",bt[Kt].anchor,bt[Kt].head,"drag");R.replaceSelection(dt,"around","paste"),R.display.input.focus()}}catch(Pt){}}}function Wa(m,R){if(_&&(!m.state.draggingText||+new Date-ii<100)){je(R);return}if(Je(m,R)||Go(m.display,R))return;if(R.dataTransfer.setData("Text",m.getSelection()),R.dataTransfer.effectAllowed="copyMove",R.dataTransfer.setDragImage&&!r){var W=D("img",null,null,"position: fixed; left: 0; top: 0;");W.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",l&&(W.width=W.height=1,m.display.wrapper.appendChild(W),W._top=W.offsetTop),R.dataTransfer.setDragImage(W,0,0),l&&W.parentNode.removeChild(W)}}function mo(m,R){var W=ka(m,R);if(!W)return;var K=document.createDocumentFragment();Jo(m,W,K),m.display.dragCursor||(m.display.dragCursor=D("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),m.display.lineSpace.insertBefore(m.display.dragCursor,m.display.cursorDiv)),A(m.display.dragCursor,K)}function es(m){m.display.dragCursor&&(m.display.lineSpace.removeChild(m.display.dragCursor),m.display.dragCursor=null)}function ts(m){if(!document.getElementsByClassName)return;for(var R=document.getElementsByClassName("CodeMirror"),W=[],K=0;K<R.length;K++){var G=R[K].CodeMirror;G&&W.push(G)}W.length&&W[0].operation(function(){for(var $=0;$<W.length;$++)m(W[$])})}var hs=!1;function jo(){if(hs)return;go(),hs=!0}function go(){var m;Me(window,"resize",function(){m==null&&(m=setTimeout(function(){m=null,ts(ml)},100))}),Me(window,"blur",function(){return ts(as)})}function ml(m){var R=m.display;R.cachedCharWidth=R.cachedTextHeight=R.cachedPaddingH=null,R.scrollbarsClipped=!1,m.setSize()}for(var ns={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"},fs=0;fs<10;fs++)ns[fs+48]=ns[fs+96]=String(fs);for(var Vs=65;Vs<=90;Vs++)ns[Vs]=String.fromCharCode(Vs);for(var Ds=1;Ds<=12;Ds++)ns[Ds+111]=ns[Ds+63235]="F"+Ds;var Mo={};Mo.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"},Mo.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"},Mo.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"},Mo.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"]},Mo.default=f?Mo.macDefault:Mo.pcDefault;function Is(m){var R=m.split(/-(?!$)/);m=R[R.length-1];for(var W,K,G,$,ye=0;ye<R.length-1;ye++){var Ae=R[ye];if(/^(cmd|meta|m)$/i.test(Ae))$=!0;else if(/^a(lt)?$/i.test(Ae))W=!0;else if(/^(c|ctrl|control)$/i.test(Ae))K=!0;else if(/^s(hift)?$/i.test(Ae))G=!0;else throw new Error("Unrecognized modifier name: "+Ae)}return W&&(m="Alt-"+m),K&&(m="Ctrl-"+m),$&&(m="Cmd-"+m),G&&(m="Shift-"+m),m}function ks(m){var R={};for(var W in m)if(m.hasOwnProperty(W)){var K=m[W];if(/^(name|fallthrough|(de|at)tach)$/.test(W))continue;if(K=="..."){delete m[W];continue}for(var G=be(W.split(" "),Is),$=0;$<G.length;$++){var ye=void 0,Ae=void 0;$==G.length-1?(Ae=G.join(" "),ye=K):(Ae=G.slice(0,$+1).join(" "),ye="...");var Ie=R[Ae];if(!Ie)R[Ae]=ye;else if(Ie!=ye)throw new Error("Inconsistent bindings for "+Ae)}delete m[W]}for(var Ke in R)m[Ke]=R[Ke];return m}function ps(m,R,W,K){R=Ls(R);var G=R.call?R.call(m,K):R[m];if(G===!1)return"nothing";if(G==="...")return"multi";if(G!=null&&W(G))return"handled";if(R.fallthrough){if(Object.prototype.toString.call(R.fallthrough)!="[object Array]")return ps(m,R.fallthrough,W,K);for(var $=0;$<R.fallthrough.length;$++){var ye=ps(m,R.fallthrough[$],W,K);if(ye)return ye}}}function Ys(m){var R=typeof m=="string"?m:ns[m.keyCode];return R=="Ctrl"||R=="Alt"||R=="Shift"||R=="Mod"}function Qs(m,R,W){var K=m;return R.altKey&&K!="Alt"&&(m="Alt-"+m),(x?R.metaKey:R.ctrlKey)&&K!="Ctrl"&&(m="Ctrl-"+m),(x?R.ctrlKey:R.metaKey)&&K!="Mod"&&(m="Cmd-"+m),!W&&R.shiftKey&&K!="Shift"&&(m="Shift-"+m),m}function Js(m,R){if(l&&m.keyCode==34&&m.char)return!1;var W=ns[m.keyCode];return W==null||m.altGraphKey?!1:(m.keyCode==3&&m.code&&(W=m.code),Qs(W,m,R))}function Ls(m){return typeof m=="string"?Mo[m]:m}function rs(m,R){for(var W=m.doc.sel.ranges,K=[],G=0;G<W.length;G++){for(var $=R(W[G]);K.length&&xn($.from,se(K).to)<=0;){var ye=K.pop();if(xn(ye.from,$.from)<0){$.from=ye.from;break}}K.push($)}uo(m,function(){for(var Ae=K.length-1;Ae>=0;Ae--)xi(m.doc,"",K[Ae].from,K[Ae].to,"+delete");vs(m)})}function Zs(m,R,W){var K=Ee(m.text,R+W,W);return K<0||K>m.text.length?null:K}function gl(m,R,W){var K=Zs(m,R.ch,W);return K==null?null:new zt(R.line,K,W<0?"after":"before")}function vl(m,R,W,K,G){if(m){R.doc.direction=="rtl"&&(G=-G);var $=tt(W,R.doc.direction);if($){var ye=G<0?se($):$[0],Ae=G<0==(ye.level==1),Ie=Ae?"after":"before",Ke;if(ye.level>0||R.doc.direction=="rtl"){var dt=Tt(R,W);Ke=G<0?W.text.length-1:0;var bt=Mt(R,dt,Ke).top;Ke=Le(function(Kt){return Mt(R,dt,Kt).top==bt},G<0==(ye.level==1)?ye.from:ye.to-1,Ke),Ie=="before"&&(Ke=Zs(W,Ke,1))}else Ke=G<0?ye.to:ye.from;return new zt(K,Ke,Ie)}}return new zt(K,G<0?W.text.length:0,G<0?"before":"after")}function Xl(m,R,W,K){var G=tt(R,m.doc.direction);if(!G)return gl(R,W,K);W.ch>=R.text.length?(W.ch=R.text.length,W.sticky="before"):W.ch<=0&&(W.ch=0,W.sticky="after");var $=_e(G,W.ch,W.sticky),ye=G[$];if(m.doc.direction=="ltr"&&ye.level%2==0&&(K>0?ye.to>W.ch:ye.from<W.ch))return gl(R,W,K);var Ae=function(Fn,Zn){return Zs(R,Fn instanceof zt?Fn.ch:Fn,Zn)},Ie,Ke=function(Fn){return m.options.lineWrapping?(Ie=Ie||Tt(m,R),ir(m,R,Ie,Fn)):{begin:0,end:R.text.length}},dt=Ke(W.sticky=="before"?Ae(W,-1):W.ch);if(m.doc.direction=="rtl"||ye.level==1){var bt=ye.level==1==K<0,Kt=Ae(W,bt?1:-1);if(Kt!=null&&(bt?Kt<=ye.to&&Kt<=dt.end:Kt>=ye.from&&Kt>=dt.begin)){var Pt=bt?"before":"after";return new zt(W.line,Kt,Pt)}}var tn=function(Fn,Zn,jn){for(var rr=function(ea,oo){return oo?new zt(W.line,Ae(ea,1),"before"):new zt(W.line,ea,"after")};Fn>=0&&Fn<G.length;Fn+=Zn){var Rr=G[Fn],gr=Zn>0==(Rr.level!=1),ai=gr?jn.begin:Ae(jn.end,-1);if(Rr.from<=ai&&ai<Rr.to)return rr(ai,gr);if(ai=gr?Rr.from:Ae(Rr.to,-1),jn.begin<=ai&&ai<jn.end)return rr(ai,gr)}},un=tn($+K,K,dt);if(un)return un;var Cn=K>0?dt.end:Ae(dt.begin,-1);return Cn!=null&&!(K>0&&Cn==R.text.length)&&(un=tn(K>0?0:G.length-1,K,Ke(Cn)),un)?un:null}var bs={selectAll:ao,singleSelection:function(m){return m.setSelection(m.getCursor("anchor"),m.getCursor("head"),ke)},killLine:function(m){return rs(m,function(R){if(R.empty()){var W=en(m.doc,R.head.line).text.length;return R.head.ch==W&&R.head.line<m.lastLine()?{from:R.head,to:zt(R.head.line+1,0)}:{from:R.head,to:zt(R.head.line,W)}}else return{from:R.from(),to:R.to()}})},deleteLine:function(m){return rs(m,function(R){return{from:zt(R.from().line,0),to:V(m.doc,zt(R.to().line+1,0))}})},delLineLeft:function(m){return rs(m,function(R){return{from:zt(R.from().line,0),to:R.from()}})},delWrappedLineLeft:function(m){return rs(m,function(R){var W=m.charCoords(R.head,"div").top+5,K=m.coordsChar({left:0,top:W},"div");return{from:K,to:R.from()}})},delWrappedLineRight:function(m){return rs(m,function(R){var W=m.charCoords(R.head,"div").top+5,K=m.coordsChar({left:m.display.lineDiv.offsetWidth+100,top:W},"div");return{from:R.from(),to:K}})},undo:function(m){return m.undo()},redo:function(m){return m.redo()},undoSelection:function(m){return m.undoSelection()},redoSelection:function(m){return m.redoSelection()},goDocStart:function(m){return m.extendSelection(zt(m.firstLine(),0))},goDocEnd:function(m){return m.extendSelection(zt(m.lastLine()))},goLineStart:function(m){return m.extendSelectionsBy(function(R){return Lr(m,R.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(m){return m.extendSelectionsBy(function(R){return va(m,R.head)},{origin:"+move",bias:1})},goLineEnd:function(m){return m.extendSelectionsBy(function(R){return pi(m,R.head.line)},{origin:"+move",bias:-1})},goLineRight:function(m){return m.extendSelectionsBy(function(R){var W=m.cursorCoords(R.head,"div").top+5;return m.coordsChar({left:m.display.lineDiv.offsetWidth+100,top:W},"div")},Re)},goLineLeft:function(m){return m.extendSelectionsBy(function(R){var W=m.cursorCoords(R.head,"div").top+5;return m.coordsChar({left:0,top:W},"div")},Re)},goLineLeftSmart:function(m){return m.extendSelectionsBy(function(R){var W=m.cursorCoords(R.head,"div").top+5,K=m.coordsChar({left:0,top:W},"div");return K.ch<m.getLine(K.line).search(/\S/)?va(m,R.head):K},Re)},goLineUp:function(m){return m.moveV(-1,"line")},goLineDown:function(m){return m.moveV(1,"line")},goPageUp:function(m){return m.moveV(-1,"page")},goPageDown:function(m){return m.moveV(1,"page")},goCharLeft:function(m){return m.moveH(-1,"char")},goCharRight:function(m){return m.moveH(1,"char")},goColumnLeft:function(m){return m.moveH(-1,"column")},goColumnRight:function(m){return m.moveH(1,"column")},goWordLeft:function(m){return m.moveH(-1,"word")},goGroupRight:function(m){return m.moveH(1,"group")},goGroupLeft:function(m){return m.moveH(-1,"group")},goWordRight:function(m){return m.moveH(1,"word")},delCharBefore:function(m){return m.deleteH(-1,"codepoint")},delCharAfter:function(m){return m.deleteH(1,"char")},delWordBefore:function(m){return m.deleteH(-1,"word")},delWordAfter:function(m){return m.deleteH(1,"word")},delGroupBefore:function(m){return m.deleteH(-1,"group")},delGroupAfter:function(m){return m.deleteH(1,"group")},indentAuto:function(m){return m.indentSelection("smart")},indentMore:function(m){return m.indentSelection("add")},indentLess:function(m){return m.indentSelection("subtract")},insertTab:function(m){return m.replaceSelection(" ")},insertSoftTab:function(m){for(var R=[],W=m.listSelections(),K=m.options.tabSize,G=0;G<W.length;G++){var $=W[G].from(),ye=B(m.getLine($.line),$.ch,K);R.push(me(K-ye%K))}m.replaceSelections(R)},defaultTab:function(m){m.somethingSelected()?m.indentSelection("add"):m.execCommand("insertTab")},transposeChars:function(m){return uo(m,function(){for(var R=m.listSelections(),W=[],K=0;K<R.length;K++){if(!R[K].empty())continue;var G=R[K].head,$=en(m.doc,G.line).text;if($){if(G.ch==$.length&&(G=new zt(G.line,G.ch-1)),G.ch>0)G=new zt(G.line,G.ch+1),m.replaceRange($.charAt(G.ch-1)+$.charAt(G.ch-2),zt(G.line,G.ch-2),G,"+transpose");else if(G.line>m.doc.first){var ye=en(m.doc,G.line-1).text;ye&&(G=new zt(G.line,1),m.replaceRange($.charAt(0)+m.doc.lineSeparator()+ye.charAt(ye.length-1),zt(G.line-1,ye.length-1),G,"+transpose"))}}W.push(new It(G,G))}m.setSelections(W)})},newlineAndIndent:function(m){return uo(m,function(){for(var R=m.listSelections(),W=R.length-1;W>=0;W--)m.replaceRange(m.doc.lineSeparator(),R[W].anchor,R[W].head,"+input");R=m.listSelections();for(var K=0;K<R.length;K++)m.indentLine(R[K].from().line,null,!0);vs(m)})},openLine:function(m){return m.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(m){return m.toggleOverwrite()}};function Lr(m,R){var W=en(m.doc,R),K=Zi(W);return K!=W&&(R=mn(K)),vl(!0,m,K,R,1)}function pi(m,R){var W=en(m.doc,R),K=yo(W);return K!=W&&(R=mn(K)),vl(!0,m,W,R,-1)}function va(m,R){var W=Lr(m,R.line),K=en(m.doc,W.line),G=tt(K,m.doc.direction);if(!G||G[0].level==0){var $=Math.max(W.ch,K.text.search(/\S/)),ye=R.line==W.line&&R.ch<=$&&R.ch;return zt(W.line,ye?0:$,W.sticky)}return W}function Xa(m,R,W){if(typeof R=="string"&&(R=bs[R],!R))return!1;m.display.input.ensurePolled();var K=m.display.shift,G=!1;try{m.isReadOnly()&&(m.state.suppressEdits=!0),W&&(m.display.shift=!1),G=R(m)!=Ce}finally{m.display.shift=K,m.state.suppressEdits=!1}return G}function _a(m,R,W){for(var K=0;K<m.state.keyMaps.length;K++){var G=ps(R,m.state.keyMaps[K],W,m);if(G)return G}return m.options.extraKeys&&ps(R,m.options.extraKeys,W,m)||ps(R,m.options.keyMap,W,m)}var is=new Z;function Na(m,R,W,K){var G=m.state.keySeq;if(G){if(Ys(R))return"handled";if(/\'$/.test(R)?m.state.keySeq=null:is.set(50,function(){m.state.keySeq==G&&(m.state.keySeq=null,m.display.input.reset())}),$s(m,G+" "+R,W,K))return!0}return $s(m,R,W,K)}function $s(m,R,W,K){var G=_a(m,R,K);return G=="multi"&&(m.state.keySeq=R),G=="handled"&&nn(m,"keyHandled",m,R,W),(G=="handled"||G=="multi")&&(ve(W),La(m)),!!G}function Es(m,R){var W=Js(R,!0);return W?R.shiftKey&&!m.state.keySeq?Na(m,"Shift-"+W,R,function(K){return Xa(m,K,!0)})||Na(m,W,R,function(K){if(typeof K=="string"?/^go[A-Z]/.test(K):K.motion)return Xa(m,K)}):Na(m,W,R,function(K){return Xa(m,K)}):!1}function el(m,R,W){return Na(m,"'"+W+"'",R,function(K){return Xa(m,K,!0)})}var ms=null;function tl(m){var R=this;if(m.target&&m.target!=R.display.input.getField())return;if(R.curOp.focus=z(),Je(R,m))return;_&&p<11&&m.keyCode==27&&(m.returnValue=!1);var W=m.keyCode;R.display.shift=W==16||m.shiftKey;var K=Es(R,m);l&&(ms=K?W:null,!K&&W==88&&!st&&(f?m.metaKey:m.ctrlKey)&&R.replaceSelection("",null,"cut")),T&&!f&&!K&&W==46&&m.shiftKey&&!m.ctrlKey&&document.execCommand&&document.execCommand("cut"),W==18&&!/\bCodeMirror-crosshair\b/.test(R.display.lineDiv.className)&&_l(R)}function _l(m){var R=m.display.lineDiv;X(R,"CodeMirror-crosshair");function W(K){(K.keyCode==18||!K.altKey)&&(w(R,"CodeMirror-crosshair"),Oe(document,"keyup",W),Oe(document,"mouseover",W))}Me(document,"keyup",W),Me(document,"mouseover",W)}function xs(m){m.keyCode==16&&(this.doc.sel.shift=!1),Je(this,m)}function Ms(m){var R=this;if(m.target&&m.target!=R.display.input.getField())return;if(Go(R.display,m)||Je(R,m)||m.ctrlKey&&!m.altKey||f&&m.metaKey)return;var W=m.keyCode,K=m.charCode;if(l&&W==ms){ms=null,ve(m);return}if(l&&(!m.which||m.which<10)&&Es(R,m))return;var G=String.fromCharCode(K==null?W:K);if(G=="\b")return;if(el(R,m,G))return;R.display.input.onKeyPress(m)}var Jl=400,za=function(m,R,W){this.time=m,this.pos=R,this.button=W};za.prototype.compare=function(m,R,W){return this.time+Jl>m&&xn(R,this.pos)==0&&W==this.button};var Ps,ws;function Il(m,R){var W=+new Date;return ws&&ws.compare(W,m,R)?(Ps=ws=null,"triple"):Ps&&Ps.compare(W,m,R)?(ws=new za(W,m,R),Ps=null,"double"):(Ps=new za(W,m,R),ws=null,"single")}function Hn(m){var R=this,W=R.display;if(Je(R,m)||W.activeTouch&&W.input.supportsTouch())return;if(W.input.ensurePolled(),W.shift=m.shiftKey,Go(W,m)){e||(W.scroller.draggable=!1,setTimeout(function(){return W.scroller.draggable=!0},100));return}if(mr(R,m))return;var K=ka(R,m),G=ne(m),$=K?Il(K,G):"single";if(window.focus(),G==1&&R.state.selectingText&&R.state.selectingText(m),K&&Wn(R,G,K,$,m))return;G==1?K?sr(R,K,$,m):Qe(m)==W.scroller&&ve(m):G==2?(K&&Dn(R.doc,K),setTimeout(function(){return W.input.focus()},20)):G==3&&(O?R.display.input.onContextMenu(m):ll(R))}function Wn(m,R,W,K,G){var $="Click";return K=="double"?$="Double"+$:K=="triple"&&($="Triple"+$),$=(R==1?"Left":R==2?"Middle":"Right")+$,Na(m,Qs($,G),G,function(ye){if(typeof ye=="string"&&(ye=bs[ye]),!ye)return!1;var Ae=!1;try{m.isReadOnly()&&(m.state.suppressEdits=!0),Ae=ye(m,W)!=Ce}finally{m.state.suppressEdits=!1}return Ae})}function Gn(m,R,W){var K=m.getOption("configureMouse"),G=K?K(m,R,W):{};if(G.unit==null){var $=h?W.shiftKey&&W.metaKey:W.altKey;G.unit=$?"rectangle":R=="single"?"char":R=="double"?"word":"line"}return(G.extend==null||m.doc.extend)&&(G.extend=m.doc.extend||W.shiftKey),G.addNew==null&&(G.addNew=f?W.metaKey:W.ctrlKey),G.moveOnDrag==null&&(G.moveOnDrag=!(f?W.altKey:W.ctrlKey)),G}function sr(m,R,W,K){_?setTimeout(U(js,m),0):m.curOp.focus=z();var G=Gn(m,W,K),$=m.doc.sel,ye;m.options.dragDrop&&Ze&&!m.isReadOnly()&&W=="single"&&(ye=$.contains(R))>-1&&(xn((ye=$.ranges[ye]).from(),R)<0||R.xRel>0)&&(xn(ye.to(),R)>0||R.xRel<0)?Bn(m,K,R,G):Gr(m,K,R,G)}function Bn(m,R,W,K){var G=m.display,$=!1,ye=ia(m,function(Ke){e&&(G.scroller.draggable=!1),m.state.draggingText=!1,Oe(G.wrapper.ownerDocument,"mouseup",ye),Oe(G.wrapper.ownerDocument,"mousemove",Ae),Oe(G.scroller,"dragstart",Ie),Oe(G.scroller,"drop",ye),$||(ve(Ke),K.addNew||Dn(m.doc,W,null,null,K.extend),e&&!r||_&&p==9?setTimeout(function(){G.wrapper.ownerDocument.body.focus({preventScroll:!0}),G.input.focus()},20):G.input.focus())}),Ae=function(Ke){$=$||Math.abs(R.clientX-Ke.clientX)+Math.abs(R.clientY-Ke.clientY)>=10},Ie=function(){return $=!0};e&&(G.scroller.draggable=!0),m.state.draggingText=ye,ye.copy=!K.moveOnDrag,G.scroller.dragDrop&&G.scroller.dragDrop(),Me(G.wrapper.ownerDocument,"mouseup",ye),Me(G.wrapper.ownerDocument,"mousemove",Ae),Me(G.scroller,"dragstart",Ie),Me(G.scroller,"drop",ye),ll(m),setTimeout(function(){return G.input.focus()},20)}function dr(m,R,W){if(W=="char")return new It(R,R);if(W=="word")return m.findWordAt(R);if(W=="line")return new It(zt(R.line,0),V(m.doc,zt(R.line+1,0)));var K=W(m,R);return new It(K.from,K.to)}function Gr(m,R,W,K){var G=m.display,$=m.doc;ve(R);var ye,Ae,Ie=$.sel,Ke=Ie.ranges;if(K.addNew&&!K.extend?(Ae=$.sel.contains(W),Ae>-1?ye=Ke[Ae]:ye=new It(W,W)):(ye=$.sel.primary(),Ae=$.sel.primIndex),K.unit=="rectangle")K.addNew||(ye=new It(W,W)),W=ka(m,R,!0,!0),Ae=-1;else{var dt=dr(m,W,K.unit);K.extend?ye=Fr(ye,dt.anchor,dt.head,K.extend):ye=dt}K.addNew?Ae==-1?(Ae=Ke.length,fi($,Vt(m,Ke.concat([ye]),Ae),{scroll:!1,origin:"*mouse"})):Ke.length>1&&Ke[Ae].empty()&&K.unit=="char"&&!K.extend?(fi($,Vt(m,Ke.slice(0,Ae).concat(Ke.slice(Ae+1)),0),{scroll:!1,origin:"*mouse"}),Ie=$.sel):Pi($,Ae,ye,te):(Ae=0,fi($,new Ft([ye],0),te),Ie=$.sel);var bt=W;function Kt(jn){if(xn(bt,jn)==0)return;if(bt=jn,K.unit=="rectangle"){for(var rr=[],Rr=m.options.tabSize,gr=B(en($,W.line).text,W.ch,Rr),ai=B(en($,jn.line).text,jn.ch,Rr),ea=Math.min(gr,ai),oo=Math.max(gr,ai),Ca=Math.min(W.line,jn.line),Ho=Math.min(m.lastLine(),Math.max(W.line,jn.line));Ca<=Ho;Ca++){var Po=en($,Ca).text,Va=Te(Po,ea,Rr);ea==oo?rr.push(new It(zt(Ca,Va),zt(Ca,Va))):Po.length>Va&&rr.push(new It(zt(Ca,Va),zt(Ca,Te(Po,oo,Rr))))}rr.length||rr.push(new It(W,W)),fi($,Vt(m,Ie.ranges.slice(0,Ae).concat(rr),Ae),{origin:"*mouse",scroll:!1}),m.scrollIntoView(jn)}else{var No=ye,vo=dr(m,jn,K.unit),no=No.anchor,Ya;xn(vo.anchor,no)>0?(Ya=vo.head,no=Yn(No.from(),vo.anchor)):(Ya=vo.anchor,no=Tn(No.to(),vo.head));var Ra=Ie.ranges.slice(0);Ra[Ae]=Or(m,new It(V($,no),Ya)),fi($,Vt(m,Ra,Ae),te)}}var Pt=G.wrapper.getBoundingClientRect(),tn=0;function un(jn){var rr=++tn,Rr=ka(m,jn,!0,K.unit=="rectangle");if(!Rr)return;if(xn(Rr,bt)!=0){m.curOp.focus=z(),Kt(Rr);var gr=Ks(G,$);(Rr.line>=gr.to||Rr.line<gr.from)&&setTimeout(ia(m,function(){tn==rr&&un(jn)}),150)}else{var ai=jn.clientY<Pt.top?-20:jn.clientY>Pt.bottom?20:0;ai&&setTimeout(ia(m,function(){if(tn!=rr)return;G.scroller.scrollTop+=ai,un(jn)}),50)}}function Cn(jn){m.state.selectingText=!1,tn=Infinity,jn&&(ve(jn),G.input.focus()),Oe(G.wrapper.ownerDocument,"mousemove",Fn),Oe(G.wrapper.ownerDocument,"mouseup",Zn),$.history.lastSelOrigin=null}var Fn=ia(m,function(jn){jn.buttons===0||!ne(jn)?Cn(jn):un(jn)}),Zn=ia(m,Cn);m.state.selectingText=Zn,Me(G.wrapper.ownerDocument,"mousemove",Fn),Me(G.wrapper.ownerDocument,"mouseup",Zn)}function Or(m,R){var W=R.anchor,K=R.head,G=en(m.doc,W.line);if(xn(W,K)==0&&W.sticky==K.sticky)return R;var $=tt(G);if(!$)return R;var ye=_e($,W.ch,W.sticky),Ae=$[ye];if(Ae.from!=W.ch&&Ae.to!=W.ch)return R;var Ie=ye+(Ae.from==W.ch==(Ae.level!=1)?0:1);if(Ie==0||Ie==$.length)return R;var Ke;if(K.line!=W.line)Ke=(K.line-W.line)*(m.doc.direction=="ltr"?1:-1)>0;else{var dt=_e($,K.ch,K.sticky),bt=dt-ye||(K.ch-W.ch)*(Ae.level==1?-1:1);dt==Ie-1||dt==Ie?Ke=bt<0:Ke=bt>0}var Kt=$[Ie+(Ke?-1:0)],Pt=Ke==(Kt.level==1),tn=Pt?Kt.from:Kt.to,un=Pt?"after":"before";return W.ch==tn&&W.sticky==un?R:new It(new zt(W.line,tn,un),K)}function Si(m,R,W,K){var G,$;if(R.touches)G=R.touches[0].clientX,$=R.touches[0].clientY;else try{G=R.clientX,$=R.clientY}catch(Kt){return!1}if(G>=Math.floor(m.display.gutters.getBoundingClientRect().right))return!1;K&&ve(R);var ye=m.display,Ae=ye.lineDiv.getBoundingClientRect();if($>Ae.bottom||!Pe(m,W))return de(R);$-=Ae.top-ye.viewOffset;for(var Ie=0;Ie<m.display.gutterSpecs.length;++Ie){var Ke=ye.gutters.childNodes[Ie];if(Ke&&Ke.getBoundingClientRect().right>=G){var dt=yn(m.doc,$),bt=m.display.gutterSpecs[Ie];return Ve(m,W,m,dt,bt.className,R),de(R)}}}function mr(m,R){return Si(m,R,"gutterClick",!0)}function Ci(m,R){if(Go(m.display,R)||to(m,R))return;if(Je(m,R,"contextmenu"))return;O||m.display.input.onContextMenu(R)}function to(m,R){return Pe(m,"gutterContextMenu")?Si(m,R,"gutterContextMenu",!1):!1}function gs(m){m.display.wrapper.className=m.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+m.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Wr(m)}var ya={toString:function(){return"CodeMirror.Init"}},Bo={},nl={};function kl(m){var R=m.optionHandlers;function W(K,G,$,ye){m.defaults[K]=G,$&&(R[K]=ye?function(Ae,Ie,Ke){Ke!=ya&&$(Ae,Ie,Ke)}:$)}m.defineOption=W,m.Init=ya,W("value","",function(K,G){return K.setValue(G)},!0),W("mode",null,function(K,G){K.doc.modeOption=G,wn(K)},!0),W("indentUnit",2,wn,!0),W("indentWithTabs",!1),W("smartIndent",!0),W("tabSize",4,function(K){rn(K),Wr(K),Ki(K)},!0),W("lineSeparator",null,function(K,G){if(K.doc.lineSep=G,!G)return;var $=[],ye=K.doc.first;K.doc.iter(function(Ie){for(var Ke=0;;){var dt=Ie.text.indexOf(G,Ke);if(dt==-1)break;Ke=dt+G.length,$.push(zt(ye,dt))}ye++});for(var Ae=$.length-1;Ae>=0;Ae--)xi(K.doc,G,$[Ae],zt($[Ae].line,$[Ae].ch+G.length))}),W("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(K,G,$){K.state.specialChars=new RegExp(G.source+(G.test(" ")?"":"| "),"g"),$!=ya&&K.refresh()}),W("specialCharPlaceholder",mi,function(K){return K.refresh()},!0),W("electricChars",!0),W("inputStyle",d?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),W("spellcheck",!1,function(K,G){return K.getInputField().spellcheck=G},!0),W("autocorrect",!1,function(K,G){return K.getInputField().autocorrect=G},!0),W("autocapitalize",!1,function(K,G){return K.getInputField().autocapitalize=G},!0),W("rtlMoveVisually",!u),W("wholeLineUpdateBefore",!0),W("theme","default",function(K){gs(K),vt(K)},!0),W("keyMap","default",function(K,G,$){var ye=Ls(G),Ae=$!=ya&&Ls($);Ae&&Ae.detach&&Ae.detach(K,ye),ye.attach&&ye.attach(K,Ae||null)}),W("extraKeys",null),W("configureMouse",null),W("lineWrapping",!1,Ga,!0),W("gutters",[],function(K,G){K.display.gutterSpecs=At(G,K.options.lineNumbers),vt(K)},!0),W("fixedGutter",!0,function(K,G){K.display.gutters.style.left=G?io(K.display)+"px":"0",K.refresh()},!0),W("coverGutterNextToScrollbar",!1,function(K){return ys(K)},!0),W("scrollbarStyle","native",function(K){Ws(K),ys(K),K.display.scrollbars.setScrollTop(K.doc.scrollTop),K.display.scrollbars.setScrollLeft(K.doc.scrollLeft)},!0),W("lineNumbers",!1,function(K,G){K.display.gutterSpecs=At(K.options.gutters,G),vt(K)},!0),W("firstLineNumber",1,vt,!0),W("lineNumberFormatter",function(K){return K},vt,!0),W("showCursorWhenSelecting",!1,Mi,!0),W("resetSelectionOnContextMenu",!0),W("lineWiseCopyCut",!0),W("pasteLinesPerSelection",!0),W("selectionsMayTouch",!1),W("readOnly",!1,function(K,G){G=="nocursor"&&(as(K),K.display.input.blur()),K.display.input.readOnlyChanged(G)}),W("screenReaderLabel",null,function(K,G){G=G===""?null:G,K.display.input.screenReaderLabelChanged(G)}),W("disableInput",!1,function(K,G){G||K.display.input.reset()},!0),W("dragDrop",!0,tu),W("allowDropFileTypes",null),W("cursorBlinkRate",530),W("cursorScrollMargin",0),W("cursorHeight",1,Mi,!0),W("singleCursorHeightPerLine",!0,Mi,!0),W("workTime",100),W("workDelay",100),W("flattenSpans",!0,rn,!0),W("addModeClass",!1,rn,!0),W("pollInterval",100),W("undoDepth",200,function(K,G){return K.doc.history.undoDepth=G}),W("historyEventDelay",1250),W("viewportMargin",10,function(K){return K.refresh()},!0),W("maxHighlightLength",1e4,rn,!0),W("moveInputWithCursor",!0,function(K,G){G||K.display.input.resetPosition()}),W("tabindex",null,function(K,G){return K.display.input.getField().tabIndex=G||""}),W("autofocus",null),W("direction","ltr",function(K,G){return K.doc.setDirection(G)},!0),W("phrases",null)}function tu(m,R,W){var K=W&&W!=ya;if(!R!=!K){var G=m.display.dragFunctions,$=R?Me:Oe;$(m.display.scroller,"dragstart",G.start),$(m.display.scroller,"dragenter",G.enter),$(m.display.scroller,"dragover",G.over),$(m.display.scroller,"dragleave",G.leave),$(m.display.scroller,"drop",G.drop)}}function Ga(m){m.options.lineWrapping?(X(m.display.wrapper,"CodeMirror-wrap"),m.display.sizer.style.minWidth="",m.display.sizerWidth=null):(w(m.display.wrapper,"CodeMirror-wrap"),Ao(m)),Eo(m),Ki(m),Wr(m),setTimeout(function(){return ys(m)},100)}function ca(m,R){var W=this;if(!(this instanceof ca))return new ca(m,R);this.options=R=R?L(R):{},L(Bo,R,!1);var K=R.value;typeof K=="string"?K=new Ir(K,R.mode,null,R.lineSeparator,R.direction):R.mode&&(K.modeOption=R.mode),this.doc=K;var G=new ca.inputStyles[R.inputStyle](this),$=this.display=new at(m,K,G,R);$.wrapper.CodeMirror=this,gs(this),R.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ws(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 Z,keySeq:null,specialChars:null},R.autofocus&&!d&&$.input.focus(),_&&p<11&&setTimeout(function(){return W.display.input.reset(!0)},20),Zl(this),jo(),$o(this),this.curOp.forceUpdate=!0,hn(this,K),R.autofocus&&!d||this.hasFocus()?setTimeout(function(){W.hasFocus()&&!W.state.focused&&Zo(W)},20):as(this);for(var ye in nl)nl.hasOwnProperty(ye)&&nl[ye](this,R[ye],ya);it(this),R.finishInit&&R.finishInit(this);for(var Ae=0;Ae<rl.length;++Ae)rl[Ae](this);cs(this),e&&R.lineWrapping&&getComputedStyle($.lineDiv).textRendering=="optimizelegibility"&&($.lineDiv.style.textRendering="auto")}ca.defaults=Bo,ca.optionHandlers=nl;function Zl(m){var R=m.display;Me(R.scroller,"mousedown",ia(m,Hn)),_&&p<11?Me(R.scroller,"dblclick",ia(m,function(Ie){if(Je(m,Ie))return;var Ke=ka(m,Ie);if(!Ke||mr(m,Ie)||Go(m.display,Ie))return;ve(Ie);var dt=m.findWordAt(Ke);Dn(m.doc,dt.anchor,dt.head)})):Me(R.scroller,"dblclick",function(Ie){return Je(m,Ie)||ve(Ie)}),Me(R.scroller,"contextmenu",function(Ie){return Ci(m,Ie)}),Me(R.input.getField(),"contextmenu",function(Ie){R.scroller.contains(Ie.target)||Ci(m,Ie)});var W,K={end:0};function G(){R.activeTouch&&(W=setTimeout(function(){return R.activeTouch=null},1e3),K=R.activeTouch,K.end=+new Date)}function $(Ie){if(Ie.touches.length!=1)return!1;var Ke=Ie.touches[0];return Ke.radiusX<=1&&Ke.radiusY<=1}function ye(Ie,Ke){if(Ke.left==null)return!0;var dt=Ke.left-Ie.left,bt=Ke.top-Ie.top;return dt*dt+bt*bt>20*20}Me(R.scroller,"touchstart",function(Ie){if(!Je(m,Ie)&&!$(Ie)&&!mr(m,Ie)){R.input.ensurePolled(),clearTimeout(W);var Ke=+new Date;R.activeTouch={start:Ke,moved:!1,prev:Ke-K.end<=300?K:null},Ie.touches.length==1&&(R.activeTouch.left=Ie.touches[0].pageX,R.activeTouch.top=Ie.touches[0].pageY)}}),Me(R.scroller,"touchmove",function(){R.activeTouch&&(R.activeTouch.moved=!0)}),Me(R.scroller,"touchend",function(Ie){var Ke=R.activeTouch;if(Ke&&!Go(R,Ie)&&Ke.left!=null&&!Ke.moved&&new Date-Ke.start<300){var dt=m.coordsChar(R.activeTouch,"page"),bt;!Ke.prev||ye(Ke,Ke.prev)?bt=new It(dt,dt):!Ke.prev.prev||ye(Ke,Ke.prev.prev)?bt=m.findWordAt(dt):bt=new It(zt(dt.line,0),V(m.doc,zt(dt.line+1,0))),m.setSelection(bt.anchor,bt.head),m.focus(),ve(Ie)}G()}),Me(R.scroller,"touchcancel",G),Me(R.scroller,"scroll",function(){R.scroller.clientHeight&&(ss(m,R.scroller.scrollTop),Io(m,R.scroller.scrollLeft,!0),Ve(m,"scroll",m))}),Me(R.scroller,"mousewheel",function(Ie){return Gt(m,Ie)}),Me(R.scroller,"DOMMouseScroll",function(Ie){return Gt(m,Ie)}),Me(R.wrapper,"scroll",function(){return R.wrapper.scrollTop=R.wrapper.scrollLeft=0}),R.dragFunctions={enter:function(Ie){Je(m,Ie)||je(Ie)},over:function(Ie){Je(m,Ie)||(mo(m,Ie),je(Ie))},start:function(Ie){return Wa(m,Ie)},drop:ia(m,Fo),leave:function(Ie){Je(m,Ie)||es(m)}};var Ae=R.input.getField();Me(Ae,"keyup",function(Ie){return xs.call(m,Ie)}),Me(Ae,"keydown",ia(m,tl)),Me(Ae,"keypress",ia(m,Ms)),Me(Ae,"focus",function(Ie){return Zo(m,Ie)}),Me(Ae,"blur",function(Ie){return as(m,Ie)})}var rl=[];ca.defineInitHook=function(m){return rl.push(m)};function Ns(m,R,W,K){var G=m.doc,$;W==null&&(W="add"),W=="smart"&&(G.mode.indent?$=Yt(m,R).state:W="prev");var ye=m.options.tabSize,Ae=en(G,R),Ie=B(Ae.text,null,ye);Ae.stateAfter&&(Ae.stateAfter=null);var Ke=Ae.text.match(/^\s*/)[0],dt;if(!K&&!/\S/.test(Ae.text))dt=0,W="not";else if(W=="smart"&&(dt=G.mode.indent($,Ae.text.slice(Ke.length),Ae.text),dt==Ce||dt>150)){if(!K)return;W="prev"}W=="prev"?R>G.first?dt=B(en(G,R-1).text,null,ye):dt=0:W=="add"?dt=Ie+m.options.indentUnit:W=="subtract"?dt=Ie-m.options.indentUnit:typeof W=="number"&&(dt=Ie+W),dt=Math.max(0,dt);var bt="",Kt=0;if(m.options.indentWithTabs)for(var Pt=Math.floor(dt/ye);Pt;--Pt)Kt+=ye,bt+=" ";if(Kt<dt&&(bt+=me(dt-Kt)),bt!=Ke)return xi(G,bt,zt(R,0),zt(R,Ke.length),"+input"),Ae.stateAfter=null,!0;for(var tn=0;tn<G.sel.ranges.length;tn++){var un=G.sel.ranges[tn];if(un.head.line==R&&un.head.ch<Ke.length){var Cn=zt(R,Ke.length);Pi(G,tn,new It(Cn,Cn));break}}}var Ko=null;function il(m){Ko=m}function yl(m,R,W,K,G){var $=m.doc;m.display.shift=!1,K||(K=$.sel);var ye=+new Date-200,Ae=G=="paste"||m.state.pasteIncoming>ye,Ie=xt(R),Ke=null;if(Ae&&K.ranges.length>1)if(Ko&&Ko.text.join(`
|
|
|
`)==R){if(K.ranges.length%Ko.text.length==0){Ke=[];for(var dt=0;dt<Ko.text.length;dt++)Ke.push($.splitLines(Ko.text[dt]))}}else Ie.length==K.ranges.length&&m.options.pasteLinesPerSelection&&(Ke=be(Ie,function(Fn){return[Fn]}));for(var bt=m.curOp.updateInput,Kt=K.ranges.length-1;Kt>=0;Kt--){var Pt=K.ranges[Kt],tn=Pt.from(),un=Pt.to();Pt.empty()&&(W&&W>0?tn=zt(tn.line,tn.ch-W):m.state.overwrite&&!Ae?un=zt(un.line,Math.min(en($,un.line).text.length,un.ch+se(Ie).length)):Ae&&Ko&&Ko.lineWise&&Ko.text.join(`
|
|
|
`)==Ie.join(`
|
|
|
`)&&(tn=un=zt(tn.line,0)));var Cn={from:tn,to:un,text:Ke?Ke[Kt%Ke.length]:Ie,origin:G||(Ae?"paste":m.state.cutIncoming>ye?"cut":"+input")};Ka(m.doc,Cn),nn(m,"inputRead",m,Cn)}R&&!Ae&&ba(m,R),vs(m),m.curOp.updateInput<2&&(m.curOp.updateInput=bt),m.curOp.typing=!0,m.state.pasteIncoming=m.state.cutIncoming=-1}function zl(m,R){var W=m.clipboardData&&m.clipboardData.getData("Text");if(W)return m.preventDefault(),!R.isReadOnly()&&!R.options.disableInput&&uo(R,function(){return yl(R,W,0,null,"paste")}),!0}function ba(m,R){if(!m.options.electricChars||!m.options.smartIndent)return;for(var W=m.doc.sel,K=W.ranges.length-1;K>=0;K--){var G=W.ranges[K];if(G.head.ch>100||K&&W.ranges[K-1].head.line==G.head.line)continue;var $=m.getModeAt(G.head),ye=!1;if($.electricChars){for(var Ae=0;Ae<$.electricChars.length;Ae++)if(R.indexOf($.electricChars.charAt(Ae))>-1){ye=Ns(m,G.head.line,"smart");break}}else $.electricInput&&($.electricInput.test(en(m.doc,G.head.line).text.slice(0,G.head.ch))&&(ye=Ns(m,G.head.line,"smart")));ye&&nn(m,"electricInput",m,G.head.line)}}function bl(m){for(var R=[],W=[],K=0;K<m.doc.sel.ranges.length;K++){var G=m.doc.sel.ranges[K].head.line,$={anchor:zt(G,0),head:zt(G+1,0)};W.push($),R.push(m.getRange($.anchor,$.head))}return{text:R,ranges:W}}function Gl(m,R,W,K){m.setAttribute("autocorrect",W?"":"off"),m.setAttribute("autocapitalize",K?"":"off"),m.setAttribute("spellcheck",!!R)}function Ll(){var m=D("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),R=D("div",[m],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return e?m.style.width="1000px":m.setAttribute("wrap","off"),a&&(m.style.border="1px solid black"),Gl(m),R}function Vl(m){var R=m.optionHandlers,W=m.helpers={};m.prototype={constructor:m,focus:function(){window.focus(),this.display.input.focus()},setOption:function(K,G){var $=this.options,ye=$[K];if($[K]==G&&K!="mode")return;$[K]=G,R.hasOwnProperty(K)&&ia(this,R[K])(this,G,ye),Ve(this,"optionChange",this,K)},getOption:function(K){return this.options[K]},getDoc:function(){return this.doc},addKeyMap:function(K,G){this.state.keyMaps[G?"push":"unshift"](Ls(K))},removeKeyMap:function(K){for(var G=this.state.keyMaps,$=0;$<G.length;++$)if(G[$]==K||G[$].name==K)return G.splice($,1),!0},addOverlay:qa(function(K,G){var $=K.token?K:m.getMode(this.options,K);if($.startState)throw new Error("Overlays may not be stateful.");ae(this.state.overlays,{mode:$,modeSpec:K,opaque:G&&G.opaque,priority:G&&G.priority||0},function(ye){return ye.priority}),this.state.modeGen++,Ki(this)}),removeOverlay:qa(function(K){for(var G=this.state.overlays,$=0;$<G.length;++$){var ye=G[$].modeSpec;if(ye==K||typeof K=="string"&&ye.name==K){G.splice($,1),this.state.modeGen++,Ki(this);return}}}),indentLine:qa(function(K,G,$){typeof G!="string"&&typeof G!="number"&&(G==null?G=this.options.smartIndent?"smart":"prev":G=G?"add":"subtract"),Vn(this.doc,K)&&Ns(this,K,G,$)}),indentSelection:qa(function(K){for(var G=this.doc.sel.ranges,$=-1,ye=0;ye<G.length;ye++){var Ae=G[ye];if(Ae.empty())Ae.head.line>$&&(Ns(this,Ae.head.line,K,!0),$=Ae.head.line,ye==this.doc.sel.primIndex&&vs(this));else{var Ie=Ae.from(),Ke=Ae.to(),dt=Math.max($,Ie.line);$=Math.min(this.lastLine(),Ke.line-(Ke.ch?0:1))+1;for(var bt=dt;bt<$;++bt)Ns(this,bt,K);var Kt=this.doc.sel.ranges;Ie.ch==0&&G.length==Kt.length&&Kt[ye].from().ch>0&&Pi(this.doc,ye,new It(Ie,Kt[ye].to()),ke)}}}),getTokenAt:function(K,G){return ar(this,K,G)},getLineTokens:function(K,G){return ar(this,zt(K),G,!0)},getTokenTypeAt:function(K){K=V(this.doc,K);var G=Dt(this,en(this.doc,K.line)),$=0,ye=(G.length-1)/2,Ae=K.ch,Ie;if(Ae==0)Ie=G[2];else for(;;){var Ke=$+ye>>1;if((Ke?G[Ke*2-1]:0)>=Ae)ye=Ke;else if(G[Ke*2+1]<Ae)$=Ke+1;else{Ie=G[Ke*2+2];break}}var dt=Ie?Ie.indexOf("overlay "):-1;return dt<0?Ie:dt==0?null:Ie.slice(0,dt-1)},getModeAt:function(K){var G=this.doc.mode;return G.innerMode?m.innerMode(G,this.getTokenAt(K).state).mode:G},getHelper:function(K,G){return this.getHelpers(K,G)[0]},getHelpers:function(K,G){var $=[];if(!W.hasOwnProperty(G))return $;var ye=W[G],Ae=this.getModeAt(K);if(typeof Ae[G]=="string")ye[Ae[G]]&&$.push(ye[Ae[G]]);else if(Ae[G])for(var Ie=0;Ie<Ae[G].length;Ie++){var Ke=ye[Ae[G][Ie]];Ke&&$.push(Ke)}else Ae.helperType&&ye[Ae.helperType]?$.push(ye[Ae.helperType]):ye[Ae.name]&&$.push(ye[Ae.name]);for(var dt=0;dt<ye._global.length;dt++){var bt=ye._global[dt];bt.pred(Ae,this)&&re($,bt.val)==-1&&$.push(bt.val)}return $},getStateAfter:function(K,G){var $=this.doc;return K=ce($,K==null?$.first+$.size-1:K),Yt(this,K+1,G).state},cursorCoords:function(K,G){var $,ye=this.doc.sel.primary();return K==null?$=ye.head:typeof K=="object"?$=V(this.doc,K):$=K?ye.from():ye.to(),ei(this,$,G||"page")},charCoords:function(K,G){return Qi(this,V(this.doc,K),G||"page")},coordsChar:function(K,G){return K=$r(this,K,G||"page"),ri(this,K.left,K.top)},lineAtHeight:function(K,G){return K=$r(this,{top:K,left:0},G||"page").top,yn(this.doc,K+this.display.viewOffset)},heightAtLine:function(K,G,$){var ye=!1,Ae;if(typeof K=="number"){var Ie=this.doc.first+this.doc.size-1;K<this.doc.first?K=this.doc.first:K>Ie&&(K=Ie,ye=!0),Ae=en(this.doc,K)}else Ae=K;return li(this,Ae,{top:0,left:0},G||"page",$||ye).top+(ye?this.doc.height-Ja(Ae):0)},defaultTextHeight:function(){return ma(this.display)},defaultCharWidth:function(){return Ia(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(K,G,$,ye,Ae){var Ie=this.display;K=ei(this,V(this.doc,K));var Ke=K.bottom,dt=K.left;if(G.style.position="absolute",G.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(G),Ie.sizer.appendChild(G),ye=="over")Ke=K.top;else if(ye=="above"||ye=="near"){var bt=Math.max(Ie.wrapper.clientHeight,this.doc.height),Kt=Math.max(Ie.sizer.clientWidth,Ie.lineSpace.clientWidth);(ye=="above"||K.bottom+G.offsetHeight>bt)&&K.top>G.offsetHeight?Ke=K.top-G.offsetHeight:K.bottom+G.offsetHeight<=bt&&(Ke=K.bottom),dt+G.offsetWidth>Kt&&(dt=Kt-G.offsetWidth)}G.style.top=Ke+"px",G.style.left=G.style.right="",Ae=="right"?(dt=Ie.sizer.clientWidth-G.offsetWidth,G.style.right="0px"):(Ae=="left"?dt=0:Ae=="middle"&&(dt=(Ie.sizer.clientWidth-G.offsetWidth)/2),G.style.left=dt+"px"),$&&Tl(this,{left:dt,top:Ke,right:dt+G.offsetWidth,bottom:Ke+G.offsetHeight})},triggerOnKeyDown:qa(tl),triggerOnKeyPress:qa(Ms),triggerOnKeyUp:xs,triggerOnMouseDown:qa(Hn),execCommand:function(K){if(bs.hasOwnProperty(K))return bs[K].call(null,this)},triggerElectric:qa(function(K){ba(this,K)}),findPosH:function(K,G,$,ye){var Ae=1;G<0&&(Ae=-1,G=-G);for(var Ie=V(this.doc,K),Ke=0;Ke<G&&!(Ie=El(this.doc,Ie,Ae,$,ye),Ie.hitSide);++Ke);return Ie},moveH:qa(function(K,G){var $=this;this.extendSelectionsBy(function(ye){return $.display.shift||$.doc.extend||ye.empty()?El($.doc,ye.head,K,G,$.options.rtlMoveVisually):K<0?ye.from():ye.to()},Re)}),deleteH:qa(function(K,G){var $=this.doc.sel,ye=this.doc;$.somethingSelected()?ye.replaceSelection("",null,"+delete"):rs(this,function(Ae){var Ie=El(ye,Ae.head,K,G,!1);return K<0?{from:Ie,to:Ae.head}:{from:Ae.head,to:Ie}})}),findPosV:function(K,G,$,ye){var Ae=1,Ie=ye;G<0&&(Ae=-1,G=-G);for(var Ke=V(this.doc,K),dt=0;dt<G;++dt){var bt=ei(this,Ke,"div");if(Ie==null?Ie=bt.left:bt.left=Ie,Ke=Yl(this,bt,Ae,$),Ke.hitSide)break}return Ke},moveV:qa(function(K,G){var $=this,ye=this.doc,Ae=[],Ie=!this.display.shift&&!ye.extend&&ye.sel.somethingSelected();if(ye.extendSelectionsBy(function(dt){if(Ie)return K<0?dt.from():dt.to();var bt=ei($,dt.head,"div");dt.goalColumn!=null&&(bt.left=dt.goalColumn),Ae.push(bt.left);var Kt=Yl($,bt,K,G);return G=="page"&&dt==ye.sel.primary()&&cl($,Qi($,Kt,"div").top-bt.top),Kt},Re),Ae.length)for(var Ke=0;Ke<ye.sel.ranges.length;Ke++)ye.sel.ranges[Ke].goalColumn=Ae[Ke]}),findWordAt:function(K){var G=this.doc,$=en(G,K.line).text,ye=K.ch,Ae=K.ch;if($){var Ie=this.getHelper(K,"wordChars");(K.sticky=="before"||Ae==$.length)&&ye?--ye:++Ae;for(var Ke=$.charAt(ye),dt=Q(Ke,Ie)?function(bt){return Q(bt,Ie)}:/\s/.test(Ke)?function(bt){return/\s/.test(bt)}:function(bt){return!/\s/.test(bt)&&!Q(bt)};ye>0&&dt($.charAt(ye-1));)--ye;for(;Ae<$.length&&dt($.charAt(Ae));)++Ae}return new It(zt(K.line,ye),zt(K.line,Ae))},toggleOverwrite:function(K){if(K!=null&&K==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?X(this.display.cursorDiv,"CodeMirror-overwrite"):w(this.display.cursorDiv,"CodeMirror-overwrite"),Ve(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==z()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:qa(function(K,G){os(this,K,G)}),getScrollInfo:function(){var K=this.display.scroller;return{left:K.scrollLeft,top:K.scrollTop,height:K.scrollHeight-Rt(this)-this.display.barHeight,width:K.scrollWidth-Rt(this)-this.display.barWidth,clientHeight:Ue(this),clientWidth:ut(this)}},scrollIntoView:qa(function(K,G){K==null?(K={from:this.doc.sel.primary().head,to:null},G==null&&(G=this.options.cursorScrollMargin)):typeof K=="number"?K={from:zt(K,0),to:null}:K.from==null&&(K={from:K,to:null}),K.to||(K.to=K.from),K.margin=G||0,K.from.line!=null?Fl(this,K):Os(this,K.from,K.to,K.margin)}),setSize:qa(function(K,G){var $=this,ye=function(Ie){return typeof Ie=="number"||/^\d+$/.test(String(Ie))?Ie+"px":Ie};K!=null&&(this.display.wrapper.style.width=ye(K)),G!=null&&(this.display.wrapper.style.height=ye(G)),this.options.lineWrapping&&Pr(this);var Ae=this.display.viewFrom;this.doc.iter(Ae,this.display.viewTo,function(Ie){if(Ie.widgets){for(var Ke=0;Ke<Ie.widgets.length;Ke++)if(Ie.widgets[Ke].noHScroll){ra($,Ae,"widget");break}}++Ae}),this.curOp.forceUpdate=!0,Ve(this,"refresh",this)}),operation:function(K){return uo(this,K)},startOperation:function(){return $o(this)},endOperation:function(){return cs(this)},refresh:qa(function(){var K=this.display.cachedTextHeight;Ki(this),this.curOp.forceUpdate=!0,Wr(this),os(this,this.doc.scrollLeft,this.doc.scrollTop),Gs(this.display),(K==null||Math.abs(K-ma(this.display))>.5||this.options.lineWrapping)&&Eo(this),Ve(this,"refresh",this)}),swapDoc:qa(function(K){var G=this.doc;return G.cm=null,this.state.selectingText&&this.state.selectingText(),hn(this,K),Wr(this),this.display.input.reset(),os(this,K.scrollLeft,K.scrollTop),this.curOp.forceScroll=!0,nn(this,"swapDoc",this,G),G}),phrase:function(K){var G=this.options.phrases;return G&&Object.prototype.hasOwnProperty.call(G,K)?G[K]:K},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}},He(m),m.registerHelper=function(K,G,$){W.hasOwnProperty(K)||(W[K]=m[K]={_global:[]}),W[K][G]=$},m.registerGlobalHelper=function(K,G,$,ye){m.registerHelper(K,G,ye),W[K]._global.push({pred:$,val:ye})}}function El(m,R,W,K,G){var $=R,ye=W,Ae=en(m,R.line),Ie=G&&m.direction=="rtl"?-W:W;function Ke(){var Zn=R.line+Ie;return Zn<m.first||Zn>=m.first+m.size?!1:(R=new zt(Zn,R.ch,R.sticky),Ae=en(m,Zn))}function dt(Zn){var jn;if(K=="codepoint"){var rr=Ae.text.charCodeAt(R.ch+(K>0?0:-1));isNaN(rr)?jn=null:jn=new zt(R.line,Math.max(0,Math.min(Ae.text.length,R.ch+W*(rr>=55296&&rr<56320?2:1))),-W)}else G?jn=Xl(m.cm,Ae,R,W):jn=gl(Ae,R,W);if(jn==null)if(!Zn&&Ke())R=vl(G,m.cm,Ae,R.line,Ie);else return!1;else R=jn;return!0}if(K=="char"||K=="codepoint")dt();else if(K=="column")dt(!0);else if(K=="word"||K=="group")for(var bt=null,Kt=K=="group",Pt=m.cm&&m.cm.getHelper(R,"wordChars"),tn=!0;!(W<0&&!dt(!tn));tn=!1){var un=Ae.text.charAt(R.ch)||`
|
|
|
`,Cn=Q(un,Pt)?"w":Kt&&un==`
|
|
|
`?"n":!Kt||/\s/.test(un)?null:"p";if(Kt&&!tn&&!Cn&&(Cn="s"),bt&&bt!=Cn){W<0&&(W=1,dt(),R.sticky="after");break}if(Cn&&(bt=Cn),W>0&&!dt(!tn))break}var Fn=$a(m,R,$,ye,!0);return wr($,Fn)&&(Fn.hitSide=!0),Fn}function Yl(m,R,W,K){var G=m.doc,$=R.left,ye;if(K=="page"){var Ae=Math.min(m.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Ie=Math.max(Ae-.5*ma(m.display),3);ye=(W>0?R.bottom:R.top)+W*Ie}else K=="line"&&(ye=W>0?R.bottom+3:R.top-3);for(var Ke;!(Ke=ri(m,$,ye),!Ke.outside);){if(W<0?ye<=0:ye>=G.height){Ke.hitSide=!0;break}ye+=W*5}return Ke}var ki=function(m){this.cm=m,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Z,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};ki.prototype.init=function(m){var R=this,W=this,K=W.cm,G=W.div=m.lineDiv;Gl(G,K.options.spellcheck,K.options.autocorrect,K.options.autocapitalize);function $(Ae){for(var Ie=Ae.target;Ie;Ie=Ie.parentNode){if(Ie==G)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Ie.className))break}return!1}Me(G,"paste",function(Ae){if(!$(Ae)||Je(K,Ae)||zl(Ae,K))return;p<=11&&setTimeout(ia(K,function(){return R.updateFromDOM()}),20)}),Me(G,"compositionstart",function(Ae){R.composing={data:Ae.data,done:!1}}),Me(G,"compositionupdate",function(Ae){R.composing||(R.composing={data:Ae.data,done:!1})}),Me(G,"compositionend",function(Ae){R.composing&&(Ae.data!=R.composing.data&&R.readFromDOMSoon(),R.composing.done=!0)}),Me(G,"touchstart",function(){return W.forceCompositionEnd()}),Me(G,"input",function(){R.composing||R.readFromDOMSoon()});function ye(Ae){if(!$(Ae)||Je(K,Ae))return;if(K.somethingSelected())il({lineWise:!1,text:K.getSelections()}),Ae.type=="cut"&&K.replaceSelection("",null,"cut");else if(K.options.lineWiseCopyCut){var Ie=bl(K);il({lineWise:!0,text:Ie.text}),Ae.type=="cut"&&K.operation(function(){K.setSelections(Ie.ranges,0,ke),K.replaceSelection("",null,"cut")})}else return;if(Ae.clipboardData){Ae.clipboardData.clearData();var Ke=Ko.text.join(`
|
|
|
`);if(Ae.clipboardData.setData("Text",Ke),Ae.clipboardData.getData("Text")==Ke){Ae.preventDefault();return}}var dt=Ll(),bt=dt.firstChild;K.display.lineSpace.insertBefore(dt,K.display.lineSpace.firstChild),bt.value=Ko.text.join(`
|
|
|
`);var Kt=document.activeElement;F(bt),setTimeout(function(){K.display.lineSpace.removeChild(dt),Kt.focus(),Kt==G&&W.showPrimarySelection()},50)}Me(G,"copy",ye),Me(G,"cut",ye)},ki.prototype.screenReaderLabelChanged=function(m){m?this.div.setAttribute("aria-label",m):this.div.removeAttribute("aria-label")},ki.prototype.prepareSelection=function(){var m=Vo(this.cm,!1);return m.focus=document.activeElement==this.div,m},ki.prototype.showSelection=function(m,R){if(!m||!this.cm.display.view.length)return;(m.focus||R)&&this.showPrimarySelection(),this.showMultipleSelections(m)},ki.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},ki.prototype.showPrimarySelection=function(){var m=this.getSelection(),R=this.cm,W=R.doc.sel.primary(),K=W.from(),G=W.to();if(R.display.viewTo==R.display.viewFrom||K.line>=R.display.viewTo||G.line<R.display.viewFrom){m.removeAllRanges();return}var $=Cs(R,m.anchorNode,m.anchorOffset),ye=Cs(R,m.focusNode,m.focusOffset);if($&&!$.bad&&ye&&!ye.bad&&xn(Yn($,ye),K)==0&&xn(Tn($,ye),G)==0)return;var Ae=R.display.view,Ie=K.line>=R.display.viewFrom&&Ml(R,K)||{node:Ae[0].measure.map[2],offset:0},Ke=G.line<R.display.viewTo&&Ml(R,G);if(!Ke){var dt=Ae[Ae.length-1].measure,bt=dt.maps?dt.maps[dt.maps.length-1]:dt.map;Ke={node:bt[bt.length-1],offset:bt[bt.length-2]-bt[bt.length-3]}}if(!Ie||!Ke){m.removeAllRanges();return}var Kt=m.rangeCount&&m.getRangeAt(0),Pt;try{Pt=N(Ie.node,Ie.offset,Ke.offset,Ke.node)}catch(tn){}Pt&&(!T&&R.state.focused?(m.collapse(Ie.node,Ie.offset),Pt.collapsed||(m.removeAllRanges(),m.addRange(Pt))):(m.removeAllRanges(),m.addRange(Pt)),Kt&&m.anchorNode==null?m.addRange(Kt):T&&this.startGracePeriod()),this.rememberSelection()},ki.prototype.startGracePeriod=function(){var m=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){m.gracePeriod=!1,m.selectionChanged()&&m.cm.operation(function(){return m.cm.curOp.selectionChanged=!0})},20)},ki.prototype.showMultipleSelections=function(m){A(this.cm.display.cursorDiv,m.cursors),A(this.cm.display.selectionDiv,m.selection)},ki.prototype.rememberSelection=function(){var m=this.getSelection();this.lastAnchorNode=m.anchorNode,this.lastAnchorOffset=m.anchorOffset,this.lastFocusNode=m.focusNode,this.lastFocusOffset=m.focusOffset},ki.prototype.selectionInEditor=function(){var m=this.getSelection();if(!m.rangeCount)return!1;var R=m.getRangeAt(0).commonAncestorContainer;return P(this.div,R)},ki.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},ki.prototype.blur=function(){this.div.blur()},ki.prototype.getField=function(){return this.div},ki.prototype.supportsTouch=function(){return!0},ki.prototype.receivedFocus=function(){var m=this;this.selectionInEditor()?this.pollSelection():uo(this.cm,function(){return m.cm.curOp.selectionChanged=!0});function R(){m.cm.state.focused&&(m.pollSelection(),m.polling.set(m.cm.options.pollInterval,R))}this.polling.set(this.cm.options.pollInterval,R)},ki.prototype.selectionChanged=function(){var m=this.getSelection();return m.anchorNode!=this.lastAnchorNode||m.anchorOffset!=this.lastAnchorOffset||m.focusNode!=this.lastFocusNode||m.focusOffset!=this.lastFocusOffset},ki.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var m=this.getSelection(),R=this.cm;if(c&&n&&this.cm.display.gutterSpecs.length&&Ql(m.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var W=Cs(R,m.anchorNode,m.anchorOffset),K=Cs(R,m.focusNode,m.focusOffset);W&&K&&uo(R,function(){fi(R.doc,Zt(W,K),ke),(W.bad||K.bad)&&(R.curOp.selectionChanged=!0)})},ki.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var m=this.cm,R=m.display,W=m.doc.sel.primary(),K=W.from(),G=W.to();if(K.ch==0&&K.line>m.firstLine()&&(K=zt(K.line-1,en(m.doc,K.line-1).length)),G.ch==en(m.doc,G.line).text.length&&G.line<m.lastLine()&&(G=zt(G.line+1,0)),K.line<R.viewFrom||G.line>R.viewTo-1)return!1;var $,ye,Ae;K.line==R.viewFrom||($=zi(m,K.line))==0?(ye=mn(R.view[0].line),Ae=R.view[0].node):(ye=mn(R.view[$].line),Ae=R.view[$-1].node.nextSibling);var Ie=zi(m,G.line),Ke,dt;if(Ie==R.view.length-1?(Ke=R.viewTo-1,dt=R.lineDiv.lastChild):(Ke=mn(R.view[Ie+1].line)-1,dt=R.view[Ie+1].node.previousSibling),!Ae)return!1;for(var bt=m.doc.splitLines(nu(m,Ae,dt,ye,Ke)),Kt=qn(m.doc,zt(ye,0),zt(Ke,en(m.doc,Ke).text.length));bt.length>1&&Kt.length>1;)if(se(bt)==se(Kt))bt.pop(),Kt.pop(),Ke--;else if(bt[0]==Kt[0])bt.shift(),Kt.shift(),ye++;else break;for(var Pt=0,tn=0,un=bt[0],Cn=Kt[0],Fn=Math.min(un.length,Cn.length);Pt<Fn&&un.charCodeAt(Pt)==Cn.charCodeAt(Pt);)++Pt;for(var Zn=se(bt),jn=se(Kt),rr=Math.min(Zn.length-(bt.length==1?Pt:0),jn.length-(Kt.length==1?Pt:0));tn<rr&&Zn.charCodeAt(Zn.length-tn-1)==jn.charCodeAt(jn.length-tn-1);)++tn;if(bt.length==1&&Kt.length==1&&ye==K.line)for(;Pt&&Pt>K.ch&&Zn.charCodeAt(Zn.length-tn-1)==jn.charCodeAt(jn.length-tn-1);)Pt--,tn++;bt[bt.length-1]=Zn.slice(0,Zn.length-tn).replace(/^\u200b+/,""),bt[0]=bt[0].slice(Pt).replace(/\u200b+$/,"");var Rr=zt(ye,Pt),gr=zt(Ke,Kt.length?se(Kt).length-tn:0);if(bt.length>1||bt[0]||xn(Rr,gr))return xi(m.doc,bt,Rr,gr,"+input"),!0},ki.prototype.ensurePolled=function(){this.forceCompositionEnd()},ki.prototype.reset=function(){this.forceCompositionEnd()},ki.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},ki.prototype.readFromDOMSoon=function(){var m=this;if(this.readDOMTimeout!=null)return;this.readDOMTimeout=setTimeout(function(){if(m.readDOMTimeout=null,m.composing)if(m.composing.done)m.composing=null;else return;m.updateFromDOM()},80)},ki.prototype.updateFromDOM=function(){var m=this;(this.cm.isReadOnly()||!this.pollContent())&&uo(this.cm,function(){return Ki(m.cm)})},ki.prototype.setUneditable=function(m){m.contentEditable="false"},ki.prototype.onKeyPress=function(m){if(m.charCode==0||this.composing)return;m.preventDefault(),this.cm.isReadOnly()||ia(this.cm,yl)(this.cm,String.fromCharCode(m.charCode==null?m.keyCode:m.charCode),0)},ki.prototype.readOnlyChanged=function(m){this.div.contentEditable=String(m!="nocursor")},ki.prototype.onContextMenu=function(){},ki.prototype.resetPosition=function(){},ki.prototype.needsContentAttribute=!0;function Ml(m,R){var W=Ot(m,R.line);if(!W||W.hidden)return null;var K=en(m.doc,R.line),G=We(W,K,R.line),$=tt(K,m.doc.direction),ye="left";if($){var Ae=_e($,R.ch);ye=Ae%2?"right":"left"}var Ie=dn(G.map,R.ch,ye);return Ie.offset=Ie.collapse=="right"?Ie.end:Ie.start,Ie}function Ql(m){for(var R=m;R;R=R.parentNode)if(/CodeMirror-gutter-wrapper/.test(R.className))return!0;return!1}function Ss(m,R){return R&&(m.bad=!0),m}function nu(m,R,W,K,G){var $="",ye=!1,Ae=m.doc.lineSeparator(),Ie=!1;function Ke(Pt){return function(tn){return tn.id==Pt}}function dt(){ye&&($+=Ae,Ie&&($+=Ae),ye=Ie=!1)}function bt(Pt){Pt&&(dt(),$+=Pt)}function Kt(Pt){if(Pt.nodeType==1){var tn=Pt.getAttribute("cm-text");if(tn){bt(tn);return}var un=Pt.getAttribute("cm-marker"),Cn;if(un){var Fn=m.findMarks(zt(K,0),zt(G+1,0),Ke(+un));Fn.length&&(Cn=Fn[0].find(0))&&bt(qn(m.doc,Cn.from,Cn.to).join(Ae));return}if(Pt.getAttribute("contenteditable")=="false")return;var Zn=/^(pre|div|p|li|table|br)$/i.test(Pt.nodeName);if(!/^br$/i.test(Pt.nodeName)&&Pt.textContent.length==0)return;Zn&&dt();for(var jn=0;jn<Pt.childNodes.length;jn++)Kt(Pt.childNodes[jn]);/^(pre|p)$/i.test(Pt.nodeName)&&(Ie=!0),Zn&&(ye=!0)}else Pt.nodeType==3&&bt(Pt.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(Kt(R),R==W);)R=R.nextSibling,Ie=!1;return $}function Cs(m,R,W){var K;if(R==m.display.lineDiv){if(K=m.display.lineDiv.childNodes[W],!K)return Ss(m.clipPos(zt(m.display.viewTo-1)),!0);R=null,W=0}else for(K=R;;K=K.parentNode){if(!K||K==m.display.lineDiv)return null;if(K.parentNode&&K.parentNode==m.display.lineDiv)break}for(var G=0;G<m.display.view.length;G++){var $=m.display.view[G];if($.node==K)return ru($,R,W)}}function ru(m,R,W){var K=m.text.firstChild,G=!1;if(!R||!P(K,R))return Ss(zt(mn(m.line),0),!0);if(R==K&&(G=!0,R=K.childNodes[W],W=0,!R)){var $=m.rest?se(m.rest):m.line;return Ss(zt(mn($),$.text.length),G)}var ye=R.nodeType==3?R:null,Ae=R;for(!ye&&R.childNodes.length==1&&R.firstChild.nodeType==3&&(ye=R.firstChild,W&&(W=ye.nodeValue.length));Ae.parentNode!=K;)Ae=Ae.parentNode;var Ie=m.measure,Ke=Ie.maps;function dt(Cn,Fn,Zn){for(var jn=-1;jn<(Ke?Ke.length:0);jn++)for(var rr=jn<0?Ie.map:Ke[jn],Rr=0;Rr<rr.length;Rr+=3){var gr=rr[Rr+2];if(gr==Cn||gr==Fn){var ai=mn(jn<0?m.line:m.rest[jn]),ea=rr[Rr]+Zn;return(Zn<0||gr!=Cn)&&(ea=rr[Rr+(Zn?1:0)]),zt(ai,ea)}}}var bt=dt(ye,Ae,W);if(bt)return Ss(bt,G);for(var Kt=Ae.nextSibling,Pt=ye?ye.nodeValue.length-W:0;Kt;Kt=Kt.nextSibling){if(bt=dt(Kt,Kt.firstChild,0),bt)return Ss(zt(bt.line,bt.ch-Pt),G);Pt+=Kt.textContent.length}for(var tn=Ae.previousSibling,un=W;tn;tn=tn.previousSibling){if(bt=dt(tn,tn.firstChild,-1),bt)return Ss(zt(bt.line,bt.ch+un),G);un+=tn.textContent.length}}var Ua=function(m){this.cm=m,this.prevInput="",this.pollingFast=!1,this.polling=new Z,this.hasSelection=!1,this.composing=null};Ua.prototype.init=function(m){var R=this,W=this,K=this.cm;this.createField(m);var G=this.textarea;m.wrapper.insertBefore(this.wrapper,m.wrapper.firstChild),a&&(G.style.width="0px"),Me(G,"input",function(){_&&p>=9&&R.hasSelection&&(R.hasSelection=null),W.poll()}),Me(G,"paste",function(ye){if(Je(K,ye)||zl(ye,K))return;K.state.pasteIncoming=+new Date,W.fastPoll()});function $(ye){if(Je(K,ye))return;if(K.somethingSelected())il({lineWise:!1,text:K.getSelections()});else if(K.options.lineWiseCopyCut){var Ae=bl(K);il({lineWise:!0,text:Ae.text}),ye.type=="cut"?K.setSelections(Ae.ranges,null,ke):(W.prevInput="",G.value=Ae.text.join(`
|
|
|
`),F(G))}else return;ye.type=="cut"&&(K.state.cutIncoming=+new Date)}Me(G,"cut",$),Me(G,"copy",$),Me(m.scroller,"paste",function(ye){if(Go(m,ye)||Je(K,ye))return;if(!G.dispatchEvent){K.state.pasteIncoming=+new Date,W.focus();return}var Ae=new Event("paste");Ae.clipboardData=ye.clipboardData,G.dispatchEvent(Ae)}),Me(m.lineSpace,"selectstart",function(ye){Go(m,ye)||ve(ye)}),Me(G,"compositionstart",function(){var ye=K.getCursor("from");W.composing&&W.composing.range.clear(),W.composing={start:ye,range:K.markText(ye,K.getCursor("to"),{className:"CodeMirror-composing"})}}),Me(G,"compositionend",function(){W.composing&&(W.poll(),W.composing.range.clear(),W.composing=null)})},Ua.prototype.createField=function(m){this.wrapper=Ll(),this.textarea=this.wrapper.firstChild},Ua.prototype.screenReaderLabelChanged=function(m){m?this.textarea.setAttribute("aria-label",m):this.textarea.removeAttribute("aria-label")},Ua.prototype.prepareSelection=function(){var m=this.cm,R=m.display,W=m.doc,K=Vo(m);if(m.options.moveInputWithCursor){var G=ei(m,W.sel.primary().head,"div"),$=R.wrapper.getBoundingClientRect(),ye=R.lineDiv.getBoundingClientRect();K.teTop=Math.max(0,Math.min(R.wrapper.clientHeight-10,G.top+ye.top-$.top)),K.teLeft=Math.max(0,Math.min(R.wrapper.clientWidth-10,G.left+ye.left-$.left))}return K},Ua.prototype.showSelection=function(m){var R=this.cm,W=R.display;A(W.cursorDiv,m.cursors),A(W.selectionDiv,m.selection),m.teTop!=null&&(this.wrapper.style.top=m.teTop+"px",this.wrapper.style.left=m.teLeft+"px")},Ua.prototype.reset=function(m){if(this.contextMenuPending||this.composing)return;var R=this.cm;if(R.somethingSelected()){this.prevInput="";var W=R.getSelection();this.textarea.value=W,R.state.focused&&F(this.textarea),_&&p>=9&&(this.hasSelection=W)}else m||(this.prevInput=this.textarea.value="",_&&p>=9&&(this.hasSelection=null))},Ua.prototype.getField=function(){return this.textarea},Ua.prototype.supportsTouch=function(){return!1},Ua.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!d||z()!=this.textarea))try{this.textarea.focus()}catch(m){}},Ua.prototype.blur=function(){this.textarea.blur()},Ua.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ua.prototype.receivedFocus=function(){this.slowPoll()},Ua.prototype.slowPoll=function(){var m=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){m.poll(),m.cm.state.focused&&m.slowPoll()})},Ua.prototype.fastPoll=function(){var m=!1,R=this;R.pollingFast=!0;function W(){var K=R.poll();!K&&!m?(m=!0,R.polling.set(60,W)):(R.pollingFast=!1,R.slowPoll())}R.polling.set(20,W)},Ua.prototype.poll=function(){var m=this,R=this.cm,W=this.textarea,K=this.prevInput;if(this.contextMenuPending||!R.state.focused||ft(W)&&!K&&!this.composing||R.isReadOnly()||R.options.disableInput||R.state.keySeq)return!1;var G=W.value;if(G==K&&!R.somethingSelected())return!1;if(_&&p>=9&&this.hasSelection===G||f&&/[\uf700-\uf7ff]/.test(G))return R.display.input.reset(),!1;if(R.doc.sel==R.display.selForContextMenu){var $=G.charCodeAt(0);if($==8203&&!K&&(K="\u200B"),$==8666)return this.reset(),this.cm.execCommand("undo")}for(var ye=0,Ae=Math.min(K.length,G.length);ye<Ae&&K.charCodeAt(ye)==G.charCodeAt(ye);)++ye;return uo(R,function(){yl(R,G.slice(ye),K.length-ye,null,m.composing?"*compose":null),G.length>1e3||G.indexOf(`
|
|
|
`)>-1?W.value=m.prevInput="":m.prevInput=G,m.composing&&(m.composing.range.clear(),m.composing.range=R.markText(m.composing.start,R.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ua.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ua.prototype.onKeyPress=function(){_&&p>=9&&(this.hasSelection=null),this.fastPoll()},Ua.prototype.onContextMenu=function(m){var R=this,W=R.cm,K=W.display,G=R.textarea;R.contextMenuPending&&R.contextMenuPending();var $=ka(W,m),ye=K.scroller.scrollTop;if(!$||l)return;var Ae=W.options.resetSelectionOnContextMenu;Ae&&W.doc.sel.contains($)==-1&&ia(W,fi)(W.doc,Zt($),ke);var Ie=G.style.cssText,Ke=R.wrapper.style.cssText,dt=R.wrapper.offsetParent.getBoundingClientRect();R.wrapper.style.cssText="position: static",G.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(m.clientY-dt.top-5)+"px; left: "+(m.clientX-dt.left-5)+`px;
|
|
|
z-index: 1000; background: `+(_?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var bt;e&&(bt=window.scrollY),K.input.focus(),e&&window.scrollTo(null,bt),K.input.reset(),W.somethingSelected()||(G.value=R.prevInput=" "),R.contextMenuPending=Pt,K.selForContextMenu=W.doc.sel,clearTimeout(K.detectingSelectAll);function Kt(){if(G.selectionStart!=null){var un=W.somethingSelected(),Cn="\u200B"+(un?G.value:"");G.value="\u21DA",G.value=Cn,R.prevInput=un?"":"\u200B",G.selectionStart=1,G.selectionEnd=Cn.length,K.selForContextMenu=W.doc.sel}}function Pt(){if(R.contextMenuPending!=Pt)return;if(R.contextMenuPending=!1,R.wrapper.style.cssText=Ke,G.style.cssText=Ie,_&&p<9&&K.scrollbars.setScrollTop(K.scroller.scrollTop=ye),G.selectionStart!=null){(!_||_&&p<9)&&Kt();var un=0,Cn=function(){K.selForContextMenu==W.doc.sel&&G.selectionStart==0&&G.selectionEnd>0&&R.prevInput=="\u200B"?ia(W,ao)(W):un++<10?K.detectingSelectAll=setTimeout(Cn,500):(K.selForContextMenu=null,K.input.reset())};K.detectingSelectAll=setTimeout(Cn,200)}}if(_&&p>=9&&Kt(),O){je(m);var tn=function(){Oe(window,"mouseup",tn),setTimeout(Pt,20)};Me(window,"mouseup",tn)}else setTimeout(Pt,50)},Ua.prototype.readOnlyChanged=function(m){m||this.reset(),this.textarea.disabled=m=="nocursor",this.textarea.readOnly=!!m},Ua.prototype.setUneditable=function(){},Ua.prototype.needsContentAttribute=!1;function iu(m,R){if(R=R?L(R):{},R.value=m.value,!R.tabindex&&m.tabIndex&&(R.tabindex=m.tabIndex),!R.placeholder&&m.placeholder&&(R.placeholder=m.placeholder),R.autofocus==null){var W=z();R.autofocus=W==m||m.getAttribute("autofocus")!=null&&W==document.body}function K(){m.value=Ae.getValue()}var G;if(m.form&&(Me(m.form,"submit",K),!R.leaveSubmitMethodAlone)){var $=m.form;G=$.submit;try{var ye=$.submit=function(){K(),$.submit=G,$.submit(),$.submit=ye}}catch(Ie){}}R.finishInit=function(Ie){Ie.save=K,Ie.getTextArea=function(){return m},Ie.toTextArea=function(){Ie.toTextArea=isNaN,K(),m.parentNode.removeChild(Ie.getWrapperElement()),m.style.display="",m.form&&(Oe(m.form,"submit",K),!R.leaveSubmitMethodAlone&&typeof m.form.submit=="function"&&(m.form.submit=G))}},m.style.display="none";var Ae=ca(function(Ie){return m.parentNode.insertBefore(Ie,m.nextSibling)},R);return Ae}function au(m){m.off=Oe,m.on=Me,m.wheelEventPixels=St,m.Doc=Ir,m.splitLines=xt,m.countColumn=B,m.findColumn=Te,m.isWordChar=q,m.Pass=Ce,m.signal=Ve,m.Line=Za,m.changeEnd=on,m.scrollbarModel=Al,m.Pos=zt,m.cmpPos=xn,m.modes=yt,m.mimeModes=pt,m.resolveMode=gt,m.getMode=Ht,m.modeExtensions=Ut,m.extendMode=Nt,m.copyState=Wt,m.startState=pn,m.innerMode=Qt,m.commands=bs,m.keyMap=Mo,m.keyName=Js,m.isModifierKey=Ys,m.lookupKey=ps,m.normalizeKeyMap=ks,m.StringStream=qt,m.SharedTextMarker=Ai,m.TextMarker=po,m.LineWidget=eo,m.e_preventDefault=ve,m.e_stopPropagation=xe,m.e_stop=je,m.addClass=X,m.contains=P,m.rmClass=w,m.keyNames=ns}kl(ca),Vl(ca);var ou="iter insert remove copy getEditor constructor".split(" ");for(var ql in Ir.prototype)Ir.prototype.hasOwnProperty(ql)&&re(ou,ql)<0&&(ca.prototype[ql]=function(m){return function(){return m.apply(this.doc,arguments)}}(Ir.prototype[ql]));return He(Ir),ca.inputStyles={textarea:Ua,contenteditable:ki},ca.defineMode=function(m){!ca.defaults.mode&&m!="null"&&(ca.defaults.mode=m),jt.apply(this,arguments)},ca.defineMIME=Bt,ca.defineMode("null",function(){return{token:function(m){return m.skipToEnd()}}}),ca.defineMIME("text/plain","null"),ca.defineExtension=function(m,R){ca.prototype[m]=R},ca.defineDocExtension=function(m,R){Ir.prototype[m]=R},ca.fromTextArea=iu,au(ca),ca.version="5.58.2",ca})},W6BS:function(j,H){j.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(j,H,b){(function(I,v){j.exports=H=v(b("Ib8C"))})(this,function(I){(function(){var v=I,T=v.lib,y=T.Base,g=v.enc,s=g.Utf8,_=v.algo,p=_.HMAC=y.extend({init:function(e,o){e=this._hasher=new e.init,typeof o=="string"&&(o=s.parse(o));var n=e.blockSize,l=n*4;o.sigBytes>l&&(o=e.finalize(o)),o.clamp();for(var r=this._oKey=o.clone(),i=this._iKey=o.clone(),t=r.words,a=i.words,c=0;c<n;c++)t[c]^=1549556828,a[c]^=909522486;r.sigBytes=i.sigBytes=l,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var o=this._hasher,n=o.finalize(e);o.reset();var l=o.finalize(this._oKey.clone().concat(n));return l}})})()})},WaYH:function(j,H,b){"use strict";var I=b("rePB"),v=b("Ff2n"),T=b("VTBJ"),y=b("1OyB"),g=b("vuIU"),s=b("JX7q"),_=b("Ji7U"),p=b("LK+K"),e=b("q1tI"),o=b("TSYQ"),n=b.n(o),l=b("sboe"),r=b("OZM5"),i=function(O){var C=O.prefixCls,w=O.level,S=O.isStart,A=O.isEnd;if(!w)return null;for(var D="".concat(C,"-indent-unit"),M=[],N=0;N<w;N+=1){var P;M.push(e.createElement("span",{key:N,className:n()(D,(P={},Object(I.a)(P,"".concat(D,"-start"),S[N+1]),Object(I.a)(P,"".concat(D,"-end"),A[N+1]),Object(I.a)(P,"".concat(D,"-end-first-level"),!N&&A[0]),P))}))}return e.createElement("span",{"aria-hidden":"true",className:"".concat(C,"-indent")},M)},t=i,a=b("815F"),c="open",d="close",f="---",h=function(x){Object(_.a)(C,x);var O=Object(p.a)(C);function C(){var w;return Object(y.a)(this,C),w=O.apply(this,arguments),w.state={dragNodeHighlight:!1},w.onSelectorClick=function(S){var A=w.props.context.onNodeClick;A(S,Object(a.b)(w.props)),w.isSelectable()?w.onSelect(S):w.onCheck(S)},w.onSelectorDoubleClick=function(S){var A=w.props.context.onNodeDoubleClick;A(S,Object(a.b)(w.props))},w.onSelect=function(S){if(w.isDisabled())return;var A=w.props.context.onNodeSelect;S.preventDefault(),A(S,Object(a.b)(w.props))},w.onCheck=function(S){if(w.isDisabled())return;var A=w.props,D=A.disableCheckbox,M=A.checked,N=w.props.context.onNodeCheck;if(!w.isCheckable()||D)return;S.preventDefault();var P=!M;N(S,Object(a.b)(w.props),P)},w.onMouseEnter=function(S){var A=w.props.context.onNodeMouseEnter;A(S,Object(a.b)(w.props))},w.onMouseLeave=function(S){var A=w.props.context.onNodeMouseLeave;A(S,Object(a.b)(w.props))},w.onContextMenu=function(S){var A=w.props.context.onNodeContextMenu;A(S,Object(a.b)(w.props))},w.onDragStart=function(S){var A=w.props.context.onNodeDragStart;S.stopPropagation(),w.setState({dragNodeHighlight:!0}),A(S,Object(s.a)(w));try{S.dataTransfer.setData("text/plain","")}catch(D){}},w.onDragEnter=function(S){var A=w.props.context.onNodeDragEnter;S.preventDefault(),S.stopPropagation(),A(S,Object(s.a)(w))},w.onDragOver=function(S){var A=w.props.context.onNodeDragOver;S.preventDefault(),S.stopPropagation(),A(S,Object(s.a)(w))},w.onDragLeave=function(S){var A=w.props.context.onNodeDragLeave;S.stopPropagation(),A(S,Object(s.a)(w))},w.onDragEnd=function(S){var A=w.props.context.onNodeDragEnd;S.stopPropagation(),w.setState({dragNodeHighlight:!1}),A(S,Object(s.a)(w))},w.onDrop=function(S){var A=w.props.context.onNodeDrop;S.preventDefault(),S.stopPropagation(),w.setState({dragNodeHighlight:!1}),A(S,Object(s.a)(w))},w.onExpand=function(S){var A=w.props.context.onNodeExpand;A(S,Object(a.b)(w.props))},w.setSelectHandle=function(S){w.selectHandle=S},w.getNodeState=function(){var S=w.props.expanded;return w.isLeaf()?null:S?c:d},w.hasChildren=function(){var S=w.props.eventKey,A=w.props.context.keyEntities,D=A[S]||{},M=D.children;return!!(M||[]).length},w.isLeaf=function(){var S=w.props,A=S.isLeaf,D=S.loaded,M=w.props.context.loadData,N=w.hasChildren();return A===!1?!1:A||!M&&!N||M&&D&&!N},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,D=S.loading,M=S.loaded,N=w.props.context,P=N.loadData,z=N.onNodeLoad;if(D)return;P&&A&&!w.isLeaf()&&(!w.hasChildren()&&!M&&z(Object(a.b)(w.props)))},w.renderSwitcher=function(){var S=w.props,A=S.expanded,D=S.switcherIcon,M=w.props.context,N=M.prefixCls,P=M.switcherIcon,z=D||P;if(w.isLeaf())return e.createElement("span",{className:n()("".concat(N,"-switcher"),"".concat(N,"-switcher-noop"))},typeof z=="function"?z(Object(T.a)(Object(T.a)({},w.props),{},{isLeaf:!0})):z);var X=n()("".concat(N,"-switcher"),"".concat(N,"-switcher_").concat(A?c:d));return e.createElement("span",{onClick:w.onExpand,className:X},typeof z=="function"?z(Object(T.a)(Object(T.a)({},w.props),{},{isLeaf:!1})):z)},w.renderCheckbox=function(){var S=w.props,A=S.checked,D=S.halfChecked,M=S.disableCheckbox,N=w.props.context.prefixCls,P=w.isDisabled(),z=w.isCheckable();if(!z)return null;var X=typeof z!="boolean"?z:null;return e.createElement("span",{className:n()("".concat(N,"-checkbox"),A&&"".concat(N,"-checkbox-checked"),!A&&D&&"".concat(N,"-checkbox-indeterminate"),(P||M)&&"".concat(N,"-checkbox-disabled")),onClick:w.onCheck},X)},w.renderIcon=function(){var S=w.props.loading,A=w.props.context.prefixCls;return e.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,D=A.title,M=A.selected,N=A.icon,P=A.loading,z=A.data,X=w.props.context,k=X.prefixCls,F=X.showIcon,U=X.icon,L=X.draggable,B=X.loadData,Z=X.titleRender,re=w.isDisabled(),he="".concat(k,"-node-content-wrapper"),Ce;if(F){var ke=N||U;Ce=ke?e.createElement("span",{className:n()("".concat(k,"-iconEle"),"".concat(k,"-icon__customize"))},typeof ke=="function"?ke(w.props):ke):w.renderIcon()}else B&&P&&(Ce=w.renderIcon());var te;typeof D=="function"?te=D(z):Z?te=Z(z):te=D;var Re=e.createElement("span",{className:"".concat(k,"-title")},te);return e.createElement("span",{ref:w.setSelectHandle,title:typeof D=="string"?D:"",className:n()("".concat(he),"".concat(he,"-").concat(w.getNodeState()||"normal"),!re&&(M||S)&&"".concat(k,"-node-selected"),!re&&L&&"draggable"),draggable:!re&&L||void 0,"aria-grabbed":!re&&L||void 0,onMouseEnter:w.onMouseEnter,onMouseLeave:w.onMouseLeave,onContextMenu:w.onContextMenu,onClick:w.onSelectorClick,onDoubleClick:w.onSelectorDoubleClick,onDragStart:L?w.onDragStart:void 0},Ce,Re)},w}return Object(g.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,D=A.eventKey,M=A.className,N=A.style,P=A.dragOver,z=A.dragOverGapTop,X=A.dragOverGapBottom,k=A.isLeaf,F=A.isStart,U=A.isEnd,L=A.expanded,B=A.selected,Z=A.checked,re=A.halfChecked,he=A.loading,Ce=A.domRef,ke=A.active,te=A.onMouseMove,Re=Object(v.a)(A,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),Te=this.props.context,pe=Te.prefixCls,me=Te.filterTreeNode,se=Te.draggable,be=Te.keyEntities,ae=this.isDisabled(),fe=Object(r.f)(Re),Fe=be[D]||{},ie=Fe.level,q=U[U.length-1];return e.createElement("div",Object.assign({ref:Ce,className:n()(M,"".concat(pe,"-treenode"),(S={},Object(I.a)(S,"".concat(pe,"-treenode-disabled"),ae),Object(I.a)(S,"".concat(pe,"-treenode-switcher-").concat(L?"open":"close"),!k),Object(I.a)(S,"".concat(pe,"-treenode-checkbox-checked"),Z),Object(I.a)(S,"".concat(pe,"-treenode-checkbox-indeterminate"),re),Object(I.a)(S,"".concat(pe,"-treenode-selected"),B),Object(I.a)(S,"".concat(pe,"-treenode-loading"),he),Object(I.a)(S,"".concat(pe,"-treenode-active"),ke),Object(I.a)(S,"".concat(pe,"-treenode-leaf-last"),q),Object(I.a)(S,"drag-over",!ae&&P),Object(I.a)(S,"drag-over-gap-top",!ae&&z),Object(I.a)(S,"drag-over-gap-bottom",!ae&&X),Object(I.a)(S,"filter-node",me&&me(Object(a.b)(this.props))),S)),style:N,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:te},fe),e.createElement(t,{prefixCls:pe,level:ie,isStart:F,isEnd:U}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),C}(e.Component),u=function(O){return e.createElement(l.a.Consumer,null,function(C){return e.createElement(h,Object.assign({},O,{context:C}))})};u.displayName="TreeNode",u.defaultProps={title:f},u.isTreeNode=1;var E=H.a=u},X9zl:function(j,H,b){},XIdC:function(j,H,b){"use strict";var I=b("rePB"),v=b("ODXe"),T=b("Ff2n"),y=b("q1tI"),g=b.n(y),s=b("TSYQ"),_=b.n(s),p=b("6cGi"),e=b("4IlW"),o=y.forwardRef(function(n,l){var r,i=n.prefixCls,t=i===void 0?"rc-switch":i,a=n.className,c=n.checked,d=n.defaultChecked,f=n.disabled,h=n.loadingIcon,u=n.checkedChildren,E=n.unCheckedChildren,x=n.onClick,O=n.onChange,C=n.onKeyDown,w=Object(T.a)(n,["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"]),S=Object(p.a)(!1,{value:c,defaultValue:d}),A=Object(v.a)(S,2),D=A[0],M=A[1];function N(k,F){var U=D;return f||(U=k,M(U),O==null||O(U,F)),U}function P(k){k.which===e.a.LEFT?N(!1,k):k.which===e.a.RIGHT&&N(!0,k),C==null||C(k)}function z(k){var F=N(!D,k);x==null||x(F,k)}var X=_()(t,a,(r={},Object(I.a)(r,"".concat(t,"-checked"),D),Object(I.a)(r,"".concat(t,"-disabled"),f),r));return y.createElement("button",Object.assign({},w,{type:"button",role:"switch","aria-checked":D,disabled:f,className:X,ref:l,onKeyDown:P,onClick:z}),h,y.createElement("span",{className:"".concat(t,"-inner")},D?u:E))});o.displayName="Switch",H.a=o},XZCF:function(j,H,b){},Xsq0:function(j,H,b){j.exports=b.p+"static/mainbanner.0a951716.jpg"},Y1PL:function(j,H,b){"use strict";b.r(H),b.d(H,"ResizableTextArea",function(){return re});var I=b("wx14"),v=b("1OyB"),T=b("vuIU"),y=b("Ji7U"),g=b("LK+K"),s=b("q1tI"),_=b("VTBJ"),p=b("rePB"),e=b("Zm9Q"),o=b("Kwbf"),n=b("c+Xe"),l=b("m+aA"),r=b("bdgK"),i=new Map;function t(ke){ke.forEach(function(te){var Re,Te=te.target;(Re=i.get(Te))===null||Re===void 0||Re.forEach(function(pe){return pe(Te)})})}var a=new r.default(t),c=null,d=null;function f(ke,te){i.has(ke)||(i.set(ke,new Set),a.observe(ke)),i.get(ke).add(te)}function h(ke,te){i.has(ke)&&(i.get(ke).delete(te),i.get(ke).size||(a.unobserve(ke),i.delete(ke)))}var u=function(ke){Object(y.a)(Re,ke);var te=Object(g.a)(Re);function Re(){return Object(v.a)(this,Re),te.apply(this,arguments)}return Object(T.a)(Re,[{key:"render",value:function(){return this.props.children}}]),Re}(s.Component),E=s.createContext(null);function x(ke){var te=ke.children,Re=ke.onBatchResize,Te=s.useRef(0),pe=s.useRef([]),me=s.useContext(E),se=s.useCallback(function(be,ae,fe){Te.current+=1;var Fe=Te.current;pe.current.push({size:be,element:ae,data:fe}),Promise.resolve().then(function(){Fe===Te.current&&(Re==null||Re(pe.current),pe.current=[])}),me==null||me(be,ae,fe)},[Re,me]);return s.createElement(E.Provider,{value:se},te)}function O(ke){var te=ke.children,Re=ke.disabled,Te=s.useRef(null),pe=s.useRef(null),me=s.useContext(E),se=s.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),be=s.isValidElement(te)&&Object(n.c)(te),ae=be?te.ref:null,fe=s.useMemo(function(){return Object(n.a)(ae,Te)},[ae,Te]),Fe=s.useRef(ke);Fe.current=ke;var ie=s.useCallback(function(q){var Q=Fe.current,Y=Q.onResize,oe=Q.data,le=q.getBoundingClientRect(),Ee=le.width,Le=le.height,ge=q.offsetWidth,De=q.offsetHeight,_e=Math.floor(Ee),Xe=Math.floor(Le);if(se.current.width!==_e||se.current.height!==Xe||se.current.offsetWidth!==ge||se.current.offsetHeight!==De){var tt={width:_e,height:Xe,offsetWidth:ge,offsetHeight:De};se.current=tt;var ze=ge===Math.round(Ee)?Ee:ge,Me=De===Math.round(Le)?Le:De,Et=Object(_.a)(Object(_.a)({},tt),{},{offsetWidth:ze,offsetHeight:Me});me==null||me(Et,q,oe),Y&&Promise.resolve().then(function(){Y(Et,q)})}},[]);return s.useEffect(function(){var q=Object(l.a)(Te.current)||Object(l.a)(pe.current);return q&&!Re&&f(q,ie),function(){return h(q,ie)}},[Te.current,Re]),s.createElement(u,{ref:pe},be?s.cloneElement(te,{ref:fe}):te)}var C="rc-observer-key";function w(ke){var te=ke.children,Re=Object(e.a)(te);return Re.map(function(Te,pe){var me=(Te==null?void 0:Te.key)||"".concat(C,"-").concat(pe);return s.createElement(O,Object(I.a)({},ke,{key:me}),Te)})}w.Collection=x;var S=w,A=b("bT9E"),D=b("TSYQ"),M=b.n(D),N=`
|
|
|
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
|
|
|
`,P=["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"],z={},X;function k(ke){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Re=ke.getAttribute("id")||ke.getAttribute("data-reactid")||ke.getAttribute("name");if(te&&z[Re])return z[Re];var Te=window.getComputedStyle(ke),pe=Te.getPropertyValue("box-sizing")||Te.getPropertyValue("-moz-box-sizing")||Te.getPropertyValue("-webkit-box-sizing"),me=parseFloat(Te.getPropertyValue("padding-bottom"))+parseFloat(Te.getPropertyValue("padding-top")),se=parseFloat(Te.getPropertyValue("border-bottom-width"))+parseFloat(Te.getPropertyValue("border-top-width")),be=P.map(function(fe){return"".concat(fe,":").concat(Te.getPropertyValue(fe))}).join(";"),ae={sizingStyle:be,paddingSize:me,borderSize:se,boxSizing:pe};return te&&Re&&(z[Re]=ae),ae}function F(ke){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Re=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Te=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;X||(X=document.createElement("textarea"),X.setAttribute("tab-index","-1"),X.setAttribute("aria-hidden","true"),document.body.appendChild(X)),ke.getAttribute("wrap")?X.setAttribute("wrap",ke.getAttribute("wrap")):X.removeAttribute("wrap");var pe=k(ke,te),me=pe.paddingSize,se=pe.borderSize,be=pe.boxSizing,ae=pe.sizingStyle;X.setAttribute("style","".concat(ae,";").concat(N)),X.value=ke.value||ke.placeholder||"";var fe=Number.MIN_SAFE_INTEGER,Fe=Number.MAX_SAFE_INTEGER,ie=X.scrollHeight,q;if(be==="border-box"?ie+=se:be==="content-box"&&(ie-=me),Re!==null||Te!==null){X.value=" ";var Q=X.scrollHeight-me;Re!==null&&(fe=Q*Re,be==="border-box"&&(fe=fe+me+se),ie=Math.max(fe,ie)),Te!==null&&(Fe=Q*Te,be==="border-box"&&(Fe=Fe+me+se),q=ie>Fe?"":"hidden",ie=Math.min(Fe,ie))}return{height:ie,minHeight:fe,maxHeight:Fe,overflowY:q,resize:"none"}}var U=b("Gytx"),L=b.n(U),B;(function(ke){ke[ke.NONE=0]="NONE",ke[ke.RESIZING=1]="RESIZING",ke[ke.RESIZED=2]="RESIZED"})(B||(B={}));var Z=function(ke){Object(y.a)(Re,ke);var te=Object(g.a)(Re);function Re(Te){var pe;return Object(v.a)(this,Re),pe=te.call(this,Te),pe.nextFrameActionId=void 0,pe.resizeFrameId=void 0,pe.textArea=void 0,pe.saveTextArea=function(me){pe.textArea=me},pe.handleResize=function(me){var se=pe.state.resizeStatus,be=pe.props,ae=be.autoSize,fe=be.onResize;if(se!==B.NONE)return;typeof fe=="function"&&fe(me),ae&&pe.resizeOnNextFrame()},pe.resizeOnNextFrame=function(){cancelAnimationFrame(pe.nextFrameActionId),pe.nextFrameActionId=requestAnimationFrame(pe.resizeTextarea)},pe.resizeTextarea=function(){var me=pe.props.autoSize;if(!me||!pe.textArea)return;var se=me.minRows,be=me.maxRows,ae=F(pe.textArea,!1,se,be);pe.setState({textareaStyles:ae,resizeStatus:B.RESIZING},function(){cancelAnimationFrame(pe.resizeFrameId),pe.resizeFrameId=requestAnimationFrame(function(){pe.setState({resizeStatus:B.RESIZED},function(){pe.resizeFrameId=requestAnimationFrame(function(){pe.setState({resizeStatus:B.NONE}),pe.fixFirefoxAutoScroll()})})})})},pe.renderTextArea=function(){var me=pe.props,se=me.prefixCls,be=se===void 0?"rc-textarea":se,ae=me.autoSize,fe=me.onResize,Fe=me.className,ie=me.disabled,q=pe.state,Q=q.textareaStyles,Y=q.resizeStatus,oe=Object(A.a)(pe.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),le=M()(be,Fe,Object(p.a)({},"".concat(be,"-disabled"),ie));"value"in oe&&(oe.value=oe.value||"");var Ee=Object(_.a)(Object(_.a)(Object(_.a)({},pe.props.style),Q),Y===B.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return s.createElement(S,{onResize:pe.handleResize,disabled:!(ae||fe)},s.createElement("textarea",Object(I.a)({},oe,{className:le,style:Ee,ref:pe.saveTextArea})))},pe.state={textareaStyles:{},resizeStatus:B.NONE},pe}return Object(T.a)(Re,[{key:"componentDidUpdate",value:function(pe){(pe.value!==this.props.value||!L()(pe.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 pe=this.textArea.selectionStart,me=this.textArea.selectionEnd;this.textArea.setSelectionRange(pe,me)}}catch(se){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Re}(s.Component),re=Z,he=function(ke){Object(y.a)(Re,ke);var te=Object(g.a)(Re);function Re(Te){var pe;Object(v.a)(this,Re),pe=te.call(this,Te),pe.resizableTextArea=void 0,pe.focus=function(){pe.resizableTextArea.textArea.focus()},pe.saveTextArea=function(se){pe.resizableTextArea=se},pe.handleChange=function(se){var be=pe.props.onChange;pe.setValue(se.target.value,function(){pe.resizableTextArea.resizeTextarea()}),be&&be(se)},pe.handleKeyDown=function(se){var be=pe.props,ae=be.onPressEnter,fe=be.onKeyDown;se.keyCode===13&&ae&&ae(se),fe&&fe(se)};var me=typeof Te.value=="undefined"||Te.value===null?Te.defaultValue:Te.value;return pe.state={value:me},pe}return Object(T.a)(Re,[{key:"setValue",value:function(pe,me){"value"in this.props||this.setState({value:pe},me)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return s.createElement(re,Object(I.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(pe){return"value"in pe?{value:pe.value}:null}}]),Re}(s.Component),Ce=H.default=he},YJ9k:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;function I(g,s){if(!(g instanceof s))throw new TypeError("Cannot call a class as a function")}function v(g,s){for(var _=0;_<s.length;_++){var p=s[_];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(g,p.key,p)}}function T(g,s,_){return s&&v(g.prototype,s),_&&v(g,_),g}var y=function(){function g(){I(this,g),this._listeners=new Map}return T(g,[{key:"addEventListener",value:function(_,p){this._listeners.has(_)||this._listeners.set(_,new Set),this._listeners.get(_).add(p)}},{key:"removeEventListener",value:function(_,p){this._listeners.has(_)&&this._listeners.get(_).delete(p)}},{key:"dispatchEvent",value:function(_){var p=this;return this._listeners.has(_.type)?(this._listeners.get(_.type).forEach(function(e){return e.call(p,_)}),!_.defaultPrevented):!0}}]),g}();H.default=y},Ypxr:function(j,H,b){},Yr8L:function(j,H){j.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(j,H){var b=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,v=1,T=0;b.Diff=function(y,g){return[y,g]},b.prototype.diff_main=function(y,g,s,_){typeof _=="undefined"&&(this.Diff_Timeout<=0?_=Number.MAX_VALUE:_=new Date().getTime()+this.Diff_Timeout*1e3);var p=_;if(y==null||g==null)throw new Error("Null input. (diff_main)");if(y==g)return y?[new b.Diff(T,y)]:[];typeof s=="undefined"&&(s=!0);var e=s,o=this.diff_commonPrefix(y,g),n=y.substring(0,o);y=y.substring(o),g=g.substring(o),o=this.diff_commonSuffix(y,g);var l=y.substring(y.length-o);y=y.substring(0,y.length-o),g=g.substring(0,g.length-o);var r=this.diff_compute_(y,g,e,p);return n&&r.unshift(new b.Diff(T,n)),l&&r.push(new b.Diff(T,l)),this.diff_cleanupMerge(r),r},b.prototype.diff_compute_=function(y,g,s,_){var p;if(!y)return[new b.Diff(v,g)];if(!g)return[new b.Diff(I,y)];var e=y.length>g.length?y:g,o=y.length>g.length?g:y,n=e.indexOf(o);if(n!=-1)return p=[new b.Diff(v,e.substring(0,n)),new b.Diff(T,o),new b.Diff(v,e.substring(n+o.length))],y.length>g.length&&(p[0][0]=p[2][0]=I),p;if(o.length==1)return[new b.Diff(I,y),new b.Diff(v,g)];var l=this.diff_halfMatch_(y,g);if(l){var r=l[0],i=l[1],t=l[2],a=l[3],c=l[4],d=this.diff_main(r,t,s,_),f=this.diff_main(i,a,s,_);return d.concat([new b.Diff(T,c)],f)}return s&&y.length>100&&g.length>100?this.diff_lineMode_(y,g,_):this.diff_bisect_(y,g,_)},b.prototype.diff_lineMode_=function(y,g,s){var _=this.diff_linesToChars_(y,g);y=_.chars1,g=_.chars2;var p=_.lineArray,e=this.diff_main(y,g,!1,s);this.diff_charsToLines_(e,p),this.diff_cleanupSemantic(e),e.push(new b.Diff(T,""));for(var o=0,n=0,l=0,r="",i="";o<e.length;){switch(e[o][0]){case v:l++,i+=e[o][1];break;case I:n++,r+=e[o][1];break;case T:if(n>=1&&l>=1){e.splice(o-n-l,n+l),o=o-n-l;for(var t=this.diff_main(r,i,!1,s),a=t.length-1;a>=0;a--)e.splice(o,0,t[a]);o=o+t.length}l=0,n=0,r="",i="";break}o++}return e.pop(),e},b.prototype.diff_bisect_=function(y,g,s){for(var _=y.length,p=g.length,e=Math.ceil((_+p)/2),o=e,n=2*e,l=new Array(n),r=new Array(n),i=0;i<n;i++)l[i]=-1,r[i]=-1;l[o+1]=0,r[o+1]=0;for(var t=_-p,a=t%2!=0,c=0,d=0,f=0,h=0,u=0;u<e&&!(new Date().getTime()>s);u++){for(var E=-u+c;E<=u-d;E+=2){var x=o+E,O;E==-u||E!=u&&l[x-1]<l[x+1]?O=l[x+1]:O=l[x-1]+1;for(var C=O-E;O<_&&C<p&&y.charAt(O)==g.charAt(C);)O++,C++;if(l[x]=O,O>_)d+=2;else if(C>p)c+=2;else if(a){var w=o+t-E;if(w>=0&&w<n&&r[w]!=-1){var S=_-r[w];if(O>=S)return this.diff_bisectSplit_(y,g,O,C,s)}}}for(var A=-u+f;A<=u-h;A+=2){var w=o+A,S;A==-u||A!=u&&r[w-1]<r[w+1]?S=r[w+1]:S=r[w-1]+1;for(var D=S-A;S<_&&D<p&&y.charAt(_-S-1)==g.charAt(p-D-1);)S++,D++;if(r[w]=S,S>_)h+=2;else if(D>p)f+=2;else if(!a){var x=o+t-A;if(x>=0&&x<n&&l[x]!=-1){var O=l[x],C=o+O-x;if(S=_-S,O>=S)return this.diff_bisectSplit_(y,g,O,C,s)}}}}return[new b.Diff(I,y),new b.Diff(v,g)]},b.prototype.diff_bisectSplit_=function(y,g,s,_,p){var e=y.substring(0,s),o=g.substring(0,_),n=y.substring(s),l=g.substring(_),r=this.diff_main(e,o,!1,p),i=this.diff_main(n,l,!1,p);return r.concat(i)},b.prototype.diff_linesToChars_=function(y,g){var s=[],_={};s[0]="";function p(l){for(var r="",i=0,t=-1,a=s.length;t<l.length-1;){t=l.indexOf(`
|
|
|
`,i),t==-1&&(t=l.length-1);var c=l.substring(i,t+1);(_.hasOwnProperty?_.hasOwnProperty(c):_[c]!==void 0)?r+=String.fromCharCode(_[c]):(a==e&&(c=l.substring(i),t=l.length),r+=String.fromCharCode(a),_[c]=a,s[a++]=c),i=t+1}return r}var e=4e4,o=p(y);e=65535;var n=p(g);return{chars1:o,chars2:n,lineArray:s}},b.prototype.diff_charsToLines_=function(y,g){for(var s=0;s<y.length;s++){for(var _=y[s][1],p=[],e=0;e<_.length;e++)p[e]=g[_.charCodeAt(e)];y[s][1]=p.join("")}},b.prototype.diff_commonPrefix=function(y,g){if(!y||!g||y.charAt(0)!=g.charAt(0))return 0;for(var s=0,_=Math.min(y.length,g.length),p=_,e=0;s<p;)y.substring(e,p)==g.substring(e,p)?(s=p,e=s):_=p,p=Math.floor((_-s)/2+s);return p},b.prototype.diff_commonSuffix=function(y,g){if(!y||!g||y.charAt(y.length-1)!=g.charAt(g.length-1))return 0;for(var s=0,_=Math.min(y.length,g.length),p=_,e=0;s<p;)y.substring(y.length-p,y.length-e)==g.substring(g.length-p,g.length-e)?(s=p,e=s):_=p,p=Math.floor((_-s)/2+s);return p},b.prototype.diff_commonOverlap_=function(y,g){var s=y.length,_=g.length;if(s==0||_==0)return 0;s>_?y=y.substring(s-_):s<_&&(g=g.substring(0,s));var p=Math.min(s,_);if(y==g)return p;for(var e=0,o=1;;){var n=y.substring(p-o),l=g.indexOf(n);if(l==-1)return e;o+=l,(l==0||y.substring(p-o)==g.substring(0,o))&&(e=o,o++)}},b.prototype.diff_halfMatch_=function(y,g){if(this.Diff_Timeout<=0)return null;var s=y.length>g.length?y:g,_=y.length>g.length?g:y;if(s.length<4||_.length*2<s.length)return null;var p=this;function e(d,f,h){for(var u=d.substring(h,h+Math.floor(d.length/4)),E=-1,x="",O,C,w,S;(E=f.indexOf(u,E+1))!=-1;){var A=p.diff_commonPrefix(d.substring(h),f.substring(E)),D=p.diff_commonSuffix(d.substring(0,h),f.substring(0,E));x.length<D+A&&(x=f.substring(E-D,E)+f.substring(E,E+A),O=d.substring(0,h-D),C=d.substring(h+A),w=f.substring(0,E-D),S=f.substring(E+A))}return x.length*2>=d.length?[O,C,w,S,x]:null}var o=e(s,_,Math.ceil(s.length/4)),n=e(s,_,Math.ceil(s.length/2)),l;if(!o&&!n)return null;n?o?l=o[4].length>n[4].length?o:n:l=n:l=o;var r,i,t,a;y.length>g.length?(r=l[0],i=l[1],t=l[2],a=l[3]):(t=l[0],a=l[1],r=l[2],i=l[3]);var c=l[4];return[r,i,t,a,c]},b.prototype.diff_cleanupSemantic=function(y){for(var g=!1,s=[],_=0,p=null,e=0,o=0,n=0,l=0,r=0;e<y.length;)y[e][0]==T?(s[_++]=e,o=l,n=r,l=0,r=0,p=y[e][1]):(y[e][0]==v?l+=y[e][1].length:r+=y[e][1].length,p&&p.length<=Math.max(o,n)&&p.length<=Math.max(l,r)&&(y.splice(s[_-1],0,new b.Diff(I,p)),y[s[_-1]+1][0]=v,_--,_--,e=_>0?s[_-1]:-1,o=0,n=0,l=0,r=0,p=null,g=!0)),e++;for(g&&this.diff_cleanupMerge(y),this.diff_cleanupSemanticLossless(y),e=1;e<y.length;){if(y[e-1][0]==I&&y[e][0]==v){var i=y[e-1][1],t=y[e][1],a=this.diff_commonOverlap_(i,t),c=this.diff_commonOverlap_(t,i);a>=c?(a>=i.length/2||a>=t.length/2)&&(y.splice(e,0,new b.Diff(T,t.substring(0,a))),y[e-1][1]=i.substring(0,i.length-a),y[e+1][1]=t.substring(a),e++):(c>=i.length/2||c>=t.length/2)&&(y.splice(e,0,new b.Diff(T,i.substring(0,c))),y[e-1][0]=v,y[e-1][1]=t.substring(0,t.length-c),y[e+1][0]=I,y[e+1][1]=i.substring(c),e++),e++}e++}},b.prototype.diff_cleanupSemanticLossless=function(y){function g(c,d){if(!c||!d)return 6;var f=c.charAt(c.length-1),h=d.charAt(0),u=f.match(b.nonAlphaNumericRegex_),E=h.match(b.nonAlphaNumericRegex_),x=u&&f.match(b.whitespaceRegex_),O=E&&h.match(b.whitespaceRegex_),C=x&&f.match(b.linebreakRegex_),w=O&&h.match(b.linebreakRegex_),S=C&&c.match(b.blanklineEndRegex_),A=w&&d.match(b.blanklineStartRegex_);return S||A?5:C||w?4:u&&!x&&O?3:x||O?2:u||E?1:0}for(var s=1;s<y.length-1;){if(y[s-1][0]==T&&y[s+1][0]==T){var _=y[s-1][1],p=y[s][1],e=y[s+1][1],o=this.diff_commonSuffix(_,p);if(o){var n=p.substring(p.length-o);_=_.substring(0,_.length-o),p=n+p.substring(0,p.length-o),e=n+e}for(var l=_,r=p,i=e,t=g(_,p)+g(p,e);p.charAt(0)===e.charAt(0);){_+=p.charAt(0),p=p.substring(1)+e.charAt(0),e=e.substring(1);var a=g(_,p)+g(p,e);a>=t&&(t=a,l=_,r=p,i=e)}y[s-1][1]!=l&&(l?y[s-1][1]=l:(y.splice(s-1,1),s--),y[s][1]=r,i?y[s+1][1]=i:(y.splice(s+1,1),s--))}s++}},b.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,b.whitespaceRegex_=/\s/,b.linebreakRegex_=/[\r\n]/,b.blanklineEndRegex_=/\n\r?\n$/,b.blanklineStartRegex_=/^\r?\n\r?\n/,b.prototype.diff_cleanupEfficiency=function(y){for(var g=!1,s=[],_=0,p=null,e=0,o=!1,n=!1,l=!1,r=!1;e<y.length;)y[e][0]==T?(y[e][1].length<this.Diff_EditCost&&(l||r)?(s[_++]=e,o=l,n=r,p=y[e][1]):(_=0,p=null),l=r=!1):(y[e][0]==I?r=!0:l=!0,p&&(o&&n&&l&&r||p.length<this.Diff_EditCost/2&&o+n+l+r==3)&&(y.splice(s[_-1],0,new b.Diff(I,p)),y[s[_-1]+1][0]=v,_--,p=null,o&&n?(l=r=!0,_=0):(_--,e=_>0?s[_-1]:-1,l=r=!1),g=!0)),e++;g&&this.diff_cleanupMerge(y)},b.prototype.diff_cleanupMerge=function(y){y.push(new b.Diff(T,""));for(var g=0,s=0,_=0,p="",e="",o;g<y.length;)switch(y[g][0]){case v:_++,e+=y[g][1],g++;break;case I:s++,p+=y[g][1],g++;break;case T:s+_>1?(s!==0&&_!==0&&(o=this.diff_commonPrefix(e,p),o!==0&&(g-s-_>0&&y[g-s-_-1][0]==T?y[g-s-_-1][1]+=e.substring(0,o):(y.splice(0,0,new b.Diff(T,e.substring(0,o))),g++),e=e.substring(o),p=p.substring(o)),o=this.diff_commonSuffix(e,p),o!==0&&(y[g][1]=e.substring(e.length-o)+y[g][1],e=e.substring(0,e.length-o),p=p.substring(0,p.length-o))),g-=s+_,y.splice(g,s+_),p.length&&(y.splice(g,0,new b.Diff(I,p)),g++),e.length&&(y.splice(g,0,new b.Diff(v,e)),g++),g++):g!==0&&y[g-1][0]==T?(y[g-1][1]+=y[g][1],y.splice(g,1)):g++,_=0,s=0,p="",e="";break}y[y.length-1][1]===""&&y.pop();var n=!1;for(g=1;g<y.length-1;)y[g-1][0]==T&&y[g+1][0]==T&&(y[g][1].substring(y[g][1].length-y[g-1][1].length)==y[g-1][1]?(y[g][1]=y[g-1][1]+y[g][1].substring(0,y[g][1].length-y[g-1][1].length),y[g+1][1]=y[g-1][1]+y[g+1][1],y.splice(g-1,1),n=!0):y[g][1].substring(0,y[g+1][1].length)==y[g+1][1]&&(y[g-1][1]+=y[g+1][1],y[g][1]=y[g][1].substring(y[g+1][1].length)+y[g+1][1],y.splice(g+1,1),n=!0)),g++;n&&this.diff_cleanupMerge(y)},b.prototype.diff_xIndex=function(y,g){var s=0,_=0,p=0,e=0,o;for(o=0;o<y.length&&!(y[o][0]!==v&&(s+=y[o][1].length),y[o][0]!==I&&(_+=y[o][1].length),s>g);o++)p=s,e=_;return y.length!=o&&y[o][0]===I?e:e+(g-p)},b.prototype.diff_prettyHtml=function(y){for(var g=[],s=/&/g,_=/</g,p=/>/g,e=/\n/g,o=0;o<y.length;o++){var n=y[o][0],l=y[o][1],r=l.replace(s,"&").replace(_,"<").replace(p,">").replace(e,"¶<br>");switch(n){case v:g[o]='<ins style="background:#e6ffe6;">'+r+"</ins>";break;case I:g[o]='<del style="background:#ffe6e6;">'+r+"</del>";break;case T:g[o]="<span>"+r+"</span>";break}}return g.join("")},b.prototype.diff_text1=function(y){for(var g=[],s=0;s<y.length;s++)y[s][0]!==v&&(g[s]=y[s][1]);return g.join("")},b.prototype.diff_text2=function(y){for(var g=[],s=0;s<y.length;s++)y[s][0]!==I&&(g[s]=y[s][1]);return g.join("")},b.prototype.diff_levenshtein=function(y){for(var g=0,s=0,_=0,p=0;p<y.length;p++){var e=y[p][0],o=y[p][1];switch(e){case v:s+=o.length;break;case I:_+=o.length;break;case T:g+=Math.max(s,_),s=0,_=0;break}}return g+=Math.max(s,_),g},b.prototype.diff_toDelta=function(y){for(var g=[],s=0;s<y.length;s++)switch(y[s][0]){case v:g[s]="+"+encodeURI(y[s][1]);break;case I:g[s]="-"+y[s][1].length;break;case T:g[s]="="+y[s][1].length;break}return g.join(" ").replace(/%20/g," ")},b.prototype.diff_fromDelta=function(y,g){for(var s=[],_=0,p=0,e=g.split(/\t/g),o=0;o<e.length;o++){var n=e[o].substring(1);switch(e[o].charAt(0)){case"+":try{s[_++]=new b.Diff(v,decodeURI(n))}catch(i){throw new Error("Illegal escape in diff_fromDelta: "+n)}break;case"-":case"=":var l=parseInt(n,10);if(isNaN(l)||l<0)throw new Error("Invalid number in diff_fromDelta: "+n);var r=y.substring(p,p+=l);e[o].charAt(0)=="="?s[_++]=new b.Diff(T,r):s[_++]=new b.Diff(I,r);break;default:if(e[o])throw new Error("Invalid diff operation in diff_fromDelta: "+e[o])}}if(p!=y.length)throw new Error("Delta length ("+p+") does not equal source text length ("+y.length+").");return s},b.prototype.match_main=function(y,g,s){if(y==null||g==null||s==null)throw new Error("Null input. (match_main)");return s=Math.max(0,Math.min(s,y.length)),y==g?0:y.length?y.substring(s,s+g.length)==g?s:this.match_bitap_(y,g,s):-1},b.prototype.match_bitap_=function(y,g,s){if(g.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var _=this.match_alphabet_(g),p=this;function e(O,C){var w=O/g.length,S=Math.abs(s-C);return p.Match_Distance?w+S/p.Match_Distance:S?1:w}var o=this.Match_Threshold,n=y.indexOf(g,s);n!=-1&&(o=Math.min(e(0,n),o),n=y.lastIndexOf(g,s+g.length),n!=-1&&(o=Math.min(e(0,n),o)));var l=1<<g.length-1;n=-1;for(var r,i,t=g.length+y.length,a,c=0;c<g.length;c++){for(r=0,i=t;r<i;)e(c,s+i)<=o?r=i:t=i,i=Math.floor((t-r)/2+r);t=i;var d=Math.max(1,s-i+1),f=Math.min(s+i,y.length)+g.length,h=Array(f+2);h[f+1]=(1<<c)-1;for(var u=f;u>=d;u--){var E=_[y.charAt(u-1)];if(c===0?h[u]=(h[u+1]<<1|1)&E:h[u]=(h[u+1]<<1|1)&E|((a[u+1]|a[u])<<1|1)|a[u+1],h[u]&l){var x=e(c,u-1);if(x<=o)if(o=x,n=u-1,n>s)d=Math.max(1,2*s-n);else break}}if(e(c+1,s)>o)break;a=h}return n},b.prototype.match_alphabet_=function(y){for(var g={},s=0;s<y.length;s++)g[y.charAt(s)]=0;for(var s=0;s<y.length;s++)g[y.charAt(s)]|=1<<y.length-s-1;return g},b.prototype.patch_addContext_=function(y,g){if(g.length==0)return;if(y.start2===null)throw Error("patch not initialized");for(var s=g.substring(y.start2,y.start2+y.length1),_=0;g.indexOf(s)!=g.lastIndexOf(s)&&s.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)_+=this.Patch_Margin,s=g.substring(y.start2-_,y.start2+y.length1+_);_+=this.Patch_Margin;var p=g.substring(y.start2-_,y.start2);p&&y.diffs.unshift(new b.Diff(T,p));var e=g.substring(y.start2+y.length1,y.start2+y.length1+_);e&&y.diffs.push(new b.Diff(T,e)),y.start1-=p.length,y.start2-=p.length,y.length1+=p.length+e.length,y.length2+=p.length+e.length},b.prototype.patch_make=function(y,g,s){var _,p;if(typeof y=="string"&&typeof g=="string"&&typeof s=="undefined")_=y,p=this.diff_main(_,g,!0),p.length>2&&(this.diff_cleanupSemantic(p),this.diff_cleanupEfficiency(p));else if(y&&typeof y=="object"&&typeof g=="undefined"&&typeof s=="undefined")p=y,_=this.diff_text1(p);else if(typeof y=="string"&&g&&typeof g=="object"&&typeof s=="undefined")_=y,p=g;else if(typeof y=="string"&&typeof g=="string"&&s&&typeof s=="object")_=y,p=s;else throw new Error("Unknown call format to patch_make.");if(p.length===0)return[];for(var e=[],o=new b.patch_obj,n=0,l=0,r=0,i=_,t=_,a=0;a<p.length;a++){var c=p[a][0],d=p[a][1];!n&&c!==T&&(o.start1=l,o.start2=r);switch(c){case v:o.diffs[n++]=p[a],o.length2+=d.length,t=t.substring(0,r)+d+t.substring(r);break;case I:o.length1+=d.length,o.diffs[n++]=p[a],t=t.substring(0,r)+t.substring(r+d.length);break;case T:d.length<=2*this.Patch_Margin&&n&&p.length!=a+1?(o.diffs[n++]=p[a],o.length1+=d.length,o.length2+=d.length):d.length>=2*this.Patch_Margin&&(n&&(this.patch_addContext_(o,i),e.push(o),o=new b.patch_obj,n=0,i=t,l=r));break}c!==v&&(l+=d.length),c!==I&&(r+=d.length)}return n&&(this.patch_addContext_(o,i),e.push(o)),e},b.prototype.patch_deepCopy=function(y){for(var g=[],s=0;s<y.length;s++){var _=y[s],p=new b.patch_obj;p.diffs=[];for(var e=0;e<_.diffs.length;e++)p.diffs[e]=new b.Diff(_.diffs[e][0],_.diffs[e][1]);p.start1=_.start1,p.start2=_.start2,p.length1=_.length1,p.length2=_.length2,g[s]=p}return g},b.prototype.patch_apply=function(y,g){if(y.length==0)return[g,[]];y=this.patch_deepCopy(y);var s=this.patch_addPadding(y);g=s+g+s,this.patch_splitMax(y);for(var _=0,p=[],e=0;e<y.length;e++){var o=y[e].start2+_,n=this.diff_text1(y[e].diffs),l,r=-1;if(n.length>this.Match_MaxBits?(l=this.match_main(g,n.substring(0,this.Match_MaxBits),o),l!=-1&&(r=this.match_main(g,n.substring(n.length-this.Match_MaxBits),o+n.length-this.Match_MaxBits),(r==-1||l>=r)&&(l=-1))):l=this.match_main(g,n,o),l==-1)p[e]=!1,_-=y[e].length2-y[e].length1;else{p[e]=!0,_=l-o;var i;if(r==-1?i=g.substring(l,l+n.length):i=g.substring(l,r+this.Match_MaxBits),n==i)g=g.substring(0,l)+this.diff_text2(y[e].diffs)+g.substring(l+n.length);else{var t=this.diff_main(n,i,!1);if(n.length>this.Match_MaxBits&&this.diff_levenshtein(t)/n.length>this.Patch_DeleteThreshold)p[e]=!1;else{this.diff_cleanupSemanticLossless(t);for(var a=0,c,d=0;d<y[e].diffs.length;d++){var f=y[e].diffs[d];f[0]!==T&&(c=this.diff_xIndex(t,a)),f[0]===v?g=g.substring(0,l+c)+f[1]+g.substring(l+c):f[0]===I&&(g=g.substring(0,l+c)+g.substring(l+this.diff_xIndex(t,a+f[1].length))),f[0]!==I&&(a+=f[1].length)}}}}}return g=g.substring(s.length,g.length-s.length),[g,p]},b.prototype.patch_addPadding=function(y){for(var g=this.Patch_Margin,s="",_=1;_<=g;_++)s+=String.fromCharCode(_);for(var _=0;_<y.length;_++)y[_].start1+=g,y[_].start2+=g;var p=y[0],e=p.diffs;if(e.length==0||e[0][0]!=T)e.unshift(new b.Diff(T,s)),p.start1-=g,p.start2-=g,p.length1+=g,p.length2+=g;else if(g>e[0][1].length){var o=g-e[0][1].length;e[0][1]=s.substring(e[0][1].length)+e[0][1],p.start1-=o,p.start2-=o,p.length1+=o,p.length2+=o}if(p=y[y.length-1],e=p.diffs,e.length==0||e[e.length-1][0]!=T)e.push(new b.Diff(T,s)),p.length1+=g,p.length2+=g;else if(g>e[e.length-1][1].length){var o=g-e[e.length-1][1].length;e[e.length-1][1]+=s.substring(0,o),p.length1+=o,p.length2+=o}return s},b.prototype.patch_splitMax=function(y){for(var g=this.Match_MaxBits,s=0;s<y.length;s++){if(y[s].length1<=g)continue;var _=y[s];y.splice(s--,1);for(var p=_.start1,e=_.start2,o="";_.diffs.length!==0;){var n=new b.patch_obj,l=!0;for(n.start1=p-o.length,n.start2=e-o.length,o!==""&&(n.length1=n.length2=o.length,n.diffs.push(new b.Diff(T,o)));_.diffs.length!==0&&n.length1<g-this.Patch_Margin;){var r=_.diffs[0][0],i=_.diffs[0][1];r===v?(n.length2+=i.length,e+=i.length,n.diffs.push(_.diffs.shift()),l=!1):r===I&&n.diffs.length==1&&n.diffs[0][0]==T&&i.length>2*g?(n.length1+=i.length,p+=i.length,l=!1,n.diffs.push(new b.Diff(r,i)),_.diffs.shift()):(i=i.substring(0,g-n.length1-this.Patch_Margin),n.length1+=i.length,p+=i.length,r===T?(n.length2+=i.length,e+=i.length):l=!1,n.diffs.push(new b.Diff(r,i)),i==_.diffs[0][1]?_.diffs.shift():_.diffs[0][1]=_.diffs[0][1].substring(i.length))}o=this.diff_text2(n.diffs),o=o.substring(o.length-this.Patch_Margin);var t=this.diff_text1(_.diffs).substring(0,this.Patch_Margin);t!==""&&(n.length1+=t.length,n.length2+=t.length,n.diffs.length!==0&&n.diffs[n.diffs.length-1][0]===T?n.diffs[n.diffs.length-1][1]+=t:n.diffs.push(new b.Diff(T,t))),l||y.splice(++s,0,n)}}},b.prototype.patch_toText=function(y){for(var g=[],s=0;s<y.length;s++)g[s]=y[s];return g.join("")},b.prototype.patch_fromText=function(y){var g=[];if(!y)return g;for(var s=y.split(`
|
|
|
`),_=0,p=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;_<s.length;){var e=s[_].match(p);if(!e)throw new Error("Invalid patch string: "+s[_]);var o=new b.patch_obj;for(g.push(o),o.start1=parseInt(e[1],10),e[2]===""?(o.start1--,o.length1=1):e[2]=="0"?o.length1=0:(o.start1--,o.length1=parseInt(e[2],10)),o.start2=parseInt(e[3],10),e[4]===""?(o.start2--,o.length2=1):e[4]=="0"?o.length2=0:(o.start2--,o.length2=parseInt(e[4],10)),_++;_<s.length;){var n=s[_].charAt(0);try{var l=decodeURI(s[_].substring(1))}catch(r){throw new Error("Illegal escape in patch_fromText: "+l)}if(n=="-")o.diffs.push(new b.Diff(I,l));else if(n=="+")o.diffs.push(new b.Diff(v,l));else if(n==" ")o.diffs.push(new b.Diff(T,l));else{if(n=="@")break;if(!(n===""))throw new Error('Invalid patch mode "'+n+'" in: '+l)}_++}}return g},b.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},b.patch_obj.prototype.toString=function(){var y,g;this.length1===0?y=this.start1+",0":this.length1==1?y=this.start1+1:y=this.start1+1+","+this.length1,this.length2===0?g=this.start2+",0":this.length2==1?g=this.start2+1:g=this.start2+1+","+this.length2;for(var s=["@@ -"+y+" +"+g+` @@
|
|
|
`],_,p=0;p<this.diffs.length;p++){switch(this.diffs[p][0]){case v:_="+";break;case I:_="-";break;case T:_=" ";break}s[p+1]=_+encodeURI(this.diffs[p][1])+`
|
|
|
`}return s.join("").replace(/%20/g," ")},j.exports=b,j.exports.diff_match_patch=b,j.exports.DIFF_DELETE=I,j.exports.DIFF_INSERT=v,j.exports.DIFF_EQUAL=T},ZD9Y:function(j,H,b){"use strict";var I=b("BoS7"),v=b("Sdc0"),T=b("OaEy"),y=b("2fM7"),g=b("q1tI"),s=b.n(g),_=b("lOMy"),p=b.n(_),e=y.a.Option;H.a=function(o){var n=o.onFontSizeChange,l=o.cmFontSize,r=o.cmCodeMode,i=o.onCodeModeChange,t=o.onTabToSpace,a=o.className,c=a===void 0?"":a,d=o.tabToSpace,f=o.children;return s.a.createElement("div",{className:"tpi-code-setting ".concat(c)},s.a.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),s.a.createElement("section",null,s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),s.a.createElement(y.a,{bordered:!1,size:"small",value:r,onChange:i},s.a.createElement(e,{value:"vs"},"\u767D\u8272\u80CC\u666F"),s.a.createElement(e,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),s.a.createElement(y.a,{bordered:!1,size:"small",value:l,onChange:n},s.a.createElement(e,{value:12},"12px"),s.a.createElement(e,{value:14},"14px"),s.a.createElement(e,{value:16},"16px"),s.a.createElement(e,{value:18},"18px"),s.a.createElement(e,{value:20},"20px"),s.a.createElement(e,{value:22},"22px"))),s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"Tab\u8F6C\u6362"),s.a.createElement(v.a,{checked:d,onChange:t}))),s.a.createElement("h3",null,"\u5FEB\u6377\u952E"),s.a.createElement("section",null,s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),s.a.createElement("span",null,"Ctrl + S")),s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),s.a.createElement("span",null,"F1 / Alt + F1")),s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),s.a.createElement("span",null,"Ctrl + ]/[")),s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),s.a.createElement("span",null,"Ctrl + Shift + \\")),s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),s.a.createElement("span",null,"Home")),s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),s.a.createElement("span",null,"End"))),f)}},ZW9T:function(j,H,b){"use strict";b.d(H,"a",function(){return U});var I=b("k1fw"),v=b("oBTY"),T=b("miYZ"),y=b("tsqr"),g=b("rAM+"),s=b("tJVT"),_=b("PpiC"),p=b("q1tI"),e=b.n(p),o=b("bdgK"),n=b("9og8"),l=b("WmNS"),r=b.n(l),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"]},t={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"]},a={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
|
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
|
`)},{label:"if",content:["if () {"," $0","}"].join(`
|
|
|
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
|
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
|
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
|
|
|
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
|
|
|
`)},{label:"include <vector>",content:["#include <vector>"].join(`
|
|
|
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
|
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
|
`)},{label:"include <map>",content:["#include <map>"].join(`
|
|
|
`)},{label:"include <string>",content:["#include <string>"].join(`
|
|
|
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
|
|
|
`)}]},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(`
|
|
|
`)}]},d=b("5VLF"),f=b.n(d),h={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"]}},u=function(B,Z){return Z.map(function(re){return{label:re,kind:B.languages.CompletionItemKind.Keyword,insertText:re}})},E=function(B){return Object.keys(h.tables).map(function(Z){return{label:Z,kind:B.languages.CompletionItemKind.Variable,insertText:Z}})},x=function(B,Z){var re=h.tables[B];return re?re.map(function(he){return{label:he,kind:Z.languages.CompletionItemKind.Field,insertText:he}}):[]};function O(L,B,Z,re,he){var Ce=B.getWordUntilPosition(Z),ke={startLineNumber:Z.lineNumber,endLineNumber:Z.lineNumber,startColumn:Ce.startColumn,endColumn:Ce.endColumn},te=re.map(function(Re){return{label:Re,kind:L.languages.CompletionItemKind.Keyword,insertText:Re,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ke}});return he.map(function(Re){te.push(Object(I.a)(Object(I.a)({},Re),{},{range:ke}))}),te}var C=function(L){h.languages.map(function(he){return L.languages.registerDocumentFormattingEditProvider(he,{provideDocumentFormattingEdits:function(ke,te,Re){return Object(n.a)(r.a.mark(function Te(){var pe;return r.a.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:return pe=f()(ke.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}),se.abrupt("return",[{range:ke.getFullModelRange(),text:pe}]);case 2:case"end":return se.stop()}},Te)}))()}}),he});var B=a.quickKey.map(function(he){return{label:he.label,kind:L.languages.CompletionItemKind.Method,insertText:he.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),Z=c.quickKey.map(function(he){return{label:he.label,kind:L.languages.CompletionItemKind.Method,insertText:he.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),re=t.quickKey.map(function(he){return{label:he.label,kind:L.languages.CompletionItemKind.Method,insertText:he.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet}});L.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Ce,ke){var te=Ce.getWordUntilPosition(ke),Re={startLineNumber:ke.lineNumber,endLineNumber:ke.lineNumber,startColumn:te.startColumn,endColumn:te.endColumn},Te=Ce.getLineContent(ke.lineNumber).substring(te.startColumn-2,te.endColumn);return{suggestions:[].concat(Object(v.a)(a.keywords.map(function(pe){return{label:pe,kind:L.languages.CompletionItemKind.Function,documentation:pe,insertText:pe,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})),Object(v.a)(a.quickKey.map(function(pe){return{label:pe.label,kind:L.languages.CompletionItemKind.Function,documentation:pe.content,insertText:Te.startsWith("#")?pe.content.replace(/#/,""):pe.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})))}}}),L.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Ce,ke){var te=Ce.getWordUntilPosition(ke),Re={startLineNumber:ke.lineNumber,endLineNumber:ke.lineNumber,startColumn:te.startColumn,endColumn:te.endColumn};return{suggestions:Object(v.a)(i.keywords.map(function(Te){return{label:Te,kind:L.languages.CompletionItemKind.Function,documentation:Te,insertText:Te,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}}))}}}),L.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Ce,ke){var te=Ce.getWordUntilPosition(ke),Re={startLineNumber:ke.lineNumber,endLineNumber:ke.lineNumber,startColumn:te.startColumn,endColumn:te.endColumn},Te=Ce.getLineContent(ke.lineNumber).substring(te.startColumn-2,te.endColumn);return{suggestions:[].concat(Object(v.a)(t.keywords.map(function(pe){return{label:pe,kind:L.languages.CompletionItemKind.Function,documentation:pe,insertText:pe,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})),Object(v.a)(t.quickKey.map(function(pe){return{label:pe.label,kind:L.languages.CompletionItemKind.Function,documentation:pe.content,insertText:Te.startsWith("#")?pe.content.replace(/#/,""):pe.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})))}}}),L.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Ce,ke){var te=Ce.getWordUntilPosition(ke),Re={startLineNumber:ke.lineNumber,endLineNumber:ke.lineNumber,startColumn:te.startColumn,endColumn:te.endColumn},Te=Ce.getLineContent(ke.lineNumber).substring(te.startColumn-2,te.endColumn);return{suggestions:[].concat(Object(v.a)(c.keywords.map(function(pe){return{label:pe,kind:L.languages.CompletionItemKind.Function,documentation:pe,insertText:pe,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})),Object(v.a)(c.quickKey.map(function(pe){return{label:pe.label,kind:L.languages.CompletionItemKind.Function,documentation:pe.content,insertText:Te.startsWith("#")?pe.content.replace(/#/,""):pe.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})))}}})},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=b("fjLI"),A=b("LvDl"),D=b("+ua5");function M(L){return/^\d+$/.test(L)?"".concat(L,"px"):L}function N(){}var P=!1,z={"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 X(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],B=L;if(Array.isArray(L)){for(var Z=0;Z<L.length;Z++){var re=z[L[Z]];if(re)return re}return B[0]}return z[B]||B}var k=null,F=H.b=function(L){var B=L.width,Z=B===void 0?"100%":B,re=L.height,he=re===void 0?"100%":re,Ce=L.value,ke=L.language,te=ke===void 0?"javascript":ke,Re=L.style,Te=Re===void 0?{}:Re,pe=L.options,me=pe===void 0?{}:pe,se=L.overrideServices,be=se===void 0?{}:se,ae=L.theme,fe=ae===void 0?"vs-dark":ae,Fe=L.onEditBlur,ie=L.onSave,q=L.autoHeight,Q=q===void 0?!1:q,Y=L.forbidCopy,oe=Y===void 0?!1:Y,le=L.onChange,Ee=le===void 0?N:le,Le=L.editorDidMount,ge=Le===void 0?N:Le,De=L.onFocus,_e=De===void 0?N:De,Xe=L.filename,tt=Xe===void 0?"educoder.txt":Xe,ze=L.errorLine,Me=L.errorContent,Et=Me===void 0?"":Me,Oe=Object(_.a)(L,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),Ve=Object(p.useRef)(),Je=Object(p.useRef)({}),Ye=Object(p.useRef)(),Pe=Object(p.useRef)(),He=Object(p.useRef)(!1),ve=Object(p.useRef)(),xe=Object(p.useState)(!1),de=Object(s.a)(xe,2),je=de[0],Qe=de[1];function ne(){var Ut;return Ve.current&&(Ut=new o.default(function(Nt){var Wt=Object(g.a)(Nt),Qt;try{for(Wt.s();!(Qt=Wt.n()).done;){var pn=Qt.value;(pn.target.offsetHeight>0||pn.target.offsetWidth>0)&&Je.current.instance.layout()}}catch(qt){Wt.e(qt)}finally{Wt.f()}}),Ut.observe(Ve.current)),Ut}function Ze(){y.b.warn(decodeURIComponent(w))}var lt=function(){var Nt=Je.current.instance;if(Ce!=null&&Nt&&je){var Wt=Nt.getModel();Wt&&Ce!==Wt.getValue()&&(P=!0,Wt.setValue(Ce),Nt.layout(),P=!1)}};Object(p.useEffect)(function(){Pe.current&&clearTimeout(Pe.current),Pe.current=setTimeout(function(){lt()},500)},[Ce,je,Je.current]),Object(p.useEffect)(function(){if(ze&&Je.current&&Je.current.instance){var Ut=Je.current.instance;Ut.changeViewZones(function(Wt){var Qt=document.createElement("div");Qt.style.padding="10px 20px",Qt.style.width="calc(100% - 20px)",Qt.className="my-error-line-wrp",Qt.innerHTML=Et,Wt.addZone({afterLineNumber:ze||11,heightInLines:3,domNode:Qt})});var Nt={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}};Ut.addOverlayWidget(Nt),Ut.revealPositionInCenter({lineNumber:20,column:1})}},[ze,Je.current,je]);function Be(){var Ut=Je.current.instance;if(Ut){var Nt=Ut.getSelection(),Wt=Je.current.pastePos||{},Qt=new k.Range(Wt.startLineNumber||Nt.endLineNumber,Wt.startColumn||Nt.endColumn,Wt.endLineNumber||Nt.endLineNumber,Wt.endColumn||Nt.endColumn);setTimeout(function(){Ut.executeEdits("",[{range:Qt,text:""}])},300)}}function $e(Ut){(window.navigator.platform.match("Mac")?Ut.metaKey:Ut.ctrlKey)&&Ut.keyCode==83&&(Ut.preventDefault(),ie())}var rt=function(){if(Q&&Je.current.instance){var Nt=Je.current.instance.getContentHeight();gt(Nt<he?he:Nt)}else gt(he)};function xt(Ut){var Nt=document.createEvent("MouseEvents");Nt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Ut.dispatchEvent(Nt)}function ft(Ut,Nt){var Wt=window.URL||window.webkitURL||window,Qt=new Blob([Nt]),pn=document.createElementNS("http://www.w3.org/1999/xhtml","a");pn.href=Wt.createObjectURL(Qt),pn.download=Ut,xt(pn)}Object(p.useEffect)(function(){rt()},[rt]),Object(p.useEffect)(function(){Ve.current&&!je&&Promise.all([b.e(16),b.e(28)]).then(b.t.bind(null,"M/lh",7)).then(function(Ut){try{k=Ut,Je.current.instance=k.editor.create(Ve.current,{value:Ce,language:X(te),theme:fe,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},be);var Nt=Je.current.instance,Wt=S.d._menuItems,Qt=Object(v.a)(Wt).find(function($t){return $t[0]._debugName=="EditorContext"}),pn=Qt[1],qt=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],en=function(cn,mn){var yn=cn._first;do{var Vn,$n,zt=mn.includes((Vn=yn.element)===null||Vn===void 0||(($n=Vn.command)===null||$n===void 0)?void 0:$n.id);zt&&cn._remove(yn)}while(yn=yn.next)};if(ge(Nt,k),setTimeout(function(){rt(),Je.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){ft(tt||"educoder.txt",Nt.getValue())}}),Nt.getDomNode().addEventListener("input",function(){Ye.current.autoFormat&&Nt.getAction("editor.action.formatDocument").run()})},500),Je.current.subscription=Nt.onDidChangeModelContent(function($t){He.current?clearTimeout(ve.current):(rt(),Ee(Nt.getValue(),$t)),ve.current=setTimeout(function(){He.current=!1},500)}),window.Monaco||C(k,X(te)),oe&&(en(pn,qt),Ve.current.classList.add("noCopyPaste"),Nt.onKeyDown(function($t){var cn=$t.keyCode,mn=$t.ctrlKey,yn=$t.metaKey;(cn===33||cn===52)&&(yn||mn)&&(Ze(),$t.preventDefault())})),window.Monaco=k,Fe&&Nt.onDidBlurEditorWidget(function(){Fe(Nt.getValue())}),_e&&Nt.onDidFocusEditorText(function(){_e(Nt.getValue())}),oe){Nt.addCommand(k.KeyMod.CtrlCmd|k.KeyCode.KEY_V,function(){return Ze(),null}),Nt.onDidPaste(function($t){Je.current.pastePos=$t});try{window.addEventListener("paste",Be)}catch($t){}}var qn=ne();return Qe(!0),function(){var $t=Je.current.instance;$t.dispose();var cn=$t.getModel();cn&&cn.dispose(),Je.current.subscription&&Je.current.subscription.dispose(),oe&&window.removeEventListener("paste",Be),qn.unobserve(Ve.current)}}catch($t){}})},[]),Object(p.useEffect)(function(){var Ut=Je.current.instance;if(Ut&&je)return document.addEventListener("keydown",$e,!1),function(){document.removeEventListener("keydown",$e)}},[ie,je]),Object(p.useEffect)(function(){var Ut=Je.current.instance;if(Ut&&je){var Nt=X(te);k.editor.setModelLanguage(Ut.getModel(),Nt),console.log("language:",te,Ut.getModel(),Nt)}},[te,je]),Object(p.useEffect)(function(){var Ut=Je.current.instance;Ut&&je&&k.editor.setTheme(fe)},[fe,je]),Object(p.useEffect)(function(){var Ut=Je.current.instance;Ye.current=me,Ut&&je&&(Ut.updateOptions(Object(I.a)({},me)),setTimeout(function(){Ut.getModel().updateOptions(Object(I.a)({},me))},200))},[JSON.stringify(me),je]),Object(p.useEffect)(function(){var Ut=Je.current.instance;Ut&&je&&Ut.layout()},[Z,he,je]);var st=Object(p.useState)(M(Z)),Ne=Object(s.a)(st,2),Ge=Ne[0],yt=Ne[1],pt=Object(p.useState)(M(he)),jt=Object(s.a)(pt,2),Bt=jt[0],gt=jt[1],Ht=Object(I.a)(Object(I.a)({},Te),{},{width:Ge,height:Bt});return e.a.createElement("div",{className:"my-monaco-editor",ref:Ve,style:Ht})};function U(L){var B=L.width,Z=B===void 0?"100%":B,re=L.height,he=re===void 0?"100%":re,Ce=L.original,ke=L.modified,te=L.language,Re=L.options,Te=Re===void 0?{}:Re,pe=Object(p.useRef)(),me=Object(p.useState)(null),se=Object(s.a)(me,2),be=se[0],ae=se[1];function fe(Q){var Y;return pe.current&&(Y=new o.default(function(oe){var le=Object(g.a)(oe),Ee;try{for(le.s();!(Ee=le.n()).done;){var Le=Ee.value;(Le.target.offsetHeight>0||Le.target.offsetWidth>0)&&Q.layout()}}catch(ge){le.e(ge)}finally{le.f()}}),Y.observe(pe.current)),Y}Object(p.useEffect)(function(){pe.current&&Promise.all([b.e(16),b.e(28)]).then(b.t.bind(null,"M/lh",7)).then(function(Q){k=Q;var Y=k.editor.createDiffEditor(pe.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},Te),{},{wordWrap:!0}));ae(Y);var oe=fe(Y);return function(){Y.dispose();var le=Y.getModel();le&&le.dispose(),oe.unobserve(pe.current)}})},[]),Object(p.useEffect)(function(){be&&be.setModel({original:k.editor.createModel(Ce,te),modified:k.editor.createModel(ke,te)})},[Ce,ke,te,be]);var Fe=M(Z),ie=M(he),q={width:Fe,height:ie};return e.a.createElement("div",{className:"my-diff-editor",ref:pe,style:q})}},ZpRC:function(j,H,b){"use strict";function I(n){return typeof n=="object"&&n!=null&&n.nodeType===1}function v(n,l){return(!l||n!=="hidden")&&n!=="visible"&&n!=="clip"}function T(n,l){if(n.clientHeight<n.scrollHeight||n.clientWidth<n.scrollWidth){var r=getComputedStyle(n,null);return v(r.overflowY,l)||v(r.overflowX,l)||function(i){var t=function(a){if(!a.ownerDocument||!a.ownerDocument.defaultView)return null;try{return a.ownerDocument.defaultView.frameElement}catch(c){return null}}(i);return!!t&&(t.clientHeight<i.scrollHeight||t.clientWidth<i.scrollWidth)}(n)}return!1}function y(n,l,r,i,t,a,c,d){return a<n&&c>l||a>n&&c<l?0:a<=n&&d<=r||c>=l&&d>=r?a-n-i:c>l&&d<r||a<n&&d>r?c-l+t:0}var g=function(n,l){var r=window,i=l.scrollMode,t=l.block,a=l.inline,c=l.boundary,d=l.skipOverflowHiddenElements,f=typeof c=="function"?c:function(Q){return Q!==c};if(!I(n))throw new TypeError("Invalid target");for(var h=document.scrollingElement||document.documentElement,u=[],E=n;I(E)&&f(E);){if((E=E.parentElement)===h){u.push(E);break}E!=null&&E===document.body&&T(E)&&!T(document.documentElement)||E!=null&&T(E,d)&&u.push(E)}for(var x=r.visualViewport?r.visualViewport.width:innerWidth,O=r.visualViewport?r.visualViewport.height:innerHeight,C=window.scrollX||pageXOffset,w=window.scrollY||pageYOffset,S=n.getBoundingClientRect(),A=S.height,D=S.width,M=S.top,N=S.right,P=S.bottom,z=S.left,X=t==="start"||t==="nearest"?M:t==="end"?P:M+A/2,k=a==="center"?z+D/2:a==="end"?N:z,F=[],U=0;U<u.length;U++){var L=u[U],B=L.getBoundingClientRect(),Z=B.height,re=B.width,he=B.top,Ce=B.right,ke=B.bottom,te=B.left;if(i==="if-needed"&&M>=0&&z>=0&&P<=O&&N<=x&&M>=he&&P<=ke&&z>=te&&N<=Ce)return F;var Re=getComputedStyle(L),Te=parseInt(Re.borderLeftWidth,10),pe=parseInt(Re.borderTopWidth,10),me=parseInt(Re.borderRightWidth,10),se=parseInt(Re.borderBottomWidth,10),be=0,ae=0,fe="offsetWidth"in L?L.offsetWidth-L.clientWidth-Te-me:0,Fe="offsetHeight"in L?L.offsetHeight-L.clientHeight-pe-se:0;if(h===L)be=t==="start"?X:t==="end"?X-O:t==="nearest"?y(w,w+O,O,pe,se,w+X,w+X+A,A):X-O/2,ae=a==="start"?k:a==="center"?k-x/2:a==="end"?k-x:y(C,C+x,x,Te,me,C+k,C+k+D,D),be=Math.max(0,be+w),ae=Math.max(0,ae+C);else{be=t==="start"?X-he-pe:t==="end"?X-ke+se+Fe:t==="nearest"?y(he,ke,Z,pe,se+Fe,X,X+A,A):X-(he+Z/2)+Fe/2,ae=a==="start"?k-te-Te:a==="center"?k-(te+re/2)+fe/2:a==="end"?k-Ce+me+fe:y(te,Ce,re,Te,me+fe,k,k+D,D);var ie=L.scrollLeft,q=L.scrollTop;X+=q-(be=Math.max(0,Math.min(q+be,L.scrollHeight-Z+Fe))),k+=ie-(ae=Math.max(0,Math.min(ie+ae,L.scrollWidth-re+fe)))}F.push({el:L,top:be,left:ae})}return F};function s(n){return n===Object(n)&&Object.keys(n).length!==0}function _(n,l){l===void 0&&(l="auto");var r="scrollBehavior"in document.body.style;n.forEach(function(i){var t=i.el,a=i.top,c=i.left;t.scroll&&r?t.scroll({top:a,left:c,behavior:l}):(t.scrollTop=a,t.scrollLeft=c)})}function p(n){return n===!1?{block:"end",inline:"nearest"}:s(n)?n:{block:"start",inline:"nearest"}}function e(n,l){var r=!n.ownerDocument.documentElement.contains(n);if(s(l)&&typeof l.behavior=="function")return l.behavior(r?[]:g(n,l));if(r)return;var i=p(l);return _(g(n,i),i.behavior)}var o=H.a=e},Zss7:function(j,H,b){var I;(function(v){var T=/^\s+/,y=/\s+$/,g=0,s=v.round,_=v.min,p=v.max,e=v.random;function o(se,be){if(se=se||"",be=be||{},se instanceof o)return se;if(!(this instanceof o))return new o(se,be);var ae=n(se);this._originalInput=se,this._r=ae.r,this._g=ae.g,this._b=ae.b,this._a=ae.a,this._roundA=s(100*this._a)/100,this._format=be.format||ae.format,this._gradientType=be.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=ae.ok,this._tc_id=g++}o.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,ae,fe,Fe,ie,q;return be=se.r/255,ae=se.g/255,fe=se.b/255,be<=.03928?Fe=be/12.92:Fe=v.pow((be+.055)/1.055,2.4),ae<=.03928?ie=ae/12.92:ie=v.pow((ae+.055)/1.055,2.4),fe<=.03928?q=fe/12.92:q=v.pow((fe+.055)/1.055,2.4),.2126*Fe+.7152*ie+.0722*q},setAlpha:function(se){return this._a=F(se),this._roundA=s(100*this._a)/100,this},toHsv:function(){var se=t(this._r,this._g,this._b);return{h:se.h*360,s:se.s,v:se.v,a:this._a}},toHsvString:function(){var se=t(this._r,this._g,this._b),be=s(se.h*360),ae=s(se.s*100),fe=s(se.v*100);return this._a==1?"hsv("+be+", "+ae+"%, "+fe+"%)":"hsva("+be+", "+ae+"%, "+fe+"%, "+this._roundA+")"},toHsl:function(){var se=r(this._r,this._g,this._b);return{h:se.h*360,s:se.s,l:se.l,a:this._a}},toHslString:function(){var se=r(this._r,this._g,this._b),be=s(se.h*360),ae=s(se.s*100),fe=s(se.l*100);return this._a==1?"hsl("+be+", "+ae+"%, "+fe+"%)":"hsla("+be+", "+ae+"%, "+fe+"%, "+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 d(this._r,this._g,this._b,this._a,se)},toHex8String:function(se){return"#"+this.toHex8(se)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(U(this._r,255)*100)+"%",g:s(U(this._g,255)*100)+"%",b:s(U(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+s(U(this._r,255)*100)+"%, "+s(U(this._g,255)*100)+"%, "+s(U(this._b,255)*100)+"%)":"rgba("+s(U(this._r,255)*100)+"%, "+s(U(this._g,255)*100)+"%, "+s(U(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:X[c(this._r,this._g,this._b,!0)]||!1},toFilter:function(se){var be="#"+f(this._r,this._g,this._b,this._a),ae=be,fe=this._gradientType?"GradientType = 1, ":"";if(se){var Fe=o(se);ae="#"+f(Fe._r,Fe._g,Fe._b,Fe._a)}return"progid:DXImageTransform.Microsoft.gradient("+fe+"startColorstr="+be+",endColorstr="+ae+")"},toString:function(se){var be=!!se;se=se||this._format;var ae=!1,fe=this._a<1&&this._a>=0,Fe=!be&&fe&&(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"&&(ae=this.toRgbString()),se==="prgb"&&(ae=this.toPercentageRgbString()),(se==="hex"||se==="hex6")&&(ae=this.toHexString()),se==="hex3"&&(ae=this.toHexString(!0)),se==="hex4"&&(ae=this.toHex8String(!0)),se==="hex8"&&(ae=this.toHex8String()),se==="name"&&(ae=this.toName()),se==="hsl"&&(ae=this.toHslString()),se==="hsv"&&(ae=this.toHsvString()),ae||this.toHexString())},clone:function(){return o(this.toString())},_applyModification:function(se,be){var ae=se.apply(null,[this].concat([].slice.call(be)));return this._r=ae._r,this._g=ae._g,this._b=ae._b,this.setAlpha(ae._a),this},lighten:function(){return this._applyModification(x,arguments)},brighten:function(){return this._applyModification(O,arguments)},darken:function(){return this._applyModification(C,arguments)},desaturate:function(){return this._applyModification(h,arguments)},saturate:function(){return this._applyModification(u,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(N,arguments)},complement:function(){return this._applyCombination(S,arguments)},monochromatic:function(){return this._applyCombination(P,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(A,arguments)},tetrad:function(){return this._applyCombination(D,arguments)}},o.fromRatio=function(se,be){if(typeof se=="object"){var ae={};for(var fe in se)se.hasOwnProperty(fe)&&(fe==="a"?ae[fe]=se[fe]:ae[fe]=Ce(se[fe]));se=ae}return o(se,be)};function n(se){var be={r:0,g:0,b:0},ae=1,fe=null,Fe=null,ie=null,q=!1,Q=!1;return typeof se=="string"&&(se=pe(se)),typeof se=="object"&&(Te(se.r)&&Te(se.g)&&Te(se.b)?(be=l(se.r,se.g,se.b),q=!0,Q=String(se.r).substr(-1)==="%"?"prgb":"rgb"):Te(se.h)&&Te(se.s)&&Te(se.v)?(fe=Ce(se.s),Fe=Ce(se.v),be=a(se.h,fe,Fe),q=!0,Q="hsv"):Te(se.h)&&Te(se.s)&&Te(se.l)&&(fe=Ce(se.s),ie=Ce(se.l),be=i(se.h,fe,ie),q=!0,Q="hsl"),se.hasOwnProperty("a")&&(ae=se.a)),ae=F(ae),{ok:q,format:se.format||Q,r:_(255,p(be.r,0)),g:_(255,p(be.g,0)),b:_(255,p(be.b,0)),a:ae}}function l(se,be,ae){return{r:U(se,255)*255,g:U(be,255)*255,b:U(ae,255)*255}}function r(se,be,ae){se=U(se,255),be=U(be,255),ae=U(ae,255);var fe=p(se,be,ae),Fe=_(se,be,ae),ie,q,Q=(fe+Fe)/2;if(fe==Fe)ie=q=0;else{var Y=fe-Fe;q=Q>.5?Y/(2-fe-Fe):Y/(fe+Fe);switch(fe){case se:ie=(be-ae)/Y+(be<ae?6:0);break;case be:ie=(ae-se)/Y+2;break;case ae:ie=(se-be)/Y+4;break}ie/=6}return{h:ie,s:q,l:Q}}function i(se,be,ae){var fe,Fe,ie;se=U(se,360),be=U(be,100),ae=U(ae,100);function q(oe,le,Ee){return Ee<0&&(Ee+=1),Ee>1&&(Ee-=1),Ee<1/6?oe+(le-oe)*6*Ee:Ee<1/2?le:Ee<2/3?oe+(le-oe)*(2/3-Ee)*6:oe}if(be===0)fe=Fe=ie=ae;else{var Q=ae<.5?ae*(1+be):ae+be-ae*be,Y=2*ae-Q;fe=q(Y,Q,se+1/3),Fe=q(Y,Q,se),ie=q(Y,Q,se-1/3)}return{r:fe*255,g:Fe*255,b:ie*255}}function t(se,be,ae){se=U(se,255),be=U(be,255),ae=U(ae,255);var fe=p(se,be,ae),Fe=_(se,be,ae),ie,q,Q=fe,Y=fe-Fe;if(q=fe===0?0:Y/fe,fe==Fe)ie=0;else{switch(fe){case se:ie=(be-ae)/Y+(be<ae?6:0);break;case be:ie=(ae-se)/Y+2;break;case ae:ie=(se-be)/Y+4;break}ie/=6}return{h:ie,s:q,v:Q}}function a(se,be,ae){se=U(se,360)*6,be=U(be,100),ae=U(ae,100);var fe=v.floor(se),Fe=se-fe,ie=ae*(1-be),q=ae*(1-Fe*be),Q=ae*(1-(1-Fe)*be),Y=fe%6,oe=[ae,q,ie,ie,Q,ae][Y],le=[Q,ae,ae,q,ie,ie][Y],Ee=[ie,ie,Q,ae,ae,q][Y];return{r:oe*255,g:le*255,b:Ee*255}}function c(se,be,ae,fe){var Fe=[he(s(se).toString(16)),he(s(be).toString(16)),he(s(ae).toString(16))];return fe&&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 d(se,be,ae,fe,Fe){var ie=[he(s(se).toString(16)),he(s(be).toString(16)),he(s(ae).toString(16)),he(ke(fe))];return Fe&&ie[0].charAt(0)==ie[0].charAt(1)&&ie[1].charAt(0)==ie[1].charAt(1)&&ie[2].charAt(0)==ie[2].charAt(1)&&ie[3].charAt(0)==ie[3].charAt(1)?ie[0].charAt(0)+ie[1].charAt(0)+ie[2].charAt(0)+ie[3].charAt(0):ie.join("")}function f(se,be,ae,fe){var Fe=[he(ke(fe)),he(s(se).toString(16)),he(s(be).toString(16)),he(s(ae).toString(16))];return Fe.join("")}o.equals=function(se,be){return!se||!be?!1:o(se).toRgbString()==o(be).toRgbString()},o.random=function(){return o.fromRatio({r:e(),g:e(),b:e()})};function h(se,be){be=be===0?0:be||10;var ae=o(se).toHsl();return ae.s-=be/100,ae.s=L(ae.s),o(ae)}function u(se,be){be=be===0?0:be||10;var ae=o(se).toHsl();return ae.s+=be/100,ae.s=L(ae.s),o(ae)}function E(se){return o(se).desaturate(100)}function x(se,be){be=be===0?0:be||10;var ae=o(se).toHsl();return ae.l+=be/100,ae.l=L(ae.l),o(ae)}function O(se,be){be=be===0?0:be||10;var ae=o(se).toRgb();return ae.r=p(0,_(255,ae.r-s(255*-(be/100)))),ae.g=p(0,_(255,ae.g-s(255*-(be/100)))),ae.b=p(0,_(255,ae.b-s(255*-(be/100)))),o(ae)}function C(se,be){be=be===0?0:be||10;var ae=o(se).toHsl();return ae.l-=be/100,ae.l=L(ae.l),o(ae)}function w(se,be){var ae=o(se).toHsl(),fe=(ae.h+be)%360;return ae.h=fe<0?360+fe:fe,o(ae)}function S(se){var be=o(se).toHsl();return be.h=(be.h+180)%360,o(be)}function A(se){var be=o(se).toHsl(),ae=be.h;return[o(se),o({h:(ae+120)%360,s:be.s,l:be.l}),o({h:(ae+240)%360,s:be.s,l:be.l})]}function D(se){var be=o(se).toHsl(),ae=be.h;return[o(se),o({h:(ae+90)%360,s:be.s,l:be.l}),o({h:(ae+180)%360,s:be.s,l:be.l}),o({h:(ae+270)%360,s:be.s,l:be.l})]}function M(se){var be=o(se).toHsl(),ae=be.h;return[o(se),o({h:(ae+72)%360,s:be.s,l:be.l}),o({h:(ae+216)%360,s:be.s,l:be.l})]}function N(se,be,ae){be=be||6,ae=ae||30;var fe=o(se).toHsl(),Fe=360/ae,ie=[o(se)];for(fe.h=(fe.h-(Fe*be>>1)+720)%360;--be;)fe.h=(fe.h+Fe)%360,ie.push(o(fe));return ie}function P(se,be){be=be||6;for(var ae=o(se).toHsv(),fe=ae.h,Fe=ae.s,ie=ae.v,q=[],Q=1/be;be--;)q.push(o({h:fe,s:Fe,v:ie})),ie=(ie+Q)%1;return q}o.mix=function(se,be,ae){ae=ae===0?0:ae||50;var fe=o(se).toRgb(),Fe=o(be).toRgb(),ie=ae/100,q={r:(Fe.r-fe.r)*ie+fe.r,g:(Fe.g-fe.g)*ie+fe.g,b:(Fe.b-fe.b)*ie+fe.b,a:(Fe.a-fe.a)*ie+fe.a};return o(q)},o.readability=function(se,be){var ae=o(se),fe=o(be);return(v.max(ae.getLuminance(),fe.getLuminance())+.05)/(v.min(ae.getLuminance(),fe.getLuminance())+.05)},o.isReadable=function(se,be,ae){var fe=o.readability(se,be),Fe,ie;ie=!1,Fe=me(ae);switch(Fe.level+Fe.size){case"AAsmall":case"AAAlarge":ie=fe>=4.5;break;case"AAlarge":ie=fe>=3;break;case"AAAsmall":ie=fe>=7;break}return ie},o.mostReadable=function(se,be,ae){var fe=null,Fe=0,ie,q,Q,Y;ae=ae||{},q=ae.includeFallbackColors,Q=ae.level,Y=ae.size;for(var oe=0;oe<be.length;oe++)ie=o.readability(se,be[oe]),ie>Fe&&(Fe=ie,fe=o(be[oe]));return o.isReadable(se,fe,{level:Q,size:Y})||!q?fe:(ae.includeFallbackColors=!1,o.mostReadable(se,["#fff","#000"],ae))};var z=o.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"},X=o.hexNames=k(z);function k(se){var be={};for(var ae in se)se.hasOwnProperty(ae)&&(be[se[ae]]=ae);return be}function F(se){return se=parseFloat(se),(isNaN(se)||se<0||se>1)&&(se=1),se}function U(se,be){Z(se)&&(se="100%");var ae=re(se);return se=_(be,p(0,parseFloat(se))),ae&&(se=parseInt(se*be,10)/100),v.abs(se-be)<1e-6?1:se%be/parseFloat(be)}function L(se){return _(1,p(0,se))}function B(se){return parseInt(se,16)}function Z(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 Ce(se){return se<=1&&(se=se*100+"%"),se}function ke(se){return v.round(parseFloat(se)*255).toString(16)}function te(se){return B(se)/255}var Re=function(){var se="[-\\+]?\\d+%?",be="[-\\+]?\\d*\\.\\d+%?",ae="(?:"+be+")|(?:"+se+")",fe="[\\s|\\(]+("+ae+")[,|\\s]+("+ae+")[,|\\s]+("+ae+")\\s*\\)?",Fe="[\\s|\\(]+("+ae+")[,|\\s]+("+ae+")[,|\\s]+("+ae+")[,|\\s]+("+ae+")\\s*\\)?";return{CSS_UNIT:new RegExp(ae),rgb:new RegExp("rgb"+fe),rgba:new RegExp("rgba"+Fe),hsl:new RegExp("hsl"+fe),hsla:new RegExp("hsla"+Fe),hsv:new RegExp("hsv"+fe),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 Te(se){return!!Re.CSS_UNIT.exec(se)}function pe(se){se=se.replace(T,"").replace(y,"").toLowerCase();var be=!1;if(z[se])se=z[se],be=!0;else if(se=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ae;return(ae=Re.rgb.exec(se))?{r:ae[1],g:ae[2],b:ae[3]}:(ae=Re.rgba.exec(se))?{r:ae[1],g:ae[2],b:ae[3],a:ae[4]}:(ae=Re.hsl.exec(se))?{h:ae[1],s:ae[2],l:ae[3]}:(ae=Re.hsla.exec(se))?{h:ae[1],s:ae[2],l:ae[3],a:ae[4]}:(ae=Re.hsv.exec(se))?{h:ae[1],s:ae[2],v:ae[3]}:(ae=Re.hsva.exec(se))?{h:ae[1],s:ae[2],v:ae[3],a:ae[4]}:(ae=Re.hex8.exec(se))?{r:B(ae[1]),g:B(ae[2]),b:B(ae[3]),a:te(ae[4]),format:be?"name":"hex8"}:(ae=Re.hex6.exec(se))?{r:B(ae[1]),g:B(ae[2]),b:B(ae[3]),format:be?"name":"hex"}:(ae=Re.hex4.exec(se))?{r:B(ae[1]+""+ae[1]),g:B(ae[2]+""+ae[2]),b:B(ae[3]+""+ae[3]),a:te(ae[4]+""+ae[4]),format:be?"name":"hex8"}:(ae=Re.hex3.exec(se))?{r:B(ae[1]+""+ae[1]),g:B(ae[2]+""+ae[2]),b:B(ae[3]+""+ae[3]),format:be?"name":"hex"}:!1}function me(se){var be,ae;return se=se||{level:"AA",size:"small"},be=(se.level||"AA").toUpperCase(),ae=(se.size||"small").toLowerCase(),be!=="AA"&&be!=="AAA"&&(be="AA"),ae!=="small"&&ae!=="large"&&(ae="small"),{level:be,size:ae}}j.exports?j.exports=o:!(I=function(){return o}.call(H,b,H,j),I!==void 0&&(j.exports=I))})(Math)},aVK0:function(j,H,b){j.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(j,H,b){j.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(j,H,b){"use strict";b.d(H,"b",function(){return y}),b.d(H,"a",function(){return g});var I=b("je13"),v=b.n(I),T=!1;function y(s,_){var p=v.a.get("__ec");p||(p={}),p[s]=_,v.a.set("__ec",p)}function g(s,_){var p=v.a.get("__ec");return p?p[s]===void 0?_:p[s]:_}},bPs0:function(j,H,b){"use strict";b.d(H,"b",function(){return h});var I=b("k1fw"),v=b("9og8"),T=b("2qtc"),y=b("kLXV"),g=b("tJVT"),s=b("PpiC"),_=b("aHsQ"),p=b("sGsY"),e=b("WmNS"),o=b.n(e),n=b("q1tI"),l=b.n(n),r=b("bntm"),i=b("V0Rq"),t=b("wd/R"),a=b.n(t),c=b("Ty5D"),d=b("9kvl"),f=p.a.Countdown,h=["fullscreenchange","msfullscreenchange","webkitfullscreenchange","mozfullscreenchange"],u=function(x){var O=x.globalSetting,C=x.loading,w=x.user,S=x.exercise,A=x.socket,D=x.dispatch,M=Object(s.a)(x,["globalSetting","loading","user","exercise","socket","dispatch"]),N=Object(n.useState)({}),P=Object(g.a)(N,2),z=P[0],X=P[1],k=y.a.useModal(),F=Object(g.a)(k,2),U=F[0],L=F[1],B=Object(n.useRef)(),Z=Object(n.useRef)(null),re=Object(n.useRef)(null),he=Object(n.useState)(!0),Ce=Object(g.a)(he,2),ke=Ce[0],te=Ce[1],Re=Object(c.h)().query,Te=Object(c.i)();Object(n.useEffect)(function(){var Y,oe,le,Ee,Le;if(clearTimeout(Z.current),document.addEventListener(Object(r.c)(),Q,!1),window.addEventListener("blur",ie,!1),(Y=S.exerciseUserInfo)!==null&&Y!==void 0&&Y.screen_open&&Object(r.a)()&&(D({type:"globalSetting/headerFooterToggle",payload:!1}),te(!1)),(oe=S.exerciseUserInfo)!==null&&oe!==void 0&&oe.screen_at&&a()().diff(a()((le=S.exerciseUserInfo)===null||le===void 0?void 0:le.screen_at),"seconds")>0)pe();else if((Ee=S.exerciseUserInfo)!==null&&Ee!==void 0&&Ee.screen_open&&!Object(r.a)()){var ge=document.domain==="kepukehuan.educoder.net"?30:S.exerciseUserInfo.screen_sec+10+1;B.current=y.a.info({icon:null,content:l.a.createElement("div",{className:"tc font16"},"\u672C\u573A\u8003\u8BD5\u5DF2\u5F00\u542F\u9632\u5207\u5C4F\u9650\u5236\uFF0C",l.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",l.a.createElement("br",null),"\u8BF7\u52FF\u5207\u5C4F\u53CA\u5237\u65B0\u9875\u9762"),okText:l.a.createElement("span",null,"\u5F00\u59CB\u8003\u8BD5\uFF08",l.a.createElement("span",{style:{display:"inline-block"}},l.a.createElement(f,{onFinish:function(){var _e;pe(),(_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()+ge*1e3})),"S\uFF09"),onOk:function(){var _e;(_e=B.current)===null||_e===void 0||_e.destroy(),te(!1),Object(r.d)(document.body),document.getElementById("root").addEventListener("click",me,!1)}})}return(Le=S.exerciseUserInfo)!==null&&Le!==void 0&&Le.screen_open&&!Object(r.a)()||document.getElementById("root").addEventListener("click",me,!1),function(){document.getElementById("root").removeEventListener("click",me,!1),document.removeEventListener(Object(r.c)(),Q,!1),window.removeEventListener("blur",ie,!1),clearTimeout(Z.current)}},[]),Object(n.useEffect)(function(){setTimeout(function(){S.actionTabs.removeEventListenerExitScreen&&(clearTimeout(Z.current),document.getElementById("root").removeEventListener("click",me,!1),document.removeEventListener(Object(r.c)(),Q,!1))},500),se()},[S.actionTabs]),Object(n.useEffect)(function(){setTimeout(function(){S.exerciseUserInfo.used_screen_num>S.exerciseUserInfo.screen_num?fe():!ke},500)},[S.exerciseUserInfo]);var pe=function(){var Y=Object(v.a)(o.a.mark(function oe(){var le;return o.a.wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:return Le.next=2,q();case 2:le=Le.sent,setTimeout(function(){var ge,De;(ge=B.current)===null||ge===void 0||ge.destroy(),B.current=y.a.info({okText:l.a.createElement("span",null,"\u56DE\u5230\u8003\u8BD5"),content:l.a.createElement("div",null,"\u60A8\u5DF2\u5207\u5C4F",l.a.createElement("span",{className:"c-red"},le.used_screen_num),"\u6B21\uFF0C\u5207\u5C4F\u8D85\u8FC7",l.a.createElement("span",{className:"c-red"},(De=S.exerciseUserInfo)===null||De===void 0?void 0:De.screen_num),"\u6B21\u5C06\u5F3A\u5236\u4EA4\u5377"),onOk:function(){var _e=Object(v.a)(o.a.mark(function tt(){return o.a.wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:Object(r.d)(document.body);case 1:case"end":return Me.stop()}},tt)}));function Xe(){return _e.apply(this,arguments)}return Xe}()})},1e3);case 4:case"end":return Le.stop()}},oe)}));return function(){return Y.apply(this,arguments)}}(),me=function(oe){!Object(r.a)()&&oe.target.nodeName!=="A"&&oe.target.nodeName!=="BUTTON"&&oe.target.innerHTML!=="\u786E \u5B9A"&&(Object(r.d)(document.body),console.log("documentClick.full"))},se=function(){var Y=Object(v.a)(o.a.mark(function oe(){return o.a.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return Ee.abrupt("return",new Promise(function(){var Le=Object(v.a)(o.a.mark(function ge(De){var _e;return o.a.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return tt.next=2,D({type:"exercise/getExerciseUserInfo",payload:Object(I.a)({},Te)});case 2:return _e=tt.sent,De(_e==null?void 0:_e.data),tt.abrupt("return",_e==null?void 0:_e.data);case 5:case"end":return tt.stop()}},ge)}));return function(ge){return Le.apply(this,arguments)}}()));case 1:case"end":return Ee.stop()}},oe)}));return function(){return Y.apply(this,arguments)}}(),be=function(){var Y=Object(v.a)(o.a.mark(function oe(le){var Ee,Le,ge;return o.a.wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:(Ee=B.current)===null||Ee===void 0||((Le=Ee.destroyAll)===null||Le===void 0)||Le.call(Ee),B.current=y.a.info({maskClosable:!1,keyboard:!1,okText:l.a.createElement("span",null,"\u56DE\u5230\u8003\u8BD5\uFF08",l.a.createElement("span",{style:{display:"inline-block"}},l.a.createElement(f,{onFinish:q,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:l.a.createElement("div",null,"\u60A8\u5DF2\u5207\u5C4F",l.a.createElement("span",{className:"c-red"},le),"\u6B21\uFF0C\u5207\u5C4F\u8D85\u8FC7",l.a.createElement("span",{className:"c-red"},(ge=S.exerciseUserInfo)===null||ge===void 0?void 0:ge.screen_num),"\u6B21\u5C06\u5F3A\u5236\u4EA4\u5377,",l.a.createElement("span",{className:"c-red"},S.exerciseUserInfo.screen_sec),"\u79D2\u5185\u56DE\u5230",l.a.createElement("br",null),l.a.createElement("span",{style:{marginLeft:38}},"\u8003\u8BD5\u4E0D\u8BA1\u5207\u5C4F\u6B21\u6570\u3002")),onOk:function(){var Xe=Object(v.a)(o.a.mark(function ze(){return o.a.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:clearTimeout(re.current),Object(r.d)(document.body),B.current.destroy();case 3:case"end":return Et.stop()}},ze)}));function tt(){return Xe.apply(this,arguments)}return tt}()}),re.current=setTimeout(function(){var Xe;B.current.update({okText:l.a.createElement("span",null,"\u56DE\u5230\u8003\u8BD5"),content:l.a.createElement("div",null,"\u60A8\u5DF2\u5207\u5C4F",l.a.createElement("span",{className:"c-red"},le+1),"\u6B21\uFF0C\u5207\u5C4F\u8D85\u8FC7",l.a.createElement("span",{className:"c-red"},(Xe=S.exerciseUserInfo)===null||Xe===void 0?void 0:Xe.screen_num),"\u6B21\u5C06\u5F3A\u5236\u4EA4\u5377")})},(S.exerciseUserInfo.screen_sec+1)*1e3);case 3:case"end":return _e.stop()}},oe)}));return function(le){return Y.apply(this,arguments)}}(),ae=function(){location.href="/classrooms/".concat(Te.coursesId,"/exercise/").concat(Te.categoryId,"/detail")},fe=function(){var Y=Object(v.a)(o.a.mark(function oe(){var le,Ee,Le;return o.a.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return(le=B.current)===null||le===void 0||((Ee=le.destroyAll)===null||Ee===void 0)||Ee.call(le),De.next=3,Object(i.ab)({categoryId:Te.categoryId,commit_method:1});case 3:if(Le=De.sent,Le){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 De.stop()}},oe)}));return function(){return Y.apply(this,arguments)}}(),Fe=function(){var oe,le;document.removeEventListener(Object(r.c)(),Q,!1),Object(r.b)(),(oe=B.current)===null||oe===void 0||((le=oe.destroyAll)===null||le===void 0)||le.call(oe);try{A.send(JSON.stringify({type:"toggleLockExit",data:!1})),A.send(JSON.stringify({type:"network-open",data:""}))}catch(Ee){}U.info({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(){ae()}})},ie=function(oe){Object(r.a)()&&document.getElementById("iframeShixuns").style.display=="none"&&Object(r.b)()},q=function(){var Y=Object(v.a)(o.a.mark(function oe(){return o.a.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return Ee.abrupt("return",new Promise(function(){var Le=Object(v.a)(o.a.mark(function ge(De){var _e,Xe,tt;return o.a.wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:if(!((_e=S.exerciseUserInfo)!==null&&_e!==void 0&&_e.screen_at)){Me.next=3;break}return Me.next=3,Object(i.h)(Object(I.a)(Object(I.a)({},Te),{},{reset:!0}));case 3:return Me.next=5,Object(i.R)({id:Te.categoryId});case 5:if(Xe=Me.sent,!(Xe!=null&&Xe.is_commit)){Me.next=9;break}return Fe(),Me.abrupt("return");case 9:return Me.next=11,se();case 11:tt=Me.sent,De(tt);case 13:case"end":return Me.stop()}},ge)}));return function(ge){return Le.apply(this,arguments)}}()));case 1:case"end":return Ee.stop()}},oe)}));return function(){return Y.apply(this,arguments)}}(),Q=function(){var Y=Object(v.a)(o.a.mark(function oe(){var le,Ee,Le,ge;return o.a.wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:if(le=!1,console.log("fullscreen change"),!Object(r.a)()){_e.next=7;break}(Ee=S.exerciseUserInfo)!==null&&Ee!==void 0&&Ee.screen_at&&Object(i.h)(Object(I.a)(Object(I.a)({},Te),{},{reset:!0})),clearTimeout(Z.current),_e.next=17;break;case 7:return le=!0,_e.next=10,Object(i.h)(Object(I.a)({},Te));case 10:return _e.next=12,se();case 12:Le=_e.sent,be(Le.used_screen_num),ge=setTimeout(Object(v.a)(o.a.mark(function Xe(){return o.a.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:case"end":return ze.stop()}},Xe)})),S.exerciseUserInfo.screen_sec*1e3),window.frames.length!=parent.frames.length&&window.parent.postMessage("backExercise","*"),Z.current=ge;case 17:D({type:"globalSetting/headerFooterToggle",payload:le});case 18:case"end":return _e.stop()}},oe)}));return function(){return Y.apply(this,arguments)}}();return l.a.createElement("div",null,L)};H.a=Object(d.a)(function(E){var x=E.loading,O=E.user,C=E.exercise,w=E.globalSetting;return{globalSetting:w,user:O,exercise:C,loading:x.effects}})(u)},bQjk:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("OLod"))})(this,function(I){return function(v){var T=I,y=T.lib,g=y.CipherParams,s=T.enc,_=s.Hex,p=T.format,e=p.Hex={stringify:function(o){return o.ciphertext.toString(_)},parse:function(o){var n=_.parse(o);return g.create({ciphertext:n})}}}(),I.format.Hex})},bT9E:function(j,H,b){"use strict";b.d(H,"a",function(){return v});var I=b("VTBJ");function v(T,y){var g=Object(I.a)({},T);return Array.isArray(y)&&y.forEach(function(s){delete g[s]}),g}},biw7:function(j,H,b){"use strict";var I=b("q1tI"),v=b.n(I),T=I.createContext(null);H.a=T},c5Ni:function(j,H,b){},c5fP:function(j,H,b){"use strict";function I(Oe){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(Je){return typeof Je}:I=function(Je){return Je&&typeof Symbol=="function"&&Je.constructor===Symbol&&Je!==Symbol.prototype?"symbol":typeof Je},I(Oe)}Object.defineProperty(H,"__esModule",{value:!0}),H._tr_init=Xe,H._tr_stored_block=tt,H._tr_flush_block=Me,H._tr_tally=Et,H._tr_align=ze;var v=y(b("6BzB"));function T(){if(typeof WeakMap!="function")return null;var Oe=new WeakMap;return T=function(){return Oe},Oe}function y(Oe){if(Oe&&Oe.__esModule)return Oe;if(Oe===null||I(Oe)!=="object"&&typeof Oe!="function")return{default:Oe};var Ve=T();if(Ve&&Ve.has(Oe))return Ve.get(Oe);var Je={},Ye=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Pe in Oe)if(Object.prototype.hasOwnProperty.call(Oe,Pe)){var He=Ye?Object.getOwnPropertyDescriptor(Oe,Pe):null;He&&(He.get||He.set)?Object.defineProperty(Je,Pe,He):Je[Pe]=Oe[Pe]}return Je.default=Oe,Ve&&Ve.set(Oe,Je),Je}var g=4,s=0,_=1,p=2;function e(Oe){for(var Ve=Oe.length;--Ve>=0;)Oe[Ve]=0}var o=0,n=1,l=2,r=3,i=258,t=29,a=256,c=a+1+t,d=30,f=19,h=2*c+1,u=15,E=16,x=7,O=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],D=[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],M=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],N=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],P=512,z=new Array((c+2)*2);e(z);var X=new Array(d*2);e(X);var k=new Array(P);e(k);var F=new Array(i-r+1);e(F);var U=new Array(t);e(U);var L=new Array(d);e(L);function B(Oe,Ve,Je,Ye,Pe){this.static_tree=Oe,this.extra_bits=Ve,this.extra_base=Je,this.elems=Ye,this.max_length=Pe,this.has_stree=Oe&&Oe.length}var Z,re,he;function Ce(Oe,Ve){this.dyn_tree=Oe,this.max_code=0,this.stat_desc=Ve}function ke(Oe){return Oe<256?k[Oe]:k[256+(Oe>>>7)]}function te(Oe,Ve){Oe.pending_buf[Oe.pending++]=Ve&255,Oe.pending_buf[Oe.pending++]=Ve>>>8&255}function Re(Oe,Ve,Je){Oe.bi_valid>E-Je?(Oe.bi_buf|=Ve<<Oe.bi_valid&65535,te(Oe,Oe.bi_buf),Oe.bi_buf=Ve>>E-Oe.bi_valid,Oe.bi_valid+=Je-E):(Oe.bi_buf|=Ve<<Oe.bi_valid&65535,Oe.bi_valid+=Je)}function Te(Oe,Ve,Je){Re(Oe,Je[Ve*2],Je[Ve*2+1])}function pe(Oe,Ve){var Je=0;do Je|=Oe&1,Oe>>>=1,Je<<=1;while(--Ve>0);return Je>>>1}function me(Oe){Oe.bi_valid===16?(te(Oe,Oe.bi_buf),Oe.bi_buf=0,Oe.bi_valid=0):Oe.bi_valid>=8&&(Oe.pending_buf[Oe.pending++]=Oe.bi_buf&255,Oe.bi_buf>>=8,Oe.bi_valid-=8)}function se(Oe,Ve){var Je=Ve.dyn_tree,Ye=Ve.max_code,Pe=Ve.stat_desc.static_tree,He=Ve.stat_desc.has_stree,ve=Ve.stat_desc.extra_bits,xe=Ve.stat_desc.extra_base,de=Ve.stat_desc.max_length,je,Qe,ne,Ze,lt,Be,$e=0;for(Ze=0;Ze<=u;Ze++)Oe.bl_count[Ze]=0;for(Je[Oe.heap[Oe.heap_max]*2+1]=0,je=Oe.heap_max+1;je<h;je++){if(Qe=Oe.heap[je],Ze=Je[Je[Qe*2+1]*2+1]+1,Ze>de&&(Ze=de,$e++),Je[Qe*2+1]=Ze,Qe>Ye)continue;Oe.bl_count[Ze]++,lt=0,Qe>=xe&&(lt=ve[Qe-xe]),Be=Je[Qe*2],Oe.opt_len+=Be*(Ze+lt),He&&(Oe.static_len+=Be*(Pe[Qe*2+1]+lt))}if($e===0)return;do{for(Ze=de-1;Oe.bl_count[Ze]===0;)Ze--;Oe.bl_count[Ze]--,Oe.bl_count[Ze+1]+=2,Oe.bl_count[de]--,$e-=2}while($e>0);for(Ze=de;Ze!==0;Ze--)for(Qe=Oe.bl_count[Ze];Qe!==0;){if(ne=Oe.heap[--je],ne>Ye)continue;Je[ne*2+1]!==Ze&&(Oe.opt_len+=(Ze-Je[ne*2+1])*Je[ne*2],Je[ne*2+1]=Ze),Qe--}}function be(Oe,Ve,Je){var Ye=new Array(u+1),Pe=0,He,ve;for(He=1;He<=u;He++)Ye[He]=Pe=Pe+Je[He-1]<<1;for(ve=0;ve<=Ve;ve++){var xe=Oe[ve*2+1];if(xe===0)continue;Oe[ve*2]=pe(Ye[xe]++,xe)}}function ae(){var Oe,Ve,Je,Ye,Pe,He=new Array(u+1);for(Je=0,Ye=0;Ye<t-1;Ye++)for(U[Ye]=Je,Oe=0;Oe<1<<A[Ye];Oe++)F[Je++]=Ye;for(F[Je-1]=Ye,Pe=0,Ye=0;Ye<16;Ye++)for(L[Ye]=Pe,Oe=0;Oe<1<<D[Ye];Oe++)k[Pe++]=Ye;for(Pe>>=7;Ye<d;Ye++)for(L[Ye]=Pe<<7,Oe=0;Oe<1<<D[Ye]-7;Oe++)k[256+Pe++]=Ye;for(Ve=0;Ve<=u;Ve++)He[Ve]=0;for(Oe=0;Oe<=143;)z[Oe*2+1]=8,Oe++,He[8]++;for(;Oe<=255;)z[Oe*2+1]=9,Oe++,He[9]++;for(;Oe<=279;)z[Oe*2+1]=7,Oe++,He[7]++;for(;Oe<=287;)z[Oe*2+1]=8,Oe++,He[8]++;for(be(z,c+1,He),Oe=0;Oe<d;Oe++)X[Oe*2+1]=5,X[Oe*2]=pe(Oe,5);Z=new B(z,A,a+1,c,u),re=new B(X,D,0,d,u),he=new B(new Array(0),M,0,f,x)}function fe(Oe){var Ve;for(Ve=0;Ve<c;Ve++)Oe.dyn_ltree[Ve*2]=0;for(Ve=0;Ve<d;Ve++)Oe.dyn_dtree[Ve*2]=0;for(Ve=0;Ve<f;Ve++)Oe.bl_tree[Ve*2]=0;Oe.dyn_ltree[O*2]=1,Oe.opt_len=Oe.static_len=0,Oe.last_lit=Oe.matches=0}function Fe(Oe){Oe.bi_valid>8?te(Oe,Oe.bi_buf):Oe.bi_valid>0&&(Oe.pending_buf[Oe.pending++]=Oe.bi_buf),Oe.bi_buf=0,Oe.bi_valid=0}function ie(Oe,Ve,Je,Ye){Fe(Oe),Ye&&(te(Oe,Je),te(Oe,~Je)),v.arraySet(Oe.pending_buf,Oe.window,Ve,Je,Oe.pending),Oe.pending+=Je}function q(Oe,Ve,Je,Ye){var Pe=Ve*2,He=Je*2;return Oe[Pe]<Oe[He]||Oe[Pe]===Oe[He]&&Ye[Ve]<=Ye[Je]}function Q(Oe,Ve,Je){for(var Ye=Oe.heap[Je],Pe=Je<<1;Pe<=Oe.heap_len&&!(Pe<Oe.heap_len&&q(Ve,Oe.heap[Pe+1],Oe.heap[Pe],Oe.depth)&&Pe++,q(Ve,Ye,Oe.heap[Pe],Oe.depth));)Oe.heap[Je]=Oe.heap[Pe],Je=Pe,Pe<<=1;Oe.heap[Je]=Ye}function Y(Oe,Ve,Je){var Ye,Pe,He=0,ve,xe;if(Oe.last_lit!==0)do Ye=Oe.pending_buf[Oe.d_buf+He*2]<<8|Oe.pending_buf[Oe.d_buf+He*2+1],Pe=Oe.pending_buf[Oe.l_buf+He],He++,Ye===0?Te(Oe,Pe,Ve):(ve=F[Pe],Te(Oe,ve+a+1,Ve),xe=A[ve],xe!==0&&(Pe-=U[ve],Re(Oe,Pe,xe)),Ye--,ve=ke(Ye),Te(Oe,ve,Je),xe=D[ve],xe!==0&&(Ye-=L[ve],Re(Oe,Ye,xe)));while(He<Oe.last_lit);Te(Oe,O,Ve)}function oe(Oe,Ve){var Je=Ve.dyn_tree,Ye=Ve.stat_desc.static_tree,Pe=Ve.stat_desc.has_stree,He=Ve.stat_desc.elems,ve,xe,de=-1,je;for(Oe.heap_len=0,Oe.heap_max=h,ve=0;ve<He;ve++)Je[ve*2]!==0?(Oe.heap[++Oe.heap_len]=de=ve,Oe.depth[ve]=0):Je[ve*2+1]=0;for(;Oe.heap_len<2;)je=Oe.heap[++Oe.heap_len]=de<2?++de:0,Je[je*2]=1,Oe.depth[je]=0,Oe.opt_len--,Pe&&(Oe.static_len-=Ye[je*2+1]);for(Ve.max_code=de,ve=Oe.heap_len>>1;ve>=1;ve--)Q(Oe,Je,ve);je=He;do ve=Oe.heap[1],Oe.heap[1]=Oe.heap[Oe.heap_len--],Q(Oe,Je,1),xe=Oe.heap[1],Oe.heap[--Oe.heap_max]=ve,Oe.heap[--Oe.heap_max]=xe,Je[je*2]=Je[ve*2]+Je[xe*2],Oe.depth[je]=(Oe.depth[ve]>=Oe.depth[xe]?Oe.depth[ve]:Oe.depth[xe])+1,Je[ve*2+1]=Je[xe*2+1]=je,Oe.heap[1]=je++,Q(Oe,Je,1);while(Oe.heap_len>=2);Oe.heap[--Oe.heap_max]=Oe.heap[1],se(Oe,Ve),be(Je,de,Oe.bl_count)}function le(Oe,Ve,Je){var Ye,Pe=-1,He,ve=Ve[0*2+1],xe=0,de=7,je=4;for(ve===0&&(de=138,je=3),Ve[(Je+1)*2+1]=65535,Ye=0;Ye<=Je;Ye++){if(He=ve,ve=Ve[(Ye+1)*2+1],++xe<de&&He===ve)continue;xe<je?Oe.bl_tree[He*2]+=xe:He!==0?(He!==Pe&&Oe.bl_tree[He*2]++,Oe.bl_tree[C*2]++):xe<=10?Oe.bl_tree[w*2]++:Oe.bl_tree[S*2]++,xe=0,Pe=He,ve===0?(de=138,je=3):He===ve?(de=6,je=3):(de=7,je=4)}}function Ee(Oe,Ve,Je){var Ye,Pe=-1,He,ve=Ve[0*2+1],xe=0,de=7,je=4;for(ve===0&&(de=138,je=3),Ye=0;Ye<=Je;Ye++){if(He=ve,ve=Ve[(Ye+1)*2+1],++xe<de&&He===ve)continue;if(xe<je)do Te(Oe,He,Oe.bl_tree);while(--xe!==0);else He!==0?(He!==Pe&&(Te(Oe,He,Oe.bl_tree),xe--),Te(Oe,C,Oe.bl_tree),Re(Oe,xe-3,2)):xe<=10?(Te(Oe,w,Oe.bl_tree),Re(Oe,xe-3,3)):(Te(Oe,S,Oe.bl_tree),Re(Oe,xe-11,7));xe=0,Pe=He,ve===0?(de=138,je=3):He===ve?(de=6,je=3):(de=7,je=4)}}function Le(Oe){var Ve;for(le(Oe,Oe.dyn_ltree,Oe.l_desc.max_code),le(Oe,Oe.dyn_dtree,Oe.d_desc.max_code),oe(Oe,Oe.bl_desc),Ve=f-1;Ve>=3&&!(Oe.bl_tree[N[Ve]*2+1]!==0);Ve--);return Oe.opt_len+=3*(Ve+1)+5+5+4,Ve}function ge(Oe,Ve,Je,Ye){var Pe;for(Re(Oe,Ve-257,5),Re(Oe,Je-1,5),Re(Oe,Ye-4,4),Pe=0;Pe<Ye;Pe++)Re(Oe,Oe.bl_tree[N[Pe]*2+1],3);Ee(Oe,Oe.dyn_ltree,Ve-1),Ee(Oe,Oe.dyn_dtree,Je-1)}function De(Oe){var Ve=4093624447,Je;for(Je=0;Je<=31;Je++,Ve>>>=1)if(Ve&1&&Oe.dyn_ltree[Je*2]!==0)return s;if(Oe.dyn_ltree[9*2]!==0||Oe.dyn_ltree[10*2]!==0||Oe.dyn_ltree[13*2]!==0)return _;for(Je=32;Je<a;Je++)if(Oe.dyn_ltree[Je*2]!==0)return _;return s}var _e=!1;function Xe(Oe){_e||(ae(),_e=!0),Oe.l_desc=new Ce(Oe.dyn_ltree,Z),Oe.d_desc=new Ce(Oe.dyn_dtree,re),Oe.bl_desc=new Ce(Oe.bl_tree,he),Oe.bi_buf=0,Oe.bi_valid=0,fe(Oe)}function tt(Oe,Ve,Je,Ye){Re(Oe,(o<<1)+(Ye?1:0),3),ie(Oe,Ve,Je,!0)}function ze(Oe){Re(Oe,n<<1,3),Te(Oe,O,z),me(Oe)}function Me(Oe,Ve,Je,Ye){var Pe,He,ve=0;Oe.level>0?(Oe.strm.data_type===p&&(Oe.strm.data_type=De(Oe)),oe(Oe,Oe.l_desc),oe(Oe,Oe.d_desc),ve=Le(Oe),Pe=Oe.opt_len+3+7>>>3,He=Oe.static_len+3+7>>>3,He<=Pe&&(Pe=He)):Pe=He=Je+5,Je+4<=Pe&&Ve!==-1?tt(Oe,Ve,Je,Ye):Oe.strategy===g||He===Pe?(Re(Oe,(n<<1)+(Ye?1:0),3),Y(Oe,z,X)):(Re(Oe,(l<<1)+(Ye?1:0),3),ge(Oe,Oe.l_desc.max_code+1,Oe.d_desc.max_code+1,ve+1),Y(Oe,Oe.dyn_ltree,Oe.dyn_dtree)),fe(Oe),Ye&&Fe(Oe)}function Et(Oe,Ve,Je){return Oe.pending_buf[Oe.d_buf+Oe.last_lit*2]=Ve>>>8&255,Oe.pending_buf[Oe.d_buf+Oe.last_lit*2+1]=Ve&255,Oe.pending_buf[Oe.l_buf+Oe.last_lit]=Je&255,Oe.last_lit++,Ve===0?Oe.dyn_ltree[Je*2]++:(Oe.matches++,Ve--,Oe.dyn_ltree[(F[Je]+a+1)*2]++,Oe.dyn_dtree[ke(Ve)*2]++),Oe.last_lit===Oe.lit_bufsize-1}},cRFk:function(j,H,b){j.exports=b.p+"static/RepositoryNoneData.828085a8.png"},"cf+g":function(j,H,b){j.exports=b.p+"static/mark.ad150797.svg"},csWT:function(j,H,b){j.exports=b.p+"static/choose.4ad1045f.svg"},cv67:function(j,H,b){(function(I,v){j.exports=H=v(b("Ib8C"))})(this,function(I){return function(v){var T=I,y=T.lib,g=y.WordArray,s=y.Hasher,_=T.algo,p=[];(function(){for(var i=0;i<64;i++)p[i]=v.abs(v.sin(i+1))*4294967296|0})();var e=_.MD5=s.extend({_doReset:function(){this._hash=new g.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(i,t){for(var a=0;a<16;a++){var c=t+a,d=i[c];i[c]=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360}var f=this._hash.words,h=i[t+0],u=i[t+1],E=i[t+2],x=i[t+3],O=i[t+4],C=i[t+5],w=i[t+6],S=i[t+7],A=i[t+8],D=i[t+9],M=i[t+10],N=i[t+11],P=i[t+12],z=i[t+13],X=i[t+14],k=i[t+15],F=f[0],U=f[1],L=f[2],B=f[3];F=o(F,U,L,B,h,7,p[0]),B=o(B,F,U,L,u,12,p[1]),L=o(L,B,F,U,E,17,p[2]),U=o(U,L,B,F,x,22,p[3]),F=o(F,U,L,B,O,7,p[4]),B=o(B,F,U,L,C,12,p[5]),L=o(L,B,F,U,w,17,p[6]),U=o(U,L,B,F,S,22,p[7]),F=o(F,U,L,B,A,7,p[8]),B=o(B,F,U,L,D,12,p[9]),L=o(L,B,F,U,M,17,p[10]),U=o(U,L,B,F,N,22,p[11]),F=o(F,U,L,B,P,7,p[12]),B=o(B,F,U,L,z,12,p[13]),L=o(L,B,F,U,X,17,p[14]),U=o(U,L,B,F,k,22,p[15]),F=n(F,U,L,B,u,5,p[16]),B=n(B,F,U,L,w,9,p[17]),L=n(L,B,F,U,N,14,p[18]),U=n(U,L,B,F,h,20,p[19]),F=n(F,U,L,B,C,5,p[20]),B=n(B,F,U,L,M,9,p[21]),L=n(L,B,F,U,k,14,p[22]),U=n(U,L,B,F,O,20,p[23]),F=n(F,U,L,B,D,5,p[24]),B=n(B,F,U,L,X,9,p[25]),L=n(L,B,F,U,x,14,p[26]),U=n(U,L,B,F,A,20,p[27]),F=n(F,U,L,B,z,5,p[28]),B=n(B,F,U,L,E,9,p[29]),L=n(L,B,F,U,S,14,p[30]),U=n(U,L,B,F,P,20,p[31]),F=l(F,U,L,B,C,4,p[32]),B=l(B,F,U,L,A,11,p[33]),L=l(L,B,F,U,N,16,p[34]),U=l(U,L,B,F,X,23,p[35]),F=l(F,U,L,B,u,4,p[36]),B=l(B,F,U,L,O,11,p[37]),L=l(L,B,F,U,S,16,p[38]),U=l(U,L,B,F,M,23,p[39]),F=l(F,U,L,B,z,4,p[40]),B=l(B,F,U,L,h,11,p[41]),L=l(L,B,F,U,x,16,p[42]),U=l(U,L,B,F,w,23,p[43]),F=l(F,U,L,B,D,4,p[44]),B=l(B,F,U,L,P,11,p[45]),L=l(L,B,F,U,k,16,p[46]),U=l(U,L,B,F,E,23,p[47]),F=r(F,U,L,B,h,6,p[48]),B=r(B,F,U,L,S,10,p[49]),L=r(L,B,F,U,X,15,p[50]),U=r(U,L,B,F,C,21,p[51]),F=r(F,U,L,B,P,6,p[52]),B=r(B,F,U,L,x,10,p[53]),L=r(L,B,F,U,M,15,p[54]),U=r(U,L,B,F,u,21,p[55]),F=r(F,U,L,B,A,6,p[56]),B=r(B,F,U,L,k,10,p[57]),L=r(L,B,F,U,w,15,p[58]),U=r(U,L,B,F,z,21,p[59]),F=r(F,U,L,B,O,6,p[60]),B=r(B,F,U,L,N,10,p[61]),L=r(L,B,F,U,E,15,p[62]),U=r(U,L,B,F,D,21,p[63]),f[0]=f[0]+F|0,f[1]=f[1]+U|0,f[2]=f[2]+L|0,f[3]=f[3]+B|0},_doFinalize:function(){var i=this._data,t=i.words,a=this._nDataBytes*8,c=i.sigBytes*8;t[c>>>5]|=128<<24-c%32;var d=v.floor(a/4294967296),f=a;t[(c+64>>>9<<4)+15]=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360,t[(c+64>>>9<<4)+14]=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,i.sigBytes=(t.length+1)*4,this._process();for(var h=this._hash,u=h.words,E=0;E<4;E++){var x=u[E];u[E]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360}return h},clone:function(){var i=s.clone.call(this);return i._hash=this._hash.clone(),i}});function o(i,t,a,c,d,f,h){var u=i+(t&a|~t&c)+d+h;return(u<<f|u>>>32-f)+t}function n(i,t,a,c,d,f,h){var u=i+(t&c|a&~c)+d+h;return(u<<f|u>>>32-f)+t}function l(i,t,a,c,d,f,h){var u=i+(t^a^c)+d+h;return(u<<f|u>>>32-f)+t}function r(i,t,a,c,d,f,h){var u=i+(a^(t|~c))+d+h;return(u<<f|u>>>32-f)+t}T.MD5=s._createHelper(e),T.HmacMD5=s._createHmacHelper(e)}(Math),I.MD5})},dPi7:function(j,H,b){j.exports=b.p+"static/appoint1.9457cf22.svg"},dTJi:function(j,H,b){},dViP:function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAAATxJREFUWEftmE9Kw1AQxr8ZYqhYoWL34kJwW/QIeoku2q7SI/QMPUK76z16BG/gQtxXurBiScMbeWIQxDLTQOITXhbJ4s2f7/0yYfKG8HWJCGE8Pkeed+HcMYqCy7VankniwPyONF1hNnshIvF5yN8ky46w3V6iKE5rSa4FTZJXtFpPNJ/v6JPMcHj1Z2JKsV7UYvFIkmVdbDYX2iYaWW+3n0lGo2vk+UkjCbUkafpGMhj0ai9gTcj3a3Mk/f6N1b4JuyhIo/yPCTl3B2AC4Ezb5Y/1NYApmJcWPzshkSVEOpagv9iswXxv8bULcu7BEnCvDfOtxT8K0ihFQpFQ/Mq0GoiEIqG9BIJrriK+W08qdPyafj8qF89hjvZedljcytZRkIYuwINicEfp4IYNoY1jfJEFNbAqqz6Ukd4H/d3NFUaXf7AAAAAASUVORK5CYII="},dejd:function(j,H,b){},djh8:function(j,H,b){j.exports=b.p+"static/qrCode.d852fdfc.png"},dmUQ:function(j,H,b){"use strict";var I=b("Ff2n"),v=b("rePB"),T=b("1OyB"),y=b("vuIU"),g=b("Ji7U"),s=b("md7G"),_=b("foSv"),p=b("q1tI"),e=b.n(p),o=b("TSYQ"),n=b.n(o),l=b("4IlW");function r(A,D){var M=Object.keys(A);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(A);D&&(N=N.filter(function(P){return Object.getOwnPropertyDescriptor(A,P).enumerable})),M.push.apply(M,N)}return M}function i(A){for(var D=1;D<arguments.length;D++){var M=arguments[D]!=null?arguments[D]:{};D%2?r(Object(M),!0).forEach(function(N){Object(v.a)(A,N,M[N])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(M)):r(Object(M)).forEach(function(N){Object.defineProperty(A,N,Object.getOwnPropertyDescriptor(M,N))})}return A}function t(A){var D=a();return function(){var N=Object(_.a)(A),P;if(D){var z=Object(_.a)(this).constructor;P=Reflect.construct(N,arguments,z)}else P=N.apply(this,arguments);return Object(s.a)(this,P)}}function a(){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 d(A){A.preventDefault()}var f=function(D){return D.replace(/[^\w.-]+/g,"")},h=200,u=600,E=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,x=function(D){return D!=null},O=function(D,M){return M===D||typeof M=="number"&&typeof D=="number"&&isNaN(M)&&isNaN(D)},C=function(A){Object(g.a)(M,A);var D=t(M);function M(N){var P;Object(T.a)(this,M),P=D.call(this,N),P.onKeyDown=function(k){var F=P.props,U=F.onKeyDown,L=F.onPressEnter;if(k.keyCode===l.a.UP){var B=P.getRatio(k);P.up(k,B,null),P.stop()}else if(k.keyCode===l.a.DOWN){var Z=P.getRatio(k);P.down(k,Z,null),P.stop()}else k.keyCode===l.a.ENTER&&L&&L(k);if(P.recordCursorPosition(),P.lastKeyCode=k.keyCode,U){for(var re=arguments.length,he=new Array(re>1?re-1:0),Ce=1;Ce<re;Ce++)he[Ce-1]=arguments[Ce];U.apply(void 0,[k].concat(he))}},P.onKeyUp=function(k){var F=P.props.onKeyUp;if(P.stop(),P.recordCursorPosition(),F){for(var U=arguments.length,L=new Array(U>1?U-1:0),B=1;B<U;B++)L[B-1]=arguments[B];F.apply(void 0,[k].concat(L))}},P.onChange=function(k){var F=P.props.onChange;P.state.focused&&(P.inputting=!0),P.rawInput=P.props.parser(P.getValueFromEvent(k)),P.setState({inputValue:P.rawInput}),F(P.toNumber(P.rawInput))},P.onMouseUp=function(){var k=P.props.onMouseUp;P.recordCursorPosition(),k&&k.apply(void 0,arguments)},P.onFocus=function(){var k;P.setState({focused:!0}),(k=P.props).onFocus.apply(k,arguments)},P.onBlur=function(){var k=P.props.onBlur;P.inputting=!1,P.setState({focused:!1});var F=P.getCurrentValidValue(P.state.inputValue),U=P.setValue(F,c);if(k){var L=P.input.value,B=P.getInputDisplayValue({focus:!1,value:U});P.input.value=B&&Number(B),k.apply(void 0,arguments),P.input.value=L}},P.getRatio=function(k){var F=1;return k.metaKey||k.ctrlKey?F=.1:k.shiftKey&&(F=10),F},P.getFullNum=function(k){return isNaN(k)?k:/e/i.test(String(k))?Number(k).toFixed(18).replace(/\.?0+$/,""):k},P.getPrecision=function(k){if(x(P.props.precision))return P.props.precision;var F=String(k);if(F.indexOf("e-")>=0)return parseInt(F.slice(F.indexOf("e-")+2),10);var U=0;return F.indexOf(".")>=0&&(U=F.length-F.indexOf(".")-1),U},P.getInputDisplayValue=function(k){var F=k||P.state,U=F.focused,L=F.inputValue,B=F.value,Z;U?Z=L:Z=P.toPrecisionAsStep(B),Z==null&&(Z="");var re=P.formatWrapper(Z);return x(P.props.decimalSeparator)&&(re=re.toString().replace(".",P.props.decimalSeparator)),re},P.recordCursorPosition=function(){try{P.cursorStart=P.input.selectionStart,P.cursorEnd=P.input.selectionEnd,P.currentValue=P.input.value,P.cursorBefore=P.input.value.substring(0,P.cursorStart),P.cursorAfter=P.input.value.substring(P.cursorEnd)}catch(k){}},P.restoreByAfter=function(k){if(k===void 0)return!1;var F=P.input.value,U=F.lastIndexOf(k);if(U===-1)return!1;var L=P.cursorBefore.length;return P.lastKeyCode===l.a.DELETE&&P.cursorBefore.charAt(L-1)===k[0]?(P.fixCaret(L,L),!0):U+k.length===F.length?(P.fixCaret(U,U),!0):!1},P.partRestoreByAfter=function(k){return k===void 0?!1:Array.prototype.some.call(k,function(F,U){var L=k.substring(U);return P.restoreByAfter(L)})},P.isNotCompleteNumber=function(k){return isNaN(k)||k===""||k===null||k&&k.toString().indexOf(".")===k.toString().length-1},P.stop=function(){P.autoStepTimer&&clearTimeout(P.autoStepTimer)},P.down=function(k,F,U){P.pressingUpOrDown=!0,P.step("down",k,F,U)},P.up=function(k,F,U){P.pressingUpOrDown=!0,P.step("up",k,F,U)},P.saveInput=function(k){P.input=k};var z=N.value;z===void 0&&(z=N.defaultValue),P.state={focused:N.autoFocus};var X=P.getValidValue(P.toNumber(z));return P.state=i(i({},P.state),{},{inputValue:P.toPrecisionAsStep(X),value:X}),P}return Object(y.a)(M,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(P){var z=this.props,X=z.value,k=z.onChange,F=z.max,U=z.min,L=this.state.focused;if(P){if(!O(P.value,X)||!O(P.max,F)||!O(P.min,U)){var B=L?X:this.getValidValue(X),Z;this.pressingUpOrDown?Z=B:this.inputting?Z=this.rawInput:Z=this.toPrecisionAsStep(B),this.setState({value:B,inputValue:Z})}var re="value"in this.props?X:this.state.value;"max"in this.props&&P.max!==F&&typeof re=="number"&&re>F&&k&&k(F),"min"in this.props&&P.min!==U&&typeof re=="number"&&re<U&&k&&k(U)}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===l.a.BACKSPACE?he=this.cursorStart-1:this.lastKeyCode===l.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 l.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case l.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(Ce){}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(P){var z=P;return z===""?z="":this.isNotCompleteNumber(parseFloat(z))?z=this.state.value:z=this.getValidValue(z),this.toNumber(z)}},{key:"getValueFromEvent",value:function(P){var z=P.target.value.trim().replace(/。/g,".");return x(this.props.decimalSeparator)&&(z=z.replace(this.props.decimalSeparator,".")),z}},{key:"getValidValue",value:function(P){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,k=parseFloat(P);return isNaN(k)?P:(k<z&&(k=z),k>X&&(k=X),k)}},{key:"setValue",value:function(P,z){var X=this.props.precision,k=this.isNotCompleteNumber(parseFloat(P))?null:parseFloat(P),F=this.state.value,U=F===void 0?null:F,L=this.state.inputValue,B=L===void 0?null:L,Z=typeof k=="number"?k.toFixed(X):"".concat(k),re=k!==U||Z!=="".concat(B);return"value"in this.props?(B=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:B},z)):this.setState({value:k,inputValue:this.toPrecisionAsStep(P)},z),re&&this.props.onChange(k),k}},{key:"getMaxPrecision",value:function(P){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,X=this.props,k=X.precision,F=X.step;if(x(k))return k;var U=this.getPrecision(z),L=this.getPrecision(F),B=this.getPrecision(P);return P?Math.max(B,U+L):U+L}},{key:"getPrecisionFactor",value:function(P){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,X=this.getMaxPrecision(P,z);return Math.pow(10,X)}},{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(P){return this.props.formatter?this.props.formatter(P):P}},{key:"toPrecisionAsStep",value:function(P){if(this.isNotCompleteNumber(P)||P==="")return P;var z=Math.abs(this.getMaxPrecision(P));return isNaN(z)?P.toString():Number(P).toFixed(z)}},{key:"toNumber",value:function(P){var z=this.props.precision,X=this.state.focused,k=P&&P.length>16&&X;return this.isNotCompleteNumber(P)||k?P:x(z)?Math.round(P*Math.pow(10,z))/Math.pow(10,z):Number(P)}},{key:"upStep",value:function(P,z){var X=this.props.step,k=this.getPrecisionFactor(P,z),F=Math.abs(this.getMaxPrecision(P,z)),U=((k*P+k*X*z)/k).toFixed(F);return this.toNumber(U)}},{key:"downStep",value:function(P,z){var X=this.props.step,k=this.getPrecisionFactor(P,z),F=Math.abs(this.getMaxPrecision(P,z)),U=((k*P-k*X*z)/k).toFixed(F);return this.toNumber(U)}},{key:"step",value:function(P,z){var X=this,k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,F=arguments.length>3?arguments[3]:void 0;this.stop(),z&&(z.persist(),z.preventDefault());var U=this.props;if(U.disabled)return;var L=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(L))return;var B=this["".concat(P,"Step")](L,k),Z=B>U.max||B<U.min;if(B>U.max?B=U.max:B<U.min&&(B=U.min),this.setValue(B,null),this.setState({focused:!0},function(){X.pressingUpOrDown=!1}),Z)return;this.autoStepTimer=setTimeout(function(){X[P](z,k,!0)},F?h:u)}},{key:"fixCaret",value:function(P,z){if(P===void 0||z===void 0||!this.input||!this.input.value)return;try{var X=this.input.selectionStart,k=this.input.selectionEnd;(P!==X||z!==k)&&this.input.setSelectionRange(P,z)}catch(F){}}},{key:"render",value:function(){var P,z=this.props,X=z.prefixCls,k=z.disabled,F=z.readOnly,U=z.useTouch,L=z.autoComplete,B=z.upHandler,Z=z.downHandler,re=z.className,he=z.max,Ce=z.min,ke=z.style,te=z.title,Re=z.onMouseEnter,Te=z.onMouseLeave,pe=z.onMouseOver,me=z.onMouseOut,se=z.required,be=z.onClick,ae=z.tabIndex,fe=z.type,Fe=z.placeholder,ie=z.id,q=z.inputMode,Q=z.pattern,Y=z.step,oe=z.maxLength,le=z.autoFocus,Ee=z.name,Le=z.onPaste,ge=z.onInput,De=Object(I.a)(z,["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,Xe=_e.value,tt=_e.focused,ze=n()(X,(P={},Object(v.a)(P,re,!!re),Object(v.a)(P,"".concat(X,"-disabled"),k),Object(v.a)(P,"".concat(X,"-focused"),tt),P)),Me={};Object.keys(De).forEach(function(je){(je.substr(0,5)==="data-"||je.substr(0,5)==="aria-"||je==="role")&&(Me[je]=De[je])});var Et=!F&&!k,Oe=this.getInputDisplayValue(null),Ve=(Xe||Xe===0)&&(isNaN(Xe)||Number(Xe)>=he),Je=(Xe||Xe===0)&&(isNaN(Xe)||Number(Xe)<=Ce),Ye=Ve||k||F,Pe=Je||k||F,He=n()("".concat(X,"-handler"),"".concat(X,"-handler-up"),Object(v.a)({},"".concat(X,"-handler-up-disabled"),Ye)),ve=n()("".concat(X,"-handler"),"".concat(X,"-handler-down"),Object(v.a)({},"".concat(X,"-handler-down-disabled"),Pe)),xe=U?{onTouchStart:Ye?c:this.up,onTouchEnd:this.stop}:{onMouseDown:Ye?c:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},de=U?{onTouchStart:Pe?c:this.down,onTouchEnd:this.stop}:{onMouseDown:Pe?c:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return e.a.createElement("div",{className:ze,style:ke,title:te,onMouseEnter:Re,onMouseLeave:Te,onMouseOver:pe,onMouseOut:me,onFocus:function(){return null},onBlur:function(){return null}},e.a.createElement("div",{className:"".concat(X,"-handler-wrap")},e.a.createElement("span",Object.assign({unselectable:"on"},xe,{role:"button","aria-label":"Increase Value","aria-disabled":Ye,className:He}),B||e.a.createElement("span",{unselectable:"on",className:"".concat(X,"-handler-up-inner"),onClick:d})),e.a.createElement("span",Object.assign({unselectable:"on"},de,{role:"button","aria-label":"Decrease Value","aria-disabled":Pe,className:ve}),Z||e.a.createElement("span",{unselectable:"on",className:"".concat(X,"-handler-down-inner"),onClick:d}))),e.a.createElement("div",{className:"".concat(X,"-input-wrap")},e.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Ce,"aria-valuemax":he,"aria-valuenow":Xe,required:se,type:fe,placeholder:Fe,onPaste:Le,onClick:be,onMouseUp:this.onMouseUp,className:"".concat(X,"-input"),tabIndex:ae,autoComplete:L,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Et?this.onKeyDown:c,onKeyUp:Et?this.onKeyUp:c,autoFocus:le,maxLength:oe,readOnly:F,disabled:k,max:he,min:Ce,step:Y,name:Ee,title:te,id:ie,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(Oe),pattern:Q,inputMode:q,onInput:ge},Me))))}}]),M}(e.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=H.a=w},e7zE:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("3y9D"),b("WYAk"))})(this,function(I){return function(){var v=I,T=v.lib,y=T.Base,g=T.WordArray,s=v.algo,_=s.SHA1,p=s.HMAC,e=s.PBKDF2=y.extend({cfg:y.extend({keySize:128/32,hasher:_,iterations:1}),init:function(o){this.cfg=this.cfg.extend(o)},compute:function(o,n){for(var l=this.cfg,r=p.create(l.hasher,o),i=g.create(),t=g.create([1]),a=i.words,c=t.words,d=l.keySize,f=l.iterations;a.length<d;){var h=r.update(n).finalize(t);r.reset();for(var u=h.words,E=u.length,x=h,O=1;O<f;O++){x=r.finalize(x),r.reset();for(var C=x.words,w=0;w<E;w++)u[w]^=C[w]}i.concat(h),c[0]++}return i.sigBytes=d*4,i}});v.PBKDF2=function(o,n,l){return e.create(l).compute(o,n)}}(),I.PBKDF2})},eP3c:function(j,H,b){"use strict";function I(ve){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(de){return typeof de}:I=function(de){return de&&typeof Symbol=="function"&&de.constructor===Symbol&&de!==Symbol.prototype?"symbol":typeof de},I(ve)}Object.defineProperty(H,"__esModule",{value:!0}),H.inflateReset=ge,H.inflateReset2=De,H.inflateResetKeep=Le,H.inflateInit=Xe,H.inflateInit2=_e,H.inflate=Ve,H.inflateEnd=Je,H.inflateGetHeader=Ye,H.inflateSetDictionary=Pe,H.inflateInfo=H.Z_DEFLATED=H.Z_BUF_ERROR=H.Z_MEM_ERROR=H.Z_DATA_ERROR=H.Z_STREAM_ERROR=H.Z_NEED_DICT=H.Z_STREAM_END=H.Z_OK=H.Z_TREES=H.Z_BLOCK=H.Z_FINISH=void 0;var v=e(b("6BzB")),T=_(b("xlC8")),y=_(b("QV2g")),g=_(b("sjKO")),s=_(b("JSwD"));function _(ve){return ve&&ve.__esModule?ve:{default:ve}}function p(){if(typeof WeakMap!="function")return null;var ve=new WeakMap;return p=function(){return ve},ve}function e(ve){if(ve&&ve.__esModule)return ve;if(ve===null||I(ve)!=="object"&&typeof ve!="function")return{default:ve};var xe=p();if(xe&&xe.has(ve))return xe.get(ve);var de={},je=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Qe in ve)if(Object.prototype.hasOwnProperty.call(ve,Qe)){var ne=je?Object.getOwnPropertyDescriptor(ve,Qe):null;ne&&(ne.get||ne.set)?Object.defineProperty(de,Qe,ne):de[Qe]=ve[Qe]}return de.default=ve,xe&&xe.set(ve,de),de}var o=0,n=1,l=2,r=4;H.Z_FINISH=r;var i=5;H.Z_BLOCK=i;var t=6;H.Z_TREES=t;var a=0;H.Z_OK=a;var c=1;H.Z_STREAM_END=c;var d=2;H.Z_NEED_DICT=d;var f=-2;H.Z_STREAM_ERROR=f;var h=-3;H.Z_DATA_ERROR=h;var u=-4;H.Z_MEM_ERROR=u;var E=-5;H.Z_BUF_ERROR=E;var x=8;H.Z_DEFLATED=x;var O=1,C=2,w=3,S=4,A=5,D=6,M=7,N=8,P=9,z=10,X=11,k=12,F=13,U=14,L=15,B=16,Z=17,re=18,he=19,Ce=20,ke=21,te=22,Re=23,Te=24,pe=25,me=26,se=27,be=28,ae=29,fe=30,Fe=31,ie=32,q=852,Q=592,Y=15,oe=Y;function le(ve){return(ve>>>24&255)+(ve>>>8&65280)+((ve&65280)<<8)+((ve&255)<<24)}function Ee(){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 v.Buf16(320),this.work=new v.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Le(ve){var xe;return!ve||!ve.state?f:(xe=ve.state,ve.total_in=ve.total_out=xe.total=0,ve.msg="",xe.wrap&&(ve.adler=xe.wrap&1),xe.mode=O,xe.last=0,xe.havedict=0,xe.dmax=32768,xe.head=null,xe.hold=0,xe.bits=0,xe.lencode=xe.lendyn=new v.Buf32(q),xe.distcode=xe.distdyn=new v.Buf32(Q),xe.sane=1,xe.back=-1,a)}function ge(ve){var xe;return!ve||!ve.state?f:(xe=ve.state,xe.wsize=0,xe.whave=0,xe.wnext=0,Le(ve))}function De(ve,xe){var de,je;return!ve||!ve.state?f:(je=ve.state,xe<0?(de=0,xe=-xe):(de=(xe>>4)+1,xe<48&&(xe&=15)),xe&&(xe<8||xe>15)?f:(je.window!==null&&je.wbits!==xe&&(je.window=null),je.wrap=de,je.wbits=xe,ge(ve)))}function _e(ve,xe){var de,je;return ve?(je=new Ee,ve.state=je,je.window=null,de=De(ve,xe),de!==a&&(ve.state=null),de):f}function Xe(ve){return _e(ve,oe)}var tt=!0,ze,Me;function Et(ve){if(tt){var xe;for(ze=new v.Buf32(512),Me=new v.Buf32(32),xe=0;xe<144;)ve.lens[xe++]=8;for(;xe<256;)ve.lens[xe++]=9;for(;xe<280;)ve.lens[xe++]=7;for(;xe<288;)ve.lens[xe++]=8;for((0,s.default)(n,ve.lens,0,288,ze,0,ve.work,{bits:9}),xe=0;xe<32;)ve.lens[xe++]=5;(0,s.default)(l,ve.lens,0,32,Me,0,ve.work,{bits:5}),tt=!1}ve.lencode=ze,ve.lenbits=9,ve.distcode=Me,ve.distbits=5}function Oe(ve,xe,de,je){var Qe,ne=ve.state;return ne.window===null&&(ne.wsize=1<<ne.wbits,ne.wnext=0,ne.whave=0,ne.window=new v.Buf8(ne.wsize)),je>=ne.wsize?(v.arraySet(ne.window,xe,de-ne.wsize,ne.wsize,0),ne.wnext=0,ne.whave=ne.wsize):(Qe=ne.wsize-ne.wnext,Qe>je&&(Qe=je),v.arraySet(ne.window,xe,de-je,Qe,ne.wnext),je-=Qe,je?(v.arraySet(ne.window,xe,de-je,je,0),ne.wnext=je,ne.whave=ne.wsize):(ne.wnext+=Qe,ne.wnext===ne.wsize&&(ne.wnext=0),ne.whave<ne.wsize&&(ne.whave+=Qe))),0}function Ve(ve,xe){var de,je,Qe,ne,Ze,lt,Be,$e,rt,xt,ft,st,Ne,Ge,yt=0,pt,jt,Bt,gt,Ht,Ut,Nt,Wt,Qt=new v.Buf8(4),pn,qt,en=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!ve||!ve.state||!ve.output||!ve.input&&ve.avail_in!==0)return f;de=ve.state,de.mode===k&&(de.mode=F),Ze=ve.next_out,Qe=ve.output,Be=ve.avail_out,ne=ve.next_in,je=ve.input,lt=ve.avail_in,$e=de.hold,rt=de.bits,xt=lt,ft=Be,Wt=a;e:for(;;)switch(de.mode){case O:if(de.wrap===0){de.mode=F;break}for(;rt<16;){if(lt===0)break e;lt--,$e+=je[ne++]<<rt,rt+=8}if(de.wrap&2&&$e===35615){de.check=0,Qt[0]=$e&255,Qt[1]=$e>>>8&255,de.check=(0,y.default)(de.check,Qt,2,0),$e=0,rt=0,de.mode=C;break}if(de.flags=0,de.head&&(de.head.done=!1),!(de.wrap&1)||((($e&255)<<8)+($e>>8))%31){ve.msg="incorrect header check",de.mode=fe;break}if(($e&15)!==x){ve.msg="unknown compression method",de.mode=fe;break}if($e>>>=4,rt-=4,Nt=($e&15)+8,de.wbits===0)de.wbits=Nt;else if(Nt>de.wbits){ve.msg="invalid window size",de.mode=fe;break}de.dmax=1<<Nt,ve.adler=de.check=1,de.mode=$e&512?z:k,$e=0,rt=0;break;case C:for(;rt<16;){if(lt===0)break e;lt--,$e+=je[ne++]<<rt,rt+=8}if(de.flags=$e,(de.flags&255)!==x){ve.msg="unknown compression method",de.mode=fe;break}if(de.flags&57344){ve.msg="unknown header flags set",de.mode=fe;break}de.head&&(de.head.text=$e>>8&1),de.flags&512&&(Qt[0]=$e&255,Qt[1]=$e>>>8&255,de.check=(0,y.default)(de.check,Qt,2,0)),$e=0,rt=0,de.mode=w;case w:for(;rt<32;){if(lt===0)break e;lt--,$e+=je[ne++]<<rt,rt+=8}de.head&&(de.head.time=$e),de.flags&512&&(Qt[0]=$e&255,Qt[1]=$e>>>8&255,Qt[2]=$e>>>16&255,Qt[3]=$e>>>24&255,de.check=(0,y.default)(de.check,Qt,4,0)),$e=0,rt=0,de.mode=S;case S:for(;rt<16;){if(lt===0)break e;lt--,$e+=je[ne++]<<rt,rt+=8}de.head&&(de.head.xflags=$e&255,de.head.os=$e>>8),de.flags&512&&(Qt[0]=$e&255,Qt[1]=$e>>>8&255,de.check=(0,y.default)(de.check,Qt,2,0)),$e=0,rt=0,de.mode=A;case A:if(de.flags&1024){for(;rt<16;){if(lt===0)break e;lt--,$e+=je[ne++]<<rt,rt+=8}de.length=$e,de.head&&(de.head.extra_len=$e),de.flags&512&&(Qt[0]=$e&255,Qt[1]=$e>>>8&255,de.check=(0,y.default)(de.check,Qt,2,0)),$e=0,rt=0}else de.head&&(de.head.extra=null);de.mode=D;case D:if(de.flags&1024&&(st=de.length,st>lt&&(st=lt),st&&(de.head&&(Nt=de.head.extra_len-de.length,de.head.extra||(de.head.extra=new Array(de.head.extra_len)),v.arraySet(de.head.extra,je,ne,st,Nt)),de.flags&512&&(de.check=(0,y.default)(de.check,je,st,ne)),lt-=st,ne+=st,de.length-=st),de.length))break e;de.length=0,de.mode=M;case M:if(de.flags&2048){if(lt===0)break e;st=0;do Nt=je[ne+st++],de.head&&Nt&&de.length<65536&&(de.head.name+=String.fromCharCode(Nt));while(Nt&&st<lt);if(de.flags&512&&(de.check=(0,y.default)(de.check,je,st,ne)),lt-=st,ne+=st,Nt)break e}else de.head&&(de.head.name=null);de.length=0,de.mode=N;case N:if(de.flags&4096){if(lt===0)break e;st=0;do Nt=je[ne+st++],de.head&&Nt&&de.length<65536&&(de.head.comment+=String.fromCharCode(Nt));while(Nt&&st<lt);if(de.flags&512&&(de.check=(0,y.default)(de.check,je,st,ne)),lt-=st,ne+=st,Nt)break e}else de.head&&(de.head.comment=null);de.mode=P;case P:if(de.flags&512){for(;rt<16;){if(lt===0)break e;lt--,$e+=je[ne++]<<rt,rt+=8}if($e!==(de.check&65535)){ve.msg="header crc mismatch",de.mode=fe;break}$e=0,rt=0}de.head&&(de.head.hcrc=de.flags>>9&1,de.head.done=!0),ve.adler=de.check=0,de.mode=k;break;case z:for(;rt<32;){if(lt===0)break e;lt--,$e+=je[ne++]<<rt,rt+=8}ve.adler=de.check=le($e),$e=0,rt=0,de.mode=X;case X:if(de.havedict===0)return ve.next_out=Ze,ve.avail_out=Be,ve.next_in=ne,ve.avail_in=lt,de.hold=$e,de.bits=rt,d;ve.adler=de.check=1,de.mode=k;case k:if(xe===i||xe===t)break e;case F:if(de.last){$e>>>=rt&7,rt-=rt&7,de.mode=se;break}for(;rt<3;){if(lt===0)break e;lt--,$e+=je[ne++]<<rt,rt+=8}de.last=$e&1,$e>>>=1,rt-=1;switch($e&3){case 0:de.mode=U;break;case 1:if(Et(de),de.mode=Ce,xe===t){$e>>>=2,rt-=2;break e}break;case 2:de.mode=Z;break;case 3:ve.msg="invalid block type",de.mode=fe}$e>>>=2,rt-=2;break;case U:for($e>>>=rt&7,rt-=rt&7;rt<32;){if(lt===0)break e;lt--,$e+=je[ne++]<<rt,rt+=8}if(($e&65535)!==($e>>>16^65535)){ve.msg="invalid stored block lengths",de.mode=fe;break}if(de.length=$e&65535,$e=0,rt=0,de.mode=L,xe===t)break e;case L:de.mode=B;case B:if(st=de.length,st){if(st>lt&&(st=lt),st>Be&&(st=Be),st===0)break e;v.arraySet(Qe,je,ne,st,Ze),lt-=st,ne+=st,Be-=st,Ze+=st,de.length-=st;break}de.mode=k;break;case Z:for(;rt<14;){if(lt===0)break e;lt--,$e+=je[ne++]<<rt,rt+=8}if(de.nlen=($e&31)+257,$e>>>=5,rt-=5,de.ndist=($e&31)+1,$e>>>=5,rt-=5,de.ncode=($e&15)+4,$e>>>=4,rt-=4,de.nlen>286||de.ndist>30){ve.msg="too many length or distance symbols",de.mode=fe;break}de.have=0,de.mode=re;case re:for(;de.have<de.ncode;){for(;rt<3;){if(lt===0)break e;lt--,$e+=je[ne++]<<rt,rt+=8}de.lens[en[de.have++]]=$e&7,$e>>>=3,rt-=3}for(;de.have<19;)de.lens[en[de.have++]]=0;if(de.lencode=de.lendyn,de.lenbits=7,pn={bits:de.lenbits},Wt=(0,s.default)(o,de.lens,0,19,de.lencode,0,de.work,pn),de.lenbits=pn.bits,Wt){ve.msg="invalid code lengths set",de.mode=fe;break}de.have=0,de.mode=he;case he:for(;de.have<de.nlen+de.ndist;){for(;!(yt=de.lencode[$e&(1<<de.lenbits)-1],pt=yt>>>24,jt=yt>>>16&255,Bt=yt&65535,pt<=rt);){if(lt===0)break e;lt--,$e+=je[ne++]<<rt,rt+=8}if(Bt<16)$e>>>=pt,rt-=pt,de.lens[de.have++]=Bt;else{if(Bt===16){for(qt=pt+2;rt<qt;){if(lt===0)break e;lt--,$e+=je[ne++]<<rt,rt+=8}if($e>>>=pt,rt-=pt,de.have===0){ve.msg="invalid bit length repeat",de.mode=fe;break}Nt=de.lens[de.have-1],st=3+($e&3),$e>>>=2,rt-=2}else if(Bt===17){for(qt=pt+3;rt<qt;){if(lt===0)break e;lt--,$e+=je[ne++]<<rt,rt+=8}$e>>>=pt,rt-=pt,Nt=0,st=3+($e&7),$e>>>=3,rt-=3}else{for(qt=pt+7;rt<qt;){if(lt===0)break e;lt--,$e+=je[ne++]<<rt,rt+=8}$e>>>=pt,rt-=pt,Nt=0,st=11+($e&127),$e>>>=7,rt-=7}if(de.have+st>de.nlen+de.ndist){ve.msg="invalid bit length repeat",de.mode=fe;break}for(;st--;)de.lens[de.have++]=Nt}}if(de.mode===fe)break;if(de.lens[256]===0){ve.msg="invalid code -- missing end-of-block",de.mode=fe;break}if(de.lenbits=9,pn={bits:de.lenbits},Wt=(0,s.default)(n,de.lens,0,de.nlen,de.lencode,0,de.work,pn),de.lenbits=pn.bits,Wt){ve.msg="invalid literal/lengths set",de.mode=fe;break}if(de.distbits=6,de.distcode=de.distdyn,pn={bits:de.distbits},Wt=(0,s.default)(l,de.lens,de.nlen,de.ndist,de.distcode,0,de.work,pn),de.distbits=pn.bits,Wt){ve.msg="invalid distances set",de.mode=fe;break}if(de.mode=Ce,xe===t)break e;case Ce:de.mode=ke;case ke:if(lt>=6&&Be>=258){ve.next_out=Ze,ve.avail_out=Be,ve.next_in=ne,ve.avail_in=lt,de.hold=$e,de.bits=rt,(0,g.default)(ve,ft),Ze=ve.next_out,Qe=ve.output,Be=ve.avail_out,ne=ve.next_in,je=ve.input,lt=ve.avail_in,$e=de.hold,rt=de.bits,de.mode===k&&(de.back=-1);break}for(de.back=0;!(yt=de.lencode[$e&(1<<de.lenbits)-1],pt=yt>>>24,jt=yt>>>16&255,Bt=yt&65535,pt<=rt);){if(lt===0)break e;lt--,$e+=je[ne++]<<rt,rt+=8}if(jt&&(jt&240)===0){for(gt=pt,Ht=jt,Ut=Bt;!(yt=de.lencode[Ut+(($e&(1<<gt+Ht)-1)>>gt)],pt=yt>>>24,jt=yt>>>16&255,Bt=yt&65535,gt+pt<=rt);){if(lt===0)break e;lt--,$e+=je[ne++]<<rt,rt+=8}$e>>>=gt,rt-=gt,de.back+=gt}if($e>>>=pt,rt-=pt,de.back+=pt,de.length=Bt,jt===0){de.mode=me;break}if(jt&32){de.back=-1,de.mode=k;break}if(jt&64){ve.msg="invalid literal/length code",de.mode=fe;break}de.extra=jt&15,de.mode=te;case te:if(de.extra){for(qt=de.extra;rt<qt;){if(lt===0)break e;lt--,$e+=je[ne++]<<rt,rt+=8}de.length+=$e&(1<<de.extra)-1,$e>>>=de.extra,rt-=de.extra,de.back+=de.extra}de.was=de.length,de.mode=Re;case Re:for(;!(yt=de.distcode[$e&(1<<de.distbits)-1],pt=yt>>>24,jt=yt>>>16&255,Bt=yt&65535,pt<=rt);){if(lt===0)break e;lt--,$e+=je[ne++]<<rt,rt+=8}if((jt&240)===0){for(gt=pt,Ht=jt,Ut=Bt;!(yt=de.distcode[Ut+(($e&(1<<gt+Ht)-1)>>gt)],pt=yt>>>24,jt=yt>>>16&255,Bt=yt&65535,gt+pt<=rt);){if(lt===0)break e;lt--,$e+=je[ne++]<<rt,rt+=8}$e>>>=gt,rt-=gt,de.back+=gt}if($e>>>=pt,rt-=pt,de.back+=pt,jt&64){ve.msg="invalid distance code",de.mode=fe;break}de.offset=Bt,de.extra=jt&15,de.mode=Te;case Te:if(de.extra){for(qt=de.extra;rt<qt;){if(lt===0)break e;lt--,$e+=je[ne++]<<rt,rt+=8}de.offset+=$e&(1<<de.extra)-1,$e>>>=de.extra,rt-=de.extra,de.back+=de.extra}if(de.offset>de.dmax){ve.msg="invalid distance too far back",de.mode=fe;break}de.mode=pe;case pe:if(Be===0)break e;if(st=ft-Be,de.offset>st){if(st=de.offset-st,st>de.whave&&de.sane){ve.msg="invalid distance too far back",de.mode=fe;break}st>de.wnext?(st-=de.wnext,Ne=de.wsize-st):Ne=de.wnext-st,st>de.length&&(st=de.length),Ge=de.window}else Ge=Qe,Ne=Ze-de.offset,st=de.length;st>Be&&(st=Be),Be-=st,de.length-=st;do Qe[Ze++]=Ge[Ne++];while(--st);de.length===0&&(de.mode=ke);break;case me:if(Be===0)break e;Qe[Ze++]=de.length,Be--,de.mode=ke;break;case se:if(de.wrap){for(;rt<32;){if(lt===0)break e;lt--,$e|=je[ne++]<<rt,rt+=8}if(ft-=Be,ve.total_out+=ft,de.total+=ft,ft&&(ve.adler=de.check=de.flags?(0,y.default)(de.check,Qe,ft,Ze-ft):(0,T.default)(de.check,Qe,ft,Ze-ft)),ft=Be,(de.flags?$e:le($e))!==de.check){ve.msg="incorrect data check",de.mode=fe;break}$e=0,rt=0}de.mode=be;case be:if(de.wrap&&de.flags){for(;rt<32;){if(lt===0)break e;lt--,$e+=je[ne++]<<rt,rt+=8}if($e!==(de.total&4294967295)){ve.msg="incorrect length check",de.mode=fe;break}$e=0,rt=0}de.mode=ae;case ae:Wt=c;break e;case fe:Wt=h;break e;case Fe:return u;case ie:default:return f}return ve.next_out=Ze,ve.avail_out=Be,ve.next_in=ne,ve.avail_in=lt,de.hold=$e,de.bits=rt,(de.wsize||ft!==ve.avail_out&&de.mode<fe&&(de.mode<se||xe!==r))&&Oe(ve,ve.output,ve.next_out,ft-ve.avail_out)?(de.mode=Fe,u):(xt-=ve.avail_in,ft-=ve.avail_out,ve.total_in+=xt,ve.total_out+=ft,de.total+=ft,de.wrap&&ft&&(ve.adler=de.check=de.flags?(0,y.default)(de.check,Qe,ft,ve.next_out-ft):(0,T.default)(de.check,Qe,ft,ve.next_out-ft)),ve.data_type=de.bits+(de.last?64:0)+(de.mode===k?128:0)+(de.mode===Ce||de.mode===L?256:0),(xt===0&&ft===0||xe===r)&&Wt===a&&(Wt=E),Wt)}function Je(ve){if(!ve||!ve.state)return f;var xe=ve.state;return xe.window&&(xe.window=null),ve.state=null,a}function Ye(ve,xe){var de;return!ve||!ve.state?f:(de=ve.state,(de.wrap&2)===0?f:(de.head=xe,xe.done=!1,a))}function Pe(ve,xe){var de=xe.length,je,Qe,ne;return!ve||!ve.state?f:(je=ve.state,je.wrap!==0&&je.mode!==X?f:je.mode===X&&(Qe=1,Qe=(0,T.default)(Qe,xe,de,0),Qe!==je.check)?h:(ne=Oe(ve,xe,de,de),ne?(je.mode=Fe,u):(je.havedict=1,a)))}var He="pako inflate (from Nodeca project)";H.inflateInfo=He},"f+oW":function(j,H){j.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAABaCAYAAAA4qEECAAABz0lEQVR4Xu3csU7DQBRE0V1+LNCn5DNT0mN+DCNoQzNjfBVWl/o9T3wYNiiyMq+3fR/+nC4whT7d+CdAaMZZaMhZaKEpASjHM1poSACKsdFCQwJQjI0WGhKAYmy00JAAFGOjhYYEoBgbLTQkAMXYaKEhASjGRgsNCUAxNlpoSACKsdFCQwJQjI0WGhKAYmz0YtDb2+t8ge4pirne9vcxxnO0VAxTjRYaeppUaAq6+GsjV5Y5Oki0h8yizuiHvHnyRQkNaQstNCQAxdhooSEBKMZGCw0JQDE2ejHobezj49A9PY19fI556Bq/Lc9x8dO7P1e9v6AfkwLI3xHLQR8+Os6CX+zoOIvp31zX/zqgX5XQQkMCUIyNFhoSgGJstNCQABRjo4WGBKAYqtEbdD9tzDIP0PhIGPVImE+TMt9NaqOhRrdn5zJ71JvhMmDtjQjdyoV7Qodg7bjQrVy4J3QI1o4L3cqFe0KHYO240K1cuCd0CNaOC93KhXtCh2DtuNCtXLgndAjWjgvdyoV7Qodg7bjQrVy4J3QI1o4L3cqFe0KHYO240K1cuCd0CNaOC93KhXtCh2DtuNCtXLgndAjWjgvdyoV7Qodg7bjQrVy49wXyQzzmd6RVpQAAAABJRU5ErkJggg=="},fAei:function(j,H,b){"use strict";b.d(H,"a",function(){return h.a});var I=b("rePB"),v=b("VTBJ"),T=b("KQm4"),y=b("1OyB"),g=b("vuIU"),s=b("Ji7U"),_=b("LK+K"),p=b("q1tI"),e=b("4IlW"),o=b("Kwbf"),n=b("TSYQ"),l=b.n(n),r=b("sboe"),i=b("OZM5"),t=b("815F"),a=b("ODXe"),c=b("Ff2n"),d=b("+nKL"),f=b("8XRh"),h=b("WaYH"),u=function(Ce,ke){var te=Ce.className,Re=Ce.style,Te=Ce.motion,pe=Ce.motionNodes,me=Ce.motionType,se=Ce.onMotionStart,be=Ce.onMotionEnd,ae=Ce.active,fe=Ce.treeNodeRequiredProps,Fe=Object(c.a)(Ce,["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"]),ie=p.useState(!0),q=Object(a.a)(ie,2),Q=q[0],Y=q[1],oe=p.useContext(r.a),le=oe.prefixCls,Ee=p.useRef(!1),Le=function(){Ee.current||be(),Ee.current=!0};return Object(p.useEffect)(function(){pe&&me==="hide"&&Q&&Y(!1)},[pe]),Object(p.useEffect)(function(){return pe&&se(),function(){pe&&Le()}},[]),pe?p.createElement(f.default,Object.assign({ref:ke,visible:Q},Te,{motionAppear:me==="show",onAppearEnd:Le,onLeaveEnd:Le}),function(ge,De){var _e=ge.className,Xe=ge.style;return p.createElement("div",{ref:De,className:l()("".concat(le,"-treenode-motion"),_e),style:Xe},pe.map(function(tt){var ze=tt.data,Me=ze.key,Et=Object(c.a)(ze,["key"]),Oe=tt.isStart,Ve=tt.isEnd;delete Et.children;var Je=Object(t.f)(Me,fe);return p.createElement(h.a,Object.assign({},Et,Je,{active:ae,data:tt.data,key:Me,isStart:Oe,isEnd:Ve}))}))}):p.createElement(h.a,Object.assign({domRef:ke,className:te,style:Re},Fe,{active:ae}))};u.displayName="MotionTreeNode";var E=p.forwardRef(u),x=E;function O(){var he=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],ke=he.length,te=Ce.length;if(Math.abs(ke-te)!==1)return{add:!1,key:null};function Re(Te,pe){var me=new Map;Te.forEach(function(be){me.set(be,!0)});var se=pe.filter(function(be){return!me.has(be)});return se.length===1?se[0]:null}return ke<te?{add:!0,key:Re(he,Ce)}:{add:!1,key:Re(Ce,he)}}function C(he,Ce,ke){var te=he.findIndex(function(me){var se=me.data;return se.key===ke}),Re=he[te+1],Te=Ce.findIndex(function(me){var se=me.data;return se.key===ke});if(Re){var pe=Ce.findIndex(function(me){var se=me.data;return se.key===Re.data.key});return Ce.slice(Te+1,pe)}return Ce.slice(Te+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()),D={key:A},M={key:A,level:0,index:0,pos:"0",node:D},N={parent:null,children:[],pos:M.pos,data:D,isStart:[],isEnd:[]};function P(he,Ce,ke,te){return Ce===!1||!ke?he:he.slice(0,Math.ceil(ke/te)+1)}function z(he){var Ce=he.data.key,ke=he.pos;return Object(t.e)(Ce,ke)}function X(he){for(var Ce=String(he.data.key),ke=he;ke.parent;)ke=ke.parent,Ce="".concat(ke.data.key," > ").concat(Ce);return Ce}var k=function(Ce,ke){var te=Ce.prefixCls,Re=Ce.data,Te=Ce.selectable,pe=Ce.checkable,me=Ce.expandedKeys,se=Ce.selectedKeys,be=Ce.checkedKeys,ae=Ce.loadedKeys,fe=Ce.loadingKeys,Fe=Ce.halfCheckedKeys,ie=Ce.keyEntities,q=Ce.disabled,Q=Ce.dragging,Y=Ce.dragOverNodeKey,oe=Ce.dropPosition,le=Ce.motion,Ee=Ce.height,Le=Ce.itemHeight,ge=Ce.virtual,De=Ce.focusable,_e=Ce.activeItem,Xe=Ce.focused,tt=Ce.tabIndex,ze=Ce.onKeyDown,Me=Ce.onFocus,Et=Ce.onBlur,Oe=Ce.onActiveChange,Ve=Ce.onListChangeStart,Je=Ce.onListChangeEnd,Ye=Object(c.a)(Ce,["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"]),Pe=p.useRef(null);p.useImperativeHandle(ke,function(){return{scrollTo:function(Nt){Pe.current.scrollTo(Nt)}}});var He=p.useState(me),ve=Object(a.a)(He,2),xe=ve[0],de=ve[1],je=p.useState(Re),Qe=Object(a.a)(je,2),ne=Qe[0],Ze=Qe[1],lt=p.useState(Re),Be=Object(a.a)(lt,2),$e=Be[0],rt=Be[1],xt=p.useState([]),ft=Object(a.a)(xt,2),st=ft[0],Ne=ft[1],Ge=p.useState(null),yt=Object(a.a)(Ge,2),pt=yt[0],jt=yt[1];function Bt(){Ze(Re),rt(Re),Ne([]),jt(null),Je()}p.useEffect(function(){de(me);var Ut=O(xe,me);if(Ut.key!==null)if(Ut.add){var Nt=ne.findIndex(function(qn){var $t=qn.data.key;return $t===Ut.key}),Wt=P(C(ne,Re,Ut.key),ge,Ee,Le),Qt=ne.slice();Qt.splice(Nt+1,0,N),rt(Qt),Ne(Wt),jt("show")}else{var pn=Re.findIndex(function(qn){var $t=qn.data.key;return $t===Ut.key}),qt=P(C(Re,ne,Ut.key),ge,Ee,Le),en=Re.slice();en.splice(pn+1,0,N),rt(en),Ne(qt),jt("hide")}else ne!==Re&&(Ze(Re),rt(Re))},[me,Re]),p.useEffect(function(){Q||Bt()},[Q]);var gt=le?$e:Re,Ht={expandedKeys:me,selectedKeys:se,loadedKeys:ae,loadingKeys:fe,checkedKeys:be,halfCheckedKeys:Fe,dragOverNodeKey:Y,dropPosition:oe,keyEntities:ie};return p.createElement(p.Fragment,null,Xe&&_e&&p.createElement("span",{style:w,"aria-live":"assertive"},X(_e)),p.createElement("div",{role:"tree"},p.createElement("input",{style:w,disabled:De===!1||q,tabIndex:De!==!1?tt:null,onKeyDown:ze,onFocus:Me,onBlur:Et,value:"",onChange:S})),p.createElement(d.a,Object.assign({},Ye,{data:gt,itemKey:z,height:Ee,fullHeight:!1,virtual:ge,itemHeight:Le,prefixCls:"".concat(te,"-list"),ref:Pe}),function(Ut){var Nt=Ut.pos,Wt=Ut.data,Qt=Wt.key,pn=Object(c.a)(Wt,["key"]),qt=Ut.isStart,en=Ut.isEnd,qn=Object(t.e)(Qt,Nt);delete pn.children;var $t=Object(t.f)(qn,Ht);return p.createElement(x,Object.assign({},pn,$t,{active:_e&&Qt===_e.data.key,pos:Nt,data:Ut.data,isStart:qt,isEnd:en,motion:le,motionNodes:Qt===A?st:null,motionType:pt,onMotionStart:Ve,onMotionEnd:Bt,treeNodeRequiredProps:Ht,onMouseMove:function(){Oe(null)}}))}))},F=p.forwardRef(k);F.displayName="NodeList";var U=F,L=b("NvD2"),B=function(he){Object(s.a)(ke,he);var Ce=Object(_.a)(ke);function ke(){var te;return Object(y.a)(this,ke),te=Ce.apply(this,arguments),te.destroyed=!1,te.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},te.listRef=p.createRef(),te.onNodeDragStart=function(Re,Te){var pe=te.state,me=pe.expandedKeys,se=pe.keyEntities,be=te.props.onDragStart,ae=Te.props.eventKey;te.dragNode=Te;var fe=Object(i.b)(me,ae);te.setState({dragging:!0,dragNodesKeys:Object(i.g)(ae,se)}),te.setExpandedKeys(fe),be&&be({event:Re,node:Object(t.b)(Te.props)})},te.onNodeDragEnter=function(Re,Te){var pe=te.state,me=pe.expandedKeys,se=pe.keyEntities,be=pe.dragNodesKeys,ae=te.props.onDragEnter,fe=Te.props,Fe=fe.pos,ie=fe.eventKey;if(!te.dragNode||be.indexOf(ie)!==-1)return;var q=Object(i.c)(Re,Te);if(te.dragNode.props.eventKey===ie&&q===0){te.setState({dragOverNodeKey:"",dropPosition:null});return}setTimeout(function(){te.setState({dragOverNodeKey:ie,dropPosition:q}),te.delayedDragEnterLogic||(te.delayedDragEnterLogic={}),Object.keys(te.delayedDragEnterLogic).forEach(function(Q){clearTimeout(te.delayedDragEnterLogic[Q])}),te.delayedDragEnterLogic[Fe]=window.setTimeout(function(){if(!te.state.dragging)return;var Q=Object(T.a)(me),Y=se[ie];Y&&(Y.children||[]).length&&(Q=Object(i.a)(me,ie)),"expandedKeys"in te.props||te.setExpandedKeys(Q),ae&&ae({event:Re,node:Object(t.b)(Te.props),expandedKeys:Q})},400)},0)},te.onNodeDragOver=function(Re,Te){var pe=te.state.dragNodesKeys,me=te.props.onDragOver,se=Te.props.eventKey;if(pe.indexOf(se)!==-1)return;if(te.dragNode&&se===te.state.dragOverNodeKey){var be=Object(i.c)(Re,Te);if(be===te.state.dropPosition)return;te.setState({dropPosition:be})}me&&me({event:Re,node:Object(t.b)(Te.props)})},te.onNodeDragLeave=function(Re,Te){var pe=te.props.onDragLeave;te.setState({dragOverNodeKey:""}),pe&&pe({event:Re,node:Object(t.b)(Te.props)})},te.onNodeDragEnd=function(Re,Te){var pe=te.props.onDragEnd;te.setState({dragOverNodeKey:""}),te.cleanDragState(),pe&&pe({event:Re,node:Object(t.b)(Te.props)}),te.dragNode=null},te.onNodeDrop=function(Re,Te){var pe=te.state,me=pe.dragNodesKeys,se=me===void 0?[]:me,be=pe.dropPosition,ae=te.props.onDrop,fe=Te.props,Fe=fe.eventKey,ie=fe.pos;if(te.setState({dragOverNodeKey:""}),te.cleanDragState(),se.indexOf(Fe)!==-1){Object(o.a)(!1,"Can not drop to dragNode(include it's children node)");return}var q=Object(i.k)(ie),Q={event:Re,node:Object(t.b)(Te.props),dragNode:te.dragNode?Object(t.b)(te.dragNode.props):null,dragNodesKeys:se.slice(),dropPosition:be+Number(q[q.length-1]),dropToGap:!1};be!==0&&(Q.dropToGap=!0),ae&&ae(Q),te.dragNode=null},te.cleanDragState=function(){var Re=te.state.dragging;Re&&te.setState({dragging:!1})},te.onNodeClick=function(Re,Te){var pe=te.props.onClick;pe&&pe(Re,Te)},te.onNodeDoubleClick=function(Re,Te){var pe=te.props.onDoubleClick;pe&&pe(Re,Te)},te.onNodeSelect=function(Re,Te){var pe=te.state.selectedKeys,me=te.state.keyEntities,se=te.props,be=se.onSelect,ae=se.multiple,fe=Te.selected,Fe=Te.key,ie=!fe;ie?ae?pe=Object(i.a)(pe,Fe):pe=[Fe]:pe=Object(i.b)(pe,Fe);var q=pe.map(function(Q){var Y=me[Q];return Y?Y.node:null}).filter(function(Q){return Q});te.setUncontrolledState({selectedKeys:pe}),be&&be(pe,{event:"select",selected:ie,node:Te,selectedNodes:q,nativeEvent:Re.nativeEvent})},te.onNodeCheck=function(Re,Te,pe){var me=te.state,se=me.keyEntities,be=me.checkedKeys,ae=me.halfCheckedKeys,fe=te.props,Fe=fe.checkStrictly,ie=fe.onCheck,q=Te.key,Q,Y={event:"check",node:Te,checked:pe,nativeEvent:Re.nativeEvent};if(Fe){var oe=pe?Object(i.a)(be,q):Object(i.b)(be,q),le=Object(i.b)(ae,q);Q={checked:oe,halfChecked:le},Y.checkedNodes=oe.map(function(Xe){return se[Xe]}).filter(function(Xe){return Xe}).map(function(Xe){return Xe.node}),te.setUncontrolledState({checkedKeys:oe})}else{var Ee=Object(L.a)([].concat(Object(T.a)(be),[q]),!0,se),Le=Ee.checkedKeys,ge=Ee.halfCheckedKeys;if(!pe){var De=new Set(Le);De.delete(q);var _e=Object(L.a)(Array.from(De),{checked:!1,halfCheckedKeys:ge},se);Le=_e.checkedKeys,ge=_e.halfCheckedKeys}Q=Le,Y.checkedNodes=[],Y.checkedNodesPositions=[],Y.halfCheckedKeys=ge,Le.forEach(function(Xe){var tt=se[Xe];if(!tt)return;var ze=tt.node,Me=tt.pos;Y.checkedNodes.push(ze),Y.checkedNodesPositions.push({node:ze,pos:Me})}),te.setUncontrolledState({checkedKeys:Le},!1,{halfCheckedKeys:ge})}ie&&ie(Q,Y)},te.onNodeLoad=function(Re){return new Promise(function(Te){te.setState(function(pe){var me=pe.loadedKeys,se=me===void 0?[]:me,be=pe.loadingKeys,ae=be===void 0?[]:be,fe=te.props,Fe=fe.loadData,ie=fe.onLoad,q=Re.key;if(!Fe||se.indexOf(q)!==-1||ae.indexOf(q)!==-1)return{};var Q=Fe(Re);return Q.then(function(){var Y=te.state,oe=Y.loadedKeys,le=Y.loadingKeys,Ee=Object(i.a)(oe,q),Le=Object(i.b)(le,q);ie&&ie(Ee,{event:"load",node:Re}),te.setUncontrolledState({loadedKeys:Ee}),te.setState({loadingKeys:Le}),Te()}),{loadingKeys:Object(i.a)(ae,q)}})})},te.onNodeMouseEnter=function(Re,Te){var pe=te.props.onMouseEnter;pe&&pe({event:Re,node:Te})},te.onNodeMouseLeave=function(Re,Te){var pe=te.props.onMouseLeave;pe&&pe({event:Re,node:Te})},te.onNodeContextMenu=function(Re,Te){var pe=te.props.onRightClick;pe&&(Re.preventDefault(),pe({event:Re,node:Te}))},te.onFocus=function(){var Re=te.props.onFocus;te.setState({focused:!0}),Re&&Re.apply(void 0,arguments)},te.onBlur=function(){var Re=te.props.onBlur;te.setState({focused:!1}),te.onActiveChange(null),Re&&Re.apply(void 0,arguments)},te.getTreeNodeRequiredProps=function(){var Re=te.state,Te=Re.expandedKeys,pe=Re.selectedKeys,me=Re.loadedKeys,se=Re.loadingKeys,be=Re.checkedKeys,ae=Re.halfCheckedKeys,fe=Re.dragOverNodeKey,Fe=Re.dropPosition,ie=Re.keyEntities;return{expandedKeys:Te||[],selectedKeys:pe||[],loadedKeys:me||[],loadingKeys:se||[],checkedKeys:be||[],halfCheckedKeys:ae||[],dragOverNodeKey:fe,dropPosition:Fe,keyEntities:ie}},te.setExpandedKeys=function(Re){var Te=te.state.treeData,pe=Object(t.d)(Te,Re);te.setUncontrolledState({expandedKeys:Re,flattenNodes:pe},!0)},te.onNodeExpand=function(Re,Te){var pe=te.state.expandedKeys,me=te.state.listChanging,se=te.props,be=se.onExpand,ae=se.loadData,fe=Te.key,Fe=Te.expanded;if(me)return;var ie=pe.indexOf(fe),q=!Fe;if(Object(o.a)(Fe&&ie!==-1||!Fe&&ie===-1,"Expand state not sync with index check"),q?pe=Object(i.a)(pe,fe):pe=Object(i.b)(pe,fe),te.setExpandedKeys(pe),be&&be(pe,{node:Te,expanded:q,nativeEvent:Re.nativeEvent}),q&&ae){var Q=te.onNodeLoad(Te);Q&&Q.then(function(){var Y=Object(t.d)(te.state.treeData,pe);te.setUncontrolledState({flattenNodes:Y})})}},te.onListChangeStart=function(){te.setUncontrolledState({listChanging:!0})},te.onListChangeEnd=function(){setTimeout(function(){te.setUncontrolledState({listChanging:!1})})},te.onActiveChange=function(Re){var Te=te.state.activeKey,pe=te.props.onActiveChange;if(Te===Re)return;te.setState({activeKey:Re}),Re!==null&&te.scrollTo({key:Re}),pe&&pe(Re)},te.getActiveItem=function(){var Re=te.state,Te=Re.activeKey,pe=Re.flattenNodes;return Te===null?null:pe.find(function(me){var se=me.data.key;return se===Te})||null},te.offsetActiveKey=function(Re){var Te=te.state,pe=Te.flattenNodes,me=Te.activeKey,se=pe.findIndex(function(fe){var Fe=fe.data.key;return Fe===me});se===-1&&Re<0&&(se=pe.length),se=(se+Re+pe.length)%pe.length;var be=pe[se];if(be){var ae=be.data.key;te.onActiveChange(ae)}else te.onActiveChange(null)},te.onKeyDown=function(Re){var Te=te.state,pe=Te.activeKey,me=Te.expandedKeys,se=Te.checkedKeys,be=te.props,ae=be.onKeyDown,fe=be.checkable,Fe=be.selectable;switch(Re.which){case e.a.UP:{te.offsetActiveKey(-1),Re.preventDefault();break}case e.a.DOWN:{te.offsetActiveKey(1),Re.preventDefault();break}}var ie=te.getActiveItem();if(ie&&ie.data){var q=te.getTreeNodeRequiredProps(),Q=ie.data.isLeaf===!1||!!(ie.data.children||[]).length,Y=Object(t.b)(Object(v.a)(Object(v.a)({},Object(t.f)(pe,q)),{},{data:ie.data,active:!0}));switch(Re.which){case e.a.LEFT:{Q&&me.includes(pe)?te.onNodeExpand({},Y):ie.parent&&te.onActiveChange(ie.parent.data.key),Re.preventDefault();break}case e.a.RIGHT:{Q&&!me.includes(pe)?te.onNodeExpand({},Y):ie.children&&ie.children.length&&te.onActiveChange(ie.children[0].data.key),Re.preventDefault();break}case e.a.ENTER:case e.a.SPACE:{fe&&!Y.disabled&&Y.checkable!==!1&&!Y.disableCheckbox?te.onNodeCheck({},Y,!se.includes(pe)):!fe&&Fe&&!Y.disabled&&Y.selectable!==!1&&te.onNodeSelect({},Y);break}}}ae&&ae(Re)},te.setUncontrolledState=function(Re){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,pe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(te.destroyed)return;var me=!1,se=!0,be={};Object.keys(Re).forEach(function(ae){if(ae in te.props){se=!1;return}me=!0,be[ae]=Re[ae]}),me&&(!Te||se)&&te.setState(Object(v.a)(Object(v.a)({},be),pe))},te.scrollTo=function(Re){te.listRef.current.scrollTo(Re)},te}return Object(g.a)(ke,[{key:"componentWillUnmount",value:function(){this.destroyed=!0}},{key:"render",value:function(){var Re,Te=this.state,pe=Te.focused,me=Te.flattenNodes,se=Te.keyEntities,be=Te.dragging,ae=Te.activeKey,fe=this.props,Fe=fe.prefixCls,ie=fe.className,q=fe.style,Q=fe.showLine,Y=fe.focusable,oe=fe.tabIndex,le=oe===void 0?0:oe,Ee=fe.selectable,Le=fe.showIcon,ge=fe.icon,De=fe.switcherIcon,_e=fe.draggable,Xe=fe.checkable,tt=fe.checkStrictly,ze=fe.disabled,Me=fe.motion,Et=fe.loadData,Oe=fe.filterTreeNode,Ve=fe.height,Je=fe.itemHeight,Ye=fe.virtual,Pe=fe.titleRender,He=fe.onContextMenu,ve=Object(i.f)(this.props);return p.createElement(r.a.Provider,{value:{prefixCls:Fe,selectable:Ee,showIcon:Le,icon:ge,switcherIcon:De,draggable:_e,checkable:Xe,checkStrictly:tt,disabled:ze,keyEntities:se,loadData:Et,filterTreeNode:Oe,titleRender:Pe,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:l()(Fe,ie,(Re={},Object(I.a)(Re,"".concat(Fe,"-show-line"),Q),Object(I.a)(Re,"".concat(Fe,"-focused"),pe),Object(I.a)(Re,"".concat(Fe,"-active-focused"),ae!==null),Re))},p.createElement(U,Object.assign({ref:this.listRef,prefixCls:Fe,style:q,data:me,disabled:ze,selectable:Ee,checkable:!!Xe,motion:Me,dragging:be,height:Ve,itemHeight:Je,virtual:Ye,focusable:Y,focused:pe,tabIndex:le,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:He},this.getTreeNodeRequiredProps(),ve))))}}],[{key:"getDerivedStateFromProps",value:function(Re,Te){var pe=Te.prevProps,me={prevProps:Re};function se(ge){return!pe&&ge in Re||pe&&pe[ge]!==Re[ge]}var be;if(se("treeData")?be=Re.treeData:se("children")&&(Object(o.a)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),be=Object(t.c)(Re.children)),be){me.treeData=be;var ae=Object(t.a)(be);me.keyEntities=Object(v.a)(Object(I.a)({},A,M),ae.keyEntities)}var fe=me.keyEntities||Te.keyEntities;if(se("expandedKeys")||pe&&se("autoExpandParent"))me.expandedKeys=Re.autoExpandParent||!pe&&Re.defaultExpandParent?Object(i.e)(Re.expandedKeys,fe):Re.expandedKeys;else if(!pe&&Re.defaultExpandAll){var Fe=Object(v.a)({},fe);delete Fe[A],me.expandedKeys=Object.keys(Fe).map(function(ge){return Fe[ge].key})}else!pe&&Re.defaultExpandedKeys&&(me.expandedKeys=Re.autoExpandParent||Re.defaultExpandParent?Object(i.e)(Re.defaultExpandedKeys,fe):Re.defaultExpandedKeys);if(me.expandedKeys||delete me.expandedKeys,be||me.expandedKeys){var ie=Object(t.d)(be||Te.treeData,me.expandedKeys||Te.expandedKeys);me.flattenNodes=ie}if(Re.selectable&&(se("selectedKeys")?me.selectedKeys=Object(i.d)(Re.selectedKeys,Re):!pe&&Re.defaultSelectedKeys&&(me.selectedKeys=Object(i.d)(Re.defaultSelectedKeys,Re))),Re.checkable){var q;if(se("checkedKeys")?q=Object(i.j)(Re.checkedKeys)||{}:!pe&&Re.defaultCheckedKeys?q=Object(i.j)(Re.defaultCheckedKeys)||{}:be&&(q=Object(i.j)(Re.checkedKeys)||{checkedKeys:Te.checkedKeys,halfCheckedKeys:Te.halfCheckedKeys}),q){var Q=q,Y=Q.checkedKeys,oe=Y===void 0?[]:Y,le=Q.halfCheckedKeys,Ee=le===void 0?[]:le;if(!Re.checkStrictly){var Le=Object(L.a)(oe,!0,fe);oe=Le.checkedKeys,Ee=Le.halfCheckedKeys}me.checkedKeys=oe,me.halfCheckedKeys=Ee}}return se("loadedKeys")&&(me.loadedKeys=Re.loadedKeys),me}}]),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=h.a;var Z=B,re=H.b=Z},fXAG:function(j,H,b){"use strict";b.d(H,"j",function(){return I}),b.d(H,"i",function(){return v}),b.d(H,"k",function(){return T}),b.d(H,"eb",function(){return y}),b.d(H,"o",function(){return g}),b.d(H,"S",function(){return s}),b.d(H,"fb",function(){return _}),b.d(H,"u",function(){return p}),b.d(H,"v",function(){return e}),b.d(H,"cb",function(){return o}),b.d(H,"A",function(){return n}),b.d(H,"m",function(){return l}),b.d(H,"Y",function(){return r}),b.d(H,"s",function(){return i}),b.d(H,"N",function(){return t}),b.d(H,"bb",function(){return a}),b.d(H,"db",function(){return c}),b.d(H,"l",function(){return d}),b.d(H,"Q",function(){return f}),b.d(H,"ab",function(){return h}),b.d(H,"x",function(){return u}),b.d(H,"z",function(){return E}),b.d(H,"X",function(){return x}),b.d(H,"b",function(){return O}),b.d(H,"H",function(){return C}),b.d(H,"a",function(){return w}),b.d(H,"c",function(){return A}),b.d(H,"P",function(){return D}),b.d(H,"g",function(){return M}),b.d(H,"t",function(){return N}),b.d(H,"Z",function(){return P}),b.d(H,"y",function(){return z}),b.d(H,"B",function(){return X}),b.d(H,"f",function(){return k}),b.d(H,"e",function(){return F}),b.d(H,"W",function(){return U}),b.d(H,"h",function(){return L}),b.d(H,"d",function(){return B}),b.d(H,"R",function(){return re}),b.d(H,"n",function(){return he}),b.d(H,"F",function(){return Ce}),b.d(H,"I",function(){return ke}),b.d(H,"D",function(){return te}),b.d(H,"E",function(){return Re}),b.d(H,"C",function(){return Te}),b.d(H,"G",function(){return pe}),b.d(H,"U",function(){return me}),b.d(H,"q",function(){return se}),b.d(H,"r",function(){return be}),b.d(H,"V",function(){return ae}),b.d(H,"T",function(){return fe}),b.d(H,"p",function(){return Fe}),b.d(H,"M",function(){return ie}),b.d(H,"L",function(){return q}),b.d(H,"J",function(){return Q}),b.d(H,"K",function(){return Y}),b.d(H,"O",function(){return oe}),b.d(H,"w",function(){return le});var I="FETCH_TASK_START",v="FETCH_TASK_FAILURE",T="FETCH_TASK_SUCCESS",y="UPDATE_TASK_DATA",g="HIDE_EVALUATE_RESULT",s="SHOW_EVALUATE_RESULT",_="UPDATE_TIMESTRAP",p="MOVE_X",e="MOVE_Y",o="TRIGGER_RIGHT_PANEL_MASK ",n="SET_ACTIVE_INDEX",l="GET_TASK_LIST",r="SHOW_TASK_LIST",i="HIDE_TASK_LIST",t="SET_TASK_STAR",a="TRIGGER_ENLARGE_UNITY3D ",c="TRIGGER_TAB_FIXED ",d="GET_DISCUSSES",f="SHOW_DISCUSSES_LOADING",h="TOP_OR_DOWN_DISCUSS",u="PLUS_DISCUSS",E="SET_ACTION_TYPE",x="SHOW_REWARD_DIALOG",O="CANCEL_REWARD_DIALOG",C="SET_REWARD",w="ACTIVE_DISCUSS_INDEX",S="CREATE_DISCUSS",A="DISABLE_DISCUSS",D="SHOW_ANSWER_LOADING",M="FETCH_ANSWER_INFO",N="HIGH_TIP_MODAL",P="SHOW_TIP_MODAL",z="SELECT_UNLOCK_ANSWER",X="SET_CHOOSE_ANSWERS",k="EVAL_CHOOSE_START",F="EVAL_CHOOSE_END",U="SHOW_REP_loading",L="FETCH_REP_CONTENT",B="EDIT_REP_CONTENT",Z="SET_REP_PATH",re="SHOW_EVALUATE_LOADING",he="HIDE_EVALUATE_LOADING",Ce="SET_EVALUATE_MESSAGE",ke="SET_SHOW_DIR",te="SET_EDITOR_SETTING",Re="SET_EDITOR_THEME",Te="SET_EDITOR_FONTSIZE",pe="SET_REPOS",me="SHOW_PATH_LIST",se="HIDE_PATH_LIST",be="HIDE_PICTURE_VIEW",ae="SHOW_PICTURE_VIEW",fe="SHOW_NOTICE",Fe="HIDE_NOTICE",ie="SET_TAB_INDEX",q="SET_SSH_TABS",Q="SET_SSH_CONFIGDATA",Y="SET_SSH_CONFIGDATAARR",oe="SET_VNC_LOADING ",le="ON_TAB_TO_SPACE "},fcSX:function(j,H,b){"use strict";var I=b("Ff2n"),v=b("1OyB"),T=b("vuIU"),y=b("Ji7U"),g=b("md7G"),s=b("foSv"),_=b("1W/9"),p=b("q1tI"),e=b("rePB"),o=b("JX7q"),n=b("TSYQ"),l=b.n(n),r=b("qx4F"),i=b("4IlW");function t(k){return Array.isArray(k)?k:[k]}var a={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},c=Object.keys(a).filter(function(k){if(typeof document=="undefined")return!1;var F=document.getElementsByTagName("html")[0];return k in(F?F.style:{})})[0],d=a[c];function f(k,F,U,L){k.addEventListener?k.addEventListener(F,U,L):k.attachEvent&&k.attachEvent("on".concat(F),U)}function h(k,F,U,L){k.removeEventListener?k.removeEventListener(F,U,L):k.attachEvent&&k.detachEvent("on".concat(F),U)}function u(k,F){var U=typeof k=="function"?k(F):k;return Array.isArray(U)?U.length===2?U:[U[0],U[1]]:[U]}var E=function(F){return!isNaN(parseFloat(F))&&isFinite(F)},x=!(typeof window!="undefined"&&window.document&&window.document.createElement),O=function k(F,U,L,B){if(!U||U===document||U instanceof Document)return!1;if(U===F.parentNode)return!0;var Z=Math.max(Math.abs(L),Math.abs(B))===Math.abs(B),re=Math.max(Math.abs(L),Math.abs(B))===Math.abs(L),he=U.scrollHeight-U.clientHeight,Ce=U.scrollWidth-U.clientWidth,ke=document.defaultView.getComputedStyle(U),te=ke.overflowY==="auto"||ke.overflowY==="scroll",Re=ke.overflowX==="auto"||ke.overflowX==="scroll",Te=he&&te,pe=Ce&ℜreturn Z&&(!Te||Te&&(U.scrollTop>=he&&B<0||U.scrollTop<=0&&B>0))||re&&(!pe||pe&&(U.scrollLeft>=Ce&&L<0||U.scrollLeft<=0&&L>0))?k(F,U.parentNode,L,B):!1};function C(k){var F=w();return function(){var L=Object(s.a)(k),B;if(F){var Z=Object(s.a)(this).constructor;B=Reflect.construct(L,arguments,Z)}else B=L.apply(this,arguments);return Object(g.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(k){return!1}}var S={},A=function(k){Object(y.a)(U,k);var F=C(U);function U(L){var B;return Object(v.a)(this,U),B=F.call(this,L),B.domFocus=function(){B.dom&&B.dom.focus()},B.removeStartHandler=function(Z){if(Z.touches.length>1)return;B.startPos={x:Z.touches[0].clientX,y:Z.touches[0].clientY}},B.removeMoveHandler=function(Z){if(Z.changedTouches.length>1)return;var re=Z.currentTarget,he=Z.changedTouches[0].clientX-B.startPos.x,Ce=Z.changedTouches[0].clientY-B.startPos.y;(re===B.maskDom||re===B.handlerDom||re===B.contentDom&&O(re,Z.target,he,Ce))&&Z.cancelable&&Z.preventDefault()},B.transitionEnd=function(Z){var re=Z.target;h(re,d,B.transitionEnd),re.style.transition=""},B.onKeyDown=function(Z){if(Z.keyCode===i.a.ESC){var re=B.props.onClose;Z.stopPropagation(),re&&re(Z)}},B.onWrapperTransitionEnd=function(Z){var re=B.props,he=re.open,Ce=re.afterVisibleChange;Z.target===B.contentWrapper&&Z.propertyName.match(/transform$/)&&(B.dom.style.transition="",!he&&B.getCurrentDrawerSome()&&(document.body.style.overflowX="",B.maskDom&&(B.maskDom.style.left="",B.maskDom.style.width="")),Ce&&Ce(!!he))},B.openLevelTransition=function(){var Z=B.props,re=Z.open,he=Z.width,Ce=Z.height,ke=B.getHorizontalBoolAndPlacementName(),te=ke.isHorizontal,Re=ke.placementName,Te=B.contentDom?B.contentDom.getBoundingClientRect()[te?"width":"height"]:0,pe=(te?he:Ce)||Te;B.setLevelAndScrolling(re,Re,pe)},B.setLevelTransform=function(Z,re,he,Ce){var ke=B.props,te=ke.placement,Re=ke.levelMove,Te=ke.duration,pe=ke.ease,me=ke.showMask;B.levelDom.forEach(function(se){se.style.transition="transform ".concat(Te," ").concat(pe),f(se,d,B.transitionEnd);var be=Z?he:0;if(Re){var ae=u(Re,{target:se,open:Z});be=Z?ae[0]:ae[1]||0}var fe=typeof be=="number"?"".concat(be,"px"):be,Fe=te==="left"||te==="top"?fe:"-".concat(fe);Fe=me&&te==="right"&&Ce?"calc(".concat(Fe," + ").concat(Ce,"px)"):Fe,se.style.transform=be?"".concat(re,"(").concat(Fe,")"):""})},B.setLevelAndScrolling=function(Z,re,he){var Ce=B.props.onChange;if(!x){var ke=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?Object(r.a)(!0):0;B.setLevelTransform(Z,re,he,ke),B.toggleScrollingToDrawerAndBody(ke)}Ce&&Ce(Z)},B.toggleScrollingToDrawerAndBody=function(Z){var re=B.props,he=re.getOpenCount,Ce=re.getContainer,ke=re.showMask,te=re.open,Re=Ce&&Ce(),Te=he&&he();if(Re&&Re.parentNode===document.body&&ke){var pe=["touchstart"],me=[document.body,B.maskDom,B.handlerDom,B.contentDom];te&&document.body.style.overflow!=="hidden"?(Z&&B.addScrollingEffect(Z),Te===1&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",me.forEach(function(se,be){if(!se)return;f(se,pe[be]||"touchmove",be?B.removeMoveHandler:B.removeStartHandler,B.passive)})):B.getCurrentDrawerSome()&&(Te||(document.body.style.overflow=""),document.body.style.touchAction="",Z&&B.remScrollingEffect(Z),me.forEach(function(se,be){if(!se)return;h(se,pe[be]||"touchmove",be?B.removeMoveHandler:B.removeStartHandler,B.passive)}))}},B.addScrollingEffect=function(Z){var re=B.props,he=re.placement,Ce=re.duration,ke=re.ease,te=re.getOpenCount,Re=re.switchScrollingEffect,Te=te&&te();Te===1&&Re();var pe="width ".concat(Ce," ").concat(ke),me="transform ".concat(Ce," ").concat(ke);B.dom.style.transition="none";switch(he){case"right":B.dom.style.transform="translateX(-".concat(Z,"px)");break;case"top":case"bottom":B.dom.style.width="calc(100% - ".concat(Z,"px)"),B.dom.style.transform="translateZ(0)";break;default:break}clearTimeout(B.timeout),B.timeout=setTimeout(function(){B.dom&&(B.dom.style.transition="".concat(me,",").concat(pe),B.dom.style.width="",B.dom.style.transform="")})},B.remScrollingEffect=function(Z){var re=B.props,he=re.placement,Ce=re.duration,ke=re.ease,te=re.getOpenCount,Re=re.switchScrollingEffect,Te=te&&te();Te||Re(!0),c&&(document.body.style.overflowX="hidden"),B.dom.style.transition="none";var pe,me="width ".concat(Ce," ").concat(ke),se="transform ".concat(Ce," ").concat(ke);switch(he){case"left":{B.dom.style.width="100%",me="width 0s ".concat(ke," ").concat(Ce);break}case"right":{B.dom.style.transform="translateX(".concat(Z,"px)"),B.dom.style.width="100%",me="width 0s ".concat(ke," ").concat(Ce),B.maskDom&&(B.maskDom.style.left="-".concat(Z,"px"),B.maskDom.style.width="calc(100% + ".concat(Z,"px)"));break}case"top":case"bottom":{B.dom.style.width="calc(100% + ".concat(Z,"px)"),B.dom.style.height="100%",B.dom.style.transform="translateZ(0)",pe="height 0s ".concat(ke," ").concat(Ce);break}default:break}clearTimeout(B.timeout),B.timeout=setTimeout(function(){B.dom&&(B.dom.style.transition="".concat(se,",").concat(pe?"".concat(pe,","):"").concat(me),B.dom.style.transform="",B.dom.style.width="",B.dom.style.height="")})},B.getCurrentDrawerSome=function(){return!Object.keys(S).some(function(Z){return S[Z]})},B.getLevelDom=function(Z){var re=Z.level,he=Z.getContainer;if(x)return;var Ce=he&&he(),ke=Ce?Ce.parentNode:null;if(B.levelDom=[],re==="all"){var te=ke?Array.prototype.slice.call(ke.children):[];te.forEach(function(Re){Re.nodeName!=="SCRIPT"&&Re.nodeName!=="STYLE"&&Re.nodeName!=="LINK"&&Re!==Ce&&B.levelDom.push(Re)})}else re&&t(re).forEach(function(Re){document.querySelectorAll(Re).forEach(function(Te){B.levelDom.push(Te)})})},B.getHorizontalBoolAndPlacementName=function(){var Z=B.props.placement,re=Z==="left"||Z==="right",he="translate".concat(re?"X":"Y");return{isHorizontal:re,placementName:he}},B.state={_self:Object(o.a)(B)},B}return Object(T.a)(U,[{key:"componentDidMount",value:function(){var B=this;if(!x){var Z=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return Z=!0,null}}))}catch(te){}this.passive=Z?{passive:!1}:!1}var re=this.props,he=re.open,Ce=re.getContainer,ke=Ce&&Ce();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 Z=this.props,re=Z.open,he=Z.getContainer,Ce=he&&he();re!==B.open&&(re&&this.domFocus(),Ce&&Ce.parentNode===document.body&&(S[this.drawerId]=!!re),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var B=this.props,Z=B.getOpenCount,re=B.open,he=B.switchScrollingEffect,Ce=typeof Z=="function"&&Z();delete S[this.drawerId],re&&(this.setLevelTransform(!1),document.body.style.touchAction=""),Ce||(document.body.style.overflow="",he(!0))}},{key:"render",value:function(){var B,Z=this,re=this.props,he=re.className,Ce=re.children,ke=re.style,te=re.width,Re=re.height,Te=re.defaultOpen,pe=re.open,me=re.prefixCls,se=re.placement,be=re.level,ae=re.levelMove,fe=re.ease,Fe=re.duration,ie=re.getContainer,q=re.handler,Q=re.onChange,Y=re.afterVisibleChange,oe=re.showMask,le=re.maskClosable,Ee=re.maskStyle,Le=re.onClose,ge=re.onHandleClick,De=re.keyboard,_e=re.getOpenCount,Xe=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"]),ze=this.dom?pe:!1,Me=l()(me,(B={},Object(e.a)(B,"".concat(me,"-").concat(se),!0),Object(e.a)(B,"".concat(me,"-open"),ze),Object(e.a)(B,he||"",!!he),Object(e.a)(B,"no-mask",!oe),B)),Et=this.getHorizontalBoolAndPlacementName(),Oe=Et.placementName,Ve=se==="left"||se==="top"?"-100%":"100%",Je=ze?"":"".concat(Oe,"(").concat(Ve,")"),Ye=q&&p.cloneElement(q,{onClick:function(He){q.props.onClick&&q.props.onClick(),ge&&ge(He)},ref:function(He){Z.handlerDom=He}});return p.createElement("div",Object.assign({},tt,{tabIndex:-1,className:Me,style:ke,ref:function(He){Z.dom=He},onKeyDown:ze&&De?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),oe&&p.createElement("div",{className:"".concat(me,"-mask"),onClick:le?Le:void 0,style:Ee,ref:function(He){Z.maskDom=He}}),p.createElement("div",{className:"".concat(me,"-content-wrapper"),style:{transform:Je,msTransform:Je,width:E(te)?"".concat(te,"px"):te,height:E(Re)?"".concat(Re,"px"):Re},ref:function(He){Z.contentWrapper=He}},p.createElement("div",{className:"".concat(me,"-content"),ref:function(He){Z.contentDom=He},onTouchStart:ze&&oe?this.removeStartHandler:void 0,onTouchMove:ze&&oe?this.removeMoveHandler:void 0},Ce),Ye))}}],[{key:"getDerivedStateFromProps",value:function(B,Z){var re=Z.prevProps,he=Z._self,Ce={prevProps:B};if(re!==void 0){var ke=B.placement,te=B.level;ke!==re.placement&&(he.contentDom=null),te!==re.level&&he.getLevelDom(B)}return Ce}}]),U}(p.Component);A.defaultProps={switchScrollingEffect:function(){}};var D=A;function M(k){var F=N();return function(){var L=Object(s.a)(k),B;if(F){var Z=Object(s.a)(this).constructor;B=Reflect.construct(L,arguments,Z)}else B=L.apply(this,arguments);return Object(g.a)(this,B)}}function N(){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(k){return!1}}var P=function(k){Object(y.a)(U,k);var F=M(U);function U(L){var B;Object(v.a)(this,U),B=F.call(this,L),B.onHandleClick=function(re){var he=B.props,Ce=he.onHandleClick,ke=he.open;if(Ce&&Ce(re),typeof ke=="undefined"){var te=B.state.open;B.setState({open:!te})}},B.onClose=function(re){var he=B.props,Ce=he.onClose,ke=he.open;Ce&&Ce(re),typeof ke=="undefined"&&B.setState({open:!1})};var Z=typeof L.open!="undefined"?L.open:!!L.defaultOpen;return B.state={open:Z},"onMaskClick"in L&&console.warn("`onMaskClick` are removed, please use `onClose` instead."),B}return Object(T.a)(U,[{key:"render",value:function(){var B=this,Z=this.props,re=Z.defaultOpen,he=Z.getContainer,Ce=Z.wrapperClassName,ke=Z.forceRender,te=Z.handler,Re=Object(I.a)(Z,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),Te=this.state.open;if(!he)return p.createElement("div",{className:Ce,ref:function(se){B.dom=se}},p.createElement(D,Object.assign({},Re,{open:Te,handler:te,getContainer:function(){return B.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var pe=!!te||ke;return p.createElement(_.a,{visible:Te,forceRender:pe,getContainer:he,wrapperClassName:Ce},function(me){var se=me.visible,be=me.afterClose,ae=Object(I.a)(me,["visible","afterClose"]);return p.createElement(D,Object.assign({},Re,ae,{open:se!==void 0?se:Te,afterVisibleChange:be!==void 0?be:Re.afterVisibleChange,handler:te,onClose:B.onClose,onHandleClick:B.onHandleClick}))})}}],[{key:"getDerivedStateFromProps",value:function(B,Z){var re=Z.prevProps,he={prevProps:B};return typeof re!="undefined"&&B.open!==re.open&&(he.open=B.open),he}}]),U}(p.Component);P.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 z=P,X=H.a=z},fjLI:function(j,H,b){"use strict";b.d(H,"f",function(){return r}),b.d(H,"b",function(){return i}),b.d(H,"a",function(){return t}),b.d(H,"d",function(){return a}),b.d(H,"e",function(){return c}),b.d(H,"c",function(){return d});var I=b("8HAY"),v=b("Vhoy"),T=b("MI8n"),y=b("JYp7"),g=b("pmY6"),s=b("24hK"),_=b("nnTU"),p=b("T8No"),e=b("Cg/j"),o=b("t9D7"),n=function(f,h,u,E){var x=arguments.length,O=x<3?h:E===null?E=Object.getOwnPropertyDescriptor(h,u):E,C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(f,h,u,E);else for(var w=f.length-1;w>=0;w--)(C=f[w])&&(O=(x<3?C(O):x>3?C(h,u,O):C(h,u))||O);return x>3&&O&&Object.defineProperty(h,u,O),O},l=function(f,h){return function(u,E){h(u,E,f)}};function r(f){return f.command!==void 0}class i{constructor(f){this.id=i._idPool++,this._debugName=f}}i._idPool=0,i.CommandPalette=new i("CommandPalette"),i.EditorContext=new i("EditorContext"),i.SimpleEditorContext=new i("SimpleEditorContext"),i.EditorContextCopy=new i("EditorContextCopy"),i.EditorContextPeek=new i("EditorContextPeek"),i.MenubarEditMenu=new i("MenubarEditMenu"),i.MenubarCopy=new i("MenubarCopy"),i.MenubarGoMenu=new i("MenubarGoMenu"),i.MenubarSelectionMenu=new i("MenubarSelectionMenu"),i.InlineCompletionsActions=new i("InlineCompletionsActions");const t=Object(e.c)("menuService"),a=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new T.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:f=>f===i.CommandPalette}}addCommand(f){return this.addCommands(y.a.single(f))}addCommands(f){for(const h of f)this._commands.set(h.id,h);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(g.i)(()=>{let h=!1;for(const u of f)h=this._commands.delete(u.id)||h;h&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(f){return this._commands.get(f)}getCommands(){const f=new Map;return this._commands.forEach((h,u)=>f.set(u,h)),f}appendMenuItem(f,h){return this.appendMenuItems(y.a.single({id:f,item:h}))}appendMenuItems(f){const h=new Set,u=new s.a;for(const{id:E,item:x}of f){let O=this._menuItems.get(E);O||(O=new s.a,this._menuItems.set(E,O)),u.push(O.push(x)),h.add(E)}return this._onDidChangeMenu.fire(h),Object(g.i)(()=>{if(u.size>0){for(let E of u)E();this._onDidChangeMenu.fire(h),u.clear()}})}getMenuItems(f){let h;return this._menuItems.has(f)?h=[...this._menuItems.get(f)]:h=[],f===i.CommandPalette&&this._appendImplicitItems(h),h}_appendImplicitItems(f){const h=new Set;for(const u of f)r(u)&&(h.add(u.command.id),u.alt&&h.add(u.alt.id));this._commands.forEach((u,E)=>{h.has(E)||f.push({command:u})})}};class c extends I.e{constructor(f,h,u,E){super(`submenuitem.${f.submenu.id}`,typeof f.title=="string"?f.title:f.title.value,[],"submenu");this.item=f,this._menuService=h,this._contextKeyService=u,this._options=E}get actions(){const f=[],h=this._menuService.createMenu(this.item.submenu,this._contextKeyService),u=h.getActions(this._options);h.dispose();for(const[,E]of u)E.length>0&&(f.push(...E),f.push(new I.d));return f.length&&f.pop(),f}}let d=class f{constructor(h,u,E,x,O){var C,w;if(this._commandService=O,this.id=h.id,this.label=(E==null?void 0:E.renderShortTitle)&&h.shortTitle?typeof h.shortTitle=="string"?h.shortTitle:h.shortTitle.value:typeof h.title=="string"?h.title:h.title.value,this.tooltip=(w=typeof h.tooltip=="string"?h.tooltip:(C=h.tooltip)===null||C===void 0?void 0:C.value)!==null&&w!==void 0?w:"",this.enabled=!h.precondition||x.contextMatchesRules(h.precondition),this.checked=void 0,h.toggled){const S=h.toggled.condition?h.toggled:{condition:h.toggled};this.checked=x.contextMatchesRules(S.condition),this.checked&&S.tooltip&&(this.tooltip=typeof S.tooltip=="string"?S.tooltip:S.tooltip.value),S.title&&(this.label=typeof S.title=="string"?S.title:S.title.value)}this.item=h,this.alt=u?new f(u,void 0,E,x,O):void 0,this._options=E,o.d.isThemeIcon(h.icon)&&(this.class=v.a.asClassName(h.icon))}dispose(){}run(...h){var u,E;let x=[];return((u=this._options)===null||u===void 0?void 0:u.arg)&&(x=[...x,this._options.arg]),((E=this._options)===null||E===void 0?void 0:E.shouldForwardArgs)&&(x=[...x,...h]),this._commandService.executeCommand(this.id,...x)}};d=n([l(3,p.b),l(4,_.b)],d)},fxth:function(j,H,b){j.exports={"action-bar-container":"action-bar-container___3Et9N","edit-status":"edit-status___1BgGg","action-bar":"action-bar___Q-6Wi",iconfont:"iconfont___3Ar9E"}},fyJ8:function(j,H,b){"use strict";var I=b("rePB"),v=b("VTBJ"),T=b("Ff2n"),y=b("U8pU"),g=b("q1tI"),s=b.n(g),_=b("TSYQ"),p=b.n(_),e=b("c+Xe"),o=b("sR1s");function n(a){return a&&Object(y.a)(a)==="object"&&!Array.isArray(a)&&!g.isValidElement(a)}function l(a){return typeof a=="string"?!0:Object(e.c)(a)}function r(a,c){var d,f=a.prefixCls,h=a.className,u=a.record,E=a.index,x=a.dataIndex,O=a.render,C=a.children,w=a.component,S=w===void 0?"td":w,A=a.colSpan,D=a.rowSpan,M=a.fixLeft,N=a.fixRight,P=a.firstFixLeft,z=a.lastFixLeft,X=a.firstFixRight,k=a.lastFixRight,F=a.appendNode,U=a.additionalProps,L=U===void 0?{}:U,B=a.ellipsis,Z=a.align,re=a.rowType,he=a.isSticky,Ce="".concat(f,"-cell"),ke,te;if(C)te=C;else{var Re=Object(o.b)(u,x);if(te=Re,O){var Te=O(Re,u,E);n(Te)?(te=Te.children,ke=Te.props):te=Te}}Object(y.a)(te)==="object"&&!Array.isArray(te)&&!g.isValidElement(te)&&(te=null),B&&(z||X)&&(te=g.createElement("span",{className:"".concat(Ce,"-content")},te));var pe=ke||{},me=pe.colSpan,se=pe.rowSpan,be=pe.style,ae=pe.className,fe=Object(T.a)(pe,["colSpan","rowSpan","style","className"]),Fe=me!==void 0?me:A,ie=se!==void 0?se:D;if(Fe===0||ie===0)return null;var q={},Q=typeof M=="number",Y=typeof N=="number";Q&&(q.position="sticky",q.left=M),Y&&(q.position="sticky",q.right=N);var oe={};Z&&(oe.textAlign=Z);var le,Ee=B===!0?{showTitle:!0}:B;Ee&&(Ee.showTitle||re==="header")&&(typeof te=="string"||typeof te=="number"?le=te.toString():g.isValidElement(te)&&typeof te.props.children=="string"&&(le=te.props.children));var Le=Object(v.a)(Object(v.a)(Object(v.a)({title:le},fe),L),{},{colSpan:Fe&&Fe!==1?Fe:null,rowSpan:ie&&ie!==1?ie:null,className:p()(Ce,h,(d={},Object(I.a)(d,"".concat(Ce,"-fix-left"),Q),Object(I.a)(d,"".concat(Ce,"-fix-left-first"),P),Object(I.a)(d,"".concat(Ce,"-fix-left-last"),z),Object(I.a)(d,"".concat(Ce,"-fix-right"),Y),Object(I.a)(d,"".concat(Ce,"-fix-right-first"),X),Object(I.a)(d,"".concat(Ce,"-fix-right-last"),k),Object(I.a)(d,"".concat(Ce,"-ellipsis"),B),Object(I.a)(d,"".concat(Ce,"-with-append"),F),Object(I.a)(d,"".concat(Ce,"-fix-sticky"),(Q||Y)&&he),d),L.className,ae),style:Object(v.a)(Object(v.a)(Object(v.a)(Object(v.a)({},L.style),oe),q),be),ref:l(S)?c:null});return g.createElement(S,Object.assign({},Le),F,te)}var i=g.forwardRef(r);i.displayName="Cell";var t=g.memo(i,function(a,c){return c.shouldCellUpdate?!c.shouldCellUpdate(c.record,a.record):!1});H.a=t},gIYZ:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.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"};H.default=I},gRFJ:function(j,H,b){j.exports=[b("rdUC"),b("ynwM"),b("RELg"),b("DlR+"),b("CrYA"),b("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(j){return j<10?"0"+j:j}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(j){return rx_escapable.lastIndex=0,rx_escapable.test(j)?'"'+j.replace(rx_escapable,function(H){var b=meta[H];return typeof b=="string"?b:"\\u"+("0000"+H.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+j+'"'}function str(j,H){var b,I,v,T,y=gap,g,s=H[j];s&&typeof s=="object"&&typeof s.toJSON=="function"&&(s=s.toJSON(j)),typeof rep=="function"&&(s=rep.call(H,j,s));switch(typeof s){case"string":return quote(s);case"number":return isFinite(s)?String(s):"null";case"boolean":case"null":return String(s);case"object":if(!s)return"null";if(gap+=indent,g=[],Object.prototype.toString.apply(s)==="[object Array]"){for(T=s.length,b=0;b<T;b+=1)g[b]=str(b,s)||"null";return v=g.length===0?"[]":gap?`[
|
|
|
`+gap+g.join(`,
|
|
|
`+gap)+`
|
|
|
`+y+"]":"["+g.join(",")+"]",gap=y,v}if(rep&&typeof rep=="object")for(T=rep.length,b=0;b<T;b+=1)typeof rep[b]=="string"&&(I=rep[b],v=str(I,s),v&&g.push(quote(I)+(gap?": ":":")+v));else for(I in s)Object.prototype.hasOwnProperty.call(s,I)&&(v=str(I,s),v&&g.push(quote(I)+(gap?": ":":")+v));return v=g.length===0?"{}":gap?`{
|
|
|
`+gap+g.join(`,
|
|
|
`+gap)+`
|
|
|
`+y+"}":"{"+g.join(",")+"}",gap=y,v}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(j,H,b){var I;if(gap="",indent="",typeof b=="number")for(I=0;I<b;I+=1)indent+=" ";else typeof b=="string"&&(indent=b);if(rep=H,H&&typeof H!="function"&&(typeof H!="object"||typeof H.length!="number"))throw new Error("JSON.stringify");return str("",{"":j})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(j,H){var b,I,v=j[H];if(v&&typeof v=="object")for(b in v)Object.prototype.hasOwnProperty.call(v,b)&&(I=walk(v,b),I!==void 0?v[b]=I:delete v[b]);return reviver.call(j,H,v)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(j){return"\\u"+("0000"+j.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(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("OLod"))})(this,function(I){return I.mode.ECB=function(){var v=I.lib.BlockCipherMode.extend();return v.Encryptor=v.extend({processBlock:function(T,y){this._cipher.encryptBlock(T,y)}}),v.Decryptor=v.extend({processBlock:function(T,y){this._cipher.decryptBlock(T,y)}}),v}(),I.mode.ECB})},gflZ:function(j,H,b){},gp9y:function(j,H,b){},h78n:function(j,H,b){"use strict";b.d(H,"a",function(){return P});var I=b("q1tI"),v=b.n(I),T=b("TSYQ"),y=b.n(T),g={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},s=function(k){var F=k.map(function(){return Object(I.useRef)()}),U=Object(I.useRef)();return Object(I.useEffect)(function(){var L=Date.now(),B=!1;Object.keys(F).forEach(function(Z){var re=F[Z].current;if(!re)return;B=!0;var he=re.style;he.transitionDuration=".3s, .3s, .3s, .06s",U.current&&L-U.current<100&&(he.transitionDuration="0s, 0s")}),B&&(U.current=Date.now())}),[F]};function _(){return _=Object.assign||function(X){for(var k=1;k<arguments.length;k++){var F=arguments[k];for(var U in F)Object.prototype.hasOwnProperty.call(F,U)&&(X[U]=F[U])}return X},_.apply(this,arguments)}function p(X,k){return r(X)||l(X,k)||o(X,k)||e()}function e(){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 o(X,k){if(!X)return;if(typeof X=="string")return n(X,k);var F=Object.prototype.toString.call(X).slice(8,-1);if(F==="Object"&&X.constructor&&(F=X.constructor.name),F==="Map"||F==="Set")return Array.from(X);if(F==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(F))return n(X,k)}function n(X,k){(k==null||k>X.length)&&(k=X.length);for(var F=0,U=new Array(k);F<k;F++)U[F]=X[F];return U}function l(X,k){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(X)))return;var F=[],U=!0,L=!1,B=void 0;try{for(var Z=X[Symbol.iterator](),re;!(U=(re=Z.next()).done)&&!(F.push(re.value),k&&F.length===k);U=!0);}catch(he){L=!0,B=he}finally{try{!U&&Z.return!=null&&Z.return()}finally{if(L)throw B}}return F}function r(X){if(Array.isArray(X))return X}function i(X,k){if(X==null)return{};var F=t(X,k),U,L;if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(X);for(L=0;L<B.length;L++){if(U=B[L],k.indexOf(U)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(X,U))continue;F[U]=X[U]}}return F}function t(X,k){if(X==null)return{};var F={},U=Object.keys(X),L,B;for(B=0;B<U.length;B++){if(L=U[B],k.indexOf(L)>=0)continue;F[L]=X[L]}return F}var a=function(k){var F=k.className,U=k.percent,L=k.prefixCls,B=k.strokeColor,Z=k.strokeLinecap,re=k.strokeWidth,he=k.style,Ce=k.trailColor,ke=k.trailWidth,te=k.transition,Re=i(k,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete Re.gapPosition;var Te=Array.isArray(U)?U:[U],pe=Array.isArray(B)?B:[B],me=s(Te),se=p(me,1),be=se[0],ae=re/2,fe=100-re/2,Fe="M ".concat(Z==="round"?ae:0,",").concat(ae,`
|
|
|
L `).concat(Z==="round"?fe:100,",").concat(ae),ie="0 0 100 ".concat(re),q=0;return v.a.createElement("svg",_({className:y()("".concat(L,"-line"),F),viewBox:ie,preserveAspectRatio:"none",style:he},Re),v.a.createElement("path",{className:"".concat(L,"-line-trail"),d:Fe,strokeLinecap:Z,stroke:Ce,strokeWidth:ke||re,fillOpacity:"0"}),Te.map(function(Q,Y){var oe={strokeDasharray:"".concat(Q,"px, 100px"),strokeDashoffset:"-".concat(q,"px"),transition:te||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},le=pe[Y]||pe[pe.length-1];return q+=Q,v.a.createElement("path",{key:Y,className:"".concat(L,"-line-path"),d:Fe,strokeLinecap:Z,stroke:le,strokeWidth:re,fillOpacity:"0",ref:be[Y],style:oe})}))};a.defaultProps=g;var c=a;function d(){return d=Object.assign||function(X){for(var k=1;k<arguments.length;k++){var F=arguments[k];for(var U in F)Object.prototype.hasOwnProperty.call(F,U)&&(X[U]=F[U])}return X},d.apply(this,arguments)}function f(X,k){return O(X)||x(X,k)||u(X,k)||h()}function h(){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 u(X,k){if(!X)return;if(typeof X=="string")return E(X,k);var F=Object.prototype.toString.call(X).slice(8,-1);if(F==="Object"&&X.constructor&&(F=X.constructor.name),F==="Map"||F==="Set")return Array.from(X);if(F==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(F))return E(X,k)}function E(X,k){(k==null||k>X.length)&&(k=X.length);for(var F=0,U=new Array(k);F<k;F++)U[F]=X[F];return U}function x(X,k){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(X)))return;var F=[],U=!0,L=!1,B=void 0;try{for(var Z=X[Symbol.iterator](),re;!(U=(re=Z.next()).done)&&!(F.push(re.value),k&&F.length===k);U=!0);}catch(he){L=!0,B=he}finally{try{!U&&Z.return!=null&&Z.return()}finally{if(L)throw B}}return F}function O(X){if(Array.isArray(X))return X}function C(X,k){if(X==null)return{};var F=w(X,k),U,L;if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(X);for(L=0;L<B.length;L++){if(U=B[L],k.indexOf(U)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(X,U))continue;F[U]=X[U]}}return F}function w(X,k){if(X==null)return{};var F={},U=Object.keys(X),L,B;for(B=0;B<U.length;B++){if(L=U[B],k.indexOf(L)>=0)continue;F[L]=X[L]}return F}var S=0;function A(X){return+X.replace("%","")}function D(X){return Array.isArray(X)?X:[X]}function M(X,k,F,U){var L=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,B=arguments.length>5?arguments[5]:void 0,Z=50-U/2,re=0,he=-Z,Ce=0,ke=-2*Z;switch(B){case"left":re=-Z,he=0,Ce=2*Z,ke=0;break;case"right":re=Z,he=0,Ce=-2*Z,ke=0;break;case"bottom":he=Z,ke=2*Z;break;default:}var te="M 50,50 m ".concat(re,",").concat(he,`
|
|
|
a `).concat(Z,",").concat(Z," 0 1 1 ").concat(Ce,",").concat(-ke,`
|
|
|
a `).concat(Z,",").concat(Z," 0 1 1 ").concat(-Ce,",").concat(ke),Re=Math.PI*2*Z,Te={stroke:F,strokeDasharray:"".concat(k/100*(Re-L),"px ").concat(Re,"px"),strokeDashoffset:"-".concat(L/2+X/100*(Re-L),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:te,pathStyle:Te}}var N=function(k){var F=k.prefixCls,U=k.strokeWidth,L=k.trailWidth,B=k.gapDegree,Z=k.gapPosition,re=k.trailColor,he=k.strokeLinecap,Ce=k.style,ke=k.className,te=k.strokeColor,Re=k.percent,Te=C(k,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),pe=Object(I.useMemo)(function(){return S+=1,S},[]),me=M(0,100,re,U,B,Z),se=me.pathString,be=me.pathStyle,ae=D(Re),fe=D(te),Fe=fe.find(function(oe){return Object.prototype.toString.call(oe)==="[object Object]"}),ie=s(ae),q=f(ie,1),Q=q[0],Y=function(){var le=0;return ae.map(function(Ee,Le){var ge=fe[Le]||fe[fe.length-1],De=Object.prototype.toString.call(ge)==="[object Object]"?"url(#".concat(F,"-gradient-").concat(pe,")"):"",_e=M(le,Ee,ge,U,B,Z);return le+=Ee,v.a.createElement("path",{key:Le,className:"".concat(F,"-circle-path"),d:_e.pathString,stroke:De,strokeLinecap:he,strokeWidth:U,opacity:Ee===0?0:1,fillOpacity:"0",style:_e.pathStyle,ref:Q[Le]})})};return v.a.createElement("svg",d({className:y()("".concat(F,"-circle"),ke),viewBox:"0 0 100 100",style:Ce},Te),Fe&&v.a.createElement("defs",null,v.a.createElement("linearGradient",{id:"".concat(F,"-gradient-").concat(pe),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(Fe).sort(function(oe,le){return A(oe)-A(le)}).map(function(oe,le){return v.a.createElement("stop",{key:le,offset:oe,stopColor:Fe[oe]})}))),v.a.createElement("path",{className:"".concat(F,"-circle-trail"),d:se,stroke:re,strokeLinecap:he,strokeWidth:L||U,fillOpacity:"0",style:be}),Y().reverse())};N.defaultProps=g;var P=N,z={Line:c,Circle:P}},hW8S:function(j,H,b){"use strict";b.d(H,"a",function(){return y}),b.d(H,"c",function(){return g}),b.d(H,"b",function(){return s});var I=b("VTBJ"),v=b("Ff2n"),T=b("Kwbf"),y="RC_TABLE_INTERNAL_COL_DEFINE";function g(_){var p=_.expandable,e=Object(v.a)(_,["expandable"]);return"expandable"in _?Object(I.a)(Object(I.a)({},e),p):e}function s(_){return Object.keys(_).reduce(function(p,e){return(e.substr(0,5)==="data-"||e.substr(0,5)==="aria-")&&(p[e]=_[e]),p},{})}},hXwI:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;function I(g,s){if(!(g instanceof s))throw new TypeError("Cannot call a class as a function")}function v(g,s){for(var _=0;_<s.length;_++){var p=s[_];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(g,p.key,p)}}function T(g,s,_){return s&&v(g.prototype,s),_&&v(g,_),g}var y=function(){function g(){I(this,g)}return T(g,[{key:"decodeRect",value:function(_,p,e,o,n,l,r){if(n.rQwait("COPYRECT",4))return!1;var i=n.rQshift16(),t=n.rQshift16();return l.copyImage(i,t,_,p,e,o),!0}}]),g}();H.default=y},i72Y:function(j,H,b){j.exports={selectImage:"selectImage___3j6A8",container:"container___2tvXa"}},iNZB:function(j,H){j.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(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;function I(E,x){if(!(E instanceof x))throw new TypeError("Cannot call a class as a function")}function v(E,x){for(var O=0;O<x.length;O++){var C=x[O];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(E,C.key,C)}}function T(E,x,O){return x&&v(E.prototype,x),O&&v(E,O),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],g=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],s=0,_,p,e,o,n,l;_=1<<16,p=1<<24,e=_|p,o=1<<2,n=1<<10,l=o|n;var r=[e|n,s|s,_|s,e|l,e|o,_|l,s|o,_|s,s|n,e|n,e|l,s|n,p|l,e|o,p|s,s|o,s|l,p|n,p|n,_|n,_|n,e|s,e|s,p|l,_|o,p|o,p|o,_|o,s|s,s|l,_|l,p|s,_|s,e|l,s|o,e|s,e|n,p|s,p|s,s|n,e|o,_|s,_|n,p|o,s|n,s|o,p|l,_|l,e|l,_|o,e|s,p|l,p|o,s|l,_|l,e|n,s|l,p|n,p|n,s|s,_|o,_|n,s|s,e|o];_=1<<20,p=1<<31,e=_|p,o=1<<5,n=1<<15,l=o|n;var i=[e|l,p|n,s|n,_|l,_|s,s|o,e|o,p|l,p|o,e|l,e|n,p|s,p|n,_|s,s|o,e|o,_|n,_|o,p|l,s|s,p|s,s|n,_|l,e|s,_|o,p|o,s|s,_|n,s|l,e|n,e|s,s|l,s|s,_|l,e|o,_|s,p|l,e|s,e|n,s|n,e|s,p|n,s|o,e|l,_|l,s|o,s|n,p|s,s|l,e|n,_|s,p|o,_|o,p|l,p|o,_|o,_|n,s|s,p|n,s|l,p|s,e|o,e|l,_|n];_=1<<17,p=1<<27,e=_|p,o=1<<3,n=1<<9,l=o|n;var t=[s|l,e|n,s|s,e|o,p|n,s|s,_|l,p|n,_|o,p|o,p|o,_|s,e|l,_|o,e|s,s|l,p|s,s|o,e|n,s|n,_|n,e|s,e|o,_|l,p|l,_|n,_|s,p|l,s|o,e|l,s|n,p|s,e|n,p|s,_|o,s|l,_|s,e|n,p|n,s|s,s|n,_|o,e|l,p|n,p|o,s|n,s|s,e|o,p|l,_|s,p|s,e|l,s|o,_|l,_|n,p|o,e|s,p|l,s|l,e|s,_|l,s|o,e|o,_|n];_=1<<13,p=1<<23,e=_|p,o=1<<0,n=1<<7,l=o|n;var a=[e|o,_|l,_|l,s|n,e|n,p|l,p|o,_|o,s|s,e|s,e|s,e|l,s|l,s|s,p|n,p|o,s|o,_|s,p|s,e|o,s|n,p|s,_|o,_|n,p|l,s|o,_|n,p|n,_|s,e|n,e|l,s|l,p|n,p|o,e|s,e|l,s|l,s|s,s|s,e|s,_|n,p|n,p|l,s|o,e|o,_|l,_|l,s|n,e|l,s|l,s|o,_|s,p|o,_|o,e|n,p|l,_|o,_|n,p|s,e|o,s|n,p|s,_|s,e|n];_=1<<25,p=1<<30,e=_|p,o=1<<8,n=1<<19,l=o|n;var c=[s|o,_|l,_|n,e|o,s|n,s|o,p|s,_|n,p|l,s|n,_|o,p|l,e|o,e|n,s|l,p|s,_|s,p|n,p|n,s|s,p|o,e|l,e|l,_|o,e|n,p|o,s|s,e|s,_|l,_|s,e|s,s|l,s|n,e|o,s|o,_|s,p|s,_|n,e|o,p|l,_|o,p|s,e|n,_|l,p|l,s|o,_|s,e|n,e|l,s|l,e|s,e|l,_|n,s|s,p|n,e|s,s|l,_|o,p|o,s|n,s|s,p|n,_|l,p|o];_=1<<22,p=1<<29,e=_|p,o=1<<4,n=1<<14,l=o|n;var d=[p|o,e|s,s|n,e|l,e|s,s|o,e|l,_|s,p|n,_|l,_|s,p|o,_|o,p|n,p|s,s|l,s|s,_|o,p|l,s|n,_|n,p|l,s|o,e|o,e|o,s|s,_|l,e|n,s|l,_|n,e|n,p|s,p|n,s|o,e|o,_|n,e|l,_|s,s|l,p|o,_|s,p|n,p|s,s|l,p|o,e|l,_|n,e|s,_|l,e|n,s|s,e|o,s|o,s|n,e|s,_|l,s|n,_|o,p|l,s|s,e|n,p|s,_|o,p|l];_=1<<21,p=1<<26,e=_|p,o=1<<1,n=1<<11,l=o|n;var f=[_|s,e|o,p|l,s|s,s|n,p|l,_|l,e|n,e|l,_|s,s|s,p|o,s|o,p|s,e|o,s|l,p|n,_|l,_|o,p|n,p|o,e|s,e|n,_|o,e|s,s|n,s|l,e|l,_|n,s|o,p|s,_|n,p|s,_|n,_|s,p|l,p|l,e|o,e|o,s|o,_|o,p|s,p|n,_|s,e|n,s|l,_|l,e|n,s|l,p|o,e|l,e|s,_|n,s|s,s|o,e|l,s|s,_|l,e|s,s|n,p|o,p|n,s|n,_|o];_=1<<18,p=1<<28,e=_|p,o=1<<6,n=1<<12,l=o|n;var h=[p|l,s|n,_|s,e|l,p|s,p|l,s|o,p|s,_|o,e|s,e|l,_|n,e|n,_|l,s|n,s|o,e|s,p|o,p|n,s|l,_|n,_|o,e|o,e|n,s|l,s|s,s|s,e|o,p|o,p|n,_|l,_|s,_|l,_|s,e|n,s|n,s|o,e|o,s|n,_|l,p|n,s|o,p|o,e|s,e|o,p|s,_|s,p|l,s|s,e|l,_|o,p|o,e|s,p|n,p|l,s|s,e|l,_|n,_|n,s|l,s|l,_|o,p|s,e|n],u=function(){function E(x){I(this,E),this.keys=[];for(var O=[],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 D=A&7;O[S]=(x[A>>>3]&1<<D)!==0?1:0}for(var M=0;M<16;++M){var N=M<<1,P=N+1;w[N]=w[P]=0;for(var z=28;z<59;z+=28)for(var X=z-28;X<z;++X){var k=X+g[M];C[X]=k<z?O[k]:O[k-28]}for(var F=0;F<24;++F)C[y[F]]!==0&&(w[N]|=1<<23-F),C[y[F+24]]!==0&&(w[P]|=1<<23-F)}for(var U=0,L=0,B=0;U<16;++U){var Z=w[L++],re=w[L++];this.keys[B]=(Z&16515072)<<6,this.keys[B]|=(Z&4032)<<10,this.keys[B]|=(re&16515072)>>>10,this.keys[B]|=(re&4032)>>>6,++B,this.keys[B]=(Z&258048)<<12,this.keys[B]|=(Z&63)<<16,this.keys[B]|=(re&258048)>>>4,this.keys[B]|=re&63,++B}}return T(E,[{key:"enc8",value:function(O){var C=O.slice(),w=0,S,A,D;S=C[w++]<<24|C[w++]<<16|C[w++]<<8|C[w++],A=C[w++]<<24|C[w++]<<16|C[w++]<<8|C[w++],D=(S>>>4^A)&252645135,A^=D,S^=D<<4,D=(S>>>16^A)&65535,A^=D,S^=D<<16,D=(A>>>2^S)&858993459,S^=D,A^=D<<2,D=(A>>>8^S)&16711935,S^=D,A^=D<<8,A=A<<1|A>>>31&1,D=(S^A)&2863311530,S^=D,A^=D,S=S<<1|S>>>31&1;for(var M=0,N=0;M<8;++M){D=A<<28|A>>>4,D^=this.keys[N++];var P=f[D&63];P|=c[D>>>8&63],P|=t[D>>>16&63],P|=r[D>>>24&63],D=A^this.keys[N++],P|=h[D&63],P|=d[D>>>8&63],P|=a[D>>>16&63],P|=i[D>>>24&63],S^=P,D=S<<28|S>>>4,D^=this.keys[N++],P=f[D&63],P|=c[D>>>8&63],P|=t[D>>>16&63],P|=r[D>>>24&63],D=S^this.keys[N++],P|=h[D&63],P|=d[D>>>8&63],P|=a[D>>>16&63],P|=i[D>>>24&63],A^=P}for(A=A<<31|A>>>1,D=(S^A)&2863311530,S^=D,A^=D,S=S<<31|S>>>1,D=(S>>>8^A)&16711935,A^=D,S^=D<<8,D=(S>>>2^A)&858993459,A^=D,S^=D<<2,D=(A>>>16^S)&65535,S^=D,A^=D<<16,D=(A>>>4^S)&252645135,S^=D,A^=D<<4,D=[A,S],w=0;w<8;w++)C[w]=(D[w>>>2]>>>8*(3-w%4))%256,C[w]<0&&(C[w]+=256);return C}},{key:"encrypt",value:function(O){return this.enc8(O.slice(0,8)).concat(this.enc8(O.slice(8,16)))}}]),E}();H.default=u},ic2d:function(j,H,b){"use strict";b.d(H,"a",function(){return y});var I=b("FWmy"),v=b("746U");class T{constructor(){this.data=new Map}add(g,s){I.a(v.l(g)),I.a(v.k(s)),I.a(!this.data.has(g),"There is already an extension with this id"),this.data.set(g,s)}as(g){return this.data.get(g)||null}}const y=new T},jO9C:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("OLod"))})(this,function(I){return I.pad.Iso97971={pad:function(v,T){v.concat(I.lib.WordArray.create([2147483648],1)),I.pad.ZeroPadding.pad(v,T)},unpad:function(v){I.pad.ZeroPadding.unpad(v),v.sigBytes--}},I.pad.Iso97971})},je13:function(j,H,b){var I=b("5nXd"),v=b("gRFJ"),T=[b("uQRt")];j.exports=I.createStore(v,T)},ji0R:function(j,H,b){j.exports=b.p+"static/douyu.3e6df9ee.jpg"},k3GJ:function(j,H,b){"use strict";b.d(H,"a",function(){return Oo});var I=b("rePB"),v=b("ODXe"),T=b("Ff2n"),y=b("VTBJ"),g=b("q1tI"),s=b("TSYQ"),_=b.n(s),p=b("Zm9Q"),e=b("6cGi"),o=b("KQm4"),n=b("xEkU"),l=b.n(n),r=b("t23M");function i(ot){var wt=Object(g.useRef)(),Rt=Object(g.useRef)(!1);function ut(){for(var Ue=arguments.length,et=new Array(Ue),We=0;We<Ue;We++)et[We]=arguments[We];Rt.current||(l.a.cancel(wt.current),wt.current=l()(function(){ot.apply(void 0,et)}))}return Object(g.useEffect)(function(){return function(){Rt.current=!0,l.a.cancel(wt.current)}},[]),ut}function t(ot){var wt=Object(g.useRef)([]),Rt=Object(g.useState)({}),ut=Object(v.a)(Rt,2),Ue=ut[1],et=Object(g.useRef)(typeof ot=="function"?ot():ot),We=i(function(){var ht=et.current;wt.current.forEach(function(Ot){ht=Ot(ht)}),wt.current=[],et.current=ht,Ue({})});function ct(ht){wt.current.push(ht),We()}return[et.current,ct]}var a=b("4IlW");function c(ot,wt){var Rt,ut=ot.prefixCls,Ue=ot.id,et=ot.active,We=ot.rtl,ct=ot.tab,ht=ct.key,Ot=ct.tab,Tt=ct.disabled,Mt=ct.closeIcon,Jt=ot.tabBarGutter,dn=ot.tabPosition,fn=ot.closable,Pn=ot.renderWrapper,br=ot.removeAriaLabel,Yr=ot.editable,Pr=ot.onClick,Wr=ot.onRemove,Qr=ot.onFocus,Xr="".concat(ut,"-tab");g.useEffect(function(){return Wr},[]);var zr={};dn==="top"||dn==="bottom"?zr[We?"marginLeft":"marginRight"]=Jt:zr.marginBottom=Jt;var li=Yr&&fn!==!1&&!Tt;function $r(pr){if(Tt)return;Pr(pr)}function Qi(pr){pr.preventDefault(),pr.stopPropagation(),Yr.onEdit("remove",{key:ht,event:pr})}var ei=g.createElement("div",{key:ht,ref:wt,className:_()(Xr,(Rt={},Object(I.a)(Rt,"".concat(Xr,"-with-remove"),li),Object(I.a)(Rt,"".concat(Xr,"-active"),et),Object(I.a)(Rt,"".concat(Xr,"-disabled"),Tt),Rt)),style:zr,onClick:$r},g.createElement("div",{role:"tab","aria-selected":et,id:Ue&&"".concat(Ue,"-tab-").concat(ht),className:"".concat(Xr,"-btn"),"aria-controls":Ue&&"".concat(Ue,"-panel-").concat(ht),"aria-disabled":Tt,tabIndex:Tt?null:0,onClick:function(hr){hr.stopPropagation(),$r(hr)},onKeyDown:function(hr){[a.a.SPACE,a.a.ENTER].includes(hr.which)&&(hr.preventDefault(),$r(hr))},onFocus:Qr},Ot),li&&g.createElement("button",{type:"button","aria-label":br||"remove",tabIndex:0,className:"".concat(Xr,"-remove"),onClick:function(hr){hr.stopPropagation(),Qi(hr)}},Mt||Yr.removeIcon||"\xD7"));return Pn&&(ei=Pn(ei)),ei}var d=g.forwardRef(c),f={width:0,height:0,left:0,top:0};function h(ot,wt,Rt){return Object(g.useMemo)(function(){for(var ut,Ue=new Map,et=wt.get((ut=ot[0])===null||ut===void 0?void 0:ut.key)||f,We=et.left+et.width,ct=0;ct<ot.length;ct+=1){var ht=ot[ct].key,Ot=wt.get(ht);if(!Ot){var Tt;Ot=wt.get((Tt=ot[ct-1])===null||Tt===void 0?void 0:Tt.key)||f}var Mt=Ue.get(ht)||Object(y.a)({},Ot);Mt.right=We-Mt.left-Mt.width,Ue.set(ht,Mt)}return Ue},[ot.map(function(ut){return ut.key}).join("_"),wt,Rt])}var u={width:0,height:0,left:0,top:0,right:0};function E(ot,wt,Rt,ut,Ue){var et=Ue.tabs,We=Ue.tabPosition,ct=Ue.rtl,ht,Ot,Tt;["top","bottom"].includes(We)?(ht="width",Ot=ct?"right":"left",Tt=Math.abs(wt.left)):(ht="height",Ot="top",Tt=-wt.top);var Mt=wt[ht],Jt=Rt[ht],dn=ut[ht],fn=Mt;return Jt+dn>Mt&&(fn=Mt-dn),Object(g.useMemo)(function(){if(!et.length)return[0,0];for(var Pn=et.length,br=Pn,Yr=0;Yr<Pn;Yr+=1){var Pr=ot.get(et[Yr].key)||u;if(Pr[Ot]+Pr[ht]>Tt+fn){br=Yr-1;break}}for(var Wr=0,Qr=Pn-1;Qr>=0;Qr-=1){var Xr=ot.get(et[Qr].key)||u;if(Xr[Ot]<Tt){Wr=Qr+1;break}}return[Wr,br]},[ot,Tt,fn,We,et.map(function(Pn){return Pn.key}).join("_"),ct])}var x=b("wx14"),O=b("1OyB"),C=b("vuIU"),w=b("JX7q"),S=b("Ji7U"),A=b("LK+K"),D=b("I8Z2"),M=b("bT9E"),N=b("2GS6"),P=b("Gytx"),z=b.n(P),X=b("U8pU"),k=/iPhone/i,F=/iPod/i,U=/iPad/i,L=/\bAndroid(?:.+)Mobile\b/i,B=/Android/i,Z=/\bAndroid(?:.+)SD4930UR\b/i,re=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,he=/Windows Phone/i,Ce=/\bWindows(?:.+)ARM\b/i,ke=/BlackBerry/i,te=/BB10/i,Re=/Opera Mini/i,Te=/\b(CriOS|Chrome)(?:.+)Mobile/i,pe=/Mobile(?:.+)Firefox\b/i;function me(ot,wt){return ot.test(wt)}function se(ot){var wt=ot||(typeof navigator!="undefined"?navigator.userAgent:""),Rt=(wt||"").split("[FBAN");if(typeof Rt[1]!="undefined"){var ut=Rt,Ue=Object(v.a)(ut,1);wt=Ue[0]}if(Rt=wt.split("Twitter"),typeof Rt[1]!="undefined"){var et=Rt,We=Object(v.a)(et,1);wt=We[0]}var ct={apple:{phone:me(k,wt)&&!me(he,wt),ipod:me(F,wt),tablet:!me(k,wt)&&me(U,wt)&&!me(he,wt),device:(me(k,wt)||me(F,wt)||me(U,wt))&&!me(he,wt)},amazon:{phone:me(Z,wt),tablet:!me(Z,wt)&&me(re,wt),device:me(Z,wt)||me(re,wt)},android:{phone:!me(he,wt)&&me(Z,wt)||!me(he,wt)&&me(L,wt),tablet:!me(he,wt)&&!me(Z,wt)&&!me(L,wt)&&(me(re,wt)||me(B,wt)),device:!me(he,wt)&&(me(Z,wt)||me(re,wt)||me(L,wt)||me(B,wt))||me(/\bokhttp\b/i,wt)},windows:{phone:me(he,wt),tablet:me(Ce,wt),device:me(he,wt)||me(Ce,wt)},other:{blackberry:me(ke,wt),blackberry10:me(te,wt),opera:me(Re,wt),firefox:me(pe,wt),chrome:me(Te,wt),device:me(ke,wt)||me(te,wt)||me(Re,wt)||me(pe,wt)||me(Te,wt)},any:null,phone:null,tablet:null};return ct.any=ct.apple.device||ct.android.device||ct.windows.device||ct.other.device,ct.phone=ct.apple.phone||ct.android.phone||ct.windows.phone,ct.tablet=ct.apple.tablet||ct.android.tablet||ct.windows.tablet,ct}var be=Object(y.a)(Object(y.a)({},se()),{},{isMobile:se}),ae=be;function fe(){}function Fe(ot,wt,Rt){var ut=wt||"";return ot.key||"".concat(ut,"item_").concat(Rt)}function ie(ot){return"".concat(ot,"-menu-")}function q(ot,wt){var Rt=-1;g.Children.forEach(ot,function(ut){Rt+=1,ut&&ut.type&&ut.type.isMenuItemGroup?g.Children.forEach(ut.props.children,function(Ue){Rt+=1,wt(Ue,Rt)}):wt(ut,Rt)})}function Q(ot,wt,Rt){if(!ot||Rt.find)return;g.Children.forEach(ot,function(ut){if(ut){var Ue=ut.type;if(!Ue||!(Ue.isSubMenu||Ue.isMenuItem||Ue.isMenuItemGroup))return;wt.indexOf(ut.key)!==-1?Rt.find=!0:ut.props.children&&Q(ut.props.children,wt,Rt)}})}var Y=["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"],oe=function(wt){var Rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ut=wt&&typeof wt.getBoundingClientRect=="function"&&wt.getBoundingClientRect().width;if(ut){if(Rt){var Ue=getComputedStyle(wt),et=Ue.marginLeft,We=Ue.marginRight;ut+=+et.replace("px","")+ +We.replace("px","")}ut=+ut.toFixed(6)}return ut||0},le=function(wt,Rt,ut){wt&&Object(X.a)(wt.style)==="object"&&(wt.style[Rt]=ut)},Ee=function(){return ae.any},Le=b("bdgK"),ge=b("i8i4"),De=b.n(ge),_e=b("wgJM"),Xe=b("l4aY"),tt=b("m+aA"),ze=b("c+Xe"),Me=b("zT1h"),Et=b("QC+M");function Oe(ot,wt,Rt){return Rt?ot[0]===wt[0]:ot[0]===wt[0]&&ot[1]===wt[1]}function Ve(ot,wt,Rt){var ut=ot[wt]||{};return Object(y.a)(Object(y.a)({},ut),Rt)}function Je(ot,wt,Rt,ut){for(var Ue=Rt.points,et=Object.keys(ot),We=0;We<et.length;We+=1){var ct=et[We];if(Oe(ot[ct].points,Ue,ut))return"".concat(wt,"-placement-").concat(ct)}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)))},Pe=b("MNnm");function He(ot,wt){var Rt={};return Rt[ot.toLowerCase()]=wt.toLowerCase(),Rt["Webkit".concat(ot)]="webkit".concat(wt),Rt["Moz".concat(ot)]="moz".concat(wt),Rt["ms".concat(ot)]="MS".concat(wt),Rt["O".concat(ot)]="o".concat(wt.toLowerCase()),Rt}function ve(ot,wt){var Rt={animationend:He("Animation","AnimationEnd"),transitionend:He("Transition","TransitionEnd")};return ot&&("AnimationEvent"in wt||delete Rt.animationend.animation,"TransitionEvent"in wt||delete Rt.transitionend.transition),Rt}var xe=ve(Object(Pe.a)(),typeof window!="undefined"?window:{}),de={};if(Object(Pe.a)()){var je=document.createElement("div");de=je.style}var Qe={};function ne(ot){if(Qe[ot])return Qe[ot];var wt=xe[ot];if(wt)for(var Rt=Object.keys(wt),ut=Rt.length,Ue=0;Ue<ut;Ue+=1){var et=Rt[Ue];if(Object.prototype.hasOwnProperty.call(wt,et)&&et in de)return Qe[ot]=wt[et],Qe[ot]}return""}var Ze=ne("animationend"),lt=ne("transitionend"),Be=!!(Ze&<),$e=Ze||"animationend",rt=lt||"transitionend";function xt(ot,wt){if(!ot)return null;if(Object(X.a)(ot)==="object"){var Rt=wt.replace(/-\w/g,function(ut){return ut[1].toUpperCase()});return ot[Rt]}return"".concat(ot,"-").concat(wt)}var ft="none",st="appear",Ne="enter",Ge="leave",yt="none",pt="prepare",jt="start",Bt="active",gt="end";function Ht(ot){var wt=Object(g.useRef)(!1),Rt=Object(g.useState)(ot),ut=Object(v.a)(Rt,2),Ue=ut[0],et=ut[1];function We(ct){wt.current||et(ct)}return Object(g.useEffect)(function(){return function(){wt.current=!0}},[]),[Ue,We]}var Ut=Object(Pe.a)()?g.useLayoutEffect:g.useEffect,Nt=Ut,Wt=function(){var ot=g.useRef(null);function wt(){_e.a.cancel(ot.current)}function Rt(ut){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;wt();var et=Object(_e.a)(function(){Ue<=1?ut({isCanceled:function(){return et!==ot.current}}):Rt(ut,Ue-1)});ot.current=et}return g.useEffect(function(){return function(){wt()}},[]),[Rt,wt]},Qt=[pt,jt,Bt,gt],pn=!1,qt=!0;function en(ot){return ot===Bt||ot===gt}var qn=function(ot,wt){var Rt=g.useState(yt),ut=Object(v.a)(Rt,2),Ue=ut[0],et=ut[1],We=Wt(),ct=Object(v.a)(We,2),ht=ct[0],Ot=ct[1];function Tt(){et(pt)}return Nt(function(){if(Ue!==yt&&Ue!==gt){var Mt=Qt.indexOf(Ue),Jt=Qt[Mt+1],dn=wt(Ue);dn===pn?et(Jt):ht(function(fn){function Pn(){if(fn.isCanceled())return;et(Jt)}dn===!0?Pn():Promise.resolve(dn).then(Pn)})}},[ot,Ue]),g.useEffect(function(){return function(){Ot()}},[]),[Tt,Ue]},$t=function(ot){var wt=Object(g.useRef)(),Rt=Object(g.useRef)(ot);Rt.current=ot;var ut=g.useCallback(function(We){Rt.current(We)},[]);function Ue(We){We&&(We.removeEventListener(rt,ut),We.removeEventListener($e,ut))}function et(We){wt.current&&wt.current!==We&&Ue(wt.current),We&&We!==wt.current&&(We.addEventListener(rt,ut),We.addEventListener($e,ut),wt.current=We)}return g.useEffect(function(){return function(){Ue(wt.current)}},[]),[et,Ue]};function cn(ot,wt,Rt,ut){var Ue=ut.motionEnter,et=Ue===void 0?!0:Ue,We=ut.motionAppear,ct=We===void 0?!0:We,ht=ut.motionLeave,Ot=ht===void 0?!0:ht,Tt=ut.motionDeadline,Mt=ut.motionLeaveImmediately,Jt=ut.onAppearPrepare,dn=ut.onEnterPrepare,fn=ut.onLeavePrepare,Pn=ut.onAppearStart,br=ut.onEnterStart,Yr=ut.onLeaveStart,Pr=ut.onAppearActive,Wr=ut.onEnterActive,Qr=ut.onLeaveActive,Xr=ut.onAppearEnd,zr=ut.onEnterEnd,li=ut.onLeaveEnd,$r=ut.onVisibleChanged,Qi=Ht(),ei=Object(v.a)(Qi,2),pr=ei[0],hr=ei[1],ri=Ht(ft),hi=Object(v.a)(ri,2),ir=hi[0],gi=hi[1],qi=Ht(null),bi=Object(v.a)(qi,2),Ti=bi[0],Li=bi[1],ma=Object(g.useRef)(!1),Ia=Object(g.useRef)(null),na=Object(g.useRef)(!1),io=Object(g.useRef)(null);function Ro(){var Fi=Rt();return Fi||io.current}var Eo=Object(g.useRef)(!1);function ka(Fi){var Ri=Ro();if(Fi&&!Fi.deadline&&Fi.target!==Ri)return;var La;ir===st&&Eo.current?La=Xr==null?void 0:Xr(Ri,Fi):ir===Ne&&Eo.current?La=zr==null?void 0:zr(Ri,Fi):ir===Ge&&Eo.current&&(La=li==null?void 0:li(Ri,Fi)),La!==!1&&!na.current&&(gi(ft),Li(null))}var zi=$t(ka),Ki=Object(v.a)(zi,1),ra=Ki[0],$i=g.useMemo(function(){var Fi,Ri,La;switch(ir){case"appear":return Fi={},Object(I.a)(Fi,pt,Jt),Object(I.a)(Fi,jt,Pn),Object(I.a)(Fi,Bt,Pr),Fi;case"enter":return Ri={},Object(I.a)(Ri,pt,dn),Object(I.a)(Ri,jt,br),Object(I.a)(Ri,Bt,Wr),Ri;case"leave":return La={},Object(I.a)(La,pt,fn),Object(I.a)(La,jt,Yr),Object(I.a)(La,Bt,Qr),La;default:return{}}},[ir]),Do=qn(ir,function(Fi){if(Fi===pt){var Ri=$i[pt];return Ri?Ri(Ro()):pn}if(Mi in $i){var La;Li(((La=$i[Mi])===null||La===void 0?void 0:La.call($i,Ro(),null))||null)}return Mi===Bt&&(ra(Ro()),Tt>0&&(clearTimeout(Ia.current),Ia.current=setTimeout(function(){ka({deadline:!0})},Tt))),qt}),Yo=Object(v.a)(Do,2),Qo=Yo[0],Mi=Yo[1],Vo=en(Mi);Eo.current=Vo,Nt(function(){hr(wt);var Fi=ma.current;if(ma.current=!0,!ot)return;var Ri;!Fi&&wt&&ct&&(Ri=st),Fi&&wt&&et&&(Ri=Ne),(Fi&&!wt&&Ot||!Fi&&Mt&&!wt&&Ot)&&(Ri=Ge),Ri&&(gi(Ri),Qo())},[wt]),Object(g.useEffect)(function(){(ir===st&&!ct||ir===Ne&&!et||ir===Ge&&!Ot)&&gi(ft)},[ct,et,Ot]),Object(g.useEffect)(function(){return function(){clearTimeout(Ia.current),na.current=!0}},[]),Object(g.useEffect)(function(){pr!==void 0&&ir===ft&&($r==null||$r(pr))},[pr,ir]);var Jo=Ti;return $i[pt]&&Mi===jt&&(Jo=Object(y.a)({transition:"none"},Jo)),[ir,Mi,Jo,pr!=null?pr:wt]}var mn=function(ot){Object(S.a)(Rt,ot);var wt=Object(A.a)(Rt);function Rt(){return Object(O.a)(this,Rt),wt.apply(this,arguments)}return Object(C.a)(Rt,[{key:"render",value:function(){return this.props.children}}]),Rt}(g.Component),yn=mn;function Vn(ot){var wt=ot;Object(X.a)(ot)==="object"&&(wt=ot.transitionSupport);function Rt(Ue){return!!(Ue.motionName&&wt)}var ut=g.forwardRef(function(Ue,et){var We=Ue.visible,ct=We===void 0?!0:We,ht=Ue.removeOnLeave,Ot=ht===void 0?!0:ht,Tt=Ue.forceRender,Mt=Ue.children,Jt=Ue.motionName,dn=Ue.leavedClassName,fn=Ue.eventProps,Pn=Rt(Ue),br=Object(g.useRef)(),Yr=Object(g.useRef)();function Pr(){try{return Object(tt.a)(br.current||Yr.current)}catch(gi){return null}}var Wr=cn(Pn,ct,Pr,Ue),Qr=Object(v.a)(Wr,4),Xr=Qr[0],zr=Qr[1],li=Qr[2],$r=Qr[3],Qi=g.useRef($r);$r&&(Qi.current=!0);var ei=Object(g.useRef)(et);ei.current=et;var pr=g.useCallback(function(gi){br.current=gi,Object(ze.b)(ei.current,gi)},[]),hr,ri=Object(y.a)(Object(y.a)({},fn),{},{visible:ct});if(!Mt)hr=null;else if(Xr===ft||!Rt(Ue))$r?hr=Mt(Object(y.a)({},ri),pr):!Ot&&Qi.current?hr=Mt(Object(y.a)(Object(y.a)({},ri),{},{className:dn}),pr):Tt?hr=Mt(Object(y.a)(Object(y.a)({},ri),{},{style:{display:"none"}}),pr):hr=null;else{var hi,ir;zr===pt?ir="prepare":en(zr)?ir="active":zr===jt&&(ir="start"),hr=Mt(Object(y.a)(Object(y.a)({},ri),{},{className:_()(xt(Jt,Xr),(hi={},Object(I.a)(hi,xt(Jt,"".concat(Xr,"-").concat(ir)),ir),Object(I.a)(hi,Jt,typeof Jt=="string"),hi)),style:li}),pr)}return g.createElement(yn,{ref:Yr},hr)});return ut.displayName="CSSMotion",ut}var $n=Vn(Be),zt="add",xn="keep",wr="remove",nr="removed";function Tn(ot){var wt;return ot&&Object(X.a)(ot)==="object"&&"key"in ot?wt=ot:wt={key:ot},Object(y.a)(Object(y.a)({},wt),{},{key:String(wt.key)})}function Yn(){var ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return ot.map(Tn)}function ce(){var ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Rt=[],ut=0,Ue=wt.length,et=Yn(ot),We=Yn(wt);et.forEach(function(Ot){for(var Tt=!1,Mt=ut;Mt<Ue;Mt+=1){var Jt=We[Mt];if(Jt.key===Ot.key){ut<Mt&&(Rt=Rt.concat(We.slice(ut,Mt).map(function(dn){return Object(y.a)(Object(y.a)({},dn),{},{status:zt})})),ut=Mt),Rt.push(Object(y.a)(Object(y.a)({},Jt),{},{status:xn})),ut+=1,Tt=!0;break}}Tt||Rt.push(Object(y.a)(Object(y.a)({},Ot),{},{status:wr}))}),ut<Ue&&(Rt=Rt.concat(We.slice(ut).map(function(Ot){return Object(y.a)(Object(y.a)({},Ot),{},{status:zt})})));var ct={};Rt.forEach(function(Ot){var Tt=Ot.key;ct[Tt]=(ct[Tt]||0)+1});var ht=Object.keys(ct).filter(function(Ot){return ct[Ot]>1});return ht.forEach(function(Ot){Rt=Rt.filter(function(Tt){var Mt=Tt.key,Jt=Tt.status;return Mt!==Ot||Jt!==wr}),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 J(ot){var wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$n,Rt=function(ut){Object(S.a)(et,ut);var Ue=Object(A.a)(et);function et(){var We;return Object(O.a)(this,et),We=Ue.apply(this,arguments),We.state={keyEntities:[]},We.removeKey=function(ct){We.setState(function(ht){var Ot=ht.keyEntities;return{keyEntities:Ot.map(function(Tt){return Tt.key!==ct?Tt:Object(y.a)(Object(y.a)({},Tt),{},{status:nr})})}})},We}return Object(C.a)(et,[{key:"render",value:function(){var ct=this,ht=this.state.keyEntities,Ot=this.props,Tt=Ot.component,Mt=Ot.children,Jt=Ot.onVisibleChanged,dn=Object(T.a)(Ot,["component","children","onVisibleChanged"]),fn=Tt||g.Fragment,Pn={};return V.forEach(function(br){Pn[br]=dn[br],delete dn[br]}),delete dn.keys,g.createElement(fn,dn,ht.map(function(br){var Yr=br.status,Pr=Object(T.a)(br,["status"]),Wr=Yr===zt||Yr===xn;return g.createElement(wt,Object(x.a)({},Pn,{key:Pr.key,visible:Wr,eventProps:Pr,onVisibleChanged:function(Xr){Jt==null||Jt(Xr,{key:Pr.key}),Xr||ct.removeKey(Pr.key)}}),Mt)}))}}],[{key:"getDerivedStateFromProps",value:function(ct,ht){var Ot=ct.keys,Tt=ht.keyEntities,Mt=Yn(Ot),Jt=ce(Tt,Mt);return{keyEntities:Jt.filter(function(dn){var fn=Tt.find(function(Pn){var br=Pn.key;return dn.key===br});return!(fn&&fn.status===nr&&dn.status===wr)})}}}]),et}(g.Component);return Rt.defaultProps={component:"div"},Rt}var ee=J(Be),Se=$n;function ue(ot){var wt=ot.prefixCls,Rt=ot.motion,ut=ot.animation,Ue=ot.transitionName;return Rt||(ut?{motionName:"".concat(wt,"-").concat(ut)}:Ue?{motionName:Ue}:null)}function nt(ot){var wt=ot.prefixCls,Rt=ot.visible,ut=ot.zIndex,Ue=ot.mask,et=ot.maskMotion,We=ot.maskAnimation,ct=ot.maskTransitionName;if(!Ue)return null;var ht={};return(et||ct||We)&&(ht=Object(y.a)({motionAppear:!0},ue({motion:et,prefixCls:wt,transitionName:ct,animation:We}))),g.createElement(Se,Object(x.a)({},ht,{visible:Rt,removeOnLeave:!0}),function(Ot){var Tt=Ot.className;return g.createElement("div",{style:{zIndex:ut},className:_()("".concat(wt,"-mask"),Tt)})})}var Dt=b("9mu1"),Yt=b("o0o1"),an=b.n(Yt),Xt=b("HaE+"),Rn=["measure","align",null,"motion"],Kn=function(ot,wt){var Rt=Object(g.useState)(null),ut=Object(v.a)(Rt,2),Ue=ut[0],et=ut[1],We=Object(g.useRef)(),ct=Object(g.useRef)(!1);function ht(Mt){ct.current||et(Mt)}function Ot(){_e.a.cancel(We.current)}function Tt(Mt){Ot(),We.current=Object(_e.a)(function(){ht(function(Jt){switch(Ue){case"align":return"motion";case"motion":return"stable";default:}return Jt}),Mt==null||Mt()})}return Object(g.useEffect)(function(){ht("measure")},[ot]),Object(g.useEffect)(function(){switch(Ue){case"measure":wt();break;default:}Ue&&(We.current=Object(_e.a)(Object(Xt.a)(an.a.mark(function Mt(){var Jt,dn;return an.a.wrap(function(Pn){for(;;)switch(Pn.prev=Pn.next){case 0:Jt=Rn.indexOf(Ue),dn=Rn[Jt+1],dn&&Jt!==-1&&ht(dn);case 3:case"end":return Pn.stop()}},Mt)}))))},[Ue]),Object(g.useEffect)(function(){return function(){ct.current=!0,Ot()}},[]),[Ue,Tt]},ar=function(ot){var wt=g.useState({width:0,height:0}),Rt=Object(v.a)(wt,2),ut=Rt[0],Ue=Rt[1];function et(ct){Ue({width:ct.offsetWidth,height:ct.offsetHeight})}var We=g.useMemo(function(){var ct={};if(ot){var ht=ut.width,Ot=ut.height;ot.indexOf("height")!==-1&&Ot?ct.height=Ot:ot.indexOf("minHeight")!==-1&&Ot&&(ct.minHeight=Ot),ot.indexOf("width")!==-1&&ht?ct.width=ht:ot.indexOf("minWidth")!==-1&&ht&&(ct.minWidth=ht)}return ct},[ot,ut]);return[We,et]},vr=g.forwardRef(function(ot,wt){var Rt=ot.visible,ut=ot.prefixCls,Ue=ot.className,et=ot.style,We=ot.children,ct=ot.zIndex,ht=ot.stretch,Ot=ot.destroyPopupOnHide,Tt=ot.forceRender,Mt=ot.align,Jt=ot.point,dn=ot.getRootDomNode,fn=ot.getClassNameFromAlign,Pn=ot.onAlign,br=ot.onMouseEnter,Yr=ot.onMouseLeave,Pr=ot.onMouseDown,Wr=ot.onTouchStart,Qr=Object(g.useRef)(),Xr=Object(g.useRef)(),zr=Object(g.useState)(),li=Object(v.a)(zr,2),$r=li[0],Qi=li[1],ei=ar(ht),pr=Object(v.a)(ei,2),hr=pr[0],ri=pr[1];function hi(){ht&&ri(dn())}var ir=Kn(Rt,hi),gi=Object(v.a)(ir,2),qi=gi[0],bi=gi[1],Ti=Object(g.useRef)();function Li(){return Jt||dn}function ma(){var zi;(zi=Qr.current)===null||zi===void 0||zi.forceAlign()}function Ia(zi,Ki){var ra=fn(Ki);$r!==ra&&Qi(ra),qi==="align"&&($r!==ra?Promise.resolve().then(function(){ma()}):bi(function(){var $i;($i=Ti.current)===null||$i===void 0||$i.call(Ti)}),Pn==null||Pn(zi,Ki))}var na=Object(y.a)({},ue(ot));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(zi){var Ki=na[zi];na[zi]=function(ra,$i){return bi(),Ki==null?void 0:Ki(ra,$i)}});function io(){return new Promise(function(zi){Ti.current=zi})}g.useEffect(function(){!na.motionName&&qi==="motion"&&bi()},[na.motionName,qi]),g.useImperativeHandle(wt,function(){return{forceAlign:ma,getElement:function(){return Xr.current}}});var Ro=Object(y.a)(Object(y.a)({},hr),{},{zIndex:ct,opacity:qi==="motion"||qi==="stable"||!Rt?void 0:0,pointerEvents:qi==="stable"?void 0:"none"},et),Eo=!0;(Mt==null?void 0:Mt.points)&&(qi==="align"||qi==="stable")&&(Eo=!1);var ka=We;return g.Children.count(We)>1&&(ka=g.createElement("div",{className:"".concat(ut,"-content")},We)),g.createElement(Se,Object(x.a)({visible:Rt,ref:Xr,leavedClassName:"".concat(ut,"-hidden")},na,{onAppearPrepare:io,onEnterPrepare:io,removeOnLeave:Ot,forceRender:Tt}),function(zi,Ki){var ra=zi.className,$i=zi.style,Do=_()(ut,Ue,$r,ra);return g.createElement(Dt.a,{target:Li(),key:"popup",ref:Qr,monitorWindowResize:!0,disabled:Eo,align:Mt,onAlign:Ia},g.createElement("div",{ref:Ki,className:Do,onMouseEnter:br,onMouseLeave:Yr,onMouseDownCapture:Pr,onTouchStartCapture:Wr,style:Object(y.a)(Object(y.a)({},$i),Ro)},ka))})});vr.displayName="PopupInner";var lr=vr,Jn=g.forwardRef(function(ot,wt){var Rt=ot.prefixCls,ut=ot.visible,Ue=ot.zIndex,et=ot.children,We=ot.mobile;We=We===void 0?{}:We;var ct=We.popupClassName,ht=We.popupStyle,Ot=We.popupMotion,Tt=Ot===void 0?{}:Ot,Mt=We.popupRender,Jt=g.useRef();g.useImperativeHandle(wt,function(){return{forceAlign:function(){},getElement:function(){return Jt.current}}});var dn=Object(y.a)({zIndex:Ue},ht),fn=et;return g.Children.count(et)>1&&(fn=g.createElement("div",{className:"".concat(Rt,"-content")},et)),Mt&&(fn=Mt(fn)),g.createElement(Se,Object(x.a)({visible:ut,ref:Jt,removeOnLeave:!0},Tt),function(Pn,br){var Yr=Pn.className,Pr=Pn.style,Wr=_()(Rt,ct,Yr);return g.createElement("div",{ref:br,className:Wr,style:Object(y.a)(Object(y.a)({},Pr),dn)},fn)})});Jn.displayName="MobilePopupInner";var Tr=Jn,Ji=["visible","mobile"],Vr=g.forwardRef(function(ot,wt){var Rt=ot.visible,ut=ot.mobile,Ue=Object(T.a)(ot,Ji),et=Object(g.useState)(Rt),We=Object(v.a)(et,2),ct=We[0],ht=We[1],Ot=Object(g.useState)(!1),Tt=Object(v.a)(Ot,2),Mt=Tt[0],Jt=Tt[1],dn=Object(y.a)(Object(y.a)({},Ue),{},{visible:ct});Object(g.useEffect)(function(){ht(Rt),Rt&&ut&&Jt(Ye())},[Rt,ut]);var fn=Mt?g.createElement(Tr,Object(x.a)({},dn,{mobile:ut,ref:wt})):g.createElement(lr,Object(x.a)({},dn,{ref:wt}));return g.createElement("div",null,g.createElement(nt,dn),fn)});Vr.displayName="Popup";var oi=Vr,pa=g.createContext(null),Bi=pa;function ta(){}function Da(){return""}function _o(ot){return ot?ot.ownerDocument:window.document}var lo=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function wo(ot){var wt=function(Rt){Object(S.a)(Ue,Rt);var ut=Object(A.a)(Ue);function Ue(et){var We;Object(O.a)(this,Ue),We=ut.call(this,et),We.popupRef=g.createRef(),We.triggerRef=g.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(ht){var Ot=We.props.mouseEnterDelay;We.fireEvents("onMouseEnter",ht),We.delaySetPopupVisible(!0,Ot,Ot?null:ht)},We.onMouseMove=function(ht){We.fireEvents("onMouseMove",ht),We.setPoint(ht)},We.onMouseLeave=function(ht){We.fireEvents("onMouseLeave",ht),We.delaySetPopupVisible(!1,We.props.mouseLeaveDelay)},We.onPopupMouseEnter=function(){We.clearDelayTimer()},We.onPopupMouseLeave=function(ht){var Ot;if(ht.relatedTarget&&!ht.relatedTarget.setTimeout&&Object(Xe.a)((Ot=We.popupRef.current)===null||Ot===void 0?void 0:Ot.getElement(),ht.relatedTarget))return;We.delaySetPopupVisible(!1,We.props.mouseLeaveDelay)},We.onFocus=function(ht){We.fireEvents("onFocus",ht),We.clearDelayTimer(),We.isFocusToShow()&&(We.focusTime=Date.now(),We.delaySetPopupVisible(!0,We.props.focusDelay))},We.onMouseDown=function(ht){We.fireEvents("onMouseDown",ht),We.preClickTime=Date.now()},We.onTouchStart=function(ht){We.fireEvents("onTouchStart",ht),We.preTouchTime=Date.now()},We.onBlur=function(ht){We.fireEvents("onBlur",ht),We.clearDelayTimer(),We.isBlurToHide()&&We.delaySetPopupVisible(!1,We.props.blurDelay)},We.onContextMenu=function(ht){ht.preventDefault(),We.fireEvents("onContextMenu",ht),We.setPopupVisible(!0,ht)},We.onContextMenuClose=function(){We.isContextMenuToShow()&&We.close()},We.onClick=function(ht){if(We.fireEvents("onClick",ht),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())&&ht&&ht.preventDefault&&ht.preventDefault();var Tt=!We.state.popupVisible;(We.isClickToHide()&&!Tt||Tt&&We.isClickToShow())&&We.setPopupVisible(!We.state.popupVisible,ht)},We.onPopupMouseDown=function(){if(We.hasPopupMouseDown=!0,clearTimeout(We.mouseDownTimeout),We.mouseDownTimeout=window.setTimeout(function(){We.hasPopupMouseDown=!1},0),We.context){var ht;(ht=We.context).onPopupMouseDown.apply(ht,arguments)}},We.onDocumentClick=function(ht){if(We.props.mask&&!We.props.maskClosable)return;var Ot=ht.target,Tt=We.getRootDomNode(),Mt=We.getPopupDomNode();(!Object(Xe.a)(Tt,Ot)||We.isContextMenuOnly())&&!Object(Xe.a)(Mt,Ot)&&!We.hasPopupMouseDown&&We.close()},We.getRootDomNode=function(){var ht=We.props.getTriggerDOMNode;if(ht)return ht(We.triggerRef.current);try{var Ot=Object(tt.a)(We.triggerRef.current);if(Ot)return Ot}catch(Tt){}return De.a.findDOMNode(Object(w.a)(We))},We.getPopupClassNameFromAlign=function(ht){var Ot=[],Tt=We.props,Mt=Tt.popupPlacement,Jt=Tt.builtinPlacements,dn=Tt.prefixCls,fn=Tt.alignPoint,Pn=Tt.getPopupClassNameFromAlign;return Mt&&Jt&&Ot.push(Je(Jt,dn,ht,fn)),Pn&&Ot.push(Pn(ht)),Ot.join(" ")},We.getComponent=function(){var ht=We.props,Ot=ht.prefixCls,Tt=ht.destroyPopupOnHide,Mt=ht.popupClassName,Jt=ht.onPopupAlign,dn=ht.popupMotion,fn=ht.popupAnimation,Pn=ht.popupTransitionName,br=ht.popupStyle,Yr=ht.mask,Pr=ht.maskAnimation,Wr=ht.maskTransitionName,Qr=ht.maskMotion,Xr=ht.zIndex,zr=ht.popup,li=ht.stretch,$r=ht.alignPoint,Qi=ht.mobile,ei=ht.forceRender,pr=We.state,hr=pr.popupVisible,ri=pr.point,hi=We.getPopupAlign(),ir={};return We.isMouseEnterToShow()&&(ir.onMouseEnter=We.onPopupMouseEnter),We.isMouseLeaveToHide()&&(ir.onMouseLeave=We.onPopupMouseLeave),ir.onMouseDown=We.onPopupMouseDown,ir.onTouchStart=We.onPopupMouseDown,g.createElement(oi,Object(x.a)({prefixCls:Ot,destroyPopupOnHide:Tt,visible:hr,point:$r&&ri,className:Mt,align:hi,onAlign:Jt,animation:fn,getClassNameFromAlign:We.getPopupClassNameFromAlign},ir,{stretch:li,getRootDomNode:We.getRootDomNode,style:br,mask:Yr,zIndex:Xr,transitionName:Pn,maskAnimation:Pr,maskTransitionName:Wr,maskMotion:Qr,ref:We.popupRef,motion:dn,mobile:Qi,forceRender:ei}),typeof zr=="function"?zr():zr)},We.attachParent=function(ht){_e.a.cancel(We.attachId);var Ot=We.props,Tt=Ot.getPopupContainer,Mt=Ot.getDocument,Jt=We.getRootDomNode(),dn;Tt?(Jt||Tt.length===0)&&(dn=Tt(Jt)):dn=Mt(We.getRootDomNode()).body,dn?dn.appendChild(ht):We.attachId=Object(_e.a)(function(){We.attachParent(ht)})},We.getContainer=function(){var ht=We.props.getDocument,Ot=ht(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(ht){var Ot=We.props.alignPoint;if(!Ot||!ht)return;We.setState({point:{pageX:ht.pageX,pageY:ht.pageY}})},We.handlePortalUpdate=function(){We.state.prevPopupVisible!==We.state.popupVisible&&We.props.afterPopupVisibleChange(We.state.popupVisible)},We.triggerContextValue={onPopupMouseDown:We.onPopupMouseDown};var ct;return"popupVisible"in et?ct=!!et.popupVisible:ct=!!et.defaultPopupVisible,We.state={prevPopupVisible:ct,popupVisible:ct},lo.forEach(function(ht){We["fire".concat(ht)]=function(Ot){We.fireEvents(ht,Ot)}}),We}return Object(C.a)(Ue,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var We=this.props,ct=this.state;if(ct.popupVisible){var ht;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(ht=We.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Me.a)(ht,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(ht=ht||We.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Me.a)(ht,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(ht=ht||We.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Me.a)(ht,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(Me.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,ct=We.popupPlacement,ht=We.popupAlign,Ot=We.builtinPlacements;return ct&&Ot?Ve(Ot,ct,ht):ht}},{key:"setPopupVisible",value:function(We,ct){var ht=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)),ht&&ct&&We&&this.setPoint(ct)}},{key:"delaySetPopupVisible",value:function(We,ct,ht){var Ot=this,Tt=ct*1e3;if(this.clearDelayTimer(),Tt){var Mt=ht?{pageX:ht.pageX,pageY:ht.pageY}:null;this.delayTimer=window.setTimeout(function(){Ot.setPopupVisible(We,Mt),Ot.clearDelayTimer()},Tt)}else this.setPopupVisible(We,ht)}},{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 ct=this.props.children.props,ht=this.props;return ct[We]&&ht[We]?this["fire".concat(We)]:ct[We]||ht[We]}},{key:"isClickToShow",value:function(){var We=this.props,ct=We.action,ht=We.showAction;return ct.indexOf("click")!==-1||ht.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,ct=We.action,ht=We.showAction;return ct.indexOf("contextMenu")!==-1||ht.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var We=this.props,ct=We.action,ht=We.hideAction;return ct.indexOf("click")!==-1||ht.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var We=this.props,ct=We.action,ht=We.showAction;return ct.indexOf("hover")!==-1||ht.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var We=this.props,ct=We.action,ht=We.hideAction;return ct.indexOf("hover")!==-1||ht.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var We=this.props,ct=We.action,ht=We.showAction;return ct.indexOf("focus")!==-1||ht.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var We=this.props,ct=We.action,ht=We.hideAction;return ct.indexOf("focus")!==-1||ht.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,ct){var ht=this.props.children.props[We];ht&&ht(ct);var Ot=this.props[We];Ot&&Ot(ct)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var We=this.state.popupVisible,ct=this.props,ht=ct.children,Ot=ct.forceRender,Tt=ct.alignPoint,Mt=ct.className,Jt=ct.autoDestroy,dn=g.Children.only(ht),fn={key:"trigger"};this.isContextMenuToShow()?fn.onContextMenu=this.onContextMenu:fn.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(fn.onClick=this.onClick,fn.onMouseDown=this.onMouseDown,fn.onTouchStart=this.onTouchStart):(fn.onClick=this.createTwoChains("onClick"),fn.onMouseDown=this.createTwoChains("onMouseDown"),fn.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(fn.onMouseEnter=this.onMouseEnter,Tt&&(fn.onMouseMove=this.onMouseMove)):fn.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?fn.onMouseLeave=this.onMouseLeave:fn.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(fn.onFocus=this.onFocus,fn.onBlur=this.onBlur):(fn.onFocus=this.createTwoChains("onFocus"),fn.onBlur=this.createTwoChains("onBlur"));var Pn=_()(dn&&dn.props&&dn.props.className,Mt);Pn&&(fn.className=Pn);var br=Object(y.a)({},fn);Object(ze.c)(dn)&&(br.ref=Object(ze.a)(this.triggerRef,dn.ref));var Yr=g.cloneElement(dn,br),Pr;return(We||this.popupRef.current||Ot)&&(Pr=g.createElement(ot,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!We&&Jt&&(Pr=null),g.createElement(Bi.Provider,{value:this.triggerContextValue},Yr,Pr)}}],[{key:"getDerivedStateFromProps",value:function(We,ct){var ht=We.popupVisible,Ot={};return ht!==void 0&&ct.popupVisible!==ht&&(Ot.popupVisible=ht,Ot.prevPopupVisible=ct.popupVisible),Ot}}]),Ue}(g.Component);return wt.contextType=Bi,wt.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:Da,getDocument:_o,onPopupVisibleChange:ta,afterPopupVisibleChange:ta,onPopupAlign:ta,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},wt}var Fa=wo(Et.a),Gi={adjustX:1,adjustY:1},Nr={topLeft:{points:["bl","tl"],overflow:Gi,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Gi,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Gi,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Gi,offset:[4,0]}},qr={topLeft:{points:["bl","tl"],overflow:Gi,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Gi,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Gi,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Gi,offset:[4,0]}},_i=Nr,Ur=0,Ar={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},ti=function(wt,Rt,ut){var Ue=ie(Rt),et=wt.getState();wt.setState({defaultActiveFirst:Object(y.a)(Object(y.a)({},et.defaultActiveFirst),{},Object(I.a)({},Ue,ut))})},yr=function(ot){Object(S.a)(Rt,ot);var wt=Object(A.a)(Rt);function Rt(ut){var Ue;Object(O.a)(this,Rt),Ue=wt.call(this,ut),Ue.onDestroy=function(Tt){Ue.props.onDestroy(Tt)},Ue.onKeyDown=function(Tt){var Mt=Tt.keyCode,Jt=Ue.menuInstance,dn=Ue.props.store,fn=Ue.getVisible();if(Mt===a.a.ENTER)return Ue.onTitleClick(Tt),ti(dn,Ue.props.eventKey,!0),!0;if(Mt===a.a.RIGHT)return fn?Jt.onKeyDown(Tt):(Ue.triggerOpenChange(!0),ti(dn,Ue.props.eventKey,!0)),!0;if(Mt===a.a.LEFT){var Pn;if(fn)Pn=Jt.onKeyDown(Tt);else return;return Pn||(Ue.triggerOpenChange(!1),Pn=!0),Pn}return fn&&(Mt===a.a.UP||Mt===a.a.DOWN)?Jt.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 Mt=Ue.props,Jt=Mt.eventKey,dn=Mt.onMouseEnter,fn=Mt.store;ti(fn,Ue.props.eventKey,!1),dn({key:Jt,domEvent:Tt})},Ue.onMouseLeave=function(Tt){var Mt=Ue.props,Jt=Mt.parentMenu,dn=Mt.eventKey,fn=Mt.onMouseLeave;Jt.subMenuInstance=Object(w.a)(Ue),fn({key:dn,domEvent:Tt})},Ue.onTitleMouseEnter=function(Tt){var Mt=Ue.props,Jt=Mt.eventKey,dn=Mt.onItemHover,fn=Mt.onTitleMouseEnter;dn({key:Jt,hover:!0}),fn({key:Jt,domEvent:Tt})},Ue.onTitleMouseLeave=function(Tt){var Mt=Ue.props,Jt=Mt.parentMenu,dn=Mt.eventKey,fn=Mt.onItemHover,Pn=Mt.onTitleMouseLeave;Jt.subMenuInstance=Object(w.a)(Ue),fn({key:dn,hover:!1}),Pn({key:dn,domEvent:Tt})},Ue.onTitleClick=function(Tt){var Mt=Object(w.a)(Ue),Jt=Mt.props;if(Jt.onTitleClick({key:Jt.eventKey,domEvent:Tt}),Jt.triggerSubMenuAction==="hover")return;Ue.triggerOpenChange(!Ue.getVisible(),"click"),ti(Jt.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,Mt){var Jt=Ue.props.eventKey,dn=function(){Ue.onOpenChange({key:Jt,item:Object(w.a)(Ue),trigger:Mt,open:Tt})};Mt==="mouseenter"?Ue.mouseenterTimeout=setTimeout(function(){dn()},0):dn()},Ue.isChildrenSelected=function(){var Tt={find:!1};return Q(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=ge.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),Mt=Tt.props,Jt=Ue.getMode();return{mode:Jt==="horizontal"?"vertical":Jt,visible:Ue.getVisible(),level:Mt.level+1,inlineIndent:Mt.inlineIndent,focusable:!1,onClick:Ue.onSubMenuClick,onSelect:Ue.onSelect,onDeselect:Ue.onDeselect,onDestroy:Ue.onDestroy,selectedKeys:Mt.selectedKeys,eventKey:"".concat(Mt.eventKey,"-menu-"),openKeys:Mt.openKeys,motion:Mt.motion,onOpenChange:Ue.onOpenChange,subMenuOpenDelay:Mt.subMenuOpenDelay,parentMenu:Object(w.a)(Ue),subMenuCloseDelay:Mt.subMenuCloseDelay,forceSubMenuRender:Mt.forceSubMenuRender,triggerSubMenuAction:Mt.triggerSubMenuAction,builtinPlacements:Mt.builtinPlacements,defaultActiveFirst:Mt.store.getState().defaultActiveFirst[ie(Mt.eventKey)],multiple:Mt.multiple,prefixCls:Mt.rootPrefixCls,id:Ue.internalMenuId,manualRef:Ue.saveMenuInstance,itemIcon:Mt.itemIcon,expandIcon:Mt.expandIcon,direction:Mt.direction}},Ue.getMotion=function(Tt,Mt){var Jt=Object(w.a)(Ue),dn=Jt.haveRendered,fn=Ue.props,Pn=fn.motion,br=fn.rootPrefixCls,Yr=Object(y.a)(Object(y.a)({},Pn),{},{leavedClassName:"".concat(br,"-hidden"),removeOnLeave:!1,motionAppear:dn||!Mt||Tt!=="inline"});return Yr};var et=ut.store,We=ut.eventKey,ct=et.getState(),ht=ct.defaultActiveFirst;Ue.isRootMenu=!1;var Ot=!1;return ht&&(Ot=ht[We]),ti(et,We,Ot),Ue.state={mode:ut.mode,isOpen:ut.isOpen},Ue}return Object(C.a)(Rt,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Ue=this,et=this.props,We=et.mode,ct=et.parentMenu,ht=et.manualRef,Ot=et.isOpen,Tt=function(){Ue.setState({mode:We,isOpen:Ot})},Mt=Ot!==this.state.isOpen,Jt=We!==this.state.mode;if((Jt||Mt)&&(_e.a.cancel(this.updateStateRaf),Jt?this.updateStateRaf=Object(_e.a)(Tt):Tt()),ht&&ht(this),We!=="horizontal"||!(ct==null?void 0:ct.isRootMenu)||!Ot)return;this.minWidthTimeout=setTimeout(function(){return Ue.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var Ue=this.props,et=Ue.onDestroy,We=Ue.eventKey;et&&et(We),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),_e.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(Ue,et){var We=this.getBaseProps();return g.createElement(Ao,Object(x.a)({},We,{id:this.internalMenuId,className:Ue,style:et}),this.props.children)}},{key:"renderChildren",value:function(){var Ue=this,et=this.getBaseProps(),We=et.mode,ct=et.visible,ht=et.forceSubMenuRender,Ot=et.direction,Tt=this.getMotion(We,ct);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||ct||ht,!this.haveOpened)return g.createElement("div",null);var Mt=_()("".concat(et.prefixCls,"-sub"),Object(I.a)({},"".concat(et.prefixCls,"-rtl"),Ot==="rtl"));return this.isInlineMode()?g.createElement(Se,Object(x.a)({visible:et.visible,forceRender:ht},Tt),function(Jt){var dn=Jt.className,fn=Jt.style,Pn=_()(Mt,dn);return Ue.renderPopupMenu(Pn,fn)}):this.renderPopupMenu(Mt)}},{key:"render",value:function(){var Ue,et,We,ct=Object(y.a)({},this.props),ht=this.getVisible(),Ot=this.getPrefixCls(),Tt=this.isInlineMode(),Mt=this.getMode(),Jt=_()(Ot,"".concat(Ot,"-").concat(Mt),(Ue={},Object(I.a)(Ue,ct.className,!!ct.className),Object(I.a)(Ue,this.getOpenClassName(),ht),Object(I.a)(Ue,this.getActiveClassName(),ct.active||ht&&!Tt),Object(I.a)(Ue,this.getDisabledClassName(),ct.disabled),Object(I.a)(Ue,this.getSelectedClassName(),this.isChildrenSelected()),Ue));this.internalMenuId||(ct.eventKey?this.internalMenuId="".concat(ct.eventKey,"$Menu"):(Ur+=1,this.internalMenuId="$__$".concat(Ur,"$Menu")));var dn={},fn={},Pn={};ct.disabled||(dn={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},fn={onClick:this.onTitleClick},Pn={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var br={},Yr=ct.direction,Pr=Yr==="rtl";Tt&&(Pr?br.paddingRight=ct.inlineIndent*ct.level:br.paddingLeft=ct.inlineIndent*ct.level);var Wr={};this.getVisible()&&(Wr={"aria-owns":this.internalMenuId});var Qr=null;Mt!=="horizontal"&&(Qr=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Qr=g.createElement(this.props.expandIcon,Object(y.a)({},this.props))));var Xr=g.createElement("div",Object(x.a)({ref:this.saveSubMenuTitle,style:br,className:"".concat(Ot,"-title"),role:"button"},Pn,fn,{"aria-expanded":ht},Wr,{"aria-haspopup":"true",title:typeof ct.title=="string"?ct.title:void 0}),ct.title,Qr||g.createElement("i",{className:"".concat(Ot,"-arrow")})),zr=this.renderChildren(),li=((et=ct.parentMenu)===null||et===void 0?void 0:et.isRootMenu)?ct.parentMenu.props.getPopupContainer:function(Li){return Li.parentNode},$r=Ar[Mt],Qi=ct.popupOffset?{offset:ct.popupOffset}:{},ei=_()((We={},Object(I.a)(We,ct.popupClassName,ct.popupClassName&&!Tt),Object(I.a)(We,"".concat(Ot,"-rtl"),Pr),We)),pr=ct.disabled,hr=ct.triggerSubMenuAction,ri=ct.subMenuOpenDelay,hi=ct.forceSubMenuRender,ir=ct.subMenuCloseDelay,gi=ct.builtinPlacements;Y.forEach(function(Li){return delete ct[Li]}),delete ct.onClick;var qi=Pr?Object(y.a)(Object(y.a)({},qr),gi):Object(y.a)(Object(y.a)({},Nr),gi);delete ct.direction;var bi=this.getBaseProps(),Ti=Tt?null:this.getMotion(bi.mode,bi.visible);return g.createElement("li",Object(x.a)({},ct,dn,{className:Jt,role:"menuitem"}),g.createElement(Fa,{prefixCls:Ot,popupClassName:_()("".concat(Ot,"-popup"),ei),getPopupContainer:li,builtinPlacements:qi,popupPlacement:$r,popupVisible:Tt?!1:ht,popupAlign:Qi,popup:Tt?null:zr,action:pr||Tt?[]:[hr],mouseEnterDelay:ri,mouseLeaveDelay:ir,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:hi,popupMotion:Ti},Xr),Tt?zr:null)}}]),Rt}(g.Component);yr.defaultProps={onMouseEnter:fe,onMouseLeave:fe,onTitleMouseEnter:fe,onTitleMouseLeave:fe,onTitleClick:fe,manualRef:fe,mode:"vertical",title:""};var si=Object(D.b)(function(ot,wt){var Rt=ot.openKeys,ut=ot.activeKey,Ue=ot.selectedKeys,et=wt.eventKey,We=wt.subMenuKey;return{isOpen:Rt.indexOf(et)>-1,active:ut[We]===et,selectedKeys:Ue}})(yr);si.isSubMenu=!0;var cr=si,Hi="menuitem-overflowed",Ni=.5,Zi=function(ot){Object(S.a)(Rt,ot);var wt=Object(A.a)(Rt);function Rt(){var ut;return Object(O.a)(this,Rt),ut=wt.apply(this,arguments),ut.resizeObserver=null,ut.mutationObserver=null,ut.originalTotalWidth=0,ut.overflowedItems=[],ut.menuItemSizes=[],ut.cancelFrameId=null,ut.state={lastVisibleIndex:void 0},ut.childRef=g.createRef(),ut.getMenuItemNodes=function(){var Ue=ut.props.prefixCls,et=ut.childRef.current;return et?[].slice.call(et.children).filter(function(We){return We.className.split(" ").indexOf("".concat(Ue,"-overflowed-submenu"))<0}):[]},ut.getOverflowedSubMenuItem=function(Ue,et,We){var ct=ut.props,ht=ct.overflowedIndicator,Ot=ct.level,Tt=ct.mode,Mt=ct.prefixCls,Jt=ct.theme;if(Ot!==1||Tt!=="horizontal")return null;var dn=ut.props.children[0],fn=dn.props,Pn=fn.children,br=fn.title,Yr=fn.style,Pr=Object(T.a)(fn,["children","title","style"]),Wr=Object(y.a)({},Yr),Qr="".concat(Ue,"-overflowed-indicator"),Xr="".concat(Ue,"-overflowed-indicator");et.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"}),Qr="".concat(Qr,"-placeholder"),Xr="".concat(Xr,"-placeholder"));var zr=Jt?"".concat(Mt,"-").concat(Jt):"",li={};return Y.forEach(function($r){Pr[$r]!==void 0&&(li[$r]=Pr[$r])}),g.createElement(cr,Object(x.a)({title:ht,className:"".concat(Mt,"-overflowed-submenu"),popupClassName:zr},li,{key:Qr,eventKey:Xr,disabled:!1,style:Wr}),et)},ut.setChildrenWidthAndResize=function(){if(ut.props.mode!=="horizontal")return;var Ue=ut.childRef.current;if(!Ue)return;var et=Ue.children;if(!et||et.length===0)return;var We=Ue.children[et.length-1];le(We,"display","inline-block");var ct=ut.getMenuItemNodes(),ht=ct.filter(function(Ot){return Ot.className.split(" ").indexOf(Hi)>=0});ht.forEach(function(Ot){le(Ot,"display","inline-block")}),ut.menuItemSizes=ct.map(function(Ot){return oe(Ot,!0)}),ht.forEach(function(Ot){le(Ot,"display","none")}),ut.overflowedIndicatorWidth=oe(Ue.children[Ue.children.length-1],!0),ut.originalTotalWidth=ut.menuItemSizes.reduce(function(Ot,Tt){return Ot+Tt},0),ut.handleResize(),le(We,"display","none")},ut.handleResize=function(){if(ut.props.mode!=="horizontal")return;var Ue=ut.childRef.current;if(!Ue)return;var et=oe(Ue);ut.overflowedItems=[];var We=0,ct;ut.originalTotalWidth>et+Ni&&(ct=-1,ut.menuItemSizes.forEach(function(ht){We+=ht,We+ut.overflowedIndicatorWidth<=et&&(ct+=1)})),ut.setState({lastVisibleIndex:ct})},ut}return Object(C.a)(Rt,[{key:"componentDidMount",value:function(){var Ue=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var et=this.childRef.current;if(!et)return;this.resizeObserver=new Le.default(function(We){We.forEach(function(){var ct=Ue.cancelFrameId;cancelAnimationFrame(ct),Ue.cancelFrameId=requestAnimationFrame(Ue.setChildrenWidthAndResize)})}),[].slice.call(et.children).concat(et).forEach(function(We){Ue.resizeObserver.observe(We)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){Ue.resizeObserver.disconnect(),[].slice.call(et.children).concat(et).forEach(function(We){Ue.resizeObserver.observe(We)}),Ue.setChildrenWidthAndResize()}),this.mutationObserver.observe(et,{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 et=this,We=this.state.lastVisibleIndex;return(Ue||[]).reduce(function(ct,ht,Ot){var Tt=ht;if(et.props.mode==="horizontal"){var Mt=et.getOverflowedSubMenuItem(ht.props.eventKey,[]);We!==void 0&&et.props.className.indexOf("".concat(et.props.prefixCls,"-root"))!==-1&&(Ot>We&&(Tt=g.cloneElement(ht,{style:{display:"none"},eventKey:"".concat(ht.props.eventKey,"-hidden"),className:"".concat(Hi)})),Ot===We+1&&(et.overflowedItems=Ue.slice(We+1).map(function(dn){return g.cloneElement(dn,{key:dn.props.eventKey,mode:"vertical-left"})}),Mt=et.getOverflowedSubMenuItem(ht.props.eventKey,et.overflowedItems)));var Jt=[].concat(Object(o.a)(ct),[Mt,Tt]);return Ot===Ue.length-1&&Jt.push(et.getOverflowedSubMenuItem(ht.props.eventKey,[],!0)),Jt}return[].concat(Object(o.a)(ct),[Tt])},[])}},{key:"render",value:function(){var Ue=this.props,et=Ue.visible,We=Ue.prefixCls,ct=Ue.overflowedIndicator,ht=Ue.mode,Ot=Ue.level,Tt=Ue.tag,Mt=Ue.children,Jt=Ue.theme,dn=Object(T.a)(Ue,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),fn=Tt;return g.createElement(fn,Object(x.a)({ref:this.childRef},dn),this.renderChildren(Mt))}}]),Rt}(g.Component);Zi.defaultProps={tag:"div",className:""};var yo=Zi;function Vi(ot){return ot.length?ot.every(function(wt){return!!wt.props.disabled}):!0}function Qa(ot,wt,Rt){var ut=ot.getState();ot.setState({activeKey:Object(y.a)(Object(y.a)({},ut.activeKey),{},Object(I.a)({},wt,Rt))})}function ja(ot){return ot.eventKey||"0-menu-"}function ni(ot,wt){var Rt=wt,ut=ot.children,Ue=ot.eventKey;if(Rt){var et;if(q(ut,function(We,ct){We&&We.props&&!We.props.disabled&&Rt===Fe(We,Ue,ct)&&(et=!0)}),et)return Rt}return Rt=null,ot.defaultActiveFirst&&q(ut,function(We,ct){!Rt&&We&&!We.props.disabled&&(Rt=Fe(We,Ue,ct))}),Rt}function Wo(ot){if(!ot)return;var wt=this.instanceArray.indexOf(ot);wt!==-1?this.instanceArray[wt]=ot:this.instanceArray.push(ot)}var Ja=function(ot){Object(S.a)(Rt,ot);var wt=Object(A.a)(Rt);function Rt(ut){var Ue;return Object(O.a)(this,Rt),Ue=wt.call(this,ut),Ue.onKeyDown=function(et,We){var ct=et.keyCode,ht;if(Ue.getFlatInstanceArray().forEach(function(Tt){Tt&&Tt.props.active&&Tt.onKeyDown&&(ht=Tt.onKeyDown(et))}),ht)return 1;var Ot=null;return(ct===a.a.UP||ct===a.a.DOWN)&&(Ot=Ue.step(ct===a.a.UP?-1:1)),Ot?(et.preventDefault(),Qa(Ue.props.store,ja(Ue.props),Ot.props.eventKey),typeof We=="function"&&We(Ot),1):void 0},Ue.onItemHover=function(et){var We=et.key,ct=et.hover;Qa(Ue.props.store,ja(Ue.props),ct?We:null)},Ue.onDeselect=function(et){Ue.props.onDeselect(et)},Ue.onSelect=function(et){Ue.props.onSelect(et)},Ue.onClick=function(et){Ue.props.onClick(et)},Ue.onOpenChange=function(et){Ue.props.onOpenChange(et)},Ue.onDestroy=function(et){Ue.props.onDestroy(et)},Ue.getFlatInstanceArray=function(){return Ue.instanceArray},Ue.step=function(et){var We=Ue.getFlatInstanceArray(),ct=Ue.props.store.getState().activeKey[ja(Ue.props)],ht=We.length;if(!ht)return null;et<0&&(We=We.concat().reverse());var Ot=-1;if(We.every(function(dn,fn){return dn&&dn.props.eventKey===ct?(Ot=fn,!1):!0}),!Ue.props.defaultActiveFirst&&Ot!==-1&&Vi(We.slice(Ot,ht-1)))return;var Tt=(Ot+1)%ht,Mt=Tt;do{var Jt=We[Mt];if(!Jt||Jt.props.disabled)Mt=(Mt+1)%ht;else return Jt}while(Mt!==Tt);return null},Ue.renderCommonMenuItem=function(et,We,ct){var ht=Ue.props.store.getState(),Ot=Object(w.a)(Ue),Tt=Ot.props,Mt=Fe(et,Tt.eventKey,We),Jt=et.props;if(!Jt||typeof et.type=="string")return et;var dn=Mt===ht.activeKey,fn=Object(y.a)(Object(y.a)({mode:Jt.mode||Tt.mode,level:Tt.level,inlineIndent:Tt.inlineIndent,renderMenuItem:Ue.renderMenuItem,rootPrefixCls:Tt.prefixCls,index:We,parentMenu:Tt.parentMenu,manualRef:Jt.disabled?void 0:Object(N.a)(et.ref,Wo.bind(Object(w.a)(Ue))),eventKey:Mt,active:!Jt.disabled&&dn,multiple:Tt.multiple,onClick:function(br){(Jt.onClick||fe)(br),Ue.onClick(br)},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:Jt.itemIcon||Ue.props.itemIcon,expandIcon:Jt.expandIcon||Ue.props.expandIcon},ct),{},{direction:Tt.direction});return(Tt.mode==="inline"||Ee())&&(fn.triggerSubMenuAction="click"),g.cloneElement(et,Object(y.a)(Object(y.a)({},fn),{},{key:Mt||We}))},Ue.renderMenuItem=function(et,We,ct){if(!et)return null;var ht=Ue.props.store.getState(),Ot={openKeys:ht.openKeys,selectedKeys:ht.selectedKeys,triggerSubMenuAction:Ue.props.triggerSubMenuAction,subMenuKey:ct};return Ue.renderCommonMenuItem(et,We,Ot)},ut.store.setState({activeKey:Object(y.a)(Object(y.a)({},ut.store.getState().activeKey),{},Object(I.a)({},ut.eventKey,ni(ut,ut.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||!z()(this.props.style,Ue.style)}},{key:"componentDidUpdate",value:function(Ue){var et=this.props,We="activeKey"in et?et.activeKey:et.store.getState().activeKey[ja(et)],ct=ni(et,We);if(ct!==We)Qa(et.store,ja(et),ct);else if("activeKey"in Ue){var ht=ni(Ue,Ue.activeKey);ct!==ht&&Qa(et.store,ja(et),ct)}}},{key:"render",value:function(){var Ue=this,et=Object(x.a)({},this.props);this.instanceArray=[];var We=_()(et.prefixCls,et.className,"".concat(et.prefixCls,"-").concat(et.mode)),ct={className:We,role:et.role||"menu"};et.id&&(ct.id=et.id),et.focusable&&(ct.tabIndex=0,ct.onKeyDown=this.onKeyDown);var ht=et.prefixCls,Ot=et.eventKey,Tt=et.visible,Mt=et.level,Jt=et.mode,dn=et.overflowedIndicator,fn=et.theme;return Y.forEach(function(Pn){return delete et[Pn]}),delete et.onClick,g.createElement(yo,Object(x.a)({},et,{prefixCls:ht,mode:Jt,tag:"ul",level:Mt,theme:fn,visible:Tt,overflowedIndicator:dn},ct),Object(p.a)(et.children).map(function(Pn,br){return Ue.renderMenuItem(Pn,br,Ot||"0-menu-")}))}}]),Rt}(g.Component);Ja.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:fe};var bo=Object(D.b)()(Ja),Ao=bo,Za=b("Kwbf");function Xo(ot,wt,Rt){var ut=ot.prefixCls,Ue=ot.motion,et=ot.defaultMotions,We=et===void 0?{}:et,ct=ot.openAnimation,ht=ot.openTransitionName,Ot=wt.switchingModeFromInline;if(Ue)return Ue;if(Object(X.a)(ct)==="object"&&ct)Object(Za.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof ct=="string")return{motionName:"".concat(ut,"-open-").concat(ct)};if(ht)return{motionName:ht};var Tt=We[Rt];return Tt||(Ot?null:We.other)}var er=function(ot){Object(S.a)(Rt,ot);var wt=Object(A.a)(Rt);function Rt(ut){var Ue;Object(O.a)(this,Rt),Ue=wt.call(this,ut),Ue.onSelect=function(ct){var ht=Object(w.a)(Ue),Ot=ht.props;if(Ot.selectable){var Tt=Ue.store.getState(),Mt=Tt.selectedKeys,Jt=ct.key;Ot.multiple?Mt=Mt.concat([Jt]):Mt=[Jt],"selectedKeys"in Ot||Ue.store.setState({selectedKeys:Mt}),Ot.onSelect(Object(y.a)(Object(y.a)({},ct),{},{selectedKeys:Mt}))}},Ue.onClick=function(ct){var ht=Ue.getRealMenuMode(),Ot=Object(w.a)(Ue),Tt=Ot.store,Mt=Ot.props.onOpenChange;ht!=="inline"&&!("openKeys"in Ue.props)&&(Tt.setState({openKeys:[]}),Mt([])),Ue.props.onClick(ct)},Ue.onKeyDown=function(ct,ht){Ue.innerMenu.getWrappedInstance().onKeyDown(ct,ht)},Ue.onOpenChange=function(ct){var ht=Object(w.a)(Ue),Ot=ht.props,Tt=Ue.store.getState().openKeys.concat(),Mt=!1,Jt=function(fn){var Pn=!1;if(fn.open)Pn=Tt.indexOf(fn.key)===-1,Pn&&Tt.push(fn.key);else{var br=Tt.indexOf(fn.key);Pn=br!==-1,Pn&&Tt.splice(br,1)}Mt=Mt||Pn};Array.isArray(ct)?ct.forEach(Jt):Jt(ct),Mt&&("openKeys"in Ue.props||Ue.store.setState({openKeys:Tt}),Ot.onOpenChange(Tt))},Ue.onDeselect=function(ct){var ht=Object(w.a)(Ue),Ot=ht.props;if(Ot.selectable){var Tt=Ue.store.getState().selectedKeys.concat(),Mt=ct.key,Jt=Tt.indexOf(Mt);Jt!==-1&&Tt.splice(Jt,1),"selectedKeys"in Ot||Ue.store.setState({selectedKeys:Tt}),Ot.onDeselect(Object(y.a)(Object(y.a)({},ct),{},{selectedKeys:Tt}))}},Ue.onMouseEnter=function(ct){Ue.restoreModeVerticalFromInline();var ht=Ue.props.onMouseEnter;ht&&ht(ct)},Ue.onTransitionEnd=function(ct){var ht=ct.propertyName==="width"&&ct.target===ct.currentTarget,Ot=ct.target.className,Tt=Object.prototype.toString.call(Ot)==="[object SVGAnimatedString]"?Ot.animVal:Ot,Mt=ct.propertyName==="font-size"&&Tt.indexOf("anticon")>=0;(ht||Mt)&&Ue.restoreModeVerticalFromInline()},Ue.setInnerMenu=function(ct){Ue.innerMenu=ct},Ue.isRootMenu=!0;var et=ut.defaultSelectedKeys,We=ut.defaultOpenKeys;return"selectedKeys"in ut&&(et=ut.selectedKeys||[]),"openKeys"in ut&&(We=ut.openKeys||[]),Ue.store=Object(D.c)({selectedKeys:et,openKeys:We,activeKey:{"0-menu-":ni(ut,ut.activeKey)}}),Ue.state={switchingModeFromInline:!1,prevProps:ut,inlineOpenKeys:[],store:Ue.store},Ue}return Object(C.a)(Rt,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(Ue){var et=this.props,We=et.siderCollapsed,ct=et.inlineCollapsed,ht=et.onOpenChange;(!Ue.inlineCollapsed&&ct||!Ue.siderCollapsed&&We)&&ht([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var Ue=this.props.collapsedWidth,et=this.store,We=this.prevOpenKeys,ct=this.getInlineCollapsed()&&(Ue===0||Ue==="0"||Ue==="0px");ct?(this.prevOpenKeys=et.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,et=this.state.switchingModeFromInline,We=this.getInlineCollapsed();return et&&We?"inline":We?"vertical":Ue}},{key:"getInlineCollapsed",value:function(){var Ue=this.props,et=Ue.inlineCollapsed,We=Ue.siderCollapsed;return We!==void 0?We:et}},{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(M.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),et=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:et,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Xo(this.props,this.state,et)}),delete Ue.openAnimation,delete Ue.openTransitionName,g.createElement(D.a,{store:this.store},g.createElement(Ao,Object(x.a)({},Ue,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(Ue,et){var We=et.prevProps,ct=et.store,ht=ct.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=ht.openKeys,Ot.openKeys=[]),(!Ue.inlineCollapsed&&We.inlineCollapsed||!Ue.siderCollapsed&&We.siderCollapsed)&&(Ot.openKeys=et.inlineOpenKeys,Tt.inlineOpenKeys=[])),Object.keys(Ot).length&&ct.setState(Ot),Tt}}]),Rt}(g.Component);er.defaultProps={selectable:!0,onClick:fe,onSelect:fe,onOpenChange:fe,onDeselect:fe,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 _r=er,tr=function(ot){Object(S.a)(Rt,ot);var wt=Object(A.a)(Rt);function Rt(){var ut;return Object(O.a)(this,Rt),ut=wt.apply(this,arguments),ut.onKeyDown=function(Ue){var et=Ue.keyCode;return et===a.a.ENTER?(ut.onClick(Ue),!0):void 0},ut.onMouseLeave=function(Ue){var et=ut.props,We=et.eventKey,ct=et.onItemHover,ht=et.onMouseLeave;ct({key:We,hover:!1}),ht({key:We,domEvent:Ue})},ut.onMouseEnter=function(Ue){var et=ut.props,We=et.eventKey,ct=et.onItemHover,ht=et.onMouseEnter;ct({key:We,hover:!0}),ht({key:We,domEvent:Ue})},ut.onClick=function(Ue){var et=ut.props,We=et.eventKey,ct=et.multiple,ht=et.onClick,Ot=et.onSelect,Tt=et.onDeselect,Mt=et.isSelected,Jt={key:We,keyPath:[We],item:Object(w.a)(ut),domEvent:Ue};ht(Jt),ct?Mt?Tt(Jt):Ot(Jt):Mt||Ot(Jt)},ut.saveNode=function(Ue){ut.node=Ue},ut}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,et=Object(y.a)({},this.props),We=_()(this.getPrefixCls(),et.className,(Ue={},Object(I.a)(Ue,this.getActiveClassName(),!et.disabled&&et.active),Object(I.a)(Ue,this.getSelectedClassName(),et.isSelected),Object(I.a)(Ue,this.getDisabledClassName(),et.disabled),Ue)),ct=Object(y.a)(Object(y.a)({},et.attribute),{},{title:typeof et.title=="string"?et.title:void 0,className:We,role:et.role||"menuitem","aria-disabled":et.disabled});et.role==="option"?ct=Object(y.a)(Object(y.a)({},ct),{},{role:"option","aria-selected":et.isSelected}):(et.role===null||et.role==="none")&&(ct.role="none");var ht={onClick:et.disabled?null:this.onClick,onMouseLeave:et.disabled?null:this.onMouseLeave,onMouseEnter:et.disabled?null:this.onMouseEnter},Ot=Object(y.a)({},et.style);et.mode==="inline"&&(et.direction==="rtl"?Ot.paddingRight=et.inlineIndent*et.level:Ot.paddingLeft=et.inlineIndent*et.level),Y.forEach(function(Mt){return delete et[Mt]}),delete et.direction;var Tt=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(Tt=g.createElement(this.props.itemIcon,this.props)),g.createElement("li",Object(x.a)({},Object(M.a)(et,["onClick","onMouseEnter","onMouseLeave","onSelect"]),ct,ht,{style:Ot,ref:this.saveNode}),et.children,Tt)}}]),Rt}(g.Component);tr.isMenuItem=!0,tr.defaultProps={onSelect:fe,onMouseEnter:fe,onMouseLeave:fe,manualRef:fe};var Mr=Object(D.b)(function(ot,wt){var Rt=ot.activeKey,ut=ot.selectedKeys,Ue=wt.eventKey,et=wt.subMenuKey;return{active:Rt[et]===Ue,isSelected:Array.isArray(ut)?ut.indexOf(Ue)!==-1:ut===Ue}})(tr),Hr=Mr,mi=function(ot){Object(S.a)(Rt,ot);var wt=Object(A.a)(Rt);function Rt(){var ut;return Object(O.a)(this,Rt),ut=wt.apply(this,arguments),ut.renderInnerMenuItem=function(Ue){var et=ut.props,We=et.renderMenuItem,ct=et.index;return We(Ue,ct,ut.props.subMenuKey)},ut}return Object(C.a)(Rt,[{key:"render",value:function(){var Ue=Object(x.a)({},this.props),et=Ue.className,We=et===void 0?"":et,ct=Ue.rootPrefixCls,ht="".concat(ct,"-item-group-title"),Ot="".concat(ct,"-item-group-list"),Tt=Ue.title,Mt=Ue.children;return Y.forEach(function(Jt){return delete Ue[Jt]}),delete Ue.direction,g.createElement("li",Object(x.a)({},Ue,{onClick:function(dn){return dn.stopPropagation()},className:"".concat(We," ").concat(ct,"-item-group")}),g.createElement("div",{className:ht,title:typeof Tt=="string"?Tt:void 0},Tt),g.createElement("ul",{className:Ot},g.Children.map(Mt,this.renderInnerMenuItem)))}}]),Rt}(g.Component);mi.isMenuItemGroup=!0,mi.defaultProps={disabled:!0};var fr=mi,Wi=function(wt){var Rt=wt.className,ut=wt.rootPrefixCls,Ue=wt.style;return g.createElement("li",{className:"".concat(Rt," ").concat(ut,"-item-divider"),style:Ue})};Wi.defaultProps={disabled:!0,className:"",style:{}};var Ea=Wi,jr=_r,ro=b("eDIo");function ui(ot,wt){var Rt=ot.prefixCls,ut=ot.editable,Ue=ot.locale,et=ot.style;return!ut||ut.showAdd===!1?null:g.createElement("button",{ref:wt,type:"button",className:"".concat(Rt,"-nav-add"),style:et,"aria-label":(Ue==null?void 0:Ue.addAriaLabel)||"Add tab",onClick:function(ct){ut.onEdit("add",{event:ct})}},ut.addIcon||"+")}var Oi=g.forwardRef(ui);function xa(ot,wt){var Rt=ot.prefixCls,ut=ot.id,Ue=ot.tabs,et=ot.locale,We=ot.mobile,ct=ot.moreIcon,ht=ct===void 0?"More":ct,Ot=ot.moreTransitionName,Tt=ot.style,Mt=ot.className,Jt=ot.editable,dn=ot.tabBarGutter,fn=ot.rtl,Pn=ot.onTabClick,br=Object(g.useState)(!1),Yr=Object(v.a)(br,2),Pr=Yr[0],Wr=Yr[1],Qr=Object(g.useState)(null),Xr=Object(v.a)(Qr,2),zr=Xr[0],li=Xr[1],$r="".concat(ut,"-more-popup"),Qi="".concat(Rt,"-dropdown"),ei=zr!==null?"".concat($r,"-").concat(zr):null,pr=et==null?void 0:et.dropdownAriaLabel,hr=g.createElement(jr,{onClick:function(Ti){var Li=Ti.key,ma=Ti.domEvent;Pn(Li,ma),Wr(!1)},id:$r,tabIndex:-1,role:"listbox","aria-activedescendant":ei,selectedKeys:[zr],"aria-label":pr!==void 0?pr:"expanded dropdown"},Ue.map(function(bi){return g.createElement(Hr,{key:bi.key,id:"".concat($r,"-").concat(bi.key),role:"option","aria-controls":ut&&"".concat(ut,"-panel-").concat(bi.key),disabled:bi.disabled},bi.tab)}));function ri(bi){for(var Ti=Ue.filter(function(io){return!io.disabled}),Li=Ti.findIndex(function(io){return io.key===zr})||0,ma=Ti.length,Ia=0;Ia<ma;Ia+=1){Li=(Li+bi+ma)%ma;var na=Ti[Li];if(!na.disabled){li(na.key);return}}}function hi(bi){var Ti=bi.which;if(!Pr){[a.a.DOWN,a.a.SPACE,a.a.ENTER].includes(Ti)&&(Wr(!0),bi.preventDefault());return}switch(Ti){case a.a.UP:ri(-1),bi.preventDefault();break;case a.a.DOWN:ri(1),bi.preventDefault();break;case a.a.ESC:Wr(!1);break;case a.a.SPACE:case a.a.ENTER:zr!==null&&Pn(zr,bi);break}}Object(g.useEffect)(function(){var bi=document.getElementById(ei);bi&&bi.scrollIntoView&&bi.scrollIntoView(!1)},[zr]),Object(g.useEffect)(function(){Pr||li(null)},[Pr]);var ir=Object(I.a)({},fn?"marginLeft":"marginRight",dn);Ue.length||(ir.visibility="hidden",ir.order=1);var gi=_()(Object(I.a)({},"".concat(Qi,"-rtl"),fn)),qi=We?null:g.createElement(ro.a,{prefixCls:Qi,overlay:hr,trigger:["hover"],visible:Pr,transitionName:Ot,onVisibleChange:Wr,overlayClassName:gi,mouseEnterDelay:.1,mouseLeaveDelay:.1},g.createElement("button",{type:"button",className:"".concat(Rt,"-nav-more"),style:ir,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":$r,id:"".concat(ut,"-more"),"aria-expanded":Pr,onKeyDown:hi},ht));return g.createElement("div",{className:_()("".concat(Rt,"-nav-operations"),Mt),style:Tt,ref:wt},qi,g.createElement(Oi,{prefixCls:Rt,locale:et,editable:Jt}))}var Ba=g.forwardRef(xa),zo=Object(g.createContext)(null),ci=.1,Mn=.01,nn=20,Un=Math.pow(.995,nn);function En(){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 ur(ot,wt){var Rt=Object(g.useState)(),ut=Object(v.a)(Rt,2),Ue=ut[0],et=ut[1],We=Object(g.useState)(0),ct=Object(v.a)(We,2),ht=ct[0],Ot=ct[1],Tt=Object(g.useState)(0),Mt=Object(v.a)(Tt,2),Jt=Mt[0],dn=Mt[1],fn=Object(g.useState)(),Pn=Object(v.a)(fn,2),br=Pn[0],Yr=Pn[1],Pr=Object(g.useRef)();function Wr(pr){var hr=pr.touches[0],ri=hr.screenX,hi=hr.screenY;et({x:ri,y:hi}),window.clearInterval(Pr.current)}function Qr(pr){if(!Ue)return;pr.preventDefault();var hr=pr.touches[0],ri=hr.screenX,hi=hr.screenY;et({x:ri,y:hi});var ir=ri-Ue.x,gi=hi-Ue.y;wt(ir,gi);var qi=Date.now();Ot(qi),dn(qi-ht),Yr({x:ir,y:gi})}function Xr(){if(!Ue)return;if(et(null),Yr(null),br){var pr=br.x/Jt,hr=br.y/Jt,ri=Math.abs(pr),hi=Math.abs(hr);if(Math.max(ri,hi)<ci)return;var ir=pr,gi=hr;Pr.current=window.setInterval(function(){if(Math.abs(ir)<Mn&&Math.abs(gi)<Mn){window.clearInterval(Pr.current);return}ir*=Un,gi*=Un,wt(ir*nn,gi*nn)},nn)}}var zr=Object(g.useRef)(0),li=Object(g.useRef)(!1),$r=Object(g.useRef)();function Qi(pr){var hr=pr.deltaX,ri=pr.deltaY,hi=0,ir=Math.abs(hr),gi=Math.abs(ri);ir===gi?hi=$r.current==="x"?hr:ri:ir>gi?(hi=hr,$r.current="x"):(hi=ri,$r.current="y");var qi=Date.now();qi-zr.current>100&&(li.current=!1),(wt(-hi,-hi)||li.current)&&(pr.preventDefault(),li.current=!0),zr.current=qi}var ei=Object(g.useRef)(null);ei.current={onTouchStart:Wr,onTouchMove:Qr,onTouchEnd:Xr,onWheel:Qi},g.useEffect(function(){function pr(ir){ei.current.onTouchStart(ir)}function hr(ir){ei.current.onTouchMove(ir)}function ri(ir){ei.current.onTouchEnd(ir)}function hi(ir){ei.current.onWheel(ir)}return document.addEventListener("touchmove",hr,{passive:!1}),document.addEventListener("touchend",ri,{passive:!1}),ot.current.addEventListener("touchstart",pr,{passive:!1}),ot.current.addEventListener("wheel",hi),function(){document.removeEventListener("touchmove",hr),document.removeEventListener("touchend",ri)}},[])}function Dr(){var ot=Object(g.useRef)(new Map);function wt(ut){return ot.current.has(ut)||ot.current.set(ut,g.createRef()),ot.current.get(ut)}function Rt(ut){ot.current.delete(ut)}return[wt,Rt]}function di(ot,wt){var Rt=g.useRef(ot),ut=g.useState({}),Ue=Object(v.a)(ut,2),et=Ue[1];function We(ct){var ht=typeof ct=="function"?ct(Rt.current):ct;ht!==Rt.current&&wt(ht,Rt.current),Rt.current=ht,et({})}return[Rt.current,We]}var yi=function(wt){var Rt=wt.position,ut=wt.prefixCls,Ue=wt.extra;if(!Ue)return null;var et,We=Ue;return Rt==="right"&&(et=We.right||!We.left&&We||null),Rt==="left"&&(et=We.left||null),et?g.createElement("div",{className:"".concat(ut,"-extra-content")},et):null};function Yi(ot,wt){var Rt,ut=g.useContext(zo),Ue=ut.prefixCls,et=ut.tabs,We=ot.className,ct=ot.style,ht=ot.id,Ot=ot.animated,Tt=ot.activeKey,Mt=ot.rtl,Jt=ot.extra,dn=ot.editable,fn=ot.locale,Pn=ot.tabPosition,br=ot.tabBarGutter,Yr=ot.children,Pr=ot.onTabClick,Wr=ot.onTabScroll,Qr=Object(g.useRef)(),Xr=Object(g.useRef)(),zr=Object(g.useRef)(),li=Object(g.useRef)(),$r=Dr(),Qi=Object(v.a)($r,2),ei=Qi[0],pr=Qi[1],hr=Pn==="top"||Pn==="bottom",ri=di(0,function(we,qe){hr&&Wr&&Wr({direction:we>qe?"left":"right"})}),hi=Object(v.a)(ri,2),ir=hi[0],gi=hi[1],qi=di(0,function(we,qe){!hr&&Wr&&Wr({direction:we>qe?"top":"bottom"})}),bi=Object(v.a)(qi,2),Ti=bi[0],Li=bi[1],ma=Object(g.useState)(0),Ia=Object(v.a)(ma,2),na=Ia[0],io=Ia[1],Ro=Object(g.useState)(0),Eo=Object(v.a)(Ro,2),ka=Eo[0],zi=Eo[1],Ki=Object(g.useState)(0),ra=Object(v.a)(Ki,2),$i=ra[0],Do=ra[1],Yo=Object(g.useState)(0),Qo=Object(v.a)(Yo,2),Mi=Qo[0],Vo=Qo[1],Jo=Object(g.useState)(null),Fi=Object(v.a)(Jo,2),Ri=Fi[0],La=Fi[1],js=Object(g.useState)(null),ll=Object(v.a)(js,2),Zo=ll[0],as=ll[1],Bs=Object(g.useState)(0),Sl=Object(v.a)(Bs,2),Ks=Sl[0],Cl=Sl[1],Ul=Object(g.useState)(0),Tl=Object(v.a)(Ul,2),ul=Tl[0],cl=Tl[1],vs=t(new Map),os=Object(v.a)(vs,2),Fl=os[0],As=os[1],Os=h(et,Fl,na),ss="".concat(Ue,"-nav-operations-hidden"),_s=0,Io=0;hr?Mt?(_s=0,Io=Math.max(0,na-Ri)):(_s=Math.min(0,Ri-na),Io=0):(_s=Math.min(0,Zo-ka),Io=0);function ls(we){return we<_s?[_s,!1]:we>Io?[Io,!1]:[we,!0]}var qo=Object(g.useRef)(),us=Object(g.useState)(),ys=Object(v.a)(us,2),Hs=ys[0],Al=ys[1];function Ws(){Al(Date.now())}function dl(){window.clearTimeout(qo.current)}ur(Qr,function(we,qe){var it=!1;function At(kt,vt){kt(function(at){var Lt=ls(at+vt),Ct=Object(v.a)(Lt,2),_t=Ct[0],St=Ct[1];return it=St,_t})}if(hr){if(Ri>=na)return it;At(gi,we)}else{if(Zo>=ka)return it;At(Li,qe)}return dl(),Ws(),it}),Object(g.useEffect)(function(){return dl(),Hs&&(qo.current=window.setTimeout(function(){Al(0)},100)),dl},[Hs]);function $o(){var we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Tt,qe=Os.get(we);if(!qe)return;if(hr){var it=ir;Mt?qe.right<ir?it=qe.right:qe.right+qe.width>ir+Ri&&(it=qe.right+qe.width-Ri):qe.left<-ir?it=-qe.left:qe.left+qe.width>-ir+Ri&&(it=-(qe.left+qe.width-Ri)),Li(0),gi(ls(it)[0])}else{var At=Ti;qe.top<-Ti?At=-qe.top:qe.top+qe.height>-Ti+Zo&&(At=-(qe.top+qe.height-Zo)),gi(0),Li(ls(At)[0])}}var cs=E(Os,{width:Ri,height:Zo,left:ir,top:Ti},{width:$i,height:Mi},{width:Ks,height:ul},Object(y.a)(Object(y.a)({},ot),{},{tabs:et})),Ol=Object(v.a)(cs,2),jl=Ol[0],hl=Ol[1],fl=et.map(function(we){var qe=we.key;return g.createElement(d,{id:ht,prefixCls:Ue,key:qe,rtl:Mt,tab:we,closable:we.closable,editable:dn,active:qe===Tt,tabPosition:Pn,tabBarGutter:br,renderWrapper:Yr,removeAriaLabel:fn==null?void 0:fn.removeAriaLabel,ref:ei(qe),onClick:function(At){Pr(qe,At)},onRemove:function(){pr(qe)},onFocus:function(){$o(qe),Ws(),Mt||(Qr.current.scrollLeft=0),Qr.current.scrollTop=0}})}),pl=i(function(){var we,qe,it,At,kt,vt,at,Lt,Ct,_t=((we=Qr.current)===null||we===void 0?void 0:we.offsetWidth)||0,St=((qe=Qr.current)===null||qe===void 0?void 0:qe.offsetHeight)||0,Gt=((it=li.current)===null||it===void 0?void 0:it.offsetWidth)||0,Ft=((At=li.current)===null||At===void 0?void 0:At.offsetHeight)||0,It=((kt=zr.current)===null||kt===void 0?void 0:kt.offsetWidth)||0,Vt=((vt=zr.current)===null||vt===void 0?void 0:vt.offsetHeight)||0;La(_t),as(St),Cl(Gt),cl(Ft);var Zt=(((at=Xr.current)===null||at===void 0?void 0:at.offsetWidth)||0)-Gt,on=(((Lt=Xr.current)===null||Lt===void 0?void 0:Lt.offsetHeight)||0)-Ft;io(Zt),zi(on);var ln=(Ct=zr.current)===null||Ct===void 0?void 0:Ct.className.includes(ss);Do(Zt-(ln?0:It)),Vo(on-(ln?0:Vt)),As(function(){var On=new Map;return et.forEach(function(Nn){var Sn=Nn.key,wn=ei(Sn).current;wn&&On.set(Sn,{width:wn.offsetWidth,height:wn.offsetHeight,left:wn.offsetLeft,top:wn.offsetTop})}),On})}),Bl=et.slice(0,jl),uo=et.slice(hl+1),ia=[].concat(Object(o.a)(Bl),Object(o.a)(uo)),qa=Object(g.useState)(),wa=Object(v.a)(qa,2),Rs=wa[0],Kl=wa[1],ko=Os.get(Tt),Hl=Object(g.useRef)();function Rl(){l.a.cancel(Hl.current)}Object(g.useEffect)(function(){var we={};return ko&&(hr?(Mt?we.right=ko.right:we.left=ko.left,we.width=ko.width):(we.top=ko.top,we.height=ko.height)),Rl(),Hl.current=l()(function(){Kl(we)}),Rl},[ko,hr,Mt]),Object(g.useEffect)(function(){$o()},[Tt,ko,Os,hr]),Object(g.useEffect)(function(){pl()},[Mt,br,Tt,et.map(function(we){return we.key}).join("_")]);var Wl=!!ia.length,ds="".concat(Ue,"-nav-wrap"),Xs,zs,Dl,Gs;return hr?Mt?(zs=ir>0,Xs=ir+Ri<na):(Xs=ir<0,zs=-ir+Ri<na):(Dl=Ti<0,Gs=-Ti+Zo<ka),g.createElement("div",{ref:wt,role:"tablist",className:_()("".concat(Ue,"-nav"),We),style:ct,onKeyDown:function(){Ws()}},g.createElement(yi,{position:"left",extra:Jt,prefixCls:Ue}),g.createElement(r.a,{onResize:pl},g.createElement("div",{className:_()(ds,(Rt={},Object(I.a)(Rt,"".concat(ds,"-ping-left"),Xs),Object(I.a)(Rt,"".concat(ds,"-ping-right"),zs),Object(I.a)(Rt,"".concat(ds,"-ping-top"),Dl),Object(I.a)(Rt,"".concat(ds,"-ping-bottom"),Gs),Rt)),ref:Qr},g.createElement(r.a,{onResize:pl},g.createElement("div",{ref:Xr,className:"".concat(Ue,"-nav-list"),style:{transform:"translate(".concat(ir,"px, ").concat(Ti,"px)"),transition:Hs?"none":void 0}},fl,g.createElement(Oi,{ref:li,prefixCls:Ue,locale:fn,editable:dn,style:{visibility:Wl?"hidden":null}}),g.createElement("div",{className:_()("".concat(Ue,"-ink-bar"),Object(I.a)({},"".concat(Ue,"-ink-bar-animated"),Ot.inkBar)),style:Rs}))))),g.createElement(Ba,Object.assign({},ot,{ref:zr,prefixCls:Ue,tabs:ia,className:!Wl&&ss})),g.createElement(yi,{position:"right",extra:Jt,prefixCls:Ue}))}var Ui=g.forwardRef(Yi);function Xi(ot){var wt=ot.id,Rt=ot.activeKey,ut=ot.animated,Ue=ot.tabPosition,et=ot.rtl,We=ot.destroyInactiveTabPane,ct=g.useContext(zo),ht=ct.prefixCls,Ot=ct.tabs,Tt=ut.tabPane,Mt=Ot.findIndex(function(Jt){return Jt.key===Rt});return g.createElement("div",{className:_()("".concat(ht,"-content-holder"))},g.createElement("div",{className:_()("".concat(ht,"-content"),"".concat(ht,"-content-").concat(Ue),Object(I.a)({},"".concat(ht,"-content-animated"),Tt)),style:Mt&&Tt?Object(I.a)({},et?"marginRight":"marginLeft","-".concat(Mt,"00%")):null},Ot.map(function(Jt){return g.cloneElement(Jt.node,{key:Jt.key,prefixCls:ht,tabKey:Jt.key,id:wt,animated:Tt,active:Jt.key===Rt,destroyInactiveTabPane:We})})))}function Oo(ot){var wt=ot.prefixCls,Rt=ot.forceRender,ut=ot.className,Ue=ot.style,et=ot.id,We=ot.active,ct=ot.animated,ht=ot.destroyInactiveTabPane,Ot=ot.tabKey,Tt=ot.children,Mt=g.useState(Rt),Jt=Object(v.a)(Mt,2),dn=Jt[0],fn=Jt[1];g.useEffect(function(){We?fn(!0):ht&&fn(!1)},[We,ht]);var Pn={};return We||(ct?(Pn.visibility="hidden",Pn.height=0,Pn.overflowY="hidden"):Pn.display="none"),g.createElement("div",{id:et&&"".concat(et,"-panel-").concat(Ot),role:"tabpanel",tabIndex:We?0:-1,"aria-labelledby":et&&"".concat(et,"-tab-").concat(Ot),"aria-hidden":!We,style:Object(y.a)(Object(y.a)({},Pn),Ue),className:_()("".concat(wt,"-tabpane"),We&&"".concat(wt,"-tabpane-active"),ut)},(We||dn||Rt)&&Tt)}var Ta=0;function Fs(ot){return Object(p.a)(ot).map(function(wt){if(g.isValidElement(wt)){var Rt=wt.key!==void 0?String(wt.key):void 0;return Object(y.a)(Object(y.a)({key:Rt},wt.props),{},{node:wt})}return null}).filter(function(wt){return wt})}function ol(ot,wt){var Rt,ut=ot.id,Ue=ot.prefixCls,et=Ue===void 0?"rc-tabs":Ue,We=ot.className,ct=ot.children,ht=ot.direction,Ot=ot.activeKey,Tt=ot.defaultActiveKey,Mt=ot.editable,Jt=ot.animated,dn=ot.tabPosition,fn=dn===void 0?"top":dn,Pn=ot.tabBarGutter,br=ot.tabBarStyle,Yr=ot.tabBarExtraContent,Pr=ot.locale,Wr=ot.moreIcon,Qr=ot.moreTransitionName,Xr=ot.destroyInactiveTabPane,zr=ot.renderTabBar,li=ot.onChange,$r=ot.onTabClick,Qi=ot.onTabScroll,ei=Object(T.a)(ot,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),pr=Fs(ct),hr=ht==="rtl",ri;Jt===!1?ri={inkBar:!1,tabPane:!1}:ri=Object(y.a)({inkBar:!0,tabPane:!1},Jt!==!0?Jt:null);var hi=Object(g.useState)(!1),ir=Object(v.a)(hi,2),gi=ir[0],qi=ir[1];Object(g.useEffect)(function(){qi(En())},[]);var bi=Object(e.a)(function(){var Mi;return(Mi=pr[0])===null||Mi===void 0?void 0:Mi.key},{value:Ot,defaultValue:Tt}),Ti=Object(v.a)(bi,2),Li=Ti[0],ma=Ti[1],Ia=Object(g.useState)(function(){return pr.findIndex(function(Mi){return Mi.key===Li})}),na=Object(v.a)(Ia,2),io=na[0],Ro=na[1];Object(g.useEffect)(function(){var Mi=pr.findIndex(function(Jo){return Jo.key===Li});if(Mi===-1){var Vo;Mi=Math.max(0,Math.min(io,pr.length-1)),ma((Vo=pr[Mi])===null||Vo===void 0?void 0:Vo.key)}Ro(Mi)},[pr.map(function(Mi){return Mi.key}).join("_"),Li,io]);var Eo=Object(e.a)(null,{value:ut}),ka=Object(v.a)(Eo,2),zi=ka[0],Ki=ka[1],ra=fn;gi&&!["left","right"].includes(fn)&&(ra="top"),Object(g.useEffect)(function(){ut||(Ki("rc-tabs-".concat(Ta)),Ta+=1)},[]);function $i(Mi,Vo){$r==null||$r(Mi,Vo),ma(Mi),li==null||li(Mi)}var Do={id:zi,activeKey:Li,animated:ri,tabPosition:ra,rtl:hr,mobile:gi},Yo,Qo=Object(y.a)(Object(y.a)({},Do),{},{editable:Mt,locale:Pr,moreIcon:Wr,moreTransitionName:Qr,tabBarGutter:Pn,onTabClick:$i,onTabScroll:Qi,extra:Yr,style:br,panes:ct});return zr?Yo=zr(Qo,Ui):Yo=g.createElement(Ui,Object.assign({},Qo)),g.createElement(zo.Provider,{value:{tabs:pr,prefixCls:et}},g.createElement("div",Object.assign({ref:wt,id:ut,className:_()(et,"".concat(et,"-").concat(ra),(Rt={},Object(I.a)(Rt,"".concat(et,"-mobile"),gi),Object(I.a)(Rt,"".concat(et,"-editable"),Mt),Object(I.a)(Rt,"".concat(et,"-rtl"),hr),Rt),We)},ei),Yo,g.createElement(Xi,Object.assign({destroyInactiveTabPane:Xr},Do,{animated:ri}))))}var Aa=g.forwardRef(ol);Aa.TabPane=Oo;var Go=Aa,sl=H.b=Go},kPWJ:function(j,H,b){j.exports=b.p+"static/question.cb52bef9.gif"},kPYp:function(j,H){j.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(j,H,b){},"kaH+":function(j,H,b){"use strict";var I=b("+L6B"),v=b("2/Rp"),T=b("tJVT"),y=b("q1tI"),g=b.n(y),s=b("UZu5"),_=b.n(s),p=b("dhSg"),e=b("rLCj"),o=b("dF/Y"),n=b("4i/N");H.a=function(){var l=Object(y.useState)(""),r=Object(T.a)(l,2),i=r[0],t=r[1],a=Object(y.useState)(0),c=Object(T.a)(a,2),d=c[0],f=c[1],h=Object(y.useRef)("");Object(y.useEffect)(function(){var S=p.a.subscribe("preview-image",function(A){t(A),document.body.style.overflow="hidden"});return S},[]),Object(y.useEffect)(function(){return document.addEventListener("keydown",u),function(){document.removeEventListener("keydown",u)}},[]),Object(y.useEffect)(function(){h.current=i},[i]);function u(S){S.keyCode==27&&h.current&&E()}function E(){document.body.style.overflow="auto",t("")}function x(){f(d+90)}var O=Object(y.useRef)(),C=Object(y.useRef)(),w=function(A){(A.nativeEvent.target===O.current||A.nativeEvent.target===C.current)&&E()};return g.a.createElement(y.Fragment,null,i?g.a.createElement("div",{className:"image-preview-container",ref:O,onClick:w},g.a.createElement("div",{className:"button-group"},g.a.createElement(v.a,{onClick:x},"\u65CB\u8F6C",g.a.createElement(e.a,null)),g.a.createElement(v.a,{href:i},"\u4E0B\u8F7D",g.a.createElement(o.a,null)),g.a.createElement(v.a,{onClick:E},"\u5173\u95ED",g.a.createElement(n.a,null))),g.a.createElement("div",{className:"preview-wrp-group",ref:C},g.a.createElement("img",{className:"image-preview",src:i,alt:"\u9884\u89C8\u5927\u56FE",style:{transform:"rotate(".concat(d,"deg)")}}))):null)}},"l/DK":function(j,H,b){j.exports={"path-container":"path-container___pFrW9",active:"active___38ez8"}},l2Kq:function(j,H,b){j.exports=b.p+"static/match_ad.24dc22fd.jpg"},l9Ud:function(j,H,b){j.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(j,H,b){"use strict";function I(ne){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(lt){return typeof lt}:I=function(lt){return lt&&typeof Symbol=="function"&<.constructor===Symbol&<!==Symbol.prototype?"symbol":typeof lt},I(ne)}Object.defineProperty(H,"__esModule",{value:!0}),H.deflateInit=ve,H.deflateInit2=He,H.deflateReset=Ye,H.deflateResetKeep=Je,H.deflateSetHeader=Pe,H.deflate=xe,H.deflateEnd=de,H.deflateSetDictionary=je,H.deflateInfo=H.Z_DEFLATED=H.Z_UNKNOWN=H.Z_DEFAULT_STRATEGY=H.Z_FIXED=H.Z_RLE=H.Z_HUFFMAN_ONLY=H.Z_FILTERED=H.Z_DEFAULT_COMPRESSION=H.Z_BUF_ERROR=H.Z_DATA_ERROR=H.Z_STREAM_ERROR=H.Z_STREAM_END=H.Z_OK=H.Z_BLOCK=H.Z_FINISH=H.Z_FULL_FLUSH=H.Z_PARTIAL_FLUSH=H.Z_NO_FLUSH=void 0;var v=e(b("6BzB")),T=e(b("c5fP")),y=_(b("xlC8")),g=_(b("QV2g")),s=_(b("xSIq"));function _(ne){return ne&&ne.__esModule?ne:{default:ne}}function p(){if(typeof WeakMap!="function")return null;var ne=new WeakMap;return p=function(){return ne},ne}function e(ne){if(ne&&ne.__esModule)return ne;if(ne===null||I(ne)!=="object"&&typeof ne!="function")return{default:ne};var Ze=p();if(Ze&&Ze.has(ne))return Ze.get(ne);var lt={},Be=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var $e in ne)if(Object.prototype.hasOwnProperty.call(ne,$e)){var rt=Be?Object.getOwnPropertyDescriptor(ne,$e):null;rt&&(rt.get||rt.set)?Object.defineProperty(lt,$e,rt):lt[$e]=ne[$e]}return lt.default=ne,Ze&&Ze.set(ne,lt),lt}var o=0;H.Z_NO_FLUSH=o;var n=1;H.Z_PARTIAL_FLUSH=n;var l=3;H.Z_FULL_FLUSH=l;var r=4;H.Z_FINISH=r;var i=5;H.Z_BLOCK=i;var t=0;H.Z_OK=t;var a=1;H.Z_STREAM_END=a;var c=-2;H.Z_STREAM_ERROR=c;var d=-3;H.Z_DATA_ERROR=d;var f=-5;H.Z_BUF_ERROR=f;var h=-1;H.Z_DEFAULT_COMPRESSION=h;var u=1;H.Z_FILTERED=u;var E=2;H.Z_HUFFMAN_ONLY=E;var x=3;H.Z_RLE=x;var O=4;H.Z_FIXED=O;var C=0;H.Z_DEFAULT_STRATEGY=C;var w=2;H.Z_UNKNOWN=w;var S=8;H.Z_DEFLATED=S;var A=9,D=15,M=8,N=29,P=256,z=P+1+N,X=30,k=19,F=2*z+1,U=15,L=3,B=258,Z=B+L+1,re=32,he=42,Ce=69,ke=73,te=91,Re=103,Te=113,pe=666,me=1,se=2,be=3,ae=4,fe=3;function Fe(ne,Ze){return ne.msg=s.default[Ze],Ze}function ie(ne){return(ne<<1)-(ne>4?9:0)}function q(ne){for(var Ze=ne.length;--Ze>=0;)ne[Ze]=0}function Q(ne){var Ze=ne.state,lt=Ze.pending;if(lt>ne.avail_out&&(lt=ne.avail_out),lt===0)return;v.arraySet(ne.output,Ze.pending_buf,Ze.pending_out,lt,ne.next_out),ne.next_out+=lt,Ze.pending_out+=lt,ne.total_out+=lt,ne.avail_out-=lt,Ze.pending-=lt,Ze.pending===0&&(Ze.pending_out=0)}function Y(ne,Ze){T._tr_flush_block(ne,ne.block_start>=0?ne.block_start:-1,ne.strstart-ne.block_start,Ze),ne.block_start=ne.strstart,Q(ne.strm)}function oe(ne,Ze){ne.pending_buf[ne.pending++]=Ze}function le(ne,Ze){ne.pending_buf[ne.pending++]=Ze>>>8&255,ne.pending_buf[ne.pending++]=Ze&255}function Ee(ne,Ze,lt,Be){var $e=ne.avail_in;return $e>Be&&($e=Be),$e===0?0:(ne.avail_in-=$e,v.arraySet(Ze,ne.input,ne.next_in,$e,lt),ne.state.wrap===1?ne.adler=(0,y.default)(ne.adler,Ze,$e,lt):ne.state.wrap===2&&(ne.adler=(0,g.default)(ne.adler,Ze,$e,lt)),ne.next_in+=$e,ne.total_in+=$e,$e)}function Le(ne,Ze){var lt=ne.max_chain_length,Be=ne.strstart,$e,rt,xt=ne.prev_length,ft=ne.nice_match,st=ne.strstart>ne.w_size-Z?ne.strstart-(ne.w_size-Z):0,Ne=ne.window,Ge=ne.w_mask,yt=ne.prev,pt=ne.strstart+B,jt=Ne[Be+xt-1],Bt=Ne[Be+xt];ne.prev_length>=ne.good_match&&(lt>>=2),ft>ne.lookahead&&(ft=ne.lookahead);do{if($e=Ze,Ne[$e+xt]!==Bt||Ne[$e+xt-1]!==jt||Ne[$e]!==Ne[Be]||Ne[++$e]!==Ne[Be+1])continue;Be+=2,$e++;do;while(Ne[++Be]===Ne[++$e]&&Ne[++Be]===Ne[++$e]&&Ne[++Be]===Ne[++$e]&&Ne[++Be]===Ne[++$e]&&Ne[++Be]===Ne[++$e]&&Ne[++Be]===Ne[++$e]&&Ne[++Be]===Ne[++$e]&&Ne[++Be]===Ne[++$e]&&Be<pt);if(rt=B-(pt-Be),Be=pt-B,rt>xt){if(ne.match_start=Ze,xt=rt,rt>=ft)break;jt=Ne[Be+xt-1],Bt=Ne[Be+xt]}}while((Ze=yt[Ze&Ge])>st&&--lt!==0);return xt<=ne.lookahead?xt:ne.lookahead}function ge(ne){var Ze=ne.w_size,lt,Be,$e,rt,xt;do{if(rt=ne.window_size-ne.lookahead-ne.strstart,ne.strstart>=Ze+(Ze-Z)){v.arraySet(ne.window,ne.window,Ze,Ze,0),ne.match_start-=Ze,ne.strstart-=Ze,ne.block_start-=Ze,Be=ne.hash_size,lt=Be;do $e=ne.head[--lt],ne.head[lt]=$e>=Ze?$e-Ze:0;while(--Be);Be=Ze,lt=Be;do $e=ne.prev[--lt],ne.prev[lt]=$e>=Ze?$e-Ze:0;while(--Be);rt+=Ze}if(ne.strm.avail_in===0)break;if(Be=Ee(ne.strm,ne.window,ne.strstart+ne.lookahead,rt),ne.lookahead+=Be,ne.lookahead+ne.insert>=L)for(xt=ne.strstart-ne.insert,ne.ins_h=ne.window[xt],ne.ins_h=(ne.ins_h<<ne.hash_shift^ne.window[xt+1])&ne.hash_mask;ne.insert&&!(ne.ins_h=(ne.ins_h<<ne.hash_shift^ne.window[xt+L-1])&ne.hash_mask,ne.prev[xt&ne.w_mask]=ne.head[ne.ins_h],ne.head[ne.ins_h]=xt,xt++,ne.insert--,ne.lookahead+ne.insert<L););}while(ne.lookahead<Z&&ne.strm.avail_in!==0)}function De(ne,Ze){var lt=65535;for(lt>ne.pending_buf_size-5&&(lt=ne.pending_buf_size-5);;){if(ne.lookahead<=1){if(ge(ne),ne.lookahead===0&&Ze===o)return me;if(ne.lookahead===0)break}ne.strstart+=ne.lookahead,ne.lookahead=0;var Be=ne.block_start+lt;if((ne.strstart===0||ne.strstart>=Be)&&(ne.lookahead=ne.strstart-Be,ne.strstart=Be,Y(ne,!1),ne.strm.avail_out===0))return me;if(ne.strstart-ne.block_start>=ne.w_size-Z&&(Y(ne,!1),ne.strm.avail_out===0))return me}return ne.insert=0,Ze===r?(Y(ne,!0),ne.strm.avail_out===0?be:ae):(ne.strstart>ne.block_start&&(Y(ne,!1),ne.strm.avail_out===0),me)}function _e(ne,Ze){for(var lt,Be;;){if(ne.lookahead<Z){if(ge(ne),ne.lookahead<Z&&Ze===o)return me;if(ne.lookahead===0)break}if(lt=0,ne.lookahead>=L&&(ne.ins_h=(ne.ins_h<<ne.hash_shift^ne.window[ne.strstart+L-1])&ne.hash_mask,lt=ne.prev[ne.strstart&ne.w_mask]=ne.head[ne.ins_h],ne.head[ne.ins_h]=ne.strstart),lt!==0&&ne.strstart-lt<=ne.w_size-Z&&(ne.match_length=Le(ne,lt)),ne.match_length>=L)if(Be=T._tr_tally(ne,ne.strstart-ne.match_start,ne.match_length-L),ne.lookahead-=ne.match_length,ne.match_length<=ne.max_lazy_match&&ne.lookahead>=L){ne.match_length--;do ne.strstart++,ne.ins_h=(ne.ins_h<<ne.hash_shift^ne.window[ne.strstart+L-1])&ne.hash_mask,lt=ne.prev[ne.strstart&ne.w_mask]=ne.head[ne.ins_h],ne.head[ne.ins_h]=ne.strstart;while(--ne.match_length!==0);ne.strstart++}else ne.strstart+=ne.match_length,ne.match_length=0,ne.ins_h=ne.window[ne.strstart],ne.ins_h=(ne.ins_h<<ne.hash_shift^ne.window[ne.strstart+1])&ne.hash_mask;else Be=T._tr_tally(ne,0,ne.window[ne.strstart]),ne.lookahead--,ne.strstart++;if(Be&&(Y(ne,!1),ne.strm.avail_out===0))return me}return ne.insert=ne.strstart<L-1?ne.strstart:L-1,Ze===r?(Y(ne,!0),ne.strm.avail_out===0?be:ae):ne.last_lit&&(Y(ne,!1),ne.strm.avail_out===0)?me:se}function Xe(ne,Ze){for(var lt,Be,$e;;){if(ne.lookahead<Z){if(ge(ne),ne.lookahead<Z&&Ze===o)return me;if(ne.lookahead===0)break}if(lt=0,ne.lookahead>=L&&(ne.ins_h=(ne.ins_h<<ne.hash_shift^ne.window[ne.strstart+L-1])&ne.hash_mask,lt=ne.prev[ne.strstart&ne.w_mask]=ne.head[ne.ins_h],ne.head[ne.ins_h]=ne.strstart),ne.prev_length=ne.match_length,ne.prev_match=ne.match_start,ne.match_length=L-1,lt!==0&&ne.prev_length<ne.max_lazy_match&&ne.strstart-lt<=ne.w_size-Z&&(ne.match_length=Le(ne,lt),ne.match_length<=5&&(ne.strategy===u||ne.match_length===L&&ne.strstart-ne.match_start>4096)&&(ne.match_length=L-1)),ne.prev_length>=L&&ne.match_length<=ne.prev_length){$e=ne.strstart+ne.lookahead-L,Be=T._tr_tally(ne,ne.strstart-1-ne.prev_match,ne.prev_length-L),ne.lookahead-=ne.prev_length-1,ne.prev_length-=2;do++ne.strstart<=$e&&(ne.ins_h=(ne.ins_h<<ne.hash_shift^ne.window[ne.strstart+L-1])&ne.hash_mask,lt=ne.prev[ne.strstart&ne.w_mask]=ne.head[ne.ins_h],ne.head[ne.ins_h]=ne.strstart);while(--ne.prev_length!==0);if(ne.match_available=0,ne.match_length=L-1,ne.strstart++,Be&&(Y(ne,!1),ne.strm.avail_out===0))return me}else if(ne.match_available){if(Be=T._tr_tally(ne,0,ne.window[ne.strstart-1]),Be&&Y(ne,!1),ne.strstart++,ne.lookahead--,ne.strm.avail_out===0)return me}else ne.match_available=1,ne.strstart++,ne.lookahead--}return ne.match_available&&(Be=T._tr_tally(ne,0,ne.window[ne.strstart-1]),ne.match_available=0),ne.insert=ne.strstart<L-1?ne.strstart:L-1,Ze===r?(Y(ne,!0),ne.strm.avail_out===0?be:ae):ne.last_lit&&(Y(ne,!1),ne.strm.avail_out===0)?me:se}function tt(ne,Ze){for(var lt,Be,$e,rt,xt=ne.window;;){if(ne.lookahead<=B){if(ge(ne),ne.lookahead<=B&&Ze===o)return me;if(ne.lookahead===0)break}if(ne.match_length=0,ne.lookahead>=L&&ne.strstart>0&&($e=ne.strstart-1,Be=xt[$e],Be===xt[++$e]&&Be===xt[++$e]&&Be===xt[++$e])){rt=ne.strstart+B;do;while(Be===xt[++$e]&&Be===xt[++$e]&&Be===xt[++$e]&&Be===xt[++$e]&&Be===xt[++$e]&&Be===xt[++$e]&&Be===xt[++$e]&&Be===xt[++$e]&&$e<rt);ne.match_length=B-(rt-$e),ne.match_length>ne.lookahead&&(ne.match_length=ne.lookahead)}if(ne.match_length>=L?(lt=T._tr_tally(ne,1,ne.match_length-L),ne.lookahead-=ne.match_length,ne.strstart+=ne.match_length,ne.match_length=0):(lt=T._tr_tally(ne,0,ne.window[ne.strstart]),ne.lookahead--,ne.strstart++),lt&&(Y(ne,!1),ne.strm.avail_out===0))return me}return ne.insert=0,Ze===r?(Y(ne,!0),ne.strm.avail_out===0?be:ae):ne.last_lit&&(Y(ne,!1),ne.strm.avail_out===0)?me:se}function ze(ne,Ze){for(var lt;;){if(ne.lookahead===0&&(ge(ne),ne.lookahead===0)){if(Ze===o)return me;break}if(ne.match_length=0,lt=T._tr_tally(ne,0,ne.window[ne.strstart]),ne.lookahead--,ne.strstart++,lt&&(Y(ne,!1),ne.strm.avail_out===0))return me}return ne.insert=0,Ze===r?(Y(ne,!0),ne.strm.avail_out===0?be:ae):ne.last_lit&&(Y(ne,!1),ne.strm.avail_out===0)?me:se}function Me(ne,Ze,lt,Be,$e){this.good_length=ne,this.max_lazy=Ze,this.nice_length=lt,this.max_chain=Be,this.func=$e}var Et;Et=[new Me(0,0,0,0,De),new Me(4,4,8,4,_e),new Me(4,5,16,8,_e),new Me(4,6,32,32,_e),new Me(4,4,16,16,Xe),new Me(8,16,32,32,Xe),new Me(8,16,128,128,Xe),new Me(8,32,128,256,Xe),new Me(32,128,258,1024,Xe),new Me(32,258,258,4096,Xe)];function Oe(ne){ne.window_size=2*ne.w_size,q(ne.head),ne.max_lazy_match=Et[ne.level].max_lazy,ne.good_match=Et[ne.level].good_length,ne.nice_match=Et[ne.level].nice_length,ne.max_chain_length=Et[ne.level].max_chain,ne.strstart=0,ne.block_start=0,ne.lookahead=0,ne.insert=0,ne.match_length=ne.prev_length=L-1,ne.match_available=0,ne.ins_h=0}function Ve(){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 v.Buf16(F*2),this.dyn_dtree=new v.Buf16((2*X+1)*2),this.bl_tree=new v.Buf16((2*k+1)*2),q(this.dyn_ltree),q(this.dyn_dtree),q(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new v.Buf16(U+1),this.heap=new v.Buf16(2*z+1),q(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new v.Buf16(2*z+1),q(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 Je(ne){var Ze;return!ne||!ne.state?Fe(ne,c):(ne.total_in=ne.total_out=0,ne.data_type=w,Ze=ne.state,Ze.pending=0,Ze.pending_out=0,Ze.wrap<0&&(Ze.wrap=-Ze.wrap),Ze.status=Ze.wrap?he:Te,ne.adler=Ze.wrap===2?0:1,Ze.last_flush=o,T._tr_init(Ze),t)}function Ye(ne){var Ze=Je(ne);return Ze===t&&Oe(ne.state),Ze}function Pe(ne,Ze){return!ne||!ne.state||ne.state.wrap!==2?c:(ne.state.gzhead=Ze,t)}function He(ne,Ze,lt,Be,$e,rt){if(!ne)return c;var xt=1;if(Ze===h&&(Ze=6),Be<0?(xt=0,Be=-Be):Be>15&&(xt=2,Be-=16),$e<1||$e>A||lt!==S||Be<8||Be>15||Ze<0||Ze>9||rt<0||rt>O)return Fe(ne,c);Be===8&&(Be=9);var ft=new Ve;return ne.state=ft,ft.strm=ne,ft.wrap=xt,ft.gzhead=null,ft.w_bits=Be,ft.w_size=1<<ft.w_bits,ft.w_mask=ft.w_size-1,ft.hash_bits=$e+7,ft.hash_size=1<<ft.hash_bits,ft.hash_mask=ft.hash_size-1,ft.hash_shift=~~((ft.hash_bits+L-1)/L),ft.window=new v.Buf8(ft.w_size*2),ft.head=new v.Buf16(ft.hash_size),ft.prev=new v.Buf16(ft.w_size),ft.lit_bufsize=1<<$e+6,ft.pending_buf_size=ft.lit_bufsize*4,ft.pending_buf=new v.Buf8(ft.pending_buf_size),ft.d_buf=1*ft.lit_bufsize,ft.l_buf=(1+2)*ft.lit_bufsize,ft.level=Ze,ft.strategy=rt,ft.method=lt,Ye(ne)}function ve(ne,Ze){return He(ne,Ze,S,D,M,C)}function xe(ne,Ze){var lt,Be,$e,rt;if(!ne||!ne.state||Ze>i||Ze<0)return ne?Fe(ne,c):c;if(Be=ne.state,!ne.output||!ne.input&&ne.avail_in!==0||Be.status===pe&&Ze!==r)return Fe(ne,ne.avail_out===0?f:c);if(Be.strm=ne,lt=Be.last_flush,Be.last_flush=Ze,Be.status===he)if(Be.wrap===2)ne.adler=0,oe(Be,31),oe(Be,139),oe(Be,8),Be.gzhead?(oe(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)),oe(Be,Be.gzhead.time&255),oe(Be,Be.gzhead.time>>8&255),oe(Be,Be.gzhead.time>>16&255),oe(Be,Be.gzhead.time>>24&255),oe(Be,Be.level===9?2:Be.strategy>=E||Be.level<2?4:0),oe(Be,Be.gzhead.os&255),Be.gzhead.extra&&Be.gzhead.extra.length&&(oe(Be,Be.gzhead.extra.length&255),oe(Be,Be.gzhead.extra.length>>8&255)),Be.gzhead.hcrc&&(ne.adler=(0,g.default)(ne.adler,Be.pending_buf,Be.pending,0)),Be.gzindex=0,Be.status=Ce):(oe(Be,0),oe(Be,0),oe(Be,0),oe(Be,0),oe(Be,0),oe(Be,Be.level===9?2:Be.strategy>=E||Be.level<2?4:0),oe(Be,fe),Be.status=Te);else{var xt=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,xt|=ft<<6,Be.strstart!==0&&(xt|=re),xt+=31-xt%31,Be.status=Te,le(Be,xt),Be.strstart!==0&&(le(Be,ne.adler>>>16),le(Be,ne.adler&65535)),ne.adler=1}if(Be.status===Ce)if(Be.gzhead.extra){for($e=Be.pending;Be.gzindex<(Be.gzhead.extra.length&65535)&&!(Be.pending===Be.pending_buf_size&&(Be.gzhead.hcrc&&Be.pending>$e&&(ne.adler=(0,g.default)(ne.adler,Be.pending_buf,Be.pending-$e,$e)),Q(ne),$e=Be.pending,Be.pending===Be.pending_buf_size));)oe(Be,Be.gzhead.extra[Be.gzindex]&255),Be.gzindex++;Be.gzhead.hcrc&&Be.pending>$e&&(ne.adler=(0,g.default)(ne.adler,Be.pending_buf,Be.pending-$e,$e)),Be.gzindex===Be.gzhead.extra.length&&(Be.gzindex=0,Be.status=ke)}else Be.status=ke;if(Be.status===ke)if(Be.gzhead.name){$e=Be.pending;do{if(Be.pending===Be.pending_buf_size&&(Be.gzhead.hcrc&&Be.pending>$e&&(ne.adler=(0,g.default)(ne.adler,Be.pending_buf,Be.pending-$e,$e)),Q(ne),$e=Be.pending,Be.pending===Be.pending_buf_size)){rt=1;break}Be.gzindex<Be.gzhead.name.length?rt=Be.gzhead.name.charCodeAt(Be.gzindex++)&255:rt=0,oe(Be,rt)}while(rt!==0);Be.gzhead.hcrc&&Be.pending>$e&&(ne.adler=(0,g.default)(ne.adler,Be.pending_buf,Be.pending-$e,$e)),rt===0&&(Be.gzindex=0,Be.status=te)}else Be.status=te;if(Be.status===te)if(Be.gzhead.comment){$e=Be.pending;do{if(Be.pending===Be.pending_buf_size&&(Be.gzhead.hcrc&&Be.pending>$e&&(ne.adler=(0,g.default)(ne.adler,Be.pending_buf,Be.pending-$e,$e)),Q(ne),$e=Be.pending,Be.pending===Be.pending_buf_size)){rt=1;break}Be.gzindex<Be.gzhead.comment.length?rt=Be.gzhead.comment.charCodeAt(Be.gzindex++)&255:rt=0,oe(Be,rt)}while(rt!==0);Be.gzhead.hcrc&&Be.pending>$e&&(ne.adler=(0,g.default)(ne.adler,Be.pending_buf,Be.pending-$e,$e)),rt===0&&(Be.status=Re)}else Be.status=Re;if(Be.status===Re&&(Be.gzhead.hcrc?(Be.pending+2>Be.pending_buf_size&&Q(ne),Be.pending+2<=Be.pending_buf_size&&(oe(Be,ne.adler&255),oe(Be,ne.adler>>8&255),ne.adler=0,Be.status=Te)):Be.status=Te),Be.pending!==0){if(Q(ne),ne.avail_out===0)return Be.last_flush=-1,t}else if(ne.avail_in===0&&ie(Ze)<=ie(lt)&&Ze!==r)return Fe(ne,f);if(Be.status===pe&&ne.avail_in!==0)return Fe(ne,f);if(ne.avail_in!==0||Be.lookahead!==0||Ze!==o&&Be.status!==pe){var st=Be.strategy===E?ze(Be,Ze):Be.strategy===x?tt(Be,Ze):Et[Be.level].func(Be,Ze);if((st===be||st===ae)&&(Be.status=pe),st===me||st===be)return ne.avail_out===0&&(Be.last_flush=-1),t;if(st===se&&(Ze===n?T._tr_align(Be):Ze!==i&&(T._tr_stored_block(Be,0,0,!1),Ze===l&&(q(Be.head),Be.lookahead===0&&(Be.strstart=0,Be.block_start=0,Be.insert=0))),Q(ne),ne.avail_out===0))return Be.last_flush=-1,t}return Ze!==r?t:Be.wrap<=0?a:(Be.wrap===2?(oe(Be,ne.adler&255),oe(Be,ne.adler>>8&255),oe(Be,ne.adler>>16&255),oe(Be,ne.adler>>24&255),oe(Be,ne.total_in&255),oe(Be,ne.total_in>>8&255),oe(Be,ne.total_in>>16&255),oe(Be,ne.total_in>>24&255)):(le(Be,ne.adler>>>16),le(Be,ne.adler&65535)),Q(ne),Be.wrap>0&&(Be.wrap=-Be.wrap),Be.pending!==0?t:a)}function de(ne){var Ze;return!ne||!ne.state?c:(Ze=ne.state.status,Ze!==he&&Ze!==Ce&&Ze!==ke&&Ze!==te&&Ze!==Re&&Ze!==Te&&Ze!==pe?Fe(ne,c):(ne.state=null,Ze===Te?Fe(ne,d):t))}function je(ne,Ze){var lt=Ze.length,Be,$e,rt,xt,ft,st,Ne,Ge;if(!ne||!ne.state)return c;if(Be=ne.state,xt=Be.wrap,xt===2||xt===1&&Be.status!==he||Be.lookahead)return c;for(xt===1&&(ne.adler=(0,y.default)(ne.adler,Ze,lt,0)),Be.wrap=0,lt>=Be.w_size&&(xt===0&&(q(Be.head),Be.strstart=0,Be.block_start=0,Be.insert=0),Ge=new v.Buf8(Be.w_size),v.arraySet(Ge,Ze,lt-Be.w_size,Be.w_size,0),Ze=Ge,lt=Be.w_size),ft=ne.avail_in,st=ne.next_in,Ne=ne.input,ne.avail_in=lt,ne.next_in=0,ne.input=Ze,ge(Be);Be.lookahead>=L;){$e=Be.strstart,rt=Be.lookahead-(L-1);do Be.ins_h=(Be.ins_h<<Be.hash_shift^Be.window[$e+L-1])&Be.hash_mask,Be.prev[$e&Be.w_mask]=Be.head[Be.ins_h],Be.head[Be.ins_h]=$e,$e++;while(--rt);Be.strstart=$e,Be.lookahead=L-1,ge(Be)}return Be.strstart+=Be.lookahead,Be.block_start=Be.strstart,Be.insert=Be.lookahead,Be.lookahead=0,Be.match_length=Be.prev_length=L-1,Be.match_available=0,ne.next_in=st,ne.input=Ne,ne.avail_in=ft,Be.wrap=xt,t}var Qe="pako deflate (from Nodeca project)";H.deflateInfo=Qe},lOMy:function(j,H,b){},lPiR:function(j,H,b){(function(I,v){j.exports=H=v(b("Ib8C"))})(this,function(I){return function(v){var T=I,y=T.lib,g=y.WordArray,s=y.Hasher,_=T.algo,p=[],e=[];(function(){function l(a){for(var c=v.sqrt(a),d=2;d<=c;d++)if(!(a%d))return!1;return!0}function r(a){return(a-(a|0))*4294967296|0}for(var i=2,t=0;t<64;)l(i)&&(t<8&&(p[t]=r(v.pow(i,1/2))),e[t]=r(v.pow(i,1/3)),t++),i++})();var o=[],n=_.SHA256=s.extend({_doReset:function(){this._hash=new g.init(p.slice(0))},_doProcessBlock:function(l,r){for(var i=this._hash.words,t=i[0],a=i[1],c=i[2],d=i[3],f=i[4],h=i[5],u=i[6],E=i[7],x=0;x<64;x++){if(x<16)o[x]=l[r+x]|0;else{var O=o[x-15],C=(O<<25|O>>>7)^(O<<14|O>>>18)^O>>>3,w=o[x-2],S=(w<<15|w>>>17)^(w<<13|w>>>19)^w>>>10;o[x]=C+o[x-7]+S+o[x-16]}var A=f&h^~f&u,D=t&a^t&c^a&c,M=(t<<30|t>>>2)^(t<<19|t>>>13)^(t<<10|t>>>22),N=(f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25),P=E+N+A+e[x]+o[x],z=M+D;E=u,u=h,h=f,f=d+P|0,d=c,c=a,a=t,t=P+z|0}i[0]=i[0]+t|0,i[1]=i[1]+a|0,i[2]=i[2]+c|0,i[3]=i[3]+d|0,i[4]=i[4]+f|0,i[5]=i[5]+h|0,i[6]=i[6]+u|0,i[7]=i[7]+E|0},_doFinalize:function(){var l=this._data,r=l.words,i=this._nDataBytes*8,t=l.sigBytes*8;return r[t>>>5]|=128<<24-t%32,r[(t+64>>>9<<4)+14]=v.floor(i/4294967296),r[(t+64>>>9<<4)+15]=i,l.sigBytes=r.length*4,this._process(),this._hash},clone:function(){var l=s.clone.call(this);return l._hash=this._hash.clone(),l}});T.SHA256=s._createHelper(n),T.HmacSHA256=s._createHmacHelper(n)}(Math),I.SHA256})},lZu9:function(j,H,b){(function(I){I(b("VrN/"),b("1eCo"),b("8EBN"))})(function(I){"use strict";I.defineMode("markdown",function(v,T){var y=I.getMode(v,"text/html"),g=y.name=="null";function s(U){if(I.findModeByName){var L=I.findModeByName(U);L&&(U=L.mime||L.mimes[0])}var B=I.getMode(v,U);return B.name=="null"?null:B}T.highlightFormatting===void 0&&(T.highlightFormatting=!1),T.maxBlockquoteDepth===void 0&&(T.maxBlockquoteDepth=0),T.taskLists===void 0&&(T.taskLists=!1),T.strikethrough===void 0&&(T.strikethrough=!1),T.emoji===void 0&&(T.emoji=!1),T.fencedCodeBlockHighlighting===void 0&&(T.fencedCodeBlockHighlighting=!0),T.fencedCodeBlockDefaultMode===void 0&&(T.fencedCodeBlockDefaultMode="text/plain"),T.xml===void 0&&(T.xml=!0),T.tokenTypeOverrides===void 0&&(T.tokenTypeOverrides={});var _={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 _)_.hasOwnProperty(p)&&T.tokenTypeOverrides[p]&&(_[p]=T.tokenTypeOverrides[p]);var e=/^([*\-_])(?:\s*\1){2,}\s*$/,o=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,n=/^\[(x| )\](?=\s)/i,l=T.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,r=/^ {0,3}(?:\={1,}|-{2,})\s*$/,i=/^[^#!\[\]*_\\<>` "'(~:]+/,t=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,a=/^\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]/,d=" ";function f(U,L,B){return L.f=L.inline=B,B(U,L)}function h(U,L,B){return L.f=L.block=B,B(U,L)}function u(U){return!U||!/\S/.test(U.string)}function E(U){if(U.linkTitle=!1,U.linkHref=!1,U.linkText=!1,U.em=!1,U.strong=!1,U.strikethrough=!1,U.quote=0,U.indentedCode=!1,U.f==O){var L=g;if(!L){var B=I.innerMode(y,U.htmlState);L=B.mode.name=="xml"&&B.state.tagStart===null&&!B.state.context&&B.state.tokenize.isInText}L&&(U.f=A,U.block=x,U.htmlState=null)}return U.trailingSpace=0,U.trailingSpaceNewLine=!1,U.prevLine=U.thisLine,U.thisLine={stream:null},null}function x(U,L){var B=U.column()===L.indentation,Z=u(L.prevLine.stream),re=L.indentedCode,he=L.prevLine.hr,Ce=L.list!==!1,ke=(L.listStack[L.listStack.length-1]||0)+3;L.indentedCode=!1;var te=L.indentation;if(L.indentationDiff===null&&(L.indentationDiff=L.indentation,Ce)){for(L.list=null;te<L.listStack[L.listStack.length-1];)L.listStack.pop(),L.listStack.length?L.indentation=L.listStack[L.listStack.length-1]:L.list=!1;L.list!==!1&&(L.indentationDiff=te-L.listStack[L.listStack.length-1])}var Re=!Z&&!he&&!L.prevLine.header&&(!Ce||!re)&&!L.prevLine.fencedCodeEnd,Te=(L.list===!1||he||Z)&&L.indentation<=ke&&U.match(e),pe=null;if(L.indentationDiff>=4&&(re||L.prevLine.fencedCodeEnd||L.prevLine.header||Z))return U.skipToEnd(),L.indentedCode=!0,_.code;if(U.eatSpace())return null;if(B&&L.indentation<=ke&&(pe=U.match(l))&&pe[1].length<=6)return L.quote=0,L.header=pe[1].length,L.thisLine.header=!0,T.highlightFormatting&&(L.formatting="header"),L.f=L.inline,w(L);if(L.indentation<=ke&&U.eat(">"))return L.quote=B?1:L.quote+1,T.highlightFormatting&&(L.formatting="quote"),U.eatSpace(),w(L);if(!Te&&!L.setext&&B&&L.indentation<=ke&&(pe=U.match(o))){var me=pe[1]?"ol":"ul";return L.indentation=te+U.current().length,L.list=!0,L.quote=0,L.listStack.push(L.indentation),L.em=!1,L.strong=!1,L.code=!1,L.strikethrough=!1,T.taskLists&&U.match(n,!1)&&(L.taskList=!0),L.f=L.inline,T.highlightFormatting&&(L.formatting=["list","list-"+me]),w(L)}else{if(B&&L.indentation<=ke&&(pe=U.match(t,!0)))return L.quote=0,L.fencedEndRE=new RegExp(pe[1]+"+ *$"),L.localMode=T.fencedCodeBlockHighlighting&&s(pe[2]||T.fencedCodeBlockDefaultMode),L.localMode&&(L.localState=I.startState(L.localMode)),L.f=L.block=C,T.highlightFormatting&&(L.formatting="code-block"),L.code=-1,w(L);if(L.setext||(!Re||!Ce)&&!L.quote&&L.list===!1&&!L.code&&!Te&&!a.test(U.string)&&(pe=U.lookAhead(1))&&(pe=pe.match(r)))return L.setext?(L.header=L.setext,L.setext=0,U.skipToEnd(),T.highlightFormatting&&(L.formatting="header")):(L.header=pe[0].charAt(0)=="="?1:2,L.setext=L.header),L.thisLine.header=!0,L.f=L.inline,w(L);if(Te)return U.skipToEnd(),L.hr=!0,L.thisLine.hr=!0,_.hr;if(U.peek()==="[")return f(U,L,z)}return f(U,L,L.inline)}function O(U,L){var B=y.token(U,L.htmlState);if(!g){var Z=I.innerMode(y,L.htmlState);(Z.mode.name=="xml"&&Z.state.tagStart===null&&!Z.state.context&&Z.state.tokenize.isInText||L.md_inside&&U.current().indexOf(">")>-1)&&(L.f=A,L.block=x,L.htmlState=null)}return B}function C(U,L){var B=L.listStack[L.listStack.length-1]||0,Z=L.indentation<B,re=B+3;if(L.fencedEndRE&&L.indentation<=re&&(Z||U.match(L.fencedEndRE))){T.highlightFormatting&&(L.formatting="code-block");var he;return Z||(he=w(L)),L.localMode=L.localState=null,L.block=x,L.f=A,L.fencedEndRE=null,L.code=0,L.thisLine.fencedCodeEnd=!0,Z?h(U,L,L.block):he}else return L.localMode?L.localMode.token(U,L.localState):(U.skipToEnd(),_.code)}function w(U){var L=[];if(U.formatting){L.push(_.formatting),typeof U.formatting=="string"&&(U.formatting=[U.formatting]);for(var B=0;B<U.formatting.length;B++)L.push(_.formatting+"-"+U.formatting[B]),U.formatting[B]==="header"&&L.push(_.formatting+"-"+U.formatting[B]+"-"+U.header),U.formatting[B]==="quote"&&(!T.maxBlockquoteDepth||T.maxBlockquoteDepth>=U.quote?L.push(_.formatting+"-"+U.formatting[B]+"-"+U.quote):L.push("error"))}if(U.taskOpen)return L.push("meta"),L.length?L.join(" "):null;if(U.taskClosed)return L.push("property"),L.length?L.join(" "):null;if(U.linkHref?L.push(_.linkHref,"url"):(U.strong&&L.push(_.strong),U.em&&L.push(_.em),U.strikethrough&&L.push(_.strikethrough),U.emoji&&L.push(_.emoji),U.linkText&&L.push(_.linkText),U.code&&L.push(_.code),U.image&&L.push(_.image),U.imageAltText&&L.push(_.imageAltText,"link"),U.imageMarker&&L.push(_.imageMarker)),U.header&&L.push(_.header,_.header+"-"+U.header),U.quote&&(L.push(_.quote),!T.maxBlockquoteDepth||T.maxBlockquoteDepth>=U.quote?L.push(_.quote+"-"+U.quote):L.push(_.quote+"-"+T.maxBlockquoteDepth)),U.list!==!1){var Z=(U.listStack.length-1)%3;Z?Z===1?L.push(_.list2):L.push(_.list3):L.push(_.list1)}return U.trailingSpaceNewLine?L.push("trailing-space-new-line"):U.trailingSpace&&L.push("trailing-space-"+(U.trailingSpace%2?"a":"b")),L.length?L.join(" "):null}function S(U,L){return U.match(i,!0)?w(L):void 0}function A(U,L){var B=L.text(U,L);if(typeof B!="undefined")return B;if(L.list)return L.list=null,w(L);if(L.taskList){var Z=U.match(n,!0)[1]===" ";return Z?L.taskOpen=!0:L.taskClosed=!0,T.highlightFormatting&&(L.formatting="task"),L.taskList=!1,w(L)}if(L.taskOpen=!1,L.taskClosed=!1,L.header&&U.match(/^#+$/,!0))return T.highlightFormatting&&(L.formatting="header"),w(L);var re=U.next();if(L.linkTitle){L.linkTitle=!1;var he=re;re==="("&&(he=")"),he=(he+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Ce="^\\s*(?:[^"+he+"\\\\]+|\\\\\\\\|\\\\.)"+he;if(U.match(new RegExp(Ce),!0))return _.linkHref}if(re==="`"){var ke=L.formatting;T.highlightFormatting&&(L.formatting="code"),U.eatWhile("`");var te=U.current().length;if(L.code==0&&(!L.quote||te==1))return L.code=te,w(L);if(te==L.code){var Re=w(L);return L.code=0,Re}else return L.formatting=ke,w(L)}else if(L.code)return w(L);if(re==="\\"&&(U.next(),T.highlightFormatting)){var Te=w(L),pe=_.formatting+"-escape";return Te?Te+" "+pe:pe}if(re==="!"&&U.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return L.imageMarker=!0,L.image=!0,T.highlightFormatting&&(L.formatting="image"),w(L);if(re==="["&&L.imageMarker&&U.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return L.imageMarker=!1,L.imageAltText=!0,T.highlightFormatting&&(L.formatting="image"),w(L);if(re==="]"&&L.imageAltText){T.highlightFormatting&&(L.formatting="image");var Te=w(L);return L.imageAltText=!1,L.image=!1,L.inline=L.f=M,Te}if(re==="["&&!L.image)return L.linkText&&U.match(/^.*?\]/)||(L.linkText=!0,T.highlightFormatting&&(L.formatting="link")),w(L);if(re==="]"&&L.linkText){T.highlightFormatting&&(L.formatting="link");var Te=w(L);return L.linkText=!1,L.inline=L.f=U.match(/\(.*?\)| ?\[.*?\]/,!1)?M:A,Te}if(re==="<"&&U.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){L.f=L.inline=D,T.highlightFormatting&&(L.formatting="link");var Te=w(L);return Te?Te+=" ":Te="",Te+_.linkInline}if(re==="<"&&U.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){L.f=L.inline=D,T.highlightFormatting&&(L.formatting="link");var Te=w(L);return Te?Te+=" ":Te="",Te+_.linkEmail}if(T.xml&&re==="<"&&U.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var me=U.string.indexOf(">",U.pos);if(me!=-1){var se=U.string.substring(U.start,me);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(se)&&(L.md_inside=!0)}return U.backUp(1),L.htmlState=I.startState(y),h(U,L,O)}if(T.xml&&re==="<"&&U.match(/^\/\w*?>/))return L.md_inside=!1,"tag";if(re==="*"||re==="_"){for(var be=1,ae=U.pos==1?" ":U.string.charAt(U.pos-2);be<3&&U.eat(re);)be++;var fe=U.peek()||" ",Fe=!/\s/.test(fe)&&(!c.test(fe)||/\s/.test(ae)||c.test(ae)),ie=!/\s/.test(ae)&&(!c.test(ae)||/\s/.test(fe)||c.test(fe)),q=null,Q=null;if(be%2&&(!L.em&&Fe&&(re==="*"||!ie||c.test(ae))?q=!0:L.em==re&&ie&&(re==="*"||!Fe||c.test(fe))&&(q=!1)),be>1&&(!L.strong&&Fe&&(re==="*"||!ie||c.test(ae))?Q=!0:L.strong==re&&ie&&(re==="*"||!Fe||c.test(fe))&&(Q=!1)),Q!=null||q!=null){T.highlightFormatting&&(L.formatting=q==null?"strong":Q==null?"em":"strong em"),q===!0&&(L.em=re),Q===!0&&(L.strong=re);var Re=w(L);return q===!1&&(L.em=!1),Q===!1&&(L.strong=!1),Re}}else if(re===" "&&(U.eat("*")||U.eat("_"))){if(U.peek()===" ")return w(L);U.backUp(1)}if(T.strikethrough){if(re==="~"&&U.eatWhile(re)){if(L.strikethrough){T.highlightFormatting&&(L.formatting="strikethrough");var Re=w(L);return L.strikethrough=!1,Re}else if(U.match(/^[^\s]/,!1))return L.strikethrough=!0,T.highlightFormatting&&(L.formatting="strikethrough"),w(L)}else if(re===" "&&U.match(/^~~/,!0)){if(U.peek()===" ")return w(L);U.backUp(2)}}if(T.emoji&&re===":"&&U.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){L.emoji=!0,T.highlightFormatting&&(L.formatting="emoji");var Y=w(L);return L.emoji=!1,Y}return re===" "&&(U.match(/^ +$/,!1)?L.trailingSpace++:L.trailingSpace&&(L.trailingSpaceNewLine=!0)),w(L)}function D(U,L){var B=U.next();if(B===">"){L.f=L.inline=A,T.highlightFormatting&&(L.formatting="link");var Z=w(L);return Z?Z+=" ":Z="",Z+_.linkInline}return U.match(/^[^>]+/,!0),_.linkInline}function M(U,L){if(U.eatSpace())return null;var B=U.next();return B==="("||B==="["?(L.f=L.inline=P(B==="("?")":"]"),T.highlightFormatting&&(L.formatting="link-string"),L.linkHref=!0,w(L)):"error"}var N={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function P(U){return function(L,B){var Z=L.next();if(Z===U){B.f=B.inline=A,T.highlightFormatting&&(B.formatting="link-string");var re=w(B);return B.linkHref=!1,re}return L.match(N[U]),B.linkHref=!0,w(B)}}function z(U,L){return U.match(/^([^\]\\]|\\.)*\]:/,!1)?(L.f=X,U.next(),T.highlightFormatting&&(L.formatting="link"),L.linkText=!0,w(L)):f(U,L,A)}function X(U,L){if(U.match(/^\]:/,!0)){L.f=L.inline=k,T.highlightFormatting&&(L.formatting="link");var B=w(L);return L.linkText=!1,B}return U.match(/^([^\]\\]|\\.)+/,!0),_.linkText}function k(U,L){return U.eatSpace()?null:(U.match(/^[^\s]+/,!0),U.peek()===void 0?L.linkTitle=!0:U.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),L.f=L.inline=A,_.linkHref+" url")}var F={startState:function(){return{f:x,prevLine:{stream:null},thisLine:{stream:null},block:x,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(U){return{f:U.f,prevLine:U.prevLine,thisLine:U.thisLine,block:U.block,htmlState:U.htmlState&&I.copyState(y,U.htmlState),indentation:U.indentation,localMode:U.localMode,localState:U.localMode?I.copyState(U.localMode,U.localState):null,inline:U.inline,text:U.text,formatting:!1,linkText:U.linkText,linkTitle:U.linkTitle,linkHref:U.linkHref,code:U.code,em:U.em,strong:U.strong,strikethrough:U.strikethrough,emoji:U.emoji,header:U.header,setext:U.setext,hr:U.hr,taskList:U.taskList,list:U.list,listStack:U.listStack.slice(0),quote:U.quote,indentedCode:U.indentedCode,trailingSpace:U.trailingSpace,trailingSpaceNewLine:U.trailingSpaceNewLine,md_inside:U.md_inside,fencedEndRE:U.fencedEndRE}},token:function(U,L){if(L.formatting=!1,U!=L.thisLine.stream){if(L.header=0,L.hr=!1,U.match(/^\s*$/,!0))return E(L),null;if(L.prevLine=L.thisLine,L.thisLine={stream:U},L.taskList=!1,L.trailingSpace=0,L.trailingSpaceNewLine=!1,!L.localState&&(L.f=L.block,L.f!=O)){var B=U.match(/^\s*/,!0)[0].replace(/\t/g,d).length;if(L.indentation=B,L.indentationDiff=null,B>0)return null}}return L.f(U,L)},innerMode:function(U){return U.block==O?{state:U.htmlState,mode:y}:U.localState?{state:U.localState,mode:U.localMode}:{state:U,mode:F}},indent:function(U,L,B){return U.block==O&&y.indent?y.indent(U.htmlState,L,B):U.localState&&U.localMode.indent?U.localMode.indent(U.localState,L,B):I.Pass},blankLine:E,getType:w,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return F},"xml"),I.defineMIME("text/markdown","markdown"),I.defineMIME("text/x-markdown","markdown")})},lzim:function(j,H,b){"use strict";var I=b("E7E6"),v=b.n(I);b.d(H,"w",function(){return v.a});var T=b("/GNS"),y=b.n(T);b.d(H,"v",function(){return y.a});var g=b("FOrL"),s=b.n(g);b.d(H,"q",function(){return s.a});var _=b("HpTS"),p=b.n(_);b.d(H,"x",function(){return p.a});var e=b("tWlo"),o=b.n(e);b.d(H,"a",function(){return o.a});var n=b("7ZXX"),l=b.n(n);b.d(H,"l",function(){return l.a});var r=b("GABl"),i=b.n(r);b.d(H,"e",function(){return i.a});var t=b("onxn"),a=b.n(t);b.d(H,"n",function(){return a.a});var c=b("nKGa"),d=b.n(c);b.d(H,"m",function(){return d.a});var f=b("4qgm"),h=b.n(f);b.d(H,"y",function(){return h.a});var u=b("JeFH"),E=b.n(u);b.d(H,"b",function(){return E.a});var x=b("ji0R"),O=b.n(x);b.d(H,"i",function(){return O.a});var C=b("W6BS"),w=b.n(C);b.d(H,"z",function(){return w.a});var S=b("kPYp"),A=b.n(S);b.d(H,"A",function(){return A.a});var D=b("nukY"),M=b.n(D),N=b("4u4S"),P=b.n(N),z=b("yslc"),X=b.n(z),k=b("l2Kq"),F=b.n(k),U=b("RMFE"),L=b.n(U);b.d(H,"o",function(){return L.a});var B=b("TGq3"),Z=b.n(B),re=b("SMhR"),he=b.n(re),Ce=b("8/bI"),ke=b.n(Ce);b.d(H,"j",function(){return ke.a});var te=b("JWDV"),Re=b.n(te),Te=b("Xsq0"),pe=b.n(Te);b.d(H,"p",function(){return pe.a});var me=b("Ohmc"),se=b.n(me);b.d(H,"c",function(){return se.a});var be=b("csWT"),ae=b.n(be);b.d(H,"d",function(){return ae.a});var fe=b("7v3h"),Fe=b.n(fe);b.d(H,"k",function(){return Fe.a});var ie=b("cRFk"),q=b.n(ie);b.d(H,"u",function(){return q.a});var Q=b("kPWJ"),Y=b.n(Q);b.d(H,"t",function(){return Y.a});var oe=b("qgvg"),le=b.n(oe);b.d(H,"r",function(){return le.a});var Ee=b("FPkq"),Le=b.n(Ee);b.d(H,"s",function(){return Le.a});var ge=b("A/g1"),De=b.n(ge);b.d(H,"f",function(){return De.a});var _e=b("Nmxd"),Xe=b.n(_e);b.d(H,"g",function(){return Xe.a});var tt=b("5D2P"),ze=b.n(tt);b.d(H,"h",function(){return ze.a});var Me=b("djh8"),Et=b.n(Me),Oe=b("Jq4h"),Ve=b.n(Oe)},mCJh:function(j,H,b){"use strict";b.d(H,"e",function(){return v}),b.d(H,"k",function(){return T}),b.d(H,"d",function(){return y}),b.d(H,"g",function(){return g}),b.d(H,"f",function(){return s}),b.d(H,"i",function(){return _}),b.d(H,"c",function(){return p}),b.d(H,"h",function(){return e}),b.d(H,"b",function(){return o}),b.d(H,"a",function(){return n}),b.d(H,"j",function(){return l});var I=b("ErOA");function v(r){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(r,"&container_type=Shixun"))}function T(r,i){return Object(I.f)("/discusses/".concat(r,"/top_or_down_discuss.json"),{top:i})}function y(r,i){return Object(I.f)("/discusses/".concat(r,"/disable_or_open_discuss.json"),{is_disable:!!i})}function g(r,i){return Object(I.f)("/discusses/".concat(r,"/plus.json"),{container_type:"Discuss",type:i?1:0})}function s(r,i){return Object(I.f)("/discusses/".concat(r,"/hidden.json"),i)}function _(r,i){return Object(I.f)("/discusses/".concat(r,"/reward_code.json"),i)}function p(r){return Object(I.a)("/api/discusses/".concat(r,".json"),{method:"delete"})}function e(r,i){return Object(I.f)("/discusses/".concat(r,"/reply.json"),{container_type:"Shixun",content:i})}function o(r){return Object(I.f)("/discusses.json",r)}function n(r){return Object(I.f)("/discusses/ai_reply.json",r)}function l(r,i){return Object(I.f)("/discusses/".concat(r,"/turing.json"),i)}},mHUz:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.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};H.default=I},mTgk:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;var I=v(b("mHUz"));function v(p){return p&&p.__esModule?p:{default:p}}var T={};function y(p,e){if(e===void 0)throw new Error('Undefined keysym for key "'+p+'"');if(p in T)throw new Error('Duplicate entry for key "'+p+'"');T[p]=[e,e,e,e]}function g(p,e,o){if(e===void 0)throw new Error('Undefined keysym for key "'+p+'"');if(o===void 0)throw new Error('Undefined keysym for key "'+p+'"');if(p in T)throw new Error('Duplicate entry for key "'+p+'"');T[p]=[e,e,o,e]}function s(p,e,o){if(e===void 0)throw new Error('Undefined keysym for key "'+p+'"');if(o===void 0)throw new Error('Undefined keysym for key "'+p+'"');if(p in T)throw new Error('Duplicate entry for key "'+p+'"');T[p]=[e,e,e,o]}g("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),g("Control",I.default.XK_Control_L,I.default.XK_Control_R),g("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),g("Shift",I.default.XK_Shift_L,I.default.XK_Shift_R),s("Enter",I.default.XK_Return,I.default.XK_KP_Enter),y("Tab",I.default.XK_Tab),s(" ",I.default.XK_space,I.default.XK_KP_Space),s("ArrowDown",I.default.XK_Down,I.default.XK_KP_Down),s("ArrowUp",I.default.XK_Up,I.default.XK_KP_Up),s("ArrowLeft",I.default.XK_Left,I.default.XK_KP_Left),s("ArrowRight",I.default.XK_Right,I.default.XK_KP_Right),s("End",I.default.XK_End,I.default.XK_KP_End),s("Home",I.default.XK_Home,I.default.XK_KP_Home),s("PageDown",I.default.XK_Next,I.default.XK_KP_Next),s("PageUp",I.default.XK_Prior,I.default.XK_KP_Prior),y("Backspace",I.default.XK_BackSpace),s("Clear",I.default.XK_Clear,I.default.XK_KP_Begin),y("Copy",I.default.XF86XK_Copy),y("Cut",I.default.XF86XK_Cut),s("Delete",I.default.XK_Delete,I.default.XK_KP_Delete),s("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),s("=",I.default.XK_equal,I.default.XK_KP_Equal),s("+",I.default.XK_plus,I.default.XK_KP_Add),s("-",I.default.XK_minus,I.default.XK_KP_Subtract),s("*",I.default.XK_asterisk,I.default.XK_KP_Multiply),s("/",I.default.XK_slash,I.default.XK_KP_Divide),s(".",I.default.XK_period,I.default.XK_KP_Decimal),s(",",I.default.XK_comma,I.default.XK_KP_Separator),s("0",I.default.XK_0,I.default.XK_KP_0),s("1",I.default.XK_1,I.default.XK_KP_1),s("2",I.default.XK_2,I.default.XK_KP_2),s("3",I.default.XK_3,I.default.XK_KP_3),s("4",I.default.XK_4,I.default.XK_KP_4),s("5",I.default.XK_5,I.default.XK_KP_5),s("6",I.default.XK_6,I.default.XK_KP_6),s("7",I.default.XK_7,I.default.XK_KP_7),s("8",I.default.XK_8,I.default.XK_KP_8),s("9",I.default.XK_9,I.default.XK_KP_9);var _=T;H.default=_},mdZa:function(j,H,b){"use strict";typeof Object.assign!="function"&&Object.defineProperty(Object,"assign",{value:function(v,T){"use strict";if(v==null)throw new TypeError("Cannot convert undefined or null to object");for(var y=Object(v),g=1;g<arguments.length;g++){var s=arguments[g];if(s!=null)for(var _ in s)Object.prototype.hasOwnProperty.call(s,_)&&(y[_]=s[_])}return y},writable:!0,configurable:!0}),function(){function I(v,T){T=T||{bubbles:!1,cancelable:!1,detail:void 0};var y=document.createEvent("CustomEvent");return y.initCustomEvent(v,T.bubbles,T.cancelable,T.detail),y}I.prototype=window.Event.prototype,typeof window.CustomEvent!="function"&&(window.CustomEvent=I)}(),Number.isInteger=Number.isInteger||function(v){return typeof v=="number"&&isFinite(v)&&Math.floor(v)===v}},mxV5:function(module,exports,__webpack_require__){(function(global){var require,require;(function(j){if(!0)module.exports=j();else var H})(function(){var define,module,exports;return function(){function j(H,b,I){function v(g,s){if(!b[g]){if(!H[g]){var _=typeof require=="function"&&require;if(!s&&_)return require(g,!0);if(T)return T(g,!0);var p=new Error("Cannot find module '"+g+"'");throw p.code="MODULE_NOT_FOUND",p}var e=b[g]={exports:{}};H[g][0].call(e.exports,function(o){var n=H[g][1][o];return v(n||o)},e,e.exports,j,H,b,I)}return b[g].exports}for(var T=typeof require=="function"&&require,y=0;y<I.length;y++)v(I[y]);return v}return j}()({1:[function(j,H,b){"use strict";var I=j("./browser/client");I.Buffer=j("buffer").Buffer,I.urllib=j("../shims/xhr"),I.version=j("./browser/version").version,H.exports=I},{"../shims/xhr":291,"./browser/client":2,"./browser/version":5,buffer:73}],2:[function(j,H,b){(function(I,v){"use strict";var T=j("babel-runtime/core-js/promise"),y=e(T),g=j("babel-runtime/regenerator"),s=e(g),_=j("babel-runtime/core-js/object/assign"),p=e(_);function e(z){return z&&z.__esModule?z:{default:z}}var o=j("debug")("ali-oss"),n=j("copy-to"),l=j("xml2js"),r=j("agentkeepalive"),i=j("merge-descriptors"),t=j("url"),a=j("is-type-of"),c=j("platform"),d=j("utility"),f=j("urllib"),h=j("./version"),u=j("bowser"),E=j("../common/signUtils"),x=j("../common/utils/isIP"),O=x.isIP,C=j("../common/client/initOptions"),w=j("../common/utils/createRequest"),S=w.createRequest,A=new r;function D(){var z=c.name,X=c.version;z&&z.toLowerCase&&z.toLowerCase()==="ie"&&X.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function M(){return location&&location.protocol==="https:"}function N(z,X){if(D(),!(this instanceof N))return new N(z,X);z&&z.inited?this.options=z:this.options=N.initOptions(z),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=f,this.agent=this.options.agent||A),this.ctx=X,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}H.exports=N,N.initOptions=function(X){X.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var k=(0,p.default)({secure:M(),useFetch:!1},X);return C(k)};var P=N.prototype;P.debug=o,i(P,j("./object")),i(P,j("../common/bucket/getBucketWebsite")),i(P,j("../common/bucket/putBucketWebsite")),i(P,j("../common/bucket/deleteBucketWebsite")),i(P,j("../common/bucket/getBucketLifecycle")),i(P,j("../common/bucket/putBucketLifecycle")),i(P,j("../common/bucket/deleteBucketLifecycle")),i(P,j("../common/bucket/putBucketVersioning")),i(P,j("../common/bucket/getBucketVersioning")),i(P,j("./managed-upload")),i(P,j("../common/multipart")),i(P,j("../common/parallel")),P.signature=function(X){return this.debug("authorization stringToSign: %s",X,"info"),E.computeSignature(this.options.accessKeySecret,X)},P.authorization=function(X,k,F,U){var L=E.buildCanonicalString(X.toUpperCase(),k,{headers:U,parameters:F});return E.authorization(this.options.accessKeyId,this.options.accessKeySecret,L)},P.request=function(X){var k,F,U,L,B,Z;return s.default.async(function(he){for(;;)switch(he.prev=he.next){case 0:return k=S.call(this,X),this.options.useFetch||(k.params.mode="disable-fetch"),F=void 0,U=void 0,L=!!X.stream,he.prev=5,he.next=8,s.default.awrap(this.urllib.request(k.url,k.params));case 8:F=he.sent,this.debug("response %s %s, got %s, headers: %j",X.method,k.url,F.status,F.headers,"info"),he.next=15;break;case 12:he.prev=12,he.t0=he.catch(5),U=he.t0;case 15:if(B=void 0,!(F&&X.successStatuses&&X.successStatuses.indexOf(F.status)===-1)){he.next=28;break}return he.next=19,s.default.awrap(this.requestError(F));case 19:if(B=he.sent,!(B.code==="RequestTimeTooSkewed"&&!L)){he.next=25;break}return this.options.amendTimeSkewed=+new Date(B.serverTime)-new Date,he.next=24,s.default.awrap(this.request(X));case 24:return he.abrupt("return",he.sent);case 25:B.params=X,he.next=32;break;case 28:if(!U){he.next=32;break}return he.next=31,s.default.awrap(this.requestError(U));case 31:B=he.sent;case 32:if(!B){he.next=34;break}throw B;case 34:if(!X.xmlResponse){he.next=39;break}return he.next=37,s.default.awrap(this.parseXML(F.data));case 37:Z=he.sent,F.data=Z;case 39:return he.abrupt("return",F);case 40:case"end":return he.stop()}},null,this,[[5,12]])},P._getResource=function(X){var k="/";return X.bucket&&(k+=X.bucket+"/"),X.object&&(k+=X.object),k},P._isIP=O,P._escape=function(X){return d.encodeURIComponent(X).replace(/%2F/g,"/")},P._getReqUrl=function(X){var k={};n(this.options.endpoint).to(k);var F=this._isIP(k.hostname),U=this.options.cname;X.bucket&&!U&&!F&&(k.host=X.bucket+"."+k.host);var L="/";X.bucket&&F&&(L+=X.bucket+"/"),X.object&&(L+=this._escape(X.object).replace(/\+/g,"%2B")),k.pathname=L;var B={};if(X.query&&i(B,X.query),X.subres){var Z={};a.string(X.subres)?Z[X.subres]="":a.array(X.subres)?X.subres.forEach(function(re){Z[re]=""}):Z=X.subres,i(B,Z)}return k.query=B,t.format(k)},P._getUserAgent=function(){var X=v&&v.browser?"js":"nodejs",k="aliyun-sdk-"+X+"/"+h.version,F=c.description;return!F&&v&&(F="Node.js "+v.version.slice(1)+" on "+v.platform+" "+v.arch),this._checkUserAgent(k+" "+F)},P._checkUserAgent=function(X){var k=X.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return k},P.checkBrowserAndVersion=function(X,k){return u.name===X&&u.version.split(".")[0]===k},P.parseXML=function(X){return new y.default(function(k,F){I.isBuffer(X)&&(X=X.toString()),l.parseString(X,{explicitRoot:!1,explicitArray:!1},function(U,L){U?F(U):k(L)})})},P.requestError=function(X){var k,F,U,L;return s.default.async(function(Z){for(;;)switch(Z.prev=Z.next){case 0:if(k=null,!(!X.data||!X.data.length)){Z.next=5;break}X.status===-1||X.status===-2?(k=new Error(X.message),k.name=X.name,k.status=X.status,k.code=X.name):(X.status===404?(k=new Error("Object not exists"),k.name="NoSuchKeyError",k.status=404,k.code="NoSuchKey"):X.status===412?(k=new Error("Pre condition failed"),k.name="PreconditionFailedError",k.status=412,k.code="PreconditionFailed"):(k=new Error("Unknow error, status: "+X.status),k.name="UnknowError",k.status=X.status),k.requestId=X.headers["x-oss-request-id"],k.host=""),Z.next=33;break;case 5:return F=String(X.data),this.debug("request response error data: %s",F,"error"),U=void 0,Z.prev=8,Z.next=11,s.default.awrap(this.parseXML(F));case 11:if(Z.t0=Z.sent,Z.t0){Z.next=14;break}Z.t0={};case 14:U=Z.t0,Z.next=24;break;case 17:return Z.prev=17,Z.t1=Z.catch(8),this.debug(F,"error"),Z.t1.message+=`
|
|
|
raw xml: `+F,Z.t1.status=X.status,Z.t1.requestId=X.headers["x-oss-request-id"],Z.abrupt("return",Z.t1);case 24:L=U.Message||"unknow request error, status: "+X.status,U.Condition&&(L+=" (condition: "+U.Condition+")"),k=new Error(L),k.name=U.Code?U.Code+"Error":"UnknowError",k.status=X.status,k.code=U.Code,k.requestId=U.RequestId,k.hostId=U.HostId,k.serverTime=U.ServerTime;case 33:return this.debug("generate error %j",k,"error"),Z.abrupt("return",k);case 35:case"end":return Z.stop()}},null,this,[[8,17]])}}).call(this,{isBuffer:j("../../node_modules/is-buffer/index.js")},j("_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(j,H,b){(function(I){"use strict";var v=j("babel-runtime/core-js/array/from"),T=p(v),y=j("babel-runtime/core-js/promise"),g=p(y),s=j("babel-runtime/regenerator"),_=p(s);function p(E){return E&&E.__esModule?E:{default:E}}var e=j("is-type-of"),o=j("util"),n=j("path"),l=j("mime"),r=j("copy-to"),i=j("../common/utils/isBlob"),t=i.isBlob,a=j("../common/utils/isFile"),c=a.isFile,d=b;d.multipartUpload=function(x,O,C){var w,S,A,D,M,N,P,z,X;return _.default.async(function(F){for(;;)switch(F.prev=F.next){case 0:if(this.resetCancelFlag(),C=C||{},!(C.checkpoint&&C.checkpoint.uploadId)){F.next=6;break}return F.next=5,_.default.awrap(this._resumeMultipart(C.checkpoint,C));case 5:return F.abrupt("return",F.sent);case 6:return w=100*1024,C.mime||(c(O)?C.mime=l.getType(n.extname(O.name)):t(O)?C.mime=O.type:C.mime=l.getType(n.extname(O))),C.headers=C.headers||{},this._convertMetaToHeaders(C.meta,C.headers),F.next=12,_.default.awrap(this._getFileSize(O));case 12:if(S=F.sent,!(S<w)){F.next=25;break}return A=this._createStream(O,0,S),C.contentLength=S,F.next=18,_.default.awrap(this.putStream(x,A,C));case 18:if(D=F.sent,!(C&&C.progress)){F.next=22;break}return F.next=22,_.default.awrap(C.progress(1));case 22:return M={res:D.res,bucket:this.options.bucket,name:x,etag:D.res.headers.etag},(C.headers&&C.headers["x-oss-callback"]||C.callback)&&(M.data=D.data),F.abrupt("return",M);case 25:if(!(C.partSize&&!(parseInt(C.partSize,10)===C.partSize))){F.next=27;break}throw new Error("partSize must be int number");case 27:if(!(C.partSize&&C.partSize<w)){F.next=29;break}throw new Error("partSize must not be smaller than "+w);case 29:return F.next=31,_.default.awrap(this.initMultipartUpload(x,C));case 31:if(N=F.sent,P=N.uploadId,z=this._getPartSize(S,C.partSize),X={file:O,name:x,fileSize:S,partSize:z,uploadId:P,doneParts:[]},!(C&&C.progress)){F.next=38;break}return F.next=38,_.default.awrap(C.progress(0,X,N.res));case 38:return F.next=40,_.default.awrap(this._resumeMultipart(X,C));case 40:return F.abrupt("return",F.sent);case 41:case"end":return F.stop()}},null,this)},d._resumeMultipart=function(x,O){var C,w,S,A,D,M,N,P,z,X,k,F,U,L,B,Z,re,he;return _.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=x.file,S=x.fileSize,A=x.partSize,D=x.uploadId,M=x.doneParts,N=x.name,P=[],M.length>0&&r(M).to(P),z=this._divideParts(S,A),X=z.length,k=!1,F=function(Re,Te){var pe=this;return new g.default(function(se,be){var ae,fe,Fe,ie;return _.default.async(function(Q){for(;;)switch(Q.prev=Q.next){case 0:if(Q.prev=0,Re.isCancel()){Q.next=18;break}return ae=z[Te-1],fe={stream:Re._createStream(w,ae.start,ae.end),size:ae.end-ae.start},Q.next=6,_.default.awrap(Re._uploadPart(N,D,Te,fe));case 6:if(Fe=Q.sent,!(!Re.isCancel()&&!k)){Q.next=15;break}if(x.doneParts.push({number:Te,etag:Fe.res.headers.etag}),!O.progress){Q.next=12;break}return Q.next=12,_.default.awrap(O.progress(M.length/X,x,Fe.res));case 12:se({number:Te,etag:Fe.res.headers.etag}),Q.next=16;break;case 15:se();case 16:Q.next=19;break;case 18:se();case 19:Q.next=30;break;case 21:Q.prev=21,Q.t0=Q.catch(0),ie=new Error,ie.name=Q.t0.name,ie.message=Q.t0.message,ie.stack=Q.t0.stack,ie.partNum=Te,r(Q.t0).to(ie),be(ie);case 30:case"end":return Q.stop()}},null,pe,[[0,21]])})},U=(0,T.default)(new Array(X),function(te,Re){return Re+1}),L=P.map(function(te){return te.number}),B=U.filter(function(te){return L.indexOf(te)<0}),Z=5,re=O.parallel||Z,ke.next=17,_.default.awrap(this._parallel(B,re,function(te){return new g.default(function(Re,Te){F(C,te).then(function(pe){pe&&P.push(pe),Re()}).catch(function(pe){Te(pe)})})}));case 17:if(he=ke.sent,k=!0,!this.isCancel()){ke.next=22;break}throw F=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,_.default.awrap(this.completeMultipartUpload(N,D,P,O));case 27:return ke.abrupt("return",ke.sent);case 28:case"end":return ke.stop()}},null,this)},d._getFileSize=function(x){return _.default.async(function(C){for(;;)switch(C.prev=C.next){case 0:if(!e.buffer(x)){C.next=4;break}return C.abrupt("return",x.length);case 4:if(!(t(x)||c(x))){C.next=6;break}return C.abrupt("return",x.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return C.stop()}},null,this)};var f=j("stream"),h=f.Readable;function u(E,x){if(!(this instanceof u))return new u(E,x);h.call(this,x),this.file=E,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}o.inherits(u,h),u.prototype.readFileAndPush=function(x){if(this.fileBuffer)for(var O=!0;O&&this.fileBuffer&&this.start<this.fileBuffer.length;){var C=this.start,w=C+x;w=w>this.fileBuffer.length?this.fileBuffer.length:w,this.start=w,O=this.push(this.fileBuffer.slice(C,w))}},u.prototype._read=function(x){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 O=16*1024;x=x||O;var C=this;this.reader.onload=function(S){C.fileBuffer=I.from(new Uint8Array(S.target.result)),C.file=null,C.readFileAndPush(x)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(x)},d._createStream=function(x,O,C){if(t(x)||c(x))return new u(x.slice(O,C));throw new Error("_createStream requires File/Blob.")},d._getPartSize=function(x,O){var C=10*1e3,w=1024*1024;return O?Math.max(Math.ceil(x/C),O):w},d._divideParts=function(x,O){for(var C=Math.ceil(x/O),w=[],S=0;S<C;S++){var A=O*S,D=Math.min(A+O,x);w.push({start:A,end:D})}return w}}).call(this,j("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(j,H,b){"use strict";var I=j("babel-runtime/core-js/promise"),v=e(I),T=j("babel-runtime/core-js/object/keys"),y=e(T),g=j("babel-runtime/core-js/object/assign"),s=e(g),_=j("babel-runtime/regenerator"),p=e(_);function e(C){return C&&C.__esModule?C:{default:C}}var o=j("utility"),n=j("fs"),l=j("is-type-of"),r=j("url"),i=j("copy-to"),t=j("path"),a=j("mime"),c=j("../common/callback"),d=j("../common/signUtils"),f=j("merge-descriptors"),h=j("../common/utils/isBlob"),u=h.isBlob,E=j("../common/utils/isFile"),x=E.isFile,O=b;O.append=function(w,S,A){var D;return p.default.async(function(N){for(;;)switch(N.prev=N.next){case 0:return A=A||{},A.position===void 0&&(A.position="0"),A.subres={append:"",position:A.position},A.method="POST",N.next=6,p.default.awrap(this.put(w,S,A));case 6:return D=N.sent,D.nextAppendPosition=D.res.headers["x-oss-next-append-position"],N.abrupt("return",D);case 9:case"end":return N.stop()}},null,this)},O.put=function(w,S,A){var D,M,N,P,z,X,k;return p.default.async(function(U){for(;;)switch(U.prev=U.next){case 0:if(D=void 0,A=A||{},w=this._objectName(w),!l.buffer(S)){U.next=7;break}D=S,U.next=33;break;case 7:if(!(u(S)||x(S))){U.next=32;break}return A.mime||(x(S)?A.mime=a.getType(t.extname(S.name)):A.mime=S.type),M=this._createStream(S,0,S.size),U.next=12,p.default.awrap(this._getFileSize(S));case 12:return A.contentLength=U.sent,U.prev=13,U.next=16,p.default.awrap(this.putStream(w,M,A));case 16:return N=U.sent,U.abrupt("return",N);case 20:if(U.prev=20,U.t0=U.catch(13),!(U.t0.code==="RequestTimeTooSkewed")){U.next=29;break}return this.options.amendTimeSkewed=+new Date(U.t0.serverTime)-new Date,U.next=26,p.default.awrap(this.put(w,S,A));case 26:return U.abrupt("return",U.sent);case 29:throw U.t0;case 30:U.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),P=A.method||"PUT",z=this._objectRequestParams(P,w,A),c.encodeCallback(z,A),z.mime=A.mime,z.content=D,z.successStatuses=[200],U.next=43,p.default.awrap(this.request(z));case 43:return X=U.sent,k={name:w,url:this._objectUrl(w),res:X.res},z.headers&&z.headers["x-oss-callback"]&&(k.data=JSON.parse(X.data.toString())),U.abrupt("return",k);case 47:case"end":return U.stop()}},null,this,[[13,20]])},O.putStream=function(w,S,A){var D,M,N,P;return p.default.async(function(X){for(;;)switch(X.prev=X.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),D=A.method||"PUT",M=this._objectRequestParams(D,w,A),c.encodeCallback(M,A),M.mime=A.mime,M.stream=S,M.successStatuses=[200],X.next=13,p.default.awrap(this.request(M));case 13:return N=X.sent,P={name:w,url:this._objectUrl(w),res:N.res},M.headers&&M.headers["x-oss-callback"]&&(P.data=JSON.parse(N.data.toString())),X.abrupt("return",P);case 17:case"end":return X.stop()}},null,this)},f(O,j("../common/object/copyObject")),f(O,j("../common/object/getObjectTagging")),f(O,j("../common/object/putObjectTagging")),f(O,j("../common/object/deleteObjectTagging")),f(O,j("../common/image")),f(O,j("../common/object/getBucketVersions")),f(O,j("../common/object/getACL")),f(O,j("../common/object/putACL")),f(O,j("../common/object/head")),f(O,j("../common/object/delete")),f(O,j("../common/object/get")),f(O,j("../common/object/putSymlink")),f(O,j("../common/object/getSymlink")),f(O,j("../common/object/deleteMulti")),f(O,j("../common/object/getObjectMeta")),O.putMeta=function(w,S,A){var D;return p.default.async(function(N){for(;;)switch(N.prev=N.next){case 0:return N.next=2,p.default.awrap(this.copy(w,w,{meta:S||{},timeout:A&&A.timeout,ctx:A&&A.ctx}));case 2:return D=N.sent,N.abrupt("return",D);case 4:case"end":return N.stop()}},null,this)},O.list=function(w,S){var A,D,M,N,P;return p.default.async(function(X){for(;;)switch(X.prev=X.next){case 0:return A=this._objectRequestParams("GET","",S),A.query=w,A.xmlResponse=!0,A.successStatuses=[200],X.next=6,p.default.awrap(this.request(A));case 6:return D=X.sent,M=D.data.Contents,N=this,M&&(Array.isArray(M)||(M=[M]),M=M.map(function(k){return{name:k.Key,url:N._objectUrl(k.Key),lastModified:k.LastModified,etag:k.ETag,type:k.Type,size:Number(k.Size),storageClass:k.StorageClass,owner:{id:k.Owner.ID,displayName:k.Owner.DisplayName}}})),P=D.data.CommonPrefixes||null,P&&(Array.isArray(P)||(P=[P]),P=P.map(function(k){return k.Prefix})),X.abrupt("return",{res:D.res,objects:M,prefixes:P,nextMarker:D.data.NextMarker||null,isTruncated:D.data.IsTruncated==="true"});case 13:case"end":return X.stop()}},null,this)},O.restore=function(w,S){var A,D;return p.default.async(function(N){for(;;)switch(N.prev=N.next){case 0:return S=S||{},S.subres=(0,s.default)({restore:""},S.subres),S.versionId&&(S.subres.versionId=S.versionId),A=this._objectRequestParams("POST",w,S),A.successStatuses=[202],N.next=7,p.default.awrap(this.request(A));case 7:return D=N.sent,N.abrupt("return",{res:D.res});case 9:case"end":return N.stop()}},null,this)},O.signatureUrl=function(w,S){S=S||{},w=this._objectName(w),S.method=S.method||"GET";var A=o.timestamp()+(S.expires||1800),D={bucket:this.options.bucket,object:w},M=this._getResource(D);this.options.stsToken&&(S["security-token"]=this.options.stsToken);var N=d._signatureForURL(this.options.accessKeySecret,S,M,A),P=r.parse(this._getReqUrl(D));return P.query={OSSAccessKeyId:this.options.accessKeyId,Expires:A,Signature:N.Signature},i(N.subResource).to(P.query),P.format()},O.getObjectUrl=function(w,S){return S?S[S.length-1]!=="/"&&(S+="/"):S=this.options.endpoint.format(),S+this._escape(this._objectName(w))},O._objectUrl=function(w){return this._getReqUrl({bucket:this.options.bucket,object:w})},O.generateObjectUrl=function(C,w){if(w)w[w.length-1]!=="/"&&(w+="/");else{w=this.options.endpoint.format();var S=r.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))},O._objectRequestParams=function(w,S,A){if(!this.options.bucket)throw new Error("Please create a bucket first");A=A||{},S=this._objectName(S);var D={object:S,bucket:this.options.bucket,method:w,subres:A&&A.subres,timeout:A&&A.timeout,ctx:A&&A.ctx};return A.headers&&(D.headers={},i(A.headers).to(D.headers)),D},O._objectName=function(w){return w.replace(/^\/+/,"")},O._convertMetaToHeaders=function(w,S){if(!w)return;(0,y.default)(w).forEach(function(A){S["x-oss-meta-"+A]=w[A]})},O._deleteFileSafe=function(w){var S=this;return new v.default(function(A){n.exists(w,function(D){D?n.unlink(w,function(M){M&&S.debug("unlink %j error: %s",w,M,"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(j,H,b){"use strict";b.version="6.10.0"},{}],6:[function(j,H,b){"use strict";var I=j("babel-runtime/regenerator"),v=T(I);function T(_){return _&&_.__esModule?_:{default:_}}var y=j("../utils/checkBucketName"),g=y.checkBucketName,s=b;s.deleteBucketLifecycle=function(p,e){var o,n;return v.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return g(p),o=this._bucketRequestParams("DELETE",p,"lifecycle",e),o.successStatuses=[204],r.next=5,v.default.awrap(this.request(o));case 5:return n=r.sent,r.abrupt("return",{res:n.res});case 7:case"end":return r.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],7:[function(j,H,b){"use strict";var I=j("babel-runtime/regenerator"),v=T(I);function T(_){return _&&_.__esModule?_:{default:_}}var y=j("../utils/checkBucketName"),g=y.checkBucketName,s=b;s.deleteBucketWebsite=function(p,e){var o,n;return v.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return g(p),o=this._bucketRequestParams("DELETE",p,"website",e),o.successStatuses=[204],r.next=5,v.default.awrap(this.request(o));case 5:return n=r.sent,r.abrupt("return",{res:n.res});case 7:case"end":return r.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],8:[function(j,H,b){"use strict";var I=j("babel-runtime/regenerator"),v=T(I);function T(n){return n&&n.__esModule?n:{default:n}}var y=j("../utils/checkBucketName"),g=y.checkBucketName,s=j("../utils/isArray"),_=s.isArray,p=j("../utils/formatObjKey"),e=p.formatObjKey,o=b;o.getBucketLifecycle=function(l,r){var i,t,a;return v.default.async(function(d){for(;;)switch(d.prev=d.next){case 0:return g(l),i=this._bucketRequestParams("GET",l,"lifecycle",r),i.successStatuses=[200],i.xmlResponse=!0,d.next=6,v.default.awrap(this.request(i));case 6:return t=d.sent,a=t.data.Rule||null,a&&(_(a)||(a=[a]),a=a.map(function(f){return f.ID&&(f.id=f.ID,delete f.ID),f.Tag&&!_(f.Tag)&&(f.Tag=[f.Tag]),e(f,"firstLowerCase")})),d.abrupt("return",{rules:a,res:t.res});case 10:case"end":return d.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/formatObjKey":40,"../utils/isArray":42,"babel-runtime/regenerator":68}],9:[function(j,H,b){"use strict";var I=j("babel-runtime/regenerator"),v=T(I);function T(_){return _&&_.__esModule?_:{default:_}}var y=j("../utils/checkBucketName"),g=y.checkBucketName,s=b;s.getBucketVersioning=function(p,e){var o,n,l;return v.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return g(p),o=this._bucketRequestParams("GET",p,"versioning",e),o.xmlResponse=!0,o.successStatuses=[200],i.next=6,v.default.awrap(this.request(o));case 6:return n=i.sent,l=n.data.Status,i.abrupt("return",{status:n.status,versionStatus:l,res:n.res});case 9:case"end":return i.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],10:[function(j,H,b){"use strict";var I=j("babel-runtime/regenerator"),v=T(I);function T(e){return e&&e.__esModule?e:{default:e}}var y=j("../utils/checkBucketName"),g=y.checkBucketName,s=j("../utils/isObject"),_=s.isObject,p=b;p.getBucketWebsite=function(o,n){var l,r,i;return v.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return g(o),l=this._bucketRequestParams("GET",o,"website",n),l.successStatuses=[200],l.xmlResponse=!0,a.next=6,v.default.awrap(this.request(l));case 6:return r=a.sent,i=[],r.data.RoutingRules&&r.data.RoutingRules.RoutingRule&&(_(r.data.RoutingRules.RoutingRule)?i=[r.data.RoutingRules.RoutingRule]:i=r.data.RoutingRules.RoutingRule),a.abrupt("return",{index:r.data.IndexDocument&&r.data.IndexDocument.Suffix||"",supportSubDir:r.data.IndexDocument&&r.data.IndexDocument.SupportSubDir||"false",type:r.data.IndexDocument&&r.data.IndexDocument.Type,routingRules:i,error:r.data.ErrorDocument&&r.data.ErrorDocument.Key||null,res:r.res});case 10:case"end":return a.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isObject":46,"babel-runtime/regenerator":68}],11:[function(j,H,b){"use strict";var I=j("babel-runtime/regenerator"),v=T(I);function T(x){return x&&x.__esModule?x:{default:x}}var y=j("../utils/checkBucketName"),g=y.checkBucketName,s=j("../utils/isArray"),_=s.isArray,p=j("../utils/deepCopy"),e=p.deepCopy,o=j("../utils/isObject"),n=o.isObject,l=j("../utils/obj2xml"),r=l.obj2xml,i=j("../utils/checkObjectTag"),t=i.checkObjectTag,a=j("../utils/getStrBytesCount"),c=a.getStrBytesCount,d=b;d.putBucketLifecycle=function(O,C,w){var S,A,D,M,N;return v.default.async(function(z){for(;;)switch(z.prev=z.next){case 0:if(g(O),_(C)){z.next=3;break}throw new Error("rules must be Array");case 3:return S=this._bucketRequestParams("PUT",O,"lifecycle",w),A=[],D={LifecycleConfiguration:{Rule:A}},C.forEach(function(X){f(X),E(X),X.id&&(X.ID=X.id,delete X.id),A.push(X)}),M=r(D,{headers:!0,firstUpperCase:!0}),S.content=M,S.mime="xml",S.successStatuses=[200],z.next=13,v.default.awrap(this.request(S));case 13:return N=z.sent,z.abrupt("return",{res:N.res});case 15:case"end":return z.stop()}},null,this)};function f(x){x.days&&(x.expiration={days:x.days}),x.date&&(x.expiration={createdBeforeDate:x.date})}function h(x,O){var C=x.days,w=x.createdBeforeDate;if(!C&&!w)throw new Error(O+" 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 u(x){if(!_(x)&&!n(x))throw new Error("tag must be Object or Array");x=n(x)?[x]:x;var O={},C=e(x);C.forEach(function(w){O[w.key]=w.value}),t(O)}function E(x){if(x.id&&c(x.id)>255)throw new Error("ID is composed of 255 bytes at most");if(x.prefix===""||x.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(x.status))throw new Error("Status must be Enabled or Disabled");if(x.transition){if(!["IA","Archive"].includes(x.transition.storageClass))throw new Error("StorageClass must be IA or Archive");h(x.transition,"Transition")}if(x.expiration){if(!x.expiration.expiredObjectDeleteMarker)h(x.expiration,"Expiration");else if(x.expiration.days||x.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(x.abortMultipartUpload&&h(x.abortMultipartUpload,"AbortMultipartUpload"),!x.expiration&&!x.abortMultipartUpload&&!x.transition&&!x.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(x.tag){if(x.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");u(x.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(j,H,b){"use strict";var I=j("babel-runtime/regenerator"),v=T(I);function T(e){return e&&e.__esModule?e:{default:e}}var y=j("../utils/checkBucketName"),g=y.checkBucketName,s=j("../utils/obj2xml"),_=s.obj2xml,p=b;p.putBucketVersioning=function(o,n){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,i,t;return v.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:if(g(o),["Enabled","Suspended"].includes(n)){c.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return r=this._bucketRequestParams("PUT",o,"versioning",l),i={VersioningConfiguration:{Status:n}},r.mime="xml",r.content=_(i,{headers:!0}),c.next=9,v.default.awrap(this.request(r));case 9:return t=c.sent,c.abrupt("return",{res:t.res,status:t.status});case 11:case"end":return c.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(j,H,b){"use strict";var I=j("babel-runtime/regenerator"),v=T(I);function T(n){return n&&n.__esModule?n:{default:n}}var y=j("../utils/checkBucketName"),g=y.checkBucketName,s=j("../utils/obj2xml"),_=s.obj2xml,p=j("../utils/isArray"),e=p.isArray,o=b;o.putBucketWebsite=function(l){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments[2],t,a,c,d,f;return v.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:if(g(l),t=this._bucketRequestParams("PUT",l,"website",i),a={Suffix:r.index||"index.html"},c={IndexDocument:a},d={WebsiteConfiguration:c},r.supportSubDir&&(a.SupportSubDir=r.supportSubDir),r.type&&(a.Type=r.type),r.error&&(c.ErrorDocument={Key:r.error}),!(r.routingRules!==void 0)){u.next=12;break}if(e(r.routingRules)){u.next=11;break}throw new Error("RoutingRules must be Array");case 11:c.RoutingRules={RoutingRule:r.routingRules};case 12:return d=_(d),t.content=d,t.mime="xml",t.successStatuses=[200],u.next=18,v.default.awrap(this.request(t));case 18:return f=u.sent,u.abrupt("return",{res:f.res});case 20:case"end":return u.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isArray":42,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],14:[function(j,H,b){(function(I){"use strict";var v=j("babel-runtime/core-js/object/keys"),T=s(v),y=j("babel-runtime/core-js/json/stringify"),g=s(y);function s(_){return _&&_.__esModule?_:{default:_}}b.encodeCallback=function(p,e){if(p.headers=p.headers||{},!Object.prototype.hasOwnProperty.call(p.headers,"x-oss-callback")&&e.callback){var o={callbackUrl:encodeURI(e.callback.url),callbackBody:e.callback.body};e.callback.host&&(o.callbackHost=e.callback.host),e.callback.contentType&&(o.callbackBodyType=e.callback.contentType);var n=I.from((0,g.default)(o)).toString("base64");if(p.headers["x-oss-callback"]=n,e.callback.customValue){var l={};(0,T.default)(e.callback.customValue).forEach(function(r){l["x:"+r]=e.callback.customValue[r]}),p.headers["x-oss-callback-var"]=I.from((0,g.default)(l)).toString("base64")}}}}).call(this,j("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73}],15:[function(j,H,b){"use strict";var I=j("babel-runtime/core-js/object/assign"),v=T(I);function T(o){return o&&o.__esModule?o:{default:o}}var y=j("humanize-ms"),g=j("url"),s=j("../utils/checkBucketName"),_=s.checkBucketName;function p(o,n){var l=g.parse(o);if(l.protocol||(l=g.parse("http"+(n?"s":"")+"://"+o)),l.protocol!=="http:"&&l.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return l}function e(o,n,l){var r=l?"https://":"http://",i=n?"-internal.aliyuncs.com":".aliyuncs.com",t="vpc100-oss-cn-";return o.substr(0,t.length)===t&&(i=".aliyuncs.com"),g.parse(r+o+i)}H.exports=function(o){if(!o||!o.accessKeyId||!o.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");o.bucket&&_(o.bucket);var n=(0,v.default)({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1},o);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=e(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(j,H,b){"use strict";var I=j("merge-descriptors"),v=b;I(v,j("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(j,H,b){"use strict";var I=j("babel-runtime/regenerator"),v=T(I);function T(n){return n&&n.__esModule?n:{default:n}}var y=j("../utils/checkBucketName"),g=y.checkBucketName,s=j("querystring"),_=j("js-base64"),p=_.Base64.encode,e=b;e.processObjectSave=function(l,r,i,t){var a,c,d,f;return v.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return o(l,"sourceObject"),o(r,"targetObject"),o(i,"process"),r=this._objectName(r),t&&g(t),a=this._objectRequestParams("POST",l,{subres:"x-oss-process"}),c=t?",b_"+p(t):"",r=p(r),d={"x-oss-process":i+"|sys/saveas,o_"+r+c},a.content=s.stringify(d),u.next=12,v.default.awrap(this.request(a));case 12:return f=u.sent,u.abrupt("return",{res:f.res,status:f.res.status});case 14:case"end":return u.stop()}},null,this)};function o(n,l){if(!n)throw new Error(l+" is required");if(typeof n!="string")throw new Error(l+" must be String")}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(j,H,b){"use strict";var I=j("babel-runtime/regenerator"),v=T(I);function T(e){return e&&e.__esModule?e:{default:e}}var y=j("copy-to"),g=j("./callback"),s=j("./utils/deepCopy"),_=s.deepCopy,p=b;p.listUploads=function(o,n){var l,r,i,t;return v.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return n=n||{},l={},y(n).to(l),l.subres="uploads",r=this._objectRequestParams("GET","",l),r.query=o,r.xmlResponse=!0,r.successStatuses=[200],c.next=10,v.default.awrap(this.request(r));case 10:return i=c.sent,t=i.data.Upload||[],Array.isArray(t)||(t=[t]),t=t.map(function(d){return{name:d.Key,uploadId:d.UploadId,initiated:d.Initiated}}),c.abrupt("return",{res:i.res,uploads:t,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(o,n,l,r){var i,t,a;return v.default.async(function(d){for(;;)switch(d.prev=d.next){case 0:return r=r||{},i={},y(r).to(i),i.subres={uploadId:n},t=this._objectRequestParams("GET",o,i),t.query=l,t.xmlResponse=!0,t.successStatuses=[200],d.next=10,v.default.awrap(this.request(t));case 10:return a=d.sent,d.abrupt("return",{res:a.res,uploadId:a.data.UploadId,bucket:a.data.Bucket,name:a.data.Key,partNumberMarker:a.data.PartNumberMarker,nextPartNumberMarker:a.data.NextPartNumberMarker,maxParts:a.data.MaxParts,isTruncated:a.data.IsTruncated,parts:a.data.Part||[]});case 12:case"end":return d.stop()}},null,this)},p.abortMultipartUpload=function(o,n,l){var r,i,t;return v.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return this._stop(),l=l||{},r={},y(l).to(r),r.subres={uploadId:n},i=this._objectRequestParams("DELETE",o,r),i.successStatuses=[204],c.next=9,v.default.awrap(this.request(i));case 9:return t=c.sent,c.abrupt("return",{res:t.res});case 11:case"end":return c.stop()}},null,this)},p.initMultipartUpload=function(o,n){var l,r,i;return v.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return n=n||{},l={},y(n).to(l),l.headers=l.headers||{},this._convertMetaToHeaders(n.meta,l.headers),l.subres="uploads",r=this._objectRequestParams("POST",o,l),r.mime=n.mime,r.xmlResponse=!0,r.successStatuses=[200],a.next=12,v.default.awrap(this.request(r));case 12:return i=a.sent,a.abrupt("return",{res:i.res,bucket:i.data.Bucket,name:i.data.Key,uploadId:i.data.UploadId});case 14:case"end":return a.stop()}},null,this)},p.uploadPart=function(o,n,l,r,i,t,a){var c;return v.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return c={stream:this._createStream(r,i,t),size:t-i},f.next=3,v.default.awrap(this._uploadPart(o,n,l,c,a));case 3:return f.abrupt("return",f.sent);case 4:case"end":return f.stop()}},null,this)},p.completeMultipartUpload=function(o,n,l,r){var i,t,a,c,d,f,h,u;return v.default.async(function(x){for(;;)switch(x.prev=x.next){case 0:for(i=l.concat().sort(function(O,C){return O.number-C.number}).filter(function(O,C,w){return!C||O.number!==w[C-1].number}),t=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<CompleteMultipartUpload>
|
|
|
`,a=0;a<i.length;a++)c=i[a],t+=`<Part>
|
|
|
`,t+="<PartNumber>"+c.number+`</PartNumber>
|
|
|
`,t+="<ETag>"+c.etag+`</ETag>
|
|
|
`,t+=`</Part>
|
|
|
`;return t+="</CompleteMultipartUpload>",r=r||{},d={},d=_(r),d.headers&&delete d.headers["x-oss-server-side-encryption"],d.subres={uploadId:n},f=this._objectRequestParams("POST",o,d),g.encodeCallback(f,d),f.mime="xml",f.content=t,f.headers&&f.headers["x-oss-callback"]||(f.xmlResponse=!0),f.successStatuses=[200],x.next=17,v.default.awrap(this.request(f));case 17:return h=x.sent,u={res:h.res,bucket:f.bucket,name:o,etag:h.res.headers.etag},f.headers&&f.headers["x-oss-callback"]&&(u.data=JSON.parse(h.data.toString())),x.abrupt("return",u);case 21:case"end":return x.stop()}},null,this)},p._uploadPart=function(o,n,l,r,i){var t,a,c;return v.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return i=i||{},t={},y(i).to(t),t.headers={"Content-Length":r.size},t.subres={partNumber:l,uploadId:n},a=this._objectRequestParams("PUT",o,t),a.mime=t.mime,a.stream=r.stream,a.successStatuses=[200],f.next=11,v.default.awrap(this.request(a));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 r.stream=null,a.stream=null,f.abrupt("return",{name:o,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(j,H,b){"use strict";var I=j("babel-runtime/regenerator"),v=_(I),T=j("babel-runtime/core-js/object/keys"),y=_(T),g=j("babel-runtime/helpers/typeof"),s=_(g);function _(n){return n&&n.__esModule?n:{default:n}}var p=j("../utils/checkBucketName"),e=p.checkBucketName,o=b;o.copy=function(l,r,i,t){var a,c,d;return v.default.async(function(h){for(;;)switch(h.prev=h.next){case 0:return(typeof i=="undefined"?"undefined":(0,s.default)(i))==="object"&&(t=i),t=t||{},t.headers=t.headers||{},(0,y.default)(t.headers).forEach(function(u){t.headers["x-oss-copy-source-"+u.toLowerCase()]=t.headers[u]}),t.meta&&(t.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(t.meta,t.headers),r=this._getSourceName(r,i),t.versionId&&(r=r+"?versionId="+t.versionId),t.headers["x-oss-copy-source"]=r,a=this._objectRequestParams("PUT",l,t),a.xmlResponse=!0,a.successStatuses=[200,304],h.next=14,v.default.awrap(this.request(a));case 14:return c=h.sent,d=c.data,d&&(d={etag:d.ETag,lastModified:d.LastModified}),h.abrupt("return",{data:d,res:c.res});case 18:case"end":return h.stop()}},null,this)},o._getSourceName=function(l,r){return typeof r=="string"?l=this._objectName(l):l[0]!=="/"?r=this.options.bucket:(r=l.replace(/\/(.+?)(\/.*)/,"$1"),l=l.replace(/(\/.+?\/)(.*)/,"$2")),e(r),l=encodeURI(l),l="/"+r+"/"+l,l}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,"babel-runtime/regenerator":68}],20:[function(j,H,b){"use strict";var I=j("babel-runtime/regenerator"),v=g(I),T=j("babel-runtime/core-js/object/assign"),y=g(T);function g(_){return _&&_.__esModule?_:{default:_}}var s=b;s.delete=function(p){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o,n;return v.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return e.subres=(0,y.default)({},e.subres),e.versionId&&(e.subres.versionId=e.versionId),o=this._objectRequestParams("DELETE",p,e),o.successStatuses=[204],r.next=6,v.default.awrap(this.request(o));case 6:return n=r.sent,r.abrupt("return",{res:n.res});case 8:case"end":return r.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],21:[function(j,H,b){"use strict";var I=j("babel-runtime/regenerator"),v=g(I),T=j("babel-runtime/core-js/object/assign"),y=g(T);function g(o){return o&&o.__esModule?o:{default:o}}var s=j("utility"),_=j("../utils/obj2xml"),p=_.obj2xml,e=b;e.deleteMulti=function(n){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,i,t,a,c,d,f,h,u,E,x,O;return v.default.async(function(w){for(;;)switch(w.prev=w.next){case 0:if(r=[],!(!n||!n.length)){w.next=3;break}throw new Error("names is required");case 3:for(i=0;i<n.length;i++)t={},typeof n[i]=="string"?t.Key=s.escape(this._objectName(n[i])):(a=n[i],c=a.key,d=a.versionId,t.Key=s.escape(this._objectName(c)),t.VersionId=d),r.push(t);return f={Delete:{Quiet:!!l.quiet,Object:r}},h=p(f,{headers:!0}),l.subres=(0,y.default)({delete:""},l.subres),l.versionId&&(l.subres.versionId=l.versionId),u=this._objectRequestParams("POST","",l),u.mime="xml",u.content=h,u.xmlResponse=!0,u.successStatuses=[200],w.next=15,v.default.awrap(this.request(u));case 15:return E=w.sent,x=E.data,O=x&&x.Deleted||null,O&&(Array.isArray(O)||(O=[O])),w.abrupt("return",{res:E.res,deleted:O||[]});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(j,H,b){"use strict";var I=j("babel-runtime/regenerator"),v=g(I),T=j("babel-runtime/core-js/object/assign"),y=g(T);function g(_){return _&&_.__esModule?_:{default:_}}var s=b;s.deleteObjectTagging=function(p){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o,n;return v.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return e.subres=(0,y.default)({tagging:""},e.subres),e.versionId&&(e.subres.versionId=e.versionId),p=this._objectName(p),o=this._objectRequestParams("DELETE",p,e),o.successStatuses=[204],r.next=7,v.default.awrap(this.request(o));case 7:return n=r.sent,r.abrupt("return",{status:n.status,res:n.res});case 9:case"end":return r.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],23:[function(j,H,b){"use strict";var I=j("babel-runtime/regenerator"),v=g(I),T=j("babel-runtime/core-js/object/assign"),y=g(T);function g(e){return e&&e.__esModule?e:{default:e}}var s=j("fs"),_=j("is-type-of"),p=b;p.get=function(o,n){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,i,t,a;return v.default.async(function(d){for(;;)switch(d.prev=d.next){case 0:return r=null,i=!1,_.writableStream(n)?r=n:_.string(n)?(r=s.createWriteStream(n),i=!0):l=n,l=l||{},l.subres=(0,y.default)({},l.subres),l.versionId&&(l.subres.versionId=l.versionId),l.process&&(l.subres["x-oss-process"]=l.process),t=void 0,d.prev=8,a=this._objectRequestParams("GET",o,l),a.writeStream=r,a.successStatuses=[200,206,304],d.next=14,v.default.awrap(this.request(a));case 14:t=d.sent,i&&r.destroy(),d.next=25;break;case 18:if(d.prev=18,d.t0=d.catch(8),!i){d.next=24;break}return r.destroy(),d.next=24,v.default.awrap(this._deleteFileSafe(n));case 24:throw d.t0;case 25:return d.abrupt("return",{res:t.res,content:t.data});case 26:case"end":return d.stop()}},null,this,[[8,18]])}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,fs:71,"is-type-of":289}],24:[function(j,H,b){"use strict";var I=j("babel-runtime/regenerator"),v=g(I),T=j("babel-runtime/core-js/object/assign"),y=g(T);function g(_){return _&&_.__esModule?_:{default:_}}var s=b;s.getACL=function(p){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o,n;return v.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return e.subres=(0,y.default)({acl:""},e.subres),e.versionId&&(e.subres.versionId=e.versionId),p=this._objectName(p),o=this._objectRequestParams("GET",p,e),o.successStatuses=[200],o.xmlResponse=!0,r.next=8,v.default.awrap(this.request(o));case 8:return n=r.sent,r.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 r.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],25:[function(j,H,b){"use strict";var I=j("babel-runtime/core-js/object/keys"),v=_(I),T=j("babel-runtime/regenerator"),y=_(T),g=j("babel-runtime/core-js/object/assign"),s=_(g);function _(a){return a&&a.__esModule?a:{default:a}}var p=b,e=j("../utils/isObject"),o=e.isObject,n=j("../utils/isArray"),l=n.isArray;p.getBucketVersions=r,p.listObjectVersions=r;function r(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d,f,h,u,E,x;return y.default.async(function(C){for(;;)switch(C.prev=C.next){case 0:if(!(a.versionIdMarker&&a.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,s.default)({versions:""},c.subres),c.versionId&&(c.subres.versionId=c.versionId),d=this._objectRequestParams("GET","",c),d.xmlResponse=!0,d.successStatuses=[200],d.query=t(a),C.next=10,y.default.awrap(this.request(d));case 10:return f=C.sent,h=f.data.Version||[],u=f.data.DeleteMarker||[],E=this,h&&(Array.isArray(h)||(h=[h]),h=h.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}}})),u&&(l(u)||(u=[u]),u=u.map(function(w){return{name:w.Key,lastModified:w.LastModified,versionId:w.VersionId,owner:{id:w.Owner.ID,displayName:w.Owner.DisplayName}}})),x=f.data.CommonPrefixes||null,x&&(l(x)||(x=[x]),x=x.map(function(w){return w.Prefix})),C.abrupt("return",{res:f.res,objects:h,deleteMarker:u,prefixes:x,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(a){return a.replace(/([A-Z])/g,"-$1").toLowerCase()}function t(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c={};return o(a)&&(0,v.default)(a).forEach(function(d){c[i(d)]=a[d]}),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(j,H,b){"use strict";var I=j("babel-runtime/regenerator"),v=g(I),T=j("babel-runtime/core-js/object/assign"),y=g(T);function g(_){return _&&_.__esModule?_:{default:_}}var s=b;s.getObjectMeta=function(p,e){var o,n;return v.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return e=e||{},p=this._objectName(p),e.subres=(0,y.default)({objectMeta:""},e.subres),e.versionId&&(e.subres.versionId=e.versionId),o=this._objectRequestParams("HEAD",p,e),o.successStatuses=[200],r.next=8,v.default.awrap(this.request(o));case 8:return n=r.sent,r.abrupt("return",{status:n.status,res:n.res});case 10:case"end":return r.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],27:[function(j,H,b){"use strict";var I=j("babel-runtime/regenerator"),v=g(I),T=j("babel-runtime/core-js/object/assign"),y=g(T);function g(e){return e&&e.__esModule?e:{default:e}}var s=b,_=j("../utils/isObject"),p=_.isObject;s.getObjectTagging=function(o){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,r,i,t,a;return v.default.async(function(d){for(;;)switch(d.prev=d.next){case 0:return n.subres=(0,y.default)({tagging:""},n.subres),n.versionId&&(n.subres.versionId=n.versionId),o=this._objectName(o),l=this._objectRequestParams("GET",o,n),l.successStatuses=[200],d.next=7,v.default.awrap(this.request(l));case 7:return r=d.sent,d.next=10,v.default.awrap(this.parseXML(r.data));case 10:return i=d.sent,t=i.TagSet.Tag,t=t&&p(t)?[t]:t||[],a={},t.forEach(function(f){a[f.Key]=f.Value}),d.abrupt("return",{status:r.status,res:r.res,tag:a});case 16:case"end":return d.stop()}},null,this)}},{"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],28:[function(j,H,b){"use strict";var I=j("babel-runtime/regenerator"),v=g(I),T=j("babel-runtime/core-js/object/assign"),y=g(T);function g(_){return _&&_.__esModule?_:{default:_}}var s=b;s.getSymlink=function(p){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o,n,l;return v.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return e.subres=(0,y.default)({symlink:""},e.subres),e.versionId&&(e.subres.versionId=e.versionId),p=this._objectName(p),o=this._objectRequestParams("GET",p,e),o.successStatuses=[200],i.next=7,v.default.awrap(this.request(o));case 7:return n=i.sent,l=n.res.headers["x-oss-symlink-target"],i.abrupt("return",{targetName:decodeURIComponent(l),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(j,H,b){"use strict";var I=j("babel-runtime/regenerator"),v=_(I),T=j("babel-runtime/core-js/object/keys"),y=_(T),g=j("babel-runtime/core-js/object/assign"),s=_(g);function _(e){return e&&e.__esModule?e:{default:e}}var p=b;p.head=function(o){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,r,i;return v.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return n.subres=(0,s.default)({},n.subres),n.versionId&&(n.subres.versionId=n.versionId),l=this._objectRequestParams("HEAD",o,n),l.successStatuses=[200,304],a.next=6,v.default.awrap(this.request(l));case 6:return r=a.sent,i={meta:null,res:r.res,status:r.status},r.status===200&&(0,y.default)(r.headers).forEach(function(c){c.indexOf("x-oss-meta-")===0&&(i.meta||(i.meta={}),i.meta[c.substring(11)]=r.headers[c])}),a.abrupt("return",i);case 10:case"end":return a.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],30:[function(j,H,b){"use strict";var I=j("babel-runtime/regenerator"),v=g(I),T=j("babel-runtime/core-js/object/assign"),y=g(T);function g(_){return _&&_.__esModule?_:{default:_}}var s=b;s.putACL=function(p,e,o){var n,l;return v.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return o=o||{},o.subres=(0,y.default)({acl:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),o.headers=o.headers||{},o.headers["x-oss-object-acl"]=e,p=this._objectName(p),n=this._objectRequestParams("PUT",p,o),n.successStatuses=[200],i.next=10,v.default.awrap(this.request(n));case 10:return l=i.sent,i.abrupt("return",{res:l.res});case 12:case"end":return i.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],31:[function(j,H,b){"use strict";var I=j("babel-runtime/regenerator"),v=_(I),T=j("babel-runtime/core-js/object/keys"),y=_(T),g=j("babel-runtime/core-js/object/assign"),s=_(g);function _(r){return r&&r.__esModule?r:{default:r}}var p=j("../utils/obj2xml"),e=p.obj2xml,o=j("../utils/checkObjectTag"),n=o.checkObjectTag,l=b;l.putObjectTagging=function(i,t){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},c,d,f;return v.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return n(t),a.subres=(0,s.default)({tagging:""},a.subres),a.versionId&&(a.subres.versionId=a.versionId),i=this._objectName(i),c=this._objectRequestParams("PUT",i,a),c.successStatuses=[200],t=(0,y.default)(t).map(function(E){return{Key:E,Value:t[E]}}),d={Tagging:{TagSet:{Tag:t}}},c.mime="xml",c.content=e(d),u.next=12,v.default.awrap(this.request(c));case 12:return f=u.sent,u.abrupt("return",{res:f.res,status:f.status});case 14:case"end":return u.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(j,H,b){"use strict";var I=j("babel-runtime/regenerator"),v=g(I),T=j("babel-runtime/core-js/object/assign"),y=g(T);function g(_){return _&&_.__esModule?_:{default:_}}var s=b;s.putSymlink=function(p,e,o){var n,l;return v.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return o=o||{},o.headers=o.headers||{},e=this._escape(this._objectName(e)),this._convertMetaToHeaders(o.meta,o.headers),o.headers["x-oss-symlink-target"]=e,o.subres=(0,y.default)({symlink:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),o.storageClass&&(o.headers["x-oss-storage-class"]=o.storageClass),p=this._objectName(p),n=this._objectRequestParams("PUT",p,o),n.successStatuses=[200],i.next=13,v.default.awrap(this.request(n));case 13:return l=i.sent,i.abrupt("return",{res:l.res});case 15:case"end":return i.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],33:[function(j,H,b){"use strict";var I=j("babel-runtime/regenerator"),v=g(I),T=j("babel-runtime/core-js/promise"),y=g(T);function g(_){return _&&_.__esModule?_:{default:_}}var s=b;s._parallelNode=function(p,e,o,n){var l,r,i,t,a,c,d,f;return v.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:l=this,r=[],i=[],t=p.length/e,a=p.length%e,c=a===0?t:(p.length-a)/e+1,d=1,f=0;case 8:if(!(f<p.length)){u.next=26;break}if(!l.isCancel()){u.next=11;break}return u.abrupt("break",26);case 11:if(n?i.push(o(l,p[f],n)):i.push(o(l,p[f])),!(i.length===e||d===c&&f===p.length-1)){u.next=23;break}return u.prev=13,d+=1,u.next=17,v.default.awrap(y.default.all(i));case 17:u.next=22;break;case 19:u.prev=19,u.t0=u.catch(13),r.push(u.t0);case 22:i=[];case 23:f++,u.next=8;break;case 26:return u.abrupt("return",r);case 27:case"end":return u.stop()}},null,this,[[13,19]])},s._parallel=function(p,e,o){var n=this;return new y.default(function(l){var r=[];if(e<=0||!p){l(r);return}function i(x){return function(){if(x===null)throw new Error("Callback was already called.");var O=x;x=null;for(var C=arguments.length,w=Array(C),S=0;S<C;S++)w[S]=arguments[S];O.apply(this,w)}}function t(x){var O=-1,C=x.length;return function(){return++O<C&&!n.isCancel()?{value:x[O],key:O}:null}}var a=t(p),c=!1,d=0,f=!1;function h(x,O){d-=1,x?(c=!0,r.push(x),l(r)):O==={}||c&&d<=0?(c=!0,l(r)):f||(n.isCancel()?l(r):E())}function u(x,O){o(x).then(function(C){O(null,C)}).catch(function(C){O(C)})}function E(){for(f=!0;d<e&&!c&&!n.isCancel();){var x=a();if(x===null||r.length>0){c=!0,d<=0&&l(r);return}d+=1,u(x.value,i(h))}f=!1}E()})},s.cancel=function(p){this.options.cancelFlag=!0,p&&this.abortMultipartUpload(p.name,p.uploadId,p.options)},s.isCancel=function(){return this.options.cancelFlag},s.resetCancelFlag=function(){this.options.cancelFlag=!1},s._stop=function(){this.options.cancelFlag=!0},s._makeCancelEvent=function(){var p={status:0,name:"cancel"};return p}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(j,H,b){(function(I){"use strict";var v=j("babel-runtime/core-js/json/stringify"),T=s(v),y=j("babel-runtime/core-js/object/keys"),g=s(y);function s(e){return e&&e.__esModule?e:{default:e}}var _=j("./../../shims/crypto/crypto.js"),p=j("is-type-of");b.buildCanonicalizedResource=function(o,n){var l=""+o,r="?";if(p.string(n)&&n.trim()!=="")l+=r+n;else if(p.array(n))n.sort(),l+=r+n.join("&");else if(n){var i=function(c,d){return c[0]>d[0]?1:c[0]<d[0]?-1:0},t=function(c){l+=r+c,n[c]&&(l+="="+n[c]),r="&"};(0,g.default)(n).sort(i).forEach(t)}return l},b.buildCanonicalString=function(o,n,l,r){l=l||{};var i=l.headers||{},t="x-oss-",a=[],c={},d=[o.toUpperCase(),i["Content-Md5"]||"",i["Content-Type"]||i["Content-Type".toLowerCase()],r||i["x-oss-date"]];return(0,g.default)(i).forEach(function(f){var h=f.toLowerCase();h.indexOf(t)===0&&(c[h]=String(i[f]).trim())}),(0,g.default)(c).sort().forEach(function(f){a.push(f+":"+c[f])}),d=d.concat(a),d.push(this.buildCanonicalizedResource(n,l.parameters)),d.join(`
|
|
|
`)},b.computeSignature=function(o,n){var l=_.createHmac("sha1",o);return l.update(I.from(n,"utf8")).digest("base64")},b.authorization=function(o,n,l){return"OSS "+o+":"+this.computeSignature(n,l)},b._signatureForURL=function(o){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=arguments[2],r=arguments[3],i={},t=n.subResource,a=t===void 0?{}:t;if(n.process){var c="x-oss-process";a[c]=n.process}if(n.trafficLimit){var d="x-oss-traffic-limit";a[d]=n.trafficLimit}if(n.response&&(0,g.default)(n.response).forEach(function(E){var x="response-"+E.toLowerCase();a[x]=n.response[E]}),(0,g.default)(n).forEach(function(E){var x=E.toLowerCase(),O=n[E];x.indexOf("x-oss-")===0?i[x]=O:(x.indexOf("content-md5")===0||x.indexOf("content-type")===0)&&(i[E]=O)}),Object.prototype.hasOwnProperty.call(n,"security-token")&&(a["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),a.callback=I.from((0,T.default)(f)).toString("base64"),n.callback.customValue){var h={};(0,g.default)(n.callback.customValue).forEach(function(E){h["x:"+E]=n.callback.customValue[E]}),a["callback-var"]=I.from((0,T.default)(h)).toString("base64")}}var u=this.buildCanonicalString(n.method,l,{headers:i,parameters:a},r.toString());return{Signature:this.computeSignature(o,u),subResource:a}}}).call(this,j("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(j,H,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.checkBucketName=void 0,b.checkBucketName=function(I,v){var T=v?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!T.test(I))throw new Error("The bucket must be conform to the specifications")}},{}],36:[function(j,H,b){"use strict";var I=j("babel-runtime/core-js/object/entries"),v=T(I);function T(n){return n&&n.__esModule?n:{default:n}}Object.defineProperty(b,"__esModule",{value:!0}),b.checkObjectTag=void 0;var y=j("./checkValid"),g=y.checkValid,s=j("./isObject"),_=s.isObject,p=[{validator:function(l){if(typeof l!="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 (/)"}],e={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 o(n){if(!_(n))throw new Error("tag must be Object");var l=(0,v.default)(n);if(l.length>10)throw new Error("maximum of 10 tags for a object");var r=["key","value"];l.forEach(function(i){i.forEach(function(t,a){g(t,e[r[a]])})})}b.checkObjectTag=o},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(j,H,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.checkValid=void 0;function I(v,T){T.forEach(function(y){if(y.validator)y.validator(v);else if(y.pattern&&!y.pattern.test(v))throw new Error(y.msg)})}b.checkValid=I},{}],38:[function(j,H,b){(function(I){"use strict";var v=j("babel-runtime/core-js/object/assign"),T=y(v);function y(i){return i&&i.__esModule?i:{default:i}}Object.defineProperty(b,"__esModule",{value:!0}),b.createRequest=void 0;var g=j("./../../../shims/crypto/crypto.js"),s=j("debug")("ali-oss"),_=j("mime"),p=j("dateformat"),e=j("copy-to"),o=j("path");function n(i,t){return i[t]||i[t.toLowerCase()]}function l(i,t){delete i[t],delete i[t.toLowerCase()]}function r(i){var t=new Date;this.options.amendTimeSkewed&&(t=+new Date+this.options.amendTimeSkewed);var a={"x-oss-date":p(t,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(a["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,T.default)(a,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(a["x-oss-security-token"]=this.options.stsToken),e(i.headers).to(a),n(a,"Content-Type")||(i.mime&&i.mime.indexOf("/")>0?a["Content-Type"]=i.mime:a["Content-Type"]=_.getType(i.mime||o.extname(i.object||""))),n(a,"Content-Type")||l(a,"Content-Type"),i.content&&(a["Content-Md5"]=g.createHash("md5").update(I.from(i.content,"utf8")).digest("base64"),a["Content-Length"]||(a["Content-Length"]=i.content.length));var c=this._getResource(i);a.authorization=this.authorization(i.method,c,i.subres,a);var d=this._getReqUrl(i);s("request %s %s, with headers %j, !!stream: %s",i.method,d,a,!!i.stream);var f=i.timeout||this.options.timeout,h={method:i.method,content:i.content,stream:i.stream,headers:a,timeout:f,writeStream:i.writeStream,customResponse:i.customResponse,ctx:i.ctx||this.ctx};return this.agent&&(h.agent=this.agent),this.httpsAgent&&(h.httpsAgent=this.httpsAgent),{url:d,params:h}}b.createRequest=r}).call(this,j("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(j,H,b){"use strict";var I=j("babel-runtime/core-js/object/keys"),v=g(I),T=j("babel-runtime/helpers/typeof"),y=g(T);function g(s){return s&&s.__esModule?s:{default:s}}Object.defineProperty(b,"__esModule",{value:!0}),b.deepCopy=void 0,b.deepCopy=function(s){if(s===null||(typeof s=="undefined"?"undefined":(0,y.default)(s))!=="object")return s;var _=Array.isArray(s)?[]:{};return(0,v.default)(s).forEach(function(p){_[p]=b.deepCopy(s[p])}),_}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(j,H,b){"use strict";var I=j("babel-runtime/core-js/object/keys"),v=g(I),T=j("babel-runtime/helpers/typeof"),y=g(T);function g(p){return p&&p.__esModule?p:{default:p}}Object.defineProperty(b,"__esModule",{value:!0}),b.formatObjKey=void 0;function s(p,e){if(p===null||(typeof p=="undefined"?"undefined":(0,y.default)(p))!=="object")return p;var o=void 0;if(Array.isArray(p)){o=[];for(var n=0;n<p.length;n++)o.push(s(p[n],e))}else o={},(0,v.default)(p).forEach(function(l){o[_(l,e)]=s(p[l],e)});return o}b.formatObjKey=s;function _(p,e){return e==="firstUpperCase"?p=p.replace(/^./,function(o){return o.toUpperCase()}):e==="firstLowerCase"&&(p=p.replace(/^./,function(o){return o.toLowerCase()})),p}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],41:[function(j,H,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.getStrBytesCount=void 0;function I(v){for(var T=0,y=0;y<v.length;y++){var g=v.charAt(y);/^[\u00-\uff]$/.test(g)?T+=1:T+=2}return T}b.getStrBytesCount=I},{}],42:[function(j,H,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.isArray=void 0,b.isArray=function(I){return Object.prototype.toString.call(I)==="[object Array]"}},{}],43:[function(j,H,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.isBlob=void 0;function I(v){return typeof Blob!="undefined"&&v instanceof Blob}b.isBlob=I},{}],44:[function(j,H,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.isFile=void 0,b.isFile=function(I){return typeof File!="undefined"&&I instanceof File}},{}],45:[function(j,H,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.isIP=void 0,b.isIP=function(I){var v=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,T=/^\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 v.test(I)||T.test(I)}},{}],46:[function(j,H,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.isObject=void 0,b.isObject=function(I){return Object.prototype.toString.call(I)==="[object Object]"}},{}],47:[function(j,H,b){"use strict";var I=j("babel-runtime/core-js/object/keys"),v=T(I);function T(_){return _&&_.__esModule?_:{default:_}}Object.defineProperty(b,"__esModule",{value:!0}),b.obj2xml=void 0;var y=j("./formatObjKey");function g(_){return Object.prototype.toString.call(_).replace(/(.*? |])/g,"").toLowerCase()}function s(_,p){var e="";return p&&p.headers&&(e=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
`),p&&p.firstUpperCase&&(_=y.formatObjKey(_,"firstUpperCase")),g(_)==="object"?(0,v.default)(_).forEach(function(o){g(_[o])==="string"||g(_[o])==="number"?e+="<"+o+">"+_[o]+"</"+o+">":g(_[o])==="object"?e+="<"+o+">"+s(_[o])+"</"+o+">":g(_[o])==="array"?e+=_[o].map(function(n){return"<"+o+">"+s(n)+"</"+o+">"}).join(""):e+="<"+o+">"+_[o].toString()+"</"+o+">"}):e+=_.toString(),e}b.obj2xml=s},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(j,H,b){H.exports=I,H.exports.HttpsAgent=I;function I(){}},{}],49:[function(j,H,b){H.exports=j("./register")().Promise},{"./register":51}],50:[function(j,H,b){"use strict";var I="@@any-promise/REGISTRATION",v=null;H.exports=function(T,y){return function(s,_){s=s||null,_=_||{};var p=_.global!==!1;if(v===null&&p&&(v=T[I]||null),v!==null&&s!==null&&v.implementation!==s)throw new Error('any-promise already defined as "'+v.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return v===null&&(s!==null&&typeof _.Promise!="undefined"?v={Promise:_.Promise,implementation:s}:v=y(s),p&&(T[I]=v)),v}}},{}],51:[function(j,H,b){"use strict";H.exports=j("./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(j,H,b){H.exports={default:j("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(j,H,b){H.exports={default:j("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(j,H,b){H.exports={default:j("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(j,H,b){H.exports={default:j("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(j,H,b){H.exports={default:j("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(j,H,b){H.exports={default:j("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(j,H,b){H.exports={default:j("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":83}],59:[function(j,H,b){H.exports={default:j("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":84}],60:[function(j,H,b){H.exports={default:j("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(j,H,b){H.exports={default:j("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(j,H,b){H.exports={default:j("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(j,H,b){H.exports={default:j("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":88}],64:[function(j,H,b){H.exports={default:j("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(j,H,b){H.exports={default:j("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(j,H,b){H.exports={default:j("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(j,H,b){"use strict";b.__esModule=!0;var I=j("../core-js/symbol/iterator"),v=s(I),T=j("../core-js/symbol"),y=s(T),g=typeof y.default=="function"&&typeof v.default=="symbol"?function(_){return typeof _}:function(_){return _&&typeof y.default=="function"&&_.constructor===y.default&&_!==y.default.prototype?"symbol":typeof _};function s(_){return _&&_.__esModule?_:{default:_}}b.default=typeof y.default=="function"&&g(v.default)==="symbol"?function(_){return typeof _=="undefined"?"undefined":g(_)}:function(_){return _&&typeof y.default=="function"&&_.constructor===y.default&&_!==y.default.prototype?"symbol":typeof _=="undefined"?"undefined":g(_)}},{"../core-js/symbol":64,"../core-js/symbol/iterator":66}],68:[function(j,H,b){H.exports=j("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(j,H,b){"use strict";b.byteLength=p,b.toByteArray=o,b.fromByteArray=r;for(var I=[],v=[],T=typeof Uint8Array!="undefined"?Uint8Array:Array,y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",g=0,s=y.length;g<s;++g)I[g]=y[g],v[y.charCodeAt(g)]=g;v["-".charCodeAt(0)]=62,v["_".charCodeAt(0)]=63;function _(i){var t=i.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var a=i.indexOf("=");a===-1&&(a=t);var c=a===t?0:4-a%4;return[a,c]}function p(i){var t=_(i),a=t[0],c=t[1];return(a+c)*3/4-c}function e(i,t,a){return(t+a)*3/4-a}function o(i){var t,a=_(i),c=a[0],d=a[1],f=new T(e(i,c,d)),h=0,u=d>0?c-4:c,E;for(E=0;E<u;E+=4)t=v[i.charCodeAt(E)]<<18|v[i.charCodeAt(E+1)]<<12|v[i.charCodeAt(E+2)]<<6|v[i.charCodeAt(E+3)],f[h++]=t>>16&255,f[h++]=t>>8&255,f[h++]=t&255;return d===2&&(t=v[i.charCodeAt(E)]<<2|v[i.charCodeAt(E+1)]>>4,f[h++]=t&255),d===1&&(t=v[i.charCodeAt(E)]<<10|v[i.charCodeAt(E+1)]<<4|v[i.charCodeAt(E+2)]>>2,f[h++]=t>>8&255,f[h++]=t&255),f}function n(i){return I[i>>18&63]+I[i>>12&63]+I[i>>6&63]+I[i&63]}function l(i,t,a){for(var c,d=[],f=t;f<a;f+=3)c=(i[f]<<16&16711680)+(i[f+1]<<8&65280)+(i[f+2]&255),d.push(n(c));return d.join("")}function r(i){for(var t,a=i.length,c=a%3,d=[],f=16383,h=0,u=a-c;h<u;h+=f)d.push(l(i,h,h+f>u?u:h+f));return c===1?(t=i[a-1],d.push(I[t>>2]+I[t<<4&63]+"==")):c===2&&(t=(i[a-2]<<8)+i[a-1],d.push(I[t>>10]+I[t>>4&63]+I[t<<2&63]+"=")),d.join("")}},{}],70:[function(j,H,b){/*!
|
|
|
* Bowser - a browser detector
|
|
|
* https://github.com/ded/bowser
|
|
|
* MIT License | (c) Dustin Diaz 2015
|
|
|
*/!function(I,v,T){typeof H!="undefined"&&H.exports?H.exports=T():typeof define=="function"&&define.amd?define(v,T):I[v]=T()}(this,"bowser",function(){var I=!0;function v(e){function o(F){var U=e.match(F);return U&&U.length>1&&U[1]||""}function n(F){var U=e.match(F);return U&&U.length>1&&U[2]||""}var l=o(/(ipod|iphone|ipad)/i).toLowerCase(),r=/like android/i.test(e),i=!r&&/android/i.test(e),t=/nexus\s*[0-6]\s*/i.test(e),a=!t&&/nexus\s*[0-9]+/i.test(e),c=/CrOS/.test(e),d=/silk/i.test(e),f=/sailfish/i.test(e),h=/tizen/i.test(e),u=/(web|hpw)(o|0)s/i.test(e),E=/windows phone/i.test(e),x=/SamsungBrowser/i.test(e),O=!E&&/windows/i.test(e),C=!l&&!d&&/macintosh/i.test(e),w=!i&&!f&&!h&&!u&&/linux/i.test(e),S=n(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),A=o(/version\/(\d+(\.\d+)?)/i),D=/tablet/i.test(e)&&!/tablet pc/i.test(e),M=!D&&/[^-]mobi/i.test(e),N=/xbox/i.test(e),P;/opera/i.test(e)?P={name:"Opera",opera:I,version:A||o(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(e)?P={name:"Opera",opera:I,version:o(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||A}:/SamsungBrowser/i.test(e)?P={name:"Samsung Internet for Android",samsungBrowser:I,version:A||o(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(e)?P={name:"NAVER Whale browser",whale:I,version:o(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(e)?P={name:"MZ Browser",mzbrowser:I,version:o(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(e)?P={name:"Opera Coast",coast:I,version:A||o(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(e)?P={name:"Focus",focus:I,version:o(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(e)?P={name:"Yandex Browser",yandexbrowser:I,version:A||o(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(e)?P={name:"UC Browser",ucbrowser:I,version:o(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(e)?P={name:"Maxthon",maxthon:I,version:o(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(e)?P={name:"Epiphany",epiphany:I,version:o(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(e)?P={name:"Puffin",puffin:I,version:o(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(e)?P={name:"Sleipnir",sleipnir:I,version:o(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(e)?P={name:"K-Meleon",kMeleon:I,version:o(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:E?(P={name:"Windows Phone",osname:"Windows Phone",windowsphone:I},S?(P.msedge=I,P.version=S):(P.msie=I,P.version=o(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(e)?P={name:"Internet Explorer",msie:I,version:o(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:c?P={name:"Chrome",osname:"Chrome OS",chromeos:I,chromeBook:I,chrome:I,version:o(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(e)?P={name:"Microsoft Edge",msedge:I,version:S}:/vivaldi/i.test(e)?P={name:"Vivaldi",vivaldi:I,version:o(/vivaldi\/(\d+(\.\d+)?)/i)||A}:f?P={name:"Sailfish",osname:"Sailfish OS",sailfish:I,version:o(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(e)?P={name:"SeaMonkey",seamonkey:I,version:o(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(e)?(P={name:"Firefox",firefox:I,version:o(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(e)&&(P.firefoxos=I,P.osname="Firefox OS")):d?P={name:"Amazon Silk",silk:I,version:o(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(e)?P={name:"PhantomJS",phantom:I,version:o(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(e)?P={name:"SlimerJS",slimer:I,version:o(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(e)||/rim\stablet/i.test(e)?P={name:"BlackBerry",osname:"BlackBerry OS",blackberry:I,version:A||o(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:u?(P={name:"WebOS",osname:"WebOS",webos:I,version:A||o(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(e)&&(P.touchpad=I)):/bada/i.test(e)?P={name:"Bada",osname:"Bada",bada:I,version:o(/dolfin\/(\d+(\.\d+)?)/i)}:h?P={name:"Tizen",osname:"Tizen",tizen:I,version:o(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||A}:/qupzilla/i.test(e)?P={name:"QupZilla",qupzilla:I,version:o(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||A}:/chromium/i.test(e)?P={name:"Chromium",chromium:I,version:o(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||A}:/chrome|crios|crmo/i.test(e)?P={name:"Chrome",chrome:I,version:o(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:i?P={name:"Android",version:A}:/safari|applewebkit/i.test(e)?(P={name:"Safari",safari:I},A&&(P.version=A)):l?(P={name:l=="iphone"?"iPhone":l=="ipad"?"iPad":"iPod"},A&&(P.version=A)):/googlebot/i.test(e)?P={name:"Googlebot",googlebot:I,version:o(/googlebot\/(\d+(\.\d+))/i)||A}:P={name:o(/^(.*)\/(.*) /),version:n(/^(.*)\/(.*) /)},!P.msedge&&/(apple)?webkit/i.test(e)?(/(apple)?webkit\/537\.36/i.test(e)?(P.name=P.name||"Blink",P.blink=I):(P.name=P.name||"Webkit",P.webkit=I),!P.version&&A&&(P.version=A)):!P.opera&&/gecko\//i.test(e)&&(P.name=P.name||"Gecko",P.gecko=I,P.version=P.version||o(/gecko\/(\d+(\.\d+)?)/i)),!P.windowsphone&&(i||P.silk)?(P.android=I,P.osname="Android"):!P.windowsphone&&l?(P[l]=I,P.ios=I,P.osname="iOS"):C?(P.mac=I,P.osname="macOS"):N?(P.xbox=I,P.osname="Xbox"):O?(P.windows=I,P.osname="Windows"):w&&(P.linux=I,P.osname="Linux");function z(F){switch(F){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 X="";P.windows?X=z(o(/Windows ((NT|XP)( \d\d?.\d)?)/i)):P.windowsphone?X=o(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):P.mac?(X=o(/Mac OS X (\d+([_\.\s]\d+)*)/i),X=X.replace(/[_\s]/g,".")):l?(X=o(/os (\d+([_\s]\d+)*) like mac os x/i),X=X.replace(/[_\s]/g,".")):i?X=o(/android[ \/-](\d+(\.\d+)*)/i):P.webos?X=o(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):P.blackberry?X=o(/rim\stablet\sos\s(\d+(\.\d+)*)/i):P.bada?X=o(/bada\/(\d+(\.\d+)*)/i):P.tizen&&(X=o(/tizen[\/\s](\d+(\.\d+)*)/i)),X&&(P.osversion=X);var k=!P.windows&&X.split(".")[0];return D||a||l=="ipad"||i&&(k==3||k>=4&&!M)||P.silk?P.tablet=I:(M||l=="iphone"||l=="ipod"||i||t||P.blackberry||P.webos||P.bada)&&(P.mobile=I),P.msedge||P.msie&&P.version>=10||P.yandexbrowser&&P.version>=15||P.vivaldi&&P.version>=1||P.chrome&&P.version>=20||P.samsungBrowser&&P.version>=4||P.whale&&s([P.version,"1.0"])===1||P.mzbrowser&&s([P.version,"6.0"])===1||P.focus&&s([P.version,"1.0"])===1||P.firefox&&P.version>=20||P.safari&&P.version>=6||P.opera&&P.version>=10||P.ios&&P.osversion&&P.osversion.split(".")[0]>=6||P.blackberry&&P.version>=10.1||P.chromium&&P.version>=20?P.a=I:P.msie&&P.version<10||P.chrome&&P.version<20||P.firefox&&P.version<20||P.safari&&P.version<6||P.opera&&P.version<10||P.ios&&P.osversion&&P.osversion.split(".")[0]<6||P.chromium&&P.version<20?P.c=I:P.x=I,P}var T=v(typeof navigator!="undefined"&&navigator.userAgent||"");T.test=function(e){for(var o=0;o<e.length;++o){var n=e[o];if(typeof n=="string"&&n in T)return!0}return!1};function y(e){return e.split(".").length}function g(e,o){var n=[],l;if(Array.prototype.map)return Array.prototype.map.call(e,o);for(l=0;l<e.length;l++)n.push(o(e[l]));return n}function s(e){for(var o=Math.max(y(e[0]),y(e[1])),n=g(e,function(l){var r=o-y(l);return l=l+new Array(r+1).join(".0"),g(l.split("."),function(i){return new Array(20-i.length).join("0")+i}).reverse()});--o>=0;){if(n[0][o]>n[1][o])return 1;if(n[0][o]===n[1][o]){if(o===0)return 0}else return-1}}function _(e,o,n){var l=T;typeof o=="string"&&(n=o,o=void 0),o===void 0&&(o=!1),n&&(l=v(n));var r=""+l.version;for(var i in e)if(e.hasOwnProperty(i)&&l[i]){if(typeof e[i]!="string")throw new Error("Browser version in the minVersion map should be a string: "+i+": "+String(e));return s([r,e[i]])<0}return o}function p(e,o,n){return!_(e,o,n)}return T.isUnsupportedBrowser=_,T.compareVersions=s,T.check=p,T._detect=v,T.detect=v,T})},{}],71:[function(j,H,b){},{}],72:[function(j,H,b){var I=j("buffer").Buffer,v=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 T(p){if(p&&!v(p))throw new Error("Unknown encoding: "+p)}var y=b.StringDecoder=function(p){this.encoding=(p||"utf8").toLowerCase().replace(/[-_]/,""),T(p);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=s;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=_;break;default:this.write=g;return}this.charBuffer=new I(6),this.charReceived=0,this.charLength=0};y.prototype.write=function(p){for(var e="";this.charLength;){var o=p.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:p.length;if(p.copy(this.charBuffer,this.charReceived,0,o),this.charReceived+=o,this.charReceived<this.charLength)return"";p=p.slice(o,p.length),e=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var l=e.charCodeAt(e.length-1);if(l>=55296&&l<=56319){this.charLength+=this.surrogateSize,e="";continue}if(this.charReceived=this.charLength=0,p.length===0)return e;break}this.detectIncompleteChar(p);var n=p.length;this.charLength&&(p.copy(this.charBuffer,0,p.length-this.charReceived,n),n-=this.charReceived),e+=p.toString(this.encoding,0,n);var n=e.length-1,l=e.charCodeAt(n);if(l>=55296&&l<=56319){var r=this.surrogateSize;return this.charLength+=r,this.charReceived+=r,this.charBuffer.copy(this.charBuffer,r,0,r),p.copy(this.charBuffer,0,0,r),e.substring(0,n)}return e},y.prototype.detectIncompleteChar=function(p){for(var e=p.length>=3?3:p.length;e>0;e--){var o=p[p.length-e];if(e==1&&o>>5==6){this.charLength=2;break}if(e<=2&&o>>4==14){this.charLength=3;break}if(e<=3&&o>>3==30){this.charLength=4;break}}this.charReceived=e},y.prototype.end=function(p){var e="";if(p&&p.length&&(e=this.write(p)),this.charReceived){var o=this.charReceived,n=this.charBuffer,l=this.encoding;e+=n.slice(0,o).toString(l)}return e};function g(p){return p.toString(this.encoding)}function s(p){this.charReceived=p.length%2,this.charLength=this.charReceived?2:0}function _(p){this.charReceived=p.length%3,this.charLength=this.charReceived?3:0}},{buffer:73}],73:[function(j,H,b){(function(I,v){/*!
|
|
|
* The buffer module from node.js, for the browser.
|
|
|
*
|
|
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
|
* @license MIT
|
|
|
*/"use strict";var T=j("base64-js"),y=j("ieee754"),g=j("isarray");b.Buffer=v,b.SlowBuffer=d,b.INSPECT_MAX_BYTES=50,v.TYPED_ARRAY_SUPPORT=I.TYPED_ARRAY_SUPPORT!==void 0?I.TYPED_ARRAY_SUPPORT:s(),b.kMaxLength=_();function s(){try{var ie=new Uint8Array(1);return ie.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},ie.foo()===42&&typeof ie.subarray=="function"&&ie.subarray(1,1).byteLength===0}catch(q){return!1}}function _(){return v.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function p(ie,q){if(_()<q)throw new RangeError("Invalid typed array length");return v.TYPED_ARRAY_SUPPORT?(ie=new Uint8Array(q),ie.__proto__=v.prototype):(ie===null&&(ie=new v(q)),ie.length=q),ie}function v(ie,q,Q){if(!v.TYPED_ARRAY_SUPPORT&&!(this instanceof v))return new v(ie,q,Q);if(typeof ie=="number"){if(typeof q=="string")throw new Error("If encoding is specified then the first argument must be a string");return l(this,ie)}return e(this,ie,q,Q)}v.poolSize=8192,v._augment=function(ie){return ie.__proto__=v.prototype,ie};function e(ie,q,Q,Y){if(typeof q=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&q instanceof ArrayBuffer?t(ie,q,Q,Y):typeof q=="string"?r(ie,q,Q):a(ie,q)}v.from=function(ie,q,Q){return e(null,ie,q,Q)},v.TYPED_ARRAY_SUPPORT&&(v.prototype.__proto__=Uint8Array.prototype,v.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&v[Symbol.species]===v&&Object.defineProperty(v,Symbol.species,{value:null,configurable:!0}));function o(ie){if(typeof ie!="number")throw new TypeError('"size" argument must be a number');if(ie<0)throw new RangeError('"size" argument must not be negative')}function n(ie,q,Q,Y){return o(q),q<=0?p(ie,q):Q!==void 0?typeof Y=="string"?p(ie,q).fill(Q,Y):p(ie,q).fill(Q):p(ie,q)}v.alloc=function(ie,q,Q){return n(null,ie,q,Q)};function l(ie,q){if(o(q),ie=p(ie,q<0?0:c(q)|0),!v.TYPED_ARRAY_SUPPORT)for(var Q=0;Q<q;++Q)ie[Q]=0;return ie}v.allocUnsafe=function(ie){return l(null,ie)},v.allocUnsafeSlow=function(ie){return l(null,ie)};function r(ie,q,Q){if((typeof Q!="string"||Q==="")&&(Q="utf8"),!v.isEncoding(Q))throw new TypeError('"encoding" must be a valid string encoding');var Y=f(q,Q)|0;ie=p(ie,Y);var oe=ie.write(q,Q);return oe!==Y&&(ie=ie.slice(0,oe)),ie}function i(ie,q){var Q=q.length<0?0:c(q.length)|0;ie=p(ie,Q);for(var Y=0;Y<Q;Y+=1)ie[Y]=q[Y]&255;return ie}function t(ie,q,Q,Y){if(q.byteLength,Q<0||q.byteLength<Q)throw new RangeError("'offset' is out of bounds");if(q.byteLength<Q+(Y||0))throw new RangeError("'length' is out of bounds");return Q===void 0&&Y===void 0?q=new Uint8Array(q):Y===void 0?q=new Uint8Array(q,Q):q=new Uint8Array(q,Q,Y),v.TYPED_ARRAY_SUPPORT?(ie=q,ie.__proto__=v.prototype):ie=i(ie,q),ie}function a(ie,q){if(v.isBuffer(q)){var Q=c(q.length)|0;return ie=p(ie,Q),ie.length===0||q.copy(ie,0,0,Q),ie}if(q){if(typeof ArrayBuffer!="undefined"&&q.buffer instanceof ArrayBuffer||"length"in q)return typeof q.length!="number"||Fe(q.length)?p(ie,0):i(ie,q);if(q.type==="Buffer"&&g(q.data))return i(ie,q.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function c(ie){if(ie>=_())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+_().toString(16)+" bytes");return ie|0}function d(ie){return+ie!=ie&&(ie=0),v.alloc(+ie)}v.isBuffer=function(q){return!!(q!=null&&q._isBuffer)},v.compare=function(q,Q){if(!v.isBuffer(q)||!v.isBuffer(Q))throw new TypeError("Arguments must be Buffers");if(q===Q)return 0;for(var Y=q.length,oe=Q.length,le=0,Ee=Math.min(Y,oe);le<Ee;++le)if(q[le]!==Q[le]){Y=q[le],oe=Q[le];break}return Y<oe?-1:oe<Y?1:0},v.isEncoding=function(q){switch(String(q).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}},v.concat=function(q,Q){if(!g(q))throw new TypeError('"list" argument must be an Array of Buffers');if(q.length===0)return v.alloc(0);var Y;if(Q===void 0)for(Q=0,Y=0;Y<q.length;++Y)Q+=q[Y].length;var oe=v.allocUnsafe(Q),le=0;for(Y=0;Y<q.length;++Y){var Ee=q[Y];if(!v.isBuffer(Ee))throw new TypeError('"list" argument must be an Array of Buffers');Ee.copy(oe,le),le+=Ee.length}return oe};function f(ie,q){if(v.isBuffer(ie))return ie.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(ie)||ie instanceof ArrayBuffer))return ie.byteLength;typeof ie!="string"&&(ie=""+ie);var Q=ie.length;if(Q===0)return 0;for(var Y=!1;;)switch(q){case"ascii":case"latin1":case"binary":return Q;case"utf8":case"utf-8":case void 0:return me(ie).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Q*2;case"hex":return Q>>>1;case"base64":return ae(ie).length;default:if(Y)return me(ie).length;q=(""+q).toLowerCase(),Y=!0}}v.byteLength=f;function h(ie,q,Q){var Y=!1;if((q===void 0||q<0)&&(q=0),q>this.length)return"";if((Q===void 0||Q>this.length)&&(Q=this.length),Q<=0)return"";if(Q>>>=0,q>>>=0,Q<=q)return"";for(ie||(ie="utf8");;)switch(ie){case"hex":return F(this,q,Q);case"utf8":case"utf-8":return N(this,q,Q);case"ascii":return X(this,q,Q);case"latin1":case"binary":return k(this,q,Q);case"base64":return M(this,q,Q);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,q,Q);default:if(Y)throw new TypeError("Unknown encoding: "+ie);ie=(ie+"").toLowerCase(),Y=!0}}v.prototype._isBuffer=!0;function u(ie,q,Q){var Y=ie[q];ie[q]=ie[Q],ie[Q]=Y}v.prototype.swap16=function(){var q=this.length;if(q%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Q=0;Q<q;Q+=2)u(this,Q,Q+1);return this},v.prototype.swap32=function(){var q=this.length;if(q%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var Q=0;Q<q;Q+=4)u(this,Q,Q+3),u(this,Q+1,Q+2);return this},v.prototype.swap64=function(){var q=this.length;if(q%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var Q=0;Q<q;Q+=8)u(this,Q,Q+7),u(this,Q+1,Q+6),u(this,Q+2,Q+5),u(this,Q+3,Q+4);return this},v.prototype.toString=function(){var q=this.length|0;return q===0?"":arguments.length===0?N(this,0,q):h.apply(this,arguments)},v.prototype.equals=function(q){if(!v.isBuffer(q))throw new TypeError("Argument must be a Buffer");return this===q?!0:v.compare(this,q)===0},v.prototype.inspect=function(){var q="",Q=b.INSPECT_MAX_BYTES;return this.length>0&&(q=this.toString("hex",0,Q).match(/.{2}/g).join(" "),this.length>Q&&(q+=" ... ")),"<Buffer "+q+">"},v.prototype.compare=function(q,Q,Y,oe,le){if(!v.isBuffer(q))throw new TypeError("Argument must be a Buffer");if(Q===void 0&&(Q=0),Y===void 0&&(Y=q?q.length:0),oe===void 0&&(oe=0),le===void 0&&(le=this.length),Q<0||Y>q.length||oe<0||le>this.length)throw new RangeError("out of range index");if(oe>=le&&Q>=Y)return 0;if(oe>=le)return-1;if(Q>=Y)return 1;if(Q>>>=0,Y>>>=0,oe>>>=0,le>>>=0,this===q)return 0;for(var Ee=le-oe,Le=Y-Q,ge=Math.min(Ee,Le),De=this.slice(oe,le),_e=q.slice(Q,Y),Xe=0;Xe<ge;++Xe)if(De[Xe]!==_e[Xe]){Ee=De[Xe],Le=_e[Xe];break}return Ee<Le?-1:Le<Ee?1:0};function E(ie,q,Q,Y,oe){if(ie.length===0)return-1;if(typeof Q=="string"?(Y=Q,Q=0):Q>2147483647?Q=2147483647:Q<-2147483648&&(Q=-2147483648),Q=+Q,isNaN(Q)&&(Q=oe?0:ie.length-1),Q<0&&(Q=ie.length+Q),Q>=ie.length){if(oe)return-1;Q=ie.length-1}else if(Q<0)if(oe)Q=0;else return-1;if(typeof q=="string"&&(q=v.from(q,Y)),v.isBuffer(q))return q.length===0?-1:x(ie,q,Q,Y,oe);if(typeof q=="number")return q=q&255,v.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?oe?Uint8Array.prototype.indexOf.call(ie,q,Q):Uint8Array.prototype.lastIndexOf.call(ie,q,Q):x(ie,[q],Q,Y,oe);throw new TypeError("val must be string, number or Buffer")}function x(ie,q,Q,Y,oe){var le=1,Ee=ie.length,Le=q.length;if(Y!==void 0&&(Y=String(Y).toLowerCase(),Y==="ucs2"||Y==="ucs-2"||Y==="utf16le"||Y==="utf-16le")){if(ie.length<2||q.length<2)return-1;le=2,Ee/=2,Le/=2,Q/=2}function ge(ze,Me){return le===1?ze[Me]:ze.readUInt16BE(Me*le)}var De;if(oe){var _e=-1;for(De=Q;De<Ee;De++)if(ge(ie,De)===ge(q,_e===-1?0:De-_e)){if(_e===-1&&(_e=De),De-_e+1===Le)return _e*le}else _e!==-1&&(De-=De-_e),_e=-1}else for(Q+Le>Ee&&(Q=Ee-Le),De=Q;De>=0;De--){for(var Xe=!0,tt=0;tt<Le;tt++)if(ge(ie,De+tt)!==ge(q,tt)){Xe=!1;break}if(Xe)return De}return-1}v.prototype.includes=function(q,Q,Y){return this.indexOf(q,Q,Y)!==-1},v.prototype.indexOf=function(q,Q,Y){return E(this,q,Q,Y,!0)},v.prototype.lastIndexOf=function(q,Q,Y){return E(this,q,Q,Y,!1)};function O(ie,q,Q,Y){Q=Number(Q)||0;var oe=ie.length-Q;Y?(Y=Number(Y),Y>oe&&(Y=oe)):Y=oe;var le=q.length;if(le%2!==0)throw new TypeError("Invalid hex string");Y>le/2&&(Y=le/2);for(var Ee=0;Ee<Y;++Ee){var Le=parseInt(q.substr(Ee*2,2),16);if(isNaN(Le))return Ee;ie[Q+Ee]=Le}return Ee}function C(ie,q,Q,Y){return fe(me(q,ie.length-Q),ie,Q,Y)}function w(ie,q,Q,Y){return fe(se(q),ie,Q,Y)}function S(ie,q,Q,Y){return w(ie,q,Q,Y)}function A(ie,q,Q,Y){return fe(ae(q),ie,Q,Y)}function D(ie,q,Q,Y){return fe(be(q,ie.length-Q),ie,Q,Y)}v.prototype.write=function(q,Q,Y,oe){if(Q===void 0)oe="utf8",Y=this.length,Q=0;else if(Y===void 0&&typeof Q=="string")oe=Q,Y=this.length,Q=0;else if(isFinite(Q))Q=Q|0,isFinite(Y)?(Y=Y|0,oe===void 0&&(oe="utf8")):(oe=Y,Y=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var le=this.length-Q;if((Y===void 0||Y>le)&&(Y=le),q.length>0&&(Y<0||Q<0)||Q>this.length)throw new RangeError("Attempt to write outside buffer bounds");oe||(oe="utf8");for(var Ee=!1;;)switch(oe){case"hex":return O(this,q,Q,Y);case"utf8":case"utf-8":return C(this,q,Q,Y);case"ascii":return w(this,q,Q,Y);case"latin1":case"binary":return S(this,q,Q,Y);case"base64":return A(this,q,Q,Y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,q,Q,Y);default:if(Ee)throw new TypeError("Unknown encoding: "+oe);oe=(""+oe).toLowerCase(),Ee=!0}},v.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function M(ie,q,Q){return q===0&&Q===ie.length?T.fromByteArray(ie):T.fromByteArray(ie.slice(q,Q))}function N(ie,q,Q){Q=Math.min(ie.length,Q);for(var Y=[],oe=q;oe<Q;){var le=ie[oe],Ee=null,Le=le>239?4:le>223?3:le>191?2:1;if(oe+Le<=Q){var ge,De,_e,Xe;switch(Le){case 1:le<128&&(Ee=le);break;case 2:ge=ie[oe+1],(ge&192)===128&&(Xe=(le&31)<<6|ge&63,Xe>127&&(Ee=Xe));break;case 3:ge=ie[oe+1],De=ie[oe+2],(ge&192)===128&&(De&192)===128&&(Xe=(le&15)<<12|(ge&63)<<6|De&63,Xe>2047&&(Xe<55296||Xe>57343)&&(Ee=Xe));break;case 4:ge=ie[oe+1],De=ie[oe+2],_e=ie[oe+3],(ge&192)===128&&(De&192)===128&&(_e&192)===128&&(Xe=(le&15)<<18|(ge&63)<<12|(De&63)<<6|_e&63,Xe>65535&&Xe<1114112&&(Ee=Xe))}}Ee===null?(Ee=65533,Le=1):Ee>65535&&(Ee-=65536,Y.push(Ee>>>10&1023|55296),Ee=56320|Ee&1023),Y.push(Ee),oe+=Le}return z(Y)}var P=4096;function z(ie){var q=ie.length;if(q<=P)return String.fromCharCode.apply(String,ie);for(var Q="",Y=0;Y<q;)Q+=String.fromCharCode.apply(String,ie.slice(Y,Y+=P));return Q}function X(ie,q,Q){var Y="";Q=Math.min(ie.length,Q);for(var oe=q;oe<Q;++oe)Y+=String.fromCharCode(ie[oe]&127);return Y}function k(ie,q,Q){var Y="";Q=Math.min(ie.length,Q);for(var oe=q;oe<Q;++oe)Y+=String.fromCharCode(ie[oe]);return Y}function F(ie,q,Q){var Y=ie.length;(!q||q<0)&&(q=0),(!Q||Q<0||Q>Y)&&(Q=Y);for(var oe="",le=q;le<Q;++le)oe+=pe(ie[le]);return oe}function U(ie,q,Q){for(var Y=ie.slice(q,Q),oe="",le=0;le<Y.length;le+=2)oe+=String.fromCharCode(Y[le]+Y[le+1]*256);return oe}v.prototype.slice=function(q,Q){var Y=this.length;q=~~q,Q=Q===void 0?Y:~~Q,q<0?(q+=Y,q<0&&(q=0)):q>Y&&(q=Y),Q<0?(Q+=Y,Q<0&&(Q=0)):Q>Y&&(Q=Y),Q<q&&(Q=q);var oe;if(v.TYPED_ARRAY_SUPPORT)oe=this.subarray(q,Q),oe.__proto__=v.prototype;else{var le=Q-q;oe=new v(le,void 0);for(var Ee=0;Ee<le;++Ee)oe[Ee]=this[Ee+q]}return oe};function L(ie,q,Q){if(ie%1!==0||ie<0)throw new RangeError("offset is not uint");if(ie+q>Q)throw new RangeError("Trying to access beyond buffer length")}v.prototype.readUIntLE=function(q,Q,Y){q=q|0,Q=Q|0,Y||L(q,Q,this.length);for(var oe=this[q],le=1,Ee=0;++Ee<Q&&(le*=256);)oe+=this[q+Ee]*le;return oe},v.prototype.readUIntBE=function(q,Q,Y){q=q|0,Q=Q|0,Y||L(q,Q,this.length);for(var oe=this[q+--Q],le=1;Q>0&&(le*=256);)oe+=this[q+--Q]*le;return oe},v.prototype.readUInt8=function(q,Q){return Q||L(q,1,this.length),this[q]},v.prototype.readUInt16LE=function(q,Q){return Q||L(q,2,this.length),this[q]|this[q+1]<<8},v.prototype.readUInt16BE=function(q,Q){return Q||L(q,2,this.length),this[q]<<8|this[q+1]},v.prototype.readUInt32LE=function(q,Q){return Q||L(q,4,this.length),(this[q]|this[q+1]<<8|this[q+2]<<16)+this[q+3]*16777216},v.prototype.readUInt32BE=function(q,Q){return Q||L(q,4,this.length),this[q]*16777216+(this[q+1]<<16|this[q+2]<<8|this[q+3])},v.prototype.readIntLE=function(q,Q,Y){q=q|0,Q=Q|0,Y||L(q,Q,this.length);for(var oe=this[q],le=1,Ee=0;++Ee<Q&&(le*=256);)oe+=this[q+Ee]*le;return le*=128,oe>=le&&(oe-=Math.pow(2,8*Q)),oe},v.prototype.readIntBE=function(q,Q,Y){q=q|0,Q=Q|0,Y||L(q,Q,this.length);for(var oe=Q,le=1,Ee=this[q+--oe];oe>0&&(le*=256);)Ee+=this[q+--oe]*le;return le*=128,Ee>=le&&(Ee-=Math.pow(2,8*Q)),Ee},v.prototype.readInt8=function(q,Q){return Q||L(q,1,this.length),this[q]&128?(255-this[q]+1)*-1:this[q]},v.prototype.readInt16LE=function(q,Q){Q||L(q,2,this.length);var Y=this[q]|this[q+1]<<8;return Y&32768?Y|4294901760:Y},v.prototype.readInt16BE=function(q,Q){Q||L(q,2,this.length);var Y=this[q+1]|this[q]<<8;return Y&32768?Y|4294901760:Y},v.prototype.readInt32LE=function(q,Q){return Q||L(q,4,this.length),this[q]|this[q+1]<<8|this[q+2]<<16|this[q+3]<<24},v.prototype.readInt32BE=function(q,Q){return Q||L(q,4,this.length),this[q]<<24|this[q+1]<<16|this[q+2]<<8|this[q+3]},v.prototype.readFloatLE=function(q,Q){return Q||L(q,4,this.length),y.read(this,q,!0,23,4)},v.prototype.readFloatBE=function(q,Q){return Q||L(q,4,this.length),y.read(this,q,!1,23,4)},v.prototype.readDoubleLE=function(q,Q){return Q||L(q,8,this.length),y.read(this,q,!0,52,8)},v.prototype.readDoubleBE=function(q,Q){return Q||L(q,8,this.length),y.read(this,q,!1,52,8)};function B(ie,q,Q,Y,oe,le){if(!v.isBuffer(ie))throw new TypeError('"buffer" argument must be a Buffer instance');if(q>oe||q<le)throw new RangeError('"value" argument is out of bounds');if(Q+Y>ie.length)throw new RangeError("Index out of range")}v.prototype.writeUIntLE=function(q,Q,Y,oe){if(q=+q,Q=Q|0,Y=Y|0,!oe){var le=Math.pow(2,8*Y)-1;B(this,q,Q,Y,le,0)}var Ee=1,Le=0;for(this[Q]=q&255;++Le<Y&&(Ee*=256);)this[Q+Le]=q/Ee&255;return Q+Y},v.prototype.writeUIntBE=function(q,Q,Y,oe){if(q=+q,Q=Q|0,Y=Y|0,!oe){var le=Math.pow(2,8*Y)-1;B(this,q,Q,Y,le,0)}var Ee=Y-1,Le=1;for(this[Q+Ee]=q&255;--Ee>=0&&(Le*=256);)this[Q+Ee]=q/Le&255;return Q+Y},v.prototype.writeUInt8=function(q,Q,Y){return q=+q,Q=Q|0,Y||B(this,q,Q,1,255,0),v.TYPED_ARRAY_SUPPORT||(q=Math.floor(q)),this[Q]=q&255,Q+1};function Z(ie,q,Q,Y){q<0&&(q=65535+q+1);for(var oe=0,le=Math.min(ie.length-Q,2);oe<le;++oe)ie[Q+oe]=(q&255<<8*(Y?oe:1-oe))>>>(Y?oe:1-oe)*8}v.prototype.writeUInt16LE=function(q,Q,Y){return q=+q,Q=Q|0,Y||B(this,q,Q,2,65535,0),v.TYPED_ARRAY_SUPPORT?(this[Q]=q&255,this[Q+1]=q>>>8):Z(this,q,Q,!0),Q+2},v.prototype.writeUInt16BE=function(q,Q,Y){return q=+q,Q=Q|0,Y||B(this,q,Q,2,65535,0),v.TYPED_ARRAY_SUPPORT?(this[Q]=q>>>8,this[Q+1]=q&255):Z(this,q,Q,!1),Q+2};function re(ie,q,Q,Y){q<0&&(q=4294967295+q+1);for(var oe=0,le=Math.min(ie.length-Q,4);oe<le;++oe)ie[Q+oe]=q>>>(Y?oe:3-oe)*8&255}v.prototype.writeUInt32LE=function(q,Q,Y){return q=+q,Q=Q|0,Y||B(this,q,Q,4,4294967295,0),v.TYPED_ARRAY_SUPPORT?(this[Q+3]=q>>>24,this[Q+2]=q>>>16,this[Q+1]=q>>>8,this[Q]=q&255):re(this,q,Q,!0),Q+4},v.prototype.writeUInt32BE=function(q,Q,Y){return q=+q,Q=Q|0,Y||B(this,q,Q,4,4294967295,0),v.TYPED_ARRAY_SUPPORT?(this[Q]=q>>>24,this[Q+1]=q>>>16,this[Q+2]=q>>>8,this[Q+3]=q&255):re(this,q,Q,!1),Q+4},v.prototype.writeIntLE=function(q,Q,Y,oe){if(q=+q,Q=Q|0,!oe){var le=Math.pow(2,8*Y-1);B(this,q,Q,Y,le-1,-le)}var Ee=0,Le=1,ge=0;for(this[Q]=q&255;++Ee<Y&&(Le*=256);)q<0&&ge===0&&this[Q+Ee-1]!==0&&(ge=1),this[Q+Ee]=(q/Le>>0)-ge&255;return Q+Y},v.prototype.writeIntBE=function(q,Q,Y,oe){if(q=+q,Q=Q|0,!oe){var le=Math.pow(2,8*Y-1);B(this,q,Q,Y,le-1,-le)}var Ee=Y-1,Le=1,ge=0;for(this[Q+Ee]=q&255;--Ee>=0&&(Le*=256);)q<0&&ge===0&&this[Q+Ee+1]!==0&&(ge=1),this[Q+Ee]=(q/Le>>0)-ge&255;return Q+Y},v.prototype.writeInt8=function(q,Q,Y){return q=+q,Q=Q|0,Y||B(this,q,Q,1,127,-128),v.TYPED_ARRAY_SUPPORT||(q=Math.floor(q)),q<0&&(q=255+q+1),this[Q]=q&255,Q+1},v.prototype.writeInt16LE=function(q,Q,Y){return q=+q,Q=Q|0,Y||B(this,q,Q,2,32767,-32768),v.TYPED_ARRAY_SUPPORT?(this[Q]=q&255,this[Q+1]=q>>>8):Z(this,q,Q,!0),Q+2},v.prototype.writeInt16BE=function(q,Q,Y){return q=+q,Q=Q|0,Y||B(this,q,Q,2,32767,-32768),v.TYPED_ARRAY_SUPPORT?(this[Q]=q>>>8,this[Q+1]=q&255):Z(this,q,Q,!1),Q+2},v.prototype.writeInt32LE=function(q,Q,Y){return q=+q,Q=Q|0,Y||B(this,q,Q,4,2147483647,-2147483648),v.TYPED_ARRAY_SUPPORT?(this[Q]=q&255,this[Q+1]=q>>>8,this[Q+2]=q>>>16,this[Q+3]=q>>>24):re(this,q,Q,!0),Q+4},v.prototype.writeInt32BE=function(q,Q,Y){return q=+q,Q=Q|0,Y||B(this,q,Q,4,2147483647,-2147483648),q<0&&(q=4294967295+q+1),v.TYPED_ARRAY_SUPPORT?(this[Q]=q>>>24,this[Q+1]=q>>>16,this[Q+2]=q>>>8,this[Q+3]=q&255):re(this,q,Q,!1),Q+4};function he(ie,q,Q,Y,oe,le){if(Q+Y>ie.length)throw new RangeError("Index out of range");if(Q<0)throw new RangeError("Index out of range")}function Ce(ie,q,Q,Y,oe){return oe||he(ie,q,Q,4,34028234663852886e22,-34028234663852886e22),y.write(ie,q,Q,Y,23,4),Q+4}v.prototype.writeFloatLE=function(q,Q,Y){return Ce(this,q,Q,!0,Y)},v.prototype.writeFloatBE=function(q,Q,Y){return Ce(this,q,Q,!1,Y)};function ke(ie,q,Q,Y,oe){return oe||he(ie,q,Q,8,17976931348623157e292,-17976931348623157e292),y.write(ie,q,Q,Y,52,8),Q+8}v.prototype.writeDoubleLE=function(q,Q,Y){return ke(this,q,Q,!0,Y)},v.prototype.writeDoubleBE=function(q,Q,Y){return ke(this,q,Q,!1,Y)},v.prototype.copy=function(q,Q,Y,oe){if(Y||(Y=0),!oe&&oe!==0&&(oe=this.length),Q>=q.length&&(Q=q.length),Q||(Q=0),oe>0&&oe<Y&&(oe=Y),oe===Y)return 0;if(q.length===0||this.length===0)return 0;if(Q<0)throw new RangeError("targetStart out of bounds");if(Y<0||Y>=this.length)throw new RangeError("sourceStart out of bounds");if(oe<0)throw new RangeError("sourceEnd out of bounds");oe>this.length&&(oe=this.length),q.length-Q<oe-Y&&(oe=q.length-Q+Y);var le=oe-Y,Ee;if(this===q&&Y<Q&&Q<oe)for(Ee=le-1;Ee>=0;--Ee)q[Ee+Q]=this[Ee+Y];else if(le<1e3||!v.TYPED_ARRAY_SUPPORT)for(Ee=0;Ee<le;++Ee)q[Ee+Q]=this[Ee+Y];else Uint8Array.prototype.set.call(q,this.subarray(Y,Y+le),Q);return le},v.prototype.fill=function(q,Q,Y,oe){if(typeof q=="string"){if(typeof Q=="string"?(oe=Q,Q=0,Y=this.length):typeof Y=="string"&&(oe=Y,Y=this.length),q.length===1){var le=q.charCodeAt(0);le<256&&(q=le)}if(oe!==void 0&&typeof oe!="string")throw new TypeError("encoding must be a string");if(typeof oe=="string"&&!v.isEncoding(oe))throw new TypeError("Unknown encoding: "+oe)}else typeof q=="number"&&(q=q&255);if(Q<0||this.length<Q||this.length<Y)throw new RangeError("Out of range index");if(Y<=Q)return this;Q=Q>>>0,Y=Y===void 0?this.length:Y>>>0,q||(q=0);var Ee;if(typeof q=="number")for(Ee=Q;Ee<Y;++Ee)this[Ee]=q;else{var Le=v.isBuffer(q)?q:me(new v(q,oe).toString()),ge=Le.length;for(Ee=0;Ee<Y-Q;++Ee)this[Ee+Q]=Le[Ee%ge]}return this};var te=/[^+\/0-9A-Za-z-_]/g;function Re(ie){if(ie=Te(ie).replace(te,""),ie.length<2)return"";for(;ie.length%4!==0;)ie=ie+"=";return ie}function Te(ie){return ie.trim?ie.trim():ie.replace(/^\s+|\s+$/g,"")}function pe(ie){return ie<16?"0"+ie.toString(16):ie.toString(16)}function me(ie,q){q=q||Infinity;for(var Q,Y=ie.length,oe=null,le=[],Ee=0;Ee<Y;++Ee){if(Q=ie.charCodeAt(Ee),Q>55295&&Q<57344){if(!oe){if(Q>56319){(q-=3)>-1&&le.push(239,191,189);continue}else if(Ee+1===Y){(q-=3)>-1&&le.push(239,191,189);continue}oe=Q;continue}if(Q<56320){(q-=3)>-1&&le.push(239,191,189),oe=Q;continue}Q=(oe-55296<<10|Q-56320)+65536}else oe&&((q-=3)>-1&&le.push(239,191,189));if(oe=null,Q<128){if((q-=1)<0)break;le.push(Q)}else if(Q<2048){if((q-=2)<0)break;le.push(Q>>6|192,Q&63|128)}else if(Q<65536){if((q-=3)<0)break;le.push(Q>>12|224,Q>>6&63|128,Q&63|128)}else if(Q<1114112){if((q-=4)<0)break;le.push(Q>>18|240,Q>>12&63|128,Q>>6&63|128,Q&63|128)}else throw new Error("Invalid code point")}return le}function se(ie){for(var q=[],Q=0;Q<ie.length;++Q)q.push(ie.charCodeAt(Q)&255);return q}function be(ie,q){for(var Q,Y,oe,le=[],Ee=0;Ee<ie.length&&!((q-=2)<0);++Ee)Q=ie.charCodeAt(Ee),Y=Q>>8,oe=Q%256,le.push(oe),le.push(Y);return le}function ae(ie){return T.toByteArray(Re(ie))}function fe(ie,q,Q,Y){for(var oe=0;oe<Y&&!(oe+Q>=q.length||oe>=ie.length);++oe)q[oe+Q]=ie[oe];return oe}function Fe(ie){return ie!==ie}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},j("buffer").Buffer)},{"base64-js":69,buffer:73,ieee754:195,isarray:198}],74:[function(j,H,b){H.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(j,H,b){H.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(j,H,b){/*!
|
|
|
* copy-to - index.js
|
|
|
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
|
|
|
* MIT Licensed
|
|
|
*/"use strict";var I=Array.prototype.slice;H.exports=v;function v(y,g){if(!(this instanceof v))return new v(y,g);this.src=y,this._withAccess=g}v.prototype.withAccess=function(y){return this._withAccess=y!==!1,this},v.prototype.pick=function(y){return Array.isArray(y)||(y=I.call(arguments)),y.length&&(this.keys=y),this},v.prototype.to=function(y){if(y=y||{},!this.src)return y;var g=this.keys||Object.keys(this.src);if(!this._withAccess){for(var s=0;s<g.length;s++){if(_=g[s],y[_]!==void 0)continue;y[_]=this.src[_]}return y}for(var s=0;s<g.length;s++){var _=g[s];if(!T(y,_))continue;var p=this.src.__lookupGetter__(_),e=this.src.__lookupSetter__(_);p&&y.__defineGetter__(_,p),e&&y.__defineSetter__(_,e),!p&&!e&&(y[_]=this.src[_])}return y},v.prototype.toCover=function(y){for(var g=this.keys||Object.keys(this.src),s=0;s<g.length;s++){var _=g[s];delete y[_];var p=this.src.__lookupGetter__(_),e=this.src.__lookupSetter__(_);p&&y.__defineGetter__(_,p),e&&y.__defineSetter__(_,e),!p&&!e&&(y[_]=this.src[_])}},v.prototype.override=v.prototype.toCover,v.prototype.and=function(y){var g={};return this.to(g),this.src=y,this.to(g),this.src=g,this};function T(y,g){return y[g]===void 0&&y.__lookupGetter__(g)===void 0&&y.__lookupSetter__(g)===void 0}},{}],77:[function(j,H,b){j("../../modules/es6.string.iterator"),j("../../modules/es6.array.from"),H.exports=j("../../modules/_core").Array.from},{"../../modules/_core":99,"../../modules/es6.array.from":168,"../../modules/es6.string.iterator":180}],78:[function(j,H,b){var I=j("../../modules/_core"),v=I.JSON||(I.JSON={stringify:JSON.stringify});H.exports=function(y){return v.stringify.apply(v,arguments)}},{"../../modules/_core":99}],79:[function(j,H,b){j("../../modules/es6.object.assign"),H.exports=j("../../modules/_core").Object.assign},{"../../modules/_core":99,"../../modules/es6.object.assign":171}],80:[function(j,H,b){j("../../modules/es6.object.create");var I=j("../../modules/_core").Object;H.exports=function(T,y){return I.create(T,y)}},{"../../modules/_core":99,"../../modules/es6.object.create":172}],81:[function(j,H,b){j("../../modules/es6.object.define-property");var I=j("../../modules/_core").Object;H.exports=function(T,y,g){return I.defineProperty(T,y,g)}},{"../../modules/_core":99,"../../modules/es6.object.define-property":173}],82:[function(j,H,b){j("../../modules/es7.object.entries"),H.exports=j("../../modules/_core").Object.entries},{"../../modules/_core":99,"../../modules/es7.object.entries":182}],83:[function(j,H,b){j("../../modules/es6.object.get-own-property-names");var I=j("../../modules/_core").Object;H.exports=function(T){return I.getOwnPropertyNames(T)}},{"../../modules/_core":99,"../../modules/es6.object.get-own-property-names":174}],84:[function(j,H,b){j("../../modules/es6.object.get-prototype-of"),H.exports=j("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":99,"../../modules/es6.object.get-prototype-of":175}],85:[function(j,H,b){j("../../modules/es6.object.keys"),H.exports=j("../../modules/_core").Object.keys},{"../../modules/_core":99,"../../modules/es6.object.keys":176}],86:[function(j,H,b){j("../modules/es6.object.to-string"),j("../modules/es6.string.iterator"),j("../modules/web.dom.iterable"),j("../modules/es6.promise"),j("../modules/es7.promise.finally"),j("../modules/es7.promise.try"),H.exports=j("../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(j,H,b){j("../modules/web.immediate"),H.exports=j("../modules/_core").setImmediate},{"../modules/_core":99,"../modules/web.immediate":188}],88:[function(j,H,b){j("../../modules/es6.string.from-code-point"),H.exports=j("../../modules/_core").String.fromCodePoint},{"../../modules/_core":99,"../../modules/es6.string.from-code-point":179}],89:[function(j,H,b){j("../../modules/es6.function.has-instance"),H.exports=j("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":165,"../../modules/es6.function.has-instance":170}],90:[function(j,H,b){j("../../modules/es6.symbol"),j("../../modules/es6.object.to-string"),j("../../modules/es7.symbol.async-iterator"),j("../../modules/es7.symbol.observable"),H.exports=j("../../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(j,H,b){j("../../modules/es6.string.iterator"),j("../../modules/web.dom.iterable"),H.exports=j("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":165,"../../modules/es6.string.iterator":180,"../../modules/web.dom.iterable":187}],92:[function(j,H,b){H.exports=function(I){if(typeof I!="function")throw TypeError(I+" is not a function!");return I}},{}],93:[function(j,H,b){H.exports=function(){}},{}],94:[function(j,H,b){H.exports=function(I,v,T,y){if(!(I instanceof v)||y!==void 0&&y in I)throw TypeError(T+": incorrect invocation!");return I}},{}],95:[function(j,H,b){var I=j("./_is-object");H.exports=function(v){if(!I(v))throw TypeError(v+" is not an object!");return v}},{"./_is-object":119}],96:[function(j,H,b){var I=j("./_to-iobject"),v=j("./_to-length"),T=j("./_to-absolute-index");H.exports=function(y){return function(g,s,_){var p=I(g),e=v(p.length),o=T(_,e),n;if(y&&s!=s){for(;e>o;)if(n=p[o++],n!=n)return!0}else for(;e>o;o++)if((y||o in p)&&p[o]===s)return y||o||0;return!y&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(j,H,b){var I=j("./_cof"),v=j("./_wks")("toStringTag"),T=I(function(){return arguments}())=="Arguments",y=function(g,s){try{return g[s]}catch(_){}};H.exports=function(g){var s,_,p;return g===void 0?"Undefined":g===null?"Null":typeof(_=y(s=Object(g),v))=="string"?_:T?I(s):(p=I(s))=="Object"&&typeof s.callee=="function"?"Arguments":p}},{"./_cof":98,"./_wks":166}],98:[function(j,H,b){var I={}.toString;H.exports=function(v){return I.call(v).slice(8,-1)}},{}],99:[function(j,H,b){var I=H.exports={version:"2.6.11"};typeof __e=="number"&&(__e=I)},{}],100:[function(j,H,b){"use strict";var I=j("./_object-dp"),v=j("./_property-desc");H.exports=function(T,y,g){y in T?I.f(T,y,v(0,g)):T[y]=g}},{"./_object-dp":132,"./_property-desc":146}],101:[function(j,H,b){var I=j("./_a-function");H.exports=function(v,T,y){if(I(v),T===void 0)return v;switch(y){case 1:return function(g){return v.call(T,g)};case 2:return function(g,s){return v.call(T,g,s)};case 3:return function(g,s,_){return v.call(T,g,s,_)}}return function(){return v.apply(T,arguments)}}},{"./_a-function":92}],102:[function(j,H,b){H.exports=function(I){if(I==null)throw TypeError("Can't call method on "+I);return I}},{}],103:[function(j,H,b){H.exports=!j("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":108}],104:[function(j,H,b){var I=j("./_is-object"),v=j("./_global").document,T=I(v)&&I(v.createElement);H.exports=function(y){return T?v.createElement(y):{}}},{"./_global":110,"./_is-object":119}],105:[function(j,H,b){H.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(j,H,b){var I=j("./_object-keys"),v=j("./_object-gops"),T=j("./_object-pie");H.exports=function(y){var g=I(y),s=v.f;if(s)for(var _=s(y),p=T.f,e=0,o;_.length>e;)p.call(y,o=_[e++])&&g.push(o);return g}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(j,H,b){var I=j("./_global"),v=j("./_core"),T=j("./_ctx"),y=j("./_hide"),g=j("./_has"),s="prototype",_=function(p,e,o){var n=p&_.F,l=p&_.G,r=p&_.S,i=p&_.P,t=p&_.B,a=p&_.W,c=l?v:v[e]||(v[e]={}),d=c[s],f=l?I:r?I[e]:(I[e]||{})[s],h,u,E;l&&(o=e);for(h in o){if(u=!n&&f&&f[h]!==void 0,u&&g(c,h))continue;E=u?f[h]:o[h],c[h]=l&&typeof f[h]!="function"?o[h]:t&&u?T(E,I):a&&f[h]==E?function(x){var O=function(C,w,S){if(this instanceof x){switch(arguments.length){case 0:return new x;case 1:return new x(C);case 2:return new x(C,w)}return new x(C,w,S)}return x.apply(this,arguments)};return O[s]=x[s],O}(E):i&&typeof E=="function"?T(Function.call,E):E,i&&((c.virtual||(c.virtual={}))[h]=E,p&_.R&&d&&!d[h]&&y(d,h,E))}};_.F=1,_.G=2,_.S=4,_.P=8,_.B=16,_.W=32,_.U=64,_.R=128,H.exports=_},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(j,H,b){H.exports=function(I){try{return!!I()}catch(v){return!0}}},{}],109:[function(j,H,b){var I=j("./_ctx"),v=j("./_iter-call"),T=j("./_is-array-iter"),y=j("./_an-object"),g=j("./_to-length"),s=j("./core.get-iterator-method"),_={},p={},b=H.exports=function(e,o,n,l,r){var i=r?function(){return e}:s(e),t=I(n,l,o?2:1),a=0,c,d,f,h;if(typeof i!="function")throw TypeError(e+" is not iterable!");if(T(i)){for(c=g(e.length);c>a;a++)if(h=o?t(y(d=e[a])[0],d[1]):t(e[a]),h===_||h===p)return h}else for(f=i.call(e);!(d=f.next()).done;)if(h=v(f,t,d.value,o),h===_||h===p)return h};b.BREAK=_,b.RETURN=p},{"./_an-object":95,"./_ctx":101,"./_is-array-iter":117,"./_iter-call":120,"./_to-length":159,"./core.get-iterator-method":167}],110:[function(j,H,b){var I=H.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(j,H,b){var I={}.hasOwnProperty;H.exports=function(v,T){return I.call(v,T)}},{}],112:[function(j,H,b){var I=j("./_object-dp"),v=j("./_property-desc");H.exports=j("./_descriptors")?function(T,y,g){return I.f(T,y,v(1,g))}:function(T,y,g){return T[y]=g,T}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(j,H,b){var I=j("./_global").document;H.exports=I&&I.documentElement},{"./_global":110}],114:[function(j,H,b){H.exports=!j("./_descriptors")&&!j("./_fails")(function(){return Object.defineProperty(j("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":103,"./_dom-create":104,"./_fails":108}],115:[function(j,H,b){H.exports=function(I,v,T){var y=T===void 0;switch(v.length){case 0:return y?I():I.call(T);case 1:return y?I(v[0]):I.call(T,v[0]);case 2:return y?I(v[0],v[1]):I.call(T,v[0],v[1]);case 3:return y?I(v[0],v[1],v[2]):I.call(T,v[0],v[1],v[2]);case 4:return y?I(v[0],v[1],v[2],v[3]):I.call(T,v[0],v[1],v[2],v[3])}return I.apply(T,v)}},{}],116:[function(j,H,b){var I=j("./_cof");H.exports=Object("z").propertyIsEnumerable(0)?Object:function(v){return I(v)=="String"?v.split(""):Object(v)}},{"./_cof":98}],117:[function(j,H,b){var I=j("./_iterators"),v=j("./_wks")("iterator"),T=Array.prototype;H.exports=function(y){return y!==void 0&&(I.Array===y||T[v]===y)}},{"./_iterators":125,"./_wks":166}],118:[function(j,H,b){var I=j("./_cof");H.exports=Array.isArray||function(T){return I(T)=="Array"}},{"./_cof":98}],119:[function(j,H,b){H.exports=function(I){return typeof I=="object"?I!==null:typeof I=="function"}},{}],120:[function(j,H,b){var I=j("./_an-object");H.exports=function(v,T,y,g){try{return g?T(I(y)[0],y[1]):T(y)}catch(_){var s=v.return;throw s!==void 0&&I(s.call(v)),_}}},{"./_an-object":95}],121:[function(j,H,b){"use strict";var I=j("./_object-create"),v=j("./_property-desc"),T=j("./_set-to-string-tag"),y={};j("./_hide")(y,j("./_wks")("iterator"),function(){return this}),H.exports=function(g,s,_){g.prototype=I(y,{next:v(1,_)}),T(g,s+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(j,H,b){"use strict";var I=j("./_library"),v=j("./_export"),T=j("./_redefine"),y=j("./_hide"),g=j("./_iterators"),s=j("./_iter-create"),_=j("./_set-to-string-tag"),p=j("./_object-gpo"),e=j("./_wks")("iterator"),o=!([].keys&&"next"in[].keys()),n="@@iterator",l="keys",r="values",i=function(){return this};H.exports=function(t,a,c,d,f,h,u){s(c,a,d);var E=function(X){if(!o&&X in w)return w[X];switch(X){case l:return function(){return new c(this,X)};case r:return function(){return new c(this,X)}}return function(){return new c(this,X)}},x=a+" Iterator",O=f==r,C=!1,w=t.prototype,S=w[e]||w[n]||f&&w[f],A=S||E(f),D=f?O?E("entries"):A:void 0,M=a=="Array"&&w.entries||S,N,P,z;if(M&&(z=p(M.call(new t)),z!==Object.prototype&&z.next&&(_(z,x,!0),!I&&typeof z[e]!="function"&&y(z,e,i))),O&&S&&S.name!==r&&(C=!0,A=function(){return S.call(this)}),(!I||u)&&(o||C||!w[e])&&y(w,e,A),g[a]=A,g[x]=i,f)if(N={values:O?A:E(r),keys:h?A:E(l),entries:D},u)for(P in N)P in w||T(w,P,N[P]);else v(v.P+v.F*(o||C),a,N);return N}},{"./_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(j,H,b){var I=j("./_wks")("iterator"),v=!1;try{var T=[7][I]();T.return=function(){v=!0},Array.from(T,function(){throw 2})}catch(y){}H.exports=function(y,g){if(!g&&!v)return!1;var s=!1;try{var _=[7],p=_[I]();p.next=function(){return{done:s=!0}},_[I]=function(){return p},y(_)}catch(e){}return s}},{"./_wks":166}],124:[function(j,H,b){H.exports=function(I,v){return{value:v,done:!!I}}},{}],125:[function(j,H,b){H.exports={}},{}],126:[function(j,H,b){H.exports=!0},{}],127:[function(j,H,b){var I=j("./_uid")("meta"),v=j("./_is-object"),T=j("./_has"),y=j("./_object-dp").f,g=0,s=Object.isExtensible||function(){return!0},_=!j("./_fails")(function(){return s(Object.preventExtensions({}))}),p=function(r){y(r,I,{value:{i:"O"+ ++g,w:{}}})},e=function(r,i){if(!v(r))return typeof r=="symbol"?r:(typeof r=="string"?"S":"P")+r;if(!T(r,I)){if(!s(r))return"F";if(!i)return"E";p(r)}return r[I].i},o=function(r,i){if(!T(r,I)){if(!s(r))return!0;if(!i)return!1;p(r)}return r[I].w},n=function(r){return _&&l.NEED&&s(r)&&!T(r,I)&&p(r),r},l=H.exports={KEY:I,NEED:!1,fastKey:e,getWeak:o,onFreeze:n}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(j,H,b){var I=j("./_global"),v=j("./_task").set,T=I.MutationObserver||I.WebKitMutationObserver,y=I.process,g=I.Promise,s=j("./_cof")(y)=="process";H.exports=function(){var _,p,e,o=function(){var i,t;for(s&&(i=y.domain)&&i.exit();_;){t=_.fn,_=_.next;try{t()}catch(a){throw _?e():p=void 0,a}}p=void 0,i&&i.enter()};if(s)e=function(){y.nextTick(o)};else if(T&&!(I.navigator&&I.navigator.standalone)){var n=!0,l=document.createTextNode("");new T(o).observe(l,{characterData:!0}),e=function(){l.data=n=!n}}else if(g&&g.resolve){var r=g.resolve(void 0);e=function(){r.then(o)}}else e=function(){v.call(I,o)};return function(i){var t={fn:i,next:void 0};p&&(p.next=t),_||(_=t,e()),p=t}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(j,H,b){"use strict";var I=j("./_a-function");function v(T){var y,g;this.promise=new T(function(s,_){if(y!==void 0||g!==void 0)throw TypeError("Bad Promise constructor");y=s,g=_}),this.resolve=I(y),this.reject=I(g)}H.exports.f=function(T){return new v(T)}},{"./_a-function":92}],130:[function(j,H,b){"use strict";var I=j("./_descriptors"),v=j("./_object-keys"),T=j("./_object-gops"),y=j("./_object-pie"),g=j("./_to-object"),s=j("./_iobject"),_=Object.assign;H.exports=!_||j("./_fails")(function(){var p={},e={},o=Symbol(),n="abcdefghijklmnopqrst";return p[o]=7,n.split("").forEach(function(l){e[l]=l}),_({},p)[o]!=7||Object.keys(_({},e)).join("")!=n})?function(e,o){for(var n=g(e),l=arguments.length,r=1,i=T.f,t=y.f;l>r;)for(var a=s(arguments[r++]),c=i?v(a).concat(i(a)):v(a),d=c.length,f=0,h;d>f;)h=c[f++],(!I||t.call(a,h))&&(n[h]=a[h]);return n}:_},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(j,H,b){var I=j("./_an-object"),v=j("./_object-dps"),T=j("./_enum-bug-keys"),y=j("./_shared-key")("IE_PROTO"),g=function(){},s="prototype",_=function(){var p=j("./_dom-create")("iframe"),e=T.length,o="<",n=">",l;for(p.style.display="none",j("./_html").appendChild(p),p.src="javascript:",l=p.contentWindow.document,l.open(),l.write(o+"script"+n+"document.F=Object"+o+"/script"+n),l.close(),_=l.F;e--;)delete _[s][T[e]];return _()};H.exports=Object.create||function(e,o){var n;return e!==null?(g[s]=I(e),n=new g,g[s]=null,n[y]=e):n=_(),o===void 0?n:v(n,o)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(j,H,b){var I=j("./_an-object"),v=j("./_ie8-dom-define"),T=j("./_to-primitive"),y=Object.defineProperty;b.f=j("./_descriptors")?Object.defineProperty:function(s,_,p){if(I(s),_=T(_,!0),I(p),v)try{return y(s,_,p)}catch(e){}if("get"in p||"set"in p)throw TypeError("Accessors not supported!");return"value"in p&&(s[_]=p.value),s}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(j,H,b){var I=j("./_object-dp"),v=j("./_an-object"),T=j("./_object-keys");H.exports=j("./_descriptors")?Object.defineProperties:function(g,s){v(g);for(var _=T(s),p=_.length,e=0,o;p>e;)I.f(g,o=_[e++],s[o]);return g}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(j,H,b){var I=j("./_object-pie"),v=j("./_property-desc"),T=j("./_to-iobject"),y=j("./_to-primitive"),g=j("./_has"),s=j("./_ie8-dom-define"),_=Object.getOwnPropertyDescriptor;b.f=j("./_descriptors")?_:function(e,o){if(e=T(e),o=y(o,!0),s)try{return _(e,o)}catch(n){}if(g(e,o))return v(!I.f.call(e,o),e[o])}},{"./_descriptors":103,"./_has":111,"./_ie8-dom-define":114,"./_object-pie":141,"./_property-desc":146,"./_to-iobject":158,"./_to-primitive":161}],135:[function(j,H,b){var I=j("./_to-iobject"),v=j("./_object-gopn").f,T={}.toString,y=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],g=function(s){try{return v(s)}catch(_){return y.slice()}};H.exports.f=function(_){return y&&T.call(_)=="[object Window]"?g(_):v(I(_))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(j,H,b){var I=j("./_object-keys-internal"),v=j("./_enum-bug-keys").concat("length","prototype");b.f=Object.getOwnPropertyNames||function(y){return I(y,v)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(j,H,b){b.f=Object.getOwnPropertySymbols},{}],138:[function(j,H,b){var I=j("./_has"),v=j("./_to-object"),T=j("./_shared-key")("IE_PROTO"),y=Object.prototype;H.exports=Object.getPrototypeOf||function(g){return g=v(g),I(g,T)?g[T]:typeof g.constructor=="function"&&g instanceof g.constructor?g.constructor.prototype:g instanceof Object?y:null}},{"./_has":111,"./_shared-key":151,"./_to-object":160}],139:[function(j,H,b){var I=j("./_has"),v=j("./_to-iobject"),T=j("./_array-includes")(!1),y=j("./_shared-key")("IE_PROTO");H.exports=function(g,s){var _=v(g),p=0,e=[],o;for(o in _)o!=y&&(I(_,o)&&e.push(o));for(;s.length>p;)I(_,o=s[p++])&&(~T(e,o)||e.push(o));return e}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(j,H,b){var I=j("./_object-keys-internal"),v=j("./_enum-bug-keys");H.exports=Object.keys||function(y){return I(y,v)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(j,H,b){b.f={}.propertyIsEnumerable},{}],142:[function(j,H,b){var I=j("./_export"),v=j("./_core"),T=j("./_fails");H.exports=function(y,g){var s=(v.Object||{})[y]||Object[y],_={};_[y]=g(s),I(I.S+I.F*T(function(){s(1)}),"Object",_)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(j,H,b){var I=j("./_descriptors"),v=j("./_object-keys"),T=j("./_to-iobject"),y=j("./_object-pie").f;H.exports=function(g){return function(s){for(var _=T(s),p=v(_),e=p.length,o=0,n=[],l;e>o;)l=p[o++],(!I||y.call(_,l))&&n.push(g?[l,_[l]]:_[l]);return n}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(j,H,b){H.exports=function(I){try{return{e:!1,v:I()}}catch(v){return{e:!0,v}}}},{}],145:[function(j,H,b){var I=j("./_an-object"),v=j("./_is-object"),T=j("./_new-promise-capability");H.exports=function(y,g){if(I(y),v(g)&&g.constructor===y)return g;var s=T.f(y),_=s.resolve;return _(g),s.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(j,H,b){H.exports=function(I,v){return{enumerable:!(I&1),configurable:!(I&2),writable:!(I&4),value:v}}},{}],147:[function(j,H,b){var I=j("./_hide");H.exports=function(v,T,y){for(var g in T)y&&v[g]?v[g]=T[g]:I(v,g,T[g]);return v}},{"./_hide":112}],148:[function(j,H,b){H.exports=j("./_hide")},{"./_hide":112}],149:[function(j,H,b){"use strict";var I=j("./_global"),v=j("./_core"),T=j("./_object-dp"),y=j("./_descriptors"),g=j("./_wks")("species");H.exports=function(s){var _=typeof v[s]=="function"?v[s]:I[s];y&&_&&!_[g]&&T.f(_,g,{configurable:!0,get:function(){return this}})}},{"./_core":99,"./_descriptors":103,"./_global":110,"./_object-dp":132,"./_wks":166}],150:[function(j,H,b){var I=j("./_object-dp").f,v=j("./_has"),T=j("./_wks")("toStringTag");H.exports=function(y,g,s){y&&!v(y=s?y:y.prototype,T)&&I(y,T,{configurable:!0,value:g})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(j,H,b){var I=j("./_shared")("keys"),v=j("./_uid");H.exports=function(T){return I[T]||(I[T]=v(T))}},{"./_shared":152,"./_uid":162}],152:[function(j,H,b){var I=j("./_core"),v=j("./_global"),T="__core-js_shared__",y=v[T]||(v[T]={});(H.exports=function(g,s){return y[g]||(y[g]=s!==void 0?s:{})})("versions",[]).push({version:I.version,mode:j("./_library")?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},{"./_core":99,"./_global":110,"./_library":126}],153:[function(j,H,b){var I=j("./_an-object"),v=j("./_a-function"),T=j("./_wks")("species");H.exports=function(y,g){var s=I(y).constructor,_;return s===void 0||(_=I(s)[T])==null?g:v(_)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(j,H,b){var I=j("./_to-integer"),v=j("./_defined");H.exports=function(T){return function(y,g){var s=String(v(y)),_=I(g),p=s.length,e,o;return _<0||_>=p?T?"":void 0:(e=s.charCodeAt(_),e<55296||e>56319||_+1===p||(o=s.charCodeAt(_+1))<56320||o>57343?T?s.charAt(_):e:T?s.slice(_,_+2):(e-55296<<10)+(o-56320)+65536)}}},{"./_defined":102,"./_to-integer":157}],155:[function(j,H,b){var I=j("./_ctx"),v=j("./_invoke"),T=j("./_html"),y=j("./_dom-create"),g=j("./_global"),s=g.process,_=g.setImmediate,p=g.clearImmediate,e=g.MessageChannel,o=g.Dispatch,n=0,l={},r="onreadystatechange",i,t,a,c=function(){var f=+this;if(l.hasOwnProperty(f)){var h=l[f];delete l[f],h()}},d=function(f){c.call(f.data)};(!_||!p)&&(_=function(h){for(var u=[],E=1;arguments.length>E;)u.push(arguments[E++]);return l[++n]=function(){v(typeof h=="function"?h:Function(h),u)},i(n),n},p=function(h){delete l[h]},j("./_cof")(s)=="process"?i=function(f){s.nextTick(I(c,f,1))}:o&&o.now?i=function(f){o.now(I(c,f,1))}:e?(t=new e,a=t.port2,t.port1.onmessage=d,i=I(a.postMessage,a,1)):g.addEventListener&&typeof postMessage=="function"&&!g.importScripts?(i=function(f){g.postMessage(f+"","*")},g.addEventListener("message",d,!1)):r in y("script")?i=function(f){T.appendChild(y("script"))[r]=function(){T.removeChild(this),c.call(f)}}:i=function(f){setTimeout(I(c,f,1),0)}),H.exports={set:_,clear:p}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(j,H,b){var I=j("./_to-integer"),v=Math.max,T=Math.min;H.exports=function(y,g){return y=I(y),y<0?v(y+g,0):T(y,g)}},{"./_to-integer":157}],157:[function(j,H,b){var I=Math.ceil,v=Math.floor;H.exports=function(T){return isNaN(T=+T)?0:(T>0?v:I)(T)}},{}],158:[function(j,H,b){var I=j("./_iobject"),v=j("./_defined");H.exports=function(T){return I(v(T))}},{"./_defined":102,"./_iobject":116}],159:[function(j,H,b){var I=j("./_to-integer"),v=Math.min;H.exports=function(T){return T>0?v(I(T),9007199254740991):0}},{"./_to-integer":157}],160:[function(j,H,b){var I=j("./_defined");H.exports=function(v){return Object(I(v))}},{"./_defined":102}],161:[function(j,H,b){var I=j("./_is-object");H.exports=function(v,T){if(!I(v))return v;var y,g;if(T&&typeof(y=v.toString)=="function"&&!I(g=y.call(v)))return g;if(typeof(y=v.valueOf)=="function"&&!I(g=y.call(v)))return g;if(!T&&typeof(y=v.toString)=="function"&&!I(g=y.call(v)))return g;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(j,H,b){var I=0,v=Math.random();H.exports=function(T){return"Symbol(".concat(T===void 0?"":T,")_",(++I+v).toString(36))}},{}],163:[function(j,H,b){var I=j("./_global"),v=I.navigator;H.exports=v&&v.userAgent||""},{"./_global":110}],164:[function(j,H,b){var I=j("./_global"),v=j("./_core"),T=j("./_library"),y=j("./_wks-ext"),g=j("./_object-dp").f;H.exports=function(s){var _=v.Symbol||(v.Symbol=T?{}:I.Symbol||{});s.charAt(0)!="_"&&!(s in _)&&g(_,s,{value:y.f(s)})}},{"./_core":99,"./_global":110,"./_library":126,"./_object-dp":132,"./_wks-ext":165}],165:[function(j,H,b){b.f=j("./_wks")},{"./_wks":166}],166:[function(j,H,b){var I=j("./_shared")("wks"),v=j("./_uid"),T=j("./_global").Symbol,y=typeof T=="function",g=H.exports=function(s){return I[s]||(I[s]=y&&T[s]||(y?T:v)("Symbol."+s))};g.store=I},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(j,H,b){var I=j("./_classof"),v=j("./_wks")("iterator"),T=j("./_iterators");H.exports=j("./_core").getIteratorMethod=function(y){if(y!=null)return y[v]||y["@@iterator"]||T[I(y)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(j,H,b){"use strict";var I=j("./_ctx"),v=j("./_export"),T=j("./_to-object"),y=j("./_iter-call"),g=j("./_is-array-iter"),s=j("./_to-length"),_=j("./_create-property"),p=j("./core.get-iterator-method");v(v.S+v.F*!j("./_iter-detect")(function(e){Array.from(e)}),"Array",{from:function(o){var n=T(o),l=typeof this=="function"?this:Array,r=arguments.length,i=r>1?arguments[1]:void 0,t=i!==void 0,a=0,c=p(n),d,f,h,u;if(t&&(i=I(i,r>2?arguments[2]:void 0,2)),c!=null&&!(l==Array&&g(c)))for(u=c.call(n),f=new l;!(h=u.next()).done;a++)_(f,a,t?y(u,i,[h.value,a],!0):h.value);else for(d=s(n.length),f=new l(d);d>a;a++)_(f,a,t?i(n[a],a):n[a]);return f.length=a,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(j,H,b){"use strict";var I=j("./_add-to-unscopables"),v=j("./_iter-step"),T=j("./_iterators"),y=j("./_to-iobject");H.exports=j("./_iter-define")(Array,"Array",function(g,s){this._t=y(g),this._i=0,this._k=s},function(){var g=this._t,s=this._k,_=this._i++;return!g||_>=g.length?(this._t=void 0,v(1)):s=="keys"?v(0,_):s=="values"?v(0,g[_]):v(0,[_,g[_]])},"values"),T.Arguments=T.Array,I("keys"),I("values"),I("entries")},{"./_add-to-unscopables":93,"./_iter-define":122,"./_iter-step":124,"./_iterators":125,"./_to-iobject":158}],170:[function(j,H,b){"use strict";var I=j("./_is-object"),v=j("./_object-gpo"),T=j("./_wks")("hasInstance"),y=Function.prototype;T in y||j("./_object-dp").f(y,T,{value:function(g){if(typeof this!="function"||!I(g))return!1;if(!I(this.prototype))return g instanceof this;for(;g=v(g);)if(this.prototype===g)return!0;return!1}})},{"./_is-object":119,"./_object-dp":132,"./_object-gpo":138,"./_wks":166}],171:[function(j,H,b){var I=j("./_export");I(I.S+I.F,"Object",{assign:j("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(j,H,b){var I=j("./_export");I(I.S,"Object",{create:j("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(j,H,b){var I=j("./_export");I(I.S+I.F*!j("./_descriptors"),"Object",{defineProperty:j("./_object-dp").f})},{"./_descriptors":103,"./_export":107,"./_object-dp":132}],174:[function(j,H,b){j("./_object-sap")("getOwnPropertyNames",function(){return j("./_object-gopn-ext").f})},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(j,H,b){var I=j("./_to-object"),v=j("./_object-gpo");j("./_object-sap")("getPrototypeOf",function(){return function(y){return v(I(y))}})},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(j,H,b){var I=j("./_to-object"),v=j("./_object-keys");j("./_object-sap")("keys",function(){return function(y){return v(I(y))}})},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(j,H,b){arguments[4][71][0].apply(b,arguments)},{dup:71}],178:[function(j,H,b){"use strict";var I=j("./_library"),v=j("./_global"),T=j("./_ctx"),y=j("./_classof"),g=j("./_export"),s=j("./_is-object"),_=j("./_a-function"),p=j("./_an-instance"),e=j("./_for-of"),o=j("./_species-constructor"),n=j("./_task").set,l=j("./_microtask")(),r=j("./_new-promise-capability"),i=j("./_perform"),t=j("./_user-agent"),a=j("./_promise-resolve"),c="Promise",d=v.TypeError,f=v.process,h=f&&f.versions,u=h&&h.v8||"",E=v[c],x=y(f)=="process",O=function(){},C,w,S,A,D=w=r.f,M=!!function(){try{var L=E.resolve(1),B=(L.constructor={})[j("./_wks")("species")]=function(Z){Z(O,O)};return(x||typeof PromiseRejectionEvent=="function")&&L.then(O)instanceof B&&u.indexOf("6.6")!==0&&t.indexOf("Chrome/66")===-1}catch(Z){}}(),N=function(L){var B;return s(L)&&typeof(B=L.then)=="function"?B:!1},P=function(L,B){if(L._n)return;L._n=!0;var Z=L._c;l(function(){for(var re=L._v,he=L._s==1,Ce=0,ke=function(te){var Re=he?te.ok:te.fail,Te=te.resolve,pe=te.reject,me=te.domain,se,be,ae;try{Re?(he||(L._h==2&&k(L),L._h=1),Re===!0?se=re:(me&&me.enter(),se=Re(re),me&&(me.exit(),ae=!0)),se===te.promise?pe(d("Promise-chain cycle")):(be=N(se))?be.call(se,Te,pe):Te(se)):pe(re)}catch(fe){me&&!ae&&me.exit(),pe(fe)}};Z.length>Ce;)ke(Z[Ce++]);L._c=[],L._n=!1,B&&!L._h&&z(L)})},z=function(L){n.call(v,function(){var B=L._v,Z=X(L),re,he,Ce;if(Z&&(re=i(function(){x?f.emit("unhandledRejection",B,L):(he=v.onunhandledrejection)?he({promise:L,reason:B}):(Ce=v.console)&&Ce.error&&Ce.error("Unhandled promise rejection",B)}),L._h=x||X(L)?2:1),L._a=void 0,Z&&re.e)throw re.v})},X=function(L){return L._h!==1&&(L._a||L._c).length===0},k=function(L){n.call(v,function(){var B;x?f.emit("rejectionHandled",L):(B=v.onrejectionhandled)&&B({promise:L,reason:L._v})})},F=function(L){var B=this;if(B._d)return;B._d=!0,B=B._w||B,B._v=L,B._s=2,B._a||(B._a=B._c.slice()),P(B,!0)},U=function(L){var B=this,Z;if(B._d)return;B._d=!0,B=B._w||B;try{if(B===L)throw d("Promise can't be resolved itself");(Z=N(L))?l(function(){var re={_w:B,_d:!1};try{Z.call(L,T(U,re,1),T(F,re,1))}catch(he){F.call(re,he)}}):(B._v=L,B._s=1,P(B,!1))}catch(re){F.call({_w:B,_d:!1},re)}};M||(E=function(B){p(this,E,c,"_h"),_(B),C.call(this);try{B(T(U,this,1),T(F,this,1))}catch(Z){F.call(this,Z)}},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=j("./_redefine-all")(E.prototype,{then:function(B,Z){var re=D(o(this,E));return re.ok=typeof B=="function"?B:!0,re.fail=typeof Z=="function"&&Z,re.domain=x?f.domain:void 0,this._c.push(re),this._a&&this._a.push(re),this._s&&P(this,!1),re.promise},catch:function(L){return this.then(void 0,L)}}),S=function(){var L=new C;this.promise=L,this.resolve=T(U,L,1),this.reject=T(F,L,1)},r.f=D=function(L){return L===E||L===A?new S(L):w(L)}),g(g.G+g.W+g.F*!M,{Promise:E}),j("./_set-to-string-tag")(E,c),j("./_set-species")(c),A=j("./_core")[c],g(g.S+g.F*!M,c,{reject:function(B){var Z=D(this),re=Z.reject;return re(B),Z.promise}}),g(g.S+g.F*(I||!M),c,{resolve:function(B){return a(I&&this===A?E:this,B)}}),g(g.S+g.F*!(M&&j("./_iter-detect")(function(L){E.all(L).catch(O)})),c,{all:function(B){var Z=this,re=D(Z),he=re.resolve,Ce=re.reject,ke=i(function(){var te=[],Re=0,Te=1;e(B,!1,function(pe){var me=Re++,se=!1;te.push(void 0),Te++,Z.resolve(pe).then(function(be){if(se)return;se=!0,te[me]=be,--Te||he(te)},Ce)}),--Te||he(te)});return ke.e&&Ce(ke.v),re.promise},race:function(B){var Z=this,re=D(Z),he=re.reject,Ce=i(function(){e(B,!1,function(ke){Z.resolve(ke).then(re.resolve,he)})});return Ce.e&&he(Ce.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(j,H,b){var I=j("./_export"),v=j("./_to-absolute-index"),T=String.fromCharCode,y=String.fromCodePoint;I(I.S+I.F*(!!y&&y.length!=1),"String",{fromCodePoint:function(s){for(var _=[],p=arguments.length,e=0,o;p>e;){if(o=+arguments[e++],v(o,1114111)!==o)throw RangeError(o+" is not a valid code point");_.push(o<65536?T(o):T(((o-=65536)>>10)+55296,o%1024+56320))}return _.join("")}})},{"./_export":107,"./_to-absolute-index":156}],180:[function(j,H,b){"use strict";var I=j("./_string-at")(!0);j("./_iter-define")(String,"String",function(v){this._t=String(v),this._i=0},function(){var v=this._t,T=this._i,y;return T>=v.length?{value:void 0,done:!0}:(y=I(v,T),this._i+=y.length,{value:y,done:!1})})},{"./_iter-define":122,"./_string-at":154}],181:[function(j,H,b){"use strict";var I=j("./_global"),v=j("./_has"),T=j("./_descriptors"),y=j("./_export"),g=j("./_redefine"),s=j("./_meta").KEY,_=j("./_fails"),p=j("./_shared"),e=j("./_set-to-string-tag"),o=j("./_uid"),n=j("./_wks"),l=j("./_wks-ext"),r=j("./_wks-define"),i=j("./_enum-keys"),t=j("./_is-array"),a=j("./_an-object"),c=j("./_is-object"),d=j("./_to-object"),f=j("./_to-iobject"),h=j("./_to-primitive"),u=j("./_property-desc"),E=j("./_object-create"),x=j("./_object-gopn-ext"),O=j("./_object-gopd"),C=j("./_object-gops"),w=j("./_object-dp"),S=j("./_object-keys"),A=O.f,D=w.f,M=x.f,N=I.Symbol,P=I.JSON,z=P&&P.stringify,X="prototype",k=n("_hidden"),F=n("toPrimitive"),U={}.propertyIsEnumerable,L=p("symbol-registry"),B=p("symbols"),Z=p("op-symbols"),re=Object[X],he=typeof N=="function"&&!!C.f,Ce=I.QObject,ke=!Ce||!Ce[X]||!Ce[X].findChild,te=T&&_(function(){return E(D({},"a",{get:function(){return D(this,"a",{value:7}).a}})).a!=7})?function(le,Ee,Le){var ge=A(re,Ee);ge&&delete re[Ee],D(le,Ee,Le),ge&&le!==re&&D(re,Ee,ge)}:D,Re=function(le){var Ee=B[le]=E(N[X]);return Ee._k=le,Ee},Te=he&&typeof N.iterator=="symbol"?function(le){return typeof le=="symbol"}:function(le){return le instanceof N},pe=function(Ee,Le,ge){return Ee===re&&pe(Z,Le,ge),a(Ee),Le=h(Le,!0),a(ge),v(B,Le)?(ge.enumerable?(v(Ee,k)&&Ee[k][Le]&&(Ee[k][Le]=!1),ge=E(ge,{enumerable:u(0,!1)})):(v(Ee,k)||D(Ee,k,u(1,{})),Ee[k][Le]=!0),te(Ee,Le,ge)):D(Ee,Le,ge)},me=function(Ee,Le){a(Ee);for(var ge=i(Le=f(Le)),De=0,_e=ge.length,Xe;_e>De;)pe(Ee,Xe=ge[De++],Le[Xe]);return Ee},se=function(Ee,Le){return Le===void 0?E(Ee):me(E(Ee),Le)},be=function(Ee){var Le=U.call(this,Ee=h(Ee,!0));return this===re&&v(B,Ee)&&!v(Z,Ee)?!1:Le||!v(this,Ee)||!v(B,Ee)||v(this,k)&&this[k][Ee]?Le:!0},ae=function(Ee,Le){if(Ee=f(Ee),Le=h(Le,!0),Ee===re&&v(B,Le)&&!v(Z,Le))return;var ge=A(Ee,Le);return ge&&v(B,Le)&&!(v(Ee,k)&&Ee[k][Le])&&(ge.enumerable=!0),ge},fe=function(Ee){for(var Le=M(f(Ee)),ge=[],De=0,_e;Le.length>De;)!v(B,_e=Le[De++])&&_e!=k&&_e!=s&&ge.push(_e);return ge},Fe=function(Ee){for(var Le=Ee===re,ge=M(Le?Z:f(Ee)),De=[],_e=0,Xe;ge.length>_e;)v(B,Xe=ge[_e++])&&(Le?v(re,Xe):!0)&&De.push(B[Xe]);return De};he||(N=function(){if(this instanceof N)throw TypeError("Symbol is not a constructor!");var Ee=o(arguments.length>0?arguments[0]:void 0),Le=function(ge){this===re&&Le.call(Z,ge),v(this,k)&&v(this[k],Ee)&&(this[k][Ee]=!1),te(this,Ee,u(1,ge))};return T&&ke&&te(re,Ee,{configurable:!0,set:Le}),Re(Ee)},g(N[X],"toString",function(){return this._k}),O.f=ae,w.f=pe,j("./_object-gopn").f=x.f=fe,j("./_object-pie").f=be,C.f=Fe,T&&!j("./_library")&&g(re,"propertyIsEnumerable",be,!0),l.f=function(le){return Re(n(le))}),y(y.G+y.W+y.F*!he,{Symbol:N});for(var ie="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),q=0;ie.length>q;)n(ie[q++]);for(var Q=S(n.store),Y=0;Q.length>Y;)r(Q[Y++]);y(y.S+y.F*!he,"Symbol",{for:function(le){return v(L,le+="")?L[le]:L[le]=N(le)},keyFor:function(Ee){if(!Te(Ee))throw TypeError(Ee+" is not a symbol!");for(var Le in L)if(L[Le]===Ee)return Le},useSetter:function(){ke=!0},useSimple:function(){ke=!1}}),y(y.S+y.F*!he,"Object",{create:se,defineProperty:pe,defineProperties:me,getOwnPropertyDescriptor:ae,getOwnPropertyNames:fe,getOwnPropertySymbols:Fe});var oe=_(function(){C.f(1)});y(y.S+y.F*oe,"Object",{getOwnPropertySymbols:function(Ee){return C.f(d(Ee))}}),P&&y(y.S+y.F*(!he||_(function(){var le=N();return z([le])!="[null]"||z({a:le})!="{}"||z(Object(le))!="{}"})),"JSON",{stringify:function(Ee){for(var Le=[Ee],ge=1,De,_e;arguments.length>ge;)Le.push(arguments[ge++]);return _e=De=Le[1],!c(De)&&Ee===void 0||Te(Ee)?void 0:(t(De)||(De=function(Xe,tt){if(typeof _e=="function"&&(tt=_e.call(this,Xe,tt)),!Te(tt))return tt}),Le[1]=De,z.apply(P,Le))}}),N[X][F]||j("./_hide")(N[X],F,N[X].valueOf),e(N,"Symbol"),e(Math,"Math",!0),e(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(j,H,b){var I=j("./_export"),v=j("./_object-to-array")(!0);I(I.S,"Object",{entries:function(y){return v(y)}})},{"./_export":107,"./_object-to-array":143}],183:[function(j,H,b){"use strict";var I=j("./_export"),v=j("./_core"),T=j("./_global"),y=j("./_species-constructor"),g=j("./_promise-resolve");I(I.P+I.R,"Promise",{finally:function(s){var _=y(this,v.Promise||T.Promise),p=typeof s=="function";return this.then(p?function(e){return g(_,s()).then(function(){return e})}:s,p?function(e){return g(_,s()).then(function(){throw e})}:s)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(j,H,b){"use strict";var I=j("./_export"),v=j("./_new-promise-capability"),T=j("./_perform");I(I.S,"Promise",{try:function(y){var g=v.f(this),s=T(y);return(s.e?g.reject:g.resolve)(s.v),g.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(j,H,b){j("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(j,H,b){j("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(j,H,b){j("./es6.array.iterator");for(var I=j("./_global"),v=j("./_hide"),T=j("./_iterators"),y=j("./_wks")("toStringTag"),g="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(","),s=0;s<g.length;s++){var _=g[s],p=I[_],e=p&&p.prototype;e&&!e[y]&&v(e,y,_),T[_]=T.Array}},{"./_global":110,"./_hide":112,"./_iterators":125,"./_wks":166,"./es6.array.iterator":169}],188:[function(j,H,b){var I=j("./_export"),v=j("./_task");I(I.G+I.B,{setImmediate:v.set,clearImmediate:v.clear})},{"./_export":107,"./_task":155}],189:[function(j,H,b){(function(I){"use strict";var v=j("babel-runtime/helpers/typeof"),T=y(v);function y(h){return h&&h.__esModule?h:{default:h}}function g(h){return Array.isArray?Array.isArray(h):f(h)==="[object Array]"}b.isArray=g;function s(h){return typeof h=="boolean"}b.isBoolean=s;function _(h){return h===null}b.isNull=_;function p(h){return h==null}b.isNullOrUndefined=p;function e(h){return typeof h=="number"}b.isNumber=e;function o(h){return typeof h=="string"}b.isString=o;function n(h){return(typeof h=="undefined"?"undefined":(0,T.default)(h))==="symbol"}b.isSymbol=n;function l(h){return h===void 0}b.isUndefined=l;function r(h){return f(h)==="[object RegExp]"}b.isRegExp=r;function i(h){return(typeof h=="undefined"?"undefined":(0,T.default)(h))==="object"&&h!==null}b.isObject=i;function t(h){return f(h)==="[object Date]"}b.isDate=t;function a(h){return f(h)==="[object Error]"||h instanceof Error}b.isError=a;function c(h){return typeof h=="function"}b.isFunction=c;function d(h){return h===null||typeof h=="boolean"||typeof h=="number"||typeof h=="string"||(typeof h=="undefined"?"undefined":(0,T.default)(h))==="symbol"||typeof h=="undefined"}b.isPrimitive=d,b.isBuffer=I.isBuffer;function f(h){return Object.prototype.toString.call(h)}}).call(this,{isBuffer:j("../../is-buffer/index.js")})},{"../../is-buffer/index.js":197,"babel-runtime/helpers/typeof":67}],190:[function(j,H,b){"use strict";var I=j("babel-runtime/helpers/typeof"),v=T(I);function T(y){return y&&y.__esModule?y:{default:y}}(function(y){"use strict";var g=function(){var o=/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,l=/[^-+\dA-Z]/g;return function(r,i,t,a){if(arguments.length===1&&e(r)==="string"&&!/\d/.test(r)&&(i=r,r=void 0),r=r||new Date,r instanceof Date||(r=new Date(r)),isNaN(r))throw TypeError("Invalid date");i=String(g.masks[i]||i||g.masks.default);var c=i.slice(0,4);(c==="UTC:"||c==="GMT:")&&(i=i.slice(4),t=!0,c==="GMT:"&&(a=!0));var d=t?"getUTC":"get",f=r[d+"Date"](),h=r[d+"Day"](),u=r[d+"Month"](),E=r[d+"FullYear"](),x=r[d+"Hours"](),O=r[d+"Minutes"](),C=r[d+"Seconds"](),w=r[d+"Milliseconds"](),S=t?0:r.getTimezoneOffset(),A=_(r),D=p(r),M={d:f,dd:s(f),ddd:g.i18n.dayNames[h],dddd:g.i18n.dayNames[h+7],m:u+1,mm:s(u+1),mmm:g.i18n.monthNames[u],mmmm:g.i18n.monthNames[u+12],yy:String(E).slice(2),yyyy:E,h:x%12||12,hh:s(x%12||12),H:x,HH:s(x),M:O,MM:s(O),s:C,ss:s(C),l:s(w,3),L:s(Math.round(w/10)),t:x<12?"a":"p",tt:x<12?"am":"pm",T:x<12?"A":"P",TT:x<12?"AM":"PM",Z:a?"GMT":t?"UTC":(String(r).match(n)||[""]).pop().replace(l,""),o:(S>0?"-":"+")+s(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:D};return i.replace(o,function(N){return N in M?M[N]:N.slice(1,N.length-1)})}}();g.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"},g.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 s(o,n){for(o=String(o),n=n||2;o.length<n;)o="0"+o;return o}function _(o){var n=new Date(o.getFullYear(),o.getMonth(),o.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var l=new Date(n.getFullYear(),0,4);l.setDate(l.getDate()-(l.getDay()+6)%7+3);var r=n.getTimezoneOffset()-l.getTimezoneOffset();n.setHours(n.getHours()-r);var i=(n-l)/(864e5*7);return 1+Math.floor(i)}function p(o){var n=o.getDay();return n===0&&(n=7),n}function e(o){return o===null?"null":o===void 0?"undefined":(typeof o=="undefined"?"undefined":(0,v.default)(o))!=="object"?typeof o=="undefined"?"undefined":(0,v.default)(o):Array.isArray(o)?"array":{}.toString.call(o).slice(8,-1).toLowerCase()}typeof define=="function"&&define.amd?define(function(){return g}):(typeof b=="undefined"?"undefined":(0,v.default)(b))==="object"?H.exports=g:y.dateFormat=g})(void 0)},{"babel-runtime/helpers/typeof":67}],191:[function(j,H,b){/*!
|
|
|
* 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=/["'&<>]/;H.exports=v;function v(T){var y=""+T,g=I.exec(y);if(!g)return y;var s,_="",p=0,e=0;for(p=g.index;p<y.length;p++){switch(y.charCodeAt(p)){case 34:s=""";break;case 38:s="&";break;case 39:s="'";break;case 60:s="<";break;case 62:s=">";break;default:continue}e!==p&&(_+=y.substring(e,p)),e=p+1,_+=s}return e!==p?_+y.substring(e,p):_}},{}],192:[function(j,H,b){function I(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}H.exports=I,I.EventEmitter=I,I.prototype._events=void 0,I.prototype._maxListeners=void 0,I.defaultMaxListeners=10,I.prototype.setMaxListeners=function(s){if(!T(s)||s<0||isNaN(s))throw TypeError("n must be a positive number");return this._maxListeners=s,this},I.prototype.emit=function(s){var _,p,e,o,n,l;if(this._events||(this._events={}),s==="error"&&(!this._events.error||y(this._events.error)&&!this._events.error.length)){if(_=arguments[1],_ instanceof Error)throw _;var r=new Error('Uncaught, unspecified "error" event. ('+_+")");throw r.context=_,r}if(p=this._events[s],g(p))return!1;if(v(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:o=Array.prototype.slice.call(arguments,1),p.apply(this,o)}else if(y(p))for(o=Array.prototype.slice.call(arguments,1),l=p.slice(),e=l.length,n=0;n<e;n++)l[n].apply(this,o);return!0},I.prototype.addListener=function(s,_){var p;if(!v(_))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",s,v(_.listener)?_.listener:_),this._events[s]?y(this._events[s])?this._events[s].push(_):this._events[s]=[this._events[s],_]:this._events[s]=_,y(this._events[s])&&!this._events[s].warned&&(g(this._maxListeners)?p=I.defaultMaxListeners:p=this._maxListeners,p&&p>0&&this._events[s].length>p&&(this._events[s].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[s].length),typeof console.trace=="function"&&console.trace())),this},I.prototype.on=I.prototype.addListener,I.prototype.once=function(s,_){if(!v(_))throw TypeError("listener must be a function");var p=!1;function e(){this.removeListener(s,e),p||(p=!0,_.apply(this,arguments))}return e.listener=_,this.on(s,e),this},I.prototype.removeListener=function(s,_){var p,e,o,n;if(!v(_))throw TypeError("listener must be a function");if(!this._events||!this._events[s])return this;if(p=this._events[s],o=p.length,e=-1,p===_||v(p.listener)&&p.listener===_)delete this._events[s],this._events.removeListener&&this.emit("removeListener",s,_);else if(y(p)){for(n=o;n-- >0;)if(p[n]===_||p[n].listener&&p[n].listener===_){e=n;break}if(e<0)return this;p.length===1?(p.length=0,delete this._events[s]):p.splice(e,1),this._events.removeListener&&this.emit("removeListener",s,_)}return this},I.prototype.removeAllListeners=function(s){var _,p;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[s]&&delete this._events[s],this;if(arguments.length===0){for(_ in this._events){if(_==="removeListener")continue;this.removeAllListeners(_)}return this.removeAllListeners("removeListener"),this._events={},this}if(p=this._events[s],v(p))this.removeListener(s,p);else if(p)for(;p.length;)this.removeListener(s,p[p.length-1]);return delete this._events[s],this},I.prototype.listeners=function(s){var _;return!this._events||!this._events[s]?_=[]:v(this._events[s])?_=[this._events[s]]:_=this._events[s].slice(),_},I.prototype.listenerCount=function(s){if(this._events){var _=this._events[s];if(v(_))return 1;if(_)return _.length}return 0},I.listenerCount=function(s,_){return s.listenerCount(_)};function v(s){return typeof s=="function"}function T(s){return typeof s=="number"}function y(s){return typeof s=="object"&&s!==null}function g(s){return s===void 0}},{}],193:[function(j,H,b){var I=j("http"),v=H.exports;for(var T in I)I.hasOwnProperty(T)&&(v[T]=I[T]);v.request=function(y,g){return y||(y={}),y.scheme="https",y.protocol="https:",I.request.call(this,y,g)}},{http:231}],194:[function(j,H,b){/*!
|
|
|
* humanize-ms - index.js
|
|
|
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
|
|
|
* MIT Licensed
|
|
|
*/"use strict";var I=j("util"),v=j("ms");H.exports=function(T){if(typeof T=="number")return T;var y=v(T);if(y===void 0){var g=new Error(I.format("humanize-ms(%j) result undefined",T));console.warn(g.stack)}return y}},{ms:204,util:243}],195:[function(j,H,b){b.read=function(I,v,T,y,g){var s,_,p=g*8-y-1,e=(1<<p)-1,o=e>>1,n=-7,l=T?g-1:0,r=T?-1:1,i=I[v+l];for(l+=r,s=i&(1<<-n)-1,i>>=-n,n+=p;n>0;s=s*256+I[v+l],l+=r,n-=8);for(_=s&(1<<-n)-1,s>>=-n,n+=y;n>0;_=_*256+I[v+l],l+=r,n-=8);if(s===0)s=1-o;else{if(s===e)return _?NaN:(i?-1:1)*Infinity;_=_+Math.pow(2,y),s=s-o}return(i?-1:1)*_*Math.pow(2,s-y)},b.write=function(I,v,T,y,g,s){var _,p,e,o=s*8-g-1,n=(1<<o)-1,l=n>>1,r=g===23?Math.pow(2,-24)-Math.pow(2,-77):0,i=y?0:s-1,t=y?1:-1,a=v<0||v===0&&1/v<0?1:0;for(v=Math.abs(v),isNaN(v)||v===Infinity?(p=isNaN(v)?1:0,_=n):(_=Math.floor(Math.log(v)/Math.LN2),v*(e=Math.pow(2,-_))<1&&(_--,e*=2),_+l>=1?v+=r/e:v+=r*Math.pow(2,1-l),v*e>=2&&(_++,e/=2),_+l>=n?(p=0,_=n):_+l>=1?(p=(v*e-1)*Math.pow(2,g),_=_+l):(p=v*Math.pow(2,l-1)*Math.pow(2,g),_=0));g>=8;I[T+i]=p&255,i+=t,p/=256,g-=8);for(_=_<<g|p,o+=g;o>0;I[T+i]=_&255,i+=t,_/=256,o-=8);I[T+i-t]|=a*128}},{}],196:[function(j,H,b){typeof Object.create=="function"?H.exports=function(v,T){T&&(v.super_=T,v.prototype=Object.create(T.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}))}:H.exports=function(v,T){if(T){v.super_=T;var y=function(){};y.prototype=T.prototype,v.prototype=new y,v.prototype.constructor=v}}},{}],197:[function(j,H,b){/*!
|
|
|
* Determine if an object is a Buffer
|
|
|
*
|
|
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
|
* @license MIT
|
|
|
*/H.exports=function(T){return T!=null&&(I(T)||v(T)||!!T._isBuffer)};function I(T){return!!T.constructor&&typeof T.constructor.isBuffer=="function"&&T.constructor.isBuffer(T)}function v(T){return typeof T.readFloatLE=="function"&&typeof T.slice=="function"&&I(T.slice(0,0))}},{}],198:[function(j,H,b){var I={}.toString;H.exports=Array.isArray||function(v){return I.call(v)=="[object Array]"}},{}],199:[function(require,module,exports){(function(global){(function(j,H){typeof exports=="object"&&typeof module!="undefined"?module.exports=H(j):typeof define=="function"&&define.amd?define(H):H(j)})(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(j){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(j){for(var H={},b=0,I=j.length;b<I;b++)H[j.charAt(b)]=b;return H}(b64chars),fromCharCode=String.fromCharCode,cb_utob=function(j){if(j.length<2){var H=j.charCodeAt(0);return H<128?j:H<2048?fromCharCode(192|H>>>6)+fromCharCode(128|H&63):fromCharCode(224|H>>>12&15)+fromCharCode(128|H>>>6&63)+fromCharCode(128|H&63)}else{var H=65536+(j.charCodeAt(0)-55296)*1024+(j.charCodeAt(1)-56320);return fromCharCode(240|H>>>18&7)+fromCharCode(128|H>>>12&63)+fromCharCode(128|H>>>6&63)+fromCharCode(128|H&63)}},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(j){return j.replace(re_utob,cb_utob)},cb_encode=function(j){var H=[0,2,1][j.length%3],b=j.charCodeAt(0)<<16|(j.length>1?j.charCodeAt(1):0)<<8|(j.length>2?j.charCodeAt(2):0),I=[b64chars.charAt(b>>>18),b64chars.charAt(b>>>12&63),H>=2?"=":b64chars.charAt(b>>>6&63),H>=1?"=":b64chars.charAt(b&63)];return I.join("")},btoa=global.btoa?function(j){return global.btoa(j)}:function(j){return j.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=function(j){var H=Object.prototype.toString.call(j)==="[object Uint8Array]";return H?j.toString("base64"):btoa(utob(String(j)))},encode=function(j,H){return H?_encode(String(j)).replace(/[+\/]/g,function(b){return b=="+"?"-":"_"}).replace(/=/g,""):_encode(j)},encodeURI=function(j){return encode(j,!0)},re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=function(j){switch(j.length){case 4:var H=(7&j.charCodeAt(0))<<18|(63&j.charCodeAt(1))<<12|(63&j.charCodeAt(2))<<6|63&j.charCodeAt(3),b=H-65536;return fromCharCode((b>>>10)+55296)+fromCharCode((b&1023)+56320);case 3:return fromCharCode((15&j.charCodeAt(0))<<12|(63&j.charCodeAt(1))<<6|63&j.charCodeAt(2));default:return fromCharCode((31&j.charCodeAt(0))<<6|63&j.charCodeAt(1))}},btou=function(j){return j.replace(re_btou,cb_btou)},cb_decode=function(j){var H=j.length,b=H%4,I=(H>0?b64tab[j.charAt(0)]<<18:0)|(H>1?b64tab[j.charAt(1)]<<12:0)|(H>2?b64tab[j.charAt(2)]<<6:0)|(H>3?b64tab[j.charAt(3)]:0),v=[fromCharCode(I>>>16),fromCharCode(I>>>8&255),fromCharCode(I&255)];return v.length-=[0,0,2,1][b],v.join("")},_atob=global.atob?function(j){return global.atob(j)}:function(j){return j.replace(/\S{1,4}/g,cb_decode)},atob=function(j){return _atob(String(j).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(j){return(j.constructor===buffer.constructor?j:buffer.from(j,"base64")).toString()}:function(j){return(j.constructor===buffer.constructor?j:new buffer(j,"base64")).toString()}:function(j){return btou(_atob(j))},decode=function(j){return _decode(String(j).replace(/[-_]/g,function(H){return H=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var j=global.Base64;return global.Base64=_Base64,j};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(j){return{value:j,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(j){return encode(this,j)})),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(j,H,b){/*!
|
|
|
* merge-descriptors
|
|
|
* Copyright(c) 2014 Jonathan Ong
|
|
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
|
* MIT Licensed
|
|
|
*/"use strict";H.exports=v;var I=Object.prototype.hasOwnProperty;function v(T,y,g){if(!T)throw new TypeError("argument dest is required");if(!y)throw new TypeError("argument src is required");return g===void 0&&(g=!0),Object.getOwnPropertyNames(y).forEach(function(_){if(!g&&I.call(T,_))return;var p=Object.getOwnPropertyDescriptor(y,_);Object.defineProperty(T,_,p)}),T}},{}],201:[function(j,H,b){"use strict";function I(){this._types=Object.create(null),this._extensions=Object.create(null);for(var v=0;v<arguments.length;v++)this.define(arguments[v]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}I.prototype.define=function(v,T){for(var y in v){var g=v[y].map(function(p){return p.toLowerCase()});y=y.toLowerCase();for(var s=0;s<g.length;s++){var _=g[s];if(_[0]=="*")continue;if(!T&&_ in this._types)throw new Error('Attempt to change mapping for "'+_+'" extension from "'+this._types[_]+'" to "'+y+'". Pass `force=true` to allow this, otherwise remove "'+_+'" from the list of extensions for "'+y+'".');this._types[_]=y}if(T||!this._extensions[y]){var _=g[0];this._extensions[y]=_[0]!="*"?_:_.substr(1)}}},I.prototype.getType=function(v){v=String(v);var T=v.replace(/^.*[/\\]/,"").toLowerCase(),y=T.replace(/^.*\./,"").toLowerCase(),g=T.length<v.length,s=y.length<T.length-1;return(s||!g)&&this._types[y]||null},I.prototype.getExtension=function(v){return v=/^\s*([^;\s]*)/.test(v)&&RegExp.$1,v&&this._extensions[v.toLowerCase()]||null},H.exports=I},{}],202:[function(j,H,b){"use strict";var I=j("./Mime");H.exports=new I(j("./types/standard"))},{"./Mime":201,"./types/standard":203}],203:[function(j,H,b){H.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(j,H,b){var I=1e3,v=I*60,T=v*60,y=T*24,g=y*7,s=y*365.25;H.exports=function(n,l){l=l||{};var r=typeof n;if(r==="string"&&n.length>0)return _(n);if(r==="number"&&isFinite(n))return l.long?e(n):p(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function _(n){if(n=String(n),n.length>100)return;var l=/^(-?(?:\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(!l)return;var r=parseFloat(l[1]),i=(l[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return r*s;case"weeks":case"week":case"w":return r*g;case"days":case"day":case"d":return r*y;case"hours":case"hour":case"hrs":case"hr":case"h":return r*T;case"minutes":case"minute":case"mins":case"min":case"m":return r*v;case"seconds":case"second":case"secs":case"sec":case"s":return r*I;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}function p(n){var l=Math.abs(n);return l>=y?Math.round(n/y)+"d":l>=T?Math.round(n/T)+"h":l>=v?Math.round(n/v)+"m":l>=I?Math.round(n/I)+"s":n+"ms"}function e(n){var l=Math.abs(n);return l>=y?o(n,l,y,"day"):l>=T?o(n,l,T,"hour"):l>=v?o(n,l,v,"minute"):l>=I?o(n,l,I,"second"):n+" ms"}function o(n,l,r,i){var t=l>=r*1.5;return Math.round(n/r)+" "+i+(t?"s":"")}},{}],205:[function(j,H,b){(function(I){function v(s,_){for(var p=0,e=s.length-1;e>=0;e--){var o=s[e];o==="."?s.splice(e,1):o===".."?(s.splice(e,1),p++):p&&(s.splice(e,1),p--)}if(_)for(;p--;p)s.unshift("..");return s}b.resolve=function(){for(var s="",_=!1,p=arguments.length-1;p>=-1&&!_;p--){var e=p>=0?arguments[p]:I.cwd();if(typeof e!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!e)continue;s=e+"/"+s,_=e.charAt(0)==="/"}return s=v(y(s.split("/"),function(o){return!!o}),!_).join("/"),(_?"/":"")+s||"."},b.normalize=function(s){var _=b.isAbsolute(s),p=g(s,-1)==="/";return s=v(y(s.split("/"),function(e){return!!e}),!_).join("/"),!s&&!_&&(s="."),s&&p&&(s+="/"),(_?"/":"")+s},b.isAbsolute=function(s){return s.charAt(0)==="/"},b.join=function(){var s=Array.prototype.slice.call(arguments,0);return b.normalize(y(s,function(_,p){if(typeof _!="string")throw new TypeError("Arguments to path.join must be strings");return _}).join("/"))},b.relative=function(s,_){s=b.resolve(s).substr(1),_=b.resolve(_).substr(1);function p(t){for(var a=0;a<t.length&&!(t[a]!=="");a++);for(var c=t.length-1;c>=0&&!(t[c]!=="");c--);return a>c?[]:t.slice(a,c-a+1)}for(var e=p(s.split("/")),o=p(_.split("/")),n=Math.min(e.length,o.length),l=n,r=0;r<n;r++)if(e[r]!==o[r]){l=r;break}for(var i=[],r=l;r<e.length;r++)i.push("..");return i=i.concat(o.slice(l)),i.join("/")},b.sep="/",b.delimiter=":",b.dirname=function(s){if(typeof s!="string"&&(s=s+""),s.length===0)return".";for(var _=s.charCodeAt(0),p=_===47,e=-1,o=!0,n=s.length-1;n>=1;--n)if(_=s.charCodeAt(n),_===47){if(!o){e=n;break}}else o=!1;return e===-1?p?"/":".":p&&e===1?"/":s.slice(0,e)};function T(s){typeof s!="string"&&(s=s+"");var _=0,p=-1,e=!0,o;for(o=s.length-1;o>=0;--o)if(s.charCodeAt(o)===47){if(!e){_=o+1;break}}else p===-1&&(e=!1,p=o+1);return p===-1?"":s.slice(_,p)}b.basename=function(s,_){var p=T(s);return _&&p.substr(-1*_.length)===_&&(p=p.substr(0,p.length-_.length)),p},b.extname=function(s){typeof s!="string"&&(s=s+"");for(var _=-1,p=0,e=-1,o=!0,n=0,l=s.length-1;l>=0;--l){var r=s.charCodeAt(l);if(r===47){if(!o){p=l+1;break}continue}e===-1&&(o=!1,e=l+1),r===46?_===-1?_=l:n!==1&&(n=1):_!==-1&&(n=-1)}return _===-1||e===-1||n===0||n===1&&_===e-1&&_===p+1?"":s.slice(_,e)};function y(s,_){if(s.filter)return s.filter(_);for(var p=[],e=0;e<s.length;e++)_(s[e],e,s)&&p.push(s[e]);return p}var g="ab".substr(-1)==="b"?function(s,_,p){return s.substr(_,p)}:function(s,_,p){return _<0&&(_=s.length+_),s.substr(_,p)}}).call(this,j("_process"))},{_process:208}],206:[function(j,H,b){(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 v={function:!0,object:!0},T=v[typeof window]&&window||this,y=T,g=v[typeof b]&&b,s=v[typeof H]&&H&&!H.nodeType&&H,_=g&&s&&typeof I=="object"&&I;_&&(_.global===_||_.window===_||_.self===_)&&(T=_);var p=Math.pow(2,53)-1,e=/\bOpera/,o=this,n=Object.prototype,l=n.hasOwnProperty,r=n.toString;function i(w){return w=String(w),w.charAt(0).toUpperCase()+w.slice(1)}function t(w,S,A){var D={"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)&&(D=D[/[\d.]+$/.exec(w)])&&(w="Windows "+D),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 a(w,S){var A=-1,D=w?w.length:0;if(typeof D=="number"&&D>-1&&D<=p)for(;++A<D;)S(w[A],A,w);else d(w,S)}function c(w){return w=x(w),/^(?:webOS|i(?:OS|P))/.test(w)?w:i(w)}function d(w,S){for(var A in w)l.call(w,A)&&S(w[A],A,w)}function f(w){return w==null?i(w):r.call(w).slice(8,-1)}function h(w,S){var A=w!=null?typeof w[S]:"number";return!/^(?:boolean|number|string|undefined)$/.test(A)&&(A=="object"?!!w[S]:!0)}function u(w){return String(w).replace(/([ -])(?!$)/g,"$1?")}function E(w,S){var A=null;return a(w,function(D,M){A=S(A,D,M,w)}),A}function x(w){return String(w).replace(/^ +| +$/g,"")}function O(w){var S=T,A=w&&typeof w=="object"&&f(w)!="String";A&&(S=w,w=null);var D=S.navigator||{},M=D.userAgent||"";w||(w=M);var N=A||o==y,P=A?!!D.likeChrome:/\bChrome\b/.test(w)&&!/internal|\n/i.test(r.toString()),z="Object",X=A?z:"ScriptBridgingProxyObject",k=A?z:"Environment",F=A&&S.java?"JavaPackage":f(S.java),U=A?z:"RuntimeObject",L=/\bJava/.test(F)&&S.java,B=L&&f(S.environment)==k,Z=L?"a":"\u03B1",re=L?"b":"\u03B2",he=S.document||{},Ce=S.operamini||S.opera,ke=e.test(ke=A&&Ce?Ce["[[Class]]"]:f(Ce))?ke:Ce=null,te,Re=w,Te=[],pe=null,me=w==M,se=me&&Ce&&typeof Ce.version=="function"&&Ce.version(),be,ae=Q([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),fe=oe(["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=Ee([{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"]),ie=Y({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}}),q=le(["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 Q(_e){return E(_e,function(Xe,tt){return Xe||RegExp("\\b"+(tt.pattern||u(tt))+"\\b","i").exec(w)&&(tt.label||tt)})}function Y(_e){return E(_e,function(Xe,tt,ze){return Xe||(tt[Fe]||tt[/^[a-z]+(?: +[a-z]+\b)*/i.exec(Fe)]||RegExp("\\b"+u(ze)+"(?:\\b|\\w*\\d)","i").exec(w))&&ze})}function oe(_e){return E(_e,function(Xe,tt){return Xe||RegExp("\\b"+(tt.pattern||u(tt))+"\\b","i").exec(w)&&(tt.label||tt)})}function le(_e){return E(_e,function(Xe,tt){var ze=tt.pattern||u(tt);return!Xe&&(Xe=RegExp("\\b"+ze+"(?:/[\\d.]+|[ \\w.]*)","i").exec(w))&&(Xe=t(Xe,ze,tt.label||tt)),Xe})}function Ee(_e){return E(_e,function(Xe,tt){var ze=tt.pattern||u(tt);return!Xe&&(Xe=RegExp("\\b"+ze+" *\\d+[.\\w_]*","i").exec(w)||RegExp("\\b"+ze+" *\\w+-[\\w]*","i").exec(w)||RegExp("\\b"+ze+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(w))&&((Xe=String(tt.label&&!RegExp(ze,"i").test(tt.label)?tt.label:Xe).split("/"))[1]&&!/[\d.]+/.test(Xe[0])&&(Xe[0]+=" "+Xe[1]),tt=tt.label||tt,Xe=c(Xe[0].replace(RegExp(ze,"i"),tt).replace(RegExp("; *(?:"+tt+"[_-])?","i")," ").replace(RegExp("("+tt+")[-_.]?(\\w)","i"),"$1 $2"))),Xe})}function Le(_e){return E(_e,function(Xe,tt){return Xe||(RegExp(tt+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(w)||0)[1]||null})}function ge(){return this.description||""}if(ae&&(ae=[ae]),ie&&!Fe&&(Fe=Ee([ie])),(te=/\bGoogle TV\b/.exec(Fe))&&(Fe=te[0]),/\bSimulator\b/i.test(w)&&(Fe=(Fe?Fe+" ":"")+"Simulator"),fe=="Opera Mini"&&/\bOPiOS\b/.test(w)&&Te.push("running in Turbo/Uncompressed mode"),fe=="IE"&&/\blike iPhone OS\b/.test(w)?(te=O(w.replace(/like iPhone OS/,"")),ie=te.manufacturer,Fe=te.product):/^iP/.test(Fe)?(fe||(fe="Safari"),q="iOS"+((te=/ OS ([\d_]+)/i.exec(w))?" "+te[1].replace(/_/g,"."):"")):fe=="Konqueror"&&!/buntu/i.test(q)?q="Kubuntu":ie&&ie!="Google"&&(/Chrome/.test(fe)&&!/\bMobile Safari\b/i.test(w)||/\bVita\b/.test(Fe))||/\bAndroid\b/.test(q)&&/^Chrome/.test(fe)&&/\bVersion\//i.test(w)?(fe="Android Browser",q=/\bAndroid\b/.test(q)?q:"Android"):fe=="Silk"?(/\bMobi/i.test(w)||(q="Android",Te.unshift("desktop mode")),/Accelerated *= *true/i.test(w)&&Te.unshift("accelerated")):fe=="PaleMoon"&&(te=/\bFirefox\/([\d.]+)\b/.exec(w))?Te.push("identifying as Firefox "+te[1]):fe=="Firefox"&&(te=/\b(Mobile|Tablet|TV)\b/i.exec(w))?(q||(q="Firefox OS"),Fe||(Fe=te[1])):!fe||(te=!/\bMinefield\b/i.test(w)&&/\b(?:Firefox|Safari)\b/.exec(fe))?(fe&&!Fe&&/[\/,]|^[^(]+?\)/.test(w.slice(w.indexOf(te+"/")+8))&&(fe=null),(te=Fe||ie||q)&&(Fe||ie||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(q))&&(fe=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(q)?q:te)+" Browser")):fe=="Electron"&&(te=(/\bChrome\/([\d.]+)\b/.exec(w)||0)[1])&&Te.push("Chromium "+te),se||(se=Le(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",u(fe),"(?:Firefox|Minefield|NetFront)"])),(te=ae=="iCab"&&parseFloat(se)>3&&"WebKit"||/\bOpera\b/.test(fe)&&(/\bOPR\b/.test(w)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(w)&&!/^(?:Trident|EdgeHTML)$/.test(ae)&&"WebKit"||!ae&&/\bMSIE\b/i.test(w)&&(q=="Mac OS"?"Tasman":"Trident")||ae=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(fe)&&"NetFront")&&(ae=[te]),fe=="IE"&&(te=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(w)||0)[1])?(fe+=" Mobile",q="Windows Phone "+(/\+$/.test(te)?te:te+".x"),Te.unshift("desktop mode")):/\bWPDesktop\b/i.test(w)?(fe="IE Mobile",q="Windows Phone 8.x",Te.unshift("desktop mode"),se||(se=(/\brv:([\d.]+)/.exec(w)||0)[1])):fe!="IE"&&ae=="Trident"&&(te=/\brv:([\d.]+)/.exec(w))&&(fe&&Te.push("identifying as "+fe+(se?" "+se:"")),fe="IE",se=te[1]),me){if(h(S,"global"))if(L&&(te=L.lang.System,Re=te.getProperty("os.arch"),q=q||te.getProperty("os.name")+" "+te.getProperty("os.version")),B){try{se=S.require("ringo/engine").version.join("."),fe="RingoJS"}catch(_e){(te=S.system)&&te.global.system==S.system&&(fe="Narwhal",q||(q=te[0].os||null))}fe||(fe="Rhino")}else typeof S.process=="object"&&!S.process.browser&&(te=S.process)&&(typeof te.versions=="object"&&(typeof te.versions.electron=="string"?(Te.push("Node "+te.versions.node),fe="Electron",se=te.versions.electron):typeof te.versions.nw=="string"&&(Te.push("Chromium "+se,"Node "+te.versions.node),fe="NW.js",se=te.versions.nw)),fe||(fe="Node.js",Re=te.arch,q=te.platform,se=/[\d.]+/.exec(te.version),se=se?se[0]:null));else f(te=S.runtime)==X?(fe="Adobe AIR",q=te.flash.system.Capabilities.os):f(te=S.phantom)==U?(fe="PhantomJS",se=(te=te.version||null)&&te.major+"."+te.minor+"."+te.patch):typeof he.documentMode=="number"&&(te=/\bTrident\/(\d+)/i.exec(w))?(se=[se,he.documentMode],(te=+te[1]+4)!=se[1]&&(Te.push("IE "+se[1]+" mode"),ae&&(ae[1]=""),se[1]=te),se=fe=="IE"?String(se[1].toFixed(1)):se[0]):typeof he.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(fe)&&(Te.push("masking as "+fe+" "+se),fe="IE",se="11.0",ae=["Trident"],q="Windows");q=q&&c(q)}if(se&&(te=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(se)||/(?:alpha|beta)(?: ?\d)?/i.exec(w+";"+(me&&D.appMinorVersion))||/\bMinefield\b/i.test(w)&&"a")&&(pe=/b/i.test(te)?"beta":"alpha",se=se.replace(RegExp(te+"\\+?$"),"")+(pe=="beta"?re:Z)+(/\d+\+?/.exec(te)||"")),fe=="Fennec"||fe=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(q))fe="Firefox Mobile";else if(fe=="Maxthon"&&se)se=se.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Fe))Fe=="Xbox 360"&&(q=null),Fe=="Xbox 360"&&/\bIEMobile\b/.test(w)&&Te.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(fe)||fe&&!Fe&&!/Browser|Mobi/.test(fe))&&(q=="Windows CE"||/Mobi/i.test(w)))fe+=" Mobile";else if(fe=="IE"&&me)try{S.external===null&&Te.unshift("platform preview")}catch(_e){Te.unshift("embedded")}else(/\bBlackBerry\b/.test(Fe)||/\bBB10\b/.test(w))&&(te=(RegExp(Fe.replace(/ +/g," *")+"/([.\\d]+)","i").exec(w)||0)[1]||se)?(te=[te,/BB10/.test(w)],q=(te[1]?(Fe=null,ie="BlackBerry"):"Device Software")+" "+te[0],se=null):this!=d&&Fe!="Wii"&&(me&&Ce||/Opera/.test(fe)&&/\b(?:MSIE|Firefox)\b/i.test(w)||fe=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(q)||fe=="IE"&&(q&&!/^Win/.test(q)&&se>5.5||/\bWindows XP\b/.test(q)&&se>8||se==8&&!/\bTrident\b/.test(w)))&&!e.test(te=O.call(d,w.replace(e,"")+";"))&&te.name&&(te="ing as "+te.name+((te=te.version)?" "+te:""),e.test(fe)?(/\bIE\b/.test(te)&&q=="Mac OS"&&(q=null),te="identify"+te):(te="mask"+te,ke?fe=c(ke.replace(/([a-z])([A-Z])/g,"$1 $2")):fe="Opera",/\bIE\b/.test(te)&&(q=null),me||(se=null)),ae=["Presto"],Te.push(te));(te=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(w)||0)[1])&&(te=[parseFloat(te.replace(/\.(\d)$/,".0$1")),te],fe=="Safari"&&te[1].slice(-1)=="+"?(fe="WebKit Nightly",pe="alpha",se=te[1].slice(0,-1)):(se==te[1]||se==(te[2]=(/\bSafari\/([\d.]+\+?)/i.exec(w)||0)[1]))&&(se=null),te[1]=(/\bChrome\/([\d.]+)/i.exec(w)||0)[1],te[0]==537.36&&te[2]==537.36&&parseFloat(te[1])>=28&&ae=="WebKit"&&(ae=["Blink"]),!me||!P&&!te[1]?(ae&&(ae[1]="like Safari"),te=(te=te[0],te<400?1:te<500?2:te<526?3:te<533?4:te<534?"4+":te<535?5:te<537?6:te<538?7:te<601?8:"8")):(ae&&(ae[1]="like Chrome"),te=te[1]||(te=te[0],te<530?1:te<532?2:te<532.05?3:te<533?4:te<534.03?5:te<534.07?6:te<534.1?7:te<534.13?8:te<534.16?9:te<534.24?10:te<534.3?11:te<535.01?12:te<535.02?"13+":te<535.07?15:te<535.11?16:te<535.19?17:te<536.05?18:te<536.1?19:te<537.01?20:te<537.11?"21+":te<537.13?23:te<537.18?24:te<537.24?25:te<537.36?26:ae!="Blink"?"27":"28")),ae&&(ae[1]+=" "+(te+=typeof te=="number"?".x":/[.+]/.test(te)?"":"+")),fe=="Safari"&&(!se||parseInt(se)>45)&&(se=te)),fe=="Opera"&&(te=/\bzbov|zvav$/.exec(q))?(fe+=" ",Te.unshift("desktop mode"),te=="zvav"?(fe+="Mini",se=null):fe+="Mobile",q=q.replace(RegExp(" *"+te+"$"),"")):fe=="Safari"&&/\bChrome\b/.exec(ae&&ae[1])&&(Te.unshift("desktop mode"),fe="Chrome Mobile",se=null,/\bOS X\b/.test(q)?(ie="Apple",q="iOS 4.3+"):q=null),se&&se.indexOf(te=/[\d.]+$/.exec(q))==0&&w.indexOf("/"+te+"-")>-1&&(q=x(q.replace(te,""))),ae&&!/\b(?:Avant|Nook)\b/.test(fe)&&(/Browser|Lunascape|Maxthon/.test(fe)||fe!="Safari"&&/^iOS/.test(q)&&/\bSafari\b/.test(ae[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(fe)&&ae[1])&&((te=ae[ae.length-1])&&Te.push(te)),Te.length&&(Te=["("+Te.join("; ")+")"]),ie&&Fe&&Fe.indexOf(ie)<0&&Te.push("on "+ie),Fe&&Te.push((/^on /.test(Te[Te.length-1])?"":"on ")+Fe),q&&(te=/ ([\d.+]+)$/.exec(q),be=te&&q.charAt(q.length-te[0].length-1)=="/",q={architecture:32,family:te&&!be?q.replace(te[0],""):q,version:te?te[1]:null,toString:function(){var _e=this.version;return this.family+(_e&&!be?" "+_e:"")+(this.architecture==64?" 64-bit":"")}}),(te=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Re))&&!/\bi686\b/i.test(Re)?(q&&(q.architecture=64,q.family=q.family.replace(RegExp(" *"+te),"")),fe&&(/\bWOW64\b/i.test(w)||me&&/\w(?:86|32)$/.test(D.cpuClass||D.platform)&&!/\bWin64; x64\b/i.test(w))&&Te.unshift("32-bit")):q&&/^OS X/.test(q.family)&&fe=="Chrome"&&parseFloat(se)>=39&&(q.architecture=64),w||(w=null);var De={};return De.description=w,De.layout=ae&&ae[0],De.manufacturer=ie,De.name=fe,De.prerelease=pe,De.product=Fe,De.ua=w,De.version=fe&&se,De.os=q||{architecture:null,family:null,version:null,toString:function(){return"null"}},De.parse=O,De.toString=ge,De.version&&Te.unshift(se),De.name&&Te.unshift(fe),q&&fe&&!(q==String(q).split(" ")[0]&&(q==fe.split(" ")[0]||Fe))&&Te.push(Fe?"("+q+")":"on "+q),Te.length&&(De.description=Te.join(" ")),De}var C=O();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(T.platform=C,define(function(){return C})):g&&s?d(C,function(w,S){g[S]=w}):T.platform=C}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(j,H,b){(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?H.exports={nextTick:v}:H.exports=I;function v(T,y,g,s){if(typeof T!="function")throw new TypeError('"callback" argument must be a function');var _=arguments.length,p,e;switch(_){case 0:case 1:return I.nextTick(T);case 2:return I.nextTick(function(){T.call(null,y)});case 3:return I.nextTick(function(){T.call(null,y,g)});case 4:return I.nextTick(function(){T.call(null,y,g,s)});default:for(p=new Array(_-1),e=0;e<p.length;)p[e++]=arguments[e];return I.nextTick(function(){T.apply(null,p)})}}}).call(this,j("_process"))},{_process:208}],208:[function(j,H,b){var I=H.exports={},v,T;function y(){throw new Error("setTimeout has not been defined")}function g(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?v=setTimeout:v=y}catch(a){v=y}try{typeof clearTimeout=="function"?T=clearTimeout:T=g}catch(a){T=g}})();function s(a){if(v===setTimeout)return setTimeout(a,0);if((v===y||!v)&&setTimeout)return v=setTimeout,setTimeout(a,0);try{return v(a,0)}catch(c){try{return v.call(null,a,0)}catch(d){return v.call(this,a,0)}}}function _(a){if(T===clearTimeout)return clearTimeout(a);if((T===g||!T)&&clearTimeout)return T=clearTimeout,clearTimeout(a);try{return T(a)}catch(c){try{return T.call(null,a)}catch(d){return T.call(this,a)}}}var p=[],e=!1,o,n=-1;function l(){if(!e||!o)return;e=!1,o.length?p=o.concat(p):n=-1,p.length&&r()}function r(){if(e)return;var a=s(l);e=!0;for(var c=p.length;c;){for(o=p,p=[];++n<c;)o&&o[n].run();n=-1,c=p.length}o=null,e=!1,_(a)}I.nextTick=function(a){var c=new Array(arguments.length-1);if(arguments.length>1)for(var d=1;d<arguments.length;d++)c[d-1]=arguments[d];p.push(new i(a,c)),p.length===1&&!e&&s(r)};function i(a,c){this.fun=a,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 t(){}I.on=t,I.addListener=t,I.once=t,I.off=t,I.removeListener=t,I.removeAllListeners=t,I.emit=t,I.prependListener=t,I.prependOnceListener=t,I.listeners=function(a){return[]},I.binding=function(a){throw new Error("process.binding is not supported")},I.cwd=function(){return"/"},I.chdir=function(a){throw new Error("process.chdir is not supported")},I.umask=function(){return 0}},{}],209:[function(j,H,b){(function(I){/*! https://mths.be/punycode v1.4.1 by @mathias */(function(v){var T=typeof b=="object"&&b&&!b.nodeType&&b,y=typeof H=="object"&&H&&!H.nodeType&&H,g=typeof I=="object"&&I;(g.global===g||g.window===g||g.self===g)&&(v=g);var s,_=2147483647,p=36,e=1,o=26,n=38,l=700,r=72,i=128,t="-",a=/^xn--/,c=/[^\x20-\x7E]/,d=/[\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"},h=p-e,u=Math.floor,E=String.fromCharCode,x;function O(F){throw new RangeError(f[F])}function C(F,U){for(var L=F.length,B=[];L--;)B[L]=U(F[L]);return B}function w(F,U){var L=F.split("@"),B="";L.length>1&&(B=L[0]+"@",F=L[1]),F=F.replace(d,".");var Z=F.split("."),re=C(Z,U).join(".");return B+re}function S(F){for(var U=[],L=0,B=F.length,Z,re;L<B;)Z=F.charCodeAt(L++),Z>=55296&&Z<=56319&&L<B?(re=F.charCodeAt(L++),(re&64512)==56320?U.push(((Z&1023)<<10)+(re&1023)+65536):(U.push(Z),L--)):U.push(Z);return U}function A(F){return C(F,function(U){var L="";return U>65535&&(U-=65536,L+=E(U>>>10&1023|55296),U=56320|U&1023),L+=E(U),L}).join("")}function D(F){return F-48<10?F-22:F-65<26?F-65:F-97<26?F-97:p}function M(F,U){return F+22+75*(F<26)-((U!=0)<<5)}function N(F,U,L){var B=0;for(F=L?u(F/l):F>>1,F+=u(F/U);F>h*o>>1;B+=p)F=u(F/h);return u(B+(h+1)*F/(F+n))}function P(F){var U=[],L=F.length,B,Z=0,re=i,he=r,Ce,ke,te,Re,Te,pe,me,se,be;for(Ce=F.lastIndexOf(t),Ce<0&&(Ce=0),ke=0;ke<Ce;++ke)F.charCodeAt(ke)>=128&&O("not-basic"),U.push(F.charCodeAt(ke));for(te=Ce>0?Ce+1:0;te<L;){for(Re=Z,Te=1,pe=p;!(te>=L&&O("invalid-input"),me=D(F.charCodeAt(te++)),(me>=p||me>u((_-Z)/Te))&&O("overflow"),Z+=me*Te,se=pe<=he?e:pe>=he+o?o:pe-he,me<se);pe+=p)be=p-se,Te>u(_/be)&&O("overflow"),Te*=be;B=U.length+1,he=N(Z-Re,B,Re==0),u(Z/B)>_-re&&O("overflow"),re+=u(Z/B),Z%=B,U.splice(Z++,0,re)}return A(U)}function z(F){var U,L,B,Z,re,he,Ce,ke,te,Re,Te,pe=[],me,se,be,ae;for(F=S(F),me=F.length,U=i,L=0,re=r,he=0;he<me;++he)Te=F[he],Te<128&&pe.push(E(Te));for(B=Z=pe.length,Z&&pe.push(t);B<me;){for(Ce=_,he=0;he<me;++he)Te=F[he],Te>=U&&Te<Ce&&(Ce=Te);for(se=B+1,Ce-U>u((_-L)/se)&&O("overflow"),L+=(Ce-U)*se,U=Ce,he=0;he<me;++he)if(Te=F[he],Te<U&&++L>_&&O("overflow"),Te==U){for(ke=L,te=p;!(Re=te<=re?e:te>=re+o?o:te-re,ke<Re);te+=p)ae=ke-Re,be=p-Re,pe.push(E(M(Re+ae%be,0))),ke=u(ae/be);pe.push(E(M(ke,0))),re=N(L,se,B==Z),L=0,++B}++L,++U}return pe.join("")}function X(F){return w(F,function(U){return a.test(U)?P(U.slice(4).toLowerCase()):U})}function k(F){return w(F,function(U){return c.test(U)?"xn--"+z(U):U})}if(s={version:"1.4.1",ucs2:{decode:S,encode:A},decode:P,encode:z,toASCII:k,toUnicode:X},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return s});else if(T&&y)if(H.exports==T)y.exports=s;else for(x in s)s.hasOwnProperty(x)&&(T[x]=s[x]);else v.punycode=s})(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],210:[function(j,H,b){"use strict";function I(T,y){return Object.prototype.hasOwnProperty.call(T,y)}H.exports=function(T,y,g,s){y=y||"&",g=g||"=";var _={};if(typeof T!="string"||T.length===0)return _;var p=/\+/g;T=T.split(y);var e=1e3;s&&typeof s.maxKeys=="number"&&(e=s.maxKeys);var o=T.length;e>0&&o>e&&(o=e);for(var n=0;n<o;++n){var l=T[n].replace(p,"%20"),r=l.indexOf(g),i,t,a,c;r>=0?(i=l.substr(0,r),t=l.substr(r+1)):(i=l,t=""),a=decodeURIComponent(i),c=decodeURIComponent(t),I(_,a)?v(_[a])?_[a].push(c):_[a]=[_[a],c]:_[a]=c}return _};var v=Array.isArray||function(T){return Object.prototype.toString.call(T)==="[object Array]"}},{}],211:[function(j,H,b){"use strict";var I=function(g){switch(typeof g){case"string":return g;case"boolean":return g?"true":"false";case"number":return isFinite(g)?g:"";default:return""}};H.exports=function(g,s,_,p){return s=s||"&",_=_||"=",g===null&&(g=void 0),typeof g=="object"?T(y(g),function(e){var o=encodeURIComponent(I(e))+_;return v(g[e])?T(g[e],function(n){return o+encodeURIComponent(I(n))}).join(s):o+encodeURIComponent(I(g[e]))}).join(s):p?encodeURIComponent(I(p))+_+encodeURIComponent(I(g)):""};var v=Array.isArray||function(g){return Object.prototype.toString.call(g)==="[object Array]"};function T(g,s){if(g.map)return g.map(s);for(var _=[],p=0;p<g.length;p++)_.push(s(g[p],p));return _}var y=Object.keys||function(g){var s=[];for(var _ in g)Object.prototype.hasOwnProperty.call(g,_)&&s.push(_);return s}},{}],212:[function(j,H,b){"use strict";b.decode=b.parse=j("./decode"),b.encode=b.stringify=j("./encode")},{"./decode":210,"./encode":211}],213:[function(j,H,b){H.exports=j("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":214}],214:[function(j,H,b){"use strict";var I=j("babel-runtime/core-js/object/create"),v=g(I),T=j("babel-runtime/core-js/object/keys"),y=g(T);function g(c){return c&&c.__esModule?c:{default:c}}var s=j("process-nextick-args"),_=y.default||function(c){var d=[];for(var f in c)d.push(f);return d};H.exports=i;var p=(0,v.default)(j("core-util-is"));p.inherits=j("inherits");var e=j("./_stream_readable"),o=j("./_stream_writable");p.inherits(i,e);for(var n=_(o.prototype),l=0;l<n.length;l++){var r=n[l];i.prototype[r]||(i.prototype[r]=o.prototype[r])}function i(c){if(!(this instanceof i))return new i(c);e.call(this,c),o.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",t)}Object.defineProperty(i.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function t(){if(this.allowHalfOpen||this._writableState.ended)return;s.nextTick(a,this)}function a(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(d){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=d,this._writableState.destroyed=d}}),i.prototype._destroy=function(c,d){this.push(null),this.end(),s.nextTick(d,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(j,H,b){"use strict";var I=j("babel-runtime/core-js/object/create"),v=T(I);function T(_){return _&&_.__esModule?_:{default:_}}H.exports=s;var y=j("./_stream_transform"),g=(0,v.default)(j("core-util-is"));g.inherits=j("inherits"),g.inherits(s,y);function s(_){if(!(this instanceof s))return new s(_);y.call(this,_)}s.prototype._transform=function(_,p,e){e(null,_)}},{"./_stream_transform":217,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],216:[function(j,H,b){(function(I,v){"use strict";var T=j("babel-runtime/core-js/object/get-prototype-of"),y=_(T),g=j("babel-runtime/core-js/object/create"),s=_(g);function _(ae){return ae&&ae.__esModule?ae:{default:ae}}var p=j("process-nextick-args");H.exports=S;var e=j("isarray"),o;S.ReadableState=w;var n=j("events").EventEmitter,l=function(fe,Fe){return fe.listeners(Fe).length},r=j("./internal/streams/stream"),i=j("safe-buffer").Buffer,t=v.Uint8Array||function(){};function a(ae){return i.from(ae)}function c(ae){return i.isBuffer(ae)||ae instanceof t}var d=(0,s.default)(j("core-util-is"));d.inherits=j("inherits");var f=j("util"),h=void 0;f&&f.debuglog?h=f.debuglog("stream"):h=function(){};var u=j("./internal/streams/BufferList"),E=j("./internal/streams/destroy"),x;d.inherits(S,r);var O=["error","close","destroy","pause","resume"];function C(ae,fe,Fe){if(typeof ae.prependListener=="function")return ae.prependListener(fe,Fe);!ae._events||!ae._events[fe]?ae.on(fe,Fe):e(ae._events[fe])?ae._events[fe].unshift(Fe):ae._events[fe]=[Fe,ae._events[fe]]}function w(ae,fe){o=o||j("./_stream_duplex"),ae=ae||{};var Fe=fe instanceof o;this.objectMode=!!ae.objectMode,Fe&&(this.objectMode=this.objectMode||!!ae.readableObjectMode);var ie=ae.highWaterMark,q=ae.readableHighWaterMark,Q=this.objectMode?16:16*1024;ie||ie===0?this.highWaterMark=ie:Fe&&(q||q===0)?this.highWaterMark=q:this.highWaterMark=Q,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new u,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=ae.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,ae.encoding&&(x||(x=j("string_decoder/").StringDecoder),this.decoder=new x(ae.encoding),this.encoding=ae.encoding)}function S(ae){if(o=o||j("./_stream_duplex"),!(this instanceof S))return new S(ae);this._readableState=new w(ae,this),this.readable=!0,ae&&(typeof ae.read=="function"&&(this._read=ae.read),typeof ae.destroy=="function"&&(this._destroy=ae.destroy)),r.call(this)}Object.defineProperty(S.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(fe){if(!this._readableState)return;this._readableState.destroyed=fe}}),S.prototype.destroy=E.destroy,S.prototype._undestroy=E.undestroy,S.prototype._destroy=function(ae,fe){this.push(null),fe(ae)},S.prototype.push=function(ae,fe){var Fe=this._readableState,ie;return Fe.objectMode?ie=!0:typeof ae=="string"&&(fe=fe||Fe.defaultEncoding,fe!==Fe.encoding&&(ae=i.from(ae,fe),fe=""),ie=!0),A(this,ae,fe,!1,ie)},S.prototype.unshift=function(ae){return A(this,ae,null,!0,!1)};function A(ae,fe,Fe,ie,q){var Q=ae._readableState;if(fe===null)Q.reading=!1,k(ae,Q);else{var Y;q||(Y=M(Q,fe)),Y?ae.emit("error",Y):Q.objectMode||fe&&fe.length>0?(typeof fe!="string"&&!Q.objectMode&&(0,y.default)(fe)!==i.prototype&&(fe=a(fe)),ie?Q.endEmitted?ae.emit("error",new Error("stream.unshift() after end event")):D(ae,Q,fe,!0):Q.ended?ae.emit("error",new Error("stream.push() after EOF")):(Q.reading=!1,Q.decoder&&!Fe?(fe=Q.decoder.write(fe),Q.objectMode||fe.length!==0?D(ae,Q,fe,!1):L(ae,Q)):D(ae,Q,fe,!1))):ie||(Q.reading=!1)}return N(Q)}function D(ae,fe,Fe,ie){fe.flowing&&fe.length===0&&!fe.sync?(ae.emit("data",Fe),ae.read(0)):(fe.length+=fe.objectMode?1:Fe.length,ie?fe.buffer.unshift(Fe):fe.buffer.push(Fe),fe.needReadable&&F(ae)),L(ae,fe)}function M(ae,fe){var Fe;return!c(fe)&&typeof fe!="string"&&fe!==void 0&&!ae.objectMode&&(Fe=new TypeError("Invalid non-string/buffer chunk")),Fe}function N(ae){return!ae.ended&&(ae.needReadable||ae.length<ae.highWaterMark||ae.length===0)}S.prototype.isPaused=function(){return this._readableState.flowing===!1},S.prototype.setEncoding=function(ae){return x||(x=j("string_decoder/").StringDecoder),this._readableState.decoder=new x(ae),this._readableState.encoding=ae,this};var P=8388608;function z(ae){return ae>=P?ae=P:(ae--,ae|=ae>>>1,ae|=ae>>>2,ae|=ae>>>4,ae|=ae>>>8,ae|=ae>>>16,ae++),ae}function X(ae,fe){return ae<=0||fe.length===0&&fe.ended?0:fe.objectMode?1:ae!==ae?fe.flowing&&fe.length?fe.buffer.head.data.length:fe.length:(ae>fe.highWaterMark&&(fe.highWaterMark=z(ae)),ae<=fe.length?ae:fe.ended?fe.length:(fe.needReadable=!0,0))}S.prototype.read=function(ae){h("read",ae),ae=parseInt(ae,10);var fe=this._readableState,Fe=ae;if(ae!==0&&(fe.emittedReadable=!1),ae===0&&fe.needReadable&&(fe.length>=fe.highWaterMark||fe.ended))return h("read: emitReadable",fe.length,fe.ended),fe.length===0&&fe.ended?me(this):F(this),null;if(ae=X(ae,fe),ae===0&&fe.ended)return fe.length===0&&me(this),null;var ie=fe.needReadable;h("need readable",ie),(fe.length===0||fe.length-ae<fe.highWaterMark)&&(ie=!0,h("length less than watermark",ie)),fe.ended||fe.reading?(ie=!1,h("reading or ended",ie)):ie&&(h("do read"),fe.reading=!0,fe.sync=!0,fe.length===0&&(fe.needReadable=!0),this._read(fe.highWaterMark),fe.sync=!1,fe.reading||(ae=X(Fe,fe)));var q;return ae>0?q=te(ae,fe):q=null,q===null?(fe.needReadable=!0,ae=0):fe.length-=ae,fe.length===0&&(fe.ended||(fe.needReadable=!0),Fe!==ae&&fe.ended&&me(this)),q!==null&&this.emit("data",q),q};function k(ae,fe){if(fe.ended)return;if(fe.decoder){var Fe=fe.decoder.end();Fe&&Fe.length&&(fe.buffer.push(Fe),fe.length+=fe.objectMode?1:Fe.length)}fe.ended=!0,F(ae)}function F(ae){var fe=ae._readableState;fe.needReadable=!1,fe.emittedReadable||(h("emitReadable",fe.flowing),fe.emittedReadable=!0,fe.sync?p.nextTick(U,ae):U(ae))}function U(ae){h("emit readable"),ae.emit("readable"),ke(ae)}function L(ae,fe){fe.readingMore||(fe.readingMore=!0,p.nextTick(B,ae,fe))}function B(ae,fe){for(var Fe=fe.length;!fe.reading&&!fe.flowing&&!fe.ended&&fe.length<fe.highWaterMark&&!(h("maybeReadMore read 0"),ae.read(0),Fe===fe.length);)Fe=fe.length;fe.readingMore=!1}S.prototype._read=function(ae){this.emit("error",new Error("_read() is not implemented"))},S.prototype.pipe=function(ae,fe){var Fe=this,ie=this._readableState;switch(ie.pipesCount){case 0:ie.pipes=ae;break;case 1:ie.pipes=[ie.pipes,ae];break;default:ie.pipes.push(ae);break}ie.pipesCount+=1,h("pipe count=%d opts=%j",ie.pipesCount,fe);var q=(!fe||fe.end!==!1)&&ae!==I.stdout&&ae!==I.stderr,Q=q?oe:ze;ie.endEmitted?p.nextTick(Q):Fe.once("end",Q),ae.on("unpipe",Y);function Y(Me,Et){h("onunpipe"),Me===Fe&&(Et&&Et.hasUnpiped===!1&&(Et.hasUnpiped=!0,Le()))}function oe(){h("onend"),ae.end()}var le=Z(Fe);ae.on("drain",le);var Ee=!1;function Le(){h("cleanup"),ae.removeListener("close",Xe),ae.removeListener("finish",tt),ae.removeListener("drain",le),ae.removeListener("error",_e),ae.removeListener("unpipe",Y),Fe.removeListener("end",oe),Fe.removeListener("end",ze),Fe.removeListener("data",De),Ee=!0,ie.awaitDrain&&(!ae._writableState||ae._writableState.needDrain)&&le()}var ge=!1;Fe.on("data",De);function De(Me){h("ondata"),ge=!1;var Et=ae.write(Me);Et===!1&&!ge&&((ie.pipesCount===1&&ie.pipes===ae||ie.pipesCount>1&&be(ie.pipes,ae)!==-1)&&!Ee&&(h("false write response, pause",Fe._readableState.awaitDrain),Fe._readableState.awaitDrain++,ge=!0),Fe.pause())}function _e(Me){h("onerror",Me),ze(),ae.removeListener("error",_e),l(ae,"error")===0&&ae.emit("error",Me)}C(ae,"error",_e);function Xe(){ae.removeListener("finish",tt),ze()}ae.once("close",Xe);function tt(){h("onfinish"),ae.removeListener("close",Xe),ze()}ae.once("finish",tt);function ze(){h("unpipe"),Fe.unpipe(ae)}return ae.emit("pipe",Fe),ie.flowing||(h("pipe resume"),Fe.resume()),ae};function Z(ae){return function(){var fe=ae._readableState;h("pipeOnDrain",fe.awaitDrain),fe.awaitDrain&&fe.awaitDrain--,fe.awaitDrain===0&&l(ae,"data")&&(fe.flowing=!0,ke(ae))}}S.prototype.unpipe=function(ae){var fe=this._readableState,Fe={hasUnpiped:!1};if(fe.pipesCount===0)return this;if(fe.pipesCount===1)return ae&&ae!==fe.pipes?this:(ae||(ae=fe.pipes),fe.pipes=null,fe.pipesCount=0,fe.flowing=!1,ae&&ae.emit("unpipe",this,Fe),this);if(!ae){var ie=fe.pipes,q=fe.pipesCount;fe.pipes=null,fe.pipesCount=0,fe.flowing=!1;for(var Q=0;Q<q;Q++)ie[Q].emit("unpipe",this,Fe);return this}var Y=be(fe.pipes,ae);return Y===-1?this:(fe.pipes.splice(Y,1),fe.pipesCount-=1,fe.pipesCount===1&&(fe.pipes=fe.pipes[0]),ae.emit("unpipe",this,Fe),this)},S.prototype.on=function(ae,fe){var Fe=r.prototype.on.call(this,ae,fe);if(ae==="data")this._readableState.flowing!==!1&&this.resume();else if(ae==="readable"){var ie=this._readableState;!ie.endEmitted&&!ie.readableListening&&(ie.readableListening=ie.needReadable=!0,ie.emittedReadable=!1,ie.reading?ie.length&&F(this):p.nextTick(re,this))}return Fe},S.prototype.addListener=S.prototype.on;function re(ae){h("readable nexttick read 0"),ae.read(0)}S.prototype.resume=function(){var ae=this._readableState;return ae.flowing||(h("resume"),ae.flowing=!0,he(this,ae)),this};function he(ae,fe){fe.resumeScheduled||(fe.resumeScheduled=!0,p.nextTick(Ce,ae,fe))}function Ce(ae,fe){fe.reading||(h("resume read 0"),ae.read(0)),fe.resumeScheduled=!1,fe.awaitDrain=0,ae.emit("resume"),ke(ae),fe.flowing&&!fe.reading&&ae.read(0)}S.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function ke(ae){var fe=ae._readableState;for(h("flow",fe.flowing);fe.flowing&&ae.read()!==null;);}S.prototype.wrap=function(ae){var fe=this,Fe=this._readableState,ie=!1;ae.on("end",function(){if(h("wrapped end"),Fe.decoder&&!Fe.ended){var Y=Fe.decoder.end();Y&&Y.length&&fe.push(Y)}fe.push(null)}),ae.on("data",function(Y){if(h("wrapped data"),Fe.decoder&&(Y=Fe.decoder.write(Y)),Fe.objectMode&&Y==null)return;if(!Fe.objectMode&&(!Y||!Y.length))return;var oe=fe.push(Y);oe||(ie=!0,ae.pause())});for(var q in ae)this[q]===void 0&&typeof ae[q]=="function"&&(this[q]=function(Y){return function(){return ae[Y].apply(ae,arguments)}}(q));for(var Q=0;Q<O.length;Q++)ae.on(O[Q],this.emit.bind(this,O[Q]));return this._read=function(Y){h("wrapped _read",Y),ie&&(ie=!1,ae.resume())},this},Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),S._fromList=te;function te(ae,fe){if(fe.length===0)return null;var Fe;return fe.objectMode?Fe=fe.buffer.shift():!ae||ae>=fe.length?(fe.decoder?Fe=fe.buffer.join(""):fe.buffer.length===1?Fe=fe.buffer.head.data:Fe=fe.buffer.concat(fe.length),fe.buffer.clear()):Fe=Re(ae,fe.buffer,fe.decoder),Fe}function Re(ae,fe,Fe){var ie;return ae<fe.head.data.length?(ie=fe.head.data.slice(0,ae),fe.head.data=fe.head.data.slice(ae)):ae===fe.head.data.length?ie=fe.shift():ie=Fe?Te(ae,fe):pe(ae,fe),ie}function Te(ae,fe){var Fe=fe.head,ie=1,q=Fe.data;for(ae-=q.length;Fe=Fe.next;){var Q=Fe.data,Y=ae>Q.length?Q.length:ae;if(Y===Q.length?q+=Q:q+=Q.slice(0,ae),ae-=Y,ae===0){Y===Q.length?(++ie,Fe.next?fe.head=Fe.next:fe.head=fe.tail=null):(fe.head=Fe,Fe.data=Q.slice(Y));break}++ie}return fe.length-=ie,q}function pe(ae,fe){var Fe=i.allocUnsafe(ae),ie=fe.head,q=1;for(ie.data.copy(Fe),ae-=ie.data.length;ie=ie.next;){var Q=ie.data,Y=ae>Q.length?Q.length:ae;if(Q.copy(Fe,Fe.length-ae,0,Y),ae-=Y,ae===0){Y===Q.length?(++q,ie.next?fe.head=ie.next:fe.head=fe.tail=null):(fe.head=ie,ie.data=Q.slice(Y));break}++q}return fe.length-=q,Fe}function me(ae){var fe=ae._readableState;if(fe.length>0)throw new Error('"endReadable()" called on non-empty stream');fe.endEmitted||(fe.ended=!0,p.nextTick(se,fe,ae))}function se(ae,fe){!ae.endEmitted&&ae.length===0&&(ae.endEmitted=!0,fe.readable=!1,fe.emit("end"))}function be(ae,fe){for(var Fe=0,ie=ae.length;Fe<ie;Fe++)if(ae[Fe]===fe)return Fe;return-1}}).call(this,j("_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(j,H,b){"use strict";var I=j("babel-runtime/core-js/object/create"),v=T(I);function T(o){return o&&o.__esModule?o:{default:o}}H.exports=_;var y=j("./_stream_duplex"),g=(0,v.default)(j("core-util-is"));g.inherits=j("inherits"),g.inherits(_,y);function s(o,n){var l=this._transformState;l.transforming=!1;var r=l.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));l.writechunk=null,l.writecb=null,n!=null&&this.push(n),r(o);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function _(o){if(!(this instanceof _))return new _(o);y.call(this,o),this._transformState={afterTransform:s.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,o&&(typeof o.transform=="function"&&(this._transform=o.transform),typeof o.flush=="function"&&(this._flush=o.flush)),this.on("prefinish",p)}function p(){var o=this;typeof this._flush=="function"?this._flush(function(n,l){e(o,n,l)}):e(this,null,null)}_.prototype.push=function(o,n){return this._transformState.needTransform=!1,y.prototype.push.call(this,o,n)},_.prototype._transform=function(o,n,l){throw new Error("_transform() is not implemented")},_.prototype._write=function(o,n,l){var r=this._transformState;if(r.writecb=l,r.writechunk=o,r.writeencoding=n,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},_.prototype._read=function(o){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},_.prototype._destroy=function(o,n){var l=this;y.prototype._destroy.call(this,o,function(r){n(r),l.emit("close")})};function e(o,n,l){if(n)return o.emit("error",n);if(l!=null&&o.push(l),o._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(o._transformState.transforming)throw new Error("Calling transform done when still transforming");return o.push(null)}},{"./_stream_duplex":214,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],218:[function(j,H,b){(function(I,v){"use strict";var T=j("babel-runtime/core-js/object/define-property"),y=r(T),g=j("babel-runtime/core-js/symbol/has-instance"),s=r(g),_=j("babel-runtime/core-js/symbol"),p=r(_),e=j("babel-runtime/core-js/object/create"),o=r(e),n=j("babel-runtime/core-js/set-immediate"),l=r(n);function r(pe){return pe&&pe.__esModule?pe:{default:pe}}var i=j("process-nextick-args");H.exports=M;function t(pe,me,se){this.chunk=pe,this.encoding=me,this.callback=se,this.next=null}function a(pe){var me=this;this.next=null,this.entry=null,this.finish=function(){Te(me,pe)}}var c=!I.browser&&["v0.10","v0.9."].indexOf(I.version.slice(0,5))>-1?l.default:i.nextTick,d;M.WritableState=A;var f=(0,o.default)(j("core-util-is"));f.inherits=j("inherits");var h={deprecate:j("util-deprecate")},u=j("./internal/streams/stream"),E=j("safe-buffer").Buffer,x=v.Uint8Array||function(){};function O(pe){return E.from(pe)}function C(pe){return E.isBuffer(pe)||pe instanceof x}var w=j("./internal/streams/destroy");f.inherits(M,u);function S(){}function A(pe,me){d=d||j("./_stream_duplex"),pe=pe||{};var se=me instanceof d;this.objectMode=!!pe.objectMode,se&&(this.objectMode=this.objectMode||!!pe.writableObjectMode);var be=pe.highWaterMark,ae=pe.writableHighWaterMark,fe=this.objectMode?16:16*1024;be||be===0?this.highWaterMark=be:se&&(ae||ae===0)?this.highWaterMark=ae:this.highWaterMark=fe,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=pe.decodeStrings===!1;this.decodeStrings=!Fe,this.defaultEncoding=pe.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ie){L(me,ie)},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 a(this)}A.prototype.getBuffer=function(){for(var me=this.bufferedRequest,se=[];me;)se.push(me),me=me.next;return se},function(){try{Object.defineProperty(A.prototype,"buffer",{get:h.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(pe){}}();var D;typeof p.default=="function"&&s.default&&typeof Function.prototype[s.default]=="function"?(D=Function.prototype[s.default],(0,y.default)(M,s.default,{value:function(me){return D.call(this,me)?!0:this!==M?!1:me&&me._writableState instanceof A}})):D=function(me){return me instanceof this};function M(pe){if(d=d||j("./_stream_duplex"),!D.call(M,this)&&!(this instanceof d))return new M(pe);this._writableState=new A(pe,this),this.writable=!0,pe&&(typeof pe.write=="function"&&(this._write=pe.write),typeof pe.writev=="function"&&(this._writev=pe.writev),typeof pe.destroy=="function"&&(this._destroy=pe.destroy),typeof pe.final=="function"&&(this._final=pe.final)),u.call(this)}M.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function N(pe,me){var se=new Error("write after end");pe.emit("error",se),i.nextTick(me,se)}function P(pe,me,se,be){var ae=!0,fe=!1;return se===null?fe=new TypeError("May not write null values to stream"):typeof se!="string"&&se!==void 0&&!me.objectMode&&(fe=new TypeError("Invalid non-string/buffer chunk")),fe&&(pe.emit("error",fe),i.nextTick(be,fe),ae=!1),ae}M.prototype.write=function(pe,me,se){var be=this._writableState,ae=!1,fe=!be.objectMode&&C(pe);return fe&&!E.isBuffer(pe)&&(pe=O(pe)),typeof me=="function"&&(se=me,me=null),fe?me="buffer":me||(me=be.defaultEncoding),typeof se!="function"&&(se=S),be.ended?N(this,se):(fe||P(this,be,pe,se))&&(be.pendingcb++,ae=X(this,be,fe,pe,me,se)),ae},M.prototype.cork=function(){var pe=this._writableState;pe.corked++},M.prototype.uncork=function(){var pe=this._writableState;pe.corked&&(pe.corked--,!pe.writing&&!pe.corked&&!pe.finished&&!pe.bufferProcessing&&pe.bufferedRequest&&re(this,pe))},M.prototype.setDefaultEncoding=function(me){if(typeof me=="string"&&(me=me.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((me+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+me);return this._writableState.defaultEncoding=me,this};function z(pe,me,se){return!pe.objectMode&&pe.decodeStrings!==!1&&typeof me=="string"&&(me=E.from(me,se)),me}Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function X(pe,me,se,be,ae,fe){if(!se){var Fe=z(me,be,ae);be!==Fe&&(se=!0,ae="buffer",be=Fe)}var ie=me.objectMode?1:be.length;me.length+=ie;var q=me.length<me.highWaterMark;if(q||(me.needDrain=!0),me.writing||me.corked){var Q=me.lastBufferedRequest;me.lastBufferedRequest={chunk:be,encoding:ae,isBuf:se,callback:fe,next:null},Q?Q.next=me.lastBufferedRequest:me.bufferedRequest=me.lastBufferedRequest,me.bufferedRequestCount+=1}else k(pe,me,!1,ie,be,ae,fe);return q}function k(pe,me,se,be,ae,fe,Fe){me.writelen=be,me.writecb=Fe,me.writing=!0,me.sync=!0,se?pe._writev(ae,me.onwrite):pe._write(ae,fe,me.onwrite),me.sync=!1}function F(pe,me,se,be,ae){--me.pendingcb,se?(i.nextTick(ae,be),i.nextTick(te,pe,me),pe._writableState.errorEmitted=!0,pe.emit("error",be)):(ae(be),pe._writableState.errorEmitted=!0,pe.emit("error",be),te(pe,me))}function U(pe){pe.writing=!1,pe.writecb=null,pe.length-=pe.writelen,pe.writelen=0}function L(pe,me){var se=pe._writableState,be=se.sync,ae=se.writecb;if(U(se),me)F(pe,se,be,me,ae);else{var fe=he(se);!fe&&!se.corked&&!se.bufferProcessing&&se.bufferedRequest&&re(pe,se),be?c(B,pe,se,fe,ae):B(pe,se,fe,ae)}}function B(pe,me,se,be){se||Z(pe,me),me.pendingcb--,be(),te(pe,me)}function Z(pe,me){me.length===0&&me.needDrain&&(me.needDrain=!1,pe.emit("drain"))}function re(pe,me){me.bufferProcessing=!0;var se=me.bufferedRequest;if(pe._writev&&se&&se.next){var be=me.bufferedRequestCount,ae=new Array(be),fe=me.corkedRequestsFree;fe.entry=se;for(var Fe=0,ie=!0;se;)ae[Fe]=se,se.isBuf||(ie=!1),se=se.next,Fe+=1;ae.allBuffers=ie,k(pe,me,!0,me.length,ae,"",fe.finish),me.pendingcb++,me.lastBufferedRequest=null,fe.next?(me.corkedRequestsFree=fe.next,fe.next=null):me.corkedRequestsFree=new a(me),me.bufferedRequestCount=0}else{for(;se;){var q=se.chunk,Q=se.encoding,Y=se.callback,oe=me.objectMode?1:q.length;if(k(pe,me,!1,oe,q,Q,Y),se=se.next,me.bufferedRequestCount--,me.writing)break}se===null&&(me.lastBufferedRequest=null)}me.bufferedRequest=se,me.bufferProcessing=!1}M.prototype._write=function(pe,me,se){se(new Error("_write() is not implemented"))},M.prototype._writev=null,M.prototype.end=function(pe,me,se){var be=this._writableState;typeof pe=="function"?(se=pe,pe=null,me=null):typeof me=="function"&&(se=me,me=null),pe!=null&&this.write(pe,me),be.corked&&(be.corked=1,this.uncork()),!be.ending&&!be.finished&&Re(this,be,se)};function he(pe){return pe.ending&&pe.length===0&&pe.bufferedRequest===null&&!pe.finished&&!pe.writing}function Ce(pe,me){pe._final(function(se){me.pendingcb--,se&&pe.emit("error",se),me.prefinished=!0,pe.emit("prefinish"),te(pe,me)})}function ke(pe,me){!me.prefinished&&!me.finalCalled&&(typeof pe._final=="function"?(me.pendingcb++,me.finalCalled=!0,i.nextTick(Ce,pe,me)):(me.prefinished=!0,pe.emit("prefinish")))}function te(pe,me){var se=he(me);return se&&(ke(pe,me),me.pendingcb===0&&(me.finished=!0,pe.emit("finish"))),se}function Re(pe,me,se){me.ending=!0,te(pe,me),se&&(me.finished?i.nextTick(se):pe.once("finish",se)),me.ended=!0,pe.writable=!1}function Te(pe,me,se){var be=pe.entry;for(pe.entry=null;be;){var ae=be.callback;me.pendingcb--,ae(se),be=be.next}me.corkedRequestsFree?me.corkedRequestsFree.next=pe:me.corkedRequestsFree=pe}Object.defineProperty(M.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(me){if(!this._writableState)return;this._writableState.destroyed=me}}),M.prototype.destroy=w.destroy,M.prototype._undestroy=w.undestroy,M.prototype._destroy=function(pe,me){this.end(),me(pe)}}).call(this,j("_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(j,H,b){"use strict";function I(g,s){if(!(g instanceof s))throw new TypeError("Cannot call a class as a function")}var v=j("safe-buffer").Buffer,T=j("util");function y(g,s,_){g.copy(s,_)}H.exports=function(){function g(){I(this,g),this.head=null,this.tail=null,this.length=0}return g.prototype.push=function(_){var p={data:_,next:null};this.length>0?this.tail.next=p:this.head=p,this.tail=p,++this.length},g.prototype.unshift=function(_){var p={data:_,next:this.head};this.length===0&&(this.tail=p),this.head=p,++this.length},g.prototype.shift=function(){if(this.length===0)return;var _=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,_},g.prototype.clear=function(){this.head=this.tail=null,this.length=0},g.prototype.join=function(_){if(this.length===0)return"";for(var p=this.head,e=""+p.data;p=p.next;)e+=_+p.data;return e},g.prototype.concat=function(_){if(this.length===0)return v.alloc(0);if(this.length===1)return this.head.data;for(var p=v.allocUnsafe(_>>>0),e=this.head,o=0;e;)y(e.data,p,o),o+=e.data.length,e=e.next;return p},g}(),T&&T.inspect&&T.inspect.custom&&(H.exports.prototype[T.inspect.custom]=function(){var g=T.inspect({length:this.length});return this.constructor.name+" "+g})},{"safe-buffer":228,util:71}],220:[function(j,H,b){"use strict";var I=j("process-nextick-args");function v(g,s){var _=this,p=this._readableState&&this._readableState.destroyed,e=this._writableState&&this._writableState.destroyed;return p||e?(s?s(g):g&&(!this._writableState||!this._writableState.errorEmitted)&&I.nextTick(y,this,g),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(g||null,function(o){!s&&o?(I.nextTick(y,_,o),_._writableState&&(_._writableState.errorEmitted=!0)):s&&s(o)}),this)}function T(){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(g,s){g.emit("error",s)}H.exports={destroy:v,undestroy:T}},{"process-nextick-args":207}],221:[function(j,H,b){"use strict";H.exports=j("events").EventEmitter},{events:192}],222:[function(j,H,b){H.exports=j("./readable").PassThrough},{"./readable":223}],223:[function(j,H,b){b=H.exports=j("./lib/_stream_readable.js"),b.Stream=b,b.Readable=b,b.Writable=j("./lib/_stream_writable.js"),b.Duplex=j("./lib/_stream_duplex.js"),b.Transform=j("./lib/_stream_transform.js"),b.PassThrough=j("./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(j,H,b){H.exports=j("./readable").Transform},{"./readable":223}],225:[function(j,H,b){H.exports=j("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(j,H,b){var I=function(){return this}()||Function("return this")(),v=I.regeneratorRuntime&&Object.getOwnPropertyNames(I).indexOf("regeneratorRuntime")>=0,T=v&&I.regeneratorRuntime;if(I.regeneratorRuntime=void 0,H.exports=j("./runtime"),v)I.regeneratorRuntime=T;else try{delete I.regeneratorRuntime}catch(y){I.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(j,H,b){!function(I){"use strict";var v=Object.prototype,T=v.hasOwnProperty,y,g=typeof Symbol=="function"?Symbol:{},s=g.iterator||"@@iterator",_=g.asyncIterator||"@@asyncIterator",p=g.toStringTag||"@@toStringTag",e=typeof H=="object",o=I.regeneratorRuntime;if(o){e&&(H.exports=o);return}o=I.regeneratorRuntime=e?H.exports:{};function n(X,k,F,U){var L=k&&k.prototype instanceof d?k:d,B=Object.create(L.prototype),Z=new N(U||[]);return B._invoke=S(X,F,Z),B}o.wrap=n;function l(X,k,F){try{return{type:"normal",arg:X.call(k,F)}}catch(U){return{type:"throw",arg:U}}}var r="suspendedStart",i="suspendedYield",t="executing",a="completed",c={};function d(){}function f(){}function h(){}var u={};u[s]=function(){return this};var E=Object.getPrototypeOf,x=E&&E(E(P([])));x&&x!==v&&T.call(x,s)&&(u=x);var O=h.prototype=d.prototype=Object.create(u);f.prototype=O.constructor=h,h.constructor=f,h[p]=f.displayName="GeneratorFunction";function C(X){["next","throw","return"].forEach(function(k){X[k]=function(F){return this._invoke(k,F)}})}o.isGeneratorFunction=function(X){var k=typeof X=="function"&&X.constructor;return k?k===f||(k.displayName||k.name)==="GeneratorFunction":!1},o.mark=function(X){return Object.setPrototypeOf?Object.setPrototypeOf(X,h):(X.__proto__=h,p in X||(X[p]="GeneratorFunction")),X.prototype=Object.create(O),X},o.awrap=function(X){return{__await:X}};function w(X){function k(L,B,Z,re){var he=l(X[L],X,B);if(he.type==="throw")re(he.arg);else{var Ce=he.arg,ke=Ce.value;return ke&&typeof ke=="object"&&T.call(ke,"__await")?Promise.resolve(ke.__await).then(function(te){k("next",te,Z,re)},function(te){k("throw",te,Z,re)}):Promise.resolve(ke).then(function(te){Ce.value=te,Z(Ce)},re)}}var F;function U(L,B){function Z(){return new Promise(function(re,he){k(L,B,re,he)})}return F=F?F.then(Z,Z):Z()}this._invoke=U}C(w.prototype),w.prototype[_]=function(){return this},o.AsyncIterator=w,o.async=function(X,k,F,U){var L=new w(n(X,k,F,U));return o.isGeneratorFunction(k)?L:L.next().then(function(B){return B.done?B.value:L.next()})};function S(X,k,F){var U=r;return function(B,Z){if(U===t)throw new Error("Generator is already running");if(U===a){if(B==="throw")throw Z;return z()}for(F.method=B,F.arg=Z;;){var re=F.delegate;if(re){var he=A(re,F);if(he){if(he===c)continue;return he}}if(F.method==="next")F.sent=F._sent=F.arg;else if(F.method==="throw"){if(U===r)throw U=a,F.arg;F.dispatchException(F.arg)}else F.method==="return"&&F.abrupt("return",F.arg);U=t;var Ce=l(X,k,F);if(Ce.type==="normal"){if(U=F.done?a:i,Ce.arg===c)continue;return{value:Ce.arg,done:F.done}}else Ce.type==="throw"&&(U=a,F.method="throw",F.arg=Ce.arg)}}}function A(X,k){var F=X.iterator[k.method];if(F===y){if(k.delegate=null,k.method==="throw"){if(X.iterator.return&&(k.method="return",k.arg=y,A(X,k),k.method==="throw"))return c;k.method="throw",k.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var U=l(F,X.iterator,k.arg);if(U.type==="throw")return k.method="throw",k.arg=U.arg,k.delegate=null,c;var L=U.arg;if(!L)return k.method="throw",k.arg=new TypeError("iterator result is not an object"),k.delegate=null,c;if(L.done)k[X.resultName]=L.value,k.next=X.nextLoc,k.method!=="return"&&(k.method="next",k.arg=y);else return L;return k.delegate=null,c}C(O),O[p]="Generator",O[s]=function(){return this},O.toString=function(){return"[object Generator]"};function D(X){var k={tryLoc:X[0]};1 in X&&(k.catchLoc=X[1]),2 in X&&(k.finallyLoc=X[2],k.afterLoc=X[3]),this.tryEntries.push(k)}function M(X){var k=X.completion||{};k.type="normal",delete k.arg,X.completion=k}function N(X){this.tryEntries=[{tryLoc:"root"}],X.forEach(D,this),this.reset(!0)}o.keys=function(X){var k=[];for(var F in X)k.push(F);return k.reverse(),function U(){for(;k.length;){var L=k.pop();if(L in X)return U.value=L,U.done=!1,U}return U.done=!0,U}};function P(X){if(X){var k=X[s];if(k)return k.call(X);if(typeof X.next=="function")return X;if(!isNaN(X.length)){var F=-1,U=function L(){for(;++F<X.length;)if(T.call(X,F))return L.value=X[F],L.done=!1,L;return L.value=y,L.done=!0,L};return U.next=U}}return{next:z}}o.values=P;function z(){return{value:y,done:!0}}N.prototype={constructor:N,reset:function(X){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(M),!X)for(var k in this)k.charAt(0)==="t"&&T.call(this,k)&&!isNaN(+k.slice(1))&&(this[k]=y)},stop:function(){this.done=!0;var X=this.tryEntries[0],k=X.completion;if(k.type==="throw")throw k.arg;return this.rval},dispatchException:function(X){if(this.done)throw X;var k=this;function F(he,Ce){return B.type="throw",B.arg=X,k.next=he,Ce&&(k.method="next",k.arg=y),!!Ce}for(var U=this.tryEntries.length-1;U>=0;--U){var L=this.tryEntries[U],B=L.completion;if(L.tryLoc==="root")return F("end");if(L.tryLoc<=this.prev){var Z=T.call(L,"catchLoc"),re=T.call(L,"finallyLoc");if(Z&&re){if(this.prev<L.catchLoc)return F(L.catchLoc,!0);if(this.prev<L.finallyLoc)return F(L.finallyLoc)}else if(Z){if(this.prev<L.catchLoc)return F(L.catchLoc,!0)}else if(re){if(this.prev<L.finallyLoc)return F(L.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(X,k){for(var F=this.tryEntries.length-1;F>=0;--F){var U=this.tryEntries[F];if(U.tryLoc<=this.prev&&T.call(U,"finallyLoc")&&this.prev<U.finallyLoc){var L=U;break}}L&&(X==="break"||X==="continue")&&L.tryLoc<=k&&k<=L.finallyLoc&&(L=null);var B=L?L.completion:{};return B.type=X,B.arg=k,L?(this.method="next",this.next=L.finallyLoc,c):this.complete(B)},complete:function(X,k){if(X.type==="throw")throw X.arg;return X.type==="break"||X.type==="continue"?this.next=X.arg:X.type==="return"?(this.rval=this.arg=X.arg,this.method="return",this.next="end"):X.type==="normal"&&k&&(this.next=k),c},finish:function(X){for(var k=this.tryEntries.length-1;k>=0;--k){var F=this.tryEntries[k];if(F.finallyLoc===X)return this.complete(F.completion,F.afterLoc),M(F),c}},catch:function(X){for(var k=this.tryEntries.length-1;k>=0;--k){var F=this.tryEntries[k];if(F.tryLoc===X){var U=F.completion;if(U.type==="throw"){var L=U.arg;M(F)}return L}}throw new Error("illegal catch attempt")},delegateYield:function(X,k,F){return this.delegate={iterator:P(X),resultName:k,nextLoc:F},this.method==="next"&&(this.arg=y),c}}}(function(){return this}()||Function("return this")())},{}],228:[function(j,H,b){var I=j("buffer"),v=I.Buffer;function T(g,s){for(var _ in g)s[_]=g[_]}v.from&&v.alloc&&v.allocUnsafe&&v.allocUnsafeSlow?H.exports=I:(T(I,b),b.Buffer=y);function y(g,s,_){return v(g,s,_)}T(v,y),y.from=function(g,s,_){if(typeof g=="number")throw new TypeError("Argument must not be a number");return v(g,s,_)},y.alloc=function(g,s,_){if(typeof g!="number")throw new TypeError("Argument must be a number");var p=v(g);return s!==void 0?typeof _=="string"?p.fill(s,_):p.fill(s):p.fill(0),p},y.allocUnsafe=function(g){if(typeof g!="number")throw new TypeError("Argument must be a number");return v(g)},y.allocUnsafeSlow=function(g){if(typeof g!="number")throw new TypeError("Argument must be a number");return I.SlowBuffer(g)}},{buffer:73}],229:[function(j,H,b){(function(I){"use strict";var v=j("babel-runtime/core-js/string/from-code-point"),T=i(v),y=j("babel-runtime/core-js/json/stringify"),g=i(y),s=j("babel-runtime/helpers/typeof"),_=i(s),p=j("babel-runtime/core-js/object/define-property"),e=i(p),o=j("babel-runtime/core-js/object/keys"),n=i(o),l=j("babel-runtime/core-js/object/create"),r=i(l);function i(t){return t&&t.__esModule?t:{default:t}}(function(t){t.parser=function(Q,Y){return new c(Q,Y)},t.SAXParser=c,t.SAXStream=O,t.createStream=x,t.MAX_BUFFER_LENGTH=64*1024;var a=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];t.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function c(Q,Y){if(!(this instanceof c))return new c(Q,Y);var oe=this;f(oe),oe.q=oe.c="",oe.bufferCheckPosition=t.MAX_BUFFER_LENGTH,oe.opt=Y||{},oe.opt.lowercase=oe.opt.lowercase||oe.opt.lowercasetags,oe.looseCase=oe.opt.lowercase?"toLowerCase":"toUpperCase",oe.tags=[],oe.closed=oe.closedRoot=oe.sawRoot=!1,oe.tag=oe.error=null,oe.strict=!!Q,oe.noscript=!!(Q||oe.opt.noscript),oe.state=B.BEGIN,oe.strictEntities=oe.opt.strictEntities,oe.ENTITIES=oe.strictEntities?(0,r.default)(t.XML_ENTITIES):(0,r.default)(t.ENTITIES),oe.attribList=[],oe.opt.xmlns&&(oe.ns=(0,r.default)(D)),oe.trackPosition=oe.opt.position!==!1,oe.trackPosition&&(oe.position=oe.line=oe.column=0),re(oe,"onready")}r.default||(Object.create=function(Q){function Y(){}Y.prototype=Q;var oe=new Y;return oe}),n.default||(Object.keys=function(Q){var Y=[];for(var oe in Q)Q.hasOwnProperty(oe)&&Y.push(oe);return Y});function d(Q){for(var Y=Math.max(t.MAX_BUFFER_LENGTH,10),oe=0,le=0,Ee=a.length;le<Ee;le++){var Le=Q[a[le]].length;if(Le>Y)switch(a[le]){case"textNode":Ce(Q);break;case"cdata":he(Q,"oncdata",Q.cdata),Q.cdata="";break;case"script":he(Q,"onscript",Q.script),Q.script="";break;default:te(Q,"Max buffer length exceeded: "+a[le])}oe=Math.max(oe,Le)}var ge=t.MAX_BUFFER_LENGTH-oe;Q.bufferCheckPosition=ge+Q.position}function f(Q){for(var Y=0,oe=a.length;Y<oe;Y++)Q[a[Y]]=""}function h(Q){Ce(Q),Q.cdata!==""&&(he(Q,"oncdata",Q.cdata),Q.cdata=""),Q.script!==""&&(he(Q,"onscript",Q.script),Q.script="")}c.prototype={end:function(){Re(this)},write:q,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){h(this)}};var u;try{u=j("stream").Stream}catch(Q){u=function(){}}var E=t.EVENTS.filter(function(Q){return Q!=="error"&&Q!=="end"});function x(Q,Y){return new O(Q,Y)}function O(Q,Y){if(!(this instanceof O))return new O(Q,Y);u.apply(this),this._parser=new c(Q,Y),this.writable=!0,this.readable=!0;var oe=this;this._parser.onend=function(){oe.emit("end")},this._parser.onerror=function(le){oe.emit("error",le),oe._parser.error=null},this._decoder=null,E.forEach(function(le){(0,e.default)(oe,"on"+le,{get:function(){return oe._parser["on"+le]},set:function(Le){if(!Le)return oe.removeAllListeners(le),oe._parser["on"+le]=Le,Le;oe.on(le,Le)},enumerable:!0,configurable:!1})})}O.prototype=(0,r.default)(u.prototype,{constructor:{value:O}}),O.prototype.write=function(Q){if(typeof I=="function"&&typeof I.isBuffer=="function"&&I.isBuffer(Q)){if(!this._decoder){var Y=j("string_decoder").StringDecoder;this._decoder=new Y("utf8")}Q=this._decoder.write(Q)}return this._parser.write(Q.toString()),this.emit("data",Q),!0},O.prototype.end=function(Q){return Q&&Q.length&&this.write(Q),this._parser.end(),!0},O.prototype.on=function(Q,Y){var oe=this;return!oe._parser["on"+Q]&&E.indexOf(Q)!==-1&&(oe._parser["on"+Q]=function(){var le=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);le.splice(0,0,Q),oe.emit.apply(oe,le)}),u.prototype.on.call(oe,Q,Y)};var C="[CDATA[",w="DOCTYPE",S="http://www.w3.org/XML/1998/namespace",A="http://www.w3.org/2000/xmlns/",D={xml:S,xmlns:A},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]/,N=/[:_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-]/,P=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,z=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function X(Q){return Q===" "||Q===`
|
|
|
`||Q==="\r"||Q===" "}function k(Q){return Q==='"'||Q==="'"}function F(Q){return Q===">"||X(Q)}function U(Q,Y){return Q.test(Y)}function L(Q,Y){return!U(Q,Y)}var B=0;t.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++},t.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},t.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)(t.ENTITIES).forEach(function(Q){var Y=t.ENTITIES[Q],oe=typeof Y=="number"?String.fromCharCode(Y):Y;t.ENTITIES[Q]=oe});for(var Z in t.STATE)t.STATE[t.STATE[Z]]=Z;B=t.STATE;function re(Q,Y,oe){Q[Y]&&Q[Y](oe)}function he(Q,Y,oe){Q.textNode&&Ce(Q),re(Q,Y,oe)}function Ce(Q){Q.textNode=ke(Q.opt,Q.textNode),Q.textNode&&re(Q,"ontext",Q.textNode),Q.textNode=""}function ke(Q,Y){return Q.trim&&(Y=Y.trim()),Q.normalize&&(Y=Y.replace(/\s+/g," ")),Y}function te(Q,Y){return Ce(Q),Q.trackPosition&&(Y+=`
|
|
|
Line: `+Q.line+`
|
|
|
Column: `+Q.column+`
|
|
|
Char: `+Q.c),Y=new Error(Y),Q.error=Y,re(Q,"onerror",Y),Q}function Re(Q){return Q.sawRoot&&!Q.closedRoot&&Te(Q,"Unclosed root tag"),Q.state!==B.BEGIN&&Q.state!==B.BEGIN_WHITESPACE&&Q.state!==B.TEXT&&te(Q,"Unexpected end"),Ce(Q),Q.c="",Q.closed=!0,re(Q,"onend"),c.call(Q,Q.strict,Q.opt),Q}function Te(Q,Y){if((typeof Q=="undefined"?"undefined":(0,_.default)(Q))!=="object"||!(Q instanceof c))throw new Error("bad call to strictFail");Q.strict&&te(Q,Y)}function pe(Q){Q.strict||(Q.tagName=Q.tagName[Q.looseCase]());var Y=Q.tags[Q.tags.length-1]||Q,oe=Q.tag={name:Q.tagName,attributes:{}};Q.opt.xmlns&&(oe.ns=Y.ns),Q.attribList.length=0,he(Q,"onopentagstart",oe)}function me(Q,Y){var oe=Q.indexOf(":"),le=oe<0?["",Q]:Q.split(":"),Ee=le[0],Le=le[1];return Y&&Q==="xmlns"&&(Ee="xmlns",Le=""),{prefix:Ee,local:Le}}function se(Q){if(Q.strict||(Q.attribName=Q.attribName[Q.looseCase]()),Q.attribList.indexOf(Q.attribName)!==-1||Q.tag.attributes.hasOwnProperty(Q.attribName)){Q.attribName=Q.attribValue="";return}if(Q.opt.xmlns){var Y=me(Q.attribName,!0),oe=Y.prefix,le=Y.local;if(oe==="xmlns")if(le==="xml"&&Q.attribValue!==S)Te(Q,"xml: prefix must be bound to "+S+`
|
|
|
Actual: `+Q.attribValue);else if(le==="xmlns"&&Q.attribValue!==A)Te(Q,"xmlns: prefix must be bound to "+A+`
|
|
|
Actual: `+Q.attribValue);else{var Ee=Q.tag,Le=Q.tags[Q.tags.length-1]||Q;Ee.ns===Le.ns&&(Ee.ns=(0,r.default)(Le.ns)),Ee.ns[le]=Q.attribValue}Q.attribList.push([Q.attribName,Q.attribValue])}else Q.tag.attributes[Q.attribName]=Q.attribValue,he(Q,"onattribute",{name:Q.attribName,value:Q.attribValue});Q.attribName=Q.attribValue=""}function be(Q,Y){if(Q.opt.xmlns){var oe=Q.tag,le=me(Q.tagName);oe.prefix=le.prefix,oe.local=le.local,oe.uri=oe.ns[le.prefix]||"",oe.prefix&&!oe.uri&&(Te(Q,"Unbound namespace prefix: "+(0,g.default)(Q.tagName)),oe.uri=le.prefix);var Ee=Q.tags[Q.tags.length-1]||Q;oe.ns&&Ee.ns!==oe.ns&&(0,n.default)(oe.ns).forEach(function(Ve){he(Q,"onopennamespace",{prefix:Ve,uri:oe.ns[Ve]})});for(var Le=0,ge=Q.attribList.length;Le<ge;Le++){var De=Q.attribList[Le],_e=De[0],Xe=De[1],tt=me(_e,!0),ze=tt.prefix,Me=tt.local,Et=ze===""?"":oe.ns[ze]||"",Oe={name:_e,value:Xe,prefix:ze,local:Me,uri:Et};ze&&ze!=="xmlns"&&!Et&&(Te(Q,"Unbound namespace prefix: "+(0,g.default)(ze)),Oe.uri=ze),Q.tag.attributes[_e]=Oe,he(Q,"onattribute",Oe)}Q.attribList.length=0}Q.tag.isSelfClosing=!!Y,Q.sawRoot=!0,Q.tags.push(Q.tag),he(Q,"onopentag",Q.tag),Y||(!Q.noscript&&Q.tagName.toLowerCase()==="script"?Q.state=B.SCRIPT:Q.state=B.TEXT,Q.tag=null,Q.tagName=""),Q.attribName=Q.attribValue="",Q.attribList.length=0}function ae(Q){if(!Q.tagName){Te(Q,"Weird empty close tag."),Q.textNode+="</>",Q.state=B.TEXT;return}if(Q.script){if(Q.tagName!=="script"){Q.script+="</"+Q.tagName+">",Q.tagName="",Q.state=B.SCRIPT;return}he(Q,"onscript",Q.script),Q.script=""}var Y=Q.tags.length,oe=Q.tagName;Q.strict||(oe=oe[Q.looseCase]());for(var le=oe;Y--;){var Ee=Q.tags[Y];if(Ee.name!==le)Te(Q,"Unexpected close tag");else break}if(Y<0){Te(Q,"Unmatched closing tag: "+Q.tagName),Q.textNode+="</"+Q.tagName+">",Q.state=B.TEXT;return}Q.tagName=oe;for(var Le=Q.tags.length;Le-- >Y;){var ge=Q.tag=Q.tags.pop();Q.tagName=Q.tag.name,he(Q,"onclosetag",Q.tagName);var De={};for(var _e in ge.ns)De[_e]=ge.ns[_e];var Xe=Q.tags[Q.tags.length-1]||Q;Q.opt.xmlns&&ge.ns!==Xe.ns&&(0,n.default)(ge.ns).forEach(function(tt){var ze=ge.ns[tt];he(Q,"onclosenamespace",{prefix:tt,uri:ze})})}Y===0&&(Q.closedRoot=!0),Q.tagName=Q.attribValue=Q.attribName="",Q.attribList.length=0,Q.state=B.TEXT}function fe(Q){var Y=Q.entity,oe=Y.toLowerCase(),le,Ee="";return Q.ENTITIES[Y]?Q.ENTITIES[Y]:Q.ENTITIES[oe]?Q.ENTITIES[oe]:(Y=oe,Y.charAt(0)==="#"&&(Y.charAt(1)==="x"?(Y=Y.slice(2),le=parseInt(Y,16),Ee=le.toString(16)):(Y=Y.slice(1),le=parseInt(Y,10),Ee=le.toString(10))),Y=Y.replace(/^0+/,""),isNaN(le)||Ee.toLowerCase()!==Y?(Te(Q,"Invalid character entity"),"&"+Q.entity+";"):(0,T.default)(le))}function Fe(Q,Y){Y==="<"?(Q.state=B.OPEN_WAKA,Q.startTagPosition=Q.position):X(Y)||(Te(Q,"Non-whitespace before first tag."),Q.textNode=Y,Q.state=B.TEXT)}function ie(Q,Y){var oe="";return Y<Q.length&&(oe=Q.charAt(Y)),oe}function q(Q){var Y=this;if(this.error)throw this.error;if(Y.closed)return te(Y,"Cannot write after close. Assign an onready handler.");if(Q===null)return Re(Y);(typeof Q=="undefined"?"undefined":(0,_.default)(Q))==="object"&&(Q=Q.toString());for(var oe=0,le="";!(le=ie(Q,oe++),Y.c=le,!le);){Y.trackPosition&&(Y.position++,le===`
|
|
|
`?(Y.line++,Y.column=0):Y.column++);switch(Y.state){case B.BEGIN:if(Y.state=B.BEGIN_WHITESPACE,le==="\uFEFF")continue;Fe(Y,le);continue;case B.BEGIN_WHITESPACE:Fe(Y,le);continue;case B.TEXT:if(Y.sawRoot&&!Y.closedRoot){for(var Ee=oe-1;le&&le!=="<"&&le!=="&";)le=ie(Q,oe++),le&&Y.trackPosition&&(Y.position++,le===`
|
|
|
`?(Y.line++,Y.column=0):Y.column++);Y.textNode+=Q.substring(Ee,oe-1)}le==="<"&&!(Y.sawRoot&&Y.closedRoot&&!Y.strict)?(Y.state=B.OPEN_WAKA,Y.startTagPosition=Y.position):(!X(le)&&(!Y.sawRoot||Y.closedRoot)&&Te(Y,"Text data outside of root node."),le==="&"?Y.state=B.TEXT_ENTITY:Y.textNode+=le);continue;case B.SCRIPT:le==="<"?Y.state=B.SCRIPT_ENDING:Y.script+=le;continue;case B.SCRIPT_ENDING:le==="/"?Y.state=B.CLOSE_TAG:(Y.script+="<"+le,Y.state=B.SCRIPT);continue;case B.OPEN_WAKA:if(le==="!")Y.state=B.SGML_DECL,Y.sgmlDecl="";else if(!X(le))if(U(M,le))Y.state=B.OPEN_TAG,Y.tagName=le;else if(le==="/")Y.state=B.CLOSE_TAG,Y.tagName="";else if(le==="?")Y.state=B.PROC_INST,Y.procInstName=Y.procInstBody="";else{if(Te(Y,"Unencoded <"),Y.startTagPosition+1<Y.position){var Le=Y.position-Y.startTagPosition;le=new Array(Le).join(" ")+le}Y.textNode+="<"+le,Y.state=B.TEXT}continue;case B.SGML_DECL:(Y.sgmlDecl+le).toUpperCase()===C?(he(Y,"onopencdata"),Y.state=B.CDATA,Y.sgmlDecl="",Y.cdata=""):Y.sgmlDecl+le==="--"?(Y.state=B.COMMENT,Y.comment="",Y.sgmlDecl=""):(Y.sgmlDecl+le).toUpperCase()===w?(Y.state=B.DOCTYPE,(Y.doctype||Y.sawRoot)&&Te(Y,"Inappropriately located doctype declaration"),Y.doctype="",Y.sgmlDecl=""):le===">"?(he(Y,"onsgmldeclaration",Y.sgmlDecl),Y.sgmlDecl="",Y.state=B.TEXT):(k(le)&&(Y.state=B.SGML_DECL_QUOTED),Y.sgmlDecl+=le);continue;case B.SGML_DECL_QUOTED:le===Y.q&&(Y.state=B.SGML_DECL,Y.q=""),Y.sgmlDecl+=le;continue;case B.DOCTYPE:le===">"?(Y.state=B.TEXT,he(Y,"ondoctype",Y.doctype),Y.doctype=!0):(Y.doctype+=le,le==="["?Y.state=B.DOCTYPE_DTD:k(le)&&(Y.state=B.DOCTYPE_QUOTED,Y.q=le));continue;case B.DOCTYPE_QUOTED:Y.doctype+=le,le===Y.q&&(Y.q="",Y.state=B.DOCTYPE);continue;case B.DOCTYPE_DTD:Y.doctype+=le,le==="]"?Y.state=B.DOCTYPE:k(le)&&(Y.state=B.DOCTYPE_DTD_QUOTED,Y.q=le);continue;case B.DOCTYPE_DTD_QUOTED:Y.doctype+=le,le===Y.q&&(Y.state=B.DOCTYPE_DTD,Y.q="");continue;case B.COMMENT:le==="-"?Y.state=B.COMMENT_ENDING:Y.comment+=le;continue;case B.COMMENT_ENDING:le==="-"?(Y.state=B.COMMENT_ENDED,Y.comment=ke(Y.opt,Y.comment),Y.comment&&he(Y,"oncomment",Y.comment),Y.comment=""):(Y.comment+="-"+le,Y.state=B.COMMENT);continue;case B.COMMENT_ENDED:le!==">"?(Te(Y,"Malformed comment"),Y.comment+="--"+le,Y.state=B.COMMENT):Y.state=B.TEXT;continue;case B.CDATA:le==="]"?Y.state=B.CDATA_ENDING:Y.cdata+=le;continue;case B.CDATA_ENDING:le==="]"?Y.state=B.CDATA_ENDING_2:(Y.cdata+="]"+le,Y.state=B.CDATA);continue;case B.CDATA_ENDING_2:le===">"?(Y.cdata&&he(Y,"oncdata",Y.cdata),he(Y,"onclosecdata"),Y.cdata="",Y.state=B.TEXT):le==="]"?Y.cdata+="]":(Y.cdata+="]]"+le,Y.state=B.CDATA);continue;case B.PROC_INST:le==="?"?Y.state=B.PROC_INST_ENDING:X(le)?Y.state=B.PROC_INST_BODY:Y.procInstName+=le;continue;case B.PROC_INST_BODY:if(!Y.procInstBody&&X(le))continue;le==="?"?Y.state=B.PROC_INST_ENDING:Y.procInstBody+=le;continue;case B.PROC_INST_ENDING:le===">"?(he(Y,"onprocessinginstruction",{name:Y.procInstName,body:Y.procInstBody}),Y.procInstName=Y.procInstBody="",Y.state=B.TEXT):(Y.procInstBody+="?"+le,Y.state=B.PROC_INST_BODY);continue;case B.OPEN_TAG:U(N,le)?Y.tagName+=le:(pe(Y),le===">"?be(Y):le==="/"?Y.state=B.OPEN_TAG_SLASH:(X(le)||Te(Y,"Invalid character in tag name"),Y.state=B.ATTRIB));continue;case B.OPEN_TAG_SLASH:le===">"?(be(Y,!0),ae(Y)):(Te(Y,"Forward-slash in opening tag not followed by >"),Y.state=B.ATTRIB);continue;case B.ATTRIB:if(X(le))continue;le===">"?be(Y):le==="/"?Y.state=B.OPEN_TAG_SLASH:U(M,le)?(Y.attribName=le,Y.attribValue="",Y.state=B.ATTRIB_NAME):Te(Y,"Invalid attribute name");continue;case B.ATTRIB_NAME:le==="="?Y.state=B.ATTRIB_VALUE:le===">"?(Te(Y,"Attribute without value"),Y.attribValue=Y.attribName,se(Y),be(Y)):X(le)?Y.state=B.ATTRIB_NAME_SAW_WHITE:U(N,le)?Y.attribName+=le:Te(Y,"Invalid attribute name");continue;case B.ATTRIB_NAME_SAW_WHITE:if(le==="=")Y.state=B.ATTRIB_VALUE;else{if(X(le))continue;Te(Y,"Attribute without value"),Y.tag.attributes[Y.attribName]="",Y.attribValue="",he(Y,"onattribute",{name:Y.attribName,value:""}),Y.attribName="",le===">"?be(Y):U(M,le)?(Y.attribName=le,Y.state=B.ATTRIB_NAME):(Te(Y,"Invalid attribute name"),Y.state=B.ATTRIB)}continue;case B.ATTRIB_VALUE:if(X(le))continue;k(le)?(Y.q=le,Y.state=B.ATTRIB_VALUE_QUOTED):(Te(Y,"Unquoted attribute value"),Y.state=B.ATTRIB_VALUE_UNQUOTED,Y.attribValue=le);continue;case B.ATTRIB_VALUE_QUOTED:if(le!==Y.q){le==="&"?Y.state=B.ATTRIB_VALUE_ENTITY_Q:Y.attribValue+=le;continue}se(Y),Y.q="",Y.state=B.ATTRIB_VALUE_CLOSED;continue;case B.ATTRIB_VALUE_CLOSED:X(le)?Y.state=B.ATTRIB:le===">"?be(Y):le==="/"?Y.state=B.OPEN_TAG_SLASH:U(M,le)?(Te(Y,"No whitespace between attributes"),Y.attribName=le,Y.attribValue="",Y.state=B.ATTRIB_NAME):Te(Y,"Invalid attribute name");continue;case B.ATTRIB_VALUE_UNQUOTED:if(!F(le)){le==="&"?Y.state=B.ATTRIB_VALUE_ENTITY_U:Y.attribValue+=le;continue}se(Y),le===">"?be(Y):Y.state=B.ATTRIB;continue;case B.CLOSE_TAG:if(Y.tagName)le===">"?ae(Y):U(N,le)?Y.tagName+=le:Y.script?(Y.script+="</"+Y.tagName,Y.tagName="",Y.state=B.SCRIPT):(X(le)||Te(Y,"Invalid tagname in closing tag"),Y.state=B.CLOSE_TAG_SAW_WHITE);else{if(X(le))continue;L(M,le)?Y.script?(Y.script+="</"+le,Y.state=B.SCRIPT):Te(Y,"Invalid tagname in closing tag."):Y.tagName=le}continue;case B.CLOSE_TAG_SAW_WHITE:if(X(le))continue;le===">"?ae(Y):Te(Y,"Invalid characters in closing tag");continue;case B.TEXT_ENTITY:case B.ATTRIB_VALUE_ENTITY_Q:case B.ATTRIB_VALUE_ENTITY_U:var ge,De;switch(Y.state){case B.TEXT_ENTITY:ge=B.TEXT,De="textNode";break;case B.ATTRIB_VALUE_ENTITY_Q:ge=B.ATTRIB_VALUE_QUOTED,De="attribValue";break;case B.ATTRIB_VALUE_ENTITY_U:ge=B.ATTRIB_VALUE_UNQUOTED,De="attribValue";break}le===";"?(Y[De]+=fe(Y),Y.entity="",Y.state=ge):U(Y.entity.length?z:P,le)?Y.entity+=le:(Te(Y,"Invalid character in entity name"),Y[De]+="&"+Y.entity+le,Y.entity="",Y.state=ge);continue;default:throw new Error(Y,"Unknown state: "+Y.state)}}return Y.position>=Y.bufferCheckPosition&&d(Y),Y}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */T.default||function(){var Q=String.fromCharCode,Y=Math.floor,oe=function(){var Ee=16384,Le=[],ge,De,_e=-1,Xe=arguments.length;if(!Xe)return"";for(var tt="";++_e<Xe;){var ze=Number(arguments[_e]);if(!isFinite(ze)||ze<0||ze>1114111||Y(ze)!==ze)throw RangeError("Invalid code point: "+ze);ze<=65535?Le.push(ze):(ze-=65536,ge=(ze>>10)+55296,De=ze%1024+56320,Le.push(ge,De)),(_e+1===Xe||Le.length>Ee)&&(tt+=Q.apply(null,Le),Le.length=0)}return tt};e.default?Object.defineProperty(String,"fromCodePoint",{value:oe,configurable:!0,writable:!0}):String.fromCodePoint=oe}()})(typeof b=="undefined"?(void 0).sax={}:b)}).call(this,j("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(j,H,b){H.exports=T;var I=j("events").EventEmitter,v=j("inherits");v(T,I),T.Readable=j("readable-stream/readable.js"),T.Writable=j("readable-stream/writable.js"),T.Duplex=j("readable-stream/duplex.js"),T.Transform=j("readable-stream/transform.js"),T.PassThrough=j("readable-stream/passthrough.js"),T.Stream=T;function T(){I.call(this)}T.prototype.pipe=function(y,g){var s=this;function _(i){y.writable&&(y.write(i)===!1&&s.pause&&s.pause())}s.on("data",_);function p(){s.readable&&s.resume&&s.resume()}y.on("drain",p),!y._isStdio&&(!g||g.end!==!1)&&(s.on("end",o),s.on("close",n));var e=!1;function o(){if(e)return;e=!0,y.end()}function n(){if(e)return;e=!0,typeof y.destroy=="function"&&y.destroy()}function l(i){if(r(),I.listenerCount(this,"error")===0)throw i}s.on("error",l),y.on("error",l);function r(){s.removeListener("data",_),y.removeListener("drain",p),s.removeListener("end",o),s.removeListener("close",n),s.removeListener("error",l),y.removeListener("error",l),s.removeListener("end",r),s.removeListener("close",r),y.removeListener("close",r)}return s.on("end",r),s.on("close",r),y.on("close",r),y.emit("pipe",s),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(j,H,b){(function(I){var v=j("./lib/request"),T=j("./lib/response"),y=j("xtend"),g=j("builtin-status-codes"),s=j("url"),_=b;_.request=function(p,e){typeof p=="string"?p=s.parse(p):p=y(p);var o=I.location.protocol.search(/^https?:$/)===-1?"http:":"",n=p.protocol||o,l=p.hostname||p.host,r=p.port,i=p.path||"/";l&&l.indexOf(":")!==-1&&(l="["+l+"]"),p.url=(l?n+"//"+l:"")+(r?":"+r:"")+i,p.method=(p.method||"GET").toUpperCase(),p.headers=p.headers||{};var t=new v(p);return e&&t.on("response",e),t},_.get=function(e,o){var n=_.request(e,o);return n.end(),n},_.ClientRequest=v,_.IncomingMessage=T.IncomingMessage,_.Agent=function(){},_.Agent.defaultMaxSockets=4,_.globalAgent=new _.Agent,_.STATUS_CODES=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(j,H,b){(function(I){"use strict";b.fetch=_(I.fetch)&&_(I.ReadableStream),b.writableStream=_(I.WritableStream),b.abortController=_(I.AbortController),b.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),b.blobConstructor=!0}catch(p){}var v;function T(){if(v!==void 0)return v;if(I.XMLHttpRequest){v=new I.XMLHttpRequest;try{v.open("GET",I.XDomainRequest?"/":"https://example.com")}catch(p){v=null}}else v=null;return v}function y(p){var e=T();if(!e)return!1;try{return e.responseType=p,e.responseType===p}catch(o){}return!1}var g=typeof I.ArrayBuffer!="undefined",s=g&&_(I.ArrayBuffer.prototype.slice);b.arraybuffer=b.fetch||g&&y("arraybuffer"),b.msstream=!b.fetch&&s&&y("ms-stream"),b.mozchunkedarraybuffer=!b.fetch&&g&&y("moz-chunked-arraybuffer"),b.overrideMimeType=b.fetch||(T()?_(T().overrideMimeType):!1),b.vbArray=_(I.VBArray);function _(p){return typeof p=="function"}v=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(j,H,b){(function(I,v,T){"use strict";var y=j("babel-runtime/core-js/object/keys"),g=s(y);function s(d){return d&&d.__esModule?d:{default:d}}var _=j("./capability"),p=j("inherits"),e=j("./response"),o=j("readable-stream"),n=j("to-arraybuffer"),l=e.IncomingMessage,r=e.readyStates;function i(d,f){return _.fetch&&f?"fetch":_.mozchunkedarraybuffer?"moz-chunked-arraybuffer":_.msstream?"ms-stream":_.arraybuffer&&d?"arraybuffer":_.vbArray&&d?"text:vbarray":"text"}var t=H.exports=function(d){var f=this;o.Writable.call(f),f._opts=d,f._body=[],f._headers={},d.auth&&f.setHeader("Authorization","Basic "+new T(d.auth).toString("base64")),(0,g.default)(d.headers).forEach(function(E){f.setHeader(E,d.headers[E])});var h,u=!0;if(d.mode==="disable-fetch"||"requestTimeout"in d&&!_.abortController)u=!1,h=!0;else if(d.mode==="prefer-streaming")h=!1;else if(d.mode==="allow-wrong-content-type")h=!_.overrideMimeType;else if(!d.mode||d.mode==="default"||d.mode==="prefer-fast")h=!0;else throw new Error("Invalid value for opts.mode");f._mode=i(h,u),f._fetchTimer=null,f.on("finish",function(){f._onFinish()})};p(t,o.Writable),t.prototype.setHeader=function(d,f){var h=this,u=d.toLowerCase();if(c.indexOf(u)!==-1)return;h._headers[u]={name:d,value:f}},t.prototype.getHeader=function(d){var f=this._headers[d.toLowerCase()];return f?f.value:null},t.prototype.removeHeader=function(d){var f=this;delete f._headers[d.toLowerCase()]},t.prototype._onFinish=function(){var d=this;if(d._destroyed)return;var f=d._opts,h=d._headers,u=null;f.method!=="GET"&&f.method!=="HEAD"&&(_.arraybuffer?u=n(T.concat(d._body)):_.blobConstructor?u=new v.Blob(d._body.map(function(S){return n(S)}),{type:(h["content-type"]||{}).value||""}):u=T.concat(d._body).toString());var E=[];if((0,g.default)(h).forEach(function(S){var A=h[S].name,D=h[S].value;Array.isArray(D)?D.forEach(function(M){E.push([A,M])}):E.push([A,D])}),d._mode==="fetch"){var x=null,O=null;if(_.abortController){var C=new AbortController;x=C.signal,d._fetchAbortController=C,"requestTimeout"in f&&f.requestTimeout!==0&&(d._fetchTimer=v.setTimeout(function(){d.emit("requestTimeout"),d._fetchAbortController&&d._fetchAbortController.abort()},f.requestTimeout))}v.fetch(d._opts.url,{method:d._opts.method,headers:E,body:u||void 0,mode:"cors",credentials:f.withCredentials?"include":"same-origin",signal:x}).then(function(S){d._fetchResponse=S,d._connect()},function(S){v.clearTimeout(d._fetchTimer),d._destroyed||d.emit("error",S)})}else{var w=d._xhr=new v.XMLHttpRequest;try{w.open(d._opts.method,d._opts.url,!0)}catch(S){I.nextTick(function(){d.emit("error",S)});return}"responseType"in w&&(w.responseType=d._mode.split(":")[0]),"withCredentials"in w&&(w.withCredentials=!!f.withCredentials),d._mode==="text"&&"overrideMimeType"in w&&w.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in f&&(w.timeout=f.requestTimeout,w.ontimeout=function(){d.emit("requestTimeout")}),E.forEach(function(S){w.setRequestHeader(S[0],S[1])}),d._response=null,w.onreadystatechange=function(){switch(w.readyState){case r.LOADING:case r.DONE:d._onXHRProgress();break}},d._mode==="moz-chunked-arraybuffer"&&(w.onprogress=function(){d._onXHRProgress()}),w.onerror=function(){if(d._destroyed)return;d.emit("error",new Error("XHR error"))};try{w.send(u)}catch(S){I.nextTick(function(){d.emit("error",S)});return}}};function a(d){try{var f=d.status;return f!==null&&f!==0}catch(h){return!1}}t.prototype._onXHRProgress=function(){var d=this;if(!a(d._xhr)||d._destroyed)return;d._response||d._connect(),d._response._onXHRProgress()},t.prototype._connect=function(){var d=this;if(d._destroyed)return;d._response=new l(d._xhr,d._fetchResponse,d._mode,d._fetchTimer),d._response.on("error",function(f){d.emit("error",f)}),d.emit("response",d._response)},t.prototype._write=function(d,f,h){var u=this;u._body.push(d),h()},t.prototype.abort=t.prototype.destroy=function(){var d=this;d._destroyed=!0,v.clearTimeout(d._fetchTimer),d._response&&(d._response._destroyed=!0),d._xhr?d._xhr.abort():d._fetchAbortController&&d._fetchAbortController.abort()},t.prototype.end=function(d,f,h){var u=this;typeof d=="function"&&(h=d,d=void 0),o.Writable.prototype.end.call(u,d,f,h)},t.prototype.flushHeaders=function(){},t.prototype.setTimeout=function(){},t.prototype.setNoDelay=function(){},t.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,j("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},j("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(j,H,b){(function(I,v,T){"use strict";var y=j("babel-runtime/core-js/promise"),g=s(y);function s(l){return l&&l.__esModule?l:{default:l}}var _=j("./capability"),p=j("inherits"),e=j("readable-stream"),o=b.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},n=b.IncomingMessage=function(l,r,i,t){var a=this;if(e.Readable.call(a),a._mode=i,a.headers={},a.rawHeaders=[],a.trailers={},a.rawTrailers=[],a.on("end",function(){I.nextTick(function(){a.emit("close")})}),i==="fetch"){var c=function x(){f.read().then(function(O){if(a._destroyed)return;if(O.done){v.clearTimeout(t),a.push(null);return}a.push(new T(O.value)),x()}).catch(function(O){v.clearTimeout(t),a._destroyed||a.emit("error",O)})};if(a._fetchResponse=r,a.url=r.url,a.statusCode=r.status,a.statusMessage=r.statusText,r.headers.forEach(function(x,O){a.headers[O.toLowerCase()]=x,a.rawHeaders.push(O,x)}),_.writableStream){var d=new WritableStream({write:function(O){return new g.default(function(C,w){a._destroyed?w():a.push(new T(O))?C():a._resumeFetch=C})},close:function(){v.clearTimeout(t),a._destroyed||a.push(null)},abort:function(O){a._destroyed||a.emit("error",O)}});try{r.body.pipeTo(d).catch(function(x){v.clearTimeout(t),a._destroyed||a.emit("error",x)});return}catch(x){}}var f=r.body.getReader();c()}else{a._xhr=l,a._pos=0,a.url=l.responseURL,a.statusCode=l.status,a.statusMessage=l.statusText;var h=l.getAllResponseHeaders().split(/\r?\n/);if(h.forEach(function(x){var O=x.match(/^([^:]+):\s*(.*)/);if(O){var C=O[1].toLowerCase();C==="set-cookie"?(a.headers[C]===void 0&&(a.headers[C]=[]),a.headers[C].push(O[2])):a.headers[C]!==void 0?a.headers[C]+=", "+O[2]:a.headers[C]=O[2],a.rawHeaders.push(O[1],O[2])}}),a._charset="x-user-defined",!_.overrideMimeType){var u=a.rawHeaders["mime-type"];if(u){var E=u.match(/;\s*charset=([^;])(;|$)/);E&&(a._charset=E[1].toLowerCase())}a._charset||(a._charset="utf-8")}}};p(n,e.Readable),n.prototype._read=function(){var l=this,r=l._resumeFetch;r&&(l._resumeFetch=null,r())},n.prototype._onXHRProgress=function(){var l=this,r=l._xhr,i=null;switch(l._mode){case"text:vbarray":if(r.readyState!==o.DONE)break;try{i=new v.VBArray(r.responseBody).toArray()}catch(f){}if(i!==null){l.push(new T(i));break}case"text":try{i=r.responseText}catch(f){l._mode="text:vbarray";break}if(i.length>l._pos){var t=i.substr(l._pos);if(l._charset==="x-user-defined"){for(var a=new T(t.length),c=0;c<t.length;c++)a[c]=t.charCodeAt(c)&255;l.push(a)}else l.push(t,l._charset);l._pos=i.length}break;case"arraybuffer":if(r.readyState!==o.DONE||!r.response)break;i=r.response,l.push(new T(new Uint8Array(i)));break;case"moz-chunked-arraybuffer":if(i=r.response,r.readyState!==o.LOADING||!i)break;l.push(new T(new Uint8Array(i)));break;case"ms-stream":if(i=r.response,r.readyState!==o.LOADING)break;var d=new v.MSStreamReader;d.onprogress=function(){d.result.byteLength>l._pos&&(l.push(new T(new Uint8Array(d.result.slice(l._pos)))),l._pos=d.result.byteLength)},d.onload=function(){l.push(null)},d.readAsArrayBuffer(i);break}l._xhr.readyState===o.DONE&&l._mode!=="ms-stream"&&l.push(null)}}).call(this,j("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},j("buffer").Buffer)},{"./capability":232,_process:208,"babel-runtime/core-js/promise":61,buffer:73,inherits:196,"readable-stream":223}],235:[function(j,H,b){"use strict";var I=j("safe-buffer").Buffer,v=I.isEncoding||function(d){d=""+d;switch(d&&d.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 T(d){if(!d)return"utf8";for(var f;;)switch(d){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 d;default:if(f)return;d=(""+d).toLowerCase(),f=!0}}function y(d){var f=T(d);if(typeof f!="string"&&(I.isEncoding===v||!v(d)))throw new Error("Unknown encoding: "+d);return f||d}b.StringDecoder=g;function g(d){this.encoding=y(d);var f;switch(this.encoding){case"utf16le":this.text=l,this.end=r,f=4;break;case"utf8":this.fillLast=e,f=4;break;case"base64":this.text=i,this.end=t,f=3;break;default:this.write=a,this.end=c;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=I.allocUnsafe(f)}g.prototype.write=function(d){if(d.length===0)return"";var f,h;if(this.lastNeed){if(f=this.fillLast(d),f===void 0)return"";h=this.lastNeed,this.lastNeed=0}else h=0;return h<d.length?f?f+this.text(d,h):this.text(d,h):f||""},g.prototype.end=n,g.prototype.text=o,g.prototype.fillLast=function(d){if(this.lastNeed<=d.length)return d.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);d.copy(this.lastChar,this.lastTotal-this.lastNeed,0,d.length),this.lastNeed-=d.length};function s(d){return d<=127?0:d>>5===6?2:d>>4===14?3:d>>3===30?4:d>>6===2?-1:-2}function _(d,f,h){var u=f.length-1;if(u<h)return 0;var E=s(f[u]);return E>=0?(E>0&&(d.lastNeed=E-1),E):--u<h||E===-2?0:(E=s(f[u]),E>=0?(E>0&&(d.lastNeed=E-2),E):--u<h||E===-2?0:(E=s(f[u]),E>=0?(E>0&&(E===2?E=0:d.lastNeed=E-3),E):0))}function p(d,f,h){if((f[0]&192)!==128)return d.lastNeed=0,"\uFFFD";if(d.lastNeed>1&&f.length>1){if((f[1]&192)!==128)return d.lastNeed=1,"\uFFFD";if(d.lastNeed>2&&f.length>2&&(f[2]&192)!==128)return d.lastNeed=2,"\uFFFD"}}function e(d){var f=this.lastTotal-this.lastNeed,h=p(this,d,f);if(h!==void 0)return h;if(this.lastNeed<=d.length)return d.copy(this.lastChar,f,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);d.copy(this.lastChar,f,0,d.length),this.lastNeed-=d.length}function o(d,f){var h=_(this,d,f);if(!this.lastNeed)return d.toString("utf8",f);this.lastTotal=h;var u=d.length-(h-this.lastNeed);return d.copy(this.lastChar,0,u),d.toString("utf8",f,u)}function n(d){var f=d&&d.length?this.write(d):"";return this.lastNeed?f+"\uFFFD":f}function l(d,f){if((d.length-f)%2===0){var h=d.toString("utf16le",f);if(h){var u=h.charCodeAt(h.length-1);if(u>=55296&&u<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=d[d.length-2],this.lastChar[1]=d[d.length-1],h.slice(0,-1)}return h}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=d[d.length-1],d.toString("utf16le",f,d.length-1)}function r(d){var f=d&&d.length?this.write(d):"";if(this.lastNeed){var h=this.lastTotal-this.lastNeed;return f+this.lastChar.toString("utf16le",0,h)}return f}function i(d,f){var h=(d.length-f)%3;return h===0?d.toString("base64",f):(this.lastNeed=3-h,this.lastTotal=3,h===1?this.lastChar[0]=d[d.length-1]:(this.lastChar[0]=d[d.length-2],this.lastChar[1]=d[d.length-1]),d.toString("base64",f,d.length-h))}function t(d){var f=d&&d.length?this.write(d):"";return this.lastNeed?f+this.lastChar.toString("base64",0,3-this.lastNeed):f}function a(d){return d.toString(this.encoding)}function c(d){return d&&d.length?this.write(d):""}},{"safe-buffer":228}],236:[function(j,H,b){(function(I,v){var T=j("process/browser.js").nextTick,y=Function.prototype.apply,g=Array.prototype.slice,s={},_=0;b.setTimeout=function(){return new p(y.call(setTimeout,window,arguments),clearTimeout)},b.setInterval=function(){return new p(y.call(setInterval,window,arguments),clearInterval)},b.clearTimeout=b.clearInterval=function(e){e.close()};function p(e,o){this._id=e,this._clearFn=o}p.prototype.unref=p.prototype.ref=function(){},p.prototype.close=function(){this._clearFn.call(window,this._id)},b.enroll=function(e,o){clearTimeout(e._idleTimeoutId),e._idleTimeout=o},b.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},b._unrefActive=b.active=function(e){clearTimeout(e._idleTimeoutId);var o=e._idleTimeout;o>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},o))},b.setImmediate=typeof I=="function"?I:function(e){var o=_++,n=arguments.length<2?!1:g.call(arguments,1);return s[o]=!0,T(function(){s[o]&&(n?e.apply(null,n):e.call(null),b.clearImmediate(o))}),o},b.clearImmediate=typeof v=="function"?v:function(e){delete s[e]}}).call(this,j("timers").setImmediate,j("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(j,H,b){var I=j("buffer").Buffer;H.exports=function(v){if(v instanceof Uint8Array){if(v.byteOffset===0&&v.byteLength===v.buffer.byteLength)return v.buffer;if(typeof v.buffer.slice=="function")return v.buffer.slice(v.byteOffset,v.byteOffset+v.byteLength)}if(I.isBuffer(v)){for(var T=new Uint8Array(v.length),y=v.length,g=0;g<y;g++)T[g]=v[g];return T.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:73}],238:[function(j,H,b){"use strict";var I=j("punycode"),v=j("./util");b.parse=f,b.resolve=u,b.resolveObject=E,b.format=h,b.Url=T;function T(){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,g=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,_=["<",">",'"',"`"," ","\r",`
|
|
|
`," "],p=["{","}","|","\\","^","`"].concat(_),e=["'"].concat(p),o=["%","/","?",";","#"].concat(e),n=["/","?","#"],l=255,r=/^[+a-z0-9A-Z_-]{0,63}$/,i=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,t={javascript:!0,"javascript:":!0},a={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},d=j("querystring");function f(x,O,C){if(x&&v.isObject(x)&&x instanceof T)return x;var w=new T;return w.parse(x,O,C),w}T.prototype.parse=function(x,O,C){if(!v.isString(x))throw new TypeError("Parameter 'url' must be a string, not "+typeof x);var w=x.indexOf("?"),S=w!==-1&&w<x.indexOf("#")?"?":"#",A=x.split(S),D=/\\/g;A[0]=A[0].replace(D,"/"),x=A.join(S);var M=x;if(M=M.trim(),!C&&x.split("#").length===1){var N=s.exec(M);if(N)return this.path=M,this.href=M,this.pathname=N[1],N[2]?(this.search=N[2],O?this.query=d.parse(this.search.substr(1)):this.query=this.search.substr(1)):O&&(this.search="",this.query={}),this}var P=y.exec(M);if(P){P=P[0];var z=P.toLowerCase();this.protocol=z,M=M.substr(P.length)}if(C||P||M.match(/^\/\/[^@\/]+@[^@\/]+/)){var X=M.substr(0,2)==="//";X&&!(P&&a[P])&&(M=M.substr(2),this.slashes=!0)}if(!a[P]&&(X||P&&!c[P])){for(var k=-1,F=0;F<n.length;F++){var U=M.indexOf(n[F]);U!==-1&&(k===-1||U<k)&&(k=U)}var L,B;k===-1?B=M.lastIndexOf("@"):B=M.lastIndexOf("@",k),B!==-1&&(L=M.slice(0,B),M=M.slice(B+1),this.auth=decodeURIComponent(L)),k=-1;for(var F=0;F<o.length;F++){var U=M.indexOf(o[F]);U!==-1&&(k===-1||U<k)&&(k=U)}k===-1&&(k=M.length),this.host=M.slice(0,k),M=M.slice(k),this.parseHost(),this.hostname=this.hostname||"";var Z=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!Z)for(var re=this.hostname.split(/\./),F=0,he=re.length;F<he;F++){var Ce=re[F];if(!Ce)continue;if(!Ce.match(r)){for(var ke="",te=0,Re=Ce.length;te<Re;te++)Ce.charCodeAt(te)>127?ke+="x":ke+=Ce[te];if(!ke.match(r)){var Te=re.slice(0,F),pe=re.slice(F+1),me=Ce.match(i);me&&(Te.push(me[1]),pe.unshift(me[2])),pe.length&&(M="/"+pe.join(".")+M),this.hostname=Te.join(".");break}}}this.hostname.length>l?this.hostname="":this.hostname=this.hostname.toLowerCase(),Z||(this.hostname=I.toASCII(this.hostname));var se=this.port?":"+this.port:"",be=this.hostname||"";this.host=be+se,this.href+=this.host,Z&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),M[0]!=="/"&&(M="/"+M))}if(!t[z])for(var F=0,he=e.length;F<he;F++){var ae=e[F];if(M.indexOf(ae)===-1)continue;var fe=encodeURIComponent(ae);fe===ae&&(fe=escape(ae)),M=M.split(ae).join(fe)}var Fe=M.indexOf("#");Fe!==-1&&(this.hash=M.substr(Fe),M=M.slice(0,Fe));var ie=M.indexOf("?");if(ie!==-1?(this.search=M.substr(ie),this.query=M.substr(ie+1),O&&(this.query=d.parse(this.query)),M=M.slice(0,ie)):O&&(this.search="",this.query={}),M&&(this.pathname=M),c[z]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var se=this.pathname||"",q=this.search||"";this.path=se+q}return this.href=this.format(),this};function h(x){return v.isString(x)&&(x=f(x)),x instanceof T?x.format():T.prototype.format.call(x)}T.prototype.format=function(){var x=this.auth||"";x&&(x=encodeURIComponent(x),x=x.replace(/%3A/i,":"),x+="@");var O=this.protocol||"",C=this.pathname||"",w=this.hash||"",S=!1,A="";this.host?S=x+this.host:this.hostname&&(S=x+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(S+=":"+this.port)),this.query&&v.isObject(this.query)&&Object.keys(this.query).length&&(A=d.stringify(this.query));var D=this.search||A&&"?"+A||"";return O&&O.substr(-1)!==":"&&(O+=":"),this.slashes||(!O||c[O])&&S!==!1?(S="//"+(S||""),C&&C.charAt(0)!=="/"&&(C="/"+C)):S||(S=""),w&&w.charAt(0)!=="#"&&(w="#"+w),D&&D.charAt(0)!=="?"&&(D="?"+D),C=C.replace(/[?#]/g,function(M){return encodeURIComponent(M)}),D=D.replace("#","%23"),O+S+C+D+w};function u(x,O){return f(x,!1,!0).resolve(O)}T.prototype.resolve=function(x){return this.resolveObject(f(x,!1,!0)).format()};function E(x,O){return x?f(x,!1,!0).resolveObject(O):O}T.prototype.resolveObject=function(x){if(v.isString(x)){var O=new T;O.parse(x,!1,!0),x=O}for(var C=new T,w=Object.keys(this),S=0;S<w.length;S++){var A=w[S];C[A]=this[A]}if(C.hash=x.hash,x.href==="")return C.href=C.format(),C;if(x.slashes&&!x.protocol){for(var D=Object.keys(x),M=0;M<D.length;M++){var N=D[M];N!=="protocol"&&(C[N]=x[N])}return c[C.protocol]&&C.hostname&&!C.pathname&&(C.path=C.pathname="/"),C.href=C.format(),C}if(x.protocol&&x.protocol!==C.protocol){if(!c[x.protocol]){for(var P=Object.keys(x),z=0;z<P.length;z++){var X=P[z];C[X]=x[X]}return C.href=C.format(),C}if(C.protocol=x.protocol,!x.host&&!a[x.protocol]){for(var he=(x.pathname||"").split("/");he.length&&!(x.host=he.shift()););x.host||(x.host=""),x.hostname||(x.hostname=""),he[0]!==""&&he.unshift(""),he.length<2&&he.unshift(""),C.pathname=he.join("/")}else C.pathname=x.pathname;if(C.search=x.search,C.query=x.query,C.host=x.host||"",C.auth=x.auth,C.hostname=x.hostname||x.host,C.port=x.port,C.pathname||C.search){var k=C.pathname||"",F=C.search||"";C.path=k+F}return C.slashes=C.slashes||x.slashes,C.href=C.format(),C}var U=C.pathname&&C.pathname.charAt(0)==="/",L=x.host||x.pathname&&x.pathname.charAt(0)==="/",B=L||U||C.host&&x.pathname,Z=B,re=C.pathname&&C.pathname.split("/")||[],he=x.pathname&&x.pathname.split("/")||[],Ce=C.protocol&&!c[C.protocol];if(Ce&&(C.hostname="",C.port=null,C.host&&(re[0]===""?re[0]=C.host:re.unshift(C.host)),C.host="",x.protocol&&(x.hostname=null,x.port=null,x.host&&(he[0]===""?he[0]=x.host:he.unshift(x.host)),x.host=null),B=B&&(he[0]===""||re[0]==="")),L)C.host=x.host||x.host===""?x.host:C.host,C.hostname=x.hostname||x.hostname===""?x.hostname:C.hostname,C.search=x.search,C.query=x.query,re=he;else if(he.length)re||(re=[]),re.pop(),re=re.concat(he),C.search=x.search,C.query=x.query;else if(!v.isNullOrUndefined(x.search)){if(Ce){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=x.search,C.query=x.query,(!v.isNull(C.pathname)||!v.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 te=re.slice(-1)[0],Re=(C.host||x.host||re.length>1)&&(te==="."||te==="..")||te==="",Te=0,pe=re.length;pe>=0;pe--)te=re[pe],te==="."?re.splice(pe,1):te===".."?(re.splice(pe,1),Te++):Te&&(re.splice(pe,1),Te--);if(!B&&!Z)for(;Te--;Te)re.unshift("..");B&&re[0]!==""&&(!re[0]||re[0].charAt(0)!=="/")&&re.unshift(""),Re&&re.join("/").substr(-1)!=="/"&&re.push("");var me=re[0]===""||re[0]&&re[0].charAt(0)==="/";if(Ce){C.hostname=C.host=me?"":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&&!me&&re.unshift(""),re.length?C.pathname=re.join("/"):(C.pathname=null,C.path=null),(!v.isNull(C.pathname)||!v.isNull(C.search))&&(C.path=(C.pathname?C.pathname:"")+(C.search?C.search:"")),C.auth=x.auth||C.auth,C.slashes=C.slashes||x.slashes,C.href=C.format(),C},T.prototype.parseHost=function(){var x=this.host,O=g.exec(x);O&&(O=O[0],O!==":"&&(this.port=O.substr(1)),x=x.substr(0,x.length-O.length)),x&&(this.hostname=x)}},{"./util":239,punycode:209,querystring:212}],239:[function(j,H,b){"use strict";H.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(j,H,b){(function(I){H.exports=v;function v(y,g){if(T("noDeprecation"))return y;var s=!1;function _(){if(!s){if(T("throwDeprecation"))throw new Error(g);T("traceDeprecation")?console.trace(g):console.warn(g),s=!0}return y.apply(this,arguments)}return _}function T(y){try{if(!I.localStorage)return!1}catch(s){return!1}var g=I.localStorage[y];return g==null?!1:String(g).toLowerCase()==="true"}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],241:[function(j,H,b){typeof Object.create=="function"?H.exports=function(v,T){v.super_=T,v.prototype=Object.create(T.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}})}:H.exports=function(v,T){v.super_=T;var y=function(){};y.prototype=T.prototype,v.prototype=new y,v.prototype.constructor=v}},{}],242:[function(j,H,b){H.exports=function(v){return v&&typeof v=="object"&&typeof v.copy=="function"&&typeof v.fill=="function"&&typeof v.readUInt8=="function"}},{}],243:[function(j,H,b){(function(I,v){var T=/%[sdj%]/g;b.format=function(k){if(!u(k)){for(var F=[],U=0;U<arguments.length;U++)F.push(s(arguments[U]));return F.join(" ")}for(var U=1,L=arguments,B=L.length,Z=String(k).replace(T,function(he){if(he==="%%")return"%";if(U>=B)return he;switch(he){case"%s":return String(L[U++]);case"%d":return Number(L[U++]);case"%j":try{return JSON.stringify(L[U++])}catch(Ce){return"[Circular]"}default:return he}}),re=L[U];U<B;re=L[++U])d(re)||!C(re)?Z+=" "+re:Z+=" "+s(re);return Z},b.deprecate=function(k,F){if(x(v.process))return function(){return b.deprecate(k,F).apply(this,arguments)};if(I.noDeprecation===!0)return k;var U=!1;function L(){if(!U){if(I.throwDeprecation)throw new Error(F);I.traceDeprecation?console.trace(F):console.error(F),U=!0}return k.apply(this,arguments)}return L};var y={},g;b.debuglog=function(k){if(x(g)&&(g=I.env.NODE_DEBUG||""),k=k.toUpperCase(),!y[k])if(new RegExp("\\b"+k+"\\b","i").test(g)){var F=I.pid;y[k]=function(){var U=b.format.apply(b,arguments);console.error("%s %d: %s",k,F,U)}}else y[k]=function(){};return y[k]};function s(k,F){var U={seen:[],stylize:p};return arguments.length>=3&&(U.depth=arguments[2]),arguments.length>=4&&(U.colors=arguments[3]),c(F)?U.showHidden=F:F&&b._extend(U,F),x(U.showHidden)&&(U.showHidden=!1),x(U.depth)&&(U.depth=2),x(U.colors)&&(U.colors=!1),x(U.customInspect)&&(U.customInspect=!0),U.colors&&(U.stylize=_),o(U,k,U.depth)}b.inspect=s,s.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]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function _(k,F){var U=s.styles[F];return U?"["+s.colors[U][0]+"m"+k+"["+s.colors[U][1]+"m":k}function p(k,F){return k}function e(k){var F={};return k.forEach(function(U,L){F[U]=!0}),F}function o(k,F,U){if(k.customInspect&&F&&A(F.inspect)&&F.inspect!==b.inspect&&!(F.constructor&&F.constructor.prototype===F)){var L=F.inspect(U,k);return u(L)||(L=o(k,L,U)),L}var B=n(k,F);if(B)return B;var Z=Object.keys(F),re=e(Z);if(k.showHidden&&(Z=Object.getOwnPropertyNames(F)),S(F)&&(Z.indexOf("message")>=0||Z.indexOf("description")>=0))return l(F);if(Z.length===0){if(A(F)){var he=F.name?": "+F.name:"";return k.stylize("[Function"+he+"]","special")}if(O(F))return k.stylize(RegExp.prototype.toString.call(F),"regexp");if(w(F))return k.stylize(Date.prototype.toString.call(F),"date");if(S(F))return l(F)}var Ce="",ke=!1,te=["{","}"];if(a(F)&&(ke=!0,te=["[","]"]),A(F)){var Re=F.name?": "+F.name:"";Ce=" [Function"+Re+"]"}if(O(F)&&(Ce=" "+RegExp.prototype.toString.call(F)),w(F)&&(Ce=" "+Date.prototype.toUTCString.call(F)),S(F)&&(Ce=" "+l(F)),Z.length===0&&(!ke||F.length==0))return te[0]+Ce+te[1];if(U<0)return O(F)?k.stylize(RegExp.prototype.toString.call(F),"regexp"):k.stylize("[Object]","special");k.seen.push(F);var Te;return ke?Te=r(k,F,U,re,Z):Te=Z.map(function(pe){return i(k,F,U,re,pe,ke)}),k.seen.pop(),t(Te,Ce,te)}function n(k,F){if(x(F))return k.stylize("undefined","undefined");if(u(F)){var U="'"+JSON.stringify(F).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return k.stylize(U,"string")}if(h(F))return k.stylize(""+F,"number");if(c(F))return k.stylize(""+F,"boolean");if(d(F))return k.stylize("null","null")}function l(k){return"["+Error.prototype.toString.call(k)+"]"}function r(k,F,U,L,B){for(var Z=[],re=0,he=F.length;re<he;++re)X(F,String(re))?Z.push(i(k,F,U,L,String(re),!0)):Z.push("");return B.forEach(function(Ce){Ce.match(/^\d+$/)||Z.push(i(k,F,U,L,Ce,!0))}),Z}function i(k,F,U,L,B,Z){var re,he,Ce;if(Ce=Object.getOwnPropertyDescriptor(F,B)||{value:F[B]},Ce.get?Ce.set?he=k.stylize("[Getter/Setter]","special"):he=k.stylize("[Getter]","special"):Ce.set&&(he=k.stylize("[Setter]","special")),X(L,B)||(re="["+B+"]"),he||(k.seen.indexOf(Ce.value)<0?(d(U)?he=o(k,Ce.value,null):he=o(k,Ce.value,U-1),he.indexOf(`
|
|
|
`)>-1&&(Z?he=he.split(`
|
|
|
`).map(function(ke){return" "+ke}).join(`
|
|
|
`).substr(2):he=`
|
|
|
`+he.split(`
|
|
|
`).map(function(ke){return" "+ke}).join(`
|
|
|
`))):he=k.stylize("[Circular]","special")),x(re)){if(Z&&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=k.stylize(re,"name")):(re=re.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),re=k.stylize(re,"string"))}return re+": "+he}function t(k,F,U){var L=0,B=k.reduce(function(Z,re){return L++,re.indexOf(`
|
|
|
`)>=0&&L++,Z+re.replace(/\u001b\[\d\d?m/g,"").length+1},0);return B>60?U[0]+(F===""?"":F+`
|
|
|
`)+" "+k.join(`,
|
|
|
`)+" "+U[1]:U[0]+F+" "+k.join(", ")+" "+U[1]}function a(k){return Array.isArray(k)}b.isArray=a;function c(k){return typeof k=="boolean"}b.isBoolean=c;function d(k){return k===null}b.isNull=d;function f(k){return k==null}b.isNullOrUndefined=f;function h(k){return typeof k=="number"}b.isNumber=h;function u(k){return typeof k=="string"}b.isString=u;function E(k){return typeof k=="symbol"}b.isSymbol=E;function x(k){return k===void 0}b.isUndefined=x;function O(k){return C(k)&&M(k)==="[object RegExp]"}b.isRegExp=O;function C(k){return typeof k=="object"&&k!==null}b.isObject=C;function w(k){return C(k)&&M(k)==="[object Date]"}b.isDate=w;function S(k){return C(k)&&(M(k)==="[object Error]"||k instanceof Error)}b.isError=S;function A(k){return typeof k=="function"}b.isFunction=A;function D(k){return k===null||typeof k=="boolean"||typeof k=="number"||typeof k=="string"||typeof k=="symbol"||typeof k=="undefined"}b.isPrimitive=D,b.isBuffer=j("./support/isBuffer");function M(k){return Object.prototype.toString.call(k)}function N(k){return k<10?"0"+k.toString(10):k.toString(10)}var P=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function z(){var k=new Date,F=[N(k.getHours()),N(k.getMinutes()),N(k.getSeconds())].join(":");return[k.getDate(),P[k.getMonth()],F].join(" ")}b.log=function(){console.log("%s - %s",z(),b.format.apply(b,arguments))},b.inherits=j("inherits"),b._extend=function(k,F){if(!F||!C(F))return k;for(var U=Object.keys(F),L=U.length;L--;)k[U[L]]=F[U[L]];return k};function X(k,F){return Object.prototype.hasOwnProperty.call(k,F)}}).call(this,j("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":242,_process:208,inherits:241}],244:[function(j,H,b){"use strict";(function(){"use strict";b.stripBOM=function(I){return I[0]==="\uFEFF"?I.substring(1):I}}).call(void 0)},{}],245:[function(j,H,b){"use strict";var I=j("babel-runtime/helpers/typeof"),v=g(I),T=j("babel-runtime/core-js/object/keys"),y=g(T);function g(s){return s&&s.__esModule?s:{default:s}}(function(){"use strict";var s,_,p,e,o,n={}.hasOwnProperty;s=j("xmlbuilder"),_=j("./defaults").defaults,e=function(r){return typeof r=="string"&&(r.indexOf("&")>=0||r.indexOf(">")>=0||r.indexOf("<")>=0)},o=function(r){return"<![CDATA["+p(r)+"]]>"},p=function(r){return r.replace("]]>","]]]]><![CDATA[>")},b.Builder=function(){function l(r){var i,t,a;this.options={},t=_["0.2"];for(i in t){if(!n.call(t,i))continue;a=t[i],this.options[i]=a}for(i in r){if(!n.call(r,i))continue;a=r[i],this.options[i]=a}}return l.prototype.buildObject=function(r){var i,t,a,c,d;return i=this.options.attrkey,t=this.options.charkey,(0,y.default)(r).length===1&&this.options.rootName===_["0.2"].rootName?(d=(0,y.default)(r)[0],r=r[d]):d=this.options.rootName,a=function(f){return function(h,u){var E,x,O,C,w,S;if((typeof u=="undefined"?"undefined":(0,v.default)(u))!=="object")f.options.cdata&&e(u)?h.raw(o(u)):h.txt(u);else if(Array.isArray(u))for(C in u){if(!n.call(u,C))continue;x=u[C];for(w in x)O=x[w],h=a(h.ele(w),O).up()}else for(w in u){if(!n.call(u,w))continue;if(x=u[w],w===i){if((typeof x=="undefined"?"undefined":(0,v.default)(x))==="object")for(E in x)S=x[E],h=h.att(E,S)}else if(w===t)f.options.cdata&&e(x)?h=h.raw(o(x)):h=h.txt(x);else if(Array.isArray(x))for(C in x){if(!n.call(x,C))continue;O=x[C],typeof O=="string"?f.options.cdata&&e(O)?h=h.ele(w).raw(o(O)).up():h=h.ele(w,O).up():h=a(h.ele(w),O).up()}else(typeof x=="undefined"?"undefined":(0,v.default)(x))==="object"?h=a(h.ele(w),x).up():typeof x=="string"&&f.options.cdata&&e(x)?h=h.ele(w).raw(o(x)).up():(x==null&&(x=""),h=h.ele(w,x.toString()).up())}return h}}(this),c=s.create(d,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),a(c,r).end(this.options.renderOpts)},l}()}).call(void 0)},{"./defaults":246,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,xmlbuilder:282}],246:[function(j,H,b){"use strict";(function(){b.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(j,H,b){"use strict";var I=j("babel-runtime/core-js/promise"),v=e(I),T=j("babel-runtime/core-js/object/get-own-property-names"),y=e(T),g=j("babel-runtime/core-js/object/keys"),s=e(g),_=j("babel-runtime/helpers/typeof"),p=e(_);function e(o){return o&&o.__esModule?o:{default:o}}(function(){"use strict";var o,n,l,r,i,t,a,c,d=function(E,x){return function(){return E.apply(x,arguments)}},f=function(E,x){for(var O in x)h.call(x,O)&&(E[O]=x[O]);function C(){this.constructor=E}return C.prototype=x.prototype,E.prototype=new C,E.__super__=x.prototype,E},h={}.hasOwnProperty;a=j("sax"),l=j("events"),o=j("./bom"),t=j("./processors"),c=j("timers").setImmediate,n=j("./defaults").defaults,r=function(E){return(typeof E=="undefined"?"undefined":(0,p.default)(E))==="object"&&E!=null&&(0,s.default)(E).length===0},i=function(E,x,O){var C,w,S;for(C=0,w=E.length;C<w;C++)S=E[C],x=S(x,O);return x},b.Parser=function(u){f(E,u);function E(x){this.parseStringPromise=d(this.parseStringPromise,this),this.parseString=d(this.parseString,this),this.reset=d(this.reset,this),this.assignOrPush=d(this.assignOrPush,this),this.processAsync=d(this.processAsync,this);var O,C,w;if(!(this instanceof b.Parser))return new b.Parser(x);this.options={},C=n["0.2"];for(O in C){if(!h.call(C,O))continue;w=C[O],this.options[O]=w}for(O in x){if(!h.call(x,O))continue;w=x[O],this.options[O]=w}this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(t.normalize)),this.reset()}return E.prototype.processAsync=function(){var x,O;try{return this.remaining.length<=this.options.chunkSize?(x=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(x),this.saxParser.close()):(x=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(x),c(this.processAsync))}catch(C){if(O=C,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(O)}},E.prototype.assignOrPush=function(x,O,C){return O in x?(x[O]instanceof Array||(x[O]=[x[O]]),x[O].push(C)):this.options.explicitArray?x[O]=[C]:x[O]=C},E.prototype.reset=function(){var x,O,C,w;return this.removeAllListeners(),this.saxParser=a.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=[],x=this.options.attrkey,O=this.options.charkey,this.saxParser.onopentag=function(S){return function(A){var D,M,N,P,z;if(N={},N[O]="",!S.options.ignoreAttrs){z=A.attributes;for(D in z){if(!h.call(z,D))continue;!(x in N)&&!S.options.mergeAttrs&&(N[x]={}),M=S.options.attrValueProcessors?i(S.options.attrValueProcessors,A.attributes[D],D):A.attributes[D],P=S.options.attrNameProcessors?i(S.options.attrNameProcessors,D):D,S.options.mergeAttrs?S.assignOrPush(N,P,M):N[x][P]=M}}return N["#name"]=S.options.tagNameProcessors?i(S.options.tagNameProcessors,A.name):A.name,S.options.xmlns&&(N[S.options.xmlnskey]={uri:A.uri,local:A.local}),w.push(N)}}(this),this.saxParser.onclosetag=function(S){return function(){var A,D,M,N,P,z,X,k,F,U;if(z=w.pop(),P=z["#name"],(!S.options.explicitChildren||!S.options.preserveChildrenOrder)&&delete z["#name"],z.cdata===!0&&(A=z.cdata,delete z.cdata),F=w[w.length-1],z[O].match(/^\s*$/)&&!A?(D=z[O],delete z[O]):(S.options.trim&&(z[O]=z[O].trim()),S.options.normalize&&(z[O]=z[O].replace(/\s{2,}/g," ").trim()),z[O]=S.options.valueProcessors?i(S.options.valueProcessors,z[O],P):z[O],(0,s.default)(z).length===1&&O in z&&!S.EXPLICIT_CHARKEY&&(z=z[O])),r(z)&&(z=S.options.emptyTag!==""?S.options.emptyTag:D),S.options.validator!=null&&(U="/"+function(){var L,B,Z;for(Z=[],L=0,B=w.length;L<B;L++)N=w[L],Z.push(N["#name"]);return Z}().concat(P).join("/"),function(){var L;try{return z=S.options.validator(U,F&&F[P],z)}catch(B){return L=B,S.emit("error",L)}}()),S.options.explicitChildren&&!S.options.mergeAttrs&&(typeof z=="undefined"?"undefined":(0,p.default)(z))==="object"){if(!S.options.preserveChildrenOrder)N={},S.options.attrkey in z&&(N[S.options.attrkey]=z[S.options.attrkey],delete z[S.options.attrkey]),!S.options.charsAsChildren&&S.options.charkey in z&&(N[S.options.charkey]=z[S.options.charkey],delete z[S.options.charkey]),(0,y.default)(z).length>0&&(N[S.options.childkey]=z),z=N;else if(F){F[S.options.childkey]=F[S.options.childkey]||[],X={};for(M in z){if(!h.call(z,M))continue;X[M]=z[M]}F[S.options.childkey].push(X),delete z["#name"],(0,s.default)(z).length===1&&O in z&&!S.EXPLICIT_CHARKEY&&(z=z[O])}}return w.length>0?S.assignOrPush(F,P,z):(S.options.explicitRoot&&(k=z,z={},z[P]=k),S.resultObject=z,S.saxParser.ended=!0,S.emit("end",S.resultObject))}}(this),C=function(S){return function(A){var D,M;if(M=w[w.length-1],M)return M[O]+=A,S.options.explicitChildren&&S.options.preserveChildrenOrder&&S.options.charsAsChildren&&(S.options.includeWhiteChars||A.replace(/\\n/g,"").trim()!=="")&&(M[S.options.childkey]=M[S.options.childkey]||[],D={"#name":"__text__"},D[O]=A,S.options.normalize&&(D[O]=D[O].replace(/\s{2,}/g," ").trim()),M[S.options.childkey].push(D)),M}}(this),this.saxParser.ontext=C,this.saxParser.oncdata=function(S){return function(A){var D;if(D=C(A),D)return D.cdata=!0}}(this)},E.prototype.parseString=function(x,O){var C;O!=null&&typeof O=="function"&&(this.on("end",function(w){return this.reset(),O(null,w)}),this.on("error",function(w){return this.reset(),O(w)}));try{return x=x.toString(),x.trim()===""?(this.emit("end",null),!0):(x=o.stripBOM(x),this.options.async?(this.remaining=x,c(this.processAsync),this.saxParser):this.saxParser.write(x).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(x){return new v.default(function(O){return function(C,w){return O.parseString(x,function(S,A){return S?w(S):C(A)})}}(this))},E}(l),b.parseString=function(u,E,x){var O,C,w;return x!=null?(typeof x=="function"&&(O=x),(typeof E=="undefined"?"undefined":(0,p.default)(E))==="object"&&(C=E)):(typeof E=="function"&&(O=E),C={}),w=new b.Parser(C),w.parseString(u,O)},b.parseStringPromise=function(u,E){var x,O;return(typeof E=="undefined"?"undefined":(0,p.default)(E))==="object"&&(x=E),O=new b.Parser(x),O.parseStringPromise(u)}}).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(j,H,b){"use strict";(function(){"use strict";var I;I=new RegExp(/(?!xmlns)^.*:/),b.normalize=function(v){return v.toLowerCase()},b.firstCharLowerCase=function(v){return v.charAt(0).toLowerCase()+v.slice(1)},b.stripPrefix=function(v){return v.replace(I,"")},b.parseNumbers=function(v){return isNaN(v)||(v=v%1===0?parseInt(v,10):parseFloat(v)),v},b.parseBooleans=function(v){return/^(?:true|false)$/i.test(v)&&(v=v.toLowerCase()==="true"),v}}).call(void 0)},{}],249:[function(j,H,b){"use strict";(function(){"use strict";var I,v,T,y,g=function(p,e){for(var o in e)s.call(e,o)&&(p[o]=e[o]);function n(){this.constructor=p}return n.prototype=e.prototype,p.prototype=new n,p.__super__=e.prototype,p},s={}.hasOwnProperty;v=j("./defaults"),I=j("./builder"),T=j("./parser"),y=j("./processors"),b.defaults=v.defaults,b.processors=y,b.ValidationError=function(_){g(p,_);function p(e){this.message=e}return p}(Error),b.Builder=I.Builder,b.Parser=T.Parser,b.parseString=T.parseString,b.parseStringPromise=T.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(j,H,b){"use strict";(function(){H.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(j,H,b){"use strict";(function(){H.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(j,H,b){"use strict";var I=j("babel-runtime/core-js/object/get-prototype-of"),v=_(I),T=j("babel-runtime/helpers/typeof"),y=_(T),g=j("babel-runtime/core-js/object/assign"),s=_(g);function _(p){return p&&p.__esModule?p:{default:p}}(function(){var p,e,o,n,l,r,i,t=[].slice,a={}.hasOwnProperty;p=function(){var d,f,h,u,E,x;if(x=arguments[0],E=2<=arguments.length?t.call(arguments,1):[],l(s.default))s.default.apply(null,arguments);else for(d=0,h=E.length;d<h;d++)if(u=E[d],u!=null)for(f in u){if(!a.call(u,f))continue;x[f]=u[f]}return x},l=function(d){return!!d&&Object.prototype.toString.call(d)==="[object Function]"},r=function(d){var f;return!!d&&((f=typeof d=="undefined"?"undefined":(0,y.default)(d))==="function"||f==="object")},o=function(d){return l(Array.isArray)?Array.isArray(d):Object.prototype.toString.call(d)==="[object Array]"},n=function(d){var f;if(o(d))return!d.length;for(f in d){if(!a.call(d,f))continue;return!1}return!0},i=function(d){var f,h;return r(d)&&(h=(0,v.default)(d))&&(f=h.constructor)&&typeof f=="function"&&f instanceof f&&Function.prototype.toString.call(f)===Function.prototype.toString.call(Object)},e=function(d){return l(d.valueOf)?d.valueOf():d},H.exports.assign=p,H.exports.isFunction=l,H.exports.isObject=r,H.exports.isArray=o,H.exports.isEmpty=n,H.exports.isPlainObject=i,H.exports.getValue=e}).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(j,H,b){"use strict";(function(){H.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(void 0)},{}],254:[function(j,H,b){"use strict";var I=j("babel-runtime/core-js/object/create"),v=T(I);function T(y){return y&&y.__esModule?y:{default:y}}(function(){var y,g,s;y=j("./NodeType"),s=j("./XMLNode"),H.exports=g=function(){function _(p,e,o){if(this.parent=p,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),e==null)throw new Error("Missing attribute name. "+this.debugInfo(e));this.name=this.stringify.name(e),this.value=this.stringify.attValue(o),this.type=y.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(_.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(_.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(_.prototype,"textContent",{get:function(){return this.value},set:function(e){return this.value=e||""}}),Object.defineProperty(_.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(_.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(_.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(_.prototype,"specified",{get:function(){return!0}}),_.prototype.clone=function(){return(0,v.default)(this)},_.prototype.toString=function(p){return this.options.writer.attribute(this,this.options.writer.filterOptions(p))},_.prototype.debugInfo=function(p){return p=p||this.name,p==null?"parent: <"+this.parent.name+">":"attribute: {"+p+"}, parent: <"+this.parent.name+">"},_.prototype.isEqualNode=function(p){return p.namespaceURI!==this.namespaceURI||(p.prefix!==this.prefix||p.localName!==this.localName)?!1:!(p.value!==this.value)},_}()}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],255:[function(j,H,b){"use strict";var I=j("babel-runtime/core-js/object/create"),v=T(I);function T(y){return y&&y.__esModule?y:{default:y}}(function(){var y,g,s,_=function(o,n){for(var l in n)p.call(n,l)&&(o[l]=n[l]);function r(){this.constructor=o}return r.prototype=n.prototype,o.prototype=new r,o.__super__=n.prototype,o},p={}.hasOwnProperty;y=j("./NodeType"),s=j("./XMLCharacterData"),H.exports=g=function(e){_(o,e);function o(n,l){if(o.__super__.constructor.call(this,n),l==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=y.CData,this.value=this.stringify.cdata(l)}return o.prototype.clone=function(){return(0,v.default)(this)},o.prototype.toString=function(n){return this.options.writer.cdata(this,this.options.writer.filterOptions(n))},o}(s)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(j,H,b){"use strict";var I=j("babel-runtime/core-js/object/create"),v=T(I);function T(y){return y&&y.__esModule?y:{default:y}}(function(){var y,g,s=function(e,o){for(var n in o)_.call(o,n)&&(e[n]=o[n]);function l(){this.constructor=e}return l.prototype=o.prototype,e.prototype=new l,e.__super__=o.prototype,e},_={}.hasOwnProperty;g=j("./XMLNode"),H.exports=y=function(p){s(e,p);function e(o){e.__super__.constructor.call(this,o),this.value=""}return Object.defineProperty(e.prototype,"data",{get:function(){return this.value},set:function(n){return this.value=n||""}}),Object.defineProperty(e.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(e.prototype,"textContent",{get:function(){return this.value},set:function(n){return this.value=n||""}}),e.prototype.clone=function(){return(0,v.default)(this)},e.prototype.substringData=function(o,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.appendData=function(o){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.insertData=function(o,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.deleteData=function(o,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.replaceData=function(o,n,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.isEqualNode=function(o){return e.__super__.isEqualNode.apply(this,arguments).isEqualNode(o)?!(o.data!==this.data):!1},e}(g)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(j,H,b){"use strict";var I=j("babel-runtime/core-js/object/create"),v=T(I);function T(y){return y&&y.__esModule?y:{default:y}}(function(){var y,g,s,_=function(o,n){for(var l in n)p.call(n,l)&&(o[l]=n[l]);function r(){this.constructor=o}return r.prototype=n.prototype,o.prototype=new r,o.__super__=n.prototype,o},p={}.hasOwnProperty;y=j("./NodeType"),g=j("./XMLCharacterData"),H.exports=s=function(e){_(o,e);function o(n,l){if(o.__super__.constructor.call(this,n),l==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=y.Comment,this.value=this.stringify.comment(l)}return o.prototype.clone=function(){return(0,v.default)(this)},o.prototype.toString=function(n){return this.options.writer.comment(this,this.options.writer.filterOptions(n))},o}(g)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(j,H,b){"use strict";var I=j("babel-runtime/core-js/object/keys"),v=g(I),T=j("babel-runtime/core-js/object/create"),y=g(T);function g(s){return s&&s.__esModule?s:{default:s}}(function(){var s,_,p;_=j("./XMLDOMErrorHandler"),p=j("./XMLDOMStringList"),H.exports=s=function(){function e(){var o;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new _,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=o=(0,y.default)(this.defaultParams)}return Object.defineProperty(e.prototype,"parameterNames",{get:function(){return new p((0,v.default)(this.defaultParams))}}),e.prototype.getParameter=function(o){return this.params.hasOwnProperty(o)?this.params[o]:null},e.prototype.canSetParameter=function(o,n){return!0},e.prototype.setParameter=function(o,n){return n!=null?this.params[o]=n:delete this.params[o]},e}()}).call(void 0)},{"./XMLDOMErrorHandler":259,"./XMLDOMStringList":261,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60}],259:[function(j,H,b){"use strict";(function(){var I;H.exports=I=function(){function v(){}return v.prototype.handleError=function(T){throw new Error(T)},v}()}).call(void 0)},{}],260:[function(j,H,b){"use strict";(function(){var I;H.exports=I=function(){function v(){}return v.prototype.hasFeature=function(T,y){return!0},v.prototype.createDocumentType=function(T,y,g){throw new Error("This DOM method is not implemented.")},v.prototype.createDocument=function(T,y,g){throw new Error("This DOM method is not implemented.")},v.prototype.createHTMLDocument=function(T){throw new Error("This DOM method is not implemented.")},v.prototype.getFeature=function(T,y){throw new Error("This DOM method is not implemented.")},v}()}).call(void 0)},{}],261:[function(j,H,b){"use strict";(function(){var I;H.exports=I=function(){function v(T){this.arr=T||[]}return Object.defineProperty(v.prototype,"length",{get:function(){return this.arr.length}}),v.prototype.item=function(T){return this.arr[T]||null},v.prototype.contains=function(T){return this.arr.indexOf(T)!==-1},v}()}).call(void 0)},{}],262:[function(j,H,b){"use strict";(function(){var I,v,T,y=function(_,p){for(var e in p)g.call(p,e)&&(_[e]=p[e]);function o(){this.constructor=_}return o.prototype=p.prototype,_.prototype=new o,_.__super__=p.prototype,_},g={}.hasOwnProperty;T=j("./XMLNode"),I=j("./NodeType"),H.exports=v=function(s){y(_,s);function _(p,e,o,n,l,r){if(_.__super__.constructor.call(this,p),e==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(o==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(e));if(!n)throw new Error("Missing DTD attribute type. "+this.debugInfo(e));if(!l)throw new Error("Missing DTD attribute default. "+this.debugInfo(e));if(l.indexOf("#")!==0&&(l="#"+l),!l.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(e));if(r&&!l.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(e));this.elementName=this.stringify.name(e),this.type=I.AttributeDeclaration,this.attributeName=this.stringify.name(o),this.attributeType=this.stringify.dtdAttType(n),r&&(this.defaultValue=this.stringify.dtdAttDefault(r)),this.defaultValueType=l}return _.prototype.toString=function(p){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(p))},_}(T)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(j,H,b){"use strict";(function(){var I,v,T,y=function(_,p){for(var e in p)g.call(p,e)&&(_[e]=p[e]);function o(){this.constructor=_}return o.prototype=p.prototype,_.prototype=new o,_.__super__=p.prototype,_},g={}.hasOwnProperty;T=j("./XMLNode"),I=j("./NodeType"),H.exports=v=function(s){y(_,s);function _(p,e,o){if(_.__super__.constructor.call(this,p),e==null)throw new Error("Missing DTD element name. "+this.debugInfo());o||(o="(#PCDATA)"),Array.isArray(o)&&(o="("+o.join(",")+")"),this.name=this.stringify.name(e),this.type=I.ElementDeclaration,this.value=this.stringify.dtdElementValue(o)}return _.prototype.toString=function(p){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(p))},_}(T)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(j,H,b){"use strict";(function(){var I,v,T,y,g=function(p,e){for(var o in e)s.call(e,o)&&(p[o]=e[o]);function n(){this.constructor=p}return n.prototype=e.prototype,p.prototype=new n,p.__super__=e.prototype,p},s={}.hasOwnProperty;y=j("./Utility").isObject,T=j("./XMLNode"),I=j("./NodeType"),H.exports=v=function(_){g(p,_);function p(e,o,n,l){if(p.__super__.constructor.call(this,e),n==null)throw new Error("Missing DTD entity name. "+this.debugInfo(n));if(l==null)throw new Error("Missing DTD entity value. "+this.debugInfo(n));if(this.pe=!!o,this.name=this.stringify.name(n),this.type=I.EntityDeclaration,!y(l))this.value=this.stringify.dtdEntityValue(l),this.internal=!0;else{if(!l.pubID&&!l.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(n));if(l.pubID&&!l.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(n));if(this.internal=!1,l.pubID!=null&&(this.pubID=this.stringify.dtdPubID(l.pubID)),l.sysID!=null&&(this.sysID=this.stringify.dtdSysID(l.sysID)),l.nData!=null&&(this.nData=this.stringify.dtdNData(l.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(e){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(e))},p}(T)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(j,H,b){"use strict";(function(){var I,v,T,y=function(_,p){for(var e in p)g.call(p,e)&&(_[e]=p[e]);function o(){this.constructor=_}return o.prototype=p.prototype,_.prototype=new o,_.__super__=p.prototype,_},g={}.hasOwnProperty;T=j("./XMLNode"),I=j("./NodeType"),H.exports=v=function(s){y(_,s);function _(p,e,o){if(_.__super__.constructor.call(this,p),e==null)throw new Error("Missing DTD notation name. "+this.debugInfo(e));if(!o.pubID&&!o.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(e));this.name=this.stringify.name(e),this.type=I.NotationDeclaration,o.pubID!=null&&(this.pubID=this.stringify.dtdPubID(o.pubID)),o.sysID!=null&&(this.sysID=this.stringify.dtdSysID(o.sysID))}return Object.defineProperty(_.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(_.prototype,"systemId",{get:function(){return this.sysID}}),_.prototype.toString=function(p){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(p))},_}(T)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(j,H,b){"use strict";(function(){var I,v,T,y,g=function(p,e){for(var o in e)s.call(e,o)&&(p[o]=e[o]);function n(){this.constructor=p}return n.prototype=e.prototype,p.prototype=new n,p.__super__=e.prototype,p},s={}.hasOwnProperty;y=j("./Utility").isObject,T=j("./XMLNode"),I=j("./NodeType"),H.exports=v=function(_){g(p,_);function p(e,o,n,l){var r;p.__super__.constructor.call(this,e),y(o)&&(r=o,o=r.version,n=r.encoding,l=r.standalone),o||(o="1.0"),this.type=I.Declaration,this.version=this.stringify.xmlVersion(o),n!=null&&(this.encoding=this.stringify.xmlEncoding(n)),l!=null&&(this.standalone=this.stringify.xmlStandalone(l))}return p.prototype.toString=function(e){return this.options.writer.declaration(this,this.options.writer.filterOptions(e))},p}(T)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(j,H,b){"use strict";(function(){var I,v,T,y,g,s,_,p,e,o=function(r,i){for(var t in i)n.call(i,t)&&(r[t]=i[t]);function a(){this.constructor=r}return a.prototype=i.prototype,r.prototype=new a,r.__super__=i.prototype,r},n={}.hasOwnProperty;e=j("./Utility").isObject,p=j("./XMLNode"),I=j("./NodeType"),v=j("./XMLDTDAttList"),y=j("./XMLDTDEntity"),T=j("./XMLDTDElement"),g=j("./XMLDTDNotation"),_=j("./XMLNamedNodeMap"),H.exports=s=function(l){o(r,l);function r(i,t,a){var c,d,f,h,u,E;if(r.__super__.constructor.call(this,i),this.type=I.DocType,i.children){for(h=i.children,d=0,f=h.length;d<f;d++)if(c=h[d],c.type===I.Element){this.name=c.name;break}}this.documentObject=i,e(t)&&(u=t,t=u.pubID,a=u.sysID),a==null&&(E=[t,a],a=E[0],t=E[1]),t!=null&&(this.pubID=this.stringify.dtdPubID(t)),a!=null&&(this.sysID=this.stringify.dtdSysID(a))}return Object.defineProperty(r.prototype,"entities",{get:function(){var t,a,c,d,f;for(d={},f=this.children,a=0,c=f.length;a<c;a++)t=f[a],t.type===I.EntityDeclaration&&!t.pe&&(d[t.name]=t);return new _(d)}}),Object.defineProperty(r.prototype,"notations",{get:function(){var t,a,c,d,f;for(d={},f=this.children,a=0,c=f.length;a<c;a++)t=f[a],t.type===I.NotationDeclaration&&(d[t.name]=t);return new _(d)}}),Object.defineProperty(r.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(r.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(r.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),r.prototype.element=function(i,t){var a;return a=new T(this,i,t),this.children.push(a),this},r.prototype.attList=function(i,t,a,c,d){var f;return f=new v(this,i,t,a,c,d),this.children.push(f),this},r.prototype.entity=function(i,t){var a;return a=new y(this,!1,i,t),this.children.push(a),this},r.prototype.pEntity=function(i,t){var a;return a=new y(this,!0,i,t),this.children.push(a),this},r.prototype.notation=function(i,t){var a;return a=new g(this,i,t),this.children.push(a),this},r.prototype.toString=function(i){return this.options.writer.docType(this,this.options.writer.filterOptions(i))},r.prototype.ele=function(i,t){return this.element(i,t)},r.prototype.att=function(i,t,a,c,d){return this.attList(i,t,a,c,d)},r.prototype.ent=function(i,t){return this.entity(i,t)},r.prototype.pent=function(i,t){return this.pEntity(i,t)},r.prototype.not=function(i,t){return this.notation(i,t)},r.prototype.up=function(){return this.root()||this.documentObject},r.prototype.isEqualNode=function(i){return r.__super__.isEqualNode.apply(this,arguments).isEqualNode(i)?i.name!==this.name||i.publicId!==this.publicId?!1:!(i.systemId!==this.systemId):!1},r}(p)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLNamedNodeMap":272,"./XMLNode":273}],268:[function(j,H,b){"use strict";(function(){var I,v,T,y,g,s,_,p,e=function(l,r){for(var i in r)o.call(r,i)&&(l[i]=r[i]);function t(){this.constructor=l}return t.prototype=r.prototype,l.prototype=new t,l.__super__=r.prototype,l},o={}.hasOwnProperty;p=j("./Utility").isPlainObject,T=j("./XMLDOMImplementation"),v=j("./XMLDOMConfiguration"),g=j("./XMLNode"),I=j("./NodeType"),_=j("./XMLStringifier"),s=j("./XMLStringWriter"),H.exports=y=function(n){e(l,n);function l(r){l.__super__.constructor.call(this,null),this.name="#document",this.type=I.Document,this.documentURI=null,this.domConfig=new v,r||(r={}),r.writer||(r.writer=new s),this.options=r,this.stringify=new _(r)}return Object.defineProperty(l.prototype,"implementation",{value:new T}),Object.defineProperty(l.prototype,"doctype",{get:function(){var i,t,a,c;for(c=this.children,t=0,a=c.length;t<a;t++)if(i=c[t],i.type===I.DocType)return i;return null}}),Object.defineProperty(l.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(l.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(l.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(l.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===I.Declaration?this.children[0].encoding:null}}),Object.defineProperty(l.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===I.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(l.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===I.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(l.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(l.prototype,"origin",{get:function(){return null}}),Object.defineProperty(l.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(l.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(l.prototype,"contentType",{get:function(){return null}}),l.prototype.end=function(r){var i;return i={},r?p(r)&&(i=r,r=this.options.writer):r=this.options.writer,r.document(this,r.filterOptions(i))},l.prototype.toString=function(r){return this.options.writer.document(this,this.options.writer.filterOptions(r))},l.prototype.createElement=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.createTextNode=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.createComment=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.createCDATASection=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.createProcessingInstruction=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.createAttribute=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.createEntityReference=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.getElementsByTagName=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.importNode=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.createElementNS=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.createAttributeNS=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.getElementsByTagNameNS=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.getElementById=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.adoptNode=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.renameNode=function(r,i,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.getElementsByClassName=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.createEvent=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.createNodeIterator=function(r,i,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.createTreeWalker=function(r,i,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},l}(g)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDOMConfiguration":258,"./XMLDOMImplementation":260,"./XMLNode":273,"./XMLStringWriter":278,"./XMLStringifier":279}],269:[function(j,H,b){"use strict";(function(){var I,v,T,y,g,s,_,p,e,o,n,l,r,i,t,a,c,d,f,h,u,E,x,O,C={}.hasOwnProperty;O=j("./Utility"),E=O.isObject,u=O.isFunction,x=O.isPlainObject,h=O.getValue,I=j("./NodeType"),l=j("./XMLDocument"),i=j("./XMLElement"),y=j("./XMLCData"),g=j("./XMLComment"),a=j("./XMLRaw"),f=j("./XMLText"),t=j("./XMLProcessingInstruction"),o=j("./XMLDeclaration"),n=j("./XMLDocType"),s=j("./XMLDTDAttList"),p=j("./XMLDTDEntity"),_=j("./XMLDTDElement"),e=j("./XMLDTDNotation"),T=j("./XMLAttribute"),d=j("./XMLStringifier"),c=j("./XMLStringWriter"),v=j("./WriterState"),H.exports=r=function(){function w(S,A,D){var M;this.name="?xml",this.type=I.Document,S||(S={}),M={},S.writer?x(S.writer)&&(M=S.writer,S.writer=new c):S.writer=new c,this.options=S,this.writer=S.writer,this.writerOptions=this.writer.filterOptions(M),this.stringify=new d(S),this.onDataCallback=A||function(){},this.onEndCallback=D||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,D,M,N,P,z,X,k;switch(S.type){case I.CData:this.cdata(S.value);break;case I.Comment:this.comment(S.value);break;case I.Element:M={},X=S.attribs;for(D in X){if(!C.call(X,D))continue;A=X[D],M[D]=A.value}this.node(S.name,M);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(k=S.children,P=0,z=k.length;P<z;P++)N=k[P],this.createChildNode(N),N.type===I.Element&&this.up();return this},w.prototype.dummy=function(){return this},w.prototype.node=function(S,A,D){var M;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=h(S),A==null&&(A={}),A=h(A),E(A)||(M=[A,D],D=M[0],A=M[1]),this.currentNode=new i(this,S,A),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,D!=null&&this.text(D),this},w.prototype.element=function(S,A,D){var M,N,P,z,X,k;if(this.currentNode&&this.currentNode.type===I.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(S)||E(S)||u(S))for(z=this.options.noValidation,this.options.noValidation=!0,k=new l(this.options).element("TEMP_ROOT"),k.element(S),this.options.noValidation=z,X=k.children,N=0,P=X.length;N<P;N++)M=X[N],this.createChildNode(M),M.type===I.Element&&this.up();else this.node(S,A,D);return this},w.prototype.attribute=function(S,A){var D,M;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=h(S)),E(S))for(D in S){if(!C.call(S,D))continue;M=S[D],this.attribute(D,M)}else u(A)&&(A=A.apply()),this.options.keepNullAttributes&&A==null?this.currentNode.attribs[S]=new T(this,S,""):A!=null&&(this.currentNode.attribs[S]=new T(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 g(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 a(this,S),this.onData(this.writer.raw(A,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},w.prototype.instruction=function(S,A){var D,M,N,P,z;if(this.openCurrent(),S!=null&&(S=h(S)),A!=null&&(A=h(A)),Array.isArray(S))for(D=0,P=S.length;D<P;D++)M=S[D],this.instruction(M);else if(E(S))for(M in S){if(!C.call(S,M))continue;N=S[M],this.instruction(M,N)}else u(A)&&(A=A.apply()),z=new t(this,S,A),this.onData(this.writer.processingInstruction(z,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},w.prototype.declaration=function(S,A,D){var M;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return M=new o(this,S,A,D),this.onData(this.writer.declaration(M,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},w.prototype.doctype=function(S,A,D){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,D),this.currentNode.rootNodeName=S,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},w.prototype.dtdElement=function(S,A){var D;return this.openCurrent(),D=new _(this,S,A),this.onData(this.writer.dtdElement(D,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},w.prototype.attList=function(S,A,D,M,N){var P;return this.openCurrent(),P=new s(this,S,A,D,M,N),this.onData(this.writer.dtdAttList(P,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},w.prototype.entity=function(S,A){var D;return this.openCurrent(),D=new p(this,!1,S,A),this.onData(this.writer.dtdEntity(D,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},w.prototype.pEntity=function(S,A){var D;return this.openCurrent(),D=new p(this,!0,S,A),this.onData(this.writer.dtdEntity(D,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},w.prototype.notation=function(S,A){var D;return this.openCurrent(),D=new e(this,S,A),this.onData(this.writer.dtdNotation(D,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,D,M,N;if(!S.isOpen){if(!this.root&&this.currentLevel===0&&S.type===I.Element&&(this.root=S),D="",S.type===I.Element){this.writerOptions.state=v.OpenTag,D=this.writer.indent(S,this.writerOptions,this.currentLevel)+"<"+S.name,N=S.attribs;for(M in N){if(!C.call(N,M))continue;A=N[M],D+=this.writer.attribute(A,this.writerOptions,this.currentLevel)}D+=(S.children?">":"/>")+this.writer.endline(S,this.writerOptions,this.currentLevel),this.writerOptions.state=v.InsideTag}else this.writerOptions.state=v.OpenTag,D=this.writer.indent(S,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+S.rootNodeName,S.pubID&&S.sysID?D+=' PUBLIC "'+S.pubID+'" "'+S.sysID+'"':S.sysID&&(D+=' SYSTEM "'+S.sysID+'"'),S.children?(D+=" [",this.writerOptions.state=v.InsideTag):(this.writerOptions.state=v.CloseTag,D+=">"),D+=this.writer.endline(S,this.writerOptions,this.currentLevel);return this.onData(D,this.currentLevel),S.isOpen=!0}},w.prototype.closeNode=function(S){var A;if(!S.isClosed)return A="",this.writerOptions.state=v.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=v.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,D){return this.node(S,A,D)},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,D){return this.declaration(S,A,D)},w.prototype.dtd=function(S,A,D){return this.doctype(S,A,D)},w.prototype.e=function(S,A,D){return this.element(S,A,D)},w.prototype.n=function(S,A,D){return this.node(S,A,D)},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(j,H,b){"use strict";var I=j("babel-runtime/core-js/object/create"),v=T(I);function T(y){return y&&y.__esModule?y:{default:y}}(function(){var y,g,s,_=function(o,n){for(var l in n)p.call(n,l)&&(o[l]=n[l]);function r(){this.constructor=o}return r.prototype=n.prototype,o.prototype=new r,o.__super__=n.prototype,o},p={}.hasOwnProperty;s=j("./XMLNode"),y=j("./NodeType"),H.exports=g=function(e){_(o,e);function o(n){o.__super__.constructor.call(this,n),this.type=y.Dummy}return o.prototype.clone=function(){return(0,v.default)(this)},o.prototype.toString=function(n){return""},o}(s)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(j,H,b){"use strict";var I=j("babel-runtime/core-js/object/create"),v=T(I);function T(y){return y&&y.__esModule?y:{default:y}}(function(){var y,g,s,_,p,e,o,n,l,r=function(a,c){for(var d in c)i.call(c,d)&&(a[d]=c[d]);function f(){this.constructor=a}return f.prototype=c.prototype,a.prototype=new f,a.__super__=c.prototype,a},i={}.hasOwnProperty;l=j("./Utility"),n=l.isObject,o=l.isFunction,e=l.getValue,p=j("./XMLNode"),y=j("./NodeType"),g=j("./XMLAttribute"),_=j("./XMLNamedNodeMap"),H.exports=s=function(t){r(a,t);function a(c,d,f){var h,u,E,x;if(a.__super__.constructor.call(this,c),d==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(d),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(x=c.children,u=0,E=x.length;u<E;u++)if(h=x[u],h.type===y.DocType){h.name=this.name;break}}}return Object.defineProperty(a.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(a.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(a.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(a.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(a.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(a.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(a.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(a.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new _(this.attribs)),this.attributeMap}}),a.prototype.clone=function(){var c,d,f,h;f=(0,v.default)(this),f.isRoot&&(f.documentObject=null),f.attribs={},h=this.attribs;for(d in h){if(!i.call(h,d))continue;c=h[d],f.attribs[d]=c.clone()}return f.children=[],this.children.forEach(function(u){var E;return E=u.clone(),E.parent=f,f.children.push(E)}),f},a.prototype.attribute=function(c,d){var f,h;if(c!=null&&(c=e(c)),n(c))for(f in c){if(!i.call(c,f))continue;h=c[f],this.attribute(f,h)}else o(d)&&(d=d.apply()),this.options.keepNullAttributes&&d==null?this.attribs[c]=new g(this,c,""):d!=null&&(this.attribs[c]=new g(this,c,d));return this},a.prototype.removeAttribute=function(c){var d,f,h;if(c==null)throw new Error("Missing attribute name. "+this.debugInfo());if(c=e(c),Array.isArray(c))for(f=0,h=c.length;f<h;f++)d=c[f],delete this.attribs[d];else delete this.attribs[c];return this},a.prototype.toString=function(c){return this.options.writer.element(this,this.options.writer.filterOptions(c))},a.prototype.att=function(c,d){return this.attribute(c,d)},a.prototype.a=function(c,d){return this.attribute(c,d)},a.prototype.getAttribute=function(c){return this.attribs.hasOwnProperty(c)?this.attribs[c].value:null},a.prototype.setAttribute=function(c,d){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.getAttributeNode=function(c){return this.attribs.hasOwnProperty(c)?this.attribs[c]:null},a.prototype.setAttributeNode=function(c){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.removeAttributeNode=function(c){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.getElementsByTagName=function(c){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.getAttributeNS=function(c,d){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.setAttributeNS=function(c,d,f){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.removeAttributeNS=function(c,d){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.getAttributeNodeNS=function(c,d){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.setAttributeNodeNS=function(c){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.getElementsByTagNameNS=function(c,d){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.hasAttribute=function(c){return this.attribs.hasOwnProperty(c)},a.prototype.hasAttributeNS=function(c,d){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.setIdAttribute=function(c,d){return this.attribs.hasOwnProperty(c)?this.attribs[c].isId:d},a.prototype.setIdAttributeNS=function(c,d,f){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.setIdAttributeNode=function(c,d){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.getElementsByTagName=function(c){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.getElementsByTagNameNS=function(c,d){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.getElementsByClassName=function(c){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.isEqualNode=function(c){var d,f,h;if(!a.__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(d=f=0,h=this.attribs.length-1;0<=h?f<=h:f>=h;d=0<=h?++f:--f)if(!this.attribs[d].isEqualNode(c.attribs[d]))return!1;return!0},a}(p)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(j,H,b){"use strict";var I=j("babel-runtime/core-js/object/keys"),v=T(I);function T(y){return y&&y.__esModule?y:{default:y}}(function(){var y;H.exports=y=function(){function g(s){this.nodes=s}return Object.defineProperty(g.prototype,"length",{get:function(){return(0,v.default)(this.nodes).length||0}}),g.prototype.clone=function(){return this.nodes=null},g.prototype.getNamedItem=function(s){return this.nodes[s]},g.prototype.setNamedItem=function(s){var _;return _=this.nodes[s.nodeName],this.nodes[s.nodeName]=s,_||null},g.prototype.removeNamedItem=function(s){var _;return _=this.nodes[s],delete this.nodes[s],_||null},g.prototype.item=function(s){return this.nodes[(0,v.default)(this.nodes)[s]]||null},g.prototype.getNamedItemNS=function(s,_){throw new Error("This DOM method is not implemented.")},g.prototype.setNamedItemNS=function(s){throw new Error("This DOM method is not implemented.")},g.prototype.removeNamedItemNS=function(s,_){throw new Error("This DOM method is not implemented.")},g}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(j,H,b){"use strict";(function(){var I,v,T,y,g,s,_,p,e,o,n,l,r,i,t,a,c,d,f,h={}.hasOwnProperty;f=j("./Utility"),d=f.isObject,c=f.isFunction,a=f.isEmpty,t=f.getValue,p=null,T=null,y=null,g=null,s=null,r=null,i=null,l=null,_=null,v=null,n=null,e=null,I=null,H.exports=o=function(){function u(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=j("./XMLElement"),T=j("./XMLCData"),y=j("./XMLComment"),g=j("./XMLDeclaration"),s=j("./XMLDocType"),r=j("./XMLRaw"),i=j("./XMLText"),l=j("./XMLProcessingInstruction"),_=j("./XMLDummy"),v=j("./NodeType"),n=j("./XMLNodeList"),e=j("./XMLNamedNodeMap"),I=j("./DocumentPosition"))}return Object.defineProperty(u.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(u.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(u.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(u.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(u.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new n(this.children)),this.childNodeList}}),Object.defineProperty(u.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(u.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(u.prototype,"previousSibling",{get:function(){var x;return x=this.parent.children.indexOf(this),this.parent.children[x-1]||null}}),Object.defineProperty(u.prototype,"nextSibling",{get:function(){var x;return x=this.parent.children.indexOf(this),this.parent.children[x+1]||null}}),Object.defineProperty(u.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(u.prototype,"textContent",{get:function(){var x,O,C,w,S;if(this.nodeType===v.Element||this.nodeType===v.DocumentFragment){for(S="",w=this.children,O=0,C=w.length;O<C;O++)x=w[O],x.textContent&&(S+=x.textContent);return S}else return null},set:function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),u.prototype.setParent=function(E){var x,O,C,w,S;for(this.parent=E,E&&(this.options=E.options,this.stringify=E.stringify),w=this.children,S=[],O=0,C=w.length;O<C;O++)x=w[O],S.push(x.setParent(this));return S},u.prototype.element=function(E,x,O){var C,w,S,A,D,M,N,P,z,X,k;if(M=null,x===null&&O==null&&(z=[{},null],x=z[0],O=z[1]),x==null&&(x={}),x=t(x),d(x)||(X=[x,O],O=X[0],x=X[1]),E!=null&&(E=t(E)),Array.isArray(E))for(S=0,N=E.length;S<N;S++)w=E[S],M=this.element(w);else if(c(E))M=this.element(E.apply());else if(d(E))for(D in E){if(!h.call(E,D))continue;if(k=E[D],c(k)&&(k=k.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&D.indexOf(this.stringify.convertAttKey)===0)M=this.attribute(D.substr(this.stringify.convertAttKey.length),k);else if(!this.options.separateArrayItems&&Array.isArray(k)&&a(k))M=this.dummy();else if(d(k)&&a(k))M=this.element(D);else if(!this.options.keepNullNodes&&k==null)M=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(k))for(A=0,P=k.length;A<P;A++)w=k[A],C={},C[D]=w,M=this.element(C);else d(k)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&D.indexOf(this.stringify.convertTextKey)===0?M=this.element(k):(M=this.element(D),M.element(k)):M=this.element(D,k)}else!this.options.keepNullNodes&&O===null?M=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&E.indexOf(this.stringify.convertTextKey)===0?M=this.text(O):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&E.indexOf(this.stringify.convertCDataKey)===0?M=this.cdata(O):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&E.indexOf(this.stringify.convertCommentKey)===0?M=this.comment(O):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&E.indexOf(this.stringify.convertRawKey)===0?M=this.raw(O):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&E.indexOf(this.stringify.convertPIKey)===0?M=this.instruction(E.substr(this.stringify.convertPIKey.length),O):M=this.node(E,x,O);if(M==null)throw new Error("Could not create any elements with: "+E+". "+this.debugInfo());return M},u.prototype.insertBefore=function(E,x,O){var C,w,S,A,D;if(E!=null?E.type:void 0)return S=E,A=x,S.setParent(this),A?(w=children.indexOf(A),D=children.splice(w),children.push(S),Array.prototype.push.apply(children,D)):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),D=this.parent.children.splice(w),C=this.parent.element(E,x,O),Array.prototype.push.apply(this.parent.children,D),C},u.prototype.insertAfter=function(E,x,O){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,x,O),Array.prototype.push.apply(this.parent.children,S),C},u.prototype.remove=function(){var E,x;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(x=[])),this.parent},u.prototype.node=function(E,x,O){var C,w;return E!=null&&(E=t(E)),x||(x={}),x=t(x),d(x)||(w=[x,O],O=w[0],x=w[1]),C=new p(this,E,x),O!=null&&C.text(O),this.children.push(C),C},u.prototype.text=function(E){var x;return d(E)&&this.element(E),x=new i(this,E),this.children.push(x),this},u.prototype.cdata=function(E){var x;return x=new T(this,E),this.children.push(x),this},u.prototype.comment=function(E){var x;return x=new y(this,E),this.children.push(x),this},u.prototype.commentBefore=function(E){var x,O,C;return O=this.parent.children.indexOf(this),C=this.parent.children.splice(O),x=this.parent.comment(E),Array.prototype.push.apply(this.parent.children,C),this},u.prototype.commentAfter=function(E){var x,O,C;return O=this.parent.children.indexOf(this),C=this.parent.children.splice(O+1),x=this.parent.comment(E),Array.prototype.push.apply(this.parent.children,C),this},u.prototype.raw=function(E){var x;return x=new r(this,E),this.children.push(x),this},u.prototype.dummy=function(){var E;return E=new _(this),E},u.prototype.instruction=function(E,x){var O,C,w,S,A;if(E!=null&&(E=t(E)),x!=null&&(x=t(x)),Array.isArray(E))for(S=0,A=E.length;S<A;S++)O=E[S],this.instruction(O);else if(d(E))for(O in E){if(!h.call(E,O))continue;C=E[O],this.instruction(O,C)}else c(x)&&(x=x.apply()),w=new l(this,E,x),this.children.push(w);return this},u.prototype.instructionBefore=function(E,x){var O,C,w;return C=this.parent.children.indexOf(this),w=this.parent.children.splice(C),O=this.parent.instruction(E,x),Array.prototype.push.apply(this.parent.children,w),this},u.prototype.instructionAfter=function(E,x){var O,C,w;return C=this.parent.children.indexOf(this),w=this.parent.children.splice(C+1),O=this.parent.instruction(E,x),Array.prototype.push.apply(this.parent.children,w),this},u.prototype.declaration=function(E,x,O){var C,w;return C=this.document(),w=new g(C,E,x,O),C.children.length===0?C.children.unshift(w):C.children[0].type===v.Declaration?C.children[0]=w:C.children.unshift(w),C.root()||C},u.prototype.dtd=function(E,x){var O,C,w,S,A,D,M,N,P,z;for(C=this.document(),w=new s(C,E,x),P=C.children,S=A=0,M=P.length;A<M;S=++A)if(O=P[S],O.type===v.DocType)return C.children[S]=w,w;for(z=C.children,S=D=0,N=z.length;D<N;S=++D)if(O=z[S],O.isRoot)return C.children.splice(S,0,w),w;return C.children.push(w),w},u.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},u.prototype.root=function(){var E;for(E=this;E;){if(E.type===v.Document)return E.rootObject;if(E.isRoot)return E;E=E.parent}},u.prototype.document=function(){var E;for(E=this;E;){if(E.type===v.Document)return E;E=E.parent}},u.prototype.end=function(E){return this.document().end(E)},u.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]},u.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]},u.prototype.importDocument=function(E){var x;return x=E.root().clone(),x.parent=this,x.isRoot=!1,this.children.push(x),this},u.prototype.debugInfo=function(E){var x,O;return E=E||this.name,E==null&&!((x=this.parent)!=null?x.name:void 0)?"":E==null?"parent: <"+this.parent.name+">":((O=this.parent)!=null?O.name:void 0)?"node: <"+E+">, parent: <"+this.parent.name+">":"node: <"+E+">"},u.prototype.ele=function(E,x,O){return this.element(E,x,O)},u.prototype.nod=function(E,x,O){return this.node(E,x,O)},u.prototype.txt=function(E){return this.text(E)},u.prototype.dat=function(E){return this.cdata(E)},u.prototype.com=function(E){return this.comment(E)},u.prototype.ins=function(E,x){return this.instruction(E,x)},u.prototype.doc=function(){return this.document()},u.prototype.dec=function(E,x,O){return this.declaration(E,x,O)},u.prototype.e=function(E,x,O){return this.element(E,x,O)},u.prototype.n=function(E,x,O){return this.node(E,x,O)},u.prototype.t=function(E){return this.text(E)},u.prototype.d=function(E){return this.cdata(E)},u.prototype.c=function(E){return this.comment(E)},u.prototype.r=function(E){return this.raw(E)},u.prototype.i=function(E,x){return this.instruction(E,x)},u.prototype.u=function(){return this.up()},u.prototype.importXMLBuilder=function(E){return this.importDocument(E)},u.prototype.replaceChild=function(E,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.removeChild=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.appendChild=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.hasChildNodes=function(){return this.children.length!==0},u.prototype.cloneNode=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.isSupported=function(E,x){return!0},u.prototype.hasAttributes=function(){return this.attribs.length!==0},u.prototype.compareDocumentPosition=function(E){var x,O;return x=this,x===E?0:this.document()!==E.document()?(O=I.Disconnected|I.ImplementationSpecific,Math.random()<.5?O|=I.Preceding:O|=I.Following,O):x.isAncestor(E)?I.Contains|I.Preceding:x.isDescendant(E)?I.Contains|I.Following:x.isPreceding(E)?I.Preceding:I.Following},u.prototype.isSameNode=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.lookupPrefix=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.isDefaultNamespace=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.lookupNamespaceURI=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.isEqualNode=function(E){var x,O,C;if(E.nodeType!==this.nodeType)return!1;if(E.children.length!==this.children.length)return!1;for(x=O=0,C=this.children.length-1;0<=C?O<=C:O>=C;x=0<=C?++O:--O)if(!this.children[x].isEqualNode(E.children[x]))return!1;return!0},u.prototype.getFeature=function(E,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.setUserData=function(E,x,O){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.getUserData=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.contains=function(E){return E?E===this||this.isDescendant(E):!1},u.prototype.isDescendant=function(E){var x,O,C,w,S;for(S=this.children,C=0,w=S.length;C<w;C++){if(x=S[C],E===x)return!0;if(O=x.isDescendant(E),O)return!0}return!1},u.prototype.isAncestor=function(E){return E.isDescendant(this)},u.prototype.isPreceding=function(E){var x,O;return x=this.treePosition(E),O=this.treePosition(this),x===-1||O===-1?!1:x<O},u.prototype.isFollowing=function(E){var x,O;return x=this.treePosition(E),O=this.treePosition(this),x===-1||O===-1?!1:x>O},u.prototype.treePosition=function(E){var x,O;return O=0,x=!1,this.foreachTreeNode(this.document(),function(C){if(O++,!x&&C===E)return x=!0}),x?O:-1},u.prototype.foreachTreeNode=function(E,x){var O,C,w,S,A;for(E||(E=this.document()),S=E.children,C=0,w=S.length;C<w;C++){if(O=S[C],A=x(O))return A;if(A=this.foreachTreeNode(O,x),A)return A}},u}()}).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(j,H,b){"use strict";(function(){var I;H.exports=I=function(){function v(T){this.nodes=T}return Object.defineProperty(v.prototype,"length",{get:function(){return this.nodes.length||0}}),v.prototype.clone=function(){return this.nodes=null},v.prototype.item=function(T){return this.nodes[T]||null},v}()}).call(void 0)},{}],275:[function(j,H,b){"use strict";var I=j("babel-runtime/core-js/object/create"),v=T(I);function T(y){return y&&y.__esModule?y:{default:y}}(function(){var y,g,s,_=function(o,n){for(var l in n)p.call(n,l)&&(o[l]=n[l]);function r(){this.constructor=o}return r.prototype=n.prototype,o.prototype=new r,o.__super__=n.prototype,o},p={}.hasOwnProperty;y=j("./NodeType"),g=j("./XMLCharacterData"),H.exports=s=function(e){_(o,e);function o(n,l,r){if(o.__super__.constructor.call(this,n),l==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=y.ProcessingInstruction,this.target=this.stringify.insTarget(l),this.name=this.target,r&&(this.value=this.stringify.insValue(r))}return o.prototype.clone=function(){return(0,v.default)(this)},o.prototype.toString=function(n){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(n))},o.prototype.isEqualNode=function(n){return o.__super__.isEqualNode.apply(this,arguments).isEqualNode(n)?!(n.target!==this.target):!1},o}(g)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],276:[function(j,H,b){"use strict";var I=j("babel-runtime/core-js/object/create"),v=T(I);function T(y){return y&&y.__esModule?y:{default:y}}(function(){var y,g,s,_=function(o,n){for(var l in n)p.call(n,l)&&(o[l]=n[l]);function r(){this.constructor=o}return r.prototype=n.prototype,o.prototype=new r,o.__super__=n.prototype,o},p={}.hasOwnProperty;y=j("./NodeType"),g=j("./XMLNode"),H.exports=s=function(e){_(o,e);function o(n,l){if(o.__super__.constructor.call(this,n),l==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=y.Raw,this.value=this.stringify.raw(l)}return o.prototype.clone=function(){return(0,v.default)(this)},o.prototype.toString=function(n){return this.options.writer.raw(this,this.options.writer.filterOptions(n))},o}(g)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],277:[function(j,H,b){"use strict";(function(){var I,v,T,y,g=function(p,e){for(var o in e)s.call(e,o)&&(p[o]=e[o]);function n(){this.constructor=p}return n.prototype=e.prototype,p.prototype=new n,p.__super__=e.prototype,p},s={}.hasOwnProperty;I=j("./NodeType"),y=j("./XMLWriterBase"),v=j("./WriterState"),H.exports=T=function(_){g(p,_);function p(e,o){this.stream=e,p.__super__.constructor.call(this,o)}return p.prototype.endline=function(e,o,n){return e.isLastRootNode&&o.state===v.CloseTag?"":p.__super__.endline.call(this,e,o,n)},p.prototype.document=function(e,o){var n,l,r,i,t,a,c,d,f;for(c=e.children,l=r=0,t=c.length;r<t;l=++r)n=c[l],n.isLastRootNode=l===e.children.length-1;for(o=this.filterOptions(o),d=e.children,f=[],i=0,a=d.length;i<a;i++)n=d[i],f.push(this.writeChildNode(n,o,0));return f},p.prototype.attribute=function(e,o,n){return this.stream.write(p.__super__.attribute.call(this,e,o,n))},p.prototype.cdata=function(e,o,n){return this.stream.write(p.__super__.cdata.call(this,e,o,n))},p.prototype.comment=function(e,o,n){return this.stream.write(p.__super__.comment.call(this,e,o,n))},p.prototype.declaration=function(e,o,n){return this.stream.write(p.__super__.declaration.call(this,e,o,n))},p.prototype.docType=function(e,o,n){var l,r,i,t;if(n||(n=0),this.openNode(e,o,n),o.state=v.OpenTag,this.stream.write(this.indent(e,o,n)),this.stream.write("<!DOCTYPE "+e.root().name),e.pubID&&e.sysID?this.stream.write(' PUBLIC "'+e.pubID+'" "'+e.sysID+'"'):e.sysID&&this.stream.write(' SYSTEM "'+e.sysID+'"'),e.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(e,o,n)),o.state=v.InsideTag,t=e.children,r=0,i=t.length;r<i;r++)l=t[r],this.writeChildNode(l,o,n+1);o.state=v.CloseTag,this.stream.write("]")}return o.state=v.CloseTag,this.stream.write(o.spaceBeforeSlash+">"),this.stream.write(this.endline(e,o,n)),o.state=v.None,this.closeNode(e,o,n)},p.prototype.element=function(e,o,n){var l,r,i,t,a,c,d,f,h,u;n||(n=0),this.openNode(e,o,n),o.state=v.OpenTag,this.stream.write(this.indent(e,o,n)+"<"+e.name),h=e.attribs;for(d in h){if(!s.call(h,d))continue;l=h[d],this.attribute(l,o,n)}if(i=e.children.length,t=i===0?null:e.children[0],i===0||e.children.every(function(E){return(E.type===I.Text||E.type===I.Raw)&&E.value===""}))o.allowEmpty?(this.stream.write(">"),o.state=v.CloseTag,this.stream.write("</"+e.name+">")):(o.state=v.CloseTag,this.stream.write(o.spaceBeforeSlash+"/>"));else if(o.pretty&&i===1&&(t.type===I.Text||t.type===I.Raw)&&t.value!=null)this.stream.write(">"),o.state=v.InsideTag,o.suppressPrettyCount++,f=!0,this.writeChildNode(t,o,n+1),o.suppressPrettyCount--,f=!1,o.state=v.CloseTag,this.stream.write("</"+e.name+">");else{for(this.stream.write(">"+this.endline(e,o,n)),o.state=v.InsideTag,u=e.children,a=0,c=u.length;a<c;a++)r=u[a],this.writeChildNode(r,o,n+1);o.state=v.CloseTag,this.stream.write(this.indent(e,o,n)+"</"+e.name+">")}return this.stream.write(this.endline(e,o,n)),o.state=v.None,this.closeNode(e,o,n)},p.prototype.processingInstruction=function(e,o,n){return this.stream.write(p.__super__.processingInstruction.call(this,e,o,n))},p.prototype.raw=function(e,o,n){return this.stream.write(p.__super__.raw.call(this,e,o,n))},p.prototype.text=function(e,o,n){return this.stream.write(p.__super__.text.call(this,e,o,n))},p.prototype.dtdAttList=function(e,o,n){return this.stream.write(p.__super__.dtdAttList.call(this,e,o,n))},p.prototype.dtdElement=function(e,o,n){return this.stream.write(p.__super__.dtdElement.call(this,e,o,n))},p.prototype.dtdEntity=function(e,o,n){return this.stream.write(p.__super__.dtdEntity.call(this,e,o,n))},p.prototype.dtdNotation=function(e,o,n){return this.stream.write(p.__super__.dtdNotation.call(this,e,o,n))},p}(y)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(j,H,b){"use strict";(function(){var I,v,T=function(s,_){for(var p in _)y.call(_,p)&&(s[p]=_[p]);function e(){this.constructor=s}return e.prototype=_.prototype,s.prototype=new e,s.__super__=_.prototype,s},y={}.hasOwnProperty;v=j("./XMLWriterBase"),H.exports=I=function(g){T(s,g);function s(_){s.__super__.constructor.call(this,_)}return s.prototype.document=function(_,p){var e,o,n,l,r;for(p=this.filterOptions(p),l="",r=_.children,o=0,n=r.length;o<n;o++)e=r[o],l+=this.writeChildNode(e,p,0);return p.pretty&&l.slice(-p.newline.length)===p.newline&&(l=l.slice(0,-p.newline.length)),l},s}(v)}).call(void 0)},{"./XMLWriterBase":281}],279:[function(j,H,b){"use strict";(function(){var I,v=function(g,s){return function(){return g.apply(s,arguments)}},T={}.hasOwnProperty;H.exports=I=function(){function y(g){this.assertLegalName=v(this.assertLegalName,this),this.assertLegalChar=v(this.assertLegalChar,this);var s,_,p;g||(g={}),this.options=g,this.options.version||(this.options.version="1.0"),_=g.stringify||{};for(s in _){if(!T.call(_,s))continue;p=_[s],this[s]=p}}return y.prototype.name=function(g){return this.options.noValidation?g:this.assertLegalName(""+g||"")},y.prototype.text=function(g){return this.options.noValidation?g:this.assertLegalChar(this.textEscape(""+g||""))},y.prototype.cdata=function(g){return this.options.noValidation?g:(g=""+g||"",g=g.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(g))},y.prototype.comment=function(g){if(this.options.noValidation)return g;if(g=""+g||"",g.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+g);return this.assertLegalChar(g)},y.prototype.raw=function(g){return this.options.noValidation?g:""+g||""},y.prototype.attValue=function(g){return this.options.noValidation?g:this.assertLegalChar(this.attEscape(g=""+g||""))},y.prototype.insTarget=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},y.prototype.insValue=function(g){if(this.options.noValidation)return g;if(g=""+g||"",g.match(/\?>/))throw new Error("Invalid processing instruction value: "+g);return this.assertLegalChar(g)},y.prototype.xmlVersion=function(g){if(this.options.noValidation)return g;if(g=""+g||"",!g.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+g);return g},y.prototype.xmlEncoding=function(g){if(this.options.noValidation)return g;if(g=""+g||"",!g.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+g);return this.assertLegalChar(g)},y.prototype.xmlStandalone=function(g){return this.options.noValidation?g:g?"yes":"no"},y.prototype.dtdPubID=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},y.prototype.dtdSysID=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},y.prototype.dtdElementValue=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},y.prototype.dtdAttType=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},y.prototype.dtdAttDefault=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},y.prototype.dtdEntityValue=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},y.prototype.dtdNData=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},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(g){var s,_;if(this.options.noValidation)return g;if(s="",this.options.version==="1.0"){if(s=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,_=g.match(s))throw new Error("Invalid character in string: "+g+" at index "+_.index)}else if(this.options.version==="1.1"&&(s=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,_=g.match(s)))throw new Error("Invalid character in string: "+g+" at index "+_.index);return g},y.prototype.assertLegalName=function(g){var s;if(this.options.noValidation)return g;if(this.assertLegalChar(g),s=/^([: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])*$/,!g.match(s))throw new Error("Invalid character in name");return g},y.prototype.textEscape=function(g){var s;return this.options.noValidation?g:(s=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,g.replace(s,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))},y.prototype.attEscape=function(g){var s;return this.options.noValidation?g:(s=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,g.replace(s,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))},y}()}).call(void 0)},{}],280:[function(j,H,b){"use strict";var I=j("babel-runtime/core-js/object/create"),v=T(I);function T(y){return y&&y.__esModule?y:{default:y}}(function(){var y,g,s,_=function(o,n){for(var l in n)p.call(n,l)&&(o[l]=n[l]);function r(){this.constructor=o}return r.prototype=n.prototype,o.prototype=new r,o.__super__=n.prototype,o},p={}.hasOwnProperty;y=j("./NodeType"),g=j("./XMLCharacterData"),H.exports=s=function(e){_(o,e);function o(n,l){if(o.__super__.constructor.call(this,n),l==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=y.Text,this.value=this.stringify.text(l)}return Object.defineProperty(o.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(o.prototype,"wholeText",{get:function(){var l,r,i;for(i="",r=this.previousSibling;r;)i=r.data+i,r=r.previousSibling;for(i+=this.data,l=this.nextSibling;l;)i=i+l.data,l=l.nextSibling;return i}}),o.prototype.clone=function(){return(0,v.default)(this)},o.prototype.toString=function(n){return this.options.writer.text(this,this.options.writer.filterOptions(n))},o.prototype.splitText=function(n){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.replaceWholeText=function(n){throw new Error("This DOM method is not implemented."+this.debugInfo())},o}(g)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],281:[function(j,H,b){"use strict";(function(){var I,v,T,y,g,s,_,p,e,o,n,l,r,i,t,a,c,d={}.hasOwnProperty;c=j("./Utility").assign,I=j("./NodeType"),e=j("./XMLDeclaration"),o=j("./XMLDocType"),T=j("./XMLCData"),y=j("./XMLComment"),l=j("./XMLElement"),i=j("./XMLRaw"),t=j("./XMLText"),r=j("./XMLProcessingInstruction"),n=j("./XMLDummy"),g=j("./XMLDTDAttList"),s=j("./XMLDTDElement"),_=j("./XMLDTDEntity"),p=j("./XMLDTDNotation"),v=j("./WriterState"),H.exports=a=function(){function f(h){var u,E,x;h||(h={}),this.options=h,E=h.writer||{};for(u in E){if(!d.call(E,u))continue;x=E[u],this["_"+u]=this[u],this[u]=x}}return f.prototype.filterOptions=function(h){var u,E,x,O,C,w,S,A;return h||(h={}),h=c({},this.options,h),u={writer:this},u.pretty=h.pretty||!1,u.allowEmpty=h.allowEmpty||!1,u.indent=(E=h.indent)!=null?E:" ",u.newline=(x=h.newline)!=null?x:`
|
|
|
`,u.offset=(O=h.offset)!=null?O:0,u.dontPrettyTextNodes=(C=(w=h.dontPrettyTextNodes)!=null?w:h.dontprettytextnodes)!=null?C:0,u.spaceBeforeSlash=(S=(A=h.spaceBeforeSlash)!=null?A:h.spacebeforeslash)!=null?S:"",u.spaceBeforeSlash===!0&&(u.spaceBeforeSlash=" "),u.suppressPrettyCount=0,u.user={},u.state=v.None,u},f.prototype.indent=function(h,u,E){var x;return!u.pretty||u.suppressPrettyCount?"":u.pretty&&(x=(E||0)+u.offset+1,x>0)?new Array(x).join(u.indent):""},f.prototype.endline=function(h,u,E){return!u.pretty||u.suppressPrettyCount?"":u.newline},f.prototype.attribute=function(h,u,E){var x;return this.openAttribute(h,u,E),x=" "+h.name+'="'+h.value+'"',this.closeAttribute(h,u,E),x},f.prototype.cdata=function(h,u,E){var x;return this.openNode(h,u,E),u.state=v.OpenTag,x=this.indent(h,u,E)+"<![CDATA[",u.state=v.InsideTag,x+=h.value,u.state=v.CloseTag,x+="]]>"+this.endline(h,u,E),u.state=v.None,this.closeNode(h,u,E),x},f.prototype.comment=function(h,u,E){var x;return this.openNode(h,u,E),u.state=v.OpenTag,x=this.indent(h,u,E)+"<!-- ",u.state=v.InsideTag,x+=h.value,u.state=v.CloseTag,x+=" -->"+this.endline(h,u,E),u.state=v.None,this.closeNode(h,u,E),x},f.prototype.declaration=function(h,u,E){var x;return this.openNode(h,u,E),u.state=v.OpenTag,x=this.indent(h,u,E)+"<?xml",u.state=v.InsideTag,x+=' version="'+h.version+'"',h.encoding!=null&&(x+=' encoding="'+h.encoding+'"'),h.standalone!=null&&(x+=' standalone="'+h.standalone+'"'),u.state=v.CloseTag,x+=u.spaceBeforeSlash+"?>",x+=this.endline(h,u,E),u.state=v.None,this.closeNode(h,u,E),x},f.prototype.docType=function(h,u,E){var x,O,C,w,S;if(E||(E=0),this.openNode(h,u,E),u.state=v.OpenTag,w=this.indent(h,u,E),w+="<!DOCTYPE "+h.root().name,h.pubID&&h.sysID?w+=' PUBLIC "'+h.pubID+'" "'+h.sysID+'"':h.sysID&&(w+=' SYSTEM "'+h.sysID+'"'),h.children.length>0){for(w+=" [",w+=this.endline(h,u,E),u.state=v.InsideTag,S=h.children,O=0,C=S.length;O<C;O++)x=S[O],w+=this.writeChildNode(x,u,E+1);u.state=v.CloseTag,w+="]"}return u.state=v.CloseTag,w+=u.spaceBeforeSlash+">",w+=this.endline(h,u,E),u.state=v.None,this.closeNode(h,u,E),w},f.prototype.element=function(h,u,E){var x,O,C,w,S,A,D,M,N,P,z,X,k,F;E||(E=0),P=!1,z="",this.openNode(h,u,E),u.state=v.OpenTag,z+=this.indent(h,u,E)+"<"+h.name,X=h.attribs;for(N in X){if(!d.call(X,N))continue;x=X[N],z+=this.attribute(x,u,E)}if(C=h.children.length,w=C===0?null:h.children[0],C===0||h.children.every(function(U){return(U.type===I.Text||U.type===I.Raw)&&U.value===""}))u.allowEmpty?(z+=">",u.state=v.CloseTag,z+="</"+h.name+">"+this.endline(h,u,E)):(u.state=v.CloseTag,z+=u.spaceBeforeSlash+"/>"+this.endline(h,u,E));else if(u.pretty&&C===1&&(w.type===I.Text||w.type===I.Raw)&&w.value!=null)z+=">",u.state=v.InsideTag,u.suppressPrettyCount++,P=!0,z+=this.writeChildNode(w,u,E+1),u.suppressPrettyCount--,P=!1,u.state=v.CloseTag,z+="</"+h.name+">"+this.endline(h,u,E);else{if(u.dontPrettyTextNodes){for(k=h.children,S=0,D=k.length;S<D;S++)if(O=k[S],(O.type===I.Text||O.type===I.Raw)&&O.value!=null){u.suppressPrettyCount++,P=!0;break}}for(z+=">"+this.endline(h,u,E),u.state=v.InsideTag,F=h.children,A=0,M=F.length;A<M;A++)O=F[A],z+=this.writeChildNode(O,u,E+1);u.state=v.CloseTag,z+=this.indent(h,u,E)+"</"+h.name+">",P&&u.suppressPrettyCount--,z+=this.endline(h,u,E),u.state=v.None}return this.closeNode(h,u,E),z},f.prototype.writeChildNode=function(h,u,E){switch(h.type){case I.CData:return this.cdata(h,u,E);case I.Comment:return this.comment(h,u,E);case I.Element:return this.element(h,u,E);case I.Raw:return this.raw(h,u,E);case I.Text:return this.text(h,u,E);case I.ProcessingInstruction:return this.processingInstruction(h,u,E);case I.Dummy:return"";case I.Declaration:return this.declaration(h,u,E);case I.DocType:return this.docType(h,u,E);case I.AttributeDeclaration:return this.dtdAttList(h,u,E);case I.ElementDeclaration:return this.dtdElement(h,u,E);case I.EntityDeclaration:return this.dtdEntity(h,u,E);case I.NotationDeclaration:return this.dtdNotation(h,u,E);default:throw new Error("Unknown XML node type: "+h.constructor.name)}},f.prototype.processingInstruction=function(h,u,E){var x;return this.openNode(h,u,E),u.state=v.OpenTag,x=this.indent(h,u,E)+"<?",u.state=v.InsideTag,x+=h.target,h.value&&(x+=" "+h.value),u.state=v.CloseTag,x+=u.spaceBeforeSlash+"?>",x+=this.endline(h,u,E),u.state=v.None,this.closeNode(h,u,E),x},f.prototype.raw=function(h,u,E){var x;return this.openNode(h,u,E),u.state=v.OpenTag,x=this.indent(h,u,E),u.state=v.InsideTag,x+=h.value,u.state=v.CloseTag,x+=this.endline(h,u,E),u.state=v.None,this.closeNode(h,u,E),x},f.prototype.text=function(h,u,E){var x;return this.openNode(h,u,E),u.state=v.OpenTag,x=this.indent(h,u,E),u.state=v.InsideTag,x+=h.value,u.state=v.CloseTag,x+=this.endline(h,u,E),u.state=v.None,this.closeNode(h,u,E),x},f.prototype.dtdAttList=function(h,u,E){var x;return this.openNode(h,u,E),u.state=v.OpenTag,x=this.indent(h,u,E)+"<!ATTLIST",u.state=v.InsideTag,x+=" "+h.elementName+" "+h.attributeName+" "+h.attributeType,h.defaultValueType!=="#DEFAULT"&&(x+=" "+h.defaultValueType),h.defaultValue&&(x+=' "'+h.defaultValue+'"'),u.state=v.CloseTag,x+=u.spaceBeforeSlash+">"+this.endline(h,u,E),u.state=v.None,this.closeNode(h,u,E),x},f.prototype.dtdElement=function(h,u,E){var x;return this.openNode(h,u,E),u.state=v.OpenTag,x=this.indent(h,u,E)+"<!ELEMENT",u.state=v.InsideTag,x+=" "+h.name+" "+h.value,u.state=v.CloseTag,x+=u.spaceBeforeSlash+">"+this.endline(h,u,E),u.state=v.None,this.closeNode(h,u,E),x},f.prototype.dtdEntity=function(h,u,E){var x;return this.openNode(h,u,E),u.state=v.OpenTag,x=this.indent(h,u,E)+"<!ENTITY",u.state=v.InsideTag,h.pe&&(x+=" %"),x+=" "+h.name,h.value?x+=' "'+h.value+'"':(h.pubID&&h.sysID?x+=' PUBLIC "'+h.pubID+'" "'+h.sysID+'"':h.sysID&&(x+=' SYSTEM "'+h.sysID+'"'),h.nData&&(x+=" NDATA "+h.nData)),u.state=v.CloseTag,x+=u.spaceBeforeSlash+">"+this.endline(h,u,E),u.state=v.None,this.closeNode(h,u,E),x},f.prototype.dtdNotation=function(h,u,E){var x;return this.openNode(h,u,E),u.state=v.OpenTag,x=this.indent(h,u,E)+"<!NOTATION",u.state=v.InsideTag,x+=" "+h.name,h.pubID&&h.sysID?x+=' PUBLIC "'+h.pubID+'" "'+h.sysID+'"':h.pubID?x+=' PUBLIC "'+h.pubID+'"':h.sysID&&(x+=' SYSTEM "'+h.sysID+'"'),u.state=v.CloseTag,x+=u.spaceBeforeSlash+">"+this.endline(h,u,E),u.state=v.None,this.closeNode(h,u,E),x},f.prototype.openNode=function(h,u,E){},f.prototype.closeNode=function(h,u,E){},f.prototype.openAttribute=function(h,u,E){},f.prototype.closeAttribute=function(h,u,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(j,H,b){"use strict";(function(){var I,v,T,y,g,s,_,p,e,o;o=j("./Utility"),p=o.assign,e=o.isFunction,T=j("./XMLDOMImplementation"),y=j("./XMLDocument"),g=j("./XMLDocumentCB"),_=j("./XMLStringWriter"),s=j("./XMLStreamWriter"),I=j("./NodeType"),v=j("./WriterState"),H.exports.create=function(n,l,r,i){var t,a;if(n==null)throw new Error("Root element needs a name.");return i=p({},l,r,i),t=new y(i),a=t.element(n),i.headless||(t.declaration(i),(i.pubID!=null||i.sysID!=null)&&t.dtd(i)),a},H.exports.begin=function(n,l,r){var i;return e(n)&&(i=[n,l],l=i[0],r=i[1],n={}),l?new g(n,l,r):new y(n)},H.exports.stringWriter=function(n){return new _(n)},H.exports.streamWriter=function(n,l){return new s(n,l)},H.exports.implementation=new T,H.exports.nodeType=I,H.exports.writerState=v}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLDOMImplementation":260,"./XMLDocument":268,"./XMLDocumentCB":269,"./XMLStreamWriter":277,"./XMLStringWriter":278}],283:[function(j,H,b){H.exports=v;var I=Object.prototype.hasOwnProperty;function v(){for(var T={},y=0;y<arguments.length;y++){var g=arguments[y];for(var s in g)I.call(g,s)&&(T[s]=g[s])}return T}},{}],284:[function(j,H,b){"use strict";var I=j("buffer").Buffer,v=j("./sha"),T=j("./md5"),y={sha1:v,md5:T},g=64,s=I.alloc(g);s.fill(0);function _(o,n,l){I.isBuffer(n)||(n=I.from(n)),I.isBuffer(l)||(l=I.from(l)),n.length>g?n=o(n):n.length<g&&(n=I.concat([n,s],g));for(var r=I.alloc(g),i=I.alloc(g),t=0;t<g;t++)r[t]=n[t]^54,i[t]=n[t]^92;var a=o(I.concat([r,l]));return o(I.concat([i,a]))}function p(o,n){o=o||"sha1";var l=y[o],r=[],i=0;return l||e("algorithm:",o,"is not yet supported"),{update:function(a){return I.isBuffer(a)||(a=I.from(a)),r.push(a),i+=a.length,this},digest:function(a){var c=I.concat(r),d=n?_(l,n,c):l(c);return r=null,a?d.toString(a):d}}}function e(){var o=[].slice.call(arguments).join(" ");throw new Error([o,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
|
|
|
`))}b.createHash=function(o){return p(o)},b.createHmac=function(o,n){return p(o,n)},b.createCredentials=function(){e("sorry,createCredentials is not implemented yet")},b.createCipher=function(){e("sorry,createCipher is not implemented yet")},b.createCipheriv=function(){e("sorry,createCipheriv is not implemented yet")},b.createDecipher=function(){e("sorry,createDecipher is not implemented yet")},b.createDecipheriv=function(){e("sorry,createDecipheriv is not implemented yet")},b.createSign=function(){e("sorry,createSign is not implemented yet")},b.createVerify=function(){e("sorry,createVerify is not implemented yet")},b.createDiffieHellman=function(){e("sorry,createDiffieHellman is not implemented yet")},b.pbkdf2=function(){e("sorry,pbkdf2 is not implemented yet")}},{"./md5":286,"./sha":287,buffer:73}],285:[function(j,H,b){"use strict";var I=j("buffer").Buffer,v=4,T=I.alloc(v);T.fill(0);var y=8;function g(p,e){if(p.length%v!==0){var o=p.length+(v-p.length%v);p=I.concat([p,T],o)}for(var n=[],l=e?p.readInt32BE:p.readInt32LE,r=0;r<p.length;r+=v)n.push(l.call(p,r));return n}function s(p,e,o){for(var n=I.alloc(e),l=o?n.writeInt32BE:n.writeInt32LE,r=0;r<p.length;r++)l.call(n,p[r],r*4,!0);return n}function _(p,e,o,n){I.isBuffer(p)||(p=I.from(p));var l=e(g(p,n),p.length*y);return s(l,o,n)}H.exports={hash:_}},{buffer:73}],286:[function(j,H,b){"use strict";var I=j("./helpers");function v(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function T(n,l){n[l>>5]|=128<<l%32,n[(l+64>>>9<<4)+14]=l;for(var r=1732584193,i=-271733879,t=-1732584194,a=271733878,c=0;c<n.length;c+=16){var d=r,f=i,h=t,u=a;r=g(r,i,t,a,n[c+0],7,-680876936),a=g(a,r,i,t,n[c+1],12,-389564586),t=g(t,a,r,i,n[c+2],17,606105819),i=g(i,t,a,r,n[c+3],22,-1044525330),r=g(r,i,t,a,n[c+4],7,-176418897),a=g(a,r,i,t,n[c+5],12,1200080426),t=g(t,a,r,i,n[c+6],17,-1473231341),i=g(i,t,a,r,n[c+7],22,-45705983),r=g(r,i,t,a,n[c+8],7,1770035416),a=g(a,r,i,t,n[c+9],12,-1958414417),t=g(t,a,r,i,n[c+10],17,-42063),i=g(i,t,a,r,n[c+11],22,-1990404162),r=g(r,i,t,a,n[c+12],7,1804603682),a=g(a,r,i,t,n[c+13],12,-40341101),t=g(t,a,r,i,n[c+14],17,-1502002290),i=g(i,t,a,r,n[c+15],22,1236535329),r=s(r,i,t,a,n[c+1],5,-165796510),a=s(a,r,i,t,n[c+6],9,-1069501632),t=s(t,a,r,i,n[c+11],14,643717713),i=s(i,t,a,r,n[c+0],20,-373897302),r=s(r,i,t,a,n[c+5],5,-701558691),a=s(a,r,i,t,n[c+10],9,38016083),t=s(t,a,r,i,n[c+15],14,-660478335),i=s(i,t,a,r,n[c+4],20,-405537848),r=s(r,i,t,a,n[c+9],5,568446438),a=s(a,r,i,t,n[c+14],9,-1019803690),t=s(t,a,r,i,n[c+3],14,-187363961),i=s(i,t,a,r,n[c+8],20,1163531501),r=s(r,i,t,a,n[c+13],5,-1444681467),a=s(a,r,i,t,n[c+2],9,-51403784),t=s(t,a,r,i,n[c+7],14,1735328473),i=s(i,t,a,r,n[c+12],20,-1926607734),r=_(r,i,t,a,n[c+5],4,-378558),a=_(a,r,i,t,n[c+8],11,-2022574463),t=_(t,a,r,i,n[c+11],16,1839030562),i=_(i,t,a,r,n[c+14],23,-35309556),r=_(r,i,t,a,n[c+1],4,-1530992060),a=_(a,r,i,t,n[c+4],11,1272893353),t=_(t,a,r,i,n[c+7],16,-155497632),i=_(i,t,a,r,n[c+10],23,-1094730640),r=_(r,i,t,a,n[c+13],4,681279174),a=_(a,r,i,t,n[c+0],11,-358537222),t=_(t,a,r,i,n[c+3],16,-722521979),i=_(i,t,a,r,n[c+6],23,76029189),r=_(r,i,t,a,n[c+9],4,-640364487),a=_(a,r,i,t,n[c+12],11,-421815835),t=_(t,a,r,i,n[c+15],16,530742520),i=_(i,t,a,r,n[c+2],23,-995338651),r=p(r,i,t,a,n[c+0],6,-198630844),a=p(a,r,i,t,n[c+7],10,1126891415),t=p(t,a,r,i,n[c+14],15,-1416354905),i=p(i,t,a,r,n[c+5],21,-57434055),r=p(r,i,t,a,n[c+12],6,1700485571),a=p(a,r,i,t,n[c+3],10,-1894986606),t=p(t,a,r,i,n[c+10],15,-1051523),i=p(i,t,a,r,n[c+1],21,-2054922799),r=p(r,i,t,a,n[c+8],6,1873313359),a=p(a,r,i,t,n[c+15],10,-30611744),t=p(t,a,r,i,n[c+6],15,-1560198380),i=p(i,t,a,r,n[c+13],21,1309151649),r=p(r,i,t,a,n[c+4],6,-145523070),a=p(a,r,i,t,n[c+11],10,-1120210379),t=p(t,a,r,i,n[c+2],15,718787259),i=p(i,t,a,r,n[c+9],21,-343485551),r=e(r,d),i=e(i,f),t=e(t,h),a=e(a,u)}return Array(r,i,t,a)}function y(n,l,r,i,t,a){return e(o(e(e(l,n),e(i,a)),t),r)}function g(n,l,r,i,t,a,c){return y(l&r|~l&i,n,l,t,a,c)}function s(n,l,r,i,t,a,c){return y(l&i|r&~i,n,l,t,a,c)}function _(n,l,r,i,t,a,c){return y(l^r^i,n,l,t,a,c)}function p(n,l,r,i,t,a,c){return y(r^(l|~i),n,l,t,a,c)}function e(n,l){var r=(n&65535)+(l&65535),i=(n>>16)+(l>>16)+(r>>16);return i<<16|r&65535}function o(n,l){return n<<l|n>>>32-l}H.exports=function(l){return I.hash(l,T,16)}},{"./helpers":285}],287:[function(j,H,b){"use strict";var I=j("./helpers");function v(_,p){_[p>>5]|=128<<24-p%32,_[(p+64>>9<<4)+15]=p;for(var e=Array(80),o=1732584193,n=-271733879,l=-1732584194,r=271733878,i=-1009589776,t=0;t<_.length;t+=16){for(var a=o,c=n,d=l,f=r,h=i,u=0;u<80;u++){u<16?e[u]=_[t+u]:e[u]=s(e[u-3]^e[u-8]^e[u-14]^e[u-16],1);var E=g(g(s(o,5),T(u,n,l,r)),g(g(i,e[u]),y(u)));i=r,r=l,l=s(n,30),n=o,o=E}o=g(o,a),n=g(n,c),l=g(l,d),r=g(r,f),i=g(i,h)}return Array(o,n,l,r,i)}function T(_,p,e,o){return _<20?p&e|~p&o:_<40?p^e^o:_<60?p&e|p&o|e&o:p^e^o}function y(_){return _<20?1518500249:_<40?1859775393:_<60?-1894007588:-899497514}function g(_,p){var e=(_&65535)+(p&65535),o=(_>>16)+(p>>16)+(e>>16);return o<<16|e&65535}function s(_,p){return _<<p|_>>>32-p}H.exports=function(p){return I.hash(p,v,20,!0)}},{"./helpers":285}],288:[function(j,H,b){"use strict";H.exports=function(){return function(){}}},{}],289:[function(j,H,b){(function(I){"use strict";var v=j("babel-runtime/helpers/typeof"),T=y(v);function y(o){return o&&o.__esModule?o:{default:o}}var g=j("stream"),s=g.Stream,_=j("../lib/common/utils/isArray"),p=_.isArray;H.exports.string=function(n){return typeof n=="string"},H.exports.array=p,H.exports.buffer=I.isBuffer;function e(o){return o instanceof s}H.exports.writableStream=function(n){return e(n)&&typeof n._write=="function"&&(0,T.default)(n._writableState)==="object"}}).call(this,{isBuffer:j("../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(j,H,b){"use strict";b.encodeURIComponent=function(I){try{return encodeURIComponent(I)}catch(v){return I}},b.escape=j("escape-html"),b.timestamp=function(v){if(v){var T=v;return typeof T=="string"&&(T=Number(T)),String(v).length===10&&(T*=1e3),new Date(T)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(j,H,b){(function(I,v){"use strict";var T=j("babel-runtime/core-js/json/stringify"),y=_(T),g=j("babel-runtime/helpers/typeof"),s=_(g);function _(u){return u&&u.__esModule?u:{default:u}}var p=j("util"),e=j("url"),o=j("http"),n=j("https"),l=j("debug")("urllib"),r=j("humanize-ms"),i,t=0,a=Math.pow(2,31)-10,c=/^https?:\/\//i;function d(u,E){return u===void 0?E:u}function f(u,E){return function(x,O,C){if(x)return E(x);u({data:O,status:C.statusCode,headers:C.headers,res:C})}}b.TIMEOUTS=[r("300s"),r("300s")];var h=["json","text"];b.request=function(E,x,O){return arguments.length===2&&typeof x=="function"&&(O=x,x=null),typeof O=="function"?b.requestWithCallback(E,x,O):(i||(i=j("any-promise")),new i(function(C,w){b.requestWithCallback(E,x,f(C,w))}))},b.requestWithCallback=function(E,x,O){if(!E||typeof E!="string"&&(typeof E=="undefined"?"undefined":(0,s.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 x=="function"&&(O=x,x=null),x=x||{},t>=a&&(t=0);var w=++t;x.requestUrls=x.requestUrls||[];var S={requestId:w,url:E,args:x,ctx:x.ctx};x.emitter&&x.emitter.emit("request",S),x.timeout=x.timeout||b.TIMEOUTS,x.maxRedirects=x.maxRedirects||10,x.streaming=x.streaming||x.customResponse;var A=Date.now(),D;typeof E=="string"?(c.test(E)||(E="http://"+E),D=e.parse(E)):D=E;var M=(x.type||x.method||D.method||"GET").toUpperCase(),N=D.port||80,P=o,z=d(x.agent,b.agent),X=x.fixJSONCtlChars;D.protocol==="https:"&&(P=n,z=d(x.httpsAgent,b.httpsAgent),D.port||(N=443));var k={host:D.hostname||D.host||"localhost",path:D.path||"/",method:M,port:N,agent:z,headers:x.headers||{},lookup:x.lookup};Array.isArray(x.timeout)?k.requestTimeout=x.timeout[x.timeout.length-1]:typeof x.timeout!="undefined"&&(k.requestTimeout=x.timeout);for(var F=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],U=0;U<F.length;U++){var L=F[U];x.hasOwnProperty(L)&&(k[L]=x[L])}k.rejectUnauthorized===!1&&!k.hasOwnProperty("secureOptions")&&(k.secureOptions=j("constants").SSL_OP_NO_TLSv1_2);var B=x.auth||D.auth;B&&(k.auth=B);var Z=x.content||x.data,re=M==="GET"||M==="HEAD"||x.dataAsQueryString;if(!x.content&&(Z&&!(typeof Z=="string"||v.isBuffer(Z))))if(re)Z=x.nestedQuerystring?qs.stringify(Z):querystring.stringify(Z);else{var he=k.headers["Content-Type"]||k.headers["content-type"];he||(x.contentType==="json"?he="application/json":he="application/x-www-form-urlencoded",k.headers["Content-Type"]=he),parseContentType(he).type==="application/json"?Z=(0,y.default)(Z):Z=x.nestedQuerystring?qs.stringify(Z):querystring.stringify(Z)}re&&Z&&(k.path+=(D.query?"&":"?")+Z,Z=null);var Ce=0;if(Z){var ke=Z.length;v.isBuffer(Z)||(ke=v.byteLength(Z)),Ce=k.headers["Content-Length"]=ke}x.dataType==="json"&&(k.headers.Accept="application/json"),typeof x.beforeRequest=="function"&&x.beforeRequest(k);var te=null,Re=null,Te=null,pe=!1,me=!1,se=0,be=-1,ae=!1,fe="",Fe="",ie=null;x.timing&&(ie={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function q(){te&&(clearTimeout(te),te=null)}function Q(){Re&&(clearTimeout(Re),Re=null)}function Y(Me,Et,Oe){if(Q(),!O){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),w,I.pid,k.method,E),Me&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
|
stack: %s`,Date(),w,I.pid,Me.name,Me.message,Me.stack);return}var Ve=O;O=null;var Je={};if(Oe&&(be=Oe.statusCode,Je=Oe.headers),be===401&&Je["www-authenticate"]&&(!x.headers||!x.headers.Authorization)&&x.digestAuth){var Ye=Je["www-authenticate"];if(Ye.indexOf("Digest ")>=0)return l("Request#%d %s: got digest auth header WWW-Authenticate: %s",w,E,Ye),x.headers=x.headers||{},x.headers.Authorization=digestAuthHeader(k.method,k.path,Ye,x.digestAuth),l("Request#%d %s: auth with digest header: %s",w,E,x.headers.Authorization),Oe.headers["set-cookie"]&&(x.headers.Cookie=Oe.headers["set-cookie"].join(";")),b.requestWithCallback(E,x,Ve)}var Pe=Date.now()-A;ie&&(ie.contentDownload=Pe),l("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Pe,se,be,k.method,k.host,k.path,me,ie);var He={status:be,statusCode:be,headers:Je,size:se,aborted:ae,rt:Pe,keepAliveSocket:me,data:Et,requestUrls:x.requestUrls,timing:ie,remoteAddress:fe,remotePort:Fe};if(Me){var ve="";z&&typeof z.getCurrentStatus=="function"&&(ve=", agent status: "+(0,y.default)(z.getCurrentStatus())),Me.message+=", "+k.method+" "+E+" "+be+" (connected: "+pe+", keepalive socket: "+me+ve+`)
|
|
|
headers: `+(0,y.default)(Je),Me.data=Et,Me.path=k.path,Me.status=be,Me.headers=Je,Me.res=He}Ve(Me,Et,x.streaming?Oe:He),x.emitter&&(S.url=E,S.socket=tt&&tt.connection,S.options=k,S.size=Ce,x.emitter.emit("response",{requestId:w,error:Me,ctx:x.ctx,req:S,res:He}))}function oe(Me){var Et=null;if(x.followRedirect&&statuses.redirect[Me.statusCode]){x._followRedirectCount=(x._followRedirectCount||0)+1;var Oe=Me.headers.location;if(!Oe)Et=new Error("Got statusCode "+Me.statusCode+" but cannot resolve next location from headers"),Et.name="FollowRedirectError";else if(x._followRedirectCount>x.maxRedirects)Et=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+E),Et.name="MaxRedirectError";else{var Ve=x.formatRedirectUrl?x.formatRedirectUrl(E,Oe):e.resolve(E,Oe);l("Request#%d %s: `redirected` from %s to %s",w,k.path,E,Ve),Q(),x.headers&&x.headers.Host&&c.test(Oe)&&(x.headers.Host=null);var Je=O;return O=null,b.requestWithCallback(Ve,x,Je),{redirect:!0,error:null}}}return{redirect:!1,error:Et}}!k.headers["User-Agent"]&&!k.headers["user-agent"]&&(k.headers["User-Agent"]=navigator.userAgent),x.gzip&&(!k.headers["Accept-Encoding"]&&!k.headers["accept-encoding"]&&(k.headers["Accept-Encoding"]="gzip"));function le(Me,Et,Oe){var Ve=Me.headers["content-encoding"];return Oe(null,Et,Ve)}var Ee=x.writeStream;l("Request#%d %s %s with headers %j, options.path: %s",w,M,E,k.headers,k.path),x.requestUrls.push(E);function Le(Me){if(ie&&(ie.waiting=Date.now()-A),l("Request#%d %s `req response` event emit: status %d, headers: %j",w,E,Me.statusCode,Me.headers),x.streaming){var Et=oe(Me);if(Et.redirect){Me.resume();return}return Et.error?(Me.resume(),Y(Et.error,null,Me)):Y(null,null,Me)}if(Me.on("close",function(){l("Request#%d %s: `res close` event emit, total size %d",w,E,se)}),Me.on("error",function(){l("Request#%d %s: `res error` event emit, total size %d",w,E,se)}),Me.on("aborted",function(){ae=!0,l("Request#%d %s: `res aborted` event emit, total size %d",w,E,se)}),Ee){var Et=oe(Me);if(Et.redirect){Me.resume();return}return Et.error?(Me.resume(),Ee.end(),Y(Et.error,null,Me)):(x.consumeWriteStream===!1?Me.on("end",Y.bind(null,null,null,Me)):isNode010||isNode012?first([[Ee,"close"],[Me,"aborted"]],function(Je,Ye,Pe){l("Request#%d %s: writeStream or res %s event emitted",w,E,Pe),Y(Te||null,null,Me)}):Ee.on("close",function(){l("Request#%d %s: writeStream close event emitted",w,E),Y(Te||null,null,Me)}),Me.pipe(Ee))}var Oe=[];Me.on("data",function(Ve){l("Request#%d %s: `res data` event emit, size %d",w,E,Ve.length),se+=Ve.length,Oe.push(Ve)}),Me.on("end",function(){var Ve=v.concat(Oe,se);if(l("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",w,E,se,Me._dumped),Te)return Y(Te,Ve,Me);var Je=oe(Me);if(Je.error)return Y(Je.error,Ve,Me);if(Je.redirect)return;le(Me,Ve,function(Ye,Pe,He){if(Ye)return Y(Ye,Ve,Me);if(!He&&h.indexOf(x.dataType)>=0){try{Pe=decodeBodyByCharset(Pe,Me)}catch(xe){return l("decodeBodyByCharset error: %s",xe),Y(null,Pe,Me)}if(x.dataType==="json")if(se===0)Pe=null;else{var ve=parseJSON(Pe,X);ve.error?Ye=ve.error:Pe=ve.data}}ae&&l("Request#%d %s: Remote socket was terminated before `response.end()` was called",w,E),Y(Ye,Pe,Me)})})}var ge,De;Array.isArray(x.timeout)?(ge=r(x.timeout[0]),De=r(x.timeout[1])):ge=De=r(x.timeout),l("ConnectTimeout: %d, ResponseTimeout: %d",ge,De);function _e(){l("Connect timer ticking, timeout: %d",ge),te=setTimeout(function(){te=null,be===-1&&(be=-2);var Me="Connect timeout for "+ge+"ms",Et="ConnectionTimeoutError";tt.socket||(Et="SocketAssignTimeoutError",Me+=", working sockets is full"),Te=new Error(Me),Te.name=Et,Te.requestId=w,l("ConnectTimeout: Request#%d %s %s: %s, connected: %s",w,E,Te.name,Me,pe),ze()},ge)}function Xe(){l("Response timer ticking, timeout: %d",De),Re=setTimeout(function(){Re=null;var Me="Response timeout for "+De+"ms",Et="ResponseTimeoutError";Te=new Error(Me),Te.name=Et,Te.requestId=w,l("ResponseTimeout: Request#%d %s %s: %s, connected: %s",w,E,Te.name,Me,pe),ze()},De)}var tt;k.mode=x.mode?x.mode:"";try{tt=P.request(k,Le)}catch(Me){return Y(Me)}typeof window=="undefined"?_e():tt.on("requestTimeout",function(){be===-1&&(be=-2);var Me="Connect timeout for "+ge+"ms",Et="ConnectionTimeoutError";Te=new Error(Me),Te.name=Et,Te.requestId=w,ze()});function ze(){l("Request#%d %s abort, connected: %s",w,E,pe),tt.socket||(Te.noSocket=!0,Y(Te)),tt.abort()}return ie&&tt.on("finish",function(){ie.requestSent=Date.now()-A}),tt.once("socket",function(Me){ie&&(ie.queuing=Date.now()-A),isNode010&&Me.socket&&(Me=Me.socket);var Et=Me.readyState;if(Et==="opening"){Me.once("lookup",function(Oe,Ve,Je){l("Request#%d %s lookup: %s, %s, %s",w,E,Oe,Ve,Je),ie&&(ie.dnslookup=Date.now()-A),Ve&&(fe=Ve)}),Me.once("connect",function(){ie&&(ie.connected=Date.now()-A),q(),Xe(),l("Request#%d %s new socket connected",w,E),pe=!0,fe||(fe=Me.remoteAddress),Fe=Me.remotePort});return}l("Request#%d %s reuse socket connected, readyState: %s",w,E,Et),pe=!0,me=!0,fe||(fe=Me.remoteAddress),Fe=Me.remotePort,q(),Xe()}),tt.on("error",function(Me){(Me.name==="Error"||Me.name==="TypeError")&&(Me.name=pe?"ResponseError":"RequestError"),Me.message+=' (req "error")',l("Request#%d %s `req error` event emit, %s: %s",w,E,Me.name,Me.message),Y(Te||Me)}),Ee&&Ee.once("error",function(Me){Me.message+=' (writeStream "error")',Te=Me,l("Request#%d %s `writeStream error` event emit, %s: %s",w,E,Me.name,Me.message),ze()}),x.stream?(x.stream.pipe(tt),x.stream.once("error",function(Me){Me.message+=' (stream "error")',Te=Me,l("Request#%d %s `readStream error` event emit, %s: %s",w,E,Me.name,Me.message),ze()})):tt.end(Z),tt.requestId=w,tt}}).call(this,j("_process"),j("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(j,H,b){j.exports=b.p+"static/disappoint2.7a4bdf92.svg"},n6Qo:function(j,H,b){"use strict";b.d(H,"a",function(){return p});var I=b("q1tI"),v=b("biw7"),T=b("fyJ8");function y(e){var o=e.className,n=e.index,l=e.children,r=e.colSpan,i=e.rowSpan,t=I.useContext(v.a),a=t.prefixCls,c=t.fixedInfoList,d=c[n];return I.createElement(T.a,Object.assign({className:o,index:n,component:"td",prefixCls:a,record:null,dataIndex:null,render:function(){return{children:l,props:{colSpan:r,rowSpan:i}}}},d))}function g(e){return I.createElement("tr",Object.assign({},e))}function s(e){var o=e.children,n=I.useContext(v.a),l=n.prefixCls;return I.createElement("tfoot",{className:"".concat(l,"-summary")},o)}var _=H.b=s,p={Cell:y,Row:g}},nEHx:function(j,H,b){"use strict";b.d(H,"a",function(){return I});var I;(function(v){v.DARK="dark",v.LIGHT="light",v.HIGH_CONTRAST="hc"})(I||(I={}))},nKGa:function(j,H,b){j.exports=b.p+"static/export_exercise-template.f7655c19.png"},nWbc:function(j,H,b){},nnTU:function(j,H,b){"use strict";b.d(H,"b",function(){return _}),b.d(H,"a",function(){return p});var I=b("MI8n"),v=b("JYp7"),T=b("pmY6"),y=b("24hK"),g=b("746U"),s=b("Cg/j");const _=Object(s.c)("commandService"),p=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new I.b,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,o){if(!e)throw new Error("invalid command");if(typeof e=="string"){if(!o)throw new Error("invalid command");return this.registerCommand({id:e,handler:o})}if(e.description){const t=[];for(let c of e.description.args)t.push(c.constraint);const a=e.handler;e.handler=function(c,...d){return Object(g.o)(d,t),a(c,...d)}}const{id:n}=e;let l=this._commands.get(n);l||(l=new y.a,this._commands.set(n,l));let r=l.unshift(e),i=Object(T.i)(()=>{r();const t=this._commands.get(n);(t==null?void 0:t.isEmpty())&&this._commands.delete(n)});return this._onDidRegisterCommand.fire(n),i}registerCommandAlias(e,o){return p.registerCommand(e,(n,...l)=>n.get(_).executeCommand(o,...l))}getCommand(e){const o=this._commands.get(e);return!o||o.isEmpty()?void 0:v.a.first(o)}getCommands(){const e=new Map;for(const o of this._commands.keys()){const n=this.getCommand(o);n&&e.set(o,n)}return e}};p.registerCommand("noop",()=>{})},nukY:function(j,H){j.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(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("OLod"))})(this,function(I){return I.pad.Iso10126={pad:function(v,T){var y=T*4,g=y-v.sigBytes%y;v.concat(I.lib.WordArray.random(g-1)).concat(I.lib.WordArray.create([g<<24],1))},unpad:function(v){var T=v.words[v.sigBytes-1>>>2]&255;v.sigBytes-=T}},I.pad.Iso10126})},onxn:function(j,H){j.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(j,H,b){(function(I){I(b("VrN/"))})(function(I){"use strict";var v=I.Pos;function T(c,d){return c.line-d.line||c.ch-d.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",g=y+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",s=new RegExp("<(/?)(["+y+"]["+g+"]*)","g");function _(c,d,f,h){this.line=d,this.ch=f,this.cm=c,this.text=c.getLine(d),this.min=h?Math.max(h.from,c.firstLine()):c.firstLine(),this.max=h?Math.min(h.to-1,c.lastLine()):c.lastLine()}function p(c,d){var f=c.cm.getTokenTypeAt(v(c.line,d));return f&&/\btag\b/.test(f)}function e(c){return c.line>=c.max?void 0:(c.ch=0,c.text=c.cm.getLine(++c.line),!0)}function o(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 d=c.text.indexOf(">",c.ch);if(d==-1){if(e(c))continue;return}if(!p(c,d+1)){c.ch=d+1;continue}var f=c.text.lastIndexOf("/",d),h=f>-1&&!/\S/.test(c.text.slice(f+1,d));return c.ch=d+1,h?"selfClose":"regular"}}function l(c){for(;;){var d=c.ch?c.text.lastIndexOf("<",c.ch-1):-1;if(d==-1){if(o(c))continue;return}if(!p(c,d+1)){c.ch=d;continue}s.lastIndex=d,c.ch=d;var f=s.exec(c.text);if(f&&f.index==d)return f}}function r(c){for(;;){s.lastIndex=c.ch;var d=s.exec(c.text);if(!d){if(e(c))continue;return}if(!p(c,d.index+1)){c.ch=d.index+1;continue}return c.ch=d.index+d[0].length,d}}function i(c){for(;;){var d=c.ch?c.text.lastIndexOf(">",c.ch-1):-1;if(d==-1){if(o(c))continue;return}if(!p(c,d+1)){c.ch=d;continue}var f=c.text.lastIndexOf("/",d),h=f>-1&&!/\S/.test(c.text.slice(f+1,d));return c.ch=d+1,h?"selfClose":"regular"}}function t(c,d){for(var f=[];;){var h=r(c),u,E=c.line,x=c.ch-(h?h[0].length:0);if(!h||!(u=n(c)))return;if(u=="selfClose")continue;if(h[1]){for(var O=f.length-1;O>=0;--O)if(f[O]==h[2]){f.length=O;break}if(O<0&&(!d||d==h[2]))return{tag:h[2],from:v(E,x),to:v(c.line,c.ch)}}else f.push(h[2])}}function a(c,d){for(var f=[];;){var h=i(c);if(!h)return;if(h=="selfClose"){l(c);continue}var u=c.line,E=c.ch,x=l(c);if(!x)return;if(x[1])f.push(x[2]);else{for(var O=f.length-1;O>=0;--O)if(f[O]==x[2]){f.length=O;break}if(O<0&&(!d||d==x[2]))return{tag:x[2],from:v(c.line,c.ch),to:v(u,E)}}}}I.registerHelper("fold","xml",function(c,d){for(var f=new _(c,d.line,0);;){var h=r(f);if(!h||f.line!=d.line)return;var u=n(f);if(!u)return;if(!h[1]&&u!="selfClose"){var E=v(f.line,f.ch),x=t(f,h[2]);return x&&T(x.from,E)>0?{from:E,to:x.from}:null}}}),I.findMatchingTag=function(c,d,f){var h=new _(c,d.line,d.ch,f);if(h.text.indexOf(">")==-1&&h.text.indexOf("<")==-1)return;var u=n(h),E=u&&v(h.line,h.ch),x=u&&l(h);if(!u||!x||T(h,d)>0)return;var O={from:v(h.line,h.ch),to:E,tag:x[2]};return u=="selfClose"?{open:O,close:null,at:"open"}:x[1]?{open:a(h,x[2]),close:O,at:"close"}:(h=new _(c,E.line,E.ch,f),{open:O,close:t(h,x[2]),at:"open"})},I.findEnclosingTag=function(c,d,f,h){for(var u=new _(c,d.line,d.ch,f);;){var E=a(u,h);if(!E)break;var x=new _(c,d.line,d.ch,f),O=t(x,E.tag);if(O)return{open:E,close:O}}},I.scanForClosingTag=function(c,d,f,h){var u=new _(c,d.line,d.ch,h?{from:0,to:h}:null);return t(u,f)}})},p4vh:function(j,H){j.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(j,H,b){"use strict";var I=b("+L6B"),v=b("2/Rp"),T=b("5Dmo"),y=b("3S7+"),g=b("k1fw"),s=b("9og8"),_=b("tJVT"),p=b("WmNS"),e=b.n(p),o=b("q1tI"),n=b.n(o),l=b("vHTk"),r=b.n(l),i=b("yEEn"),t=b("ZW9T"),a=b("1vsH"),c=b("V0Rq"),d=b("m3rI");H.a=function(f){var h,u,E,x,O,C,w,S=f.editOffice,A=S===void 0?"view":S,D=f.data,M=f.theme,N=f.type,P=f.filename,z=f.monacoEditor,X=f.className,k=f.style,F=f.close,U=f.onClose,L=f.hasMask,B=f.disabledDownload,Z=Object(o.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),re=Object(_.a)(Z,2),he=re[0],Ce=re[1],ke=Object(o.useState)(""),te=Object(_.a)(ke,2),Re=te[0],Te=te[1],pe=Object(o.useState)(),me=Object(_.a)(pe,2),se=me[0],be=me[1],ae=window.ENV==="build"?"/react/build":"",fe=d.a.PROXY_SERVER||location.origin,Fe,ie=1024*1024,q=10*ie,Q=Object(o.useRef)();(h=D)!==null&&h!==void 0&&h.startsWith("/api")&&N!=="txt"&&(D=d.a.API_SERVER+D),N==="office"&&(Fe=Object(a.T)(D).filesize,Fe>q&&(N="other")),P&&z&&(z.filename=P),Object(o.useEffect)(function(){var Ee,Le,ge=(Ee=document.cookie)===null||Ee===void 0||((Le=Ee.replace(/\s/g,""))===null||Le===void 0)?void 0:Le.split(";");ge==null||ge.map(function(De){var _e=De.split("=");_e[0]==="_educoder_session"&&Te(_e[1])})},[]),Object(o.useEffect)(function(){N==="office"&&Y()},[N,D]);var Y=function(){var Ee=Object(s.a)(e.a.mark(function Le(){var ge,De,_e;return e.a.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return console.log("data:",D),ge=D,D.startsWith("http")||(ge=location.origin+ge),De=new URL(ge).pathname.split("/").pop(),tt.next=6,Object(c.V)({attachment_id:De});case 6:_e=tt.sent,be(_e);case 8:case"end":return tt.stop()}},Le)}));return function(){return Ee.apply(this,arguments)}}(),oe=function(){if(D.startsWith("http")||D.startsWith("blob:")){le();return}Object(a.z)(P||"educoder",D,P)},le=function(){Object(a.x)(P||"educoder",decodeURIComponent(D))};return n.a.createElement("div",{style:Object(g.a)({},k||{}),className:"".concat(L&&r.a.bgBlack," ").concat(N?r.a.wrp:"hide")},F&&n.a.createElement("div",{className:r.a.close,ref:Q},!B&&n.a.createElement(y.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return Q.current}},n.a.createElement("span",{onClick:le},n.a.createElement("i",{className:"icon-quxiaozhiding"}))),n.a.createElement(y.a,{title:"\u5173\u95ED",getPopupContainer:function(){return Q.current}},n.a.createElement("span",{className:"",onClick:U},n.a.createElement("i",{className:"icon-guanbi1"})))),n.a.createElement("div",{className:"".concat(r.a[X]," ").concat(X," ").concat(r.a.monaco," ").concat(N==="txt"?"show":"hide")},N==="txt"&&n.a.createElement(t.b,z)),N==="audio"&&n.a.createElement("audio",{src:"".concat(((u=D)===null||u===void 0?void 0:u.indexOf("http://"))>-1||((E=D)===null||E===void 0?void 0:E.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(D),autoPlay:!0}),N==="video"&&n.a.createElement(n.a.Fragment,null,((x=D)===null||x===void 0?void 0:x.indexOf("http"))>-1?n.a.createElement("video",{controls:!0,src:"".concat(D),autoPlay:!0}):n.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(D),autoPlay:!0})),N==="office"&&se&&n.a.createElement("iframe",{src:"".concat(ae,"/office.html?key=").concat(se.key,"&url=").concat(fe+se.url,"&callbackUrl=").concat(fe+se.callbackUrl,"&fileType=").concat(se.fileType,"&title=").concat(se.title,"&model=").concat(A,"&officeServer=").concat(d.a.OFFICE_SERVER,"&disabledDownload=").concat(!!B)}),N==="html"&&n.a.createElement("iframe",{src:D+"&disposition=inline"}),N==="pdf"&&n.a.createElement("iframe",{src:"".concat(ae,"/js/pdfview/index.html?url=").concat(D,"&disabledDownload=").concat(!!B)}),N==="image"&&n.a.createElement("img",{src:"".concat(((O=D)===null||O===void 0?void 0:O.indexOf("http://"))>-1||((C=D)===null||C===void 0?void 0:C.indexOf("https://"))>-1||(w=D)!==null&&w!==void 0&&w.startsWith("/api")?"":"data:image/png;base64,").concat(D)}),N==="other"&&n.a.createElement("div",null,n.a.createElement(v.a,{type:"primary",size:"large",onClick:oe},n.a.createElement(i.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),N==="download"&&n.a.createElement(v.a,{type:"primary",size:"large",onClick:oe},n.a.createElement(i.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(j,H,b){},pA7S:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("ETIr"),b("cv67"),b("K3mO"),b("OLod"))})(this,function(I){return function(){var v=I,T=v.lib,y=T.WordArray,g=T.BlockCipher,s=v.algo,_=[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],e=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],o=[{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],l=s.DES=g.extend({_doReset:function(){for(var a=this._key,c=a.words,d=[],f=0;f<56;f++){var h=_[f]-1;d[f]=c[h>>>5]>>>31-h%32&1}for(var u=this._subKeys=[],E=0;E<16;E++){for(var x=u[E]=[],O=e[E],f=0;f<24;f++)x[f/6|0]|=d[(p[f]-1+O)%28]<<31-f%6,x[4+(f/6|0)]|=d[28+(p[f+24]-1+O)%28]<<31-f%6;x[0]=x[0]<<1|x[0]>>>31;for(var f=1;f<7;f++)x[f]=x[f]>>>(f-1)*4+3;x[7]=x[7]<<5|x[7]>>>27}for(var C=this._invSubKeys=[],f=0;f<16;f++)C[f]=u[15-f]},encryptBlock:function(a,c){this._doCryptBlock(a,c,this._subKeys)},decryptBlock:function(a,c){this._doCryptBlock(a,c,this._invSubKeys)},_doCryptBlock:function(a,c,d){this._lBlock=a[c],this._rBlock=a[c+1],r.call(this,4,252645135),r.call(this,16,65535),i.call(this,2,858993459),i.call(this,8,16711935),r.call(this,1,1431655765);for(var f=0;f<16;f++){for(var h=d[f],u=this._lBlock,E=this._rBlock,x=0,O=0;O<8;O++)x|=o[O][((E^h[O])&n[O])>>>0];this._lBlock=E,this._rBlock=u^x}var C=this._lBlock;this._lBlock=this._rBlock,this._rBlock=C,r.call(this,1,1431655765),i.call(this,8,16711935),i.call(this,2,858993459),r.call(this,16,65535),r.call(this,4,252645135),a[c]=this._lBlock,a[c+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function r(a,c){var d=(this._lBlock>>>a^this._rBlock)&c;this._rBlock^=d,this._lBlock^=d<<a}function i(a,c){var d=(this._rBlock>>>a^this._lBlock)&c;this._lBlock^=d,this._rBlock^=d<<a}v.DES=g._createHelper(l);var t=s.TripleDES=g.extend({_doReset:function(){var a=this._key,c=a.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 d=c.slice(0,2),f=c.length<4?c.slice(0,2):c.slice(2,4),h=c.length<6?c.slice(0,2):c.slice(4,6);this._des1=l.createEncryptor(y.create(d)),this._des2=l.createEncryptor(y.create(f)),this._des3=l.createEncryptor(y.create(h))},encryptBlock:function(a,c){this._des1.encryptBlock(a,c),this._des2.decryptBlock(a,c),this._des3.encryptBlock(a,c)},decryptBlock:function(a,c){this._des3.decryptBlock(a,c),this._des2.encryptBlock(a,c),this._des1.decryptBlock(a,c)},keySize:192/32,ivSize:64/32,blockSize:64/32});v.TripleDES=g._createHelper(t)}(),I.TripleDES})},pmY6:function(j,H,b){"use strict";b.d(H,"h",function(){return o}),b.d(H,"g",function(){return l}),b.d(H,"f",function(){return r}),b.d(H,"e",function(){return i}),b.d(H,"i",function(){return t}),b.d(H,"b",function(){return a}),b.d(H,"a",function(){return c}),b.d(H,"d",function(){return d}),b.d(H,"c",function(){return f});var I=b("C/vA"),v=b("JYp7");const T=!1;let y=null;function g(h){y=h}if(T){const h="__is_disposable_tracked__";g(new class{trackDisposable(u){const E=new Error("Potentially leaked disposable").stack;setTimeout(()=>{u[h]||console.log(E)},3e3)}setParent(u,E){if(u&&u!==c.None)try{u[h]=!0}catch(x){}}markAsDisposed(u){if(u&&u!==c.None)try{u[h]=!0}catch(E){}}markAsSingleton(u){}})}function s(h){return y==null||y.trackDisposable(h),h}function _(h){y==null||y.markAsDisposed(h)}function p(h,u){y==null||y.setParent(h,u)}function e(h,u){if(!y)return;for(const E of h)y.setParent(E,u)}function o(h){return y==null||y.markAsSingleton(h),h}class n extends Error{constructor(h){super(`Encountered errors while disposing of store. Errors: [${h.join(", ")}]`);this.errors=h}}function l(h){return typeof h.dispose=="function"&&h.dispose.length===0}function r(h){if(v.a.is(h)){let u=[];for(const E of h)if(E)try{E.dispose()}catch(x){u.push(x)}if(u.length===1)throw u[0];if(u.length>1)throw new n(u);return Array.isArray(h)?[]:h}else if(h)return h.dispose(),h}function i(...h){const u=t(()=>r(h));return e(h,u),u}function t(h){const u=s({dispose:Object(I.a)(()=>{_(u),h()})});return u}class a{constructor(){this._toDispose=new Set,this._isDisposed=!1,s(this)}dispose(){if(this._isDisposed)return;_(this),this._isDisposed=!0,this.clear()}clear(){try{r(this._toDispose.values())}finally{this._toDispose.clear()}}add(h){if(!h)return h;if(h===this)throw new Error("Cannot register a disposable on itself!");return p(h,this),this._isDisposed?a.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(h),h}}a.DISABLE_DISPOSED_WARNING=!1;class c{constructor(){this._store=new a,s(this),p(this._store,this)}dispose(){_(this),this._store.dispose()}_register(h){if(h===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(h)}}c.None=Object.freeze({dispose(){}});class d{constructor(){this._isDisposed=!1,s(this)}get value(){return this._isDisposed?void 0:this._value}set value(h){var u;if(this._isDisposed||h===this._value)return;(u=this._value)===null||u===void 0||u.dispose(),h&&p(h,this),this._value=h}clear(){this.value=void 0}dispose(){var h;this._isDisposed=!0,_(this),(h=this._value)===null||h===void 0||h.dispose(),this._value=void 0}clearAndLeak(){const h=this._value;return this._value=void 0,h&&p(h,null),h}}class f{constructor(h){this.object=h}dispose(){}}},popq:function(j,H,b){},psGv:function(j,H,b){var I,v;(function(){var T;(function(){"use strict";var _=[,,function(n){function l(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=[]}l.prototype.clone_empty=function(){var t=new l(this.__parent);return t.set_indent(this.__indent_count,this.__alignment_count),t},l.prototype.item=function(t){return t<0?this.__items[this.__items.length+t]:this.__items[t]},l.prototype.has_match=function(t){for(var a=this.__items.length-1;a>=0;a--)if(this.__items[a].match(t))return!0;return!1},l.prototype.set_indent=function(t,a){this.is_empty()&&(this.__indent_count=t||0,this.__alignment_count=a||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},l.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)},l.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},l.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},l.prototype.is_empty=function(){return this.__items.length===0},l.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},l.prototype.push=function(t){this.__items.push(t);var a=t.lastIndexOf(`
|
|
|
`);a!==-1?this.__character_count=t.length-a:this.__character_count+=t.length},l.prototype.pop=function(){var t=null;return this.is_empty()||(t=this.__items.pop(),this.__character_count-=t.length),t},l.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},l.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},l.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},l.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 r(t,a){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)),a=a||"",t.indent_level>0&&(a=new Array(t.indent_level+1).join(this.__indent_string)),this.__base_string=a,this.__base_string_length=a.length}r.prototype.get_indent_size=function(t,a){var c=this.__base_string_length;return a=a||0,t<0&&(c=0),c+=t*this.__indent_size,c+=a,c},r.prototype.get_indent_string=function(t,a){var c=this.__base_string;return a=a||0,t<0&&(t=0,c=""),a+=t*this.__indent_size,this.__ensure_cache(a),c+=this.__cache[a],c},r.prototype.__ensure_cache=function(t){for(;t>=this.__cache.length;)this.__add_column()},r.prototype.__add_column=function(){var t=this.__cache.length,a=0,c="";this.__indent_size&&t>=this.__indent_size&&(a=Math.floor(t/this.__indent_size),t-=a*this.__indent_size,c=new Array(a+1).join(this.__indent_string)),t&&(c+=new Array(t+1).join(" ")),this.__cache.push(c)};function i(t,a){this.__indent_cache=new r(t,a),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 l(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(t,a){return this.__indent_cache.get_indent_string(t,a)},i.prototype.get_indent_size=function(t,a){return this.__indent_cache.get_indent_size(t,a)},i.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},i.prototype.add_new_line=function(t){return this.is_empty()||!t&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},i.prototype.get_code=function(t){this.trim(!0);var a=this.current_line.pop();a&&(a[a.length-1]===`
|
|
|
`&&(a=a.replace(/\n+$/g,"")),this.current_line.push(a)),this._end_with_newline&&this.__add_outputline();var c=this.__lines.join(`
|
|
|
`);return t!==`
|
|
|
`&&(c=c.replace(/[\n]/g,t)),c},i.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},i.prototype.set_indent=function(t,a){return t=t||0,a=a||0,this.next_line.set_indent(t,a),this.__lines.length>1?(this.current_line.set_indent(t,a),!0):(this.current_line.set_indent(),!1)},i.prototype.add_raw_token=function(t){for(var a=0;a<t.newlines;a++)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},i.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()},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(t){for(var a=this.__lines.length;t<a;)this.__lines[t]._remove_indent(),t++;this.current_line._remove_wrap_indent()},i.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},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(t,a){for(var c=this.__lines.length-2;c>=0;){var d=this.__lines[c];if(d.is_empty())break;if(d.item(0).indexOf(t)!==0&&d.item(-1)!==a){this.__lines.splice(c+1,0,new l(this)),this.previous_line=this.__lines[this.__lines.length-2];break}c--}},n.exports.Output=i},function(n){function l(r,i,t,a){this.type=r,this.text=i,this.comments_before=null,this.newlines=t||0,this.whitespace_before=a||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}n.exports.Token=l},,,function(n){function l(t,a){this.raw_options=r(t,a),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"])}l.prototype._get_array=function(t,a){var c=this.raw_options[t],d=a||[];return typeof c=="object"?c!==null&&typeof c.concat=="function"&&(d=c.concat()):typeof c=="string"&&(d=c.split(/[^a-zA-Z0-9_\/\-]+/)),d},l.prototype._get_boolean=function(t,a){var c=this.raw_options[t],d=c===void 0?!!a:!!c;return d},l.prototype._get_characters=function(t,a){var c=this.raw_options[t],d=a||"";return typeof c=="string"&&(d=c.replace(/\\r/,"\r").replace(/\\n/,`
|
|
|
`).replace(/\\t/," ")),d},l.prototype._get_number=function(t,a){var c=this.raw_options[t];a=parseInt(a,10),isNaN(a)&&(a=0);var d=parseInt(c,10);return isNaN(d)&&(d=a),d},l.prototype._get_selection=function(t,a,c){var d=this._get_selection_list(t,a,c);if(d.length!==1)throw new Error("Invalid Option Value: The option '"+t+`' can only be one of the following values:
|
|
|
`+a+`
|
|
|
You passed in: '`+this.raw_options[t]+"'");return d[0]},l.prototype._get_selection_list=function(t,a,c){if(!a||a.length===0)throw new Error("Selection list cannot be empty.");if(c=c||[a[0]],!this._is_valid_selection(c,a))throw new Error("Invalid Default Value!");var d=this._get_array(t,c);if(!this._is_valid_selection(d,a))throw new Error("Invalid Option Value: The option '"+t+`' can contain only the following values:
|
|
|
`+a+`
|
|
|
You passed in: '`+this.raw_options[t]+"'");return d},l.prototype._is_valid_selection=function(t,a){return t.length&&a.length&&!t.some(function(c){return a.indexOf(c)===-1})};function r(t,a){var c={};t=i(t);var d;for(d in t)d!==a&&(c[d]=t[d]);if(a&&t[a])for(d in t[a])c[d]=t[a][d];return c}function i(t){var a={},c;for(c in t){var d=c.replace(/-/g,"_");a[d]=t[c]}return a}n.exports.Options=l,n.exports.normalizeOpts=i,n.exports.mergeOpts=r},,function(n){var l=RegExp.prototype.hasOwnProperty("sticky");function r(i){this.__input=i||"",this.__input_length=this.__input.length,this.__position=0}r.prototype.restart=function(){this.__position=0},r.prototype.back=function(){this.__position>0&&(this.__position-=1)},r.prototype.hasNext=function(){return this.__position<this.__input_length},r.prototype.next=function(){var i=null;return this.hasNext()&&(i=this.__input.charAt(this.__position),this.__position+=1),i},r.prototype.peek=function(i){var t=null;return i=i||0,i+=this.__position,i>=0&&i<this.__input_length&&(t=this.__input.charAt(i)),t},r.prototype.__match=function(i,t){i.lastIndex=t;var a=i.exec(this.__input);return a&&!(l&&i.sticky)&&(a.index!==t&&(a=null)),a},r.prototype.test=function(i,t){return t=t||0,t+=this.__position,t>=0&&t<this.__input_length?!!this.__match(i,t):!1},r.prototype.testChar=function(i,t){var a=this.peek(t);return i.lastIndex=0,a!==null&&i.test(a)},r.prototype.match=function(i){var t=this.__match(i,this.__position);return t?this.__position+=t[0].length:t=null,t},r.prototype.read=function(i,t,a){var c="",d;return i&&(d=this.match(i),d&&(c+=d[0])),t&&(d||!i)&&(c+=this.readUntil(t,a)),c},r.prototype.readUntil=function(i,t){var a="",c=this.__position;i.lastIndex=this.__position;var d=i.exec(this.__input);return d?(c=d.index,t&&(c+=d[0].length)):c=this.__input_length,a=this.__input.substring(this.__position,c),this.__position=c,a},r.prototype.readUntilAfter=function(i){return this.readUntil(i,!0)},r.prototype.get_regexp=function(i,t){var a=null,c="g";return t&&l&&(c="y"),typeof i=="string"&&i!==""?a=new RegExp(i,c):i&&(a=new RegExp(i.source,c)),a},r.prototype.get_literal_regexp=function(i){return RegExp(i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},r.prototype.peekUntilAfter=function(i){var t=this.__position,a=this.readUntilAfter(i);return this.__position=t,a},r.prototype.lookBack=function(i){var t=this.__position-1;return t>=i.length&&this.__input.substring(t-i.length,t).toLowerCase()===i},n.exports.InputScanner=r},function(n,l,r){var i=r(8).InputScanner,t=r(3).Token,a=r(10).TokenStream,c=r(11).WhitespacePattern,d={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},f=function(h,u){this._input=new i(h),this._options=u||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new c(this._input)};f.prototype.tokenize=function(){this._input.restart(),this.__tokens=new a,this._reset();for(var h,u=new t(d.START,""),E=null,x=[],O=new a;u.type!==d.EOF;){for(h=this._get_next_token(u,E);this._is_comment(h);)O.add(h),h=this._get_next_token(u,E);O.isEmpty()||(h.comments_before=O,O=new a),h.parent=E,this._is_opening(h)?(x.push(E),E=h):E&&this._is_closing(h,E)&&(h.opened=E,E.closed=h,E=x.pop(),h.parent=E),h.previous=u,u.next=h,this.__tokens.add(h),u=h}return this.__tokens},f.prototype._is_first_token=function(){return this.__tokens.isEmpty()},f.prototype._reset=function(){},f.prototype._get_next_token=function(h,u){this._readWhitespace();var E=this._input.read(/.+/g);return E?this._create_token(d.RAW,E):this._create_token(d.EOF,"")},f.prototype._is_comment=function(h){return!1},f.prototype._is_opening=function(h){return!1},f.prototype._is_closing=function(h,u){return!1},f.prototype._create_token=function(h,u){var E=new t(h,u,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=d},function(n){function l(r){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=r}l.prototype.restart=function(){this.__position=0},l.prototype.isEmpty=function(){return this.__tokens_length===0},l.prototype.hasNext=function(){return this.__position<this.__tokens_length},l.prototype.next=function(){var r=null;return this.hasNext()&&(r=this.__tokens[this.__position],this.__position+=1),r},l.prototype.peek=function(r){var i=null;return r=r||0,r+=this.__position,r>=0&&r<this.__tokens_length&&(i=this.__tokens[r]),i},l.prototype.add=function(r){this.__parent_token&&(r.parent=this.__parent_token),this.__tokens.push(r),this.__tokens_length+=1},n.exports.TokenStream=l},function(n,l,r){var i=r(12).Pattern;function t(a,c){i.call(this,a,c),c?this._line_regexp=this._input.get_regexp(c._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}t.prototype=new i,t.prototype.__set_whitespace_patterns=function(a,c){a+="\\t ",c+="\\n\\r",this._match_pattern=this._input.get_regexp("["+a+c+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+c+"]")},t.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var a=this._input.read(this._match_pattern);if(a===" ")this.whitespace_before_token=" ";else if(a){var c=this.__split(this._newline_regexp,a);this.newline_count=c.length-1,this.whitespace_before_token=c[this.newline_count]}return a},t.prototype.matching=function(a,c){var d=this._create();return d.__set_whitespace_patterns(a,c),d._update(),d},t.prototype._create=function(){return new t(this._input,this)},t.prototype.__split=function(a,c){a.lastIndex=0;for(var d=0,f=[],h=a.exec(c);h;)f.push(c.substring(d,h.index)),d=h.index+h[0].length,h=a.exec(c);return d<c.length?f.push(c.substring(d,c.length)):f.push(""),f},n.exports.WhitespacePattern=t},function(n){function l(r,i){this._input=r,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)}l.prototype.read=function(){var r=this._input.read(this._starting_pattern);return(!this._starting_pattern||r)&&(r+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),r},l.prototype.read_match=function(){return this._input.match(this._match_pattern)},l.prototype.until_after=function(r){var i=this._create();return i._until_after=!0,i._until_pattern=this._input.get_regexp(r),i._update(),i},l.prototype.until=function(r){var i=this._create();return i._until_after=!1,i._until_pattern=this._input.get_regexp(r),i._update(),i},l.prototype.starting_with=function(r){var i=this._create();return i._starting_pattern=this._input.get_regexp(r,!0),i._update(),i},l.prototype.matching=function(r){var i=this._create();return i._match_pattern=this._input.get_regexp(r,!0),i._update(),i},l.prototype._create=function(){return new l(this._input,this)},l.prototype._update=function(){},n.exports.Pattern=l},function(n){function l(r,i){r=typeof r=="string"?r:r.source,i=typeof i=="string"?i:i.source,this.__directives_block_pattern=new RegExp(r+/ beautify( \w+[:]\w+)+ /.source+i,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(r+/\sbeautify\signore:end\s/.source+i,"g")}l.prototype.get_directives=function(r){if(!r.match(this.__directives_block_pattern))return null;var i={};this.__directive_pattern.lastIndex=0;for(var t=this.__directive_pattern.exec(r);t;)i[t[1]]=t[2],t=this.__directive_pattern.exec(r);return i},l.prototype.readIgnored=function(r){return r.readUntilAfter(this.__directives_end_ignore_pattern)},n.exports.Directives=l},function(n,l,r){var i=r(12).Pattern,t={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function a(c,d){i.call(this,c,d),this.__template_pattern=null,this._disabled=Object.assign({},t),this._excluded=Object.assign({},t),d&&(this.__template_pattern=this._input.get_regexp(d.__template_pattern),this._excluded=Object.assign(this._excluded,d._excluded),this._disabled=Object.assign(this._disabled,d._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}/)}}a.prototype=new i,a.prototype._create=function(){return new a(this._input,this)},a.prototype._update=function(){this.__set_templated_pattern()},a.prototype.disable=function(c){var d=this._create();return d._disabled[c]=!0,d._update(),d},a.prototype.read_options=function(c){var d=this._create();for(var f in t)d._disabled[f]=c.templating.indexOf(f)===-1;return d._update(),d},a.prototype.exclude=function(c){var d=this._create();return d._excluded[c]=!0,d._update(),d},a.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 d=this._read_template();d;)this._match_pattern?d+=this._input.read(this._match_pattern):d+=this._input.readUntil(this.__template_pattern),c+=d,d=this._read_template();return this._until_after&&(c+=this._input.readUntilAfter(this._until_pattern)),c},a.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("|")+")")},a.prototype._read_template=function(){var c="",d=this._input.peek();if(d==="<"){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 d==="{"&&(!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=a},,,,function(n,l,r){var i=r(19).Beautifier,t=r(20).Options;function a(c,d,f,h){var u=new i(c,d,f,h);return u.beautify()}n.exports=a,n.exports.defaultOptions=function(){return new t}},function(n,l,r){var i=r(20).Options,t=r(2).Output,a=r(21).Tokenizer,c=r(21).TOKEN,d=/\r\n|[\r\n]/,f=/\r\n|[\r\n]/g,h=function(M,N){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=M.max_preserve_newlines,this.preserve_newlines=M.preserve_newlines,this._output=new t(M,N)};h.prototype.current_line_has_match=function(M){return this._output.current_line.has_match(M)},h.prototype.set_space_before_token=function(M,N){this._output.space_before_token=M,this._output.non_breaking_space=N},h.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},h.prototype.add_raw_token=function(M){this._output.add_raw_token(M)},h.prototype.print_preserved_newlines=function(M){var N=0;M.type!==c.TEXT&&M.previous.type!==c.TEXT&&(N=M.newlines?1:0),this.preserve_newlines&&(N=M.newlines<this.max_preserve_newlines+1?M.newlines:this.max_preserve_newlines+1);for(var P=0;P<N;P++)this.print_newline(P>0);return N!==0},h.prototype.traverse_whitespace=function(M){return M.whitespace_before||M.newlines?(this.print_preserved_newlines(M)||(this._output.space_before_token=!0),!0):!1},h.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},h.prototype.print_newline=function(M){this._output.add_new_line(M)},h.prototype.print_token=function(M){M.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(M.text))},h.prototype.indent=function(){this.indent_level++},h.prototype.get_full_indent=function(M){return M=this.indent_level+(M||0),M<1?"":this._output.get_indent_string(M)};var u=function(M){for(var N=null,P=M.next;P.type!==c.EOF&&M.closed!==P;){if(P.type===c.ATTRIBUTE&&P.text==="type"){P.next&&P.next.type===c.EQUALS&&P.next.next&&P.next.next.type===c.VALUE&&(N=P.next.next.text);break}P=P.next}return N},E=function(M,N){var P=null,z=null;return N.closed?(M==="script"?P="text/javascript":M==="style"&&(P="text/css"),P=u(N)||P,P.search("text/css")>-1?z="css":P.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?z="javascript":P.search(/(text|application|dojo)\/(x-)?(html)/)>-1?z="html":P.search(/test\/null/)>-1&&(z="null"),z):null};function x(M,N){return N.indexOf(M)!==-1}function O(M,N,P){this.parent=M||null,this.tag=N?N.tag_name:"",this.indent_level=P||0,this.parser_token=N||null}function C(M){this._printer=M,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(M){var N=new O(this._current_frame,M,this._printer.indent_level);this._current_frame=N},C.prototype._try_pop_frame=function(M){var N=null;return M&&(N=M.parser_token,this._printer.indent_level=M.indent_level,this._current_frame=M.parent),N},C.prototype._get_frame=function(M,N){for(var P=this._current_frame;P&&!(M.indexOf(P.tag)!==-1);){if(N&&N.indexOf(P.tag)!==-1){P=null;break}P=P.parent}return P},C.prototype.try_pop=function(M,N){var P=this._get_frame([M],N);return this._try_pop_frame(P)},C.prototype.indent_to_tag=function(M){var N=this._get_frame(M);N&&(this._printer.indent_level=N.indent_level)};function w(M,N,P,z){this._source_text=M||"",N=N||{},this._js_beautify=P,this._css_beautify=z,this._tag_stack=null;var X=new i(N,"html");this._options=X,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 M=this._source_text,N=this._options.eol;this._options.eol==="auto"&&(N=`
|
|
|
`,M&&d.test(M)&&(N=M.match(d)[0])),M=M.replace(f,`
|
|
|
`);var P=M.match(/^[\t ]*/)[0],z={text:"",type:""},X=new S,k=new h(this._options,P),F=new a(M,this._options).tokenize();this._tag_stack=new C(k);for(var U=null,L=F.next();L.type!==c.EOF;)L.type===c.TAG_OPEN||L.type===c.COMMENT?(U=this._handle_tag_open(k,L,X,z),X=U):L.type===c.ATTRIBUTE||L.type===c.EQUALS||L.type===c.VALUE||L.type===c.TEXT&&!X.tag_complete?U=this._handle_inside_tag(k,L,X,F):L.type===c.TAG_CLOSE?U=this._handle_tag_close(k,L,X):L.type===c.TEXT?U=this._handle_text(k,L,X):k.add_raw_token(L),z=U,L=F.next();var B=k._output.get_code(N);return B},w.prototype._handle_tag_close=function(M,N,P){var z={text:N.text,type:N.type};return M.alignment_size=0,P.tag_complete=!0,M.set_space_before_token(N.newlines||N.whitespace_before!=="",!0),P.is_unformatted?M.add_raw_token(N):(P.tag_start_char==="<"&&(M.set_space_before_token(N.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&P.has_wrapped_attrs&&M.print_newline(!1)),M.print_token(N)),P.indent_content&&!(P.is_unformatted||P.is_content_unformatted)&&(M.indent(),P.indent_content=!1),!P.is_inline_element&&!(P.is_unformatted||P.is_content_unformatted)&&M.set_wrap_point(),z},w.prototype._handle_inside_tag=function(M,N,P,z){var X=P.has_wrapped_attrs,k={text:N.text,type:N.type};if(M.set_space_before_token(N.newlines||N.whitespace_before!=="",!0),P.is_unformatted)M.add_raw_token(N);else if(P.tag_start_char==="{"&&N.type===c.TEXT)M.print_preserved_newlines(N)?(N.newlines=0,M.add_raw_token(N)):M.print_token(N);else{if(N.type===c.ATTRIBUTE?(M.set_space_before_token(!0),P.attr_count+=1):(N.type===c.EQUALS||N.type===c.VALUE&&N.previous.type===c.EQUALS)&&M.set_space_before_token(!1),N.type===c.ATTRIBUTE&&P.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(M.traverse_whitespace(N),X=X||N.newlines!==0),this._is_wrap_attributes_force)){var F=P.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&P.attr_count===1){var U=!0,L=0,B;do{if(B=z.peek(L),B.type===c.ATTRIBUTE){U=!1;break}L+=1}while(L<4&&B.type!==c.EOF&&B.type!==c.TAG_CLOSE);F=!U}F&&(M.print_newline(!1),X=!0)}M.print_token(N),X=X||M.previous_token_wrapped(),P.has_wrapped_attrs=X}return k},w.prototype._handle_text=function(M,N,P){var z={text:N.text,type:"TK_CONTENT"};return P.custom_beautifier_name?this._print_custom_beatifier_text(M,N,P):P.is_unformatted||P.is_content_unformatted?M.add_raw_token(N):(M.traverse_whitespace(N),M.print_token(N)),z},w.prototype._print_custom_beatifier_text=function(M,N,P){var z=this;if(N.text!==""){var X=N.text,k,F=1,U="",L="";P.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?k=this._js_beautify:P.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?k=this._css_beautify:P.custom_beautifier_name==="html"&&(k=function(ke,te){var Re=new w(ke,te,z._js_beautify,z._css_beautify);return Re.beautify()}),this._options.indent_scripts==="keep"?F=0:this._options.indent_scripts==="separate"&&(F=-M.indent_level);var B=M.get_full_indent(F);if(X=X.replace(/\n[ \t]*$/,""),P.custom_beautifier_name!=="html"&&X[0]==="<"&&X.match(/^(<!--|<!\[CDATA\[)/)){var Z=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(X);if(!Z){M.add_raw_token(N);return}U=B+Z[1]+`
|
|
|
`,X=Z[4],Z[5]&&(L=B+Z[5]),X=X.replace(/\n[ \t]*$/,""),(Z[2]||Z[3].indexOf(`
|
|
|
`)!==-1)&&(Z=Z[3].match(/[ \t]+$/),Z&&(N.whitespace_before=Z[0]))}if(X)if(k){var re=function(){this.eol=`
|
|
|
`};re.prototype=this._options.raw_options;var he=new re;X=k(B+X,he)}else{var Ce=N.whitespace_before;Ce&&(X=X.replace(new RegExp(`
|
|
|
(`+Ce+")?","g"),`
|
|
|
`)),X=B+X.replace(/\n/g,`
|
|
|
`+B)}U&&(X?X=U+X+`
|
|
|
`+L:X=U+L),M.print_newline(!1),X&&(N.text=X,N.whitespace_before="",N.newlines=0,M.add_raw_token(N),M.print_newline(!0))}},w.prototype._handle_tag_open=function(M,N,P,z){var X=this._get_tag_open_token(N);return(P.is_unformatted||P.is_content_unformatted)&&!P.is_empty_element&&N.type===c.TAG_OPEN&&N.text.indexOf("</")===0?(M.add_raw_token(N),X.start_tag_token=this._tag_stack.try_pop(X.tag_name)):(M.traverse_whitespace(N),this._set_tag_position(M,N,X,P,z),X.is_inline_element||M.set_wrap_point(),M.print_token(N)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(X.alignment_size=N.text.length+1),!X.tag_complete&&!X.is_unformatted&&(M.alignment_size=X.alignment_size),X};var S=function(M,N){if(this.parent=M||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="",!N)this.tag_complete=!0;else{var P;this.tag_start_char=N.text[0],this.text=N.text,this.tag_start_char==="<"?(P=N.text.match(/^<([^\s>]*)/),this.tag_check=P?P[1]:""):(P=N.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=P?P[1]:"",(N.text.startsWith("{{#>")||N.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&N.next!==null?this.tag_check=N.next.text.split(" ")[0]:this.tag_check=N.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),N.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||N.closed&&N.closed.text==="/>";var z=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(z=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(z)))}};w.prototype._get_tag_open_token=function(M){var N=new S(this._tag_stack.get_parser_token(),M);return N.alignment_size=this._options.wrap_attributes_indent_size,N.is_end_tag=N.is_end_tag||x(N.tag_check,this._options.void_elements),N.is_empty_element=N.tag_complete||N.is_start_tag&&N.is_end_tag,N.is_unformatted=!N.tag_complete&&x(N.tag_check,this._options.unformatted),N.is_content_unformatted=!N.is_empty_element&&x(N.tag_check,this._options.content_unformatted),N.is_inline_element=x(N.tag_name,this._options.inline)||N.tag_name.includes("-")||N.tag_start_char==="{",N},w.prototype._set_tag_position=function(M,N,P,z,X){if(P.is_empty_element||(P.is_end_tag?P.start_tag_token=this._tag_stack.try_pop(P.tag_name):(this._do_optional_end_element(P)&&(P.is_inline_element||M.print_newline(!1)),this._tag_stack.record_tag(P),(P.tag_name==="script"||P.tag_name==="style")&&!(P.is_unformatted||P.is_content_unformatted)&&(P.custom_beautifier_name=E(P.tag_check,N)))),x(P.tag_check,this._options.extra_liners)&&(M.print_newline(!1),M._output.just_added_blankline()||M.print_newline(!0)),P.is_empty_element){if(P.tag_start_char==="{"&&P.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),P.indent_content=!0;var k=M.current_line_has_match(/{{#if/);k||M.print_newline(!1)}P.tag_name==="!--"&&X.type===c.TAG_CLOSE&&z.is_end_tag&&P.text.indexOf(`
|
|
|
`)===-1||(P.is_inline_element||P.is_unformatted||M.print_newline(!1),this._calcluate_parent_multiline(M,P))}else if(P.is_end_tag){var F=!1;F=P.start_tag_token&&P.start_tag_token.multiline_content,F=F||!P.is_inline_element&&!(z.is_inline_element||z.is_unformatted)&&!(X.type===c.TAG_CLOSE&&P.start_tag_token===z)&&X.type!=="TK_CONTENT",(P.is_content_unformatted||P.is_unformatted)&&(F=!1),F&&M.print_newline(!1)}else P.indent_content=!P.custom_beautifier_name,P.tag_start_char==="<"&&(P.tag_name==="html"?P.indent_content=this._options.indent_inner_html:P.tag_name==="head"?P.indent_content=this._options.indent_head_inner_html:P.tag_name==="body"&&(P.indent_content=this._options.indent_body_inner_html)),!(P.is_inline_element||P.is_unformatted)&&(X.type!=="TK_CONTENT"||P.is_content_unformatted)&&M.print_newline(!1),this._calcluate_parent_multiline(M,P)},w.prototype._calcluate_parent_multiline=function(M,N){N.parent&&M._output.just_added_newline()&&!((N.is_inline_element||N.is_unformatted)&&N.parent.is_inline_element)&&(N.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"],D=["a","audio","del","ins","map","noscript","video"];w.prototype._do_optional_end_element=function(M){var N=null;if(M.is_empty_element||!M.is_start_tag||!M.parent)return;if(M.tag_name==="body")N=N||this._tag_stack.try_pop("head");else if(M.tag_name==="li")N=N||this._tag_stack.try_pop("li",["ol","ul"]);else if(M.tag_name==="dd"||M.tag_name==="dt")N=N||this._tag_stack.try_pop("dt",["dl"]),N=N||this._tag_stack.try_pop("dd",["dl"]);else if(M.parent.tag_name==="p"&&A.indexOf(M.tag_name)!==-1){var P=M.parent.parent;(!P||D.indexOf(P.tag_name)===-1)&&(N=N||this._tag_stack.try_pop("p"))}else M.tag_name==="rp"||M.tag_name==="rt"?(N=N||this._tag_stack.try_pop("rt",["ruby","rtc"]),N=N||this._tag_stack.try_pop("rp",["ruby","rtc"])):M.tag_name==="optgroup"?N=N||this._tag_stack.try_pop("optgroup",["select"]):M.tag_name==="option"?N=N||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):M.tag_name==="colgroup"?N=N||this._tag_stack.try_pop("caption",["table"]):M.tag_name==="thead"?(N=N||this._tag_stack.try_pop("caption",["table"]),N=N||this._tag_stack.try_pop("colgroup",["table"])):M.tag_name==="tbody"||M.tag_name==="tfoot"?(N=N||this._tag_stack.try_pop("caption",["table"]),N=N||this._tag_stack.try_pop("colgroup",["table"]),N=N||this._tag_stack.try_pop("thead",["table"]),N=N||this._tag_stack.try_pop("tbody",["table"])):M.tag_name==="tr"?(N=N||this._tag_stack.try_pop("caption",["table"]),N=N||this._tag_stack.try_pop("colgroup",["table"]),N=N||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(M.tag_name==="th"||M.tag_name==="td")&&(N=N||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),N=N||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return M.parent=this._tag_stack.get_parser_token(),N},n.exports.Beautifier=w},function(n,l,r){var i=r(6).Options;function t(a){i.call(this,a,"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"])}t.prototype=new i,n.exports.Options=t},function(n,l,r){var i=r(9).Tokenizer,t=r(9).TOKEN,a=r(13).Directives,c=r(14).TemplatablePattern,d=r(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:t.START,RAW:t.RAW,EOF:t.EOF},h=new a(/<\!--/,/-->/),u=function(E,x){i.call(this,E,x),this._current_tag_name="";var O=new c(this._input).read_options(this._options),C=new d(this._input);if(this.__patterns={word:O.until(/[\n\r\t <]/),single_quote:O.until_after(/'/),double_quote:O.until_after(/"/),attribute:O.until(/[\n\r\t =>]|\/>/),element_name:O.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)}};u.prototype=new i,u.prototype._is_comment=function(E){return!1},u.prototype._is_opening=function(E){return E.type===f.TAG_OPEN},u.prototype._is_closing=function(E,x){return E.type===f.TAG_CLOSE&&x&&((E.text===">"||E.text==="/>")&&x.text[0]==="<"||E.text==="}}"&&x.text[0]==="{"&&x.text[1]==="{")},u.prototype._reset=function(){this._current_tag_name=""},u.prototype._get_next_token=function(E,x){var O=null;this._readWhitespace();var C=this._input.peek();return C===null?this._create_token(f.EOF,""):(O=O||this._read_open_handlebars(C,x),O=O||this._read_attribute(C,E,x),O=O||this._read_close(C,x),O=O||this._read_raw_content(C,E,x),O=O||this._read_content_word(C),O=O||this._read_comment_or_cdata(C),O=O||this._read_processing(C),O=O||this._read_open(C,x),O=O||this._create_token(f.UNKNOWN,this._input.next()),O)},u.prototype._read_comment_or_cdata=function(E){var x=null,O=null,C=null;if(E==="<"){var w=this._input.peek(1);w==="!"&&(O=this.__patterns.comment.read(),O?(C=h.get_directives(O),C&&C.ignore==="start"&&(O+=h.readIgnored(this._input))):O=this.__patterns.cdata.read()),O&&(x=this._create_token(f.COMMENT,O),x.directives=C)}return x},u.prototype._read_processing=function(E){var x=null,O=null,C=null;if(E==="<"){var w=this._input.peek(1);(w==="!"||w==="?")&&(O=this.__patterns.conditional_comment.read(),O=O||this.__patterns.processing.read()),O&&(x=this._create_token(f.COMMENT,O),x.directives=C)}return x},u.prototype._read_open=function(E,x){var O=null,C=null;return x||E==="<"&&(O=this._input.next(),this._input.peek()==="/"&&(O+=this._input.next()),O+=this.__patterns.element_name.read(),C=this._create_token(f.TAG_OPEN,O)),C},u.prototype._read_open_handlebars=function(E,x){var O=null,C=null;return x||this._options.indent_handlebars&&E==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(O=this.__patterns.handlebars_comment.read(),O=O||this.__patterns.handlebars.read(),C=this._create_token(f.COMMENT,O)):(O=this.__patterns.handlebars_open.read(),C=this._create_token(f.TAG_OPEN,O))),C},u.prototype._read_close=function(E,x){var O=null,C=null;return x&&(x.text[0]==="<"&&(E===">"||E==="/"&&this._input.peek(1)===">")?(O=this._input.next(),E==="/"&&(O+=this._input.next()),C=this._create_token(f.TAG_CLOSE,O)):x.text[0]==="{"&&E==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),C=this._create_token(f.TAG_CLOSE,"}}"))),C},u.prototype._read_attribute=function(E,x,O){var C=null,w="";if(O&&O.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&&(x.type===f.EQUALS?C=this._create_token(f.VALUE,w):C=this._create_token(f.ATTRIBUTE,w));return C},u.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)},u.prototype._read_raw_content=function(E,x,O){var C="";if(O&&O.text[0]==="{")C=this.__patterns.handlebars_raw_close.read();else if(x.type===f.TAG_CLOSE&&x.opened.text[0]==="<"&&x.text[0]!=="/"){var w=x.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},u.prototype._read_content_word=function(E){var x="";if(this._options.unformatted_content_delimiter&&(E===this._options.unformatted_content_delimiter[0]&&(x=this.__patterns.unformatted_content_delimiter.read())),x||(x=this.__patterns.word.read()),x)return this._create_token(f.TEXT,x)},n.exports.Tokenizer=u,n.exports.TOKEN=f}],p={};function e(n){var l=p[n];if(l!==void 0)return l.exports;var r=p[n]={exports:{}};return _[n](r,r.exports,e),r.exports}var o=e(18);T=o})();var y=T;if(!0)!(I=[b,b("6UM0"),b("TXwP")],v=function(_){var p=b("6UM0"),e=b("TXwP");return{html_beautify:function(o,n){return y(o,n,p.js_beautify,e.css_beautify)}}}.apply(H,I),v!==void 0&&(j.exports=v));else var g,s})()},q7KB:function(j,H,b){},qBft:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("OLod"))})(this,function(I){return I.pad.AnsiX923={pad:function(v,T){var y=v.sigBytes,g=T*4,s=g-y%g,_=y+s-1;v.clamp(),v.words[_>>>2]|=s<<24-_%4*8,v.sigBytes+=s},unpad:function(v){var T=v.words[v.sigBytes-1>>>2]&255;v.sigBytes-=T}},I.pad.Ansix923})},qM6L:function(j,H,b){(function(I,v){j.exports=H=v(b("Ib8C"))})(this,function(I){return function(){var v=I,T=v.lib,y=T.WordArray,g=v.enc,s=g.Utf16=g.Utf16BE={stringify:function(p){for(var e=p.words,o=p.sigBytes,n=[],l=0;l<o;l+=2){var r=e[l>>>2]>>>16-l%4*8&65535;n.push(String.fromCharCode(r))}return n.join("")},parse:function(p){for(var e=p.length,o=[],n=0;n<e;n++)o[n>>>1]|=p.charCodeAt(n)<<16-n%2*16;return y.create(o,e*2)}};g.Utf16LE={stringify:function(p){for(var e=p.words,o=p.sigBytes,n=[],l=0;l<o;l+=2){var r=_(e[l>>>2]>>>16-l%4*8&65535);n.push(String.fromCharCode(r))}return n.join("")},parse:function(p){for(var e=p.length,o=[],n=0;n<e;n++)o[n>>>1]|=_(p.charCodeAt(n)<<16-n%2*16);return y.create(o,e*2)}};function _(p){return p<<8&4278255360|p>>>8&16711935}}(),I.enc.Utf16})},qZJd:function(j,H,b){"use strict";var I=b("MXD1"),v=b("CFYs"),T=b("14J3"),y=b("BMrR"),g=b("+L6B"),s=b("2/Rp"),_=b("jCWc"),p=b("kPKH"),e=b("miYZ"),o=b("tsqr"),n=b("2qtc"),l=b("kLXV"),r=b("9og8"),i=b("rAM+"),t=b("tJVT"),a=b("k1fw"),c=b("WmNS"),d=b.n(c),f=b("q1tI"),h=b.n(f),u=b("IxHN"),E=b("bdgK"),x=b("M8RZ"),O=b("Ty5D"),C=b("1vsH"),w=b("1dTM"),S=b.n(w),A=b("dhSg"),D=b("5NDa"),M=b("5rEg"),N=b("AKST"),P=M.a.TextArea,z=function(se){var be=se.onCancel,ae=se.onSave,fe=se.content,Fe=Object(f.useState)(fe),ie=Object(t.a)(Fe,2),q=ie[0],Q=ie[1];function Y(le){Q(le.target.value)}function oe(){ae(q)}return Object(f.useEffect)(function(){Q(fe)},[fe]),h.a.createElement("div",{className:"clipboard-box"},h.a.createElement("h3",null,"\u5B9E\u9A8C\u73AF\u5883\u526A\u5207\u677F\uFF1A"),h.a.createElement(P,{value:q,onChange:Y,className:"clipboard"}),h.a.createElement("p",null," ",h.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"," "),h.a.createElement("p",null," ",h.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"," "),h.a.createElement("div",{className:"btn-action-container"},h.a.createElement(s.a,{type:"ghost",onClick:be,style:{marginRight:10}},"\u53D6\u6D88"),h.a.createElement(s.a,{type:"primary",onClick:oe},"\u4FDD\u5B58")))},X=b("ErOA"),k=b("IZBM"),F=b("ye1Q"),U=b("bntm"),L=b("i72Y"),B=b.n(L),Z=b("wd/R"),re=b.n(Z),he=b("J66h"),Ce=h.a.createElement(F.a,{style:{fontSize:24},spin:!0});function ke(se){return se.replace(/\\u([\dA-Za-z]{4})/g,function(be,ae){return String.fromCharCode(parseInt("0x"+ae))})}function te(se){se||(se=window.location.search);var be=se.substr(1),ae={};return be.split("&").forEach(function(fe){var Fe=fe.split("=");ae[Fe[0]]=decodeURIComponent(Fe[1])}),ae}var Re={loading:!0,isLarge:!1,showClipBoardBox:!1,transferContent:"",mes:"\u5B9E\u9A8C\u73AF\u5883\u51C6\u5907\u4E2D"},Te;(function(se){se[se.SET_LOADING=0]="SET_LOADING",se[se.SET_IS_LARGE=1]="SET_IS_LARGE",se[se.SET_MES=2]="SET_MES",se[se.SET_STATE=3]="SET_STATE",se[se.SHOW_CLIPBOARD_BOX=4]="SHOW_CLIPBOARD_BOX",se[se.SET_TRANSFER_CONTENT=5]="SET_TRANSFER_CONTENT",se[se.UPDATE_ALL=6]="UPDATE_ALL"})(Te||(Te={}));function pe(se,be){switch(be.type){case Te.SET_LOADING:return Object(a.a)(Object(a.a)({},se),{},{loading:be.payload});case Te.SET_IS_LARGE:return Object(a.a)({},Object(a.a)(Object(a.a)({},se),{},{isLarge:be.payload}));case Te.SET_MES:return Object(a.a)(Object(a.a)({},se),{},{mes:be.payload});case Te.SET_STATE:return Object(a.a)(Object(a.a)({},se),be.payload);case Te.SET_TRANSFER_CONTENT:return Object(a.a)(Object(a.a)({},se),{},{transferContent:be.payload});case Te.SHOW_CLIPBOARD_BOX:return Object(a.a)(Object(a.a)({},se),{},{showClipBoardBox:be.payload});case Te.UPDATE_ALL:return Object(a.a)({loading:se.loading},be.payload);default:throw new Error}}var me=H.a=function(se){var be,ae=se.vnc_url,fe=se.window_vnc_url,Fe=se.linux_vnc,ie=se.virtual_machine,q=se.taskId,Q=se.taskData,Y=Object(f.useRef)(),oe=Object(f.useRef)(),le=Object(f.useRef)(),Ee=Object(f.useRef)(),Le=Object(f.useState)(),ge=Object(t.a)(Le,2),De=ge[0],_e=ge[1],Xe=Object(f.useState)(!1),tt=Object(t.a)(Xe,2),ze=tt[0],Me=tt[1],Et=Object(f.useReducer)(pe,Re),Oe=Object(t.a)(Et,2),Ve=Oe[0],Je=Oe[1],Ye=Object(f.useState)(0),Pe=Object(t.a)(Ye,2),He=Pe[0],ve=Pe[1],xe=Ve.mes,de=Ve.loading,je=Ve.showClipBoardBox,Qe=Ve.isLarge,ne=Ve.transferContent,Ze=Object(f.useState)(0),lt=Object(t.a)(Ze,2),Be=lt[0],$e=lt[1],rt=Object(f.useRef)(),xt=Object(f.useRef)(),ft=Object(f.useState)(!1),st=Object(t.a)(ft,2),Ne=st[0],Ge=st[1],yt=Object(O.i)(),pt=yt;Object(f.useEffect)(function(){return window.addEventListener("visibilitychange",Bt),function(){var $t,cn;($t=oe.current)===null||$t===void 0||((cn=$t.disconnect)===null||cn===void 0)||cn.call($t),window.removeEventListener("visibilitychange",Bt)}},[]),Object(f.useEffect)(function(){return window.sessionStorage.imageId=De,function(){window.sessionStorage.removeItem("imageId")}},[De]);var jt=function(){var cn,mn;(Q==null||((cn=Q.shixun)===null||cn===void 0)?void 0:cn.windows_connection_mode)==="rdp"?setTimeout(function(){qt()},1500):(le==null||((mn=le.current)===null||mn===void 0)?void 0:mn.resizeSession)!==void 0&&(Object(U.a)()?le.current.resizeSession=!0:setTimeout(function(){le.current.resizeSession=!1},900))};Object(f.useEffect)(function(){return window.addEventListener("visibilitychange",Bt),document.addEventListener(Object(U.c)(),jt),function(){document.removeEventListener(Object(U.c)(),jt),window.removeEventListener("visibilitychange",Bt)}},[]);var Bt=function(cn){if(document.visibilityState==="visible"){var mn=sessionStorage.vncPageLeaveTime;re()(new Date).diff(re()(mn),"minutes")>2&&ve(new Date().getTime()),sessionStorage.removeItem("vncPageLeaveTime")}else sessionStorage.vncPageLeaveTime=new Date};function gt(){Je({type:Te.SHOW_CLIPBOARD_BOX,payload:!1})}function Ht(){Je({type:Te.SET_IS_LARGE,payload:!Qe})}function Ut($t){var cn;return Y.current&&(cn=new E.default(function(mn){var yn=Object(i.a)(mn),Vn;try{for(yn.s();!(Vn=yn.n()).done;){var $n,zt=Vn.value;if((Q==null||(($n=Q.shixun)===null||$n===void 0)?void 0:$n.windows_connection_mode)==="rdp"&&qt(),zt.target.offsetHeight>0||zt.target.offsetWidth>0){var xn;$t==null||((xn=$t._eventHandlers)===null||xn===void 0)||xn.windowResize()}}}catch(wr){yn.e(wr)}finally{yn.f()}}),cn.observe(Y.current)),cn}var Nt=function(){var $t=Object(r.a)(d.a.mark(function cn(){return d.a.wrap(function(yn){for(;;)switch(yn.prev=yn.next){case 0:case"end":return yn.stop()}},cn)}));return function(){return $t.apply(this,arguments)}}(),Wt=function(){var $t=Object(r.a)(d.a.mark(function cn(){var mn,yn,Vn,$n,zt,xn,wr,nr,Tn,Yn,ce,V,J;return d.a.wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:return nr=(mn=te())!==null&&mn!==void 0&&mn.homework_common_id?{homework_common_id:(yn=te())===null||yn===void 0?void 0:yn.homework_common_id}:{},Se.next=3,Object(X.a)("/api/myshixuns/".concat((Vn=Q.myshixun)===null||Vn===void 0?void 0:Vn.identifier,"/start.json"),{method:"get",params:Object(a.a)(Object(a.a)(Object(a.a)({},yt),nr),{},{template_id:De||""})});case 3:if(Tn=Se.sent,!(($n=Tn.data)!==null&&$n!==void 0&&$n.instance_status&&((zt=Tn.data)===null||zt===void 0?void 0:zt.instance_status)=="creating")){Se.next=9;break}return xt.current||(xt.current=setInterval(Object(r.a)(d.a.mark(function ue(){var nt,Dt;return d.a.wrap(function(an){for(;;)switch(an.prev=an.next){case 0:return an.next=2,Wt();case 2:Dt=an.sent,(Dt==null||((nt=Dt.data)===null||nt===void 0)?void 0:nt.instance_status)!=="creating"&&Ge(!0);case 4:case"end":return an.stop()}},ue)})),1e3*3)),Se.abrupt("return",Tn);case 9:clearInterval(xt.current);case 10:if(!(Tn!=null&&(xn=Tn.data)!==null&&xn!==void 0&&(wr=xn.data_list)!==null&&wr!==void 0&&wr.length)){Se.next=13;break}return A.a.publish("pod-restrict-data",{identifier:Tn==null||((Yn=Tn.data)===null||Yn===void 0)?void 0:Yn.identifier,data_list:Tn==null||((ce=Tn.data)===null||ce===void 0)?void 0:ce.data_list}),Se.abrupt("return");case 13:if(!((Tn==null?void 0:Tn.status)===-3)){Se.next=15;break}return Se.abrupt("return",new Promise(function(){var ue=Object(r.a)(d.a.mark(function nt(Dt,Yt){return d.a.wrap(function(Xt){for(;;)switch(Xt.prev=Xt.next){case 0:l.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 Rn=Object(r.a)(d.a.mark(function ar(){return d.a.wrap(function(lr){for(;;)switch(lr.prev=lr.next){case 0:return clearTimeout(rt.current),$e(0),lr.next=4,Object(k.f)(yt.taskId,Tn==null?void 0:Tn.message);case 4:return ve(He+1),lr.abrupt("return");case 6:case"end":return lr.stop()}},ar)}));function Kn(){return Rn.apply(this,arguments)}return Kn}()});case 1:case"end":return Xt.stop()}},nt)}));return function(nt,Dt){return ue.apply(this,arguments)}}()));case 15:if(!((Tn==null?void 0:Tn.status)===-1)){Se.next=17;break}throw new String(Tn==null?void 0:Tn.message);case 17:return ie&&(Object(C.W)("PVEAuthCookie",Tn==null||((V=Tn.data)===null||V===void 0||((J=V.cookie_options)===null||J===void 0))?void 0:J.cookies_value,1),Object(C.W)("PVELangCookie","zh_CN",1)),A.a.publish("vnc-res-data",Tn==null?void 0:Tn.data),A.a.publish("update-windows-time",Tn==null?void 0:Tn.data),Se.abrupt("return",Tn);case 21:case"end":return Se.stop()}},cn)}));return function(){return $t.apply(this,arguments)}}();Object(f.useEffect)(function(){var $t,cn;function mn(nr){fe&&(o.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"),Je({type:Te.SET_LOADING,payload:!0}),ve(He+1))}A.a.subscribe("reset-linux-windows-loading",function(){Je({type:Te.SET_LOADING,payload:!0})}),A.a.subscribe("reset-linux-windos-vnc",function(){ve(He+1)});function yn(nr){$e(100),clearTimeout(rt.current),setTimeout(function(){le.current.resizeSession=!1,Je({type:Te.SET_LOADING,payload:!1})},1300),A.a.subscribe("send-ctrl-alt-delete",function(){var Tn;(Tn=$t)===null||Tn===void 0||Tn.sendCtrlAltDel()})}function Vn(nr){var Tn=ke(nr.detail.text);Je({type:Te.SET_TRANSFER_CONTENT,payload:Tn})}if((fe||ae||Fe||ie&&De)&&Y.current){var $n;clearTimeout(rt.current),(Q==null||(($n=Q.shixun)===null||$n===void 0)?void 0:$n.windows_connection_mode)==="rdp"&&qt(),new Promise(Object(r.a)(d.a.mark(function nr(){var Tn,Yn,ce,V,J,ee,Se,ue,nt,Dt,Yt,an,Xt,Rn,Kn,ar,vr;return d.a.wrap(function(Jn){for(;;)switch(Jn.prev=Jn.next){case 0:return V=te(),J="",Jn.next=4,Wt();case 4:if(Se=Jn.sent,!(!Ne&&Se!==null&&Se!==void 0&&(Tn=Se.data)!==null&&Tn!==void 0&&Tn.instance_status&&(Se==null||((Yn=Se.data)===null||Yn===void 0)?void 0:Yn.instance_status)==="creating")){Jn.next=9;break}return Jn.abrupt("return");case 9:clearInterval(xt.current);case 10:if(!(Fe||ie)){Jn.next=16;break}return Ee.current.src=(Se==null||((ue=Se.data)===null||ue===void 0)?void 0:ue.link_url)+"&time="+Date.now(),Je({type:Te.SET_STATE,payload:{loading:!1,mes:"\u5B9E\u9A8C\u73AF\u5883\u91CD\u7F6E\u4E2D"}}),Jn.abrupt("return");case 16:fe?(ee="Edu123",J=decodeURIComponent(Se==null||((nt=Se.data)===null||nt===void 0)?void 0:nt.link_url)):(Yt=new URL(decodeURIComponent(Se==null||((Dt=Se.data)===null||Dt===void 0)?void 0:Dt.link_url)),an=Yt.protocol,Xt=Yt.searchParams,Rn=Yt.host,Kn=Yt.search,ar=Object(C.T)(Kn),ee=Xt.get("password"),J="".concat(an==="https:"?"wss":"ws","://").concat(Rn,"/").concat(ar.path||"websockify"));case 17:if(!((Q==null||((ce=Q.shixun)===null||ce===void 0)?void 0:ce.windows_connection_mode)==="rdp")){Jn.next=23;break}return Ut(),Ee.current.style.cssText=Ee.current.style.cssText+"width:1920px;height:1080px;position:initial",Ee.current.src="/rdp.html?tpiId=".concat(Q==null||((vr=Q.myshixun)===null||vr===void 0)?void 0:vr.id),Je({type:Te.SET_LOADING,payload:!1}),Jn.abrupt("return");case 23:$t=new S.a(Y.current,J,{credentials:{password:ee},wsProtocols:["binary"],resize:"scale",show_dot:!0}),cn=Ut($t),$t.viewOnly=V.view_only||!1,fe?$t.scaleViewport=!0:$t.scaleViewport=V.scale||!1,$t.scaleViewport=V.scale||!0,$t.showDotCursor=!0,$t.resizeSession=!0,le.current=$t,$t.addEventListener("disconnect",mn),$t.addEventListener("connect",yn),$t.addEventListener("clipboard",Vn);case 34:case"end":return Jn.stop()}},nr)})));var zt=A.a.subscribe("vnc-reseting",function(){$e(0),Je({type:Te.SET_STATE,payload:{loading:!0,mes:"\u5B9E\u9A8C\u73AF\u5883\u91CD\u7F6E\u4E2D"}})}),xn=A.a.subscribe("vnc-enlarge",function(nr){}),wr=A.a.subscribe("show-clipboard-box",function(){Je({type:Te.SHOW_CLIPBOARD_BOX,payload:!0})});return $e(0),function(){var nr,Tn,Yn,ce;(nr=$t)===null||nr===void 0||nr.removeEventListener("disconnect",mn),(Tn=$t)===null||Tn===void 0||Tn.removeEventListener("connect",yn),(Yn=$t)===null||Yn===void 0||Yn.removeEventListener("clipboard",Vn),zt(),xn(),wr(),(ce=cn)===null||ce===void 0||ce.unobserve(Y.current),clearInterval(xt.current)}}},[ae,fe,Fe,He,De,Ne]),Object(f.useEffect)(function(){var $t,cn;if(ie&&(Q==null||(($t=Q.shixun_virtual_templates)===null||$t===void 0)?void 0:$t.length)===1){var mn,yn;_e(Q==null||((mn=Q.shixun_virtual_templates)===null||mn===void 0||((yn=mn[0])===null||yn===void 0))?void 0:yn.template_id)}else ie&&(Q==null||((cn=Q.shixun_virtual_templates)===null||cn===void 0)?void 0:cn.length)>1&&Me(!0)},[ie]);function Qt($t){return pn.apply(this,arguments)}function pn(){return pn=Object(r.a)(d.a.mark(function $t(cn){var mn,yn,Vn;return d.a.wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:if(!ae){zt.next=8;break}return mn=cn,zt.next=4,Object(X.a)("/api/tasks/".concat(yt.taskId,"/vnc_paste.json"),{method:"post",body:{content:he.Base64.encode(mn)}});case 4:yn=zt.sent,(yn==null?void 0:yn.status)===0&&(Je({type:Te.SET_TRANSFER_CONTENT,payload:cn}),o.b.success("\u4FDD\u5B58\u6210\u529F\uFF01\u4F60\u53EF\u4EE5\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7C98\u8D34\u8BE5\u5185\u5BB9"),gt()),zt.next=12;break;case 8:(Vn=le.current)===null||Vn===void 0||Vn.clipboardPasteFrom(cn),Je({type:Te.SET_TRANSFER_CONTENT,payload:cn}),o.b.success("\u4FDD\u5B58\u6210\u529F\uFF01\u4F60\u53EF\u4EE5\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7C98\u8D34\u8BE5\u5185\u5BB9"),gt();case 12:case"end":return zt.stop()}},$t)})),pn.apply(this,arguments)}function qt(){var $t,cn;$t=Math.min(document.getElementById("task-right-panel").clientWidth/1920,document.getElementById("task-right-panel").clientHeight/1260),Ee.current.parentElement.className="wh1080p",Ee.current.parentElement.style.cssText="transform:scale(".concat($t,");transform-origin:center center"),Y.current.style.cssText="translate(-50%, -50%) scale("+$t+")"}Object(f.useEffect)(function(){Be==0&&(clearTimeout(rt.current),en())},[Be]);var en=function $t(){Be>99?Be=99:(Be=Be+1,rt.current=setTimeout(function(){$t()},1500)),Be<100&&$e(Be)},qn=Object(f.useMemo)(function(){var $t;return de?"none":Fe||ie||fe&&(Q==null||(($t=Q.shixun)===null||$t===void 0)?void 0:$t.windows_connection_mode)==="rdp"?"block":"none"},[Fe,de,ie,fe]);return h.a.createElement(f.Fragment,null,ze&&h.a.createElement("div",{className:B.a.selectImage},h.a.createElement("section",{className:B.a.container},h.a.createElement("h1",null,"\u9009\u62E9\u89D2\u8272"),h.a.createElement("aside",null,Q==null||((be=Q.shixun_virtual_templates)===null||be===void 0)?void 0:be.map(function($t,cn){return h.a.createElement(y.a,{align:"middle",key:cn},h.a.createElement(p.a,{flex:"1"},$t.template_name),h.a.createElement(p.a,null,h.a.createElement(s.a,{type:"primary",onClick:function(){_e($t.template_id),Me(!1)}},"\u5F00\u59CB\u5B9E\u9A8C")))})))),Qe&&h.a.createElement("a",{className:"btn-vnc-resize",onClick:Ht},h.a.createElement("i",{className:"iconfont icon-tuichuquanping"})),h.a.createElement("div",{style:{width:"100%",height:"calc(100% - 50px)",overflow:"hidden",position:"absolute",display:qn==="block"?"flex":"none",alignItems:"center",justifyContent:"center",zIndex:6}},h.a.createElement("div",null,h.a.createElement("iframe",{style:{position:Qe?"fixed":"absolute",left:0,top:Qe?54:40,width:"100%",height:"calc(100% - ".concat(Qe?"100px":"45px",")")},frameBorder:"0",ref:Ee,allowFullScreen:!0}))),h.a.createElement("div",{style:{position:Qe?"fixed":"absolute",left:0,top:Qe?54:40,zIndex:5,width:"100%",height:"calc(100% - ".concat(Qe?"100px":"45px",")")},className:"".concat(fe?"vnc-panel-wrapper-windows":"vnc-panel-wrapper"," ").concat(Qe?"full-screen":"")},de?h.a.createElement(u.a,{message:xe,style:{color:"#0152d9"}},h.a.createElement("div",{className:"tc",style:{width:500,margin:"0 auto",color:"#FFF"}},h.a.createElement(v.a,{percent:Be,format:function(cn){return h.a.createElement("span",{className:"c-white"},cn,"%")}}))):null,h.a.createElement("div",{ref:Y,className:"vnc-panel ".concat(de?"hidden zIndexf1":"animated fadeIn")})),h.a.createElement(x.a,null,h.a.createElement(l.a,{title:"\u590D\u5236\u7C98\u8D34",centered:!0,maskClosable:!1,visible:je,onCancel:gt,footer:null},h.a.createElement(z,{onCancel:gt,onSave:Qt,content:ne}))))}},qgvg:function(j,H){j.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(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("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 v=I.lib.BlockCipherMode.extend();function T(s){if((s>>24&255)===255){var _=s>>16&255,p=s>>8&255,e=s&255;_===255?(_=0,p===255?(p=0,e===255?e=0:++e):++p):++_,s=0,s+=_<<16,s+=p<<8,s+=e}else s+=1<<24;return s}function y(s){return(s[0]=T(s[0]))===0&&(s[1]=T(s[1])),s}var g=v.Encryptor=v.extend({processBlock:function(s,_){var p=this._cipher,e=p.blockSize,o=this._iv,n=this._counter;o&&(n=this._counter=o.slice(0),this._iv=void 0),y(n);var l=n.slice(0);p.encryptBlock(l,0);for(var r=0;r<e;r++)s[_+r]^=l[r]}});return v.Decryptor=g,v}(),I.mode.CTRGladman})},"rAM+":function(j,H,b){"use strict";b.d(H,"a",function(){return v});var I=b("Qw5x");function v(T,y){var g;if(typeof Symbol=="undefined"||T[Symbol.iterator]==null){if(Array.isArray(T)||(g=Object(I.a)(T))||y&&T&&typeof T.length=="number"){g&&(T=g);var s=0,_=function(){};return{s:_,n:function(){return s>=T.length?{done:!0}:{done:!1,value:T[s++]}},e:function(l){throw l},f:_}}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,e=!1,o;return{s:function(){g=T[Symbol.iterator]()},n:function(){var l=g.next();return p=l.done,l},e:function(l){e=!0,o=l},f:function(){try{!p&&g.return!=null&&g.return()}finally{if(e)throw o}}}}},rHrb:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.CopyToClipboard=void 0;var I=T(b("q1tI")),v=T(b("+QRC"));function T(f){return f&&f.__esModule?f:{default:f}}function y(f){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?y=function(u){return typeof u}:y=function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},y(f)}function g(f,h){var u=Object.keys(f);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(f);h&&(E=E.filter(function(x){return Object.getOwnPropertyDescriptor(f,x).enumerable})),u.push.apply(u,E)}return u}function s(f){for(var h=1;h<arguments.length;h++){var u=arguments[h]!=null?arguments[h]:{};h%2?g(u,!0).forEach(function(E){c(f,E,u[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(u)):g(u).forEach(function(E){Object.defineProperty(f,E,Object.getOwnPropertyDescriptor(u,E))})}return f}function _(f,h){if(f==null)return{};var u=p(f,h),E,x;if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(f);for(x=0;x<O.length;x++){if(E=O[x],h.indexOf(E)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(f,E))continue;u[E]=f[E]}}return u}function p(f,h){if(f==null)return{};var u={},E=Object.keys(f),x,O;for(O=0;O<E.length;O++){if(x=E[O],h.indexOf(x)>=0)continue;u[x]=f[x]}return u}function e(f,h){if(!(f instanceof h))throw new TypeError("Cannot call a class as a function")}function o(f,h){for(var u=0;u<h.length;u++){var E=h[u];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(f,E.key,E)}}function n(f,h,u){return h&&o(f.prototype,h),u&&o(f,u),f}function l(f,h){return h&&(y(h)==="object"||typeof h=="function")?h:i(f)}function r(f){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},r(f)}function i(f){if(f===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f}function t(f,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");f.prototype=Object.create(h&&h.prototype,{constructor:{value:f,writable:!0,configurable:!0}}),h&&a(f,h)}function a(f,h){return a=Object.setPrototypeOf||function(E,x){return E.__proto__=x,E},a(f,h)}function c(f,h,u){return h in f?Object.defineProperty(f,h,{value:u,enumerable:!0,configurable:!0,writable:!0}):f[h]=u,f}var d=function(f){t(h,f);function h(){var u,E;e(this,h);for(var x=arguments.length,O=new Array(x),C=0;C<x;C++)O[C]=arguments[C];return E=l(this,(u=r(h)).call.apply(u,[this].concat(O))),c(i(E),"onClick",function(w){var S=E.props,A=S.text,D=S.onCopy,M=S.children,N=S.options,P=I.default.Children.only(M),z=(0,v.default)(A,N);D&&D(A,z),P&&P.props&&typeof P.props.onClick=="function"&&P.props.onClick(w)}),E}return n(h,[{key:"render",value:function(){var E=this.props,x=E.text,O=E.onCopy,C=E.options,w=E.children,S=_(E,["text","onCopy","options","children"]),A=I.default.Children.only(w);return I.default.cloneElement(A,s({},S,{onClick:this.onClick}))}}]),h}(I.default.PureComponent);H.CopyToClipboard=d,c(d,"defaultProps",{onCopy:void 0,options:void 0})},rUJ1:function(j,H){const b=/[&<>"']/,I=/[&<>"']/g,v=/[<>"']|&(?!#?\w+;)/,T=/[<>"']|&(?!#?\w+;)/g,y={"&":"&","<":"<",">":">",'"':""","'":"'"},g=C=>y[C];function s(C,w){if(w){if(b.test(C))return C.replace(I,g)}else if(v.test(C))return C.replace(T,g);return C}const _=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function p(C){return C.replace(_,(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 e=/(^|[^\[])\^/g;function o(C,w){C=C.source||C,w=w||"";const S={replace:(A,D)=>(D=D.source||D,D=D.replace(e,"$1"),C=C.replace(A,D),S),getRegex:()=>new RegExp(C,w)};return S}const n=/[^\w:]/g,l=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function r(C,w,S){if(C){let A;try{A=decodeURIComponent(p(S)).replace(n,"").toLowerCase()}catch(D){return null}if(A.indexOf("javascript:")===0||A.indexOf("vbscript:")===0||A.indexOf("data:")===0)return null}w&&!l.test(S)&&(S=d(w,S));try{S=encodeURI(S).replace(/%25/g,"%")}catch(A){return null}return S}const i={},t=/^[^:]+:\/*[^/]*$/,a=/^([^:]+:)[\s\S]*$/,c=/^([^:]+:\/*[^/]*)[\s\S]*$/;function d(C,w){i[" "+C]||(t.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(a,"$1")+w:w.charAt(0)==="/"?S?w:C.replace(c,"$1")+w:C+w}const f={exec:function(){}};function h(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 u(C,w){const S=C.replace(/\|/g,(M,N,P)=>{let z=!1,X=N;for(;--X>=0&&P[X]==="\\";)z=!z;return z?"|":" |"}),A=S.split(/ \|/);let D=0;if(A.length>w)A.splice(w);else for(;A.length<w;)A.push("");for(;D<A.length;D++)A[D]=A[D].trim().replace(/\\\|/g,"|");return A}function E(C,w,S){const A=C.length;if(A===0)return"";let D=0;for(;D<A;){const M=C.charAt(A-D-1);if(M===w&&!S)D++;else if(M!==w&&S)D++;else break}return C.substr(0,A-D)}function x(C,w){if(C.indexOf(w[1])===-1)return-1;const S=C.length;let A=0,D=0;for(;D<S;D++)if(C[D]==="\\")D++;else if(C[D]===w[0])A++;else if(C[D]===w[1]&&(A--,A<0))return D;return-1}function O(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")}j.exports={escape:s,unescape:p,edit:o,cleanUrl:r,resolveUrl:d,noopTest:f,merge:h,splitCells:u,rtrim:E,findClosingBracket:x,checkSanitizeDeprecation:O}},rdUC:function(j,H,b){var I=b("MFOe"),v=I.Global;j.exports={name:"localStorage",read:y,write:g,each:s,remove:_,clearAll:p};function T(){return v.localStorage}function y(e){return T().getItem(e)}function g(e,o){return T().setItem(e,o)}function s(e){for(var o=T().length-1;o>=0;o--){var n=T().key(o);e(y(n),n)}}function _(e){return T().removeItem(e)}function p(){return T().clear()}},rwxt:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;var I=b("GdRQ");function v(_,p){if(!(_ instanceof p))throw new TypeError("Cannot call a class as a function")}function T(_,p){for(var e=0;e<p.length;e++){var o=p[e];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(_,o.key,o)}}function y(_,p,e){return p&&T(_.prototype,p),e&&T(_,e),_}var g=!I.supportsCursorURIs||I.isTouchDevice,s=function(){function _(){v(this,_),this._target=null,this._canvas=document.createElement("canvas"),g&&(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(_,[{key:"attach",value:function(e){if(this._target&&this.detach(),this._target=e,g){document.body.appendChild(this._canvas);var o={capture:!0,passive:!0};this._target.addEventListener("mouseover",this._eventHandlers.mouseover,o),this._target.addEventListener("mouseleave",this._eventHandlers.mouseleave,o),this._target.addEventListener("mousemove",this._eventHandlers.mousemove,o),this._target.addEventListener("mouseup",this._eventHandlers.mouseup,o)}this.clear()}},{key:"detach",value:function(){if(!this._target)return;if(g){var e={capture:!0,passive:!0};this._target.removeEventListener("mouseover",this._eventHandlers.mouseover,e),this._target.removeEventListener("mouseleave",this._eventHandlers.mouseleave,e),this._target.removeEventListener("mousemove",this._eventHandlers.mousemove,e),this._target.removeEventListener("mouseup",this._eventHandlers.mouseup,e),document.body.removeChild(this._canvas)}this._target=null}},{key:"change",value:function(e,o,n,l,r){if(l===0||r===0){this.clear();return}this._position.x=this._position.x+this._hotSpot.x-o,this._position.y=this._position.y+this._hotSpot.y-n,this._hotSpot.x=o,this._hotSpot.y=n;var i=this._canvas.getContext("2d");this._canvas.width=l,this._canvas.height=r;var t;try{t=new ImageData(new Uint8ClampedArray(e),l,r)}catch(c){t=i.createImageData(l,r),t.data.set(new Uint8ClampedArray(e))}if(i.clearRect(0,0,l,r),i.putImageData(t,0,0),g)this._updatePosition();else{var a=this._canvas.toDataURL();this._target.style.cursor="url("+a+")"+o+" "+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(e,o){if(!g)return;window.visualViewport?(this._position.x=e+window.visualViewport.offsetLeft,this._position.y=o+window.visualViewport.offsetTop):(this._position.x=e,this._position.y=o),this._updatePosition();var n=document.elementFromPoint(e,o);this._updateVisibility(n)}},{key:"_handleMouseOver",value:function(e){this._handleMouseMove(e)}},{key:"_handleMouseLeave",value:function(e){this._updateVisibility(e.relatedTarget)}},{key:"_handleMouseMove",value:function(e){this._updateVisibility(e.target),this._position.x=e.clientX-this._hotSpot.x,this._position.y=e.clientY-this._hotSpot.y,this._updatePosition()}},{key:"_handleMouseUp",value:function(e){var o=this,n=document.elementFromPoint(e.clientX,e.clientY);this._updateVisibility(n),this._captureIsActive()&&window.setTimeout(function(){if(!o._target)return;n=document.elementFromPoint(e.clientX,e.clientY),o._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(e){return e?e===this._target?!0:this._target.contains(e)?!(window.getComputedStyle(e).cursor!=="none"):!1:!1}},{key:"_updateVisibility",value:function(e){this._captureIsActive()&&(e=document.captureElement),this._shouldShowCursor(e)?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)}}]),_}();H.default=s},sR1s:function(j,H,b){"use strict";b.d(H,"b",function(){return y}),b.d(H,"a",function(){return g}),b.d(H,"c",function(){return s}),b.d(H,"d",function(){return _});var I=b("U8pU"),v="RC_TABLE_KEY";function T(p){return p==null?[]:Array.isArray(p)?p:[p]}function y(p,e){if(!e&&typeof e!="number")return p;for(var o=T(e),n=p,l=0;l<o.length;l+=1){if(!n)return null;var r=o[l];n=n[r]}return n}function g(p){var e=[],o={};return p.forEach(function(n){for(var l=n||{},r=l.key,i=l.dataIndex,t=r||T(i).join("-")||v;o[t];)t="".concat(t,"_next");o[t]=!0,e.push(t)}),e}function s(){var p={};function e(r,i){i&&Object.keys(i).forEach(function(t){var a=i[t];a&&Object(I.a)(a)==="object"?(r[t]=r[t]||{},e(r[t],a)):r[t]=a})}for(var o=arguments.length,n=new Array(o),l=0;l<o;l++)n[l]=arguments[l];return n.forEach(function(r){e(p,r)}),p}function _(p){return p!=null}},sboe:function(j,H,b){"use strict";b.d(H,"a",function(){return T});var I=b("q1tI"),v=b.n(I),T=I.createContext(null)},sjKO:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=T;var I=30,v=12;function T(y,g){var s,_,p,e,o,n,l,r,i,t,a,c,d,f,h,u,E,x,O,C,w,S,A,D,M;s=y.state,_=y.next_in,D=y.input,p=_+(y.avail_in-5),e=y.next_out,M=y.output,o=e-(g-y.avail_out),n=e+(y.avail_out-257),l=s.dmax,r=s.wsize,i=s.whave,t=s.wnext,a=s.window,c=s.hold,d=s.bits,f=s.lencode,h=s.distcode,u=(1<<s.lenbits)-1,E=(1<<s.distbits)-1;e:do{d<15&&(c+=D[_++]<<d,d+=8,c+=D[_++]<<d,d+=8),x=f[c&u];t:for(;;){if(O=x>>>24,c>>>=O,d-=O,O=x>>>16&255,O===0)M[e++]=x&65535;else if(O&16){C=x&65535,O&=15,O&&(d<O&&(c+=D[_++]<<d,d+=8),C+=c&(1<<O)-1,c>>>=O,d-=O),d<15&&(c+=D[_++]<<d,d+=8,c+=D[_++]<<d,d+=8),x=h[c&E];n:for(;;){if(O=x>>>24,c>>>=O,d-=O,O=x>>>16&255,O&16){if(w=x&65535,O&=15,d<O&&(c+=D[_++]<<d,d+=8,d<O&&(c+=D[_++]<<d,d+=8)),w+=c&(1<<O)-1,w>l){y.msg="invalid distance too far back",s.mode=I;break e}if(c>>>=O,d-=O,O=e-o,w>O){if(O=w-O,O>i&&s.sane){y.msg="invalid distance too far back",s.mode=I;break e}if(S=0,A=a,t===0){if(S+=r-O,O<C){C-=O;do M[e++]=a[S++];while(--O);S=e-w,A=M}}else if(t<O){if(S+=r+t-O,O-=t,O<C){C-=O;do M[e++]=a[S++];while(--O);if(S=0,t<C){O=t,C-=O;do M[e++]=a[S++];while(--O);S=e-w,A=M}}}else if(S+=t-O,O<C){C-=O;do M[e++]=a[S++];while(--O);S=e-w,A=M}for(;C>2;)M[e++]=A[S++],M[e++]=A[S++],M[e++]=A[S++],C-=3;C&&(M[e++]=A[S++],C>1&&(M[e++]=A[S++]))}else{S=e-w;do M[e++]=M[S++],M[e++]=M[S++],M[e++]=M[S++],C-=3;while(C>2);C&&(M[e++]=M[S++],C>1&&(M[e++]=M[S++]))}}else if((O&64)===0){x=h[(x&65535)+(c&(1<<O)-1)];continue n}else{y.msg="invalid distance code",s.mode=I;break e}break}}else if((O&64)===0){x=f[(x&65535)+(c&(1<<O)-1)];continue t}else if(O&32){s.mode=v;break e}else{y.msg="invalid literal/length code",s.mode=I;break e}break}}while(_<p&&e<n);C=d>>3,_-=C,d-=C<<3,c&=(1<<d)-1,y.next_in=_,y.next_out=e,y.avail_in=_<p?5+(p-_):5-(_-p),y.avail_out=e<n?257+(n-e):257-(e-n),s.hold=c,s.bits=d;return}},t23M:function(j,H,b){"use strict";var I=b("VTBJ"),v=b("1OyB"),T=b("vuIU"),y=b("Ji7U"),g=b("LK+K"),s=b("q1tI"),_=b.n(s),p=b("m+aA"),e=b("Zm9Q"),o=b("Kwbf"),n=b("c+Xe"),l=b("bdgK"),r="rc-observer-key",i=function(t){Object(y.a)(c,t);var a=Object(g.a)(c);function c(){var d;return Object(v.a)(this,c),d=a.apply(this,arguments),d.resizeObserver=null,d.childNode=null,d.currentElement=null,d.state={width:0,height:0,offsetHeight:0,offsetWidth:0},d.onResize=function(f){var h=d.props.onResize,u=f[0].target,E=u.getBoundingClientRect(),x=E.width,O=E.height,C=u.offsetWidth,w=u.offsetHeight,S=Math.floor(x),A=Math.floor(O);if(d.state.width!==S||d.state.height!==A||d.state.offsetWidth!==C||d.state.offsetHeight!==w){var D={width:S,height:A,offsetWidth:C,offsetHeight:w};d.setState(D),h&&Promise.resolve().then(function(){h(Object(I.a)(Object(I.a)({},D),{},{offsetWidth:C,offsetHeight:w}))})}},d.setChildNode=function(f){d.childNode=f},d}return Object(T.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 h=Object(p.a)(this.childNode||this),u=h!==this.currentElement;u&&(this.destroyObserver(),this.currentElement=h),!this.resizeObserver&&h&&(this.resizeObserver=new l.default(this.onResize),this.resizeObserver.observe(h))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var f=this.props.children,h=Object(e.a)(f);if(h.length>1)Object(o.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(h.length===0)return Object(o.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var u=h[0];if(s.isValidElement(u)&&Object(n.c)(u)){var E=u.ref;h[0]=s.cloneElement(u,{ref:Object(n.a)(E,this.setChildNode)})}return h.length===1?h[0]:h.map(function(x,O){return!s.isValidElement(x)||"key"in x&&x.key!==null?x:s.cloneElement(x,{key:"".concat(r,"-").concat(O)})})}}]),c}(s.Component);i.displayName="ResizeObserver",H.a=i},t9D7:function(j,H,b){"use strict";b.d(H,"b",function(){return _}),b.d(H,"g",function(){return e}),b.d(H,"d",function(){return o}),b.d(H,"e",function(){return n}),b.d(H,"a",function(){return l}),b.d(H,"f",function(){return t}),b.d(H,"c",function(){return a});var I=b("Vhoy"),v=b("MI8n"),T=b("pmY6"),y=b("Cg/j"),g=b("ic2d"),s=b("nEHx");const _=Object(y.c)("themeService");var p;(function(c){function d(f){return f&&typeof f=="object"&&typeof f.id=="string"}c.isThemeColor=d})(p||(p={}));function e(c){return{id:c}}var o;(function(c){function d(O){return O&&typeof O=="object"&&typeof O.id=="string"&&(typeof O.color=="undefined"||p.isThemeColor(O.color))}c.isThemeIcon=d;const f=new RegExp(`^\\$\\((${I.a.iconNameExpression}(?:${I.a.iconModifierExpression})?)\\)$`);function h(O){const C=f.exec(O);if(!C)return;let[,w]=C;return{id:w}}c.fromString=h;function u(O,C){let w=O.id;const S=w.lastIndexOf("~");return S!==-1&&(w=w.substring(0,S)),C&&(w=`${w}~${C}`),{id:w}}c.modify=u;function E(O,C){var w,S;return O.id===C.id&&((w=O.color)===null||w===void 0?void 0:w.id)===((S=C.color)===null||S===void 0?void 0:S.id)}c.isEqual=E;function x(O,C){return{id:O.id,color:C?e(C):void 0}}c.asThemeIcon=x,c.asClassNameArray=I.a.asClassNameArray,c.asClassName=I.a.asClassName,c.asCSSSelector=I.a.asCSSSelector})(o||(o={}));function n(c){switch(c){case s.a.DARK:return"vs-dark";case s.a.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const l={ThemingContribution:"base.contributions.theming"};class r{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new v.b}onColorThemeChange(c){return this.themingParticipants.push(c),this.onThemingParticipantAddedEmitter.fire(c),Object(T.i)(()=>{const d=this.themingParticipants.indexOf(c);this.themingParticipants.splice(d,1)})}getThemingParticipants(){return this.themingParticipants}}let i=new r;g.a.add(l.ThemingContribution,i);function t(c){return i.onColorThemeChange(c)}class a extends T.a{constructor(c){super();this.themeService=c,this.theme=c.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(d=>this.onThemeChange(d)))}onThemeChange(c){this.theme=c,this.updateStyles()}updateStyles(){}}},tUsH:function(j,H){j.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(j,H){j.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(j,H,b){j.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(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("MlIO"),b("1uat"))})(this,function(I){return function(){var v=I,T=v.x64,y=T.Word,g=T.WordArray,s=v.algo,_=s.SHA512,p=s.SHA384=_.extend({_doReset:function(){this._hash=new g.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 e=_._doFinalize.call(this);return e.sigBytes-=16,e}});v.SHA384=_._createHelper(p),v.HmacSHA384=_._createHmacHelper(p)}(),I.SHA384})},uGxW:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("OLod"))})(this,function(I){return I.pad.NoPadding={pad:function(){},unpad:function(){}},I.pad.NoPadding})},uQRt:function(j,H,b){j.exports=I;function I(){return b("gaXo"),{}}},ulZh:function(j,H,b){typeof window!="undefined"&&function(v,T){j.exports=T()}(this,function(){return function(I){var v={};function T(y){if(v[y])return v[y].exports;var g=v[y]={i:y,l:!1,exports:{}};return I[y].call(g.exports,g,g.exports,T),g.l=!0,g.exports}return T.m=I,T.c=v,T.d=function(y,g,s){T.o(y,g)||Object.defineProperty(y,g,{enumerable:!0,get:s})},T.r=function(y){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(y,"__esModule",{value:!0})},T.t=function(y,g){if(g&1&&(y=T(y)),g&8)return y;if(g&4&&typeof y=="object"&&y&&y.__esModule)return y;var s=Object.create(null);if(T.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:y}),g&2&&typeof y!="string")for(var _ in y)T.d(s,_,function(p){return y[p]}.bind(null,_));return s},T.n=function(y){var g=y&&y.__esModule?function(){return y.default}:function(){return y};return T.d(g,"a",g),g},T.o=function(y,g){return Object.prototype.hasOwnProperty.call(y,g)},T.p="/dist/",T(T.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(I,v,T){"use strict";var y=Object.prototype.hasOwnProperty,g="~";function s(){}Object.create&&(s.prototype=Object.create(null),new s().__proto__||(g=!1));function _(n,l,r){this.fn=n,this.context=l,this.once=r||!1}function p(n,l,r,i,t){if(typeof r!="function")throw new TypeError("The listener must be a function");var a=new _(r,i||n,t),c=g?g+l:l;return n._events[c]?n._events[c].fn?n._events[c]=[n._events[c],a]:n._events[c].push(a):(n._events[c]=a,n._eventsCount++),n}function e(n,l){--n._eventsCount===0?n._events=new s:delete n._events[l]}function o(){this._events=new s,this._eventsCount=0}o.prototype.eventNames=function(){var l=[],r,i;if(this._eventsCount===0)return l;for(i in r=this._events)y.call(r,i)&&l.push(g?i.slice(1):i);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(r)):l},o.prototype.listeners=function(l){var r=g?g+l:l,i=this._events[r];if(!i)return[];if(i.fn)return[i.fn];for(var t=0,a=i.length,c=new Array(a);t<a;t++)c[t]=i[t].fn;return c},o.prototype.listenerCount=function(l){var r=g?g+l:l,i=this._events[r];return i?i.fn?1:i.length:0},o.prototype.emit=function(l,r,i,t,a,c){var d=g?g+l:l;if(!this._events[d])return!1;var f=this._events[d],h=arguments.length,u,E;if(f.fn){f.once&&this.removeListener(l,f.fn,void 0,!0);switch(h){case 1:return f.fn.call(f.context),!0;case 2:return f.fn.call(f.context,r),!0;case 3:return f.fn.call(f.context,r,i),!0;case 4:return f.fn.call(f.context,r,i,t),!0;case 5:return f.fn.call(f.context,r,i,t,a),!0;case 6:return f.fn.call(f.context,r,i,t,a,c),!0}for(E=1,u=new Array(h-1);E<h;E++)u[E-1]=arguments[E];f.fn.apply(f.context,u)}else{var x=f.length,O;for(E=0;E<x;E++){f[E].once&&this.removeListener(l,f[E].fn,void 0,!0);switch(h){case 1:f[E].fn.call(f[E].context);break;case 2:f[E].fn.call(f[E].context,r);break;case 3:f[E].fn.call(f[E].context,r,i);break;case 4:f[E].fn.call(f[E].context,r,i,t);break;default:if(!u)for(O=1,u=new Array(h-1);O<h;O++)u[O-1]=arguments[O];f[E].fn.apply(f[E].context,u)}}}return!0},o.prototype.on=function(l,r,i){return p(this,l,r,i,!1)},o.prototype.once=function(l,r,i){return p(this,l,r,i,!0)},o.prototype.removeListener=function(l,r,i,t){var a=g?g+l:l;if(!this._events[a])return this;if(!r)return e(this,a),this;var c=this._events[a];if(c.fn)c.fn===r&&(!t||c.once)&&(!i||c.context===i)&&e(this,a);else{for(var d=0,f=[],h=c.length;d<h;d++)(c[d].fn!==r||t&&!c[d].once||i&&c[d].context!==i)&&f.push(c[d]);f.length?this._events[a]=f.length===1?f[0]:f:e(this,a)}return this},o.prototype.removeAllListeners=function(l){var r;return l?(r=g?g+l:l,this._events[r]&&e(this,r)):(this._events=new s,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=g,o.EventEmitter=o,I.exports=o},"./node_modules/url-toolkit/src/url-toolkit.js":function(I,v,T){(function(y){var g=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,s=/^([^\/?#]*)([^]*)$/,_=/(?:\/|^)\.(?=\/)/g,p=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,e={buildAbsoluteURL:function(o,n,l){if(l=l||{},o=o.trim(),n=n.trim(),!n){if(!l.alwaysNormalize)return o;var r=e.parseURL(o);if(!r)throw new Error("Error trying to parse base URL.");return r.path=e.normalizePath(r.path),e.buildURLFromParts(r)}var i=e.parseURL(n);if(!i)throw new Error("Error trying to parse relative URL.");if(i.scheme)return l.alwaysNormalize?(i.path=e.normalizePath(i.path),e.buildURLFromParts(i)):n;var t=e.parseURL(o);if(!t)throw new Error("Error trying to parse base URL.");if(!t.netLoc&&t.path&&t.path[0]!=="/"){var a=s.exec(t.path);t.netLoc=a[1],t.path=a[2]}t.netLoc&&!t.path&&(t.path="/");var c={scheme:t.scheme,netLoc:i.netLoc,path:null,params:i.params,query:i.query,fragment:i.fragment};if(!i.netLoc&&(c.netLoc=t.netLoc,i.path[0]!=="/"))if(!i.path)c.path=t.path,i.params||(c.params=t.params,i.query||(c.query=t.query));else{var d=t.path,f=d.substring(0,d.lastIndexOf("/")+1)+i.path;c.path=e.normalizePath(f)}return c.path===null&&(c.path=l.alwaysNormalize?e.normalizePath(i.path):i.path),e.buildURLFromParts(c)},parseURL:function(o){var n=g.exec(o);return n?{scheme:n[1]||"",netLoc:n[2]||"",path:n[3]||"",params:n[4]||"",query:n[5]||"",fragment:n[6]||""}:null},normalizePath:function(o){for(o=o.split("").reverse().join("").replace(_,"");o.length!==(o=o.replace(p,"")).length;);return o.split("").reverse().join("")},buildURLFromParts:function(o){return o.scheme+o.netLoc+o.path+o.params+o.query+o.fragment}};I.exports=e})(this)},"./node_modules/webworkify-webpack/index.js":function(I,v,T){function y(l){var r={};function i(a){if(r[a])return r[a].exports;var c=r[a]={i:a,l:!1,exports:{}};return l[a].call(c.exports,c,c.exports,i),c.l=!0,c.exports}i.m=l,i.c=r,i.i=function(a){return a},i.d=function(a,c,d){i.o(a,c)||Object.defineProperty(a,c,{configurable:!1,enumerable:!0,get:d})},i.r=function(a){Object.defineProperty(a,"__esModule",{value:!0})},i.n=function(a){var c=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(c,"a",c),c},i.o=function(a,c){return Object.prototype.hasOwnProperty.call(a,c)},i.p="/",i.oe=function(a){throw console.error(a),a};var t=i(i.s=ENTRY_MODULE);return t.default||t}var g="[\\.|\\-|\\+|\\w|/|@]+",s="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+g+").*?\\)";function _(l){return(l+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function p(l){return!isNaN(1*l)}function e(l,r,i){var t={};t[i]=[];var a=r.toString(),c=a.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!c)return t;for(var d=c[1],f=new RegExp("(\\\\n|\\W)"+_(d)+s,"g"),h;h=f.exec(a);){if(h[3]==="dll-reference")continue;t[i].push(h[3])}for(f=new RegExp("\\("+_(d)+'\\("(dll-reference\\s('+g+'))"\\)\\)'+s,"g");h=f.exec(a);)l[h[2]]||(t[i].push(h[1]),l[h[2]]=T(h[1]).m),t[h[2]]=t[h[2]]||[],t[h[2]].push(h[4]);for(var u=Object.keys(t),E=0;E<u.length;E++)for(var x=0;x<t[u[E]].length;x++)p(t[u[E]][x])&&(t[u[E]][x]=1*t[u[E]][x]);return t}function o(l){var r=Object.keys(l);return r.reduce(function(i,t){return i||l[t].length>0},!1)}function n(l,r){for(var i={main:[r]},t={main:[]},a={main:{}};o(i);)for(var c=Object.keys(i),d=0;d<c.length;d++){var f=c[d],h=i[f],u=h.pop();if(a[f]=a[f]||{},a[f][u]||!l[f][u])continue;a[f][u]=!0,t[f]=t[f]||[],t[f].push(u);for(var E=e(l,l[f][u],f),x=Object.keys(E),O=0;O<x.length;O++)i[x[O]]=i[x[O]]||[],i[x[O]]=i[x[O]].concat(E[x[O]])}return t}I.exports=function(l,r){r=r||{};var i={main:T.m},t=r.all?{main:Object.keys(i.main)}:n(i,l),a="";Object.keys(t).filter(function(u){return u!=="main"}).forEach(function(u){for(var E=0;t[u][E];)E++;t[u].push(E),i[u][E]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",a=a+"var "+u+" = ("+y.toString().replace("ENTRY_MODULE",JSON.stringify(E))+")({"+t[u].map(function(x){return""+JSON.stringify(x)+": "+i[u][x].toString()}).join(",")+`});
|
|
|
`}),a=a+"new (("+y.toString().replace("ENTRY_MODULE",JSON.stringify(l))+")({"+t.main.map(function(u){return""+JSON.stringify(u)+": "+i.main[u].toString()}).join(",")+"}))(self);";var c=new window.Blob([a],{type:"text/javascript"});if(r.bare)return c;var d=window.URL||window.webkitURL||window.mozURL||window.msURL,f=d.createObjectURL(c),h=new window.Worker(f);return h.objectURL=f,h}},"./src/config.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"hlsDefaultConfig",function(){return O}),T.d(v,"mergeConfig",function(){return w}),T.d(v,"enableStreamingMode",function(){return S});var y=T("./src/controller/abr-controller.ts"),g=T("./src/controller/audio-stream-controller.ts"),s=T("./src/controller/audio-track-controller.ts"),_=T("./src/controller/subtitle-stream-controller.ts"),p=T("./src/controller/subtitle-track-controller.ts"),e=T("./src/controller/buffer-controller.ts"),o=T("./src/controller/timeline-controller.ts"),n=T("./src/controller/cap-level-controller.ts"),l=T("./src/controller/fps-controller.ts"),r=T("./src/controller/eme-controller.ts"),i=T("./src/controller/cmcd-controller.ts"),t=T("./src/utils/xhr-loader.ts"),a=T("./src/utils/fetch-loader.ts"),c=T("./src/utils/cues.ts"),d=T("./src/utils/mediakeys-helper.ts"),f=T("./src/utils/logger.ts");function h(){return h=Object.assign||function(A){for(var D=1;D<arguments.length;D++){var M=arguments[D];for(var N in M)Object.prototype.hasOwnProperty.call(M,N)&&(A[N]=M[N])}return A},h.apply(this,arguments)}function u(A,D){var M=Object.keys(A);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(A);D&&(N=N.filter(function(P){return Object.getOwnPropertyDescriptor(A,P).enumerable})),M.push.apply(M,N)}return M}function E(A){for(var D=1;D<arguments.length;D++){var M=arguments[D]!=null?arguments[D]:{};D%2?u(Object(M),!0).forEach(function(N){x(A,N,M[N])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(M)):u(Object(M)).forEach(function(N){Object.defineProperty(A,N,Object.getOwnPropertyDescriptor(M,N))})}return A}function x(A,D,M){return D in A?Object.defineProperty(A,D,{value:M,enumerable:!0,configurable:!0,writable:!0}):A[D]=M,A}var O=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:t.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:y.default,bufferController:e.default,capLevelController:n.default,fpsController:l.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:d.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},C()),{},{subtitleStreamController:_.SubtitleStreamController,subtitleTrackController:p.default,timelineController:o.TimelineController,audioStreamController:g.default,audioTrackController:s.default,emeController:r.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,D){if((D.liveSyncDurationCount||D.liveMaxLatencyDurationCount)&&(D.liveSyncDuration||D.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(D.liveMaxLatencyDurationCount!==void 0&&(D.liveSyncDurationCount===void 0||D.liveMaxLatencyDurationCount<=D.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(D.liveMaxLatencyDuration!==void 0&&(D.liveSyncDuration===void 0||D.liveMaxLatencyDuration<=D.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return h({},A,D)}function S(A){var D=A.loader;if(D!==a.default&&D!==t.default)f.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),A.progressive=!1;else{var M=Object(a.fetchSupported)();M&&(A.loader=a.default,A.progressive=!0,A.enableSoftwareAES=!0,f.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(I,v,T){"use strict";T.r(v);var y=T("./src/polyfills/number.ts"),g=T("./src/utils/ewma-bandwidth-estimator.ts"),s=T("./src/events.ts"),_=T("./src/utils/buffer-helper.ts"),p=T("./src/errors.ts"),e=T("./src/types/loader.ts"),o=T("./src/utils/logger.ts");function n(i,t){for(var a=0;a<t.length;a++){var c=t[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(i,c.key,c)}}function l(i,t,a){return t&&n(i.prototype,t),a&&n(i,a),i}var r=function(){function i(a){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=a;var c=a.config;this.bwEstimator=new g.default(c.abrEwmaSlowVoD,c.abrEwmaFastVoD,c.abrEwmaDefaultEstimate),this.registerListeners()}var t=i.prototype;return t.registerListeners=function(){var c=this.hls;c.on(s.Events.FRAG_LOADING,this.onFragLoading,this),c.on(s.Events.FRAG_LOADED,this.onFragLoaded,this),c.on(s.Events.FRAG_BUFFERED,this.onFragBuffered,this),c.on(s.Events.LEVEL_LOADED,this.onLevelLoaded,this),c.on(s.Events.ERROR,this.onError,this)},t.unregisterListeners=function(){var c=this.hls;c.off(s.Events.FRAG_LOADING,this.onFragLoading,this),c.off(s.Events.FRAG_LOADED,this.onFragLoaded,this),c.off(s.Events.FRAG_BUFFERED,this.onFragBuffered,this),c.off(s.Events.LEVEL_LOADED,this.onLevelLoaded,this),c.off(s.Events.ERROR,this.onError,this)},t.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},t.onFragLoading=function(c,d){var f=d.frag;if(f.type===e.PlaylistLevelType.MAIN&&!this.timer){var h;this.fragCurrent=f,this.partCurrent=(h=d.part)!=null?h:null,this.timer=self.setInterval(this.onCheck,100)}},t.onLevelLoaded=function(c,d){var f=this.hls.config;d.details.live?this.bwEstimator.update(f.abrEwmaSlowLive,f.abrEwmaFastLive):this.bwEstimator.update(f.abrEwmaSlowVoD,f.abrEwmaFastVoD)},t._abandonRulesCheck=function(){var c=this.fragCurrent,d=this.partCurrent,f=this.hls,h=f.autoLevelEnabled,u=f.config,E=f.media;if(!c||!E)return;var x=d?d.stats:c.stats,O=d?d.duration:c.duration;if(x.aborted){o.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!h||E.paused||!E.playbackRate||!E.readyState)return;var C=performance.now()-x.loading.start,w=Math.abs(E.playbackRate);if(C<=500*O/w)return;var S=f.levels,A=f.minAutoLevel,D=S[c.level],M=x.total||Math.max(x.loaded,Math.round(O*D.maxBitrate/8)),N=Math.max(1,x.bwEstimate?x.bwEstimate/8:x.loaded*1e3/C),P=(M-x.loaded)/N,z=E.currentTime,X=(_.BufferHelper.bufferInfo(E,z,u.maxBufferHole).end-z)/w;if(X>=2*O/w||P<=X)return;var k=Number.POSITIVE_INFINITY,F;for(F=c.level-1;F>A;F--){var U=S[F].maxBitrate;if(k=O*U/(8*.8*N),k<X)break}if(k>=P)return;var L=this.bwEstimator.getEstimate();o.logger.warn("Fragment "+c.sn+(d?" part "+d.index:"")+" of level "+c.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+F+`
|
|
|
Current BW estimate: `+(Object(y.isFiniteNumber)(L)?(L/1024).toFixed(3):"Unknown")+` Kb/s
|
|
|
Estimated load time for current fragment: `+P.toFixed(3)+` s
|
|
|
Estimated load time for the next fragment: `+k.toFixed(3)+` s
|
|
|
Time to underbuffer: `+X.toFixed(3)+" s"),f.nextLoadLevel=F,this.bwEstimator.sample(C,x.loaded),this.clearTimer(),c.loader&&(this.fragCurrent=this.partCurrent=null,c.loader.abort()),f.trigger(s.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:c,part:d,stats:x})},t.onFragLoaded=function(c,d){var f=d.frag,h=d.part;if(f.type===e.PlaylistLevelType.MAIN&&Object(y.isFiniteNumber)(f.sn)){var u=h?h.stats:f.stats,E=h?h.duration:f.duration;if(this.clearTimer(),this.lastLoadedFragLevel=f.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var x=this.hls.levels[f.level],O=(x.loaded?x.loaded.bytes:0)+u.loaded,C=(x.loaded?x.loaded.duration:0)+E;x.loaded={bytes:O,duration:C},x.realBitrate=Math.round(8*O/C)}if(f.bitrateTest){var w={stats:u,frag:f,part:h,id:f.type};this.onFragBuffered(s.Events.FRAG_BUFFERED,w),f.bitrateTest=!1}}},t.onFragBuffered=function(c,d){var f=d.frag,h=d.part,u=h?h.stats:f.stats;if(u.aborted)return;if(f.type!==e.PlaylistLevelType.MAIN||f.sn==="initSegment")return;var E=u.parsing.end-u.loading.start;this.bwEstimator.sample(E,u.loaded),u.bwEstimate=this.bwEstimator.getEstimate(),f.bitrateTest?this.bitrateTestDelay=E/1e3:this.bitrateTestDelay=0},t.onError=function(c,d){switch(d.details){case p.ErrorDetails.FRAG_LOAD_ERROR:case p.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},t.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},t.getNextABRAutoLevel=function(){var c=this.fragCurrent,d=this.partCurrent,f=this.hls,h=f.maxAutoLevel,u=f.config,E=f.minAutoLevel,x=f.media,O=d?d.duration:c?c.duration:0,C=x?x.currentTime:0,w=x&&x.playbackRate!==0?Math.abs(x.playbackRate):1,S=this.bwEstimator?this.bwEstimator.getEstimate():u.abrEwmaDefaultEstimate,A=(_.BufferHelper.bufferInfo(x,C,u.maxBufferHole).end-C)/w,D=this.findBestLevel(S,E,h,A,u.abrBandWidthFactor,u.abrBandWidthUpFactor);if(D>=0)return D;o.logger.trace((A?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var M=O?Math.min(O,u.maxStarvationDelay):u.maxStarvationDelay,N=u.abrBandWidthFactor,P=u.abrBandWidthUpFactor;if(!A){var z=this.bitrateTestDelay;if(z){var X=O?Math.min(O,u.maxLoadingDelay):u.maxLoadingDelay;M=X-z,o.logger.trace("bitrate test took "+Math.round(1e3*z)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*M)+" ms"),N=P=1}}return D=this.findBestLevel(S,E,h,A+M,N,P),Math.max(D,0)},t.findBestLevel=function(c,d,f,h,u,E){for(var x,O=this.fragCurrent,C=this.partCurrent,w=this.lastLoadedFragLevel,S=this.hls.levels,A=S[w],D=!!(A!=null&&(x=A.details)!==null&&x!==void 0&&x.live),M=A==null?void 0:A.codecSet,N=C?C.duration:O?O.duration:0,P=f;P>=d;P--){var z=S[P];if(!z||M&&z.codecSet!==M)continue;var X=z.details,k=(C?X==null?void 0:X.partTarget:X==null?void 0:X.averagetargetduration)||N,F=void 0;P<=w?F=u*c:F=E*c;var U=S[P].maxBitrate,L=U*k/F;if(o.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+P+"/"+Math.round(F)+"/"+U+"/"+k+"/"+h+"/"+L),F>U&&(!L||D&&!this.bitrateTestDelay||L<h))return P}return-1},l(i,[{key:"nextAutoLevel",get:function(){var c=this._nextAutoLevel,d=this.bwEstimator;if(c!==-1&&(!d||!d.canEstimate()))return c;var f=this.getNextABRAutoLevel();return c!==-1&&(f=Math.min(c,f)),f},set:function(c){this._nextAutoLevel=c}}]),i}();v.default=r},"./src/controller/audio-stream-controller.ts":function(I,v,T){"use strict";T.r(v);var y=T("./src/polyfills/number.ts"),g=T("./src/controller/base-stream-controller.ts"),s=T("./src/events.ts"),_=T("./src/utils/buffer-helper.ts"),p=T("./src/controller/fragment-tracker.ts"),e=T("./src/types/level.ts"),o=T("./src/types/loader.ts"),n=T("./src/loader/fragment.ts"),l=T("./src/demux/chunk-cache.ts"),r=T("./src/demux/transmuxer-interface.ts"),i=T("./src/types/transmuxer.ts"),t=T("./src/controller/fragment-finders.ts"),a=T("./src/utils/discontinuities.ts"),c=T("./src/errors.ts"),d=T("./src/utils/logger.ts");function f(){return f=Object.assign||function(O){for(var C=1;C<arguments.length;C++){var w=arguments[C];for(var S in w)Object.prototype.hasOwnProperty.call(w,S)&&(O[S]=w[S])}return O},f.apply(this,arguments)}function h(O,C){O.prototype=Object.create(C.prototype),O.prototype.constructor=O,u(O,C)}function u(O,C){return u=Object.setPrototypeOf||function(S,A){return S.__proto__=A,S},u(O,C)}var E=100,x=function(O){h(C,O);function C(S,A){var D;return D=O.call(this,S,A,"[audio-stream-controller]")||this,D.videoBuffer=null,D.videoTrackCC=-1,D.waitingVideoCC=-1,D.audioSwitch=!1,D.trackId=-1,D.waitingData=null,D.mainDetails=null,D.bufferFlushed=!1,D._registerListeners(),D}var w=C.prototype;return w.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},w._registerListeners=function(){var A=this.hls;A.on(s.Events.MEDIA_ATTACHED,this.onMediaAttached,this),A.on(s.Events.MEDIA_DETACHING,this.onMediaDetaching,this),A.on(s.Events.MANIFEST_LOADING,this.onManifestLoading,this),A.on(s.Events.LEVEL_LOADED,this.onLevelLoaded,this),A.on(s.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),A.on(s.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),A.on(s.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),A.on(s.Events.ERROR,this.onError,this),A.on(s.Events.BUFFER_RESET,this.onBufferReset,this),A.on(s.Events.BUFFER_CREATED,this.onBufferCreated,this),A.on(s.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),A.on(s.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),A.on(s.Events.FRAG_BUFFERED,this.onFragBuffered,this)},w._unregisterListeners=function(){var A=this.hls;A.off(s.Events.MEDIA_ATTACHED,this.onMediaAttached,this),A.off(s.Events.MEDIA_DETACHING,this.onMediaDetaching,this),A.off(s.Events.MANIFEST_LOADING,this.onManifestLoading,this),A.off(s.Events.LEVEL_LOADED,this.onLevelLoaded,this),A.off(s.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),A.off(s.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),A.off(s.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),A.off(s.Events.ERROR,this.onError,this),A.off(s.Events.BUFFER_RESET,this.onBufferReset,this),A.off(s.Events.BUFFER_CREATED,this.onBufferCreated,this),A.off(s.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),A.off(s.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),A.off(s.Events.FRAG_BUFFERED,this.onFragBuffered,this)},w.onInitPtsFound=function(A,D){var M=D.frag,N=D.id,P=D.initPTS;if(N==="main"){var z=M.cc;this.initPTS[M.cc]=P,this.log("InitPTS for cc: "+z+" found from main: "+P),this.videoTrackCC=z,this.state===g.State.WAITING_INIT_PTS&&this.tick()}},w.startLoad=function(A){if(!this.levels){this.startPosition=A,this.state=g.State.STOPPED;return}var D=this.lastCurrentTime;this.stopLoad(),this.setInterval(E),this.fragLoadError=0,D>0&&A===-1?(this.log("Override startPosition with lastCurrentTime @"+D.toFixed(3)),this.state=g.State.IDLE):(this.loadedmetadata=!1,this.state=g.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=A,this.tick()},w.doTick=function(){switch(this.state){case g.State.IDLE:this.doTickIdle();break;case g.State.WAITING_TRACK:{var A,D=this.levels,M=this.trackId,N=D==null||((A=D[M])===null||A===void 0)?void 0:A.details;if(N){if(this.waitForCdnTuneIn(N))break;this.state=g.State.WAITING_INIT_PTS}break}case g.State.FRAG_LOADING_WAITING_RETRY:{var P,z=performance.now(),X=this.retryDate;(!X||z>=X||(P=this.media)!==null&&P!==void 0&&P.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=g.State.IDLE);break}case g.State.WAITING_INIT_PTS:{var k=this.waitingData;if(k){var F=k.frag,U=k.part,L=k.cache,B=k.complete;if(this.initPTS[F.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=g.State.FRAG_LOADING;var Z=L.flush(),re={frag:F,part:U,payload:Z,networkDetails:null};this._handleFragmentLoadProgress(re),B&&O.prototype._handleFragmentLoadComplete.call(this,re)}else if(this.videoTrackCC!==this.waitingVideoCC)d.logger.log("Waiting fragment cc ("+F.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var he=this.getLoadPosition(),Ce=_.BufferHelper.bufferInfo(this.mediaBuffer,he,this.config.maxBufferHole),ke=Object(t.fragmentWithinToleranceTest)(Ce.end,this.config.maxFragLookUpTolerance,F);ke<0&&(d.logger.log("Waiting fragment cc ("+F.cc+") @ "+F.start+" cancelled because another fragment at "+Ce.end+" is needed"),this.clearWaitingFragment())}}else this.state=g.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=g.State.IDLE)},w.onTickEnd=function(){var A=this.media;if(!A||!A.readyState)return;var D=this.mediaBuffer?this.mediaBuffer:A,M=D.buffered;!this.loadedmetadata&&M.length&&(this.loadedmetadata=!0),this.lastCurrentTime=A.currentTime},w.doTickIdle=function(){var A,D,M=this.hls,N=this.levels,P=this.media,z=this.trackId,X=M.config;if(!N||!N[z])return;if(!P&&(this.startFragRequested||!X.startFragPrefetch))return;var k=N[z],F=k.details;if(!F||F.live&&this.levelLastLoaded!==z||this.waitForCdnTuneIn(F)){this.state=g.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,n.ElementaryStreamTypes.AUDIO,o.PlaylistLevelType.AUDIO));var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,o.PlaylistLevelType.AUDIO);if(U===null)return;var L=U.len,B=this.getMaxBufferLength(),Z=this.audioSwitch;if(L>=B&&!Z)return;if(!Z&&this._streamEnded(U,F)){M.trigger(s.Events.BUFFER_EOS,{type:"audio"}),this.state=g.State.ENDED;return}var re=F.fragments,he=re[0].start,Ce=U.end;if(Z){var ke=this.getLoadPosition();Ce=ke,F.PTSKnown&&ke<he&&((U.end>he||U.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),P.currentTime=he+.05))}var te=this.getNextFragment(Ce,F);if(!te){this.bufferFlushed=!0;return}((A=te.decryptdata)===null||A===void 0?void 0:A.keyFormat)==="identity"&&!((D=te.decryptdata)!==null&&D!==void 0&&D.key)?this.loadKey(te,F):this.loadFragment(te,F,Ce)},w.getMaxBufferLength=function(){var A=O.prototype.getMaxBufferLength.call(this),D=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,o.PlaylistLevelType.MAIN);return D===null?A:Math.max(A,D.len)},w.onMediaDetaching=function(){this.videoBuffer=null,O.prototype.onMediaDetaching.call(this)},w.onAudioTracksUpdated=function(A,D){var M=D.audioTracks;this.resetTransmuxer(),this.levels=M.map(function(N){return new e.Level(N)})},w.onAudioTrackSwitching=function(A,D){var M=!!D.url;this.trackId=D.id;var N=this.fragCurrent;N!=null&&N.loader&&N.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),M?this.setInterval(E):this.resetTransmuxer(),M?(this.audioSwitch=!0,this.state=g.State.IDLE):this.state=g.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,D){this.mainDetails=D.details},w.onAudioTrackLoaded=function(A,D){var M,N=this.levels,P=D.details,z=D.id;if(!N){this.warn("Audio tracks were reset while loading level "+z);return}this.log("Track "+z+" loaded ["+P.startSN+","+P.endSN+"],duration:"+P.totalduration);var X=N[z],k=0;if(P.live||(M=X.details)!==null&&M!==void 0&&M.live){var F=this.mainDetails;if(P.fragments[0]||(P.deltaUpdateFailed=!0),P.deltaUpdateFailed||!F)return;!X.details&&P.hasProgramDateTime&&F.hasProgramDateTime?(Object(a.alignMediaPlaylistByPDT)(P,F),k=P.fragments[0].start):k=this.alignPlaylists(P,X.details)}X.details=P,this.levelLastLoaded=z,!this.startFragRequested&&(this.mainDetails||!P.live)&&this.setStartPosition(X.details,k),this.state===g.State.WAITING_TRACK&&!this.waitForCdnTuneIn(P)&&(this.state=g.State.IDLE),this.tick()},w._handleFragmentLoadProgress=function(A){var D,M=A.frag,N=A.part,P=A.payload,z=this.config,X=this.trackId,k=this.levels;if(!k){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+M.sn+" of level "+M.level+" will not be buffered");return}var F=k[X];console.assert(F,"Audio track is defined on fragment load progress");var U=F.details;console.assert(U,"Audio track details are defined on fragment load progress");var L=z.defaultAudioCodec||F.audioCodec||"mp4a.40.2",B=this.transmuxer;B||(B=this.transmuxer=new r.default(this.hls,o.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var Z=this.initPTS[M.cc],re=(D=M.initSegment)===null||D===void 0?void 0:D.data;if(Z!==void 0){var he=!1,Ce=N?N.index:-1,ke=Ce!==-1,te=new i.ChunkMetadata(M.level,M.sn,M.stats.chunkCount,P.byteLength,Ce,ke);B.push(P,re,L,"",M,N,U.totalduration,he,te,Z)}else{d.logger.log("Unknown video PTS for cc "+M.cc+", waiting for video PTS before demuxing audio frag "+M.sn+" of ["+U.startSN+" ,"+U.endSN+"],track "+X);var Re=this.waitingData=this.waitingData||{frag:M,part:N,cache:new l.default,complete:!1},Te=Re.cache;Te.push(new Uint8Array(P)),this.waitingVideoCC=this.videoTrackCC,this.state=g.State.WAITING_INIT_PTS}},w._handleFragmentLoadComplete=function(A){if(this.waitingData){this.waitingData.complete=!0;return}O.prototype._handleFragmentLoadComplete.call(this,A)},w.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},w.onBufferCreated=function(A,D){var M=D.tracks.audio;M&&(this.mediaBuffer=M.buffer),D.tracks.video&&(this.videoBuffer=D.tracks.video.buffer)},w.onFragBuffered=function(A,D){var M=D.frag,N=D.part;if(M.type!==o.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(M)){this.warn("Fragment "+M.sn+(N?" p: "+N.index:"")+" of level "+M.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}M.sn!=="initSegment"&&(this.fragPrevious=M,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(s.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(M,N)},w.onError=function(A,D){switch(D.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(o.PlaylistLevelType.AUDIO,D);break;case c.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case c.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==g.State.ERROR&&this.state!==g.State.STOPPED&&(this.state=D.fatal?g.State.ERROR:g.State.IDLE,this.warn(D.details+" while loading frag, switching to "+this.state+" state"));break;case c.ErrorDetails.BUFFER_FULL_ERROR:if(D.parent==="audio"&&(this.state===g.State.PARSING||this.state===g.State.PARSED)){var M=!0,N=this.getFwdBufferInfo(this.mediaBuffer,o.PlaylistLevelType.AUDIO);N&&N.len>.5&&(M=!this.reduceMaxBufferLength(N.len)),M&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,O.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},w.onBufferFlushed=function(A,D){var M=D.type;M===n.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},w._handleTransmuxComplete=function(A){var D,M="audio",N=this.hls,P=A.remuxResult,z=A.chunkMeta,X=this.getCurrentContext(z);if(!X){this.warn("The loading context changed while buffering fragment "+z.sn+" of level "+z.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(z.level);return}var k=X.frag,F=X.part,U=P.audio,L=P.text,B=P.id3,Z=P.initSegment;if(this.fragContextChanged(k))return;if(this.state=g.State.PARSING,this.audioSwitch&&U&&this.completeAudioSwitch(),Z!=null&&Z.tracks&&(this._bufferInitSegment(Z.tracks,k,z),N.trigger(s.Events.FRAG_PARSING_INIT_SEGMENT,{frag:k,id:M,tracks:Z.tracks})),U){var re=U.startPTS,he=U.endPTS,Ce=U.startDTS,ke=U.endDTS;F&&(F.elementaryStreams[n.ElementaryStreamTypes.AUDIO]={startPTS:re,endPTS:he,startDTS:Ce,endDTS:ke}),k.setElementaryStreamInfo(n.ElementaryStreamTypes.AUDIO,re,he,Ce,ke),this.bufferFragmentData(U,k,F,z)}if(B!=null&&(D=B.samples)!==null&&D!==void 0&&D.length){var te=f({frag:k,id:M},B);N.trigger(s.Events.FRAG_PARSING_METADATA,te)}if(L){var Re=f({frag:k,id:M},L);N.trigger(s.Events.FRAG_PARSING_USERDATA,Re)}},w._bufferInitSegment=function(A,D,M){if(this.state!==g.State.PARSING)return;A.video&&delete A.video;var N=A.audio;if(!N)return;N.levelCodec=N.codec,N.id="audio",this.log("Init audio buffer, container:"+N.container+", codecs[parsed]=["+N.codec+"]"),this.hls.trigger(s.Events.BUFFER_CODECS,A);var P=N.initSegment;if(P!=null&&P.byteLength){var z={type:"audio",frag:D,part:null,chunkMeta:M,parent:D.type,data:P};this.hls.trigger(s.Events.BUFFER_APPENDING,z)}this.tick()},w.loadFragment=function(A,D,M){var N=this.fragmentTracker.getState(A);this.fragCurrent=A,(this.audioSwitch||N===p.FragmentState.NOT_LOADED||N===p.FragmentState.PARTIAL)&&(A.sn==="initSegment"?this._loadInitSegment(A):D.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=g.State.WAITING_INIT_PTS):(this.startFragRequested=!0,O.prototype.loadFragment.call(this,A,D,M)))},w.completeAudioSwitch=function(){var A=this.hls,D=this.media,M=this.trackId;D&&(this.log("Switching audio track : flushing all audio"),O.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,A.trigger(s.Events.AUDIO_TRACK_SWITCHED,{id:M})},C}(g.default);v.default=x},"./src/controller/audio-track-controller.ts":function(I,v,T){"use strict";T.r(v);var y=T("./src/events.ts"),g=T("./src/errors.ts"),s=T("./src/controller/base-playlist-controller.ts"),_=T("./src/types/loader.ts");function p(r,i){for(var t=0;t<i.length;t++){var a=i[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,a.key,a)}}function e(r,i,t){return i&&p(r.prototype,i),t&&p(r,t),r}function o(r,i){r.prototype=Object.create(i.prototype),r.prototype.constructor=r,n(r,i)}function n(r,i){return n=Object.setPrototypeOf||function(a,c){return a.__proto__=c,a},n(r,i)}var l=function(r){o(i,r);function i(a){var c;return c=r.call(this,a,"[audio-track-controller]")||this,c.tracks=[],c.groupId=null,c.tracksInGroup=[],c.trackId=-1,c.trackName="",c.selectDefaultTrack=!0,c.registerListeners(),c}var t=i.prototype;return t.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)},t.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)},t.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,r.prototype.destroy.call(this)},t.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},t.onManifestParsed=function(c,d){this.tracks=d.audioTracks||[]},t.onAudioTrackLoaded=function(c,d){var f=d.id,h=d.details,u=this.tracksInGroup[f];if(!u){this.warn("Invalid audio track id "+f);return}var E=u.details;u.details=d.details,this.log("audioTrack "+f+" loaded ["+h.startSN+"-"+h.endSN+"]"),f===this.trackId&&(this.retryCount=0,this.playlistLoaded(f,d,E))},t.onLevelLoading=function(c,d){this.switchLevel(d.level)},t.onLevelSwitching=function(c,d){this.switchLevel(d.level)},t.switchLevel=function(c){var d=this.hls.levels[c];if(!(d!=null&&d.audioGroupIds))return;var f=d.audioGroupIds[d.urlId];if(this.groupId!==f){this.groupId=f;var h=this.tracks.filter(function(E){return!f||E.groupId===f});this.selectDefaultTrack&&!h.some(function(E){return E.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=h;var u={audioTracks:h};this.log("Updating audio tracks, "+h.length+' track(s) found in "'+f+'" group-id'),this.hls.trigger(y.Events.AUDIO_TRACKS_UPDATED,u),this.selectInitialTrack()}},t.onError=function(c,d){if(r.prototype.onError.call(this,c,d),d.fatal||!d.context)return;d.context.type===_.PlaylistContextType.AUDIO_TRACK&&d.context.id===this.trackId&&d.context.groupId===this.groupId&&this.retryLoadingOrFail(d)},t.setAudioTrack=function(c){var d=this.tracksInGroup;if(c<0||c>=d.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var f=d[this.trackId];this.log("Now switching to audio-track index "+c);var h=d[c],u=h.id,E=h.groupId,x=E===void 0?"":E,O=h.name,C=h.type,w=h.url;if(this.trackId=c,this.trackName=O,this.selectDefaultTrack=!1,this.hls.trigger(y.Events.AUDIO_TRACK_SWITCHING,{id:u,groupId:x,name:O,type:C,url:w}),h.details&&!h.details.live)return;var S=this.switchParams(h.url,f==null?void 0:f.details);this.loadPlaylist(S)},t.selectInitialTrack=function(){var c=this.tracksInGroup;console.assert(c.length,"Initial audio track should be selected when tracks are known");var d=this.trackName,f=this.findTrackId(d)||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:g.ErrorTypes.MEDIA_ERROR,details:g.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},t.findTrackId=function(c){for(var d=this.tracksInGroup,f=0;f<d.length;f++){var h=d[f];if((!this.selectDefaultTrack||h.default)&&(!c||c===h.name))return h.id}return-1},t.loadPlaylist=function(c){var d=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(d)){var f=d.id,h=d.groupId,u=d.url;if(c)try{u=c.addDirectives(u)}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:u,id:f,groupId:h,deliveryDirectives:c||null})}},e(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}(s.default);v.default=l},"./src/controller/base-playlist-controller.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"default",function(){return e});var y=T("./src/polyfills/number.ts"),g=T("./src/types/level.ts"),s=T("./src/controller/level-helper.ts"),_=T("./src/utils/logger.ts"),p=T("./src/errors.ts"),e=function(){function o(l,r){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=_.logger.log.bind(_.logger,r+":"),this.warn=_.logger.warn.bind(_.logger,r+":"),this.hls=l}var n=o.prototype;return n.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},n.onError=function(r,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(r,i){var t=i==null?void 0:i.renditionReports;if(t)for(var a=0;a<t.length;a++){var c=t[a],d=""+c.URI;if(d===r.substr(-d.length)){var f=parseInt(c["LAST-MSN"]),h=parseInt(c["LAST-PART"]);if(i&&this.hls.config.lowLatencyMode){var u=Math.min(i.age-i.partTarget,i.targetduration);h!==void 0&&u>i.partTarget&&(h+=1)}if(Object(y.isFiniteNumber)(f))return new g.HlsUrlParameters(f,Object(y.isFiniteNumber)(h)?h:void 0,g.HlsSkip.No)}}},n.loadPlaylist=function(r){},n.shouldLoadTrack=function(r){return this.canLoad&&r&&!!r.url&&(!r.details||r.details.live)},n.playlistLoaded=function(r,i,t){var a=this,c=i.details,d=i.stats,f=d.loading.end?Math.max(0,self.performance.now()-d.loading.end):0;if(c.advancedDateTime=Date.now()-f,c.live||t!=null&&t.live){if(c.reloaded(t),t&&this.log("live playlist "+r+" "+(c.advanced?"REFRESHED "+c.lastPartSn+"-"+c.lastPartIndex:"MISSED")),t&&c.fragments.length>0&&Object(s.mergeDetails)(t,c),!this.canLoad||!c.live)return;var h,u=void 0,E=void 0;if(c.canBlockReload&&c.endSN&&c.advanced){var x=this.hls.config.lowLatencyMode,O=c.lastPartSn,C=c.endSN,w=c.lastPartIndex,S=w!==-1,A=O===C,D=x?0:w;S?(u=A?C+1:O,E=A?D:w+1):u=C+1;var M=c.age,N=M+c.ageHeader,P=Math.min(N-c.partTarget,c.targetduration*1.5);if(P>0){if(t&&P>t.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+t.tuneInGoal+" to: "+P+" with playlist age: "+c.age),P=0;else{var z=Math.floor(P/c.targetduration);if(u+=z,E!==void 0){var X=Math.round(P%c.targetduration/c.partTarget);E+=X}this.log("CDN Tune-in age: "+c.ageHeader+"s last advanced "+M.toFixed(2)+"s goal: "+P+" skip sn "+z+" to part "+E)}c.tuneInGoal=P}if(h=this.getDeliveryDirectives(c,i.deliveryDirectives,u,E),x||!A){this.loadPlaylist(h);return}}else h=this.getDeliveryDirectives(c,i.deliveryDirectives,u,E);var k=Object(s.computeReloadInterval)(c,d);u!==void 0&&c.canBlockReload&&(k-=c.partTarget||1),this.log("reload live playlist "+r+" in "+Math.round(k)+" ms"),this.timer=self.setTimeout(function(){return a.loadPlaylist(h)},k)}else this.clearTimer()},n.getDeliveryDirectives=function(r,i,t,a){var c=Object(g.getSkipValue)(r,t);return i!=null&&i.skip&&r.deltaUpdateFailed&&(t=i.msn,a=i.part,c=g.HlsSkip.No),new g.HlsUrlParameters(t,a,c)},n.retryLoadingOrFail=function(r){var i=this,t=this.hls.config,a=this.retryCount<t.levelLoadingMaxRetry;if(a){var c;if(this.retryCount++,r.details.indexOf("LoadTimeOut")>-1&&(c=r.context)!==null&&c!==void 0&&c.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+r.details+'"'),this.loadPlaylist();else{var d=Math.min(Math.pow(2,this.retryCount)*t.levelLoadingRetryDelay,t.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return i.loadPlaylist()},d),this.warn("retry playlist loading #"+this.retryCount+" in "+d+' ms after "'+r.details+'"')}}else this.warn('cannot recover from error "'+r.details+'"'),this.clearTimer(),r.fatal=!0;return a},o}()},"./src/controller/base-stream-controller.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"State",function(){return C}),T.d(v,"default",function(){return w});var y=T("./src/polyfills/number.ts"),g=T("./src/task-loop.ts"),s=T("./src/controller/fragment-tracker.ts"),_=T("./src/utils/buffer-helper.ts"),p=T("./src/utils/logger.ts"),e=T("./src/events.ts"),o=T("./src/errors.ts"),n=T("./src/types/transmuxer.ts"),l=T("./src/utils/mp4-tools.ts"),r=T("./src/utils/discontinuities.ts"),i=T("./src/controller/fragment-finders.ts"),t=T("./src/controller/level-helper.ts"),a=T("./src/loader/fragment-loader.ts"),c=T("./src/crypt/decrypter.ts"),d=T("./src/utils/time-ranges.ts"),f=T("./src/types/loader.ts");function h(S,A){for(var D=0;D<A.length;D++){var M=A[D];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(S,M.key,M)}}function u(S,A,D){return A&&h(S.prototype,A),D&&h(S,D),S}function E(S){if(S===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S}function x(S,A){S.prototype=Object.create(A.prototype),S.prototype.constructor=S,O(S,A)}function O(S,A){return O=Object.setPrototypeOf||function(M,N){return M.__proto__=N,M},O(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){x(A,S);function A(M,N,P){var z;return z=S.call(this)||this,z.hls=void 0,z.fragPrevious=null,z.fragCurrent=null,z.fragmentTracker=void 0,z.transmuxer=null,z._state=C.STOPPED,z.media=void 0,z.mediaBuffer=void 0,z.config=void 0,z.bitrateTest=!1,z.lastCurrentTime=0,z.nextLoadPosition=0,z.startPosition=0,z.loadedmetadata=!1,z.fragLoadError=0,z.retryDate=0,z.levels=null,z.fragmentLoader=void 0,z.levelLastLoaded=null,z.startFragRequested=!1,z.decrypter=void 0,z.initPTS=[],z.onvseeking=null,z.onvended=null,z.logPrefix="",z.log=void 0,z.warn=void 0,z.logPrefix=P,z.log=p.logger.log.bind(p.logger,P+":"),z.warn=p.logger.warn.bind(p.logger,P+":"),z.hls=M,z.fragmentLoader=new a.default(M.config),z.fragmentTracker=N,z.config=M.config,z.decrypter=new c.default(M,M.config),M.on(e.Events.KEY_LOADED,z.onKeyLoaded,E(z)),z}var D=A.prototype;return D.doTick=function(){this.onTickEnd()},D.onTickEnd=function(){},D.startLoad=function(N){},D.stopLoad=function(){this.fragmentLoader.abort();var N=this.fragCurrent;N&&this.fragmentTracker.removeFragment(N),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=C.STOPPED},D._streamEnded=function(N,P){var z=this.fragCurrent,X=this.fragmentTracker;if(!P.live&&z&&z.sn===P.endSN&&!N.nextStart){var k=X.getState(z);return k===s.FragmentState.PARTIAL||k===s.FragmentState.OK}return!1},D.onMediaAttached=function(N,P){var z=this.media=this.mediaBuffer=P.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),z.addEventListener("seeking",this.onvseeking),z.addEventListener("ended",this.onvended);var X=this.config;this.levels&&X.autoStartLoad&&this.state===C.STOPPED&&this.startLoad(X.startPosition)},D.onMediaDetaching=function(){var N=this.media;N!=null&&N.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),N&&(N.removeEventListener("seeking",this.onvseeking),N.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},D.onMediaSeeking=function(){var N=this.config,P=this.fragCurrent,z=this.media,X=this.mediaBuffer,k=this.state,F=z?z.currentTime:0,U=_.BufferHelper.bufferInfo(X||z,F,N.maxBufferHole);if(this.log("media seeking to "+(Object(y.isFiniteNumber)(F)?F.toFixed(3):F)+", state: "+k),k===C.ENDED)this.resetLoadingState();else if(P&&!U.len){var L=N.maxFragLookUpTolerance,B=P.start-L,Z=P.start+P.duration+L,re=F>Z;(F<B||re)&&(re&&P.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),P.loader.abort()),this.resetLoadingState())}z&&(this.lastCurrentTime=F),!this.loadedmetadata&&!U.len&&(this.nextLoadPosition=this.startPosition=F),this.tickImmediate()},D.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},D.onKeyLoaded=function(N,P){if(this.state!==C.KEY_LOADING||P.frag!==this.fragCurrent||!this.levels)return;this.state=C.IDLE;var z=this.levels[P.frag.level].details;z&&this.loadFragment(P.frag,z,P.frag.start)},D.onHandlerDestroying=function(){this.stopLoad(),S.prototype.onHandlerDestroying.call(this)},D.onHandlerDestroyed=function(){this.state=C.STOPPED,this.hls.off(e.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)},D.loadKey=function(N,P){this.log("Loading key for "+N.sn+" of ["+P.startSN+"-"+P.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+N.level),this.state=C.KEY_LOADING,this.fragCurrent=N,this.hls.trigger(e.Events.KEY_LOADING,{frag:N})},D.loadFragment=function(N,P,z){this._loadFragForPlayback(N,P,z)},D._loadFragForPlayback=function(N,P,z){var X=this,k=function(U){if(X.fragContextChanged(N)){X.warn("Fragment "+N.sn+(U.part?" p: "+U.part.index:"")+" of level "+N.level+" was dropped during download."),X.fragmentTracker.removeFragment(N);return}N.stats.chunkCount++,X._handleFragmentLoadProgress(U)};this._doFragLoad(N,P,z,k).then(function(F){if(!F)return;X.fragLoadError=0;var U=X.state;if(X.fragContextChanged(N)){(U===C.FRAG_LOADING||U===C.BACKTRACKING||!X.fragCurrent&&U===C.PARSING)&&(X.fragmentTracker.removeFragment(N),X.state=C.IDLE);return}if("payload"in F&&(X.log("Loaded fragment "+N.sn+" of level "+N.level),X.hls.trigger(e.Events.FRAG_LOADED,F),X.state===C.BACKTRACKING)){X.fragmentTracker.backtrack(N,F),X.resetFragmentLoading(N);return}X._handleFragmentLoadComplete(F)}).catch(function(F){X.warn(F),X.resetFragmentLoading(N)})},D.flushMainBuffer=function(N,P,z){if(z===void 0&&(z=null),!(N-P))return;var X={startOffset:N,endOffset:P,type:z};this.fragLoadError=0,this.hls.trigger(e.Events.BUFFER_FLUSHING,X)},D._loadInitSegment=function(N){var P=this;this._doFragLoad(N).then(function(z){if(!z||P.fragContextChanged(N)||!P.levels)throw new Error("init load aborted");return z}).then(function(z){var X=P.hls,k=z.payload,F=N.decryptdata;if(k&&k.byteLength>0&&F&&F.key&&F.iv&&F.method==="AES-128"){var U=self.performance.now();return P.decrypter.webCryptoDecrypt(new Uint8Array(k),F.key.buffer,F.iv.buffer).then(function(L){var B=self.performance.now();return X.trigger(e.Events.FRAG_DECRYPTED,{frag:N,payload:L,stats:{tstart:U,tdecrypt:B}}),z.payload=L,z})}return z}).then(function(z){var X=P.fragCurrent,k=P.hls,F=P.levels;if(!F)throw new Error("init load aborted, missing levels");var U=F[N.level].details;console.assert(U,"Level details are defined when init segment is loaded");var L=N.stats;P.state=C.IDLE,P.fragLoadError=0,N.data=new Uint8Array(z.payload),L.parsing.start=L.buffering.start=self.performance.now(),L.parsing.end=L.buffering.end=self.performance.now(),z.frag===X&&k.trigger(e.Events.FRAG_BUFFERED,{stats:L,frag:X,part:null,id:N.type}),P.tick()}).catch(function(z){P.warn(z),P.resetFragmentLoading(N)})},D.fragContextChanged=function(N){var P=this.fragCurrent;return!N||!P||N.level!==P.level||N.sn!==P.sn||N.urlId!==P.urlId},D.fragBufferedComplete=function(N,P){var z=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+N.type+" sn: "+N.sn+(P?" part: "+P.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+N.level+" "+d.default.toString(_.BufferHelper.getBuffered(z))),this.state=C.IDLE,this.tick()},D._handleFragmentLoadComplete=function(N){var P=this.transmuxer;if(!P)return;var z=N.frag,X=N.part,k=N.partsLoaded,F=!k||k.length===0||k.some(function(L){return!L}),U=new n.ChunkMetadata(z.level,z.sn,z.stats.chunkCount+1,0,X?X.index:-1,!F);P.flush(U)},D._handleFragmentLoadProgress=function(N){},D._doFragLoad=function(N,P,z,X){var k=this;if(z===void 0&&(z=null),!this.levels)throw new Error("frag load aborted, missing levels");if(z=Math.max(N.start,z||0),this.config.lowLatencyMode&&P){var F=P.partList;if(F&&X){z>N.end&&P.fragmentHint&&(N=P.fragmentHint);var U=this.getNextPart(F,N,z);if(U>-1){var L=F[U];return this.log("Loading part sn: "+N.sn+" p: "+L.index+" cc: "+N.cc+" of playlist ["+P.startSN+"-"+P.endSN+"] parts [0-"+U+"-"+(F.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+N.level+", target: "+parseFloat(z.toFixed(3))),this.nextLoadPosition=L.start+L.duration,this.state=C.FRAG_LOADING,this.hls.trigger(e.Events.FRAG_LOADING,{frag:N,part:F[U],targetBufferTime:z}),this.doFragPartsLoad(N,F,U,X).catch(function(B){return k.handleFragLoadError(B)})}else if(!N.url||this.loadedEndOfParts(F,z))return Promise.resolve(null)}}return this.log("Loading fragment "+N.sn+" cc: "+N.cc+" "+(P?"of ["+P.startSN+"-"+P.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+N.level+", target: "+parseFloat(z.toFixed(3))),Object(y.isFiniteNumber)(N.sn)&&!this.bitrateTest&&(this.nextLoadPosition=N.start+N.duration),this.state=C.FRAG_LOADING,this.hls.trigger(e.Events.FRAG_LOADING,{frag:N,targetBufferTime:z}),this.fragmentLoader.load(N,X).catch(function(B){return k.handleFragLoadError(B)})},D.doFragPartsLoad=function(N,P,z,X){var k=this;return new Promise(function(F,U){var L=[],B=function Z(re){var he=P[re];k.fragmentLoader.loadPart(N,he,X).then(function(Ce){L[he.index]=Ce;var ke=Ce.part;k.hls.trigger(e.Events.FRAG_LOADED,Ce);var te=P[re+1];if(te&&te.fragment===N)Z(re+1);else return F({frag:N,part:ke,partsLoaded:L})}).catch(U)};B(z)})},D.handleFragLoadError=function(N){var P=N.data;return P&&P.details===o.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(P.frag,P.part):this.hls.trigger(e.Events.ERROR,P),null},D._handleTransmuxerFlush=function(N){var P=this.getCurrentContext(N);if(!P||this.state!==C.PARSING){this.fragCurrent||(this.state=C.IDLE);return}var z=P.frag,X=P.part,k=P.level,F=self.performance.now();z.stats.parsing.end=F,X&&(X.stats.parsing.end=F),this.updateLevelTiming(z,X,k,N.partial)},D.getCurrentContext=function(N){var P=this.levels,z=N.level,X=N.sn,k=N.part;if(!P||!P[z])return this.warn("Levels object was unset while buffering fragment "+X+" of level "+z+". The current chunk will not be buffered."),null;var F=P[z],U=k>-1?Object(t.getPartWith)(F,X,k):null,L=U?U.fragment:Object(t.getFragmentWithSN)(F,X,this.fragCurrent);return L?{frag:L,part:U,level:F}:null},D.bufferFragmentData=function(N,P,z,X){if(!N||this.state!==C.PARSING)return;var k=N.data1,F=N.data2,U=k;if(k&&F&&(U=Object(l.appendUint8Array)(k,F)),!U||!U.length)return;var L={type:N.type,frag:P,part:z,chunkMeta:X,parent:P.type,data:U};this.hls.trigger(e.Events.BUFFER_APPENDING,L),N.dropped&&N.independent&&!z&&this.flushBufferGap(P)},D.flushBufferGap=function(N){var P=this.media;if(!P)return;if(!_.BufferHelper.isBuffered(P,P.currentTime)){this.flushMainBuffer(0,N.start);return}var z=P.currentTime,X=_.BufferHelper.bufferInfo(P,z,0),k=N.duration,F=Math.min(this.config.maxFragLookUpTolerance*2,k*.25),U=Math.max(Math.min(N.start-F,X.end-F),z+F);N.start-U>F&&this.flushMainBuffer(U,N.start)},D.getFwdBufferInfo=function(N,P){var z=this.config,X=this.getLoadPosition();if(!Object(y.isFiniteNumber)(X))return null;var k=_.BufferHelper.bufferInfo(N,X,z.maxBufferHole);if(k.len===0&&k.nextStart!==void 0){var F=this.fragmentTracker.getBufferedFrag(X,P);if(F&&k.nextStart<F.end)return _.BufferHelper.bufferInfo(N,X,Math.max(k.nextStart,z.maxBufferHole))}return k},D.getMaxBufferLength=function(N){var P=this.config,z;return N?z=Math.max(8*P.maxBufferSize/N,P.maxBufferLength):z=P.maxBufferLength,Math.min(z,P.maxMaxBufferLength)},D.reduceMaxBufferLength=function(N){var P=this.config,z=N||P.maxBufferLength;return P.maxMaxBufferLength>=z?(P.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+P.maxMaxBufferLength+"s"),!0):!1},D.getNextFragment=function(N,P){var z,X,k=P.fragments,F=k.length;if(!F)return null;var U=this.config,L=k[0].start,B;if(P.live){var Z=U.initialLiveManifestSize;if(F<Z)return this.warn("Not enough fragments to start playback (have: "+F+", need: "+Z+")"),null;!P.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(B=this.getInitialLiveFragment(P,k),this.startPosition=B?this.hls.liveSyncPosition||B.start:N)}else N<=L&&(B=k[0]);if(!B){var re=U.lowLatencyMode?P.partEnd:P.fragmentEnd;B=this.getFragmentAtPosition(N,re,P)}return(z=B)!==null&&z!==void 0&&z.initSegment&&!((X=B)!==null&&X!==void 0&&X.initSegment.data)&&!this.bitrateTest&&(B=B.initSegment),B},D.getNextPart=function(N,P,z){for(var X=-1,k=!1,F=!0,U=0,L=N.length;U<L;U++){var B=N[U];if(F=F&&!B.independent,X>-1&&z<B.start)break;var Z=B.loaded;!Z&&(k||B.independent||F)&&B.fragment===P&&(X=U),k=Z}return X},D.loadedEndOfParts=function(N,P){var z=N[N.length-1];return z&&P>z.start&&z.loaded},D.getInitialLiveFragment=function(N,P){var z=this.fragPrevious,X=null;if(z){if(N.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+z.programDateTime),X=Object(i.findFragmentByPDT)(P,z.endProgramDateTime,this.config.maxFragLookUpTolerance)),!X){var k=z.sn+1;if(k>=N.startSN&&k<=N.endSN){var F=P[k-N.startSN];z.cc===F.cc&&(X=F,this.log("Live playlist, switching playlist, load frag with next SN: "+X.sn))}X||(X=Object(i.findFragWithCC)(P,z.cc),X&&this.log("Live playlist, switching playlist, load frag with same CC: "+X.sn))}}else{var U=this.hls.liveSyncPosition;U!==null&&(X=this.getFragmentAtPosition(U,this.bitrateTest?N.fragmentEnd:N.edge,N))}return X},D.getFragmentAtPosition=function(N,P,z){var X=this.config,k=this.fragPrevious,F=z.fragments,U=z.endSN,L=z.fragmentHint,B=X.maxFragLookUpTolerance,Z=!!(X.lowLatencyMode&&z.partList&&L);Z&&L&&!this.bitrateTest&&(F=F.concat(L),U=L.sn);var re;if(N<P){var he=N>P-B?0:B;re=Object(i.findFragmentByPTS)(k,F,N,he)}else re=F[F.length-1];if(re){var Ce=re.sn-z.startSN,ke=k&&re.level===k.level,te=F[Ce+1],Re=this.fragmentTracker.getState(re);if(Re===s.FragmentState.BACKTRACKED){re=null;for(var Te=Ce;F[Te]&&this.fragmentTracker.getState(F[Te])===s.FragmentState.BACKTRACKED;)k?re=F[Te--]:re=F[--Te];re||(re=te)}else k&&re.sn===k.sn&&!Z&&(ke&&(re.sn<U&&this.fragmentTracker.getState(te)!==s.FragmentState.OK?(this.log("SN "+re.sn+" just loaded, load next one: "+te.sn),re=te):re=null))}return re},D.synchronizeToLiveEdge=function(N){var P=this.config,z=this.media;if(!z)return;var X=this.hls.liveSyncPosition,k=z.currentTime,F=N.fragments[0].start,U=N.edge,L=k>=F-P.maxFragLookUpTolerance&&k<=U;if(X!==null&&z.duration>X&&(k<X||!L)){var B=P.liveMaxLatencyDuration!==void 0?P.liveMaxLatencyDuration:P.liveMaxLatencyDurationCount*N.targetduration;(!L&&z.readyState<4||k<U-B)&&(this.loadedmetadata||(this.nextLoadPosition=X),z.readyState&&(this.warn("Playback: "+k.toFixed(3)+" is located too far from the end of live sliding playlist: "+U+", reset currentTime to : "+X.toFixed(3)),z.currentTime=X))}},D.alignPlaylists=function(N,P){var z=this.levels,X=this.levelLastLoaded,k=this.fragPrevious,F=X!==null?z[X]:null,U=N.fragments.length;if(!U)return this.warn("No fragments in live playlist"),0;var L=N.fragments[0].start,B=!P,Z=N.alignedSliding&&Object(y.isFiniteNumber)(L);if(B||!Z&&!L){Object(r.alignStream)(k,F,N);var re=N.fragments[0].start;return this.log("Live playlist sliding: "+re.toFixed(2)+" start-sn: "+(P?P.startSN:"na")+"->"+N.startSN+" prev-sn: "+(k?k.sn:"na")+" fragments: "+U),re}return L},D.waitForCdnTuneIn=function(N){var P=3;return N.live&&N.canBlockReload&&N.tuneInGoal>Math.max(N.partHoldBack,N.partTarget*P)},D.setStartPosition=function(N,P){var z=this.startPosition;if(z<P&&(z=-1),z===-1||this.lastCurrentTime===-1){var X=N.startTimeOffset;Object(y.isFiniteNumber)(X)?(z=P+X,X<0&&(z+=N.totalduration),z=Math.min(Math.max(P,z),P+N.totalduration),this.log("Start time offset "+X+" found in playlist, adjust startPosition to "+z),this.startPosition=z):N.live?z=this.hls.liveSyncPosition||P:this.startPosition=z=0,this.lastCurrentTime=z}this.nextLoadPosition=z},D.getLoadPosition=function(){var N=this.media,P=0;return this.loadedmetadata&&N?P=N.currentTime:this.nextLoadPosition&&(P=this.nextLoadPosition),P},D.handleFragLoadAborted=function(N,P){this.transmuxer&&N.sn!=="initSegment"&&N.stats.aborted&&(this.warn("Fragment "+N.sn+(P?" part"+P.index:"")+" of level "+N.level+" was aborted"),this.resetFragmentLoading(N))},D.resetFragmentLoading=function(N){(!this.fragCurrent||!this.fragContextChanged(N))&&(this.state=C.IDLE)},D.onFragmentOrKeyLoadError=function(N,P){if(P.fatal)return;var z=P.frag;if(!z||z.type!==N)return;var X=this.fragCurrent;console.assert(X&&z.sn===X.sn&&z.level===X.level&&z.urlId===X.urlId,"Frag load error must match current frag to retry");var k=this.config;if(this.fragLoadError+1<=k.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(z.level))return;var F=Math.min(Math.pow(2,this.fragLoadError)*k.fragLoadingRetryDelay,k.fragLoadingMaxRetryTimeout);this.warn("Fragment "+z.sn+" of "+N+" "+z.level+" failed to load, retrying in "+F+"ms"),this.retryDate=self.performance.now()+F,this.fragLoadError++,this.state=C.FRAG_LOADING_WAITING_RETRY}else P.levelRetry?(N===f.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=C.IDLE):(p.logger.error(P.details+" reaches max retry, redispatch as fatal ..."),P.fatal=!0,this.hls.stopLoad(),this.state=C.ERROR)},D.afterBufferFlushed=function(N,P,z){if(!N)return;var X=_.BufferHelper.getBuffered(N);this.fragmentTracker.detectEvictedFragments(P,X,z),this.state===C.ENDED&&this.resetLoadingState()},D.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=C.IDLE},D.resetLiveStartWhenNotLoaded=function(N){if(!this.loadedmetadata){this.startFragRequested=!1;var P=this.levels?this.levels[N].details:null;if(P!=null&&P.live)return this.startPosition=-1,this.setStartPosition(P,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},D.updateLevelTiming=function(N,P,z,X){var k=this,F=z.details;console.assert(!!F,"level.details must be defined");var U=Object.keys(N.elementaryStreams).reduce(function(L,B){var Z=N.elementaryStreams[B];if(Z){var re=Z.endPTS-Z.startPTS;if(re<=0)return k.warn("Could not parse fragment "+N.sn+" "+B+" duration reliably ("+re+") resetting transmuxer to fallback to playlist timing"),k.resetTransmuxer(),L||!1;var he=X?0:Object(t.updateFragPTSDTS)(F,N,Z.startPTS,Z.endPTS,Z.startDTS,Z.endDTS);return k.hls.trigger(e.Events.LEVEL_PTS_UPDATED,{details:F,level:z,drift:he,type:B,frag:N,start:Z.startPTS,end:Z.endPTS}),!0}return L},!1);U?(this.state=C.PARSED,this.hls.trigger(e.Events.FRAG_PARSED,{frag:N,part:P})):this.resetLoadingState()},D.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},u(A,[{key:"state",get:function(){return this._state},set:function(N){var P=this._state;P!==N&&(this._state=N,this.log(P+"->"+N))}}]),A}(g.default)},"./src/controller/buffer-controller.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"default",function(){return i});var y=T("./src/polyfills/number.ts"),g=T("./src/events.ts"),s=T("./src/utils/logger.ts"),_=T("./src/errors.ts"),p=T("./src/utils/buffer-helper.ts"),e=T("./src/utils/mediasource-helper.ts"),o=T("./src/loader/fragment.ts"),n=T("./src/controller/buffer-operation-queue.ts"),l=Object(e.getMediaSource)(),r=/([ha]vc.)(?:\.[^.,]+)+/,i=function(){function t(c){var d=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=d.hls,h=d.media,u=d.mediaSource;s.logger.log("[buffer-controller]: Media source opened"),h&&(d.updateMediaElementDuration(),f.trigger(g.Events.MEDIA_ATTACHED,{media:h})),u&&u.removeEventListener("sourceopen",d._onMediaSourceOpen),d.checkPendingTracks()},this._onMediaSourceClose=function(){s.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){s.logger.log("[buffer-controller]: Media source ended")},this.hls=c,this._initSourceBuffer(),this.registerListeners()}var a=t.prototype;return a.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},a.destroy=function(){this.unregisterListeners(),this.details=null},a.registerListeners=function(){var d=this.hls;d.on(g.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),d.on(g.Events.MEDIA_DETACHING,this.onMediaDetaching,this),d.on(g.Events.MANIFEST_PARSED,this.onManifestParsed,this),d.on(g.Events.BUFFER_RESET,this.onBufferReset,this),d.on(g.Events.BUFFER_APPENDING,this.onBufferAppending,this),d.on(g.Events.BUFFER_CODECS,this.onBufferCodecs,this),d.on(g.Events.BUFFER_EOS,this.onBufferEos,this),d.on(g.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),d.on(g.Events.LEVEL_UPDATED,this.onLevelUpdated,this),d.on(g.Events.FRAG_PARSED,this.onFragParsed,this),d.on(g.Events.FRAG_CHANGED,this.onFragChanged,this)},a.unregisterListeners=function(){var d=this.hls;d.off(g.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),d.off(g.Events.MEDIA_DETACHING,this.onMediaDetaching,this),d.off(g.Events.MANIFEST_PARSED,this.onManifestParsed,this),d.off(g.Events.BUFFER_RESET,this.onBufferReset,this),d.off(g.Events.BUFFER_APPENDING,this.onBufferAppending,this),d.off(g.Events.BUFFER_CODECS,this.onBufferCodecs,this),d.off(g.Events.BUFFER_EOS,this.onBufferEos,this),d.off(g.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),d.off(g.Events.LEVEL_UPDATED,this.onLevelUpdated,this),d.off(g.Events.FRAG_PARSED,this.onFragParsed,this),d.off(g.Events.FRAG_CHANGED,this.onFragChanged,this)},a._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new n.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},a.onManifestParsed=function(d,f){var h=2;(f.audio&&!f.video||!f.altAudio)&&(h=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=h,this.details=null,s.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},a.onMediaAttaching=function(d,f){var h=this.media=f.media;if(h&&l){var u=this.mediaSource=new l;u.addEventListener("sourceopen",this._onMediaSourceOpen),u.addEventListener("sourceended",this._onMediaSourceEnded),u.addEventListener("sourceclose",this._onMediaSourceClose),h.src=self.URL.createObjectURL(u),this._objectUrl=h.src}},a.onMediaDetaching=function(){var d=this.media,f=this.mediaSource,h=this._objectUrl;if(f){if(s.logger.log("[buffer-controller]: media source detaching"),f.readyState==="open")try{f.endOfStream()}catch(u){s.logger.warn("[buffer-controller]: onMediaDetaching: "+u.message+" while calling endOfStream")}this.onBufferReset(),f.removeEventListener("sourceopen",this._onMediaSourceOpen),f.removeEventListener("sourceended",this._onMediaSourceEnded),f.removeEventListener("sourceclose",this._onMediaSourceClose),d&&(h&&self.URL.revokeObjectURL(h),d.src===h?(d.removeAttribute("src"),d.load()):s.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(g.Events.MEDIA_DETACHED,void 0)},a.onBufferReset=function(){var d=this;this.getSourceBufferTypes().forEach(function(f){var h=d.sourceBuffer[f];try{h&&(d.removeBufferListeners(f),d.mediaSource&&d.mediaSource.removeSourceBuffer(h),d.sourceBuffer[f]=void 0)}catch(u){s.logger.warn("[buffer-controller]: Failed to reset the "+f+" buffer",u)}}),this._initSourceBuffer()},a.onBufferCodecs=function(d,f){var h=this,u=this.getSourceBufferTypes().length;if(Object.keys(f).forEach(function(E){if(u){var x=h.tracks[E];if(x&&typeof x.buffer.changeType=="function"){var O=f[E],C=O.codec,w=O.levelCodec,S=O.container,A=(x.levelCodec||x.codec).replace(r,"$1"),D=(w||C).replace(r,"$1");if(A!==D){var M=S+";codecs="+(w||C);h.appendChangeType(E,M)}}}else h.pendingTracks[E]=f[E]}),u)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},a.appendChangeType=function(d,f){var h=this,u=this.operationQueue,E={execute:function(){var O=h.sourceBuffer[d];O&&(s.logger.log("[buffer-controller]: changing "+d+" sourceBuffer type to "+f),O.changeType(f)),u.shiftAndExecuteNext(d)},onStart:function(){},onComplete:function(){},onError:function(O){s.logger.warn("[buffer-controller]: Failed to change "+d+" SourceBuffer type",O)}};u.append(E,d)},a.onBufferAppending=function(d,f){var h=this,u=this.hls,E=this.operationQueue,x=this.tracks,O=f.data,C=f.type,w=f.frag,S=f.part,A=f.chunkMeta,D=A.buffering[C],M=self.performance.now();D.start=M;var N=w.stats.buffering,P=S?S.stats.buffering:null;N.start===0&&(N.start=M),P&&P.start===0&&(P.start=M);var z=x.audio,X=C==="audio"&&A.id===1&&(z==null?void 0:z.container)==="audio/mpeg",k={execute:function(){if(D.executeStart=self.performance.now(),X){var U=h.sourceBuffer[C];if(U){var L=w.start-U.timestampOffset;Math.abs(L)>=.1&&(s.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+w.start+" (delta: "+L+") sn: "+w.sn+")"),U.timestampOffset=w.start)}}h.appendExecutor(O,C)},onStart:function(){},onComplete:function(){var U=self.performance.now();D.executeEnd=D.end=U,N.first===0&&(N.first=U),P&&P.first===0&&(P.first=U);var L=h.sourceBuffer,B={};for(var Z in L)B[Z]=p.BufferHelper.getBuffered(L[Z]);h.appendError=0,h.hls.trigger(g.Events.BUFFER_APPENDED,{type:C,frag:w,part:S,chunkMeta:A,parent:w.type,timeRanges:B})},onError:function(U){s.logger.error("[buffer-controller]: Error encountered while trying to append to the "+C+" SourceBuffer",U);var L={type:_.ErrorTypes.MEDIA_ERROR,parent:w.type,details:_.ErrorDetails.BUFFER_APPEND_ERROR,err:U,fatal:!1};U.code===DOMException.QUOTA_EXCEEDED_ERR?L.details=_.ErrorDetails.BUFFER_FULL_ERROR:(h.appendError++,L.details=_.ErrorDetails.BUFFER_APPEND_ERROR,h.appendError>u.config.appendErrorMaxRetry&&(s.logger.error("[buffer-controller]: Failed "+u.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),L.fatal=!0)),u.trigger(g.Events.ERROR,L)}};E.append(k,C)},a.onBufferFlushing=function(d,f){var h=this,u=this.operationQueue,E=function(O){return{execute:h.removeExecutor.bind(h,O,f.startOffset,f.endOffset),onStart:function(){},onComplete:function(){h.hls.trigger(g.Events.BUFFER_FLUSHED,{type:O})},onError:function(w){s.logger.warn("[buffer-controller]: Failed to remove from "+O+" SourceBuffer",w)}}};f.type?u.append(E(f.type),f.type):this.getSourceBufferTypes().forEach(function(x){u.append(E(x),x)})},a.onFragParsed=function(d,f){var h=this,u=f.frag,E=f.part,x=[],O=E?E.elementaryStreams:u.elementaryStreams;O[o.ElementaryStreamTypes.AUDIOVIDEO]?x.push("audiovideo"):(O[o.ElementaryStreamTypes.AUDIO]&&x.push("audio"),O[o.ElementaryStreamTypes.VIDEO]&&x.push("video"));var C=function(){var S=self.performance.now();u.stats.buffering.end=S,E&&(E.stats.buffering.end=S);var A=E?E.stats:u.stats;h.hls.trigger(g.Events.FRAG_BUFFERED,{frag:u,part:E,stats:A,id:u.type})};x.length===0&&s.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+u.type+" level: "+u.level+" sn: "+u.sn),this.blockBuffers(C,x)},a.onFragChanged=function(d,f){this.flushBackBuffer()},a.onBufferEos=function(d,f){var h=this,u=this.getSourceBufferTypes().reduce(function(E,x){var O=h.sourceBuffer[x];return(!f.type||f.type===x)&&(O&&!O.ended&&(O.ended=!0,s.logger.log("[buffer-controller]: "+x+" sourceBuffer now EOS"))),E&&!!(!O||O.ended)},!0);u&&this.blockBuffers(function(){var E=h.mediaSource;if(!E||E.readyState!=="open")return;E.endOfStream()})},a.onLevelUpdated=function(d,f){var h=f.details;if(!h.fragments.length)return;this.details=h,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},a.flushBackBuffer=function(){var d=this.hls,f=this.details,h=this.media,u=this.sourceBuffer;if(!h||f===null)return;var E=this.getSourceBufferTypes();if(!E.length)return;var x=f.live&&d.config.liveBackBufferLength!==null?d.config.liveBackBufferLength:d.config.backBufferLength;if(!Object(y.isFiniteNumber)(x)||x<0)return;var O=h.currentTime,C=f.levelTargetDuration,w=Math.max(x,C),S=Math.floor(O/C)*C-w;E.forEach(function(A){var D=u[A];if(D){var M=p.BufferHelper.getBuffered(D);M.length>0&&S>M.start(0)&&(d.trigger(g.Events.BACK_BUFFER_REACHED,{bufferEnd:S}),f.live&&d.trigger(g.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:S}),d.trigger(g.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:S,type:A}))}})},a.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var d=this.details,f=this.hls,h=this.media,u=this.mediaSource,E=d.fragments[0].start+d.totalduration,x=h.duration,O=Object(y.isFiniteNumber)(u.duration)?u.duration:0;d.live&&f.config.liveDurationInfinity?(s.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),u.duration=Infinity,this.updateSeekableRange(d)):(E>O&&E>x||!Object(y.isFiniteNumber)(x))&&(s.logger.log("[buffer-controller]: Updating Media Source duration to "+E.toFixed(3)),u.duration=E)},a.updateSeekableRange=function(d){var f=this.mediaSource,h=d.fragments,u=h.length;if(u&&d.live&&f!==null&&f!==void 0&&f.setLiveSeekableRange){var E=Math.max(0,h[0].start),x=Math.max(E,E+d.totalduration);f.setLiveSeekableRange(E,x)}},a.checkPendingTracks=function(){var d=this.bufferCodecEventsExpected,f=this.operationQueue,h=this.pendingTracks,u=Object.keys(h).length;if(u&&!d||u===2){this.createSourceBuffers(h),this.pendingTracks={};var E=this.getSourceBufferTypes();if(E.length===0){this.hls.trigger(g.Events.ERROR,{type:_.ErrorTypes.MEDIA_ERROR,details:_.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}E.forEach(function(x){f.executeNext(x)})}},a.createSourceBuffers=function(d){var f=this.sourceBuffer,h=this.mediaSource;if(!h)throw Error("createSourceBuffers called when mediaSource was null");var u=0;for(var E in d)if(!f[E]){var x=d[E];if(!x)throw Error("source buffer exists for track "+E+", however track does not");var O=x.levelCodec||x.codec,C=x.container+";codecs="+O;s.logger.log("[buffer-controller]: creating sourceBuffer("+C+")");try{var w=f[E]=h.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:O,container:x.container,levelCodec:x.levelCodec,id:x.id},u++}catch(A){s.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+A.message),this.hls.trigger(g.Events.ERROR,{type:_.ErrorTypes.MEDIA_ERROR,details:_.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:A,mimeType:C})}}u&&this.hls.trigger(g.Events.BUFFER_CREATED,{tracks:this.tracks})},a._onSBUpdateStart=function(d){var f=this.operationQueue,h=f.current(d);h.onStart()},a._onSBUpdateEnd=function(d){var f=this.operationQueue,h=f.current(d);h.onComplete(),f.shiftAndExecuteNext(d)},a._onSBUpdateError=function(d,f){s.logger.error("[buffer-controller]: "+d+" SourceBuffer error",f),this.hls.trigger(g.Events.ERROR,{type:_.ErrorTypes.MEDIA_ERROR,details:_.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var h=this.operationQueue.current(d);h&&h.onError(f)},a.removeExecutor=function(d,f,h){var u=this.media,E=this.mediaSource,x=this.operationQueue,O=this.sourceBuffer,C=O[d];if(!u||!E||!C){s.logger.warn("[buffer-controller]: Attempting to remove from the "+d+" SourceBuffer, but it does not exist"),x.shiftAndExecuteNext(d);return}var w=Object(y.isFiniteNumber)(u.duration)?u.duration:Infinity,S=Object(y.isFiniteNumber)(E.duration)?E.duration:Infinity,A=Math.max(0,f),D=Math.min(h,w,S);D>A?(s.logger.log("[buffer-controller]: Removing ["+A+","+D+"] from the "+d+" SourceBuffer"),console.assert(!C.updating,d+" sourceBuffer must not be updating"),C.remove(A,D)):x.shiftAndExecuteNext(d)},a.appendExecutor=function(d,f){var h=this.operationQueue,u=this.sourceBuffer,E=u[f];if(!E){s.logger.warn("[buffer-controller]: Attempting to append to the "+f+" SourceBuffer, but it does not exist"),h.shiftAndExecuteNext(f);return}E.ended=!1,console.assert(!E.updating,f+" sourceBuffer must not be updating"),E.appendBuffer(d)},a.blockBuffers=function(d,f){var h=this;if(f===void 0&&(f=this.getSourceBufferTypes()),!f.length){s.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(d);return}var u=this.operationQueue,E=f.map(function(x){return u.appendBlocker(x)});Promise.all(E).then(function(){d(),f.forEach(function(x){var O=h.sourceBuffer[x];(!O||!O.updating)&&u.shiftAndExecuteNext(x)})})},a.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},a.addBufferListener=function(d,f,h){var u=this.sourceBuffer[d];if(!u)return;var E=h.bind(this,d);this.listeners[d].push({event:f,listener:E}),u.addEventListener(f,E)},a.removeBufferListeners=function(d){var f=this.sourceBuffer[d];if(!f)return;this.listeners[d].forEach(function(h){f.removeEventListener(h.event,h.listener)})},t}()},"./src/controller/buffer-operation-queue.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"default",function(){return g});var y=T("./src/utils/logger.ts"),g=function(){function s(p){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=p}var _=s.prototype;return _.append=function(e,o){var n=this.queues[o];n.push(e),n.length===1&&this.buffers[o]&&this.executeNext(o)},_.insertAbort=function(e,o){var n=this.queues[o];n.unshift(e),this.executeNext(o)},_.appendBlocker=function(e){var o,n=new Promise(function(r){o=r}),l={execute:o,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(l,e),n},_.executeNext=function(e){var o=this.buffers,n=this.queues,l=o[e],r=n[e];if(r.length){var i=r[0];try{i.execute()}catch(t){y.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),i.onError(t),(!l||!l.updating)&&(r.shift(),this.executeNext(e))}}},_.shiftAndExecuteNext=function(e){this.queues[e].shift(),this.executeNext(e)},_.current=function(e){return this.queues[e][0]},s}()},"./src/controller/cap-level-controller.ts":function(I,v,T){"use strict";T.r(v);var y=T("./src/events.ts");function g(p,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(p,n.key,n)}}function s(p,e,o){return e&&g(p.prototype,e),o&&g(p,o),p}var _=function(){function p(o){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=o,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var e=p.prototype;return e.setStreamController=function(n){this.streamController=n},e.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},e.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)},e.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)},e.onFpsDropLevelCapping=function(n,l){p.isLevelAllowed(l.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(l.droppedLevel)},e.onMediaAttaching=function(n,l){this.media=l.media instanceof HTMLVideoElement?l.media:null},e.onManifestParsed=function(n,l){var r=this.hls;this.restrictedLevels=[],this.firstLevel=l.firstLevel,r.config.capLevelToPlayerSize&&l.video&&this.startCapping()},e.onBufferCodecs=function(n,l){var r=this.hls;r.config.capLevelToPlayerSize&&l.video&&this.startCapping()},e.onMediaDetaching=function(){this.stopCapping()},e.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var n=this.hls.levels;if(n.length){var l=this.hls;l.autoLevelCapping=this.getMaxLevel(n.length-1),l.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=l.autoLevelCapping}}},e.getMaxLevel=function(n){var l=this,r=this.hls.levels;if(!r.length)return-1;var i=r.filter(function(t,a){return p.isLevelAllowed(a,l.restrictedLevels)&&a<=n});return this.clientRect=null,p.getMaxLevelByMediaSize(i,this.mediaWidth,this.mediaHeight)},e.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()},e.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},e.getDimensions=function(){if(this.clientRect)return this.clientRect;var n=this.media,l={width:0,height:0};if(n){var r=n.getBoundingClientRect();l.width=r.width,l.height=r.height,!l.width&&!l.height&&(l.width=r.right-r.left||n.width||0,l.height=r.bottom-r.top||n.height||0)}return this.clientRect=l,l},p.isLevelAllowed=function(n,l){return l===void 0&&(l=[]),l.indexOf(n)===-1},p.getMaxLevelByMediaSize=function(n,l,r){if(!n||!n.length)return-1;for(var i=function(f,h){return h?f.width!==h.width||f.height!==h.height:!0},t=n.length-1,a=0;a<n.length;a+=1){var c=n[a];if((c.width>=l||c.height>=r)&&i(c,n[a+1])){t=a;break}}return t},s(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(l){}return n}}]),p}();v.default=_},"./src/controller/cmcd-controller.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"default",function(){return i});var y=T("./src/events.ts"),g=T("./src/types/cmcd.ts"),s=T("./src/utils/buffer-helper.ts"),_=T("./src/utils/logger.ts");function p(t,a){for(var c=0;c<a.length;c++){var d=a[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(t,d.key,d)}}function e(t,a,c){return a&&p(t.prototype,a),c&&p(t,c),t}function o(t,a){var c=typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(c)return(c=c.call(t)).next.bind(c);if(Array.isArray(t)||(c=n(t))||a&&t&&typeof t.length=="number"){c&&(t=c);var d=0;return function(){return d>=t.length?{done:!0}:{done:!1,value:t[d++]}}}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(t,a){if(!t)return;if(typeof t=="string")return l(t,a);var c=Object.prototype.toString.call(t).slice(8,-1);if(c==="Object"&&t.constructor&&(c=t.constructor.name),c==="Map"||c==="Set")return Array.from(t);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return l(t,a)}function l(t,a){(a==null||a>t.length)&&(a=t.length);for(var c=0,d=new Array(a);c<a;c++)d[c]=t[c];return d}function r(){return r=Object.assign||function(t){for(var a=1;a<arguments.length;a++){var c=arguments[a];for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(t[d]=c[d])}return t},r.apply(this,arguments)}var i=function(){function t(c){var d=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(){d.initialized&&(d.starved=!0),d.buffering=!0},this.onPlaying=function(){d.initialized||(d.initialized=!0),d.buffering=!1},this.applyPlaylistData=function(u){try{d.apply(u,{ot:g.CMCDObjectType.MANIFEST,su:!d.initialized})}catch(E){_.logger.warn("Could not generate manifest CMCD data.",E)}},this.applyFragmentData=function(u){try{var E=u.frag,x=d.hls.levels[E.level],O=d.getObjectType(E),C={d:E.duration*1e3,ot:O};(O===g.CMCDObjectType.VIDEO||O===g.CMCDObjectType.AUDIO||O==g.CMCDObjectType.MUXED)&&(C.br=x.bitrate/1e3,C.tb=d.getTopBandwidth(O),C.bl=d.getBufferLength(O)),d.apply(u,C)}catch(w){_.logger.warn("Could not generate segment CMCD data.",w)}},this.hls=c;var f=this.config=c.config,h=f.cmcd;h!=null&&(f.pLoader=this.createPlaylistLoader(),f.fLoader=this.createFragmentLoader(),this.sid=h.sessionId||t.uuid(),this.cid=h.contentId,this.useHeaders=h.useHeaders===!0,this.registerListeners())}var a=t.prototype;return a.registerListeners=function(){var d=this.hls;d.on(y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),d.on(y.Events.MEDIA_DETACHED,this.onMediaDetached,this),d.on(y.Events.BUFFER_CREATED,this.onBufferCreated,this)},a.unregisterListeners=function(){var d=this.hls;d.off(y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),d.off(y.Events.MEDIA_DETACHED,this.onMediaDetached,this),d.off(y.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},a.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},a.onMediaAttached=function(d,f){this.media=f.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},a.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},a.onBufferCreated=function(d,f){var h,u;this.audioBuffer=(h=f.tracks.audio)===null||h===void 0?void 0:h.buffer,this.videoBuffer=(u=f.tracks.video)===null||u===void 0?void 0:u.buffer},a.createData=function(){var d;return{v:g.CMCDVersion,sf:g.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(d=this.media)===null||d===void 0?void 0:d.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},a.apply=function(d,f){f===void 0&&(f={}),r(f,this.createData());var h=f.ot===g.CMCDObjectType.INIT||f.ot===g.CMCDObjectType.VIDEO||f.ot===g.CMCDObjectType.MUXED;if(this.starved&&h&&(f.bs=!0,f.su=!0,this.starved=!1),f.su==null&&(f.su=this.buffering),this.useHeaders){var u=t.toHeaders(f);if(!Object.keys(u).length)return;d.headers||(d.headers={}),r(d.headers,u)}else{var E=t.toQuery(f);if(!E)return;d.url=t.appendQueryToUri(d.url,E)}},a.getObjectType=function(d){var f=d.type;return f==="subtitle"?g.CMCDObjectType.TIMED_TEXT:d.sn==="initSegment"?g.CMCDObjectType.INIT:f==="audio"?g.CMCDObjectType.AUDIO:f==="main"?this.hls.audioTracks.length?g.CMCDObjectType.VIDEO:g.CMCDObjectType.MUXED:void 0},a.getTopBandwidth=function(d){for(var f=0,h=d===g.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,u=o(h),E;!(E=u()).done;){var x=E.value;x.bitrate>f&&(f=x.bitrate)}return f>0?f:NaN},a.getBufferLength=function(d){var f=this.hls.media,h=d===g.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!h||!f)return NaN;var u=s.BufferHelper.bufferInfo(h,f.currentTime,this.config.maxBufferHole);return u.len*1e3},a.createPlaylistLoader=function(){var d=this.config.pLoader,f=this.applyPlaylistData,h=d||this.config.loader;return function(){function u(x){this.loader=void 0,this.loader=new h(x)}var E=u.prototype;return E.destroy=function(){this.loader.destroy()},E.abort=function(){this.loader.abort()},E.load=function(O,C,w){f(O),this.loader.load(O,C,w)},e(u,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),u}()},a.createFragmentLoader=function(){var d=this.config.fLoader,f=this.applyFragmentData,h=d||this.config.loader;return function(){function u(x){this.loader=void 0,this.loader=new h(x)}var E=u.prototype;return E.destroy=function(){this.loader.destroy()},E.abort=function(){this.loader.abort()},E.load=function(O,C,w){f(O),this.loader.load(O,C,w)},e(u,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),u}()},t.uuid=function(){var d=URL.createObjectURL(new Blob),f=d.toString();return URL.revokeObjectURL(d),f.substr(f.lastIndexOf("/")+1)},t.serialize=function(d){for(var f=[],h=function(X){return!Number.isNaN(X)&&X!=null&&X!==""&&X!==!1},u=function(X){return Math.round(X)},E=function(X){return u(X/100)*100},x=function(X){return encodeURIComponent(X)},O={br:u,d:u,bl:E,dl:E,mtp:E,nor:x,rtp:E,tb:u},C=Object.keys(d||{}).sort(),w=o(C),S;!(S=w()).done;){var A=S.value,D=d[A];if(!h(D))continue;if(A==="v"&&D===1)continue;if(A=="pr"&&D===1)continue;var M=O[A];M&&(D=M(D));var N=typeof D,P=void 0;A==="ot"||A==="sf"||A==="st"?P=A+"="+D:N==="boolean"?P=A:N==="number"?P=A+"="+D:P=A+"="+JSON.stringify(D),f.push(P)}return f.join(",")},t.toHeaders=function(d){for(var f=Object.keys(d),h={},u=["Object","Request","Session","Status"],E=[{},{},{},{}],x={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},O=0,C=f;O<C.length;O++){var w=C[O],S=x[w]!=null?x[w]:1;E[S][w]=d[w]}for(var A=0;A<E.length;A++){var D=t.serialize(E[A]);D&&(h["CMCD-"+u[A]]=D)}return h},t.toQuery=function(d){return"CMCD="+encodeURIComponent(t.serialize(d))},t.appendQueryToUri=function(d,f){if(!f)return d;var h=d.includes("?")?"&":"?";return""+d+h+f},t}()},"./src/controller/eme-controller.ts":function(I,v,T){"use strict";T.r(v);var y=T("./src/events.ts"),g=T("./src/errors.ts"),s=T("./src/utils/logger.ts"),_=T("./src/utils/mediakeys-helper.ts");function p(i,t){for(var a=0;a<t.length;a++){var c=t[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(i,c.key,c)}}function e(i,t,a){return t&&p(i.prototype,t),a&&p(i,a),i}var o=3,n=function(t,a,c){var d={audioCapabilities:[],videoCapabilities:[]};return t.forEach(function(f){d.audioCapabilities.push({contentType:'audio/mp4; codecs="'+f+'"',robustness:c.audioRobustness||""})}),a.forEach(function(f){d.videoCapabilities.push({contentType:'video/mp4; codecs="'+f+'"',robustness:c.videoRobustness||""})}),[d]},l=function(t,a,c,d){switch(t){case _.KeySystems.WIDEVINE:return n(a,c,d);default:throw new Error("Unknown key-system: "+t)}},r=function(){function i(a){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=a,this._config=a.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 t=i.prototype;return t.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},t._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)},t._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)},t.getLicenseServerUrl=function(c){switch(c){case _.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+c+'"')},t._attemptKeySystemAccess=function(c,d,f){var h=this,u=l(c,d,f,this._drmSystemOptions);s.logger.log("Requesting encrypted media key-system access");var E=this.requestMediaKeySystemAccess(c,u);this.mediaKeysPromise=E.then(function(x){return h._onMediaKeySystemAccessObtained(c,x)}),E.catch(function(x){s.logger.error('Failed to obtain key-system "'+c+'" access:',x)})},t._onMediaKeySystemAccessObtained=function(c,d){var f=this;s.logger.log('Access for key-system "'+c+'" obtained');var h={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:d,mediaKeySystemDomain:c};this._mediaKeysList.push(h);var u=Promise.resolve().then(function(){return d.createMediaKeys()}).then(function(E){return h.mediaKeys=E,s.logger.log('Media-keys created for key-system "'+c+'"'),f._onMediaKeysCreated(),E});return u.catch(function(E){s.logger.error("Failed to create media-keys:",E)}),u},t._onMediaKeysCreated=function(){var c=this;this._mediaKeysList.forEach(function(d){d.mediaKeysSession||(d.mediaKeysSession=d.mediaKeys.createSession(),c._onNewMediaKeySession(d.mediaKeysSession))})},t._onNewMediaKeySession=function(c){var d=this;s.logger.log("New key-system session "+c.sessionId),c.addEventListener("message",function(f){d._onKeySessionMessage(c,f.message)},!1)},t._onKeySessionMessage=function(c,d){s.logger.log("Got EME message event, creating license request"),this._requestLicense(d,function(f){s.logger.log("Received license data (length: "+(f&&f.byteLength)+"), updating key-session"),c.update(f)})},t.onMediaEncrypted=function(c){var d=this;if(s.logger.log('Media is encrypted using "'+c.initDataType+'" init data type'),!this.mediaKeysPromise){s.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(y.Events.ERROR,{type:g.ErrorTypes.KEY_SYSTEM_ERROR,details:g.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var f=function(u){if(!d._media)return;d._attemptSetMediaKeys(u),d._generateRequestWithPreferredKeySession(c.initDataType,c.initData)};this.mediaKeysPromise.then(f).catch(f)},t._attemptSetMediaKeys=function(c){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var d=this._mediaKeysList[0];if(!d||!d.mediaKeys){s.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(y.Events.ERROR,{type:g.ErrorTypes.KEY_SYSTEM_ERROR,details:g.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}s.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(d.mediaKeys),this._hasSetMediaKeys=!0}},t._generateRequestWithPreferredKeySession=function(c,d){var f=this,h=this._mediaKeysList[0];if(!h){s.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(y.Events.ERROR,{type:g.ErrorTypes.KEY_SYSTEM_ERROR,details:g.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(h.mediaKeysSessionInitialized){s.logger.warn("Key-Session already initialized but requested again");return}var u=h.mediaKeysSession;if(!u){s.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(y.Events.ERROR,{type:g.ErrorTypes.KEY_SYSTEM_ERROR,details:g.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!d){s.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(y.Events.ERROR,{type:g.ErrorTypes.KEY_SYSTEM_ERROR,details:g.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}s.logger.log('Generating key-session request for "'+c+'" init data type'),h.mediaKeysSessionInitialized=!0,u.generateRequest(c,d).then(function(){s.logger.debug("Key-session generation succeeded")}).catch(function(E){s.logger.error("Error generating key-session request:",E),f.hls.trigger(y.Events.ERROR,{type:g.ErrorTypes.KEY_SYSTEM_ERROR,details:g.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},t._createLicenseXhr=function(c,d,f){var h=new XMLHttpRequest;h.responseType="arraybuffer",h.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,h,c,d,f);var u=this._licenseXhrSetup;if(u)try{u.call(this.hls,h,c),u=void 0}catch(E){s.logger.error(E)}try{h.readyState||h.open("POST",c,!0),u&&u.call(this.hls,h,c)}catch(E){throw new Error("issue setting up KeySystem license XHR "+E)}return h},t._onLicenseRequestReadyStageChange=function(c,d,f,h){switch(c.readyState){case 4:if(c.status===200){this._requestLicenseFailureCount=0,s.logger.log("License request succeeded");var u=c.response,E=this._licenseResponseCallback;if(E)try{u=E.call(this.hls,c,d)}catch(O){s.logger.error(O)}h(u)}else{if(s.logger.error("License Request XHR failed ("+d+"). Status: "+c.status+" ("+c.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>o){this.hls.trigger(y.Events.ERROR,{type:g.ErrorTypes.KEY_SYSTEM_ERROR,details:g.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var x=o-this._requestLicenseFailureCount+1;s.logger.warn("Retrying license request, "+x+" attempts left"),this._requestLicense(f,h)}break}},t._generateLicenseRequestChallenge=function(c,d){switch(c.mediaKeySystemDomain){case _.KeySystems.WIDEVINE:return d}throw new Error("unsupported key-system: "+c.mediaKeySystemDomain)},t._requestLicense=function(c,d){s.logger.log("Requesting content license for key-system");var f=this._mediaKeysList[0];if(!f){s.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(y.Events.ERROR,{type:g.ErrorTypes.KEY_SYSTEM_ERROR,details:g.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var h=this.getLicenseServerUrl(f.mediaKeySystemDomain),u=this._createLicenseXhr(h,c,d);s.logger.log("Sending license request to URL: "+h);var E=this._generateLicenseRequestChallenge(f,c);u.send(E)}catch(x){s.logger.error("Failure requesting DRM license: "+x),this.hls.trigger(y.Events.ERROR,{type:g.ErrorTypes.KEY_SYSTEM_ERROR,details:g.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},t.onMediaAttached=function(c,d){if(!this._emeEnabled)return;var f=d.media;this._media=f,f.addEventListener("encrypted",this._onMediaEncrypted)},t.onMediaDetached=function(){var c=this._media,d=this._mediaKeysList;if(!c)return;c.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(d.map(function(f){if(f.mediaKeysSession)return f.mediaKeysSession.close().catch(function(){})})).then(function(){return c.setMediaKeys(null)}).catch(function(){})},t.onManifestParsed=function(c,d){if(!this._emeEnabled)return;var f=d.levels.map(function(u){return u.audioCodec}).filter(function(u){return!!u}),h=d.levels.map(function(u){return u.videoCodec}).filter(function(u){return!!u});this._attemptKeySystemAccess(_.KeySystems.WIDEVINE,f,h)},e(i,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),i}();v.default=r},"./src/controller/fps-controller.ts":function(I,v,T){"use strict";T.r(v);var y=T("./src/events.ts"),g=T("./src/utils/logger.ts"),s=function(){function _(e){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=e,this.registerListeners()}var p=_.prototype;return p.setStreamController=function(o){this.streamController=o},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(o,n){var l=this.hls.config;if(l.capLevelOnFPSDrop){var r=n.media instanceof self.HTMLVideoElement?n.media:null;this.media=r,r&&typeof r.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),l.fpsDroppedMonitoringPeriod)}},p.checkFPS=function(o,n,l){var r=performance.now();if(n){if(this.lastTime){var i=r-this.lastTime,t=l-this.lastDroppedFrames,a=n-this.lastDecodedFrames,c=1e3*t/i,d=this.hls;if(d.trigger(y.Events.FPS_DROP,{currentDropped:t,currentDecoded:a,totalDroppedFrames:l}),c>0&&t>d.config.fpsDroppedMonitoringThreshold*a){var f=d.currentLevel;g.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+f),f>0&&(d.autoLevelCapping===-1||d.autoLevelCapping>=f)&&(f=f-1,d.trigger(y.Events.FPS_DROP_LEVEL_CAPPING,{level:f,droppedLevel:d.currentLevel}),d.autoLevelCapping=f,this.streamController.nextLevelSwitch())}}this.lastTime=r,this.lastDroppedFrames=l,this.lastDecodedFrames=n}},p.checkFPSInterval=function(){var o=this.media;if(o)if(this.isVideoPlaybackQualityAvailable){var n=o.getVideoPlaybackQuality();this.checkFPS(o,n.totalVideoFrames,n.droppedVideoFrames)}else this.checkFPS(o,o.webkitDecodedFrameCount,o.webkitDroppedFrameCount)},_}();v.default=s},"./src/controller/fragment-finders.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"findFragmentByPDT",function(){return s}),T.d(v,"findFragmentByPTS",function(){return _}),T.d(v,"fragmentWithinToleranceTest",function(){return p}),T.d(v,"pdtWithinToleranceTest",function(){return e}),T.d(v,"findFragWithCC",function(){return o});var y=T("./src/polyfills/number.ts"),g=T("./src/utils/binary-search.ts");function s(n,l,r){if(l===null||!Array.isArray(n)||!n.length||!Object(y.isFiniteNumber)(l))return null;var i=n[0].programDateTime;if(l<(i||0))return null;var t=n[n.length-1].endProgramDateTime;if(l>=(t||0))return null;r=r||0;for(var a=0;a<n.length;++a){var c=n[a];if(e(l,r,c))return c}return null}function _(n,l,r,i){r===void 0&&(r=0),i===void 0&&(i=0);var t=null;if(n?t=l[n.sn-l[0].sn+1]||null:r===0&&l[0].start===0&&(t=l[0]),t&&p(r,i,t)===0)return t;var a=g.default.search(l,p.bind(null,r,i));return a||t}function p(n,l,r){n===void 0&&(n=0),l===void 0&&(l=0);var i=Math.min(l,r.duration+(r.deltaPTS?r.deltaPTS:0));return r.start+r.duration-i<=n?1:r.start-i>n&&r.start?-1:0}function e(n,l,r){var i=Math.min(l,r.duration+(r.deltaPTS?r.deltaPTS:0))*1e3,t=r.endProgramDateTime||0;return t-i>n}function o(n,l){return g.default.search(n,function(r){return r.cc<l?1:r.cc>l?-1:0})}},"./src/controller/fragment-tracker.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"FragmentState",function(){return s}),T.d(v,"FragmentTracker",function(){return _});var y=T("./src/events.ts"),g=T("./src/types/loader.ts"),s;(function(o){o.NOT_LOADED="NOT_LOADED",o.BACKTRACKED="BACKTRACKED",o.APPENDING="APPENDING",o.PARTIAL="PARTIAL",o.OK="OK"})(s||(s={}));var _=function(){function o(l){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=l,this._registerListeners()}var n=o.prototype;return n._registerListeners=function(){var r=this.hls;r.on(y.Events.BUFFER_APPENDED,this.onBufferAppended,this),r.on(y.Events.FRAG_BUFFERED,this.onFragBuffered,this),r.on(y.Events.FRAG_LOADED,this.onFragLoaded,this)},n._unregisterListeners=function(){var r=this.hls;r.off(y.Events.BUFFER_APPENDED,this.onBufferAppended,this),r.off(y.Events.FRAG_BUFFERED,this.onFragBuffered,this),r.off(y.Events.FRAG_LOADED,this.onFragLoaded,this)},n.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},n.getAppendedFrag=function(r,i){if(i===g.PlaylistLevelType.MAIN){var t=this.activeFragment,a=this.activeParts;if(!t)return null;if(a)for(var c=a.length;c--;){var d=a[c],f=d?d.end:t.appendedPTS;if(d.start<=r&&f!==void 0&&r<=f)return c>9&&(this.activeParts=a.slice(c-9)),d}else if(t.start<=r&&t.appendedPTS!==void 0&&r<=t.appendedPTS)return t}return this.getBufferedFrag(r,i)},n.getBufferedFrag=function(r,i){for(var t=this.fragments,a=Object.keys(t),c=a.length;c--;){var d=t[a[c]];if((d==null?void 0:d.body.type)===i&&d.buffered){var f=d.body;if(f.start<=r&&r<=f.end)return f}}return null},n.detectEvictedFragments=function(r,i,t){var a=this;Object.keys(this.fragments).forEach(function(c){var d=a.fragments[c];if(!d)return;if(!d.buffered){d.body.type===t&&a.removeFragment(d.body);return}var f=d.range[r];if(!f)return;f.time.some(function(h){var u=!a.isTimeBuffered(h.startPTS,h.endPTS,i);return u&&a.removeFragment(d.body),u})})},n.detectPartialFragments=function(r){var i=this,t=this.timeRanges,a=r.frag,c=r.part;if(!t||a.sn==="initSegment")return;var d=e(a),f=this.fragments[d];if(!f)return;Object.keys(t).forEach(function(h){var u=a.elementaryStreams[h];if(!u)return;var E=t[h],x=c!==null||u.partial===!0;f.range[h]=i.getBufferedTimes(a,c,x,E)}),f.backtrack=f.loaded=null,Object.keys(f.range).length?f.buffered=!0:this.removeFragment(f.body)},n.fragBuffered=function(r){var i=e(r),t=this.fragments[i];t&&(t.backtrack=t.loaded=null,t.buffered=!0)},n.getBufferedTimes=function(r,i,t,a){for(var c={time:[],partial:t},d=i?i.start:r.start,f=i?i.end:r.end,h=r.minEndPTS||f,u=r.maxStartPTS||d,E=0;E<a.length;E++){var x=a.start(E)-this.bufferPadding,O=a.end(E)+this.bufferPadding;if(u>=x&&h<=O){c.time.push({startPTS:Math.max(d,a.start(E)),endPTS:Math.min(f,a.end(E))});break}else if(d<O&&f>x)c.partial=!0,c.time.push({startPTS:Math.max(d,a.start(E)),endPTS:Math.min(f,a.end(E))});else if(f<=x)break}return c},n.getPartialFragment=function(r){var i=null,t,a,c,d=0,f=this.bufferPadding,h=this.fragments;return Object.keys(h).forEach(function(u){var E=h[u];if(!E)return;p(E)&&(a=E.body.start-f,c=E.body.end+f,r>=a&&r<=c&&(t=Math.min(r-a,c-r),d<=t&&(i=E.body,d=t)))}),i},n.getState=function(r){var i=e(r),t=this.fragments[i];return t?t.buffered?p(t)?s.PARTIAL:s.OK:t.backtrack?s.BACKTRACKED:s.APPENDING:s.NOT_LOADED},n.backtrack=function(r,i){var t=e(r),a=this.fragments[t];if(!a||a.backtrack)return null;var c=a.backtrack=i||a.loaded;return a.loaded=null,c},n.getBacktrackData=function(r){var i=e(r),t=this.fragments[i];if(t){var a,c=t.backtrack;if(c!=null&&(a=c.payload)!==null&&a!==void 0&&a.byteLength)return c;this.removeFragment(r)}return null},n.isTimeBuffered=function(r,i,t){for(var a,c,d=0;d<t.length;d++){if(a=t.start(d)-this.bufferPadding,c=t.end(d)+this.bufferPadding,r>=a&&i<=c)return!0;if(i<=a)return!1}return!1},n.onFragLoaded=function(r,i){var t=i.frag,a=i.part;if(t.sn==="initSegment"||t.bitrateTest||a)return;var c=e(t);this.fragments[c]={body:t,loaded:i,backtrack:null,buffered:!1,range:Object.create(null)}},n.onBufferAppended=function(r,i){var t=this,a=i.frag,c=i.part,d=i.timeRanges;if(a.type===g.PlaylistLevelType.MAIN)if(this.activeFragment=a,c){var f=this.activeParts;f||(this.activeParts=f=[]),f.push(c)}else this.activeParts=null;this.timeRanges=d,Object.keys(d).forEach(function(h){var u=d[h];if(t.detectEvictedFragments(h,u),!c)for(var E=0;E<u.length;E++)a.appendedPTS=Math.max(u.end(E),a.appendedPTS||0)})},n.onFragBuffered=function(r,i){this.detectPartialFragments(i)},n.hasFragment=function(r){var i=e(r);return!!this.fragments[i]},n.removeFragmentsInRange=function(r,i,t){var a=this;Object.keys(this.fragments).forEach(function(c){var d=a.fragments[c];if(!d)return;if(d.buffered){var f=d.body;f.type===t&&f.start<i&&f.end>r&&a.removeFragment(f)}})},n.removeFragment=function(r){var i=e(r);r.stats.loaded=0,r.clearElementaryStreamInfo(),delete this.fragments[i]},n.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},o}();function p(o){var n,l;return o.buffered&&(((n=o.range.video)===null||n===void 0?void 0:n.partial)||((l=o.range.audio)===null||l===void 0?void 0:l.partial))}function e(o){return o.type+"_"+o.level+"_"+o.urlId+"_"+o.sn}},"./src/controller/gap-controller.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"STALL_MINIMUM_DURATION_MS",function(){return p}),T.d(v,"MAX_START_GAP_JUMP",function(){return e}),T.d(v,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return o}),T.d(v,"SKIP_BUFFER_RANGE_START",function(){return n}),T.d(v,"default",function(){return l});var y=T("./src/utils/buffer-helper.ts"),g=T("./src/errors.ts"),s=T("./src/events.ts"),_=T("./src/utils/logger.ts"),p=250,e=2,o=.1,n=.05,l=function(){function r(t,a,c,d){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=t,this.media=a,this.fragmentTracker=c,this.hls=d}var i=r.prototype;return i.destroy=function(){this.hls=this.fragmentTracker=this.media=null},i.poll=function(a){var c=this.config,d=this.media,f=this.stalled,h=d.currentTime,u=d.seeking,E=this.seeking&&!u,x=!this.seeking&&u;if(this.seeking=u,h!==a){if(this.moved=!0,f!==null){if(this.stallReported){var O=self.performance.now()-f;_.logger.warn("playback not stuck anymore @"+h+", after "+Math.round(O)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((x||E)&&(this.stalled=null),d.paused||d.ended||d.playbackRate===0||!y.BufferHelper.getBuffered(d).length)return;var C=y.BufferHelper.bufferInfo(d,h,0),w=C.len>0,S=C.nextStart||0;if(!w&&!S)return;if(u){var A=C.len>e,D=!S||S-h>e&&!this.fragmentTracker.getPartialFragment(h);if(A||D)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var M,N=Math.max(S,C.start||0)-h,P=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,z=P==null||((M=P.details)===null||M===void 0)?void 0:M.live,X=z?P.details.targetduration*2:e;if(N>0&&N<=X){this._trySkipBufferHole(null);return}}var k=self.performance.now();if(f===null){this.stalled=k;return}var F=k-f;!u&&F>=p&&this._reportStall(C.len);var U=y.BufferHelper.bufferInfo(d,h,c.maxBufferHole);this._tryFixBufferStall(U,F)},i._tryFixBufferStall=function(a,c){var d=this.config,f=this.fragmentTracker,h=this.media,u=h.currentTime,E=f.getPartialFragment(u);if(E){var x=this._trySkipBufferHole(E);if(x)return}a.len>d.maxBufferHole&&c>d.highBufferWatchdogPeriod*1e3&&(_.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},i._reportStall=function(a){var c=this.hls,d=this.media,f=this.stallReported;f||(this.stallReported=!0,_.logger.warn("Playback stalling at @"+d.currentTime+" due to low buffer (buffer="+a+")"),c.trigger(s.Events.ERROR,{type:g.ErrorTypes.MEDIA_ERROR,details:g.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:a}))},i._trySkipBufferHole=function(a){for(var c=this.config,d=this.hls,f=this.media,h=f.currentTime,u=0,E=y.BufferHelper.getBuffered(f),x=0;x<E.length;x++){var O=E.start(x);if(h+c.maxBufferHole>=u&&h<O){var C=Math.max(O+n,f.currentTime+o);return _.logger.warn("skipping hole, adjusting currentTime from "+h+" to "+C),this.moved=!0,this.stalled=null,f.currentTime=C,a&&d.trigger(s.Events.ERROR,{type:g.ErrorTypes.MEDIA_ERROR,details:g.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+h+" to "+C,frag:a}),C}u=E.end(x)}return 0},i._tryNudgeBuffer=function(){var a=this.config,c=this.hls,d=this.media,f=d.currentTime,h=(this.nudgeRetry||0)+1;if(this.nudgeRetry=h,h<a.nudgeMaxRetry){var u=f+h*a.nudgeOffset;_.logger.warn("Nudging 'currentTime' from "+f+" to "+u),d.currentTime=u,c.trigger(s.Events.ERROR,{type:g.ErrorTypes.MEDIA_ERROR,details:g.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else _.logger.error("Playhead still not moving while enough data buffered @"+f+" after "+a.nudgeMaxRetry+" nudges"),c.trigger(s.Events.ERROR,{type:g.ErrorTypes.MEDIA_ERROR,details:g.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},r}()},"./src/controller/id3-track-controller.ts":function(I,v,T){"use strict";T.r(v);var y=T("./src/events.ts"),g=T("./src/utils/texttrack-utils.ts"),s=T("./src/demux/id3.ts"),_=.25,p=function(){function e(n){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=n,this._registerListeners()}var o=e.prototype;return o.destroy=function(){this._unregisterListeners()},o._registerListeners=function(){var l=this.hls;l.on(y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.on(y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.on(y.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),l.on(y.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},o._unregisterListeners=function(){var l=this.hls;l.off(y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.off(y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.off(y.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),l.off(y.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},o.onMediaAttached=function(l,r){this.media=r.media},o.onMediaDetaching=function(){if(!this.id3Track)return;Object(g.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},o.getID3Track=function(l){if(!this.media)return;for(var r=0;r<l.length;r++){var i=l[r];if(i.kind==="metadata"&&i.label==="id3")return Object(g.sendAddTrackEvent)(i,this.media),i}return this.media.addTextTrack("metadata","id3")},o.onFragParsingMetadata=function(l,r){if(!this.media)return;var i=r.frag,t=r.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var a=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,c=0;c<t.length;c++){var d=s.getID3Frames(t[c].data);if(d){var f=t[c].pts,h=c<t.length-1?t[c+1].pts:i.end,u=h-f;u<=0&&(h=f+_);for(var E=0;E<d.length;E++){var x=d[E];if(!s.isTimeStampFrame(x)){var O=new a(f,h,"");O.value=x,this.id3Track.addCue(O)}}}}},o.onBufferFlushing=function(l,r){var i=r.startOffset,t=r.endOffset,a=r.type;if(!a||a==="audio"){var c=this.id3Track;c&&Object(g.removeCuesInRange)(c,i,t)}},e}();v.default=p},"./src/controller/latency-controller.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"default",function(){return e});var y=T("./src/errors.ts"),g=T("./src/events.ts"),s=T("./src/utils/logger.ts");function _(o,n){for(var l=0;l<n.length;l++){var r=n[l];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(o,r.key,r)}}function p(o,n,l){return n&&_(o.prototype,n),l&&_(o,l),o}var e=function(){function o(l){var r=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 r.timeupdate()},this.hls=l,this.config=l.config,this.registerListeners()}var n=o.prototype;return n.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},n.registerListeners=function(){this.hls.on(g.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(g.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(g.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(g.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(g.Events.ERROR,this.onError,this)},n.unregisterListeners=function(){this.hls.off(g.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(g.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(g.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(g.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(g.Events.ERROR,this.onError)},n.onMediaAttached=function(r,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(r,i){var t=i.details;this.levelDetails=t,t.advanced&&this.timeupdate(),!t.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},n.onError=function(r,i){if(i.details!==y.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,s.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},n.timeupdate=function(){var r=this.media,i=this.levelDetails;if(!r||!i)return;this.currentTime=r.currentTime;var t=this.computeLatency();if(t===null)return;this._latency=t;var a=this.config,c=a.lowLatencyMode,d=a.maxLiveSyncPlaybackRate;if(!c||d===1)return;var f=this.targetLatency;if(f===null)return;var h=t-f,u=Math.min(this.maxLatency,f+i.targetduration),E=h<u;if(i.live&&E&&h>.05&&this.forwardBufferLength>1){var x=Math.min(2,Math.max(1,d)),O=Math.round(2/(1+Math.exp(-.75*h-this.edgeStalled))*20)/20;r.playbackRate=Math.min(x,Math.max(1,O))}else r.playbackRate!==1&&r.playbackRate!==0&&(r.playbackRate=1)},n.estimateLiveEdge=function(){var r=this.levelDetails;return r===null?null:r.edge+r.age},n.computeLatency=function(){var r=this.estimateLiveEdge();return r===null?null:r-this.currentTime},p(o,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var r=this.config,i=this.levelDetails;return r.liveMaxLatencyDuration!==void 0?r.liveMaxLatencyDuration:i?r.liveMaxLatencyDurationCount*i.targetduration:0}},{key:"targetLatency",get:function(){var r=this.levelDetails;if(r===null)return null;var i=r.holdBack,t=r.partHoldBack,a=r.targetduration,c=this.config,d=c.liveSyncDuration,f=c.liveSyncDurationCount,h=c.lowLatencyMode,u=this.hls.userConfig,E=h&&t||i;(u.liveSyncDuration||u.liveSyncDurationCount||E===0)&&(E=d!==void 0?d:f*a);var x=a,O=1;return E+Math.min(this.stallCount*O,x)}},{key:"liveSyncPosition",get:function(){var r=this.estimateLiveEdge(),i=this.targetLatency,t=this.levelDetails;if(r===null||i===null||t===null)return null;var a=t.edge,c=r-i-this.edgeStalled,d=a-t.totalduration,f=a-(this.config.lowLatencyMode&&t.partTarget||t.targetduration);return Math.min(Math.max(d,c),f)}},{key:"drift",get:function(){var r=this.levelDetails;return r===null?1:r.drift}},{key:"edgeStalled",get:function(){var r=this.levelDetails;if(r===null)return 0;var i=(this.config.lowLatencyMode&&r.partTarget||r.targetduration)*3;return Math.max(r.age-i,0)}},{key:"forwardBufferLength",get:function(){var r=this.media,i=this.levelDetails;if(!r||!i)return 0;var t=r.buffered.length;return t?r.buffered.end(t-1):i.edge-this.currentTime}}]),o}()},"./src/controller/level-controller.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"default",function(){return c});var y=T("./src/types/level.ts"),g=T("./src/events.ts"),s=T("./src/errors.ts"),_=T("./src/utils/codecs.ts"),p=T("./src/controller/level-helper.ts"),e=T("./src/controller/base-playlist-controller.ts"),o=T("./src/types/loader.ts");function n(){return n=Object.assign||function(d){for(var f=1;f<arguments.length;f++){var h=arguments[f];for(var u in h)Object.prototype.hasOwnProperty.call(h,u)&&(d[u]=h[u])}return d},n.apply(this,arguments)}function l(d,f){for(var h=0;h<f.length;h++){var u=f[h];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(d,u.key,u)}}function r(d,f,h){return f&&l(d.prototype,f),h&&l(d,h),d}function i(d,f){d.prototype=Object.create(f.prototype),d.prototype.constructor=d,t(d,f)}function t(d,f){return t=Object.setPrototypeOf||function(u,E){return u.__proto__=E,u},t(d,f)}var a=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),c=function(d){i(f,d);function f(u){var E;return E=d.call(this,u,"[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 h=f.prototype;return h._registerListeners=function(){var E=this.hls;E.on(g.Events.MANIFEST_LOADED,this.onManifestLoaded,this),E.on(g.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.on(g.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),E.on(g.Events.FRAG_LOADED,this.onFragLoaded,this),E.on(g.Events.ERROR,this.onError,this)},h._unregisterListeners=function(){var E=this.hls;E.off(g.Events.MANIFEST_LOADED,this.onManifestLoaded,this),E.off(g.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.off(g.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),E.off(g.Events.FRAG_LOADED,this.onFragLoaded,this),E.off(g.Events.ERROR,this.onError,this)},h.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,d.prototype.destroy.call(this)},h.startLoad=function(){var E=this._levels;E.forEach(function(x){x.loadError=0}),d.prototype.startLoad.call(this)},h.onManifestLoaded=function(E,x){var O=[],C=[],w=[],S,A={},D,M=!1,N=!1,P=!1;if(x.levels.forEach(function(F){var U=F.attrs;M=M||!!(F.width&&F.height),N=N||!!F.videoCodec,P=P||!!F.audioCodec,a&&F.audioCodec&&F.audioCodec.indexOf("mp4a.40.34")!==-1&&(F.audioCodec=void 0);var L=F.bitrate+"-"+F.attrs.RESOLUTION+"-"+F.attrs.CODECS;D=A[L],D?D.url.push(F.url):(D=new y.Level(F),A[L]=D,O.push(D)),U&&(U.AUDIO&&Object(p.addGroupId)(D,"audio",U.AUDIO),U.SUBTITLES&&Object(p.addGroupId)(D,"text",U.SUBTITLES))}),(M||N)&&P&&(O=O.filter(function(F){var U=F.videoCodec,L=F.width,B=F.height;return!!U||!!(L&&B)})),O=O.filter(function(F){var U=F.audioCodec,L=F.videoCodec;return(!U||Object(_.isCodecSupportedInMp4)(U,"audio"))&&(!L||Object(_.isCodecSupportedInMp4)(L,"video"))}),x.audioTracks&&(C=x.audioTracks.filter(function(F){return!F.audioCodec||Object(_.isCodecSupportedInMp4)(F.audioCodec,"audio")}),Object(p.assignTrackIdsByGroup)(C)),x.subtitles&&(w=x.subtitles,Object(p.assignTrackIdsByGroup)(w)),O.length>0){S=O[0].bitrate,O.sort(function(F,U){return F.bitrate-U.bitrate}),this._levels=O;for(var z=0;z<O.length;z++)if(O[z].bitrate===S){this._firstLevel=z,this.log("manifest loaded, "+O.length+" level(s) found, first bitrate: "+S);break}var X=P&&!N,k={levels:O,audioTracks:C,subtitleTracks:w,firstLevel:this._firstLevel,stats:x.stats,audio:P,video:N,altAudio:!X&&C.some(function(F){return!!F.url})};this.hls.trigger(g.Events.MANIFEST_PARSED,k),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(g.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:x.url,reason:"no level with compatible codecs found in manifest"})},h.onError=function(E,x){if(d.prototype.onError.call(this,E,x),x.fatal)return;var O=x.context,C=this._levels[this.currentLevelIndex];if(O&&(O.type===o.PlaylistContextType.AUDIO_TRACK&&C.audioGroupIds&&O.groupId===C.audioGroupIds[C.urlId]||O.type===o.PlaylistContextType.SUBTITLE_TRACK&&C.textGroupIds&&O.groupId===C.textGroupIds[C.urlId])){this.redundantFailover(this.currentLevelIndex);return}var w=!1,S=!0,A;switch(x.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:if(x.frag){var D=this._levels[x.frag.level];D?(D.fragmentError++,D.fragmentError>this.hls.config.fragLoadingMaxRetry&&(A=x.frag.level)):A=x.frag.level}break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:O&&(O.deliveryDirectives&&(S=!1),A=O.level),w=!0;break;case s.ErrorDetails.REMUX_ALLOC_ERROR:A=x.level,w=!0;break}A!==void 0&&this.recoverLevel(x,A,w,S)},h.recoverLevel=function(E,x,O,C){var w=E.details,S=this._levels[x];if(S.loadError++,O){var A=this.retryLoadingOrFail(E);if(A)E.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(C){var D=S.url.length;if(D>1&&S.loadError<D)E.levelRetry=!0,this.redundantFailover(x);else if(this.manualLevelIndex===-1){var M=x===0?this._levels.length-1:x-1;this.currentLevelIndex!==M&&this._levels[M].loadError===0&&(this.warn(w+": switch to "+M),E.levelRetry=!0,this.hls.nextAutoLevel=M)}}},h.redundantFailover=function(E){var x=this._levels[E],O=x.url.length;if(O>1){var C=(x.urlId+1)%O;this.warn("Switching to redundant URL-id "+C),this._levels.forEach(function(w){w.urlId=C}),this.level=E}},h.onFragLoaded=function(E,x){var O=x.frag;if(O!==void 0&&O.type===o.PlaylistLevelType.MAIN){var C=this._levels[O.level];C!==void 0&&(C.fragmentError=0,C.loadError=0)}},h.onLevelLoaded=function(E,x){var O,C=x.level,w=x.details,S=this._levels[C];if(!S){var A;this.warn("Invalid level index "+C),(A=x.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,x,S.details)):(O=x.deliveryDirectives)!==null&&O!==void 0&&O.skip&&(w.deltaUpdateFailed=!0)},h.onAudioTrackSwitched=function(E,x){var O=this.hls.levels[this.currentLevelIndex];if(!O)return;if(O.audioGroupIds){for(var C=-1,w=this.hls.audioTracks[x.id].groupId,S=0;S<O.audioGroupIds.length;S++)if(O.audioGroupIds[S]===w){C=S;break}C!==O.urlId&&(O.urlId=C,this.startLoad())}},h.loadPlaylist=function(E){var x=this.currentLevelIndex,O=this._levels[x];if(this.canLoad&&O&&O.url.length>0){var C=O.urlId,w=O.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 "+x+(E?" at sn "+E.msn+" part "+E.part:"")+" with URL-id "+C+" "+w),this.clearTimer(),this.hls.trigger(g.Events.LEVEL_LOADING,{url:w,level:x,id:C,deliveryDirectives:E||null})}},h.removeLevel=function(E,x){var O=function(S,A){return A!==x},C=this._levels.filter(function(w,S){return S!==E?!0:w.url.length>1&&x!==void 0?(w.url=w.url.filter(O),w.audioGroupIds&&(w.audioGroupIds=w.audioGroupIds.filter(O)),w.textGroupIds&&(w.textGroupIds=w.textGroupIds.filter(O)),w.urlId=0,!0):!1}).map(function(w,S){var A=w.details;return A!=null&&A.fragments&&A.fragments.forEach(function(D){D.level=S}),w});this._levels=C,this.hls.trigger(g.Events.LEVELS_UPDATED,{levels:C})},r(f,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(E){var x,O=this._levels;if(O.length===0)return;if(this.currentLevelIndex===E&&(x=O[E])!==null&&x!==void 0&&x.details)return;if(E<0||E>=O.length){var C=E<0;if(this.hls.trigger(g.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.LEVEL_SWITCH_ERROR,level:E,fatal:C,reason:"invalid level idx"}),C)return;E=Math.min(E,O.length-1)}this.clearTimer();var w=this.currentLevelIndex,S=O[w],A=O[E];this.log("switching to level "+E+" from "+w),this.currentLevelIndex=E;var D=n({},A,{level:E,maxBitrate:A.maxBitrate,uri:A.uri,urlId:A.urlId});delete D._urlId,this.hls.trigger(g.Events.LEVEL_SWITCHING,D);var M=A.details;if(!M||M.live){var N=this.switchParams(A.uri,S==null?void 0:S.details);this.loadPlaylist(N)}}},{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}(e.default)},"./src/controller/level-helper.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"addGroupId",function(){return s}),T.d(v,"assignTrackIdsByGroup",function(){return _}),T.d(v,"updatePTS",function(){return p}),T.d(v,"updateFragPTSDTS",function(){return o}),T.d(v,"mergeDetails",function(){return n}),T.d(v,"mapPartIntersection",function(){return l}),T.d(v,"mapFragmentIntersection",function(){return r}),T.d(v,"adjustSliding",function(){return i}),T.d(v,"addSliding",function(){return t}),T.d(v,"computeReloadInterval",function(){return a}),T.d(v,"getFragmentWithSN",function(){return c}),T.d(v,"getPartWith",function(){return d});var y=T("./src/polyfills/number.ts"),g=T("./src/utils/logger.ts");function s(f,h,u){switch(h){case"audio":f.audioGroupIds||(f.audioGroupIds=[]),f.audioGroupIds.push(u);break;case"text":f.textGroupIds||(f.textGroupIds=[]),f.textGroupIds.push(u);break}}function _(f){var h={};f.forEach(function(u){var E=u.groupId||"";u.id=h[E]=h[E]||0,h[E]++})}function p(f,h,u){var E=f[h],x=f[u];e(E,x)}function e(f,h){var u=h.startPTS;if(Object(y.isFiniteNumber)(u)){var E=0,x;h.sn>f.sn?(E=u-f.start,x=f):(E=f.start-u,x=h),x.duration!==E&&(x.duration=E)}else if(h.sn>f.sn){var O=f.cc===h.cc;O&&f.minEndPTS?h.start=f.start+(f.minEndPTS-f.start):h.start=f.start+f.duration}else h.start=Math.max(f.start-h.duration,0)}function o(f,h,u,E,x,O){var C=E-u;C<=0&&(g.logger.warn("Fragment should have a positive duration",h),E=u+h.duration,O=x+h.duration);var w=u,S=E,A=h.startPTS,D=h.endPTS;if(Object(y.isFiniteNumber)(A)){var M=Math.abs(A-u);Object(y.isFiniteNumber)(h.deltaPTS)?h.deltaPTS=Math.max(M,h.deltaPTS):h.deltaPTS=M,w=Math.max(u,A),u=Math.min(u,A),x=Math.min(x,h.startDTS),S=Math.min(E,D),E=Math.max(E,D),O=Math.max(O,h.endDTS)}h.duration=E-u;var N=u-h.start;h.appendedPTS=E,h.start=h.startPTS=u,h.maxStartPTS=w,h.startDTS=x,h.endPTS=E,h.minEndPTS=S,h.endDTS=O;var P=h.sn;if(!f||P<f.startSN||P>f.endSN)return 0;var z,X=P-f.startSN,k=f.fragments;for(k[X]=h,z=X;z>0;z--)e(k[z],k[z-1]);for(z=X;z<k.length-1;z++)e(k[z],k[z+1]);return f.fragmentHint&&e(k[k.length-1],f.fragmentHint),f.PTSKnown=f.alignedSliding=!0,N}function n(f,h){for(var u=null,E=f.fragments,x=E.length-1;x>=0;x--){var O=E[x].initSegment;if(O){u=O;break}}f.fragmentHint&&delete f.fragmentHint.endPTS;var C=0,w;if(r(f,h,function(z,X){z.relurl&&(C=z.cc-X.cc),Object(y.isFiniteNumber)(z.startPTS)&&Object(y.isFiniteNumber)(z.endPTS)&&(X.start=X.startPTS=z.startPTS,X.startDTS=z.startDTS,X.appendedPTS=z.appendedPTS,X.maxStartPTS=z.maxStartPTS,X.endPTS=z.endPTS,X.endDTS=z.endDTS,X.minEndPTS=z.minEndPTS,X.duration=z.endPTS-z.startPTS,X.duration&&(w=X),h.PTSKnown=h.alignedSliding=!0),X.elementaryStreams=z.elementaryStreams,X.loader=z.loader,X.stats=z.stats,X.urlId=z.urlId,z.initSegment&&(X.initSegment=z.initSegment,u=z.initSegment)}),u){var S=h.fragmentHint?h.fragments.concat(h.fragmentHint):h.fragments;S.forEach(function(z){var X;(!z.initSegment||z.initSegment.relurl===((X=u)===null||X===void 0?void 0:X.relurl))&&(z.initSegment=u)})}if(h.skippedSegments&&(h.deltaUpdateFailed=h.fragments.some(function(z){return!z}),h.deltaUpdateFailed)){g.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var A=h.skippedSegments;A--;)h.fragments.shift();h.startSN=h.fragments[0].sn,h.startCC=h.fragments[0].cc}var D=h.fragments;if(C){g.logger.warn("discontinuity sliding from playlist, take drift into account");for(var M=0;M<D.length;M++)D[M].cc+=C}h.skippedSegments&&(h.startCC=h.fragments[0].cc),l(f.partList,h.partList,function(z,X){X.elementaryStreams=z.elementaryStreams,X.stats=z.stats}),w?o(h,w,w.startPTS,w.endPTS,w.startDTS,w.endDTS):i(f,h),D.length&&(h.totalduration=h.edge-D[0].start),h.driftStartTime=f.driftStartTime,h.driftStart=f.driftStart;var N=h.advancedDateTime;if(h.advanced&&N){var P=h.edge;h.driftStart||(h.driftStartTime=N,h.driftStart=P),h.driftEndTime=N,h.driftEnd=P}else h.driftEndTime=f.driftEndTime,h.driftEnd=f.driftEnd,h.advancedDateTime=f.advancedDateTime}function l(f,h,u){if(f&&h)for(var E=0,x=0,O=f.length;x<=O;x++){var C=f[x],w=h[x+E];C&&w&&C.index===w.index&&C.fragment.sn===w.fragment.sn?u(C,w):E--}}function r(f,h,u){for(var E=h.skippedSegments,x=Math.max(f.startSN,h.startSN)-h.startSN,O=(f.fragmentHint?1:0)+(E?h.endSN:Math.min(f.endSN,h.endSN))-h.startSN,C=h.startSN-f.startSN,w=h.fragmentHint?h.fragments.concat(h.fragmentHint):h.fragments,S=f.fragmentHint?f.fragments.concat(f.fragmentHint):f.fragments,A=x;A<=O;A++){var D=S[C+A],M=w[A];E&&!M&&A<E&&(M=h.fragments[A]=D),D&&M&&u(D,M)}}function i(f,h){var u=h.startSN+h.skippedSegments-f.startSN,E=f.fragments;if(u<0||u>=E.length)return;t(h,E[u].start)}function t(f,h){if(h){for(var u=f.fragments,E=f.skippedSegments;E<u.length;E++)u[E].start+=h;f.fragmentHint&&(f.fragmentHint.start+=h)}}function a(f,h){var u=1e3*f.levelTargetDuration,E=u/2,x=f.age,O=x>0&&x<u*3,C=h.loading.end-h.loading.start,w,S=f.availabilityDelay;if(f.updated===!1)if(O){var A=333*f.misses;w=Math.max(Math.min(E,C*2),A),f.availabilityDelay=(f.availabilityDelay||0)+w}else w=E;else O?(S=Math.min(S||u/2,x),f.availabilityDelay=S,w=S+u-x):w=u-C;return Math.round(w)}function c(f,h,u){if(!f||!f.details)return null;var E=f.details,x=E.fragments[h-E.startSN];return x||(x=E.fragmentHint,x&&x.sn===h?x:h<E.startSN&&u&&u.sn===h?u:null)}function d(f,h,u){if(!f||!f.details)return null;var E=f.details.partList;if(E)for(var x=E.length;x--;){var O=E[x];if(O.index===u&&O.fragment.sn===h)return O}return null}},"./src/controller/stream-controller.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"default",function(){return E});var y=T("./src/polyfills/number.ts"),g=T("./src/controller/base-stream-controller.ts"),s=T("./src/is-supported.ts"),_=T("./src/events.ts"),p=T("./src/utils/buffer-helper.ts"),e=T("./src/controller/fragment-tracker.ts"),o=T("./src/types/loader.ts"),n=T("./src/loader/fragment.ts"),l=T("./src/demux/transmuxer-interface.ts"),r=T("./src/types/transmuxer.ts"),i=T("./src/controller/gap-controller.ts"),t=T("./src/errors.ts"),a=T("./src/utils/logger.ts");function c(x,O){for(var C=0;C<O.length;C++){var w=O[C];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(x,w.key,w)}}function d(x,O,C){return O&&c(x.prototype,O),C&&c(x,C),x}function f(x,O){x.prototype=Object.create(O.prototype),x.prototype.constructor=x,h(x,O)}function h(x,O){return h=Object.setPrototypeOf||function(w,S){return w.__proto__=S,w},h(x,O)}var u=100,E=function(x){f(O,x);function O(w,S){var A;return A=x.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=O.prototype;return C._registerListeners=function(){var S=this.hls;S.on(_.Events.MEDIA_ATTACHED,this.onMediaAttached,this),S.on(_.Events.MEDIA_DETACHING,this.onMediaDetaching,this),S.on(_.Events.MANIFEST_LOADING,this.onManifestLoading,this),S.on(_.Events.MANIFEST_PARSED,this.onManifestParsed,this),S.on(_.Events.LEVEL_LOADING,this.onLevelLoading,this),S.on(_.Events.LEVEL_LOADED,this.onLevelLoaded,this),S.on(_.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),S.on(_.Events.ERROR,this.onError,this),S.on(_.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),S.on(_.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),S.on(_.Events.BUFFER_CREATED,this.onBufferCreated,this),S.on(_.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),S.on(_.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),S.on(_.Events.FRAG_BUFFERED,this.onFragBuffered,this)},C._unregisterListeners=function(){var S=this.hls;S.off(_.Events.MEDIA_ATTACHED,this.onMediaAttached,this),S.off(_.Events.MEDIA_DETACHING,this.onMediaDetaching,this),S.off(_.Events.MANIFEST_LOADING,this.onManifestLoading,this),S.off(_.Events.MANIFEST_PARSED,this.onManifestParsed,this),S.off(_.Events.LEVEL_LOADED,this.onLevelLoaded,this),S.off(_.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),S.off(_.Events.ERROR,this.onError,this),S.off(_.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),S.off(_.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),S.off(_.Events.BUFFER_CREATED,this.onBufferCreated,this),S.off(_.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),S.off(_.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),S.off(_.Events.FRAG_BUFFERED,this.onFragBuffered,this)},C.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},C.startLoad=function(S){if(this.levels){var A=this.lastCurrentTime,D=this.hls;if(this.stopLoad(),this.setInterval(u),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var M=D.startLevel;M===-1&&(D.config.testBandwidth?(M=0,this.bitrateTest=!0):M=D.nextAutoLevel),this.level=D.nextLoadLevel=M,this.loadedmetadata=!1}A>0&&S===-1&&(this.log("Override startPosition with lastCurrentTime @"+A.toFixed(3)),S=A),this.state=g.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=S,this.tick()}else this._forceStartLoad=!0,this.state=g.State.STOPPED},C.stopLoad=function(){this._forceStartLoad=!1,x.prototype.stopLoad.call(this)},C.doTick=function(){switch(this.state){case g.State.IDLE:this.doTickIdle();break;case g.State.WAITING_LEVEL:{var S,A=this.levels,D=this.level,M=A==null||((S=A[D])===null||S===void 0)?void 0:S.details;if(M&&(!M.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(M))break;this.state=g.State.IDLE;break}break}case g.State.FRAG_LOADING_WAITING_RETRY:{var N,P=self.performance.now(),z=this.retryDate;(!z||P>=z||(N=this.media)!==null&&N!==void 0&&N.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=g.State.IDLE)}break;default:break}this.onTickEnd()},C.onTickEnd=function(){x.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},C.doTickIdle=function(){var S,A,D=this.hls,M=this.levelLastLoaded,N=this.levels,P=this.media,z=D.config,X=D.nextLoadLevel;if(M===null||!P&&(this.startFragRequested||!z.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!N||!N[X])return;var k=N[X];this.level=D.nextLoadLevel=X;var F=k.details;if(!F||this.state===g.State.WAITING_LEVEL||F.live&&this.levelLastLoaded!==X){this.state=g.State.WAITING_LEVEL;return}var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:P,o.PlaylistLevelType.MAIN);if(U===null)return;var L=U.len,B=this.getMaxBufferLength(k.maxBitrate);if(L>=B)return;if(this._streamEnded(U,F)){var Z={};this.altAudio&&(Z.type="video"),this.hls.trigger(_.Events.BUFFER_EOS,Z),this.state=g.State.ENDED;return}var re=U.end,he=this.getNextFragment(re,F);if(this.couldBacktrack&&!this.fragPrevious&&he&&he.sn!=="initSegment"){var Ce=he.sn-F.startSN;Ce>1&&(he=F.fragments[Ce-1],this.fragmentTracker.removeFragment(he))}if(he&&this.fragmentTracker.getState(he)===e.FragmentState.OK&&this.nextLoadPosition>re){var ke=this.audioOnly&&!this.altAudio?n.ElementaryStreamTypes.AUDIO:n.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(P,ke,o.PlaylistLevelType.MAIN),he=this.getNextFragment(this.nextLoadPosition,F)}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,F):this.loadFragment(he,F,re)},C.loadFragment=function(S,A,D){var M,N=this.fragmentTracker.getState(S);if(this.fragCurrent=S,N===e.FragmentState.BACKTRACKED){var P=this.fragmentTracker.getBacktrackData(S);if(P){this._handleFragmentLoadProgress(P),this._handleFragmentLoadComplete(P);return}else N=e.FragmentState.NOT_LOADED}N===e.FragmentState.NOT_LOADED||N===e.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,x.prototype.loadFragment.call(this,S,A,D)):N===e.FragmentState.APPENDING?this.reduceMaxBufferLength(S.duration)&&this.fragmentTracker.removeFragment(S):((M=this.media)===null||M===void 0?void 0:M.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},C.getAppendedFrag=function(S){var A=this.fragmentTracker.getAppendedFrag(S,o.PlaylistLevelType.MAIN);return A&&"fragment"in A?A.fragment:A},C.getBufferedFrag=function(S){return this.fragmentTracker.getBufferedFrag(S,o.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 D,M=this.getAppendedFrag(A.currentTime);if(M&&M.start>1&&this.flushMainBuffer(0,M.start-1),!A.paused&&S){var N=this.hls.nextLoadLevel,P=S[N],z=this.fragLastKbps;z&&this.fragCurrent?D=this.fragCurrent.duration*P.maxBitrate/(1e3*z)+1:D=0}else D=0;var X=this.getBufferedFrag(A.currentTime+D);if(X){var k=this.followingBufferedFrag(X);if(k){this.abortCurrentFrag();var F=k.maxStartPTS?k.maxStartPTS:k.start,U=k.duration,L=Math.max(X.end,F+Math.min(Math.max(U-this.config.maxFragLookUpTolerance,U*.5),U*.75));this.flushMainBuffer(L,Number.POSITIVE_INFINITY)}}}},C.abortCurrentFrag=function(){var S=this.fragCurrent;this.fragCurrent=null,S!=null&&S.loader&&S.loader.abort(),this.state===g.State.KEY_LOADING&&(this.state=g.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},C.flushMainBuffer=function(S,A){x.prototype.flushMainBuffer.call(this,S,A,this.altAudio?"video":null)},C.onMediaAttached=function(S,A){x.prototype.onMediaAttached.call(this,S,A);var D=A.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),D.addEventListener("playing",this.onvplaying),D.addEventListener("seeked",this.onvseeked),this.gapController=new i.default(this.config,D,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),x.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(_.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 D=!1,M=!1,N;A.levels.forEach(function(P){N=P.audioCodec,N&&(N.indexOf("mp4a.40.2")!==-1&&(D=!0),N.indexOf("mp4a.40.5")!==-1&&(M=!0))}),this.audioCodecSwitch=D&&M&&!Object(s.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 D=this.levels;if(!D||this.state!==g.State.IDLE)return;var M=D[A.level];(!M.details||M.details.live&&this.levelLastLoaded!==A.level||this.waitForCdnTuneIn(M.details))&&(this.state=g.State.WAITING_LEVEL)},C.onLevelLoaded=function(S,A){var D,M=this.levels,N=A.level,P=A.details,z=P.totalduration;if(!M){this.warn("Levels were reset while loading level "+N);return}this.log("Level "+N+" loaded ["+P.startSN+","+P.endSN+"], cc ["+P.startCC+", "+P.endCC+"] duration:"+z);var X=this.fragCurrent;X&&(this.state===g.State.FRAG_LOADING||this.state===g.State.FRAG_LOADING_WAITING_RETRY)&&(X.level!==A.level&&X.loader&&(this.state=g.State.IDLE,X.loader.abort()));var k=M[N],F=0;if(P.live||(D=k.details)!==null&&D!==void 0&&D.live){if(P.fragments[0]||(P.deltaUpdateFailed=!0),P.deltaUpdateFailed)return;F=this.alignPlaylists(P,k.details)}if(k.details=P,this.levelLastLoaded=N,this.hls.trigger(_.Events.LEVEL_UPDATED,{details:P,level:N}),this.state===g.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(P))return;this.state=g.State.IDLE}this.startFragRequested?P.live&&this.synchronizeToLiveEdge(P):this.setStartPosition(P,F),this.tick()},C._handleFragmentLoadProgress=function(S){var A,D=S.frag,M=S.part,N=S.payload,P=this.levels;if(!P){this.warn("Levels were reset while fragment load was in progress. Fragment "+D.sn+" of level "+D.level+" will not be buffered");return}var z=P[D.level],X=z.details;if(!X){this.warn("Dropping fragment "+D.sn+" of level "+D.level+" after level details were reset");return}var k=z.videoCodec,F=X.PTSKnown||!X.live,U=(A=D.initSegment)===null||A===void 0?void 0:A.data,L=this._getAudioCodec(z),B=this.transmuxer=this.transmuxer||new l.default(this.hls,o.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),Z=M?M.index:-1,re=Z!==-1,he=new r.ChunkMetadata(D.level,D.sn,D.stats.chunkCount,N.byteLength,Z,re),Ce=this.initPTS[D.cc];B.push(N,U,L,k,D,M,X.totalduration,F,he,Ce)},C.onAudioTrackSwitching=function(S,A){var D=this.altAudio,M=!!A.url,N=A.id;if(!M){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var P=this.fragCurrent;P!=null&&P.loader&&(this.log("Switching to main audio track, cancel main fragment load"),P.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var z=this.hls;D&&z.trigger(_.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),z.trigger(_.Events.AUDIO_TRACK_SWITCHED,{id:N})}},C.onAudioTrackSwitched=function(S,A){var D=A.id,M=!!this.hls.audioTracks[D].url;if(M){var N=this.videoBuffer;N&&this.mediaBuffer!==N&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=N)}this.altAudio=M,this.tick()},C.onBufferCreated=function(S,A){var D=A.tracks,M,N,P=!1;for(var z in D){var X=D[z];if(X.id==="main"){if(N=z,M=X,z==="video"){var k=D[z];k&&(this.videoBuffer=k.buffer)}}else P=!0}P&&M?(this.log("Alternate track found, use "+N+".buffered to schedule main fragment loading"),this.mediaBuffer=M.buffer):this.mediaBuffer=this.media},C.onFragBuffered=function(S,A){var D=A.frag,M=A.part;if(D&&D.type!==o.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(D)){this.warn("Fragment "+D.sn+(M?" p: "+M.index:"")+" of level "+D.level+" finished buffering, but was aborted. state: "+this.state),this.state===g.State.PARSED&&(this.state=g.State.IDLE);return}var N=M?M.stats:D.stats;this.fragLastKbps=Math.round(8*N.total/(N.buffering.end-N.loading.first)),D.sn!=="initSegment"&&(this.fragPrevious=D),this.fragBufferedComplete(D,M)},C.onError=function(S,A){switch(A.details){case t.ErrorDetails.FRAG_LOAD_ERROR:case t.ErrorDetails.FRAG_LOAD_TIMEOUT:case t.ErrorDetails.KEY_LOAD_ERROR:case t.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(o.PlaylistLevelType.MAIN,A);break;case t.ErrorDetails.LEVEL_LOAD_ERROR:case t.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==g.State.ERROR&&(A.fatal?(this.warn(""+A.details),this.state=g.State.ERROR):!A.levelRetry&&this.state===g.State.WAITING_LEVEL&&(this.state=g.State.IDLE));break;case t.ErrorDetails.BUFFER_FULL_ERROR:if(A.parent==="main"&&(this.state===g.State.PARSING||this.state===g.State.PARSED)){var D=!0,M=this.getFwdBufferInfo(this.media,o.PlaylistLevelType.MAIN);M&&M.len>.5&&(D=!this.reduceMaxBufferLength(M.len)),D&&(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 D=p.BufferHelper.getBuffered(S);!this.loadedmetadata&&D.length?(this.loadedmetadata=!0,this.seekToStartPos()):A.poll(this.lastCurrentTime),this.lastCurrentTime=S.currentTime},C.onFragLoadEmergencyAborted=function(){this.state=g.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},C.onBufferFlushed=function(S,A){var D=A.type;if(D!==n.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var M=(D===n.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(M,D,o.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,D=this.startPosition;if(D>=0&&A<D){if(S.seeking){a.logger.log("could not seek to "+D+", already seeking at "+A);return}var M=p.BufferHelper.getBuffered(S),N=M.length?M.start(0):0,P=N-D;P>0&&(P<this.config.maxBufferHole||P<this.config.maxFragLookUpTolerance)&&(a.logger.log("adjusting start position by "+P+" to match buffer start"),D+=P,this.startPosition=D),this.log("seek to target start position "+D+" from current time "+A),S.currentTime=D}},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(D){var M=A.hls;if(!D||M.nextLoadLevel||A.fragContextChanged(S))return;A.fragLoadError=0,A.state=g.State.IDLE,A.startFragRequested=!1,A.bitrateTest=!1;var N=S.stats;N.parsing.start=N.parsing.end=N.buffering.start=N.buffering.end=self.performance.now(),M.trigger(_.Events.FRAG_LOADED,D)})},C._handleTransmuxComplete=function(S){var A,D="main",M=this.hls,N=S.remuxResult,P=S.chunkMeta,z=this.getCurrentContext(P);if(!z){this.warn("The loading context changed while buffering fragment "+P.sn+" of level "+P.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(P.level);return}var X=z.frag,k=z.part,F=z.level,U=N.video,L=N.text,B=N.id3,Z=N.initSegment,re=this.altAudio?void 0:N.audio;if(this.fragContextChanged(X))return;if(this.state=g.State.PARSING,Z){Z.tracks&&(this._bufferInitSegment(F,Z.tracks,X,P),M.trigger(_.Events.FRAG_PARSING_INIT_SEGMENT,{frag:X,id:D,tracks:Z.tracks}));var he=Z.initPTS,Ce=Z.timescale;Object(y.isFiniteNumber)(he)&&(this.initPTS[X.cc]=he,M.trigger(_.Events.INIT_PTS_FOUND,{frag:X,id:D,initPTS:he,timescale:Ce}))}if(U&&N.independent!==!1){if(F.details){var ke=U.startPTS,te=U.endPTS,Re=U.startDTS,Te=U.endDTS;if(k)k.elementaryStreams[U.type]={startPTS:ke,endPTS:te,startDTS:Re,endDTS:Te};else if(U.firstKeyFrame&&U.independent&&(this.couldBacktrack=!0),U.dropped&&U.independent){var pe=this.getLoadPosition()+this.config.maxBufferHole;if(pe<ke){this.backtrack(X);return}X.setElementaryStreamInfo(U.type,X.start,te,X.start,Te,!0)}X.setElementaryStreamInfo(U.type,ke,te,Re,Te),this.bufferFragmentData(U,X,k,P)}}else if(N.independent===!1){this.backtrack(X);return}if(re){var me=re.startPTS,se=re.endPTS,be=re.startDTS,ae=re.endDTS;k&&(k.elementaryStreams[n.ElementaryStreamTypes.AUDIO]={startPTS:me,endPTS:se,startDTS:be,endDTS:ae}),X.setElementaryStreamInfo(n.ElementaryStreamTypes.AUDIO,me,se,be,ae),this.bufferFragmentData(re,X,k,P)}if(B!=null&&(A=B.samples)!==null&&A!==void 0&&A.length){var fe={frag:X,id:D,samples:B.samples};M.trigger(_.Events.FRAG_PARSING_METADATA,fe)}if(L){var Fe={frag:X,id:D,samples:L.samples};M.trigger(_.Events.FRAG_PARSING_USERDATA,Fe)}},C._bufferInitSegment=function(S,A,D,M){var N=this;if(this.state!==g.State.PARSING)return;this.audioOnly=!!A.audio&&!A.video,this.altAudio&&!this.audioOnly&&delete A.audio;var P=A.audio,z=A.video,X=A.audiovideo;if(P){var k=S.audioCodec,F=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(k&&(k.indexOf("mp4a.40.5")!==-1?k="mp4a.40.2":k="mp4a.40.5"),P.metadata.channelCount!==1&&F.indexOf("firefox")===-1&&(k="mp4a.40.5")),F.indexOf("android")!==-1&&P.container!=="audio/mpeg"&&(k="mp4a.40.2",this.log("Android: force audio codec to "+k)),S.audioCodec&&S.audioCodec!==k&&this.log('Swapping manifest audio codec "'+S.audioCodec+'" for "'+k+'"'),P.levelCodec=k,P.id="main",this.log("Init audio buffer, container:"+P.container+", codecs[selected/level/parsed]=["+(k||"")+"/"+(S.audioCodec||"")+"/"+P.codec+"]")}z&&(z.levelCodec=S.videoCodec,z.id="main",this.log("Init video buffer, container:"+z.container+", codecs[level/parsed]=["+(S.videoCodec||"")+"/"+z.codec+"]")),X&&this.log("Init audiovideo buffer, container:"+X.container+", codecs[level/parsed]=["+(S.attrs.CODECS||"")+"/"+X.codec+"]"),this.hls.trigger(_.Events.BUFFER_CODECS,A),Object.keys(A).forEach(function(U){var L=A[U],B=L.initSegment;B!=null&&B.byteLength&&N.hls.trigger(_.Events.BUFFER_APPENDING,{type:U,data:B,frag:D,part:null,chunkMeta:M,parent:D.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=g.State.BACKTRACKING},C.checkFragmentChanged=function(){var S=this.media,A=null;if(S&&S.readyState>1&&S.seeking===!1){var D=S.currentTime;if(p.BufferHelper.isBuffered(S,D)?A=this.getAppendedFrag(D):p.BufferHelper.isBuffered(S,D+.1)&&(A=this.getAppendedFrag(D+.1)),A){var M=this.fragPlaying,N=A.level;(!M||A.sn!==M.sn||M.level!==N||A.urlId!==M.urlId)&&(this.hls.trigger(_.Events.FRAG_CHANGED,{frag:A}),(!M||M.level!==N)&&this.hls.trigger(_.Events.LEVEL_SWITCHED,{level:N}),this.fragPlaying=A)}}},d(O,[{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}}]),O}(g.default)},"./src/controller/subtitle-stream-controller.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"SubtitleStreamController",function(){return f});var y=T("./src/events.ts"),g=T("./src/utils/logger.ts"),s=T("./src/utils/buffer-helper.ts"),_=T("./src/controller/fragment-finders.ts"),p=T("./src/utils/discontinuities.ts"),e=T("./src/controller/level-helper.ts"),o=T("./src/controller/fragment-tracker.ts"),n=T("./src/controller/base-stream-controller.ts"),l=T("./src/types/loader.ts"),r=T("./src/types/level.ts");function i(h,u){for(var E=0;E<u.length;E++){var x=u[E];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(h,x.key,x)}}function t(h,u,E){return u&&i(h.prototype,u),E&&i(h,E),h}function a(h,u){h.prototype=Object.create(u.prototype),h.prototype.constructor=h,c(h,u)}function c(h,u){return c=Object.setPrototypeOf||function(x,O){return x.__proto__=O,x},c(h,u)}var d=500,f=function(h){a(u,h);function u(x,O){var C;return C=h.call(this,x,O,"[subtitle-stream-controller]")||this,C.levels=[],C.currentTrackId=-1,C.tracksBuffered=[],C.mainDetails=null,C._registerListeners(),C}var E=u.prototype;return E.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},E._registerListeners=function(){var O=this.hls;O.on(y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),O.on(y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),O.on(y.Events.MANIFEST_LOADING,this.onManifestLoading,this),O.on(y.Events.LEVEL_LOADED,this.onLevelLoaded,this),O.on(y.Events.ERROR,this.onError,this),O.on(y.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),O.on(y.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),O.on(y.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),O.on(y.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),O.on(y.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},E._unregisterListeners=function(){var O=this.hls;O.off(y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),O.off(y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),O.off(y.Events.MANIFEST_LOADING,this.onManifestLoading,this),O.off(y.Events.LEVEL_LOADED,this.onLevelLoaded,this),O.off(y.Events.ERROR,this.onError,this),O.off(y.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),O.off(y.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),O.off(y.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),O.off(y.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),O.off(y.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},E.startLoad=function(){this.stopLoad(),this.state=n.State.IDLE,this.setInterval(d),this.tick()},E.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},E.onLevelLoaded=function(O,C){this.mainDetails=C.details},E.onSubtitleFragProcessed=function(O,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 D,M=w.start,N=0;N<A.length;N++)if(M>=A[N].start&&M<=A[N].end){D=A[N];break}var P=w.start+w.duration;D?D.end=P:(D={start:M,end:P},A.push(D)),this.fragmentTracker.fragBuffered(w)},E.onBufferFlushing=function(O,C){var w=C.startOffset,S=C.endOffset;if(w===0&&S!==Number.POSITIVE_INFINITY){var A=this.currentTrackId,D=this.levels;if(!D.length||!D[A]||!D[A].details)return;var M=D[A].details,N=M.targetduration,P=S-N;if(P<=0)return;C.endOffsetSubtitles=Math.max(0,P),this.tracksBuffered.forEach(function(z){for(var X=0;X<z.length;){if(z[X].end<=P){z.shift();continue}else if(z[X].start<P)z[X].start=P;else break;X++}}),this.fragmentTracker.removeFragmentsInRange(w,P,l.PlaylistLevelType.SUBTITLE)}},E.onError=function(O,C){var w,S=C.frag;if(!S||S.type!==l.PlaylistLevelType.SUBTITLE)return;(w=this.fragCurrent)!==null&&w!==void 0&&w.loader&&this.fragCurrent.loader.abort(),this.state=n.State.IDLE},E.onSubtitleTracksUpdated=function(O,C){var w=this,S=C.subtitleTracks;this.tracksBuffered=[],this.levels=S.map(function(A){return new r.Level(A)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(A){w.tracksBuffered[A.id]=[]}),this.mediaBuffer=null},E.onSubtitleTrackSwitch=function(O,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(d)},E.onSubtitleTrackLoaded=function(O,C){var w,S=C.details,A=C.id,D=this.currentTrackId,M=this.levels;if(!M.length)return;var N=M[D];if(A>=M.length||A!==D||!N)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,S.live||(w=N.details)!==null&&w!==void 0&&w.live){var P=this.mainDetails;if(S.deltaUpdateFailed||!P)return;var z=P.fragments[0];if(!N.details)S.hasProgramDateTime&&P.hasProgramDateTime?Object(p.alignMediaPlaylistByPDT)(S,P):z&&Object(e.addSliding)(S,z.start);else{var X=this.alignPlaylists(S,N.details);X===0&&z&&Object(e.addSliding)(S,z.start)}}if(N.details=S,this.levelLastLoaded=A,this.tick(),S.live&&!this.fragCurrent&&this.media&&this.state===n.State.IDLE){var k=Object(_.findFragmentByPTS)(null,S.fragments,this.media.currentTime,0);k||(this.warn("Subtitle playlist not aligned with playback"),N.details=void 0)}},E._handleFragmentLoadComplete=function(O){var C=O.frag,w=O.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 D=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(w),S.key.buffer,S.iv.buffer).then(function(M){var N=performance.now();A.trigger(y.Events.FRAG_DECRYPTED,{frag:C,payload:M,stats:{tstart:D,tdecrypt:N}})})}},E.doTick=function(){if(!this.media){this.state=n.State.IDLE;return}if(this.state===n.State.IDLE){var O,C=this.currentTrackId,w=this.levels;if(!w.length||!w[C]||!w[C].details)return;var S=w[C].details,A=S.targetduration,D=this.config,M=this.media,N=s.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,M.currentTime-A,D.maxBufferHole),P=N.end,z=N.len,X=this.getMaxBufferLength()+A;if(z>X)return;console.assert(S,"Subtitle track details are defined on idle subtitle stream controller tick");var k=S.fragments,F=k.length,U=S.edge,L,B=this.fragPrevious;if(P<U){var Z=D.maxFragLookUpTolerance;B&&S.hasProgramDateTime&&(L=Object(_.findFragmentByPDT)(k,B.endProgramDateTime,Z)),L||(L=Object(_.findFragmentByPTS)(B,k,P,Z),!L&&B&&B.start<k[0].start&&(L=k[0]))}else L=k[F-1];(O=L)!==null&&O!==void 0&&O.encrypted?(g.logger.log("Loading key for "+L.sn),this.state=n.State.KEY_LOADING,this.hls.trigger(y.Events.KEY_LOADING,{frag:L})):L&&this.fragmentTracker.getState(L)===o.FragmentState.NOT_LOADED&&this.loadFragment(L,S,P)}},E.loadFragment=function(O,C,w){this.fragCurrent=O,h.prototype.loadFragment.call(this,O,C,w)},t(u,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),u}(n.default)},"./src/controller/subtitle-track-controller.ts":function(I,v,T){"use strict";T.r(v);var y=T("./src/events.ts"),g=T("./src/utils/texttrack-utils.ts"),s=T("./src/controller/base-playlist-controller.ts"),_=T("./src/types/loader.ts");function p(i,t){for(var a=0;a<t.length;a++){var c=t[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(i,c.key,c)}}function e(i,t,a){return t&&p(i.prototype,t),a&&p(i,a),i}function o(i,t){i.prototype=Object.create(t.prototype),i.prototype.constructor=i,n(i,t)}function n(i,t){return n=Object.setPrototypeOf||function(c,d){return c.__proto__=d,c},n(i,t)}var l=function(i){o(t,i);function t(c){var d;return d=i.call(this,c,"[subtitle-track-controller]")||this,d.media=null,d.tracks=[],d.groupId=null,d.tracksInGroup=[],d.trackId=-1,d.selectDefaultTrack=!0,d.queuedDefaultTrack=-1,d.trackChangeListener=function(){return d.onTextTracksChanged()},d.asyncPollTrackChange=function(){return d.pollTrackChange(0)},d.useTextTrackPolling=!1,d.subtitlePollingInterval=-1,d.subtitleDisplay=!0,d.registerListeners(),d}var a=t.prototype;return a.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,i.prototype.destroy.call(this)},a.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.MANIFEST_PARSED,this.onManifestParsed,this),d.on(y.Events.LEVEL_LOADING,this.onLevelLoading,this),d.on(y.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),d.on(y.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),d.on(y.Events.ERROR,this.onError,this)},a.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.MANIFEST_PARSED,this.onManifestParsed,this),d.off(y.Events.LEVEL_LOADING,this.onLevelLoading,this),d.off(y.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),d.off(y.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),d.off(y.Events.ERROR,this.onError,this)},a.onMediaAttached=function(d,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)},a.pollTrackChange=function(d){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,d)},a.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 d=r(this.media.textTracks);d.forEach(function(f){Object(g.clearCurrentCues)(f)}),this.subtitleTrack=-1,this.media=null},a.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},a.onManifestParsed=function(d,f){this.tracks=f.subtitleTracks},a.onSubtitleTrackLoaded=function(d,f){var h=f.id,u=f.details,E=this.trackId,x=this.tracksInGroup[E];if(!x){this.warn("Invalid subtitle track id "+h);return}var O=x.details;x.details=f.details,this.log("subtitle track "+h+" loaded ["+u.startSN+"-"+u.endSN+"]"),h===this.trackId&&(this.retryCount=0,this.playlistLoaded(h,f,O))},a.onLevelLoading=function(d,f){this.switchLevel(f.level)},a.onLevelSwitching=function(d,f){this.switchLevel(f.level)},a.switchLevel=function(d){var f=this.hls.levels[d];if(!(f!=null&&f.textGroupIds))return;var h=f.textGroupIds[f.urlId];if(this.groupId!==h){var u=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,E=this.tracks.filter(function(C){return!h||C.groupId===h});this.tracksInGroup=E;var x=this.findTrackId(u==null?void 0:u.name)||this.findTrackId();this.groupId=h;var O={subtitleTracks:E};this.log("Updating subtitle tracks, "+E.length+' track(s) found in "'+h+'" group-id'),this.hls.trigger(y.Events.SUBTITLE_TRACKS_UPDATED,O),x!==-1&&this.setSubtitleTrack(x,u)}},a.findTrackId=function(d){for(var f=this.tracksInGroup,h=0;h<f.length;h++){var u=f[h];if((!this.selectDefaultTrack||u.default)&&(!d||d===u.name))return u.id}return-1},a.onError=function(d,f){if(i.prototype.onError.call(this,d,f),f.fatal||!f.context)return;f.context.type===_.PlaylistContextType.SUBTITLE_TRACK&&f.context.id===this.trackId&&f.context.groupId===this.groupId&&this.retryLoadingOrFail(f)},a.loadPlaylist=function(d){var f=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(f)){var h=f.id,u=f.groupId,E=f.url;if(d)try{E=d.addDirectives(E)}catch(x){this.warn("Could not construct new URL with HLS Delivery Directives: "+x)}this.log("Loading subtitle playlist for id "+h),this.hls.trigger(y.Events.SUBTITLE_TRACK_LOADING,{url:E,id:h,groupId:u,deliveryDirectives:d||null})}},a.toggleTrackModes=function(d){var f=this,h=this.media,u=this.subtitleDisplay,E=this.trackId;if(!h)return;var x=r(h.textTracks),O=x.filter(function(S){return S.groupId===f.groupId});if(d===-1)[].slice.call(x).forEach(function(S){S.mode="disabled"});else{var C=O[E];C&&(C.mode="disabled")}var w=O[d];w&&(w.mode=u?"showing":"hidden")},a.setSubtitleTrack=function(d,f){var h,u=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=d;return}if(this.trackId!==d&&this.toggleTrackModes(d),this.trackId===d&&(d===-1||(h=u[d])!==null&&h!==void 0&&h.details)||d<-1||d>=u.length)return;this.clearTimer();var E=u[d];if(this.log("Switching to subtitle track "+d),this.trackId=d,E){var x=E.id,O=E.groupId,C=O===void 0?"":O,w=E.name,S=E.type,A=E.url;this.hls.trigger(y.Events.SUBTITLE_TRACK_SWITCH,{id:x,groupId:C,name:w,type:S,url:A});var D=this.switchParams(E.url,f==null?void 0:f.details);this.loadPlaylist(D)}else this.hls.trigger(y.Events.SUBTITLE_TRACK_SWITCH,{id:d})},a.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var d=-1,f=r(this.media.textTracks),h=0;h<f.length;h++)if(f[h].mode==="hidden")d=h;else if(f[h].mode==="showing"){d=h;break}this.subtitleTrack!==d&&(this.subtitleTrack=d)},e(t,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(d){this.selectDefaultTrack=!1;var f=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(d,f)}}]),t}(s.default);function r(i){for(var t=[],a=0;a<i.length;a++){var c=i[a];c.kind==="subtitles"&&c.label&&t.push(i[a])}return t}v.default=l},"./src/controller/timeline-controller.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"TimelineController",function(){return r});var y=T("./src/polyfills/number.ts"),g=T("./src/events.ts"),s=T("./src/utils/cea-608-parser.ts"),_=T("./src/utils/output-filter.ts"),p=T("./src/utils/webvtt-parser.ts"),e=T("./src/utils/texttrack-utils.ts"),o=T("./src/utils/imsc1-ttml-parser.ts"),n=T("./src/types/loader.ts"),l=T("./src/utils/logger.ts"),r=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=a(),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 h=new _.default(this,"textTrack1"),u=new _.default(this,"textTrack2"),E=new _.default(this,"textTrack3"),x=new _.default(this,"textTrack4");this.cea608Parser1=new s.default(1,h,u),this.cea608Parser2=new s.default(3,E,x)}f.on(g.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),f.on(g.Events.MEDIA_DETACHING,this.onMediaDetaching,this),f.on(g.Events.MANIFEST_LOADING,this.onManifestLoading,this),f.on(g.Events.MANIFEST_LOADED,this.onManifestLoaded,this),f.on(g.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),f.on(g.Events.FRAG_LOADING,this.onFragLoading,this),f.on(g.Events.FRAG_LOADED,this.onFragLoaded,this),f.on(g.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),f.on(g.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),f.on(g.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),f.on(g.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),f.on(g.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var d=c.prototype;return d.destroy=function(){var h=this.hls;h.off(g.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),h.off(g.Events.MEDIA_DETACHING,this.onMediaDetaching,this),h.off(g.Events.MANIFEST_LOADING,this.onManifestLoading,this),h.off(g.Events.MANIFEST_LOADED,this.onManifestLoaded,this),h.off(g.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),h.off(g.Events.FRAG_LOADING,this.onFragLoading,this),h.off(g.Events.FRAG_LOADED,this.onFragLoaded,this),h.off(g.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),h.off(g.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),h.off(g.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),h.off(g.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),h.off(g.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},d.addCues=function(h,u,E,x,O){for(var C=!1,w=O.length;w--;){var S=O[w],A=t(S[0],S[1],u,E);if(A>=0&&(S[0]=Math.min(S[0],u),S[1]=Math.max(S[1],E),C=!0,A/(E-u)>.5))return}if(C||O.push([u,E]),this.config.renderTextTracksNatively){var D=this.captionsTracks[h];this.Cues.newCue(D,u,E,x)}else{var M=this.Cues.newCue(null,u,E,x);this.hls.trigger(g.Events.CUES_PARSED,{type:"captions",cues:M,track:h})}},d.onInitPtsFound=function(h,u){var E=this,x=u.frag,O=u.id,C=u.initPTS,w=u.timescale,S=this.unparsedVttFrags;O==="main"&&(this.initPTS[x.cc]=C,this.timescale[x.cc]=w),S.length&&(this.unparsedVttFrags=[],S.forEach(function(A){E.onFragLoaded(g.Events.FRAG_LOADED,A)}))},d.getExistingTrack=function(h){var u=this.media;if(u)for(var E=0;E<u.textTracks.length;E++){var x=u.textTracks[E];if(x[h])return x}return null},d.createCaptionsTrack=function(h){this.config.renderTextTracksNatively?this.createNativeTrack(h):this.createNonNativeTrack(h)},d.createNativeTrack=function(h){if(this.captionsTracks[h])return;var u=this.captionsProperties,E=this.captionsTracks,x=this.media,O=u[h],C=O.label,w=O.languageCode,S=this.getExistingTrack(h);if(S)E[h]=S,Object(e.clearCurrentCues)(E[h]),Object(e.sendAddTrackEvent)(E[h],x);else{var A=this.createTextTrack("captions",C,w);A&&(A[h]=!0,E[h]=A)}},d.createNonNativeTrack=function(h){if(this.nonNativeCaptionsTracks[h])return;var u=this.captionsProperties[h];if(!u)return;var E=u.label,x={_id:h,label:E,kind:"captions",default:u.media?!!u.media.default:!1,closedCaptions:u.media};this.nonNativeCaptionsTracks[h]=x,this.hls.trigger(g.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[x]})},d.createTextTrack=function(h,u,E){var x=this.media;return x?x.addTextTrack(h,u,E):void 0},d.onMediaAttaching=function(h,u){this.media=u.media,this._cleanTracks()},d.onMediaDetaching=function(){var h=this.captionsTracks;Object.keys(h).forEach(function(u){Object(e.clearCurrentCues)(h[u]),delete h[u]}),this.nonNativeCaptionsTracks={}},d.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=a(),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())},d._cleanTracks=function(){var h=this.media;if(!h)return;var u=h.textTracks;if(u)for(var E=0;E<u.length;E++)Object(e.clearCurrentCues)(u[E])},d.onSubtitleTracksUpdated=function(h,u){var E=this;this.textTracks=[];var x=u.subtitleTracks||[],O=x.some(function(A){return A.textCodec===o.IMSC1_CODEC});if(this.config.enableWebVTT||O&&this.config.enableIMSC1){var C=this.tracks&&x&&this.tracks.length===x.length;if(this.tracks=x||[],this.config.renderTextTracksNatively){var w=this.media?this.media.textTracks:[];this.tracks.forEach(function(A,D){var M;if(D<w.length){for(var N=null,P=0;P<w.length;P++)if(i(w[P],A)){N=w[P];break}N&&(M=N)}M?Object(e.clearCurrentCues)(M):(M=E.createTextTrack("subtitles",A.name,A.lang),M&&(M.mode="disabled")),M&&(M.groupId=A.groupId,E.textTracks.push(M))})}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(g.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:S})}}},d.onManifestLoaded=function(h,u){var E=this;this.config.enableCEA708Captions&&u.captions&&u.captions.forEach(function(x){var O=/(?:CC|SERVICE)([1-4])/.exec(x.instreamId);if(!O)return;var C="textTrack"+O[1],w=E.captionsProperties[C];if(!w)return;w.label=x.name,x.lang&&(w.languageCode=x.lang),w.media=x})},d.onFragLoading=function(h,u){var E=this.cea608Parser1,x=this.cea608Parser2,O=this.lastSn,C=this.lastPartIndex;if(!this.enabled||!(E&&x))return;if(u.frag.type===n.PlaylistLevelType.MAIN){var w,S,A=u.frag.sn,D=(w=u==null||((S=u.part)===null||S===void 0)?void 0:S.index)!=null?w:-1;A===O+1||A===O&&D===C+1||(E.reset(),x.reset()),this.lastSn=A,this.lastPartIndex=D}},d.onFragLoaded=function(h,u){var E=u.frag,x=u.payload,O=this.initPTS,C=this.unparsedVttFrags;if(E.type===n.PlaylistLevelType.SUBTITLE)if(x.byteLength){if(!Object(y.isFiniteNumber)(O[E.cc])){C.push(u),O.length&&this.hls.trigger(g.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===o.IMSC1_CODEC?this._parseIMSC1(E,x):this._parseVTTs(E,x,A)}}else this.hls.trigger(g.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:E,error:new Error("Empty subtitle payload")})},d._parseIMSC1=function(h,u){var E=this,x=this.hls;Object(o.parseIMSC1)(u,this.initPTS[h.cc],this.timescale[h.cc],function(O){E._appendCues(O,h.level),x.trigger(g.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:h})},function(O){l.logger.log("Failed to parse IMSC1: "+O),x.trigger(g.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:h,error:O})})},d._parseVTTs=function(h,u,E){var x=this,O=this.hls;Object(p.parseWebVTT)(u,this.initPTS[h.cc],this.timescale[h.cc],E,h.cc,h.start,function(C){x._appendCues(C,h.level),O.trigger(g.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:h})},function(C){x._fallbackToIMSC1(h,u),l.logger.log("Failed to parse VTT cue: "+C),O.trigger(g.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:h,error:C})})},d._fallbackToIMSC1=function(h,u){var E=this,x=this.tracks[h.level];x.textCodec||Object(o.parseIMSC1)(u,this.initPTS[h.cc],this.timescale[h.cc],function(){x.textCodec=o.IMSC1_CODEC,E._parseIMSC1(h,u)},function(){x.textCodec="wvtt"})},d._appendCues=function(h,u){var E=this.hls;if(this.config.renderTextTracksNatively){var x=this.textTracks[u];if(x.mode==="disabled")return;h.forEach(function(w){return Object(e.addCueToTrack)(x,w)})}else{var O=this.tracks[u],C=O.default?"default":"subtitles"+u;E.trigger(g.Events.CUES_PARSED,{type:"subtitles",cues:h,track:C})}},d.onFragDecrypted=function(h,u){var E=u.frag;if(E.type===n.PlaylistLevelType.SUBTITLE){if(!Object(y.isFiniteNumber)(this.initPTS[E.cc])){this.unparsedVttFrags.push(u);return}this.onFragLoaded(g.Events.FRAG_LOADED,u)}},d.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},d.onFragParsingUserdata=function(h,u){var E=this.cea608Parser1,x=this.cea608Parser2;if(!this.enabled||!(E&&x))return;for(var O=0;O<u.samples.length;O++){var C=u.samples[O].bytes;if(C){var w=this.extractCea608Data(C);E.addData(u.samples[O].pts,w[0]),x.addData(u.samples[O].pts,w[1])}}},d.onBufferFlushing=function(h,u){var E=u.startOffset,x=u.endOffset,O=u.endOffsetSubtitles,C=u.type,w=this.media;if(!w||w.currentTime<x)return;if(!C||C==="video"){var S=this.captionsTracks;Object.keys(S).forEach(function(D){return Object(e.removeCuesInRange)(S[D],E,x)})}if(this.config.renderTextTracksNatively&&(E===0&&O!==void 0)){var A=this.textTracks;Object.keys(A).forEach(function(D){return Object(e.removeCuesInRange)(A[D],E,O)})}},d.extractCea608Data=function(h){for(var u=h[0]&31,E=2,x=[[],[]],O=0;O<u;O++){var C=h[E++],w=127&h[E++],S=127&h[E++],A=(4&C)!==0,D=3&C;if(w===0&&S===0)continue;A&&((D===0||D===1)&&(x[D].push(w),x[D].push(S)))}return x},c}();function i(c,d){return c&&c.label===d.name&&!(c.textTrack1||c.textTrack2)}function t(c,d,f,h){return Math.min(d,h)-Math.max(c,f)}function a(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"default",function(){return y});var y=function(){function g(_,p){this.subtle=void 0,this.aesIV=void 0,this.subtle=_,this.aesIV=p}var s=g.prototype;return s.decrypt=function(p,e){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},e,p)},g}()},"./src/crypt/aes-decryptor.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"removePadding",function(){return g}),T.d(v,"default",function(){return s});var y=T("./src/utils/typed-array.ts");function g(_){var p=_.byteLength,e=p&&new DataView(_.buffer).getUint8(p-1);return e?Object(y.sliceUint8)(_,0,p-e):_}var s=function(){function _(){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=_.prototype;return p.uint8ArrayToUint32Array_=function(o){for(var n=new DataView(o),l=new Uint32Array(4),r=0;r<4;r++)l[r]=n.getUint32(r*4);return l},p.initTable=function(){var o=this.sBox,n=this.invSBox,l=this.subMix,r=l[0],i=l[1],t=l[2],a=l[3],c=this.invSubMix,d=c[0],f=c[1],h=c[2],u=c[3],E=new Uint32Array(256),x=0,O=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=O^O<<1^O<<2^O<<3^O<<4;w=w>>>8^w&255^99,o[x]=w,n[w]=x;var S=E[x],A=E[S],D=E[A],M=E[w]*257^w*16843008;r[x]=M<<24|M>>>8,i[x]=M<<16|M>>>16,t[x]=M<<8|M>>>24,a[x]=M,M=D*16843009^A*65537^S*257^x*16843008,d[w]=M<<24|M>>>8,f[w]=M<<16|M>>>16,h[w]=M<<8|M>>>24,u[w]=M,x?(x=S^E[E[E[D^S]]],O^=E[E[O]]):x=O=1}},p.expandKey=function(o){for(var n=this.uint8ArrayToUint32Array_(o),l=!0,r=0;r<n.length&&l;)l=n[r]===this.key[r],r++;if(l)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 t=this.ksRows=(i+6+1)*4,a,c,d=this.keySchedule=new Uint32Array(t),f=this.invKeySchedule=new Uint32Array(t),h=this.sBox,u=this.rcon,E=this.invSubMix,x=E[0],O=E[1],C=E[2],w=E[3],S,A;for(a=0;a<t;a++){if(a<i){S=d[a]=n[a];continue}A=S,a%i===0?(A=A<<8|A>>>24,A=h[A>>>24]<<24|h[A>>>16&255]<<16|h[A>>>8&255]<<8|h[A&255],A^=u[a/i|0]<<24):i>6&&a%i===4&&(A=h[A>>>24]<<24|h[A>>>16&255]<<16|h[A>>>8&255]<<8|h[A&255]),d[a]=S=(d[a-i]^A)>>>0}for(c=0;c<t;c++)a=t-c,c&3?A=d[a]:A=d[a-4],c<4||a<=4?f[c]=A:f[c]=x[h[A>>>24]]^O[h[A>>>16&255]]^C[h[A>>>8&255]]^w[h[A&255]],f[c]=f[c]>>>0},p.networkToHostOrderSwap=function(o){return o<<24|(o&65280)<<8|(o&16711680)>>8|o>>>24},p.decrypt=function(o,n,l){for(var r=this.keySize+6,i=this.invKeySchedule,t=this.invSBox,a=this.invSubMix,c=a[0],d=a[1],f=a[2],h=a[3],u=this.uint8ArrayToUint32Array_(l),E=u[0],x=u[1],O=u[2],C=u[3],w=new Int32Array(o),S=new Int32Array(w.length),A,D,M,N,P,z,X,k,F,U,L,B,Z,re,he=this.networkToHostOrderSwap;n<w.length;){for(F=he(w[n]),U=he(w[n+1]),L=he(w[n+2]),B=he(w[n+3]),P=F^i[0],z=B^i[1],X=L^i[2],k=U^i[3],Z=4,re=1;re<r;re++)A=c[P>>>24]^d[z>>16&255]^f[X>>8&255]^h[k&255]^i[Z],D=c[z>>>24]^d[X>>16&255]^f[k>>8&255]^h[P&255]^i[Z+1],M=c[X>>>24]^d[k>>16&255]^f[P>>8&255]^h[z&255]^i[Z+2],N=c[k>>>24]^d[P>>16&255]^f[z>>8&255]^h[X&255]^i[Z+3],P=A,z=D,X=M,k=N,Z=Z+4;A=t[P>>>24]<<24^t[z>>16&255]<<16^t[X>>8&255]<<8^t[k&255]^i[Z],D=t[z>>>24]<<24^t[X>>16&255]<<16^t[k>>8&255]<<8^t[P&255]^i[Z+1],M=t[X>>>24]<<24^t[k>>16&255]<<16^t[P>>8&255]<<8^t[z&255]^i[Z+2],N=t[k>>>24]<<24^t[P>>16&255]<<16^t[z>>8&255]<<8^t[X&255]^i[Z+3],S[n]=he(A^E),S[n+1]=he(N^x),S[n+2]=he(M^O),S[n+3]=he(D^C),E=F,x=U,O=L,C=B,n=n+4}return S.buffer},_}()},"./src/crypt/decrypter.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"default",function(){return n});var y=T("./src/crypt/aes-crypto.ts"),g=T("./src/crypt/fast-aes-key.ts"),s=T("./src/crypt/aes-decryptor.ts"),_=T("./src/utils/logger.ts"),p=T("./src/utils/mp4-tools.ts"),e=T("./src/utils/typed-array.ts"),o=16,n=function(){function l(i,t,a){var c=a===void 0?{}:a,d=c.removePKCS7Padding,f=d===void 0?!0:d;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=t,this.removePKCS7Padding=f,f)try{var h=self.crypto;h&&(this.subtle=h.subtle||h.webkitSubtle)}catch(u){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var r=l.prototype;return r.destroy=function(){this.observer=null},r.isSync=function(){return this.config.enableSoftwareAES},r.flush=function(){var t=this.currentResult;if(!t){this.reset();return}var a=new Uint8Array(t);return this.reset(),this.removePKCS7Padding?Object(s.removePadding)(a):a},r.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},r.decrypt=function(t,a,c,d){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(t),a,c);var f=this.flush();f&&d(f.buffer)}else this.webCryptoDecrypt(new Uint8Array(t),a,c).then(d)},r.softwareDecrypt=function(t,a,c){var d=this.currentIV,f=this.currentResult,h=this.remainderData;this.logOnce("JS AES decrypt"),h&&(t=Object(p.appendUint8Array)(h,t),this.remainderData=null);var u=this.getValidChunk(t);if(!u.length)return null;d&&(c=d);var E=this.softwareDecrypter;E||(E=this.softwareDecrypter=new s.default),E.expandKey(a);var x=f;return this.currentResult=E.decrypt(u.buffer,0,c),this.currentIV=Object(e.sliceUint8)(u,-16).buffer,x||null},r.webCryptoDecrypt=function(t,a,c){var d=this,f=this.subtle;return(this.key!==a||!this.fastAesKey)&&(this.key=a,this.fastAesKey=new g.default(f,a)),this.fastAesKey.expandKey().then(function(h){if(!f)return Promise.reject(new Error("web crypto not initialized"));var u=new y.default(f,c);return u.decrypt(t.buffer,h)}).catch(function(h){return d.onWebCryptoError(h,t,a,c)})},r.onWebCryptoError=function(t,a,c,d){return _.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",t),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(a,c,d)},r.getValidChunk=function(t){var a=t,c=t.length-t.length%o;return c!==t.length&&(a=Object(e.sliceUint8)(t,0,c),this.remainderData=Object(e.sliceUint8)(t,c)),a},r.logOnce=function(t){if(!this.logEnabled)return;_.logger.log("[decrypter.ts]: "+t),this.logEnabled=!1},l}()},"./src/crypt/fast-aes-key.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"default",function(){return y});var y=function(){function g(_,p){this.subtle=void 0,this.key=void 0,this.subtle=_,this.key=p}var s=g.prototype;return s.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},g}()},"./src/demux/aacdemuxer.ts":function(I,v,T){"use strict";T.r(v);var y=T("./src/demux/base-audio-demuxer.ts"),g=T("./src/demux/adts.ts"),s=T("./src/utils/logger.ts"),_=T("./src/demux/id3.ts");function p(n,l){n.prototype=Object.create(l.prototype),n.prototype.constructor=n,e(n,l)}function e(n,l){return e=Object.setPrototypeOf||function(i,t){return i.__proto__=t,i},e(n,l)}var o=function(n){p(l,n);function l(i,t){var a;return a=n.call(this)||this,a.observer=void 0,a.config=void 0,a.observer=i,a.config=t,a}var r=l.prototype;return r.resetInitSegment=function(t,a,c){n.prototype.resetInitSegment.call(this,t,a,c),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:t,duration:c,inputTimeScale:9e4,dropped:0}},l.probe=function(t){if(!t)return!1;for(var a=_.getID3Data(t,0)||[],c=a.length,d=t.length;c<d;c++)if(g.probe(t,c))return s.logger.log("ADTS sync word found !"),!0;return!1},r.canParse=function(t,a){return g.canParse(t,a)},r.appendFrame=function(t,a,c){g.initTrackConfig(t,this.observer,a,c,t.manifestCodec);var d=g.appendFrame(t,a,c,this.initPTS,this.frameIndex);if(d&&d.missing===0)return d},l}(y.default);o.minProbeByteLength=9,v.default=o},"./src/demux/adts.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"getAudioConfig",function(){return _}),T.d(v,"isHeaderPattern",function(){return p}),T.d(v,"getHeaderLength",function(){return e}),T.d(v,"getFullFrameLength",function(){return o}),T.d(v,"canGetFrameLength",function(){return n}),T.d(v,"isHeader",function(){return l}),T.d(v,"canParse",function(){return r}),T.d(v,"probe",function(){return i}),T.d(v,"initTrackConfig",function(){return t}),T.d(v,"getFrameDuration",function(){return a}),T.d(v,"parseFrameHeader",function(){return c}),T.d(v,"appendFrame",function(){return d});var y=T("./src/utils/logger.ts"),g=T("./src/errors.ts"),s=T("./src/events.ts");function _(f,h,u,E){var x,O,C,w,S=navigator.userAgent.toLowerCase(),A=E,D=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];x=((h[u+2]&192)>>>6)+1;var M=(h[u+2]&60)>>>2;if(M>D.length-1){f.trigger(s.Events.ERROR,{type:g.ErrorTypes.MEDIA_ERROR,details:g.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+M});return}return C=(h[u+2]&1)<<2,C|=(h[u+3]&192)>>>6,y.logger.log("manifest codec:"+E+", ADTS type:"+x+", samplingIndex:"+M),/firefox/i.test(S)?M>=6?(x=5,w=new Array(4),O=M-3):(x=2,w=new Array(2),O=M):S.indexOf("android")!==-1?(x=2,w=new Array(2),O=M):(x=5,w=new Array(4),E&&(E.indexOf("mp4a.40.29")!==-1||E.indexOf("mp4a.40.5")!==-1)||!E&&M>=6?O=M-3:((E&&E.indexOf("mp4a.40.2")!==-1&&(M>=6&&C===1||/vivaldi/i.test(S))||!E&&C===1)&&(x=2,w=new Array(2)),O=M)),w[0]=x<<3,w[0]|=(M&14)>>1,w[1]|=(M&1)<<7,w[1]|=C<<3,x===5&&(w[1]|=(O&14)>>1,w[2]=(O&1)<<7,w[2]|=2<<2,w[3]=0),{config:w,samplerate:D[M],channelCount:C,codec:"mp4a.40."+x,manifestCodec:A}}function p(f,h){return f[h]===255&&(f[h+1]&246)===240}function e(f,h){return f[h+1]&1?7:9}function o(f,h){return(f[h+3]&3)<<11|f[h+4]<<3|(f[h+5]&224)>>>5}function n(f,h){return h+5<f.length}function l(f,h){return h+1<f.length&&p(f,h)}function r(f,h){return n(f,h)&&p(f,h)&&o(f,h)<=f.length-h}function i(f,h){if(l(f,h)){var u=e(f,h);if(h+u>=f.length)return!1;var E=o(f,h);if(E<=u)return!1;var x=h+E;return x===f.length||l(f,x)}return!1}function t(f,h,u,E,x){if(!f.samplerate){var O=_(h,u,E,x);if(!O)return;f.config=O.config,f.samplerate=O.samplerate,f.channelCount=O.channelCount,f.codec=O.codec,f.manifestCodec=O.manifestCodec,y.logger.log("parsed codec:"+f.codec+", rate:"+O.samplerate+", channels:"+O.channelCount)}}function a(f){return 1024*9e4/f}function c(f,h,u,E,x){var O=e(f,h),C=o(f,h);if(C-=O,C>0){var w=u+E*x;return{headerLength:O,frameLength:C,stamp:w}}}function d(f,h,u,E,x){var O=a(f.samplerate),C=c(h,u,E,x,O);if(C){var w=C.frameLength,S=C.headerLength,A=C.stamp,D=S+w,M=Math.max(0,u+D-h.length),N;M?(N=new Uint8Array(D-S),N.set(h.subarray(u+S,h.length),0)):N=h.subarray(u+S,u+D);var P={unit:N,pts:A};return M||f.samples.push(P),{sample:P,length:D,missing:M}}}},"./src/demux/base-audio-demuxer.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"initPTSFn",function(){return o});var y=T("./src/polyfills/number.ts"),g=T("./src/demux/id3.ts"),s=T("./src/demux/dummy-demuxed-track.ts"),_=T("./src/utils/mp4-tools.ts"),p=T("./src/utils/typed-array.ts"),e=function(){function n(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var l=n.prototype;return l.resetInitSegment=function(i,t,a){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},l.resetTimeStamp=function(){},l.resetContiguity=function(){},l.canParse=function(i,t){return!1},l.appendFrame=function(i,t,a){},l.demux=function(i,t){this.cachedData&&(i=Object(_.appendUint8Array)(this.cachedData,i),this.cachedData=null);var a=g.getID3Data(i,0),c=a?a.length:0,d,f,h=this._audioTrack,u=this._id3Track,E=a?g.getTimeStamp(a):void 0,x=i.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=o(E,t)),a&&a.length>0&&u.samples.push({pts:this.initPTS,dts:this.initPTS,data:a}),f=this.initPTS;c<x;){if(this.canParse(i,c)){var O=this.appendFrame(h,i,c);O?(this.frameIndex++,f=O.sample.pts,c+=O.length,d=c):c=x}else g.canParse(i,c)?(a=g.getID3Data(i,c),u.samples.push({pts:f,dts:f,data:a}),c+=a.length,d=c):c++;if(c===x&&d!==x){var C=Object(p.sliceUint8)(i,d);this.cachedData?this.cachedData=Object(_.appendUint8Array)(this.cachedData,C):this.cachedData=C}}return{audioTrack:h,avcTrack:Object(s.dummyTrack)(),id3Track:u,textTrack:Object(s.dummyTrack)()}},l.demuxSampleAes=function(i,t,a){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},l.flush=function(i){var t=this.cachedData;return t&&(this.cachedData=null,this.demux(t,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(s.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(s.dummyTrack)()}},l.destroy=function(){},n}(),o=function(l,r){return Object(y.isFiniteNumber)(l)?l*90:r*9e4};v.default=e},"./src/demux/chunk-cache.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"default",function(){return y});var y=function(){function s(){this.chunks=[],this.dataLength=0}var _=s.prototype;return _.push=function(e){this.chunks.push(e),this.dataLength+=e.length},_.flush=function(){var e=this.chunks,o=this.dataLength,n;if(e.length)e.length===1?n=e[0]:n=g(e,o);else return new Uint8Array(0);return this.reset(),n},_.reset=function(){this.chunks.length=0,this.dataLength=0},s}();function g(s,_){for(var p=new Uint8Array(_),e=0,o=0;o<s.length;o++){var n=s[o];p.set(n,e),e+=n.length}return p}},"./src/demux/dummy-demuxed-track.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"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,v,T){"use strict";T.r(v);var y=T("./src/utils/logger.ts"),g=function(){function s(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 _=s.prototype;return _.loadWord=function(){var e=this.data,o=this.bytesAvailable,n=e.byteLength-o,l=new Uint8Array(4),r=Math.min(4,o);if(r===0)throw new Error("no bytes available");l.set(e.subarray(n,n+r)),this.word=new DataView(l.buffer).getUint32(0),this.bitsAvailable=r*8,this.bytesAvailable-=r},_.skipBits=function(e){var o;this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,o=e>>3,e-=o>>3,this.bytesAvailable-=o,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)},_.readBits=function(e){var o=Math.min(this.bitsAvailable,e),n=this.word>>>32-o;return e>32&&y.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=o,this.bitsAvailable>0?this.word<<=o:this.bytesAvailable>0&&this.loadWord(),o=e-o,o>0&&this.bitsAvailable?n<<o|this.readBits(o):n},_.skipLZ=function(){var e;for(e=0;e<this.bitsAvailable;++e)if((this.word&2147483648>>>e)!==0)return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()},_.skipUEG=function(){this.skipBits(1+this.skipLZ())},_.skipEG=function(){this.skipBits(1+this.skipLZ())},_.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},_.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)},_.readBoolean=function(){return this.readBits(1)===1},_.readUByte=function(){return this.readBits(8)},_.readUShort=function(){return this.readBits(16)},_.readUInt=function(){return this.readBits(32)},_.skipScalingList=function(e){for(var o=8,n=8,l,r=0;r<e;r++)n!==0&&(l=this.readEG(),n=(o+l+256)%256),o=n===0?o:n},_.readSPS=function(){var e=0,o=0,n=0,l=0,r,i,t,a=this.readUByte.bind(this),c=this.readBits.bind(this),d=this.readUEG.bind(this),f=this.readBoolean.bind(this),h=this.skipBits.bind(this),u=this.skipEG.bind(this),E=this.skipUEG.bind(this),x=this.skipScalingList.bind(this);a();var O=a();if(c(5),h(3),a(),E(),O===100||O===110||O===122||O===244||O===44||O===83||O===86||O===118||O===128){var C=d();if(C===3&&h(1),E(),E(),h(1),f())for(i=C!==3?8:12,t=0;t<i;t++)f()&&(t<6?x(16):x(64))}E();var w=d();if(w===0)d();else if(w===1)for(h(1),u(),u(),r=d(),t=0;t<r;t++)u();E(),h(1);var S=d(),A=d(),D=c(1);D===0&&h(1),h(1),f()&&(e=d(),o=d(),n=d(),l=d());var M=[1,1];if(f()&&f()){var N=a();switch(N){case 1:M=[1,1];break;case 2:M=[12,11];break;case 3:M=[10,11];break;case 4:M=[16,11];break;case 5:M=[40,33];break;case 6:M=[24,11];break;case 7:M=[20,11];break;case 8:M=[32,11];break;case 9:M=[80,33];break;case 10:M=[18,11];break;case 11:M=[15,11];break;case 12:M=[64,33];break;case 13:M=[160,99];break;case 14:M=[4,3];break;case 15:M=[3,2];break;case 16:M=[2,1];break;case 255:{M=[a()<<8|a(),a()<<8|a()];break}}}return{width:Math.ceil((S+1)*16-e*2-o*2),height:(2-D)*(A+1)*16-(D?2:4)*(n+l),pixelRatio:M}},_.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},s}();v.default=g},"./src/demux/id3.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"isHeader",function(){return y}),T.d(v,"isFooter",function(){return g}),T.d(v,"getID3Data",function(){return s}),T.d(v,"canParse",function(){return p}),T.d(v,"getTimeStamp",function(){return e}),T.d(v,"isTimeStampFrame",function(){return o}),T.d(v,"getID3Frames",function(){return l}),T.d(v,"decodeFrame",function(){return r}),T.d(v,"utf8ArrayToStr",function(){return d}),T.d(v,"testables",function(){return f});var y=function(x,O){return O+10<=x.length&&(x[O]===73&&x[O+1]===68&&x[O+2]===51&&(x[O+3]<255&&x[O+4]<255&&(x[O+6]<128&&x[O+7]<128&&x[O+8]<128&&x[O+9]<128)))},g=function(x,O){return O+10<=x.length&&(x[O]===51&&x[O+1]===68&&x[O+2]===73&&(x[O+3]<255&&x[O+4]<255&&(x[O+6]<128&&x[O+7]<128&&x[O+8]<128&&x[O+9]<128)))},s=function(x,O){for(var C=O,w=0;y(x,O);){w+=10;var S=_(x,O+6);w+=S,g(x,O+10)&&(w+=10),O+=w}return w>0?x.subarray(C,C+w):void 0},_=function(x,O){var C=0;return C=(x[O]&127)<<21,C|=(x[O+1]&127)<<14,C|=(x[O+2]&127)<<7,C|=x[O+3]&127,C},p=function(x,O){return y(x,O)&&_(x,O+6)+10<=x.length-O},e=function(x){for(var O=l(x),C=0;C<O.length;C++){var w=O[C];if(o(w))return c(w)}return},o=function(x){return x&&x.key==="PRIV"&&x.info==="com.apple.streaming.transportStreamTimestamp"},n=function(x){var O=String.fromCharCode(x[0],x[1],x[2],x[3]),C=_(x,4),w=10;return{type:O,size:C,data:x.subarray(w,w+C)}},l=function(x){for(var O=0,C=[];y(x,O);){var w=_(x,O+6);O+=10;for(var S=O+w;O+8<S;){var A=n(x.subarray(O)),D=r(A);D&&C.push(D),O+=A.size+10}g(x,O)&&(O+=10)}return C},r=function(x){return x.type==="PRIV"?i(x):x.type[0]==="W"?a(x):t(x)},i=function(x){if(x.size<2)return;var O=d(x.data,!0),C=new Uint8Array(x.data.subarray(O.length+1));return{key:x.type,info:O,data:C.buffer}},t=function(x){if(x.size<2)return;if(x.type==="TXXX"){var O=1,C=d(x.data.subarray(O),!0);O+=C.length+1;var w=d(x.data.subarray(O));return{key:x.type,info:C,data:w}}var S=d(x.data.subarray(1));return{key:x.type,data:S}},a=function(x){if(x.type==="WXXX"){if(x.size<2)return;var O=1,C=d(x.data.subarray(O),!0);O+=C.length+1;var w=d(x.data.subarray(O));return{key:x.type,info:C,data:w}}var S=d(x.data);return{key:x.type,data:S}},c=function(x){if(x.data.byteLength===8){var O=new Uint8Array(x.data),C=O[3]&1,w=(O[4]<<23)+(O[5]<<15)+(O[6]<<7)+O[7];return w/=45,C&&(w+=4772185884e-2),Math.round(w)}return},d=function(x,O){O===void 0&&(O=!1);var C=u();if(C){var w=C.decode(x);if(O){var S=w.indexOf("\0");return S!==-1?w.substring(0,S):w}return w.replace(/\0/g,"")}for(var A=x.length,D,M,N,P="",z=0;z<A;){if(D=x[z++],D===0&&O)return P;if(D===0||D===3)continue;switch(D>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:P+=String.fromCharCode(D);break;case 12:case 13:M=x[z++],P+=String.fromCharCode((D&31)<<6|M&63);break;case 14:M=x[z++],N=x[z++],P+=String.fromCharCode((D&15)<<12|(M&63)<<6|(N&63)<<0);break;default:}}return P},f={decodeTextFrame:t},h;function u(){return!h&&typeof self.TextDecoder!="undefined"&&(h=new self.TextDecoder("utf-8")),h}},"./src/demux/mp3demuxer.ts":function(I,v,T){"use strict";T.r(v);var y=T("./src/demux/base-audio-demuxer.ts"),g=T("./src/demux/id3.ts"),s=T("./src/utils/logger.ts"),_=T("./src/demux/mpegaudio.ts");function p(n,l){n.prototype=Object.create(l.prototype),n.prototype.constructor=n,e(n,l)}function e(n,l){return e=Object.setPrototypeOf||function(i,t){return i.__proto__=t,i},e(n,l)}var o=function(n){p(l,n);function l(){return n.apply(this,arguments)||this}var r=l.prototype;return r.resetInitSegment=function(t,a,c){n.prototype.resetInitSegment.call(this,t,a,c),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:t,duration:c,inputTimeScale:9e4,dropped:0}},l.probe=function(t){if(!t)return!1;for(var a=g.getID3Data(t,0)||[],c=a.length,d=t.length;c<d;c++)if(_.probe(t,c))return s.logger.log("MPEG Audio sync word found !"),!0;return!1},r.canParse=function(t,a){return _.canParse(t,a)},r.appendFrame=function(t,a,c){return this.initPTS===null?void 0:_.appendFrame(t,a,c,this.initPTS,this.frameIndex)},l}(y.default);o.minProbeByteLength=4,v.default=o},"./src/demux/mp4demuxer.ts":function(I,v,T){"use strict";T.r(v);var y=T("./src/utils/mp4-tools.ts"),g=T("./src/demux/dummy-demuxed-track.ts"),s=function(){function _(e,o){this.remainderData=null,this.config=void 0,this.config=o}var p=_.prototype;return p.resetTimeStamp=function(){},p.resetInitSegment=function(){},p.resetContiguity=function(){},_.probe=function(o){return Object(y.findBox)({data:o,start:0,end:Math.min(o.length,16384)},["moof"]).length>0},p.demux=function(o){var n=o,l=Object(g.dummyTrack)();if(this.config.progressive){this.remainderData&&(n=Object(y.appendUint8Array)(this.remainderData,o));var r=Object(y.segmentValidRange)(n);this.remainderData=r.remainder,l.samples=r.valid||new Uint8Array}else l.samples=n;return{audioTrack:Object(g.dummyTrack)(),avcTrack:l,id3Track:Object(g.dummyTrack)(),textTrack:Object(g.dummyTrack)()}},p.flush=function(){var o=Object(g.dummyTrack)();return o.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(g.dummyTrack)(),avcTrack:o,id3Track:Object(g.dummyTrack)(),textTrack:Object(g.dummyTrack)()}},p.demuxSampleAes=function(o,n,l){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},p.destroy=function(){},_}();s.minProbeByteLength=1024,v.default=s},"./src/demux/mpegaudio.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"appendFrame",function(){return e}),T.d(v,"parseHeader",function(){return o}),T.d(v,"isHeaderPattern",function(){return n}),T.d(v,"isHeader",function(){return l}),T.d(v,"canParse",function(){return r}),T.d(v,"probe",function(){return i});var y=null,g=[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],s=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],_=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],p=[0,1,1,4];function e(t,a,c,d,f){if(c+24>a.length)return;var h=o(a,c);if(h&&c+h.frameLength<=a.length){var u=h.samplesPerFrame*9e4/h.sampleRate,E=d+f*u,x={unit:a.subarray(c,c+h.frameLength),pts:E,dts:E};return t.config=[],t.channelCount=h.channelCount,t.samplerate=h.sampleRate,t.samples.push(x),{sample:x,length:h.frameLength,missing:0}}}function o(t,a){var c=t[a+1]>>3&3,d=t[a+1]>>1&3,f=t[a+2]>>4&15,h=t[a+2]>>2&3;if(c!==1&&f!==0&&f!==15&&h!==3){var u=t[a+2]>>1&1,E=t[a+3]>>6,x=c===3?3-d:d===3?3:4,O=g[x*14+f-1]*1e3,C=c===3?0:c===2?1:2,w=s[C*3+h],S=E===3?1:2,A=_[c][d],D=p[d],M=A*8*D,N=Math.floor(A*O/w+u)*D;if(y===null){var P=navigator.userAgent||"",z=P.match(/Chrome\/(\d+)/i);y=z?parseInt(z[1]):0}var X=!!y&&y<=87;return X&&d===2&&O>=224e3&&E===0&&(t[a+3]=t[a+3]|128),{sampleRate:w,channelCount:S,frameLength:N,samplesPerFrame:M}}}function n(t,a){return t[a]===255&&(t[a+1]&224)===224&&(t[a+1]&6)!==0}function l(t,a){return a+1<t.length&&n(t,a)}function r(t,a){var c=4;return n(t,a)&&c<=t.length-a}function i(t,a){if(a+1<t.length&&n(t,a)){var c=4,d=o(t,a),f=c;d!=null&&d.frameLength&&(f=d.frameLength);var h=a+f;return h===t.length||l(t,h)}return!1}},"./src/demux/sample-aes.ts":function(I,v,T){"use strict";T.r(v);var y=T("./src/crypt/decrypter.ts"),g=T("./src/demux/tsdemuxer.ts"),s=function(){function _(e,o,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new y.default(e,o,{removePKCS7Padding:!1})}var p=_.prototype;return p.decryptBuffer=function(o,n){this.decrypter.decrypt(o,this.keyData.key.buffer,this.keyData.iv.buffer,n)},p.decryptAacSample=function(o,n,l,r){var i=o[n].unit,t=i.subarray(16,i.length-i.length%16),a=t.buffer.slice(t.byteOffset,t.byteOffset+t.length),c=this;this.decryptBuffer(a,function(d){var f=new Uint8Array(d);i.set(f,16),r||c.decryptAacSamples(o,n+1,l)})},p.decryptAacSamples=function(o,n,l){for(;;n++){if(n>=o.length){l();return}if(o[n].unit.length<32)continue;var r=this.decrypter.isSync();if(this.decryptAacSample(o,n,l,r),!r)return}},p.getAvcEncryptedData=function(o){for(var n=Math.floor((o.length-48)/160)*16+16,l=new Int8Array(n),r=0,i=32;i<=o.length-16;i+=160,r+=16)l.set(o.subarray(i,i+16),r);return l},p.getAvcDecryptedUnit=function(o,n){for(var l=new Uint8Array(n),r=0,i=32;i<=o.length-16;i+=160,r+=16)o.set(l.subarray(r,r+16),i);return o},p.decryptAvcSample=function(o,n,l,r,i,t){var a=Object(g.discardEPB)(i.data),c=this.getAvcEncryptedData(a),d=this;this.decryptBuffer(c.buffer,function(f){i.data=d.getAvcDecryptedUnit(a,f),t||d.decryptAvcSamples(o,n,l+1,r)})},p.decryptAvcSamples=function(o,n,l,r){if(o instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;n++,l=0){if(n>=o.length){r();return}for(var i=o[n].units;!(l>=i.length);l++){var t=i[l];if(t.data.length<=48||t.type!==1&&t.type!==5)continue;var a=this.decrypter.isSync();if(this.decryptAvcSample(o,n,l,r,t,a),!a)return}}},_}();v.default=s},"./src/demux/transmuxer-interface.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"default",function(){return i});var y=T("./node_modules/webworkify-webpack/index.js"),g=T.n(y),s=T("./src/events.ts"),_=T("./src/demux/transmuxer.ts"),p=T("./src/utils/logger.ts"),e=T("./src/errors.ts"),o=T("./src/utils/mediasource-helper.ts"),n=T("./node_modules/eventemitter3/index.js"),l=T.n(n),r=Object(o.getMediaSource)()||{isTypeSupported:function(){return!1}},i=function(){function t(c,d,f,h){var u=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=d,this.onTransmuxComplete=f,this.onFlush=h;var E=c.config,x=function(A,D){D=D||{},D.frag=u.frag,D.id=u.id,c.trigger(A,D)};this.observer=new n.EventEmitter,this.observer.on(s.Events.FRAG_DECRYPTED,x),this.observer.on(s.Events.ERROR,x);var O={mp4:r.isTypeSupported("video/mp4"),mpeg:r.isTypeSupported("audio/mpeg"),mp3:r.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(s.Events.ERROR,{type:e.ErrorTypes.OTHER_ERROR,details:e.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(S.message+" ("+S.filename+":"+S.lineno+")")})},w.postMessage({cmd:"init",typeSupported:O,vendor:C,id:d,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 _.default(this.observer,O,E,C,d),this.worker=null}}else this.transmuxer=new _.default(this.observer,O,E,C,d)}var a=t.prototype;return a.destroy=function(){var d=this.worker;if(d)d.removeEventListener("message",this.onwmsg),d.terminate(),this.worker=null;else{var f=this.transmuxer;f&&(f.destroy(),this.transmuxer=null)}var h=this.observer;h&&h.removeAllListeners(),this.observer=null},a.push=function(d,f,h,u,E,x,O,C,w,S){var A=this;w.transmuxing.start=self.performance.now();var D=this.transmuxer,M=this.worker,N=x?x.start:E.start,P=E.decryptdata,z=this.frag,X=!(z&&E.cc===z.cc),k=!(z&&w.level===z.level),F=z?w.sn-z.sn:-1,U=this.part?w.part-this.part.index:1,L=!k&&(F===1||F===0&&U===1),B=self.performance.now();(k||F||E.stats.parsing.start===0)&&(E.stats.parsing.start=B),x&&(U||!L)&&(x.stats.parsing.start=B);var Z=new _.TransmuxState(X,L,C,k,N);if(!L||X){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: `+X+`
|
|
|
trackSwitch: `+k+`
|
|
|
contiguous: `+L+`
|
|
|
accurateTimeOffset: `+C+`
|
|
|
timeOffset: `+N);var re=new _.TransmuxConfig(h,u,f,O,S);this.configureTransmuxer(re)}if(this.frag=E,this.part=x,M)M.postMessage({cmd:"demux",data:d,decryptdata:P,chunkMeta:w,state:Z},d instanceof ArrayBuffer?[d]:[]);else if(D){var he=D.push(d,P,w,Z);Object(_.isPromise)(he)?he.then(function(Ce){A.handleTransmuxComplete(Ce)}):this.handleTransmuxComplete(he)}},a.flush=function(d){var f=this;d.transmuxing.start=self.performance.now();var h=this.transmuxer,u=this.worker;if(u)u.postMessage({cmd:"flush",chunkMeta:d});else if(h){var E=h.flush(d);Object(_.isPromise)(E)?E.then(function(x){f.handleFlushResult(x,d)}):this.handleFlushResult(E,d)}},a.handleFlushResult=function(d,f){var h=this;d.forEach(function(u){h.handleTransmuxComplete(u)}),this.onFlush(f)},a.onWorkerMessage=function(d){var f=d.data,h=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,h.trigger(f.event,f.data);break}}},a.configureTransmuxer=function(d){var f=this.worker,h=this.transmuxer;f?f.postMessage({cmd:"configure",config:d}):h&&h.configure(d)},a.handleTransmuxComplete=function(d){d.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(d)},t}()},"./src/demux/transmuxer-worker.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"default",function(){return e});var y=T("./src/demux/transmuxer.ts"),g=T("./src/events.ts"),s=T("./src/utils/logger.ts"),_=T("./node_modules/eventemitter3/index.js"),p=T.n(_);function e(i){var t=new _.EventEmitter,a=function(d,f){i.postMessage({event:d,data:f})};t.on(g.Events.FRAG_DECRYPTED,a),t.on(g.Events.ERROR,a),i.addEventListener("message",function(c){var d=c.data;switch(d.cmd){case"init":{var f=JSON.parse(d.config);i.transmuxer=new y.default(t,d.typeSupported,f,d.vendor,d.id),Object(s.enableLogs)(f.debug),a("init",null);break}case"configure":{i.transmuxer.configure(d.config);break}case"demux":{var h=i.transmuxer.push(d.data,d.decryptdata,d.chunkMeta,d.state);Object(y.isPromise)(h)?h.then(function(x){o(i,x)}):o(i,h);break}case"flush":{var u=d.chunkMeta,E=i.transmuxer.flush(u);Object(y.isPromise)(E)?E.then(function(x){l(i,x,u)}):l(i,E,u);break}default:break}})}function o(i,t){if(r(t.remuxResult))return;var a=[],c=t.remuxResult,d=c.audio,f=c.video;d&&n(a,d),f&&n(a,f),i.postMessage({event:"transmuxComplete",data:t},a)}function n(i,t){t.data1&&i.push(t.data1.buffer),t.data2&&i.push(t.data2.buffer)}function l(i,t,a){t.forEach(function(c){o(i,c)}),i.postMessage({event:"flush",data:a})}function r(i){return!i.audio&&!i.video&&!i.text&&!i.id3&&!i.initSegment}},"./src/demux/transmuxer.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"default",function(){return f}),T.d(v,"isPromise",function(){return E}),T.d(v,"TransmuxConfig",function(){return x}),T.d(v,"TransmuxState",function(){return O});var y=T("./src/events.ts"),g=T("./src/errors.ts"),s=T("./src/crypt/decrypter.ts"),_=T("./src/demux/aacdemuxer.ts"),p=T("./src/demux/mp4demuxer.ts"),e=T("./src/demux/tsdemuxer.ts"),o=T("./src/demux/mp3demuxer.ts"),n=T("./src/remux/mp4-remuxer.ts"),l=T("./src/remux/passthrough-remuxer.ts"),r=T("./src/demux/chunk-cache.ts"),i=T("./src/utils/mp4-tools.ts"),t=T("./src/utils/logger.ts"),a;try{a=self.performance.now.bind(self.performance)}catch(C){t.logger.debug("Unable to use Performance API on this environment"),a=self.Date.now}var c=[{demux:e.default,remux:n.default},{demux:p.default,remux:l.default},{demux:_.default,remux:n.default},{demux:o.default,remux:n.default}],d=1024;c.forEach(function(C){var w=C.demux;d=Math.max(d,w.minProbeByteLength)});var f=function(){function C(S,A,D,M,N){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 r.default,this.observer=S,this.typeSupported=A,this.config=D,this.vendor=M,this.id=N}var w=C.prototype;return w.configure=function(A){this.transmuxConfig=A,this.decrypter&&this.decrypter.reset()},w.push=function(A,D,M,N){var P=this,z=M.transmuxing;z.executeStart=a();var X=new Uint8Array(A),k=this.cache,F=this.config,U=this.currentTransmuxState,L=this.transmuxConfig;N&&(this.currentTransmuxState=N);var B=h(X,D);if(B&&B.method==="AES-128"){var Z=this.getDecrypter();if(F.enableSoftwareAES){var re=Z.softwareDecrypt(X,B.key.buffer,B.iv.buffer);if(!re)return z.executeEnd=a(),u(M);X=new Uint8Array(re)}else return this.decryptionPromise=Z.webCryptoDecrypt(X,B.key.buffer,B.iv.buffer).then(function(q){var Q=P.push(q,null,M);return P.decryptionPromise=null,Q}),this.decryptionPromise}var he=N||U,Ce=he.contiguous,ke=he.discontinuity,te=he.trackSwitch,Re=he.accurateTimeOffset,Te=he.timeOffset,pe=L.audioCodec,me=L.videoCodec,se=L.defaultInitPts,be=L.duration,ae=L.initSegmentData;if((ke||te)&&this.resetInitSegment(ae,pe,me,be),ke&&this.resetInitialTimestamp(se),Ce||this.resetContiguity(),this.needsProbing(X,ke,te)){if(k.dataLength){var fe=k.flush();X=Object(i.appendUint8Array)(fe,X)}this.configureTransmuxer(X,L)}var Fe=this.transmux(X,B,Te,Re,M),ie=this.currentTransmuxState;return ie.contiguous=!0,ie.discontinuity=!1,ie.trackSwitch=!1,z.executeEnd=a(),Fe},w.flush=function(A){var D=this,M=A.transmuxing;M.executeStart=a();var N=this.decrypter,P=this.cache,z=this.currentTransmuxState,X=this.decryptionPromise;if(X)return X.then(function(){return D.flush(A)});var k=[],F=z.timeOffset;if(N){var U=N.flush();U&&k.push(this.push(U,null,A))}var L=P.dataLength;P.reset();var B=this.demuxer,Z=this.remuxer;if(!B||!Z)return L>=d&&this.observer.emit(y.Events.ERROR,y.Events.ERROR,{type:g.ErrorTypes.MEDIA_ERROR,details:g.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),M.executeEnd=a(),[u(A)];var re=B.flush(F);return E(re)?re.then(function(he){return D.flushRemux(k,he,A),k}):(this.flushRemux(k,re,A),k)},w.flushRemux=function(A,D,M){var N=D.audioTrack,P=D.avcTrack,z=D.id3Track,X=D.textTrack,k=this.currentTransmuxState,F=k.accurateTimeOffset,U=k.timeOffset;t.logger.log("[transmuxer.ts]: Flushed fragment "+M.sn+(M.part>-1?" p: "+M.part:"")+" of level "+M.level);var L=this.remuxer.remux(N,P,z,X,U,F,!0,this.id);A.push({remuxResult:L,chunkMeta:M}),M.transmuxing.executeEnd=a()},w.resetInitialTimestamp=function(A){var D=this.demuxer,M=this.remuxer;if(!D||!M)return;D.resetTimeStamp(A),M.resetTimeStamp(A)},w.resetContiguity=function(){var A=this.demuxer,D=this.remuxer;if(!A||!D)return;A.resetContiguity(),D.resetNextTimestamp()},w.resetInitSegment=function(A,D,M,N){var P=this.demuxer,z=this.remuxer;if(!P||!z)return;P.resetInitSegment(D,M,N),z.resetInitSegment(A,D,M)},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,D,M,N,P){var z;return D&&D.method==="SAMPLE-AES"?z=this.transmuxSampleAes(A,D,M,N,P):z=this.transmuxUnencrypted(A,M,N,P),z},w.transmuxUnencrypted=function(A,D,M,N){var P=this.demuxer.demux(A,D,!1,!this.config.progressive),z=P.audioTrack,X=P.avcTrack,k=P.id3Track,F=P.textTrack,U=this.remuxer.remux(z,X,k,F,D,M,!1,this.id);return{remuxResult:U,chunkMeta:N}},w.transmuxSampleAes=function(A,D,M,N,P){var z=this;return this.demuxer.demuxSampleAes(A,D,M).then(function(X){var k=z.remuxer.remux(X.audioTrack,X.avcTrack,X.id3Track,X.textTrack,M,N,!1,z.id);return{remuxResult:k,chunkMeta:P}})},w.configureTransmuxer=function(A,D){for(var M=this.config,N=this.observer,P=this.typeSupported,z=this.vendor,X=D.audioCodec,k=D.defaultInitPts,F=D.duration,U=D.initSegmentData,L=D.videoCodec,B,Z=0,re=c.length;Z<re;Z++)if(c[Z].demux.probe(A)){B=c[Z];break}B||(t.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),B={demux:p.default,remux:l.default});var he=this.demuxer,Ce=this.remuxer,ke=B.remux,te=B.demux;(!Ce||!(Ce instanceof ke))&&(this.remuxer=new ke(N,M,P,z)),(!he||!(he instanceof te))&&(this.demuxer=new te(N,M,P),this.probe=te.probe),this.resetInitSegment(U,X,L,F),this.resetInitialTimestamp(k)},w.needsProbing=function(A,D,M){return!this.demuxer||!this.remuxer||D||M},w.getDecrypter=function(){var A=this.decrypter;return A||(A=this.decrypter=new s.default(this.observer,this.config)),A},C}();function h(C,w){var S=null;return C.byteLength>0&&w!=null&&w.key!=null&&w.iv!==null&&w.method!=null&&(S=w),S}var u=function(w){return{remuxResult:{},chunkMeta:w}};function E(C){return"then"in C&&C.then instanceof Function}var x=function(w,S,A,D,M){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=D,this.defaultInitPts=M},O=function(w,S,A,D,M){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=D,this.timeOffset=M}},"./src/demux/tsdemuxer.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"discardEPB",function(){return u});var y=T("./src/demux/adts.ts"),g=T("./src/demux/mpegaudio.ts"),s=T("./src/demux/exp-golomb.ts"),_=T("./src/demux/id3.ts"),p=T("./src/demux/sample-aes.ts"),e=T("./src/events.ts"),o=T("./src/utils/mp4-tools.ts"),n=T("./src/utils/logger.ts"),l=T("./src/errors.ts"),r={video:1,audio:2,id3:3,text:4},i=function(){function E(O,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=O,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:r[C],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:C==="audio"?w:void 0}};var x=E.prototype;return x.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},x.resetTimeStamp=function(){},x.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},x.demux=function(C,w,S,A){S===void 0&&(S=!1),A===void 0&&(A=!1),S||(this.sampleAes=null);var D,M=this._avcTrack,N=this._audioTrack,P=this._id3Track,z=M.pid,X=M.pesData,k=N.pid,F=P.pid,U=N.pesData,L=P.pesData,B=!1,Z=this.pmtParsed,re=this._pmtId,he=C.length;if(this.remainderData&&(C=Object(o.appendUint8Array)(this.remainderData,C),he=C.length,this.remainderData=null),he<188&&!A)return this.remainderData=C,{audioTrack:N,avcTrack:M,id3Track:P,textTrack:this._txtTrack};var Ce=Math.max(0,E.syncOffset(C));he-=(he+Ce)%188,he<C.byteLength&&!A&&(this.remainderData=new Uint8Array(C.buffer,he,C.buffer.byteLength-he));for(var ke=Ce;ke<he;ke+=188)if(C[ke]===71){var te=!!(C[ke+1]&64),Re=((C[ke+1]&31)<<8)+C[ke+2],Te=(C[ke+3]&48)>>4,pe=void 0;if(Te>1){if(pe=ke+5+C[ke+4],pe===ke+188)continue}else pe=ke+4;switch(Re){case z:te&&(X&&(D=d(X))&&this.parseAVCPES(D,!1),X={data:[],size:0}),X&&(X.data.push(C.subarray(pe,ke+188)),X.size+=ke+188-pe);break;case k:te&&(U&&(D=d(U))&&(N.isAAC?this.parseAACPES(D):this.parseMPEGPES(D)),U={data:[],size:0}),U&&(U.data.push(C.subarray(pe,ke+188)),U.size+=ke+188-pe);break;case F:te&&(L&&(D=d(L))&&this.parseID3PES(D),L={data:[],size:0}),L&&(L.data.push(C.subarray(pe,ke+188)),L.size+=ke+188-pe);break;case 0:te&&(pe+=C[pe]+1),re=this._pmtId=a(C,pe);break;case re:{te&&(pe+=C[pe]+1);var me=c(C,pe,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,S);z=me.avc,z>0&&(M.pid=z),k=me.audio,k>0&&(N.pid=k,N.isAAC=me.isAAC),F=me.id3,F>0&&(P.pid=F),B&&!Z&&(n.logger.log("reparse from beginning"),B=!1,ke=Ce-188),Z=this.pmtParsed=!0;break}case 17:case 8191:break;default:B=!0;break}}else this.observer.emit(e.Events.ERROR,e.Events.ERROR,{type:l.ErrorTypes.MEDIA_ERROR,details:l.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});M.pesData=X,N.pesData=U,P.pesData=L;var se={audioTrack:N,avcTrack:M,id3Track:P,textTrack:this._txtTrack};return A&&this.extractRemainingSamples(se),se},x.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},x.extractRemainingSamples=function(C){var w=C.audioTrack,S=C.avcTrack,A=C.id3Track,D=S.pesData,M=w.pesData,N=A.pesData,P;D&&(P=d(D))?(this.parseAVCPES(P,!0),S.pesData=null):S.pesData=D,M&&(P=d(M))?(w.isAAC?this.parseAACPES(P):this.parseMPEGPES(P),w.pesData=null):(M!=null&&M.size&&n.logger.log("last AAC PES packet truncated,might overlap between fragments"),w.pesData=M),N&&(P=d(N))?(this.parseID3PES(P),A.pesData=null):A.pesData=N},x.demuxSampleAes=function(C,w,S){var A=this.demux(C,S,!0,!this.config.progressive),D=this.sampleAes=new p.default(this.observer,this.config,w);return this.decrypt(A,D)},x.decrypt=function(C,w){return new Promise(function(S){var A=C.audioTrack,D=C.avcTrack;A.samples&&A.isAAC?w.decryptAacSamples(A.samples,0,function(){D.samples?w.decryptAvcSamples(D.samples,0,0,function(){S(C)}):S(C)}):D.samples&&w.decryptAvcSamples(D.samples,0,0,function(){S(C)})})},x.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},x.parseAVCPES=function(C,w){var S=this,A=this._avcTrack,D=this.parseAVCNALu(C.data),M=!1,N=this.avcSample,P,z=!1;C.data=null,N&&D.length&&!A.audFound&&(f(N,A),N=this.avcSample=t(!1,C.pts,C.dts,"")),D.forEach(function(X){switch(X.type){case 1:{P=!0,N||(N=S.avcSample=t(!0,C.pts,C.dts,"")),M&&(N.debug+="NDR "),N.frame=!0;var k=X.data;if(z&&k.length>4){var F=new s.default(k).readSliceType();(F===2||F===4||F===7||F===9)&&(N.key=!0)}break}case 5:P=!0,N||(N=S.avcSample=t(!0,C.pts,C.dts,"")),M&&(N.debug+="IDR "),N.key=!0,N.frame=!0;break;case 6:{P=!0,M&&N&&(N.debug+="SEI ");var U=new s.default(u(X.data));U.readUByte();for(var L=0,B=0,Z=!1,re=0;!Z&&U.bytesAvailable>1;){L=0;do re=U.readUByte(),L+=re;while(re===255);B=0;do re=U.readUByte(),B+=re;while(re===255);if(L===4&&U.bytesAvailable!==0){Z=!0;var he=U.readUByte();if(he===181){var Ce=U.readUShort();if(Ce===49){var ke=U.readUInt();if(ke===1195456820){var te=U.readUByte();if(te===3){for(var Re=U.readUByte(),Te=U.readUByte(),pe=31&Re,me=[Re,Te],se=0;se<pe;se++)me.push(U.readUByte()),me.push(U.readUByte()),me.push(U.readUByte());h(S._txtTrack.samples,{type:3,pts:C.pts,bytes:me})}}}}}else if(L===5&&U.bytesAvailable!==0){if(Z=!0,B>16){for(var be=[],ae=0;ae<16;ae++)be.push(U.readUByte().toString(16)),(ae===3||ae===5||ae===7||ae===9)&&be.push("-");for(var fe=B-16,Fe=new Uint8Array(fe),ie=0;ie<fe;ie++)Fe[ie]=U.readUByte();h(S._txtTrack.samples,{pts:C.pts,payloadType:L,uuid:be.join(""),userData:Object(_.utf8ArrayToStr)(Fe),userDataBytes:Fe})}}else if(B<U.bytesAvailable)for(var q=0;q<B;q++)U.readUByte()}break}case 7:if(P=!0,z=!0,M&&N&&(N.debug+="SPS "),!A.sps){var Q=new s.default(X.data),Y=Q.readSPS();A.width=Y.width,A.height=Y.height,A.pixelRatio=Y.pixelRatio,A.sps=[X.data],A.duration=S._duration;for(var oe=X.data.subarray(1,4),le="avc1.",Ee=0;Ee<3;Ee++){var Le=oe[Ee].toString(16);Le.length<2&&(Le="0"+Le),le+=Le}A.codec=le}break;case 8:P=!0,M&&N&&(N.debug+="PPS "),A.pps||(A.pps=[X.data]);break;case 9:P=!1,A.audFound=!0,N&&f(N,A),N=S.avcSample=t(!1,C.pts,C.dts,M?"AUD ":"");break;case 12:P=!1;break;default:P=!1,N&&(N.debug+="unknown NAL "+X.type+" ");break}if(N&&P){var ge=N.units;ge.push(X)}}),w&&N&&(f(N,A),this.avcSample=null)},x.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 D=w.units;S=D[D.length-1]}return S},x.parseAVCNALu=function(C){var w=C.byteLength,S=this._avcTrack,A=S.naluState||0,D=A,M=[],N=0,P,z,X,k=-1,F=0;for(A===-1&&(k=0,F=C[0]&31,A=0,N=1);N<w;){if(P=C[N++],!A){A=P?0:1;continue}if(A===1){A=P?0:2;continue}if(!P)A=3;else if(P===1){if(k>=0){var U={data:C.subarray(k,N-A-1),type:F};M.push(U)}else{var L=this.getLastNalUnit();if(L&&(D&&N<=4-D&&(L.state&&(L.data=L.data.subarray(0,L.data.byteLength-D))),z=N-A-1,z>0)){var B=new Uint8Array(L.data.byteLength+z);B.set(L.data,0),B.set(C.subarray(0,z),L.data.byteLength),L.data=B,L.state=0}}N<w?(X=C[N]&31,k=N,F=X,A=0):A=-1}else A=0}if(k>=0&&A>=0){var Z={data:C.subarray(k,w),type:F,state:A};M.push(Z)}if(M.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,M},x.parseAACPES=function(C){var w=0,S=this._audioTrack,A=this.aacOverFlow,D=C.data;if(A){this.aacOverFlow=null;var M=A.sample.unit.byteLength,N=Math.min(A.missing,M),P=M-N;A.sample.unit.set(D.subarray(0,N),P),S.samples.push(A.sample),w=A.missing}var z,X;for(z=w,X=D.length;z<X-1&&!y.isHeader(D,z);z++);if(z!==w){var k,F;if(z<X-1?(k="AAC PES did not start with ADTS header,offset:"+z,F=!1):(k="no ADTS header found in AAC PES",F=!0),n.logger.warn("parsing error:"+k),this.observer.emit(e.Events.ERROR,e.Events.ERROR,{type:l.ErrorTypes.MEDIA_ERROR,details:l.ErrorDetails.FRAG_PARSING_ERROR,fatal:F,reason:k}),F)return}y.initTrackConfig(S,this.observer,D,z,this.audioCodec);var U;if(C.pts!==void 0)U=C.pts;else if(A){var L=y.getFrameDuration(S.samplerate);U=A.sample.pts+L}else{n.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var B=0;z<X;)if(y.isHeader(D,z)){if(z+5<X){var Z=y.appendFrame(S,D,z,U,B);if(Z)if(Z.missing)this.aacOverFlow=Z;else{z+=Z.length,B++;continue}}break}else z++},x.parseMPEGPES=function(C){var w=C.data,S=w.length,A=0,D=0,M=C.pts;if(M===void 0){n.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;D<S;)if(g.isHeader(w,D)){var N=g.appendFrame(this._audioTrack,w,D,M,A);if(N)D+=N.length,A++;else break}else D++},x.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 t(E,x,O,C){return{key:E,frame:!1,pts:x,dts:O,units:[],debug:C,length:0}}function a(E,x){return(E[x+10]&31)<<8|E[x+11]}function c(E,x,O,C){var w={audio:-1,avc:-1,id3:-1,isAAC:!0},S=(E[x+1]&15)<<8|E[x+2],A=x+3+S-4,D=(E[x+10]&15)<<8|E[x+11];for(x+=12+D;x<A;){var M=(E[x+1]&31)<<8|E[x+2];switch(E[x]){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=M);break;case 21:w.id3===-1&&(w.id3=M);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=M);break;case 3:case 4:O?w.audio===-1&&(w.audio=M,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}x+=((E[x+3]&15)<<8|E[x+4])+5}return w}function d(E){var x=0,O,C,w,S,A,D=E.data;if(!E||E.size===0)return null;for(;D[0].length<19&&D.length>1;){var M=new Uint8Array(D[0].length+D[1].length);M.set(D[0]),M.set(D[1],D[0].length),D[0]=M,D.splice(1,1)}O=D[0];var N=(O[0]<<16)+(O[1]<<8)+O[2];if(N===1){if(C=(O[4]<<8)+O[5],C&&C>E.size-6)return null;var P=O[7];P&192&&(S=(O[9]&14)*536870912+(O[10]&255)*4194304+(O[11]&254)*16384+(O[12]&255)*128+(O[13]&254)/2,P&64?(A=(O[14]&14)*536870912+(O[15]&255)*4194304+(O[16]&254)*16384+(O[17]&255)*128+(O[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=O[8];var z=w+9;if(E.size<=z)return null;E.size-=z;for(var X=new Uint8Array(E.size),k=0,F=D.length;k<F;k++){O=D[k];var U=O.byteLength;if(z)if(z>U){z-=U;continue}else O=O.subarray(z),U-=z,z=0;X.set(O,x),x+=U}return C&&(C-=w+3),{data:X,pts:S,dts:A,len:C}}return null}function f(E,x){if(E.units.length&&E.frame){if(E.pts===void 0){var O=x.samples,C=O.length;if(C){var w=O[C-1];E.pts=w.pts,E.dts=w.dts}else{x.dropped++;return}}x.samples.push(E)}E.debug.length&&n.logger.log(E.pts+"/"+E.dts+":"+E.debug)}function h(E,x){var O=E.length;if(O>0){if(x.pts>=E[O-1].pts)E.push(x);else for(var C=O-1;C>=0;C--)if(x.pts<E[C].pts){E.splice(C,0,x);break}}else E.push(x)}function u(E){for(var x=E.byteLength,O=[],C=1;C<x-2;)E[C]===0&&E[C+1]===0&&E[C+2]===3?(O.push(C+2),C+=2):C++;if(O.length===0)return E;var w=x-O.length,S=new Uint8Array(w),A=0;for(C=0;C<w;A++,C++)A===O[0]&&(A++,O.shift()),S[C]=E[A];return S}v.default=i},"./src/errors.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"ErrorTypes",function(){return y}),T.d(v,"ErrorDetails",function(){return g});var y;(function(s){s.NETWORK_ERROR="networkError",s.MEDIA_ERROR="mediaError",s.KEY_SYSTEM_ERROR="keySystemError",s.MUX_ERROR="muxError",s.OTHER_ERROR="otherError"})(y||(y={}));var g;(function(s){s.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",s.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",s.KEY_SYSTEM_NO_SESSION="keySystemNoSession",s.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",s.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",s.MANIFEST_LOAD_ERROR="manifestLoadError",s.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",s.MANIFEST_PARSING_ERROR="manifestParsingError",s.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",s.LEVEL_EMPTY_ERROR="levelEmptyError",s.LEVEL_LOAD_ERROR="levelLoadError",s.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",s.LEVEL_SWITCH_ERROR="levelSwitchError",s.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",s.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",s.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",s.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",s.FRAG_LOAD_ERROR="fragLoadError",s.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",s.FRAG_DECRYPT_ERROR="fragDecryptError",s.FRAG_PARSING_ERROR="fragParsingError",s.REMUX_ALLOC_ERROR="remuxAllocError",s.KEY_LOAD_ERROR="keyLoadError",s.KEY_LOAD_TIMEOUT="keyLoadTimeOut",s.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",s.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",s.BUFFER_APPEND_ERROR="bufferAppendError",s.BUFFER_APPENDING_ERROR="bufferAppendingError",s.BUFFER_STALLED_ERROR="bufferStalledError",s.BUFFER_FULL_ERROR="bufferFullError",s.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",s.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",s.INTERNAL_EXCEPTION="internalException",s.INTERNAL_ABORTED="aborted",s.UNKNOWN="unknown"})(g||(g={}))},"./src/events.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"Events",function(){return y});var y;(function(g){g.MEDIA_ATTACHING="hlsMediaAttaching",g.MEDIA_ATTACHED="hlsMediaAttached",g.MEDIA_DETACHING="hlsMediaDetaching",g.MEDIA_DETACHED="hlsMediaDetached",g.BUFFER_RESET="hlsBufferReset",g.BUFFER_CODECS="hlsBufferCodecs",g.BUFFER_CREATED="hlsBufferCreated",g.BUFFER_APPENDING="hlsBufferAppending",g.BUFFER_APPENDED="hlsBufferAppended",g.BUFFER_EOS="hlsBufferEos",g.BUFFER_FLUSHING="hlsBufferFlushing",g.BUFFER_FLUSHED="hlsBufferFlushed",g.MANIFEST_LOADING="hlsManifestLoading",g.MANIFEST_LOADED="hlsManifestLoaded",g.MANIFEST_PARSED="hlsManifestParsed",g.LEVEL_SWITCHING="hlsLevelSwitching",g.LEVEL_SWITCHED="hlsLevelSwitched",g.LEVEL_LOADING="hlsLevelLoading",g.LEVEL_LOADED="hlsLevelLoaded",g.LEVEL_UPDATED="hlsLevelUpdated",g.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",g.LEVELS_UPDATED="hlsLevelsUpdated",g.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",g.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",g.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",g.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",g.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",g.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",g.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",g.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",g.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",g.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",g.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",g.CUES_PARSED="hlsCuesParsed",g.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",g.INIT_PTS_FOUND="hlsInitPtsFound",g.FRAG_LOADING="hlsFragLoading",g.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",g.FRAG_LOADED="hlsFragLoaded",g.FRAG_DECRYPTED="hlsFragDecrypted",g.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",g.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",g.FRAG_PARSING_METADATA="hlsFragParsingMetadata",g.FRAG_PARSED="hlsFragParsed",g.FRAG_BUFFERED="hlsFragBuffered",g.FRAG_CHANGED="hlsFragChanged",g.FPS_DROP="hlsFpsDrop",g.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",g.ERROR="hlsError",g.DESTROYING="hlsDestroying",g.KEY_LOADING="hlsKeyLoading",g.KEY_LOADED="hlsKeyLoaded",g.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",g.BACK_BUFFER_REACHED="hlsBackBufferReached"})(y||(y={}))},"./src/hls.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"default",function(){return E});var y=T("./node_modules/url-toolkit/src/url-toolkit.js"),g=T.n(y),s=T("./src/loader/playlist-loader.ts"),_=T("./src/loader/key-loader.ts"),p=T("./src/controller/id3-track-controller.ts"),e=T("./src/controller/latency-controller.ts"),o=T("./src/controller/level-controller.ts"),n=T("./src/controller/fragment-tracker.ts"),l=T("./src/controller/stream-controller.ts"),r=T("./src/is-supported.ts"),i=T("./src/utils/logger.ts"),t=T("./src/config.ts"),a=T("./node_modules/eventemitter3/index.js"),c=T.n(a),d=T("./src/events.ts"),f=T("./src/errors.ts");function h(x,O){for(var C=0;C<O.length;C++){var w=O[C];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(x,w.key,w)}}function u(x,O,C){return O&&h(x.prototype,O),C&&h(x,C),x}var E=function(){x.isSupported=function(){return Object(r.isSupported)()};function x(C){C===void 0&&(C={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new a.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(t.mergeConfig)(x.DefaultConfig,C);this.userConfig=C,Object(i.enableLogs)(w.debug),this._autoLevelCapping=-1,w.progressive&&Object(t.enableStreamingMode)(w);var S=w.abrController,A=w.bufferController,D=w.capLevelController,M=w.fpsController,N=this.abrController=new S(this),P=this.bufferController=new A(this),z=this.capLevelController=new D(this),X=new M(this),k=new s.default(this),F=new _.default(this),U=new p.default(this),L=this.levelController=new o.default(this),B=new n.FragmentTracker(this),Z=this.streamController=new l.default(this,B);z.setStreamController(Z),X.setStreamController(Z);var re=[L,Z];this.networkControllers=re;var he=[k,F,N,P,z,X,U,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(e.default,null,he),this.coreComponents=he}var O=x.prototype;return O.createController=function(w,S,A){if(w){var D=S?new w(this,S):new w(this);return A&&A.push(D),D}return null},O.on=function(w,S,A){A===void 0&&(A=this),this._emitter.on(w,S,A)},O.once=function(w,S,A){A===void 0&&(A=this),this._emitter.once(w,S,A)},O.removeAllListeners=function(w){this._emitter.removeAllListeners(w)},O.off=function(w,S,A,D){A===void 0&&(A=this),this._emitter.off(w,S,A,D)},O.listeners=function(w){return this._emitter.listeners(w)},O.emit=function(w,S,A){return this._emitter.emit(w,S,A)},O.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(d.Events.ERROR,{type:f.ErrorTypes.OTHER_ERROR,details:f.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:w,error:A})}return!1},O.listenerCount=function(w){return this._emitter.listenerCount(w)},O.destroy=function(){i.logger.log("destroy"),this.trigger(d.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},O.attachMedia=function(w){i.logger.log("attachMedia"),this._media=w,this.trigger(d.Events.MEDIA_ATTACHING,{media:w})},O.detachMedia=function(){i.logger.log("detachMedia"),this.trigger(d.Events.MEDIA_DETACHING,void 0),this._media=null},O.loadSource=function(w){this.stopLoad();var S=this.media,A=this.url,D=this.url=y.buildAbsoluteURL(self.location.href,w,{alwaysNormalize:!0});i.logger.log("loadSource:"+D),S&&A&&A!==D&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(S)),this.trigger(d.Events.MANIFEST_LOADING,{url:w})},O.startLoad=function(w){w===void 0&&(w=-1),i.logger.log("startLoad("+w+")"),this.networkControllers.forEach(function(S){S.startLoad(w)})},O.stopLoad=function(){i.logger.log("stopLoad"),this.networkControllers.forEach(function(w){w.stopLoad()})},O.swapAudioCodec=function(){i.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},O.recoverMediaError=function(){i.logger.log("recoverMediaError");var w=this._media;this.detachMedia(),w&&this.attachMedia(w)},O.removeLevel=function(w,S){S===void 0&&(S=0),this.levelController.removeLevel(w,S)},u(x,[{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,D=0;D<A;D++)if(w[D].maxBitrate>S)return D;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 d.Events}},{key:"ErrorTypes",get:function(){return f.ErrorTypes}},{key:"ErrorDetails",get:function(){return f.ErrorDetails}},{key:"DefaultConfig",get:function(){return x.defaultConfig?x.defaultConfig:t.hlsDefaultConfig},set:function(w){x.defaultConfig=w}}]),x}();E.defaultConfig=void 0},"./src/is-supported.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"isSupported",function(){return s}),T.d(v,"changeTypeSupported",function(){return _});var y=T("./src/utils/mediasource-helper.ts");function g(){return self.SourceBuffer||self.WebKitSourceBuffer}function s(){var p=Object(y.getMediaSource)();if(!p)return!1;var e=g(),o=p&&typeof p.isTypeSupported=="function"&&p.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),n=!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function";return!!o&&!!n}function _(){var p,e=g();return typeof(e==null||((p=e.prototype)===null||p===void 0)?void 0:p.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"default",function(){return i}),T.d(v,"LoadError",function(){return a});var y=T("./src/polyfills/number.ts"),g=T("./src/errors.ts");function s(c,d){c.prototype=Object.create(d.prototype),c.prototype.constructor=c,n(c,d)}function _(c){var d=typeof Map=="function"?new Map:void 0;return _=function(h){if(h===null||!o(h))return h;if(typeof h!="function")throw new TypeError("Super expression must either be null or a function");if(typeof d!="undefined"){if(d.has(h))return d.get(h);d.set(h,u)}function u(){return p(h,arguments,l(this).constructor)}return u.prototype=Object.create(h.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),n(u,h)},_(c)}function p(c,d,f){return e()?p=Reflect.construct:p=function(u,E,x){var O=[null];O.push.apply(O,E);var C=Function.bind.apply(u,O),w=new C;return x&&n(w,x.prototype),w},p.apply(null,arguments)}function e(){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 o(c){return Function.toString.call(c).indexOf("[native code]")!==-1}function n(c,d){return n=Object.setPrototypeOf||function(h,u){return h.__proto__=u,h},n(c,d)}function l(c){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(f){return f.__proto__||Object.getPrototypeOf(f)},l(c)}var r=Math.pow(2,17),i=function(){function c(f){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=f}var d=c.prototype;return d.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},d.abort=function(){this.loader&&this.loader.abort()},d.load=function(h,u){var E=this,x=h.url;if(!x)return Promise.reject(new a({type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:h,networkDetails:null},"Fragment does not have a "+(x?"part list":"url")));this.abort();var O=this.config,C=O.fLoader,w=O.loader;return new Promise(function(S,A){E.loader&&E.loader.destroy();var D=E.loader=h.loader=C?new C(O):new w(O),M=t(h),N={timeout:O.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:O.fragLoadingMaxRetryTimeout,highWaterMark:r};h.stats=D.stats,D.load(M,N,{onSuccess:function(z,X,k,F){E.resetLoader(h,D),S({frag:h,part:null,payload:z.data,networkDetails:F})},onError:function(z,X,k){E.resetLoader(h,D),A(new a({type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:h,response:z,networkDetails:k}))},onAbort:function(z,X,k){E.resetLoader(h,D),A(new a({type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:h,networkDetails:k}))},onTimeout:function(z,X,k){E.resetLoader(h,D),A(new a({type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:h,networkDetails:k}))},onProgress:function(z,X,k,F){u&&u({frag:h,part:null,payload:k,networkDetails:F})}})})},d.loadPart=function(h,u,E){var x=this;this.abort();var O=this.config,C=O.fLoader,w=O.loader;return new Promise(function(S,A){x.loader&&x.loader.destroy();var D=x.loader=h.loader=C?new C(O):new w(O),M=t(h,u),N={timeout:O.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:O.fragLoadingMaxRetryTimeout,highWaterMark:r};u.stats=D.stats,D.load(M,N,{onSuccess:function(z,X,k,F){x.resetLoader(h,D),x.updateStatsFromPart(h,u);var U={frag:h,part:u,payload:z.data,networkDetails:F};E(U),S(U)},onError:function(z,X,k){x.resetLoader(h,D),A(new a({type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:h,part:u,response:z,networkDetails:k}))},onAbort:function(z,X,k){h.stats.aborted=u.stats.aborted,x.resetLoader(h,D),A(new a({type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:h,part:u,networkDetails:k}))},onTimeout:function(z,X,k){x.resetLoader(h,D),A(new a({type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:h,part:u,networkDetails:k}))}})})},d.updateStatsFromPart=function(h,u){var E=h.stats,x=u.stats,O=x.total;if(E.loaded+=x.loaded,O){var C=Math.round(h.duration/u.duration),w=Math.min(Math.round(E.loaded/O),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 D=E.loading,M=x.loading;D.start?D.first+=M.first-M.start:(D.start=M.start,D.first=M.first),D.end=M.end},d.resetLoader=function(h,u){h.loader=null,this.loader===u&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),u.destroy()},c}();function t(c,d){d===void 0&&(d=null);var f=d||c,h={frag:c,part:d,responseType:"arraybuffer",url:f.url,headers:{},rangeStart:0,rangeEnd:0},u=f.byteRangeStartOffset,E=f.byteRangeEndOffset;return Object(y.isFiniteNumber)(u)&&Object(y.isFiniteNumber)(E)&&(h.rangeStart=u,h.rangeEnd=E),h}var a=function(c){s(d,c);function d(f){for(var h,u=arguments.length,E=new Array(u>1?u-1:0),x=1;x<u;x++)E[x-1]=arguments[x];return h=c.call.apply(c,[this].concat(E))||this,h.data=void 0,h.data=f,h}return d}(_(Error))},"./src/loader/fragment.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"ElementaryStreamTypes",function(){return i}),T.d(v,"BaseSegment",function(){return t}),T.d(v,"Fragment",function(){return a}),T.d(v,"Part",function(){return c});var y=T("./src/polyfills/number.ts"),g=T("./node_modules/url-toolkit/src/url-toolkit.js"),s=T.n(g),_=T("./src/utils/logger.ts"),p=T("./src/loader/level-key.ts"),e=T("./src/loader/load-stats.ts");function o(d,f){d.prototype=Object.create(f.prototype),d.prototype.constructor=d,n(d,f)}function n(d,f){return n=Object.setPrototypeOf||function(u,E){return u.__proto__=E,u},n(d,f)}function l(d,f){for(var h=0;h<f.length;h++){var u=f[h];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(d,u.key,u)}}function r(d,f,h){return f&&l(d.prototype,f),h&&l(d,h),d}var i;(function(d){d.AUDIO="audio",d.VIDEO="video",d.AUDIOVIDEO="audiovideo"})(i||(i={}));var t=function(){function d(h){var u;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(u={},u[i.AUDIO]=null,u[i.VIDEO]=null,u[i.AUDIOVIDEO]=null,u),this.baseurl=h}var f=d.prototype;return f.setByteRange=function(u,E){var x=u.split("@",2),O=[];x.length===1?O[0]=E?E.byteRangeEndOffset:0:O[0]=parseInt(x[1]),O[1]=parseInt(x[0])+O[0],this._byteRange=O},r(d,[{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(g.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(u){this._url=u}}]),d}(),a=function(d){o(f,d);function f(u,E){var x;return x=d.call(this,E)||this,x._decryptdata=null,x.rawProgramDateTime=null,x.programDateTime=null,x.tagList=[],x.duration=0,x.sn=0,x.levelkey=void 0,x.type=void 0,x.loader=null,x.level=-1,x.cc=0,x.startPTS=void 0,x.endPTS=void 0,x.appendedPTS=void 0,x.startDTS=void 0,x.endDTS=void 0,x.start=0,x.deltaPTS=void 0,x.maxStartPTS=void 0,x.minEndPTS=void 0,x.stats=new e.LoadStats,x.urlId=0,x.data=void 0,x.bitrateTest=!1,x.title=null,x.initSegment=null,x.type=u,x}var h=f.prototype;return h.createInitializationVector=function(E){for(var x=new Uint8Array(16),O=12;O<16;O++)x[O]=E>>8*(15-O)&255;return x},h.setDecryptDataFromLevelKey=function(E,x){var O=E;return(E==null?void 0:E.method)==="AES-128"&&E.uri&&!E.iv&&(O=p.LevelKey.fromURI(E.uri),O.method=E.method,O.iv=this.createInitializationVector(x),O.keyFormat="identity"),O},h.setElementaryStreamInfo=function(E,x,O,C,w,S){S===void 0&&(S=!1);var A=this.elementaryStreams,D=A[E];if(!D){A[E]={startPTS:x,endPTS:O,startDTS:C,endDTS:w,partial:S};return}D.startPTS=Math.min(D.startPTS,x),D.endPTS=Math.max(D.endPTS,O),D.startDTS=Math.min(D.startDTS,C),D.endDTS=Math.max(D.endDTS,w)},h.clearElementaryStreamInfo=function(){var E=this.elementaryStreams;E[i.AUDIO]=null,E[i.VIDEO]=null,E[i.AUDIOVIDEO]=null},r(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&&_.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}(t),c=function(d){o(f,d);function f(h,u,E,x,O){var C;C=d.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 e.LoadStats,C.duration=h.decimalFloatingPoint("DURATION"),C.gap=h.bool("GAP"),C.independent=h.bool("INDEPENDENT"),C.relurl=h.enumeratedString("URI"),C.fragment=u,C.index=x;var w=h.enumeratedString("BYTERANGE");return w&&C.setByteRange(w,O),O&&(C.fragOffset=O.fragOffset+O.duration),C}return r(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 u=this.elementaryStreams;return!!(u.audio||u.video||u.audiovideo)}}]),f}(t)},"./src/loader/key-loader.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"default",function(){return _});var y=T("./src/events.ts"),g=T("./src/errors.ts"),s=T("./src/utils/logger.ts"),_=function(){function p(o){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=o,this._registerListeners()}var e=p.prototype;return e._registerListeners=function(){this.hls.on(y.Events.KEY_LOADING,this.onKeyLoading,this)},e._unregisterListeners=function(){this.hls.off(y.Events.KEY_LOADING,this.onKeyLoading)},e.destroy=function(){this._unregisterListeners();for(var n in this.loaders){var l=this.loaders[n];l&&l.destroy()}this.loaders={}},e.onKeyLoading=function(n,l){var r=l.frag,i=r.type,t=this.loaders[i];if(!r.decryptdata){s.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var a=r.decryptdata.uri;if(a!==this.decrypturl||this.decryptkey===null){var c=this.hls.config;if(t&&(s.logger.warn("abort previous key loader for type:"+i),t.abort()),!a){s.logger.warn("key uri is falsy");return}var d=c.loader,f=r.loader=this.loaders[i]=new d(c);this.decrypturl=a,this.decryptkey=null;var h={url:a,frag:r,responseType:"arraybuffer"},u={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(h,u,E)}else this.decryptkey&&(r.decryptdata.key=this.decryptkey,this.hls.trigger(y.Events.KEY_LOADED,{frag:r}))},e.loadsuccess=function(n,l,r){var i=r.frag;if(!i.decryptdata){s.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})},e.loaderror=function(n,l){var r=l.frag,i=r.loader;i&&i.abort(),delete this.loaders[r.type],this.hls.trigger(y.Events.ERROR,{type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:r,response:n})},e.loadtimeout=function(n,l){var r=l.frag,i=r.loader;i&&i.abort(),delete this.loaders[r.type],this.hls.trigger(y.Events.ERROR,{type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:r})},p}()},"./src/loader/level-details.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"LevelDetails",function(){return p});var y=T("./src/polyfills/number.ts");function g(e,o){for(var n=0;n<o.length;n++){var l=o[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}function s(e,o,n){return o&&g(e.prototype,o),n&&g(e,n),e}var _=10,p=function(){function e(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 o=e.prototype;return o.reloaded=function(l){if(!l){this.advanced=!0,this.updated=!0;return}var r=this.lastPartSn-l.lastPartSn,i=this.lastPartIndex-l.lastPartIndex;this.updated=this.endSN!==l.endSN||!!i||!!r,this.advanced=this.endSN>l.endSN||r>0||r===0&&i>0,this.updated||this.advanced?this.misses=Math.floor(l.misses*.6):this.misses=l.misses+1,this.availabilityDelay=l.availabilityDelay},s(e,[{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||_}},{key:"drift",get:function(){var l=this.driftEndTime-this.driftStartTime;if(l>0){var r=this.driftEnd-this.driftStart;return r*1e3/l}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var l;return(l=this.partList)!==null&&l!==void 0&&l.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var l;return(l=this.fragments)!==null&&l!==void 0&&l.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 l;return(l=this.partList)!==null&&l!==void 0&&l.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var l;return(l=this.partList)!==null&&l!==void 0&&l.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),e}()},"./src/loader/level-key.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"LevelKey",function(){return p});var y=T("./node_modules/url-toolkit/src/url-toolkit.js"),g=T.n(y);function s(e,o){for(var n=0;n<o.length;n++){var l=o[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}function _(e,o,n){return o&&s(e.prototype,o),n&&s(e,n),e}var p=function(){e.fromURL=function(n,l){return new e(n,l)},e.fromURI=function(n){return new e(n)};function e(o,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)(o,n,{alwaysNormalize:!0}):this._uri=o}return _(e,[{key:"uri",get:function(){return this._uri}}]),e}()},"./src/loader/load-stats.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"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,v,T){"use strict";T.r(v),T.d(v,"default",function(){return f});var y=T("./src/polyfills/number.ts"),g=T("./node_modules/url-toolkit/src/url-toolkit.js"),s=T.n(g),_=T("./src/loader/fragment.ts"),p=T("./src/loader/level-details.ts"),e=T("./src/loader/level-key.ts"),o=T("./src/utils/attr-list.ts"),n=T("./src/utils/logger.ts"),l=T("./src/utils/codecs.ts"),r=/#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,t=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),a=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 d(O){var C,w;return c.test((C=(w=g.parseURL(O))===null||w===void 0?void 0:w.path)!=null?C:"")}var f=function(){function O(){}return O.findGroup=function(w,S){for(var A=0;A<w.length;A++){var D=w[A];if(D.id===S)return D}},O.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},O.resolve=function(w,S){return g.buildAbsoluteURL(S,w,{alwaysNormalize:!0})},O.parseMasterPlaylist=function(w,S){var A=[],D={},M=!1;r.lastIndex=0;for(var N;(N=r.exec(w))!=null;)if(N[1]){var P=new o.AttrList(N[1]),z={attrs:P,bitrate:P.decimalInteger("AVERAGE-BANDWIDTH")||P.decimalInteger("BANDWIDTH"),name:P.NAME,url:O.resolve(N[2],S)},X=P.decimalResolution("RESOLUTION");X&&(z.width=X.width,z.height=X.height),h((P.CODECS||"").split(/[ ,]+/).filter(function(F){return F}),z),z.videoCodec&&z.videoCodec.indexOf("avc1")!==-1&&(z.videoCodec=O.convertAVC1ToAVCOTI(z.videoCodec)),A.push(z)}else if(N[3]){var k=new o.AttrList(N[3]);k["DATA-ID"]&&(M=!0,D[k["DATA-ID"]]=k)}return{levels:A,sessionData:M?D:null}},O.parseMasterPlaylistMedia=function(w,S,A,D){D===void 0&&(D=[]);var M,N=[],P=0;for(i.lastIndex=0;(M=i.exec(w))!==null;){var z=new o.AttrList(M[1]);if(z.TYPE===A){var X={attrs:z,bitrate:0,id:P++,groupId:z["GROUP-ID"],instreamId:z["INSTREAM-ID"],name:z.NAME||z.LANGUAGE||"",type:A,default:z.bool("DEFAULT"),autoselect:z.bool("AUTOSELECT"),forced:z.bool("FORCED"),lang:z.LANGUAGE,url:z.URI?O.resolve(z.URI,S):""};if(D.length){var k=O.findGroup(D,X.groupId)||D[0];u(X,k,"audioCodec"),u(X,k,"textCodec")}N.push(X)}}return N},O.parseLevelPlaylist=function(w,S,A,D,M){var N=new p.LevelDetails(S),P=N.fragments,z=null,X=0,k=0,F=0,U=0,L=null,B=new _.Fragment(D,S),Z,re,he,Ce=-1,ke=!1;for(t.lastIndex=0,N.m3u8=w;(Z=t.exec(w))!==null;){ke&&(ke=!1,B=new _.Fragment(D,S),B.start=F,B.sn=X,B.cc=U,B.level=A,z&&(B.initSegment=z,B.rawProgramDateTime=z.rawProgramDateTime));var te=Z[1];if(te){B.duration=parseFloat(te);var Re=(" "+Z[2]).slice(1);B.title=Re||null,B.tagList.push(Re?["INF",te,Re]:["INF",te])}else if(Z[3])Object(y.isFiniteNumber)(B.duration)&&(B.start=F,he&&(B.levelkey=he),B.sn=X,B.level=A,B.cc=U,B.urlId=M,P.push(B),B.relurl=(" "+Z[3]).slice(1),x(B,L),L=B,F+=B.duration,X++,k=0,ke=!0);else if(Z[4]){var Te=(" "+Z[4]).slice(1);L?B.setByteRange(Te,L):B.setByteRange(Te)}else if(Z[5])B.rawProgramDateTime=(" "+Z[5]).slice(1),B.tagList.push(["PROGRAM-DATE-TIME",B.rawProgramDateTime]),Ce===-1&&(Ce=P.length);else{if(Z=Z[0].match(a),!Z){n.logger.warn("No matches on slow regex match for level playlist!");continue}for(re=1;re<Z.length&&!(typeof Z[re]!="undefined");re++);var pe=(" "+Z[re]).slice(1),me=(" "+Z[re+1]).slice(1),se=Z[re+2]?(" "+Z[re+2]).slice(1):"";switch(pe){case"PLAYLIST-TYPE":N.type=me.toUpperCase();break;case"MEDIA-SEQUENCE":X=N.startSN=parseInt(me);break;case"SKIP":{var be=new o.AttrList(me),ae=be.decimalInteger("SKIPPED-SEGMENTS");if(Object(y.isFiniteNumber)(ae)){N.skippedSegments=ae;for(var fe=ae;fe--;)P.unshift(null);X+=ae}var Fe=be.enumeratedString("RECENTLY-REMOVED-DATERANGES");Fe&&(N.recentlyRemovedDateranges=Fe.split(" "));break}case"TARGETDURATION":N.targetduration=parseFloat(me);break;case"VERSION":N.version=parseInt(me);break;case"EXTM3U":break;case"ENDLIST":N.live=!1;break;case"#":(me||se)&&B.tagList.push(se?[me,se]:[me]);break;case"DIS":U++;case"GAP":B.tagList.push([pe]);break;case"BITRATE":B.tagList.push([pe,me]);break;case"DISCONTINUITY-SEQ":U=parseInt(me);break;case"KEY":{var ie,q=new o.AttrList(me),Q=q.enumeratedString("METHOD"),Y=q.URI,oe=q.hexadecimalInteger("IV"),le=q.enumeratedString("KEYFORMATVERSIONS"),Ee=q.enumeratedString("KEYID"),Le=(ie=q.enumeratedString("KEYFORMAT"))!=null?ie:"identity",ge=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(ge.indexOf(Le)>-1){n.logger.warn("Keyformat "+Le+" is not supported from the manifest");continue}else if(Le!=="identity")continue;Q&&(he=e.LevelKey.fromURL(S,Y),Y&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(Q)>=0&&(he.method=Q,he.keyFormat=Le,Ee&&(he.keyID=Ee),le&&(he.keyFormatVersions=le),he.iv=oe));break}case"START":{var De=new o.AttrList(me),_e=De.decimalFloatingPoint("TIME-OFFSET");Object(y.isFiniteNumber)(_e)&&(N.startTimeOffset=_e);break}case"MAP":{var Xe=new o.AttrList(me);B.relurl=Xe.URI,Xe.BYTERANGE&&B.setByteRange(Xe.BYTERANGE),B.level=A,B.sn="initSegment",he&&(B.levelkey=he),B.initSegment=null,z=B,ke=!0;break}case"SERVER-CONTROL":{var tt=new o.AttrList(me);N.canBlockReload=tt.bool("CAN-BLOCK-RELOAD"),N.canSkipUntil=tt.optionalFloat("CAN-SKIP-UNTIL",0),N.canSkipDateRanges=N.canSkipUntil>0&&tt.bool("CAN-SKIP-DATERANGES"),N.partHoldBack=tt.optionalFloat("PART-HOLD-BACK",0),N.holdBack=tt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var ze=new o.AttrList(me);N.partTarget=ze.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Me=N.partList;Me||(Me=N.partList=[]);var Et=k>0?Me[Me.length-1]:void 0,Oe=k++,Ve=new _.Part(new o.AttrList(me),B,S,Oe,Et);Me.push(Ve),B.duration+=Ve.duration;break}case"PRELOAD-HINT":{var Je=new o.AttrList(me);N.preloadHint=Je;break}case"RENDITION-REPORT":{var Ye=new o.AttrList(me);N.renditionReports=N.renditionReports||[],N.renditionReports.push(Ye);break}default:n.logger.warn("line parsed but not handled: "+Z);break}}}L&&!L.relurl?(P.pop(),F-=L.duration,N.partList&&(N.fragmentHint=L)):N.partList&&(x(B,L),B.cc=U,N.fragmentHint=B);var Pe=P.length,He=P[0],ve=P[Pe-1];if(F+=N.skippedSegments*N.targetduration,F>0&&Pe&&ve){N.averagetargetduration=F/Pe;var xe=ve.sn;N.endSN=xe!=="initSegment"?xe:0,He&&(N.startCC=He.cc,He.initSegment||N.fragments.every(function(de){return de.relurl&&d(de.relurl)})&&(n.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),B=new _.Fragment(D,S),B.relurl=ve.relurl,B.level=A,B.sn="initSegment",He.initSegment=B,N.needSidxRanges=!0))}else N.endSN=0,N.startCC=0;return N.fragmentHint&&(F+=N.fragmentHint.duration),N.totalduration=F,N.endCC=U,Ce>0&&E(P,Ce),N},O}();function h(O,C){["video","audio","text"].forEach(function(w){var S=O.filter(function(D){return Object(l.isCodecType)(D,w)});if(S.length){var A=S.filter(function(D){return D.lastIndexOf("avc1",0)===0||D.lastIndexOf("mp4a",0)===0});C[w+"Codec"]=A.length>0?A[0]:S[0],O=O.filter(function(D){return S.indexOf(D)===-1})}}),C.unknownCodecs=O}function u(O,C,w){var S=C[w];S&&(O[w]=S)}function E(O,C){for(var w=O[C],S=C;S--;){var A=O[S];if(!A)return;A.programDateTime=w.programDateTime-A.duration*1e3,w=A}}function x(O,C){O.rawProgramDateTime?O.programDateTime=Date.parse(O.rawProgramDateTime):C!=null&&C.programDateTime&&(O.programDateTime=C.endProgramDateTime),Object(y.isFiniteNumber)(O.programDateTime)||(O.programDateTime=null,O.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(I,v,T){"use strict";T.r(v);var y=T("./src/polyfills/number.ts"),g=T("./src/events.ts"),s=T("./src/errors.ts"),_=T("./src/utils/logger.ts"),p=T("./src/utils/mp4-tools.ts"),e=T("./src/loader/m3u8-parser.ts"),o=T("./src/types/loader.ts"),n=T("./src/utils/attr-list.ts");function l(t){var a=t.type;switch(a){case o.PlaylistContextType.AUDIO_TRACK:return o.PlaylistLevelType.AUDIO;case o.PlaylistContextType.SUBTITLE_TRACK:return o.PlaylistLevelType.SUBTITLE;default:return o.PlaylistLevelType.MAIN}}function r(t,a){var c=t.url;return(c===void 0||c.indexOf("data:")===0)&&(c=a.url),c}var i=function(){function t(c){this.hls=void 0,this.loaders=Object.create(null),this.hls=c,this.registerListeners()}var a=t.prototype;return a.registerListeners=function(){var d=this.hls;d.on(g.Events.MANIFEST_LOADING,this.onManifestLoading,this),d.on(g.Events.LEVEL_LOADING,this.onLevelLoading,this),d.on(g.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),d.on(g.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},a.unregisterListeners=function(){var d=this.hls;d.off(g.Events.MANIFEST_LOADING,this.onManifestLoading,this),d.off(g.Events.LEVEL_LOADING,this.onLevelLoading,this),d.off(g.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),d.off(g.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},a.createInternalLoader=function(d){var f=this.hls.config,h=f.pLoader,u=f.loader,E=h||u,x=new E(f);return d.loader=x,this.loaders[d.type]=x,x},a.getInternalLoader=function(d){return this.loaders[d.type]},a.resetInternalLoader=function(d){this.loaders[d]&&delete this.loaders[d]},a.destroyInternalLoaders=function(){for(var d in this.loaders){var f=this.loaders[d];f&&f.destroy(),this.resetInternalLoader(d)}},a.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},a.onManifestLoading=function(d,f){var h=f.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:o.PlaylistContextType.MANIFEST,url:h,deliveryDirectives:null})},a.onLevelLoading=function(d,f){var h=f.id,u=f.level,E=f.url,x=f.deliveryDirectives;this.load({id:h,groupId:null,level:u,responseType:"text",type:o.PlaylistContextType.LEVEL,url:E,deliveryDirectives:x})},a.onAudioTrackLoading=function(d,f){var h=f.id,u=f.groupId,E=f.url,x=f.deliveryDirectives;this.load({id:h,groupId:u,level:null,responseType:"text",type:o.PlaylistContextType.AUDIO_TRACK,url:E,deliveryDirectives:x})},a.onSubtitleTrackLoading=function(d,f){var h=f.id,u=f.groupId,E=f.url,x=f.deliveryDirectives;this.load({id:h,groupId:u,level:null,responseType:"text",type:o.PlaylistContextType.SUBTITLE_TRACK,url:E,deliveryDirectives:x})},a.load=function(d){var f,h=this.hls.config,u=this.getInternalLoader(d);if(u){var E=u.context;if(E&&E.url===d.url){_.logger.trace("[playlist-loader]: playlist request ongoing");return}_.logger.log("[playlist-loader]: aborting previous loader for type: "+d.type),u.abort()}var x,O,C,w;switch(d.type){case o.PlaylistContextType.MANIFEST:x=h.manifestLoadingMaxRetry,O=h.manifestLoadingTimeOut,C=h.manifestLoadingRetryDelay,w=h.manifestLoadingMaxRetryTimeout;break;case o.PlaylistContextType.LEVEL:case o.PlaylistContextType.AUDIO_TRACK:case o.PlaylistContextType.SUBTITLE_TRACK:x=0,O=h.levelLoadingTimeOut;break;default:x=h.levelLoadingMaxRetry,O=h.levelLoadingTimeOut,C=h.levelLoadingRetryDelay,w=h.levelLoadingMaxRetryTimeout;break}if(u=this.createInternalLoader(d),(f=d.deliveryDirectives)!==null&&f!==void 0&&f.part){var S;if(d.type===o.PlaylistContextType.LEVEL&&d.level!==null?S=this.hls.levels[d.level].details:d.type===o.PlaylistContextType.AUDIO_TRACK&&d.id!==null?S=this.hls.audioTracks[d.id].details:d.type===o.PlaylistContextType.SUBTITLE_TRACK&&d.id!==null&&(S=this.hls.subtitleTracks[d.id].details),S){var A=S.partTarget,D=S.targetduration;A&&D&&(O=Math.min(Math.max(A*3,D*.8)*1e3,O))}}var M={timeout:O,maxRetry:x,retryDelay:C,maxRetryDelay:w,highWaterMark:0},N={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};u.load(d,M,N)},a.loadsuccess=function(d,f,h,u){if(u===void 0&&(u=null),h.isSidxRequest){this.handleSidxRequest(d,h),this.handlePlaylistLoaded(d,f,h,u);return}this.resetInternalLoader(h.type);var E=d.data;if(E.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(d,h,"no EXTM3U delimiter",u);return}f.parsing.start=performance.now(),E.indexOf("#EXTINF:")>0||E.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(d,f,h,u):this.handleMasterPlaylist(d,f,h,u)},a.loaderror=function(d,f,h){h===void 0&&(h=null),this.handleNetworkError(f,h,!1,d)},a.loadtimeout=function(d,f,h){h===void 0&&(h=null),this.handleNetworkError(f,h,!0)},a.handleMasterPlaylist=function(d,f,h,u){var E=this.hls,x=d.data,O=r(d,h),C=e.default.parseMasterPlaylist(x,O),w=C.levels,S=C.sessionData;if(!w.length){this.handleManifestParsingError(d,h,"no level found in manifest",u);return}var A=w.map(function(X){return{id:X.attrs.AUDIO,audioCodec:X.audioCodec}}),D=w.map(function(X){return{id:X.attrs.SUBTITLES,textCodec:X.textCodec}}),M=e.default.parseMasterPlaylistMedia(x,O,"AUDIO",A),N=e.default.parseMasterPlaylistMedia(x,O,"SUBTITLES",D),P=e.default.parseMasterPlaylistMedia(x,O,"CLOSED-CAPTIONS");if(M.length){var z=M.some(function(X){return!X.url});!z&&w[0].audioCodec&&!w[0].attrs.AUDIO&&(_.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),M.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new n.AttrList({}),bitrate:0,url:""}))}E.trigger(g.Events.MANIFEST_LOADED,{levels:w,audioTracks:M,subtitles:N,captions:P,url:O,stats:f,networkDetails:u,sessionData:S})},a.handleTrackOrLevelPlaylist=function(d,f,h,u){var E=this.hls,x=h.id,O=h.level,C=h.type,w=r(d,h),S=Object(y.isFiniteNumber)(x)?x:0,A=Object(y.isFiniteNumber)(O)?O:S,D=l(h),M=e.default.parseLevelPlaylist(d.data,w,A,D,S);if(!M.fragments.length){E.trigger(g.Events.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:w,reason:"no fragments found in level",level:typeof h.level=="number"?h.level:void 0});return}if(C===o.PlaylistContextType.MANIFEST){var N={attrs:new n.AttrList({}),bitrate:0,details:M,name:"",url:w};E.trigger(g.Events.MANIFEST_LOADED,{levels:[N],audioTracks:[],url:w,stats:f,networkDetails:u,sessionData:null})}if(f.parsing.end=performance.now(),M.needSidxRanges){var P,z=(P=M.fragments[0].initSegment)===null||P===void 0?void 0:P.url;this.load({url:z,isSidxRequest:!0,type:C,level:O,levelDetails:M,id:x,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}h.levelDetails=M,this.handlePlaylistLoaded(d,f,h,u)},a.handleSidxRequest=function(d,f){var h=Object(p.parseSegmentIndex)(new Uint8Array(d.data));if(!h)return;var u=h.references,E=f.levelDetails;u.forEach(function(x,O){var C=x.info,w=E.fragments[O];w.byteRange.length===0&&w.setByteRange(String(1+C.end-C.start)+"@"+String(C.start)),w.initSegment&&w.initSegment.setByteRange(String(h.moovEndOffset)+"@0")})},a.handleManifestParsingError=function(d,f,h,u){this.hls.trigger(g.Events.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:f.type===o.PlaylistContextType.MANIFEST,url:d.url,reason:h,response:d,context:f,networkDetails:u})},a.handleNetworkError=function(d,f,h,u){h===void 0&&(h=!1),_.logger.warn("[playlist-loader]: A network "+(h?"timeout":"error")+" occurred while loading "+d.type+" level: "+d.level+" id: "+d.id+' group-id: "'+d.groupId+'"');var E=s.ErrorDetails.UNKNOWN,x=!1,O=this.getInternalLoader(d);switch(d.type){case o.PlaylistContextType.MANIFEST:E=h?s.ErrorDetails.MANIFEST_LOAD_TIMEOUT:s.ErrorDetails.MANIFEST_LOAD_ERROR,x=!0;break;case o.PlaylistContextType.LEVEL:E=h?s.ErrorDetails.LEVEL_LOAD_TIMEOUT:s.ErrorDetails.LEVEL_LOAD_ERROR,x=!1;break;case o.PlaylistContextType.AUDIO_TRACK:E=h?s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,x=!1;break;case o.PlaylistContextType.SUBTITLE_TRACK:E=h?s.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:s.ErrorDetails.SUBTITLE_LOAD_ERROR,x=!1;break}O&&this.resetInternalLoader(d.type);var C={type:s.ErrorTypes.NETWORK_ERROR,details:E,fatal:x,url:d.url,loader:O,context:d,networkDetails:f};u&&(C.response=u),this.hls.trigger(g.Events.ERROR,C)},a.handlePlaylistLoaded=function(d,f,h,u){var E=h.type,x=h.level,O=h.id,C=h.groupId,w=h.loader,S=h.levelDetails,A=h.deliveryDirectives;if(!(S!=null&&S.targetduration)){this.handleManifestParsingError(d,h,"invalid target duration",u);return}if(!w)return;S.live&&(w.getCacheAge&&(S.ageHeader=w.getCacheAge()||0),(!w.getCacheAge||isNaN(S.ageHeader))&&(S.ageHeader=0));switch(E){case o.PlaylistContextType.MANIFEST:case o.PlaylistContextType.LEVEL:this.hls.trigger(g.Events.LEVEL_LOADED,{details:S,level:x||0,id:O||0,stats:f,networkDetails:u,deliveryDirectives:A});break;case o.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(g.Events.AUDIO_TRACK_LOADED,{details:S,id:O||0,groupId:C||"",stats:f,networkDetails:u,deliveryDirectives:A});break;case o.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(g.Events.SUBTITLE_TRACK_LOADED,{details:S,id:O||0,groupId:C||"",stats:f,networkDetails:u,deliveryDirectives:A});break}},t}();v.default=i},"./src/polyfills/number.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"isFiniteNumber",function(){return y}),T.d(v,"MAX_SAFE_INTEGER",function(){return g});var y=Number.isFinite||function(s){return typeof s=="number"&&isFinite(s)},g=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(I,v,T){"use strict";T.r(v);var y=function(){function g(){}return g.getSilentFrame=function(_,p){switch(_){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},g}();v.default=y},"./src/remux/mp4-generator.ts":function(I,v,T){"use strict";T.r(v);var y=Math.pow(2,32)-1,g=function(){function s(){}return s.init=function(){s.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 s.types)s.types.hasOwnProperty(p)&&(s.types[p]=[p.charCodeAt(0),p.charCodeAt(1),p.charCodeAt(2),p.charCodeAt(3)]);var e=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]),o=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]);s.HDLR_TYPES={video:e,audio:o};var n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),l=new Uint8Array([0,0,0,0,0,0,0,0]);s.STTS=s.STSC=s.STCO=l,s.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),s.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),s.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),s.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var r=new Uint8Array([105,115,111,109]),i=new Uint8Array([97,118,99,49]),t=new Uint8Array([0,0,0,1]);s.FTYP=s.box(s.types.ftyp,r,t,r,i),s.DINF=s.box(s.types.dinf,s.box(s.types.dref,n))},s.box=function(p){for(var e=8,o=arguments.length,n=new Array(o>1?o-1:0),l=1;l<o;l++)n[l-1]=arguments[l];for(var r=n.length,i=r;r--;)e+=n[r].byteLength;var t=new Uint8Array(e);for(t[0]=e>>24&255,t[1]=e>>16&255,t[2]=e>>8&255,t[3]=e&255,t.set(p,4),r=0,e=8;r<i;r++)t.set(n[r],e),e+=n[r].byteLength;return t},s.hdlr=function(p){return s.box(s.types.hdlr,s.HDLR_TYPES[p])},s.mdat=function(p){return s.box(s.types.mdat,p)},s.mdhd=function(p,e){e*=p;var o=Math.floor(e/(y+1)),n=Math.floor(e%(y+1));return s.box(s.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,o>>24,o>>16&255,o>>8&255,o&255,n>>24,n>>16&255,n>>8&255,n&255,85,196,0,0]))},s.mdia=function(p){return s.box(s.types.mdia,s.mdhd(p.timescale,p.duration),s.hdlr(p.type),s.minf(p))},s.mfhd=function(p){return s.box(s.types.mfhd,new Uint8Array([0,0,0,0,p>>24,p>>16&255,p>>8&255,p&255]))},s.minf=function(p){return p.type==="audio"?s.box(s.types.minf,s.box(s.types.smhd,s.SMHD),s.DINF,s.stbl(p)):s.box(s.types.minf,s.box(s.types.vmhd,s.VMHD),s.DINF,s.stbl(p))},s.moof=function(p,e,o){return s.box(s.types.moof,s.mfhd(p),s.traf(o,e))},s.moov=function(p){for(var e=p.length,o=[];e--;)o[e]=s.trak(p[e]);return s.box.apply(null,[s.types.moov,s.mvhd(p[0].timescale,p[0].duration)].concat(o).concat(s.mvex(p)))},s.mvex=function(p){for(var e=p.length,o=[];e--;)o[e]=s.trex(p[e]);return s.box.apply(null,[s.types.mvex].concat(o))},s.mvhd=function(p,e){e*=p;var o=Math.floor(e/(y+1)),n=Math.floor(e%(y+1)),l=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,o>>24,o>>16&255,o>>8&255,o&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 s.box(s.types.mvhd,l)},s.sdtp=function(p){var e=p.samples||[],o=new Uint8Array(4+e.length),n,l;for(n=0;n<e.length;n++)l=e[n].flags,o[n+4]=l.dependsOn<<4|l.isDependedOn<<2|l.hasRedundancy;return s.box(s.types.sdtp,o)},s.stbl=function(p){return s.box(s.types.stbl,s.stsd(p),s.box(s.types.stts,s.STTS),s.box(s.types.stsc,s.STSC),s.box(s.types.stsz,s.STSZ),s.box(s.types.stco,s.STCO))},s.avc1=function(p){var e=[],o=[],n,l,r;for(n=0;n<p.sps.length;n++)l=p.sps[n],r=l.byteLength,e.push(r>>>8&255),e.push(r&255),e=e.concat(Array.prototype.slice.call(l));for(n=0;n<p.pps.length;n++)l=p.pps[n],r=l.byteLength,o.push(r>>>8&255),o.push(r&255),o=o.concat(Array.prototype.slice.call(l));var i=s.box(s.types.avcC,new Uint8Array([1,e[3],e[4],e[5],252|3,224|p.sps.length].concat(e).concat([p.pps.length]).concat(o))),t=p.width,a=p.height,c=p.pixelRatio[0],d=p.pixelRatio[1];return s.box(s.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,t>>8&255,t&255,a>>8&255,a&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,s.box(s.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),s.box(s.types.pasp,new Uint8Array([c>>24,c>>16&255,c>>8&255,c&255,d>>24,d>>16&255,d>>8&255,d&255])))},s.esds=function(p){var e=p.config.length;return new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(p.config).concat([6,1,2]))},s.mp4a=function(p){var e=p.samplerate;return s.box(s.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,e>>8&255,e&255,0,0]),s.box(s.types.esds,s.esds(p)))},s.mp3=function(p){var e=p.samplerate;return s.box(s.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,e>>8&255,e&255,0,0]))},s.stsd=function(p){return p.type==="audio"?!p.isAAC&&p.codec==="mp3"?s.box(s.types.stsd,s.STSD,s.mp3(p)):s.box(s.types.stsd,s.STSD,s.mp4a(p)):s.box(s.types.stsd,s.STSD,s.avc1(p))},s.tkhd=function(p){var e=p.id,o=p.duration*p.timescale,n=p.width,l=p.height,r=Math.floor(o/(y+1)),i=Math.floor(o%(y+1));return s.box(s.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,0,0,0,0,r>>24,r>>16&255,r>>8&255,r&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,l>>8&255,l&255,0,0]))},s.traf=function(p,e){var o=s.sdtp(p),n=p.id,l=Math.floor(e/(y+1)),r=Math.floor(e%(y+1));return s.box(s.types.traf,s.box(s.types.tfhd,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,n&255])),s.box(s.types.tfdt,new Uint8Array([1,0,0,0,l>>24,l>>16&255,l>>8&255,l&255,r>>24,r>>16&255,r>>8&255,r&255])),s.trun(p,o.length+16+20+8+16+8+8),o)},s.trak=function(p){return p.duration=p.duration||4294967295,s.box(s.types.trak,s.tkhd(p),s.mdia(p))},s.trex=function(p){var e=p.id;return s.box(s.types.trex,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,e&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},s.trun=function(p,e){var o=p.samples||[],n=o.length,l=12+16*n,r=new Uint8Array(l),i,t,a,c,d,f;for(e+=8+l,r.set([0,0,15,1,n>>>24&255,n>>>16&255,n>>>8&255,n&255,e>>>24&255,e>>>16&255,e>>>8&255,e&255],0),i=0;i<n;i++)t=o[i],a=t.duration,c=t.size,d=t.flags,f=t.cts,r.set([a>>>24&255,a>>>16&255,a>>>8&255,a&255,c>>>24&255,c>>>16&255,c>>>8&255,c&255,d.isLeading<<2|d.dependsOn,d.isDependedOn<<6|d.hasRedundancy<<4|d.paddingValue<<1|d.isNonSync,d.degradPrio&240<<8,d.degradPrio&15,f>>>24&255,f>>>16&255,f>>>8&255,f&255],12+16*i);return s.box(s.types.trun,r)},s.initSegment=function(p){s.types||s.init();var e=s.moov(p),o=new Uint8Array(s.FTYP.byteLength+e.byteLength);return o.set(s.FTYP),o.set(e,s.FTYP.byteLength),o},s}();g.types=void 0,g.HDLR_TYPES=void 0,g.STTS=void 0,g.STSC=void 0,g.STCO=void 0,g.STSZ=void 0,g.VMHD=void 0,g.SMHD=void 0,g.STSD=void 0,g.FTYP=void 0,g.DINF=void 0,v.default=g},"./src/remux/mp4-remuxer.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"default",function(){return f}),T.d(v,"normalizePts",function(){return h});var y=T("./src/polyfills/number.ts"),g=T("./src/remux/aac-helper.ts"),s=T("./src/remux/mp4-generator.ts"),_=T("./src/events.ts"),p=T("./src/errors.ts"),e=T("./src/utils/logger.ts"),o=T("./src/types/loader.ts"),n=T("./src/utils/timescale-conversion.ts");function l(){return l=Object.assign||function(O){for(var C=1;C<arguments.length;C++){var w=arguments[C];for(var S in w)Object.prototype.hasOwnProperty.call(w,S)&&(O[S]=w[S])}return O},l.apply(this,arguments)}var r=10*1e3,i=1024,t=1152,a=null,c=null,d=!1,f=function(){function O(w,S,A,D){if(D===void 0&&(D=""),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,a===null){var M=navigator.userAgent||"",N=M.match(/Chrome\/(\d+)/i);a=N?parseInt(N[1]):0}if(c===null){var P=navigator.userAgent.match(/Safari\/(\d+)/i);c=P?parseInt(P[1]):0}d=!!a&&a<75||!!c&&c<600}var C=O.prototype;return C.destroy=function(){},C.resetTimeStamp=function(S){e.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=S},C.resetNextTimestamp=function(){e.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},C.resetInitSegment=function(){e.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},C.getVideoStartPts=function(S){var A=!1,D=S.reduce(function(M,N){var P=N.pts-M;return P<-4294967296?(A=!0,h(M,N.pts)):P>0?M:N.pts},S[0].pts);return A&&e.logger.debug("PTS rollover detected"),D},C.remux=function(S,A,D,M,N,P,z,X){var k,F,U,L,B,Z,re=N,he=N,Ce=S.pid>-1,ke=A.pid>-1,te=A.samples.length,Re=S.samples.length>0,Te=te>1,pe=(!Ce||Re)&&(!ke||Te)||this.ISGenerated||z;if(pe){this.ISGenerated||(U=this.generateIS(S,A,N));var me=this.isVideoContiguous,se=-1;if(Te&&(se=u(A.samples),!me&&this.config.forceKeyFrameOnDiscontinuity))if(Z=!0,se>0){e.logger.warn("[mp4-remuxer]: Dropped "+se+" out of "+te+" 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&&(e.logger.warn("[mp4-remuxer]: No keyframe found out of "+te+" video samples"),Z=!1);if(this.ISGenerated){if(Re&&Te){var ae=this.getVideoStartPts(A.samples),fe=h(S.samples[0].pts,ae)-ae,Fe=fe/A.inputTimeScale;re+=Math.max(0,Fe),he+=Math.max(0,-Fe)}if(Re){if(S.samplerate||(e.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),U=this.generateIS(S,A,N)),F=this.remuxAudio(S,re,this.isAudioContiguous,P,ke||Te||X===o.PlaylistLevelType.AUDIO?he:void 0),Te){var ie=F?F.endPTS-F.startPTS:0;A.inputTimeScale||(e.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),U=this.generateIS(S,A,N)),k=this.remuxVideo(A,he,me,ie)}}else Te&&(k=this.remuxVideo(A,he,me,0));k&&(k.firstKeyFrame=se,k.independent=se!==-1)}}return this.ISGenerated&&(D.samples.length&&(B=this.remuxID3(D,N)),M.samples.length&&(L=this.remuxText(M,N))),{audio:F,video:k,initSegment:U,independent:Z,text:L,id3:B}},C.generateIS=function(S,A,D){var M=S.samples,N=A.samples,P=this.typeSupported,z={},X=!Object(y.isFiniteNumber)(this._initPTS),k="audio/mp4",F,U,L;if(X&&(F=U=Infinity),S.config&&M.length&&(S.timescale=S.samplerate,S.isAAC||(P.mpeg?(k="audio/mpeg",S.codec=""):P.mp3&&(S.codec="mp3")),z.audio={id:"audio",container:k,codec:S.codec,initSegment:!S.isAAC&&P.mpeg?new Uint8Array(0):s.default.initSegment([S]),metadata:{channelCount:S.channelCount}},X&&(L=S.inputTimeScale,F=U=M[0].pts-Math.round(L*D))),A.sps&&A.pps&&N.length&&(A.timescale=A.inputTimeScale,z.video={id:"main",container:"video/mp4",codec:A.codec,initSegment:s.default.initSegment([A]),metadata:{width:A.width,height:A.height}},X)){L=A.inputTimeScale;var B=this.getVideoStartPts(N),Z=Math.round(L*D);U=Math.min(U,h(N[0].dts,B)-Z),F=Math.min(F,B-Z)}if(Object.keys(z).length)return this.ISGenerated=!0,X&&(this._initPTS=F,this._initDTS=U),{tracks:z,initPTS:F,timescale:L}},C.remuxVideo=function(S,A,D,M){var N=S.inputTimeScale,P=S.samples,z=[],X=P.length,k=this._initPTS,F=this.nextAvcDts,U=8,L,B,Z,re=Number.POSITIVE_INFINITY,he=Number.NEGATIVE_INFINITY,Ce=0,ke=!1;if(!D||F===null){var te=A*N,Re=P[0].pts-h(P[0].dts,P[0].pts);F=te-Re}for(var Te=0;Te<X;Te++){var pe=P[Te];if(pe.pts=h(pe.pts-k,F),pe.dts=h(pe.dts-k,F),pe.dts>pe.pts){var me=9e4*.2;Ce=Math.max(Math.min(Ce,pe.pts-pe.dts),-1*me)}pe.dts<P[Te>0?Te-1:Te].dts&&(ke=!0)}ke&&P.sort(function(rt,xt){var ft=rt.dts-xt.dts,st=rt.pts-xt.pts;return ft||st}),B=P[0].dts,Z=P[P.length-1].dts;var se=Math.round((Z-B)/(X-1));if(Ce<0){if(Ce<se*-2){e.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(n.toMsFromMpegTsClock)(-se,!0)+" ms");for(var be=Ce,ae=0;ae<X;ae++)P[ae].dts=be=Math.max(be,P[ae].pts-se),P[ae].pts=Math.max(be,P[ae].pts)}else{e.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(n.toMsFromMpegTsClock)(Ce,!0)+" ms to overcome this issue");for(var fe=0;fe<X;fe++)P[fe].dts=P[fe].dts+Ce}B=P[0].dts}if(D){var Fe=B-F,ie=Fe>se,q=Fe<-1;if(ie||q){ie?e.logger.warn("AVC: "+Object(n.toMsFromMpegTsClock)(Fe,!0)+" ms ("+Fe+"dts) hole between fragments detected, filling it"):e.logger.warn("AVC: "+Object(n.toMsFromMpegTsClock)(-Fe,!0)+" ms ("+Fe+"dts) overlapping between fragments detected"),B=F;var Q=P[0].pts-Fe;P[0].dts=B,P[0].pts=Q,e.logger.log("Video: First PTS/DTS adjusted: "+Object(n.toMsFromMpegTsClock)(Q,!0)+"/"+Object(n.toMsFromMpegTsClock)(B,!0)+", delta: "+Object(n.toMsFromMpegTsClock)(Fe,!0)+" ms")}}d&&(B=Math.max(0,B));for(var Y=0,oe=0,le=0;le<X;le++){for(var Ee=P[le],Le=Ee.units,ge=Le.length,De=0,_e=0;_e<ge;_e++)De+=Le[_e].data.length;oe+=De,Y+=ge,Ee.length=De,Ee.dts=Math.max(Ee.dts,B),Ee.pts=Math.max(Ee.pts,Ee.dts,0),re=Math.min(Ee.pts,re),he=Math.max(Ee.pts,he)}Z=P[X-1].dts;var Xe=oe+4*Y+8,tt;try{tt=new Uint8Array(Xe)}catch(rt){this.observer.emit(_.Events.ERROR,_.Events.ERROR,{type:p.ErrorTypes.MUX_ERROR,details:p.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Xe,reason:"fail allocating video mdat "+Xe});return}var ze=new DataView(tt.buffer);ze.setUint32(0,Xe),tt.set(s.default.types.mdat,4);for(var Me=0;Me<X;Me++){for(var Et=P[Me],Oe=Et.units,Ve=0,Je=0,Ye=Oe.length;Je<Ye;Je++){var Pe=Oe[Je],He=Pe.data,ve=Pe.data.byteLength;ze.setUint32(U,ve),U+=4,tt.set(He,U),U+=ve,Ve+=4+ve}if(Me<X-1)L=P[Me+1].dts-Et.dts;else{var xe=this.config,de=Et.dts-P[Me>0?Me-1:Me].dts;if(xe.stretchShortVideoTrack&&this.nextAudioPts!==null){var je=Math.floor(xe.maxBufferHole*N),Qe=(M?re+M*N:this.nextAudioPts)-Et.pts;Qe>je?(L=Qe-de,L<0&&(L=de),e.logger.log("[mp4-remuxer]: It is approximately "+Qe/90+" ms to the next segment; using duration "+L/90+" ms for the last video frame.")):L=de}else L=de}var ne=Math.round(Et.pts-Et.dts);z.push(new E(Et.key,L,Ve,ne))}if(z.length&&a&&a<70){var Ze=z[0].flags;Ze.dependsOn=2,Ze.isNonSync=0}console.assert(L!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=F=Z+L,this.isVideoContiguous=!0;var lt=s.default.moof(S.sequenceNumber++,B,l({},S,{samples:z})),Be="video",$e={data1:lt,data2:tt,startPTS:re/N,endPTS:(he+L)/N,startDTS:B/N,endDTS:F/N,type:Be,hasAudio:!1,hasVideo:!0,nb:z.length,dropped:S.dropped};return S.samples=[],S.dropped=0,console.assert(tt.length,"MDAT length must not be zero"),$e},C.remuxAudio=function(S,A,D,M,N){var P=S.inputTimeScale,z=S.samplerate?S.samplerate:P,X=P/z,k=S.isAAC?i:t,F=k*X,U=this._initPTS,L=!S.isAAC&&this.typeSupported.mpeg,B=[],Z=S.samples,re=L?0:8,he=this.nextAudioPts||-1,Ce=A*P;if(this.isAudioContiguous=D=D||Z.length&&he>0&&(M&&Math.abs(Ce-he)<9e3||Math.abs(h(Z[0].pts-U,Ce)-he)<20*F),Z.forEach(function(He){He.pts=h(He.pts-U,Ce)}),!D||he<0){if(Z=Z.filter(function(He){return He.pts>=0}),!Z.length)return;N===0?he=0:M?he=Math.max(0,Ce):he=Z[0].pts}if(S.isAAC)for(var ke=N!==void 0,te=this.config.maxAudioFramesDrift,Re=0,Te=he;Re<Z.length;Re++){var pe=Z[Re],me=pe.pts,se=me-Te,be=Math.abs(1e3*se/P);if(se<=-te*F&&ke)Re===0&&(e.logger.warn("Audio frame @ "+(me/P).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*se/P)+" ms."),this.nextAudioPts=he=Te=me);else if(se>=te*F&&be<r&&ke){var ae=Math.round(se/F);Te=me-ae*F,Te<0&&(ae--,Te+=F),Re===0&&(this.nextAudioPts=he=Te),e.logger.warn("[mp4-remuxer]: Injecting "+ae+" audio frame @ "+(Te/P).toFixed(3)+"s due to "+Math.round(1e3*se/P)+" ms gap.");for(var fe=0;fe<ae;fe++){var Fe=Math.max(Te,0),ie=g.default.getSilentFrame(S.manifestCodec||S.codec,S.channelCount);ie||(e.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),ie=pe.unit.subarray()),Z.splice(Re,0,{unit:ie,pts:Fe}),Te+=F,Re++}}pe.pts=Te,Te+=F}for(var q=null,Q=null,Y,oe=0,le=Z.length;le--;)oe+=Z[le].unit.byteLength;for(var Ee=0,Le=Z.length;Ee<Le;Ee++){var ge=Z[Ee],De=ge.unit,_e=ge.pts;if(Q!==null){var Xe=B[Ee-1];Xe.duration=Math.round((_e-Q)/X)}else if(D&&S.isAAC&&(_e=he),q=_e,oe>0){oe+=re;try{Y=new Uint8Array(oe)}catch(He){this.observer.emit(_.Events.ERROR,_.Events.ERROR,{type:p.ErrorTypes.MUX_ERROR,details:p.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:oe,reason:"fail allocating audio mdat "+oe});return}if(!L){var tt=new DataView(Y.buffer);tt.setUint32(0,oe),Y.set(s.default.types.mdat,4)}}else return;Y.set(De,re);var ze=De.byteLength;re+=ze,B.push(new E(!0,k,ze,0)),Q=_e}var Me=B.length;if(!Me)return;var Et=B[B.length-1];this.nextAudioPts=he=Q+X*Et.duration;var Oe=L?new Uint8Array(0):s.default.moof(S.sequenceNumber++,q/X,l({},S,{samples:B}));S.samples=[];var Ve=q/P,Je=he/P,Ye="audio",Pe={data1:Oe,data2:Y,startPTS:Ve,endPTS:Je,startDTS:Ve,endDTS:Je,type:Ye,hasAudio:!0,hasVideo:!1,nb:Me};return this.isAudioContiguous=!0,console.assert(Y.length,"MDAT length must not be zero"),Pe},C.remuxEmptyAudio=function(S,A,D,M){var N=S.inputTimeScale,P=S.samplerate?S.samplerate:N,z=N/P,X=this.nextAudioPts,k=(X!==null?X:M.startDTS*N)+this._initDTS,F=M.endDTS*N+this._initDTS,U=z*i,L=Math.ceil((F-k)/U),B=g.default.getSilentFrame(S.manifestCodec||S.codec,S.channelCount);if(e.logger.warn("[mp4-remuxer]: remux empty Audio"),!B){e.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var Z=[],re=0;re<L;re++){var he=k+re*U;Z.push({unit:B,pts:he,dts:he})}return S.samples=Z,this.remuxAudio(S,A,D,!1)},C.remuxID3=function(S,A){var D=S.samples.length;if(!D)return;for(var M=S.inputTimeScale,N=this._initPTS,P=this._initDTS,z=0;z<D;z++){var X=S.samples[z];X.pts=h(X.pts-N,A*M)/M,X.dts=h(X.dts-P,A*M)/M}var k=S.samples;return S.samples=[],{samples:k}},C.remuxText=function(S,A){var D=S.samples.length;if(!D)return;for(var M=S.inputTimeScale,N=this._initPTS,P=0;P<D;P++){var z=S.samples[P];z.pts=h(z.pts-N,A*M)/M}S.samples.sort(function(k,F){return k.pts-F.pts});var X=S.samples;return S.samples=[],{samples:X}},O}();function h(O,C){var w;if(C===null)return O;for(C<O?w=-8589934592:w=8589934592;Math.abs(O-C)>4294967296;)O+=w;return O}function u(O){for(var C=0;C<O.length;C++)if(O[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 x(C)},x=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,v,T){"use strict";T.r(v);var y=T("./src/polyfills/number.ts"),g=T("./src/utils/mp4-tools.ts"),s=T("./src/loader/fragment.ts"),_=T("./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 l=n.prototype;return l.destroy=function(){},l.resetTimeStamp=function(i){this.initPTS=i,this.lastEndDTS=null},l.resetNextTimestamp=function(){this.lastEndDTS=null},l.resetInitSegment=function(i,t,a){this.audioCodec=t,this.videoCodec=a,this.generateInitSegment(i),this.emitInitSegment=!0},l.generateInitSegment=function(i){var t=this.audioCodec,a=this.videoCodec;if(!i||!i.byteLength){this.initTracks=void 0,this.initData=void 0;return}var c=this.initData=Object(g.parseInitSegment)(i);t||(t=o(c.audio,s.ElementaryStreamTypes.AUDIO)),a||(a=o(c.video,s.ElementaryStreamTypes.VIDEO));var d={};c.audio&&c.video?d.audiovideo={container:"video/mp4",codec:t+","+a,initSegment:i,id:"main"}:c.audio?d.audio={container:"audio/mp4",codec:t,initSegment:i,id:"audio"}:c.video?d.video={container:"video/mp4",codec:a,initSegment:i,id:"main"}:_.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=d},l.remux=function(i,t,a,c,d){var f=this.initPTS,h=this.lastEndDTS,u={audio:void 0,video:void 0,text:c,id3:a,initSegment:void 0};Object(y.isFiniteNumber)(h)||(h=this.lastEndDTS=d||0);var E=t.samples;if(!E||!E.length)return u;var x={initPTS:void 0,timescale:1},O=this.initData;if((!O||!O.length)&&(this.generateInitSegment(E),O=this.initData),!O||!O.length)return _.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),u;this.emitInitSegment&&(x.tracks=this.initTracks,this.emitInitSegment=!1),Object(y.isFiniteNumber)(f)||(this.initPTS=x.initPTS=f=e(O,E,h));var C=Object(g.getDuration)(E,O),w=h,S=C+w;Object(g.offsetStartDTS)(O,E,f),C>0?this.lastEndDTS=S:(_.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var A=!!O.audio,D=!!O.video,M="";A&&(M+="audio"),D&&(M+="video");var N={data1:E,startPTS:w,startDTS:w,endPTS:S,endDTS:S,type:M,hasAudio:A,hasVideo:D,nb:1,dropped:0};return u.audio=N.type==="audio"?N:void 0,u.video=N.type!=="audio"?N:void 0,u.text=c,u.id3=a,u.initSegment=x,u},n}(),e=function(l,r,i){return Object(g.getStartDTS)(l,r)-i};function o(n,l){var r=n==null?void 0:n.codec;return r&&r.length>4?r:r==="hvc1"?"hvc1.1.c.L120.90":r==="av01"?"av01.0.04M.08":r==="avc1"||l===s.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}v.default=p},"./src/task-loop.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"default",function(){return y});var y=function(){function g(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var s=g.prototype;return s.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},s.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},s.onHandlerDestroyed=function(){},s.hasInterval=function(){return!!this._tickInterval},s.hasNextTick=function(){return!!this._tickTimer},s.setInterval=function(p){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,p),!0)},s.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},s.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},s.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},s.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},s.doTick=function(){},g}()},"./src/types/cmcd.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"CMCDVersion",function(){return y}),T.d(v,"CMCDObjectType",function(){return g}),T.d(v,"CMCDStreamingFormat",function(){return s}),T.d(v,"CMCDStreamType",function(){return _});var y=1,g;(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"})(g||(g={}));var s;(function(p){p.DASH="d",p.HLS="h",p.SMOOTH="s",p.OTHER="o"})(s||(s={}));var _;(function(p){p.VOD="v",p.LIVE="l"})(_||(_={}))},"./src/types/level.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"HlsSkip",function(){return s}),T.d(v,"getSkipValue",function(){return _}),T.d(v,"HlsUrlParameters",function(){return p}),T.d(v,"Level",function(){return e});function y(o,n){for(var l=0;l<n.length;l++){var r=n[l];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(o,r.key,r)}}function g(o,n,l){return n&&y(o.prototype,n),l&&y(o,l),o}var s;(function(o){o.No="",o.Yes="YES",o.v2="v2"})(s||(s={}));function _(o,n){var l=o.canSkipUntil,r=o.canSkipDateRanges,i=o.endSN,t=n!==void 0?n-i:0;return l&&t<l?r?s.v2:s.Yes:s.No}var p=function(){function o(l,r,i){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=l,this.part=r,this.skip=i}var n=o.prototype;return n.addDirectives=function(r){var i=new self.URL(r);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()},o}(),e=function(){function o(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(l){return l}).join(",").replace(/\.[^.,]+/g,"")}return g(o,[{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(l){var r=l%this.url.length;this._urlId!==r&&(this.details=void 0,this._urlId=r)}}]),o}()},"./src/types/loader.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"PlaylistContextType",function(){return y}),T.d(v,"PlaylistLevelType",function(){return g});var y;(function(s){s.MANIFEST="manifest",s.LEVEL="level",s.AUDIO_TRACK="audioTrack",s.SUBTITLE_TRACK="subtitleTrack"})(y||(y={}));var g;(function(s){s.MAIN="main",s.AUDIO="audio",s.SUBTITLE="subtitle"})(g||(g={}))},"./src/types/transmuxer.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"ChunkMetadata",function(){return y});var y=function(_,p,e,o,n,l){o===void 0&&(o=0),n===void 0&&(n=-1),l===void 0&&(l=!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=g(),this.buffering={audio:g(),video:g(),audiovideo:g()},this.level=_,this.sn=p,this.id=e,this.size=o,this.part=n,this.partial=l};function g(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"AttrList",function(){return s});var y=/^(\d+)x(\d+)$/,g=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,s=function(){function _(e){typeof e=="string"&&(e=_.parseAttrList(e));for(var o in e)e.hasOwnProperty(o)&&(this[o]=e[o])}var p=_.prototype;return p.decimalInteger=function(o){var n=parseInt(this[o],10);return n>Number.MAX_SAFE_INTEGER?Infinity:n},p.hexadecimalInteger=function(o){if(this[o]){var n=(this[o]||"0x").slice(2);n=(n.length&1?"0":"")+n;for(var l=new Uint8Array(n.length/2),r=0;r<n.length/2;r++)l[r]=parseInt(n.slice(r*2,r*2+2),16);return l}else return null},p.hexadecimalIntegerAsNumber=function(o){var n=parseInt(this[o],16);return n>Number.MAX_SAFE_INTEGER?Infinity:n},p.decimalFloatingPoint=function(o){return parseFloat(this[o])},p.optionalFloat=function(o,n){var l=this[o];return l?parseFloat(l):n},p.enumeratedString=function(o){return this[o]},p.bool=function(o){return this[o]==="YES"},p.decimalResolution=function(o){var n=y.exec(this[o]);return n===null?void 0:{width:parseInt(n[1],10),height:parseInt(n[2],10)}},_.parseAttrList=function(o){var n,l={},r='"';for(g.lastIndex=0;(n=g.exec(o))!==null;){var i=n[2];i.indexOf(r)===0&&i.lastIndexOf(r)===i.length-1&&(i=i.slice(1,-1)),l[n[1]]=i}return l},_}()},"./src/utils/binary-search.ts":function(I,v,T){"use strict";T.r(v);var y={search:function(s,_){for(var p=0,e=s.length-1,o=null,n=null;p<=e;){o=(p+e)/2|0,n=s[o];var l=_(n);if(l>0)p=o+1;else if(l<0)e=o-1;else return n}return null}};v.default=y},"./src/utils/buffer-helper.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"BufferHelper",function(){return s});var y=T("./src/utils/logger.ts"),g={length:0,start:function(){return 0},end:function(){return 0}},s=function(){function _(){}return _.isBuffered=function(e,o){try{if(e){for(var n=_.getBuffered(e),l=0;l<n.length;l++)if(o>=n.start(l)&&o<=n.end(l))return!0}}catch(r){}return!1},_.bufferInfo=function(e,o,n){try{if(e){var l=_.getBuffered(e),r=[],i;for(i=0;i<l.length;i++)r.push({start:l.start(i),end:l.end(i)});return this.bufferedInfo(r,o,n)}}catch(t){}return{len:0,start:o,end:o,nextStart:void 0}},_.bufferedInfo=function(e,o,n){o=Math.max(0,o),e.sort(function(x,O){var C=x.start-O.start;return C||O.end-x.end});var l=[];if(n)for(var r=0;r<e.length;r++){var i=l.length;if(i){var t=l[i-1].end;e[r].start-t<n?e[r].end>t&&(l[i-1].end=e[r].end):l.push(e[r])}else l.push(e[r])}else l=e;for(var a=0,c,d=o,f=o,h=0;h<l.length;h++){var u=l[h].start,E=l[h].end;if(o+n>=u&&o<E)d=u,f=E,a=f-o;else if(o+n<u){c=u;break}}return{len:a,start:d||0,end:f||0,nextStart:c}},_.getBuffered=function(e){try{return e.buffered}catch(o){return y.logger.log("failed to get media.buffered",o),g}},_}()},"./src/utils/cea-608-parser.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"Row",function(){return f}),T.d(v,"CaptionScreen",function(){return h});var y=T("./src/utils/logger.ts"),g={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},s=function(S){var A=S;return g.hasOwnProperty(S)&&(A=g[S]),String.fromCharCode(A)},_=15,p=100,e={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},o={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},l={25:2,26:4,29:6,30:8,31:10,27:13,28:15},r=["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 t=function(){function w(){this.time=null,this.verboseLevel=i.ERROR}var S=w.prototype;return S.log=function(D,M){this.verboseLevel>=D&&y.logger.log(this.time+" ["+D+"] "+M)},w}(),a=function(S){for(var A=[],D=0;D<S.length;D++)A.push(S[D].toString(16));return A},c=function(){function w(A,D,M,N,P){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=D||!1,this.italics=M||!1,this.background=N||"black",this.flash=P||!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(D){for(var M=["foreground","underline","italics","background","flash"],N=0;N<M.length;N++){var P=M[N];D.hasOwnProperty(P)&&(this[P]=D[P])}},S.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},S.equals=function(D){return this.foreground===D.foreground&&this.underline===D.underline&&this.italics===D.italics&&this.background===D.background&&this.flash===D.flash},S.copy=function(D){this.foreground=D.foreground,this.underline=D.underline,this.italics=D.italics,this.background=D.background,this.flash=D.flash},S.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},w}(),d=function(){function w(A,D,M,N,P,z){this.uchar=void 0,this.penState=void 0,this.uchar=A||" ",this.penState=new c(D,M,N,P,z)}var S=w.prototype;return S.reset=function(){this.uchar=" ",this.penState.reset()},S.setChar=function(D,M){this.uchar=D,this.penState.copy(M)},S.setPenState=function(D){this.penState.copy(D)},S.equals=function(D){return this.uchar===D.uchar&&this.penState.equals(D.penState)},S.copy=function(D){this.uchar=D.uchar,this.penState.copy(D.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 D=0;D<p;D++)this.chars.push(new d);this.logger=A,this.pos=0,this.currPenState=new c}var S=w.prototype;return S.equals=function(D){for(var M=!0,N=0;N<p;N++)if(!this.chars[N].equals(D.chars[N])){M=!1;break}return M},S.copy=function(D){for(var M=0;M<p;M++)this.chars[M].copy(D.chars[M])},S.isEmpty=function(){for(var D=!0,M=0;M<p;M++)if(!this.chars[M].isEmpty()){D=!1;break}return D},S.setCursor=function(D){this.pos!==D&&(this.pos=D),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(D){var M=this.pos+D;if(D>1)for(var N=this.pos+1;N<M+1;N++)this.chars[N].setPenState(this.currPenState);this.setCursor(M)},S.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},S.insertChar=function(D){D>=144&&this.backSpace();var M=s(D);if(this.pos>=p){this.logger.log(i.ERROR,"Cannot insert "+D.toString(16)+" ("+M+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(M,this.currPenState),this.moveCursor(1)},S.clearFromPos=function(D){var M;for(M=D;M<p;M++)this.chars[M].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 D=[],M=!0,N=0;N<p;N++){var P=this.chars[N].uchar;P!==" "&&(M=!1),D.push(P)}return M?"":D.join("")},S.setPenStyles=function(D){this.currPenState.setStyles(D);var M=this.chars[this.pos];M.setPenState(this.currPenState)},w}(),h=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 D=0;D<_;D++)this.rows.push(new f(A));this.logger=A,this.currRow=_-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var S=w.prototype;return S.reset=function(){for(var D=0;D<_;D++)this.rows[D].clear();this.currRow=_-1},S.equals=function(D){for(var M=!0,N=0;N<_;N++)if(!this.rows[N].equals(D.rows[N])){M=!1;break}return M},S.copy=function(D){for(var M=0;M<_;M++)this.rows[M].copy(D.rows[M])},S.isEmpty=function(){for(var D=!0,M=0;M<_;M++)if(!this.rows[M].isEmpty()){D=!1;break}return D},S.backSpace=function(){var D=this.rows[this.currRow];D.backSpace()},S.clearToEndOfRow=function(){var D=this.rows[this.currRow];D.clearToEndOfRow()},S.insertChar=function(D){var M=this.rows[this.currRow];M.insertChar(D)},S.setPen=function(D){var M=this.rows[this.currRow];M.setPenStyles(D)},S.moveCursor=function(D){var M=this.rows[this.currRow];M.moveCursor(D)},S.setCursor=function(D){this.logger.log(i.INFO,"setCursor: "+D);var M=this.rows[this.currRow];M.setCursor(D)},S.setPAC=function(D){this.logger.log(i.INFO,"pacData = "+JSON.stringify(D));var M=D.row-1;if(this.nrRollUpRows&&M<this.nrRollUpRows-1&&(M=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==M){for(var N=0;N<_;N++)this.rows[N].clear();var P=this.currRow+1-this.nrRollUpRows,z=this.lastOutputScreen;if(z){var X=z.rows[P].cueStartTime,k=this.logger.time;if(X&&k!==null&&X<k)for(var F=0;F<this.nrRollUpRows;F++)this.rows[M-this.nrRollUpRows+F+1].copy(z.rows[P+F])}}this.currRow=M;var U=this.rows[this.currRow];if(D.indent!==null){var L=D.indent,B=Math.max(L-1,0);U.setCursor(D.indent),D.color=U.chars[B].penState.foreground}var Z={foreground:D.color,underline:D.underline,italics:D.italics,background:"black",flash:!1};this.setPen(Z)},S.setBkgData=function(D){this.logger.log(i.INFO,"bkgData = "+JSON.stringify(D)),this.backSpace(),this.setPen(D),this.insertChar(32)},S.setRollUpRows=function(D){this.nrRollUpRows=D},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 D=this.currRow+1-this.nrRollUpRows,M=this.rows.splice(D,1)[0];M.clear(),this.rows.splice(this.currRow,0,M),this.logger.log(i.INFO,"Rolling up")},S.getDisplayText=function(D){D=D||!1;for(var M=[],N="",P=-1,z=0;z<_;z++){var X=this.rows[z].getTextString();X&&(P=z+1,D?M.push("Row "+P+": '"+X+"'"):M.push(X.trim()))}return M.length>0&&(D?N="["+M.join(" | ")+"]":N=M.join(`
|
|
|
`)),N},S.getTextAndFormat=function(){return this.rows},w}(),u=function(){function w(A,D,M){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=D,this.mode=null,this.verbose=0,this.displayedMemory=new h(M),this.nonDisplayedMemory=new h(M),this.lastOutputScreen=new h(M),this.currRollUpRow=this.displayedMemory.rows[_-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=M}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[_-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},S.getHandler=function(){return this.outputFilter},S.setHandler=function(D){this.outputFilter=D},S.setPAC=function(D){this.writeScreen.setPAC(D)},S.setBkgData=function(D){this.writeScreen.setBkgData(D)},S.setMode=function(D){if(D===this.mode)return;this.mode=D,this.logger.log(i.INFO,"MODE="+D),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=D},S.insertChars=function(D){for(var M=0;M<D.length;M++)this.writeScreen.insertChar(D[M]);var N=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(i.INFO,N+": "+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(D){this.logger.log(i.INFO,"RU("+D+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(D)},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 D=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=D,this.writeScreen=this.nonDisplayedMemory,this.logger.log(i.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},S.ccTO=function(D){this.logger.log(i.INFO,"TO("+D+") - Tab Offset"),this.writeScreen.moveCursor(D)},S.ccMIDROW=function(D){var M={flash:!1};if(M.underline=D%2===1,M.italics=D>=46,M.italics)M.foreground="white";else{var N=Math.floor(D/2)-16,P=["white","green","blue","cyan","red","yellow","magenta"];M.foreground=P[N]}this.logger.log(i.INFO,"MIDROW: "+JSON.stringify(M)),this.writeScreen.setPen(M)},S.outputDataUpdate=function(D){D===void 0&&(D=!1);var M=this.logger.time;if(M===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=M:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,M,this.lastOutputScreen),D&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:M),this.lastOutputScreen.copy(this.displayedMemory))},S.cueSplitAtTime=function(D){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,D,this.displayedMemory),this.cueStartTime=D))},w}(),E=function(){function w(A,D,M){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var N=new t;this.channels=[null,new u(A,D,N),new u(A+1,M,N)],this.cmdHistory=C(),this.logger=N}var S=w.prototype;return S.getHandler=function(D){return this.channels[D].getHandler()},S.setHandler=function(D,M){this.channels[D].setHandler(M)},S.addData=function(D,M){var N,P,z,X=!1;this.logger.time=D;for(var k=0;k<M.length;k+=2){if(P=M[k]&127,z=M[k+1]&127,P===0&&z===0)continue;if(this.logger.log(i.DATA,"["+a([M[k],M[k+1]])+"] -> ("+a([P,z])+")"),N=this.parseCmd(P,z),N||(N=this.parseMidrow(P,z)),N||(N=this.parsePAC(P,z)),N||(N=this.parseBackgroundAttributes(P,z)),!N&&(X=this.parseChars(P,z),X)){var F=this.currentChannel;if(F&&F>0){var U=this.channels[F];U.insertChars(X)}else this.logger.log(i.WARNING,"No channel found yet. TEXT-MODE?")}!N&&!X&&this.logger.log(i.WARNING,"Couldn't parse cleaned data "+a([P,z])+" orig: "+a([M[k],M[k+1]]))}},S.parseCmd=function(D,M){var N=this.cmdHistory,P=(D===20||D===28||D===21||D===29)&&M>=32&&M<=47,z=(D===23||D===31)&&M>=33&&M<=35;if(!(P||z))return!1;if(O(D,M,N))return x(null,null,N),this.logger.log(i.DEBUG,"Repeated command ("+a([D,M])+") is dropped"),!0;var X=D===20||D===21||D===23?1:2,k=this.channels[X];return D===20||D===21||D===28||D===29?M===32?k.ccRCL():M===33?k.ccBS():M===34?k.ccAOF():M===35?k.ccAON():M===36?k.ccDER():M===37?k.ccRU(2):M===38?k.ccRU(3):M===39?k.ccRU(4):M===40?k.ccFON():M===41?k.ccRDC():M===42?k.ccTR():M===43?k.ccRTD():M===44?k.ccEDM():M===45?k.ccCR():M===46?k.ccENM():M===47&&k.ccEOC():k.ccTO(M-32),x(D,M,N),this.currentChannel=X,!0},S.parseMidrow=function(D,M){var N=0;if((D===17||D===25)&&M>=32&&M<=47){if(D===17?N=1:N=2,N!==this.currentChannel)return this.logger.log(i.ERROR,"Mismatch channel in midrow parsing"),!1;var P=this.channels[N];return P?(P.ccMIDROW(M),this.logger.log(i.DEBUG,"MIDROW ("+a([D,M])+")"),!0):!1}return!1},S.parsePAC=function(D,M){var N,P=this.cmdHistory,z=(D>=17&&D<=23||D>=25&&D<=31)&&M>=64&&M<=127,X=(D===16||D===24)&&M>=64&&M<=95;if(!(z||X))return!1;if(O(D,M,P))return x(null,null,P),!0;var k=D<=23?1:2;M>=64&&M<=95?N=k===1?e[D]:n[D]:N=k===1?o[D]:l[D];var F=this.channels[k];return F?(F.setPAC(this.interpretPAC(N,M)),x(D,M,P),this.currentChannel=k,!0):!1},S.interpretPAC=function(D,M){var N,P={color:null,italics:!1,indent:null,underline:!1,row:D};return M>95?N=M-96:N=M-64,P.underline=(N&1)===1,N<=13?P.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(N/2)]:N<=15?(P.italics=!0,P.color="white"):P.indent=Math.floor((N-16)/2)*4,P},S.parseChars=function(D,M){var N,P=null,z=null;if(D>=25?(N=2,z=D-8):(N=1,z=D),z>=17&&z<=19){var X;z===17?X=M+80:z===18?X=M+112:X=M+144,this.logger.log(i.INFO,"Special char '"+s(X)+"' in channel "+N),P=[X]}else D>=32&&D<=127&&(P=M===0?[D]:[D,M]);if(P){var k=a(P);this.logger.log(i.DEBUG,"Char codes = "+k.join(",")),x(D,M,this.cmdHistory)}return P},S.parseBackgroundAttributes=function(D,M){var N=(D===16||D===24)&&M>=32&&M<=47,P=(D===23||D===31)&&M>=45&&M<=47;if(!(N||P))return!1;var z,X={};D===16||D===24?(z=Math.floor((M-32)/2),X.background=r[z],M%2===1&&(X.background=X.background+"_semi")):M===45?X.background="transparent":(X.foreground="black",M===47&&(X.underline=!0));var k=D<=23?1:2,F=this.channels[k];return F.setBkgData(X),x(D,M,this.cmdHistory),!0},S.reset=function(){for(var D=0;D<Object.keys(this.channels).length;D++){var M=this.channels[D];M&&M.reset()}this.cmdHistory=C()},S.cueSplitAtTime=function(D){for(var M=0;M<this.channels.length;M++){var N=this.channels[M];N&&N.cueSplitAtTime(D)}},w}();function x(w,S,A){A.a=w,A.b=S}function O(w,S,A){return A.a===w&&A.b===S}function C(){return{a:null,b:null}}v.default=E},"./src/utils/codecs.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"isCodecType",function(){return g}),T.d(v,"isCodecSupportedInMp4",function(){return s});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 g(_,p){var e=y[p];return!!e&&e[_.slice(0,4)]===!0}function s(_,p){return MediaSource.isTypeSupported((p||"video")+'/mp4;codecs="'+_+'"')}},"./src/utils/cues.ts":function(I,v,T){"use strict";T.r(v);var y=T("./src/utils/vttparser.ts"),g=T("./src/utils/webvtt-parser.ts"),s=T("./src/utils/texttrack-utils.ts"),_=/\s/,p={newCue:function(o,n,l,r){for(var i=[],t,a,c,d,f,h=self.VTTCue||self.TextTrackCue,u=0;u<r.rows.length;u++)if(t=r.rows[u],c=!0,d=0,f="",!t.isEmpty()){for(var E=0;E<t.chars.length;E++)_.test(t.chars[E].uchar)&&c?d++:(f+=t.chars[E].uchar,c=!1);t.cueStartTime=n,n===l&&(l+=1e-4),d>=16?d--:d++;var x=Object(y.fixLineBreaks)(f.trim()),O=Object(g.generateCueId)(n,l,x);(!o||!o.cues||!o.cues.getCueById(O))&&(a=new h(n,l,x),a.id=O,a.line=u+1,a.align="left",a.position=10+Math.min(80,Math.floor(d*8/32)*10),i.push(a))}return o&&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(s.addCueToTrack)(o,C)})),i}};v.default=p},"./src/utils/discontinuities.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"findFirstFragWithCC",function(){return _}),T.d(v,"shouldAlignOnDiscontinuities",function(){return p}),T.d(v,"findDiscontinuousReferenceFrag",function(){return e}),T.d(v,"adjustSlidingStart",function(){return n}),T.d(v,"alignStream",function(){return l}),T.d(v,"alignPDT",function(){return i}),T.d(v,"alignFragmentByPDTDelta",function(){return t}),T.d(v,"alignMediaPlaylistByPDT",function(){return a});var y=T("./src/polyfills/number.ts"),g=T("./src/utils/logger.ts"),s=T("./src/controller/level-helper.ts");function _(c,d){for(var f=null,h=0,u=c.length;h<u;h++){var E=c[h];if(E&&E.cc===d){f=E;break}}return f}function p(c,d,f){return!!(d.details&&(f.endCC>f.startCC||c&&c.cc<f.startCC))}function e(c,d){var f=c.fragments,h=d.fragments;if(!h.length||!f.length){g.logger.log("No fragments to align");return}var u=_(f,h[0].cc);if(!u||u&&!u.startPTS){g.logger.log("No frag in previous level to align on");return}return u}function o(c,d){if(c){var f=c.start+d;c.start=c.startPTS=f,c.endPTS=f+c.duration}}function n(c,d){for(var f=d.fragments,h=0,u=f.length;h<u;h++)o(f[h],c);d.fragmentHint&&o(d.fragmentHint,c),d.alignedSliding=!0}function l(c,d,f){if(!d)return;r(c,f,d),!f.alignedSliding&&d.details&&i(f,d.details),!f.alignedSliding&&d.details&&!f.skippedSegments&&Object(s.adjustSliding)(d.details,f)}function r(c,d,f){if(p(c,f,d)){var h=e(f.details,d);h&&Object(y.isFiniteNumber)(h.start)&&(g.logger.log("Adjusting PTS using last level due to CC increase within current level "+d.url),n(h.start,d))}}function i(c,d){if(!d.fragments.length||!c.hasProgramDateTime||!d.hasProgramDateTime)return;var f=d.fragments[0].programDateTime,h=c.fragments[0].programDateTime,u=(h-f)/1e3+d.fragments[0].start;u&&Object(y.isFiniteNumber)(u)&&(g.logger.log("Adjusting PTS using programDateTime delta "+(h-f)+"ms, sliding:"+u.toFixed(3)+" "+c.url+" "),n(u,c))}function t(c,d){var f=c.programDateTime;if(!f)return;var h=(f-d)/1e3;c.start=c.startPTS=h,c.endPTS=h+c.duration}function a(c,d){if(!d.fragments.length||!c.hasProgramDateTime||!d.hasProgramDateTime)return;var f=d.fragments[0].programDateTime,h=d.fragments[0].start,u=f-h*1e3;c.fragments.forEach(function(E){t(E,u)}),c.fragmentHint&&t(c.fragmentHint,u),c.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(I,v,T){"use strict";T.r(v);var y=T("./src/utils/ewma.ts"),g=function(){function s(p,e,o){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=o,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new y.default(p),this.fast_=new y.default(e)}var _=s.prototype;return _.update=function(e,o){var n=this.slow_,l=this.fast_;this.slow_.halfLife!==e&&(this.slow_=new y.default(e,n.getEstimate(),n.getTotalWeight())),this.fast_.halfLife!==o&&(this.fast_=new y.default(o,l.getEstimate(),l.getTotalWeight()))},_.sample=function(e,o){e=Math.max(e,this.minDelayMs_);var n=8*o,l=e/1e3,r=n/l;this.fast_.sample(l,r),this.slow_.sample(l,r)},_.canEstimate=function(){var e=this.fast_;return e&&e.getTotalWeight()>=this.minWeight_},_.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},_.destroy=function(){},s}();v.default=g},"./src/utils/ewma.ts":function(I,v,T){"use strict";T.r(v);var y=function(){function g(_,p,e){p===void 0&&(p=0),e===void 0&&(e=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=_,this.alpha_=_?Math.exp(Math.log(.5)/_):0,this.estimate_=p,this.totalWeight_=e}var s=g.prototype;return s.sample=function(p,e){var o=Math.pow(this.alpha_,p);this.estimate_=e*(1-o)+o*this.estimate_,this.totalWeight_+=p},s.getTotalWeight=function(){return this.totalWeight_},s.getEstimate=function(){if(this.alpha_){var p=1-Math.pow(this.alpha_,this.totalWeight_);if(p)return this.estimate_/p}return this.estimate_},g}();v.default=y},"./src/utils/fetch-loader.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"fetchSupported",function(){return t});var y=T("./src/polyfills/number.ts"),g=T("./src/loader/load-stats.ts"),s=T("./src/demux/chunk-cache.ts");function _(h,u){h.prototype=Object.create(u.prototype),h.prototype.constructor=h,l(h,u)}function p(h){var u=typeof Map=="function"?new Map:void 0;return p=function(x){if(x===null||!n(x))return x;if(typeof x!="function")throw new TypeError("Super expression must either be null or a function");if(typeof u!="undefined"){if(u.has(x))return u.get(x);u.set(x,O)}function O(){return e(x,arguments,r(this).constructor)}return O.prototype=Object.create(x.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),l(O,x)},p(h)}function e(h,u,E){return o()?e=Reflect.construct:e=function(O,C,w){var S=[null];S.push.apply(S,C);var A=Function.bind.apply(O,S),D=new A;return w&&l(D,w.prototype),D},e.apply(null,arguments)}function o(){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(h){return!1}}function n(h){return Function.toString.call(h).indexOf("[native code]")!==-1}function l(h,u){return l=Object.setPrototypeOf||function(x,O){return x.__proto__=O,x},l(h,u)}function r(h){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)},r(h)}function i(){return i=Object.assign||function(h){for(var u=1;u<arguments.length;u++){var E=arguments[u];for(var x in E)Object.prototype.hasOwnProperty.call(E,x)&&(h[x]=E[x])}return h},i.apply(this,arguments)}function t(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(h){}return!1}var a=function(){function h(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||d,this.controller=new self.AbortController,this.stats=new g.LoadStats}var u=h.prototype;return u.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},u.abortInternal=function(){var x=this.response;(!x||!x.ok)&&(this.stats.aborted=!0,this.controller.abort())},u.abort=function(){var x;this.abortInternal(),(x=this.callbacks)!==null&&x!==void 0&&x.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},u.load=function(x,O,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(x,this.controller.signal),D=C.onProgress,M=x.responseType==="arraybuffer",N=M?"byteLength":"length";this.context=x,this.config=O,this.callbacks=C,this.request=this.fetchSetup(x,A),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){w.abortInternal(),C.onTimeout(S,x,w.response)},O.timeout),self.fetch(this.request).then(function(P){if(w.response=w.loader=P,!P.ok){var z=P.status,X=P.statusText;throw new f(X||"fetch, bad network response",z,P)}return S.loading.first=Math.max(self.performance.now(),S.loading.start),S.total=parseInt(P.headers.get("Content-Length")||"0"),D&&Object(y.isFiniteNumber)(O.highWaterMark)?w.loadProgressively(P,S,x,O.highWaterMark,D):M?P.arrayBuffer():P.text()}).then(function(P){var z=w.response;self.clearTimeout(w.requestTimeout),S.loading.end=Math.max(self.performance.now(),S.loading.first),S.loaded=S.total=P[N];var X={url:z.url,data:P};D&&!Object(y.isFiniteNumber)(O.highWaterMark)&&D(S,x,P,z),C.onSuccess(X,S,x,z)}).catch(function(P){if(self.clearTimeout(w.requestTimeout),S.aborted)return;var z=P.code||0;C.onError({code:z,text:P.message},x,P.details)})},u.getCacheAge=function(){var x=null;if(this.response){var O=this.response.headers.get("age");x=O?parseFloat(O):null}return x},u.loadProgressively=function(x,O,C,w,S){w===void 0&&(w=0);var A=new s.default,D=x.body.getReader(),M=function N(){return D.read().then(function(P){if(P.done)return A.dataLength&&S(O,C,A.flush(),x),Promise.resolve(new ArrayBuffer(0));var z=P.value,X=z.length;return O.loaded+=X,X<w||A.dataLength?(A.push(z),A.dataLength>=w&&S(O,C,A.flush(),x)):S(O,C,z,x),N()}).catch(function(){return Promise.reject()})};return M()},h}();function c(h,u){var E={method:"GET",mode:"cors",credentials:"same-origin",signal:u,headers:new self.Headers(i({},h.headers))};return h.rangeEnd&&E.headers.set("Range","bytes="+h.rangeStart+"-"+String(h.rangeEnd-1)),E}function d(h,u){return new self.Request(h.url,u)}var f=function(h){_(u,h);function u(E,x,O){var C;return C=h.call(this,E)||this,C.code=void 0,C.details=void 0,C.code=x,C.details=O,C}return u}(p(Error));v.default=a},"./src/utils/imsc1-ttml-parser.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"IMSC1_CODEC",function(){return n}),T.d(v,"parseIMSC1",function(){return t});var y=T("./src/utils/mp4-tools.ts"),g=T("./src/utils/vttparser.ts"),s=T("./src/utils/vttcue.ts"),_=T("./src/demux/id3.ts"),p=T("./src/utils/timescale-conversion.ts"),e=T("./src/utils/webvtt-parser.ts");function o(){return o=Object.assign||function(w){for(var S=1;S<arguments.length;S++){var A=arguments[S];for(var D in A)Object.prototype.hasOwnProperty.call(A,D)&&(w[D]=A[D])}return w},o.apply(this,arguments)}var n="stpp.ttml.im1t",l=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,r=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,i={left:"start",center:"center",right:"end",start:"start",end:"end"};function t(w,S,A,D,M){var N=Object(y.findBox)(new Uint8Array(w),["mdat"]);if(N.length===0){M(new Error("Could not parse IMSC1 mdat"));return}var P=N[0],z=Object(_.utf8ArrayToStr)(new Uint8Array(w,P.start,P.end-P.start)),X=Object(p.toTimescaleFromScale)(S,1,A);try{D(a(z,X))}catch(k){M(k)}}function a(w,S){var A=new DOMParser,D=A.parseFromString(w,"text/xml"),M=D.getElementsByTagName("tt")[0];if(!M)throw new Error("Invalid ttml");var N={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},P=Object.keys(N).reduce(function(U,L){return U[L]=M.getAttribute("ttp:"+L)||N[L],U},{}),z=M.getAttribute("xml:space")!=="preserve",X=d(c(M,"styling","style")),k=d(c(M,"layout","region")),F=c(M,"body","[begin]");return[].map.call(F,function(U){var L=f(U,z);if(!L||!U.hasAttribute("begin"))return null;var B=x(U.getAttribute("begin"),P),Z=x(U.getAttribute("dur"),P),re=x(U.getAttribute("end"),P);if(B===null)throw E(U);if(re===null){if(Z===null)throw E(U);re=B+Z}var he=new s.default(B-S,re-S,L);he.id=Object(e.generateCueId)(he.startTime,he.endTime,he.text);var Ce=k[U.getAttribute("region")],ke=X[U.getAttribute("style")];he.position=10,he.size=80;var te=h(Ce,ke),Re=te.textAlign;if(Re){var Te=i[Re];Te&&(he.lineAlign=Te),he.align=Re}return o(he,te),he}).filter(function(U){return U!==null})}function c(w,S,A){var D=w.getElementsByTagName(S)[0];return D?[].slice.call(D.querySelectorAll(A)):[]}function d(w){return w.reduce(function(S,A){var D=A.getAttribute("xml:id");return D&&(S[D]=A),S},{})}function f(w,S){return[].slice.call(w.childNodes).reduce(function(A,D,M){var N;return D.nodeName==="br"&&M?A+`
|
|
|
`:(N=D.childNodes)!==null&&N!==void 0&&N.length?f(D,S):S?A+D.textContent.trim().replace(/\s+/g," "):A+D.textContent},"")}function h(w,S){var A="http://www.w3.org/ns/ttml#styling",D=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return D.reduce(function(M,N){var P=u(S,A,N)||u(w,A,N);return P&&(M[N]=P),M},{})}function u(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 x(w,S){if(!w)return null;var A=Object(g.parseTimeStamp)(w);return A===null&&(l.test(w)?A=O(w,S):r.test(w)&&(A=C(w,S))),A}function O(w,S){var A=l.exec(w),D=(A[4]|0)+(A[5]|0)/S.subFrameRate;return(A[1]|0)*3600+(A[2]|0)*60+(A[3]|0)+D/S.frameRate}function C(w,S){var A=r.exec(w),D=Number(A[1]),M=A[2];switch(M){case"h":return D*3600;case"m":return D*60;case"ms":return D*1e3;case"f":return D/S.frameRate;case"t":return D/S.tickRate}return D}},"./src/utils/logger.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"enableLogs",function(){return e}),T.d(v,"logger",function(){return o});var y=function(){},g={trace:y,debug:y,log:y,warn:y,info:y,error:y},s=g;function _(n){var l=self.console[n];return l?l.bind(self.console,"["+n+"] >"):y}function p(n){for(var l=arguments.length,r=new Array(l>1?l-1:0),i=1;i<l;i++)r[i-1]=arguments[i];r.forEach(function(t){s[t]=n[t]?n[t].bind(n):_(t)})}function e(n){if(self.console&&n===!0||typeof n=="object"){p(n,"debug","log","info","warn","error");try{s.log()}catch(l){s=g}}else s=g}var o=s},"./src/utils/mediakeys-helper.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"KeySystems",function(){return y}),T.d(v,"requestMediaKeySystemAccess",function(){return g});var y;(function(s){s.WIDEVINE="com.widevine.alpha",s.PLAYREADY="com.microsoft.playready"})(y||(y={}));var g=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"getMediaSource",function(){return y});function y(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"bin2str",function(){return p}),T.d(v,"readUint16",function(){return e}),T.d(v,"readUint32",function(){return o}),T.d(v,"writeUint32",function(){return n}),T.d(v,"findBox",function(){return l}),T.d(v,"parseSegmentIndex",function(){return r}),T.d(v,"parseInitSegment",function(){return i}),T.d(v,"getStartDTS",function(){return t}),T.d(v,"getDuration",function(){return a}),T.d(v,"computeRawDurationFromSamples",function(){return c}),T.d(v,"offsetStartDTS",function(){return d}),T.d(v,"segmentValidRange",function(){return f}),T.d(v,"appendUint8Array",function(){return h});var y=T("./src/utils/typed-array.ts"),g=T("./src/loader/fragment.ts"),s=Math.pow(2,32)-1,_=[].push;function p(u){return String.fromCharCode.apply(null,u)}function e(u,E){"data"in u&&(E+=u.start,u=u.data);var x=u[E]<<8|u[E+1];return x<0?65536+x:x}function o(u,E){"data"in u&&(E+=u.start,u=u.data);var x=u[E]<<24|u[E+1]<<16|u[E+2]<<8|u[E+3];return x<0?4294967296+x:x}function n(u,E,x){"data"in u&&(E+=u.start,u=u.data),u[E]=x>>24,u[E+1]=x>>16&255,u[E+2]=x>>8&255,u[E+3]=x&255}function l(u,E){var x=[];if(!E.length)return x;var O,C,w;"data"in u?(O=u.data,C=u.start,w=u.end):(O=u,C=0,w=O.byteLength);for(var S=C;S<w;){var A=o(O,S),D=p(O.subarray(S+4,S+8)),M=A>1?S+A:w;if(D===E[0])if(E.length===1)x.push({data:O,start:S+8,end:M});else{var N=l({data:O,start:S+8,end:M},E.slice(1));N.length&&_.apply(x,N)}S=M}return x}function r(u){var E=l(u,["moov"]),x=E[0],O=x?x.end:null,C=l(u,["sidx"]);if(!C||!C[0])return null;var w=[],S=C[0],A=S.data[0],D=A===0?8:16,M=o(S,D);D+=4;var N=0,P=0;A===0?D+=8:D+=16,D+=2;var z=S.end+P,X=e(S,D);D+=2;for(var k=0;k<X;k++){var F=D,U=o(S,F);F+=4;var L=U&2147483647,B=(U&2147483648)>>>31;if(B===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var Z=o(S,F);F+=4,w.push({referenceSize:L,subsegmentDuration:Z,info:{duration:Z/M,start:z,end:z+L-1}}),z+=L,F+=4,D=F}return{earliestPresentationTime:N,timescale:M,version:A,referencesCount:X,references:w,moovEndOffset:O}}function i(u){for(var E=[],x=l(u,["moov","trak"]),O=0;O<x.length;O++){var C=x[O],w=l(C,["tkhd"])[0];if(w){var S=w.data[w.start],A=S===0?12:20,D=o(w,A),M=l(C,["mdia","mdhd"])[0];if(M){S=M.data[M.start],A=S===0?12:20;var N=o(M,A),P=l(C,["mdia","hdlr"])[0];if(P){var z=p(P.data.subarray(P.start+8,P.start+12)),X={soun:g.ElementaryStreamTypes.AUDIO,vide:g.ElementaryStreamTypes.VIDEO}[z];if(X){var k=l(C,["mdia","minf","stbl","stsd"])[0],F=void 0;k&&(F=p(k.data.subarray(k.start+12,k.start+16))),E[D]={timescale:N,type:X},E[X]={timescale:N,id:D,codec:F}}}}}}var U=l(u,["moov","mvex","trex"]);return U.forEach(function(L){var B=o(L,4),Z=E[B];Z&&(Z.default={duration:o(L,12),flags:o(L,20)})}),E}function t(u,E){return l(E,["moof","traf"]).reduce(function(x,O){var C=l(O,["tfdt"])[0],w=C.data[C.start],S=l(O,["tfhd"]).reduce(function(A,D){var M=o(D,4),N=u[M];if(N){var P=o(C,4);w===1&&(P*=Math.pow(2,32),P+=o(C,8));var z=N.timescale||9e4,X=P/z;if(isFinite(X)&&(A===null||X<A))return X}return A},null);return S!==null&&isFinite(S)&&(x===null||S<x)?S:x},null)||0}function a(u,E){for(var x=0,O=0,C=0,w=l(u,["moof","traf"]),S=0;S<w.length;S++){var A=w[S],D=l(A,["tfhd"])[0],M=o(D,4),N=E[M];if(!N)continue;var P=N.default,z=o(D,0)|(P==null?void 0:P.flags),X=P==null?void 0:P.duration;z&8&&(z&2?X=o(D,12):X=o(D,8));for(var k=N.timescale||9e4,F=l(A,["trun"]),U=0;U<F.length;U++){if(X){var L=o(F[U],4);x=X*L}else x=c(F[U]);N.type===g.ElementaryStreamTypes.VIDEO?O+=x/k:N.type===g.ElementaryStreamTypes.AUDIO&&(C+=x/k)}}if(O===0&&C===0){var B=r(u);if(B!=null&&B.references)return B.references.reduce(function(Z,re){return Z+re.info.duration||0},0)}return O||C}function c(u){var E=o(u,0),x=8;E&1&&(x+=4),E&4&&(x+=4);for(var O=0,C=o(u,4),w=0;w<C;w++){if(E&256){var S=o(u,x);O+=S,x+=4}E&512&&(x+=4),E&1024&&(x+=4),E&2048&&(x+=4)}return O}function d(u,E,x){l(E,["moof","traf"]).forEach(function(O){l(O,["tfhd"]).forEach(function(C){var w=o(C,4),S=u[w];if(!S)return;var A=S.timescale||9e4;l(O,["tfdt"]).forEach(function(D){var M=D.data[D.start],N=o(D,4);if(M===0)n(D,4,N-x*A);else{N*=Math.pow(2,32),N+=o(D,8),N-=x*A,N=Math.max(N,0);var P=Math.floor(N/(s+1)),z=Math.floor(N%(s+1));n(D,4,P),n(D,8,z)}})})})}function f(u){var E={valid:null,remainder:null},x=l(u,["moof"]);if(x){if(x.length<2)return E.remainder=u,E}else return E;var O=x[x.length-1];return E.valid=Object(y.sliceUint8)(u,0,O.start-8),E.remainder=Object(y.sliceUint8)(u,O.start-8),E}function h(u,E){var x=new Uint8Array(u.length+E.length);return x.set(u),x.set(E,u.length),x}},"./src/utils/output-filter.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"default",function(){return y});var y=function(){function g(_,p){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=_,this.trackName=p}var s=g.prototype;return s.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},s.newCue=function(p,e,o){(this.startTime===null||this.startTime>p)&&(this.startTime=p),this.endTime=e,this.screen=o,this.timelineController.createCaptionsTrack(this.trackName)},s.reset=function(){this.cueRanges=[]},g}()},"./src/utils/texttrack-utils.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"sendAddTrackEvent",function(){return g}),T.d(v,"addCueToTrack",function(){return s}),T.d(v,"clearCurrentCues",function(){return _}),T.d(v,"removeCuesInRange",function(){return p}),T.d(v,"getCuesInRange",function(){return o});var y=T("./src/utils/logger.ts");function g(n,l){var r;try{r=new Event("addtrack")}catch(i){r=document.createEvent("Event"),r.initEvent("addtrack",!1,!1)}r.track=n,l.dispatchEvent(r)}function s(n,l){var r=n.mode;if(r==="disabled"&&(n.mode="hidden"),n.cues&&!n.cues.getCueById(l.id))try{if(n.addCue(l),!n.cues.getCueById(l.id))throw new Error("addCue is failed for: "+l)}catch(t){y.logger.debug("[texttrack-utils]: "+t);var i=new self.TextTrackCue(l.startTime,l.endTime,l.text);i.id=l.id,n.addCue(i)}r==="disabled"&&(n.mode=r)}function _(n){var l=n.mode;if(l==="disabled"&&(n.mode="hidden"),n.cues)for(var r=n.cues.length;r--;)n.removeCue(n.cues[r]);l==="disabled"&&(n.mode=l)}function p(n,l,r){var i=n.mode;if(i==="disabled"&&(n.mode="hidden"),n.cues&&n.cues.length>0)for(var t=o(n.cues,l,r),a=0;a<t.length;a++)n.removeCue(t[a]);i==="disabled"&&(n.mode=i)}function e(n,l){if(l<n[0].startTime)return 0;var r=n.length-1;if(l>n[r].endTime)return-1;for(var i=0,t=r;i<=t;){var a=Math.floor((t+i)/2);if(l<n[a].startTime)t=a-1;else if(l>n[a].startTime&&i<r)i=a+1;else return a}return n[i].startTime-l<l-n[t].startTime?i:t}function o(n,l,r){var i=[],t=e(n,l);if(t>-1)for(var a=t,c=n.length;a<c;a++){var d=n[a];if(d.startTime>=l&&d.endTime<=r)i.push(d);else if(d.startTime>r)return i}return i}},"./src/utils/time-ranges.ts":function(I,v,T){"use strict";T.r(v);var y={toString:function(s){for(var _="",p=s.length,e=0;e<p;e++)_+="["+s.start(e).toFixed(3)+","+s.end(e).toFixed(3)+"]";return _}};v.default=y},"./src/utils/timescale-conversion.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"toTimescaleFromBase",function(){return g}),T.d(v,"toTimescaleFromScale",function(){return s}),T.d(v,"toMsFromMpegTsClock",function(){return _}),T.d(v,"toMpegTsClockFromTimescale",function(){return p});var y=9e4;function g(e,o,n,l){n===void 0&&(n=1),l===void 0&&(l=!1);var r=e*o*n;return l?Math.round(r):r}function s(e,o,n,l){return n===void 0&&(n=1),l===void 0&&(l=!1),g(e,o,1/n,l)}function _(e,o){return o===void 0&&(o=!1),g(e,1e3,1/y,o)}function p(e,o){return o===void 0&&(o=1),g(e,y,1/o)}},"./src/utils/typed-array.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"sliceUint8",function(){return y});function y(g,s,_){return Uint8Array.prototype.slice?g.slice(s,_):new Uint8Array(Array.prototype.slice.call(g,s,_))}},"./src/utils/vttcue.ts":function(I,v,T){"use strict";T.r(v),v.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var y=["","lr","rl"],g=["start","middle","end","left","right"];function s(n,l){if(typeof l!="string")return!1;if(!Array.isArray(n))return!1;var r=l.toLowerCase();return~n.indexOf(r)?r:!1}function _(n){return s(y,n)}function p(n){return s(g,n)}function e(n){for(var l=arguments.length,r=new Array(l>1?l-1:0),i=1;i<l;i++)r[i-1]=arguments[i];for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var c in a)n[c]=a[c]}return n}function o(n,l,r){var i=this,t={enumerable:!0};i.hasBeenReset=!1;var a="",c=!1,d=n,f=l,h=r,u=null,E="",x=!0,O="auto",C="start",w=50,S="middle",A=50,D="middle";Object.defineProperty(i,"id",e({},t,{get:function(){return a},set:function(N){a=""+N}})),Object.defineProperty(i,"pauseOnExit",e({},t,{get:function(){return c},set:function(N){c=!!N}})),Object.defineProperty(i,"startTime",e({},t,{get:function(){return d},set:function(N){if(typeof N!="number")throw new TypeError("Start time must be set to a number.");d=N,this.hasBeenReset=!0}})),Object.defineProperty(i,"endTime",e({},t,{get:function(){return f},set:function(N){if(typeof N!="number")throw new TypeError("End time must be set to a number.");f=N,this.hasBeenReset=!0}})),Object.defineProperty(i,"text",e({},t,{get:function(){return h},set:function(N){h=""+N,this.hasBeenReset=!0}})),Object.defineProperty(i,"region",e({},t,{get:function(){return u},set:function(N){u=N,this.hasBeenReset=!0}})),Object.defineProperty(i,"vertical",e({},t,{get:function(){return E},set:function(N){var P=_(N);if(P===!1)throw new SyntaxError("An invalid or illegal string was specified.");E=P,this.hasBeenReset=!0}})),Object.defineProperty(i,"snapToLines",e({},t,{get:function(){return x},set:function(N){x=!!N,this.hasBeenReset=!0}})),Object.defineProperty(i,"line",e({},t,{get:function(){return O},set:function(N){if(typeof N!="number"&&N!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");O=N,this.hasBeenReset=!0}})),Object.defineProperty(i,"lineAlign",e({},t,{get:function(){return C},set:function(N){var P=p(N);if(!P)throw new SyntaxError("An invalid or illegal string was specified.");C=P,this.hasBeenReset=!0}})),Object.defineProperty(i,"position",e({},t,{get:function(){return w},set:function(N){if(N<0||N>100)throw new Error("Position must be between 0 and 100.");w=N,this.hasBeenReset=!0}})),Object.defineProperty(i,"positionAlign",e({},t,{get:function(){return S},set:function(N){var P=p(N);if(!P)throw new SyntaxError("An invalid or illegal string was specified.");S=P,this.hasBeenReset=!0}})),Object.defineProperty(i,"size",e({},t,{get:function(){return A},set:function(N){if(N<0||N>100)throw new Error("Size must be between 0 and 100.");A=N,this.hasBeenReset=!0}})),Object.defineProperty(i,"align",e({},t,{get:function(){return D},set:function(N){var P=p(N);if(!P)throw new SyntaxError("An invalid or illegal string was specified.");D=P,this.hasBeenReset=!0}})),i.displayState=void 0}return o.prototype.getCueAsHTML=function(){var n=self.WebVTT;return n.convertCueToDOMTree(self,this.text)},o}()},"./src/utils/vttparser.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"parseTimeStamp",function(){return s}),T.d(v,"fixLineBreaks",function(){return l}),T.d(v,"VTTParser",function(){return r});var y=T("./src/utils/vttcue.ts"),g=function(){function i(){}var t=i.prototype;return t.decode=function(c,d){if(!c)return"";if(typeof c!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(c))},i}();function s(i){function t(c,d,f,h){return(c|0)*3600+(d|0)*60+(f|0)+parseFloat(h||0)}var a=i.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return a?parseFloat(a[2])>59?t(a[2],a[3],0,a[4]):t(a[1],a[2],a[3],a[4]):null}var _=function(){function i(){this.values=Object.create(null)}var t=i.prototype;return t.set=function(c,d){!this.get(c)&&d!==""&&(this.values[c]=d)},t.get=function(c,d,f){return f?this.has(c)?this.values[c]:d[f]:this.has(c)?this.values[c]:d},t.has=function(c){return c in this.values},t.alt=function(c,d,f){for(var h=0;h<f.length;++h)if(d===f[h]){this.set(c,d);break}},t.integer=function(c,d){/^-?\d+$/.test(d)&&this.set(c,parseInt(d,10))},t.percent=function(c,d){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(d)){var f=parseFloat(d);if(f>=0&&f<=100)return this.set(c,f),!0}return!1},i}();function p(i,t,a,c){var d=c?i.split(c):[i];for(var f in d){if(typeof d[f]!="string")continue;var h=d[f].split(a);if(h.length!==2)continue;var u=h[0],E=h[1];t(u,E)}}var e=new y.default(0,0,""),o=e.align==="middle"?"middle":"center";function n(i,t,a){var c=i;function d(){var u=s(i);if(u===null)throw new Error("Malformed timestamp: "+c);return i=i.replace(/^[^\sa-zA-Z-]+/,""),u}function f(u,E){var x=new _;p(u,function(w,S){var A;switch(w){case"region":for(var D=a.length-1;D>=0;D--)if(a[D].id===S){x.set(w,a[D].region);break}break;case"vertical":x.alt(w,S,["rl","lr"]);break;case"line":A=S.split(","),x.integer(w,A[0]),x.percent(w,A[0])&&x.set("snapToLines",!1),x.alt(w,A[0],["auto"]),A.length===2&&x.alt("lineAlign",A[1],["start",o,"end"]);break;case"position":A=S.split(","),x.percent(w,A[0]),A.length===2&&x.alt("positionAlign",A[1],["start",o,"end","line-left","line-right","auto"]);break;case"size":x.percent(w,S);break;case"align":x.alt(w,S,["start",o,"end","left","right"]);break}},/:/,/\s/),E.region=x.get("region",null),E.vertical=x.get("vertical","");var O=x.get("line","auto");O==="auto"&&e.line===-1&&(O=-1),E.line=O,E.lineAlign=x.get("lineAlign","start"),E.snapToLines=x.get("snapToLines",!0),E.size=x.get("size",100),E.align=x.get("align",o);var C=x.get("position","auto");C==="auto"&&e.position===50&&(C=E.align==="start"||E.align==="left"?0:E.align==="end"||E.align==="right"?100:50),E.position=C}function h(){i=i.replace(/^\s+/,"")}if(h(),t.startTime=d(),h(),i.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+c);i=i.substr(3),h(),t.endTime=d(),h(),f(i,t)}function l(i){return i.replace(/<br(?: \/)?>/gi,`
|
|
|
`)}var r=function(){function i(){this.state="INITIAL",this.buffer="",this.decoder=new g,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var t=i.prototype;return t.parse=function(c){var d=this;c&&(d.buffer+=d.decoder.decode(c,{stream:!0}));function f(){var C=d.buffer,w=0;for(C=l(C);w<C.length&&C[w]!=="\r"&&C[w]!==`
|
|
|
`;)++w;var S=C.substr(0,w);return C[w]==="\r"&&++w,C[w]===`
|
|
|
`&&++w,d.buffer=C.substr(w),S}function h(C){p(C,function(w,S){},/:/)}try{var u="";if(d.state==="INITIAL"){if(!/\r\n|\n/.test(d.buffer))return this;u=f();var E=u.match(/^()?WEBVTT([ \t].*)?$/);if(!E||!E[0])throw new Error("Malformed WebVTT signature.");d.state="HEADER"}for(var x=!1;d.buffer;){if(!/\r\n|\n/.test(d.buffer))return this;x?x=!1:u=f();switch(d.state){case"HEADER":/:/.test(u)?h(u):u||(d.state="ID");continue;case"NOTE":u||(d.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(u)){d.state="NOTE";break}if(!u)continue;if(d.cue=new y.default(0,0,""),d.state="CUE",u.indexOf("-->")===-1){d.cue.id=u;continue}case"CUE":if(!d.cue){d.state="BADCUE";continue}try{n(u,d.cue,d.regionList)}catch(C){d.cue=null,d.state="BADCUE";continue}d.state="CUETEXT";continue;case"CUETEXT":{var O=u.indexOf("-->")!==-1;if(!u||O&&(x=!0)){d.oncue&&d.cue&&d.oncue(d.cue),d.cue=null,d.state="ID";continue}if(d.cue===null)continue;d.cue.text&&(d.cue.text+=`
|
|
|
`),d.cue.text+=u}continue;case"BADCUE":u||(d.state="ID")}}}catch(C){d.state==="CUETEXT"&&d.cue&&d.oncue&&d.oncue(d.cue),d.cue=null,d.state=d.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},t.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(d){c.onparsingerror&&c.onparsingerror(d)}return c.onflush&&c.onflush(),this},i}()},"./src/utils/webvtt-parser.ts":function(I,v,T){"use strict";T.r(v),T.d(v,"generateCueId",function(){return r}),T.d(v,"parseWebVTT",function(){return t});var y=T("./src/polyfills/number.ts"),g=T("./src/utils/vttparser.ts"),s=T("./src/demux/id3.ts"),_=T("./src/utils/timescale-conversion.ts"),p=T("./src/remux/mp4-remuxer.ts"),e=/\r\n|\n\r|\n|\r/g,o=function(c,d,f){return f===void 0&&(f=0),c.substr(f,d.length)===d},n=function(c){var d=parseInt(c.substr(-3)),f=parseInt(c.substr(-6,2)),h=parseInt(c.substr(-9,2)),u=c.length>9?parseInt(c.substr(0,c.indexOf(":"))):0;if(!Object(y.isFiniteNumber)(d)||!Object(y.isFiniteNumber)(f)||!Object(y.isFiniteNumber)(h)||!Object(y.isFiniteNumber)(u))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+c);return d+=1e3*f,d+=60*1e3*h,d+=60*60*1e3*u,d},l=function(c){for(var d=5381,f=c.length;f;)d=d*33^c.charCodeAt(--f);return(d>>>0).toString()};function r(a,c,d){return l(a.toString())+l(c.toString())+l(d)}var i=function(c,d,f){var h=c[d],u=c[h.prevCC];if(!u||!u.new&&h.new){c.ccOffset=c.presentationOffset=h.start,h.new=!1;return}for(;(E=u)!==null&&E!==void 0&&E.new;){var E;c.ccOffset+=h.start-u.start,h.new=!1,h=u,u=c[h.prevCC]}c.presentationOffset=f};function t(a,c,d,f,h,u,E,x){var O=new g.VTTParser,C=Object(s.utf8ArrayToStr)(new Uint8Array(a)).trim().replace(e,`
|
|
|
`).split(`
|
|
|
`),w=[],S=Object(_.toMpegTsClockFromTimescale)(c,d),A="00:00.000",D=0,M=0,N,P=!0,z=!1;O.oncue=function(X){var k=f[h],F=f.ccOffset,U=(D-S)/9e4;if(k!=null&&k.new&&(M!==void 0?F=f.ccOffset=k.start:i(f,h,U)),U&&(F=U-f.presentationOffset),z){var L=X.endTime-X.startTime,B=Object(p.normalizePts)((X.startTime+F-M)*9e4,u*9e4)/9e4;X.startTime=B,X.endTime=B+L}var Z=X.text.trim();X.text=decodeURIComponent(encodeURIComponent(Z)),X.id||(X.id=r(X.startTime,X.endTime,Z)),X.endTime>0&&w.push(X)},O.onparsingerror=function(X){N=X},O.onflush=function(){if(N){x(N);return}E(w)},C.forEach(function(X){if(P)if(o(X,"X-TIMESTAMP-MAP=")){P=!1,z=!0,X.substr(16).split(",").forEach(function(k){o(k,"LOCAL:")?A=k.substr(6):o(k,"MPEGTS:")&&(D=parseInt(k.substr(7)))});try{M=n(A)/1e3}catch(k){z=!1,N=k}return}else X===""&&(P=!1);O.parse(X+`
|
|
|
`)}),O.flush()}},"./src/utils/xhr-loader.ts":function(I,v,T){"use strict";T.r(v);var y=T("./src/utils/logger.ts"),g=T("./src/loader/load-stats.ts"),s=/^age:\s*[\d.]+\s*$/m,_=function(){function p(o){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=o?o.xhrSetup:null,this.stats=new g.LoadStats,this.retryDelay=0}var e=p.prototype;return e.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},e.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()))},e.abort=function(){var n;this.abortInternal(),(n=this.callbacks)!==null&&n!==void 0&&n.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},e.load=function(n,l,r){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=l,this.callbacks=r,this.retryDelay=l.retryDelay,this.loadInternal()},e.loadInternal=function(){var n=this.config,l=this.context;if(!n)return;var r=this.loader=new self.XMLHttpRequest,i=this.stats;i.loading.first=0,i.loaded=0;var t=this.xhrSetup;try{if(t)try{t(r,l.url)}catch(d){r.open("GET",l.url,!0),t(r,l.url)}r.readyState||r.open("GET",l.url,!0);var a=this.context.headers;if(a)for(var c in a)r.setRequestHeader(c,a[c])}catch(d){this.callbacks.onError({code:r.status,text:d.message},l,r);return}l.rangeEnd&&r.setRequestHeader("Range","bytes="+l.rangeStart+"-"+(l.rangeEnd-1)),r.onreadystatechange=this.readystatechange.bind(this),r.onprogress=this.loadprogress.bind(this),r.responseType=l.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.timeout),r.send()},e.readystatechange=function(){var n=this.context,l=this.loader,r=this.stats;if(!n||!l)return;var i=l.readyState,t=this.config;if(r.aborted)return;if(i>=2)if(self.clearTimeout(this.requestTimeout),r.loading.first===0&&(r.loading.first=Math.max(self.performance.now(),r.loading.start)),i===4){l.onreadystatechange=null,l.onprogress=null;var a=l.status;if(a>=200&&a<300){r.loading.end=Math.max(self.performance.now(),r.loading.first);var c,d;if(n.responseType==="arraybuffer"?(c=l.response,d=c.byteLength):(c=l.responseText,d=c.length),r.loaded=r.total=d,!this.callbacks)return;var f=this.callbacks.onProgress;if(f&&f(r,n,c,l),!this.callbacks)return;var h={url:l.responseURL,data:c};this.callbacks.onSuccess(h,r,n,l)}else r.retry>=t.maxRetry||a>=400&&a<499?(y.logger.error(a+" while loading "+n.url),this.callbacks.onError({code:a,text:l.statusText},n,l)):(y.logger.warn(a+" 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,t.maxRetryDelay),r.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),t.timeout)},e.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))},e.loadprogress=function(n){var l=this.stats;l.loaded=n.loaded,n.lengthComputable&&(l.total=n.total)},e.getCacheAge=function(){var n=null;if(this.loader&&s.test(this.loader.getAllResponseHeaders())){var l=this.loader.getResponseHeader("age");n=l?parseFloat(l):null}return n},p}();v.default=_}}).default})},vHTk:function(j,H,b){j.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},vS10:function(j,H,b){"use strict";b.d(H,"h",function(){return g}),b.d(H,"d",function(){return _}),b.d(H,"c",function(){return e}),b.d(H,"e",function(){return n}),b.d(H,"g",function(){return r}),b.d(H,"a",function(){return t}),b.d(H,"i",function(){return c}),b.d(H,"b",function(){return f}),b.d(H,"f",function(){return u});var I=b("9og8"),v=b("WmNS"),T=b.n(v),y=b("ErOA");function g(C){return s.apply(this,arguments)}function s(){return s=Object(I.a)(T.a.mark(function C(w){return T.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)})),s.apply(this,arguments)}function _(C){return p.apply(this,arguments)}function p(){return p=Object(I.a)(T.a.mark(function C(w){return T.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 e(C){return o.apply(this,arguments)}function o(){return o=Object(I.a)(T.a.mark(function C(w){return T.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)})),o.apply(this,arguments)}function n(C){return l.apply(this,arguments)}function l(){return l=Object(I.a)(T.a.mark(function C(w){return T.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)})),l.apply(this,arguments)}function r(C){return i.apply(this,arguments)}function i(){return i=Object(I.a)(T.a.mark(function C(w){return T.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 t(C){return a.apply(this,arguments)}function a(){return a=Object(I.a)(T.a.mark(function C(w){return T.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)})),a.apply(this,arguments)}function c(C){return d.apply(this,arguments)}function d(){return d=Object(I.a)(T.a.mark(function C(w){return T.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)})),d.apply(this,arguments)}function f(C){return h.apply(this,arguments)}function h(){return h=Object(I.a)(T.a.mark(function C(w){return T.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)})),h.apply(this,arguments)}function u(C){return E.apply(this,arguments)}function E(){return E=Object(I.a)(T.a.mark(function C(w){return T.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 x(C){return O.apply(this,arguments)}function O(){return O=Object(I.a)(T.a.mark(function C(w){return T.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)})),O.apply(this,arguments)}},vewr:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.getPointerEvent=I,H.stopEvent=v,H.setCapture=p,H.releaseCapture=e;function I(o){return o.changedTouches?o.changedTouches[0]:o.touches?o.touches[0]:o}function v(o){o.stopPropagation(),o.preventDefault()}var T=!1,y=null;document.captureElement=null;function g(o){if(T)return;var n=new o.constructor(o.type,o);T=!0,document.captureElement?document.captureElement.dispatchEvent(n):y.dispatchEvent(n),T=!1,o.stopPropagation(),n.defaultPrevented&&o.preventDefault(),o.type==="mouseup"&&e()}function s(){var o=document.getElementById("noVNC_mouse_capture_elem");o.style.cursor=window.getComputedStyle(document.captureElement).cursor}var _=new MutationObserver(s);function p(o){if(o.setCapture)o.setCapture(),document.captureElement=o,o.addEventListener("mouseup",e);else{e();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",g),n.addEventListener("mousemove",g),n.addEventListener("mouseup",g)),document.captureElement=o,_.observe(o,{attributes:!0}),s(),n.style.display="",window.addEventListener("mousemove",g),window.addEventListener("mouseup",g)}}function e(){if(document.releaseCapture)document.releaseCapture(),document.captureElement=null;else{if(!document.captureElement)return;y=document.captureElement,document.captureElement=null,_.disconnect();var o=document.getElementById("noVNC_mouse_capture_elem");o.style.display="none",window.removeEventListener("mousemove",g),window.removeEventListener("mouseup",g)}}},w7YG:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("ETIr"),b("cv67"),b("K3mO"),b("OLod"))})(this,function(I){return function(){var v=I,T=v.lib,y=T.StreamCipher,g=v.algo,s=g.RC4=y.extend({_doReset:function(){for(var e=this._key,o=e.words,n=e.sigBytes,l=this._S=[],r=0;r<256;r++)l[r]=r;for(var r=0,i=0;r<256;r++){var t=r%n,a=o[t>>>2]>>>24-t%4*8&255;i=(i+l[r]+a)%256;var c=l[r];l[r]=l[i],l[i]=c}this._i=this._j=0},_doProcessBlock:function(e,o){e[o]^=_.call(this)},keySize:256/32,ivSize:0});function _(){for(var e=this._S,o=this._i,n=this._j,l=0,r=0;r<4;r++){o=(o+1)%256,n=(n+e[o])%256;var i=e[o];e[o]=e[n],e[n]=i,l|=e[(e[o]+e[n])%256]<<24-r*8}return this._i=o,this._j=n,l}v.RC4=y._createHelper(s);var p=g.RC4Drop=s.extend({cfg:s.cfg.extend({drop:192}),_doReset:function(){s._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)_.call(this)}});v.RC4Drop=y._createHelper(p)}(),I.RC4})},wCXF:function(j,H,b){"use strict";b.d(H,"a",function(){return De});var I=b("rePB"),v=b("VTBJ"),T=b("KQm4"),y=b("U8pU"),g=b("ODXe"),s=b("q1tI"),_=b("TSYQ"),p=b.n(_),e=b("Gytx"),o=b.n(e),n=b("Kwbf"),l=b("t23M"),r=b("qx4F"),i=b("6eGT"),t=b("IBYe"),a=b("Ff2n"),c=b("c+Xe"),d=b("fyJ8"),f=b("biw7");function h(ze,Me,Et,Oe,Ve){var Je=Et[ze]||{},Ye=Et[Me]||{},Pe,He;Je.fixed==="left"?Pe=Oe.left[ze]:Ye.fixed==="right"&&(He=Oe.right[Me]);var ve=!1,xe=!1,de=!1,je=!1,Qe=Et[Me+1],ne=Et[ze-1];if(Ve==="rtl"){if(Pe!==void 0){var Ze=ne&&ne.fixed==="left";je=!Ze}else if(He!==void 0){var lt=Qe&&Qe.fixed==="right";de=!lt}}else if(Pe!==void 0){var Be=Qe&&Qe.fixed==="left";ve=!Be}else if(He!==void 0){var $e=ne&&ne.fixed==="right";xe=!$e}return{fixLeft:Pe,fixRight:He,lastFixLeft:ve,firstFixRight:xe,lastFixRight:de,firstFixLeft:je,isSticky:Oe.isSticky}}var u=b("sR1s");function E(ze){var Me=ze.cells,Et=ze.stickyOffsets,Oe=ze.flattenColumns,Ve=ze.rowComponent,Je=ze.cellComponent,Ye=ze.onHeaderRow,Pe=ze.index,He=s.useContext(f.a),ve=He.prefixCls,xe=He.direction,de;Ye&&(de=Ye(Me.map(function(Qe){return Qe.column}),Pe));var je=Object(u.a)(Me.map(function(Qe){return Qe.column}));return s.createElement(Ve,Object.assign({},de),Me.map(function(Qe,ne){var Ze=Qe.column,lt=h(Qe.colStart,Qe.colEnd,Oe,Et,xe),Be;return Ze&&Ze.onHeaderCell&&(Be=Qe.column.onHeaderCell(Ze)),s.createElement(d.a,Object.assign({},Qe,{ellipsis:Ze.ellipsis,align:Ze.align,component:Je,prefixCls:ve,key:je[ne]},lt,{additionalProps:Be,rowType:"header"}))}))}E.displayName="HeaderRow";var x=E;function O(ze){var Me=[];function Et(Ye,Pe){var He=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Me[He]=Me[He]||[];var ve=Pe,xe=Ye.filter(Boolean).map(function(de){var je={key:de.key,className:de.className||"",children:de.title,column:de,colStart:ve},Qe=1,ne=de.children;return ne&&ne.length>0&&(Qe=Et(ne,ve,He+1).reduce(function(Ze,lt){return Ze+lt},0),je.hasSubColumns=!0),"colSpan"in de&&(Qe=de.colSpan),"rowSpan"in de&&(je.rowSpan=de.rowSpan),je.colSpan=Qe,je.colEnd=je.colStart+Qe-1,Me[He].push(je),ve+=Qe,Qe});return xe}Et(ze,0);for(var Oe=Me.length,Ve=function(Pe){Me[Pe].forEach(function(He){!("rowSpan"in He)&&!He.hasSubColumns&&(He.rowSpan=Oe-Pe)})},Je=0;Je<Oe;Je+=1)Ve(Je);return Me}function C(ze){var Me=ze.stickyOffsets,Et=ze.columns,Oe=ze.flattenColumns,Ve=ze.onHeaderRow,Je=s.useContext(f.a),Ye=Je.prefixCls,Pe=Je.getComponent,He=s.useMemo(function(){return O(Et)},[Et]),ve=Pe(["header","wrapper"],"thead"),xe=Pe(["header","row"],"tr"),de=Pe(["header","cell"],"th");return s.createElement(ve,{className:"".concat(Ye,"-thead")},He.map(function(je,Qe){var ne=s.createElement(x,{key:Qe,flattenColumns:Oe,cells:je,stickyOffsets:Me,rowComponent:xe,cellComponent:de,onHeaderRow:Ve,index:Qe});return ne}))}var w=C,S=b("hW8S");function A(ze){for(var Me=ze.colWidths,Et=ze.columns,Oe=ze.columCount,Ve=[],Je=Oe||Et.length,Ye=!1,Pe=Je-1;Pe>=0;Pe-=1){var He=Me[Pe],ve=Et&&Et[Pe],xe=ve&&ve[S.a];(He||xe||Ye)&&(Ve.unshift(s.createElement("col",Object.assign({key:Pe,style:{width:He,minWidth:He}},xe))),Ye=!0)}return s.createElement("colgroup",null,Ve)}var D=A;function M(ze,Me){return Object(s.useMemo)(function(){for(var Et=[],Oe=0;Oe<Me;Oe+=1){var Ve=ze[Oe];if(Ve!==void 0)Et[Oe]=Ve;else return null}return Et},[ze.join("_"),Me])}var N=s.forwardRef(function(ze,Me){var Et=ze.noData,Oe=ze.columns,Ve=ze.flattenColumns,Je=ze.colWidths,Ye=ze.columCount,Pe=ze.stickyOffsets,He=ze.direction,ve=ze.fixHeader,xe=ze.offsetHeader,de=ze.stickyClassName,je=ze.onScroll,Qe=Object(a.a)(ze,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),ne=s.useContext(f.a),Ze=ne.prefixCls,lt=ne.scrollbarSize,Be=ne.isSticky,$e=Be&&!ve?0:lt,rt=s.useRef(null),xt=s.useCallback(function(jt){Object(c.b)(Me,jt),Object(c.b)(rt,jt)},[]);s.useEffect(function(){var jt;function Bt(gt){var Ht=gt.currentTarget,Ut=gt.deltaX;Ut&&(je({currentTarget:Ht,scrollLeft:Ht.scrollLeft+Ut}),gt.preventDefault())}return(jt=rt.current)===null||jt===void 0||jt.addEventListener("wheel",Bt),function(){var gt;(gt=rt.current)===null||gt===void 0||gt.removeEventListener("wheel",Bt)}},[]);var ft=Ve[Ve.length-1],st={fixed:ft?ft.fixed:null,onHeaderCell:function(){return{className:"".concat(Ze,"-cell-scrollbar")}}},Ne=Object(s.useMemo)(function(){return $e?[].concat(Object(T.a)(Oe),[st]):Oe},[$e,Oe]),Ge=Object(s.useMemo)(function(){return $e?[].concat(Object(T.a)(Ve),[st]):Ve},[$e,Ve]),yt=Object(s.useMemo)(function(){var jt=Pe.right,Bt=Pe.left;return Object(v.a)(Object(v.a)({},Pe),{},{left:He==="rtl"?[].concat(Object(T.a)(Bt.map(function(gt){return gt+$e})),[0]):Bt,right:He==="rtl"?jt:[].concat(Object(T.a)(jt.map(function(gt){return gt+$e})),[0]),isSticky:Be})},[$e,Pe,Be]),pt=M(Je,Ye);return s.createElement("div",{style:Object(v.a)({overflow:"hidden"},Be?{top:xe}:{}),ref:xt,className:p()("".concat(Ze,"-header"),Object(I.a)({},de,!!de))},s.createElement("table",{style:{tableLayout:"fixed",visibility:Et||pt?null:"hidden"}},s.createElement(D,{colWidths:pt?[].concat(Object(T.a)(pt),[$e]):[],columCount:Ye+1,columns:Ge}),s.createElement(w,Object.assign({},Qe,{stickyOffsets:yt,columns:Ne,flattenColumns:Ge}))))});N.displayName="FixedHeader";var P=N,z=s.createContext(null),X=z;function k(ze){var Me=ze.prefixCls,Et=ze.children,Oe=ze.component,Ve=ze.cellComponent,Je=ze.fixHeader,Ye=ze.fixColumn,Pe=ze.horizonScroll,He=ze.className,ve=ze.expanded,xe=ze.componentWidth,de=ze.colSpan,je=s.useContext(f.a),Qe=je.scrollbarSize;return s.useMemo(function(){var ne=Et;return Ye&&(ne=s.createElement("div",{style:{width:xe-(Je?Qe:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Me,"-expanded-row-fixed")},ne)),s.createElement(Oe,{className:He,style:{display:ve?null:"none"}},s.createElement(d.a,{component:Ve,prefixCls:Me,colSpan:de},ne))},[Et,Oe,Je,Pe,He,ve,xe,de,Qe])}var F=k;function U(ze){var Me=ze.className,Et=ze.style,Oe=ze.record,Ve=ze.index,Je=ze.rowKey,Ye=ze.getRowKey,Pe=ze.rowExpandable,He=ze.expandedKeys,ve=ze.onRow,xe=ze.indent,de=xe===void 0?0:xe,je=ze.rowComponent,Qe=ze.cellComponent,ne=ze.childrenColumnName,Ze=s.useContext(f.a),lt=Ze.prefixCls,Be=Ze.fixedInfoList,$e=s.useContext(X),rt=$e.fixHeader,xt=$e.fixColumn,ft=$e.horizonScroll,st=$e.componentWidth,Ne=$e.flattenColumns,Ge=$e.expandableType,yt=$e.expandRowByClick,pt=$e.onTriggerExpand,jt=$e.rowClassName,Bt=$e.expandedRowClassName,gt=$e.indentSize,Ht=$e.expandIcon,Ut=$e.expandedRowRender,Nt=$e.expandIconColumnIndex,Wt=s.useState(!1),Qt=Object(g.a)(Wt,2),pn=Qt[0],qt=Qt[1],en=He&&He.has(ze.recordKey);s.useEffect(function(){en&&qt(!0)},[en]);var qn=Ge==="row"&&(!Pe||Pe(Oe)),$t=Ge==="nest",cn=ne&&Oe&&Oe[ne],mn=qn||$t,yn;ve&&(yn=ve(Oe,Ve));var Vn=function(V){if(yt&&mn&&pt(Oe,V),yn&&yn.onClick){for(var J,ee=arguments.length,Se=new Array(ee>1?ee-1:0),ue=1;ue<ee;ue++)Se[ue-1]=arguments[ue];(J=yn).onClick.apply(J,[V].concat(Se))}},$n;typeof jt=="string"?$n=jt:typeof jt=="function"&&($n=jt(Oe,Ve,de));var zt=Object(u.a)(Ne),xn=s.createElement(je,Object.assign({},yn,{"data-row-key":Je,className:p()(Me,"".concat(lt,"-row"),"".concat(lt,"-row-level-").concat(de),$n,yn&&yn.className),style:Object(v.a)(Object(v.a)({},Et),yn?yn.style:null),onClick:Vn}),Ne.map(function(ce,V){var J=ce.render,ee=ce.dataIndex,Se=ce.className,ue=zt[V],nt=Be[V],Dt;V===(Nt||0)&&$t&&(Dt=s.createElement(s.Fragment,null,s.createElement("span",{style:{paddingLeft:"".concat(gt*de,"px")},className:"".concat(lt,"-row-indent indent-level-").concat(de)}),Ht({prefixCls:lt,expanded:en,expandable:cn,record:Oe,onExpand:pt})));var Yt;return ce.onCell&&(Yt=ce.onCell(Oe,Ve)),s.createElement(d.a,Object.assign({className:Se,ellipsis:ce.ellipsis,align:ce.align,component:Qe,prefixCls:lt,key:ue,record:Oe,index:Ve,dataIndex:ee,render:J,shouldCellUpdate:ce.shouldCellUpdate},nt,{appendNode:Dt,additionalProps:Yt}))})),wr;if(qn&&(pn||en)){var nr=Ut(Oe,Ve,de+1,en),Tn=Bt&&Bt(Oe,Ve,de);wr=s.createElement(F,{expanded:en,className:p()("".concat(lt,"-expanded-row"),"".concat(lt,"-expanded-row-level-").concat(de+1),Tn),prefixCls:lt,fixHeader:rt,fixColumn:xt,horizonScroll:ft,component:je,componentWidth:st,cellComponent:Qe,colSpan:Ne.length},nr)}var Yn;return cn&&en&&(Yn=(Oe[ne]||[]).map(function(ce,V){var J=Ye(ce,V);return s.createElement(U,Object.assign({},ze,{key:J,rowKey:J,record:ce,recordKey:J,index:V,indent:de+1}))})),s.createElement(s.Fragment,null,xn,wr,Yn)}U.displayName="BodyRow";var L=U,B=s.createContext(null),Z=B;function re(ze){var Me=ze.columnKey,Et=ze.onColumnResize,Oe=s.useRef();return s.useEffect(function(){Oe.current&&Et(Me,Oe.current.offsetWidth)},[]),s.createElement(l.a,{onResize:function(Je){var Ye=Je.offsetWidth;Et(Me,Ye)}},s.createElement("td",{ref:Oe,style:{padding:0,border:0,height:0}},s.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function he(ze){var Me=ze.data,Et=ze.getRowKey,Oe=ze.measureColumnWidth,Ve=ze.expandedKeys,Je=ze.onRow,Ye=ze.rowExpandable,Pe=ze.emptyNode,He=ze.childrenColumnName,ve=s.useContext(Z),xe=ve.onColumnResize,de=s.useContext(f.a),je=de.prefixCls,Qe=de.getComponent,ne=s.useContext(X),Ze=ne.fixHeader,lt=ne.horizonScroll,Be=ne.flattenColumns,$e=ne.componentWidth;return s.useMemo(function(){var rt=Qe(["body","wrapper"],"tbody"),xt=Qe(["body","row"],"tr"),ft=Qe(["body","cell"],"td"),st;Me.length?st=Me.map(function(Ge,yt){var pt=Et(Ge,yt);return s.createElement(L,{key:pt,rowKey:pt,record:Ge,recordKey:pt,index:yt,rowComponent:xt,cellComponent:ft,expandedKeys:Ve,onRow:Je,getRowKey:Et,rowExpandable:Ye,childrenColumnName:He})}):st=s.createElement(F,{expanded:!0,className:"".concat(je,"-placeholder"),prefixCls:je,fixHeader:Ze,fixColumn:lt,horizonScroll:lt,component:xt,componentWidth:$e,cellComponent:ft,colSpan:Be.length},Pe);var Ne=Object(u.a)(Be);return s.createElement(rt,{className:"".concat(je,"-tbody")},Oe&&s.createElement("tr",{"aria-hidden":"true",className:"".concat(je,"-measure-row"),style:{height:0}},Ne.map(function(Ge){return s.createElement(re,{key:Ge,columnKey:Ge,onColumnResize:xe})})),st)},[Me,je,Je,Oe,Ve,Et,Qe,$e,Pe,Be])}var Ce=s.memo(he);Ce.displayName="Body";var ke=Ce,te=b("wRmb"),Re=b("xEkU"),Te=b.n(Re);function pe(ze){var Me=Object(s.useRef)(ze),Et=Object(s.useState)({}),Oe=Object(g.a)(Et,2),Ve=Oe[1],Je=Object(s.useRef)(null),Ye=Object(s.useRef)([]);function Pe(He){Je.current===null&&(Ye.current=[],Je.current=Te()(function(){Ye.current.forEach(function(ve){Me.current=ve(Me.current)}),Je.current=null,Ve({})})),Ye.current.push(He)}return Object(s.useEffect)(function(){return function(){Te.a.cancel(Je.current)}},[]),[Me.current,Pe]}function me(ze){var Me=Object(s.useRef)(ze),Et=Object(s.useRef)(null);function Oe(){window.clearTimeout(Et.current)}function Ve(Ye){Me.current=Ye,Oe(),Et.current=window.setTimeout(function(){Me.current=null,Et.current=null},100)}function Je(){return Me.current}return Object(s.useEffect)(function(){return Oe},[]),[Ve,Je]}function se(ze,Me,Et){var Oe=Object(s.useMemo)(function(){for(var Ve=[],Je=[],Ye=0,Pe=0,He=0;He<Me;He+=1)if(Et==="rtl"){Je[He]=Pe,Pe+=ze[He]||0;var ve=Me-He-1;Ve[ve]=Ye,Ye+=ze[ve]||0}else{Ve[He]=Ye,Ye+=ze[He]||0;var xe=Me-He-1;Je[xe]=Pe,Pe+=ze[xe]||0}return{left:Ve,right:Je}},[ze,Me,Et]);return Oe}var be=se;function ae(ze){var Me=ze.className,Et=ze.children;return s.createElement("div",{className:Me},Et)}var fe=ae,Fe=b("n6Qo");function ie(ze){var Me,Et=ze.prefixCls,Oe=ze.record,Ve=ze.onExpand,Je=ze.expanded,Ye=ze.expandable,Pe="".concat(Et,"-row-expand-icon");if(!Ye)return s.createElement("span",{className:p()(Pe,"".concat(Et,"-row-spaced"))});var He=function(xe){Ve(Oe,xe),xe.stopPropagation()};return s.createElement("span",{className:p()(Pe,(Me={},Object(I.a)(Me,"".concat(Et,"-row-expanded"),Je),Object(I.a)(Me,"".concat(Et,"-row-collapsed"),!Je),Me)),onClick:He})}function q(ze,Me,Et){var Oe=[];function Ve(Je){(Je||[]).forEach(function(Ye,Pe){Oe.push(Me(Ye,Pe)),Ve(Ye[Et])})}return Ve(ze),Oe}var Q=b("zT1h"),Y=b("y0+3"),oe=function(Me,Et){var Oe,Ve,Je=Me.scrollBodyRef,Ye=Me.onScroll,Pe=Me.offsetScroll,He=s.useContext(f.a),ve=He.prefixCls,xe=((Oe=Je.current)===null||Oe===void 0?void 0:Oe.scrollWidth)||0,de=((Ve=Je.current)===null||Ve===void 0?void 0:Ve.clientWidth)||0,je=xe&&de*(de/xe),Qe=s.useRef(),ne=pe({scrollLeft:0,isHiddenScrollBar:!1}),Ze=Object(g.a)(ne,2),lt=Ze[0],Be=Ze[1],$e=s.useRef({delta:0,x:0}),rt=s.useState(!1),xt=Object(g.a)(rt,2),ft=xt[0],st=xt[1],Ne=function(){st(!1)},Ge=function(gt){gt.persist(),$e.current.delta=gt.pageX-lt.scrollLeft,$e.current.x=0,st(!0),gt.preventDefault()},yt=function(gt){var Ht,Ut=gt||((Ht=window)===null||Ht===void 0?void 0:Ht.event),Nt=Ut.buttons;if(!ft||Nt===0){ft&&st(!1);return}var Wt=$e.current.x+gt.pageX-$e.current.x-$e.current.delta;Wt<=0&&(Wt=0),Wt+je>=de&&(Wt=de-je),Ye({scrollLeft:Wt/de*(xe+2)}),$e.current.x=gt.pageX},pt=function(){var gt=Object(Y.b)(Je.current).top,Ht=gt+Je.current.offsetHeight,Ut=document.documentElement.scrollTop+window.innerHeight;Ht-Object(r.a)()<=Ut||gt>=Ut-Pe?Be(function(Nt){return Object(v.a)(Object(v.a)({},Nt),{},{isHiddenScrollBar:!0})}):Be(function(Nt){return Object(v.a)(Object(v.a)({},Nt),{},{isHiddenScrollBar:!1})})},jt=function(gt){Be(function(Ht){return Object(v.a)(Object(v.a)({},Ht),{},{scrollLeft:gt/xe*de||0})})};return s.useImperativeHandle(Et,function(){return{setScrollLeft:jt}}),s.useEffect(function(){var Bt=Object(Q.a)(document.body,"mouseup",Ne,!1),gt=Object(Q.a)(document.body,"mousemove",yt,!1);return pt(),function(){Bt.remove(),gt.remove()}},[je,ft]),s.useEffect(function(){var Bt=Object(Q.a)(window,"scroll",pt,!1),gt=Object(Q.a)(window,"resize",pt,!1);return function(){Bt.remove(),gt.remove()}},[]),s.useEffect(function(){lt.isHiddenScrollBar||Be(function(Bt){var gt,Ht;return Object(v.a)(Object(v.a)({},Bt),{},{scrollLeft:Je.current.scrollLeft/((gt=Je.current)===null||gt===void 0?void 0:gt.scrollWidth)*((Ht=Je.current)===null||Ht===void 0?void 0:Ht.clientWidth)})})},[lt.isHiddenScrollBar]),xe<=de||!je||lt.isHiddenScrollBar?null:s.createElement("div",{style:{height:Object(r.a)(),width:de,bottom:Pe},className:"".concat(ve,"-sticky-scroll")},s.createElement("div",{onMouseDown:Ge,ref:Qe,className:p()("".concat(ve,"-sticky-scroll-bar"),Object(I.a)({},"".concat(ve,"-sticky-scroll-bar-active"),ft)),style:{width:"".concat(je,"px"),transform:"translate3d(".concat(lt.scrollLeft,"px, 0, 0)")}}))},le=s.forwardRef(oe);function Ee(ze,Me){return s.useMemo(function(){var Et=!!ze;return{isSticky:Et,stickyClassName:Et?"".concat(Me,"-sticky-header"):"",offsetHeader:Object(y.a)(ze)==="object"&&ze.offsetHeader||0,offsetScroll:Object(y.a)(ze)==="object"&&ze.offsetScroll||0}},[ze,Me])}var Le=[],ge={},De="rc-table-internal-hook",_e=s.memo(function(ze){var Me=ze.children;return Me},function(ze,Me){return o()(ze.props,Me.props)?ze.pingLeft!==Me.pingLeft||ze.pingRight!==Me.pingRight:!1});function Xe(ze){var Me,Et=ze.prefixCls,Oe=ze.className,Ve=ze.rowClassName,Je=ze.style,Ye=ze.data,Pe=ze.rowKey,He=ze.scroll,ve=ze.tableLayout,xe=ze.direction,de=ze.title,je=ze.footer,Qe=ze.summary,ne=ze.id,Ze=ze.showHeader,lt=ze.components,Be=ze.emptyText,$e=ze.onRow,rt=ze.onHeaderRow,xt=ze.internalHooks,ft=ze.transformColumns,st=ze.internalRefs,Ne=ze.sticky,Ge=Ye||Le,yt=!!Ge.length,pt=s.useState(0),jt=Object(g.a)(pt,2),Bt=jt[0],gt=jt[1];s.useEffect(function(){gt(Object(r.a)())});var Ht=s.useMemo(function(){return Object(u.c)(lt,{})},[lt]),Ut=s.useCallback(function(ci,Mn){return Object(u.b)(Ht,ci)||Mn},[Ht]),Nt=s.useMemo(function(){return typeof Pe=="function"?Pe:function(ci){var Mn=ci&&ci[Pe];return Mn}},[Pe]),Wt=Object(S.c)(ze),Qt=Wt.expandIcon,pn=Wt.expandedRowKeys,qt=Wt.defaultExpandedRowKeys,en=Wt.defaultExpandAllRows,qn=Wt.expandedRowRender,$t=Wt.onExpand,cn=Wt.onExpandedRowsChange,mn=Wt.expandRowByClick,yn=Wt.rowExpandable,Vn=Wt.expandIconColumnIndex,$n=Wt.expandedRowClassName,zt=Wt.childrenColumnName,xn=Wt.indentSize,wr=Qt||ie,nr=zt||"children",Tn=s.useMemo(function(){return qn?"row":ze.expandable&&xt===De&&ze.expandable.__PARENT_RENDER_ICON__||Ge.some(function(ci){return ci&&Object(y.a)(ci)==="object"&&ci[nr]})?"nest":!1},[!!qn,Ge]),Yn=s.useState(function(){return qt||(en?q(Ge,Nt,nr):[])}),ce=Object(g.a)(Yn,2),V=ce[0],J=ce[1],ee=s.useMemo(function(){return new Set(pn||V||[])},[pn,V]),Se=s.useCallback(function(ci){var Mn=Nt(ci,Ge.indexOf(ci)),nn,Un=ee.has(Mn);Un?(ee.delete(Mn),nn=Object(T.a)(ee)):nn=[].concat(Object(T.a)(ee),[Mn]),J(nn),$t&&$t(!Un,ci),cn&&cn(nn)},[Nt,ee,Ge,$t,cn]),ue=s.useState(0),nt=Object(g.a)(ue,2),Dt=nt[0],Yt=nt[1],an=Object(te.b)(Object(v.a)(Object(v.a)(Object(v.a)({},ze),Wt),{},{expandable:!!qn,expandedKeys:ee,getRowKey:Nt,onTriggerExpand:Se,expandIcon:wr,expandIconColumnIndex:Vn,direction:xe}),xt===De?ft:null),Xt=Object(g.a)(an,2),Rn=Xt[0],Kn=Xt[1],ar=s.useMemo(function(){return{columns:Rn,flattenColumns:Kn}},[Rn,Kn]),vr=s.useRef(),lr=s.useRef(),Jn=s.useRef(),Tr=s.useState(!1),Ji=Object(g.a)(Tr,2),Vr=Ji[0],oi=Ji[1],pa=s.useState(!1),Bi=Object(g.a)(pa,2),ta=Bi[0],Da=Bi[1],_o=pe(new Map),lo=Object(g.a)(_o,2),wo=lo[0],Fa=lo[1],Gi=Object(u.a)(Kn),Nr=Gi.map(function(ci){return wo.get(ci)}),qr=s.useMemo(function(){return Nr},[Nr.join("_")]),_i=be(qr,Kn.length,xe),Ur=He&&Object(u.d)(He.y),Ar=He&&Object(u.d)(He.x),ti=Ar&&Kn.some(function(ci){var Mn=ci.fixed;return Mn}),yr=s.useRef(),si=Ee(Ne,Et),cr=si.isSticky,Hi=si.offsetHeader,Ni=si.offsetScroll,Zi=si.stickyClassName,yo,Vi,Qa;Ur&&(Vi={overflowY:"scroll",maxHeight:He.y}),Ar&&(yo={overflowX:"auto"},Ur||(Vi={overflowY:"hidden"}),Qa={width:He.x===!0?"auto":He.x,minWidth:"100%"});var ja=s.useCallback(function(ci,Mn){Fa(function(nn){var Un=new Map(nn);return Un.set(ci,Mn),Un})},[]),ni=me(null),Wo=Object(g.a)(ni,2),Ja=Wo[0],bo=Wo[1];function Ao(ci,Mn){if(!Mn)return;typeof Mn=="function"?Mn(ci):Mn.scrollLeft!==ci&&(Mn.scrollLeft=ci)}var Za=function(Mn){var nn=Mn.currentTarget,Un=Mn.scrollLeft,En=typeof Un=="number"?Un:nn.scrollLeft,ur=nn||ge;if(!bo()||bo()===ur){var Dr;Ja(ur),Ao(En,lr.current),Ao(En,Jn.current),Ao(En,(Dr=yr.current)===null||Dr===void 0?void 0:Dr.setScrollLeft)}if(nn){var di=nn.scrollWidth,yi=nn.clientWidth;oi(En>0),Da(En<di-yi)}},Xo=function(){Jn.current&&Za({currentTarget:Jn.current})},er=function(Mn){var nn=Mn.width;Xo(),Yt(vr.current?vr.current.offsetWidth:nn)};s.useEffect(function(){return Xo},[]),s.useEffect(function(){Ar&&Xo()},[Ar]),s.useEffect(function(){xt===De&&st&&(st.body.current=Jn.current)});var _r=Ut(["table"],"table"),tr=s.useMemo(function(){return ve||(ti?He.x==="max-content"?"auto":"fixed":Ur||Kn.some(function(ci){var Mn=ci.ellipsis;return Mn})?"fixed":"auto")},[Ur,ti,Kn,ve]),Mr,Hr={colWidths:qr,columCount:Kn.length,stickyOffsets:_i,onHeaderRow:rt,fixHeader:Ur},mi=s.useMemo(function(){return yt?null:typeof Be=="function"?Be():Be},[yt,Be]),fr=s.createElement(ke,{data:Ge,measureColumnWidth:Ur||Ar||cr,expandedKeys:ee,rowExpandable:yn,getRowKey:Nt,onRow:$e,emptyNode:mi,childrenColumnName:nr}),Wi=s.createElement(D,{colWidths:Kn.map(function(ci){var Mn=ci.width;return Mn}),columns:Kn}),Ea=Qe&&s.createElement(Fe.b,null,Qe(Ge)),jr=Ut(["body"]);if(Ur||cr){var ro;typeof jr=="function"?(ro=jr(Ge,{scrollbarSize:Bt,ref:Jn,onScroll:Za}),Hr.colWidths=Kn.map(function(ci,Mn){var nn=ci.width,Un=Mn===Rn.length-1?nn-Bt:nn;return typeof Un=="number"&&!Number.isNaN(Un)?Un:(Object(n.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):ro=s.createElement("div",{style:Object(v.a)(Object(v.a)({},yo),Vi),onScroll:Za,ref:Jn,className:p()("".concat(Et,"-body"))},s.createElement(_r,{style:Object(v.a)(Object(v.a)({},Qa),{},{tableLayout:tr})},Wi,fr,Ea),cr&&s.createElement(le,{ref:yr,offsetScroll:Ni,scrollBodyRef:Jn,onScroll:Za})),Mr=s.createElement(s.Fragment,null,Ze!==!1&&s.createElement(P,Object.assign({noData:!Ge.length},Hr,ar,{direction:xe,offsetHeader:Hi,stickyClassName:Zi,ref:lr,onScroll:Za})),ro)}else Mr=s.createElement("div",{style:Object(v.a)(Object(v.a)({},yo),Vi),className:p()("".concat(Et,"-content")),onScroll:Za,ref:Jn},s.createElement(_r,{style:Object(v.a)(Object(v.a)({},Qa),{},{tableLayout:tr})},Wi,Ze!==!1&&s.createElement(w,Object.assign({},Hr,ar)),fr,Ea));var ui=Object(S.b)(ze),Oi=s.createElement("div",Object.assign({className:p()(Et,Oe,(Me={},Object(I.a)(Me,"".concat(Et,"-rtl"),xe==="rtl"),Object(I.a)(Me,"".concat(Et,"-ping-left"),Vr),Object(I.a)(Me,"".concat(Et,"-ping-right"),ta),Object(I.a)(Me,"".concat(Et,"-layout-fixed"),ve==="fixed"),Object(I.a)(Me,"".concat(Et,"-fixed-header"),Ur),Object(I.a)(Me,"".concat(Et,"-fixed-column"),ti),Object(I.a)(Me,"".concat(Et,"-scroll-horizontal"),Ar),Object(I.a)(Me,"".concat(Et,"-has-fix-left"),Kn[0]&&Kn[0].fixed),Object(I.a)(Me,"".concat(Et,"-has-fix-right"),Kn[Kn.length-1]&&Kn[Kn.length-1].fixed==="right"),Me)),style:Je,id:ne,ref:vr},ui),s.createElement(_e,{pingLeft:Vr,pingRight:ta,props:Object(v.a)(Object(v.a)({},ze),{},{stickyOffsets:_i,mergedExpandedKeys:ee})},de&&s.createElement(fe,{className:"".concat(Et,"-title")},de(Ge)),s.createElement("div",{className:"".concat(Et,"-container")},Mr),je&&s.createElement(fe,{className:"".concat(Et,"-footer")},je(Ge))));Ar&&(Oi=s.createElement(l.a,{onResize:er},Oi));var xa=s.useMemo(function(){return{prefixCls:Et,getComponent:Ut,scrollbarSize:Bt,direction:xe,fixedInfoList:Kn.map(function(ci,Mn){return h(Mn,Mn,Kn,_i,xe)}),isSticky:cr}},[Et,Ut,Bt,xe,Kn,_i,xe,cr]),Ba=s.useMemo(function(){return Object(v.a)(Object(v.a)({},ar),{},{tableLayout:tr,rowClassName:Ve,expandedRowClassName:$n,componentWidth:Dt,fixHeader:Ur,fixColumn:ti,horizonScroll:Ar,expandIcon:wr,expandableType:Tn,expandRowByClick:mn,expandedRowRender:qn,onTriggerExpand:Se,expandIconColumnIndex:Vn,indentSize:xn})},[ar,tr,Ve,$n,Dt,Ur,ti,Ar,wr,Tn,mn,qn,Se,Vn,xn]),zo=s.useMemo(function(){return{onColumnResize:ja}},[ja]);return s.createElement(f.a.Provider,{value:xa},s.createElement(X.Provider,{value:Ba},s.createElement(Z.Provider,{value:zo},Oi)))}Xe.Column=t.a,Xe.ColumnGroup=i.a,Xe.Summary=Fe.a,Xe.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var tt=H.b=Xe},wRmb:function(j,H,b){"use strict";b.d(H,"a",function(){return o});var I=b("rePB"),v=b("KQm4"),T=b("VTBJ"),y=b("Ff2n"),g=b("q1tI"),s=b.n(g),_=b("Kwbf"),p=b("Zm9Q"),e=b("hW8S");function o(t){return Object(p.a)(t).filter(function(a){return g.isValidElement(a)}).map(function(a){var c=a.key,d=a.props,f=d.children,h=Object(y.a)(d,["children"]),u=Object(T.a)({key:c},h);return f&&(u.children=o(f)),u})}function n(t){return t.reduce(function(a,c){var d=c.fixed,f=d===!0?"left":d,h=c.children;return h&&h.length>0?[].concat(Object(v.a)(a),Object(v.a)(n(h).map(function(u){return Object(T.a)({fixed:f},u)}))):[].concat(Object(v.a)(a),[Object(T.a)(Object(T.a)({},c),{},{fixed:f})])},[])}function l(t){for(var a=!0,c=0;c<t.length;c+=1){var d=t[c];if(a&&d.fixed!=="left")a=!1;else if(!a&&d.fixed==="left"){Object(_.a)(!1,"Index ".concat(c-1," of `columns` missing `fixed='left'` prop."));break}}for(var f=!0,h=t.length-1;h>=0;h-=1){var u=t[h];if(f&&u.fixed!=="right")f=!1;else if(!f&&u.fixed==="right"){Object(_.a)(!1,"Index ".concat(h+1," of `columns` missing `fixed='right'` prop."));break}}}function r(t){return t.map(function(a){var c=a.fixed,d=Object(y.a)(a,["fixed"]),f=c;return c==="left"?f="right":c==="right"&&(f="left"),Object(T.a)({fixed:f},d)})}function i(t,a){var c=t.prefixCls,d=t.columns,f=t.children,h=t.expandable,u=t.expandedKeys,E=t.getRowKey,x=t.onTriggerExpand,O=t.expandIcon,C=t.rowExpandable,w=t.expandIconColumnIndex,S=t.direction,A=t.expandRowByClick,D=g.useMemo(function(){return d||o(f)},[d,f]),M=g.useMemo(function(){if(h){var z,X=w||0,k=D[X],F=(z={},Object(I.a)(z,e.a,{className:"".concat(c,"-expand-icon-col")}),Object(I.a)(z,"title",""),Object(I.a)(z,"fixed",k?k.fixed:null),Object(I.a)(z,"className","".concat(c,"-row-expand-icon-cell")),Object(I.a)(z,"render",function(B,Z,re){var he=E(Z,re),Ce=u.has(he),ke=C?C(Z):!0,te=O({prefixCls:c,expanded:Ce,expandable:ke,record:Z,onExpand:x});return A?g.createElement("span",{onClick:function(Te){return Te.stopPropagation()}},te):te}),z),U=D.slice();return X>=0&&U.splice(X,0,F),U}return D},[h,D,E,u,O,S]),N=g.useMemo(function(){var z=M;return a&&(z=a(z)),z.length||(z=[{render:function(){return null}}]),z},[a,M,S]),P=g.useMemo(function(){return S==="rtl"?r(n(N)):n(N)},[N,S]);return[N,P]}H.b=i},wZgz:function(j,H,b){(function(I,v,T){j.exports=H=v(b("Ib8C"),b("ETIr"),b("cv67"),b("K3mO"),b("OLod"))})(this,function(I){return function(){var v=I,T=v.lib,y=T.BlockCipher,g=v.algo,s=[],_=[],p=[],e=[],o=[],n=[],l=[],r=[],i=[],t=[];(function(){for(var d=[],f=0;f<256;f++)f<128?d[f]=f<<1:d[f]=f<<1^283;for(var h=0,u=0,f=0;f<256;f++){var E=u^u<<1^u<<2^u<<3^u<<4;E=E>>>8^E&255^99,s[h]=E,_[E]=h;var x=d[h],O=d[x],C=d[O],w=d[E]*257^E*16843008;p[h]=w<<24|w>>>8,e[h]=w<<16|w>>>16,o[h]=w<<8|w>>>24,n[h]=w;var w=C*16843009^O*65537^x*257^h*16843008;l[E]=w<<24|w>>>8,r[E]=w<<16|w>>>16,i[E]=w<<8|w>>>24,t[E]=w,h?(h=x^d[d[d[C^x]]],u^=d[d[u]]):h=u=1}})();var a=[0,1,2,4,8,16,32,64,128,27,54],c=g.AES=y.extend({_doReset:function(){var d;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var f=this._keyPriorReset=this._key,h=f.words,u=f.sigBytes/4,E=this._nRounds=u+6,x=(E+1)*4,O=this._keySchedule=[],C=0;C<x;C++)C<u?O[C]=h[C]:(d=O[C-1],C%u?u>6&&C%u==4&&(d=s[d>>>24]<<24|s[d>>>16&255]<<16|s[d>>>8&255]<<8|s[d&255]):(d=d<<8|d>>>24,d=s[d>>>24]<<24|s[d>>>16&255]<<16|s[d>>>8&255]<<8|s[d&255],d^=a[C/u|0]<<24),O[C]=O[C-u]^d);for(var w=this._invKeySchedule=[],S=0;S<x;S++){var C=x-S;if(S%4)var d=O[C];else var d=O[C-4];S<4||C<=4?w[S]=d:w[S]=l[s[d>>>24]]^r[s[d>>>16&255]]^i[s[d>>>8&255]]^t[s[d&255]]}},encryptBlock:function(d,f){this._doCryptBlock(d,f,this._keySchedule,p,e,o,n,s)},decryptBlock:function(d,f){var h=d[f+1];d[f+1]=d[f+3],d[f+3]=h,this._doCryptBlock(d,f,this._invKeySchedule,l,r,i,t,_);var h=d[f+1];d[f+1]=d[f+3],d[f+3]=h},_doCryptBlock:function(d,f,h,u,E,x,O,C){for(var w=this._nRounds,S=d[f]^h[0],A=d[f+1]^h[1],D=d[f+2]^h[2],M=d[f+3]^h[3],N=4,P=1;P<w;P++){var z=u[S>>>24]^E[A>>>16&255]^x[D>>>8&255]^O[M&255]^h[N++],X=u[A>>>24]^E[D>>>16&255]^x[M>>>8&255]^O[S&255]^h[N++],k=u[D>>>24]^E[M>>>16&255]^x[S>>>8&255]^O[A&255]^h[N++],F=u[M>>>24]^E[S>>>16&255]^x[A>>>8&255]^O[D&255]^h[N++];S=z,A=X,D=k,M=F}var z=(C[S>>>24]<<24|C[A>>>16&255]<<16|C[D>>>8&255]<<8|C[M&255])^h[N++],X=(C[A>>>24]<<24|C[D>>>16&255]<<16|C[M>>>8&255]<<8|C[S&255])^h[N++],k=(C[D>>>24]<<24|C[M>>>16&255]<<16|C[S>>>8&255]<<8|C[A&255])^h[N++],F=(C[M>>>24]<<24|C[S>>>16&255]<<16|C[A>>>8&255]<<8|C[D&255])^h[N++];d[f]=z,d[f+1]=X,d[f+2]=k,d[f+3]=F},keySize:256/32});v.AES=y._createHelper(c)}(),I.AES})},wbyO:function(j,H,b){(function(I,v){j.exports=H=v(b("Ib8C"))})(this,function(I){return function(){var v=I,T=v.lib,y=T.WordArray,g=v.enc,s=g.Base64url={stringify:function(p,e=!0){var o=p.words,n=p.sigBytes,l=e?this._safe_map:this._map;p.clamp();for(var r=[],i=0;i<n;i+=3)for(var t=o[i>>>2]>>>24-i%4*8&255,a=o[i+1>>>2]>>>24-(i+1)%4*8&255,c=o[i+2>>>2]>>>24-(i+2)%4*8&255,d=t<<16|a<<8|c,f=0;f<4&&i+f*.75<n;f++)r.push(l.charAt(d>>>6*(3-f)&63));var h=l.charAt(64);if(h)for(;r.length%4;)r.push(h);return r.join("")},parse:function(p,e=!0){var o=p.length,n=e?this._safe_map:this._map,l=this._reverseMap;if(!l){l=this._reverseMap=[];for(var r=0;r<n.length;r++)l[n.charCodeAt(r)]=r}var i=n.charAt(64);if(i){var t=p.indexOf(i);t!==-1&&(o=t)}return _(p,o,l)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function _(p,e,o){for(var n=[],l=0,r=0;r<e;r++)if(r%4){var i=o[p.charCodeAt(r-1)]<<r%4*2,t=o[p.charCodeAt(r)]>>>6-r%4*2,a=i|t;n[l>>>2]|=a<<24-l%4*8,l++}return y.create(n,l)}}(),I.enc.Base64url})},whVF:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;var I=b("lNSK"),v=T(b("1q3G"));function T(p){return p&&p.__esModule?p:{default:p}}function y(p,e){if(!(p instanceof e))throw new TypeError("Cannot call a class as a function")}function g(p,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(p,n.key,n)}}function s(p,e,o){return e&&g(p.prototype,e),o&&g(p,o),p}var _=function(){function p(){y(this,p),this.strm=new v.default,this.chunkSize=1024*10*10,this.outputBuffer=new Uint8Array(this.chunkSize),this.windowBits=5,(0,I.deflateInit)(this.strm,this.windowBits)}return s(p,[{key:"deflate",value:function(o){this.strm.input=o,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),l=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 r=[l],i=l.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 t=new Uint8Array(this.strm.output.buffer,0,this.strm.next_out);i+=t.length,r.push(t)}while(this.strm.avail_in>0);for(var a=new Uint8Array(i),c=0,d=0;d<r.length;d++)a.set(r[d],c),c+=r[d].length;l=a}return this.strm.input=null,this.strm.avail_in=0,this.strm.next_in=0,l}}]),p}();H.default=_},wzkS:function(j,H,b){"use strict";b.d(H,"c",function(){return g}),b.d(H,"b",function(){return s}),b.d(H,"d",function(){return _}),b.d(H,"a",function(){return e}),b.d(H,"e",function(){return o});var I=b("9og8"),v=b("WmNS"),T=b.n(v),y=b("ErOA");function g(n){return Object(y.c)("libraries/".concat(n,".json"))}function s(){return Object(y.c)("library_tags.json")}function _(n){return p.apply(this,arguments)}function p(){return p=Object(I.a)(T.a.mark(function n(l){var r;return T.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(y.b)("attachments/".concat(l,".json"));case 2:return r=t.sent,t.abrupt("return",r.status===0);case 4:case"end":return t.stop()}},n)})),p.apply(this,arguments)}function e(n){return Object(y.f)("libraries.json",n)}function o(n,l){return Object(y.g)("libraries/".concat(n,".json"),l)}},xO64:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;var I=v(b("8K/p"));function v(t){return t&&t.__esModule?t:{default:t}}function T(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?T=function(c){return typeof c}:T=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},T(t)}function y(t,a){if(!(t instanceof a))throw new TypeError("Cannot call a class as a function")}function g(t,a){for(var c=0;c<a.length;c++){var d=a[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(t,d.key,d)}}function s(t,a,c){return a&&g(t.prototype,a),c&&g(t,c),t}function _(t,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(a&&a.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),a&&p(t,a)}function p(t,a){return p=Object.setPrototypeOf||function(d,f){return d.__proto__=f,d},p(t,a)}function e(t){var a=l();return function(){var d=r(t),f;if(a){var h=r(this).constructor;f=Reflect.construct(d,arguments,h)}else f=d.apply(this,arguments);return o(this,f)}}function o(t,a){return a&&(T(a)==="object"||typeof a=="function")?a:n(t)}function n(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}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(t){return!1}}function r(t){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},r(t)}var i=function(t){_(c,t);var a=e(c);function c(){return y(this,c),a.apply(this,arguments)}return s(c,[{key:"_pngRect",value:function(f,h,u,E,x,O,C){var w=this._readData(x);return w===null?!1:(O.imageRect(f,h,u,E,"image/png",w),!0)}},{key:"_basicRect",value:function(f,h,u,E,x,O,C,w){throw new Error("BasicCompression received in TightPNG rect")}}]),c}(I.default);H.default=i},xSIq:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.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"};H.default=I},xlC8:function(j,H,b){"use strict";Object.defineProperty(H,"__esModule",{value:!0}),H.default=I;function I(v,T,y,g){for(var s=v&65535|0,_=v>>>16&65535|0,p=0;y!==0;){p=y>2e3?2e3:y,y-=p;do s=s+T[g++]|0,_=_+s|0;while(--p);s%=65521,_%=65521}return s|_<<16|0}},"y0+3":function(j,H,b){"use strict";b.d(H,"a",function(){return n}),b.d(H,"b",function(){return r});var I=/margin|padding|width|height|max|min|offset/,v={left:!0,top:!0},T={cssFloat:1,styleFloat:1,float:1};function y(i){return i.nodeType===1?i.ownerDocument.defaultView.getComputedStyle(i,null):{}}function g(i,t,a){if(t=t.toLowerCase(),a==="auto"){if(t==="height")return i.offsetHeight;if(t==="width")return i.offsetWidth}return t in v||(v[t]=I.test(t)),v[t]?parseFloat(a)||0:a}function s(i,t){var a=arguments.length,c=y(i);return t=T[t]?"cssFloat"in i.style?"cssFloat":"styleFloat":t,a===1?c:g(i,t,c[t]||i.style[t])}function _(i,t,a){var c=arguments.length;if(t=T[t]?"cssFloat"in i.style?"cssFloat":"styleFloat":t,c===3)return typeof a=="number"&&I.test(t)&&(a="".concat(a,"px")),i.style[t]=a,a;for(var d in t)t.hasOwnProperty(d)&&_(i,d,t[d]);return y(i)}function p(i){return i===document.body?document.documentElement.clientWidth:i.offsetWidth}function e(i){return i===document.body?window.innerHeight||document.documentElement.clientHeight:i.offsetHeight}function o(){var i=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),t=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:i,height:t}}function n(){var i=document.documentElement.clientWidth,t=window.innerHeight||document.documentElement.clientHeight;return{width:i,height:t}}function l(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function r(i){var t=i.getBoundingClientRect(),a=document.documentElement;return{left:t.left+(window.pageXOffset||a.scrollLeft)-(a.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||a.scrollTop)-(a.clientTop||document.body.clientTop||0)}}},y5JW:function(j,H,b){"use strict";b.d(H,"c",function(){return a}),b.d(H,"a",function(){return c});var I=b("DZo9"),v=b("8z0m"),T=b("+L6B"),y=b("2/Rp"),g=b("9og8"),s=b("miYZ"),_=b("tsqr"),p=b("k1fw"),e=b("oBTY"),o=b("WmNS"),n=b.n(o),l=b("q1tI"),r=b.n(l),i=b("m3rI"),t=b("wzkS"),a="\u3000\u3000";function c(d){var f=["Bytes","KB","MB","GB","TB"];if(d==0)return"0 Byte";var h=parseInt(""+Math.floor(Math.log(d)/Math.log(1024)),10);return(d/Math.pow(1024,h)).toFixed(1)+" "+f[h]}H.b=function(d){var f=d.value,h=f===void 0?[]:f,u=d.action,E=d.onChange,x=d.className,O=d.maxSize,C=O===void 0?150:O,w=d.title,S=w===void 0?"\u6587\u4EF6\u4E0A\u4F20":w,A=d.accept,D=A===void 0?null:A,M={multiple:!1,fileList:h,accept:D,withCredentials:!0,beforeUpload:function(z){var X=z.size/1024/1024;return!0},action:"".concat(i.a.API_SERVER,"/api/attachments.json"),onChange:function(z){var X,k,F=Object(e.a)(z.fileList);if(F=F.map(function(B){return B.name.indexOf(a)===-1&&(B.name="".concat(B.name).concat(a).concat(c(B.size))),Object(p.a)({},B)}),z.file.status==="done"&&((X=z.file)===null||X===void 0||((k=X.response)===null||k===void 0)?void 0:k.status)===-1){var U,L;_.b.error((U=z.file)===null||U===void 0||((L=U.response)===null||L===void 0)?void 0:L.message),E([]);return}E(F)},onRemove:function(){var P=Object(g.a)(n.a.mark(function X(k){var F,U,L;return n.a.wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:if(F=k.size/1024/1024,!(k.status==="uploading")){Z.next=3;break}return Z.abrupt("return",!0);case 3:if(F<C){Z.next=7;break}return Z.abrupt("return",!0);case 7:if(U=k.response?k.response.id:k.uid,!U){Z.next=15;break}return Z.next=11,Object(t.d)(k.response?k.response.id:k.id);case 11:return L=Z.sent,Z.abrupt("return",L);case 15:return Z.abrupt("return",!0);case 16:case"end":return Z.stop()}},X)}));function z(X){return P.apply(this,arguments)}return z}()};function N(P){P.preventDefault(),P.stopPropagation()}return r.a.createElement("div",{className:"single-upload ".concat(x||"")},r.a.createElement(v.a,M,r.a.createElement(y.a,{type:"primary",title:h.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:h.length>0,ghost:!0},S),r.a.createElement("span",{onClick:N,style:{marginLeft:10}},"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927",C,"M)"," ")))}},"yTi+":function(j,H,b){j.exports=b.p+"static/AssistantCode3.fdd8db3c.jpeg"},"yi/R":function(j,H,b){"use strict";b.r(H);var I=b("oBTY"),v=b("bbsP"),T=b("/wGt"),y=b("T2oS"),g=b("W9HT"),s=b("0Owb"),_=b("jrin"),p=b("2qtc"),e=b("kLXV"),o=b("miYZ"),n=b("tsqr"),l=b("9og8"),r=b("tJVT"),i=b("PpiC"),t=b("k1fw"),a=b("ozfa"),c=b("MJZm"),d=b("WmNS"),f=b.n(d),h=b("q1tI"),u=b.n(h),E=b("Ty5D"),x=b("H65k"),O=b("+Axu"),C=b("f+oW"),w=b.n(C),S=b("bntm"),A=function(we){var qe,it=we.position,At=we.subject,kt=we.score,vt=we.onViewAllTask,at=Object(h.useState)(!1),Lt=Object(r.a)(at,2),Ct=Lt[0],_t=Lt[1],St=Object(E.h)();function Gt(){_t(!Ct),Object(S.a)()?Object(S.b)():Object(S.d)(document.getElementById("task-left-panel"))}var Ft=function(){Object(S.a)()?_t(!0):_t(!1)};return Object(h.useEffect)(function(){return document.addEventListener(Object(S.c)(),Ft),function(){document.removeEventListener(Object(S.c)(),Ft)}},[]),u.a.createElement("div",{className:"task-header"},u.a.createElement("a",{title:"\u67E5\u770B\u5168\u90E8\u4EFB\u52A1",onClick:vt},u.a.createElement("img",{src:w.a,alt:"nav",width:45})),u.a.createElement("h3",{title:At},"\u7B2C",it,"\u5173\uFF1A",At),u.a.createElement("span",null,kt),!((St==null||((qe=St.query)===null||qe===void 0)?void 0:qe.isFullScreen)==="true")&&u.a.createElement("a",{onClick:Gt,title:Ct?"\u9000\u51FA\u5168\u5C4F":"\u5168\u5C4F"},u.a.createElement("i",{className:Ct?"iconfont icon-shousuo c-grey-333 font16 ml10 current":"iconfont icon-zhankai c-grey-333 font16 ml10 current"})))},D=b("DjyN"),M=b("NUBc"),N=b("g9YV"),P=b("wCAj"),z=b("cWXX"),X=b("/ezw"),k=b("BdwD"),F=b("p4vh"),U=b.n(F),L=b("Q+I+"),B=b.n(L),Z=b("Yr8L"),re=b.n(Z),he=b("IZBM"),Ce=b("1vsH"),ke=b("wd/R"),te=b.n(ke),Re={0:U.a,1:B.a,2:re.a},Te={loading:!0,page:1,data:null},pe;(function(we){we[we.SET_LOADING=0]="SET_LOADING",we[we.SET_STATE=1]="SET_STATE",we[we.SET_PAGE=2]="SET_PAGE"})(pe||(pe={}));function me(we,qe){switch(qe.type){case pe.SET_LOADING:return Object(t.a)(Object(t.a)({},we),{},{loading:qe.payload});case pe.SET_STATE:return Object(t.a)(Object(t.a)({},we),qe.payload);case pe.SET_PAGE:return Object(t.a)(Object(t.a)({},we),{},{page:qe.payload});default:throw new Error}}var se=function(we){var qe=we.activeIndex,it=we.taskId,At=Object(h.useReducer)(me,Te),kt=Object(r.a)(At,2),vt=kt[0],at=kt[1],Lt=vt.loading,Ct=vt.page,_t=vt.data,St=Object(h.useMemo)(function(){var Ft=[{title:"\u6392\u540D",dataIndex:"user_name",align:"center",render:function(Vt,Zt,on){var ln=(Ct-1)*10+on+1;return ln<=3?u.a.createElement("img",{src:Re[ln-1],alt:"rank",width:36}):ln}},{title:"\u59D3\u540D",dataIndex:"user_name"},{title:_t==null?void 0:_t.rank_data_name,dataIndex:"score",render:function(Vt){return(_t==null?void 0:_t.open_rank)==="DEFAULT"?Object(Ce.bb)(Vt):Vt}},{title:"\u901A\u5173\u65F6\u95F4",dataIndex:"end_time",render:function(Vt){return te()(Vt).format("YYYY-MM-DD HH:mm:ss")}}];return Ft},[_t==null?void 0:_t.rank_data_name,_t==null?void 0:_t.open_rank,Ct]);Object(h.useEffect)(function(){function Ft(){return It.apply(this,arguments)}function It(){return It=Object(l.a)(f.a.mark(function Vt(){var Zt;return f.a.wrap(function(ln){for(;;)switch(ln.prev=ln.next){case 0:return ln.next=2,Object(he.t)(it,{page:Ct,limit:10});case 2:Zt=ln.sent,at({type:pe.SET_STATE,payload:{loading:!1,data:Zt.data}});case 4:case"end":return ln.stop()}},Vt)})),It.apply(this,arguments)}qe===4&&Ft()},[Ct,qe,it]);function Gt(Ft){at({type:pe.SET_PAGE,payload:Ft})}return u.a.createElement("div",{className:"ranking-container"},Lt?u.a.createElement(X.a,{avatar:!0,paragraph:{rows:4}}):!_t||(_t==null?void 0:_t.rank_list_count)===0?u.a.createElement(k.a,null):u.a.createElement(u.a.Fragment,null,u.a.createElement(P.a,{pagination:!1,size:"middle",dataSource:_t.rank_list,columns:St}),_t.rank_list_count>10?u.a.createElement(M.a,{style:{marginTop:20},showQuickJumper:!0,showSizeChanger:!1,onChange:Gt,current:Ct,total:_t.rank_list_count}):null))},be=b("fXAG"),ae=b("9Bee"),fe=b("M8RZ"),Fe=b("6lC8"),ie=b("mCJh"),q=b("jb+D"),Q=b("dTJi"),Y=b("pC0b"),oe=b("GzdX"),le=b("OoWo"),Ee="YYYY-MM-DD HH:mm",Le=function(we){var qe=we.challenge,it=we.position,At=we.status,kt=we.get_gold,vt=we.get_experience,at=we.star,Lt=we.tag_count,Ct=we.finished_time,_t=we.index,St=we.view_answer_time,Gt=we.name,Ft=we.identifier,It=we.identity,Vt=we.shixun,Zt=we.taskList,on=we.onSaveTaskStar,ln=Object(E.h)();function On(Sn){on(Ft,Sn,_t)}var Nn=At===2||Vt.status<2||Zt[_t-1]&&Zt[_t-1].status===2||Vt.task_pass||It<=5;return u.a.createElement("div",{className:"task-item-container ".concat(qe.position===it?"active":""," ").concat(At===2?"finish":"")},u.a.createElement("div",{className:"flex-container challenge-title space-between"},Nn?u.a.createElement("a",{href:"/tasks/".concat(Ft).concat(ln.search),onClick:function(wn){wn.preventDefault(),setTimeout(function(){return window.location.href="/tasks/".concat(Ft).concat(ln.search)},300)}},"".concat(it,". ").concat(Gt)," "):u.a.createElement("span",null,"".concat(it,". ").concat(Gt)),u.a.createElement("i",{className:"iconfont icon-wancheng1 ".concat(At===2?"green":"")})),u.a.createElement("div",{className:"flex-container"},u.a.createElement("p",{className:At===2?"green":""},u.a.createElement("span",null,"\u7ECF\u9A8C\u503C")," ",At===2&&vt>0?"+":"",vt),u.a.createElement("p",{className:At===2?"green":""},u.a.createElement("span",null,"\u91D1\u5E01")," ",At===2&&kt>0?"+":""," ",kt),u.a.createElement("p",null,u.a.createElement("span",null,"\u6280\u80FD\u6807\u7B7E")," ",Lt||"\u65E0")),u.a.createElement("div",{className:"flex-container"},u.a.createElement("p",null,u.a.createElement("span",null,"\u5B8C\u6210\u65F6\u95F4"),Ct?te()(Ct).format(Ee):"--"),u.a.createElement("p",null,u.a.createElement("span",null,"\u67E5\u770B\u7B54\u6848\u65F6\u95F4"),St?te()(St).format(Ee):"--")),Vt.status>=2?u.a.createElement("div",{className:"rate-container"},At===2&&at===0?u.a.createElement(h.Fragment,null,u.a.createElement("span",null,"\u7ED9\u4E2A\u8BC4\u5206\u5427\uFF1A"),u.a.createElement(oe.a,{defaultValue:0,onChange:On})):null,At===2&&at>0?u.a.createElement(h.Fragment,null,u.a.createElement("span",null,"\u5DF2\u8BC4\u5206\uFF1A"),u.a.createElement(oe.a,{value:at,disabled:!0}),u.a.createElement("span",{className:"highlight"},at,"\u5206")):null):null)},ge=function(we){var qe=we.taskList,it=we.challenge,At=we.shixun,kt=we.identity,vt=we.onSaveTaskStar,at=Object(E.h)().query;return u.a.createElement("div",{className:"task-nav-container"},!!at.coursesId&&u.a.createElement("p",{className:"task-tip"},u.a.createElement("div",null,u.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")),qe.map(function(Lt,Ct){var _t=Object(t.a)(Object(t.a)({},Lt),{},{identity:kt,index:Ct,challenge:it,taskList:qe,shixun:At,onSaveTaskStar:vt});return u.a.createElement(Le,Object(s.a)({key:Ct},_t))}))},De=b("88g3"),_e=b.n(De),Xe=b("V0Rq"),tt=b("lzim"),ze=b("HBuW"),Me=function(){var we=Object(l.a)(f.a.mark(function qe(it,At,kt,vt,at){var Lt,Ct;return f.a.wrap(function(St){for(;;)switch(St.prev=St.next){case 0:if(Lt=function(){at?Object(Ce.S)(kt?"/tasks/".concat(Ct==null?void 0:Ct.identifier,"/jupyter"):"/tasks/".concat(Ct.game_identifier,"?subject_id=").concat(vt)):window.location.href=kt?"/tasks/".concat(Ct==null?void 0:Ct.identifier,"/jupyter"):"/tasks/".concat(Ct.game_identifier,"?subject_id=").concat(vt)},!kt){St.next=7;break}return St.next=4,Object(ze.D)({id:it,challenge_id:At,subject_id:vt});case 4:St.t0=St.sent,St.next=10;break;case 7:return St.next=9,Object(ze.E)({id:it,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}Lt(),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(){Me(it,"",kt,vt,at)},1e3),St.abrupt("return");case 20:Lt();case 21:return St.abrupt("return");case 22:(Ct==null?void 0:Ct.status)===-3?Object(Ce.q)():(Ct==null?void 0:Ct.status)===2?Et(Ct==null?void 0:Ct.message):(Ct==null?void 0:Ct.status)===3&&Oe(Ct==null?void 0:Ct.message);case 23:case"end":return St.stop()}},qe)}));return function(it,At,kt,vt,at){return we.apply(this,arguments)}}(),Et=function we(qe){var it;qe=(it=qe)!==null&&it!==void 0&&it.includes(".json")?qe:"".concat(qe,".json"),e.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:u.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(l.a)(f.a.mark(function vt(){var at,Lt;return f.a.wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:return _t.next=2,Object(Xe.T)({url:qe});case 2:if(at=_t.sent,at){_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(ze.E)({id:at.shixun_identifier});case 8:if(Lt=_t.sent,!(Lt!=null&&Lt.game_identifier)){_t.next=12;break}return Object(Ce.S)("/tasks/".concat(Lt.game_identifier)),_t.abrupt("return");case 12:(Lt==null?void 0:Lt.status)===2?we(Lt==null?void 0:Lt.message):(Lt==null?void 0:Lt.status)===3&&Oe(Lt==null?void 0:Lt.message);case 13:case"end":return _t.stop()}},vt)}));function kt(){return At.apply(this,arguments)}return kt}()})},Oe=function(qe){e.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:u.a.createElement("div",{className:"tc font16"},"\u76EE\u524D\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5C1A\u5728\u5185\u6D4B\u4E2D\uFF0C\u5C06\u4E8E",qe,"\u4E4B\u540E\u5F00\u653E\uFF0C\u8C22\u8C22\uFF01")})},Ve=c.a.DirectoryTree,Je=function(we){var qe=we.taskList,it=we.challenge,At=we.shixun,kt=we.identity,vt=we.onSaveTaskStar,at=we.subject_id,Lt=Object(E.i)(),Ct=Object(E.h)().query,_t=Object(h.useState)([]),St=Object(r.a)(_t,2),Gt=St[0],Ft=St[1],It=Object(h.useState)([]),Vt=Object(r.a)(It,2),Zt=Vt[0],on=Vt[1],ln=Object(h.useState)(),On=Object(r.a)(ln,2),Nn=On[0],Sn=On[1];Object(h.useEffect)(function(){wn(qe),on(mt({children:qe},it.id)),Ft(Object(I.a)(qe)),console.log("taskList:",qe)},[qe]);var wn=function sn(hn){hn.map(function(gn,An){var zn;gn.index=An,gn.title=gn.name,gn.id==it.id&&Sn(gn.key),(zn=gn.children)!==null&&zn!==void 0&&zn.length&&sn(gn.children)})},rn=function(hn,gn){console.log("Trigger Select",hn,gn),gn.node.shixun_identifier&&Me(gn.node.shixun_identifier,gn.node.key,!1,at)},Xn=function(){console.log("Trigger Expand")};function mt(sn,hn){var gn;return!sn||typeof sn!="object"?void 0:sn.id==hn?[]:sn.children.some(function(An){return gn=mt(An,hn)})?[].concat(Object(I.a)(gn),[sn.key]):void 0}return u.a.createElement("div",{className:"task-nav-container"},!!Ct.coursesId&&u.a.createElement("p",{className:"task-tip"},u.a.createElement("div",null,u.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")),!!(Gt!=null&&Gt.length)&&u.a.createElement("div",{style:{padding:10}},u.a.createElement(Ve,{className:_e.a.tree,icon:u.a.createElement("i",{className:"iconfont icon-wancheng1 "}),switcherIcon:u.a.createElement("i",{className:"iconfont icon-you1 ",style:{position:"relative",top:-2}}),onSelect:rn,onExpand:Xn,selectedKeys:[Nn],defaultExpandedKeys:Object(I.a)(Zt),treeData:Gt,titleRender:function(hn,gn,An){return u.a.createElement("span",{className:"".concat(it.id==hn.id?_e.a.active:""," multi_ellipsis1"),style:{paddingRight:34}},hn.item_type==="Shixun"&&u.a.createElement("i",{class:"iconfont icon-shixunti2 c-light-primary font20"}),hn.item_type==="Challenge"&&u.a.createElement("i",{style:{fontFamily:"monospace",position:"relative",top:hn.item_type==="Shixun"?-2:0}},"\uFF08",Ce.l[hn.index],"\uFF09"),u.a.createElement("span",{style:{position:"relative",top:hn.item_type==="Shixun"||hn.item_type==="Stage"?-2:0}},hn==null?void 0:hn.name),hn.item_type!=="Stage"&&u.a.createElement("i",{className:"iconfont icon-tasks-img c-grey-999 ".concat((hn==null?void 0:hn.status)==1&&"c-green-29b")},((hn==null?void 0:hn.status)==1||(hn==null?void 0:hn.status)==0)&&u.a.createElement("img",{src:tt.f,width:"16"}),(hn==null?void 0:hn.status)==2&&u.a.createElement("img",{src:tt.g,width:"16"}),(hn==null?void 0:hn.status)==3&&u.a.createElement("img",{src:tt.h,width:"16"})))}})))},Ye=b("Plam"),Pe=b("gp9y"),He=b("Ot1p"),ve=function(we){var qe=we.user_praise,it=we.praise_count,At=we.praisePlus,kt=we.onCreateDiscuss,vt=we.user,at=we.userInfo,Lt=Object(h.useState)(!1),Ct=Object(r.a)(Lt,2),_t=Ct[0],St=Ct[1],Gt=Object(h.useState)(""),Ft=Object(r.a)(Gt,2),It=Ft[0],Vt=Ft[1];function Zt(Sn){Vt(Sn)}function on(){St(!0)}function ln(){St(!1)}function On(){return Nn.apply(this,arguments)}function Nn(){return Nn=Object(l.a)(f.a.mark(function Sn(){return f.a.wrap(function(rn){for(;;)switch(rn.prev=rn.next){case 0:if(at!=null&&at.authentication){rn.next=3;break}return e.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")}}),rn.abrupt("return");case 3:if(!(It.trim()=="")){rn.next=6;break}return n.b.warn("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),rn.abrupt("return");case 6:kt(It),Vt(""),St(!1);case 9:case"end":return rn.stop()}},Sn)})),Nn.apply(this,arguments)}return u.a.createElement("div",{className:"comment-input-editor-container ".concat(_t?"active":""," ")},u.a.createElement("div",{className:_t?"text-area hide":"text-area"},u.a.createElement("input",{placeholder:"\u8BF4\u70B9\u4EC0\u4E48",onClick:on}),u.a.createElement("a",{className:"c-light-black",onClick:At,title:qe?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},u.a.createElement("i",{className:"mr3 ".concat(qe?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"," "),alt:"\u8D5E"}),it?u.a.createElement("span",null,it):"")),_t?u.a.createElement("div",{className:"input-mask",onClick:ln}):null,u.a.createElement("div",{className:_t?"md-container":"md-container hide"},u.a.createElement(He.a,{id:"discuss-input-editor",startInit:_t,miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:It,height:240,onChange:Zt}),u.a.createElement("div",{className:"tip-container",onClick:ln},u.a.createElement("p",null,"\u8BF7\u52FF\u7C98\u8D34\u7B54\u6848\uFF0C\u5426\u5219\u5C06\u9020\u6210\u8D26\u53F7\u7981\u7528\u540E\u679C\uFF01"),u.a.createElement("a",{className:"btn-send",style:{color:"#fff"},onClick:On},"\u53D1\u9001"))))},xe=b("dhSg"),de=b("/omn"),je=b("IxHN"),Qe=b("ARon"),ne=function(we){var qe=we.data;return u.a.createElement(h.Fragment,null,qe&&qe.map(function(it){return u.a.createElement("div",{className:"choose-answer-item",key:it.position},u.a.createElement("p",null,"\u7B2C",it.position,"\u9898"),u.a.createElement(ae.a,{value:it.answer}))}))},Ze=b("DVFL"),lt=function(we){var qe=we.data,it=we.onShowUnlockAnswerModal,At=we.challenge,kt=At!=null&&At.disable_copy?{pointerEvents:"none",userSelect:"none"}:{};return u.a.createElement(h.Fragment,null,qe&&qe.map(function(vt,at){var Lt=vt.answer_id,Ct=vt.answer_name,_t=vt.answer_contents,St=vt.view_time;return u.a.createElement("div",{className:"answer-item-container",style:kt,key:Lt},u.a.createElement("div",{className:"flex-container"},u.a.createElement("span",{className:"level"}," \u7EA7\u522B",at+1,"\uFF1A "),u.a.createElement("span",{className:"name"},Ct),_t?u.a.createElement(h.Fragment,null,u.a.createElement("span",{className:"view-time"},St?te()(St).format("YYYY-MM-DD HH:mm"):""),u.a.createElement("span",null,"\u5DF2\u89E3\u9501")):u.a.createElement("a",{onClick:it},"\u89E3\u9501")),_t?u.a.createElement(ae.a,{value:_t}):null)}))},Be=function(we){var qe=we.loading,it=we.data,At=we.onShowTip,kt=we.st,vt=we.challenge,at=Object(h.useRef)(null),Lt=Object(h.useRef)(null),Ct=Object(h.useRef)(null),_t=Object(h.useRef)(null),St=Object(h.useRef)({x:0,y:0});return Object(h.useEffect)(function(){if(at.current&&vt!==null&&vt!==void 0&&vt.disable_copy){function Gt(Vt){St.current={x:Vt.clientX,y:Vt.clientY},clearTimeout(Ct.current),clearTimeout(_t.current),Ct.current=setTimeout(function(){Lt.current.style.left="".concat(St.current.x,"px"),Lt.current.style.top="".concat(St.current.y,"px"),Lt.current.style.display="block"},1e3),_t.current=setTimeout(function(){Lt.current.style.display="none",clearTimeout(Ct.current),clearTimeout(_t.current)},3e3)}function Ft(){Lt.current.style.display="none",clearTimeout(Ct.current),clearTimeout(_t.current)}function It(Vt){St.current={x:Vt.clientX,y:Vt.clientY}}return at.current.addEventListener("mouseenter",Gt),window.addEventListener("mousemove",It),at.current.addEventListener("mouseleave",Ft),function(){at.current.removeEventListener("mouseenter",Gt),window.removeEventListener("mousemove",It),at.current.removeEventListener("mouseleave",Ft)}}},[at==null?void 0:at.current,vt==null?void 0:vt.disable_copy]),u.a.createElement("div",{ref:at,className:"answer-container"},u.a.createElement("div",{ref:Lt,className:"answer-tips-css"},"\u7981\u6B62\u590D\u5236\u53C2\u8003\u7B54\u6848"),qe?u.a.createElement(je.a,null):null,kt===1?u.a.createElement(ne,{data:it}):u.a.createElement(lt,{data:it,challenge:vt,onShowUnlockAnswerModal:At}))},$e=b("sRBo"),rt=b("kaz8"),xt=b("gflZ"),ft=function(we){var qe=we.data,it=we.selected_unlocked_answer_id,At=we.selected_index,kt=we.onSelect;if(!qe)return null;var vt=qe.filter(function(Lt,Ct){return Lt.answer_contents?!1:(Lt.index=Ct,!0)});function at(Lt){var Ct=Lt.target,_t=Ct.value,St=Ct.checked;kt(St?_t:null)}return u.a.createElement("table",{className:"unlock-answer-list"},u.a.createElement("thead",null,u.a.createElement("tr",null,u.a.createElement("th",null),u.a.createElement("th",null,"\u7EA7\u522B"),u.a.createElement("th",null,"\u540D\u79F0"),u.a.createElement("th",null,"\u6263\u5206\u5360\u6BD4"),u.a.createElement("th",null,"\u6263\u51CF\u91D1\u5E01"))),u.a.createElement("tbody",null,vt.map(function(Lt,Ct){return u.a.createElement("tr",{key:Lt.answer_id},u.a.createElement("td",null,u.a.createElement(rt.a,{value:Lt.answer_id,onChange:at,checked:Lt.answer_id===it||it&&At>=Ct})),u.a.createElement("td",null,Lt.index+1),u.a.createElement("td",null,Lt.answer_name),u.a.createElement("td",null,Lt.answer_ratio,"%"),u.a.createElement("td",{className:"gold-color"},Lt.answer_score))})))},st=b("ErOA"),Ne=b("Q7Vx"),Ge=function(we){var qe=we.unity_3d_routes,it=we.onGetUnity3dMessage,At=we.onEvaluateCallback,kt=we.taskData,vt=we.userInfo,at=Object(h.useRef)(),Lt=Object(E.i)(),Ct=Object(h.useRef)(),_t=Object(h.useState)(!0),St=Object(r.a)(_t,2),Gt=St[0],Ft=St[1],It=Object(h.useState)({}),Vt=Object(r.a)(It,2),Zt=Vt[0],on=Vt[1];Object(h.useEffect)(function(){function wn(Xn){try{var mt=JSON.parse(Xn.data);it(mt),mt.type==="getTaskData"&&Nn({taskData:kt,userInfo:vt})}catch(sn){console.log("error:",sn,Xn)}}window.addEventListener("message",wn);var rn=xe.a.subscribe("evaluate-unity3d-result",function(Xn){Nn(Xn),At&&At()});return function(){clearTimeout(at.current),window.removeEventListener("message",wn),rn()}},[]),Object(h.useEffect)(function(){kt.challenge.thiry_party&&ln();var wn=xe.a.subscribe("reset-linux-windos-vnc",function(){ln()}),rn=xe.a.subscribe("vnc-reseting",function(){on({}),Ft(!0)});return function(){rn(),wn()}},[kt]);var ln=function(){var wn=Object(l.a)(f.a.mark(function rn(){var Xn,mt,sn,hn,gn,An,zn,kn;return f.a.wrap(function(vn){for(;;)switch(vn.prev=vn.next){case 0:return vn.next=2,Object(st.a)("/api/myshixuns/".concat(kt==null||((Xn=kt.myshixun)===null||Xn===void 0)?void 0:Xn.identifier,"/start.json"),{method:"get",params:{game_id:kt==null||((mt=kt.game)===null||mt===void 0)?void 0:mt.id}});case 2:if(gn=vn.sent,Ft(!1),!(gn!=null&&(sn=gn.data)!==null&&sn!==void 0&&(hn=sn.data_list)!==null&&hn!==void 0&&hn.length)){vn.next=7;break}return xe.a.publish("pod-restrict-data",{identifier:gn==null||((An=gn.data)===null||An===void 0)?void 0:An.identifier,data_list:gn==null||((zn=gn.data)===null||zn===void 0)?void 0:zn.data_list}),vn.abrupt("return");case 7:gn!=null&&gn.data&&(gn.data.thiry_party_time=gn.data.remaining_time,gn.data.thiry_party_url=(gn==null||((kn=gn.data)===null||kn===void 0)?void 0:kn.link_url)+"?t="+new Date().getTime(),on(Object(t.a)({},gn.data||{}))),clearTimeout(at.current),at.current=setTimeout(function(){On()},gn.data.thiry_party_time-30*1e3);case 10:case"end":return vn.stop()}},rn)}));return function(){return wn.apply(this,arguments)}}(),On=function(){var wn=Object(l.a)(f.a.mark(function rn(){var Xn;return f.a.wrap(function(sn){for(;;)switch(sn.prev=sn.next){case 0:return sn.next=2,Object(st.a)("/api/tasks/".concat(Lt.taskId||taskId,"/extend_linux_vnc.json"),{method:"post",body:Object(t.a)({},Lt)});case 2:Xn=sn.sent,clearTimeout(at.current),at.current=setTimeout(function(){On()},Xn.data.remaining_time-30*1e3);case 5:case"end":return sn.stop()}},rn)}));return function(){return wn.apply(this,arguments)}}();function Nn(wn){Ct.current&&Ct.current.contentWindow.postMessage(JSON.stringify(wn),"*")}function Sn(){Ft(!1),xe.a.publish("unity3d-load-end")}return u.a.createElement(h.Fragment,null,Gt?u.a.createElement(je.a,{className:"c-white",message:"\u6B63\u5728\u52AA\u529B\u52A0\u8F7D\u4E2D..."}):null,(qe||Zt.thiry_party_url)&&u.a.createElement("iframe",{onLoad:Sn,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:qe||Zt.thiry_party_url}))},yt=b("BjJ7"),pt=b("kaH+");function jt(we){var qe=we.target;if(qe.tagName.toUpperCase()==="IMG"){var it=qe.src||qe.getAttribute("src");it&&it.indexOf("/images/avatars/User")===-1&&(we.stopPropagation(),we.preventDefault(),xe.a.publish("preview-image",it))}}var Bt={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 gt(we,qe){switch(qe.type){case be.A:return Object(t.a)(Object(t.a)({},we),{},{activeIndex:qe.payload});case be.bb:return Object(t.a)(Object(t.a)({},we),{},{enlarge_unity3D:qe.payload});case be.db:return Object(t.a)(Object(t.a)({},we),{},{tab_fixed:qe.payload});case be.Y:return Object(t.a)(Object(t.a)({},we),{},{showTaskList:!0});case be.s:return Object(t.a)(Object(t.a)({},we),{},{showTaskList:!1});case be.m:return Object(t.a)(Object(t.a)({},we),qe.payload);case be.N:return Object(t.a)(Object(t.a)({},we),qe.payload);case be.P:return Object(t.a)(Object(t.a)({},we),{},{loading:!0});case be.Z:return Object(t.a)(Object(t.a)({},we),{},{showTip:!0});case be.t:return Object(t.a)(Object(t.a)({},we),{},{showTip:!1});case be.y:return Object(t.a)(Object(t.a)({},we),{},{selected_unlocked_answer_id:qe.payload});case be.g:return Object(t.a)(Object(t.a)({},we),qe.payload);default:throw new Error}}var Ht=function(we){var qe=we.taskId,it=we.minuxUserGrade,At=we.discusses_count,kt=we.is_teacher,vt=we.has_answer,at=we.user,Lt=we.st,Ct=we.game,_t=we.rank_name,St=we.challenge,Gt=we.myshixun,Ft=we.user_praise,It=we.praise_count,Vt=we.unity_3d_routes,Zt=we.thiry_party_url,on=we.with_code_file,ln=we.onPlusOrCancelPraise,On=we.onEvaluateCallback,Nn=we.onGetUnity3dMessage,Sn=we.shixun,wn=we.taskData,rn=Object(h.useReducer)(gt,Bt),Xn=Object(r.a)(rn,2),mt=Xn[0],sn=Xn[1],hn=Object(h.useState)(!1),gn=Object(r.a)(hn,2),An=gn[0],zn=gn[1],kn=Object(h.useState)(!1),bn=Object(r.a)(kn,2),vn=bn[0],Ln=bn[1],Qn=Object(h.useState)({}),Sr=Object(r.a)(Qn,2),Jr=Sr[0],_n=Sr[1],Er=Object(E.h)().query,Ei=mt.taskList,Zr=mt.showTaskList,xr=mt.activeIndex,Fr=mt.enlarge_unity3D,Dn=mt.tab_fixed,kr=mt.data,Pi=mt.answerScore,Di=mt.loading,co=mt.showTip,Ma=mt.isMultiLevel,fi=mt.selected_unlocked_answer_id,Sa=Object(h.useMemo)(function(){var In=0;if(kr&&fi){for(var or=kr.filter(function(Kr){return!Kr.answer_contents}),Cr=0;Cr<or.length;Cr++)if(or[Cr].answer_id===fi){In=Cr;break}}return In},[kr,fi]),aa=Sn?Sn.propaedeutics:null,da=Object(h.useRef)(),Lo=St.open_rank;console.log(St,"challenge");var ho=Object(h.useMemo)(function(){var In=[{index:0,title:"\u4EFB\u52A1\u8981\u6C42"}];return aa&&In.push({index:1,title:"\u80CC\u666F\u77E5\u8BC6"}),vt&&Er.type!=="exercises"&&!(St!=null&&St.hide_answer)&&In.push({index:2,title:"\u53C2\u8003\u7B54\u6848"}),Er.type!=="exercises"&&!(Sn!=null&&Sn.is_disable_discuss)&&In.push({index:3,title:"\u8BC4\u8BBA"}),Lo!=="CLOSE"&&In.push({index:4,title:_t}),In},[vt,aa,Lo,_t]);function $a(In){var or=parseInt(In.currentTarget.id);or===2?Ct.homework_common_answer_open?n.b.info("\u7981\u6B62\u67E5\u770B\u7B54\u6848"):Pa():or===3&&Ct.homework_common_comment_open?n.b.info("\u7981\u6B62\u67E5\u770B\u8BC4\u8BBA"):sn({type:be.A,payload:or})}function Pa(){return ao.apply(this,arguments)}function ao(){return ao=Object(l.a)(f.a.mark(function In(){var or;return f.a.wrap(function(Kr){for(;;)switch(Kr.prev=Kr.next){case 0:if(!(Lt===0)){Kr.next=5;break}return Kr.next=3,So();case 3:Kr.next=9;break;case 5:return Kr.next=7,Object(he.q)(Ct.identifier);case 7:or=Kr.sent,Ha(or);case 9:case"end":return Kr.stop()}},In)})),ao.apply(this,arguments)}function So(){return Ka.apply(this,arguments)}function Ka(){return Ka=Object(l.a)(f.a.mark(function In(){var or,Cr,Kr;return f.a.wrap(function(ii){for(;;)switch(ii.prev=ii.next){case 0:return ii.next=2,Object(he.p)(Ct.identifier);case 2:if(or=ii.sent,Cr=or.message,!(Cr.length===0)){ii.next=7;break}return n.b.info("\u672C\u5173\u5361\u672A\u8BBE\u7F6E\u7B54\u6848"),ii.abrupt("return");case 7:if(Cr.length){ii.next=10;break}return sn({type:be.g,payload:{showTip:!0,isMultiLevel:!1,answerScore:Cr.answer_score,selected_unlocked_answer_id:Cr.answer_id}}),ii.abrupt("return");case 10:Kr=Cr.filter(function(Fo){return Fo.answer_contents}).length===0,sn({type:be.g,payload:{showTip:Kr,data:Cr,isMultiLevel:Cr.length>1,activeIndex:Kr?xr:2}});case 12:case"end":return ii.stop()}},In)})),Ka.apply(this,arguments)}function Ha(In){var or=In.choose_answers,Cr=In.message,Kr=In.status;if(Kr===0){n.b.info(Cr);return}sn({type:be.g,payload:{showTip:Kr===1,data:or,answerScore:Cr,loading:!1,activeIndex:Kr===1?xr:2}})}function oa(){sn({type:be.t})}function sa(){sn({type:be.Z})}function Br(){return la.apply(this,arguments)}function la(){return la=Object(l.a)(f.a.mark(function In(){var or,Cr,Kr,Ir,ii;return f.a.wrap(function(Wa){for(;;)switch(Wa.prev=Wa.next){case 0:if(zn(!0),!(Lt===1)){Wa.next=8;break}return Wa.next=4,Object(he.r)(Ct.identifier);case 4:or=Wa.sent,(or==null?void 0:or.status)!==-1&&(it(Pi),Ha(or)),Wa.next=14;break;case 8:if(!fi){Wa.next=14;break}return Wa.next=11,Object(he.u)(Ct.identifier,fi);case 11:Cr=Wa.sent,Kr=Cr.status,Ir=Cr.message,Kr===-1||(Ma?(ii=0,kr.filter(function(mo){return!mo.answer_contents}).forEach(function(mo,es){es<=Sa&&mo&&(ii+=mo.answer_score)}),it(ii)):it(Pi),So(),xi(null),sn({type:be.t}));case 14:zn(!1);case 15:case"end":return Wa.stop()}},In)})),la.apply(this,arguments)}function xi(In){sn({type:be.y,payload:In})}function wi(){return ji.apply(this,arguments)}function ji(){return ji=Object(l.a)(f.a.mark(function In(){var or,Cr;return f.a.wrap(function(Ir){for(;;)switch(Ir.prev=Ir.next){case 0:if(Ir.prev=0,!Er.subject_id){Ir.next=7;break}return Ir.next=4,Object(he.k)(Gt.identifier,Object(t.a)({},Er));case 4:Cr=Ir.sent,Ir.next=10;break;case 7:return Ir.next=9,Object(he.o)(Gt.identifier);case 9:Cr=Ir.sent;case 10:sn({type:be.m,payload:{taskList:((or=Cr)===null||or===void 0?void 0:or.stages)||Cr,showTaskList:!0}}),Ir.next=16;break;case 13:Ir.prev=13,Ir.t0=Ir.catch(0),console.log(Ir.t0);case 16:case"end":return Ir.stop()}},In,null,[[0,13]])})),ji.apply(this,arguments)}function Ii(In,or,Cr){return ua.apply(this,arguments)}function ua(){return ua=Object(l.a)(f.a.mark(function In(or,Cr,Kr){return f.a.wrap(function(ii){for(;;)switch(ii.prev=ii.next){case 0:return ii.prev=0,ii.next=3,Object(he.H)(or,Sn.id,Cr);case 3:Ei[Kr].star=Cr,sn({type:be.N,payload:{taskList:Object(I.a)(Ei)}}),ii.next=10;break;case 7:ii.prev=7,ii.t0=ii.catch(0),console.log(ii.t0);case 10:case"end":return ii.stop()}},In,null,[[0,7]])})),ua.apply(this,arguments)}function Oa(){wi()}function fo(){sn({type:be.s})}Object(h.useEffect)(function(){if(!(Sn!=null&&Sn.identifier))return;var In=Object(q.t)({objective_type:"shixun",objective_id:Sn==null?void 0:Sn.identifier,school:1});In.then(function(or){var Cr;_n(Object(t.a)({},or)),Ln(or==null||((Cr=or.shixun)===null||Cr===void 0)?void 0:Cr.own)})},[Sn==null?void 0:Sn.identifier]),Object(h.useEffect)(function(){return function(){sn({type:be.s}),sn({type:be.A,payload:0})}},[qe]),Object(h.useEffect)(function(){sn({type:be.A,payload:Er.extra?3:0})},[Er.extra]),Object(h.useEffect)(function(){if(da.current)return da.current.addEventListener("mousedown",jt),function(){da.current.removeEventListener("mousedown",jt)}},[da.current]),Object(h.useEffect)(function(){if((on&&Vt||Zt)&&da.current){var In=Object(yt.b)(function(Cr){var Kr=Cr.target.scrollTop;Kr>=354?sn({type:be.db,payload:!0}):sn({type:be.db,payload:!1})},10);da.current.addEventListener("scroll",In);var or=xe.a.subscribe("evaluate-unity3d-finish",function(){da.current.scrollTop=0});return function(){da.current.removeEventListener("scroll",In),or()}}},[on,Vt,Zt,da.current]);var eo=St.position,ha=St.score,Co=St.subject,ga={onViewAllTask:Oa,position:eo,score:ha,subject:Co};function po(In){return fa.apply(this,arguments)}function fa(){return fa=Object(l.a)(f.a.mark(function In(or){var Cr;return f.a.wrap(function(Ir){for(;;)switch(Ir.prev=Ir.next){case 0:return Ir.next=2,Object(ie.b)({content:or,container_type:"Shixun",container_id:Sn.id,challenge_id:St.id,position:eo});case 2:if(Cr=Ir.sent,!(Cr.status===-3)){Ir.next=6;break}return e.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"}),Ir.abrupt("return");case 6:console.log(Cr),sn({type:be.A,payload:3}),xe.a.publish("create-discuss");case 9:case"end":return Ir.stop()}},In)})),fa.apply(this,arguments)}function Ai(){sn({type:be.bb,payload:!Fr})}var vi={loading:Di,data:kr,onShowTip:sa,st:Lt,challenge:St};return u.a.createElement(h.Fragment,null,u.a.createElement(A,ga),u.a.createElement("div",{className:"content-wrapper",ref:da},Vt&&on?u.a.createElement("div",{className:"unity-3d-container ".concat(Fr?"enlarge":"")},u.a.createElement("a",{onClick:Ai,className:"btn-enlarge ".concat(Fr?"enlarge":"")},u.a.createElement("i",{className:"iconfont ".concat(Fr?"icon-suoxiao1":"icon-kuoda"," ")})),(Jr==null?void 0:Jr.user_id)&&u.a.createElement(Ge,{userInfo:Jr,taskData:wn,unity_3d_routes:Vt,onGetUnity3dMessage:Nn,onEvaluateCallback:On})):null,u.a.createElement("ul",{className:"tab-nav ".concat(Dn?"tab-fixed":"")},ho.map(function(In){return u.a.createElement("li",{onClick:$a,id:In.index,key:In.title,className:xr===In.index?"active":""},u.a.createElement("a",null,In.title,In.index===3&&At?u.a.createElement("span",null,At):null))})),u.a.createElement("div",{className:xr===0?"tab-panel-body ".concat(Vt&&on?"scroll-margin-top":""):"hide"},u.a.createElement(ae.a,{value:St.task_pass})),u.a.createElement("div",{className:xr===1?"tab-panel-body":"hide"},aa?u.a.createElement(ae.a,{value:aa}):null),u.a.createElement("div",{className:xr===2?"tab-panel-body":"hide",style:{padding:"0 0 20px 0"}},u.a.createElement(Be,vi)),u.a.createElement("div",{className:xr===3?"tab-panel-body":"hide"},u.a.createElement(Ye.a,{activeIndex:xr,userInfo:Jr,shixunIdentifier:Sn.identifier,identity:at.identity,user:at,allowDisableDiscuss:vn,taskData:wn})),u.a.createElement("div",{className:xr===4?"tab-panel-body":"hide"},u.a.createElement(se,{activeIndex:xr,taskId:qe})),Er.type!=="exercises"&&!(Sn!=null&&Sn.is_disable_discuss)&&!Ct.homework_common_comment_open&&u.a.createElement(ve,{user:at,userInfo:Jr,user_praise:Ft,praise_count:It,praisePlus:ln,onCreateDiscuss:po})),u.a.createElement(fe.a,null,u.a.createElement(T.a,{className:"task-drawer",width:420,title:null,placement:"left",closable:!1,visible:Zr,onClose:fo,getContainer:function(){return document.getElementById("task-left-panel")}},Er.subject_id&&u.a.createElement(Je,Object(s.a)({taskList:Object(I.a)(Ei),challenge:St,shixun:Sn},Er,{identity:at.identity,onSaveTaskStar:Ii})),!Er.subject_id&&u.a.createElement(ge,{taskList:Object(I.a)(Ei),challenge:St,shixun:Sn,identity:at.identity,onSaveTaskStar:Ii})),u.a.createElement(e.a,{centered:!0,title:"\u63D0\u793A",visible:co,onOk:Br,onCancel:oa,confirmLoading:An,className:"answer-tip"},kt?u.a.createElement("p",null,"\u5DF2\u7ECF\u8FC7\u804C\u4E1A\u8BA4\u8BC1\u7684\u6559\u5E08\u53EF\u4EE5\u514D\u91D1\u5E01\u67E5\u770B\u7B54\u6848\u54DF~"):u.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~"),Ma?u.a.createElement(ft,{selected_index:Sa,selected_unlocked_answer_id:fi,onSelect:xi,data:kr}):u.a.createElement("p",null,"\u5C06\u6263\u9664".concat(Pi,"\u70B9\u91D1\u5E01\uFF0C\u662F\u5426\u786E\u8BA4\u67E5\u770B\u7B54\u6848")),kt?u.a.createElement("a",{href:"/account/certification",class:"to-certification-link",target:"_blank"},"\u7ACB\u5373\u8BA4\u8BC1"):null),u.a.createElement(pt.a,null)))},Ut=b("+L6B"),Nt=b("2/Rp"),Wt=b("aHsQ"),Qt=b("sGsY"),pn=b("55Ip"),qt=b("6/vW"),en=b("8Enf"),qn=b("P2fV"),$t=b("NJEC"),cn=b("5Dmo"),mn=b("3S7+"),yn=b("fxth"),Vn=b.n(yn),$n=b("RCxd"),zt=b("S+dL"),xn=b.n(zt),wr=b("dViP"),nr=b("Bwpq"),Tn=b("H4Hw"),Yn=b("Scqh"),ce=b("P5Jw"),V=b("LvDl");function J(we){var qe=we.onShowNotice,it=we.className,At=it===void 0?"":it;return u.a.createElement("a",{title:"\u66F4\u65B0\u901A\u77E5",onClick:qe,className:At},u.a.createElement("img",{src:xn.a,alt:"notice"}))}var ee=function(we){var qe,it=we.loading,At=we.lastedUpdateTime,kt=we.moveY,vt=we.code_hidden,at=we.hide_code,Lt=we.gameStatus,Ct=we.isEditPath,_t=we.isNotice,St=we.git_url,Gt=we.taskData,Ft=we.onUpdateCode,It=we.onResetCode,Vt=we.onResetGitCode,Zt=we.onShowCodeSetting,on=we.onResetPassedCode,ln=we.onShowDir,On=we.onResizeCodeArea,Nn=we.onShowNotice,Sn=we.onRightFullHandler,wn=we.isResizeLarge,rn=Object(E.i)(),Xn=Object(E.h)(),mt=Object(h.useState)(!1),sn=Object(r.a)(mt,2),hn=sn[0],gn=sn[1];Object(h.useEffect)(function(){var vn=xe.a.subscribe("runCodeFinish",function(){gn(!1)});return function(){vn()}},[]);var An=function(){e.a.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:u.a.createElement($n.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:It})},zn=function(){e.a.confirm({title:"\u91CD\u7F6E\u4EE3\u7801\u4ED3\u5E93",icon:u.a.createElement($n.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:Vt})},kn=function(){var vn=Object(l.a)(f.a.mark(function Ln(){return f.a.wrap(function(Sr){for(;;)switch(Sr.prev=Sr.next){case 0:if(!hn){Sr.next=2;break}return Sr.abrupt("return");case 2:Ft(),Object(he.v)(rn.taskId),gn(!0),xe.a.publish("show-case-result",!0),setTimeout(function(){xe.a.publish("runCode",{type:"start"})},100);case 7:case"end":return Sr.stop()}},Ln)}));return function(){return vn.apply(this,arguments)}}(),bn=function(){var vn=Object(l.a)(f.a.mark(function Ln(){return f.a.wrap(function(Sr){for(;;)switch(Sr.prev=Sr.next){case 0:if(hn){Sr.next=2;break}return Sr.abrupt("return");case 2:Object(he.J)(rn.taskId),gn(!1),xe.a.publish("runCode",{type:"stop"});case 5:case"end":return Sr.stop()}},Ln)}));return function(){return vn.apply(this,arguments)}}();return u.a.createElement(h.Fragment,null,u.a.createElement("span",{className:"".concat(Vn.a["edit-status"]," ml15")},it?"\u4FDD\u5B58\u4E2D...":At===0?"\u5DF2\u4FDD\u5B58":"\u5DF2\u4FEE\u6539"),u.a.createElement("div",{className:Vn.a["action-bar"]},_t?u.a.createElement(mn.a,{visible:!0,title:u.a.createElement("span",{style:{color:"#000"}},"\u5173\u5361\u4EFB\u52A1\u7684\u4EE3\u7801\u6587\u4EF6\u6709\u66F4\u65B0\u5566\uFF5E"),color:"#fff"},u.a.createElement(J,{onShowNotice:Nn})):null,at!==2&&u.a.createElement(u.a.Fragment,null,vt?null:u.a.createElement("a",{title:"\u663E\u793A\u76EE\u5F55",onClick:ln},u.a.createElement("i",{className:"iconfont icon-wenjian "})),St?u.a.createElement(ce.CopyToClipboard,{text:St,onCopy:function(){return n.b.success("\u590D\u5236\u6210\u529F")}},u.a.createElement("a",{title:"\u590D\u5236\u7248\u672C\u5E93\u5730\u5740"},u.a.createElement("i",{className:"iconfont icon-fuzhi2"}))):null,Lt===2&&Ct?u.a.createElement($t.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:on},u.a.createElement("a",{title:"\u52A0\u8F7D\u4E0A\u6B21\u901A\u8FC7\u7684\u4EE3\u7801"},u.a.createElement("i",{className:"iconfont icon-fanhuishangcidaima font-20 "}))):null,Ct?u.a.createElement("a",{title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",onClick:An},u.a.createElement("i",{className:"iconfont icon-zhongzhi font-20 "})):null,Ct&&u.a.createElement("a",{title:"\u91CD\u7F6E\u4EE3\u7801\u4ED3\u5E93",onClick:zn},u.a.createElement("i",{className:"iconfont icon-zhongzhidaimacangku font12 "})),u.a.createElement("a",{onClick:Zt,title:"\u8BBE\u7F6E"},u.a.createElement("i",{className:"iconfont icon-shezhi"}))),!((Xn==null||((qe=Xn.query)===null||qe===void 0)?void 0:qe.isFullScreen)==="true")&&u.a.createElement("a",{onClick:Sn,title:wn?"\u9000\u51FA\u5168\u5C4F":"\u5168\u5C4F"},u.a.createElement("i",{className:wn?"iconfont icon-shousuo":"iconfont icon-zhankai"}))))},Se=b("14J3"),ue=b("BMrR"),nt=b("jCWc"),Dt=b("kPKH"),Yt=b("UlFV"),an=b("hjEz"),Xt=b("9VGf"),Rn=b("Mm8t"),Kn=b.n(Rn),ar=b("9kvl"),vr=function(we){var qe,it=we.isNotice,At=we.moveY,kt=we.isActive,vt=we.tabIndex,at=we.webssh,Lt=we.socketKeys,Ct=we.onCloseSocket,_t=we.onReCreateSocket,St=we.onShowNotice,Gt=we.sshConfigData,Ft=we.onResizeCodeArea,It=we.shixun,Vt=we.onRightFullHandler,Zt=we.isResizeLarge;console.log("sshConfigData:",Gt);var on=Object(E.h)();return u.a.createElement("div",{className:"action-bar"},it?u.a.createElement(J,{onShowNotice:St}):null,at===3?u.a.createElement(Jn,{sshConfigData:Gt,tabIndex:vt,isActive:kt,socketKeys:Lt,onReCreateSocket:_t,onCloseSocket:Ct,shixun:It}):Gt!=null&&Gt.remaining_time?u.a.createElement(Jn,{sshConfigData:Gt,tabIndex:vt,isActive:kt,socketKeys:Lt,onReCreateSocket:_t,onCloseSocket:Ct,shixun:It}):null,!((on==null||((qe=on.query)===null||qe===void 0)?void 0:qe.isFullScreen)==="true")&&u.a.createElement("a",{onClick:Vt,title:Zt?"\u9000\u51FA\u5168\u5C4F":"\u5168\u5C4F"},u.a.createElement("i",{className:Zt?"iconfont icon-shousuo":"iconfont icon-zhankai"})))},lr=300;function Jn(we){var qe=we.isActive,it=we.socketKeys,At=we.webssh,kt=we.onCloseSocket,vt=we.onReCreateSocket,at=we.sshConfigData,Lt=we.tabIndex,Ct=we.shixun,_t=(at==null?void 0:at.remaining_time)/1e3,St=Object(h.useState)(At===3?1800:_t),Gt=Object(r.a)(St,2),Ft=Gt[0],It=Gt[1],Vt=Object(h.useState)(!1),Zt=Object(r.a)(Vt,2),on=Zt[0],ln=Zt[1],On=Ct.identifier;Object(Xt.a)(function(){It(Ft-1)},qe&&Ft>0?1e3:null),Object(h.useEffect)(function(){var kn=xe.a.subscribe("on-operating-ssh",function(){(Ct==null?void 0:Ct.webssh)!=3&&It(_t)}),bn=xe.a.subscribe("update-windows-time",function(Ln){It(parseInt(Ln.remaining_time/1e3))}),vn=xe.a.subscribe("on-recreate-socket",function(){vt()});return function(){bn(),kn(),vn()}},[]);function Nn(){ar.d.replace("/shixuns/".concat(On,"/challenges"))}function Sn(){e.a.confirm({title:"\u547D\u4EE4\u884C\u91CD\u8FDE\u63D0\u9192",icon:u.a.createElement($n.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:sn,onCancel:Nn})}var wn=function(){e.a.confirm({title:"\u91CD\u7F6E\u547D\u4EE4\u884C",icon:u.a.createElement($n.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:hn})};Object(h.useEffect)(function(){Ft===0&&(Ct.webssh!=3&&Sn(),it.forEach(function(kn){xe.a.publish("close-socket",kn)})),Ft===lr&&Ct.webssh!=3&&ln(!0)},[Ft]);function rn(){ln(!1)}function Xn(){Ct.webssh!=3&&ln(!0)}function mt(){It(_t),xe.a.publish("ssh-add-connect-time"),ln(!1)}function sn(){It(_t),xe.a.publish("create-socket",Lt)}function hn(){return gn.apply(this,arguments)}function gn(){return gn=Object(l.a)(f.a.mark(function kn(){return f.a.wrap(function(vn){for(;;)switch(vn.prev=vn.next){case 0:return it.forEach(function(Ln){xe.a.publish("close-socket",Ln)}),vn.next=3,kt();case 3:It(_t),vt();case 5:case"end":return vn.stop()}},kn)})),gn.apply(this,arguments)}var An=function(){e.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(Ce.S)(at==null?void 0:at.mapping_service_url)}})},zn=function(){e.a.info({title:"SSH\u76F4\u8FDE",width:600,centered:!0,content:u.a.createElement(u.a.Fragment,null,u.a.createElement(ue.a,null,u.a.createElement(Dt.a,{flex:"50px"},"\u8D26\u53F7"),u.a.createElement(Dt.a,null,at==null?void 0:at.username)),u.a.createElement(ue.a,null,u.a.createElement(Dt.a,{flex:"50px"},"\u5730\u5740"),u.a.createElement(Dt.a,null,at==null?void 0:at.ssh_address)),u.a.createElement(ue.a,null,u.a.createElement(Dt.a,{flex:"50px"},"\u7AEF\u53E3"),u.a.createElement(Dt.a,null,at==null?void 0:at.port)),u.a.createElement(ue.a,null,u.a.createElement(Dt.a,{flex:"50px"},"\u5BC6\u7801"),u.a.createElement(Dt.a,null,at==null?void 0:at.password)))})};return u.a.createElement(h.Fragment,null,Ft>0&&Ft<=lr&&Ct.webssh!=3?u.a.createElement(Tr,{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:Ft,style:{display:"inline-block",margin:"0 10px 1px 0"},callback:Xn}):null,(at==null?void 0:at.mapping_service_url)&&u.a.createElement("a",{target:"_blank",onClick:function(bn){bn.preventDefault(),An()},href:at==null?void 0:at.mapping_service_url},u.a.createElement(an.a,{className:"font14 c-blue"}),u.a.createElement("span",{className:"c-blue"}," \u670D\u52A1\u9884\u89C8")),u.a.createElement("a",{onClick:wn},u.a.createElement("i",{className:"iconfont icon-zhongzhi2 font-16 "}),u.a.createElement("span",null," \u91CD\u7F6E\u547D\u4EE4\u884C")),u.a.createElement("a",{onClick:zn},u.a.createElement("span",null,u.a.createElement("i",{className:"iconfont icon-congshulianjie font-16 "}),"SSH\u76F4\u8FDE")),u.a.createElement(fe.a,null,u.a.createElement(e.a,{centered:!0,title:[u.a.createElement($n.a,{className:"modalIconYellow"}),"\u547D\u4EE4\u884C\u8FDE\u63A5\u65F6\u957F\u63D0\u9192"],wrapClassName:"customModalStyle",closable:!1,visible:on&&Ft>0,onOk:mt,onCancel:rn,okText:"\u7ACB\u5373\u5EF6\u957F",cancelText:"\u4E0D\u9700\u8981"},"\u547D\u4EE4\u884C\u5C06\u4E8E ",Math.round(Ft/60)," \u5206\u949F\u540E\u4E2D\u65AD\uFF0C\u9700\u8981\u5EF6\u957F\u4F7F\u7528\u65F6\u95F4\u5417\uFF1F")))}function Tr(we){var qe=we.title,it=we.time,At=we.className,kt=At===void 0?"":At,vt=we.callback,at=we.desc,Lt=at===void 0?"":at,Ct=we.style,_t=Ct===void 0?{}:Ct;function St(){vt&&vt()}return u.a.createElement("a",{onClick:St,title:qe,className:kt},u.a.createElement("img",{src:Kn.a,alt:"time",width:16,style:_t}),u.a.createElement("span",null,Lt?"".concat(Lt,"\uFF1A"):"",Object(qt.b)(it)))}var Ji=b("5NDa"),Vr=b("5rEg"),oi=b("lOMy"),pa=b("GIiI"),Bi=b("vS10"),ta=b("500L"),Da=b("m3rI"),_o=Object(h.forwardRef)(function(we,qe){var it=we.time;console.log("ScreenRecord:",qe);var At=Object(h.useRef)(),kt=Object(h.useState)(),vt=Object(r.a)(kt,2),at=vt[0],Lt=vt[1],Ct=Object(h.useRef)(),_t=2e3,St=[];Object(h.useImperativeHandle)(qe,function(){return{startScreenRecord:Vt,downloadFile:It}});function Gt(Zt,on){return Ft.apply(this,arguments)}function Ft(){return Ft=Object(l.a)(f.a.mark(function Zt(on,ln){var On,Nn;return f.a.wrap(function(wn){for(;;)switch(wn.prev=wn.next){case 0:return On=[],wn.next=3,new MediaRecorder(on);case 3:Nn=wn.sent,Nn.ondataavailable=function(rn){On.push(rn.data)},Nn.start(),Ct.current=Nn,window.recorderRefs=Nn,Nn.addEventListener("stop",function(rn){var Xn=URL.createObjectURL(On[0],{type:"video/mp4"});Object(Ce.x)("xxx.webm",Xn)});case 9:case"end":return wn.stop()}},Zt)})),Ft.apply(this,arguments)}function It(){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 Zt=At.current.srcObject.getTracks();Zt.forEach(function(on){on.stop()}),window.recorderRefs.addEventListener("dataavailable",function(on){var ln=URL.createObjectURL(on.data,{type:"video/mp4"});Object(Ce.x)("\u5C4F\u5E55\u5F55\u5236\u89C6\u9891.webm",ln)})}function Vt(){navigator.mediaDevices.getDisplayMedia({video:!0,audio:!0}).then(function(Zt){return At.current.srcObject=Zt,St.push(Zt),At.current.captureStream=At.current.captureStream||At.current.mozCaptureStream,new Promise(function(on){return At.current.onplaying=on})}).then(function(){return Gt(At.current.captureStream(),_t)}).then(function(Zt){}).catch(function(Zt){Zt.name==="NotFoundError"?n.b.warn("\u627E\u4E0D\u5230\u6444\u50CF\u5934\u6216\u9EA6\u514B\u98CE\u3002\u65E0\u6CD5\u5F55\u5236."):n.b.warn(Zt.name)})}return u.a.createElement("div",{style:{position:"absolute",top:"0",zIndex:-1}},u.a.createElement("video",{onPause:function(){},width:"60",height:"120",autoPlay:!0,muted:!0,ref:At}))}),lo=_o,wo={1:"\u7B80\u5355",2:"\u4E2D\u7B49",3:"\u56F0\u96BE"},Fa=function(we){var qe,it,At=we.className,kt=we.mirror_description,vt=we.git_url,at=we.difficulty,Lt=we.task_pass,Ct=we.test_set_permission,_t=we.onVncAction,St=we.shixun,Gt=we.window_vnc_url,Ft=we.linux_vnc,It=we.vnc_url,Vt=we.position,Zt=we.unity_3d_routes,on=we.taskData,ln=we.resData,On=Object(E.i)(),Nn=Object(h.useState)("8082"),Sn=Object(r.a)(Nn,2),wn=Sn[0],rn=Sn[1],Xn=Object(h.useState)(!1),mt=Object(r.a)(Xn,2),sn=mt[0],hn=mt[1],gn=Object(h.useRef)(),An=on==null||((qe=on.shixun_virtual_templates)===null||qe===void 0||((it=qe[0])===null||it===void 0))?void 0:it.template_id,zn=Gt?"C:/Windows/AppReadiness/userfiles":"/data/workspace/userfiles",kn=Gt?"C:/Windows/AppReadiness/downloadfiles":"/data/workspace/downloadfiles",bn=function(){e.a.confirm({title:"\u91CD\u542F\u4E91\u4E3B\u673A",icon:u.a.createElement($n.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 Er=Object(l.a)(f.a.mark(function Zr(){var xr;return f.a.wrap(function(Dn){for(;;)switch(Dn.prev=Dn.next){case 0:return Dn.next=2,Object(Bi.f)({identifier:On.taskId});case 2:return xr=Dn.sent,(xr==null?void 0:xr.status)===0&&n.b.info("\u91CD\u542F\u6210\u529F"),Dn.abrupt("return","");case 5:case"end":return Dn.stop()}},Zr)}));function Ei(){return Er.apply(this,arguments)}return Ei}()})},vn=function(){e.a.info({title:"SSH\u76F4\u8FDE",width:600,centered:!0,content:u.a.createElement(u.a.Fragment,null,u.a.createElement(ue.a,null,u.a.createElement(Dt.a,{flex:"50px"},"\u8D26\u53F7"),u.a.createElement(Dt.a,null,ln==null?void 0:ln.username)),u.a.createElement(ue.a,null,u.a.createElement(Dt.a,{flex:"50px"},"\u5730\u5740"),u.a.createElement(Dt.a,null,ln==null?void 0:ln.ssh_address)),u.a.createElement(ue.a,null,u.a.createElement(Dt.a,{flex:"50px"},"\u7AEF\u53E3"),u.a.createElement(Dt.a,null,ln==null?void 0:ln.port)),u.a.createElement(ue.a,null,u.a.createElement(Dt.a,{flex:"50px"},"\u5BC6\u7801"),u.a.createElement(Dt.a,null,ln==null?void 0:ln.password)))})},Ln=function(){e.a.info({title:"\u6587\u4EF6\u4E0A\u4F20",icon:null,okText:"\u5173\u95ED",width:600,centered:!0,content:u.a.createElement("div",{className:"pt10"},u.a.createElement(ta.b,{isDragger:!0,maxSize:20,additionalText:'\u9ED8\u8BA4\u5B58\u653E\u76EE\u5F55\u8DEF\u5F84\u4E3A"'.concat(zn,'"'),action:"".concat(Da.a.API_SERVER,"/api/tasks/").concat(On.taskId,"/upload_file?debug=admin"),onChange:function(Ei){Ei.some(function(Zr){var xr;return((xr=Zr.response)===null||xr===void 0?void 0:xr.status)===0})&&(e.a.destroyAll(),n.b.info("\u6587\u4EF6\u4E0A\u4F20\u6210\u529F")),console.log("fileList:",Ei)}}))})},Qn=function(){e.a.confirm({title:"\u4E0B\u8F7D\u4EE3\u7801",centered:!0,width:600,content:"\u4EE3\u7801\u4E0B\u8F7D\u529F\u80FD\uFF1A\u5C06\u201C".concat(kn,"\u201D\u76EE\u5F55\u8FDB\u884C\u6253\u5305\u5E76\u4E0B\u8F7D"),onOk:function(){var Er=Object(l.a)(f.a.mark(function Zr(){return f.a.wrap(function(Fr){for(;;)switch(Fr.prev=Fr.next){case 0:return Fr.next=2,Object(st.a)("/api/tasks/".concat(On.taskId,"/download_file?debug=admin"),{method:"post",body:{autoDownload:!0},headers:{responseType:"arraybuffer",Accept:"application/vnd.ms-excel;charset=utf-8"}});case 2:return Fr.abrupt("return",!0);case 3:case"end":return Fr.stop()}},Zr)}));function Ei(){return Er.apply(this,arguments)}return Ei}()})},Sr=function(){var Er,Ei;(Er=gn.current)===null||Er===void 0||((Ei=Er.startScreenRecord)===null||Ei===void 0)||Ei.call(Er)},Jr=function(){var _n=Object(l.a)(f.a.mark(function Er(){var Ei,Zr,xr;return f.a.wrap(function(Dn){for(;;)switch(Dn.prev=Dn.next){case 0:return hn(!0),Dn.next=3,Object(st.a)("/api/tasks/".concat(On.taskId,"/port_proxy"),{method:"post",body:{port:wn,position:Vt}});case 3:Zr=Dn.sent,Zr!=null&&(Ei=Zr.data)!==null&&Ei!==void 0&&Ei.url&&Object(Ce.S)(Zr==null||((xr=Zr.data)===null||xr===void 0)?void 0:xr.url),hn(!1);case 6:case"end":return Dn.stop()}},Er)}));return function(){return _n.apply(this,arguments)}}();return u.a.createElement("div",{className:"tpi-code-setting ".concat(At)},u.a.createElement("h3",null,"\u529F\u80FD"),u.a.createElement("section",null,u.a.createElement("a",{id:"full-screen",title:"\u5168\u5C4F",className:"file-item action",onClick:function(){_t("full-screen")}}," ",u.a.createElement("i",{className:"iconfont icon-quanping"}),"\u5F00\u542F / \u9000\u51FA\u5168\u5C4F"," "),u.a.createElement("a",{id:"reset-task",onClick:function(){return _t("reset-task")},className:"file-item action",title:"\u91CD\u7F6E\u5B9E\u8BAD"}," ",u.a.createElement("i",{className:"iconfont icon-zhongzhishixun"}),"\u91CD\u7F6E\u5B9E\u8BAD"," "),u.a.createElement("a",{id:"reset-code",onClick:function(){return _t("reset-code")},className:"file-item action",title:"\u91CD\u7F6E\u4EE3\u7801\u4ED3\u5E93"}," ",u.a.createElement("i",{className:"iconfont icon-zhongzhishixun"}),"\u91CD\u7F6E\u4EE3\u7801\u4ED3\u5E93"," "),!Zt&&u.a.createElement(u.a.Fragment,null," ",(Gt||Ft||It||(St==null?void 0:St.hide_code)===2||(St==null?void 0:St.webssh)===3)&&u.a.createElement(u.a.Fragment,null,u.a.createElement("a",{onClick:function(){return Ln()},className:"file-item action",title:"\u4E0A\u4F20\u6587\u4EF6"}," ",u.a.createElement("i",{className:"iconfont icon-shangchuanshipin1"}),"\u4E0A\u4F20\u6587\u4EF6"),u.a.createElement("a",{onClick:function(){return Qn()},className:"file-item action",title:"\u4E0B\u8F7D\u6587\u4EF6"}," ",u.a.createElement("i",{className:"iconfont icon-xiazai3"}),"\u4E0B\u8F7D\u6587\u4EF6"),u.a.createElement("a",{onClick:function(){return Sr()},className:"file-item action",title:"\u5C4F\u5E55\u5F55\u5236"}," ",u.a.createElement("i",{className:"iconfont icon-jiaruketang1"}),"\u5C4F\u5E55\u5F55\u5236"),u.a.createElement("a",{className:"file-item action w100",title:"\u670D\u52A1\u9884\u89C8"}," ",u.a.createElement("i",{className:"iconfont icon-suanfasheji"}),u.a.createElement(ue.a,{align:"middle",className:"w100"},u.a.createElement(Dt.a,{flex:"1",onClick:Jr},u.a.createElement(Nt.a,{type:"text",loading:sn},u.a.createElement("span",{style:{color:"#ddd",marginLeft:-11}},"\u670D\u52A1\u9884\u89C8"))),u.a.createElement(Dt.a,null,u.a.createElement("a",{href:"javascript:;",onClick:Jr,className:"c-blue"},"\u7AEF\u53E3\u53F7")," ",u.a.createElement(Vr.a,{onChange:function(Er){return rn(Er.target.value)},style:{width:50},value:wn}))))),Gt&&!An&&u.a.createElement("a",{id:"reset-task",onClick:bn,className:"file-item action",title:"\u91CD\u542F\u4E91\u4E3B\u673A"}," ",u.a.createElement(pa.a,{style:{marginRight:21,color:"#FFF"},className:"c-white font16"}),"\u91CD\u542F\u4E91\u4E3B\u673A"," "),!!An&&u.a.createElement("a",{onClick:vn,className:"file-item action",title:"SSH\u76F4\u8FDE"}," ",u.a.createElement("i",{style:{marginRight:21},className:"iconfont icon-congshulianjie c-white font16"}),"SSH\u76F4\u8FDE"," "),(St==null?void 0:St.hide_code)!==2&&u.a.createElement("a",{id:"reset-task",onClick:function(){return _t("reset-code")},className:"file-item action",title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801"}," ",u.a.createElement("i",{className:"iconfont icon-zhongzhi font20",style:{marginRight:19}}),"\u6062\u590D\u521D\u59CB\u4EE3\u7801"," "),vt?u.a.createElement(ce.CopyToClipboard,{text:vt,onCopy:function(){return n.b.success("\u590D\u5236\u6210\u529F")}},u.a.createElement("a",{id:"copy-git",title:"\u590D\u5236\u7248\u672C\u5E93\u5730\u5740",className:"file-item action"}," ",u.a.createElement("i",{className:"iconfont icon-fuzhibanbenkudizhi1"}),"\u590D\u5236\u7248\u672C\u5E93\u5730\u5740"," ")):null,!Gt&&!Ft&&u.a.createElement("a",{id:"copy-cliboard",className:"file-item action",onClick:function(){_t("show-clipboard-box")}}," ",u.a.createElement("i",{className:"iconfont icon-fuzhiniantie"}),"\u590D\u5236\u7C98\u8D34"," "))),u.a.createElement("h3",null,"\u5173\u5361\u914D\u7F6E\u4FE1\u606F"),u.a.createElement("section",null,u.a.createElement("a",{className:"file-item",title:Lt?"\u5141\u8BB8\u5B66\u5458\u8DF3\u5173\u6311\u6218":"\u4E0D\u5141\u8BB8\u5B66\u5458\u8DF3\u5173\u6311\u6218"},u.a.createElement("b",null,"\u8DF3\u5173"),u.a.createElement("span",null,Lt?"\u5141\u8BB8":"\u4E0D\u5141\u8BB8")),u.a.createElement("a",{className:"file-item",title:Ct?"\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"},u.a.createElement("b",null,"\u6D4B\u8BD5\u96C6\u89E3\u9501"),u.a.createElement("span",null,Ct?"\u5141\u8BB8":"\u4E0D\u5141\u8BB8"))),u.a.createElement("h3",null,"\u5B9E\u8BAD\u57FA\u672C\u4FE1\u606F"),u.a.createElement("section",null,u.a.createElement("div",{className:"file-item"},u.a.createElement("b",null,"\u5B9E\u8BAD\u96BE\u6613\u5EA6"),u.a.createElement("span",null,wo[at])),u.a.createElement("div",{className:"file-item",style:{alignItems:"flex-start"}},u.a.createElement("b",null,"\u5B9E\u9A8C\u73AF\u5883"),u.a.createElement("span",{className:"vnc-desc",title:kt==null?void 0:kt.join(" ")},kt==null?void 0:kt.join(" ")))),u.a.createElement(lo,{ref:gn}))},Gi=b("l9Ud"),Nr=b.n(Gi),qr;(function(we){we.Classrooms="classrooms",we.Shixuns="shixuns",we.Paths="paths",we.Projects="projects",we.Videos="videos",we.Topics="topics",we.Teach="teach-group"})(qr||(qr={}));var _i=function(qe){var it=qe.userDetail,At=qe.user,kt=qe.globalSetting,vt=qe.loading,at=qe.dispatch,Lt=qe.onClose,Ct=qe.shixun,_t=Object(i.a)(qe,["userDetail","user","globalSetting","loading","dispatch","onClose","shixun"]),St=Object(E.i)(),Gt=Object(h.useState)([]),Ft=Object(r.a)(Gt,2),It=Ft[0],Vt=Ft[1],Zt=Object(h.useState)({}),on=Object(r.a)(Zt,2),ln=on[0],On=on[1],Nn=Object(h.useState)(0),Sn=Object(r.a)(Nn,2),wn=Sn[0],rn=Sn[1],Xn=Object(h.useState)(Object(t.a)({page:1,limit:20,id:Ct.identifier},St)),mt=Object(r.a)(Xn,2),sn=mt[0],hn=mt[1],gn=Object(h.useCallback)(function(){return _t.visible},[_t.visible]);Object(h.useEffect)(function(){sn.page=1,An()},[_t.visible]);var An=function(){var zn=Object(l.a)(f.a.mark(function kn(){var bn;return f.a.wrap(function(Ln){for(;;)switch(Ln.prev=Ln.next){case 0:return Ln.next=2,at({type:"shixunsDetail/getSetData",payload:sn});case 2:bn=Ln.sent,bn&&(Vt(Object(I.a)(bn.data_sets)),rn(bn.data_sets_count),On(bn.folder_name));case 4:case"end":return Ln.stop()}},kn)}));return function(){return zn.apply(this,arguments)}}();return u.a.createElement(u.a.Fragment,null,!!It.length&&_t.children,u.a.createElement(T.a,{title:"\u6570\u636E\u96C6",placement:"right",className:Nr.a.wrap,width:300,closable:!1,onClose:Lt,visible:gn()},u.a.createElement("div",{className:"c-grey-999 font14 ml5 mb5"},"\u6570\u636E\u96C6\u8DEF\u5F84"),u.a.createElement("dl",{className:Nr.a.list},u.a.createElement(mn.a,{title:ln},u.a.createElement("dt",null,ln)),u.a.createElement("dd",null,u.a.createElement(ce.CopyToClipboard,{text:ln,onCopy:function(){return n.b.success("\u590D\u5236\u6210\u529F")}},u.a.createElement("span",{className:"".concat(Nr.a.copy," current")},"\u70B9\u51FB\u590D\u5236")))),u.a.createElement("div",{className:"c-grey-999 font14 ml5 mb5"},"\u6587\u4EF6\u8DEF\u5F84"),It==null?void 0:It.map(function(zn,kn){return u.a.createElement("dl",{className:Nr.a.list},u.a.createElement(mn.a,{title:zn.title},u.a.createElement("dt",null,u.a.createElement("span",{className:"icon-wenjian4 mr5"}),zn.title)),u.a.createElement("dd",null,u.a.createElement(ce.CopyToClipboard,{text:zn.file_path,onCopy:function(){return n.b.success("\u590D\u5236\u6210\u529F")}},u.a.createElement("span",{className:"".concat(Nr.a.copy," current")},"\u70B9\u51FB\u590D\u5236"))))}),u.a.createElement("div",{className:"tc"},u.a.createElement(M.a,{onChange:function(kn){sn.page=kn,An()},className:Nr.a.page,size:"small",total:wn,pageSize:sn.limit,hideOnSinglePage:!0}))))},Ur=Object(ar.a)(function(we){var qe=we.user,it=we.userDetail,At=we.loading,kt=we.shixunsDetail,vt=we.globalSetting;return{user:qe,userDetail:it,shixunsDetail:kt,globalSetting:vt,loading:At.models.index}})(_i),Ar=b("tUsH"),ti=b.n(Ar),yr=b("1Zrr"),si=b.n(yr),cr=b("Icgb"),Hi=b("bPs0"),Ni=Qt.a.Countdown;function Zi(){return u.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 yo=function(we){var qe,it=we.mirror_description,At=we.difficulty,kt=we.git_url,vt=we.vnc_url,at=we.window_vnc_url,Lt=we.linux_vnc,Ct=we.isNotice,_t=we.user,St=we.game,Gt=we.shixun,Ft=Gt===void 0?{}:Gt,It=we.taskData,Vt=It===void 0?{}:It,Zt=we.resetVncLoading,on=we.onUpdateCostTime,ln=we.lastedGetTaskInfoTime,On=we.onShowNotice,Nn=we.onResetGitCode,Sn=we.onResetVnc,wn=we.onBack,rn=we.history,Xn=we.onAddVncTime,mt=we.onUpdateCode,sn=we.unity_3d_routes,hn=we.st,gn=Ft.name,An=Ft.identifier,zn=Ft.task_pass,kn=Ft.test_set_permission,bn=St.cost_time,vn=St.status,Ln=_t.user_url,Qn=_t.image_url,Sr=_t.grade,Jr=Sr===void 0?0:Sr,_n=Object(h.useState)(!1),Er=Object(r.a)(_n,2),Ei=Er[0],Zr=Er[1],xr=Object(h.useState)({}),Fr=Object(r.a)(xr,2),Dn=Fr[0],kr=Fr[1],Pi=Object(h.useState)("#FFF"),Di=Object(r.a)(Pi,2),co=Di[0],Ma=Di[1],fi=Object(h.useState)(null),Sa=Object(r.a)(fi,2),aa=Sa[0],da=Sa[1],Lo=Object(h.useState)(),ho=Object(r.a)(Lo,2),$a=ho[0],Pa=ho[1],ao=Object(h.useState)(!1),So=Object(r.a)(ao,2),Ka=So[0],Ha=So[1],oa=Object(h.useState)({}),sa=Object(r.a)(oa,2),Br=sa[0],la=sa[1],xi=Object(E.h)().query,wi=Object(h.useRef)(),ji=Object(h.useRef)(),Ii=Object(h.useRef)((Ft==null?void 0:Ft.webssh)===3?1:void 0);Object(h.useEffect)(function(){var vi=xe.a.subscribe("vnc-res-data",function(In){la(In)});return function(){vi()}},[]),Object(h.useEffect)(function(){var vi=xe.a.subscribe("taskTabIndex",function(In){(Ft==null?void 0:Ft.webssh)===3&&(Ii.current=In)});return vi},[]),Object(h.useEffect)(function(){var vi;if(clearTimeout(wi.current),clearTimeout(ji.current),Dn!=null&&(vi=Dn.exercise)!==null&&vi!==void 0&&vi.left_time){var In,or;if((Dn==null||((In=Dn.exercise)===null||In===void 0)?void 0:In.left_time)>1800){var Cr;ji.current=setTimeout(function(){e.a.info({content:"\u5F53\u524D\u8DDD\u79BB\u8003\u8BD5\u7ED3\u675F\u8FD8\u670930\u5206\u949F",icon:u.a.createElement(cr.a,null),okText:"\u77E5\u9053\u4E86"})},((Dn==null||((Cr=Dn.exercise)===null||Cr===void 0)?void 0:Cr.left_time)-1800)*1e3)}if((Dn==null||((or=Dn.exercise)===null||or===void 0)?void 0:or.left_time)>900){var Kr;wi.current=setTimeout(function(){e.a.info({content:"\u5F53\u524D\u8DDD\u79BB\u8003\u8BD5\u7ED3\u675F\u8FD8\u670915\u5206\u949F",icon:u.a.createElement(cr.a,null),okText:"\u77E5\u9053\u4E86"})},((Dn==null||((Kr=Dn.exercise)===null||Kr===void 0)?void 0:Kr.left_time)-900)*1e3)}}},[Dn]),Object(h.useEffect)(function(){function vi(){return In.apply(this,arguments)}function In(){return In=Object(l.a)(f.a.mark(function or(){var Cr,Kr,Ir,ii,Fo,Wa,mo,es,ts,hs;return f.a.wrap(function(go){for(;;)switch(go.prev=go.next){case 0:if(!(xi.type==="exercises")){go.next=12;break}if(!(xi.coursesId==="coursesId")){go.next=7;break}return go.next=4,Object(Xe.Z)({categoryId:xi.exercisesId,login:xi.login});case 4:ii=go.sent,go.next=10;break;case 7:return go.next=9,Object(Xe.z)({categoryId:xi.exercisesId,login:xi.login});case 9:ii=go.sent;case 10:kr(Object(t.a)({},ii)),(Cr=ii)!==null&&Cr!==void 0&&Cr.left_banner_id&&(Kr=ii)!==null&&Kr!==void 0&&(Ir=Kr.exercise)!==null&&Ir!==void 0&&Ir.left_time&&(da(Date.now()+((Fo=ii)===null||Fo===void 0||((Wa=Fo.exercise)===null||Wa===void 0)?void 0:Wa.left_time)*1e3),setTimeout(function(){Ma("red")},(((mo=ii)===null||mo===void 0||((es=mo.exercise)===null||es===void 0)?void 0:es.left_time)-300>0?((ts=ii)===null||ts===void 0||((hs=ts.exercise)===null||hs===void 0)?void 0:hs.left_time)-300:0)*1e3));case 12:case"end":return go.stop()}},or)})),In.apply(this,arguments)}vi(),xe.a.subscribe("update-windows-time",function(or){Pa(parseInt(or.remaining_time/1e3))}),vt&&Pa(1800)},[]),Object(h.useEffect)(function(){var vi;return xi.type==="exercises"&&Dn!==null&&Dn!==void 0&&(vi=Dn.exercise)!==null&&vi!==void 0&&vi.screen_open&&(Hi.b.forEach(function(In,or){window.addEventListener(In,Oa,!1),window.addEventListener("blur",Oa,!1)}),window.focus()),function(){Hi.b.forEach(function(In,or){window.removeEventListener(In,Oa,!1)}),window.removeEventListener("blur",Oa,!1)}},[Dn]);var ua=function(){Ha(!Ka)},Oa=function(In){window.parent.postMessage("backExercise","*"),In!=="back"&&Object(S.b)()};function fo(){Zr(!Ei)}function eo(){Zr(!1)}function ha(){wn(),rn.replace("/shixuns/".concat(An,"/challenges"))}function Co(){if(Zt)return;Sn()}function ga(){e.a.confirm({title:"\u9000\u51FA\u5B9E\u8BAD",icon:u.a.createElement($n.a,null),content:"\u60A8\u786E\u5B9A\u8981\u9000\u51FA\u5B9E\u8BAD\u5417\uFF1F",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:ha})}function po(vi){if(eo(),vi==="reset-task"&&(Zt||e.a.confirm({title:"\u91CD\u7F6E\u5B9E\u8BAD",icon:u.a.createElement($n.a,null),content:u.a.createElement(Zi,null),centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Co})),vi==="reset-code"&&(Zt||e.a.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:u.a.createElement($n.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:Nn})),vi==="full-screen")if(Object(S.a)())Object(S.b)();else{var In,or;Object(S.d)((In=document)===null||In===void 0||((or=In.getElementById)===null||or===void 0)?void 0:or.call(In,"task-right-panel"))}vi==="show-clipboard-box"&&xe.a.publish("show-clipboard-box")}var fa={task_pass:zn,test_set_permission:kn,mirror_description:it,difficulty:At,resetVncLoading:Zt,git_url:kt,onVncAction:po,window_vnc_url:at,linux_vnc:Lt,vnc_url:vt,shixun:Ft,unity_3d_routes:sn,position:Ii.current,taskData:Vt,resData:Br},Ai=Object(h.useCallback)(function(){return $a?(console.log("VncTimer:",$a),u.a.createElement(Qa,{defaultTime:$a,onAddVncTime:Xn,onReset:Co,toShixun:ha,title:vt?"\u5B9E\u9A8C\u73AF\u5883\u5012\u8BA1\u65F6":""})):null},[$a]);return u.a.createElement("div",{className:"task-header-container"},xi.type!=="exercises"&&u.a.createElement(u.a.Fragment,null,u.a.createElement("a",{className:"task-user-info",href:Ln,target:"_blank"},Qn?u.a.createElement("img",{width:"35",height:"35",src:"".concat(Da.a.IMG_SERVER,"/images/").concat(Qn)}):null,u.a.createElement("span",null,_t.name)),u.a.createElement("div",{className:"grade-info"},u.a.createElement("img",{src:ti.a,alt:"gold",width:20}),Jr)),u.a.createElement("h2",{className:"shixun-info"},gn,(xi==null?void 0:xi.type)!=="exercises"&&Ft.hide_code!==2&&u.a.createElement(qt.a,{lastedGetTaskInfoTime:ln,status:vn,defaultTime:bn,onUpdateCostTime:on,title:vt?"\u5B9E\u9A8C\u603B\u7528\u65F6":""})),u.a.createElement(u.a.Fragment,null,(vt||at||Lt||(Vt==null?void 0:Vt.virtual_machine)||(Ft==null?void 0:Ft.webssh)===3||Ft.hide_code===2||sn)&&u.a.createElement("div",{className:"flex-container"},(xi==null?void 0:xi.type)!=="exercises"&&u.a.createElement(u.a.Fragment,null,at&&u.a.createElement(pn.a,{onClick:function(In){In.preventDefault(),xe.a.publish("send-ctrl-alt-delete")},className:"c-grey-c mr20"},"\u53D1\u9001CTRL+ALT+DELETE"),Ct?u.a.createElement(J,{className:"btn-notice",onShowNotice:On}):null,Ai()),u.a.createElement("a",{className:"btn-vnc",title:"\u5DE5\u5177\u680F",onClick:fo},u.a.createElement("img",{alt:"tool",src:si.a,width:16}),"\u5DE5\u5177\u680F")),!at&&u.a.createElement(Ur,{visible:Ka,onClose:ua,shixun:Ft},u.a.createElement("a",{className:"btn-vnc",title:"\u5DE5\u5177\u680F",onClick:ua},u.a.createElement("span",{className:"iconfont font14 mr5 icon-shujuji2 current"}),"\u6570\u636E\u96C6"))),xi.type!=="exercises"&&u.a.createElement(u.a.Fragment,null,vt||at?u.a.createElement("a",{className:"btn-task-out",onClick:ga,title:"\u9000\u51FA\u5B9E\u8BAD"},"\u9000\u51FA\u5B9E\u8BAD"):u.a.createElement("a",{className:"btn-out",onClick:ga,title:"\u9000\u51FA\u5B9E\u8BAD"},u.a.createElement("i",{className:"iconfont icon-kaiguan"}))),(Dn==null||((qe=Dn.exercise)===null||qe===void 0)?void 0:qe.left_time)&&u.a.createElement(u.a.Fragment,null,u.a.createElement("span",{style:{color:co},className:"iconfont icon-kaoshishichang mr5"}),u.a.createElement("span",{className:"c-white mr20"},u.a.createElement(Ni,{className:"flex-wrp ",valueStyle:{color:co,fontSize:12,fontWeight:"normal"},title:u.a.createElement("span",{style:{color:co,fontSize:12}},"\u5269\u4F59\u65F6\u95F4\uFF1A"),value:aa,onFinish:Object(l.a)(f.a.mark(function vi(){var In,or;return f.a.wrap(function(Kr){for(;;)switch(Kr.prev=Kr.next){case 0:return Kr.next=2,Object(Xe.ab)({categoryId:xi.exercisesId,commit_method:2});case 2:In=Kr.sent,(In==null?void 0:In.status)===0&&(hn===0&&mt(1),e.a.info({width:530,title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",content:u.a.createElement("div",{className:"tc font16"},"\u7B54\u9898\u7ED3\u675F\u4E86\uFF0C\u7CFB\u7EDF\u5DF2\u81EA\u52A8\u63D0\u4EA4\u8BD5\u5377",u.a.createElement("br",null),"\u4E0D\u80FD\u518D\u4FEE\u6539\u7B54\u9898"),onOk:function(){var Ir=Object(l.a)(f.a.mark(function Fo(){return f.a.wrap(function(mo){for(;;)switch(mo.prev=mo.next){case 0:window.parent.location.href="/classrooms/".concat(xi.coursesId,"/exercise/").concat(xi.exercisesId,"/detail");case 1:case"end":return mo.stop()}},Fo)}));function ii(){return Ir.apply(this,arguments)}return ii}()})),(In==null?void 0:In.status)===-3&&(or=parseInt(In==null?void 0:In.message),da(Date.now()+or*1e3));case 5:case"end":return Kr.stop()}},vi)}))}))),(xi==null?void 0:xi.type)==="exercises"&&u.a.createElement(Nt.a,{type:"primary",onClick:function(){hn===0&&mt(1),e.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:u.a.createElement("div",{className:"tc"},"\u8BF7\u786E\u8BA4\u4F60\u7684\u7B54\u9898\u5185\u5BB9\u5DF2\u7ECF\u63D0\u4EA4\uFF1F"),onOk:function(){Oa("back")}})}},u.a.createElement("span",{className:"iconfont icon-yiguanbi mr5 font14"})," \u8FD4\u56DE\u8BD5\u5377"),u.a.createElement(fe.a,null,u.a.createElement(T.a,{width:280,className:"setting-drawer",title:null,placement:"right",closable:!1,visible:Ei,onClose:eo},u.a.createElement(Fa,fa))))},Vi=300;function Qa(we){var qe=we.onAddVncTime,it=we.onReset,At=we.toShixun,kt=we.title,vt=kt===void 0?"":kt,at=we.defaultTime,Lt=Object(h.useState)(at),Ct=Object(r.a)(Lt,2),_t=Ct[0],St=Ct[1],Gt=Object(h.useState)(!1),Ft=Object(r.a)(Gt,2),It=Ft[0],Vt=Ft[1];Object(Xt.a)(function(){St(_t-1)},_t>0?1e3:null),Object(h.useEffect)(function(){(_t===Vi||_t===0)&&Vt(!0)},[_t]),Object(h.useEffect)(function(){at<Vi&&Vt(!0),St(at)},[at]);function Zt(){_t!==0?Vt(!1):At()}function on(){return ln.apply(this,arguments)}function ln(){return ln=Object(l.a)(f.a.mark(function Nn(){var Sn;return f.a.wrap(function(rn){for(;;)switch(rn.prev=rn.next){case 0:if(Vt(!1),!(_t>0)){rn.next=8;break}return rn.next=4,qe();case 4:Sn=rn.sent,St((Sn==null?void 0:Sn.remaining_time)/1e3),rn.next=10;break;case 8:St(at),it();case 10:case"end":return rn.stop()}},Nn)})),ln.apply(this,arguments)}function On(){_t<Vi&&Vt(!0)}return u.a.createElement(h.Fragment,null,u.a.createElement(Tr,{callback:On,title:"\u5B9E\u9A8C\u73AF\u5883\u5012\u8BA1\u65F6",className:"btn-vnc ".concat(_t<Vi?"color-red":""," "),time:_t,desc:vt}),u.a.createElement(fe.a,null,u.a.createElement(e.a,{title:[u.a.createElement($n.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,width:536,wrapClassName:"customModalStyle",visible:It,onOk:on,onCancel:Zt,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 ja=b("zJix"),ni=b.n(ja),Wo=b("KJ0q"),Ja=b("7Kak"),bo=b("9yH6"),Ao={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"},Za=function(we){var qe=we.category,it=we.answer,At=it===void 0?"":it,kt=we.index,vt=we.option_name,at=we.callback,Lt=Ao[kt];function Ct(){if(qe===1)at(Lt);else{var _t=(At==null?void 0:At.split(""))||[],St=_t.indexOf(Lt);St>=0?_t.splice(St,1):_t.push(Lt),at(_t.join(""))}}return u.a.createElement("a",{className:"flex-container",onClick:Ct},u.a.createElement("span",{style:{position:"relative",top:4},className:"".concat(qe===1?"radio":"checkbox"," ").concat(At&&At.indexOf(Lt)>=0?"active":"")}),u.a.createElement("div",{className:"flex-wrp"},u.a.createElement("span",{style:{lineHeight:1.7,fontSize:16,whiteSpace:"nowrap"}},Lt,"\u3001"),u.a.createElement(ae.a,{className:"subject-body",value:vt})))},Xo=function(we){var qe=we.callback,it=we.multi_count,At=we.answer,kt=Object(h.useState)([]),vt=Object(r.a)(kt,2),at=vt[0],Lt=vt[1];return Object(h.useEffect)(function(){if(it){if(At!=null&&At.length){Lt(At);return}var Ct=Array.from({length:it}).fill("");Lt(Ct)}},[it,At]),console.log(at,At,"multi_count"),u.a.createElement("div",{className:"option"},at==null?void 0:at.map(function(Ct,_t){return u.a.createElement(ue.a,{align:"middle",className:"mb10 text"},u.a.createElement("span",{className:"mb5"},"\u586B\u7A7A",_t+1,"\u7B54\u6848\uFF1A"),u.a.createElement(Vr.a.TextArea,{key:_t,value:Ct,onChange:function(Gt){at[_t]=Gt.target.value,qe(at)}}))}))},er=function(we){var qe=we.id,it=we.answer,At=we.challenge_question,kt=we.category,vt=we.subject,at=we.onSetAnswers,Lt=we.question_name,Ct=we.multi_count;function _t(St){at(qe,St)}return u.a.createElement("li",null,u.a.createElement(ue.a,{className:"subject c-grey-999",align:"stretch"},u.a.createElement(Dt.a,{flex:"40px"},u.a.createElement("p",{className:"mt3"},qe+1,"\u3001")),u.a.createElement(Dt.a,{flex:"1"},u.a.createElement(ae.a,{value:"".concat(vt),className:"subject-body"}))),Lt==="\u5355\u9009\u9898/\u591A\u9009\u9898"&&u.a.createElement("div",{className:"option"},At==null?void 0:At.map(function(St,Gt){var Ft=St.option_name;return u.a.createElement(Za,{index:Gt,key:Ft,option_name:Ft,answer:it,category:kt,callback:_t})})),Lt==="\u5224\u65AD\u9898"&&u.a.createElement("div",{className:"option"},u.a.createElement(bo.a.Group,{className:"mb10",value:it||void 0,onChange:function(Gt){return _t(Gt.target.value)}},u.a.createElement(bo.a,{value:"true",className:"mr40"},"\u6B63\u786E"),u.a.createElement(bo.a,{value:"false"},"\u9519\u8BEF"))),Lt==="\u586B\u7A7A\u9898"&&u.a.createElement(Xo,{multi_count:Ct,callback:_t,answer:it}))},_r=function(we){var qe=we.chooses,it=we.answers,At=we.onSetAnswers;return u.a.createElement("ul",{className:"choose-container"},qe.map(function(kt,vt){var at=kt.subject,Lt=kt.challenge_question,Ct=kt.category,_t=kt.question_name,St=kt.multi_count;return u.a.createElement(er,{key:vt,id:vt,subject:at,challenge_question:Lt,category:Ct,answer:it[vt],onSetAnswers:At,question_name:_t,multi_count:St})}))},tr=b("yqJW"),Mr=b("cf+g"),Hr=b.n(Mr),mi=b("UbZX"),fr=b.n(mi),Wi=b("LYID"),Ea=b.n(Wi),jr=function(qe){var it=qe.id,At=qe.isActive,kt=qe.title,vt=qe.onActive,at=qe.had_submmit,Lt=qe.result,Ct=qe.actual_output,_t=qe.standard_answer,St=qe.question_name;function Gt(){vt(it)}var Ft="test-case-item";return At&&(Ft+=" active"),at&&(Ft+=" has-result"),u.a.createElement("li",{className:Ft},u.a.createElement("a",{className:"case-header",onClick:Gt},u.a.createElement("h2",null,u.a.createElement("div",{className:At?"arrow-down":"arrow-right"}),u.a.createElement("span",{className:"test-title"},kt)),at>0?u.a.createElement("img",{width:16,src:Lt?fr.a:Ea.a}):u.a.createElement("i",{className:"iconfont icon-suo1"})),u.a.createElement("div",{className:"item-desc ".concat(At?"show":"hide"," choose-game-item")},at?Lt?St==="\u586B\u7A7A\u9898"?u.a.createElement(h.Fragment,null,u.a.createElement("p",null,u.a.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A"),u.a.createElement("b",null,_t==null?void 0:_t.map(function(It,Vt){var Zt;return u.a.createElement("p",null,"\u586B\u7A7A",Vt+1,"\uFF1A",It==null||((Zt=It.text)===null||Zt===void 0)?void 0:Zt.join("\u3001"))}))),u.a.createElement("p",null,u.a.createElement("div",null,"\u4F60\u7684\u7B54\u6848\uFF1A"),u.a.createElement("b",{className:"c-red"},Ct==null?void 0:Ct.map(function(It,Vt){return u.a.createElement("p",null,"\u586B\u7A7A",Vt+1,"\uFF1A",It)})))):u.a.createElement(h.Fragment,null,u.a.createElement("p",null,"\u6B63\u786E\u9009\u9879\uFF1A",u.a.createElement("b",null,_t)),u.a.createElement("p",null,"\u4F60\u7684\u9009\u9879\uFF1A",u.a.createElement("b",{className:"c-red"},Ct))):u.a.createElement("p",null,"\u9519\u8BEF\uFF0C\u4E0D\u652F\u6301\u67E5\u770B"):u.a.createElement("p",null,"\u5C1A\u672A\u63D0\u4EA4\uFF0C\u6682\u4E0D\u652F\u6301\u67E5\u770B")))},ro=function(we){var qe=we.onResizeSetContainer,it=we.moveY,At=we.had_submmit,kt=we.test_sets,vt=kt===void 0?[]:kt,at=we.challenge_chooses_count,Lt=we.choose_correct_num,Ct=Object(h.useState)(-1),_t=Object(r.a)(Ct,2),St=_t[0],Gt=_t[1];function Ft(Zt){Gt(Zt===St?-1:Zt)}var It=Lt===at;function Vt(){qe(it)}return u.a.createElement(h.Fragment,null,u.a.createElement("div",{className:"test-header"},u.a.createElement("span",{className:"active"},"\u6D4B\u8BD5\u7ED3\u679C"),u.a.createElement("a",{onClick:Vt},u.a.createElement("i",{className:"iconfont ".concat(it===.01?"icon-shousuo":"icon-zhankai"," icon-zhankai")}))),At?u.a.createElement("p",{className:"test-result ".concat(It?"success":"failer")},u.a.createElement("span",{className:"count"},u.a.createElement("img",{width:16,src:It?fr.a:Hr.a}),Lt," / ",at," \u5171\u6709",at,"\u9898\uFF0C"),u.a.createElement("span",null,It?"\u5168\u90E8\u901A\u8FC7":"\u5176\u4E2D".concat(at-Lt,"\u9898\u76EE\u7ED3\u679C\u4E0D\u5339\u914D\u3002\u8BE6\u60C5\u5982\u4E0B\uFF1A"))):null,u.a.createElement("ul",{className:"test-case-list"},vt.map(function(Zt,on){return u.a.createElement(jr,Object(s.a)({key:"item"+on,had_submmit:At,title:"\u9898\u76EE".concat(on+1)},Zt,{isActive:St===on,id:on,onActive:Ft}))})))},ui=b("9odi"),Oi=b.n(ui),xa=b("VjRW"),Ba=b.n(xa),zo=function(we){var qe,it=we.st,At=we.prev_game,kt=we.next_game,vt=we.time_limit,at=we.record_consume_time,Lt=we.loading,Ct=we.vnc_url,_t=we.linux_vnc,St=we.windows_vnc,Gt=we.shixun,Ft=we.game,It=we.onRun,Vt=we.dispatch,Zt=we.onShowTestCaseList,on=we.chooses,ln=we.unity_3d_routes,On=we.user,Nn=we.is_last_game,Sn=we.onUpdateCode,wn=we.test_sets,rn=we.challenge,Xn=we.isU3d,mt=we.game_report_id,sn=Object(E.i)(),hn=!Nn&&!Lt&&(Gt.status>0||(On==null?void 0:On.identity)<5),gn=it===1&&Ft.status===2,An=["\u81EA\u6D4B\u8FD0\u884C","\u6B63\u5728\u542F\u52A8","\u505C\u6B62\u8FD0\u884C","\u6B63\u5728\u505C\u6B62"],zn=Object(h.useState)(0),kn=Object(r.a)(zn,2),bn=kn[0],vn=kn[1],Ln=Object(h.useState)(0),Qn=Object(r.a)(Ln,2),Sr=Qn[0],Jr=Qn[1],_n=Object(h.useState)(!1),Er=Object(r.a)(_n,2),Ei=Er[0],Zr=Er[1],xr=Object(h.useState)(!1),Fr=Object(r.a)(xr,2),Dn=Fr[0],kr=Fr[1],Pi=Object(h.useState)(wn==null||((qe=wn[0])===null||qe===void 0)?void 0:qe.input),Di=Object(r.a)(Pi,2),co=Di[0],Ma=Di[1],fi=Object(h.useState)(!1),Sa=Object(r.a)(fi,2),aa=Sa[0],da=Sa[1],Lo=Object(h.useState)(An[0]),ho=Object(r.a)(Lo,2),$a=ho[0],Pa=ho[1],ao=Object(h.useRef)(!1),So=Object(h.useState)(0),Ka=Object(r.a)(So,2),Ha=Ka[0],oa=Ka[1],sa=Object(E.h)();Object(h.useEffect)(function(){bn>0&&setTimeout(function(){vn(bn-1)},1e3)},[bn]),Object(h.useEffect)(function(){Ha>0&&setTimeout(function(){oa(Ha-1)},1e3)},[Ha]),Object(h.useEffect)(function(){Sr>0&&setTimeout(function(){Jr(Sr-1)},1e3)},[Sr]),Object(h.useEffect)(function(){var wi=xe.a.subscribe("showRunCode",function(Oa){kr(Oa)}),ji=xe.a.subscribe("caseInputValue",function(Oa){Ma(Oa)}),Ii=xe.a.subscribe("runCodeFinish",function(){ao.current=!1,da(!1),Pa(An[0]),Ha>0||oa(5)}),ua=xe.a.subscribe("eval-code-finish",function(){ln&&Zr(!0),it===1||vn(10)});return function(){ua(),wi(),ji(),Ii()}},[]);var Br=function(){ao.current=!1,Pa(An[3]),xe.a.publish("runCode",{type:"stop"}),Object(he.J)(sn.taskId),setTimeout(function(){Ha>0||oa(5),Pa(An[0]),da(!1),oa(5)},2500)},la=function(){var wi=Object(l.a)(f.a.mark(function ji(){return f.a.wrap(function(ua){for(;;)switch(ua.prev=ua.next){case 0:return ao.current=!0,ua.next=3,Sn();case 3:Pa(An[1]),xe.a.publish("show-case-result",!0),setTimeout(Object(l.a)(f.a.mark(function Oa(){var fo,eo,ha,Co,ga;return f.a.wrap(function(fa){for(;;)switch(fa.prev=fa.next){case 0:return fa.next=2,Object(he.v)(sn.taskId,{test_case_content:co});case 2:if(ha=fa.sent,!(ha!=null&&(fo=ha.data)!==null&&fo!==void 0&&(eo=fo.data_list)!==null&&eo!==void 0&&eo.length)){fa.next=6;break}return xe.a.publish("pod-restrict-data",{identifier:ha==null||((Co=ha.data)===null||Co===void 0)?void 0:Co.identifier,data_list:ha==null||((ga=ha.data)===null||ga===void 0)?void 0:ga.data_list}),fa.abrupt("return");case 6:xe.a.publish("showRunCodeTab",!0),xe.a.publish("runCode",{type:"start"});case 8:case"end":return fa.stop()}},Oa)})),100),setTimeout(function(){ao.current&&(Pa(An[2]),da(!1))},1e3);case 7:case"end":return ua.stop()}},ji)}));return function(){return wi.apply(this,arguments)}}(),xi=function(){var wi=Object(l.a)(f.a.mark(function ji(){return f.a.wrap(function(ua){for(;;)switch(ua.prev=ua.next){case 0:da(!0),$a===An[2]?Br():la();case 2:case"end":return ua.stop()}},ji)}));return function(){return wi.apply(this,arguments)}}();return u.a.createElement("div",{className:Oi.a["action-container"]},u.a.createElement("div",{className:"flex-container ".concat(Oi.a["eval-desc"])},vt&&rn!==null&&rn!==void 0&&rn.with_code_file?u.a.createElement("span",null,"\u672C\u5173\u6700\u5927\u6267\u884C\u65F6\u95F4\uFF1A".concat(vt,"\u79D2")):null,at&&rn!==null&&rn!==void 0&&rn.with_code_file?u.a.createElement("span",null,"\u672C\u6B21\u8BC4\u6D4B\u8017\u65F6(\u7F16\u8BD1\u3001\u8FD0\u884C\u603B\u65F6\u95F4)\uFF1A",at," \u79D2"):null,mt?u.a.createElement("a",{target:"_blank",className:Oi.a.link,href:"/report/".concat(sn.taskId,"/").concat(mt)},"\u4EE3\u7801\u6027\u80FD\u68C0\u6D4B"):null,(Ct||St||_t||Xn)&&(rn==null?void 0:rn.with_code_file)&&u.a.createElement("a",{title:"\u663E\u793A/\u9690\u85CF\u6D4B\u8BD5\u7ED3\u679C",onClick:function(){xe.a.publish("show-case-result")}},"\u663E\u793A/\u9690\u85CF\u6D4B\u8BD5\u7ED3\u679C")),u.a.createElement("div",{className:"flex-container ".concat(Oi.a["eval-btn-group"])},At&&!Lt?u.a.createElement("a",{href:"/tasks/".concat(At).concat(sa.search),onClick:function(ji){ji.preventDefault(),setTimeout(function(){return window.location.href="/tasks/".concat(At).concat(sa.search)},300)},className:Oi.a["ghost-link"]},"\u4E0A\u4E00\u5173"):null,hn?u.a.createElement("a",{href:"/tasks/".concat(kt).concat(sa.search),onClick:function(ji){if(ji.preventDefault(),Gt.task_pass||Ft.status===2||(On==null?void 0:On.identity)<5){setTimeout(function(){return window.location.href="/tasks/".concat(kt).concat(sa.search)},300);return}e.a.warning({centered:!0,width:530,title:"\u63D0\u793A",okText:"\u6211\u77E5\u9053\u4E86",content:u.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:Oi.a["ghost-link"]},"\u4E0B\u4E00\u5173"):null,Ei&&(rn==null?void 0:rn.show_type)===1&&u.a.createElement("button",{onClick:function(){Vt({type:"SHOW_PICTURE_VIEW"})},style:{minWidth:"72px",marginRight:10},className:"btn-run",title:"\u67E5\u770B\u6548\u679C"},"\u67E5\u770B\u6548\u679C"),!!Dn&&Gt.hide_code!==2&&!Xn&&u.a.createElement(Nt.a,{onClick:Object(V.throttle)(xi,2e3),loading:aa,danger:!0,disabled:Ha>0,className:"".concat(Oi.a["btn-run-self"]," mr10")},Ha>0?"".concat(Ha,"S"):$a),(rn==null?void 0:rn.with_code_file)&&u.a.createElement("button",{onClick:Object(l.a)(f.a.mark(function wi(){return f.a.wrap(function(Ii){for(;;)switch(Ii.prev=Ii.next){case 0:if(!(it===1)){Ii.next=4;break}if(!((on==null?void 0:on.length)<=0)){Ii.next=4;break}return e.a.confirm({centered:!0,title:"\u63D0\u793A",content:u.a.createElement("div",{className:"tc"},u.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"}),Ii.abrupt("return");case 4:return Zr(!1),Ii.next=7,It();case 7:case"end":return Ii.stop()}},wi)})),style:{minWidth:"72px"},disabled:Lt||bn>0,className:Oi.a["btn-run"],title:"\u8FD0\u884C\u8BC4\u6D4B"},bn>0?"".concat(bn,"S"):u.a.createElement(h.Fragment,null," ",u.a.createElement("img",{src:Ba.a,alt:"run",width:18})," ",u.a.createElement("b",null,"\u8BC4\u6D4B")," "))))};function ci(we,qe){switch(qe.type){case be.f:return Object(t.a)(Object(t.a)({},we),{},{loading:!0});case be.e:return Object(t.a)(Object(t.a)({},we),{},{loading:!1});case be.B:return Object(t.a)(Object(t.a)({},we),qe.payload);default:throw new Error}}var Mn=function(we){var qe=we.taskData,it=we.moveY,At=we.onResizeYStart,kt=we.onResizeSetContainer,vt=we.onEval,at=we.lastedGetTaskInfoTime,Lt=we.onUpdateCode,Ct=we._dispatch,_t=Object(E.h)(),St=qe.chooses,Gt=qe.choose_test_cases,Ft=qe.game,It=Gt.test_sets,Vt=Gt.challenge_chooses_count,Zt=Gt.choose_correct_num,on=Gt.had_submmit,ln=Object(h.useCallback)(function(){var kn=[];return kn.length=Vt,on&&(kn=It.map(function(bn){return bn.question_name==="\u5224\u65AD\u9898"?bn.actual_output==="\u6B63\u786E"?"true":bn.actual_output==="\u9519\u8BEF"?"false":void 0:bn.actual_output})),kn},[at]),On=Object(h.useReducer)(ci,{loading:!1,answers:ln()}),Nn=Object(r.a)(On,2),Sn=Nn[0],wn=Nn[1];Object(h.useEffect)(function(){wn({type:be.B,payload:{answers:ln()}})},[at]);var rn=Sn.answers,Xn=Sn.loading;function mt(kn,bn){rn[kn]=bn,wn({type:be.B,payload:{answers:rn}})}function sn(){for(var kn=!0,bn=0;bn<Vt;bn++){var vn,Ln;if(!rn[bn]||Array.isArray(rn[bn])&&!((vn=rn[bn])!==null&&vn!==void 0&&(Ln=vn.filter(function(Qn){return!!Qn}))!==null&&Ln!==void 0&&Ln.length)){n.b.info("\u8BF7\u5148\u7ED9\u7B2C".concat(bn+1,"\u9898\u9009\u62E9\u7B54\u6848\uFF01")),kn=!1;break}}return kn}function hn(){return gn.apply(this,arguments)}function gn(){return gn=Object(l.a)(f.a.mark(function kn(){var bn,vn;return f.a.wrap(function(Qn){for(;;)switch(Qn.prev=Qn.next){case 0:if(!sn()){Qn.next=7;break}return wn({type:be.f}),Qn.next=4,Object(he.i)(Ft.identifier,{answer:rn,challenge_id:qe==null||((bn=qe.challenge)===null||bn===void 0)?void 0:bn.id,subject_id:_t.query.subject_id||"",question_id:_t.query.questionId,exercise_id:_t.query.exercisesId});case 4:vn=Qn.sent,vt(vn),wn({type:be.e});case 7:case"end":return Qn.stop()}},kn)})),gn.apply(this,arguments)}var An=it?"".concat(it-54,"px"):"70%",zn="calc(100% - 3px - 51px - ".concat(An,")");return u.a.createElement(h.Fragment,null,u.a.createElement("div",{className:ni.a["code-area-container"],style:{height:An}},u.a.createElement(_r,{chooses:St,answers:rn,onSetAnswers:mt})),u.a.createElement("div",{className:ni.a["resize-y-bar"],onMouseDown:At,draggable:!1},u.a.createElement("i",{className:"iconfont icon-guangbiao",draggable:!1})),u.a.createElement("div",{className:ni.a["test-set-container"],style:{height:zn}},u.a.createElement(ro,{had_submmit:on,moveY:it,onResizeSetContainer:kt,test_sets:It,challenge_chooses_count:Vt,choose_correct_num:Zt})),u.a.createElement("div",{className:ni.a["action-container"]},u.a.createElement(zo,Object(s.a)({onUpdateCode:Lt},qe,{loading:Xn,onRun:hn,dispatch:Ct}))))},nn=b("4K8j"),Un=b("popq"),En=b("362i"),ur=b.n(En),Dr=b("VPUa"),di=b.n(Dr),yi=b("0i5U"),Yi=b.n(yi),Ui=function(we){var qe,it=we.star,At=we.gold,kt=we.experience,vt=we.next_game,at=we.next_shixun,Lt=we.subject_done,Ct=we.onCloseResult,_t=we.isPictureView,St=we.webDisplayUrl,Gt=we.onShowPictureView,Ft=we.history,It=we.onStarChange;function Vt(){Ct(),console.log("`/tasks/${next_game}${location.search}`","/tasks/".concat(vt).concat(Zt.search)),setTimeout(function(){window.location.href="/tasks/".concat(vt).concat(Zt.search)},300)}var Zt=Object(E.h)();return u.a.createElement("div",{className:"evaluate-result-container"},u.a.createElement("div",{className:"evaluate-result-body"},u.a.createElement("a",{className:"close-line",onClick:Ct},u.a.createElement("i",{className:"iconfont icon-roundclose",style:{fontSize:"32px"}})),!Zt.query.subject_id&&u.a.createElement("img",{width:652,src:vt||!Lt?ur.a:di.a,alt:"\u901A\u5173"}),Zt.query.subject_id&&u.a.createElement("img",{width:652,src:Lt?di.a:ur.a,alt:"\u901A\u5173"}),u.a.createElement("div",{className:"gold-and-experience"},u.a.createElement("p",{className:"flex-container"},u.a.createElement("span",{className:"gold-circle"})," +",At),u.a.createElement("p",{className:"flex-container"},u.a.createElement("img",{src:Yi.a})," +",kt)),u.a.createElement("footer",null,it?null:u.a.createElement(h.Fragment,null,u.a.createElement("p",{className:"star-tip"},"\u60A8\u7684\u8BC4\u4EF7\u51B3\u5B9A\u8001\u5E08\u7684\u6C5F\u6E56\u5730\u4F4D~"),u.a.createElement(oe.a,{defaultValue:0,allowClear:!1,onChange:It})),u.a.createElement("div",{className:"tc"},vt?u.a.createElement("a",{onClick:Vt},"\u4E0B\u4E00\u5173"):u.a.createElement("a",{onClick:Ct},"\u5B8C\u6210"),!!at&&u.a.createElement("a",{onClick:function(){Me(at,null,!1,Zt.query.subject_id)}},"\u8FDB\u5165\u4E0B\u4E00\u4E2A\u5B9E\u8BAD"),_t?u.a.createElement("a",{onClick:function(){Gt(),Ct()}},"\u67E5\u770B\u6548\u679C"):null,St?u.a.createElement("a",{target:"_blank",href:St},"\u67E5\u770B\u6548\u679C"):null),(Zt==null||((qe=Zt.query)===null||qe===void 0)?void 0:qe.subject_id)&&u.a.createElement("div",{className:"tc mt15"},at&&!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",Lt&&"\u606D\u559C\u60A8\uFF0C\u672C\u5B9E\u8DF5\u8BFE\u7A0B\u7684\u6700\u540E\u4E00\u4E2A\u5B9E\u8BAD\u5DF2\u901A\u5173"))))},Xi=b("bCnd"),Oo=b("ZW9T"),Ta=b("p5ED"),Fs=b("RTVd"),ol=b.n(Fs),Aa=b("Tl6Z"),Go=b.n(Aa),sl=function(we){var qe=we.content,it=we.language,At=we.theme,kt=we.onCodeChange,vt=we.onSave,at=we.monacoOptions,Lt=we.isEditPath,Ct=we.hide_code,_t=we.code_edit_permission,St=we.onUpdateCode,Gt=we.forbidCopy,Ft=we.filename,It=we.file_type,Vt=we.taskData,Zt=Object(E.i)(),on=Object(h.useRef)(),ln=Object(h.useState)(!0),On=Object(r.a)(ln,2),Nn=On[0],Sn=On[1],wn=Object(h.useState)({}),rn=Object(r.a)(wn,2),Xn=rn[0],mt=rn[1];console.log("content:",{value:qe,language:it,theme:At,onChange:kt,onSave:vt,forbidCopy:Gt,options:at,filename:Ft,file_type:It}),Object(h.useEffect)(function(){on.current=setInterval(function(){St()},5*60*1e3),window.addEventListener("message",gn);var zn=xe.a.subscribe("vnc-reseting",sn),kn=xe.a.subscribe("vnc-reseting-done",hn);return function(){zn(),kn(),clearInterval(on.current),window.removeEventListener("message",gn)}},[]);var sn=function(){mt({}),Sn(!0)},hn=function(kn){mt(kn==null?void 0:kn.data),setTimeout(function(){Sn(!1)},1e3)},gn=function(kn){switch(kn.data){case"updatecode":St(1);break;case"vsLoadingDone":Sn(!1);break}console.log("data:",kn)},An=function(){var zn=Object(l.a)(f.a.mark(function kn(){var bn,vn,Ln,Qn,Sr,Jr;return f.a.wrap(function(Er){for(;;)switch(Er.prev=Er.next){case 0:return Er.next=2,Object(st.a)("/api/myshixuns/".concat((bn=Vt.myshixun)===null||bn===void 0?void 0:bn.identifier,"/start.json"),{method:"get",params:Object(t.a)({},Zt)});case 2:if(Qn=Er.sent,!(Qn!=null&&(vn=Qn.data)!==null&&vn!==void 0&&(Ln=vn.data_list)!==null&&Ln!==void 0&&Ln.length)){Er.next=6;break}return xe.a.publish("pod-restrict-data",{identifier:Qn==null||((Sr=Qn.data)===null||Sr===void 0)?void 0:Sr.identifier,data_list:Qn==null||((Jr=Qn.data)===null||Jr===void 0)?void 0:Jr.data_list}),Er.abrupt("return");case 6:if(!((Qn==null?void 0:Qn.status)===-3)){Er.next=8;break}return Er.abrupt("return",new Promise(function(){var Ei=Object(l.a)(f.a.mark(function Zr(xr,Fr){return f.a.wrap(function(kr){for(;;)switch(kr.prev=kr.next){case 0:e.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 Pi=Object(l.a)(f.a.mark(function co(){return f.a.wrap(function(fi){for(;;)switch(fi.prev=fi.next){case 0:return clearTimeout(timeout.current),setPercent(0),fi.next=4,closeWindowsVnc(Zt.taskId,Qn==null?void 0:Qn.message);case 4:return setLinkNum(linkNum+1),fi.abrupt("return");case 6:case"end":return fi.stop()}},co)}));function Di(){return Pi.apply(this,arguments)}return Di}()});case 1:case"end":return kr.stop()}},Zr)}));return function(Zr,xr){return Ei.apply(this,arguments)}}()));case 8:if(!((Qn==null?void 0:Qn.status)===-1)){Er.next=10;break}throw new String(Qn==null?void 0:Qn.message);case 10:return mt(Qn==null?void 0:Qn.data),xe.a.publish("update-windows-time",Qn==null?void 0:Qn.data),Er.abrupt("return",Qn);case 13:case"end":return Er.stop()}},kn)}));return function(){return zn.apply(this,arguments)}}();return Object(h.useEffect)(function(){Ct===2&&An()},[Ct]),u.a.createElement(h.Fragment,null,u.a.createElement("div",{className:"monaco-editor-container h100"},Ct!==2&&u.a.createElement(u.a.Fragment,null,Lt||_t?null:u.a.createElement("img",{className:ol.a["only-view"],src:Go.a,alt:"only-view"}),u.a.createElement(Ta.a,{filename:Ft,type:It==="office"?"download":It,data:qe,style:{top:40,position:"absolute",zIndex:1},monacoEditor:{value:qe,language:it,theme:At,onChange:kt,onSave:vt,forbidCopy:Gt,options:at,insertSpaces:at.insertSpaces}})),Ct===2&&u.a.createElement(g.a,{spinning:Nn,wrapperClassName:ol.a.frame},u.a.createElement("iframe",{src:Xn==null?void 0:Xn.link_url}))))},ot=b("b1fT"),wt=b.n(ot),Rt=b("je13"),ut=/<link(?:.*?)href=[\"\'](.+?)[\"\'](?!<)(?:.*)\>(?:[\n\r\s]*?)(?:<\/link>)*/im,Ue=/<script(?:.*?)src=[\"\'](.+?)[\"\'](?!<)(?:.*)\>(?:[\n\r\s]*?)(?:<\/script>)*/im,et=["http","com","net","org","cdn"];function We(we){for(var qe=!1,it=0;it<et.length;it++)if(we.indexOf(et[it])!==-1){qe=!0;break}return qe}var ct=3e3,ht=function(we){var qe=we.code,it=qe===void 0?"":qe,At=we.isActive,kt=we.myshixunIdentifier,vt=we.lastedUpdateTime,at=we.onFinishDisplayHtml,Lt=Object(h.useState)(0),Ct=Object(r.a)(Lt,2),_t=Ct[0],St=Ct[1],Gt=Object(E.i)(),Ft=Object(h.useRef)(),It=Object(h.useRef)(),Vt="".concat(yt.a,"/api/myshixuns/").concat(kt,"/html_content.html"),Zt=Object(h.useMemo)(function(){var on=[],ln=[],On=[],Nn=[],Sn=document.createElement("iframe");Sn.style.width="100%",Sn.style.height="100%",Sn.style.border="0";try{Ft.current.innerHTML="",Ft.current.appendChild(Sn)}catch(bn){}var wn=it,rn=document.createElement("div");rn.innerHTML=it,it.replace(/<link [^>]*href=['"]([^'"]+)[^>]*>/gi,function(bn,vn){ln.push(vn.indexOf("http")>-1?vn:"https://data.educoder.net/api/sources/get_html_content.html?content_type=text/css&identifier="+Gt.taskId+"&path="+vn);var Ln=vn.indexOf("http")>-1?vn:'<link href="https://data.educoder.net/api/sources/get_html_content.html?content_type=text/css&identifier='+Gt.taskId+"&path="+vn+'" alt="" />';return Ln}),it.replace(/<script [^>]*src=['"]([^'"]+)[^>]*>/gi,function(bn,vn){on.push(vn.indexOf("http")>-1?vn:"https://data.educoder.net/api/sources/get_html_content.html?content_type=application/javascript&identifier="+Gt.taskId+"&path="+vn);var Ln=vn.indexOf("http")>-1?vn:'<link href="https://data.educoder.net/api/sources/get_html_content.html?content_type=text/css&identifier='+Gt.taskId+"&path="+vn+'" alt="" />';return Ln}),it=it.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi,function(bn,vn){var Ln=vn.indexOf("http")>-1?bn:bn.replace(vn,"https://data.educoder.net/api/sources/get_html_content?content_type=application/octet-stream&identifier="+Gt.taskId+"&path="+vn);return Ln}),it=it.replace(/<video [^>]*src=['"]([^'"]+)[^>]*>/gi,function(bn,vn){var Ln=vn.indexOf("http")>-1?bn:'<video src="https://data.educoder.net/api/sources/get_html_content?content_type=application/octet-stream&identifier='+Gt.taskId+"&path="+vn+'" alt="" />';return Ln}),it.replace(/<script.*?>([\s\S]+?)<\/script>/gim,function(bn,vn){On.push(vn)}),it.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(bn,vn){Nn.push(vn)});for(var Xn=[],mt=[],sn=ut.exec(wn),hn=Ue.exec(wn);sn;){var gn=sn[0],An=sn[1];We(An)?wn=wn.replace(gn,gn.replace(/link/,"edulink")):(Xn.push(An),wn=wn.replace(ut,"EDUCODERCSS")),sn=ut.exec(wn)}for(;hn;){var zn=hn[0],kn=hn[1];We(kn)?wn=wn.replace(zn,zn.replace(/script/g,"w3scrw3ipttag")):(mt.push(kn),wn=wn.replace(Ue,"EDUCODERJS")),hn=Ue.exec(wn)}try{Sn.contentWindow.document.write(rn.innerHTML),ln.map(function(bn){var vn=document.createElement("link");vn.setAttribute("rel","stylesheet"),vn.href=bn,Sn.contentWindow.document.body.appendChild(vn)}),Nn.map(function(bn){var vn=document.createElement("style");vn.innerHTML=bn,Sn.contentWindow.document.body.appendChild(vn)}),setTimeout(function(){},6e3)}catch(bn){it!=""&&!!it&&setTimeout(function(){St(new Date().getTime())},1e3)}return{content:wn,css:Xn,script:mt}},[it,_t]);return Object(h.useEffect)(function(){it!=""&&!!it&&St(_t+1)},[At]),Object(Xt.a)(function(){var on=new Date().getTime();At&&It.current&&vt&&on>vt+ct},ct),Object(h.useEffect)(function(){It.current&&Zt&&Zt.content},[It.current,Zt,Vt]),u.a.createElement("div",{className:"html-code-view",style:{display:At?"block":"none",width:"100%",height:"100%"}},u.a.createElement("form",{ref:It,method:"post",target:"my-frame"},u.a.createElement("input",{type:"hidden",name:"contents",value:Zt.content}),u.a.createElement("input",{type:"hidden",name:"educodercss",value:Zt.css}),u.a.createElement("input",{type:"hidden",name:"educoderscript",value:Zt.script})),u.a.createElement("div",{id:"iframe",ref:Ft,style:{background:"#fff",height:"100%",width:"100%"}}))},Ot=b("ZBwS"),Tt=b.n(Ot),Mt=b("Vbye"),Jt=b.n(Mt),dn=new Tt.a;dn.Diff_EditCost=8;var fn={oldStr:"",newStr:""};function Pn(we,qe){switch(qe.type){case"init":return Object(t.a)(Object(t.a)({},we),qe.payload);default:throw new Error}}function br(we,qe){var it=/&/g,At=/</g,kt=/>/g,vt=we[0],at=we[1]||"",Lt=at.replace(it,"&").replace(At,"<").replace(kt,">"),Ct=!Lt.trim();Lt=Lt=="\r"?"\u21B5":Lt;var _t=Lt=="\u21B5"?" ":Lt,St="".concat(Ct?Jt.a.empty:""," ").concat(Lt==="\u21B5"?Jt.a.enter:""),Gt="".concat(Lt==="\u21B5"?Jt.a.enter:"");if(qe==="oldStr"){console.log("type:",qe,Ot.DIFF_DELETE,Ot.DIFF_EQUAL,vt,Lt);switch(vt){case Ot.DIFF_DELETE:return'<span class="'.concat(Jt.a.block,'"><ins class="').concat(St,'">')+_t+"</ins></span>";case Ot.DIFF_EQUAL:return'<span class="'.concat(Gt,'">')+_t+"</span>"}}else switch(vt){case Ot.DIFF_INSERT:return'<span class="'.concat(Jt.a.block,'"><del class="').concat(St,'">')+_t+"</del></span>";case Ot.DIFF_EQUAL:return'<span class="'.concat(Gt,'">')+_t+"</span>"}}var Yr=function(we){var qe,it,At=we.output,kt=we.actual_output,vt=Object(h.useReducer)(Pn,fn),at=Object(r.a)(vt,2),Lt=at[0],Ct=at[1];return At=(qe=At)===null||qe===void 0?void 0:qe.replace(/\n/g,"\r").replace(/\u0020/g," ").replace(/\u0000/g,"\\u0000"),kt=(it=kt)===null||it===void 0?void 0:it.replace(/\n/g,"\r").replace(/\u0020/g," ").replace(/\u0000/g,"\\u0000"),Object(h.useEffect)(function(){var _t=dn.diff_main(At||"",kt||"");dn.diff_cleanupEfficiency(_t);var St=_t.map(function(Ft){return br(Ft,"oldStr")}).join(""),Gt=_t.map(function(Ft){return br(Ft,"newStr")}).join("");Ct({type:"init",payload:{oldStr:St,newStr:Gt}})},[At,kt]),u.a.createElement("div",{className:Jt.a["diff-panel-container"]},u.a.createElement("div",{dangerouslySetInnerHTML:{__html:Lt.oldStr}}),u.a.createElement("div",{dangerouslySetInnerHTML:{__html:Lt.newStr}}))},Pr=new Tt.a;Pr.Diff_EditCost=8;var Wr={oldStr:"",newStr:""};function Qr(we,qe){switch(qe.type){case"init":return Object(t.a)(Object(t.a)({},we),qe.payload);default:throw new Error}}function Xr(we,qe){var it=/&/g,At=/</g,kt=/>/g,vt=we[0],at=we[1]||"",Lt=at.replace(it,"&").replace(At,"<").replace(kt,">"),Ct=!Lt.trim();if(qe==="oldStr")switch(vt){case Ot.DIFF_DELETE:return"<ins class=".concat(Ct?"empty":"",">")+Lt+"</ins>";case Ot.DIFF_EQUAL:return"<span>"+Lt+"</span>"}else switch(vt){case Ot.DIFF_INSERT:return"<del class=".concat(Ct?"empty":"",">")+Lt+"</del>";case Ot.DIFF_EQUAL:return"<span>"+Lt+"</span>"}}var zr=function(we){var qe,it,At=we.output,kt=we.actual_output,vt=we.onClick,at=Object(h.useReducer)(Qr,Wr),Lt=Object(r.a)(at,2),Ct=Lt[0],_t=Lt[1];return At=(qe=At)===null||qe===void 0?void 0:qe.replace(/\n/g,"\r"),kt=(it=kt)===null||it===void 0?void 0:it.replace(/\n/g,"\r"),Object(h.useEffect)(function(){var St=Pr.diff_main(At||"",kt||"");Pr.diff_cleanupEfficiency(St);var Gt=St.map(function(It){return Xr(It,"oldStr")}).join(""),Ft=St.map(function(It){return Xr(It,"newStr")}).join("");_t({type:"init",payload:{oldStr:Gt,newStr:Ft}})},[At,kt]),u.a.createElement("div",{className:"c-white ".concat(Jt.a["diff-panel-container"]," ").concat(Jt.a["diff-panel-container-2"]," ").concat(vt?"current":""," "),onClick:function(){return vt==null?void 0:vt()}},u.a.createElement("div",{dangerouslySetInnerHTML:{__html:Ct.oldStr}}))},li=b("J66h"),$r=function(we){var qe=we.sshConfigData,it=we.tpId,At=Object(h.useState)([]),kt=Object(r.a)(At,2),vt=kt[0],at=kt[1],Lt=qe.link_url,Ct=qe.port,_t=Object(h.useRef)(),St=Object(h.useRef)(),Gt=Object(h.useRef)(),Ft=Object(h.useRef)(),It=Object(h.useRef)(!1),Vt=function(Nn){console.log("insertData:",Nn),vt.push(Nn),at(Object(I.a)(vt))};function Zt(){Gt.current=new WebSocket(Lt),_t.current=Gt.current,Gt.current.onopen=function(){Gt.current.send(JSON.stringify({tp:"log",data:it}))},Gt.current.onerror=function(On){console.log("------in socket error----",On,Gt.current,Lt)},Gt.current.onmessage=function(On){!It.current,It.current=!0;var Nn=li.Base64.decode(On.data.toString());Nn==="ProcessFinished"?(on(),setTimeout(function(){xe.a.publish("runCodeFinish")},1e3)):St.current||Vt(Nn)},Gt.current.onclose=function(On){console.log("socket\u5173\u95ED\u94FE\u63A5",On)},Gt.current.ondisconnect=function(On){console.log("socket-disconnect:",On)}}var on=function(){St.current=!0,at(Object(I.a)(vt))};Object(h.useEffect)(function(){var On=xe.a.subscribe("runCode",function(Nn){Gt.current=void 0,console.log("lastedUpdateTime-runCode",xe.a,xe.a.channels),Nn.type==="start"?(St.current=!1,vt=[],at([]),Zt()):on()});return function(){On(),_t.current&&(_t.current.close(),console.log("socket\u94FE\u63A5\u4E3B\u52A8\u5173\u95ED"),It.current=!1)}},[]),Object(h.useEffect)(function(){Ft.current.scrollIntoView({behavior:"smooth",block:"end"})},[vt]);var ln=Object(h.useCallback)(function(){var On;return u.a.createElement("pre",{className:"font14 ml20 mr20"},(On=vt)===null||On===void 0?void 0:On.join(`
|
|
|
`))},[vt]);return u.a.createElement("div",{className:"xterm-panel pb10",ref:Ft,style:{fontFamily:"monospace"}},vt==""&&!St.current&&u.a.createElement(je.a,null),ln())};function Qi(we){var qe,it,At=we.last_compile_output,kt=we.language,vt=we.ts_mem,at=we.ts_time,Lt=we.input,Ct=we.output,_t=we.is_invisible,St=we.actual_output,Gt=we.is_file,Ft=we.input_file_url,It=we.output_file_url,Vt=we.is_public,Zt=we.result,on=we.compile_success,ln=we.title,On=we.isActive,Nn=we.id,Sn=we.onActive,wn=we.test_sets_view,rn=we.allowed_unlock,Xn=we.identity,mt=we.taskData,sn=we.setData,hn=we.setMonacoValue,gn=Object(h.useState)(!1),An=Object(r.a)(gn,2),zn=An[0],kn=An[1],bn=Ct;Gt&&(mt==null||((qe=mt.user)===null||qe===void 0)?void 0:qe.identity)<5&&(_t=!1),_t&&(mt==null||((it=mt.user)===null||it===void 0)?void 0:it.identity)>=5&&(Ct="\u8BE5\u9884\u671F\u8F93\u51FA\u4E0D\u53EF\u67E5\u770B");function vn(){Vt||wn||Xn<=5?Sn(Nn):rn?xe.a.publish("unlock-test-case",Nn):n.b.info("\u672C\u6D4B\u8BD5\u96C6\u4E0D\u53EF\u89E3\u9501")}var Ln=wt.a["test-case-item"];return On&&(Ln+=" active"),At&&(Ln+=" ".concat(wt.a["has-result"])),u.a.createElement("li",{className:Ln},u.a.createElement("a",{className:wt.a["case-header"],onClick:vn},u.a.createElement("h2",null,u.a.createElement("div",{className:On?wt.a["arrow-down"]:wt.a["arrow-right"]}),u.a.createElement("span",{className:wt.a["test-title"]},ln)),u.a.createElement("div",{className:wt.a["case-info"]},vt?u.a.createElement("span",{className:wt.a.description},"\u6D88\u8017\u5185\u5B58",vt,"MB"):null,at?u.a.createElement("span",{className:wt.a.description}," ","\u4EE3\u7801\u6267\u884C\u65F6\u957F\uFF1A",at,"\u79D2"," "):null,Vt?null:wn||Xn<=5?u.a.createElement("i",{className:"iconfont icon-jiesuo"}):u.a.createElement("i",{className:"iconfont icon-suo1"}),on>0?u.a.createElement("img",{width:16,src:Zt?fr.a:Ea.a}):null)),u.a.createElement("div",{className:"".concat(wt.a["item-desc"]," ").concat(On?"show":"hide"," ").concat(wt.a["choose-game-item"])},Lt?u.a.createElement(ue.a,null,u.a.createElement(Dt.a,{flex:"80px"},"\u6D4B\u8BD5\u8F93\u5165\uFF1A"),u.a.createElement(Dt.a,{flex:"1",style:{color:"#fff"}},u.a.createElement(zr,{onClick:Object(l.a)(f.a.mark(function Qn(){var Sr;return f.a.wrap(function(_n){for(;;)switch(_n.prev=_n.next){case 0:if(!Gt){_n.next=12;break}return _n.next=3,fetch(Ft,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 3:if(Sr=_n.sent,!(Sr.status===-1)){_n.next=6;break}return _n.abrupt("return");case 6:return _n.t0=hn,_n.next=9,Sr.text();case 9:_n.t1=_n.sent,(0,_n.t0)(_n.t1),setTimeout(function(){sn(Ft)},200);case 12:case"end":return _n.stop()}},Qn)})),output:Lt}))):null,u.a.createElement("p",{className:wt.a["output-title-container"]},u.a.createElement("span",null,"\u2014\u2014 \u9884\u671F\u8F93\u51FA \u2014\u2014"),u.a.createElement("span",{className:wt.a["output-title"]},u.a.createElement("span",null,"\u2014\u2014 \u5B9E\u9645\u8F93\u51FA \u2014\u2014"),!Gt&&u.a.createElement("span",{className:"c-blue current",onClick:function(){return kn(!zn)}},zn?"\u5C55\u793A\u683C\u5F0F\u5316\u8F93\u51FA":"\u5C55\u793A\u539F\u59CB\u8F93\u51FA"))),Gt&&u.a.createElement("div",{class:wt.a["diff-panel-container"]},u.a.createElement("div",{className:"tc"},_t?u.a.createElement("span",{style:{color:"#2ea44f"}},Ct):u.a.createElement("a",{class:"underline",onClick:Object(l.a)(f.a.mark(function Qn(){var Sr;return f.a.wrap(function(_n){for(;;)switch(_n.prev=_n.next){case 0:return _n.next=2,fetch(It,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 2:if(Sr=_n.sent,!(Sr.status===-1)){_n.next=5;break}return _n.abrupt("return");case 5:return _n.t0=hn,_n.next=8,Sr.text();case 8:_n.t1=_n.sent,(0,_n.t0)(_n.t1),setTimeout(function(){sn(It)},200);case 11:case"end":return _n.stop()}},Qn)}))},Ct)),u.a.createElement("div",{className:"tc"},on?u.a.createElement("a",{class:"underline",onClick:Object(l.a)(f.a.mark(function Qn(){var Sr;return f.a.wrap(function(_n){for(;;)switch(_n.prev=_n.next){case 0:return _n.next=2,Object(st.a)(St,{method:"Get",headers:{"Content-Type":"application/xml",Accept:"*/*"}});case 2:if(Sr=_n.sent,!(Sr.status===-1)){_n.next=5;break}return _n.abrupt("return");case 5:hn(Sr),setTimeout(function(){sn(St)},200);case 7:case"end":return _n.stop()}},Qn)}))},bn):St)),!Gt&&!zn&&u.a.createElement(Yr,{output:Ct,actual_output:St}),!Gt&&zn&&u.a.createElement("div",{class:wt.a["diff-panel-container"]},u.a.createElement("div",{className:""},Ct),u.a.createElement("div",{className:""},St))))}var ei=function(we){var qe,it,At=we.onResizeSetContainer,kt=we.moveY,vt=we.taskData,at=we.isHtml,Lt=we.lastedUpdateTime,Ct=we.content,_t=we.myshixunIdentifier,St=we.test_sets_view,Gt=we.identity,Ft=we.language,It=we.allowed_unlock,Vt=we.test_sets,Zt=Vt===void 0?[]:Vt,on=we.test_sets_count,ln=we.sets_error_count,On=we.last_compile_output,Nn=we.onFinishDisplayHtml,Sn=Object(h.useState)(-1),wn=Object(r.a)(Sn,2),rn=wn[0],Xn=wn[1],mt=Object(h.useState)(""),sn=Object(r.a)(mt,2),hn=sn[0],gn=sn[1],An=Object(h.useState)(""),zn=Object(r.a)(An,2),kn=zn[0],bn=zn[1],vn=Object(h.useState)(at?0:1),Ln=Object(r.a)(vn,2),Qn=Ln[0],Sr=Ln[1],Jr=Object(h.useState)(!1),_n=Object(r.a)(Jr,2),Er=_n[0],Ei=_n[1];Object(h.useEffect)(function(){var kr,Pi=xe.a.subscribe("showRunCodeTab",function(co){Ei(co)}),Di=xe.a.subscribe("runCode",function(){Sr(2)});return xe.a.publish("caseInputValue",Zt==null||((kr=Zt[0])===null||kr===void 0)?void 0:kr.input),function(){Pi(),Di()}},[]);function Zr(kr){Xn(kr===rn?-1:kr)}function xr(){At(kt)}function Fr(kr){Sr(parseInt(kr.target.id,10))}var Dn={code:Ct,isActive:Qn===0&&at,myshixunIdentifier:_t,onFinishDisplayHtml:Nn,lastedUpdateTime:Lt};return u.a.createElement(h.Fragment,null,u.a.createElement(Ta.a,{close:!0,data:hn,type:hn.length?"txt":"",onClose:function(){return gn("")},monacoEditor:{value:kn,language:"txt",onChange:function(){},options:{readOnly:!0,fontSize:14,minimap:{enabled:!1}}}}),u.a.createElement("div",{className:"test-header"},u.a.createElement("div",{className:"flex-container"},at?u.a.createElement("span",{id:0,onClick:Fr,className:Qn===0?"active":""},"\u6548\u679C\u663E\u793A"):null,u.a.createElement("span",{id:1,onClick:Fr,className:Qn===1?"active":""},"\u6D4B\u8BD5\u7ED3\u679C"),!!Er&&u.a.createElement("span",{id:2,onClick:Fr,className:Qn===2?"active":""},"\u81EA\u6D4B\u8FD0\u884C\u7ED3\u679C")),u.a.createElement("a",{onClick:xr},u.a.createElement("i",{className:"iconfont ".concat(kt===.01?"icon-shousuo":"icon-zhankai"," icon-zhankai")}))),u.a.createElement("section",{className:"test-case-run-wrp",style:{display:Qn===2?"flex":"none",flex:1,flexDirection:"column",overflow:"auto",paddingLeft:20}},u.a.createElement(ue.a,{className:"test-case-run-header"},u.a.createElement(Dt.a,{flex:"200px"},"- \u81EA\u6D4B\u8F93\u5165 -"),u.a.createElement(Dt.a,{flex:"1"},u.a.createElement("span",{className:"ml12"},"- \u8FD0\u884C\u7ED3\u679C -"))),u.a.createElement(ue.a,{className:"h100 mr10 mb10"},u.a.createElement(Dt.a,{flex:"200px"},u.a.createElement(Vr.a.TextArea,{defaultValue:Zt==null||((qe=Zt[0])===null||qe===void 0)?void 0:qe.input,style:{height:"calc(100% - 15px)"},onChange:function(Pi){xe.a.publish("caseInputValue",Pi.target.value)}})),u.a.createElement(Dt.a,{flex:"1"},u.a.createElement("div",{style:{flex:1,position:"absolute",width:"100%",height:"100%",overflow:"auto"}},u.a.createElement($r,{sshConfigData:{link_url:"".concat(vt==null?void 0:vt.wss_url,"/log")},tpId:vt==null||((it=vt.myshixun)===null||it===void 0)?void 0:it.id,sid:1}))))),u.a.createElement("section",{style:{display:Qn===1?"block":"none",flex:1}},On?u.a.createElement("p",{className:"test-result ".concat(ln===0?"success":"failer")},u.a.createElement("span",{className:"count"},u.a.createElement("img",{width:16,src:ln===0?fr.a:Hr.a}),on-ln,"/",on),ln==0?u.a.createElement("span",{className:"count"},"\u5168\u90E8\u901A\u8FC7"):u.a.createElement("div",{dangerouslySetInnerHTML:{__html:On}})):null,u.a.createElement("ul",{className:"test-case-list"},Zt.map(function(kr,Pi){return u.a.createElement(Qi,Object(s.a)({setData:gn,setMonacoValue:bn,allowed_unlock:It,identity:Gt,key:"item"+Pi,test_sets_view:St,language:Ft,last_compile_output:On,title:"\u6D4B\u8BD5\u96C6".concat(Pi+1)},kr,{isActive:rn===Pi,id:Pi,taskData:vt,onActive:Zr}))}))),at?u.a.createElement(ht,Dn):null)};function pr(we){var qe=we.isLarge,it=we.language,At=we.test_sets,kt=At===void 0?[]:At,vt=we.test_sets_count,at=we.allowed_unlock,Lt=we.sets_error_count,Ct=we.last_compile_output,_t=we.test_sets_view,St=we.identity,Gt=we.onResizeSet,Ft=Object(h.useState)(-1),It=Object(r.a)(Ft,2),Vt=It[0],Zt=It[1];function on(ln){Zt(ln===Vt?-1:ln)}return u.a.createElement(h.Fragment,null,u.a.createElement("div",{className:"test-header"},u.a.createElement("span",{className:"active"},"\u6D4B\u8BD5\u7ED3\u679C"),u.a.createElement("a",{onClick:Gt},u.a.createElement("i",{className:"iconfont ".concat(qe?"icon-shousuo":"icon-zhankai"," icon-zhankai")}))),Ct?u.a.createElement("p",{className:"test-result ".concat(Lt===0?"success":"failer")},u.a.createElement("span",{className:"count"},u.a.createElement("img",{width:16,src:Lt===0?fr.a:Hr.a}),vt-Lt,"/",vt),Lt==0?u.a.createElement("span",null,"\u5168\u90E8\u901A\u8FC7"):u.a.createElement("div",{dangerouslySetInnerHTML:{__html:Ct}})):null,u.a.createElement("ul",{className:"test-case-list"},kt.map(function(ln,On){return u.a.createElement(Qi,Object(s.a)({allowed_unlock:at,identity:St,test_sets_view:_t,key:"item"+On,language:it,last_compile_output:Ct,title:"\u6D4B\u8BD5\u96C6".concat(On+1)},ln,{isActive:Vt===On,id:On,onActive:on}))})))}var hr=b("Lmeb"),ri=b("qZJd"),hi=function(we){var qe=we.taskData,it=we.evaluateLoading,At=we.evaluateMessage,kt=we.language,vt=we.onEval,at=qe.vnc_url,Lt=qe.shixun,Ct=qe.test_sets,_t=qe.test_sets_count,St=qe.sets_error_count,Gt=qe.last_compile_output,Ft=qe.game,It=qe.allowed_unlock,Vt=qe.user,Zt=Object(h.useState)(!1),on=Object(r.a)(Zt,2),ln=on[0],On=on[1],Nn=Object(h.useState)(!1),Sn=Object(r.a)(Nn,2),wn=Sn[0],rn=Sn[1];function Xn(){On(!ln)}function mt(){rn(!wn)}var sn={isLarge:ln,language:kt,test_sets:Ct,test_sets_count:_t,sets_error_count:St,last_compile_output:Gt,allowed_unlock:It,test_sets_view:Ft.test_sets_view,identity:Vt.identity,onResizeSet:Xn};function hn(){rn(!0),vt()}function gn(){rn(!wn)}return u.a.createElement(h.Fragment,null,u.a.createElement(ri.a,{vnc_url:at,window_vnc_url:qe.windows_vnc,virtual_machine:qe==null?void 0:qe.virtual_machine,linux_vnc:qe.linux_vnc,taskData:qe}),wn?u.a.createElement("div",{className:"vnc-mask"}):null,u.a.createElement("div",{className:"vnc-test-list ".concat(ln?"large":wn?"pop":"")},u.a.createElement("div",{className:"vnc-test-list-body"},ln?null:u.a.createElement("span",{className:"arrow-container",onClick:mt},u.a.createElement("i",{className:"iconfont ".concat(wn?"icon-xiajiantou":"icon-shangjiantou"," ")})),it?u.a.createElement(je.a,{message:At,style:{color:"#0152d9"}}):u.a.createElement(pr,sn))))},ir=b("DZo9"),gi=b("8z0m"),qi=b("z7Xi"),bi=b("NFKh"),Ti=b.n(bi),Li=b("7Cbv"),ma=b("mxV5"),Ia=b.n(ma),na=b("taB1"),io=b.n(na),Ro=function(qe){var it="bf3c199c2470cb477d907b1e0917c17b",At="5183666c72eec9e4",kt=Ti.a.enc.Utf8.parse(it),vt=Ti.a.enc.Utf8.parse(At),at=Ti.a.AES.decrypt(qe,kt,{iv:vt,mode:Ti.a.mode.CBC});return at.toString(Ti.a.enc.Utf8)},Eo,ka=function(qe){var it=qe.user,At=qe.cancelUpload,kt=qe.defaultFilelist,vt=qe.getData,at=Object(i.a)(qe,["user","cancelUpload","defaultFilelist","getData"]),Lt=Object(h.useState)([]),Ct=Object(r.a)(Lt,2),_t=Ct[0],St=Ct[1],Gt=Object(h.useState)(""),Ft=Object(r.a)(Gt,2),It=Ft[0],Vt=Ft[1],Zt=Object(h.useState)(),on=Object(r.a)(Zt,2),ln=on[0],On=on[1];Object(h.useEffect)(function(){kt&&St(Object(I.a)(kt))},[kt]);var Nn={onPreview:function(Xn){Vt(Xn.download_url)},onRemove:function(){var rn=Object(l.a)(f.a.mark(function mt(sn){var hn;return f.a.wrap(function(An){for(;;)switch(An.prev=An.next){case 0:return An.next=2,Object(st.a)("/api/tasks/".concat(at.identifier,"/destroy_attachment"),{method:"delete",body:{id:sn.id}});case 2:hn=An.sent,vt(),St(Object(I.a)(_t.filter(function(zn){return zn.name!==sn.name}))),at.onChange(_t.filter(function(zn){return zn.name!==sn.name}));case 6:case"end":return An.stop()}},mt)}));function Xn(mt){return rn.apply(this,arguments)}return Xn}(),disabled:at.disabled,multiple:!0,fileList:_t,customRequest:function(){var rn=Object(l.a)(f.a.mark(function mt(sn){var hn,gn,An,zn;return f.a.wrap(function(bn){for(;;)switch(bn.prev=bn.next){case 0:return bn.next=2,Sn(sn.file,{login:it==null||((hn=it.userInfo)===null||hn===void 0)?void 0:hn.login,container_type:at.container_type,container_id:at.identifier,description:at.description,realFileName:at.realFileName});case 2:zn=bn.sent,sn.onSuccess({file:sn.file,uid:zn==null||((gn=zn.data)===null||gn===void 0)?void 0:gn.attachment_id,id:zn==null||((An=zn.data)===null||An===void 0)?void 0:An.attachment_id});case 4:case"end":return bn.stop()}},mt)}));function Xn(mt){return rn.apply(this,arguments)}return Xn}(),beforeUpload:function(){var rn=Object(l.a)(f.a.mark(function mt(sn){return f.a.wrap(function(gn){for(;;)switch(gn.prev=gn.next){case 0:case"end":return gn.stop()}},mt)}));function Xn(mt){return rn.apply(this,arguments)}return Xn}()},Sn=function(){var rn=Object(l.a)(f.a.mark(function Xn(mt,sn){var hn,gn,An,zn,kn,bn,vn,Ln,Qn,Sr;return f.a.wrap(function(_n){for(;;)switch(_n.prev=_n.next){case 0:return sn.file_name=mt.name,vn=mt.name,_n.next=4,Object(st.a)("/api/buckets/get_upload_token_for_file.json",{method:"get"});case 4:if(Ln=_n.sent,Ln.data=JSON.parse(Ro(Ln.data)),!((Ln==null?void 0:Ln.status)!==0)){_n.next=12;break}return _t[_t.findIndex(function(Er){return Er.name===vn})].status="error",_t[_t.findIndex(function(Er){return Er.name===vn})].file.status="error",at.onChange(_t),n.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),_n.abrupt("return");case 12:return ln=new Ia.a({endpoint:Ln==null||((hn=Ln.data)===null||hn===void 0)?void 0:hn.end_point,region:Ln==null||((gn=Ln.data)===null||gn===void 0)?void 0:gn.region,accessKeyId:Ln==null||((An=Ln.data)===null||An===void 0)?void 0:An.access_key_id,accessKeySecret:Ln==null||((zn=Ln.data)===null||zn===void 0)?void 0:zn.access_key_secret,bucket:Ln==null||((kn=Ln.data)===null||kn===void 0)?void 0:kn.bucket,stsToken:Ln==null||((bn=Ln.data)===null||bn===void 0)?void 0:bn.security_token}),console.log("files:",mt,Ln),On(ln),Qn=mt.name.split("."),Qn.pop(),Sr=sn.realFileName?Qn:Object(Li.a)(),console.log("obj1111:",sn),_n.abrupt("return",new Promise(function(Er,Ei){var Zr;ln.multipartUpload("".concat(at.identifier,"/").concat(Sr.join("")).concat(vn.indexOf(".")>-1?"."+vn.split(".").pop():""),new Blob([mt],{type:mt.type}),{timeout:3600*1e3,partSize:1002400,progress:function(Fr,Dn,kr){try{console.log("\u8FDB\u5EA6",Fr,Dn,kr);var Pi=_t.findIndex(function(Di){return Di.name===vn});_t[Pi].file.percent=Fr*100,Fr===1&&(_t[Pi].status="done",_t[Pi].file.status="done",at.onChange(_t)),_t[Pi].tempCheckpoint=Dn,St(Object(I.a)(_t))}catch(Di){}},callback:{customValue:{id:vn+""},url:Ln==null||((Zr=Ln.data)===null||Zr===void 0)?void 0:Zr.callback_url,host:Ln==null?void 0:Ln.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(st.e)(sn)}}).then(function(xr){var Fr,Dn="done";if(((Fr=xr.data)===null||Fr===void 0?void 0:Fr.status)===0)vt();else{var kr;n.b.warn((kr=xr.data)===null||kr===void 0?void 0:kr.message),Dn="error"}at.onChange(_t),Er(xr==null?void 0:xr.data)}).catch(function(xr){Ei(xr),console.log("err:",xr)})}));case 20:case"end":return _n.stop()}},Xn)}));return function(mt,sn){return rn.apply(this,arguments)}}();Object(h.useEffect)(function(){_t.every(function(rn){return rn==="done"||rn==="error"})&&at.onComplete(_t),console.log("fileList:",_t)},[_t]),Object(h.useEffect)(function(){if(At){var rn;(rn=ln)===null||rn===void 0||rn.cancel()}},[At]);var wn=function(){var rn=Object(l.a)(f.a.mark(function Xn(){return f.a.wrap(function(sn){for(;;)switch(sn.prev=sn.next){case 0:_t.map(function(){var hn=Object(l.a)(f.a.mark(function gn(An){var zn,kn;return f.a.wrap(function(vn){for(;;)switch(vn.prev=vn.next){case 0:if(!((!An.status||An.status==="error")&&!At)){vn.next=6;break}return An.status="uploading",An.file.status="uploading",vn.next=5,Sn(An,{login:it==null||((zn=it.userInfo)===null||zn===void 0)?void 0:zn.login,container_type:at.container_type,container_id:at.identifier,description:at.description,realFileName:at.realFileName});case 5:kn=vn.sent;case 6:case"end":return vn.stop()}},gn)}));return function(gn){return hn.apply(this,arguments)}}());case 1:case"end":return sn.stop()}},Xn)}));return function(){return rn.apply(this,arguments)}}();return u.a.createElement("div",{className:io.a.files},u.a.createElement(Ta.a,{close:!0,data:encodeURIComponent(It),type:It!=null&&It.length?"office":"",onClose:function(){return Vt("")}}),u.a.createElement(gi.a,Nn,u.a.createElement(Nt.a,{icon:u.a.createElement(qi.a,null),type:"primary"},"\u4E0A\u4F20\u6587\u4EF6")))},zi=Object(ar.a)(function(we){var qe=we.loading,it=we.globalSetting,At=we.user;return{globalSetting:it,loading:qe.models.competitions,user:At}})(ka),Ki=rt.a.Group,ra=function(qe){var it,At=qe.classroomList,kt=qe.loading,vt=qe.user,at=qe.exercise_id,Lt=at===void 0?null:at,Ct=qe.homework_common_id,_t=Ct===void 0?null:Ct,St=qe.setitem,Gt=qe.taskData,Ft=qe.type,It=qe.dispatch,Vt=Object(h.useState)(),Zt=Object(r.a)(Vt,2),on=Zt[0],ln=Zt[1],On=Object(h.useState)(!1),Nn=Object(r.a)(On,2),Sn=Nn[0],wn=Nn[1];Object(h.useEffect)(function(){rn()},[]);var rn=function(){var mt=Object(l.a)(f.a.mark(function sn(){var hn,gn,An;return f.a.wrap(function(kn){for(;;)switch(kn.prev=kn.next){case 0:return kn.next=2,Object(st.a)("/api/tasks/".concat(Gt==null||((hn=Gt.game)===null||hn===void 0)?void 0:hn.identifier,"/get_user_attachments"),{method:"get"});case 2:An=kn.sent,An==null||((gn=An.attachments)===null||gn===void 0)||gn.map(function(bn){return bn.status="done",bn.uid=bn.id,bn.name=bn.title,bn}),ln(An);case 5:case"end":return kn.stop()}},sn)}));return function(){return mt.apply(this,arguments)}}(),Xn=function(sn){console.log(sn,444)};return u.a.createElement("div",null,u.a.createElement(zi,{identifier:Gt==null||((it=Gt.game)===null||it===void 0)?void 0:it.identifier,defaultFilelist:on==null?void 0:on.attachments,container_type:"Game",uploading:Sn,onChange:function(){Sn=!1,wn(!0)},height:300,maxSize:100*1024*1024*1024,description:"",getData:rn,onComplete:Xn,realFileName:!0,onRemove:function(){}}))},$i=Object(ar.a)(function(we){var qe=we.classroomList,it=we.loading,At=we.globalSetting,kt=we.user;return{classroomList:qe,globalSetting:At,loading:it.effects,user:kt}})(ra),Do=b("5bA4"),Yo=b("UESt"),Qo=b("ZD9Y"),Mi=function(we){var qe=we.onFontSizeChange,it=we.cmFontSize,At=we.cmCodeMode,kt=we.onCodeModeChange,vt=we.tabToSpace,at=we.onTabToSpace,Lt=we.shixun,Ct=Lt.task_pass,_t=Lt.forbid_copy,St=Lt.test_set_permission,Gt={onFontSizeChange:qe,cmFontSize:it,cmCodeMode:At,onCodeModeChange:kt,tabToSpace:vt,onTabToSpace:at};return u.a.createElement(Qo.a,Gt,u.a.createElement("h3",null,"\u5173\u5361\u914D\u7F6E\u4FE1\u606F"),u.a.createElement("section",null,u.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"},u.a.createElement("b",null,"\u8DF3\u5173"),u.a.createElement("span",null,Ct?"\u5141\u8BB8":"\u4E0D\u5141\u8BB8")),u.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"},u.a.createElement("b",null,"\u6D4B\u8BD5\u96C6\u89E3\u9501"),u.a.createElement("span",null,St?"\u5141\u8BB8":"\u4E0D\u5141\u8BB8")),u.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"},u.a.createElement("b",null,"\u4EE3\u7801\u7C98\u8D34"),u.a.createElement("span",null,_t?"\u4E0D\u5141\u8BB8":"\u5141\u8BB8"))))},Vo=b("X9zl"),Jo=b("l/DK"),Fi=b.n(Jo);function Ri(we){var qe=we.callback,it=we.file,At=we.onHidePathList;function kt(){At(),qe(it)}return u.a.createElement("a",{onClick:kt},it)}var La=function(we){var qe=we.paths,it=we.onChangePath,At=we.activePath,kt=we.isVisible,vt=we.onHidePathList;return u.a.createElement("ul",{className:Fi.a["path-container"],onMouseLeave:vt,style:{display:kt?"block":"none"}},qe.filter(function(at){return!!at}).map(function(at){return u.a.createElement("li",{className:At===at?Fi.a.active:"",key:at},u.a.createElement(Ri,{callback:it,file:at,onHidePathList:vt}))}))},js=b("Dqnf"),ll={theme:Object(Xi.a)("cmCodeMode","vs-dark"),fontSize:Object(Xi.a)("cmFontSize",16),tabToSpace:Object(Xi.a)("cmTabToSpace",!0),showEditorSetting:!1,showPathList:!1,tabIndex:0,sshConfigData:null,sshConfigDataArr:[],sshTabs:[]};function Zo(we,qe){switch(qe.type){case be.D:return Object(t.a)(Object(t.a)({},we),{},{showEditorSetting:qe.payload});case be.E:return Object(t.a)(Object(t.a)({},we),{},{theme:qe.payload});case be.C:return Object(t.a)(Object(t.a)({},we),{},{fontSize:qe.payload});case be.M:return Object(t.a)(Object(t.a)({},we),{},{tabIndex:qe.payload});case be.J:return Object(t.a)(Object(t.a)({},we),{},{sshConfigData:qe.payload});case be.K:return Object(t.a)(Object(t.a)({},we),{},{sshConfigDataArr:qe.payload});case be.L:return Object(t.a)(Object(t.a)({},we),{},{sshTabs:Object(I.a)(qe.payload)});case be.U:return Object(t.a)(Object(t.a)({},we),{},{showPathList:!0});case be.q:return Object(t.a)(Object(t.a)({},we),{},{showPathList:!1});case be.w:return Object(t.a)(Object(t.a)({},we),{},{tabToSpace:qe.payload});default:throw new Error}}var as=3e4,Bs=function(we){var qe,it,At,kt,vt,at=we.taskData,Lt=we.moveY,Ct=we.isHtml,_t=we.isNotice,St=we.onResizeYStart,Gt=we._dispatch,Ft=we.codeRepData,It=we.isEditPath,Vt=we.onEditRepCode,Zt=we.onUpdateCode,on=we.onResizeSetContainer,ln=we.onEval,On=we.evaluateLoading,Nn=we.evaluateMessage,Sn=we.onResizeCodeArea,wn=we.onShowDir,rn=we.onChangePath,Xn=we.onShowNotice,mt=we.onResetCode,sn=we.onResetGitCode,hn=we.onResetPassedCode,gn=we.onFinishDisplayHtml,An=we.onGetUnity3dMessage,zn=we.unity_3d_routes,kn=we.with_code_file,bn=Object(i.a)(we,["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"]),vn=Object(E.i)(),Ln=Object(h.useRef)(),Qn=Object(h.useReducer)(Zo,ll),Sr=Object(r.a)(Qn,2),Jr=Sr[0],_n=Sr[1],Er=Object(h.useState)(!1),Ei=Object(r.a)(Er,2),Zr=Ei[0],xr=Ei[1],Fr=Object(h.useState)(),Dn=Object(r.a)(Fr,2),kr=Dn[0],Pi=Dn[1],Di=Object(h.useState)(!1),co=Object(r.a)(Di,2),Ma=co[0],fi=co[1],Sa=Object(h.useRef)(null),aa=Ft.loading,da=Ft.content,Lo=Ft.language,ho=Ft.filename,$a=Ft.file_type,Pa=Ft.lastedUpdateTime,ao=Ft.paths,So=Ft.currentPath,Ka=Jr.fontSize,Ha=Jr.theme,oa=Jr.showEditorSetting,sa=Jr.showPathList,Br=Jr.tabIndex,la=Jr.sshTabs,xi=Jr.tabToSpace,wi=Jr.sshConfigData,ji=Jr.sshConfigDataArr,Ii=at.shixun,ua=at.test_sets,Oa=at.test_sets_count,fo=at.sets_error_count,eo=at.last_compile_output,ha=at.game,Co=at.git_url,ga=at.myshixun,po=at.user,fa=at.allowed_unlock,Ai=Ii.webssh,vi=Ii.multi_webssh,In=Ii.hide_code,or=at.terminal_count,Cr={onFinishDisplayHtml:gn,allowed_unlock:fa,onResizeSetContainer:on,moveY:Lt,language:Lo,content:da,isHtml:Ct,myshixunIdentifier:ga.identifier,test_sets_view:ha.test_sets_view,identity:po.identity,lastedUpdateTime:Pa,test_sets:ua,test_sets_count:Oa,sets_error_count:fo,last_compile_output:eo},Kr=zn&&!kn||(at==null||((qe=at.challenge)===null||qe===void 0)?void 0:qe.thiry_party);Object(h.useEffect)(function(){xe.a.subscribe("update-windows-time",function(pi){Pi(pi)});var Lr=xe.a.subscribe("show-case-result",function(pi){Sn(1),pi?xr(pi):(Zr=!Zr,xr(Zr))});return Lr},[]),Object(h.useEffect)(function(){xe.a.publish("showRunCode",!Br),xe.a.publish("showRunCodeTab",!Br),xe.a.publish("taskTabIndex",Br)},[Br]),Object(h.useEffect)(function(){at!=null&&at.vnc_url||at!=null&&at.windows_vnc||at!=null&&at.linux_vnc||at!=null&&at.virtual_machine?(xr(!1),Jr.tabIndex=-1,setTimeout(function(){_n({type:be.M,payload:-1})},400)):Kr||xr(!0)},[at]),Object(Xt.a)(function(){var Lr=new Date().getTime();It&&Pa&&In!==1&&Lr>Pa+as&&(localStorage.setItem("stat","newest"),Zt())},as);function Ir(Lr){Vt(Lr)}function ii(){_n({type:be.D,payload:!0})}function Fo(){_n({type:be.D,payload:!1})}function Wa(Lr){_n({type:be.C,payload:Lr}),Object(Xi.b)("cmFontSize",Lr)}function mo(Lr){_n({type:be.E,payload:Lr}),Object(Xi.b)("cmCodeMode",Lr)}function es(Lr){_n({type:be.w,payload:Lr}),Object(Xi.b)("cmTabToSpace",Lr)}function ts(){_n({type:be.U})}function hs(){_n({type:be.q})}function jo(Lr){return go.apply(this,arguments)}function go(){return go=Object(l.a)(f.a.mark(function Lr(pi){var va;return f.a.wrap(function(_a){for(;;)switch(_a.prev=_a.next){case 0:if(va=/\d/g.test(pi)?pi:pi.target.id,!(Br==0)){_a.next=5;break}if(!(It&&Pa&&In!==1)){_a.next=5;break}return _a.next=5,Zt();case 5:_n({type:be.M,payload:parseInt(va,10)}),va==0&&Gt({type:be.fb,payload:Date.now()}),Object(he.A)(ha.identifier),Ai===3&&setTimeout(function(){if(va<=0&&In!==1||!ji.length)return;Is(va)},500);case 9:case"end":return _a.stop()}},Lr)})),go.apply(this,arguments)}function ml(){var Lr=la.length;la[0]===3?la.push(2):la.push(Lr+2),console.log("sshTabs:",la),_n({type:be.L,payload:la})}function ns(Lr){Lr.stopPropagation(),Lr.preventDefault();var pi=parseInt(Lr.target.id,10);la.splice(pi,1),_n({type:be.L,payload:la});var va=1;la.length>0&&(va=la[0]),_n({type:be.M,payload:va})}function fs(){return Ai===3?Object(he.C)({myshixunId:ga.identifier,position:Br,game_id:ha.id}):Object(he.e)(ga.identifier)}function Vs(Lr){_n({type:be.M,payload:0}),rn(Lr)}function Ds(){_n({type:be.J,payload:null}),Is(Br)}Object(h.useEffect)(function(){In===1&&Ai>0&&_n({type:be.M,payload:1})},[In]),Object(h.useEffect)(function(){Br>0&&Is(Jr.tabIndex||1)},[Br]),Object(h.useEffect)(function(){wi&&Br>=1&&setTimeout(function(){xe.a.publish("create-socket",Br)},100)},[wi]),Object(h.useEffect)(function(){return function(){la.splice(0,8),_n({type:be.L,payload:la})}},[bn.location.pathname]),Object(h.useEffect)(function(){return function(){clearInterval(Sa.current)}},[]);var Mo=function(pi){var va,Xa,_a=pi.response,is=pi.position;if((_a==null||((va=_a.data)===null||va===void 0)?void 0:va.instance_status)=="running"){clearInterval(Sa.current);return}(_a==null||((Xa=_a.data)===null||Xa===void 0)?void 0:Xa.instance_status)=="creating"&&!Sa.current&&(Sa.current=setInterval(function(){Is(is)},1e3*3))};function Is(Lr){return ks.apply(this,arguments)}function ks(){return ks=Object(l.a)(f.a.mark(function Lr(pi){var va,Xa,_a,is,Na,$s,Es,el,ms,tl,_l,xs,Ms;return f.a.wrap(function(za){for(;;)switch(za.prev=za.next){case 0:if(!(Ai===3)){za.next=13;break}return za.next=3,Object(he.y)(ga.identifier,{position:pi});case 3:if(Na=za.sent,!(($s=Na.data)!==null&&$s!==void 0&&$s.instance_status&&((Es=Na.data)===null||Es===void 0?void 0:Es.instance_status)=="creating")){za.next=9;break}return Mo({response:Na,position:pi}),za.abrupt("return");case 9:clearInterval(Sa.current);case 10:((el=Na)===null||el===void 0?void 0:el.status)!==-3&&xe.a.publish("update-windows-time",{remaining_time:(ms=Na)===null||ms===void 0?void 0:ms.remainingTime}),za.next=16;break;case 13:return za.next=15,Object(he.x)(ga.identifier,{game_id:ha.id});case 15:Na=za.sent;case 16:if(!((va=Na)!==null&&va!==void 0&&(Xa=va.data)!==null&&Xa!==void 0&&(_a=Xa.data_list)!==null&&_a!==void 0&&_a.length)){za.next=19;break}return xe.a.publish("pod-restrict-data",{identifier:(tl=Na)===null||tl===void 0||((_l=tl.data)===null||_l===void 0)?void 0:_l.identifier,data_list:(xs=Na)===null||xs===void 0||((Ms=xs.data)===null||Ms===void 0)?void 0:Ms.data_list}),za.abrupt("return");case 19:if(!(((is=Na)===null||is===void 0?void 0:is.status)===-3)){za.next=21;break}return za.abrupt("return",new Promise(function(){var Ps=Object(l.a)(f.a.mark(function ws(Il,Hn){return f.a.wrap(function(Gn){for(;;)switch(Gn.prev=Gn.next){case 0:e.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 sr=Object(l.a)(f.a.mark(function dr(){var Gr;return f.a.wrap(function(Si){for(;;)switch(Si.prev=Si.next){case 0:return Si.next=2,Object(he.f)(vn.taskId,(Gr=Na)===null||Gr===void 0?void 0:Gr.message);case 2:return Is(),Si.abrupt("return");case 4:case"end":return Si.stop()}},dr)}));function Bn(){return sr.apply(this,arguments)}return Bn}()});case 1:case"end":return Gn.stop()}},ws)}));return function(ws,Il){return Ps.apply(this,arguments)}}()));case 21:Ai===3?(ji[pi-1]=Object(t.a)({},Na.data),_n({type:be.K,payload:Object(I.a)(ji)}),setTimeout(function(){return xe.a.publish("create-socket",pi)},300)):_n({type:be.J,payload:Na.data});case 22:case"end":return za.stop()}},Lr)})),ks.apply(this,arguments)}var ps=Lt?Lt!=="100%"?"".concat(Lt-54,"px"):Lt:Zr?"70%":"100%",Ys=Lt==="100%"?0:"calc(100% - 3px - 51px - ".concat(ps,")"),Qs=[];Ai&&Qs.push(1),vi&&Qs.concat(la);function Js(){fi(!Ma),Object(S.a)()?Object(S.b)():Object(S.d)(document.body)}var Ls=function(pi){var va,Xa;if(pi.target.localName!=="body"||(bn==null||((va=bn.location)===null||va===void 0||((Xa=va.query)===null||Xa===void 0))?void 0:Xa.isFullScreen)==="true")return;var _a=document.getElementById("task-left-panel"),is=_a.nextElementSibling;Object(S.a)()?(_a.classList.add("hide"),is.classList.add("hide"),fi(!0)):(fi(!1),_a.classList.remove("hide"),is.classList.remove("hide"))};Object(h.useEffect)(function(){return document.addEventListener(Object(S.c)(),Ls),function(){document.removeEventListener(Object(S.c)(),Ls)}},[]);var rs={content:da,language:Lo,filename:ho,file_type:$a,onCodeChange:Ir,theme:Ha,taskData:at,onSave:Zt,forbidCopy:Ii.forbid_copy,isEditPath:It,hide_code:In,code_edit_permission:Ii.code_edit_permission,monacoOptions:{fontSize:Ka,insertSpaces:xi,readOnly:!It&&!Ii.code_edit_permission}},Zs={loading:aa,lastedUpdateTime:Pa,moveY:Lt,code_hidden:!Ii.show_code_dir,hide_code:Ii.hide_code,gameStatus:ha.status,isEditPath:It,isNotice:_t,git_url:Co,taskData:at,onResetCode:mt,onResetGitCode:sn,onShowCodeSetting:ii,onResetPassedCode:hn,onShowNotice:Xn,onShowDir:wn,onResizeCodeArea:Sn,onRightFullHandler:Js,isResizeLarge:Ma},gl={isNotice:_t,moveY:Lt,tabIndex:Br,onShowNotice:Xn,onResizeCodeArea:Sn,webssh:Ai,socketKeys:Qs,sshConfigData:Jr.sshConfigData,onCloseSocket:fs,isActive:Br>=1,onReCreateSocket:Ds,shixun:Ii,onRightFullHandler:Js,isResizeLarge:Ma},vl={onFontSizeChange:Wa,cmFontSize:Ka,tabToSpace:xi,cmCodeMode:Ha,onCodeModeChange:mo,onTabToSpace:es,shixun:Ii},Xl=Object(h.useMemo)(function(){var Lr={width:or*102};return Br>2&&or>3&&(Lr.left=-(Br-2)*102),Lr},[Br]);console.log("sshConfigDataArr:",ji);var bs=function(){return u.a.createElement("div",{className:"unity-3d-container"},u.a.createElement(Ge,{taskData:at,unity_3d_routes:zn,onGetUnity3dMessage:An}))};return u.a.createElement(h.Fragment,null,Kr?bs():u.a.createElement("div",{className:ni.a["code-area-container"],ref:Ln,style:{height:ps}},u.a.createElement(u.a.Fragment,null,u.a.createElement("div",{className:ni.a.navs},u.a.createElement("ul",null,((at==null?void 0:at.vnc_url)||(at==null?void 0:at.windows_vnc)||(at==null?void 0:at.linux_vnc)||(at==null?void 0:at.virtual_machine))&&u.a.createElement("li",null,u.a.createElement("a",{id:-1,className:Br===-1?"".concat(ni.a.active," first"):"first",onClick:jo},"\u56FE\u5F62\u5316\u7A97\u53E3")),In!==1?u.a.createElement("li",{className:"flex-container",style:{position:"relative"}},u.a.createElement("a",{id:0,className:Br===0?"".concat(ni.a.active," first"):"first",onClick:jo},((it=at.challenge)===null||it===void 0?void 0:it.show_type)===8?"\u6587\u4EF6\u76EE\u5F55":"\u4EE3\u7801\u6587\u4EF6"),ao.length>=1?u.a.createElement("span",{onMouseOver:ts,className:sa?ni.a["arrow-down"]:ni.a["arrow-right"]}):null,u.a.createElement(La,{isVisible:sa,onHidePathList:hs,paths:ao,activePath:So,onChangePath:Vs})):null,!Ai||Ai===3?u.a.createElement("li",null):u.a.createElement("li",null,u.a.createElement("a",{className:Br===1?ni.a.active:"",onClick:jo,id:1},"\u547D\u4EE4\u884C")),Ai===3&&u.a.createElement("div",{className:ni.a["tasks-page-wrp"]},or>3&&u.a.createElement(Nt.a,{disabled:Br<=1,className:ni.a["tasks-prev-xterm"],onClick:function(){return jo(Br-1)}},u.a.createElement(Do.a,null)),u.a.createElement("ul",{style:Xl},new Array(or).fill("").map(function(Lr,pi){return u.a.createElement("li",null,u.a.createElement("a",{className:Br===pi+1?ni.a.active:"",onClick:jo,id:pi+1},"\u547D\u4EE4\u884C ",pi+1))})),or>3&&u.a.createElement(Nt.a,{disabled:Br>=or,className:ni.a["tasks-next-xterm"],onClick:function(){return jo(Br+1)}},u.a.createElement(Yo.a,null))),!!Ai&&vi?la.map(function(Lr,pi){return u.a.createElement("li",{key:Lr},u.a.createElement("a",{id:Lr,className:Br===Lr?ni.a.active:"",onClick:jo},"\u547D\u4EE4\u884C",pi+1,u.a.createElement("i",{title:"\u5173\u95ED\u547D\u4EE4\u884C\u7A97\u53E3",id:pi,className:"iconfont icon-shanchu_moren",onClick:ns})))}):null,!!Ai&&vi&&la.length<2?u.a.createElement("li",null,u.a.createElement("a",{onClick:ml,title:"\u65B0\u5F00\u547D\u4EE4\u884C\u7A97\u53E3"},"\uFF0B")):null),u.a.createElement("div",{className:ni.a["action-bar-container"],style:{display:Br===0?"flex":"none"}},u.a.createElement(ee,Object(s.a)({},Zs,{onUpdateCode:Zt}))),u.a.createElement("div",{className:ni.a["action-bar-container"],style:{display:Br>=1?"flex":"none"}},u.a.createElement(vr,gl)),u.a.createElement("div",{className:"tr",style:{marginLeft:"auto",marginRight:20}},((at==null?void 0:at.vnc_url)||(at==null?void 0:at.windows_vnc)||(at==null?void 0:at.virtual_machine)||(at==null?void 0:at.linux_vnc))&&u.a.createElement("span",{className:"c-white current ",onClick:Js,style:{display:Br===0?"none":"inline"}},u.a.createElement("span",{className:"iconfont icon-quanping mr5 font12"}),"\u5168\u5C4F / \u9000\u51FA\u5168\u5C4F"))),u.a.createElement("div",{style:{display:Br===-1?"flex":"none"}},u.a.createElement(hi,{taskData:at,evaluateMessage:Nn,language:Lo,evaluateLoading:On,onEval:bn.onEvalCode})),u.a.createElement("section",{style:{display:Br===0?"block":"none",height:"calc(100% - 40px)"}},((At=at.challenge)===null||At===void 0?void 0:At.show_type)===8&&u.a.createElement($i,{taskData:at}),((kt=at.challenge)===null||kt===void 0?void 0:kt.show_type)!==8&&u.a.createElement(sl,Object(s.a)({},rs,{onUpdateCode:Zt}))),!Ai||Ai===3?null:u.a.createElement("section",{style:{display:Br===1?"block":"none",height:"calc(100% - 40px)"}},u.a.createElement(js.a,{sshConfigData:wi||{},sid:1})),vi?la.map(function(Lr,pi){return u.a.createElement("section",{key:"ssh".concat(Lr),style:{display:Br===Lr?"block":"none",height:"calc(100% - 40px)"}},u.a.createElement(js.a,{sshConfigData:wi||{},sid:Lr}))}):null,Ai===3?new Array(or).fill("").map(function(Lr,pi){return u.a.createElement("section",{id:pi,key:"ssh".concat(pi+1),style:{display:Br===pi+1?"block":"none",height:"calc(100% - 40px)"}},u.a.createElement(js.a,{sshConfigData:ji[pi]||{},sid:pi+1}))}):null)),u.a.createElement("section",null),Zr&&u.a.createElement("div",{className:ni.a["resize-y-bar"],onMouseDown:St,draggable:!1},u.a.createElement("i",{className:"iconfont icon-guangbiao",draggable:!1})),Zr&&u.a.createElement("div",{className:ni.a["test-set-container"],style:{height:Ys}},On?u.a.createElement(je.a,{message:Nn,style:{color:"#0152d9"}}):u.a.createElement(ei,Object(s.a)({},Cr,{taskData:at}))),u.a.createElement("div",{className:ni.a["action-container"]},u.a.createElement(zo,Object(s.a)({onUpdateCode:Zt},at,{dispatch:Gt,loading:On,isU3d:zn&&!kn||(at==null||((vt=at.challenge)===null||vt===void 0)?void 0:vt.thiry_party),onRun:function(){ln(),xr(!0)}}))),u.a.createElement(fe.a,null,u.a.createElement(T.a,{className:ni.a["setting-drawer"],title:null,placement:"right",closable:!1,visible:oa,onClose:Fo},u.a.createElement(Mi,vl))))},Sl=b("zkdm"),Ks=b("Sa5k"),Cl=b.n(Ks),Ul=b("fWQN"),Tl=b("mtLc"),ul=0,cl=1,vs=3,os=9,Fl=10,As=11,Os=0,ss=2,_s=3,Io=4,ls=48,qo=function(){function we(){Object(Ul.a)(this,we)}return Object(Tl.a)(we,[{key:"_checkHeader",value:function(){var it=this.header;if(it.imageType===ul)throw Error("No data");if(it.hasColorMap){if(it.colorMapLength>256||it.colorMapDepth!==24||it.colorMapType!==1)throw Error("Invalid colormap for indexed type")}else if(it.colorMapType)throw Error("Why does the image contain a palette ?");if(!it.width||!it.height)throw Error("Invalid image size");if(it.pixelDepth!==8&&it.pixelDepth!==16&&it.pixelDepth!==24&&it.pixelDepth!==32)throw Error('Invalid pixel size "'+it.pixelDepth+'"')}},{key:"_decodeRLE",value:function(it,At,kt,vt){for(var at=new Uint8Array(vt),Lt=new Uint8Array(kt),Ct=0;Ct<vt;){var _t=it[At++],St=1+(127&_t);if(128&_t){for(var Gt=0;Gt<kt;++Gt)Lt[Gt]=it[At+Gt];At+=kt;for(var Ft=0;Ft<St;++Ft)at.set(Lt,Ct),Ct+=kt}else{St*=kt;for(var It=0;It<St;++It)at[Ct+It]=it[At+It];Ct+=St,At+=St}}return at}},{key:"_getImageData8bits",value:function(it,At,kt,vt,at,Lt,Ct,_t,St,Gt){for(var Ft=0,It=at;It!==Ct;It+=Lt)for(var Vt=_t;Vt!==Gt;Vt+=St,Ft++){var Zt=At[Ft];it[4*(Vt+vt*It)+3]=255,it[4*(Vt+vt*It)+2]=kt[3*Zt+0],it[4*(Vt+vt*It)+1]=kt[3*Zt+1],it[4*(Vt+vt*It)+0]=kt[3*Zt+2]}return it}},{key:"_getImageData16bits",value:function(it,At,kt,vt,at,Lt,Ct,_t,St,Gt){for(var Ft=0,It=at;It!==Ct;It+=Lt)for(var Vt=_t;Vt!==Gt;Vt+=St,Ft+=2){var Zt=At[Ft+0]|At[Ft+1]<<8;it[4*(Vt+vt*It)+0]=(31744&Zt)>>7,it[4*(Vt+vt*It)+1]=(992&Zt)>>2,it[4*(Vt+vt*It)+2]=(31&Zt)>>3,it[4*(Vt+vt*It)+3]=32768&Zt?0:255}return it}},{key:"_getImageData24bits",value:function(it,At,kt,vt,at,Lt,Ct,_t,St,Gt){for(var Ft=0,It=at;It!==Ct;It+=Lt)for(var Vt=_t;Vt!==Gt;Vt+=St,Ft+=3)it[4*(Vt+vt*It)+3]=255,it[4*(Vt+vt*It)+2]=At[Ft+0],it[4*(Vt+vt*It)+1]=At[Ft+1],it[4*(Vt+vt*It)+0]=At[Ft+2];return it}},{key:"_getImageData32bits",value:function(it,At,kt,vt,at,Lt,Ct,_t,St,Gt){for(var Ft=0,It=at;It!==Ct;It+=Lt)for(var Vt=_t;Vt!==Gt;Vt+=St,Ft+=4)it[4*(Vt+vt*It)+2]=At[Ft+0],it[4*(Vt+vt*It)+1]=At[Ft+1],it[4*(Vt+vt*It)+0]=At[Ft+2],it[4*(Vt+vt*It)+3]=At[Ft+3];return it}},{key:"_getImageDataGrey8bits",value:function(it,At,kt,vt,at,Lt,Ct,_t,St,Gt){for(var Ft=0,It=at;It!==Ct;It+=Lt)for(var Vt=_t;Vt!==Gt;Vt+=St,Ft++){var Zt=At[Ft];it[4*(Vt+vt*It)+0]=Zt,it[4*(Vt+vt*It)+1]=Zt,it[4*(Vt+vt*It)+2]=Zt,it[4*(Vt+vt*It)+3]=255}return it}},{key:"_getImageDataGrey16bits",value:function(it,At,kt,vt,at,Lt,Ct,_t,St,Gt){for(var Ft=0,It=at;It!==Ct;It+=Lt)for(var Vt=_t;Vt!==Gt;Vt+=St,Ft+=2)it[4*(Vt+vt*It)+0]=At[Ft+0],it[4*(Vt+vt*It)+1]=At[Ft+0],it[4*(Vt+vt*It)+2]=At[Ft+0],it[4*(Vt+vt*It)+3]=At[Ft+1];return it}},{key:"open",value:function(it,At){var kt=this,vt=new XMLHttpRequest;return new Promise(function(at,Lt){vt.responseType="arraybuffer",vt.open("GET",it,!0),vt.onload=function(){vt.status===200&&kt.load(new Uint8Array(vt.response),at),kt.imageSourceData=vt.response,At&&At()},vt.send(null)})}},{key:"load",value:function(it,At){var kt=0;if(it.length<18)throw Error("Not enough data to contain header");var vt={idLength:it[kt++],colorMapType:it[kt++],imageType:it[kt++],colorMapIndex:it[kt++]|it[kt++]<<8,colorMapLength:it[kt++]|it[kt++]<<8,colorMapDepth:it[kt++],offsetX:it[kt++]|it[kt++]<<8,offsetY:it[kt++]|it[kt++]<<8,width:it[kt++]|it[kt++]<<8,height:it[kt++]|it[kt++]<<8,pixelDepth:it[kt++],flags:it[kt++]};if(vt.hasEncoding=vt.imageType===os||vt.imageType===Fl||vt.imageType===As,vt.hasColorMap=vt.imageType===os||vt.imageType===cl,vt.isGreyColor=vt.imageType===As||vt.imageType===vs,this.header=vt,this._checkHeader(),(kt+=vt.idLength)>=it.length)throw Error("No data");if(vt.hasColorMap){var at=vt.colorMapLength*(vt.colorMapDepth>>3);this.palette=it.subarray(kt,kt+at),kt+=at}var Lt=vt.pixelDepth>>3,Ct=vt.width*vt.height,_t=Ct*Lt;vt.hasEncoding?this.imageData=this._decodeRLE(it,kt,Lt,_t):this.imageData=it.subarray(kt,kt+(vt.hasColorMap?Ct:_t)),At(this)}},{key:"getImageData",value:function(it){var At=this.header,kt=At.width,vt=At.height,at=At.flags,Lt=At.pixelDepth,Ct=At.isGreyColor,_t=(at&ls)>>Io,St,Gt,Ft,It,Vt,Zt,on;switch(it||(it=document?document.createElement("canvas").getContext("2d").createImageData(kt,vt):{width:kt,height:vt,data:new Uint8ClampedArray(kt*vt*4)}),_t===ss||_t===_s?(It=0,Vt=1,Zt=vt):(It=vt-1,Vt=-1,Zt=-1),_t===ss||_t===Os?(St=0,Gt=1,Ft=kt):(St=kt-1,Gt=-1,Ft=-1),Lt){case 8:on=Ct?this._getImageDataGrey8bits:this._getImageData8bits;break;case 16:on=Ct?this._getImageDataGrey16bits:this._getImageData16bits;break;case 24:on=this._getImageData24bits;break;case 32:on=this._getImageData32bits}return on.call(this,it.data,this.imageData,this.palette,kt,It,Vt,Zt,St,Gt,Ft),it}},{key:"getCanvas",value:function(){var it=this.header,At=it.width,kt=it.height,vt=document.createElement("canvas"),at=vt.getContext("2d"),Lt=at.createImageData(At,kt);return vt.width=At,vt.height=kt,at.putImageData(this.getImageData(Lt),0,0),vt}},{key:"getDataURL",value:function(it){return this.getCanvas().toDataURL(it||"image/png")}}]),we}(),us=function(we){var qe=we.list,it=we.title,At=we.direction,kt=qe.length,vt=Object(h.useState)([]),at=Object(r.a)(vt,2),Lt=at[0],Ct=at[1],_t=function(){var St=Object(l.a)(f.a.mark(function Gt(){var Ft,It,Vt,Zt;return f.a.wrap(function(ln){for(;;)switch(ln.prev=ln.next){case 0:Ft=[],It=0;case 2:if(!(It<qe.length)){ln.next=13;break}if(Vt=qe[It],!(Vt.pic_url.indexOf(".tga")>-1)){ln.next=9;break}return Zt=new qo,ln.next=8,Zt.open(Vt.pic_url);case 8:Vt.pic_url=Zt.getDataURL();case 9:Ft.push(Vt);case 10:It++,ln.next=2;break;case 13:Ct([].concat(Ft));case 14:case"end":return ln.stop()}},Gt)}));return function(){return St.apply(this,arguments)}}();return Object(h.useEffect)(function(){_t()},[qe]),u.a.createElement("div",{className:"img-list ".concat(At?"":"direction")},u.a.createElement("h4",null,it),u.a.createElement("div",{className:"list-body",style:{padding:"40px 0px"}},kt>0?Lt.map(function(St,Gt){return u.a.createElement("img",{onClick:function(){xe.a.publish("preview-image","".concat(yt.a).concat(St.pic_url))},className:kt===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:it})}):u.a.createElement(h.Fragment,null,u.a.createElement("img",{alt:"\u7A7A",className:"nothing",src:Cl.a}),u.a.createElement("img",{alt:"\u7A7A",className:"nothing",src:Cl.a}))))},ys=b("1A8V"),Hs=function(we){var qe=we.url,it=we.poster;return u.a.createElement("div",{className:"video-container"},u.a.createElement("video",{controls:!0,autoPlay:!0,src:qe,preload:"auto",poster:it||""},u.a.createElement("source",{type:"video/webm",src:qe}),u.a.createElement("source",{type:"video/mp4",src:qe})))},Al=b("XZCF"),Ws=function(we){var qe=we.url;return u.a.createElement("div",{className:"video-container"},u.a.createElement("audio",{style:{width:"100%"},controls:!0,src:qe}," ","Your browser does not support the ",u.a.createElement("code",null,"audio")," element."," "))},dl=function(we){var qe=we.files,it=we.type;return u.a.createElement("ul",{className:"video-list"},qe.map(function(At,kt){return u.a.createElement("li",{key:kt},it==="mp4"?u.a.createElement(Hs,{url:At.file_url}):u.a.createElement(Ws,{url:At.file_url}))}))},$o=function(we){var qe=we.value;return u.a.createElement("img",{src:"data:image/png;base64,".concat(qe),alt:"qrcode"})};function cs(we){var qe=we.documentElement,it=we.body,At=Math.max(qe.clientHeight,qe.scrollHeight,qe.offsetHeight,it?it.clientHeight:0,it?it.scrollHeight:0,500);return At}function Ol(we){var qe=we.contentDocument?we.contentDocument:we.contentWindow.document;we.style.visibility="hidden",we.style.height="10px",we.style.height=cs(qe)+4+"px",we.style.visibility="visible"}var jl=function(we){var qe=we.taskId,it=we.onHidePictureView,At=Object(h.useState)({}),kt=Object(r.a)(At,2),vt=kt[0],at=kt[1],Lt=Object(h.useState)(),Ct=Object(r.a)(Lt,2),_t=Ct[0],St=Ct[1],Gt=Object(h.useRef)(),Ft=Object(h.useRef)(),It=Object(h.useRef)(),Vt=Object(h.useState)(!0),Zt=Object(r.a)(Vt,2),on=Zt[0],ln=Zt[1];Object(h.useEffect)(function(){var gn=vt.type,An=vt.iframe_src;gn==="html"&&An&&Ft.current&&(Ft.current.contentWindow.document.write(An),Ft.current.contentWindow.document.close(),setTimeout(function(){Ol(Ft.current)},100))},[vt,Ft.current]),Object(h.useEffect)(function(){function gn(){return An.apply(this,arguments)}function An(){return An=Object(l.a)(f.a.mark(function zn(){var kn,bn,vn,Ln,Qn,Sr;return f.a.wrap(function(_n){for(;;)switch(_n.prev=_n.next){case 0:return _n.next=2,Object(he.l)(qe);case 2:if(kn=_n.sent,at(kn),!((kn==null?void 0:kn.type)=="verilog")){_n.next=12;break}return _n.next=7,Object(st.a)(kn==null||((bn=kn.user_file)===null||bn===void 0||((vn=bn[0])===null||vn===void 0))?void 0:vn.file_url,{method:"get",headers:{"Content-Type":"application/json"}});case 7:Ln=_n.sent,Qn=new TextDecoder("utf-8"),Sr=new Uint8Array(Ln),Gt.current=JSON.parse(Qn.decode(Sr)),St(JSON.parse(Qn.decode(Sr)));case 12:case"end":return _n.stop()}},zn)})),An.apply(this,arguments)}gn()},[qe]),Object(h.useEffect)(function(){On()},[_t]);var On=function(){if(Gt.current&&Gt.current!=""){var An;(An=It.current.contentWindow)===null||An===void 0||An.postMessage({data:Gt.current},"*")}},Nn=vt.type,Sn=vt.orignal_picture,wn=vt.user_picture,rn=vt.answer_picture,Xn=vt.contents,mt=vt.user_file,sn=vt.message,hn=vt.qrcode_str;return u.a.createElement(h.Fragment,null,Nn?null:u.a.createElement(je.a,{message:sn||"\u52A0\u8F7D\u4E2D..."}),u.a.createElement("div",{className:"eval-picture-panel"},u.a.createElement("div",{className:"picture-body"},u.a.createElement("h3",null,u.a.createElement("div",null,u.a.createElement("div",null,"\u67E5\u770B\u6548\u679C"),Nn==="image"&&u.a.createElement("div",{onClick:function(){return ln(!on)},className:"direction"},u.a.createElement("span",{style:{marginRight:8,display:"inline-block"}},u.a.createElement("i",{className:"iconfont ".concat(on?"icon-zongxiang":"icon-hengxiang")})),u.a.createElement("span",null,"\u5207\u6362\u4E3A",on?"\u7EB5":"\u6A2A","\u5411\u5BF9\u6BD4"))),u.a.createElement("div",null,u.a.createElement("a",{onClick:it},u.a.createElement("i",{className:"iconfont icon-shanchu2"})))),Nn==="verilog"&&u.a.createElement("iframe",{onLoad:On,ref:It,src:"/react/build/js/iverilog/index.html",className:"iverilogFrame"}),Nn==="image"?u.a.createElement("div",{className:"flex-container",style:{flexDirection:on?"unset":"column"}},Sn.length>0?u.a.createElement(us,{list:Sn,title:"\u539F\u59CB\u56FE\u7247",direction:on}):null,rn.length>0?u.a.createElement(us,{list:rn,title:"\u9884\u671F\u8F93\u51FA",direction:on}):null,wn.length>0?u.a.createElement(us,{list:wn,title:"\u5B9E\u9645\u8F93\u51FA",direction:on}):null):u.a.createElement(h.Fragment,null,u.a.createElement("h2",null,"\u5B9E\u9645\u8F93\u51FA"),u.a.createElement("div",{className:"output-txt ".concat(Nn==="html"?"html":"")},Nn==="html"?u.a.createElement("iframe",{ref:Ft,style:{width:"100%",height:"100%",border:"1px solid #ccc"}}):Nn=="mp4"||Nn=="mp3"?u.a.createElement(dl,{files:mt,type:Nn}):Nn==="qrcode"?u.a.createElement($o,{value:hn}):u.a.createElement("div",{style:{overflow:"auto",height:"100%"}},u.a.createElement(ae.a,{value:Xn})))))))},hl,fl,pl=(hl=Object(Ce.I)())!==null&&hl!==void 0&&hl.homework_common_id?{homework_common_id:(fl=Object(Ce.I)())===null||fl===void 0?void 0:fl.homework_common_id}:{};function Bl(we,qe){return Object(st.c)("/tasks/".concat(we,"/system_update.json?myshixun_id=").concat(qe))}function uo(we){return Object(st.c)("/tasks/".concat(we,"/sync_codes.json"),pl)}function ia(we){return Object(st.c)("/tasks/".concat(we,"/sync_modify_time"))}var qa=function(we){var qe=we.showNotice,it=we.tpm_cases_modified,At=we.tpm_modified,kt=we.tpm_script_modified,vt=we.st,at=we.taskId,Lt=we.myshixunId,Ct=we.onNextCallback,_t=we.onUpdateCallback,St=we.onUpdateFailure,Gt=(At||kt)&&vt===0,Ft=Object(h.useState)(!1),It=Object(r.a)(Ft,2),Vt=It[0],Zt=It[1];function on(){return ln.apply(this,arguments)}function ln(){return ln=Object(l.a)(f.a.mark(function Sn(){var wn,rn,Xn,mt;return f.a.wrap(function(hn){for(;;)switch(hn.prev=hn.next){case 0:if(!Vt){hn.next=2;break}return hn.abrupt("return");case 2:if(Zt(!0),!Gt){hn.next=21;break}return hn.next=6,uo(at);case 6:if(wn=hn.sent,rn=wn.path,Xn=wn.status,mt=wn.message,!(Xn===-1)){hn.next=14;break}n.b.info(mt||"\u66F4\u65B0\u5931\u8D25\uFF0C\u670D\u52A1\u7AEF\u9519\u8BEF"),St(),hn.next=19;break;case 14:if(n.b.info("\u66F4\u65B0\u6210\u529F\uFF0C\u6B63\u5728\u4E3A\u60A8\u91CD\u65B0\u52A0\u8F7D\u4EE3\u7801..."),!it){hn.next=18;break}return hn.next=18,ia(at);case 18:_t(rn,new Date().getTime());case 19:hn.next=25;break;case 21:return hn.next=23,ia(at);case 23:n.b.info("\u66F4\u65B0\u72B6\u6001\u5DF2\u540C\u6B65\u3002"),Ct();case 25:Zt(!1);case 26:case"end":return hn.stop()}},Sn)})),ln.apply(this,arguments)}function On(){return Nn.apply(this,arguments)}function Nn(){return Nn=Object(l.a)(f.a.mark(function Sn(){return f.a.wrap(function(rn){for(;;)switch(rn.prev=rn.next){case 0:if(!Vt){rn.next=2;break}return rn.abrupt("return");case 2:if(Zt(!0),!Gt){rn.next=11;break}return rn.next=6,Bl(at,Lt);case 6:if(!it){rn.next=9;break}return rn.next=9,ia(at);case 9:rn.next=13;break;case 11:return rn.next=13,ia(at);case 13:Zt(!1),Ct();case 15:case"end":return rn.stop()}},Sn)})),Nn.apply(this,arguments)}return u.a.createElement(e.a,{centered:!0,title:"\u66F4\u65B0\u901A\u77E5",closable:!1,confirmLoading:Vt,visible:qe,onOk:on,onCancel:On,okText:Gt?"\u7ACB\u5373\u66F4\u65B0":"\u77E5\u9053\u4E86",cancelText:"\u7A0D\u540E\u518D\u8BF4"},it&&Gt?u.a.createElement(h.Fragment,null,u.a.createElement("p",null," \u5173\u5361\u4EFB\u52A1\u7684\u4EE3\u7801\u6587\u4EF6\u548C\u6D4B\u8BD5\u96C6\u6709\u66F4\u65B0\u5566~"),u.a.createElement("p",null,"\u66F4\u65B0\u64CD\u4F5C\u5C06\u4FDD\u7559\u5DF2\u5B8C\u6210\u7684\u8BC4\u6D4B\u8BB0\u5F55\u548C\u6210\u7EE9\u3002"),u.a.createElement("p",null,"\u8FD8\u672A\u5B8C\u6210\u8BC4\u6D4B\u7684\u4EFB\u52A1\u4EE3\u7801\uFF0C\u8BF7\u81EA\u884C\u4FDD\u5B58\uFF01")):it?u.a.createElement(h.Fragment,null,u.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"),u.a.createElement("p",null,"\u672C\u6B21\u66F4\u65B0\u4E0D\u5F71\u54CD\u5DF2\u83B7\u5F97\u7684\u7ECF\u9A8C\u503C\u3002")):u.a.createElement("p",null,"\u5173\u5361\u4EFB\u52A1\u7684\u4EE3\u7801\u6587\u4EF6\u6709\u66F4\u65B0\u5566~",u.a.createElement("br",null)," \u66F4\u65B0\u64CD\u4F5C\u5C06\u4FDD\u7559\u5DF2\u5B8C\u6210\u7684\u8BC4\u6D4B\u8BB0\u5F55\u548C\u6210\u7EE9\u3002",u.a.createElement("br",null),"\u8FD8\u672A\u5B8C\u6210\u8BC4\u6D4B\u7684\u4EFB\u52A1\u4EE3\u7801\uFF0C\u8BF7\u81EA\u884C\u4FDD\u5B58\uFF01"))},wa=b("IWh4"),Rs=b.n(wa),Kl=b("iNZB"),ko=b.n(Kl),Hl=function(we){var qe=we.prev_game,it=we.next_game,At=we.shixun,kt=we.game,vt=it&&(kt.status===2||At.status<2||At.task_pass),at=Object(E.h)();return u.a.createElement("div",{className:"unity-3d-nav"},qe?u.a.createElement("a",{href:"/tasks/".concat(qe).concat(at.search),className:"ghost-link"},"\u4E0A\u4E00\u5173"):null,vt?u.a.createElement("a",{href:"/tasks/".concat(it).concat(at.search),className:"ghost-link"},"\u4E0B\u4E00\u5173"):null,u.a.createElement(zo,{next_game:it,prev_game:qe,shixun:At,game:kt}))},Rl=c.a.DirectoryTree,Wl=["jpg","png","gif","jpeg","jar","doc","pdf","xsl","ppt","mp3","mp4"],ds={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 Xs(we,qe){switch(qe.type){case be.u:return Object(t.a)(Object(t.a)({},we),{},{moveX:qe.payload});case be.v:return Object(t.a)(Object(t.a)({},we),{},{moveY:qe.payload});case be.W:return Object(t.a)(Object(t.a)({},we),{},{codeRepData:qe.payload});case be.h:return Object(t.a)(Object(t.a)({},we),{},{codeRepData:qe.payload});case be.d:return Object(t.a)(Object(t.a)({},we),{},{codeRepData:Object(t.a)(Object(t.a)({},we.codeRepData),qe.payload)});case be.S:return Object(t.a)(Object(t.a)({},we),{},{evaluateLoading:!1,showEvalResult:!0});case be.fb:return Object(t.a)(Object(t.a)({},we),{},{timestamp:qe.payload});case be.o:return Object(t.a)(Object(t.a)({},we),{},{showEvalResult:!1});case be.j:return Object(t.a)(Object(t.a)({},we),{},{loading:!0});case be.eb:return Object(t.a)(Object(t.a)({},we),qe.payload);case be.cb:return Object(t.a)(Object(t.a)({},we),{},{showDragMask:qe.payload});case be.i:return Object(t.a)(Object(t.a)({},we),{},{loading:!1,isError:!0});case be.k:return Object(t.a)(Object(t.a)({},we),qe.payload);case be.R:return Object(t.a)(Object(t.a)({},we),{},{evaluateLoading:!0});case be.n:return Object(t.a)(Object(t.a)({},we),{},{evaluateLoading:!1});case be.F:return Object(t.a)(Object(t.a)({},we),{},{evaluateMessage:qe.payload});case be.I:return Object(t.a)(Object(t.a)({},we),{},{showDocuments:qe.payload});case be.G:return Object(t.a)(Object(t.a)({},we),qe.payload);case be.T:return Object(t.a)(Object(t.a)({},we),{},{showNotice:!0});case be.p:return Object(t.a)(Object(t.a)({},we),{},{showNotice:!1});case be.r:return Object(t.a)(Object(t.a)({},we),{},{showPictureView:!1});case be.V:return Object(t.a)(Object(t.a)({},we),{},{showPictureView:!0});case be.O:return Object(t.a)(Object(t.a)({},we),{},{resetVncLoading:qe.payload});default:throw new Error}}var zs=H.default=function(we){var qe,it=we.match,At=we.history,kt=Object(i.a)(we,["match","history"]);console.log("props:",kt);var vt=Object(E.i)(),at=Object(E.h)().query,Lt=Object(h.useReducer)(Xs,ds),Ct=Object(r.a)(Lt,2),_t=Ct[0],St=Ct[1],Gt=Object(h.useState)(vt.taskId),Ft=Object(r.a)(Gt,2),It=Ft[0],Vt=Ft[1],Zt=Object(h.useRef)(),on=Object(h.useRef)(),ln=Object(h.useRef)(),On=Object(h.useState)(!1),Nn=Object(r.a)(On,2),Sn=Nn[0],wn=Nn[1],rn=At.location;Object(h.useEffect)(function(){console.log("_params:",vt),Vt(vt.taskId)},[vt]);var Xn=_t.moveX,mt=_t.taskData,sn=_t.moveY,hn=_t.evalData,gn=_t.showEvalResult,An=_t.codeRepData,zn=_t.loading,kn=_t.evaluateLoading,bn=_t.evaluateMessage,vn=_t.showDocuments,Ln=_t.repos,Qn=_t.showPictureView,Sr=_t.showNotice,Jr=_t.webDisplayUrl,_n=_t.isPictureView,Er=_t.resetVncLoading,Ei=_t.timestamp,Zr=_t.lastedGetTaskInfoTime,xr=_t.showDragMask,Fr=mt.st,Dn=mt.challenge,kr=mt.shixun,Pi=mt.is_teacher,Di=mt.game,co=mt.has_answer,Ma=mt.vnc_url,fi=mt.git_url,Sa=mt.user,aa=mt.myshixun,da=mt.discusses_count,Lo=mt.user_praise,ho=mt.praise_count,$a=mt.tpm_cases_modified,Pa=mt.tpm_modified,ao=mt.tpm_script_modified,So=mt.mirror_name,Ka=mt.mirror_description,Ha=mt.tomcat_url,oa=mt.unity_3d_routes,sa=mt.with_code_file,Br=mt.unity_3d_result,la=mt.next_game,xi=mt.prev_game,wi=An.currentPath,ji=An.paths,Ii=An.content,ua=An.language,Oa=An.lastedUpdateTime,fo=(Pa||ao)&&Fr===0,eo=($a||fo)&&aa.system_tip===!0,ha=(So||[]).indexOf("Html")!==-1,Co=Object(h.useMemo)(function(){return wi&&ji?ji.indexOf(wi)>=0:!1},[wi,ji]),ga=Object(h.useMemo)(function(){return oa&&!sa||(Dn==null?void 0:Dn.thiry_party)||Ma},[Ma,sa,oa]);Object(h.useEffect)(function(){if(oa&&sa){St({type:be.R});var Hn=xe.a.subscribe("unity3d-load-end",function(){St({type:be.n})});return Hn}},[It,oa,Dn==null?void 0:Dn.thiry_party,sa,St]);function po(Hn){return fa.apply(this,arguments)}function fa(){return fa=Object(l.a)(f.a.mark(function Hn(Wn){var Gn,sr,Bn,dr,Gr,Or;return f.a.wrap(function(mr){for(;;)switch(mr.prev=mr.next){case 0:return mr.prev=0,mr.next=3,Object(he.n)(It);case 3:if(Gn=mr.sent,sr=Gn.status,!(sr===401)){mr.next=9;break}return mr.abrupt("return");case 9:if(!(sr===-3)){mr.next=13;break}Object(Ce.q)({onCancel:function(){window.location.href="/"}}),mr.next=26;break;case 13:if(!(sr===403)){mr.next=17;break}At.replace("/403"),mr.next=26;break;case 17:if(!(sr===404)){mr.next=22;break}return At.replace("/404"),mr.abrupt("return");case 22:Bn=Gn.st,dr=Gn.challenge.path,Gr={loading:!1,isError:!1,taskData:Gn,lastedGetTaskInfoTime:new Date().getTime(),codeRepData:An},Bn===0&&dr&&(Or=dr.split("\uFF1B").filter(function(Ci){return!!Ci}),Gr.codeRepData.currentPath=Or[0],Gr.codeRepData.paths=Or,Gr.codeRepData.lastedUpdateTime=0),Wn||St({type:be.k,payload:Gr});case 26:mr.next=32;break;case 28:mr.prev=28,mr.t0=mr.catch(0),console.log(mr.t0),Wn||St({type:be.i});case 32:case"end":return mr.stop()}},Hn,null,[[0,28]])})),fa.apply(this,arguments)}Object(h.useEffect)(function(){var Hn=!1;return po(Hn),function(){Hn=!0}},[St,It]),Object(h.useEffect)(function(){var Hn=!1;function Wn(){return Gn.apply(this,arguments)}function Gn(){return Gn=Object(l.a)(f.a.mark(function sr(){var Bn,dr,Gr,Or,Si,mr;return f.a.wrap(function(to){for(;;)switch(to.prev=to.next){case 0:if(St({type:be.W,payload:Object(t.a)(Object(t.a)({},An),{},{loading:!0})}),!(oa&&!sa||Dn!=null&&Dn.thiry_party)){to.next=3;break}return to.abrupt("return");case 3:return to.next=5,Object(he.j)(It,{path:wi});case 5:if(Bn=to.sent,!Hn)if(Bn.status===0)n.b.info(Bn.message),St({type:be.h,payload:Object(t.a)(Object(t.a)({},An),{},{loading:!1})});else{try{(Bn==null?void 0:Bn.file_type)==="txt"?dr=((Gr=dr)===null||Gr===void 0?void 0:Gr.length)===0?dr:window.decodeURIComponent(escape(window.atob(Bn==null||((Or=Bn.content)===null||Or===void 0)?void 0:Or.content))):dr=Bn==null||((Si=Bn.content)===null||Si===void 0)?void 0:Si.content}catch(gs){dr=window.atob(Bn==null||((mr=Bn.content)===null||mr===void 0)?void 0:mr.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(t.a)(Object(t.a)({},An),{},{content:dr,language:Bn.language,file_type:Bn.file_type,filename:Bn.filename,lastedUpdateTime:0,loading:!1})})}case 7:case"end":return to.stop()}},sr)})),Gn.apply(this,arguments)}if(Fr===0&&wi&&kr.hide_code!==1)return Wn(),function(){Hn=!0}},[Fr,wi,Zr,Ei]);var Ai=function(){var Hn=Object(l.a)(f.a.mark(function Wn(){var Gn,sr,Bn,dr=arguments;return f.a.wrap(function(Or){for(;;)switch(Or.prev=Or.next){case 0:if(Gn=dr.length>0&&dr[0]!==void 0?dr[0]:0,console.log("lastedUpdateTime:",Co,Gn),!(Fr===0&&Oa>0&&Co||Gn)){Or.next=10;break}return sr=localStorage.getItem("stat")?{stat:"newest"}:{},localStorage.removeItem("stat"),Or.next=7,Object(he.L)(aa.identifier,Object(t.a)({path:wi,evaluate:Gn,content:Ii,game_id:Di.id},sr));case 7:return Bn=Or.sent,St({type:be.d,payload:{lastedUpdateTime:0}}),Or.abrupt("return",Bn);case 10:return Or.abrupt("return",!0);case 11:case"end":return Or.stop()}},Wn)}));return function(){return Hn.apply(this,arguments)}}(),vi=Object(h.useCallback)(function(){Di&&(Di.status!==2&&xe.a.publish("update-cost-time"));try{if(aa!=null&&aa.identifier){var Hn={path:wi,evaluate:0,content:Ii,game_id:Di.id,stat:"newest"},Wn={type:"application/json"},Gn=new Blob([JSON.stringify(Hn)],Wn);window.navigator.sendBeacon("".concat(Da.a.API_SERVER,"/api/myshixuns/").concat(aa==null?void 0:aa.identifier,"/update_file.json"),Gn)}}catch(sr){}Ai()},[Di.status,Ai]);Object(h.useEffect)(function(){vi()},[rn]);function In(){vi()}Object(h.useEffect)(function(){var Hn=xe.a.subscribe("unlock-test-case",function(){var Wn;e.a.confirm((Wn={centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:u.a.createElement(Dl,{score:Dn.score,is_teacher:Pi})},Object(_.a)(Wn,"centered",!0),Object(_.a)(Wn,"onOk",or),Wn))});return Hn},[or,Dn,Pi]);var or=Object(h.useCallback)(Object(l.a)(f.a.mark(function Hn(){var Wn,Gn,sr,Bn,dr;return f.a.wrap(function(Or){for(;;)switch(Or.prev=Or.next){case 0:return Or.next=2,Object(he.K)(Di.identifier);case 2:if(Wn=Or.sent,Gn=Wn.test_sets,sr=Wn.message,Bn=Wn.status,!(Bn===-1)){Or.next=7;break}return n.b.info(sr),Or.abrupt("return");case 7:dr=mt.user.grade,mt.user.grade=dr-Dn.score*2,mt.test_sets=Gn,mt.game.test_sets_view=!0,St({type:be.eb,payload:{taskData:mt}});case 12:case"end":return Or.stop()}},Hn)})),[Di,Dn,St]);function Cr(Hn){for(var Wn=document.getElementsByTagName("iframe"),Gn=0;Gn<Wn.length;Gn++)Wn[Gn].style["pointer-events"]=Hn}Object(h.useEffect)(function(){if(!ga||Ma){function Hn(Gn){Zt.current&&St({type:be.u,payload:Gn.pageX}),on.current&&(Cr("none"),St({type:be.v,payload:Gn.pageY}))}function Wn(){Cr("auto"),Zt.current=!1,on.current=!1,St({type:be.cb,payload:!1}),document.onselectstart=null}return document.addEventListener("mousemove",Hn),document.addEventListener("mouseup",Wn),function(){document.removeEventListener("mousemove",Hn),document.removeEventListener("mouseup",Wn)}}},[on.current,Zt.current,ga,St]);function Kr(Hn){var Wn=mt.user.grade;mt.user.grade=Wn-Hn,St({type:be.eb,payload:{taskData:mt}})}ln.current=function(){_t.moveX=_t.moveX!==.01?.01:"40%",St({type:be.u,payload:_t.moveX})};function Ir(){ga?ln.current():(document.onselectstart=function(){return!1},Zt.current=!0,St({type:be.cb,payload:!0}))}function ii(){document.onselectstart=function(){return!1},on.current=!0,(mt!=null&&mt.vnc_url||mt!=null&&mt.windows_vnc||mt!=null&&mt.linux_vnc||mt!=null&&mt.virtual_machine||(kr==null?void 0:kr.hide_code)===2)&&St({type:be.cb,payload:!0})}function Fo(Hn){Hn===.01?St({type:be.v,payload:0}):St({type:be.v,payload:.01})}function Wa(Hn){Hn===0?St({type:be.v,payload:"100%"}):St({type:be.v,payload:0})}Object(h.useEffect)(function(){return window.addEventListener("beforeunload",vi),function(){window.removeEventListener("beforeunload",vi)}},[vi]),Object(h.useEffect)(function(){var Hn=xe.a.subscribe("vnc-enlarge",function(){ln.current()});return Hn},[]);function mo(){Ai()}function es(){return ts.apply(this,arguments)}function ts(){return ts=Object(l.a)(f.a.mark(function Hn(){var Wn,Gn,sr;return f.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:return dr.next=2,Object(he.G)(It,{path:wi});case 2:Wn=dr.sent,Gn=Wn.content,sr=Wn.language,St({type:be.h,payload:Object(t.a)(Object(t.a)({},An),{},{content:Gn,language:sr,lastedUpdateTime:0,loading:!1})});case 5:case"end":return dr.stop()}},Hn)})),ts.apply(this,arguments)}function hs(){return jo.apply(this,arguments)}function jo(){return jo=Object(l.a)(f.a.mark(function Hn(){var Wn,Gn;return f.a.wrap(function(Bn){for(;;)switch(Bn.prev=Bn.next){case 0:return Bn.next=2,Object(he.B)(mt==null||((Wn=mt.myshixun)===null||Wn===void 0)?void 0:Wn.identifier,{});case 2:return Gn=Bn.sent,po(),Bn.abrupt("return",Gn);case 5:case"end":return Bn.stop()}},Hn)})),jo.apply(this,arguments)}function go(){return ml.apply(this,arguments)}function ml(){return ml=Object(l.a)(f.a.mark(function Hn(){var Wn,Gn,sr;return f.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:return dr.next=2,Object(he.D)(It,{path:wi});case 2:Wn=dr.sent,Gn=Wn.content,sr=Wn.language,St({type:be.h,payload:Object(t.a)(Object(t.a)({},An),{},{content:Gn,language:sr,lastedUpdateTime:0,loading:!1})});case 5:case"end":return dr.stop()}},Hn)})),ml.apply(this,arguments)}Object(h.useEffect)(function(){if(Fr===0&&Dn&&Dn.path){var Hn=Dn.path.split("\uFF1B").filter(function(Wn){return!!Wn});St({type:be.d,payload:{currentPath:Hn[0],paths:Hn}})}},[Dn,Fr]),Object(h.useEffect)(function(){kr&&Object(Ce.X)(kr.name||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199")},[kr]);function ns(){return fs.apply(this,arguments)}function fs(){return fs=Object(l.a)(f.a.mark(function Hn(){var Wn,Gn,sr;return f.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:return dr.next=2,Object(he.z)(It);case 2:Wn=dr.sent,Gn=Wn.praise_count,sr=Wn.praise,mt.praise_count=Gn,mt.user_praise=sr,St({type:be.eb,payload:{taskData:mt}});case 7:case"end":return dr.stop()}},Hn)})),fs.apply(this,arguments)}var Vs=Object(h.useCallback)(function(Hn){function Wn(sr){return Gn.apply(this,arguments)}function Gn(){return Gn=Object(l.a)(f.a.mark(function sr(Bn){return f.a.wrap(function(Gr){for(;;)switch(Gr.prev=Gr.next){case 0:try{window.navigator.sendBeacon("".concat(Da.a.API_SERVER,"/api/tasks/").concat(It,"/cost_time.json?time=").concat(Bn),{})}catch(Or){}case 1:case"end":return Gr.stop()}},sr)})),Gn.apply(this,arguments)}Wn(Hn)},[It]);function Ds(Hn){return Mo.apply(this,arguments)}function Mo(){return Mo=Object(l.a)(f.a.mark(function Hn(Wn){return f.a.wrap(function(sr){for(;;)switch(sr.prev=sr.next){case 0:return sr.next=2,Object(he.H)(It,kr.id,Wn);case 2:mt.game.star=Wn,St({type:be.eb,payload:{taskData:mt}});case 4:case"end":return sr.stop()}},Hn)})),Mo.apply(this,arguments)}function Is(){return ks.apply(this,arguments)}function ks(){return ks=Object(l.a)(f.a.mark(function Hn(){var Wn,Gn;return f.a.wrap(function(Bn){for(;;)switch(Bn.prev=Bn.next){case 0:if(Ln){Bn.next=8;break}return Bn.next=3,Object(he.m)(aa.identifier);case 3:Wn=Bn.sent,Gn=Wn.trees,St({type:be.G,payload:{showDocuments:!0,repos:Object(yt.c)(Gn)}}),Bn.next=9;break;case 8:St({type:be.I,payload:!0});case 9:case"end":return Bn.stop()}},Hn)})),ks.apply(this,arguments)}function ps(Hn){return Ys.apply(this,arguments)}function Ys(){return Ys=Object(l.a)(f.a.mark(function Hn(Wn){var Gn,sr,Bn;return f.a.wrap(function(Gr){for(;;)switch(Gr.prev=Gr.next){case 0:return Gn=Wn.props,sr=Gn.children,Bn=Gn.eventKey,Gr.abrupt("return",new Promise(function(){var Or=Object(l.a)(f.a.mark(function Si(mr){var Ci,to,gs;return f.a.wrap(function(Bo){for(;;)switch(Bo.prev=Bo.next){case 0:return sr&&sr.length>0&&mr(),Bo.next=3,Object(he.m)(aa.identifier,{path:Bn});case 3:Ci=Bo.sent,to=Ci.trees,gs=Object(yt.e)(Ln,Bn,Object(yt.c)(to,Bn)),St({type:be.G,payload:{repos:Object(I.a)(gs)}}),mr();case 8:case"end":return Bo.stop()}},Si)}));return function(Si){return Or.apply(this,arguments)}}()));case 2:case"end":return Gr.stop()}},Hn)})),Ys.apply(this,arguments)}function Qs(){St({type:be.I,payload:!1})}function Js(Hn){var Wn=Hn.gold,Gn=Hn.experience,sr=Hn.next_game,Bn=Hn.next_shixun,dr=Hn.subject_done,Gr=Object(i.a)(Hn,["gold","experience","next_game","next_shixun","subject_done"]),Or=Gr.challenge_chooses_count===Gr.choose_correct_num,Si={had_submmit:!0,test_sets:Gr.test_sets,challenge_chooses_count:Gr.challenge_chooses_count,choose_correct_num:Gr.choose_correct_num};mt.choose_test_cases=Si,Or&&(mt.game.status=2,mt.next_game=sr,mt.user.grade+=Wn),Or&&Di.status!==2&&xe.a.publish("update-cost-time"),St({type:be.eb,payload:{taskData:mt,evalData:{gold:Wn,experience:Gn,next_game:sr,next_shixun:Bn,subject_done:dr},showEvalResult:Or}}),xe.a.publish("eval-code-finish")}function Ls(){return rs.apply(this,arguments)}function rs(){return rs=Object(l.a)(f.a.mark(function Hn(){var Wn,Gn,sr,Bn,dr,Gr,Or,Si,mr,Ci,to,gs,ya,Bo,nl,kl;return f.a.wrap(function(Ga){for(;;)switch(Ga.prev=Ga.next){case 0:return Ga.prev=0,St({type:be.R}),Ga.next=4,Ai(1);case 4:if(sr=Ga.sent,Bn=sr.resubmit,dr=sr.sec_key,Gr=sr.content_modified,!(sr.status&&sr.status<0)){Ga.next=10;break}return xe.a.publish("eval-code-finish"),St({type:be.eb,payload:{evaluateLoading:!1}}),Ga.abrupt("return");case 10:return Or={sec_key:dr,resubmit:Bn,first:1,content_modified:Gr},at.type==="exercises"&&(Or.extras={exercise_id:at.exercisesId,question_id:at.questionId,challenge_id:(Si=mt.challenge)===null||Si===void 0?void 0:Si.id,subject_id:at.subject_id||""}),Ga.next=14,Object(he.g)(It,Or);case 14:if(mr=Ga.sent,!(mr!=null&&(Wn=mr.data)!==null&&Wn!==void 0&&(Gn=Wn.data_list)!==null&&Gn!==void 0&&Gn.length)){Ga.next=18;break}return xe.a.publish("pod-restrict-data",{identifier:mr==null||((Ci=mr.data)===null||Ci===void 0)?void 0:Ci.identifier,data_list:mr==null||((to=mr.data)===null||to===void 0)?void 0:to.data_list}),Ga.abrupt("return");case 18:if(!(mr.status===-1&&at.type==="exercises")){Ga.next=21;break}return window.parent.location.href="/classrooms/".concat(rn.query.coursesId,"/exercise/").concat(rn.query.exercisesId,"/detail"),Ga.abrupt("return");case 21:return mr.status===1&&(kl=function(){return kl=Object(l.a)(f.a.mark(function Zl(rl,Ns,Ko){var il,yl,zl,ba,bl,Gl,Ll,Vl,El,Yl,ki,Ml,Ql,Ss;return f.a.wrap(function(Cs){for(;;)switch(Cs.prev=Cs.next){case 0:return yl=Ko++*rl,yl/1e3>Ns&&(Bo=!0),Cs.next=4,Object(he.s)(It,{resubmit:Bn,time_out:Bo,port:mr.port,sec_key:dr,challenge_id:mt==null||((il=mt.challenge)===null||il===void 0)?void 0:il.id,subject_id:at.subject_id||""});case 4:zl=Cs.sent,ba=zl,bl=ba.status,Gl=ba.running_code_message,Ll=ba.port,Vl=ba.web_route,St({type:be.F,payload:Gl}),+bl>-1||yl/1e3>Ns?(Di.status!==2&&bl===2&&(mt.game.status=2,mt.user.grade+=ba.gold,xe.a.publish("update-cost-time")),mt.test_sets=ba.test_sets||[],mt.last_compile_output=ba.last_compile_output,mt.test_sets_count=ba.test_sets_count,mt.sets_error_count=ba.sets_error_count,mt.record_consume_time=ba.record_consume_time,mt.next_game=ba.next_game,mt.prev_game=ba.prev_game,mt.game_report_id=ba.game_report_id,El="",Yl=So.indexOf("Web")!==-1||So.indexOf("JFinal")!==-1,Yl&&Ll!=-1&&Vl&&(El="".concat(Ha,":").concat(Ll,"/").concat(Vl)),ki=Object(yt.d)(ba.test_sets),Ml=ba.picture>0&&ki,Ql=bl===2&&!Bo,Bo?n.b.info("\u672C\u6B21\u8BC4\u6D4B\u8D85\u65F6"):Ql||n.b.info("\u8BC4\u6D4B\u672A\u901A\u8FC7\uFF0C\u8BE6\u60C5\u53C2\u89C1\u201C\u6D4B\u8BD5\u7ED3\u679C\u201D"),Ss={taskData:mt,evalData:{gold:ba.gold,experience:ba.experience,next_game:ba.next_game,next_shixun:ba.next_shixun},evaluateLoading:!1,evaluateMessage:"",webDisplayUrl:El,showPictureView:oa||Dn!=null&&Dn.thiry_party?!1:Ml,isPictureView:Ml},oa&&sa||Dn!=null&&Dn.thiry_party?(xe.a.publish("evaluate-unity3d-result",{state:"user",data:{user:Sa}}),xe.a.publish("evaluate-unity3d-finish"),(Br||ki)&&xe.a.publish("evaluate-unity3d-result",ba.unity_3d_result)):Ss.showEvalResult=Ql,St({type:be.eb,payload:Ss}),xe.a.publish("eval-code-finish")):setTimeout(function(){nl(rl,Dn.exec_time+11,Ko++)},rl);case 9:case"end":return Cs.stop()}},Zl)})),kl.apply(this,arguments)},nl=function(Zl,rl,Ns){return kl.apply(this,arguments)},gs=1,ya=1e3,Bo=!1,nl(ya,Dn.exec_time+11,gs++)),Ga.abrupt("return",res);case 25:Ga.prev=25,Ga.t0=Ga.catch(0),console.log("-------eval code",Ga.t0);case 28:case"end":return Ga.stop()}},Hn,null,[[0,25]])})),rs.apply(this,arguments)}function Zs(Hn){St({type:be.d,payload:{content:Hn,lastedUpdateTime:new Date().getTime()}})}function gl(){St({type:be.o})}function vl(){St({type:be.r})}function Xl(){St({type:be.V})}function bs(){St({type:be.T})}function Lr(Hn,Wn){return pi.apply(this,arguments)}function pi(){return pi=Object(l.a)(f.a.mark(function Hn(Wn,Gn){var sr,Bn,dr,Gr;return f.a.wrap(function(Si){for(;;)switch(Si.prev=Si.next){case 0:if(sr=Gn.node,wn(!0),!sr.isLeaf){Si.next=9;break}return Bn=Wn[0],dr=Bn.split(".").pop().toLowerCase(),Si.next=7,Ai();case 7:Gr=Si.sent,St({type:be.d,payload:{currentPath:Bn}});case 9:setTimeout(function(){wn(!1)},500);case 10:case"end":return Si.stop()}},Hn)})),pi.apply(this,arguments)}function va(Hn){return Xa.apply(this,arguments)}function Xa(){return Xa=Object(l.a)(f.a.mark(function Hn(Wn){var Gn;return f.a.wrap(function(Bn){for(;;)switch(Bn.prev=Bn.next){case 0:return Bn.next=2,Ai();case 2:Gn=Bn.sent,console.log("resres:",Gn),St({type:be.d,payload:{currentPath:Wn}});case 5:case"end":return Bn.stop()}},Hn)})),Xa.apply(this,arguments)}function _a(){mt.myshixun.system_tip=!0,St({type:be.eb,payload:{taskData:mt,showNotice:!1}})}function is(Hn,Wn){mt.challenge.path=Hn,mt.myshixun.system_tip=!1,St({type:be.eb,payload:{taskData:Object(t.a)(Object(t.a)({},mt),{},{tpm_cases_modified:!1,tpm_modified:!1,tpm_script_modified:!1}),showNotice:!1,timestamp:Wn}})}function Na(){St({type:be.p})}function $s(){return Es.apply(this,arguments)}function Es(){return Es=Object(l.a)(f.a.mark(function Hn(){var Wn,Gn,sr,Bn,dr,Gr,Or,Si;return f.a.wrap(function(Ci){for(;;)switch(Ci.prev=Ci.next){case 0:if(Ci.prev=0,St({type:be.O,payload:!0}),xe.a.publish("vnc-reseting"),!(mt!=null&&mt.windows_vnc||mt!=null&&mt.virtual_machine)){Ci.next=13;break}return xe.a.publish("reset-linux-windows-loading"),Ci.next=7,Object(he.F)({myshixunId:mt==null||((sr=mt.myshixun)===null||sr===void 0)?void 0:sr.identifier,game_id:mt==null?void 0:mt.game.id});case 7:Gn=Ci.sent,Bn=Gn.data.link_url,mt.shixun.windows_vnc=Bn+"×tamp="+new Date().getTime(),mt.windows_vnc++,Ci.next=28;break;case 13:if(!(mt!=null&&mt.linux_vnc)){Ci.next=23;break}return xe.a.publish("reset-linux-windows-loading"),Ci.next=17,Object(he.C)({myshixunId:mt==null||((dr=mt.myshixun)===null||dr===void 0)?void 0:dr.identifier,game_id:mt==null?void 0:mt.game.id});case 17:Gn=Ci.sent,Gr=Gn.data.link_url,mt.shixun.windows_vnc=Gr+"×tamp="+new Date().getTime(),mt.linux_vnc++,Ci.next=28;break;case 23:return Ci.next=25,Object(he.E)({myshixunId:mt==null||((Or=mt.myshixun)===null||Or===void 0)?void 0:Or.identifier,game_id:mt==null?void 0:mt.game.id});case 25:Gn=Ci.sent,Si=Gn.data.link_url,mt.vnc_url=Si+"×tamp="+new Date().getTime();case 28:xe.a.publish("vnc-reseting-done",Gn),mt!=null&&(Wn=mt.challenge)!==null&&Wn!==void 0&&Wn.thiry_party&&xe.a.publish("reset-linux-windos-vnc"),St({type:be.eb,payload:{taskData:mt,resetVncLoading:!1}}),Ci.next=36;break;case 33:Ci.prev=33,Ci.t0=Ci.catch(0),console.log(Ci.t0);case 36:case"end":return Ci.stop()}},Hn,null,[[0,33]])})),Es.apply(this,arguments)}function el(Hn){return ms.apply(this,arguments)}function ms(){return ms=Object(l.a)(f.a.mark(function Hn(Wn){var Gn,sr,Bn,dr,Gr,Or;return f.a.wrap(function(mr){for(;;)switch(mr.prev=mr.next){case 0:if(Gn=Wn.GameState,sr=Wn.Data,Bn=Wn.challenge,!(Bn==="info")){mr.next=5;break}xe.a.publish("evaluate-unity3d-result",{state:"3d_callback",data:{challenge_info:Object(t.a)({},mt.challenge)}}),mr.next=15;break;case 5:if(!(Gn==="Success")){mr.next=15;break}if(!(Br||!sa)){mr.next=14;break}return mr.next=9,Object(he.I)(It,li.Base64.encode(It+new Date().getTime()),sr);case 9:dr=mr.sent,Gr=dr.status,Or=dr.data,Gr==0&&(Di.status!==2&&(mt.game.status=2,mt.user.grade+=Or.gold,xe.a.publish("update-cost-time")),xe.a.publish("evaluate-unity3d-result",{state:"userAndtime",data:{user:Sa,open_time:Or.open_time,end_time:Or.end_time}}),St({type:be.eb,payload:{taskData:mt,evalData:{gold:Or.gold,experience:Or.experience,next_game:Or.next_game},evaluateLoading:!1,showEvalResult:!0}})),mr.next=15;break;case 14:St({type:be.S});case 15:case"end":return mr.stop()}},Hn)})),ms.apply(this,arguments)}function tl(){}function _l(){return xs.apply(this,arguments)}function xs(){return xs=Object(l.a)(f.a.mark(function Hn(){var Wn,Gn,sr,Bn,dr,Gr,Or,Si,mr,Ci,to;return f.a.wrap(function(ya){for(;;)switch(ya.prev=ya.next){case 0:if(!(mt!=null&&mt.windows_vnc||mt!=null&&mt.virtual_machine)){ya.next=6;break}return ya.next=3,Object(he.d)(mt==null||((dr=mt.myshixun)===null||dr===void 0)?void 0:dr.identifier,mt==null||((Gr=mt.game)===null||Gr===void 0)?void 0:Gr.id);case 3:Bn=ya.sent,ya.next=15;break;case 6:if(!(mt!=null&&mt.linux_vnc||(kr==null?void 0:kr.webssh)===3)){ya.next=12;break}return ya.next=9,Object(he.a)(mt==null||((Or=mt.myshixun)===null||Or===void 0)?void 0:Or.identifier,mt==null||((Si=mt.game)===null||Si===void 0)?void 0:Si.id);case 9:Bn=ya.sent,ya.next=15;break;case 12:return ya.next=14,Object(he.c)(mt==null||((mr=mt.myshixun)===null||mr===void 0)?void 0:mr.identifier,mt==null||((Ci=mt.game)===null||Ci===void 0)?void 0:Ci.id);case 14:Bn=ya.sent;case 15:return(Wn=Bn)!==null&&Wn!==void 0&&(Gn=Wn.data)!==null&&Gn!==void 0&&Gn.remaining_time&&xe.a.publish("update-windows-time",(to=Bn)===null||to===void 0?void 0:to.data),ya.abrupt("return",(sr=Bn)===null||sr===void 0?void 0:sr.data);case 17:case"end":return ya.stop()}},Hn)})),xs.apply(this,arguments)}var Ms=typeof Xn=="number"&&Xn!==.01?"".concat(Xn,"px"):"40%",Jl="calc(100% - 4px - ".concat(Ms,")"),za=(qe={game:Di,taskId:It,user_praise:Lo,praise_count:ho,st:Fr,challenge:Dn,rank_name:mt.rank_name,shixun:kr,is_teacher:Pi,has_answer:co,unity_3d_routes:oa,with_code_file:sa,onEvaluateCallback:tl,onGetUnity3dMessage:el},Object(_.a)(qe,"taskId",It),Object(_.a)(qe,"myshixun",aa),Object(_.a)(qe,"user",Sa),Object(_.a)(qe,"discusses_count",da),Object(_.a)(qe,"onPlusOrCancelPraise",ns),Object(_.a)(qe,"minuxUserGrade",Kr),Object(_.a)(qe,"taskData",mt),qe),Ps={showNotice:Sr||($a||fo)&&aa.system_tip===!1,tpm_cases_modified:$a,tpm_modified:Pa,tpm_script_modified:ao,st:Fr,taskId:It,myshixunId:(aa||{}).id,onNextCallback:_a,onUpdateCallback:is,onUpdateFailure:Na},ws=Object(t.a)(Object(t.a)({},hn),{},{isPictureView:_n,history:At,webDisplayUrl:Jr,onShowPictureView:Xl,star:Di&&Di.star,onStarChange:Ds,onCloseResult:gl}),Il={lastedGetTaskInfoTime:Zr,isEditPath:Co,taskData:mt,codeRepData:An,moveY:sn,evaluateMessage:bn,evaluateLoading:kn,isNotice:eo,isHtml:ha,onChangePath:va,onResizeSetContainer:Fo,onEditRepCode:Zs,onUpdateCode:Ai,onResizeYStart:ii,onShowDir:Is,onResetCode:es,onResetGitCode:hs,onResizeCodeArea:Wa,onResetPassedCode:go,onFinishDisplayHtml:mo,onShowNotice:bs};return u.a.createElement(h.Fragment,null,zn?u.a.createElement(je.a,{message:"\u52AA\u529B\u8BF7\u6C42\u6570\u636E\u4E2D..",className:"tpi-spin"}):u.a.createElement(h.Fragment,null,u.a.createElement("div",{className:"task-wrapper"},xr&&u.a.createElement("div",{className:"draging-mask"}),u.a.createElement(yo,{difficulty:Dn==null?void 0:Dn.difficulty,mirror_description:Ka,history:At,git_url:fi,shixun:kr,taskData:mt,lastedGetTaskInfoTime:Zr,onAddVncTime:_l,taskId:It,onBack:In,isNotice:eo,resetVncLoading:Er,onResetVnc:$s,onResetGitCode:hs,vnc_url:Ma,linux_vnc:mt==null?void 0:mt.linux_vnc,window_vnc_url:(mt==null?void 0:mt.windows_vnc)||(mt==null?void 0:mt.virtual_machine),onShowNotice:bs,game:Di,user:Sa,st:Fr,onUpdateCode:Ai,onUpdateCostTime:Vs,unity_3d_routes:oa&&!sa||(Dn==null?void 0:Dn.thiry_party)}),u.a.createElement("div",{className:"tasks-body"},u.a.createElement("section",{id:"task-left-panel",className:"left-panel ".concat(oa&&sa?"has-unity-3d":""),style:{width:Ms,display:Xn===.01?"none":""}},u.a.createElement(Ht,za)),u.a.createElement("section",{className:"resize-x-bar ".concat(ga?"has-unity-3d":""),onClick:function(){ga&&Ir()},onMouseDown:function(){!ga&&Ir()}},u.a.createElement(Gs,{noDragging:ga,vnc_url:Ma,moveX:Xn})),u.a.createElement("section",{id:"task-right-panel",className:"right-panel ".concat(Ma||mt!=null&&mt.windows_vnc||mt!=null&&mt.linux_vnc||mt!=null&&mt.virtual_machine?"vnc":""),style:{width:Jl,minWidth:"500px"}},(Dn==null?void 0:Dn.show_type)===7?u.a.createElement(nn.default,{taskId:It,taskData:mt,onEditRepCode:Zs}):u.a.createElement(h.Fragment,null,u.a.createElement(h.Fragment,null,Fr!==1&&u.a.createElement(Bs,Object(s.a)({},kt,Il,{_dispatch:St,taskData:mt,unity_3d_routes:oa,onGetUnity3dMessage:el,onUpdateCode:Ai,evaluateMessage:bn,language:ua,evaluateLoading:kn,with_code_file:sa,onEval:Ls})),Ma||mt!=null&&mt.windows_vnc||mt!=null&&mt.virtual_machine||mt!=null&&mt.linux_vnc?null:Fr===1?u.a.createElement(Mn,Object(s.a)({_dispatch:St,onEval:Js},Il)):null))))),u.a.createElement(fe.a,null,gn?u.a.createElement(Ui,ws):null,u.a.createElement(T.a,{className:"setting-drawer",title:null,placement:"right",width:400,closable:!1,visible:vn,onClose:Qs},u.a.createElement(g.a,{spinning:Sn},u.a.createElement(Rl,{className:"dir-tree",selectedKeys:["".concat(wi)],treeData:Ln,onSelect:Object(V.throttle)(Lr,2e3),loadData:ps}))),Qn?u.a.createElement(jl,{taskId:It,onHidePictureView:vl}):null,u.a.createElement(qa,Ps))))};function Dl(we){var qe=we.is_teacher,it=we.score;return u.a.createElement(h.Fragment,null,qe?u.a.createElement(h.Fragment,null,u.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"),u.a.createElement("div",null,"\u89E3\u9501\u672C\u5173\u6240\u6709\u6D4B\u8BD5\u96C6\u9700\u8981\u6263\u9664".concat(it*2,"\u91D1\u5E01\uFF0C\u786E\u5B9A\u8981\u89E3\u9501\u5417\uFF1F")),u.a.createElement("a",{href:"/account/certification",class:"to-certification-link",target:"_blank"},"\u7ACB\u5373\u8BA4\u8BC1")):u.a.createElement("div",null,"\u89E3\u9501\u672C\u5173\u6240\u6709\u6D4B\u8BD5\u96C6\u9700\u8981\u6263\u9664".concat(it*2,"\u91D1\u5E01\uFF0C\u786E\u5B9A\u8981\u89E3\u9501\u5417\uFF1F")))}function Gs(we){var qe=we.noDragging,it=we.moveX,At=we.vnc_url;return u.a.createElement(h.Fragment,null,qe?u.a.createElement("a",{className:"trapezoid ".concat(it===.01?"enlarge":"")},u.a.createElement("img",{src:it===.01?Rs.a:ko.a,alt:"resize-icon",width:20})):u.a.createElement("a",{className:"btn-resize",draggable:!1},u.a.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13",draggable:!1},u.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(j,H,b){var I=b("MFOe"),v=I.Global;j.exports={name:"oldFF-globalStorage",read:y,write:g,each:s,remove:_,clearAll:p};var T=v.globalStorage;function y(e){return T[e]}function g(e,o){T[e]=o}function s(e){for(var o=T.length-1;o>=0;o--){var n=T.key(o);e(T[n],n)}}function _(e){return T.removeItem(e)}function p(){s(function(e,o){delete T[e]})}},yqJW:function(j,H,b){},yslc:function(j,H){j.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(j,H,b){j.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(j,H,b){}}]);
|