@mjhls/mjh-framework 1.0.684-beta.1 → 1.0.684

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 (151) hide show
  1. package/dist/cjs/AD.js +1 -1
  2. package/dist/cjs/AD300x250.js +3 -3
  3. package/dist/cjs/AD300x250x600.js +3 -3
  4. package/dist/cjs/AD728x90.js +4 -4
  5. package/dist/cjs/ADFloatingFooter.js +2 -2
  6. package/dist/cjs/ADGutter.js +2 -2
  7. package/dist/cjs/ADSkyscraper.js +2 -2
  8. package/dist/cjs/ADSponsoredResources.js +2 -2
  9. package/dist/cjs/ADWebcast.js +2 -2
  10. package/dist/cjs/ADWelcome.js +2 -2
  11. package/dist/cjs/AdSlot.js +2 -2
  12. package/dist/cjs/AdSlotsProvider.js +1 -1
  13. package/dist/cjs/ArticleCarousel.js +1 -1
  14. package/dist/cjs/ArticleSeriesListing.js +4 -4
  15. package/dist/cjs/Auth.js +507 -256
  16. package/dist/cjs/{BlockContent-091a991f.js → BlockContent-88f69acd.js} +1 -1
  17. package/dist/cjs/BrowseVideosListing.js +1 -1
  18. package/dist/cjs/CMEDeck.js +5 -5
  19. package/dist/cjs/Column3.js +4 -4
  20. package/dist/cjs/ConferenceArticleCard.js +2 -2
  21. package/dist/cjs/DeckContent.js +7 -7
  22. package/dist/cjs/DeckQueue.js +6 -6
  23. package/dist/cjs/{Dfp-f6a18ed2.js → Dfp-b2bc3b97.js} +1 -1
  24. package/dist/cjs/EventsDeck.js +4 -4
  25. package/dist/cjs/ExternalResources.js +7 -7
  26. package/dist/cjs/Feature.js +3 -3
  27. package/dist/cjs/ForbesHero.js +2 -2
  28. package/dist/cjs/GridContent.js +10 -10
  29. package/dist/cjs/GridHero.js +2 -2
  30. package/dist/cjs/GroupDeck.js +1 -1
  31. package/dist/cjs/HamMagazine.js +4 -4
  32. package/dist/cjs/Hero.js +1 -1
  33. package/dist/cjs/HorizontalHero.js +2 -2
  34. package/dist/cjs/IssueContentDeck.js +2 -2
  35. package/dist/cjs/IssueDeck.js +2 -2
  36. package/dist/cjs/IssueLanding.js +7 -7
  37. package/dist/cjs/LeftNav.js +2 -2
  38. package/dist/cjs/MasterDeck.js +7 -7
  39. package/dist/cjs/NavMagazine.js +4 -4
  40. package/dist/cjs/NavNative.js +3 -3
  41. package/dist/cjs/OncliveHero.js +2 -2
  42. package/dist/cjs/OncliveLargeHero.js +2 -2
  43. package/dist/cjs/PartnerDetailListing.js +15 -1212
  44. package/dist/cjs/PublicationDeck.js +1 -1
  45. package/dist/cjs/QueueDeckExpanded.js +9 -9
  46. package/dist/cjs/RecentNews.js +2 -2
  47. package/dist/cjs/RelatedContent.js +2 -2
  48. package/dist/cjs/{SocialSearchComponent-9cd24578.js → SocialSearchComponent-6b5e5b47.js} +5 -5
  49. package/dist/cjs/TaxonomyCard.js +2 -2
  50. package/dist/cjs/TemplateNormal.js +3 -3
  51. package/dist/cjs/ThumbnailCard.js +1 -1
  52. package/dist/cjs/Ustream.js +2 -2
  53. package/dist/cjs/VerticalHero.js +2 -2
  54. package/dist/cjs/VideoSeriesCard.js +2 -2
  55. package/dist/cjs/VideoSeriesListing.js +3 -3
  56. package/dist/cjs/View.js +137 -532
  57. package/dist/cjs/YahooHero.js +2 -2
  58. package/dist/cjs/YoutubeGroup.js +1 -1
  59. package/dist/cjs/getQuery.js +2 -2
  60. package/dist/cjs/getRelatedArticle.js +5 -354
  61. package/dist/cjs/getSerializers.js +6 -6
  62. package/dist/cjs/{getTargeting-9af0ef69.js → getTargeting-fee8c429.js} +2 -2
  63. package/dist/cjs/getTargeting.js +1 -1
  64. package/dist/cjs/{index-fa8ed292.js → index-2d0a4911.js} +34 -27
  65. package/dist/cjs/{index-3294d3bc.js → index-5be2866f.js} +1 -1
  66. package/dist/cjs/{index-c49c3b5e.js → index-8c9e8ca7.js} +462 -450
  67. package/dist/cjs/{index-be0c82be.js → index-b5eb3ff8.js} +20 -19
  68. package/dist/cjs/{index.es-9110add6.js → index.es-ab3f2690.js} +3 -1
  69. package/dist/cjs/index.js +16 -15
  70. package/dist/cjs/{main-a4cb15bb.js → main-b6c96c8d.js} +67 -36
  71. package/dist/cjs/{moment-575fe24c.js → moment-66a6a284.js} +1 -1
  72. package/dist/cjs/timeDifferenceCalc.js +1 -1
  73. package/dist/cjs/urlFor.js +1 -1
  74. package/dist/esm/AD.js +1 -1
  75. package/dist/esm/AD300x250.js +3 -3
  76. package/dist/esm/AD300x250x600.js +3 -3
  77. package/dist/esm/AD728x90.js +4 -4
  78. package/dist/esm/ADFloatingFooter.js +2 -2
  79. package/dist/esm/ADGutter.js +2 -2
  80. package/dist/esm/ADSkyscraper.js +2 -2
  81. package/dist/esm/ADSponsoredResources.js +2 -2
  82. package/dist/esm/ADWebcast.js +2 -2
  83. package/dist/esm/ADWelcome.js +2 -2
  84. package/dist/esm/AdSlot.js +2 -2
  85. package/dist/esm/AdSlotsProvider.js +1 -1
  86. package/dist/esm/ArticleCarousel.js +1 -1
  87. package/dist/esm/ArticleSeriesListing.js +4 -4
  88. package/dist/esm/Auth.js +499 -248
  89. package/dist/esm/{BlockContent-e9b4ddcf.js → BlockContent-a614acdf.js} +1 -1
  90. package/dist/esm/BrowseVideosListing.js +1 -1
  91. package/dist/esm/CMEDeck.js +5 -5
  92. package/dist/esm/Column3.js +4 -4
  93. package/dist/esm/ConferenceArticleCard.js +2 -2
  94. package/dist/esm/DeckContent.js +7 -7
  95. package/dist/esm/DeckQueue.js +6 -6
  96. package/dist/esm/{Dfp-96b49def.js → Dfp-8a8fca18.js} +1 -1
  97. package/dist/esm/EventsDeck.js +4 -4
  98. package/dist/esm/ExternalResources.js +7 -7
  99. package/dist/esm/Feature.js +3 -3
  100. package/dist/esm/ForbesHero.js +2 -2
  101. package/dist/esm/GridContent.js +10 -10
  102. package/dist/esm/GridHero.js +2 -2
  103. package/dist/esm/GroupDeck.js +1 -1
  104. package/dist/esm/HamMagazine.js +4 -4
  105. package/dist/esm/Hero.js +1 -1
  106. package/dist/esm/HorizontalHero.js +2 -2
  107. package/dist/esm/IssueContentDeck.js +2 -2
  108. package/dist/esm/IssueDeck.js +2 -2
  109. package/dist/esm/IssueLanding.js +7 -7
  110. package/dist/esm/LeftNav.js +2 -2
  111. package/dist/esm/MasterDeck.js +7 -7
  112. package/dist/esm/NavMagazine.js +4 -4
  113. package/dist/esm/NavNative.js +3 -3
  114. package/dist/esm/OncliveHero.js +2 -2
  115. package/dist/esm/OncliveLargeHero.js +2 -2
  116. package/dist/esm/PartnerDetailListing.js +13 -1209
  117. package/dist/esm/PublicationDeck.js +1 -1
  118. package/dist/esm/QueueDeckExpanded.js +9 -9
  119. package/dist/esm/RecentNews.js +2 -2
  120. package/dist/esm/RelatedContent.js +2 -2
  121. package/dist/esm/{SocialSearchComponent-93233334.js → SocialSearchComponent-7f14e0f3.js} +5 -5
  122. package/dist/esm/TaxonomyCard.js +2 -2
  123. package/dist/esm/TemplateNormal.js +3 -3
  124. package/dist/esm/ThumbnailCard.js +1 -1
  125. package/dist/esm/Ustream.js +2 -2
  126. package/dist/esm/VerticalHero.js +2 -2
  127. package/dist/esm/VideoSeriesCard.js +2 -2
  128. package/dist/esm/VideoSeriesListing.js +3 -3
  129. package/dist/esm/View.js +117 -512
  130. package/dist/esm/YahooHero.js +2 -2
  131. package/dist/esm/YoutubeGroup.js +1 -1
  132. package/dist/esm/getQuery.js +2 -2
  133. package/dist/esm/getRelatedArticle.js +5 -354
  134. package/dist/esm/getSerializers.js +6 -6
  135. package/dist/esm/{index-73819142.js → index-51a80699.js} +20 -19
  136. package/dist/esm/{index-85783f24.js → index-5505d4f9.js} +462 -450
  137. package/dist/esm/{index-0e45a0b2.js → index-93ec3c59.js} +34 -27
  138. package/dist/esm/{index-ef6d5dcf.js → index-d2f90501.js} +1 -1
  139. package/dist/esm/{index.es-29c1cef5.js → index.es-938a3a58.js} +3 -1
  140. package/dist/esm/index.js +14 -13
  141. package/dist/esm/{main-5d1e4bd3.js → main-0465b2a0.js} +65 -34
  142. package/dist/esm/{moment-e2f9b20c.js → moment-12415288.js} +1 -1
  143. package/dist/esm/timeDifferenceCalc.js +1 -1
  144. package/dist/esm/urlFor.js +1 -1
  145. package/package.json +1 -1
  146. package/dist/cjs/index-bd6c9f56.js +0 -211
  147. package/dist/esm/index-db3bb315.js +0 -207
  148. /package/dist/cjs/{ADInfeed-f27bc4b5.js → ADInfeed-c676389b.js} +0 -0
  149. /package/dist/cjs/{ADlgInfeed-8decfd9e.js → ADlgInfeed-57d63c87.js} +0 -0
  150. /package/dist/esm/{ADInfeed-1e0ca5e0.js → ADInfeed-97b8cea7.js} +0 -0
  151. /package/dist/esm/{ADlgInfeed-979cf0d5.js → ADlgInfeed-3ab91c75.js} +0 -0
