@mjhls/mjh-framework 1.0.239 → 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.
- package/README.md +1 -1
- package/dist/cjs/AdSlot-c472fff6.js +1192 -0
- package/dist/cjs/DeckContent.js +6 -5
- package/dist/cjs/DeckQueue.js +5 -5
- package/dist/cjs/{Dfp-045b016b.js → Dfp-7a5533f9.js} +1 -1
- package/dist/cjs/{GridContent-21bc198f.js → GridContent-463c504f.js} +7 -7
- package/dist/cjs/GridContent.js +8 -7
- package/dist/cjs/MasterDeck.js +331 -13
- package/dist/cjs/{Normal-c89b709d.js → Normal-0f06cc52.js} +3 -3
- package/dist/cjs/QueueDeckExpanded.js +2 -2
- package/dist/cjs/TemplateNormal.js +6 -5
- package/dist/cjs/VideoSeriesListing.js +2 -2
- package/dist/cjs/{debounce-bbca43c4.js → debounce-783eb233.js} +3 -0
- package/dist/cjs/{get-af2516a4.js → get-1f91592f.js} +1 -1
- package/dist/cjs/index.js +399 -1151
- package/dist/cjs/{inherits-5b5ca8db.js → inherits-9898af5a.js} +2 -4
- package/dist/cjs/{main-d9a1b014.js → main-0ea1b808.js} +51 -0
- package/dist/cjs/{MasterDeck-f8fbac3c.js → promise-b96c61f8.js} +7 -340
- package/dist/cjs/{toConsumableArray-7e4caf3c.js → toConsumableArray-f05a306f.js} +5 -52
- package/dist/esm/AdSlot-bdd7a629.js +1183 -0
- package/dist/esm/DeckContent.js +11 -10
- package/dist/esm/DeckQueue.js +9 -9
- package/dist/esm/{Dfp-01f14ae3.js → Dfp-71879c9d.js} +5 -5
- package/dist/esm/{GridContent-73c97039.js → GridContent-2a48fb19.js} +8 -8
- package/dist/esm/GridContent.js +13 -12
- package/dist/esm/MasterDeck.js +333 -15
- package/dist/esm/{Normal-fdd55386.js → Normal-aa76b53c.js} +4 -4
- package/dist/esm/QueueDeckExpanded.js +7 -7
- package/dist/esm/{TaxonomyCard-a7b7ded8.js → TaxonomyCard-2d0ab635.js} +1 -1
- package/dist/esm/TaxonomyCard.js +3 -3
- package/dist/esm/TemplateNormal.js +10 -9
- package/dist/esm/{Ustream-62a07a32.js → Ustream-d51b9b11.js} +1 -1
- package/dist/esm/Ustream.js +5 -5
- package/dist/esm/VideoSeriesListing.js +5 -5
- package/dist/esm/{_to-object-86553f76.js → _to-object-b9b796ec.js} +1 -1
- package/dist/esm/{core.get-iterator-method-709061dc.js → core.get-iterator-method-31c1fb1a.js} +2 -2
- package/dist/esm/{debounce-fa7fbf11.js → debounce-806f886b.js} +3 -1
- package/dist/esm/{extends-7f88fa22.js → extends-dbbe308d.js} +1 -1
- package/dist/esm/{get-8d382479.js → get-b2201dc8.js} +1 -1
- package/dist/esm/index.js +407 -1161
- package/dist/esm/{inherits-a82a4471.js → inherits-a75c8a1c.js} +5 -6
- package/dist/esm/{main-eecf7b27.js → main-155ec04f.js} +48 -1
- package/dist/esm/{MasterDeck-238f31d7.js → promise-683a9c54.js} +6 -335
- package/dist/esm/{slicedToArray-eb7eca9e.js → slicedToArray-d0a9593a.js} +3 -3
- package/dist/esm/{toConsumableArray-08d50169.js → toConsumableArray-eb308ede.js} +5 -49
- package/dist/esm/{web.dom.iterable-f05d2f57.js → web.dom.iterable-3be50d6c.js} +2 -2
- package/package.json +4 -2
- package/dist/cjs/AdSlot-1fe1c231.js +0 -69
- package/dist/esm/AdSlot-017b8051.js +0 -64
package/dist/esm/index.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { c as createCommonjsModule,
|
|
2
|
-
import { _ as
|
|
3
|
-
import './web.dom.iterable-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import './
|
|
7
|
-
import
|
|
8
|
-
import
|
|
1
|
+
import { c as createCommonjsModule, a as commonjsGlobal, g as getCjsExportFromNamespace, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
|
|
2
|
+
import { _ as _objectKeys, a as _toObject, b as _core } from './_to-object-b9b796ec.js';
|
|
3
|
+
import './web.dom.iterable-3be50d6c.js';
|
|
4
|
+
import { d as debounce_1 } from './debounce-806f886b.js';
|
|
5
|
+
import { m as main_36, a as main_16, b as main_35 } from './main-155ec04f.js';
|
|
6
|
+
import { _ as _toConsumableArray, a as _Array$from } from './toConsumableArray-eb308ede.js';
|
|
7
|
+
import './core.get-iterator-method-31c1fb1a.js';
|
|
8
|
+
import { _ as _extends$2 } from './extends-dbbe308d.js';
|
|
9
|
+
import { _ as _objectSap, a as _inherits$1, b as _classCallCheck$1, c as _possibleConstructorReturn$1, d as _Object$getPrototypeOf, e as _createClass$1 } from './inherits-a75c8a1c.js';
|
|
10
|
+
import React__default, { useState, useRef, useEffect } from 'react';
|
|
9
11
|
import { l as lib_3, a as lib_1 } from './index-fa84ea96.js';
|
|
10
12
|
import PropTypes from 'prop-types';
|
|
11
13
|
import Container from 'react-bootstrap/Container';
|
|
@@ -15,23 +17,22 @@ import 'react-bootstrap/Card';
|
|
|
15
17
|
import { m as moment, I as InfiniteScroll, V as VisibilitySensor } from './visibility-sensor-336093e1.js';
|
|
16
18
|
import Link from 'next/link';
|
|
17
19
|
import Router, { useRouter } from 'next/router';
|
|
18
|
-
import { d as debounce_1 } from './debounce-fa7fbf11.js';
|
|
19
20
|
import 'react-dom';
|
|
20
21
|
import { i as imageUrlBuilder } from './index-73819142.js';
|
|
21
22
|
import './index-5f9f807a.js';
|
|
22
|
-
import { m as main_36, a as main_35 } from './main-eecf7b27.js';
|
|
23
23
|
import { h as html_decode_1, c as clean_html_1 } from './entities-7cc3bf45.js';
|
|
24
|
-
import { _ as _slicedToArray } from './slicedToArray-
|
|
25
|
-
import { D as DFPAdSlot } from './AdSlot-
|
|
26
|
-
export { D as AdSlot } from './AdSlot-
|
|
24
|
+
import { _ as _slicedToArray } from './slicedToArray-d0a9593a.js';
|
|
25
|
+
import { _ as _JSON$stringify, a as _asyncToGenerator, r as regenerator, D as DFPAdSlot, B as Beam } from './AdSlot-bdd7a629.js';
|
|
26
|
+
export { D as AdSlot, B as Beam } from './AdSlot-bdd7a629.js';
|
|
27
|
+
import './promise-683a9c54.js';
|
|
27
28
|
export { default as DeckContent } from './DeckContent.js';
|
|
28
|
-
import './get-
|
|
29
|
-
export { A as AD, G as GridContent } from './GridContent-
|
|
29
|
+
import './get-b2201dc8.js';
|
|
30
|
+
export { A as AD, G as GridContent } from './GridContent-2a48fb19.js';
|
|
30
31
|
export { default as DeckQueue } from './DeckQueue.js';
|
|
31
32
|
import 'react-bootstrap/Media';
|
|
32
33
|
export { default as ThumbnailCard } from './ThumbnailCard.js';
|
|
33
|
-
import { B as BlockContent } from './TaxonomyCard-
|
|
34
|
-
export { T as TaxonomyCard } from './TaxonomyCard-
|
|
34
|
+
import { B as BlockContent } from './TaxonomyCard-2d0ab635.js';
|
|
35
|
+
export { T as TaxonomyCard } from './TaxonomyCard-2d0ab635.js';
|
|
35
36
|
import GroupDeck from './GroupDeck.js';
|
|
36
37
|
export { default as GroupDeck } from './GroupDeck.js';
|
|
37
38
|
import { g as getYoutubeId } from './YoutubeGroup-78d93d44.js';
|
|
@@ -40,16 +41,15 @@ import { Spinner as Spinner$1, Container as Container$1, Row as Row$1, Col as Co
|
|
|
40
41
|
export { default as QueueDeckExpanded } from './QueueDeckExpanded.js';
|
|
41
42
|
import { I as IoMdArrowDropdown } from './index.esm-536609db.js';
|
|
42
43
|
export { default as VideoSeriesListing } from './VideoSeriesListing.js';
|
|
43
|
-
|
|
44
|
-
export { M as MasterDeck } from './MasterDeck-238f31d7.js';
|
|
44
|
+
export { default as MasterDeck } from './MasterDeck.js';
|
|
45
45
|
import Button from 'react-bootstrap/Button';
|
|
46
46
|
export { default as PublicationDeck } from './PublicationDeck.js';
|
|
47
47
|
export { default as IssueDeck } from './IssueDeck.js';
|
|
48
48
|
import 'react-bootstrap/Badge';
|
|
49
49
|
export { default as IssueContentDeck } from './IssueContentDeck.js';
|
|
50
50
|
import Spinner from 'react-bootstrap/Spinner';
|
|
51
|
-
import { M as MdPictureAsPdf, T as TemplateNormal } from './Normal-
|
|
52
|
-
export { A as AD728x90, C as Column1, a as Column2, b as Column3, f as HamMagazine, H as Header, L as LeftNav, e as NavDvm, c as NavMagazine, N as NavNative, d as NavNormal, P as PageFilter, S as Search, g as SideFooter, T as TemplateNormal } from './Normal-
|
|
51
|
+
import { M as MdPictureAsPdf, T as TemplateNormal } from './Normal-aa76b53c.js';
|
|
52
|
+
export { A as AD728x90, C as Column1, a as Column2, b as Column3, f as HamMagazine, H as Header, L as LeftNav, e as NavDvm, c as NavMagazine, N as NavNative, d as NavNormal, P as PageFilter, S as Search, g as SideFooter, T as TemplateNormal } from './Normal-aa76b53c.js';
|
|
53
53
|
import 'react-bootstrap/ListGroup';
|
|
54
54
|
import Head from 'next/head';
|
|
55
55
|
import Accordion from 'react-bootstrap/Accordion';
|
|
@@ -65,19 +65,8 @@ import Carousel$1 from 'react-bootstrap/Carousel';
|
|
|
65
65
|
import Breadcrumb from 'react-bootstrap/Breadcrumb';
|
|
66
66
|
import DropdownButton from 'react-bootstrap/DropdownButton';
|
|
67
67
|
import Dropdown from 'react-bootstrap/Dropdown';
|
|
68
|
-
import { F as FaLongArrowAltRight } from './Ustream-
|
|
69
|
-
export { U as Ustream } from './Ustream-
|
|
70
|
-
|
|
71
|
-
var $JSON = _core.JSON || (_core.JSON = { stringify: JSON.stringify });
|
|
72
|
-
var stringify = function stringify(it) { // eslint-disable-line no-unused-vars
|
|
73
|
-
return $JSON.stringify.apply($JSON, arguments);
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
var stringify$1 = createCommonjsModule(function (module) {
|
|
77
|
-
module.exports = { "default": stringify, __esModule: true };
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
var _JSON$stringify = unwrapExports(stringify$1);
|
|
68
|
+
import { F as FaLongArrowAltRight } from './Ustream-d51b9b11.js';
|
|
69
|
+
export { U as Ustream } from './Ustream-d51b9b11.js';
|
|
81
70
|
|
|
82
71
|
var momentTimezone = createCommonjsModule(function (module) {
|
|
83
72
|
//! moment-timezone.js
|
|
@@ -1630,12 +1619,12 @@ var latest = {
|
|
|
1630
1619
|
};
|
|
1631
1620
|
|
|
1632
1621
|
var latest$1 = /*#__PURE__*/Object.freeze({
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1622
|
+
__proto__: null,
|
|
1623
|
+
version: version,
|
|
1624
|
+
zones: zones,
|
|
1625
|
+
links: links,
|
|
1626
|
+
countries: countries,
|
|
1627
|
+
'default': latest
|
|
1639
1628
|
});
|
|
1640
1629
|
|
|
1641
1630
|
var require$$1 = getCjsExportFromNamespace(latest$1);
|
|
@@ -1645,10 +1634,166 @@ var moment = module.exports = momentTimezone;
|
|
|
1645
1634
|
moment.tz.load(require$$1);
|
|
1646
1635
|
});
|
|
1647
1636
|
|
|
1637
|
+
var js_cookie = createCommonjsModule(function (module, exports) {
|
|
1638
|
+
(function (factory) {
|
|
1639
|
+
var registeredInModuleLoader;
|
|
1640
|
+
{
|
|
1641
|
+
module.exports = factory();
|
|
1642
|
+
registeredInModuleLoader = true;
|
|
1643
|
+
}
|
|
1644
|
+
if (!registeredInModuleLoader) {
|
|
1645
|
+
var OldCookies = window.Cookies;
|
|
1646
|
+
var api = window.Cookies = factory();
|
|
1647
|
+
api.noConflict = function () {
|
|
1648
|
+
window.Cookies = OldCookies;
|
|
1649
|
+
return api;
|
|
1650
|
+
};
|
|
1651
|
+
}
|
|
1652
|
+
}(function () {
|
|
1653
|
+
function extend () {
|
|
1654
|
+
var i = 0;
|
|
1655
|
+
var result = {};
|
|
1656
|
+
for (; i < arguments.length; i++) {
|
|
1657
|
+
var attributes = arguments[ i ];
|
|
1658
|
+
for (var key in attributes) {
|
|
1659
|
+
result[key] = attributes[key];
|
|
1660
|
+
}
|
|
1661
|
+
}
|
|
1662
|
+
return result;
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1665
|
+
function decode (s) {
|
|
1666
|
+
return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);
|
|
1667
|
+
}
|
|
1668
|
+
|
|
1669
|
+
function init (converter) {
|
|
1670
|
+
function api() {}
|
|
1671
|
+
|
|
1672
|
+
function set (key, value, attributes) {
|
|
1673
|
+
if (typeof document === 'undefined') {
|
|
1674
|
+
return;
|
|
1675
|
+
}
|
|
1676
|
+
|
|
1677
|
+
attributes = extend({
|
|
1678
|
+
path: '/'
|
|
1679
|
+
}, api.defaults, attributes);
|
|
1680
|
+
|
|
1681
|
+
if (typeof attributes.expires === 'number') {
|
|
1682
|
+
attributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5);
|
|
1683
|
+
}
|
|
1684
|
+
|
|
1685
|
+
// We're using "expires" because "max-age" is not supported by IE
|
|
1686
|
+
attributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';
|
|
1687
|
+
|
|
1688
|
+
try {
|
|
1689
|
+
var result = JSON.stringify(value);
|
|
1690
|
+
if (/^[\{\[]/.test(result)) {
|
|
1691
|
+
value = result;
|
|
1692
|
+
}
|
|
1693
|
+
} catch (e) {}
|
|
1694
|
+
|
|
1695
|
+
value = converter.write ?
|
|
1696
|
+
converter.write(value, key) :
|
|
1697
|
+
encodeURIComponent(String(value))
|
|
1698
|
+
.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
|
|
1699
|
+
|
|
1700
|
+
key = encodeURIComponent(String(key))
|
|
1701
|
+
.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)
|
|
1702
|
+
.replace(/[\(\)]/g, escape);
|
|
1703
|
+
|
|
1704
|
+
var stringifiedAttributes = '';
|
|
1705
|
+
for (var attributeName in attributes) {
|
|
1706
|
+
if (!attributes[attributeName]) {
|
|
1707
|
+
continue;
|
|
1708
|
+
}
|
|
1709
|
+
stringifiedAttributes += '; ' + attributeName;
|
|
1710
|
+
if (attributes[attributeName] === true) {
|
|
1711
|
+
continue;
|
|
1712
|
+
}
|
|
1713
|
+
|
|
1714
|
+
// Considers RFC 6265 section 5.2:
|
|
1715
|
+
// ...
|
|
1716
|
+
// 3. If the remaining unparsed-attributes contains a %x3B (";")
|
|
1717
|
+
// character:
|
|
1718
|
+
// Consume the characters of the unparsed-attributes up to,
|
|
1719
|
+
// not including, the first %x3B (";") character.
|
|
1720
|
+
// ...
|
|
1721
|
+
stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
|
|
1722
|
+
}
|
|
1723
|
+
|
|
1724
|
+
return (document.cookie = key + '=' + value + stringifiedAttributes);
|
|
1725
|
+
}
|
|
1726
|
+
|
|
1727
|
+
function get (key, json) {
|
|
1728
|
+
if (typeof document === 'undefined') {
|
|
1729
|
+
return;
|
|
1730
|
+
}
|
|
1731
|
+
|
|
1732
|
+
var jar = {};
|
|
1733
|
+
// To prevent the for loop in the first place assign an empty array
|
|
1734
|
+
// in case there are no cookies at all.
|
|
1735
|
+
var cookies = document.cookie ? document.cookie.split('; ') : [];
|
|
1736
|
+
var i = 0;
|
|
1737
|
+
|
|
1738
|
+
for (; i < cookies.length; i++) {
|
|
1739
|
+
var parts = cookies[i].split('=');
|
|
1740
|
+
var cookie = parts.slice(1).join('=');
|
|
1741
|
+
|
|
1742
|
+
if (!json && cookie.charAt(0) === '"') {
|
|
1743
|
+
cookie = cookie.slice(1, -1);
|
|
1744
|
+
}
|
|
1745
|
+
|
|
1746
|
+
try {
|
|
1747
|
+
var name = decode(parts[0]);
|
|
1748
|
+
cookie = (converter.read || converter)(cookie, name) ||
|
|
1749
|
+
decode(cookie);
|
|
1750
|
+
|
|
1751
|
+
if (json) {
|
|
1752
|
+
try {
|
|
1753
|
+
cookie = JSON.parse(cookie);
|
|
1754
|
+
} catch (e) {}
|
|
1755
|
+
}
|
|
1756
|
+
|
|
1757
|
+
jar[name] = cookie;
|
|
1758
|
+
|
|
1759
|
+
if (key === name) {
|
|
1760
|
+
break;
|
|
1761
|
+
}
|
|
1762
|
+
} catch (e) {}
|
|
1763
|
+
}
|
|
1764
|
+
|
|
1765
|
+
return key ? jar[key] : jar;
|
|
1766
|
+
}
|
|
1767
|
+
|
|
1768
|
+
api.set = set;
|
|
1769
|
+
api.get = function (key) {
|
|
1770
|
+
return get(key, false /* read as raw */);
|
|
1771
|
+
};
|
|
1772
|
+
api.getJSON = function (key) {
|
|
1773
|
+
return get(key, true /* read as json */);
|
|
1774
|
+
};
|
|
1775
|
+
api.remove = function (key, attributes) {
|
|
1776
|
+
set(key, '', extend(attributes, {
|
|
1777
|
+
expires: -1
|
|
1778
|
+
}));
|
|
1779
|
+
};
|
|
1780
|
+
|
|
1781
|
+
api.defaults = {};
|
|
1782
|
+
|
|
1783
|
+
api.withConverter = init;
|
|
1784
|
+
|
|
1785
|
+
return api;
|
|
1786
|
+
}
|
|
1787
|
+
|
|
1788
|
+
return init(function () {});
|
|
1789
|
+
}));
|
|
1790
|
+
});
|
|
1791
|
+
|
|
1648
1792
|
var clientId = process.env.CVENT_CLIENT_ID;
|
|
1649
1793
|
var clientSecret = process.env.CVENT_CLIENT_SECRET;
|
|
1650
1794
|
var corsProxy = 'https://cors-anywhere.herokuapp.com/';
|
|
1651
1795
|
var currentTime = momentTimezone$1().toISOString();
|
|
1796
|
+
var itemsPerPage = 10;
|
|
1652
1797
|
|
|
1653
1798
|
var EventsDeck = function EventsDeck(_ref) {
|
|
1654
1799
|
var _ref$autoScroll = _ref.autoScroll,
|
|
@@ -1679,8 +1824,8 @@ var EventsDeck = function EventsDeck(_ref) {
|
|
|
1679
1824
|
|
|
1680
1825
|
var _useState7 = useState(null),
|
|
1681
1826
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
1682
|
-
|
|
1683
|
-
|
|
1827
|
+
nextPageLink = _useState8[0],
|
|
1828
|
+
setNextPageLink = _useState8[1];
|
|
1684
1829
|
|
|
1685
1830
|
var _useState9 = useState(true),
|
|
1686
1831
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
@@ -1689,17 +1834,14 @@ var EventsDeck = function EventsDeck(_ref) {
|
|
|
1689
1834
|
|
|
1690
1835
|
var _useState11 = useState(1),
|
|
1691
1836
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
1692
|
-
|
|
1693
|
-
|
|
1837
|
+
currentPage = _useState12[0],
|
|
1838
|
+
setCurrentPage = _useState12[1];
|
|
1694
1839
|
|
|
1695
|
-
var
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1840
|
+
var currentPageRef = useRef(currentPage);
|
|
1841
|
+
|
|
1842
|
+
var getEvents = function getEvents(params) {
|
|
1843
|
+
var url = params.url;
|
|
1699
1844
|
|
|
1700
|
-
var getEvents = function getEvents() {
|
|
1701
|
-
var itemsPerPage = 10;
|
|
1702
|
-
var url = corsProxy + 'https://api-platform.cvent.com/event/v1/events/filter?limit=' + itemsPerPage;
|
|
1703
1845
|
fetch(url, {
|
|
1704
1846
|
headers: {
|
|
1705
1847
|
Accept: 'application/json',
|
|
@@ -1712,18 +1854,17 @@ var EventsDeck = function EventsDeck(_ref) {
|
|
|
1712
1854
|
return response.json();
|
|
1713
1855
|
}).then(function (events) {
|
|
1714
1856
|
setIsLoading(false);
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1857
|
+
if (events.data && events.data.length > 0) {
|
|
1858
|
+
var newData = events.data.map(function (item) {
|
|
1859
|
+
return _extends$2({}, item, {
|
|
1860
|
+
pageNumber: currentPage
|
|
1861
|
+
});
|
|
1718
1862
|
});
|
|
1719
|
-
});
|
|
1720
|
-
console.log(events.paging);
|
|
1721
|
-
if (newData.length > 0) {
|
|
1722
1863
|
setData(function (prevData) {
|
|
1723
1864
|
return [].concat(_toConsumableArray(prevData), _toConsumableArray(newData));
|
|
1724
1865
|
});
|
|
1725
|
-
|
|
1726
|
-
setScrolling(true);
|
|
1866
|
+
setNextPageLink(events.paging._links.next ? events.paging._links.next.href : null);
|
|
1867
|
+
newData.length === itemsPerPage ? setScrolling(true) : setScrolling(false);
|
|
1727
1868
|
} else {
|
|
1728
1869
|
setScrolling(false);
|
|
1729
1870
|
}
|
|
@@ -1732,83 +1873,59 @@ var EventsDeck = function EventsDeck(_ref) {
|
|
|
1732
1873
|
|
|
1733
1874
|
useEffect(function () {
|
|
1734
1875
|
// load initial data
|
|
1735
|
-
if (accessToken &&
|
|
1736
|
-
|
|
1876
|
+
if (accessToken && currentPage === 1) {
|
|
1877
|
+
var initailUrl = 'https://api-platform.cvent.com/event/v1/events/filter?limit=' + itemsPerPage;
|
|
1878
|
+
getEvents({ url: initailUrl });
|
|
1879
|
+
}
|
|
1880
|
+
}, [accessToken, currentPage, filter]);
|
|
1881
|
+
|
|
1882
|
+
useEffect(function () {
|
|
1883
|
+
// load more events
|
|
1884
|
+
if (accessToken && nextPageLink && currentPage !== 1 && currentPage !== currentPageRef.current) {
|
|
1885
|
+
getEvents({ url: nextPageLink });
|
|
1737
1886
|
}
|
|
1738
|
-
}, [
|
|
1887
|
+
}, [currentPage]);
|
|
1739
1888
|
|
|
1740
1889
|
useEffect(function () {
|
|
1741
1890
|
// reset state when filter changes
|
|
1742
1891
|
setIsLoading(true);
|
|
1743
1892
|
setData([]);
|
|
1744
|
-
setPage(1);
|
|
1745
1893
|
setCurrentPage(1);
|
|
1894
|
+
currentPageRef.current = 1;
|
|
1746
1895
|
}, [filter]);
|
|
1747
1896
|
|
|
1748
1897
|
useEffect(function () {
|
|
1749
1898
|
// get access token
|
|
1750
|
-
var
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
},
|
|
1757
|
-
method: 'POST',
|
|
1758
|
-
body: 'grant_type=client_credentials&client_id=' + clientId
|
|
1759
|
-
}).then(function (response) {
|
|
1760
|
-
return response.json();
|
|
1761
|
-
}).then(function (json) {
|
|
1762
|
-
return setAccessToken(json.access_token);
|
|
1763
|
-
}).catch(function (e) {
|
|
1764
|
-
return console.log(e);
|
|
1765
|
-
});
|
|
1766
|
-
}, []);
|
|
1767
|
-
|
|
1768
|
-
var loadMore = debounce_1(function () {
|
|
1769
|
-
setPage(function (prevPage) {
|
|
1770
|
-
return prevPage + 1;
|
|
1771
|
-
});
|
|
1772
|
-
}, 0);
|
|
1773
|
-
|
|
1774
|
-
useEffect(function () {
|
|
1775
|
-
// load more events
|
|
1776
|
-
page !== 1 && page !== currentPage && loadMoreEvents();
|
|
1777
|
-
}, [page]);
|
|
1778
|
-
|
|
1779
|
-
var loadMoreEvents = function loadMoreEvents() {
|
|
1780
|
-
console.log(nextPagingToken, 'nextPagingToken');
|
|
1781
|
-
if (nextPagingToken) {
|
|
1782
|
-
var url = corsProxy + 'https://api-platform.cvent.com/event/v1/events/filter?token=' + nextPagingToken;
|
|
1899
|
+
var cventAccessToken = js_cookie.get('cvent_access_token');
|
|
1900
|
+
if (cventAccessToken) {
|
|
1901
|
+
setAccessToken(cventAccessToken);
|
|
1902
|
+
} else {
|
|
1903
|
+
var encodedData = window.btoa(clientId + ':' + clientSecret);
|
|
1904
|
+
var url = corsProxy + 'https://api-platform.cvent.com/ea/oauth2/token';
|
|
1783
1905
|
fetch(url, {
|
|
1784
1906
|
headers: {
|
|
1785
|
-
|
|
1786
|
-
'
|
|
1787
|
-
Authorization: 'Bearer ' + accessToken
|
|
1907
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
1908
|
+
Authorization: 'Basic ' + encodedData
|
|
1788
1909
|
},
|
|
1789
|
-
|
|
1790
|
-
|
|
1910
|
+
method: 'POST',
|
|
1911
|
+
body: 'grant_type=client_credentials&client_id=' + clientId
|
|
1791
1912
|
}).then(function (response) {
|
|
1792
1913
|
return response.json();
|
|
1793
|
-
}).then(function (
|
|
1794
|
-
var
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
console.log(events.paging);
|
|
1800
|
-
if (newData.length > 0) {
|
|
1801
|
-
setData(function (prevData) {
|
|
1802
|
-
return [].concat(_toConsumableArray(prevData), _toConsumableArray(newData));
|
|
1803
|
-
});
|
|
1804
|
-
setNextPagingToken(events.paging.nextToken ? events.paging.nextToken : null);
|
|
1805
|
-
setScrolling(true);
|
|
1806
|
-
} else {
|
|
1807
|
-
setScrolling(false);
|
|
1808
|
-
}
|
|
1914
|
+
}).then(function (json) {
|
|
1915
|
+
var inOneHour = new Date(new Date().getTime() + 60 * 60 * 1000);
|
|
1916
|
+
js_cookie.set('cvent_access_token', json.access_token, { expires: inOneHour });
|
|
1917
|
+
setAccessToken(json.access_token);
|
|
1918
|
+
}).catch(function (e) {
|
|
1919
|
+
return console.log(e);
|
|
1809
1920
|
});
|
|
1810
1921
|
}
|
|
1811
|
-
};
|
|
1922
|
+
}, []);
|
|
1923
|
+
|
|
1924
|
+
var loadMore = debounce_1(function () {
|
|
1925
|
+
setCurrentPage(function (prevCurrentPage) {
|
|
1926
|
+
return prevCurrentPage + 1;
|
|
1927
|
+
});
|
|
1928
|
+
}, 0);
|
|
1812
1929
|
|
|
1813
1930
|
var changePageNumber = function changePageNumber(pageNumber) {
|
|
1814
1931
|
if (seoPaginate) {
|
|
@@ -1816,7 +1933,6 @@ var EventsDeck = function EventsDeck(_ref) {
|
|
|
1816
1933
|
var qrIndex = path.indexOf('?');
|
|
1817
1934
|
var pathname = router.pathname;
|
|
1818
1935
|
var queryString = '';
|
|
1819
|
-
|
|
1820
1936
|
if (qrIndex > 0) {
|
|
1821
1937
|
path = path.substring(1, qrIndex);
|
|
1822
1938
|
|
|
@@ -1841,10 +1957,10 @@ var EventsDeck = function EventsDeck(_ref) {
|
|
|
1841
1957
|
|
|
1842
1958
|
pageNumber = parseInt(pageNumber);
|
|
1843
1959
|
|
|
1844
|
-
if (
|
|
1960
|
+
if (pageNumber !== currentPageRef.current) {
|
|
1845
1961
|
lib_3.refresh();
|
|
1846
1962
|
|
|
1847
|
-
|
|
1963
|
+
currentPageRef.current = pageNumber;
|
|
1848
1964
|
if (path[0] !== '/') {
|
|
1849
1965
|
path = '/' + path;
|
|
1850
1966
|
}
|
|
@@ -2018,885 +2134,78 @@ var EventsDeck = function EventsDeck(_ref) {
|
|
|
2018
2134
|
);
|
|
2019
2135
|
}
|
|
2020
2136
|
|
|
2021
|
-
if (data.length > 0) {
|
|
2022
|
-
return React__default.createElement(
|
|
2023
|
-
'div',
|
|
2024
|
-
{ className: 'contentDeck' },
|
|
2025
|
-
autoScroll ? React__default.createElement(
|
|
2026
|
-
React__default.Fragment,
|
|
2027
|
-
null,
|
|
2028
|
-
React__default.createElement(
|
|
2029
|
-
InfiniteScroll,
|
|
2030
|
-
{ dataLength: data.length, next: loadMore, hasMore: scrolling, scrollThreshold: 0.9 },
|
|
2031
|
-
React__default.createElement(
|
|
2032
|
-
Container,
|
|
2033
|
-
null,
|
|
2034
|
-
cardLoader()
|
|
2035
|
-
)
|
|
2036
|
-
),
|
|
2037
|
-
React__default.createElement(
|
|
2038
|
-
'noscript',
|
|
2039
|
-
null,
|
|
2040
|
-
renderManualPagination()
|
|
2041
|
-
)
|
|
2042
|
-
) : React__default.createElement(
|
|
2043
|
-
React__default.Fragment,
|
|
2044
|
-
null,
|
|
2045
|
-
React__default.createElement(
|
|
2046
|
-
Container,
|
|
2047
|
-
null,
|
|
2048
|
-
cardLoader()
|
|
2049
|
-
),
|
|
2050
|
-
React__default.createElement(
|
|
2051
|
-
'div',
|
|
2052
|
-
{ style: { padding: '0px 10px' } },
|
|
2053
|
-
scrolling ? React__default.createElement(
|
|
2054
|
-
'button',
|
|
2055
|
-
{
|
|
2056
|
-
style: { margin: 'auto', width: '100%' },
|
|
2057
|
-
onClick: function onClick(e) {
|
|
2058
|
-
loadMore();
|
|
2059
|
-
} },
|
|
2060
|
-
'Load More'
|
|
2061
|
-
) : React__default.createElement(
|
|
2062
|
-
'p',
|
|
2063
|
-
{ style: { textAlign: 'center' } },
|
|
2064
|
-
React__default.createElement(
|
|
2065
|
-
'b',
|
|
2066
|
-
null,
|
|
2067
|
-
'End of data'
|
|
2068
|
-
)
|
|
2069
|
-
)
|
|
2070
|
-
),
|
|
2071
|
-
React__default.createElement(
|
|
2072
|
-
'noscript',
|
|
2073
|
-
null,
|
|
2074
|
-
renderManualPagination()
|
|
2075
|
-
)
|
|
2076
|
-
)
|
|
2077
|
-
);
|
|
2078
|
-
} else {
|
|
2079
|
-
return React__default.createElement(
|
|
2080
|
-
'div',
|
|
2081
|
-
null,
|
|
2082
|
-
React__default.createElement(
|
|
2083
|
-
'div',
|
|
2084
|
-
null,
|
|
2085
|
-
'No events found '
|
|
2086
|
-
)
|
|
2087
|
-
);
|
|
2088
|
-
}
|
|
2089
|
-
};
|
|
2090
|
-
|
|
2091
|
-
var runtime = createCommonjsModule(function (module) {
|
|
2092
|
-
/**
|
|
2093
|
-
* Copyright (c) 2014-present, Facebook, Inc.
|
|
2094
|
-
*
|
|
2095
|
-
* This source code is licensed under the MIT license found in the
|
|
2096
|
-
* LICENSE file in the root directory of this source tree.
|
|
2097
|
-
*/
|
|
2098
|
-
|
|
2099
|
-
!(function(global) {
|
|
2100
|
-
|
|
2101
|
-
var Op = Object.prototype;
|
|
2102
|
-
var hasOwn = Op.hasOwnProperty;
|
|
2103
|
-
var undefined$1; // More compressible than void 0.
|
|
2104
|
-
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
|
2105
|
-
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
|
2106
|
-
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
|
2107
|
-
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
2108
|
-
var runtime = global.regeneratorRuntime;
|
|
2109
|
-
if (runtime) {
|
|
2110
|
-
{
|
|
2111
|
-
// If regeneratorRuntime is defined globally and we're in a module,
|
|
2112
|
-
// make the exports object identical to regeneratorRuntime.
|
|
2113
|
-
module.exports = runtime;
|
|
2114
|
-
}
|
|
2115
|
-
// Don't bother evaluating the rest of this file if the runtime was
|
|
2116
|
-
// already defined globally.
|
|
2117
|
-
return;
|
|
2118
|
-
}
|
|
2119
|
-
|
|
2120
|
-
// Define the runtime globally (as expected by generated code) as either
|
|
2121
|
-
// module.exports (if we're in a module) or a new, empty object.
|
|
2122
|
-
runtime = global.regeneratorRuntime = module.exports ;
|
|
2123
|
-
|
|
2124
|
-
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
2125
|
-
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
|
|
2126
|
-
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
|
|
2127
|
-
var generator = Object.create(protoGenerator.prototype);
|
|
2128
|
-
var context = new Context(tryLocsList || []);
|
|
2129
|
-
|
|
2130
|
-
// The ._invoke method unifies the implementations of the .next,
|
|
2131
|
-
// .throw, and .return methods.
|
|
2132
|
-
generator._invoke = makeInvokeMethod(innerFn, self, context);
|
|
2133
|
-
|
|
2134
|
-
return generator;
|
|
2135
|
-
}
|
|
2136
|
-
runtime.wrap = wrap;
|
|
2137
|
-
|
|
2138
|
-
// Try/catch helper to minimize deoptimizations. Returns a completion
|
|
2139
|
-
// record like context.tryEntries[i].completion. This interface could
|
|
2140
|
-
// have been (and was previously) designed to take a closure to be
|
|
2141
|
-
// invoked without arguments, but in all the cases we care about we
|
|
2142
|
-
// already have an existing method we want to call, so there's no need
|
|
2143
|
-
// to create a new function object. We can even get away with assuming
|
|
2144
|
-
// the method takes exactly one argument, since that happens to be true
|
|
2145
|
-
// in every case, so we don't have to touch the arguments object. The
|
|
2146
|
-
// only additional allocation required is the completion record, which
|
|
2147
|
-
// has a stable shape and so hopefully should be cheap to allocate.
|
|
2148
|
-
function tryCatch(fn, obj, arg) {
|
|
2149
|
-
try {
|
|
2150
|
-
return { type: "normal", arg: fn.call(obj, arg) };
|
|
2151
|
-
} catch (err) {
|
|
2152
|
-
return { type: "throw", arg: err };
|
|
2153
|
-
}
|
|
2154
|
-
}
|
|
2155
|
-
|
|
2156
|
-
var GenStateSuspendedStart = "suspendedStart";
|
|
2157
|
-
var GenStateSuspendedYield = "suspendedYield";
|
|
2158
|
-
var GenStateExecuting = "executing";
|
|
2159
|
-
var GenStateCompleted = "completed";
|
|
2160
|
-
|
|
2161
|
-
// Returning this object from the innerFn has the same effect as
|
|
2162
|
-
// breaking out of the dispatch switch statement.
|
|
2163
|
-
var ContinueSentinel = {};
|
|
2164
|
-
|
|
2165
|
-
// Dummy constructor functions that we use as the .constructor and
|
|
2166
|
-
// .constructor.prototype properties for functions that return Generator
|
|
2167
|
-
// objects. For full spec compliance, you may wish to configure your
|
|
2168
|
-
// minifier not to mangle the names of these two functions.
|
|
2169
|
-
function Generator() {}
|
|
2170
|
-
function GeneratorFunction() {}
|
|
2171
|
-
function GeneratorFunctionPrototype() {}
|
|
2172
|
-
|
|
2173
|
-
// This is a polyfill for %IteratorPrototype% for environments that
|
|
2174
|
-
// don't natively support it.
|
|
2175
|
-
var IteratorPrototype = {};
|
|
2176
|
-
IteratorPrototype[iteratorSymbol] = function () {
|
|
2177
|
-
return this;
|
|
2178
|
-
};
|
|
2179
|
-
|
|
2180
|
-
var getProto = Object.getPrototypeOf;
|
|
2181
|
-
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
2182
|
-
if (NativeIteratorPrototype &&
|
|
2183
|
-
NativeIteratorPrototype !== Op &&
|
|
2184
|
-
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
|
|
2185
|
-
// This environment has a native %IteratorPrototype%; use it instead
|
|
2186
|
-
// of the polyfill.
|
|
2187
|
-
IteratorPrototype = NativeIteratorPrototype;
|
|
2188
|
-
}
|
|
2189
|
-
|
|
2190
|
-
var Gp = GeneratorFunctionPrototype.prototype =
|
|
2191
|
-
Generator.prototype = Object.create(IteratorPrototype);
|
|
2192
|
-
GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
|
|
2193
|
-
GeneratorFunctionPrototype.constructor = GeneratorFunction;
|
|
2194
|
-
GeneratorFunctionPrototype[toStringTagSymbol] =
|
|
2195
|
-
GeneratorFunction.displayName = "GeneratorFunction";
|
|
2196
|
-
|
|
2197
|
-
// Helper for defining the .next, .throw, and .return methods of the
|
|
2198
|
-
// Iterator interface in terms of a single ._invoke method.
|
|
2199
|
-
function defineIteratorMethods(prototype) {
|
|
2200
|
-
["next", "throw", "return"].forEach(function(method) {
|
|
2201
|
-
prototype[method] = function(arg) {
|
|
2202
|
-
return this._invoke(method, arg);
|
|
2203
|
-
};
|
|
2204
|
-
});
|
|
2205
|
-
}
|
|
2206
|
-
|
|
2207
|
-
runtime.isGeneratorFunction = function(genFun) {
|
|
2208
|
-
var ctor = typeof genFun === "function" && genFun.constructor;
|
|
2209
|
-
return ctor
|
|
2210
|
-
? ctor === GeneratorFunction ||
|
|
2211
|
-
// For the native GeneratorFunction constructor, the best we can
|
|
2212
|
-
// do is to check its .name property.
|
|
2213
|
-
(ctor.displayName || ctor.name) === "GeneratorFunction"
|
|
2214
|
-
: false;
|
|
2215
|
-
};
|
|
2216
|
-
|
|
2217
|
-
runtime.mark = function(genFun) {
|
|
2218
|
-
if (Object.setPrototypeOf) {
|
|
2219
|
-
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
|
2220
|
-
} else {
|
|
2221
|
-
genFun.__proto__ = GeneratorFunctionPrototype;
|
|
2222
|
-
if (!(toStringTagSymbol in genFun)) {
|
|
2223
|
-
genFun[toStringTagSymbol] = "GeneratorFunction";
|
|
2224
|
-
}
|
|
2225
|
-
}
|
|
2226
|
-
genFun.prototype = Object.create(Gp);
|
|
2227
|
-
return genFun;
|
|
2228
|
-
};
|
|
2229
|
-
|
|
2230
|
-
// Within the body of any async function, `await x` is transformed to
|
|
2231
|
-
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
|
|
2232
|
-
// `hasOwn.call(value, "__await")` to determine if the yielded value is
|
|
2233
|
-
// meant to be awaited.
|
|
2234
|
-
runtime.awrap = function(arg) {
|
|
2235
|
-
return { __await: arg };
|
|
2236
|
-
};
|
|
2237
|
-
|
|
2238
|
-
function AsyncIterator(generator) {
|
|
2239
|
-
function invoke(method, arg, resolve, reject) {
|
|
2240
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
2241
|
-
if (record.type === "throw") {
|
|
2242
|
-
reject(record.arg);
|
|
2243
|
-
} else {
|
|
2244
|
-
var result = record.arg;
|
|
2245
|
-
var value = result.value;
|
|
2246
|
-
if (value &&
|
|
2247
|
-
typeof value === "object" &&
|
|
2248
|
-
hasOwn.call(value, "__await")) {
|
|
2249
|
-
return Promise.resolve(value.__await).then(function(value) {
|
|
2250
|
-
invoke("next", value, resolve, reject);
|
|
2251
|
-
}, function(err) {
|
|
2252
|
-
invoke("throw", err, resolve, reject);
|
|
2253
|
-
});
|
|
2254
|
-
}
|
|
2255
|
-
|
|
2256
|
-
return Promise.resolve(value).then(function(unwrapped) {
|
|
2257
|
-
// When a yielded Promise is resolved, its final value becomes
|
|
2258
|
-
// the .value of the Promise<{value,done}> result for the
|
|
2259
|
-
// current iteration. If the Promise is rejected, however, the
|
|
2260
|
-
// result for this iteration will be rejected with the same
|
|
2261
|
-
// reason. Note that rejections of yielded Promises are not
|
|
2262
|
-
// thrown back into the generator function, as is the case
|
|
2263
|
-
// when an awaited Promise is rejected. This difference in
|
|
2264
|
-
// behavior between yield and await is important, because it
|
|
2265
|
-
// allows the consumer to decide what to do with the yielded
|
|
2266
|
-
// rejection (swallow it and continue, manually .throw it back
|
|
2267
|
-
// into the generator, abandon iteration, whatever). With
|
|
2268
|
-
// await, by contrast, there is no opportunity to examine the
|
|
2269
|
-
// rejection reason outside the generator function, so the
|
|
2270
|
-
// only option is to throw it from the await expression, and
|
|
2271
|
-
// let the generator function handle the exception.
|
|
2272
|
-
result.value = unwrapped;
|
|
2273
|
-
resolve(result);
|
|
2274
|
-
}, reject);
|
|
2275
|
-
}
|
|
2276
|
-
}
|
|
2277
|
-
|
|
2278
|
-
var previousPromise;
|
|
2279
|
-
|
|
2280
|
-
function enqueue(method, arg) {
|
|
2281
|
-
function callInvokeWithMethodAndArg() {
|
|
2282
|
-
return new Promise(function(resolve, reject) {
|
|
2283
|
-
invoke(method, arg, resolve, reject);
|
|
2284
|
-
});
|
|
2285
|
-
}
|
|
2286
|
-
|
|
2287
|
-
return previousPromise =
|
|
2288
|
-
// If enqueue has been called before, then we want to wait until
|
|
2289
|
-
// all previous Promises have been resolved before calling invoke,
|
|
2290
|
-
// so that results are always delivered in the correct order. If
|
|
2291
|
-
// enqueue has not been called before, then it is important to
|
|
2292
|
-
// call invoke immediately, without waiting on a callback to fire,
|
|
2293
|
-
// so that the async generator function has the opportunity to do
|
|
2294
|
-
// any necessary setup in a predictable way. This predictability
|
|
2295
|
-
// is why the Promise constructor synchronously invokes its
|
|
2296
|
-
// executor callback, and why async functions synchronously
|
|
2297
|
-
// execute code before the first await. Since we implement simple
|
|
2298
|
-
// async functions in terms of async generators, it is especially
|
|
2299
|
-
// important to get this right, even though it requires care.
|
|
2300
|
-
previousPromise ? previousPromise.then(
|
|
2301
|
-
callInvokeWithMethodAndArg,
|
|
2302
|
-
// Avoid propagating failures to Promises returned by later
|
|
2303
|
-
// invocations of the iterator.
|
|
2304
|
-
callInvokeWithMethodAndArg
|
|
2305
|
-
) : callInvokeWithMethodAndArg();
|
|
2306
|
-
}
|
|
2307
|
-
|
|
2308
|
-
// Define the unified helper method that is used to implement .next,
|
|
2309
|
-
// .throw, and .return (see defineIteratorMethods).
|
|
2310
|
-
this._invoke = enqueue;
|
|
2311
|
-
}
|
|
2312
|
-
|
|
2313
|
-
defineIteratorMethods(AsyncIterator.prototype);
|
|
2314
|
-
AsyncIterator.prototype[asyncIteratorSymbol] = function () {
|
|
2315
|
-
return this;
|
|
2316
|
-
};
|
|
2317
|
-
runtime.AsyncIterator = AsyncIterator;
|
|
2318
|
-
|
|
2319
|
-
// Note that simple async functions are implemented on top of
|
|
2320
|
-
// AsyncIterator objects; they just return a Promise for the value of
|
|
2321
|
-
// the final result produced by the iterator.
|
|
2322
|
-
runtime.async = function(innerFn, outerFn, self, tryLocsList) {
|
|
2323
|
-
var iter = new AsyncIterator(
|
|
2324
|
-
wrap(innerFn, outerFn, self, tryLocsList)
|
|
2325
|
-
);
|
|
2326
|
-
|
|
2327
|
-
return runtime.isGeneratorFunction(outerFn)
|
|
2328
|
-
? iter // If outerFn is a generator, return the full iterator.
|
|
2329
|
-
: iter.next().then(function(result) {
|
|
2330
|
-
return result.done ? result.value : iter.next();
|
|
2331
|
-
});
|
|
2332
|
-
};
|
|
2333
|
-
|
|
2334
|
-
function makeInvokeMethod(innerFn, self, context) {
|
|
2335
|
-
var state = GenStateSuspendedStart;
|
|
2336
|
-
|
|
2337
|
-
return function invoke(method, arg) {
|
|
2338
|
-
if (state === GenStateExecuting) {
|
|
2339
|
-
throw new Error("Generator is already running");
|
|
2340
|
-
}
|
|
2341
|
-
|
|
2342
|
-
if (state === GenStateCompleted) {
|
|
2343
|
-
if (method === "throw") {
|
|
2344
|
-
throw arg;
|
|
2345
|
-
}
|
|
2346
|
-
|
|
2347
|
-
// Be forgiving, per 25.3.3.3.3 of the spec:
|
|
2348
|
-
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
|
2349
|
-
return doneResult();
|
|
2350
|
-
}
|
|
2351
|
-
|
|
2352
|
-
context.method = method;
|
|
2353
|
-
context.arg = arg;
|
|
2354
|
-
|
|
2355
|
-
while (true) {
|
|
2356
|
-
var delegate = context.delegate;
|
|
2357
|
-
if (delegate) {
|
|
2358
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
2359
|
-
if (delegateResult) {
|
|
2360
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
2361
|
-
return delegateResult;
|
|
2362
|
-
}
|
|
2363
|
-
}
|
|
2364
|
-
|
|
2365
|
-
if (context.method === "next") {
|
|
2366
|
-
// Setting context._sent for legacy support of Babel's
|
|
2367
|
-
// function.sent implementation.
|
|
2368
|
-
context.sent = context._sent = context.arg;
|
|
2369
|
-
|
|
2370
|
-
} else if (context.method === "throw") {
|
|
2371
|
-
if (state === GenStateSuspendedStart) {
|
|
2372
|
-
state = GenStateCompleted;
|
|
2373
|
-
throw context.arg;
|
|
2374
|
-
}
|
|
2375
|
-
|
|
2376
|
-
context.dispatchException(context.arg);
|
|
2377
|
-
|
|
2378
|
-
} else if (context.method === "return") {
|
|
2379
|
-
context.abrupt("return", context.arg);
|
|
2380
|
-
}
|
|
2381
|
-
|
|
2382
|
-
state = GenStateExecuting;
|
|
2383
|
-
|
|
2384
|
-
var record = tryCatch(innerFn, self, context);
|
|
2385
|
-
if (record.type === "normal") {
|
|
2386
|
-
// If an exception is thrown from innerFn, we leave state ===
|
|
2387
|
-
// GenStateExecuting and loop back for another invocation.
|
|
2388
|
-
state = context.done
|
|
2389
|
-
? GenStateCompleted
|
|
2390
|
-
: GenStateSuspendedYield;
|
|
2391
|
-
|
|
2392
|
-
if (record.arg === ContinueSentinel) {
|
|
2393
|
-
continue;
|
|
2394
|
-
}
|
|
2395
|
-
|
|
2396
|
-
return {
|
|
2397
|
-
value: record.arg,
|
|
2398
|
-
done: context.done
|
|
2399
|
-
};
|
|
2400
|
-
|
|
2401
|
-
} else if (record.type === "throw") {
|
|
2402
|
-
state = GenStateCompleted;
|
|
2403
|
-
// Dispatch the exception by looping back around to the
|
|
2404
|
-
// context.dispatchException(context.arg) call above.
|
|
2405
|
-
context.method = "throw";
|
|
2406
|
-
context.arg = record.arg;
|
|
2407
|
-
}
|
|
2408
|
-
}
|
|
2409
|
-
};
|
|
2410
|
-
}
|
|
2411
|
-
|
|
2412
|
-
// Call delegate.iterator[context.method](context.arg) and handle the
|
|
2413
|
-
// result, either by returning a { value, done } result from the
|
|
2414
|
-
// delegate iterator, or by modifying context.method and context.arg,
|
|
2415
|
-
// setting context.delegate to null, and returning the ContinueSentinel.
|
|
2416
|
-
function maybeInvokeDelegate(delegate, context) {
|
|
2417
|
-
var method = delegate.iterator[context.method];
|
|
2418
|
-
if (method === undefined$1) {
|
|
2419
|
-
// A .throw or .return when the delegate iterator has no .throw
|
|
2420
|
-
// method always terminates the yield* loop.
|
|
2421
|
-
context.delegate = null;
|
|
2422
|
-
|
|
2423
|
-
if (context.method === "throw") {
|
|
2424
|
-
if (delegate.iterator.return) {
|
|
2425
|
-
// If the delegate iterator has a return method, give it a
|
|
2426
|
-
// chance to clean up.
|
|
2427
|
-
context.method = "return";
|
|
2428
|
-
context.arg = undefined$1;
|
|
2429
|
-
maybeInvokeDelegate(delegate, context);
|
|
2430
|
-
|
|
2431
|
-
if (context.method === "throw") {
|
|
2432
|
-
// If maybeInvokeDelegate(context) changed context.method from
|
|
2433
|
-
// "return" to "throw", let that override the TypeError below.
|
|
2434
|
-
return ContinueSentinel;
|
|
2435
|
-
}
|
|
2436
|
-
}
|
|
2437
|
-
|
|
2438
|
-
context.method = "throw";
|
|
2439
|
-
context.arg = new TypeError(
|
|
2440
|
-
"The iterator does not provide a 'throw' method");
|
|
2441
|
-
}
|
|
2442
|
-
|
|
2443
|
-
return ContinueSentinel;
|
|
2444
|
-
}
|
|
2445
|
-
|
|
2446
|
-
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
2447
|
-
|
|
2448
|
-
if (record.type === "throw") {
|
|
2449
|
-
context.method = "throw";
|
|
2450
|
-
context.arg = record.arg;
|
|
2451
|
-
context.delegate = null;
|
|
2452
|
-
return ContinueSentinel;
|
|
2453
|
-
}
|
|
2454
|
-
|
|
2455
|
-
var info = record.arg;
|
|
2456
|
-
|
|
2457
|
-
if (! info) {
|
|
2458
|
-
context.method = "throw";
|
|
2459
|
-
context.arg = new TypeError("iterator result is not an object");
|
|
2460
|
-
context.delegate = null;
|
|
2461
|
-
return ContinueSentinel;
|
|
2462
|
-
}
|
|
2463
|
-
|
|
2464
|
-
if (info.done) {
|
|
2465
|
-
// Assign the result of the finished delegate to the temporary
|
|
2466
|
-
// variable specified by delegate.resultName (see delegateYield).
|
|
2467
|
-
context[delegate.resultName] = info.value;
|
|
2468
|
-
|
|
2469
|
-
// Resume execution at the desired location (see delegateYield).
|
|
2470
|
-
context.next = delegate.nextLoc;
|
|
2471
|
-
|
|
2472
|
-
// If context.method was "throw" but the delegate handled the
|
|
2473
|
-
// exception, let the outer generator proceed normally. If
|
|
2474
|
-
// context.method was "next", forget context.arg since it has been
|
|
2475
|
-
// "consumed" by the delegate iterator. If context.method was
|
|
2476
|
-
// "return", allow the original .return call to continue in the
|
|
2477
|
-
// outer generator.
|
|
2478
|
-
if (context.method !== "return") {
|
|
2479
|
-
context.method = "next";
|
|
2480
|
-
context.arg = undefined$1;
|
|
2481
|
-
}
|
|
2482
|
-
|
|
2483
|
-
} else {
|
|
2484
|
-
// Re-yield the result returned by the delegate method.
|
|
2485
|
-
return info;
|
|
2486
|
-
}
|
|
2487
|
-
|
|
2488
|
-
// The delegate iterator is finished, so forget it and continue with
|
|
2489
|
-
// the outer generator.
|
|
2490
|
-
context.delegate = null;
|
|
2491
|
-
return ContinueSentinel;
|
|
2492
|
-
}
|
|
2493
|
-
|
|
2494
|
-
// Define Generator.prototype.{next,throw,return} in terms of the
|
|
2495
|
-
// unified ._invoke helper method.
|
|
2496
|
-
defineIteratorMethods(Gp);
|
|
2497
|
-
|
|
2498
|
-
Gp[toStringTagSymbol] = "Generator";
|
|
2499
|
-
|
|
2500
|
-
// A Generator should always return itself as the iterator object when the
|
|
2501
|
-
// @@iterator function is called on it. Some browsers' implementations of the
|
|
2502
|
-
// iterator prototype chain incorrectly implement this, causing the Generator
|
|
2503
|
-
// object to not be returned from this call. This ensures that doesn't happen.
|
|
2504
|
-
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
|
2505
|
-
Gp[iteratorSymbol] = function() {
|
|
2506
|
-
return this;
|
|
2507
|
-
};
|
|
2508
|
-
|
|
2509
|
-
Gp.toString = function() {
|
|
2510
|
-
return "[object Generator]";
|
|
2511
|
-
};
|
|
2512
|
-
|
|
2513
|
-
function pushTryEntry(locs) {
|
|
2514
|
-
var entry = { tryLoc: locs[0] };
|
|
2515
|
-
|
|
2516
|
-
if (1 in locs) {
|
|
2517
|
-
entry.catchLoc = locs[1];
|
|
2518
|
-
}
|
|
2519
|
-
|
|
2520
|
-
if (2 in locs) {
|
|
2521
|
-
entry.finallyLoc = locs[2];
|
|
2522
|
-
entry.afterLoc = locs[3];
|
|
2523
|
-
}
|
|
2524
|
-
|
|
2525
|
-
this.tryEntries.push(entry);
|
|
2526
|
-
}
|
|
2527
|
-
|
|
2528
|
-
function resetTryEntry(entry) {
|
|
2529
|
-
var record = entry.completion || {};
|
|
2530
|
-
record.type = "normal";
|
|
2531
|
-
delete record.arg;
|
|
2532
|
-
entry.completion = record;
|
|
2533
|
-
}
|
|
2534
|
-
|
|
2535
|
-
function Context(tryLocsList) {
|
|
2536
|
-
// The root entry object (effectively a try statement without a catch
|
|
2537
|
-
// or a finally block) gives us a place to store values thrown from
|
|
2538
|
-
// locations where there is no enclosing try statement.
|
|
2539
|
-
this.tryEntries = [{ tryLoc: "root" }];
|
|
2540
|
-
tryLocsList.forEach(pushTryEntry, this);
|
|
2541
|
-
this.reset(true);
|
|
2542
|
-
}
|
|
2543
|
-
|
|
2544
|
-
runtime.keys = function(object) {
|
|
2545
|
-
var keys = [];
|
|
2546
|
-
for (var key in object) {
|
|
2547
|
-
keys.push(key);
|
|
2548
|
-
}
|
|
2549
|
-
keys.reverse();
|
|
2550
|
-
|
|
2551
|
-
// Rather than returning an object with a next method, we keep
|
|
2552
|
-
// things simple and return the next function itself.
|
|
2553
|
-
return function next() {
|
|
2554
|
-
while (keys.length) {
|
|
2555
|
-
var key = keys.pop();
|
|
2556
|
-
if (key in object) {
|
|
2557
|
-
next.value = key;
|
|
2558
|
-
next.done = false;
|
|
2559
|
-
return next;
|
|
2560
|
-
}
|
|
2561
|
-
}
|
|
2562
|
-
|
|
2563
|
-
// To avoid creating an additional object, we just hang the .value
|
|
2564
|
-
// and .done properties off the next function object itself. This
|
|
2565
|
-
// also ensures that the minifier will not anonymize the function.
|
|
2566
|
-
next.done = true;
|
|
2567
|
-
return next;
|
|
2568
|
-
};
|
|
2569
|
-
};
|
|
2570
|
-
|
|
2571
|
-
function values(iterable) {
|
|
2572
|
-
if (iterable) {
|
|
2573
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
|
2574
|
-
if (iteratorMethod) {
|
|
2575
|
-
return iteratorMethod.call(iterable);
|
|
2576
|
-
}
|
|
2577
|
-
|
|
2578
|
-
if (typeof iterable.next === "function") {
|
|
2579
|
-
return iterable;
|
|
2580
|
-
}
|
|
2581
|
-
|
|
2582
|
-
if (!isNaN(iterable.length)) {
|
|
2583
|
-
var i = -1, next = function next() {
|
|
2584
|
-
while (++i < iterable.length) {
|
|
2585
|
-
if (hasOwn.call(iterable, i)) {
|
|
2586
|
-
next.value = iterable[i];
|
|
2587
|
-
next.done = false;
|
|
2588
|
-
return next;
|
|
2589
|
-
}
|
|
2590
|
-
}
|
|
2591
|
-
|
|
2592
|
-
next.value = undefined$1;
|
|
2593
|
-
next.done = true;
|
|
2594
|
-
|
|
2595
|
-
return next;
|
|
2596
|
-
};
|
|
2597
|
-
|
|
2598
|
-
return next.next = next;
|
|
2599
|
-
}
|
|
2600
|
-
}
|
|
2601
|
-
|
|
2602
|
-
// Return an iterator with no values.
|
|
2603
|
-
return { next: doneResult };
|
|
2604
|
-
}
|
|
2605
|
-
runtime.values = values;
|
|
2606
|
-
|
|
2607
|
-
function doneResult() {
|
|
2608
|
-
return { value: undefined$1, done: true };
|
|
2609
|
-
}
|
|
2610
|
-
|
|
2611
|
-
Context.prototype = {
|
|
2612
|
-
constructor: Context,
|
|
2613
|
-
|
|
2614
|
-
reset: function(skipTempReset) {
|
|
2615
|
-
this.prev = 0;
|
|
2616
|
-
this.next = 0;
|
|
2617
|
-
// Resetting context._sent for legacy support of Babel's
|
|
2618
|
-
// function.sent implementation.
|
|
2619
|
-
this.sent = this._sent = undefined$1;
|
|
2620
|
-
this.done = false;
|
|
2621
|
-
this.delegate = null;
|
|
2622
|
-
|
|
2623
|
-
this.method = "next";
|
|
2624
|
-
this.arg = undefined$1;
|
|
2625
|
-
|
|
2626
|
-
this.tryEntries.forEach(resetTryEntry);
|
|
2627
|
-
|
|
2628
|
-
if (!skipTempReset) {
|
|
2629
|
-
for (var name in this) {
|
|
2630
|
-
// Not sure about the optimal order of these conditions:
|
|
2631
|
-
if (name.charAt(0) === "t" &&
|
|
2632
|
-
hasOwn.call(this, name) &&
|
|
2633
|
-
!isNaN(+name.slice(1))) {
|
|
2634
|
-
this[name] = undefined$1;
|
|
2635
|
-
}
|
|
2636
|
-
}
|
|
2637
|
-
}
|
|
2638
|
-
},
|
|
2639
|
-
|
|
2640
|
-
stop: function() {
|
|
2641
|
-
this.done = true;
|
|
2642
|
-
|
|
2643
|
-
var rootEntry = this.tryEntries[0];
|
|
2644
|
-
var rootRecord = rootEntry.completion;
|
|
2645
|
-
if (rootRecord.type === "throw") {
|
|
2646
|
-
throw rootRecord.arg;
|
|
2647
|
-
}
|
|
2648
|
-
|
|
2649
|
-
return this.rval;
|
|
2650
|
-
},
|
|
2651
|
-
|
|
2652
|
-
dispatchException: function(exception) {
|
|
2653
|
-
if (this.done) {
|
|
2654
|
-
throw exception;
|
|
2655
|
-
}
|
|
2656
|
-
|
|
2657
|
-
var context = this;
|
|
2658
|
-
function handle(loc, caught) {
|
|
2659
|
-
record.type = "throw";
|
|
2660
|
-
record.arg = exception;
|
|
2661
|
-
context.next = loc;
|
|
2662
|
-
|
|
2663
|
-
if (caught) {
|
|
2664
|
-
// If the dispatched exception was caught by a catch block,
|
|
2665
|
-
// then let that catch block handle the exception normally.
|
|
2666
|
-
context.method = "next";
|
|
2667
|
-
context.arg = undefined$1;
|
|
2668
|
-
}
|
|
2669
|
-
|
|
2670
|
-
return !! caught;
|
|
2671
|
-
}
|
|
2672
|
-
|
|
2673
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
2674
|
-
var entry = this.tryEntries[i];
|
|
2675
|
-
var record = entry.completion;
|
|
2676
|
-
|
|
2677
|
-
if (entry.tryLoc === "root") {
|
|
2678
|
-
// Exception thrown outside of any try block that could handle
|
|
2679
|
-
// it, so set the completion value of the entire function to
|
|
2680
|
-
// throw the exception.
|
|
2681
|
-
return handle("end");
|
|
2682
|
-
}
|
|
2683
|
-
|
|
2684
|
-
if (entry.tryLoc <= this.prev) {
|
|
2685
|
-
var hasCatch = hasOwn.call(entry, "catchLoc");
|
|
2686
|
-
var hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
2687
|
-
|
|
2688
|
-
if (hasCatch && hasFinally) {
|
|
2689
|
-
if (this.prev < entry.catchLoc) {
|
|
2690
|
-
return handle(entry.catchLoc, true);
|
|
2691
|
-
} else if (this.prev < entry.finallyLoc) {
|
|
2692
|
-
return handle(entry.finallyLoc);
|
|
2693
|
-
}
|
|
2694
|
-
|
|
2695
|
-
} else if (hasCatch) {
|
|
2696
|
-
if (this.prev < entry.catchLoc) {
|
|
2697
|
-
return handle(entry.catchLoc, true);
|
|
2698
|
-
}
|
|
2699
|
-
|
|
2700
|
-
} else if (hasFinally) {
|
|
2701
|
-
if (this.prev < entry.finallyLoc) {
|
|
2702
|
-
return handle(entry.finallyLoc);
|
|
2703
|
-
}
|
|
2704
|
-
|
|
2705
|
-
} else {
|
|
2706
|
-
throw new Error("try statement without catch or finally");
|
|
2707
|
-
}
|
|
2708
|
-
}
|
|
2709
|
-
}
|
|
2710
|
-
},
|
|
2711
|
-
|
|
2712
|
-
abrupt: function(type, arg) {
|
|
2713
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
2714
|
-
var entry = this.tryEntries[i];
|
|
2715
|
-
if (entry.tryLoc <= this.prev &&
|
|
2716
|
-
hasOwn.call(entry, "finallyLoc") &&
|
|
2717
|
-
this.prev < entry.finallyLoc) {
|
|
2718
|
-
var finallyEntry = entry;
|
|
2719
|
-
break;
|
|
2720
|
-
}
|
|
2721
|
-
}
|
|
2722
|
-
|
|
2723
|
-
if (finallyEntry &&
|
|
2724
|
-
(type === "break" ||
|
|
2725
|
-
type === "continue") &&
|
|
2726
|
-
finallyEntry.tryLoc <= arg &&
|
|
2727
|
-
arg <= finallyEntry.finallyLoc) {
|
|
2728
|
-
// Ignore the finally entry if control is not jumping to a
|
|
2729
|
-
// location outside the try/catch block.
|
|
2730
|
-
finallyEntry = null;
|
|
2731
|
-
}
|
|
2732
|
-
|
|
2733
|
-
var record = finallyEntry ? finallyEntry.completion : {};
|
|
2734
|
-
record.type = type;
|
|
2735
|
-
record.arg = arg;
|
|
2736
|
-
|
|
2737
|
-
if (finallyEntry) {
|
|
2738
|
-
this.method = "next";
|
|
2739
|
-
this.next = finallyEntry.finallyLoc;
|
|
2740
|
-
return ContinueSentinel;
|
|
2741
|
-
}
|
|
2742
|
-
|
|
2743
|
-
return this.complete(record);
|
|
2744
|
-
},
|
|
2745
|
-
|
|
2746
|
-
complete: function(record, afterLoc) {
|
|
2747
|
-
if (record.type === "throw") {
|
|
2748
|
-
throw record.arg;
|
|
2749
|
-
}
|
|
2750
|
-
|
|
2751
|
-
if (record.type === "break" ||
|
|
2752
|
-
record.type === "continue") {
|
|
2753
|
-
this.next = record.arg;
|
|
2754
|
-
} else if (record.type === "return") {
|
|
2755
|
-
this.rval = this.arg = record.arg;
|
|
2756
|
-
this.method = "return";
|
|
2757
|
-
this.next = "end";
|
|
2758
|
-
} else if (record.type === "normal" && afterLoc) {
|
|
2759
|
-
this.next = afterLoc;
|
|
2760
|
-
}
|
|
2761
|
-
|
|
2762
|
-
return ContinueSentinel;
|
|
2763
|
-
},
|
|
2764
|
-
|
|
2765
|
-
finish: function(finallyLoc) {
|
|
2766
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
2767
|
-
var entry = this.tryEntries[i];
|
|
2768
|
-
if (entry.finallyLoc === finallyLoc) {
|
|
2769
|
-
this.complete(entry.completion, entry.afterLoc);
|
|
2770
|
-
resetTryEntry(entry);
|
|
2771
|
-
return ContinueSentinel;
|
|
2772
|
-
}
|
|
2773
|
-
}
|
|
2774
|
-
},
|
|
2775
|
-
|
|
2776
|
-
"catch": function(tryLoc) {
|
|
2777
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
2778
|
-
var entry = this.tryEntries[i];
|
|
2779
|
-
if (entry.tryLoc === tryLoc) {
|
|
2780
|
-
var record = entry.completion;
|
|
2781
|
-
if (record.type === "throw") {
|
|
2782
|
-
var thrown = record.arg;
|
|
2783
|
-
resetTryEntry(entry);
|
|
2784
|
-
}
|
|
2785
|
-
return thrown;
|
|
2786
|
-
}
|
|
2787
|
-
}
|
|
2788
|
-
|
|
2789
|
-
// The context.catch method must only be called with a location
|
|
2790
|
-
// argument that corresponds to a known catch block.
|
|
2791
|
-
throw new Error("illegal catch attempt");
|
|
2792
|
-
},
|
|
2793
|
-
|
|
2794
|
-
delegateYield: function(iterable, resultName, nextLoc) {
|
|
2795
|
-
this.delegate = {
|
|
2796
|
-
iterator: values(iterable),
|
|
2797
|
-
resultName: resultName,
|
|
2798
|
-
nextLoc: nextLoc
|
|
2799
|
-
};
|
|
2800
|
-
|
|
2801
|
-
if (this.method === "next") {
|
|
2802
|
-
// Deliberately forget the last sent value so that we don't
|
|
2803
|
-
// accidentally pass it on to the delegate.
|
|
2804
|
-
this.arg = undefined$1;
|
|
2805
|
-
}
|
|
2806
|
-
|
|
2807
|
-
return ContinueSentinel;
|
|
2808
|
-
}
|
|
2809
|
-
};
|
|
2810
|
-
})(
|
|
2811
|
-
// In sloppy mode, unbound `this` refers to the global object, fallback to
|
|
2812
|
-
// Function constructor if we're in global strict mode. That is sadly a form
|
|
2813
|
-
// of indirect eval which violates Content Security Policy.
|
|
2814
|
-
(function() { return this })() || Function("return this")()
|
|
2815
|
-
);
|
|
2816
|
-
});
|
|
2817
|
-
|
|
2818
|
-
/**
|
|
2819
|
-
* Copyright (c) 2014-present, Facebook, Inc.
|
|
2820
|
-
*
|
|
2821
|
-
* This source code is licensed under the MIT license found in the
|
|
2822
|
-
* LICENSE file in the root directory of this source tree.
|
|
2823
|
-
*/
|
|
2824
|
-
|
|
2825
|
-
// This method of obtaining a reference to the global object needs to be
|
|
2826
|
-
// kept identical to the way it is obtained in runtime.js
|
|
2827
|
-
var g = (function() { return this })() || Function("return this")();
|
|
2828
|
-
|
|
2829
|
-
// Use `getOwnPropertyNames` because not all browsers support calling
|
|
2830
|
-
// `hasOwnProperty` on the global `self` object in a worker. See #183.
|
|
2831
|
-
var hadRuntime = g.regeneratorRuntime &&
|
|
2832
|
-
Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0;
|
|
2833
|
-
|
|
2834
|
-
// Save the old regeneratorRuntime in case it needs to be restored later.
|
|
2835
|
-
var oldRuntime = hadRuntime && g.regeneratorRuntime;
|
|
2836
|
-
|
|
2837
|
-
// Force reevalutation of runtime.js.
|
|
2838
|
-
g.regeneratorRuntime = undefined;
|
|
2839
|
-
|
|
2840
|
-
var runtimeModule = runtime;
|
|
2841
|
-
|
|
2842
|
-
if (hadRuntime) {
|
|
2843
|
-
// Restore the original runtime.
|
|
2844
|
-
g.regeneratorRuntime = oldRuntime;
|
|
2845
|
-
} else {
|
|
2846
|
-
// Remove the global property added by runtime.js.
|
|
2847
|
-
try {
|
|
2848
|
-
delete g.regeneratorRuntime;
|
|
2849
|
-
} catch(e) {
|
|
2850
|
-
g.regeneratorRuntime = undefined;
|
|
2851
|
-
}
|
|
2852
|
-
}
|
|
2853
|
-
|
|
2854
|
-
var regenerator = runtimeModule;
|
|
2855
|
-
|
|
2856
|
-
var asyncToGenerator = createCommonjsModule(function (module, exports) {
|
|
2857
|
-
|
|
2858
|
-
exports.__esModule = true;
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
var _promise2 = _interopRequireDefault(promise);
|
|
2863
|
-
|
|
2864
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2865
|
-
|
|
2866
|
-
exports.default = function (fn) {
|
|
2867
|
-
return function () {
|
|
2868
|
-
var gen = fn.apply(this, arguments);
|
|
2869
|
-
return new _promise2.default(function (resolve, reject) {
|
|
2870
|
-
function step(key, arg) {
|
|
2871
|
-
try {
|
|
2872
|
-
var info = gen[key](arg);
|
|
2873
|
-
var value = info.value;
|
|
2874
|
-
} catch (error) {
|
|
2875
|
-
reject(error);
|
|
2876
|
-
return;
|
|
2877
|
-
}
|
|
2878
|
-
|
|
2879
|
-
if (info.done) {
|
|
2880
|
-
resolve(value);
|
|
2881
|
-
} else {
|
|
2882
|
-
return _promise2.default.resolve(value).then(function (value) {
|
|
2883
|
-
step("next", value);
|
|
2884
|
-
}, function (err) {
|
|
2885
|
-
step("throw", err);
|
|
2886
|
-
});
|
|
2887
|
-
}
|
|
2888
|
-
}
|
|
2889
|
-
|
|
2890
|
-
return step("next");
|
|
2891
|
-
});
|
|
2892
|
-
};
|
|
2137
|
+
if (data.length > 0) {
|
|
2138
|
+
return React__default.createElement(
|
|
2139
|
+
'div',
|
|
2140
|
+
{ className: 'contentDeck' },
|
|
2141
|
+
autoScroll ? React__default.createElement(
|
|
2142
|
+
React__default.Fragment,
|
|
2143
|
+
null,
|
|
2144
|
+
React__default.createElement(
|
|
2145
|
+
InfiniteScroll,
|
|
2146
|
+
{ dataLength: data.length, next: loadMore, hasMore: scrolling, scrollThreshold: 0.9 },
|
|
2147
|
+
React__default.createElement(
|
|
2148
|
+
Container,
|
|
2149
|
+
null,
|
|
2150
|
+
cardLoader()
|
|
2151
|
+
)
|
|
2152
|
+
),
|
|
2153
|
+
React__default.createElement(
|
|
2154
|
+
'noscript',
|
|
2155
|
+
null,
|
|
2156
|
+
renderManualPagination()
|
|
2157
|
+
)
|
|
2158
|
+
) : React__default.createElement(
|
|
2159
|
+
React__default.Fragment,
|
|
2160
|
+
null,
|
|
2161
|
+
React__default.createElement(
|
|
2162
|
+
Container,
|
|
2163
|
+
null,
|
|
2164
|
+
cardLoader()
|
|
2165
|
+
),
|
|
2166
|
+
React__default.createElement(
|
|
2167
|
+
'div',
|
|
2168
|
+
{ style: { padding: '0px 10px' } },
|
|
2169
|
+
scrolling ? React__default.createElement(
|
|
2170
|
+
'button',
|
|
2171
|
+
{
|
|
2172
|
+
style: { margin: 'auto', width: '100%' },
|
|
2173
|
+
onClick: function onClick(e) {
|
|
2174
|
+
loadMore();
|
|
2175
|
+
} },
|
|
2176
|
+
'Load More'
|
|
2177
|
+
) : React__default.createElement(
|
|
2178
|
+
'p',
|
|
2179
|
+
{ style: { textAlign: 'center' } },
|
|
2180
|
+
React__default.createElement(
|
|
2181
|
+
'b',
|
|
2182
|
+
null,
|
|
2183
|
+
'End of data'
|
|
2184
|
+
)
|
|
2185
|
+
)
|
|
2186
|
+
),
|
|
2187
|
+
React__default.createElement(
|
|
2188
|
+
'noscript',
|
|
2189
|
+
null,
|
|
2190
|
+
renderManualPagination()
|
|
2191
|
+
)
|
|
2192
|
+
)
|
|
2193
|
+
);
|
|
2194
|
+
} else {
|
|
2195
|
+
return React__default.createElement(
|
|
2196
|
+
'div',
|
|
2197
|
+
null,
|
|
2198
|
+
React__default.createElement(
|
|
2199
|
+
'div',
|
|
2200
|
+
null,
|
|
2201
|
+
'No events found '
|
|
2202
|
+
)
|
|
2203
|
+
);
|
|
2204
|
+
}
|
|
2893
2205
|
};
|
|
2894
|
-
});
|
|
2895
|
-
|
|
2896
|
-
var _asyncToGenerator = unwrapExports(asyncToGenerator);
|
|
2897
2206
|
|
|
2898
2207
|
var corsProxy$1 = 'https://cors-anywhere.herokuapp.com/';
|
|
2899
|
-
var itemsPerPage = 10;
|
|
2208
|
+
var itemsPerPage$1 = 10;
|
|
2900
2209
|
|
|
2901
2210
|
var CMEDeck = function CMEDeck(_ref) {
|
|
2902
2211
|
var getData = function () {
|
|
@@ -2948,7 +2257,7 @@ var CMEDeck = function CMEDeck(_ref) {
|
|
|
2948
2257
|
});
|
|
2949
2258
|
|
|
2950
2259
|
setIsLoading(false);
|
|
2951
|
-
newData.length === itemsPerPage ? setScrolling(true) : setScrolling(false);
|
|
2260
|
+
newData.length === itemsPerPage$1 ? setScrolling(true) : setScrolling(false);
|
|
2952
2261
|
setData(function (prevData) {
|
|
2953
2262
|
return [].concat(_toConsumableArray(prevData), _toConsumableArray(newData));
|
|
2954
2263
|
});
|
|
@@ -3008,7 +2317,7 @@ var CMEDeck = function CMEDeck(_ref) {
|
|
|
3008
2317
|
data = _useState8[0],
|
|
3009
2318
|
setData = _useState8[1];
|
|
3010
2319
|
|
|
3011
|
-
var _useState9 = useState(router && router.query && router.query.page ? (parseInt(router.query.page) - 1) * itemsPerPage : 0),
|
|
2320
|
+
var _useState9 = useState(router && router.query && router.query.page ? (parseInt(router.query.page) - 1) * itemsPerPage$1 : 0),
|
|
3012
2321
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
3013
2322
|
from = _useState10[0],
|
|
3014
2323
|
setFrom = _useState10[1];
|
|
@@ -3018,7 +2327,7 @@ var CMEDeck = function CMEDeck(_ref) {
|
|
|
3018
2327
|
|
|
3019
2328
|
useEffect(function () {
|
|
3020
2329
|
// load initial data
|
|
3021
|
-
getData({ from: from, limit: itemsPerPage });
|
|
2330
|
+
getData({ from: from, limit: itemsPerPage$1 });
|
|
3022
2331
|
}, []);
|
|
3023
2332
|
|
|
3024
2333
|
var changePageNumber = function changePageNumber(pageNumber) {
|
|
@@ -3073,7 +2382,7 @@ var CMEDeck = function CMEDeck(_ref) {
|
|
|
3073
2382
|
|
|
3074
2383
|
var loadMore = debounce_1(function () {
|
|
3075
2384
|
setFrom(function (prevFrom) {
|
|
3076
|
-
return prevFrom + itemsPerPage;
|
|
2385
|
+
return prevFrom + itemsPerPage$1;
|
|
3077
2386
|
});
|
|
3078
2387
|
setCurrentPage(function (prevCurrentPage) {
|
|
3079
2388
|
return prevCurrentPage + 1;
|
|
@@ -3083,7 +2392,7 @@ var CMEDeck = function CMEDeck(_ref) {
|
|
|
3083
2392
|
useEffect(function () {
|
|
3084
2393
|
if (currentPageRef.current !== currentPage && fromeRef.current !== from) {
|
|
3085
2394
|
fromeRef.current = from;
|
|
3086
|
-
getData({ from: from, limit: itemsPerPage });
|
|
2395
|
+
getData({ from: from, limit: itemsPerPage$1 });
|
|
3087
2396
|
}
|
|
3088
2397
|
}, [currentPage]);
|
|
3089
2398
|
|
|
@@ -6132,6 +5441,28 @@ var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
|
6132
5441
|
|
|
6133
5442
|
var id = getYoutubeId(url);
|
|
6134
5443
|
|
|
5444
|
+
var _useState = useState(false),
|
|
5445
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
5446
|
+
playReported = _useState2[0],
|
|
5447
|
+
setPlayReported = _useState2[1];
|
|
5448
|
+
|
|
5449
|
+
var _useState3 = useState(false),
|
|
5450
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
5451
|
+
endReported = _useState4[0],
|
|
5452
|
+
setEndReported = _useState4[1];
|
|
5453
|
+
|
|
5454
|
+
var _useState5 = useState(null),
|
|
5455
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
5456
|
+
intervalID = _useState6[0],
|
|
5457
|
+
setIntervalID = _useState6[1];
|
|
5458
|
+
|
|
5459
|
+
var _useState7 = useState(null),
|
|
5460
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
5461
|
+
segmentData = _useState8[0],
|
|
5462
|
+
setSegemntData = _useState8[1];
|
|
5463
|
+
|
|
5464
|
+
var queueProgress = [];
|
|
5465
|
+
|
|
6135
5466
|
var opts = {
|
|
6136
5467
|
width: '100%',
|
|
6137
5468
|
playerVars: {
|
|
@@ -6139,7 +5470,77 @@ var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
|
6139
5470
|
}
|
|
6140
5471
|
};
|
|
6141
5472
|
|
|
6142
|
-
|
|
5473
|
+
useEffect(function () {
|
|
5474
|
+
if (segmentData) {
|
|
5475
|
+
console.log('Video Segment', segmentData);
|
|
5476
|
+
Beam.report_beam_video('Segment', main_16, segmentData.duration, segmentData.current, segmentData.segment);
|
|
5477
|
+
}
|
|
5478
|
+
}, [segmentData]);
|
|
5479
|
+
|
|
5480
|
+
var handlePlayPercent = function handlePlayPercent(player) {
|
|
5481
|
+
var current = player.getCurrentTime();
|
|
5482
|
+
var duration = player.getDuration();
|
|
5483
|
+
var queue = Math.floor(duration / 10);
|
|
5484
|
+
var segment = Math.floor(current / queue);
|
|
5485
|
+
|
|
5486
|
+
if (!queueProgress.includes(segment)) {
|
|
5487
|
+
setSegemntData({
|
|
5488
|
+
current: current,
|
|
5489
|
+
duration: duration,
|
|
5490
|
+
queue: queue,
|
|
5491
|
+
segment: segment
|
|
5492
|
+
});
|
|
5493
|
+
queueProgress.push(segment);
|
|
5494
|
+
}
|
|
5495
|
+
};
|
|
5496
|
+
|
|
5497
|
+
var handleOnPlay = function handleOnPlay(event) {
|
|
5498
|
+
// report play
|
|
5499
|
+
if (!playReported) {
|
|
5500
|
+
console.log('Video Play', event);
|
|
5501
|
+
|
|
5502
|
+
var player = event.target;
|
|
5503
|
+
var current = player.getCurrentTime();
|
|
5504
|
+
var duration = player.getDuration();
|
|
5505
|
+
var queue = Math.floor(duration / 10);
|
|
5506
|
+
var segment = Math.floor(current / queue);
|
|
5507
|
+
|
|
5508
|
+
Beam.report_beam_video('Play', main_16, duration, current, segment);
|
|
5509
|
+
setPlayReported(true);
|
|
5510
|
+
var _intervalID = setInterval(function () {
|
|
5511
|
+
handlePlayPercent(event.target);
|
|
5512
|
+
}, 1000);
|
|
5513
|
+
setIntervalID(_intervalID);
|
|
5514
|
+
}
|
|
5515
|
+
};
|
|
5516
|
+
|
|
5517
|
+
var handleOnEnd = function handleOnEnd(event) {
|
|
5518
|
+
if (!endReported) {
|
|
5519
|
+
console.log('Video End', event);
|
|
5520
|
+
var player = event.target;
|
|
5521
|
+
var current = player.getCurrentTime();
|
|
5522
|
+
var duration = player.getDuration();
|
|
5523
|
+
var queue = Math.floor(duration / 10);
|
|
5524
|
+
var segment = Math.floor(current / queue);
|
|
5525
|
+
|
|
5526
|
+
Beam.report_beam_video('End', main_16, duration, current, segment);
|
|
5527
|
+
setEndReported(true);
|
|
5528
|
+
clearInterval(intervalID);
|
|
5529
|
+
}
|
|
5530
|
+
};
|
|
5531
|
+
|
|
5532
|
+
var handleOnPause = function handleOnPause(event) {
|
|
5533
|
+
console.log('Video Pause');
|
|
5534
|
+
var player = event.target;
|
|
5535
|
+
var current = player.getCurrentTime();
|
|
5536
|
+
var duration = player.getDuration();
|
|
5537
|
+
var queue = Math.floor(duration / 10);
|
|
5538
|
+
var segment = Math.floor(current / queue);
|
|
5539
|
+
|
|
5540
|
+
Beam.report_beam_video('Pause', main_16, duration, current, segment);
|
|
5541
|
+
};
|
|
5542
|
+
|
|
5543
|
+
return React__default.createElement(YouTube, { videoId: id, opts: opts, onPlay: handleOnPlay, onPause: handleOnPause, onEnd: handleOnEnd });
|
|
6143
5544
|
};
|
|
6144
5545
|
|
|
6145
5546
|
var Sidebar = function Sidebar(_ref) {
|
|
@@ -6664,10 +6065,10 @@ function datasetify(elem) {
|
|
|
6664
6065
|
props.push({ name: "data-" + key, value: ds[key] });
|
|
6665
6066
|
}
|
|
6666
6067
|
|
|
6667
|
-
return props.length ? stringify
|
|
6068
|
+
return props.length ? stringify(props) : ""
|
|
6668
6069
|
}
|
|
6669
6070
|
|
|
6670
|
-
function stringify
|
|
6071
|
+
function stringify(list) {
|
|
6671
6072
|
var attributes = [];
|
|
6672
6073
|
list.forEach(function (tuple) {
|
|
6673
6074
|
var name = tuple.name;
|
|
@@ -6703,7 +6104,7 @@ function properties(elem) {
|
|
|
6703
6104
|
props.push({ name: "class", value: elem.className });
|
|
6704
6105
|
}
|
|
6705
6106
|
|
|
6706
|
-
return props.length ? stringify
|
|
6107
|
+
return props.length ? stringify(props) : ""
|
|
6707
6108
|
}
|
|
6708
6109
|
|
|
6709
6110
|
function escapeText(s) {
|
|
@@ -14088,161 +13489,6 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
|
14088
13489
|
|
|
14089
13490
|
var Breadcrumbs$1 = React__default.memo(Breadcrumbs);
|
|
14090
13491
|
|
|
14091
|
-
var js_cookie = createCommonjsModule(function (module, exports) {
|
|
14092
|
-
(function (factory) {
|
|
14093
|
-
var registeredInModuleLoader;
|
|
14094
|
-
{
|
|
14095
|
-
module.exports = factory();
|
|
14096
|
-
registeredInModuleLoader = true;
|
|
14097
|
-
}
|
|
14098
|
-
if (!registeredInModuleLoader) {
|
|
14099
|
-
var OldCookies = window.Cookies;
|
|
14100
|
-
var api = window.Cookies = factory();
|
|
14101
|
-
api.noConflict = function () {
|
|
14102
|
-
window.Cookies = OldCookies;
|
|
14103
|
-
return api;
|
|
14104
|
-
};
|
|
14105
|
-
}
|
|
14106
|
-
}(function () {
|
|
14107
|
-
function extend () {
|
|
14108
|
-
var i = 0;
|
|
14109
|
-
var result = {};
|
|
14110
|
-
for (; i < arguments.length; i++) {
|
|
14111
|
-
var attributes = arguments[ i ];
|
|
14112
|
-
for (var key in attributes) {
|
|
14113
|
-
result[key] = attributes[key];
|
|
14114
|
-
}
|
|
14115
|
-
}
|
|
14116
|
-
return result;
|
|
14117
|
-
}
|
|
14118
|
-
|
|
14119
|
-
function decode (s) {
|
|
14120
|
-
return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);
|
|
14121
|
-
}
|
|
14122
|
-
|
|
14123
|
-
function init (converter) {
|
|
14124
|
-
function api() {}
|
|
14125
|
-
|
|
14126
|
-
function set (key, value, attributes) {
|
|
14127
|
-
if (typeof document === 'undefined') {
|
|
14128
|
-
return;
|
|
14129
|
-
}
|
|
14130
|
-
|
|
14131
|
-
attributes = extend({
|
|
14132
|
-
path: '/'
|
|
14133
|
-
}, api.defaults, attributes);
|
|
14134
|
-
|
|
14135
|
-
if (typeof attributes.expires === 'number') {
|
|
14136
|
-
attributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5);
|
|
14137
|
-
}
|
|
14138
|
-
|
|
14139
|
-
// We're using "expires" because "max-age" is not supported by IE
|
|
14140
|
-
attributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';
|
|
14141
|
-
|
|
14142
|
-
try {
|
|
14143
|
-
var result = JSON.stringify(value);
|
|
14144
|
-
if (/^[\{\[]/.test(result)) {
|
|
14145
|
-
value = result;
|
|
14146
|
-
}
|
|
14147
|
-
} catch (e) {}
|
|
14148
|
-
|
|
14149
|
-
value = converter.write ?
|
|
14150
|
-
converter.write(value, key) :
|
|
14151
|
-
encodeURIComponent(String(value))
|
|
14152
|
-
.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
|
|
14153
|
-
|
|
14154
|
-
key = encodeURIComponent(String(key))
|
|
14155
|
-
.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)
|
|
14156
|
-
.replace(/[\(\)]/g, escape);
|
|
14157
|
-
|
|
14158
|
-
var stringifiedAttributes = '';
|
|
14159
|
-
for (var attributeName in attributes) {
|
|
14160
|
-
if (!attributes[attributeName]) {
|
|
14161
|
-
continue;
|
|
14162
|
-
}
|
|
14163
|
-
stringifiedAttributes += '; ' + attributeName;
|
|
14164
|
-
if (attributes[attributeName] === true) {
|
|
14165
|
-
continue;
|
|
14166
|
-
}
|
|
14167
|
-
|
|
14168
|
-
// Considers RFC 6265 section 5.2:
|
|
14169
|
-
// ...
|
|
14170
|
-
// 3. If the remaining unparsed-attributes contains a %x3B (";")
|
|
14171
|
-
// character:
|
|
14172
|
-
// Consume the characters of the unparsed-attributes up to,
|
|
14173
|
-
// not including, the first %x3B (";") character.
|
|
14174
|
-
// ...
|
|
14175
|
-
stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
|
|
14176
|
-
}
|
|
14177
|
-
|
|
14178
|
-
return (document.cookie = key + '=' + value + stringifiedAttributes);
|
|
14179
|
-
}
|
|
14180
|
-
|
|
14181
|
-
function get (key, json) {
|
|
14182
|
-
if (typeof document === 'undefined') {
|
|
14183
|
-
return;
|
|
14184
|
-
}
|
|
14185
|
-
|
|
14186
|
-
var jar = {};
|
|
14187
|
-
// To prevent the for loop in the first place assign an empty array
|
|
14188
|
-
// in case there are no cookies at all.
|
|
14189
|
-
var cookies = document.cookie ? document.cookie.split('; ') : [];
|
|
14190
|
-
var i = 0;
|
|
14191
|
-
|
|
14192
|
-
for (; i < cookies.length; i++) {
|
|
14193
|
-
var parts = cookies[i].split('=');
|
|
14194
|
-
var cookie = parts.slice(1).join('=');
|
|
14195
|
-
|
|
14196
|
-
if (!json && cookie.charAt(0) === '"') {
|
|
14197
|
-
cookie = cookie.slice(1, -1);
|
|
14198
|
-
}
|
|
14199
|
-
|
|
14200
|
-
try {
|
|
14201
|
-
var name = decode(parts[0]);
|
|
14202
|
-
cookie = (converter.read || converter)(cookie, name) ||
|
|
14203
|
-
decode(cookie);
|
|
14204
|
-
|
|
14205
|
-
if (json) {
|
|
14206
|
-
try {
|
|
14207
|
-
cookie = JSON.parse(cookie);
|
|
14208
|
-
} catch (e) {}
|
|
14209
|
-
}
|
|
14210
|
-
|
|
14211
|
-
jar[name] = cookie;
|
|
14212
|
-
|
|
14213
|
-
if (key === name) {
|
|
14214
|
-
break;
|
|
14215
|
-
}
|
|
14216
|
-
} catch (e) {}
|
|
14217
|
-
}
|
|
14218
|
-
|
|
14219
|
-
return key ? jar[key] : jar;
|
|
14220
|
-
}
|
|
14221
|
-
|
|
14222
|
-
api.set = set;
|
|
14223
|
-
api.get = function (key) {
|
|
14224
|
-
return get(key, false /* read as raw */);
|
|
14225
|
-
};
|
|
14226
|
-
api.getJSON = function (key) {
|
|
14227
|
-
return get(key, true /* read as json */);
|
|
14228
|
-
};
|
|
14229
|
-
api.remove = function (key, attributes) {
|
|
14230
|
-
set(key, '', extend(attributes, {
|
|
14231
|
-
expires: -1
|
|
14232
|
-
}));
|
|
14233
|
-
};
|
|
14234
|
-
|
|
14235
|
-
api.defaults = {};
|
|
14236
|
-
|
|
14237
|
-
api.withConverter = init;
|
|
14238
|
-
|
|
14239
|
-
return api;
|
|
14240
|
-
}
|
|
14241
|
-
|
|
14242
|
-
return init(function () {});
|
|
14243
|
-
}));
|
|
14244
|
-
});
|
|
14245
|
-
|
|
14246
13492
|
var SetCookie = function SetCookie(key, value) {
|
|
14247
13493
|
js_cookie.set(key, value, { expires: 1, sameSite: 'none', secure: true });
|
|
14248
13494
|
};
|