1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,61971,13143,e=>{"use strict";var t,s,i=e.i(81626),r=Object.defineProperty,a=(e,t,s)=>{let i;return(i="symbol"!=typeof t?t+"":t)in e?r(e,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[i]=s},o=new Map,n=new WeakMap,l=0;function d(e,t,i={},r=s){if(void 0===window.IntersectionObserver&&void 0!==r){let s=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:"number"==typeof i.threshold?i.threshold:0,time:0,boundingClientRect:s,intersectionRect:s,rootBounds:s}),()=>{}}let{id:a,observer:h,elements:c}=function(e){let t=Object.keys(e).sort().filter(t=>void 0!==e[t]).map(t=>{var s;return`${t}_${"root"===t?!(s=e.root)?"0":(n.has(s)||(l+=1,n.set(s,l.toString())),n.get(s)):e[t]}`}).toString(),s=o.get(t);if(!s){let i,r=new Map,a=new IntersectionObserver(t=>{t.forEach(t=>{var s;let a=t.isIntersecting&&i.some(e=>t.intersectionRatio>=e);e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=a),[...null!=(s=r.get(t.target))?s:[]].forEach(e=>{e(a,t)})})},e);i=a.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),s={id:t,observer:a,elements:r},o.set(t,s)}return s}(i),p=c.get(e)||[];c.has(e)||c.set(e,p),p.push(t),h.observe(e);let u=!1;return function(){u||(u=!0,p.splice(p.indexOf(t),1),0===p.length&&(c.delete(e),h.unobserve(e)),0===c.size&&(h.disconnect(),o.delete(a)))}}var h=class extends i.Component{constructor(e){super(e),a(this,"node",null),a(this,"_unobserveCb",null),a(this,"lastInView"),a(this,"handleNode",e=>{this.node&&(this.unobserve(),e||this.props.triggerOnce||this.props.skip||(this.setState({inView:!!this.props.initialInView,entry:void 0}),this.lastInView=this.props.initialInView)),this.node=e||null,this.observeNode()}),a(this,"handleChange",(e,t)=>{let s=this.lastInView;this.lastInView=e,(void 0!==s||e)&&(e&&this.props.triggerOnce&&this.unobserve(),"function"==typeof this.props.children&&this.setState({inView:e,entry:t}),this.props.onChange&&this.props.onChange(e,t))}),this.state={inView:!!e.initialInView,entry:void 0},this.lastInView=e.initialInView}componentDidMount(){this.unobserve(),this.observeNode()}componentDidUpdate(e){(e.rootMargin!==this.props.rootMargin||e.scrollMargin!==this.props.scrollMargin||e.root!==this.props.root||e.threshold!==this.props.threshold||e.skip!==this.props.skip||e.trackVisibility!==this.props.trackVisibility||e.delay!==this.props.delay)&&(this.unobserve(),this.observeNode())}componentWillUnmount(){this.unobserve()}observeNode(){if(!this.node||this.props.skip)return;let{threshold:e,root:t,rootMargin:s,scrollMargin:i,trackVisibility:r,delay:a,fallbackInView:o}=this.props;void 0===this.lastInView&&(this.lastInView=this.props.initialInView),this._unobserveCb=d(this.node,this.handleChange,{threshold:e,root:t,rootMargin:s,scrollMargin:i,trackVisibility:r,delay:a},o)}unobserve(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)}render(){let{children:e}=this.props;if("function"==typeof e){let{inView:t,entry:s}=this.state;return e({inView:t,entry:s,ref:this.handleNode})}let{as:t,triggerOnce:s,threshold:r,root:a,rootMargin:o,scrollMargin:n,onChange:l,ski
1p:d,trackVisibility:h,delay:c,initialInView:p,fallbackInView:u,...m}=this.props;return i.createElement(t||"div",{ref:this.handleNode,...m},e)}},c=Reflect.get(i,"useInsertionEffect"),p=null!=c?c:i.useEffect,u=(null==(t=i.version)?void 0:t.startsWith("19."))||!1,m="u"<typeof window?i.useEffect:i.useLayoutEffect;e.s(["InView",0,h,"useInView",0,function({threshold:e,delay:t,trackVisibility:s,rootMargin:r,scrollMargin:a,root:o,triggerOnce:n,skip:l,initialInView:h,fallbackInView:f,onChange:g}={}){let _=i.useRef(h),[v,w]=i.useState({inView:!!h,entry:void 0}),y=function(e,{threshold:t,root:s,rootMargin:r,scrollMargin:a,trackVisibility:o,delay:n,fallbackInView:l,skip:h,triggerOnce:m}){let f=i.useRef(e),g=i.useRef({node:null,stop:void 0,owner:null});return c||(f.current=e),p(()=>{f.current=e},[e]),i.useCallback(function e(i){let c,p,_=g.current;if(!i&&_.owner!==e)return;if(i===_.node)return _.owner=e,u?_.stop:void 0;let v=_.stop;if(_.stop=void 0,null==v||v(),!i||h){_.node=null,_.owner=i?e:null;return}function w(){null==c||c(),_.stop===w&&(_.node=null,_.stop=void 0)}return _.node=i,_.owner=e,_.stop=w,c=d(i,(e,t)=>{f.current(e,t,p),p=e,m&&e&&w()},{threshold:t,root:s,rootMargin:r,scrollMargin:a,trackVisibility:o,delay:n},l),_.stop!==w&&c(),u?_.stop:void 0},[Array.isArray(t)?t.toString():t,s,r,a,o,n,l,h,m])}((e,t)=>{let s=_.current;_.current=e,(void 0!==s||e)&&(w({inView:e,entry:t}),null==g||g(e,t))},{threshold:e,root:o,rootMargin:r,scrollMargin:a,trackVisibility:s,delay:t,fallbackInView:f,skip:l,triggerOnce:n}),b=i.useRef({node:null,reset:!1}),k=i.useCallback(function(e){e?(b.current.node=e,b.current.reset=!1):b.current.node&&(b.current.node=null,b.current.reset=!0);let t=y(e);if(t)return()=>{t(),b.current.node===e&&(b.current.node=null,b.current.reset=!0)}},[y]);m(()=>{!b.current.reset||(b.current.reset=!1,n||l||(w({inView:!!h,entry:void 0}),_.current=h))});let x=[k,v.inView,v.entry];return x.ref=x[0],x.inView=x[1],x.entry=x[2],x}],61971);let f=function(e,t){window.hj?(console.log("Logging to hotjar",e,t),hj(e,t)):console.log("GTM: No data layer found.")};e.s(["hotjarEvent",0,function(e){f("event",e)}],13143)},13703,e=>{e.v({base:"USAChoropleth-module-scss-module__Weh6CW__base",desktop:"USAChoropleth-module-scss-module__Weh6CW__desktop",dragging:"USAChoropleth-module-scss-module__Weh6CW__dragging",map:"USAChoropleth-module-scss-module__Weh6CW__map",mapArea:"USAChoropleth-module-scss-module__Weh6CW__mapArea",mobile:"USAChoropleth-module-scss-module__Weh6CW__mobile",mock:"USAChoropleth-module-scss-module__Weh6CW__mock",navBlock:"USAChoropleth-module-scss-module__Weh6CW__navBlock",outer:"USAChoropleth-module-scss-module__Weh6CW__outer",suppress:"USAChoropleth-module-scss-module__Weh6CW__suppress",swipers:"USAChoropleth-module-scss-module__Weh6CW__swipers",title:"USAChoropleth-module-scss-module__Weh6CW__title",tooltip:"USAChoropleth-module-scss-module__Weh6CW__tooltip"})},10842,e=>{"use strict";var t=e.i(12629),s=e.i(81626),i=e.i(77384),r=e.i(28045),a=e.i(19645),o=e.i(16739),n=e.i(78671),l=e.i(52775),d=e.i(62856),h=s,c=e.i(13647),p=s,u=e.i(79098),m=e.i(99972);class f extends p.Component{state={open:!1,set:""};toggle=(e="")=>{this.setState({open:e!==this.state.set,set:e===this.state.set?"":e},()=>{u.default.event({category:"Sharing",action:this.state.open?"Opened chart share menu.":"Closed chart share menu.",label:this.props.title})})};trap=e=>{e.stopPropagation()};close=()=>{this.state.open&&this.setState({open:!1,set:""},()=>{u.default.event({category:"Sharing",action:"Closed chart share menu.",label:this.props.title})})};trackShareAction=e=>{u.default.event({category:"Sharing",action:e,label:this.props.title}),this.close()};get state_id(){return Array.isArray(this.props.state_id)?this.props.state_id[0]:this.props.state_id}get compare_state_id(){if(Array.isArray(this.props.state_id))return this.props.state_id[1]}componentDidMount(){window.addEventListener("click",this.close)}componentWillUnmount(){window.removeEventListener("click",this.close)}get share_url(){return`/explore/${this.props.report_id}/measure/${this.props.measure_id}/state/${this.state_id}${this.compare_state_id?`/compare/${this.compare_state_id}`:""}`}get download_url(){return`${m.API.RENDER_URL}
1/${this.props.chart_type}/report/${this.props.report_id}${this.props.measure_id?`/measure/${this.props.measure_id}`:""}${this.state_id?`/state/${this.state_id}`:""}${this.compare_state_id?`/compare/${this.compare_state_id}`:""}/size/1200x600.jpg`}get link_url(){return`/rendered/${this.props.chart_type}/report/${this.props.report_id}${this.props.measure_id?`/measure/${this.props.measure_id}`:""}${this.state_id?`/state/${this.state_id}`:""}${this.compare_state_id?`/compare/${this.compare_state_id}`:""}`}get print_url(){return`${this.link_url}?print=true`}objectToQParams(e){return"?"+Object.keys(e).filter(t=>!!e[t]).map(t=>`${t}=${encodeURIComponent(e[t])}`).join("&")}get facebook_url(){return"https://facebook.com/sharer.php"+this.objectToQParams({u:this.share_url,title:this.props.title})}get tweet_title(){let e=this.props.title;if(!e)return"Explore America's Health Rankings";if(e.length>117){let t=e.length-117;e=e.slice(0,-(t+3))+"..."}return e}get twitter_url(){return"https://twitter.com/share"+this.objectToQParams({url:this.share_url,text:this.tweet_title})}get linkedin_url(){return"https://www.linkedin.com/sharing/share-offsite/"+this.objectToQParams({url:this.share_url})}get download_open(){return this.state.open&&"download"===this.state.set}get share_open(){return this.state.open&&"share"===this.state.set}render(){let e=(0,i.default)("chart_share",{open:this.state.open}),s=(0,i.default)("chart_share--toggle download",{active:this.download_open}),r=(0,i.default)("icon","icon-"+(this.download_open?"cross":"download")),a=(0,i.default)("chart_share--toggle share",{active:this.share_open}),o=(0,i.default)("icon","icon-"+(this.share_open?"cross":"share"));return(0,t.jsxs)("div",{className:e,onClick:this.trap,children:[(0,t.jsxs)("div",{className:"chart_share--options",children:[(0,t.jsx)("div",{className:s,onClick:()=>this.toggle("download"),children:(0,t.jsx)("span",{className:r})}),(0,t.jsx)("div",{className:a,onClick:()=>this.toggle("share"),children:(0,t.jsx)("span",{className:o})})]}),(0,t.jsxs)("div",{className:"chart_share--ui",children:[this.share_open&&(0,t.jsxs)("div",{className:"chart_share--options_group share",children:[(0,t.jsxs)("h5",{children:["Share",this.props.title?` "${this.props.title}"`:""]}),(0,t.jsxs)("a",{className:"chart_share--option chart_share--facebook",href:this.facebook_url,target:"_blank",onClick:()=>this.trackShareAction("Facebook"),rel:"noreferrer",children:[(0,t.jsx)("span",{className:"icon icon-facebook"}),(0,t.jsx)("span",{className:"label",children:"Facebook"})]}),(0,t.jsxs)("a",{className:"chart_share--option chart_share--linkedin",href:this.linkedin_url,target:"_blank",onClick:()=>this.trackShareAction("LinkedIn"),rel:"noreferrer",children:[(0,t.jsx)("span",{className:"icon icon-linkedin"}),(0,t.jsx)("span",{className:"label",children:"LinkedIn"})]})]}),this.download_open&&(0,t.jsxs)("div",{className:"chart_share--options_group download",children:[(0,t.jsxs)("h5",{children:["Download",this.props.title?` "${this.props.title}"`:""]}),(0,t.jsxs)("a",{className:"chart_share--option chart_share--download",href:this.download_url,target:"_blank",onClick:()=>this.trackShareAction("Download"),rel:"noreferrer",children:[(0,t.jsx)("span",{className:"icon icon-download"}),(0,t.jsx)("span",{className:"label",children:"Download"})]}),(0,t.jsxs)("a",{className:"chart_share--option chart_share--print",href:this.print_url,target:"_blank",onClick:()=>this.trackShareAction("Print"),rel:"noreferrer",children:[(0,t.jsx)("span",{className:"icon icon-document"}),(0,t.jsx)("span",{className:"label",children:"Print"})]})]})]})]})}}class g extends h.Component{getParams(e){return e.chart_props.params||e.router.query}get chart_params(){return this.getParams(this.props)}get display(){let e=this.props.chart_props.data.settings;return e?.display||this.props.query?.display}componentDidMount(){let{id:e,onSuccess:t}=this.props.chart_props,s=this.chart_params;t&&t(e),u.default.event({category:"chart",action:"view",label:`${s?s.chart_type:this.props.id}`})}componentDidUpdate(e){this.props.chart_props.onSuccess&&this.getParams(this.props).report_id!==this.getParams(e).report_id&&this.props.chart_props.onSuccess(this.props.chart_props.id)}defaultWrapper(e,s){return(0,t.jsxs)("div",{id:this.props.id,className:s,children:[!!this.props.title&&(0,t.jsxs)("div",{className:"chart_wrapper--standard_title",children:[(0,t.jsx)("span",{children:this.props.title}),this.chart_params?.report_id&&(0,t.jsxs)("span",{className:"chart_wrapper--report_title",children:[", ",(0,d.titleize)(this.chart_params.report_id)]})]}),(0,t.jsxs)("div",{className:"chart_wrapper--standard_content",children:[!this.props.pure_chart&&this.chart_params&&(0,t.jsx)(f,{title:this.props.title,...this.chart_params}),this.props.description&&(0,t.jsx)("p",{className:"chart--standard_description",children:this.props.description}),this.props.children]}),(0,t.jsx)("div",{className:"chart_wrapper--standard_footer",children:(0,t.jsx)("img",{src:"https://assets.americashealthrankings.org/images/ahr-logo-h.png",alt:"AHR Logo"})}),e.theme&&(0,t.jsx)("link",{rel:"stylesheet",type:"text/css",href:e.theme})]})}innovationCenterWrapper(e,s){return(0,t.jsxs)("div",{id:this.props.id,className:s,children:[!!this.props.title&&(0,t.jsxs)("div",{className:`chart_wrapper--standard_title ${this.props.title.length>58?"long-title":""}`,children:[(0,t.jsx)("span",{children:this.props.title}),this.chart_params?.report_id&&(0,t.jsxs)("span",{className:"chart_wrapper--report_title",children:[", ",(0,d.titleize)(this.chart_params.report_id)]})]}),this.props.sub_header&&(0,t.jsx)("div",{className:"chart_wrapper--sub_title",children:(0,t.jsx)("span",{children:this.props.sub_header})}),(0,t.jsxs)("div",{className:"chart_wrapper--standard_content",children:[this.chart_params&&(0,t.jsx)(f,{title:this.props.title,...this.chart_params}),this.props.description&&(0,t.jsx)("p",{className:"chart--standard_description",children:this.props.description}),this.props.children]}),e.theme&&(0,t.jsx)("link",{rel:"stylesheet",type:"text/css",href:e.theme})]})}render(){let e=this.props.chart_props.data.settings||{},t=(0,i.default)("chart_wrapper",{[`chart_wrapper--${this.props.className}`]:this.props.className,"theater-display":"theater"===this.display,"innovation-center":"701i"===this.display&&!e.child,"innovation-center-web":"701i-web"===this.display&&!e.child});switch(this.display){case"701i":case"701i-web":return this.innovationCenterWrapper(e,t);default:return this.defaultWrapper(e,t)}}}function _(e){let s=(0,c.useParams)();return(0,t.jsx)(g,{query:s,...e})}var v=e.i(4040),w=e.i(90886),y=e.i(19685),b=e.i(26717),k=e.i(40780),x=e.i(13703);class C extends s.Component{static defaultProps={id:"usa-choropleth"};state={focus_state:null,dragging:!1,zooming:!1,width:1024};get self_title(){return this.use_rank?"Overall Ranks":`${this.props.data.DisplayName}`}get title(){return this.props.data.title||this.self_title}get renderable(){return this.props.data}render(){return this.renderable?this.renderChart():null}
1onClick=e=>{this.props.onClick?(e.preventDefault(),e.stopPropagation(),this.state.zooming||this.props.onClick(e.target.id)):document.querySelector(".swiper").swiper.slideTo(this.props.data.metrics.findIndex(t=>`${t.StateCode}-USAChoropleth-(${this.title})`===e.currentTarget.id)||0),this.setState({zooming:!1})};setFocus=e=>{this.setState({focus_state:e})};setWidth=()=>{this.setState({width:window.innerWidth})};correctFocus=()=>{if(this.state.focus_state){let e=this.state.focus_state.el.getBoundingClientRect(),t=this.props.data.metrics.filter(e=>e.StateCode===this.state.focus_state.id)[0];this.setState({focus_state:{...this.state.focus_state,top:e.top+5,left:e.left+e.width/this.getLeftX(this.state.focus_state.id),value:this.use_rank?t.Rank:t.Value}})}};componentDidMount(){window.addEventListener("scroll",this.correctFocus),window.addEventListener("resize",this.correctFocus),window.addEventListener("resize",this.setWidth),this.setWidth()}componentWillUnmount(){window.removeEventListener("scroll",this.correctFocus),window.removeEventListener("resize",this.correctFocus),window.removeEventListener("resize",this.setWidth)}componentDidUpdate(e){this.props.data.title!==e.data.title&&this.correctFocus()}prove(e){return null!=e}get chart_description(){return`${this.use_rank?"Rank Based On: ":""}${this.props.data.Description}`}get use_rank(){return this.props.data.IsSummation||(0,d.isOverall)(this.props.data)||this.props.data.use_rank&&this.props.data.use_rank[this.props.id]}get precision(){return this.use_rank?0:this.props.data.Precision}get quints(){return this.use_rank?[{id:"first",description:"1 - 10",color:"#A2D8FF",low:1,high:10},{id:"second",description:"11 - 20",color:"#4BAEF5",low:11,high:20},{id:"third",description:"21 - 30",color:"#3882CC",low:21,high:30},{id:"fourth",description:"31 - 40",color:"#306FA4",low:31,high:40}
1,{id:"fifth",description:"41 - 50",color:"#134B7E",low:41,high:50},{id:"na",description:"N/A",color:"#d1d1d1"}]:[{id:"first",description:"First Quintile",color:"#A2D8FF"},{id:"second",description:"Second Quintile",color:"#4BAEF5"},{id:"third",description:"Third Quintile",color:"#3882CC"},{id:"fourth",description:"Fourth Quintile",color:"#306FA4"},{id:"fifth",description:"Fifth Quintile",color:"#134B7E"},{id:"na",description:"No Data",color:"#D1D1D1"}]}precisify(e,t=10){return parseFloat(parseFloat(e).toFixed(t||this.precision))}getFormattedValue(e){let{DisplayFormat:t}=this.props.data;if(e){if(e=parseFloat(e).toFixed(this.precision),t?.toLowerCase()==="percent"&&(e+="%"),t?.toLowerCase()==="currency"){let t="$0,0";this.precision>0&&(t+=".00"),e=(0,r.default)(e).format(t)}t?.toLowerCase()==="numeric"&&(e=(0,r.default)(e).format("0,"+(0,d.precisionIncrement)(this.precision)))}return e}getQuintileLabel(e,t,s){return this.props.data.IsWeightPositive&&!this.use_rank,`${void 0!==e?this.getFormattedValue(e):""} - ${void 0!==t?this.getFormattedValue(t):""}`}get quintiles(){if(this.use_rank)return this.quints;{let e=this.precision;if(!this.props.data.metrics||!(this.props.data.metrics.length>0))return[this.quints[this.quints.length-1]];{let t=[],s=this.props.data.sample||this.props.data.metrics[0];if("category"===s.DisplayType)switch(s?.Points?.length||0){case 5:t=[...this.quints];break;case 4:t=[...this.quints.toSpliced(3,1)];break;case 3:t=[...this.quints.toSpliced(3,1).toSpliced(0,1)];break;case 2:t=[...this.quints.toSpliced(3,1).toSpliced(2,1).toSpliced(0,1)];case 1:t=[...this.quints.toSpliced(4,1).toSpliced(3,1).toSpliced(2,1).toSpliced(0,1)]}let i=this.quints.map((t,i)=>{if(i===this.quints.length-1)return t;{let r,a;return this.props.data.IsWeightPositive&&!this.use_rank?(r=this.precisify(s?.Points[s?.Points.length-1-2*i],e),a=this.precisify(s?.Points[s?.Points.length-1-(2*i+1)],e)):(r=this.precisify(s.Points?.[2*i],e),a=this.precisify(s.Points?.[2*i+1],e)),{...t,low:r,high:a,description:this.getQuintileLabel(r,a,i)}}});return t.length>0?t?.map(({color:t,id:i},r)=>{let a=this.precisify(s?.Points[this.props.data.IsWeightPositive?s?.Points?.length-1-r:r],e);return{color:t,id:i,description:"na"===i?"No Data":this.getFormattedValue(a).toString(),high:a,low:a}}):i}}}get emptiness(){let e=this.props.data.metrics.filter(e=>"ALL"!==e.StateCode&&!this.prove(e.Value)).length>0,t=0===this.props.data.metrics.filter(e=>"DC"===e.StateCode).length;return e||t}get legend_items(){return this.quintiles.map((e,t)=>({id:e.id,description:e.description,swatch_style:{backgroundColor:e.color}})).filter(e=>!!this.emptiness||"na"!==e.id)}getQuintile=e=>{let t,s=this.use_rank?"Rank":"Value";if(this.prove(e)&&this.prove(e[s])){let i=this.precisify(e[s]);t=this.quintiles.filter(e=>this.props.data.IsWeightPositive&&!this.use_rank?i<=e.low&&i>=e.high:i>=e.low&&i<=e.high)[0],this.props.data.metrics?.[0]?.DisplayType!=="category"&&(this.props.data.IsWeightPositive&&!this.use_rank?(i>this.quintiles[0].low&&(t=this.quintiles[0]),i<this.quintiles[this.quintiles.length-2].high&&(t=this.quintiles[this.quintiles.length-2])):(i<this.quintiles[0].low&&(t=this.quintiles[0]),i>this.quintiles[this.quintiles.length-2].high&&(t=this.quintiles[this.quintiles.length-2])))}return t||this.quintiles[this.quintiles.length-1]};get state_paths(){return this.state.focus_state?n.state_paths.filter(e=>e.id!==this.state.focus_state.id).concat(n.state_paths.filter(e=>e.id===this.state.focus_state.id)):n.state_paths}renderChart(){let e=this.props.data,s=(0,i.default)(this.props.id,x.default.base,e?.isMock?x.default.mock:void 0,{compact:this.props.compact,"contains-missing-data":this.emptiness});return(0,t.jsxs)(_,{chart_props:this.props,id:"usa-choropleth",className:s,pure_chart:!0,children:[(0,t.jsxs)("div",{className:x.default.title,children:[(0,t.jsx)("h4",{children:this.title}),(0,t.jsx)("p",{children:this.chart_description})]}),(0,t.jsx)(v.default,{className:x.default.mobile,legends:this.legend_items}),(0,t.jsx)(a.TransformWrapper,{disabled:this.state.width>=768,onPanning:()=>this.setState({zooming:!0}),children:({zoomIn:e,zoomOut:s,resetTransform:r,...o})=>(0,t.jsxs)("div",{className:x.default.mapArea,children:[(0,t.jsx)("div",{className:(0,i.default)(x.default.map,"map-display"),children:(0,t.jsx)(a.TransformComponent,{wrapperStyle:{width:"100%",height:"100%"},children:(0,t.jsx)("svg",{viewBox:"0 0 800 570",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:(0,t.jsx)("g",{fill:"#D1D1D1",fillRule:"evenodd",role:"graphics-object","aria-label":`Map of the U.S. with states color-coded by ranking quintile. ${this.use_rank?`A rank of 1 is ${this.props.data?.IsWeightPositive?"healthiest":"less healthy"}`:""}`,children:this.state_paths.map(this.renderState)})})})}),(0,t.jsxs)("div",{className:(0,i.default)(x.default.navBlock,x.default.mobile),children:[(0,t.jsx)(w.default,{icon:"plus",onClick:()=>e()}),(0,t.jsx)(w.default,{icon:"minus",onClick:()=>s()}),(0,t.jsx)(w.default,{icon:"target",onClick:()=>r()})]})]})}),(0,t.jsx)("p",{className:x.default.dataSources,children:`Data from ${this.props.data.source}`}),(0,t.jsx)(v.default,{className:x.default.desktop,legends:this.legend_items}),this.state.focus_state&&this.renderToolTip(),(0,t.jsx)(o.Swiper,{className:(0,i.default)(x.default.mobile,x.default.swipers,this.state.dragging&&x.default.dragging),slidesPerView:1.5,spaceBetween:12,scrollbar:{hide:!1,draggable:!0,dragSize:50},modules:[y.Scrollbar],breakpoints:{480:{slidesPerView:2,spaceBetween:20},640:{slidesPerView:3,spaceBetween:20}},onScrollbarDragMove:()=>this.setState({dragging:!0}),onScrollbarDragEnd:()=>this.setState({dragging:!1}),children:this.props.data.metrics?.map((e,s)=>(0,t.jsx)(o.SwiperSlide,{children:(0,t.jsx)(b.default,{color:this.getQuintile(e)?.color||"#d1d1d1",state:e.StateName,data:e.Value,stateCode:e.StateCode,onClick:this.onClick,note:this.props.data?.UnitTypeDescription,index:e.StateCode,active:this.state.focus_state?.label===e.StateName})},s))})]})}renderToolTip=()=>
1{let e={top:this.state.focus_state.top,left:this.state.focus_state.left},s=(0,i.default)("tool-tip",x.default.tooltip,{"far-left":this.state.focus_state.left<200},{"far-right":window.innerWidth-this.state.focus_state.left<200}),r=this.prove(this.state.focus_state.value)?this.getFormattedValue(this.state.focus_state.value):"â¢";return(0,t.jsx)("div",{className:s,style:e,children:(0,t.jsxs)("div",{className:"tool-tip-content",children:[(0,t.jsxs)("span",{className:"focus-label",children:[(0,t.jsx)("span",{className:"focus-state-name",children:this.state.focus_state.label}),(0,t.jsx)("span",{className:"focus-value-type",children:this.use_rank?"Rank":"Value"})]}),(0,t.jsx)("span",{className:"focus-value",children:r})]})})};renderState=e=>{let s=(0,i.default)("state-path",{patch:e.patch}),r=this.props.data.metrics.filter(t=>t.StateCode===e.id)[0],a="#D1D1D1";if(r){let e=this.getQuintile(r);a=e?e.color:"#d1d1d1"}else r={};return(0,t.jsx)("path",{id:`${e.id}${e.patch?"-patch":""}-USAChoropleth-(${this.title})`,className:s,d:e.d,fill:a,onClick:this.onClick,role:"img","aria-label":`${(0,l.getStateName)(e.id)} ${this.use_rank?"Rank":"Value"} is ${this.use_rank?r.Rank:this.getFormattedValue(r.Value)}.`,onMouseEnter:t=>{let s=t.target.getBoundingClientRect();this.setFocus({id:e.id,el:t.target,top:s.top+5,left:s.left+s.width/this.getLeftX(e.id),label:(0,l.getStateName)(e.id),value:this.use_rank?r.Rank:r.Value})},onMouseLeave:e=>{this.setFocus(null)}},`${e.id}${e.patch?"-patch":""}`)};getLeftX(e){switch(e){case"TX":return 2.4;case"LA":return 3.5;default:return 2}}}e.s(["USAChoropleth",0,C,"USAChoroplethLoading",0,()=>{let e={data:{isMock:!0,metrics:l.state_list.map(({id:e,name:t})=>({StateCode:e,StateName:t,Value:null,Rank:null}))},params:{}};return(0,t.jsx)(C,{...e})},"default",0,({editionId:e,measureId:s,populationId:r,fetching:a=!1})=>{let[{error:o,data:n}]=(0,k.useUSAChoroplethData)(e,s,r);return o?null:(0,t.jsx)("div",{className:(0,i.default)(x.default.outer),children:(0,t.jsx)(C,{...n})})}],10842)},35635,e=>{e.v({base:"MapNavigation-module-scss-module__sRFmzW__base",button:"MapNavigation-module-scss-module__sRFmzW__button",disabled:"MapNavigation-module-scss-module__sRFmzW__disabled"})},79610,e=>{"use strict";var t=e.i(12629),s=e.i(35635),i=e.i(77384),r=e.i(27021);e.s(["default",0,({className:e,icon:a,disabled:o,ariaLabel:n,onClick:l})=>(0,t.jsx)("div",{className:(0,i.default)(s.default.base,e,o&&s.default.disabled),children:(0,t.jsx)(r.default,{className:s.default.button,label:"",icon:a,ariaLabel:n,isIconDark:o,onClick:()=>l?.()})})])},39919,e=>{e.v({base:"ActionBar-module-scss-module__5HX0BG__base",cta:"ActionBar-module-scss-module__5HX0BG__cta",icon:"ActionBar-module-scss-module__5HX0BG__icon",shareTitle:"ActionBar-module-scss-module__5HX0BG__shareTitle",tooltipContainer:"ActionBar-module-scss-module__5HX0BG__tooltipContainer"})},9059,e=>{"use strict";var t=e.i(12629),s=e.i(81626),i=e.i(39919),r=e.i(27021),a=e.i(77384),o=e.i(45893),n=e.i(5508),l=e.i(32670);let d=s.memo(function(e){return(0,t.jsx)("svg",{width:24,height:24,fill:"none",...e,children:(0,t.jsx)("path",{d:"M21 16.5V21H3v-4.5H0V21c0 1.65 1.35 3 3 3h18c1.65 0 3-1.35 3-3v-4.5h-3zm-1.5-6l-2.115-2.115-3.885 3.87V0h-3v12.255l-3.885-3.87L4.5 10.5 12 18l7.5-7.5z",fill:"#424242"})})}),h=s.memo(function(e){return(0,t.jsx)("svg",{width:30,height:27,fill:"none",...e,children:(0,t.jsx)("path",{d:"M25.5 7.5H24V0H6v7.5H4.5C2.01 7.5 0 9.51 0 12v9h6v6h18v-6h6v-9c0-2.49-2.01-4.5-4.5-4.5zM9 3h12v4.5H9V3zm12 18v3H9v-6h12v3zm3-3v-3H6v3H3v-6c0-.825.675-1.5 1.5-1.5h21c.825 0 1.5.675 1.5 1.5v6h-3z",fill:"#424242"})})}),c=s.memo(function(e){return(0,t.jsx)("svg",{width:28,height:30,fill:"none",...e,children:(0,t.jsx)("path",{d:"M22.59 21.205c-1.144 0-2.168.452-2.951 1.16L8.9 16.114a4.93 4.93 0 00.135-1.055c0-.361-.06-.708-.135-1.054l10.617-6.19a4.498 4.498 0 003.072 1.22c2.5 0 4.518-2.018 4.518-4.518S25.09 0 22.59 0a4.512 4.512 0 00-4.518 4.518c0 .362.06.708.136 1.054L7.59 11.762a4.498 4.498 0 00-3.072-1.22A4.512 4.512 0 000 15.06c0 2.5 2.018 4.518 4.518 4.518 1.19 0 2.26-.467 3.072-1.22l10.723 6.265a4.25 4.25 0 00-.12.98A4.403 4.403 0 0022.59 30a4.403 4.403 0 004.398-4.398 4.403 4.403 0 00-4.398-4.397zm0-18.193a1.51 1.51 0 011.506 1.506 1.51 1.51 0 01-1.506 1.506 1.51 1.51 0 01-1.506-1.506 1.51 1.51 0 011.506-1.506zM4.518 16.566a1.51 1.51 0 01-1.506-1.506 1.51 1.51 0 011.506-1.506 1.51 1.51 0 011.506 1.506 1.51 1.51 0 01-1.506 1.506zM22.59 27.14a1.51 1.51 0 01-1.506-1.506 1.51 1.51 0 011.506-1.506 1.51 1.51 0 011.506 1.506 1.51 1.51 0 01-1.506 1.506z",fill:"#424242"})})}),p={download:{icon:"download-sm",cta:"Download",newWindow:!0},print:{icon:"print",cta:"Print",newWindow:!0},share:{icon:"share"}};e.s(["default",0,({className:e,actions:u})=>{let m=u.map(e=>({...p[e.type],...e})),f=m.find(e=>
1"share"===e.type)?.url,[g,_]=(0,s.useState)(!1);(0,s.useEffect)(()=>{let e;return g&&(e=setTimeout(()=>{_(!1)},1e3)),()=>clearTimeout(e)},[g]);let v=[{key:"link",cta:g?"Copied!":"Copy Link",onClick:()=>{navigator.clipboard.writeText(window.location.href),_(!0)}},{key:"facebook",cta:"Facebook",onClick:()=>{window.open("https://facebook.com/sharer.php?"+n.default.stringify({u:f||window.location.href}),"_blank")}},{key:"linkedin",cta:"LinkedIn",onClick:()=>{window.open("https://www.linkedin.com/sharing/share-offsite/?"+n.default.stringify({url:f||window.location.href}),"_blank")}}];return(0,t.jsx)("div",{className:(0,a.default)(i.default.base,e),children:m.map((e,a)=>(0,t.jsx)(s.Fragment,{children:(0,t.jsxs)(l.Popover,{hasFocusTrapping:!1,preferredPosition:"bottom-center",children:[(0,t.jsx)(l.Trigger,{children:(0,t.jsx)("button",{className:i.default.icon,"aria-label":`${e.type}-button`,children:(e=>{switch(e){case"print":return(0,t.jsx)(h,{});case"share":return(0,t.jsx)(c,{});case"download-sm":return(0,t.jsx)(d,{})}})(e.icon)})}),(0,t.jsx)(l.Content,{children:(0,t.jsx)("div",{className:i.default.tooltipContainer,children:"share"===e.type?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:i.default.shareTitle,children:e?.description}),(0,t.jsx)("ul",{children:v.map((e,s)=>(0,t.jsxs)("li",{children:[(0,t.jsx)(o.default,{icon:e.key}),(0,t.jsx)(r.default,{type:"text",label:e.cta,onClick:e.onClick})]},s))})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{children:e?.description}),(0,t.jsx)(r.default,{className:i.default.cta,label:e?.cta,href:e?.url,blank:e?.newWindow,onClick:e?.callBack,isIconDark:!0})]})})})]})},a))})}],9059)},32670,e=>{"use strict";var t=e.i(12629),s=e.i(81626);let i={left:0,top:0,width:0,height:0},r=(0,s.createContext)({isShow:!1,setIsShow:()=>{throw Error("PopoverContext setIsShow should be used under provider")},preferredPosition:"bottom-left",triggerRect:i,hasFocusTrapping:!0,disabled:!1,onClose:()=>{throw Error("PopoverContext setIsShow should be used under provider")},setTriggerRect:()=>{throw Error("PopoverContext setTriggerRect should be used under provider")}}),a=(0,s.memo)(function({children:e,preferredPosition:a="bottom-left",defaultOpen:o=!1,open:n,hasFocusTrapping:l=!0,disabled:d=!1,onClose:h=()=>{}}
1){let[c,p]=(0,s.useState)(o),[u,m]=(0,s.useState)(i);return(0,t.jsx)(r.Provider,{value:{isShow:void 0!==n?n:c,setIsShow:p,preferredPosition:a,triggerRect:u,disabled:d,hasFocusTrapping:l,onClose:h,setTriggerRect:m},children:e})}),o=(0,s.forwardRef)(function({children:e,...t},i){let{disabled:a,setIsShow:o,setTriggerRect:n,isShow:l}=(0,s.useContext)(r),h=(0,s.useRef)(null);return(0,s.useEffect)(()=>{if(!l)return;let e=()=>{let e=h?.current;e&&n(e.firstElementChild?.getBoundingClientRect())};e();let t=h.current&&function(e){let t=e?.parentElement||null;for(;t;){if(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth)return t;t=t.parentElement}return null}(h.current);return t?.addEventListener("scroll",e),window.addEventListener("scroll",e),window.addEventListener("resize",e),window.addEventListener("click",e),()=>{t?.removeEventListener("scroll",e),window.removeEventListener("scroll",e),window.removeEventListener("resize",e),window.removeEventListener("click",e)}},[n,a,l]),(0,s.cloneElement)(e,{onClick:a?t.onClick:function(e){e.stopPropagation(),o(e=>!e),t?.onClick?.(e)},ref:d(h,i)})});function n({children:e}){var i,a;let o,h,c,{triggerRect:p,preferredPosition:u,hasFocusTrapping:m,onClose:f,setIsShow:g}=(0,s.useContext)(r),_=(0,s.useRef)(null),[v,w]=(0,s.useState)({left:-9001,top:-9001});(0,s.useEffect)(()=>{let e,t,s=_.current;if(null==s)return;let i=s?.querySelector(".popover-arrow"),r=s.getBoundingClientRect(),a=(e=p.top,(t=window.innerHeight-p.bottom)>=r.height||t>=e?"below":"above"),o=function(e,t,s){let i=e.top+e.height;switch(i+t.height>window.innerHeight&&(i=e.top-t.height),s){case"bottom-center":return{top:i,left:Math.min(Math.max(e.left+e.width/2-t.width/2,10),document.body.clientWidth-t.width)};case"bottom-left":return{top:i,left:e.left};case"bottom-right":return{top:i,left:e.left+e.width-t.width};default:throw Error(`Unhandled position: ${s}`)}}(p,r,u);"below"===a?o.top+=20:"above"===a&&(o.top-=10),w(o),i&&("below"===a?(i.style.top="-10px",i.style.left="20px",i.style.clipPath="pol
1ygon(50% 0%, 0 100%, 100% 100%)"):"above"===a&&(i.style.top="unset",i.style.bottom="-10px",i.style.left="20px",i.style.clipPath="polygon(50% 100%, 0 0, 100% 0)"))},[p,u]);let y=d(_,(i=m,o=(0,s.useRef)(null),h=(0,s.useCallback)(e=>{let t=o.current;if(i){if(null==t)return;let s=t.querySelectorAll(l);if("Tab"===e.key){let t=s[s.length-1];document.activeElement===t&&(s[0]?.focus(),e.preventDefault())}}},[i]),(0,s.useEffect)(()=>{let e=o.current;if(null==e)return;let t=e.querySelectorAll(l);return t[0]?.focus(),document.addEventListener("keydown",h),()=>{document.removeEventListener("keydown",h),document.activeElement==document.body&&document.body.focus()}},[h]),o),(a=(0,s.useCallback)(()=>{g(!1),f?.()},[g,f]),c=(0,s.useRef)(null),(0,s.useEffect)(()=>{let e=c.current;if(null==e)return;let t=t=>{e.contains(t.target)||a()};return document.addEventListener("click",t,!0),()=>{document.removeEventListener("click",t,!0)}},[a]),c));return(0,t.jsxs)("dialog",{open:!0,ref:y,style:{position:"fixed",left:`${v.left}px`,top:`${v.top}px`,zIndex:3e3,margin:0,padding:0,border:"none",backgroundColor:"transparent"},children:["bottom-center"!==u&&(0,t.jsx)("span",{className:"popover-arrow",style:{position:"absolute",zIndex:2001,width:"20px",height:"10px",background:"white"}}),e]})}let l=":is(a, input, button, [tab-index]";function d(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):e&&(e.current=t)})}}e.s(["Close",0,function({children:e}){let{onClose:t,setIsShow:i}=(0,s.useContext)(r);return(0,s.cloneElement)(e,{onClick:s=>{s.stopPropagation(),i(!1),t?.(),e.props.onClick?.(s)}})},"Content",0,function({children:e}){let{isShow:i}=(0,s.useContext)(r);return i?(0,t.jsx)(n,{children:e}):null},"Popover",0,a,"Trigger",0,o])},99098,e=>{"use strict";var t=e.i(81626),s=e.i(90143),i=e.i(28433);let r=(0,i.graphql)(` 2 query StateDataByEdition($editionId: Int!, $metricTypeId: Int!) { 3 report: core_report(editionId: $editionId) { 4 editionId 5 reportMeasures(where: { metricId: { eq: $metricTypeId } }) { 6 endDate 7 measure: metric { 8 metricTypeID: metricId 9 displayName 10 description 11 precision: percision 12 isWeightPositive 13 displayFormat 14 unitTypeDescription 15 isSummation 16 source { 17 displayName 18 } 19 populationType: population { 20 populationTypeId: populationId 21 name 22 colorCode { 23 hex 24 } 25 } 26 metricData(order: { sourceEndDate: DESC }) { 27 metricDataId 28 value 29 valueDisplay 30 rank 31 sourceEndDate 32 displayYear 33 stateCode 34 state { 35 stateCode 36 stateName 37 } 38 metricDataMissings { 39 metricDataMissingReasonTypeId 40 description 41 name 42 } 43 } 44 } 45 } 46 } 47 } 48`),a=(0,i.graphql)(` 49 query StatePopulationDataByEdition( 50 $editionId: Int! 51 $metricTypeId: Int! 52 $disparityMetricTypeId: Int! 53 ) { 54 report: core_report(editionId: $editionId) { 55 editionId 56 reportMeasures(where: { metricId: { eq: $metricTypeId } }) { 57 endDate 58 measure: metric { 59 metricTypeID: metricId 60 disparities( 61 where: { disparityMetricId: { eq: $disparityMetricTypeId } } 62 ) { 63 disparityMeasure: disparityMetric { 64 metricTypeID: metricId 65 displayName 66 description 67 precision: percision 68 displayFormat 69 isWeightPositive 70 isSummation 71 unitTypeDescription 72 source { 73 displayName 74 } 75 populationType: population { 76 populationTypeId: populationId 77 name 78 colorCode { 79 hex 80 } 81 } 82 metricData(order: { sourceEndDate: DESC }) { 83 metricDataId 84 value 85 valueDisplay 86 rank 87 sourceEndDate 88 displayYear 89 stateCode 90 state { 91 stateCode 92 stateName 93 } 94 metricDataMissings { 95 metricDataMissingReasonTypeId 96 description 97 name 98 } 99 } 100 } 101 } 102 } 103 } 104 } 105 } 106`);e.s(["useStateDataTableData",0,(e,i,o)=>{let[{fetching:n,error:l,data:d},h]=(0,s.useQuery)({query:o?a:r,...o?{variables:{editionId:e,metricTypeId:i,disparityMetricTypeId:o}}:{variables:{editionId:e,metricTypeId:i}}}),c=(0,t.useMemo)(()=>n||l?null:o?(({report:e},t)=>{let s=e.reportMeasures[0].endDate,i=e.reportMeasures[0].measure.disparities.find(e=>e.disparityMeasure.metricTypeID===t.toString());return{...i.disparityMeasure,metricData:i.disparityMeasure.metricData.filter(e=>e.sourceEndDate===s)}})(d,o):(({report:e})=>{let t=e.reportMeasures[0].endDate,s=e.reportMeasures[0].measure;return{...s,metricData:s.metricData.filter(e=>e.sourceEndDate===t)}})(d),[n,l,o,d,e,i]);return[{fetching:n,error:l,data:c},h]}],99098)},40780,e=>{"use strict";var t=e.i(81626),s=e.i(90143),i=e.i(99972),r=e.i(46553),a=e.i(52775),o=e.i(99098);e.s(["useUSAChoroplethData",0,(e,n,l=null)=>{let[{fetching:d,error:h,data:c},p]=(0,o.useStateDataTableData)(e,n,l),[{fetching:u,error:m,data:f},g]=(0,s.useQuery)({query:r.default,variables:{editionId:e,metricTypeId:l??n}});return[(0,t.useMemo)(()=>{var t,s,r,o;let p;return{fetching:d||u,error:h??m,data:d||u||h||m?null:(t=c,s=f,r=e,o=l??n,p=t?.metricData?.find(e=>!!e.displayYear),{params:{chart_type:"usa-choropleth-2022",edition_id:r,measure_id:o,report_id:"",state_id:i.DEFAULT_STATE_ID},data:{source:[`${t.source.displayName}${p?`, ${p.displayYear}`:""}`],DisplayName:t.displayName,Description:t.description,Precision:t.precision,DisplayFormat:t.displayFormat,IsSummation:t.isSummation,IsWeightPositive:"Y"===t.isWeightPositive,UnitTypeDescription:t.unitTypeDescription,metrics:t.metricData.map(e=>({Value:e.value,Rank:e.rank,StateCode:e.stateCode,StateName:(0,a.getStateName)(e.stateCode),Range1:s.quintiles.range1,Range2:s.quintiles.range2,Range3:s.quintiles.range3,Range4:s.quintiles.range4,RangeMin:s.quintiles.rangeMin,RangeMax:s.quintiles.rangeMax,Points:s.quintiles.points?.split(",")??[],DisplayType:s.quintiles.displayType}))}})}},[d,u,h,m,c,f,e,l,n]),()=>{p(),g()}]}])},69022,e=>{"use strict";let t=e=>{let s=[];return e?.map(e=>{let i={...e};s.push(i),i.children&&i.children.length>0&&(s=s.concat(t(i.children)),delete i.children)}),s};e.s(["VIEW_TYPES",0,{DASHBOARD:"DASHBOARD",MEASURE:"MEASURE",POPULATION:"POPULATION",STATE:"STATE",EDITION:"EDITION"},"flattenArray",0,t,"getDefaultMeasure",0,e=>e?e.find(e=>
106"Overall"===e.measure.displayName||"Overall - Annual"===e.measure.displayName||"Overall - Senior"===e.measure.displayName||"Overall - Seniors"===e.measure.displayName||"Overall - HWC"===e.measure.displayName||"Overall-HWC"===e.measure.displayName||"Overall - Women and Children"===e.measure.displayName)||e.find(e=>"Label"!==e.metricCategory.displayName):null,"getSelectedMeasure",0,(e,t)=>e?e.find(e=>e.measure.compareName.toLowerCase()===t.toLowerCase()):null,"getSelectedPopulation",0,(e,t)=>e&&t?e.measure.disparities?.find(e=>e.disparityMeasure.compareName.toLowerCase()===t.toLowerCase()):null,"isOverallMeasure",0,e=>!!e&&("Overall"===e||"Overall - Annual"===e||"Overall - Senior"===e||"Overall - Seniors"===e||"Overall - HWC"===e||"Overall-HWC"===e),"measureListToTree",0,function(e){let t=[],s={};return e?.forEach(i=>{let r=i.parentMetricTypeID?.toString();if(!r||!e.find(e=>e.measure.metricTypeID===r))return t.push(i);let a=s[r];if("number"!=typeof a&&(a=e.findIndex(e=>e.measure.metricTypeID===r),s[r]=a),!e[a].children)return e[a].children=[i];e[a].children.push(i)}),t}])},46553,e=>{"use strict";let t=(0,e.i(28433).graphql)(` 107 query Quintile($metricTypeId: Int!, $editionId: Int!) { 108 quintiles: core_quintilesByMetricAndEdition( 109 metricId: $metricTypeId 110 editionId: $editionId 111 ) { 112 range1 113 range2 114 range3 115 range4 116 rangeMin 117 rangeMax 118 points 119 displayType 120 } 121 } 122`);e.s(["default",0,t])}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.