package/dist/cjs/View.js CHANGED
@@ -10,29 +10,29 @@ require('./_iter-detect-60b2f026.js');
10
10
  var toConsumableArray = require('./toConsumableArray-9a3476fe.js');
11
11
  require('./core.get-iterator-method-f62321d4.js');
12
12
  require('./_object-pie-68c5bcbc.js');
13
- var _extends$1 = require('./extends-60837c34.js');
13
+ var _extends = require('./extends-60837c34.js');
14
14
  require('./_object-sap-5e74ba08.js');
15
15
  require('./inherits-513d81cd.js');
16
16
  require('./define-property-f4d12f4e.js');
17
17
  require('./web.dom.iterable-a0e279c1.js');
18
- var _typeof = require('./typeof-725500bc.js');
18
+ var _typeof$1 = require('./typeof-725500bc.js');
19
19
  require('./_is-array-754e012d.js');
20
20
  var React = require('react');
21
21
  var React__default = _interopDefault(React);
22
- var index = require('./index-fa8ed292.js');
22
+ var index = require('./index-2d0a4911.js');
23
23
  require('prop-types');
24
24
  require('react-bootstrap/Row');
25
25
  require('react-bootstrap/Col');
26
- var moment = require('./moment-575fe24c.js');
26
+ var moment = require('./moment-66a6a284.js');
27
27
  var Router = require('next/router');
28
28
  var Router__default = _interopDefault(Router);
29
29
  require('./isSymbol-04666465.js');
30
30
  require('./debounce-eb287781.js');
31
- var index_es = require('./index.es-9110add6.js');
31
+ var index_es = require('./index.es-ab3f2690.js');
32
32
  require('react-dom');
33
- require('./index-be0c82be.js');
33
+ require('./index-b5eb3ff8.js');
34
34
  require('./index-da796b8c.js');
35
- var main = require('./main-a4cb15bb.js');
35
+ var main = require('./main-b6c96c8d.js');
36
36
  require('./entities-310b46ee.js');
37
37
  var stringify = require('./stringify-7c5aff47.js');
38
38
  var slicedToArray = require('./slicedToArray-8f385299.js');
@@ -40,7 +40,7 @@ var asyncToGenerator = require('./asyncToGenerator-533d476a.js');
40
40
  require('./_set-species-f92c67c5.js');
41
41
  require('./beam-7217b7e7.js');
42
42
  var AdSlot = require('./AdSlot.js');
43
- var BlockContent = require('./BlockContent-091a991f.js');
43
+ var BlockContent = require('./BlockContent-88f69acd.js');
44
44
  require('./smoothscroll-95231a70.js');
45
45
  require('./GroupDeck.js');
46
46
  require('react-bootstrap');
@@ -48,7 +48,7 @@ require('./iconBase-68959171.js');
48
48
  var Button = _interopDefault(require('react-bootstrap/Button'));
49
49
  var defineProperty$1 = require('./defineProperty-55548b25.js');
50
50
  var Form = _interopDefault(require('react-bootstrap/Form'));
51
- var getSerializers = require('./index-c49c3b5e.js');
51
+ var getSerializers = require('./index-8c9e8ca7.js');
52
52
  require('./util-f2c1b65b.js');
53
53
  require('./brightcove-react-player-loader.es-156bd4d6.js');
54
54
  require('react-bootstrap/Pagination');
@@ -60,10 +60,10 @@ var keys = require('./keys-a586b7a0.js');
60
60
  require('react-bootstrap/Dropdown');
61
61
  var index_esm$3 = require('./index.esm-ff47db6f.js');
62
62
  var getSeriesDetail = require('./getSeriesDetail.js');
63
- require('./index-bd6c9f56.js');
64
- var getRelatedArticle = require('./getRelatedArticle.js');
63
+ require('nookies');
65
64
  var getQuery = require('./getQuery.js');
66
- var getTargeting = require('./getTargeting-9af0ef69.js');
65
+ var getRelatedArticle = require('./getRelatedArticle.js');
66
+ var getTargeting = require('./getTargeting-fee8c429.js');
67
67
  var getKeywords = require('./getKeywords.js');
68
68
  var urlFor = require('./urlFor.js');
69
69
  var styleInject_es = require('./style-inject.es-dcee06b6.js');
@@ -143,9 +143,9 @@ var DocumentGroup = function DocumentGroup(_ref) {
143
143
  style: { display: 'flex', flexDirection: 'column', padding: '0 1rem', justifyContent: thumbnailUrl ? 'center' : 'flex-start', alignItems: 'center' } },
144
144
  thumbnailUrl && React__default.createElement('img', { style: { maxWidth: '220px', maxHeight: '100px', marginTop: '1rem' }, src: thumbnailUrl, alt: name }),
145
145
  !thumbnailUrl && React__default.createElement('p', {
146
- style: { maxWidth: '315px', margin: '0', color: 'var(--primary)', textAlign: thumbnailUrl ? 'center' : main.main_36 ? 'left' : 'right', marginTop: '.25rem' },
146
+ style: { maxWidth: '315px', margin: '0', color: 'var(--primary)', textAlign: thumbnailUrl ? 'center' : main.main_39 ? 'left' : 'right', marginTop: '.25rem' },
147
147
  dangerouslySetInnerHTML: { __html: name } }),
