"+Wf.footer_note_secondary+"
":"",hf.innerHTML=e,pf.src=qf(),pf.style.height=Wf.footer_logo_height+"rem",pf.style.marginLeft="right"==Wf.footer_logo_order?Wf.footer_logo_margin+"rem":"",pf.style.marginRight="left"==Wf.footer_logo_order?Wf.footer_logo_margin+"rem":"",pf.style.verticalAlign=Wf.footer_align_vertical,pf.style.display=If()?"":"none",_f.href=""==Wf.footer_logo_link_url?"":Yf(Wf.footer_logo_link_url),_f.style.cursor=""==Wf.footer_logo_link_url?"default":"pointer"}(),document.body.style.backgroundColor=Wf.background_color_enabled?Wf.background_color:"transparent",document.body.style.backgroundImage=Wf.background_image_enabled?"url("+Wf.background_image_src+")":"",document.body.style.backgroundSize=Wf.background_image_size,document.body.style.backgroundRepeat="no-repeat",document.body.style.backgroundPosition=Wf.background_image_position;var t=Kf.wrapper.style;t.height="100vh",t.color=Wf.font_color,t.maxWidth="wrapper"==Wf.max_width_target?Wf.max_width+"px":"",t.marginLeft="wrapper"==Wf.max_width_target&&"left"!=Wf.max_width_align?"auto":"",t.marginRight="wrapper"==Wf.max_width_target&&"right"!=Wf.max_width_align?"auto":"",t.padding=Wf.margin_top+"rem "+Wf.margin_right+"rem "+Wf.margin_bottom+"rem "+Wf.margin_left+"rem",t.borderTop=Wf.border.enabled?Wf.border.top.width+"px "+Wf.border.top.style+" "+Wf.border.top.color:"",t.borderRight=Wf.border.enabled?Wf.border.right.width+"px "+Wf.border.right.style+" "+Wf.border.right.color:"",t.borderBottom=Wf.border.enabled?Wf.border.bottom.width+"px "+Wf.border.bottom.style+" "+Wf.border.bottom.color:"",t.borderLeft=Wf.border.enabled?Wf.border.left.width+"px "+Wf.border.left.style+" "+Wf.border.left.color:"";var e=Kf.primary.outer.style,n=Kf.legend.outer.style,r=parseFloat(e.order)>parseFloat(n.order)?"above":"below";cf[Wf.layout_order].forEach(function(t,e){Kf[t].outer.style.order=10*e}),e.flex="1 1 auto",e.height=null,gu(r),n.textAlign=Wf.header_align,Kf.controls.outer.style.textAlign=Wf.header_align,Kf.primary.outer.style.maxWidth="primary"==Wf.max_width_target?Wf.max_width+"px":"",Kf.primary.outer.style.marginLeft="primary"==Wf.max_width_target&&"left"!=Wf.max_width_align?"auto":"",Kf.primary.outer.style.marginRight="primary"==Wf.max_width_target&&"right"!=Wf.max_width_align?"auto":"";var i=("custom"==Wf.space_between_sections?Wf.space_between_sections_custom:Wf.space_between_sections)/2+"rem";Qf.map(function(t){var e=Kf[t],n=e.outer.style;return{name:t,height:eu(e.inner),order:parseFloat(n.order),style:n}}).sort(function(t,e){return t.order-e.order}).filter(function(t){if(t.height)return!0;t.style.paddingBottom="",t.style.paddingTop=""}).forEach(function(t,e,n){t.style.paddingTop=e?i:"",t.style.paddingBottom=en&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},ad.prototype.once=function(t,e){if(!sd(e))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(t,r),n||(n=!0,e.apply(this,arguments))}return r.listener=e,this.on(t,r),this},ad.prototype.removeListener=function(t,e){var n,r,i,a;if(!sd(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(i=(n=this._events[t]).length,r=-1,n===e||sd(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(cd(n)){for(a=i;0 svg {\n\t\tposition: absolute;\n\t\ttop: 3px;\n\t\tright: -1.5rem;\n\t}\n",document.body.appendChild(ih);var ah,oh,sh,ch,lh,fh,uh,dh,hh,ph="story_editor"===window.Flourish.environment||"sdk"===window.Flourish.environment,_h=function(t,e,n){var r,i=this;function a(t){if(window.requestAnimationFrame(a),r){var e=t-r;this.tick(e/1e3)}r=t}console.log(arguments),n.getDatumStartTime&&!n.getDatumEndTime&&(n.getDatumEndTime=n.getDatumStartTime),this.container=t||document.body,this.state=Object.assign(e,Object.assign($d,e)),this.options=Object.assign({},Vd,n),this.migrateState(),this.is_ordinal=!!this.options.getOrdinal(),Object.defineProperties(this.state,{_instance:{enumerable:!1,value:this}}),this.svg=zr(this.container).append("svg").classed("flourish-timeline",!0),this.layer_back=this.svg.append("g").classed("tl-layer-back",!0),this.layer_main=this.svg.append("g").classed("tl-layer-main",!0),this.layer_fore=this.svg.append("g").classed("tl-layer-fore",!0),this.interaction_box=this.svg.append("rect").classed("tl-interaction-box",!0),this.initInfoBox(),this.layer_back.append("rect").classed("tl-background",!0),this.x_scale=Bu(),this.y_scale=Nu(),this.x_scale_cursor=Nu(),this.y_scale_cursor=Nu(),this.axis_bottom=function(t){return Rs(3,t)}(this.x_scale),this.axis_bottom_group=this.layer_fore.append("g").classed("tl-axis-bottom",!0),this.axis_left=function(t){return Rs(4,t)}(this.y_scale),this.axis_left_group=this.layer_fore.append("g").classed("tl-axis-left",!0),this.range_box=this.layer_fore.append("g").classed("tl-range-box",!0),this.range_box_rect=this.range_box.selectAll("rect").data([0,1]).enter().append("rect"),this.range_box_bars=this.range_box.selectAll("line").data([0,1]).enter().append("line"),this.scrub_bar=this.layer_fore.append("line").classed("tl-scrub-bar",!0).attr("stroke",this.state.color_axes),this.scrub_node=this.layer_fore.append("path").classed("tl-scrub-node",!0).attr("d","M 0 0 L -5 -7 L 5 -7 z").attr("fill",this.state.color_axes),this.progress=0,this.progress_encoded=null,this.progress_is_animating=!1,this.progress_animation_source=0,this.progress_animation_target=1,this.progress_animation_amount=0,this.progress_animation_duration=2,this.loop_block_playback=!1,this.playback_group=this.svg.append("g").classed("tl-playback-button",!0),this.playback_group.node().addEventListener("click",this.onClickPlaybackButton.bind(this)),this.playback_button=this.playback_group.append("circle").attr("r",16),this.playback_icon=this.playback_group.append("path"),this.defs=this.svg.append("defs"),this.mask=this.defs.append("clipPath").attr("id","main-mask").append("rect"),this.layer_main.attr("clip-path","url(#main-mask)"),document.addEventListener("touchstart",{}),this.is_dragging=!1,this.touches=function(t,p){p=p||{},t=t||window;var _=new od;_.target=p.target||t;var g=null,b=p.filtered,e=fd;"string"==typeof p.type&&(e=fd.filter(function(t){return 0===t.indexOf(p.type)}));var n=e.map(function(d){var h=d.replace(/^(touch|mouse)/,"").replace(/up$/,"end").replace(/down$/,"start");return{type:d,listener:function(t){var e,n,r,i,a,o,s,c,l,f=t;if(/^touch/.test(d)&&(/^touchend$/.test(d)&&!1!==p.preventSimulated&&t.preventDefault(),f=b?(s=t,c=d,g&&/^touch(end|cancel)/.test(c)?(l=hd(s.changedTouches,g.identifier||0))&&(g=null):!g&&/^touchstart/.test(c)?g=l=dd(s.changedTouches,_.target):g&&(l=hd(s.changedTouches,g.identifier||0)),l):dd(t.changedTouches,_.target)),f){var u=(e=f,n=_.target,i=e.clientX||0,a=e.clientY||0,o=(r=n)===window||r===document||r===document.body?ud:r.getBoundingClientRect(),[i-o.left,a-o.top]);_.emit(h,t,u)}}}});return _.enable=function(){return n.forEach(pd(t,!0)),_},_.disable=function(){return g=null,n.forEach(pd(t,!1)),_},_.enable(),_}(window,{preventSimulated:!1,target:this.svg.node(),filtered:!0}),this.touches.on("start",this.onTouchStart.bind(this)),this.touches.on("move",this.onTouchMove.bind(this)),this.touches.on("end",this.onTouchEnd.bind(this)),this.updateRemScale(),this.has_updated=!1,this.update(),this.shouldDrawMask=qd([function(){return i.progress},function(){return i.state.axis_nice_x},function(){return i.state.axis_nice_y},function(){return i.is_ordinal},function(){return i.is_dragging},function(){return i.state.graph},function(){return i.state.graph_height},function(){return i.bin_results&&i.bin_results.min_time},function(){return i.bin_results&&i.bin_results.max_time},function(){return i.bin_results&&i.bin_results.keys_string}]),a=a.bind(this),window.requestAnimationFrame(a)};function gh(t){return JSON.parse(JSON.stringify(t))}function bh(t){var e=[];Vn.annotations_enabled&&(e=Vn.annotations_content.split("\n").filter(function(t){return""!=t&&void 0!==t&&1n.left-8?(e.style("visibility","hidden"),t.select("line").attr("y2",3).style("opacity",.5)):0!==n.left&&0!==n.right&&(e.style("visibility","visible"),t.select("line").attr("y2",6).style("opacity",1),r=n.right)})},_h.prototype.drawAxisY=function(){this.isEnabled()&&(this.axis_left.scale(this.y_scale.copy()).ticks(this.height/25).tickFormat(this.options.formatNumber),this.axis_left(this.axis_left_group),this.axis_left_group.attr("transform","translate("+this.x_scale_chart(0)+", 0)").style("color",this.state.color_axes))},_h.prototype.drawAndMeasureAxisY=function(){return this.axis_left.scale(this.y_scale.copy()).ticks(this.height/25).tickFormat(this.options.formatNumber),this.axis_left(this.axis_left_group),this.axis_left_group.node().getBoundingClientRect()},_h.prototype.drawRangeBox=function(){if(!this.state.playback_has_saved_range)return this.range_box.style("visibility","hidden");var t=this.state.playback_range,e=this.options.decodeProgress.call(this,t[0]),n=this.options.decodeProgress.call(this,t[1]),r=Math.min(e,n),i=Math.max(e,n),a=this.x_scale.domain(),o=this.is_ordinal?this.x_scale(a[0]):this.x_scale(this.bin_results.min_time),s=this.is_ordinal?this.x_scale(a[a.length-1]):this.x_scale(this.bin_results.max_time),c=this.x_scale_chart(0),l=this.x_scale_chart(1),f=o+(s-o)*r,u=o+(s-o)*i,d=this.y_scale_chart(1),h=this.y_scale_chart(0)-d;this.range_box.style("visibility","visible"),this.range_box_rect.attr("fill","rgba(80, 80, 80, 0.35)").attr("x",function(t){return t?c:u}).attr("width",function(t){return t?f-c:l-u}).attr("y",d).attr("height",Math.max(0,h))},_h.prototype.drawScrubber=function(){var t=this.x_scale_chart(0),e=this.x_scale_chart(1)-t,n=this.y_scale_chart(1),r=this.y_scale_chart(0)-n;this.layer_main.selectAll(".tl-line").remove(),this.axis_left_group.style("visibility","hidden"),this.scrub_bar.attr("visibility","hidden"),this.layer_back.select(".tl-background").style("fill","transparent").style("visibility","visible").attr("x",t).attr("y",n).attr("width",e).attr("height",Math.max(0,r)),this.interaction_box.attr("x",t).attr("y",n).attr("width",e).attr("height",Math.max(0,this.height-n))},_h.prototype.drawInfoBox=function(){if(ph){this.info_box.style("margin-left",this.x_scale_chart(0)+"px");var t=!1,e=!1;this.state.playback_has_saved_range?(this.info_box_text.text("This slide will only play the above portion of the timeline."),t=e=!0):this.state.playback_has_saved_position&&(this.info_box_text.text("This slide will start paused at the current position in the timeline."),t=e=!0),this.info_box.classed("active-info",e),this.info_box.classed("active-clear",t)}},_h.prototype.drawMask=function(){if(!this.shouldDrawMask||this.shouldDrawMask()){var t=this.x_scale.domain(),e=this.x_scale_chart(0),n=this.x_scale_chart(1)-e,r=this.y_scale_chart(1),i=this.y_scale_chart(0)-r,a=this.is_ordinal?this.x_scale(t[0]):this.x_scale(this.bin_results.min_time),o=this.is_ordinal?this.x_scale(t[t.length-1]):this.x_scale(this.bin_results.max_time),s=Math.min(Math.max(a+(o-a)*this.progress,e),e+n),c=eVn.bar_min_value)}function Gh(){zr(this).classed("bar",!1).classed("exiting",!0).transition().duration(Eh).attr("transform","translate(0, "+Th+")").remove()}function Zh(t,e){var n=e*zh+Fh/2;n!==this._previous_offset&&zr(this).transition().duration(Eh).attr("transform",function(){return"translate(0, "+n+")"}),this._previous_offset=n}function Jh(t){return"bars"==Vn.label_mode?-(jh+Hh):Vh(t)-jh-Hh}function Qh(t){return vh?"rotate(90 "+(Jh(t)+jh/2)+" "+(Lh+Dh/2)+")":null}function Kh(t){Rh=t||Vn.number_of_bars;var e=Vn.bar_empty_spaces?Vn.number_of_bars:Rh;Flourish.fixed_height||"specified"!=Vn.height_mode||Vn.column_chart?(Jf.setHeight(null),Th=Ch=Sh,Ah=Nh=kh,vh&&(Ah=Sh,Th=kh),Yh=Th-Bh.top-Bh.bottom,zh=Yh/e):(zh=Jf.remToPx(Vn.bar_height),Th=Ch=(Yh=e*zh)+Bh.top+Bh.bottom,Ah=Nh=kh,Jf.setHeight(Th)),zr("#viz").attr("width",Ah).attr("height",Th).style("transform",vh?"rotate(-90deg) translate("+-Ah+"px, 0)":null)}function tp(){var t,e,n,r;t=ah.getProgress(),n=((e=$n.data.column_names.values).length-1)*t,r=(sh=Math.floor(n))===e.length-1,ch=r?sh:Math.ceil(n),lh=r?0:n-sh,uh=sh!==fh,fh=sh,Eh=wh?0:1e3*Vn.animation_duration;var i=jc.slice();Vn.sort_enabled&&i.sort(Wh);var a=Math.min(Vn.number_of_bars,Dc.length);qh=i.filter(Xh).splice(0,a),Rh!==qh.length&&Kh(qh.length),Fh=zh*Vn.bar_margin/100;var o=zh-Fh;Dh=Vn.image_height/100*o,jh=Vn.image_width/100*o,Lh=(o-Dh)/2,Hh=Vn.image_margin_right/100*o,Uh=Hh<0?-Hh:0;var s=Bh.left;"axis"==Vn.label_mode?s+=Jf.remToPx(Vn.label_axis_width):void 0!==$n.data.column_names.image&&(s+=jh+Hh),zr("#plot").attr("transform","translate("+s+", "+Bh.top+")");var c=Math.max(0,Ah-s-Bh.right);zr("#plot-clip rect").attr("width",Ah-Bh.left).attr("height",Yh);var l=Vn.scale_max,f=Vn.scale_min||0;"auto"==Vn.scale_type?l=Math.max(f,Yr(qh,Mh)):"auto_fixed"==Vn.scale_type&&(l=Dc.max_value);var u=[0,l];Ph=function t(){var e=function(t,e){return function(){var n,r,e,i,a,o,s=Na,c=Na,l=la,f=Oa;function u(){return i=2n?zr(this).style("visibility","hidden"):(zr(this).style("visibility","visible"),e=t.left+t.width,n=t.top))})}),b=Vn.counter_line_height,m=vh?Ch:Nh,y=Vn.counter?Vn.counter_font_size*m/100:0,v=Vn.totaliser?Vn.totaliser_font_size*m/100:0,w=b*(y+v),x=Vn.column_chart&&Vn.sort_ascending,M=Vn.sort_ascending||Vn.column_chart,k=x?Bh.top+"px":null,S=M?vh?"0px":Bh.top+"px":Ch-w+"px",zr("#now").style("left",k).style("right",0).style("text-align",x?"left":"right").style("top",S),zr("#current-column").text($n.data.column_names.values[sh]).style("line-height",b+"em").style("height",b+"em").style("font-weight","bold").style("display",Vn.counter?"block":"none").style("color",Vn.counter_color).style("font-size",y+"px"),zr("#totaliser").style("line-height",b+"em").style("height",b+"em").style("display",Vn.totaliser?"block":"none").style("font-size",v+"px").style("color",Vn.totaliser_color).text(function(){if(Vn.totaliser){var t=Mh({values:Dc.totals});return Vn.totaliser_label+" "+Oc(t)}}),function(){dh=dh||zr("#caption");var t=$n.data.column_names.values[sh],e=Dc.captions[t];e!=hh&&(e?dh.style("opacity",1).html(e):dh.style("opacity",0),hh=e,ef(),yh())}(),bh(Yh),wh=!1}function ep(){var e,t,n,r;vh=Vn.column_chart,zc(),function(){var t=Xc({data:$n.data,blank_cells:Vn.blank_cells,separator:Vn.localization.input_decimal_separator}),e=Xc("legend_filter",Vn.legend_filter);if(t||e){for(var r=0,c=[],n={},i=0;i<$n.data.column_names.values.length;i++)c[i]=0,n[$n.data.column_names.values[i]]=null;var a="category"in $n.data.column_names;Dc=$n.data.map(function(o,t){var s=null,e=o.values.map(function(t,e){var n=Nc(t);if(isNaN(n)){if("zero"==Vn.blank_cells)n=0;else if("remove"==Vn.blank_cells)n=null;else if("last_valid"==Vn.blank_cells)n=s||0;else if("interpolate"==Vn.blank_cells)if(null==s)n=null;else{for(var r=null,i=1;i"+s.text+"",f==s.to))break}Dc.max_value=r,Dc.totals=c,Dc.captions=n}}(),Wl(),e=Vn.sort_descending_text,t=Vn.sort_ascending_text,r=(n=zr("#sort-control").style("border-radius",Vn.controls_border_radius+"rem").selectAll("button").data(Vn.sort_enabled&&Vn.sort_control?[e,t]:[])).enter().append("button"),n.merge(r).text(function(t){return t}).style("display","inline-block").classed("selected",function(t){return t==e?!Vn.sort_ascending:Vn.sort_ascending}).on("click",function(t){Vn.sort_ascending=t!=e,ep()}),n.exit().remove(),Xl.data(ql,Yl).filtered(Vn.legend_filter).update().on("click",function(t){var e=Vn.legend_filter.indexOf(t);-1!=e?Vn.legend_filter.splice(e,1):Vn.legend_filter.length