@mjhls/mjh-framework 1.0.694-beta.3 → 1.0.695
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 +1 -1
- package/dist/cjs/AD.js +1 -1
- package/dist/cjs/AD300x250.js +3 -3
- package/dist/cjs/AD300x250x600.js +3 -3
- package/dist/cjs/AD728x90.js +4 -4
- package/dist/cjs/ADFloatingFooter.js +2 -2
- package/dist/cjs/ADGutter.js +2 -2
- package/dist/cjs/ADSkyscraper.js +2 -2
- package/dist/cjs/ADSponsoredResources.js +2 -2
- package/dist/cjs/ADWebcast.js +2 -2
- package/dist/cjs/ADWelcome.js +2 -2
- package/dist/cjs/AdSlot.js +2 -2
- package/dist/cjs/AdSlotsProvider.js +1 -1
- package/dist/cjs/ArticleCarousel.js +1 -1
- package/dist/cjs/ArticleSeriesListing.js +5 -5
- package/dist/cjs/Auth.js +301 -250
- package/dist/cjs/{BlockContent-091a991f.js → BlockContent-88f69acd.js} +1 -1
- package/dist/cjs/BrowseVideosListing.js +1 -1
- package/dist/cjs/CMEDeck.js +5 -5
- package/dist/cjs/Column3.js +4 -4
- package/dist/cjs/ConferenceArticleCard.js +2 -2
- package/dist/cjs/DeckContent.js +7 -7
- package/dist/cjs/DeckQueue.js +6 -6
- package/dist/cjs/{Dfp-f6a18ed2.js → Dfp-b2bc3b97.js} +1 -1
- package/dist/cjs/EventsDeck.js +4 -4
- package/dist/cjs/ExternalResources.js +7 -7
- package/dist/cjs/Feature.js +3 -3
- package/dist/cjs/ForbesHero.js +2 -2
- package/dist/cjs/GridContent.js +10 -10
- package/dist/cjs/GridHero.js +2 -2
- package/dist/cjs/GroupDeck.js +1 -1
- package/dist/cjs/HamMagazine.js +4 -4
- package/dist/cjs/Hero.js +1 -1
- package/dist/cjs/HorizontalHero.js +2 -2
- package/dist/cjs/IssueContentDeck.js +2 -2
- package/dist/cjs/IssueDeck.js +2 -2
- package/dist/cjs/IssueLanding.js +7 -7
- package/dist/cjs/LeftNav.js +2 -2
- package/dist/cjs/MasterDeck.js +7 -7
- package/dist/cjs/NavMagazine.js +4 -4
- package/dist/cjs/NavNative.js +3 -3
- package/dist/cjs/OncliveHero.js +2 -2
- package/dist/cjs/OncliveLargeHero.js +2 -2
- package/dist/cjs/PartnerDetailListing.js +16 -16
- package/dist/cjs/PublicationDeck.js +1 -1
- package/dist/cjs/QueueDeckExpanded.js +9 -9
- package/dist/cjs/RecentNews.js +2 -2
- package/dist/cjs/RelatedContent.js +2 -2
- package/dist/cjs/{SocialSearchComponent-9cd24578.js → SocialSearchComponent-6b5e5b47.js} +5 -5
- package/dist/cjs/TaxonomyCard.js +2 -2
- package/dist/cjs/TemplateNormal.js +3 -3
- package/dist/cjs/ThumbnailCard.js +1 -1
- package/dist/cjs/Ustream.js +2 -2
- package/dist/cjs/VerticalHero.js +2 -2
- package/dist/cjs/VideoSeriesCard.js +2 -2
- package/dist/cjs/VideoSeriesListing.js +5 -5
- package/dist/cjs/View.js +214 -175
- package/dist/cjs/YahooHero.js +2 -2
- package/dist/cjs/YoutubeGroup.js +1 -1
- package/dist/cjs/getQuery.js +2 -2
- package/dist/cjs/getRelatedArticle.js +156 -137
- package/dist/cjs/getSerializers.js +6 -6
- package/dist/cjs/{getTargeting-9af0ef69.js → getTargeting-fee8c429.js} +2 -2
- package/dist/cjs/getTargeting.js +1 -1
- package/dist/cjs/{index-fa8ed292.js → index-2d0a4911.js} +34 -27
- package/dist/cjs/{index-3294d3bc.js → index-5be2866f.js} +1 -1
- package/dist/cjs/{index-be0c82be.js → index-b5eb3ff8.js} +20 -19
- package/dist/cjs/{index-a5919bab.js → index-c0bfab13.js} +512 -475
- package/dist/cjs/{index.es-9110add6.js → index.es-ab3f2690.js} +3 -1
- package/dist/cjs/index.js +12 -12
- package/dist/cjs/{main-a4cb15bb.js → main-b6c96c8d.js} +67 -36
- package/dist/cjs/{moment-575fe24c.js → moment-66a6a284.js} +1 -1
- package/dist/cjs/timeDifferenceCalc.js +1 -1
- package/dist/cjs/urlFor.js +1 -1
- package/dist/esm/AD.js +1 -1
- package/dist/esm/AD300x250.js +3 -3
- package/dist/esm/AD300x250x600.js +3 -3
- package/dist/esm/AD728x90.js +4 -4
- package/dist/esm/ADFloatingFooter.js +2 -2
- package/dist/esm/ADGutter.js +2 -2
- package/dist/esm/ADSkyscraper.js +2 -2
- package/dist/esm/ADSponsoredResources.js +2 -2
- package/dist/esm/ADWebcast.js +2 -2
- package/dist/esm/ADWelcome.js +2 -2
- package/dist/esm/AdSlot.js +2 -2
- package/dist/esm/AdSlotsProvider.js +1 -1
- package/dist/esm/ArticleCarousel.js +1 -1
- package/dist/esm/ArticleSeriesListing.js +5 -5
- package/dist/esm/Auth.js +298 -247
- package/dist/esm/{BlockContent-e9b4ddcf.js → BlockContent-a614acdf.js} +1 -1
- package/dist/esm/BrowseVideosListing.js +1 -1
- package/dist/esm/CMEDeck.js +5 -5
- package/dist/esm/Column3.js +4 -4
- package/dist/esm/ConferenceArticleCard.js +2 -2
- package/dist/esm/DeckContent.js +7 -7
- package/dist/esm/DeckQueue.js +6 -6
- package/dist/esm/{Dfp-96b49def.js → Dfp-8a8fca18.js} +1 -1
- package/dist/esm/EventsDeck.js +4 -4
- package/dist/esm/ExternalResources.js +7 -7
- package/dist/esm/Feature.js +3 -3
- package/dist/esm/ForbesHero.js +2 -2
- package/dist/esm/GridContent.js +10 -10
- package/dist/esm/GridHero.js +2 -2
- package/dist/esm/GroupDeck.js +1 -1
- package/dist/esm/HamMagazine.js +4 -4
- package/dist/esm/Hero.js +1 -1
- package/dist/esm/HorizontalHero.js +2 -2
- package/dist/esm/IssueContentDeck.js +2 -2
- package/dist/esm/IssueDeck.js +2 -2
- package/dist/esm/IssueLanding.js +7 -7
- package/dist/esm/LeftNav.js +2 -2
- package/dist/esm/MasterDeck.js +7 -7
- package/dist/esm/NavMagazine.js +4 -4
- package/dist/esm/NavNative.js +3 -3
- package/dist/esm/OncliveHero.js +2 -2
- package/dist/esm/OncliveLargeHero.js +2 -2
- package/dist/esm/PartnerDetailListing.js +14 -14
- package/dist/esm/PublicationDeck.js +1 -1
- package/dist/esm/QueueDeckExpanded.js +9 -9
- package/dist/esm/RecentNews.js +2 -2
- package/dist/esm/RelatedContent.js +2 -2
- package/dist/esm/{SocialSearchComponent-93233334.js → SocialSearchComponent-7f14e0f3.js} +5 -5
- package/dist/esm/TaxonomyCard.js +2 -2
- package/dist/esm/TemplateNormal.js +3 -3
- package/dist/esm/ThumbnailCard.js +1 -1
- package/dist/esm/Ustream.js +2 -2
- package/dist/esm/VerticalHero.js +2 -2
- package/dist/esm/VideoSeriesCard.js +2 -2
- package/dist/esm/VideoSeriesListing.js +5 -5
- package/dist/esm/View.js +189 -150
- package/dist/esm/YahooHero.js +2 -2
- package/dist/esm/YoutubeGroup.js +1 -1
- package/dist/esm/getQuery.js +2 -2
- package/dist/esm/getRelatedArticle.js +156 -137
- package/dist/esm/getSerializers.js +6 -6
- package/dist/esm/{index-73819142.js → index-51a80699.js} +20 -19
- package/dist/esm/{index-c376cd8e.js → index-754010eb.js} +512 -475
- package/dist/esm/{index-0e45a0b2.js → index-93ec3c59.js} +34 -27
- package/dist/esm/{index-ef6d5dcf.js → index-d2f90501.js} +1 -1
- package/dist/esm/{index.es-29c1cef5.js → index.es-938a3a58.js} +3 -1
- package/dist/esm/index.js +11 -11
- package/dist/esm/{main-5d1e4bd3.js → main-0465b2a0.js} +65 -34
- package/dist/esm/{moment-e2f9b20c.js → moment-12415288.js} +1 -1
- package/dist/esm/timeDifferenceCalc.js +1 -1
- package/dist/esm/urlFor.js +1 -1
- package/package.json +1 -1
- /package/dist/cjs/{ADInfeed-2fe7211c.js → ADInfeed-3410ab3c.js} +0 -0
- /package/dist/cjs/{ADlgInfeed-14e17b43.js → ADlgInfeed-845aac15.js} +0 -0
- /package/dist/esm/{ADInfeed-eae71d07.js → ADInfeed-205cb7a9.js} +0 -0
- /package/dist/esm/{ADlgInfeed-c619fe64.js → ADlgInfeed-e538f17a.js} +0 -0
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { c as createCommonjsModule, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
|
|
2
2
|
import { a as _Array$from, _ as _toConsumableArray } from './toConsumableArray-725434a0.js';
|
|
3
|
-
import { _ as _extends
|
|
3
|
+
import { _ as _extends } from './extends-cc5da797.js';
|
|
4
4
|
import { _ as _inherits$1, a as _classCallCheck$1, b as _possibleConstructorReturn$1, c as _Object$getPrototypeOf, d as _createClass$1 } from './inherits-7ee3e0c1.js';
|
|
5
|
-
import { _ as _typeof } from './typeof-08f2c380.js';
|
|
5
|
+
import { _ as _typeof$1 } from './typeof-08f2c380.js';
|
|
6
6
|
import React__default, { useState, useEffect, useRef, useLayoutEffect, useCallback } from 'react';
|
|
7
|
-
import { l as lib_3 } from './index-
|
|
7
|
+
import { l as lib_3 } from './index-93ec3c59.js';
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
9
|
import Row from 'react-bootstrap/Row';
|
|
10
10
|
import Col from 'react-bootstrap/Col';
|
|
11
|
-
import { m as moment } from './moment-
|
|
11
|
+
import { m as moment } from './moment-12415288.js';
|
|
12
12
|
import Router, { useRouter } from 'next/router';
|
|
13
|
-
import { i as imageUrlBuilder } from './index-
|
|
13
|
+
import { i as imageUrlBuilder } from './index-51a80699.js';
|
|
14
14
|
import { L as LazyLoad } from './index-5f9f807a.js';
|
|
15
|
-
import { b as main_16, c as
|
|
15
|
+
import { b as main_16, c as main_38, m as main_39 } from './main-0465b2a0.js';
|
|
16
16
|
import { h as html_decode_1 } from './entities-7cc3bf45.js';
|
|
17
17
|
import { _ as _slicedToArray } from './slicedToArray-7021e5df.js';
|
|
18
18
|
import Segment from './Segment.js';
|
|
19
19
|
import Beam from './Beam.js';
|
|
20
20
|
import DFPAdSlot from './AdSlot.js';
|
|
21
|
-
import { B as BlockContent } from './BlockContent-
|
|
21
|
+
import { B as BlockContent } from './BlockContent-a614acdf.js';
|
|
22
22
|
import { g as getYoutubeId } from './smoothscroll-4b699764.js';
|
|
23
23
|
import GroupDeck from './GroupDeck.js';
|
|
24
24
|
import { Carousel, Table, Figure as Figure$1, Button, ProgressBar, Card, Row as Row$1, Col as Col$1 } from 'react-bootstrap';
|
|
@@ -92,21 +92,18 @@ var Slideshow = function Slideshow(_ref) {
|
|
|
92
92
|
);
|
|
93
93
|
};
|
|
94
94
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
// do not edit .js files directly - edit src/index.jst
|
|
96
|
+
|
|
97
|
+
|
|
98
98
|
|
|
99
99
|
var fastDeepEqual = function equal(a, b) {
|
|
100
100
|
if (a === b) return true;
|
|
101
101
|
|
|
102
102
|
if (a && b && typeof a == 'object' && typeof b == 'object') {
|
|
103
|
-
|
|
104
|
-
, arrB = isArray(b)
|
|
105
|
-
, i
|
|
106
|
-
, length
|
|
107
|
-
, key;
|
|
103
|
+
if (a.constructor !== b.constructor) return false;
|
|
108
104
|
|
|
109
|
-
|
|
105
|
+
var length, i, keys;
|
|
106
|
+
if (Array.isArray(a)) {
|
|
110
107
|
length = a.length;
|
|
111
108
|
if (length != b.length) return false;
|
|
112
109
|
for (i = length; i-- !== 0;)
|
|
@@ -114,35 +111,29 @@ var fastDeepEqual = function equal(a, b) {
|
|
|
114
111
|
return true;
|
|
115
112
|
}
|
|
116
113
|
|
|
117
|
-
if (arrA != arrB) return false;
|
|
118
114
|
|
|
119
|
-
var dateA = a instanceof Date
|
|
120
|
-
, dateB = b instanceof Date;
|
|
121
|
-
if (dateA != dateB) return false;
|
|
122
|
-
if (dateA && dateB) return a.getTime() == b.getTime();
|
|
123
115
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
if (
|
|
127
|
-
if (regexpA && regexpB) return a.toString() == b.toString();
|
|
116
|
+
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
117
|
+
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
|
118
|
+
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
|
128
119
|
|
|
129
|
-
|
|
120
|
+
keys = Object.keys(a);
|
|
130
121
|
length = keys.length;
|
|
131
|
-
|
|
132
|
-
if (length !== keyList(b).length)
|
|
133
|
-
return false;
|
|
122
|
+
if (length !== Object.keys(b).length) return false;
|
|
134
123
|
|
|
135
124
|
for (i = length; i-- !== 0;)
|
|
136
|
-
if (!
|
|
125
|
+
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
137
126
|
|
|
138
127
|
for (i = length; i-- !== 0;) {
|
|
139
|
-
key = keys[i];
|
|
128
|
+
var key = keys[i];
|
|
129
|
+
|
|
140
130
|
if (!equal(a[key], b[key])) return false;
|
|
141
131
|
}
|
|
142
132
|
|
|
143
133
|
return true;
|
|
144
134
|
}
|
|
145
135
|
|
|
136
|
+
// true if both NaN, false otherwise
|
|
146
137
|
return a!==a && b!==b;
|
|
147
138
|
};
|
|
148
139
|
|
|
@@ -1565,199 +1556,235 @@ module.exports = exports['default'];
|
|
|
1565
1556
|
|
|
1566
1557
|
var youTubePlayer = unwrapExports(dist);
|
|
1567
1558
|
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
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; };
|
|
1559
|
+
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); }
|
|
1571
1560
|
|
|
1572
1561
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1573
1562
|
|
|
1574
|
-
function
|
|
1563
|
+
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); } }
|
|
1564
|
+
|
|
1565
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
1566
|
+
|
|
1567
|
+
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); }; }
|
|
1568
|
+
|
|
1569
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
1570
|
+
|
|
1571
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
1572
|
+
|
|
1573
|
+
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; } }
|
|
1574
|
+
|
|
1575
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
1575
1576
|
|
|
1576
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function
|
|
1577
|
+
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); }
|
|
1578
|
+
|
|
1579
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
1577
1580
|
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1581
|
+
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; }
|
|
1582
|
+
|
|
1583
|
+
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; }
|
|
1584
|
+
|
|
1585
|
+
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; }
|
|
1586
|
+
/**
|
|
1587
|
+
* Check whether a `props` change should result in the video being updated.
|
|
1588
|
+
*
|
|
1589
|
+
* @param {Object} prevProps
|
|
1590
|
+
* @param {Object} props
|
|
1583
1591
|
*/
|
|
1592
|
+
|
|
1584
1593
|
function shouldUpdateVideo(prevProps, props) {
|
|
1585
1594
|
// A changing video should always trigger an update
|
|
1586
1595
|
if (prevProps.videoId !== props.videoId) {
|
|
1587
1596
|
return true;
|
|
1588
|
-
}
|
|
1589
|
-
|
|
1590
|
-
// Otherwise, a change in the start/end time playerVars also requires a player
|
|
1597
|
+
} // Otherwise, a change in the start/end time playerVars also requires a player
|
|
1591
1598
|
// update.
|
|
1599
|
+
|
|
1600
|
+
|
|
1592
1601
|
var prevVars = prevProps.opts.playerVars || {};
|
|
1593
1602
|
var vars = props.opts.playerVars || {};
|
|
1594
|
-
|
|
1595
1603
|
return prevVars.start !== vars.start || prevVars.end !== vars.end;
|
|
1596
1604
|
}
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
*
|
|
1600
|
-
*
|
|
1601
|
-
*
|
|
1602
|
-
*
|
|
1603
|
-
* @param {Object} opts
|
|
1605
|
+
/**
|
|
1606
|
+
* Neutralize API options that only require a video update, leaving only options
|
|
1607
|
+
* that require a player reset. The results can then be compared to see if a
|
|
1608
|
+
* player reset is necessary.
|
|
1609
|
+
*
|
|
1610
|
+
* @param {Object} opts
|
|
1604
1611
|
*/
|
|
1612
|
+
|
|
1613
|
+
|
|
1605
1614
|
function filterResetOptions(opts) {
|
|
1606
|
-
return
|
|
1607
|
-
playerVars:
|
|
1615
|
+
return _objectSpread({}, opts, {
|
|
1616
|
+
playerVars: _objectSpread({}, opts.playerVars, {
|
|
1608
1617
|
autoplay: 0,
|
|
1609
1618
|
start: 0,
|
|
1610
1619
|
end: 0
|
|
1611
1620
|
})
|
|
1612
1621
|
});
|
|
1613
1622
|
}
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
*
|
|
1617
|
-
*
|
|
1618
|
-
*
|
|
1619
|
-
*
|
|
1620
|
-
*
|
|
1621
|
-
* @param {Object}
|
|
1622
|
-
* @param {Object} props
|
|
1623
|
+
/**
|
|
1624
|
+
* Check whether a `props` change should result in the player being reset.
|
|
1625
|
+
* The player is reset when the `props.opts` change, except if the only change
|
|
1626
|
+
* is in the `start` and `end` playerVars, because a video update can deal with
|
|
1627
|
+
* those.
|
|
1628
|
+
*
|
|
1629
|
+
* @param {Object} prevProps
|
|
1630
|
+
* @param {Object} props
|
|
1623
1631
|
*/
|
|
1632
|
+
|
|
1633
|
+
|
|
1624
1634
|
function shouldResetPlayer(prevProps, props) {
|
|
1625
1635
|
return !fastDeepEqual(filterResetOptions(prevProps.opts), filterResetOptions(props.opts));
|
|
1626
1636
|
}
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
*
|
|
1630
|
-
*
|
|
1631
|
-
* @param {Object}
|
|
1632
|
-
* @param {Object} props
|
|
1637
|
+
/**
|
|
1638
|
+
* Check whether a props change should result in an id or className update.
|
|
1639
|
+
*
|
|
1640
|
+
* @param {Object} prevProps
|
|
1641
|
+
* @param {Object} props
|
|
1633
1642
|
*/
|
|
1643
|
+
|
|
1644
|
+
|
|
1634
1645
|
function shouldUpdatePlayer(prevProps, props) {
|
|
1635
1646
|
return prevProps.id !== props.id || prevProps.className !== props.className;
|
|
1636
1647
|
}
|
|
1637
1648
|
|
|
1638
|
-
var YouTube = function (_React$Component) {
|
|
1649
|
+
var YouTube = /*#__PURE__*/function (_React$Component) {
|
|
1639
1650
|
_inherits(YouTube, _React$Component);
|
|
1640
1651
|
|
|
1652
|
+
var _super = _createSuper(YouTube);
|
|
1653
|
+
|
|
1654
|
+
/**
|
|
1655
|
+
* Expose PlayerState constants for convenience. These constants can also be
|
|
1656
|
+
* accessed through the global YT object after the YouTube IFrame API is instantiated.
|
|
1657
|
+
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
1658
|
+
*/
|
|
1641
1659
|
function YouTube(props) {
|
|
1660
|
+
var _this;
|
|
1661
|
+
|
|
1642
1662
|
_classCallCheck(this, YouTube);
|
|
1643
1663
|
|
|
1644
|
-
|
|
1664
|
+
_this = _super.call(this, props);
|
|
1645
1665
|
|
|
1646
|
-
_this
|
|
1666
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerReady", function (event) {
|
|
1647
1667
|
return _this.props.onReady(event);
|
|
1648
|
-
};
|
|
1668
|
+
});
|
|
1649
1669
|
|
|
1650
|
-
_this
|
|
1670
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerError", function (event) {
|
|
1651
1671
|
return _this.props.onError(event);
|
|
1652
|
-
};
|
|
1672
|
+
});
|
|
1653
1673
|
|
|
1654
|
-
_this
|
|
1674
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerStateChange", function (event) {
|
|
1655
1675
|
_this.props.onStateChange(event);
|
|
1656
|
-
switch (event.data) {
|
|
1657
1676
|
|
|
1677
|
+
switch (event.data) {
|
|
1658
1678
|
case YouTube.PlayerState.ENDED:
|
|
1659
1679
|
_this.props.onEnd(event);
|
|
1680
|
+
|
|
1660
1681
|
break;
|
|
1661
1682
|
|
|
1662
1683
|
case YouTube.PlayerState.PLAYING:
|
|
1663
1684
|
_this.props.onPlay(event);
|
|
1685
|
+
|
|
1664
1686
|
break;
|
|
1665
1687
|
|
|
1666
1688
|
case YouTube.PlayerState.PAUSED:
|
|
1667
1689
|
_this.props.onPause(event);
|
|
1690
|
+
|
|
1668
1691
|
break;
|
|
1669
1692
|
}
|
|
1670
|
-
};
|
|
1693
|
+
});
|
|
1671
1694
|
|
|
1672
|
-
_this
|
|
1695
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerPlaybackRateChange", function (event) {
|
|
1673
1696
|
return _this.props.onPlaybackRateChange(event);
|
|
1674
|
-
};
|
|
1697
|
+
});
|
|
1675
1698
|
|
|
1676
|
-
_this
|
|
1699
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerPlaybackQualityChange", function (event) {
|
|
1677
1700
|
return _this.props.onPlaybackQualityChange(event);
|
|
1678
|
-
};
|
|
1701
|
+
});
|
|
1679
1702
|
|
|
1680
|
-
_this
|
|
1703
|
+
_defineProperty(_assertThisInitialized(_this), "createPlayer", function () {
|
|
1681
1704
|
// do not attempt to create a player server-side, it won't work
|
|
1682
|
-
if (typeof document === 'undefined') return;
|
|
1683
|
-
|
|
1684
|
-
var playerOpts =
|
|
1705
|
+
if (typeof document === 'undefined') return; // create player
|
|
1706
|
+
|
|
1707
|
+
var playerOpts = _objectSpread({}, _this.props.opts, {
|
|
1685
1708
|
// preload the `videoId` video if one is already given
|
|
1686
1709
|
videoId: _this.props.videoId
|
|
1687
1710
|
});
|
|
1688
|
-
|
|
1689
|
-
// attach event handlers
|
|
1711
|
+
|
|
1712
|
+
_this.internalPlayer = youTubePlayer(_this.container, playerOpts); // attach event handlers
|
|
1713
|
+
|
|
1690
1714
|
_this.internalPlayer.on('ready', _this.onPlayerReady);
|
|
1715
|
+
|
|
1691
1716
|
_this.internalPlayer.on('error', _this.onPlayerError);
|
|
1717
|
+
|
|
1692
1718
|
_this.internalPlayer.on('stateChange', _this.onPlayerStateChange);
|
|
1719
|
+
|
|
1693
1720
|
_this.internalPlayer.on('playbackRateChange', _this.onPlayerPlaybackRateChange);
|
|
1721
|
+
|
|
1694
1722
|
_this.internalPlayer.on('playbackQualityChange', _this.onPlayerPlaybackQualityChange);
|
|
1695
|
-
};
|
|
1723
|
+
});
|
|
1696
1724
|
|
|
1697
|
-
_this
|
|
1725
|
+
_defineProperty(_assertThisInitialized(_this), "resetPlayer", function () {
|
|
1698
1726
|
return _this.internalPlayer.destroy().then(_this.createPlayer);
|
|
1699
|
-
};
|
|
1727
|
+
});
|
|
1700
1728
|
|
|
1701
|
-
_this
|
|
1729
|
+
_defineProperty(_assertThisInitialized(_this), "updatePlayer", function () {
|
|
1702
1730
|
_this.internalPlayer.getIframe().then(function (iframe) {
|
|
1703
1731
|
if (_this.props.id) iframe.setAttribute('id', _this.props.id);else iframe.removeAttribute('id');
|
|
1704
1732
|
if (_this.props.className) iframe.setAttribute('class', _this.props.className);else iframe.removeAttribute('class');
|
|
1705
1733
|
});
|
|
1706
|
-
};
|
|
1734
|
+
});
|
|
1707
1735
|
|
|
1708
|
-
_this
|
|
1736
|
+
_defineProperty(_assertThisInitialized(_this), "updateVideo", function () {
|
|
1709
1737
|
if (typeof _this.props.videoId === 'undefined' || _this.props.videoId === null) {
|
|
1710
1738
|
_this.internalPlayer.stopVideo();
|
|
1739
|
+
|
|
1711
1740
|
return;
|
|
1712
|
-
}
|
|
1741
|
+
} // set queueing options
|
|
1742
|
+
|
|
1713
1743
|
|
|
1714
|
-
// set queueing options
|
|
1715
1744
|
var autoplay = false;
|
|
1716
1745
|
var opts = {
|
|
1717
1746
|
videoId: _this.props.videoId
|
|
1718
1747
|
};
|
|
1748
|
+
|
|
1719
1749
|
if ('playerVars' in _this.props.opts) {
|
|
1720
1750
|
autoplay = _this.props.opts.playerVars.autoplay === 1;
|
|
1751
|
+
|
|
1721
1752
|
if ('start' in _this.props.opts.playerVars) {
|
|
1722
1753
|
opts.startSeconds = _this.props.opts.playerVars.start;
|
|
1723
1754
|
}
|
|
1755
|
+
|
|
1724
1756
|
if ('end' in _this.props.opts.playerVars) {
|
|
1725
1757
|
opts.endSeconds = _this.props.opts.playerVars.end;
|
|
1726
1758
|
}
|
|
1727
|
-
}
|
|
1759
|
+
} // if autoplay is enabled loadVideoById
|
|
1760
|
+
|
|
1728
1761
|
|
|
1729
|
-
// if autoplay is enabled loadVideoById
|
|
1730
1762
|
if (autoplay) {
|
|
1731
1763
|
_this.internalPlayer.loadVideoById(opts);
|
|
1764
|
+
|
|
1732
1765
|
return;
|
|
1733
|
-
}
|
|
1734
|
-
|
|
1766
|
+
} // default behaviour just cues the video
|
|
1767
|
+
|
|
1768
|
+
|
|
1735
1769
|
_this.internalPlayer.cueVideoById(opts);
|
|
1736
|
-
};
|
|
1770
|
+
});
|
|
1737
1771
|
|
|
1738
|
-
_this
|
|
1772
|
+
_defineProperty(_assertThisInitialized(_this), "refContainer", function (container) {
|
|
1739
1773
|
_this.container = container;
|
|
1740
|
-
};
|
|
1774
|
+
});
|
|
1741
1775
|
|
|
1742
1776
|
_this.container = null;
|
|
1743
1777
|
_this.internalPlayer = null;
|
|
1744
1778
|
return _this;
|
|
1745
1779
|
}
|
|
1746
1780
|
|
|
1747
|
-
/**
|
|
1748
|
-
* Expose PlayerState constants for convenience. These constants can also be
|
|
1749
|
-
* accessed through the global YT object after the YouTube IFrame API is instantiated.
|
|
1750
|
-
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
1751
|
-
*/
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
1781
|
_createClass(YouTube, [{
|
|
1755
|
-
key:
|
|
1782
|
+
key: "componentDidMount",
|
|
1756
1783
|
value: function componentDidMount() {
|
|
1757
1784
|
this.createPlayer();
|
|
1758
1785
|
}
|
|
1759
1786
|
}, {
|
|
1760
|
-
key:
|
|
1787
|
+
key: "componentDidUpdate",
|
|
1761
1788
|
value: function componentDidUpdate(prevProps) {
|
|
1762
1789
|
if (shouldUpdatePlayer(prevProps, this.props)) {
|
|
1763
1790
|
this.updatePlayer();
|
|
@@ -1772,112 +1799,58 @@ var YouTube = function (_React$Component) {
|
|
|
1772
1799
|
}
|
|
1773
1800
|
}
|
|
1774
1801
|
}, {
|
|
1775
|
-
key:
|
|
1802
|
+
key: "componentWillUnmount",
|
|
1776
1803
|
value: function componentWillUnmount() {
|
|
1777
|
-
/**
|
|
1778
|
-
* Note: The `youtube-player` package that is used promisifies all
|
|
1779
|
-
* Player API calls, which introduces a delay of a tick before it actually
|
|
1780
|
-
* gets destroyed. Since React attempts to remove the element instantly
|
|
1781
|
-
* this method isn't quick enough to reset the container element.
|
|
1804
|
+
/**
|
|
1805
|
+
* Note: The `youtube-player` package that is used promisifies all YouTube
|
|
1806
|
+
* Player API calls, which introduces a delay of a tick before it actually
|
|
1807
|
+
* gets destroyed. Since React attempts to remove the element instantly
|
|
1808
|
+
* this method isn't quick enough to reset the container element.
|
|
1782
1809
|
*/
|
|
1783
1810
|
this.internalPlayer.destroy();
|
|
1784
1811
|
}
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
*
|
|
1788
|
-
*
|
|
1789
|
-
*
|
|
1790
|
-
* @param {Object} target - player object
|
|
1791
|
-
*/
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
/**
|
|
1795
|
-
* https://developers.google.com/youtube/iframe_api_reference#onError
|
|
1796
|
-
*
|
|
1797
|
-
* @param {Object} event
|
|
1798
|
-
* @param {Integer} data - error type
|
|
1799
|
-
* @param {Object} target - player object
|
|
1800
|
-
*/
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
/**
|
|
1804
|
-
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
1805
|
-
*
|
|
1806
|
-
* @param {Object} event
|
|
1807
|
-
* @param {Integer} data - status change type
|
|
1808
|
-
* @param {Object} target - actual YT player
|
|
1809
|
-
*/
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
/**
|
|
1813
|
-
* https://developers.google.com/youtube/iframe_api_reference#onPlaybackRateChange
|
|
1814
|
-
*
|
|
1815
|
-
* @param {Object} event
|
|
1816
|
-
* @param {Float} data - playback rate
|
|
1817
|
-
* @param {Object} target - actual YT player
|
|
1818
|
-
*/
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
/**
|
|
1822
|
-
* https://developers.google.com/youtube/iframe_api_reference#onPlaybackQualityChange
|
|
1823
|
-
*
|
|
1824
|
-
* @param {Object} event
|
|
1825
|
-
* @param {String} data - playback quality
|
|
1826
|
-
* @param {Object} target - actual YT player
|
|
1827
|
-
*/
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
/**
|
|
1831
|
-
* Initialize the Youtube Player API on the container and attach event handlers
|
|
1832
|
-
*/
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
/**
|
|
1836
|
-
* Shorthand for destroying and then re-creating the Youtube Player
|
|
1837
|
-
*/
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
/**
|
|
1841
|
-
* Method to update the id and class of the Youtube Player iframe.
|
|
1842
|
-
* React should update this automatically but since the Youtube Player API
|
|
1843
|
-
* replaced the DIV that is mounted by React we need to do this manually.
|
|
1844
|
-
*/
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
/**
|
|
1848
|
-
* Call Youtube Player API methods to update the currently playing video.
|
|
1849
|
-
* Depeding on the `opts.playerVars.autoplay` this function uses one of two
|
|
1850
|
-
* Youtube Player API methods to update the video.
|
|
1812
|
+
/**
|
|
1813
|
+
* https://developers.google.com/youtube/iframe_api_reference#onReady
|
|
1814
|
+
*
|
|
1815
|
+
* @param {Object} event
|
|
1816
|
+
* @param {Object} target - player object
|
|
1851
1817
|
*/
|
|
1852
1818
|
|
|
1853
1819
|
}, {
|
|
1854
|
-
key:
|
|
1820
|
+
key: "render",
|
|
1855
1821
|
value: function render() {
|
|
1856
|
-
return React__default.createElement(
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1822
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
1823
|
+
className: this.props.containerClassName
|
|
1824
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1825
|
+
id: this.props.id,
|
|
1826
|
+
className: this.props.className,
|
|
1827
|
+
ref: this.refContainer
|
|
1828
|
+
}));
|
|
1861
1829
|
}
|
|
1862
1830
|
}]);
|
|
1863
1831
|
|
|
1864
1832
|
return YouTube;
|
|
1865
1833
|
}(React__default.Component);
|
|
1866
1834
|
|
|
1835
|
+
_defineProperty(YouTube, "PlayerState", {
|
|
1836
|
+
UNSTARTED: -1,
|
|
1837
|
+
ENDED: 0,
|
|
1838
|
+
PLAYING: 1,
|
|
1839
|
+
PAUSED: 2,
|
|
1840
|
+
BUFFERING: 3,
|
|
1841
|
+
CUED: 5
|
|
1842
|
+
});
|
|
1843
|
+
|
|
1867
1844
|
YouTube.propTypes = {
|
|
1868
1845
|
videoId: PropTypes.string,
|
|
1869
|
-
|
|
1870
1846
|
// custom ID for player element
|
|
1871
1847
|
id: PropTypes.string,
|
|
1872
|
-
|
|
1873
1848
|
// custom class name for player element
|
|
1874
1849
|
className: PropTypes.string,
|
|
1875
1850
|
// custom class name for player container element
|
|
1876
1851
|
containerClassName: PropTypes.string,
|
|
1877
|
-
|
|
1878
1852
|
// https://developers.google.com/youtube/iframe_api_reference#Loading_a_Video_Player
|
|
1879
1853
|
opts: PropTypes.objectOf(PropTypes.any),
|
|
1880
|
-
|
|
1881
1854
|
// event subscriptions
|
|
1882
1855
|
onReady: PropTypes.func,
|
|
1883
1856
|
onError: PropTypes.func,
|
|
@@ -1889,6 +1862,7 @@ YouTube.propTypes = {
|
|
|
1889
1862
|
onPlaybackQualityChange: PropTypes.func
|
|
1890
1863
|
};
|
|
1891
1864
|
YouTube.defaultProps = {
|
|
1865
|
+
videoId: null,
|
|
1892
1866
|
id: null,
|
|
1893
1867
|
className: null,
|
|
1894
1868
|
opts: {},
|
|
@@ -1902,14 +1876,6 @@ YouTube.defaultProps = {
|
|
|
1902
1876
|
onPlaybackRateChange: function onPlaybackRateChange() {},
|
|
1903
1877
|
onPlaybackQualityChange: function onPlaybackQualityChange() {}
|
|
1904
1878
|
};
|
|
1905
|
-
YouTube.PlayerState = {
|
|
1906
|
-
UNSTARTED: -1,
|
|
1907
|
-
ENDED: 0,
|
|
1908
|
-
PLAYING: 1,
|
|
1909
|
-
PAUSED: 2,
|
|
1910
|
-
BUFFERING: 3,
|
|
1911
|
-
CUED: 5
|
|
1912
|
-
};
|
|
1913
1879
|
|
|
1914
1880
|
var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
1915
1881
|
var url = _ref.url;
|
|
@@ -2173,7 +2139,7 @@ var Media = function Media(_ref) {
|
|
|
2173
2139
|
React__default.createElement(
|
|
2174
2140
|
LazyLoad,
|
|
2175
2141
|
{ once: true },
|
|
2176
|
-
React__default.createElement(Figure$1.Image, _extends
|
|
2142
|
+
React__default.createElement(Figure$1.Image, _extends({ className: 'media-image', style: { maxWidth: '100%' }, src: urlFor(poster).url() }, alt && { alt: alt }))
|
|
2177
2143
|
),
|
|
2178
2144
|
caption && React__default.createElement(
|
|
2179
2145
|
Figure$1.Caption,
|
|
@@ -2185,7 +2151,7 @@ var Media = function Media(_ref) {
|
|
|
2185
2151
|
} else if (caption && caption !== '') {
|
|
2186
2152
|
return React__default.createElement(
|
|
2187
2153
|
'a',
|
|
2188
|
-
_extends
|
|
2154
|
+
_extends({}, uploadDoc.downloadMedia ? {
|
|
2189
2155
|
href: uploadDoc.asset.url + '?dl='
|
|
2190
2156
|
} : { href: uploadDoc.asset.url, target: blank ? '_blank' : '_self', rel: 'noopener noreferrer' }, {
|
|
2191
2157
|
style: { paddingLeft: '4px', paddingRight: '4px' },
|
|
@@ -2238,7 +2204,7 @@ var Video = function Video(_ref) {
|
|
|
2238
2204
|
var onVideoSuccess = function onVideoSuccess(success) {
|
|
2239
2205
|
//console.log('success:', success.ref)
|
|
2240
2206
|
var player = success.ref;
|
|
2241
|
-
if (_typeof(player.ima3) === 'object' && player.ima3.settings && player.ima3.settings.serverUrl && targeting !== null) {
|
|
2207
|
+
if (_typeof$1(player.ima3) === 'object' && player.ima3.settings && player.ima3.settings.serverUrl && targeting !== null) {
|
|
2242
2208
|
player.ima3.settings.debug = true;
|
|
2243
2209
|
if (targeting.content_placement && targeting.document_url) {
|
|
2244
2210
|
player.ima3.settings.serverUrl = player.ima3.settings.serverUrl + '&cust_params=' + encodeURIComponent('content_placement=' + targeting.content_placement + '&document_url=' + targeting.document_url);
|
|
@@ -2753,11 +2719,17 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
2753
2719
|
|
|
2754
2720
|
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; }
|
|
2755
2721
|
|
|
2756
|
-
function
|
|
2722
|
+
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; } } }; }
|
|
2723
|
+
|
|
2724
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2725
|
+
|
|
2726
|
+
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."); }
|
|
2727
|
+
|
|
2728
|
+
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); }
|
|
2757
2729
|
|
|
2758
|
-
function
|
|
2730
|
+
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; }
|
|
2759
2731
|
|
|
2760
|
-
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr)
|
|
2732
|
+
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; }
|
|
2761
2733
|
|
|
2762
2734
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
2763
2735
|
|
|
@@ -2887,12 +2859,12 @@ function getSDK(url, sdkGlobal) {
|
|
|
2887
2859
|
|
|
2888
2860
|
function getConfig(props$1, defaultProps, showWarning) {
|
|
2889
2861
|
var config = (0, _deepmerge["default"])(defaultProps.config, props$1.config);
|
|
2890
|
-
|
|
2891
|
-
var
|
|
2892
|
-
|
|
2862
|
+
|
|
2863
|
+
var _iterator = _createForOfIteratorHelper(props.DEPRECATED_CONFIG_PROPS),
|
|
2864
|
+
_step;
|
|
2893
2865
|
|
|
2894
2866
|
try {
|
|
2895
|
-
for (
|
|
2867
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
2896
2868
|
var p = _step.value;
|
|
2897
2869
|
|
|
2898
2870
|
if (props$1[p]) {
|
|
@@ -2907,18 +2879,9 @@ function getConfig(props$1, defaultProps, showWarning) {
|
|
|
2907
2879
|
}
|
|
2908
2880
|
}
|
|
2909
2881
|
} catch (err) {
|
|
2910
|
-
|
|
2911
|
-
_iteratorError = err;
|
|
2882
|
+
_iterator.e(err);
|
|
2912
2883
|
} finally {
|
|
2913
|
-
|
|
2914
|
-
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
2915
|
-
_iterator["return"]();
|
|
2916
|
-
}
|
|
2917
|
-
} finally {
|
|
2918
|
-
if (_didIteratorError) {
|
|
2919
|
-
throw _iteratorError;
|
|
2920
|
-
}
|
|
2921
|
-
}
|
|
2884
|
+
_iterator.f();
|
|
2922
2885
|
}
|
|
2923
2886
|
|
|
2924
2887
|
return config;
|
|
@@ -3065,12 +3028,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
3065
3028
|
|
|
3066
3029
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
3067
3030
|
|
|
3068
|
-
function
|
|
3031
|
+
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); }; }
|
|
3069
3032
|
|
|
3070
|
-
function
|
|
3033
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
3071
3034
|
|
|
3072
3035
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
3073
3036
|
|
|
3037
|
+
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; } }
|
|
3038
|
+
|
|
3039
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
3040
|
+
|
|
3074
3041
|
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); }
|
|
3075
3042
|
|
|
3076
3043
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -3079,14 +3046,12 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
3079
3046
|
|
|
3080
3047
|
var SEEK_ON_PLAY_EXPIRY = 5000;
|
|
3081
3048
|
|
|
3082
|
-
var Player =
|
|
3083
|
-
/*#__PURE__*/
|
|
3084
|
-
function (_Component) {
|
|
3049
|
+
var Player = /*#__PURE__*/function (_Component) {
|
|
3085
3050
|
_inherits(Player, _Component);
|
|
3086
3051
|
|
|
3087
|
-
|
|
3088
|
-
var _getPrototypeOf2;
|
|
3052
|
+
var _super = _createSuper(Player);
|
|
3089
3053
|
|
|
3054
|
+
function Player() {
|
|
3090
3055
|
var _this;
|
|
3091
3056
|
|
|
3092
3057
|
_classCallCheck(this, Player);
|
|
@@ -3095,7 +3060,7 @@ function (_Component) {
|
|
|
3095
3060
|
_args[_key] = arguments[_key];
|
|
3096
3061
|
}
|
|
3097
3062
|
|
|
3098
|
-
_this =
|
|
3063
|
+
_this = _super.call.apply(_super, [this].concat(_args));
|
|
3099
3064
|
|
|
3100
3065
|
_defineProperty(_assertThisInitialized(_this), "mounted", false);
|
|
3101
3066
|
|
|
@@ -3420,7 +3385,7 @@ function (_Component) {
|
|
|
3420
3385
|
return null;
|
|
3421
3386
|
}
|
|
3422
3387
|
|
|
3423
|
-
return _react["default"].createElement(Player, _extends({}, this.props, {
|
|
3388
|
+
return /*#__PURE__*/_react["default"].createElement(Player, _extends({}, this.props, {
|
|
3424
3389
|
ref: this.ref,
|
|
3425
3390
|
onReady: this.handleReady,
|
|
3426
3391
|
onPlay: this.handlePlay,
|
|
@@ -3481,12 +3446,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
3481
3446
|
|
|
3482
3447
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
3483
3448
|
|
|
3484
|
-
function
|
|
3449
|
+
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); }; }
|
|
3485
3450
|
|
|
3486
|
-
function
|
|
3451
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
3487
3452
|
|
|
3488
3453
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
3489
3454
|
|
|
3455
|
+
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; } }
|
|
3456
|
+
|
|
3457
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
3458
|
+
|
|
3490
3459
|
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); }
|
|
3491
3460
|
|
|
3492
3461
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -3498,14 +3467,12 @@ var SUPPORTED_PROPS = Object.keys(props.propTypes);
|
|
|
3498
3467
|
function createSinglePlayer(activePlayer) {
|
|
3499
3468
|
var _class, _temp;
|
|
3500
3469
|
|
|
3501
|
-
return _temp = _class =
|
|
3502
|
-
/*#__PURE__*/
|
|
3503
|
-
function (_Component) {
|
|
3470
|
+
return _temp = _class = /*#__PURE__*/function (_Component) {
|
|
3504
3471
|
_inherits(SinglePlayer, _Component);
|
|
3505
3472
|
|
|
3506
|
-
|
|
3507
|
-
var _getPrototypeOf2;
|
|
3473
|
+
var _super = _createSuper(SinglePlayer);
|
|
3508
3474
|
|
|
3475
|
+
function SinglePlayer() {
|
|
3509
3476
|
var _this;
|
|
3510
3477
|
|
|
3511
3478
|
_classCallCheck(this, SinglePlayer);
|
|
@@ -3514,7 +3481,7 @@ function createSinglePlayer(activePlayer) {
|
|
|
3514
3481
|
args[_key] = arguments[_key];
|
|
3515
3482
|
}
|
|
3516
3483
|
|
|
3517
|
-
_this =
|
|
3484
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
3518
3485
|
|
|
3519
3486
|
_defineProperty(_assertThisInitialized(_this), "config", (0, utils.getConfig)(_this.props, props.defaultProps, true));
|
|
3520
3487
|
|
|
@@ -3582,12 +3549,12 @@ function createSinglePlayer(activePlayer) {
|
|
|
3582
3549
|
height = _this$props.height,
|
|
3583
3550
|
Wrapper = _this$props.wrapper;
|
|
3584
3551
|
var otherProps = (0, utils.omit)(this.props, SUPPORTED_PROPS, props.DEPRECATED_CONFIG_PROPS);
|
|
3585
|
-
return _react["default"].createElement(Wrapper, _extends({
|
|
3552
|
+
return /*#__PURE__*/_react["default"].createElement(Wrapper, _extends({
|
|
3586
3553
|
style: _objectSpread({}, style, {
|
|
3587
3554
|
width: width,
|
|
3588
3555
|
height: height
|
|
3589
3556
|
})
|
|
3590
|
-
}, otherProps), _react["default"].createElement(_Player["default"], _extends({}, this.props, {
|
|
3557
|
+
}, otherProps), /*#__PURE__*/_react["default"].createElement(_Player["default"], _extends({}, this.props, {
|
|
3591
3558
|
ref: this.ref,
|
|
3592
3559
|
activePlayer: activePlayer,
|
|
3593
3560
|
config: this.config
|
|
@@ -3633,23 +3600,31 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
3633
3600
|
|
|
3634
3601
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
3635
3602
|
|
|
3636
|
-
function
|
|
3603
|
+
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); }; }
|
|
3637
3604
|
|
|
3638
|
-
function
|
|
3605
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
3639
3606
|
|
|
3640
3607
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
3641
3608
|
|
|
3609
|
+
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; } }
|
|
3610
|
+
|
|
3611
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
3612
|
+
|
|
3642
3613
|
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); }
|
|
3643
3614
|
|
|
3644
3615
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
3645
3616
|
|
|
3646
3617
|
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; }
|
|
3647
3618
|
|
|
3648
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
3619
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3649
3620
|
|
|
3650
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
3621
|
+
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."); }
|
|
3651
3622
|
|
|
3652
|
-
function
|
|
3623
|
+
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); }
|
|
3624
|
+
|
|
3625
|
+
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; }
|
|
3626
|
+
|
|
3627
|
+
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; }
|
|
3653
3628
|
|
|
3654
3629
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
3655
3630
|
|
|
@@ -3674,14 +3649,12 @@ function parsePlaylist(url) {
|
|
|
3674
3649
|
return {};
|
|
3675
3650
|
}
|
|
3676
3651
|
|
|
3677
|
-
var YouTube =
|
|
3678
|
-
/*#__PURE__*/
|
|
3679
|
-
function (_Component) {
|
|
3652
|
+
var YouTube = /*#__PURE__*/function (_Component) {
|
|
3680
3653
|
_inherits(YouTube, _Component);
|
|
3681
3654
|
|
|
3682
|
-
|
|
3683
|
-
var _getPrototypeOf2;
|
|
3655
|
+
var _super = _createSuper(YouTube);
|
|
3684
3656
|
|
|
3657
|
+
function YouTube() {
|
|
3685
3658
|
var _this;
|
|
3686
3659
|
|
|
3687
3660
|
_classCallCheck(this, YouTube);
|
|
@@ -3690,7 +3663,7 @@ function (_Component) {
|
|
|
3690
3663
|
args[_key] = arguments[_key];
|
|
3691
3664
|
}
|
|
3692
3665
|
|
|
3693
|
-
_this =
|
|
3666
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
3694
3667
|
|
|
3695
3668
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
3696
3669
|
|
|
@@ -3878,9 +3851,9 @@ function (_Component) {
|
|
|
3878
3851
|
height: '100%',
|
|
3879
3852
|
display: display
|
|
3880
3853
|
};
|
|
3881
|
-
return _react["default"].createElement("div", {
|
|
3854
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
3882
3855
|
style: style
|
|
3883
|
-
}, _react["default"].createElement("div", {
|
|
3856
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
3884
3857
|
ref: this.ref
|
|
3885
3858
|
}));
|
|
3886
3859
|
}
|
|
@@ -3936,12 +3909,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
3936
3909
|
|
|
3937
3910
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
3938
3911
|
|
|
3939
|
-
function
|
|
3912
|
+
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); }; }
|
|
3940
3913
|
|
|
3941
|
-
function
|
|
3914
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
3942
3915
|
|
|
3943
3916
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
3944
3917
|
|
|
3918
|
+
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; } }
|
|
3919
|
+
|
|
3920
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
3921
|
+
|
|
3945
3922
|
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); }
|
|
3946
3923
|
|
|
3947
3924
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -3950,16 +3927,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
3950
3927
|
|
|
3951
3928
|
var SDK_URL = 'https://w.soundcloud.com/player/api.js';
|
|
3952
3929
|
var SDK_GLOBAL = 'SC';
|
|
3953
|
-
var MATCH_URL = /(soundcloud\.com|snd\.sc)
|
|
3930
|
+
var MATCH_URL = /(?:soundcloud\.com|snd\.sc)\/[^.]+$/;
|
|
3954
3931
|
|
|
3955
|
-
var SoundCloud =
|
|
3956
|
-
/*#__PURE__*/
|
|
3957
|
-
function (_Component) {
|
|
3932
|
+
var SoundCloud = /*#__PURE__*/function (_Component) {
|
|
3958
3933
|
_inherits(SoundCloud, _Component);
|
|
3959
3934
|
|
|
3960
|
-
|
|
3961
|
-
var _getPrototypeOf2;
|
|
3935
|
+
var _super = _createSuper(SoundCloud);
|
|
3962
3936
|
|
|
3937
|
+
function SoundCloud() {
|
|
3963
3938
|
var _this;
|
|
3964
3939
|
|
|
3965
3940
|
_classCallCheck(this, SoundCloud);
|
|
@@ -3968,7 +3943,7 @@ function (_Component) {
|
|
|
3968
3943
|
args[_key] = arguments[_key];
|
|
3969
3944
|
}
|
|
3970
3945
|
|
|
3971
|
-
_this =
|
|
3946
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
3972
3947
|
|
|
3973
3948
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
3974
3949
|
|
|
@@ -4089,7 +4064,7 @@ function (_Component) {
|
|
|
4089
4064
|
height: '100%',
|
|
4090
4065
|
display: display
|
|
4091
4066
|
};
|
|
4092
|
-
return _react["default"].createElement("iframe", {
|
|
4067
|
+
return /*#__PURE__*/_react["default"].createElement("iframe", {
|
|
4093
4068
|
ref: this.ref,
|
|
4094
4069
|
src: "https://w.soundcloud.com/player/?url=".concat(encodeURIComponent(this.props.url)),
|
|
4095
4070
|
style: style,
|
|
@@ -4151,12 +4126,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
4151
4126
|
|
|
4152
4127
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
4153
4128
|
|
|
4154
|
-
function
|
|
4129
|
+
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); }; }
|
|
4155
4130
|
|
|
4156
|
-
function
|
|
4131
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
4157
4132
|
|
|
4158
4133
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
4159
4134
|
|
|
4135
|
+
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; } }
|
|
4136
|
+
|
|
4137
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
4138
|
+
|
|
4160
4139
|
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); }
|
|
4161
4140
|
|
|
4162
4141
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -4168,14 +4147,12 @@ var SDK_GLOBAL = 'Vimeo';
|
|
|
4168
4147
|
var MATCH_URL = /vimeo\.com\/.+/;
|
|
4169
4148
|
var MATCH_FILE_URL = /vimeo\.com\/external\/[0-9]+\..+/;
|
|
4170
4149
|
|
|
4171
|
-
var Vimeo =
|
|
4172
|
-
/*#__PURE__*/
|
|
4173
|
-
function (_Component) {
|
|
4150
|
+
var Vimeo = /*#__PURE__*/function (_Component) {
|
|
4174
4151
|
_inherits(Vimeo, _Component);
|
|
4175
4152
|
|
|
4176
|
-
|
|
4177
|
-
var _getPrototypeOf2;
|
|
4153
|
+
var _super = _createSuper(Vimeo);
|
|
4178
4154
|
|
|
4155
|
+
function Vimeo() {
|
|
4179
4156
|
var _this;
|
|
4180
4157
|
|
|
4181
4158
|
_classCallCheck(this, Vimeo);
|
|
@@ -4184,7 +4161,7 @@ function (_Component) {
|
|
|
4184
4161
|
args[_key] = arguments[_key];
|
|
4185
4162
|
}
|
|
4186
4163
|
|
|
4187
|
-
_this =
|
|
4164
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
4188
4165
|
|
|
4189
4166
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
4190
4167
|
|
|
@@ -4341,7 +4318,7 @@ function (_Component) {
|
|
|
4341
4318
|
overflow: 'hidden',
|
|
4342
4319
|
display: display
|
|
4343
4320
|
};
|
|
4344
|
-
return _react["default"].createElement("div", {
|
|
4321
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
4345
4322
|
key: this.props.url,
|
|
4346
4323
|
ref: this.ref,
|
|
4347
4324
|
style: style
|
|
@@ -4401,12 +4378,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
4401
4378
|
|
|
4402
4379
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
4403
4380
|
|
|
4404
|
-
function
|
|
4381
|
+
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); }; }
|
|
4405
4382
|
|
|
4406
|
-
function
|
|
4383
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
4407
4384
|
|
|
4408
4385
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
4409
4386
|
|
|
4387
|
+
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; } }
|
|
4388
|
+
|
|
4389
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
4390
|
+
|
|
4410
4391
|
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); }
|
|
4411
4392
|
|
|
4412
4393
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -4419,14 +4400,12 @@ var SDK_GLOBAL_READY = 'fbAsyncInit';
|
|
|
4419
4400
|
var MATCH_URL = /^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/;
|
|
4420
4401
|
var PLAYER_ID_PREFIX = 'facebook-player-';
|
|
4421
4402
|
|
|
4422
|
-
var Facebook =
|
|
4423
|
-
/*#__PURE__*/
|
|
4424
|
-
function (_Component) {
|
|
4403
|
+
var Facebook = /*#__PURE__*/function (_Component) {
|
|
4425
4404
|
_inherits(Facebook, _Component);
|
|
4426
4405
|
|
|
4427
|
-
|
|
4428
|
-
var _getPrototypeOf2;
|
|
4406
|
+
var _super = _createSuper(Facebook);
|
|
4429
4407
|
|
|
4408
|
+
function Facebook() {
|
|
4430
4409
|
var _this;
|
|
4431
4410
|
|
|
4432
4411
|
_classCallCheck(this, Facebook);
|
|
@@ -4435,7 +4414,7 @@ function (_Component) {
|
|
|
4435
4414
|
args[_key] = arguments[_key];
|
|
4436
4415
|
}
|
|
4437
4416
|
|
|
4438
|
-
_this =
|
|
4417
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
4439
4418
|
|
|
4440
4419
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
4441
4420
|
|
|
@@ -4551,7 +4530,7 @@ function (_Component) {
|
|
|
4551
4530
|
width: '100%',
|
|
4552
4531
|
height: '100%'
|
|
4553
4532
|
};
|
|
4554
|
-
return _react["default"].createElement("div", {
|
|
4533
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
4555
4534
|
style: style,
|
|
4556
4535
|
id: this.playerID,
|
|
4557
4536
|
className: "fb-video",
|
|
@@ -4611,12 +4590,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
4611
4590
|
|
|
4612
4591
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
4613
4592
|
|
|
4614
|
-
function
|
|
4593
|
+
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); }; }
|
|
4615
4594
|
|
|
4616
|
-
function
|
|
4595
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
4617
4596
|
|
|
4618
4597
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
4619
4598
|
|
|
4599
|
+
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; } }
|
|
4600
|
+
|
|
4601
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
4602
|
+
|
|
4620
4603
|
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); }
|
|
4621
4604
|
|
|
4622
4605
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -4627,14 +4610,12 @@ var SDK_URL = 'https://cdn.embed.ly/player-0.1.0.min.js';
|
|
|
4627
4610
|
var SDK_GLOBAL = 'playerjs';
|
|
4628
4611
|
var MATCH_URL = /streamable\.com\/([a-z0-9]+)$/;
|
|
4629
4612
|
|
|
4630
|
-
var Streamable =
|
|
4631
|
-
/*#__PURE__*/
|
|
4632
|
-
function (_Component) {
|
|
4613
|
+
var Streamable = /*#__PURE__*/function (_Component) {
|
|
4633
4614
|
_inherits(Streamable, _Component);
|
|
4634
4615
|
|
|
4635
|
-
|
|
4636
|
-
var _getPrototypeOf2;
|
|
4616
|
+
var _super = _createSuper(Streamable);
|
|
4637
4617
|
|
|
4618
|
+
function Streamable() {
|
|
4638
4619
|
var _this;
|
|
4639
4620
|
|
|
4640
4621
|
_classCallCheck(this, Streamable);
|
|
@@ -4643,7 +4624,7 @@ function (_Component) {
|
|
|
4643
4624
|
args[_key] = arguments[_key];
|
|
4644
4625
|
}
|
|
4645
4626
|
|
|
4646
|
-
_this =
|
|
4627
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
4647
4628
|
|
|
4648
4629
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
4649
4630
|
|
|
@@ -4763,7 +4744,7 @@ function (_Component) {
|
|
|
4763
4744
|
width: '100%',
|
|
4764
4745
|
height: '100%'
|
|
4765
4746
|
};
|
|
4766
|
-
return _react["default"].createElement("iframe", {
|
|
4747
|
+
return /*#__PURE__*/_react["default"].createElement("iframe", {
|
|
4767
4748
|
ref: this.ref,
|
|
4768
4749
|
src: "https://streamable.com/o/".concat(id),
|
|
4769
4750
|
frameBorder: "0",
|
|
@@ -4824,12 +4805,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
4824
4805
|
|
|
4825
4806
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
4826
4807
|
|
|
4827
|
-
function
|
|
4808
|
+
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); }; }
|
|
4828
4809
|
|
|
4829
|
-
function
|
|
4810
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
4830
4811
|
|
|
4831
4812
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
4832
4813
|
|
|
4814
|
+
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; } }
|
|
4815
|
+
|
|
4816
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
4817
|
+
|
|
4833
4818
|
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); }
|
|
4834
4819
|
|
|
4835
4820
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -4840,26 +4825,48 @@ var SDK_URL = 'https://fast.wistia.com/assets/external/E-v1.js';
|
|
|
4840
4825
|
var SDK_GLOBAL = 'Wistia';
|
|
4841
4826
|
var MATCH_URL = /(?:wistia\.com|wi\.st)\/(?:medias|embed)\/(.*)$/;
|
|
4842
4827
|
|
|
4843
|
-
var Wistia =
|
|
4844
|
-
/*#__PURE__*/
|
|
4845
|
-
function (_Component) {
|
|
4828
|
+
var Wistia = /*#__PURE__*/function (_Component) {
|
|
4846
4829
|
_inherits(Wistia, _Component);
|
|
4847
4830
|
|
|
4848
|
-
|
|
4849
|
-
var _getPrototypeOf2;
|
|
4831
|
+
var _super = _createSuper(Wistia);
|
|
4850
4832
|
|
|
4833
|
+
function Wistia() {
|
|
4851
4834
|
var _this;
|
|
4852
4835
|
|
|
4853
4836
|
_classCallCheck(this, Wistia);
|
|
4854
4837
|
|
|
4855
|
-
for (var _len = arguments.length,
|
|
4856
|
-
|
|
4838
|
+
for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
4839
|
+
_args[_key] = arguments[_key];
|
|
4857
4840
|
}
|
|
4858
4841
|
|
|
4859
|
-
_this =
|
|
4842
|
+
_this = _super.call.apply(_super, [this].concat(_args));
|
|
4860
4843
|
|
|
4861
4844
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
4862
4845
|
|
|
4846
|
+
_defineProperty(_assertThisInitialized(_this), "onPlay", function () {
|
|
4847
|
+
var _this$props;
|
|
4848
|
+
|
|
4849
|
+
return (_this$props = _this.props).onPlay.apply(_this$props, arguments);
|
|
4850
|
+
});
|
|
4851
|
+
|
|
4852
|
+
_defineProperty(_assertThisInitialized(_this), "onPause", function () {
|
|
4853
|
+
var _this$props2;
|
|
4854
|
+
|
|
4855
|
+
return (_this$props2 = _this.props).onPause.apply(_this$props2, arguments);
|
|
4856
|
+
});
|
|
4857
|
+
|
|
4858
|
+
_defineProperty(_assertThisInitialized(_this), "onSeek", function () {
|
|
4859
|
+
var _this$props3;
|
|
4860
|
+
|
|
4861
|
+
return (_this$props3 = _this.props).onSeek.apply(_this$props3, arguments);
|
|
4862
|
+
});
|
|
4863
|
+
|
|
4864
|
+
_defineProperty(_assertThisInitialized(_this), "onEnded", function () {
|
|
4865
|
+
var _this$props4;
|
|
4866
|
+
|
|
4867
|
+
return (_this$props4 = _this.props).onEnded.apply(_this$props4, arguments);
|
|
4868
|
+
});
|
|
4869
|
+
|
|
4863
4870
|
_defineProperty(_assertThisInitialized(_this), "mute", function () {
|
|
4864
4871
|
_this.callPlayer('mute');
|
|
4865
4872
|
});
|
|
@@ -4881,17 +4888,13 @@ function (_Component) {
|
|
|
4881
4888
|
value: function load(url) {
|
|
4882
4889
|
var _this2 = this;
|
|
4883
4890
|
|
|
4884
|
-
var _this$
|
|
4885
|
-
playing = _this$
|
|
4886
|
-
muted = _this$
|
|
4887
|
-
controls = _this$
|
|
4888
|
-
_onReady = _this$
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
onSeek = _this$props.onSeek,
|
|
4892
|
-
onEnded = _this$props.onEnded,
|
|
4893
|
-
config = _this$props.config,
|
|
4894
|
-
onError = _this$props.onError;
|
|
4891
|
+
var _this$props5 = this.props,
|
|
4892
|
+
playing = _this$props5.playing,
|
|
4893
|
+
muted = _this$props5.muted,
|
|
4894
|
+
controls = _this$props5.controls,
|
|
4895
|
+
_onReady = _this$props5.onReady,
|
|
4896
|
+
config = _this$props5.config,
|
|
4897
|
+
onError = _this$props5.onError;
|
|
4895
4898
|
(0, utils.getSDK)(SDK_URL, SDK_GLOBAL).then(function () {
|
|
4896
4899
|
window._wq = window._wq || [];
|
|
4897
4900
|
|
|
@@ -4908,19 +4911,28 @@ function (_Component) {
|
|
|
4908
4911
|
|
|
4909
4912
|
_this2.unbind();
|
|
4910
4913
|
|
|
4911
|
-
_this2.player.bind('play', onPlay);
|
|
4914
|
+
_this2.player.bind('play', _this2.onPlay);
|
|
4912
4915
|
|
|
4913
|
-
_this2.player.bind('pause', onPause);
|
|
4916
|
+
_this2.player.bind('pause', _this2.onPause);
|
|
4914
4917
|
|
|
4915
|
-
_this2.player.bind('seek', onSeek);
|
|
4918
|
+
_this2.player.bind('seek', _this2.onSeek);
|
|
4916
4919
|
|
|
4917
|
-
_this2.player.bind('end', onEnded);
|
|
4920
|
+
_this2.player.bind('end', _this2.onEnded);
|
|
4918
4921
|
|
|
4919
4922
|
_onReady();
|
|
4920
4923
|
}
|
|
4921
4924
|
});
|
|
4922
4925
|
}, onError);
|
|
4923
4926
|
}
|
|
4927
|
+
}, {
|
|
4928
|
+
key: "unbind",
|
|
4929
|
+
value: function unbind() {
|
|
4930
|
+
this.player.unbind('play', this.onPlay);
|
|
4931
|
+
this.player.unbind('pause', this.onPause);
|
|
4932
|
+
this.player.unbind('seek', this.onSeek);
|
|
4933
|
+
this.player.unbind('end', this.onEnded);
|
|
4934
|
+
} // Proxy methods to prevent listener leaks
|
|
4935
|
+
|
|
4924
4936
|
}, {
|
|
4925
4937
|
key: "play",
|
|
4926
4938
|
value: function play() {
|
|
@@ -4931,19 +4943,6 @@ function (_Component) {
|
|
|
4931
4943
|
value: function pause() {
|
|
4932
4944
|
this.callPlayer('pause');
|
|
4933
4945
|
}
|
|
4934
|
-
}, {
|
|
4935
|
-
key: "unbind",
|
|
4936
|
-
value: function unbind() {
|
|
4937
|
-
var _this$props2 = this.props,
|
|
4938
|
-
onPlay = _this$props2.onPlay,
|
|
4939
|
-
onPause = _this$props2.onPause,
|
|
4940
|
-
onSeek = _this$props2.onSeek,
|
|
4941
|
-
onEnded = _this$props2.onEnded;
|
|
4942
|
-
this.player.unbind('play', onPlay);
|
|
4943
|
-
this.player.unbind('pause', onPause);
|
|
4944
|
-
this.player.unbind('seek', onSeek);
|
|
4945
|
-
this.player.unbind('end', onEnded);
|
|
4946
|
-
}
|
|
4947
4946
|
}, {
|
|
4948
4947
|
key: "stop",
|
|
4949
4948
|
value: function stop() {
|
|
@@ -4989,7 +4988,7 @@ function (_Component) {
|
|
|
4989
4988
|
width: '100%',
|
|
4990
4989
|
height: '100%'
|
|
4991
4990
|
};
|
|
4992
|
-
return _react["default"].createElement("div", {
|
|
4991
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
4993
4992
|
key: id,
|
|
4994
4993
|
className: className,
|
|
4995
4994
|
style: style
|
|
@@ -5049,12 +5048,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
5049
5048
|
|
|
5050
5049
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
5051
5050
|
|
|
5052
|
-
function
|
|
5051
|
+
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); }; }
|
|
5053
5052
|
|
|
5054
|
-
function
|
|
5053
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
5055
5054
|
|
|
5056
5055
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5057
5056
|
|
|
5057
|
+
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; } }
|
|
5058
|
+
|
|
5059
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
5060
|
+
|
|
5058
5061
|
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); }
|
|
5059
5062
|
|
|
5060
5063
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -5067,14 +5070,12 @@ var MATCH_VIDEO_URL = /(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/;
|
|
|
5067
5070
|
var MATCH_CHANNEL_URL = /(?:www\.|go\.)?twitch\.tv\/([a-z0-9_]+)($|\?)/;
|
|
5068
5071
|
var PLAYER_ID_PREFIX = 'twitch-player-';
|
|
5069
5072
|
|
|
5070
|
-
var Twitch =
|
|
5071
|
-
/*#__PURE__*/
|
|
5072
|
-
function (_Component) {
|
|
5073
|
+
var Twitch = /*#__PURE__*/function (_Component) {
|
|
5073
5074
|
_inherits(Twitch, _Component);
|
|
5074
5075
|
|
|
5075
|
-
|
|
5076
|
-
var _getPrototypeOf2;
|
|
5076
|
+
var _super = _createSuper(Twitch);
|
|
5077
5077
|
|
|
5078
|
+
function Twitch() {
|
|
5078
5079
|
var _this;
|
|
5079
5080
|
|
|
5080
5081
|
_classCallCheck(this, Twitch);
|
|
@@ -5083,7 +5084,7 @@ function (_Component) {
|
|
|
5083
5084
|
args[_key] = arguments[_key];
|
|
5084
5085
|
}
|
|
5085
5086
|
|
|
5086
|
-
_this =
|
|
5087
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
5087
5088
|
|
|
5088
5089
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
5089
5090
|
|
|
@@ -5204,7 +5205,7 @@ function (_Component) {
|
|
|
5204
5205
|
width: '100%',
|
|
5205
5206
|
height: '100%'
|
|
5206
5207
|
};
|
|
5207
|
-
return _react["default"].createElement("div", {
|
|
5208
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
5208
5209
|
style: style,
|
|
5209
5210
|
id: this.playerID
|
|
5210
5211
|
});
|
|
@@ -5257,11 +5258,15 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
5257
5258
|
|
|
5258
5259
|
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; }
|
|
5259
5260
|
|
|
5260
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
5261
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
5262
|
+
|
|
5263
|
+
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."); }
|
|
5261
5264
|
|
|
5262
|
-
function
|
|
5265
|
+
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); }
|
|
5263
5266
|
|
|
5264
|
-
function
|
|
5267
|
+
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; }
|
|
5268
|
+
|
|
5269
|
+
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; }
|
|
5265
5270
|
|
|
5266
5271
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
5267
5272
|
|
|
@@ -5271,12 +5276,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
5271
5276
|
|
|
5272
5277
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
5273
5278
|
|
|
5274
|
-
function
|
|
5279
|
+
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); }; }
|
|
5275
5280
|
|
|
5276
|
-
function
|
|
5281
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
5277
5282
|
|
|
5278
5283
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5279
5284
|
|
|
5285
|
+
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; } }
|
|
5286
|
+
|
|
5287
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
5288
|
+
|
|
5280
5289
|
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); }
|
|
5281
5290
|
|
|
5282
5291
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -5288,14 +5297,12 @@ var SDK_GLOBAL = 'DM';
|
|
|
5288
5297
|
var SDK_GLOBAL_READY = 'dmAsyncInit';
|
|
5289
5298
|
var MATCH_URL = /^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?$/;
|
|
5290
5299
|
|
|
5291
|
-
var DailyMotion =
|
|
5292
|
-
/*#__PURE__*/
|
|
5293
|
-
function (_Component) {
|
|
5300
|
+
var DailyMotion = /*#__PURE__*/function (_Component) {
|
|
5294
5301
|
_inherits(DailyMotion, _Component);
|
|
5295
5302
|
|
|
5296
|
-
|
|
5297
|
-
var _getPrototypeOf2;
|
|
5303
|
+
var _super = _createSuper(DailyMotion);
|
|
5298
5304
|
|
|
5305
|
+
function DailyMotion() {
|
|
5299
5306
|
var _this;
|
|
5300
5307
|
|
|
5301
5308
|
_classCallCheck(this, DailyMotion);
|
|
@@ -5304,7 +5311,7 @@ function (_Component) {
|
|
|
5304
5311
|
args[_key] = arguments[_key];
|
|
5305
5312
|
}
|
|
5306
5313
|
|
|
5307
|
-
_this =
|
|
5314
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
5308
5315
|
|
|
5309
5316
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
5310
5317
|
|
|
@@ -5433,9 +5440,9 @@ function (_Component) {
|
|
|
5433
5440
|
height: '100%',
|
|
5434
5441
|
display: display
|
|
5435
5442
|
};
|
|
5436
|
-
return _react["default"].createElement("div", {
|
|
5443
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
5437
5444
|
style: style
|
|
5438
|
-
}, _react["default"].createElement("div", {
|
|
5445
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
5439
5446
|
ref: this.ref
|
|
5440
5447
|
}));
|
|
5441
5448
|
}
|
|
@@ -5493,12 +5500,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
5493
5500
|
|
|
5494
5501
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
5495
5502
|
|
|
5496
|
-
function
|
|
5503
|
+
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); }; }
|
|
5497
5504
|
|
|
5498
|
-
function
|
|
5505
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
5499
5506
|
|
|
5500
5507
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5501
5508
|
|
|
5509
|
+
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; } }
|
|
5510
|
+
|
|
5511
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
5512
|
+
|
|
5502
5513
|
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); }
|
|
5503
5514
|
|
|
5504
5515
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -5509,14 +5520,12 @@ var SDK_URL = 'https://widget.mixcloud.com/media/js/widgetApi.js';
|
|
|
5509
5520
|
var SDK_GLOBAL = 'Mixcloud';
|
|
5510
5521
|
var MATCH_URL = /mixcloud\.com\/([^/]+\/[^/]+)/;
|
|
5511
5522
|
|
|
5512
|
-
var Mixcloud =
|
|
5513
|
-
/*#__PURE__*/
|
|
5514
|
-
function (_Component) {
|
|
5523
|
+
var Mixcloud = /*#__PURE__*/function (_Component) {
|
|
5515
5524
|
_inherits(Mixcloud, _Component);
|
|
5516
5525
|
|
|
5517
|
-
|
|
5518
|
-
var _getPrototypeOf2;
|
|
5526
|
+
var _super = _createSuper(Mixcloud);
|
|
5519
5527
|
|
|
5528
|
+
function Mixcloud() {
|
|
5520
5529
|
var _this;
|
|
5521
5530
|
|
|
5522
5531
|
_classCallCheck(this, Mixcloud);
|
|
@@ -5525,7 +5534,7 @@ function (_Component) {
|
|
|
5525
5534
|
args[_key] = arguments[_key];
|
|
5526
5535
|
}
|
|
5527
5536
|
|
|
5528
|
-
_this =
|
|
5537
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
5529
5538
|
|
|
5530
5539
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
5531
5540
|
|
|
@@ -5628,7 +5637,7 @@ function (_Component) {
|
|
|
5628
5637
|
})); // We have to give the iframe a key here to prevent a
|
|
5629
5638
|
// weird dialog appearing when loading a new track
|
|
5630
5639
|
|
|
5631
|
-
return _react["default"].createElement("iframe", {
|
|
5640
|
+
return /*#__PURE__*/_react["default"].createElement("iframe", {
|
|
5632
5641
|
key: id,
|
|
5633
5642
|
ref: this.ref,
|
|
5634
5643
|
style: style,
|
|
@@ -5688,23 +5697,33 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
5688
5697
|
|
|
5689
5698
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
5690
5699
|
|
|
5691
|
-
function
|
|
5700
|
+
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); }; }
|
|
5692
5701
|
|
|
5693
|
-
function
|
|
5702
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
5694
5703
|
|
|
5695
5704
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5696
5705
|
|
|
5706
|
+
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; } }
|
|
5707
|
+
|
|
5708
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
5709
|
+
|
|
5697
5710
|
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); }
|
|
5698
5711
|
|
|
5699
5712
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
5700
5713
|
|
|
5701
5714
|
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; }
|
|
5702
5715
|
|
|
5716
|
+
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; } } }; }
|
|
5717
|
+
|
|
5718
|
+
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); }
|
|
5719
|
+
|
|
5720
|
+
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; }
|
|
5721
|
+
|
|
5703
5722
|
var IOS = typeof navigator !== 'undefined' && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
|
5704
5723
|
var AUDIO_EXTENSIONS = /\.(m4a|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i;
|
|
5705
5724
|
var VIDEO_EXTENSIONS = /\.(mp4|og[gv]|webm|mov|m4v)($|\?)/i;
|
|
5706
5725
|
var HLS_EXTENSIONS = /\.(m3u8)($|\?)/i;
|
|
5707
|
-
var HLS_SDK_URL = 'https://cdn.jsdelivr.net/npm/hls.js@VERSION';
|
|
5726
|
+
var HLS_SDK_URL = 'https://cdn.jsdelivr.net/npm/hls.js@VERSION/dist/hls.min.js';
|
|
5708
5727
|
var HLS_GLOBAL = 'Hls';
|
|
5709
5728
|
var DASH_EXTENSIONS = /\.(mpd)($|\?)/i;
|
|
5710
5729
|
var DASH_SDK_URL = 'https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js';
|
|
@@ -5713,12 +5732,11 @@ var MATCH_DROPBOX_URL = /www\.dropbox\.com\/.+/;
|
|
|
5713
5732
|
|
|
5714
5733
|
function canPlay(url) {
|
|
5715
5734
|
if (url instanceof Array) {
|
|
5716
|
-
var
|
|
5717
|
-
|
|
5718
|
-
var _iteratorError = undefined;
|
|
5735
|
+
var _iterator = _createForOfIteratorHelper(url),
|
|
5736
|
+
_step;
|
|
5719
5737
|
|
|
5720
5738
|
try {
|
|
5721
|
-
for (
|
|
5739
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
5722
5740
|
var item = _step.value;
|
|
5723
5741
|
|
|
5724
5742
|
if (typeof item === 'string' && canPlay(item)) {
|
|
@@ -5730,18 +5748,9 @@ function canPlay(url) {
|
|
|
5730
5748
|
}
|
|
5731
5749
|
}
|
|
5732
5750
|
} catch (err) {
|
|
5733
|
-
|
|
5734
|
-
_iteratorError = err;
|
|
5751
|
+
_iterator.e(err);
|
|
5735
5752
|
} finally {
|
|
5736
|
-
|
|
5737
|
-
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
5738
|
-
_iterator["return"]();
|
|
5739
|
-
}
|
|
5740
|
-
} finally {
|
|
5741
|
-
if (_didIteratorError) {
|
|
5742
|
-
throw _iteratorError;
|
|
5743
|
-
}
|
|
5744
|
-
}
|
|
5753
|
+
_iterator.f();
|
|
5745
5754
|
}
|
|
5746
5755
|
|
|
5747
5756
|
return false;
|
|
@@ -5765,14 +5774,12 @@ function canEnablePIP(url) {
|
|
|
5765
5774
|
return canPlay(url) && (!!document.pictureInPictureEnabled || supportsWebKitPresentationMode()) && !AUDIO_EXTENSIONS.test(url);
|
|
5766
5775
|
}
|
|
5767
5776
|
|
|
5768
|
-
var FilePlayer =
|
|
5769
|
-
/*#__PURE__*/
|
|
5770
|
-
function (_Component) {
|
|
5777
|
+
var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
5771
5778
|
_inherits(FilePlayer, _Component);
|
|
5772
5779
|
|
|
5773
|
-
|
|
5774
|
-
var _getPrototypeOf2;
|
|
5780
|
+
var _super = _createSuper(FilePlayer);
|
|
5775
5781
|
|
|
5782
|
+
function FilePlayer() {
|
|
5776
5783
|
var _this;
|
|
5777
5784
|
|
|
5778
5785
|
_classCallCheck(this, FilePlayer);
|
|
@@ -5781,7 +5788,7 @@ function (_Component) {
|
|
|
5781
5788
|
_args[_key] = arguments[_key];
|
|
5782
5789
|
}
|
|
5783
5790
|
|
|
5784
|
-
_this =
|
|
5791
|
+
_this = _super.call.apply(_super, [this].concat(_args));
|
|
5785
5792
|
|
|
5786
5793
|
_defineProperty(_assertThisInitialized(_this), "onReady", function () {
|
|
5787
5794
|
var _this$props;
|
|
@@ -5868,19 +5875,19 @@ function (_Component) {
|
|
|
5868
5875
|
|
|
5869
5876
|
_defineProperty(_assertThisInitialized(_this), "renderSourceElement", function (source, index) {
|
|
5870
5877
|
if (typeof source === 'string') {
|
|
5871
|
-
return _react["default"].createElement("source", {
|
|
5878
|
+
return /*#__PURE__*/_react["default"].createElement("source", {
|
|
5872
5879
|
key: index,
|
|
5873
5880
|
src: source
|
|
5874
5881
|
});
|
|
5875
5882
|
}
|
|
5876
5883
|
|
|
5877
|
-
return _react["default"].createElement("source", _extends({
|
|
5884
|
+
return /*#__PURE__*/_react["default"].createElement("source", _extends({
|
|
5878
5885
|
key: index
|
|
5879
5886
|
}, source));
|
|
5880
5887
|
});
|
|
5881
5888
|
|
|
5882
5889
|
_defineProperty(_assertThisInitialized(_this), "renderTrack", function (track, index) {
|
|
5883
|
-
return _react["default"].createElement("track", _extends({
|
|
5890
|
+
return /*#__PURE__*/_react["default"].createElement("track", _extends({
|
|
5884
5891
|
key: index
|
|
5885
5892
|
}, track));
|
|
5886
5893
|
});
|
|
@@ -5918,6 +5925,10 @@ function (_Component) {
|
|
|
5918
5925
|
key: "componentWillUnmount",
|
|
5919
5926
|
value: function componentWillUnmount() {
|
|
5920
5927
|
this.removeListeners(this.player);
|
|
5928
|
+
|
|
5929
|
+
if (this.hls) {
|
|
5930
|
+
this.hls.destroy();
|
|
5931
|
+
}
|
|
5921
5932
|
}
|
|
5922
5933
|
}, {
|
|
5923
5934
|
key: "addListeners",
|
|
@@ -6048,10 +6059,6 @@ function (_Component) {
|
|
|
6048
6059
|
value: function stop() {
|
|
6049
6060
|
this.player.removeAttribute('src');
|
|
6050
6061
|
|
|
6051
|
-
if (this.hls) {
|
|
6052
|
-
this.hls.destroy();
|
|
6053
|
-
}
|
|
6054
|
-
|
|
6055
6062
|
if (this.dash) {
|
|
6056
6063
|
this.dash.reset();
|
|
6057
6064
|
}
|
|
@@ -6163,7 +6170,7 @@ function (_Component) {
|
|
|
6163
6170
|
width: width === 'auto' ? width : '100%',
|
|
6164
6171
|
height: height === 'auto' ? height : '100%'
|
|
6165
6172
|
};
|
|
6166
|
-
return _react["default"].createElement(Element, _extends({
|
|
6173
|
+
return /*#__PURE__*/_react["default"].createElement(Element, _extends({
|
|
6167
6174
|
ref: this.ref,
|
|
6168
6175
|
src: this.getSource(url),
|
|
6169
6176
|
style: style,
|
|
@@ -6253,12 +6260,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
6253
6260
|
|
|
6254
6261
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
6255
6262
|
|
|
6256
|
-
function
|
|
6263
|
+
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); }; }
|
|
6257
6264
|
|
|
6258
|
-
function
|
|
6265
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
6259
6266
|
|
|
6260
6267
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
6261
6268
|
|
|
6269
|
+
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; } }
|
|
6270
|
+
|
|
6271
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
6272
|
+
|
|
6262
6273
|
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); }
|
|
6263
6274
|
|
|
6264
6275
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -6267,14 +6278,12 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
6267
6278
|
|
|
6268
6279
|
var ICON_SIZE = '64px';
|
|
6269
6280
|
|
|
6270
|
-
var Preview =
|
|
6271
|
-
/*#__PURE__*/
|
|
6272
|
-
function (_Component) {
|
|
6281
|
+
var Preview = /*#__PURE__*/function (_Component) {
|
|
6273
6282
|
_inherits(Preview, _Component);
|
|
6274
6283
|
|
|
6275
|
-
|
|
6276
|
-
var _getPrototypeOf2;
|
|
6284
|
+
var _super = _createSuper(Preview);
|
|
6277
6285
|
|
|
6286
|
+
function Preview() {
|
|
6278
6287
|
var _this;
|
|
6279
6288
|
|
|
6280
6289
|
_classCallCheck(this, Preview);
|
|
@@ -6283,7 +6292,7 @@ function (_Component) {
|
|
|
6283
6292
|
args[_key] = arguments[_key];
|
|
6284
6293
|
}
|
|
6285
6294
|
|
|
6286
|
-
_this =
|
|
6295
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
6287
6296
|
|
|
6288
6297
|
_defineProperty(_assertThisInitialized(_this), "mounted", false);
|
|
6289
6298
|
|
|
@@ -6381,15 +6390,15 @@ function (_Component) {
|
|
|
6381
6390
|
}
|
|
6382
6391
|
};
|
|
6383
6392
|
|
|
6384
|
-
var defaultPlayIcon = _react["default"].createElement("div", {
|
|
6393
|
+
var defaultPlayIcon = /*#__PURE__*/_react["default"].createElement("div", {
|
|
6385
6394
|
style: styles.shadow,
|
|
6386
6395
|
className: "react-player__shadow"
|
|
6387
|
-
}, _react["default"].createElement("div", {
|
|
6396
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
6388
6397
|
style: styles.playIcon,
|
|
6389
6398
|
className: "react-player__play-icon"
|
|
6390
6399
|
}));
|
|
6391
6400
|
|
|
6392
|
-
return _react["default"].createElement("div", {
|
|
6401
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
6393
6402
|
style: styles.preview,
|
|
6394
6403
|
className: "react-player__preview",
|
|
6395
6404
|
onClick: onClick
|
|
@@ -6426,6 +6435,12 @@ var _Player = _interopRequireDefault(Player_1);
|
|
|
6426
6435
|
|
|
6427
6436
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
6428
6437
|
|
|
6438
|
+
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; } } }; }
|
|
6439
|
+
|
|
6440
|
+
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); }
|
|
6441
|
+
|
|
6442
|
+
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; }
|
|
6443
|
+
|
|
6429
6444
|
var PRELOAD_PLAYERS = [{
|
|
6430
6445
|
Player: YouTube_1.YouTube,
|
|
6431
6446
|
configKey: 'youtube',
|
|
@@ -6446,16 +6461,16 @@ var PRELOAD_PLAYERS = [{
|
|
|
6446
6461
|
|
|
6447
6462
|
function renderPreloadPlayers(url, controls, config) {
|
|
6448
6463
|
var players = [];
|
|
6449
|
-
|
|
6450
|
-
var
|
|
6451
|
-
|
|
6464
|
+
|
|
6465
|
+
var _iterator = _createForOfIteratorHelper(PRELOAD_PLAYERS),
|
|
6466
|
+
_step;
|
|
6452
6467
|
|
|
6453
6468
|
try {
|
|
6454
|
-
for (
|
|
6469
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
6455
6470
|
var player = _step.value;
|
|
6456
6471
|
|
|
6457
6472
|
if (!player.Player.canPlay(url) && config[player.configKey].preload) {
|
|
6458
|
-
players.push(_react["default"].createElement(_Player["default"], {
|
|
6473
|
+
players.push( /*#__PURE__*/_react["default"].createElement(_Player["default"], {
|
|
6459
6474
|
key: player.Player.displayName,
|
|
6460
6475
|
activePlayer: player.Player,
|
|
6461
6476
|
url: player.url,
|
|
@@ -6467,18 +6482,9 @@ function renderPreloadPlayers(url, controls, config) {
|
|
|
6467
6482
|
}
|
|
6468
6483
|
}
|
|
6469
6484
|
} catch (err) {
|
|
6470
|
-
|
|
6471
|
-
_iteratorError = err;
|
|
6485
|
+
_iterator.e(err);
|
|
6472
6486
|
} finally {
|
|
6473
|
-
|
|
6474
|
-
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
6475
|
-
_iterator["return"]();
|
|
6476
|
-
}
|
|
6477
|
-
} finally {
|
|
6478
|
-
if (_didIteratorError) {
|
|
6479
|
-
throw _iteratorError;
|
|
6480
|
-
}
|
|
6481
|
-
}
|
|
6487
|
+
_iterator.f();
|
|
6482
6488
|
}
|
|
6483
6489
|
|
|
6484
6490
|
return players;
|
|
@@ -6602,13 +6608,17 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
6602
6608
|
|
|
6603
6609
|
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); }
|
|
6604
6610
|
|
|
6605
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
|
|
6611
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
6612
|
+
|
|
6613
|
+
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."); }
|
|
6614
|
+
|
|
6615
|
+
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); }
|
|
6606
6616
|
|
|
6607
|
-
function
|
|
6617
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
|
|
6608
6618
|
|
|
6609
|
-
function
|
|
6619
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
6610
6620
|
|
|
6611
|
-
function
|
|
6621
|
+
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; }
|
|
6612
6622
|
|
|
6613
6623
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
6614
6624
|
|
|
@@ -6616,12 +6626,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
6616
6626
|
|
|
6617
6627
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
6618
6628
|
|
|
6619
|
-
function
|
|
6629
|
+
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); }; }
|
|
6620
6630
|
|
|
6621
|
-
function
|
|
6631
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
6622
6632
|
|
|
6623
6633
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
6624
6634
|
|
|
6635
|
+
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; } }
|
|
6636
|
+
|
|
6637
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
6638
|
+
|
|
6625
6639
|
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); }
|
|
6626
6640
|
|
|
6627
6641
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -6631,14 +6645,12 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
6631
6645
|
var SUPPORTED_PROPS = Object.keys(props.propTypes);
|
|
6632
6646
|
var customPlayers = [];
|
|
6633
6647
|
|
|
6634
|
-
var ReactPlayer =
|
|
6635
|
-
/*#__PURE__*/
|
|
6636
|
-
function (_Component) {
|
|
6648
|
+
var ReactPlayer = /*#__PURE__*/function (_Component) {
|
|
6637
6649
|
_inherits(ReactPlayer, _Component);
|
|
6638
6650
|
|
|
6639
|
-
|
|
6640
|
-
var _getPrototypeOf2;
|
|
6651
|
+
var _super = _createSuper(ReactPlayer);
|
|
6641
6652
|
|
|
6653
|
+
function ReactPlayer() {
|
|
6642
6654
|
var _this;
|
|
6643
6655
|
|
|
6644
6656
|
_classCallCheck(this, ReactPlayer);
|
|
@@ -6647,7 +6659,7 @@ function (_Component) {
|
|
|
6647
6659
|
args[_key] = arguments[_key];
|
|
6648
6660
|
}
|
|
6649
6661
|
|
|
6650
|
-
_this =
|
|
6662
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
6651
6663
|
|
|
6652
6664
|
_defineProperty(_assertThisInitialized(_this), "config", (0, utils.getConfig)(_this.props, props.defaultProps, true));
|
|
6653
6665
|
|
|
@@ -6758,7 +6770,7 @@ function (_Component) {
|
|
|
6758
6770
|
key: "renderActivePlayer",
|
|
6759
6771
|
value: function renderActivePlayer(url, activePlayer) {
|
|
6760
6772
|
if (!url) return null;
|
|
6761
|
-
return _react["default"].createElement(_Player4["default"], _extends({}, this.props, {
|
|
6773
|
+
return /*#__PURE__*/_react["default"].createElement(_Player4["default"], _extends({}, this.props, {
|
|
6762
6774
|
key: activePlayer.displayName,
|
|
6763
6775
|
ref: this.activePlayerRef,
|
|
6764
6776
|
config: this.config,
|
|
@@ -6795,14 +6807,14 @@ function (_Component) {
|
|
|
6795
6807
|
var preloadPlayers = (0, _preload["default"])(url, controls, this.config);
|
|
6796
6808
|
var players = [renderedActivePlayer].concat(_toConsumableArray(preloadPlayers)).sort(this.sortPlayers);
|
|
6797
6809
|
|
|
6798
|
-
var preview = _react["default"].createElement(_Preview["default"], {
|
|
6810
|
+
var preview = /*#__PURE__*/_react["default"].createElement(_Preview["default"], {
|
|
6799
6811
|
url: url,
|
|
6800
6812
|
light: light,
|
|
6801
6813
|
playIcon: playIcon,
|
|
6802
6814
|
onClick: this.handleClickPreview
|
|
6803
6815
|
});
|
|
6804
6816
|
|
|
6805
|
-
return _react["default"].createElement(Wrapper, _extends({
|
|
6817
|
+
return /*#__PURE__*/_react["default"].createElement(Wrapper, _extends({
|
|
6806
6818
|
ref: this.wrapperRef,
|
|
6807
6819
|
style: _objectSpread({}, style, {
|
|
6808
6820
|
width: width,
|
|
@@ -7046,6 +7058,14 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
7046
7058
|
return null;
|
|
7047
7059
|
}
|
|
7048
7060
|
|
|
7061
|
+
var today = moment().utc().format();
|
|
7062
|
+
|
|
7063
|
+
var Videos = nodes.videos.filter(function (video) {
|
|
7064
|
+
if ((video.is_visible === true || !video.hasOwnProperty('is_visible')) && (today >= video.published || !video.hasOwnProperty('published'))) {
|
|
7065
|
+
return video;
|
|
7066
|
+
}
|
|
7067
|
+
});
|
|
7068
|
+
|
|
7049
7069
|
var builder = imageUrlBuilder(client);
|
|
7050
7070
|
function urlFor(source) {
|
|
7051
7071
|
return builder.image(source);
|
|
@@ -7114,7 +7134,7 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
7114
7134
|
var seriesVid = params.get('seriesVid') || 1;
|
|
7115
7135
|
var data = [];
|
|
7116
7136
|
|
|
7117
|
-
|
|
7137
|
+
Videos.forEach(function (vid) {
|
|
7118
7138
|
if (vid.type == 'mp4') {
|
|
7119
7139
|
data.push({ title: vid.title, thumbnail: urlFor(vid.thumbnail.asset).url(), url: vid.url });
|
|
7120
7140
|
} else {
|
|
@@ -7129,10 +7149,10 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
7129
7149
|
|
|
7130
7150
|
if (data.length < seriesVid) {
|
|
7131
7151
|
setSeries(1);
|
|
7132
|
-
setVidUrl(
|
|
7133
|
-
setVidThumbnail(
|
|
7134
|
-
if (
|
|
7135
|
-
setVidType(
|
|
7152
|
+
setVidUrl(Videos[0].url);
|
|
7153
|
+
setVidThumbnail(Videos[0].thumbnail && Videos[0].thumbnail.asset ? urlFor(Videos[0].thumbnail.asset).url() : '');
|
|
7154
|
+
if (Videos[0].type) {
|
|
7155
|
+
setVidType(Videos[0].type);
|
|
7136
7156
|
}
|
|
7137
7157
|
|
|
7138
7158
|
var newPath = '/' + get2 + '/' + get3 + '?seriesVid=1';
|
|
@@ -7140,10 +7160,10 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
7140
7160
|
window.history.pushState(vidState, '', newPath);
|
|
7141
7161
|
} else {
|
|
7142
7162
|
setSeries(seriesVid);
|
|
7143
|
-
setVidUrl(
|
|
7144
|
-
setVidThumbnail(
|
|
7145
|
-
if (
|
|
7146
|
-
setVidType(
|
|
7163
|
+
setVidUrl(Videos[seriesVid - 1].url);
|
|
7164
|
+
setVidThumbnail(Videos[seriesVid - 1].thumbnail && Videos[seriesVid - 1].thumbnail.asset ? urlFor(Videos[seriesVid - 1].thumbnail.asset).url() : '');
|
|
7165
|
+
if (Videos[0].type) {
|
|
7166
|
+
setVidType(Videos[seriesVid - 1].type);
|
|
7147
7167
|
}
|
|
7148
7168
|
setVidLoaded(true);
|
|
7149
7169
|
}
|
|
@@ -7154,7 +7174,7 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
7154
7174
|
if (vidLoaded == true) {
|
|
7155
7175
|
var params = new URL(document.location).searchParams;
|
|
7156
7176
|
var seriesVid = params.get('seriesVid');
|
|
7157
|
-
var vidTitle =
|
|
7177
|
+
var vidTitle = Videos[series - 1].title;
|
|
7158
7178
|
var originalTitle = document.title;
|
|
7159
7179
|
if (seriesVid) {
|
|
7160
7180
|
document.title = vidTitle + ' | ' + originalTitle;
|
|
@@ -7216,7 +7236,7 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
7216
7236
|
nextVid = currentVid + 1;
|
|
7217
7237
|
}
|
|
7218
7238
|
// set the new Video URL
|
|
7219
|
-
setState(
|
|
7239
|
+
setState(Videos[nextVid].url, '', nextVid + 1);
|
|
7220
7240
|
}
|
|
7221
7241
|
|
|
7222
7242
|
var autoplayNextVideo = function autoplayNextVideo(e) {
|
|
@@ -7237,7 +7257,7 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
7237
7257
|
nextVid = currentVid + 1;
|
|
7238
7258
|
}
|
|
7239
7259
|
// set the new Video URL
|
|
7240
|
-
setState(
|
|
7260
|
+
setState(Videos[nextVid].url, '', nextVid + 1);
|
|
7241
7261
|
};
|
|
7242
7262
|
|
|
7243
7263
|
var handlePlayPercent = function handlePlayPercent(player) {
|
|
@@ -7345,26 +7365,26 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
7345
7365
|
'Episode ',
|
|
7346
7366
|
series
|
|
7347
7367
|
),
|
|
7348
|
-
|
|
7368
|
+
Videos[series - 1] && React__default.createElement(
|
|
7349
7369
|
'h2',
|
|
7350
7370
|
{ className: 'mb-3' },
|
|
7351
|
-
|
|
7371
|
+
Videos[series - 1].title
|
|
7352
7372
|
),
|
|
7353
|
-
|
|
7373
|
+
Videos[series - 1] && Videos[series - 1].intro && React__default.createElement(
|
|
7354
7374
|
'p',
|
|
7355
7375
|
{ className: 'mb-3' },
|
|
7356
7376
|
React__default.createElement(
|
|
7357
7377
|
'em',
|
|
7358
7378
|
null,
|
|
7359
|
-
|
|
7379
|
+
Videos[series - 1].intro
|
|
7360
7380
|
)
|
|
7361
7381
|
),
|
|
7362
|
-
|
|
7382
|
+
Videos[series - 1] && Videos[series - 1].text && React__default.createElement(BlockContent, _extends({ serializers: getSerializers, blocks: Videos[series - 1].text, imageOptions: { w: 320, h: 240, fit: 'max' } }, client.config()))
|
|
7363
7383
|
),
|
|
7364
7384
|
React__default.createElement(
|
|
7365
7385
|
'style',
|
|
7366
7386
|
{ jsx: 'true' },
|
|
7367
|
-
'\n
|
|
7387
|
+
'\n #fluid-video-container > div {\n position: relative;\n padding-bottom: 56.25%; /* 16:9 */\n height: 0;\n }\n #fluid-video-container .fluid-iframe {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100% !important;\n }\n\n span.btn {\n margin: 0 1rem;\n }\n '
|
|
7368
7388
|
)
|
|
7369
7389
|
);
|
|
7370
7390
|
};
|
|
@@ -7487,7 +7507,7 @@ var Poll = function Poll(_ref) {
|
|
|
7487
7507
|
);
|
|
7488
7508
|
};
|
|
7489
7509
|
|
|
7490
|
-
var numberOfPaginations =
|
|
7510
|
+
var numberOfPaginations = main_38 ? 4 : 10;
|
|
7491
7511
|
|
|
7492
7512
|
var Quiz = function Quiz(_ref) {
|
|
7493
7513
|
var quizzes = _ref.quizzes,
|
|
@@ -7600,7 +7620,7 @@ var Quiz = function Quiz(_ref) {
|
|
|
7600
7620
|
var renderPagination = function renderPagination() {
|
|
7601
7621
|
return React__default.createElement(
|
|
7602
7622
|
Pagination,
|
|
7603
|
-
{ className: 'p-0 m-0', size:
|
|
7623
|
+
{ className: 'p-0 m-0', size: main_38 && 'sm' },
|
|
7604
7624
|
React__default.createElement(Pagination.First, { onClick: function onClick() {
|
|
7605
7625
|
return changePage('first');
|
|
7606
7626
|
}, disabled: currentPage === 1 }),
|
|
@@ -7833,7 +7853,7 @@ var MultiMedia = function MultiMedia(props) {
|
|
|
7833
7853
|
{ xs: 12, md: 12 / medias.length, key: media._key },
|
|
7834
7854
|
React__default.createElement(
|
|
7835
7855
|
'a',
|
|
7836
|
-
_extends
|
|
7856
|
+
_extends({}, media.upload_doc && media.upload_doc.asset && { href: media.upload_doc.asset.url, target: media.blank ? '_blank' : '_self' }, {
|
|
7837
7857
|
style: { cursor: media.upload_doc && media.upload_doc.asset && media.upload_doc.asset.url ? 'pointer' : 'default' } }),
|
|
7838
7858
|
React__default.createElement(
|
|
7839
7859
|
'div',
|
|
@@ -8000,9 +8020,11 @@ var InscreenSensor = function (_React$Component) {
|
|
|
8000
8020
|
var ArticleSeries = function ArticleSeries(_ref) {
|
|
8001
8021
|
var nodes = _ref.nodes,
|
|
8002
8022
|
client = _ref.client,
|
|
8023
|
+
pageview = _ref.pageview,
|
|
8003
8024
|
getSerializers = _ref.getSerializers,
|
|
8004
8025
|
accountIDs = _ref.accountIDs,
|
|
8005
|
-
Ads = _ref.Ads
|
|
8026
|
+
Ads = _ref.Ads,
|
|
8027
|
+
rootArticle = _ref.rootArticle;
|
|
8006
8028
|
|
|
8007
8029
|
if (!nodes || !nodes.articles) {
|
|
8008
8030
|
return null;
|
|
@@ -8149,7 +8171,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8149
8171
|
|
|
8150
8172
|
var renderAuthorBiography = function renderAuthorBiography(biography) {
|
|
8151
8173
|
if (biography) {
|
|
8152
|
-
return React__default.createElement(BlockContent, _extends
|
|
8174
|
+
return React__default.createElement(BlockContent, _extends({ serializers: getSerializers, blocks: [biography] }, client.config()));
|
|
8153
8175
|
}
|
|
8154
8176
|
};
|
|
8155
8177
|
|
|
@@ -8163,7 +8185,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8163
8185
|
// Change URL and do other changes
|
|
8164
8186
|
var doChanges = function doChanges() {
|
|
8165
8187
|
if (firstLoad) {
|
|
8166
|
-
refreshAD();
|
|
8188
|
+
refreshAD(newPath);
|
|
8167
8189
|
}
|
|
8168
8190
|
window.history.pushState({ page: path }, '', newPath);
|
|
8169
8191
|
document.title = title;
|
|
@@ -8221,7 +8243,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8221
8243
|
useLayoutEffect(function () {
|
|
8222
8244
|
//console.log('useLayoutEffect')
|
|
8223
8245
|
if (!firstLoad) {
|
|
8224
|
-
if (
|
|
8246
|
+
if (main_39) {
|
|
8225
8247
|
grabLoadedAds();
|
|
8226
8248
|
} else {
|
|
8227
8249
|
scrollToArticle();
|
|
@@ -8243,8 +8265,9 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8243
8265
|
var refreshAD = function refreshAD(path) {
|
|
8244
8266
|
//const activeArticle = path
|
|
8245
8267
|
//let targeting = getTargeting({ article: activeArticle, cpModificationRequired, position: props.position, prevUrl })
|
|
8268
|
+
if (pageview) pageview(path);
|
|
8246
8269
|
|
|
8247
|
-
if (!
|
|
8270
|
+
if (!main_39) {
|
|
8248
8271
|
lib_3.getGoogletag().then(function (googletag) {
|
|
8249
8272
|
if (window.googletag && googletag.pubadsReady) {
|
|
8250
8273
|
lib_3.refresh();
|
|
@@ -8252,7 +8275,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8252
8275
|
});
|
|
8253
8276
|
}
|
|
8254
8277
|
//Refresh leaderboard ad on mobile
|
|
8255
|
-
if (
|
|
8278
|
+
if (main_39) {
|
|
8256
8279
|
var leaderboardSlotId = '';
|
|
8257
8280
|
lib_3.getGoogletag().then(function (googletag) {
|
|
8258
8281
|
if (window.googletag && googletag.pubadsReady) {
|
|
@@ -8263,12 +8286,25 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8263
8286
|
};
|
|
8264
8287
|
|
|
8265
8288
|
var handleArrowClick = function handleArrowClick() {
|
|
8289
|
+
var newPath = router.asPath.split('?')[0];
|
|
8290
|
+
var title = nodes.seriesTitle;
|
|
8266
8291
|
isScrollDown = true;
|
|
8267
8292
|
upArrowClicked = true;
|
|
8268
8293
|
arrowRef.current.style.visibility = 'hidden';
|
|
8269
8294
|
window.scrollTo({ top: 0, behavior: 'smooth' });
|
|
8270
|
-
window.history.pushState({}, '',
|
|
8271
|
-
document.title =
|
|
8295
|
+
window.history.pushState({}, '', newPath);
|
|
8296
|
+
document.title = title;
|
|
8297
|
+
|
|
8298
|
+
setCurrentURL(newPath);
|
|
8299
|
+
setCurrentTitle(title);
|
|
8300
|
+
if (rootArticle) {
|
|
8301
|
+
setCurrentSummary(rootArticle.summary ? rootArticle.summary : '');
|
|
8302
|
+
setCurrentThumbnail(urlFor(rootArticle.thumbnail.asset).url());
|
|
8303
|
+
} else {
|
|
8304
|
+
setCurrentSummary('');
|
|
8305
|
+
setCurrentThumbnail('');
|
|
8306
|
+
}
|
|
8307
|
+
refreshAD(newPath);
|
|
8272
8308
|
};
|
|
8273
8309
|
|
|
8274
8310
|
return React__default.createElement(
|
|
@@ -8276,10 +8312,10 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8276
8312
|
null,
|
|
8277
8313
|
React__default.createElement(
|
|
8278
8314
|
'div',
|
|
8279
|
-
{ ref: arrowRef, className: 'scrollToTopArrow',
|
|
8315
|
+
{ ref: arrowRef, className: 'scrollToTopArrow' },
|
|
8316
|
+
React__default.createElement(IoIosArrowDropupCircle, { style: { cursor: 'pointer' }, onClick: function onClick() {
|
|
8280
8317
|
return handleArrowClick();
|
|
8281
|
-
} }
|
|
8282
|
-
React__default.createElement(IoIosArrowDropupCircle, null)
|
|
8318
|
+
} })
|
|
8283
8319
|
),
|
|
8284
8320
|
React__default.createElement('hr', { className: 'article-seperater my-4' }),
|
|
8285
8321
|
React__default.createElement(
|
|
@@ -8300,7 +8336,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8300
8336
|
React__default.createElement(
|
|
8301
8337
|
'div',
|
|
8302
8338
|
{ className: 'ad-box', style: { textAlign: 'center' } },
|
|
8303
|
-
|
|
8339
|
+
main_39 && Ads.map(function (ad, index) {
|
|
8304
8340
|
if (index === 0) {
|
|
8305
8341
|
return React__default.createElement(
|
|
8306
8342
|
'div',
|
|
@@ -8390,7 +8426,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8390
8426
|
React__default.createElement(
|
|
8391
8427
|
'div',
|
|
8392
8428
|
{ className: 'mt-2 mb-2' },
|
|
8393
|
-
React__default.createElement(BlockContent, _extends
|
|
8429
|
+
React__default.createElement(BlockContent, _extends({
|
|
8394
8430
|
serializers: getSerializers,
|
|
8395
8431
|
videoAccountIDs: accountIDs,
|
|
8396
8432
|
blocks: article.text,
|
|
@@ -8421,7 +8457,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8421
8457
|
React__default.createElement(
|
|
8422
8458
|
'div',
|
|
8423
8459
|
{ className: 'ad-box', style: { textAlign: 'center' } },
|
|
8424
|
-
|
|
8460
|
+
main_39 && Articles.length - 1 !== index && Ads.map(function (ad, innerIndex) {
|
|
8425
8461
|
if (innerIndex === 0) {
|
|
8426
8462
|
return React__default.createElement(
|
|
8427
8463
|
'div',
|
|
@@ -8449,7 +8485,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8449
8485
|
React__default.createElement(
|
|
8450
8486
|
'style',
|
|
8451
8487
|
{ jsx: 'true' },
|
|
8452
|
-
'\n .scrollToTopArrow {\n position: fixed;\n top: 150px;\n display: flex;\n justify-content: center;\n width: ' + contentWidth + 'px;\n opacity: 1;\n z-index: 99999999999;\n
|
|
8488
|
+
'\n .scrollToTopArrow {\n position: fixed;\n top: 150px;\n display: flex;\n justify-content: center;\n width: ' + contentWidth + 'px;\n opacity: 1;\n z-index: 99999999999;\n visibility: hidden;\n }\n .scrollToTopArrow > svg {\n min-height: 50px;\n min-width: 50px;\n max-height: 50px;\n max-width: 50px;\n }\n .block-content > div p {\n padding: 0;\n }\n\n h2.article-title {\n padding: 0;\n font-weight: 500;\n }\n h4.article-title {\n padding: 0;\n font-weight: 500;\n }\n h4.prevNext-title {\n padding: 0;\n font-size: 1rem;\n font-weight: 500;\n }\n .article-wrapper {\n border: 1px solid #252525;\n border-radius: 5px;\n padding: 1rem 1rem 0 1rem;\n margin-bottom: 1rem;\n }\n .prevNext-reading {\n margin-top: -10px;\n width: 75%;\n text-align: center;\n background: white;\n border: 1px solid #252525;\n align-self: center;\n display: none;\n }\n .showReading {\n display: block;\n }\n .author-details-wrapper a {\n color: #252525;\n }\n .objective-prevNext-Wrapper {\n display: flex;\n flex-direction: column;\n justify-content: center;\n }\n .objective-title {\n padding: 0 !important;\n }\n .prevNext-thumbnail {\n display: flex;\n flex-direction: column;\n min-width: 225px;\n max-width: 225px;\n overflow: hidden;\n align-items: center;\n object-fit: contain;\n border-radius: 15px;\n }\n .prevNext-thumbnail img {\n height: 125px;\n object-fit: contain;\n border-radius: 15px;\n }\n .prevNext-summary {\n text-align: center;\n }\n .prevNext-publishDate {\n font-size: 0.75rem;\n margin-top: 0.5rem;\n }\n .prevNext-title {\n padding: 0 !important;\n line-height: 1 !important;\n font-weight: 500;\n }\n .prevNextWrapper {\n display: flex;\n flex-direction: row;\n justify-content: space-evenly;\n flex-wrap: wrap;\n }\n .prevNextWrapper a {\n display: flex;\n flex-direction: column;\n color: #252525;\n align-items: center;\n }\n .prevNextCards {\n max-width: 250px;\n margin-bottom: 1rem;\n }\n @media only screen and (max-width: 568px) {\n .prevNextWrapper {\n flex-direction: column;\n align-items: center;\n }\n .prevNextCards {\n margin-bottom: 2rem;\n }\n }\n @media only screen and (max-width: 568px) {\n }\n '
|
|
8453
8489
|
)
|
|
8454
8490
|
)
|
|
8455
8491
|
);
|
|
@@ -8673,7 +8709,7 @@ var MultiFigure = function MultiFigure(props) {
|
|
|
8673
8709
|
{ xs: 12, md: 12 / images.length, key: index },
|
|
8674
8710
|
image.link ? React__default.createElement(
|
|
8675
8711
|
'a',
|
|
8676
|
-
_extends
|
|
8712
|
+
_extends({}, image.link && { href: image.link, target: image.blank ? '_blank' : '_self' }, { style: { cursor: image.link ? 'pointer' : 'default' } }),
|
|
8677
8713
|
React__default.createElement(
|
|
8678
8714
|
'div',
|
|
8679
8715
|
{ className: 'multi-figure-image-container' },
|
|
@@ -8803,7 +8839,8 @@ var getSerializers = function getSerializers() {
|
|
|
8803
8839
|
contextualADFlag = _props$2 === undefined ? false : _props$2,
|
|
8804
8840
|
articleId = props[9],
|
|
8805
8841
|
Ads = props[10],
|
|
8806
|
-
targeting = props[11]
|
|
8842
|
+
targeting = props[11],
|
|
8843
|
+
article = props[12];
|
|
8807
8844
|
|
|
8808
8845
|
return {
|
|
8809
8846
|
types: {
|
|
@@ -8825,7 +8862,7 @@ var getSerializers = function getSerializers() {
|
|
|
8825
8862
|
articleSeries: function articleSeries(_ref3) {
|
|
8826
8863
|
var node = _ref3.node;
|
|
8827
8864
|
|
|
8828
|
-
return React__default.createElement(ArticleSeries, { nodes: node, accountIDs: videoAccountIDs || {}, client: client, getSerializers: getSerializers.apply(undefined, props), Ads: Ads || null });
|
|
8865
|
+
return React__default.createElement(ArticleSeries, { nodes: node, accountIDs: videoAccountIDs || {}, pageview: pageview, client: client, getSerializers: getSerializers.apply(undefined, props), Ads: Ads || null, rootArticle: article || null });
|
|
8829
8866
|
},
|
|
8830
8867
|
figure: function figure(_ref4) {
|
|
8831
8868
|
var node = _ref4.node;
|