'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

require('./_commonjsHelpers-06173234.js');
require('./_to-object-329a650b.js');
require('./es6.string.iterator-cc0bbaa4.js');
require('./_library-dd23b178.js');
require('./_iter-detect-60b2f026.js');
require('./toConsumableArray-9a3476fe.js');
require('./core.get-iterator-method-f62321d4.js');
require('./_object-pie-68c5bcbc.js');
require('./extends-0a918631.js');
require('./_object-sap-5e74ba08.js');
require('./inherits-0c7830c5.js');
require('./define-property-f4d12f4e.js');
require('./web.dom.iterable-a0e279c1.js');
require('./typeof-9d7f610f.js');
require('./_is-array-754e012d.js');
var React = require('react');
require('./index-e08f00ce.js');
require('prop-types');
require('react-bootstrap/Container');
var Row = require('react-bootstrap/Row');
var Col = require('react-bootstrap/Col');
require('react-bootstrap/Card');
require('./moment-ca3bd9fb.js');
require('next/router');
require('./isSymbol-04666465.js');
require('./debounce-529c8d06.js');
require('./toNumber-36d1e7e5.js');
require('./index.es-f3e47207.js');
require('react-dom');
require('./visibility-sensor-eb2c5b69.js');
var index$1 = require('./index-b5eb3ff8.js');
var index = require('./index-9d365128.js');
require('./main-7b5e57b0.js');
require('./entities-310b46ee.js');
require('./slicedToArray-8f385299.js');
require('./stringify-7c5aff47.js');
require('./asyncToGenerator-140e5f89.js');
var Segment = require('./Segment.js');
var Beam = require('./Beam.js');
var AdSlot = require('./AdSlot.js');
require('./ADInfeed-cc30d063.js');
var DeckContent = require('./DeckContent.js');
require('./lodash-7fd85bcf.js');
require('./ADlgInfeed-2a757ee9.js');
require('./getContentCategory-f38a4c00.js');
require('./get-adbb11e3.js');
require('./eq-bb2843ed.js');
var AD = require('./AD.js');
require('./AuthorComponent-ac8972ce.js');
var GridContent = require('./GridContent.js');
var DeckQueue = require('./DeckQueue.js');
require('react-bootstrap/Media');
var ThumbnailCard = require('./ThumbnailCard.js');
require('./BlockContent-8b494587.js');
require('./react-social-icons-07939b41.js');
var TaxonomyCard = require('./TaxonomyCard.js');
var RolesDeck = require('./RolesDeck.js');
require('./index-187c967e.js');
require('./smoothscroll-5054361f.js');
var GroupDeck = require('./GroupDeck.js');
var YoutubeGroup = require('./YoutubeGroup.js');
require('react-bootstrap');
require('./timeDifferenceCalc.js');
var QueueDeckExpanded = require('./QueueDeckExpanded.js');
require('./iconBase-68959171.js');
require('./index.esm-974f47d9.js');
var VideoSeriesListing = require('./VideoSeriesListing.js');
var ArticleSeriesListing = require('./ArticleSeriesListing.js');
var ArticleCarousel = require('./ArticleCarousel.js');
var getSerializers = require('./index-e5ee306e.js');
require('./util-f2c1b65b.js');
require('./brightcove-react-player-loader.es-5c98aec7.js');
require('next/head');
require('react-share');
var SocialShare = require('./SocialShare.js');
require('./_object-to-array-5762f850.js');
require('react-bootstrap/Pagination');
require('react-bootstrap/Button');
require('react-bootstrap/Figure');
var HorizontalArticleListing = require('./HorizontalArticleListing.js');
var MasterDeck = require('./MasterDeck.js');
var PublicationDeck = require('./PublicationDeck.js');
var IssueDeck = require('./IssueDeck.js');
require('react-bootstrap/Badge');
var IssueContentDeck = require('./IssueContentDeck.js');
require('./defineProperty-55548b25.js');
var EventsDeck = require('./EventsDeck.js');
require('react-bootstrap/Spinner');
require('react-bootstrap/Form');
require('./index-6367b7bf.js');
require('./js.cookie-a511c430.js');
var CMEDeck = require('./CMEDeck.js');
var ExternalResources = require('./ExternalResources.js');
var Column1 = require('./Column1.js');
var SideFooter = require('./SideFooter.js');
require('./ConferenceBanner-6c9e718a.js');
var Column2 = require('./Column2.js');
var ADSponsoredResources = require('./ADSponsoredResources.js');
require('react-bootstrap/ListGroup');
var ADWebcast = require('./ADWebcast.js');
var LeftNav = require('./LeftNav.js');
var PageFilter = require('./PageFilter.js');
var Column3 = require('./Column3.js');
var Header = require('./Header.js');
require('react-bootstrap/Accordion');
require('react-bootstrap/AccordionToggle');
var AccordionPanel = require('./AccordionPanel.js');
var VideoSeriesFilter = require('./VideoSeriesFilter.js');
require('react-bootstrap/Nav');
require('react-bootstrap/Navbar');
require('react-bootstrap/NavDropdown');
require('./index.esm-3b9b8952.js');
require('./NavFooter-3dcd99a8.js');
require('./index.esm-3ffa049c.js');
var SocialIcons = require('./SocialIcons.js');
require('react-bootstrap/FormControl');
require('./SocialSearchComponent-87578cd1.js');
var NavMagazine = require('./NavMagazine.js');
var NavNative = require('./NavNative.js');
var Search = require('./Search.js');
var NavNormal = require('./NavNormal.js');
var NavDvm = require('./NavDvm.js');
var HamMagazine = require('./HamMagazine.js');
var ADGutter = require('./ADGutter.js');
var AD728x90 = require('./AD728x90.js');
var TemplateNormal = require('./TemplateNormal.js');
var AD300x250 = require('./AD300x250.js');
var AD300x250x600 = require('./AD300x250x600.js');
var ADFooter = require('./ADFooter.js');
var AdSlotsProvider = require('./AdSlotsProvider.js');
var ADFloatingFooter = require('./ADFloatingFooter.js');
var ADWelcome = require('./ADWelcome.js');
var ADSkyscraper = require('./ADSkyscraper.js');
require('react-bootstrap/Carousel');
var Feature = require('./Feature.js');
require('react-bootstrap/Breadcrumb');
var Breadcrumbs = require('./Breadcrumbs.js');
var Hero = require('./Hero.js');
require('./keys-a586b7a0.js');
var AlphabeticList = require('./AlphabeticList.js');
var PdfDownload = require('./PdfDownload.js');
require('react-bootstrap/DropdownButton');
require('react-bootstrap/Dropdown');
var RelatedTopicsDropdown = require('./RelatedTopicsDropdown.js');
require('./index.esm-05850a2f.js');
var Ustream = require('./Ustream.js');
var HighlightenVideo = require('./HighlightenVideo.js');
var PublicationLanding = require('./PublicationLanding.js');
var IssueLanding = require('./IssueLanding.js');
require('react-bootstrap/Modal');
var PopUpModal = require('./PopUpModal.js');
var RelatedContent = require('./RelatedContent.js');
var TaxonomyDescription = require('./TaxonomyDescription.js');
var PubToc = require('./PubToc.js');
var PubSection = require('./PubSection.js');
var ForbesHero = require('./ForbesHero.js');
var HorizontalHero = require('./HorizontalHero.js');
var OncliveHero = require('./OncliveHero.js');
var OncliveLargeHero = require('./OncliveLargeHero.js');
var VerticalHero = require('./VerticalHero.js');
var YahooHero = require('./YahooHero.js');
var GridHero = require('./GridHero.js');
var ConferenceArticleCard = require('./ConferenceArticleCard.js');
var KMTracker = require('./KMTracker.js');
var getSeriesDetail = require('./getSeriesDetail.js');
var SetCookie = require('./SetCookie.js');
require('./index-bd6c9f56.js');
var getRelatedArticle = require('./getRelatedArticle.js');
var getQuery = require('./getQuery.js');
var Auth = require('./Auth.js');
require('swr');
require('passport-local');
require('mysql');
require('./SeriesSlider-03fb6ea7.js');
var getTargeting = require('./getTargeting-1b435de6.js');
var View = require('./View.js');
var getKeywords = require('./getKeywords.js');
var urlFor = require('./urlFor.js');
require('./style-inject.es-dcee06b6.js');
require('disqus-react');
require('react-twitter-embed');
var PartnerDetailListing = require('./PartnerDetailListing.js');
var VideoProgramLandingPage = require('./VideoProgramLandingPage.js');
require('./VideoSeriesCard.js');
var VideoSeriesLandingPage = require('./VideoSeriesLandingPage.js');
var ArticleProgramLandingPage = require('./ArticleProgramLandingPage.js');
var ArticleSeriesLandingPage = require('./ArticleSeriesLandingPage.js');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
var Row__default = /*#__PURE__*/_interopDefaultLegacy(Row);
var Col__default = /*#__PURE__*/_interopDefaultLegacy(Col);

