@mjhls/mjh-framework 1.0.248 → 1.0.249
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +171 -171
- package/dist/cjs/{AdSlot-c472fff6.js → AdSlot-a79ba074.js} +0 -15
- package/dist/cjs/DeckContent.js +10 -10
- package/dist/cjs/DeckQueue.js +1 -1
- package/dist/cjs/{GridContent-463c504f.js → GridContent-e6c8fb75.js} +3 -3
- package/dist/cjs/GridContent.js +3 -3
- package/dist/cjs/IssueContentDeck.js +1 -1
- package/dist/cjs/IssueDeck.js +1 -1
- package/dist/cjs/MasterDeck.js +9 -9
- package/dist/cjs/{Normal-18cef899.js → Normal-2ee1925d.js} +30 -30
- package/dist/cjs/PublicationDeck.js +1 -1
- package/dist/cjs/QueueDeckExpanded.js +1 -1
- package/dist/cjs/{TaxonomyCard-e3566492.js → TaxonomyCard-b5074d6e.js} +1 -1
- package/dist/cjs/TaxonomyCard.js +2 -2
- package/dist/cjs/TemplateNormal.js +2 -2
- package/dist/cjs/ThumbnailCard.js +1 -1
- package/dist/cjs/VideoSeriesListing.js +1 -1
- package/dist/cjs/{YoutubeGroup-5f480446.js → YoutubeGroup-fd44f8a0.js} +4 -4
- package/dist/cjs/YoutubeGroup.js +1 -1
- package/dist/cjs/{index-be0c82be.js → index-39beccb3.js} +2 -1
- package/dist/cjs/index.js +542 -530
- package/dist/esm/{AdSlot-bdd7a629.js → AdSlot-fb853576.js} +0 -15
- package/dist/esm/DeckContent.js +10 -10
- package/dist/esm/DeckQueue.js +1 -1
- package/dist/esm/{GridContent-2a48fb19.js → GridContent-3711b837.js} +2 -2
- package/dist/esm/GridContent.js +3 -3
- package/dist/esm/IssueContentDeck.js +1 -1
- package/dist/esm/IssueDeck.js +1 -1
- package/dist/esm/MasterDeck.js +9 -9
- package/dist/esm/{Normal-4c82c9c2.js → Normal-b0b212a3.js} +30 -30
- package/dist/esm/PublicationDeck.js +1 -1
- package/dist/esm/QueueDeckExpanded.js +1 -1
- package/dist/esm/{TaxonomyCard-2d0ab635.js → TaxonomyCard-ee1a22ae.js} +1 -1
- package/dist/esm/TaxonomyCard.js +2 -2
- package/dist/esm/TemplateNormal.js +2 -2
- package/dist/esm/ThumbnailCard.js +1 -1
- package/dist/esm/VideoSeriesListing.js +1 -1
- package/dist/esm/{YoutubeGroup-78d93d44.js → YoutubeGroup-1b3eca73.js} +4 -4
- package/dist/esm/YoutubeGroup.js +1 -1
- package/dist/esm/{index-73819142.js → index-3849e3fe.js} +2 -1
- package/dist/esm/index.js +546 -534
- package/package.json +102 -103
package/dist/cjs/index.js
CHANGED
|
@@ -26,21 +26,21 @@ var Link = _interopDefault(require('next/link'));
|
|
|
26
26
|
var Router = require('next/router');
|
|
27
27
|
var Router__default = _interopDefault(Router);
|
|
28
28
|
require('react-dom');
|
|
29
|
-
var index$1 = require('./index-
|
|
29
|
+
var index$1 = require('./index-39beccb3.js');
|
|
30
30
|
require('./index-fa0fb52c.js');
|
|
31
31
|
var entities = require('./entities-310b46ee.js');
|
|
32
32
|
var slicedToArray = require('./slicedToArray-e38fb29d.js');
|
|
33
|
-
var AdSlot = require('./AdSlot-
|
|
33
|
+
var AdSlot = require('./AdSlot-a79ba074.js');
|
|
34
34
|
require('./promise-b96c61f8.js');
|
|
35
35
|
var DeckContent = require('./DeckContent.js');
|
|
36
36
|
require('./get-1f91592f.js');
|
|
37
|
-
var GridContent = require('./GridContent-
|
|
37
|
+
var GridContent = require('./GridContent-e6c8fb75.js');
|
|
38
38
|
var DeckQueue = require('./DeckQueue.js');
|
|
39
39
|
require('react-bootstrap/Media');
|
|
40
40
|
var ThumbnailCard = require('./ThumbnailCard.js');
|
|
41
|
-
var TaxonomyCard = require('./TaxonomyCard-
|
|
41
|
+
var TaxonomyCard = require('./TaxonomyCard-b5074d6e.js');
|
|
42
42
|
var GroupDeck = require('./GroupDeck.js');
|
|
43
|
-
var YoutubeGroup = require('./YoutubeGroup-
|
|
43
|
+
var YoutubeGroup = require('./YoutubeGroup-fd44f8a0.js');
|
|
44
44
|
var reactBootstrap = require('react-bootstrap');
|
|
45
45
|
var QueueDeckExpanded = require('./QueueDeckExpanded.js');
|
|
46
46
|
var index_esm = require('./index.esm-340d3792.js');
|
|
@@ -52,7 +52,7 @@ var IssueDeck = require('./IssueDeck.js');
|
|
|
52
52
|
require('react-bootstrap/Badge');
|
|
53
53
|
var IssueContentDeck = require('./IssueContentDeck.js');
|
|
54
54
|
var Spinner = _interopDefault(require('react-bootstrap/Spinner'));
|
|
55
|
-
var TemplateNormal = require('./Normal-
|
|
55
|
+
var TemplateNormal = require('./Normal-2ee1925d.js');
|
|
56
56
|
require('react-bootstrap/ListGroup');
|
|
57
57
|
var Head = _interopDefault(require('next/head'));
|
|
58
58
|
var Accordion = _interopDefault(require('react-bootstrap/Accordion'));
|
|
@@ -3048,21 +3048,18 @@ var Slideshow = function Slideshow(_ref) {
|
|
|
3048
3048
|
);
|
|
3049
3049
|
};
|
|
3050
3050
|
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3051
|
+
// do not edit .js files directly - edit src/index.jst
|
|
3052
|
+
|
|
3053
|
+
|
|
3054
3054
|
|
|
3055
3055
|
var fastDeepEqual = function equal(a, b) {
|
|
3056
3056
|
if (a === b) return true;
|
|
3057
3057
|
|
|
3058
3058
|
if (a && b && typeof a == 'object' && typeof b == 'object') {
|
|
3059
|
-
|
|
3060
|
-
, arrB = isArray(b)
|
|
3061
|
-
, i
|
|
3062
|
-
, length
|
|
3063
|
-
, key;
|
|
3059
|
+
if (a.constructor !== b.constructor) return false;
|
|
3064
3060
|
|
|
3065
|
-
|
|
3061
|
+
var length, i, keys;
|
|
3062
|
+
if (Array.isArray(a)) {
|
|
3066
3063
|
length = a.length;
|
|
3067
3064
|
if (length != b.length) return false;
|
|
3068
3065
|
for (i = length; i-- !== 0;)
|
|
@@ -3070,35 +3067,29 @@ var fastDeepEqual = function equal(a, b) {
|
|
|
3070
3067
|
return true;
|
|
3071
3068
|
}
|
|
3072
3069
|
|
|
3073
|
-
if (arrA != arrB) return false;
|
|
3074
3070
|
|
|
3075
|
-
var dateA = a instanceof Date
|
|
3076
|
-
, dateB = b instanceof Date;
|
|
3077
|
-
if (dateA != dateB) return false;
|
|
3078
|
-
if (dateA && dateB) return a.getTime() == b.getTime();
|
|
3079
3071
|
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
if (
|
|
3083
|
-
if (regexpA && regexpB) return a.toString() == b.toString();
|
|
3072
|
+
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
3073
|
+
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
|
3074
|
+
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
|
3084
3075
|
|
|
3085
|
-
|
|
3076
|
+
keys = Object.keys(a);
|
|
3086
3077
|
length = keys.length;
|
|
3087
|
-
|
|
3088
|
-
if (length !== keyList(b).length)
|
|
3089
|
-
return false;
|
|
3078
|
+
if (length !== Object.keys(b).length) return false;
|
|
3090
3079
|
|
|
3091
3080
|
for (i = length; i-- !== 0;)
|
|
3092
|
-
if (!
|
|
3081
|
+
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
3093
3082
|
|
|
3094
3083
|
for (i = length; i-- !== 0;) {
|
|
3095
|
-
key = keys[i];
|
|
3084
|
+
var key = keys[i];
|
|
3085
|
+
|
|
3096
3086
|
if (!equal(a[key], b[key])) return false;
|
|
3097
3087
|
}
|
|
3098
3088
|
|
|
3099
3089
|
return true;
|
|
3100
3090
|
}
|
|
3101
3091
|
|
|
3092
|
+
// true if both NaN, false otherwise
|
|
3102
3093
|
return a!==a && b!==b;
|
|
3103
3094
|
};
|
|
3104
3095
|
|
|
@@ -4121,7 +4112,7 @@ function formatValue(ctx, value, recurseTimes) {
|
|
|
4121
4112
|
var base = '', array = false, braces = ['{', '}'];
|
|
4122
4113
|
|
|
4123
4114
|
// Make Array say that they are Array
|
|
4124
|
-
if (isArray
|
|
4115
|
+
if (isArray(value)) {
|
|
4125
4116
|
array = true;
|
|
4126
4117
|
braces = ['[', ']'];
|
|
4127
4118
|
}
|
|
@@ -4300,7 +4291,7 @@ function reduceToSingleString(output, base, braces) {
|
|
|
4300
4291
|
|
|
4301
4292
|
// NOTE: These type checking functions intentionally don't use `instanceof`
|
|
4302
4293
|
// because it is fragile and can be easily faked with `Object.create()`.
|
|
4303
|
-
function isArray
|
|
4294
|
+
function isArray(ar) {
|
|
4304
4295
|
return Array.isArray(ar);
|
|
4305
4296
|
}
|
|
4306
4297
|
|
|
@@ -4427,7 +4418,7 @@ var util = {
|
|
|
4427
4418
|
isNullOrUndefined: isNullOrUndefined,
|
|
4428
4419
|
isNull: isNull,
|
|
4429
4420
|
isBoolean: isBoolean,
|
|
4430
|
-
isArray: isArray
|
|
4421
|
+
isArray: isArray,
|
|
4431
4422
|
inspect: inspect,
|
|
4432
4423
|
deprecate: deprecate,
|
|
4433
4424
|
format: format,
|
|
@@ -5094,199 +5085,235 @@ module.exports = exports['default'];
|
|
|
5094
5085
|
|
|
5095
5086
|
var youTubePlayer = _commonjsHelpers.unwrapExports(dist);
|
|
5096
5087
|
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
var _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; };
|
|
5088
|
+
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); }
|
|
5100
5089
|
|
|
5101
5090
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5102
5091
|
|
|
5103
|
-
function
|
|
5092
|
+
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); } }
|
|
5093
|
+
|
|
5094
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
5095
|
+
|
|
5096
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
5097
|
+
|
|
5098
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
5104
5099
|
|
|
5105
|
-
function
|
|
5100
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5101
|
+
|
|
5102
|
+
function _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; } }
|
|
5103
|
+
|
|
5104
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
5105
|
+
|
|
5106
|
+
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); }
|
|
5107
|
+
|
|
5108
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
5109
|
+
|
|
5110
|
+
function 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; }
|
|
5111
|
+
|
|
5112
|
+
function _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; }
|
|
5106
5113
|
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
*
|
|
5110
|
-
*
|
|
5111
|
-
* @param {Object}
|
|
5114
|
+
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; }
|
|
5115
|
+
/**
|
|
5116
|
+
* Check whether a `props` change should result in the video being updated.
|
|
5117
|
+
*
|
|
5118
|
+
* @param {Object} prevProps
|
|
5119
|
+
* @param {Object} props
|
|
5112
5120
|
*/
|
|
5121
|
+
|
|
5113
5122
|
function shouldUpdateVideo(prevProps, props) {
|
|
5114
5123
|
// A changing video should always trigger an update
|
|
5115
5124
|
if (prevProps.videoId !== props.videoId) {
|
|
5116
5125
|
return true;
|
|
5117
|
-
}
|
|
5118
|
-
|
|
5119
|
-
// Otherwise, a change in the start/end time playerVars also requires a player
|
|
5126
|
+
} // Otherwise, a change in the start/end time playerVars also requires a player
|
|
5120
5127
|
// update.
|
|
5128
|
+
|
|
5129
|
+
|
|
5121
5130
|
var prevVars = prevProps.opts.playerVars || {};
|
|
5122
5131
|
var vars = props.opts.playerVars || {};
|
|
5123
|
-
|
|
5124
5132
|
return prevVars.start !== vars.start || prevVars.end !== vars.end;
|
|
5125
5133
|
}
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
*
|
|
5129
|
-
*
|
|
5130
|
-
*
|
|
5131
|
-
*
|
|
5132
|
-
* @param {Object} opts
|
|
5134
|
+
/**
|
|
5135
|
+
* Neutralize API options that only require a video update, leaving only options
|
|
5136
|
+
* that require a player reset. The results can then be compared to see if a
|
|
5137
|
+
* player reset is necessary.
|
|
5138
|
+
*
|
|
5139
|
+
* @param {Object} opts
|
|
5133
5140
|
*/
|
|
5141
|
+
|
|
5142
|
+
|
|
5134
5143
|
function filterResetOptions(opts) {
|
|
5135
|
-
return
|
|
5136
|
-
playerVars:
|
|
5144
|
+
return _objectSpread({}, opts, {
|
|
5145
|
+
playerVars: _objectSpread({}, opts.playerVars, {
|
|
5137
5146
|
autoplay: 0,
|
|
5138
5147
|
start: 0,
|
|
5139
5148
|
end: 0
|
|
5140
5149
|
})
|
|
5141
5150
|
});
|
|
5142
5151
|
}
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
*
|
|
5146
|
-
*
|
|
5147
|
-
*
|
|
5148
|
-
*
|
|
5149
|
-
*
|
|
5150
|
-
* @param {Object}
|
|
5151
|
-
* @param {Object} props
|
|
5152
|
+
/**
|
|
5153
|
+
* Check whether a `props` change should result in the player being reset.
|
|
5154
|
+
* The player is reset when the `props.opts` change, except if the only change
|
|
5155
|
+
* is in the `start` and `end` playerVars, because a video update can deal with
|
|
5156
|
+
* those.
|
|
5157
|
+
*
|
|
5158
|
+
* @param {Object} prevProps
|
|
5159
|
+
* @param {Object} props
|
|
5152
5160
|
*/
|
|
5161
|
+
|
|
5162
|
+
|
|
5153
5163
|
function shouldResetPlayer(prevProps, props) {
|
|
5154
5164
|
return !fastDeepEqual(filterResetOptions(prevProps.opts), filterResetOptions(props.opts));
|
|
5155
5165
|
}
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
*
|
|
5159
|
-
*
|
|
5160
|
-
* @param {Object}
|
|
5161
|
-
* @param {Object} props
|
|
5166
|
+
/**
|
|
5167
|
+
* Check whether a props change should result in an id or className update.
|
|
5168
|
+
*
|
|
5169
|
+
* @param {Object} prevProps
|
|
5170
|
+
* @param {Object} props
|
|
5162
5171
|
*/
|
|
5172
|
+
|
|
5173
|
+
|
|
5163
5174
|
function shouldUpdatePlayer(prevProps, props) {
|
|
5164
5175
|
return prevProps.id !== props.id || prevProps.className !== props.className;
|
|
5165
5176
|
}
|
|
5166
5177
|
|
|
5167
|
-
var YouTube = function (_React$Component) {
|
|
5178
|
+
var YouTube = /*#__PURE__*/function (_React$Component) {
|
|
5168
5179
|
_inherits(YouTube, _React$Component);
|
|
5169
5180
|
|
|
5181
|
+
var _super = _createSuper(YouTube);
|
|
5182
|
+
|
|
5183
|
+
/**
|
|
5184
|
+
* Expose PlayerState constants for convenience. These constants can also be
|
|
5185
|
+
* accessed through the global YT object after the YouTube IFrame API is instantiated.
|
|
5186
|
+
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
5187
|
+
*/
|
|
5170
5188
|
function YouTube(props) {
|
|
5189
|
+
var _this;
|
|
5190
|
+
|
|
5171
5191
|
_classCallCheck(this, YouTube);
|
|
5172
5192
|
|
|
5173
|
-
|
|
5193
|
+
_this = _super.call(this, props);
|
|
5174
5194
|
|
|
5175
|
-
_this
|
|
5195
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerReady", function (event) {
|
|
5176
5196
|
return _this.props.onReady(event);
|
|
5177
|
-
};
|
|
5197
|
+
});
|
|
5178
5198
|
|
|
5179
|
-
_this
|
|
5199
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerError", function (event) {
|
|
5180
5200
|
return _this.props.onError(event);
|
|
5181
|
-
};
|
|
5201
|
+
});
|
|
5182
5202
|
|
|
5183
|
-
_this
|
|
5203
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerStateChange", function (event) {
|
|
5184
5204
|
_this.props.onStateChange(event);
|
|
5185
|
-
switch (event.data) {
|
|
5186
5205
|
|
|
5206
|
+
switch (event.data) {
|
|
5187
5207
|
case YouTube.PlayerState.ENDED:
|
|
5188
5208
|
_this.props.onEnd(event);
|
|
5209
|
+
|
|
5189
5210
|
break;
|
|
5190
5211
|
|
|
5191
5212
|
case YouTube.PlayerState.PLAYING:
|
|
5192
5213
|
_this.props.onPlay(event);
|
|
5214
|
+
|
|
5193
5215
|
break;
|
|
5194
5216
|
|
|
5195
5217
|
case YouTube.PlayerState.PAUSED:
|
|
5196
5218
|
_this.props.onPause(event);
|
|
5219
|
+
|
|
5197
5220
|
break;
|
|
5198
5221
|
}
|
|
5199
|
-
};
|
|
5222
|
+
});
|
|
5200
5223
|
|
|
5201
|
-
_this
|
|
5224
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerPlaybackRateChange", function (event) {
|
|
5202
5225
|
return _this.props.onPlaybackRateChange(event);
|
|
5203
|
-
};
|
|
5226
|
+
});
|
|
5204
5227
|
|
|
5205
|
-
_this
|
|
5228
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerPlaybackQualityChange", function (event) {
|
|
5206
5229
|
return _this.props.onPlaybackQualityChange(event);
|
|
5207
|
-
};
|
|
5230
|
+
});
|
|
5208
5231
|
|
|
5209
|
-
_this
|
|
5232
|
+
_defineProperty(_assertThisInitialized(_this), "createPlayer", function () {
|
|
5210
5233
|
// do not attempt to create a player server-side, it won't work
|
|
5211
|
-
if (typeof document === 'undefined') return;
|
|
5212
|
-
|
|
5213
|
-
var playerOpts =
|
|
5234
|
+
if (typeof document === 'undefined') return; // create player
|
|
5235
|
+
|
|
5236
|
+
var playerOpts = _objectSpread({}, _this.props.opts, {
|
|
5214
5237
|
// preload the `videoId` video if one is already given
|
|
5215
5238
|
videoId: _this.props.videoId
|
|
5216
5239
|
});
|
|
5217
|
-
|
|
5218
|
-
// attach event handlers
|
|
5240
|
+
|
|
5241
|
+
_this.internalPlayer = youTubePlayer(_this.container, playerOpts); // attach event handlers
|
|
5242
|
+
|
|
5219
5243
|
_this.internalPlayer.on('ready', _this.onPlayerReady);
|
|
5244
|
+
|
|
5220
5245
|
_this.internalPlayer.on('error', _this.onPlayerError);
|
|
5246
|
+
|
|
5221
5247
|
_this.internalPlayer.on('stateChange', _this.onPlayerStateChange);
|
|
5248
|
+
|
|
5222
5249
|
_this.internalPlayer.on('playbackRateChange', _this.onPlayerPlaybackRateChange);
|
|
5250
|
+
|
|
5223
5251
|
_this.internalPlayer.on('playbackQualityChange', _this.onPlayerPlaybackQualityChange);
|
|
5224
|
-
};
|
|
5252
|
+
});
|
|
5225
5253
|
|
|
5226
|
-
_this
|
|
5254
|
+
_defineProperty(_assertThisInitialized(_this), "resetPlayer", function () {
|
|
5227
5255
|
return _this.internalPlayer.destroy().then(_this.createPlayer);
|
|
5228
|
-
};
|
|
5256
|
+
});
|
|
5229
5257
|
|
|
5230
|
-
_this
|
|
5258
|
+
_defineProperty(_assertThisInitialized(_this), "updatePlayer", function () {
|
|
5231
5259
|
_this.internalPlayer.getIframe().then(function (iframe) {
|
|
5232
5260
|
if (_this.props.id) iframe.setAttribute('id', _this.props.id);else iframe.removeAttribute('id');
|
|
5233
5261
|
if (_this.props.className) iframe.setAttribute('class', _this.props.className);else iframe.removeAttribute('class');
|
|
5234
5262
|
});
|
|
5235
|
-
};
|
|
5263
|
+
});
|
|
5236
5264
|
|
|
5237
|
-
_this
|
|
5265
|
+
_defineProperty(_assertThisInitialized(_this), "updateVideo", function () {
|
|
5238
5266
|
if (typeof _this.props.videoId === 'undefined' || _this.props.videoId === null) {
|
|
5239
5267
|
_this.internalPlayer.stopVideo();
|
|
5268
|
+
|
|
5240
5269
|
return;
|
|
5241
|
-
}
|
|
5270
|
+
} // set queueing options
|
|
5271
|
+
|
|
5242
5272
|
|
|
5243
|
-
// set queueing options
|
|
5244
5273
|
var autoplay = false;
|
|
5245
5274
|
var opts = {
|
|
5246
5275
|
videoId: _this.props.videoId
|
|
5247
5276
|
};
|
|
5277
|
+
|
|
5248
5278
|
if ('playerVars' in _this.props.opts) {
|
|
5249
5279
|
autoplay = _this.props.opts.playerVars.autoplay === 1;
|
|
5280
|
+
|
|
5250
5281
|
if ('start' in _this.props.opts.playerVars) {
|
|
5251
5282
|
opts.startSeconds = _this.props.opts.playerVars.start;
|
|
5252
5283
|
}
|
|
5284
|
+
|
|
5253
5285
|
if ('end' in _this.props.opts.playerVars) {
|
|
5254
5286
|
opts.endSeconds = _this.props.opts.playerVars.end;
|
|
5255
5287
|
}
|
|
5256
|
-
}
|
|
5288
|
+
} // if autoplay is enabled loadVideoById
|
|
5289
|
+
|
|
5257
5290
|
|
|
5258
|
-
// if autoplay is enabled loadVideoById
|
|
5259
5291
|
if (autoplay) {
|
|
5260
5292
|
_this.internalPlayer.loadVideoById(opts);
|
|
5293
|
+
|
|
5261
5294
|
return;
|
|
5262
|
-
}
|
|
5263
|
-
|
|
5295
|
+
} // default behaviour just cues the video
|
|
5296
|
+
|
|
5297
|
+
|
|
5264
5298
|
_this.internalPlayer.cueVideoById(opts);
|
|
5265
|
-
};
|
|
5299
|
+
});
|
|
5266
5300
|
|
|
5267
|
-
_this
|
|
5301
|
+
_defineProperty(_assertThisInitialized(_this), "refContainer", function (container) {
|
|
5268
5302
|
_this.container = container;
|
|
5269
|
-
};
|
|
5303
|
+
});
|
|
5270
5304
|
|
|
5271
5305
|
_this.container = null;
|
|
5272
5306
|
_this.internalPlayer = null;
|
|
5273
5307
|
return _this;
|
|
5274
5308
|
}
|
|
5275
5309
|
|
|
5276
|
-
/**
|
|
5277
|
-
* Expose PlayerState constants for convenience. These constants can also be
|
|
5278
|
-
* accessed through the global YT object after the YouTube IFrame API is instantiated.
|
|
5279
|
-
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
5280
|
-
*/
|
|
5281
|
-
|
|
5282
|
-
|
|
5283
5310
|
_createClass(YouTube, [{
|
|
5284
|
-
key:
|
|
5311
|
+
key: "componentDidMount",
|
|
5285
5312
|
value: function componentDidMount() {
|
|
5286
5313
|
this.createPlayer();
|
|
5287
5314
|
}
|
|
5288
5315
|
}, {
|
|
5289
|
-
key:
|
|
5316
|
+
key: "componentDidUpdate",
|
|
5290
5317
|
value: function componentDidUpdate(prevProps) {
|
|
5291
5318
|
if (shouldUpdatePlayer(prevProps, this.props)) {
|
|
5292
5319
|
this.updatePlayer();
|
|
@@ -5301,112 +5328,58 @@ var YouTube = function (_React$Component) {
|
|
|
5301
5328
|
}
|
|
5302
5329
|
}
|
|
5303
5330
|
}, {
|
|
5304
|
-
key:
|
|
5331
|
+
key: "componentWillUnmount",
|
|
5305
5332
|
value: function componentWillUnmount() {
|
|
5306
|
-
/**
|
|
5307
|
-
* Note: The `youtube-player` package that is used promisifies all
|
|
5308
|
-
* Player API calls, which introduces a delay of a tick before it actually
|
|
5309
|
-
* gets destroyed. Since React attempts to remove the element instantly
|
|
5310
|
-
* this method isn't quick enough to reset the container element.
|
|
5333
|
+
/**
|
|
5334
|
+
* Note: The `youtube-player` package that is used promisifies all YouTube
|
|
5335
|
+
* Player API calls, which introduces a delay of a tick before it actually
|
|
5336
|
+
* gets destroyed. Since React attempts to remove the element instantly
|
|
5337
|
+
* this method isn't quick enough to reset the container element.
|
|
5311
5338
|
*/
|
|
5312
5339
|
this.internalPlayer.destroy();
|
|
5313
5340
|
}
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
*
|
|
5317
|
-
*
|
|
5318
|
-
*
|
|
5319
|
-
* @param {Object} target - player object
|
|
5320
|
-
*/
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
/**
|
|
5324
|
-
* https://developers.google.com/youtube/iframe_api_reference#onError
|
|
5325
|
-
*
|
|
5326
|
-
* @param {Object} event
|
|
5327
|
-
* @param {Integer} data - error type
|
|
5328
|
-
* @param {Object} target - player object
|
|
5329
|
-
*/
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
/**
|
|
5333
|
-
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
5334
|
-
*
|
|
5335
|
-
* @param {Object} event
|
|
5336
|
-
* @param {Integer} data - status change type
|
|
5337
|
-
* @param {Object} target - actual YT player
|
|
5338
|
-
*/
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
/**
|
|
5342
|
-
* https://developers.google.com/youtube/iframe_api_reference#onPlaybackRateChange
|
|
5343
|
-
*
|
|
5344
|
-
* @param {Object} event
|
|
5345
|
-
* @param {Float} data - playback rate
|
|
5346
|
-
* @param {Object} target - actual YT player
|
|
5347
|
-
*/
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
/**
|
|
5351
|
-
* https://developers.google.com/youtube/iframe_api_reference#onPlaybackQualityChange
|
|
5352
|
-
*
|
|
5353
|
-
* @param {Object} event
|
|
5354
|
-
* @param {String} data - playback quality
|
|
5355
|
-
* @param {Object} target - actual YT player
|
|
5356
|
-
*/
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
/**
|
|
5360
|
-
* Initialize the Youtube Player API on the container and attach event handlers
|
|
5361
|
-
*/
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
/**
|
|
5365
|
-
* Shorthand for destroying and then re-creating the Youtube Player
|
|
5366
|
-
*/
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
/**
|
|
5370
|
-
* Method to update the id and class of the Youtube Player iframe.
|
|
5371
|
-
* React should update this automatically but since the Youtube Player API
|
|
5372
|
-
* replaced the DIV that is mounted by React we need to do this manually.
|
|
5373
|
-
*/
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
/**
|
|
5377
|
-
* Call Youtube Player API methods to update the currently playing video.
|
|
5378
|
-
* Depeding on the `opts.playerVars.autoplay` this function uses one of two
|
|
5379
|
-
* Youtube Player API methods to update the video.
|
|
5341
|
+
/**
|
|
5342
|
+
* https://developers.google.com/youtube/iframe_api_reference#onReady
|
|
5343
|
+
*
|
|
5344
|
+
* @param {Object} event
|
|
5345
|
+
* @param {Object} target - player object
|
|
5380
5346
|
*/
|
|
5381
5347
|
|
|
5382
5348
|
}, {
|
|
5383
|
-
key:
|
|
5349
|
+
key: "render",
|
|
5384
5350
|
value: function render() {
|
|
5385
|
-
return React__default.createElement(
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5351
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
5352
|
+
className: this.props.containerClassName
|
|
5353
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
5354
|
+
id: this.props.id,
|
|
5355
|
+
className: this.props.className,
|
|
5356
|
+
ref: this.refContainer
|
|
5357
|
+
}));
|
|
5390
5358
|
}
|
|
5391
5359
|
}]);
|
|
5392
5360
|
|
|
5393
5361
|
return YouTube;
|
|
5394
5362
|
}(React__default.Component);
|
|
5395
5363
|
|
|
5364
|
+
_defineProperty(YouTube, "PlayerState", {
|
|
5365
|
+
UNSTARTED: -1,
|
|
5366
|
+
ENDED: 0,
|
|
5367
|
+
PLAYING: 1,
|
|
5368
|
+
PAUSED: 2,
|
|
5369
|
+
BUFFERING: 3,
|
|
5370
|
+
CUED: 5
|
|
5371
|
+
});
|
|
5372
|
+
|
|
5396
5373
|
YouTube.propTypes = {
|
|
5397
5374
|
videoId: PropTypes.string,
|
|
5398
|
-
|
|
5399
5375
|
// custom ID for player element
|
|
5400
5376
|
id: PropTypes.string,
|
|
5401
|
-
|
|
5402
5377
|
// custom class name for player element
|
|
5403
5378
|
className: PropTypes.string,
|
|
5404
5379
|
// custom class name for player container element
|
|
5405
5380
|
containerClassName: PropTypes.string,
|
|
5406
|
-
|
|
5407
5381
|
// https://developers.google.com/youtube/iframe_api_reference#Loading_a_Video_Player
|
|
5408
5382
|
opts: PropTypes.objectOf(PropTypes.any),
|
|
5409
|
-
|
|
5410
5383
|
// event subscriptions
|
|
5411
5384
|
onReady: PropTypes.func,
|
|
5412
5385
|
onError: PropTypes.func,
|
|
@@ -5418,6 +5391,7 @@ YouTube.propTypes = {
|
|
|
5418
5391
|
onPlaybackQualityChange: PropTypes.func
|
|
5419
5392
|
};
|
|
5420
5393
|
YouTube.defaultProps = {
|
|
5394
|
+
videoId: null,
|
|
5421
5395
|
id: null,
|
|
5422
5396
|
className: null,
|
|
5423
5397
|
opts: {},
|
|
@@ -5431,14 +5405,6 @@ YouTube.defaultProps = {
|
|
|
5431
5405
|
onPlaybackRateChange: function onPlaybackRateChange() {},
|
|
5432
5406
|
onPlaybackQualityChange: function onPlaybackQualityChange() {}
|
|
5433
5407
|
};
|
|
5434
|
-
YouTube.PlayerState = {
|
|
5435
|
-
UNSTARTED: -1,
|
|
5436
|
-
ENDED: 0,
|
|
5437
|
-
PLAYING: 1,
|
|
5438
|
-
PAUSED: 2,
|
|
5439
|
-
BUFFERING: 3,
|
|
5440
|
-
CUED: 5
|
|
5441
|
-
};
|
|
5442
5408
|
|
|
5443
5409
|
var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
5444
5410
|
var url = _ref.url;
|
|
@@ -6473,8 +6439,8 @@ var window_1 = win;
|
|
|
6473
6439
|
|
|
6474
6440
|
/*! @name @brightcove/react-player-loader @version 1.4.0 @license Apache-2.0 */
|
|
6475
6441
|
|
|
6476
|
-
function _extends
|
|
6477
|
-
_extends
|
|
6442
|
+
function _extends() {
|
|
6443
|
+
_extends = Object.assign || function (target) {
|
|
6478
6444
|
for (var i = 1; i < arguments.length; i++) {
|
|
6479
6445
|
var source = arguments[i];
|
|
6480
6446
|
|
|
@@ -6488,7 +6454,7 @@ function _extends$1() {
|
|
|
6488
6454
|
return target;
|
|
6489
6455
|
};
|
|
6490
6456
|
|
|
6491
|
-
return _extends
|
|
6457
|
+
return _extends.apply(this, arguments);
|
|
6492
6458
|
}
|
|
6493
6459
|
|
|
6494
6460
|
function _inheritsLoose(subClass, superClass) {
|
|
@@ -6497,7 +6463,7 @@ function _inheritsLoose(subClass, superClass) {
|
|
|
6497
6463
|
subClass.__proto__ = superClass;
|
|
6498
6464
|
}
|
|
6499
6465
|
|
|
6500
|
-
function _assertThisInitialized(self) {
|
|
6466
|
+
function _assertThisInitialized$1(self) {
|
|
6501
6467
|
if (self === void 0) {
|
|
6502
6468
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
6503
6469
|
}
|
|
@@ -6507,8 +6473,8 @@ function _assertThisInitialized(self) {
|
|
|
6507
6473
|
|
|
6508
6474
|
/*! @name @brightcove/player-loader @version 1.7.1 @license Apache-2.0 */
|
|
6509
6475
|
|
|
6510
|
-
function _extends$1
|
|
6511
|
-
_extends$1
|
|
6476
|
+
function _extends$1() {
|
|
6477
|
+
_extends$1 = Object.assign || function (target) {
|
|
6512
6478
|
for (var i = 1; i < arguments.length; i++) {
|
|
6513
6479
|
var source = arguments[i];
|
|
6514
6480
|
|
|
@@ -6522,7 +6488,7 @@ function _extends$1$1() {
|
|
|
6522
6488
|
return target;
|
|
6523
6489
|
};
|
|
6524
6490
|
|
|
6525
|
-
return _extends$1
|
|
6491
|
+
return _extends$1.apply(this, arguments);
|
|
6526
6492
|
}
|
|
6527
6493
|
|
|
6528
6494
|
var version$1 = "1.7.1";
|
|
@@ -6530,7 +6496,7 @@ var version$1 = "1.7.1";
|
|
|
6530
6496
|
/*! @name @brightcove/player-url @version 1.2.0 @license Apache-2.0 */
|
|
6531
6497
|
var version$1$1 = "1.2.0";
|
|
6532
6498
|
|
|
6533
|
-
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
|
6499
|
+
var _typeof$1 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
|
6534
6500
|
return typeof obj;
|
|
6535
6501
|
} : function (obj) {
|
|
6536
6502
|
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
@@ -6665,7 +6631,7 @@ var brightcovePlayerUrl = function brightcovePlayerUrl(_ref) {
|
|
|
6665
6631
|
|
|
6666
6632
|
var qs = '';
|
|
6667
6633
|
|
|
6668
|
-
if (iframe && queryParams && (typeof queryParams === 'undefined' ? 'undefined' : _typeof(queryParams)) === 'object') {
|
|
6634
|
+
if (iframe && queryParams && (typeof queryParams === 'undefined' ? 'undefined' : _typeof$1(queryParams)) === 'object') {
|
|
6669
6635
|
qs = getQueryString(queryParams);
|
|
6670
6636
|
}
|
|
6671
6637
|
|
|
@@ -6899,7 +6865,7 @@ var wrapResponsive = function wrapResponsive(embedType, embedOptions, el) {
|
|
|
6899
6865
|
el.style.width = '100%';
|
|
6900
6866
|
el.style.height = '100%';
|
|
6901
6867
|
|
|
6902
|
-
var responsive = _extends$1
|
|
6868
|
+
var responsive = _extends$1({
|
|
6903
6869
|
aspectRatio: DEFAULT_ASPECT_RATIO,
|
|
6904
6870
|
iframeHorizontalPlaylist: DEFAULT_IFRAME_HORIZONTAL_PLAYLIST,
|
|
6905
6871
|
maxWidth: DEFAULT_MAX_WIDTH
|
|
@@ -7584,7 +7550,7 @@ var loadPlayer = function loadPlayer(params, resolve, reject) {
|
|
|
7584
7550
|
|
|
7585
7551
|
|
|
7586
7552
|
var brightcovePlayerLoader = function brightcovePlayerLoader(parameters) {
|
|
7587
|
-
var params = _extends$1
|
|
7553
|
+
var params = _extends$1({}, DEFAULTS, parameters);
|
|
7588
7554
|
|
|
7589
7555
|
var Promise = params.Promise,
|
|
7590
7556
|
onSuccess = params.onSuccess,
|
|
@@ -7726,7 +7692,7 @@ function (_React$Component) {
|
|
|
7726
7692
|
_this.refNode = ref;
|
|
7727
7693
|
};
|
|
7728
7694
|
|
|
7729
|
-
_this.loadPlayer = _this.loadPlayer.bind(_assertThisInitialized(_this));
|
|
7695
|
+
_this.loadPlayer = _this.loadPlayer.bind(_assertThisInitialized$1(_this));
|
|
7730
7696
|
return _this;
|
|
7731
7697
|
}
|
|
7732
7698
|
/**
|
|
@@ -7747,7 +7713,7 @@ function (_React$Component) {
|
|
|
7747
7713
|
var userSuccess = this.props.onSuccess;
|
|
7748
7714
|
var userFailure = this.props.onFailure;
|
|
7749
7715
|
|
|
7750
|
-
var options = _extends
|
|
7716
|
+
var options = _extends({}, this.props, {
|
|
7751
7717
|
refNode: this.refNode,
|
|
7752
7718
|
refNodeInsert: 'append',
|
|
7753
7719
|
onSuccess: function onSuccess(_ref) {
|
|
@@ -8056,7 +8022,7 @@ function (_React$Component) {
|
|
|
8056
8022
|
;
|
|
8057
8023
|
|
|
8058
8024
|
_proto.render = function render() {
|
|
8059
|
-
var props = _extends
|
|
8025
|
+
var props = _extends({
|
|
8060
8026
|
className: 'brightcove-react-player-loader'
|
|
8061
8027
|
}, this.props.attrs, {
|
|
8062
8028
|
ref: this.setRefNode
|
|
@@ -8470,11 +8436,17 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
8470
8436
|
|
|
8471
8437
|
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; }
|
|
8472
8438
|
|
|
8473
|
-
function
|
|
8439
|
+
function _createForOfIteratorHelper(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var it, normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
8440
|
+
|
|
8441
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8442
|
+
|
|
8443
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
8474
8444
|
|
|
8475
|
-
function
|
|
8445
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8476
8446
|
|
|
8477
|
-
function
|
|
8447
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
8448
|
+
|
|
8449
|
+
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; 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"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
8478
8450
|
|
|
8479
8451
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8480
8452
|
|
|
@@ -8604,12 +8576,12 @@ function getSDK(url, sdkGlobal) {
|
|
|
8604
8576
|
|
|
8605
8577
|
function getConfig(props$1, defaultProps, showWarning) {
|
|
8606
8578
|
var config = (0, _deepmerge["default"])(defaultProps.config, props$1.config);
|
|
8607
|
-
|
|
8608
|
-
var
|
|
8609
|
-
|
|
8579
|
+
|
|
8580
|
+
var _iterator = _createForOfIteratorHelper(props.DEPRECATED_CONFIG_PROPS),
|
|
8581
|
+
_step;
|
|
8610
8582
|
|
|
8611
8583
|
try {
|
|
8612
|
-
for (
|
|
8584
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
8613
8585
|
var p = _step.value;
|
|
8614
8586
|
|
|
8615
8587
|
if (props$1[p]) {
|
|
@@ -8624,18 +8596,9 @@ function getConfig(props$1, defaultProps, showWarning) {
|
|
|
8624
8596
|
}
|
|
8625
8597
|
}
|
|
8626
8598
|
} catch (err) {
|
|
8627
|
-
|
|
8628
|
-
_iteratorError = err;
|
|
8599
|
+
_iterator.e(err);
|
|
8629
8600
|
} finally {
|
|
8630
|
-
|
|
8631
|
-
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
8632
|
-
_iterator["return"]();
|
|
8633
|
-
}
|
|
8634
|
-
} finally {
|
|
8635
|
-
if (_didIteratorError) {
|
|
8636
|
-
throw _iteratorError;
|
|
8637
|
-
}
|
|
8638
|
-
}
|
|
8601
|
+
_iterator.f();
|
|
8639
8602
|
}
|
|
8640
8603
|
|
|
8641
8604
|
return config;
|
|
@@ -8782,12 +8745,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
8782
8745
|
|
|
8783
8746
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
8784
8747
|
|
|
8785
|
-
function
|
|
8748
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
8786
8749
|
|
|
8787
|
-
function
|
|
8750
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
8788
8751
|
|
|
8789
8752
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
8790
8753
|
|
|
8754
|
+
function _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; } }
|
|
8755
|
+
|
|
8756
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
8757
|
+
|
|
8791
8758
|
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); }
|
|
8792
8759
|
|
|
8793
8760
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -8796,14 +8763,12 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
8796
8763
|
|
|
8797
8764
|
var SEEK_ON_PLAY_EXPIRY = 5000;
|
|
8798
8765
|
|
|
8799
|
-
var Player =
|
|
8800
|
-
/*#__PURE__*/
|
|
8801
|
-
function (_Component) {
|
|
8766
|
+
var Player = /*#__PURE__*/function (_Component) {
|
|
8802
8767
|
_inherits(Player, _Component);
|
|
8803
8768
|
|
|
8804
|
-
|
|
8805
|
-
var _getPrototypeOf2;
|
|
8769
|
+
var _super = _createSuper(Player);
|
|
8806
8770
|
|
|
8771
|
+
function Player() {
|
|
8807
8772
|
var _this;
|
|
8808
8773
|
|
|
8809
8774
|
_classCallCheck(this, Player);
|
|
@@ -8812,7 +8777,7 @@ function (_Component) {
|
|
|
8812
8777
|
_args[_key] = arguments[_key];
|
|
8813
8778
|
}
|
|
8814
8779
|
|
|
8815
|
-
_this =
|
|
8780
|
+
_this = _super.call.apply(_super, [this].concat(_args));
|
|
8816
8781
|
|
|
8817
8782
|
_defineProperty(_assertThisInitialized(_this), "mounted", false);
|
|
8818
8783
|
|
|
@@ -9137,7 +9102,7 @@ function (_Component) {
|
|
|
9137
9102
|
return null;
|
|
9138
9103
|
}
|
|
9139
9104
|
|
|
9140
|
-
return _react["default"].createElement(Player, _extends({}, this.props, {
|
|
9105
|
+
return /*#__PURE__*/_react["default"].createElement(Player, _extends({}, this.props, {
|
|
9141
9106
|
ref: this.ref,
|
|
9142
9107
|
onReady: this.handleReady,
|
|
9143
9108
|
onPlay: this.handlePlay,
|
|
@@ -9198,12 +9163,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
9198
9163
|
|
|
9199
9164
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
9200
9165
|
|
|
9201
|
-
function
|
|
9166
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9202
9167
|
|
|
9203
|
-
function
|
|
9168
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
9204
9169
|
|
|
9205
9170
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9206
9171
|
|
|
9172
|
+
function _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; } }
|
|
9173
|
+
|
|
9174
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9175
|
+
|
|
9207
9176
|
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); }
|
|
9208
9177
|
|
|
9209
9178
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -9215,14 +9184,12 @@ var SUPPORTED_PROPS = Object.keys(props.propTypes);
|
|
|
9215
9184
|
function createSinglePlayer(activePlayer) {
|
|
9216
9185
|
var _class, _temp;
|
|
9217
9186
|
|
|
9218
|
-
return _temp = _class =
|
|
9219
|
-
/*#__PURE__*/
|
|
9220
|
-
function (_Component) {
|
|
9187
|
+
return _temp = _class = /*#__PURE__*/function (_Component) {
|
|
9221
9188
|
_inherits(SinglePlayer, _Component);
|
|
9222
9189
|
|
|
9223
|
-
|
|
9224
|
-
var _getPrototypeOf2;
|
|
9190
|
+
var _super = _createSuper(SinglePlayer);
|
|
9225
9191
|
|
|
9192
|
+
function SinglePlayer() {
|
|
9226
9193
|
var _this;
|
|
9227
9194
|
|
|
9228
9195
|
_classCallCheck(this, SinglePlayer);
|
|
@@ -9231,7 +9198,7 @@ function createSinglePlayer(activePlayer) {
|
|
|
9231
9198
|
args[_key] = arguments[_key];
|
|
9232
9199
|
}
|
|
9233
9200
|
|
|
9234
|
-
_this =
|
|
9201
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
9235
9202
|
|
|
9236
9203
|
_defineProperty(_assertThisInitialized(_this), "config", (0, utils.getConfig)(_this.props, props.defaultProps, true));
|
|
9237
9204
|
|
|
@@ -9299,12 +9266,12 @@ function createSinglePlayer(activePlayer) {
|
|
|
9299
9266
|
height = _this$props.height,
|
|
9300
9267
|
Wrapper = _this$props.wrapper;
|
|
9301
9268
|
var otherProps = (0, utils.omit)(this.props, SUPPORTED_PROPS, props.DEPRECATED_CONFIG_PROPS);
|
|
9302
|
-
return _react["default"].createElement(Wrapper, _extends({
|
|
9269
|
+
return /*#__PURE__*/_react["default"].createElement(Wrapper, _extends({
|
|
9303
9270
|
style: _objectSpread({}, style, {
|
|
9304
9271
|
width: width,
|
|
9305
9272
|
height: height
|
|
9306
9273
|
})
|
|
9307
|
-
}, otherProps), _react["default"].createElement(_Player["default"], _extends({}, this.props, {
|
|
9274
|
+
}, otherProps), /*#__PURE__*/_react["default"].createElement(_Player["default"], _extends({}, this.props, {
|
|
9308
9275
|
ref: this.ref,
|
|
9309
9276
|
activePlayer: activePlayer,
|
|
9310
9277
|
config: this.config
|
|
@@ -9350,23 +9317,31 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
9350
9317
|
|
|
9351
9318
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
9352
9319
|
|
|
9353
|
-
function
|
|
9320
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9354
9321
|
|
|
9355
|
-
function
|
|
9322
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
9356
9323
|
|
|
9357
9324
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9358
9325
|
|
|
9326
|
+
function _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; } }
|
|
9327
|
+
|
|
9328
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9329
|
+
|
|
9359
9330
|
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); }
|
|
9360
9331
|
|
|
9361
9332
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
9362
9333
|
|
|
9363
9334
|
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; }
|
|
9364
9335
|
|
|
9365
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
9336
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
9366
9337
|
|
|
9367
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
9338
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9368
9339
|
|
|
9369
|
-
function
|
|
9340
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
9341
|
+
|
|
9342
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
9343
|
+
|
|
9344
|
+
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; 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"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
9370
9345
|
|
|
9371
9346
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
9372
9347
|
|
|
@@ -9391,14 +9366,12 @@ function parsePlaylist(url) {
|
|
|
9391
9366
|
return {};
|
|
9392
9367
|
}
|
|
9393
9368
|
|
|
9394
|
-
var YouTube =
|
|
9395
|
-
/*#__PURE__*/
|
|
9396
|
-
function (_Component) {
|
|
9369
|
+
var YouTube = /*#__PURE__*/function (_Component) {
|
|
9397
9370
|
_inherits(YouTube, _Component);
|
|
9398
9371
|
|
|
9399
|
-
|
|
9400
|
-
var _getPrototypeOf2;
|
|
9372
|
+
var _super = _createSuper(YouTube);
|
|
9401
9373
|
|
|
9374
|
+
function YouTube() {
|
|
9402
9375
|
var _this;
|
|
9403
9376
|
|
|
9404
9377
|
_classCallCheck(this, YouTube);
|
|
@@ -9407,7 +9380,7 @@ function (_Component) {
|
|
|
9407
9380
|
args[_key] = arguments[_key];
|
|
9408
9381
|
}
|
|
9409
9382
|
|
|
9410
|
-
_this =
|
|
9383
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
9411
9384
|
|
|
9412
9385
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
9413
9386
|
|
|
@@ -9595,9 +9568,9 @@ function (_Component) {
|
|
|
9595
9568
|
height: '100%',
|
|
9596
9569
|
display: display
|
|
9597
9570
|
};
|
|
9598
|
-
return _react["default"].createElement("div", {
|
|
9571
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
9599
9572
|
style: style
|
|
9600
|
-
}, _react["default"].createElement("div", {
|
|
9573
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
9601
9574
|
ref: this.ref
|
|
9602
9575
|
}));
|
|
9603
9576
|
}
|
|
@@ -9653,12 +9626,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
9653
9626
|
|
|
9654
9627
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
9655
9628
|
|
|
9656
|
-
function
|
|
9629
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9657
9630
|
|
|
9658
|
-
function
|
|
9631
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
9659
9632
|
|
|
9660
9633
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9661
9634
|
|
|
9635
|
+
function _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; } }
|
|
9636
|
+
|
|
9637
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9638
|
+
|
|
9662
9639
|
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); }
|
|
9663
9640
|
|
|
9664
9641
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -9667,16 +9644,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
9667
9644
|
|
|
9668
9645
|
var SDK_URL = 'https://w.soundcloud.com/player/api.js';
|
|
9669
9646
|
var SDK_GLOBAL = 'SC';
|
|
9670
|
-
var MATCH_URL = /(soundcloud\.com|snd\.sc)
|
|
9647
|
+
var MATCH_URL = /(?:soundcloud\.com|snd\.sc)\/[^.]+$/;
|
|
9671
9648
|
|
|
9672
|
-
var SoundCloud =
|
|
9673
|
-
/*#__PURE__*/
|
|
9674
|
-
function (_Component) {
|
|
9649
|
+
var SoundCloud = /*#__PURE__*/function (_Component) {
|
|
9675
9650
|
_inherits(SoundCloud, _Component);
|
|
9676
9651
|
|
|
9677
|
-
|
|
9678
|
-
var _getPrototypeOf2;
|
|
9652
|
+
var _super = _createSuper(SoundCloud);
|
|
9679
9653
|
|
|
9654
|
+
function SoundCloud() {
|
|
9680
9655
|
var _this;
|
|
9681
9656
|
|
|
9682
9657
|
_classCallCheck(this, SoundCloud);
|
|
@@ -9685,7 +9660,7 @@ function (_Component) {
|
|
|
9685
9660
|
args[_key] = arguments[_key];
|
|
9686
9661
|
}
|
|
9687
9662
|
|
|
9688
|
-
_this =
|
|
9663
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
9689
9664
|
|
|
9690
9665
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
9691
9666
|
|
|
@@ -9806,7 +9781,7 @@ function (_Component) {
|
|
|
9806
9781
|
height: '100%',
|
|
9807
9782
|
display: display
|
|
9808
9783
|
};
|
|
9809
|
-
return _react["default"].createElement("iframe", {
|
|
9784
|
+
return /*#__PURE__*/_react["default"].createElement("iframe", {
|
|
9810
9785
|
ref: this.ref,
|
|
9811
9786
|
src: "https://w.soundcloud.com/player/?url=".concat(encodeURIComponent(this.props.url)),
|
|
9812
9787
|
style: style,
|
|
@@ -9868,12 +9843,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
9868
9843
|
|
|
9869
9844
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
9870
9845
|
|
|
9871
|
-
function
|
|
9846
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9872
9847
|
|
|
9873
|
-
function
|
|
9848
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
9874
9849
|
|
|
9875
9850
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9876
9851
|
|
|
9852
|
+
function _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; } }
|
|
9853
|
+
|
|
9854
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9855
|
+
|
|
9877
9856
|
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); }
|
|
9878
9857
|
|
|
9879
9858
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -9885,14 +9864,12 @@ var SDK_GLOBAL = 'Vimeo';
|
|
|
9885
9864
|
var MATCH_URL = /vimeo\.com\/.+/;
|
|
9886
9865
|
var MATCH_FILE_URL = /vimeo\.com\/external\/[0-9]+\..+/;
|
|
9887
9866
|
|
|
9888
|
-
var Vimeo =
|
|
9889
|
-
/*#__PURE__*/
|
|
9890
|
-
function (_Component) {
|
|
9867
|
+
var Vimeo = /*#__PURE__*/function (_Component) {
|
|
9891
9868
|
_inherits(Vimeo, _Component);
|
|
9892
9869
|
|
|
9893
|
-
|
|
9894
|
-
var _getPrototypeOf2;
|
|
9870
|
+
var _super = _createSuper(Vimeo);
|
|
9895
9871
|
|
|
9872
|
+
function Vimeo() {
|
|
9896
9873
|
var _this;
|
|
9897
9874
|
|
|
9898
9875
|
_classCallCheck(this, Vimeo);
|
|
@@ -9901,7 +9878,7 @@ function (_Component) {
|
|
|
9901
9878
|
args[_key] = arguments[_key];
|
|
9902
9879
|
}
|
|
9903
9880
|
|
|
9904
|
-
_this =
|
|
9881
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
9905
9882
|
|
|
9906
9883
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
9907
9884
|
|
|
@@ -10058,7 +10035,7 @@ function (_Component) {
|
|
|
10058
10035
|
overflow: 'hidden',
|
|
10059
10036
|
display: display
|
|
10060
10037
|
};
|
|
10061
|
-
return _react["default"].createElement("div", {
|
|
10038
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
10062
10039
|
key: this.props.url,
|
|
10063
10040
|
ref: this.ref,
|
|
10064
10041
|
style: style
|
|
@@ -10118,12 +10095,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10118
10095
|
|
|
10119
10096
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10120
10097
|
|
|
10121
|
-
function
|
|
10098
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10122
10099
|
|
|
10123
|
-
function
|
|
10100
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10124
10101
|
|
|
10125
10102
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10126
10103
|
|
|
10104
|
+
function _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; } }
|
|
10105
|
+
|
|
10106
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10107
|
+
|
|
10127
10108
|
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); }
|
|
10128
10109
|
|
|
10129
10110
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10136,14 +10117,12 @@ var SDK_GLOBAL_READY = 'fbAsyncInit';
|
|
|
10136
10117
|
var MATCH_URL = /^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/;
|
|
10137
10118
|
var PLAYER_ID_PREFIX = 'facebook-player-';
|
|
10138
10119
|
|
|
10139
|
-
var Facebook =
|
|
10140
|
-
/*#__PURE__*/
|
|
10141
|
-
function (_Component) {
|
|
10120
|
+
var Facebook = /*#__PURE__*/function (_Component) {
|
|
10142
10121
|
_inherits(Facebook, _Component);
|
|
10143
10122
|
|
|
10144
|
-
|
|
10145
|
-
var _getPrototypeOf2;
|
|
10123
|
+
var _super = _createSuper(Facebook);
|
|
10146
10124
|
|
|
10125
|
+
function Facebook() {
|
|
10147
10126
|
var _this;
|
|
10148
10127
|
|
|
10149
10128
|
_classCallCheck(this, Facebook);
|
|
@@ -10152,7 +10131,7 @@ function (_Component) {
|
|
|
10152
10131
|
args[_key] = arguments[_key];
|
|
10153
10132
|
}
|
|
10154
10133
|
|
|
10155
|
-
_this =
|
|
10134
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
10156
10135
|
|
|
10157
10136
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10158
10137
|
|
|
@@ -10268,7 +10247,7 @@ function (_Component) {
|
|
|
10268
10247
|
width: '100%',
|
|
10269
10248
|
height: '100%'
|
|
10270
10249
|
};
|
|
10271
|
-
return _react["default"].createElement("div", {
|
|
10250
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
10272
10251
|
style: style,
|
|
10273
10252
|
id: this.playerID,
|
|
10274
10253
|
className: "fb-video",
|
|
@@ -10328,12 +10307,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10328
10307
|
|
|
10329
10308
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10330
10309
|
|
|
10331
|
-
function
|
|
10310
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10332
10311
|
|
|
10333
|
-
function
|
|
10312
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10334
10313
|
|
|
10335
10314
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10336
10315
|
|
|
10316
|
+
function _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; } }
|
|
10317
|
+
|
|
10318
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10319
|
+
|
|
10337
10320
|
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); }
|
|
10338
10321
|
|
|
10339
10322
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10344,14 +10327,12 @@ var SDK_URL = 'https://cdn.embed.ly/player-0.1.0.min.js';
|
|
|
10344
10327
|
var SDK_GLOBAL = 'playerjs';
|
|
10345
10328
|
var MATCH_URL = /streamable\.com\/([a-z0-9]+)$/;
|
|
10346
10329
|
|
|
10347
|
-
var Streamable =
|
|
10348
|
-
/*#__PURE__*/
|
|
10349
|
-
function (_Component) {
|
|
10330
|
+
var Streamable = /*#__PURE__*/function (_Component) {
|
|
10350
10331
|
_inherits(Streamable, _Component);
|
|
10351
10332
|
|
|
10352
|
-
|
|
10353
|
-
var _getPrototypeOf2;
|
|
10333
|
+
var _super = _createSuper(Streamable);
|
|
10354
10334
|
|
|
10335
|
+
function Streamable() {
|
|
10355
10336
|
var _this;
|
|
10356
10337
|
|
|
10357
10338
|
_classCallCheck(this, Streamable);
|
|
@@ -10360,7 +10341,7 @@ function (_Component) {
|
|
|
10360
10341
|
args[_key] = arguments[_key];
|
|
10361
10342
|
}
|
|
10362
10343
|
|
|
10363
|
-
_this =
|
|
10344
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
10364
10345
|
|
|
10365
10346
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10366
10347
|
|
|
@@ -10480,7 +10461,7 @@ function (_Component) {
|
|
|
10480
10461
|
width: '100%',
|
|
10481
10462
|
height: '100%'
|
|
10482
10463
|
};
|
|
10483
|
-
return _react["default"].createElement("iframe", {
|
|
10464
|
+
return /*#__PURE__*/_react["default"].createElement("iframe", {
|
|
10484
10465
|
ref: this.ref,
|
|
10485
10466
|
src: "https://streamable.com/o/".concat(id),
|
|
10486
10467
|
frameBorder: "0",
|
|
@@ -10541,12 +10522,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10541
10522
|
|
|
10542
10523
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10543
10524
|
|
|
10544
|
-
function
|
|
10525
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10545
10526
|
|
|
10546
|
-
function
|
|
10527
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10547
10528
|
|
|
10548
10529
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10549
10530
|
|
|
10531
|
+
function _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; } }
|
|
10532
|
+
|
|
10533
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10534
|
+
|
|
10550
10535
|
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); }
|
|
10551
10536
|
|
|
10552
10537
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10557,26 +10542,48 @@ var SDK_URL = 'https://fast.wistia.com/assets/external/E-v1.js';
|
|
|
10557
10542
|
var SDK_GLOBAL = 'Wistia';
|
|
10558
10543
|
var MATCH_URL = /(?:wistia\.com|wi\.st)\/(?:medias|embed)\/(.*)$/;
|
|
10559
10544
|
|
|
10560
|
-
var Wistia =
|
|
10561
|
-
/*#__PURE__*/
|
|
10562
|
-
function (_Component) {
|
|
10545
|
+
var Wistia = /*#__PURE__*/function (_Component) {
|
|
10563
10546
|
_inherits(Wistia, _Component);
|
|
10564
10547
|
|
|
10565
|
-
|
|
10566
|
-
var _getPrototypeOf2;
|
|
10548
|
+
var _super = _createSuper(Wistia);
|
|
10567
10549
|
|
|
10550
|
+
function Wistia() {
|
|
10568
10551
|
var _this;
|
|
10569
10552
|
|
|
10570
10553
|
_classCallCheck(this, Wistia);
|
|
10571
10554
|
|
|
10572
|
-
for (var _len = arguments.length,
|
|
10573
|
-
|
|
10555
|
+
for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
10556
|
+
_args[_key] = arguments[_key];
|
|
10574
10557
|
}
|
|
10575
10558
|
|
|
10576
|
-
_this =
|
|
10559
|
+
_this = _super.call.apply(_super, [this].concat(_args));
|
|
10577
10560
|
|
|
10578
10561
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10579
10562
|
|
|
10563
|
+
_defineProperty(_assertThisInitialized(_this), "onPlay", function () {
|
|
10564
|
+
var _this$props;
|
|
10565
|
+
|
|
10566
|
+
return (_this$props = _this.props).onPlay.apply(_this$props, arguments);
|
|
10567
|
+
});
|
|
10568
|
+
|
|
10569
|
+
_defineProperty(_assertThisInitialized(_this), "onPause", function () {
|
|
10570
|
+
var _this$props2;
|
|
10571
|
+
|
|
10572
|
+
return (_this$props2 = _this.props).onPause.apply(_this$props2, arguments);
|
|
10573
|
+
});
|
|
10574
|
+
|
|
10575
|
+
_defineProperty(_assertThisInitialized(_this), "onSeek", function () {
|
|
10576
|
+
var _this$props3;
|
|
10577
|
+
|
|
10578
|
+
return (_this$props3 = _this.props).onSeek.apply(_this$props3, arguments);
|
|
10579
|
+
});
|
|
10580
|
+
|
|
10581
|
+
_defineProperty(_assertThisInitialized(_this), "onEnded", function () {
|
|
10582
|
+
var _this$props4;
|
|
10583
|
+
|
|
10584
|
+
return (_this$props4 = _this.props).onEnded.apply(_this$props4, arguments);
|
|
10585
|
+
});
|
|
10586
|
+
|
|
10580
10587
|
_defineProperty(_assertThisInitialized(_this), "mute", function () {
|
|
10581
10588
|
_this.callPlayer('mute');
|
|
10582
10589
|
});
|
|
@@ -10598,17 +10605,13 @@ function (_Component) {
|
|
|
10598
10605
|
value: function load(url) {
|
|
10599
10606
|
var _this2 = this;
|
|
10600
10607
|
|
|
10601
|
-
var _this$
|
|
10602
|
-
playing = _this$
|
|
10603
|
-
muted = _this$
|
|
10604
|
-
controls = _this$
|
|
10605
|
-
_onReady = _this$
|
|
10606
|
-
|
|
10607
|
-
|
|
10608
|
-
onSeek = _this$props.onSeek,
|
|
10609
|
-
onEnded = _this$props.onEnded,
|
|
10610
|
-
config = _this$props.config,
|
|
10611
|
-
onError = _this$props.onError;
|
|
10608
|
+
var _this$props5 = this.props,
|
|
10609
|
+
playing = _this$props5.playing,
|
|
10610
|
+
muted = _this$props5.muted,
|
|
10611
|
+
controls = _this$props5.controls,
|
|
10612
|
+
_onReady = _this$props5.onReady,
|
|
10613
|
+
config = _this$props5.config,
|
|
10614
|
+
onError = _this$props5.onError;
|
|
10612
10615
|
(0, utils.getSDK)(SDK_URL, SDK_GLOBAL).then(function () {
|
|
10613
10616
|
window._wq = window._wq || [];
|
|
10614
10617
|
|
|
@@ -10625,19 +10628,28 @@ function (_Component) {
|
|
|
10625
10628
|
|
|
10626
10629
|
_this2.unbind();
|
|
10627
10630
|
|
|
10628
|
-
_this2.player.bind('play', onPlay);
|
|
10631
|
+
_this2.player.bind('play', _this2.onPlay);
|
|
10629
10632
|
|
|
10630
|
-
_this2.player.bind('pause', onPause);
|
|
10633
|
+
_this2.player.bind('pause', _this2.onPause);
|
|
10631
10634
|
|
|
10632
|
-
_this2.player.bind('seek', onSeek);
|
|
10635
|
+
_this2.player.bind('seek', _this2.onSeek);
|
|
10633
10636
|
|
|
10634
|
-
_this2.player.bind('end', onEnded);
|
|
10637
|
+
_this2.player.bind('end', _this2.onEnded);
|
|
10635
10638
|
|
|
10636
10639
|
_onReady();
|
|
10637
10640
|
}
|
|
10638
10641
|
});
|
|
10639
10642
|
}, onError);
|
|
10640
10643
|
}
|
|
10644
|
+
}, {
|
|
10645
|
+
key: "unbind",
|
|
10646
|
+
value: function unbind() {
|
|
10647
|
+
this.player.unbind('play', this.onPlay);
|
|
10648
|
+
this.player.unbind('pause', this.onPause);
|
|
10649
|
+
this.player.unbind('seek', this.onSeek);
|
|
10650
|
+
this.player.unbind('end', this.onEnded);
|
|
10651
|
+
} // Proxy methods to prevent listener leaks
|
|
10652
|
+
|
|
10641
10653
|
}, {
|
|
10642
10654
|
key: "play",
|
|
10643
10655
|
value: function play() {
|
|
@@ -10648,19 +10660,6 @@ function (_Component) {
|
|
|
10648
10660
|
value: function pause() {
|
|
10649
10661
|
this.callPlayer('pause');
|
|
10650
10662
|
}
|
|
10651
|
-
}, {
|
|
10652
|
-
key: "unbind",
|
|
10653
|
-
value: function unbind() {
|
|
10654
|
-
var _this$props2 = this.props,
|
|
10655
|
-
onPlay = _this$props2.onPlay,
|
|
10656
|
-
onPause = _this$props2.onPause,
|
|
10657
|
-
onSeek = _this$props2.onSeek,
|
|
10658
|
-
onEnded = _this$props2.onEnded;
|
|
10659
|
-
this.player.unbind('play', onPlay);
|
|
10660
|
-
this.player.unbind('pause', onPause);
|
|
10661
|
-
this.player.unbind('seek', onSeek);
|
|
10662
|
-
this.player.unbind('end', onEnded);
|
|
10663
|
-
}
|
|
10664
10663
|
}, {
|
|
10665
10664
|
key: "stop",
|
|
10666
10665
|
value: function stop() {
|
|
@@ -10706,7 +10705,7 @@ function (_Component) {
|
|
|
10706
10705
|
width: '100%',
|
|
10707
10706
|
height: '100%'
|
|
10708
10707
|
};
|
|
10709
|
-
return _react["default"].createElement("div", {
|
|
10708
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
10710
10709
|
key: id,
|
|
10711
10710
|
className: className,
|
|
10712
10711
|
style: style
|
|
@@ -10766,12 +10765,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10766
10765
|
|
|
10767
10766
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10768
10767
|
|
|
10769
|
-
function
|
|
10768
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10770
10769
|
|
|
10771
|
-
function
|
|
10770
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10772
10771
|
|
|
10773
10772
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10774
10773
|
|
|
10774
|
+
function _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; } }
|
|
10775
|
+
|
|
10776
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10777
|
+
|
|
10775
10778
|
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); }
|
|
10776
10779
|
|
|
10777
10780
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10784,14 +10787,12 @@ var MATCH_VIDEO_URL = /(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/;
|
|
|
10784
10787
|
var MATCH_CHANNEL_URL = /(?:www\.|go\.)?twitch\.tv\/([a-z0-9_]+)($|\?)/;
|
|
10785
10788
|
var PLAYER_ID_PREFIX = 'twitch-player-';
|
|
10786
10789
|
|
|
10787
|
-
var Twitch =
|
|
10788
|
-
/*#__PURE__*/
|
|
10789
|
-
function (_Component) {
|
|
10790
|
+
var Twitch = /*#__PURE__*/function (_Component) {
|
|
10790
10791
|
_inherits(Twitch, _Component);
|
|
10791
10792
|
|
|
10792
|
-
|
|
10793
|
-
var _getPrototypeOf2;
|
|
10793
|
+
var _super = _createSuper(Twitch);
|
|
10794
10794
|
|
|
10795
|
+
function Twitch() {
|
|
10795
10796
|
var _this;
|
|
10796
10797
|
|
|
10797
10798
|
_classCallCheck(this, Twitch);
|
|
@@ -10800,7 +10801,7 @@ function (_Component) {
|
|
|
10800
10801
|
args[_key] = arguments[_key];
|
|
10801
10802
|
}
|
|
10802
10803
|
|
|
10803
|
-
_this =
|
|
10804
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
10804
10805
|
|
|
10805
10806
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10806
10807
|
|
|
@@ -10921,7 +10922,7 @@ function (_Component) {
|
|
|
10921
10922
|
width: '100%',
|
|
10922
10923
|
height: '100%'
|
|
10923
10924
|
};
|
|
10924
|
-
return _react["default"].createElement("div", {
|
|
10925
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
10925
10926
|
style: style,
|
|
10926
10927
|
id: this.playerID
|
|
10927
10928
|
});
|
|
@@ -10974,11 +10975,15 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
10974
10975
|
|
|
10975
10976
|
function _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; }
|
|
10976
10977
|
|
|
10977
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
10978
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
10979
|
+
|
|
10980
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10978
10981
|
|
|
10979
|
-
function
|
|
10982
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
10980
10983
|
|
|
10981
|
-
function
|
|
10984
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
10985
|
+
|
|
10986
|
+
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; 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"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
10982
10987
|
|
|
10983
10988
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
10984
10989
|
|
|
@@ -10988,12 +10993,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10988
10993
|
|
|
10989
10994
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10990
10995
|
|
|
10991
|
-
function
|
|
10996
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10992
10997
|
|
|
10993
|
-
function
|
|
10998
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10994
10999
|
|
|
10995
11000
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10996
11001
|
|
|
11002
|
+
function _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; } }
|
|
11003
|
+
|
|
11004
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11005
|
+
|
|
10997
11006
|
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); }
|
|
10998
11007
|
|
|
10999
11008
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -11005,14 +11014,12 @@ var SDK_GLOBAL = 'DM';
|
|
|
11005
11014
|
var SDK_GLOBAL_READY = 'dmAsyncInit';
|
|
11006
11015
|
var MATCH_URL = /^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?$/;
|
|
11007
11016
|
|
|
11008
|
-
var DailyMotion =
|
|
11009
|
-
/*#__PURE__*/
|
|
11010
|
-
function (_Component) {
|
|
11017
|
+
var DailyMotion = /*#__PURE__*/function (_Component) {
|
|
11011
11018
|
_inherits(DailyMotion, _Component);
|
|
11012
11019
|
|
|
11013
|
-
|
|
11014
|
-
var _getPrototypeOf2;
|
|
11020
|
+
var _super = _createSuper(DailyMotion);
|
|
11015
11021
|
|
|
11022
|
+
function DailyMotion() {
|
|
11016
11023
|
var _this;
|
|
11017
11024
|
|
|
11018
11025
|
_classCallCheck(this, DailyMotion);
|
|
@@ -11021,7 +11028,7 @@ function (_Component) {
|
|
|
11021
11028
|
args[_key] = arguments[_key];
|
|
11022
11029
|
}
|
|
11023
11030
|
|
|
11024
|
-
_this =
|
|
11031
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
11025
11032
|
|
|
11026
11033
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
11027
11034
|
|
|
@@ -11150,9 +11157,9 @@ function (_Component) {
|
|
|
11150
11157
|
height: '100%',
|
|
11151
11158
|
display: display
|
|
11152
11159
|
};
|
|
11153
|
-
return _react["default"].createElement("div", {
|
|
11160
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
11154
11161
|
style: style
|
|
11155
|
-
}, _react["default"].createElement("div", {
|
|
11162
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
11156
11163
|
ref: this.ref
|
|
11157
11164
|
}));
|
|
11158
11165
|
}
|
|
@@ -11210,12 +11217,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
11210
11217
|
|
|
11211
11218
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
11212
11219
|
|
|
11213
|
-
function
|
|
11220
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11214
11221
|
|
|
11215
|
-
function
|
|
11222
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
11216
11223
|
|
|
11217
11224
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11218
11225
|
|
|
11226
|
+
function _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; } }
|
|
11227
|
+
|
|
11228
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11229
|
+
|
|
11219
11230
|
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); }
|
|
11220
11231
|
|
|
11221
11232
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -11226,14 +11237,12 @@ var SDK_URL = 'https://widget.mixcloud.com/media/js/widgetApi.js';
|
|
|
11226
11237
|
var SDK_GLOBAL = 'Mixcloud';
|
|
11227
11238
|
var MATCH_URL = /mixcloud\.com\/([^/]+\/[^/]+)/;
|
|
11228
11239
|
|
|
11229
|
-
var Mixcloud =
|
|
11230
|
-
/*#__PURE__*/
|
|
11231
|
-
function (_Component) {
|
|
11240
|
+
var Mixcloud = /*#__PURE__*/function (_Component) {
|
|
11232
11241
|
_inherits(Mixcloud, _Component);
|
|
11233
11242
|
|
|
11234
|
-
|
|
11235
|
-
var _getPrototypeOf2;
|
|
11243
|
+
var _super = _createSuper(Mixcloud);
|
|
11236
11244
|
|
|
11245
|
+
function Mixcloud() {
|
|
11237
11246
|
var _this;
|
|
11238
11247
|
|
|
11239
11248
|
_classCallCheck(this, Mixcloud);
|
|
@@ -11242,7 +11251,7 @@ function (_Component) {
|
|
|
11242
11251
|
args[_key] = arguments[_key];
|
|
11243
11252
|
}
|
|
11244
11253
|
|
|
11245
|
-
_this =
|
|
11254
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
11246
11255
|
|
|
11247
11256
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
11248
11257
|
|
|
@@ -11345,7 +11354,7 @@ function (_Component) {
|
|
|
11345
11354
|
})); // We have to give the iframe a key here to prevent a
|
|
11346
11355
|
// weird dialog appearing when loading a new track
|
|
11347
11356
|
|
|
11348
|
-
return _react["default"].createElement("iframe", {
|
|
11357
|
+
return /*#__PURE__*/_react["default"].createElement("iframe", {
|
|
11349
11358
|
key: id,
|
|
11350
11359
|
ref: this.ref,
|
|
11351
11360
|
style: style,
|
|
@@ -11405,23 +11414,33 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
11405
11414
|
|
|
11406
11415
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
11407
11416
|
|
|
11408
|
-
function
|
|
11417
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11409
11418
|
|
|
11410
|
-
function
|
|
11419
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
11411
11420
|
|
|
11412
11421
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11413
11422
|
|
|
11423
|
+
function _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; } }
|
|
11424
|
+
|
|
11425
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11426
|
+
|
|
11414
11427
|
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); }
|
|
11415
11428
|
|
|
11416
11429
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
11417
11430
|
|
|
11418
11431
|
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; }
|
|
11419
11432
|
|
|
11433
|
+
function _createForOfIteratorHelper(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var it, normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
11434
|
+
|
|
11435
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
11436
|
+
|
|
11437
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
11438
|
+
|
|
11420
11439
|
var IOS = typeof navigator !== 'undefined' && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
|
11421
11440
|
var AUDIO_EXTENSIONS = /\.(m4a|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i;
|
|
11422
11441
|
var VIDEO_EXTENSIONS = /\.(mp4|og[gv]|webm|mov|m4v)($|\?)/i;
|
|
11423
11442
|
var HLS_EXTENSIONS = /\.(m3u8)($|\?)/i;
|
|
11424
|
-
var HLS_SDK_URL = 'https://cdn.jsdelivr.net/npm/hls.js@VERSION';
|
|
11443
|
+
var HLS_SDK_URL = 'https://cdn.jsdelivr.net/npm/hls.js@VERSION/dist/hls.min.js';
|
|
11425
11444
|
var HLS_GLOBAL = 'Hls';
|
|
11426
11445
|
var DASH_EXTENSIONS = /\.(mpd)($|\?)/i;
|
|
11427
11446
|
var DASH_SDK_URL = 'https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js';
|
|
@@ -11430,12 +11449,11 @@ var MATCH_DROPBOX_URL = /www\.dropbox\.com\/.+/;
|
|
|
11430
11449
|
|
|
11431
11450
|
function canPlay(url) {
|
|
11432
11451
|
if (url instanceof Array) {
|
|
11433
|
-
var
|
|
11434
|
-
|
|
11435
|
-
var _iteratorError = undefined;
|
|
11452
|
+
var _iterator = _createForOfIteratorHelper(url),
|
|
11453
|
+
_step;
|
|
11436
11454
|
|
|
11437
11455
|
try {
|
|
11438
|
-
for (
|
|
11456
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
11439
11457
|
var item = _step.value;
|
|
11440
11458
|
|
|
11441
11459
|
if (typeof item === 'string' && canPlay(item)) {
|
|
@@ -11447,18 +11465,9 @@ function canPlay(url) {
|
|
|
11447
11465
|
}
|
|
11448
11466
|
}
|
|
11449
11467
|
} catch (err) {
|
|
11450
|
-
|
|
11451
|
-
_iteratorError = err;
|
|
11468
|
+
_iterator.e(err);
|
|
11452
11469
|
} finally {
|
|
11453
|
-
|
|
11454
|
-
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
11455
|
-
_iterator["return"]();
|
|
11456
|
-
}
|
|
11457
|
-
} finally {
|
|
11458
|
-
if (_didIteratorError) {
|
|
11459
|
-
throw _iteratorError;
|
|
11460
|
-
}
|
|
11461
|
-
}
|
|
11470
|
+
_iterator.f();
|
|
11462
11471
|
}
|
|
11463
11472
|
|
|
11464
11473
|
return false;
|
|
@@ -11482,14 +11491,12 @@ function canEnablePIP(url) {
|
|
|
11482
11491
|
return canPlay(url) && (!!document.pictureInPictureEnabled || supportsWebKitPresentationMode()) && !AUDIO_EXTENSIONS.test(url);
|
|
11483
11492
|
}
|
|
11484
11493
|
|
|
11485
|
-
var FilePlayer =
|
|
11486
|
-
/*#__PURE__*/
|
|
11487
|
-
function (_Component) {
|
|
11494
|
+
var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
11488
11495
|
_inherits(FilePlayer, _Component);
|
|
11489
11496
|
|
|
11490
|
-
|
|
11491
|
-
var _getPrototypeOf2;
|
|
11497
|
+
var _super = _createSuper(FilePlayer);
|
|
11492
11498
|
|
|
11499
|
+
function FilePlayer() {
|
|
11493
11500
|
var _this;
|
|
11494
11501
|
|
|
11495
11502
|
_classCallCheck(this, FilePlayer);
|
|
@@ -11498,7 +11505,7 @@ function (_Component) {
|
|
|
11498
11505
|
_args[_key] = arguments[_key];
|
|
11499
11506
|
}
|
|
11500
11507
|
|
|
11501
|
-
_this =
|
|
11508
|
+
_this = _super.call.apply(_super, [this].concat(_args));
|
|
11502
11509
|
|
|
11503
11510
|
_defineProperty(_assertThisInitialized(_this), "onReady", function () {
|
|
11504
11511
|
var _this$props;
|
|
@@ -11585,19 +11592,19 @@ function (_Component) {
|
|
|
11585
11592
|
|
|
11586
11593
|
_defineProperty(_assertThisInitialized(_this), "renderSourceElement", function (source, index) {
|
|
11587
11594
|
if (typeof source === 'string') {
|
|
11588
|
-
return _react["default"].createElement("source", {
|
|
11595
|
+
return /*#__PURE__*/_react["default"].createElement("source", {
|
|
11589
11596
|
key: index,
|
|
11590
11597
|
src: source
|
|
11591
11598
|
});
|
|
11592
11599
|
}
|
|
11593
11600
|
|
|
11594
|
-
return _react["default"].createElement("source", _extends({
|
|
11601
|
+
return /*#__PURE__*/_react["default"].createElement("source", _extends({
|
|
11595
11602
|
key: index
|
|
11596
11603
|
}, source));
|
|
11597
11604
|
});
|
|
11598
11605
|
|
|
11599
11606
|
_defineProperty(_assertThisInitialized(_this), "renderTrack", function (track, index) {
|
|
11600
|
-
return _react["default"].createElement("track", _extends({
|
|
11607
|
+
return /*#__PURE__*/_react["default"].createElement("track", _extends({
|
|
11601
11608
|
key: index
|
|
11602
11609
|
}, track));
|
|
11603
11610
|
});
|
|
@@ -11635,6 +11642,10 @@ function (_Component) {
|
|
|
11635
11642
|
key: "componentWillUnmount",
|
|
11636
11643
|
value: function componentWillUnmount() {
|
|
11637
11644
|
this.removeListeners(this.player);
|
|
11645
|
+
|
|
11646
|
+
if (this.hls) {
|
|
11647
|
+
this.hls.destroy();
|
|
11648
|
+
}
|
|
11638
11649
|
}
|
|
11639
11650
|
}, {
|
|
11640
11651
|
key: "addListeners",
|
|
@@ -11765,10 +11776,6 @@ function (_Component) {
|
|
|
11765
11776
|
value: function stop() {
|
|
11766
11777
|
this.player.removeAttribute('src');
|
|
11767
11778
|
|
|
11768
|
-
if (this.hls) {
|
|
11769
|
-
this.hls.destroy();
|
|
11770
|
-
}
|
|
11771
|
-
|
|
11772
11779
|
if (this.dash) {
|
|
11773
11780
|
this.dash.reset();
|
|
11774
11781
|
}
|
|
@@ -11880,7 +11887,7 @@ function (_Component) {
|
|
|
11880
11887
|
width: width === 'auto' ? width : '100%',
|
|
11881
11888
|
height: height === 'auto' ? height : '100%'
|
|
11882
11889
|
};
|
|
11883
|
-
return _react["default"].createElement(Element, _extends({
|
|
11890
|
+
return /*#__PURE__*/_react["default"].createElement(Element, _extends({
|
|
11884
11891
|
ref: this.ref,
|
|
11885
11892
|
src: this.getSource(url),
|
|
11886
11893
|
style: style,
|
|
@@ -11970,12 +11977,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
11970
11977
|
|
|
11971
11978
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
11972
11979
|
|
|
11973
|
-
function
|
|
11980
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11974
11981
|
|
|
11975
|
-
function
|
|
11982
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
11976
11983
|
|
|
11977
11984
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11978
11985
|
|
|
11986
|
+
function _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; } }
|
|
11987
|
+
|
|
11988
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11989
|
+
|
|
11979
11990
|
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); }
|
|
11980
11991
|
|
|
11981
11992
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -11984,14 +11995,12 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
11984
11995
|
|
|
11985
11996
|
var ICON_SIZE = '64px';
|
|
11986
11997
|
|
|
11987
|
-
var Preview =
|
|
11988
|
-
/*#__PURE__*/
|
|
11989
|
-
function (_Component) {
|
|
11998
|
+
var Preview = /*#__PURE__*/function (_Component) {
|
|
11990
11999
|
_inherits(Preview, _Component);
|
|
11991
12000
|
|
|
11992
|
-
|
|
11993
|
-
var _getPrototypeOf2;
|
|
12001
|
+
var _super = _createSuper(Preview);
|
|
11994
12002
|
|
|
12003
|
+
function Preview() {
|
|
11995
12004
|
var _this;
|
|
11996
12005
|
|
|
11997
12006
|
_classCallCheck(this, Preview);
|
|
@@ -12000,7 +12009,7 @@ function (_Component) {
|
|
|
12000
12009
|
args[_key] = arguments[_key];
|
|
12001
12010
|
}
|
|
12002
12011
|
|
|
12003
|
-
_this =
|
|
12012
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
12004
12013
|
|
|
12005
12014
|
_defineProperty(_assertThisInitialized(_this), "mounted", false);
|
|
12006
12015
|
|
|
@@ -12098,15 +12107,15 @@ function (_Component) {
|
|
|
12098
12107
|
}
|
|
12099
12108
|
};
|
|
12100
12109
|
|
|
12101
|
-
var defaultPlayIcon = _react["default"].createElement("div", {
|
|
12110
|
+
var defaultPlayIcon = /*#__PURE__*/_react["default"].createElement("div", {
|
|
12102
12111
|
style: styles.shadow,
|
|
12103
12112
|
className: "react-player__shadow"
|
|
12104
|
-
}, _react["default"].createElement("div", {
|
|
12113
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
12105
12114
|
style: styles.playIcon,
|
|
12106
12115
|
className: "react-player__play-icon"
|
|
12107
12116
|
}));
|
|
12108
12117
|
|
|
12109
|
-
return _react["default"].createElement("div", {
|
|
12118
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
12110
12119
|
style: styles.preview,
|
|
12111
12120
|
className: "react-player__preview",
|
|
12112
12121
|
onClick: onClick
|
|
@@ -12143,6 +12152,12 @@ var _Player = _interopRequireDefault(Player_1);
|
|
|
12143
12152
|
|
|
12144
12153
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12145
12154
|
|
|
12155
|
+
function _createForOfIteratorHelper(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var it, normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
12156
|
+
|
|
12157
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
12158
|
+
|
|
12159
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
12160
|
+
|
|
12146
12161
|
var PRELOAD_PLAYERS = [{
|
|
12147
12162
|
Player: YouTube_1.YouTube,
|
|
12148
12163
|
configKey: 'youtube',
|
|
@@ -12163,16 +12178,16 @@ var PRELOAD_PLAYERS = [{
|
|
|
12163
12178
|
|
|
12164
12179
|
function renderPreloadPlayers(url, controls, config) {
|
|
12165
12180
|
var players = [];
|
|
12166
|
-
|
|
12167
|
-
var
|
|
12168
|
-
|
|
12181
|
+
|
|
12182
|
+
var _iterator = _createForOfIteratorHelper(PRELOAD_PLAYERS),
|
|
12183
|
+
_step;
|
|
12169
12184
|
|
|
12170
12185
|
try {
|
|
12171
|
-
for (
|
|
12186
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
12172
12187
|
var player = _step.value;
|
|
12173
12188
|
|
|
12174
12189
|
if (!player.Player.canPlay(url) && config[player.configKey].preload) {
|
|
12175
|
-
players.push(_react["default"].createElement(_Player["default"], {
|
|
12190
|
+
players.push( /*#__PURE__*/_react["default"].createElement(_Player["default"], {
|
|
12176
12191
|
key: player.Player.displayName,
|
|
12177
12192
|
activePlayer: player.Player,
|
|
12178
12193
|
url: player.url,
|
|
@@ -12184,18 +12199,9 @@ function renderPreloadPlayers(url, controls, config) {
|
|
|
12184
12199
|
}
|
|
12185
12200
|
}
|
|
12186
12201
|
} catch (err) {
|
|
12187
|
-
|
|
12188
|
-
_iteratorError = err;
|
|
12202
|
+
_iterator.e(err);
|
|
12189
12203
|
} finally {
|
|
12190
|
-
|
|
12191
|
-
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
12192
|
-
_iterator["return"]();
|
|
12193
|
-
}
|
|
12194
|
-
} finally {
|
|
12195
|
-
if (_didIteratorError) {
|
|
12196
|
-
throw _iteratorError;
|
|
12197
|
-
}
|
|
12198
|
-
}
|
|
12204
|
+
_iterator.f();
|
|
12199
12205
|
}
|
|
12200
12206
|
|
|
12201
12207
|
return players;
|
|
@@ -12319,13 +12325,17 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
12319
12325
|
|
|
12320
12326
|
function _extends() { _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; }; return _extends.apply(this, arguments); }
|
|
12321
12327
|
|
|
12322
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
|
|
12328
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
12329
|
+
|
|
12330
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
12331
|
+
|
|
12332
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
12323
12333
|
|
|
12324
|
-
function
|
|
12334
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
|
|
12325
12335
|
|
|
12326
|
-
function
|
|
12336
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
12327
12337
|
|
|
12328
|
-
function
|
|
12338
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
12329
12339
|
|
|
12330
12340
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
12331
12341
|
|
|
@@ -12333,12 +12343,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
12333
12343
|
|
|
12334
12344
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
12335
12345
|
|
|
12336
|
-
function
|
|
12346
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
12337
12347
|
|
|
12338
|
-
function
|
|
12348
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
12339
12349
|
|
|
12340
12350
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12341
12351
|
|
|
12352
|
+
function _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; } }
|
|
12353
|
+
|
|
12354
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
12355
|
+
|
|
12342
12356
|
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); }
|
|
12343
12357
|
|
|
12344
12358
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -12348,14 +12362,12 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
12348
12362
|
var SUPPORTED_PROPS = Object.keys(props.propTypes);
|
|
12349
12363
|
var customPlayers = [];
|
|
12350
12364
|
|
|
12351
|
-
var ReactPlayer =
|
|
12352
|
-
/*#__PURE__*/
|
|
12353
|
-
function (_Component) {
|
|
12365
|
+
var ReactPlayer = /*#__PURE__*/function (_Component) {
|
|
12354
12366
|
_inherits(ReactPlayer, _Component);
|
|
12355
12367
|
|
|
12356
|
-
|
|
12357
|
-
var _getPrototypeOf2;
|
|
12368
|
+
var _super = _createSuper(ReactPlayer);
|
|
12358
12369
|
|
|
12370
|
+
function ReactPlayer() {
|
|
12359
12371
|
var _this;
|
|
12360
12372
|
|
|
12361
12373
|
_classCallCheck(this, ReactPlayer);
|
|
@@ -12364,7 +12376,7 @@ function (_Component) {
|
|
|
12364
12376
|
args[_key] = arguments[_key];
|
|
12365
12377
|
}
|
|
12366
12378
|
|
|
12367
|
-
_this =
|
|
12379
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
12368
12380
|
|
|
12369
12381
|
_defineProperty(_assertThisInitialized(_this), "config", (0, utils.getConfig)(_this.props, props.defaultProps, true));
|
|
12370
12382
|
|
|
@@ -12475,7 +12487,7 @@ function (_Component) {
|
|
|
12475
12487
|
key: "renderActivePlayer",
|
|
12476
12488
|
value: function renderActivePlayer(url, activePlayer) {
|
|
12477
12489
|
if (!url) return null;
|
|
12478
|
-
return _react["default"].createElement(_Player4["default"], _extends({}, this.props, {
|
|
12490
|
+
return /*#__PURE__*/_react["default"].createElement(_Player4["default"], _extends({}, this.props, {
|
|
12479
12491
|
key: activePlayer.displayName,
|
|
12480
12492
|
ref: this.activePlayerRef,
|
|
12481
12493
|
config: this.config,
|
|
@@ -12512,14 +12524,14 @@ function (_Component) {
|
|
|
12512
12524
|
var preloadPlayers = (0, _preload["default"])(url, controls, this.config);
|
|
12513
12525
|
var players = [renderedActivePlayer].concat(_toConsumableArray(preloadPlayers)).sort(this.sortPlayers);
|
|
12514
12526
|
|
|
12515
|
-
var preview = _react["default"].createElement(_Preview["default"], {
|
|
12527
|
+
var preview = /*#__PURE__*/_react["default"].createElement(_Preview["default"], {
|
|
12516
12528
|
url: url,
|
|
12517
12529
|
light: light,
|
|
12518
12530
|
playIcon: playIcon,
|
|
12519
12531
|
onClick: this.handleClickPreview
|
|
12520
12532
|
});
|
|
12521
12533
|
|
|
12522
|
-
return _react["default"].createElement(Wrapper, _extends({
|
|
12534
|
+
return /*#__PURE__*/_react["default"].createElement(Wrapper, _extends({
|
|
12523
12535
|
ref: this.wrapperRef,
|
|
12524
12536
|
style: _objectSpread({}, style, {
|
|
12525
12537
|
width: width,
|
|
@@ -13837,16 +13849,16 @@ var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
|
|
|
13837
13849
|
_ref$className = _ref.className,
|
|
13838
13850
|
className = _ref$className === undefined ? '' : _ref$className;
|
|
13839
13851
|
|
|
13840
|
-
/*
|
|
13841
|
-
Props accepted - parentTaxonomy(required, object), subTaxonomy(required, array), page(optional), exclude(optional), variant(optional), className(optional)
|
|
13842
|
-
example:
|
|
13843
|
-
<RelatedTopicDropdown
|
|
13844
|
-
page='/clinical'
|
|
13845
|
-
exclude="clinical"
|
|
13846
|
-
className='mb-3'
|
|
13847
|
-
parentTaxonomy={props.parentTaxonomy}
|
|
13848
|
-
subTaxonomies={props.subTaxonomies}
|
|
13849
|
-
/>
|
|
13852
|
+
/*
|
|
13853
|
+
Props accepted - parentTaxonomy(required, object), subTaxonomy(required, array), page(optional), exclude(optional), variant(optional), className(optional)
|
|
13854
|
+
example:
|
|
13855
|
+
<RelatedTopicDropdown
|
|
13856
|
+
page='/clinical'
|
|
13857
|
+
exclude="clinical"
|
|
13858
|
+
className='mb-3'
|
|
13859
|
+
parentTaxonomy={props.parentTaxonomy}
|
|
13860
|
+
subTaxonomies={props.subTaxonomies}
|
|
13861
|
+
/>
|
|
13850
13862
|
*/
|
|
13851
13863
|
if (subTaxonomies.length === 0 && parentTaxonomy) {
|
|
13852
13864
|
if (parentTaxonomy.identifier == exclude) {
|
|
@@ -13884,19 +13896,19 @@ var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
|
|
|
13884
13896
|
}
|
|
13885
13897
|
};
|
|
13886
13898
|
|
|
13887
|
-
/*
|
|
13888
|
-
This dropdown is used inside Article body to display related content placement pages
|
|
13889
|
-
sample usage: <ArticleDetailDropdown contentPlacement={content_placement} exclude={['News',]} />
|
|
13890
|
-
|
|
13891
|
-
in article query, need to add '...' to content_placement to retreive additional info needed
|
|
13892
|
-
|
|
13893
|
-
'content_placement': taxonomyMapping[]-> {
|
|
13894
|
-
...,
|
|
13895
|
-
'ancestor': parent->parent->identifier,
|
|
13896
|
-
'parent': parent->identifier,
|
|
13897
|
-
'path': identifier
|
|
13898
|
-
}
|
|
13899
|
-
|
|
13899
|
+
/*
|
|
13900
|
+
This dropdown is used inside Article body to display related content placement pages
|
|
13901
|
+
sample usage: <ArticleDetailDropdown contentPlacement={content_placement} exclude={['News',]} />
|
|
13902
|
+
|
|
13903
|
+
in article query, need to add '...' to content_placement to retreive additional info needed
|
|
13904
|
+
|
|
13905
|
+
'content_placement': taxonomyMapping[]-> {
|
|
13906
|
+
...,
|
|
13907
|
+
'ancestor': parent->parent->identifier,
|
|
13908
|
+
'parent': parent->identifier,
|
|
13909
|
+
'path': identifier
|
|
13910
|
+
}
|
|
13911
|
+
|
|
13900
13912
|
*/
|
|
13901
13913
|
|
|
13902
13914
|
var ArticleDetailDropdown = function ArticleDetailDropdown(props) {
|
|
@@ -14729,34 +14741,34 @@ var GridHero = function GridHero(props) {
|
|
|
14729
14741
|
);
|
|
14730
14742
|
};
|
|
14731
14743
|
|
|
14732
|
-
/*
|
|
14733
|
-
Sample query
|
|
14734
|
-
let references = ''
|
|
14735
|
-
if(article.taxonomyMapping.length > 0){
|
|
14736
|
-
article.taxonomyMapping.forEach((ref, index) => {
|
|
14737
|
-
references = references + `references('${ref._ref}') `
|
|
14738
|
-
if(index+1 !== article.taxonomyMapping.length){
|
|
14739
|
-
references = references + ` && `
|
|
14740
|
-
}
|
|
14741
|
-
})
|
|
14742
|
-
}
|
|
14743
|
-
|
|
14744
|
-
const relatedArticlesQuery = `*[!(_id in path("drafts.**")) && _type == "article" && title !='${article.title}' && defined(title) && is_visible == true && ( references('article.documentGroup._id') || ${references} ) && published <= '${today}'] | order(published desc) [0...4] {
|
|
14745
|
-
...,
|
|
14746
|
-
title,
|
|
14747
|
-
summary,
|
|
14748
|
-
thumbnail,
|
|
14749
|
-
url,
|
|
14750
|
-
published,
|
|
14751
|
-
authorMapping[]->,
|
|
14752
|
-
contentCategory->
|
|
14753
|
-
}`
|
|
14754
|
-
const relatedArticles = await client.fetch(relatedArticlesQuery)
|
|
14755
|
-
|
|
14756
|
-
Sample usage
|
|
14757
|
-
<RelatedContent dataRecord={props.relatedArticles} client={client} showAuthor showPublished reverse/>
|
|
14758
|
-
|
|
14759
|
-
|
|
14744
|
+
/*
|
|
14745
|
+
Sample query
|
|
14746
|
+
let references = ''
|
|
14747
|
+
if(article.taxonomyMapping.length > 0){
|
|
14748
|
+
article.taxonomyMapping.forEach((ref, index) => {
|
|
14749
|
+
references = references + `references('${ref._ref}') `
|
|
14750
|
+
if(index+1 !== article.taxonomyMapping.length){
|
|
14751
|
+
references = references + ` && `
|
|
14752
|
+
}
|
|
14753
|
+
})
|
|
14754
|
+
}
|
|
14755
|
+
|
|
14756
|
+
const relatedArticlesQuery = `*[!(_id in path("drafts.**")) && _type == "article" && title !='${article.title}' && defined(title) && is_visible == true && ( references('article.documentGroup._id') || ${references} ) && published <= '${today}'] | order(published desc) [0...4] {
|
|
14757
|
+
...,
|
|
14758
|
+
title,
|
|
14759
|
+
summary,
|
|
14760
|
+
thumbnail,
|
|
14761
|
+
url,
|
|
14762
|
+
published,
|
|
14763
|
+
authorMapping[]->,
|
|
14764
|
+
contentCategory->
|
|
14765
|
+
}`
|
|
14766
|
+
const relatedArticles = await client.fetch(relatedArticlesQuery)
|
|
14767
|
+
|
|
14768
|
+
Sample usage
|
|
14769
|
+
<RelatedContent dataRecord={props.relatedArticles} client={client} showAuthor showPublished reverse/>
|
|
14770
|
+
|
|
14771
|
+
|
|
14760
14772
|
*/
|
|
14761
14773
|
var RelatedContent = function RelatedContent(props) {
|
|
14762
14774
|
var client = props.client,
|
|
@@ -14823,21 +14835,21 @@ var RelatedContent = function RelatedContent(props) {
|
|
|
14823
14835
|
);
|
|
14824
14836
|
};
|
|
14825
14837
|
|
|
14826
|
-
/*
|
|
14827
|
-
Example usage - targetedonc.com/latest-conference
|
|
14828
|
-
const query = `*[!(_id in path("drafts.**")) && _type == "article" && defined(title) && is_visible == true && published <= '${today}' && references('b49d36b8-aa56-4183-a2bc-1568c229fb72') ] | order(published desc) [$from...$to] {
|
|
14829
|
-
...,
|
|
14830
|
-
title,
|
|
14831
|
-
summary,
|
|
14832
|
-
thumbnail,
|
|
14833
|
-
url,
|
|
14834
|
-
published,
|
|
14835
|
-
documentGroup->,
|
|
14836
|
-
contentCategory->,
|
|
14837
|
-
'pageNumber': ${currentPage}
|
|
14838
|
-
}`
|
|
14839
|
-
|
|
14840
|
-
const posts = await client.fetch(query, params)
|
|
14838
|
+
/*
|
|
14839
|
+
Example usage - targetedonc.com/latest-conference
|
|
14840
|
+
const query = `*[!(_id in path("drafts.**")) && _type == "article" && defined(title) && is_visible == true && published <= '${today}' && references('b49d36b8-aa56-4183-a2bc-1568c229fb72') ] | order(published desc) [$from...$to] {
|
|
14841
|
+
...,
|
|
14842
|
+
title,
|
|
14843
|
+
summary,
|
|
14844
|
+
thumbnail,
|
|
14845
|
+
url,
|
|
14846
|
+
published,
|
|
14847
|
+
documentGroup->,
|
|
14848
|
+
contentCategory->,
|
|
14849
|
+
'pageNumber': ${currentPage}
|
|
14850
|
+
}`
|
|
14851
|
+
|
|
14852
|
+
const posts = await client.fetch(query, params)
|
|
14841
14853
|
*/
|
|
14842
14854
|
|
|
14843
14855
|
var ConferenceArticleCard = function ConferenceArticleCard(props) {
|
|
@@ -15464,27 +15476,27 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
15464
15476
|
};
|
|
15465
15477
|
|
|
15466
15478
|
var KMTracker = function KMTracker(props) {
|
|
15467
|
-
|
|
15479
|
+
var id = props.id;
|
|
15468
15480
|
|
|
15469
|
-
|
|
15481
|
+
if (document) {
|
|
15470
15482
|
(function () {
|
|
15471
|
-
|
|
15483
|
+
var ecnJquery = document.createElement('script');
|
|
15472
15484
|
|
|
15473
|
-
|
|
15474
|
-
|
|
15475
|
-
|
|
15485
|
+
ecnJquery.type = 'text/javascript';
|
|
15486
|
+
ecnJquery.async = true;
|
|
15487
|
+
ecnJquery.src = 'https://apidt.ecn5.com/ECN_jQuery.min.js';
|
|
15476
15488
|
|
|
15477
|
-
|
|
15489
|
+
var ecnScript = document.createElement('script');
|
|
15478
15490
|
|
|
15479
|
-
|
|
15480
|
-
|
|
15481
|
-
|
|
15482
|
-
|
|
15491
|
+
ecnScript.type = 'text/javascript';
|
|
15492
|
+
ecnScript.async = true;
|
|
15493
|
+
ecnScript.id = 'km-tracker';
|
|
15494
|
+
ecnScript.src = 'https://apidt.ecn5.com/ECN_tracker_Secure.js?TrackerKey=' + id;
|
|
15483
15495
|
|
|
15484
|
-
|
|
15485
|
-
|
|
15486
|
-
|
|
15487
|
-
|
|
15496
|
+
document.head.appendChild(ecnJquery);
|
|
15497
|
+
document.head.appendChild(ecnScript);
|
|
15498
|
+
})();
|
|
15499
|
+
}
|
|
15488
15500
|
};
|
|
15489
15501
|
|
|
15490
15502
|
exports.AdSlot = AdSlot.DFPAdSlot;
|