mux-embed
Advanced tools
Comparing version 2.0.39 to 2.0.40
/** | ||
* mux-embed | ||
* @version 2.0.39 | ||
* @version 2.0.40 | ||
* @copyright 2016 Mux, Inc | ||
* @license | ||
*/ | ||
!function(){var e=!1;!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof e&&e.amd)e([],t);else{var i;i="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,i.mux=t()}}(function(){var e;return function e(t,i,a){function r(o,s){if(!i[o]){if(!t[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(n)return n(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var d=i[o]={exports:{}};t[o][0].call(d.exports,function(e){var i=t[o][1][e];return r(i?i:e)},d,d.exports,e,t,i,a)}return i[o].exports}for(var n="function"==typeof require&&require,o=0;o<a.length;o++)r(a[o]);return r}({1:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function r(e){var t={};for(var i in e)e.hasOwnProperty(i)&&(t[e[i]]=i);return t}function n(e){var t={};return Object.keys(e).forEach(function(i){if(e.hasOwnProperty(i)&&void 0!==e[i]){var a=i.split("_"),r=a[0],n=u[r];n||(s.default.debug("Data key word `"+a[0]+"` not expected in "+i),n=r+"_"),a.splice(1).forEach(function(e){c[e]?n+=c[e]:(s.default.debug("Data key word `"+e+"` not expected in "+i),n+="_"+e+"_")}),t[n]=e[i]}}),t}Object.defineProperty(i,"__esModule",{value:!0}),i.default=n;var o=e("./utils/log.js"),s=a(o),l={a:"property",d:"ad",e:"event",f:"experiment",m:"mux",p:"player",s:"session",t:"timestamp",u:"viewer",v:"video",w:"page",x:"view"},u=r(l),d={ad:"ad",ag:"aggregate",ap:"api",al:"application",ar:"architecture",au:"autoplay",br:"break",cd:"code",cg:"category",cn:"config",co:"count",cp:"complete",ct:"content",cu:"current",dg:"downscaling",dm:"domain",dn:"cdn",do:"downscale",du:"duration",dv:"device",ec:"encoding",en:"end",eg:"engine",em:"embed",er:"error",ev:"events",ex:"expires",fi:"first",fm:"family",ft:"format",fq:"frequency",fr:"frame",fs:"fullscreen",ho:"host",hn:"hostname",ht:"height",id:"id",ii:"init",in:"instance",ip:"ip",is:"is",ke:"key",la:"language",li:"live",lo:"load",ma:"max",me:"message",mi:"mime",ml:"midroll",mn:"manufacturer",mx:"mux",nm:"name",no:"number",on:"on",os:"os",pa:"paused",pb:"playback",pd:"producer",pe:"percentage",ph:"playhead",pi:"plugin",pl:"preroll",po:"poster",pr:"preload",ra:"rate",re:"rebuffer",ro:"ratio",sa:"sample",se:"session",sk:"seek",sm:"stream",sq:"sequence",sr:"series",st:"start",so:"source",su:"startup",sw:"software",tc:"tech",ti:"time",tl:"total",to:"to",tt:"title",ty:"type",ug:"upscaling",up:"upscale",ur:"url",us:"user",va:"variant",vd:"viewed",vi:"video",ve:"version",vw:"view",vr:"viewer",wd:"width",wa:"watch",wt:"waiting"},c=r(d)},{"./utils/log.js":21}],2:[function(e,t,i){"use strict";function a(){this.isAdBreak=!1,this.on("adbreakstart",function(){this.isAdBreak=!0}),this.on("play",function(){this.isAdBreak=!1}),this.on("playing",function(){this.isAdBreak=!1}),this.on("seeking",function(){this.isAdBreak=!1}),this.on("viewend",function(){this.isAdBreak=!1})}Object.defineProperty(i,"__esModule",{value:!0}),i.default=a},{}],3:[function(e,t,i){"use strict";function a(){var e=this;this.one("playbackheartbeat",r),this.on("playbackheartbeatend",function(){e.off("before*",n),e.one("playbackheartbeat",r)})}Object.defineProperty(i,"__esModule",{value:!0}),i.default=a;var r=function(){this.lastWallClockTime=Date.now(),this.on("before*",n)},n=function(e){var t=Date.now(),i=this.lastWallClockTime;this.lastWallClockTime=t,t-i>3e4&&(this.emit("devicesleep",{viewer_time:i}),this.emit("devicewake",{viewer_time:t}))}},{}],4:[function(e,t,i){"use strict";function a(){var e=this;this.on("viewinit",function(){e.viewErrored=!1}),this.on("error",function(){e.viewErrored=!0})}Object.defineProperty(i,"__esModule",{value:!0}),i.default=a},{}],5:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var a=function(){},r=0;a.prototype.on=function(e,t,i){return t._eventEmitterGuid=t._eventEmitterGuid||++r,this._listeners=this._listeners||{},this._listeners[e]=this._listeners[e]||[],i&&(t=t.bind(i)),this._listeners[e].push(t),t},a.prototype.off=function(e,t){var i=this._listeners&&this._listeners[e];i&&i.forEach(function(e,a){e._eventEmitterGuid===t._eventEmitterGuid&&i.splice(a,1)})},a.prototype.one=function(e,t,i){var a=this;t._eventEmitterGuid=t._eventEmitterGuid||++r;var n=function r(){a.off(e,r),t.apply(i||this,arguments)};n._eventEmitterGuid=t._eventEmitterGuid,this.on(e,n)},a.prototype.emit=function(e,t){var i=this;if(this._listeners){t=t||{};var a=this._listeners["before*"]||[],r=this._listeners[e]||[],n=this._listeners["after"+e]||[],o=function(t,a){t=t.slice(),t.forEach(function(t){t.call(i,{type:e},a)})};o(a,t),o(r,t),o(n,t)}},i.default=a},{}],6:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var r=e("global/window"),n=a(r),o=function(){this._playbackHeartbeatInterval=null,this._playheadShouldBeProgressing=!1,this.on("playing",function(){this._playheadShouldBeProgressing=!0}),this.on("play",this._startPlaybackHeartbeatInterval),this.on("adbreakstart",this._startPlaybackHeartbeatInterval),this.on("adplay",this._startPlaybackHeartbeatInterval),this.on("seeking",this._startPlaybackHeartbeatInterval),this.on("devicewake",this._startPlaybackHeartbeatInterval),this.on("pause",this._stopPlaybackHeartbeatInterval),this.on("ended",this._stopPlaybackHeartbeatInterval),this.on("viewend",this._stopPlaybackHeartbeatInterval),this.on("error",this._stopPlaybackHeartbeatInterval),this.on("adpause",this._stopPlaybackHeartbeatInterval),this.on("adbreakend",this._stopPlaybackHeartbeatInterval),this.on("seeked",function(){this.data.player_is_paused&&this._stopPlaybackHeartbeatInterval()}),this.on("timeupdate",function(){this.emit("playbackheartbeat",{viewer_time:Date.now()})}),this.on("devicesleep",function(e,t){null!==this._playbackHeartbeatInterval&&(n.default.clearInterval(this._playbackHeartbeatInterval),this.emit("playbackheartbeatend",{viewer_time:t.viewer_time}),this._playbackHeartbeatInterval=null)})};o.prototype._startPlaybackHeartbeatInterval=function(){var e=this;null===this._playbackHeartbeatInterval&&(this.emit("playbackheartbeat",{viewer_time:Date.now()}),this._playbackHeartbeatInterval=n.default.setInterval(function(){e.emit("playbackheartbeat",{viewer_time:Date.now()})},this.playbackHeartbeatTime))},o.prototype._stopPlaybackHeartbeatInterval=function(){this._playheadShouldBeProgressing=!1,null!==this._playbackHeartbeatInterval&&(n.default.clearInterval(this._playbackHeartbeatInterval),this.emit("playbackheartbeatend",{viewer_time:Date.now()}),this._playbackHeartbeatInterval=null)},i.default=o},{"global/window":32}],7:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var r=e("../utils/safe-increment.js"),n=a(r),o=function(){this._playbackTimeTrackerLastPlayheadPosition=-1,this.on("playbackheartbeat",this._updatePlaybackTime),this.on("playbackheartbeatend",this._clearPlaybackTimeState),this.on("seeking",this._clearPlaybackTimeState)};o.prototype._updatePlaybackTime=function(){var e=this.data.player_playhead_time;if(this._playbackTimeTrackerLastPlayheadPosition>=0&&e>this._playbackTimeTrackerLastPlayheadPosition){var t=e-this._playbackTimeTrackerLastPlayheadPosition;t<=1e3&&(0,n.default)(this.data,"view_content_playback_time",t)}this._playbackTimeTrackerLastPlayheadPosition=e},o.prototype._clearPlaybackTimeState=function(){this._updatePlaybackTime(),this._playbackTimeTrackerLastPlayheadPosition=-1},i.default=o},{"../utils/safe-increment.js":23}],8:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var a=function(){this.on("playbackheartbeat",this._updatePlayheadTime),this.on("playbackheartbeatend",this._updatePlayheadTime),this.on("timeupdate",this._updatePlayheadTime),this.on("destroy",function(){this.off("timeupdate",this._updatePlayheadTime)})};a.prototype._updatePlayheadTime=function(e,t){t.player_playhead_time?this.data.player_playhead_time=t.player_playhead_time:this.getPlayheadTime&&(this.data.player_playhead_time=this.getPlayheadTime())},i.default=a},{}],9:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var r=e("../utils/safe-increment.js"),n=a(r),o=function(){this._lastCheckedTime=null,this._lastPlayheadTime=null,this._lastPlayheadTimeUpdatedTime=null,this.on("playbackheartbeat",this._checkIfRebuffering),this.on("playbackheartbeatend",this._cleanupRebufferTracker),this.on("seeking",function(){this._cleanupRebufferTracker(null,{viewer_time:Date.now()})})};o.prototype._checkIfRebuffering=function(e,t){if(this.isSeeking||this.isAdBreak||!this._playheadShouldBeProgressing)return void this._cleanupRebufferTracker(e,t);if(null===this._lastCheckedTime)return this._prepareRebufferTrackerState(t.viewer_time),void this._updateRebufferMetrics();if(this._lastPlayheadTime!==this.data.player_playhead_time)return void this._cleanupRebufferTracker(e,t,!0);var i=t.viewer_time-this._lastPlayheadTimeUpdatedTime;i>=this.sustainedRebufferThreshold&&(this._rebuffering?this._updateRebufferMetrics(t.viewer_time-this._lastCheckedTime):(this._rebuffering=!0,(0,n.default)(this.data,"view_rebuffer_count",1),this._updateRebufferMetrics(i),this.emit("rebufferstart"))),this._lastCheckedTime=t.viewer_time},o.prototype._clearRebufferTrackerState=function(){this._lastCheckedTime=null,this._lastPlayheadTime=null,this._lastPlayheadTimeUpdatedTime=null},o.prototype._prepareRebufferTrackerState=function(e){this._lastCheckedTime=e,this._lastPlayheadTime=this.data.player_playhead_time,this._lastPlayheadTimeUpdatedTime=e},o.prototype._cleanupRebufferTracker=function(e,t){var i=!(arguments.length<=2||void 0===arguments[2])&&arguments[2];if(this._rebuffering)this._rebuffering=!1,this._updateRebufferMetrics(t.viewer_time-this._lastCheckedTime),this.emit("rebufferend");else{if(null===this._lastCheckedTime)return void this._updateRebufferMetrics();var a=this.data.player_playhead_time-this._lastPlayheadTime,r=t.viewer_time-this._lastPlayheadTimeUpdatedTime;a>0&&r-a>this.minimumRebufferDuration?((0,n.default)(this.data,"view_rebuffer_count",1),this._updateRebufferMetrics(r-a),this.emit("rebufferstart",{viewer_time:this._lastPlayheadTimeUpdatedTime}),this.emit("rebufferend",{viewer_time:this._lastPlayheadTimeUpdatedTime+r-a})):this._updateRebufferMetrics()}i?this._prepareRebufferTrackerState(t.viewer_time):this._clearRebufferTrackerState()},o.prototype._updateRebufferMetrics=function(e){e>0&&(0,n.default)(this.data,"view_rebuffer_duration",e),this.data.view_watch_time>=0&&this.data.view_rebuffer_count>0&&(this.data.view_rebuffer_frequency=this.data.view_rebuffer_count/this.data.view_watch_time,this.data.view_rebuffer_percentage=this.data.view_rebuffer_duration/this.data.view_watch_time)},i.default=o},{"../utils/safe-increment.js":23}],10:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function r(){var e=this;this.on("viewinit",function(){this._lastPlayheadPosition=-1});var t=["pause","rebufferstart","seeking","error","adbreakstart","hb"],i=["playing","hb"];t.forEach(function(t){e.on(t,function(){if(this._lastPlayheadPosition>=0&&this.data.player_playhead_time>=0&&this._lastPlayerWidth>=0&&this._lastSourceWidth>0&&this._lastPlayerHeight>=0&&this._lastSourceHeight>0){var e=this.data.player_playhead_time-this._lastPlayheadPosition;if(e<0)return void(this._lastPlayheadPosition=-1);var t=Math.min(this._lastPlayerWidth/this._lastSourceWidth,this._lastPlayerHeight/this._lastSourceHeight),i=Math.max(0,t-1),a=Math.max(0,1-t);this.data.view_max_upscale_percentage=Math.max(this.data.view_max_upscale_percentage||0,i),this.data.view_max_downscale_percentage=Math.max(this.data.view_max_downscale_percentage||0,a),(0,o.default)(this.data,"view_total_content_playback_time",e),(0,o.default)(this.data,"view_total_upscaling",i*e),(0,o.default)(this.data,"view_total_downscaling",a*e)}this._lastPlayheadPosition=-1})}),i.forEach(function(t){e.on(t,function(){this._lastPlayheadPosition=this.data.player_playhead_time,this._lastPlayerWidth=this.data.player_width,this._lastPlayerHeight=this.data.player_height,this._lastSourceWidth=this.data.video_source_width,this._lastSourceHeight=this.data.video_source_height})})}Object.defineProperty(i,"__esModule",{value:!0}),i.default=r;var n=e("../utils/safe-increment.js"),o=a(n)},{"../utils/safe-increment.js":23}],11:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function r(){this.isSeeking=!1,this.on("seeking",function(e,t){(0,l.default)(this.data,{viewer_time:Date.now()},t),this._lastSeekingTime=Date.now(),this.isSeeking===!1&&(this.isSeeking=!0,this.send("seeking"))}),this.on("seeked",function(){this.isSeeking=!1;var e=this._lastSeekingTime||Date.now(),t=Date.now()-e;(0,o.default)(this.data,"view_seek_count",1),(0,o.default)(this.data,"view_seek_duration",t);var i=this.data.view_max_seek_time||0;this.data.view_max_seek_time=Math.max(i,t)}),this.on("viewend",function(){this.isSeeking=!1})}Object.defineProperty(i,"__esModule",{value:!0}),i.default=r;var n=e("../utils/safe-increment.js"),o=a(n),s=e("lodash.assign"),l=a(s)},{"../utils/safe-increment.js":23,"lodash.assign":33}],12:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var a=function(){this.on("viewinit",function(){var e=this.data,t=e.view_id,i=function(e,i){var a=i.viewer_time;"playing"===e.type&&"undefined"==typeof this.data.view_time_to_first_frame?this.calculateTimeToFirstFrame(a||Date.now(),t):"adplaying"===e.type&&("undefined"==typeof this.data.view_time_to_first_frame||"undefined"==typeof this.data.view_content_playback_time||this.data.view_content_playback_time<=1e3)&&this.calculateTimeToFirstFrame(a||Date.now(),t)};this.one("playing",i),this.one("adplaying",i),this.one("viewend",function(){this.off("playing",i),this.off("adplaying",i)})})};a.prototype.calculateTimeToFirstFrame=function(e,t){t===this.data.view_id&&(this.data.view_time_to_first_frame=e-this.data.view_start,(this.data.player_autoplay_on||this.data.video_is_autoplay)&&this.NAVIGATION_START&&(this.data.view_aggregate_startup_time=e-this.NAVIGATION_START))},i.default=a},{}],13:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function r(){var e=this,t=void 0,i=void 0,a=function(){(0,o.default)(e.data,"view_waiting_rebuffer_count",1),t=Date.now(),i=window.setInterval(function(){if(t){var i=Date.now();(0,o.default)(e.data,"view_waiting_rebuffer_duration",i-t),t=i}},250)},r=function(){t&&((0,o.default)(e.data,"view_waiting_rebuffer_duration",Date.now()-t),t=!1,window.clearInterval(i))},n=!1,s=function(){n=!0},l=function(){n=!1,r()};this.on("waiting",function(){n&&a()}),this.on("playing",function(){r(),s()}),this.on("pause",l),this.on("seeking",l)}Object.defineProperty(i,"__esModule",{value:!0}),i.default=r;var n=e("../utils/safe-increment.js"),o=a(n)},{"../utils/safe-increment.js":23}],14:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var r=e("../utils/safe-increment.js"),n=a(r),o=function(){this._watchTimeTrackerLastCheckedTime=null,this.on("playbackheartbeat",this._updateWatchTime),this.on("playbackheartbeatend",this._clearWatchTimeState)};o.prototype._updateWatchTime=function(e,t){var i=t.viewer_time;null===this._watchTimeTrackerLastCheckedTime&&(this._watchTimeTrackerLastCheckedTime=i),(0,n.default)(this.data,"view_watch_time",i-this._watchTimeTrackerLastCheckedTime),this._watchTimeTrackerLastCheckedTime=i},o.prototype._clearWatchTimeState=function(e,t){this._updateWatchTime(e,t),this._watchTimeTrackerLastCheckedTime=null},i.default=o},{"../utils/safe-increment.js":23}],15:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}var r="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},n=e("global/window"),o=a(n),s=e("platform"),l=a(s),u=e("qs"),d=a(u),c=e("./vendor/js-cookie.js"),f=a(c),p=e("./minify-keys.js"),h=a(p),y=e("./utils/image-beacon.js"),m=a(y),_=e("./utils/beacon-url.js"),b=a(_),v=e("./utils/element-helpers.js"),g=e("lodash.assign"),w=a(g),x=e("./utils/log.js"),k=a(x),T=e("./utils/uuid.js"),S=e("./player-monitor.js"),j=a(S),O=e("./video-el-monitor.js"),P=a(O),E=e("./utils/utils-public.js"),M=a(E),I="2.0.39",A="2.0",D={},R={};t.exports=function(){function e(){var e=void 0,t=Date.now();try{e=d.default.parse(f.default.get("muxData")||"")}catch(e){}e=e||{},e.mux_viewer_id=e.mux_viewer_id||(0,T.generateUUID)(),e.msn=e.msn||Math.random(),e.session_start&&(e.sst=e.session_start,delete e.session_start),e.session_id&&(e.sid=e.session_id,delete e.session_id),e.session_expires&&(e.sex=e.session_expires,delete e.session_expires),(!e.sex||e.sex<t)&&(e.sid=(0,T.generateUUID)(),e.sst=t),e.sex=t+15e5,f.default.set("muxData",d.default.stringify(e),{expires:7300});var i={session_id:e.sid,session_start:e.sst,session_expires:e.sex,mux_viewer_id:e.mux_viewer_id,mux_sample_number:e.msn};return i}function t(e,t){e=Array.prototype.slice.apply(e),t=t||Date.now();var i=e[e.length-1],a=void 0;return"object"!==("undefined"==typeof i?"undefined":r(i))?(e.push({viewer_time:t}),e):(i.viewer_time||(a=(0,w.default)({},i),a.viewer_time=t,e[e.length-1]=a),e)}var i=function e(i){var a=arguments,r=Date.now();"string"==typeof i?e.hasOwnProperty(i)?o.default.setTimeout(function(){a=Array.prototype.splice.call(a,1),a=t(a,r),e[i].apply(null,a)},0):k.default.warn("`"+i+"` is an unknown task"):"function"==typeof i?o.default.setTimeout(function(){i(e)},0):k.default.warn("`"+i+"` is invalid.")};i.loaded=Date.now(),i.VERSION=I,i.API_VERSION=A,i.PLAYER_TRACKED=!1,i.monitor=function(e,t){return(0,P.default)(i,e,t)},i.init=function(e,t){var a=(0,v.getMuxPlayerId)(e);D[a]=new j.default(i,a,t)},i.emit=function(e,t,i){var a=(0,v.getMuxPlayerId)(e);D[a]?(D[a].emit(t,i),"destroy"===t&&delete D[a]):k.default.error("A monitor for `"+a+"` has not been initialized.")};var a={mux_api_version:A,mux_embed_version:I,page_url:o.default.location.href,viewer_application_name:l.default.name,viewer_application_version:l.default.version,viewer_application_engine:l.default.layout,viewer_device_name:l.default.product,viewer_device_category:"",viewer_device_manufacturer:l.default.manufacturer,viewer_os_family:l.default.os&&l.default.os.family,viewer_os_architecture:l.default.os&&l.default.os.architecture,viewer_os_version:l.default.os&&l.default.os.version};return i.send=function(t,n){if(!t||i.checkDoNotTrack())return void k.default.debug("Not sending `"+t+"` because Do Not Track is enabled in your browser");var o=e()||{},s={};if(!n||"object"!==("undefined"==typeof n?"undefined":r(n)))return k.default.error("A data object was expected in send() but was not provided");"pageloadstart"===t&&(a.page_load_start=n.viewer_time),(0,w.default)(s,a),(0,w.default)(s,n),(0,w.default)(s,o),s.event=t,s.user_id&&(s.viewer_user_id=s.user_id,delete s.user_id);var l="undefined"==typeof s.mux_sample_rate?1:s.mux_sample_rate,u=s.mux_sample_number<l,d=(0,h.default)(s);u?(k.default.debug("Sending event: ",t,s,d),n.property_key&&(R[n.property_key]=R[n.property_key]||(0,b.default)(n.property_key),m.default.send(R[n.property_key],t,d))):k.default.debug("Not sending event due to sample rate restriction: ",t,s,d)},i.checkDoNotTrack=function(){var e=o.default.navigator,t=o.default.doNotTrack||e.doNotTrack||e.msDoNotTrack;return"1"===t},i.checkDoNotTrack()&&k.default.debug("The browser's Do Not Track flag is enabled - Mux beaconing is disabled."),i.log=k.default,i.utils=M.default,i}()},{"./minify-keys.js":1,"./player-monitor.js":16,"./utils/beacon-url.js":17,"./utils/element-helpers.js":18,"./utils/image-beacon.js":20,"./utils/log.js":21,"./utils/utils-public.js":25,"./utils/uuid.js":26,"./vendor/js-cookie.js":28,"./video-el-monitor.js":29,"global/window":32,"lodash.assign":33,platform:35,qs:36}],16:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var r=e("./utils/log.js"),n=a(r),o=e("lodash.assign"),s=a(o),l=e("./utils/uuid.js"),u=e("global/document"),d=a(u),c=e("global/window"),f=a(c),p=e("./mixins/event-emitter.js"),h=a(p),y=e("./mixins/playback-heartbeat.js"),m=a(y),_=e("./utils/safe-increment.js"),b=a(_),v=e("./utils/video-id-from-src.js"),g=a(v),w=e("./mixins/error-tracker.js"),x=a(w),k=e("./mixins/watch-time-tracker.js"),T=a(k),S=e("./mixins/playback-time-tracker.js"),j=a(S),O=e("./mixins/playhead-time-tracker.js"),P=a(O),E=e("./mixins/rebuffer-tracker.js"),M=a(E),I=e("./mixins/time-to-first-frame-tracker.js"),A=a(I),D=e("./mixins/scaling-tracker.js"),R=a(D),C=e("./mixins/seeking-tracker.js"),N=a(C),L=e("./mixins/ad-tracker.js"),B=a(L),H=e("./mixins/waiting-rebuffer-tracker.js"),W=a(H),F=e("./mixins/device-sleep-tracker.js"),U=a(F),G=["viewstart","ended","loadstart","pause","play","playing","ratechange","stalled","waiting","adplay","adpause","adended","aderror","adplaying","adrequest","adresponse","adbreakstart","adbreakend","rebufferstart","rebufferend","seeked","error","hb"],V=function(e,t,i){var a=this;this.DOM_CONTENT_LOADED_EVENT_END=f.default.performance&&f.default.performance.timing.domContentLoadedEventEnd,this.NAVIGATION_START=f.default.performance&&f.default.performance.timing.navigationStart;var r={debug:!1,minimumRebufferDuration:100,sustainedRebufferThreshold:1e3,playbackHeartbeatTime:25,sampleRate:1};this.mux=e,this.id=t,i=(0,s.default)(r,i),n.default.setLevel(i.debug?"debug":"warn"),this.getPlayheadTime=i.getPlayheadTime,this.getStateData=i.getStateData||function(){},this.minimumRebufferDuration=i.minimumRebufferDuration,this.sustainedRebufferThreshold=i.sustainedRebufferThreshold,this.playbackHeartbeatTime=i.playbackHeartbeatTime,this.data={player_instance_id:(0,l.generateShortID)(),mux_sample_rate:i.sampleRate},this.data.view_sequence_number=1,this.data.player_sequence_number=1,this.on("viewinit",function(e,t){this._resetVideoData(),this._resetViewData(),this._resetErrorData(),this.updateStateData(),(0,s.default)(this.data,t),this._initializeViewData();var i=function(){"undefined"==typeof this.data.view_start&&(this.data.view_start=Date.now(),this.emit("viewstart"))}.bind(this);this.one("play",i),this.one("adbreakstart",i)}),this.on("videochange",function(e,t){this.emit("viewend"),this.send("viewend"),this.emit("viewinit",t)}),this.on("destroy",function(e,t){"undefined"!=typeof this.data.view_start&&(this.emit("viewend"),this.send("viewend")),f.default.clearTimeout(this._heartBeatTimeout)}),this.on("playerready",function(e,t){(0,s.default)(this.data,t)}),G.forEach(function(e){a.on(e,function(t,i){0!==e.indexOf("ad")&&this.updateStateData(),(0,s.default)(this.data,{viewer_time:Date.now()},i),this._sanitizeData()}),a.on("after"+e,function(){this.send(e)})});var o=function(e){var t=Date.now();this.data.player_init_time&&(this.data.player_startup_time=t-this.data.player_init_time),!this.mux.PLAYER_TRACKED&&this.NAVIGATION_START&&(this.mux.PLAYER_TRACKED=!0,(this.data.player_init_time||this.DOM_CONTENT_LOADED_EVENT_END)&&(this.data.page_load_time=Math.min(this.data.player_init_time||1/0,this.DOM_CONTENT_LOADED_EVENT_END||1/0)-this.NAVIGATION_START)),this.send("playerready"),delete this.data.player_startup_time,delete this.data.page_load_time};this.one("playerready",o),x.default.apply(this),U.default.apply(this),N.default.apply(this),B.default.apply(this),P.default.apply(this),m.default.apply(this),R.default.apply(this),T.default.apply(this),j.default.apply(this),M.default.apply(this),A.default.apply(this),W.default.apply(this),this.emit("viewinit",i.data)};(0,s.default)(V.prototype,P.default.prototype),(0,s.default)(V.prototype,h.default.prototype),(0,s.default)(V.prototype,N.default.prototype),(0,s.default)(V.prototype,B.default.prototype),(0,s.default)(V.prototype,m.default.prototype),(0,s.default)(V.prototype,T.default.prototype),(0,s.default)(V.prototype,j.default.prototype),(0,s.default)(V.prototype,M.default.prototype),(0,s.default)(V.prototype,A.default.prototype),V.prototype.updateStateData=function(){(0,s.default)(this.data,this.getStateData()),this.getPlayheadTime&&(this.data.player_playhead_time=this.getPlayheadTime()),this._sanitizeData()},V.prototype.send=function(e){var t=(0,s.default)({},this.data);if(1===t.player_error_code&&(delete t.player_error_code,delete t.player_error_message),t.player_source_duration===1/0||t.video_source_duration===1/0?t.video_source_is_live=!0:(t.player_source_duration>0||t.video_source_duration>0)&&(t.video_source_is_live=!1),t.video_source_url=t.video_source_url||t.player_source_url,t.video_source_url){var i=d.default.createElement("a");i.href=t.video_source_url;var a=i.hostname,r=a.match(/[^\.]+\.[^\.]+$/);r&&r.length&&(t.video_source_domain=r[0]),t.video_source_hostname=a}delete t.ad_request_id,this.mux.send(e,t),this.data.view_sequence_number++,this.data.player_sequence_number++,this._restartHeartBeat()},V.prototype._sanitizeData=function(){var e=this,t=["player_width","player_height","video_source_width","video_source_height","player_playhead_time"];t.forEach(function(t){var i=parseInt(e.data[t],10);e.data[t]=isNaN(i)?void 0:i})},V.prototype._resetVideoData=function(e,t){var i=this;Object.keys(this.data).forEach(function(e){0===e.indexOf("video_")&&delete i.data[e]})},V.prototype._resetViewData=function(){var e=this;Object.keys(this.data).forEach(function(t){0===t.indexOf("view_")&&delete e.data[t]}),this.data.view_sequence_number=1},V.prototype._resetErrorData=function(e,t){delete this.data.player_error_code,delete this.data.player_error_message},V.prototype._initializeViewData=function(){var e=this,t=this.data.view_id=(0,l.generateUUID)();this.data.video_id||(this.data.video_id=(0,g.default)(this.data.player_source_url));var i=function(){t===e.data.view_id&&(0,b.default)(e.data,"player_view_count",1)};this.data.player_is_paused?this.one("play",i):i()},V.prototype._restartHeartBeat=function(){var e=this;f.default.clearTimeout(this._heartBeatTimeout),this.viewErrored||(this._heartBeatTimeout=f.default.setTimeout(function(){e.data.player_is_paused||e.emit("hb")},1e4))},i.default=V},{"./mixins/ad-tracker.js":2,"./mixins/device-sleep-tracker.js":3,"./mixins/error-tracker.js":4,"./mixins/event-emitter.js":5,"./mixins/playback-heartbeat.js":6,"./mixins/playback-time-tracker.js":7,"./mixins/playhead-time-tracker.js":8,"./mixins/rebuffer-tracker.js":9,"./mixins/scaling-tracker.js":10,"./mixins/seeking-tracker.js":11,"./mixins/time-to-first-frame-tracker.js":12,"./mixins/waiting-rebuffer-tracker.js":13,"./mixins/watch-time-tracker.js":14,"./utils/log.js":21,"./utils/safe-increment.js":23,"./utils/uuid.js":26,"./utils/video-id-from-src.js":27,"global/document":31,"global/window":32,"lodash.assign":33}],17:[function(e,t,i){"use strict";function a(e){return e=e||"",e.match(/^[a-z0-9]+$/)?"https://"+e+".litix.io":"https://img.litix.io/a.gif"}Object.defineProperty(i,"__esModule",{value:!0}),i.default=a},{}],18:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.findMediaElement=i.getMuxPlayerId=void 0;var a=e("./uuid.js"),r=function(e){return e&&"undefined"!=typeof e.nodeName?(e.muxId||(e.muxId=e.id||(0,a.generateShortID)()),e.muxId):e},n=function(e){var t=void 0;e&&"undefined"!=typeof e.nodeName?(t=e,e=r(t)):t=document.querySelector(e);var i=t&&t.nodeName?t.nodeName.toLowerCase():"";return[t,e,i]};i.getMuxPlayerId=r,i.findMediaElement=n},{"./uuid.js":26}],19:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(o.default.defaultView&&o.default.defaultView.getComputedStyle)return o.default.defaultView.getComputedStyle(e,null).getPropertyValue(t)}Object.defineProperty(i,"__esModule",{value:!0}),i.default=r;var n=e("global/document"),o=a(n)},{"global/document":31}],20:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var r=e("qs"),n=a(r),o={};o.send=function(e,t,i){var a=new Image;return a.src=e+"?e="+t+"&"+n.default.stringify(i),a},i.default=o},{qs:36}],21:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var r=e("loglevel"),n=a(r),o=n.default.methodFactory;n.default.methodFactory=function(e,t,i){var a=o(e,t,i);return function(){for(var e=["[mux]"],t=0;t<arguments.length;t++)e.push(arguments[t]);a.apply(void 0,e)}},n.default.setLevel(n.default.getLevel()),i.default=n.default},{loglevel:34}],22:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function r(e,t,i,a){var r=a;if(e&&"function"==typeof e[t])try{r=e[t].apply(e,i)}catch(e){o.default.debug("safeCall error",e)}return r}Object.defineProperty(i,"__esModule",{value:!0}),i.default=r;var n=e("./log.js"),o=a(n)},{"./log.js":21}],23:[function(e,t,i){"use strict";function a(e,t,i){i=void 0===i?1:i,e[t]=e[t]||0,e[t]+=i}Object.defineProperty(i,"__esModule",{value:!0}),i.default=a},{}],24:[function(e,t,i){"use strict";function a(e){return Math.floor(1e3*e)}Object.defineProperty(i,"__esModule",{value:!0}),i.default=a},{}],25:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var r=e("./safe-call.js"),n=a(r),o=e("./safe-increment.js"),s=a(o),l=e("./get-computed-style.js"),u=a(l),d=e("./seconds-to-ms.js"),c=a(d),f={};f.safeCall=n.default,f.safeIncrement=s.default,f.getComputedStyle=u.default,f.secondsToMs=c.default,i.default=f},{"./get-computed-style.js":19,"./safe-call.js":22,"./safe-increment.js":23,"./seconds-to-ms.js":24}],26:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var a=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0,i="x"===e?t:3&t|8;return i.toString(16)})},r=function(){return("000000"+(Math.random()*Math.pow(36,6)<<0).toString(36)).slice(-6)};i.generateUUID=a,i.generateShortID=r},{}],27:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function r(e){var t=o.default.createElement("a");t.href=e;var i=t.pathname.replace(/\.[^\/.]+$/,"");return l.default.btoa(t.host+i).split("=")[0]}Object.defineProperty(i,"__esModule",{value:!0}),i.default=r;var n=e("global/document"),o=a(n),s=e("global/window"),l=a(s)},{"global/document":31,"global/window":32}],28:[function(t,i,a){"use strict";var r="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};!function(t){var n=!1;if("function"==typeof e&&e.amd&&(e(t),n=!0),"object"===("undefined"==typeof a?"undefined":r(a))&&(i.exports=t(),n=!0),!n){var o=window.Cookies,s=window.Cookies=t();s.noConflict=function(){return window.Cookies=o,s}}}(function(){function e(i){function a(e,r,n){var o;if("undefined"!=typeof document){if(arguments.length>1){if(n=t({path:"/"},a.defaults,n),"number"==typeof n.expires){var s=new Date;s.setMilliseconds(s.getMilliseconds()+864e5*n.expires),n.expires=s}try{o=JSON.stringify(r),/^[\{\[]/.test(o)&&(r=o)}catch(e){}return r=i.write?i.write(r,e):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=encodeURIComponent(String(e)),e=e.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),e=e.replace(/[\(\)]/g,escape),document.cookie=[e,"=",r,n.expires?"; expires="+n.expires.toUTCString():"",n.path?"; path="+n.path:"",n.domain?"; domain="+n.domain:"",n.secure?"; secure":""].join("")}e||(o={});for(var l=document.cookie?document.cookie.split("; "):[],u=/(%[0-9A-Z]{2})+/g,d=0;d<l.length;d++){var c=l[d].split("="),f=c.slice(1).join("=");'"'===f.charAt(0)&&(f=f.slice(1,-1));try{var p=c[0].replace(u,decodeURIComponent); | ||
if(f=i.read?i.read(f,p):i(f,p)||f.replace(u,decodeURIComponent),this.json)try{f=JSON.parse(f)}catch(e){}if(e===p){o=f;break}e||(o[p]=f)}catch(e){}}return o}}return a.set=a,a.get=function(e){return a.call(a,e)},a.getJSON=function(){return a.apply({json:!0},[].slice.call(arguments))},a.defaults={},a.remove=function(e,i){a(e,"",t(i,{expires:-1}))},a.withConverter=e,a}var t=function(){for(var e=0,t={};e<arguments.length;e++){var i=arguments[e];for(var a in i)t[a]=i[a]}return t};return e(function(){})})},{}],29:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function r(e,t,i){var a=(0,l.findMediaElement)(t),r=n(a,3),o=r[0],c=r[1],f=r[2],p=e.log,h=e.utils.getComputedStyle,y=e.utils.secondsToMs;return o?"video"!==f&&"audio"!==f?p.error("The element of `"+c+"` was not a media element."):(i=i||{},i.data=(0,s.default)({player_software:"HTML5 Video Element",player_mux_plugin_name:"VideoElementMonitor",player_mux_plugin_version:"2.0.39"},i.data),i.getPlayheadTime=function(){return y(o.currentTime)},i.getStateData=function(){return{player_is_paused:o.paused,player_playhead_time:y(o.currentTime),player_width:parseInt(h(o,"width")),player_height:parseInt(h(o,"height")),player_autoplay_on:o.autoplay,player_preload_on:o.preload,video_poster_url:o.poster,video_source_url:o.currentSrc,video_source_duration:y(o.duration),video_source_height:o.videoHeight,video_source_width:o.videoWidth}},o.mux=o.mux||{},o.mux.swapElement=function(t){var i=(0,l.findMediaElement)(t),a=n(i,3),r=a[0],u=a[1],d=a[2];return r?"video"!==d&&"audio"!==d?e.log.error("The element of `"+u+"` was not a media element."):(r.muxId=o.muxId,delete o.muxId,r.mux=r.mux||{},r.mux.listeners=(0,s.default)({},o.mux.listeners),delete o.mux.listeners,Object.keys(r.mux.listeners).forEach(function(e){o.removeEventListener(e,r.mux.listeners[e],!1),r.addEventListener(e,r.mux.listeners[e],!1)}),r.mux.swapElement=o.mux.swapElement,delete o.mux.swapElement,void(o=r)):e.log.error("No element was found with the `"+u+"` query selector.")},e.init(c,i),e.emit(c,"playerready"),o.paused||(e.emit(c,"play"),o.readyState>2&&e.emit(c,"playing")),o.mux.listeners={},void u.forEach(function(t){o.mux.listeners[t]=function(){var i={};"error"===t&&(i.player_error_code=o.error&&o.error.code,i.player_error_message=o.error&&d[o.error.code]),e.emit(c,t,i)},o.addEventListener(t,o.mux.listeners[t],!1)})):p.error("No element was found with the `"+c+"` query selector.")}Object.defineProperty(i,"__esModule",{value:!0});var n=function(){function e(e,t){var i=[],a=!0,r=!1,n=void 0;try{for(var o,s=e[Symbol.iterator]();!(a=(o=s.next()).done)&&(i.push(o.value),!t||i.length!==t);a=!0);}catch(e){r=!0,n=e}finally{try{!a&&s.return&&s.return()}finally{if(r)throw n}}return i}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();i.default=r;var o=e("lodash.assign"),s=a(o),l=e("./utils/element-helpers.js"),u=["loadstart","pause","play","playing","seeking","seeked","timeupdate","ratechange","stalled","waiting","error","ended"],d={1:"MEDIA_ERR_ABORTED",2:"MEDIA_ERR_NETWORK",3:"MEDIA_ERR_DECODE",4:"MEDIA_ERR_SRC_NOT_SUPPORTED"}},{"./utils/element-helpers.js":18,"lodash.assign":33}],30:[function(e,t,i){},{}],31:[function(e,t,i){(function(i){var a="undefined"!=typeof i?i:"undefined"!=typeof window?window:{},r=e("min-document");if("undefined"!=typeof document)t.exports=document;else{var n=a["__GLOBAL_DOCUMENT_CACHE@4"];n||(n=a["__GLOBAL_DOCUMENT_CACHE@4"]=r),t.exports=n}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"min-document":30}],32:[function(e,t,i){(function(e){"undefined"!=typeof window?t.exports=window:"undefined"!=typeof e?t.exports=e:"undefined"!=typeof self?t.exports=self:t.exports={}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],33:[function(e,t,i){function a(e,t,i){switch(i.length){case 0:return e.call(t);case 1:return e.call(t,i[0]);case 2:return e.call(t,i[0],i[1]);case 3:return e.call(t,i[0],i[1],i[2])}return e.apply(t,i)}function r(e){return function(t){return null==t?void 0:t[e]}}function n(e,t){for(var i=-1,a=Array(e);++i<e;)a[i]=t(i);return a}function o(e,t){return function(i){return e(t(i))}}function s(e,t,i){var a=e[t];D.call(e,t)&&m(a,i)&&(void 0!==i||t in e)||(e[t]=i)}function l(e,t){return null!=e&&(D.call(e,t)||"object"==typeof e&&t in e&&null===U(e))}function u(e,t){return t=B(void 0===t?e.length-1:t,0),function(){for(var i=arguments,r=-1,n=B(i.length-t,0),o=Array(n);++r<n;)o[r]=i[t+r];r=-1;for(var s=Array(t+1);++r<t;)s[r]=i[r];return s[t]=o,a(e,this,s)}}function d(e,t,i,a){i||(i={});for(var r=-1,n=t.length;++r<n;){var o=t[r],l=a?a(i[o],e[o],o,i,e):void 0;s(i,o,void 0===l?e[o]:l)}return i}function c(e){return u(function(t,i){var a=-1,r=i.length,n=r>1?i[r-1]:void 0,o=r>2?i[2]:void 0;for(n=e.length>3&&"function"==typeof n?(r--,n):void 0,o&&h(i[0],i[1],o)&&(n=r<3?void 0:n,r=1),t=Object(t);++a<r;){var s=i[a];s&&e(t,s,a,n)}return t})}function f(e){var t=e?e.length:void 0;return w(t)&&(G(e)||T(e)||_(e))?n(t,String):null}function p(e,t){return t=null==t?j:t,!!t&&("number"==typeof e||I.test(e))&&e>-1&&e%1==0&&e<t}function h(e,t,i){if(!x(i))return!1;var a=typeof t;return!!("number"==a?b(i)&&p(t,i.length):"string"==a&&t in i)&&m(i[t],e)}function y(e){var t=e&&e.constructor,i="function"==typeof t&&t.prototype||A;return e===i}function m(e,t){return e===t||e!==e&&t!==t}function _(e){return v(e)&&D.call(e,"callee")&&(!C.call(e,"callee")||R.call(e)==O)}function b(e){return null!=e&&w(F(e))&&!g(e)}function v(e){return k(e)&&b(e)}function g(e){var t=x(e)?R.call(e):"";return t==P||t==E}function w(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=j}function x(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function k(e){return!!e&&"object"==typeof e}function T(e){return"string"==typeof e||!G(e)&&k(e)&&R.call(e)==M}function S(e){var t=y(e);if(!t&&!b(e))return W(e);var i=f(e),a=!!i,r=i||[],n=r.length;for(var o in e)!l(e,o)||a&&("length"==o||p(o,n))||t&&"constructor"==o||r.push(o);return r}var j=9007199254740991,O="[object Arguments]",P="[object Function]",E="[object GeneratorFunction]",M="[object String]",I=/^(?:0|[1-9]\d*)$/,A=Object.prototype,D=A.hasOwnProperty,R=A.toString,C=A.propertyIsEnumerable,N=Object.getPrototypeOf,L=Object.keys,B=Math.max,H=!C.call({valueOf:1},"valueOf"),W=o(L,Object),F=r("length"),U=o(N,Object),G=Array.isArray,V=c(function(e,t){if(H||y(t)||b(t))return void d(t,S(t),e);for(var i in t)D.call(t,i)&&s(e,i,t[i])});t.exports=V},{}],34:[function(t,i,a){!function(t,a){"use strict";"function"==typeof e&&e.amd?e(a):"object"==typeof i&&i.exports?i.exports=a():t.log=a()}(this,function(){"use strict";function e(e){return typeof console!==s&&(void 0!==console[e]?t(console,e):void 0!==console.log?t(console,"log"):o)}function t(e,t){var i=e[t];if("function"==typeof i.bind)return i.bind(e);try{return Function.prototype.bind.call(i,e)}catch(t){return function(){return Function.prototype.apply.apply(i,[e,arguments])}}}function i(e,t,i){return function(){typeof console!==s&&(a.call(this,t,i),this[e].apply(this,arguments))}}function a(e,t){for(var i=0;i<l.length;i++){var a=l[i];this[a]=i<e?o:this.methodFactory(a,e,t)}}function r(t,a,r){return e(t)||i.apply(this,arguments)}function n(e,t,i){function n(e){var t=(l[e]||"silent").toUpperCase();try{return void(window.localStorage[c]=t)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"="+t+";"}catch(e){}}function o(){var e;try{e=window.localStorage[c]}catch(e){}if(typeof e===s)try{var t=window.document.cookie,i=t.indexOf(encodeURIComponent(c)+"=");i&&(e=/^([^;]+)/.exec(t.slice(i))[1])}catch(e){}return void 0===d.levels[e]&&(e=void 0),e}var u,d=this,c="loglevel";e&&(c+=":"+e),d.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},d.methodFactory=i||r,d.getLevel=function(){return u},d.setLevel=function(t,i){if("string"==typeof t&&void 0!==d.levels[t.toUpperCase()]&&(t=d.levels[t.toUpperCase()]),!("number"==typeof t&&t>=0&&t<=d.levels.SILENT))throw"log.setLevel() called with invalid level: "+t;if(u=t,i!==!1&&n(t),a.call(d,t,e),typeof console===s&&t<d.levels.SILENT)return"No console available for logging"},d.setDefaultLevel=function(e){o()||d.setLevel(e,!1)},d.enableAll=function(e){d.setLevel(d.levels.TRACE,e)},d.disableAll=function(e){d.setLevel(d.levels.SILENT,e)};var f=o();null==f&&(f=null==t?"WARN":t),d.setLevel(f,!1)}var o=function(){},s="undefined",l=["trace","debug","info","warn","error"],u=new n,d={};u.getLogger=function(e){if("string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=d[e];return t||(t=d[e]=new n(e,u.getLevel(),u.methodFactory)),t};var c=typeof window!==s?window.log:void 0;return u.noConflict=function(){return typeof window!==s&&window.log===u&&(window.log=c),u},u})},{}],35:[function(t,i,a){(function(t){(function(){"use strict";function r(e){return e=String(e),e.charAt(0).toUpperCase()+e.slice(1)}function n(e,t,i){var a={"10.0":"10",6.4:"10 Technical Preview",6.3:"8.1",6.2:"8",6.1:"7 / Server 2008 R2","6.0":"Vista / Server 2008",5.2:"XP 64-bit / Server 2003",5.1:"XP",5.01:"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return t&&i&&/^Win/i.test(e)&&!/^Windows Phone /i.test(e)&&(a=a[/[\d.]+$/.exec(e)])&&(e="Windows "+a),e=String(e),t&&i&&(e=e.replace(RegExp(t,"i"),i)),e=s(e.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0])}function o(e,t){var i=-1,a=e?e.length:0;if("number"==typeof a&&a>-1&&a<=w)for(;++i<a;)t(e[i],i,e);else l(e,t)}function s(e){return e=p(e),/^(?:webOS|i(?:OS|P))/.test(e)?e:r(e)}function l(e,t){for(var i in e)S.call(e,i)&&t(e[i],i,e)}function u(e){return null==e?r(e):j.call(e).slice(8,-1)}function d(e,t){var i=null!=e?typeof e[t]:"number";return!(/^(?:boolean|number|string|undefined)$/.test(i)||"object"==i&&!e[t])}function c(e){return String(e).replace(/([ -])(?!$)/g,"$1?")}function f(e,t){var i=null;return o(e,function(a,r){i=t(i,a,r,e)}),i}function p(e){return String(e).replace(/^ +| +$/g,"")}function h(e){function t(t){return f(t,function(t,i){return t||RegExp("\\b"+(i.pattern||c(i))+"\\b","i").exec(e)&&(i.label||i)})}function i(t){return f(t,function(t,i,a){return t||(i[z]||i[/^[a-z]+(?: +[a-z]+\b)*/i.exec(z)]||RegExp("\\b"+c(a)+"(?:\\b|\\w*\\d)","i").exec(e))&&a})}function a(t){return f(t,function(t,i){return t||RegExp("\\b"+(i.pattern||c(i))+"\\b","i").exec(e)&&(i.label||i)})}function r(t){return f(t,function(t,i){var a=i.pattern||c(i);return!t&&(t=RegExp("\\b"+a+"(?:/[\\d.]+|[ \\w.]*)","i").exec(e))&&(t=n(t,a,i.label||i)),t})}function o(t){return f(t,function(t,i){var a=i.pattern||c(i);return!t&&(t=RegExp("\\b"+a+" *\\d+[.\\w_]*","i").exec(e)||RegExp("\\b"+a+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(e))&&((t=String(i.label&&!RegExp(a,"i").test(i.label)?i.label:t).split("/"))[1]&&!/[\d.]+/.test(t[0])&&(t[0]+=" "+t[1]),i=i.label||i,t=s(t[0].replace(RegExp(a,"i"),i).replace(RegExp("; *(?:"+i+"[_-])?","i")," ").replace(RegExp("("+i+")[-_.]?(\\w)","i"),"$1 $2"))),t})}function y(t){return f(t,function(t,i){return t||(RegExp(i+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(e)||0)[1]||null})}function b(){return this.description||""}var v=m,g=e&&"object"==typeof e&&"String"!=u(e);g&&(v=e,e=null);var w=v.navigator||{},T=w.userAgent||"";e||(e=T);var S,O,P=g||k==_,E=g?!!w.likeChrome:/\bChrome\b/.test(e)&&!/internal|\n/i.test(j.toString()),M="Object",I=g?M:"ScriptBridgingProxyObject",A=g?M:"Environment",D=g&&v.java?"JavaPackage":u(v.java),R=g?M:"RuntimeObject",C=/\bJava/.test(D)&&v.java,N=C&&u(v.environment)==A,L=C?"a":"α",B=C?"b":"β",H=v.document||{},W=v.operamini||v.opera,F=x.test(F=g&&W?W["[[Class]]"]:u(W))?F:W=null,U=e,G=[],V=null,$=e==T,q=$&&W&&"function"==typeof W.version&&W.version(),K=t([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),X=a(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"Edge"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt","SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","WebPositive","Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chrome",{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),z=o([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation 3","PlayStation 4","PlayStation Vita","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),J=i({Apple:{iPad:1,iPhone:1,iPod:1},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{"PlayStation 4":1,"PlayStation 3":1,"PlayStation Vita":1}}),Y=r(["Windows Phone","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian","Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);if(K&&(K=[K]),J&&!z&&(z=o([J])),(S=/\bGoogle TV\b/.exec(z))&&(z=S[0]),/\bSimulator\b/i.test(e)&&(z=(z?z+" ":"")+"Simulator"),"Opera Mini"==X&&/\bOPiOS\b/.test(e)&&G.push("running in Turbo/Uncompressed mode"),"IE"==X&&/\blike iPhone OS\b/.test(e)?(S=h(e.replace(/like iPhone OS/,"")),J=S.manufacturer,z=S.product):/^iP/.test(z)?(X||(X="Safari"),Y="iOS"+((S=/ OS ([\d_]+)/i.exec(e))?" "+S[1].replace(/_/g,"."):"")):"Konqueror"!=X||/buntu/i.test(Y)?J&&"Google"!=J&&(/Chrome/.test(X)&&!/\bMobile Safari\b/i.test(e)||/\bVita\b/.test(z))||/\bAndroid\b/.test(Y)&&/^Chrome/.test(X)&&/\bVersion\//i.test(e)?(X="Android Browser",Y=/\bAndroid\b/.test(Y)?Y:"Android"):"Silk"==X?(/\bMobi/i.test(e)||(Y="Android",G.unshift("desktop mode")),/Accelerated *= *true/i.test(e)&&G.unshift("accelerated")):"PaleMoon"==X&&(S=/\bFirefox\/([\d.]+)\b/.exec(e))?G.push("identifying as Firefox "+S[1]):"Firefox"==X&&(S=/\b(Mobile|Tablet|TV)\b/i.exec(e))?(Y||(Y="Firefox OS"),z||(z=S[1])):X&&!(S=!/\bMinefield\b/i.test(e)&&/\b(?:Firefox|Safari)\b/.exec(X))||(X&&!z&&/[\/,]|^[^(]+?\)/.test(e.slice(e.indexOf(S+"/")+8))&&(X=null),(S=z||J||Y)&&(z||J||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(Y))&&(X=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(Y)?Y:S)+" Browser")):Y="Kubuntu",q||(q=y(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|Silk(?!/[\\d.]+$))","Version",c(X),"(?:Firefox|Minefield|NetFront)"])),(S="iCab"==K&&parseFloat(q)>3&&"WebKit"||/\bOpera\b/.test(X)&&(/\bOPR\b/.test(e)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(e)&&!/^(?:Trident|EdgeHTML)$/.test(K)&&"WebKit"||!K&&/\bMSIE\b/i.test(e)&&("Mac OS"==Y?"Tasman":"Trident")||"WebKit"==K&&/\bPlayStation\b(?! Vita\b)/i.test(X)&&"NetFront")&&(K=[S]),"IE"==X&&(S=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(e)||0)[1])?(X+=" Mobile",Y="Windows Phone "+(/\+$/.test(S)?S:S+".x"),G.unshift("desktop mode")):/\bWPDesktop\b/i.test(e)?(X="IE Mobile",Y="Windows Phone 8.x",G.unshift("desktop mode"),q||(q=(/\brv:([\d.]+)/.exec(e)||0)[1])):"IE"!=X&&"Trident"==K&&(S=/\brv:([\d.]+)/.exec(e))&&(X&&G.push("identifying as "+X+(q?" "+q:"")),X="IE",q=S[1]),$){if(d(v,"global"))if(C&&(S=C.lang.System,U=S.getProperty("os.arch"),Y=Y||S.getProperty("os.name")+" "+S.getProperty("os.version")),P&&d(v,"system")&&(S=[v.system])[0]){Y||(Y=S[0].os||null);try{S[1]=v.require("ringo/engine").version,q=S[1].join("."),X="RingoJS"}catch(e){S[0].global.system==v.system&&(X="Narwhal")}}else"object"==typeof v.process&&!v.process.browser&&(S=v.process)?(X="Node.js",U=S.arch,Y=S.platform,q=/[\d.]+/.exec(S.version)[0]):N&&(X="Rhino");else u(S=v.runtime)==I?(X="Adobe AIR",Y=S.flash.system.Capabilities.os):u(S=v.phantom)==R?(X="PhantomJS",q=(S=S.version||null)&&S.major+"."+S.minor+"."+S.patch):"number"==typeof H.documentMode&&(S=/\bTrident\/(\d+)/i.exec(e))&&(q=[q,H.documentMode],(S=+S[1]+4)!=q[1]&&(G.push("IE "+q[1]+" mode"),K&&(K[1]=""),q[1]=S),q="IE"==X?String(q[1].toFixed(1)):q[0]);Y=Y&&s(Y)}q&&(S=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(q)||/(?:alpha|beta)(?: ?\d)?/i.exec(e+";"+($&&w.appMinorVersion))||/\bMinefield\b/i.test(e)&&"a")&&(V=/b/i.test(S)?"beta":"alpha",q=q.replace(RegExp(S+"\\+?$"),"")+("beta"==V?B:L)+(/\d+\+?/.exec(S)||"")),"Fennec"==X||"Firefox"==X&&/\b(?:Android|Firefox OS)\b/.test(Y)?X="Firefox Mobile":"Maxthon"==X&&q?q=q.replace(/\.[\d.]+/,".x"):/\bXbox\b/i.test(z)?(Y=null,"Xbox 360"==z&&/\bIEMobile\b/.test(e)&&G.unshift("mobile mode")):!/^(?:Chrome|IE|Opera)$/.test(X)&&(!X||z||/Browser|Mobi/.test(X))||"Windows CE"!=Y&&!/Mobi/i.test(e)?"IE"==X&&$&&null===v.external?G.unshift("platform preview"):(/\bBlackBerry\b/.test(z)||/\bBB10\b/.test(e))&&(S=(RegExp(z.replace(/ +/g," *")+"/([.\\d]+)","i").exec(e)||0)[1]||q)?(S=[S,/BB10/.test(e)],Y=(S[1]?(z=null,J="BlackBerry"):"Device Software")+" "+S[0],q=null):this!=l&&"Wii"!=z&&($&&W||/Opera/.test(X)&&/\b(?:MSIE|Firefox)\b/i.test(e)||"Firefox"==X&&/\bOS X (?:\d+\.){2,}/.test(Y)||"IE"==X&&(Y&&!/^Win/.test(Y)&&q>5.5||/\bWindows XP\b/.test(Y)&&q>8||8==q&&!/\bTrident\b/.test(e)))&&!x.test(S=h.call(l,e.replace(x,"")+";"))&&S.name&&(S="ing as "+S.name+((S=S.version)?" "+S:""),x.test(X)?(/\bIE\b/.test(S)&&"Mac OS"==Y&&(Y=null),S="identify"+S):(S="mask"+S,X=F?s(F.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(S)&&(Y=null),$||(q=null)),K=["Presto"],G.push(S)):X+=" Mobile",(S=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(e)||0)[1])&&(S=[parseFloat(S.replace(/\.(\d)$/,".0$1")),S],"Safari"==X&&"+"==S[1].slice(-1)?(X="WebKit Nightly",V="alpha",q=S[1].slice(0,-1)):q!=S[1]&&q!=(S[2]=(/\bSafari\/([\d.]+\+?)/i.exec(e)||0)[1])||(q=null),S[1]=(/\bChrome\/([\d.]+)/i.exec(e)||0)[1],537.36==S[0]&&537.36==S[2]&&parseFloat(S[1])>=28&&"WebKit"==K&&(K=["Blink"]),$&&(E||S[1])?(K&&(K[1]="like Chrome"),S=S[1]||(S=S[0],S<530?1:S<532?2:S<532.05?3:S<533?4:S<534.03?5:S<534.07?6:S<534.1?7:S<534.13?8:S<534.16?9:S<534.24?10:S<534.3?11:S<535.01?12:S<535.02?"13+":S<535.07?15:S<535.11?16:S<535.19?17:S<536.05?18:S<536.1?19:S<537.01?20:S<537.11?"21+":S<537.13?23:S<537.18?24:S<537.24?25:S<537.36?26:"Blink"!=K?"27":"28")):(K&&(K[1]="like Safari"),S=S[0],S=S<400?1:S<500?2:S<526?3:S<533?4:S<534?"4+":S<535?5:S<537?6:S<538?7:S<601?8:"8"),K&&(K[1]+=" "+(S+="number"==typeof S?".x":/[.+]/.test(S)?"":"+")),"Safari"==X&&(!q||parseInt(q)>45)&&(q=S)),"Opera"==X&&(S=/\bzbov|zvav$/.exec(Y))?(X+=" ",G.unshift("desktop mode"),"zvav"==S?(X+="Mini",q=null):X+="Mobile",Y=Y.replace(RegExp(" *"+S+"$"),"")):"Safari"==X&&/\bChrome\b/.exec(K&&K[1])&&(G.unshift("desktop mode"),X="Chrome Mobile",q=null,/\bOS X\b/.test(Y)?(J="Apple",Y="iOS 4.3+"):Y=null),q&&0==q.indexOf(S=/[\d.]+$/.exec(Y))&&e.indexOf("/"+S+"-")>-1&&(Y=p(Y.replace(S,""))),K&&!/\b(?:Avant|Nook)\b/.test(X)&&(/Browser|Lunascape|Maxthon/.test(X)||"Safari"!=X&&/^iOS/.test(Y)&&/\bSafari\b/.test(K[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Sleipnir|Web)/.test(X)&&K[1])&&(S=K[K.length-1])&&G.push(S),G.length&&(G=["("+G.join("; ")+")"]),J&&z&&z.indexOf(J)<0&&G.push("on "+J),z&&G.push((/^on /.test(G[G.length-1])?"":"on ")+z),Y&&(S=/ ([\d.+]+)$/.exec(Y)||(O=/^[a-z]+ ([\d.+]+) \//i.exec(Y)),Y={architecture:32,family:S&&!O?Y.replace(S[0],""):Y,version:S?S[1]:null,toString:function(){var e=this.version;return this.family+(e&&!O?" "+e:"")+(64==this.architecture?" 64-bit":"")}}),(S=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(U))&&!/\bi686\b/i.test(U)?(Y&&(Y.architecture=64,Y.family=Y.family.replace(RegExp(" *"+S),"")),X&&(/\bWOW64\b/i.test(e)||$&&/\w(?:86|32)$/.test(w.cpuClass||w.platform)&&!/\bWin64; x64\b/i.test(e))&&G.unshift("32-bit")):Y&&/^OS X/.test(Y.family)&&"Chrome"==X&&parseFloat(q)>=39&&(Y.architecture=64),e||(e=null);var Z={};return Z.description=e,Z.layout=K&&K[0],Z.manufacturer=J,Z.name=X,Z.prerelease=V,Z.product=z,Z.ua=e,Z.version=X&&q,Z.os=Y||{architecture:null,family:null,version:null,toString:function(){return"null"}},Z.parse=h,Z.toString=b,Z.version&&G.unshift(q),Z.name&&G.unshift(X),Y&&X&&(Y!=String(Y).split(" ")[0]||Y!=X.split(" ")[0]&&!z)&&G.push(z?"("+Y+")":"on "+Y),G.length&&(Z.description=G.join(" ")),Z}var y={function:!0,object:!0},m=y[typeof window]&&window||this,_=m,b=y[typeof a]&&a,v=y[typeof i]&&i&&!i.nodeType&&i,g=b&&v&&"object"==typeof t&&t;!g||g.global!==g&&g.window!==g&&g.self!==g||(m=g);var w=Math.pow(2,53)-1,x=/\bOpera/,k=this,T=Object.prototype,S=T.hasOwnProperty,j=T.toString,O=h();"function"==typeof e&&"object"==typeof e.amd&&e.amd?(m.platform=O,e(function(){return O})):b&&v?l(O,function(e,t){b[t]=e}):m.platform=O}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],36:[function(e,t,i){"use strict";var a=e("./stringify"),r=e("./parse");t.exports={stringify:a,parse:r}},{"./parse":37,"./stringify":38}],37:[function(e,t,i){"use strict";var a=e("./utils"),r=Object.prototype.hasOwnProperty,n={delimiter:"&",depth:5,arrayLimit:20,parameterLimit:1e3,strictNullHandling:!1,plainObjects:!1,allowPrototypes:!1,allowDots:!1,decoder:a.decode},o=function(e,t){for(var i={},a=e.split(t.delimiter,t.parameterLimit===1/0?void 0:t.parameterLimit),n=0;n<a.length;++n){var o,s,l=a[n],u=l.indexOf("]=")===-1?l.indexOf("="):l.indexOf("]=")+1;u===-1?(o=t.decoder(l),s=t.strictNullHandling?null:""):(o=t.decoder(l.slice(0,u)),s=t.decoder(l.slice(u+1))),r.call(i,o)?i[o]=[].concat(i[o]).concat(s):i[o]=s}return i},s=function e(t,i,a){if(!t.length)return i;var r,n=t.shift();if("[]"===n)r=[],r=r.concat(e(t,i,a));else{r=a.plainObjects?Object.create(null):{};var o="["===n[0]&&"]"===n[n.length-1]?n.slice(1,n.length-1):n,s=parseInt(o,10);!isNaN(s)&&n!==o&&String(s)===o&&s>=0&&a.parseArrays&&s<=a.arrayLimit?(r=[],r[s]=e(t,i,a)):r[o]=e(t,i,a)}return r},l=function(e,t,i){if(e){var a=i.allowDots?e.replace(/\.([^\.\[]+)/g,"[$1]"):e,n=/^([^\[\]]*)/,o=/(\[[^\[\]]*\])/g,l=n.exec(a),u=[];if(l[1]){if(!i.plainObjects&&r.call(Object.prototype,l[1])&&!i.allowPrototypes)return;u.push(l[1])}for(var d=0;null!==(l=o.exec(a))&&d<i.depth;)d+=1,(i.plainObjects||!r.call(Object.prototype,l[1].replace(/\[|\]/g,""))||i.allowPrototypes)&&u.push(l[1]);return l&&u.push("["+a.slice(l.index)+"]"),s(u,t,i)}};t.exports=function(e,t){var i=t||{};if(null!==i.decoder&&void 0!==i.decoder&&"function"!=typeof i.decoder)throw new TypeError("Decoder has to be a function.");if(i.delimiter="string"==typeof i.delimiter||a.isRegExp(i.delimiter)?i.delimiter:n.delimiter,i.depth="number"==typeof i.depth?i.depth:n.depth,i.arrayLimit="number"==typeof i.arrayLimit?i.arrayLimit:n.arrayLimit,i.parseArrays=i.parseArrays!==!1,i.decoder="function"==typeof i.decoder?i.decoder:n.decoder,i.allowDots="boolean"==typeof i.allowDots?i.allowDots:n.allowDots,i.plainObjects="boolean"==typeof i.plainObjects?i.plainObjects:n.plainObjects,i.allowPrototypes="boolean"==typeof i.allowPrototypes?i.allowPrototypes:n.allowPrototypes,i.parameterLimit="number"==typeof i.parameterLimit?i.parameterLimit:n.parameterLimit,i.strictNullHandling="boolean"==typeof i.strictNullHandling?i.strictNullHandling:n.strictNullHandling,""===e||null===e||"undefined"==typeof e)return i.plainObjects?Object.create(null):{};for(var r="string"==typeof e?o(e,i):e,s=i.plainObjects?Object.create(null):{},u=Object.keys(r),d=0;d<u.length;++d){var c=u[d],f=l(c,r[c],i);s=a.merge(s,f,i)}return a.compact(s)}},{"./utils":39}],38:[function(e,t,i){"use strict";var a=e("./utils"),r={brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},n={delimiter:"&",strictNullHandling:!1,skipNulls:!1,encode:!0,encoder:a.encode},o=function e(t,i,r,n,o,s,l,u,d){var c=t;if("function"==typeof l)c=l(i,c);else if(c instanceof Date)c=c.toISOString();else if(null===c){if(n)return s?s(i):i;c=""}if("string"==typeof c||"number"==typeof c||"boolean"==typeof c||a.isBuffer(c))return s?[s(i)+"="+s(c)]:[i+"="+String(c)];var f=[];if("undefined"==typeof c)return f;var p;if(Array.isArray(l))p=l;else{var h=Object.keys(c);p=u?h.sort(u):h}for(var y=0;y<p.length;++y){var m=p[y];o&&null===c[m]||(f=Array.isArray(c)?f.concat(e(c[m],r(i,m),r,n,o,s,l,u,d)):f.concat(e(c[m],i+(d?"."+m:"["+m+"]"),r,n,o,s,l,u,d)))}return f};t.exports=function(e,t){var i,a,s=e,l=t||{},u="undefined"==typeof l.delimiter?n.delimiter:l.delimiter,d="boolean"==typeof l.strictNullHandling?l.strictNullHandling:n.strictNullHandling,c="boolean"==typeof l.skipNulls?l.skipNulls:n.skipNulls,f="boolean"==typeof l.encode?l.encode:n.encode,p=f?"function"==typeof l.encoder?l.encoder:n.encoder:null,h="function"==typeof l.sort?l.sort:null,y="undefined"!=typeof l.allowDots&&l.allowDots;if(null!==l.encoder&&void 0!==l.encoder&&"function"!=typeof l.encoder)throw new TypeError("Encoder has to be a function.");"function"==typeof l.filter?(a=l.filter,s=a("",s)):Array.isArray(l.filter)&&(i=a=l.filter);var m=[];if("object"!=typeof s||null===s)return"";var _;_=l.arrayFormat in r?l.arrayFormat:"indices"in l?l.indices?"indices":"repeat":"indices";var b=r[_];i||(i=Object.keys(s)),h&&i.sort(h);for(var v=0;v<i.length;++v){var g=i[v];c&&null===s[g]||(m=m.concat(o(s[g],g,b,d,c,p,a,h,y)))}return m.join(u)}},{"./utils":39}],39:[function(e,t,i){"use strict";var a=function(){for(var e=new Array(256),t=0;t<256;++t)e[t]="%"+((t<16?"0":"")+t.toString(16)).toUpperCase();return e}();i.arrayToObject=function(e,t){for(var i=t.plainObjects?Object.create(null):{},a=0;a<e.length;++a)"undefined"!=typeof e[a]&&(i[a]=e[a]);return i},i.merge=function(e,t,a){if(!t)return e;if("object"!=typeof t){if(Array.isArray(e))e.push(t);else{if("object"!=typeof e)return[e,t];e[t]=!0}return e}if("object"!=typeof e)return[e].concat(t);var r=e;return Array.isArray(e)&&!Array.isArray(t)&&(r=i.arrayToObject(e,a)),Object.keys(t).reduce(function(e,r){var n=t[r];return Object.prototype.hasOwnProperty.call(e,r)?e[r]=i.merge(e[r],n,a):e[r]=n,e},r)},i.decode=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},i.encode=function(e){if(0===e.length)return e;for(var t="string"==typeof e?e:String(e),i="",r=0;r<t.length;++r){var n=t.charCodeAt(r);45===n||46===n||95===n||126===n||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122?i+=t.charAt(r):n<128?i+=a[n]:n<2048?i+=a[192|n>>6]+a[128|63&n]:n<55296||n>=57344?i+=a[224|n>>12]+a[128|n>>6&63]+a[128|63&n]:(r+=1,n=65536+((1023&n)<<10|1023&t.charCodeAt(r)),i+=a[240|n>>18]+a[128|n>>12&63]+a[128|n>>6&63]+a[128|63&n])}return i},i.compact=function(e,t){if("object"!=typeof e||null===e)return e;var a=t||[],r=a.indexOf(e);if(r!==-1)return a[r];if(a.push(e),Array.isArray(e)){for(var n=[],o=0;o<e.length;++o)e[o]&&"object"==typeof e[o]?n.push(i.compact(e[o],a)):"undefined"!=typeof e[o]&&n.push(e[o]);return n}for(var s=Object.keys(e),l=0;l<s.length;++l){var u=s[l];e[u]=i.compact(e[u],a)}return e},i.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},i.isBuffer=function(e){return null!==e&&"undefined"!=typeof e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}},{}]},{},[15])(15)})}(); | ||
!function(){var e=!1;!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof e&&e.amd)e([],t);else{var i;i="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,i.mux=t()}}(function(){var e;return function e(t,i,a){function r(o,s){if(!i[o]){if(!t[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(n)return n(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var d=i[o]={exports:{}};t[o][0].call(d.exports,function(e){var i=t[o][1][e];return r(i?i:e)},d,d.exports,e,t,i,a)}return i[o].exports}for(var n="function"==typeof require&&require,o=0;o<a.length;o++)r(a[o]);return r}({1:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function r(e){var t={};for(var i in e)e.hasOwnProperty(i)&&(t[e[i]]=i);return t}function n(e){var t={};return Object.keys(e).forEach(function(i){if(e.hasOwnProperty(i)&&void 0!==e[i]){var a=i.split("_"),r=a[0],n=u[r];n||(s.default.debug("Data key word `"+a[0]+"` not expected in "+i),n=r+"_"),a.splice(1).forEach(function(e){c[e]?n+=c[e]:(s.default.debug("Data key word `"+e+"` not expected in "+i),n+="_"+e+"_")}),t[n]=e[i]}}),t}Object.defineProperty(i,"__esModule",{value:!0}),i.default=n;var o=e("./utils/log.js"),s=a(o),l={a:"property",d:"ad",e:"event",f:"experiment",m:"mux",p:"player",s:"session",t:"timestamp",u:"viewer",v:"video",w:"page",x:"view"},u=r(l),d={ad:"ad",ag:"aggregate",ap:"api",al:"application",ar:"architecture",au:"autoplay",br:"break",cd:"code",cg:"category",cn:"config",co:"count",cp:"complete",ct:"content",cu:"current",dg:"downscaling",dm:"domain",dn:"cdn",do:"downscale",du:"duration",dv:"device",ec:"encoding",en:"end",eg:"engine",em:"embed",er:"error",ev:"events",ex:"expires",fi:"first",fm:"family",ft:"format",fq:"frequency",fr:"frame",fs:"fullscreen",ho:"host",hn:"hostname",ht:"height",id:"id",ii:"init",in:"instance",ip:"ip",is:"is",ke:"key",la:"language",li:"live",lo:"load",ma:"max",me:"message",mi:"mime",ml:"midroll",mn:"manufacturer",mx:"mux",nm:"name",no:"number",on:"on",os:"os",pa:"paused",pb:"playback",pd:"producer",pe:"percentage",ph:"playhead",pi:"plugin",pl:"preroll",po:"poster",pr:"preload",ra:"rate",re:"rebuffer",ro:"ratio",sa:"sample",se:"session",sk:"seek",sm:"stream",sq:"sequence",sr:"series",st:"start",so:"source",su:"startup",sw:"software",tc:"tech",ti:"time",tl:"total",to:"to",tt:"title",ty:"type",ug:"upscaling",up:"upscale",ur:"url",us:"user",va:"variant",vd:"viewed",vi:"video",ve:"version",vw:"view",vr:"viewer",wd:"width",wa:"watch",wt:"waiting"},c=r(d)},{"./utils/log.js":21}],2:[function(e,t,i){"use strict";function a(){this.isAdBreak=!1,this.on("adbreakstart",function(){this.isAdBreak=!0}),this.on("play",function(){this.isAdBreak=!1}),this.on("playing",function(){this.isAdBreak=!1}),this.on("seeking",function(){this.isAdBreak=!1}),this.on("viewend",function(){this.isAdBreak=!1})}Object.defineProperty(i,"__esModule",{value:!0}),i.default=a},{}],3:[function(e,t,i){"use strict";function a(){var e=this;this.one("playbackheartbeat",r),this.on("playbackheartbeatend",function(){e.off("before*",n),e.one("playbackheartbeat",r)})}Object.defineProperty(i,"__esModule",{value:!0}),i.default=a;var r=function(){this.lastWallClockTime=Date.now(),this.on("before*",n)},n=function(e){var t=Date.now(),i=this.lastWallClockTime;this.lastWallClockTime=t,t-i>3e4&&(this.emit("devicesleep",{viewer_time:i}),this.send("devicesleep",{viewer_time:i}),this.emit("devicewake",{viewer_time:t}),this.send("devicewake",{viewer_time:i}))}},{}],4:[function(e,t,i){"use strict";function a(){var e=this;this.on("viewinit",function(){e.viewErrored=!1}),this.on("error",function(){e.viewErrored=!0})}Object.defineProperty(i,"__esModule",{value:!0}),i.default=a},{}],5:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var a=function(){},r=0;a.prototype.on=function(e,t,i){return t._eventEmitterGuid=t._eventEmitterGuid||++r,this._listeners=this._listeners||{},this._listeners[e]=this._listeners[e]||[],i&&(t=t.bind(i)),this._listeners[e].push(t),t},a.prototype.off=function(e,t){var i=this._listeners&&this._listeners[e];i&&i.forEach(function(e,a){e._eventEmitterGuid===t._eventEmitterGuid&&i.splice(a,1)})},a.prototype.one=function(e,t,i){var a=this;t._eventEmitterGuid=t._eventEmitterGuid||++r;var n=function r(){a.off(e,r),t.apply(i||this,arguments)};n._eventEmitterGuid=t._eventEmitterGuid,this.on(e,n)},a.prototype.emit=function(e,t){var i=this;if(this._listeners){t=t||{};var a=this._listeners["before*"]||[],r=this._listeners[e]||[],n=this._listeners["after"+e]||[],o=function(t,a){t=t.slice(),t.forEach(function(t){t.call(i,{type:e},a)})};o(a,t),o(r,t),o(n,t)}},i.default=a},{}],6:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var r=e("global/window"),n=a(r),o=function(){this._playbackHeartbeatInterval=null,this._playheadShouldBeProgressing=!1,this.on("playing",function(){this._playheadShouldBeProgressing=!0}),this.on("play",this._startPlaybackHeartbeatInterval),this.on("adbreakstart",this._startPlaybackHeartbeatInterval),this.on("adplay",this._startPlaybackHeartbeatInterval),this.on("seeking",this._startPlaybackHeartbeatInterval),this.on("devicewake",this._startPlaybackHeartbeatInterval),this.on("pause",this._stopPlaybackHeartbeatInterval),this.on("ended",this._stopPlaybackHeartbeatInterval),this.on("viewend",this._stopPlaybackHeartbeatInterval),this.on("error",this._stopPlaybackHeartbeatInterval),this.on("adpause",this._stopPlaybackHeartbeatInterval),this.on("adbreakend",this._stopPlaybackHeartbeatInterval),this.on("seeked",function(){this.data.player_is_paused&&this._stopPlaybackHeartbeatInterval()}),this.on("timeupdate",function(){this.emit("playbackheartbeat",{viewer_time:Date.now()})}),this.on("devicesleep",function(e,t){null!==this._playbackHeartbeatInterval&&(n.default.clearInterval(this._playbackHeartbeatInterval),this.emit("playbackheartbeatend",{viewer_time:t.viewer_time}),this._playbackHeartbeatInterval=null)})};o.prototype._startPlaybackHeartbeatInterval=function(){var e=this;null===this._playbackHeartbeatInterval&&(this.emit("playbackheartbeat",{viewer_time:Date.now()}),this._playbackHeartbeatInterval=n.default.setInterval(function(){e.emit("playbackheartbeat",{viewer_time:Date.now()})},this.playbackHeartbeatTime))},o.prototype._stopPlaybackHeartbeatInterval=function(){this._playheadShouldBeProgressing=!1,null!==this._playbackHeartbeatInterval&&(n.default.clearInterval(this._playbackHeartbeatInterval),this.emit("playbackheartbeatend",{viewer_time:Date.now()}),this._playbackHeartbeatInterval=null)},i.default=o},{"global/window":32}],7:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var r=e("../utils/safe-increment.js"),n=a(r),o=function(){this._playbackTimeTrackerLastPlayheadPosition=-1,this.on("playbackheartbeat",this._updatePlaybackTime),this.on("playbackheartbeatend",this._clearPlaybackTimeState),this.on("seeking",this._clearPlaybackTimeState)};o.prototype._updatePlaybackTime=function(){var e=this.data.player_playhead_time;if(this._playbackTimeTrackerLastPlayheadPosition>=0&&e>this._playbackTimeTrackerLastPlayheadPosition){var t=e-this._playbackTimeTrackerLastPlayheadPosition;t<=1e3&&(0,n.default)(this.data,"view_content_playback_time",t)}this._playbackTimeTrackerLastPlayheadPosition=e},o.prototype._clearPlaybackTimeState=function(){this._updatePlaybackTime(),this._playbackTimeTrackerLastPlayheadPosition=-1},i.default=o},{"../utils/safe-increment.js":23}],8:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var a=function(){this.on("playbackheartbeat",this._updatePlayheadTime),this.on("playbackheartbeatend",this._updatePlayheadTime),this.on("timeupdate",this._updatePlayheadTime),this.on("destroy",function(){this.off("timeupdate",this._updatePlayheadTime)})};a.prototype._updatePlayheadTime=function(e,t){t.player_playhead_time?this.data.player_playhead_time=t.player_playhead_time:this.getPlayheadTime&&(this.data.player_playhead_time=this.getPlayheadTime())},i.default=a},{}],9:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var r=e("../utils/safe-increment.js"),n=a(r),o=function(){this._lastCheckedTime=null,this._lastPlayheadTime=null,this._lastPlayheadTimeUpdatedTime=null,this.on("playbackheartbeat",this._checkIfRebuffering),this.on("playbackheartbeatend",this._cleanupRebufferTracker),this.on("seeking",function(){this._cleanupRebufferTracker(null,{viewer_time:Date.now()})})};o.prototype._checkIfRebuffering=function(e,t){if(this.isSeeking||this.isAdBreak||!this._playheadShouldBeProgressing)return void this._cleanupRebufferTracker(e,t);if(null===this._lastCheckedTime)return this._prepareRebufferTrackerState(t.viewer_time),void this._updateRebufferMetrics();if(this._lastPlayheadTime!==this.data.player_playhead_time)return void this._cleanupRebufferTracker(e,t,!0);var i=t.viewer_time-this._lastPlayheadTimeUpdatedTime;i>=this.sustainedRebufferThreshold&&(this._rebuffering?this._updateRebufferMetrics(t.viewer_time-this._lastCheckedTime):(this._rebuffering=!0,(0,n.default)(this.data,"view_rebuffer_count",1),this._updateRebufferMetrics(i),this.emit("rebufferstart"))),this._lastCheckedTime=t.viewer_time},o.prototype._clearRebufferTrackerState=function(){this._lastCheckedTime=null,this._lastPlayheadTime=null,this._lastPlayheadTimeUpdatedTime=null},o.prototype._prepareRebufferTrackerState=function(e){this._lastCheckedTime=e,this._lastPlayheadTime=this.data.player_playhead_time,this._lastPlayheadTimeUpdatedTime=e},o.prototype._cleanupRebufferTracker=function(e,t){var i=!(arguments.length<=2||void 0===arguments[2])&&arguments[2];if(this._rebuffering)this._rebuffering=!1,this._updateRebufferMetrics(t.viewer_time-this._lastCheckedTime),this.emit("rebufferend");else{if(null===this._lastCheckedTime)return void this._updateRebufferMetrics();var a=this.data.player_playhead_time-this._lastPlayheadTime,r=t.viewer_time-this._lastPlayheadTimeUpdatedTime;a>0&&r-a>this.minimumRebufferDuration?((0,n.default)(this.data,"view_rebuffer_count",1),this._updateRebufferMetrics(r-a),this.emit("rebufferstart",{viewer_time:this._lastPlayheadTimeUpdatedTime}),this.emit("rebufferend",{viewer_time:this._lastPlayheadTimeUpdatedTime+r-a})):this._updateRebufferMetrics()}i?this._prepareRebufferTrackerState(t.viewer_time):this._clearRebufferTrackerState()},o.prototype._updateRebufferMetrics=function(e){e>0&&(0,n.default)(this.data,"view_rebuffer_duration",e),this.data.view_watch_time>=0&&this.data.view_rebuffer_count>0&&(this.data.view_rebuffer_frequency=this.data.view_rebuffer_count/this.data.view_watch_time,this.data.view_rebuffer_percentage=this.data.view_rebuffer_duration/this.data.view_watch_time)},i.default=o},{"../utils/safe-increment.js":23}],10:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function r(){var e=this;this.on("viewinit",function(){this._lastPlayheadPosition=-1});var t=["pause","rebufferstart","seeking","error","adbreakstart","hb"],i=["playing","hb"];t.forEach(function(t){e.on(t,function(){if(this._lastPlayheadPosition>=0&&this.data.player_playhead_time>=0&&this._lastPlayerWidth>=0&&this._lastSourceWidth>0&&this._lastPlayerHeight>=0&&this._lastSourceHeight>0){var e=this.data.player_playhead_time-this._lastPlayheadPosition;if(e<0)return void(this._lastPlayheadPosition=-1);var t=Math.min(this._lastPlayerWidth/this._lastSourceWidth,this._lastPlayerHeight/this._lastSourceHeight),i=Math.max(0,t-1),a=Math.max(0,1-t);this.data.view_max_upscale_percentage=Math.max(this.data.view_max_upscale_percentage||0,i),this.data.view_max_downscale_percentage=Math.max(this.data.view_max_downscale_percentage||0,a),(0,o.default)(this.data,"view_total_content_playback_time",e),(0,o.default)(this.data,"view_total_upscaling",i*e),(0,o.default)(this.data,"view_total_downscaling",a*e)}this._lastPlayheadPosition=-1})}),i.forEach(function(t){e.on(t,function(){this._lastPlayheadPosition=this.data.player_playhead_time,this._lastPlayerWidth=this.data.player_width,this._lastPlayerHeight=this.data.player_height,this._lastSourceWidth=this.data.video_source_width,this._lastSourceHeight=this.data.video_source_height})})}Object.defineProperty(i,"__esModule",{value:!0}),i.default=r;var n=e("../utils/safe-increment.js"),o=a(n)},{"../utils/safe-increment.js":23}],11:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function r(){this.isSeeking=!1,this.on("seeking",function(e,t){(0,l.default)(this.data,{viewer_time:Date.now()},t),this._lastSeekingTime=Date.now(),this.isSeeking===!1&&(this.isSeeking=!0,this.send("seeking"))}),this.on("seeked",function(){this.isSeeking=!1;var e=this._lastSeekingTime||Date.now(),t=Date.now()-e;(0,o.default)(this.data,"view_seek_count",1),(0,o.default)(this.data,"view_seek_duration",t);var i=this.data.view_max_seek_time||0;this.data.view_max_seek_time=Math.max(i,t)}),this.on("viewend",function(){this.isSeeking=!1})}Object.defineProperty(i,"__esModule",{value:!0}),i.default=r;var n=e("../utils/safe-increment.js"),o=a(n),s=e("lodash.assign"),l=a(s)},{"../utils/safe-increment.js":23,"lodash.assign":33}],12:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var a=function(){this.on("viewinit",function(){var e=this.data,t=e.view_id,i=function(e,i){var a=i.viewer_time;"playing"===e.type&&"undefined"==typeof this.data.view_time_to_first_frame?this.calculateTimeToFirstFrame(a||Date.now(),t):"adplaying"===e.type&&("undefined"==typeof this.data.view_time_to_first_frame||"undefined"==typeof this.data.view_content_playback_time||this.data.view_content_playback_time<=1e3)&&this.calculateTimeToFirstFrame(a||Date.now(),t)};this.one("playing",i),this.one("adplaying",i),this.one("viewend",function(){this.off("playing",i),this.off("adplaying",i)})})};a.prototype.calculateTimeToFirstFrame=function(e,t){t===this.data.view_id&&(this.data.view_time_to_first_frame=e-this.data.view_start,(this.data.player_autoplay_on||this.data.video_is_autoplay)&&this.NAVIGATION_START&&(this.data.view_aggregate_startup_time=e-this.NAVIGATION_START))},i.default=a},{}],13:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function r(){var e=this,t=void 0,i=void 0,a=function(){(0,o.default)(e.data,"view_waiting_rebuffer_count",1),t=Date.now(),i=window.setInterval(function(){if(t){var i=Date.now();(0,o.default)(e.data,"view_waiting_rebuffer_duration",i-t),t=i}},250)},r=function(){t&&((0,o.default)(e.data,"view_waiting_rebuffer_duration",Date.now()-t),t=!1,window.clearInterval(i))},n=!1,s=function(){n=!0},l=function(){n=!1,r()};this.on("waiting",function(){n&&a()}),this.on("playing",function(){r(),s()}),this.on("pause",l),this.on("seeking",l)}Object.defineProperty(i,"__esModule",{value:!0}),i.default=r;var n=e("../utils/safe-increment.js"),o=a(n)},{"../utils/safe-increment.js":23}],14:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var r=e("../utils/safe-increment.js"),n=a(r),o=function(){this._watchTimeTrackerLastCheckedTime=null,this.on("playbackheartbeat",this._updateWatchTime),this.on("playbackheartbeatend",this._clearWatchTimeState)};o.prototype._updateWatchTime=function(e,t){var i=t.viewer_time;null===this._watchTimeTrackerLastCheckedTime&&(this._watchTimeTrackerLastCheckedTime=i),(0,n.default)(this.data,"view_watch_time",i-this._watchTimeTrackerLastCheckedTime),this._watchTimeTrackerLastCheckedTime=i},o.prototype._clearWatchTimeState=function(e,t){this._updateWatchTime(e,t),this._watchTimeTrackerLastCheckedTime=null},i.default=o},{"../utils/safe-increment.js":23}],15:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}var r="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},n=e("global/window"),o=a(n),s=e("platform"),l=a(s),u=e("qs"),d=a(u),c=e("./vendor/js-cookie.js"),f=a(c),p=e("./minify-keys.js"),h=a(p),m=e("./utils/image-beacon.js"),y=a(m),_=e("./utils/beacon-url.js"),b=a(_),v=e("./utils/element-helpers.js"),g=e("lodash.assign"),w=a(g),x=e("./utils/log.js"),k=a(x),T=e("./utils/uuid.js"),S=e("./player-monitor.js"),j=a(S),O=e("./video-el-monitor.js"),P=a(O),E=e("./utils/utils-public.js"),M=a(E),I="2.0.40",A="2.0",D={},R={};t.exports=function(){function e(){var e=void 0,t=Date.now();try{e=d.default.parse(f.default.get("muxData")||"")}catch(e){}e=e||{},e.mux_viewer_id=e.mux_viewer_id||(0,T.generateUUID)(),e.msn=e.msn||Math.random(),e.session_start&&(e.sst=e.session_start,delete e.session_start),e.session_id&&(e.sid=e.session_id,delete e.session_id),e.session_expires&&(e.sex=e.session_expires,delete e.session_expires),(!e.sex||e.sex<t)&&(e.sid=(0,T.generateUUID)(),e.sst=t),e.sex=t+15e5,f.default.set("muxData",d.default.stringify(e),{expires:7300});var i={session_id:e.sid,session_start:e.sst,session_expires:e.sex,mux_viewer_id:e.mux_viewer_id,mux_sample_number:e.msn};return i}function t(e,t){e=Array.prototype.slice.apply(e),t=t||Date.now();var i=e[e.length-1],a=void 0;return"object"!==("undefined"==typeof i?"undefined":r(i))?(e.push({viewer_time:t}),e):(i.viewer_time||(a=(0,w.default)({},i),a.viewer_time=t,e[e.length-1]=a),e)}var i=function e(i){var a=arguments,r=Date.now();"string"==typeof i?e.hasOwnProperty(i)?o.default.setTimeout(function(){a=Array.prototype.splice.call(a,1),a=t(a,r),e[i].apply(null,a)},0):k.default.warn("`"+i+"` is an unknown task"):"function"==typeof i?o.default.setTimeout(function(){i(e)},0):k.default.warn("`"+i+"` is invalid.")};i.loaded=Date.now(),i.VERSION=I,i.API_VERSION=A,i.PLAYER_TRACKED=!1,i.monitor=function(e,t){return(0,P.default)(i,e,t)},i.init=function(e,t){var a=(0,v.getMuxPlayerId)(e);D[a]=new j.default(i,a,t)},i.emit=function(e,t,i){var a=(0,v.getMuxPlayerId)(e);D[a]?(D[a].emit(t,i),"destroy"===t&&delete D[a]):k.default.error("A monitor for `"+a+"` has not been initialized.")};var a={mux_api_version:A,mux_embed_version:I,page_url:o.default.location.href,viewer_application_name:l.default.name,viewer_application_version:l.default.version,viewer_application_engine:l.default.layout,viewer_device_name:l.default.product,viewer_device_category:"",viewer_device_manufacturer:l.default.manufacturer,viewer_os_family:l.default.os&&l.default.os.family,viewer_os_architecture:l.default.os&&l.default.os.architecture,viewer_os_version:l.default.os&&l.default.os.version};return i.send=function(t,n){if(!t||i.checkDoNotTrack())return void k.default.debug("Not sending `"+t+"` because Do Not Track is enabled in your browser");var o=e()||{},s={};if(!n||"object"!==("undefined"==typeof n?"undefined":r(n)))return k.default.error("A data object was expected in send() but was not provided");"pageloadstart"===t&&(a.page_load_start=n.viewer_time),(0,w.default)(s,a),(0,w.default)(s,n),(0,w.default)(s,o),s.event=t,s.user_id&&(s.viewer_user_id=s.user_id,delete s.user_id);var l="undefined"==typeof s.mux_sample_rate?1:s.mux_sample_rate,u=s.mux_sample_number<l,d=(0,h.default)(s);u?(k.default.debug("Sending event: ",t,s,d),n.property_key&&(R[n.property_key]=R[n.property_key]||(0,b.default)(n.property_key),y.default.send(R[n.property_key],t,d))):k.default.debug("Not sending event due to sample rate restriction: ",t,s,d)},i.checkDoNotTrack=function(){var e=o.default.navigator,t=o.default.doNotTrack||e.doNotTrack||e.msDoNotTrack;return"1"===t},i.checkDoNotTrack()&&k.default.debug("The browser's Do Not Track flag is enabled - Mux beaconing is disabled."),i.log=k.default,i.utils=M.default,i}()},{"./minify-keys.js":1,"./player-monitor.js":16,"./utils/beacon-url.js":17,"./utils/element-helpers.js":18,"./utils/image-beacon.js":20,"./utils/log.js":21,"./utils/utils-public.js":25,"./utils/uuid.js":26,"./vendor/js-cookie.js":28,"./video-el-monitor.js":29,"global/window":32,"lodash.assign":33,platform:35,qs:36}],16:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var r=e("./utils/log.js"),n=a(r),o=e("lodash.assign"),s=a(o),l=e("./utils/uuid.js"),u=e("global/document"),d=a(u),c=e("global/window"),f=a(c),p=e("./mixins/event-emitter.js"),h=a(p),m=e("./mixins/playback-heartbeat.js"),y=a(m),_=e("./utils/safe-increment.js"),b=a(_),v=e("./utils/video-id-from-src.js"),g=a(v),w=e("./mixins/error-tracker.js"),x=a(w),k=e("./mixins/watch-time-tracker.js"),T=a(k),S=e("./mixins/playback-time-tracker.js"),j=a(S),O=e("./mixins/playhead-time-tracker.js"),P=a(O),E=e("./mixins/rebuffer-tracker.js"),M=a(E),I=e("./mixins/time-to-first-frame-tracker.js"),A=a(I),D=e("./mixins/scaling-tracker.js"),R=a(D),C=e("./mixins/seeking-tracker.js"),N=a(C),L=e("./mixins/ad-tracker.js"),B=a(L),H=e("./mixins/waiting-rebuffer-tracker.js"),W=a(H),F=e("./mixins/device-sleep-tracker.js"),U=a(F),G=["viewstart","ended","loadstart","pause","play","playing","ratechange","stalled","waiting","adplay","adpause","adended","aderror","adplaying","adrequest","adresponse","adbreakstart","adbreakend","rebufferstart","rebufferend","seeked","error","hb"],V=function(e,t,i){var a=this;this.DOM_CONTENT_LOADED_EVENT_END=f.default.performance&&f.default.performance.timing.domContentLoadedEventEnd,this.NAVIGATION_START=f.default.performance&&f.default.performance.timing.navigationStart;var r={debug:!1,minimumRebufferDuration:100,sustainedRebufferThreshold:1e3,playbackHeartbeatTime:25,sampleRate:1};this.mux=e,this.id=t,i=(0,s.default)(r,i),n.default.setLevel(i.debug?"debug":"warn"),this.getPlayheadTime=i.getPlayheadTime,this.getStateData=i.getStateData||function(){},this.minimumRebufferDuration=i.minimumRebufferDuration,this.sustainedRebufferThreshold=i.sustainedRebufferThreshold,this.playbackHeartbeatTime=i.playbackHeartbeatTime,this.data={player_instance_id:(0,l.generateShortID)(),mux_sample_rate:i.sampleRate},this.data.view_sequence_number=1,this.data.player_sequence_number=1,this.on("viewinit",function(e,t){this._resetVideoData(),this._resetViewData(),this._resetErrorData(),this.updateStateData(),(0,s.default)(this.data,t),this._initializeViewData();var i=function(){"undefined"==typeof this.data.view_start&&(this.data.view_start=Date.now(),this.emit("viewstart"))}.bind(this);this.one("play",i),this.one("adbreakstart",i)}),this.on("videochange",function(e,t){this.emit("viewend"),this.send("viewend"),this.emit("viewinit",t)}),this.on("destroy",function(e,t){"undefined"!=typeof this.data.view_start&&(this.emit("viewend"),this.send("viewend")),f.default.clearTimeout(this._heartBeatTimeout)}),this.on("playerready",function(e,t){(0,s.default)(this.data,t)}),G.forEach(function(e){a.on(e,function(t,i){0!==e.indexOf("ad")&&this.updateStateData(),(0,s.default)(this.data,{viewer_time:Date.now()},i),this._sanitizeData()}),a.on("after"+e,function(){this.send(e)})});var o=function(e){var t=Date.now();this.data.player_init_time&&(this.data.player_startup_time=t-this.data.player_init_time),!this.mux.PLAYER_TRACKED&&this.NAVIGATION_START&&(this.mux.PLAYER_TRACKED=!0,(this.data.player_init_time||this.DOM_CONTENT_LOADED_EVENT_END)&&(this.data.page_load_time=Math.min(this.data.player_init_time||1/0,this.DOM_CONTENT_LOADED_EVENT_END||1/0)-this.NAVIGATION_START)),this.send("playerready"),delete this.data.player_startup_time,delete this.data.page_load_time};this.one("playerready",o),x.default.apply(this),U.default.apply(this),N.default.apply(this),B.default.apply(this),P.default.apply(this),y.default.apply(this),R.default.apply(this),T.default.apply(this),j.default.apply(this),M.default.apply(this),A.default.apply(this),W.default.apply(this),this.emit("viewinit",i.data)};(0,s.default)(V.prototype,P.default.prototype),(0,s.default)(V.prototype,h.default.prototype),(0,s.default)(V.prototype,N.default.prototype),(0,s.default)(V.prototype,B.default.prototype),(0,s.default)(V.prototype,y.default.prototype),(0,s.default)(V.prototype,T.default.prototype),(0,s.default)(V.prototype,j.default.prototype),(0,s.default)(V.prototype,M.default.prototype),(0,s.default)(V.prototype,A.default.prototype),V.prototype.updateStateData=function(){(0,s.default)(this.data,this.getStateData()),this.getPlayheadTime&&(this.data.player_playhead_time=this.getPlayheadTime()),this._sanitizeData()},V.prototype.send=function(e){var t=(0,s.default)({},this.data);if(1===t.player_error_code&&(delete t.player_error_code,delete t.player_error_message),t.player_source_duration===1/0||t.video_source_duration===1/0?t.video_source_is_live=!0:(t.player_source_duration>0||t.video_source_duration>0)&&(t.video_source_is_live=!1),t.video_source_url=t.video_source_url||t.player_source_url,t.video_source_url){var i=d.default.createElement("a");i.href=t.video_source_url;var a=i.hostname,r=a.match(/[^\.]+\.[^\.]+$/);r&&r.length&&(t.video_source_domain=r[0]),t.video_source_hostname=a}delete t.ad_request_id,this.mux.send(e,t),this.data.view_sequence_number++,this.data.player_sequence_number++,this._restartHeartBeat()},V.prototype._sanitizeData=function(){var e=this,t=["player_width","player_height","video_source_width","video_source_height","player_playhead_time"];t.forEach(function(t){var i=parseInt(e.data[t],10);e.data[t]=isNaN(i)?void 0:i})},V.prototype._resetVideoData=function(e,t){var i=this;Object.keys(this.data).forEach(function(e){0===e.indexOf("video_")&&delete i.data[e]})},V.prototype._resetViewData=function(){var e=this;Object.keys(this.data).forEach(function(t){0===t.indexOf("view_")&&delete e.data[t]}),this.data.view_sequence_number=1},V.prototype._resetErrorData=function(e,t){delete this.data.player_error_code,delete this.data.player_error_message},V.prototype._initializeViewData=function(){var e=this,t=this.data.view_id=(0,l.generateUUID)();this.data.video_id||(this.data.video_id=(0,g.default)(this.data.player_source_url));var i=function(){t===e.data.view_id&&(0,b.default)(e.data,"player_view_count",1)};this.data.player_is_paused?this.one("play",i):i()},V.prototype._restartHeartBeat=function(){var e=this;f.default.clearTimeout(this._heartBeatTimeout),this.viewErrored||(this._heartBeatTimeout=f.default.setTimeout(function(){e.data.player_is_paused||e.emit("hb")},1e4))},i.default=V},{"./mixins/ad-tracker.js":2,"./mixins/device-sleep-tracker.js":3,"./mixins/error-tracker.js":4,"./mixins/event-emitter.js":5,"./mixins/playback-heartbeat.js":6,"./mixins/playback-time-tracker.js":7,"./mixins/playhead-time-tracker.js":8,"./mixins/rebuffer-tracker.js":9,"./mixins/scaling-tracker.js":10,"./mixins/seeking-tracker.js":11,"./mixins/time-to-first-frame-tracker.js":12,"./mixins/waiting-rebuffer-tracker.js":13,"./mixins/watch-time-tracker.js":14,"./utils/log.js":21,"./utils/safe-increment.js":23,"./utils/uuid.js":26,"./utils/video-id-from-src.js":27,"global/document":31,"global/window":32,"lodash.assign":33}],17:[function(e,t,i){"use strict";function a(e){return e=e||"",e.match(/^[a-z0-9]+$/)?"https://"+e+".litix.io":"https://img.litix.io/a.gif"}Object.defineProperty(i,"__esModule",{value:!0}),i.default=a},{}],18:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.findMediaElement=i.getMuxPlayerId=void 0;var a=e("./uuid.js"),r=function(e){return e&&"undefined"!=typeof e.nodeName?(e.muxId||(e.muxId=e.id||(0,a.generateShortID)()),e.muxId):e},n=function(e){var t=void 0;e&&"undefined"!=typeof e.nodeName?(t=e,e=r(t)):t=document.querySelector(e);var i=t&&t.nodeName?t.nodeName.toLowerCase():"";return[t,e,i]};i.getMuxPlayerId=r,i.findMediaElement=n},{"./uuid.js":26}],19:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(o.default.defaultView&&o.default.defaultView.getComputedStyle)return o.default.defaultView.getComputedStyle(e,null).getPropertyValue(t)}Object.defineProperty(i,"__esModule",{value:!0}),i.default=r;var n=e("global/document"),o=a(n)},{"global/document":31}],20:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var r=e("qs"),n=a(r),o={};o.send=function(e,t,i){var a=new Image;return a.src=e+"?e="+t+"&"+n.default.stringify(i),a},i.default=o},{qs:36}],21:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var r=e("loglevel"),n=a(r),o=n.default.methodFactory;n.default.methodFactory=function(e,t,i){var a=o(e,t,i);return function(){for(var e=["[mux]"],t=0;t<arguments.length;t++)e.push(arguments[t]);a.apply(void 0,e)}},n.default.setLevel(n.default.getLevel()),i.default=n.default},{loglevel:34}],22:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function r(e,t,i,a){var r=a;if(e&&"function"==typeof e[t])try{r=e[t].apply(e,i)}catch(e){o.default.debug("safeCall error",e)}return r}Object.defineProperty(i,"__esModule",{value:!0}),i.default=r;var n=e("./log.js"),o=a(n)},{"./log.js":21}],23:[function(e,t,i){"use strict";function a(e,t,i){i=void 0===i?1:i,e[t]=e[t]||0,e[t]+=i}Object.defineProperty(i,"__esModule",{value:!0}),i.default=a},{}],24:[function(e,t,i){"use strict";function a(e){return Math.floor(1e3*e)}Object.defineProperty(i,"__esModule",{value:!0}),i.default=a},{}],25:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var r=e("./safe-call.js"),n=a(r),o=e("./safe-increment.js"),s=a(o),l=e("./get-computed-style.js"),u=a(l),d=e("./seconds-to-ms.js"),c=a(d),f={};f.safeCall=n.default,f.safeIncrement=s.default,f.getComputedStyle=u.default,f.secondsToMs=c.default,i.default=f},{"./get-computed-style.js":19,"./safe-call.js":22,"./safe-increment.js":23,"./seconds-to-ms.js":24}],26:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var a=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0,i="x"===e?t:3&t|8;return i.toString(16)})},r=function(){return("000000"+(Math.random()*Math.pow(36,6)<<0).toString(36)).slice(-6)};i.generateUUID=a,i.generateShortID=r},{}],27:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function r(e){var t=o.default.createElement("a");t.href=e;var i=t.pathname.replace(/\.[^\/.]+$/,"");return l.default.btoa(t.host+i).split("=")[0]}Object.defineProperty(i,"__esModule",{value:!0}),i.default=r;var n=e("global/document"),o=a(n),s=e("global/window"),l=a(s)},{"global/document":31,"global/window":32}],28:[function(t,i,a){"use strict";var r="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};!function(t){var n=!1;if("function"==typeof e&&e.amd&&(e(t),n=!0),"object"===("undefined"==typeof a?"undefined":r(a))&&(i.exports=t(),n=!0),!n){var o=window.Cookies,s=window.Cookies=t();s.noConflict=function(){return window.Cookies=o,s}}}(function(){function e(i){function a(e,r,n){var o;if("undefined"!=typeof document){if(arguments.length>1){if(n=t({path:"/"},a.defaults,n),"number"==typeof n.expires){var s=new Date;s.setMilliseconds(s.getMilliseconds()+864e5*n.expires),n.expires=s}try{o=JSON.stringify(r),/^[\{\[]/.test(o)&&(r=o)}catch(e){}return r=i.write?i.write(r,e):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=encodeURIComponent(String(e)),e=e.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),e=e.replace(/[\(\)]/g,escape),document.cookie=[e,"=",r,n.expires?"; expires="+n.expires.toUTCString():"",n.path?"; path="+n.path:"",n.domain?"; domain="+n.domain:"",n.secure?"; secure":""].join("")}e||(o={});for(var l=document.cookie?document.cookie.split("; "):[],u=/(%[0-9A-Z]{2})+/g,d=0;d<l.length;d++){var c=l[d].split("="),f=c.slice(1).join("="); | ||
'"'===f.charAt(0)&&(f=f.slice(1,-1));try{var p=c[0].replace(u,decodeURIComponent);if(f=i.read?i.read(f,p):i(f,p)||f.replace(u,decodeURIComponent),this.json)try{f=JSON.parse(f)}catch(e){}if(e===p){o=f;break}e||(o[p]=f)}catch(e){}}return o}}return a.set=a,a.get=function(e){return a.call(a,e)},a.getJSON=function(){return a.apply({json:!0},[].slice.call(arguments))},a.defaults={},a.remove=function(e,i){a(e,"",t(i,{expires:-1}))},a.withConverter=e,a}var t=function(){for(var e=0,t={};e<arguments.length;e++){var i=arguments[e];for(var a in i)t[a]=i[a]}return t};return e(function(){})})},{}],29:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function r(e,t,i){var a=(0,l.findMediaElement)(t),r=n(a,3),o=r[0],c=r[1],f=r[2],p=e.log,h=e.utils.getComputedStyle,m=e.utils.secondsToMs;return o?"video"!==f&&"audio"!==f?p.error("The element of `"+c+"` was not a media element."):(i=i||{},i.data=(0,s.default)({player_software:"HTML5 Video Element",player_mux_plugin_name:"VideoElementMonitor",player_mux_plugin_version:"2.0.40"},i.data),i.getPlayheadTime=function(){return m(o.currentTime)},i.getStateData=function(){return{player_is_paused:o.paused,player_playhead_time:m(o.currentTime),player_width:parseInt(h(o,"width")),player_height:parseInt(h(o,"height")),player_autoplay_on:o.autoplay,player_preload_on:o.preload,video_poster_url:o.poster,video_source_url:o.currentSrc,video_source_duration:m(o.duration),video_source_height:o.videoHeight,video_source_width:o.videoWidth}},o.mux=o.mux||{},o.mux.swapElement=function(t){var i=(0,l.findMediaElement)(t),a=n(i,3),r=a[0],u=a[1],d=a[2];return r?"video"!==d&&"audio"!==d?e.log.error("The element of `"+u+"` was not a media element."):(r.muxId=o.muxId,delete o.muxId,r.mux=r.mux||{},r.mux.listeners=(0,s.default)({},o.mux.listeners),delete o.mux.listeners,Object.keys(r.mux.listeners).forEach(function(e){o.removeEventListener(e,r.mux.listeners[e],!1),r.addEventListener(e,r.mux.listeners[e],!1)}),r.mux.swapElement=o.mux.swapElement,delete o.mux.swapElement,void(o=r)):e.log.error("No element was found with the `"+u+"` query selector.")},e.init(c,i),e.emit(c,"playerready"),o.paused||(e.emit(c,"play"),o.readyState>2&&e.emit(c,"playing")),o.mux.listeners={},void u.forEach(function(t){o.mux.listeners[t]=function(){var i={};"error"===t&&(i.player_error_code=o.error&&o.error.code,i.player_error_message=o.error&&d[o.error.code]),e.emit(c,t,i)},o.addEventListener(t,o.mux.listeners[t],!1)})):p.error("No element was found with the `"+c+"` query selector.")}Object.defineProperty(i,"__esModule",{value:!0});var n=function(){function e(e,t){var i=[],a=!0,r=!1,n=void 0;try{for(var o,s=e[Symbol.iterator]();!(a=(o=s.next()).done)&&(i.push(o.value),!t||i.length!==t);a=!0);}catch(e){r=!0,n=e}finally{try{!a&&s.return&&s.return()}finally{if(r)throw n}}return i}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();i.default=r;var o=e("lodash.assign"),s=a(o),l=e("./utils/element-helpers.js"),u=["loadstart","pause","play","playing","seeking","seeked","timeupdate","ratechange","stalled","waiting","error","ended"],d={1:"MEDIA_ERR_ABORTED",2:"MEDIA_ERR_NETWORK",3:"MEDIA_ERR_DECODE",4:"MEDIA_ERR_SRC_NOT_SUPPORTED"}},{"./utils/element-helpers.js":18,"lodash.assign":33}],30:[function(e,t,i){},{}],31:[function(e,t,i){(function(i){var a="undefined"!=typeof i?i:"undefined"!=typeof window?window:{},r=e("min-document");if("undefined"!=typeof document)t.exports=document;else{var n=a["__GLOBAL_DOCUMENT_CACHE@4"];n||(n=a["__GLOBAL_DOCUMENT_CACHE@4"]=r),t.exports=n}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"min-document":30}],32:[function(e,t,i){(function(e){"undefined"!=typeof window?t.exports=window:"undefined"!=typeof e?t.exports=e:"undefined"!=typeof self?t.exports=self:t.exports={}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],33:[function(e,t,i){function a(e,t,i){switch(i.length){case 0:return e.call(t);case 1:return e.call(t,i[0]);case 2:return e.call(t,i[0],i[1]);case 3:return e.call(t,i[0],i[1],i[2])}return e.apply(t,i)}function r(e){return function(t){return null==t?void 0:t[e]}}function n(e,t){for(var i=-1,a=Array(e);++i<e;)a[i]=t(i);return a}function o(e,t){return function(i){return e(t(i))}}function s(e,t,i){var a=e[t];D.call(e,t)&&y(a,i)&&(void 0!==i||t in e)||(e[t]=i)}function l(e,t){return null!=e&&(D.call(e,t)||"object"==typeof e&&t in e&&null===U(e))}function u(e,t){return t=B(void 0===t?e.length-1:t,0),function(){for(var i=arguments,r=-1,n=B(i.length-t,0),o=Array(n);++r<n;)o[r]=i[t+r];r=-1;for(var s=Array(t+1);++r<t;)s[r]=i[r];return s[t]=o,a(e,this,s)}}function d(e,t,i,a){i||(i={});for(var r=-1,n=t.length;++r<n;){var o=t[r],l=a?a(i[o],e[o],o,i,e):void 0;s(i,o,void 0===l?e[o]:l)}return i}function c(e){return u(function(t,i){var a=-1,r=i.length,n=r>1?i[r-1]:void 0,o=r>2?i[2]:void 0;for(n=e.length>3&&"function"==typeof n?(r--,n):void 0,o&&h(i[0],i[1],o)&&(n=r<3?void 0:n,r=1),t=Object(t);++a<r;){var s=i[a];s&&e(t,s,a,n)}return t})}function f(e){var t=e?e.length:void 0;return w(t)&&(G(e)||T(e)||_(e))?n(t,String):null}function p(e,t){return t=null==t?j:t,!!t&&("number"==typeof e||I.test(e))&&e>-1&&e%1==0&&e<t}function h(e,t,i){if(!x(i))return!1;var a=typeof t;return!!("number"==a?b(i)&&p(t,i.length):"string"==a&&t in i)&&y(i[t],e)}function m(e){var t=e&&e.constructor,i="function"==typeof t&&t.prototype||A;return e===i}function y(e,t){return e===t||e!==e&&t!==t}function _(e){return v(e)&&D.call(e,"callee")&&(!C.call(e,"callee")||R.call(e)==O)}function b(e){return null!=e&&w(F(e))&&!g(e)}function v(e){return k(e)&&b(e)}function g(e){var t=x(e)?R.call(e):"";return t==P||t==E}function w(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=j}function x(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function k(e){return!!e&&"object"==typeof e}function T(e){return"string"==typeof e||!G(e)&&k(e)&&R.call(e)==M}function S(e){var t=m(e);if(!t&&!b(e))return W(e);var i=f(e),a=!!i,r=i||[],n=r.length;for(var o in e)!l(e,o)||a&&("length"==o||p(o,n))||t&&"constructor"==o||r.push(o);return r}var j=9007199254740991,O="[object Arguments]",P="[object Function]",E="[object GeneratorFunction]",M="[object String]",I=/^(?:0|[1-9]\d*)$/,A=Object.prototype,D=A.hasOwnProperty,R=A.toString,C=A.propertyIsEnumerable,N=Object.getPrototypeOf,L=Object.keys,B=Math.max,H=!C.call({valueOf:1},"valueOf"),W=o(L,Object),F=r("length"),U=o(N,Object),G=Array.isArray,V=c(function(e,t){if(H||m(t)||b(t))return void d(t,S(t),e);for(var i in t)D.call(t,i)&&s(e,i,t[i])});t.exports=V},{}],34:[function(t,i,a){!function(t,a){"use strict";"function"==typeof e&&e.amd?e(a):"object"==typeof i&&i.exports?i.exports=a():t.log=a()}(this,function(){"use strict";function e(e){return typeof console!==s&&(void 0!==console[e]?t(console,e):void 0!==console.log?t(console,"log"):o)}function t(e,t){var i=e[t];if("function"==typeof i.bind)return i.bind(e);try{return Function.prototype.bind.call(i,e)}catch(t){return function(){return Function.prototype.apply.apply(i,[e,arguments])}}}function i(e,t,i){return function(){typeof console!==s&&(a.call(this,t,i),this[e].apply(this,arguments))}}function a(e,t){for(var i=0;i<l.length;i++){var a=l[i];this[a]=i<e?o:this.methodFactory(a,e,t)}}function r(t,a,r){return e(t)||i.apply(this,arguments)}function n(e,t,i){function n(e){var t=(l[e]||"silent").toUpperCase();try{return void(window.localStorage[c]=t)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"="+t+";"}catch(e){}}function o(){var e;try{e=window.localStorage[c]}catch(e){}if(typeof e===s)try{var t=window.document.cookie,i=t.indexOf(encodeURIComponent(c)+"=");i&&(e=/^([^;]+)/.exec(t.slice(i))[1])}catch(e){}return void 0===d.levels[e]&&(e=void 0),e}var u,d=this,c="loglevel";e&&(c+=":"+e),d.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},d.methodFactory=i||r,d.getLevel=function(){return u},d.setLevel=function(t,i){if("string"==typeof t&&void 0!==d.levels[t.toUpperCase()]&&(t=d.levels[t.toUpperCase()]),!("number"==typeof t&&t>=0&&t<=d.levels.SILENT))throw"log.setLevel() called with invalid level: "+t;if(u=t,i!==!1&&n(t),a.call(d,t,e),typeof console===s&&t<d.levels.SILENT)return"No console available for logging"},d.setDefaultLevel=function(e){o()||d.setLevel(e,!1)},d.enableAll=function(e){d.setLevel(d.levels.TRACE,e)},d.disableAll=function(e){d.setLevel(d.levels.SILENT,e)};var f=o();null==f&&(f=null==t?"WARN":t),d.setLevel(f,!1)}var o=function(){},s="undefined",l=["trace","debug","info","warn","error"],u=new n,d={};u.getLogger=function(e){if("string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=d[e];return t||(t=d[e]=new n(e,u.getLevel(),u.methodFactory)),t};var c=typeof window!==s?window.log:void 0;return u.noConflict=function(){return typeof window!==s&&window.log===u&&(window.log=c),u},u})},{}],35:[function(t,i,a){(function(t){(function(){"use strict";function r(e){return e=String(e),e.charAt(0).toUpperCase()+e.slice(1)}function n(e,t,i){var a={"10.0":"10",6.4:"10 Technical Preview",6.3:"8.1",6.2:"8",6.1:"7 / Server 2008 R2","6.0":"Vista / Server 2008",5.2:"XP 64-bit / Server 2003",5.1:"XP",5.01:"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return t&&i&&/^Win/i.test(e)&&!/^Windows Phone /i.test(e)&&(a=a[/[\d.]+$/.exec(e)])&&(e="Windows "+a),e=String(e),t&&i&&(e=e.replace(RegExp(t,"i"),i)),e=s(e.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0])}function o(e,t){var i=-1,a=e?e.length:0;if("number"==typeof a&&a>-1&&a<=w)for(;++i<a;)t(e[i],i,e);else l(e,t)}function s(e){return e=p(e),/^(?:webOS|i(?:OS|P))/.test(e)?e:r(e)}function l(e,t){for(var i in e)S.call(e,i)&&t(e[i],i,e)}function u(e){return null==e?r(e):j.call(e).slice(8,-1)}function d(e,t){var i=null!=e?typeof e[t]:"number";return!(/^(?:boolean|number|string|undefined)$/.test(i)||"object"==i&&!e[t])}function c(e){return String(e).replace(/([ -])(?!$)/g,"$1?")}function f(e,t){var i=null;return o(e,function(a,r){i=t(i,a,r,e)}),i}function p(e){return String(e).replace(/^ +| +$/g,"")}function h(e){function t(t){return f(t,function(t,i){return t||RegExp("\\b"+(i.pattern||c(i))+"\\b","i").exec(e)&&(i.label||i)})}function i(t){return f(t,function(t,i,a){return t||(i[z]||i[/^[a-z]+(?: +[a-z]+\b)*/i.exec(z)]||RegExp("\\b"+c(a)+"(?:\\b|\\w*\\d)","i").exec(e))&&a})}function a(t){return f(t,function(t,i){return t||RegExp("\\b"+(i.pattern||c(i))+"\\b","i").exec(e)&&(i.label||i)})}function r(t){return f(t,function(t,i){var a=i.pattern||c(i);return!t&&(t=RegExp("\\b"+a+"(?:/[\\d.]+|[ \\w.]*)","i").exec(e))&&(t=n(t,a,i.label||i)),t})}function o(t){return f(t,function(t,i){var a=i.pattern||c(i);return!t&&(t=RegExp("\\b"+a+" *\\d+[.\\w_]*","i").exec(e)||RegExp("\\b"+a+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(e))&&((t=String(i.label&&!RegExp(a,"i").test(i.label)?i.label:t).split("/"))[1]&&!/[\d.]+/.test(t[0])&&(t[0]+=" "+t[1]),i=i.label||i,t=s(t[0].replace(RegExp(a,"i"),i).replace(RegExp("; *(?:"+i+"[_-])?","i")," ").replace(RegExp("("+i+")[-_.]?(\\w)","i"),"$1 $2"))),t})}function m(t){return f(t,function(t,i){return t||(RegExp(i+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(e)||0)[1]||null})}function b(){return this.description||""}var v=y,g=e&&"object"==typeof e&&"String"!=u(e);g&&(v=e,e=null);var w=v.navigator||{},T=w.userAgent||"";e||(e=T);var S,O,P=g||k==_,E=g?!!w.likeChrome:/\bChrome\b/.test(e)&&!/internal|\n/i.test(j.toString()),M="Object",I=g?M:"ScriptBridgingProxyObject",A=g?M:"Environment",D=g&&v.java?"JavaPackage":u(v.java),R=g?M:"RuntimeObject",C=/\bJava/.test(D)&&v.java,N=C&&u(v.environment)==A,L=C?"a":"α",B=C?"b":"β",H=v.document||{},W=v.operamini||v.opera,F=x.test(F=g&&W?W["[[Class]]"]:u(W))?F:W=null,U=e,G=[],V=null,$=e==T,q=$&&W&&"function"==typeof W.version&&W.version(),K=t([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),X=a(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"Edge"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt","SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","WebPositive","Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chrome",{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),z=o([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation 3","PlayStation 4","PlayStation Vita","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),J=i({Apple:{iPad:1,iPhone:1,iPod:1},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{"PlayStation 4":1,"PlayStation 3":1,"PlayStation Vita":1}}),Y=r(["Windows Phone","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian","Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);if(K&&(K=[K]),J&&!z&&(z=o([J])),(S=/\bGoogle TV\b/.exec(z))&&(z=S[0]),/\bSimulator\b/i.test(e)&&(z=(z?z+" ":"")+"Simulator"),"Opera Mini"==X&&/\bOPiOS\b/.test(e)&&G.push("running in Turbo/Uncompressed mode"),"IE"==X&&/\blike iPhone OS\b/.test(e)?(S=h(e.replace(/like iPhone OS/,"")),J=S.manufacturer,z=S.product):/^iP/.test(z)?(X||(X="Safari"),Y="iOS"+((S=/ OS ([\d_]+)/i.exec(e))?" "+S[1].replace(/_/g,"."):"")):"Konqueror"!=X||/buntu/i.test(Y)?J&&"Google"!=J&&(/Chrome/.test(X)&&!/\bMobile Safari\b/i.test(e)||/\bVita\b/.test(z))||/\bAndroid\b/.test(Y)&&/^Chrome/.test(X)&&/\bVersion\//i.test(e)?(X="Android Browser",Y=/\bAndroid\b/.test(Y)?Y:"Android"):"Silk"==X?(/\bMobi/i.test(e)||(Y="Android",G.unshift("desktop mode")),/Accelerated *= *true/i.test(e)&&G.unshift("accelerated")):"PaleMoon"==X&&(S=/\bFirefox\/([\d.]+)\b/.exec(e))?G.push("identifying as Firefox "+S[1]):"Firefox"==X&&(S=/\b(Mobile|Tablet|TV)\b/i.exec(e))?(Y||(Y="Firefox OS"),z||(z=S[1])):X&&!(S=!/\bMinefield\b/i.test(e)&&/\b(?:Firefox|Safari)\b/.exec(X))||(X&&!z&&/[\/,]|^[^(]+?\)/.test(e.slice(e.indexOf(S+"/")+8))&&(X=null),(S=z||J||Y)&&(z||J||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(Y))&&(X=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(Y)?Y:S)+" Browser")):Y="Kubuntu",q||(q=m(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|Silk(?!/[\\d.]+$))","Version",c(X),"(?:Firefox|Minefield|NetFront)"])),(S="iCab"==K&&parseFloat(q)>3&&"WebKit"||/\bOpera\b/.test(X)&&(/\bOPR\b/.test(e)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(e)&&!/^(?:Trident|EdgeHTML)$/.test(K)&&"WebKit"||!K&&/\bMSIE\b/i.test(e)&&("Mac OS"==Y?"Tasman":"Trident")||"WebKit"==K&&/\bPlayStation\b(?! Vita\b)/i.test(X)&&"NetFront")&&(K=[S]),"IE"==X&&(S=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(e)||0)[1])?(X+=" Mobile",Y="Windows Phone "+(/\+$/.test(S)?S:S+".x"),G.unshift("desktop mode")):/\bWPDesktop\b/i.test(e)?(X="IE Mobile",Y="Windows Phone 8.x",G.unshift("desktop mode"),q||(q=(/\brv:([\d.]+)/.exec(e)||0)[1])):"IE"!=X&&"Trident"==K&&(S=/\brv:([\d.]+)/.exec(e))&&(X&&G.push("identifying as "+X+(q?" "+q:"")),X="IE",q=S[1]),$){if(d(v,"global"))if(C&&(S=C.lang.System,U=S.getProperty("os.arch"),Y=Y||S.getProperty("os.name")+" "+S.getProperty("os.version")),P&&d(v,"system")&&(S=[v.system])[0]){Y||(Y=S[0].os||null);try{S[1]=v.require("ringo/engine").version,q=S[1].join("."),X="RingoJS"}catch(e){S[0].global.system==v.system&&(X="Narwhal")}}else"object"==typeof v.process&&!v.process.browser&&(S=v.process)?(X="Node.js",U=S.arch,Y=S.platform,q=/[\d.]+/.exec(S.version)[0]):N&&(X="Rhino");else u(S=v.runtime)==I?(X="Adobe AIR",Y=S.flash.system.Capabilities.os):u(S=v.phantom)==R?(X="PhantomJS",q=(S=S.version||null)&&S.major+"."+S.minor+"."+S.patch):"number"==typeof H.documentMode&&(S=/\bTrident\/(\d+)/i.exec(e))&&(q=[q,H.documentMode],(S=+S[1]+4)!=q[1]&&(G.push("IE "+q[1]+" mode"),K&&(K[1]=""),q[1]=S),q="IE"==X?String(q[1].toFixed(1)):q[0]);Y=Y&&s(Y)}q&&(S=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(q)||/(?:alpha|beta)(?: ?\d)?/i.exec(e+";"+($&&w.appMinorVersion))||/\bMinefield\b/i.test(e)&&"a")&&(V=/b/i.test(S)?"beta":"alpha",q=q.replace(RegExp(S+"\\+?$"),"")+("beta"==V?B:L)+(/\d+\+?/.exec(S)||"")),"Fennec"==X||"Firefox"==X&&/\b(?:Android|Firefox OS)\b/.test(Y)?X="Firefox Mobile":"Maxthon"==X&&q?q=q.replace(/\.[\d.]+/,".x"):/\bXbox\b/i.test(z)?(Y=null,"Xbox 360"==z&&/\bIEMobile\b/.test(e)&&G.unshift("mobile mode")):!/^(?:Chrome|IE|Opera)$/.test(X)&&(!X||z||/Browser|Mobi/.test(X))||"Windows CE"!=Y&&!/Mobi/i.test(e)?"IE"==X&&$&&null===v.external?G.unshift("platform preview"):(/\bBlackBerry\b/.test(z)||/\bBB10\b/.test(e))&&(S=(RegExp(z.replace(/ +/g," *")+"/([.\\d]+)","i").exec(e)||0)[1]||q)?(S=[S,/BB10/.test(e)],Y=(S[1]?(z=null,J="BlackBerry"):"Device Software")+" "+S[0],q=null):this!=l&&"Wii"!=z&&($&&W||/Opera/.test(X)&&/\b(?:MSIE|Firefox)\b/i.test(e)||"Firefox"==X&&/\bOS X (?:\d+\.){2,}/.test(Y)||"IE"==X&&(Y&&!/^Win/.test(Y)&&q>5.5||/\bWindows XP\b/.test(Y)&&q>8||8==q&&!/\bTrident\b/.test(e)))&&!x.test(S=h.call(l,e.replace(x,"")+";"))&&S.name&&(S="ing as "+S.name+((S=S.version)?" "+S:""),x.test(X)?(/\bIE\b/.test(S)&&"Mac OS"==Y&&(Y=null),S="identify"+S):(S="mask"+S,X=F?s(F.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(S)&&(Y=null),$||(q=null)),K=["Presto"],G.push(S)):X+=" Mobile",(S=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(e)||0)[1])&&(S=[parseFloat(S.replace(/\.(\d)$/,".0$1")),S],"Safari"==X&&"+"==S[1].slice(-1)?(X="WebKit Nightly",V="alpha",q=S[1].slice(0,-1)):q!=S[1]&&q!=(S[2]=(/\bSafari\/([\d.]+\+?)/i.exec(e)||0)[1])||(q=null),S[1]=(/\bChrome\/([\d.]+)/i.exec(e)||0)[1],537.36==S[0]&&537.36==S[2]&&parseFloat(S[1])>=28&&"WebKit"==K&&(K=["Blink"]),$&&(E||S[1])?(K&&(K[1]="like Chrome"),S=S[1]||(S=S[0],S<530?1:S<532?2:S<532.05?3:S<533?4:S<534.03?5:S<534.07?6:S<534.1?7:S<534.13?8:S<534.16?9:S<534.24?10:S<534.3?11:S<535.01?12:S<535.02?"13+":S<535.07?15:S<535.11?16:S<535.19?17:S<536.05?18:S<536.1?19:S<537.01?20:S<537.11?"21+":S<537.13?23:S<537.18?24:S<537.24?25:S<537.36?26:"Blink"!=K?"27":"28")):(K&&(K[1]="like Safari"),S=S[0],S=S<400?1:S<500?2:S<526?3:S<533?4:S<534?"4+":S<535?5:S<537?6:S<538?7:S<601?8:"8"),K&&(K[1]+=" "+(S+="number"==typeof S?".x":/[.+]/.test(S)?"":"+")),"Safari"==X&&(!q||parseInt(q)>45)&&(q=S)),"Opera"==X&&(S=/\bzbov|zvav$/.exec(Y))?(X+=" ",G.unshift("desktop mode"),"zvav"==S?(X+="Mini",q=null):X+="Mobile",Y=Y.replace(RegExp(" *"+S+"$"),"")):"Safari"==X&&/\bChrome\b/.exec(K&&K[1])&&(G.unshift("desktop mode"),X="Chrome Mobile",q=null,/\bOS X\b/.test(Y)?(J="Apple",Y="iOS 4.3+"):Y=null),q&&0==q.indexOf(S=/[\d.]+$/.exec(Y))&&e.indexOf("/"+S+"-")>-1&&(Y=p(Y.replace(S,""))),K&&!/\b(?:Avant|Nook)\b/.test(X)&&(/Browser|Lunascape|Maxthon/.test(X)||"Safari"!=X&&/^iOS/.test(Y)&&/\bSafari\b/.test(K[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Sleipnir|Web)/.test(X)&&K[1])&&(S=K[K.length-1])&&G.push(S),G.length&&(G=["("+G.join("; ")+")"]),J&&z&&z.indexOf(J)<0&&G.push("on "+J),z&&G.push((/^on /.test(G[G.length-1])?"":"on ")+z),Y&&(S=/ ([\d.+]+)$/.exec(Y)||(O=/^[a-z]+ ([\d.+]+) \//i.exec(Y)),Y={architecture:32,family:S&&!O?Y.replace(S[0],""):Y,version:S?S[1]:null,toString:function(){var e=this.version;return this.family+(e&&!O?" "+e:"")+(64==this.architecture?" 64-bit":"")}}),(S=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(U))&&!/\bi686\b/i.test(U)?(Y&&(Y.architecture=64,Y.family=Y.family.replace(RegExp(" *"+S),"")),X&&(/\bWOW64\b/i.test(e)||$&&/\w(?:86|32)$/.test(w.cpuClass||w.platform)&&!/\bWin64; x64\b/i.test(e))&&G.unshift("32-bit")):Y&&/^OS X/.test(Y.family)&&"Chrome"==X&&parseFloat(q)>=39&&(Y.architecture=64),e||(e=null);var Z={};return Z.description=e,Z.layout=K&&K[0],Z.manufacturer=J,Z.name=X,Z.prerelease=V,Z.product=z,Z.ua=e,Z.version=X&&q,Z.os=Y||{architecture:null,family:null,version:null,toString:function(){return"null"}},Z.parse=h,Z.toString=b,Z.version&&G.unshift(q),Z.name&&G.unshift(X),Y&&X&&(Y!=String(Y).split(" ")[0]||Y!=X.split(" ")[0]&&!z)&&G.push(z?"("+Y+")":"on "+Y),G.length&&(Z.description=G.join(" ")),Z}var m={function:!0,object:!0},y=m[typeof window]&&window||this,_=y,b=m[typeof a]&&a,v=m[typeof i]&&i&&!i.nodeType&&i,g=b&&v&&"object"==typeof t&&t;!g||g.global!==g&&g.window!==g&&g.self!==g||(y=g);var w=Math.pow(2,53)-1,x=/\bOpera/,k=this,T=Object.prototype,S=T.hasOwnProperty,j=T.toString,O=h();"function"==typeof e&&"object"==typeof e.amd&&e.amd?(y.platform=O,e(function(){return O})):b&&v?l(O,function(e,t){b[t]=e}):y.platform=O}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],36:[function(e,t,i){"use strict";var a=e("./stringify"),r=e("./parse");t.exports={stringify:a,parse:r}},{"./parse":37,"./stringify":38}],37:[function(e,t,i){"use strict";var a=e("./utils"),r=Object.prototype.hasOwnProperty,n={delimiter:"&",depth:5,arrayLimit:20,parameterLimit:1e3,strictNullHandling:!1,plainObjects:!1,allowPrototypes:!1,allowDots:!1,decoder:a.decode},o=function(e,t){for(var i={},a=e.split(t.delimiter,t.parameterLimit===1/0?void 0:t.parameterLimit),n=0;n<a.length;++n){var o,s,l=a[n],u=l.indexOf("]=")===-1?l.indexOf("="):l.indexOf("]=")+1;u===-1?(o=t.decoder(l),s=t.strictNullHandling?null:""):(o=t.decoder(l.slice(0,u)),s=t.decoder(l.slice(u+1))),r.call(i,o)?i[o]=[].concat(i[o]).concat(s):i[o]=s}return i},s=function e(t,i,a){if(!t.length)return i;var r,n=t.shift();if("[]"===n)r=[],r=r.concat(e(t,i,a));else{r=a.plainObjects?Object.create(null):{};var o="["===n[0]&&"]"===n[n.length-1]?n.slice(1,n.length-1):n,s=parseInt(o,10);!isNaN(s)&&n!==o&&String(s)===o&&s>=0&&a.parseArrays&&s<=a.arrayLimit?(r=[],r[s]=e(t,i,a)):r[o]=e(t,i,a)}return r},l=function(e,t,i){if(e){var a=i.allowDots?e.replace(/\.([^\.\[]+)/g,"[$1]"):e,n=/^([^\[\]]*)/,o=/(\[[^\[\]]*\])/g,l=n.exec(a),u=[];if(l[1]){if(!i.plainObjects&&r.call(Object.prototype,l[1])&&!i.allowPrototypes)return;u.push(l[1])}for(var d=0;null!==(l=o.exec(a))&&d<i.depth;)d+=1,(i.plainObjects||!r.call(Object.prototype,l[1].replace(/\[|\]/g,""))||i.allowPrototypes)&&u.push(l[1]);return l&&u.push("["+a.slice(l.index)+"]"),s(u,t,i)}};t.exports=function(e,t){var i=t||{};if(null!==i.decoder&&void 0!==i.decoder&&"function"!=typeof i.decoder)throw new TypeError("Decoder has to be a function.");if(i.delimiter="string"==typeof i.delimiter||a.isRegExp(i.delimiter)?i.delimiter:n.delimiter,i.depth="number"==typeof i.depth?i.depth:n.depth,i.arrayLimit="number"==typeof i.arrayLimit?i.arrayLimit:n.arrayLimit,i.parseArrays=i.parseArrays!==!1,i.decoder="function"==typeof i.decoder?i.decoder:n.decoder,i.allowDots="boolean"==typeof i.allowDots?i.allowDots:n.allowDots,i.plainObjects="boolean"==typeof i.plainObjects?i.plainObjects:n.plainObjects,i.allowPrototypes="boolean"==typeof i.allowPrototypes?i.allowPrototypes:n.allowPrototypes,i.parameterLimit="number"==typeof i.parameterLimit?i.parameterLimit:n.parameterLimit,i.strictNullHandling="boolean"==typeof i.strictNullHandling?i.strictNullHandling:n.strictNullHandling,""===e||null===e||"undefined"==typeof e)return i.plainObjects?Object.create(null):{};for(var r="string"==typeof e?o(e,i):e,s=i.plainObjects?Object.create(null):{},u=Object.keys(r),d=0;d<u.length;++d){var c=u[d],f=l(c,r[c],i);s=a.merge(s,f,i)}return a.compact(s)}},{"./utils":39}],38:[function(e,t,i){"use strict";var a=e("./utils"),r={brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},n={delimiter:"&",strictNullHandling:!1,skipNulls:!1,encode:!0,encoder:a.encode},o=function e(t,i,r,n,o,s,l,u,d){var c=t;if("function"==typeof l)c=l(i,c);else if(c instanceof Date)c=c.toISOString();else if(null===c){if(n)return s?s(i):i;c=""}if("string"==typeof c||"number"==typeof c||"boolean"==typeof c||a.isBuffer(c))return s?[s(i)+"="+s(c)]:[i+"="+String(c)];var f=[];if("undefined"==typeof c)return f;var p;if(Array.isArray(l))p=l;else{var h=Object.keys(c);p=u?h.sort(u):h}for(var m=0;m<p.length;++m){var y=p[m];o&&null===c[y]||(f=Array.isArray(c)?f.concat(e(c[y],r(i,y),r,n,o,s,l,u,d)):f.concat(e(c[y],i+(d?"."+y:"["+y+"]"),r,n,o,s,l,u,d)))}return f};t.exports=function(e,t){var i,a,s=e,l=t||{},u="undefined"==typeof l.delimiter?n.delimiter:l.delimiter,d="boolean"==typeof l.strictNullHandling?l.strictNullHandling:n.strictNullHandling,c="boolean"==typeof l.skipNulls?l.skipNulls:n.skipNulls,f="boolean"==typeof l.encode?l.encode:n.encode,p=f?"function"==typeof l.encoder?l.encoder:n.encoder:null,h="function"==typeof l.sort?l.sort:null,m="undefined"!=typeof l.allowDots&&l.allowDots;if(null!==l.encoder&&void 0!==l.encoder&&"function"!=typeof l.encoder)throw new TypeError("Encoder has to be a function.");"function"==typeof l.filter?(a=l.filter,s=a("",s)):Array.isArray(l.filter)&&(i=a=l.filter);var y=[];if("object"!=typeof s||null===s)return"";var _;_=l.arrayFormat in r?l.arrayFormat:"indices"in l?l.indices?"indices":"repeat":"indices";var b=r[_];i||(i=Object.keys(s)),h&&i.sort(h);for(var v=0;v<i.length;++v){var g=i[v];c&&null===s[g]||(y=y.concat(o(s[g],g,b,d,c,p,a,h,m)))}return y.join(u)}},{"./utils":39}],39:[function(e,t,i){"use strict";var a=function(){for(var e=new Array(256),t=0;t<256;++t)e[t]="%"+((t<16?"0":"")+t.toString(16)).toUpperCase();return e}();i.arrayToObject=function(e,t){for(var i=t.plainObjects?Object.create(null):{},a=0;a<e.length;++a)"undefined"!=typeof e[a]&&(i[a]=e[a]);return i},i.merge=function(e,t,a){if(!t)return e;if("object"!=typeof t){if(Array.isArray(e))e.push(t);else{if("object"!=typeof e)return[e,t];e[t]=!0}return e}if("object"!=typeof e)return[e].concat(t);var r=e;return Array.isArray(e)&&!Array.isArray(t)&&(r=i.arrayToObject(e,a)),Object.keys(t).reduce(function(e,r){var n=t[r];return Object.prototype.hasOwnProperty.call(e,r)?e[r]=i.merge(e[r],n,a):e[r]=n,e},r)},i.decode=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},i.encode=function(e){if(0===e.length)return e;for(var t="string"==typeof e?e:String(e),i="",r=0;r<t.length;++r){var n=t.charCodeAt(r);45===n||46===n||95===n||126===n||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122?i+=t.charAt(r):n<128?i+=a[n]:n<2048?i+=a[192|n>>6]+a[128|63&n]:n<55296||n>=57344?i+=a[224|n>>12]+a[128|n>>6&63]+a[128|63&n]:(r+=1,n=65536+((1023&n)<<10|1023&t.charCodeAt(r)),i+=a[240|n>>18]+a[128|n>>12&63]+a[128|n>>6&63]+a[128|63&n])}return i},i.compact=function(e,t){if("object"!=typeof e||null===e)return e;var a=t||[],r=a.indexOf(e);if(r!==-1)return a[r];if(a.push(e),Array.isArray(e)){for(var n=[],o=0;o<e.length;++o)e[o]&&"object"==typeof e[o]?n.push(i.compact(e[o],a)):"undefined"!=typeof e[o]&&n.push(e[o]);return n}for(var s=Object.keys(e),l=0;l<s.length;++l){var u=s[l];e[u]=i.compact(e[u],a)}return e},i.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},i.isBuffer=function(e){return null!==e&&"undefined"!=typeof e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}},{}]},{},[15])(15)})}(); |
{ | ||
"name": "mux-embed", | ||
"version": "2.0.39", | ||
"version": "2.0.40", | ||
"author": "Mux, Inc", | ||
@@ -5,0 +5,0 @@ "description": "Mux Javascript SDK and HTML5 Video element monitor", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
63950