1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
jellyfin-web/dashboard-ui/bower_components/hlsjs/dist/hls.min.js

6 lines
132 KiB
JavaScript
Raw Normal View History

2016-11-10 17:38:58 -05:00
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.Hls=e()}}(function(){return function e(t,r,a){function i(s,o){if(!r[s]){if(!t[s]){var l="function"==typeof require&&require;if(!o&&l)return l(s,!0);if(n)return n(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var d=r[s]={exports:{}};t[s][0].call(d.exports,function(e){var r=t[s][1][e];return i(r?r:e)},d,d.exports,e,t,r,a)}return r[s].exports}for(var n="function"==typeof require&&require,s=0;s<a.length;s++)i(a[s]);return i}({1:[function(e,t,r){function a(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function n(e){return"number"==typeof e}function s(e){return"object"==typeof e&&null!==e}function o(e){return void 0===e}t.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._maxListeners=void 0,a.defaultMaxListeners=10,a.prototype.setMaxListeners=function(e){if(!n(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},a.prototype.emit=function(e){var t,r,a,n,l,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||s(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(r=this._events[e],o(r))return!1;if(i(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:n=Array.prototype.slice.call(arguments,1),r.apply(this,n)}else if(s(r))for(n=Array.prototype.slice.call(arguments,1),u=r.slice(),a=u.length,l=0;l<a;l++)u[l].apply(this,n);return!0},a.prototype.addListener=function(e,t){var r;if(!i(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,i(t.listener)?t.listener:t),this._events[e]?s(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,s(this._events[e])&&!this._events[e].warned&&(r=o(this._maxListeners)?a.defaultMaxListeners:this._maxListeners,r&&r>0&&this._events[e].length>r&&(this._events[e].warned=!0,"function"==typeof console.trace)),this},a.prototype.on=a.prototype.addListener,a.prototype.once=function(e,t){function r(){this.removeListener(e,r),a||(a=!0,t.apply(this,arguments))}if(!i(t))throw TypeError("listener must be a function");var a=!1;return r.listener=t,this.on(e,r),this},a.prototype.removeListener=function(e,t){var r,a,n,o;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],n=r.length,a=-1,r===t||i(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(s(r)){for(o=n;o-- >0;)if(r[o]===t||r[o].listener&&r[o].listener===t){a=o;break}if(a<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(a,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},a.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],i(r))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},a.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},a.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},a.listenerCount=function(e,t){return e.listenerCount(t)}},{}]
this.demuxer=null),this.state=R.STOPPED}},{key:"tick",value:function(){this.ticks++,1===this.ticks&&(this.doTick(),this.ticks>1&&setTimeout(this.tick,1),this.ticks=0)}},{key:"doTick",value:function(){var e,t,r,a=this.hls,i=a.config,n=this.media,s=n&&n.seeking;switch(this.state){case R.ERROR:break;case R.BUFFER_FLUSHING:this.fragLoadError=0;break;case R.IDLE:if(void 0!==this.levelLastLoaded&&!n&&(this.startFragRequested||!i.startFragPrefetch))break;e=this.loadedmetadata?n.currentTime:this.nextLoadPosition,t=a.nextLoadLevel;var o=m.default.bufferInfo(n,e,i.maxBufferHole),l=o.len,u=o.end,d=this.fragPrevious,h=this.levels[t],c=h.bitrate,g=void 0;if(g=c?Math.max(8*i.maxBufferSize/c,i.maxBufferLength):i.maxBufferLength,g=Math.min(g,i.maxMaxBufferLength),l<g){if(this.level=a.nextLoadLevel=t,r=h.details,"undefined"==typeof r||r.live&&this.levelLastLoaded!==t){this.state=R.WAITING_LEVEL;break}if(!r.live&&d&&d.sn===r.endSN&&(!s||n.duration-u<=d.duration/2)){this.hls.trigger(f.default.BUFFER_EOS),this.state=R.ENDED;break}var y=r.fragments,b=y.length;if(0===b)break;var E=y[0].start,L=y[b-1].start+y[b-1].duration,k=void 0;if(r.live){if(b<i.initialLiveManifestSize){v.logger.warn("Can not start playback of a level, reason: not enough fragments "+b+" < "+i.initialLiveManifestSize);break}var T=void 0!==i.liveMaxLatencyDuration?i.liveMaxLatencyDuration:i.liveMaxLatencyDurationCount*r.targetduration;if(u<Math.max(E,L-T)){var A=void 0!==i.liveSyncDuration?i.liveSyncDuration:i.liveSyncDurationCount*r.targetduration,S=E+Math.max(0,r.totalduration-A);v.logger.log("buffer end: "+u+" is located too far from the end of live sliding playlist, reset currentTime to : "+S.toFixed(3)),u=S,n&&n.readyState&&n.duration>S&&(n.currentTime=S)}if(r.PTSKnown&&u>L)break;if(this.startFragRequested&&!r.PTSKnown){if(d){var w=d.sn+1;w>=r.startSN&&w<=r.endSN&&(k=y[w-r.startSN],v.logger.log("live playlist, switching playlist, load frag with next SN: "+k.sn))}k||(k=y[Math.min(b-1,Math.round(b/2))],v.logger.log("live playlist, switching playlist, unknown, load middle frag : "+k.sn))}}else u<E&&(k=y[0]);if(k||!function(){var e=i.maxFragLookUpTolerance;u<L?((u>L-e||s)&&(e=0),k=p.default.search(y,function(t){return t.start+t.duration-e<=u?1:t.start-e>u?-1:0})):k=y[b-1]}(),k){if(E=k.start,d&&k.level===d.level&&k.sn===d.sn){if(!(k.sn<r.endSN))break;var D=d.deltaPTS,O=k.sn-r.startSN;if(D&&D>i.maxBufferHole&&d.dropped?(k=y[O-1],v.logger.warn("SN just loaded, with large PTS gap between audio and video, maybe frag is not starting with a keyframe ? load previous one to try to overcome this"),d.loadCounter--):(k=y[O+1],v.logger.log("SN just loaded, load next one: "+k.sn)),!k)break}if(null!=k.decryptdata.uri&&null==k.decryptdata.key)v.logger.log("Loading key for "+k.sn+" of ["+r.startSN+" ,"+r.endSN+"],level "+t),this.state=R.KEY_LOADING,a.trigger(f.default.KEY_LOADING,{frag:k});else{if(v.logger.log("Loading "+k.sn+" of ["+r.startSN+" ,"+r.endSN+"],level "+t+", currentTime:"+e.toFixed(3)+",bufferEnd:"+u.toFixed(3)),void 0!==this.fragLoadIdx?this.fragLoadIdx++:this.fragLoadIdx=0,k.loadCounter){k.loadCounter++;var P=i.fragLoadingLoopThreshold;if(k.loadCounter>P&&Math.abs(this.fragLoadIdx-k.loadIdx)<P)return void a.trigger(f.default.ERROR,{type:_.ErrorTypes.MEDIA_ERROR,details:_.ErrorDetails.FRAG_LOOP_LOADING_ERROR,fatal:!1,frag:k})}else k.loadCounter=1;k.loadIdx=this.fragLoadIdx,this.fragCurrent=k,this.startFragRequested=!0,k.autoLevel=a.autoLevelEnabled,k.bitrateTest=this.bitrateTest,a.trigger(f.default.FRAG_LOADING,{frag:k}),this.state=R.FRAG_LOADING}}}break;case R.WAITING_LEVEL:t=this.levels[this.level],t&&t.details&&(this.state=R.IDLE);break;case R.FRAG_LOADING_WAITING_RETRY:var x=performance.now(),I=this.retryDate;(!I||x>=I||s)&&(v.logger.log("streamController: retryDate reached, switch back to IDLE state"),this.state=R.IDLE);break;case R.STOPPED:case R.FRAG_LOADING:case R.PARSING:case R.PARSED:case R.ENDED:}this._checkBuffer(),this._checkFragmentChanged()}},{key:"getBufferRange",value:function(e){var t,r,a=this.bufferRange;if(a)for(t=a.length-1;t>=0;t--)if(r=a[t],e>=r.start&
samples:r.samples};e.postMessage(a)})};r.default=d},{"../demux/demuxer-inline":15,"../events":23,events:1}],17:[function(e,t,r){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,r,a){return r&&e(t.prototype,r),a&&e(t,a),t}}(),s=e("../events"),o=a(s),l=e("../demux/demuxer-inline"),u=a(l),d=e("../demux/demuxer-worker"),f=a(d),h=e("../utils/logger"),c=e("../crypt/decrypter"),v=a(c),g=e("../errors"),p=function(){function t(r){i(this,t),this.hls=r;var a={mp4:MediaSource.isTypeSupported("video/mp4"),mp2t:r.config.enableMP2TPassThrough&&MediaSource.isTypeSupported("video/mp2t")};if(r.config.enableWorker&&"undefined"!=typeof Worker){h.logger.log("demuxing in webworker");var n=void 0;try{var s=e("webworkify");n=this.w=s(f.default),this.onwmsg=this.onWorkerMessage.bind(this),n.addEventListener("message",this.onwmsg),n.onerror=function(e){r.trigger(o.default.ERROR,{type:g.ErrorTypes.OTHER_ERROR,details:g.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",err:{message:e.message+" ("+e.filename+":"+e.lineno+")"}})},n.postMessage({cmd:"init",typeSupported:a})}catch(e){h.logger.error("error while initializing DemuxerWorker, fallback on DemuxerInline"),n&&URL.revokeObjectURL(n.objectURL),this.demuxer=new u.default(r,a)}}else this.demuxer=new u.default(r,a);this.demuxInitialized=!0}return n(t,[{key:"destroy",value:function(){var e=this.w;if(e)e.removeEventListener("message",this.onwmsg),e.terminate(),this.w=null;else{var t=this.demuxer;t&&(t.destroy(),this.demuxer=null)}var r=this.decrypter;r&&(r.destroy(),this.decrypter=null)}},{key:"pushDecrypted",value:function(e,t,r,a,i,n,s,o){var l=this.w;if(l)l.postMessage({cmd:"demux",data:e,audioCodec:t,videoCodec:r,timeOffset:a,cc:i,level:n,sn:s,duration:o},[e]);else{var u=this.demuxer;u&&u.push(new Uint8Array(e),t,r,a,i,n,s,o)}}},{key:"push",value:function(e,t,r,a,i,n,s,o,l){if(e.byteLength>0&&null!=l&&null!=l.key&&"AES-128"===l.method){null==this.decrypter&&(this.decrypter=new v.default(this.hls));var u=this;this.decrypter.decrypt(e,l.key,l.iv,function(e){u.pushDecrypted(e,t,r,a,i,n,s,o)})}else this.pushDecrypted(e,t,r,a,i,n,s,o)}},{key:"onWorkerMessage",value:function(e){var t=e.data;switch(t.event){case o.default.FRAG_PARSING_INIT_SEGMENT:var r={};r.tracks=t.tracks,r.unique=t.unique,this.hls.trigger(o.default.FRAG_PARSING_INIT_SEGMENT,r);break;case"init":URL.revokeObjectURL(this.w.objectURL);break;case o.default.FRAG_PARSING_DATA:this.hls.trigger(o.default.FRAG_PARSING_DATA,{data1:new Uint8Array(t.data1),data2:new Uint8Array(t.data2),startPTS:t.startPTS,endPTS:t.endPTS,startDTS:t.startDTS,endDTS:t.endDTS,type:t.type,nb:t.nb,dropped:t.dropped});break;case o.default.FRAG_PARSING_METADATA:this.hls.trigger(o.default.FRAG_PARSING_METADATA,{samples:t.samples});break;case o.default.FRAG_PARSING_USERDATA:this.hls.trigger(o.default.FRAG_PARSING_USERDATA,{samples:t.samples});break;default:this.hls.trigger(t.event,t.data)}}}]),t}();r.default=p},{"../crypt/decrypter":12,"../demux/demuxer-inline":15,"../demux/demuxer-worker":16,"../errors":21,"../events":23,"../utils/logger":38,webworkify:2}],18:[function(e,t,r){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,r,a){return r&&e(t.prototype,r),a&&e(t,a),t}}(),n=e("../utils/logger"),s=function(){function e(t){a(this,e),this.data=t,this.bytesAvailable=this.data.byteLength,this.word=0,this.bitsAvailable=0}return i(e,[{key:"loadWord",value:function(){var e=this.data.byteLength-this.bytesAvailab
}},{key:"firstLevel",get:function(){return this.levelController.firstLevel},set:function(e){T.logger.log("set firstLevel:"+e),this.levelController.firstLevel=e}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(e){T.logger.log("set startLevel:"+e),this.levelController.startLevel=e}},{key:"autoLevelCapping",get:function(){return this.abrController.autoLevelCapping},set:function(e){T.logger.log("set autoLevelCapping:"+e),this.abrController.autoLevelCapping=e}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}}]),e}();r.default=x},{"./controller/abr-controller":3,"./controller/buffer-controller":4,"./controller/cap-level-controller":5,"./controller/level-controller":7,"./controller/stream-controller":8,"./controller/timeline-controller":9,"./errors":21,"./events":23,"./loader/fragment-loader":28,"./loader/key-loader":29,"./loader/playlist-loader":30,"./utils/logger":38,"./utils/xhr-loader":40,events:1}],27:[function(e,t,r){"use strict";t.exports=e("./hls.js").default},{"./hls.js":26}],28:[function(e,t,r){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,r,a){return r&&e(t.prototype,r),a&&e(t,a),t}}(),l=e("../events"),u=a(l),d=e("../event-handler"),f=a(d),h=e("../errors"),c=function(e){function t(e){return i(this,t),n(this,Object.getPrototypeOf(t).call(this,e,u.default.FRAG_LOADING))}return s(t,e),o(t,[{key:"destroy",value:function(){var e=this.loader;e&&(e.abort(),this.loader=null),f.default.prototype.destroy.call(this)}},{key:"onFragLoading",value:function(e){var t=this.frag=e.frag,r=this.hls.config;t.loaded=0,t.loader=this.loader="undefined"!=typeof r.fLoader?new r.fLoader(r):new r.loader(r),t.loader.load(t.url,"arraybuffer",this.loadsuccess.bind(this),this.loaderror.bind(this),this.loadtimeout.bind(this),r.fragLoadingTimeOut,0,0,this.loadprogress.bind(this),t)}},{key:"loadsuccess",value:function(e,t){var r=e.currentTarget.response,a=this.frag;t.length=r.byteLength,this.loader=a.loader=void 0,this.hls.trigger(u.default.FRAG_LOADED,{payload:r,frag:a,stats:t})}},{key:"loaderror",value:function(e){var t=this.loader;t&&t.abort(),this.hls.trigger(u.default.ERROR,{type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:this.frag,response:e})}},{key:"loadtimeout",value:function(){var e=this.loader;e&&e.abort(),this.hls.trigger(u.default.ERROR,{type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:this.frag})}},{key:"loadprogress",value:function(e,t){var r=this.frag;r.loaded=t.loaded,this.hls.trigger(u.default.FRAG_LOAD_PROGRESS,{frag:r,stats:t})}}]),t}(f.default);r.default=c},{"../errors":21,"../event-handler":22,"../events":23}],29:[function(e,t,r){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e
break;case 35:break;case 36:break;case 37:break;case 38:break;case 39:break;case 40:break;case 41:break;case 42:break;case 43:break;case 44:break;case 45:break;case 46:break;case 47:}if((20===a||28===a)&&i>=32&&i<=47)switch(i){case 32:this._clearActiveCues(e);break;case 33:this.cue.text=this.cue.text.substr(0,this.cue.text.length-1);break;case 34:break;case 35:break;case 36:break;case 37:break;case 38:break;case 39:break;case 40:break;case 41:this._clearActiveCues(e);break;case 42:break;case 43:break;case 44:this._clearActiveCues(e);break;case 45:break;case 46:this._text="";break;case 47:this._flipMemory(e)}if((23===a||31===a)&&i>=33&&i<=35)switch(i){case 33:break;case 34:break;case 35:}}}},{key:"_fromCharCode",value:function(e){switch(e){case 42:return"á";case 2:return"á";case 2:return"é";case 4:return"í";case 5:return"ó";case 6:return"ú";case 3:return"ç";case 4:return"÷";case 5:return"Ñ";case 6:return"ñ";case 7:return"█";default:return String.fromCharCode(e)}}},{key:"_flipMemory",value:function(e){this._clearActiveCues(e),this._flushCaptions(e)}},{key:"_flushCaptions",value:function(e){this._has708||(this._textTrack=this.media.addTextTrack("captions","English","en"),this._has708=!0);var t=!0,r=!1,a=void 0;try{for(var i,n=this.memory[Symbol.iterator]();!(t=(i=n.next()).done);t=!0){var s=i.value;s.startTime=e,this._textTrack.addCue(s),this.display.push(s)}}catch(e){r=!0,a=e}finally{try{!t&&n.return&&n.return()}finally{if(r)throw a}}this.memory=[],this.cue=null}},{key:"_clearActiveCues",value:function(e){var t=!0,r=!1,a=void 0;try{for(var i,n=this.display[Symbol.iterator]();!(t=(i=n.next()).done);t=!0){var s=i.value;s.endTime=e}}catch(e){r=!0,a=e}finally{try{!t&&n.return&&n.return()}finally{if(r)throw a}}this.display=[]}},{key:"_clearBufferedCues",value:function(){}}]),e}();r.default=n},{}],37:[function(e,t,r){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,r,a){return r&&e(t.prototype,r),a&&e(t,a),t}}(),n=function(){function e(t){a(this,e),this.alpha_=t?Math.exp(Math.log(.5)/t):0,this.estimate_=0,this.totalWeight_=0}return i(e,[{key:"sample",value:function(e,t){var r=Math.pow(this.alpha_,e);this.estimate_=t*(1-r)+r*this.estimate_,this.totalWeight_+=e}},{key:"getTotalWeight",value:function(){return this.totalWeight_}},{key:"getEstimate",value:function(){if(this.alpha_){var e=1-Math.pow(this.alpha_,this.totalWeight_);return this.estimate_/e}return this.estimate_}}]),e}();r.default=n},{}],38:[function(e,t,r){"use strict";function a(){}function i(e,t){return t="["+e+"] > "+t}function n(e){var t=window.console[e];return t?function(){for(var r=arguments.length,a=Array(r),n=0;n<r;n++)a[n]=arguments[n];a[0]&&(a[0]=i(e,a[0])),t.apply(window.console,a)}:a}function s(e){for(var t=arguments.length,r=Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];r.forEach(function(t){u[t]=e[t]?e[t].bind(e):n(t)})}Object.defineProperty(r,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},l={trace:a,debug:a,log:a,warn:a,info:a,error:a},u=l;r.enableLogs=function(e){if(e===!0||"object"===("undefined"==typeof e?"undefined":o(e))){s(e,"debug","log","info","warn","error");try{u.log()}catch(e){u=l}}else u=l},r.logger=u},{}],39:[function(e,t,r){"use strict";var a={buildAbsoluteURL:function(e,t){if(t=t.trim(),/^[a-z]+:/i.test(t))return t;var r=null,i=null,n=/^([^#]*)(.*)$/.exec(t);n&&(i=n[2],t=n[1]);var s=/^([^\?]*)(.*)$/.exec(t);s&&(r=s[2],t=s[1]);var o=/^([^#]*)(.*)$/.exec(e);o&&(e=o[1]);var l=/^([^\?]*)(.*)$/.exec(e);l&&(e=l[1]);var u=/^(([a-z]+:)?\/\/[a-z0-9\.\-_~]+(:[0-9]+)?)?(\/.*)$/i.exec(e);if(!u)throw new Error("Error trying to parse base URL.");var d=u[2]||"",f=u[1]||"",h=u[