1(this["webpackJsonppolice-data-website"]=this["webpackJsonppolice-data-website"]||[]).push([[30,44],{126:function(e,t,i){"use strict";function n(e,t){let i;if(void 0===t)for(const n of e)null!=n&&(i>n||void 0===i&&n>=n)&&(i=n);else{let n=-1;for(let l of e)null!=(l=t(l,++n,e))&&(i>l||void 0===i&&l>=l)&&(i=l)}return i}i.d(t,"a",(function(){return n}))},157:function(e,t,i){"use strict";i.r(t);var n=i(104),l=i(21);var o=()=>{const e=window.innerWidth,t=e>=769?480:e,i=1200;return Object(l.jsxs)(n.a,{viewBox:"0 0 ".concat(t," ").concat(i),height:i,width:t,speed:2,children:[Object(l.jsx)("circle",{cx:.4*t,cy:600,r:"5"}),Object(l.jsx)("circle",{cx:.5*t,cy:600,r:"5"}),Object(l.jsx)("circle",{cx:.6*t,cy:600,r:"5"})]})},a=i(14),r=i(110),s=i(89),c=i(23),d=i(93),u=i(87),p=i.n(u),h=i(126),m=i(61),f=i(77),v=i(88),b=i.n(v),g=i(1),P=i(257),j=i(4),O=i(96),S=i(178),y=i(253);const D=Object(g.lazy)((()=>Object(c.m)((()=>Promise.all([i.e(2),i.e(4),i.e(20)]).then(i.bind(null,248))))));function C(e){var t;let{stateCode:i,timeseries:n,date:u,regionHighlighted:v,setRegionHighlighted:b,anchor:C,setAnchor:N,expandTable:W=!1,noRegionHighlightedDepartmentData:$}=e;const{t:w}=Object(P.a)(),[x]=Object(S.a)("timeseriesLookbackDays",null),[M]=Object(S.a)("chartType","total"),[k]=Object(S.a)("isLog",!1),[T]=Object(S.a)("isMovingAverage",!1),H=Object(j.i)().statisticName||"uof",B=Object(j.g)(),L=Object(c.f)(null===n||void 0===n||null===(t=n[i])||void 0===t?void 0:t.dates),R=L[0]||u||Object(c.g)(),U=Object(h.a)([L[L.length-1],u||Object(c.g)()]),[_,A]=Object(g.useState)(U);Object(g.useEffect)((()=>{A(U)}),[U]);const J=null!==x?Object(m.a)(Object(f.a)(Object(c.l)(_),x),{representation:"date"}):R,E=Object(g.useRef)(),z=Object(r.a)(E,{once:!0}),{width:I}=Object(y.a)(),Z=Object(g.useMemo)((()=>{var e;if(null!==n&&void 0!==n&&null!==(e=n[v.stateCode])&&void 0!==e&&e.departments){const e=n[v.stateCode].departments[v.departmentName];return{stateCode:v.stateCode,departmentName:v.departmentName,slug:(null===e||void 0===e?void 0:e.slug)||null}}return{stateCode:v.stateCode,departmentName:null,slug:null}}),[n,v.stateCode,v.departmentName]),q=Object(g.useMemo)((()=>{var e,t,i,l;return Z.departmentName?null===n||void 0===n||null===(e=n[Z.stateCode])||void 0===e||null===(t=e.departments)||void 0===t||null===(i=t[Z.departmentName])||void 0===i?void 0:i.dates:null===n||void 0===n||null===(l=n[Z.stateCode])||void 0===l?void 0:l.dates}),[n,Z.stateCode,Z.departmentName]),F=Object(g.useMemo)((()=>{const e=Object.keys(n||{}).filter((e=>e!==i)).sort(((e,t)=>a.u.hasOwnProperty(e)?a.u[e].localeCompare(a.u[t]):0)).map((e=>({stateCode:e,departmentName:null,slug:null}))),t=Object.keys(n||{}).reduce(((e,t)=>{var i;return[...e,...Object.keys((null===n||void 0===n||null===(i=n[t])||void 0===i?void 0:i.departments)||{}).reduce(((e,i)=>{var l,o,a;return[...e,{stateCode:t,departmentName:i,slug:(null===n||void 0===n||null===(l=n[t])||void 0===l||null===(o=l.departments)||void 0===o||null===(a=o[i])||void 0===a?void 0:a.slug)||null}]}),[])]}),[]);return[{stateCode:i,departmentName:null,slug:null},...e,...t]}),[n,i]),G=Object(g.useMemo)((()=>{var e,t,i;return F.find((e=>e.stateCode===v.stateCode&&e.departmentName===v.departmentName))?F:[...F,{stateCode:v.stateCode,departmentName:v.departmentName,slug:(null===n||void 0===n||null===(e=n[v.stateCode])||void 0===e||null===(t=e.departments)||void 0===t||null===(i=t[v.departmentName])||void 0===i?void 0:i.slug)||null}]}),[v.stateCode,v.departmentName,F,n]),K=Object(g.useMemo)((()=>Object(c.f)(q).filter((e=>e<=U))),[q,U]),Q=Object(g.useMemo)((()=>K.filter((e=>J<=e&&e<=_))),[K,J,_]),V=Object(g.useCallback)((e=>{let{target:t}=e;const i=JSON.parse(t.value);b(i);const n=i.departmentName?i.slug:"statewide";n&&(O.b.dismiss(),B.push(Object(s.e)(i.stateCode,n,H)))}),[b,H,B]),X=Object(g.useCallback)((()=>{b({stateCode:i,departmentName:null}),O.b.dismiss(),B.push(Object(s.e)(i,"statewide",H))}),[i,b,H,B]),Y=Object(g.useMemo)((()=>a.A.filter((e=>"d"===M||"tpr"!==e))),[M]);return Object(l.jsxs)("div",{className:p()("TimeseriesExplorer fadeInUp",{stickied:"timeseries"===C},{expanded:W}),style:{display:C&&"timeseries"!==C&&!W?"none":""},ref:E,children:[Object(l.jsxs)("div",{className:"timeseries-header",children:[Object(l.jsx)("div",{className:p()("anchor","fadeInUp",{stickied:"timeseries"===C}),style:{display:W&&I>=769?"none":""},onClick:N&&N.bind(this,"timeseries"===C?null:"timeseries")}),Object(l.jsx)("h1",{children:w("Statistics")})]}
1),G&&Object(l.jsxs)("div",{className:"state-selection",children:[Object(l.jsx)("div",{className:"dropdown",children:Object(l.jsx)("select",{value:JSON.stringify(Z),onChange:V,title:"Select a Department",children:G.sort(((e,t)=>e.departmentName<t.departmentName?-1:e.departmentName>t.departmentName?1:0)).filter((e=>"US"!==e.stateCode&&a.u[e.stateCode]!==e.departmentName)).map((e=>{var t,i,o,r;return Object(l.jsx)("option",{value:JSON.stringify(e),children:e.departmentName?"".concat(w(null===n||void 0===n||null===(t=n[e.stateCode])||void 0===t||null===(i=t.departments)||void 0===i||null===(o=i[e.departmentName])||void 0===o||null===(r=o.m)||void 0===r?void 0:r.name)):w(a.u[e.stateCode])},"".concat(e.stateCode,"-").concat(e.departmentName))}))})}),"US"!==v.stateCode&&Object(l.jsx)("div",{className:"reset-icon",onClick:X,children:Object(l.jsx)(d.p,{})})]}),z&&Object(l.jsx)(g.Suspense,{fallback:Object(l.jsx)(o,{}),children:Object(l.jsx)(D,{timeseries:q,regionHighlighted:Z,dates:Q,statistics:Y,endDate:U,chartType:M,isLog:k,isMovingAverage:T,noRegionHighlightedDepartmentData:$})})]})}const N=(e,t)=>!t.forceRender&&(!(t.timeseries||!e.timeseries)||!(t.timeseries&&!e.timeseries)&&(!!b()(t.regionHighlighted.stateCode,e.regionHighlighted.stateCode)&&(!!b()(t.regionHighlighted.departmentName,e.regionHighlighted.departmentName)&&(!!b()(t.date,e.date)&&(!!b()(t.anchor,e.anchor)&&(!!b()(t.expandTable,e.expandTable)&&!!b()(t.noRegionHighlightedDepartmentData,e.noRegionHighlightedDepartmentData)))))));t.default=Object(g.memo)(C,N)},89:function(e,t,i){"use strict";i.d(t,"a",(function(){return o})),i.d(t,"e",(function(){return a})),i.d(t,"b",(function(){return r})),i.d(t,"c",(function(){return s})),i.d(t,"d",(function(){return m}));const n=function(){const e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.endsWith(" Metropolitan Police Department")?e.replace(/ Metropolitan Police Department$/," Police"):e.endsWith(" Department of Public Safety")?e.replace(/ Department of Public Safety$/," Police"):e.endsWith(" Township Police Department")?e.replace(/ Police Department$/," Police"):e.endsWith(" Sheriff's Department")?e.replace(/ Sheriff's Department$/," Sheriff"):e.endsWith(" Metropolitan Police")?e.replace(/ Metropolitan Police$/," Police"):e.endsWith(" Division of Police")?e.replace(/ Division of Police$/," Police"):e.endsWith(" Police Department")?e.replace(/ Police Department$/," Police"):e.endsWith(" Sheriff's Office")?e.replace(/ Sheriff's Office$/," Sheriff"):e.endsWith(" Dept Pub Safety")?e.replace(/ Dept Pub Safety$/," Police"):e.endsWith(" Police Division")?e.replace(/ Police Division$/," Police"):e.endsWith(" Township Police")?e:e.endsWith(" Police Bureau")?e.replace(/ Police Bureau$/," Police"):e.endsWith(" Public Safety")?e.replace(/ Public Safety$/," Police"):e.endsWith(" Township")?"".concat(e," Police"):e.endsWith(" DPS")?e.replace(/ DPS$/," Police"):e.endsWith(" Sheriff's Ofice")?e.replace(/ Sheriff's Ofice$/," Sheriff"):e},l=function(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").replace(/ County/,"");return e.endsWith(" Metropolitan Police Department")?e.replace(/ Metropolitan Police Department$/," Police"):e.endsWith(" Department of Public Safety")?e.replace(/ Department of Public Safety$/," Police"):e.endsWith(" Township Police Department")?e.replace(/ Township Police Department$/," Police"):e.endsWith(" Sheriff's Department")?e.replace(/ Sheriff's Department$/," Sheriff"):e.endsWith(" Metropolitan Police")?e.replace(/ Metropolitan Police$/," Police"):e.endsWith(" Division of Police")?e.replace(/ Division of Police$/," Police"):e.endsWith(" Police Department")?e.replace(/ Police Department$/," Police"):e.endsWith(" Sheriff's Office")?e.replace(/ Sheriff's Office$/," Sheriff"):e.endsWith(" Dept Pub Safety")?e.replace(/ Dept Pub Safety$/," Police"):e.endsWith(" Police Division")?e.replace(/ Police Division$/," Police"):e.endsWith(" Township Police")?e.replace(/ Township Police$/," Police"):e.endsWith(" Police Bureau")?e.replace(/ Police Bureau$/," Police"):e.endsWith(" Public Safety")?e.replace(/ Public Safety$/," Police"):e.endsWith(" Township")?e.replace(/ Township$/," Police"):e.endsWith(" DPS")?e.replace(/ DPS$/," Police"):e.endsWith(" Sheriff's Ofice")?e.replace(/ Sheriff's Ofice$/," Sheriff"):e},o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"NB"===e.toUpperCase()?"NE":e.toUpperCase()},a=function(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const i=o(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"");if(!i)return null;let n="/report/".concat(i.toLowerCase());return e&&(n+="/".concat(e)),t&&(n+="/".concat(t)),n},r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.endsWith(" Sheriff")&&!e.endsWith(" County Sheriff")?e.replace(/ Sheriff$/," County Sheriff"):e},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const i=Object.entries(e),n=c(i,(e=>{let[,i]=e;return(null===i||void 0===i?void 0:i.slug)===t}));return n.hasMatches?n.key:d(i,(e=>{var i;let[n,o]=e;const a=(null===o||void 0===o||null===(i=o.m)||void 0===i?void 0:i.name)||n;return function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase().replace(/[^A-Za-z ]+/g,"").replace(/ /g,"-")}(l(a))===t}))},c=(e,t)=>{const i=e.filter(t);return{hasMatches:i.length>0,key:1===i.length?i[0][0]:null}},d=(e,t)=>c(e,t).key,u=e=>{if(null===e||"undefined"===typeof e)return null;const t=String(e).trim();return t&&/^\d+$/.test(t)?t.replace(/^0+(?=\d)/,""):null},p=(e,t)=>{const i=u(e),n=u(t);return null!==i&&null!==n&&i===n},h=(e,t,i)=>c(e,(e=>{var n;let[l,o]=e;const a=(null===o||void 0===o||null===(n=o.m)||void 0===n?void 0:n.name)||l,r=new Set([l,a].map(i));return t.some((e=>r.has(i(e))))})),m=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=Object.entries(e),o=t.ori,a=t.city_fp,r=t.county_fp,s=t.type;if(o){const e=c(i,(e=>{var t;let[,i]=e;const n=(null===i||void 0===i||null===(t=i.m)||void 0===t?void 0:t.ori)||
1(null===i||void 0===i?void 0:i.roi);return n&&String(n).trim()===String(o).trim()}));if(e.hasMatches)return e.key}if(null!==a&&"undefined"!==typeof a){const e=c(i,(e=>{var t;let[,i]=e;return p(null===i||void 0===i?void 0:i.id,a)||p(null===i||void 0===i||null===(t=i.m)||void 0===t?void 0:t.fips_place_code,a)}));if(e.hasMatches)return e.key}if(null!==r&&"undefined"!==typeof r&&s){const e=c(i,(e=>{var t,i,n;let[,l]=e;return p(null===l||void 0===l||null===(t=l.m)||void 0===t?void 0:t.fips_county_code,r)&&(null===l||void 0===l||null===(i=l.ta)||void 0===i||null===(n=i.t)||void 0===n?void 0:n.toLowerCase())===String(s).toLowerCase()}));if(e.hasMatches)return e.key}const d=[t.department,t.name].filter(Boolean),u=c(i,(e=>{let[t]=e;return d.includes(t)}));if(u.hasMatches)return u.key;const m=h(i,d,n);return m.hasMatches?m.key:h(i,d,l).key}}}]); 2//# sourceMappingURL=30.48276efd.chunk.js.map
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.