148
- main.main_36 && !thumbnailUrl && React__default.createElement(
148
+ main.main_39 && !thumbnailUrl && React__default.createElement(
149
149
  'style',
150
150
  { jsx: 'true' },
151
151
  '\n a.doc-group {\n display: block !important;\n padding: 0!important;\n }\n '
@@ -155,7 +155,7 @@ var DocumentGroup = function DocumentGroup(_ref) {
155
155
 
156
156
  var findIndex = function findIndex(arr) {
157
157
  var indexes = [];
158
- if ((typeof arr === 'undefined' ? 'undefined' : _typeof._typeof(arr)) === 'object') {
158
+ if ((typeof arr === 'undefined' ? 'undefined' : _typeof$1._typeof(arr)) === 'object') {
159
159
  var _iteratorNormalCompletion = true;
160
160
  var _didIteratorError = false;
161
161
  var _iteratorError = undefined;
@@ -252,7 +252,7 @@ var ISI = function ISI(props) {
252
252
  );
253
253
  };
254
254
 
255
- var css = ".RelatedArticles-module_mediaContainer__10h9k {\r\n display: flex;\r\n flex-direction: row;\r\n flex-wrap: nowrap;\r\n margin: 0 -1rem;\r\n}\r\n.RelatedArticles-module_mediaCard__3wQbn {\r\n margin: 0 1rem 1rem;\r\n width: calc(33% - 1rem);\r\n display: column;\r\n flex-direction: row;\r\n margin-bottom: 0.75rem;\r\n border-bottom: none;\r\n}\r\n.RelatedArticles-module_mediaCard__3wQbn:last-child {\r\n border-bottom: none;\r\n}\r\n.RelatedArticles-module_cardTitle__3P-Ib {\r\n font-weight: bold;\r\n color: #252525;\r\n margin-bottom: 0.25rem;\r\n font-size: 15px;\r\n}\r\n.RelatedArticles-module_authorListing__1EFg4 span.RelatedArticles-module_text-muted__3b0zX {\r\n color: #000;\r\n font-weight: bold;\r\n}\r\n.RelatedArticles-module_cardDate__1wOR5 {\r\n color: var(--dark);\r\n display: block;\r\n background: #fff !important;\r\n margin-bottom: 0;\r\n}\r\n.RelatedArticles-module_imgWrapper__5Jx_4 {\r\n display: block;\r\n text-align: center;\r\n margin-bottom: 0.5rem;\r\n}\r\n.RelatedArticles-module_imgWrapper__5Jx_4 img {\r\n height: 135px;\r\n width: 100%;\r\n object-fit: cover;\r\n object-position: center;\r\n}\r\n@media screen and (max-width: 1064px) {\r\n}\r\n@media screen and (max-width: 968px) {\r\n .RelatedArticles-module_mediaContainer__10h9k {\r\n flex-wrap: wrap;\r\n }\r\n .RelatedArticles-module_mediaCard__3wQbn {\r\n width: 100%;\r\n background-color: #cccccc;\r\n margin-bottom: 0.5rem;\r\n padding: 0.5rem;\r\n border-radius: 0.25rem;\r\n }\r\n .RelatedArticles-module_imgWrapper__5Jx_4 {\r\n display: none;\r\n }\r\n}\r\n";
255
+ var css = ".RelatedArticles-module_mediaContainer__10h9k {\r\n display: flex;\r\n flex-direction: row;\r\n flex-wrap: nowrap;\r\n margin: 0 -1rem;\r\n}\r\n.RelatedArticles-module_mediaCard__3wQbn {\r\n margin: 0 1rem 1rem;\r\n width: calc(33% - 1rem);\r\n display: column;\r\n flex-direction: row;\r\n margin-bottom: 0.75rem;\r\n padding-bottom: 0.75rem;\r\n border-bottom: none;\r\n}\r\n.RelatedArticles-module_mediaCard__3wQbn:last-child {\r\n border-bottom: none;\r\n}\r\n.RelatedArticles-module_cardTitle__3P-Ib {\r\n font-weight: bold;\r\n color: #252525;\r\n margin-bottom: 0.25rem;\r\n font-size: 15px;\r\n}\r\n.RelatedArticles-module_authorListing__1EFg4 span.RelatedArticles-module_text-muted__3b0zX {\r\n color: #000;\r\n font-weight: bold;\r\n}\r\n.RelatedArticles-module_cardDate__1wOR5 {\r\n color: var(--dark);\r\n display: block;\r\n background: #fff !important;\r\n margin-bottom: 0;\r\n}\r\n.RelatedArticles-module_imgWrapper__5Jx_4 {\r\n display: block;\r\n text-align: center;\r\n margin-bottom: 0.5rem;\r\n}\r\n.RelatedArticles-module_imgWrapper__5Jx_4 img {\r\n height: 135px;\r\n width: 100%;\r\n object-fit: cover;\r\n object-position: center;\r\n}\r\n@media screen and (max-width: 1064px) {\r\n}\r\n@media screen and (max-width: 968px) {\r\n .RelatedArticles-module_mediaContainer__10h9k {\r\n flex-wrap: wrap;\r\n }\r\n .RelatedArticles-module_mediaCard__3wQbn {\r\n width: 100%;\r\n }\r\n .RelatedArticles-module_imgWrapper__5Jx_4 img {\r\n width: 100%;\r\n height: auto;\r\n\r\n max-height: 175px;\r\n object-fit: contain;\r\n margin-bottom: 1rem;\r\n }\r\n}\r\n";
256
256
  var styles = { "mediaContainer": "RelatedArticles-module_mediaContainer__10h9k", "mediaCard": "RelatedArticles-module_mediaCard__3wQbn", "cardTitle": "RelatedArticles-module_cardTitle__3P-Ib", "authorListing": "RelatedArticles-module_authorListing__1EFg4", "text-muted": "RelatedArticles-module_text-muted__3b0zX", "cardDate": "RelatedArticles-module_cardDate__1wOR5", "imgWrapper": "RelatedArticles-module_imgWrapper__5Jx_4" };
257
257
  styleInject_es.styleInject(css);
258
258
 
@@ -297,22 +297,6 @@ var RelatedArticle = function RelatedArticle(_ref) {
297
297
  );
298
298
  };
299
299
 
300
- var defaults = { nonTextBehavior: 'remove' };
301
-
302
- var blocksToText = function blocksToText(blocks) {
303
- var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
304
-
305
- var options = _extends$1._Object$assign({}, defaults, opts);
306
- return blocks.map(function (block) {
307
- if (block._type !== 'block' || !block.children) {
308
- return options.nonTextBehavior === 'remove' ? '' : '[' + block._type + ' block]';
309
- }
310
- return block.children.map(function (child) {
311
- return child.text;
312
- }).join('');
313
- }).join('\n\n');
314
- };
315
-
316
300
  var Article = function Article(props) {
317
301
  var onVote = function () {
318
302
  var _ref = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee(nodeKey, selectedChoice) {
@@ -486,7 +470,7 @@ var Article = function Article(props) {
486
470
  };
487
471
  var renderAuthorBiography = function renderAuthorBiography(biography) {
488
472
  if (biography) {
489
- return React__default.createElement(BlockContent.BlockContent, _extends$1._extends({
473
+ return React__default.createElement(BlockContent.BlockContent, _extends._extends({
490
474
  serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, contextualADFlag),
491
475
  blocks: [biography]
492
476
  }, client.config()));
@@ -504,56 +488,10 @@ var Article = function Article(props) {
504
488
  };
505
489
 
506
490
  var RelevantTopics = function RelevantTopics() {
507
- if (content_placement && content_placement.length > 0 || documentGroupMapping && documentGroupMapping.length > 0) {
508
- var relatedLinks = [];
509
- if (documentGroupMapping && documentGroupMapping.length > 0) {
510
- documentGroupMapping.forEach(function (documentGroup) {
511
- if (documentGroup.parent) {
512
- relatedLinks = [].concat(toConsumableArray._toConsumableArray(relatedLinks), [{ label: documentGroup.name, href: cpModificationRequired ? '/' + documentGroup.parent.identifier.current + '/' + documentGroup.path : '/' + documentGroup.path }]);
513
- }
514
- });
515
- }
516
- if (content_placement && content_placement.length > 0) {
517
- content_placement.filter(function (item) {
518
- return item.path !== 'news';
519
- }).forEach(function (cp) {
520
- var cp_url = cpModificationRequired ? getTargeting.getContentPlacementUrl(cp) : cp.path;
521
- var href = '/' + cp_url;
522
- relatedLinks = [].concat(toConsumableArray._toConsumableArray(relatedLinks), [{ label: cp.name, href: href }]);
523
- });
524
- }
525
- if (relatedLinks && relatedLinks.length > 0) {
526
- return React__default.createElement(
527
- 'div',
528
- null,
529
- relatedLinks.map(function (relatedLink, index) {
530
- return React__default.createElement(
531
- 'span',
532
- { key: index, className: 'related-link' },
533
- React__default.createElement(
534
- 'a',
535
- { className: 'related-links', style: { color: 'blue' }, href: relatedLink.href },
536
- relatedLink.label
537
- ),
538
- React__default.createElement(
539
- 'style',
540
- { jsx: 'true' },
541
- '\n .related-link:not(:first-child):before {\n content: \' | \';\n }\n '
542
- )
543
- );
544
- })
545
- );
546
- }
547
- return null;
548
- }
549
- return null;
550
- };
551
-
552
- var RelatedContent = function RelatedContent() {
553
- if (showRelatedArticles) {
491
+ if (content_placement && content_placement.length > 0 || documentGroupMapping) {
554
492
  return React__default.createElement(
555
- 'section',
556
- { className: 'related-content-section' },
493
+ 'div',
494
+ { style: { color: '#262626' } },
557
495
  React__default.createElement(
558
496
  'p',
559
497
  { className: 'mb-0' },
@@ -563,17 +501,47 @@ var Article = function Article(props) {
563
501
  'Related Content:'
564
502
  )
565
503
  ),
566
- React__default.createElement(RelevantTopics, null),
567
- React__default.createElement(
568
- 'div',
569
- { className: 'pt-2' },
570
- React__default.createElement(RelatedArticle, { articles: article.relatedContentArticles, client: client })
571
- ),
572
- React__default.createElement(
573
- 'style',
574
- { jsx: 'true' },
575
- '\n .related-content-section {\n margin: 0.5rem 0 0.5rem 0;\n padding: 0.5rem;\n background-color: #e6e6e6;\n border-radius: 0.25rem;\n }\n '
576
- )
504
+ documentGroupMapping && documentGroupMapping.map(function (documentGroup) {
505
+ if (!documentGroup.parent) {
506
+ return null;
507
+ }
508
+
509
+ return React__default.createElement(
510
+ React__default.Fragment,
511
+ null,
512
+ React__default.createElement(
513
+ 'span',
514
+ { className: '' },
515
+ React__default.createElement(
516
+ 'a',
517
+ {
518
+ className: 'related-links',
519
+ style: { color: 'blue' },
520
+ href: cpModificationRequired ? '/' + documentGroup.parent.identifier.current + '/' + documentGroup.path : '/' + documentGroup.path },
521
+ documentGroup.name
522
+ )
523
+ ),
524
+ content_placement && content_placement.length ? ' | ' : null
525
+ );
526
+ }),
527
+ content_placement && content_placement.length > 0 ? content_placement.map(function (cp, index) {
528
+ var cp_url = cpModificationRequired ? getTargeting.getContentPlacementUrl(cp) : cp.path;
529
+ var href = '/' + cp_url;
530
+ return React__default.createElement(
531
+ React__default.Fragment,
532
+ { key: index },
533
+ React__default.createElement(
534
+ 'span',
535
+ null,
536
+ React__default.createElement(
537
+ 'a',
538
+ { className: 'related-links', key: index, href: href, style: { color: 'blue' } },
539
+ cp.name
540
+ )
541
+ ),
542
+ content_placement.length > index + 1 ? ' | ' : null
543
+ );
544
+ }) : null
577
545
  );
578
546
  }
579
547
  return null;
@@ -627,11 +595,11 @@ var Article = function Article(props) {
627
595
  var indexes = findIndex(body);
628
596
 
629
597
  if (indexes.length >= 2 && body.length > 3 && payload.contextualAD && payload.contextualVideoAD) {
630
- payload = _extends$1._extends({}, payload, {
631
- contextualAD: _extends$1._extends({}, payload.contextualAD, {
598
+ payload = _extends._extends({}, payload, {
599
+ contextualAD: _extends._extends({}, payload.contextualAD, {
632
600
  slotId: (payload.contextualAD.slotId || 'contextual_ad') + '-' + payload._id
633
601
  }),
634
- contextualVideoAD: _extends$1._extends({}, payload.contextualVideoAD, {
602
+ contextualVideoAD: _extends._extends({}, payload.contextualVideoAD, {
635
603
  slotId: (payload.contextualVideoAD.slotId || 'in-context_video') + '-' + payload._id
636
604
  })
637
605
  });
@@ -662,77 +630,35 @@ var Article = function Article(props) {
662
630
  setContextualADFlag(true);
663
631
  }
664
632
  };
665
-
666
- //Start: Generating intemediate Section if available
667
- var blockContentSection1 = articleBody.slice(0, selectedIndex);
668
- var blockContentSection2 = articleBody.slice(selectedIndex);
669
- var blockContentIntermediateSection = [];
670
- var rearrangeSections = function rearrangeSections(arr, index) {
671
- var item = arr[index];
672
- if (item && item._type) {
673
- if (item._type === 'block' && blocksToText([item]) === '') {
674
- rearrangeSections(arr, index + 1);
675
- }
676
- if (item._type !== 'block') {
677
- var _selectedIndex = arr.findIndex(function (item1) {
678
- return item1._key === item._key;
679
- });
680
- blockContentIntermediateSection = [].concat(toConsumableArray._toConsumableArray(blockContentIntermediateSection), toConsumableArray._toConsumableArray(arr.slice(0, _selectedIndex + 1)));
681
- blockContentSection2 = blockContentSection2.slice(_selectedIndex + 1);
682
- rearrangeSections(blockContentSection2, 0);
683
- }
684
- }
685
- };
686
- rearrangeSections(blockContentSection2, 0);
687
- //End: Generating intemediate Section if available
688
-
689
633
  return React__default.createElement(
690
634
  React__default.Fragment,
691
635
  null,
692
- React__default.createElement(
693
- 'div',
694
- { 'class': 'clearfix' },
695
- React__default.createElement(BlockContent.BlockContent, _extends$1._extends({
696
- serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, contextualADFlag, null, null, targeting),
697
- blocks: blockContentSection1,
698
- imageOptions: { w: 320, h: 240, fit: 'max' }
699
- }, client.config()))
700
- ),
636
+ React__default.createElement(BlockContent.BlockContent, _extends._extends({
637
+ serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, contextualADFlag, null, null, targeting),
638
+ blocks: [].concat(toConsumableArray._toConsumableArray(articleBody.slice(0, selectedIndex))),
639
+ imageOptions: { w: 320, h: 240, fit: 'max' }
640
+ }, client.config())),
701
641
  React__default.createElement('span', { className: 'clearfix' }),
702
642
  React__default.createElement(
703
643
  'div',
704
644
  { id: 'contextual-native-ad-' + payload._id, className: 'contextual-native-ad' },
705
- React__default.createElement(AdSlot, _extends$1._extends({}, payload.contextualAD, { refreshFlag: false, checkIsAdFound: previewAd ? null : checkIsAdFound }))
645
+ React__default.createElement(AdSlot, _extends._extends({}, payload.contextualAD, { refreshFlag: false, checkIsAdFound: previewAd ? null : checkIsAdFound }))
706
646
  ),
707
647
  React__default.createElement('span', { className: 'clearfix' }),
708
648
  React__default.createElement(
709
649
  'div',
710
650
  { id: 'contextual-video-ad-' + payload._id, className: 'contextual-video-ad' },
711
- React__default.createElement(AdSlot, _extends$1._extends({}, payload.contextualVideoAD, { refreshFlag: false, checkIsAdFound: checkIsVideoAdFound }))
651
+ React__default.createElement(AdSlot, _extends._extends({}, payload.contextualVideoAD, { refreshFlag: false, checkIsAdFound: checkIsVideoAdFound }))
712
652
  ),
713
- blockContentIntermediateSection.length > 0 && React__default.createElement(
714
- 'div',
715
- { 'class': 'clearfix' },
716
- React__default.createElement(BlockContent.BlockContent, _extends$1._extends({
717
- serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, contextualADFlag, null, null, targeting),
718
- blocks: blockContentIntermediateSection,
719
- imageOptions: { w: 320, h: 240, fit: 'max' }
720
- }, client.config()))
721
- ),
722
- React__default.createElement(RelatedContent, null),
723
- React__default.createElement(
724
- 'div',
725
- { 'class': 'clearfix' },
726
- React__default.createElement(BlockContent.BlockContent, _extends$1._extends({
727
- serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
728
- blocks: blockContentSection2,
729
- imageOptions: { w: 320, h: 240, fit: 'max' }
730
- }, client.config()))
731
- )
653
+ React__default.createElement(BlockContent.BlockContent, _extends._extends({
654
+ serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
655
+ blocks: [].concat(toConsumableArray._toConsumableArray(articleBody.slice(selectedIndex))),
656
+ imageOptions: { w: 320, h: 240, fit: 'max' }
657
+ }, client.config()))
732
658
  );
733
659
  } else if (indexes.length >= 2 && body.length >= 3 && payload.contextualAD && !payload.contextualVideoAD) {
734
- payload = _extends$1._extends({}, payload, {
735
- contextualAD: _extends$1._extends({}, payload.contextualAD, {
660
+ payload = _extends._extends({}, payload, {
661
+ contextualAD: _extends._extends({}, payload.contextualAD, {
736
662
  slotId: (payload.contextualAD.slotId || 'contextual_ad') + '-' + payload._id,
737
663
  className: 'ADFluid',
738
664
  // Fetching new contextual targeting based on the current active article.
@@ -745,7 +671,7 @@ var Article = function Article(props) {
745
671
  }, { viewport: [0, 0], sizes: ['fluid', [300, 100]] }] : { viewport: [0, 0], sizes: ['fluid', [300, 100]] }
746
672
  })
747
673
  });
748
- var _selectedIndex2 = indexes[1] + 1;
674
+ var _selectedIndex = indexes[1] + 1;
749
675
 
750
676
  var _checkIsAdFound = function _checkIsAdFound(isFound, adData) {
751
677
  if (!isFound) {
@@ -776,75 +702,34 @@ var Article = function Article(props) {
776
702
  }
777
703
  };
778
704
 
779
- //Start: Generating intemediate Section if available
780
- var _blockContentSection = articleBody.slice(0, _selectedIndex2);
781
- var _blockContentSection2 = articleBody.slice(_selectedIndex2);
782
- var _blockContentIntermediateSection = [];
783
- var _rearrangeSections = function _rearrangeSections(arr, index) {
784
- var item = arr[index];
785
- if (item && item._type) {
786
- if (item._type === 'block' && blocksToText([item]) === '') {
787
- _rearrangeSections(arr, index + 1);
788
- }
789
- if (item._type !== 'block') {
790
- var _selectedIndex3 = arr.findIndex(function (item1) {
791
- return item1._key === item._key;
792
- });
793
- _blockContentIntermediateSection = [].concat(toConsumableArray._toConsumableArray(_blockContentIntermediateSection), toConsumableArray._toConsumableArray(arr.slice(0, _selectedIndex3 + 1)));
794
- _blockContentSection2 = _blockContentSection2.slice(_selectedIndex3 + 1);
795
- _rearrangeSections(_blockContentSection2, 0);
796
- }
797
- }
798
- };
799
- _rearrangeSections(_blockContentSection2, 0);
800
- //End: Generating intemediate Section if available
801
-
802
705
  return React__default.createElement(
803
706
  React__default.Fragment,
804
707
  null,
805
- React__default.createElement(
806
- 'div',
807
- { 'class': 'clearfix' },
808
- React__default.createElement(BlockContent.BlockContent, _extends$1._extends({
809
- serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, contextualADFlag, null, null, targeting),
810
- blocks: _blockContentSection,
811
- imageOptions: { w: 320, h: 240, fit: 'max' }
812
- }, client.config()))
813
- ),
708
+ React__default.createElement(BlockContent.BlockContent, _extends._extends({
709
+ serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, contextualADFlag, null, null, targeting),
710
+ blocks: [].concat(toConsumableArray._toConsumableArray(articleBody.slice(0, _selectedIndex))),
711
+ imageOptions: { w: 320, h: 240, fit: 'max' }
712
+ }, client.config())),
814
713
  contextualADFlag && React__default.createElement('span', { className: 'clearfix' }),
815
714
  (visibleFlag || queueData && queueData.length === 1 || !props.infiniteScroll) && React__default.createElement(
816
715
  'div',
817
716
  { id: 'contextual-native-ad-' + payload._id, className: 'contextual-native-ad' },
818
- React__default.createElement(AdSlot, _extends$1._extends({}, payload.contextualAD, { refreshFlag: false, checkIsAdFound: previewAd ? null : _checkIsAdFound }))
717
+ React__default.createElement(AdSlot, _extends._extends({}, payload.contextualAD, { refreshFlag: false, checkIsAdFound: previewAd ? null : _checkIsAdFound }))
819
718
  ),
820
719
  contextualADFlag && React__default.createElement('span', { className: 'clearfix' }),
821
- _blockContentIntermediateSection.length > 0 && React__default.createElement(
822
- 'div',
823
- { 'class': 'clearfix' },
824
- React__default.createElement(BlockContent.BlockContent, _extends$1._extends({
825
- serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, contextualADFlag, null, null, targeting),
826
- blocks: _blockContentIntermediateSection,
827
- imageOptions: { w: 320, h: 240, fit: 'max' }
828
- }, client.config()))
829
- ),
830
- React__default.createElement(RelatedContent, null),
831
- React__default.createElement(
832
- 'div',
833
- { 'class': 'clearfix' },
834
- React__default.createElement(BlockContent.BlockContent, _extends$1._extends({
835
- serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
836
- blocks: _blockContentSection2,
837
- imageOptions: { w: 320, h: 240, fit: 'max' }
838
- }, client.config()))
839
- )
720
+ React__default.createElement(BlockContent.BlockContent, _extends._extends({
721
+ serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
722
+ blocks: [].concat(toConsumableArray._toConsumableArray(articleBody.slice(_selectedIndex))),
723
+ imageOptions: { w: 320, h: 240, fit: 'max' }
724
+ }, client.config()))
840
725
  );
841
726
  } else if (indexes.length >= 2 && body.length > 3 && payload.contextualVideoAD && !payload.contextualAD) {
842
- payload = _extends$1._extends({}, payload, {
843
- contextualVideoAD: _extends$1._extends({}, payload.contextualVideoAD, {
727
+ payload = _extends._extends({}, payload, {
728
+ contextualVideoAD: _extends._extends({}, payload.contextualVideoAD, {
844
729
  slotId: (payload.contextualVideoAD.slotId || 'in-context_video') + '-' + payload._id
845
730
  })
846
731
  });
847
- var _selectedIndex4 = indexes[1] + 1;
732
+ var _selectedIndex2 = indexes[1] + 1;
848
733
 
849
734
  var _checkIsAdFound2 = function _checkIsAdFound2(isFound) {
850
735
  if (!isFound) {
@@ -860,117 +745,28 @@ var Article = function Article(props) {
860
745
  }
861
746
  };
862
747
 
863
- //Start: Generating intemediate Section if available
864
- var _blockContentSection3 = articleBody.slice(0, _selectedIndex4);
865
- var _blockContentSection4 = articleBody.slice(_selectedIndex4);
866
- var _blockContentIntermediateSection2 = [];
867
- var _rearrangeSections2 = function _rearrangeSections2(arr, index) {
868
- var item = arr[index];
869
- if (item && item._type) {
870
- if (item._type === 'block' && blocksToText([item]) === '') {
871
- _rearrangeSections2(arr, index + 1);
872
- }
873
- if (item._type !== 'block') {
874
- var _selectedIndex5 = arr.findIndex(function (item1) {
875
- return item1._key === item._key;
876
- });
877
- _blockContentIntermediateSection2 = [].concat(toConsumableArray._toConsumableArray(_blockContentIntermediateSection2), toConsumableArray._toConsumableArray(arr.slice(0, _selectedIndex5 + 1)));
878
- _blockContentSection4 = _blockContentSection4.slice(_selectedIndex5 + 1);
879
- _rearrangeSections2(_blockContentSection4, 0);
880
- }
881
- }
882
- };
883
- _rearrangeSections2(_blockContentSection4, 0);
884
- //End: Generating intemediate Section if available
885
-
886
748
  return React__default.createElement(
887
749
  React__default.Fragment,
888
750
  null,
889
- React__default.createElement(
890
- 'div',
891
- { 'class': 'clearfix' },
892
- React__default.createElement(BlockContent.BlockContent, _extends$1._extends({
893
- serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, contextualADFlag, null, null, targeting),
894
- blocks: _blockContentSection3,
895
- imageOptions: { w: 320, h: 240, fit: 'max' }
896
- }, client.config()))
897
- ),
751
+ React__default.createElement(BlockContent.BlockContent, _extends._extends({
752
+ serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, contextualADFlag, null, null, targeting),
753
+ blocks: [].concat(toConsumableArray._toConsumableArray(articleBody.slice(0, _selectedIndex2))),
754
+ imageOptions: { w: 320, h: 240, fit: 'max' }
755
+ }, client.config())),
898
756
  React__default.createElement('span', { className: 'clearfix' }),
899
757
  React__default.createElement(
900
758
  'div',
901
759
  { id: 'contextual-video-ad-' + payload._id, className: 'contextual-video-ad' },
902
- React__default.createElement(AdSlot, _extends$1._extends({}, payload.contextualVideoAD, { refreshFlag: false, checkIsAdFound: _checkIsAdFound2 }))
903
- ),
904
- _blockContentIntermediateSection2.length > 0 && React__default.createElement(
905
- 'div',
906
- { 'class': 'clearfix' },
907
- React__default.createElement(BlockContent.BlockContent, _extends$1._extends({
908
- serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, contextualADFlag, null, null, targeting),
909
- blocks: _blockContentIntermediateSection2,
910
- imageOptions: { w: 320, h: 240, fit: 'max' }
911
- }, client.config()))
760
+ React__default.createElement(AdSlot, _extends._extends({}, payload.contextualVideoAD, { refreshFlag: false, checkIsAdFound: _checkIsAdFound2 }))
912
761
  ),
913
- React__default.createElement(RelatedContent, null),
914
- React__default.createElement(
915
- 'div',
916
- { 'class': 'clearfix' },
917
- React__default.createElement(BlockContent.BlockContent, _extends$1._extends({
918
- serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
919
- blocks: _blockContentSection4,
920
- imageOptions: { w: 320, h: 240, fit: 'max' }
921
- }, client.config()))
922
- )
923
- );
924
- } else if (indexes.length >= 2 && body.length > 3 && showRelatedArticles) {
925
- var _selectedIndex6 = indexes[1] + 1;
926
-
927
- //Start: Rearranging sections
928
- var _blockContentSection5 = articleBody.slice(0, _selectedIndex6);
929
- var _blockContentSection6 = articleBody.slice(_selectedIndex6);
930
- var _rearrangeSections3 = function _rearrangeSections3(arr, index) {
931
- var item = arr[index];
932
- if (item && item._type) {
933
- if (item._type === 'block' && blocksToText([item]) === '') {
934
- _rearrangeSections3(arr, index + 1);
935
- }
936
- if (item._type !== 'block') {
937
- var _selectedIndex7 = arr.findIndex(function (item1) {
938
- return item1._key === item._key;
939
- });
940
- _blockContentSection5 = [].concat(toConsumableArray._toConsumableArray(_blockContentSection5), toConsumableArray._toConsumableArray(arr.slice(0, _selectedIndex7 + 1)));
941
- _blockContentSection6 = _blockContentSection6.slice(_selectedIndex7 + 1);
942
- _rearrangeSections3(_blockContentSection6, 0);
943
- }
944
- }
945
- };
946
- _rearrangeSections3(_blockContentSection6, 0);
947
- //End: Rearranging sections
948
-
949
- return React__default.createElement(
950
- React__default.Fragment,
951
- null,
952
- React__default.createElement(
953
- 'div',
954
- { 'class': 'clearfix' },
955
- React__default.createElement(BlockContent.BlockContent, _extends$1._extends({
956
- serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, contextualADFlag, null, null, targeting),
957
- blocks: _blockContentSection5,
958
- imageOptions: { w: 320, h: 240, fit: 'max' }
959
- }, client.config()))
960
- ),
961
- React__default.createElement(RelatedContent, null),
962
- React__default.createElement(
963
- 'div',
964
- { 'class': 'clearfix' },
965
- React__default.createElement(BlockContent.BlockContent, _extends$1._extends({
966
- serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
967
- blocks: _blockContentSection6,
968
- imageOptions: { w: 320, h: 240, fit: 'max' }
969
- }, client.config()))
970
- )
762
+ React__default.createElement(BlockContent.BlockContent, _extends._extends({
763
+ serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
764
+ blocks: [].concat(toConsumableArray._toConsumableArray(articleBody.slice(_selectedIndex2))),
765
+ imageOptions: { w: 320, h: 240, fit: 'max' }
766
+ }, client.config()))
971
767
  );
972
768
  } else {
973
- return React__default.createElement(BlockContent.BlockContent, _extends$1._extends({
769
+ return React__default.createElement(BlockContent.BlockContent, _extends._extends({
974
770
  serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, false, null, props.article.Ads, targeting),
975
771
  blocks: articleBody,
976
772
  imageOptions: { w: 320, h: 240, fit: 'max' }
@@ -1156,7 +952,7 @@ var Article = function Article(props) {
1156
952
  React__default.createElement(
1157
953
  'div',
1158
954
  { className: 'ad-box', style: { textAlign: 'center' } },
1159
- main.main_36 && !sponsoredFlag && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
955
+ main.main_39 && !sponsoredFlag && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
1160
956
  if (index === 0) {
1161
957
  return React__default.createElement(
1162
958
  'div',
@@ -1208,7 +1004,21 @@ var Article = function Article(props) {
1208
1004
  issue.name
1209
1005
  )
1210
1006
  ),
1211
- React__default.createElement('div', { className: 'clearfix', style: { minHeight: '1px' } })
1007
+ React__default.createElement('div', { className: 'clearfix', style: { minHeight: '1px' } }),
1008
+ showRelatedArticles && !showIsi && React__default.createElement(
1009
+ React__default.Fragment,
1010
+ null,
1011
+ React__default.createElement(
1012
+ 'div',
1013
+ null,
1014
+ React__default.createElement(RelevantTopics, null)
1015
+ ),
1016
+ React__default.createElement(
1017
+ 'div',
1018
+ { className: 'pt-2' },
1019
+ React__default.createElement(RelatedArticle, { articles: article.relatedArticle, client: client })
1020
+ )
1021
+ )
1212
1022
  ),
1213
1023
  renderIsiContent(props.article)
1214
1024
  ),
@@ -1221,7 +1031,7 @@ var Article = function Article(props) {
1221
1031
  })
1222
1032
  )
1223
1033
  ),
1224
- main.main_36 && !sponsoredFlag && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
1034
+ main.main_39 && !sponsoredFlag && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
1225
1035
  if (index > 0) {
1226
1036
  return React__default.createElement(
1227
1037
  'div',
@@ -1261,201 +1071,6 @@ var Article = function Article(props) {
1261
1071
 
1262
1072
  var _this = undefined;
1263
1073
 
1264
- var getRelatedContentArticles = function () {
1265
- var _ref = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee() {
1266
- var client = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
1267
- var article = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
1268
- var prevUrl = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '/';
1269
- var articleCount = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
1270
-
1271
- var _article$url, url, content_placement, documentGroupMapping, issueGroup, references, params, articles, relatedContentQuery;
1272
-
1273
- return asyncToGenerator.regenerator.wrap(function _callee$(_context) {
1274
- while (1) {
1275
- switch (_context.prev = _context.next) {
1276
- case 0:
1277
- _article$url = article.url;
1278
- _article$url = _article$url === undefined ? {
1279
- current: null
1280
- } : _article$url;
1281
- url = _article$url.current, content_placement = article.content_placement, documentGroupMapping = article.documentGroupMapping, issueGroup = article.issueGroup;
1282
- references = [];
1283
-
1284
- if (content_placement && content_placement.length > 0) {
1285
- content_placement.forEach(function (_ref2) {
1286
- var path = _ref2.path,
1287
- _id = _ref2._id;
1288
-
1289
- if (!_id || typeof _id == 'undefined') {
1290
- return null;
1291
- }
1292
- var prev_url_to_check = prevUrl;
1293
- if (prev_url_to_check.includes('?')) {
1294
- prev_url_to_check = prev_url_to_check.split('?')[0];
1295
- }
1296
- if (prev_url_to_check.endsWith(path) && _id) references.push(_id);
1297
- });
1298
- if (references.length === 0) {
1299
- content_placement.filter(function (_ref3) {
1300
- var identifier = _ref3.identifier;
1301
- return identifier !== 'news';
1302
- }).forEach(function (_ref4) {
1303
- var _id = _ref4._id;
1304
-
1305
- if (_id) references.push(_id);
1306
- });
1307
- }
1308
- }
1309
-
1310
- if (documentGroupMapping && documentGroupMapping.length > 0) {
1311
- documentGroupMapping.forEach(function (_ref5) {
1312
- var _id = _ref5._id;
1313
-
1314
- if (_id) references.push(_id);
1315
- });
1316
- }
1317
-
1318
- if (issueGroup && issueGroup._ref) {
1319
- references.push(issueGroup._ref);
1320
- }
1321
-
1322
- params = { url: url, references: references };
1323
- articles = [];
1324
-
1325
- if (!(params.references && params.references.length > 0)) {
1326
- _context.next = 20;
1327
- break;
1328
- }
1329
-
1330
- relatedContentQuery = '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && is_visible == true\n && passwordLock != true\n && taxonomyMapping[].disableAds != \'true\'\n && contentCategory.name != \'Poll\'\n && contentCategory.name != \'Slideshows\'\n \t&& contentCategory.disableAds != \'true\'\n && ExcludeFromInfiniteScroll != true\n && url.current != $url\n && !defined(body[].videos)\n && dateTime(published) <= dateTime(now())\n && references($references)\n ]| order(published desc)[' + articleCount + ']\n {\n title,\n url,\n thumbnail\n }';
1331
- _context.prev = 11;
1332
- _context.next = 14;
1333
- return client.fetch(relatedContentQuery, params);
1334
-
1335
- case 14:
1336
- articles = _context.sent;
1337
- _context.next = 20;
1338
- break;
1339
-
1340
- case 17:
1341
- _context.prev = 17;
1342
- _context.t0 = _context['catch'](11);
1343
-
1344
- console.error(_context.t0);
1345
-
1346
- case 20:
1347
- return _context.abrupt('return', articles);
1348
-
1349
- case 21:
1350
- case 'end':
1351
- return _context.stop();
1352
- }
1353
- }
1354
- }, _callee, _this, [[11, 17]]);
1355
- }));
1356
-
1357
- return function getRelatedContentArticles() {
1358
- return _ref.apply(this, arguments);
1359
- };
1360
- }();
1361
-
1362
- // const getRelatedContents = async (ctx = null, client = null, article = {}, prevUrl = '/', articleCount = 0) => {
1363
- // const {
1364
- // url: { current: url } = {
1365
- // current: null
1366
- // },
1367
- // content_placement,
1368
- // documentGroupMapping,
1369
- // issueGroup
1370
- // } = article
1371
- // let params = { url }
1372
- // let conditions = ''
1373
-
1374
- // if (content_placement && content_placement.length > 0) {
1375
- // let taxonomy = []
1376
- // content_placement.forEach(({ path, _id }) => {
1377
- // if (!_id || typeof _id == 'undefined') {
1378
- // return null
1379
- // }
1380
- // let prev_url_to_check = prevUrl
1381
- // if (prev_url_to_check.includes('?')) {
1382
- // prev_url_to_check = prev_url_to_check.split('?')[0]
1383
- // }
1384
- // if (prev_url_to_check.endsWith(path) && _id) taxonomy.push(_id)
1385
- // })
1386
- // if (taxonomy.length === 0) {
1387
- // content_placement
1388
- // .filter(({ identifier }) => identifier !== 'news')
1389
- // .forEach(({ _id }) => {
1390
- // if (_id) taxonomy.push(_id)
1391
- // })
1392
- // }
1393
- // if (taxonomy.length > 0) {
1394
- // params = { ...params, taxonomy }
1395
- // conditions = `&& taxonomyMapping[]._ref in $taxonomy`
1396
- // }
1397
- // }
1398
-
1399
- // if (documentGroupMapping && documentGroupMapping.length > 0) {
1400
- // let documentGroup = []
1401
- // documentGroupMapping.forEach(({ _id }) => {
1402
- // if (_id) documentGroup.push(_id)
1403
- // })
1404
- // if (params.taxonomy && documentGroup.length > 0) {
1405
- // params = { ...params, documentGroup }
1406
- // conditions = `&& (taxonomyMapping[]._ref in $taxonomy || documentGroupMapping[]._ref in $documentGroup)`
1407
- // }
1408
- // }
1409
-
1410
- // if (issueGroup && issueGroup._ref) {
1411
- // if (params.taxonomy && params.documentGroup) {
1412
- // params = { ...params, issueAssociation: issueGroup._ref }
1413
- // conditions = `&& (taxonomyMapping[]._ref in $taxonomy || documentGroupMapping[]._ref in $documentGroup || issueGroup._ref == $issueAssociation )`
1414
- // } else if (params.taxonomy) {
1415
- // params = { ...params, issueAssociation: issueGroup._ref }
1416
- // conditions = `&& (taxonomyMapping[]._ref in $taxonomy || issueGroup._ref == $issueAssociation )`
1417
- // }
1418
- // }
1419
-
1420
- // let articles = []
1421
- // if (params.taxonomy && params.taxonomy.length > 0) {
1422
- // const relatedContentQuery = `*[
1423
- // _type == "article"
1424
- // && defined(title)
1425
- // && defined(url)
1426
- // && !(_id in path("drafts.**"))
1427
- // && is_visible == true
1428
- // && passwordLock != true
1429
- // && taxonomyMapping[].disableAds != 'true'
1430
- // && contentCategory.name != 'Poll'
1431
- // && contentCategory.name != 'Slideshows'
1432
- // && contentCategory.disableAds != 'true'
1433
- // && ExcludeFromInfiniteScroll != true
1434
- // && url.current != $url
1435
- // && !defined(body[].videos)
1436
- // && published <= '${new Date().toISOString()}'
1437
- // ${conditions}
1438
- // ]| order(published desc)[${articleCount}]
1439
- // {
1440
- // title,
1441
- // url,
1442
- // thumbnail
1443
- // }`
1444
-
1445
- // try {
1446
- // articles = await client.fetch(relatedContentQuery, params)
1447
- // } catch (error) {
1448
- // console.error(error)
1449
- // }
1450
- // }
1451
-
1452
- // return articles
1453
- // }
1454
-
1455
- // export default getRelatedContents
1456
-
1457
- var _this$1 = undefined;
1458
-
1459
1074
  var ArticleQueue = function ArticleQueue(props) {
1460
1075
  var _props$prevUrl = props.prevUrl,
1461
1076
  prevUrl = _props$prevUrl === undefined ? '/' : _props$prevUrl,
@@ -1472,7 +1087,7 @@ var ArticleQueue = function ArticleQueue(props) {
1472
1087
 
1473
1088
 
1474
1089
  var firstArticle = function firstArticle() {
1475
- var article = _extends$1._Object$assign({}, props.article);
1090
+ var article = _extends._Object$assign({}, props.article);
1476
1091
  var targeting = getTargeting.getTargeting(props);
1477
1092
  article.Ads = Ads.getRightItems(targeting);
1478
1093
  return article;
@@ -1489,7 +1104,7 @@ var ArticleQueue = function ArticleQueue(props) {
1489
1104
  });
1490
1105
  var targeting = getTargeting.getTargeting({ article: activeArticle, cpModificationRequired: cpModificationRequired, position: props.position, prevUrl: prevUrl });
1491
1106
 
1492
- if (!main.main_36) {
1107
+ if (!main.main_39) {
1493
1108
  index.lib_3.getGoogletag().then(function (googletag) {
1494
1109
  if (window.googletag && googletag.pubadsReady) {
1495
1110
  var slots = googletag.pubads().getSlots();
@@ -1507,7 +1122,7 @@ var ArticleQueue = function ArticleQueue(props) {
1507
1122
  });
1508
1123
  }
1509
1124
  //Refresh leaderboard ad on mobile
1510
- if (main.main_36) {
1125
+ if (main.main_39) {
1511
1126
  var leaderboardSlotId = '';
1512
1127
  index.lib_3.getGoogletag().then(function (googletag) {
1513
1128
  if (window.googletag && googletag.pubadsReady) {
@@ -1581,7 +1196,7 @@ var ArticleQueue = function ArticleQueue(props) {
1581
1196
  switch (_context.prev = _context.next) {
1582
1197
  case 0:
1583
1198
  if (!(article && article._id)) {
1584
- _context.next = 12;
1199
+ _context.next = 9;
1585
1200
  break;
1586
1201
  }
1587
1202
 
@@ -1593,22 +1208,17 @@ var ArticleQueue = function ArticleQueue(props) {
1593
1208
 
1594
1209
  case 5:
1595
1210
  article.relatedArticle = _context.sent;
1596
- _context.next = 8;
1597
- return getRelatedContentArticles(null, props.client, article, prevUrl, startingIndex + '..' + endingIndex);
1598
-
1599
- case 8:
1600
- article.relatedContentArticles = _context.sent;
1601
1211
  targeting = getTargeting.getTargeting({ article: article, cpModificationRequired: cpModificationRequired, prevUrl: prevUrl });
1602
1212
 
1603
1213
  article.Ads = Ads.getRightItems(targeting);
1604
1214
  setQueueData([].concat(toConsumableArray._toConsumableArray(queueData), [article]));
1605
1215
 
1606
- case 12:
1216
+ case 9:
1607
1217
  case 'end':
1608
1218
  return _context.stop();
1609
1219
  }
1610
1220
  }
1611
- }, _callee, _this$1);
1221
+ }, _callee, _this);
1612
1222
  }));
1613
1223
 
1614
1224
  return function (_x) {
@@ -1673,7 +1283,7 @@ var ArticleQueue = function ArticleQueue(props) {
1673
1283
  index_es.InfiniteScroll,
1674
1284
  { dataLength: queueData.length, next: loadmore, scrollThreshold: '60%', hasMore: true, style: { overflow: 'hidden' } },
1675
1285
  queueData.map(function (article, index) {
1676
- return React__default.createElement(Article, _extends$1._extends({
1286
+ return React__default.createElement(Article, _extends._extends({
1677
1287
  key: index
1678
1288
  }, props, {
1679
1289
  onChangeArticle: onChangeArticle,
@@ -1742,7 +1352,7 @@ var Articles = function Articles(props) {
1742
1352
  index: 0
1743
1353
  };
1744
1354
 
1745
- return React__default.createElement(ArticleQueue, _extends$1._extends((_extends2 = {
1355
+ return React__default.createElement(ArticleQueue, _extends._extends((_extends2 = {
1746
1356
  client: client,
1747
1357
  params: params,
1748
1358
  relatedArticleQuery: relatedArticleQuery,
@@ -1756,7 +1366,7 @@ var Articles = function Articles(props) {
1756
1366
  }, defineProperty$1._defineProperty(_extends2, 'pageview', pageview), defineProperty$1._defineProperty(_extends2, 'onVote', function onVote() {}), defineProperty$1._defineProperty(_extends2, 'ISIContent', ISIContent), defineProperty$1._defineProperty(_extends2, 'videoAccountIDs', videoAccountIDs), defineProperty$1._defineProperty(_extends2, 'sponsoredTaxonomies', []), defineProperty$1._defineProperty(_extends2, 'cpModificationRequired', cpModificationRequired), defineProperty$1._defineProperty(_extends2, 'Settings', Settings), defineProperty$1._defineProperty(_extends2, 'canonicalTag', canonicalTag), _extends2), props));
1757
1367
  };
1758
1368
 
1759
- var _this$2 = undefined;
1369
+ var _this$1 = undefined;
1760
1370
 
1761
1371
  var View = function View(props) {
1762
1372
  var router = Router.useRouter();
@@ -1934,7 +1544,7 @@ var View = function View(props) {
1934
1544
  props.article.seriesDetail && props.article.seriesDetail.nextUrl && React__default.createElement('link', { rel: 'next', href: props.article.seriesDetail.nextUrl })
1935
1545
  )
1936
1546
  ),
1937
- !needInfiniteScroll ? React__default.createElement(Article, _extends$1._extends({ infiniteScroll: false, showRelatedArticles: showRelatedArticles }, props)) : React__default.createElement(Articles, _extends$1._extends({ infiniteScroll: true, showRelatedArticles: showRelatedArticles, canonicalTag: canonicalTag }, props))
1547
+ !needInfiniteScroll ? React__default.createElement(Article, _extends._extends({ infiniteScroll: false, showRelatedArticles: showRelatedArticles }, props)) : React__default.createElement(Articles, _extends._extends({ infiniteScroll: true, showRelatedArticles: showRelatedArticles, canonicalTag: canonicalTag }, props))
1938
1548
  );
1939
1549
  };
1940
1550
 
@@ -2015,12 +1625,12 @@ View.returnGetInitialProps = function () {
2015
1625
  }
2016
1626
 
2017
1627
  article.relatedArticle = null;
2018
- _context.next = 23;
1628
+ _context.next = 20;
2019
1629
  break;
2020
1630
 
2021
1631
  case 16:
2022
1632
  if (!article) {
2023
- _context.next = 23;
1633
+ _context.next = 20;
2024
1634
  break;
2025
1635
  }
2026
1636
 
@@ -2029,13 +1639,8 @@ View.returnGetInitialProps = function () {
2029
1639
 
2030
1640
  case 19:
2031
1641
  article.relatedArticle = _context.sent;
2032
- _context.next = 22;
2033
- return getRelatedContentArticles(context, client, article, prevUrl, '0..2');
2034
-
2035
- case 22:
2036
- article.relatedContentArticles = _context.sent;
2037
1642
 
2038
- case 23:
1643
+ case 20:
2039
1644
  return _context.abrupt('return', {
2040
1645
  url: url,
2041
1646
  sao: sao,
@@ -2046,12 +1651,12 @@ View.returnGetInitialProps = function () {
2046
1651
  sponsoredFlag: sponsoredFlag
2047
1652
  });
2048
1653
 
2049
- case 24:
1654
+ case 21:
2050
1655
  case 'end':
2051
1656
  return _context.stop();
2052
1657
  }
2053
1658
  }
2054
- }, _callee, _this$2);
1659
+ }, _callee, _this$1);
2055
1660
  }));
2056
1661
 
2057
1662
  return function (_x, _x2, _x3, _x4, _x5) {