!function e(t,n,r){function o(a,s){if(!n[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(i)return i(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return o(n||e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a>2],t+=n[((3&e[i])<<4)+(e[i+1]>>4)],t+=n[((15&e[i+1])<<2)+(e[i+2]>>6)],t+=n[63&e[i+2]];var a=0;return 2===o?(t+=n[e[a=r-o]>>2],t+=n[((3&e[a])<<4)+(e[a+1]>>4)],t+=n[(15&e[a+1])<<2],t+=n[64]):1===o&&(t+=n[e[a=r-o]>>2],t+=n[(3&e[a])<<4],t+=n[64],t+=n[64]),t},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(e,t){t=void 0!==t?t:0;var n,r,o=this.toBinaryTable,i=this.base64Pad,a=0,s=0,l=e.indexOf("=")-t;l<0&&(l=e.length-t),r=3*(l>>2)+Math.floor(l%4/1.5),n=new Array(r);for(var u=0,c=t;c=8&&(a-=8,p||(n[u++]=s>>a&255),s&=(1<>>4^r),r^=o=65535&((n^=o<<4)>>>16^r),r^=(o=858993459&(r>>>2^(n^=o<<16)))<<2,r=(r^=(o=16711935&(r>>>8^(n^=o)))<<8)<<1|r>>>31&1,r^=o=2863311530&((n^=o)^r),n=(n^=o)<<1|n>>>31&1,i=0;i<8;++i)o=r<<28|r>>>4,o^=_[s++],t=m[63&o],t|=d[o>>>8&63],t|=f[o>>>16&63],t|=u[o>>>24&63],o=r^_[s++],t|=y[63&o],t|=h[o>>>8&63],t|=p[o>>>16&63],o=(n^=t|=c[o>>>24&63])<<28|n>>>4,o^=_[s++],t=m[63&o],t|=d[o>>>8&63],t|=f[o>>>16&63],t|=u[o>>>24&63],o=n^_[s++],t|=y[63&o],t|=h[o>>>8&63],t|=p[o>>>16&63],r^=t|=c[o>>>24&63];for(r=r<<31|r>>>1,r^=o=2863311530&(n^r),r^=o=16711935&((n=(n^=o)<<31|n>>>1)>>>8^r),r^=o=858993459&((n^=o<<8)>>>2^r),r^=(o=65535&(r>>>16^(n^=o<<2)))<<16,o=[r^=(o=252645135&(r>>>4^(n^=o)))<<4,n^=o],i=0;i<8;i++)a[i]=(o[i>>>2]>>>8*(3-i%4))%256,a[i]<0&&(a[i]+=256);return a}function n(e){return t(e.slice(0,8)).concat(t(e.slice(8,16)))}var r,o,i,a,s,l,u,c,f,p,d,h,m,y,b=[13,16,10,23,0,4,2,27,14,5,20,9,22,18,11,3,25,7,15,6,26,19,12,1,40,51,30,36,46,54,29,39,50,44,32,47,43,48,38,55,33,52,45,41,49,35,28,31],v=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],_=[];return r=65536,o=1<<24,i=r|o,a=4,s=1024,l=a|s,u=[i|s,0,0|r,i|l,i|a,r|l,0|a,0|r,0|s,i|s,i|l,0|s,o|l,i|a,0|o,0|a,0|l,o|s,o|s,r|s,r|s,0|i,0|i,o|l,r|a,o|a,o|a,r|a,0,0|l,r|l,0|o,0|r,i|l,0|a,0|i,i|s,0|o,0|o,0|s,i|a,0|r,r|s,o|a,0|s,0|a,o|l,r|l,i|l,r|a,0|i,o|l,o|a,0|l,r|l,i|s,0|l,o|s,o|s,0,r|a,r|s,0,i|a],r=1<<20,o=1<<31,i=r|o,a=32,s=32768,l=a|s,c=[i|l,o|s,0|s,r|l,0|r,0|a,i|a,o|l,o|a,i|l,i|s,0|o,o|s,0|r,0|a,i|a,r|s,r|a,o|l,0,0|o,0|s,r|l,0|i,r|a,o|a,0,r|s,0|l,i|s,0|i,0|l,0,r|l,i|a,0|r,o|l,0|i,i|s,0|s,0|i,o|s,0|a,i|l,r|l,0|a,0|s,0|o,0|l,i|s,0|r,o|a,r|a,o|l,o|a,r|a,r|s,0,o|s,0|l,0|o,i|a,i|l,r|s],r=1<<17,o=1<<27,i=r|o,a=8,s=512,l=a|s,f=[0|l,i|s,0,i|a,o|s,0,r|l,o|s,r|a,o|a,o|a,0|r,i|l,r|a,0|i,0|l,0|o,0|a,i|s,0|s,r|s,0|i,i|a,r|l,o|l,r|s,0|r,o|l,0|a,i|l,0|s,0|o,i|s,0|o,r|a,0|l,0|r,i|s,o|s,0,0|s,r|a,i|l,o|s,o|a,0|s,0,i|a,o|l,0|r,0|o,i|l,0|a,r|l,r|s,o|a,0|i,o|l,0|l,0|i,r|l,0|a,i|a,r|s],r=8192,o=1<<23,i=r|o,a=1,s=128,l=a|s,p=[i|a,r|l,r|l,0|s,i|s,o|l,o|a,r|a,0,0|i,0|i,i|l,0|l,0,o|s,o|a,0|a,0|r,0|o,i|a,0|s,0|o,r|a,r|s,o|l,0|a,r|s,o|s,0|r,i|s,i|l,0|l,o|s,o|a,0|i,i|l,0|l,0,0,0|i,r|s,o|s,o|l,0|a,i|a,r|l,r|l,0|s,i|l,0|l,0|a,0|r,o|a,r|a,i|s,o|l,r|a,r|s,0|o,i|a,0|s,0|o,0|r,i|s],r=1<<25,o=1<<30,i=r|o,a=256,s=1<<19,l=a|s,d=[0|a,r|l,r|s,i|a,0|s,0|a,0|o,r|s,o|l,0|s,r|a,o|l,i|a,i|s,0|l,0|o,0|r,o|s,o|s,0,o|a,i|l,i|l,r|a,i|s,o|a,0,0|i,r|l,0|r,0|i,0|l,0|s,i|a,0|a,0|r,0|o,r|s,i|a,o|l,r|a,0|o,i|s,r|l,o|l,0|a,0|r,i|s,i|l,0|l,0|i,i|l,r|s,0,o|s,0|i,0|l,r|a,o|a,0|s,0,o|s,r|l,o|a],r=1<<22,o=1<<29,i=r|o,a=16,s=16384,l=a|s,h=[o|a,0|i,0|s,i|l,0|i,0|a,i|l,0|r,o|s,r|l,0|r,o|a,r|a,o|s,0|o,0|l,0,r|a,o|l,0|s,r|s,o|l,0|a,i|a,i|a,0,r|l,i|s,0|l,r|s,i|s,0|o,o|s,0|a,i|a,r|s,i|l,0|r,0|l,o|a,0|r,o|s,0|o,0|l,o|a,i|l,r|s,0|i,r|l,i|s,0,i|a,0|a,0|s,0|i,r|l,0|s,r|a,o|l,0,i|s,0|o,r|a,o|l],r=1<<21,o=1<<26,i=r|o,a=2,s=2048,l=a|s,m=[0|r,i|a,o|l,0,0|s,o|l,r|l,i|s,i|l,0|r,0,o|a,0|a,0|o,i|a,0|l,o|s,r|l,r|a,o|s,o|a,0|i,i|s,r|a,0|i,0|s,0|l,i|l,r|s,0|a,0|o,r|s,0|o,r|s,0|r,o|l,o|l,i|a,i|a,0|a,r|a,0|o,o|s,0|r,i|s,0|l,r|l,i|s,0|l,o|a,i|l,0|i,r|s,0,0|a,i|l,0,r|l,0|i,0|s,o|a,o|s,0|s,r|a],r=1<<18,o=1<<28,i=r|o,a=64,s=4096,l=a|s,y=[o|l,0|s,0|r,i|l,0|o,o|l,0|a,0|o,r|a,0|i,i|l,r|s,i|s,r|l,0|s,0|a,0|i,o|a,o|s,0|l,r|s,r|a,i|a,i|s,0|l,0,0,i|a,o|a,o|s,r|l,0|r,r|l,0|r,i|s,0|s,0|a,i|a,0|s,r|l,o|s,0|a,o|a,0|i,i|a,0|o,0|r,o|l,0,i|l,r|a,o|a,0|i,o|s,o|l,0,i|l,r|s,r|s,0|l,0|l,r|a,0|o,i|s],function(e){var t,n,r,o,i,a,s,l,u,c,f=[],p=[],d=[];for(n=0,r=56;n<56;++n,r-=8)o=7&(r+=r<-5?65:r<-3?31:r<-1?63:27===r?35:0),f[n]=0!=(e[r>>>3]&1<>>10,_[c]|=(4032&l)>>>6,_[++c]=(258048&s)<<12,_[c]|=(63&s)<<16,_[c]|=(258048&l)>>>4,_[c]|=63&l,++c}(e),{encrypt:n}}Object.defineProperty(n,"__esModule",{value:!0}),n.default=r},{}],3:[function(e,t,n){"use strict";function r(e){if(this._drawCtx=null,this._c_forceCanvas=!1,this._renderQ=[],this._flushing=!1,this._fb_width=0,this._fb_height=0,this._prevDrawStyle="",this._tile=null,this._tile16x16=null,this._tile_x=0,this._tile_y=0,(0,i.set_defaults)(this,e,{true_color:!0,colourMap:[],scale:1,viewport:!1,render_mode:"",onFlush:function(){}}),a.Debug(">> Display.constructor"),!this._target)throw new Error("Target must be set");if("string"==typeof this._target)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},a.Debug("User Agent: "+navigator.userAgent),o.Engine.gecko&&a.Debug("Browser: gecko "+o.Engine.gecko),o.Engine.webkit&&a.Debug("Browser: webkit "+o.Engine.webkit),o.Engine.trident&&a.Debug("Browser: trident "+o.Engine.trident),o.Engine.presto&&a.Debug("Browser: presto "+o.Engine.presto),this.clear(),!("createImageData"in this._drawCtx))throw new Error("Canvas does not support createImageData");this._render_mode="canvas rendering",null===this._prefer_js&&(a.Info("Prefering javascript operations"),this._prefer_js=!0),(this._cursor_uri||null===this._cursor_uri||void 0===this._cursor_uri)&&(this._cursor_uri=(0,o.browserSupportsCursorURIs)()),a.Debug("<< Display.constructor")}Object.defineProperty(n,"__esModule",{value:!0}),n.default=r;var o=e("./util/browsers.js"),i=e("./util/properties.js"),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(e("./util/logging.js")),s=function(e){return e&&e.__esModule?e:{default:e}}(e("./base64.js")),l=!1;try{new ImageData(new Uint8ClampedArray(4),1,1),l=!0}catch(e){}r.prototype={viewportChangePos:function(e,t){var n=this._viewportLoc;e=Math.floor(e),t=Math.floor(t),this._viewport||(e=-n.w,t=-n.h);var r=n.x+n.w-1,o=n.y+n.h-1;e<0&&n.x+e<0&&(e=-n.x),r+e>=this._fb_width&&(e-=r+e-this._fb_width+1),n.y+t<0&&(t=-n.y),o+t>=this._fb_height&&(t-=o+t-this._fb_height+1),0===e&&0===t||(a.Debug("viewportChange deltaX: "+e+", deltaY: "+t),n.x+=e,n.y+=t,this._damage(n.x,n.y,n.w,n.h),this.flip())},viewportChangeSize:function(e,t){this._viewport&&void 0!==e&&void 0!==t||(a.Debug("Setting viewport to full display region"),e=this._fb_width,t=this._fb_height),e>this._fb_width&&(e=this._fb_width),t>this._fb_height&&(t=this._fb_height);var n=this._viewportLoc;if(n.w!==e||n.h!==t){n.w=e,n.h=t;var r=this._target;r.width=e,r.height=t,this.viewportChangePos(0,0),this._damage(n.x,n.y,n.w,n.h),this.flip(),this._rescale(this._scale)}},absX:function(e){return e/this._scale+this._viewportLoc.x},absY:function(e){return e/this._scale+this._viewportLoc.y},resize:function(e,t){this._prevDrawStyle="",this._fb_width=e,this._fb_height=t;var n=this._backbuffer;if(n.width!==e||n.height!==t){var r=null;n.width>0&&n.height>0&&(r=this._drawCtx.getImageData(0,0,n.width,n.height)),n.width!==e&&(n.width=e),n.height!==t&&(n.height=t),r&&this._drawCtx.putImageData(r,0,0)}var o=this._viewportLoc;this.viewportChangeSize(o.w,o.h),this.viewportChangePos(0,0)},_damage:function(e,t,n,r){ethis._damageBounds.right&&(this._damageBounds.right=e+n),t+r>this._damageBounds.bottom&&(this._damageBounds.bottom=t+r)},flip:function(e){if(0===this._renderQ.length||e){var t,n,r,o,i,a;t=this._damageBounds.left,n=this._damageBounds.top,i=this._damageBounds.right-t,a=this._damageBounds.bottom-n,r=t-this._viewportLoc.x,o=n-this._viewportLoc.y,r<0&&(i+=r,t-=r,r=0),o<0&&(a+=o,n-=o,o=0),r+i>this._viewportLoc.w&&(i=this._viewportLoc.w-r),o+a>this._viewportLoc.h&&(a=this._viewportLoc.h-o),i>0&&a>0&&this._targetCtx.drawImage(this._backbuffer,t,n,i,a,r,o,i,a),this._damageBounds.left=this._damageBounds.top=65535,this._damageBounds.right=this._damageBounds.bottom=0}else this._renderQ_push({type:"flip"})},clear:function(){this._logo?(this.resize(this._logo.width,this._logo.height),this.imageRect(0,0,this._logo.type,this._logo.data)):(this.resize(240,20),this._drawCtx.clearRect(0,0,this._fb_width,this._fb_height)),this.flip()},pending:function(){return this._renderQ.length>0},flush:function(){0===this._renderQ.length?this._onFlush():this._flushing=!0},fillRect:function(e,t,n,r,o,i){0===this._renderQ.length||i?(this._setFillColor(o),this._drawCtx.fillRect(e,t,n,r),this._damage(e,t,n,r)):this._renderQ_push({type:"fill",x:e,y:t,width:n,height:r,color:o})},copyImage:function(e,t,n,r,o,i,a){0===this._renderQ.length||a?(this._drawCtx.mozImageSmoothingEnabled=!1,this._drawCtx.webkitImageSmoothingEnabled=!1,this._drawCtx.msImageSmoothingEnabled=!1,this._drawCtx.imageSmoothingEnabled=!1,this._drawCtx.drawImage(this._backbuffer,e,t,o,i,n,r,o,i),this._damage(n,r,o,i)):this._renderQ_push({type:"copy",old_x:e,old_y:t,x:n,y:r,width:o,height:i})},imageRect:function(e,t,n,r){var o=new Image;o.src="data: "+n+";base64,"+s.default.encode(r),this._renderQ_push({type:"img",img:o,x:e,y:t})},startTile:function(e,t,n,r,o){if(this._tile_x=e,this._tile_y=t,this._tile=16===n&&16===r?this._tile16x16:this._drawCtx.createImageData(n,r),this._prefer_js)for(var i,a=(i=this._true_color?o:this._colourMap[o[0]])[2],s=i[1],l=i[0],u=this._tile.data,c=0;ce.w||this._fb_height>e.h},set_scale:function(e){this._rescale(e)},set_viewport:function(e){this._viewport=e;var t=this._viewportLoc;this.viewportChangeSize(t.w,t.h),this.viewportChangePos(0,0)},get_width:function(){return this._fb_width},get_height:function(){return this._fb_height},autoscale:function(e,t,n){var r,o=this._viewportLoc,i=e/t;(r=o.w/o.h>=i?e/o.w:t/o.h)>1&&n&&(r=1),this._rescale(r)},_rescale:function(e){this._scale=e;var t=this._viewportLoc,n=Math.round(e*t.w)+"px",r=Math.round(e*t.h)+"px";this._target.style.width===n&&this._target.style.height===r||(this._target.style.width=n,this._target.style.height=r)},_setFillColor:function(e){var t,n="rgb("+(t=this._true_color?e:this._colourMap[e])[2]+","+t[1]+","+t[0]+")";n!==this._prevDrawStyle&&(this._drawCtx.fillStyle=n,this._prevDrawStyle=n)},_rgbImageData:function(e,t,n,r,o,i){for(var a=this._drawCtx.createImageData(n,r),s=a.data,l=0,u=i;l0;){var t=this._renderQ[0];switch(t.type){case"flip":this.flip(!0);break;case"copy":this.copyImage(t.old_x,t.old_y,t.x,t.y,t.width,t.height,!0);break;case"fill":this.fillRect(t.x,t.y,t.width,t.height,t.color,!0);break;case"blit":this.blitImage(t.x,t.y,t.width,t.height,t.data,0,!0);break;case"blitRgb":this.blitRgbImage(t.x,t.y,t.width,t.height,t.data,0,!0);break;case"blitRgbx":this.blitRgbxImage(t.x,t.y,t.width,t.height,t.data,0,!0);break;case"img":t.img.complete?this.drawImage(t.img,t.x,t.y):(t.img._noVNC_display=this,t.img.addEventListener("load",this._resume_renderQ),e=!1)}e&&this._renderQ.shift()}0===this._renderQ.length&&this._flushing&&(this._flushing=!1,this._onFlush())}},(0,i.make_properties)(r,[["target","wo","dom"],["context","ro","raw"],["logo","rw","raw"],["true_color","rw","bool"],["colourMap","rw","arr"],["scale","rw","float"],["viewport","rw","bool"],["width","ro","int"],["height","ro","int"],["render_mode","ro","str"],["prefer_js","rw","str"],["cursor_uri","rw","raw"],["onFlush","rw","func"]]),r.changeCursor=function(e,t,n,r,o,i,a,l){var u=i,c=a;c>8&255)},f.push32le=function(e){this.push(255&e,e>>8&255,e>>16&255,e>>24&255)};var p=u*c*4,d=Math.ceil(u*c/8),h=Math.ceil(u*c/8);f.push16le(0),f.push16le(2),f.push16le(1),f.push(u),f.push(c),f.push(0),f.push(0),f.push16le(r),f.push16le(o),f.push32le(40+p+d+h),f.push32le(22),f.push32le(40),f.push32le(u),f.push32le(2*c),f.push16le(1),f.push16le(32),f.push32le(0),f.push32le(d+h),f.push32le(0),f.push32le(0),f.push32le(0),f.push32le(0);var m,y;for(m=c-1;m>=0;m--)for(y=0;y=i||m>=a)f.push(0),f.push(0),f.push(0),f.push(0);else{var b=m*Math.ceil(i/8)+Math.floor(y/8),v=n[b]<this.chunkSize&&(this.chunkSize=n,this.strm.output=new Uint8Array(this.chunkSize)),this.strm.avail_out=this.chunkSize,(0,o.inflate)(this.strm,t),new Uint8Array(this.strm.output.buffer,0,this.strm.next_out)},reset:function(){(0,o.inflateReset)(this.strm)}}},{"pako/lib/zlib/inflate.js":234,"pako/lib/zlib/zstream.js":236}],5:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}Object.defineProperty(n,"__esModule",{value:!0}),n.Mouse=n.Keyboard=void 0;var o=r(e("../util/logging.js")),i=e("../util/browsers.js"),a=e("../util/events.js"),s=e("../util/properties.js"),l=r(e("./util.js")),u=function(e){this._keyDownList=[],(0,s.set_defaults)(this,e,{target:document,focused:!0}),this._handler=new l.KeyEventDecoder(l.ModifierSync(),l.VerifyCharModifier(l.TrackKeyState(l.EscapeModifiers(this._handleRfbEvent.bind(this))))),this._eventHandlers={keyup:this._handleKeyUp.bind(this),keydown:this._handleKeyDown.bind(this),keypress:this._handleKeyPress.bind(this),blur:this._allKeysUp.bind(this)}};u.prototype={_handleRfbEvent:function(e){this._onKeyPress&&(o.Debug("onKeyPress "+("keydown"==e.type?"down":"up")+", keysym: "+e.keysym.keysym+"("+e.keysym.keyname+")"),this._onKeyPress(e))},setQEMUVNCKeyboardHandler:function(){this._handler=new l.QEMUKeyEventDecoder(l.ModifierSync(),l.TrackQEMUKeyState(this._handleRfbEvent.bind(this)))},_handleKeyDown:function(e){this._focused&&this._handler.keydown(e)&&(0,a.stopEvent)(e)},_handleKeyPress:function(e){this._focused&&this._handler.keypress(e)&&(0,a.stopEvent)(e)},_handleKeyUp:function(e){this._focused&&this._handler.keyup(e)&&(0,a.stopEvent)(e)},_allKeysUp:function(){o.Debug(">> Keyboard.allKeysUp"),this._handler.releaseAll(),o.Debug("<< Keyboard.allKeysUp")},grab:function(){var e=this._target;e.addEventListener("keydown",this._eventHandlers.keydown),e.addEventListener("keyup",this._eventHandlers.keyup),e.addEventListener("keypress",this._eventHandlers.keypress),window.addEventListener("blur",this._eventHandlers.blur)},ungrab:function(){var e=this._target;e.removeEventListener("keydown",this._eventHandlers.keydown),e.removeEventListener("keyup",this._eventHandlers.keyup),e.removeEventListener("keypress",this._eventHandlers.keypress),window.removeEventListener("blur",this._eventHandlers.blur),this._allKeysUp()},sync:function(e){this._handler.syncModifiers(e)}},(0,s.make_properties)(u,[["target","wo","dom"],["focused","rw","bool"],["onKeyPress","rw","func"]]);var c=function(e){this._mouseCaptured=!1,this._doubleClickTimer=null,this._lastTouchPos=null,(0,s.set_defaults)(this,e,{target:document,focused:!0,touchButton:1}),this._eventHandlers={mousedown:this._handleMouseDown.bind(this),mouseup:this._handleMouseUp.bind(this),mousemove:this._handleMouseMove.bind(this),mousewheel:this._handleMouseWheel.bind(this),mousedisable:this._handleMouseDisable.bind(this)}};c.prototype={_captureMouse:function(){(0,a.setCapture)(this._target),this._mouseCaptured=!0},_releaseMouse:function(){(0,a.releaseCapture)(),this._mouseCaptured=!1},_resetDoubleClickTimer:function(){this._doubleClickTimer=null},_handleMouseButton:function(e,t){if(this._focused){this._notify&&this._notify(e);var n,r=this._getMousePosition(e);if(e.touches||e.changedTouches){if(1==t){if(null===this._doubleClickTimer)this._lastTouchPos=r;else{clearTimeout(this._doubleClickTimer);var i=this._lastTouchPos.x-r.x,s=this._lastTouchPos.y-r.y;Math.sqrt(i*i+s*s)<20*(window.devicePixelRatio||1)&&(r=this._lastTouchPos)}this._doubleClickTimer=setTimeout(this._resetDoubleClickTimer.bind(this),500)}n=this._touchButton}else n=e.which?1<0&&(this._onMouseButton(t.x,t.y,1,64),this._onMouseButton(t.x,t.y,0,64)),e.deltaY<0?(this._onMouseButton(t.x,t.y,1,8),this._onMouseButton(t.x,t.y,0,8)):e.deltaY>0&&(this._onMouseButton(t.x,t.y,1,16),this._onMouseButton(t.x,t.y,0,16))),(0,a.stopEvent)(e)}},_handleMouseMove:function(e){if(this._focused){this._notify&&this._notify(e);var t=this._getMousePosition(e);this._onMouseMove&&this._onMouseMove(t.x,t.y),(0,a.stopEvent)(e)}},_handleMouseDisable:function(e){this._focused&&e.target==this._target&&(0,a.stopEvent)(e)},_getMousePosition:function(e){e=(0,a.getPointerEvent)(e);var t,n,r=this._target.getBoundingClientRect();return t=e.clientX=r.right?r.width-1:e.clientX-r.left,n=e.clientY=r.bottom?r.height-1:e.clientY-r.top,{x:t,y:n}},grab:function(){var e=this._target;i.isTouchDevice&&(e.addEventListener("touchstart",this._eventHandlers.mousedown),window.addEventListener("touchend",this._eventHandlers.mouseup),e.addEventListener("touchend",this._eventHandlers.mouseup),e.addEventListener("touchmove",this._eventHandlers.mousemove)),e.addEventListener("mousedown",this._eventHandlers.mousedown),window.addEventListener("mouseup",this._eventHandlers.mouseup),e.addEventListener("mouseup",this._eventHandlers.mouseup),e.addEventListener("mousemove",this._eventHandlers.mousemove),e.addEventListener("wheel",this._eventHandlers.mousewheel),document.addEventListener("click",this._eventHandlers.mousedisable),e.addEventListener("contextmenu",this._eventHandlers.mousedisable)},ungrab:function(){var e=this._target;i.isTouchDevice&&(e.removeEventListener("touchstart",this._eventHandlers.mousedown),window.removeEventListener("touchend",this._eventHandlers.mouseup),e.removeEventListener("touchend",this._eventHandlers.mouseup),e.removeEventListener("touchmove",this._eventHandlers.mousemove)),e.removeEventListener("mousedown",this._eventHandlers.mousedown),window.removeEventListener("mouseup",this._eventHandlers.mouseup),e.removeEventListener("mouseup",this._eventHandlers.mouseup),e.removeEventListener("mousemove",this._eventHandlers.mousemove),e.removeEventListener("wheel",this._eventHandlers.mousewheel),document.removeEventListener("click",this._eventHandlers.mousedisable),e.removeEventListener("contextmenu",this._eventHandlers.mousedisable)}},(0,s.make_properties)(c,[["target","ro","dom"],["notify","ro","func"],["focused","rw","bool"],["onMouseButton","rw","func"],["onMouseMove","rw","func"],["touchButton","rw","int"]]),n.Keyboard=u,n.Mouse=c},{"../util/browsers.js":11,"../util/events.js":12,"../util/logging.js":14,"../util/properties.js":15,"./util.js":8}],6:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default={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_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_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}},{}],7:[function(e,t,n){"use strict";function r(e){return e?{keysym:e,keyname:o?o[e]:e}:void 0}Object.defineProperty(n,"__esModule",{value:!0});var o=null,i={32:32,33:33,34:34,35:35,36:36,37:37,38:38,39:39,40:40,41:41,42:42,43:43,44:44,45:45,46:46,47:47,48:48,49:49,50:50,51:51,52:52,53:53,54:54,55:55,56:56,57:57,58:58,59:59,60:60,61:61,62:62,63:63,64:64,65:65,66:66,67:67,68:68,69:69,70:70,71:71,72:72,73:73,74:74,75:75,76:76,77:77,78:78,79:79,80:80,81:81,82:82,83:83,84:84,85:85,86:86,87:87,88:88,89:89,90:90,91:91,92:92,93:93,94:94,95:95,96:96,97:97,98:98,99:99,100:100,101:101,102:102,103:103,104:104,105:105,106:106,107:107,108:108,109:109,110:110,111:111,112:112,113:113,114:114,115:115,116:116,117:117,118:118,119:119,120:120,121:121,122:122,123:123,124:124,125:125,126:126,160:160,161:161,162:162,163:163,164:164,165:165,166:166,167:167,168:168,169:169,170:170,171:171,172:172,173:173,174:174,175:175,176:176,177:177,178:178,179:179,180:180,181:181,182:182,183:183,184:184,185:185,186:186,187:187,188:188,189:189,190:190,191:191,192:192,193:193,194:194,195:195,196:196,197:197,198:198,199:199,200:200,201:201,202:202,203:203,204:204,205:205,206:206,207:207,208:208,209:209,210:210,211:211,212:212,213:213,214:214,215:215,216:216,217:217,218:218,219:219,220:220,221:221,222:222,223:223,224:224,225:225,226:226,227:227,228:228,229:229,230:230,231:231,232:232,233:233,234:234,235:235,236:236,237:237,238:238,239:239,240:240,241:241,242:242,243:243,244:244,245:245,246:246,247:247,248:248,249:249,250:250,251:251,252:252,253:253,254:254,255:255,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,300:16777516,301:16777517,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,372:16777588,373:16777589,374:16777590,375:16777591,376:5054,377:428,378:444,379:431,380:447,381:430,382:446,399:16777615,402:2294,415:16777631,416:16777632,417:16777633,431:16777647,432:16777648,437:16777653,438:16777654,439:16777655,466:16777681,486:16777702,487:16777703,601:16777817,629:16777845,658:16777874,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,1170:16778386,1171:16778387,1174:16778390,1175:16778391,1178:16778394,1179:16778395,1180:16778396,1181:16778397,1186:16778402,1187:16778403,1198:16778414,1199:16778415,1200:16778416,1201:16778417,1202:16778418,1203:16778419,1206:16778422,1207:16778423,1208:16778424,1209:16778425,1210:16778426,1211:16778427,1240:16778456,1241:16778457,1250:16778466,1251:16778467,1256:16778472,1257:16778473,1262:16778478,1263:16778479,1329:16778545,1330:16778546,1331:16778547,1332:16778548,1333:16778549,1334:16778550,1335:16778551,1336:16778552,1337:16778553,1338:16778554,1339:16778555,1340:16778556,1341:16778557,1342:16778558,1343:16778559,1344:16778560,1345:16778561,1346:16778562,1347:16778563,1348:16778564,1349:16778565,1350:16778566,1351:16778567,1352:16778568,1353:16778569,1354:16778570,1355:16778571,1356:16778572,1357:16778573,1358:16778574,1359:16778575,1360:16778576,1361:16778577,1362:16778578,1363:16778579,1364:16778580,1365:16778581,1366:16778582,1370:16778586,1371:16778587,1372:16778588,1373:16778589,1374:16778590,1377:16778593,1378:16778594,1379:16778595,1380:16778596,1381:16778597,1382:16778598,1383:16778599,1384:16778600,1385:16778601,1386:16778602,1387:16778603,1388:16778604,1389:16778605,1390:16778606,1391:16778607,1392:16778608,1393:16778609,1394:16778610,1395:16778611,1396:16778612,1397:16778613,1398:16778614,1399:16778615,1400:16778616,1401:16778617,1402:16778618,1403:16778619,1404:16778620,1405:16778621,1406:16778622,1407:16778623,1408:16778624,1409:16778625,1410:16778626,1411:16778627,1412:16778628,1413:16778629,1414:16778630,1415:16778631,1417:16778633,1418:16778634,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,1619:16778835,1620:16778836,1621:16778837,1632:16778848,1633:16778849,1634:16778850,1635:16778851,1636:16778852,1637:16778853,1638:16778854,1639:16778855,1640:16778856,1641:16778857,1642:16778858,1648:16778864,1657:16778873,1662:16778878,1670:16778886,1672:16778888,1681:16778897,1688:16778904,1700:16778916,1705:16778921,1711:16778927,1722:16778938,1726:16778942,1729:16778945,1740:16778956,1746:16778962,1748:16778964,1776:16778992,1777:16778993,1778:16778994,1779:16778995,1780:16778996,1781:16778997,1782:16778998,1783:16778999,1784:16779e3,1785:16779001,3458:16780674,3459:16780675,3461:16780677,3462:16780678,3463:16780679,3464:16780680,3465:16780681,3466:16780682,3467:16780683,3468:16780684,3469:16780685,3470:16780686,3471:16780687,3472:16780688,3473:16780689,3474:16780690,3475:16780691,3476:16780692,3477:16780693,3478:16780694,3482:16780698,3483:16780699,3484:16780700,3485:16780701,3486:16780702,3487:16780703,3488:16780704,3489:16780705,3490:16780706,3491:16780707,3492:16780708,3493:16780709,3494:16780710,3495:16780711,3496:16780712,3497:16780713,3498:16780714,3499:16780715,3500:16780716,3501:16780717,3502:16780718,3503:16780719,3504:16780720,3505:16780721,3507:16780723,3508:16780724,3509:16780725,3510:16780726,3511:16780727,3512:16780728,3513:16780729,3514:16780730,3515:16780731,3517:16780733,3520:16780736,3521:16780737,3522:16780738,3523:16780739,3524:16780740,3525:16780741,3526:16780742,3530:16780746,3535:16780751,3536:16780752,3537:16780753,3538:16780754,3539:16780755,3540:16780756,3542:16780758,3544:16780760,3545:16780761,3546:16780762,3547:16780763,3548:16780764,3549:16780765,3550:16780766,3551:16780767,3570:16780786,3571:16780787,3572:16780788,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,4304:16781520,4305:16781521,4306:16781522,4307:16781523,4308:16781524,4309:16781525,4310:16781526,4311:16781527,4312:16781528,4313:16781529,4314:16781530,4315:16781531,4316:16781532,4317:16781533,4318:16781534,4319:16781535,4320:16781536,4321:16781537,4322:16781538,4323:16781539,4324:16781540,4325:16781541,4326:16781542,4327:16781543,4328:16781544,4329:16781545,4330:16781546,4331:16781547,4332:16781548,4333:16781549,4334:16781550,4335:16781551,4336:16781552,4337:16781553,4338:16781554,4339:16781555,4340:16781556,4341:16781557,4342:16781558,7682:16784898,7683:16784899,7690:16784906,7691:16784907,7710:16784926,7711:16784927,7734:16784950,7735:16784951,7744:16784960,7745:16784961,7766:16784982,7767:16784983,7776:16784992,7777:16784993,7786:16785002,7787:16785003,7808:16785024,7809:16785025,7810:16785026,7811:16785027,7812:16785028,7813:16785029,7818:16785034,7819:16785035,7840:16785056,7841:16785057,7842:16785058,7843:16785059,7844:16785060,7845:16785061,7846:16785062,7847:16785063,7848:16785064,7849:16785065,7850:16785066,7851:16785067,7852:16785068,7853:16785069,7854:16785070,7855:16785071,7856:16785072,7857:16785073,7858:16785074,7859:16785075,7860:16785076,7861:16785077,7862:16785078,7863:16785079,7864:16785080,7865:16785081,7866:16785082,7867:16785083,7868:16785084,7869:16785085,7870:16785086,7871:16785087,7872:16785088,7873:16785089,7874:16785090,7875:16785091,7876:16785092,7877:16785093,7878:16785094,7879:16785095,7880:16785096,7881:16785097,7882:16785098,7883:16785099,7884:16785100,7885:16785101,7886:16785102,7887:16785103,7888:16785104,7889:16785105,7890:16785106,7891:16785107,7892:16785108,7893:16785109,7894:16785110,7895:16785111,7896:16785112,7897:16785113,7898:16785114,7899:16785115,7900:16785116,7901:16785117,7902:16785118,7903:16785119,7904:16785120,7905:16785121,7906:16785122,7907:16785123,7908:16785124,7909:16785125,7910:16785126,7911:16785127,7912:16785128,7913:16785129,7914:16785130,7915:16785131,7916:16785132,7917:16785133,7918:16785134,7919:16785135,7920:16785136,7921:16785137,7922:16785138,7923:16785139,7924:16785140,7925:16785141,7926:16785142,7927:16785143,7928:16785144,7929:16785145,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,8304:16785520,8308:16785524,8309:16785525,8310:16785526,8311:16785527,8312:16785528,8313:16785529,8320:16785536,8321:16785537,8322:16785538,8323:16785539,8324:16785540,8325:16785541,8326:16785542,8327:16785543,8328:16785544,8329:16785545,8352:16785568,8353:16785569,8354:16785570,8355:16785571,8356:16785572,8357:16785573,8358:16785574,8359:16785575,8360:16785576,8361:3839,8362:16785578,8363:16785579,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,8709:16785925,8711:2245,8712:16785928,8713:16785929,8715:16785931,8728:3018,8730:2262,8731:16785947,8732:16785948,8733:2241,8734:2242,8743:2270,8744:2271,8745:2268,8746:2269,8747:2239,8748:16785964,8749:16785965,8756:2240,8757:16785973,8764:2248,8771:2249,8773:16785992,8775:16785991,8800:2237,8801:2255,8802:16786018,8803:16786019,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,10240:16787456,10241:16787457,10242:16787458,10243:16787459,10244:16787460,10245:16787461,10246:16787462,10247:16787463,10248:16787464,10249:16787465,10250:16787466,10251:16787467,10252:16787468,10253:16787469,10254:16787470,10255:16787471,10256:16787472,10257:16787473,10258:16787474,10259:16787475,10260:16787476,10261:16787477,10262:16787478,10263:16787479,10264:16787480,10265:16787481,10266:16787482,10267:16787483,10268:16787484,10269:16787485,10270:16787486,10271:16787487,10272:16787488,10273:16787489,10274:16787490,10275:16787491,10276:16787492,10277:16787493,10278:16787494,10279:16787495,10280:16787496,10281:16787497,10282:16787498,10283:16787499,10284:16787500,10285:16787501,10286:16787502,10287:16787503,10288:16787504,10289:16787505,10290:16787506,10291:16787507,10292:16787508,10293:16787509,10294:16787510,10295:16787511,10296:16787512,10297:16787513,10298:16787514,10299:16787515,10300:16787516,10301:16787517,10302:16787518,10303:16787519,10304:16787520,10305:16787521,10306:16787522,10307:16787523,10308:16787524,10309:16787525,10310:16787526,10311:16787527,10312:16787528,10313:16787529,10314:16787530,10315:16787531,10316:16787532,10317:16787533,10318:16787534,10319:16787535,10320:16787536,10321:16787537,10322:16787538,10323:16787539,10324:16787540,10325:16787541,10326:16787542,10327:16787543,10328:16787544,10329:16787545,10330:16787546,10331:16787547,10332:16787548,10333:16787549,10334:16787550,10335:16787551,10336:16787552,10337:16787553,10338:16787554,10339:16787555,10340:16787556,10341:16787557,10342:16787558,10343:16787559,10344:16787560,10345:16787561,10346:16787562,10347:16787563,10348:16787564,10349:16787565,10350:16787566,10351:16787567,10352:16787568,10353:16787569,10354:16787570,10355:16787571,10356:16787572,10357:16787573,10358:16787574,10359:16787575,10360:16787576,10361:16787577,10362:16787578,10363:16787579,10364:16787580,10365:16787581,10366:16787582,10367:16787583,10368:16787584,10369:16787585,10370:16787586,10371:16787587,10372:16787588,10373:16787589,10374:16787590,10375:16787591,10376:16787592,10377:16787593,10378:16787594,10379:16787595,10380:16787596,10381:16787597,10382:16787598,10383:16787599,10384:16787600,10385:16787601,10386:16787602,10387:16787603,10388:16787604,10389:16787605,10390:16787606,10391:16787607,10392:16787608,10393:16787609,10394:16787610,10395:16787611,10396:16787612,10397:16787613,10398:16787614,10399:16787615,10400:16787616,10401:16787617,10402:16787618,10403:16787619,10404:16787620,10405:16787621,10406:16787622,10407:16787623,10408:16787624,10409:16787625,10410:16787626,10411:16787627,10412:16787628,10413:16787629,10414:16787630,10415:16787631,10416:16787632,10417:16787633,10418:16787634,10419:16787635,10420:16787636,10421:16787637,10422:16787638,10423:16787639,10424:16787640,10425:16787641,10426:16787642,10427:16787643,10428:16787644,10429:16787645,10430:16787646,10431:16787647,10432:16787648,10433:16787649,10434:16787650,10435:16787651,10436:16787652,10437:16787653,10438:16787654,10439:16787655,10440:16787656,10441:16787657,10442:16787658,10443:16787659,10444:16787660,10445:16787661,10446:16787662,10447:16787663,10448:16787664,10449:16787665,10450:16787666,10451:16787667,10452:16787668,10453:16787669,10454:16787670,10455:16787671,10456:16787672,10457:16787673,10458:16787674,10459:16787675,10460:16787676,10461:16787677,10462:16787678,10463:16787679,10464:16787680,10465:16787681,10466:16787682,10467:16787683,10468:16787684,10469:16787685,10470:16787686,10471:16787687,10472:16787688,10473:16787689,10474:16787690,10475:16787691,10476:16787692,10477:16787693,10478:16787694,10479:16787695,10480:16787696,10481:16787697,10482:16787698,10483:16787699,10484:16787700,10485:16787701,10486:16787702,10487:16787703,10488:16787704,10489:16787705,10490:16787706,10491:16787707,10492:16787708,10493:16787709,10494:16787710,10495:16787711,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};n.default={fromUnicode:function(e){var t=i[e];return void 0===t&&(t=16777216|e),r(t)},lookup:r}},{}],8:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t={536:350,537:351,538:354,539:355}[e];return t||e}function i(){return navigator&&!!/mac/i.exec(navigator.platform)}function a(){return navigator&&!!/win/i.exec(navigator.platform)}function s(){return navigator&&!!/linux/i.exec(navigator.platform)}function l(e,t){var n={};for(var r in t)parseInt(r)!==C.default.XK_Shift_L&&(n[r]=t[r]);var o=0;for(var i in t)n[i]&&++o;return u(e,n)?o>e.length:o>0}function u(e,t){if(0===e.length)return!1;for(var n=0;n=48&&e<=57)return e;if(e>=65&&e<=90)return t?e:e+32;if(e>=96&&e<=105)return C.default.XK_KP_0+(e-96);switch(e){case 32:return C.default.XK_space;case 106:return C.default.XK_KP_Multiply;case 107:return C.default.XK_KP_Add;case 108:return C.default.XK_KP_Separator;case 109:return C.default.XK_KP_Subtract;case 110:return C.default.XK_KP_Decimal;case 111:return C.default.XK_KP_Divide;case 187:return C.default.XK_plus;case 188:return C.default.XK_comma;case 189:return C.default.XK_minus;case 190:return C.default.XK_period}return h({keyCode:e})}function h(e){if(!e.keyCode)return null;var t=e.keyCode;if(t>=112&&t<=135)return C.default.XK_F1+t-112;switch(t){case 8:return C.default.XK_BackSpace;case 13:return C.default.XK_Return;case 9:return C.default.XK_Tab;case 27:return C.default.XK_Escape;case 46:return C.default.XK_Delete;case 36:return C.default.XK_Home;case 35:return C.default.XK_End;case 33:return C.default.XK_Page_Up;case 34:return C.default.XK_Page_Down;case 45:return C.default.XK_Insert;case 37:return C.default.XK_Left;case 38:return C.default.XK_Up;case 39:return C.default.XK_Right;case 40:return C.default.XK_Down;case 16:return C.default.XK_Shift_L;case 17:return C.default.XK_Control_L;case 18:return C.default.XK_Alt_L;case 224:return C.default.XK_Meta_L;case 225:return C.default.XK_ISO_Level3_Shift;case 91:return C.default.XK_Super_L;case 92:return C.default.XK_Super_R;case 93:return C.default.XK_Menu;default:return null}}function m(e,t){function n(e){for(var n=0;n0&&"ControlLeft"==t[t.length-1].code&&("AltRight"!==n.code?e({code:"ControlLeft",type:"keydown",keysym:0}):t.pop()),t.push(r)),"ControlLeft"!==n.code&&e(n);break;case"keyup":if(0===t.length)return;for(var o=null,i=0;i!==t.length;++i)if(t[i].code===n.code){o=i;break}if(null===o){if("ControlLeft"===n.code)return;o=t.length-1}t.splice(o,1),e(n);break;case"releaseall":for(i=0;i> RFB.constructor"),Object.keys(o.encodingHandlers).forEach(function(e){this._encHandlers[e]=o.encodingHandlers[e].bind(this)}.bind(this));for(var t=0;t> RFB.connect"),this._init_vars();var e;e="undefined"!=typeof UsingSocketIO?"http":this._encrypt?"wss":"ws",e+="://"+this._rfb_host+":"+this._rfb_port+"/"+this._rfb_path,i.Info("connecting to "+e);try{this._sock.open(e,this._wsProtocols)}catch(e){"SyntaxError"===e.name?this._fail("Invalid host or port value given",e):this._fail("Error while connecting",e)}i.Debug("<< RFB.connect")},_disconnect:function(){i.Debug(">> RFB.disconnect"),this._cleanup(),this._sock.close(),this._print_stats(),i.Debug("<< RFB.disconnect")},_init_vars:function(){this._FBU.rects=0,this._FBU.subrects=0,this._FBU.lines=0,this._FBU.tiles=0,this._FBU.zlibs=[],this._mouse_buttonMask=0,this._mouse_arr=[],this._rfb_tightvnc=!1;var e;for(e=0;e0&&i.Info(" "+this._encodings[e][0]+": "+t[0]+" rects");for(i.Info("Encoding stats since page load:"),e=0;ei||Math.abs(r)>i)&&(this._viewportHasMoved=!0,this._viewportDragPos={x:e,y:t},this._display.viewportChangePos(n,r)))}this._view_only||"connected"===this._rfb_connection_state&&o.messages.pointerEvent(this._sock,this._display.absX(e),this._display.absY(t),this._mouse_buttonMask)},_negotiate_protocol_version:function(){if(this._sock.rQlen()<12)return this._fail("Error while negotiating with server","Incomplete protocol version");var e=this._sock.rQshiftStr(12).substr(4,7);i.Info("Server ProtocolVersion: "+e);var t=0;switch(e){case"000.000":t=1;break;case"003.003":case"003.006":case"003.889":this._rfb_version=3.3;break;case"003.007":this._rfb_version=3.7;break;case"003.008":case"004.000":case"004.001":case"005.000":this._rfb_version=3.8;break;default:return this._fail("Unsupported server","Invalid server version: "+e)}if(t){for(var n=this._repeaterID;n.length<250;)n+="\0";return this._sock.send_string(n),!0}this._rfb_version>this._rfb_max_version&&(this._rfb_version=this._rfb_max_version);var r="00"+parseInt(this._rfb_version,10)+".00"+10*this._rfb_version%10;this._sock.send_string("RFB "+r+"\n"),i.Debug("Sent ProtocolVersion: "+r),this._rfb_init_state="Security"},_negotiate_security:function(){function e(e,t){for(var n=0;n=3.7){var t=this._sock.rQshift8();if(this._sock.rQwait("security type",t,1))return!1;if(0===t){var n=this._sock.rQshift32(),r=this._sock.rQshiftStr(n);return this._fail("Error while negotiating with server","Security failure: "+r)}var o=this._sock.rQshiftBytes(t);if(i.Debug("Server security types: "+o),this._rfb_auth_scheme=0,e(1,o))this._rfb_auth_scheme=1;else if(e(22,o))this._rfb_auth_scheme=22;else if(e(16,o))this._rfb_auth_scheme=16;else{if(!e(2,o))return this._fail("Unsupported server","Unsupported security types: "+o);this._rfb_auth_scheme=2}this._sock.send([this._rfb_auth_scheme])}else{if(this._sock.rQwait("security scheme",4))return!1;this._rfb_auth_scheme=this._sock.rQshift32()}return this._rfb_init_state="Authentication",i.Debug("Authenticating using scheme: "+this._rfb_auth_scheme),this._init_msg()},_negotiate_xvp_auth:function(){var e=this._xvp_password_sep,t=this._rfb_password.split(e);if(t.length<3){var n="XVP credentials required (user"+e+"target"+e+"password) -- got only "+this._rfb_password;return this._onPasswordRequired(this,n),!1}var r=String.fromCharCode(t[0].length)+String.fromCharCode(t[1].length)+t[0]+t[1];return this._sock.send_string(r),this._rfb_password=t.slice(2).join(e),this._rfb_auth_scheme=2,this._negotiate_authentication()},_negotiate_std_vnc_auth:function(){if(0===this._rfb_password.length)return this._onPasswordRequired(this),!1;if(this._sock.rQwait("auth challenge",16))return!1;var e=Array.prototype.slice.call(this._sock.rQshiftBytes(16)),t=o.genDES(this._rfb_password,e);return this._sock.send(t),this._rfb_init_state="SecurityResult",!0},_negotiate_tight_tunnels:function(e){for(var t={0:{vendor:"TGHT",signature:"NOTUNNEL"}},n={},r=0;r0&&this._sock.rQwait("tunnel capabilities",16*e,4))return!1;if(this._rfb_tightvnc=!0,e>0)return this._negotiate_tight_tunnels(e),!1}if(this._sock.rQwait("sub auth count",4))return!1;var t=this._sock.rQshift32();if(0===t)return this._rfb_init_state="SecurityResult",!0;if(this._sock.rQwait("sub auth capabilities",16*t,4))return!1;for(var n={STDVNOAUTH__:1,STDVVNCAUTH_:2},r=[],o=0;o=3.8?(this._rfb_init_state="SecurityResult",!0):(this._rfb_init_state="ClientInitialisation",this._init_msg());case 22:return this._negotiate_xvp_auth();case 2:return this._negotiate_std_vnc_auth();case 16:return this._negotiate_tight_auth();default:return this._fail("Unsupported server","Unsupported auth scheme: "+this._rfb_auth_scheme)}},_handle_security_result:function(){if(this._sock.rQwait("VNC auth response ",4))return!1;switch(this._sock.rQshift32()){case 0:return this._rfb_init_state="ClientInitialisation",i.Debug("Authentication OK"),this._init_msg();case 1:if(this._rfb_version>=3.8){var e=this._sock.rQshift32();if(this._sock.rQwait("SecurityResult reason",e,8))return!1;var t=this._sock.rQshiftStr(e);return this._fail("Authentication failure",t)}return this._fail("Authentication failure");case 2:return this._fail("Too many authentication attempts");default:return this._fail("Unsupported server","Unknown SecurityResult")}},_negotiate_server_init:function(){if(this._sock.rQwait("server initialization",24))return!1;this._fb_width=this._sock.rQshift16(),this._fb_height=this._sock.rQshift16(),this._destBuff=new Uint8Array(this._fb_width*this._fb_height*4);var e=this._sock.rQshift8(),t=this._sock.rQshift8(),n=this._sock.rQshift8(),r=this._sock.rQshift8(),a=this._sock.rQshift16(),l=this._sock.rQshift16(),u=this._sock.rQshift16(),c=this._sock.rQshift8(),f=this._sock.rQshift8(),p=this._sock.rQshift8();this._sock.rQskipBytes(3);var d=this._sock.rQshift32();if(this._sock.rQwait("server init name",d,24))return!1;if(this._fb_name=(0,s.decodeUTF8)(this._sock.rQshiftStr(d)),this._rfb_tightvnc){if(this._sock.rQwait("TightVNC extended server init header",8,24+d))return!1;var h=this._sock.rQshift16(),m=this._sock.rQshift16(),y=this._sock.rQshift16();this._sock.rQskipBytes(2);var b=16*(h+m+y);if(this._sock.rQwait("TightVNC extended server init header",b,32+d))return!1;this._sock.rQskipBytes(16*h),this._sock.rQskipBytes(16*m),this._sock.rQskipBytes(16*y)}return i.Info("Screen: "+this._fb_width+"x"+this._fb_height+", bpp: "+e+", depth: "+t+", big_endian: "+n+", true_color: "+r+", red_max: "+a+", green_max: "+l+", blue_max: "+u+", red_shift: "+c+", green_shift: "+f+", blue_shift: "+p),0!==n&&i.Warn("Server native endian is not little endian"),16!==c&&i.Warn("Server native red-shift is not 16"),0!==p&&i.Warn("Server native blue-shift is not 0"),this._onDesktopName(this,this._fb_name),this._true_color&&"Intel(r) AMT KVM"===this._fb_name&&(i.Warn("Intel AMT KVM only supports 8/16 bit depths. Disabling true color"),this._true_color=!1),this._display.set_true_color(this._true_color),this._display.resize(this._fb_width,this._fb_height),this._onFBResize(this,this._fb_width,this._fb_height),this._view_only||this._keyboard.grab(),this._view_only||this._mouse.grab(),this._true_color?(this._fb_Bpp=4,this._fb_depth=3):(this._fb_Bpp=1,this._fb_depth=1),o.messages.pixelFormat(this._sock,this._fb_Bpp,this._fb_depth,this._true_color),o.messages.clientEncodings(this._sock,this._encodings,this._local_cursor,this._true_color),o.messages.fbUpdateRequest(this._sock,!1,0,0,this._fb_width,this._fb_height),this._timing.fbu_rt_start=(new Date).getTime(),this._timing.pixels=0,this._updateConnectionState("connected"),!0},_init_msg:function(){switch(this._rfb_init_state){case"ProtocolVersion":return this._negotiate_protocol_version();case"Security":return this._negotiate_security();case"Authentication":return this._negotiate_authentication();case"SecurityResult":return this._handle_security_result();case"ClientInitialisation":return this._sock.send([this._shared?1:0]),this._rfb_init_state="ServerInitialisation",!0;case"ServerInitialisation":return this._negotiate_server_init();default:return this._fail("Internal error","Unknown init state: "+this._rfb_init_state)}},_handle_set_colour_map_msg:function(){i.Debug("SetColorMapEntries"),this._sock.rQskip8();var e=this._sock.rQshift16(),t=this._sock.rQshift16();if(this._sock.rQwait("SetColorMapEntries",6*t,6))return!1;for(var n=0;n64&&(i.Warn("Bad payload length ("+t+") in fence response"),t=64);var n=this._sock.rQshiftStr(t);return this._supportsFence=!0,e&1<<31?(e&=3,o.messages.clientFence(this._sock,e,n),!0):this._fail("Internal error","Unexpected fence response")},_handle_xvp_msg:function(){if(this._sock.rQwait("XVP version and message",3,1))return!1;this._sock.rQskip8();var e=this._sock.rQshift8(),t=this._sock.rQshift8();switch(t){case 0:i.Error("Operation Failed"),this._notification("XVP Operation Failed","error");break;case 1:this._rfb_xvp_ver=e,i.Info("XVP extensions enabled (version "+this._rfb_xvp_ver+")"),this._onXvpInit(this._rfb_xvp_ver);break;default:this._fail("Unexpected server message","Illegal server XVP message "+t)}return!0},_normal_msg:function(){var e;switch(e=this._FBU.rects>0?0:this._sock.rQshift8()){case 0:var t=this._framebufferUpdate();return t&&!this._enabledContinuousUpdates&&o.messages.fbUpdateRequest(this._sock,!0,0,0,this._fb_width,this._fb_height),t;case 1:return this._handle_set_colour_map_msg();case 2:return i.Debug("Bell"),this._onBell(this),!0;case 3:return this._handle_server_cut_text();case 150:var n=!this._supportsContinuousUpdates;return this._supportsContinuousUpdates=!0,this._enabledContinuousUpdates=!1,n&&(this._enabledContinuousUpdates=!0,this._updateContinuousUpdates(),i.Info("Enabling continuous updates.")),!0;case 248:return this._handle_server_fence_msg();case 250:return this._handle_xvp_msg();default:return this._fail("Unexpected server message","Type:"+e),i.Debug("sock.rQslice(0, 30): "+this._sock.rQslice(0,30)),!0}},_onFlush:function(){this._flushing=!1,this._sock.rQlen()>0&&this._handle_message()},_framebufferUpdate:function(){var e,t=!0;if(0===this._FBU.rects){if(this._sock.rQwait("FBU header",3,1))return!1;if(this._sock.rQskip8(),this._FBU.rects=this._sock.rQshift16(),this._FBU.bytes=0,this._timing.cur_fbu=0,this._timing.fbu_rt_start>0&&(e=(new Date).getTime(),i.Info("First FBU latency: "+(e-this._timing.fbu_rt_start))),this._display.pending())return this._flushing=!0,this._display.flush(),!1}for(;this._FBU.rects>0;){if("connected"!==this._rfb_connection_state)return!1;if(this._sock.rQwait("FBU",this._FBU.bytes))return!1;if(0===this._FBU.bytes){if(this._sock.rQwait("rect header",12))return!1;var n=this._sock.rQshiftBytes(12);if(this._FBU.x=(n[0]<<8)+n[1],this._FBU.y=(n[2]<<8)+n[3],this._FBU.width=(n[4]<<8)+n[5],this._FBU.height=(n[6]<<8)+n[7],this._FBU.encoding=parseInt((n[8]<<24)+(n[9]<<16)+(n[10]<<8)+n[11],10),this._onFBUReceive(this,{x:this._FBU.x,y:this._FBU.y,width:this._FBU.width,height:this._FBU.height,encoding:this._FBU.encoding,encodingName:this._encNames[this._FBU.encoding]}),!this._encNames[this._FBU.encoding])return this._fail("Unexpected server message","Unsupported encoding "+this._FBU.encoding),!1}if(this._timing.last_fbu=(new Date).getTime(),t=this._encHandlers[this._FBU.encoding](),e=(new Date).getTime(),this._timing.cur_fbu+=e-this._timing.last_fbu,t&&(this._encStats[this._FBU.encoding][0]++,this._encStats[this._FBU.encoding][1]++,this._timing.pixels+=this._FBU.width*this._FBU.height),this._timing.pixels>=this._fb_width*this._fb_height&&((this._FBU.width===this._fb_width&&this._FBU.height===this._fb_height||this._timing.fbu_rt_start>0)&&(this._timing.full_fbu_total+=this._timing.cur_fbu,this._timing.full_fbu_cnt++,i.Info("Timing of full FBU, curr: "+this._timing.cur_fbu+", total: "+this._timing.full_fbu_total+", cnt: "+this._timing.full_fbu_cnt+", avg: "+this._timing.full_fbu_total/this._timing.full_fbu_cnt)),this._timing.fbu_rt_start>0)){var r=e-this._timing.fbu_rt_start;this._timing.fbu_rt_total+=r,this._timing.fbu_rt_cnt++,i.Info("full FBU round-trip, cur: "+r+", total: "+this._timing.fbu_rt_total+", cnt: "+this._timing.fbu_rt_cnt+", avg: "+this._timing.fbu_rt_total/this._timing.fbu_rt_cnt),this._timing.fbu_rt_start=0}if(!t)return t}return this._display.flip(),this._onFBUComplete(this,{x:this._FBU.x,y:this._FBU.y,width:this._FBU.width,height:this._FBU.height,encoding:this._FBU.encoding,encodingName:this._encNames[this._FBU.encoding]}),!0},_updateContinuousUpdates:function(){this._enabledContinuousUpdates&&o.messages.enableContinuousUpdates(this._sock,!0,0,0,this._fb_width,this._fb_height)}},(0,l.make_properties)(o,[["target","wo","dom"],["focusContainer","wo","dom"],["encrypt","rw","bool"],["true_color","rw","bool"],["local_cursor","rw","bool"],["shared","rw","bool"],["view_only","rw","bool"],["xvp_password_sep","rw","str"],["disconnectTimeout","rw","int"],["wsProtocols","rw","arr"],["repeaterID","rw","str"],["viewportDrag","rw","bool"],["onUpdateState","rw","func"],["onNotification","rw","func"],["onDisconnected","rw","func"],["onPasswordRequired","rw","func"],["onClipboard","rw","func"],["onBell","rw","func"],["onFBUReceive","rw","func"],["onFBUComplete","rw","func"],["onFBResize","rw","func"],["onDesktopName","rw","func"],["onXvpInit","rw","func"]]),o.prototype.set_local_cursor=function(e){!e||e in{0:1,no:1,false:1}?(this._local_cursor=!1,this._display.disableLocalCursor()):this._display.get_cursor_uri()?this._local_cursor=!0:(i.Warn("Browser does not support local cursor"),this._display.disableLocalCursor()),"connected"===this._rfb_connection_state&&o.messages.clientEncodings(this._sock,this._encodings,e,this._true_color)},o.prototype.set_view_only=function(e){this._view_only=e,"connecting"!==this._rfb_connection_state&&"connected"!==this._rfb_connection_state||(e?(this._keyboard.ungrab(),this._mouse.ungrab()):(this._keyboard.grab(),this._mouse.grab()))},o.prototype.get_display=function(){return this._display},o.prototype.get_keyboard=function(){return this._keyboard},o.prototype.get_mouse=function(){return this._mouse},o.messages={keyEvent:function(e,t,n){var r=e._sQ,o=e._sQlen;r[o]=4,r[o+1]=n,r[o+2]=0,r[o+3]=0,r[o+4]=t>>24,r[o+5]=t>>16,r[o+6]=t>>8,r[o+7]=t,e._sQlen+=8,e.flush()},QEMUExtendedKeyEvent:function(e,t,n,r){var o=e._sQ,i=e._sQlen;o[i]=255,o[i+1]=0,o[i+2]=n>>8,o[i+3]=n,o[i+4]=t>>24,o[i+5]=t>>16,o[i+6]=t>>8,o[i+7]=t;var a=function(e){var t=255&r;return 224===r>>8&&t<127?t|=128:e}(r);o[i+8]=a>>24,o[i+9]=a>>16,o[i+10]=a>>8,o[i+11]=a,e._sQlen+=12,e.flush()},pointerEvent:function(e,t,n,r){var o=e._sQ,i=e._sQlen;o[i]=5,o[i+1]=r,o[i+2]=t>>8,o[i+3]=t,o[i+4]=n>>8,o[i+5]=n,e._sQlen+=6,e.flush()},clientCutText:function(e,t){var n=e._sQ,r=e._sQlen;n[r]=6,n[r+1]=0,n[r+2]=0,n[r+3]=0;var o=t.length;n[r+4]=o>>24,n[r+5]=o>>16,n[r+6]=o>>8,n[r+7]=o;for(var i=0;i>8,i[a+3]=t,i[a+4]=n>>8,i[a+5]=n,i[a+6]=1,i[a+7]=0,i[a+8]=r>>24,i[a+9]=r>>16,i[a+10]=r>>8,i[a+11]=r,i[a+12]=0,i[a+13]=0,i[a+14]=0,i[a+15]=0,i[a+16]=t>>8,i[a+17]=t,i[a+18]=n>>8,i[a+19]=n,i[a+20]=o>>24,i[a+21]=o>>16,i[a+22]=o>>8,i[a+23]=o,e._sQlen+=24,e.flush()},clientFence:function(e,t,n){var r=e._sQ,o=e._sQlen;r[o]=248,r[o+1]=0,r[o+2]=0,r[o+3]=0,r[o+4]=t>>24,r[o+5]=t>>16,r[o+6]=t>>8,r[o+7]=t;var i=n.length;r[o+8]=i;for(var a=0;a>8,a[s+3]=n,a[s+4]=r>>8,a[s+5]=r,a[s+6]=o>>8,a[s+7]=o,a[s+8]=i>>8,a[s+9]=i,e._sQlen+=10,e.flush()},pixelFormat:function(e,t,n,r){var o=e._sQ,i=e._sQlen;o[i]=0,o[i+1]=0,o[i+2]=0,o[i+3]=0,o[i+4]=8*t,o[i+5]=8*n,o[i+6]=0,o[i+7]=r?1:0,o[i+8]=0,o[i+9]=255,o[i+10]=0,o[i+11]=255,o[i+12]=0,o[i+13]=255,o[i+14]=16,o[i+15]=8,o[i+16]=0,o[i+17]=0,o[i+18]=0,o[i+19]=0,e._sQlen+=20,e.flush()},clientEncodings:function(e,t,n,r){var o=e._sQ,a=e._sQlen;o[a]=2,o[a+1]=0;var s,l=a+4,u=0;for(s=0;s>24,o[l+1]=c>>16,o[l+2]=c>>8,o[l+3]=c,l+=4,u++}else i.Warn("Skipping tight as it is only supported with true color");else i.Debug("Skipping Cursor pseudo-encoding");o[a+2]=u>>8,o[a+3]=u,e._sQlen+=l-a,e.flush()},fbUpdateRequest:function(e,t,n,r,o,i){var a=e._sQ,s=e._sQlen;void 0===n&&(n=0),void 0===r&&(r=0),a[s]=3,a[s+1]=t?1:0,a[s+2]=n>>8&255,a[s+3]=255&n,a[s+4]=r>>8&255,a[s+5]=255&r,a[s+6]=o>>8&255,a[s+7]=255&o,a[s+8]=i>>8&255,a[s+9]=255&i,e._sQlen+=10,e.flush()}},o.genDES=function(e,t){for(var n=[],r=0;r0?this._FBU.bytes=this._FBU.width*this._fb_Bpp:(this._FBU.rects--,this._FBU.bytes=0),!0},COPYRECT:function(){return this._FBU.bytes=4,!this._sock.rQwait("COPYRECT",4)&&(this._display.copyImage(this._sock.rQshift16(),this._sock.rQshift16(),this._FBU.x,this._FBU.y,this._FBU.width,this._FBU.height),this._FBU.rects--,this._FBU.bytes=0,!0)},RRE:function(){var e;if(0===this._FBU.subrects){if(this._FBU.bytes=4+this._fb_Bpp,this._sock.rQwait("RRE",4+this._fb_Bpp))return!1;this._FBU.subrects=this._sock.rQshift32(),e=this._sock.rQshiftBytes(this._fb_Bpp),this._display.fillRect(this._FBU.x,this._FBU.y,this._FBU.width,this._FBU.height,e)}for(;this._FBU.subrects>0&&this._sock.rQlen()>=this._fb_Bpp+8;){e=this._sock.rQshiftBytes(this._fb_Bpp);var t=this._sock.rQshift16(),n=this._sock.rQshift16(),r=this._sock.rQshift16(),o=this._sock.rQshift16();this._display.fillRect(this._FBU.x+t,this._FBU.y+n,r,o,e),this._FBU.subrects--}if(this._FBU.subrects>0){var i=Math.min(this._rre_chunk_sz,this._FBU.subrects);this._FBU.bytes=(this._fb_Bpp+8)*i}else this._FBU.rects--,this._FBU.bytes=0;return!0},HEXTILE:function(){var e=this._sock.get_rQ(),t=this._sock.get_rQi();for(0===this._FBU.tiles&&(this._FBU.tiles_x=Math.ceil(this._FBU.width/16),this._FBU.tiles_y=Math.ceil(this._FBU.height/16),this._FBU.total_tiles=this._FBU.tiles_x*this._FBU.tiles_y,this._FBU.tiles=this._FBU.total_tiles);this._FBU.tiles>0;){if(this._FBU.bytes=1,this._sock.rQwait("HEXTILE subencoding",this._FBU.bytes))return!1;var n=e[t];if(n>30)return this._fail("Unexpected server message","Illegal hextile subencoding: "+n),!1;var r=0,o=this._FBU.total_tiles-this._FBU.tiles,a=o%this._FBU.tiles_x,s=Math.floor(o/this._FBU.tiles_x),l=this._FBU.x+16*a,u=this._FBU.y+16*s,c=Math.min(16,this._FBU.x+this._FBU.width-l),f=Math.min(16,this._FBU.y+this._FBU.height-u);if(1&n)this._FBU.bytes+=c*f*this._fb_Bpp;else if(2&n&&(this._FBU.bytes+=this._fb_Bpp),4&n&&(this._FBU.bytes+=this._fb_Bpp),8&n){if(this._FBU.bytes++,this._sock.rQwait("hextile subrects header",this._FBU.bytes))return!1;r=e[t+this._FBU.bytes-1],this._FBU.bytes+=16&n?r*(this._fb_Bpp+2):2*r}if(this._sock.rQwait("hextile",this._FBU.bytes))return!1;if(this._FBU.subencoding=e[t],t++,0===this._FBU.subencoding)1&this._FBU.lastsubencoding?i.Debug(" Ignoring blank after RAW"):this._display.fillRect(l,u,c,f,this._FBU.background);else if(1&this._FBU.subencoding)this._display.blitImage(l,u,c,f,e,t),t+=this._FBU.bytes-1;else{if(2&this._FBU.subencoding&&(1==this._fb_Bpp?this._FBU.background=e[t]:this._FBU.background=[e[t],e[t+1],e[t+2],e[t+3]],t+=this._fb_Bpp),4&this._FBU.subencoding&&(1==this._fb_Bpp?this._FBU.foreground=e[t]:this._FBU.foreground=[e[t],e[t+1],e[t+2],e[t+3]],t+=this._fb_Bpp),this._display.startTile(l,u,c,f,this._FBU.background),8&this._FBU.subencoding){r=e[t],t++;for(var p=0;p>4,y=15&h,b=e[++t];t++;var v=1+(b>>4),_=1+(15&b);this._display.subTile(m,y,v,_,d)}}this._display.finishTile()}this._sock.set_rQi(t),this._FBU.lastsubencoding=this._FBU.subencoding,this._FBU.bytes=0,this._FBU.tiles--}return 0===this._FBU.tiles&&this._FBU.rects--,!0},getTightCLength:function(e){var t=1,n=0;return n+=127&e[0],128&e[0]&&(t++,n+=(127&e[1])<<7,128&e[1]&&(t++,n+=e[2]<<14)),[t,n]},display_tight:function(e){if(1===this._fb_depth&&this._fail("Internal error","Tight protocol handler only implements true color mode"),this._FBU.bytes=1,this._sock.rQwait("TIGHT compression-control",this._FBU.bytes))return!1;var t,n,r,o,a=0,s=-1,l=function(e,t){for(var n=0;n<4;n++)a>>n&1&&(this._FBU.zlibs[n].reset(),i.Info("Reset zlib stream "+n));return this._FBU.zlibs[s].inflate(e,!0,t)}.bind(this),u=function(e,t,n,r){for(var o=this._destBuff,i=Math.floor((n+7)/8),a=Math.floor(n/8),s=0;s=0;l--)c=4*(s*n+8*u+7-l),f=3*(e[s*i+u]>>l&1),o[c]=t[f],o[c+1]=t[f+1],o[c+2]=t[f+2],o[c+3]=255;for(l=7;l>=8-n%8;l--)c=4*(s*n+8*u+7-l),f=3*(e[s*i+u]>>l&1),o[c]=t[f],o[c+1]=t[f+1],o[c+2]=t[f+2],o[c+3]=255}return o}.bind(this),c=function(e,t,n,r){for(var o=this._destBuff,i=n*r*4,a=0,s=0;a>=4,s=3&m,8===m)t="fill";else if(9===m)t="jpeg";else if(10===m)t="png";else if(4&m)t="filter";else{if(!(m<4))return this._fail("Unexpected server message","Illegal tight compression received, ctl: "+m);t="copy"}if(e&&("filter"===t||"copy"===t))return this._fail("Unexpected server message","filter/copy received in tightPNG mode");switch(t){case"fill":this._FBU.bytes+=this._fb_depth;break;case"jpeg":case"png":this._FBU.bytes+=3;break;case"filter":this._FBU.bytes+=2}if(this._sock.rQwait("TIGHT "+t,this._FBU.bytes))return!1;switch(t){case"fill":this._display.fillRect(this._FBU.x,this._FBU.y,this._FBU.width,this._FBU.height,[p[f+3],p[f+2],p[f+1]],!1),this._sock.rQskipBytes(4);break;case"png":case"jpeg":var y=f+1;if(r=1,o=0,o+=127&p[y],128&p[y]&&(r++,o+=(127&p[y+1])<<7,128&p[y+1]&&(r++,o+=p[y+2]<<14)),this._FBU.bytes=1+r+o,this._sock.rQwait("TIGHT "+t,this._FBU.bytes))return!1;this._sock.rQskipBytes(1+r),n=this._sock.rQshiftBytes(o),this._display.imageRect(this._FBU.x,this._FBU.y,"image/"+t,n);break;case"filter":var b=p[f+1];if(1===b){if(!d())return!1}else this._fail("Unexpected server message","Unsupported tight subencoding received, filter: "+b);break;case"copy":if(!h())return!1}return this._FBU.bytes=0,this._FBU.rects--,!0},TIGHT:function(){return this._encHandlers.display_tight(!1)},TIGHT_PNG:function(){return this._encHandlers.display_tight(!0)},last_rect:function(){return this._FBU.rects=0,!0},handle_FB_resize:function(){return this._fb_width=this._FBU.width,this._fb_height=this._FBU.height,this._destBuff=new Uint8Array(this._fb_width*this._fb_height*4),this._display.resize(this._fb_width,this._fb_height),this._onFBResize(this,this._fb_width,this._fb_height),this._timing.fbu_rt_start=(new Date).getTime(),this._updateContinuousUpdates(),this._FBU.bytes=0,this._FBU.rects-=1,!0},ExtendedDesktopSize:function(){if(this._FBU.bytes=1,this._sock.rQwait("ExtendedDesktopSize",this._FBU.bytes))return!1;this._supportsSetDesktopSize=!0;var e=this._sock.rQpeek8();if(this._FBU.bytes=4+16*e,this._sock.rQwait("ExtendedDesktopSize",this._FBU.bytes))return!1;this._sock.rQskipBytes(1),this._sock.rQskipBytes(3);for(var t=0;t> set_cursor");var e=this._FBU.x,t=this._FBU.y,n=this._FBU.width,r=this._FBU.height,o=n*r*this._fb_Bpp,a=Math.floor((n+7)/8)*r;return this._FBU.bytes=o+a,!this._sock.rQwait("cursor encoding",this._FBU.bytes)&&(this._display.changeCursor(this._sock.rQshiftBytes(o),this._sock.rQshiftBytes(a),e,t,n,r),this._FBU.bytes=0,this._FBU.rects--,i.Debug("<< set_cursor"),!0)},QEMUExtendedKeyEvent:function(){this._FBU.rects--,void 0!==document.createEvent("keyboardEvent").code&&(this._qemuExtKeyEventSupported=!0,this._keyboard.setQEMUVNCKeyboardHandler())},JPEG_quality_lo:function(){i.Error("Server sent jpeg_quality pseudo-encoding")},compress_lo:function(){i.Error("Server sent compress level pseudo-encoding")}}},{"./base64.js":1,"./des.js":2,"./display.js":3,"./inflator.js":4,"./input/devices.js":5,"./input/keysym.js":6,"./input/xtscancodes.js":9,"./util/localization.js":13,"./util/logging.js":14,"./util/properties.js":15,"./util/strings.js":16,"./websock.js":17}],11:[function(e,t,n){"use strict";function r(){if(null===u)try{var e=document.createElement("canvas");e.style.cursor='url("data:image/x-icon;base64,AAACAAEACAgAAAIAAgA4AQAAFgAAACgAAAAIAAAAEAAAAAEAIAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAA==") 2 2, default',e.style.cursor?(i.Info("Data URI scheme cursor supported"),u=!0):(i.Warn("Data URI scheme cursor not supported"),u=!1)}catch(e){i.Error("Data URI scheme cursor test exception: "+e),u=!1}return u}function o(e){u=!(void 0!==e&&!e)}Object.defineProperty(n,"__esModule",{value:!0}),n.isTouchDevice=n.Engine=void 0,n.browserSupportsCursorURIs=r,n._forceCursorURIs=o;var i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(e("./logging.js")),a={xpath:!!document.evaluate,query:!!document.querySelector},s=function(){try{return!navigator.taintEnabled&&(a.xpath?a.query?525:420:419)}catch(e){return!1}}(),l=(n.Engine={presto:function(){return!!window.opera}(),trident:function(){return!!window.ActiveXObject&&(window.XMLHttpRequest?document.querySelectorAll?6:5:4)}(),webkit:!!s&&function(e){var t=/WebKit\/([0-9\.]*) /,n=(navigator.userAgent.match(t)||["",e])[1];return parseFloat(n,10)}(s),gecko:function(){return!(!document.getBoxObjectFor&&null==window.mozInnerScreenX)&&(document.getElementsByClassName?19:18)}()},n.isTouchDevice="ontouchstart"in document.documentElement||void 0!==document.ontouchstart||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0);window.addEventListener("touchstart",function e(){n.isTouchDevice=l=!0,window.removeEventListener("touchstart",e,!1)},!1);var u=null},{"./logging.js":14}],12:[function(e,t,n){"use strict";function r(e){return e.changedTouches?e.changedTouches[0]:e.touches?e.touches[0]:e}function o(e){e.stopPropagation(),e.preventDefault()}function i(e){if(e.setCapture)e.setCapture(),e.addEventListener("mouseup",a),e.addEventListener("touchend",a);else{if(a(),void 0!==window.TouchEvent)try{new TouchEvent("touchstart")}catch(e){return}var t=document.getElementById("noVNC_mouse_capture_elem");null===t&&((t=document.createElement("div")).id="noVNC_mouse_capture_elem",t.style.position="fixed",t.style.top="0px",t.style.left="0px",t.style.width="100%",t.style.height="100%",t.style.zIndex=1e4,t.style.display="none",document.body.appendChild(t),t.addEventListener("contextmenu",u),t.addEventListener("mousemove",u),t.addEventListener("mouseup",u),t.addEventListener("touchmove",u),t.addEventListener("touchend",u)),l=e,p++,f.observe(e,{attributes:!0}),c(),t.style.display=null,window.addEventListener("mousemove",u),window.addEventListener("mouseup",u),window.addEventListener("touchmove",u),window.addEventListener("touchend",u)}}function a(){if(document.releaseCapture)document.releaseCapture();else{if(!l)return;window.setTimeout(function(e){p===e&&(l=null)},0,p),f.disconnect(),document.getElementById("noVNC_mouse_capture_elem").style.display="none",window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",u),window.removeEventListener("touchmove",u),window.removeEventListener("touchend",u)}}Object.defineProperty(n,"__esModule",{value:!0}),n.getPointerEvent=r,n.stopEvent=o,n.setCapture=i,n.releaseCapture=a;!function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);t.default=e}(e("./logging.js"));var s=!1,l=null,u=function(e){if(!s){var t=new e.constructor(e.type,e);s=!0,l.dispatchEvent(t),s=!1,e.stopPropagation(),t.defaultPrevented&&e.preventDefault(),"mouseup"!==e.type&&"touchend"!==e.type||a()}},c=function(){document.getElementById("noVNC_mouse_capture_elem").style.cursor=window.getComputedStyle(l).cursor},f=new MutationObserver(c),p=0},{"./logging.js":14}],13:[function(e,t,n){"use strict";function r(){this.language="en",this.dictionary=void 0}Object.defineProperty(n,"__esModule",{value:!0}),n.Localizer=r,r.prototype={setup:function(e){var t;this.language="en",t="object"==typeof window.navigator.languages?window.navigator.languages:[navigator.language||navigator.userLanguage];for(var n=0;n0&&this._websocket.readyState===WebSocket.OPEN&&(this._websocket.send(this._encode_message()),this._sQlen=0)},send:function(e){this._sQ.set(e,this._sQlen),this._sQlen+=e.length,this.flush()},send_string:function(e){this.send(e.split("").map(function(e){return e.charCodeAt(0)}))},off:function(e){this._eventHandlers[e]=function(){}},on:function(e,t){this._eventHandlers[e]=t},_allocate_buffers:function(){this._rQ=new Uint8Array(this._rQbufferSize),this._sQ=new Uint8Array(this._sQbufferSize)},init:function(){this._allocate_buffers(),this._rQi=0,this._websocket=null},open:function(e,t){e.match(/^([a-z]+):\/\//)[1];this.init(),this._websocket=new WebSocket(e,t),this._websocket.binaryType="arraybuffer",this._websocket.onmessage=this._recv_message.bind(this),this._websocket.onopen=function(){o.Debug(">> WebSock.onopen"),this._websocket.protocol&&o.Info("Server choose sub-protocol: "+this._websocket.protocol),this._eventHandlers.open(),o.Debug("<< WebSock.onopen")}.bind(this),this._websocket.onclose=function(e){o.Debug(">> WebSock.onclose"),this._eventHandlers.close(e),o.Debug("<< WebSock.onclose")}.bind(this),this._websocket.onerror=function(e){o.Debug(">> WebSock.onerror: "+e),this._eventHandlers.error(e),o.Debug("<< WebSock.onerror: "+e)}.bind(this)},close:function(){this._websocket&&(this._websocket.readyState!==WebSocket.OPEN&&this._websocket.readyState!==WebSocket.CONNECTING||(o.Info("Closing WebSocket connection"),this._websocket.close()),this._websocket.onmessage=function(e){})},_encode_message:function(){return new Uint8Array(this._sQ.buffer,0,this._sQlen)},_expand_compact_rQ:function(e){var t=e||this._rQlen-this._rQi>this._rQbufferSize/2;if(t&&(e?this._rQbufferSize=8*(this._rQlen-this._rQi+e):this._rQbufferSize*=2),this._rQbufferSize>41943040&&(this._rQbufferSize=41943040,this._rQbufferSize-this._rQlen-this._rQithis._rQbufferSize-this._rQlen&&this._expand_compact_rQ(t.length),this._rQ.set(t,this._rQlen),this._rQlen+=t.length},_recv_message:function(e){try{this._decode_message(e.data),this.rQlen()>0?(this._eventHandlers.message(),this._rQlen==this._rQi?(this._rQlen=0,this._rQi=0):this._rQlen>this._rQmax&&this._expand_compact_rQ()):o.Debug("Ignoring empty message")}catch(e){var t="";e.name&&(t+="\n name: "+e.name+"\n",t+=" message: "+e.message+"\n"),void 0!==e.description&&(t+=" description: "+e.description+"\n"),void 0!==e.stack&&(t+=e.stack),t.length>0?o.Error("recv_message, caught exception: "+t):o.Error("recv_message, caught exception: "+e),void 0!==e.name?this._eventHandlers.error(e.name+": "+e.message):this._eventHandlers.error(e)}}}},{"./util/logging.js":14}],18:[function(e,t,n){"use strict";n.__esModule=!0,n.default=function(){},t.exports=n.default},{}],19:[function(e,t,n){t.exports={default:e("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":33}],20:[function(e,t,n){t.exports={default:e("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":34}],21:[function(e,t,n){t.exports={default:e("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":35}],22:[function(e,t,n){t.exports={default:e("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":36}],23:[function(e,t,n){t.exports={default:e("core-js/library/fn/object/set-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/set-prototype-of":37}],24:[function(e,t,n){t.exports={default:e("core-js/library/fn/object/values"),__esModule:!0}},{"core-js/library/fn/object/values":38}],25:[function(e,t,n){t.exports={default:e("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":39}],26:[function(e,t,n){t.exports={default:e("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":40}],27:[function(e,t,n){"use strict";n.__esModule=!0,n.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},{}],28:[function(e,t,n){"use strict";n.__esModule=!0;var r=function(e){return e&&e.__esModule?e:{default:e}}(e("../core-js/object/assign"));n.default=r.default||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}},{}],31:[function(e,t,n){"use strict";n.__esModule=!0;var r=function(e){return e&&e.__esModule?e:{default:e}}(e("../helpers/typeof"));n.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,r.default)(t))&&"function"!=typeof t?e:t}},{"../helpers/typeof":32}],32:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}n.__esModule=!0;var o=r(e("../core-js/symbol/iterator")),i=r(e("../core-js/symbol")),a="function"==typeof i.default&&"symbol"==typeof o.default?function(e){return typeof e}:function(e){return e&&"function"==typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":typeof e};n.default="function"==typeof i.default&&"symbol"===a(o.default)?function(e){return void 0===e?"undefined":a(e)}:function(e){return e&&"function"==typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":void 0===e?"undefined":a(e)}},{"../core-js/symbol":25,"../core-js/symbol/iterator":26}],33:[function(e,t,n){e("../../modules/es6.string.iterator"),e("../../modules/es6.array.from"),t.exports=e("../../modules/_core").Array.from},{"../../modules/_core":47,"../../modules/es6.array.from":106,"../../modules/es6.string.iterator":112}],34:[function(e,t,n){e("../../modules/es6.object.assign"),t.exports=e("../../modules/_core").Object.assign},{"../../modules/_core":47,"../../modules/es6.object.assign":108}],35:[function(e,t,n){e("../../modules/es6.object.create");var r=e("../../modules/_core").Object;t.exports=function(e,t){return r.create(e,t)}},{"../../modules/_core":47,"../../modules/es6.object.create":109}],36:[function(e,t,n){e("../../modules/es7.object.entries"),t.exports=e("../../modules/_core").Object.entries},{"../../modules/_core":47,"../../modules/es7.object.entries":114}],37:[function(e,t,n){e("../../modules/es6.object.set-prototype-of"),t.exports=e("../../modules/_core").Object.setPrototypeOf},{"../../modules/_core":47,"../../modules/es6.object.set-prototype-of":110}],38:[function(e,t,n){e("../../modules/es7.object.values"),t.exports=e("../../modules/_core").Object.values},{"../../modules/_core":47,"../../modules/es7.object.values":115}],39:[function(e,t,n){e("../../modules/es6.symbol"),e("../../modules/es6.object.to-string"),e("../../modules/es7.symbol.async-iterator"),e("../../modules/es7.symbol.observable"),t.exports=e("../../modules/_core").Symbol},{"../../modules/_core":47,"../../modules/es6.object.to-string":111,"../../modules/es6.symbol":113,"../../modules/es7.symbol.async-iterator":116,"../../modules/es7.symbol.observable":117}],40:[function(e,t,n){e("../../modules/es6.string.iterator"),e("../../modules/web.dom.iterable"),t.exports=e("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":103,"../../modules/es6.string.iterator":112,"../../modules/web.dom.iterable":118}],41:[function(e,t,n){t.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},{}],42:[function(e,t,n){t.exports=function(){}},{}],43:[function(e,t,n){var r=e("./_is-object");t.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},{"./_is-object":65}],44:[function(e,t,n){var r=e("./_to-iobject"),o=e("./_to-length"),i=e("./_to-index");t.exports=function(e){return function(t,n,a){var s,l=r(t),u=o(l.length),c=i(a,u);if(e&&n!=n){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===n)return e||c||0;return!e&&-1}}},{"./_to-index":95,"./_to-iobject":97,"./_to-length":98}],45:[function(e,t,n){var r=e("./_cof"),o=e("./_wks")("toStringTag"),i="Arguments"==r(function(){return arguments}()),a=function(e,t){try{return e[t]}catch(e){}};t.exports=function(e){var t,n,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=a(t=Object(e),o))?n:i?r(t):"Object"==(s=r(t))&&"function"==typeof t.callee?"Arguments":s}},{"./_cof":46,"./_wks":104}],46:[function(e,t,n){var r={}.toString;t.exports=function(e){return r.call(e).slice(8,-1)}},{}],47:[function(e,t,n){var r=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=r)},{}],48:[function(e,t,n){"use strict";var r=e("./_object-dp"),o=e("./_property-desc");t.exports=function(e,t,n){t in e?r.f(e,t,o(0,n)):e[t]=n}},{"./_object-dp":77,"./_property-desc":88}],49:[function(e,t,n){var r=e("./_a-function");t.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},{"./_a-function":41}],50:[function(e,t,n){t.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},{}],51:[function(e,t,n){t.exports=!e("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./_fails":56}],52:[function(e,t,n){var r=e("./_is-object"),o=e("./_global").document,i=r(o)&&r(o.createElement);t.exports=function(e){return i?o.createElement(e):{}}},{"./_global":57,"./_is-object":65}],53:[function(e,t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],54:[function(e,t,n){var r=e("./_object-keys"),o=e("./_object-gops"),i=e("./_object-pie");t.exports=function(e){var t=r(e),n=o.f;if(n)for(var a,s=n(e),l=i.f,u=0;s.length>u;)l.call(e,a=s[u++])&&t.push(a);return t}},{"./_object-gops":82,"./_object-keys":85,"./_object-pie":86}],55:[function(e,t,n){var r=e("./_global"),o=e("./_core"),i=e("./_ctx"),a=e("./_hide"),s=function(e,t,n){var l,u,c,f=e&s.F,p=e&s.G,d=e&s.S,h=e&s.P,m=e&s.B,y=e&s.W,b=p?o:o[t]||(o[t]={}),v=b.prototype,_=p?r:d?r[t]:(r[t]||{}).prototype;p&&(n=t);for(l in n)(u=!f&&_&&void 0!==_[l])&&l in b||(c=u?_[l]:n[l],b[l]=p&&"function"!=typeof _[l]?n[l]:m&&u?i(c,r):y&&_[l]==c?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(c):h&&"function"==typeof c?i(Function.call,c):c,h&&((b.virtual||(b.virtual={}))[l]=c,e&s.R&&v&&!v[l]&&a(v,l,c)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},{"./_core":47,"./_ctx":49,"./_global":57,"./_hide":59}],56:[function(e,t,n){t.exports=function(e){try{return!!e()}catch(e){return!0}}},{}],57:[function(e,t,n){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},{}],58:[function(e,t,n){var r={}.hasOwnProperty;t.exports=function(e,t){return r.call(e,t)}},{}],59:[function(e,t,n){var r=e("./_object-dp"),o=e("./_property-desc");t.exports=e("./_descriptors")?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},{"./_descriptors":51,"./_object-dp":77,"./_property-desc":88}],60:[function(e,t,n){t.exports=e("./_global").document&&document.documentElement},{"./_global":57}],61:[function(e,t,n){t.exports=!e("./_descriptors")&&!e("./_fails")(function(){return 7!=Object.defineProperty(e("./_dom-create")("div"),"a",{get:function(){return 7}}).a})},{"./_descriptors":51,"./_dom-create":52,"./_fails":56}],62:[function(e,t,n){var r=e("./_cof");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},{"./_cof":46}],63:[function(e,t,n){var r=e("./_iterators"),o=e("./_wks")("iterator"),i=Array.prototype;t.exports=function(e){return void 0!==e&&(r.Array===e||i[o]===e)}},{"./_iterators":71,"./_wks":104}],64:[function(e,t,n){var r=e("./_cof");t.exports=Array.isArray||function(e){return"Array"==r(e)}},{"./_cof":46}],65:[function(e,t,n){t.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},{}],66:[function(e,t,n){var r=e("./_an-object");t.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&r(i.call(e)),t}}},{"./_an-object":43}],67:[function(e,t,n){"use strict";var r=e("./_object-create"),o=e("./_property-desc"),i=e("./_set-to-string-tag"),a={};e("./_hide")(a,e("./_wks")("iterator"),function(){return this}),t.exports=function(e,t,n){e.prototype=r(a,{next:o(1,n)}),i(e,t+" Iterator")}},{"./_hide":59,"./_object-create":76,"./_property-desc":88,"./_set-to-string-tag":91,"./_wks":104}],68:[function(e,t,n){"use strict";var r=e("./_library"),o=e("./_export"),i=e("./_redefine"),a=e("./_hide"),s=e("./_has"),l=e("./_iterators"),u=e("./_iter-create"),c=e("./_set-to-string-tag"),f=e("./_object-gpo"),p=e("./_wks")("iterator"),d=!([].keys&&"next"in[].keys()),h=function(){return this};t.exports=function(e,t,n,m,y,b,v){u(n,t,m);var _,g,C,E=function(e){if(!d&&e in P)return P[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},w=t+" Iterator",T="values"==y,S=!1,P=e.prototype,M=P[p]||P["@@iterator"]||y&&P[y],k=M||E(y),x=y?T?E("entries"):k:void 0,O="Array"==t?P.entries||M:M;if(O&&(C=f(O.call(new e)))!==Object.prototype&&(c(C,w,!0),r||s(C,p)||a(C,p,h)),T&&M&&"values"!==M.name&&(S=!0,k=function(){return M.call(this)}),r&&!v||!d&&!S&&P[p]||a(P,p,k),l[t]=k,l[w]=h,y)if(_={values:T?k:E("values"),keys:b?k:E("keys"),entries:x},v)for(g in _)g in P||i(P,g,_[g]);else o(o.P+o.F*(d||S),t,_);return _}},{"./_export":55,"./_has":58,"./_hide":59,"./_iter-create":67,"./_iterators":71,"./_library":73,"./_object-gpo":83,"./_redefine":89,"./_set-to-string-tag":91,"./_wks":104}],69:[function(e,t,n){var r=e("./_wks")("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(e){}t.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},e(i)}catch(e){}return n}},{"./_wks":104}],70:[function(e,t,n){t.exports=function(e,t){return{value:t,done:!!e}}},{}],71:[function(e,t,n){t.exports={}},{}],72:[function(e,t,n){var r=e("./_object-keys"),o=e("./_to-iobject");t.exports=function(e,t){for(var n,i=o(e),a=r(i),s=a.length,l=0;s>l;)if(i[n=a[l++]]===t)return n}},{"./_object-keys":85,"./_to-iobject":97}],73:[function(e,t,n){t.exports=!0},{}],74:[function(e,t,n){var r=e("./_uid")("meta"),o=e("./_is-object"),i=e("./_has"),a=e("./_object-dp").f,s=0,l=Object.isExtensible||function(){return!0},u=!e("./_fails")(function(){return l(Object.preventExtensions({}))}),c=function(e){a(e,r,{value:{i:"O"+ ++s,w:{}}})},f=function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,r)){if(!l(e))return"F";if(!t)return"E";c(e)}return e[r].i},p=function(e,t){if(!i(e,r)){if(!l(e))return!0;if(!t)return!1;c(e)}return e[r].w},d=function(e){return u&&h.NEED&&l(e)&&!i(e,r)&&c(e),e},h=t.exports={KEY:r,NEED:!1,fastKey:f,getWeak:p,onFreeze:d}},{"./_fails":56,"./_has":58,"./_is-object":65,"./_object-dp":77,"./_uid":101}],75:[function(e,t,n){"use strict";var r=e("./_object-keys"),o=e("./_object-gops"),i=e("./_object-pie"),a=e("./_to-object"),s=e("./_iobject"),l=Object.assign;t.exports=!l||e("./_fails")(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=l({},e)[n]||Object.keys(l({},t)).join("")!=r})?function(e,t){for(var n=a(e),l=arguments.length,u=1,c=o.f,f=i.f;l>u;)for(var p,d=s(arguments[u++]),h=c?r(d).concat(c(d)):r(d),m=h.length,y=0;m>y;)f.call(d,p=h[y++])&&(n[p]=d[p]);return n}:l},{"./_fails":56,"./_iobject":62,"./_object-gops":82,"./_object-keys":85,"./_object-pie":86,"./_to-object":99}],76:[function(e,t,n){var r=e("./_an-object"),o=e("./_object-dps"),i=e("./_enum-bug-keys"),a=e("./_shared-key")("IE_PROTO"),s=function(){},l=function(){var t,n=e("./_dom-create")("iframe"),r=i.length;for(n.style.display="none",e("./_html").appendChild(n),n.src="javascript:",(t=n.contentWindow.document).open(),t.write("