@mjhls/mjh-framework 1.0.240 → 1.0.241

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.
Files changed (40) hide show
  1. package/README.md +174 -174
  2. package/dist/cjs/DeckContent.js +9 -9
  3. package/dist/cjs/DeckQueue.js +1 -1
  4. package/dist/cjs/{GridContent-f9e3fff5.js → GridContent-463c504f.js} +2 -2
  5. package/dist/cjs/GridContent.js +2 -2
  6. package/dist/cjs/IssueContentDeck.js +1 -1
  7. package/dist/cjs/IssueDeck.js +1 -1
  8. package/dist/cjs/MasterDeck.js +9 -9
  9. package/dist/cjs/{Normal-0497eb61.js → Normal-0f06cc52.js} +29 -29
  10. package/dist/cjs/PublicationDeck.js +1 -1
  11. package/dist/cjs/QueueDeckExpanded.js +1 -1
  12. package/dist/cjs/{TaxonomyCard-b5074d6e.js → TaxonomyCard-e3566492.js} +1 -1
  13. package/dist/cjs/TaxonomyCard.js +2 -2
  14. package/dist/cjs/TemplateNormal.js +1 -1
  15. package/dist/cjs/ThumbnailCard.js +1 -1
  16. package/dist/cjs/VideoSeriesListing.js +1 -1
  17. package/dist/cjs/{YoutubeGroup-fd44f8a0.js → YoutubeGroup-5f480446.js} +4 -4
  18. package/dist/cjs/YoutubeGroup.js +1 -1
  19. package/dist/cjs/{index-39beccb3.js → index-be0c82be.js} +1 -2
  20. package/dist/cjs/index.js +728 -768
  21. package/dist/esm/DeckContent.js +9 -9
  22. package/dist/esm/DeckQueue.js +1 -1
  23. package/dist/esm/{GridContent-d4f5457e.js → GridContent-2a48fb19.js} +1 -1
  24. package/dist/esm/GridContent.js +2 -2
  25. package/dist/esm/IssueContentDeck.js +1 -1
  26. package/dist/esm/IssueDeck.js +1 -1
  27. package/dist/esm/MasterDeck.js +9 -9
  28. package/dist/esm/{Normal-e1855047.js → Normal-aa76b53c.js} +29 -29
  29. package/dist/esm/PublicationDeck.js +1 -1
  30. package/dist/esm/QueueDeckExpanded.js +1 -1
  31. package/dist/esm/{TaxonomyCard-ee1a22ae.js → TaxonomyCard-2d0ab635.js} +1 -1
  32. package/dist/esm/TaxonomyCard.js +2 -2
  33. package/dist/esm/TemplateNormal.js +1 -1
  34. package/dist/esm/ThumbnailCard.js +1 -1
  35. package/dist/esm/VideoSeriesListing.js +1 -1
  36. package/dist/esm/{YoutubeGroup-1b3eca73.js → YoutubeGroup-78d93d44.js} +4 -4
  37. package/dist/esm/YoutubeGroup.js +1 -1
  38. package/dist/esm/{index-3849e3fe.js → index-73819142.js} +1 -2
  39. package/dist/esm/index.js +732 -772
  40. package/package.json +103 -102
package/dist/cjs/index.js CHANGED
@@ -26,7 +26,7 @@ var Link = _interopDefault(require('next/link'));
26
26
  var Router = require('next/router');
27
27
  var Router__default = _interopDefault(Router);
28
28
  require('react-dom');
29
- var index$1 = require('./index-39beccb3.js');
29
+ var index$1 = require('./index-be0c82be.js');
30
30
  require('./index-fa0fb52c.js');
31
31
  var entities = require('./entities-310b46ee.js');
32
32
  var slicedToArray = require('./slicedToArray-e38fb29d.js');
@@ -34,13 +34,13 @@ var AdSlot = require('./AdSlot-c472fff6.js');
34
34
  require('./promise-b96c61f8.js');
35
35
  var DeckContent = require('./DeckContent.js');
36
36
  require('./get-1f91592f.js');
37
- var GridContent = require('./GridContent-f9e3fff5.js');
37
+ var GridContent = require('./GridContent-463c504f.js');
38
38
  var DeckQueue = require('./DeckQueue.js');
39
39
  require('react-bootstrap/Media');
40
40
  var ThumbnailCard = require('./ThumbnailCard.js');
41
- var TaxonomyCard = require('./TaxonomyCard-b5074d6e.js');
41
+ var TaxonomyCard = require('./TaxonomyCard-e3566492.js');
42
42
  var GroupDeck = require('./GroupDeck.js');
43
- var YoutubeGroup = require('./YoutubeGroup-fd44f8a0.js');
43
+ var YoutubeGroup = require('./YoutubeGroup-5f480446.js');
44
44
  var reactBootstrap = require('react-bootstrap');
45
45
  var QueueDeckExpanded = require('./QueueDeckExpanded.js');
46
46
  var index_esm = require('./index.esm-340d3792.js');
@@ -52,7 +52,7 @@ var IssueDeck = require('./IssueDeck.js');
52
52
  require('react-bootstrap/Badge');
53
53
  var IssueContentDeck = require('./IssueContentDeck.js');
54
54
  var Spinner = _interopDefault(require('react-bootstrap/Spinner'));
55
- var TemplateNormal = require('./Normal-0497eb61.js');
55
+ var TemplateNormal = require('./Normal-0f06cc52.js');
56
56
  require('react-bootstrap/ListGroup');
57
57
  var Head = _interopDefault(require('next/head'));
58
58
  var Accordion = _interopDefault(require('react-bootstrap/Accordion'));
@@ -1636,10 +1636,166 @@ var moment = module.exports = momentTimezone;
1636
1636
  moment.tz.load(require$$1);
1637
1637
  });
1638
1638
 
1639
+ var js_cookie = _commonjsHelpers.createCommonjsModule(function (module, exports) {
1640
+ (function (factory) {
1641
+ var registeredInModuleLoader;
1642
+ {
1643
+ module.exports = factory();
1644
+ registeredInModuleLoader = true;
1645
+ }
1646
+ if (!registeredInModuleLoader) {
1647
+ var OldCookies = window.Cookies;
1648
+ var api = window.Cookies = factory();
1649
+ api.noConflict = function () {
1650
+ window.Cookies = OldCookies;
1651
+ return api;
1652
+ };
1653
+ }
1654
+ }(function () {
1655
+ function extend () {
1656
+ var i = 0;
1657
+ var result = {};
1658
+ for (; i < arguments.length; i++) {
1659
+ var attributes = arguments[ i ];
1660
+ for (var key in attributes) {
1661
+ result[key] = attributes[key];
1662
+ }
1663
+ }
1664
+ return result;
1665
+ }
1666
+
1667
+ function decode (s) {
1668
+ return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);
1669
+ }
1670
+
1671
+ function init (converter) {
1672
+ function api() {}
1673
+
1674
+ function set (key, value, attributes) {
1675
+ if (typeof document === 'undefined') {
1676
+ return;
1677
+ }
1678
+
1679
+ attributes = extend({
1680
+ path: '/'
1681
+ }, api.defaults, attributes);
1682
+
1683
+ if (typeof attributes.expires === 'number') {
1684
+ attributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5);
1685
+ }
1686
+
1687
+ // We're using "expires" because "max-age" is not supported by IE
1688
+ attributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';
1689
+
1690
+ try {
1691
+ var result = JSON.stringify(value);
1692
+ if (/^[\{\[]/.test(result)) {
1693
+ value = result;
1694
+ }
1695
+ } catch (e) {}
1696
+
1697
+ value = converter.write ?
1698
+ converter.write(value, key) :
1699
+ encodeURIComponent(String(value))
1700
+ .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
1701
+
1702
+ key = encodeURIComponent(String(key))
1703
+ .replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)
1704
+ .replace(/[\(\)]/g, escape);
1705
+
1706
+ var stringifiedAttributes = '';
1707
+ for (var attributeName in attributes) {
1708
+ if (!attributes[attributeName]) {
1709
+ continue;
1710
+ }
1711
+ stringifiedAttributes += '; ' + attributeName;
1712
+ if (attributes[attributeName] === true) {
1713
+ continue;
1714
+ }
1715
+
1716
+ // Considers RFC 6265 section 5.2:
1717
+ // ...
1718
+ // 3. If the remaining unparsed-attributes contains a %x3B (";")
1719
+ // character:
1720
+ // Consume the characters of the unparsed-attributes up to,
1721
+ // not including, the first %x3B (";") character.
1722
+ // ...
1723
+ stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
1724
+ }
1725
+
1726
+ return (document.cookie = key + '=' + value + stringifiedAttributes);
1727
+ }
1728
+
1729
+ function get (key, json) {
1730
+ if (typeof document === 'undefined') {
1731
+ return;
1732
+ }
1733
+
1734
+ var jar = {};
1735
+ // To prevent the for loop in the first place assign an empty array
1736
+ // in case there are no cookies at all.
1737
+ var cookies = document.cookie ? document.cookie.split('; ') : [];
1738
+ var i = 0;
1739
+
1740
+ for (; i < cookies.length; i++) {
1741
+ var parts = cookies[i].split('=');
1742
+ var cookie = parts.slice(1).join('=');
1743
+
1744
+ if (!json && cookie.charAt(0) === '"') {
1745
+ cookie = cookie.slice(1, -1);
1746
+ }
1747
+
1748
+ try {
1749
+ var name = decode(parts[0]);
1750
+ cookie = (converter.read || converter)(cookie, name) ||
1751
+ decode(cookie);
1752
+
1753
+ if (json) {
1754
+ try {
1755
+ cookie = JSON.parse(cookie);
1756
+ } catch (e) {}
1757
+ }
1758
+
1759
+ jar[name] = cookie;
1760
+
1761
+ if (key === name) {
1762
+ break;
1763
+ }
1764
+ } catch (e) {}
1765
+ }
1766
+
1767
+ return key ? jar[key] : jar;
1768
+ }
1769
+
1770
+ api.set = set;
1771
+ api.get = function (key) {
1772
+ return get(key, false /* read as raw */);
1773
+ };
1774
+ api.getJSON = function (key) {
1775
+ return get(key, true /* read as json */);
1776
+ };
1777
+ api.remove = function (key, attributes) {
1778
+ set(key, '', extend(attributes, {
1779
+ expires: -1
1780
+ }));
1781
+ };
1782
+
1783
+ api.defaults = {};
1784
+
1785
+ api.withConverter = init;
1786
+
1787
+ return api;
1788
+ }
1789
+
1790
+ return init(function () {});
1791
+ }));
1792
+ });
1793
+
1639
1794
  var clientId = process.env.CVENT_CLIENT_ID;
1640
1795
  var clientSecret = process.env.CVENT_CLIENT_SECRET;
1641
1796
  var corsProxy = 'https://cors-anywhere.herokuapp.com/';
1642
1797
  var currentTime = momentTimezone$1().toISOString();
1798
+ var itemsPerPage = 10;
1643
1799
 
