UNPKG

@kablamo/react-transcript-editor

Version:

A React component to make transcribing audio and video easier and faster.

971 lines (765 loc) 41 kB
module.exports = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 26); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports) { module.exports = require("react"); /***/ }), /* 1 */ /***/ (function(module, exports) { module.exports = require("prop-types"); /***/ }), /* 2 */, /* 3 */, /* 4 */, /* 5 */, /* 6 */ /***/ (function(module, exports, __webpack_require__) { var content = __webpack_require__(34); if(typeof content === 'string') content = [[module.i, content, '']]; var transform; var insertInto; var options = {"hmr":true} options.transform = transform options.insertInto = undefined; var update = __webpack_require__(10)(content, options); if(content.locals) module.exports = content.locals; if(false) {} /***/ }), /* 7 */, /* 8 */, /* 9 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ // css base code, injected by the css-loader module.exports = function (useSourceMap) { var list = []; // return the list of modules as css string list.toString = function toString() { return this.map(function (item) { var content = cssWithMappingToString(item, useSourceMap); if (item[2]) { return '@media ' + item[2] + '{' + content + '}'; } else { return content; } }).join(''); }; // import a list of modules into the list list.i = function (modules, mediaQuery) { if (typeof modules === 'string') { modules = [[null, modules, '']]; } var alreadyImportedModules = {}; for (var i = 0; i < this.length; i++) { var id = this[i][0]; if (id != null) { alreadyImportedModules[id] = true; } } for (i = 0; i < modules.length; i++) { var item = modules[i]; // skip already imported module // this implementation is not 100% perfect for weird media query combinations // when a module is imported multiple times with different media queries. // I hope this will never occur (Hey this way we have smaller bundles) if (item[0] == null || !alreadyImportedModules[item[0]]) { if (mediaQuery && !item[2]) { item[2] = mediaQuery; } else if (mediaQuery) { item[2] = '(' + item[2] + ') and (' + mediaQuery + ')'; } list.push(item); } } }; return list; }; function cssWithMappingToString(item, useSourceMap) { var content = item[1] || ''; var cssMapping = item[3]; if (!cssMapping) { return content; } if (useSourceMap && typeof btoa === 'function') { var sourceMapping = toComment(cssMapping); var sourceURLs = cssMapping.sources.map(function (source) { return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'; }); return [content].concat(sourceURLs).concat([sourceMapping]).join('\n'); } return [content].join('\n'); } // Adapted from convert-source-map (MIT) function toComment(sourceMap) { // eslint-disable-next-line no-undef var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))); var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64; return '/*# ' + data + ' */'; } /***/ }), /* 10 */ /***/ (function(module, exports, __webpack_require__) { /* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ var stylesInDom = {}; var memoize = function (fn) { var memo; return function () { if (typeof memo === "undefined") memo = fn.apply(this, arguments); return memo; }; }; var isOldIE = memoize(function () { // Test for IE <= 9 as proposed by Browserhacks // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805 // Tests for existence of standard globals is to allow style-loader // to operate correctly into non-standard environments // @see https://github.com/webpack-contrib/style-loader/issues/177 return window && document && document.all && !window.atob; }); var getTarget = function (target, parent) { if (parent){ return parent.querySelector(target); } return document.querySelector(target); }; var getElement = (function (fn) { var memo = {}; return function(target, parent) { // If passing function in options, then use it for resolve "head" element. // Useful for Shadow Root style i.e // { // insertInto: function () { return document.querySelector("#foo").shadowRoot } // } if (typeof target === 'function') { return target(); } if (typeof memo[target] === "undefined") { var styleTarget = getTarget.call(this, target, parent); // Special case to return head of iframe instead of iframe itself if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) { try { // This will throw an exception if access to iframe is blocked // due to cross-origin restrictions styleTarget = styleTarget.contentDocument.head; } catch(e) { styleTarget = null; } } memo[target] = styleTarget; } return memo[target] }; })(); var singleton = null; var singletonCounter = 0; var stylesInsertedAtTop = []; var fixUrls = __webpack_require__(16); module.exports = function(list, options) { if (typeof DEBUG !== "undefined" && DEBUG) { if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment"); } options = options || {}; options.attrs = typeof options.attrs === "object" ? options.attrs : {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of <style> // tags it will allow on a page if (!options.singleton && typeof options.singleton !== "boolean") options.singleton = isOldIE(); // By default, add <style> tags to the <head> element if (!options.insertInto) options.insertInto = "head"; // By default, add <style> tags to the bottom of the target if (!options.insertAt) options.insertAt = "bottom"; var styles = listToStyles(list, options); addStylesToDom(styles, options); return function update (newList) { var mayRemove = []; for (var i = 0; i < styles.length; i++) { var item = styles[i]; var domStyle = stylesInDom[item.id]; domStyle.refs--; mayRemove.push(domStyle); } if(newList) { var newStyles = listToStyles(newList, options); addStylesToDom(newStyles, options); } for (var i = 0; i < mayRemove.length; i++) { var domStyle = mayRemove[i]; if(domStyle.refs === 0) { for (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j](); delete stylesInDom[domStyle.id]; } } }; }; function addStylesToDom (styles, options) { for (var i = 0; i < styles.length; i++) { var item = styles[i]; var domStyle = stylesInDom[item.id]; if(domStyle) { domStyle.refs++; for(var j = 0; j < domStyle.parts.length; j++) { domStyle.parts[j](item.parts[j]); } for(; j < item.parts.length; j++) { domStyle.parts.push(addStyle(item.parts[j], options)); } } else { var parts = []; for(var j = 0; j < item.parts.length; j++) { parts.push(addStyle(item.parts[j], options)); } stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts}; } } } function listToStyles (list, options) { var styles = []; var newStyles = {}; for (var i = 0; i < list.length; i++) { var item = list[i]; var id = options.base ? item[0] + options.base : item[0]; var css = item[1]; var media = item[2]; var sourceMap = item[3]; var part = {css: css, media: media, sourceMap: sourceMap}; if(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]}); else newStyles[id].parts.push(part); } return styles; } function insertStyleElement (options, style) { var target = getElement(options.insertInto) if (!target) { throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid."); } var lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1]; if (options.insertAt === "top") { if (!lastStyleElementInsertedAtTop) { target.insertBefore(style, target.firstChild); } else if (lastStyleElementInsertedAtTop.nextSibling) { target.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling); } else { target.appendChild(style); } stylesInsertedAtTop.push(style); } else if (options.insertAt === "bottom") { target.appendChild(style); } else if (typeof options.insertAt === "object" && options.insertAt.before) { var nextSibling = getElement(options.insertAt.before, target); target.insertBefore(style, nextSibling); } else { throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n"); } } function removeStyleElement (style) { if (style.parentNode === null) return false; style.parentNode.removeChild(style); var idx = stylesInsertedAtTop.indexOf(style); if(idx >= 0) { stylesInsertedAtTop.splice(idx, 1); } } function createStyleElement (options) { var style = document.createElement("style"); if(options.attrs.type === undefined) { options.attrs.type = "text/css"; } if(options.attrs.nonce === undefined) { var nonce = getNonce(); if (nonce) { options.attrs.nonce = nonce; } } addAttrs(style, options.attrs); insertStyleElement(options, style); return style; } function createLinkElement (options) { var link = document.createElement("link"); if(options.attrs.type === undefined) { options.attrs.type = "text/css"; } options.attrs.rel = "stylesheet"; addAttrs(link, options.attrs); insertStyleElement(options, link); return link; } function addAttrs (el, attrs) { Object.keys(attrs).forEach(function (key) { el.setAttribute(key, attrs[key]); }); } function getNonce() { if (false) {} return __webpack_require__.nc; } function addStyle (obj, options) { var style, update, remove, result; // If a transform function was defined, run it on the css if (options.transform && obj.css) { result = typeof options.transform === 'function' ? options.transform(obj.css) : options.transform.default(obj.css); if (result) { // If transform returns a value, use that instead of the original css. // This allows running runtime transformations on the css. obj.css = result; } else { // If the transform function returns a falsy value, don't add this css. // This allows conditional loading of css return function() { // noop }; } } if (options.singleton) { var styleIndex = singletonCounter++; style = singleton || (singleton = createStyleElement(options)); update = applyToSingletonTag.bind(null, style, styleIndex, false); remove = applyToSingletonTag.bind(null, style, styleIndex, true); } else if ( obj.sourceMap && typeof URL === "function" && typeof URL.createObjectURL === "function" && typeof URL.revokeObjectURL === "function" && typeof Blob === "function" && typeof btoa === "function" ) { style = createLinkElement(options); update = updateLink.bind(null, style, options); remove = function () { removeStyleElement(style); if(style.href) URL.revokeObjectURL(style.href); }; } else { style = createStyleElement(options); update = applyToTag.bind(null, style); remove = function () { removeStyleElement(style); }; } update(obj); return function updateStyle (newObj) { if (newObj) { if ( newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap ) { return; } update(obj = newObj); } else { remove(); } }; } var replaceText = (function () { var textStore = []; return function (index, replacement) { textStore[index] = replacement; return textStore.filter(Boolean).join('\n'); }; })(); function applyToSingletonTag (style, index, remove, obj) { var css = remove ? "" : obj.css; if (style.styleSheet) { style.styleSheet.cssText = replaceText(index, css); } else { var cssNode = document.createTextNode(css); var childNodes = style.childNodes; if (childNodes[index]) style.removeChild(childNodes[index]); if (childNodes.length) { style.insertBefore(cssNode, childNodes[index]); } else { style.appendChild(cssNode); } } } function applyToTag (style, obj) { var css = obj.css; var media = obj.media; if(media) { style.setAttribute("media", media) } if(style.styleSheet) { style.styleSheet.cssText = css; } else { while(style.firstChild) { style.removeChild(style.firstChild); } style.appendChild(document.createTextNode(css)); } } function updateLink (link, options, obj) { var css = obj.css; var sourceMap = obj.sourceMap; /* If convertToAbsoluteUrls isn't defined, but sourcemaps are enabled and there is no publicPath defined then lets turn convertToAbsoluteUrls on by default. Otherwise default to the convertToAbsoluteUrls option directly */ var autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap; if (options.convertToAbsoluteUrls || autoFixUrls) { css = fixUrls(css); } if (sourceMap) { // http://stackoverflow.com/a/26603875 css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */"; } var blob = new Blob([css], { type: "text/css" }); var oldSrc = link.href; link.href = URL.createObjectURL(blob); if(oldSrc) URL.revokeObjectURL(oldSrc); } /***/ }), /* 11 */, /* 12 */, /* 13 */ /***/ (function(module, exports) { module.exports = require("react-fast-compare"); /***/ }), /* 14 */, /* 15 */, /* 16 */ /***/ (function(module, exports) { /** * When source maps are enabled, `style-loader` uses a link element with a data-uri to * embed the css on the page. This breaks all relative urls because now they are relative to a * bundle instead of the current page. * * One solution is to only use full urls, but that may be impossible. * * Instead, this function "fixes" the relative urls to be absolute according to the current page location. * * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command. * */ module.exports = function (css) { // get current location var location = typeof window !== "undefined" && window.location; if (!location) { throw new Error("fixUrls requires window.location"); } // blank or null? if (!css || typeof css !== "string") { return css; } var baseUrl = location.protocol + "//" + location.host; var currentDir = baseUrl + location.pathname.replace(/\/[^\/]*$/, "/"); // convert each url(...) /* This regular expression is just a way to recursively match brackets within a string. /url\s*\( = Match on the word "url" with any whitespace after it and then a parens ( = Start a capturing group (?: = Start a non-capturing group [^)(] = Match anything that isn't a parentheses | = OR \( = Match a start parentheses (?: = Start another non-capturing groups [^)(]+ = Match anything that isn't a parentheses | = OR \( = Match a start parentheses [^)(]* = Match anything that isn't a parentheses \) = Match a end parentheses ) = End Group *\) = Match anything and then a close parens ) = Close non-capturing group * = Match anything ) = Close capturing group \) = Match a close parens /gi = Get all matches, not the first. Be case insensitive. */ var fixedCss = css.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function(fullMatch, origUrl) { // strip quotes (if they exist) var unquotedOrigUrl = origUrl .trim() .replace(/^"(.*)"$/, function(o, $1){ return $1; }) .replace(/^'(.*)'$/, function(o, $1){ return $1; }); // already a full url? no change if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(unquotedOrigUrl)) { return fullMatch; } // convert the url to a full url var newUrl; if (unquotedOrigUrl.indexOf("//") === 0) { //TODO: should we add protocol? newUrl = unquotedOrigUrl; } else if (unquotedOrigUrl.indexOf("/") === 0) { // path should be relative to the base url newUrl = baseUrl + unquotedOrigUrl; // already starts with '/' } else { // path should be relative to current directory newUrl = currentDir + unquotedOrigUrl.replace(/^\.\//, ""); // Strip leading './' } // send back the fixed url(...) return "url(" + JSON.stringify(newUrl) + ")"; }); // send back the fixed css return fixedCss; }; /***/ }), /* 17 */, /* 18 */ /***/ (function(module, exports, __webpack_require__) { var content = __webpack_require__(29); if(typeof content === 'string') content = [[module.i, content, '']]; var transform; var insertInto; var options = {"hmr":true} options.transform = transform options.insertInto = undefined; var update = __webpack_require__(10)(content, options); if(content.locals) module.exports = content.locals; if(false) {} /***/ }), /* 19 */, /* 20 */, /* 21 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _Select_module_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18); /* harmony import */ var _Select_module_scss__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_Select_module_scss__WEBPACK_IMPORTED_MODULE_2__); function _typeof(obj) { 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); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _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); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } var Select = /*#__PURE__*/ function (_React$Component) { _inherits(Select, _React$Component); function Select() { _classCallCheck(this, Select); return _possibleConstructorReturn(this, _getPrototypeOf(Select).apply(this, arguments)); } _createClass(Select, [{ key: "render", value: function render() { var options = this.props.options.map(function (option, index) { // eslint-disable-next-line react/no-array-index-key return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("option", { key: index, value: option.value }, option.label); }); return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("select", { className: _Select_module_scss__WEBPACK_IMPORTED_MODULE_2___default.a.selectPlayerControl, name: this.props.name, value: this.props.currentValue, onChange: this.props.handleChange }, options); } }]); return Select; }(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component); Select.propTypes = { options: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.array, name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, currentValue: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, handleChange: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func }; /* harmony default export */ __webpack_exports__["default"] = (Select); /***/ }), /* 22 */, /* 23 */, /* 24 */, /* 25 */, /* 26 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(13); /* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _Select__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21); /* harmony import */ var _PlayerControls_index_module_scss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6); /* harmony import */ var _PlayerControls_index_module_scss__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_PlayerControls_index_module_scss__WEBPACK_IMPORTED_MODULE_4__); function _typeof(obj) { 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); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _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); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _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; } var PlaybackRate = /*#__PURE__*/ function (_React$Component) { _inherits(PlaybackRate, _React$Component); function PlaybackRate() { var _getPrototypeOf2; var _this; _classCallCheck(this, PlaybackRate); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(PlaybackRate)).call.apply(_getPrototypeOf2, [this].concat(args))); _defineProperty(_assertThisInitialized(_this), "shouldComponentUpdate", function (nextProps) { return !react_fast_compare__WEBPACK_IMPORTED_MODULE_2___default()(_this.props, nextProps); }); return _this; } _createClass(PlaybackRate, [{ key: "render", value: function render() { return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { className: _PlayerControls_index_module_scss__WEBPACK_IMPORTED_MODULE_4___default.a.playBackRate, title: "Playback rate: alt - & alt + " }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Select__WEBPACK_IMPORTED_MODULE_3__["default"], { options: this.props.playbackRateOptions, currentValue: this.props.playbackRate.toString(), name: 'playbackRate', handleChange: this.props.handlePlayBackRateChange })); } }]); return PlaybackRate; }(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component); PlaybackRate.propTypes = { playbackRateOptions: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.array, playbackRate: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, handlePlayBackRateChange: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func }; /* harmony default export */ __webpack_exports__["default"] = (PlaybackRate); /***/ }), /* 27 */, /* 28 */, /* 29 */ /***/ (function(module, exports, __webpack_require__) { exports = module.exports = __webpack_require__(9)(true); // Module exports.push([module.i, "._34fv5jYOgZKRoWiMw1LZ7y[name='playbackRate']{font-size:1em;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:48px;width:97px;border-radius:0;background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTguMS4xLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDEyNS4zMDQgMTI1LjMwNCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTI1LjMwNCAxMjUuMzA0OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjE2cHgiIGhlaWdodD0iMTZweCI+CjxnPgoJPGc+CgkJPHBvbHlnb24gcG9pbnRzPSI2Mi42NTIsMTAzLjg5NSAwLDIxLjQwOSAxMjUuMzA0LDIxLjQwOSAgICIgZmlsbD0iI0ZGRkZGRiIvPgoJPC9nPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+Cjwvc3ZnPgo=);background-repeat:no-repeat;background-position:85% center;color:white;border-color:transparent;padding-left:32px}@media (max-width: 768px){._34fv5jYOgZKRoWiMw1LZ7y[name='playbackRate']{width:100%}}\n", "",{"version":3,"sources":["/home/nhardy/git/react-transcript-editor/packages/components/media-player/src/Select.module.scss"],"names":[],"mappings":"AAAA,8CACE,aAAc,CACd,uBAAwB,CACxB,oBAAqB,CACrB,eAAgB,CAChB,WAAY,CACZ,UAAW,CACX,eAAgB,CAChB,q4BAAs4B,CACt4B,2BAA4B,CAC5B,8BAA+B,CAC/B,WAAY,CACZ,wBAAyB,CACzB,iBAAkB,CACnB,0BAIC,8CACE,UAAW,CACZ","file":"Select.module.scss","sourcesContent":[".selectPlayerControl[name='playbackRate'] {\n font-size: 1em;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n height: 48px;\n width: 97px;\n border-radius: 0;\n background-image: url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTguMS4xLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDEyNS4zMDQgMTI1LjMwNCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTI1LjMwNCAxMjUuMzA0OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjE2cHgiIGhlaWdodD0iMTZweCI+CjxnPgoJPGc+CgkJPHBvbHlnb24gcG9pbnRzPSI2Mi42NTIsMTAzLjg5NSAwLDIxLjQwOSAxMjUuMzA0LDIxLjQwOSAgICIgZmlsbD0iI0ZGRkZGRiIvPgoJPC9nPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+Cjwvc3ZnPgo=);\n background-repeat: no-repeat;\n background-position: 85% center;\n color: white;\n border-color: transparent;\n padding-left: 32px;\n}\n\n@media (max-width: 768px) {\n\n .selectPlayerControl[name='playbackRate'] {\n width: 100%;\n }\n}\n"]}]); // Exports exports.locals = { "selectPlayerControl": "_34fv5jYOgZKRoWiMw1LZ7y" }; /***/ }), /* 30 */, /* 31 */, /* 32 */, /* 33 */, /* 34 */ /***/ (function(module, exports, __webpack_require__) { exports = module.exports = __webpack_require__(9)(true); // Module exports.push([module.i, "._3Uxalc08gMtzZB4hnaX85U{margin-bottom:0.5em}._3Uxalc08gMtzZB4hnaX85U>*{display:inline-block}._3Uxalc08gMtzZB4hnaX85U>*:not(:last-child){margin-right:0.5em}.nfFU1U4XOLMdzg9dnbQE6{width:48px;height:48px;padding:0.5em;border:0;color:white;background:#282828;font-size:1em;cursor:pointer;margin-right:0.3rem;margin-top:0.3rem}.nfFU1U4XOLMdzg9dnbQE6:hover{background:#4a4a4a}._14YMQpt-PkIxcQSwXXLlvg{width:70px;border:0;color:white;font-size:1em;cursor:pointer;position:relative;margin-right:0.3rem}._14YMQpt-PkIxcQSwXXLlvg::before{content:'×';position:absolute;bottom:-2px;left:21px}._14YMQpt-PkIxcQSwXXLlvg>select{padding-top:0.5em;padding-bottom:0.5em;height:100%;outline:none;width:auto;width:100%;color:white;background-color:#282828;cursor:pointer}._14YMQpt-PkIxcQSwXXLlvg>select:hover{background-color:#4a4a4a}._2znM3G4aR2HBCH20g6mhGb{display:inline-block;text-align:center;line-height:48px;padding:0 1em;background-color:#282828}._2znM3G4aR2HBCH20g6mhGb .aH0YF-Y9zIHOtgN9PmNDJ{color:#E2A9A2;cursor:pointer;font-family:'Lucida Console', monospace}._2znM3G4aR2HBCH20g6mhGb ._1of7QGIwcp_3wqr89BYIJr{color:#767676;margin:0 1em}._2znM3G4aR2HBCH20g6mhGb ._2N6hqY-gxXwJ-2c8sRoL5i{color:white;font-family:'Lucida Console', monospace}@media (max-width: 768px){._3Uxalc08gMtzZB4hnaX85U{display:grid;grid-template-rows:10% 3rem 3rem;grid-row-gap:5px;margin:0 0 0.5rem 0}._3Uxalc08gMtzZB4hnaX85U>*:not(:last-child){margin:0}._3Yzz5SC0aWv6XsLwxfjSEh{display:grid;grid-template-columns:repeat(4, 1fr);grid-column-gap:0.2em}.nfFU1U4XOLMdzg9dnbQE6{width:100%;height:48px;margin:0}._14YMQpt-PkIxcQSwXXLlvg{width:100%;grid-column:1 / span 2}._14YMQpt-PkIxcQSwXXLlvg::before{bottom:30%}._2znM3G4aR2HBCH20g6mhGb{background-color:transparent;align-self:start;padding:0}._2znM3G4aR2HBCH20g6mhGb .aH0YF-Y9zIHOtgN9PmNDJ{float:left;font-size:0.7em;line-height:1em}._2znM3G4aR2HBCH20g6mhGb ._1of7QGIwcp_3wqr89BYIJr{display:none}._2znM3G4aR2HBCH20g6mhGb ._2N6hqY-gxXwJ-2c8sRoL5i{color:white;font-size:0.7em;float:right;line-height:1em}._3jaqTgIQjj8Ae1CLtIF2e0{display:none}}\n", "",{"version":3,"sources":["/home/nhardy/git/react-transcript-editor/packages/components/media-player/src/PlayerControls/index.module.scss","/home/nhardy/git/react-transcript-editor/packages/config/style-guide/colours.scss"],"names":[],"mappings":"AAEA,yBACE,mBAAoB,CACrB,2BAGC,oBAAqB,CACtB,4CAGC,kBAAmB,CACpB,uBAGC,UAAW,CACX,WAAY,CACZ,aAAc,CACd,QAAS,CACT,WAAY,CACZ,kBCnB0B,CDoB1B,aAAc,CACd,cAAe,CACf,mBAAoB,CACpB,iBAAkB,CAVpB,6BAaI,kBCzBqB,CD0BtB,yBAID,UAAW,CACX,QAAS,CACT,WAAY,CACZ,aAAc,CACd,cAAe,CACf,iBAAkB,CAClB,mBAAoB,CAPtB,iCAUI,WAAY,CACZ,iBAAkB,CAClB,WAAY,CACZ,SAAU,CAbd,gCAiBI,iBAAkB,CAClB,oBAAqB,CACrB,WAAY,CACZ,YAAa,CACb,UAAW,CACX,UAAW,CACX,WAAY,CACZ,wBCtDwB,CDuDxB,cAAe,CAzBnB,sCA4BM,wBCzDmB,CD0DpB,yBAKH,oBAAqB,CACrB,iBAAkB,CAClB,gBAAiB,CACjB,aAAc,CACd,wBCpE0B,CD+D5B,gDAQI,aCjEuB,CDkEvB,cAAe,CACf,uCAAwC,CAV5C,kDAcI,aC1EsB,CD2EtB,YAAa,CAfjB,kDAmBI,WAAY,CACZ,wCAAyC,CAC1C,0BAKD,yBACE,YAAa,CACb,gCAAiC,CACjC,gBAAiB,CACjB,mBAAoB,CACrB,4CAGC,QAAS,CACV,yBAGC,YAAa,CACb,oCAAqC,CACrC,qBAAsB,CACvB,uBAGC,UAAW,CACX,WAAY,CACZ,QAAS,CACV,yBAGC,UAAW,CACX,sBAAuB,CAFzB,iCAKI,UAAW,CACZ,yBAID,4BAA6B,CAC7B,gBAAiB,CACjB,SAAU,CAHZ,gDAMI,UAAW,CACX,eAAgB,CAChB,eAAgB,CARpB,kDAYI,YAAa,CAZjB,kDAgBI,WAAY,CACZ,eAAgB,CAChB,WAAY,CACZ,eAAgB,CACjB,yBAID,YAAa,CACd","file":"index.module.scss","sourcesContent":["@import '../../../../config/style-guide/colours.scss';\n\n.playerControls {\n margin-bottom: 0.5em;\n}\n\n.playerControls > * {\n display: inline-block;\n}\n\n.playerControls > *:not(:last-child) {\n margin-right: 0.5em;\n}\n\n.playerButton {\n width: 48px;\n height: 48px;\n padding: 0.5em;\n border: 0;\n color: white;\n background: $color-darkest-grey;\n font-size: 1em;\n cursor: pointer;\n margin-right: 0.3rem;\n margin-top: 0.3rem;\n\n &:hover {\n background: $color-dark-grey;\n }\n}\n\n.playBackRate {\n width: 70px;\n border: 0;\n color: white;\n font-size: 1em;\n cursor: pointer;\n position: relative;\n margin-right: 0.3rem;\n\n &::before {\n content: '×';\n position: absolute;\n bottom: -2px;\n left: 21px;\n }\n\n & > select {\n padding-top: 0.5em;\n padding-bottom: 0.5em;\n height: 100%;\n outline: none;\n width: auto;\n width: 100%;\n color: white;\n background-color: $color-darkest-grey;\n cursor: pointer;\n\n &:hover {\n background-color: $color-dark-grey;\n }\n }\n}\n\n.timeBox {\n display: inline-block;\n text-align: center;\n line-height: 48px;\n padding: 0 1em;\n background-color: $color-darkest-grey;\n\n .currentTime {\n color: $color-light-shilo;\n cursor: pointer;\n font-family: 'Lucida Console', monospace;\n }\n\n .separator {\n color: $color-light-grey;\n margin: 0 1em;\n }\n\n .duration {\n color: white;\n font-family: 'Lucida Console', monospace;\n }\n}\n\n@media (max-width: 768px) {\n\n .playerControls {\n display: grid;\n grid-template-rows: 10% 3rem 3rem;\n grid-row-gap: 5px;\n margin: 0 0 0.5rem 0;\n }\n\n .playerControls > *:not(:last-child) {\n margin: 0;\n }\n\n .btnsGroup {\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n grid-column-gap: 0.2em;\n }\n\n .playerButton {\n width: 100%;\n height: 48px;\n margin: 0;\n }\n\n .playBackRate {\n width: 100%;\n grid-column: 1 / span 2;\n\n &::before {\n bottom: 30%;\n }\n }\n\n .timeBox {\n background-color: transparent;\n align-self: start;\n padding: 0;\n\n .currentTime {\n float: left;\n font-size: 0.7em;\n line-height: 1em;\n }\n\n .separator {\n display: none;\n }\n\n .duration {\n color: white;\n font-size: 0.7em;\n float: right;\n line-height: 1em;\n }\n }\n\n .pip {\n display: none;\n }\n}\n","$color-labs-red: #a0372d !default;\n$color-darkest-grey: #282828 !default;\n$color-dark-grey: #4a4a4a !default;\n$color-mid-grey: #696969 !default;\n$color-light-grey: #767676 !default;\n$color-lightest-grey: #f2f2f2 !default;\n$color-subt-green: #69e3c2 !default;\n$color-light-shilo: #E2A9A2 !default;\n"]}]); // Exports exports.locals = { "playerControls": "_3Uxalc08gMtzZB4hnaX85U", "playerButton": "nfFU1U4XOLMdzg9dnbQE6", "playBackRate": "_14YMQpt-PkIxcQSwXXLlvg", "timeBox": "_2znM3G4aR2HBCH20g6mhGb", "currentTime": "aH0YF-Y9zIHOtgN9PmNDJ", "separator": "_1of7QGIwcp_3wqr89BYIJr", "duration": "_2N6hqY-gxXwJ-2c8sRoL5i", "btnsGroup": "_3Yzz5SC0aWv6XsLwxfjSEh", "pip": "_3jaqTgIQjj8Ae1CLtIF2e0" }; /***/ }) /******/ ]); //# sourceMappingURL=PlaybackRate.js.map