//Feature query to be used
// const featureQuery = `*[_type == 'feature' && is_active == true && feature_url == "/"] | order(_updatedAt asc)[0..5]{
//     ...,
//      feature_img { asset-> {url} }
//    }`

//Update*  Added control toggle for features.  Will default to off -
//<Feature controls dataset={props.features} /></div>

var FeatureArticles = function FeatureArticles(props) {
  var data = props.dataset;

  var client = props.client,
      _props$imageWidth = props.imageWidth,
      imageWidth = _props$imageWidth === undefined ? 200 : _props$imageWidth,
      imageHeight = props.imageHeight,
      defaultImage = props.defaultImage,
      _props$styles = props.styles,
      styles = _props$styles === undefined ? null : _props$styles;


  var urlFor = function urlFor(source) {
    var builder = index$1.imageUrlBuilder(client);
    return builder.image(source).auto('format');
  };

  var renderImage = function renderImage(thumbnail, imageWidth, imageHeight) {
    var url = urlFor(thumbnail);
    if (imageHeight) url = url.height(imageHeight);
    if (imageWidth) url = url.width(imageWidth);
    return url.url();
  };

  //image width updated.

  return React__default['default'].createElement(
    'div',
    { className: 'featured-articles-wrapper' },
    data.map(function (article, index$1) {
      return React__default['default'].createElement(
        React__default['default'].Fragment,
        null,
        React__default['default'].createElement(
          Row__default['default'],
          { className: 'article-wrap' },
          React__default['default'].createElement(
            Col__default['default'],
            { className: 'mb-4 m-fl-center deck', xs: 12, sm: 4, md: 4, lg: 3, xl: 3 },
            React__default['default'].createElement(
              'a',
              { href: '' + article.feature_link },
              React__default['default'].createElement(
                'figure',
                { style: { marginTop: '1rem' } },
                React__default['default'].createElement(
                  index.LazyLoad,
                  { height: imageHeight },
                  React__default['default'].createElement('img', { style: { width: '100%', borderRadius: '10px' }, src: article.feature_img ? renderImage(article.feature_img, imageWidth, imageHeight) : defaultImage })
                )
              )
            )
          ),
          React__default['default'].createElement(
            Col__default['default'],
            { className: 'article-wrap-body', xs: 12, sm: 8, md: 8, lg: 9, xl: 9, style: { paddingTop: '10px' } },
            React__default['default'].createElement(
              'a',
              { href: '' + article.feature_link },
              React__default['default'].createElement(
                'h4',
                { className: 'mb-1', style: { fontWeight: '600', fontSize: '22px' } },
                article.feature_title
              ),
              React__default['default'].createElement(
                'p',
                { style: { fontSize: '1.1em' } },
                article.feature_body
              )
            )
          ),
          index$1 !== data.length - 1 && React__default['default'].createElement('hr', null)
        ),
        React__default['default'].createElement(
          'style',
          { jsx: 'true' },
          '\n              .featured-articles-wrapper {\n                background: ' + props.backgroundColor + ';\n                padding: 1rem;\n                border-radius: 10px;\n                box-shadow: #0000002b 1px 3px 3px 3px;\n              }\n              hr {\n                width: 100%;\n                height: 1px;\n                margin-left: 15px;\n                margin-right: 15px;\n              }\n              ' + styles + '\n            '
        )
      );
    })
  );
};

