@mjhls/mjh-framework 1.0.98 → 1.0.99-0.next12

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 (356) hide show
  1. package/README.md +168 -172
  2. package/dist/cjs/AD.js +32 -0
  3. package/dist/cjs/AD300x250.js +95 -0
  4. package/dist/cjs/AD300x250x600.js +112 -0
  5. package/dist/cjs/AD728x90.js +109 -0
  6. package/dist/cjs/ADFloatingFooter.js +143 -0
  7. package/dist/cjs/ADFooter.js +53 -0
  8. package/dist/cjs/ADGutter.js +115 -0
  9. package/dist/cjs/ADInfeed-cf54cb8a.js +66 -0
  10. package/dist/cjs/ADSkyscraper.js +117 -0
  11. package/dist/cjs/ADSponsoredResources.js +114 -0
  12. package/dist/cjs/ADWebcast.js +119 -0
  13. package/dist/cjs/ADWelcome.js +166 -0
  14. package/dist/cjs/ADlgInfeed-d06624d8.js +60 -0
  15. package/dist/cjs/AccordionPanel.js +94 -0
  16. package/dist/cjs/AdSlot.js +251 -0
  17. package/dist/cjs/AdSlotsProvider.js +183 -0
  18. package/dist/cjs/AlgoliaSearch.js +195 -0
  19. package/dist/cjs/AlphabeticList.js +135 -0
  20. package/dist/cjs/ArticleCarousel.js +46 -0
  21. package/dist/cjs/ArticleProgramLandingPage.js +184 -0
  22. package/dist/cjs/ArticleSeriesLandingPage.js +162 -0
  23. package/dist/cjs/ArticleSeriesListing.js +315 -0
  24. package/dist/cjs/AuthWrapper.js +720 -0
  25. package/dist/cjs/AuthorComponent-39b37d84.js +96 -0
  26. package/dist/cjs/Beam.js +350 -0
  27. package/dist/cjs/BlockContent-36e54d77.js +916 -0
  28. package/dist/cjs/Breadcrumbs.js +107 -0
  29. package/dist/cjs/CMEDeck.js +443 -0
  30. package/dist/cjs/Column1.js +39 -0
  31. package/dist/cjs/Column2.js +75 -0
  32. package/dist/cjs/Column3.js +144 -0
  33. package/dist/cjs/ConferenceArticleCard.js +93 -0
  34. package/dist/cjs/ConferenceBanner-6c9e718a.js +24 -0
  35. package/dist/cjs/ContentCardPaginated.js +417 -0
  36. package/dist/cjs/DeckContent.js +507 -0
  37. package/dist/cjs/DeckQueue.js +403 -0
  38. package/dist/cjs/DeckQueuePaginated.js +348 -0
  39. package/dist/cjs/Dfp-94f8ccdf.js +103 -0
  40. package/dist/cjs/EventsDeck.js +857 -0
  41. package/dist/cjs/ExternalResources.js +217 -0
  42. package/dist/cjs/Feature.js +129 -0
  43. package/dist/cjs/ForbesHero.js +137 -0
  44. package/dist/cjs/GridContent.js +828 -0
  45. package/dist/cjs/GridContentPaginated.js +704 -0
  46. package/dist/cjs/GridHero.js +147 -0
  47. package/dist/cjs/GroupDeck.js +314 -0
  48. package/dist/cjs/HamMagazine.js +602 -0
  49. package/dist/cjs/Header.js +39 -0
  50. package/dist/cjs/HealthCareProfessionalModal.js +78 -0
  51. package/dist/cjs/Hero.js +48 -0
  52. package/dist/cjs/HighlightenVideo.js +69 -0
  53. package/dist/cjs/HorizontalArticleListing.js +165 -0
  54. package/dist/cjs/HorizontalHero.js +111 -0
  55. package/dist/cjs/ImageSlider-a7fb6218.js +182 -0
  56. package/dist/cjs/IssueContentDeck.js +241 -0
  57. package/dist/cjs/IssueDeck.js +268 -0
  58. package/dist/cjs/IssueLanding.js +172 -0
  59. package/dist/cjs/KMTracker.js +27 -0
  60. package/dist/cjs/LeftNav.js +145 -0
  61. package/dist/cjs/MasterDeck.js +555 -0
  62. package/dist/cjs/MasterDeckPaginated.js +469 -0
  63. package/dist/cjs/MediaSeriesCard-36eab8b7.js +9502 -0
  64. package/dist/cjs/MediaSeriesLanding.js +503 -0
  65. package/dist/cjs/MediaSeriesLandingPaginated.js +529 -0
  66. package/dist/cjs/NavDvm.js +245 -0
  67. package/dist/cjs/NavFooter-3dcd99a8.js +66 -0
  68. package/dist/cjs/NavMagazine.js +595 -0
  69. package/dist/cjs/NavNative.js +861 -0
  70. package/dist/cjs/OncliveHero.js +79 -0
  71. package/dist/cjs/OncliveLargeHero.js +241 -0
  72. package/dist/cjs/PageFilter.js +72 -0
  73. package/dist/cjs/Pagination-1e0d5f1d.js +90 -0
  74. package/dist/cjs/PartnerDetailListing.js +326 -0
  75. package/dist/cjs/PartnerDetailListingPaginated.js +318 -0
  76. package/dist/cjs/PdfDownload.js +28 -0
  77. package/dist/cjs/PixelTracking.js +165 -0
  78. package/dist/cjs/PopUpModal.js +58 -0
  79. package/dist/cjs/PtceDeck.js +149 -0
  80. package/dist/cjs/PubSection.js +120 -0
  81. package/dist/cjs/PubToc.js +87 -0
  82. package/dist/cjs/PublicationDeck.js +183 -0
  83. package/dist/cjs/PublicationFeature-be5f3503.js +130 -0
  84. package/dist/cjs/PublicationLanding.js +853 -0
  85. package/dist/cjs/QueueDeckExpanded.js +1540 -0
  86. package/dist/cjs/QueueDeckExpandedPaginated.js +1388 -0
  87. package/dist/cjs/RecentNews.js +91 -0
  88. package/dist/cjs/RelatedContent.js +114 -0
  89. package/dist/cjs/RelatedTopicsDropdown.js +90 -0
  90. package/dist/cjs/RolesDeck.js +94 -0
  91. package/dist/cjs/Schema.js +101 -0
  92. package/dist/cjs/Search.js +66 -0
  93. package/dist/cjs/Segment.js +403 -0
  94. package/dist/cjs/SeriesListingDeck.js +248 -0
  95. package/dist/cjs/SeriesSlider-b94f1dd5.js +332 -0
  96. package/dist/cjs/SetCookie.js +10 -0
  97. package/dist/cjs/SideFooter.js +151 -0
  98. package/dist/cjs/SocialIcons.js +103 -0
  99. package/dist/cjs/SocialSearchComponent-b7faaedc.js +213 -0
  100. package/dist/cjs/SocialShare.js +74 -0
  101. package/dist/cjs/TaxonomyCard.js +253 -0
  102. package/dist/cjs/TaxonomyDescription.js +205 -0
  103. package/dist/cjs/TemplateNormal.js +204 -0
  104. package/dist/cjs/ThumbnailCard.js +59 -0
  105. package/dist/cjs/Ustream.js +156 -0
  106. package/dist/cjs/VerticalHero.js +74 -0
  107. package/dist/cjs/VideoProgramLandingPage.js +260 -0
  108. package/dist/cjs/VideoSeriesCard.js +88 -0
  109. package/dist/cjs/VideoSeriesFilter.js +128 -0
  110. package/dist/cjs/VideoSeriesLandingPage.js +178 -0
  111. package/dist/cjs/VideoSeriesListing.js +422 -0
  112. package/dist/cjs/View.js +2601 -0
  113. package/dist/cjs/YahooHero.js +126 -0
  114. package/dist/cjs/YoutubeGroup.js +371 -0
  115. package/dist/cjs/_commonjsHelpers-06173234.js +25 -0
  116. package/dist/cjs/_is-array-54228b29.js +74 -0
  117. package/dist/cjs/_iter-detect-b1df62f0.js +52 -0
  118. package/dist/cjs/_library-dd23b178.js +5 -0
  119. package/dist/cjs/_object-pie-083f2dd6.js +16 -0
  120. package/dist/cjs/_object-sap-d1978572.js +16 -0
  121. package/dist/cjs/_object-to-array-ce86cae7.js +25 -0
  122. package/dist/cjs/asyncToGenerator-77821af0.js +1395 -0
  123. package/dist/cjs/brightcove-react-player-loader.es-a195642e.js +2232 -0
  124. package/dist/cjs/core.get-iterator-method-5643aa10.js +584 -0
  125. package/dist/cjs/debounce-d4a2369b.js +216 -0
  126. package/dist/cjs/define-property-e8404b64.js +20 -0
  127. package/dist/cjs/defineProperty-9673846a.js +34 -0
  128. package/dist/cjs/entities-3f9d0f2f.js +506 -0
  129. package/dist/cjs/eq-5fc26c07.js +79 -0
  130. package/dist/cjs/extends-7c86182f.js +87 -0
  131. package/dist/cjs/faundadb.js +644 -0
  132. package/dist/cjs/get-5839e5b5.js +920 -0
  133. package/dist/cjs/getContentCategory-f38a4c00.js +11 -0
  134. package/dist/cjs/getKeywords.js +46 -0
  135. package/dist/cjs/getPtceActivities.js +89 -0
  136. package/dist/cjs/getQuery.js +28 -0
  137. package/dist/cjs/getRelatedArticle.js +747 -0
  138. package/dist/cjs/getRootDocGroup.js +62 -0
  139. package/dist/cjs/getSerializers.js +64 -0
  140. package/dist/cjs/getSeriesDetail.js +40 -0
  141. package/dist/cjs/getTargeting-4439c99d.js +164 -0
  142. package/dist/cjs/getTargeting.js +13 -0
  143. package/dist/cjs/iconBase-be4097c0.js +106 -0
  144. package/dist/cjs/index-0e4427c8.js +1683 -0
  145. package/dist/cjs/index-187c967e.js +54 -0
  146. package/dist/cjs/index-7361fa72.js +11305 -0
  147. package/dist/cjs/index-eadd5035.js +613 -0
  148. package/dist/cjs/index-efca863c.js +556 -0
  149. package/dist/cjs/index-f86bb269.js +1571 -0
  150. package/dist/cjs/index.es-f3e47207.js +445 -0
  151. package/dist/cjs/index.esm-2bb721c8.js +96 -0
  152. package/dist/cjs/index.esm-c1e16606.js +13 -0
  153. package/dist/cjs/index.esm-d51c9ac6.js +25 -0
  154. package/dist/cjs/index.esm-d81454e7.js +19 -0
  155. package/dist/cjs/index.js +635 -0
  156. package/dist/cjs/inherits-de66ea16.js +188 -0
  157. package/dist/cjs/isSymbol-03abbdf0.js +209 -0
  158. package/dist/cjs/js.cookie-a511c430.js +160 -0
  159. package/dist/cjs/keys-e982b3fa.js +25 -0
  160. package/dist/cjs/lodash-f0783643.js +17195 -0
  161. package/dist/cjs/main-f1c77adb.js +973 -0
  162. package/dist/cjs/moment-aca40de1.js +5669 -0
  163. package/dist/cjs/react-social-icons-af932527.js +616 -0
  164. package/dist/cjs/slicedToArray-067dd3bc.js +95 -0
  165. package/dist/cjs/smoothscroll-99df7f93.js +438 -0
  166. package/dist/cjs/stringify-f7a37a8d.js +17 -0
  167. package/dist/cjs/style-inject.es-dcee06b6.js +30 -0
  168. package/dist/cjs/timeDifferenceCalc.js +39 -0
  169. package/dist/cjs/toConsumableArray-d7797c2b.js +74 -0
  170. package/dist/cjs/toNumber-5e1fac58.js +104 -0
  171. package/dist/cjs/typeof-567e31ff.js +382 -0
  172. package/dist/cjs/urlFor.js +65 -0
  173. package/dist/cjs/urlForFile-29d3815a.js +24 -0
  174. package/dist/cjs/ustream-api-3819e4aa.js +106 -0
  175. package/dist/cjs/visibility-sensor-eb2c5b69.js +597 -0
  176. package/dist/cjs/web.dom.iterable-d98303e0.js +50 -0
  177. package/dist/esm/AD.js +26 -0
  178. package/dist/esm/AD300x250.js +89 -0
  179. package/dist/esm/AD300x250x600.js +106 -0
  180. package/dist/esm/AD728x90.js +103 -0
  181. package/dist/esm/ADFloatingFooter.js +137 -0
  182. package/dist/esm/ADFooter.js +47 -0
  183. package/dist/esm/ADGutter.js +109 -0
  184. package/dist/esm/ADInfeed-f684cac9.js +59 -0
  185. package/dist/esm/ADSkyscraper.js +111 -0
  186. package/dist/esm/ADSponsoredResources.js +108 -0
  187. package/dist/esm/ADWebcast.js +113 -0
  188. package/dist/esm/ADWelcome.js +160 -0
  189. package/dist/esm/ADlgInfeed-8c438cee.js +54 -0
  190. package/dist/esm/AccordionPanel.js +87 -0
  191. package/dist/esm/AdSlot.js +244 -0
  192. package/dist/esm/AdSlotsProvider.js +176 -0
  193. package/dist/esm/AlgoliaSearch.js +188 -0
  194. package/dist/esm/AlphabeticList.js +129 -0
  195. package/dist/esm/ArticleCarousel.js +40 -0
  196. package/dist/esm/ArticleProgramLandingPage.js +178 -0
  197. package/dist/esm/ArticleSeriesLandingPage.js +156 -0
  198. package/dist/esm/ArticleSeriesListing.js +308 -0
  199. package/dist/esm/AuthWrapper.js +714 -0
  200. package/dist/esm/AuthorComponent-defe68b6.js +90 -0
  201. package/dist/esm/Beam.js +348 -0
  202. package/dist/esm/BlockContent-c99c9a8d.js +909 -0
  203. package/dist/esm/Breadcrumbs.js +100 -0
  204. package/dist/esm/CMEDeck.js +437 -0
  205. package/dist/esm/Column1.js +29 -0
  206. package/dist/esm/Column2.js +65 -0
  207. package/dist/esm/Column3.js +134 -0
  208. package/dist/esm/ConferenceArticleCard.js +87 -0
  209. package/dist/esm/ConferenceBanner-8792ebd2.js +18 -0
  210. package/dist/esm/ContentCardPaginated.js +406 -0
  211. package/dist/esm/DeckContent.js +497 -0
  212. package/dist/esm/DeckQueue.js +393 -0
  213. package/dist/esm/DeckQueuePaginated.js +337 -0
  214. package/dist/esm/Dfp-4b99f79d.js +96 -0
  215. package/dist/esm/EventsDeck.js +844 -0
  216. package/dist/esm/ExternalResources.js +210 -0
  217. package/dist/esm/Feature.js +122 -0
  218. package/dist/esm/ForbesHero.js +131 -0
  219. package/dist/esm/GridContent.js +818 -0
  220. package/dist/esm/GridContentPaginated.js +693 -0
  221. package/dist/esm/GridHero.js +141 -0
  222. package/dist/esm/GroupDeck.js +308 -0
  223. package/dist/esm/HamMagazine.js +590 -0
  224. package/dist/esm/Header.js +30 -0
  225. package/dist/esm/HealthCareProfessionalModal.js +70 -0
  226. package/dist/esm/Hero.js +42 -0
  227. package/dist/esm/HighlightenVideo.js +63 -0
  228. package/dist/esm/HorizontalArticleListing.js +159 -0
  229. package/dist/esm/HorizontalHero.js +105 -0
  230. package/dist/esm/ImageSlider-eab2fe41.js +176 -0
  231. package/dist/esm/IssueContentDeck.js +231 -0
  232. package/dist/esm/IssueDeck.js +258 -0
  233. package/dist/esm/IssueLanding.js +166 -0
  234. package/dist/esm/KMTracker.js +25 -0
  235. package/dist/esm/LeftNav.js +136 -0
  236. package/dist/esm/MasterDeck.js +548 -0
  237. package/dist/esm/MasterDeckPaginated.js +461 -0
  238. package/dist/esm/MediaSeriesCard-99048e65.js +9492 -0
  239. package/dist/esm/MediaSeriesLanding.js +496 -0
  240. package/dist/esm/MediaSeriesLandingPaginated.js +522 -0
  241. package/dist/esm/NavDvm.js +233 -0
  242. package/dist/esm/NavFooter-e27bd93b.js +60 -0
  243. package/dist/esm/NavMagazine.js +583 -0
  244. package/dist/esm/NavNative.js +846 -0
  245. package/dist/esm/OncliveHero.js +73 -0
  246. package/dist/esm/OncliveLargeHero.js +235 -0
  247. package/dist/esm/PageFilter.js +66 -0
  248. package/dist/esm/Pagination-cd21f8c2.js +82 -0
  249. package/dist/esm/PartnerDetailListing.js +320 -0
  250. package/dist/esm/PartnerDetailListingPaginated.js +312 -0
  251. package/dist/esm/PdfDownload.js +22 -0
  252. package/dist/esm/PixelTracking.js +156 -0
  253. package/dist/esm/PopUpModal.js +51 -0
  254. package/dist/esm/PtceDeck.js +143 -0
  255. package/dist/esm/PubSection.js +114 -0
  256. package/dist/esm/PubToc.js +81 -0
  257. package/dist/esm/PublicationDeck.js +173 -0
  258. package/dist/esm/PublicationFeature-03500094.js +121 -0
  259. package/dist/esm/PublicationLanding.js +843 -0
  260. package/dist/esm/QueueDeckExpanded.js +1534 -0
  261. package/dist/esm/QueueDeckExpandedPaginated.js +1382 -0
  262. package/dist/esm/RecentNews.js +85 -0
  263. package/dist/esm/RelatedContent.js +108 -0
  264. package/dist/esm/RelatedTopicsDropdown.js +82 -0
  265. package/dist/esm/RolesDeck.js +84 -0
  266. package/dist/esm/Schema.js +95 -0
  267. package/dist/esm/Search.js +57 -0
  268. package/dist/esm/Segment.js +401 -0
  269. package/dist/esm/SeriesListingDeck.js +242 -0
  270. package/dist/esm/SeriesSlider-609f9d94.js +326 -0
  271. package/dist/esm/SetCookie.js +8 -0
  272. package/dist/esm/SideFooter.js +145 -0
  273. package/dist/esm/SocialIcons.js +97 -0
  274. package/dist/esm/SocialSearchComponent-1d8a9f59.js +204 -0
  275. package/dist/esm/SocialShare.js +67 -0
  276. package/dist/esm/TaxonomyCard.js +243 -0
  277. package/dist/esm/TaxonomyDescription.js +198 -0
  278. package/dist/esm/TemplateNormal.js +197 -0
  279. package/dist/esm/ThumbnailCard.js +52 -0
  280. package/dist/esm/Ustream.js +150 -0
  281. package/dist/esm/VerticalHero.js +68 -0
  282. package/dist/esm/VideoProgramLandingPage.js +251 -0
  283. package/dist/esm/VideoSeriesCard.js +82 -0
  284. package/dist/esm/VideoSeriesFilter.js +122 -0
  285. package/dist/esm/VideoSeriesLandingPage.js +172 -0
  286. package/dist/esm/VideoSeriesListing.js +415 -0
  287. package/dist/esm/View.js +2590 -0
  288. package/dist/esm/YahooHero.js +120 -0
  289. package/dist/esm/YoutubeGroup.js +365 -0
  290. package/dist/esm/_commonjsHelpers-0c4b6f40.js +19 -0
  291. package/dist/esm/_is-array-893ab020.js +71 -0
  292. package/dist/esm/_iter-detect-f089461c.js +48 -0
  293. package/dist/esm/_library-528f1934.js +3 -0
  294. package/dist/esm/_object-pie-133f504a.js +13 -0
  295. package/dist/esm/_object-sap-169d6272.js +14 -0
  296. package/dist/esm/_object-to-array-50a6b9a3.js +23 -0
  297. package/dist/esm/asyncToGenerator-9716ae8d.js +1387 -0
  298. package/dist/esm/brightcove-react-player-loader.es-57a70a56.js +2226 -0
  299. package/dist/esm/core.get-iterator-method-e903ff31.js +547 -0
  300. package/dist/esm/debounce-533d9748.js +214 -0
  301. package/dist/esm/define-property-99e66838.js +18 -0
  302. package/dist/esm/defineProperty-8fa0bc8d.js +32 -0
  303. package/dist/esm/entities-932b50cf.js +503 -0
  304. package/dist/esm/eq-bdcbf886.js +76 -0
  305. package/dist/esm/extends-dc6a71fd.js +83 -0
  306. package/dist/esm/faundadb.js +636 -0
  307. package/dist/esm/get-3c308da4.js +918 -0
  308. package/dist/esm/getContentCategory-15dcc413.js +9 -0
  309. package/dist/esm/getKeywords.js +44 -0
  310. package/dist/esm/getPtceActivities.js +87 -0
  311. package/dist/esm/getQuery.js +26 -0
  312. package/dist/esm/getRelatedArticle.js +745 -0
  313. package/dist/esm/getRootDocGroup.js +60 -0
  314. package/dist/esm/getSerializers.js +58 -0
  315. package/dist/esm/getSeriesDetail.js +38 -0
  316. package/dist/esm/getTargeting-db566006.js +161 -0
  317. package/dist/esm/getTargeting.js +7 -0
  318. package/dist/esm/iconBase-ccc56b97.js +81 -0
  319. package/dist/esm/index-0dbff1d1.js +553 -0
  320. package/dist/esm/index-5cc7b406.js +1674 -0
  321. package/dist/esm/index-755f2cc2.js +605 -0
  322. package/dist/esm/index-79cfd25c.js +1569 -0
  323. package/dist/esm/index-c60f3bb6.js +11284 -0
  324. package/dist/esm/index-c7e2ac95.js +52 -0
  325. package/dist/esm/index.es-a6137319.js +439 -0
  326. package/dist/esm/index.esm-1bd8a0a8.js +18 -0
  327. package/dist/esm/index.esm-37268dca.js +89 -0
  328. package/dist/esm/index.esm-9b042655.js +10 -0
  329. package/dist/esm/index.esm-eb1e8e80.js +14 -0
  330. package/dist/esm/index.js +529 -0
  331. package/dist/esm/inherits-8a801a18.js +179 -0
  332. package/dist/esm/isSymbol-a7e9aafe.js +203 -0
  333. package/dist/esm/js.cookie-6874175c.js +158 -0
  334. package/dist/esm/keys-425c8ab0.js +23 -0
  335. package/dist/esm/lodash-f97fd99a.js +17193 -0
  336. package/dist/esm/main-1894c974.js +961 -0
  337. package/dist/esm/moment-bc12cb97.js +5667 -0
  338. package/dist/esm/react-social-icons-9be47857.js +609 -0
  339. package/dist/esm/slicedToArray-ca2c8b8d.js +92 -0
  340. package/dist/esm/smoothscroll-fa4e3f8c.js +436 -0
  341. package/dist/esm/stringify-c21932b3.js +15 -0
  342. package/dist/esm/style-inject.es-1f59c1d0.js +28 -0
  343. package/dist/esm/timeDifferenceCalc.js +37 -0
  344. package/dist/esm/toConsumableArray-7b1c0e23.js +71 -0
  345. package/dist/esm/toNumber-5aeba6e7.js +102 -0
  346. package/dist/esm/typeof-83d9eb10.js +378 -0
  347. package/dist/esm/urlFor.js +63 -0
  348. package/dist/esm/urlForFile-413f5ddb.js +22 -0
  349. package/dist/esm/ustream-api-41166338.js +104 -0
  350. package/dist/esm/visibility-sensor-72fd8f8b.js +590 -0
  351. package/dist/esm/web.dom.iterable-fdf034f5.js +48 -0
  352. package/package.json +115 -83
  353. package/dist/index.es.js +0 -12784
  354. package/dist/index.es.js.map +0 -1
  355. package/dist/index.js +0 -12819
  356. package/dist/index.js.map +0 -1
