@mjhls/mjh-framework 1.0.1005-next12-0001 → 1.0.1005-next12-0002
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/AD-e1bb7536.js +1 -0
- package/dist/cjs/AD.js +1 -32
- package/dist/cjs/AD300x250-0bcfcd78.js +1 -0
- package/dist/cjs/AD300x250.js +1 -95
- package/dist/cjs/AD300x250x600-01659df6.js +1 -0
- package/dist/cjs/AD300x250x600.js +1 -112
- package/dist/cjs/AD728x90-c92f784d.js +1 -0
- package/dist/cjs/AD728x90.js +1 -109
- package/dist/cjs/ADFloatingFooter-f0650a0e.js +1 -0
- package/dist/cjs/ADFloatingFooter.js +1 -143
- package/dist/cjs/ADFooter-b3d98c5f.js +1 -0
- package/dist/cjs/ADFooter.js +1 -53
- package/dist/cjs/ADGutter-8451a0e7.js +1 -0
- package/dist/cjs/ADGutter.js +1 -115
- package/dist/cjs/ADInfeed-7019b746.js +1 -0
- package/dist/cjs/ADSkyscraper-2db48edc.js +1 -0
- package/dist/cjs/ADSkyscraper.js +1 -117
- package/dist/cjs/ADSponsoredResources-126ab84c.js +1 -0
- package/dist/cjs/ADSponsoredResources.js +1 -114
- package/dist/cjs/ADWebcast-26543865.js +1 -0
- package/dist/cjs/ADWebcast.js +1 -119
- package/dist/cjs/ADWelcome-6261c769.js +1 -0
- package/dist/cjs/ADWelcome.js +1 -166
- package/dist/cjs/ADlgInfeed-42059b30.js +1 -0
- package/dist/cjs/AccordionPanel-b018a969.js +1 -0
- package/dist/cjs/AccordionPanel.js +1 -94
- package/dist/cjs/AdSlot-8a0b4211.js +1 -0
- package/dist/cjs/AdSlot.js +1 -251
- package/dist/cjs/AdSlotsProvider-e06c4b39.js +1 -0
- package/dist/cjs/AdSlotsProvider.js +1 -183
- package/dist/cjs/AlgoliaSearch-05bab51c.js +1 -0
- package/dist/cjs/AlgoliaSearch.js +1 -195
- package/dist/cjs/AlphabeticList-94ed00ad.js +1 -0
- package/dist/cjs/AlphabeticList.js +1 -135
- package/dist/cjs/ArticleCarousel-6599cb34.js +1 -0
- package/dist/cjs/ArticleCarousel.js +1 -46
- package/dist/cjs/ArticleProgramLandingPage-2cc43252.js +1 -0
- package/dist/cjs/ArticleProgramLandingPage.js +1 -188
- package/dist/cjs/ArticleSeriesLandingPage-4af0758a.js +1 -0
- package/dist/cjs/ArticleSeriesLandingPage.js +1 -162
- package/dist/cjs/ArticleSeriesListing-476cb622.js +1 -0
- package/dist/cjs/ArticleSeriesListing.js +1 -315
- package/dist/cjs/Auth.js +1 -3514
- package/dist/cjs/AuthWrapper.js +1 -143
- package/dist/cjs/AuthorComponent-dd3ac7f5.js +1 -0
- package/dist/cjs/Beam.js +1 -350
- package/dist/cjs/Breadcrumbs-10474e7d.js +1 -0
- package/dist/cjs/Breadcrumbs.js +1 -107
- package/dist/cjs/CMEDeck-c7276c4c.js +1 -0
- package/dist/cjs/CMEDeck.js +1 -443
- package/dist/cjs/Column1-9a0e0262.js +1 -0
- package/dist/cjs/Column1.js +1 -39
- package/dist/cjs/Column2-47fa24ac.js +1 -0
- package/dist/cjs/Column2.js +1 -74
- package/dist/cjs/Column3-7407a3a2.js +1 -0
- package/dist/cjs/Column3.js +1 -143
- package/dist/cjs/ConferenceArticleCard-a48a5eb4.js +1 -0
- package/dist/cjs/ConferenceArticleCard.js +1 -93
- package/dist/cjs/ConferenceBanner-9fb497af.js +1 -0
- package/dist/cjs/ContentCard-0543793a.js +1 -0
- package/dist/cjs/ContentCardPaginated.js +1 -417
- package/dist/cjs/DeckContent.js +1 -507
- package/dist/cjs/DeckQueue.js +1 -403
- package/dist/cjs/DeckQueuePaginated.js +1 -348
- package/dist/cjs/Dfp-eb398ac3.js +1 -0
- package/dist/cjs/DropdownButton-3f21ccbf.js +6 -0
- package/dist/cjs/Dvm-4aab0fca.js +1 -0
- package/dist/cjs/EventsDeck-7614cec4.js +1 -0
- package/dist/cjs/EventsDeck.js +1 -884
- package/dist/cjs/ExternalResources-c1d4e253.js +1 -0
- package/dist/cjs/ExternalResources.js +1 -222
- package/dist/cjs/Feature-4254dfe3.js +1 -0
- package/dist/cjs/Feature.js +1 -129
- package/dist/cjs/ForbesHero-82c18210.js +1 -0
- package/dist/cjs/ForbesHero.js +1 -137
- package/dist/cjs/GridContent-6c8dd8e5.js +1 -0
- package/dist/cjs/GridContent.js +1 -828
- package/dist/cjs/GridContentPaginated.js +1 -704
- package/dist/cjs/GridHero-c6784d3f.js +1 -0
- package/dist/cjs/GridHero.js +1 -147
- package/dist/cjs/GroupDeck-6920bcf7.js +1 -0
- package/dist/cjs/GroupDeck.js +1 -314
- package/dist/cjs/HamMagazine.js +1 -602
- package/dist/cjs/HamburgerNav-02a13006.js +1 -0
- package/dist/cjs/Header-268a2cda.js +1 -0
- package/dist/cjs/Header.js +1 -39
- package/dist/cjs/HealthCareProfessionalModal.js +1 -78
- package/dist/cjs/Hero-79a1f7a3.js +1 -0
- package/dist/cjs/Hero.js +1 -48
- package/dist/cjs/HighlightenVideo-20edba55.js +1 -0
- package/dist/cjs/HighlightenVideo.js +1 -69
- package/dist/cjs/HorizontalArticleListing-4a44f354.js +1 -0
- package/dist/cjs/HorizontalArticleListing.js +1 -169
- package/dist/cjs/HorizontalHero-c5a3cb7a.js +1 -0
- package/dist/cjs/HorizontalHero.js +1 -111
- package/dist/cjs/ImageSlider-d1359f16.js +1 -0
- package/dist/cjs/IssueContentDeck-48a04696.js +1 -0
- package/dist/cjs/IssueContentDeck.js +1 -241
- package/dist/cjs/IssueDeck-41ebd17b.js +1 -0
- package/dist/cjs/IssueDeck.js +1 -268
- package/dist/cjs/IssueLanding-06765ae0.js +1 -0
- package/dist/cjs/IssueLanding.js +1 -176
- package/dist/cjs/KMTracker-4e1de793.js +1 -0
- package/dist/cjs/KMTracker.js +1 -27
- package/dist/cjs/LeftNav-c7283941.js +1 -0
- package/dist/cjs/LeftNav.js +1 -154
- package/dist/cjs/Magazine-0d15b137.js +1 -0
- package/dist/cjs/MasterDeck-0e168ac1.js +1 -0
- package/dist/cjs/MasterDeck.js +1 -555
- package/dist/cjs/MasterDeckPaginated.js +1 -469
- package/dist/cjs/MediaSeriesCard-07b6f758.js +1 -0
- package/dist/cjs/MediaSeriesLanding.js +1 -508
- package/dist/cjs/MediaSeriesLandingPaginated.js +1 -534
- package/dist/cjs/Native-ee78edeb.js +1 -0
- package/dist/cjs/NavDvm.js +1 -276
- package/dist/cjs/NavFooter-f905aca3.js +1 -0
- package/dist/cjs/NavMagazine.js +1 -613
- package/dist/cjs/NavNative.js +1 -880
- package/dist/cjs/Normal-ad14a1b1.js +1 -0
- package/dist/cjs/OncliveHero-5c7454fe.js +1 -0
- package/dist/cjs/OncliveHero.js +1 -79
- package/dist/cjs/OncliveLargeHero-46e0a793.js +1 -0
- package/dist/cjs/OncliveLargeHero.js +1 -241
- package/dist/cjs/PageFilter-bdffe62b.js +1 -0
- package/dist/cjs/PageFilter.js +1 -72
- package/dist/cjs/Pagination-825e4903.js +1 -0
- package/dist/cjs/PartnerDetailListing-848c514f.js +1 -0
- package/dist/cjs/PartnerDetailListing.js +1 -344
- package/dist/cjs/PartnerDetailListingPaginated.js +1 -353
- package/dist/cjs/PdfDownload-c99142ff.js +1 -0
- package/dist/cjs/PdfDownload.js +1 -28
- package/dist/cjs/PixelTracking.js +1 -165
- package/dist/cjs/PodcastsLanding.js +1 -236
- package/dist/cjs/PopUpModal-c1cbf9b6.js +1 -0
- package/dist/cjs/PopUpModal.js +1 -58
- package/dist/cjs/PtceDeck.js +1 -149
- package/dist/cjs/PubSection-08e834ca.js +1 -0
- package/dist/cjs/PubSection.js +1 -120
- package/dist/cjs/PubToc-6e2a3f50.js +1 -0
- package/dist/cjs/PubToc.js +1 -87
- package/dist/cjs/PublicationDeck-e242bd17.js +1 -0
- package/dist/cjs/PublicationDeck.js +1 -183
- package/dist/cjs/PublicationFeature-0e2014fb.js +1 -0
- package/dist/cjs/PublicationLanding-d54d80d4.js +1 -0
- package/dist/cjs/PublicationLanding.js +1 -853
- package/dist/cjs/Queue-8e0e436f.js +1 -0
- package/dist/cjs/QueueDeckExpanded-e420bdec.js +1 -0
- package/dist/cjs/QueueDeckExpanded.js +1 -1540
- package/dist/cjs/QueueDeckExpandedPaginated.js +1 -1388
- package/dist/cjs/RecentNews.js +1 -91
- package/dist/cjs/RelatedContent-4ac0ceca.js +1 -0
- package/dist/cjs/RelatedContent.js +1 -114
- package/dist/cjs/RelatedTopicsDropdown-4736b927.js +1 -0
- package/dist/cjs/RelatedTopicsDropdown.js +1 -90
- package/dist/cjs/RolesDeck-83cbb45e.js +1 -0
- package/dist/cjs/RolesDeck.js +1 -94
- package/dist/cjs/Schema-8c138aa8.js +1 -0
- package/dist/cjs/Schema.js +1 -103
- package/dist/cjs/Search.js +1 -66
- package/dist/cjs/Segment.js +1 -452
- package/dist/cjs/SeriesListingDeck.js +1 -248
- package/dist/cjs/SeriesSlider-720871f8.js +1 -0
- package/dist/cjs/SetCookie.js +1 -10
- package/dist/cjs/SideFooter-17e666a3.js +1 -0
- package/dist/cjs/SideFooter.js +1 -150
- package/dist/cjs/SocialIcons-425827d3.js +1 -0
- package/dist/cjs/SocialIcons.js +1 -103
- package/dist/cjs/SocialNavFooter-8f053a08.js +1 -0
- package/dist/cjs/SocialSearchComponent-dea3dbc8.js +1 -0
- package/dist/cjs/SocialShare-3d7c8abe.js +1 -0
- package/dist/cjs/SocialShare.js +1 -74
- package/dist/cjs/TaxonomyCard-e881cb43.js +1 -0
- package/dist/cjs/TaxonomyCard.js +1 -257
- package/dist/cjs/TaxonomyDescription-9a13ded6.js +1 -0
- package/dist/cjs/TaxonomyDescription.js +1 -209
- package/dist/cjs/TemplateNormal.js +1 -203
- package/dist/cjs/ThumbnailCard-101f04b8.js +1 -0
- package/dist/cjs/ThumbnailCard.js +1 -59
- package/dist/cjs/Ustream-b7692d0a.js +1 -0
- package/dist/cjs/Ustream.js +1 -156
- package/dist/cjs/VerticalHero-a61b1a2e.js +1 -0
- package/dist/cjs/VerticalHero.js +1 -74
- package/dist/cjs/VideoProgramLandingPage-5508836c.js +1 -0
- package/dist/cjs/VideoProgramLandingPage.js +1 -264
- package/dist/cjs/VideoSeriesCard.js +1 -88
- package/dist/cjs/VideoSeriesFilter-9650cf01.js +1 -0
- package/dist/cjs/VideoSeriesFilter.js +1 -128
- package/dist/cjs/VideoSeriesLandingPage-d1fae653.js +1 -0
- package/dist/cjs/VideoSeriesLandingPage.js +1 -178
- package/dist/cjs/VideoSeriesListing-91f5aa6d.js +1 -0
- package/dist/cjs/VideoSeriesListing.js +1 -422
- package/dist/cjs/View.js +1 -2680
- package/dist/cjs/YahooHero-2df6a408.js +1 -0
- package/dist/cjs/YahooHero.js +1 -126
- package/dist/cjs/YoutubeGroup-d8a93da0.js +1 -0
- package/dist/cjs/YoutubeGroup.js +1 -371
- package/dist/cjs/_commonjsHelpers-0a7b82d9.js +1 -0
- package/dist/cjs/beam-aaf6fbe9.js +1 -0
- package/dist/cjs/checkSisterSite-d2d62375.js +1 -0
- package/dist/cjs/defineProperty-ba7cd53d.js +1 -0
- package/dist/cjs/entities-8feddf1d.js +1 -0
- package/dist/cjs/extends-5ede7877.js +1 -0
- package/dist/cjs/faundadb.js +1 -406
- package/dist/cjs/getContentCategory-ee6d9fdf.js +1 -0
- package/dist/cjs/getKeywords-5341ea76.js +1 -0
- package/dist/cjs/getKeywords.js +1 -46
- package/dist/cjs/getPrototypeOf-99b1cfd8.js +1 -0
- package/dist/cjs/getPtceActivities.js +1 -89
- package/dist/cjs/getQuery-154617ad.js +1 -0
- package/dist/cjs/getQuery.js +1 -28
- package/dist/cjs/getRelatedArticle-dbed93dc.js +1 -0
- package/dist/cjs/getRelatedArticle.js +1 -478
- package/dist/cjs/getRootDocGroup.js +1 -62
- package/dist/cjs/getSerializers.js +1 -68
- package/dist/cjs/getSeriesDetail-e2980903.js +1 -0
- package/dist/cjs/getSeriesDetail.js +1 -40
- package/dist/cjs/getTargeting-a1ecaa0b.js +1 -0
- package/dist/cjs/getTargeting.js +1 -13
- package/dist/cjs/index-14c8083b.js +1 -0
- package/dist/cjs/index-3291d44c.js +1 -0
- package/dist/cjs/index-5cca2099.js +1 -0
- package/dist/cjs/index-66647f61.js +1 -0
- package/dist/cjs/index.js +1 -643
- package/dist/cjs/searchForm-bb5e3dbf.js +1 -0
- package/dist/cjs/segment-lib-7a16e514.js +1 -0
- package/dist/cjs/setCookie-e72f573d.js +1 -0
- package/dist/cjs/slicedToArray-c9e22c6a.js +1 -0
- package/dist/cjs/style-inject.es-dcee06b6.js +1 -30
- package/dist/cjs/timeDifferenceCalc.js +1 -39
- package/dist/cjs/toConsumableArray-7afb7984.js +1 -0
- package/dist/cjs/typeof-a861d137.js +1 -0
- package/dist/cjs/unsupportedIterableToArray-294d47a8.js +1 -0
- package/dist/cjs/urlFor-86a2f4db.js +1 -0
- package/dist/cjs/urlFor.js +1 -65
- package/dist/cjs/urlForFile-52afb8e9.js +1 -0
- package/dist/cjs/ustream-api-05a918f3.js +1 -0
- package/dist/esm/AD-8a57f623.js +1 -0
- package/dist/esm/AD.js +1 -26
- package/dist/esm/AD300x250-10ccde99.js +1 -0
- package/dist/esm/AD300x250.js +1 -89
- package/dist/esm/AD300x250x600-10e29b3d.js +1 -0
- package/dist/esm/AD300x250x600.js +1 -106
- package/dist/esm/AD728x90-2b0e930d.js +1 -0
- package/dist/esm/AD728x90.js +1 -103
- package/dist/esm/ADFloatingFooter-f23caacf.js +1 -0
- package/dist/esm/ADFloatingFooter.js +1 -137
- package/dist/esm/ADFooter-4c20b5fc.js +1 -0
- package/dist/esm/ADFooter.js +1 -47
- package/dist/esm/ADGutter-59cf52e3.js +1 -0
- package/dist/esm/ADGutter.js +1 -109
- package/dist/esm/ADInfeed-8ce85d87.js +1 -0
- package/dist/esm/ADSkyscraper-bfd33e46.js +1 -0
- package/dist/esm/ADSkyscraper.js +1 -111
- package/dist/esm/ADSponsoredResources-0410407c.js +1 -0
- package/dist/esm/ADSponsoredResources.js +1 -108
- package/dist/esm/ADWebcast-6f27e384.js +1 -0
- package/dist/esm/ADWebcast.js +1 -113
- package/dist/esm/ADWelcome-421d5621.js +1 -0
- package/dist/esm/ADWelcome.js +1 -160
- package/dist/esm/ADlgInfeed-19d0f057.js +1 -0
- package/dist/esm/AccordionPanel-123022f0.js +1 -0
- package/dist/esm/AccordionPanel.js +1 -87
- package/dist/esm/AdSlot-16696371.js +1 -0
- package/dist/esm/AdSlot.js +1 -244
- package/dist/esm/AdSlotsProvider-5ead284e.js +1 -0
- package/dist/esm/AdSlotsProvider.js +1 -176
- package/dist/esm/AlgoliaSearch-1343b721.js +1 -0
- package/dist/esm/AlgoliaSearch.js +1 -188
- package/dist/esm/AlphabeticList-f1ca5612.js +1 -0
- package/dist/esm/AlphabeticList.js +1 -129
- package/dist/esm/ArticleCarousel-ba29666c.js +1 -0
- package/dist/esm/ArticleCarousel.js +1 -40
- package/dist/esm/ArticleProgramLandingPage-d996da8f.js +1 -0
- package/dist/esm/ArticleProgramLandingPage.js +1 -182
- package/dist/esm/ArticleSeriesLandingPage-67cda955.js +1 -0
- package/dist/esm/ArticleSeriesLandingPage.js +1 -156
- package/dist/esm/ArticleSeriesListing-22e8f5a6.js +1 -0
- package/dist/esm/ArticleSeriesListing.js +1 -308
- package/dist/esm/Auth.js +1 -3494
- package/dist/esm/AuthWrapper.js +1 -136
- package/dist/esm/AuthorComponent-f3e14fdd.js +1 -0
- package/dist/esm/Beam.js +1 -348
- package/dist/esm/Breadcrumbs-8838701e.js +1 -0
- package/dist/esm/Breadcrumbs.js +1 -100
- package/dist/esm/CMEDeck-182d8eb7.js +1 -0
- package/dist/esm/CMEDeck.js +1 -437
- package/dist/esm/Column1-3304e0a7.js +1 -0
- package/dist/esm/Column1.js +1 -29
- package/dist/esm/Column2-2d42433b.js +1 -0
- package/dist/esm/Column2.js +1 -64
- package/dist/esm/Column3-94c8661b.js +1 -0
- package/dist/esm/Column3.js +1 -133
- package/dist/esm/ConferenceArticleCard-c10c5b7f.js +1 -0
- package/dist/esm/ConferenceArticleCard.js +1 -87
- package/dist/esm/ConferenceBanner-8a6f3ed9.js +1 -0
- package/dist/esm/ContentCard-01c2e43a.js +1 -0
- package/dist/esm/ContentCardPaginated.js +1 -406
- package/dist/esm/DeckContent.js +1 -497
- package/dist/esm/DeckQueue.js +1 -393
- package/dist/esm/DeckQueuePaginated.js +1 -337
- package/dist/esm/Dfp-c3c626b1.js +1 -0
- package/dist/esm/DropdownButton-c4621022.js +6 -0
- package/dist/esm/Dvm-138f924d.js +1 -0
- package/dist/esm/EventsDeck-e5aad41d.js +1 -0
- package/dist/esm/EventsDeck.js +1 -871
- package/dist/esm/ExternalResources-e9656681.js +1 -0
- package/dist/esm/ExternalResources.js +1 -215
- package/dist/esm/Feature-69a30cea.js +1 -0
- package/dist/esm/Feature.js +1 -122
- package/dist/esm/ForbesHero-0b0a5436.js +1 -0
- package/dist/esm/ForbesHero.js +1 -131
- package/dist/esm/GridContent-d8df59ae.js +1 -0
- package/dist/esm/GridContent.js +1 -818
- package/dist/esm/GridContentPaginated.js +1 -693
- package/dist/esm/GridHero-0d17636c.js +1 -0
- package/dist/esm/GridHero.js +1 -141
- package/dist/esm/GroupDeck-4c581822.js +1 -0
- package/dist/esm/GroupDeck.js +1 -308
- package/dist/esm/HamMagazine.js +1 -590
- package/dist/esm/HamburgerNav-5fcf79ae.js +1 -0
- package/dist/esm/Header-b0624adc.js +1 -0
- package/dist/esm/Header.js +1 -30
- package/dist/esm/HealthCareProfessionalModal.js +1 -70
- package/dist/esm/Hero-1b663f28.js +1 -0
- package/dist/esm/Hero.js +1 -42
- package/dist/esm/HighlightenVideo-5c3fd0fd.js +1 -0
- package/dist/esm/HighlightenVideo.js +1 -63
- package/dist/esm/HorizontalArticleListing-cccace2e.js +1 -0
- package/dist/esm/HorizontalArticleListing.js +1 -163
- package/dist/esm/HorizontalHero-8633a55c.js +1 -0
- package/dist/esm/HorizontalHero.js +1 -105
- package/dist/esm/ImageSlider-c354db50.js +1 -0
- package/dist/esm/IssueContentDeck-915409a7.js +1 -0
- package/dist/esm/IssueContentDeck.js +1 -231
- package/dist/esm/IssueDeck-61a4a550.js +1 -0
- package/dist/esm/IssueDeck.js +1 -258
- package/dist/esm/IssueLanding-a59c91ee.js +1 -0
- package/dist/esm/IssueLanding.js +1 -170
- package/dist/esm/KMTracker-d9e1c288.js +1 -0
- package/dist/esm/KMTracker.js +1 -25
- package/dist/esm/LeftNav-a3852fbe.js +1 -0
- package/dist/esm/LeftNav.js +1 -145
- package/dist/esm/Magazine-7d6e5dcd.js +1 -0
- package/dist/esm/MasterDeck-41c7cd70.js +1 -0
- package/dist/esm/MasterDeck.js +1 -548
- package/dist/esm/MasterDeckPaginated.js +1 -461
- package/dist/esm/MediaSeriesCard-cf72ce87.js +1 -0
- package/dist/esm/MediaSeriesLanding.js +1 -501
- package/dist/esm/MediaSeriesLandingPaginated.js +1 -527
- package/dist/esm/Native-bf89940a.js +1 -0
- package/dist/esm/NavDvm.js +1 -264
- package/dist/esm/NavFooter-83d89acd.js +1 -0
- package/dist/esm/NavMagazine.js +1 -601
- package/dist/esm/NavNative.js +1 -865
- package/dist/esm/Normal-06895213.js +1 -0
- package/dist/esm/OncliveHero-19794e52.js +1 -0
- package/dist/esm/OncliveHero.js +1 -73
- package/dist/esm/OncliveLargeHero-01d4c10f.js +1 -0
- package/dist/esm/OncliveLargeHero.js +1 -235
- package/dist/esm/PageFilter-81144bcb.js +1 -0
- package/dist/esm/PageFilter.js +1 -66
- package/dist/esm/Pagination-44c3ff7c.js +1 -0
- package/dist/esm/PartnerDetailListing-429d60e1.js +1 -0
- package/dist/esm/PartnerDetailListing.js +1 -338
- package/dist/esm/PartnerDetailListingPaginated.js +1 -347
- package/dist/esm/PdfDownload-eff648d3.js +1 -0
- package/dist/esm/PdfDownload.js +1 -22
- package/dist/esm/PixelTracking.js +1 -156
- package/dist/esm/PodcastsLanding.js +1 -229
- package/dist/esm/PopUpModal-a2735a23.js +1 -0
- package/dist/esm/PopUpModal.js +1 -51
- package/dist/esm/PtceDeck.js +1 -143
- package/dist/esm/PubSection-3d940b53.js +1 -0
- package/dist/esm/PubSection.js +1 -114
- package/dist/esm/PubToc-52a85696.js +1 -0
- package/dist/esm/PubToc.js +1 -81
- package/dist/esm/PublicationDeck-538d397e.js +1 -0
- package/dist/esm/PublicationDeck.js +1 -173
- package/dist/esm/PublicationFeature-6deea07c.js +1 -0
- package/dist/esm/PublicationLanding-48ebce9b.js +1 -0
- package/dist/esm/PublicationLanding.js +1 -843
- package/dist/esm/Queue-847df47f.js +1 -0
- package/dist/esm/QueueDeckExpanded-fdc60f72.js +1 -0
- package/dist/esm/QueueDeckExpanded.js +1 -1534
- package/dist/esm/QueueDeckExpandedPaginated.js +1 -1382
- package/dist/esm/RecentNews.js +1 -85
- package/dist/esm/RelatedContent-f3eaad29.js +1 -0
- package/dist/esm/RelatedContent.js +1 -108
- package/dist/esm/RelatedTopicsDropdown-0cf5829a.js +1 -0
- package/dist/esm/RelatedTopicsDropdown.js +1 -82
- package/dist/esm/RolesDeck-6146633e.js +1 -0
- package/dist/esm/RolesDeck.js +1 -84
- package/dist/esm/Schema-c7f42de0.js +1 -0
- package/dist/esm/Schema.js +1 -97
- package/dist/esm/Search.js +1 -57
- package/dist/esm/Segment.js +1 -450
- package/dist/esm/SeriesListingDeck.js +1 -242
- package/dist/esm/SeriesSlider-a00cd257.js +1 -0
- package/dist/esm/SetCookie.js +1 -8
- package/dist/esm/SideFooter-7cd5abc0.js +1 -0
- package/dist/esm/SideFooter.js +1 -144
- package/dist/esm/SocialIcons-c7861c13.js +1 -0
- package/dist/esm/SocialIcons.js +1 -97
- package/dist/esm/SocialNavFooter-66c6cf3c.js +1 -0
- package/dist/esm/SocialSearchComponent-e74e11f8.js +1 -0
- package/dist/esm/SocialShare-9cc43665.js +1 -0
- package/dist/esm/SocialShare.js +1 -67
- package/dist/esm/TaxonomyCard-507f5c95.js +1 -0
- package/dist/esm/TaxonomyCard.js +1 -247
- package/dist/esm/TaxonomyDescription-ee6ae52e.js +1 -0
- package/dist/esm/TaxonomyDescription.js +1 -202
- package/dist/esm/TemplateNormal.js +1 -196
- package/dist/esm/ThumbnailCard-b7a3af71.js +1 -0
- package/dist/esm/ThumbnailCard.js +1 -52
- package/dist/esm/Ustream-29dc2277.js +1 -0
- package/dist/esm/Ustream.js +1 -150
- package/dist/esm/VerticalHero-ffc93a70.js +1 -0
- package/dist/esm/VerticalHero.js +1 -68
- package/dist/esm/VideoProgramLandingPage-179db5b2.js +1 -0
- package/dist/esm/VideoProgramLandingPage.js +1 -255
- package/dist/esm/VideoSeriesCard.js +1 -82
- package/dist/esm/VideoSeriesFilter-b6bd4c07.js +1 -0
- package/dist/esm/VideoSeriesFilter.js +1 -122
- package/dist/esm/VideoSeriesLandingPage-180a2469.js +1 -0
- package/dist/esm/VideoSeriesLandingPage.js +1 -172
- package/dist/esm/VideoSeriesListing-62650a53.js +1 -0
- package/dist/esm/VideoSeriesListing.js +1 -415
- package/dist/esm/View.js +1 -2669
- package/dist/esm/YahooHero-ddfeb2a5.js +1 -0
- package/dist/esm/YahooHero.js +1 -120
- package/dist/esm/YoutubeGroup-1dd6f1ba.js +1 -0
- package/dist/esm/YoutubeGroup.js +1 -365
- package/dist/esm/_commonjsHelpers-57e89916.js +1 -0
- package/dist/esm/beam-50a5c4d8.js +1 -0
- package/dist/esm/checkSisterSite-20e2bf62.js +1 -0
- package/dist/esm/defineProperty-18999f8e.js +1 -0
- package/dist/esm/entities-8b138943.js +1 -0
- package/dist/esm/extends-e61fd370.js +1 -0
- package/dist/esm/faundadb.js +1 -396
- package/dist/esm/getContentCategory-f99fdf90.js +1 -0
- package/dist/esm/getKeywords-2512775a.js +1 -0
- package/dist/esm/getKeywords.js +1 -44
- package/dist/esm/getPrototypeOf-a8361cb6.js +1 -0
- package/dist/esm/getPtceActivities.js +1 -87
- package/dist/esm/getQuery-bfc0390c.js +1 -0
- package/dist/esm/getQuery.js +1 -26
- package/dist/esm/getRelatedArticle-66a08458.js +1 -0
- package/dist/esm/getRelatedArticle.js +1 -476
- package/dist/esm/getRootDocGroup.js +1 -60
- package/dist/esm/getSerializers.js +1 -62
- package/dist/esm/getSeriesDetail-aef9680c.js +1 -0
- package/dist/esm/getSeriesDetail.js +1 -38
- package/dist/esm/getTargeting-eeb7bb6a.js +1 -0
- package/dist/esm/getTargeting.js +1 -7
- package/dist/esm/index-00bbf2b1.js +1 -0
- package/dist/esm/index-24498aa0.js +1 -0
- package/dist/esm/index-541d17f5.js +1 -0
- package/dist/esm/index-a96a4f73.js +1 -0
- package/dist/esm/index.js +1 -536
- package/dist/esm/searchForm-8218e558.js +1 -0
- package/dist/esm/segment-lib-3a19dbdd.js +1 -0
- package/dist/esm/setCookie-0f2ab6df.js +1 -0
- package/dist/esm/slicedToArray-f57adb2c.js +1 -0
- package/dist/esm/style-inject.es-1f59c1d0.js +1 -28
- package/dist/esm/timeDifferenceCalc.js +1 -37
- package/dist/esm/toConsumableArray-2f86a0c1.js +1 -0
- package/dist/esm/typeof-92b42de1.js +1 -0
- package/dist/esm/unsupportedIterableToArray-b359dd50.js +1 -0
- package/dist/esm/urlFor-649884fa.js +1 -0
- package/dist/esm/urlFor.js +1 -63
- package/dist/esm/urlForFile-3b87fb01.js +1 -0
- package/dist/esm/ustream-api-7998d140.js +1 -0
- package/package.json +21 -20
- package/dist/cjs/ADInfeed-08a6ef56.js +0 -66
- package/dist/cjs/ADlgInfeed-f46139b2.js +0 -60
- package/dist/cjs/AuthorComponent-17e1c62b.js +0 -96
- package/dist/cjs/BlockContent-8b494587.js +0 -916
- package/dist/cjs/ConferenceBanner-6c9e718a.js +0 -24
- package/dist/cjs/Dfp-bcaa7e3f.js +0 -103
- package/dist/cjs/ImageSlider-10cd194f.js +0 -1383
- package/dist/cjs/MediaSeriesCard-a6e3f32e.js +0 -81
- package/dist/cjs/NavFooter-4799de4b.js +0 -71
- package/dist/cjs/Pagination-7624a3bd.js +0 -90
- package/dist/cjs/PublicationFeature-6f89fb97.js +0 -130
- package/dist/cjs/SeriesSlider-08699353.js +0 -332
- package/dist/cjs/SocialSearchComponent-59192efd.js +0 -213
- package/dist/cjs/Tooltip-7be5df78.js +0 -9229
- package/dist/cjs/_commonjsHelpers-06173234.js +0 -25
- package/dist/cjs/_is-array-aa52fa1e.js +0 -74
- package/dist/cjs/_iter-detect-05795553.js +0 -52
- package/dist/cjs/_library-dd23b178.js +0 -5
- package/dist/cjs/_object-pie-68c5bcbc.js +0 -16
- package/dist/cjs/_object-sap-171b9ea5.js +0 -16
- package/dist/cjs/_object-to-array-9bac8737.js +0 -25
- package/dist/cjs/asyncToGenerator-df19209d.js +0 -1395
- package/dist/cjs/brightcove-react-player-loader.es-5c98aec7.js +0 -2232
- package/dist/cjs/checkSisterSite-b29833b2.js +0 -19
- package/dist/cjs/core.get-iterator-method-f3c44602.js +0 -584
- package/dist/cjs/debounce-529c8d06.js +0 -216
- package/dist/cjs/define-property-21887c62.js +0 -20
- package/dist/cjs/entities-310b46ee.js +0 -506
- package/dist/cjs/eq-bb2843ed.js +0 -79
- package/dist/cjs/extends-7df78678.js +0 -86
- package/dist/cjs/get-adbb11e3.js +0 -920
- package/dist/cjs/getContentCategory-f38a4c00.js +0 -11
- package/dist/cjs/getTargeting-5eabd6e2.js +0 -164
- package/dist/cjs/iconBase-68959171.js +0 -84
- package/dist/cjs/index-187c967e.js +0 -54
- package/dist/cjs/index-44481153.js +0 -1664
- package/dist/cjs/index-99edf08a.js +0 -1572
- package/dist/cjs/index-9d365128.js +0 -613
- package/dist/cjs/index-b278e08f.js +0 -10526
- package/dist/cjs/index-b5eb3ff8.js +0 -551
- package/dist/cjs/index-bd6c9f56.js +0 -211
- package/dist/cjs/index.es-f3e47207.js +0 -445
- package/dist/cjs/index.esm-44f3e2d0.js +0 -13
- package/dist/cjs/index.esm-48e0f0d8.js +0 -19
- package/dist/cjs/index.esm-f4cf6943.js +0 -97
- package/dist/cjs/index.esm-f93506ac.js +0 -25
- package/dist/cjs/inherits-420ee86f.js +0 -185
- package/dist/cjs/isSymbol-04666465.js +0 -209
- package/dist/cjs/js.cookie-a511c430.js +0 -160
- package/dist/cjs/keys-d207942e.js +0 -25
- package/dist/cjs/lodash-7fd85bcf.js +0 -17147
- package/dist/cjs/main-7b5e57b0.js +0 -898
- package/dist/cjs/md5-e1ca5797.js +0 -323
- package/dist/cjs/moment-ca3bd9fb.js +0 -5669
- package/dist/cjs/react-social-icons-07939b41.js +0 -616
- package/dist/cjs/slicedToArray-f6d4eaa8.js +0 -95
- package/dist/cjs/smoothscroll-5054361f.js +0 -438
- package/dist/cjs/stringify-bbc68047.js +0 -17
- package/dist/cjs/toConsumableArray-c9b8a0d0.js +0 -74
- package/dist/cjs/toNumber-36d1e7e5.js +0 -69
- package/dist/cjs/typeof-ec08d471.js +0 -382
- package/dist/cjs/urlForFile-ad96158c.js +0 -24
- package/dist/cjs/ustream-api-9ebe112f.js +0 -106
- package/dist/cjs/util-f2c1b65b.js +0 -576
- package/dist/cjs/visibility-sensor-eb2c5b69.js +0 -597
- package/dist/cjs/web.dom.iterable-e34bf324.js +0 -50
- package/dist/esm/ADInfeed-36973a76.js +0 -59
- package/dist/esm/ADlgInfeed-f6e898d5.js +0 -54
- package/dist/esm/AuthorComponent-b0a47123.js +0 -90
- package/dist/esm/BlockContent-d05b5b23.js +0 -909
- package/dist/esm/ConferenceBanner-9162d0ca.js +0 -18
- package/dist/esm/Dfp-e151d2de.js +0 -96
- package/dist/esm/ImageSlider-5ae6287a.js +0 -1375
- package/dist/esm/MediaSeriesCard-66045ffb.js +0 -75
- package/dist/esm/NavFooter-da30eae3.js +0 -65
- package/dist/esm/Pagination-1e09918f.js +0 -82
- package/dist/esm/PublicationFeature-0379cc20.js +0 -121
- package/dist/esm/SeriesSlider-b364d074.js +0 -326
- package/dist/esm/SocialSearchComponent-09b55779.js +0 -204
- package/dist/esm/Tooltip-af3e4ee9.js +0 -9220
- package/dist/esm/_commonjsHelpers-0c4b6f40.js +0 -19
- package/dist/esm/_is-array-31d40a83.js +0 -71
- package/dist/esm/_iter-detect-72edfd60.js +0 -48
- package/dist/esm/_library-528f1934.js +0 -3
- package/dist/esm/_object-pie-33c40e79.js +0 -13
- package/dist/esm/_object-sap-4201ccf6.js +0 -14
- package/dist/esm/_object-to-array-fa0feeff.js +0 -23
- package/dist/esm/asyncToGenerator-9c835201.js +0 -1387
- package/dist/esm/brightcove-react-player-loader.es-4abff0b1.js +0 -2226
- package/dist/esm/checkSisterSite-baa4fb6b.js +0 -17
- package/dist/esm/core.get-iterator-method-8c71f470.js +0 -547
- package/dist/esm/debounce-9207d8ee.js +0 -214
- package/dist/esm/define-property-a8a00786.js +0 -18
- package/dist/esm/entities-7cc3bf45.js +0 -503
- package/dist/esm/eq-b470f743.js +0 -76
- package/dist/esm/extends-7fbbe94e.js +0 -83
- package/dist/esm/get-1e515072.js +0 -918
- package/dist/esm/getContentCategory-15dcc413.js +0 -9
- package/dist/esm/getTargeting-eed01f73.js +0 -161
- package/dist/esm/iconBase-602d52fe.js +0 -81
- package/dist/esm/index-1819118a.js +0 -1655
- package/dist/esm/index-3a7c5bbe.js +0 -10504
- package/dist/esm/index-51a80699.js +0 -548
- package/dist/esm/index-6c12bdd5.js +0 -605
- package/dist/esm/index-c7e2ac95.js +0 -52
- package/dist/esm/index-db3bb315.js +0 -207
- package/dist/esm/index-fa2ffe86.js +0 -1570
- package/dist/esm/index.es-c6222053.js +0 -439
- package/dist/esm/index.esm-55f22b35.js +0 -14
- package/dist/esm/index.esm-9d701385.js +0 -90
- package/dist/esm/index.esm-c6715e80.js +0 -10
- package/dist/esm/index.esm-d1125763.js +0 -18
- package/dist/esm/inherits-d26c739e.js +0 -179
- package/dist/esm/isSymbol-1981418f.js +0 -203
- package/dist/esm/js.cookie-6874175c.js +0 -158
- package/dist/esm/keys-5e9bd229.js +0 -23
- package/dist/esm/lodash-ec8c6b48.js +0 -17145
- package/dist/esm/main-43ca42fe.js +0 -886
- package/dist/esm/md5-4e42248e.js +0 -321
- package/dist/esm/moment-b6f49411.js +0 -5667
- package/dist/esm/react-social-icons-3822f1ce.js +0 -609
- package/dist/esm/slicedToArray-99bcfd93.js +0 -92
- package/dist/esm/smoothscroll-0cd4c7a6.js +0 -436
- package/dist/esm/stringify-0c65d837.js +0 -15
- package/dist/esm/toConsumableArray-47a5394a.js +0 -71
- package/dist/esm/toNumber-2f7a84cd.js +0 -67
- package/dist/esm/typeof-d92ed6e0.js +0 -378
- package/dist/esm/urlForFile-0fc42ed8.js +0 -22
- package/dist/esm/ustream-api-cbba615a.js +0 -104
- package/dist/esm/util-7700fc59.js +0 -574
- package/dist/esm/visibility-sensor-f40c2564.js +0 -590
- package/dist/esm/web.dom.iterable-406140e0.js +0 -48
|
@@ -1,1664 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
|
|
4
|
-
var React = require('react');
|
|
5
|
-
var PropTypes = require('prop-types');
|
|
6
|
-
|
|
7
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
-
|
|
9
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
10
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
11
|
-
|
|
12
|
-
var domain;
|
|
13
|
-
|
|
14
|
-
// This constructor is used to store event handlers. Instantiating this is
|
|
15
|
-
// faster than explicitly calling `Object.create(null)` to get a "clean" empty
|
|
16
|
-
// object (tested with v8 v4.9).
|
|
17
|
-
function EventHandlers() {}
|
|
18
|
-
EventHandlers.prototype = Object.create(null);
|
|
19
|
-
|
|
20
|
-
function EventEmitter() {
|
|
21
|
-
EventEmitter.init.call(this);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// nodejs oddity
|
|
25
|
-
// require('events') === require('events').EventEmitter
|
|
26
|
-
EventEmitter.EventEmitter = EventEmitter;
|
|
27
|
-
|
|
28
|
-
EventEmitter.usingDomains = false;
|
|
29
|
-
|
|
30
|
-
EventEmitter.prototype.domain = undefined;
|
|
31
|
-
EventEmitter.prototype._events = undefined;
|
|
32
|
-
EventEmitter.prototype._maxListeners = undefined;
|
|
33
|
-
|
|
34
|
-
// By default EventEmitters will print a warning if more than 10 listeners are
|
|
35
|
-
// added to it. This is a useful default which helps finding memory leaks.
|
|
36
|
-
EventEmitter.defaultMaxListeners = 10;
|
|
37
|
-
|
|
38
|
-
EventEmitter.init = function() {
|
|
39
|
-
this.domain = null;
|
|
40
|
-
if (EventEmitter.usingDomains) {
|
|
41
|
-
// if there is an active domain, then attach to it.
|
|
42
|
-
if (domain.active ) ;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
if (!this._events || this._events === Object.getPrototypeOf(this)._events) {
|
|
46
|
-
this._events = new EventHandlers();
|
|
47
|
-
this._eventsCount = 0;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
this._maxListeners = this._maxListeners || undefined;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
// Obviously not all Emitters should be limited to 10. This function allows
|
|
54
|
-
// that to be increased. Set to zero for unlimited.
|
|
55
|
-
EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
|
|
56
|
-
if (typeof n !== 'number' || n < 0 || isNaN(n))
|
|
57
|
-
throw new TypeError('"n" argument must be a positive number');
|
|
58
|
-
this._maxListeners = n;
|
|
59
|
-
return this;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
function $getMaxListeners(that) {
|
|
63
|
-
if (that._maxListeners === undefined)
|
|
64
|
-
return EventEmitter.defaultMaxListeners;
|
|
65
|
-
return that._maxListeners;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
|
|
69
|
-
return $getMaxListeners(this);
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
// These standalone emit* functions are used to optimize calling of event
|
|
73
|
-
// handlers for fast cases because emit() itself often has a variable number of
|
|
74
|
-
// arguments and can be deoptimized because of that. These functions always have
|
|
75
|
-
// the same number of arguments and thus do not get deoptimized, so the code
|
|
76
|
-
// inside them can execute faster.
|
|
77
|
-
function emitNone(handler, isFn, self) {
|
|
78
|
-
if (isFn)
|
|
79
|
-
handler.call(self);
|
|
80
|
-
else {
|
|
81
|
-
var len = handler.length;
|
|
82
|
-
var listeners = arrayClone(handler, len);
|
|
83
|
-
for (var i = 0; i < len; ++i)
|
|
84
|
-
listeners[i].call(self);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
function emitOne(handler, isFn, self, arg1) {
|
|
88
|
-
if (isFn)
|
|
89
|
-
handler.call(self, arg1);
|
|
90
|
-
else {
|
|
91
|
-
var len = handler.length;
|
|
92
|
-
var listeners = arrayClone(handler, len);
|
|
93
|
-
for (var i = 0; i < len; ++i)
|
|
94
|
-
listeners[i].call(self, arg1);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
function emitTwo(handler, isFn, self, arg1, arg2) {
|
|
98
|
-
if (isFn)
|
|
99
|
-
handler.call(self, arg1, arg2);
|
|
100
|
-
else {
|
|
101
|
-
var len = handler.length;
|
|
102
|
-
var listeners = arrayClone(handler, len);
|
|
103
|
-
for (var i = 0; i < len; ++i)
|
|
104
|
-
listeners[i].call(self, arg1, arg2);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
function emitThree(handler, isFn, self, arg1, arg2, arg3) {
|
|
108
|
-
if (isFn)
|
|
109
|
-
handler.call(self, arg1, arg2, arg3);
|
|
110
|
-
else {
|
|
111
|
-
var len = handler.length;
|
|
112
|
-
var listeners = arrayClone(handler, len);
|
|
113
|
-
for (var i = 0; i < len; ++i)
|
|
114
|
-
listeners[i].call(self, arg1, arg2, arg3);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
function emitMany(handler, isFn, self, args) {
|
|
119
|
-
if (isFn)
|
|
120
|
-
handler.apply(self, args);
|
|
121
|
-
else {
|
|
122
|
-
var len = handler.length;
|
|
123
|
-
var listeners = arrayClone(handler, len);
|
|
124
|
-
for (var i = 0; i < len; ++i)
|
|
125
|
-
listeners[i].apply(self, args);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
EventEmitter.prototype.emit = function emit(type) {
|
|
130
|
-
var er, handler, len, args, i, events, domain;
|
|
131
|
-
var doError = (type === 'error');
|
|
132
|
-
|
|
133
|
-
events = this._events;
|
|
134
|
-
if (events)
|
|
135
|
-
doError = (doError && events.error == null);
|
|
136
|
-
else if (!doError)
|
|
137
|
-
return false;
|
|
138
|
-
|
|
139
|
-
domain = this.domain;
|
|
140
|
-
|
|
141
|
-
// If there is no 'error' event listener then throw.
|
|
142
|
-
if (doError) {
|
|
143
|
-
er = arguments[1];
|
|
144
|
-
if (domain) {
|
|
145
|
-
if (!er)
|
|
146
|
-
er = new Error('Uncaught, unspecified "error" event');
|
|
147
|
-
er.domainEmitter = this;
|
|
148
|
-
er.domain = domain;
|
|
149
|
-
er.domainThrown = false;
|
|
150
|
-
domain.emit('error', er);
|
|
151
|
-
} else if (er instanceof Error) {
|
|
152
|
-
throw er; // Unhandled 'error' event
|
|
153
|
-
} else {
|
|
154
|
-
// At least give some kind of context to the user
|
|
155
|
-
var err = new Error('Uncaught, unspecified "error" event. (' + er + ')');
|
|
156
|
-
err.context = er;
|
|
157
|
-
throw err;
|
|
158
|
-
}
|
|
159
|
-
return false;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
handler = events[type];
|
|
163
|
-
|
|
164
|
-
if (!handler)
|
|
165
|
-
return false;
|
|
166
|
-
|
|
167
|
-
var isFn = typeof handler === 'function';
|
|
168
|
-
len = arguments.length;
|
|
169
|
-
switch (len) {
|
|
170
|
-
// fast cases
|
|
171
|
-
case 1:
|
|
172
|
-
emitNone(handler, isFn, this);
|
|
173
|
-
break;
|
|
174
|
-
case 2:
|
|
175
|
-
emitOne(handler, isFn, this, arguments[1]);
|
|
176
|
-
break;
|
|
177
|
-
case 3:
|
|
178
|
-
emitTwo(handler, isFn, this, arguments[1], arguments[2]);
|
|
179
|
-
break;
|
|
180
|
-
case 4:
|
|
181
|
-
emitThree(handler, isFn, this, arguments[1], arguments[2], arguments[3]);
|
|
182
|
-
break;
|
|
183
|
-
// slower
|
|
184
|
-
default:
|
|
185
|
-
args = new Array(len - 1);
|
|
186
|
-
for (i = 1; i < len; i++)
|
|
187
|
-
args[i - 1] = arguments[i];
|
|
188
|
-
emitMany(handler, isFn, this, args);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
return true;
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
function _addListener(target, type, listener, prepend) {
|
|
195
|
-
var m;
|
|
196
|
-
var events;
|
|
197
|
-
var existing;
|
|
198
|
-
|
|
199
|
-
if (typeof listener !== 'function')
|
|
200
|
-
throw new TypeError('"listener" argument must be a function');
|
|
201
|
-
|
|
202
|
-
events = target._events;
|
|
203
|
-
if (!events) {
|
|
204
|
-
events = target._events = new EventHandlers();
|
|
205
|
-
target._eventsCount = 0;
|
|
206
|
-
} else {
|
|
207
|
-
// To avoid recursion in the case that type === "newListener"! Before
|
|
208
|
-
// adding it to the listeners, first emit "newListener".
|
|
209
|
-
if (events.newListener) {
|
|
210
|
-
target.emit('newListener', type,
|
|
211
|
-
listener.listener ? listener.listener : listener);
|
|
212
|
-
|
|
213
|
-
// Re-assign `events` because a newListener handler could have caused the
|
|
214
|
-
// this._events to be assigned to a new object
|
|
215
|
-
events = target._events;
|
|
216
|
-
}
|
|
217
|
-
existing = events[type];
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
if (!existing) {
|
|
221
|
-
// Optimize the case of one listener. Don't need the extra array object.
|
|
222
|
-
existing = events[type] = listener;
|
|
223
|
-
++target._eventsCount;
|
|
224
|
-
} else {
|
|
225
|
-
if (typeof existing === 'function') {
|
|
226
|
-
// Adding the second element, need to change to array.
|
|
227
|
-
existing = events[type] = prepend ? [listener, existing] :
|
|
228
|
-
[existing, listener];
|
|
229
|
-
} else {
|
|
230
|
-
// If we've already got an array, just append.
|
|
231
|
-
if (prepend) {
|
|
232
|
-
existing.unshift(listener);
|
|
233
|
-
} else {
|
|
234
|
-
existing.push(listener);
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
// Check for listener leak
|
|
239
|
-
if (!existing.warned) {
|
|
240
|
-
m = $getMaxListeners(target);
|
|
241
|
-
if (m && m > 0 && existing.length > m) {
|
|
242
|
-
existing.warned = true;
|
|
243
|
-
var w = new Error('Possible EventEmitter memory leak detected. ' +
|
|
244
|
-
existing.length + ' ' + type + ' listeners added. ' +
|
|
245
|
-
'Use emitter.setMaxListeners() to increase limit');
|
|
246
|
-
w.name = 'MaxListenersExceededWarning';
|
|
247
|
-
w.emitter = target;
|
|
248
|
-
w.type = type;
|
|
249
|
-
w.count = existing.length;
|
|
250
|
-
emitWarning(w);
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
return target;
|
|
256
|
-
}
|
|
257
|
-
function emitWarning(e) {
|
|
258
|
-
typeof console.warn === 'function' ? console.warn(e) : console.log(e);
|
|
259
|
-
}
|
|
260
|
-
EventEmitter.prototype.addListener = function addListener(type, listener) {
|
|
261
|
-
return _addListener(this, type, listener, false);
|
|
262
|
-
};
|
|
263
|
-
|
|
264
|
-
EventEmitter.prototype.on = EventEmitter.prototype.addListener;
|
|
265
|
-
|
|
266
|
-
EventEmitter.prototype.prependListener =
|
|
267
|
-
function prependListener(type, listener) {
|
|
268
|
-
return _addListener(this, type, listener, true);
|
|
269
|
-
};
|
|
270
|
-
|
|
271
|
-
function _onceWrap(target, type, listener) {
|
|
272
|
-
var fired = false;
|
|
273
|
-
function g() {
|
|
274
|
-
target.removeListener(type, g);
|
|
275
|
-
if (!fired) {
|
|
276
|
-
fired = true;
|
|
277
|
-
listener.apply(target, arguments);
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
g.listener = listener;
|
|
281
|
-
return g;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
EventEmitter.prototype.once = function once(type, listener) {
|
|
285
|
-
if (typeof listener !== 'function')
|
|
286
|
-
throw new TypeError('"listener" argument must be a function');
|
|
287
|
-
this.on(type, _onceWrap(this, type, listener));
|
|
288
|
-
return this;
|
|
289
|
-
};
|
|
290
|
-
|
|
291
|
-
EventEmitter.prototype.prependOnceListener =
|
|
292
|
-
function prependOnceListener(type, listener) {
|
|
293
|
-
if (typeof listener !== 'function')
|
|
294
|
-
throw new TypeError('"listener" argument must be a function');
|
|
295
|
-
this.prependListener(type, _onceWrap(this, type, listener));
|
|
296
|
-
return this;
|
|
297
|
-
};
|
|
298
|
-
|
|
299
|
-
// emits a 'removeListener' event iff the listener was removed
|
|
300
|
-
EventEmitter.prototype.removeListener =
|
|
301
|
-
function removeListener(type, listener) {
|
|
302
|
-
var list, events, position, i, originalListener;
|
|
303
|
-
|
|
304
|
-
if (typeof listener !== 'function')
|
|
305
|
-
throw new TypeError('"listener" argument must be a function');
|
|
306
|
-
|
|
307
|
-
events = this._events;
|
|
308
|
-
if (!events)
|
|
309
|
-
return this;
|
|
310
|
-
|
|
311
|
-
list = events[type];
|
|
312
|
-
if (!list)
|
|
313
|
-
return this;
|
|
314
|
-
|
|
315
|
-
if (list === listener || (list.listener && list.listener === listener)) {
|
|
316
|
-
if (--this._eventsCount === 0)
|
|
317
|
-
this._events = new EventHandlers();
|
|
318
|
-
else {
|
|
319
|
-
delete events[type];
|
|
320
|
-
if (events.removeListener)
|
|
321
|
-
this.emit('removeListener', type, list.listener || listener);
|
|
322
|
-
}
|
|
323
|
-
} else if (typeof list !== 'function') {
|
|
324
|
-
position = -1;
|
|
325
|
-
|
|
326
|
-
for (i = list.length; i-- > 0;) {
|
|
327
|
-
if (list[i] === listener ||
|
|
328
|
-
(list[i].listener && list[i].listener === listener)) {
|
|
329
|
-
originalListener = list[i].listener;
|
|
330
|
-
position = i;
|
|
331
|
-
break;
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
if (position < 0)
|
|
336
|
-
return this;
|
|
337
|
-
|
|
338
|
-
if (list.length === 1) {
|
|
339
|
-
list[0] = undefined;
|
|
340
|
-
if (--this._eventsCount === 0) {
|
|
341
|
-
this._events = new EventHandlers();
|
|
342
|
-
return this;
|
|
343
|
-
} else {
|
|
344
|
-
delete events[type];
|
|
345
|
-
}
|
|
346
|
-
} else {
|
|
347
|
-
spliceOne(list, position);
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
if (events.removeListener)
|
|
351
|
-
this.emit('removeListener', type, originalListener || listener);
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
return this;
|
|
355
|
-
};
|
|
356
|
-
|
|
357
|
-
EventEmitter.prototype.removeAllListeners =
|
|
358
|
-
function removeAllListeners(type) {
|
|
359
|
-
var listeners, events;
|
|
360
|
-
|
|
361
|
-
events = this._events;
|
|
362
|
-
if (!events)
|
|
363
|
-
return this;
|
|
364
|
-
|
|
365
|
-
// not listening for removeListener, no need to emit
|
|
366
|
-
if (!events.removeListener) {
|
|
367
|
-
if (arguments.length === 0) {
|
|
368
|
-
this._events = new EventHandlers();
|
|
369
|
-
this._eventsCount = 0;
|
|
370
|
-
} else if (events[type]) {
|
|
371
|
-
if (--this._eventsCount === 0)
|
|
372
|
-
this._events = new EventHandlers();
|
|
373
|
-
else
|
|
374
|
-
delete events[type];
|
|
375
|
-
}
|
|
376
|
-
return this;
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
// emit removeListener for all listeners on all events
|
|
380
|
-
if (arguments.length === 0) {
|
|
381
|
-
var keys = Object.keys(events);
|
|
382
|
-
for (var i = 0, key; i < keys.length; ++i) {
|
|
383
|
-
key = keys[i];
|
|
384
|
-
if (key === 'removeListener') continue;
|
|
385
|
-
this.removeAllListeners(key);
|
|
386
|
-
}
|
|
387
|
-
this.removeAllListeners('removeListener');
|
|
388
|
-
this._events = new EventHandlers();
|
|
389
|
-
this._eventsCount = 0;
|
|
390
|
-
return this;
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
listeners = events[type];
|
|
394
|
-
|
|
395
|
-
if (typeof listeners === 'function') {
|
|
396
|
-
this.removeListener(type, listeners);
|
|
397
|
-
} else if (listeners) {
|
|
398
|
-
// LIFO order
|
|
399
|
-
do {
|
|
400
|
-
this.removeListener(type, listeners[listeners.length - 1]);
|
|
401
|
-
} while (listeners[0]);
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
return this;
|
|
405
|
-
};
|
|
406
|
-
|
|
407
|
-
EventEmitter.prototype.listeners = function listeners(type) {
|
|
408
|
-
var evlistener;
|
|
409
|
-
var ret;
|
|
410
|
-
var events = this._events;
|
|
411
|
-
|
|
412
|
-
if (!events)
|
|
413
|
-
ret = [];
|
|
414
|
-
else {
|
|
415
|
-
evlistener = events[type];
|
|
416
|
-
if (!evlistener)
|
|
417
|
-
ret = [];
|
|
418
|
-
else if (typeof evlistener === 'function')
|
|
419
|
-
ret = [evlistener.listener || evlistener];
|
|
420
|
-
else
|
|
421
|
-
ret = unwrapListeners(evlistener);
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
return ret;
|
|
425
|
-
};
|
|
426
|
-
|
|
427
|
-
EventEmitter.listenerCount = function(emitter, type) {
|
|
428
|
-
if (typeof emitter.listenerCount === 'function') {
|
|
429
|
-
return emitter.listenerCount(type);
|
|
430
|
-
} else {
|
|
431
|
-
return listenerCount.call(emitter, type);
|
|
432
|
-
}
|
|
433
|
-
};
|
|
434
|
-
|
|
435
|
-
EventEmitter.prototype.listenerCount = listenerCount;
|
|
436
|
-
function listenerCount(type) {
|
|
437
|
-
var events = this._events;
|
|
438
|
-
|
|
439
|
-
if (events) {
|
|
440
|
-
var evlistener = events[type];
|
|
441
|
-
|
|
442
|
-
if (typeof evlistener === 'function') {
|
|
443
|
-
return 1;
|
|
444
|
-
} else if (evlistener) {
|
|
445
|
-
return evlistener.length;
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
return 0;
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
EventEmitter.prototype.eventNames = function eventNames() {
|
|
453
|
-
return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : [];
|
|
454
|
-
};
|
|
455
|
-
|
|
456
|
-
// About 1.5x faster than the two-arg version of Array#splice().
|
|
457
|
-
function spliceOne(list, index) {
|
|
458
|
-
for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1)
|
|
459
|
-
list[i] = list[k];
|
|
460
|
-
list.pop();
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
function arrayClone(arr, i) {
|
|
464
|
-
var copy = new Array(i);
|
|
465
|
-
while (i--)
|
|
466
|
-
copy[i] = arr[i];
|
|
467
|
-
return copy;
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
function unwrapListeners(arr) {
|
|
471
|
-
var ret = new Array(arr.length);
|
|
472
|
-
for (var i = 0; i < ret.length; ++i) {
|
|
473
|
-
ret[i] = arr[i].listener || arr[i];
|
|
474
|
-
}
|
|
475
|
-
return ret;
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
var utils = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
479
|
-
|
|
480
|
-
Object.defineProperty(exports, "__esModule", {
|
|
481
|
-
value: true
|
|
482
|
-
});
|
|
483
|
-
exports.loadGPTScript = loadGPTScript;
|
|
484
|
-
|
|
485
|
-
function doloadGPTScript(resolve, reject) {
|
|
486
|
-
window.googletag = window.googletag || {};
|
|
487
|
-
window.googletag.cmd = window.googletag.cmd || [];
|
|
488
|
-
var scriptTag = document.createElement('script');
|
|
489
|
-
scriptTag.src = "".concat(document.location.protocol, "//securepubads.g.doubleclick.net/tag/js/gpt.js");
|
|
490
|
-
scriptTag.async = true;
|
|
491
|
-
scriptTag.type = 'text/javascript';
|
|
492
|
-
|
|
493
|
-
scriptTag.onerror = function scriptTagOnError(errs) {
|
|
494
|
-
reject(errs);
|
|
495
|
-
};
|
|
496
|
-
|
|
497
|
-
scriptTag.onload = function scriptTagOnLoad() {
|
|
498
|
-
resolve(window.googletag);
|
|
499
|
-
};
|
|
500
|
-
|
|
501
|
-
document.getElementsByTagName('head')[0].appendChild(scriptTag);
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
function loadGPTScript() {
|
|
505
|
-
return new Promise(function (resolve, reject) {
|
|
506
|
-
doloadGPTScript(resolve, reject);
|
|
507
|
-
});
|
|
508
|
-
}
|
|
509
|
-
});
|
|
510
|
-
|
|
511
|
-
_commonjsHelpers.unwrapExports(utils);
|
|
512
|
-
var utils_1 = utils.loadGPTScript;
|
|
513
|
-
|
|
514
|
-
var manager = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
515
|
-
|
|
516
|
-
Object.defineProperty(exports, "__esModule", {
|
|
517
|
-
value: true
|
|
518
|
-
});
|
|
519
|
-
exports.default = void 0;
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
var Utils = _interopRequireWildcard(utils);
|
|
524
|
-
|
|
525
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
|
|
526
|
-
|
|
527
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
|
|
528
|
-
|
|
529
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
530
|
-
|
|
531
|
-
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
532
|
-
|
|
533
|
-
var loadPromise = null;
|
|
534
|
-
var googleGPTScriptLoadPromise = null;
|
|
535
|
-
var singleRequestEnabled = true;
|
|
536
|
-
var disableInitialLoadEnabled = false;
|
|
537
|
-
var lazyLoadEnabled = false;
|
|
538
|
-
var lazyLoadConfig = null;
|
|
539
|
-
var servePersonalizedAds = true;
|
|
540
|
-
var registeredSlots = {};
|
|
541
|
-
var managerAlreadyInitialized = false;
|
|
542
|
-
var globalTargetingArguments = {};
|
|
543
|
-
var globalAdSenseAttributes = {};
|
|
544
|
-
var DFPManager = Object.assign(new EventEmitter.EventEmitter().setMaxListeners(0), {
|
|
545
|
-
singleRequestIsEnabled: function singleRequestIsEnabled() {
|
|
546
|
-
return singleRequestEnabled;
|
|
547
|
-
},
|
|
548
|
-
configureSingleRequest: function configureSingleRequest(value) {
|
|
549
|
-
singleRequestEnabled = !!value;
|
|
550
|
-
},
|
|
551
|
-
disableInitialLoadIsEnabled: function disableInitialLoadIsEnabled() {
|
|
552
|
-
return disableInitialLoadEnabled;
|
|
553
|
-
},
|
|
554
|
-
configureDisableInitialLoad: function configureDisableInitialLoad(value) {
|
|
555
|
-
disableInitialLoadEnabled = !!value;
|
|
556
|
-
},
|
|
557
|
-
configureLazyLoad: function configureLazyLoad() {
|
|
558
|
-
var enable = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
559
|
-
var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
560
|
-
var conf = null;
|
|
561
|
-
|
|
562
|
-
if (config !== null && _typeof(config) === 'object') {
|
|
563
|
-
conf = _objectSpread({}, config);
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
lazyLoadEnabled = !!enable;
|
|
567
|
-
lazyLoadConfig = conf;
|
|
568
|
-
},
|
|
569
|
-
lazyLoadIsEnabled: function lazyLoadIsEnabled() {
|
|
570
|
-
return lazyLoadEnabled;
|
|
571
|
-
},
|
|
572
|
-
getLazyLoadConfig: function getLazyLoadConfig() {
|
|
573
|
-
return lazyLoadConfig;
|
|
574
|
-
},
|
|
575
|
-
getAdSenseAttribute: function getAdSenseAttribute(key) {
|
|
576
|
-
return globalAdSenseAttributes[key];
|
|
577
|
-
},
|
|
578
|
-
configurePersonalizedAds: function configurePersonalizedAds(value) {
|
|
579
|
-
servePersonalizedAds = value;
|
|
580
|
-
},
|
|
581
|
-
personalizedAdsEnabled: function personalizedAdsEnabled() {
|
|
582
|
-
return servePersonalizedAds;
|
|
583
|
-
},
|
|
584
|
-
setAdSenseAttribute: function setAdSenseAttribute(key, value) {
|
|
585
|
-
this.setAdSenseAttributes(_defineProperty({}, key, value));
|
|
586
|
-
},
|
|
587
|
-
getAdSenseAttributes: function getAdSenseAttributes() {
|
|
588
|
-
return _objectSpread({}, globalAdSenseAttributes);
|
|
589
|
-
},
|
|
590
|
-
setAdSenseAttributes: function setAdSenseAttributes(attrs) {
|
|
591
|
-
Object.assign(globalAdSenseAttributes, attrs);
|
|
592
|
-
|
|
593
|
-
if (managerAlreadyInitialized === true) {
|
|
594
|
-
this.getGoogletag().then(function (googletag) {
|
|
595
|
-
googletag.cmd.push(function () {
|
|
596
|
-
var pubadsService = googletag.pubads();
|
|
597
|
-
Object.keys(globalAdSenseAttributes).forEach(function (key) {
|
|
598
|
-
pubadsService.set(key, globalTargetingArguments[key]);
|
|
599
|
-
});
|
|
600
|
-
});
|
|
601
|
-
});
|
|
602
|
-
}
|
|
603
|
-
},
|
|
604
|
-
setTargetingArguments: function setTargetingArguments(data) {
|
|
605
|
-
Object.assign(globalTargetingArguments, data);
|
|
606
|
-
|
|
607
|
-
if (managerAlreadyInitialized === true) {
|
|
608
|
-
this.getGoogletag().then(function (googletag) {
|
|
609
|
-
googletag.cmd.push(function () {
|
|
610
|
-
var pubadsService = googletag.pubads();
|
|
611
|
-
Object.keys(globalTargetingArguments).forEach(function (varName) {
|
|
612
|
-
if (pubadsService) {
|
|
613
|
-
pubadsService.setTargeting(varName, globalTargetingArguments[varName]);
|
|
614
|
-
}
|
|
615
|
-
});
|
|
616
|
-
});
|
|
617
|
-
});
|
|
618
|
-
}
|
|
619
|
-
},
|
|
620
|
-
getTargetingArguments: function getTargetingArguments() {
|
|
621
|
-
return _objectSpread({}, globalTargetingArguments);
|
|
622
|
-
},
|
|
623
|
-
getSlotProperty: function getSlotProperty(slotId, propName) {
|
|
624
|
-
var slot = this.getRegisteredSlots()[slotId];
|
|
625
|
-
var ret = null;
|
|
626
|
-
|
|
627
|
-
if (slot !== undefined) {
|
|
628
|
-
ret = slot[propName] || ret;
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
return ret;
|
|
632
|
-
},
|
|
633
|
-
getSlotTargetingArguments: function getSlotTargetingArguments(slotId) {
|
|
634
|
-
var propValue = this.getSlotProperty(slotId, 'targetingArguments');
|
|
635
|
-
return propValue ? _objectSpread({}, propValue) : null;
|
|
636
|
-
},
|
|
637
|
-
getSlotAdSenseAttributes: function getSlotAdSenseAttributes(slotId) {
|
|
638
|
-
var propValue = this.getSlotProperty(slotId, 'adSenseAttributes');
|
|
639
|
-
return propValue ? _objectSpread({}, propValue) : null;
|
|
640
|
-
},
|
|
641
|
-
init: function init() {
|
|
642
|
-
var _this = this;
|
|
643
|
-
|
|
644
|
-
if (managerAlreadyInitialized === false) {
|
|
645
|
-
managerAlreadyInitialized = true;
|
|
646
|
-
this.getGoogletag().then(function (googletag) {
|
|
647
|
-
googletag.cmd.push(function () {
|
|
648
|
-
var pubadsService = googletag.pubads();
|
|
649
|
-
pubadsService.addEventListener('slotRenderEnded', function (event) {
|
|
650
|
-
var slotId = event.slot.getSlotElementId();
|
|
651
|
-
|
|
652
|
-
_this.emit('slotRenderEnded', {
|
|
653
|
-
slotId: slotId,
|
|
654
|
-
event: event
|
|
655
|
-
});
|
|
656
|
-
});
|
|
657
|
-
pubadsService.addEventListener('impressionViewable', function (event) {
|
|
658
|
-
var slotId = event.slot.getSlotElementId();
|
|
659
|
-
|
|
660
|
-
_this.emit('impressionViewable', {
|
|
661
|
-
slotId: slotId,
|
|
662
|
-
event: event
|
|
663
|
-
});
|
|
664
|
-
});
|
|
665
|
-
pubadsService.addEventListener('slotVisibilityChanged', function (event) {
|
|
666
|
-
var slotId = event.slot.getSlotElementId();
|
|
667
|
-
|
|
668
|
-
_this.emit('slotVisibilityChanged', {
|
|
669
|
-
slotId: slotId,
|
|
670
|
-
event: event
|
|
671
|
-
});
|
|
672
|
-
});
|
|
673
|
-
pubadsService.setRequestNonPersonalizedAds(_this.personalizedAdsEnabled() ? 0 : 1);
|
|
674
|
-
});
|
|
675
|
-
});
|
|
676
|
-
}
|
|
677
|
-
},
|
|
678
|
-
getGoogletag: function getGoogletag() {
|
|
679
|
-
if (googleGPTScriptLoadPromise === null) {
|
|
680
|
-
googleGPTScriptLoadPromise = Utils.loadGPTScript();
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
return googleGPTScriptLoadPromise;
|
|
684
|
-
},
|
|
685
|
-
setCollapseEmptyDivs: function setCollapseEmptyDivs(collapse) {
|
|
686
|
-
this.collapseEmptyDivs = collapse;
|
|
687
|
-
},
|
|
688
|
-
load: function load() {
|
|
689
|
-
var _this2 = this;
|
|
690
|
-
|
|
691
|
-
for (var _len = arguments.length, slots = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
692
|
-
slots[_key] = arguments[_key];
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
if (loadPromise === null) {
|
|
696
|
-
loadPromise = this.doLoad.apply(this, slots);
|
|
697
|
-
} else {
|
|
698
|
-
loadPromise = loadPromise.then(function () {
|
|
699
|
-
return _this2.doLoad.apply(_this2, slots);
|
|
700
|
-
});
|
|
701
|
-
}
|
|
702
|
-
},
|
|
703
|
-
doLoad: function doLoad() {
|
|
704
|
-
this.init();
|
|
705
|
-
var availableSlots = {};
|
|
706
|
-
|
|
707
|
-
for (var _len2 = arguments.length, slots = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
708
|
-
slots[_key2] = arguments[_key2];
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
if (slots.length > 0) {
|
|
712
|
-
availableSlots = slots.filter(function (slotId) {
|
|
713
|
-
return Object.prototype.hasOwnProperty.call(registeredSlots, slotId);
|
|
714
|
-
});
|
|
715
|
-
} else {
|
|
716
|
-
availableSlots = Object.keys(registeredSlots);
|
|
717
|
-
}
|
|
718
|
-
|
|
719
|
-
availableSlots = availableSlots.filter(function (id) {
|
|
720
|
-
return !registeredSlots[id].loading && !registeredSlots[id].gptSlot;
|
|
721
|
-
});
|
|
722
|
-
availableSlots.forEach(function (slotId) {
|
|
723
|
-
registeredSlots[slotId].loading = true;
|
|
724
|
-
});
|
|
725
|
-
return this.gptLoadAds(availableSlots);
|
|
726
|
-
},
|
|
727
|
-
gptLoadAds: function gptLoadAds(slotsToInitialize) {
|
|
728
|
-
var _this3 = this;
|
|
729
|
-
|
|
730
|
-
return new Promise(function (resolve) {
|
|
731
|
-
_this3.getGoogletag().then(function (googletag) {
|
|
732
|
-
_this3.configureInitialOptions(googletag);
|
|
733
|
-
|
|
734
|
-
slotsToInitialize.forEach(function (currentSlotId) {
|
|
735
|
-
registeredSlots[currentSlotId].loading = false;
|
|
736
|
-
googletag.cmd.push(function () {
|
|
737
|
-
var slot = registeredSlots[currentSlotId];
|
|
738
|
-
var gptSlot;
|
|
739
|
-
var adUnit = "".concat(slot.dfpNetworkId, "/").concat(slot.adUnit);
|
|
740
|
-
|
|
741
|
-
if (slot.renderOutOfThePage === true) {
|
|
742
|
-
gptSlot = googletag.defineOutOfPageSlot(adUnit, currentSlotId);
|
|
743
|
-
} else {
|
|
744
|
-
gptSlot = googletag.defineSlot(adUnit, slot.sizes, currentSlotId);
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
if (gptSlot !== null) {
|
|
748
|
-
slot.gptSlot = gptSlot;
|
|
749
|
-
|
|
750
|
-
var slotTargetingArguments = _this3.getSlotTargetingArguments(currentSlotId);
|
|
751
|
-
|
|
752
|
-
if (slotTargetingArguments !== null) {
|
|
753
|
-
Object.keys(slotTargetingArguments).forEach(function (varName) {
|
|
754
|
-
if (slot && slot.gptSlot) {
|
|
755
|
-
slot.gptSlot.setTargeting(varName, slotTargetingArguments[varName]);
|
|
756
|
-
}
|
|
757
|
-
});
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
var slotAdSenseAttributes = _this3.getSlotAdSenseAttributes(currentSlotId);
|
|
761
|
-
|
|
762
|
-
if (slotAdSenseAttributes !== null) {
|
|
763
|
-
Object.keys(slotAdSenseAttributes).forEach(function (varName) {
|
|
764
|
-
slot.gptSlot.set(varName, slotAdSenseAttributes[varName]);
|
|
765
|
-
});
|
|
766
|
-
}
|
|
767
|
-
|
|
768
|
-
slot.gptSlot.addService(googletag.pubads());
|
|
769
|
-
|
|
770
|
-
if (slot.sizeMapping) {
|
|
771
|
-
var smbuilder = googletag.sizeMapping();
|
|
772
|
-
slot.sizeMapping.forEach(function (mapping) {
|
|
773
|
-
smbuilder = smbuilder.addSize(mapping.viewport, mapping.sizes);
|
|
774
|
-
});
|
|
775
|
-
slot.gptSlot.defineSizeMapping(smbuilder.build());
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
});
|
|
779
|
-
});
|
|
780
|
-
|
|
781
|
-
_this3.configureOptions(googletag);
|
|
782
|
-
|
|
783
|
-
googletag.cmd.push(function () {
|
|
784
|
-
googletag.enableServices();
|
|
785
|
-
|
|
786
|
-
if (!_this3.disableInitialLoadIsEnabled()) {
|
|
787
|
-
slotsToInitialize.forEach(function (theSlotId) {
|
|
788
|
-
googletag.display(theSlotId);
|
|
789
|
-
});
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
resolve();
|
|
793
|
-
});
|
|
794
|
-
});
|
|
795
|
-
});
|
|
796
|
-
},
|
|
797
|
-
// configure those gpt parameters that need to be set before pubsads service
|
|
798
|
-
// initialization.
|
|
799
|
-
configureInitialOptions: function configureInitialOptions(googletag) {
|
|
800
|
-
var _this4 = this;
|
|
801
|
-
|
|
802
|
-
googletag.cmd.push(function () {
|
|
803
|
-
if (_this4.disableInitialLoadIsEnabled()) {
|
|
804
|
-
googletag.pubads().disableInitialLoad();
|
|
805
|
-
}
|
|
806
|
-
});
|
|
807
|
-
},
|
|
808
|
-
configureOptions: function configureOptions(googletag) {
|
|
809
|
-
var _this5 = this;
|
|
810
|
-
|
|
811
|
-
googletag.cmd.push(function () {
|
|
812
|
-
var pubadsService = googletag.pubads();
|
|
813
|
-
pubadsService.setRequestNonPersonalizedAds(_this5.personalizedAdsEnabled() ? 0 : 1);
|
|
814
|
-
|
|
815
|
-
var targetingArguments = _this5.getTargetingArguments(); // set global targetting arguments
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
Object.keys(targetingArguments).forEach(function (varName) {
|
|
819
|
-
if (pubadsService) {
|
|
820
|
-
pubadsService.setTargeting(varName, targetingArguments[varName]);
|
|
821
|
-
}
|
|
822
|
-
}); // set global adSense attributes
|
|
823
|
-
|
|
824
|
-
var adSenseAttributes = _this5.getAdSenseAttributes();
|
|
825
|
-
|
|
826
|
-
Object.keys(adSenseAttributes).forEach(function (key) {
|
|
827
|
-
pubadsService.set(key, adSenseAttributes[key]);
|
|
828
|
-
});
|
|
829
|
-
|
|
830
|
-
if (_this5.lazyLoadIsEnabled()) {
|
|
831
|
-
var config = _this5.getLazyLoadConfig();
|
|
832
|
-
|
|
833
|
-
if (config) {
|
|
834
|
-
pubadsService.enableLazyLoad(config);
|
|
835
|
-
} else {
|
|
836
|
-
pubadsService.enableLazyLoad();
|
|
837
|
-
}
|
|
838
|
-
}
|
|
839
|
-
|
|
840
|
-
if (_this5.singleRequestIsEnabled()) {
|
|
841
|
-
pubadsService.enableSingleRequest();
|
|
842
|
-
}
|
|
843
|
-
|
|
844
|
-
if (_this5.collapseEmptyDivs === true || _this5.collapseEmptyDivs === false) {
|
|
845
|
-
pubadsService.collapseEmptyDivs(_this5.collapseEmptyDivs);
|
|
846
|
-
}
|
|
847
|
-
});
|
|
848
|
-
},
|
|
849
|
-
getRefreshableSlots: function getRefreshableSlots() {
|
|
850
|
-
var slots = {};
|
|
851
|
-
|
|
852
|
-
for (var _len3 = arguments.length, slotsArray = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
853
|
-
slotsArray[_key3] = arguments[_key3];
|
|
854
|
-
}
|
|
855
|
-
|
|
856
|
-
if (slotsArray.length === 0) {
|
|
857
|
-
var slotsToRefresh = Object.keys(registeredSlots).map(function (k) {
|
|
858
|
-
return registeredSlots[k];
|
|
859
|
-
});
|
|
860
|
-
return slotsToRefresh.reduce(function (last, slot) {
|
|
861
|
-
if (slot.slotShouldRefresh() === true) {
|
|
862
|
-
slots[slot.slotId] = slot;
|
|
863
|
-
}
|
|
864
|
-
|
|
865
|
-
return slots;
|
|
866
|
-
}, slots);
|
|
867
|
-
}
|
|
868
|
-
|
|
869
|
-
return slotsArray.reduce(function (last, slotId) {
|
|
870
|
-
var slot = registeredSlots[slotId];
|
|
871
|
-
|
|
872
|
-
if (typeof slot !== 'undefined') {
|
|
873
|
-
slots[slotId] = slot;
|
|
874
|
-
}
|
|
875
|
-
|
|
876
|
-
return slots;
|
|
877
|
-
}, slots);
|
|
878
|
-
},
|
|
879
|
-
refresh: function refresh() {
|
|
880
|
-
if (loadPromise === null) {
|
|
881
|
-
this.load();
|
|
882
|
-
} else {
|
|
883
|
-
this.gptRefreshAds(Object.keys(this.getRefreshableSlots.apply(this, arguments)));
|
|
884
|
-
}
|
|
885
|
-
},
|
|
886
|
-
gptRefreshAds: function gptRefreshAds(slots) {
|
|
887
|
-
var _this6 = this;
|
|
888
|
-
|
|
889
|
-
return this.getGoogletag().then(function (googletag) {
|
|
890
|
-
_this6.configureOptions(googletag);
|
|
891
|
-
|
|
892
|
-
googletag.cmd.push(function () {
|
|
893
|
-
var pubadsService = googletag.pubads();
|
|
894
|
-
pubadsService.refresh(slots.map(function (slotId) {
|
|
895
|
-
return registeredSlots[slotId].gptSlot;
|
|
896
|
-
}));
|
|
897
|
-
});
|
|
898
|
-
});
|
|
899
|
-
},
|
|
900
|
-
reload: function reload() {
|
|
901
|
-
var _this7 = this;
|
|
902
|
-
|
|
903
|
-
return this.destroyGPTSlots.apply(this, arguments).then(function () {
|
|
904
|
-
return _this7.load();
|
|
905
|
-
});
|
|
906
|
-
},
|
|
907
|
-
destroyGPTSlots: function destroyGPTSlots() {
|
|
908
|
-
var _this8 = this;
|
|
909
|
-
|
|
910
|
-
for (var _len4 = arguments.length, slotsToDestroy = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
911
|
-
slotsToDestroy[_key4] = arguments[_key4];
|
|
912
|
-
}
|
|
913
|
-
|
|
914
|
-
if (slotsToDestroy.length === 0) {
|
|
915
|
-
// eslint-disable-next-line no-param-reassign
|
|
916
|
-
slotsToDestroy = Object.keys(registeredSlots);
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
return new Promise(function (resolve) {
|
|
920
|
-
var slots = []; // eslint-disable-next-line guard-for-in,no-restricted-syntax
|
|
921
|
-
|
|
922
|
-
for (var idx in slotsToDestroy) {
|
|
923
|
-
var slotId = slotsToDestroy[idx];
|
|
924
|
-
var slot = registeredSlots[slotId];
|
|
925
|
-
slots.push(slot);
|
|
926
|
-
}
|
|
927
|
-
|
|
928
|
-
_this8.getGoogletag().then(function (googletag) {
|
|
929
|
-
googletag.cmd.push(function () {
|
|
930
|
-
if (managerAlreadyInitialized === true) {
|
|
931
|
-
if (slotsToDestroy.length > 0) {
|
|
932
|
-
// eslint-disable-next-line guard-for-in,no-restricted-syntax
|
|
933
|
-
for (var _idx in slots) {
|
|
934
|
-
var _slot = slots[_idx];
|
|
935
|
-
slots.push(_slot.gptSlot);
|
|
936
|
-
delete _slot.gptSlot;
|
|
937
|
-
}
|
|
938
|
-
|
|
939
|
-
googletag.destroySlots(slots);
|
|
940
|
-
} else {
|
|
941
|
-
googletag.destroySlots();
|
|
942
|
-
}
|
|
943
|
-
}
|
|
944
|
-
|
|
945
|
-
resolve(slotsToDestroy);
|
|
946
|
-
});
|
|
947
|
-
});
|
|
948
|
-
});
|
|
949
|
-
},
|
|
950
|
-
registerSlot: function registerSlot(_ref) {
|
|
951
|
-
var _this9 = this;
|
|
952
|
-
|
|
953
|
-
var slotId = _ref.slotId,
|
|
954
|
-
dfpNetworkId = _ref.dfpNetworkId,
|
|
955
|
-
adUnit = _ref.adUnit,
|
|
956
|
-
sizes = _ref.sizes,
|
|
957
|
-
renderOutOfThePage = _ref.renderOutOfThePage,
|
|
958
|
-
sizeMapping = _ref.sizeMapping,
|
|
959
|
-
adSenseAttributes = _ref.adSenseAttributes,
|
|
960
|
-
targetingArguments = _ref.targetingArguments,
|
|
961
|
-
slotShouldRefresh = _ref.slotShouldRefresh;
|
|
962
|
-
var autoLoad = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
963
|
-
|
|
964
|
-
if (!Object.prototype.hasOwnProperty.call(registeredSlots, slotId)) {
|
|
965
|
-
registeredSlots[slotId] = {
|
|
966
|
-
slotId: slotId,
|
|
967
|
-
sizes: sizes,
|
|
968
|
-
renderOutOfThePage: renderOutOfThePage,
|
|
969
|
-
dfpNetworkId: dfpNetworkId,
|
|
970
|
-
adUnit: adUnit,
|
|
971
|
-
adSenseAttributes: adSenseAttributes,
|
|
972
|
-
targetingArguments: targetingArguments,
|
|
973
|
-
sizeMapping: sizeMapping,
|
|
974
|
-
slotShouldRefresh: slotShouldRefresh,
|
|
975
|
-
loading: false
|
|
976
|
-
};
|
|
977
|
-
this.emit('slotRegistered', {
|
|
978
|
-
slotId: slotId
|
|
979
|
-
});
|
|
980
|
-
|
|
981
|
-
if (autoLoad === true && loadPromise !== null) {
|
|
982
|
-
loadPromise = loadPromise.catch().then(function () {
|
|
983
|
-
var slot = registeredSlots[slotId];
|
|
984
|
-
|
|
985
|
-
if (typeof slot !== 'undefined') {
|
|
986
|
-
var loading = slot.loading,
|
|
987
|
-
gptSlot = slot.gptSlot;
|
|
988
|
-
|
|
989
|
-
if (loading === false && !gptSlot) {
|
|
990
|
-
_this9.load(slotId);
|
|
991
|
-
}
|
|
992
|
-
}
|
|
993
|
-
});
|
|
994
|
-
}
|
|
995
|
-
}
|
|
996
|
-
},
|
|
997
|
-
unregisterSlot: function unregisterSlot(_ref2) {
|
|
998
|
-
var slotId = _ref2.slotId;
|
|
999
|
-
this.destroyGPTSlots(slotId);
|
|
1000
|
-
delete registeredSlots[slotId];
|
|
1001
|
-
},
|
|
1002
|
-
getRegisteredSlots: function getRegisteredSlots() {
|
|
1003
|
-
return registeredSlots;
|
|
1004
|
-
},
|
|
1005
|
-
attachSlotRenderEnded: function attachSlotRenderEnded(cb) {
|
|
1006
|
-
this.on('slotRenderEnded', cb);
|
|
1007
|
-
},
|
|
1008
|
-
detachSlotRenderEnded: function detachSlotRenderEnded(cb) {
|
|
1009
|
-
this.removeListener('slotRenderEnded', cb);
|
|
1010
|
-
},
|
|
1011
|
-
attachSlotVisibilityChanged: function attachSlotVisibilityChanged(cb) {
|
|
1012
|
-
this.on('slotVisibilityChanged', cb);
|
|
1013
|
-
},
|
|
1014
|
-
detachSlotVisibilityChanged: function detachSlotVisibilityChanged(cb) {
|
|
1015
|
-
this.removeListener('slotVisibilityChanged', cb);
|
|
1016
|
-
},
|
|
1017
|
-
attachSlotIsViewable: function attachSlotIsViewable(cb) {
|
|
1018
|
-
this.on('impressionViewable', cb);
|
|
1019
|
-
},
|
|
1020
|
-
detachSlotIsViewable: function detachSlotIsViewable(cb) {
|
|
1021
|
-
this.removeListener('impressionViewable', cb);
|
|
1022
|
-
}
|
|
1023
|
-
});
|
|
1024
|
-
var _default = DFPManager;
|
|
1025
|
-
exports.default = _default;
|
|
1026
|
-
});
|
|
1027
|
-
|
|
1028
|
-
_commonjsHelpers.unwrapExports(manager);
|
|
1029
|
-
|
|
1030
|
-
var dfpslotsprovider = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
1031
|
-
|
|
1032
|
-
Object.defineProperty(exports, "__esModule", {
|
|
1033
|
-
value: true
|
|
1034
|
-
});
|
|
1035
|
-
exports.default = exports.Context = void 0;
|
|
1036
|
-
|
|
1037
|
-
var _react = _interopRequireDefault(React__default['default']);
|
|
1038
|
-
|
|
1039
|
-
var _propTypes = _interopRequireDefault(PropTypes__default['default']);
|
|
1040
|
-
|
|
1041
|
-
var _manager = _interopRequireDefault(manager);
|
|
1042
|
-
|
|
1043
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1044
|
-
|
|
1045
|
-
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
1046
|
-
|
|
1047
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1048
|
-
|
|
1049
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
1050
|
-
|
|
1051
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
1052
|
-
|
|
1053
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
1054
|
-
|
|
1055
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
1056
|
-
|
|
1057
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
1058
|
-
|
|
1059
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
1060
|
-
|
|
1061
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
1062
|
-
|
|
1063
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
1064
|
-
|
|
1065
|
-
// React.createContext is undefined for React < 16.3
|
|
1066
|
-
var Context = _react.default.createContext ? _react.default.createContext({
|
|
1067
|
-
dfpNetworkId: null,
|
|
1068
|
-
dfpAdUnit: null,
|
|
1069
|
-
dfpSizeMapping: null,
|
|
1070
|
-
dfpTargetingArguments: null,
|
|
1071
|
-
newSlotCallback: null
|
|
1072
|
-
}) : null;
|
|
1073
|
-
exports.Context = Context;
|
|
1074
|
-
|
|
1075
|
-
var DFPSlotsProvider =
|
|
1076
|
-
/*#__PURE__*/
|
|
1077
|
-
function (_React$Component) {
|
|
1078
|
-
_inherits(DFPSlotsProvider, _React$Component);
|
|
1079
|
-
|
|
1080
|
-
function DFPSlotsProvider(props) {
|
|
1081
|
-
var _this;
|
|
1082
|
-
|
|
1083
|
-
_classCallCheck(this, DFPSlotsProvider);
|
|
1084
|
-
|
|
1085
|
-
_this = _possibleConstructorReturn(this, _getPrototypeOf(DFPSlotsProvider).call(this, props));
|
|
1086
|
-
_this.loadAdsIfPossible = _this.loadAdsIfPossible.bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
|
1087
|
-
_this.newSlotCallback = _this.newSlotCallback.bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
|
1088
|
-
_this.applyConfigs = _this.applyConfigs.bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
|
1089
|
-
_this.shouldReloadConfig = _this.shouldReloadConfig.bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
|
1090
|
-
_this.attachLoadCallback = _this.attachLoadCallback.bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
|
1091
|
-
_this.getContextValue = _this.getContextValue.bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
|
1092
|
-
_this.loadAlreadyCalled = false;
|
|
1093
|
-
_this.loadCallbackAttached = false;
|
|
1094
|
-
_this.shouldReloadAds = false;
|
|
1095
|
-
_this.totalSlots = 0;
|
|
1096
|
-
_this.contextValue = {};
|
|
1097
|
-
|
|
1098
|
-
if (Context === null) {
|
|
1099
|
-
_this.getChildContext = function () {
|
|
1100
|
-
return _this.getContextValue();
|
|
1101
|
-
};
|
|
1102
|
-
}
|
|
1103
|
-
|
|
1104
|
-
return _this;
|
|
1105
|
-
}
|
|
1106
|
-
|
|
1107
|
-
_createClass(DFPSlotsProvider, [{
|
|
1108
|
-
key: "componentDidMount",
|
|
1109
|
-
value: function componentDidMount() {
|
|
1110
|
-
this.applyConfigs();
|
|
1111
|
-
|
|
1112
|
-
if (this.props.autoLoad && !this.loadAdsIfPossible()) {
|
|
1113
|
-
this.attachLoadCallback();
|
|
1114
|
-
}
|
|
1115
|
-
}
|
|
1116
|
-
}, {
|
|
1117
|
-
key: "shouldComponentUpdate",
|
|
1118
|
-
value: function shouldComponentUpdate(nextProps) {
|
|
1119
|
-
this.shouldReloadAds = this.shouldReloadConfig(nextProps);
|
|
1120
|
-
|
|
1121
|
-
if (nextProps.children !== this.props.children) {
|
|
1122
|
-
return true;
|
|
1123
|
-
}
|
|
1124
|
-
|
|
1125
|
-
if (nextProps.autoLoad && !this.props.autoLoad) {
|
|
1126
|
-
return true;
|
|
1127
|
-
}
|
|
1128
|
-
|
|
1129
|
-
return this.shouldReloadAds;
|
|
1130
|
-
}
|
|
1131
|
-
}, {
|
|
1132
|
-
key: "componentDidUpdate",
|
|
1133
|
-
value: function componentDidUpdate() {
|
|
1134
|
-
this.applyConfigs();
|
|
1135
|
-
|
|
1136
|
-
if (this.props.autoLoad) {
|
|
1137
|
-
if (this.loadAlreadyCalled) {
|
|
1138
|
-
if (this.shouldReloadAds) {
|
|
1139
|
-
_manager.default.reload();
|
|
1140
|
-
}
|
|
1141
|
-
} else if (!this.loadAdsIfPossible()) {
|
|
1142
|
-
this.attachLoadCallback();
|
|
1143
|
-
}
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1146
|
-
this.shouldReloadAds = false;
|
|
1147
|
-
}
|
|
1148
|
-
}, {
|
|
1149
|
-
key: "getContextValue",
|
|
1150
|
-
value: function getContextValue() {
|
|
1151
|
-
var _this$props = this.props,
|
|
1152
|
-
dfpNetworkId = _this$props.dfpNetworkId,
|
|
1153
|
-
dfpAdUnit = _this$props.adUnit,
|
|
1154
|
-
dfpSizeMapping = _this$props.sizeMapping,
|
|
1155
|
-
dfpTargetingArguments = _this$props.targetingArguments,
|
|
1156
|
-
_this$contextValue = this.contextValue,
|
|
1157
|
-
ctxDfpNetworkId = _this$contextValue.dfpNetworkId,
|
|
1158
|
-
ctxDfpAdUnit = _this$contextValue.adUnit,
|
|
1159
|
-
ctxDfpSizeMapping = _this$contextValue.sizeMapping,
|
|
1160
|
-
ctxDfpTargetingArguments = _this$contextValue.targetingArguments; // performance: update context value object only when any of its
|
|
1161
|
-
// props is updated.
|
|
1162
|
-
|
|
1163
|
-
if (dfpNetworkId !== ctxDfpNetworkId || dfpAdUnit !== ctxDfpAdUnit || dfpSizeMapping !== ctxDfpSizeMapping || dfpTargetingArguments !== ctxDfpTargetingArguments) {
|
|
1164
|
-
this.contextValue = {
|
|
1165
|
-
dfpNetworkId: dfpNetworkId,
|
|
1166
|
-
dfpAdUnit: dfpAdUnit,
|
|
1167
|
-
dfpSizeMapping: dfpSizeMapping,
|
|
1168
|
-
dfpTargetingArguments: dfpTargetingArguments,
|
|
1169
|
-
newSlotCallback: this.newSlotCallback
|
|
1170
|
-
};
|
|
1171
|
-
}
|
|
1172
|
-
|
|
1173
|
-
return this.contextValue;
|
|
1174
|
-
}
|
|
1175
|
-
}, {
|
|
1176
|
-
key: "applyConfigs",
|
|
1177
|
-
value: function applyConfigs() {
|
|
1178
|
-
_manager.default.configurePersonalizedAds(this.props.personalizedAds);
|
|
1179
|
-
|
|
1180
|
-
_manager.default.configureSingleRequest(this.props.singleRequest);
|
|
1181
|
-
|
|
1182
|
-
_manager.default.configureDisableInitialLoad(this.props.disableInitialLoad);
|
|
1183
|
-
|
|
1184
|
-
_manager.default.configureLazyLoad(!!this.props.lazyLoad, typeof this.props.lazyLoad === 'boolean' ? null : this.props.lazyLoad);
|
|
1185
|
-
|
|
1186
|
-
_manager.default.setAdSenseAttributes(this.props.adSenseAttributes);
|
|
1187
|
-
|
|
1188
|
-
_manager.default.setCollapseEmptyDivs(this.props.collapseEmptyDivs);
|
|
1189
|
-
}
|
|
1190
|
-
}, {
|
|
1191
|
-
key: "attachLoadCallback",
|
|
1192
|
-
value: function attachLoadCallback() {
|
|
1193
|
-
if (this.loadCallbackAttached === false) {
|
|
1194
|
-
_manager.default.on('slotRegistered', this.loadAdsIfPossible);
|
|
1195
|
-
|
|
1196
|
-
this.loadCallbackAttached = true;
|
|
1197
|
-
return true;
|
|
1198
|
-
}
|
|
1199
|
-
|
|
1200
|
-
return false;
|
|
1201
|
-
} // pretty strait-forward interface that children ad slots use to register
|
|
1202
|
-
// with their DFPSlotProvider parent node.
|
|
1203
|
-
|
|
1204
|
-
}, {
|
|
1205
|
-
key: "newSlotCallback",
|
|
1206
|
-
value: function newSlotCallback() {
|
|
1207
|
-
this.totalSlots++;
|
|
1208
|
-
} // Checks all the mounted children ads have been already registered
|
|
1209
|
-
// in the DFPManager before trying to call the gpt load scripts.
|
|
1210
|
-
// This is helpful when trying to fetch ads with a single request.
|
|
1211
|
-
|
|
1212
|
-
}, {
|
|
1213
|
-
key: "loadAdsIfPossible",
|
|
1214
|
-
value: function loadAdsIfPossible() {
|
|
1215
|
-
var r = false;
|
|
1216
|
-
|
|
1217
|
-
if (Object.keys(_manager.default.getRegisteredSlots()).length >= this.totalSlots) {
|
|
1218
|
-
_manager.default.removeListener('slotRegistered', this.loadAdsIfPossible);
|
|
1219
|
-
|
|
1220
|
-
_manager.default.load();
|
|
1221
|
-
|
|
1222
|
-
this.loadAlreadyCalled = true;
|
|
1223
|
-
this.loadCallbackAttached = false;
|
|
1224
|
-
r = true;
|
|
1225
|
-
}
|
|
1226
|
-
|
|
1227
|
-
return r;
|
|
1228
|
-
}
|
|
1229
|
-
}, {
|
|
1230
|
-
key: "shouldReloadConfig",
|
|
1231
|
-
value: function shouldReloadConfig(nextProps) {
|
|
1232
|
-
var reloadConfig = nextProps.autoReload || this.props.autoReload;
|
|
1233
|
-
|
|
1234
|
-
if (this.props.autoLoad || nextProps.autoLoad) {
|
|
1235
|
-
if (_typeof(reloadConfig) === 'object') {
|
|
1236
|
-
var attrs = Object.keys(reloadConfig); // eslint-disable-next-line guard-for-in, no-restricted-syntax
|
|
1237
|
-
|
|
1238
|
-
for (var i in attrs) {
|
|
1239
|
-
var propName = attrs[i]; // eslint-disable-next-line
|
|
1240
|
-
|
|
1241
|
-
if (reloadConfig[propName] === true && this.props[propName] !== nextProps[propName]) {
|
|
1242
|
-
return true;
|
|
1243
|
-
}
|
|
1244
|
-
}
|
|
1245
|
-
}
|
|
1246
|
-
}
|
|
1247
|
-
|
|
1248
|
-
return false;
|
|
1249
|
-
}
|
|
1250
|
-
}, {
|
|
1251
|
-
key: "render",
|
|
1252
|
-
value: function render() {
|
|
1253
|
-
var children = this.props.children;
|
|
1254
|
-
|
|
1255
|
-
if (Context === null) {
|
|
1256
|
-
return children;
|
|
1257
|
-
}
|
|
1258
|
-
|
|
1259
|
-
return _react.default.createElement(Context.Provider, {
|
|
1260
|
-
value: this.getContextValue()
|
|
1261
|
-
}, children);
|
|
1262
|
-
}
|
|
1263
|
-
}]);
|
|
1264
|
-
|
|
1265
|
-
return DFPSlotsProvider;
|
|
1266
|
-
}(_react.default.Component);
|
|
1267
|
-
|
|
1268
|
-
exports.default = DFPSlotsProvider;
|
|
1269
|
-
|
|
1270
|
-
_defineProperty(DFPSlotsProvider, "propTypes", {
|
|
1271
|
-
children: _propTypes.default.oneOfType([_propTypes.default.element, _propTypes.default.array]).isRequired,
|
|
1272
|
-
autoLoad: _propTypes.default.bool,
|
|
1273
|
-
autoReload: _propTypes.default.shape({
|
|
1274
|
-
dfpNetworkId: _propTypes.default.bool,
|
|
1275
|
-
personalizedAds: _propTypes.default.bool,
|
|
1276
|
-
singleRequest: _propTypes.default.bool,
|
|
1277
|
-
disableInitialLoad: _propTypes.default.bool,
|
|
1278
|
-
adUnit: _propTypes.default.bool,
|
|
1279
|
-
sizeMapping: _propTypes.default.bool,
|
|
1280
|
-
adSenseAttributes: _propTypes.default.bool,
|
|
1281
|
-
targetingArguments: _propTypes.default.bool,
|
|
1282
|
-
collapseEmptyDivs: _propTypes.default.bool,
|
|
1283
|
-
lazyLoad: _propTypes.default.bool
|
|
1284
|
-
}),
|
|
1285
|
-
dfpNetworkId: _propTypes.default.string.isRequired,
|
|
1286
|
-
personalizedAds: _propTypes.default.bool,
|
|
1287
|
-
singleRequest: _propTypes.default.bool,
|
|
1288
|
-
disableInitialLoad: _propTypes.default.bool,
|
|
1289
|
-
adUnit: _propTypes.default.string,
|
|
1290
|
-
sizeMapping: _propTypes.default.arrayOf(_propTypes.default.object),
|
|
1291
|
-
adSenseAttributes: _propTypes.default.object,
|
|
1292
|
-
targetingArguments: _propTypes.default.object,
|
|
1293
|
-
collapseEmptyDivs: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.object]),
|
|
1294
|
-
adSenseAttrs: _propTypes.default.object,
|
|
1295
|
-
lazyLoad: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.shape({
|
|
1296
|
-
fetchMarginPercent: _propTypes.default.number,
|
|
1297
|
-
renderMarginPercent: _propTypes.default.number,
|
|
1298
|
-
mobileScaling: _propTypes.default.number
|
|
1299
|
-
})])
|
|
1300
|
-
});
|
|
1301
|
-
|
|
1302
|
-
_defineProperty(DFPSlotsProvider, "defaultProps", {
|
|
1303
|
-
autoLoad: true,
|
|
1304
|
-
autoReload: {
|
|
1305
|
-
dfpNetworkId: false,
|
|
1306
|
-
personalizedAds: false,
|
|
1307
|
-
singleRequest: false,
|
|
1308
|
-
disableInitialLoad: false,
|
|
1309
|
-
adUnit: false,
|
|
1310
|
-
sizeMapping: false,
|
|
1311
|
-
adSenseAttributes: false,
|
|
1312
|
-
targetingArguments: false,
|
|
1313
|
-
collapseEmptyDivs: false,
|
|
1314
|
-
lazyLoad: false
|
|
1315
|
-
},
|
|
1316
|
-
personalizedAds: true,
|
|
1317
|
-
singleRequest: true,
|
|
1318
|
-
disableInitialLoad: false,
|
|
1319
|
-
collapseEmptyDivs: null,
|
|
1320
|
-
lazyLoad: false
|
|
1321
|
-
});
|
|
1322
|
-
|
|
1323
|
-
if (Context === null) {
|
|
1324
|
-
// React < 16.3
|
|
1325
|
-
DFPSlotsProvider.childContextTypes = {
|
|
1326
|
-
dfpNetworkId: _propTypes.default.string,
|
|
1327
|
-
dfpAdUnit: _propTypes.default.string,
|
|
1328
|
-
dfpSizeMapping: _propTypes.default.arrayOf(_propTypes.default.object),
|
|
1329
|
-
dfpTargetingArguments: _propTypes.default.object,
|
|
1330
|
-
newSlotCallback: _propTypes.default.func
|
|
1331
|
-
};
|
|
1332
|
-
}
|
|
1333
|
-
});
|
|
1334
|
-
|
|
1335
|
-
_commonjsHelpers.unwrapExports(dfpslotsprovider);
|
|
1336
|
-
var dfpslotsprovider_1 = dfpslotsprovider.Context;
|
|
1337
|
-
|
|
1338
|
-
var adslot = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
1339
|
-
|
|
1340
|
-
Object.defineProperty(exports, "__esModule", {
|
|
1341
|
-
value: true
|
|
1342
|
-
});
|
|
1343
|
-
exports.default = exports.AdSlot = void 0;
|
|
1344
|
-
|
|
1345
|
-
var _react = _interopRequireDefault(React__default['default']);
|
|
1346
|
-
|
|
1347
|
-
var _propTypes = _interopRequireDefault(PropTypes__default['default']);
|
|
1348
|
-
|
|
1349
|
-
var _manager = _interopRequireDefault(manager);
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1354
|
-
|
|
1355
|
-
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
1356
|
-
|
|
1357
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
1358
|
-
|
|
1359
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
|
|
1360
|
-
|
|
1361
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1362
|
-
|
|
1363
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
1364
|
-
|
|
1365
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
1366
|
-
|
|
1367
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
1368
|
-
|
|
1369
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
1370
|
-
|
|
1371
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
1372
|
-
|
|
1373
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
1374
|
-
|
|
1375
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
1376
|
-
|
|
1377
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
1378
|
-
|
|
1379
|
-
var dynamicAdCount = 0;
|
|
1380
|
-
|
|
1381
|
-
var AdSlot =
|
|
1382
|
-
/*#__PURE__*/
|
|
1383
|
-
function (_React$Component) {
|
|
1384
|
-
_inherits(AdSlot, _React$Component);
|
|
1385
|
-
|
|
1386
|
-
function AdSlot(props) {
|
|
1387
|
-
var _this;
|
|
1388
|
-
|
|
1389
|
-
_classCallCheck(this, AdSlot);
|
|
1390
|
-
|
|
1391
|
-
_this = _possibleConstructorReturn(this, _getPrototypeOf(AdSlot).call(this, props));
|
|
1392
|
-
_this.doRegisterSlot = _this.doRegisterSlot.bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
|
1393
|
-
_this.generateSlotId = _this.generateSlotId.bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
|
1394
|
-
_this.getSlotId = _this.getSlotId.bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
|
1395
|
-
_this.mapContextToAdSlotProps = _this.mapContextToAdSlotProps.bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
|
1396
|
-
_this.slotShouldRefresh = _this.slotShouldRefresh.bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
|
1397
|
-
_this.slotRenderEnded = _this.slotRenderEnded.bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
|
1398
|
-
_this.slotRegisterCallback = _this.slotRegisterCallback.bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
|
1399
|
-
_this.slotIsViewable = _this.slotIsViewable.bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
|
1400
|
-
_this.slotVisibilityChanged = _this.slotVisibilityChanged.bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
|
1401
|
-
_this.getClasses = _this.getClasses.bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
|
1402
|
-
_this.state = {
|
|
1403
|
-
slotId: _this.props.slotId || null,
|
|
1404
|
-
className: _this.props.className || ''
|
|
1405
|
-
};
|
|
1406
|
-
_this.adElementRef = _react.default.createRef ? _react.default.createRef() : function (element) {
|
|
1407
|
-
_this.adElementRef = element;
|
|
1408
|
-
};
|
|
1409
|
-
return _this;
|
|
1410
|
-
}
|
|
1411
|
-
|
|
1412
|
-
_createClass(AdSlot, [{
|
|
1413
|
-
key: "componentDidMount",
|
|
1414
|
-
value: function componentDidMount() {
|
|
1415
|
-
// register this ad-unit in the <DFPSlotProvider>, when available.
|
|
1416
|
-
if (this.context !== undefined && this.context.newSlotCallback) {
|
|
1417
|
-
this.context.newSlotCallback();
|
|
1418
|
-
}
|
|
1419
|
-
|
|
1420
|
-
this.registerSlot();
|
|
1421
|
-
}
|
|
1422
|
-
}, {
|
|
1423
|
-
key: "componentWillUnmount",
|
|
1424
|
-
value: function componentWillUnmount() {
|
|
1425
|
-
this.unregisterSlot();
|
|
1426
|
-
}
|
|
1427
|
-
}, {
|
|
1428
|
-
key: "getSlotId",
|
|
1429
|
-
value: function getSlotId() {
|
|
1430
|
-
return this.props.slotId || this.state.slotId;
|
|
1431
|
-
}
|
|
1432
|
-
}, {
|
|
1433
|
-
key: "getClasses",
|
|
1434
|
-
value: function getClasses() {
|
|
1435
|
-
var baseClass = 'adunitContainer';
|
|
1436
|
-
var extraClasses = this.state.className.split(' ');
|
|
1437
|
-
extraClasses.push(baseClass);
|
|
1438
|
-
return extraClasses;
|
|
1439
|
-
}
|
|
1440
|
-
}, {
|
|
1441
|
-
key: "generateSlotId",
|
|
1442
|
-
value: function generateSlotId() {
|
|
1443
|
-
return "adSlot-".concat(dynamicAdCount++);
|
|
1444
|
-
}
|
|
1445
|
-
}, {
|
|
1446
|
-
key: "mapContextToAdSlotProps",
|
|
1447
|
-
value: function mapContextToAdSlotProps() {
|
|
1448
|
-
var context = this.context;
|
|
1449
|
-
var mappedProps = {};
|
|
1450
|
-
|
|
1451
|
-
if (context.dfpNetworkId !== undefined) {
|
|
1452
|
-
mappedProps.dfpNetworkId = context.dfpNetworkId;
|
|
1453
|
-
}
|
|
1454
|
-
|
|
1455
|
-
if (context.dfpAdUnit !== undefined) {
|
|
1456
|
-
mappedProps.adUnit = context.dfpAdUnit;
|
|
1457
|
-
}
|
|
1458
|
-
|
|
1459
|
-
if (context.dfpSizeMapping !== undefined) {
|
|
1460
|
-
mappedProps.sizeMapping = context.dfpSizeMapping;
|
|
1461
|
-
}
|
|
1462
|
-
|
|
1463
|
-
if (context.dfpTargetingArguments !== undefined) {
|
|
1464
|
-
mappedProps.targetingArguments = context.dfpTargetingArguments;
|
|
1465
|
-
}
|
|
1466
|
-
|
|
1467
|
-
return mappedProps;
|
|
1468
|
-
}
|
|
1469
|
-
}, {
|
|
1470
|
-
key: "doRegisterSlot",
|
|
1471
|
-
value: function doRegisterSlot() {
|
|
1472
|
-
_manager.default.registerSlot(_objectSpread({}, this.mapContextToAdSlotProps(), this.props, this.state, {
|
|
1473
|
-
slotShouldRefresh: this.slotShouldRefresh
|
|
1474
|
-
}));
|
|
1475
|
-
|
|
1476
|
-
if (this.props.fetchNow === true) {
|
|
1477
|
-
_manager.default.load(this.getSlotId());
|
|
1478
|
-
}
|
|
1479
|
-
|
|
1480
|
-
_manager.default.attachSlotRenderEnded(this.slotRenderEnded);
|
|
1481
|
-
|
|
1482
|
-
_manager.default.attachSlotIsViewable(this.slotIsViewable);
|
|
1483
|
-
|
|
1484
|
-
_manager.default.attachSlotVisibilityChanged(this.slotVisibilityChanged);
|
|
1485
|
-
|
|
1486
|
-
this.slotRegisterCallback();
|
|
1487
|
-
}
|
|
1488
|
-
}, {
|
|
1489
|
-
key: "registerSlot",
|
|
1490
|
-
value: function registerSlot() {
|
|
1491
|
-
if (this.state.slotId === null) {
|
|
1492
|
-
this.setState({
|
|
1493
|
-
slotId: this.generateSlotId()
|
|
1494
|
-
}, this.doRegisterSlot);
|
|
1495
|
-
} else {
|
|
1496
|
-
this.doRegisterSlot();
|
|
1497
|
-
}
|
|
1498
|
-
}
|
|
1499
|
-
}, {
|
|
1500
|
-
key: "unregisterSlot",
|
|
1501
|
-
value: function unregisterSlot() {
|
|
1502
|
-
_manager.default.unregisterSlot(_objectSpread({}, this.mapContextToAdSlotProps(), this.props, this.state));
|
|
1503
|
-
|
|
1504
|
-
_manager.default.detachSlotRenderEnded(this.slotRenderEnded);
|
|
1505
|
-
|
|
1506
|
-
_manager.default.detachSlotIsViewable(this.slotIsViewable);
|
|
1507
|
-
|
|
1508
|
-
_manager.default.detachSlotVisibilityChanged(this.slotVisibilityChanged);
|
|
1509
|
-
}
|
|
1510
|
-
}, {
|
|
1511
|
-
key: "slotRenderEnded",
|
|
1512
|
-
value: function slotRenderEnded(eventData) {
|
|
1513
|
-
if (eventData.slotId === this.getSlotId()) {
|
|
1514
|
-
if (this.props.onSlotRender !== undefined) {
|
|
1515
|
-
// now that slot has rendered we have access to the ref
|
|
1516
|
-
var params = _objectSpread({}, eventData, {
|
|
1517
|
-
adElementRef: this.adElementRef
|
|
1518
|
-
});
|
|
1519
|
-
|
|
1520
|
-
this.props.onSlotRender(params);
|
|
1521
|
-
}
|
|
1522
|
-
}
|
|
1523
|
-
}
|
|
1524
|
-
}, {
|
|
1525
|
-
key: "slotRegisterCallback",
|
|
1526
|
-
value: function slotRegisterCallback() {
|
|
1527
|
-
if (typeof this.props.onSlotRegister === 'function') {
|
|
1528
|
-
this.props.onSlotRegister({
|
|
1529
|
-
slotId: this.getSlotId(),
|
|
1530
|
-
sizes: this.props.sizes,
|
|
1531
|
-
slotCount: dynamicAdCount,
|
|
1532
|
-
adElementRef: this.adElementRef
|
|
1533
|
-
});
|
|
1534
|
-
}
|
|
1535
|
-
}
|
|
1536
|
-
}, {
|
|
1537
|
-
key: "slotIsViewable",
|
|
1538
|
-
value: function slotIsViewable(eventData) {
|
|
1539
|
-
if (eventData.slotId === this.getSlotId()) {
|
|
1540
|
-
if (this.props.onSlotIsViewable !== undefined) {
|
|
1541
|
-
this.props.onSlotIsViewable(eventData);
|
|
1542
|
-
}
|
|
1543
|
-
}
|
|
1544
|
-
}
|
|
1545
|
-
}, {
|
|
1546
|
-
key: "slotVisibilityChanged",
|
|
1547
|
-
value: function slotVisibilityChanged(eventData) {
|
|
1548
|
-
if (eventData.slotId === this.getSlotId()) {
|
|
1549
|
-
if (this.props.onSlotVisibilityChanged !== undefined) {
|
|
1550
|
-
this.props.onSlotVisibilityChanged(eventData);
|
|
1551
|
-
}
|
|
1552
|
-
}
|
|
1553
|
-
}
|
|
1554
|
-
}, {
|
|
1555
|
-
key: "slotShouldRefresh",
|
|
1556
|
-
value: function slotShouldRefresh() {
|
|
1557
|
-
var r = true;
|
|
1558
|
-
|
|
1559
|
-
if (this.props.shouldRefresh !== undefined) {
|
|
1560
|
-
r = this.props.shouldRefresh(_objectSpread({}, this.mapContextToAdSlotProps(), this.props, {
|
|
1561
|
-
slotId: this.getSlotId()
|
|
1562
|
-
}));
|
|
1563
|
-
}
|
|
1564
|
-
|
|
1565
|
-
return r;
|
|
1566
|
-
}
|
|
1567
|
-
}, {
|
|
1568
|
-
key: "render",
|
|
1569
|
-
value: function render() {
|
|
1570
|
-
var slotId = this.state.slotId;
|
|
1571
|
-
var props = {
|
|
1572
|
-
className: 'adBox'
|
|
1573
|
-
};
|
|
1574
|
-
|
|
1575
|
-
if (slotId !== null) {
|
|
1576
|
-
props.id = slotId;
|
|
1577
|
-
}
|
|
1578
|
-
|
|
1579
|
-
return _react.default.createElement("div", {
|
|
1580
|
-
className: this.getClasses().join(' ').trim()
|
|
1581
|
-
}, _react.default.createElement("div", _extends({
|
|
1582
|
-
ref: this.adElementRef
|
|
1583
|
-
}, props)));
|
|
1584
|
-
}
|
|
1585
|
-
}]);
|
|
1586
|
-
|
|
1587
|
-
return AdSlot;
|
|
1588
|
-
}(_react.default.Component);
|
|
1589
|
-
|
|
1590
|
-
exports.AdSlot = AdSlot;
|
|
1591
|
-
|
|
1592
|
-
_defineProperty(AdSlot, "propTypes", {
|
|
1593
|
-
dfpNetworkId: _propTypes.default.string,
|
|
1594
|
-
adUnit: _propTypes.default.string,
|
|
1595
|
-
sizes: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.number), _propTypes.default.string])),
|
|
1596
|
-
renderOutOfThePage: _propTypes.default.bool,
|
|
1597
|
-
sizeMapping: _propTypes.default.arrayOf(_propTypes.default.object),
|
|
1598
|
-
fetchNow: _propTypes.default.bool,
|
|
1599
|
-
adSenseAttributes: _propTypes.default.object,
|
|
1600
|
-
targetingArguments: _propTypes.default.object,
|
|
1601
|
-
onSlotRender: _propTypes.default.func,
|
|
1602
|
-
onSlotRegister: _propTypes.default.func,
|
|
1603
|
-
onSlotIsViewable: _propTypes.default.func,
|
|
1604
|
-
onSlotVisibilityChanged: _propTypes.default.func,
|
|
1605
|
-
shouldRefresh: _propTypes.default.func,
|
|
1606
|
-
slotId: _propTypes.default.string,
|
|
1607
|
-
className: _propTypes.default.string
|
|
1608
|
-
});
|
|
1609
|
-
|
|
1610
|
-
_defineProperty(AdSlot, "defaultProps", {
|
|
1611
|
-
fetchNow: false
|
|
1612
|
-
});
|
|
1613
|
-
|
|
1614
|
-
if (dfpslotsprovider.Context === null) {
|
|
1615
|
-
// React < 16.3
|
|
1616
|
-
AdSlot.contextTypes = {
|
|
1617
|
-
dfpNetworkId: _propTypes.default.string,
|
|
1618
|
-
dfpAdUnit: _propTypes.default.string,
|
|
1619
|
-
dfpSizeMapping: _propTypes.default.arrayOf(_propTypes.default.object),
|
|
1620
|
-
dfpTargetingArguments: _propTypes.default.object,
|
|
1621
|
-
newSlotCallback: _propTypes.default.func
|
|
1622
|
-
};
|
|
1623
|
-
} else {
|
|
1624
|
-
AdSlot.contextType = dfpslotsprovider.Context;
|
|
1625
|
-
}
|
|
1626
|
-
|
|
1627
|
-
var _default = AdSlot;
|
|
1628
|
-
exports.default = _default;
|
|
1629
|
-
});
|
|
1630
|
-
|
|
1631
|
-
_commonjsHelpers.unwrapExports(adslot);
|
|
1632
|
-
var adslot_1 = adslot.AdSlot;
|
|
1633
|
-
|
|
1634
|
-
var lib = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
1635
|
-
|
|
1636
|
-
Object.defineProperty(exports, "__esModule", {
|
|
1637
|
-
value: true
|
|
1638
|
-
});
|
|
1639
|
-
exports.DFPSlotsProvider = exports.AdSlot = exports.DFPManager = void 0;
|
|
1640
|
-
|
|
1641
|
-
var _manager = _interopRequireDefault(manager);
|
|
1642
|
-
|
|
1643
|
-
var _adslot = _interopRequireDefault(adslot);
|
|
1644
|
-
|
|
1645
|
-
var _dfpslotsprovider = _interopRequireDefault(dfpslotsprovider);
|
|
1646
|
-
|
|
1647
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1648
|
-
|
|
1649
|
-
var DFPManager = _manager.default;
|
|
1650
|
-
exports.DFPManager = DFPManager;
|
|
1651
|
-
var AdSlot = _adslot.default;
|
|
1652
|
-
exports.AdSlot = AdSlot;
|
|
1653
|
-
var DFPSlotsProvider = _dfpslotsprovider.default;
|
|
1654
|
-
exports.DFPSlotsProvider = DFPSlotsProvider;
|
|
1655
|
-
});
|
|
1656
|
-
|
|
1657
|
-
_commonjsHelpers.unwrapExports(lib);
|
|
1658
|
-
var lib_1 = lib.DFPSlotsProvider;
|
|
1659
|
-
var lib_2 = lib.AdSlot;
|
|
1660
|
-
var lib_3 = lib.DFPManager;
|
|
1661
|
-
|
|
1662
|
-
exports.lib_1 = lib_1;
|
|
1663
|
-
exports.lib_2 = lib_2;
|
|
1664
|
-
exports.lib_3 = lib_3;
|