(function(n){function t(r){if(i[r])return i[r].exports;var u=i[r]={i:r,l:!1,exports:{}};return n[r].call(u.exports,u,u.exports,t),u.l=!0,u.exports}var i={};return t.m=n,t.c=i,t.d=function(n,i,r){t.o(n,i)||Object.defineProperty(n,i,{enumerable:!0,get:r})},t.r=function(n){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"});Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,i){var r,u;if((i&1&&(n=t(n)),i&8)||i&4&&typeof n=="object"&&n&&n.__esModule)return n;if(r=Object.create(null),t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),i&2&&typeof n!="string")for(u in n)t.d(r,u,function(t){return n[t]}.bind(null,u));return r},t.n=function(n){var i=n&&n.__esModule?function(){return n["default"]}:function(){return n};return t.d(i,"a",i),i},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=493)})({493:function(n,t,i){n.exports=i(494)},494:function(n,t,i){"use strict";var u=this&&this.__importDefault||function(n){return n&&n.__esModule?n:{"default":n}},r,f;Object.defineProperty(t,"__esModule",{value:!0});r=u(i(495));f=new r.default("globalHelpers")},495:function(n,t,i){"use strict";var r=this&&this.__importStar||function(n){var t,i;if(n&&n.__esModule)return n;if(t={},n!=null)for(i in n)Object.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t},u=this&&this.__importDefault||function(n){return n&&n.__esModule?n:{"default":n}};Object.defineProperty(t,"__esModule",{value:!0});var f=r(i(496)),e=r(i(500)),o=r(i(501)),s=r(i(504)),h=r(i(509)),c=r(i(510)),l=u(i(512)),a=function(){function n(n){window[n]?console.error("requested global key in window already exists"):window[n]={charts:f,googleTagManager:e,formsApp:o,crimeMap:s,focus:h,cookie:l.default,languageSelector:c}}return n}();t.default=a},496:function(n,t,i){"use strict";var f=this&&this.__importDefault||function(n){return n&&n.__esModule?n:{"default":n}},u,r;Object.defineProperty(t,"__esModule",{value:!0});u=i(497);r=f(i(499));t.renderTooltip=function(n){var o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it,rt,ut,ft,et="",ot="",at="",vt="",st="",ht="",ct="",f,t,i,e,wt;if((s=(o=this===null||this===void 0?void 0:this._chart)===null||o===void 0?void 0:o.config)===null||s===void 0?void 0:s.custom){if(this._chart.config.custom.tooltipId&&this._chart.config.custom.chartWrapperId)et=this._chart.config.custom.tooltipId,ot=this._chart.config.custom.chartWrapperId;else{console.warn("Chart must have a unique chart ID and tooltip ID none was supplied in the config");return}((l=(c=(h=this===null||this===void 0?void 0:this._chart)===null||h===void 0?void 0:h.config)===null||c===void 0?void 0:c.custom)===null||l===void 0?void 0:l.tooltipSuffix)&&(at=this._chart.config.custom.tooltipSuffix);((y=(v=(a=this===null||this===void 0?void 0:this._chart)===null||a===void 0?void 0:a.config)===null||v===void 0?void 0:v.custom)===null||y===void 0?void 0:y.tooltip)&&(((k=(b=(w=(p=this===null||this===void 0?void 0:this._chart)===null||p===void 0?void 0:p.config)===null||w===void 0?void 0:w.custom)===null||b===void 0?void 0:b.tooltip)===null||k===void 0?void 0:k.alignment)&&(vt=this._chart.config.custom.tooltip.alignment),((tt=(nt=(g=(d=this===null||this===void 0?void 0:this._chart)===null||d===void 0?void 0:d.config)===null||g===void 0?void 0:g.custom)===null||nt===void 0?void 0:nt.tooltip)===null||tt===void 0?void 0:tt.maxWidth)&&(ht=this._chart.config.custom.tooltip.maxWidth.toString()),((ft=(ut=(rt=(it=this===null||this===void 0?void 0:this._chart)===null||it===void 0?void 0:it.config)===null||rt===void 0?void 0:rt.custom)===null||ut===void 0?void 0:ut.tooltip)===null||ft===void 0?void 0:ft.maxWidthMobile)&&(ct=this._chart.config.custom.tooltip.maxWidthMobile.toString()))}if(f=document.getElementById(ot),t=document.getElementById(et),!t){if(t=document.createElement("div"),t.classList.add("c-chart-tooltip_wrapper"),t.id=et,t.style.maxWidth=r.default.isMobile()?ct+"px":ht+"px",f===null){console.warn("The attached chart ID ("+ot+") is incorrect or the element does not exist, check both ID references match and the chart element exists on the page.");return}f.appendChild(t)}if(window.addEventListener("resize",u.debounce(50,function(){t.style.display="none";t.style.maxWidth=r.default.isMobile()?ct+"px":ht+"px"})),n.opacity===0){t.style.opacity="0";return}if(i="",vt=="inline")n.caretX>f.clientWidth/2?i="right":n.caretX<0+f.clientWidth/2&&(i="left"),st="inline";else{switch(n.yAlign){case"top":i="top";break;case"bottom":i="bottom"}switch(n.xAlign){case"left":i="left";break;case"right":i="right"}n.caretX>f.clientWidth-f.clientWidth/5?i="right":n.caretX<0+f.clientWidth/5&&(i="left")}if(t.classList.remove("c-chart-tooltip_wrapper--left"),t.classList.remove("c-chart-tooltip_wrapper--right"),t.classList.remove("c-chart-tooltip_wrapper--top"),t.classList.remove("c-chart-tooltip_wrapper--bottom"),t.classList.add("c-chart-tooltip_wrapper--"+i),n.body){var yt=[],pt=[],lt=[];for(e=0;e<n.dataPoints.length;e++)yt.push(this._data.datasets[n.dataPoints[e].datasetIndex].data[n.dataPoints[e].index]),pt.push(this._data.labels[n.dataPoints[e].index]),this._data.datasets[n.dataPoints[e].datasetIndex].label&&lt.push(this._data.datasets[n.dataPoints[e].datasetIndex].label);wt='\n            <div class="c-chart-tooltip">\n                <span class="c-chart-tooltip_caret c-chart-tooltip_caret--'+i+'"><\/span>\n                '+pt.map(function(n,t){return'\n                            <p class="c-chart-tooltip_title c-chart-tooltip_title--'+st+'">'+(lt[t]?lt[t]:"")+'<\/p>\n                            <p class="c-chart-tooltip_body c-chart-tooltip_body--'+st+'">'+n+": "+(yt[t]+at)+"<\/p>\n                        "}).join("")+"\n            <\/div>\n        ";t.innerHTML=wt}t.style.opacity="1";t.style.display="block";t.style.left=n.caretX+"px";t.style.top=n.caretY+"px"};t.datapointLegend=function(n){var i=[],t;for(i.push('<ul class="c-custom-legend_list '+n.id+'-legend">'),t=0;t<n.data.datasets[0].data.length;t++)i.push('<li class="c-custom-legend_item">\n                <span class="c-custom-legend_legend">\n                    <span class="c-custom-legend_color" style="background-color:'+n.data.datasets[0].backgroundColor[t]+'"><\/span>\n                <\/span>\n                <span class="c-custom-legend_text">\n                    '+(n.data.labels[t]?n.data.labels[t]:"")+'\n                    <span class="u-visually-hidden">: '+n.data.datasets[0].data[t]+"<\/span>\n                <\/span>\n            <\/li>");return i.push("<\/ul>"),i.join("")};t.datasetLegend=function(n){var r=[],t,i;for(r.push('<ul class="c-custom-legend_list '+n.id+'-legend">'),t=0;t<n.data.datasets.length;t++){var f=n.data.labels&&n.data.labels.length?n.data.labels:[],e=n.data.datasets[t].data&&n.data.datasets[t].data.length?n.data.datasets[t].data:[],o=n.data.datasets[t].label?n.data.datasets[t].label:"",u=[];if(o){if(f.length===e.length){for(u.push('<ul class="u-visually-hidden">'),i=0;i<f.length;i++)u.push("<li>"+f[i]+": "+e[i]+"<\/li>");u.push("<\/ul>")}r.push('\n                <li class="c-custom-legend_item">\n                    <span class="c-custom-legend_legend">\n                        <span class="c-custom-legend_color" style="background-color:'+n.data.datasets[t].backgroundColor+'"><\/span>\n                    <\/span>\n                    <span class="c-custom-legend_text">'+o+"<\/span>\n                    "+u.join("")+"\n                <\/li>\n            ")}}return r.push("<\/ul>"),r.join("")};t.formatDateLabel=function(n){var t=n.replace("- ","");return t.split(" ")};t.barChartTopValues=function(n){if(n.chart){var t=n.chart.ctx;t.font='bold 14px "LatoWebBold", "Arial", sans-serif';t.fillStyle="#1f2025";t.textAlign="center";t.textBaseline="bottom";n.data.datasets.forEach(function(n){for(var r=null,u=null,f=null,i=0;i<n.data.length;i++)n._meta[Object.keys(n._meta)[0]].data[i]&&(r=n._meta[Object.keys(n._meta)[0]].data[i]._model,u=n._meta[Object.keys(n._meta)[0]].data[i]._yScale.maxHeight,f=r.y-5,(u-r.y)/u>=.9&&(f=r.y+20),t.fillText(n.data[i],r.x,f))})}};t.noDataValues=function(n){var r,u,f,t,o;if(n.chart){var i=14,e="No Data",s="#fff";((f=(u=(r=n===null||n===void 0?void 0:n.chart)===null||r===void 0?void 0:r.config)===null||u===void 0?void 0:u.custom)===null||f===void 0?void 0:f.noData)&&(n.chart.config.custom.noData.fontSize&&(i=n.chart.config.custom.noData.fontSize),n.chart.config.custom.noData.text&&(e=n.chart.config.custom.noData.text));t=n.chart.ctx;o=t.measureText(e);t.font="bold "+i+'px "LatoWebBold", "Arial", sans-serif';t.fillStyle="#1f2025";t.textAlign="center";t.textBaseline="bottom";n.data.datasets.forEach(function(r){for(var h,c,u=null,f=0;f<r.data.length;f++)r._meta[Object.keys(r._meta)[0]].data[f]&&(u=r._meta[Object.keys(r._meta)[0]].data[f]._model,h=i+20,c=o.width+30,u.skip===!0&&(t.save(),t.translate(u.x,n.chart.height/2),t.rotate(Math.PI/-2),t.fillStyle=s,t.fillRect(-c/2,-h/2,c,h),t.restore(),t.save(),t.translate(u.x,n.chart.height/2),t.rotate(Math.PI/-2),t.fillText(e,0,i/2),t.restore()))})}};t.splitLabel=function(n){for(var t=n.split(" "),i=[];t.length;)i.push(t.splice(0,2).join(" "));return i};t.roundIntegerLabel=function(n){if(Math.floor(n)===n)return n}},497:function(n,t,i){"use strict";var u=this,r;Object.defineProperty(t,"__esModule",{value:!0});r=i(498);t.debounce=function(n,t){var i;return function(){for(var e,f=[],r=0;r<arguments.length;r++)f[r]=arguments[r];e=u;clearTimeout(i);i=setTimeout(function(){return t.apply(e,f)},n)}};t.cachedScript=function(n,t){var i=Object.assign(t||{},{dataType:"script",cache:!0,url:n});return $.ajax(i)};t.wrapElement=function(n,t){$(t).parent().hasClass(n)||$(t).wrap('<div class="'+n+'"><\/div>')};t.storeInSession=function(n,t){var i=t&&JSON.stringify(t);window&&window.sessionStorage&&window.sessionStorage.setItem(n,i)};t.storageAvailable=function(n){var t,r;try{return t=window[n],r="__storage_test__",t.setItem(r,r),t.removeItem(r),!0}catch(i){return i instanceof DOMException&&(i.code===22||i.code===1014||i.name==="QuotaExceededError"||i.name==="NS_ERROR_DOM_QUOTA_REACHED")&&t&&t.length!==0}};t.stripExifData=function(n){var i=new DataView(n),s=new Blob([n],{type:"image/jpg"}),t=0,f=0,e=[],o=0,r,u;if(i.getUint16(t)==65496){for(t+=2,r=i.getUint16(t),t+=2;t<i.byteLength;){if(r==65505)e[o]={recess:f,offset:t-2},f=t+i.getUint16(t),o++;else if(r==65498)break;t+=i.getUint16(t);r=i.getUint16(t);t+=2}if(e.length>0)return u=[],e.forEach(function(t){u.push(n.slice(t.recess,t.offset))}),u.push(n.slice(f)),new Blob(u,{type:"image/jpg"})}return s};t.scrollToEl=function(n,t,i){t===void 0&&(t=0);i===void 0&&(i=300);n&&n.offset()&&$("html, body").animate({scrollTop:n.offset().top-t},i)};t.getRenderableValue=function(n){var r=null,i,t;if(!n||!n.length)return r;for(i=0;i<n.length;i++)if(t=n[i],typeof t!="undefined"&&t!==null&&t!==""&&(t.trim?t.trim()!=="":!0)&&(Array.isArray(t)?t.length>0:!0)){r=t;break}return r};t.isDefined=function(n){return typeof n!="undefined"&&n!==null};t.hideElement=function(n){return n.addClass(r.HIDDEN_CLASS).attr("aria-hidden","true"),n};t.showElement=function(n){return n.removeClass(r.HIDDEN_CLASS).attr("aria-hidden","false"),n}},498:function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.HIDDENCLASS="dom-hidden";t.ACTIVECLASS="active";t.MATCHINGVALUE="matchingValue";t.UNMATCHINGVALUE="unMatchingValue";t.HIDDEN_CLASS="u-dom-hidden";t.TABLET_LOWER_BOUND=768;t.DESKTOP_UPPER_BOUND=960;t.COLOURS={CERULEAN:"#0971ce",WARNINGRED:"#de3423",SUCCESSGREEN:"#0f8568"};t.FORM_SUBMISSION_STARTED="formSubmissionStarted";t.FORM_STEP_LOADED="formStepLoaded";t.FORM_SUBMISSION_CLIENT_ERROR="formSubmissionClientError";t.FORM_SUBMISSION_COMPLETE="formSubmissionComplete";t.QUERY_CHANGED="queryChanged";t.ELEMENT_TOGGLED="elementToggled";t.NO_CHART_CONFIG="No chart config Id supplied";t.NO_CHART_LEGEND_ELEMENT="Chosen legend ID (#) is present in the config but the HTML element could not be found, are you sure it exists and that the ID is correct?";t.NO_HORIZONTAL_CHART_BAR_PADDING="Horizontal bar chart needs a bar padding and thickness value to calculate its height";t.NO_CRIME_STATS_FILTER_SELECT="No filter update button present in html";t.DYNAMIC_PANELS_NO_CRIME_FILTERS="The active incident type, year or month was not given in the query";t.CHART_TYPE_HORIZONTAL_BAR="horizontalBar";t.CHART_TYPE_LINE="line";t.CHART_TYPE_PIE="pie";t.SESSION_STORAGE="sessionStorage";t.YOUR_AREA_ORIGINAL_LOCATION="YOUR_AREA_ORIGINAL_LOCATION";t.CRIME_MAP_SESSION_STORAGE="crimeMapSessionStorage";t.CONSENT_COOKIE_NAME="cookie-consent";t.ANNOUNCEMENT_BANNER_COOKIE_NAME="announcement-close";t.BETA_POPUP_COOKIE_NAME="mps-beta-close";t.LANGUAGE_SELECTOR_COOKIE_NAME="hasBeenShownLanguageSelector";t.MULTI_FIELD="multiField";t.UNKNOWN_ERROR="An Unknown error has occured";t.MULTI_FIELD_ANY="any";t.MULTI_FIELD_ALL="all";t.MULTI_FIELD_ALL_OR_NONE="allOrNone";t.MULTI_FIELD_SOME_OR_NONE="someOrNone";t.ONLINE_FORM_START="onlineFormStart";t.ONLINE_FORM_STEP="onlineFormStep";t.ONLINE_FORM_SUBMISSION_ERROR="onlineFormError";t.ONLINE_FORM_SUBMISSION="onlineFormSubmission"},499:function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(498),u=function(){function n(){}return n.isMobile=function(){return this.getWindowWidth()<r.TABLET_LOWER_BOUND},n.isTablet=function(){var n=this.getWindowWidth();return n>=r.TABLET_LOWER_BOUND&&n<r.DESKTOP_UPPER_BOUND},n.isDesktop=function(){return this.getWindowWidth()>=r.DESKTOP_UPPER_BOUND},n.getWindowWidth=function(){return $(window).width()},n.getCurrent=function(){return this.isMobile()?"mobile":this.isTablet()?"tablet":"desktop"},n.isCurrentAllowed=function(n){var i,r,t,u;if(n){for(i=n.split(","),r=!1,t=0;t<i.length;t++)u=i[t],u===this.getCurrent()&&(r=!0);return r}return!1},n}();t.default=u},500:function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(498);t.pushGtmEventToDataLayer=function(n,t){if(window&&window.dataLayer)if(t){var i=!0;window.dataLayer.forEach(function(r){typeof r=="object"&&r[t]&&r.event&&r[t]===n[t]&&r.event===n.event&&(i=!1)});i&&window.dataLayer.push(n)}else window.dataLayer.push(n)};t.findFields=function(n,i){var r=[];return t.matchFieldsToIds(n,i,r),r};t.matchFieldsToIds=function(n,i,r){for(var e,f=[],u=0;u<n.length;u++){if(r.length===i.length)return;for(e=0;e<i.length;e++)if(n[u].uniqueId===i[e]){r.push(n[u]);break}"fields"in n[u]&&(f=f.concat(n[u].fields))}f.length&&t.matchFieldsToIds(f,i,r)};t.formStepLoaded=function(n,i){if(n&&n.length){var u=n.findIndex(function(n){return n.isActive}),f=n[u].navigationTitle;u===0&&t.pushGtmEventToDataLayer({event:r.ONLINE_FORM_START,formName:i},"form");t.pushGtmEventToDataLayer({event:r.ONLINE_FORM_STEP,formName:i,formStep:u+1,formStepName:f},"form")}};t.formSubmissionComplete=function(n,i){if(n&&n.length){var u=n.findIndex(function(n){return n.isActive}),f=n[u].navigationTitle;t.pushGtmEventToDataLayer({event:r.ONLINE_FORM_SUBMISSION,formName:i,formStep:u+1,formStepName:f},"form")}};t.formClientSubmissionError=function(n,i,u,f){var e=u.submission.steps.findIndex(function(n){return n.isActive}),h=u.submission.steps[e].navigationTitle,c=u.submission.steps[e].fields,l=Object.keys(i),a=t.findFields(c,l),o=[],s;a.forEach(function(n){o.push(n.label)});s=o.join(" | ");t.pushGtmEventToDataLayer({event:r.ONLINE_FORM_SUBMISSION_ERROR,formName:f,formStep:e+1,formStepName:h,formErrorFields:n?n:s},"formErrorFields")}},501:function(n,t,i){"use strict";var f=this&&this.__importStar||function(n){var t,i;if(n&&n.__esModule)return n;if(t={},n!=null)for(i in n)Object.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t},e=this&&this.__importDefault||function(n){return n&&n.__esModule?n:{"default":n}},r;Object.defineProperty(t,"__esModule",{value:!0});var u=i(498),o=f(i(500)),h=e(i(502)),c=e(i(503)),s=f(i(500)),l=i(497);t.CONFIRM_ON_DESELCTION="confirmOnDeselection";t.MULTI_FIELD="multiField";t.PRE_SUBMIT_REQUEST="preSubmitRequest";t.PRE_CHANGE_FIELD_REQUEST="preChangeFieldRequest";t.formsInitCallback=function(n,i){var r,f,s=$(n).siblings("#js-form-name").get(0),e=s.innerText,l=document.getElementById("js-live-chat-global-vars"),a=new h.default(l);i.on(u.FORM_STEP_LOADED,function(n){n&&n.length&&(o.formStepLoaded(n,e),a.incrementCurrentStep())});i.on(u.FORM_SUBMISSION_CLIENT_ERROR,function(n,t,i){t&&i&&o.formClientSubmissionError(n,t,i,e)});i.on(u.ELEMENT_TOGGLED,function(){window.popups.checkHeight()});i.setHooks((r={},r[t.PRE_SUBMIT_REQUEST]=t.preSubmitRequestHook,r[t.PRE_CHANGE_FIELD_REQUEST]=t.preChangeRequestHook,r));i.setValidators((f={},f[t.MULTI_FIELD]=c.default,f))};t.pushFormStartAndSubmissionToDatalayer=function(){var t,i,n;window&&window.dataLayer&&(t=$(".js-gtm-form-values"),i=$(".js-gtm-form-complete-values"),i.length?(n=i.data("form-name"),s.pushGtmEventToDataLayer({event:"onlineFormSubmission",formName:n},"formName")):t.length&&(n=t.first().data("form-name"),s.pushGtmEventToDataLayer({event:"onlineFormStart",formName:n},"formName")))};t.shouldConfirmOnDeselect=function(n,i,r){var u=r.matchValue,e=r.message,f;return(i=t.getRenderableValue(i),n=t.getRenderableValue(n),f=Boolean(i===u&&n!==u),f)?confirm(e)?!1:!0:!1};t.customChangeHandlers=(r={},r[t.CONFIRM_ON_DESELCTION]=t.shouldConfirmOnDeselect,r);t.preChangeRequestHook=function(n,i,r,u){var f=!1;return u.forEach(function(n){var u=n.type;f=t.customChangeHandlers[u](i,r,n)}),new Promise(function(t){return t({payload:{targetFieldUniqueId:n,currentValue:r,newValue:i,changeHandlers:u},shouldBreak:f,isError:!1})})};t.preSubmitRequestHook=function(n){return new Promise(function(t){var i=n.activeStepContentId,r=n.targetStepContentId;window.liveChatPlugin&&window.Comm100API&&i>=0&&r===null&&window.liveChatPlugin.chatInProgress?confirm(window.liveChatPlugin.options.confirmMessage)?(window.Comm100API.end_chat(),window.liveChatPlugin.chatInProgress=!1,t({isError:!1,payload:{formSubmissionBody:n},shouldBreak:!1})):t({isError:!1,payload:{formSubmissionBody:n},shouldBreak:!0}):t({isError:!1,payload:{formSubmissionBody:n},shouldBreak:!1})})};t.getRenderableValue=function(n){var r=null,i,t;if(!n||!n.length)return r;for(i=0;i<n.length;i++)if(t=n[i],l.isDefined(t)&&(t.trim?t.trim()!=="":!0)&&(Array.isArray(t)?t.length>0:!0)){r=t;break}return r}},502:function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(n){var t=this;this.setGlobalVariables=function(){window&&t.submissionIdVariableName&&t.currentStepVariableName&&t.refNoVariableName&&(window[t.submissionIdVariableName]=t.submissionId,window[t.currentStepVariableName]=t.currentStep,window[t.refNoVariableName]=t.refNo,window.attempts=0)};this.incrementCurrentStep=function(){window&&t.currentStepVariableName&&(window[t.currentStepVariableName]=t.currentStep+1)};this.element=n;this.element&&(this.submissionId=this.element.getAttribute("data-submission-id"),this.currentStep=parseInt(this.element.getAttribute("data-current-step")||""),this.refNo=this.element.getAttribute("data-ref-no"),this.submissionIdVariableName=this.element.getAttribute("data-submission-id-variable-name"),this.currentStepVariableName=this.element.getAttribute("data-current-step-variable-name"),this.refNoVariableName=this.element.getAttribute("data-ref-no-variable-name"),this.setGlobalVariables())}return n}();t.default=i},503:function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(498),u=i(497);t.default=function(n){return function(t,i){try{var c=n.message,s=n.items,h=n.fieldIndex;if(s&&s.length){var e=[],f=!0,o=0;return s.forEach(function(n){var b=n.conditionType,t=n.fieldUniqueIds,c,v,l,y,a,p,s,w;switch(b){case r.MULTI_FIELD_ANY:for(f=!1,c=0;c<t.length;c++)if(s=t[c],v=i[s],u.getRenderableValue([v])){f=!0;break}e.push(f);break;case r.MULTI_FIELD_ALL:for(f=!0,l=0;l<t.length;l++)if(s=t[l],y=i[s],!u.getRenderableValue([y])){f=!1;break}e.push(f);break;case r.MULTI_FIELD_ALL_OR_NONE:for(o=0,f=!0,a=0;a<t.length;a++)s=t[a],p=i[s],u.getRenderableValue([p])&&o++;o===0||o===t.length?f=!0:h>=0&&(s=t[h],w=i[s],u.getRenderableValue([w])||(f=!1));e.push(f)}}),e.includes(!0)?undefined:c}return undefined}catch(l){return console.error(l),r.UNKNOWN_ERROR}}}},504:function(n,t,i){"use strict";var u=this&&this.__awaiter||function(n,t,i,r){function u(n){return n instanceof i?n:new i(function(t){t(n)})}return new(i||(i=Promise))(function(i,f){function o(n){try{e(r.next(n))}catch(t){f(t)}}function s(n){try{e(r["throw"](n))}catch(t){f(t)}}function e(n){n.done?i(n.value):u(n.value).then(o,s)}e((r=r.apply(n,t||[])).next())})},f=this&&this.__generator||function(n,t){function o(n){return function(t){return s([n,t])}}function s(e){if(f)throw new TypeError("Generator is already executing.");while(r)try{if(f=1,u&&(i=e[0]&2?u["return"]:e[0]?u["throw"]||((i=u["return"])&&i.call(u),0):u.next)&&!(i=i.call(u,e[1])).done)return i;(u=0,i)&&(e=[e[0]&2,i.value]);switch(e[0]){case 0:case 1:i=e;break;case 4:return r.label++,{value:e[1],done:!1};case 5:r.label++;u=e[1];e=[0];continue;case 7:e=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(e[0]===6||e[0]===2)){r=0;continue}if(e[0]===3&&(!i||e[1]>i[0]&&e[1]<i[3])){r.label=e[1];break}if(e[0]===6&&r.label<i[1]){r.label=i[1];i=e;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(e);break}i[2]&&r.ops.pop();r.trys.pop();continue}e=t.call(n,r)}catch(o){e=[6,o];u=0}finally{f=i=0}if(e[0]&5)throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},f,u,i,e;return e={next:o(0),"throw":o(1),"return":o(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e},e=this&&this.__importStar||function(n){var t,i;if(n&&n.__esModule)return n;if(t={},n!=null)for(i in n)Object.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t};Object.defineProperty(t,"__esModule",{value:!0});var o=i(498),s=i(505),r=e(i(508));t.crimeMapInitCallback=function(n,t){var i=[],e=$(".js-crime-map-description");$(".js-dynamic-prevention-advice-panels").each(function(n,t){var r=$(t),u=r.data("api-url"),f=new s.DynamicCrimePreventionPanels(r,u);i.push(f)});t.on(o.QUERY_CHANGED,function(n){return u(void 0,void 0,void 0,function(){var t,o,s,h,c,u,l,a,v,y;return f(this,function(f){switch(f.label){case 0:return(t=n.activeIncidentType,o=n.activeYear,s=n.activeMonth,h=n.forceCode,c=n.descriptionApi,u=n.descriptionHtml,l=c+"?forceCode="+h+"&year="+o+"&month="+s+"&crimeSelected="+t,!(t!==null&&t.length))?[3,2]:(v=r.getFetchHeadersForText(),y=r.setPostFetchOpts(v),[4,r.fetchText(encodeURI(l),y,1e4)]);case 1:a=f.sent();u=JSON.parse(a);f.label=2;case 2:return e.html(u),i.forEach(function(t){return t.getPanelContent(n)}),[2]}})})})}},505:function(n,t,i){"use strict";var f=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),e=this&&this.__importDefault||function(n){return n&&n.__esModule?n:{"default":n}},r,u;Object.defineProperty(t,"__esModule",{value:!0});r=e(i(506));u=function(n){function t(t,i){var r=n.call(this,t)||this;return r.getPanelContent=r.getPanelContent.bind(r),r.setPanelContent=r.setPanelContent.bind(r),t&&i&&(r.$element=t,r.apiUrl=i),r}return f(t,n),t.prototype.getPanelContent=function(n){var r=this;if(n){var u=n.activeIncidentType,f=n.activeMonth,e=n.activeYear,t={crimeType:u,month:f,year:e},i=t?Object.keys(t).map(function(n){return n+"="+encodeURIComponent(t[n])}).join("&"):"",o=i?this.apiUrl+"?"+i:this.apiUrl;$.ajax({method:"GET",url:o}).done(function(n){r.setPanelContent(n)})}},t.prototype.setPanelContent=function(n){this.$element&&n&&(this.$element.html(n),window.masonry&&window.masonry.init())},t}(r.default);t.DynamicCrimePreventionPanels=u},506:function(n,t,i){"use strict";var e=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),u,r,f;Object.defineProperty(t,"__esModule",{value:!0});u=i(498);r=i(507);r.defaultMaxListeners=100;f=function(n){function t(t){var i=n.call(this)||this;return i.$component=undefined,i.setComponentVisibility=i.setComponentVisibility.bind(i),i.disableComponentFormElements=i.disableComponentFormElements.bind(i),i.$component=t,i}return e(t,n),t.prototype.setComponentVisibility=function(n){this.$component.toggleClass(u.HIDDENCLASS,!n)},t.prototype.disableComponentFormElements=function(n){this.$component.find("input, select, textarea, button").each(function(t,i){var r=$(i);r.is(":visible")&&!r.hasClass("js-no-disable")&&r.prop("disabled",n)})},t}(r);t.default=f},507:function(n){"use strict";function y(n){console&&console.warn&&console.warn(n)}function t(){t.init.call(this)}function r(n){if(typeof n!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n);}function s(n){return n._maxListeners===undefined?t.defaultMaxListeners:n._maxListeners}function h(n,t,i,u){var h,e,f,o;return r(i),e=n._events,e===undefined?(e=n._events=Object.create(null),n._eventsCount=0):(e.newListener!==undefined&&(n.emit("newListener",t,i.listener?i.listener:i),e=n._events),f=e[t]),f===undefined?(f=e[t]=i,++n._eventsCount):(typeof f=="function"?f=e[t]=u?[i,f]:[f,i]:u?f.unshift(i):f.push(i),h=s(n),h>0&&f.length>h&&!f.warned&&(f.warned=!0,o=new Error("Possible EventEmitter memory leak detected. "+f.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit"),o.name="MaxListenersExceededWarning",o.emitter=n,o.type=t,o.count=f.length,y(o))),n}function p(){if(!this.fired)return(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0)?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function c(n,t,i){var u={fired:!1,wrapFn:undefined,target:n,type:t,listener:i},r=p.bind(u);return r.listener=i,u.wrapFn=r,r}function l(n,t,i){var u=n._events,r;return u===undefined?[]:(r=u[t],r===undefined)?[]:typeof r=="function"?i?[r.listener||r]:[r]:i?b(r):v(r,r.length)}function a(n){var i=this._events,t;if(i!==undefined){if(t=i[n],typeof t=="function")return 1;if(t!==undefined)return t.length}return 0}function v(n,t){for(var r=new Array(t),i=0;i<t;++i)r[i]=n[i];return r}function w(n,t){for(;t+1<n.length;t++)n[t]=n[t+1];n.pop()}function b(n){for(var i=new Array(n.length),t=0;t<i.length;++t)i[t]=n[t].listener||n[t];return i}function k(n,t){return new Promise(function(i,r){function f(){u!==undefined&&n.removeListener("error",u);i([].slice.call(arguments))}var u;if(t!=="error"){u=function(i){n.removeListener(t,f);r(i)};n.once("error",u)}n.once(t,f)})}var i=typeof Reflect=="object"?Reflect:null,e=i&&typeof i.apply=="function"?i.apply:function(n,t,i){return Function.prototype.apply.call(n,t,i)},o,u,f;o=i&&typeof i.ownKeys=="function"?i.ownKeys:Object.getOwnPropertySymbols?function(n){return Object.getOwnPropertyNames(n).concat(Object.getOwnPropertySymbols(n))}:function(n){return Object.getOwnPropertyNames(n)};u=Number.isNaN||function(n){return n!==n};n.exports=t;n.exports.once=k;t.EventEmitter=t;t.prototype._events=undefined;t.prototype._eventsCount=0;t.prototype._maxListeners=undefined;f=10;Object.defineProperty(t,"defaultMaxListeners",{enumerable:!0,get:function(){return f},set:function(n){if(typeof n!="number"||n<0||u(n))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+n+".");f=n}});t.init=function(){(this._events===undefined||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0);this._maxListeners=this._maxListeners||undefined};t.prototype.setMaxListeners=function(n){if(typeof n!="number"||n<0||u(n))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+n+".");return this._maxListeners=n,this};t.prototype.getMaxListeners=function(){return s(this)};t.prototype.emit=function(n){for(var f,o,i,s,r,h,c,u=[],t=1;t<arguments.length;t++)u.push(arguments[t]);if(f=n==="error",o=this._events,o!==undefined)f=f&&o.error===undefined;else if(!f)return!1;if(f){if(u.length>0&&(i=u[0]),i instanceof Error)throw i;s=new Error("Unhandled error."+(i?" ("+i.message+")":""));s.context=i;throw s;}if(r=o[n],r===undefined)return!1;if(typeof r=="function")e(r,this,u);else for(h=r.length,c=v(r,h),t=0;t<h;++t)e(c[t],this,u);return!0};t.prototype.addListener=function(n,t){return h(this,n,t,!1)};t.prototype.on=t.prototype.addListener;t.prototype.prependListener=function(n,t){return h(this,n,t,!0)};t.prototype.once=function(n,t){r(t);this.on(n,c(this,n,t));return this};t.prototype.prependOnceListener=function(n,t){return r(t),this.prependListener(n,c(this,n,t)),this};t.prototype.removeListener=function(n,t){var i,u,e,f,o;if((r(t),u=this._events,u===undefined)||(i=u[n],i===undefined))return this;if(i===t||i.listener===t)--this._eventsCount==0?this._events=Object.create(null):(delete u[n],u.removeListener&&this.emit("removeListener",n,i.listener||t));else if(typeof i!="function"){for(e=-1,f=i.length-1;f>=0;f--)if(i[f]===t||i[f].listener===t){o=i[f].listener;e=f;break}if(e<0)return this;e===0?i.shift():w(i,e);i.length===1&&(u[n]=i[0]);u.removeListener!==undefined&&this.emit("removeListener",n,o||t)}return this};t.prototype.off=t.prototype.removeListener;t.prototype.removeAllListeners=function(n){var r,i,t,u,f;if(i=this._events,i===undefined)return this;if(i.removeListener===undefined)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):i[n]!==undefined&&(--this._eventsCount==0?this._events=Object.create(null):delete i[n]),this;if(arguments.length===0){for(u=Object.keys(i),t=0;t<u.length;++t)(f=u[t],f!=="removeListener")&&this.removeAllListeners(f);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=i[n],typeof r=="function")this.removeListener(n,r);else if(r!==undefined)for(t=r.length-1;t>=0;t--)this.removeListener(n,r[t]);return this};t.prototype.listeners=function(n){return l(this,n,!0)};t.prototype.rawListeners=function(n){return l(this,n,!1)};t.listenerCount=function(n,t){return typeof n.listenerCount=="function"?n.listenerCount(t):a.call(n,t)};t.prototype.listenerCount=a;t.prototype.eventNames=function(){return this._eventsCount>0?o(this._events):[]}},508:function(n,t){"use strict";var i=this&&this.__awaiter||function(n,t,i,r){function u(n){return n instanceof i?n:new i(function(t){t(n)})}return new(i||(i=Promise))(function(i,f){function o(n){try{e(r.next(n))}catch(t){f(t)}}function s(n){try{e(r["throw"](n))}catch(t){f(t)}}function e(n){n.done?i(n.value):u(n.value).then(o,s)}e((r=r.apply(n,t||[])).next())})},r=this&&this.__generator||function(n,t){function o(n){return function(t){return s([n,t])}}function s(e){if(f)throw new TypeError("Generator is already executing.");while(r)try{if(f=1,u&&(i=e[0]&2?u["return"]:e[0]?u["throw"]||((i=u["return"])&&i.call(u),0):u.next)&&!(i=i.call(u,e[1])).done)return i;(u=0,i)&&(e=[e[0]&2,i.value]);switch(e[0]){case 0:case 1:i=e;break;case 4:return r.label++,{value:e[1],done:!1};case 5:r.label++;u=e[1];e=[0];continue;case 7:e=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(e[0]===6||e[0]===2)){r=0;continue}if(e[0]===3&&(!i||e[1]>i[0]&&e[1]<i[3])){r.label=e[1];break}if(e[0]===6&&r.label<i[1]){r.label=i[1];i=e;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(e);break}i[2]&&r.ops.pop();r.trys.pop();continue}e=t.call(n,r)}catch(o){e=[6,o];u=0}finally{f=i=0}if(e[0]&5)throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},f,u,i,e;return e={next:o(0),"throw":o(1),"return":o(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e};Object.defineProperty(t,"__esModule",{value:!0});t.fetchWithTimeOut=function(n,t,i){return Promise.race([fetch(n,t).then(function(n){if(!n.ok)throw new Error(n.status+": "+n.statusText);return n}),new Promise(function(n,t){return setTimeout(function(){return t(new Error("This request has timed out"))},i)})])};t.fetchJSON=function(n,u,f){return i(void 0,void 0,void 0,function(){return r(this,function(){return[2,t.fetchWithTimeOut(n,u,f).then(function(n){if(!n.ok){var t=n.status+": "+n.statusText;return new Error(t)}return n.json()}).catch(function(n){return new Error(n.message)})]})})};t.fetchText=function(n,i,r){return t.fetchWithTimeOut(n,i,r).then(function(n){if(!n.ok){var t=n.status+": "+n.statusText;return new Error(t)}return n.text()}).catch(function(n){return new Error(n.message)})};t.getFetchHeadersForJSON=function(n){n===void 0&&(n={});return new Headers(Object.assign({},{Accept:"application/json","Content-Type":"application/json"},n))};t.getFetchHeadersForText=function(n){n===void 0&&(n={});return new Headers(Object.assign({},{Accept:"text/html","Content-Type":"text/html"},n))};t.setGetFetchOpts=function(n){return{method:"GET",credentials:"include",headers:n}};t.setPostFetchOpts=function(n){return{method:"POST",credentials:"include",headers:n}}},509:function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.getActiveElement=function(){return document.hasFocus()&&document.activeElement!==document.body&&document.activeElement!==document.documentElement&&document.activeElement||null};t.trapFocus=function(n,i){var r;return i===void 0&&(i=[]),r="",i&&i.forEach(function(n,t){r+=n+":visible:not([disabled]):not(.u-dom-hidden)";t!==i.length-1&&(r+=",")}),function(i){var s=r||'\n            a[href]:not([disabled]),\n            button:not([disabled]),\n            textarea:not([disabled]),\n            input[type="text"]:not([disabled]),\n            input[type="radio"]:not([disabled]),\n            input[type="checkbox"]:not([disabled]),\n            select:not([disabled])\n        ',u=$(n).find(s),f=u[0],e=u[u.length-1],o=t.getActiveElement();(i.key==="Tab"||i.keyCode===9)&&(i.shiftKey?o===f&&(e.focus(),i.cancelable&&i.preventDefault()):o===e&&(f.focus(),i.cancelable&&i.preventDefault()))}}},510:function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(511);t.createLanguageSelectorHelper=function(n){var t=new r.LanguageSelector(n)}},511:function(n,t,i){"use strict";var r=this&&this.__awaiter||function(n,t,i,r){function u(n){return n instanceof i?n:new i(function(t){t(n)})}return new(i||(i=Promise))(function(i,f){function o(n){try{e(r.next(n))}catch(t){f(t)}}function s(n){try{e(r["throw"](n))}catch(t){f(t)}}function e(n){n.done?i(n.value):u(n.value).then(o,s)}e((r=r.apply(n,t||[])).next())})},u=this&&this.__generator||function(n,t){function o(n){return function(t){return s([n,t])}}function s(e){if(f)throw new TypeError("Generator is already executing.");while(r)try{if(f=1,u&&(i=e[0]&2?u["return"]:e[0]?u["throw"]||((i=u["return"])&&i.call(u),0):u.next)&&!(i=i.call(u,e[1])).done)return i;(u=0,i)&&(e=[e[0]&2,i.value]);switch(e[0]){case 0:case 1:i=e;break;case 4:return r.label++,{value:e[1],done:!1};case 5:r.label++;u=e[1];e=[0];continue;case 7:e=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(e[0]===6||e[0]===2)){r=0;continue}if(e[0]===3&&(!i||e[1]>i[0]&&e[1]<i[3])){r.label=e[1];break}if(e[0]===6&&r.label<i[1]){r.label=i[1];i=e;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(e);break}i[2]&&r.ops.pop();r.trys.pop();continue}e=t.call(n,r)}catch(o){e=[6,o];u=0}finally{f=i=0}if(e[0]&5)throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},f,u,i,e;return e={next:o(0),"throw":o(1),"return":o(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e},f=this&&this.__spreadArrays||function(){for(var i=0,n=0,r=arguments.length;n<r;n++)i+=arguments[n].length;for(var u=Array(i),f=0,n=0;n<r;n++)for(var e=arguments[n],t=0,o=e.length;t<o;t++,f++)u[f]=e[t];return u},e=this&&this.__importDefault||function(n){return n&&n.__esModule?n:{"default":n}};Object.defineProperty(t,"__esModule",{value:!0});var o=e(i(512)),s=i(497),h=function(){function n(n){var t=this;this.currentLanguage="en-GB";this.setLanguageCookie=function(){return r(t,void 0,void 0,function(){return u(this,function(){return o.default.setCookie(this.cookieName,"true",{path:"/",expires:0,duration:"seconds"}),[2]})})};this.setLanguageCookie=this.setLanguageCookie.bind(this);this.element=n;this.element?(this.currentLanguage=this.element.getAttribute("data-language-for"),this.cookieName=this.element.getAttribute("data-language-cookie-name"),this.anchors=f(this.element.querySelectorAll("a")),this.anchors.length&&this.anchors.forEach(function(i){i.addEventListener("click",function(r){r.preventDefault();t.setLanguageCookie();var f=i.getAttribute("data-language-for"),u=i.getAttribute("href");f!==t.currentLanguage&&s.isDefined(u)?window.location.replace(u):($("body").removeClass("no-scroll"),n.classList.add("u-dom-hidden"),n.setAttribute("aria-hidden","true"))})})):this.setLanguageCookie()}return n}();t.LanguageSelector=h},512:function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(){}return n.setCookie=function(n,t,i){var u,r,f;typeof t!="undefined"&&(u="",r=void 0,i.expires!==0&&i.duration==="seconds"?(r=new Date,r.setTime(r.getTime()+i.expires*1e3),u="expires="+r.toUTCString()):i.expires!==0&&i.duration==="years"&&(r=new Date((new Date).setFullYear((new Date).getFullYear()+i.expires)),u="expires="+r.toUTCString()),f=i.path||"/",document.cookie=n+"="+encodeURIComponent(t)+"; "+u+"; path="+f)},n.getCookie=function(n){var i=null,u=null,r,f,t,e;if(document.cookie&&document.cookie!=="")for(r=document.cookie.split(";"),f=r.length,t=0;t<f;++t)if(i=r[t].replace(/\s*/g,""),i.substring(0,n.length+1)===n+"="){e=n.length;u=decodeURIComponent(i.substring(e+1));break}return u},n.getAllCookieKeys=function(){var n=[];return document.cookie&&document.cookie!==""&&document.cookie.split(";").forEach(function(t){var i=t.trim(),r=i.indexOf("="),u=i.substr(0,r);n.push(u)}),n},n.deleteCookie=function(n){var t=new Date;t.setTime(t.getTime());document.cookie=n+"=; expires="+t.toUTCString()+"; path=/"},n}();t.default=i}})