@mjhls/mjh-framework 1.0.1005-next12-0002 → 1.0.1005-sap-context-test
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.js +32 -1
- package/dist/cjs/AD300x250.js +96 -1
- package/dist/cjs/AD300x250x600.js +113 -1
- package/dist/cjs/AD728x90.js +110 -1
- package/dist/cjs/ADFloatingFooter.js +144 -1
- package/dist/cjs/ADFooter.js +53 -1
- package/dist/cjs/ADGutter.js +116 -1
- package/dist/cjs/ADInfeed-0394f391.js +66 -0
- package/dist/cjs/ADSkyscraper.js +118 -1
- package/dist/cjs/ADSponsoredResources.js +115 -1
- package/dist/cjs/ADWebcast.js +120 -1
- package/dist/cjs/ADWelcome.js +167 -1
- package/dist/cjs/ADlgInfeed-759969d6.js +60 -0
- package/dist/cjs/AccordionPanel.js +94 -1
- package/dist/cjs/AdSlot.js +252 -1
- package/dist/cjs/AdSlotsProvider.js +184 -1
- package/dist/cjs/AlgoliaSearch.js +14466 -1
- package/dist/cjs/AlphabeticList.js +135 -1
- package/dist/cjs/ArticleCarousel.js +46 -1
- package/dist/cjs/ArticleProgramLandingPage.js +188 -1
- package/dist/cjs/ArticleSeriesLandingPage.js +163 -1
- package/dist/cjs/ArticleSeriesListing.js +316 -1
- package/dist/cjs/Auth.js +3653 -1
- package/dist/cjs/AuthWrapper.js +1902 -1
- package/dist/cjs/AuthorComponent-7d00f6d5.js +96 -0
- package/dist/cjs/Beam.js +350 -1
- package/dist/cjs/BlockContent-96b44364.js +916 -0
- package/dist/cjs/Breadcrumbs.js +107 -1
- package/dist/cjs/CMEDeck.js +448 -1
- package/dist/cjs/Column1.js +39 -1
- package/dist/cjs/Column2.js +74 -1
- package/dist/cjs/Column3.js +144 -1
- package/dist/cjs/ConferenceArticleCard.js +93 -1
- package/dist/cjs/ConferenceBanner-213003ce.js +24 -0
- package/dist/cjs/ContentCardPaginated.js +417 -1
- package/dist/cjs/DeckContent.js +508 -1
- package/dist/cjs/DeckQueue.js +404 -1
- package/dist/cjs/DeckQueuePaginated.js +348 -1
- package/dist/cjs/Dfp-c313a700.js +104 -0
- package/dist/cjs/EventsDeck.js +884 -1
- package/dist/cjs/ExternalResources.js +222 -1
- package/dist/cjs/Feature.js +129 -1
- package/dist/cjs/ForbesHero.js +137 -1
- package/dist/cjs/GridContent.js +829 -1
- package/dist/cjs/GridContentPaginated.js +704 -1
- package/dist/cjs/GridHero.js +147 -1
- package/dist/cjs/GroupDeck.js +314 -1
- package/dist/cjs/HamMagazine.js +602 -1
- package/dist/cjs/Header.js +39 -1
- package/dist/cjs/HealthCareProfessionalModal.js +78 -1
- package/dist/cjs/Hero.js +48 -1
- package/dist/cjs/HighlightenVideo.js +69 -1
- package/dist/cjs/HorizontalArticleListing.js +169 -1
- package/dist/cjs/HorizontalHero.js +111 -1
- package/dist/cjs/ImageSlider-17fdaf3b.js +2813 -0
- package/dist/cjs/IssueContentDeck.js +241 -1
- package/dist/cjs/IssueDeck.js +268 -1
- package/dist/cjs/IssueLanding.js +176 -1
- package/dist/cjs/KMTracker.js +27 -1
- package/dist/cjs/LeftNav.js +155 -1
- package/dist/cjs/MasterDeck.js +556 -1
- package/dist/cjs/MasterDeckPaginated.js +469 -1
- package/dist/cjs/MediaSeriesCard-eacea66a.js +81 -0
- package/dist/cjs/MediaSeriesLanding.js +509 -1
- package/dist/cjs/MediaSeriesLandingPaginated.js +534 -1
- package/dist/cjs/NavDvm.js +276 -1
- package/dist/cjs/NavFooter-880e9d87.js +71 -0
- package/dist/cjs/NavMagazine.js +613 -1
- package/dist/cjs/NavNative.js +880 -1
- package/dist/cjs/OncliveHero.js +79 -1
- package/dist/cjs/OncliveLargeHero.js +241 -1
- package/dist/cjs/PageFilter.js +72 -1
- package/dist/cjs/Pagination-842c556f.js +97 -0
- package/dist/cjs/PartnerDetailListing.js +345 -1
- package/dist/cjs/PartnerDetailListingPaginated.js +353 -1
- package/dist/cjs/PdfDownload.js +28 -1
- package/dist/cjs/PixelTracking.js +165 -1
- package/dist/cjs/PodcastsLanding.js +236 -1
- package/dist/cjs/PopUpModal.js +58 -1
- package/dist/cjs/PtceDeck.js +149 -1
- package/dist/cjs/PubSection.js +121 -1
- package/dist/cjs/PubToc.js +87 -1
- package/dist/cjs/PublicationDeck.js +183 -1
- package/dist/cjs/PublicationFeature-a989a2b3.js +130 -0
- package/dist/cjs/PublicationLanding.js +857 -1
- package/dist/cjs/QueueDeckExpanded.js +1541 -1
- package/dist/cjs/QueueDeckExpandedPaginated.js +1388 -1
- package/dist/cjs/RecentNews.js +91 -1
- package/dist/cjs/RelatedContent.js +114 -1
- package/dist/cjs/RelatedTopicsDropdown.js +90 -1
- package/dist/cjs/RolesDeck.js +94 -1
- package/dist/cjs/Schema.js +103 -1
- package/dist/cjs/Search.js +66 -1
- package/dist/cjs/Segment.js +452 -1
- package/dist/cjs/SeriesListingDeck.js +249 -1
- package/dist/cjs/SeriesSlider-3d57985d.js +332 -0
- package/dist/cjs/SetCookie.js +10 -1
- package/dist/cjs/SideFooter.js +150 -1
- package/dist/cjs/SocialIcons.js +103 -1
- package/dist/cjs/SocialSearchComponent-62bceb87.js +213 -0
- package/dist/cjs/SocialShare.js +74 -1
- package/dist/cjs/TaxonomyCard.js +257 -1
- package/dist/cjs/TaxonomyDescription.js +209 -1
- package/dist/cjs/TemplateNormal.js +204 -1
- package/dist/cjs/ThumbnailCard.js +59 -1
- package/dist/cjs/Tooltip-4cb8849a.js +9454 -0
- package/dist/cjs/Ustream.js +156 -1
- package/dist/cjs/VerticalHero.js +74 -1
- package/dist/cjs/VideoProgramLandingPage.js +264 -1
- package/dist/cjs/VideoSeriesCard.js +88 -1
- package/dist/cjs/VideoSeriesFilter.js +128 -1
- package/dist/cjs/VideoSeriesLandingPage.js +179 -1
- package/dist/cjs/VideoSeriesListing.js +423 -1
- package/dist/cjs/View.js +2699 -1
- package/dist/cjs/YahooHero.js +126 -1
- package/dist/cjs/YoutubeGroup.js +371 -1
- package/dist/cjs/_commonjsHelpers-06173234.js +25 -0
- package/dist/cjs/_is-array-54228b29.js +74 -0
- package/dist/cjs/_iter-detect-b1df62f0.js +52 -0
- package/dist/cjs/_library-dd23b178.js +5 -0
- package/dist/cjs/_object-pie-083f2dd6.js +16 -0
- package/dist/cjs/_object-sap-d1978572.js +16 -0
- package/dist/cjs/_object-to-array-ce86cae7.js +25 -0
- package/dist/cjs/asyncToGenerator-77821af0.js +1395 -0
- package/dist/cjs/brightcove-react-player-loader.es-4c7825a1.js +2232 -0
- package/dist/cjs/checkSisterSite-b29833b2.js +19 -0
- package/dist/cjs/core.get-iterator-method-5643aa10.js +584 -0
- package/dist/cjs/debounce-d4a2369b.js +216 -0
- package/dist/cjs/define-property-e8404b64.js +20 -0
- package/dist/cjs/defineProperty-e0fb52c5.js +73 -0
- package/dist/cjs/entities-df1aed86.js +510 -0
- package/dist/cjs/eq-5fc26c07.js +79 -0
- package/dist/cjs/events-1b438fe7.js +469 -0
- package/dist/cjs/extends-7c86182f.js +87 -0
- package/dist/cjs/faundadb.js +406 -1
- package/dist/cjs/get-5839e5b5.js +920 -0
- package/dist/cjs/getContentCategory-f38a4c00.js +11 -0
- package/dist/cjs/getKeywords.js +46 -1
- package/dist/cjs/getPtceActivities.js +89 -1
- package/dist/cjs/getQuery.js +28 -1
- package/dist/cjs/getRelatedArticle.js +542 -1
- package/dist/cjs/getRootDocGroup.js +62 -1
- package/dist/cjs/getSerializers.js +68 -1
- package/dist/cjs/getSeriesDetail.js +40 -1
- package/dist/cjs/getTargeting-ba942d9a.js +164 -0
- package/dist/cjs/getTargeting.js +13 -1
- package/dist/cjs/iconBase-be4097c0.js +104 -0
- package/dist/cjs/index-187c967e.js +54 -0
- package/dist/cjs/index-19fbbcea.js +10788 -0
- package/dist/cjs/index-50be6759.js +105 -0
- package/dist/cjs/index-65621b6c.js +613 -0
- package/dist/cjs/index-bd6c9f56.js +211 -0
- package/dist/cjs/index-d2a6ef75.js +1218 -0
- package/dist/cjs/index-d48b231c.js +556 -0
- package/dist/cjs/index-f86bb269.js +1571 -0
- package/dist/cjs/index.es-1ab8dda7.js +445 -0
- package/dist/cjs/index.esm-c1e16606.js +13 -0
- package/dist/cjs/index.esm-d51c9ac6.js +25 -0
- package/dist/cjs/index.esm-d81454e7.js +19 -0
- package/dist/cjs/index.esm-f59ef5b4.js +97 -0
- package/dist/cjs/index.js +644 -1
- package/dist/cjs/inherits-de66ea16.js +188 -0
- package/dist/cjs/isSymbol-03abbdf0.js +209 -0
- package/dist/cjs/js.cookie-a511c430.js +160 -0
- package/dist/cjs/keys-e982b3fa.js +25 -0
- package/dist/cjs/lodash-f0783643.js +17195 -0
- package/dist/cjs/main-3643d499.js +973 -0
- package/dist/cjs/md5-e1ca5797.js +323 -0
- package/dist/cjs/moment-aca40de1.js +5669 -0
- package/dist/cjs/react-social-icons-2c5c389a.js +616 -0
- package/dist/cjs/slicedToArray-067dd3bc.js +95 -0
- package/dist/cjs/smoothscroll-99df7f93.js +438 -0
- package/dist/cjs/stringify-f7a37a8d.js +17 -0
- package/dist/cjs/style-inject.es-dcee06b6.js +30 -1
- package/dist/cjs/timeDifferenceCalc.js +39 -1
- package/dist/cjs/toConsumableArray-d7797c2b.js +74 -0
- package/dist/cjs/toNumber-5e1fac58.js +104 -0
- package/dist/cjs/typeof-1358762e.js +33 -0
- package/dist/cjs/typeof-567e31ff.js +382 -0
- package/dist/cjs/urlFor.js +65 -1
- package/dist/cjs/urlForFile-29d3815a.js +24 -0
- package/dist/cjs/ustream-api-3819e4aa.js +106 -0
- package/dist/cjs/util-93a37fd0.js +587 -0
- package/dist/cjs/visibility-sensor-56020df6.js +597 -0
- package/dist/cjs/web.dom.iterable-d98303e0.js +50 -0
- package/dist/esm/AD.js +26 -1
- package/dist/esm/AD300x250.js +90 -1
- package/dist/esm/AD300x250x600.js +107 -1
- package/dist/esm/AD728x90.js +104 -1
- package/dist/esm/ADFloatingFooter.js +138 -1
- package/dist/esm/ADFooter.js +47 -1
- package/dist/esm/ADGutter.js +110 -1
- package/dist/esm/ADInfeed-5765a73a.js +59 -0
- package/dist/esm/ADSkyscraper.js +112 -1
- package/dist/esm/ADSponsoredResources.js +109 -1
- package/dist/esm/ADWebcast.js +114 -1
- package/dist/esm/ADWelcome.js +161 -1
- package/dist/esm/ADlgInfeed-5e36f317.js +54 -0
- package/dist/esm/AccordionPanel.js +87 -1
- package/dist/esm/AdSlot.js +245 -1
- package/dist/esm/AdSlotsProvider.js +177 -1
- package/dist/esm/AlgoliaSearch.js +14459 -1
- package/dist/esm/AlphabeticList.js +129 -1
- package/dist/esm/ArticleCarousel.js +40 -1
- package/dist/esm/ArticleProgramLandingPage.js +182 -1
- package/dist/esm/ArticleSeriesLandingPage.js +157 -1
- package/dist/esm/ArticleSeriesListing.js +309 -1
- package/dist/esm/Auth.js +3632 -1
- package/dist/esm/AuthWrapper.js +1896 -1
- package/dist/esm/AuthorComponent-11adff02.js +90 -0
- package/dist/esm/Beam.js +348 -1
- package/dist/esm/BlockContent-1e73bd2c.js +909 -0
- package/dist/esm/Breadcrumbs.js +100 -1
- package/dist/esm/CMEDeck.js +442 -1
- package/dist/esm/Column1.js +28 -1
- package/dist/esm/Column2.js +63 -1
- package/dist/esm/Column3.js +133 -1
- package/dist/esm/ConferenceArticleCard.js +87 -1
- package/dist/esm/ConferenceBanner-8792ebd2.js +18 -0
- package/dist/esm/ContentCardPaginated.js +406 -1
- package/dist/esm/DeckContent.js +498 -1
- package/dist/esm/DeckQueue.js +394 -1
- package/dist/esm/DeckQueuePaginated.js +337 -1
- package/dist/esm/Dfp-102f0beb.js +97 -0
- package/dist/esm/EventsDeck.js +871 -1
- package/dist/esm/ExternalResources.js +215 -1
- package/dist/esm/Feature.js +122 -1
- package/dist/esm/ForbesHero.js +131 -1
- package/dist/esm/GridContent.js +819 -1
- package/dist/esm/GridContentPaginated.js +693 -1
- package/dist/esm/GridHero.js +141 -1
- package/dist/esm/GroupDeck.js +308 -1
- package/dist/esm/HamMagazine.js +589 -1
- package/dist/esm/Header.js +29 -1
- package/dist/esm/HealthCareProfessionalModal.js +70 -1
- package/dist/esm/Hero.js +42 -1
- package/dist/esm/HighlightenVideo.js +63 -1
- package/dist/esm/HorizontalArticleListing.js +163 -1
- package/dist/esm/HorizontalHero.js +105 -1
- package/dist/esm/ImageSlider-f84174cb.js +2804 -0
- package/dist/esm/IssueContentDeck.js +231 -1
- package/dist/esm/IssueDeck.js +258 -1
- package/dist/esm/IssueLanding.js +170 -1
- package/dist/esm/KMTracker.js +25 -1
- package/dist/esm/LeftNav.js +145 -1
- package/dist/esm/MasterDeck.js +549 -1
- package/dist/esm/MasterDeckPaginated.js +461 -1
- package/dist/esm/MediaSeriesCard-f56c8274.js +75 -0
- package/dist/esm/MediaSeriesLanding.js +502 -1
- package/dist/esm/MediaSeriesLandingPaginated.js +527 -1
- package/dist/esm/NavDvm.js +263 -1
- package/dist/esm/NavFooter-3272e9cd.js +65 -0
- package/dist/esm/NavMagazine.js +600 -1
- package/dist/esm/NavNative.js +864 -1
- package/dist/esm/OncliveHero.js +73 -1
- package/dist/esm/OncliveLargeHero.js +235 -1
- package/dist/esm/PageFilter.js +66 -1
- package/dist/esm/Pagination-dc30727b.js +90 -0
- package/dist/esm/PartnerDetailListing.js +339 -1
- package/dist/esm/PartnerDetailListingPaginated.js +347 -1
- package/dist/esm/PdfDownload.js +22 -1
- package/dist/esm/PixelTracking.js +156 -1
- package/dist/esm/PodcastsLanding.js +229 -1
- package/dist/esm/PopUpModal.js +51 -1
- package/dist/esm/PtceDeck.js +143 -1
- package/dist/esm/PubSection.js +115 -1
- package/dist/esm/PubToc.js +81 -1
- package/dist/esm/PublicationDeck.js +173 -1
- package/dist/esm/PublicationFeature-d88e76b9.js +121 -0
- package/dist/esm/PublicationLanding.js +847 -1
- package/dist/esm/QueueDeckExpanded.js +1535 -1
- package/dist/esm/QueueDeckExpandedPaginated.js +1382 -1
- package/dist/esm/RecentNews.js +85 -1
- package/dist/esm/RelatedContent.js +108 -1
- package/dist/esm/RelatedTopicsDropdown.js +82 -1
- package/dist/esm/RolesDeck.js +84 -1
- package/dist/esm/Schema.js +97 -1
- package/dist/esm/Search.js +57 -1
- package/dist/esm/Segment.js +450 -1
- package/dist/esm/SeriesListingDeck.js +243 -1
- package/dist/esm/SeriesSlider-f771e20d.js +326 -0
- package/dist/esm/SetCookie.js +8 -1
- package/dist/esm/SideFooter.js +144 -1
- package/dist/esm/SocialIcons.js +97 -1
- package/dist/esm/SocialSearchComponent-165b4ae7.js +204 -0
- package/dist/esm/SocialShare.js +67 -1
- package/dist/esm/TaxonomyCard.js +247 -1
- package/dist/esm/TaxonomyDescription.js +202 -1
- package/dist/esm/TemplateNormal.js +197 -1
- package/dist/esm/ThumbnailCard.js +52 -1
- package/dist/esm/Tooltip-95655b44.js +9445 -0
- package/dist/esm/Ustream.js +150 -1
- package/dist/esm/VerticalHero.js +68 -1
- package/dist/esm/VideoProgramLandingPage.js +255 -1
- package/dist/esm/VideoSeriesCard.js +82 -1
- package/dist/esm/VideoSeriesFilter.js +122 -1
- package/dist/esm/VideoSeriesLandingPage.js +173 -1
- package/dist/esm/VideoSeriesListing.js +416 -1
- package/dist/esm/View.js +2689 -1
- package/dist/esm/YahooHero.js +120 -1
- package/dist/esm/YoutubeGroup.js +365 -1
- package/dist/esm/_commonjsHelpers-0c4b6f40.js +19 -0
- package/dist/esm/_is-array-8d21b9e3.js +71 -0
- package/dist/esm/_iter-detect-98db3b07.js +48 -0
- package/dist/esm/_library-528f1934.js +3 -0
- package/dist/esm/_object-pie-133f504a.js +13 -0
- package/dist/esm/_object-sap-7cee6f84.js +14 -0
- package/dist/esm/_object-to-array-2300e51b.js +23 -0
- package/dist/esm/asyncToGenerator-958ef5fc.js +1387 -0
- package/dist/esm/brightcove-react-player-loader.es-57a70a56.js +2226 -0
- package/dist/esm/checkSisterSite-baa4fb6b.js +17 -0
- package/dist/esm/core.get-iterator-method-ea258bb1.js +547 -0
- package/dist/esm/debounce-533d9748.js +214 -0
- package/dist/esm/define-property-5f1bda73.js +18 -0
- package/dist/esm/defineProperty-23a8f8cd.js +68 -0
- package/dist/esm/entities-6d9154b4.js +507 -0
- package/dist/esm/eq-bdcbf886.js +76 -0
- package/dist/esm/events-6c3a7a63.js +467 -0
- package/dist/esm/extends-6d8e3924.js +83 -0
- package/dist/esm/faundadb.js +396 -1
- package/dist/esm/get-3c308da4.js +918 -0
- package/dist/esm/getContentCategory-15dcc413.js +9 -0
- package/dist/esm/getKeywords.js +44 -1
- package/dist/esm/getPtceActivities.js +87 -1
- package/dist/esm/getQuery.js +26 -1
- package/dist/esm/getRelatedArticle.js +540 -1
- package/dist/esm/getRootDocGroup.js +60 -1
- package/dist/esm/getSerializers.js +62 -1
- package/dist/esm/getSeriesDetail.js +38 -1
- package/dist/esm/getTargeting-9bd28724.js +161 -0
- package/dist/esm/getTargeting.js +7 -1
- package/dist/esm/iconBase-ccc56b97.js +81 -0
- package/dist/esm/index-3f5c03b2.js +553 -0
- package/dist/esm/index-5d8b0a9d.js +10767 -0
- package/dist/esm/index-755f2cc2.js +605 -0
- package/dist/esm/index-79cfd25c.js +1569 -0
- package/dist/esm/index-98ca9cec.js +100 -0
- package/dist/esm/index-c7e2ac95.js +52 -0
- package/dist/esm/index-db3bb315.js +207 -0
- package/dist/esm/index-f0fc23eb.js +1209 -0
- package/dist/esm/index.es-a6137319.js +439 -0
- package/dist/esm/index.esm-07c37a92.js +90 -0
- package/dist/esm/index.esm-1bd8a0a8.js +18 -0
- package/dist/esm/index.esm-9b042655.js +10 -0
- package/dist/esm/index.esm-eb1e8e80.js +14 -0
- package/dist/esm/index.js +537 -1
- package/dist/esm/inherits-a6ba2ec4.js +179 -0
- package/dist/esm/isSymbol-a7e9aafe.js +203 -0
- package/dist/esm/js.cookie-6874175c.js +158 -0
- package/dist/esm/keys-31dcdb31.js +23 -0
- package/dist/esm/lodash-f97fd99a.js +17193 -0
- package/dist/esm/main-1894c974.js +961 -0
- package/dist/esm/md5-4e42248e.js +321 -0
- package/dist/esm/moment-bc12cb97.js +5667 -0
- package/dist/esm/react-social-icons-9be47857.js +609 -0
- package/dist/esm/slicedToArray-6ebcbfea.js +92 -0
- package/dist/esm/smoothscroll-fa4e3f8c.js +436 -0
- package/dist/esm/stringify-2b084bee.js +15 -0
- package/dist/esm/style-inject.es-1f59c1d0.js +28 -1
- package/dist/esm/timeDifferenceCalc.js +37 -1
- package/dist/esm/toConsumableArray-f7074d7c.js +71 -0
- package/dist/esm/toNumber-5aeba6e7.js +102 -0
- package/dist/esm/typeof-2f07d0e8.js +30 -0
- package/dist/esm/typeof-e9fc0c5d.js +378 -0
- package/dist/esm/urlFor.js +63 -1
- package/dist/esm/urlForFile-b69adffc.js +22 -0
- package/dist/esm/ustream-api-d3714624.js +104 -0
- package/dist/esm/util-8ed16d48.js +585 -0
- package/dist/esm/visibility-sensor-72fd8f8b.js +590 -0
- package/dist/esm/web.dom.iterable-ab4dea5c.js +48 -0
- package/package.json +23 -24
- package/dist/cjs/AD-e1bb7536.js +0 -1
- package/dist/cjs/AD300x250-0bcfcd78.js +0 -1
- package/dist/cjs/AD300x250x600-01659df6.js +0 -1
- package/dist/cjs/AD728x90-c92f784d.js +0 -1
- package/dist/cjs/ADFloatingFooter-f0650a0e.js +0 -1
- package/dist/cjs/ADFooter-b3d98c5f.js +0 -1
- package/dist/cjs/ADGutter-8451a0e7.js +0 -1
- package/dist/cjs/ADInfeed-7019b746.js +0 -1
- package/dist/cjs/ADSkyscraper-2db48edc.js +0 -1
- package/dist/cjs/ADSponsoredResources-126ab84c.js +0 -1
- package/dist/cjs/ADWebcast-26543865.js +0 -1
- package/dist/cjs/ADWelcome-6261c769.js +0 -1
- package/dist/cjs/ADlgInfeed-42059b30.js +0 -1
- package/dist/cjs/AccordionPanel-b018a969.js +0 -1
- package/dist/cjs/AdSlot-8a0b4211.js +0 -1
- package/dist/cjs/AdSlotsProvider-e06c4b39.js +0 -1
- package/dist/cjs/AlgoliaSearch-05bab51c.js +0 -1
- package/dist/cjs/AlphabeticList-94ed00ad.js +0 -1
- package/dist/cjs/ArticleCarousel-6599cb34.js +0 -1
- package/dist/cjs/ArticleProgramLandingPage-2cc43252.js +0 -1
- package/dist/cjs/ArticleSeriesLandingPage-4af0758a.js +0 -1
- package/dist/cjs/ArticleSeriesListing-476cb622.js +0 -1
- package/dist/cjs/AuthorComponent-dd3ac7f5.js +0 -1
- package/dist/cjs/Breadcrumbs-10474e7d.js +0 -1
- package/dist/cjs/CMEDeck-c7276c4c.js +0 -1
- package/dist/cjs/Column1-9a0e0262.js +0 -1
- package/dist/cjs/Column2-47fa24ac.js +0 -1
- package/dist/cjs/Column3-7407a3a2.js +0 -1
- package/dist/cjs/ConferenceArticleCard-a48a5eb4.js +0 -1
- package/dist/cjs/ConferenceBanner-9fb497af.js +0 -1
- package/dist/cjs/ContentCard-0543793a.js +0 -1
- package/dist/cjs/Dfp-eb398ac3.js +0 -1
- package/dist/cjs/DropdownButton-3f21ccbf.js +0 -6
- package/dist/cjs/Dvm-4aab0fca.js +0 -1
- package/dist/cjs/EventsDeck-7614cec4.js +0 -1
- package/dist/cjs/ExternalResources-c1d4e253.js +0 -1
- package/dist/cjs/Feature-4254dfe3.js +0 -1
- package/dist/cjs/ForbesHero-82c18210.js +0 -1
- package/dist/cjs/GridContent-6c8dd8e5.js +0 -1
- package/dist/cjs/GridHero-c6784d3f.js +0 -1
- package/dist/cjs/GroupDeck-6920bcf7.js +0 -1
- package/dist/cjs/HamburgerNav-02a13006.js +0 -1
- package/dist/cjs/Header-268a2cda.js +0 -1
- package/dist/cjs/Hero-79a1f7a3.js +0 -1
- package/dist/cjs/HighlightenVideo-20edba55.js +0 -1
- package/dist/cjs/HorizontalArticleListing-4a44f354.js +0 -1
- package/dist/cjs/HorizontalHero-c5a3cb7a.js +0 -1
- package/dist/cjs/ImageSlider-d1359f16.js +0 -1
- package/dist/cjs/IssueContentDeck-48a04696.js +0 -1
- package/dist/cjs/IssueDeck-41ebd17b.js +0 -1
- package/dist/cjs/IssueLanding-06765ae0.js +0 -1
- package/dist/cjs/KMTracker-4e1de793.js +0 -1
- package/dist/cjs/LeftNav-c7283941.js +0 -1
- package/dist/cjs/Magazine-0d15b137.js +0 -1
- package/dist/cjs/MasterDeck-0e168ac1.js +0 -1
- package/dist/cjs/MediaSeriesCard-07b6f758.js +0 -1
- package/dist/cjs/Native-ee78edeb.js +0 -1
- package/dist/cjs/NavFooter-f905aca3.js +0 -1
- package/dist/cjs/Normal-ad14a1b1.js +0 -1
- package/dist/cjs/OncliveHero-5c7454fe.js +0 -1
- package/dist/cjs/OncliveLargeHero-46e0a793.js +0 -1
- package/dist/cjs/PageFilter-bdffe62b.js +0 -1
- package/dist/cjs/Pagination-825e4903.js +0 -1
- package/dist/cjs/PartnerDetailListing-848c514f.js +0 -1
- package/dist/cjs/PdfDownload-c99142ff.js +0 -1
- package/dist/cjs/PopUpModal-c1cbf9b6.js +0 -1
- package/dist/cjs/PubSection-08e834ca.js +0 -1
- package/dist/cjs/PubToc-6e2a3f50.js +0 -1
- package/dist/cjs/PublicationDeck-e242bd17.js +0 -1
- package/dist/cjs/PublicationFeature-0e2014fb.js +0 -1
- package/dist/cjs/PublicationLanding-d54d80d4.js +0 -1
- package/dist/cjs/Queue-8e0e436f.js +0 -1
- package/dist/cjs/QueueDeckExpanded-e420bdec.js +0 -1
- package/dist/cjs/RelatedContent-4ac0ceca.js +0 -1
- package/dist/cjs/RelatedTopicsDropdown-4736b927.js +0 -1
- package/dist/cjs/RolesDeck-83cbb45e.js +0 -1
- package/dist/cjs/Schema-8c138aa8.js +0 -1
- package/dist/cjs/SeriesSlider-720871f8.js +0 -1
- package/dist/cjs/SideFooter-17e666a3.js +0 -1
- package/dist/cjs/SocialIcons-425827d3.js +0 -1
- package/dist/cjs/SocialNavFooter-8f053a08.js +0 -1
- package/dist/cjs/SocialSearchComponent-dea3dbc8.js +0 -1
- package/dist/cjs/SocialShare-3d7c8abe.js +0 -1
- package/dist/cjs/TaxonomyCard-e881cb43.js +0 -1
- package/dist/cjs/TaxonomyDescription-9a13ded6.js +0 -1
- package/dist/cjs/ThumbnailCard-101f04b8.js +0 -1
- package/dist/cjs/Ustream-b7692d0a.js +0 -1
- package/dist/cjs/VerticalHero-a61b1a2e.js +0 -1
- package/dist/cjs/VideoProgramLandingPage-5508836c.js +0 -1
- package/dist/cjs/VideoSeriesFilter-9650cf01.js +0 -1
- package/dist/cjs/VideoSeriesLandingPage-d1fae653.js +0 -1
- package/dist/cjs/VideoSeriesListing-91f5aa6d.js +0 -1
- package/dist/cjs/YahooHero-2df6a408.js +0 -1
- package/dist/cjs/YoutubeGroup-d8a93da0.js +0 -1
- package/dist/cjs/_commonjsHelpers-0a7b82d9.js +0 -1
- package/dist/cjs/beam-aaf6fbe9.js +0 -1
- package/dist/cjs/checkSisterSite-d2d62375.js +0 -1
- package/dist/cjs/defineProperty-ba7cd53d.js +0 -1
- package/dist/cjs/entities-8feddf1d.js +0 -1
- package/dist/cjs/extends-5ede7877.js +0 -1
- package/dist/cjs/getContentCategory-ee6d9fdf.js +0 -1
- package/dist/cjs/getKeywords-5341ea76.js +0 -1
- package/dist/cjs/getPrototypeOf-99b1cfd8.js +0 -1
- package/dist/cjs/getQuery-154617ad.js +0 -1
- package/dist/cjs/getRelatedArticle-dbed93dc.js +0 -1
- package/dist/cjs/getSeriesDetail-e2980903.js +0 -1
- package/dist/cjs/getTargeting-a1ecaa0b.js +0 -1
- package/dist/cjs/index-14c8083b.js +0 -1
- package/dist/cjs/index-3291d44c.js +0 -1
- package/dist/cjs/index-5cca2099.js +0 -1
- package/dist/cjs/index-66647f61.js +0 -1
- package/dist/cjs/searchForm-bb5e3dbf.js +0 -1
- package/dist/cjs/segment-lib-7a16e514.js +0 -1
- package/dist/cjs/setCookie-e72f573d.js +0 -1
- package/dist/cjs/slicedToArray-c9e22c6a.js +0 -1
- package/dist/cjs/toConsumableArray-7afb7984.js +0 -1
- package/dist/cjs/typeof-a861d137.js +0 -1
- package/dist/cjs/unsupportedIterableToArray-294d47a8.js +0 -1
- package/dist/cjs/urlFor-86a2f4db.js +0 -1
- package/dist/cjs/urlForFile-52afb8e9.js +0 -1
- package/dist/cjs/ustream-api-05a918f3.js +0 -1
- package/dist/esm/AD-8a57f623.js +0 -1
- package/dist/esm/AD300x250-10ccde99.js +0 -1
- package/dist/esm/AD300x250x600-10e29b3d.js +0 -1
- package/dist/esm/AD728x90-2b0e930d.js +0 -1
- package/dist/esm/ADFloatingFooter-f23caacf.js +0 -1
- package/dist/esm/ADFooter-4c20b5fc.js +0 -1
- package/dist/esm/ADGutter-59cf52e3.js +0 -1
- package/dist/esm/ADInfeed-8ce85d87.js +0 -1
- package/dist/esm/ADSkyscraper-bfd33e46.js +0 -1
- package/dist/esm/ADSponsoredResources-0410407c.js +0 -1
- package/dist/esm/ADWebcast-6f27e384.js +0 -1
- package/dist/esm/ADWelcome-421d5621.js +0 -1
- package/dist/esm/ADlgInfeed-19d0f057.js +0 -1
- package/dist/esm/AccordionPanel-123022f0.js +0 -1
- package/dist/esm/AdSlot-16696371.js +0 -1
- package/dist/esm/AdSlotsProvider-5ead284e.js +0 -1
- package/dist/esm/AlgoliaSearch-1343b721.js +0 -1
- package/dist/esm/AlphabeticList-f1ca5612.js +0 -1
- package/dist/esm/ArticleCarousel-ba29666c.js +0 -1
- package/dist/esm/ArticleProgramLandingPage-d996da8f.js +0 -1
- package/dist/esm/ArticleSeriesLandingPage-67cda955.js +0 -1
- package/dist/esm/ArticleSeriesListing-22e8f5a6.js +0 -1
- package/dist/esm/AuthorComponent-f3e14fdd.js +0 -1
- package/dist/esm/Breadcrumbs-8838701e.js +0 -1
- package/dist/esm/CMEDeck-182d8eb7.js +0 -1
- package/dist/esm/Column1-3304e0a7.js +0 -1
- package/dist/esm/Column2-2d42433b.js +0 -1
- package/dist/esm/Column3-94c8661b.js +0 -1
- package/dist/esm/ConferenceArticleCard-c10c5b7f.js +0 -1
- package/dist/esm/ConferenceBanner-8a6f3ed9.js +0 -1
- package/dist/esm/ContentCard-01c2e43a.js +0 -1
- package/dist/esm/Dfp-c3c626b1.js +0 -1
- package/dist/esm/DropdownButton-c4621022.js +0 -6
- package/dist/esm/Dvm-138f924d.js +0 -1
- package/dist/esm/EventsDeck-e5aad41d.js +0 -1
- package/dist/esm/ExternalResources-e9656681.js +0 -1
- package/dist/esm/Feature-69a30cea.js +0 -1
- package/dist/esm/ForbesHero-0b0a5436.js +0 -1
- package/dist/esm/GridContent-d8df59ae.js +0 -1
- package/dist/esm/GridHero-0d17636c.js +0 -1
- package/dist/esm/GroupDeck-4c581822.js +0 -1
- package/dist/esm/HamburgerNav-5fcf79ae.js +0 -1
- package/dist/esm/Header-b0624adc.js +0 -1
- package/dist/esm/Hero-1b663f28.js +0 -1
- package/dist/esm/HighlightenVideo-5c3fd0fd.js +0 -1
- package/dist/esm/HorizontalArticleListing-cccace2e.js +0 -1
- package/dist/esm/HorizontalHero-8633a55c.js +0 -1
- package/dist/esm/ImageSlider-c354db50.js +0 -1
- package/dist/esm/IssueContentDeck-915409a7.js +0 -1
- package/dist/esm/IssueDeck-61a4a550.js +0 -1
- package/dist/esm/IssueLanding-a59c91ee.js +0 -1
- package/dist/esm/KMTracker-d9e1c288.js +0 -1
- package/dist/esm/LeftNav-a3852fbe.js +0 -1
- package/dist/esm/Magazine-7d6e5dcd.js +0 -1
- package/dist/esm/MasterDeck-41c7cd70.js +0 -1
- package/dist/esm/MediaSeriesCard-cf72ce87.js +0 -1
- package/dist/esm/Native-bf89940a.js +0 -1
- package/dist/esm/NavFooter-83d89acd.js +0 -1
- package/dist/esm/Normal-06895213.js +0 -1
- package/dist/esm/OncliveHero-19794e52.js +0 -1
- package/dist/esm/OncliveLargeHero-01d4c10f.js +0 -1
- package/dist/esm/PageFilter-81144bcb.js +0 -1
- package/dist/esm/Pagination-44c3ff7c.js +0 -1
- package/dist/esm/PartnerDetailListing-429d60e1.js +0 -1
- package/dist/esm/PdfDownload-eff648d3.js +0 -1
- package/dist/esm/PopUpModal-a2735a23.js +0 -1
- package/dist/esm/PubSection-3d940b53.js +0 -1
- package/dist/esm/PubToc-52a85696.js +0 -1
- package/dist/esm/PublicationDeck-538d397e.js +0 -1
- package/dist/esm/PublicationFeature-6deea07c.js +0 -1
- package/dist/esm/PublicationLanding-48ebce9b.js +0 -1
- package/dist/esm/Queue-847df47f.js +0 -1
- package/dist/esm/QueueDeckExpanded-fdc60f72.js +0 -1
- package/dist/esm/RelatedContent-f3eaad29.js +0 -1
- package/dist/esm/RelatedTopicsDropdown-0cf5829a.js +0 -1
- package/dist/esm/RolesDeck-6146633e.js +0 -1
- package/dist/esm/Schema-c7f42de0.js +0 -1
- package/dist/esm/SeriesSlider-a00cd257.js +0 -1
- package/dist/esm/SideFooter-7cd5abc0.js +0 -1
- package/dist/esm/SocialIcons-c7861c13.js +0 -1
- package/dist/esm/SocialNavFooter-66c6cf3c.js +0 -1
- package/dist/esm/SocialSearchComponent-e74e11f8.js +0 -1
- package/dist/esm/SocialShare-9cc43665.js +0 -1
- package/dist/esm/TaxonomyCard-507f5c95.js +0 -1
- package/dist/esm/TaxonomyDescription-ee6ae52e.js +0 -1
- package/dist/esm/ThumbnailCard-b7a3af71.js +0 -1
- package/dist/esm/Ustream-29dc2277.js +0 -1
- package/dist/esm/VerticalHero-ffc93a70.js +0 -1
- package/dist/esm/VideoProgramLandingPage-179db5b2.js +0 -1
- package/dist/esm/VideoSeriesFilter-b6bd4c07.js +0 -1
- package/dist/esm/VideoSeriesLandingPage-180a2469.js +0 -1
- package/dist/esm/VideoSeriesListing-62650a53.js +0 -1
- package/dist/esm/YahooHero-ddfeb2a5.js +0 -1
- package/dist/esm/YoutubeGroup-1dd6f1ba.js +0 -1
- package/dist/esm/_commonjsHelpers-57e89916.js +0 -1
- package/dist/esm/beam-50a5c4d8.js +0 -1
- package/dist/esm/checkSisterSite-20e2bf62.js +0 -1
- package/dist/esm/defineProperty-18999f8e.js +0 -1
- package/dist/esm/entities-8b138943.js +0 -1
- package/dist/esm/extends-e61fd370.js +0 -1
- package/dist/esm/getContentCategory-f99fdf90.js +0 -1
- package/dist/esm/getKeywords-2512775a.js +0 -1
- package/dist/esm/getPrototypeOf-a8361cb6.js +0 -1
- package/dist/esm/getQuery-bfc0390c.js +0 -1
- package/dist/esm/getRelatedArticle-66a08458.js +0 -1
- package/dist/esm/getSeriesDetail-aef9680c.js +0 -1
- package/dist/esm/getTargeting-eeb7bb6a.js +0 -1
- package/dist/esm/index-00bbf2b1.js +0 -1
- package/dist/esm/index-24498aa0.js +0 -1
- package/dist/esm/index-541d17f5.js +0 -1
- package/dist/esm/index-a96a4f73.js +0 -1
- package/dist/esm/searchForm-8218e558.js +0 -1
- package/dist/esm/segment-lib-3a19dbdd.js +0 -1
- package/dist/esm/setCookie-0f2ab6df.js +0 -1
- package/dist/esm/slicedToArray-f57adb2c.js +0 -1
- package/dist/esm/toConsumableArray-2f86a0c1.js +0 -1
- package/dist/esm/typeof-92b42de1.js +0 -1
- package/dist/esm/unsupportedIterableToArray-b359dd50.js +0 -1
- package/dist/esm/urlFor-649884fa.js +0 -1
- package/dist/esm/urlForFile-3b87fb01.js +0 -1
- package/dist/esm/ustream-api-7998d140.js +0 -1
|
@@ -0,0 +1,1209 @@
|
|
|
1
|
+
import { c as createCommonjsModule, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
|
|
2
|
+
import { E as EventEmitter } from './events-6c3a7a63.js';
|
|
3
|
+
import React__default from 'react';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
|
|
6
|
+
var utils = createCommonjsModule(function (module, exports) {
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "__esModule", {
|
|
9
|
+
value: true
|
|
10
|
+
});
|
|
11
|
+
exports.loadGPTScript = loadGPTScript;
|
|
12
|
+
|
|
13
|
+
function doloadGPTScript(resolve, reject) {
|
|
14
|
+
window.googletag = window.googletag || {};
|
|
15
|
+
window.googletag.cmd = window.googletag.cmd || [];
|
|
16
|
+
var scriptTag = document.createElement('script');
|
|
17
|
+
scriptTag.src = "".concat(document.location.protocol, "//securepubads.g.doubleclick.net/tag/js/gpt.js");
|
|
18
|
+
scriptTag.async = true;
|
|
19
|
+
scriptTag.type = 'text/javascript';
|
|
20
|
+
|
|
21
|
+
scriptTag.onerror = function scriptTagOnError(errs) {
|
|
22
|
+
reject(errs);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
scriptTag.onload = function scriptTagOnLoad() {
|
|
26
|
+
resolve(window.googletag);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
document.getElementsByTagName('head')[0].appendChild(scriptTag);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function loadGPTScript() {
|
|
33
|
+
return new Promise(function (resolve, reject) {
|
|
34
|
+
doloadGPTScript(resolve, reject);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
unwrapExports(utils);
|
|
40
|
+
utils.loadGPTScript;
|
|
41
|
+
|
|
42
|
+
var manager = createCommonjsModule(function (module, exports) {
|
|
43
|
+
|
|
44
|
+
Object.defineProperty(exports, "__esModule", {
|
|
45
|
+
value: true
|
|
46
|
+
});
|
|
47
|
+
exports.default = void 0;
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
var Utils = _interopRequireWildcard(utils);
|
|
52
|
+
|
|
53
|
+
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; } }
|
|
54
|
+
|
|
55
|
+
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; }
|
|
56
|
+
|
|
57
|
+
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; }
|
|
58
|
+
|
|
59
|
+
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); }
|
|
60
|
+
|
|
61
|
+
var loadPromise = null;
|
|
62
|
+
var googleGPTScriptLoadPromise = null;
|
|
63
|
+
var singleRequestEnabled = true;
|
|
64
|
+
var disableInitialLoadEnabled = false;
|
|
65
|
+
var lazyLoadEnabled = false;
|
|
66
|
+
var lazyLoadConfig = null;
|
|
67
|
+
var servePersonalizedAds = true;
|
|
68
|
+
var serveCookies = true;
|
|
69
|
+
var registeredSlots = {};
|
|
70
|
+
var managerAlreadyInitialized = false;
|
|
71
|
+
var globalTargetingArguments = {};
|
|
72
|
+
var globalAdSenseAttributes = {};
|
|
73
|
+
var DFPManager = Object.assign(new EventEmitter.EventEmitter().setMaxListeners(0), {
|
|
74
|
+
singleRequestIsEnabled: function singleRequestIsEnabled() {
|
|
75
|
+
return singleRequestEnabled;
|
|
76
|
+
},
|
|
77
|
+
configureSingleRequest: function configureSingleRequest(value) {
|
|
78
|
+
singleRequestEnabled = !!value;
|
|
79
|
+
},
|
|
80
|
+
disableInitialLoadIsEnabled: function disableInitialLoadIsEnabled() {
|
|
81
|
+
return disableInitialLoadEnabled;
|
|
82
|
+
},
|
|
83
|
+
configureDisableInitialLoad: function configureDisableInitialLoad(value) {
|
|
84
|
+
disableInitialLoadEnabled = !!value;
|
|
85
|
+
},
|
|
86
|
+
configureLazyLoad: function configureLazyLoad() {
|
|
87
|
+
var enable = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
88
|
+
var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
89
|
+
var conf = null;
|
|
90
|
+
|
|
91
|
+
if (config !== null && _typeof(config) === 'object') {
|
|
92
|
+
conf = _objectSpread({}, config);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
lazyLoadEnabled = !!enable;
|
|
96
|
+
lazyLoadConfig = conf;
|
|
97
|
+
},
|
|
98
|
+
lazyLoadIsEnabled: function lazyLoadIsEnabled() {
|
|
99
|
+
return lazyLoadEnabled;
|
|
100
|
+
},
|
|
101
|
+
getLazyLoadConfig: function getLazyLoadConfig() {
|
|
102
|
+
return lazyLoadConfig;
|
|
103
|
+
},
|
|
104
|
+
getAdSenseAttribute: function getAdSenseAttribute(key) {
|
|
105
|
+
return globalAdSenseAttributes[key];
|
|
106
|
+
},
|
|
107
|
+
configurePersonalizedAds: function configurePersonalizedAds(value) {
|
|
108
|
+
servePersonalizedAds = value;
|
|
109
|
+
},
|
|
110
|
+
configureCookieOption: function configureCookieOption(value) {
|
|
111
|
+
serveCookies = value;
|
|
112
|
+
},
|
|
113
|
+
personalizedAdsEnabled: function personalizedAdsEnabled() {
|
|
114
|
+
return servePersonalizedAds;
|
|
115
|
+
},
|
|
116
|
+
cookiesEnabled: function cookiesEnabled() {
|
|
117
|
+
return serveCookies;
|
|
118
|
+
},
|
|
119
|
+
setAdSenseAttribute: function setAdSenseAttribute(key, value) {
|
|
120
|
+
this.setAdSenseAttributes(_defineProperty({}, key, value));
|
|
121
|
+
},
|
|
122
|
+
getAdSenseAttributes: function getAdSenseAttributes() {
|
|
123
|
+
return _objectSpread({}, globalAdSenseAttributes);
|
|
124
|
+
},
|
|
125
|
+
setAdSenseAttributes: function setAdSenseAttributes(attrs) {
|
|
126
|
+
Object.assign(globalAdSenseAttributes, attrs);
|
|
127
|
+
|
|
128
|
+
if (managerAlreadyInitialized === true) {
|
|
129
|
+
this.getGoogletag().then(function (googletag) {
|
|
130
|
+
googletag.cmd.push(function () {
|
|
131
|
+
var pubadsService = googletag.pubads();
|
|
132
|
+
Object.keys(globalAdSenseAttributes).forEach(function (key) {
|
|
133
|
+
pubadsService.set(key, globalTargetingArguments[key]);
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
setTargetingArguments: function setTargetingArguments(data) {
|
|
140
|
+
Object.assign(globalTargetingArguments, data);
|
|
141
|
+
|
|
142
|
+
if (managerAlreadyInitialized === true) {
|
|
143
|
+
this.getGoogletag().then(function (googletag) {
|
|
144
|
+
googletag.cmd.push(function () {
|
|
145
|
+
var pubadsService = googletag.pubads();
|
|
146
|
+
Object.keys(globalTargetingArguments).forEach(function (varName) {
|
|
147
|
+
if (pubadsService) {
|
|
148
|
+
pubadsService.setTargeting(varName, globalTargetingArguments[varName]);
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
getTargetingArguments: function getTargetingArguments() {
|
|
156
|
+
return _objectSpread({}, globalTargetingArguments);
|
|
157
|
+
},
|
|
158
|
+
getSlotProperty: function getSlotProperty(slotId, propName) {
|
|
159
|
+
var slot = this.getRegisteredSlots()[slotId];
|
|
160
|
+
var ret = null;
|
|
161
|
+
|
|
162
|
+
if (slot !== undefined) {
|
|
163
|
+
ret = slot[propName] || ret;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
return ret;
|
|
167
|
+
},
|
|
168
|
+
getSlotTargetingArguments: function getSlotTargetingArguments(slotId) {
|
|
169
|
+
var propValue = this.getSlotProperty(slotId, 'targetingArguments');
|
|
170
|
+
return propValue ? _objectSpread({}, propValue) : null;
|
|
171
|
+
},
|
|
172
|
+
getSlotAdSenseAttributes: function getSlotAdSenseAttributes(slotId) {
|
|
173
|
+
var propValue = this.getSlotProperty(slotId, 'adSenseAttributes');
|
|
174
|
+
return propValue ? _objectSpread({}, propValue) : null;
|
|
175
|
+
},
|
|
176
|
+
init: function init() {
|
|
177
|
+
var _this = this;
|
|
178
|
+
|
|
179
|
+
if (managerAlreadyInitialized === false) {
|
|
180
|
+
managerAlreadyInitialized = true;
|
|
181
|
+
this.getGoogletag().then(function (googletag) {
|
|
182
|
+
googletag.cmd.push(function () {
|
|
183
|
+
var pubadsService = googletag.pubads();
|
|
184
|
+
pubadsService.addEventListener('slotRenderEnded', function (event) {
|
|
185
|
+
var slotId = event.slot.getSlotElementId();
|
|
186
|
+
|
|
187
|
+
_this.emit('slotRenderEnded', {
|
|
188
|
+
slotId: slotId,
|
|
189
|
+
event: event
|
|
190
|
+
});
|
|
191
|
+
});
|
|
192
|
+
pubadsService.addEventListener('impressionViewable', function (event) {
|
|
193
|
+
var slotId = event.slot.getSlotElementId();
|
|
194
|
+
|
|
195
|
+
_this.emit('impressionViewable', {
|
|
196
|
+
slotId: slotId,
|
|
197
|
+
event: event
|
|
198
|
+
});
|
|
199
|
+
});
|
|
200
|
+
pubadsService.addEventListener('slotVisibilityChanged', function (event) {
|
|
201
|
+
var slotId = event.slot.getSlotElementId();
|
|
202
|
+
|
|
203
|
+
_this.emit('slotVisibilityChanged', {
|
|
204
|
+
slotId: slotId,
|
|
205
|
+
event: event
|
|
206
|
+
});
|
|
207
|
+
});
|
|
208
|
+
pubadsService.setRequestNonPersonalizedAds(_this.personalizedAdsEnabled() ? 0 : 1);
|
|
209
|
+
pubadsService.setCookieOptions(_this.cookiesEnabled() ? 0 : 1);
|
|
210
|
+
});
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
getGoogletag: function getGoogletag() {
|
|
215
|
+
if (googleGPTScriptLoadPromise === null) {
|
|
216
|
+
googleGPTScriptLoadPromise = Utils.loadGPTScript();
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
return googleGPTScriptLoadPromise;
|
|
220
|
+
},
|
|
221
|
+
setCollapseEmptyDivs: function setCollapseEmptyDivs(collapse) {
|
|
222
|
+
this.collapseEmptyDivs = collapse;
|
|
223
|
+
},
|
|
224
|
+
load: function load() {
|
|
225
|
+
var _this2 = this;
|
|
226
|
+
|
|
227
|
+
for (var _len = arguments.length, slots = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
228
|
+
slots[_key] = arguments[_key];
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
if (loadPromise === null) {
|
|
232
|
+
loadPromise = this.doLoad.apply(this, slots);
|
|
233
|
+
} else {
|
|
234
|
+
loadPromise = loadPromise.then(function () {
|
|
235
|
+
return _this2.doLoad.apply(_this2, slots);
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
doLoad: function doLoad() {
|
|
240
|
+
this.init();
|
|
241
|
+
var availableSlots = {};
|
|
242
|
+
|
|
243
|
+
for (var _len2 = arguments.length, slots = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
244
|
+
slots[_key2] = arguments[_key2];
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
if (slots.length > 0) {
|
|
248
|
+
availableSlots = slots.filter(function (slotId) {
|
|
249
|
+
return Object.prototype.hasOwnProperty.call(registeredSlots, slotId);
|
|
250
|
+
});
|
|
251
|
+
} else {
|
|
252
|
+
availableSlots = Object.keys(registeredSlots);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
availableSlots = availableSlots.filter(function (id) {
|
|
256
|
+
return !registeredSlots[id].loading && !registeredSlots[id].gptSlot;
|
|
257
|
+
});
|
|
258
|
+
availableSlots.forEach(function (slotId) {
|
|
259
|
+
registeredSlots[slotId].loading = true;
|
|
260
|
+
});
|
|
261
|
+
return this.gptLoadAds(availableSlots);
|
|
262
|
+
},
|
|
263
|
+
gptLoadAds: function gptLoadAds(slotsToInitialize) {
|
|
264
|
+
var _this3 = this;
|
|
265
|
+
|
|
266
|
+
return new Promise(function (resolve) {
|
|
267
|
+
_this3.getGoogletag().then(function (googletag) {
|
|
268
|
+
_this3.configureInitialOptions(googletag);
|
|
269
|
+
|
|
270
|
+
slotsToInitialize.forEach(function (currentSlotId) {
|
|
271
|
+
registeredSlots[currentSlotId].loading = false;
|
|
272
|
+
googletag.cmd.push(function () {
|
|
273
|
+
var slot = registeredSlots[currentSlotId];
|
|
274
|
+
var gptSlot;
|
|
275
|
+
var adUnit = "".concat(slot.dfpNetworkId, "/").concat(slot.adUnit);
|
|
276
|
+
|
|
277
|
+
if (slot.renderOutOfThePage === true) {
|
|
278
|
+
gptSlot = googletag.defineOutOfPageSlot(adUnit, currentSlotId);
|
|
279
|
+
} else {
|
|
280
|
+
gptSlot = googletag.defineSlot(adUnit, slot.sizes, currentSlotId);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
if (gptSlot !== null) {
|
|
284
|
+
slot.gptSlot = gptSlot;
|
|
285
|
+
|
|
286
|
+
var slotTargetingArguments = _this3.getSlotTargetingArguments(currentSlotId);
|
|
287
|
+
|
|
288
|
+
if (slotTargetingArguments !== null) {
|
|
289
|
+
Object.keys(slotTargetingArguments).forEach(function (varName) {
|
|
290
|
+
if (slot && slot.gptSlot) {
|
|
291
|
+
slot.gptSlot.setTargeting(varName, slotTargetingArguments[varName]);
|
|
292
|
+
}
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
var slotAdSenseAttributes = _this3.getSlotAdSenseAttributes(currentSlotId);
|
|
297
|
+
|
|
298
|
+
if (slotAdSenseAttributes !== null) {
|
|
299
|
+
Object.keys(slotAdSenseAttributes).forEach(function (varName) {
|
|
300
|
+
slot.gptSlot.set(varName, slotAdSenseAttributes[varName]);
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
slot.gptSlot.addService(googletag.pubads());
|
|
305
|
+
|
|
306
|
+
if (slot.sizeMapping) {
|
|
307
|
+
var smbuilder = googletag.sizeMapping();
|
|
308
|
+
slot.sizeMapping.forEach(function (mapping) {
|
|
309
|
+
smbuilder = smbuilder.addSize(mapping.viewport, mapping.sizes);
|
|
310
|
+
});
|
|
311
|
+
slot.gptSlot.defineSizeMapping(smbuilder.build());
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
});
|
|
315
|
+
});
|
|
316
|
+
|
|
317
|
+
_this3.configureOptions(googletag);
|
|
318
|
+
|
|
319
|
+
googletag.cmd.push(function () {
|
|
320
|
+
googletag.enableServices();
|
|
321
|
+
slotsToInitialize.forEach(function (theSlotId) {
|
|
322
|
+
googletag.display(theSlotId);
|
|
323
|
+
});
|
|
324
|
+
resolve();
|
|
325
|
+
});
|
|
326
|
+
});
|
|
327
|
+
});
|
|
328
|
+
},
|
|
329
|
+
// configure those gpt parameters that need to be set before pubsads service
|
|
330
|
+
// initialization.
|
|
331
|
+
configureInitialOptions: function configureInitialOptions(googletag) {
|
|
332
|
+
var _this4 = this;
|
|
333
|
+
|
|
334
|
+
googletag.cmd.push(function () {
|
|
335
|
+
if (_this4.disableInitialLoadIsEnabled()) {
|
|
336
|
+
googletag.pubads().disableInitialLoad();
|
|
337
|
+
}
|
|
338
|
+
});
|
|
339
|
+
},
|
|
340
|
+
configureOptions: function configureOptions(googletag) {
|
|
341
|
+
var _this5 = this;
|
|
342
|
+
|
|
343
|
+
googletag.cmd.push(function () {
|
|
344
|
+
var pubadsService = googletag.pubads();
|
|
345
|
+
pubadsService.setRequestNonPersonalizedAds(_this5.personalizedAdsEnabled() ? 0 : 1);
|
|
346
|
+
pubadsService.setCookieOptions(_this5.cookiesEnabled() ? 0 : 1);
|
|
347
|
+
|
|
348
|
+
var targetingArguments = _this5.getTargetingArguments(); // set global targetting arguments
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
Object.keys(targetingArguments).forEach(function (varName) {
|
|
352
|
+
if (pubadsService) {
|
|
353
|
+
pubadsService.setTargeting(varName, targetingArguments[varName]);
|
|
354
|
+
}
|
|
355
|
+
}); // set global adSense attributes
|
|
356
|
+
|
|
357
|
+
var adSenseAttributes = _this5.getAdSenseAttributes();
|
|
358
|
+
|
|
359
|
+
Object.keys(adSenseAttributes).forEach(function (key) {
|
|
360
|
+
pubadsService.set(key, adSenseAttributes[key]);
|
|
361
|
+
});
|
|
362
|
+
|
|
363
|
+
if (_this5.lazyLoadIsEnabled()) {
|
|
364
|
+
var config = _this5.getLazyLoadConfig();
|
|
365
|
+
|
|
366
|
+
if (config) {
|
|
367
|
+
pubadsService.enableLazyLoad(config);
|
|
368
|
+
} else {
|
|
369
|
+
pubadsService.enableLazyLoad();
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
if (_this5.singleRequestIsEnabled()) {
|
|
374
|
+
pubadsService.enableSingleRequest();
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
if (_this5.collapseEmptyDivs === true || _this5.collapseEmptyDivs === false) {
|
|
378
|
+
pubadsService.collapseEmptyDivs(_this5.collapseEmptyDivs);
|
|
379
|
+
}
|
|
380
|
+
});
|
|
381
|
+
},
|
|
382
|
+
getRefreshableSlots: function getRefreshableSlots() {
|
|
383
|
+
var slots = {};
|
|
384
|
+
|
|
385
|
+
for (var _len3 = arguments.length, slotsArray = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
386
|
+
slotsArray[_key3] = arguments[_key3];
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
if (slotsArray.length === 0) {
|
|
390
|
+
var slotsToRefresh = Object.keys(registeredSlots).map(function (k) {
|
|
391
|
+
return registeredSlots[k];
|
|
392
|
+
});
|
|
393
|
+
return slotsToRefresh.reduce(function (last, slot) {
|
|
394
|
+
if (slot.slotShouldRefresh() === true) {
|
|
395
|
+
slots[slot.slotId] = slot;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
return slots;
|
|
399
|
+
}, slots);
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
return slotsArray.reduce(function (last, slotId) {
|
|
403
|
+
var slot = registeredSlots[slotId];
|
|
404
|
+
|
|
405
|
+
if (typeof slot !== 'undefined') {
|
|
406
|
+
slots[slotId] = slot;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
return slots;
|
|
410
|
+
}, slots);
|
|
411
|
+
},
|
|
412
|
+
refresh: function refresh() {
|
|
413
|
+
var _this6 = this;
|
|
414
|
+
|
|
415
|
+
for (var _len4 = arguments.length, slots = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
416
|
+
slots[_key4] = arguments[_key4];
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
if (loadPromise === null) {
|
|
420
|
+
this.load();
|
|
421
|
+
} else {
|
|
422
|
+
loadPromise.then(function () {
|
|
423
|
+
_this6.gptRefreshAds(Object.keys(_this6.getRefreshableSlots.apply(_this6, slots)));
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
},
|
|
427
|
+
gptRefreshAds: function gptRefreshAds(slots) {
|
|
428
|
+
var _this7 = this;
|
|
429
|
+
|
|
430
|
+
return this.getGoogletag().then(function (googletag) {
|
|
431
|
+
_this7.configureOptions(googletag);
|
|
432
|
+
|
|
433
|
+
googletag.cmd.push(function () {
|
|
434
|
+
var pubadsService = googletag.pubads();
|
|
435
|
+
pubadsService.refresh(slots.map(function (slotId) {
|
|
436
|
+
return registeredSlots[slotId].gptSlot;
|
|
437
|
+
}));
|
|
438
|
+
});
|
|
439
|
+
});
|
|
440
|
+
},
|
|
441
|
+
reload: function reload() {
|
|
442
|
+
var _this8 = this;
|
|
443
|
+
|
|
444
|
+
return this.destroyGPTSlots.apply(this, arguments).then(function () {
|
|
445
|
+
return _this8.load();
|
|
446
|
+
});
|
|
447
|
+
},
|
|
448
|
+
destroyGPTSlots: function destroyGPTSlots() {
|
|
449
|
+
var _this9 = this;
|
|
450
|
+
|
|
451
|
+
for (var _len5 = arguments.length, slotsToDestroy = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
452
|
+
slotsToDestroy[_key5] = arguments[_key5];
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
if (slotsToDestroy.length === 0) {
|
|
456
|
+
// eslint-disable-next-line no-param-reassign
|
|
457
|
+
slotsToDestroy = Object.keys(registeredSlots);
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
return new Promise(function (resolve) {
|
|
461
|
+
var slots = []; // eslint-disable-next-line guard-for-in,no-restricted-syntax
|
|
462
|
+
|
|
463
|
+
for (var idx in slotsToDestroy) {
|
|
464
|
+
var slotId = slotsToDestroy[idx];
|
|
465
|
+
var slot = registeredSlots[slotId];
|
|
466
|
+
slots.push(slot);
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
_this9.getGoogletag().then(function (googletag) {
|
|
470
|
+
googletag.cmd.push(function () {
|
|
471
|
+
if (managerAlreadyInitialized === true) {
|
|
472
|
+
if (slotsToDestroy.length > 0) {
|
|
473
|
+
// eslint-disable-next-line guard-for-in,no-restricted-syntax
|
|
474
|
+
for (var _idx in slots) {
|
|
475
|
+
var _slot = slots[_idx];
|
|
476
|
+
slots.push(_slot.gptSlot);
|
|
477
|
+
delete _slot.gptSlot;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
googletag.destroySlots(slots);
|
|
481
|
+
} else {
|
|
482
|
+
googletag.destroySlots();
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
resolve(slotsToDestroy);
|
|
487
|
+
});
|
|
488
|
+
});
|
|
489
|
+
});
|
|
490
|
+
},
|
|
491
|
+
registerSlot: function registerSlot(_ref) {
|
|
492
|
+
var _this10 = this;
|
|
493
|
+
|
|
494
|
+
var slotId = _ref.slotId,
|
|
495
|
+
dfpNetworkId = _ref.dfpNetworkId,
|
|
496
|
+
adUnit = _ref.adUnit,
|
|
497
|
+
sizes = _ref.sizes,
|
|
498
|
+
renderOutOfThePage = _ref.renderOutOfThePage,
|
|
499
|
+
sizeMapping = _ref.sizeMapping,
|
|
500
|
+
adSenseAttributes = _ref.adSenseAttributes,
|
|
501
|
+
targetingArguments = _ref.targetingArguments,
|
|
502
|
+
slotShouldRefresh = _ref.slotShouldRefresh;
|
|
503
|
+
var autoLoad = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
504
|
+
|
|
505
|
+
if (!Object.prototype.hasOwnProperty.call(registeredSlots, slotId)) {
|
|
506
|
+
registeredSlots[slotId] = {
|
|
507
|
+
slotId: slotId,
|
|
508
|
+
sizes: sizes,
|
|
509
|
+
renderOutOfThePage: renderOutOfThePage,
|
|
510
|
+
dfpNetworkId: dfpNetworkId,
|
|
511
|
+
adUnit: adUnit,
|
|
512
|
+
adSenseAttributes: adSenseAttributes,
|
|
513
|
+
targetingArguments: targetingArguments,
|
|
514
|
+
sizeMapping: sizeMapping,
|
|
515
|
+
slotShouldRefresh: slotShouldRefresh,
|
|
516
|
+
loading: false
|
|
517
|
+
};
|
|
518
|
+
this.emit('slotRegistered', {
|
|
519
|
+
slotId: slotId
|
|
520
|
+
});
|
|
521
|
+
|
|
522
|
+
if (autoLoad === true && loadPromise !== null) {
|
|
523
|
+
loadPromise = loadPromise.catch().then(function () {
|
|
524
|
+
var slot = registeredSlots[slotId];
|
|
525
|
+
|
|
526
|
+
if (typeof slot !== 'undefined') {
|
|
527
|
+
var loading = slot.loading,
|
|
528
|
+
gptSlot = slot.gptSlot;
|
|
529
|
+
|
|
530
|
+
if (loading === false && !gptSlot) {
|
|
531
|
+
_this10.load(slotId);
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
});
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
},
|
|
538
|
+
unregisterSlot: function unregisterSlot(_ref2) {
|
|
539
|
+
var slotId = _ref2.slotId;
|
|
540
|
+
this.destroyGPTSlots(slotId);
|
|
541
|
+
delete registeredSlots[slotId];
|
|
542
|
+
},
|
|
543
|
+
getRegisteredSlots: function getRegisteredSlots() {
|
|
544
|
+
return registeredSlots;
|
|
545
|
+
},
|
|
546
|
+
attachSlotRenderEnded: function attachSlotRenderEnded(cb) {
|
|
547
|
+
this.on('slotRenderEnded', cb);
|
|
548
|
+
},
|
|
549
|
+
detachSlotRenderEnded: function detachSlotRenderEnded(cb) {
|
|
550
|
+
this.removeListener('slotRenderEnded', cb);
|
|
551
|
+
},
|
|
552
|
+
attachSlotVisibilityChanged: function attachSlotVisibilityChanged(cb) {
|
|
553
|
+
this.on('slotVisibilityChanged', cb);
|
|
554
|
+
},
|
|
555
|
+
detachSlotVisibilityChanged: function detachSlotVisibilityChanged(cb) {
|
|
556
|
+
this.removeListener('slotVisibilityChanged', cb);
|
|
557
|
+
},
|
|
558
|
+
attachSlotIsViewable: function attachSlotIsViewable(cb) {
|
|
559
|
+
this.on('impressionViewable', cb);
|
|
560
|
+
},
|
|
561
|
+
detachSlotIsViewable: function detachSlotIsViewable(cb) {
|
|
562
|
+
this.removeListener('impressionViewable', cb);
|
|
563
|
+
}
|
|
564
|
+
});
|
|
565
|
+
var _default = DFPManager;
|
|
566
|
+
exports.default = _default;
|
|
567
|
+
});
|
|
568
|
+
|
|
569
|
+
unwrapExports(manager);
|
|
570
|
+
|
|
571
|
+
var dfpslotsprovider = createCommonjsModule(function (module, exports) {
|
|
572
|
+
|
|
573
|
+
Object.defineProperty(exports, "__esModule", {
|
|
574
|
+
value: true
|
|
575
|
+
});
|
|
576
|
+
exports.default = exports.Context = void 0;
|
|
577
|
+
|
|
578
|
+
var _react = _interopRequireDefault(React__default);
|
|
579
|
+
|
|
580
|
+
var _propTypes = _interopRequireDefault(PropTypes);
|
|
581
|
+
|
|
582
|
+
var _manager = _interopRequireDefault(manager);
|
|
583
|
+
|
|
584
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
585
|
+
|
|
586
|
+
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); }
|
|
587
|
+
|
|
588
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
589
|
+
|
|
590
|
+
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); } }
|
|
591
|
+
|
|
592
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
593
|
+
|
|
594
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
595
|
+
|
|
596
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
597
|
+
|
|
598
|
+
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); }
|
|
599
|
+
|
|
600
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
601
|
+
|
|
602
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
603
|
+
|
|
604
|
+
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; }
|
|
605
|
+
|
|
606
|
+
// React.createContext is undefined for React < 16.3
|
|
607
|
+
var Context = _react.default.createContext ? _react.default.createContext({
|
|
608
|
+
dfpNetworkId: null,
|
|
609
|
+
dfpAdUnit: null,
|
|
610
|
+
dfpSizeMapping: null,
|
|
611
|
+
dfpTargetingArguments: null,
|
|
612
|
+
newSlotCallback: null
|
|
613
|
+
}) : null;
|
|
614
|
+
exports.Context = Context;
|
|
615
|
+
|
|
616
|
+
var DFPSlotsProvider =
|
|
617
|
+
/*#__PURE__*/
|
|
618
|
+
function (_React$Component) {
|
|
619
|
+
_inherits(DFPSlotsProvider, _React$Component);
|
|
620
|
+
|
|
621
|
+
function DFPSlotsProvider(props) {
|
|
622
|
+
var _this;
|
|
623
|
+
|
|
624
|
+
_classCallCheck(this, DFPSlotsProvider);
|
|
625
|
+
|
|
626
|
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(DFPSlotsProvider).call(this, props));
|
|
627
|
+
_this.loadAdsIfPossible = _this.loadAdsIfPossible.bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
|
628
|
+
_this.newSlotCallback = _this.newSlotCallback.bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
|
629
|
+
_this.applyConfigs = _this.applyConfigs.bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
|
630
|
+
_this.shouldReloadConfig = _this.shouldReloadConfig.bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
|
631
|
+
_this.attachLoadCallback = _this.attachLoadCallback.bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
|
632
|
+
_this.getContextValue = _this.getContextValue.bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
|
633
|
+
_this.loadAlreadyCalled = false;
|
|
634
|
+
_this.loadCallbackAttached = false;
|
|
635
|
+
_this.shouldReloadAds = false;
|
|
636
|
+
_this.totalSlots = 0;
|
|
637
|
+
_this.contextValue = {};
|
|
638
|
+
|
|
639
|
+
if (Context === null) {
|
|
640
|
+
_this.getChildContext = function () {
|
|
641
|
+
return _this.getContextValue();
|
|
642
|
+
};
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
return _this;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
_createClass(DFPSlotsProvider, [{
|
|
649
|
+
key: "componentDidMount",
|
|
650
|
+
value: function componentDidMount() {
|
|
651
|
+
this.applyConfigs();
|
|
652
|
+
|
|
653
|
+
if (this.props.autoLoad && !this.loadAdsIfPossible()) {
|
|
654
|
+
this.attachLoadCallback();
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
}, {
|
|
658
|
+
key: "shouldComponentUpdate",
|
|
659
|
+
value: function shouldComponentUpdate(nextProps) {
|
|
660
|
+
this.shouldReloadAds = this.shouldReloadConfig(nextProps);
|
|
661
|
+
|
|
662
|
+
if (nextProps.children !== this.props.children) {
|
|
663
|
+
return true;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
if (nextProps.autoLoad && !this.props.autoLoad) {
|
|
667
|
+
return true;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
return this.shouldReloadAds;
|
|
671
|
+
}
|
|
672
|
+
}, {
|
|
673
|
+
key: "componentDidUpdate",
|
|
674
|
+
value: function componentDidUpdate() {
|
|
675
|
+
this.applyConfigs();
|
|
676
|
+
|
|
677
|
+
if (this.props.autoLoad) {
|
|
678
|
+
if (this.loadAlreadyCalled) {
|
|
679
|
+
if (this.shouldReloadAds) {
|
|
680
|
+
_manager.default.reload();
|
|
681
|
+
}
|
|
682
|
+
} else if (!this.loadAdsIfPossible()) {
|
|
683
|
+
this.attachLoadCallback();
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
this.shouldReloadAds = false;
|
|
688
|
+
}
|
|
689
|
+
}, {
|
|
690
|
+
key: "getContextValue",
|
|
691
|
+
value: function getContextValue() {
|
|
692
|
+
var _this$props = this.props,
|
|
693
|
+
dfpNetworkId = _this$props.dfpNetworkId,
|
|
694
|
+
dfpAdUnit = _this$props.adUnit,
|
|
695
|
+
dfpSizeMapping = _this$props.sizeMapping,
|
|
696
|
+
dfpTargetingArguments = _this$props.targetingArguments,
|
|
697
|
+
_this$contextValue = this.contextValue,
|
|
698
|
+
ctxDfpNetworkId = _this$contextValue.dfpNetworkId,
|
|
699
|
+
ctxDfpAdUnit = _this$contextValue.adUnit,
|
|
700
|
+
ctxDfpSizeMapping = _this$contextValue.sizeMapping,
|
|
701
|
+
ctxDfpTargetingArguments = _this$contextValue.targetingArguments; // performance: update context value object only when any of its
|
|
702
|
+
// props is updated.
|
|
703
|
+
|
|
704
|
+
if (dfpNetworkId !== ctxDfpNetworkId || dfpAdUnit !== ctxDfpAdUnit || dfpSizeMapping !== ctxDfpSizeMapping || dfpTargetingArguments !== ctxDfpTargetingArguments) {
|
|
705
|
+
this.contextValue = {
|
|
706
|
+
dfpNetworkId: dfpNetworkId,
|
|
707
|
+
dfpAdUnit: dfpAdUnit,
|
|
708
|
+
dfpSizeMapping: dfpSizeMapping,
|
|
709
|
+
dfpTargetingArguments: dfpTargetingArguments,
|
|
710
|
+
newSlotCallback: this.newSlotCallback
|
|
711
|
+
};
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
return this.contextValue;
|
|
715
|
+
}
|
|
716
|
+
}, {
|
|
717
|
+
key: "applyConfigs",
|
|
718
|
+
value: function applyConfigs() {
|
|
719
|
+
_manager.default.configurePersonalizedAds(this.props.personalizedAds);
|
|
720
|
+
|
|
721
|
+
_manager.default.configureCookieOption(this.props.cookieOption);
|
|
722
|
+
|
|
723
|
+
_manager.default.configureSingleRequest(this.props.singleRequest);
|
|
724
|
+
|
|
725
|
+
_manager.default.configureDisableInitialLoad(this.props.disableInitialLoad);
|
|
726
|
+
|
|
727
|
+
_manager.default.configureLazyLoad(!!this.props.lazyLoad, typeof this.props.lazyLoad === 'boolean' ? null : this.props.lazyLoad);
|
|
728
|
+
|
|
729
|
+
_manager.default.setAdSenseAttributes(this.props.adSenseAttributes);
|
|
730
|
+
|
|
731
|
+
_manager.default.setCollapseEmptyDivs(this.props.collapseEmptyDivs);
|
|
732
|
+
}
|
|
733
|
+
}, {
|
|
734
|
+
key: "attachLoadCallback",
|
|
735
|
+
value: function attachLoadCallback() {
|
|
736
|
+
if (this.loadCallbackAttached === false) {
|
|
737
|
+
_manager.default.on('slotRegistered', this.loadAdsIfPossible);
|
|
738
|
+
|
|
739
|
+
this.loadCallbackAttached = true;
|
|
740
|
+
return true;
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
return false;
|
|
744
|
+
} // pretty strait-forward interface that children ad slots use to register
|
|
745
|
+
// with their DFPSlotProvider parent node.
|
|
746
|
+
|
|
747
|
+
}, {
|
|
748
|
+
key: "newSlotCallback",
|
|
749
|
+
value: function newSlotCallback() {
|
|
750
|
+
this.totalSlots++;
|
|
751
|
+
} // Checks all the mounted children ads have been already registered
|
|
752
|
+
// in the DFPManager before trying to call the gpt load scripts.
|
|
753
|
+
// This is helpful when trying to fetch ads with a single request.
|
|
754
|
+
|
|
755
|
+
}, {
|
|
756
|
+
key: "loadAdsIfPossible",
|
|
757
|
+
value: function loadAdsIfPossible() {
|
|
758
|
+
var r = false;
|
|
759
|
+
|
|
760
|
+
if (Object.keys(_manager.default.getRegisteredSlots()).length >= this.totalSlots) {
|
|
761
|
+
_manager.default.removeListener('slotRegistered', this.loadAdsIfPossible);
|
|
762
|
+
|
|
763
|
+
_manager.default.load();
|
|
764
|
+
|
|
765
|
+
this.loadAlreadyCalled = true;
|
|
766
|
+
this.loadCallbackAttached = false;
|
|
767
|
+
r = true;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
return r;
|
|
771
|
+
}
|
|
772
|
+
}, {
|
|
773
|
+
key: "shouldReloadConfig",
|
|
774
|
+
value: function shouldReloadConfig(nextProps) {
|
|
775
|
+
var reloadConfig = nextProps.autoReload || this.props.autoReload;
|
|
776
|
+
|
|
777
|
+
if (this.props.autoLoad || nextProps.autoLoad) {
|
|
778
|
+
if (_typeof(reloadConfig) === 'object') {
|
|
779
|
+
var attrs = Object.keys(reloadConfig); // eslint-disable-next-line guard-for-in, no-restricted-syntax
|
|
780
|
+
|
|
781
|
+
for (var i in attrs) {
|
|
782
|
+
var propName = attrs[i]; // eslint-disable-next-line
|
|
783
|
+
|
|
784
|
+
if (reloadConfig[propName] === true && this.props[propName] !== nextProps[propName]) {
|
|
785
|
+
return true;
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
return false;
|
|
792
|
+
}
|
|
793
|
+
}, {
|
|
794
|
+
key: "render",
|
|
795
|
+
value: function render() {
|
|
796
|
+
var children = this.props.children;
|
|
797
|
+
|
|
798
|
+
if (Context === null) {
|
|
799
|
+
return children;
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
return _react.default.createElement(Context.Provider, {
|
|
803
|
+
value: this.getContextValue()
|
|
804
|
+
}, children);
|
|
805
|
+
}
|
|
806
|
+
}]);
|
|
807
|
+
|
|
808
|
+
return DFPSlotsProvider;
|
|
809
|
+
}(_react.default.Component);
|
|
810
|
+
|
|
811
|
+
exports.default = DFPSlotsProvider;
|
|
812
|
+
|
|
813
|
+
_defineProperty(DFPSlotsProvider, "propTypes", {
|
|
814
|
+
children: _propTypes.default.oneOfType([_propTypes.default.element, _propTypes.default.array]).isRequired,
|
|
815
|
+
autoLoad: _propTypes.default.bool,
|
|
816
|
+
autoReload: _propTypes.default.shape({
|
|
817
|
+
dfpNetworkId: _propTypes.default.bool,
|
|
818
|
+
personalizedAds: _propTypes.default.bool,
|
|
819
|
+
cookieOption: _propTypes.default.bool,
|
|
820
|
+
singleRequest: _propTypes.default.bool,
|
|
821
|
+
disableInitialLoad: _propTypes.default.bool,
|
|
822
|
+
adUnit: _propTypes.default.bool,
|
|
823
|
+
sizeMapping: _propTypes.default.bool,
|
|
824
|
+
adSenseAttributes: _propTypes.default.bool,
|
|
825
|
+
targetingArguments: _propTypes.default.bool,
|
|
826
|
+
collapseEmptyDivs: _propTypes.default.bool,
|
|
827
|
+
lazyLoad: _propTypes.default.bool
|
|
828
|
+
}),
|
|
829
|
+
dfpNetworkId: _propTypes.default.string.isRequired,
|
|
830
|
+
personalizedAds: _propTypes.default.bool,
|
|
831
|
+
cookieOption: _propTypes.default.bool,
|
|
832
|
+
singleRequest: _propTypes.default.bool,
|
|
833
|
+
disableInitialLoad: _propTypes.default.bool,
|
|
834
|
+
adUnit: _propTypes.default.string,
|
|
835
|
+
sizeMapping: _propTypes.default.arrayOf(_propTypes.default.object),
|
|
836
|
+
adSenseAttributes: _propTypes.default.object,
|
|
837
|
+
targetingArguments: _propTypes.default.object,
|
|
838
|
+
collapseEmptyDivs: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.object]),
|
|
839
|
+
adSenseAttrs: _propTypes.default.object,
|
|
840
|
+
lazyLoad: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.shape({
|
|
841
|
+
fetchMarginPercent: _propTypes.default.number,
|
|
842
|
+
renderMarginPercent: _propTypes.default.number,
|
|
843
|
+
mobileScaling: _propTypes.default.number
|
|
844
|
+
})])
|
|
845
|
+
});
|
|
846
|
+
|
|
847
|
+
_defineProperty(DFPSlotsProvider, "defaultProps", {
|
|
848
|
+
autoLoad: true,
|
|
849
|
+
autoReload: {
|
|
850
|
+
dfpNetworkId: false,
|
|
851
|
+
personalizedAds: false,
|
|
852
|
+
cookieOption: false,
|
|
853
|
+
singleRequest: false,
|
|
854
|
+
disableInitialLoad: false,
|
|
855
|
+
adUnit: false,
|
|
856
|
+
sizeMapping: false,
|
|
857
|
+
adSenseAttributes: false,
|
|
858
|
+
targetingArguments: false,
|
|
859
|
+
collapseEmptyDivs: false,
|
|
860
|
+
lazyLoad: false
|
|
861
|
+
},
|
|
862
|
+
personalizedAds: true,
|
|
863
|
+
cookieOption: true,
|
|
864
|
+
singleRequest: true,
|
|
865
|
+
disableInitialLoad: false,
|
|
866
|
+
collapseEmptyDivs: null,
|
|
867
|
+
lazyLoad: false
|
|
868
|
+
});
|
|
869
|
+
|
|
870
|
+
if (Context === null) {
|
|
871
|
+
// React < 16.3
|
|
872
|
+
DFPSlotsProvider.childContextTypes = {
|
|
873
|
+
dfpNetworkId: _propTypes.default.string,
|
|
874
|
+
dfpAdUnit: _propTypes.default.string,
|
|
875
|
+
dfpSizeMapping: _propTypes.default.arrayOf(_propTypes.default.object),
|
|
876
|
+
dfpTargetingArguments: _propTypes.default.object,
|
|
877
|
+
newSlotCallback: _propTypes.default.func
|
|
878
|
+
};
|
|
879
|
+
}
|
|
880
|
+
});
|
|
881
|
+
|
|
882
|
+
unwrapExports(dfpslotsprovider);
|
|
883
|
+
dfpslotsprovider.Context;
|
|
884
|
+
|
|
885
|
+
var adslot = createCommonjsModule(function (module, exports) {
|
|
886
|
+
|
|
887
|
+
Object.defineProperty(exports, "__esModule", {
|
|
888
|
+
value: true
|
|
889
|
+
});
|
|
890
|
+
exports.default = exports.AdSlot = void 0;
|
|
891
|
+
|
|
892
|
+
var _react = _interopRequireDefault(React__default);
|
|
893
|
+
|
|
894
|
+
var _propTypes = _interopRequireDefault(PropTypes);
|
|
895
|
+
|
|
896
|
+
var _manager = _interopRequireDefault(manager);
|
|
897
|
+
|
|
898
|
+
|
|
899
|
+
|
|
900
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
901
|
+
|
|
902
|
+
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); }
|
|
903
|
+
|
|
904
|
+
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); }
|
|
905
|
+
|
|
906
|
+
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; }
|
|
907
|
+
|
|
908
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
909
|
+
|
|
910
|
+
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); } }
|
|
911
|
+
|
|
912
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
913
|
+
|
|
914
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
915
|
+
|
|
916
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
917
|
+
|
|
918
|
+
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); }
|
|
919
|
+
|
|
920
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
921
|
+
|
|
922
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
923
|
+
|
|
924
|
+
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; }
|
|
925
|
+
|
|
926
|
+
var dynamicAdCount = 0;
|
|
927
|
+
|
|
928
|
+
var AdSlot =
|
|
929
|
+
/*#__PURE__*/
|
|
930
|
+
function (_React$Component) {
|
|
931
|
+
_inherits(AdSlot, _React$Component);
|
|
932
|
+
|
|
933
|
+
function AdSlot(props) {
|
|
934
|
+
var _this;
|
|
935
|
+
|
|
936
|
+
_classCallCheck(this, AdSlot);
|
|
937
|
+
|
|
938
|
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(AdSlot).call(this, props));
|
|
939
|
+
_this.doRegisterSlot = _this.doRegisterSlot.bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
|
940
|
+
_this.generateSlotId = _this.generateSlotId.bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
|
941
|
+
_this.getSlotId = _this.getSlotId.bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
|
942
|
+
_this.mapContextToAdSlotProps = _this.mapContextToAdSlotProps.bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
|
943
|
+
_this.slotShouldRefresh = _this.slotShouldRefresh.bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
|
944
|
+
_this.slotRenderEnded = _this.slotRenderEnded.bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
|
945
|
+
_this.slotRegisterCallback = _this.slotRegisterCallback.bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
|
946
|
+
_this.slotIsViewable = _this.slotIsViewable.bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
|
947
|
+
_this.slotVisibilityChanged = _this.slotVisibilityChanged.bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
|
948
|
+
_this.getClasses = _this.getClasses.bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
|
949
|
+
_this.state = {
|
|
950
|
+
slotId: _this.props.slotId || null,
|
|
951
|
+
className: _this.props.className || ''
|
|
952
|
+
};
|
|
953
|
+
_this.adElementRef = _react.default.createRef ? _react.default.createRef() : function (element) {
|
|
954
|
+
_this.adElementRef = element;
|
|
955
|
+
};
|
|
956
|
+
return _this;
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
_createClass(AdSlot, [{
|
|
960
|
+
key: "componentDidMount",
|
|
961
|
+
value: function componentDidMount() {
|
|
962
|
+
// register this ad-unit in the <DFPSlotProvider>, when available.
|
|
963
|
+
if (this.context !== undefined && this.context.newSlotCallback) {
|
|
964
|
+
this.context.newSlotCallback();
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
this.registerSlot();
|
|
968
|
+
}
|
|
969
|
+
}, {
|
|
970
|
+
key: "componentWillUnmount",
|
|
971
|
+
value: function componentWillUnmount() {
|
|
972
|
+
this.unregisterSlot();
|
|
973
|
+
}
|
|
974
|
+
}, {
|
|
975
|
+
key: "getSlotId",
|
|
976
|
+
value: function getSlotId() {
|
|
977
|
+
return this.props.slotId || this.state.slotId;
|
|
978
|
+
}
|
|
979
|
+
}, {
|
|
980
|
+
key: "getClasses",
|
|
981
|
+
value: function getClasses() {
|
|
982
|
+
var baseClass = 'adunitContainer';
|
|
983
|
+
var extraClasses = this.state.className.split(' ');
|
|
984
|
+
extraClasses.push(baseClass);
|
|
985
|
+
return extraClasses;
|
|
986
|
+
}
|
|
987
|
+
}, {
|
|
988
|
+
key: "generateSlotId",
|
|
989
|
+
value: function generateSlotId() {
|
|
990
|
+
return "adSlot-".concat(dynamicAdCount++);
|
|
991
|
+
}
|
|
992
|
+
}, {
|
|
993
|
+
key: "mapContextToAdSlotProps",
|
|
994
|
+
value: function mapContextToAdSlotProps() {
|
|
995
|
+
var context = this.context;
|
|
996
|
+
var mappedProps = {};
|
|
997
|
+
|
|
998
|
+
if (context.dfpNetworkId !== undefined) {
|
|
999
|
+
mappedProps.dfpNetworkId = context.dfpNetworkId;
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
if (context.dfpAdUnit !== undefined) {
|
|
1003
|
+
mappedProps.adUnit = context.dfpAdUnit;
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
if (context.dfpSizeMapping !== undefined) {
|
|
1007
|
+
mappedProps.sizeMapping = context.dfpSizeMapping;
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
if (context.dfpTargetingArguments !== undefined) {
|
|
1011
|
+
mappedProps.targetingArguments = context.dfpTargetingArguments;
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
return mappedProps;
|
|
1015
|
+
}
|
|
1016
|
+
}, {
|
|
1017
|
+
key: "doRegisterSlot",
|
|
1018
|
+
value: function doRegisterSlot() {
|
|
1019
|
+
_manager.default.registerSlot(_objectSpread({}, this.mapContextToAdSlotProps(), this.props, this.state, {
|
|
1020
|
+
slotShouldRefresh: this.slotShouldRefresh
|
|
1021
|
+
}));
|
|
1022
|
+
|
|
1023
|
+
if (this.props.fetchNow === true) {
|
|
1024
|
+
_manager.default.load(this.getSlotId());
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
_manager.default.attachSlotRenderEnded(this.slotRenderEnded);
|
|
1028
|
+
|
|
1029
|
+
_manager.default.attachSlotIsViewable(this.slotIsViewable);
|
|
1030
|
+
|
|
1031
|
+
_manager.default.attachSlotVisibilityChanged(this.slotVisibilityChanged);
|
|
1032
|
+
|
|
1033
|
+
this.slotRegisterCallback();
|
|
1034
|
+
}
|
|
1035
|
+
}, {
|
|
1036
|
+
key: "registerSlot",
|
|
1037
|
+
value: function registerSlot() {
|
|
1038
|
+
if (this.state.slotId === null) {
|
|
1039
|
+
this.setState({
|
|
1040
|
+
slotId: this.generateSlotId()
|
|
1041
|
+
}, this.doRegisterSlot);
|
|
1042
|
+
} else {
|
|
1043
|
+
this.doRegisterSlot();
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
}, {
|
|
1047
|
+
key: "unregisterSlot",
|
|
1048
|
+
value: function unregisterSlot() {
|
|
1049
|
+
_manager.default.unregisterSlot(_objectSpread({}, this.mapContextToAdSlotProps(), this.props, this.state));
|
|
1050
|
+
|
|
1051
|
+
_manager.default.detachSlotRenderEnded(this.slotRenderEnded);
|
|
1052
|
+
|
|
1053
|
+
_manager.default.detachSlotIsViewable(this.slotIsViewable);
|
|
1054
|
+
|
|
1055
|
+
_manager.default.detachSlotVisibilityChanged(this.slotVisibilityChanged);
|
|
1056
|
+
}
|
|
1057
|
+
}, {
|
|
1058
|
+
key: "slotRenderEnded",
|
|
1059
|
+
value: function slotRenderEnded(eventData) {
|
|
1060
|
+
if (eventData.slotId === this.getSlotId()) {
|
|
1061
|
+
if (this.props.onSlotRender !== undefined) {
|
|
1062
|
+
// now that slot has rendered we have access to the ref
|
|
1063
|
+
var params = _objectSpread({}, eventData, {
|
|
1064
|
+
adElementRef: this.adElementRef
|
|
1065
|
+
});
|
|
1066
|
+
|
|
1067
|
+
this.props.onSlotRender(params);
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
}, {
|
|
1072
|
+
key: "slotRegisterCallback",
|
|
1073
|
+
value: function slotRegisterCallback() {
|
|
1074
|
+
if (typeof this.props.onSlotRegister === 'function') {
|
|
1075
|
+
this.props.onSlotRegister({
|
|
1076
|
+
slotId: this.getSlotId(),
|
|
1077
|
+
sizes: this.props.sizes,
|
|
1078
|
+
slotCount: dynamicAdCount,
|
|
1079
|
+
adElementRef: this.adElementRef
|
|
1080
|
+
});
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
}, {
|
|
1084
|
+
key: "slotIsViewable",
|
|
1085
|
+
value: function slotIsViewable(eventData) {
|
|
1086
|
+
if (eventData.slotId === this.getSlotId()) {
|
|
1087
|
+
if (this.props.onSlotIsViewable !== undefined) {
|
|
1088
|
+
this.props.onSlotIsViewable(eventData);
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
}, {
|
|
1093
|
+
key: "slotVisibilityChanged",
|
|
1094
|
+
value: function slotVisibilityChanged(eventData) {
|
|
1095
|
+
if (eventData.slotId === this.getSlotId()) {
|
|
1096
|
+
if (this.props.onSlotVisibilityChanged !== undefined) {
|
|
1097
|
+
this.props.onSlotVisibilityChanged(eventData);
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
}, {
|
|
1102
|
+
key: "slotShouldRefresh",
|
|
1103
|
+
value: function slotShouldRefresh() {
|
|
1104
|
+
var r = true;
|
|
1105
|
+
|
|
1106
|
+
if (this.props.shouldRefresh !== undefined) {
|
|
1107
|
+
r = this.props.shouldRefresh(_objectSpread({}, this.mapContextToAdSlotProps(), this.props, {
|
|
1108
|
+
slotId: this.getSlotId()
|
|
1109
|
+
}));
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
return r;
|
|
1113
|
+
}
|
|
1114
|
+
}, {
|
|
1115
|
+
key: "render",
|
|
1116
|
+
value: function render() {
|
|
1117
|
+
var slotId = this.state.slotId;
|
|
1118
|
+
var props = {
|
|
1119
|
+
className: 'adBox'
|
|
1120
|
+
};
|
|
1121
|
+
|
|
1122
|
+
if (slotId !== null) {
|
|
1123
|
+
props.id = slotId;
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
return _react.default.createElement("div", {
|
|
1127
|
+
className: this.getClasses().join(' ').trim()
|
|
1128
|
+
}, _react.default.createElement("div", _extends({
|
|
1129
|
+
ref: this.adElementRef
|
|
1130
|
+
}, props)));
|
|
1131
|
+
}
|
|
1132
|
+
}]);
|
|
1133
|
+
|
|
1134
|
+
return AdSlot;
|
|
1135
|
+
}(_react.default.Component);
|
|
1136
|
+
|
|
1137
|
+
exports.AdSlot = AdSlot;
|
|
1138
|
+
|
|
1139
|
+
_defineProperty(AdSlot, "propTypes", {
|
|
1140
|
+
dfpNetworkId: _propTypes.default.string,
|
|
1141
|
+
adUnit: _propTypes.default.string,
|
|
1142
|
+
sizes: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.number), _propTypes.default.string])),
|
|
1143
|
+
renderOutOfThePage: _propTypes.default.bool,
|
|
1144
|
+
sizeMapping: _propTypes.default.arrayOf(_propTypes.default.object),
|
|
1145
|
+
fetchNow: _propTypes.default.bool,
|
|
1146
|
+
adSenseAttributes: _propTypes.default.object,
|
|
1147
|
+
targetingArguments: _propTypes.default.object,
|
|
1148
|
+
onSlotRender: _propTypes.default.func,
|
|
1149
|
+
onSlotRegister: _propTypes.default.func,
|
|
1150
|
+
onSlotIsViewable: _propTypes.default.func,
|
|
1151
|
+
onSlotVisibilityChanged: _propTypes.default.func,
|
|
1152
|
+
shouldRefresh: _propTypes.default.func,
|
|
1153
|
+
slotId: _propTypes.default.string,
|
|
1154
|
+
className: _propTypes.default.string
|
|
1155
|
+
});
|
|
1156
|
+
|
|
1157
|
+
_defineProperty(AdSlot, "defaultProps", {
|
|
1158
|
+
fetchNow: false
|
|
1159
|
+
});
|
|
1160
|
+
|
|
1161
|
+
if (dfpslotsprovider.Context === null) {
|
|
1162
|
+
// React < 16.3
|
|
1163
|
+
AdSlot.contextTypes = {
|
|
1164
|
+
dfpNetworkId: _propTypes.default.string,
|
|
1165
|
+
dfpAdUnit: _propTypes.default.string,
|
|
1166
|
+
dfpSizeMapping: _propTypes.default.arrayOf(_propTypes.default.object),
|
|
1167
|
+
dfpTargetingArguments: _propTypes.default.object,
|
|
1168
|
+
newSlotCallback: _propTypes.default.func
|
|
1169
|
+
};
|
|
1170
|
+
} else {
|
|
1171
|
+
AdSlot.contextType = dfpslotsprovider.Context;
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
var _default = AdSlot;
|
|
1175
|
+
exports.default = _default;
|
|
1176
|
+
});
|
|
1177
|
+
|
|
1178
|
+
unwrapExports(adslot);
|
|
1179
|
+
adslot.AdSlot;
|
|
1180
|
+
|
|
1181
|
+
var lib = createCommonjsModule(function (module, exports) {
|
|
1182
|
+
|
|
1183
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1184
|
+
value: true
|
|
1185
|
+
});
|
|
1186
|
+
exports.DFPSlotsProvider = exports.AdSlot = exports.DFPManager = void 0;
|
|
1187
|
+
|
|
1188
|
+
var _manager = _interopRequireDefault(manager);
|
|
1189
|
+
|
|
1190
|
+
var _adslot = _interopRequireDefault(adslot);
|
|
1191
|
+
|
|
1192
|
+
var _dfpslotsprovider = _interopRequireDefault(dfpslotsprovider);
|
|
1193
|
+
|
|
1194
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1195
|
+
|
|
1196
|
+
var DFPManager = _manager.default;
|
|
1197
|
+
exports.DFPManager = DFPManager;
|
|
1198
|
+
var AdSlot = _adslot.default;
|
|
1199
|
+
exports.AdSlot = AdSlot;
|
|
1200
|
+
var DFPSlotsProvider = _dfpslotsprovider.default;
|
|
1201
|
+
exports.DFPSlotsProvider = DFPSlotsProvider;
|
|
1202
|
+
});
|
|
1203
|
+
|
|
1204
|
+
unwrapExports(lib);
|
|
1205
|
+
var lib_1 = lib.DFPSlotsProvider;
|
|
1206
|
+
var lib_2 = lib.AdSlot;
|
|
1207
|
+
var lib_3 = lib.DFPManager;
|
|
1208
|
+
|
|
1209
|
+
export { lib_2 as a, lib_1 as b, lib_3 as l };
|