From 905df9ef9aca0dc514a198ddea4434d90a1b0ed9 Mon Sep 17 00:00:00 2001 From: Pete Cook Date: Fri, 3 Jun 2016 11:18:37 +0100 Subject: [PATCH] 0.7.2 --- CHANGELOG.md | 8 ++++++++ dist/ReactPlayer.js | 4 ++-- dist/ReactPlayer.js.map | 2 +- package.json | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dac3144a..fb4c8caa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file. This projec Generated by [auto-changelog](https://github.com/CookPete/auto-changelog) +#### [v0.7.2](https://github.com/CookPete/react-player/compare/v0.7.1...v0.7.2) +> 3 June 2016 + +* Add m4v and m4a extensions to filePlayer [`#72`](https://github.com/CookPete/react-player/issues/72) +* Fix onDuration being called with null [`#52`](https://github.com/CookPete/react-player/issues/52) +* Add failing onDuration test [`564243e`](https://github.com/CookPete/react-player/commit/564243e19449326eab30c163f9ffb82678fcf502) + + #### [v0.7.1](https://github.com/CookPete/react-player/compare/v0.7.0...v0.7.1) > 1 June 2016 diff --git a/dist/ReactPlayer.js b/dist/ReactPlayer.js index 728b5676..af450c28 100644 --- a/dist/ReactPlayer.js +++ b/dist/ReactPlayer.js @@ -1,3 +1,3 @@ -var ReactPlayer=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;tf;f++)c[f]=arguments[f];return n=r=a(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(c))),r.seekTo=function(e){var t=r.refs.player;t&&t.seekTo(e)},r.progress=function(){if(r.props.url&&r.refs.player){var e={},t=r.refs.player.getFractionLoaded(),n=r.refs.player.getFractionPlayed();null!==t&&t!==r.prevLoaded&&(e.loaded=r.prevLoaded=t),null!==n&&n!==r.prevPlayed&&r.props.playing&&(e.played=r.prevPlayed=n),(e.loaded||e.played)&&r.props.onProgress(e)}r.progressTimeout=setTimeout(r.progress,r.props.progressFrequency)},r.renderPlayer=function(e){var t=e.canPlay(r.props.url),n=r.props,i=n.youtubeConfig,a=n.soundcloudConfig,u=n.vimeoConfig,l=o(n,["youtubeConfig","soundcloudConfig","vimeoConfig"]),c=t?s({},l,{ref:"player"}):{};return p["default"].createElement(e,s({key:e.displayName,youtubeConfig:i,soundcloudConfig:a,vimeoConfig:u},c))},u=n,a(r,u)}return u(t,e),l(t,[{key:"componentDidMount",value:function(){this.progress()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.progressTimeout)}},{key:"shouldComponentUpdate",value:function(e){return this.props.url!==e.url||this.props.playing!==e.playing||this.props.volume!==e.volume}},{key:"render",value:function(){var e={width:this.props.width,height:this.props.height};return p["default"].createElement("div",{style:e,className:this.props.className},d["default"].map(this.renderPlayer))}}],[{key:"canPlay",value:function(e){return d["default"].some(function(t){return t.canPlay(e)})}}]),t}(c.Component);h.displayName="ReactPlayer",h.propTypes=f.propTypes,h.defaultProps=f.defaultProps,t["default"]=h,e.exports=t["default"]},function(e,t){e.exports=React},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;nl;l++)s[l]=arguments[l];return n=i=o(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),i.isReady=!1,i.startOnPlay=!0,i.onPlay=function(){i.startOnPlay&&(i.props.onStart(),i.startOnPlay=!1),i.props.onPlay(),i.setVolume(i.props.volume),i.seekOnReady&&(i.seekTo(i.seekOnReady),i.seekOnReady=null),i.props.onDuration(i.getDuration())},i.onReady=function(){i.isReady=!0,(i.props.playing||i.preloading)&&(i.preloading=!1,i.loadOnReady?(i.load(i.loadOnReady),i.loadOnReady=null):i.play())},i.onEnded=function(){i.props.loop&&i.seekTo(0),i.props.onEnded()},a=n,o(i,a)}return i(t,e),a(t,[{key:"componentDidMount",value:function(){this.props.url&&this.load(this.props.url)}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"componentWillReceiveProps",value:function(e){this.props.url!==e.url&&e.url?(this.seekOnReady=null,this.startOnPlay=!0,this.load(e.url)):this.props.url&&!e.url?(this.stop(),clearTimeout(this.updateTimeout)):!this.props.playing&&e.playing?this.play():this.props.playing&&!e.playing?this.pause():this.props.volume!==e.volume&&this.setVolume(e.volume)}},{key:"shouldComponentUpdate",value:function(e){return this.props.url!==e.url}},{key:"seekTo",value:function(e){var t=this;this.isReady||0===e||(this.seekOnReady=e,setTimeout(function(){t.seekOnReady=null},l))}}]),t}(u.Component);c.propTypes=s.propTypes,c.defaultProps=s.defaultProps,t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;tl;l++)s[l]=arguments[l];return n=r=i(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r.state={image:null},a=n,i(r,a)}return a(t,e),u(t,[{key:"shouldComponentUpdate",value:function(e,n){return s(Object.getPrototypeOf(t.prototype),"shouldComponentUpdate",this).call(this,e,n)||this.state.image!==n.image}},{key:"getSongData",value:function(e){var t=this;return g[e]?Promise.resolve(g[e]):(0,f["default"])(h+"?url="+e+"&client_id="+this.props.soundcloudConfig.clientId).then(function(n){return n.ok?(g[e]=n.json(),g[e]):void t.props.onError(new Error("SoundCloud track could not be resolved"))})}},{key:"load",value:function(e){var t=this;this.stop(),this.getSongData(e).then(function(n){if(e===t.props.url){if(!n.streamable)return void t.props.onError(new Error("SoundCloud track is not streamable"));var r=n.artwork_url||n.user.avatar_url;r&&t.setState({image:r.replace("-large","-t500x500")}),t.player.src=n.stream_url+"?client_id="+t.props.soundcloudConfig.clientId}},this.props.onError)}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.controls,r={display:t?"block":"none",height:"100%",backgroundImage:this.state.image?"url("+this.state.image+")":null,backgroundSize:"cover",backgroundPosition:"center"};return c["default"].createElement("div",{style:r},c["default"].createElement("audio",{ref:"player",type:"audio/mpeg",preload:"auto",style:{width:"100%",height:"100%"},controls:n}))}}],[{key:"canPlay",value:function(e){return v.test(e)}}]),t}(d["default"]);m.displayName="SoundCloud",t["default"]=m,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;tl;l++)s[l]=arguments[l];return n=r=i(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r.onMessage=function(e){if(g.test(e.origin)){r.origin=r.origin||e.origin;var t=JSON.parse(e.data);"ready"===t.event&&(r.postMessage("getDuration"),r.postMessage("addEventListener","playProgress"),r.postMessage("addEventListener","loadProgress"),r.postMessage("addEventListener","play"),r.postMessage("addEventListener","pause"),r.postMessage("addEventListener","finish")),"playProgress"===t.event&&(r.fractionPlayed=t.data.percent),"loadProgress"===t.event&&(r.fractionLoaded=t.data.percent),"play"===t.event&&r.onPlay(),"pause"===t.event&&r.props.onPause(),"finish"===t.event&&r.onEnded(),"getDuration"===t.method&&(r.duration=t.value,r.onReady())}},r.postMessage=function(e,t){if(r.origin){var n=JSON.stringify({method:e,value:t});return r.iframe.contentWindow&&r.iframe.contentWindow.postMessage(n,r.origin)}},a=n,i(r,a)}return a(t,e),s(t,[{key:"componentDidMount",value:function(){window.addEventListener("message",this.onMessage,!1),this.iframe=this.refs.iframe,!this.props.url&&this.props.vimeoConfig.preload&&(this.preloading=!0,this.load(m)),l(Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this)}},{key:"getIframeParams",value:function(){return u({},b,this.props.vimeoConfig.iframeParams)}},{key:"load",value:function(e){var t=e.match(v)[3];this.iframe.src=h+t+"?"+(0,f.stringify)(this.getIframeParams())}},{key:"play",value:function(){this.postMessage("play")}},{key:"pause",value:function(){this.postMessage("pause")}},{key:"stop",value:function(){this.iframe.src=""}},{key:"seekTo",value:function(e){l(Object.getPrototypeOf(t.prototype),"seekTo",this).call(this,e),this.postMessage("seekTo",this.duration*e)}},{key:"setVolume",value:function(e){this.postMessage("setVolume",e)}},{key:"getDuration",value:function(){return this.duration}},{key:"getFractionPlayed",value:function(){return this.fractionPlayed||null}},{key:"getFractionLoaded",value:function(){return this.fractionLoaded||null}},{key:"render",value:function(){var e=this.getIframeParams(),t=e.fullscreen,n={display:this.props.url?"block":"none",width:"100%",height:"100%"};return p["default"].createElement("iframe",{ref:"iframe",frameBorder:"0",style:n,allowFullScreen:t})}}],[{key:"canPlay",value:function(e){return v.test(e)}}]),t}(d["default"]);w.displayName="Vimeo",t["default"]=w,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;tl;l++)s[l]=arguments[l];return n=r=i(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r.playerId=P+"-"+k++,r.onStateChange=function(e){var t=e.data,n=window[m].PlayerState,o=n.PLAYING,i=n.PAUSED,a=n.BUFFERING,u=n.ENDED,s=n.CUED;t===o&&r.onPlay(),t===i&&r.props.onPause(),t===a&&r.props.onBuffer(),t===u&&r.onEnded(),t===s&&r.onReady()},a=n,i(r,a)}return a(t,e),s(t,[{key:"componentDidMount",value:function(){!this.props.url&&this.props.youtubeConfig.preload&&(this.preloading=!0,this.load(_)),l(Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this)}},{key:"getSDK",value:function(){return window[m]?Promise.resolve(window[m]):new Promise(function(e,t){var n=window[b];window[b]=function(){n&&n(),e(window[m])},(0,y["default"])(g,function(e){e&&t(e)})})}},{key:"load",value:function(e){var t=this,n=e&&e.match(w)[1];return this.isReady?void this.player.cueVideoById({videoId:n,startSeconds:(0,v.parseStartTime)(e)}):this.loadingSDK?void(this.loadOnReady=e):(this.loadingSDK=!0,void this.getSDK().then(function(r){t.player=new r.Player(t.playerId,{width:"100%",height:"100%",videoId:n,playerVars:u({},O,{controls:t.props.controls?1:0},t.props.youtubeConfig.playerVars,{start:(0,v.parseStartTime)(e),origin:window.location.origin}),events:{onReady:function(){t.loadingSDK=!1,t.onReady()},onStateChange:t.onStateChange,onError:function(e){return t.props.onError(e.data)}}})},this.props.onError))}},{key:"play",value:function(){this.isReady&&this.player.playVideo&&this.player.playVideo()}},{key:"pause",value:function(){this.isReady&&this.player.pauseVideo&&this.player.pauseVideo()}},{key:"stop",value:function(){this.isReady&&this.player.stopVideo&&this.player.stopVideo()}},{key:"seekTo",value:function(e){l(Object.getPrototypeOf(t.prototype),"seekTo",this).call(this,e),this.isReady&&this.player.seekTo&&this.player.seekTo(this.getDuration()*e)}},{key:"setVolume",value:function(e){this.isReady&&this.player.setVolume&&this.player.setVolume(100*e)}},{key:"getDuration",value:function(){return this.isReady&&this.player.getDuration?this.player.getDuration():null}},{key:"getFractionPlayed",value:function(){return this.isReady&&this.getDuration()?this.player.getCurrentTime()/this.getDuration():null}},{key:"getFractionLoaded",value:function(){return this.isReady&&this.player.getVideoLoadedFraction?this.player.getVideoLoadedFraction():null}},{key:"render",value:function(){var e={height:"100%",display:this.props.url?"block":"none"};return p["default"].createElement("div",{style:e},p["default"].createElement("div",{id:this.playerId}))}}],[{key:"canPlay",value:function(e){return w.test(e)}}]),t}(h["default"]);j.displayName="YouTube",t["default"]=j,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),i=r(o),a=n(5),u=r(a),s=n(6),l=r(s),c=n(3),p=r(c);t["default"]=[i["default"],u["default"],l["default"],p["default"]],e.exports=t["default"]},function(e,t){"use strict";function n(e){var t=e.match(i);if(t){var n=t[1];if(n.match(a))return r(n);if(u.test(n))return parseInt(n,10)}return 0}function r(e){for(var t=0,n=a.exec(e);null!==n;){var r=n,i=o(r,3),u=i[1],s=i[2];"h"===s&&(t+=60*parseInt(u,10)*60),"m"===s&&(t+=60*parseInt(u,10)),"s"===s&&(t+=parseInt(u,10)),n=a.exec(e)}return t}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(s){o=!0,i=s}finally{try{!r&&u["return"]&&u["return"]()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.parseStartTime=n;var i=/[\?&#](?:start|t)=([0-9hms]+)/,a=/(\d+)(h|m|s)/g,u=/^\d+$/},function(e,t,n){var r;(function(e,o,i){(function(){"use strict";function a(e){return"function"==typeof e||"object"==typeof e&&null!==e}function u(e){return"function"==typeof e}function s(e){z=e}function l(e){Q=e}function c(){return function(){e.nextTick(h)}}function p(){return function(){q(h)}}function f(){var e=0,t=new ee(h),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function y(){var e=new MessageChannel;return e.port1.onmessage=h,function(){e.port2.postMessage(0)}}function d(){return function(){setTimeout(h,1)}}function h(){for(var e=0;H>e;e+=2){var t=re[e],n=re[e+1];t(n),re[e]=void 0,re[e+1]=void 0}H=0}function v(){try{var e=n(18);return q=e.runOnLoop||e.runOnContext,p()}catch(t){return d()}}function g(e,t){var n=this,r=n._state;if(r===ue&&!e||r===se&&!t)return this;var o=new this.constructor(b),i=n._result;if(r){var a=arguments[r-1];Q(function(){I(r,o,a,i)})}else M(n,o,e,t);return o}function m(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var n=new t(b);return E(n,e),n}function b(){}function w(){return new TypeError("You cannot resolve a promise with itself")}function P(){return new TypeError("A promises callback cannot return that same promise.")}function _(e){try{return e.then}catch(t){return le.error=t,le}}function O(e,t,n,r){try{e.call(t,n,r)}catch(o){return o}}function k(e,t,n){Q(function(e){var r=!1,o=O(n,t,function(n){r||(r=!0,t!==n?E(e,n):S(e,n))},function(t){r||(r=!0,R(e,t))},"Settle: "+(e._label||" unknown promise"));!r&&o&&(r=!0,R(e,o))},e)}function j(e,t){t._state===ue?S(e,t._result):t._state===se?R(e,t._result):M(t,void 0,function(t){E(e,t)},function(t){R(e,t)})}function T(e,t,n){t.constructor===e.constructor&&n===oe&&constructor.resolve===ie?j(e,t):n===le?R(e,le.error):void 0===n?S(e,t):u(n)?k(e,t,n):S(e,t)}function E(e,t){e===t?R(e,w()):a(t)?T(e,t,_(t)):S(e,t)}function C(e){e._onerror&&e._onerror(e._result),x(e)}function S(e,t){e._state===ae&&(e._result=t,e._state=ue,0!==e._subscribers.length&&Q(x,e))}function R(e,t){e._state===ae&&(e._state=se,e._result=t,Q(C,e))}function M(e,t,n,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+ue]=n,o[i+se]=r,0===i&&e._state&&Q(x,e)}function x(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r,o,i=e._result,a=0;aa;a++)M(r.resolve(e[a]),void 0,t,n);return o}function N(e){var t=this,n=new t(b);return R(n,e),n}function U(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function B(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function Y(e){this._id=de++,this._state=void 0,this._result=void 0,this._subscribers=[],b!==e&&("function"!=typeof e&&U(),this instanceof Y?F(this,e):B())}function K(e,t){this._instanceConstructor=e,this.promise=new e(b),Array.isArray(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&S(this.promise,this._result))):R(this.promise,this._validationError())}function W(){var e;if("undefined"!=typeof o)e=o;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=e.Promise;n&&"[object Promise]"===Object.prototype.toString.call(n.resolve())&&!n.cast||(e.Promise=he)}var $;$=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var q,z,G,J=$,H=0,Q=function(e,t){re[H]=e,re[H+1]=t,H+=2,2===H&&(z?z(h):G())},X="undefined"!=typeof window?window:void 0,Z=X||{},ee=Z.MutationObserver||Z.WebKitMutationObserver,te="undefined"!=typeof e&&"[object process]"==={}.toString.call(e),ne="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,re=new Array(1e3);G=te?c():ee?f():ne?y():void 0===X?v():d();var oe=g,ie=m,ae=void 0,ue=1,se=2,le=new A,ce=new A,pe=V,fe=L,ye=N,de=0,he=Y;Y.all=pe,Y.race=fe,Y.resolve=ie,Y.reject=ye,Y._setScheduler=s,Y._setAsap=l,Y._asap=Q,Y.prototype={constructor:Y,then:oe,"catch":function(e){return this.then(null,e)}};var ve=K;K.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},K.prototype._enumerate=function(){for(var e=this.length,t=this._input,n=0;this._state===ae&&e>n;n++)this._eachEntry(t[n],n)},K.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===ie){var o=_(e);if(o===oe&&e._state!==ae)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(n===he){var i=new n(b);T(i,e,o),this._willSettleAt(i,t)}else this._willSettleAt(new n(function(t){t(e)}),t)}else this._willSettleAt(r(e),t)},K.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===ae&&(this._remaining--,e===se?R(r,n):this._result[t]=n),0===this._remaining&&S(r,this._result)},K.prototype._willSettleAt=function(e,t){var n=this;M(e,void 0,function(e){n._settledAt(ue,t,e)},function(e){n._settledAt(se,t,e)})};var ge=W,me={Promise:he,polyfill:ge};n(16).amd?(r=function(){return me}.call(t,n,t,i),!(void 0!==r&&(i.exports=r))):"undefined"!=typeof i&&i.exports?i.exports=me:"undefined"!=typeof this&&(this.ES6Promise=me),ge()}).call(this)}).call(t,n(13),function(){return this}(),n(17)(e))},function(e,t,n){var r,o,i;!function(n,a){o=[t,e],r=a,i="function"==typeof r?r.apply(t,o):r,!(void 0!==i&&(e.exports=i))}(this,function(e,t){"use strict";function n(){return"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random())}function r(e){try{delete window[e]}catch(t){window[e]=void 0}}function o(e){var t=document.getElementById(e);document.getElementsByTagName("head")[0].removeChild(t)}var i={timeout:5e3,jsonpCallback:"callback",jsonpCallbackFunction:null},a=function(e){var t=void 0===arguments[1]?{}:arguments[1],a=null!=t.timeout?t.timeout:i.timeout,u=null!=t.jsonpCallback?t.jsonpCallback:i.jsonpCallback,s=void 0;return new Promise(function(i,l){var c=t.jsonpCallbackFunction||n();window[c]=function(e){i({ok:!0,json:function(){return Promise.resolve(e)}}),s&&clearTimeout(s),o(u+"_"+c),r(c)},e+=-1===e.indexOf("?")?"?":"&";var p=document.createElement("script");p.setAttribute("src",e+u+"="+c),p.id=u+"_"+c,document.getElementsByTagName("head")[0].appendChild(p),s=setTimeout(function(){l(new Error("JSONP request to "+e+" timed out")),r(c),o(u+"_"+c)},a)})};t.exports=a})},function(e,t){function n(e,t){for(var n in t)e.setAttribute(n,t[n])}function r(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function o(e,t){e.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||(this.onreadystatechange=null,t(null,e))}}e.exports=function(e,t,i){var a=document.head||document.getElementsByTagName("head")[0],u=document.createElement("script");"function"==typeof t&&(i=t,t={}),t=t||{},i=i||function(){},u.type=t.type||"text/javascript",u.charset=t.charset||"utf8",u.async="async"in t?!!t.async:!0,u.src=e,t.attrs&&n(u,t.attrs),t.text&&(u.text=""+t.text);var s="onload"in u?r:o;s(u,i),u.onload||r(u,i),a.appendChild(u)}},function(e,t){function n(){l=!1,a.length?s=a.concat(s):c=-1,s.length&&r()}function r(){if(!l){var e=setTimeout(n);l=!0;for(var t=s.length;t;){for(a=s,s=[];++c1)for(var n=1;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;tf;f++)c[f]=arguments[f];return n=r=a(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(c))),r.seekTo=function(e){var t=r.refs.player;t&&t.seekTo(e)},r.progress=function(){if(r.props.url&&r.refs.player){var e={},t=r.refs.player.getFractionLoaded(),n=r.refs.player.getFractionPlayed();null!==t&&t!==r.prevLoaded&&(e.loaded=r.prevLoaded=t),null!==n&&n!==r.prevPlayed&&r.props.playing&&(e.played=r.prevPlayed=n),(e.loaded||e.played)&&r.props.onProgress(e)}r.progressTimeout=setTimeout(r.progress,r.props.progressFrequency)},r.renderPlayer=function(e){var t=e.canPlay(r.props.url),n=r.props,i=n.youtubeConfig,a=n.soundcloudConfig,u=n.vimeoConfig,l=o(n,["youtubeConfig","soundcloudConfig","vimeoConfig"]),c=t?s({},l,{ref:"player"}):{};return p["default"].createElement(e,s({key:e.displayName,youtubeConfig:i,soundcloudConfig:a,vimeoConfig:u},c))},u=n,a(r,u)}return u(t,e),l(t,[{key:"componentDidMount",value:function(){this.progress()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.progressTimeout)}},{key:"shouldComponentUpdate",value:function(e){return this.props.url!==e.url||this.props.playing!==e.playing||this.props.volume!==e.volume}},{key:"render",value:function(){var e={width:this.props.width,height:this.props.height};return p["default"].createElement("div",{style:e,className:this.props.className},d["default"].map(this.renderPlayer))}}],[{key:"canPlay",value:function(e){return d["default"].some(function(t){return t.canPlay(e)})}}]),t}(c.Component);h.displayName="ReactPlayer",h.propTypes=f.propTypes,h.defaultProps=f.defaultProps,t["default"]=h,e.exports=t["default"]},function(e,t){e.exports=React},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;nl;l++)s[l]=arguments[l];return n=i=o(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),i.isReady=!1,i.startOnPlay=!0,i.durationOnPlay=!1,i.seekOnPlay=null,i.onPlay=function(){i.startOnPlay&&(i.props.onStart(),i.startOnPlay=!1),i.props.onPlay(),i.setVolume(i.props.volume),i.seekOnPlay&&(i.seekTo(i.seekOnPlay),i.seekOnPlay=null),i.durationOnPlay&&(i.props.onDuration(i.getDuration()),i.durationOnPlay=!1)},i.onReady=function(){i.isReady=!0,(i.props.playing||i.preloading)&&(i.preloading=!1,i.loadOnReady?(i.load(i.loadOnReady),i.loadOnReady=null):i.play());var e=i.getDuration();e?i.props.onDuration(e):i.durationOnPlay=!0},i.onEnded=function(){i.props.loop&&i.seekTo(0),i.props.onEnded()},a=n,o(i,a)}return i(t,e),a(t,[{key:"componentDidMount",value:function(){this.props.url&&this.load(this.props.url)}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"componentWillReceiveProps",value:function(e){this.props.url!==e.url&&e.url?(this.seekOnPlay=null,this.startOnPlay=!0,this.load(e.url)):this.props.url&&!e.url?(this.stop(),clearTimeout(this.updateTimeout)):!this.props.playing&&e.playing?this.play():this.props.playing&&!e.playing?this.pause():this.props.volume!==e.volume&&this.setVolume(e.volume)}},{key:"shouldComponentUpdate",value:function(e){return this.props.url!==e.url}},{key:"seekTo",value:function(e){var t=this;this.isReady||0===e||(this.seekOnPlay=e,setTimeout(function(){t.seekOnPlay=null},l))}}]),t}(u.Component);c.propTypes=s.propTypes,c.defaultProps=s.defaultProps,t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;tl;l++)s[l]=arguments[l];return n=r=i(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r.state={image:null},a=n,i(r,a)}return a(t,e),u(t,[{key:"shouldComponentUpdate",value:function(e,n){return s(Object.getPrototypeOf(t.prototype),"shouldComponentUpdate",this).call(this,e,n)||this.state.image!==n.image}},{key:"getSongData",value:function(e){var t=this;return g[e]?Promise.resolve(g[e]):(0,f["default"])(h+"?url="+e+"&client_id="+this.props.soundcloudConfig.clientId).then(function(n){return n.ok?(g[e]=n.json(),g[e]):void t.props.onError(new Error("SoundCloud track could not be resolved"))})}},{key:"load",value:function(e){var t=this;this.stop(),this.getSongData(e).then(function(n){if(e===t.props.url){if(!n.streamable)return void t.props.onError(new Error("SoundCloud track is not streamable"));var r=n.artwork_url||n.user.avatar_url;r&&t.setState({image:r.replace("-large","-t500x500")}),t.player.src=n.stream_url+"?client_id="+t.props.soundcloudConfig.clientId}},this.props.onError)}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.controls,r={display:t?"block":"none",height:"100%",backgroundImage:this.state.image?"url("+this.state.image+")":null,backgroundSize:"cover",backgroundPosition:"center"};return c["default"].createElement("div",{style:r},c["default"].createElement("audio",{ref:"player",type:"audio/mpeg",preload:"auto",style:{width:"100%",height:"100%"},controls:n}))}}],[{key:"canPlay",value:function(e){return v.test(e)}}]),t}(d["default"]);m.displayName="SoundCloud",t["default"]=m,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;tl;l++)s[l]=arguments[l];return n=r=i(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r.onMessage=function(e){if(g.test(e.origin)){r.origin=r.origin||e.origin;var t=JSON.parse(e.data);"ready"===t.event&&(r.postMessage("getDuration"),r.postMessage("addEventListener","playProgress"),r.postMessage("addEventListener","loadProgress"),r.postMessage("addEventListener","play"),r.postMessage("addEventListener","pause"),r.postMessage("addEventListener","finish")),"playProgress"===t.event&&(r.fractionPlayed=t.data.percent),"loadProgress"===t.event&&(r.fractionLoaded=t.data.percent),"play"===t.event&&r.onPlay(),"pause"===t.event&&r.props.onPause(),"finish"===t.event&&r.onEnded(),"getDuration"===t.method&&(r.duration=t.value,r.onReady())}},r.postMessage=function(e,t){if(r.origin){var n=JSON.stringify({method:e,value:t});return r.iframe.contentWindow&&r.iframe.contentWindow.postMessage(n,r.origin)}},a=n,i(r,a)}return a(t,e),s(t,[{key:"componentDidMount",value:function(){window.addEventListener("message",this.onMessage,!1),this.iframe=this.refs.iframe,!this.props.url&&this.props.vimeoConfig.preload&&(this.preloading=!0,this.load(m)),l(Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this)}},{key:"getIframeParams",value:function(){return u({},b,this.props.vimeoConfig.iframeParams)}},{key:"load",value:function(e){var t=e.match(v)[3];this.iframe.src=h+t+"?"+(0,f.stringify)(this.getIframeParams())}},{key:"play",value:function(){this.postMessage("play")}},{key:"pause",value:function(){this.postMessage("pause")}},{key:"stop",value:function(){this.iframe.src=""}},{key:"seekTo",value:function(e){l(Object.getPrototypeOf(t.prototype),"seekTo",this).call(this,e),this.postMessage("seekTo",this.duration*e)}},{key:"setVolume",value:function(e){this.postMessage("setVolume",e)}},{key:"getDuration",value:function(){return this.duration}},{key:"getFractionPlayed",value:function(){return this.fractionPlayed||null}},{key:"getFractionLoaded",value:function(){return this.fractionLoaded||null}},{key:"render",value:function(){var e=this.getIframeParams(),t=e.fullscreen,n={display:this.props.url?"block":"none",width:"100%",height:"100%"};return p["default"].createElement("iframe",{ref:"iframe",frameBorder:"0",style:n,allowFullScreen:t})}}],[{key:"canPlay",value:function(e){return v.test(e)}}]),t}(d["default"]);P.displayName="Vimeo",t["default"]=P,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;tl;l++)s[l]=arguments[l];return n=r=i(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r.playerId=w+"-"+k++,r.onStateChange=function(e){var t=e.data,n=window[m].PlayerState,o=n.PLAYING,i=n.PAUSED,a=n.BUFFERING,u=n.ENDED,s=n.CUED;t===o&&r.onPlay(),t===i&&r.props.onPause(),t===a&&r.props.onBuffer(),t===u&&r.onEnded(),t===s&&r.onReady()},a=n,i(r,a)}return a(t,e),s(t,[{key:"componentDidMount",value:function(){!this.props.url&&this.props.youtubeConfig.preload&&(this.preloading=!0,this.load(O)),l(Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this)}},{key:"getSDK",value:function(){return window[m]?Promise.resolve(window[m]):new Promise(function(e,t){var n=window[b];window[b]=function(){n&&n(),e(window[m])},(0,y["default"])(g,function(e){e&&t(e)})})}},{key:"load",value:function(e){var t=this,n=e&&e.match(P)[1];return this.isReady?void this.player.cueVideoById({videoId:n,startSeconds:(0,v.parseStartTime)(e)}):this.loadingSDK?void(this.loadOnReady=e):(this.loadingSDK=!0,void this.getSDK().then(function(r){t.player=new r.Player(t.playerId,{width:"100%",height:"100%",videoId:n,playerVars:u({},_,{controls:t.props.controls?1:0},t.props.youtubeConfig.playerVars,{start:(0,v.parseStartTime)(e),origin:window.location.origin}),events:{onReady:function(){t.loadingSDK=!1,t.onReady()},onStateChange:t.onStateChange,onError:function(e){return t.props.onError(e.data)}}})},this.props.onError))}},{key:"play",value:function(){this.isReady&&this.player.playVideo&&this.player.playVideo()}},{key:"pause",value:function(){this.isReady&&this.player.pauseVideo&&this.player.pauseVideo()}},{key:"stop",value:function(){this.isReady&&this.player.stopVideo&&this.player.stopVideo()}},{key:"seekTo",value:function(e){l(Object.getPrototypeOf(t.prototype),"seekTo",this).call(this,e),this.isReady&&this.player.seekTo&&this.player.seekTo(this.getDuration()*e)}},{key:"setVolume",value:function(e){this.isReady&&this.player.setVolume&&this.player.setVolume(100*e)}},{key:"getDuration",value:function(){return this.isReady&&this.player.getDuration?this.player.getDuration():null}},{key:"getFractionPlayed",value:function(){return this.isReady&&this.getDuration()?this.player.getCurrentTime()/this.getDuration():null}},{key:"getFractionLoaded",value:function(){return this.isReady&&this.player.getVideoLoadedFraction?this.player.getVideoLoadedFraction():null}},{key:"render",value:function(){var e={height:"100%",display:this.props.url?"block":"none"};return p["default"].createElement("div",{style:e},p["default"].createElement("div",{id:this.playerId}))}}],[{key:"canPlay",value:function(e){return P.test(e)}}]),t}(h["default"]);j.displayName="YouTube",t["default"]=j,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),i=r(o),a=n(5),u=r(a),s=n(6),l=r(s),c=n(3),p=r(c);t["default"]=[i["default"],u["default"],l["default"],p["default"]],e.exports=t["default"]},function(e,t){"use strict";function n(e){var t=e.match(i);if(t){var n=t[1];if(n.match(a))return r(n);if(u.test(n))return parseInt(n,10)}return 0}function r(e){for(var t=0,n=a.exec(e);null!==n;){var r=n,i=o(r,3),u=i[1],s=i[2];"h"===s&&(t+=60*parseInt(u,10)*60),"m"===s&&(t+=60*parseInt(u,10)),"s"===s&&(t+=parseInt(u,10)),n=a.exec(e)}return t}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(s){o=!0,i=s}finally{try{!r&&u["return"]&&u["return"]()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.parseStartTime=n;var i=/[\?&#](?:start|t)=([0-9hms]+)/,a=/(\d+)(h|m|s)/g,u=/^\d+$/},function(e,t,n){var r;(function(e,o,i){(function(){"use strict";function a(e){return"function"==typeof e||"object"==typeof e&&null!==e}function u(e){return"function"==typeof e}function s(e){z=e}function l(e){Q=e}function c(){return function(){e.nextTick(h)}}function p(){return function(){q(h)}}function f(){var e=0,t=new ee(h),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function y(){var e=new MessageChannel;return e.port1.onmessage=h,function(){e.port2.postMessage(0)}}function d(){return function(){setTimeout(h,1)}}function h(){for(var e=0;H>e;e+=2){var t=re[e],n=re[e+1];t(n),re[e]=void 0,re[e+1]=void 0}H=0}function v(){try{var e=n(18);return q=e.runOnLoop||e.runOnContext,p()}catch(t){return d()}}function g(e,t){var n=this,r=n._state;if(r===ue&&!e||r===se&&!t)return this;var o=new this.constructor(b),i=n._result;if(r){var a=arguments[r-1];Q(function(){I(r,o,a,i)})}else x(n,o,e,t);return o}function m(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var n=new t(b);return E(n,e),n}function b(){}function P(){return new TypeError("You cannot resolve a promise with itself")}function w(){return new TypeError("A promises callback cannot return that same promise.")}function O(e){try{return e.then}catch(t){return le.error=t,le}}function _(e,t,n,r){try{e.call(t,n,r)}catch(o){return o}}function k(e,t,n){Q(function(e){var r=!1,o=_(n,t,function(n){r||(r=!0,t!==n?E(e,n):S(e,n))},function(t){r||(r=!0,M(e,t))},"Settle: "+(e._label||" unknown promise"));!r&&o&&(r=!0,M(e,o))},e)}function j(e,t){t._state===ue?S(e,t._result):t._state===se?M(e,t._result):x(t,void 0,function(t){E(e,t)},function(t){M(e,t)})}function T(e,t,n){t.constructor===e.constructor&&n===oe&&constructor.resolve===ie?j(e,t):n===le?M(e,le.error):void 0===n?S(e,t):u(n)?k(e,t,n):S(e,t)}function E(e,t){e===t?M(e,P()):a(t)?T(e,t,O(t)):S(e,t)}function C(e){e._onerror&&e._onerror(e._result),A(e)}function S(e,t){e._state===ae&&(e._result=t,e._state=ue,0!==e._subscribers.length&&Q(A,e))}function M(e,t){e._state===ae&&(e._state=se,e._result=t,Q(C,e))}function x(e,t,n,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+ue]=n,o[i+se]=r,0===i&&e._state&&Q(A,e)}function A(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r,o,i=e._result,a=0;aa;a++)x(r.resolve(e[a]),void 0,t,n);return o}function N(e){var t=this,n=new t(b);return M(n,e),n}function U(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function B(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function Y(e){this._id=de++,this._state=void 0,this._result=void 0,this._subscribers=[],b!==e&&("function"!=typeof e&&U(),this instanceof Y?F(this,e):B())}function K(e,t){this._instanceConstructor=e,this.promise=new e(b),Array.isArray(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&S(this.promise,this._result))):M(this.promise,this._validationError())}function W(){var e;if("undefined"!=typeof o)e=o;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=e.Promise;n&&"[object Promise]"===Object.prototype.toString.call(n.resolve())&&!n.cast||(e.Promise=he)}var $;$=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var q,z,G,J=$,H=0,Q=function(e,t){re[H]=e,re[H+1]=t,H+=2,2===H&&(z?z(h):G())},X="undefined"!=typeof window?window:void 0,Z=X||{},ee=Z.MutationObserver||Z.WebKitMutationObserver,te="undefined"!=typeof e&&"[object process]"==={}.toString.call(e),ne="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,re=new Array(1e3);G=te?c():ee?f():ne?y():void 0===X?v():d();var oe=g,ie=m,ae=void 0,ue=1,se=2,le=new D,ce=new D,pe=V,fe=L,ye=N,de=0,he=Y;Y.all=pe,Y.race=fe,Y.resolve=ie,Y.reject=ye,Y._setScheduler=s,Y._setAsap=l,Y._asap=Q,Y.prototype={constructor:Y,then:oe,"catch":function(e){return this.then(null,e)}};var ve=K;K.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},K.prototype._enumerate=function(){for(var e=this.length,t=this._input,n=0;this._state===ae&&e>n;n++)this._eachEntry(t[n],n)},K.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===ie){var o=O(e);if(o===oe&&e._state!==ae)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(n===he){var i=new n(b);T(i,e,o),this._willSettleAt(i,t)}else this._willSettleAt(new n(function(t){t(e)}),t)}else this._willSettleAt(r(e),t)},K.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===ae&&(this._remaining--,e===se?M(r,n):this._result[t]=n),0===this._remaining&&S(r,this._result)},K.prototype._willSettleAt=function(e,t){var n=this;x(e,void 0,function(e){n._settledAt(ue,t,e)},function(e){n._settledAt(se,t,e)})};var ge=W,me={Promise:he,polyfill:ge};n(16).amd?(r=function(){return me}.call(t,n,t,i),!(void 0!==r&&(i.exports=r))):"undefined"!=typeof i&&i.exports?i.exports=me:"undefined"!=typeof this&&(this.ES6Promise=me),ge()}).call(this)}).call(t,n(13),function(){return this}(),n(17)(e))},function(e,t,n){var r,o,i;!function(n,a){o=[t,e],r=a,i="function"==typeof r?r.apply(t,o):r,!(void 0!==i&&(e.exports=i))}(this,function(e,t){"use strict";function n(){return"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random())}function r(e){try{delete window[e]}catch(t){window[e]=void 0}}function o(e){var t=document.getElementById(e);document.getElementsByTagName("head")[0].removeChild(t)}var i={timeout:5e3,jsonpCallback:"callback",jsonpCallbackFunction:null},a=function(e){var t=void 0===arguments[1]?{}:arguments[1],a=null!=t.timeout?t.timeout:i.timeout,u=null!=t.jsonpCallback?t.jsonpCallback:i.jsonpCallback,s=void 0;return new Promise(function(i,l){var c=t.jsonpCallbackFunction||n();window[c]=function(e){i({ok:!0,json:function(){return Promise.resolve(e)}}),s&&clearTimeout(s),o(u+"_"+c),r(c)},e+=-1===e.indexOf("?")?"?":"&";var p=document.createElement("script");p.setAttribute("src",e+u+"="+c),p.id=u+"_"+c,document.getElementsByTagName("head")[0].appendChild(p),s=setTimeout(function(){l(new Error("JSONP request to "+e+" timed out")),r(c),o(u+"_"+c)},a)})};t.exports=a})},function(e,t){function n(e,t){for(var n in t)e.setAttribute(n,t[n])}function r(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function o(e,t){e.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||(this.onreadystatechange=null,t(null,e))}}e.exports=function(e,t,i){var a=document.head||document.getElementsByTagName("head")[0],u=document.createElement("script");"function"==typeof t&&(i=t,t={}),t=t||{},i=i||function(){},u.type=t.type||"text/javascript",u.charset=t.charset||"utf8",u.async="async"in t?!!t.async:!0,u.src=e,t.attrs&&n(u,t.attrs),t.text&&(u.text=""+t.text);var s="onload"in u?r:o;s(u,i),u.onload||r(u,i),a.appendChild(u)}},function(e,t){function n(){l=!1,a.length?s=a.concat(s):c=-1,s.length&&r()}function r(){if(!l){var e=setTimeout(n);l=!0;for(var t=s.length;t;){for(a=s,s=[];++c1)for(var n=1;n= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar ReactPlayer = function (_Component) {\n\t _inherits(ReactPlayer, _Component);\n\t\n\t function ReactPlayer() {\n\t var _Object$getPrototypeO;\n\t\n\t var _temp, _this, _ret;\n\t\n\t _classCallCheck(this, ReactPlayer);\n\t\n\t for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n\t args[_key] = arguments[_key];\n\t }\n\t\n\t return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(ReactPlayer)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.seekTo = function (fraction) {\n\t var player = _this.refs.player;\n\t if (player) {\n\t player.seekTo(fraction);\n\t }\n\t }, _this.progress = function () {\n\t if (_this.props.url && _this.refs.player) {\n\t var progress = {};\n\t var loaded = _this.refs.player.getFractionLoaded();\n\t var played = _this.refs.player.getFractionPlayed();\n\t if (loaded !== null && loaded !== _this.prevLoaded) {\n\t progress.loaded = _this.prevLoaded = loaded;\n\t }\n\t if (played !== null && played !== _this.prevPlayed && _this.props.playing) {\n\t progress.played = _this.prevPlayed = played;\n\t }\n\t if (progress.loaded || progress.played) {\n\t _this.props.onProgress(progress);\n\t }\n\t }\n\t _this.progressTimeout = setTimeout(_this.progress, _this.props.progressFrequency);\n\t }, _this.renderPlayer = function (Player) {\n\t var active = Player.canPlay(_this.props.url);\n\t var _this$props = _this.props;\n\t var youtubeConfig = _this$props.youtubeConfig;\n\t var soundcloudConfig = _this$props.soundcloudConfig;\n\t var vimeoConfig = _this$props.vimeoConfig;\n\t\n\t var activeProps = _objectWithoutProperties(_this$props, ['youtubeConfig', 'soundcloudConfig', 'vimeoConfig']);\n\t\n\t var props = active ? _extends({}, activeProps, { ref: 'player' }) : {};\n\t return _react2.default.createElement(Player, _extends({\n\t key: Player.displayName,\n\t youtubeConfig: youtubeConfig,\n\t soundcloudConfig: soundcloudConfig,\n\t vimeoConfig: vimeoConfig\n\t }, props));\n\t }, _temp), _possibleConstructorReturn(_this, _ret);\n\t }\n\t\n\t _createClass(ReactPlayer, [{\n\t key: 'componentDidMount',\n\t value: function componentDidMount() {\n\t this.progress();\n\t }\n\t }, {\n\t key: 'componentWillUnmount',\n\t value: function componentWillUnmount() {\n\t clearTimeout(this.progressTimeout);\n\t }\n\t }, {\n\t key: 'shouldComponentUpdate',\n\t value: function shouldComponentUpdate(nextProps) {\n\t return this.props.url !== nextProps.url || this.props.playing !== nextProps.playing || this.props.volume !== nextProps.volume;\n\t }\n\t }, {\n\t key: 'render',\n\t value: function render() {\n\t var style = {\n\t width: this.props.width,\n\t height: this.props.height\n\t };\n\t return _react2.default.createElement(\n\t 'div',\n\t { style: style, className: this.props.className },\n\t _players2.default.map(this.renderPlayer)\n\t );\n\t }\n\t }], [{\n\t key: 'canPlay',\n\t value: function canPlay(url) {\n\t return _players2.default.some(function (player) {\n\t return player.canPlay(url);\n\t });\n\t }\n\t }]);\n\t\n\t return ReactPlayer;\n\t}(_react.Component);\n\t\n\tReactPlayer.displayName = 'ReactPlayer';\n\tReactPlayer.propTypes = _props.propTypes;\n\tReactPlayer.defaultProps = _props.defaultProps;\n\texports.default = ReactPlayer;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\tmodule.exports = React;\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _react = __webpack_require__(1);\n\t\n\tvar _props = __webpack_require__(4);\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar SEEK_ON_READY_EXPIRY = 5000;\n\t\n\tvar Base = function (_Component) {\n\t _inherits(Base, _Component);\n\t\n\t function Base() {\n\t var _Object$getPrototypeO;\n\t\n\t var _temp, _this, _ret;\n\t\n\t _classCallCheck(this, Base);\n\t\n\t for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n\t args[_key] = arguments[_key];\n\t }\n\t\n\t return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Base)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.isReady = false, _this.startOnPlay = true, _this.onPlay = function () {\n\t if (_this.startOnPlay) {\n\t _this.props.onStart();\n\t _this.startOnPlay = false;\n\t }\n\t _this.props.onPlay();\n\t _this.setVolume(_this.props.volume);\n\t if (_this.seekOnReady) {\n\t _this.seekTo(_this.seekOnReady);\n\t _this.seekOnReady = null;\n\t }\n\t _this.props.onDuration(_this.getDuration());\n\t }, _this.onReady = function () {\n\t _this.isReady = true;\n\t if (_this.props.playing || _this.preloading) {\n\t _this.preloading = false;\n\t if (_this.loadOnReady) {\n\t _this.load(_this.loadOnReady);\n\t _this.loadOnReady = null;\n\t } else {\n\t _this.play();\n\t }\n\t }\n\t }, _this.onEnded = function () {\n\t if (_this.props.loop) {\n\t _this.seekTo(0);\n\t }\n\t _this.props.onEnded();\n\t }, _temp), _possibleConstructorReturn(_this, _ret);\n\t }\n\t\n\t _createClass(Base, [{\n\t key: 'componentDidMount',\n\t value: function componentDidMount() {\n\t if (this.props.url) {\n\t this.load(this.props.url);\n\t }\n\t }\n\t }, {\n\t key: 'componentWillUnmount',\n\t value: function componentWillUnmount() {\n\t this.stop();\n\t }\n\t }, {\n\t key: 'componentWillReceiveProps',\n\t value: function componentWillReceiveProps(nextProps) {\n\t // Invoke player methods based on incoming props\n\t if (this.props.url !== nextProps.url && nextProps.url) {\n\t this.seekOnReady = null;\n\t this.startOnPlay = true;\n\t this.load(nextProps.url);\n\t } else if (this.props.url && !nextProps.url) {\n\t this.stop();\n\t clearTimeout(this.updateTimeout);\n\t } else if (!this.props.playing && nextProps.playing) {\n\t this.play();\n\t } else if (this.props.playing && !nextProps.playing) {\n\t this.pause();\n\t } else if (this.props.volume !== nextProps.volume) {\n\t this.setVolume(nextProps.volume);\n\t }\n\t }\n\t }, {\n\t key: 'shouldComponentUpdate',\n\t value: function shouldComponentUpdate(nextProps) {\n\t return this.props.url !== nextProps.url;\n\t }\n\t }, {\n\t key: 'seekTo',\n\t value: function seekTo(fraction) {\n\t var _this2 = this;\n\t\n\t // When seeking before player is ready, store value and seek later\n\t if (!this.isReady && fraction !== 0) {\n\t this.seekOnReady = fraction;\n\t setTimeout(function () {\n\t _this2.seekOnReady = null;\n\t }, SEEK_ON_READY_EXPIRY);\n\t }\n\t }\n\t }]);\n\t\n\t return Base;\n\t}(_react.Component);\n\t\n\tBase.propTypes = _props.propTypes;\n\tBase.defaultProps = _props.defaultProps;\n\texports.default = Base;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 3 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\t\n\tvar _react = __webpack_require__(1);\n\t\n\tvar _react2 = _interopRequireDefault(_react);\n\t\n\tvar _Base2 = __webpack_require__(2);\n\t\n\tvar _Base3 = _interopRequireDefault(_Base2);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar VIDEO_EXTENSIONS = /\\.(mp4|og[gv]|webm|mov)($|\\?)/i;\n\tvar AUDIO_EXTENSIONS = /\\.(mp3|wav)($|\\?)/i;\n\t\n\tvar FilePlayer = function (_Base) {\n\t _inherits(FilePlayer, _Base);\n\t\n\t function FilePlayer() {\n\t _classCallCheck(this, FilePlayer);\n\t\n\t return _possibleConstructorReturn(this, Object.getPrototypeOf(FilePlayer).apply(this, arguments));\n\t }\n\t\n\t _createClass(FilePlayer, [{\n\t key: 'componentDidMount',\n\t value: function componentDidMount() {\n\t var _this2 = this;\n\t\n\t this.player = this.refs.player;\n\t this.player.oncanplay = this.onReady;\n\t this.player.onplay = this.onPlay;\n\t this.player.onpause = function () {\n\t return _this2.props.onPause();\n\t };\n\t this.player.onended = function () {\n\t return _this2.onEnded();\n\t };\n\t this.player.onerror = function (e) {\n\t return _this2.props.onError(e);\n\t };\n\t this.player.setAttribute('webkit-playsinline', '');\n\t _get(Object.getPrototypeOf(FilePlayer.prototype), 'componentDidMount', this).call(this);\n\t }\n\t }, {\n\t key: 'load',\n\t value: function load(url) {\n\t this.player.src = url;\n\t }\n\t }, {\n\t key: 'play',\n\t value: function play() {\n\t this.player.play();\n\t }\n\t }, {\n\t key: 'pause',\n\t value: function pause() {\n\t this.player.pause();\n\t }\n\t }, {\n\t key: 'stop',\n\t value: function stop() {\n\t this.player.removeAttribute('src');\n\t }\n\t }, {\n\t key: 'seekTo',\n\t value: function seekTo(fraction) {\n\t _get(Object.getPrototypeOf(FilePlayer.prototype), 'seekTo', this).call(this, fraction);\n\t this.player.currentTime = this.getDuration() * fraction;\n\t }\n\t }, {\n\t key: 'setVolume',\n\t value: function setVolume(fraction) {\n\t this.player.volume = fraction;\n\t }\n\t }, {\n\t key: 'getDuration',\n\t value: function getDuration() {\n\t if (!this.isReady) return null;\n\t return this.player.duration;\n\t }\n\t }, {\n\t key: 'getFractionPlayed',\n\t value: function getFractionPlayed() {\n\t if (!this.isReady) return null;\n\t return this.player.currentTime / this.getDuration();\n\t }\n\t }, {\n\t key: 'getFractionLoaded',\n\t value: function getFractionLoaded() {\n\t if (!this.isReady || this.player.buffered.length === 0) return null;\n\t return this.player.buffered.end(0) / this.getDuration();\n\t }\n\t }, {\n\t key: 'render',\n\t value: function render() {\n\t var _props = this.props;\n\t var controls = _props.controls;\n\t var fileConfig = _props.fileConfig;\n\t\n\t var Media = AUDIO_EXTENSIONS.test(this.props.url) ? 'audio' : 'video';\n\t var style = {\n\t width: '100%',\n\t height: '100%',\n\t display: this.props.url ? 'block' : 'none'\n\t };\n\t return _react2.default.createElement(Media, _extends({\n\t ref: 'player',\n\t style: style,\n\t preload: 'auto',\n\t controls: controls\n\t }, fileConfig.attributes));\n\t }\n\t }], [{\n\t key: 'canPlay',\n\t value: function canPlay(url) {\n\t return VIDEO_EXTENSIONS.test(url) || AUDIO_EXTENSIONS.test(url);\n\t }\n\t }]);\n\t\n\t return FilePlayer;\n\t}(_Base3.default);\n\t\n\tFilePlayer.displayName = 'FilePlayer';\n\texports.default = FilePlayer;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 4 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.defaultProps = exports.propTypes = undefined;\n\t\n\tvar _react = __webpack_require__(1);\n\t\n\tvar propTypes = exports.propTypes = {\n\t url: _react.PropTypes.string,\n\t playing: _react.PropTypes.bool,\n\t loop: _react.PropTypes.bool,\n\t controls: _react.PropTypes.bool,\n\t volume: _react.PropTypes.number,\n\t width: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),\n\t height: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),\n\t className: _react.PropTypes.string,\n\t progressFrequency: _react.PropTypes.number,\n\t soundcloudConfig: _react.PropTypes.shape({\n\t clientId: _react.PropTypes.string\n\t }),\n\t youtubeConfig: _react.PropTypes.shape({\n\t playerVars: _react.PropTypes.object,\n\t preload: _react.PropTypes.bool\n\t }),\n\t vimeoConfig: _react.PropTypes.shape({\n\t iframeParams: _react.PropTypes.object,\n\t preload: _react.PropTypes.bool\n\t }),\n\t fileConfig: _react.PropTypes.shape({\n\t attributes: _react.PropTypes.object\n\t }),\n\t onStart: _react.PropTypes.func,\n\t onPlay: _react.PropTypes.func,\n\t onPause: _react.PropTypes.func,\n\t onBuffer: _react.PropTypes.func,\n\t onEnded: _react.PropTypes.func,\n\t onError: _react.PropTypes.func,\n\t onDuration: _react.PropTypes.func,\n\t onProgress: _react.PropTypes.func\n\t};\n\t\n\tvar defaultProps = exports.defaultProps = {\n\t playing: false,\n\t loop: false,\n\t controls: false,\n\t volume: 0.8,\n\t width: 640,\n\t height: 360,\n\t progressFrequency: 1000,\n\t soundcloudConfig: {\n\t clientId: 'e8b6f84fbcad14c301ca1355cae1dea2'\n\t },\n\t youtubeConfig: {\n\t playerVars: {},\n\t preload: false\n\t },\n\t vimeoConfig: {\n\t iframeParams: {},\n\t preload: false\n\t },\n\t fileConfig: {\n\t attributes: {}\n\t },\n\t onStart: function onStart() {},\n\t onPlay: function onPlay() {},\n\t onPause: function onPause() {},\n\t onBuffer: function onBuffer() {},\n\t onEnded: function onEnded() {},\n\t onError: function onError() {},\n\t onDuration: function onDuration() {},\n\t onProgress: function onProgress() {}\n\t};\n\n/***/ },\n/* 5 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\t\n\tvar _react = __webpack_require__(1);\n\t\n\tvar _react2 = _interopRequireDefault(_react);\n\t\n\tvar _fetchJsonp = __webpack_require__(11);\n\t\n\tvar _fetchJsonp2 = _interopRequireDefault(_fetchJsonp);\n\t\n\tvar _FilePlayer2 = __webpack_require__(3);\n\t\n\tvar _FilePlayer3 = _interopRequireDefault(_FilePlayer2);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar RESOLVE_URL = '//api.soundcloud.com/resolve.json';\n\tvar MATCH_URL = /^https?:\\/\\/(soundcloud.com|snd.sc)\\/([a-z0-9-_]+\\/[a-z0-9-_]+)$/;\n\t\n\tvar songData = {}; // Cache song data requests\n\t\n\tvar SoundCloud = function (_FilePlayer) {\n\t _inherits(SoundCloud, _FilePlayer);\n\t\n\t function SoundCloud() {\n\t var _Object$getPrototypeO;\n\t\n\t var _temp, _this, _ret;\n\t\n\t _classCallCheck(this, SoundCloud);\n\t\n\t for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n\t args[_key] = arguments[_key];\n\t }\n\t\n\t return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(SoundCloud)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.state = {\n\t image: null\n\t }, _temp), _possibleConstructorReturn(_this, _ret);\n\t }\n\t\n\t _createClass(SoundCloud, [{\n\t key: 'shouldComponentUpdate',\n\t value: function shouldComponentUpdate(nextProps, nextState) {\n\t return _get(Object.getPrototypeOf(SoundCloud.prototype), 'shouldComponentUpdate', this).call(this, nextProps, nextState) || this.state.image !== nextState.image;\n\t }\n\t }, {\n\t key: 'getSongData',\n\t value: function getSongData(url) {\n\t var _this2 = this;\n\t\n\t if (songData[url]) {\n\t return Promise.resolve(songData[url]);\n\t }\n\t return (0, _fetchJsonp2.default)(RESOLVE_URL + '?url=' + url + '&client_id=' + this.props.soundcloudConfig.clientId).then(function (response) {\n\t if (response.ok) {\n\t songData[url] = response.json();\n\t return songData[url];\n\t } else {\n\t _this2.props.onError(new Error('SoundCloud track could not be resolved'));\n\t }\n\t });\n\t }\n\t }, {\n\t key: 'load',\n\t value: function load(url) {\n\t var _this3 = this;\n\t\n\t this.stop();\n\t this.getSongData(url).then(function (data) {\n\t if (url !== _this3.props.url) {\n\t return; // Abort if url changes during async requests\n\t }\n\t if (!data.streamable) {\n\t _this3.props.onError(new Error('SoundCloud track is not streamable'));\n\t return;\n\t }\n\t var image = data.artwork_url || data.user.avatar_url;\n\t if (image) {\n\t _this3.setState({ image: image.replace('-large', '-t500x500') });\n\t }\n\t _this3.player.src = data.stream_url + '?client_id=' + _this3.props.soundcloudConfig.clientId;\n\t }, this.props.onError);\n\t }\n\t }, {\n\t key: 'render',\n\t value: function render() {\n\t var _props = this.props;\n\t var url = _props.url;\n\t var controls = _props.controls;\n\t\n\t var style = {\n\t display: url ? 'block' : 'none',\n\t height: '100%',\n\t backgroundImage: this.state.image ? 'url(' + this.state.image + ')' : null,\n\t backgroundSize: 'cover',\n\t backgroundPosition: 'center'\n\t };\n\t return _react2.default.createElement(\n\t 'div',\n\t { style: style },\n\t _react2.default.createElement('audio', {\n\t ref: 'player',\n\t type: 'audio/mpeg',\n\t preload: 'auto',\n\t style: { width: '100%', height: '100%' },\n\t controls: controls\n\t })\n\t );\n\t }\n\t }], [{\n\t key: 'canPlay',\n\t value: function canPlay(url) {\n\t return MATCH_URL.test(url);\n\t }\n\t }]);\n\t\n\t return SoundCloud;\n\t}(_FilePlayer3.default);\n\t\n\tSoundCloud.displayName = 'SoundCloud';\n\texports.default = SoundCloud;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\t\n\tvar _react = __webpack_require__(1);\n\t\n\tvar _react2 = _interopRequireDefault(_react);\n\t\n\tvar _queryString = __webpack_require__(14);\n\t\n\tvar _Base2 = __webpack_require__(2);\n\t\n\tvar _Base3 = _interopRequireDefault(_Base2);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar IFRAME_SRC = 'https://player.vimeo.com/video/';\n\tvar MATCH_URL = /https?:\\/\\/(?:www\\.|player\\.)?vimeo.com\\/(?:channels\\/(?:\\w+\\/)?|groups\\/([^\\/]*)\\/videos\\/|album\\/(\\d+)\\/video\\/|video\\/|)(\\d+)(?:$|\\/|\\?)/;\n\tvar MATCH_MESSAGE_ORIGIN = /^https?:\\/\\/player.vimeo.com/;\n\tvar BLANK_VIDEO_URL = 'https://vimeo.com/127250231';\n\tvar DEFAULT_IFRAME_PARAMS = {\n\t api: 1,\n\t autoplay: 0,\n\t badge: 0,\n\t byline: 0,\n\t fullscreen: 1,\n\t portrait: 0,\n\t title: 0\n\t};\n\t\n\tvar Vimeo = function (_Base) {\n\t _inherits(Vimeo, _Base);\n\t\n\t function Vimeo() {\n\t var _Object$getPrototypeO;\n\t\n\t var _temp, _this, _ret;\n\t\n\t _classCallCheck(this, Vimeo);\n\t\n\t for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n\t args[_key] = arguments[_key];\n\t }\n\t\n\t return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Vimeo)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.onMessage = function (e) {\n\t if (!MATCH_MESSAGE_ORIGIN.test(e.origin)) return;\n\t _this.origin = _this.origin || e.origin;\n\t var data = JSON.parse(e.data);\n\t if (data.event === 'ready') {\n\t _this.postMessage('getDuration');\n\t _this.postMessage('addEventListener', 'playProgress');\n\t _this.postMessage('addEventListener', 'loadProgress');\n\t _this.postMessage('addEventListener', 'play');\n\t _this.postMessage('addEventListener', 'pause');\n\t _this.postMessage('addEventListener', 'finish');\n\t }\n\t if (data.event === 'playProgress') _this.fractionPlayed = data.data.percent;\n\t if (data.event === 'loadProgress') _this.fractionLoaded = data.data.percent;\n\t if (data.event === 'play') _this.onPlay();\n\t if (data.event === 'pause') _this.props.onPause();\n\t if (data.event === 'finish') _this.onEnded();\n\t if (data.method === 'getDuration') {\n\t _this.duration = data.value; // Store for use later\n\t _this.onReady();\n\t }\n\t }, _this.postMessage = function (method, value) {\n\t if (!_this.origin) return;\n\t var data = JSON.stringify({ method: method, value: value });\n\t return _this.iframe.contentWindow && _this.iframe.contentWindow.postMessage(data, _this.origin);\n\t }, _temp), _possibleConstructorReturn(_this, _ret);\n\t }\n\t\n\t _createClass(Vimeo, [{\n\t key: 'componentDidMount',\n\t value: function componentDidMount() {\n\t window.addEventListener('message', this.onMessage, false);\n\t this.iframe = this.refs.iframe;\n\t\n\t if (!this.props.url && this.props.vimeoConfig.preload) {\n\t this.preloading = true;\n\t this.load(BLANK_VIDEO_URL);\n\t }\n\t\n\t _get(Object.getPrototypeOf(Vimeo.prototype), 'componentDidMount', this).call(this);\n\t }\n\t }, {\n\t key: 'getIframeParams',\n\t value: function getIframeParams() {\n\t return _extends({}, DEFAULT_IFRAME_PARAMS, this.props.vimeoConfig.iframeParams);\n\t }\n\t }, {\n\t key: 'load',\n\t value: function load(url) {\n\t var id = url.match(MATCH_URL)[3];\n\t this.iframe.src = IFRAME_SRC + id + '?' + (0, _queryString.stringify)(this.getIframeParams());\n\t }\n\t }, {\n\t key: 'play',\n\t value: function play() {\n\t this.postMessage('play');\n\t }\n\t }, {\n\t key: 'pause',\n\t value: function pause() {\n\t this.postMessage('pause');\n\t }\n\t }, {\n\t key: 'stop',\n\t value: function stop() {\n\t this.iframe.src = '';\n\t }\n\t }, {\n\t key: 'seekTo',\n\t value: function seekTo(fraction) {\n\t _get(Object.getPrototypeOf(Vimeo.prototype), 'seekTo', this).call(this, fraction);\n\t this.postMessage('seekTo', this.duration * fraction);\n\t }\n\t }, {\n\t key: 'setVolume',\n\t value: function setVolume(fraction) {\n\t this.postMessage('setVolume', fraction);\n\t }\n\t }, {\n\t key: 'getDuration',\n\t value: function getDuration() {\n\t return this.duration;\n\t }\n\t }, {\n\t key: 'getFractionPlayed',\n\t value: function getFractionPlayed() {\n\t return this.fractionPlayed || null;\n\t }\n\t }, {\n\t key: 'getFractionLoaded',\n\t value: function getFractionLoaded() {\n\t return this.fractionLoaded || null;\n\t }\n\t }, {\n\t key: 'render',\n\t value: function render() {\n\t var _getIframeParams = this.getIframeParams();\n\t\n\t var fullscreen = _getIframeParams.fullscreen;\n\t\n\t var style = {\n\t display: this.props.url ? 'block' : 'none',\n\t width: '100%',\n\t height: '100%'\n\t };\n\t return _react2.default.createElement('iframe', { ref: 'iframe', frameBorder: '0', style: style, allowFullScreen: fullscreen });\n\t }\n\t }], [{\n\t key: 'canPlay',\n\t value: function canPlay(url) {\n\t return MATCH_URL.test(url);\n\t }\n\t }]);\n\t\n\t return Vimeo;\n\t}(_Base3.default);\n\t\n\tVimeo.displayName = 'Vimeo';\n\texports.default = Vimeo;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 7 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\t\n\tvar _react = __webpack_require__(1);\n\t\n\tvar _react2 = _interopRequireDefault(_react);\n\t\n\tvar _loadScript = __webpack_require__(12);\n\t\n\tvar _loadScript2 = _interopRequireDefault(_loadScript);\n\t\n\tvar _Base2 = __webpack_require__(2);\n\t\n\tvar _Base3 = _interopRequireDefault(_Base2);\n\t\n\tvar _utils = __webpack_require__(9);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar SDK_URL = 'https://www.youtube.com/iframe_api';\n\tvar SDK_GLOBAL = 'YT';\n\tvar SDK_GLOBAL_READY = 'onYouTubeIframeAPIReady';\n\tvar MATCH_URL = /^(?:https?:\\/\\/)?(?:www\\.)?(?:youtu\\.be\\/|youtube\\.com\\/(?:embed\\/|v\\/|watch\\?v=|watch\\?.+&v=))((\\w|-){11})(?:\\S+)?$/;\n\tvar PLAYER_ID = 'youtube-player';\n\tvar BLANK_VIDEO_URL = 'https://www.youtube.com/watch?v=GlCmAC4MHek';\n\tvar DEFAULT_PLAYER_VARS = {\n\t autoplay: 0,\n\t playsinline: 1,\n\t showinfo: 0,\n\t rel: 0,\n\t iv_load_policy: 3\n\t};\n\t\n\tvar playerIdCount = 0;\n\t\n\tvar YouTube = function (_Base) {\n\t _inherits(YouTube, _Base);\n\t\n\t function YouTube() {\n\t var _Object$getPrototypeO;\n\t\n\t var _temp, _this, _ret;\n\t\n\t _classCallCheck(this, YouTube);\n\t\n\t for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n\t args[_key] = arguments[_key];\n\t }\n\t\n\t return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(YouTube)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.playerId = PLAYER_ID + '-' + playerIdCount++, _this.onStateChange = function (_ref) {\n\t var data = _ref.data;\n\t var _window$SDK_GLOBAL$Pl = window[SDK_GLOBAL].PlayerState;\n\t var PLAYING = _window$SDK_GLOBAL$Pl.PLAYING;\n\t var PAUSED = _window$SDK_GLOBAL$Pl.PAUSED;\n\t var BUFFERING = _window$SDK_GLOBAL$Pl.BUFFERING;\n\t var ENDED = _window$SDK_GLOBAL$Pl.ENDED;\n\t var CUED = _window$SDK_GLOBAL$Pl.CUED;\n\t\n\t if (data === PLAYING) _this.onPlay();\n\t if (data === PAUSED) _this.props.onPause();\n\t if (data === BUFFERING) _this.props.onBuffer();\n\t if (data === ENDED) _this.onEnded();\n\t if (data === CUED) _this.onReady();\n\t }, _temp), _possibleConstructorReturn(_this, _ret);\n\t }\n\t\n\t _createClass(YouTube, [{\n\t key: 'componentDidMount',\n\t value: function componentDidMount() {\n\t if (!this.props.url && this.props.youtubeConfig.preload) {\n\t this.preloading = true;\n\t this.load(BLANK_VIDEO_URL);\n\t }\n\t _get(Object.getPrototypeOf(YouTube.prototype), 'componentDidMount', this).call(this);\n\t }\n\t }, {\n\t key: 'getSDK',\n\t value: function getSDK() {\n\t if (window[SDK_GLOBAL]) {\n\t return Promise.resolve(window[SDK_GLOBAL]);\n\t }\n\t return new Promise(function (resolve, reject) {\n\t var previousOnReady = window[SDK_GLOBAL_READY];\n\t window[SDK_GLOBAL_READY] = function () {\n\t if (previousOnReady) previousOnReady();\n\t resolve(window[SDK_GLOBAL]);\n\t };\n\t (0, _loadScript2.default)(SDK_URL, function (err) {\n\t if (err) reject(err);\n\t });\n\t });\n\t }\n\t }, {\n\t key: 'load',\n\t value: function load(url) {\n\t var _this2 = this;\n\t\n\t var id = url && url.match(MATCH_URL)[1];\n\t if (this.isReady) {\n\t this.player.cueVideoById({\n\t videoId: id,\n\t startSeconds: (0, _utils.parseStartTime)(url)\n\t });\n\t return;\n\t }\n\t if (this.loadingSDK) {\n\t this.loadOnReady = url;\n\t return;\n\t }\n\t this.loadingSDK = true;\n\t this.getSDK().then(function (YT) {\n\t _this2.player = new YT.Player(_this2.playerId, {\n\t width: '100%',\n\t height: '100%',\n\t videoId: id,\n\t playerVars: _extends({}, DEFAULT_PLAYER_VARS, {\n\t controls: _this2.props.controls ? 1 : 0\n\t }, _this2.props.youtubeConfig.playerVars, {\n\t start: (0, _utils.parseStartTime)(url),\n\t origin: window.location.origin\n\t }),\n\t events: {\n\t onReady: function onReady() {\n\t _this2.loadingSDK = false;\n\t _this2.onReady();\n\t },\n\t onStateChange: _this2.onStateChange,\n\t onError: function onError(event) {\n\t return _this2.props.onError(event.data);\n\t }\n\t }\n\t });\n\t }, this.props.onError);\n\t }\n\t }, {\n\t key: 'play',\n\t value: function play() {\n\t if (!this.isReady || !this.player.playVideo) return;\n\t this.player.playVideo();\n\t }\n\t }, {\n\t key: 'pause',\n\t value: function pause() {\n\t if (!this.isReady || !this.player.pauseVideo) return;\n\t this.player.pauseVideo();\n\t }\n\t }, {\n\t key: 'stop',\n\t value: function stop() {\n\t if (!this.isReady || !this.player.stopVideo) return;\n\t this.player.stopVideo();\n\t }\n\t }, {\n\t key: 'seekTo',\n\t value: function seekTo(fraction) {\n\t _get(Object.getPrototypeOf(YouTube.prototype), 'seekTo', this).call(this, fraction);\n\t if (!this.isReady || !this.player.seekTo) return;\n\t this.player.seekTo(this.getDuration() * fraction);\n\t }\n\t }, {\n\t key: 'setVolume',\n\t value: function setVolume(fraction) {\n\t if (!this.isReady || !this.player.setVolume) return;\n\t this.player.setVolume(fraction * 100);\n\t }\n\t }, {\n\t key: 'getDuration',\n\t value: function getDuration() {\n\t if (!this.isReady || !this.player.getDuration) return null;\n\t return this.player.getDuration();\n\t }\n\t }, {\n\t key: 'getFractionPlayed',\n\t value: function getFractionPlayed() {\n\t if (!this.isReady || !this.getDuration()) return null;\n\t return this.player.getCurrentTime() / this.getDuration();\n\t }\n\t }, {\n\t key: 'getFractionLoaded',\n\t value: function getFractionLoaded() {\n\t if (!this.isReady || !this.player.getVideoLoadedFraction) return null;\n\t return this.player.getVideoLoadedFraction();\n\t }\n\t }, {\n\t key: 'render',\n\t value: function render() {\n\t var style = {\n\t height: '100%',\n\t display: this.props.url ? 'block' : 'none'\n\t };\n\t return _react2.default.createElement(\n\t 'div',\n\t { style: style },\n\t _react2.default.createElement('div', { id: this.playerId })\n\t );\n\t }\n\t }], [{\n\t key: 'canPlay',\n\t value: function canPlay(url) {\n\t return MATCH_URL.test(url);\n\t }\n\t }]);\n\t\n\t return YouTube;\n\t}(_Base3.default);\n\t\n\tYouTube.displayName = 'YouTube';\n\texports.default = YouTube;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _YouTube = __webpack_require__(7);\n\t\n\tvar _YouTube2 = _interopRequireDefault(_YouTube);\n\t\n\tvar _SoundCloud = __webpack_require__(5);\n\t\n\tvar _SoundCloud2 = _interopRequireDefault(_SoundCloud);\n\t\n\tvar _Vimeo = __webpack_require__(6);\n\t\n\tvar _Vimeo2 = _interopRequireDefault(_Vimeo);\n\t\n\tvar _FilePlayer = __webpack_require__(3);\n\t\n\tvar _FilePlayer2 = _interopRequireDefault(_FilePlayer);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\texports.default = [_YouTube2.default, _SoundCloud2.default, _Vimeo2.default, _FilePlayer2.default];\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 9 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\t\n\texports.parseStartTime = parseStartTime;\n\tvar MATCH_START_QUERY = /[\\?&#](?:start|t)=([0-9hms]+)/;\n\tvar MATCH_START_STAMP = /(\\d+)(h|m|s)/g;\n\tvar MATCH_NUMERIC = /^\\d+$/;\n\t\n\t// Parse YouTube URL for a start time param, ie ?t=1h14m30s\n\t// and return the start time in seconds\n\tfunction parseStartTime(url) {\n\t var match = url.match(MATCH_START_QUERY);\n\t if (match) {\n\t var stamp = match[1];\n\t if (stamp.match(MATCH_START_STAMP)) {\n\t return parseStartStamp(stamp);\n\t }\n\t if (MATCH_NUMERIC.test(stamp)) {\n\t return parseInt(stamp, 10);\n\t }\n\t }\n\t return 0;\n\t}\n\t\n\tfunction parseStartStamp(stamp) {\n\t var seconds = 0;\n\t var array = MATCH_START_STAMP.exec(stamp);\n\t while (array !== null) {\n\t var _array = array;\n\t\n\t var _array2 = _slicedToArray(_array, 3);\n\t\n\t var count = _array2[1];\n\t var period = _array2[2];\n\t\n\t if (period === 'h') seconds += parseInt(count, 10) * 60 * 60;\n\t if (period === 'm') seconds += parseInt(count, 10) * 60;\n\t if (period === 's') seconds += parseInt(count, 10);\n\t array = MATCH_START_STAMP.exec(stamp);\n\t }\n\t return seconds;\n\t}\n\n/***/ },\n/* 10 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar require;var __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(process, global, module) {/*!\n\t * @overview es6-promise - a tiny implementation of Promises/A+.\n\t * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n\t * @license Licensed under MIT license\n\t * See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE\n\t * @version 3.1.2\n\t */\n\t\n\t(function() {\n\t \"use strict\";\n\t function lib$es6$promise$utils$$objectOrFunction(x) {\n\t return typeof x === 'function' || (typeof x === 'object' && x !== null);\n\t }\n\t\n\t function lib$es6$promise$utils$$isFunction(x) {\n\t return typeof x === 'function';\n\t }\n\t\n\t function lib$es6$promise$utils$$isMaybeThenable(x) {\n\t return typeof x === 'object' && x !== null;\n\t }\n\t\n\t var lib$es6$promise$utils$$_isArray;\n\t if (!Array.isArray) {\n\t lib$es6$promise$utils$$_isArray = function (x) {\n\t return Object.prototype.toString.call(x) === '[object Array]';\n\t };\n\t } else {\n\t lib$es6$promise$utils$$_isArray = Array.isArray;\n\t }\n\t\n\t var lib$es6$promise$utils$$isArray = lib$es6$promise$utils$$_isArray;\n\t var lib$es6$promise$asap$$len = 0;\n\t var lib$es6$promise$asap$$vertxNext;\n\t var lib$es6$promise$asap$$customSchedulerFn;\n\t\n\t var lib$es6$promise$asap$$asap = function asap(callback, arg) {\n\t lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len] = callback;\n\t lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len + 1] = arg;\n\t lib$es6$promise$asap$$len += 2;\n\t if (lib$es6$promise$asap$$len === 2) {\n\t // If len is 2, that means that we need to schedule an async flush.\n\t // If additional callbacks are queued before the queue is flushed, they\n\t // will be processed by this flush that we are scheduling.\n\t if (lib$es6$promise$asap$$customSchedulerFn) {\n\t lib$es6$promise$asap$$customSchedulerFn(lib$es6$promise$asap$$flush);\n\t } else {\n\t lib$es6$promise$asap$$scheduleFlush();\n\t }\n\t }\n\t }\n\t\n\t function lib$es6$promise$asap$$setScheduler(scheduleFn) {\n\t lib$es6$promise$asap$$customSchedulerFn = scheduleFn;\n\t }\n\t\n\t function lib$es6$promise$asap$$setAsap(asapFn) {\n\t lib$es6$promise$asap$$asap = asapFn;\n\t }\n\t\n\t var lib$es6$promise$asap$$browserWindow = (typeof window !== 'undefined') ? window : undefined;\n\t var lib$es6$promise$asap$$browserGlobal = lib$es6$promise$asap$$browserWindow || {};\n\t var lib$es6$promise$asap$$BrowserMutationObserver = lib$es6$promise$asap$$browserGlobal.MutationObserver || lib$es6$promise$asap$$browserGlobal.WebKitMutationObserver;\n\t var lib$es6$promise$asap$$isNode = typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\t\n\t // test for web worker but not in IE10\n\t var lib$es6$promise$asap$$isWorker = typeof Uint8ClampedArray !== 'undefined' &&\n\t typeof importScripts !== 'undefined' &&\n\t typeof MessageChannel !== 'undefined';\n\t\n\t // node\n\t function lib$es6$promise$asap$$useNextTick() {\n\t // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n\t // see https://github.com/cujojs/when/issues/410 for details\n\t return function() {\n\t process.nextTick(lib$es6$promise$asap$$flush);\n\t };\n\t }\n\t\n\t // vertx\n\t function lib$es6$promise$asap$$useVertxTimer() {\n\t return function() {\n\t lib$es6$promise$asap$$vertxNext(lib$es6$promise$asap$$flush);\n\t };\n\t }\n\t\n\t function lib$es6$promise$asap$$useMutationObserver() {\n\t var iterations = 0;\n\t var observer = new lib$es6$promise$asap$$BrowserMutationObserver(lib$es6$promise$asap$$flush);\n\t var node = document.createTextNode('');\n\t observer.observe(node, { characterData: true });\n\t\n\t return function() {\n\t node.data = (iterations = ++iterations % 2);\n\t };\n\t }\n\t\n\t // web worker\n\t function lib$es6$promise$asap$$useMessageChannel() {\n\t var channel = new MessageChannel();\n\t channel.port1.onmessage = lib$es6$promise$asap$$flush;\n\t return function () {\n\t channel.port2.postMessage(0);\n\t };\n\t }\n\t\n\t function lib$es6$promise$asap$$useSetTimeout() {\n\t return function() {\n\t setTimeout(lib$es6$promise$asap$$flush, 1);\n\t };\n\t }\n\t\n\t var lib$es6$promise$asap$$queue = new Array(1000);\n\t function lib$es6$promise$asap$$flush() {\n\t for (var i = 0; i < lib$es6$promise$asap$$len; i+=2) {\n\t var callback = lib$es6$promise$asap$$queue[i];\n\t var arg = lib$es6$promise$asap$$queue[i+1];\n\t\n\t callback(arg);\n\t\n\t lib$es6$promise$asap$$queue[i] = undefined;\n\t lib$es6$promise$asap$$queue[i+1] = undefined;\n\t }\n\t\n\t lib$es6$promise$asap$$len = 0;\n\t }\n\t\n\t function lib$es6$promise$asap$$attemptVertx() {\n\t try {\n\t var r = require;\n\t var vertx = __webpack_require__(18);\n\t lib$es6$promise$asap$$vertxNext = vertx.runOnLoop || vertx.runOnContext;\n\t return lib$es6$promise$asap$$useVertxTimer();\n\t } catch(e) {\n\t return lib$es6$promise$asap$$useSetTimeout();\n\t }\n\t }\n\t\n\t var lib$es6$promise$asap$$scheduleFlush;\n\t // Decide what async method to use to triggering processing of queued callbacks:\n\t if (lib$es6$promise$asap$$isNode) {\n\t lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useNextTick();\n\t } else if (lib$es6$promise$asap$$BrowserMutationObserver) {\n\t lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useMutationObserver();\n\t } else if (lib$es6$promise$asap$$isWorker) {\n\t lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useMessageChannel();\n\t } else if (lib$es6$promise$asap$$browserWindow === undefined && \"function\" === 'function') {\n\t lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$attemptVertx();\n\t } else {\n\t lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useSetTimeout();\n\t }\n\t function lib$es6$promise$then$$then(onFulfillment, onRejection) {\n\t var parent = this;\n\t var state = parent._state;\n\t\n\t if (state === lib$es6$promise$$internal$$FULFILLED && !onFulfillment || state === lib$es6$promise$$internal$$REJECTED && !onRejection) {\n\t return this;\n\t }\n\t\n\t var child = new this.constructor(lib$es6$promise$$internal$$noop);\n\t var result = parent._result;\n\t\n\t if (state) {\n\t var callback = arguments[state - 1];\n\t lib$es6$promise$asap$$asap(function(){\n\t lib$es6$promise$$internal$$invokeCallback(state, child, callback, result);\n\t });\n\t } else {\n\t lib$es6$promise$$internal$$subscribe(parent, child, onFulfillment, onRejection);\n\t }\n\t\n\t return child;\n\t }\n\t var lib$es6$promise$then$$default = lib$es6$promise$then$$then;\n\t function lib$es6$promise$promise$resolve$$resolve(object) {\n\t /*jshint validthis:true */\n\t var Constructor = this;\n\t\n\t if (object && typeof object === 'object' && object.constructor === Constructor) {\n\t return object;\n\t }\n\t\n\t var promise = new Constructor(lib$es6$promise$$internal$$noop);\n\t lib$es6$promise$$internal$$resolve(promise, object);\n\t return promise;\n\t }\n\t var lib$es6$promise$promise$resolve$$default = lib$es6$promise$promise$resolve$$resolve;\n\t\n\t function lib$es6$promise$$internal$$noop() {}\n\t\n\t var lib$es6$promise$$internal$$PENDING = void 0;\n\t var lib$es6$promise$$internal$$FULFILLED = 1;\n\t var lib$es6$promise$$internal$$REJECTED = 2;\n\t\n\t var lib$es6$promise$$internal$$GET_THEN_ERROR = new lib$es6$promise$$internal$$ErrorObject();\n\t\n\t function lib$es6$promise$$internal$$selfFulfillment() {\n\t return new TypeError(\"You cannot resolve a promise with itself\");\n\t }\n\t\n\t function lib$es6$promise$$internal$$cannotReturnOwn() {\n\t return new TypeError('A promises callback cannot return that same promise.');\n\t }\n\t\n\t function lib$es6$promise$$internal$$getThen(promise) {\n\t try {\n\t return promise.then;\n\t } catch(error) {\n\t lib$es6$promise$$internal$$GET_THEN_ERROR.error = error;\n\t return lib$es6$promise$$internal$$GET_THEN_ERROR;\n\t }\n\t }\n\t\n\t function lib$es6$promise$$internal$$tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n\t try {\n\t then.call(value, fulfillmentHandler, rejectionHandler);\n\t } catch(e) {\n\t return e;\n\t }\n\t }\n\t\n\t function lib$es6$promise$$internal$$handleForeignThenable(promise, thenable, then) {\n\t lib$es6$promise$asap$$asap(function(promise) {\n\t var sealed = false;\n\t var error = lib$es6$promise$$internal$$tryThen(then, thenable, function(value) {\n\t if (sealed) { return; }\n\t sealed = true;\n\t if (thenable !== value) {\n\t lib$es6$promise$$internal$$resolve(promise, value);\n\t } else {\n\t lib$es6$promise$$internal$$fulfill(promise, value);\n\t }\n\t }, function(reason) {\n\t if (sealed) { return; }\n\t sealed = true;\n\t\n\t lib$es6$promise$$internal$$reject(promise, reason);\n\t }, 'Settle: ' + (promise._label || ' unknown promise'));\n\t\n\t if (!sealed && error) {\n\t sealed = true;\n\t lib$es6$promise$$internal$$reject(promise, error);\n\t }\n\t }, promise);\n\t }\n\t\n\t function lib$es6$promise$$internal$$handleOwnThenable(promise, thenable) {\n\t if (thenable._state === lib$es6$promise$$internal$$FULFILLED) {\n\t lib$es6$promise$$internal$$fulfill(promise, thenable._result);\n\t } else if (thenable._state === lib$es6$promise$$internal$$REJECTED) {\n\t lib$es6$promise$$internal$$reject(promise, thenable._result);\n\t } else {\n\t lib$es6$promise$$internal$$subscribe(thenable, undefined, function(value) {\n\t lib$es6$promise$$internal$$resolve(promise, value);\n\t }, function(reason) {\n\t lib$es6$promise$$internal$$reject(promise, reason);\n\t });\n\t }\n\t }\n\t\n\t function lib$es6$promise$$internal$$handleMaybeThenable(promise, maybeThenable, then) {\n\t if (maybeThenable.constructor === promise.constructor &&\n\t then === lib$es6$promise$then$$default &&\n\t constructor.resolve === lib$es6$promise$promise$resolve$$default) {\n\t lib$es6$promise$$internal$$handleOwnThenable(promise, maybeThenable);\n\t } else {\n\t if (then === lib$es6$promise$$internal$$GET_THEN_ERROR) {\n\t lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$GET_THEN_ERROR.error);\n\t } else if (then === undefined) {\n\t lib$es6$promise$$internal$$fulfill(promise, maybeThenable);\n\t } else if (lib$es6$promise$utils$$isFunction(then)) {\n\t lib$es6$promise$$internal$$handleForeignThenable(promise, maybeThenable, then);\n\t } else {\n\t lib$es6$promise$$internal$$fulfill(promise, maybeThenable);\n\t }\n\t }\n\t }\n\t\n\t function lib$es6$promise$$internal$$resolve(promise, value) {\n\t if (promise === value) {\n\t lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$selfFulfillment());\n\t } else if (lib$es6$promise$utils$$objectOrFunction(value)) {\n\t lib$es6$promise$$internal$$handleMaybeThenable(promise, value, lib$es6$promise$$internal$$getThen(value));\n\t } else {\n\t lib$es6$promise$$internal$$fulfill(promise, value);\n\t }\n\t }\n\t\n\t function lib$es6$promise$$internal$$publishRejection(promise) {\n\t if (promise._onerror) {\n\t promise._onerror(promise._result);\n\t }\n\t\n\t lib$es6$promise$$internal$$publish(promise);\n\t }\n\t\n\t function lib$es6$promise$$internal$$fulfill(promise, value) {\n\t if (promise._state !== lib$es6$promise$$internal$$PENDING) { return; }\n\t\n\t promise._result = value;\n\t promise._state = lib$es6$promise$$internal$$FULFILLED;\n\t\n\t if (promise._subscribers.length !== 0) {\n\t lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publish, promise);\n\t }\n\t }\n\t\n\t function lib$es6$promise$$internal$$reject(promise, reason) {\n\t if (promise._state !== lib$es6$promise$$internal$$PENDING) { return; }\n\t promise._state = lib$es6$promise$$internal$$REJECTED;\n\t promise._result = reason;\n\t\n\t lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publishRejection, promise);\n\t }\n\t\n\t function lib$es6$promise$$internal$$subscribe(parent, child, onFulfillment, onRejection) {\n\t var subscribers = parent._subscribers;\n\t var length = subscribers.length;\n\t\n\t parent._onerror = null;\n\t\n\t subscribers[length] = child;\n\t subscribers[length + lib$es6$promise$$internal$$FULFILLED] = onFulfillment;\n\t subscribers[length + lib$es6$promise$$internal$$REJECTED] = onRejection;\n\t\n\t if (length === 0 && parent._state) {\n\t lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publish, parent);\n\t }\n\t }\n\t\n\t function lib$es6$promise$$internal$$publish(promise) {\n\t var subscribers = promise._subscribers;\n\t var settled = promise._state;\n\t\n\t if (subscribers.length === 0) { return; }\n\t\n\t var child, callback, detail = promise._result;\n\t\n\t for (var i = 0; i < subscribers.length; i += 3) {\n\t child = subscribers[i];\n\t callback = subscribers[i + settled];\n\t\n\t if (child) {\n\t lib$es6$promise$$internal$$invokeCallback(settled, child, callback, detail);\n\t } else {\n\t callback(detail);\n\t }\n\t }\n\t\n\t promise._subscribers.length = 0;\n\t }\n\t\n\t function lib$es6$promise$$internal$$ErrorObject() {\n\t this.error = null;\n\t }\n\t\n\t var lib$es6$promise$$internal$$TRY_CATCH_ERROR = new lib$es6$promise$$internal$$ErrorObject();\n\t\n\t function lib$es6$promise$$internal$$tryCatch(callback, detail) {\n\t try {\n\t return callback(detail);\n\t } catch(e) {\n\t lib$es6$promise$$internal$$TRY_CATCH_ERROR.error = e;\n\t return lib$es6$promise$$internal$$TRY_CATCH_ERROR;\n\t }\n\t }\n\t\n\t function lib$es6$promise$$internal$$invokeCallback(settled, promise, callback, detail) {\n\t var hasCallback = lib$es6$promise$utils$$isFunction(callback),\n\t value, error, succeeded, failed;\n\t\n\t if (hasCallback) {\n\t value = lib$es6$promise$$internal$$tryCatch(callback, detail);\n\t\n\t if (value === lib$es6$promise$$internal$$TRY_CATCH_ERROR) {\n\t failed = true;\n\t error = value.error;\n\t value = null;\n\t } else {\n\t succeeded = true;\n\t }\n\t\n\t if (promise === value) {\n\t lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$cannotReturnOwn());\n\t return;\n\t }\n\t\n\t } else {\n\t value = detail;\n\t succeeded = true;\n\t }\n\t\n\t if (promise._state !== lib$es6$promise$$internal$$PENDING) {\n\t // noop\n\t } else if (hasCallback && succeeded) {\n\t lib$es6$promise$$internal$$resolve(promise, value);\n\t } else if (failed) {\n\t lib$es6$promise$$internal$$reject(promise, error);\n\t } else if (settled === lib$es6$promise$$internal$$FULFILLED) {\n\t lib$es6$promise$$internal$$fulfill(promise, value);\n\t } else if (settled === lib$es6$promise$$internal$$REJECTED) {\n\t lib$es6$promise$$internal$$reject(promise, value);\n\t }\n\t }\n\t\n\t function lib$es6$promise$$internal$$initializePromise(promise, resolver) {\n\t try {\n\t resolver(function resolvePromise(value){\n\t lib$es6$promise$$internal$$resolve(promise, value);\n\t }, function rejectPromise(reason) {\n\t lib$es6$promise$$internal$$reject(promise, reason);\n\t });\n\t } catch(e) {\n\t lib$es6$promise$$internal$$reject(promise, e);\n\t }\n\t }\n\t\n\t function lib$es6$promise$promise$all$$all(entries) {\n\t return new lib$es6$promise$enumerator$$default(this, entries).promise;\n\t }\n\t var lib$es6$promise$promise$all$$default = lib$es6$promise$promise$all$$all;\n\t function lib$es6$promise$promise$race$$race(entries) {\n\t /*jshint validthis:true */\n\t var Constructor = this;\n\t\n\t var promise = new Constructor(lib$es6$promise$$internal$$noop);\n\t\n\t if (!lib$es6$promise$utils$$isArray(entries)) {\n\t lib$es6$promise$$internal$$reject(promise, new TypeError('You must pass an array to race.'));\n\t return promise;\n\t }\n\t\n\t var length = entries.length;\n\t\n\t function onFulfillment(value) {\n\t lib$es6$promise$$internal$$resolve(promise, value);\n\t }\n\t\n\t function onRejection(reason) {\n\t lib$es6$promise$$internal$$reject(promise, reason);\n\t }\n\t\n\t for (var i = 0; promise._state === lib$es6$promise$$internal$$PENDING && i < length; i++) {\n\t lib$es6$promise$$internal$$subscribe(Constructor.resolve(entries[i]), undefined, onFulfillment, onRejection);\n\t }\n\t\n\t return promise;\n\t }\n\t var lib$es6$promise$promise$race$$default = lib$es6$promise$promise$race$$race;\n\t function lib$es6$promise$promise$reject$$reject(reason) {\n\t /*jshint validthis:true */\n\t var Constructor = this;\n\t var promise = new Constructor(lib$es6$promise$$internal$$noop);\n\t lib$es6$promise$$internal$$reject(promise, reason);\n\t return promise;\n\t }\n\t var lib$es6$promise$promise$reject$$default = lib$es6$promise$promise$reject$$reject;\n\t\n\t var lib$es6$promise$promise$$counter = 0;\n\t\n\t function lib$es6$promise$promise$$needsResolver() {\n\t throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n\t }\n\t\n\t function lib$es6$promise$promise$$needsNew() {\n\t throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n\t }\n\t\n\t var lib$es6$promise$promise$$default = lib$es6$promise$promise$$Promise;\n\t /**\n\t Promise objects represent the eventual result of an asynchronous operation. The\n\t primary way of interacting with a promise is through its `then` method, which\n\t registers callbacks to receive either a promise's eventual value or the reason\n\t why the promise cannot be fulfilled.\n\t\n\t Terminology\n\t -----------\n\t\n\t - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n\t - `thenable` is an object or function that defines a `then` method.\n\t - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n\t - `exception` is a value that is thrown using the throw statement.\n\t - `reason` is a value that indicates why a promise was rejected.\n\t - `settled` the final resting state of a promise, fulfilled or rejected.\n\t\n\t A promise can be in one of three states: pending, fulfilled, or rejected.\n\t\n\t Promises that are fulfilled have a fulfillment value and are in the fulfilled\n\t state. Promises that are rejected have a rejection reason and are in the\n\t rejected state. A fulfillment value is never a thenable.\n\t\n\t Promises can also be said to *resolve* a value. If this value is also a\n\t promise, then the original promise's settled state will match the value's\n\t settled state. So a promise that *resolves* a promise that rejects will\n\t itself reject, and a promise that *resolves* a promise that fulfills will\n\t itself fulfill.\n\t\n\t\n\t Basic Usage:\n\t ------------\n\t\n\t ```js\n\t var promise = new Promise(function(resolve, reject) {\n\t // on success\n\t resolve(value);\n\t\n\t // on failure\n\t reject(reason);\n\t });\n\t\n\t promise.then(function(value) {\n\t // on fulfillment\n\t }, function(reason) {\n\t // on rejection\n\t });\n\t ```\n\t\n\t Advanced Usage:\n\t ---------------\n\t\n\t Promises shine when abstracting away asynchronous interactions such as\n\t `XMLHttpRequest`s.\n\t\n\t ```js\n\t function getJSON(url) {\n\t return new Promise(function(resolve, reject){\n\t var xhr = new XMLHttpRequest();\n\t\n\t xhr.open('GET', url);\n\t xhr.onreadystatechange = handler;\n\t xhr.responseType = 'json';\n\t xhr.setRequestHeader('Accept', 'application/json');\n\t xhr.send();\n\t\n\t function handler() {\n\t if (this.readyState === this.DONE) {\n\t if (this.status === 200) {\n\t resolve(this.response);\n\t } else {\n\t reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n\t }\n\t }\n\t };\n\t });\n\t }\n\t\n\t getJSON('/posts.json').then(function(json) {\n\t // on fulfillment\n\t }, function(reason) {\n\t // on rejection\n\t });\n\t ```\n\t\n\t Unlike callbacks, promises are great composable primitives.\n\t\n\t ```js\n\t Promise.all([\n\t getJSON('/posts'),\n\t getJSON('/comments')\n\t ]).then(function(values){\n\t values[0] // => postsJSON\n\t values[1] // => commentsJSON\n\t\n\t return values;\n\t });\n\t ```\n\t\n\t @class Promise\n\t @param {function} resolver\n\t Useful for tooling.\n\t @constructor\n\t */\n\t function lib$es6$promise$promise$$Promise(resolver) {\n\t this._id = lib$es6$promise$promise$$counter++;\n\t this._state = undefined;\n\t this._result = undefined;\n\t this._subscribers = [];\n\t\n\t if (lib$es6$promise$$internal$$noop !== resolver) {\n\t typeof resolver !== 'function' && lib$es6$promise$promise$$needsResolver();\n\t this instanceof lib$es6$promise$promise$$Promise ? lib$es6$promise$$internal$$initializePromise(this, resolver) : lib$es6$promise$promise$$needsNew();\n\t }\n\t }\n\t\n\t lib$es6$promise$promise$$Promise.all = lib$es6$promise$promise$all$$default;\n\t lib$es6$promise$promise$$Promise.race = lib$es6$promise$promise$race$$default;\n\t lib$es6$promise$promise$$Promise.resolve = lib$es6$promise$promise$resolve$$default;\n\t lib$es6$promise$promise$$Promise.reject = lib$es6$promise$promise$reject$$default;\n\t lib$es6$promise$promise$$Promise._setScheduler = lib$es6$promise$asap$$setScheduler;\n\t lib$es6$promise$promise$$Promise._setAsap = lib$es6$promise$asap$$setAsap;\n\t lib$es6$promise$promise$$Promise._asap = lib$es6$promise$asap$$asap;\n\t\n\t lib$es6$promise$promise$$Promise.prototype = {\n\t constructor: lib$es6$promise$promise$$Promise,\n\t\n\t /**\n\t The primary way of interacting with a promise is through its `then` method,\n\t which registers callbacks to receive either a promise's eventual value or the\n\t reason why the promise cannot be fulfilled.\n\t\n\t ```js\n\t findUser().then(function(user){\n\t // user is available\n\t }, function(reason){\n\t // user is unavailable, and you are given the reason why\n\t });\n\t ```\n\t\n\t Chaining\n\t --------\n\t\n\t The return value of `then` is itself a promise. This second, 'downstream'\n\t promise is resolved with the return value of the first promise's fulfillment\n\t or rejection handler, or rejected if the handler throws an exception.\n\t\n\t ```js\n\t findUser().then(function (user) {\n\t return user.name;\n\t }, function (reason) {\n\t return 'default name';\n\t }).then(function (userName) {\n\t // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n\t // will be `'default name'`\n\t });\n\t\n\t findUser().then(function (user) {\n\t throw new Error('Found user, but still unhappy');\n\t }, function (reason) {\n\t throw new Error('`findUser` rejected and we're unhappy');\n\t }).then(function (value) {\n\t // never reached\n\t }, function (reason) {\n\t // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n\t // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n\t });\n\t ```\n\t If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n\t\n\t ```js\n\t findUser().then(function (user) {\n\t throw new PedagogicalException('Upstream error');\n\t }).then(function (value) {\n\t // never reached\n\t }).then(function (value) {\n\t // never reached\n\t }, function (reason) {\n\t // The `PedgagocialException` is propagated all the way down to here\n\t });\n\t ```\n\t\n\t Assimilation\n\t ------------\n\t\n\t Sometimes the value you want to propagate to a downstream promise can only be\n\t retrieved asynchronously. This can be achieved by returning a promise in the\n\t fulfillment or rejection handler. The downstream promise will then be pending\n\t until the returned promise is settled. This is called *assimilation*.\n\t\n\t ```js\n\t findUser().then(function (user) {\n\t return findCommentsByAuthor(user);\n\t }).then(function (comments) {\n\t // The user's comments are now available\n\t });\n\t ```\n\t\n\t If the assimliated promise rejects, then the downstream promise will also reject.\n\t\n\t ```js\n\t findUser().then(function (user) {\n\t return findCommentsByAuthor(user);\n\t }).then(function (comments) {\n\t // If `findCommentsByAuthor` fulfills, we'll have the value here\n\t }, function (reason) {\n\t // If `findCommentsByAuthor` rejects, we'll have the reason here\n\t });\n\t ```\n\t\n\t Simple Example\n\t --------------\n\t\n\t Synchronous Example\n\t\n\t ```javascript\n\t var result;\n\t\n\t try {\n\t result = findResult();\n\t // success\n\t } catch(reason) {\n\t // failure\n\t }\n\t ```\n\t\n\t Errback Example\n\t\n\t ```js\n\t findResult(function(result, err){\n\t if (err) {\n\t // failure\n\t } else {\n\t // success\n\t }\n\t });\n\t ```\n\t\n\t Promise Example;\n\t\n\t ```javascript\n\t findResult().then(function(result){\n\t // success\n\t }, function(reason){\n\t // failure\n\t });\n\t ```\n\t\n\t Advanced Example\n\t --------------\n\t\n\t Synchronous Example\n\t\n\t ```javascript\n\t var author, books;\n\t\n\t try {\n\t author = findAuthor();\n\t books = findBooksByAuthor(author);\n\t // success\n\t } catch(reason) {\n\t // failure\n\t }\n\t ```\n\t\n\t Errback Example\n\t\n\t ```js\n\t\n\t function foundBooks(books) {\n\t\n\t }\n\t\n\t function failure(reason) {\n\t\n\t }\n\t\n\t findAuthor(function(author, err){\n\t if (err) {\n\t failure(err);\n\t // failure\n\t } else {\n\t try {\n\t findBoooksByAuthor(author, function(books, err) {\n\t if (err) {\n\t failure(err);\n\t } else {\n\t try {\n\t foundBooks(books);\n\t } catch(reason) {\n\t failure(reason);\n\t }\n\t }\n\t });\n\t } catch(error) {\n\t failure(err);\n\t }\n\t // success\n\t }\n\t });\n\t ```\n\t\n\t Promise Example;\n\t\n\t ```javascript\n\t findAuthor().\n\t then(findBooksByAuthor).\n\t then(function(books){\n\t // found books\n\t }).catch(function(reason){\n\t // something went wrong\n\t });\n\t ```\n\t\n\t @method then\n\t @param {Function} onFulfilled\n\t @param {Function} onRejected\n\t Useful for tooling.\n\t @return {Promise}\n\t */\n\t then: lib$es6$promise$then$$default,\n\t\n\t /**\n\t `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n\t as the catch block of a try/catch statement.\n\t\n\t ```js\n\t function findAuthor(){\n\t throw new Error('couldn't find that author');\n\t }\n\t\n\t // synchronous\n\t try {\n\t findAuthor();\n\t } catch(reason) {\n\t // something went wrong\n\t }\n\t\n\t // async with promises\n\t findAuthor().catch(function(reason){\n\t // something went wrong\n\t });\n\t ```\n\t\n\t @method catch\n\t @param {Function} onRejection\n\t Useful for tooling.\n\t @return {Promise}\n\t */\n\t 'catch': function(onRejection) {\n\t return this.then(null, onRejection);\n\t }\n\t };\n\t var lib$es6$promise$enumerator$$default = lib$es6$promise$enumerator$$Enumerator;\n\t function lib$es6$promise$enumerator$$Enumerator(Constructor, input) {\n\t this._instanceConstructor = Constructor;\n\t this.promise = new Constructor(lib$es6$promise$$internal$$noop);\n\t\n\t if (Array.isArray(input)) {\n\t this._input = input;\n\t this.length = input.length;\n\t this._remaining = input.length;\n\t\n\t this._result = new Array(this.length);\n\t\n\t if (this.length === 0) {\n\t lib$es6$promise$$internal$$fulfill(this.promise, this._result);\n\t } else {\n\t this.length = this.length || 0;\n\t this._enumerate();\n\t if (this._remaining === 0) {\n\t lib$es6$promise$$internal$$fulfill(this.promise, this._result);\n\t }\n\t }\n\t } else {\n\t lib$es6$promise$$internal$$reject(this.promise, this._validationError());\n\t }\n\t }\n\t\n\t lib$es6$promise$enumerator$$Enumerator.prototype._validationError = function() {\n\t return new Error('Array Methods must be provided an Array');\n\t };\n\t\n\t lib$es6$promise$enumerator$$Enumerator.prototype._enumerate = function() {\n\t var length = this.length;\n\t var input = this._input;\n\t\n\t for (var i = 0; this._state === lib$es6$promise$$internal$$PENDING && i < length; i++) {\n\t this._eachEntry(input[i], i);\n\t }\n\t };\n\t\n\t lib$es6$promise$enumerator$$Enumerator.prototype._eachEntry = function(entry, i) {\n\t var c = this._instanceConstructor;\n\t var resolve = c.resolve;\n\t\n\t if (resolve === lib$es6$promise$promise$resolve$$default) {\n\t var then = lib$es6$promise$$internal$$getThen(entry);\n\t\n\t if (then === lib$es6$promise$then$$default &&\n\t entry._state !== lib$es6$promise$$internal$$PENDING) {\n\t this._settledAt(entry._state, i, entry._result);\n\t } else if (typeof then !== 'function') {\n\t this._remaining--;\n\t this._result[i] = entry;\n\t } else if (c === lib$es6$promise$promise$$default) {\n\t var promise = new c(lib$es6$promise$$internal$$noop);\n\t lib$es6$promise$$internal$$handleMaybeThenable(promise, entry, then);\n\t this._willSettleAt(promise, i);\n\t } else {\n\t this._willSettleAt(new c(function(resolve) { resolve(entry); }), i);\n\t }\n\t } else {\n\t this._willSettleAt(resolve(entry), i);\n\t }\n\t };\n\t\n\t lib$es6$promise$enumerator$$Enumerator.prototype._settledAt = function(state, i, value) {\n\t var promise = this.promise;\n\t\n\t if (promise._state === lib$es6$promise$$internal$$PENDING) {\n\t this._remaining--;\n\t\n\t if (state === lib$es6$promise$$internal$$REJECTED) {\n\t lib$es6$promise$$internal$$reject(promise, value);\n\t } else {\n\t this._result[i] = value;\n\t }\n\t }\n\t\n\t if (this._remaining === 0) {\n\t lib$es6$promise$$internal$$fulfill(promise, this._result);\n\t }\n\t };\n\t\n\t lib$es6$promise$enumerator$$Enumerator.prototype._willSettleAt = function(promise, i) {\n\t var enumerator = this;\n\t\n\t lib$es6$promise$$internal$$subscribe(promise, undefined, function(value) {\n\t enumerator._settledAt(lib$es6$promise$$internal$$FULFILLED, i, value);\n\t }, function(reason) {\n\t enumerator._settledAt(lib$es6$promise$$internal$$REJECTED, i, reason);\n\t });\n\t };\n\t function lib$es6$promise$polyfill$$polyfill() {\n\t var local;\n\t\n\t if (typeof global !== 'undefined') {\n\t local = global;\n\t } else if (typeof self !== 'undefined') {\n\t local = self;\n\t } else {\n\t try {\n\t local = Function('return this')();\n\t } catch (e) {\n\t throw new Error('polyfill failed because global object is unavailable in this environment');\n\t }\n\t }\n\t\n\t var P = local.Promise;\n\t\n\t if (P && Object.prototype.toString.call(P.resolve()) === '[object Promise]' && !P.cast) {\n\t return;\n\t }\n\t\n\t local.Promise = lib$es6$promise$promise$$default;\n\t }\n\t var lib$es6$promise$polyfill$$default = lib$es6$promise$polyfill$$polyfill;\n\t\n\t var lib$es6$promise$umd$$ES6Promise = {\n\t 'Promise': lib$es6$promise$promise$$default,\n\t 'polyfill': lib$es6$promise$polyfill$$default\n\t };\n\t\n\t /* global define:true module:true window: true */\n\t if (\"function\" === 'function' && __webpack_require__(16)['amd']) {\n\t !(__WEBPACK_AMD_DEFINE_RESULT__ = function() { return lib$es6$promise$umd$$ES6Promise; }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t } else if (typeof module !== 'undefined' && module['exports']) {\n\t module['exports'] = lib$es6$promise$umd$$ES6Promise;\n\t } else if (typeof this !== 'undefined') {\n\t this['ES6Promise'] = lib$es6$promise$umd$$ES6Promise;\n\t }\n\t\n\t lib$es6$promise$polyfill$$default();\n\t}).call(this);\n\t\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(13), (function() { return this; }()), __webpack_require__(17)(module)))\n\n/***/ },\n/* 11 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {\n\t if (true) {\n\t !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, module], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t } else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {\n\t factory(exports, module);\n\t } else {\n\t var mod = {\n\t exports: {}\n\t };\n\t factory(mod.exports, mod);\n\t global.fetchJsonp = mod.exports;\n\t }\n\t})(this, function (exports, module) {\n\t 'use strict';\n\t\n\t var defaultOptions = {\n\t timeout: 5000,\n\t jsonpCallback: 'callback',\n\t jsonpCallbackFunction: null\n\t };\n\t\n\t function generateCallbackFunction() {\n\t return 'jsonp_' + Date.now() + '_' + Math.ceil(Math.random() * 100000);\n\t }\n\t\n\t // Known issue: Will throw 'Uncaught ReferenceError: callback_*** is not defined' error if request timeout\n\t function clearFunction(functionName) {\n\t // IE8 throws an exception when you try to delete a property on window\n\t // http://stackoverflow.com/a/1824228/751089\n\t try {\n\t delete window[functionName];\n\t } catch (e) {\n\t window[functionName] = undefined;\n\t }\n\t }\n\t\n\t function removeScript(scriptId) {\n\t var script = document.getElementById(scriptId);\n\t document.getElementsByTagName('head')[0].removeChild(script);\n\t }\n\t\n\t var fetchJsonp = function fetchJsonp(url) {\n\t var options = arguments[1] === undefined ? {} : arguments[1];\n\t\n\t var timeout = options.timeout != null ? options.timeout : defaultOptions.timeout;\n\t var jsonpCallback = options.jsonpCallback != null ? options.jsonpCallback : defaultOptions.jsonpCallback;\n\t\n\t var timeoutId = undefined;\n\t\n\t return new Promise(function (resolve, reject) {\n\t var callbackFunction = options.jsonpCallbackFunction || generateCallbackFunction();\n\t\n\t window[callbackFunction] = function (response) {\n\t resolve({\n\t ok: true,\n\t // keep consistent with fetch API\n\t json: function json() {\n\t return Promise.resolve(response);\n\t }\n\t });\n\t\n\t if (timeoutId) clearTimeout(timeoutId);\n\t\n\t removeScript(jsonpCallback + '_' + callbackFunction);\n\t\n\t clearFunction(callbackFunction);\n\t };\n\t\n\t // Check if the user set their own params, and if not add a ? to start a list of params\n\t url += url.indexOf('?') === -1 ? '?' : '&';\n\t\n\t var jsonpScript = document.createElement('script');\n\t jsonpScript.setAttribute('src', url + jsonpCallback + '=' + callbackFunction);\n\t jsonpScript.id = jsonpCallback + '_' + callbackFunction;\n\t document.getElementsByTagName('head')[0].appendChild(jsonpScript);\n\t\n\t timeoutId = setTimeout(function () {\n\t reject(new Error('JSONP request to ' + url + ' timed out'));\n\t\n\t clearFunction(callbackFunction);\n\t removeScript(jsonpCallback + '_' + callbackFunction);\n\t }, timeout);\n\t });\n\t };\n\t\n\t // export as global function\n\t /*\n\t let local;\n\t if (typeof global !== 'undefined') {\n\t local = global;\n\t } else if (typeof self !== 'undefined') {\n\t local = self;\n\t } else {\n\t try {\n\t local = Function('return this')();\n\t } catch (e) {\n\t throw new Error('polyfill failed because global object is unavailable in this environment');\n\t }\n\t }\n\t \n\t local.fetchJsonp = fetchJsonp;\n\t */\n\t\n\t module.exports = fetchJsonp;\n\t});\n\n/***/ },\n/* 12 */\n/***/ function(module, exports) {\n\n\t\n\tmodule.exports = function load (src, opts, cb) {\n\t var head = document.head || document.getElementsByTagName('head')[0]\n\t var script = document.createElement('script')\n\t\n\t if (typeof opts === 'function') {\n\t cb = opts\n\t opts = {}\n\t }\n\t\n\t opts = opts || {}\n\t cb = cb || function() {}\n\t\n\t script.type = opts.type || 'text/javascript'\n\t script.charset = opts.charset || 'utf8';\n\t script.async = 'async' in opts ? !!opts.async : true\n\t script.src = src\n\t\n\t if (opts.attrs) {\n\t setAttributes(script, opts.attrs)\n\t }\n\t\n\t if (opts.text) {\n\t script.text = '' + opts.text\n\t }\n\t\n\t var onend = 'onload' in script ? stdOnEnd : ieOnEnd\n\t onend(script, cb)\n\t\n\t // some good legacy browsers (firefox) fail the 'in' detection above\n\t // so as a fallback we always set onload\n\t // old IE will ignore this and new IE will set onload\n\t if (!script.onload) {\n\t stdOnEnd(script, cb);\n\t }\n\t\n\t head.appendChild(script)\n\t}\n\t\n\tfunction setAttributes(script, attrs) {\n\t for (var attr in attrs) {\n\t script.setAttribute(attr, attrs[attr]);\n\t }\n\t}\n\t\n\tfunction stdOnEnd (script, cb) {\n\t script.onload = function () {\n\t this.onerror = this.onload = null\n\t cb(null, script)\n\t }\n\t script.onerror = function () {\n\t // this.onload = null here is necessary\n\t // because even IE9 works not like others\n\t this.onerror = this.onload = null\n\t cb(new Error('Failed to load ' + this.src), script)\n\t }\n\t}\n\t\n\tfunction ieOnEnd (script, cb) {\n\t script.onreadystatechange = function () {\n\t if (this.readyState != 'complete' && this.readyState != 'loaded') return\n\t this.onreadystatechange = null\n\t cb(null, script) // there is no way to catch loading errors in IE8\n\t }\n\t}\n\n\n/***/ },\n/* 13 */\n/***/ function(module, exports) {\n\n\t// shim for using process in browser\n\t\n\tvar process = module.exports = {};\n\tvar queue = [];\n\tvar draining = false;\n\tvar currentQueue;\n\tvar queueIndex = -1;\n\t\n\tfunction cleanUpNextTick() {\n\t draining = false;\n\t if (currentQueue.length) {\n\t queue = currentQueue.concat(queue);\n\t } else {\n\t queueIndex = -1;\n\t }\n\t if (queue.length) {\n\t drainQueue();\n\t }\n\t}\n\t\n\tfunction drainQueue() {\n\t if (draining) {\n\t return;\n\t }\n\t var timeout = setTimeout(cleanUpNextTick);\n\t draining = true;\n\t\n\t var len = queue.length;\n\t while(len) {\n\t currentQueue = queue;\n\t queue = [];\n\t while (++queueIndex < len) {\n\t if (currentQueue) {\n\t currentQueue[queueIndex].run();\n\t }\n\t }\n\t queueIndex = -1;\n\t len = queue.length;\n\t }\n\t currentQueue = null;\n\t draining = false;\n\t clearTimeout(timeout);\n\t}\n\t\n\tprocess.nextTick = function (fun) {\n\t var args = new Array(arguments.length - 1);\n\t if (arguments.length > 1) {\n\t for (var i = 1; i < arguments.length; i++) {\n\t args[i - 1] = arguments[i];\n\t }\n\t }\n\t queue.push(new Item(fun, args));\n\t if (queue.length === 1 && !draining) {\n\t setTimeout(drainQueue, 0);\n\t }\n\t};\n\t\n\t// v8 likes predictible objects\n\tfunction Item(fun, array) {\n\t this.fun = fun;\n\t this.array = array;\n\t}\n\tItem.prototype.run = function () {\n\t this.fun.apply(null, this.array);\n\t};\n\tprocess.title = 'browser';\n\tprocess.browser = true;\n\tprocess.env = {};\n\tprocess.argv = [];\n\tprocess.version = ''; // empty string to avoid regexp issues\n\tprocess.versions = {};\n\t\n\tfunction noop() {}\n\t\n\tprocess.on = noop;\n\tprocess.addListener = noop;\n\tprocess.once = noop;\n\tprocess.off = noop;\n\tprocess.removeListener = noop;\n\tprocess.removeAllListeners = noop;\n\tprocess.emit = noop;\n\t\n\tprocess.binding = function (name) {\n\t throw new Error('process.binding is not supported');\n\t};\n\t\n\tprocess.cwd = function () { return '/' };\n\tprocess.chdir = function (dir) {\n\t throw new Error('process.chdir is not supported');\n\t};\n\tprocess.umask = function() { return 0; };\n\n\n/***/ },\n/* 14 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\tvar strictUriEncode = __webpack_require__(15);\n\t\n\tfunction encode(value, strict) {\n\t\treturn strict ? strictUriEncode(value) : encodeURIComponent(value);\n\t}\n\t\n\texports.extract = function (str) {\n\t\treturn str.split('?')[1] || '';\n\t};\n\t\n\texports.parse = function (str) {\n\t\t// Create an object with no prototype\n\t\t// https://github.com/sindresorhus/query-string/issues/47\n\t\tvar ret = Object.create(null);\n\t\n\t\tif (typeof str !== 'string') {\n\t\t\treturn ret;\n\t\t}\n\t\n\t\tstr = str.trim().replace(/^(\\?|#|&)/, '');\n\t\n\t\tif (!str) {\n\t\t\treturn ret;\n\t\t}\n\t\n\t\tstr.split('&').forEach(function (param) {\n\t\t\tvar parts = param.replace(/\\+/g, ' ').split('=');\n\t\t\t// Firefox (pre 40) decodes `%3D` to `=`\n\t\t\t// https://github.com/sindresorhus/query-string/pull/37\n\t\t\tvar key = parts.shift();\n\t\t\tvar val = parts.length > 0 ? parts.join('=') : undefined;\n\t\n\t\t\tkey = decodeURIComponent(key);\n\t\n\t\t\t// missing `=` should be `null`:\n\t\t\t// http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters\n\t\t\tval = val === undefined ? null : decodeURIComponent(val);\n\t\n\t\t\tif (ret[key] === undefined) {\n\t\t\t\tret[key] = val;\n\t\t\t} else if (Array.isArray(ret[key])) {\n\t\t\t\tret[key].push(val);\n\t\t\t} else {\n\t\t\t\tret[key] = [ret[key], val];\n\t\t\t}\n\t\t});\n\t\n\t\treturn ret;\n\t};\n\t\n\texports.stringify = function (obj, opts) {\n\t\topts = opts || {};\n\t\n\t\tvar strict = opts.strict !== false;\n\t\n\t\treturn obj ? Object.keys(obj).sort().map(function (key) {\n\t\t\tvar val = obj[key];\n\t\n\t\t\tif (val === undefined) {\n\t\t\t\treturn '';\n\t\t\t}\n\t\n\t\t\tif (val === null) {\n\t\t\t\treturn key;\n\t\t\t}\n\t\n\t\t\tif (Array.isArray(val)) {\n\t\t\t\tvar result = [];\n\t\n\t\t\t\tval.slice().sort().forEach(function (val2) {\n\t\t\t\t\tif (val2 === undefined) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif (val2 === null) {\n\t\t\t\t\t\tresult.push(encode(key, strict));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult.push(encode(key, strict) + '=' + encode(val2, strict));\n\t\t\t\t\t}\n\t\t\t\t});\n\t\n\t\t\t\treturn result.join('&');\n\t\t\t}\n\t\n\t\t\treturn encode(key, strict) + '=' + encode(val, strict);\n\t\t}).filter(function (x) {\n\t\t\treturn x.length > 0;\n\t\t}).join('&') : '';\n\t};\n\n\n/***/ },\n/* 15 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\tmodule.exports = function (str) {\n\t\treturn encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n\t\t\treturn '%' + c.charCodeAt(0).toString(16).toUpperCase();\n\t\t});\n\t};\n\n\n/***/ },\n/* 16 */\n/***/ function(module, exports) {\n\n\tmodule.exports = function() { throw new Error(\"define cannot be used indirect\"); };\r\n\n\n/***/ },\n/* 17 */\n/***/ function(module, exports) {\n\n\tmodule.exports = function(module) {\r\n\t\tif(!module.webpackPolyfill) {\r\n\t\t\tmodule.deprecate = function() {};\r\n\t\t\tmodule.paths = [];\r\n\t\t\t// module.parent = undefined by default\r\n\t\t\tmodule.children = [];\r\n\t\t\tmodule.webpackPolyfill = 1;\r\n\t\t}\r\n\t\treturn module;\r\n\t}\r\n\n\n/***/ },\n/* 18 */\n/***/ function(module, exports) {\n\n\t/* (ignored) */\n\n/***/ }\n/******/ ]);\n\n\n/** WEBPACK FOOTER **\n ** ReactPlayer.js\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap ee9f6f2929e0b7e65fa2\n **/","import 'es6-promise'\nimport React, { Component } from 'react'\n\nimport { propTypes, defaultProps } from './props'\nimport players from './players'\n\nexport default class ReactPlayer extends Component {\n static displayName = 'ReactPlayer'\n static propTypes = propTypes\n static defaultProps = defaultProps\n static canPlay (url) {\n return players.some(player => player.canPlay(url))\n }\n componentDidMount () {\n this.progress()\n }\n componentWillUnmount () {\n clearTimeout(this.progressTimeout)\n }\n shouldComponentUpdate (nextProps) {\n return (\n this.props.url !== nextProps.url ||\n this.props.playing !== nextProps.playing ||\n this.props.volume !== nextProps.volume\n )\n }\n seekTo = fraction => {\n const player = this.refs.player\n if (player) {\n player.seekTo(fraction)\n }\n }\n progress = () => {\n if (this.props.url && this.refs.player) {\n let progress = {}\n const loaded = this.refs.player.getFractionLoaded()\n const played = this.refs.player.getFractionPlayed()\n if (loaded !== null && loaded !== this.prevLoaded) {\n progress.loaded = this.prevLoaded = loaded\n }\n if (played !== null && played !== this.prevPlayed && this.props.playing) {\n progress.played = this.prevPlayed = played\n }\n if (progress.loaded || progress.played) {\n this.props.onProgress(progress)\n }\n }\n this.progressTimeout = setTimeout(this.progress, this.props.progressFrequency)\n }\n renderPlayer = Player => {\n const active = Player.canPlay(this.props.url)\n const { youtubeConfig, soundcloudConfig, vimeoConfig, ...activeProps } = this.props\n const props = active ? { ...activeProps, ref: 'player' } : {}\n return (\n \n )\n }\n render () {\n const style = {\n width: this.props.width,\n height: this.props.height\n }\n return (\n
\n {players.map(this.renderPlayer)}\n
\n )\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/ReactPlayer.js\n **/","module.exports = React;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external \"React\"\n ** module id = 1\n ** module chunks = 0\n **/","import { Component } from 'react'\n\nimport { propTypes, defaultProps } from '../props'\n\nconst SEEK_ON_READY_EXPIRY = 5000\n\nexport default class Base extends Component {\n static propTypes = propTypes\n static defaultProps = defaultProps\n isReady = false\n startOnPlay = true\n componentDidMount () {\n if (this.props.url) {\n this.load(this.props.url)\n }\n }\n componentWillUnmount () {\n this.stop()\n }\n componentWillReceiveProps (nextProps) {\n // Invoke player methods based on incoming props\n if (this.props.url !== nextProps.url && nextProps.url) {\n this.seekOnReady = null\n this.startOnPlay = true\n this.load(nextProps.url)\n } else if (this.props.url && !nextProps.url) {\n this.stop()\n clearTimeout(this.updateTimeout)\n } else if (!this.props.playing && nextProps.playing) {\n this.play()\n } else if (this.props.playing && !nextProps.playing) {\n this.pause()\n } else if (this.props.volume !== nextProps.volume) {\n this.setVolume(nextProps.volume)\n }\n }\n shouldComponentUpdate (nextProps) {\n return this.props.url !== nextProps.url\n }\n seekTo (fraction) {\n // When seeking before player is ready, store value and seek later\n if (!this.isReady && fraction !== 0) {\n this.seekOnReady = fraction\n setTimeout(() => { this.seekOnReady = null }, SEEK_ON_READY_EXPIRY)\n }\n }\n onPlay = () => {\n if (this.startOnPlay) {\n this.props.onStart()\n this.startOnPlay = false\n }\n this.props.onPlay()\n this.setVolume(this.props.volume)\n if (this.seekOnReady) {\n this.seekTo(this.seekOnReady)\n this.seekOnReady = null\n }\n this.props.onDuration(this.getDuration())\n }\n onReady = () => {\n this.isReady = true\n if (this.props.playing || this.preloading) {\n this.preloading = false\n if (this.loadOnReady) {\n this.load(this.loadOnReady)\n this.loadOnReady = null\n } else {\n this.play()\n }\n }\n }\n onEnded = () => {\n if (this.props.loop) {\n this.seekTo(0)\n }\n this.props.onEnded()\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/players/Base.js\n **/","import React from 'react'\n\nimport Base from './Base'\n\nconst VIDEO_EXTENSIONS = /\\.(mp4|og[gv]|webm|mov)($|\\?)/i\nconst AUDIO_EXTENSIONS = /\\.(mp3|wav)($|\\?)/i\n\nexport default class FilePlayer extends Base {\n static displayName = 'FilePlayer'\n static canPlay (url) {\n return VIDEO_EXTENSIONS.test(url) || AUDIO_EXTENSIONS.test(url)\n }\n componentDidMount () {\n this.player = this.refs.player\n this.player.oncanplay = this.onReady\n this.player.onplay = this.onPlay\n this.player.onpause = () => this.props.onPause()\n this.player.onended = () => this.onEnded()\n this.player.onerror = e => this.props.onError(e)\n this.player.setAttribute('webkit-playsinline', '')\n super.componentDidMount()\n }\n load (url) {\n this.player.src = url\n }\n play () {\n this.player.play()\n }\n pause () {\n this.player.pause()\n }\n stop () {\n this.player.removeAttribute('src')\n }\n seekTo (fraction) {\n super.seekTo(fraction)\n this.player.currentTime = this.getDuration() * fraction\n }\n setVolume (fraction) {\n this.player.volume = fraction\n }\n getDuration () {\n if (!this.isReady) return null\n return this.player.duration\n }\n getFractionPlayed () {\n if (!this.isReady) return null\n return this.player.currentTime / this.getDuration()\n }\n getFractionLoaded () {\n if (!this.isReady || this.player.buffered.length === 0) return null\n return this.player.buffered.end(0) / this.getDuration()\n }\n render () {\n const { controls, fileConfig } = this.props\n const Media = AUDIO_EXTENSIONS.test(this.props.url) ? 'audio' : 'video'\n const style = {\n width: '100%',\n height: '100%',\n display: this.props.url ? 'block' : 'none'\n }\n return (\n \n )\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/players/FilePlayer.js\n **/","import { PropTypes } from 'react'\n\nexport const propTypes = {\n url: PropTypes.string,\n playing: PropTypes.bool,\n loop: PropTypes.bool,\n controls: PropTypes.bool,\n volume: PropTypes.number,\n width: PropTypes.oneOfType([ PropTypes.string, PropTypes.number ]),\n height: PropTypes.oneOfType([ PropTypes.string, PropTypes.number ]),\n className: PropTypes.string,\n progressFrequency: PropTypes.number,\n soundcloudConfig: PropTypes.shape({\n clientId: PropTypes.string\n }),\n youtubeConfig: PropTypes.shape({\n playerVars: PropTypes.object,\n preload: PropTypes.bool\n }),\n vimeoConfig: PropTypes.shape({\n iframeParams: PropTypes.object,\n preload: PropTypes.bool\n }),\n fileConfig: PropTypes.shape({\n attributes: PropTypes.object\n }),\n onStart: PropTypes.func,\n onPlay: PropTypes.func,\n onPause: PropTypes.func,\n onBuffer: PropTypes.func,\n onEnded: PropTypes.func,\n onError: PropTypes.func,\n onDuration: PropTypes.func,\n onProgress: PropTypes.func\n}\n\nexport const defaultProps = {\n playing: false,\n loop: false,\n controls: false,\n volume: 0.8,\n width: 640,\n height: 360,\n progressFrequency: 1000,\n soundcloudConfig: {\n clientId: 'e8b6f84fbcad14c301ca1355cae1dea2'\n },\n youtubeConfig: {\n playerVars: {},\n preload: false\n },\n vimeoConfig: {\n iframeParams: {},\n preload: false\n },\n fileConfig: {\n attributes: {}\n },\n onStart: function () {},\n onPlay: function () {},\n onPause: function () {},\n onBuffer: function () {},\n onEnded: function () {},\n onError: function () {},\n onDuration: function () {},\n onProgress: function () {}\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/props.js\n **/","import React from 'react'\nimport fetchJSONP from 'fetch-jsonp'\n\nimport FilePlayer from './FilePlayer'\n\nconst RESOLVE_URL = '//api.soundcloud.com/resolve.json'\nconst MATCH_URL = /^https?:\\/\\/(soundcloud.com|snd.sc)\\/([a-z0-9-_]+\\/[a-z0-9-_]+)$/\n\nconst songData = {} // Cache song data requests\n\nexport default class SoundCloud extends FilePlayer {\n static displayName = 'SoundCloud'\n static canPlay (url) {\n return MATCH_URL.test(url)\n }\n state = {\n image: null\n }\n shouldComponentUpdate (nextProps, nextState) {\n return (\n super.shouldComponentUpdate(nextProps, nextState) ||\n this.state.image !== nextState.image\n )\n }\n getSongData (url) {\n if (songData[url]) {\n return Promise.resolve(songData[url])\n }\n return fetchJSONP(RESOLVE_URL + '?url=' + url + '&client_id=' + this.props.soundcloudConfig.clientId)\n .then(response => {\n if (response.ok) {\n songData[url] = response.json()\n return songData[url]\n } else {\n this.props.onError(new Error('SoundCloud track could not be resolved'))\n }\n })\n }\n load (url) {\n this.stop()\n this.getSongData(url).then(data => {\n if (url !== this.props.url) {\n return // Abort if url changes during async requests\n }\n if (!data.streamable) {\n this.props.onError(new Error('SoundCloud track is not streamable'))\n return\n }\n const image = data.artwork_url || data.user.avatar_url\n if (image) {\n this.setState({ image: image.replace('-large', '-t500x500') })\n }\n this.player.src = data.stream_url + '?client_id=' + this.props.soundcloudConfig.clientId\n }, this.props.onError)\n }\n render () {\n const { url, controls } = this.props\n const style = {\n display: url ? 'block' : 'none',\n height: '100%',\n backgroundImage: this.state.image ? 'url(' + this.state.image + ')' : null,\n backgroundSize: 'cover',\n backgroundPosition: 'center'\n }\n return (\n
\n \n
\n )\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/players/SoundCloud.js\n **/","import React from 'react'\nimport { stringify } from 'query-string'\n\nimport Base from './Base'\n\nconst IFRAME_SRC = 'https://player.vimeo.com/video/'\nconst MATCH_URL = /https?:\\/\\/(?:www\\.|player\\.)?vimeo.com\\/(?:channels\\/(?:\\w+\\/)?|groups\\/([^\\/]*)\\/videos\\/|album\\/(\\d+)\\/video\\/|video\\/|)(\\d+)(?:$|\\/|\\?)/\nconst MATCH_MESSAGE_ORIGIN = /^https?:\\/\\/player.vimeo.com/\nconst BLANK_VIDEO_URL = 'https://vimeo.com/127250231'\nconst DEFAULT_IFRAME_PARAMS = {\n api: 1,\n autoplay: 0,\n badge: 0,\n byline: 0,\n fullscreen: 1,\n portrait: 0,\n title: 0\n}\n\nexport default class Vimeo extends Base {\n static displayName = 'Vimeo'\n static canPlay (url) {\n return MATCH_URL.test(url)\n }\n componentDidMount () {\n window.addEventListener('message', this.onMessage, false)\n this.iframe = this.refs.iframe\n\n if (!this.props.url && this.props.vimeoConfig.preload) {\n this.preloading = true\n this.load(BLANK_VIDEO_URL)\n }\n\n super.componentDidMount()\n }\n getIframeParams () {\n return { ...DEFAULT_IFRAME_PARAMS, ...this.props.vimeoConfig.iframeParams }\n }\n load (url) {\n const id = url.match(MATCH_URL)[3]\n this.iframe.src = IFRAME_SRC + id + '?' + stringify(this.getIframeParams())\n }\n play () {\n this.postMessage('play')\n }\n pause () {\n this.postMessage('pause')\n }\n stop () {\n this.iframe.src = ''\n }\n seekTo (fraction) {\n super.seekTo(fraction)\n this.postMessage('seekTo', this.duration * fraction)\n }\n setVolume (fraction) {\n this.postMessage('setVolume', fraction)\n }\n getDuration () {\n return this.duration\n }\n getFractionPlayed () {\n return this.fractionPlayed || null\n }\n getFractionLoaded () {\n return this.fractionLoaded || null\n }\n onMessage = e => {\n if (!MATCH_MESSAGE_ORIGIN.test(e.origin)) return\n this.origin = this.origin || e.origin\n const data = JSON.parse(e.data)\n if (data.event === 'ready') {\n this.postMessage('getDuration')\n this.postMessage('addEventListener', 'playProgress')\n this.postMessage('addEventListener', 'loadProgress')\n this.postMessage('addEventListener', 'play')\n this.postMessage('addEventListener', 'pause')\n this.postMessage('addEventListener', 'finish')\n }\n if (data.event === 'playProgress') this.fractionPlayed = data.data.percent\n if (data.event === 'loadProgress') this.fractionLoaded = data.data.percent\n if (data.event === 'play') this.onPlay()\n if (data.event === 'pause') this.props.onPause()\n if (data.event === 'finish') this.onEnded()\n if (data.method === 'getDuration') {\n this.duration = data.value // Store for use later\n this.onReady()\n }\n }\n postMessage = (method, value) => {\n if (!this.origin) return\n const data = JSON.stringify({ method, value })\n return this.iframe.contentWindow && this.iframe.contentWindow.postMessage(data, this.origin)\n }\n render () {\n const { fullscreen } = this.getIframeParams()\n const style = {\n display: this.props.url ? 'block' : 'none',\n width: '100%',\n height: '100%'\n }\n return