(function () {
  //Inject code v3.0.2

  var highcharts = document.createElement('script');

  var cdn = 'https://code.highcharts.com/';
  var loaded = 0;  
  var encodedUrl = encodeURI('https://https://app.everviz.com//show/CjhoQBGyg');
  var chartCreated = false;
  var scripts = [
    "highcharts.js",
    "modules/stock.js",
    "highcharts-more.js",
    "highcharts-3d.js",
    "modules/data.js",
    "modules/exporting.js",
    "modules/funnel.js",
    "modules/solid-gauge.js",
    "modules/export-data.js",
    "modules/accessibility.js"
    /* "modules/series-label.js" */
  ];

  var externalCSS = [
      ];

  var extraScripts = [
  "https://code.highcharts.com/modules/annotations.js"
  ,"https://code.highcharts.com/modules/annotations-advanced.js"
  ];

  var options = {"title":{"text":"Lower Bound on Revisions in Expected Growth at Different Horizons","align":"left","x":10,"style":{"fontFamily":"Default","color":"#333333","fontSize":"20px","fontWeight":"bold","fontStyle":"normal","fill":"#333333","width":"1058px"}},"subtitle":{"text":"Percent Change in Expected Dividends Since Jan. 1: A Lower Bound","align":"left","x":10,"style":{"fontFamily":"Default","color":"#666666","fontSize":"18px","fontWeight":"normal","fontStyle":"normal","fill":"#666666","width":"1058px"}},"colors":["#357D96","#FAA61A"],"legend":{"align":"left","verticalAlign":"top","itemMarginBottom":10,"x":0,"symbolRadius":2,"layout":"horizontal","floating":false,"enabled":false},"plotOptions":{"series":{"marker":{"enabled":false},"lineWidth":3,"allowPointSelect":true,"states":{"select":{"color":"#EFFFEF","borderColor":"black","dashStyle":"dot"},"inactive":{"opacity":0.2}},"events":{}}},"chart":{"type":"line"},"credits":{"text":"everviz.com","href":"https://everviz.com","enabled":false},"series":[{"data":[],"turboThreshold":0,"type":"line","name":"S&P 500","connectEnds":false,"lineWidth":5},{"data":[],"turboThreshold":0,"type":"line","name":"Euro Stoxx 50","lineWidth":5}],"stockTools":{"gui":{"enabled":false}},"navigation":{"bindingsClassName":"tools-container","events":{}},"labels":{"items":[]},"pane":{"background":[]},"responsive":{"rules":[]},"yAxis":{"alignTicks":true,"endOnTick":false,"gridLineWidth":1,"gridZIndex":1,"lineWidth":0,"maxPadding":0.01,"min":-35,"minorGridLineWidth":1,"minorTickLength":2,"minorTicks":false,"minTickInterval":0,"opposite":false,"reversed":false,"reversedStacks":false,"showEmpty":true,"showFirstLabel":true,"showLastLabel":true,"softMax":10,"tickLength":10,"title":{"text":"Lower Bound"}},"annotations":[{"visible":true,"draggable":null,"labelOptions":{"align":"center","allowOverlap":false,"backgroundColor":"rgba(0, 0, 0, 0.75)","borderColor":"black","borderRadius":3,"borderWidth":1,"className":"","crop":false,"overflow":"justify","padding":5,"shadow":false,"shape":"callout","style":{"fontSize":"11px","fontWeight":"normal","color":"contrast"},"useHTML":false,"verticalAlign":"bottom","x":0,"y":-16,"format":"{y:.2f}"},"shapeOptions":{"stroke":"rgba(0, 0, 0, 0.75)","strokeWidth":1,"fill":"rgba(0, 0, 0, 0.75)","r":0,"snap":2},"controlPointOptions":{"symbol":"circle","width":10,"height":10,"style":{"stroke":"black","stroke-width":2,"fill":""},"visible":false},"events":{},"zIndex":6,"langKey":"label","labels":[{"point":{"x":6.604496644295303,"y":-17.936507936507937,"xAxis":0,"yAxis":0},"controlPoints":[{"symbol":"triangle-down","width":10,"height":10,"style":{"stroke":"black","stroke-width":2,"fill":"white"},"visible":false,"events":{},"index":0},{"symbol":"circle","width":10,"height":10,"style":{"stroke":"black","stroke-width":2,"fill":"white"},"visible":false,"events":{},"index":1}],"overflow":"none","crop":true,"format":"<strong>S&P 500</strong>","style":{"color":"#455a64","fontSize":"16","fontWeight":"normal"},"backgroundColor":"#ffffff","borderColor":"#ffffff","shape":"callout","x":5,"y":28,"align":"center","allowOverlap":false,"borderRadius":3,"borderWidth":1,"className":"","padding":5,"shadow":false,"useHTML":false,"verticalAlign":"bottom","controlPointOptions":{"symbol":"circle","width":10,"height":10,"style":{"stroke":"black","stroke-width":2,"fill":"white"},"visible":false}}]},{"visible":true,"draggable":null,"labelOptions":{"align":"center","allowOverlap":false,"backgroundColor":"rgba(0, 0, 0, 0.75)","borderColor":"black","borderRadius":3,"borderWidth":1,"className":"","crop":false,"overflow":"justify","padding":5,"shadow":false,"shape":"callout","style":{"fontSize":"11px","fontWeight":"normal","color":"contrast"},"useHTML":false,"verticalAlign":"bottom","x":0,"y":-16,"format":"{y:.2f}"},"shapeOptions":{"stroke":"rgba(0, 0, 0, 0.75)","strokeWidth":1,"fill":"rgba(0, 0, 0, 0.75)","r":0,"snap":2},"controlPointOptions":{"symbol":"circle","width":10,"height":10,"style":{"stroke":"black","stroke-width":2,"fill":"white"},"visible":false},"events":{},"zIndex":6,"langKey":"label","labels":[{"point":{"x":6.275906040268457,"y":-8.863636363636363,"xAxis":0,"yAxis":0},"controlPoints":[{"symbol":"triangle-down","width":10,"height":10,"style":{"stroke":"black","stroke-width":2,"fill":"white"},"visible":false,"events":{},"index":0},{"symbol":"circle","width":10,"height":10,"style":{"stroke":"black","stroke-width":2,"fill":"white"},"visible":false,"events":{},"index":1}],"overflow":"none","crop":true,"x":-2,"y":3,"format":"<strong>Euro Stoxx 50</strong>","style":{"color":"#FAA61A","fontSize":"18","fontWeight":"normal"},"backgroundColor":"#ffffff","borderColor":"#ffffff","shape":"callout","align":"center","allowOverlap":false,"borderRadius":3,"borderWidth":1,"className":"","padding":5,"shadow":false,"useHTML":false,"verticalAlign":"bottom","controlPointOptions":{"symbol":"circle","width":10,"height":10,"style":{"stroke":"black","stroke-width":2,"fill":"white"},"visible":false}}]}],"caption":{"text":"This figure shows a lower bound on revision in expected dividends at different horizons. The revisions are measured relative to expectations on January 15. The figure shows the bound for the S&P 500 in blue and the bound for Euro Stoxx 50 in red. The lower bound bottoms out around two to three years into the future, with expected dividends being revised down by as much as 43% in the US and 50% in Europe. The lower bound increases from year 4 to 10, which is consistent with investors expecting rebound growth after the recession. We emphasize that the estimates represent lower bounds and that expected growth could be higher.","margin":20,"style":{"fontFamily":"Default","color":"#666666","fontSize":"14px","fontWeight":"normal","fontStyle":"normal","fill":"#666666","width":"1102px"}},"xAxis":{"title":{"text":"Years in the Future"}},"tooltip":{"valueSuffix":"%","style":{"color":"#333333","cursor":"default","fontSize":"12px","pointerEvents":"none","whiteSpace":"nowrap","fontFamily":"\"Lucida Grande\", \"Lucida Sans Unicode\", Verdana, Arial, Helvetica, sans-serif"},"split":false,"snap":35,"shared":true,"headerFormat":"<span style=\"font-size: 12px\"><strong>Year {point.key}</strong></span><br/>"},"data":{"csv":"Horizon;S&P 500;Euro Stoxx 50\n0;0;0\n1;-12.8;-29.2\n2;-17.4;-25.5\n3;-17.3;-17.2\n4;-17.8;-12.9\n5;-17.3;-10.9\n6;-16.9;-9.9\n7;-16.7;-10.1","seriesMapping":[{"x":0,"y":1},{"x":0,"y":2}]}};
  
  var templateDataSettings = {};

  var pluginCode = {};;

  if (options.data) {
    options.data.complete = function(options) {
      const keys = Object.keys(templateDataSettings || {});
      keys.forEach(function(key) {
        const serie = options.series[key];
        (serie.data || []).forEach(function(d, i) {
          if (templateDataSettings[key].data && templateDataSettings[key].data[i]) {
            merge(d, templateDataSettings[key].data[i]);
          }
        })
      })  
      return options;
    }
  }

  merge(options, pluginCode);

  function isNull(what){return(typeof what==='undefined'||what===null)}
  function isStr(what){return(typeof what==='string'||what instanceof String)}
  function isNum(what){return!isNaN(parseFloat(what))&&isFinite(what)}
  function isFn(what){return(what&&(typeof what==='function')||(what instanceof Function))}
  function isArr(what){return(!isNull(what)&&what.constructor.toString().indexOf('Array')>-1)}
  function isBool(what){return(what===!0||what===!1)}
  function isBasic(what){return!isArr(what)&&(isStr(what)||isNum(what)||isBool(what)||isFn(what))}
  function isObj(what){return what&&what.constructor.toString().indexOf('Object')>-1}
  function isEmptyObjectArray(arr){return isObj(arr[0])&&arr.some(function(b){return Object.keys(b).length===0})}
  function merge(a,b){if(!a||!b)return a||b;Object.keys(b).forEach(function(bk){if(isNull(b[bk])||isBasic(b[bk])){a[bk]=b[bk]}else if(isArr(b[bk])){if(isEmptyObjectArray(b[bk]))return;a[bk]=[];b[bk].forEach(function(i){if(isNull(i)||isBasic(i)){a[bk].push(i)}else{a[bk].push(merge(isArr(i)?[]:{},i))}})}else{a[bk]=a[bk]||{};merge(a[bk],b[bk])}});return a}

  function isScriptAlreadyIncluded(src){
    var scripts = document.getElementsByTagName("script");
    for (var i = 0; i < scripts.length; i++) {
      if (scripts[i].hasAttribute('src')) {
        const scriptTag = scripts[i].getAttribute('src') || '';
        if ((scriptTag.indexOf(src) >= 0) || 
            (scriptTag.indexOf('highcharts.src.js') > -1 && src === 'highcharts.js') ||
            ((scriptTag.indexOf('stock/highstock.js') > -1) && src === 'modules/highstock.js')) {
          return true;
        }
      }
    }
    return false;
  }

  function loadCSS() {
    var cssLength = externalCSS.length;
    for(var i=0; i < cssLength; i++) {
      var css = document.createElement('link');
      css.rel  = 'stylesheet';
      css.type = "text/css";
      css.href = externalCSS[i];
      document.body.appendChild(css);
    }
  }

  function createChart() {
    if(chartCreated) return;

    if (typeof window['Highcharts'] !== 'undefined') {
      

      if (options && (options.lang || options.global)) {
        Highcharts.setOptions({
          global: options.global || {},
          lang: options.lang || {}
        });
      }

      if (Highcharts.Annotation) {
        Highcharts.Annotation.ControlPoint.prototype.redraw = function (animation) {
          this.graphic[animation ? 'animate' : 'attr'](
              this.options.positioner ? this.options.positioner.call(this, this.target) : null
          );
        };
      }
      
      chartCreated = true;
      window.HighchartsCloud.hasLoaded = true;
      new Highcharts.Chart('highcharts-CjhoQBGyg', options);
    }
  }

  function check(scripts, cb) {
    if (loaded === scripts.length) {
      if (cb) {
        cb();
      } else {
        for (var i = 0; i < window.HighchartsCloud.ondone.length; i++) {
          try {
            window.HighchartsCloud.ondone[i]();
          } catch(e) {
            console.error(e);
          }
        }
      }
    }
  }

  function loadScript(s, scripts, cb) {
    if (!s) next();
    
    function next() {
      ++loaded;
      if (loaded < scripts.length) {
        loadScript(scripts[loaded], scripts, cb);
      }
      check(scripts, cb);
    }

    if (isScriptAlreadyIncluded(s)) {
      return next();
    }

    var n = document.createElement('script');

    n.onload = function () {
      next();
    };

    if (s.indexOf('https') >= 0) {
      n.src = s;
    } else {
      n.src = cdn + s;
    }
    document.body.appendChild(n);
  }

  function loadExtraScripts(){
    if (extraScripts.length > 0) {
      loaded = 0;
      loadScript(extraScripts[0], extraScripts);
    } else {
      check(scripts);
    }
  }

  function loadExtraScriptsAndMakeChart(){
    loaded = 0;
    if (extraScripts.length > 0) {
      loadScript(extraScripts[0], extraScripts, createChart);
    } else {
      check(extraScripts);
    }
  }

  if (typeof window['HighchartsCloud'] === 'undefined') {
    window.HighchartsCloud = {
      ondone: [createChart],
      hasWrapped: false,
      hasLoaded: false
    };

    loadScript(scripts[0], scripts, loadExtraScripts);
    loadCSS();

  } else {
    if (!window.HighchartsCloud.hasLoaded) window.HighchartsCloud.ondone.push(loadExtraScriptsAndMakeChart);
    else loadExtraScriptsAndMakeChart();
  }

}());
