{"version":3,"file":"static/chunks/9054-8a1b8c418abdd274.js","sources":["webpack://_N_E/./node_modules/email-validator/index.js","webpack://_N_E/./node_modules/fast-deep-equal/index.js","webpack://_N_E/./node_modules/load-script/index.js","webpack://_N_E/./node_modules/password-validator/src/constants.js","webpack://_N_E/./node_modules/password-validator/src/index.js","webpack://_N_E/./node_modules/password-validator/src/lib.js","webpack://_N_E/./node_modules/react-youtube/dist/index.esm.js","webpack://_N_E/./node_modules/react-youtube/node_modules/prop-types/factoryWithThrowingShims.js","webpack://_N_E/./node_modules/react-youtube/node_modules/prop-types/index.js","webpack://_N_E/./node_modules/react-youtube/node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack://_N_E/./node_modules/sister/src/sister.js","webpack://_N_E/./node_modules/youtube-player/dist/FunctionStateMap.js","webpack://_N_E/./node_modules/youtube-player/dist/YouTubePlayer.js","webpack://_N_E/./node_modules/youtube-player/dist/constants/PlayerStates.js","webpack://_N_E/./node_modules/youtube-player/dist/eventNames.js","webpack://_N_E/./node_modules/youtube-player/dist/functionNames.js","webpack://_N_E/./node_modules/youtube-player/dist/index.js","webpack://_N_E/./node_modules/youtube-player/dist/loadYouTubeIframeApi.js","webpack://_N_E/./node_modules/youtube-player/node_modules/debug/src/browser.js","webpack://_N_E/./node_modules/youtube-player/node_modules/debug/src/debug.js","webpack://_N_E/./node_modules/youtube-player/node_modules/ms/index.js"],"sourceRoot":"","sourcesContent":["\"use strict\";\r\n\r\nvar tester = /^[-!#$%&'*+\\/0-9=?A-Z^_a-z{|}~](\\.?[-!#$%&'*+\\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\\.?[a-zA-Z0-9])*\\.[a-zA-Z](-?[a-zA-Z0-9])+$/;\r\n// Thanks to:\r\n// http://fightingforalostcause.net/misc/2006/compare-email-regex.php\r\n// http://thedailywtf.com/Articles/Validating_Email_Addresses.aspx\r\n// http://stackoverflow.com/questions/201323/what-is-the-best-regular-expression-for-validating-email-addresses/201378#201378\r\nexports.validate = function(email)\r\n{\r\n\tif (!email)\r\n\t\treturn false;\r\n\t\t\r\n\tif(email.length>254)\r\n\t\treturn false;\r\n\r\n\tvar valid = tester.test(email);\r\n\tif(!valid)\r\n\t\treturn false;\r\n\r\n\t// Further checking of some things regex can't handle\r\n\tvar parts = email.split(\"@\");\r\n\tif(parts[0].length>64)\r\n\t\treturn false;\r\n\r\n\tvar domainParts = parts[1].split(\".\");\r\n\tif(domainParts.some(function(part) { return part.length>63; }))\r\n\t\treturn false;\r\n\r\n\treturn true;\r\n}","'use strict';\n\n// do not edit .js files directly - edit src/index.jst\n\n\n\nmodule.exports = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n","\nmodule.exports = function load (src, opts, cb) {\n var head = document.head || document.getElementsByTagName('head')[0]\n var script = document.createElement('script')\n\n if (typeof opts === 'function') {\n cb = opts\n opts = {}\n }\n\n opts = opts || {}\n cb = cb || function() {}\n\n script.type = opts.type || 'text/javascript'\n script.charset = opts.charset || 'utf8';\n script.async = 'async' in opts ? !!opts.async : true\n script.src = src\n\n if (opts.attrs) {\n setAttributes(script, opts.attrs)\n }\n\n if (opts.text) {\n script.text = '' + opts.text\n }\n\n var onend = 'onload' in script ? stdOnEnd : ieOnEnd\n onend(script, cb)\n\n // some good legacy browsers (firefox) fail the 'in' detection above\n // so as a fallback we always set onload\n // old IE will ignore this and new IE will set onload\n if (!script.onload) {\n stdOnEnd(script, cb);\n }\n\n head.appendChild(script)\n}\n\nfunction setAttributes(script, attrs) {\n for (var attr in attrs) {\n script.setAttribute(attr, attrs[attr]);\n }\n}\n\nfunction stdOnEnd (script, cb) {\n script.onload = function () {\n this.onerror = this.onload = null\n cb(null, script)\n }\n script.onerror = function () {\n // this.onload = null here is necessary\n // because even IE9 works not like others\n this.onerror = this.onload = null\n cb(new Error('Failed to load ' + this.src), script)\n }\n}\n\nfunction ieOnEnd (script, cb) {\n script.onreadystatechange = function () {\n if (this.readyState != 'complete' && this.readyState != 'loaded') return\n this.onreadystatechange = null\n cb(null, script) // there is no way to catch loading errors in IE8\n }\n}\n","module.exports = {\n error: {\n length: 'Length should be a valid positive number',\n password: 'Password should be a valid string'\n },\n regex: {\n digits: /\\d+/,\n letters: /[a-zA-Z]+/,\n symbols: /[`~\\!@#\\$%\\^\\&\\*\\(\\)\\-_\\=\\+\\[\\{\\}\\]\\\\\\|;:'\",<.>\\/\\?€£¥₹]+/,\n spaces: /[\\s]+/\n }\n};\n","var lib = require('./lib');\nvar error = require('./constants').error;\n\n/**\n * Validates that a number is a valid length (positive number)\n *\n * @private\n * @param {number} num - Number to validate\n */\nfunction _validateLength(num) {\n if (!num || typeof num !== 'number' || num < 0) {\n throw new Error(error.length);\n }\n}\n\n/**\n * Tests a validation and return the result\n *\n * @private\n * @param {string} property - Property to validate\n * @return {boolean} Boolean value indicting the validity\n * of the password against the property\n */\nfunction _isPasswordValidFor(property) {\n return lib[property.method].apply(this, property.arguments);\n}\n\n/**\n * Registers the properties of a password-validation schema object\n *\n * @private\n * @param {string} func - Property name\n * @param {array} args - arguments for the func property\n */\nfunction _register(func, args) {\n // Add property to the schema\n this.properties.push({ method: func, arguments: args });\n return this;\n}\n\n/**\n * Creates a password-validator schema\n *\n * @constructor\n */\nfunction PasswordValidator() {\n // Initialize a schema with no properties defined\n this.properties = [];\n}\n\n/**\n * Method to validate the password against schema\n *\n * @param {string} pwd - password to valdiate\n * @param {object} options - optional options to configure validation\n * @param {boolean} [options.list] - asks for a list of validation\n * failures instead of just true/false\n * @return {boolean|array} Boolean value indicting the validity\n * of the password as per schema, if 'options.list'\n * is not set. Otherwise, it returns an array of\n * property names which failed validations\n */\nPasswordValidator.prototype.validate = function (pwd, options) {\n // Checks if pwd is invalid\n if (typeof pwd !== 'string') {\n throw new Error(error.password);\n }\n\n // Sets password string\n this.password = pwd;\n\n // Sets that no inversion takes place by default\n this.positive = true;\n\n var _this = this;\n\n if (options && options.list === true) {\n return this.properties.reduce(function (errorList, property) {\n // Applies all validations defined in lib one by one\n if (!_isPasswordValidFor.call(_this, property)) {\n // If the validation for a property fails,\n // add it to the error list\n return errorList.concat(property.method);\n }\n return errorList;\n }, []);\n }\n\n // Returns the result of the validations\n return this.properties.every(function (property) {\n // Applies all validations defined in lib one by one\n return _isPasswordValidFor.call(_this, property);\n });\n};\n\n/**\n * Rule to invert the next applied rules.\n * All the rules applied after 'not' will have opposite effect,\n * until 'has' rule is applied\n */\nPasswordValidator.prototype.not = function not() {\n return _register.call(this, 'not', arguments);\n};\n\n/**\n * Rule to invert the effects of 'not'\n * Apart from that, 'has' is also used\n * to make the api readable and chainable\n */\nPasswordValidator.prototype.has = function has() {\n return _register.call(this, 'has', arguments);\n};\n\n/**\n * Rule to invert the effects of 'not'\n * Apart from that, 'is' is also used\n * to make the api readable and chainable\n */\nPasswordValidator.prototype.is = function is() {\n return _register.call(this, 'is', arguments);\n};\n\n/**\n * Rule to specify a minimum length of the password\n *\n * @param {number} num - minimum length\n */\nPasswordValidator.prototype.min = function min(num) {\n _validateLength(num);\n return _register.call(this, 'min', arguments);\n};\n\n/**\n * Rule to specify a maximum length of the password\n *\n * @param {number} num - maximum length\n */\nPasswordValidator.prototype.max = function max(num) {\n _validateLength(num);\n return _register.call(this, 'max', arguments);\n};\n\n/**\n * Rule to mandate the presence of digits in the password\n */\nPasswordValidator.prototype.digits = function digits() {\n return _register.call(this, 'digits', arguments);\n};\n\n/**\n * Rule to mandate the presence of letters in the password\n */\nPasswordValidator.prototype.letters = function letters() {\n return _register.call(this, 'letters', arguments);\n};\n\n/**\n * Rule to mandate the presence of uppercase letters in the password\n */\nPasswordValidator.prototype.uppercase = function uppercase() {\n return _register.call(this, 'uppercase', arguments);\n};\n\n/**\n * Rule to mandate the presence of lowercase letters in the password\n */\nPasswordValidator.prototype.lowercase = function lowercase() {\n return _register.call(this, 'lowercase', arguments);\n};\n\n/**\n * Rule to mandate the presence of symbols in the password\n */\nPasswordValidator.prototype.symbols = function symbols() {\n return _register.call(this, 'symbols', arguments);\n};\n\n/**\n * Rule to mendate the presense of space in the password\n * It can be used along with 'not' to not allow spaces\n * in the password\n */\nPasswordValidator.prototype.spaces = function spaces() {\n return _register.call(this, 'spaces', arguments);\n};\n\n/**\n * Rule to whitelist words to be used as password\n *\n * @param {array} list - list of values allowed\n */\nPasswordValidator.prototype.oneOf = function oneOf() {\n return _register.call(this, 'oneOf', arguments);\n};\n\nmodule.exports = PasswordValidator;\n","/**\n * Generic method to test regex\n *\n * @private\n * @param {string} regex - regex to test\n * with password\n */\nvar regex = require('./constants').regex;\n\nfunction _process(regexp) {\n return new RegExp(regexp).test(this.password) === this.positive;\n}\n\nmodule.exports = {\n\n /**\n * Method to invert the next validations\n *\n * @param {RegExp} [symbol] - custom Regex which should not be present\n */\n not: function not(symbol) {\n this.positive = false;\n if (symbol) {\n return _process.call(this, symbol);\n }\n return true;\n },\n\n /**\n * Method to invert the effects of not()\n *\n * @param {RegExp} [symbol] - custom Regex which should be present\n */\n has: function has(symbol) {\n this.positive = true;\n if (symbol) {\n return _process.call(this, symbol);\n }\n return true;\n },\n\n /**\n * Method to invert the effects of not() and\n * to make the api readable and chainable\n *\n */\n is: function is() {\n this.positive = true;\n return true;\n },\n\n /**\n * Method to specify a minimum length\n *\n * @param {number} num - minimum length\n */\n min: function min(num) {\n return this.password.length >= num;\n },\n\n /**\n * Method to specify a maximum length\n *\n * @param {number} num - maximum length\n */\n max: function max(num) {\n return this.password.length <= num;\n },\n\n /**\n * Method to validate the presence of digits\n */\n digits: function digits() {\n return _process.call(this, regex.digits);\n },\n\n /**\n * Method to validate the presence of letters\n */\n letters: function letters() {\n return _process.call(this, regex.letters);\n },\n\n /**\n * Method to validate the presence of uppercase letters\n */\n uppercase: function uppercase() {\n return (this.password !== this.password.toLowerCase()) === this.positive;\n },\n\n /**\n * Method to validate the presence of lowercase letters\n */\n lowercase: function lowercase() {\n return (this.password !== this.password.toUpperCase()) === this.positive;\n },\n\n /**\n * Method to validate the presence of symbols\n */\n symbols: function symbols() {\n return _process.call(this, regex.symbols);\n },\n\n /**\n * Method to validate the presence of space\n */\n spaces: function spaces() {\n return _process.call(this, regex.spaces);\n },\n\n /**\n * Method to provide pre-defined values for password\n *\n * @param {array} list - list of values allowed\n */\n oneOf: function oneOf(list) {\n return list.indexOf(this.password) >= 0 === this.positive;\n }\n};\n","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport isEqual from 'fast-deep-equal';\nimport youTubePlayer from 'youtube-player';\n/**\n * Check whether a `props` change should result in the video being updated.\n *\n * @param {Object} prevProps\n * @param {Object} props\n */\n\nfunction shouldUpdateVideo(prevProps, props) {\n // A changing video should always trigger an update\n if (prevProps.videoId !== props.videoId) {\n return true;\n } // Otherwise, a change in the start/end time playerVars also requires a player\n // update.\n\n\n var prevVars = prevProps.opts.playerVars || {};\n var vars = props.opts.playerVars || {};\n return prevVars.start !== vars.start || prevVars.end !== vars.end;\n}\n/**\n * Neutralize API options that only require a video update, leaving only options\n * that require a player reset. The results can then be compared to see if a\n * player reset is necessary.\n *\n * @param {Object} opts\n */\n\n\nfunction filterResetOptions(opts) {\n return _objectSpread(_objectSpread({}, opts), {}, {\n height: 0,\n width: 0,\n playerVars: _objectSpread(_objectSpread({}, opts.playerVars), {}, {\n autoplay: 0,\n start: 0,\n end: 0\n })\n });\n}\n/**\n * Check whether a `props` change should result in the player being reset.\n * The player is reset when the `props.opts` change, except if the only change\n * is in the `start` and `end` playerVars, because a video update can deal with\n * those.\n *\n * @param {Object} prevProps\n * @param {Object} props\n */\n\n\nfunction shouldResetPlayer(prevProps, props) {\n return prevProps.videoId !== props.videoId || !isEqual(filterResetOptions(prevProps.opts), filterResetOptions(props.opts));\n}\n/**\n * Check whether a props change should result in an id or className update.\n *\n * @param {Object} prevProps\n * @param {Object} props\n */\n\n\nfunction shouldUpdatePlayer(prevProps, props) {\n return prevProps.id !== props.id || prevProps.className !== props.className || prevProps.opts.width !== props.opts.width || prevProps.opts.height !== props.opts.height || prevProps.title !== props.title;\n}\n\nvar YouTube = /*#__PURE__*/function (_React$Component) {\n _inherits(YouTube, _React$Component);\n\n var _super = _createSuper(YouTube);\n\n /**\n * Expose PlayerState constants for convenience. These constants can also be\n * accessed through the global YT object after the YouTube IFrame API is instantiated.\n * https://developers.google.com/youtube/iframe_api_reference#onStateChange\n */\n function YouTube(props) {\n var _this;\n\n _classCallCheck(this, YouTube);\n\n _this = _super.call(this, props);\n\n _defineProperty(_assertThisInitialized(_this), \"onPlayerReady\", function (event) {\n return _this.props.onReady(event);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onPlayerError\", function (event) {\n return _this.props.onError(event);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onPlayerStateChange\", function (event) {\n _this.props.onStateChange(event);\n\n switch (event.data) {\n case YouTube.PlayerState.ENDED:\n _this.props.onEnd(event);\n\n break;\n\n case YouTube.PlayerState.PLAYING:\n _this.props.onPlay(event);\n\n break;\n\n case YouTube.PlayerState.PAUSED:\n _this.props.onPause(event);\n\n break;\n\n default:\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onPlayerPlaybackRateChange\", function (event) {\n return _this.props.onPlaybackRateChange(event);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onPlayerPlaybackQualityChange\", function (event) {\n return _this.props.onPlaybackQualityChange(event);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"createPlayer\", function () {\n // do not attempt to create a player server-side, it won't work\n if (typeof document === 'undefined') return; // create player\n\n var playerOpts = _objectSpread(_objectSpread({}, _this.props.opts), {}, {\n // preload the `videoId` video if one is already given\n videoId: _this.props.videoId\n });\n\n _this.internalPlayer = youTubePlayer(_this.container, playerOpts); // attach event handlers\n\n _this.internalPlayer.on('ready', _this.onPlayerReady);\n\n _this.internalPlayer.on('error', _this.onPlayerError);\n\n _this.internalPlayer.on('stateChange', _this.onPlayerStateChange);\n\n _this.internalPlayer.on('playbackRateChange', _this.onPlayerPlaybackRateChange);\n\n _this.internalPlayer.on('playbackQualityChange', _this.onPlayerPlaybackQualityChange);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"resetPlayer\", function () {\n return _this.internalPlayer.destroy().then(_this.createPlayer);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"updatePlayer\", function () {\n _this.internalPlayer.getIframe().then(function (iframe) {\n if (_this.props.id) iframe.setAttribute('id', _this.props.id);else iframe.removeAttribute('id');\n if (_this.props.className) iframe.setAttribute('class', _this.props.className);else iframe.removeAttribute('class');\n if (_this.props.opts && _this.props.opts.width) iframe.setAttribute('width', _this.props.opts.width);else iframe.removeAttribute('width');\n if (_this.props.opts && _this.props.opts.height) iframe.setAttribute('height', _this.props.opts.height);else iframe.removeAttribute('height');\n if (typeof _this.props.title === 'string') iframe.setAttribute('title', _this.props.title);else iframe.setAttribute('title', 'YouTube video player');\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"getInternalPlayer\", function () {\n return _this.internalPlayer;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"updateVideo\", function () {\n if (typeof _this.props.videoId === 'undefined' || _this.props.videoId === null) {\n _this.internalPlayer.stopVideo();\n\n return;\n } // set queueing options\n\n\n var autoplay = false;\n var opts = {\n videoId: _this.props.videoId\n };\n\n if ('playerVars' in _this.props.opts) {\n autoplay = _this.props.opts.playerVars.autoplay === 1;\n\n if ('start' in _this.props.opts.playerVars) {\n opts.startSeconds = _this.props.opts.playerVars.start;\n }\n\n if ('end' in _this.props.opts.playerVars) {\n opts.endSeconds = _this.props.opts.playerVars.end;\n }\n } // if autoplay is enabled loadVideoById\n\n\n if (autoplay) {\n _this.internalPlayer.loadVideoById(opts);\n\n return;\n } // default behaviour just cues the video\n\n\n _this.internalPlayer.cueVideoById(opts);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"refContainer\", function (container) {\n _this.container = container;\n });\n\n _this.container = null;\n _this.internalPlayer = null;\n return _this;\n }\n\n _createClass(YouTube, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.createPlayer();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (shouldUpdatePlayer(prevProps, this.props)) {\n this.updatePlayer();\n }\n\n if (shouldResetPlayer(prevProps, this.props)) {\n this.resetPlayer();\n }\n\n if (shouldUpdateVideo(prevProps, this.props)) {\n this.updateVideo();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n /**\n * Note: The `youtube-player` package that is used promisifies all YouTube\n * Player API calls, which introduces a delay of a tick before it actually\n * gets destroyed. Since React attempts to remove the element instantly\n * this method isn't quick enough to reset the container element.\n */\n this.internalPlayer.destroy();\n }\n /**\n * https://developers.google.com/youtube/iframe_api_reference#onReady\n *\n * @param {Object} event\n * @param {Object} target - player object\n */\n\n }, {\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: this.props.containerClassName\n }, /*#__PURE__*/React.createElement(\"div\", {\n id: this.props.id,\n className: this.props.className,\n ref: this.refContainer,\n loading: this.props.loading\n }));\n }\n }]);\n\n return YouTube;\n}(React.Component);\n\n_defineProperty(YouTube, \"PlayerState\", {\n UNSTARTED: -1,\n ENDED: 0,\n PLAYING: 1,\n PAUSED: 2,\n BUFFERING: 3,\n CUED: 5\n});\n\nYouTube.propTypes = {\n videoId: PropTypes.string,\n // custom ID for player element\n id: PropTypes.string,\n // custom class name for player element\n className: PropTypes.string,\n // custom class name for player container element\n containerClassName: PropTypes.string,\n // custom title for the iFrame, see https://www.w3.org/TR/WCAG20-TECHS/H64.html\n title: PropTypes.string,\n // custom loading for player element\n loading: PropTypes.oneOf(['lazy', 'eager', 'auto']),\n // https://developers.google.com/youtube/iframe_api_reference#Loading_a_Video_Player\n opts: PropTypes.objectOf(PropTypes.any),\n // event subscriptions\n onReady: PropTypes.func,\n onError: PropTypes.func,\n onPlay: PropTypes.func,\n onPause: PropTypes.func,\n onEnd: PropTypes.func,\n onStateChange: PropTypes.func,\n onPlaybackRateChange: PropTypes.func,\n onPlaybackQualityChange: PropTypes.func\n};\nYouTube.defaultProps = {\n videoId: null,\n id: null,\n className: null,\n loading: null,\n opts: {},\n containerClassName: '',\n onReady: function onReady() {},\n onError: function onError() {},\n onPlay: function onPlay() {},\n onPause: function onPause() {},\n onEnd: function onEnd() {},\n onStateChange: function onStateChange() {},\n onPlaybackRateChange: function onPlaybackRateChange() {},\n onPlaybackQualityChange: function onPlaybackQualityChange() {},\n title: null\n};\nexport default YouTube;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","'use strict';\n\nvar Sister;\n\n/**\n* @link https://github.com/gajus/sister for the canonical source repository\n* @license https://github.com/gajus/sister/blob/master/LICENSE BSD 3-Clause\n*/\nSister = function () {\n var sister = {},\n events = {};\n\n /**\n * @name handler\n * @function\n * @param {Object} data Event data.\n */\n\n /**\n * @param {String} name Event name.\n * @param {handler} handler\n * @return {listener}\n */\n sister.on = function (name, handler) {\n var listener = {name: name, handler: handler};\n events[name] = events[name] || [];\n events[name].unshift(listener);\n return listener;\n };\n\n /**\n * @param {listener}\n */\n sister.off = function (listener) {\n var index = events[listener.name].indexOf(listener);\n\n if (index !== -1) {\n events[listener.name].splice(index, 1);\n }\n };\n\n /**\n * @param {String} name Event name.\n * @param {Object} data Event data.\n */\n sister.trigger = function (name, data) {\n var listeners = events[name],\n i;\n\n if (listeners) {\n i = listeners.length;\n while (i--) {\n listeners[i].handler(data);\n }\n }\n };\n\n return sister;\n};\n\nmodule.exports = Sister;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _PlayerStates = require('./constants/PlayerStates');\n\nvar _PlayerStates2 = _interopRequireDefault(_PlayerStates);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = {\n pauseVideo: {\n acceptableStates: [_PlayerStates2.default.ENDED, _PlayerStates2.default.PAUSED],\n stateChangeRequired: false\n },\n playVideo: {\n acceptableStates: [_PlayerStates2.default.ENDED, _PlayerStates2.default.PLAYING],\n stateChangeRequired: false\n },\n seekTo: {\n acceptableStates: [_PlayerStates2.default.ENDED, _PlayerStates2.default.PLAYING, _PlayerStates2.default.PAUSED],\n stateChangeRequired: true,\n\n // TRICKY: `seekTo` may not cause a state change if no buffering is\n // required.\n timeout: 3000\n }\n};\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _debug = require('debug');\n\nvar _debug2 = _interopRequireDefault(_debug);\n\nvar _functionNames = require('./functionNames');\n\nvar _functionNames2 = _interopRequireDefault(_functionNames);\n\nvar _eventNames = require('./eventNames');\n\nvar _eventNames2 = _interopRequireDefault(_eventNames);\n\nvar _FunctionStateMap = require('./FunctionStateMap');\n\nvar _FunctionStateMap2 = _interopRequireDefault(_FunctionStateMap);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/* eslint-disable promise/prefer-await-to-then */\n\nvar debug = (0, _debug2.default)('youtube-player');\n\nvar YouTubePlayer = {};\n\n/**\n * Construct an object that defines an event handler for all of the YouTube\n * player events. Proxy captured events through an event emitter.\n *\n * @todo Capture event parameters.\n * @see https://developers.google.com/youtube/iframe_api_reference#Events\n */\nYouTubePlayer.proxyEvents = function (emitter) {\n var events = {};\n\n var _loop = function _loop(eventName) {\n var onEventName = 'on' + eventName.slice(0, 1).toUpperCase() + eventName.slice(1);\n\n events[onEventName] = function (event) {\n debug('event \"%s\"', onEventName, event);\n\n emitter.trigger(eventName, event);\n };\n };\n\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = _eventNames2.default[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var eventName = _step.value;\n\n _loop(eventName);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n return events;\n};\n\n/**\n * Delays player API method execution until player state is ready.\n *\n * @todo Proxy all of the methods using Object.keys.\n * @todo See TRICKY below.\n * @param playerAPIReady Promise that resolves when player is ready.\n * @param strictState A flag designating whether or not to wait for\n * an acceptable state when calling supported functions.\n * @returns {Object}\n */\nYouTubePlayer.promisifyPlayer = function (playerAPIReady) {\n var strictState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n var functions = {};\n\n var _loop2 = function _loop2(functionName) {\n if (strictState && _FunctionStateMap2.default[functionName]) {\n functions[functionName] = function () {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return playerAPIReady.then(function (player) {\n var stateInfo = _FunctionStateMap2.default[functionName];\n var playerState = player.getPlayerState();\n\n // eslint-disable-next-line no-warning-comments\n // TODO: Just spread the args into the function once Babel is fixed:\n // https://github.com/babel/babel/issues/4270\n //\n // eslint-disable-next-line prefer-spread\n var value = player[functionName].apply(player, args);\n\n // TRICKY: For functions like `seekTo`, a change in state must be\n // triggered given that the resulting state could match the initial\n // state.\n if (stateInfo.stateChangeRequired ||\n\n // eslint-disable-next-line no-extra-parens\n Array.isArray(stateInfo.acceptableStates) && stateInfo.acceptableStates.indexOf(playerState) === -1) {\n return new Promise(function (resolve) {\n var onPlayerStateChange = function onPlayerStateChange() {\n var playerStateAfterChange = player.getPlayerState();\n\n var timeout = void 0;\n\n if (typeof stateInfo.timeout === 'number') {\n timeout = setTimeout(function () {\n player.removeEventListener('onStateChange', onPlayerStateChange);\n\n resolve();\n }, stateInfo.timeout);\n }\n\n if (Array.isArray(stateInfo.acceptableStates) && stateInfo.acceptableStates.indexOf(playerStateAfterChange) !== -1) {\n player.removeEventListener('onStateChange', onPlayerStateChange);\n\n clearTimeout(timeout);\n\n resolve();\n }\n };\n\n player.addEventListener('onStateChange', onPlayerStateChange);\n }).then(function () {\n return value;\n });\n }\n\n return value;\n });\n };\n } else {\n functions[functionName] = function () {\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return playerAPIReady.then(function (player) {\n // eslint-disable-next-line no-warning-comments\n // TODO: Just spread the args into the function once Babel is fixed:\n // https://github.com/babel/babel/issues/4270\n //\n // eslint-disable-next-line prefer-spread\n return player[functionName].apply(player, args);\n });\n };\n }\n };\n\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n for (var _iterator2 = _functionNames2.default[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n var functionName = _step2.value;\n\n _loop2(functionName);\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n\n return functions;\n};\n\nexports.default = YouTubePlayer;\nmodule.exports = exports['default'];","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = {\n BUFFERING: 3,\n ENDED: 0,\n PAUSED: 2,\n PLAYING: 1,\n UNSTARTED: -1,\n VIDEO_CUED: 5\n};\nmodule.exports = exports[\"default\"];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\n\n/**\n * @see https://developers.google.com/youtube/iframe_api_reference#Events\n * `volumeChange` is not officially supported but seems to work\n * it emits an object: `{volume: 82.6923076923077, muted: false}`\n */\nexports.default = ['ready', 'stateChange', 'playbackQualityChange', 'playbackRateChange', 'error', 'apiChange', 'volumeChange'];\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\n\n/**\n * @see https://developers.google.com/youtube/iframe_api_reference#Functions\n */\nexports.default = ['cueVideoById', 'loadVideoById', 'cueVideoByUrl', 'loadVideoByUrl', 'playVideo', 'pauseVideo', 'stopVideo', 'getVideoLoadedFraction', 'cuePlaylist', 'loadPlaylist', 'nextVideo', 'previousVideo', 'playVideoAt', 'setShuffle', 'setLoop', 'getPlaylist', 'getPlaylistIndex', 'setOption', 'mute', 'unMute', 'isMuted', 'setVolume', 'getVolume', 'seekTo', 'getPlayerState', 'getPlaybackRate', 'setPlaybackRate', 'getAvailablePlaybackRates', 'getPlaybackQuality', 'setPlaybackQuality', 'getAvailableQualityLevels', 'getCurrentTime', 'getDuration', 'removeEventListener', 'getVideoUrl', 'getVideoEmbedCode', 'getOptions', 'getOption', 'addEventListener', 'destroy', 'setSize', 'getIframe'];\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _sister = require('sister');\n\nvar _sister2 = _interopRequireDefault(_sister);\n\nvar _loadYouTubeIframeApi = require('./loadYouTubeIframeApi');\n\nvar _loadYouTubeIframeApi2 = _interopRequireDefault(_loadYouTubeIframeApi);\n\nvar _YouTubePlayer = require('./YouTubePlayer');\n\nvar _YouTubePlayer2 = _interopRequireDefault(_YouTubePlayer);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * @typedef YT.Player\n * @see https://developers.google.com/youtube/iframe_api_reference\n * */\n\n/**\n * @see https://developers.google.com/youtube/iframe_api_reference#Loading_a_Video_Player\n */\nvar youtubeIframeAPI = void 0;\n\n/**\n * A factory function used to produce an instance of YT.Player and queue function calls and proxy events of the resulting object.\n *\n * @param maybeElementId Either An existing YT.Player instance,\n * the DOM element or the id of the HTML element where the API will insert an