@@ -0,0 +1,747 @@
1
+ 'use strict';
2
+
3
+ var asyncToGenerator = require('./asyncToGenerator-77821af0.js');
4
+ var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
5
+ var getQuery = require('./getQuery.js');
6
+ require('./core.get-iterator-method-5643aa10.js');
7
+ require('./web.dom.iterable-d98303e0.js');
8
+ require('./_library-dd23b178.js');
9
+ require('./_iter-detect-b1df62f0.js');
10
+
11
+ /*!
12
+ * cookie
13
+ * Copyright(c) 2012-2014 Roman Shtylman
14
+ * Copyright(c) 2015 Douglas Christopher Wilson
15
+ * MIT Licensed
16
+ */
17
+
18
+ /**
19
+ * Module exports.
20
+ * @public
21
+ */
22
+
23
+ var parse_1$1 = parse$1;
24
+ var serialize_1 = serialize;
25
+
26
+ /**
27
+ * Module variables.
28
+ * @private
29
+ */
30
+
31
+ var decode = decodeURIComponent;
32
+ var encode = encodeURIComponent;
33
+ var pairSplitRegExp = /; */;
34
+
35
+ /**
36
+ * RegExp to match field-content in RFC 7230 sec 3.2
37
+ *
38
+ * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
39
+ * field-vchar = VCHAR / obs-text
40
+ * obs-text = %x80-FF
41
+ */
42
+
43
+ var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
44
+
45
+ /**
46
+ * Parse a cookie header.
47
+ *
48
+ * Parse the given cookie header string into an object
49
+ * The object has the various cookies as keys(names) => values
50
+ *
51
+ * @param {string} str
52
+ * @param {object} [options]
53
+ * @return {object}
54
+ * @public
55
+ */
56
+
57
+ function parse$1(str, options) {
58
+ if (typeof str !== 'string') {
59
+ throw new TypeError('argument str must be a string');
60
+ }
61
+
62
+ var obj = {};
63
+ var opt = options || {};
64
+ var pairs = str.split(pairSplitRegExp);
65
+ var dec = opt.decode || decode;
66
+
67
+ for (var i = 0; i < pairs.length; i++) {
68
+ var pair = pairs[i];
69
+ var eq_idx = pair.indexOf('=');
70
+
71
+ // skip things that don't look like key=value
72
+ if (eq_idx < 0) {
73
+ continue;
74
+ }
75
+
76
+ var key = pair.substr(0, eq_idx).trim();
77
+ var val = pair.substr(++eq_idx, pair.length).trim();
78
+
79
+ // quoted values
80
+ if ('"' == val[0]) {
81
+ val = val.slice(1, -1);
82
+ }
83
+
84
+ // only assign once
85
+ if (undefined == obj[key]) {
86
+ obj[key] = tryDecode(val, dec);
87
+ }
88
+ }
89
+
90
+ return obj;
91
+ }
92
+
93
+ /**
94
+ * Serialize data into a cookie header.
95
+ *
96
+ * Serialize the a name value pair into a cookie string suitable for
97
+ * http headers. An optional options object specified cookie parameters.
98
+ *
99
+ * serialize('foo', 'bar', { httpOnly: true })
100
+ * => "foo=bar; httpOnly"
101
+ *
102
+ * @param {string} name
103
+ * @param {string} val
104
+ * @param {object} [options]
105
+ * @return {string}
106
+ * @public
107
+ */
108
+
109
+ function serialize(name, val, options) {
110
+ var opt = options || {};
111
+ var enc = opt.encode || encode;
112
+
113
+ if (typeof enc !== 'function') {
114
+ throw new TypeError('option encode is invalid');
115
+ }
116
+
117
+ if (!fieldContentRegExp.test(name)) {
118
+ throw new TypeError('argument name is invalid');
119
+ }
120
+
121
+ var value = enc(val);
122
+
123
+ if (value && !fieldContentRegExp.test(value)) {
124
+ throw new TypeError('argument val is invalid');
125
+ }
126
+
127
+ var str = name + '=' + value;
128
+
129
+ if (null != opt.maxAge) {
130
+ var maxAge = opt.maxAge - 0;
131
+
132
+ if (isNaN(maxAge) || !isFinite(maxAge)) {
133
+ throw new TypeError('option maxAge is invalid')
134
+ }
135
+
136
+ str += '; Max-Age=' + Math.floor(maxAge);
137
+ }
138
+
139
+ if (opt.domain) {
140
+ if (!fieldContentRegExp.test(opt.domain)) {
141
+ throw new TypeError('option domain is invalid');
142
+ }
143
+
144
+ str += '; Domain=' + opt.domain;
145
+ }
146
+
147
+ if (opt.path) {
148
+ if (!fieldContentRegExp.test(opt.path)) {
149
+ throw new TypeError('option path is invalid');
150
+ }
151
+
152
+ str += '; Path=' + opt.path;
153
+ }
154
+
155
+ if (opt.expires) {
156
+ if (typeof opt.expires.toUTCString !== 'function') {
157
+ throw new TypeError('option expires is invalid');
158
+ }
159
+
160
+ str += '; Expires=' + opt.expires.toUTCString();
161
+ }
162
+
163
+ if (opt.httpOnly) {
164
+ str += '; HttpOnly';
165
+ }
166
+
167
+ if (opt.secure) {
168
+ str += '; Secure';
169
+ }
170
+
171
+ if (opt.sameSite) {
172
+ var sameSite = typeof opt.sameSite === 'string'
173
+ ? opt.sameSite.toLowerCase() : opt.sameSite;
174
+
175
+ switch (sameSite) {
176
+ case true:
177
+ str += '; SameSite=Strict';
178
+ break;
179
+ case 'lax':
180
+ str += '; SameSite=Lax';
181
+ break;
182
+ case 'strict':
183
+ str += '; SameSite=Strict';
184
+ break;
185
+ case 'none':
186
+ str += '; SameSite=None';
187
+ break;
188
+ default:
189
+ throw new TypeError('option sameSite is invalid');
190
+ }
191
+ }
192
+
193
+ return str;
194
+ }
195
+
196
+ /**
197
+ * Try decoding a string using a decoding function.
198
+ *
199
+ * @param {string} str
200
+ * @param {function} decode
201
+ * @private
202
+ */
203
+
204
+ function tryDecode(str, decode) {
205
+ try {
206
+ return decode(str);
207
+ } catch (e) {
208
+ return str;
209
+ }
210
+ }
211
+
212
+ var cookie = {
213
+ parse: parse_1$1,
214
+ serialize: serialize_1
215
+ };
216
+
217
+ var defaultParseOptions = {
218
+ decodeValues: true,
219
+ map: false,
220
+ silent: false,
221
+ };
222
+
223
+ function isNonEmptyString(str) {
224
+ return typeof str === "string" && !!str.trim();
225
+ }
226
+
227
+ function parseString(setCookieValue, options) {
228
+ var parts = setCookieValue.split(";").filter(isNonEmptyString);
229
+ var nameValue = parts.shift().split("=");
230
+ var name = nameValue.shift();
231
+ var value = nameValue.join("="); // everything after the first =, joined by a "=" if there was more than one part
232
+
233
+ options = options
234
+ ? Object.assign({}, defaultParseOptions, options)
235
+ : defaultParseOptions;
236
+
237
+ try {
238
+ value = options.decodeValues ? decodeURIComponent(value) : value; // decode cookie value
239
+ } catch (e) {
240
+ console.error(
241
+ "set-cookie-parser encountered an error while decoding a cookie with value '" +
242
+ value +
243
+ "'. Set options.decodeValues to false to disable this feature.",
244
+ e
245
+ );
246
+ }
247
+
248
+ var cookie = {
249
+ name: name, // grab everything before the first =
250
+ value: value,
251
+ };
252
+
253
+ parts.forEach(function (part) {
254
+ var sides = part.split("=");
255
+ var key = sides.shift().trimLeft().toLowerCase();
256
+ var value = sides.join("=");
257
+ if (key === "expires") {
258
+ cookie.expires = new Date(value);
259
+ } else if (key === "max-age") {
260
+ cookie.maxAge = parseInt(value, 10);
261
+ } else if (key === "secure") {
262
+ cookie.secure = true;
263
+ } else if (key === "httponly") {
264
+ cookie.httpOnly = true;
265
+ } else if (key === "samesite") {
266
+ cookie.sameSite = value;
267
+ } else {
268
+ cookie[key] = value;
269
+ }
270
+ });
271
+
272
+ return cookie;
273
+ }
274
+
275
+ function parse(input, options) {
276
+ options = options
277
+ ? Object.assign({}, defaultParseOptions, options)
278
+ : defaultParseOptions;
279
+
280
+ if (!input) {
281
+ if (!options.map) {
282
+ return [];
283
+ } else {
284
+ return {};
285
+ }
286
+ }
287
+
288
+ if (input.headers && input.headers["set-cookie"]) {
289
+ // fast-path for node.js (which automatically normalizes header names to lower-case
290
+ input = input.headers["set-cookie"];
291
+ } else if (input.headers) {
292
+ // slow-path for other environments - see #25
293
+ var sch =
294
+ input.headers[
295
+ Object.keys(input.headers).find(function (key) {
296
+ return key.toLowerCase() === "set-cookie";
297
+ })
298
+ ];
299
+ // warn if called on a request-like object with a cookie header rather than a set-cookie header - see #34, 36
300
+ if (!sch && input.headers.cookie && !options.silent) {
301
+ console.warn(
302
+ "Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."
303
+ );
304
+ }
305
+ input = sch;
306
+ }
307
+ if (!Array.isArray(input)) {
308
+ input = [input];
309
+ }
310
+
311
+ options = options
312
+ ? Object.assign({}, defaultParseOptions, options)
313
+ : defaultParseOptions;
314
+
315
+ if (!options.map) {
316
+ return input.filter(isNonEmptyString).map(function (str) {
317
+ return parseString(str, options);
318
+ });
319
+ } else {
320
+ var cookies = {};
321
+ return input.filter(isNonEmptyString).reduce(function (cookies, str) {
322
+ var cookie = parseString(str, options);
323
+ cookies[cookie.name] = cookie;
324
+ return cookies;
325
+ }, cookies);
326
+ }
327
+ }
328
+
329
+ /*
330
+ Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas
331
+ that are within a single set-cookie field-value, such as in the Expires portion.
332
+
333
+ This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2
334
+ Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128
335
+ React Native's fetch does this for *every* header, including set-cookie.
336
+
337
+ Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25
338
+ Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation
339
+ */
340
+ function splitCookiesString(cookiesString) {
341
+ if (Array.isArray(cookiesString)) {
342
+ return cookiesString;
343
+ }
344
+ if (typeof cookiesString !== "string") {
345
+ return [];
346
+ }
347
+
348
+ var cookiesStrings = [];
349
+ var pos = 0;
350
+ var start;
351
+ var ch;
352
+ var lastComma;
353
+ var nextStart;
354
+ var cookiesSeparatorFound;
355
+
356
+ function skipWhitespace() {
357
+ while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) {
358
+ pos += 1;
359
+ }
360
+ return pos < cookiesString.length;
361
+ }
362
+
363
+ function notSpecialChar() {
364
+ ch = cookiesString.charAt(pos);
365
+
366
+ return ch !== "=" && ch !== ";" && ch !== ",";
367
+ }
368
+
369
+ while (pos < cookiesString.length) {
370
+ start = pos;
371
+ cookiesSeparatorFound = false;
372
+
373
+ while (skipWhitespace()) {
374
+ ch = cookiesString.charAt(pos);
375
+ if (ch === ",") {
376
+ // ',' is a cookie separator if we have later first '=', not ';' or ','
377
+ lastComma = pos;
378
+ pos += 1;
379
+
380
+ skipWhitespace();
381
+ nextStart = pos;
382
+
383
+ while (pos < cookiesString.length && notSpecialChar()) {
384
+ pos += 1;
385
+ }
386
+
387
+ // currently special character
388
+ if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") {
389
+ // we found cookies separator
390
+ cookiesSeparatorFound = true;
391
+ // pos is inside the next cookie, so back up and return it.
392
+ pos = nextStart;
393
+ cookiesStrings.push(cookiesString.substring(start, lastComma));
394
+ start = pos;
395
+ } else {
396
+ // in param ',' or param separator ';',
397
+ // we continue from that comma
398
+ pos = lastComma + 1;
399
+ }
400
+ } else {
401
+ pos += 1;
402
+ }
403
+ }
404
+
405
+ if (!cookiesSeparatorFound || pos >= cookiesString.length) {
406
+ cookiesStrings.push(cookiesString.substring(start, cookiesString.length));
407
+ }
408
+ }
409
+
410
+ return cookiesStrings;
411
+ }
412
+
413
+ var setCookie = parse;
414
+ var parse_1 = parse;
415
+ var parseString_1 = parseString;
416
+ var splitCookiesString_1 = splitCookiesString;
417
+ setCookie.parse = parse_1;
418
+ setCookie.parseString = parseString_1;
419
+ setCookie.splitCookiesString = splitCookiesString_1;
420
+
421
+ var utils = _commonjsHelpers.createCommonjsModule(function (module, exports) {
422
+ var __assign = (_commonjsHelpers.commonjsGlobal && _commonjsHelpers.commonjsGlobal.__assign) || function () {
423
+ __assign = Object.assign || function(t) {
424
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
425
+ s = arguments[i];
426
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
427
+ t[p] = s[p];
428
+ }
429
+ return t;
430
+ };
431
+ return __assign.apply(this, arguments);
432
+ };
433
+ Object.defineProperty(exports, "__esModule", { value: true });
434
+ exports.areCookiesEqual = exports.hasSameProperties = exports.createCookie = exports.isBrowser = void 0;
435
+ /**
436
+ * Tells whether we are in a browser or server.
437
+ */
438
+ function isBrowser() {
439
+ return typeof window !== 'undefined';
440
+ }
441
+ exports.isBrowser = isBrowser;
442
+ /**
443
+ * Create an instance of the Cookie interface
444
+ */
445
+ function createCookie(name, value, options) {
446
+ var sameSite = options.sameSite;
447
+ if (sameSite === true) {
448
+ sameSite = 'strict';
449
+ }
450
+ if (sameSite === undefined || sameSite === false) {
451
+ sameSite = 'lax';
452
+ }
453
+ var cookieToSet = __assign(__assign({}, options), { sameSite: sameSite });
454
+ delete cookieToSet.encode;
455
+ return __assign({ name: name, value: value }, cookieToSet);
456
+ }
457
+ exports.createCookie = createCookie;
458
+ /**
459
+ * Tells whether given objects have the same properties.
460
+ */
461
+ function hasSameProperties(a, b) {
462
+ var aProps = Object.getOwnPropertyNames(a);
463
+ var bProps = Object.getOwnPropertyNames(b);
464
+ if (aProps.length !== bProps.length) {
465
+ return false;
466
+ }
467
+ for (var i = 0; i < aProps.length; i++) {
468
+ var propName = aProps[i];
469
+ if (a[propName] !== b[propName]) {
470
+ return false;
471
+ }
472
+ }
473
+ return true;
474
+ }
475
+ exports.hasSameProperties = hasSameProperties;
476
+ /**
477
+ * Compare the cookie and return true if the cookies have equivalent
478
+ * options and the cookies would be overwritten in the browser storage.
479
+ *
480
+ * @param a first Cookie for comparison
481
+ * @param b second Cookie for comparison
482
+ */
483
+ function areCookiesEqual(a, b) {
484
+ var sameSiteSame = a.sameSite === b.sameSite;
485
+ if (typeof a.sameSite === 'string' && typeof b.sameSite === 'string') {
486
+ sameSiteSame = a.sameSite.toLowerCase() === b.sameSite.toLowerCase();
487
+ }
488
+ return (hasSameProperties(__assign(__assign({}, a), { sameSite: undefined }), __assign(__assign({}, b), { sameSite: undefined })) && sameSiteSame);
489
+ }
490
+ exports.areCookiesEqual = areCookiesEqual;
491
+ /* Functions */
492
+ //# sourceMappingURL=utils.js.map
493
+ });
494
+
495
+ _commonjsHelpers.unwrapExports(utils);
496
+ utils.areCookiesEqual;
497
+ utils.hasSameProperties;
498
+ utils.createCookie;
499
+ utils.isBrowser;
500
+
501
+ var dist = _commonjsHelpers.createCommonjsModule(function (module, exports) {
502
+ var __assign = (_commonjsHelpers.commonjsGlobal && _commonjsHelpers.commonjsGlobal.__assign) || function () {
503
+ __assign = Object.assign || function(t) {
504
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
505
+ s = arguments[i];
506
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
507
+ t[p] = s[p];
508
+ }
509
+ return t;
510
+ };
511
+ return __assign.apply(this, arguments);
512
+ };
513
+ Object.defineProperty(exports, "__esModule", { value: true });
514
+ exports.destroyCookie = exports.setCookie = exports.parseCookies = void 0;
515
+
516
+
517
+
518
+ /**
519
+ * Parses cookies.
520
+ *
521
+ * @param ctx NextJS page or API context, express context, null or undefined.
522
+ * @param options Options that we pass down to `cookie` library.
523
+ */
524
+ function parseCookies(ctx, options) {
525
+ var _a, _b;
526
+ if ((_b = (_a = ctx === null || ctx === void 0 ? void 0 : ctx.req) === null || _a === void 0 ? void 0 : _a.headers) === null || _b === void 0 ? void 0 : _b.cookie) {
527
+ return cookie.parse(ctx.req.headers.cookie, options);
528
+ }
529
+ if (utils.isBrowser()) {
530
+ return cookie.parse(document.cookie, options);
531
+ }
532
+ return {};
533
+ }
534
+ exports.parseCookies = parseCookies;
535
+ /**
536
+ * Sets a cookie.
537
+ *
538
+ * @param ctx NextJS page or API context, express context, null or undefined.
539
+ * @param name The name of your cookie.
540
+ * @param value The value of your cookie.
541
+ * @param options Options that we pass down to `cookie` library.
542
+ */
543
+ function setCookie$1(ctx, name, value, options) {
544
+ var _a, _b;
545
+ if (options === void 0) { options = {}; }
546
+ // SSR
547
+ if (((_a = ctx === null || ctx === void 0 ? void 0 : ctx.res) === null || _a === void 0 ? void 0 : _a.getHeader) && ctx.res.setHeader) {
548
+ // Check if response has finished and warn about it.
549
+ if ((_b = ctx === null || ctx === void 0 ? void 0 : ctx.res) === null || _b === void 0 ? void 0 : _b.finished) {
550
+ console.warn("Not setting \"" + name + "\" cookie. Response has finished.");
551
+ console.warn("You should set cookie before res.send()");
552
+ return {};
553
+ }
554
+ /**
555
+ * Load existing cookies from the header and parse them.
556
+ */
557
+ var cookies = ctx.res.getHeader('Set-Cookie') || [];
558
+ if (typeof cookies === 'string')
559
+ cookies = [cookies];
560
+ if (typeof cookies === 'number')
561
+ cookies = [];
562
+ /**
563
+ * Parse cookies but ignore values - we've already encoded
564
+ * them in the previous call.
565
+ */
566
+ var parsedCookies = setCookie.parse(cookies, {
567
+ decodeValues: false,
568
+ });
569
+ /**
570
+ * We create the new cookie and make sure that none of
571
+ * the existing cookies match it.
572
+ */
573
+ var newCookie_1 = utils.createCookie(name, value, options);
574
+ var cookiesToSet_1 = [];
575
+ parsedCookies.forEach(function (parsedCookie) {
576
+ if (!utils.areCookiesEqual(parsedCookie, newCookie_1)) {
577
+ /**
578
+ * We serialize the cookie back to the original format
579
+ * if it isn't the same as the new one.
580
+ */
581
+ var serializedCookie = cookie.serialize(parsedCookie.name, parsedCookie.value, __assign({
582
+ // we prevent reencoding by default, but you might override it
583
+ encode: function (val) { return val; } }, parsedCookie));
584
+ cookiesToSet_1.push(serializedCookie);
585
+ }
586
+ });
587
+ cookiesToSet_1.push(cookie.serialize(name, value, options));
588
+ // Update the header.
589
+ ctx.res.setHeader('Set-Cookie', cookiesToSet_1);
590
+ }
591
+ // Browser
592
+ if (utils.isBrowser()) {
593
+ if (options && options.httpOnly) {
594
+ throw new Error('Can not set a httpOnly cookie in the browser.');
595
+ }
596
+ document.cookie = cookie.serialize(name, value, options);
597
+ }
598
+ return {};
599
+ }
600
+ exports.setCookie = setCookie$1;
601
+ /**
602
+ * Destroys a cookie with a particular name.
603
+ *
604
+ * @param ctx NextJS page or API context, express context, null or undefined.
605
+ * @param name Cookie name.
606
+ * @param options Options that we pass down to `cookie` library.
607
+ */
608
+ function destroyCookie(ctx, name, options) {
609
+ /**
610
+ * We forward the request destroy to setCookie function
611
+ * as it is the same function with modified maxAge value.
612
+ */
613
+ return setCookie$1(ctx, name, '', __assign(__assign({}, (options || {})), { maxAge: -1 }));
614
+ }
615
+ exports.destroyCookie = destroyCookie;
616
+ /* Utility Exports */
617
+ exports.default = {
618
+ set: setCookie$1,
619
+ get: parseCookies,
620
+ destroy: destroyCookie,
621
+ };
622
+ //# sourceMappingURL=index.js.map
623
+ });
624
+
625
+ _commonjsHelpers.unwrapExports(dist);
626
+ dist.destroyCookie;
627
+ var dist_2 = dist.setCookie;
628
+ var dist_3 = dist.parseCookies;
629
+
630
+ var _this = undefined;
631
+
632
+ var getRelatedArticle = function () {
633
+ var _ref = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee() {
634
+ var ctx = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
635
+ var client = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
636
+ var article = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
637
+ var prevUrl = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '/';
638
+ var articleCount = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
639
+
640
+ var _article$url, url, documentGroupMapping, issueGroup, content_placement, references, params, articles, filters, cookies, prevSlugs, query;
641
+
642
+ return asyncToGenerator.regenerator.wrap(function _callee$(_context) {
643
+ while (1) {
644
+ switch (_context.prev = _context.next) {
645
+ case 0:
646
+ _article$url = article.url;
647
+ _article$url = _article$url === undefined ? {
648
+ current: null
649
+ } : _article$url;
650
+ url = _article$url.current, documentGroupMapping = article.documentGroupMapping, issueGroup = article.issueGroup;
651
+ content_placement = article.content_placement;
652
+ references = [];
653
+
654
+
655
+ content_placement = content_placement && content_placement.length > 0 && content_placement.filter(function (_ref2) {
656
+ var identifier = _ref2.identifier;
657
+ return identifier !== 'news';
658
+ });
659
+ if (content_placement && content_placement.length > 0) {
660
+ content_placement.forEach(function (_ref3) {
661
+ var path = _ref3.path,
662
+ _id = _ref3._id;
663
+
664
+ if (!_id || typeof _id == 'undefined') {
665
+ return null;
666
+ }
667
+ var prev_url_to_check = prevUrl;
668
+ if (prev_url_to_check.includes('?')) {
669
+ prev_url_to_check = prev_url_to_check.split('?')[0];
670
+ }
671
+ if (prev_url_to_check.endsWith(path) && _id) references.push(_id);
672
+ });
673
+ if (references.length === 0) {
674
+ content_placement.forEach(function (_ref4) {
675
+ var _id = _ref4._id;
676
+
677
+ if (_id) references.push(_id);
678
+ });
679
+ }
680
+ }
681
+
682
+ if (documentGroupMapping && documentGroupMapping.length > 0) {
683
+ documentGroupMapping.forEach(function (_ref5) {
684
+ var _id = _ref5._id;
685
+
686
+ if (_id) references.push(_id);
687
+ });
688
+ }
689
+
690
+ if (issueGroup && issueGroup._id) {
691
+ references.push(issueGroup._id);
692
+ }
693
+
694
+ params = { url: url, index: articleCount };
695
+ articles = null;
696
+
697
+ if (!(references && references.length > 0)) {
698
+ _context.next = 24;
699
+ break;
700
+ }
701
+
702
+ filters = '&& references("' + references.join('","') + '") ';
703
+
704
+
705
+ if (ctx && url) {
706
+ cookies = dist_3(ctx);
707
+ prevSlugs = cookies['prevSlugs'];
708
+
709
+ if (!!prevSlugs) {
710
+ if (!prevSlugs.includes(url)) dist_2(ctx, 'prevSlugs', prevSlugs + ',"' + url + '"', {});
711
+ filters = filters + ' && !(url.current in [' + prevSlugs + '])';
712
+ } else dist_2(ctx, 'prevSlugs', '"' + url + '"', {});
713
+ }
714
+
715
+ query = getQuery('related', filters, '', articleCount).replace('&& taxonomyMapping[]._ref in $taxonomy', '');
716
+ _context.prev = 15;
717
+ _context.next = 18;
718
+ return client.fetch(query, params);
719
+
720
+ case 18:
721
+ articles = _context.sent;
722
+ _context.next = 24;
723
+ break;
724
+
725
+ case 21:
726
+ _context.prev = 21;
727
+ _context.t0 = _context['catch'](15);
728
+
729
+ console.error(_context.t0);
730
+
731
+ case 24:
732
+ return _context.abrupt('return', articles);
733
+
734
+ case 25:
735
+ case 'end':
736
+ return _context.stop();
737
+ }
738
+ }
739
+ }, _callee, _this, [[15, 21]]);
740
+ }));
741
+
742
+ return function getRelatedArticle() {
743
+ return _ref.apply(this, arguments);
744
+ };
745
+ }();
746
+
747
+ module.exports = getRelatedArticle;