1(this["webpackJsonppolice-data-website"]=this["webpackJsonppolice-data-website"]||[]).push([[26],{104:function(e,t,a){"use strict";var r=a(1),n=function(){return n=Object.assign||function(e){for(var t,a=1,r=arguments.length;a<r;a++)for(var n in t=arguments[a])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},n.apply(this,arguments)};var i=function(e){var t=e.animate,a=void 0===t||t,i=e.animateBegin,o=e.backgroundColor,l=void 0===o?"#f5f6f7":o,s=e.backgroundOpacity,c=void 0===s?1:s,d=e.baseUrl,u=void 0===d?"":d,m=e.children,b=e.foregroundColor,p=void 0===b?"#eee":b,O=e.foregroundOpacity,g=void 0===O?1:O,f=e.gradientRatio,j=void 0===f?2:f,v=e.gradientDirection,h=void 0===v?"left-right":v,y=e.uniqueKey,C=e.interval,N=void 0===C?.25:C,x=e.rtl,w=void 0!==x&&x,E=e.speed,k=void 0===E?1.2:E,S=e.style,D=void 0===S?{}:S,M=e.title,H=void 0===M?"Loading...":M,J=e.beforeMask,R=void 0===J?null:J,T=function(e,t){var a={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(a[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(a[r[n]]=e[r[n]])}return a}(e,["animate","animateBegin","backgroundColor","backgroundOpacity","baseUrl","children","foregroundColor","foregroundOpacity","gradientRatio","gradientDirection","uniqueKey","interval","rtl","speed","style","title","beforeMask"]),P=y||Math.random().toString(36).substring(6),I=P+"-diff",L=P+"-animated-diff",U=P+"-aria",z=w?{transform:"scaleX(-1)"}:null,A="0; "+N+"; 1",B=k+"s",q="top-bottom"===h?"rotate(90)":void 0;return Object(r.createElement)("svg",n({"aria-labelledby":U,role:"img",style:n(n({},D),z)},T),H?Object(r.createElement)("title",{id:U},H):null,R&&Object(r.isValidElement)(R)?R:null,Object(r.createElement)("rect",{role:"presentation",x:"0",y:"0",width:"100%",height:"100%",clipPath:"url("+u+"#"+I+")",style:{fill:"url("+u+"#"+L+")"}}),Object(r.createElement)("defs",null,Object(r.createElement)("clipPath",{id:I},m),Object(r.createElement)("linearGradient",{id:L,gradientTransform:q},Object(r.createElement)("stop",{offset:"0%",stopColor:l,stopOpacity:c},a&&Object(r.createElement)("animate",{attributeName:"offset",values:-j+"; "+-j+"; 1",keyTimes:A,dur:B,repeatCount:"indefinite",begin:i})),Object(r.createElement)("stop",{offset:"50%",stopColor:p,stopOpacity:g},a&&Object(r.createElement)("animate",{attributeName:"offset",values:-j/2+"; "+-j/2+"; "+(1+j/2),keyTimes:A,dur:B,repeatCount:"indefinite",begin:i})),Object(r.createElement)("stop",{offset:"100%",stopColor:l,stopOpacity:c},a&&Object(r.createElement)("animate",{attributeName:"offset",values:"0; 0; "+(1+j),keyTimes:A,dur:B,repeatCount:"indefinite",begin:i})))))},o=function(e){return e.children?Object(r.createElement)(i,n({},e)):Object(r.createElement)(l,n({},e))},l=function(e){return Object(r.createElement)(o,n({viewBox:"0 0 476 124"},e),Object(r.createElement)("rect",{x:"48",y:"8",width:"88",height:"6",rx:"3"}),Object(r.createElement)("rect",{x:"48",y:"26",width:"52",height:"6",rx:"3"}),Object(r.createElement)("rect",{x:"0",y:"56",width:"410",height:"6",rx:"3"}),Object(r.createElement)("rect",{x:"0",y:"72",width:"380",height:"6",rx:"3"}),Object(r.createElement)("rect",{x:"0",y:"88",width:"178",height:"6",rx:"3"}),Object(r.createElement)("circle",{cx:"20",cy:"20",r:"20"}))};t.a=o},126:function(e,t,a){"use strict";function r(e,t){let a;if(void 0===t)for(const r of e)null!=r&&(a>r||void 0===a&&r>=r)&&(a=r);else{let r=-1;for(let n of e)null!=(n=t(n,++r,e))&&(a>n||void 0===a&&n>=n)&&(a=n)}return a}a.d(t,"a",(function(){return r}))},157:function(e,t,a){"use strict";a.r(t);var r=a(104),n=a(21);var i=()=>{const e=window.innerWidth,t=e>=769?480:e,a=1200;return Object(n.jsxs)(r.a,{viewBox:"0 0 ".concat(t," ").concat(a),height:a,width:t,speed:2,children:[Object(n.jsx)("circle",{cx:.4*t,cy:600,r:"5"}),Object(n.jsx)("circle",{cx:.5*t,cy:600,r:"5"}),Object(n.jsx)("circle",{cx:.6*t,cy:600,r:"5"})]})},o=a(14),l=a(110),s=a(89),c=a(23),d=a(93),u=a(87),m=a.n(u),b=a(126),p=a(61),O=a(77),g=a(88),f=a.n(g),j=a(1),v=a(257),h=a(4),y=a(96),C=a(178),N=a(253);const x=Object(j.lazy)((()=>Object(c.m)((()=>Promise.all([a.e(2),a.e(4),a.e(20)]).then(a.bind(null,248))))));function w(e){var t;let{stateCode:a,timeseries:r,date:u,regionHighlighted:g,setRegionHighlighted:f,anchor:w,setAnchor:E,expandTable:k=!1,noRegionHighlightedDepartmentData:S}=e;const{t:D}=Object(v.a)(),[M]=Object(C.a)("timeseriesLookbackDays",null),[H]=Object(C.a)("chartType","total"),[J]=Object(C.a)("isLog",!1),[R]=Object(C.a)("isMovingAverage",!1),T=Object(h.i)().statisticName||"uof",P=Object(h.g)(),I=Object(c.f)(null===r||void 0===r||null===(t=r[a])||void 0===t?void 0:t.dates),L=I[0]||u||Object(c.g)(),U=Object(b.a)([I[I.length-1],u||Object(c.g)()]),[z,A]=Object(j.useState)(U);Object(j.useEffect)((()=>{A(U)}),[U]);const B=null!==M?Object(p.a)(Object(O.a)(Object(c.l)(z),M),{representation:"date"}):L,q=Object(j.useRef)(),K=Object(l.a)(q,{once:!0}),{width:G}=Object(N.a)(),V=Object(j.useMemo)((()=>{var e;if(null!==r&&void 0!==r&&null!==(e=r[g.stateCode])&&void 0!==e&&e.departments){const e=r[g.stateCode].departments[g.departmentName];return{stateCode:g.stateCode,departmentName:g.departmentName,slug:(null===e||void 0===e?void 0:e.slug)||null}}return{stateCode:g.stateCode,departmentName:null,slug:null}}),[r,g.stateCode,g.departmentName]),W=Object(j.useMemo)((()=>{var e,t,a,n;return V.departmentName?null===r||void 0===r||null===(e=r[V.stateCode])||void 0===e||null===(t=e.departments)||void 0===t||null===(a=t[V.departmentName])||void 0===a?void 0:a.dates:null===r||void 0===r||null===(n=r[V.stateCode])||void 0===n?void 0:n.dates}),[r,V.stateCode,V.departmentName]),X=Object(j.useMemo)((()=>{const e=Object.keys(r||{}).filter((e=>e!==a)).sort(((e,t)=>o.u.hasOwnProperty(e)?o.u[e].localeCompare(o.u[t]):0)).map((e=>({stateCode:e,departmentName:null,slug:null}))),t=Object.keys(r||{}).reduce(((e,t)=>{var a;return[...e,...Object.keys((null===r||void 0===r||null===(a=r[t])||void 0===a?void 0:a.departments)||{}).reduce(((e,a)=>{var n,i,o;return[...e,{stateCode:t,departmentName:a,slug:(null===r||void 0===r||null===(n=r[t])||void 0===n||null===(i=n.departments)||void 0===i||null===(o=i[a])||void 0===o?void 0:o.slug)||null}]}),[])]}),[]);return[{stateCode:a,departmentName:null,slug:null},...e,...t]}),[r,a]),F=Object(j.useMemo)((()=>{var e,t,a;return X.find((e=>e.stateCode===g.stateCode&&e.departmentName===g.departmentName))?X:[...X,{stateCode:g.stateCode,departmentName:g.departmentName,slug:(null===r||void 0===r||null===(e=r[g.stateCode])||void 0===e||null===(t=e.departments)||void 0===t||null===(a=t[g.departmentName])||void 0===a?void 0:a.slug)||null}]}),[g.stateCode,g.departmentName,X,r]),Q=Object(j.useMemo)((()=>Object(c.f)(W).filter((e=>e<=U))),[W,U]),Y=Object(j.useMemo)((()=>Q.filter((e=>B<=e&&e<=z))),[Q,B,z]),Z=Object(j.useCallback)((e=>{let{target:t}=e;const a=JSON.parse(t.value);f(a);const r=a.departmentName?a.slug:"statewide";r&&(y.b.dismiss(),P.push(Object(s.e)(a.stateCode,r,T)))}),[f,T,P]),$=Object(j.useCallback)((()=>{f({stateCode:a,departmentName:null}),y.b.dismiss(),P.push(Object(s.e)(a,"statewide",T))}),[a,f,T,P]),_=Object(j.useMemo)((()=>o.A.filter((e=>"d"===H||"tpr"!==e))),[H]);return Object(n.jsxs)("div",{className:m()("TimeseriesExplorer fadeInUp",{stickied:"timeseries"===w},{expanded:k}),style:{display:w&&"timeseries"!==w&&!k?"none":""},ref:q,children:[Object(n.jsxs)("div",{className:"timeseries-header",children:[Object(n.jsx)("div",{className:m()("anchor","fadeInUp",{stickied:"timeseries"===w}),style:{display:k&&G>=769?"none":""},onClick:E&&E.bind(this,"timeseries"===w?null:"timeseries")}),Object(n.jsx)("h1",{children:D("Statistics")})]}),F&&Object(n.jsxs)("div",{className:"state-selection",children:[Object(n.jsx)("div",{className:"dropdown",children:Object(n.jsx)("select",{value:JSON.stringify(V),onChange:Z,title:"Select a Department",children:F.sort(((e,t)=>e.departmentName<t.departmentName?-1:e.departmentName>t.departmentName?1:0)).filter((e=>"US"!==e.stateCode&&o.u[e.stateCode]!==e.departmentName)).map((e=>{var t,a,i,l;return Object(n.jsx)("option",{value:JSON.stringify(e),children:e.departmentName?"".concat(D(null===r||void 0===r||null===(t=r[e.stateCode])||void 0===t||null===(a=t.departments)||void 0===a||null===(i=a[e.departmentName])||void 0===i||null===(l=i.m)||void 0===l?void 0:l.name)):D(o.u[e.stateCode])},"".concat(e.stateCode,"-").concat(e.departmentName))}))})}),"US"!==g.stateCode&&Object(n.jsx)("div",{className:"reset-icon",onClick:$,children:Object(n.jsx)(d.p,{})})]}),K&&Object(n.jsx)(j.Suspense,{fallback:Object(n.jsx)(i,{}),children:Object(n.jsx)(x,{timeseries:W,regionHighlighted:V,dates:Y,statistics:_,endDate:U,chartType:H,isLog:J,isMovingAverage:R,noRegionHighlightedDepartmentData:S}
1)})]})}const E=(e,t)=>!t.forceRender&&(!(t.timeseries||!e.timeseries)||!(t.timeseries&&!e.timeseries)&&(!!f()(t.regionHighlighted.stateCode,e.regionHighlighted.stateCode)&&(!!f()(t.regionHighlighted.departmentName,e.regionHighlighted.departmentName)&&(!!f()(t.date,e.date)&&(!!f()(t.anchor,e.anchor)&&(!!f()(t.expandTable,e.expandTable)&&!!f()(t.noRegionHighlightedDepartmentData,e.noRegionHighlightedDepartmentData)))))));t.default=Object(j.memo)(w,E)},178:function(e,t,a){"use strict";var r=a(1),n=a(84);t.a=function(e,t,a){if(!n.a)return[t,n.b,n.b];if(!e)throw new Error("useLocalStorage key may not be falsy");var i=a?a.raw?function(e){return e}:a.deserializer:JSON.parse,o=Object(r.useRef)((function(e){try{var r=a?a.raw?String:a.serializer:JSON.stringify,n=localStorage.getItem(e);return null!==n?i(n):(t&&localStorage.setItem(e,r(t)),t)}catch(l){return t}})),l=Object(r.useState)((function(){return o.current(e)})),s=l[0],c=l[1];Object(r.useLayoutEffect)((function(){return c(o.current(e))}),[e]);var d=Object(r.useCallback)((function(t){try{var r="function"===typeof t?t(s):t;if("undefined"===typeof r)return;var n=void 0;n=a?a.raw?"string"===typeof r?r:JSON.stringify(r):a.serializer?a.serializer(r):JSON.stringify(r):JSON.stringify(r),localStorage.setItem(e,n),c(i(n))}catch(l){}}),[e,c]),u=Object(r.useCallback)((function(){try{localStorage.removeItem(e),c(void 0)}catch(l){}}),[e,c]);return[s,d,u]}}}]); 2//# sourceMappingURL=26.fc057378.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.