text: /**
   * videojs-event-tracking
   * @version 0.0.9
   * @copyright 2018 spodlecki <s.podlecki@gmail.com>
   * @license MIT
   */
  !function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("video.js")):"function"==typeof define&&define.amd?define(["video.js"],t):n.videojsEventTracking=t(n.videojs)}(this,function(n){"use strict";n="default"in n?n.default:n;var t=n.registerPlugin||n.plugin,e=function(n){(function(n){var t=this,e=0,i=null,o=!1,r=function(n){i&&clearTimeout(i),e=0,o=!1};t.on("dispose",r),t.on("loadstart",r),t.on("ended",r),t.on("pause",function(){t.scrubbing()||o||(i=setTimeout(function(){e++,t.trigger("tracking:pause",{pauseCount:e})},300))})}).apply(this,arguments),function(n){var e=this,t=null,i=!1,o=!1,r=!1,u=0,a=!1,s=function(){t&&clearTimeout(t),u=0,a=r=o=i=!1};this.on("dispose",s),this.on("loadstart",s),this.on("ended",s),this.on("pause",function(){r=!1,e.scrubbing()&&(i=!0,t=setTimeout(function(){i=!1},200))}),this.on("waiting",function(){!1===r&&!1===i&&0<e.currentTime()&&(r=new Date,o=+e.currentTime().toFixed(0),a=+e.readyState())}),this.on("timeupdate",function(){var n=+e.currentTime().toFixed(0);if(r&&n!==o){var t=(new Date-r)/1e3;o=r=!1,u++,e.trigger("tracking:buffered",{currentTime:+n,readyState:+a,secondsToLoad:+t.toFixed(3),bufferCount:+u})}})}.apply(this,arguments),function(n){var e=this,i=!1,o=!1,r=!1,u=0,a=0,s=0,t=function(n){r=o=i=!1,s=a=u=0};e.on("dispose",t),e.on("loadstart",t),e.on("tracking:pause",function(){return a++}),e.on("tracking:seek",function(){return s++}),e.on("timeupdate",function(){var n=+e.currentTime().toFixed(0),t={seekCount:s,pauseCount:a,currentTime:n,duration:u};switch(n){case i:i=!1,e.trigger("tracking:first-quarter",t);break;case o:o=!1,e.trigger("tracking:second-quarter",t);break;case r:r=!1,e.trigger("tracking:third-quarter",t)}}),e.on("ended",function(){var n={seekCount:s,pauseCount:a,currentTime:u,duration:u};e.trigger("tracking:fourth-quarter",n)}),e.on("durationchange",function(){if(0<(u=+e.duration().toFixed(0))){var n=(u/4).toFixed(0);o=2*(i=+n),r=3*+n}})}.apply(this,arguments),function(n){var t=this,e=!1,i=0,o=0,r=0,u=function(){e=!1,r=o=i=0};this.on("dispose",u),this.on("loadstart",function(){u(),i=new Date}),this.on("loadeddata",function(){o=new Date,r=(o-i)/1e3}),this.on("playing",function(){e||(e=!0,t.trigger("tracking:firstplay",{secondsToLoad:+r.toFixed(3)}))})}.apply(this,arguments),function(n){var t=this,e=0,i=!0,o=function(){i=!(e=0)};t.on("dispose",o),t.on("loadstart",o),t.on("ended",o),t.on("play",function(){i=!1}),t.on("pause",function(){if(!i&&t.scrubbing()){var n=+t.currentTime().toFixed(0);e++,t.trigger("tracking:seek",{seekCount:+e,seekTo:n})}})}.apply(this,arguments),function(t){if(void 0!==t&&"function"==typeof t.performance){var e=this,i=0,o=0,r=0,u=0,a=0,s=0,c=0,d=[],n=function(){c=s=a=u=r=o=i=0,d=[]},f=function(){var n={pauseCount:o,seekCount:i,bufferCount:r,totalDuration:u,watchedDuration:a,bufferDuration:s,initialLoadTime:c};t.performance.call(e,n)},p=function(){f(),n()};"function"==typeof window.addEventListener&&(window.addEventListener("beforeunload",p),e.on("dispose",function(){window.removeEventListener("beforeunload",p)})),e.on("loadstart",function(){0<u&&f(),n()}),e.on("ended",p),e.on("dispose",p),e.on("timeupdate",function(){var n=+e.currentTime().toFixed(0);d.indexOf(n)<0&&d.push(n),a=d.length}),e.on("loadeddata",function(n,t){u=+e.duration().toFixed(0)}),e.on("tracking:seek",function(n,t){i=t.seekCount}),e.on("tracking:pause",function(n,t){o=t.pauseCount}),e.on("tracking:buffered",function(n,t){r=t.bufferCount,s=+(s+t.secondsToLoad).toFixed(3)}),e.on("tracking:firstplay",function(n,t){c=t.secondsToLoad})}}.apply(this,arguments)};return void 0===(n.getPlugin||n.plugin)("eventTracking")&&t("eventTracking",e),e.VERSION="0.0.9",e});