1(this["webpackJsonppolice-data-website"]=this["webpackJsonppolice-data-website"]||[]).push([[38,44],{139:function(e,t,i){"use strict";i.r(t);var n=i(14),o=i(89),l=i(87),c=i.n(l),r=i(1),a=i(45),s=i.n(a),d=i(4),f=i(98),h=i(96),p=i(112),u=i(21);const P=e=>{var t;let{mapStatistic:i,setMapStatistic:l,isCompleteData:a}=e;const[P,{width:v}]=Object(p.a)(),[S,m]=Object(r.useState)(!1),[b,D]=Object(r.useState)(0),y=Object(d.g)(),W=(null===(t=Object(d.i)().stateCode)||void 0===t?void 0:t.toUpperCase())||"US",g=Object(d.i)().locationName||"statewide",$=n.h.indexOf(i)>=0,[O,w]=Object(f.d)((()=>({opacity:0,background:"".concat(n.w[i].color,"20"),transform:$?"translate3d(".concat(v*n.h.indexOf(i)/n.h.length,"px, 0, 0)"):null,width:"calc(".concat(100/n.h.length,"%)"),config:f.c.gentle})));Object(r.useEffect)((()=>{if(v>0){const e=n.h.indexOf(i)>=0;s.a.unstable_batchedUpdates((()=>{var t;w.start({transform:e?"translate3d(".concat(v*n.h.indexOf(i)/n.h.length,"px, 0, 0)"):null,opacity:e?1:0,background:e?"".concat(null===(t=n.w[i])||void 0===t?void 0:t.color,"20"):null,delay:0===b?1500:0,onStart:m.bind(void 0,!0),onRest:m.bind(void 0,!1)})}))}}),[b,i,w,v]);const j=Object(r.useCallback)((e=>{D((e=>e+1)),l(e),"US"!==W&&(h.b.dismiss(),y.push(Object(o.e)(W,g,e.replace(/_/g,"-"))))}),[l,y,g,W]);return Object(u.jsxs)("div",{className:"MapSwitcher",ref:P,children:[Object(u.jsx)(f.b.div,{className:"highlight",style:O}),n.h.map(((e,t)=>Object(u.jsx)("div",{className:c()("clickable",{["is-".concat(e)]:!S}),onClick:j.bind(void 0,e),style:{width:"calc(".concat(100/n.h.length,"%)")}},t)))]})},v=(e,t)=>e.mapStatistic===t.mapStatistic&&e.isCompleteData===t.isCompleteData;t.default=Object(r.memo)(P,v)},89:function(e,t,i){"use strict";i.d(t,"a",(function(){return l})),i.d(t,"e",(function(){return c})),i.d(t,"b",(function(){return r})),i.d(t,"c",(function(){return a})),i.d(t,"d",(function(){return u}));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},o=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},l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"NB"===e.toUpperCase()?"NE":e.toUpperCase()},c=function(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const i=l(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},a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";
1const i=Object.entries(e),n=s(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,l]=e;const c=(null===l||void 0===l||null===(i=l.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,"-")}(o(c))===t}))},s=(e,t)=>{const i=e.filter(t);return{hasMatches:i.length>0,key:1===i.length?i[0][0]:null}},d=(e,t)=>s(e,t).key,f=e=>{if(null===e||"undefined"===typeof e)return null;const t=String(e).trim();return t&&/^\d+$/.test(t)?t.replace(/^0+(?=\d)/,""):null},h=(e,t)=>{const i=f(e),n=f(t);return null!==i&&null!==n&&i===n},p=(e,t,i)=>s(e,(e=>{var n;let[o,l]=e;const c=(null===l||void 0===l||null===(n=l.m)||void 0===n?void 0:n.name)||o,r=new Set([o,c].map(i));return t.some((e=>r.has(i(e))))})),u=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),l=t.ori,c=t.city_fp,r=t.county_fp,a=t.type;if(l){const e=s(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)||(null===i||void 0===i?void 0:i.roi);return n&&String(n).trim()===String(l).trim()}));if(e.hasMatches)return e.key}if(null!==c&&"undefined"!==typeof c){const e=s(i,(e=>{var t;let[,i]=e;return h(null===i||void 0===i?void 0:i.id,c)||h(null===i||void 0===i||null===(t=i.m)||void 0===t?void 0:t.fips_place_code,c)}));if(e.hasMatches)return e.key}if(null!==r&&"undefined"!==typeof r&&a){const e=s(i,(e=>{var t,i,n;let[,o]=e;return h(null===o||void 0===o||null===(t=o.m)||void 0===t?void 0:t.fips_county_code,r)&&(null===o||void 0===o||null===(i=o.ta)||void 0===i||null===(n=i.t)||void 0===n?void 0:n.toLowerCase())===String(a).toLowerCase()}));if(e.hasMatches)return e.key}const d=[t.department,t.name].filter(Boolean),f=s(i,(e=>{let[t]=e;return d.includes(t)}));if(f.hasMatches)return f.key;const u=p(i,d,n);return u.hasMatches?u.key:p(i,d,o).key}}}]); 2//# sourceMappingURL=38.8029a665.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.