1644
1800
  var EventsDeck = function EventsDeck(_ref) {
1645
1801
  var _ref$autoScroll = _ref.autoScroll,
@@ -1670,8 +1826,8 @@ var EventsDeck = function EventsDeck(_ref) {
1670
1826
 
1671
1827
  var _useState7 = React.useState(null),
1672
1828
  _useState8 = slicedToArray._slicedToArray(_useState7, 2),
1673
- nextPagingToken = _useState8[0],
1674
- setNextPagingToken = _useState8[1];
1829
+ nextPageLink = _useState8[0],
1830
+ setNextPageLink = _useState8[1];
1675
1831
 
1676
1832
  var _useState9 = React.useState(true),
1677
1833
  _useState10 = slicedToArray._slicedToArray(_useState9, 2),
@@ -1680,17 +1836,14 @@ var EventsDeck = function EventsDeck(_ref) {
1680
1836
 
1681
1837
  var _useState11 = React.useState(1),
1682
1838
  _useState12 = slicedToArray._slicedToArray(_useState11, 2),
1683
- page = _useState12[0],
1684
- setPage = _useState12[1];
1839
+ currentPage = _useState12[0],
1840
+ setCurrentPage = _useState12[1];
1841
+
1842
+ var currentPageRef = React.useRef(currentPage);
1685
1843
 
1686
- var _useState13 = React.useState(1),
1687
- _useState14 = slicedToArray._slicedToArray(_useState13, 2),
1688
- currentPage = _useState14[0],
1689
- setCurrentPage = _useState14[1];
1844
+ var getEvents = function getEvents(params) {
1845
+ var url = params.url;
1690
1846
 
1691
- var getEvents = function getEvents() {
1692
- var itemsPerPage = 10;
1693
- var url = corsProxy + 'https://api-platform.cvent.com/event/v1/events/filter?limit=' + itemsPerPage;
1694
1847
  fetch(url, {
1695
1848
  headers: {
1696
1849
  Accept: 'application/json',
@@ -1703,18 +1856,17 @@ var EventsDeck = function EventsDeck(_ref) {
1703
1856
  return response.json();
1704
1857
  }).then(function (events) {
1705
1858
  setIsLoading(false);
1706
- var newData = events.data.map(function (item) {
1707
- return _extends$2._extends({}, item, {
1708
- pageNumber: page
1859
+ if (events.data && events.data.length > 0) {
1860
+ var newData = events.data.map(function (item) {
1861
+ return _extends$2._extends({}, item, {
1862
+ pageNumber: currentPage
1863
+ });
1709
1864
  });
1710
- });
1711
- console.log(events.paging);
1712
- if (newData.length > 0) {
1713
1865
  setData(function (prevData) {
1714
1866
  return [].concat(toConsumableArray._toConsumableArray(prevData), toConsumableArray._toConsumableArray(newData));
1715
1867
  });
1716
- setNextPagingToken(events.paging.nextToken ? events.paging.nextToken : null);
1717
- setScrolling(true);
1868
+ setNextPageLink(events.paging._links.next ? events.paging._links.next.href : null);
1869
+ newData.length === itemsPerPage ? setScrolling(true) : setScrolling(false);
1718
1870
  } else {
1719
1871
  setScrolling(false);
1720
1872
  }
@@ -1723,83 +1875,59 @@ var EventsDeck = function EventsDeck(_ref) {
1723
1875
 
1724
1876
  React.useEffect(function () {
1725
1877
  // load initial data
1726
- if (accessToken && page === 1 && currentPage === 1) {
1727
- getEvents();
1878
+ if (accessToken && currentPage === 1) {
1879
+ var initailUrl = 'https://api-platform.cvent.com/event/v1/events/filter?limit=' + itemsPerPage;
1880
+ getEvents({ url: initailUrl });
1728
1881
  }
1729
- }, [accessToken, filter, page, currentPage]);
1882
+ }, [accessToken, currentPage, filter]);
1883
+
1884
+ React.useEffect(function () {
1885
+ // load more events
1886
+ if (accessToken && nextPageLink && currentPage !== 1 && currentPage !== currentPageRef.current) {
1887
+ getEvents({ url: nextPageLink });
1888
+ }
1889
+ }, [currentPage]);
1730
1890
 
1731
1891
  React.useEffect(function () {
1732
1892
  // reset state when filter changes
1733
1893
  setIsLoading(true);
1734
1894
  setData([]);
1735
- setPage(1);
1736
1895
  setCurrentPage(1);
1896
+ currentPageRef.current = 1;
1737
1897
  }, [filter]);
1738
1898
 
1739
1899
  React.useEffect(function () {
1740
1900
  // get access token
1741
- var encodedData = window.btoa(clientId + ':' + clientSecret);
1742
- var url = corsProxy + 'https://api-platform.cvent.com/ea/oauth2/token';
1743
- fetch(url, {
1744
- headers: {
1745
- 'Content-Type': 'application/x-www-form-urlencoded',
1746
- Authorization: 'Basic ' + encodedData
1747
- },
1748
- method: 'POST',
1749
- body: 'grant_type=client_credentials&client_id=' + clientId
1750
- }).then(function (response) {
1751
- return response.json();
1752
- }).then(function (json) {
1753
- return setAccessToken(json.access_token);
1754
- }).catch(function (e) {
1755
- return console.log(e);
1756
- });
1757
- }, []);
1758
-
1759
- var loadMore = debounce.debounce_1(function () {
1760
- setPage(function (prevPage) {
1761
- return prevPage + 1;
1762
- });
1763
- }, 0);
1764
-
1765
- React.useEffect(function () {
1766
- // load more events
1767
- page !== 1 && page !== currentPage && loadMoreEvents();
1768
- }, [page]);
1769
-
1770
- var loadMoreEvents = function loadMoreEvents() {
1771
- console.log(nextPagingToken, 'nextPagingToken');
1772
- if (nextPagingToken) {
1773
- var url = corsProxy + 'https://api-platform.cvent.com/event/v1/events/filter?token=' + nextPagingToken;
1901
+ var cventAccessToken = js_cookie.get('cvent_access_token');
1902
+ if (cventAccessToken) {
1903
+ setAccessToken(cventAccessToken);
1904
+ } else {
1905
+ var encodedData = window.btoa(clientId + ':' + clientSecret);
1906
+ var url = corsProxy + 'https://api-platform.cvent.com/ea/oauth2/token';
1774
1907
  fetch(url, {
1775
1908
  headers: {
1776
- Accept: 'application/json',
1777
- 'x-api-key': clientId,
1778
- Authorization: 'Bearer ' + accessToken
1909
+ 'Content-Type': 'application/x-www-form-urlencoded',
1910
+ Authorization: 'Basic ' + encodedData
1779
1911
  },
1780
- body: AdSlot._JSON$stringify({ filter: filter }),
1781
- method: 'POST'
1912
+ method: 'POST',
1913
+ body: 'grant_type=client_credentials&client_id=' + clientId
1782
1914
  }).then(function (response) {
1783
1915
  return response.json();
1784
- }).then(function (events) {
1785
- var newData = events.data.map(function (item) {
1786
- return _extends$2._extends({}, item, {
1787
- pageNumber: page
1788
- });
1789
- });
1790
- console.log(events.paging);
1791
- if (newData.length > 0) {
1792
- setData(function (prevData) {
1793
- return [].concat(toConsumableArray._toConsumableArray(prevData), toConsumableArray._toConsumableArray(newData));
1794
- });
1795
- setNextPagingToken(events.paging.nextToken ? events.paging.nextToken : null);
1796
- setScrolling(true);
1797
- } else {
1798
- setScrolling(false);
1799
- }
1916
+ }).then(function (json) {
1917
+ var inOneHour = new Date(new Date().getTime() + 60 * 60 * 1000);
1918
+ js_cookie.set('cvent_access_token', json.access_token, { expires: inOneHour });
1919
+ setAccessToken(json.access_token);
1920
+ }).catch(function (e) {
1921
+ return console.log(e);
1800
1922
  });
1801
1923
  }
1802
- };
1924
+ }, []);
1925
+
1926
+ var loadMore = debounce.debounce_1(function () {
1927
+ setCurrentPage(function (prevCurrentPage) {
1928
+ return prevCurrentPage + 1;
1929
+ });
1930
+ }, 0);
1803
1931
 
1804
1932
  var changePageNumber = function changePageNumber(pageNumber) {
1805
1933
  if (seoPaginate) {
@@ -1807,7 +1935,6 @@ var EventsDeck = function EventsDeck(_ref) {
1807
1935
  var qrIndex = path.indexOf('?');
1808
1936
  var pathname = router.pathname;
1809
1937
  var queryString = '';
1810
-
1811
1938
  if (qrIndex > 0) {
1812
1939
  path = path.substring(1, qrIndex);
1813
1940
 
@@ -1832,10 +1959,10 @@ var EventsDeck = function EventsDeck(_ref) {
1832
1959
 
1833
1960
  pageNumber = parseInt(pageNumber);
1834
1961
 
1835
- if (currentPage !== pageNumber) {
1962
+ if (pageNumber !== currentPageRef.current) {
1836
1963
  index.lib_3.refresh();
1837
1964
 
1838
- setCurrentPage(pageNumber);
1965
+ currentPageRef.current = pageNumber;
1839
1966
  if (path[0] !== '/') {
1840
1967
  path = '/' + path;
1841
1968
  }
@@ -2080,7 +2207,7 @@ var EventsDeck = function EventsDeck(_ref) {
2080
2207
  };
2081
2208
 
2082
2209
  var corsProxy$1 = 'https://cors-anywhere.herokuapp.com/';
2083
- var itemsPerPage = 10;
2210
+ var itemsPerPage$1 = 10;
2084
2211
 
2085
2212
  var CMEDeck = function CMEDeck(_ref) {
2086
2213
  var getData = function () {
@@ -2132,7 +2259,7 @@ var CMEDeck = function CMEDeck(_ref) {
2132
2259
  });
2133
2260
 
2134
2261
  setIsLoading(false);
2135
- newData.length === itemsPerPage ? setScrolling(true) : setScrolling(false);
2262
+ newData.length === itemsPerPage$1 ? setScrolling(true) : setScrolling(false);
2136
2263
  setData(function (prevData) {
2137
2264
  return [].concat(toConsumableArray._toConsumableArray(prevData), toConsumableArray._toConsumableArray(newData));
2138
2265
  });
@@ -2192,7 +2319,7 @@ var CMEDeck = function CMEDeck(_ref) {
2192
2319
  data = _useState8[0],
2193
2320
  setData = _useState8[1];
2194
2321
 
2195
- var _useState9 = React.useState(router && router.query && router.query.page ? (parseInt(router.query.page) - 1) * itemsPerPage : 0),
2322
+ var _useState9 = React.useState(router && router.query && router.query.page ? (parseInt(router.query.page) - 1) * itemsPerPage$1 : 0),
2196
2323
  _useState10 = slicedToArray._slicedToArray(_useState9, 2),
2197
2324
  from = _useState10[0],
2198
2325
  setFrom = _useState10[1];
@@ -2202,7 +2329,7 @@ var CMEDeck = function CMEDeck(_ref) {
2202
2329
 
2203
2330
  React.useEffect(function () {
2204
2331
  // load initial data
2205
- getData({ from: from, limit: itemsPerPage });
2332
+ getData({ from: from, limit: itemsPerPage$1 });
2206
2333
  }, []);
2207
2334
 
2208
2335
  var changePageNumber = function changePageNumber(pageNumber) {
@@ -2257,7 +2384,7 @@ var CMEDeck = function CMEDeck(_ref) {
2257
2384
 
2258
2385
  var loadMore = debounce.debounce_1(function () {
2259
2386
  setFrom(function (prevFrom) {
2260
- return prevFrom + itemsPerPage;
2387
+ return prevFrom + itemsPerPage$1;
2261
2388
  });
2262
2389
  setCurrentPage(function (prevCurrentPage) {
2263
2390
  return prevCurrentPage + 1;
@@ -2267,7 +2394,7 @@ var CMEDeck = function CMEDeck(_ref) {
2267
2394
  React.useEffect(function () {
2268
2395
  if (currentPageRef.current !== currentPage && fromeRef.current !== from) {
2269
2396
  fromeRef.current = from;
2270
- getData({ from: from, limit: itemsPerPage });
2397
+ getData({ from: from, limit: itemsPerPage$1 });
2271
2398
  }
2272
2399
  }, [currentPage]);
2273
2400
 
@@ -2919,18 +3046,21 @@ var Slideshow = function Slideshow(_ref) {
2919
3046
  );
2920
3047
  };
2921
3048
 
2922
- // do not edit .js files directly - edit src/index.jst
2923
-
2924
-
3049
+ var isArray = Array.isArray;
3050
+ var keyList = Object.keys;
3051
+ var hasProp = Object.prototype.hasOwnProperty;
2925
3052
 
2926
3053
  var fastDeepEqual = function equal(a, b) {
2927
3054
  if (a === b) return true;
2928
3055
 
2929
3056
  if (a && b && typeof a == 'object' && typeof b == 'object') {
2930
- if (a.constructor !== b.constructor) return false;
3057
+ var arrA = isArray(a)
3058
+ , arrB = isArray(b)
3059
+ , i
3060
+ , length
3061
+ , key;
2931
3062
 
2932
- var length, i, keys;
2933
- if (Array.isArray(a)) {
3063
+ if (arrA && arrB) {
2934
3064
  length = a.length;
2935
3065
  if (length != b.length) return false;
2936
3066
  for (i = length; i-- !== 0;)
@@ -2938,29 +3068,35 @@ var fastDeepEqual = function equal(a, b) {
2938
3068
  return true;
2939
3069
  }
2940
3070
 
3071
+ if (arrA != arrB) return false;
2941
3072
 
3073
+ var dateA = a instanceof Date
3074
+ , dateB = b instanceof Date;
3075
+ if (dateA != dateB) return false;
3076
+ if (dateA && dateB) return a.getTime() == b.getTime();
2942
3077
 
2943
- if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
2944
- if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
2945
- if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
3078
+ var regexpA = a instanceof RegExp
3079
+ , regexpB = b instanceof RegExp;
3080
+ if (regexpA != regexpB) return false;
3081
+ if (regexpA && regexpB) return a.toString() == b.toString();
2946
3082
 
2947
- keys = Object.keys(a);
3083
+ var keys = keyList(a);
2948
3084
  length = keys.length;
2949
- if (length !== Object.keys(b).length) return false;
3085
+
3086
+ if (length !== keyList(b).length)
3087
+ return false;
2950
3088
 
2951
3089
  for (i = length; i-- !== 0;)
2952
- if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
3090
+ if (!hasProp.call(b, keys[i])) return false;
2953
3091
 
2954
3092
  for (i = length; i-- !== 0;) {
2955
- var key = keys[i];
2956
-
3093
+ key = keys[i];
2957
3094
  if (!equal(a[key], b[key])) return false;
2958
3095
  }
2959
3096
 
2960
3097
  return true;
2961
3098
  }
2962
3099
 
2963
- // true if both NaN, false otherwise
2964
3100
  return a!==a && b!==b;
2965
3101
  };
2966
3102
 
@@ -3983,7 +4119,7 @@ function formatValue(ctx, value, recurseTimes) {
3983
4119
  var base = '', array = false, braces = ['{', '}'];
3984
4120
 
3985
4121
  // Make Array say that they are Array
3986
- if (isArray(value)) {
4122
+ if (isArray$1(value)) {
3987
4123
  array = true;
3988
4124
  braces = ['[', ']'];
3989
4125
  }
@@ -4162,7 +4298,7 @@ function reduceToSingleString(output, base, braces) {
4162
4298
 
4163
4299
  // NOTE: These type checking functions intentionally don't use `instanceof`
4164
4300
  // because it is fragile and can be easily faked with `Object.create()`.
4165
- function isArray(ar) {
4301
+ function isArray$1(ar) {
4166
4302
  return Array.isArray(ar);
4167
4303
  }
4168
4304
 
@@ -4289,7 +4425,7 @@ var util = {
4289
4425
  isNullOrUndefined: isNullOrUndefined,
4290
4426
  isNull: isNull,
4291
4427
  isBoolean: isBoolean,
4292
- isArray: isArray,
4428
+ isArray: isArray$1,
4293
4429
  inspect: inspect,
4294
4430
  deprecate: deprecate,
4295
4431
  format: format,
@@ -4956,235 +5092,199 @@ module.exports = exports['default'];
4956
5092
 
4957
5093
  var youTubePlayer = _commonjsHelpers.unwrapExports(dist);
4958
5094
 
4959
- 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); }
5095
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
4960
5096
 
4961
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5097
+ 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; };
4962
5098
 
4963
- 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); } }
4964
-
4965
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
4966
-
4967
- 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); }; }
4968
-
4969
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
4970
-
4971
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
4972
-
4973
- 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; } }
4974
-
4975
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
4976
-
4977
- 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); }
5099
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4978
5100
 
4979
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
5101
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
4980
5102
 
4981
- 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; }
5103
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
4982
5104
 
4983
- 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; }
4984
-
4985
- 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; }
4986
- /**
4987
- * Check whether a `props` change should result in the video being updated.
4988
- *
4989
- * @param {Object} prevProps
4990
- * @param {Object} props
5105
+ /**
5106
+ * Check whether a `props` change should result in the video being updated.
5107
+ *
5108
+ * @param {Object} prevProps
5109
+ * @param {Object} props
4991
5110
  */
4992
-
4993
5111
  function shouldUpdateVideo(prevProps, props) {
4994
5112
  // A changing video should always trigger an update
4995
5113
  if (prevProps.videoId !== props.videoId) {
4996
5114
  return true;
4997
- } // Otherwise, a change in the start/end time playerVars also requires a player
4998
- // update.
4999
-
5115
+ }
5000
5116
 
5117
+ // Otherwise, a change in the start/end time playerVars also requires a player
5118
+ // update.
5001
5119
  var prevVars = prevProps.opts.playerVars || {};
5002
5120
  var vars = props.opts.playerVars || {};
5121
+
5003
5122
  return prevVars.start !== vars.start || prevVars.end !== vars.end;
5004
5123
  }
5005
- /**
5006
- * Neutralize API options that only require a video update, leaving only options
5007
- * that require a player reset. The results can then be compared to see if a
5008
- * player reset is necessary.
5009
- *
5010
- * @param {Object} opts
5011
- */
5012
-
5013
5124
 
5125
+ /**
5126
+ * Neutralise API options that only require a video update, leaving only options
5127
+ * that require a player reset. The results can then be compared to see if a
5128
+ * player reset is necessary.
5129
+ *
5130
+ * @param {Object} opts
5131
+ */
5014
5132
  function filterResetOptions(opts) {
5015
- return _objectSpread({}, opts, {
5016
- playerVars: _objectSpread({}, opts.playerVars, {
5133
+ return _extends({}, opts, {
5134
+ playerVars: _extends({}, opts.playerVars, {
5017
5135
  autoplay: 0,
5018
5136
  start: 0,
5019
5137
  end: 0
5020
5138
  })
5021
5139
  });
5022
5140
  }
5023
- /**
5024
- * Check whether a `props` change should result in the player being reset.
5025
- * The player is reset when the `props.opts` change, except if the only change
5026
- * is in the `start` and `end` playerVars, because a video update can deal with
5027
- * those.
5028
- *
5029
- * @param {Object} prevProps
5030
- * @param {Object} props
5031
- */
5032
-
5033
5141
 
5142
+ /**
5143
+ * Check whether a `props` change should result in the player being reset.
5144
+ * The player is reset when the `props.opts` change, except if the only change
5145
+ * is in the `start` and `end` playerVars, because a video update can deal with
5146
+ * those.
5147
+ *
5148
+ * @param {Object} prevProps
5149
+ * @param {Object} props
5150
+ */
5034
5151
  function shouldResetPlayer(prevProps, props) {
5035
5152
  return !fastDeepEqual(filterResetOptions(prevProps.opts), filterResetOptions(props.opts));
5036
5153
  }
5037
- /**
5038
- * Check whether a props change should result in an id or className update.
5039
- *
5040
- * @param {Object} prevProps
5041
- * @param {Object} props
5042
- */
5043
-
5044
5154
 
5155
+ /**
5156
+ * Check whether a props change should result in an id or className update.
5157
+ *
5158
+ * @param {Object} prevProps
5159
+ * @param {Object} props
5160
+ */
5045
5161
  function shouldUpdatePlayer(prevProps, props) {
5046
5162
  return prevProps.id !== props.id || prevProps.className !== props.className;
5047
5163
  }
5048
5164
 
5049
- var YouTube = /*#__PURE__*/function (_React$Component) {
5165
+ var YouTube = function (_React$Component) {
5050
5166
  _inherits(YouTube, _React$Component);
5051
5167
 
5052
- var _super = _createSuper(YouTube);
5053
-
5054
- /**
5055
- * Expose PlayerState constants for convenience. These constants can also be
5056
- * accessed through the global YT object after the YouTube IFrame API is instantiated.
5057
- * https://developers.google.com/youtube/iframe_api_reference#onStateChange
5058
- */
5059
5168
  function YouTube(props) {
5060
- var _this;
5061
-
5062
5169
  _classCallCheck(this, YouTube);
5063
5170
 
5064
- _this = _super.call(this, props);
5171
+ var _this = _possibleConstructorReturn(this, (YouTube.__proto__ || Object.getPrototypeOf(YouTube)).call(this, props));
5065
5172
 
5066
- _defineProperty(_assertThisInitialized(_this), "onPlayerReady", function (event) {
5173
+ _this.onPlayerReady = function (event) {
5067
5174
  return _this.props.onReady(event);
5068
- });
5175
+ };
5069
5176
 
5070
- _defineProperty(_assertThisInitialized(_this), "onPlayerError", function (event) {
5177
+ _this.onPlayerError = function (event) {
5071
5178
  return _this.props.onError(event);
5072
- });
5179
+ };
5073
5180
 
5074
- _defineProperty(_assertThisInitialized(_this), "onPlayerStateChange", function (event) {
5181
+ _this.onPlayerStateChange = function (event) {
5075
5182
  _this.props.onStateChange(event);
5076
-
5077
5183
  switch (event.data) {
5184
+
5078
5185
  case YouTube.PlayerState.ENDED:
5079
5186
  _this.props.onEnd(event);
5080
-
5081
5187
  break;
5082
5188
 
5083
5189
  case YouTube.PlayerState.PLAYING:
5084
5190
  _this.props.onPlay(event);
5085
-
5086
5191
  break;
5087
5192
 
5088
5193
  case YouTube.PlayerState.PAUSED:
5089
5194
  _this.props.onPause(event);
5090
-
5091
5195
  break;
5092
5196
  }
5093
- });
5197
+ };
5094
5198
 
5095
- _defineProperty(_assertThisInitialized(_this), "onPlayerPlaybackRateChange", function (event) {
5199
+ _this.onPlayerPlaybackRateChange = function (event) {
5096
5200
  return _this.props.onPlaybackRateChange(event);
5097
- });
5201
+ };
5098
5202
 
5099
- _defineProperty(_assertThisInitialized(_this), "onPlayerPlaybackQualityChange", function (event) {
5203
+ _this.onPlayerPlaybackQualityChange = function (event) {
5100
5204
  return _this.props.onPlaybackQualityChange(event);
5101
- });
5205
+ };
5102
5206
 
5103
- _defineProperty(_assertThisInitialized(_this), "createPlayer", function () {
5207
+ _this.createPlayer = function () {
5104
5208
  // do not attempt to create a player server-side, it won't work
5105
- if (typeof document === 'undefined') return; // create player
5106
-
5107
- var playerOpts = _objectSpread({}, _this.props.opts, {
5209
+ if (typeof document === 'undefined') return;
5210
+ // create player
5211
+ var playerOpts = _extends({}, _this.props.opts, {
5108
5212
  // preload the `videoId` video if one is already given
5109
5213
  videoId: _this.props.videoId
5110
5214
  });
5111
-
5112
- _this.internalPlayer = youTubePlayer(_this.container, playerOpts); // attach event handlers
5113
-
5215
+ _this.internalPlayer = youTubePlayer(_this.container, playerOpts);
5216
+ // attach event handlers
5114
5217
  _this.internalPlayer.on('ready', _this.onPlayerReady);
5115
-
5116
5218
  _this.internalPlayer.on('error', _this.onPlayerError);
5117
-
5118
5219
  _this.internalPlayer.on('stateChange', _this.onPlayerStateChange);
5119
-
5120
5220
  _this.internalPlayer.on('playbackRateChange', _this.onPlayerPlaybackRateChange);
5121
-
5122
5221
  _this.internalPlayer.on('playbackQualityChange', _this.onPlayerPlaybackQualityChange);
5123
- });
5222
+ };
5124
5223
 
5125
- _defineProperty(_assertThisInitialized(_this), "resetPlayer", function () {
5224
+ _this.resetPlayer = function () {
5126
5225
  return _this.internalPlayer.destroy().then(_this.createPlayer);
5127
- });
5226
+ };
5128
5227
 
5129
- _defineProperty(_assertThisInitialized(_this), "updatePlayer", function () {
5228
+ _this.updatePlayer = function () {
5130
5229
  _this.internalPlayer.getIframe().then(function (iframe) {
5131
5230
  if (_this.props.id) iframe.setAttribute('id', _this.props.id);else iframe.removeAttribute('id');
5132
5231
  if (_this.props.className) iframe.setAttribute('class', _this.props.className);else iframe.removeAttribute('class');
5133
5232
  });
5134
- });
5233
+ };
5135
5234
 
5136
- _defineProperty(_assertThisInitialized(_this), "updateVideo", function () {
5235
+ _this.updateVideo = function () {
5137
5236
  if (typeof _this.props.videoId === 'undefined' || _this.props.videoId === null) {
5138
5237
  _this.internalPlayer.stopVideo();
5139
-
5140
5238
  return;
5141
- } // set queueing options
5142
-
5239
+ }
5143
5240
 
5241
+ // set queueing options
5144
5242
  var autoplay = false;
5145
5243
  var opts = {
5146
5244
  videoId: _this.props.videoId
5147
5245
  };
5148
-
5149
5246
  if ('playerVars' in _this.props.opts) {
5150
5247
  autoplay = _this.props.opts.playerVars.autoplay === 1;
5151
-
5152
5248
  if ('start' in _this.props.opts.playerVars) {
5153
5249
  opts.startSeconds = _this.props.opts.playerVars.start;
5154
5250
  }
5155
-
5156
5251
  if ('end' in _this.props.opts.playerVars) {
5157
5252
  opts.endSeconds = _this.props.opts.playerVars.end;
5158
5253
  }
5159
- } // if autoplay is enabled loadVideoById
5160
-
5254
+ }
5161
5255
 
5256
+ // if autoplay is enabled loadVideoById
5162
5257
  if (autoplay) {
5163
5258
  _this.internalPlayer.loadVideoById(opts);
5164
-
5165
5259
  return;
5166
- } // default behaviour just cues the video
5167
-
5168
-
5260
+ }
5261
+ // default behaviour just cues the video
5169
5262
  _this.internalPlayer.cueVideoById(opts);
5170
- });
5263
+ };
5171
5264
 
5172
- _defineProperty(_assertThisInitialized(_this), "refContainer", function (container) {
5265
+ _this.refContainer = function (container) {
5173
5266
  _this.container = container;
5174
- });
5267
+ };
5175
5268
 
5176
5269
  _this.container = null;
5177
5270
  _this.internalPlayer = null;
5178
5271
  return _this;
5179
5272
  }
5180
5273
 
5274
+ /**
5275
+ * Expose PlayerState constants for convenience. These constants can also be
5276
+ * accessed through the global YT object after the YouTube IFrame API is instantiated.
5277
+ * https://developers.google.com/youtube/iframe_api_reference#onStateChange
5278
+ */
5279
+
5280
+
5181
5281
  _createClass(YouTube, [{
5182
- key: "componentDidMount",
5282
+ key: 'componentDidMount',
5183
5283
  value: function componentDidMount() {
5184
5284
  this.createPlayer();
5185
5285
  }
5186
5286
  }, {
5187
- key: "componentDidUpdate",
5287
+ key: 'componentDidUpdate',
5188
5288
  value: function componentDidUpdate(prevProps) {
5189
5289
  if (shouldUpdatePlayer(prevProps, this.props)) {
5190
5290
  this.updatePlayer();
@@ -5199,58 +5299,112 @@ var YouTube = /*#__PURE__*/function (_React$Component) {
5199
5299
  }
5200
5300
  }
5201
5301
  }, {
5202
- key: "componentWillUnmount",
5302
+ key: 'componentWillUnmount',
5203
5303
  value: function componentWillUnmount() {
5204
- /**
5205
- * Note: The `youtube-player` package that is used promisifies all YouTube
5206
- * Player API calls, which introduces a delay of a tick before it actually
5207
- * gets destroyed. Since React attempts to remove the element instantly
5208
- * this method isn't quick enough to reset the container element.
5304
+ /**
5305
+ * Note: The `youtube-player` package that is used promisifies all Youtube
5306
+ * Player API calls, which introduces a delay of a tick before it actually
5307
+ * gets destroyed. Since React attempts to remove the element instantly
5308
+ * this method isn't quick enough to reset the container element.
5209
5309
  */
5210
5310
  this.internalPlayer.destroy();
5211
5311
  }
5212
- /**
5213
- * https://developers.google.com/youtube/iframe_api_reference#onReady
5214
- *
5215
- * @param {Object} event
5216
- * @param {Object} target - player object
5312
+
5313
+ /**
5314
+ * https://developers.google.com/youtube/iframe_api_reference#onReady
5315
+ *
5316
+ * @param {Object} event
5317
+ * @param {Object} target - player object
5318
+ */
5319
+
5320
+
5321
+ /**
5322
+ * https://developers.google.com/youtube/iframe_api_reference#onError
5323
+ *
5324
+ * @param {Object} event
5325
+ * @param {Integer} data - error type
5326
+ * @param {Object} target - player object
5327
+ */
5328
+
5329
+
5330
+ /**
5331
+ * https://developers.google.com/youtube/iframe_api_reference#onStateChange
5332
+ *
5333
+ * @param {Object} event
5334
+ * @param {Integer} data - status change type
5335
+ * @param {Object} target - actual YT player
5336
+ */
5337
+
5338
+
5339
+ /**
5340
+ * https://developers.google.com/youtube/iframe_api_reference#onPlaybackRateChange
5341
+ *
5342
+ * @param {Object} event
5343
+ * @param {Float} data - playback rate
5344
+ * @param {Object} target - actual YT player
5345
+ */
5346
+
5347
+
5348
+ /**
5349
+ * https://developers.google.com/youtube/iframe_api_reference#onPlaybackQualityChange
5350
+ *
5351
+ * @param {Object} event
5352
+ * @param {String} data - playback quality
5353
+ * @param {Object} target - actual YT player
5354
+ */
5355
+
5356
+
5357
+ /**
5358
+ * Initialize the Youtube Player API on the container and attach event handlers
5359
+ */
5360
+
5361
+
5362
+ /**
5363
+ * Shorthand for destroying and then re-creating the Youtube Player
5364
+ */
5365
+
5366
+
5367
+ /**
5368
+ * Method to update the id and class of the Youtube Player iframe.
5369
+ * React should update this automatically but since the Youtube Player API
5370
+ * replaced the DIV that is mounted by React we need to do this manually.
5371
+ */
5372
+
5373
+
5374
+ /**
5375
+ * Call Youtube Player API methods to update the currently playing video.
5376
+ * Depeding on the `opts.playerVars.autoplay` this function uses one of two
5377
+ * Youtube Player API methods to update the video.
5217
5378
  */
5218
5379
 
5219
5380
  }, {
5220
- key: "render",
5381
+ key: 'render',
5221
5382
  value: function render() {
5222
- return /*#__PURE__*/React__default.createElement("div", {
5223
- className: this.props.containerClassName
5224
- }, /*#__PURE__*/React__default.createElement("div", {
5225
- id: this.props.id,
5226
- className: this.props.className,
5227
- ref: this.refContainer
5228
- }));
5383
+ return React__default.createElement(
5384
+ 'div',
5385
+ { className: this.props.containerClassName },
5386
+ React__default.createElement('div', { id: this.props.id, className: this.props.className, ref: this.refContainer })
5387
+ );
5229
5388
  }
5230
5389
  }]);
5231
5390
 
5232
5391
  return YouTube;
5233
5392
  }(React__default.Component);
5234
5393
 
5235
- _defineProperty(YouTube, "PlayerState", {
5236
- UNSTARTED: -1,
5237
- ENDED: 0,
5238
- PLAYING: 1,
5239
- PAUSED: 2,
5240
- BUFFERING: 3,
5241
- CUED: 5
5242
- });
5243
-
5244
5394
  YouTube.propTypes = {
5245
5395
  videoId: PropTypes.string,
5396
+
5246
5397
  // custom ID for player element
5247
5398
  id: PropTypes.string,
5399
+
5248
5400
  // custom class name for player element
5249
5401
  className: PropTypes.string,
5250
5402
  // custom class name for player container element
5251
5403
  containerClassName: PropTypes.string,
5404
+
5252
5405
  // https://developers.google.com/youtube/iframe_api_reference#Loading_a_Video_Player
5253
5406
  opts: PropTypes.objectOf(PropTypes.any),
5407
+
5254
5408
  // event subscriptions
5255
5409
  onReady: PropTypes.func,
5256
5410
  onError: PropTypes.func,
@@ -5262,7 +5416,6 @@ YouTube.propTypes = {
5262
5416
  onPlaybackQualityChange: PropTypes.func
5263
5417
  };
5264
5418
  YouTube.defaultProps = {
5265
- videoId: null,
5266
5419
  id: null,
5267
5420
  className: null,
5268
5421
  opts: {},
@@ -5276,6 +5429,14 @@ YouTube.defaultProps = {
5276
5429
  onPlaybackRateChange: function onPlaybackRateChange() {},
5277
5430
  onPlaybackQualityChange: function onPlaybackQualityChange() {}
5278
5431
  };
5432
+ YouTube.PlayerState = {
5433
+ UNSTARTED: -1,
5434
+ ENDED: 0,
5435
+ PLAYING: 1,
5436
+ PAUSED: 2,
5437
+ BUFFERING: 3,
5438
+ CUED: 5
5439
+ };
5279
5440
 
5280
5441
  var YouTubePlayer = function YouTubePlayer(_ref) {
5281
5442
  var url = _ref.url;
@@ -6310,8 +6471,8 @@ var window_1 = win;
6310
6471
 
6311
6472
  /*! @name @brightcove/react-player-loader @version 1.4.0 @license Apache-2.0 */
6312
6473
 
6313
- function _extends() {
6314
- _extends = Object.assign || function (target) {
6474
+ function _extends$1() {
6475
+ _extends$1 = Object.assign || function (target) {
6315
6476
  for (var i = 1; i < arguments.length; i++) {
6316
6477
  var source = arguments[i];
6317
6478
 
@@ -6325,7 +6486,7 @@ function _extends() {
6325
6486
  return target;
6326
6487
  };
6327
6488
 
6328
- return _extends.apply(this, arguments);
6489
+ return _extends$1.apply(this, arguments);
6329
6490
  }
6330
6491
 
6331
6492
  function _inheritsLoose(subClass, superClass) {
@@ -6334,7 +6495,7 @@ function _inheritsLoose(subClass, superClass) {
6334
6495
  subClass.__proto__ = superClass;
6335
6496
  }
6336
6497
 
6337
- function _assertThisInitialized$1(self) {
6498
+ function _assertThisInitialized(self) {
6338
6499
  if (self === void 0) {
6339
6500
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
6340
6501
  }
@@ -6344,8 +6505,8 @@ function _assertThisInitialized$1(self) {
6344
6505
 
6345
6506
  /*! @name @brightcove/player-loader @version 1.7.1 @license Apache-2.0 */
6346
6507
 
6347
- function _extends$1() {
6348
- _extends$1 = Object.assign || function (target) {
6508
+ function _extends$1$1() {
6509
+ _extends$1$1 = Object.assign || function (target) {
6349
6510
  for (var i = 1; i < arguments.length; i++) {
6350
6511
  var source = arguments[i];
6351
6512
 
@@ -6359,7 +6520,7 @@ function _extends$1() {
6359
6520
  return target;
6360
6521
  };
6361
6522
 
6362
- return _extends$1.apply(this, arguments);
6523
+ return _extends$1$1.apply(this, arguments);
6363
6524
  }
6364
6525
 
6365
6526
  var version$1 = "1.7.1";
@@ -6367,7 +6528,7 @@ var version$1 = "1.7.1";
6367
6528
  /*! @name @brightcove/player-url @version 1.2.0 @license Apache-2.0 */
6368
6529
  var version$1$1 = "1.2.0";
6369
6530
 
6370
- var _typeof$1 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
6531
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
6371
6532
  return typeof obj;
6372
6533
  } : function (obj) {
6373
6534
  return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
@@ -6502,7 +6663,7 @@ var brightcovePlayerUrl = function brightcovePlayerUrl(_ref) {
6502
6663
 
6503
6664
  var qs = '';
6504
6665
 
6505
- if (iframe && queryParams && (typeof queryParams === 'undefined' ? 'undefined' : _typeof$1(queryParams)) === 'object') {
6666
+ if (iframe && queryParams && (typeof queryParams === 'undefined' ? 'undefined' : _typeof(queryParams)) === 'object') {
6506
6667
  qs = getQueryString(queryParams);
6507
6668
  }
6508
6669
 
@@ -6736,7 +6897,7 @@ var wrapResponsive = function wrapResponsive(embedType, embedOptions, el) {
6736
6897
  el.style.width = '100%';
6737
6898
  el.style.height = '100%';
6738
6899
 
6739
- var responsive = _extends$1({
6900
+ var responsive = _extends$1$1({
6740
6901
  aspectRatio: DEFAULT_ASPECT_RATIO,
6741
6902
  iframeHorizontalPlaylist: DEFAULT_IFRAME_HORIZONTAL_PLAYLIST,
6742
6903
  maxWidth: DEFAULT_MAX_WIDTH
@@ -7421,7 +7582,7 @@ var loadPlayer = function loadPlayer(params, resolve, reject) {
7421
7582
 
7422
7583
 
7423
7584
  var brightcovePlayerLoader = function brightcovePlayerLoader(parameters) {
7424
- var params = _extends$1({}, DEFAULTS, parameters);
7585
+ var params = _extends$1$1({}, DEFAULTS, parameters);
7425
7586
 
7426
7587
  var Promise = params.Promise,
7427
7588
  onSuccess = params.onSuccess,
@@ -7563,7 +7724,7 @@ function (_React$Component) {
7563
7724
  _this.refNode = ref;
7564
7725
  };
7565
7726
 
7566
- _this.loadPlayer = _this.loadPlayer.bind(_assertThisInitialized$1(_this));
7727
+ _this.loadPlayer = _this.loadPlayer.bind(_assertThisInitialized(_this));
7567
7728
  return _this;
7568
7729
  }
7569
7730
  /**
@@ -7584,7 +7745,7 @@ function (_React$Component) {
7584
7745
  var userSuccess = this.props.onSuccess;
7585
7746
  var userFailure = this.props.onFailure;
7586
7747
 
7587
- var options = _extends({}, this.props, {
7748
+ var options = _extends$1({}, this.props, {
7588
7749
  refNode: this.refNode,
7589
7750
  refNodeInsert: 'append',
7590
7751
  onSuccess: function onSuccess(_ref) {
@@ -7893,7 +8054,7 @@ function (_React$Component) {
7893
8054
  ;
7894
8055
 
7895
8056
  _proto.render = function render() {
7896
- var props = _extends({
8057
+ var props = _extends$1({
7897
8058
  className: 'brightcove-react-player-loader'
7898
8059
  }, this.props.attrs, {
7899
8060
  ref: this.setRefNode
@@ -8307,17 +8468,11 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
8307
8468
 
8308
8469
  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; }
8309
8470
 
8310
- 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; } } }; }
8311
-
8312
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8313
-
8314
- 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."); }
8315
-
8316
- 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); }
8471
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
8317
8472
 
8318
- 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; }
8473
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
8319
8474
 
8320
- 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; }
8475
+ function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { 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; }
8321
8476
 
8322
8477
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8323
8478
 
@@ -8447,12 +8602,12 @@ function getSDK(url, sdkGlobal) {
8447
8602
 
8448
8603
  function getConfig(props$1, defaultProps, showWarning) {
8449
8604
  var config = (0, _deepmerge["default"])(defaultProps.config, props$1.config);
8450
-
8451
- var _iterator = _createForOfIteratorHelper(props.DEPRECATED_CONFIG_PROPS),
8452
- _step;
8605
+ var _iteratorNormalCompletion = true;
8606
+ var _didIteratorError = false;
8607
+ var _iteratorError = undefined;
8453
8608
 
8454
8609
  try {
8455
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
8610
+ for (var _iterator = props.DEPRECATED_CONFIG_PROPS[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
8456
8611
  var p = _step.value;
8457
8612
 
8458
8613
  if (props$1[p]) {
@@ -8467,9 +8622,18 @@ function getConfig(props$1, defaultProps, showWarning) {
8467
8622
  }
8468
8623
  }
8469
8624
  } catch (err) {
8470
- _iterator.e(err);
8625
+ _didIteratorError = true;
8626
+ _iteratorError = err;
8471
8627
  } finally {
8472
- _iterator.f();
8628
+ try {
8629
+ if (!_iteratorNormalCompletion && _iterator["return"] != null) {
8630
+ _iterator["return"]();
8631
+ }
8632
+ } finally {
8633
+ if (_didIteratorError) {
8634
+ throw _iteratorError;
8635
+ }
8636
+ }
8473
8637
  }
8474
8638
 
8475
8639
  return config;
@@ -8616,16 +8780,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
8616
8780
 
8617
8781
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
8618
8782
 
8619
- 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); }; }
8620
-
8621
8783
  function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
8622
8784
 
8623
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
8624
-
8625
- 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; } }
8626
-
8627
8785
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
8628
8786
 
8787
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
8788
+
8629
8789
  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); }
8630
8790
 
8631
8791
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
@@ -8634,12 +8794,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
8634
8794
 
8635
8795
  var SEEK_ON_PLAY_EXPIRY = 5000;
8636
8796
 
8637
- var Player = /*#__PURE__*/function (_Component) {
8797
+ var Player =
8798
+ /*#__PURE__*/
8799
+ function (_Component) {
8638
8800
  _inherits(Player, _Component);
8639
8801
 
8640
- var _super = _createSuper(Player);
8641
-
8642
8802
  function Player() {
8803
+ var _getPrototypeOf2;
8804
+
8643
8805
  var _this;
8644
8806
 
8645
8807
  _classCallCheck(this, Player);
@@ -8648,7 +8810,7 @@ var Player = /*#__PURE__*/function (_Component) {
8648
8810
  _args[_key] = arguments[_key];
8649
8811
  }
8650
8812
 
8651
- _this = _super.call.apply(_super, [this].concat(_args));
8813
+ _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Player)).call.apply(_getPrototypeOf2, [this].concat(_args)));
8652
8814
 
8653
8815
  _defineProperty(_assertThisInitialized(_this), "mounted", false);
8654
8816
 
@@ -8973,7 +9135,7 @@ var Player = /*#__PURE__*/function (_Component) {
8973
9135
  return null;
8974
9136
  }
8975
9137
 
8976
- return /*#__PURE__*/_react["default"].createElement(Player, _extends({}, this.props, {
9138
+ return _react["default"].createElement(Player, _extends({}, this.props, {
8977
9139
  ref: this.ref,
8978
9140
  onReady: this.handleReady,
8979
9141
  onPlay: this.handlePlay,
@@ -9034,16 +9196,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
9034
9196
 
9035
9197
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
9036
9198
 
9037
- 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); }; }
9038
-
9039
9199
  function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
9040
9200
 
9041
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
9042
-
9043
- 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; } }
9044
-
9045
9201
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
9046
9202
 
9203
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
9204
+
9047
9205
  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); }
9048
9206
 
9049
9207
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
@@ -9055,12 +9213,14 @@ var SUPPORTED_PROPS = Object.keys(props.propTypes);
9055
9213
  function createSinglePlayer(activePlayer) {
9056
9214
  var _class, _temp;
9057
9215
 
9058
- return _temp = _class = /*#__PURE__*/function (_Component) {
9216
+ return _temp = _class =
9217
+ /*#__PURE__*/
9218
+ function (_Component) {
9059
9219
  _inherits(SinglePlayer, _Component);
9060
9220
 
9061
- var _super = _createSuper(SinglePlayer);
9062
-
9063
9221
  function SinglePlayer() {
9222
+ var _getPrototypeOf2;
9223
+
9064
9224
  var _this;
9065
9225
 
9066
9226
  _classCallCheck(this, SinglePlayer);
@@ -9069,7 +9229,7 @@ function createSinglePlayer(activePlayer) {
9069
9229
  args[_key] = arguments[_key];
9070
9230
  }
9071
9231
 
9072
- _this = _super.call.apply(_super, [this].concat(args));
9232
+ _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(SinglePlayer)).call.apply(_getPrototypeOf2, [this].concat(args)));
9073
9233
 
9074
9234
  _defineProperty(_assertThisInitialized(_this), "config", (0, utils.getConfig)(_this.props, props.defaultProps, true));
9075
9235
 
@@ -9137,12 +9297,12 @@ function createSinglePlayer(activePlayer) {
9137
9297
  height = _this$props.height,
9138
9298
  Wrapper = _this$props.wrapper;
9139
9299
  var otherProps = (0, utils.omit)(this.props, SUPPORTED_PROPS, props.DEPRECATED_CONFIG_PROPS);
9140
- return /*#__PURE__*/_react["default"].createElement(Wrapper, _extends({
9300
+ return _react["default"].createElement(Wrapper, _extends({
9141
9301
  style: _objectSpread({}, style, {
9142
9302
  width: width,
9143
9303
  height: height
9144
9304
  })
9145
- }, otherProps), /*#__PURE__*/_react["default"].createElement(_Player["default"], _extends({}, this.props, {
9305
+ }, otherProps), _react["default"].createElement(_Player["default"], _extends({}, this.props, {
9146
9306
  ref: this.ref,
9147
9307
  activePlayer: activePlayer,
9148
9308
  config: this.config
@@ -9188,31 +9348,23 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
9188
9348
 
9189
9349
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
9190
9350
 
9191
- 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); }; }
9192
-
9193
9351
  function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
9194
9352
 
9195
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
9196
-
9197
- 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; } }
9198
-
9199
9353
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
9200
9354
 
9355
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
9356
+
9201
9357
  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); }
9202
9358
 
9203
9359
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
9204
9360
 
9205
9361
  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; }
9206
9362
 
9207
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
9208
-
9209
- 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."); }
9210
-
9211
- 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); }
9363
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
9212
9364
 
9213
- 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; }
9365
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
9214
9366
 
9215
- 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; }
9367
+ function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { 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; }
9216
9368
 
9217
9369
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
9218
9370
 
@@ -9237,12 +9389,14 @@ function parsePlaylist(url) {
9237
9389
  return {};
9238
9390
  }
9239
9391
 
9240
- var YouTube = /*#__PURE__*/function (_Component) {
9392
+ var YouTube =
9393
+ /*#__PURE__*/
9394
+ function (_Component) {
9241
9395
  _inherits(YouTube, _Component);
9242
9396
 
9243
- var _super = _createSuper(YouTube);
9244
-
9245
9397
  function YouTube() {
9398
+ var _getPrototypeOf2;
9399
+
9246
9400
  var _this;
9247
9401
 
9248
9402
  _classCallCheck(this, YouTube);
@@ -9251,7 +9405,7 @@ var YouTube = /*#__PURE__*/function (_Component) {
9251
9405
  args[_key] = arguments[_key];
9252
9406
  }
9253
9407
 
9254
- _this = _super.call.apply(_super, [this].concat(args));
9408
+ _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(YouTube)).call.apply(_getPrototypeOf2, [this].concat(args)));
9255
9409
 
9256
9410
  _defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
9257
9411
 
@@ -9439,9 +9593,9 @@ var YouTube = /*#__PURE__*/function (_Component) {
9439
9593
  height: '100%',
9440
9594
  display: display
9441
9595
  };
9442
- return /*#__PURE__*/_react["default"].createElement("div", {
9596
+ return _react["default"].createElement("div", {
9443
9597
  style: style
9444
- }, /*#__PURE__*/_react["default"].createElement("div", {
9598
+ }, _react["default"].createElement("div", {
9445
9599
  ref: this.ref
9446
9600
  }));
9447
9601
  }
@@ -9497,16 +9651,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
9497
9651
 
9498
9652
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
9499
9653
 
9500
- 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); }; }
9501
-
9502
9654
  function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
9503
9655
 
9504
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
9505
-
9506
- 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; } }
9507
-
9508
9656
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
9509
9657
 
9658
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
9659
+
9510
9660
  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); }
9511
9661
 
9512
9662
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
@@ -9515,14 +9665,16 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
9515
9665
 
9516
9666
  var SDK_URL = 'https://w.soundcloud.com/player/api.js';
9517
9667
  var SDK_GLOBAL = 'SC';
9518
- var MATCH_URL = /(?:soundcloud\.com|snd\.sc)\/[^.]+$/;
9668
+ var MATCH_URL = /(soundcloud\.com|snd\.sc)\/.+$/;
9519
9669
 
9520
- var SoundCloud = /*#__PURE__*/function (_Component) {
9670
+ var SoundCloud =
9671
+ /*#__PURE__*/
9672
+ function (_Component) {
9521
9673
  _inherits(SoundCloud, _Component);
9522
9674
 
9523
- var _super = _createSuper(SoundCloud);
9524
-
9525
9675
  function SoundCloud() {
9676
+ var _getPrototypeOf2;
9677
+
9526
9678
  var _this;
9527
9679
 
9528
9680
  _classCallCheck(this, SoundCloud);
@@ -9531,7 +9683,7 @@ var SoundCloud = /*#__PURE__*/function (_Component) {
9531
9683
  args[_key] = arguments[_key];
9532
9684
  }
9533
9685
 
9534
- _this = _super.call.apply(_super, [this].concat(args));
9686
+ _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(SoundCloud)).call.apply(_getPrototypeOf2, [this].concat(args)));
9535
9687
 
9536
9688
  _defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
9537
9689
 
@@ -9652,7 +9804,7 @@ var SoundCloud = /*#__PURE__*/function (_Component) {
9652
9804
  height: '100%',
9653
9805
  display: display
9654
9806
  };
9655
- return /*#__PURE__*/_react["default"].createElement("iframe", {
9807
+ return _react["default"].createElement("iframe", {
9656
9808
  ref: this.ref,
9657
9809
  src: "https://w.soundcloud.com/player/?url=".concat(encodeURIComponent(this.props.url)),
9658
9810
  style: style,
@@ -9714,16 +9866,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
9714
9866
 
9715
9867
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
9716
9868
 
9717
- 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); }; }
9718
-
9719
9869
  function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
9720
9870
 
9721
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
9722
-
9723
- 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; } }
9724
-
9725
9871
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
9726
9872
 
9873
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
9874
+
9727
9875
  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); }
9728
9876
 
9729
9877
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
@@ -9735,12 +9883,14 @@ var SDK_GLOBAL = 'Vimeo';
9735
9883
  var MATCH_URL = /vimeo\.com\/.+/;
9736
9884
  var MATCH_FILE_URL = /vimeo\.com\/external\/[0-9]+\..+/;
9737
9885
 
9738
- var Vimeo = /*#__PURE__*/function (_Component) {
9886
+ var Vimeo =
9887
+ /*#__PURE__*/
9888
+ function (_Component) {
9739
9889
  _inherits(Vimeo, _Component);
9740
9890
 
9741
- var _super = _createSuper(Vimeo);
9742
-
9743
9891
  function Vimeo() {
9892
+ var _getPrototypeOf2;
9893
+
9744
9894
  var _this;
9745
9895
 
9746
9896
  _classCallCheck(this, Vimeo);
@@ -9749,7 +9899,7 @@ var Vimeo = /*#__PURE__*/function (_Component) {
9749
9899
  args[_key] = arguments[_key];
9750
9900
  }
9751
9901
 
9752
- _this = _super.call.apply(_super, [this].concat(args));
9902
+ _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Vimeo)).call.apply(_getPrototypeOf2, [this].concat(args)));
9753
9903
 
9754
9904
  _defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
9755
9905
 
@@ -9906,7 +10056,7 @@ var Vimeo = /*#__PURE__*/function (_Component) {
9906
10056
  overflow: 'hidden',
9907
10057
  display: display
9908
10058
  };
9909
- return /*#__PURE__*/_react["default"].createElement("div", {
10059
+ return _react["default"].createElement("div", {
9910
10060
  key: this.props.url,
9911
10061
  ref: this.ref,
9912
10062
  style: style
@@ -9966,16 +10116,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
9966
10116
 
9967
10117
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
9968
10118
 
9969
- 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); }; }
9970
-
9971
10119
  function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
9972
10120
 
9973
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
9974
-
9975
- 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; } }
9976
-
9977
10121
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
9978
10122
 
10123
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
10124
+
9979
10125
  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); }
9980
10126
 
9981
10127
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
@@ -9988,12 +10134,14 @@ var SDK_GLOBAL_READY = 'fbAsyncInit';
9988
10134
  var MATCH_URL = /^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/;
9989
10135
  var PLAYER_ID_PREFIX = 'facebook-player-';
9990
10136
 
9991
- var Facebook = /*#__PURE__*/function (_Component) {
10137
+ var Facebook =
10138
+ /*#__PURE__*/
10139
+ function (_Component) {
9992
10140
  _inherits(Facebook, _Component);
9993
10141
 
9994
- var _super = _createSuper(Facebook);
9995
-
9996
10142
  function Facebook() {
10143
+ var _getPrototypeOf2;
10144
+
9997
10145
  var _this;
9998
10146
 
9999
10147
  _classCallCheck(this, Facebook);
@@ -10002,7 +10150,7 @@ var Facebook = /*#__PURE__*/function (_Component) {
10002
10150
  args[_key] = arguments[_key];
10003
10151
  }
10004
10152
 
10005
- _this = _super.call.apply(_super, [this].concat(args));
10153
+ _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Facebook)).call.apply(_getPrototypeOf2, [this].concat(args)));
10006
10154
 
10007
10155
  _defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
10008
10156
 
@@ -10118,7 +10266,7 @@ var Facebook = /*#__PURE__*/function (_Component) {
10118
10266
  width: '100%',
10119
10267
  height: '100%'
10120
10268
  };
10121
- return /*#__PURE__*/_react["default"].createElement("div", {
10269
+ return _react["default"].createElement("div", {
10122
10270
  style: style,
10123
10271
  id: this.playerID,
10124
10272
  className: "fb-video",
@@ -10178,16 +10326,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
10178
10326
 
10179
10327
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
10180
10328
 
10181
- 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); }; }
10182
-
10183
10329
  function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
10184
10330
 
10185
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
10186
-
10187
- 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; } }
10188
-
10189
10331
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
10190
10332
 
10333
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
10334
+
10191
10335
  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); }
10192
10336
 
10193
10337
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
@@ -10198,12 +10342,14 @@ var SDK_URL = 'https://cdn.embed.ly/player-0.1.0.min.js';
10198
10342
  var SDK_GLOBAL = 'playerjs';
10199
10343
  var MATCH_URL = /streamable\.com\/([a-z0-9]+)$/;
10200
10344
 
10201
- var Streamable = /*#__PURE__*/function (_Component) {
10345
+ var Streamable =
10346
+ /*#__PURE__*/
10347
+ function (_Component) {
10202
10348
  _inherits(Streamable, _Component);
10203
10349
 
10204
- var _super = _createSuper(Streamable);
10205
-
10206
10350
  function Streamable() {
10351
+ var _getPrototypeOf2;
10352
+
10207
10353
  var _this;
10208
10354
 
10209
10355
  _classCallCheck(this, Streamable);
@@ -10212,7 +10358,7 @@ var Streamable = /*#__PURE__*/function (_Component) {
10212
10358
  args[_key] = arguments[_key];
10213
10359
  }
10214
10360
 
10215
- _this = _super.call.apply(_super, [this].concat(args));
10361
+ _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Streamable)).call.apply(_getPrototypeOf2, [this].concat(args)));
10216
10362
 
10217
10363
  _defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
10218
10364
 
@@ -10332,7 +10478,7 @@ var Streamable = /*#__PURE__*/function (_Component) {
10332
10478
  width: '100%',
10333
10479
  height: '100%'
10334
10480
  };
10335
- return /*#__PURE__*/_react["default"].createElement("iframe", {
10481
+ return _react["default"].createElement("iframe", {
10336
10482
  ref: this.ref,
10337
10483
  src: "https://streamable.com/o/".concat(id),
10338
10484
  frameBorder: "0",
@@ -10393,16 +10539,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
10393
10539
 
10394
10540
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
10395
10541
 
10396
- 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); }; }
10397
-
10398
10542
  function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
10399
10543
 
10400
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
10401
-
10402
- 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; } }
10403
-
10404
10544
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
10405
10545
 
10546
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
10547
+
10406
10548
  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); }
10407
10549
 
10408
10550
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
@@ -10413,48 +10555,26 @@ var SDK_URL = 'https://fast.wistia.com/assets/external/E-v1.js';
10413
10555
  var SDK_GLOBAL = 'Wistia';
10414
10556
  var MATCH_URL = /(?:wistia\.com|wi\.st)\/(?:medias|embed)\/(.*)$/;
10415
10557
 
10416
- var Wistia = /*#__PURE__*/function (_Component) {
10558
+ var Wistia =
10559
+ /*#__PURE__*/
10560
+ function (_Component) {
10417
10561
  _inherits(Wistia, _Component);
10418
10562
 
10419
- var _super = _createSuper(Wistia);
10420
-
10421
10563
  function Wistia() {
10564
+ var _getPrototypeOf2;
10565
+
10422
10566
  var _this;
10423
10567
 
10424
10568
  _classCallCheck(this, Wistia);
10425
10569
 
10426
- for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {
10427
- _args[_key] = arguments[_key];
10570
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
10571
+ args[_key] = arguments[_key];
10428
10572
  }
10429
10573
 
10430
- _this = _super.call.apply(_super, [this].concat(_args));
10574
+ _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Wistia)).call.apply(_getPrototypeOf2, [this].concat(args)));
10431
10575
 
10432
10576
  _defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
10433
10577
 
10434
- _defineProperty(_assertThisInitialized(_this), "onPlay", function () {
10435
- var _this$props;
10436
-
10437
- return (_this$props = _this.props).onPlay.apply(_this$props, arguments);
10438
- });
10439
-
10440
- _defineProperty(_assertThisInitialized(_this), "onPause", function () {
10441
- var _this$props2;
10442
-
10443
- return (_this$props2 = _this.props).onPause.apply(_this$props2, arguments);
10444
- });
10445
-
10446
- _defineProperty(_assertThisInitialized(_this), "onSeek", function () {
10447
- var _this$props3;
10448
-
10449
- return (_this$props3 = _this.props).onSeek.apply(_this$props3, arguments);
10450
- });
10451
-
10452
- _defineProperty(_assertThisInitialized(_this), "onEnded", function () {
10453
- var _this$props4;
10454
-
10455
- return (_this$props4 = _this.props).onEnded.apply(_this$props4, arguments);
10456
- });
10457
-
10458
10578
  _defineProperty(_assertThisInitialized(_this), "mute", function () {
10459
10579
  _this.callPlayer('mute');
10460
10580
  });
@@ -10476,13 +10596,17 @@ var Wistia = /*#__PURE__*/function (_Component) {
10476
10596
  value: function load(url) {
10477
10597
  var _this2 = this;
10478
10598
 
10479
- var _this$props5 = this.props,
10480
- playing = _this$props5.playing,
10481
- muted = _this$props5.muted,
10482
- controls = _this$props5.controls,
10483
- _onReady = _this$props5.onReady,
10484
- config = _this$props5.config,
10485
- onError = _this$props5.onError;
10599
+ var _this$props = this.props,
10600
+ playing = _this$props.playing,
10601
+ muted = _this$props.muted,
10602
+ controls = _this$props.controls,
10603
+ _onReady = _this$props.onReady,
10604
+ onPlay = _this$props.onPlay,
10605
+ onPause = _this$props.onPause,
10606
+ onSeek = _this$props.onSeek,
10607
+ onEnded = _this$props.onEnded,
10608
+ config = _this$props.config,
10609
+ onError = _this$props.onError;
10486
10610
  (0, utils.getSDK)(SDK_URL, SDK_GLOBAL).then(function () {
10487
10611
  window._wq = window._wq || [];
10488
10612
 
@@ -10499,28 +10623,19 @@ var Wistia = /*#__PURE__*/function (_Component) {
10499
10623
 
10500
10624
  _this2.unbind();
10501
10625
 
10502
- _this2.player.bind('play', _this2.onPlay);
10626
+ _this2.player.bind('play', onPlay);
10503
10627
 
10504
- _this2.player.bind('pause', _this2.onPause);
10628
+ _this2.player.bind('pause', onPause);
10505
10629
 
10506
- _this2.player.bind('seek', _this2.onSeek);
10630
+ _this2.player.bind('seek', onSeek);
10507
10631
 
10508
- _this2.player.bind('end', _this2.onEnded);
10632
+ _this2.player.bind('end', onEnded);
10509
10633
 
10510
10634
  _onReady();
10511
10635
  }
10512
10636
  });
10513
10637
  }, onError);
10514
10638
  }
10515
- }, {
10516
- key: "unbind",
10517
- value: function unbind() {
10518
- this.player.unbind('play', this.onPlay);
10519
- this.player.unbind('pause', this.onPause);
10520
- this.player.unbind('seek', this.onSeek);
10521
- this.player.unbind('end', this.onEnded);
10522
- } // Proxy methods to prevent listener leaks
10523
-
10524
10639
  }, {
10525
10640
  key: "play",
10526
10641
  value: function play() {
@@ -10531,6 +10646,19 @@ var Wistia = /*#__PURE__*/function (_Component) {
10531
10646
  value: function pause() {
10532
10647
  this.callPlayer('pause');
10533
10648
  }
10649
+ }, {
10650
+ key: "unbind",
10651
+ value: function unbind() {
10652
+ var _this$props2 = this.props,
10653
+ onPlay = _this$props2.onPlay,
10654
+ onPause = _this$props2.onPause,
10655
+ onSeek = _this$props2.onSeek,
10656
+ onEnded = _this$props2.onEnded;
10657
+ this.player.unbind('play', onPlay);
10658
+ this.player.unbind('pause', onPause);
10659
+ this.player.unbind('seek', onSeek);
10660
+ this.player.unbind('end', onEnded);
10661
+ }
10534
10662
  }, {
10535
10663
  key: "stop",
10536
10664
  value: function stop() {
@@ -10576,7 +10704,7 @@ var Wistia = /*#__PURE__*/function (_Component) {
10576
10704
  width: '100%',
10577
10705
  height: '100%'
10578
10706
  };
10579
- return /*#__PURE__*/_react["default"].createElement("div", {
10707
+ return _react["default"].createElement("div", {
10580
10708
  key: id,
10581
10709
  className: className,
10582
10710
  style: style
@@ -10636,16 +10764,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
10636
10764
 
10637
10765
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
10638
10766
 
10639
- 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); }; }
10640
-
10641
10767
  function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
10642
10768
 
10643
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
10644
-
10645
- 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; } }
10646
-
10647
10769
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
10648
10770
 
10771
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
10772
+
10649
10773
  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); }
10650
10774
 
10651
10775
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
@@ -10658,12 +10782,14 @@ var MATCH_VIDEO_URL = /(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/;
10658
10782
  var MATCH_CHANNEL_URL = /(?:www\.|go\.)?twitch\.tv\/([a-z0-9_]+)($|\?)/;
10659
10783
  var PLAYER_ID_PREFIX = 'twitch-player-';
10660
10784
 
10661
- var Twitch = /*#__PURE__*/function (_Component) {
10785
+ var Twitch =
10786
+ /*#__PURE__*/
10787
+ function (_Component) {
10662
10788
  _inherits(Twitch, _Component);
10663
10789
 
10664
- var _super = _createSuper(Twitch);
10665
-
10666
10790
  function Twitch() {
10791
+ var _getPrototypeOf2;
10792
+
10667
10793
  var _this;
10668
10794
 
10669
10795
  _classCallCheck(this, Twitch);
@@ -10672,7 +10798,7 @@ var Twitch = /*#__PURE__*/function (_Component) {
10672
10798
  args[_key] = arguments[_key];
10673
10799
  }
10674
10800
 
10675
- _this = _super.call.apply(_super, [this].concat(args));
10801
+ _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Twitch)).call.apply(_getPrototypeOf2, [this].concat(args)));
10676
10802
 
10677
10803
  _defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
10678
10804
 
@@ -10793,7 +10919,7 @@ var Twitch = /*#__PURE__*/function (_Component) {
10793
10919
  width: '100%',
10794
10920
  height: '100%'
10795
10921
  };
10796
- return /*#__PURE__*/_react["default"].createElement("div", {
10922
+ return _react["default"].createElement("div", {
10797
10923
  style: style,
10798
10924
  id: this.playerID
10799
10925
  });
@@ -10846,15 +10972,11 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
10846
10972
 
10847
10973
  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; }
10848
10974
 
10849
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
10850
-
10851
- 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."); }
10852
-
10853
- 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); }
10975
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
10854
10976
 
10855
- 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; }
10977
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
10856
10978
 
10857
- 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; }
10979
+ function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { 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; }
10858
10980
 
10859
10981
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
10860
10982
 
@@ -10864,16 +10986,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
10864
10986
 
10865
10987
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
10866
10988
 
10867
- 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); }; }
10868
-
10869
10989
  function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
10870
10990
 
10871
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
10872
-
10873
- 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; } }
10874
-
10875
10991
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
10876
10992
 
10993
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
10994
+
10877
10995
  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); }
10878
10996
 
10879
10997
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
@@ -10885,12 +11003,14 @@ var SDK_GLOBAL = 'DM';
10885
11003
  var SDK_GLOBAL_READY = 'dmAsyncInit';
10886
11004
  var MATCH_URL = /^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?$/;
10887
11005
 
10888
- var DailyMotion = /*#__PURE__*/function (_Component) {
11006
+ var DailyMotion =
11007
+ /*#__PURE__*/
11008
+ function (_Component) {
10889
11009
  _inherits(DailyMotion, _Component);
10890
11010
 
10891
- var _super = _createSuper(DailyMotion);
10892
-
10893
11011
  function DailyMotion() {
11012
+ var _getPrototypeOf2;
11013
+
10894
11014
  var _this;
10895
11015
 
10896
11016
  _classCallCheck(this, DailyMotion);
@@ -10899,7 +11019,7 @@ var DailyMotion = /*#__PURE__*/function (_Component) {
10899
11019
  args[_key] = arguments[_key];
10900
11020
  }
10901
11021
 
10902
- _this = _super.call.apply(_super, [this].concat(args));
11022
+ _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(DailyMotion)).call.apply(_getPrototypeOf2, [this].concat(args)));
10903
11023
 
10904
11024
  _defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
10905
11025
 
@@ -11028,9 +11148,9 @@ var DailyMotion = /*#__PURE__*/function (_Component) {
11028
11148
  height: '100%',
11029
11149
  display: display
11030
11150
  };
11031
- return /*#__PURE__*/_react["default"].createElement("div", {
11151
+ return _react["default"].createElement("div", {
11032
11152
  style: style
11033
- }, /*#__PURE__*/_react["default"].createElement("div", {
11153
+ }, _react["default"].createElement("div", {
11034
11154
  ref: this.ref
11035
11155
  }));
11036
11156
  }
@@ -11088,16 +11208,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
11088
11208
 
11089
11209
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
11090
11210
 
11091
- 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); }; }
11092
-
11093
11211
  function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
11094
11212
 
11095
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
11096
-
11097
- 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; } }
11098
-
11099
11213
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
11100
11214
 
11215
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
11216
+
11101
11217
  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); }
11102
11218
 
11103
11219
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
@@ -11108,12 +11224,14 @@ var SDK_URL = 'https://widget.mixcloud.com/media/js/widgetApi.js';
11108
11224
  var SDK_GLOBAL = 'Mixcloud';
11109
11225
  var MATCH_URL = /mixcloud\.com\/([^/]+\/[^/]+)/;
11110
11226
 
11111
- var Mixcloud = /*#__PURE__*/function (_Component) {
11227
+ var Mixcloud =
11228
+ /*#__PURE__*/
11229
+ function (_Component) {
11112
11230
  _inherits(Mixcloud, _Component);
11113
11231
 
11114
- var _super = _createSuper(Mixcloud);
11115
-
11116
11232
  function Mixcloud() {
11233
+ var _getPrototypeOf2;
11234
+
11117
11235
  var _this;
11118
11236
 
11119
11237
  _classCallCheck(this, Mixcloud);
@@ -11122,7 +11240,7 @@ var Mixcloud = /*#__PURE__*/function (_Component) {
11122
11240
  args[_key] = arguments[_key];
11123
11241
  }
11124
11242
 
11125
- _this = _super.call.apply(_super, [this].concat(args));
11243
+ _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Mixcloud)).call.apply(_getPrototypeOf2, [this].concat(args)));
11126
11244
 
11127
11245
  _defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
11128
11246
 
@@ -11225,7 +11343,7 @@ var Mixcloud = /*#__PURE__*/function (_Component) {
11225
11343
  })); // We have to give the iframe a key here to prevent a
11226
11344
  // weird dialog appearing when loading a new track
11227
11345
 
11228
- return /*#__PURE__*/_react["default"].createElement("iframe", {
11346
+ return _react["default"].createElement("iframe", {
11229
11347
  key: id,
11230
11348
  ref: this.ref,
11231
11349
  style: style,
@@ -11285,33 +11403,23 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
11285
11403
 
11286
11404
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
11287
11405
 
11288
- 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); }; }
11289
-
11290
11406
  function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
11291
11407
 
11292
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
11293
-
11294
- 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; } }
11295
-
11296
11408
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
11297
11409
 
11410
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
11411
+
11298
11412
  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); }
11299
11413
 
11300
11414
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
11301
11415
 
11302
11416
  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; }
11303
11417
 
11304
- 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; } } }; }
11305
-
11306
- 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); }
11307
-
11308
- 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; }
11309
-
11310
11418
  var IOS = typeof navigator !== 'undefined' && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
11311
11419
  var AUDIO_EXTENSIONS = /\.(m4a|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i;
11312
11420
  var VIDEO_EXTENSIONS = /\.(mp4|og[gv]|webm|mov|m4v)($|\?)/i;
11313
11421
  var HLS_EXTENSIONS = /\.(m3u8)($|\?)/i;
11314
- var HLS_SDK_URL = 'https://cdn.jsdelivr.net/npm/hls.js@VERSION/dist/hls.min.js';
11422
+ var HLS_SDK_URL = 'https://cdn.jsdelivr.net/npm/hls.js@VERSION';
11315
11423
  var HLS_GLOBAL = 'Hls';
11316
11424
  var DASH_EXTENSIONS = /\.(mpd)($|\?)/i;
11317
11425
  var DASH_SDK_URL = 'https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js';
@@ -11320,11 +11428,12 @@ var MATCH_DROPBOX_URL = /www\.dropbox\.com\/.+/;
11320
11428
 
11321
11429
  function canPlay(url) {
11322
11430
  if (url instanceof Array) {
11323
- var _iterator = _createForOfIteratorHelper(url),
11324
- _step;
11431
+ var _iteratorNormalCompletion = true;
11432
+ var _didIteratorError = false;
11433
+ var _iteratorError = undefined;
11325
11434
 
11326
11435
  try {
11327
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
11436
+ for (var _iterator = url[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
11328
11437
  var item = _step.value;
11329
11438
 
11330
11439
  if (typeof item === 'string' && canPlay(item)) {
@@ -11336,9 +11445,18 @@ function canPlay(url) {
11336
11445
  }
11337
11446
  }
11338
11447
  } catch (err) {
11339
- _iterator.e(err);
11448
+ _didIteratorError = true;
11449
+ _iteratorError = err;
11340
11450
  } finally {
11341
- _iterator.f();
11451
+ try {
11452
+ if (!_iteratorNormalCompletion && _iterator["return"] != null) {
11453
+ _iterator["return"]();
11454
+ }
11455
+ } finally {
11456
+ if (_didIteratorError) {
11457
+ throw _iteratorError;
11458
+ }
11459
+ }
11342
11460
  }
11343
11461
 
11344
11462
  return false;
@@ -11362,12 +11480,14 @@ function canEnablePIP(url) {
11362
11480
  return canPlay(url) && (!!document.pictureInPictureEnabled || supportsWebKitPresentationMode()) && !AUDIO_EXTENSIONS.test(url);
11363
11481
  }
11364
11482
 
11365
- var FilePlayer = /*#__PURE__*/function (_Component) {
11483
+ var FilePlayer =
11484
+ /*#__PURE__*/
11485
+ function (_Component) {
11366
11486
  _inherits(FilePlayer, _Component);
11367
11487
 
11368
- var _super = _createSuper(FilePlayer);
11369
-
11370
11488
  function FilePlayer() {
11489
+ var _getPrototypeOf2;
11490
+
11371
11491
  var _this;
11372
11492
 
11373
11493
  _classCallCheck(this, FilePlayer);
@@ -11376,7 +11496,7 @@ var FilePlayer = /*#__PURE__*/function (_Component) {
11376
11496
  _args[_key] = arguments[_key];
11377
11497
  }
11378
11498
 
11379
- _this = _super.call.apply(_super, [this].concat(_args));
11499
+ _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(FilePlayer)).call.apply(_getPrototypeOf2, [this].concat(_args)));
11380
11500
 
11381
11501
  _defineProperty(_assertThisInitialized(_this), "onReady", function () {
11382
11502
  var _this$props;
@@ -11463,19 +11583,19 @@ var FilePlayer = /*#__PURE__*/function (_Component) {
11463
11583
 
11464
11584
  _defineProperty(_assertThisInitialized(_this), "renderSourceElement", function (source, index) {
11465
11585
  if (typeof source === 'string') {
11466
- return /*#__PURE__*/_react["default"].createElement("source", {
11586
+ return _react["default"].createElement("source", {
11467
11587
  key: index,
11468
11588
  src: source
11469
11589
  });
11470
11590
  }
11471
11591
 
11472
- return /*#__PURE__*/_react["default"].createElement("source", _extends({
11592
+ return _react["default"].createElement("source", _extends({
11473
11593
  key: index
11474
11594
  }, source));
11475
11595
  });
11476
11596
 
11477
11597
  _defineProperty(_assertThisInitialized(_this), "renderTrack", function (track, index) {
11478
- return /*#__PURE__*/_react["default"].createElement("track", _extends({
11598
+ return _react["default"].createElement("track", _extends({
11479
11599
  key: index
11480
11600
  }, track));
11481
11601
  });
@@ -11513,10 +11633,6 @@ var FilePlayer = /*#__PURE__*/function (_Component) {
11513
11633
  key: "componentWillUnmount",
11514
11634
  value: function componentWillUnmount() {
11515
11635
  this.removeListeners(this.player);
11516
-
11517
- if (this.hls) {
11518
- this.hls.destroy();
11519
- }
11520
11636
  }
11521
11637
  }, {
11522
11638
  key: "addListeners",
@@ -11647,6 +11763,10 @@ var FilePlayer = /*#__PURE__*/function (_Component) {
11647
11763
  value: function stop() {
11648
11764
  this.player.removeAttribute('src');
11649
11765
 
11766
+ if (this.hls) {
11767
+ this.hls.destroy();
11768
+ }
11769
+
11650
11770
  if (this.dash) {
11651
11771
  this.dash.reset();
11652
11772
  }
@@ -11758,7 +11878,7 @@ var FilePlayer = /*#__PURE__*/function (_Component) {
11758
11878
  width: width === 'auto' ? width : '100%',
11759
11879
  height: height === 'auto' ? height : '100%'
11760
11880
  };
11761
- return /*#__PURE__*/_react["default"].createElement(Element, _extends({
11881
+ return _react["default"].createElement(Element, _extends({
11762
11882
  ref: this.ref,
11763
11883
  src: this.getSource(url),
11764
11884
  style: style,
@@ -11848,16 +11968,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
11848
11968
 
11849
11969
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
11850
11970
 
11851
- 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); }; }
11852
-
11853
11971
  function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
11854
11972
 
11855
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
11856
-
11857
- 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; } }
11858
-
11859
11973
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
11860
11974
 
11975
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
11976
+
11861
11977
  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); }
11862
11978
 
11863
11979
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
@@ -11866,12 +11982,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
11866
11982
 
11867
11983
  var ICON_SIZE = '64px';
11868
11984
 
11869
- var Preview = /*#__PURE__*/function (_Component) {
11985
+ var Preview =
11986
+ /*#__PURE__*/
11987
+ function (_Component) {
11870
11988
  _inherits(Preview, _Component);
11871
11989
 
11872
- var _super = _createSuper(Preview);
11873
-
11874
11990
  function Preview() {
11991
+ var _getPrototypeOf2;
11992
+
11875
11993
  var _this;
11876
11994
 
11877
11995
  _classCallCheck(this, Preview);
@@ -11880,7 +11998,7 @@ var Preview = /*#__PURE__*/function (_Component) {
11880
11998
  args[_key] = arguments[_key];
11881
11999
  }
11882
12000
 
11883
- _this = _super.call.apply(_super, [this].concat(args));
12001
+ _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Preview)).call.apply(_getPrototypeOf2, [this].concat(args)));
11884
12002
 
11885
12003
  _defineProperty(_assertThisInitialized(_this), "mounted", false);
11886
12004
 
@@ -11978,15 +12096,15 @@ var Preview = /*#__PURE__*/function (_Component) {
11978
12096
  }
11979
12097
  };
11980
12098
 
11981
- var defaultPlayIcon = /*#__PURE__*/_react["default"].createElement("div", {
12099
+ var defaultPlayIcon = _react["default"].createElement("div", {
11982
12100
  style: styles.shadow,
11983
12101
  className: "react-player__shadow"
11984
- }, /*#__PURE__*/_react["default"].createElement("div", {
12102
+ }, _react["default"].createElement("div", {
11985
12103
  style: styles.playIcon,
11986
12104
  className: "react-player__play-icon"
11987
12105
  }));
11988
12106
 
11989
- return /*#__PURE__*/_react["default"].createElement("div", {
12107
+ return _react["default"].createElement("div", {
11990
12108
  style: styles.preview,
11991
12109
  className: "react-player__preview",
11992
12110
  onClick: onClick
@@ -12023,12 +12141,6 @@ var _Player = _interopRequireDefault(Player_1);
12023
12141
 
12024
12142
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
12025
12143
 
12026
- 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; } } }; }
12027
-
12028
- 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); }
12029
-
12030
- 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; }
12031
-
12032
12144
  var PRELOAD_PLAYERS = [{
12033
12145
  Player: YouTube_1.YouTube,
12034
12146
  configKey: 'youtube',
@@ -12049,16 +12161,16 @@ var PRELOAD_PLAYERS = [{
12049
12161
 
12050
12162
  function renderPreloadPlayers(url, controls, config) {
12051
12163
  var players = [];
12052
-
12053
- var _iterator = _createForOfIteratorHelper(PRELOAD_PLAYERS),
12054
- _step;
12164
+ var _iteratorNormalCompletion = true;
12165
+ var _didIteratorError = false;
12166
+ var _iteratorError = undefined;
12055
12167
 
12056
12168
  try {
12057
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
12169
+ for (var _iterator = PRELOAD_PLAYERS[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
12058
12170
  var player = _step.value;
12059
12171
 
12060
12172
  if (!player.Player.canPlay(url) && config[player.configKey].preload) {
12061
- players.push( /*#__PURE__*/_react["default"].createElement(_Player["default"], {
12173
+ players.push(_react["default"].createElement(_Player["default"], {
12062
12174
  key: player.Player.displayName,
12063
12175
  activePlayer: player.Player,
12064
12176
  url: player.url,
@@ -12070,9 +12182,18 @@ function renderPreloadPlayers(url, controls, config) {
12070
12182
  }
12071
12183
  }
12072
12184
  } catch (err) {
12073
- _iterator.e(err);
12185
+ _didIteratorError = true;
12186
+ _iteratorError = err;
12074
12187
  } finally {
12075
- _iterator.f();
12188
+ try {
12189
+ if (!_iteratorNormalCompletion && _iterator["return"] != null) {
12190
+ _iterator["return"]();
12191
+ }
12192
+ } finally {
12193
+ if (_didIteratorError) {
12194
+ throw _iteratorError;
12195
+ }
12196
+ }
12076
12197
  }
12077
12198
 
12078
12199
  return players;
@@ -12196,17 +12317,13 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
12196
12317
 
12197
12318
  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); }
12198
12319
 
12199
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
12200
-
12201
- 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."); }
12320
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
12202
12321
 
12203
- 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); }
12322
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
12204
12323
 
12205
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
12324
+ function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
12206
12325
 
12207
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
12208
-
12209
- 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; }
12326
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
12210
12327
 
12211
12328
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
12212
12329
 
@@ -12214,16 +12331,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
12214
12331
 
12215
12332
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
12216
12333
 
12217
- 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); }; }
12218
-
12219
12334
  function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
12220
12335
 
12221
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
12222
-
12223
- 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; } }
12224
-
12225
12336
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
12226
12337
 
12338
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
12339
+
12227
12340
  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); }
12228
12341
 
12229
12342
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
@@ -12233,12 +12346,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
12233
12346
  var SUPPORTED_PROPS = Object.keys(props.propTypes);
12234
12347
  var customPlayers = [];
12235
12348
 
12236
- var ReactPlayer = /*#__PURE__*/function (_Component) {
12349
+ var ReactPlayer =
12350
+ /*#__PURE__*/
12351
+ function (_Component) {
12237
12352
  _inherits(ReactPlayer, _Component);
12238
12353
 
12239
- var _super = _createSuper(ReactPlayer);
12240
-
12241
12354
  function ReactPlayer() {
12355
+ var _getPrototypeOf2;
12356
+
12242
12357
  var _this;
12243
12358
 
12244
12359
  _classCallCheck(this, ReactPlayer);
@@ -12247,7 +12362,7 @@ var ReactPlayer = /*#__PURE__*/function (_Component) {
12247
12362
  args[_key] = arguments[_key];
12248
12363
  }
12249
12364
 
12250
- _this = _super.call.apply(_super, [this].concat(args));
12365
+ _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(ReactPlayer)).call.apply(_getPrototypeOf2, [this].concat(args)));
12251
12366
 
12252
12367
  _defineProperty(_assertThisInitialized(_this), "config", (0, utils.getConfig)(_this.props, props.defaultProps, true));
12253
12368
 
@@ -12358,7 +12473,7 @@ var ReactPlayer = /*#__PURE__*/function (_Component) {
12358
12473
  key: "renderActivePlayer",
12359
12474
  value: function renderActivePlayer(url, activePlayer) {
12360
12475
  if (!url) return null;
12361
- return /*#__PURE__*/_react["default"].createElement(_Player4["default"], _extends({}, this.props, {
12476
+ return _react["default"].createElement(_Player4["default"], _extends({}, this.props, {
12362
12477
  key: activePlayer.displayName,
12363
12478
  ref: this.activePlayerRef,
12364
12479
  config: this.config,
@@ -12395,14 +12510,14 @@ var ReactPlayer = /*#__PURE__*/function (_Component) {
12395
12510
  var preloadPlayers = (0, _preload["default"])(url, controls, this.config);
12396
12511
  var players = [renderedActivePlayer].concat(_toConsumableArray(preloadPlayers)).sort(this.sortPlayers);
12397
12512
 
12398
- var preview = /*#__PURE__*/_react["default"].createElement(_Preview["default"], {
12513
+ var preview = _react["default"].createElement(_Preview["default"], {
12399
12514
  url: url,
12400
12515
  light: light,
12401
12516
  playIcon: playIcon,
12402
12517
  onClick: this.handleClickPreview
12403
12518
  });
12404
12519
 
12405
- return /*#__PURE__*/_react["default"].createElement(Wrapper, _extends({
12520
+ return _react["default"].createElement(Wrapper, _extends({
12406
12521
  ref: this.wrapperRef,
12407
12522
  style: _objectSpread({}, style, {
12408
12523
  width: width,
@@ -13376,161 +13491,6 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
13376
13491
 
13377
13492
  var Breadcrumbs$1 = React__default.memo(Breadcrumbs);
13378
13493
 
13379
- var js_cookie = _commonjsHelpers.createCommonjsModule(function (module, exports) {
13380
- (function (factory) {
13381
- var registeredInModuleLoader;
13382
- {
13383
- module.exports = factory();
13384
- registeredInModuleLoader = true;
13385
- }
13386
- if (!registeredInModuleLoader) {
13387
- var OldCookies = window.Cookies;
13388
- var api = window.Cookies = factory();
13389
- api.noConflict = function () {
13390
- window.Cookies = OldCookies;
13391
- return api;
13392
- };
13393
- }
13394
- }(function () {
13395
- function extend () {
13396
- var i = 0;
13397
- var result = {};
13398
- for (; i < arguments.length; i++) {
13399
- var attributes = arguments[ i ];
13400
- for (var key in attributes) {
13401
- result[key] = attributes[key];
13402
- }
13403
- }
13404
- return result;
13405
- }
13406
-
13407
- function decode (s) {
13408
- return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);
13409
- }
13410
-
13411
- function init (converter) {
13412
- function api() {}
13413
-
13414
- function set (key, value, attributes) {
13415
- if (typeof document === 'undefined') {
13416
- return;
13417
- }
13418
-
13419
- attributes = extend({
13420
- path: '/'
13421
- }, api.defaults, attributes);
13422
-
13423
- if (typeof attributes.expires === 'number') {
13424
- attributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5);
13425
- }
13426
-
13427
- // We're using "expires" because "max-age" is not supported by IE
13428
- attributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';
13429
-
13430
- try {
13431
- var result = JSON.stringify(value);
13432
- if (/^[\{\[]/.test(result)) {
13433
- value = result;
13434
- }
13435
- } catch (e) {}
13436
-
13437
- value = converter.write ?
13438
- converter.write(value, key) :
13439
- encodeURIComponent(String(value))
13440
- .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
13441
-
13442
- key = encodeURIComponent(String(key))
13443
- .replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)
13444
- .replace(/[\(\)]/g, escape);
13445
-
13446
- var stringifiedAttributes = '';
13447
- for (var attributeName in attributes) {
13448
- if (!attributes[attributeName]) {
13449
- continue;
13450
- }
13451
- stringifiedAttributes += '; ' + attributeName;
13452
- if (attributes[attributeName] === true) {
13453
- continue;
13454
- }
13455
-
13456
- // Considers RFC 6265 section 5.2:
13457
- // ...
13458
- // 3. If the remaining unparsed-attributes contains a %x3B (";")
13459
- // character:
13460
- // Consume the characters of the unparsed-attributes up to,
13461
- // not including, the first %x3B (";") character.
13462
- // ...
13463
- stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
13464
- }
13465
-
13466
- return (document.cookie = key + '=' + value + stringifiedAttributes);
13467
- }
13468
-
13469
- function get (key, json) {
13470
- if (typeof document === 'undefined') {
13471
- return;
13472
- }
13473
-
13474
- var jar = {};
13475
- // To prevent the for loop in the first place assign an empty array
13476
- // in case there are no cookies at all.
13477
- var cookies = document.cookie ? document.cookie.split('; ') : [];
13478
- var i = 0;
13479
-
13480
- for (; i < cookies.length; i++) {
13481
- var parts = cookies[i].split('=');
13482
- var cookie = parts.slice(1).join('=');
13483
-
13484
- if (!json && cookie.charAt(0) === '"') {
13485
- cookie = cookie.slice(1, -1);
13486
- }
13487
-
13488
- try {
13489
- var name = decode(parts[0]);
13490
- cookie = (converter.read || converter)(cookie, name) ||
13491
- decode(cookie);
13492
-
13493
- if (json) {
13494
- try {
13495
- cookie = JSON.parse(cookie);
13496
- } catch (e) {}
13497
- }
13498
-
13499
- jar[name] = cookie;
13500
-
13501
- if (key === name) {
13502
- break;
13503
- }
13504
- } catch (e) {}
13505
- }
13506
-
13507
- return key ? jar[key] : jar;
13508
- }
13509
-
13510
- api.set = set;
13511
- api.get = function (key) {
13512
- return get(key, false /* read as raw */);
13513
- };
13514
- api.getJSON = function (key) {
13515
- return get(key, true /* read as json */);
13516
- };
13517
- api.remove = function (key, attributes) {
13518
- set(key, '', extend(attributes, {
13519
- expires: -1
13520
- }));
13521
- };
13522
-
13523
- api.defaults = {};
13524
-
13525
- api.withConverter = init;
13526
-
13527
- return api;
13528
- }
13529
-
13530
- return init(function () {});
13531
- }));
13532
- });
13533
-
13534
13494
  var SetCookie = function SetCookie(key, value) {
13535
13495
  js_cookie.set(key, value, { expires: 1, sameSite: 'none', secure: true });
13536
13496
  };
@@ -13750,16 +13710,16 @@ var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
13750
13710
  _ref$className = _ref.className,
13751
13711
  className = _ref$className === undefined ? '' : _ref$className;
13752
13712
 
13753
- /*
13754
- Props accepted - parentTaxonomy(required, object), subTaxonomy(required, array), page(optional), exclude(optional), variant(optional), className(optional)
13755
- example:
13756
- <RelatedTopicDropdown
13757
- page='/clinical'
13758
- exclude="clinical"
13759
- className='mb-3'
13760
- parentTaxonomy={props.parentTaxonomy}
13761
- subTaxonomies={props.subTaxonomies}
13762
- />
13713
+ /*
13714
+ Props accepted - parentTaxonomy(required, object), subTaxonomy(required, array), page(optional), exclude(optional), variant(optional), className(optional)
13715
+ example:
13716
+ <RelatedTopicDropdown
13717
+ page='/clinical'
13718
+ exclude="clinical"
13719
+ className='mb-3'
13720
+ parentTaxonomy={props.parentTaxonomy}
13721
+ subTaxonomies={props.subTaxonomies}
13722
+ />
13763
13723
  */
13764
13724
  if (subTaxonomies.length === 0 && parentTaxonomy) {
13765
13725
  if (parentTaxonomy.identifier == exclude) {
@@ -13797,19 +13757,19 @@ var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
13797
13757
  }
13798
13758
  };
13799
13759
 
13800
- /*
13801
- This dropdown is used inside Article body to display related content placement pages
13802
- sample usage: <ArticleDetailDropdown contentPlacement={content_placement} exclude={['News',]} />
13803
-
13804
- in article query, need to add '...' to content_placement to retreive additional info needed
13805
-
13806
- 'content_placement': taxonomyMapping[]-> {
13807
- ...,
13808
- 'ancestor': parent->parent->identifier,
13809
- 'parent': parent->identifier,
13810
- 'path': identifier
13811
- }
13812
-
13760
+ /*
13761
+ This dropdown is used inside Article body to display related content placement pages
13762
+ sample usage: <ArticleDetailDropdown contentPlacement={content_placement} exclude={['News',]} />
13763
+
13764
+ in article query, need to add '...' to content_placement to retreive additional info needed
13765
+
13766
+ 'content_placement': taxonomyMapping[]-> {
13767
+ ...,
13768
+ 'ancestor': parent->parent->identifier,
13769
+ 'parent': parent->identifier,
13770
+ 'path': identifier
13771
+ }
13772
+
13813
13773
  */
13814
13774
 
13815
13775
  var ArticleDetailDropdown = function ArticleDetailDropdown(props) {
@@ -14480,34 +14440,34 @@ var YahooHero = function YahooHero(props) {
14480
14440
  );
14481
14441
  };
14482
14442
 
14483
- /*
14484
- Sample query
14485
- let references = ''
14486
- if(article.taxonomyMapping.length > 0){
14487
- article.taxonomyMapping.forEach((ref, index) => {
14488
- references = references + `references('${ref._ref}') `
14489
- if(index+1 !== article.taxonomyMapping.length){
14490
- references = references + ` && `
14491
- }
14492
- })
14493
- }
14494
-
14495
- const relatedArticlesQuery = `*[!(_id in path("drafts.**")) && _type == "article" && title !='${article.title}' && defined(title) && is_visible == true && ( references('article.documentGroup._id') || ${references} ) && published <= '${today}'] | order(published desc) [0...4] {
14496
- ...,
14497
- title,
14498
- summary,
14499
- thumbnail,
14500
- url,
14501
- published,
14502
- authorMapping[]->,
14503
- contentCategory->
14504
- }`
14505
- const relatedArticles = await client.fetch(relatedArticlesQuery)
14506
-
14507
- Sample usage
14508
- <RelatedContent dataRecord={props.relatedArticles} client={client} showAuthor showPublished reverse/>
14509
-
14510
-
14443
+ /*
14444
+ Sample query
14445
+ let references = ''
14446
+ if(article.taxonomyMapping.length > 0){
14447
+ article.taxonomyMapping.forEach((ref, index) => {
14448
+ references = references + `references('${ref._ref}') `
14449
+ if(index+1 !== article.taxonomyMapping.length){
14450
+ references = references + ` && `
14451
+ }
14452
+ })
14453
+ }
14454
+
14455
+ const relatedArticlesQuery = `*[!(_id in path("drafts.**")) && _type == "article" && title !='${article.title}' && defined(title) && is_visible == true && ( references('article.documentGroup._id') || ${references} ) && published <= '${today}'] | order(published desc) [0...4] {
14456
+ ...,
14457
+ title,
14458
+ summary,
14459
+ thumbnail,
14460
+ url,
14461
+ published,
14462
+ authorMapping[]->,
14463
+ contentCategory->
14464
+ }`
14465
+ const relatedArticles = await client.fetch(relatedArticlesQuery)
14466
+
14467
+ Sample usage
14468
+ <RelatedContent dataRecord={props.relatedArticles} client={client} showAuthor showPublished reverse/>
14469
+
14470
+
14511
14471
  */
14512
14472
  var RelatedContent = function RelatedContent(props) {
14513
14473
  var client = props.client,
@@ -14574,21 +14534,21 @@ var RelatedContent = function RelatedContent(props) {
14574
14534
  );
14575
14535
  };
14576
14536
 
14577
- /*
14578
- Example usage - targetedonc.com/latest-conference
14579
- const query = `*[!(_id in path("drafts.**")) && _type == "article" && defined(title) && is_visible == true && published <= '${today}' && references('b49d36b8-aa56-4183-a2bc-1568c229fb72') ] | order(published desc) [$from...$to] {
14580
- ...,
14581
- title,
14582
- summary,
14583
- thumbnail,
14584
- url,
14585
- published,
14586
- documentGroup->,
14587
- contentCategory->,
14588
- 'pageNumber': ${currentPage}
14589
- }`
14590
-
14591
- const posts = await client.fetch(query, params)
14537
+ /*
14538
+ Example usage - targetedonc.com/latest-conference
14539
+ const query = `*[!(_id in path("drafts.**")) && _type == "article" && defined(title) && is_visible == true && published <= '${today}' && references('b49d36b8-aa56-4183-a2bc-1568c229fb72') ] | order(published desc) [$from...$to] {
14540
+ ...,
14541
+ title,
14542
+ summary,
14543
+ thumbnail,
14544
+ url,
14545
+ published,
14546
+ documentGroup->,
14547
+ contentCategory->,
14548
+ 'pageNumber': ${currentPage}
14549
+ }`
14550
+
14551
+ const posts = await client.fetch(query, params)
14592
14552
  */
14593
14553
 
14594
14554
  var ConferenceArticleCard = function ConferenceArticleCard(props) {