exports.Segment = Segment;
exports.Beam = Beam;
exports.AdSlot = AdSlot;
exports.DeckContent = DeckContent;
exports.AD = AD;
exports.GridContent = GridContent;
exports.DeckQueue = DeckQueue;
exports.ThumbnailCard = ThumbnailCard;
exports.TaxonomyCard = TaxonomyCard;
exports.RolesDeck = RolesDeck;
exports.GroupDeck = GroupDeck;
exports.YoutubeGroup = YoutubeGroup;
exports.QueueDeckExpanded = QueueDeckExpanded;
exports.VideoSeriesListing = VideoSeriesListing;
exports.ArticleSeriesListing = ArticleSeriesListing;
exports.ArticleCarousel = ArticleCarousel;
exports.getSerializers = getSerializers.getSerializers;
exports.SocialShare = SocialShare;
exports.HorizontalArticleListing = HorizontalArticleListing;
exports.MasterDeck = MasterDeck;
exports.PublicationDeck = PublicationDeck;
exports.IssueDeck = IssueDeck;
exports.IssueContentDeck = IssueContentDeck;
exports.EventsDeck = EventsDeck;
exports.CMEDeck = CMEDeck;
exports.ExternalResources = ExternalResources;
exports.Column1 = Column1.Column1;
exports.SideFooter = SideFooter;
exports.Column2 = Column2.Column2;
exports.ADSponsoredResources = ADSponsoredResources;
exports.ADWebcast = ADWebcast;
exports.LeftNav = LeftNav['default'];
exports.PageFilter = PageFilter;
exports.Column3 = Column3.Column3;
exports.Header = Header['default'];
exports.AccordionPanel = AccordionPanel;
exports.VideoSeriesFilter = VideoSeriesFilter;
exports.SocialIcons = SocialIcons;
exports.NavMagazine = NavMagazine['default'];
exports.NavNative = NavNative.NavNative;
exports.Search = Search;
exports.NavNormal = NavNormal.NavNormal;
exports.NavDvm = NavDvm.NavDvm;
exports.HamMagazine = HamMagazine.HamMagazine;
exports.ADGutter = ADGutter;
exports.AD728x90 = AD728x90;
exports.TemplateNormal = TemplateNormal;
exports.AD300x250 = AD300x250;
exports.AD300x250x600 = AD300x250x600;
exports.ADFooter = ADFooter;
exports.AdSlotsProvider = AdSlotsProvider;
exports.ADFloatingFooter = ADFloatingFooter;
exports.ADWelcome = ADWelcome;
exports.ADSkyscraper = ADSkyscraper;
exports.Feature = Feature;
exports.Breadcrumbs = Breadcrumbs;
exports.Hero = Hero;
exports.AlphabeticList = AlphabeticList;
exports.PdfDownload = PdfDownload;
exports.RelatedTopicsDropdown = RelatedTopicsDropdown;
exports.Ustream = Ustream;
exports.HighlightenVideo = HighlightenVideo;
exports.PublicationLanding = PublicationLanding;
exports.IssueLanding = IssueLanding;
exports.PopUpModal = PopUpModal;
exports.RelatedContent = RelatedContent;
exports.TaxonomyDescription = TaxonomyDescription;
exports.PubToc = PubToc;
exports.PubSection = PubSection;
exports.ForbesHero = ForbesHero;
exports.HorizontalHero = HorizontalHero;
exports.OncliveHero = OncliveHero;
exports.OncliveLargeHero = OncliveLargeHero;
exports.VerticalHero = VerticalHero;
exports.YahooHero = YahooHero;
exports.GridHero = GridHero;
exports.ConferenceArticleCard = ConferenceArticleCard;
exports.KMTracker = KMTracker;
exports.getSeriesDetail = getSeriesDetail;
exports.SetCookie = SetCookie;
exports.getRelatedArticle = getRelatedArticle;
exports.getQuery = getQuery;
exports.Auth = Auth['default'];
exports.getTargeting = getTargeting.getTargeting;
exports.View = View;
exports.getKeywords = getKeywords;
exports.urlFor = urlFor;
exports.PartnerDetailListing = PartnerDetailListing;
exports.VideoProgramLandingPage = VideoProgramLandingPage;
exports.VideoSeriesLandingPage = VideoSeriesLandingPage;
exports.ArticleProgramLandingPage = ArticleProgramLandingPage;
exports.ArticleSeriesLandingPage = ArticleSeriesLandingPage;
exports.FeatureArticles = FeatureArticles;
