\r\n\r\n\r\n","import mod from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./date.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./date.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./date.vue?vue&type=template&id=d653165e&scoped=true&\"\nimport script from \"./date.vue?vue&type=script&lang=js&\"\nexport * from \"./date.vue?vue&type=script&lang=js&\"\nimport style0 from \"./date.vue?vue&type=style&index=0&id=d653165e&prod&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"d653165e\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _vm._m(0)\n}\nvar staticRenderFns = [function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"live-ing\"},[_c('div',{staticClass:\"live-ing-txt\"},[_vm._v(\"主播暂未开播\")])])\n}]\n\nexport { render, staticRenderFns }","\r\n \r\n
\r\n \r\n
主播暂未开播
\r\n
\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./live-ing.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./live-ing.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./live-ing.vue?vue&type=template&id=0bd7bfff&scoped=true&\"\nimport script from \"./live-ing.vue?vue&type=script&lang=js&\"\nexport * from \"./live-ing.vue?vue&type=script&lang=js&\"\nimport style0 from \"./live-ing.vue?vue&type=style&index=0&id=0bd7bfff&prod&scoped=true&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"0bd7bfff\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return (_vm.url)?_c('div',{staticClass:\"video_box\",style:(_vm.height ? `height:${_vm.height}rem` : '')},[_c('div',{staticClass:\"container\",style:(_vm.height ? `height:${_vm.height}rem` : '')},[_c('div',{staticClass:\"player\",style:(_vm.height ? `height:${_vm.height}rem` : '')},[_c('video-player',{ref:\"videoPlayer\",staticClass:\"video-player vjs-custom-skin video-swiper\",attrs:{\"playsinline\":true,\"options\":_vm.playerOptions},on:{\"play\":function($event){return _vm.onPlayerPlay($event)},\"pause\":function($event){return _vm.onPlayerPause($event)}}})],1)])]):_vm._e()\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./videoPlayer.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./videoPlayer.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./videoPlayer.vue?vue&type=template&id=3dd6c8c3&scoped=true&\"\nimport script from \"./videoPlayer.vue?vue&type=script&lang=js&\"\nexport * from \"./videoPlayer.vue?vue&type=script&lang=js&\"\nimport style0 from \"./videoPlayer.vue?vue&type=style&index=0&id=3dd6c8c3&prod&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"3dd6c8c3\",\n null\n \n)\n\nexport default component.exports","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?t(exports):\"function\"==typeof define&&define.amd?define([\"exports\"],t):t((e=e||self)[\"v-tcplayer\"]={})}(this,function(e){\"use strict\";function i(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,o)}return i}\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self&&self;var t,o,n=(function(e,t){e.exports=function(i){function o(e){if(n[e])return n[e].exports;var t=n[e]={exports:{},id:e,loaded:!1};return i[e].call(t.exports,t,t.exports,o),t.loaded=!0,t.exports}var n={};return o.m=i,o.c=n,o.p=\"//imgcache.qq.com/open/qcloud/video/vcplayer/\",o(0)}([function(e,t,i){function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}function s(e){for(var i={urls:{m3u8:{od:e.m3u8||\"\",hd:e.m3u8_hd||\"\",sd:e.m3u8_sd||\"\"},flv:{od:e.flv||\"\",hd:e.flv_hd||\"\",sd:e.flv_sd||\"\"},mp4:{od:e.mp4||\"\",hd:e.mp4_hd||\"\",sd:e.mp4_sd||\"\"},rtmp:{od:e.rtmp||\"\",hd:e.rtmp_hd||\"\",sd:e.rtmp_sd||\"\"}},isClarity:function(e){var t=i.urls;return!!(t.m3u8[e]||t.flv[e]||t.mp4[e]||t.rtmp[e])},isFormat:function(e){var t=i.urls;return!!t[e].od||!!t[e].hd||!!t[e].sd},hasUrl:function(){return this.isFormat(\"rtmp\")||this.isFormat(\"flv\")||this.isFormat(\"m3u8\")||this.isFormat(\"mp4\")},definitions:[]},t=0;t/g,\">\").replace(/\\\"/g,\""\").replace(/\\'/g,\"'\").replace(/\\//g,\"/\")},t.getFormat=function(e){var t=\"unknown\";return e.isFormat(\"rtmp\")?t=\"rtmp\":e.isFormat(\"flv\")?t=\"flv\":e.isFormat(\"m3u8\")?t=\"m3u8\":e.isFormat(\"mp4\")&&(t=\"mp4\"),t},t.unifyProtocol=function(e,t){e=e.replace(/^(http|https):/,\"\");var i=window.location.protocol;return\"http:\"!=i&&\"https:\"!=i&&(i=t||\"https:\"),e=i+e};for(var c=i(2),u=o(c),p=i(4),h=o(p),d=i(1),f=(o(d),1),y=t.FullscreenApi={requestFullscreen:null,exitFullscreen:null,fullscreenElement:null,fullscreenEnabled:null,fullscreenchange:null,fullscreenerror:null},v=[[\"requestFullscreen\",\"exitFullscreen\",\"fullscreenElement\",\"fullscreenEnabled\",\"fullscreenchange\",\"fullscreenerror\"],[\"webkitRequestFullscreen\",\"webkitExitFullscreen\",\"webkitFullscreenElement\",\"webkitFullscreenEnabled\",\"webkitfullscreenchange\",\"webkitfullscreenerror\"],[\"webkitRequestFullScreen\",\"webkitCancelFullScreen\",\"webkitCurrentFullScreenElement\",\"webkitCancelFullScreen\",\"webkitfullscreenchange\",\"webkitfullscreenerror\"],[\"mozRequestFullScreen\",\"mozCancelFullScreen\",\"mozFullScreenElement\",\"mozFullScreenEnabled\",\"mozfullscreenchange\",\"mozfullscreenerror\"],[\"msRequestFullscreen\",\"msExitFullscreen\",\"msFullscreenElement\",\"msFullscreenEnabled\",\"MSFullscreenChange\",\"MSFullscreenError\"]],A=v[0],m=void 0,g=0;gc.width&&(n=c.width)}n+=o.test(n)?\"\":\"px\",r+=o.test(r)?\"\":\"px\",this.el.style.width=n,this.el.style.height=r,this.video&&(this.video.width(n),this.video.height(r)),this.width=n,this.height=r},i.prototype.setup=function(){if(this.__handleEvent=C.bind(this,this.handleEvent),L.IS_MOBILE){if(this.options.autoplay){var e=this;document.addEventListener(\"WeixinJSBridgeReady\",function(){e.play()})}}else this.loading.show()},i.prototype.destroy=function(){this.video&&this.video.destroy(),this.panel&&this.panel.destroy(),this.bigplay&&this.bigplay.destroy(),this.loading&&this.loading.destroy(),h.unsub(\"*\",\"*\",this.handleMsg,this),this.video=this.panel=this.bigplay=this.loading=null,this.el.parentNode.removeChild(this.el)},i.prototype.setListener=function(e){this.listener=e},i.prototype.handleEvent=function(e){switch(e.type){case\"mousemove\":if(this.__lastmove&&new Date-this.__lastmove<100)break;var t=this;if(this.__movecnt=this.__movecnt||0,this.__movecnt++,this.__movecnt<5){setTimeout(function(){t.__movecnt=0},500);break}this.__movecnt=0,this.__lastmove=+new Date,clearTimeout(this.__moveid),t.panel&&t.panel.show(),this.__moveid=setTimeout(function(){t.playing()&&t.panel&&t.panel.hide()},3e3)}},i.prototype.handleMsg=function(e){switch(e.type){case D.Load:P.removeClass(this.el,\"vcp-playing\"),(\"none\"===this.options.preload||this.options.hlsConfig&&!1===this.options.hlsConfig.autoStartLoad)&&this.loading.hide();break;case D.Play:if(!this.playing())break;!this.hasPlay&&this.options.flash&&(this.mtaReport.reportFlash(),this.hasPlay=!0),P.addClass(this.el,\"vcp-playing\"),this.video.type()==C.VideoType.RTMP&&(this.__wait=!0,this.loading.show()),P.on(this.el,\"mousemove\",this.__handleEvent);break;case D.Playing:this.loading.hide();break;case D.TimeUpdate:this.__wait&&(this.__wait=!1,this.loading.hide());break;case D.Pause:P.off(this.el,\"mousemove\",this.__handleEvent),P.removeClass(this.el,\"vcp-playing\");break;case D.Ended:P.off(this.el,\"mousemove\",this.__handleEvent),this.panel&&this.panel.show(),P.removeClass(this.el,\"vcp-playing\");break;case D.MetaLoaded:this.loading.hide(),this.mtaReport.report(),this.size(this.options.width,this.options.height);break;case D.Seeking:this.loading.show();break;case D.Seeked:this.loading.hide();break;case D.FullScreen:var t=this;setTimeout(function(){P.toggleClass(t.el,\"vcp-fullscreen\",e.detail.isFullscreen)},0);break;case D.Error:this.loading.hide(),this.errortips.show(e.detail),this.panel&&this.panel.show();try{var i=this.options.videoSource,o=C.getFormat(i);L.IS_X5TBS?MtaH5.clickStat(\"x5_err\",{format:o}):MtaH5.clickStat(\"error\",{format:o})}catch(e){}}!e.private&&this.listener&&this.listener(e)},i.prototype.currentTime=function(e){return this.video.currentTime(e)},i.prototype.duration=function(){return this.video.duration()},i.prototype.percent=function(e){return this.video.duration()?void 0===e?this.video.currentTime()/this.video.duration():void this.video.currentTime(this.video.duration()*e):0},i.prototype.buffered=function(){return this.video.duration()?this.video.buffered()/this.video.duration():0},i.prototype.pause=function(){this.video.pause()},i.prototype.play=function(){var e;this.errortips.clear(),(e=this.video).play.apply(e,arguments)},i.prototype.togglePlay=function(){this.errortips.clear(),this.video.togglePlay()},i.prototype.stop=function(){this.video.stop()},i.prototype.mute=function(e){return this.video.mute(e)},i.prototype.volume=function(e){return this.video.volume(e)},i.prototype.fullscreen=function(e){return this.video.fullscreen(e)},i.prototype.load=function(e,t){this.errortips.clear(),this.loading.show(),this.video.load(e||this.options.src,t)},i.prototype.playing=function(){return this.video&&this.video.playing()},i.prototype.paused=function(){return this.video&&this.video.paused()},i}()},function(e,t,i){var o=i(7);\"string\"==typeof o&&(o=[[e.id,o,\"\"]]),i(22)(o,{}),o.locals&&(e.exports=o.locals)},function(e,t,i){(e.exports=i(8)()).push([e.id,\".vcp-player{position:relative;z-index:0;font-family:Tahoma,\\\\\\\\5FAE\\\\8F6F\\\\96C5\\\\9ED1,\\\\u5b8b\\\\u4f53,Verdana,Arial,sans-serif;background-color:#000}.vcp-player video{display:block;overflow:hidden}.vcp-fullscreen.vcp-player,.vcp-fullscreen video,body.vcp-full-window{width:100%!important;height:100%!important}body.vcp-full-window{overflow-y:auto}.vcp-full-window .vcp-player{position:fixed;left:0;top:0;z-index:2147483647}.vcp-pre-flash,.vcp-video{width:100%;height:100%}.vcp-pre-flash{z-index:999;background:#000;position:absolute;top:0;left:0}.vcp-controls-panel{position:absolute;bottom:0;width:100%;font-size:16px;height:3em;z-index:1000}.vcp-controls-panel.show{-webkit-animation:fadeIn ease .8s;animation:fadeIn ease .8s;animation-fill-mode:forwards;-webkit-animation-fill-mode:forwards}.vcp-controls-panel.hide{-webkit-animation:fadeOut ease .8s;animation:fadeOut ease .8s;animation-fill-mode:forwards;-webkit-animation-fill-mode:forwards}.vcp-panel-bg{width:100%;height:100%;position:absolute;left:0;top:0;background-color:#242424;opacity:.8;filter:alpha(opacity=80);z-index:1000}.vcp-playtoggle{cursor:pointer;position:relative;z-index:1001;width:3em;height:100%;float:left;background-image:url(\"+i(9)+\");background-image:url(\"+i(10)+\")\\\\0}.vcp-playtoggle:focus,.vcp-playtoggle:hover{background-color:#708090;opacity:.9;filter:alpha(opacity=90)}.touchable .vcp-playtoggle:hover{background-color:transparent;opacity:1}.vcp-playing .vcp-playtoggle{background-image:url(\"+i(11)+\");background-image:url(\"+i(12)+\")\\\\0}.vcp-bigplay{width:100%;height:80%;position:absolute;background-color:white\\\\0;filter:alpha(opacity=0);opacity:0;z-index:1000;top:0;left:0}.vcp-slider{position:relative;z-index:1001;float:left;background:#c4c4c4;height:10px;opacity:.8;filter:alpha(opacity=80);cursor:pointer}.vcp-slider .vcp-slider-track{width:0;height:100%;margin-top:0;opacity:1;filter:alpha(opacity=100);background-color:#1e90ff}.vcp-slider .vcp-slider-thumb{cursor:pointer;background-color:#fff;position:absolute;top:0;left:0;border-radius:1em!important;height:10px;margin-left:-5px;width:10px}.vcp-slider-vertical{position:relative;width:.5em;height:8em;top:-5.6em;z-index:1001;background-color:#1c1c1c;opacity:.9;filter:alpha(opacity=90);cursor:pointer}.vcp-slider-vertical .vcp-slider-track{background-color:#1275cf;width:.5em;height:100%;opacity:.8;filter:alpha(opacity=80)}.vcp-slider-vertical .vcp-slider-thumb{cursor:pointer;position:absolute;background-color:#f0f8ff;width:.8em;height:.8em;border-radius:.8em!important;margin-top:-.4em;top:0;left:-.15em}.vcp-timeline{top:-10px;left:0;height:10px;position:absolute;z-index:1001;width:100%}.vcp-timeline .vcp-slider-thumb{top:-4px}.vcp-timeline .vcp-slider{margin-top:8px;height:2px;width:100%}.vcp-timeline:hover .vcp-slider{margin-top:0;height:10px}.vcp-timeline:hover .vcp-slider-thumb{display:block;width:16px;height:16px;top:-3px;margin-left:-8px}.vcp-timelabel{display:inline-block;line-height:3em;float:left;color:#fff;padding:0 9px}.vcp-timelabel,.vcp-volume{height:3em;z-index:1001;position:relative}.vcp-volume{width:3em;cursor:pointer;float:right;background-color:transparent;opacity:.9;filter:alpha(opacity=90)}.vcp-volume-icon{background-image:url(\"+i(13)+\");background-image:url(\"+i(14)+\")\\\\0;display:inline-block;width:3em;height:3em;position:absolute;left:0;top:0}.vcp-volume-muted .vcp-volume-icon{background-image:url(\"+i(15)+\");background-image:url(\"+i(16)+\")\\\\0}.vcp-volume .vcp-slider-vertical{top:-8.4em;left:1em;display:none}.vcp-volume .vcp-slider-track{position:absolute;bottom:0}.vcp-volume:hover .vcp-slider-vertical{display:block}.vcp-volume .vcp-volume-bg{height:8.8em;width:2em;position:absolute;left:.25em;top:-8.8em;background:#242424;display:none}.vcp-volume:hover .vcp-slider-vertical,.vcp-volume:hover .vcp-volume-bg{display:block}.vcp-fullscreen-toggle{position:relative;width:3em;height:3em;float:right;cursor:pointer;z-index:1001;background-image:url(\"+i(17)+\");background-image:url(\"+i(18)+\")\\\\0}.vcp-fullscreen .vcp-fullscreen-toggle{background-image:url(\"+i(19)+\");background-image:url(\"+i(20)+')\\\\0}.vcp-loading{box-sizing:border-box;background-clip:padding-box;width:50px;height:50px;display:none;position:absolute;top:50%;left:50%;margin:-25px 0 0 -25px;text-indent:-9999em}.vcp-loading:before{box-sizing:inherit;content:\"\";display:block;width:100%;height:100%;border-radius:50%;border:3px solid hsla(0,0%,100%,0);border-left-color:#fff;border-right-color:#fff;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-animation:load8 1.1s infinite linear;animation:load8 1.1s infinite linear}@-webkit-keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.vcp-poster{position:absolute;left:0;top:0;overflow:hidden;z-index:1000;width:100%;height:100%;display:none}.vcp-poster-pic{position:relative}.vcp-poster-pic.cover,.vcp-poster-pic.default{left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.vcp-poster-pic.cover{width:100%}.vcp-poster-pic.stretch{width:100%;height:100%}.vcp-error-tips{position:absolute;z-index:1001;width:100%;height:4.5em;left:0;top:50%;color:#ff4500;margin-top:-5.25em;text-align:center;display:none}.vcp-clarityswitcher{height:3em;width:3em;cursor:pointer;position:relative;z-index:1001;float:right;background-color:transparent;opacity:.9}.vcp-vertical-switcher-container{width:3em;position:absolute;left:0;bottom:2.4em;background:#242424;display:none}.vcp-vertical-switcher-current{display:block;color:#fff;text-align:center;line-height:3em}.vcp-vertical-switcher-item{display:block;color:#fff;text-align:center;line-height:2em}.vcp-vertical-switcher-item.current{color:#888}.vcp-share>a{width:3em;height:3em;cursor:pointer;background-image:url('+i(21)+\");opacity:.9;display:block}.vcp-share{width:3em;height:3em;position:relative;float:right;z-index:1001}.vcp-vertical-share-container{width:auto;height:auto;position:absolute;background:rgba(36,36,36,.8);padding:.5em;overflow:hidden;display:none}@-webkit-keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.fadeOut{-webkit-animation:fadeOut ease .8s;animation:fadeOut ease .8s;animation-fill-mode:forwards;-webkit-animation-fill-mode:forwards}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.fadeIn{-webkit-animation:fadeIn ease .8s;animation:fadeIn ease .8s;animation-fill-mode:forwards;-webkit-animation-fill-mode:forwards}\",\"\"])},function(e,t){e.exports=function(){var s=[];return s.toString=function(){for(var e=[],t=0;t\\n \\n \\n \\n \\n \\n \\n \\n \\n\\n \\n \\n\\t\\t',this.container=r,this.owner=e,this.owner.appendChild(r),this.cover=a.createEl(\"div\",{class:\"vcp-pre-flash\"}),this.owner.appendChild(this.cover),window[this.__flashCB].fnObj[this.__id]=u.bind(this,this.notify)},n.prototype.setup=function(){this.on(\"error\",this.notify),this.playState=h.PlayStates.IDLE,this.seekState=h.SeekStates.IDLE,this.metaDataLoaded=!1},n.prototype.doPolling=function(){this.options.live||(clearInterval(this.__timer),this.__timer=setInterval(this.interval.bind(this),1e3))},n.prototype.endPolling=function(){clearInterval(this.__timer)},n.prototype.interval=function(){var e;try{e=this.el.getState()}catch(e){return void this.endPolling()}if(this.__m3u8){var t=this.currentTime()+e.bufferLength;this.__buffered!==t&&(this.__buffered=t,this.pub({type:l.MSG.Progress,src:this,ts:+new Date})),this.__buffered>=this.duration()&&this.endPolling()}else this.__rtmp||(this.__bytesloaded!=e.bytesLoaded&&(this.__bytesloaded=e.bytesLoaded,this.pub({type:l.MSG.Progress,src:this,ts:+new Date})),this.__bytesloaded>=this.__bytesTotal&&this.endPolling())},n.prototype.destroy=function(){void 0!==this.el&&void 0!==this.el.destroy&&this.el.destroy(),this.endPolling(),delete window[this.__flashCB].fnObj[this.__id],i.prototype.destroy.call(this)},n.prototype.notify=function(t,e){var i={type:t,ts:+new Date};try{switch(this.options.debug&&this.pub({type:i.type,src:this,ts:i.ts,detail:u.extend({debug:!0},e)}),i.type){case\"ready\":if(this.el=function(e){return window.document[e]?window.document[e]:-1!=navigator.appName.indexOf(\"Microsoft Internet\")?document.getElementById(e):document.embeds&&document.embeds[e]?document.embeds[e]:void 0}(this.__id),this.setup(),f.IS_FIREFOX){var o=this;setTimeout(function(){o.el.setAutoPlay(!!o.options.autoplay),o.__timebase=new Date-e.time,o.load(o.options.src)},0)}else this.el.setAutoPlay(!!this.options.autoplay),this.__timebase=new Date-e.time,this.load(this.options.src);return;case\"metaData\":i.type=l.MSG.MetaLoaded,this.__videoWidth=e.videoWidth,this.__videoHeight=e.videoHeight,this.__duration=e.duration,this.__bytesTotal=e.bytesTotal,this.__prevPlayState=null,this.__m3u8=e.type===u.VideoType.M3U8,this.__rtmp=e.type===u.VideoType.RTMP,this.__type=e.type,this.__metaloaded=!0,this.metaDataLoaded=!0,this.doPolling();var o=this;if(!o.cover)break;setTimeout(function(){o.cover&&(o.owner.removeChild(o.cover),o.cover=null)},500);break;case\"playState\":this.playState=e.playState,e.playState==h.PlayStates.PLAYING?(this.__playing=!0,this.__stopped=!1,i.type=l.MSG.Play):e.playState==h.PlayStates.PAUSED?(this.__playing=!1,this.__stopped=!1,i.type=l.MSG.Pause):e.playState==h.PlayStates.STOP?(this.__playing=!1,this.__stopped=!0,i.type=l.MSG.Ended,this.__prevPlayState=null,this.options.live&&(this.metaDataLoaded=!1)):e.playState==h.PlayStates.IDLE&&(this.__playing=!1,this.__stopped=!0,i.type=l.MSG.Ended);break;case\"seekState\":if(this.seekState=e.seekState,!this.__metaloaded)return;if(e.seekState==h.SeekStates.SEEKING)i.type=l.MSG.Seeking;else{if(e.seekState!=h.SeekStates.SEEKED)return;this.__m3u8||this.options.live||e.playState!=h.PlayStates.STOP||(this.play(),this.__prevPlayState=e.playState),this.__m3u8&&(i.type=l.MSG.Seeked)}break;case\"netStatus\":this.options.live||(\"NetStream.Buffer.Full\"==e.code?(this.__prevPlayState==h.PlayStates.PAUSED||(this.__prevPlayState,h.PlayStates.STOP),this.__prevPlayState=null,i.type=l.MSG.Seeked):e.code),\"NetConnection.Connect.Closed\"==e.code&&(-1 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","export * from \"-!../../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./live-video.vue?vue&type=style&index=1&id=e3faf61a&prod&lang=scss&scoped=true&\"","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ShowSwiper.vue?vue&type=style&index=0&id=6e2f591f&prod&scoped=true&lang=scss&\"","var render = function render(){var _vm=this,_c=_vm._self._c;return (_vm.actData)?_c('div',{staticClass:\"compinfo\"},[(_vm.actData.exhibitor)?_c('div',{staticClass:\"m-card\"},[_vm._m(0),_c('div',{staticClass:\"compinfo-main\"},[_c('div',{staticClass:\"top\"},[_c('div',{staticClass:\"logo\"},[(_vm.actData.company.logo)?_c('img',{attrs:{\"src\":_vm.actData.company.logo}}):_c('img',{attrs:{\"src\":require(\"@/assets/img/empty.png\")}})]),_c('div',[_c('div',{staticClass:\"compinfo-name\"},[_vm._v(_vm._s(_vm.actData.company.name))]),_c('div',{staticClass:\"compinfo-type\"},[(_vm.actData.company.region)?_c('div',{staticClass:\"u-booth\"},[_c('i',{staticClass:\"iconfont icon-dizhi icon\"}),_c('span',[_vm._v(_vm._s(_vm.actData.company.region))])]):_vm._e(),_c('div',{staticClass:\"u-category\"},[_c('i',{staticClass:\"iconfont icon-biaoqian1 icon\"}),_c('span',[_vm._v(_vm._s(_vm.actData.exhibitor.category))])])]),(_vm.actData.exhibitor.continuouNumber)?_c('div',{staticClass:\"product-renzheng\"},[_c('div',[(_vm.actData.exhibitor.continuouNumber > 7)?_c('img',{attrs:{\"src\":require(\"@/assets/img/jinpai.png\")}}):(_vm.actData.exhibitor.continuouNumber < 5)?_c('img',{attrs:{\"src\":require(\"@/assets/img/tongpai.png\")}}):_c('img',{attrs:{\"src\":require(\"@/assets/img/yinpai.png\")}})]),_c('span',[_vm._v(\" 连续5年参展 \")])]):_vm._e()])]),_c('div',{staticClass:\"center\"},[_c('div',[_c('div',{staticStyle:{\"color\":\"rgb(255, 94, 0)\",\"font-size\":\"18px\"}},[_vm._v(_vm._s(_vm.actData.exhibitor.productCount))]),_c('div',[_vm._v(\"展品\")])]),_c('div',[_c('div',{staticStyle:{\"color\":\"rgb(255, 94, 0)\",\"font-size\":\"18px\"}},[_vm._v(_vm._s(_vm.actData.exhibitor.activityCount))]),_c('div',[_vm._v(\"活动\")])])])])]):_vm._e(),_vm._m(1)]):_vm._e()\n}\nvar staticRenderFns = [function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"mc-top\"},[_c('div',{staticClass:\"mc-top-title\"},[_c('span',{staticClass:\"mc-top-text mc-top-txt s-bold\"},[_vm._v(\"公司信息\")])])])\n},function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"m-card\"},[_c('div',{staticClass:\"code\"},[_c('div',{staticClass:\"qrcode\",attrs:{\"id\":\"qrcode\"}}),_c('span',[_vm._v(\"扫码查看移动端\")])])])\n}]\n\nexport { render, staticRenderFns }","\r\n
\r\n \r\n
\r\n
\r\n
\r\n 公司信息\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
{{actData.company.name}}
\r\n
\r\n
\r\n \r\n {{actData.company.region}}\r\n
\r\n
\r\n \r\n {{actData.exhibitor.category}}\r\n
\r\n
\r\n
\r\n
\r\n 7\">\r\n \r\n \r\n
\r\n 连续5年参展 \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
{{actData.exhibitor.productCount}}
\r\n
展品
\r\n
\r\n
\r\n
{{actData.exhibitor.activityCount}}
\r\n
活动
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n 扫码查看移动端\r\n
\r\n
\r\n
\r\n\r\n\r\n","import mod from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./compInfo.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./compInfo.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./compInfo.vue?vue&type=template&id=031290a7&scoped=true&\"\nimport script from \"./compInfo.vue?vue&type=script&lang=js&\"\nexport * from \"./compInfo.vue?vue&type=script&lang=js&\"\nimport style0 from \"./compInfo.vue?vue&type=style&index=0&id=031290a7&prod&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"031290a7\",\n null\n \n)\n\nexport default component.exports","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAOCAYAAAAbvf3sAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAAsSAAALEgHS3X78AAACHUlEQVQoz3WQT0gUYRxA3/fN7Ky2f/JvkFpLUKkFZWWgFRboIchDx+riRYgOXrskREgRVjcRREKIjEAJKiLoJIQESYYVK7ZkZUWmWTrujjuj8/06WJ3qXd/hwSNf33TBa2wWEXHvT4Wu1f7zE7+Jtjwbuzo064qIO3uqzX+fqh0ge7m73MUSc29YREQOdnlSfUnamzoyhytbR8WISPjqhUxhy8L5zloAvPrj53KRCpEgkDsfRE5fnwhOnr3rdz0wIiLycdt+yRTv7PtTZvVhfzSb2jq32n9TRFyRTI+EEzfEF19WRkZkuqLSX+y7kgJQAP7MQI14wYT6nnecsgQmO4vWGpLl+PMexHRol8QP2VVtz20AmfM/6JKYY8o0C2+eEvyYRcQQSZaS3N2IlSy2Qtf9AqABROtWFRi8qXFyM2mUHUE7heS/vsOdHMPkVlBW5ASACl73dopd0BVmF1l8+QQViZLcdQQdieKmR1ldmqOorgWndAsmt9Rti1hxC00ICKCVwo4VYxXGUbYDYtaFEnCshAJYHu85E92QGFxOj+J9ThMtT6G0hT8/g1OymY17mlEhHc7e9h4bAGWGJFwbjG8/gIgh/20ajMEpqyJR3YCyLCTIDwPY6291naz6aKeAZE0DhRU7/l5SlkPo51DK2gc8Xt+KyaCso2tB3rMUxyJFm66hFCZYuSih90gpHUOY5H8Eb4d7/fTtW/9yvwDcXgdHrU9x9wAAAABJRU5ErkJggg==\"","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\r\n// These values are designed to match the ASP.NET Log Levels since that's the pattern we're emulating here.\r\n/** Indicates the severity of a log message.\r\n *\r\n * Log Levels are ordered in increasing severity. So `Debug` is more severe than `Trace`, etc.\r\n */\r\nexport var LogLevel;\r\n(function (LogLevel) {\r\n /** Log level for very low severity diagnostic messages. */\r\n LogLevel[LogLevel[\"Trace\"] = 0] = \"Trace\";\r\n /** Log level for low severity diagnostic messages. */\r\n LogLevel[LogLevel[\"Debug\"] = 1] = \"Debug\";\r\n /** Log level for informational diagnostic messages. */\r\n LogLevel[LogLevel[\"Information\"] = 2] = \"Information\";\r\n /** Log level for diagnostic messages that indicate a non-fatal problem. */\r\n LogLevel[LogLevel[\"Warning\"] = 3] = \"Warning\";\r\n /** Log level for diagnostic messages that indicate a failure in the current operation. */\r\n LogLevel[LogLevel[\"Error\"] = 4] = \"Error\";\r\n /** Log level for diagnostic messages that indicate a failure that will terminate the entire application. */\r\n LogLevel[LogLevel[\"Critical\"] = 5] = \"Critical\";\r\n /** The highest possible log level. Used when configuring logging to indicate that no log messages should be emitted. */\r\n LogLevel[LogLevel[\"None\"] = 6] = \"None\";\r\n})(LogLevel || (LogLevel = {}));\r\n//# sourceMappingURL=ILogger.js.map","var render = function render(){var _vm=this,_c=_vm._self._c;return _vm._m(0)\n}\nvar staticRenderFns = [function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"live-away\"},[_c('div',{staticClass:\"live-away-txt\"},[_vm._v(\"主播暂时不在,请稍等片刻~\")])])\n}]\n\nexport { render, staticRenderFns }","\r\n \r\n
\r\n \r\n
主播暂时不在,请稍等片刻~
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./live-away.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./live-away.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./live-away.vue?vue&type=template&id=22a2ecb3&scoped=true&\"\nimport script from \"./live-away.vue?vue&type=script&lang=js&\"\nexport * from \"./live-away.vue?vue&type=script&lang=js&\"\nimport style0 from \"./live-away.vue?vue&type=style&index=0&id=22a2ecb3&prod&scoped=true&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"22a2ecb3\",\n null\n \n)\n\nexport default component.exports","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\r\n// Not exported from index\r\n/** @private */\r\nvar TextMessageFormat = /** @class */ (function () {\r\n function TextMessageFormat() {\r\n }\r\n TextMessageFormat.write = function (output) {\r\n return \"\" + output + TextMessageFormat.RecordSeparator;\r\n };\r\n TextMessageFormat.parse = function (input) {\r\n if (input[input.length - 1] !== TextMessageFormat.RecordSeparator) {\r\n throw new Error(\"Message is incomplete.\");\r\n }\r\n var messages = input.split(TextMessageFormat.RecordSeparator);\r\n messages.pop();\r\n return messages;\r\n };\r\n TextMessageFormat.RecordSeparatorCode = 0x1e;\r\n TextMessageFormat.RecordSeparator = String.fromCharCode(TextMessageFormat.RecordSeparatorCode);\r\n return TextMessageFormat;\r\n}());\r\nexport { TextMessageFormat };\r\n//# sourceMappingURL=TextMessageFormat.js.map","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\r\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n t[p] = s[p];\r\n }\r\n return t;\r\n};\r\n/** Represents an HTTP response. */\r\nvar HttpResponse = /** @class */ (function () {\r\n function HttpResponse(statusCode, statusText, content) {\r\n this.statusCode = statusCode;\r\n this.statusText = statusText;\r\n this.content = content;\r\n }\r\n return HttpResponse;\r\n}());\r\nexport { HttpResponse };\r\n/** Abstraction over an HTTP client.\r\n *\r\n * This class provides an abstraction over an HTTP client so that a different implementation can be provided on different platforms.\r\n */\r\nvar HttpClient = /** @class */ (function () {\r\n function HttpClient() {\r\n }\r\n HttpClient.prototype.get = function (url, options) {\r\n return this.send(__assign({}, options, { method: \"GET\", url: url }));\r\n };\r\n HttpClient.prototype.post = function (url, options) {\r\n return this.send(__assign({}, options, { method: \"POST\", url: url }));\r\n };\r\n HttpClient.prototype.delete = function (url, options) {\r\n return this.send(__assign({}, options, { method: \"DELETE\", url: url }));\r\n };\r\n /** Gets all cookies that apply to the specified URL.\r\n *\r\n * @param url The URL that the cookies are valid for.\r\n * @returns {string} A string containing all the key-value cookie pairs for the specified URL.\r\n */\r\n // @ts-ignore\r\n HttpClient.prototype.getCookieString = function (url) {\r\n return \"\";\r\n };\r\n return HttpClient;\r\n}());\r\nexport { HttpClient };\r\n//# sourceMappingURL=HttpClient.js.map","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkExRUMzOEU2MTM2MTExRUI5MEM5OUI1QjZFRkY1N0NBIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkExRUMzOEU3MTM2MTExRUI5MEM5OUI1QjZFRkY1N0NBIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTFFQzM4RTQxMzYxMTFFQjkwQzk5QjVCNkVGRjU3Q0EiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTFFQzM4RTUxMzYxMTFFQjkwQzk5QjVCNkVGRjU3Q0EiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5sK/sMAAADg0lEQVR42mRTbUxbVRh+zr23LbSX0naMwgCn3Vg3ZZAZw8BoYkacbj8kimsa3MZsFoMmLtl0mT/4ucx/+0oUxBnRbBrjppsZxuGMNZFlY4OMCqwDMmACZaUX+t3e23vv8dDtj+HknJyTN+c573mf533IIYfV98bh2nO6rOtXzgY8ubh+VSw0KeAAUKwahBCkU8sgMMBsKQJnMJLapo468uonz/Emnj/mftEZ5gSyi2qr0TzhEEstQbSXHLVWVPpUXYWgL5OuE8/+lNMpNXMZ/ra8rHeqshLIKmkUGEVwPLeSNv+AlIpife3zPR/5r7ct/NKD4weODAgK1YKJcI4VgJcz0MpC95dbDYVGh22NY38k9LBfBfoZXFPYM3Gg/v1jH7dZ7HYMdHbfZLERQaM6nBuLfKqsDyfGJDmmJyt3t37g2eVr9s5OPMDYjaH7wcC9f7a/tmN7LqtUWawFGLl0HpL4VJJDsJocFdcgmZQZKQRm0fiOlJSK65tb9h389HDDCg+Gmpcw7f8VRVVPI7sYwVJEgrmkDGJpCca+7oKQTaYQRzZPeC6JC1m2l1u1z3RBwPStW3CwwFqLgOGrvdj67nvg5v6FGk+gtNgIyWEG3yiYPA1eb1dt085Dmqy+vvhooXKH560GW5HJlMmoUGISnNteAJ0exczQIBylxXh45QeYtQSGfvsb5M/OL+kr7QeRyMgI9/8B2+YapMdHgLkJWFxu2DdshK5x4BkgFhhEJJqBuHUb+ru/TV78/IsmZJh+K2O0r4/ShQf586z/Gp365jSlqkTp4uzj+KMZSmNhtubydy607h16m5XL6UyjlKYBcoodokBoAuu2VCPNOk0bDwIOK6DqAGsaZJJAQSHudp/N/f7ded86gxlc8PYgwlIUUlaDOj8JRCZBUrOodlfg51Onkb47AFSUMYZZEsqoNloRmo+orCcalVwapOOZTadq9rTs13kDWbpzIy7PjN8sEK1CTtWXBgJjF13ry9s7+n5807SpjvEyD1jZj3gBf13qg//kma9IO6uDKWU2sE5jOdJP8kBgy2a0YU6JwlVW2vNh7/dt5e46yEyV0Wt+uJikw5d7QY6Y7U8gea/l5/8MxGw5mZaws7mFes51YjEwDEN5FVxb3Ojae2CCbzQUPjYLWQ1G3tEUIuERmpq6V+x07qn3emFfW4LLx0/o18+c3P2fAAMAO02lpddmgrUAAAAASUVORK5CYII=\"","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n t[p] = s[p];\r\n }\r\n return t;\r\n};\r\nimport { AbortError, HttpError, TimeoutError } from \"./Errors\";\r\nimport { HttpClient, HttpResponse } from \"./HttpClient\";\r\nimport { LogLevel } from \"./ILogger\";\r\nimport { isArrayBuffer } from \"./Utils\";\r\nvar requestModule;\r\nif (typeof XMLHttpRequest === \"undefined\") {\r\n // In order to ignore the dynamic require in webpack builds we need to do this magic\r\n // @ts-ignore: TS doesn't know about these names\r\n var requireFunc = typeof __webpack_require__ === \"function\" ? __non_webpack_require__ : require;\r\n requestModule = requireFunc(\"request\");\r\n}\r\n/** @private */\r\nvar NodeHttpClient = /** @class */ (function (_super) {\r\n __extends(NodeHttpClient, _super);\r\n function NodeHttpClient(logger) {\r\n var _this = _super.call(this) || this;\r\n if (typeof requestModule === \"undefined\") {\r\n throw new Error(\"The 'request' module could not be loaded.\");\r\n }\r\n _this.logger = logger;\r\n _this.cookieJar = requestModule.jar();\r\n _this.request = requestModule.defaults({ jar: _this.cookieJar });\r\n return _this;\r\n }\r\n NodeHttpClient.prototype.send = function (httpRequest) {\r\n var _this = this;\r\n // Check that abort was not signaled before calling send\r\n if (httpRequest.abortSignal) {\r\n if (httpRequest.abortSignal.aborted) {\r\n return Promise.reject(new AbortError());\r\n }\r\n }\r\n return new Promise(function (resolve, reject) {\r\n var requestBody;\r\n if (isArrayBuffer(httpRequest.content)) {\r\n requestBody = Buffer.from(httpRequest.content);\r\n }\r\n else {\r\n requestBody = httpRequest.content || \"\";\r\n }\r\n var currentRequest = _this.request(httpRequest.url, {\r\n body: requestBody,\r\n // If binary is expected 'null' should be used, otherwise for text 'utf8'\r\n encoding: httpRequest.responseType === \"arraybuffer\" ? null : \"utf8\",\r\n headers: __assign({ \r\n // Tell auth middleware to 401 instead of redirecting\r\n \"X-Requested-With\": \"XMLHttpRequest\" }, httpRequest.headers),\r\n method: httpRequest.method,\r\n timeout: httpRequest.timeout,\r\n }, function (error, response, body) {\r\n if (httpRequest.abortSignal) {\r\n httpRequest.abortSignal.onabort = null;\r\n }\r\n if (error) {\r\n if (error.code === \"ETIMEDOUT\") {\r\n _this.logger.log(LogLevel.Warning, \"Timeout from HTTP request.\");\r\n reject(new TimeoutError());\r\n }\r\n _this.logger.log(LogLevel.Warning, \"Error from HTTP request. \" + error);\r\n reject(error);\r\n return;\r\n }\r\n if (response.statusCode >= 200 && response.statusCode < 300) {\r\n resolve(new HttpResponse(response.statusCode, response.statusMessage || \"\", body));\r\n }\r\n else {\r\n reject(new HttpError(response.statusMessage || \"\", response.statusCode || 0));\r\n }\r\n });\r\n if (httpRequest.abortSignal) {\r\n httpRequest.abortSignal.onabort = function () {\r\n currentRequest.abort();\r\n reject(new AbortError());\r\n };\r\n }\r\n });\r\n };\r\n NodeHttpClient.prototype.getCookieString = function (url) {\r\n return this.cookieJar.getCookieString(url);\r\n };\r\n return NodeHttpClient;\r\n}(HttpClient));\r\nexport { NodeHttpClient };\r\n//# sourceMappingURL=NodeHttpClient.js.map","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./videoPlayer.vue?vue&type=style&index=0&id=3dd6c8c3&prod&lang=scss&scoped=true&\"","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\r\nimport { TextMessageFormat } from \"./TextMessageFormat\";\r\nimport { isArrayBuffer } from \"./Utils\";\r\n/** @private */\r\nvar HandshakeProtocol = /** @class */ (function () {\r\n function HandshakeProtocol() {\r\n }\r\n // Handshake request is always JSON\r\n HandshakeProtocol.prototype.writeHandshakeRequest = function (handshakeRequest) {\r\n return TextMessageFormat.write(JSON.stringify(handshakeRequest));\r\n };\r\n HandshakeProtocol.prototype.parseHandshakeResponse = function (data) {\r\n var responseMessage;\r\n var messageData;\r\n var remainingData;\r\n if (isArrayBuffer(data) || (typeof Buffer !== \"undefined\" && data instanceof Buffer)) {\r\n // Format is binary but still need to read JSON text from handshake response\r\n var binaryData = new Uint8Array(data);\r\n var separatorIndex = binaryData.indexOf(TextMessageFormat.RecordSeparatorCode);\r\n if (separatorIndex === -1) {\r\n throw new Error(\"Message is incomplete.\");\r\n }\r\n // content before separator is handshake response\r\n // optional content after is additional messages\r\n var responseLength = separatorIndex + 1;\r\n messageData = String.fromCharCode.apply(null, binaryData.slice(0, responseLength));\r\n remainingData = (binaryData.byteLength > responseLength) ? binaryData.slice(responseLength).buffer : null;\r\n }\r\n else {\r\n var textData = data;\r\n var separatorIndex = textData.indexOf(TextMessageFormat.RecordSeparator);\r\n if (separatorIndex === -1) {\r\n throw new Error(\"Message is incomplete.\");\r\n }\r\n // content before separator is handshake response\r\n // optional content after is additional messages\r\n var responseLength = separatorIndex + 1;\r\n messageData = textData.substring(0, responseLength);\r\n remainingData = (textData.length > responseLength) ? textData.substring(responseLength) : null;\r\n }\r\n // At this point we should have just the single handshake message\r\n var messages = TextMessageFormat.parse(messageData);\r\n var response = JSON.parse(messages[0]);\r\n if (response.type) {\r\n throw new Error(\"Expected a handshake response from the server.\");\r\n }\r\n responseMessage = response;\r\n // multiple messages could have arrived with handshake\r\n // return additional data to be parsed as usual, or null if all parsed\r\n return [remainingData, responseMessage];\r\n };\r\n return HandshakeProtocol;\r\n}());\r\nexport { HandshakeProtocol };\r\n//# sourceMappingURL=HandshakeProtocol.js.map","export * from \"-!../../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./compInfo.vue?vue&type=style&index=0&id=031290a7&prod&lang=scss&scoped=true&\"","export * from \"-!../../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./date.vue?vue&type=style&index=0&id=d653165e&prod&lang=scss&scoped=true&\"","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n};\r\nimport { LogLevel } from \"./ILogger\";\r\nimport { NullLogger } from \"./Loggers\";\r\n/** @private */\r\nvar Arg = /** @class */ (function () {\r\n function Arg() {\r\n }\r\n Arg.isRequired = function (val, name) {\r\n if (val === null || val === undefined) {\r\n throw new Error(\"The '\" + name + \"' argument is required.\");\r\n }\r\n };\r\n Arg.isIn = function (val, values, name) {\r\n // TypeScript enums have keys for **both** the name and the value of each enum member on the type itself.\r\n if (!(val in values)) {\r\n throw new Error(\"Unknown \" + name + \" value: \" + val + \".\");\r\n }\r\n };\r\n return Arg;\r\n}());\r\nexport { Arg };\r\n/** @private */\r\nvar Platform = /** @class */ (function () {\r\n function Platform() {\r\n }\r\n Object.defineProperty(Platform, \"isBrowser\", {\r\n get: function () {\r\n return typeof window === \"object\";\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Platform, \"isWebWorker\", {\r\n get: function () {\r\n return typeof self === \"object\" && \"importScripts\" in self;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Platform, \"isNode\", {\r\n get: function () {\r\n return !this.isBrowser && !this.isWebWorker;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return Platform;\r\n}());\r\nexport { Platform };\r\n/** @private */\r\nexport function getDataDetail(data, includeContent) {\r\n var detail = \"\";\r\n if (isArrayBuffer(data)) {\r\n detail = \"Binary data of length \" + data.byteLength;\r\n if (includeContent) {\r\n detail += \". Content: '\" + formatArrayBuffer(data) + \"'\";\r\n }\r\n }\r\n else if (typeof data === \"string\") {\r\n detail = \"String data of length \" + data.length;\r\n if (includeContent) {\r\n detail += \". Content: '\" + data + \"'\";\r\n }\r\n }\r\n return detail;\r\n}\r\n/** @private */\r\nexport function formatArrayBuffer(data) {\r\n var view = new Uint8Array(data);\r\n // Uint8Array.map only supports returning another Uint8Array?\r\n var str = \"\";\r\n view.forEach(function (num) {\r\n var pad = num < 16 ? \"0\" : \"\";\r\n str += \"0x\" + pad + num.toString(16) + \" \";\r\n });\r\n // Trim of trailing space.\r\n return str.substr(0, str.length - 1);\r\n}\r\n// Also in signalr-protocol-msgpack/Utils.ts\r\n/** @private */\r\nexport function isArrayBuffer(val) {\r\n return val && typeof ArrayBuffer !== \"undefined\" &&\r\n (val instanceof ArrayBuffer ||\r\n // Sometimes we get an ArrayBuffer that doesn't satisfy instanceof\r\n (val.constructor && val.constructor.name === \"ArrayBuffer\"));\r\n}\r\n/** @private */\r\nexport function sendMessage(logger, transportName, httpClient, url, accessTokenFactory, content, logMessageContent) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var _a, headers, token, responseType, response;\r\n return __generator(this, function (_b) {\r\n switch (_b.label) {\r\n case 0:\r\n if (!accessTokenFactory) return [3 /*break*/, 2];\r\n return [4 /*yield*/, accessTokenFactory()];\r\n case 1:\r\n token = _b.sent();\r\n if (token) {\r\n headers = (_a = {},\r\n _a[\"Authorization\"] = \"Bearer \" + token,\r\n _a);\r\n }\r\n _b.label = 2;\r\n case 2:\r\n logger.log(LogLevel.Trace, \"(\" + transportName + \" transport) sending data. \" + getDataDetail(content, logMessageContent) + \".\");\r\n responseType = isArrayBuffer(content) ? \"arraybuffer\" : \"text\";\r\n return [4 /*yield*/, httpClient.post(url, {\r\n content: content,\r\n headers: headers,\r\n responseType: responseType,\r\n })];\r\n case 3:\r\n response = _b.sent();\r\n logger.log(LogLevel.Trace, \"(\" + transportName + \" transport) request complete. Response status: \" + response.statusCode + \".\");\r\n return [2 /*return*/];\r\n }\r\n });\r\n });\r\n}\r\n/** @private */\r\nexport function createLogger(logger) {\r\n if (logger === undefined) {\r\n return new ConsoleLogger(LogLevel.Information);\r\n }\r\n if (logger === null) {\r\n return NullLogger.instance;\r\n }\r\n if (logger.log) {\r\n return logger;\r\n }\r\n return new ConsoleLogger(logger);\r\n}\r\n/** @private */\r\nvar SubjectSubscription = /** @class */ (function () {\r\n function SubjectSubscription(subject, observer) {\r\n this.subject = subject;\r\n this.observer = observer;\r\n }\r\n SubjectSubscription.prototype.dispose = function () {\r\n var index = this.subject.observers.indexOf(this.observer);\r\n if (index > -1) {\r\n this.subject.observers.splice(index, 1);\r\n }\r\n if (this.subject.observers.length === 0 && this.subject.cancelCallback) {\r\n this.subject.cancelCallback().catch(function (_) { });\r\n }\r\n };\r\n return SubjectSubscription;\r\n}());\r\nexport { SubjectSubscription };\r\n/** @private */\r\nvar ConsoleLogger = /** @class */ (function () {\r\n function ConsoleLogger(minimumLogLevel) {\r\n this.minimumLogLevel = minimumLogLevel;\r\n this.outputConsole = console;\r\n }\r\n ConsoleLogger.prototype.log = function (logLevel, message) {\r\n if (logLevel >= this.minimumLogLevel) {\r\n switch (logLevel) {\r\n case LogLevel.Critical:\r\n case LogLevel.Error:\r\n this.outputConsole.error(\"[\" + new Date().toISOString() + \"] \" + LogLevel[logLevel] + \": \" + message);\r\n break;\r\n case LogLevel.Warning:\r\n this.outputConsole.warn(\"[\" + new Date().toISOString() + \"] \" + LogLevel[logLevel] + \": \" + message);\r\n break;\r\n case LogLevel.Information:\r\n this.outputConsole.info(\"[\" + new Date().toISOString() + \"] \" + LogLevel[logLevel] + \": \" + message);\r\n break;\r\n default:\r\n // console.debug only goes to attached debuggers in Node, so we use console.log for Trace and Debug\r\n this.outputConsole.log(\"[\" + new Date().toISOString() + \"] \" + LogLevel[logLevel] + \": \" + message);\r\n break;\r\n }\r\n }\r\n };\r\n return ConsoleLogger;\r\n}());\r\nexport { ConsoleLogger };\r\n//# sourceMappingURL=Utils.js.map","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"page\"},[_c('VTcPlayer',{ref:\"tcPlayer\",attrs:{\"options\":_vm.options},on:{\"load\":_vm.onLoad,\"play\":_vm.onPlay}})],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n
\r\n \r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./live-video.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./live-video.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./live-video.vue?vue&type=template&id=e3faf61a&scoped=true&\"\nimport script from \"./live-video.vue?vue&type=script&lang=js&\"\nexport * from \"./live-video.vue?vue&type=script&lang=js&\"\nimport style0 from \"./live-video.vue?vue&type=style&index=0&id=e3faf61a&prod&lang=scss&\"\nimport style1 from \"./live-video.vue?vue&type=style&index=1&id=e3faf61a&prod&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"e3faf61a\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./imgLive.vue?vue&type=style&index=0&id=f539ea9a&prod&lang=scss&scoped=true&\"","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _vm._m(0)\n}\nvar staticRenderFns = [function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"live_dianzan\"},[_c('canvas',{staticStyle:{\"width\":\"100px\",\"height\":\"200px\"},attrs:{\"id\":\"thumsCanvas\",\"width\":\"200\",\"height\":\"400\"}})])\n}]\n\nexport { render, staticRenderFns }","\r\n
\r\n \r\n \r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./live-dianzan-canvas.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./live-dianzan-canvas.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./live-dianzan-canvas.vue?vue&type=template&id=7d4369e3&scoped=true&\"\nimport script from \"./live-dianzan-canvas.vue?vue&type=script&lang=js&\"\nexport * from \"./live-dianzan-canvas.vue?vue&type=script&lang=js&\"\nimport style0 from \"./live-dianzan-canvas.vue?vue&type=style&index=0&id=7d4369e3&prod&scoped=true&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"7d4369e3\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./live-video.vue?vue&type=style&index=0&id=e3faf61a&prod&lang=scss&\"","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAH0AAAB9BAMAAAB9rnEWAAAAFVBMVEX5+/3j8f3w9/3n8/3s9f30+f3p9P2VSfnYAAACe0lEQVRYw+2TTZOiMBCGexA803x4BhbmTIhwzmD0DI7OGT/W//8TtkMyZWXUw162aqvyUFawwkM6bxpwOBwOh8PhcDgcjv+KvPZiOIkxoXuGxOrJM5i99JcIKMbIwwECVERAfKAhzPGbAA322xjZAQ4fIfja0D5XMAzHJ75VgLLhI1zE8IaKWvtHxRemAJcGwOcCFD4m8AOP1q4XCaDQpQq7fq9ALIoco2I5F6QKW1sv0HY2ploatN/vbkV5u2b3/d93Elu+sf37nPL3G14UfE1+s+k2vGc4fCJ+YTJifLR8svPQR2Czn2g/1v9UfgOLfJxy3DOsaf8UY2P72hY6vtSsXzAsSlzR+gwFnOh9Xrye81vyyPb9WNlRoOM3vmQoJa62I1K9qnSKubuo/C48s31t07yO38o/HZHPsTA1b/jpj5E+xDl+46sTI7IR9xhzTHOaYTiBN3eojTc30AqQAOMvsIYFVZpjgXUw+6TO38jK5PfYAjp+4oSfGJIr6FciEZH/RrNBdzs99qC2Q/87fm/uFpGryrHgDHmb4/Gkv43lo092nqpjwJS6nvyYU+KDaWhTkTcHx0yPPG8BO97gqNCJlhJkT+NBSrkF4nULwF9it4CpLjMl0GioLOF1C6Tq2WMz7Onygmjw5msIehiA7mAfDI++h+YQcQ55l3atbLv2Vq3UmO4aeS5FA5vm9pt3LRAvW2BSZ5TVfd9MfdnX5349vdfl23QR5yBc0lCf4ZFFDCjoEHX8fF/vkmiSZTJdk2SS/fVXe2ujon1vu6lu4Am74SC8HqQE4tpnVbnNqqLS46ERRVWK7WFbZllWgcPhcDgcDofD4XD8S/4AncB/PDAjGDEAAAAASUVORK5CYII=\"","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n","export * from \"-!../../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./live-dianzan-canvas.vue?vue&type=style&index=0&id=7d4369e3&prod&scoped=true&lang=scss&\"","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\r\n/** A logger that does nothing when log messages are sent to it. */\r\nvar NullLogger = /** @class */ (function () {\r\n function NullLogger() {\r\n }\r\n /** @inheritDoc */\r\n // tslint:disable-next-line\r\n NullLogger.prototype.log = function (_logLevel, _message) {\r\n };\r\n /** The singleton instance of the {@link @microsoft/signalr.NullLogger}. */\r\n NullLogger.instance = new NullLogger();\r\n return NullLogger;\r\n}());\r\nexport { NullLogger };\r\n//# sourceMappingURL=Loggers.js.map","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAOCAYAAAAbvf3sAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAAsSAAALEgHS3X78AAACGklEQVQoz3WRP2gTcRzFP79fL00INteWkNO0i7FkiaGLUBz6BwcFQYpuIi4KDiKKYEUQF0HExc1VceqgDkXErkIRhEIsDWnRiqXVQJLLn0vSppfL3dfBVhd96+PxeY/Hztj4vHvt5p6INO+9dZvJO60l9qUmlzZffWo2RaT549RZ2ZqYmaMzdeZEyxgU+fldPBFJ3G7J0I3GuJr+eHnq+mcREXHfv5MvGFK8dGUIgDbMe6dnRUTk/qLIyUfV9vm55d03yx2RoCubiZQU4NYBmeaFi2PN4xN+L58XJxBpOI6IOCIi0l5YkI1jmfrWw8cDAArAFjni23Yx4nocGo7iNB26GAwODLBTrtMbNr3+mDkxpFROHVAcz/M6jmOsr65Sq9dRSnHYskhns/T1h+i12sPxeLyuAarV6rmg3WY9n2dre5tIJEIoFOLrxgbf1tbo63oAswCGbdt3w+Hwk3K5TLlcJplMks1m6fV6rKysUCwWGR0dJRqNvrBt+6gBRIIgQCmFiGAYBqZpsre39/sL9ac1QRBE1H6lWa3161wuZ1QqFSzLwvd9SqUSqVSKTCaD67pX4/H487+jHUdc16VQKFCpVNBaMzIyQjqdRilFt9sdtCzLUQClUimjlMqHw+GDMFprYrEYvu/jeR7ATCKR+GAAaK23gWnXdXeDIJg0TfOpiNDpdB5orRe11lEgz//UaDSe1Wq1l//yfgGLPhe0JHEl/QAAAABJRU5ErkJggg==\"","var render = function render(){var _vm=this,_c=_vm._self._c;return (_vm.dataList.length)?_c('div',[_vm._l((_vm.dataList),function(item,index){return _c('div',{key:index,staticClass:\"img-live\"},[_c('h3',[_vm._v(_vm._s(item.title || item.content))]),_c('p',[_vm._v(_vm._s(_vm._f(\"moment\")(item.createAt,\"YYYY/MM/DD HH:mm:ss\")))]),_c('div',{staticClass:\"img-live-list\",class:item.isShow ? 'over-img' : ''},_vm._l((item.images),function(c,index){return _c('img',{key:index,attrs:{\"src\":c.url},on:{\"click\":function($event){return _vm.imgClick(item.images)}}})}),0),_c('div',{staticClass:\"view-more\",class:item.isShow ? 'over-show' : 'over-hide',on:{\"click\":function($event){return _vm.open(item)}}},[_vm._v(\"查看更多\")])])}),_c('ShowSwiper',{attrs:{\"show\":_vm.show,\"imgList\":_vm.imgList}})],2):_vm._e()\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n
\r\n\r\n\r\n","import mod from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./imgLive.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./imgLive.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./imgLive.vue?vue&type=template&id=f539ea9a&scoped=true&\"\nimport script from \"./imgLive.vue?vue&type=script&lang=js&\"\nexport * from \"./imgLive.vue?vue&type=script&lang=js&\"\nimport style0 from \"./imgLive.vue?vue&type=style&index=0&id=f539ea9a&prod&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"f539ea9a\",\n null\n \n)\n\nexport default component.exports","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAOCAYAAAAbvf3sAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAAsSAAALEgHS3X78AAAB/ElEQVQoz3WQO0wUYRSFv3/+2V02y0tEMUKEGB+bEAwGscBHKOikszFqtNFCiaUVRo3ExEdjYYwJ0cJQiZrQaKuNJhgLKJSHsARQkEAgk91lZ3dmjsVCp6f97r3nnkOh43R/vqtHkryRydBzr67Ps6VEz+fRB8PLniRv+dxlf3Zf+iXZ+w93e7iK3r2RJHUO5HXwrq6c7Fs80dj7RaGkcPybpohp9WZ/KwC5o+evZd205EtDGenik+Hi2eu3/XsjkiTNNZ/SdM3x59vOhB/6Ern9qZXS4AtJU9LCAWmyQb5mtPnxkzJNKd8bvNQCYAC01pomlxjTH+Km3oC/DtZCMkW0YnGqgpCddJm6sVEXgKXKOepicdOQJchMEGULADhJF7f5EKTqLRv+bwCnTEwvBUO4MEe4WsBYMC6E6wHB/AxkS+A4ZwCMfnbewroDbOYpZsYwrovblAYnRvBrAuU3ibUcxlTvgrz/yAVTiSygrQoiTKIK4kmMjZC2kYW4U1UO/aPjAhXJoXBxnGDNw1bHwXGIvAJOKobbfAyC4IZJf33qbF19TRRh96SxdbVEuWJ5uKoS29gGjgUFbwHKLWHaCYtg47h729COjfJrFbVgDQQFMKYdWCovGGcaTDelYg7HdptUzWMAguAOpeA9jkmB+c7/pPnWZ5o98upf7C8DWukeAnroXgAAAABJRU5ErkJggg==\"","export * from \"-!../../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./live-away.vue?vue&type=style&index=0&id=22a2ecb3&prod&scoped=true&lang=scss&\"","var render = function render(){var _vm=this,_c=_vm._self._c;return (_vm.show==true)?_c('div',{staticClass:\"modal-carousel\"},[_c('div',{staticClass:\"modal-carousel-mask\"}),_c('div',{staticClass:\"carousel\"},[_c('Carousel',{model:{value:(_vm.value1),callback:function ($$v) {_vm.value1=$$v},expression:\"value1\"}},_vm._l((_vm.imgList),function(item,index){return _c('CarouselItem',{key:index},[_c('div',{staticClass:\"demo-carousel\"},[_c('img',{staticStyle:{\"width\":\"800px\",\"height\":\"800px\"},attrs:{\"src\":item}})])])}),1)],1),_c('div',{staticClass:\"guanbi\",on:{\"click\":function($event){$event.stopPropagation();return _vm.childMethod.apply(null, arguments)}}},[_c('i',{staticClass:\"iconfont icon-guanbi\"})])]):_vm._e()\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n\r\n \r\n
\r\n\r\n
\r\n \r\n\r\n \r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ShowSwiper.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ShowSwiper.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ShowSwiper.vue?vue&type=template&id=6e2f591f&scoped=true&\"\nimport script from \"./ShowSwiper.vue?vue&type=script&lang=js&\"\nexport * from \"./ShowSwiper.vue?vue&type=script&lang=js&\"\nimport style0 from \"./ShowSwiper.vue?vue&type=style&index=0&id=6e2f591f&prod&scoped=true&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"6e2f591f\",\n null\n \n)\n\nexport default component.exports","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\r\n/** Defines the type of a Hub Message. */\r\nexport var MessageType;\r\n(function (MessageType) {\r\n /** Indicates the message is an Invocation message and implements the {@link @microsoft/signalr.InvocationMessage} interface. */\r\n MessageType[MessageType[\"Invocation\"] = 1] = \"Invocation\";\r\n /** Indicates the message is a StreamItem message and implements the {@link @microsoft/signalr.StreamItemMessage} interface. */\r\n MessageType[MessageType[\"StreamItem\"] = 2] = \"StreamItem\";\r\n /** Indicates the message is a Completion message and implements the {@link @microsoft/signalr.CompletionMessage} interface. */\r\n MessageType[MessageType[\"Completion\"] = 3] = \"Completion\";\r\n /** Indicates the message is a Stream Invocation message and implements the {@link @microsoft/signalr.StreamInvocationMessage} interface. */\r\n MessageType[MessageType[\"StreamInvocation\"] = 4] = \"StreamInvocation\";\r\n /** Indicates the message is a Cancel Invocation message and implements the {@link @microsoft/signalr.CancelInvocationMessage} interface. */\r\n MessageType[MessageType[\"CancelInvocation\"] = 5] = \"CancelInvocation\";\r\n /** Indicates the message is a Ping message and implements the {@link @microsoft/signalr.PingMessage} interface. */\r\n MessageType[MessageType[\"Ping\"] = 6] = \"Ping\";\r\n /** Indicates the message is a Close message and implements the {@link @microsoft/signalr.CloseMessage} interface. */\r\n MessageType[MessageType[\"Close\"] = 7] = \"Close\";\r\n})(MessageType || (MessageType = {}));\r\n//# sourceMappingURL=IHubProtocol.js.map","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nimport { AbortError, HttpError, TimeoutError } from \"./Errors\";\r\nimport { HttpClient, HttpResponse } from \"./HttpClient\";\r\nimport { LogLevel } from \"./ILogger\";\r\nvar XhrHttpClient = /** @class */ (function (_super) {\r\n __extends(XhrHttpClient, _super);\r\n function XhrHttpClient(logger) {\r\n var _this = _super.call(this) || this;\r\n _this.logger = logger;\r\n return _this;\r\n }\r\n /** @inheritDoc */\r\n XhrHttpClient.prototype.send = function (request) {\r\n var _this = this;\r\n // Check that abort was not signaled before calling send\r\n if (request.abortSignal && request.abortSignal.aborted) {\r\n return Promise.reject(new AbortError());\r\n }\r\n if (!request.method) {\r\n return Promise.reject(new Error(\"No method defined.\"));\r\n }\r\n if (!request.url) {\r\n return Promise.reject(new Error(\"No url defined.\"));\r\n }\r\n return new Promise(function (resolve, reject) {\r\n var xhr = new XMLHttpRequest();\r\n xhr.open(request.method, request.url, true);\r\n xhr.withCredentials = true;\r\n xhr.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\r\n // Explicitly setting the Content-Type header for React Native on Android platform.\r\n xhr.setRequestHeader(\"Content-Type\", \"text/plain;charset=UTF-8\");\r\n var headers = request.headers;\r\n if (headers) {\r\n Object.keys(headers)\r\n .forEach(function (header) {\r\n xhr.setRequestHeader(header, headers[header]);\r\n });\r\n }\r\n if (request.responseType) {\r\n xhr.responseType = request.responseType;\r\n }\r\n if (request.abortSignal) {\r\n request.abortSignal.onabort = function () {\r\n xhr.abort();\r\n reject(new AbortError());\r\n };\r\n }\r\n if (request.timeout) {\r\n xhr.timeout = request.timeout;\r\n }\r\n xhr.onload = function () {\r\n if (request.abortSignal) {\r\n request.abortSignal.onabort = null;\r\n }\r\n if (xhr.status >= 200 && xhr.status < 300) {\r\n resolve(new HttpResponse(xhr.status, xhr.statusText, xhr.response || xhr.responseText));\r\n }\r\n else {\r\n reject(new HttpError(xhr.statusText, xhr.status));\r\n }\r\n };\r\n xhr.onerror = function () {\r\n _this.logger.log(LogLevel.Warning, \"Error from HTTP request. \" + xhr.status + \": \" + xhr.statusText + \".\");\r\n reject(new HttpError(xhr.statusText, xhr.status));\r\n };\r\n xhr.ontimeout = function () {\r\n _this.logger.log(LogLevel.Warning, \"Timeout from HTTP request.\");\r\n reject(new TimeoutError());\r\n };\r\n xhr.send(request.content || \"\");\r\n });\r\n };\r\n return XhrHttpClient;\r\n}(HttpClient));\r\nexport { XhrHttpClient };\r\n//# sourceMappingURL=XhrHttpClient.js.map","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nimport { AbortError } from \"./Errors\";\r\nimport { HttpClient } from \"./HttpClient\";\r\nimport { NodeHttpClient } from \"./NodeHttpClient\";\r\nimport { XhrHttpClient } from \"./XhrHttpClient\";\r\n/** Default implementation of {@link @microsoft/signalr.HttpClient}. */\r\nvar DefaultHttpClient = /** @class */ (function (_super) {\r\n __extends(DefaultHttpClient, _super);\r\n /** Creates a new instance of the {@link @microsoft/signalr.DefaultHttpClient}, using the provided {@link @microsoft/signalr.ILogger} to log messages. */\r\n function DefaultHttpClient(logger) {\r\n var _this = _super.call(this) || this;\r\n if (typeof XMLHttpRequest !== \"undefined\") {\r\n _this.httpClient = new XhrHttpClient(logger);\r\n }\r\n else {\r\n _this.httpClient = new NodeHttpClient(logger);\r\n }\r\n return _this;\r\n }\r\n /** @inheritDoc */\r\n DefaultHttpClient.prototype.send = function (request) {\r\n // Check that abort was not signaled before calling send\r\n if (request.abortSignal && request.abortSignal.aborted) {\r\n return Promise.reject(new AbortError());\r\n }\r\n if (!request.method) {\r\n return Promise.reject(new Error(\"No method defined.\"));\r\n }\r\n if (!request.url) {\r\n return Promise.reject(new Error(\"No url defined.\"));\r\n }\r\n return this.httpClient.send(request);\r\n };\r\n DefaultHttpClient.prototype.getCookieString = function (url) {\r\n return this.httpClient.getCookieString(url);\r\n };\r\n return DefaultHttpClient;\r\n}(HttpClient));\r\nexport { DefaultHttpClient };\r\n//# sourceMappingURL=DefaultHttpClient.js.map","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n};\r\nimport { HandshakeProtocol } from \"./HandshakeProtocol\";\r\nimport { MessageType } from \"./IHubProtocol\";\r\nimport { LogLevel } from \"./ILogger\";\r\nimport { Subject } from \"./Subject\";\r\nimport { Arg } from \"./Utils\";\r\nvar DEFAULT_TIMEOUT_IN_MS = 30 * 1000;\r\nvar DEFAULT_PING_INTERVAL_IN_MS = 15 * 1000;\r\n/** Describes the current state of the {@link HubConnection} to the server. */\r\nexport var HubConnectionState;\r\n(function (HubConnectionState) {\r\n /** The hub connection is disconnected. */\r\n HubConnectionState[\"Disconnected\"] = \"Disconnected\";\r\n /** The hub connection is connecting. */\r\n HubConnectionState[\"Connecting\"] = \"Connecting\";\r\n /** The hub connection is connected. */\r\n HubConnectionState[\"Connected\"] = \"Connected\";\r\n /** The hub connection is disconnecting. */\r\n HubConnectionState[\"Disconnecting\"] = \"Disconnecting\";\r\n /** The hub connection is reconnecting. */\r\n HubConnectionState[\"Reconnecting\"] = \"Reconnecting\";\r\n})(HubConnectionState || (HubConnectionState = {}));\r\n/** Represents a connection to a SignalR Hub. */\r\nvar HubConnection = /** @class */ (function () {\r\n function HubConnection(connection, logger, protocol, reconnectPolicy) {\r\n var _this = this;\r\n this.nextKeepAlive = 0;\r\n Arg.isRequired(connection, \"connection\");\r\n Arg.isRequired(logger, \"logger\");\r\n Arg.isRequired(protocol, \"protocol\");\r\n this.serverTimeoutInMilliseconds = DEFAULT_TIMEOUT_IN_MS;\r\n this.keepAliveIntervalInMilliseconds = DEFAULT_PING_INTERVAL_IN_MS;\r\n this.logger = logger;\r\n this.protocol = protocol;\r\n this.connection = connection;\r\n this.reconnectPolicy = reconnectPolicy;\r\n this.handshakeProtocol = new HandshakeProtocol();\r\n this.connection.onreceive = function (data) { return _this.processIncomingData(data); };\r\n this.connection.onclose = function (error) { return _this.connectionClosed(error); };\r\n this.callbacks = {};\r\n this.methods = {};\r\n this.closedCallbacks = [];\r\n this.reconnectingCallbacks = [];\r\n this.reconnectedCallbacks = [];\r\n this.invocationId = 0;\r\n this.receivedHandshakeResponse = false;\r\n this.connectionState = HubConnectionState.Disconnected;\r\n this.connectionStarted = false;\r\n this.cachedPingMessage = this.protocol.writeMessage({ type: MessageType.Ping });\r\n }\r\n /** @internal */\r\n // Using a public static factory method means we can have a private constructor and an _internal_\r\n // create method that can be used by HubConnectionBuilder. An \"internal\" constructor would just\r\n // be stripped away and the '.d.ts' file would have no constructor, which is interpreted as a\r\n // public parameter-less constructor.\r\n HubConnection.create = function (connection, logger, protocol, reconnectPolicy) {\r\n return new HubConnection(connection, logger, protocol, reconnectPolicy);\r\n };\r\n Object.defineProperty(HubConnection.prototype, \"state\", {\r\n /** Indicates the state of the {@link HubConnection} to the server. */\r\n get: function () {\r\n return this.connectionState;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(HubConnection.prototype, \"connectionId\", {\r\n /** Represents the connection id of the {@link HubConnection} on the server. The connection id will be null when the connection is either\r\n * in the disconnected state or if the negotiation step was skipped.\r\n */\r\n get: function () {\r\n return this.connection ? (this.connection.connectionId || null) : null;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(HubConnection.prototype, \"baseUrl\", {\r\n /** Indicates the url of the {@link HubConnection} to the server. */\r\n get: function () {\r\n return this.connection.baseUrl || \"\";\r\n },\r\n /**\r\n * Sets a new url for the HubConnection. Note that the url can only be changed when the connection is in either the Disconnected or\r\n * Reconnecting states.\r\n * @param {string} url The url to connect to.\r\n */\r\n set: function (url) {\r\n if (this.connectionState !== HubConnectionState.Disconnected && this.connectionState !== HubConnectionState.Reconnecting) {\r\n throw new Error(\"The HubConnection must be in the Disconnected or Reconnecting state to change the url.\");\r\n }\r\n if (!url) {\r\n throw new Error(\"The HubConnection url must be a valid url.\");\r\n }\r\n this.connection.baseUrl = url;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /** Starts the connection.\r\n *\r\n * @returns {Promise} A Promise that resolves when the connection has been successfully established, or rejects with an error.\r\n */\r\n HubConnection.prototype.start = function () {\r\n this.startPromise = this.startWithStateTransitions();\r\n return this.startPromise;\r\n };\r\n HubConnection.prototype.startWithStateTransitions = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var e_1;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n if (this.connectionState !== HubConnectionState.Disconnected) {\r\n return [2 /*return*/, Promise.reject(new Error(\"Cannot start a HubConnection that is not in the 'Disconnected' state.\"))];\r\n }\r\n this.connectionState = HubConnectionState.Connecting;\r\n this.logger.log(LogLevel.Debug, \"Starting HubConnection.\");\r\n _a.label = 1;\r\n case 1:\r\n _a.trys.push([1, 3, , 4]);\r\n return [4 /*yield*/, this.startInternal()];\r\n case 2:\r\n _a.sent();\r\n this.connectionState = HubConnectionState.Connected;\r\n this.connectionStarted = true;\r\n this.logger.log(LogLevel.Debug, \"HubConnection connected successfully.\");\r\n return [3 /*break*/, 4];\r\n case 3:\r\n e_1 = _a.sent();\r\n this.connectionState = HubConnectionState.Disconnected;\r\n this.logger.log(LogLevel.Debug, \"HubConnection failed to start successfully because of error '\" + e_1 + \"'.\");\r\n return [2 /*return*/, Promise.reject(e_1)];\r\n case 4: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n HubConnection.prototype.startInternal = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var handshakePromise, handshakeRequest, e_2;\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n this.stopDuringStartError = undefined;\r\n this.receivedHandshakeResponse = false;\r\n handshakePromise = new Promise(function (resolve, reject) {\r\n _this.handshakeResolver = resolve;\r\n _this.handshakeRejecter = reject;\r\n });\r\n return [4 /*yield*/, this.connection.start(this.protocol.transferFormat)];\r\n case 1:\r\n _a.sent();\r\n _a.label = 2;\r\n case 2:\r\n _a.trys.push([2, 5, , 7]);\r\n handshakeRequest = {\r\n protocol: this.protocol.name,\r\n version: this.protocol.version,\r\n };\r\n this.logger.log(LogLevel.Debug, \"Sending handshake request.\");\r\n return [4 /*yield*/, this.sendMessage(this.handshakeProtocol.writeHandshakeRequest(handshakeRequest))];\r\n case 3:\r\n _a.sent();\r\n this.logger.log(LogLevel.Information, \"Using HubProtocol '\" + this.protocol.name + \"'.\");\r\n // defensively cleanup timeout in case we receive a message from the server before we finish start\r\n this.cleanupTimeout();\r\n this.resetTimeoutPeriod();\r\n this.resetKeepAliveInterval();\r\n return [4 /*yield*/, handshakePromise];\r\n case 4:\r\n _a.sent();\r\n // It's important to check the stopDuringStartError instead of just relying on the handshakePromise\r\n // being rejected on close, because this continuation can run after both the handshake completed successfully\r\n // and the connection was closed.\r\n if (this.stopDuringStartError) {\r\n // It's important to throw instead of returning a rejected promise, because we don't want to allow any state\r\n // transitions to occur between now and the calling code observing the exceptions. Returning a rejected promise\r\n // will cause the calling continuation to get scheduled to run later.\r\n throw this.stopDuringStartError;\r\n }\r\n return [3 /*break*/, 7];\r\n case 5:\r\n e_2 = _a.sent();\r\n this.logger.log(LogLevel.Debug, \"Hub handshake failed with error '\" + e_2 + \"' during start(). Stopping HubConnection.\");\r\n this.cleanupTimeout();\r\n this.cleanupPingTimer();\r\n // HttpConnection.stop() should not complete until after the onclose callback is invoked.\r\n // This will transition the HubConnection to the disconnected state before HttpConnection.stop() completes.\r\n return [4 /*yield*/, this.connection.stop(e_2)];\r\n case 6:\r\n // HttpConnection.stop() should not complete until after the onclose callback is invoked.\r\n // This will transition the HubConnection to the disconnected state before HttpConnection.stop() completes.\r\n _a.sent();\r\n throw e_2;\r\n case 7: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n /** Stops the connection.\r\n *\r\n * @returns {Promise} A Promise that resolves when the connection has been successfully terminated, or rejects with an error.\r\n */\r\n HubConnection.prototype.stop = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var startPromise, e_3;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n startPromise = this.startPromise;\r\n this.stopPromise = this.stopInternal();\r\n return [4 /*yield*/, this.stopPromise];\r\n case 1:\r\n _a.sent();\r\n _a.label = 2;\r\n case 2:\r\n _a.trys.push([2, 4, , 5]);\r\n // Awaiting undefined continues immediately\r\n return [4 /*yield*/, startPromise];\r\n case 3:\r\n // Awaiting undefined continues immediately\r\n _a.sent();\r\n return [3 /*break*/, 5];\r\n case 4:\r\n e_3 = _a.sent();\r\n return [3 /*break*/, 5];\r\n case 5: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n HubConnection.prototype.stopInternal = function (error) {\r\n if (this.connectionState === HubConnectionState.Disconnected) {\r\n this.logger.log(LogLevel.Debug, \"Call to HubConnection.stop(\" + error + \") ignored because it is already in the disconnected state.\");\r\n return Promise.resolve();\r\n }\r\n if (this.connectionState === HubConnectionState.Disconnecting) {\r\n this.logger.log(LogLevel.Debug, \"Call to HttpConnection.stop(\" + error + \") ignored because the connection is already in the disconnecting state.\");\r\n return this.stopPromise;\r\n }\r\n this.connectionState = HubConnectionState.Disconnecting;\r\n this.logger.log(LogLevel.Debug, \"Stopping HubConnection.\");\r\n if (this.reconnectDelayHandle) {\r\n // We're in a reconnect delay which means the underlying connection is currently already stopped.\r\n // Just clear the handle to stop the reconnect loop (which no one is waiting on thankfully) and\r\n // fire the onclose callbacks.\r\n this.logger.log(LogLevel.Debug, \"Connection stopped during reconnect delay. Done reconnecting.\");\r\n clearTimeout(this.reconnectDelayHandle);\r\n this.reconnectDelayHandle = undefined;\r\n this.completeClose();\r\n return Promise.resolve();\r\n }\r\n this.cleanupTimeout();\r\n this.cleanupPingTimer();\r\n this.stopDuringStartError = error || new Error(\"The connection was stopped before the hub handshake could complete.\");\r\n // HttpConnection.stop() should not complete until after either HttpConnection.start() fails\r\n // or the onclose callback is invoked. The onclose callback will transition the HubConnection\r\n // to the disconnected state if need be before HttpConnection.stop() completes.\r\n return this.connection.stop(error);\r\n };\r\n /** Invokes a streaming hub method on the server using the specified name and arguments.\r\n *\r\n * @typeparam T The type of the items returned by the server.\r\n * @param {string} methodName The name of the server method to invoke.\r\n * @param {any[]} args The arguments used to invoke the server method.\r\n * @returns {IStreamResult} An object that yields results from the server as they are received.\r\n */\r\n HubConnection.prototype.stream = function (methodName) {\r\n var _this = this;\r\n var args = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n args[_i - 1] = arguments[_i];\r\n }\r\n var _a = this.replaceStreamingParams(args), streams = _a[0], streamIds = _a[1];\r\n var invocationDescriptor = this.createStreamInvocation(methodName, args, streamIds);\r\n var promiseQueue;\r\n var subject = new Subject();\r\n subject.cancelCallback = function () {\r\n var cancelInvocation = _this.createCancelInvocation(invocationDescriptor.invocationId);\r\n delete _this.callbacks[invocationDescriptor.invocationId];\r\n return promiseQueue.then(function () {\r\n return _this.sendWithProtocol(cancelInvocation);\r\n });\r\n };\r\n this.callbacks[invocationDescriptor.invocationId] = function (invocationEvent, error) {\r\n if (error) {\r\n subject.error(error);\r\n return;\r\n }\r\n else if (invocationEvent) {\r\n // invocationEvent will not be null when an error is not passed to the callback\r\n if (invocationEvent.type === MessageType.Completion) {\r\n if (invocationEvent.error) {\r\n subject.error(new Error(invocationEvent.error));\r\n }\r\n else {\r\n subject.complete();\r\n }\r\n }\r\n else {\r\n subject.next((invocationEvent.item));\r\n }\r\n }\r\n };\r\n promiseQueue = this.sendWithProtocol(invocationDescriptor)\r\n .catch(function (e) {\r\n subject.error(e);\r\n delete _this.callbacks[invocationDescriptor.invocationId];\r\n });\r\n this.launchStreams(streams, promiseQueue);\r\n return subject;\r\n };\r\n HubConnection.prototype.sendMessage = function (message) {\r\n this.resetKeepAliveInterval();\r\n return this.connection.send(message);\r\n };\r\n /**\r\n * Sends a js object to the server.\r\n * @param message The js object to serialize and send.\r\n */\r\n HubConnection.prototype.sendWithProtocol = function (message) {\r\n return this.sendMessage(this.protocol.writeMessage(message));\r\n };\r\n /** Invokes a hub method on the server using the specified name and arguments. Does not wait for a response from the receiver.\r\n *\r\n * The Promise returned by this method resolves when the client has sent the invocation to the server. The server may still\r\n * be processing the invocation.\r\n *\r\n * @param {string} methodName The name of the server method to invoke.\r\n * @param {any[]} args The arguments used to invoke the server method.\r\n * @returns {Promise} A Promise that resolves when the invocation has been successfully sent, or rejects with an error.\r\n */\r\n HubConnection.prototype.send = function (methodName) {\r\n var args = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n args[_i - 1] = arguments[_i];\r\n }\r\n var _a = this.replaceStreamingParams(args), streams = _a[0], streamIds = _a[1];\r\n var sendPromise = this.sendWithProtocol(this.createInvocation(methodName, args, true, streamIds));\r\n this.launchStreams(streams, sendPromise);\r\n return sendPromise;\r\n };\r\n /** Invokes a hub method on the server using the specified name and arguments.\r\n *\r\n * The Promise returned by this method resolves when the server indicates it has finished invoking the method. When the promise\r\n * resolves, the server has finished invoking the method. If the server method returns a result, it is produced as the result of\r\n * resolving the Promise.\r\n *\r\n * @typeparam T The expected return type.\r\n * @param {string} methodName The name of the server method to invoke.\r\n * @param {any[]} args The arguments used to invoke the server method.\r\n * @returns {Promise} A Promise that resolves with the result of the server method (if any), or rejects with an error.\r\n */\r\n HubConnection.prototype.invoke = function (methodName) {\r\n var _this = this;\r\n var args = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n args[_i - 1] = arguments[_i];\r\n }\r\n var _a = this.replaceStreamingParams(args), streams = _a[0], streamIds = _a[1];\r\n var invocationDescriptor = this.createInvocation(methodName, args, false, streamIds);\r\n var p = new Promise(function (resolve, reject) {\r\n // invocationId will always have a value for a non-blocking invocation\r\n _this.callbacks[invocationDescriptor.invocationId] = function (invocationEvent, error) {\r\n if (error) {\r\n reject(error);\r\n return;\r\n }\r\n else if (invocationEvent) {\r\n // invocationEvent will not be null when an error is not passed to the callback\r\n if (invocationEvent.type === MessageType.Completion) {\r\n if (invocationEvent.error) {\r\n reject(new Error(invocationEvent.error));\r\n }\r\n else {\r\n resolve(invocationEvent.result);\r\n }\r\n }\r\n else {\r\n reject(new Error(\"Unexpected message type: \" + invocationEvent.type));\r\n }\r\n }\r\n };\r\n var promiseQueue = _this.sendWithProtocol(invocationDescriptor)\r\n .catch(function (e) {\r\n reject(e);\r\n // invocationId will always have a value for a non-blocking invocation\r\n delete _this.callbacks[invocationDescriptor.invocationId];\r\n });\r\n _this.launchStreams(streams, promiseQueue);\r\n });\r\n return p;\r\n };\r\n /** Registers a handler that will be invoked when the hub method with the specified method name is invoked.\r\n *\r\n * @param {string} methodName The name of the hub method to define.\r\n * @param {Function} newMethod The handler that will be raised when the hub method is invoked.\r\n */\r\n HubConnection.prototype.on = function (methodName, newMethod) {\r\n if (!methodName || !newMethod) {\r\n return;\r\n }\r\n methodName = methodName.toLowerCase();\r\n if (!this.methods[methodName]) {\r\n this.methods[methodName] = [];\r\n }\r\n // Preventing adding the same handler multiple times.\r\n if (this.methods[methodName].indexOf(newMethod) !== -1) {\r\n return;\r\n }\r\n this.methods[methodName].push(newMethod);\r\n };\r\n HubConnection.prototype.off = function (methodName, method) {\r\n if (!methodName) {\r\n return;\r\n }\r\n methodName = methodName.toLowerCase();\r\n var handlers = this.methods[methodName];\r\n if (!handlers) {\r\n return;\r\n }\r\n if (method) {\r\n var removeIdx = handlers.indexOf(method);\r\n if (removeIdx !== -1) {\r\n handlers.splice(removeIdx, 1);\r\n if (handlers.length === 0) {\r\n delete this.methods[methodName];\r\n }\r\n }\r\n }\r\n else {\r\n delete this.methods[methodName];\r\n }\r\n };\r\n /** Registers a handler that will be invoked when the connection is closed.\r\n *\r\n * @param {Function} callback The handler that will be invoked when the connection is closed. Optionally receives a single argument containing the error that caused the connection to close (if any).\r\n */\r\n HubConnection.prototype.onclose = function (callback) {\r\n if (callback) {\r\n this.closedCallbacks.push(callback);\r\n }\r\n };\r\n /** Registers a handler that will be invoked when the connection starts reconnecting.\r\n *\r\n * @param {Function} callback The handler that will be invoked when the connection starts reconnecting. Optionally receives a single argument containing the error that caused the connection to start reconnecting (if any).\r\n */\r\n HubConnection.prototype.onreconnecting = function (callback) {\r\n if (callback) {\r\n this.reconnectingCallbacks.push(callback);\r\n }\r\n };\r\n /** Registers a handler that will be invoked when the connection successfully reconnects.\r\n *\r\n * @param {Function} callback The handler that will be invoked when the connection successfully reconnects.\r\n */\r\n HubConnection.prototype.onreconnected = function (callback) {\r\n if (callback) {\r\n this.reconnectedCallbacks.push(callback);\r\n }\r\n };\r\n HubConnection.prototype.processIncomingData = function (data) {\r\n this.cleanupTimeout();\r\n if (!this.receivedHandshakeResponse) {\r\n data = this.processHandshakeResponse(data);\r\n this.receivedHandshakeResponse = true;\r\n }\r\n // Data may have all been read when processing handshake response\r\n if (data) {\r\n // Parse the messages\r\n var messages = this.protocol.parseMessages(data, this.logger);\r\n for (var _i = 0, messages_1 = messages; _i < messages_1.length; _i++) {\r\n var message = messages_1[_i];\r\n switch (message.type) {\r\n case MessageType.Invocation:\r\n this.invokeClientMethod(message);\r\n break;\r\n case MessageType.StreamItem:\r\n case MessageType.Completion:\r\n var callback = this.callbacks[message.invocationId];\r\n if (callback) {\r\n if (message.type === MessageType.Completion) {\r\n delete this.callbacks[message.invocationId];\r\n }\r\n callback(message);\r\n }\r\n break;\r\n case MessageType.Ping:\r\n // Don't care about pings\r\n break;\r\n case MessageType.Close:\r\n this.logger.log(LogLevel.Information, \"Close message received from server.\");\r\n var error = message.error ? new Error(\"Server returned an error on close: \" + message.error) : undefined;\r\n if (message.allowReconnect === true) {\r\n // It feels wrong not to await connection.stop() here, but processIncomingData is called as part of an onreceive callback which is not async,\r\n // this is already the behavior for serverTimeout(), and HttpConnection.Stop() should catch and log all possible exceptions.\r\n // tslint:disable-next-line:no-floating-promises\r\n this.connection.stop(error);\r\n }\r\n else {\r\n // We cannot await stopInternal() here, but subsequent calls to stop() will await this if stopInternal() is still ongoing.\r\n this.stopPromise = this.stopInternal(error);\r\n }\r\n break;\r\n default:\r\n this.logger.log(LogLevel.Warning, \"Invalid message type: \" + message.type + \".\");\r\n break;\r\n }\r\n }\r\n }\r\n this.resetTimeoutPeriod();\r\n };\r\n HubConnection.prototype.processHandshakeResponse = function (data) {\r\n var _a;\r\n var responseMessage;\r\n var remainingData;\r\n try {\r\n _a = this.handshakeProtocol.parseHandshakeResponse(data), remainingData = _a[0], responseMessage = _a[1];\r\n }\r\n catch (e) {\r\n var message = \"Error parsing handshake response: \" + e;\r\n this.logger.log(LogLevel.Error, message);\r\n var error = new Error(message);\r\n this.handshakeRejecter(error);\r\n throw error;\r\n }\r\n if (responseMessage.error) {\r\n var message = \"Server returned handshake error: \" + responseMessage.error;\r\n this.logger.log(LogLevel.Error, message);\r\n var error = new Error(message);\r\n this.handshakeRejecter(error);\r\n throw error;\r\n }\r\n else {\r\n this.logger.log(LogLevel.Debug, \"Server handshake complete.\");\r\n }\r\n this.handshakeResolver();\r\n return remainingData;\r\n };\r\n HubConnection.prototype.resetKeepAliveInterval = function () {\r\n if (this.connection.features.inherentKeepAlive) {\r\n return;\r\n }\r\n // Set the time we want the next keep alive to be sent\r\n // Timer will be setup on next message receive\r\n this.nextKeepAlive = new Date().getTime() + this.keepAliveIntervalInMilliseconds;\r\n this.cleanupPingTimer();\r\n };\r\n HubConnection.prototype.resetTimeoutPeriod = function () {\r\n var _this = this;\r\n if (!this.connection.features || !this.connection.features.inherentKeepAlive) {\r\n // Set the timeout timer\r\n this.timeoutHandle = setTimeout(function () { return _this.serverTimeout(); }, this.serverTimeoutInMilliseconds);\r\n // Set keepAlive timer if there isn't one\r\n if (this.pingServerHandle === undefined) {\r\n var nextPing = this.nextKeepAlive - new Date().getTime();\r\n if (nextPing < 0) {\r\n nextPing = 0;\r\n }\r\n // The timer needs to be set from a networking callback to avoid Chrome timer throttling from causing timers to run once a minute\r\n this.pingServerHandle = setTimeout(function () { return __awaiter(_this, void 0, void 0, function () {\r\n var _a;\r\n return __generator(this, function (_b) {\r\n switch (_b.label) {\r\n case 0:\r\n if (!(this.connectionState === HubConnectionState.Connected)) return [3 /*break*/, 4];\r\n _b.label = 1;\r\n case 1:\r\n _b.trys.push([1, 3, , 4]);\r\n return [4 /*yield*/, this.sendMessage(this.cachedPingMessage)];\r\n case 2:\r\n _b.sent();\r\n return [3 /*break*/, 4];\r\n case 3:\r\n _a = _b.sent();\r\n // We don't care about the error. It should be seen elsewhere in the client.\r\n // The connection is probably in a bad or closed state now, cleanup the timer so it stops triggering\r\n this.cleanupPingTimer();\r\n return [3 /*break*/, 4];\r\n case 4: return [2 /*return*/];\r\n }\r\n });\r\n }); }, nextPing);\r\n }\r\n }\r\n };\r\n HubConnection.prototype.serverTimeout = function () {\r\n // The server hasn't talked to us in a while. It doesn't like us anymore ... :(\r\n // Terminate the connection, but we don't need to wait on the promise. This could trigger reconnecting.\r\n // tslint:disable-next-line:no-floating-promises\r\n this.connection.stop(new Error(\"Server timeout elapsed without receiving a message from the server.\"));\r\n };\r\n HubConnection.prototype.invokeClientMethod = function (invocationMessage) {\r\n var _this = this;\r\n var methods = this.methods[invocationMessage.target.toLowerCase()];\r\n if (methods) {\r\n try {\r\n methods.forEach(function (m) { return m.apply(_this, invocationMessage.arguments); });\r\n }\r\n catch (e) {\r\n this.logger.log(LogLevel.Error, \"A callback for the method \" + invocationMessage.target.toLowerCase() + \" threw error '\" + e + \"'.\");\r\n }\r\n if (invocationMessage.invocationId) {\r\n // This is not supported in v1. So we return an error to avoid blocking the server waiting for the response.\r\n var message = \"Server requested a response, which is not supported in this version of the client.\";\r\n this.logger.log(LogLevel.Error, message);\r\n // We don't want to wait on the stop itself.\r\n this.stopPromise = this.stopInternal(new Error(message));\r\n }\r\n }\r\n else {\r\n this.logger.log(LogLevel.Warning, \"No client method with the name '\" + invocationMessage.target + \"' found.\");\r\n }\r\n };\r\n HubConnection.prototype.connectionClosed = function (error) {\r\n this.logger.log(LogLevel.Debug, \"HubConnection.connectionClosed(\" + error + \") called while in state \" + this.connectionState + \".\");\r\n // Triggering this.handshakeRejecter is insufficient because it could already be resolved without the continuation having run yet.\r\n this.stopDuringStartError = this.stopDuringStartError || error || new Error(\"The underlying connection was closed before the hub handshake could complete.\");\r\n // If the handshake is in progress, start will be waiting for the handshake promise, so we complete it.\r\n // If it has already completed, this should just noop.\r\n if (this.handshakeResolver) {\r\n this.handshakeResolver();\r\n }\r\n this.cancelCallbacksWithError(error || new Error(\"Invocation canceled due to the underlying connection being closed.\"));\r\n this.cleanupTimeout();\r\n this.cleanupPingTimer();\r\n if (this.connectionState === HubConnectionState.Disconnecting) {\r\n this.completeClose(error);\r\n }\r\n else if (this.connectionState === HubConnectionState.Connected && this.reconnectPolicy) {\r\n // tslint:disable-next-line:no-floating-promises\r\n this.reconnect(error);\r\n }\r\n else if (this.connectionState === HubConnectionState.Connected) {\r\n this.completeClose(error);\r\n }\r\n // If none of the above if conditions were true were called the HubConnection must be in either:\r\n // 1. The Connecting state in which case the handshakeResolver will complete it and stopDuringStartError will fail it.\r\n // 2. The Reconnecting state in which case the handshakeResolver will complete it and stopDuringStartError will fail the current reconnect attempt\r\n // and potentially continue the reconnect() loop.\r\n // 3. The Disconnected state in which case we're already done.\r\n };\r\n HubConnection.prototype.completeClose = function (error) {\r\n var _this = this;\r\n if (this.connectionStarted) {\r\n this.connectionState = HubConnectionState.Disconnected;\r\n this.connectionStarted = false;\r\n try {\r\n this.closedCallbacks.forEach(function (c) { return c.apply(_this, [error]); });\r\n }\r\n catch (e) {\r\n this.logger.log(LogLevel.Error, \"An onclose callback called with error '\" + error + \"' threw error '\" + e + \"'.\");\r\n }\r\n }\r\n };\r\n HubConnection.prototype.reconnect = function (error) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var reconnectStartTime, previousReconnectAttempts, retryError, nextRetryDelay, e_4;\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n reconnectStartTime = Date.now();\r\n previousReconnectAttempts = 0;\r\n retryError = error !== undefined ? error : new Error(\"Attempting to reconnect due to a unknown error.\");\r\n nextRetryDelay = this.getNextRetryDelay(previousReconnectAttempts++, 0, retryError);\r\n if (nextRetryDelay === null) {\r\n this.logger.log(LogLevel.Debug, \"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt.\");\r\n this.completeClose(error);\r\n return [2 /*return*/];\r\n }\r\n this.connectionState = HubConnectionState.Reconnecting;\r\n if (error) {\r\n this.logger.log(LogLevel.Information, \"Connection reconnecting because of error '\" + error + \"'.\");\r\n }\r\n else {\r\n this.logger.log(LogLevel.Information, \"Connection reconnecting.\");\r\n }\r\n if (this.onreconnecting) {\r\n try {\r\n this.reconnectingCallbacks.forEach(function (c) { return c.apply(_this, [error]); });\r\n }\r\n catch (e) {\r\n this.logger.log(LogLevel.Error, \"An onreconnecting callback called with error '\" + error + \"' threw error '\" + e + \"'.\");\r\n }\r\n // Exit early if an onreconnecting callback called connection.stop().\r\n if (this.connectionState !== HubConnectionState.Reconnecting) {\r\n this.logger.log(LogLevel.Debug, \"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.\");\r\n return [2 /*return*/];\r\n }\r\n }\r\n _a.label = 1;\r\n case 1:\r\n if (!(nextRetryDelay !== null)) return [3 /*break*/, 7];\r\n this.logger.log(LogLevel.Information, \"Reconnect attempt number \" + previousReconnectAttempts + \" will start in \" + nextRetryDelay + \" ms.\");\r\n return [4 /*yield*/, new Promise(function (resolve) {\r\n _this.reconnectDelayHandle = setTimeout(resolve, nextRetryDelay);\r\n })];\r\n case 2:\r\n _a.sent();\r\n this.reconnectDelayHandle = undefined;\r\n if (this.connectionState !== HubConnectionState.Reconnecting) {\r\n this.logger.log(LogLevel.Debug, \"Connection left the reconnecting state during reconnect delay. Done reconnecting.\");\r\n return [2 /*return*/];\r\n }\r\n _a.label = 3;\r\n case 3:\r\n _a.trys.push([3, 5, , 6]);\r\n return [4 /*yield*/, this.startInternal()];\r\n case 4:\r\n _a.sent();\r\n this.connectionState = HubConnectionState.Connected;\r\n this.logger.log(LogLevel.Information, \"HubConnection reconnected successfully.\");\r\n if (this.onreconnected) {\r\n try {\r\n this.reconnectedCallbacks.forEach(function (c) { return c.apply(_this, [_this.connection.connectionId]); });\r\n }\r\n catch (e) {\r\n this.logger.log(LogLevel.Error, \"An onreconnected callback called with connectionId '\" + this.connection.connectionId + \"; threw error '\" + e + \"'.\");\r\n }\r\n }\r\n return [2 /*return*/];\r\n case 5:\r\n e_4 = _a.sent();\r\n this.logger.log(LogLevel.Information, \"Reconnect attempt failed because of error '\" + e_4 + \"'.\");\r\n if (this.connectionState !== HubConnectionState.Reconnecting) {\r\n this.logger.log(LogLevel.Debug, \"Connection moved to the '\" + this.connectionState + \"' from the reconnecting state during reconnect attempt. Done reconnecting.\");\r\n // The TypeScript compiler thinks that connectionState must be Connected here. The TypeScript compiler is wrong.\r\n if (this.connectionState === HubConnectionState.Disconnecting) {\r\n this.completeClose();\r\n }\r\n return [2 /*return*/];\r\n }\r\n retryError = e_4 instanceof Error ? e_4 : new Error(e_4.toString());\r\n nextRetryDelay = this.getNextRetryDelay(previousReconnectAttempts++, Date.now() - reconnectStartTime, retryError);\r\n return [3 /*break*/, 6];\r\n case 6: return [3 /*break*/, 1];\r\n case 7:\r\n this.logger.log(LogLevel.Information, \"Reconnect retries have been exhausted after \" + (Date.now() - reconnectStartTime) + \" ms and \" + previousReconnectAttempts + \" failed attempts. Connection disconnecting.\");\r\n this.completeClose();\r\n return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n HubConnection.prototype.getNextRetryDelay = function (previousRetryCount, elapsedMilliseconds, retryReason) {\r\n try {\r\n return this.reconnectPolicy.nextRetryDelayInMilliseconds({\r\n elapsedMilliseconds: elapsedMilliseconds,\r\n previousRetryCount: previousRetryCount,\r\n retryReason: retryReason,\r\n });\r\n }\r\n catch (e) {\r\n this.logger.log(LogLevel.Error, \"IRetryPolicy.nextRetryDelayInMilliseconds(\" + previousRetryCount + \", \" + elapsedMilliseconds + \") threw error '\" + e + \"'.\");\r\n return null;\r\n }\r\n };\r\n HubConnection.prototype.cancelCallbacksWithError = function (error) {\r\n var callbacks = this.callbacks;\r\n this.callbacks = {};\r\n Object.keys(callbacks)\r\n .forEach(function (key) {\r\n var callback = callbacks[key];\r\n callback(null, error);\r\n });\r\n };\r\n HubConnection.prototype.cleanupPingTimer = function () {\r\n if (this.pingServerHandle) {\r\n clearTimeout(this.pingServerHandle);\r\n this.pingServerHandle = undefined;\r\n }\r\n };\r\n HubConnection.prototype.cleanupTimeout = function () {\r\n if (this.timeoutHandle) {\r\n clearTimeout(this.timeoutHandle);\r\n }\r\n };\r\n HubConnection.prototype.createInvocation = function (methodName, args, nonblocking, streamIds) {\r\n if (nonblocking) {\r\n return {\r\n arguments: args,\r\n streamIds: streamIds,\r\n target: methodName,\r\n type: MessageType.Invocation,\r\n };\r\n }\r\n else {\r\n var invocationId = this.invocationId;\r\n this.invocationId++;\r\n return {\r\n arguments: args,\r\n invocationId: invocationId.toString(),\r\n streamIds: streamIds,\r\n target: methodName,\r\n type: MessageType.Invocation,\r\n };\r\n }\r\n };\r\n HubConnection.prototype.launchStreams = function (streams, promiseQueue) {\r\n var _this = this;\r\n if (streams.length === 0) {\r\n return;\r\n }\r\n // Synchronize stream data so they arrive in-order on the server\r\n if (!promiseQueue) {\r\n promiseQueue = Promise.resolve();\r\n }\r\n var _loop_1 = function (streamId) {\r\n streams[streamId].subscribe({\r\n complete: function () {\r\n promiseQueue = promiseQueue.then(function () { return _this.sendWithProtocol(_this.createCompletionMessage(streamId)); });\r\n },\r\n error: function (err) {\r\n var message;\r\n if (err instanceof Error) {\r\n message = err.message;\r\n }\r\n else if (err && err.toString) {\r\n message = err.toString();\r\n }\r\n else {\r\n message = \"Unknown error\";\r\n }\r\n promiseQueue = promiseQueue.then(function () { return _this.sendWithProtocol(_this.createCompletionMessage(streamId, message)); });\r\n },\r\n next: function (item) {\r\n promiseQueue = promiseQueue.then(function () { return _this.sendWithProtocol(_this.createStreamItemMessage(streamId, item)); });\r\n },\r\n });\r\n };\r\n // We want to iterate over the keys, since the keys are the stream ids\r\n // tslint:disable-next-line:forin\r\n for (var streamId in streams) {\r\n _loop_1(streamId);\r\n }\r\n };\r\n HubConnection.prototype.replaceStreamingParams = function (args) {\r\n var streams = [];\r\n var streamIds = [];\r\n for (var i = 0; i < args.length; i++) {\r\n var argument = args[i];\r\n if (this.isObservable(argument)) {\r\n var streamId = this.invocationId;\r\n this.invocationId++;\r\n // Store the stream for later use\r\n streams[streamId] = argument;\r\n streamIds.push(streamId.toString());\r\n // remove stream from args\r\n args.splice(i, 1);\r\n }\r\n }\r\n return [streams, streamIds];\r\n };\r\n HubConnection.prototype.isObservable = function (arg) {\r\n // This allows other stream implementations to just work (like rxjs)\r\n return arg && arg.subscribe && typeof arg.subscribe === \"function\";\r\n };\r\n HubConnection.prototype.createStreamInvocation = function (methodName, args, streamIds) {\r\n var invocationId = this.invocationId;\r\n this.invocationId++;\r\n return {\r\n arguments: args,\r\n invocationId: invocationId.toString(),\r\n streamIds: streamIds,\r\n target: methodName,\r\n type: MessageType.StreamInvocation,\r\n };\r\n };\r\n HubConnection.prototype.createCancelInvocation = function (id) {\r\n return {\r\n invocationId: id,\r\n type: MessageType.CancelInvocation,\r\n };\r\n };\r\n HubConnection.prototype.createStreamItemMessage = function (id, item) {\r\n return {\r\n invocationId: id,\r\n item: item,\r\n type: MessageType.StreamItem,\r\n };\r\n };\r\n HubConnection.prototype.createCompletionMessage = function (id, error, result) {\r\n if (error) {\r\n return {\r\n error: error,\r\n invocationId: id,\r\n type: MessageType.Completion,\r\n };\r\n }\r\n return {\r\n invocationId: id,\r\n result: result,\r\n type: MessageType.Completion,\r\n };\r\n };\r\n return HubConnection;\r\n}());\r\nexport { HubConnection };\r\n//# sourceMappingURL=HubConnection.js.map","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\r\nimport { SubjectSubscription } from \"./Utils\";\r\n/** Stream implementation to stream items to the server. */\r\nvar Subject = /** @class */ (function () {\r\n function Subject() {\r\n this.observers = [];\r\n }\r\n Subject.prototype.next = function (item) {\r\n for (var _i = 0, _a = this.observers; _i < _a.length; _i++) {\r\n var observer = _a[_i];\r\n observer.next(item);\r\n }\r\n };\r\n Subject.prototype.error = function (err) {\r\n for (var _i = 0, _a = this.observers; _i < _a.length; _i++) {\r\n var observer = _a[_i];\r\n if (observer.error) {\r\n observer.error(err);\r\n }\r\n }\r\n };\r\n Subject.prototype.complete = function () {\r\n for (var _i = 0, _a = this.observers; _i < _a.length; _i++) {\r\n var observer = _a[_i];\r\n if (observer.complete) {\r\n observer.complete();\r\n }\r\n }\r\n };\r\n Subject.prototype.subscribe = function (observer) {\r\n this.observers.push(observer);\r\n return new SubjectSubscription(this, observer);\r\n };\r\n return Subject;\r\n}());\r\nexport { Subject };\r\n//# sourceMappingURL=Subject.js.map","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\r\n// This will be treated as a bit flag in the future, so we keep it using power-of-two values.\r\n/** Specifies a specific HTTP transport type. */\r\nexport var HttpTransportType;\r\n(function (HttpTransportType) {\r\n /** Specifies no transport preference. */\r\n HttpTransportType[HttpTransportType[\"None\"] = 0] = \"None\";\r\n /** Specifies the WebSockets transport. */\r\n HttpTransportType[HttpTransportType[\"WebSockets\"] = 1] = \"WebSockets\";\r\n /** Specifies the Server-Sent Events transport. */\r\n HttpTransportType[HttpTransportType[\"ServerSentEvents\"] = 2] = \"ServerSentEvents\";\r\n /** Specifies the Long Polling transport. */\r\n HttpTransportType[HttpTransportType[\"LongPolling\"] = 4] = \"LongPolling\";\r\n})(HttpTransportType || (HttpTransportType = {}));\r\n/** Specifies the transfer format for a connection. */\r\nexport var TransferFormat;\r\n(function (TransferFormat) {\r\n /** Specifies that only text data will be transmitted over the connection. */\r\n TransferFormat[TransferFormat[\"Text\"] = 1] = \"Text\";\r\n /** Specifies that binary data will be transmitted over the connection. */\r\n TransferFormat[TransferFormat[\"Binary\"] = 2] = \"Binary\";\r\n})(TransferFormat || (TransferFormat = {}));\r\n//# sourceMappingURL=ITransport.js.map","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\r\n// 0, 2, 10, 30 second delays before reconnect attempts.\r\nvar DEFAULT_RETRY_DELAYS_IN_MILLISECONDS = [0, 2000, 10000, 30000, null];\r\n/** @private */\r\nvar DefaultReconnectPolicy = /** @class */ (function () {\r\n function DefaultReconnectPolicy(retryDelays) {\r\n this.retryDelays = retryDelays !== undefined ? retryDelays.concat([null]) : DEFAULT_RETRY_DELAYS_IN_MILLISECONDS;\r\n }\r\n DefaultReconnectPolicy.prototype.nextRetryDelayInMilliseconds = function (retryContext) {\r\n return this.retryDelays[retryContext.previousRetryCount];\r\n };\r\n return DefaultReconnectPolicy;\r\n}());\r\nexport { DefaultReconnectPolicy };\r\n//# sourceMappingURL=DefaultReconnectPolicy.js.map","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\r\n// Rough polyfill of https://developer.mozilla.org/en-US/docs/Web/API/AbortController\r\n// We don't actually ever use the API being polyfilled, we always use the polyfill because\r\n// it's a very new API right now.\r\n// Not exported from index.\r\n/** @private */\r\nvar AbortController = /** @class */ (function () {\r\n function AbortController() {\r\n this.isAborted = false;\r\n this.onabort = null;\r\n }\r\n AbortController.prototype.abort = function () {\r\n if (!this.isAborted) {\r\n this.isAborted = true;\r\n if (this.onabort) {\r\n this.onabort();\r\n }\r\n }\r\n };\r\n Object.defineProperty(AbortController.prototype, \"signal\", {\r\n get: function () {\r\n return this;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AbortController.prototype, \"aborted\", {\r\n get: function () {\r\n return this.isAborted;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return AbortController;\r\n}());\r\nexport { AbortController };\r\n//# sourceMappingURL=AbortController.js.map","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n};\r\nimport { AbortController } from \"./AbortController\";\r\nimport { HttpError, TimeoutError } from \"./Errors\";\r\nimport { LogLevel } from \"./ILogger\";\r\nimport { TransferFormat } from \"./ITransport\";\r\nimport { Arg, getDataDetail, sendMessage } from \"./Utils\";\r\n// Not exported from 'index', this type is internal.\r\n/** @private */\r\nvar LongPollingTransport = /** @class */ (function () {\r\n function LongPollingTransport(httpClient, accessTokenFactory, logger, logMessageContent) {\r\n this.httpClient = httpClient;\r\n this.accessTokenFactory = accessTokenFactory;\r\n this.logger = logger;\r\n this.pollAbort = new AbortController();\r\n this.logMessageContent = logMessageContent;\r\n this.running = false;\r\n this.onreceive = null;\r\n this.onclose = null;\r\n }\r\n Object.defineProperty(LongPollingTransport.prototype, \"pollAborted\", {\r\n // This is an internal type, not exported from 'index' so this is really just internal.\r\n get: function () {\r\n return this.pollAbort.aborted;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n LongPollingTransport.prototype.connect = function (url, transferFormat) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var pollOptions, token, pollUrl, response;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n Arg.isRequired(url, \"url\");\r\n Arg.isRequired(transferFormat, \"transferFormat\");\r\n Arg.isIn(transferFormat, TransferFormat, \"transferFormat\");\r\n this.url = url;\r\n this.logger.log(LogLevel.Trace, \"(LongPolling transport) Connecting.\");\r\n // Allow binary format on Node and Browsers that support binary content (indicated by the presence of responseType property)\r\n if (transferFormat === TransferFormat.Binary &&\r\n (typeof XMLHttpRequest !== \"undefined\" && typeof new XMLHttpRequest().responseType !== \"string\")) {\r\n throw new Error(\"Binary protocols over XmlHttpRequest not implementing advanced features are not supported.\");\r\n }\r\n pollOptions = {\r\n abortSignal: this.pollAbort.signal,\r\n headers: {},\r\n timeout: 100000,\r\n };\r\n if (transferFormat === TransferFormat.Binary) {\r\n pollOptions.responseType = \"arraybuffer\";\r\n }\r\n return [4 /*yield*/, this.getAccessToken()];\r\n case 1:\r\n token = _a.sent();\r\n this.updateHeaderToken(pollOptions, token);\r\n pollUrl = url + \"&_=\" + Date.now();\r\n this.logger.log(LogLevel.Trace, \"(LongPolling transport) polling: \" + pollUrl + \".\");\r\n return [4 /*yield*/, this.httpClient.get(pollUrl, pollOptions)];\r\n case 2:\r\n response = _a.sent();\r\n if (response.statusCode !== 200) {\r\n this.logger.log(LogLevel.Error, \"(LongPolling transport) Unexpected response code: \" + response.statusCode + \".\");\r\n // Mark running as false so that the poll immediately ends and runs the close logic\r\n this.closeError = new HttpError(response.statusText || \"\", response.statusCode);\r\n this.running = false;\r\n }\r\n else {\r\n this.running = true;\r\n }\r\n this.receiving = this.poll(this.url, pollOptions);\r\n return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n LongPollingTransport.prototype.getAccessToken = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n if (!this.accessTokenFactory) return [3 /*break*/, 2];\r\n return [4 /*yield*/, this.accessTokenFactory()];\r\n case 1: return [2 /*return*/, _a.sent()];\r\n case 2: return [2 /*return*/, null];\r\n }\r\n });\r\n });\r\n };\r\n LongPollingTransport.prototype.updateHeaderToken = function (request, token) {\r\n if (!request.headers) {\r\n request.headers = {};\r\n }\r\n if (token) {\r\n // tslint:disable-next-line:no-string-literal\r\n request.headers[\"Authorization\"] = \"Bearer \" + token;\r\n return;\r\n }\r\n // tslint:disable-next-line:no-string-literal\r\n if (request.headers[\"Authorization\"]) {\r\n // tslint:disable-next-line:no-string-literal\r\n delete request.headers[\"Authorization\"];\r\n }\r\n };\r\n LongPollingTransport.prototype.poll = function (url, pollOptions) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var token, pollUrl, response, e_1;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n _a.trys.push([0, , 8, 9]);\r\n _a.label = 1;\r\n case 1:\r\n if (!this.running) return [3 /*break*/, 7];\r\n return [4 /*yield*/, this.getAccessToken()];\r\n case 2:\r\n token = _a.sent();\r\n this.updateHeaderToken(pollOptions, token);\r\n _a.label = 3;\r\n case 3:\r\n _a.trys.push([3, 5, , 6]);\r\n pollUrl = url + \"&_=\" + Date.now();\r\n this.logger.log(LogLevel.Trace, \"(LongPolling transport) polling: \" + pollUrl + \".\");\r\n return [4 /*yield*/, this.httpClient.get(pollUrl, pollOptions)];\r\n case 4:\r\n response = _a.sent();\r\n if (response.statusCode === 204) {\r\n this.logger.log(LogLevel.Information, \"(LongPolling transport) Poll terminated by server.\");\r\n this.running = false;\r\n }\r\n else if (response.statusCode !== 200) {\r\n this.logger.log(LogLevel.Error, \"(LongPolling transport) Unexpected response code: \" + response.statusCode + \".\");\r\n // Unexpected status code\r\n this.closeError = new HttpError(response.statusText || \"\", response.statusCode);\r\n this.running = false;\r\n }\r\n else {\r\n // Process the response\r\n if (response.content) {\r\n this.logger.log(LogLevel.Trace, \"(LongPolling transport) data received. \" + getDataDetail(response.content, this.logMessageContent) + \".\");\r\n if (this.onreceive) {\r\n this.onreceive(response.content);\r\n }\r\n }\r\n else {\r\n // This is another way timeout manifest.\r\n this.logger.log(LogLevel.Trace, \"(LongPolling transport) Poll timed out, reissuing.\");\r\n }\r\n }\r\n return [3 /*break*/, 6];\r\n case 5:\r\n e_1 = _a.sent();\r\n if (!this.running) {\r\n // Log but disregard errors that occur after stopping\r\n this.logger.log(LogLevel.Trace, \"(LongPolling transport) Poll errored after shutdown: \" + e_1.message);\r\n }\r\n else {\r\n if (e_1 instanceof TimeoutError) {\r\n // Ignore timeouts and reissue the poll.\r\n this.logger.log(LogLevel.Trace, \"(LongPolling transport) Poll timed out, reissuing.\");\r\n }\r\n else {\r\n // Close the connection with the error as the result.\r\n this.closeError = e_1;\r\n this.running = false;\r\n }\r\n }\r\n return [3 /*break*/, 6];\r\n case 6: return [3 /*break*/, 1];\r\n case 7: return [3 /*break*/, 9];\r\n case 8:\r\n this.logger.log(LogLevel.Trace, \"(LongPolling transport) Polling complete.\");\r\n // We will reach here with pollAborted==false when the server returned a response causing the transport to stop.\r\n // If pollAborted==true then client initiated the stop and the stop method will raise the close event after DELETE is sent.\r\n if (!this.pollAborted) {\r\n this.raiseOnClose();\r\n }\r\n return [7 /*endfinally*/];\r\n case 9: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n LongPollingTransport.prototype.send = function (data) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n return __generator(this, function (_a) {\r\n if (!this.running) {\r\n return [2 /*return*/, Promise.reject(new Error(\"Cannot send until the transport is connected\"))];\r\n }\r\n return [2 /*return*/, sendMessage(this.logger, \"LongPolling\", this.httpClient, this.url, this.accessTokenFactory, data, this.logMessageContent)];\r\n });\r\n });\r\n };\r\n LongPollingTransport.prototype.stop = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var deleteOptions, token;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n this.logger.log(LogLevel.Trace, \"(LongPolling transport) Stopping polling.\");\r\n // Tell receiving loop to stop, abort any current request, and then wait for it to finish\r\n this.running = false;\r\n this.pollAbort.abort();\r\n _a.label = 1;\r\n case 1:\r\n _a.trys.push([1, , 5, 6]);\r\n return [4 /*yield*/, this.receiving];\r\n case 2:\r\n _a.sent();\r\n // Send DELETE to clean up long polling on the server\r\n this.logger.log(LogLevel.Trace, \"(LongPolling transport) sending DELETE request to \" + this.url + \".\");\r\n deleteOptions = {\r\n headers: {},\r\n };\r\n return [4 /*yield*/, this.getAccessToken()];\r\n case 3:\r\n token = _a.sent();\r\n this.updateHeaderToken(deleteOptions, token);\r\n return [4 /*yield*/, this.httpClient.delete(this.url, deleteOptions)];\r\n case 4:\r\n _a.sent();\r\n this.logger.log(LogLevel.Trace, \"(LongPolling transport) DELETE request sent.\");\r\n return [3 /*break*/, 6];\r\n case 5:\r\n this.logger.log(LogLevel.Trace, \"(LongPolling transport) Stop finished.\");\r\n // Raise close event here instead of in polling\r\n // It needs to happen after the DELETE request is sent\r\n this.raiseOnClose();\r\n return [7 /*endfinally*/];\r\n case 6: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n LongPollingTransport.prototype.raiseOnClose = function () {\r\n if (this.onclose) {\r\n var logMessage = \"(LongPolling transport) Firing onclose event.\";\r\n if (this.closeError) {\r\n logMessage += \" Error: \" + this.closeError;\r\n }\r\n this.logger.log(LogLevel.Trace, logMessage);\r\n this.onclose(this.closeError);\r\n }\r\n };\r\n return LongPollingTransport;\r\n}());\r\nexport { LongPollingTransport };\r\n//# sourceMappingURL=LongPollingTransport.js.map","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n};\r\nimport { LogLevel } from \"./ILogger\";\r\nimport { TransferFormat } from \"./ITransport\";\r\nimport { Arg, getDataDetail, Platform, sendMessage } from \"./Utils\";\r\n/** @private */\r\nvar ServerSentEventsTransport = /** @class */ (function () {\r\n function ServerSentEventsTransport(httpClient, accessTokenFactory, logger, logMessageContent, eventSourceConstructor) {\r\n this.httpClient = httpClient;\r\n this.accessTokenFactory = accessTokenFactory;\r\n this.logger = logger;\r\n this.logMessageContent = logMessageContent;\r\n this.eventSourceConstructor = eventSourceConstructor;\r\n this.onreceive = null;\r\n this.onclose = null;\r\n }\r\n ServerSentEventsTransport.prototype.connect = function (url, transferFormat) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var token;\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n Arg.isRequired(url, \"url\");\r\n Arg.isRequired(transferFormat, \"transferFormat\");\r\n Arg.isIn(transferFormat, TransferFormat, \"transferFormat\");\r\n this.logger.log(LogLevel.Trace, \"(SSE transport) Connecting.\");\r\n // set url before accessTokenFactory because this.url is only for send and we set the auth header instead of the query string for send\r\n this.url = url;\r\n if (!this.accessTokenFactory) return [3 /*break*/, 2];\r\n return [4 /*yield*/, this.accessTokenFactory()];\r\n case 1:\r\n token = _a.sent();\r\n if (token) {\r\n url += (url.indexOf(\"?\") < 0 ? \"?\" : \"&\") + (\"access_token=\" + encodeURIComponent(token));\r\n }\r\n _a.label = 2;\r\n case 2: return [2 /*return*/, new Promise(function (resolve, reject) {\r\n var opened = false;\r\n if (transferFormat !== TransferFormat.Text) {\r\n reject(new Error(\"The Server-Sent Events transport only supports the 'Text' transfer format\"));\r\n return;\r\n }\r\n var eventSource;\r\n if (Platform.isBrowser || Platform.isWebWorker) {\r\n eventSource = new _this.eventSourceConstructor(url, { withCredentials: true });\r\n }\r\n else {\r\n // Non-browser passes cookies via the dictionary\r\n var cookies = _this.httpClient.getCookieString(url);\r\n eventSource = new _this.eventSourceConstructor(url, { withCredentials: true, headers: { Cookie: cookies } });\r\n }\r\n try {\r\n eventSource.onmessage = function (e) {\r\n if (_this.onreceive) {\r\n try {\r\n _this.logger.log(LogLevel.Trace, \"(SSE transport) data received. \" + getDataDetail(e.data, _this.logMessageContent) + \".\");\r\n _this.onreceive(e.data);\r\n }\r\n catch (error) {\r\n _this.close(error);\r\n return;\r\n }\r\n }\r\n };\r\n eventSource.onerror = function (e) {\r\n var error = new Error(e.data || \"Error occurred\");\r\n if (opened) {\r\n _this.close(error);\r\n }\r\n else {\r\n reject(error);\r\n }\r\n };\r\n eventSource.onopen = function () {\r\n _this.logger.log(LogLevel.Information, \"SSE connected to \" + _this.url);\r\n _this.eventSource = eventSource;\r\n opened = true;\r\n resolve();\r\n };\r\n }\r\n catch (e) {\r\n reject(e);\r\n return;\r\n }\r\n })];\r\n }\r\n });\r\n });\r\n };\r\n ServerSentEventsTransport.prototype.send = function (data) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n return __generator(this, function (_a) {\r\n if (!this.eventSource) {\r\n return [2 /*return*/, Promise.reject(new Error(\"Cannot send until the transport is connected\"))];\r\n }\r\n return [2 /*return*/, sendMessage(this.logger, \"SSE\", this.httpClient, this.url, this.accessTokenFactory, data, this.logMessageContent)];\r\n });\r\n });\r\n };\r\n ServerSentEventsTransport.prototype.stop = function () {\r\n this.close();\r\n return Promise.resolve();\r\n };\r\n ServerSentEventsTransport.prototype.close = function (e) {\r\n if (this.eventSource) {\r\n this.eventSource.close();\r\n this.eventSource = undefined;\r\n if (this.onclose) {\r\n this.onclose(e);\r\n }\r\n }\r\n };\r\n return ServerSentEventsTransport;\r\n}());\r\nexport { ServerSentEventsTransport };\r\n//# sourceMappingURL=ServerSentEventsTransport.js.map","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n};\r\nimport { LogLevel } from \"./ILogger\";\r\nimport { TransferFormat } from \"./ITransport\";\r\nimport { Arg, getDataDetail, Platform } from \"./Utils\";\r\n/** @private */\r\nvar WebSocketTransport = /** @class */ (function () {\r\n function WebSocketTransport(httpClient, accessTokenFactory, logger, logMessageContent, webSocketConstructor) {\r\n this.logger = logger;\r\n this.accessTokenFactory = accessTokenFactory;\r\n this.logMessageContent = logMessageContent;\r\n this.webSocketConstructor = webSocketConstructor;\r\n this.httpClient = httpClient;\r\n this.onreceive = null;\r\n this.onclose = null;\r\n }\r\n WebSocketTransport.prototype.connect = function (url, transferFormat) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var token;\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n Arg.isRequired(url, \"url\");\r\n Arg.isRequired(transferFormat, \"transferFormat\");\r\n Arg.isIn(transferFormat, TransferFormat, \"transferFormat\");\r\n this.logger.log(LogLevel.Trace, \"(WebSockets transport) Connecting.\");\r\n if (!this.accessTokenFactory) return [3 /*break*/, 2];\r\n return [4 /*yield*/, this.accessTokenFactory()];\r\n case 1:\r\n token = _a.sent();\r\n if (token) {\r\n url += (url.indexOf(\"?\") < 0 ? \"?\" : \"&\") + (\"access_token=\" + encodeURIComponent(token));\r\n }\r\n _a.label = 2;\r\n case 2: return [2 /*return*/, new Promise(function (resolve, reject) {\r\n url = url.replace(/^http/, \"ws\");\r\n var webSocket;\r\n var cookies = _this.httpClient.getCookieString(url);\r\n var opened = false;\r\n if (Platform.isNode && cookies) {\r\n // Only pass cookies when in non-browser environments\r\n webSocket = new _this.webSocketConstructor(url, undefined, {\r\n headers: {\r\n Cookie: \"\" + cookies,\r\n },\r\n });\r\n }\r\n if (!webSocket) {\r\n // Chrome is not happy with passing 'undefined' as protocol\r\n webSocket = new _this.webSocketConstructor(url);\r\n }\r\n if (transferFormat === TransferFormat.Binary) {\r\n webSocket.binaryType = \"arraybuffer\";\r\n }\r\n // tslint:disable-next-line:variable-name\r\n webSocket.onopen = function (_event) {\r\n _this.logger.log(LogLevel.Information, \"WebSocket connected to \" + url + \".\");\r\n _this.webSocket = webSocket;\r\n opened = true;\r\n resolve();\r\n };\r\n webSocket.onerror = function (event) {\r\n var error = null;\r\n // ErrorEvent is a browser only type we need to check if the type exists before using it\r\n if (typeof ErrorEvent !== \"undefined\" && event instanceof ErrorEvent) {\r\n error = event.error;\r\n }\r\n else {\r\n error = new Error(\"There was an error with the transport.\");\r\n }\r\n reject(error);\r\n };\r\n webSocket.onmessage = function (message) {\r\n _this.logger.log(LogLevel.Trace, \"(WebSockets transport) data received. \" + getDataDetail(message.data, _this.logMessageContent) + \".\");\r\n if (_this.onreceive) {\r\n _this.onreceive(message.data);\r\n }\r\n };\r\n webSocket.onclose = function (event) {\r\n // Don't call close handler if connection was never established\r\n // We'll reject the connect call instead\r\n if (opened) {\r\n _this.close(event);\r\n }\r\n else {\r\n var error = null;\r\n // ErrorEvent is a browser only type we need to check if the type exists before using it\r\n if (typeof ErrorEvent !== \"undefined\" && event instanceof ErrorEvent) {\r\n error = event.error;\r\n }\r\n else {\r\n error = new Error(\"There was an error with the transport.\");\r\n }\r\n reject(error);\r\n }\r\n };\r\n })];\r\n }\r\n });\r\n });\r\n };\r\n WebSocketTransport.prototype.send = function (data) {\r\n if (this.webSocket && this.webSocket.readyState === this.webSocketConstructor.OPEN) {\r\n this.logger.log(LogLevel.Trace, \"(WebSockets transport) sending data. \" + getDataDetail(data, this.logMessageContent) + \".\");\r\n this.webSocket.send(data);\r\n return Promise.resolve();\r\n }\r\n return Promise.reject(\"WebSocket is not in the OPEN state\");\r\n };\r\n WebSocketTransport.prototype.stop = function () {\r\n if (this.webSocket) {\r\n // Manually invoke onclose callback inline so we know the HttpConnection was closed properly before returning\r\n // This also solves an issue where websocket.onclose could take 18+ seconds to trigger during network disconnects\r\n this.close(undefined);\r\n }\r\n return Promise.resolve();\r\n };\r\n WebSocketTransport.prototype.close = function (event) {\r\n // webSocket will be null if the transport did not start successfully\r\n if (this.webSocket) {\r\n // Clear websocket handlers because we are considering the socket closed now\r\n this.webSocket.onclose = function () { };\r\n this.webSocket.onmessage = function () { };\r\n this.webSocket.onerror = function () { };\r\n this.webSocket.close();\r\n this.webSocket = undefined;\r\n }\r\n this.logger.log(LogLevel.Trace, \"(WebSockets transport) socket closed.\");\r\n if (this.onclose) {\r\n if (event && (event.wasClean === false || event.code !== 1000)) {\r\n this.onclose(new Error(\"WebSocket closed with status code: \" + event.code + \" (\" + event.reason + \").\"));\r\n }\r\n else {\r\n this.onclose();\r\n }\r\n }\r\n };\r\n return WebSocketTransport;\r\n}());\r\nexport { WebSocketTransport };\r\n//# sourceMappingURL=WebSocketTransport.js.map","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n};\r\nimport { DefaultHttpClient } from \"./DefaultHttpClient\";\r\nimport { LogLevel } from \"./ILogger\";\r\nimport { HttpTransportType, TransferFormat } from \"./ITransport\";\r\nimport { LongPollingTransport } from \"./LongPollingTransport\";\r\nimport { ServerSentEventsTransport } from \"./ServerSentEventsTransport\";\r\nimport { Arg, createLogger, Platform } from \"./Utils\";\r\nimport { WebSocketTransport } from \"./WebSocketTransport\";\r\nvar MAX_REDIRECTS = 100;\r\nvar WebSocketModule = null;\r\nvar EventSourceModule = null;\r\nif (Platform.isNode && typeof require !== \"undefined\") {\r\n // In order to ignore the dynamic require in webpack builds we need to do this magic\r\n // @ts-ignore: TS doesn't know about these names\r\n var requireFunc = typeof __webpack_require__ === \"function\" ? __non_webpack_require__ : require;\r\n WebSocketModule = requireFunc(\"ws\");\r\n EventSourceModule = requireFunc(\"eventsource\");\r\n}\r\n/** @private */\r\nvar HttpConnection = /** @class */ (function () {\r\n function HttpConnection(url, options) {\r\n if (options === void 0) { options = {}; }\r\n this.stopPromiseResolver = function () { };\r\n this.features = {};\r\n this.negotiateVersion = 1;\r\n Arg.isRequired(url, \"url\");\r\n this.logger = createLogger(options.logger);\r\n this.baseUrl = this.resolveUrl(url);\r\n options = options || {};\r\n options.logMessageContent = options.logMessageContent || false;\r\n if (!Platform.isNode && typeof WebSocket !== \"undefined\" && !options.WebSocket) {\r\n options.WebSocket = WebSocket;\r\n }\r\n else if (Platform.isNode && !options.WebSocket) {\r\n if (WebSocketModule) {\r\n options.WebSocket = WebSocketModule;\r\n }\r\n }\r\n if (!Platform.isNode && typeof EventSource !== \"undefined\" && !options.EventSource) {\r\n options.EventSource = EventSource;\r\n }\r\n else if (Platform.isNode && !options.EventSource) {\r\n if (typeof EventSourceModule !== \"undefined\") {\r\n options.EventSource = EventSourceModule;\r\n }\r\n }\r\n this.httpClient = options.httpClient || new DefaultHttpClient(this.logger);\r\n this.connectionState = \"Disconnected\" /* Disconnected */;\r\n this.connectionStarted = false;\r\n this.options = options;\r\n this.onreceive = null;\r\n this.onclose = null;\r\n }\r\n HttpConnection.prototype.start = function (transferFormat) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var message, message;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n transferFormat = transferFormat || TransferFormat.Binary;\r\n Arg.isIn(transferFormat, TransferFormat, \"transferFormat\");\r\n this.logger.log(LogLevel.Debug, \"Starting connection with transfer format '\" + TransferFormat[transferFormat] + \"'.\");\r\n if (this.connectionState !== \"Disconnected\" /* Disconnected */) {\r\n return [2 /*return*/, Promise.reject(new Error(\"Cannot start an HttpConnection that is not in the 'Disconnected' state.\"))];\r\n }\r\n this.connectionState = \"Connecting \" /* Connecting */;\r\n this.startInternalPromise = this.startInternal(transferFormat);\r\n return [4 /*yield*/, this.startInternalPromise];\r\n case 1:\r\n _a.sent();\r\n if (!(this.connectionState === \"Disconnecting\" /* Disconnecting */)) return [3 /*break*/, 3];\r\n message = \"Failed to start the HttpConnection before stop() was called.\";\r\n this.logger.log(LogLevel.Error, message);\r\n // We cannot await stopPromise inside startInternal since stopInternal awaits the startInternalPromise.\r\n return [4 /*yield*/, this.stopPromise];\r\n case 2:\r\n // We cannot await stopPromise inside startInternal since stopInternal awaits the startInternalPromise.\r\n _a.sent();\r\n return [2 /*return*/, Promise.reject(new Error(message))];\r\n case 3:\r\n if (this.connectionState !== \"Connected\" /* Connected */) {\r\n message = \"HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!\";\r\n this.logger.log(LogLevel.Error, message);\r\n return [2 /*return*/, Promise.reject(new Error(message))];\r\n }\r\n _a.label = 4;\r\n case 4:\r\n this.connectionStarted = true;\r\n return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n HttpConnection.prototype.send = function (data) {\r\n if (this.connectionState !== \"Connected\" /* Connected */) {\r\n return Promise.reject(new Error(\"Cannot send data if the connection is not in the 'Connected' State.\"));\r\n }\r\n if (!this.sendQueue) {\r\n this.sendQueue = new TransportSendQueue(this.transport);\r\n }\r\n // Transport will not be null if state is connected\r\n return this.sendQueue.send(data);\r\n };\r\n HttpConnection.prototype.stop = function (error) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n if (this.connectionState === \"Disconnected\" /* Disconnected */) {\r\n this.logger.log(LogLevel.Debug, \"Call to HttpConnection.stop(\" + error + \") ignored because the connection is already in the disconnected state.\");\r\n return [2 /*return*/, Promise.resolve()];\r\n }\r\n if (this.connectionState === \"Disconnecting\" /* Disconnecting */) {\r\n this.logger.log(LogLevel.Debug, \"Call to HttpConnection.stop(\" + error + \") ignored because the connection is already in the disconnecting state.\");\r\n return [2 /*return*/, this.stopPromise];\r\n }\r\n this.connectionState = \"Disconnecting\" /* Disconnecting */;\r\n this.stopPromise = new Promise(function (resolve) {\r\n // Don't complete stop() until stopConnection() completes.\r\n _this.stopPromiseResolver = resolve;\r\n });\r\n // stopInternal should never throw so just observe it.\r\n return [4 /*yield*/, this.stopInternal(error)];\r\n case 1:\r\n // stopInternal should never throw so just observe it.\r\n _a.sent();\r\n return [4 /*yield*/, this.stopPromise];\r\n case 2:\r\n _a.sent();\r\n return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n HttpConnection.prototype.stopInternal = function (error) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var e_1, e_2;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n // Set error as soon as possible otherwise there is a race between\r\n // the transport closing and providing an error and the error from a close message\r\n // We would prefer the close message error.\r\n this.stopError = error;\r\n _a.label = 1;\r\n case 1:\r\n _a.trys.push([1, 3, , 4]);\r\n return [4 /*yield*/, this.startInternalPromise];\r\n case 2:\r\n _a.sent();\r\n return [3 /*break*/, 4];\r\n case 3:\r\n e_1 = _a.sent();\r\n return [3 /*break*/, 4];\r\n case 4:\r\n if (!this.transport) return [3 /*break*/, 9];\r\n _a.label = 5;\r\n case 5:\r\n _a.trys.push([5, 7, , 8]);\r\n return [4 /*yield*/, this.transport.stop()];\r\n case 6:\r\n _a.sent();\r\n return [3 /*break*/, 8];\r\n case 7:\r\n e_2 = _a.sent();\r\n this.logger.log(LogLevel.Error, \"HttpConnection.transport.stop() threw error '\" + e_2 + \"'.\");\r\n this.stopConnection();\r\n return [3 /*break*/, 8];\r\n case 8:\r\n this.transport = undefined;\r\n return [3 /*break*/, 10];\r\n case 9:\r\n this.logger.log(LogLevel.Debug, \"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.\");\r\n _a.label = 10;\r\n case 10: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n HttpConnection.prototype.startInternal = function (transferFormat) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var url, negotiateResponse, redirects, _loop_1, this_1, e_3;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n url = this.baseUrl;\r\n this.accessTokenFactory = this.options.accessTokenFactory;\r\n _a.label = 1;\r\n case 1:\r\n _a.trys.push([1, 12, , 13]);\r\n if (!this.options.skipNegotiation) return [3 /*break*/, 5];\r\n if (!(this.options.transport === HttpTransportType.WebSockets)) return [3 /*break*/, 3];\r\n // No need to add a connection ID in this case\r\n this.transport = this.constructTransport(HttpTransportType.WebSockets);\r\n // We should just call connect directly in this case.\r\n // No fallback or negotiate in this case.\r\n return [4 /*yield*/, this.startTransport(url, transferFormat)];\r\n case 2:\r\n // We should just call connect directly in this case.\r\n // No fallback or negotiate in this case.\r\n _a.sent();\r\n return [3 /*break*/, 4];\r\n case 3: throw new Error(\"Negotiation can only be skipped when using the WebSocket transport directly.\");\r\n case 4: return [3 /*break*/, 11];\r\n case 5:\r\n negotiateResponse = null;\r\n redirects = 0;\r\n _loop_1 = function () {\r\n var accessToken_1;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, this_1.getNegotiationResponse(url)];\r\n case 1:\r\n negotiateResponse = _a.sent();\r\n // the user tries to stop the connection when it is being started\r\n if (this_1.connectionState === \"Disconnecting\" /* Disconnecting */ || this_1.connectionState === \"Disconnected\" /* Disconnected */) {\r\n throw new Error(\"The connection was stopped during negotiation.\");\r\n }\r\n if (negotiateResponse.error) {\r\n throw new Error(negotiateResponse.error);\r\n }\r\n if (negotiateResponse.ProtocolVersion) {\r\n throw new Error(\"Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.\");\r\n }\r\n if (negotiateResponse.url) {\r\n url = negotiateResponse.url;\r\n }\r\n if (negotiateResponse.accessToken) {\r\n accessToken_1 = negotiateResponse.accessToken;\r\n this_1.accessTokenFactory = function () { return accessToken_1; };\r\n }\r\n redirects++;\r\n return [2 /*return*/];\r\n }\r\n });\r\n };\r\n this_1 = this;\r\n _a.label = 6;\r\n case 6: return [5 /*yield**/, _loop_1()];\r\n case 7:\r\n _a.sent();\r\n _a.label = 8;\r\n case 8:\r\n if (negotiateResponse.url && redirects < MAX_REDIRECTS) return [3 /*break*/, 6];\r\n _a.label = 9;\r\n case 9:\r\n if (redirects === MAX_REDIRECTS && negotiateResponse.url) {\r\n throw new Error(\"Negotiate redirection limit exceeded.\");\r\n }\r\n return [4 /*yield*/, this.createTransport(url, this.options.transport, negotiateResponse, transferFormat)];\r\n case 10:\r\n _a.sent();\r\n _a.label = 11;\r\n case 11:\r\n if (this.transport instanceof LongPollingTransport) {\r\n this.features.inherentKeepAlive = true;\r\n }\r\n if (this.connectionState === \"Connecting \" /* Connecting */) {\r\n // Ensure the connection transitions to the connected state prior to completing this.startInternalPromise.\r\n // start() will handle the case when stop was called and startInternal exits still in the disconnecting state.\r\n this.logger.log(LogLevel.Debug, \"The HttpConnection connected successfully.\");\r\n this.connectionState = \"Connected\" /* Connected */;\r\n }\r\n return [3 /*break*/, 13];\r\n case 12:\r\n e_3 = _a.sent();\r\n this.logger.log(LogLevel.Error, \"Failed to start the connection: \" + e_3);\r\n this.connectionState = \"Disconnected\" /* Disconnected */;\r\n this.transport = undefined;\r\n // if start fails, any active calls to stop assume that start will complete the stop promise\r\n this.stopPromiseResolver();\r\n return [2 /*return*/, Promise.reject(e_3)];\r\n case 13: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n HttpConnection.prototype.getNegotiationResponse = function (url) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var _a, headers, token, negotiateUrl, response, negotiateResponse, e_4;\r\n return __generator(this, function (_b) {\r\n switch (_b.label) {\r\n case 0:\r\n if (!this.accessTokenFactory) return [3 /*break*/, 2];\r\n return [4 /*yield*/, this.accessTokenFactory()];\r\n case 1:\r\n token = _b.sent();\r\n if (token) {\r\n headers = (_a = {},\r\n _a[\"Authorization\"] = \"Bearer \" + token,\r\n _a);\r\n }\r\n _b.label = 2;\r\n case 2:\r\n negotiateUrl = this.resolveNegotiateUrl(url);\r\n this.logger.log(LogLevel.Debug, \"Sending negotiation request: \" + negotiateUrl + \".\");\r\n _b.label = 3;\r\n case 3:\r\n _b.trys.push([3, 5, , 6]);\r\n return [4 /*yield*/, this.httpClient.post(negotiateUrl, {\r\n content: \"\",\r\n headers: headers,\r\n })];\r\n case 4:\r\n response = _b.sent();\r\n if (response.statusCode !== 200) {\r\n return [2 /*return*/, Promise.reject(new Error(\"Unexpected status code returned from negotiate \" + response.statusCode))];\r\n }\r\n negotiateResponse = JSON.parse(response.content);\r\n if (!negotiateResponse.negotiateVersion || negotiateResponse.negotiateVersion < 1) {\r\n // Negotiate version 0 doesn't use connectionToken\r\n // So we set it equal to connectionId so all our logic can use connectionToken without being aware of the negotiate version\r\n negotiateResponse.connectionToken = negotiateResponse.connectionId;\r\n }\r\n return [2 /*return*/, negotiateResponse];\r\n case 5:\r\n e_4 = _b.sent();\r\n this.logger.log(LogLevel.Error, \"Failed to complete negotiation with the server: \" + e_4);\r\n return [2 /*return*/, Promise.reject(e_4)];\r\n case 6: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n HttpConnection.prototype.createConnectUrl = function (url, connectionToken) {\r\n if (!connectionToken) {\r\n return url;\r\n }\r\n return url + (url.indexOf(\"?\") === -1 ? \"?\" : \"&\") + (\"id=\" + connectionToken);\r\n };\r\n HttpConnection.prototype.createTransport = function (url, requestedTransport, negotiateResponse, requestedTransferFormat) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var connectUrl, transportExceptions, transports, negotiate, _i, transports_1, endpoint, transportOrError, ex_1, ex_2, message;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n connectUrl = this.createConnectUrl(url, negotiateResponse.connectionToken);\r\n if (!this.isITransport(requestedTransport)) return [3 /*break*/, 2];\r\n this.logger.log(LogLevel.Debug, \"Connection was provided an instance of ITransport, using that directly.\");\r\n this.transport = requestedTransport;\r\n return [4 /*yield*/, this.startTransport(connectUrl, requestedTransferFormat)];\r\n case 1:\r\n _a.sent();\r\n this.connectionId = negotiateResponse.connectionId;\r\n return [2 /*return*/];\r\n case 2:\r\n transportExceptions = [];\r\n transports = negotiateResponse.availableTransports || [];\r\n negotiate = negotiateResponse;\r\n _i = 0, transports_1 = transports;\r\n _a.label = 3;\r\n case 3:\r\n if (!(_i < transports_1.length)) return [3 /*break*/, 13];\r\n endpoint = transports_1[_i];\r\n transportOrError = this.resolveTransportOrError(endpoint, requestedTransport, requestedTransferFormat);\r\n if (!(transportOrError instanceof Error)) return [3 /*break*/, 4];\r\n // Store the error and continue, we don't want to cause a re-negotiate in these cases\r\n transportExceptions.push(endpoint.transport + \" failed: \" + transportOrError);\r\n return [3 /*break*/, 12];\r\n case 4:\r\n if (!this.isITransport(transportOrError)) return [3 /*break*/, 12];\r\n this.transport = transportOrError;\r\n if (!!negotiate) return [3 /*break*/, 9];\r\n _a.label = 5;\r\n case 5:\r\n _a.trys.push([5, 7, , 8]);\r\n return [4 /*yield*/, this.getNegotiationResponse(url)];\r\n case 6:\r\n negotiate = _a.sent();\r\n return [3 /*break*/, 8];\r\n case 7:\r\n ex_1 = _a.sent();\r\n return [2 /*return*/, Promise.reject(ex_1)];\r\n case 8:\r\n connectUrl = this.createConnectUrl(url, negotiate.connectionToken);\r\n _a.label = 9;\r\n case 9:\r\n _a.trys.push([9, 11, , 12]);\r\n return [4 /*yield*/, this.startTransport(connectUrl, requestedTransferFormat)];\r\n case 10:\r\n _a.sent();\r\n this.connectionId = negotiate.connectionId;\r\n return [2 /*return*/];\r\n case 11:\r\n ex_2 = _a.sent();\r\n this.logger.log(LogLevel.Error, \"Failed to start the transport '\" + endpoint.transport + \"': \" + ex_2);\r\n negotiate = undefined;\r\n transportExceptions.push(endpoint.transport + \" failed: \" + ex_2);\r\n if (this.connectionState !== \"Connecting \" /* Connecting */) {\r\n message = \"Failed to select transport before stop() was called.\";\r\n this.logger.log(LogLevel.Debug, message);\r\n return [2 /*return*/, Promise.reject(new Error(message))];\r\n }\r\n return [3 /*break*/, 12];\r\n case 12:\r\n _i++;\r\n return [3 /*break*/, 3];\r\n case 13:\r\n if (transportExceptions.length > 0) {\r\n return [2 /*return*/, Promise.reject(new Error(\"Unable to connect to the server with any of the available transports. \" + transportExceptions.join(\" \")))];\r\n }\r\n return [2 /*return*/, Promise.reject(new Error(\"None of the transports supported by the client are supported by the server.\"))];\r\n }\r\n });\r\n });\r\n };\r\n HttpConnection.prototype.constructTransport = function (transport) {\r\n switch (transport) {\r\n case HttpTransportType.WebSockets:\r\n if (!this.options.WebSocket) {\r\n throw new Error(\"'WebSocket' is not supported in your environment.\");\r\n }\r\n return new WebSocketTransport(this.httpClient, this.accessTokenFactory, this.logger, this.options.logMessageContent || false, this.options.WebSocket);\r\n case HttpTransportType.ServerSentEvents:\r\n if (!this.options.EventSource) {\r\n throw new Error(\"'EventSource' is not supported in your environment.\");\r\n }\r\n return new ServerSentEventsTransport(this.httpClient, this.accessTokenFactory, this.logger, this.options.logMessageContent || false, this.options.EventSource);\r\n case HttpTransportType.LongPolling:\r\n return new LongPollingTransport(this.httpClient, this.accessTokenFactory, this.logger, this.options.logMessageContent || false);\r\n default:\r\n throw new Error(\"Unknown transport: \" + transport + \".\");\r\n }\r\n };\r\n HttpConnection.prototype.startTransport = function (url, transferFormat) {\r\n var _this = this;\r\n this.transport.onreceive = this.onreceive;\r\n this.transport.onclose = function (e) { return _this.stopConnection(e); };\r\n return this.transport.connect(url, transferFormat);\r\n };\r\n HttpConnection.prototype.resolveTransportOrError = function (endpoint, requestedTransport, requestedTransferFormat) {\r\n var transport = HttpTransportType[endpoint.transport];\r\n if (transport === null || transport === undefined) {\r\n this.logger.log(LogLevel.Debug, \"Skipping transport '\" + endpoint.transport + \"' because it is not supported by this client.\");\r\n return new Error(\"Skipping transport '\" + endpoint.transport + \"' because it is not supported by this client.\");\r\n }\r\n else {\r\n if (transportMatches(requestedTransport, transport)) {\r\n var transferFormats = endpoint.transferFormats.map(function (s) { return TransferFormat[s]; });\r\n if (transferFormats.indexOf(requestedTransferFormat) >= 0) {\r\n if ((transport === HttpTransportType.WebSockets && !this.options.WebSocket) ||\r\n (transport === HttpTransportType.ServerSentEvents && !this.options.EventSource)) {\r\n this.logger.log(LogLevel.Debug, \"Skipping transport '\" + HttpTransportType[transport] + \"' because it is not supported in your environment.'\");\r\n return new Error(\"'\" + HttpTransportType[transport] + \"' is not supported in your environment.\");\r\n }\r\n else {\r\n this.logger.log(LogLevel.Debug, \"Selecting transport '\" + HttpTransportType[transport] + \"'.\");\r\n try {\r\n return this.constructTransport(transport);\r\n }\r\n catch (ex) {\r\n return ex;\r\n }\r\n }\r\n }\r\n else {\r\n this.logger.log(LogLevel.Debug, \"Skipping transport '\" + HttpTransportType[transport] + \"' because it does not support the requested transfer format '\" + TransferFormat[requestedTransferFormat] + \"'.\");\r\n return new Error(\"'\" + HttpTransportType[transport] + \"' does not support \" + TransferFormat[requestedTransferFormat] + \".\");\r\n }\r\n }\r\n else {\r\n this.logger.log(LogLevel.Debug, \"Skipping transport '\" + HttpTransportType[transport] + \"' because it was disabled by the client.\");\r\n return new Error(\"'\" + HttpTransportType[transport] + \"' is disabled by the client.\");\r\n }\r\n }\r\n };\r\n HttpConnection.prototype.isITransport = function (transport) {\r\n return transport && typeof (transport) === \"object\" && \"connect\" in transport;\r\n };\r\n HttpConnection.prototype.stopConnection = function (error) {\r\n var _this = this;\r\n this.logger.log(LogLevel.Debug, \"HttpConnection.stopConnection(\" + error + \") called while in state \" + this.connectionState + \".\");\r\n this.transport = undefined;\r\n // If we have a stopError, it takes precedence over the error from the transport\r\n error = this.stopError || error;\r\n this.stopError = undefined;\r\n if (this.connectionState === \"Disconnected\" /* Disconnected */) {\r\n this.logger.log(LogLevel.Debug, \"Call to HttpConnection.stopConnection(\" + error + \") was ignored because the connection is already in the disconnected state.\");\r\n return;\r\n }\r\n if (this.connectionState === \"Connecting \" /* Connecting */) {\r\n this.logger.log(LogLevel.Warning, \"Call to HttpConnection.stopConnection(\" + error + \") was ignored because the connection hasn't yet left the in the connecting state.\");\r\n return;\r\n }\r\n if (this.connectionState === \"Disconnecting\" /* Disconnecting */) {\r\n // A call to stop() induced this call to stopConnection and needs to be completed.\r\n // Any stop() awaiters will be scheduled to continue after the onclose callback fires.\r\n this.stopPromiseResolver();\r\n }\r\n if (error) {\r\n this.logger.log(LogLevel.Error, \"Connection disconnected with error '\" + error + \"'.\");\r\n }\r\n else {\r\n this.logger.log(LogLevel.Information, \"Connection disconnected.\");\r\n }\r\n if (this.sendQueue) {\r\n this.sendQueue.stop().catch(function (e) {\r\n _this.logger.log(LogLevel.Error, \"TransportSendQueue.stop() threw error '\" + e + \"'.\");\r\n });\r\n this.sendQueue = undefined;\r\n }\r\n this.connectionId = undefined;\r\n this.connectionState = \"Disconnected\" /* Disconnected */;\r\n if (this.connectionStarted) {\r\n this.connectionStarted = false;\r\n try {\r\n if (this.onclose) {\r\n this.onclose(error);\r\n }\r\n }\r\n catch (e) {\r\n this.logger.log(LogLevel.Error, \"HttpConnection.onclose(\" + error + \") threw error '\" + e + \"'.\");\r\n }\r\n }\r\n };\r\n HttpConnection.prototype.resolveUrl = function (url) {\r\n // startsWith is not supported in IE\r\n if (url.lastIndexOf(\"https://\", 0) === 0 || url.lastIndexOf(\"http://\", 0) === 0) {\r\n return url;\r\n }\r\n if (!Platform.isBrowser || !window.document) {\r\n throw new Error(\"Cannot resolve '\" + url + \"'.\");\r\n }\r\n // Setting the url to the href propery of an anchor tag handles normalization\r\n // for us. There are 3 main cases.\r\n // 1. Relative path normalization e.g \"b\" -> \"http://localhost:5000/a/b\"\r\n // 2. Absolute path normalization e.g \"/a/b\" -> \"http://localhost:5000/a/b\"\r\n // 3. Networkpath reference normalization e.g \"//localhost:5000/a/b\" -> \"http://localhost:5000/a/b\"\r\n var aTag = window.document.createElement(\"a\");\r\n aTag.href = url;\r\n this.logger.log(LogLevel.Information, \"Normalizing '\" + url + \"' to '\" + aTag.href + \"'.\");\r\n return aTag.href;\r\n };\r\n HttpConnection.prototype.resolveNegotiateUrl = function (url) {\r\n var index = url.indexOf(\"?\");\r\n var negotiateUrl = url.substring(0, index === -1 ? url.length : index);\r\n if (negotiateUrl[negotiateUrl.length - 1] !== \"/\") {\r\n negotiateUrl += \"/\";\r\n }\r\n negotiateUrl += \"negotiate\";\r\n negotiateUrl += index === -1 ? \"\" : url.substring(index);\r\n if (negotiateUrl.indexOf(\"negotiateVersion\") === -1) {\r\n negotiateUrl += index === -1 ? \"?\" : \"&\";\r\n negotiateUrl += \"negotiateVersion=\" + this.negotiateVersion;\r\n }\r\n return negotiateUrl;\r\n };\r\n return HttpConnection;\r\n}());\r\nexport { HttpConnection };\r\nfunction transportMatches(requestedTransport, actualTransport) {\r\n return !requestedTransport || ((actualTransport & requestedTransport) !== 0);\r\n}\r\n/** @private */\r\nvar TransportSendQueue = /** @class */ (function () {\r\n function TransportSendQueue(transport) {\r\n this.transport = transport;\r\n this.buffer = [];\r\n this.executing = true;\r\n this.sendBufferedData = new PromiseSource();\r\n this.transportResult = new PromiseSource();\r\n this.sendLoopPromise = this.sendLoop();\r\n }\r\n TransportSendQueue.prototype.send = function (data) {\r\n this.bufferData(data);\r\n if (!this.transportResult) {\r\n this.transportResult = new PromiseSource();\r\n }\r\n return this.transportResult.promise;\r\n };\r\n TransportSendQueue.prototype.stop = function () {\r\n this.executing = false;\r\n this.sendBufferedData.resolve();\r\n return this.sendLoopPromise;\r\n };\r\n TransportSendQueue.prototype.bufferData = function (data) {\r\n if (this.buffer.length && typeof (this.buffer[0]) !== typeof (data)) {\r\n throw new Error(\"Expected data to be of type \" + typeof (this.buffer) + \" but was of type \" + typeof (data));\r\n }\r\n this.buffer.push(data);\r\n this.sendBufferedData.resolve();\r\n };\r\n TransportSendQueue.prototype.sendLoop = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var transportResult, data, error_1;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n if (!true) return [3 /*break*/, 6];\r\n return [4 /*yield*/, this.sendBufferedData.promise];\r\n case 1:\r\n _a.sent();\r\n if (!this.executing) {\r\n if (this.transportResult) {\r\n this.transportResult.reject(\"Connection stopped.\");\r\n }\r\n return [3 /*break*/, 6];\r\n }\r\n this.sendBufferedData = new PromiseSource();\r\n transportResult = this.transportResult;\r\n this.transportResult = undefined;\r\n data = typeof (this.buffer[0]) === \"string\" ?\r\n this.buffer.join(\"\") :\r\n TransportSendQueue.concatBuffers(this.buffer);\r\n this.buffer.length = 0;\r\n _a.label = 2;\r\n case 2:\r\n _a.trys.push([2, 4, , 5]);\r\n return [4 /*yield*/, this.transport.send(data)];\r\n case 3:\r\n _a.sent();\r\n transportResult.resolve();\r\n return [3 /*break*/, 5];\r\n case 4:\r\n error_1 = _a.sent();\r\n transportResult.reject(error_1);\r\n return [3 /*break*/, 5];\r\n case 5: return [3 /*break*/, 0];\r\n case 6: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n TransportSendQueue.concatBuffers = function (arrayBuffers) {\r\n var totalLength = arrayBuffers.map(function (b) { return b.byteLength; }).reduce(function (a, b) { return a + b; });\r\n var result = new Uint8Array(totalLength);\r\n var offset = 0;\r\n for (var _i = 0, arrayBuffers_1 = arrayBuffers; _i < arrayBuffers_1.length; _i++) {\r\n var item = arrayBuffers_1[_i];\r\n result.set(new Uint8Array(item), offset);\r\n offset += item.byteLength;\r\n }\r\n return result;\r\n };\r\n return TransportSendQueue;\r\n}());\r\nexport { TransportSendQueue };\r\nvar PromiseSource = /** @class */ (function () {\r\n function PromiseSource() {\r\n var _this = this;\r\n this.promise = new Promise(function (resolve, reject) {\r\n var _a;\r\n return _a = [resolve, reject], _this.resolver = _a[0], _this.rejecter = _a[1], _a;\r\n });\r\n }\r\n PromiseSource.prototype.resolve = function () {\r\n this.resolver();\r\n };\r\n PromiseSource.prototype.reject = function (reason) {\r\n this.rejecter(reason);\r\n };\r\n return PromiseSource;\r\n}());\r\n//# sourceMappingURL=HttpConnection.js.map","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\r\nimport { MessageType } from \"./IHubProtocol\";\r\nimport { LogLevel } from \"./ILogger\";\r\nimport { TransferFormat } from \"./ITransport\";\r\nimport { NullLogger } from \"./Loggers\";\r\nimport { TextMessageFormat } from \"./TextMessageFormat\";\r\nvar JSON_HUB_PROTOCOL_NAME = \"json\";\r\n/** Implements the JSON Hub Protocol. */\r\nvar JsonHubProtocol = /** @class */ (function () {\r\n function JsonHubProtocol() {\r\n /** @inheritDoc */\r\n this.name = JSON_HUB_PROTOCOL_NAME;\r\n /** @inheritDoc */\r\n this.version = 1;\r\n /** @inheritDoc */\r\n this.transferFormat = TransferFormat.Text;\r\n }\r\n /** Creates an array of {@link @microsoft/signalr.HubMessage} objects from the specified serialized representation.\r\n *\r\n * @param {string} input A string containing the serialized representation.\r\n * @param {ILogger} logger A logger that will be used to log messages that occur during parsing.\r\n */\r\n JsonHubProtocol.prototype.parseMessages = function (input, logger) {\r\n // The interface does allow \"ArrayBuffer\" to be passed in, but this implementation does not. So let's throw a useful error.\r\n if (typeof input !== \"string\") {\r\n throw new Error(\"Invalid input for JSON hub protocol. Expected a string.\");\r\n }\r\n if (!input) {\r\n return [];\r\n }\r\n if (logger === null) {\r\n logger = NullLogger.instance;\r\n }\r\n // Parse the messages\r\n var messages = TextMessageFormat.parse(input);\r\n var hubMessages = [];\r\n for (var _i = 0, messages_1 = messages; _i < messages_1.length; _i++) {\r\n var message = messages_1[_i];\r\n var parsedMessage = JSON.parse(message);\r\n if (typeof parsedMessage.type !== \"number\") {\r\n throw new Error(\"Invalid payload.\");\r\n }\r\n switch (parsedMessage.type) {\r\n case MessageType.Invocation:\r\n this.isInvocationMessage(parsedMessage);\r\n break;\r\n case MessageType.StreamItem:\r\n this.isStreamItemMessage(parsedMessage);\r\n break;\r\n case MessageType.Completion:\r\n this.isCompletionMessage(parsedMessage);\r\n break;\r\n case MessageType.Ping:\r\n // Single value, no need to validate\r\n break;\r\n case MessageType.Close:\r\n // All optional values, no need to validate\r\n break;\r\n default:\r\n // Future protocol changes can add message types, old clients can ignore them\r\n logger.log(LogLevel.Information, \"Unknown message type '\" + parsedMessage.type + \"' ignored.\");\r\n continue;\r\n }\r\n hubMessages.push(parsedMessage);\r\n }\r\n return hubMessages;\r\n };\r\n /** Writes the specified {@link @microsoft/signalr.HubMessage} to a string and returns it.\r\n *\r\n * @param {HubMessage} message The message to write.\r\n * @returns {string} A string containing the serialized representation of the message.\r\n */\r\n JsonHubProtocol.prototype.writeMessage = function (message) {\r\n return TextMessageFormat.write(JSON.stringify(message));\r\n };\r\n JsonHubProtocol.prototype.isInvocationMessage = function (message) {\r\n this.assertNotEmptyString(message.target, \"Invalid payload for Invocation message.\");\r\n if (message.invocationId !== undefined) {\r\n this.assertNotEmptyString(message.invocationId, \"Invalid payload for Invocation message.\");\r\n }\r\n };\r\n JsonHubProtocol.prototype.isStreamItemMessage = function (message) {\r\n this.assertNotEmptyString(message.invocationId, \"Invalid payload for StreamItem message.\");\r\n if (message.item === undefined) {\r\n throw new Error(\"Invalid payload for StreamItem message.\");\r\n }\r\n };\r\n JsonHubProtocol.prototype.isCompletionMessage = function (message) {\r\n if (message.result && message.error) {\r\n throw new Error(\"Invalid payload for Completion message.\");\r\n }\r\n if (!message.result && message.error) {\r\n this.assertNotEmptyString(message.error, \"Invalid payload for Completion message.\");\r\n }\r\n this.assertNotEmptyString(message.invocationId, \"Invalid payload for Completion message.\");\r\n };\r\n JsonHubProtocol.prototype.assertNotEmptyString = function (value, errorMessage) {\r\n if (typeof value !== \"string\" || value === \"\") {\r\n throw new Error(errorMessage);\r\n }\r\n };\r\n return JsonHubProtocol;\r\n}());\r\nexport { JsonHubProtocol };\r\n//# sourceMappingURL=JsonHubProtocol.js.map","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\r\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n t[p] = s[p];\r\n }\r\n return t;\r\n};\r\nimport { DefaultReconnectPolicy } from \"./DefaultReconnectPolicy\";\r\nimport { HttpConnection } from \"./HttpConnection\";\r\nimport { HubConnection } from \"./HubConnection\";\r\nimport { LogLevel } from \"./ILogger\";\r\nimport { JsonHubProtocol } from \"./JsonHubProtocol\";\r\nimport { NullLogger } from \"./Loggers\";\r\nimport { Arg, ConsoleLogger } from \"./Utils\";\r\n// tslint:disable:object-literal-sort-keys\r\nvar LogLevelNameMapping = {\r\n trace: LogLevel.Trace,\r\n debug: LogLevel.Debug,\r\n info: LogLevel.Information,\r\n information: LogLevel.Information,\r\n warn: LogLevel.Warning,\r\n warning: LogLevel.Warning,\r\n error: LogLevel.Error,\r\n critical: LogLevel.Critical,\r\n none: LogLevel.None,\r\n};\r\nfunction parseLogLevel(name) {\r\n // Case-insensitive matching via lower-casing\r\n // Yes, I know case-folding is a complicated problem in Unicode, but we only support\r\n // the ASCII strings defined in LogLevelNameMapping anyway, so it's fine -anurse.\r\n var mapping = LogLevelNameMapping[name.toLowerCase()];\r\n if (typeof mapping !== \"undefined\") {\r\n return mapping;\r\n }\r\n else {\r\n throw new Error(\"Unknown log level: \" + name);\r\n }\r\n}\r\n/** A builder for configuring {@link @microsoft/signalr.HubConnection} instances. */\r\nvar HubConnectionBuilder = /** @class */ (function () {\r\n function HubConnectionBuilder() {\r\n }\r\n HubConnectionBuilder.prototype.configureLogging = function (logging) {\r\n Arg.isRequired(logging, \"logging\");\r\n if (isLogger(logging)) {\r\n this.logger = logging;\r\n }\r\n else if (typeof logging === \"string\") {\r\n var logLevel = parseLogLevel(logging);\r\n this.logger = new ConsoleLogger(logLevel);\r\n }\r\n else {\r\n this.logger = new ConsoleLogger(logging);\r\n }\r\n return this;\r\n };\r\n HubConnectionBuilder.prototype.withUrl = function (url, transportTypeOrOptions) {\r\n Arg.isRequired(url, \"url\");\r\n this.url = url;\r\n // Flow-typing knows where it's at. Since HttpTransportType is a number and IHttpConnectionOptions is guaranteed\r\n // to be an object, we know (as does TypeScript) this comparison is all we need to figure out which overload was called.\r\n if (typeof transportTypeOrOptions === \"object\") {\r\n this.httpConnectionOptions = __assign({}, this.httpConnectionOptions, transportTypeOrOptions);\r\n }\r\n else {\r\n this.httpConnectionOptions = __assign({}, this.httpConnectionOptions, { transport: transportTypeOrOptions });\r\n }\r\n return this;\r\n };\r\n /** Configures the {@link @microsoft/signalr.HubConnection} to use the specified Hub Protocol.\r\n *\r\n * @param {IHubProtocol} protocol The {@link @microsoft/signalr.IHubProtocol} implementation to use.\r\n */\r\n HubConnectionBuilder.prototype.withHubProtocol = function (protocol) {\r\n Arg.isRequired(protocol, \"protocol\");\r\n this.protocol = protocol;\r\n return this;\r\n };\r\n HubConnectionBuilder.prototype.withAutomaticReconnect = function (retryDelaysOrReconnectPolicy) {\r\n if (this.reconnectPolicy) {\r\n throw new Error(\"A reconnectPolicy has already been set.\");\r\n }\r\n if (!retryDelaysOrReconnectPolicy) {\r\n this.reconnectPolicy = new DefaultReconnectPolicy();\r\n }\r\n else if (Array.isArray(retryDelaysOrReconnectPolicy)) {\r\n this.reconnectPolicy = new DefaultReconnectPolicy(retryDelaysOrReconnectPolicy);\r\n }\r\n else {\r\n this.reconnectPolicy = retryDelaysOrReconnectPolicy;\r\n }\r\n return this;\r\n };\r\n /** Creates a {@link @microsoft/signalr.HubConnection} from the configuration options specified in this builder.\r\n *\r\n * @returns {HubConnection} The configured {@link @microsoft/signalr.HubConnection}.\r\n */\r\n HubConnectionBuilder.prototype.build = function () {\r\n // If httpConnectionOptions has a logger, use it. Otherwise, override it with the one\r\n // provided to configureLogger\r\n var httpConnectionOptions = this.httpConnectionOptions || {};\r\n // If it's 'null', the user **explicitly** asked for null, don't mess with it.\r\n if (httpConnectionOptions.logger === undefined) {\r\n // If our logger is undefined or null, that's OK, the HttpConnection constructor will handle it.\r\n httpConnectionOptions.logger = this.logger;\r\n }\r\n // Now create the connection\r\n if (!this.url) {\r\n throw new Error(\"The 'HubConnectionBuilder.withUrl' method must be called before building the connection.\");\r\n }\r\n var connection = new HttpConnection(this.url, httpConnectionOptions);\r\n return HubConnection.create(connection, this.logger || NullLogger.instance, this.protocol || new JsonHubProtocol(), this.reconnectPolicy);\r\n };\r\n return HubConnectionBuilder;\r\n}());\r\nexport { HubConnectionBuilder };\r\nfunction isLogger(logger) {\r\n return logger.log !== undefined;\r\n}\r\n//# sourceMappingURL=HubConnectionBuilder.js.map","export * from \"-!../../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./live-ing.vue?vue&type=style&index=0&id=0bd7bfff&prod&scoped=true&lang=scss&\"","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\n/** Error thrown when an HTTP request fails. */\r\nvar HttpError = /** @class */ (function (_super) {\r\n __extends(HttpError, _super);\r\n /** Constructs a new instance of {@link @microsoft/signalr.HttpError}.\r\n *\r\n * @param {string} errorMessage A descriptive error message.\r\n * @param {number} statusCode The HTTP status code represented by this error.\r\n */\r\n function HttpError(errorMessage, statusCode) {\r\n var _newTarget = this.constructor;\r\n var _this = this;\r\n var trueProto = _newTarget.prototype;\r\n _this = _super.call(this, errorMessage) || this;\r\n _this.statusCode = statusCode;\r\n // Workaround issue in Typescript compiler\r\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\r\n _this.__proto__ = trueProto;\r\n return _this;\r\n }\r\n return HttpError;\r\n}(Error));\r\nexport { HttpError };\r\n/** Error thrown when a timeout elapses. */\r\nvar TimeoutError = /** @class */ (function (_super) {\r\n __extends(TimeoutError, _super);\r\n /** Constructs a new instance of {@link @microsoft/signalr.TimeoutError}.\r\n *\r\n * @param {string} errorMessage A descriptive error message.\r\n */\r\n function TimeoutError(errorMessage) {\r\n var _newTarget = this.constructor;\r\n if (errorMessage === void 0) { errorMessage = \"A timeout occurred.\"; }\r\n var _this = this;\r\n var trueProto = _newTarget.prototype;\r\n _this = _super.call(this, errorMessage) || this;\r\n // Workaround issue in Typescript compiler\r\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\r\n _this.__proto__ = trueProto;\r\n return _this;\r\n }\r\n return TimeoutError;\r\n}(Error));\r\nexport { TimeoutError };\r\n/** Error thrown when an action is aborted. */\r\nvar AbortError = /** @class */ (function (_super) {\r\n __extends(AbortError, _super);\r\n /** Constructs a new instance of {@link AbortError}.\r\n *\r\n * @param {string} errorMessage A descriptive error message.\r\n */\r\n function AbortError(errorMessage) {\r\n var _newTarget = this.constructor;\r\n if (errorMessage === void 0) { errorMessage = \"An abort occurred.\"; }\r\n var _this = this;\r\n var trueProto = _newTarget.prototype;\r\n _this = _super.call(this, errorMessage) || this;\r\n // Workaround issue in Typescript compiler\r\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\r\n _this.__proto__ = trueProto;\r\n return _this;\r\n }\r\n return AbortError;\r\n}(Error));\r\nexport { AbortError };\r\n//# sourceMappingURL=Errors.js.map"],"sourceRoot":""}