/*!
 * JavaScript Cookie v2.2.0
 * https://github.com/js-cookie/js-cookie
 *
 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
 * Released under the MIT license
 */
(function(n){var t=!1,r,i;typeof define=="function"&&define.amd&&(define(n),t=!0);typeof exports=="object"&&(module.exports=n(),t=!0);t||(r=window.Cookies,i=window.Cookies=n(),i.noConflict=function(){return window.Cookies=r,i})})(function(){function n(){for(var n=0,r={},t,i;n<arguments.length;n++){t=arguments[n];for(i in t)r[i]=t[i]}return r}function t(i){function r(t,u,f){var o,c,l,s,v,e,h;if(typeof document!="undefined"){if(arguments.length>1){f=n({path:"/"},r.defaults,f);typeof f.expires=="number"&&(c=new Date,c.setMilliseconds(c.getMilliseconds()+f.expires*864e5),f.expires=c);f.expires=f.expires?f.expires.toUTCString():"";try{o=JSON.stringify(u);/^[\{\[]/.test(o)&&(u=o)}catch(w){}u=i.write?i.write(u,t):encodeURIComponent(String(u)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent);t=encodeURIComponent(String(t));t=t.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent);t=t.replace(/[\(\)]/g,escape);l="";for(s in f)f[s]&&(l+="; "+s,f[s]!==!0)&&(l+="="+f[s]);return document.cookie=t+"="+u+l}t||(o={});for(var y=document.cookie?document.cookie.split("; "):[],p=/(%[0-9A-Z]{2})+/g,a=0;a<y.length;a++){v=y[a].split("=");e=v.slice(1).join("=");this.json||e.charAt(0)!=='"'||(e=e.slice(1,-1));try{if(h=v[0].replace(p,decodeURIComponent),e=i.read?i.read(e,h):i(e,h)||e.replace(p,decodeURIComponent),this.json)try{e=JSON.parse(e)}catch(w){}if(t===h){o=e;break}t||(o[h]=e)}catch(w){}}return o}}return r.set=r,r.get=function(n){return r.call(r,n)},r.getJSON=function(){return r.apply({json:!0},[].slice.call(arguments))},r.defaults={},r.remove=function(t,i){r(t,"",n(i,{expires:-1}))},r.withConverter=t,r}return t(function(){})})
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("underscore",t):(n="undefined"!=typeof globalThis?globalThis:n||self,function(){var r=n._,i=n._=t();i.noConflict=function(){return n._=r,i}}())}(this,function(){function u(n,t){return t=null==t?n.length-1:+t,function(){for(var u,f=Math.max(arguments.length-t,0),r=Array(f),i=0;i<f;i++)r[i]=arguments[i+t];switch(t){case 0:return n.call(this,r);case 1:return n.call(this,arguments[0],r);case 2:return n.call(this,arguments[0],arguments[1],r)}for(u=Array(t+1),i=0;i<t;i++)u[i]=arguments[i];return u[t]=r,n.apply(this,u)}}function l(n){var t=typeof n;return"function"===t||"object"===t&&!!n}function lr(n){return void 0===n}function ar(n){return!0===n||!1===n||"[object Boolean]"===g.call(n)}function i(n){var t="[object "+n+"]";return function(n){return g.call(n)===t}}function c(n,t){return null!=n&&ue.call(n,t)}function dr(n){return vr(n)&&oe(n)}function gr(n){return function(){return n}}function nu(n){return function(t){var i=n(t);return"number"==typeof i&&i>=0&&i<=he}}function tu(n){return function(t){if(null!=t)return t[n]}}function ru(n,t){t=function(n){for(var t={},r=n.length,i=0;i<r;++i)t[n[i]]=!0;return{contains:function(n){return!0===t[n]},push:function(i){return t[i]=!0,n.push(i)}}}(t);var u=cr.length,f=n.constructor,e=r(f)&&f.prototype||pt,i="constructor";for(c(n,i)&&!t.contains(i)&&t.push(i);u--;)(i=cr[u])in n&&n[i]!==e[i]&&!t.contains(i)&&t.push(i)}function t(n){var t,i;if(!l(n))return[];if(er)return er(n);t=[];for(i in n)c(n,i)&&t.push(i);return hr&&ru(n,t),t}function uu(n,i){var e=t(i),o=e.length,f,r,u;if(null==n)return!o;for(f=Object(n),r=0;r<o;r++)if(u=e[r],i[u]!==f[u]||!(u in f))return!1;return!0}function n(t){return t instanceof n?t:this instanceof n?void(this._wrapped=t):new n(t)}function fu(n){return new Uint8Array(n.buffer||n,n.byteOffset||0,st(n))}function dt(i,u,f,e){if(i===u)return 0!==i||1/i==1/u;if(null==i||null==u)return!1;if(i!=i)return u!=u;var o=typeof i;return("function"===o||"object"===o||"object"==typeof u)&&function i(u,f,e,o){var h,l,a,v,s,y,p;if(u instanceof n&&(u=u._wrapped),f instanceof n&&(f=f._wrapped),h=g.call(u),h!==g.call(f))return!1;if(kr&&"[object Object]"==h&&ft(u)){if(!ft(f))return!1;h=kt}switch(h){case"[object RegExp]":case"[object String]":return""+u==""+f;case"[object Number]":return+u!=+u?+f!=+f:0==+u?1/+u==1/f:+u==+f;case"[object Date]":case"[object Boolean]":return+u==+f;case"[object Symbol]":return ur.valueOf.call(u)===ur.valueOf.call(f);case"[object ArrayBuffer]":case kt:return i(fu(u),fu(f),e,o)}if(l="[object Array]"===h,!l&&iu(u)){if(st(u)!==st(f))return!1;if(u.buffer===f.buffer&&u.byteOffset===f.byteOffset)return!0;l=!0}if(!l&&("object"!=typeof u||"object"!=typeof f||(a=u.constructor,v=f.constructor,a!==v&&!(r(a)&&a instanceof a&&r(v)&&v instanceof v)&&"constructor"in u&&"constructor"in f)))return!1;for(o=o||[],s=(e=e||[]).length;s--;)if(e[s]===u)return o[s]===f;if(e.push(u),o.push(f),l){if((s=u.length)!==f.length)return!1;for(;s--;)if(!dt(u[s],f[s],e,o))return!1}else{if(p=t(u),s=p.length,t(f).length!==s)return!1;for(;s--;)if(y=p[s],!c(f,y)||!dt(u[y],f[y],e,o))return!1}return e.pop(),o.pop(),!0}(i,u,f,e)}function nt(n){var t,i;if(!l(n))return[];t=[];for(i in n)t.push(i);return hr&&ru(n,t),t}function gt(n){var t=f(n);return function(i){var e,u;if(null==i||(e=nt(i),f(e)))return!1;for(u=0;u<t;u++)if(!r(i[n[u]]))return!1;return n!==su||!r(i[ni])}}function w(n){for(var r=t(n),u=r.length,f=Array(u),i=0;i<u;i++)f[i]=n[r[i]];return f}function hu(n){for(var u={},r=t(n),i=0,f=r.length;i<f;i++)u[n[r[i]]]=r[i];return u}function ii(n){var t=[];for(var i in n)r(n[i])&&t.push(i);return t.sort()}function ri(n,t){return function(i){var e=arguments.length,r,u;if(t&&(i=Object(i)),e<2||null==i)return i;for(r=1;r<e;r++)for(var o=arguments[r],s=n(o),h=s.length,f=0;f<h;f++)u=s[f],t&&void 0!==i[u]||(i[u]=o[u]);return i}}function au(n){var t,i;return l(n)?or?or(n):(t=function(){},t.prototype=n,i=new t,t.prototype=null,i):{}}function vu(n){return a(n)?n:[n]}function tt(t){return n.toPath(t)}function ui(n,t){for(var r=t.length,i=0;i<r;i++){if(null==n)return;n=n[t[i]]}if(r)return n}function yu(n,t,i){var r=ui(n,tt(t));return lr(r)?i:r}function fi(n){return n}function it(n){return n=ht({},n),function(t){return uu(t,n)}}function ei(n){return n=tt(n),function(t){return ui(t,n)}}function rt(n,t,i){if(void 0===t)return n;switch(null==i?3:i){case 1:return function(i){return n.call(t,i)};case 3:return function(i,r,u){return n.call(t,i,r,u)};case 4:return function(i,r,u,f){return n.call(t,i,r,u,f)}}return function(){return n.apply(t,arguments)}}function pu(n,t,i){return null==n?fi:r(n)?rt(n,t,i):l(n)&&!a(n)?it(n):ei(n)}function oi(n,t){return pu(n,t,1/0)}function e(t,i,r){return n.iteratee!==oi?n.iteratee(t,i):pu(t,i,r)}function wu(){}function si(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))}function bu(n){var r=function(t){return n[t]},i="(?:"+t(n).join("|")+")",u=RegExp(i),f=RegExp(i,"g");return function(n){return n=null==n?"":""+n,u.test(n)?n.replace(f,r):n}}function oo(n){return"\\"+fo[n]}function nf(n,t,i,r,u){if(!(r instanceof t))return n.apply(i,u);var f=au(n.prototype),e=n.apply(f,u);return l(e)?e:f}function y(n,t,i,r){var u,h,c;if(r=r||[],t||0===t){if(t<=0)return r.concat(n)}else t=1/0;for(var e=r.length,s=0,l=f(n);s<l;s++)if(u=n[s],o(u)&&(a(u)||ot(u)))if(t>1)y(u,t-1,i,r),e=r.length;else for(h=0,c=u.length;h<c;)r[e++]=u[h++];else i||(r[e++]=u);return r}function li(n){return function(){return!n.apply(this,arguments)}}function rf(n,t){var i;return function(){return--n>0&&(i=t.apply(this,arguments)),n<=1&&(t=null),i}}function ff(n,i,r){i=e(i,r);for(var u,o=t(n),f=0,s=o.length;f<s;f++)if(i(n[u=o[f]],u,n))return u}function ef(n){return function(t,i,r){i=e(i,r);for(var o=f(t),u=n>0?0:o-1;u>=0&&u<o;u+=n)if(i(t[u],u,t))return u;return-1}}function of(n,t,i,r){for(var o,h=(i=e(i,r,1))(t),u=0,s=f(n);u<s;)o=Math.floor((u+s)/2),i(n[o])<h?u=o+1:s=o;return u}function sf(n,t,i){return function(r,u,e){var s=0,o=f(r);if("number"==typeof e)n>0?s=e>=0?e:Math.max(e+o,s):o=e>=0?Math.min(e+1,o):e+o+1;else if(i&&e&&o)return r[e=i(r,u)]===u?e:-1;if(u!=u)return(e=t(d.call(r,s,o),dr))>=0?e+s:-1;for(e=n>0?s:o-1;e>=0&&e<o;e+=n)if(r[e]===u)return e;return-1}}function yi(n,t,i){var r=(o(n)?ct:ff)(n,t,i);if(void 0!==r&&-1!==r)return n[r]}function s(n,i,r){var u,f,e;if(i=rt(i,r),o(n))for(u=0,f=n.length;u<f;u++)i(n[u],u,n);else for(e=t(n),u=0,f=e.length;u<f;u++)i(n[e[u]],e[u],n);return n}function p(n,i,r){var s;i=e(i,r);for(var f=!o(n)&&t(n),h=(f||n).length,c=Array(h),u=0;u<h;u++)s=f?f[u]:u,c[u]=i(n[s],s,n);return c}function cf(n){var i=function(i,r,u,f){var s=!o(i)&&t(i),c=(s||i).length,e=n>0?0:c-1,h;for(f||(u=i[s?s[e]:e],e+=n);e>=0&&e<c;e+=n)h=s?s[e]:e,u=r(u,i[h],h,i);return u};return function(n,t,r,u){var f=arguments.length>=3;return i(n,rt(t,u,4),r,f)}}function k(n,t,i){var r=[];return t=e(t,i),s(n,function(n,i,u){t(n,i,u)&&r.push(n)}),r}function lf(n,i,r){var s;i=e(i,r);for(var f=!o(n)&&t(n),h=(f||n).length,u=0;u<h;u++)if(s=f?f[u]:u,!i(n[s],s,n))return!1;return!0}function af(n,i,r){var s;i=e(i,r);for(var f=!o(n)&&t(n),h=(f||n).length,u=0;u<h;u++)if(s=f?f[u]:u,i(n[s],s,n))return!0;return!1}function h(n,t,i,r){return o(n)||(n=w(n)),("number"!=typeof i||r)&&(i=0),vi(n,t,i)>=0}function wi(n,t){return p(n,ei(t))}function yf(n,t,i){var f,h,r=-1/0,c=-1/0,u,l;if(null==t||"number"==typeof t&&"object"!=typeof n[0]&&null!=n)for(u=0,l=(n=o(n)?n:w(n)).length;u<l;u++)null!=(f=n[u])&&f>r&&(r=f);else t=e(t,i),s(n,function(n,i,u){((h=t(n,i,u))>c||h===-1/0&&r===-1/0)&&(r=n,c=h)});return r}function wf(n){return n?a(n)?d.call(n):wt(n)?n.match(pf):o(n)?p(n,fi):w(n):[]}function bf(n,t,i){var r,e,h,u,s,c;if(null==t||i)return o(n)||(n=w(n)),n[si(n.length-1)];for(r=wf(n),e=f(r),t=Math.max(Math.min(t,e),0),h=e-1,u=0;u<t;u++)s=si(u,h),c=r[u],r[u]=r[s],r[s]=c;return r.slice(0,t)}function at(n,t){return function(i,r,u){var f=t?[[],[]]:{};return r=e(r,u),s(i,function(t,u){var e=r(t,u,i);n(f,t,e)}),f}}function yo(n,t,i){return t in i}function df(n,t,i){return d.call(n,0,Math.max(0,n.length-(null==t||i?1:t)))}function ki(n,t,i){return null==n||n.length<1?null==t||i?void 0:[]:null==t||i?n[0]:df(n,n.length-t)}function vt(n,t,i){return d.call(n,null==t||i?1:t)}function gi(n,t,i,r){var u,c;ar(t)||(r=i,i=t,t=!1);null!=i&&(i=e(i,r));for(var o=[],l=[],s=0,a=f(n);s<a;s++)u=n[s],c=i?i(u,s,n):u,t&&!i?(s&&l===c||o.push(u),l=c):i?h(l,c)||(l.push(c),o.push(u)):h(o,u)||o.push(u);return o}function nr(n){for(var i=n&&yf(n,f).length||0,r=Array(i),t=0;t<i;t++)r[t]=wi(n,t);return r}function tr(t,i){return t._chain?n(i).chain():i}function ie(t){return s(ii(t),function(i){var r=n[i]=t[i];n.prototype[i]=function(){var t=[this._wrapped];return re.apply(t,arguments),tr(this,r.apply(n,t))}}),n}var ir="1.13.2",rr="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},ut=Array.prototype,pt=Object.prototype,ur="undefined"!=typeof Symbol?Symbol.prototype:null,re=ut.push,d=ut.slice,g=pt.toString,ue=pt.hasOwnProperty,fr="undefined"!=typeof ArrayBuffer,fe="undefined"!=typeof DataView,ee=Array.isArray,er=Object.keys,or=Object.create,sr=fr&&ArrayBuffer.isView,oe=isNaN,se=isFinite,hr=!{toString:null}.propertyIsEnumerable("toString"),cr=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],he=Math.pow(2,53)-1,wt=i("String"),vr=i("Number"),ce=i("Date"),le=i("RegExp"),ae=i("Error"),yr=i("Symbol"),pr=i("ArrayBuffer"),wr=i("Function"),ve=rr.document&&rr.document.childNodes,et,ot,kt,b,du,gu,v,ci,o,uf,ct,ai,vi,hf,lt,pi,vf,pf,bi,kf,di,gf,ne,te,yt;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof ve&&(wr=function(n){return"function"==typeof n||!1});var r=wr,br=i("Object"),kr=fe&&br(new DataView(new ArrayBuffer(8))),bt="undefined"!=typeof Map&&br(new Map),ye=i("DataView"),ft=kr?function(n){return null!=n&&r(n.getInt8)&&pr(n.buffer)}:ye,a=ee||i("Array");et=i("Arguments");!function(){et(arguments)||(et=function(n){return c(n,"callee")})}();ot=et;var st=tu("byteLength"),pe=nu(st),we=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/,iu=fr?function(n){return sr?sr(n)&&!ft(n):pe(n)&&we.test(g.call(n))}:gr(!1),f=tu("length");n.VERSION=ir;n.prototype.value=function(){return this._wrapped};n.prototype.valueOf=n.prototype.toJSON=n.prototype.value;n.prototype.toString=function(){return String(this._wrapped)};kt="[object DataView]";var ni="forEach",eu="has",ti=["clear","delete"],ou=["get",eu,"set"],be=ti.concat(ni,ou),su=ti.concat(ou),ke=["add"].concat(ti,ni,eu),de=bt?gt(be):i("Map"),ge=bt?gt(su):i("WeakMap"),no=bt?gt(ke):i("Set"),to=i("WeakSet");var cu=ri(nt),ht=ri(t),lu=ri(nt,!0);n.toPath=vu;n.iteratee=oi;b=Date.now||function(){return(new Date).getTime()};var ku={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},io=bu(ku),ro=bu(hu(ku)),uo=n.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},hi=/(.)^/,fo={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},eo=/\\|'|\r|\n|\u2028|\u2029/g;du=/^\s*(\w|\$)+\s*$/;gu=0;v=u(function(n,t){var r=v.placeholder,i=function(){for(var f=0,o=t.length,e=Array(o),u=0;u<o;u++)e[u]=t[u]===r?arguments[f++]:t[u];for(;f<arguments.length;)e.push(arguments[f++]);return nf(n,i,this,this,e)};return i});v.placeholder=n;ci=u(function(n,t,i){if(!r(n))throw new TypeError("Bind must be called on a function");var f=u(function(r){return nf(n,f,t,this,i.concat(r))});return f});o=nu(f);var so=u(function(n,t){var i=(t=y(t,!1,!1)).length,r;if(i<1)throw new Error("bindAll must be passed function names");for(;i--;)r=t[i],n[r]=ci(n[r],n);return n}),tf=u(function(n,t,i){return setTimeout(function(){return n.apply(null,i)},t)}),ho=v(tf,n,1);uf=v(rf,2);ct=ef(1);ai=ef(-1);vi=sf(1,ct,of);hf=sf(-1,ai);lt=cf(1);pi=cf(-1);vf=u(function(n,t,i){var u,f;return r(t)?f=t:(t=tt(t),u=t.slice(0,-1),t=t[t.length-1]),p(n,function(n){var r=f;if(!r){if(u&&u.length&&(n=ui(n,u)),null==n)return;r=n[t]}return null==r?r:r.apply(n,i)})});pf=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;var co=at(function(n,t,i){c(n,i)?n[i].push(t):n[i]=[t]}),lo=at(function(n,t,i){n[i]=t}),ao=at(function(n,t,i){c(n,i)?n[i]++:n[i]=1}),vo=at(function(n,t,i){n[i?0:1].push(t)},!0);return bi=u(function(n,t){var e={},i=t[0],u,s,f,o;if(null==n)return e;for(r(i)?(t.length>1&&(i=rt(i,t[1])),t=nt(n)):(i=yo,t=y(t,!1,!1),n=Object(n)),u=0,s=t.length;u<s;u++)f=t[u],o=n[f],i(o,f,n)&&(e[f]=o);return e}),kf=u(function(n,t){var u,i=t[0];return r(i)?(i=li(i),t.length>1&&(u=t[1])):(t=p(y(t,!1,!1),String),i=function(n,i){return!h(t,i)}),bi(n,i,u)}),di=u(function(n,t){return t=y(t,!0,!0),k(n,function(n){return!h(t,n)})}),gf=u(function(n,t){return di(n,t)}),ne=u(function(n){return gi(y(n,!0,!0))}),te=u(nr),s(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var i=ut[t];n.prototype[t]=function(){var n=this._wrapped;return null!=n&&(i.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0]),tr(this,n)}}),s(["concat","join","slice"],function(t){var i=ut[t];n.prototype[t]=function(){var n=this._wrapped;return null!=n&&(n=i.apply(n,arguments)),tr(this,n)}}),yt=ie({__proto__:null,VERSION:ir,restArguments:u,isObject:l,isNull:function(n){return null===n},isUndefined:lr,isBoolean:ar,isElement:function(n){return!(!n||1!==n.nodeType)},isString:wt,isNumber:vr,isDate:ce,isRegExp:le,isError:ae,isSymbol:yr,isArrayBuffer:pr,isDataView:ft,isArray:a,isFunction:r,isArguments:ot,isFinite:function(n){return!yr(n)&&se(n)&&!isNaN(parseFloat(n))},isNaN:dr,isTypedArray:iu,isEmpty:function(n){if(null==n)return!0;var i=f(n);return"number"==typeof i&&(a(n)||wt(n)||ot(n))?0===i:0===f(t(n))},isMatch:uu,isEqual:function(n,t){return dt(n,t)},isMap:de,isWeakMap:ge,isSet:no,isWeakSet:to,keys:t,allKeys:nt,values:w,pairs:function(n){for(var r=t(n),u=r.length,f=Array(u),i=0;i<u;i++)f[i]=[r[i],n[r[i]]];return f},invert:hu,functions:ii,methods:ii,extend:cu,extendOwn:ht,assign:ht,defaults:lu,create:function(n,t){var i=au(n);return t&&ht(i,t),i},clone:function(n){return l(n)?a(n)?n.slice():cu({},n):n},tap:function(n,t){return t(n),n},get:yu,has:function(n,t){for(var u,r=(t=tt(t)).length,i=0;i<r;i++){if(u=t[i],!c(n,u))return!1;n=n[u]}return!!r},mapObject:function(n,i,r){var u;i=e(i,r);for(var o=t(n),h=o.length,s={},f=0;f<h;f++)u=o[f],s[u]=i(n[u],u,n);return s},identity:fi,constant:gr,noop:wu,toPath:vu,property:ei,propertyOf:function(n){return null==n?wu:function(t){return yu(n,t)}},matcher:it,matches:it,times:function(n,t,i){var u=Array(Math.max(0,n)),r;for(t=rt(t,i,1),r=0;r<n;r++)u[r]=t(r);return u},random:si,now:b,escape:io,unescape:ro,templateSettings:uo,template:function(t,i,r){var s,f,e;!i&&r&&(i=r);i=lu({},i,n.templateSettings);var h=RegExp([(i.escape||hi).source,(i.interpolate||hi).source,(i.evaluate||hi).source].join("|")+"|$","g"),o=0,u="__p+='";if(t.replace(h,function(n,i,r,f,e){return u+=t.slice(o,e).replace(eo,oo),o=e+n.length,i?u+="'+\n((__t=("+i+"))==null?'':_.escape(__t))+\n'":r?u+="'+\n((__t=("+r+"))==null?'':__t)+\n'":f&&(u+="';\n"+f+"\n__p+='"),n}),u+="';\n",f=i.variable,f){if(!du.test(f))throw new Error("variable is not a bare identifier: "+f);}else u="with(obj||{}){\n"+u+"}\n",f="obj";u="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+u+"return __p;\n";try{s=new Function(f,"_",u)}catch(t){throw t.source=u,t;}return e=function(t){return s.call(this,t,n)},e.source="function("+f+"){\n"+u+"}",e},result:function(n,t,i){var e=(t=tt(t)).length,f,u;if(!e)return r(i)?i.call(n):i;for(f=0;f<e;f++)u=null==n?void 0:n[t[f]],void 0===u&&(u=i,f=e),n=r(u)?u.call(n):u;return n},uniqueId:function(n){var t=++gu+"";return n?n+t:t},chain:function(t){var i=n(t);return i._chain=!0,i},iteratee:oi,partial:v,bind:ci,bindAll:so,memoize:function(n,t){var i=function(r){var u=i.cache,f=""+(t?t.apply(this,arguments):r);return c(u,f)||(u[f]=n.apply(this,arguments)),u[f]};return i.cache={},i},delay:tf,defer:ho,throttle:function(n,t,i){var r,u,f,o,e=0,h,s;return i||(i={}),h=function(){e=!1===i.leading?0:b();r=null;o=n.apply(u,f);r||(u=f=null)},s=function(){var c=b(),s;return e||!1!==i.leading||(e=c),s=t-(c-e),u=this,f=arguments,s<=0||s>t?(r&&(clearTimeout(r),r=null),e=c,o=n.apply(u,f),r||(u=f=null)):r||!1===i.trailing||(r=setTimeout(h,s)),o},s.cancel=function(){clearTimeout(r);e=0;r=u=f=null},s},debounce:function(n,t,i){var r,s,f,o,e,h=function(){var u=b()-s;t>u?r=setTimeout(h,t-u):(r=null,i||(o=n.apply(e,f)),r||(f=e=null))},c=u(function(u){return e=this,f=u,s=b(),r||(r=setTimeout(h,t),i&&(o=n.apply(e,f))),o});return c.cancel=function(){clearTimeout(r);r=f=e=null},c},wrap:function(n,t){return v(t,n)},negate:li,compose:function(){var n=arguments,t=n.length-1;return function(){for(var r=t,i=n[t].apply(this,arguments);r--;)i=n[r].call(this,i);return i}},after:function(n,t){return function(){if(--n<1)return t.apply(this,arguments)}},before:rf,once:uf,findKey:ff,findIndex:ct,findLastIndex:ai,sortedIndex:of,indexOf:vi,lastIndexOf:hf,find:yi,detect:yi,findWhere:function(n,t){return yi(n,it(t))},each:s,forEach:s,map:p,collect:p,reduce:lt,foldl:lt,inject:lt,reduceRight:pi,foldr:pi,filter:k,select:k,reject:function(n,t,i){return k(n,li(e(t)),i)},every:lf,all:lf,some:af,any:af,contains:h,includes:h,include:h,invoke:vf,pluck:wi,where:function(n,t){return k(n,it(t))},max:yf,min:function(n,t,i){var f,h,r=1/0,c=1/0,u,l;if(null==t||"number"==typeof t&&"object"!=typeof n[0]&&null!=n)for(u=0,l=(n=o(n)?n:w(n)).length;u<l;u++)null!=(f=n[u])&&f<r&&(r=f);else t=e(t,i),s(n,function(n,i,u){((h=t(n,i,u))<c||h===1/0&&r===1/0)&&(r=n,c=h)});return r},shuffle:function(n){return bf(n,1/0)},sample:bf,sortBy:function(n,t,i){var r=0;return t=e(t,i),wi(p(n,function(n,i,u){return{value:n,index:r++,criteria:t(n,i,u)}}).sort(function(n,t){var i=n.criteria,r=t.criteria;if(i!==r){if(i>r||void 0===i)return 1;if(i<r||void 0===r)return-1}return n.index-t.index}),"value")},groupBy:co,indexBy:lo,countBy:ao,partition:vo,toArray:wf,size:function(n){return null==n?0:o(n)?n.length:t(n).length},pick:bi,omit:kf,first:ki,head:ki,take:ki,initial:df,last:function(n,t,i){return null==n||n.length<1?null==t||i?void 0:[]:null==t||i?n[n.length-1]:vt(n,Math.max(0,n.length-t))},rest:vt,tail:vt,drop:vt,compact:function(n){return k(n,Boolean)},flatten:function(n,t){return y(n,t,!1)},without:gf,uniq:gi,unique:gi,union:ne,intersection:function(n){for(var i,t,r=[],e=arguments.length,u=0,o=f(n);u<o;u++)if(i=n[u],!h(r,i)){for(t=1;t<e&&h(arguments[t],i);t++);t===e&&r.push(i)}return r},difference:di,unzip:nr,transpose:nr,zip:te,object:function(n,t){for(var r={},i=0,u=f(n);i<u;i++)t?r[n[i]]=t[i]:r[n[i][0]]=n[i][1];return r},range:function(n,t,i){null==t&&(t=n||0,n=0);i||(i=t<n?-1:1);for(var u=Math.max(Math.ceil((t-n)/i),0),f=Array(u),r=0;r<u;r++,n+=i)f[r]=n;return f},chunk:function(n,t){if(null==t||t<1)return[];for(var r=[],i=0,u=n.length;i<u;)r.push(d.call(n,i,i+=t));return r},mixin:ie,"default":n}),yt._=yt,yt})
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define("GOVUKFrontend",["exports"],t):t(n.GOVUKFrontend={})}(this,function(n){"use strict";function i(n,t){if(window.NodeList.prototype.forEach)return n.forEach(t);for(var i=0;i<n.length;i++)t.call(window,n[i],i,n)}function r(n){this.$module=n;this.moduleId=n.getAttribute("id");this.$sections=n.querySelectorAll(".govuk-accordion__section");this.$openAllButton="";this.browserSupportsSessionStorage=l.checkForSessionStorage();this.controlsClass="govuk-accordion__controls";this.openAllClass="govuk-accordion__open-all";this.iconClass="govuk-accordion__icon";this.sectionHeaderClass="govuk-accordion__section-header";this.sectionHeaderFocusedClass="govuk-accordion__section-header--focused";this.sectionHeadingClass="govuk-accordion__section-heading";this.sectionSummaryClass="govuk-accordion__section-summary";this.sectionButtonClass="govuk-accordion__section-button";this.sectionExpandedClass="govuk-accordion__section--expanded"}function o(n){this.$module=n;this.debounceFormSubmitTimer=null}function e(n){this.$module=n}function u(n){this.$module=n;this.$textarea=n.querySelector(".govuk-js-character-count");this.$textarea&&(this.$countMessage=n.querySelector("[id="+this.$textarea.id+"-info]"))}function s(n){this.$module=n;this.$inputs=n.querySelectorAll('input[type="checkbox"]')}function f(n){this.$module=n}function h(n){this.$module=n}function c(n){this.$module=n}function t(n){this.$module=n;this.$tabs=n.querySelectorAll(".govuk-tabs__tab");this.keys={left:37,right:39,up:38,down:40};this.jsHiddenClass="govuk-tabs__panel--hidden"}(function(){var n,t,i,r;"defineProperty"in Object&&function(){try{return Object.defineProperty({},"test",{value:42}),!0}catch(n){return!1}}()||(n=Object.defineProperty,t=Object.prototype.hasOwnProperty("__defineGetter__"),i="Getters & setters cannot be defined on this javascript engine",r="A property cannot both have accessors and be writable or have a value",Object.defineProperty=function(u,f,e){if(n&&(u===window||u===document||u===Element.prototype||u instanceof Element))return n(u,f,e);if(null===u||!(u instanceof Object||"object"==typeof u))throw new TypeError("Object.defineProperty called on non-object");if(!(e instanceof Object))throw new TypeError("Property description must be an object");var o=String(f),s="value"in e||"writable"in e,h="get"in e&&typeof e.get,c="set"in e&&typeof e.set;if(h){if("function"!==h)throw new TypeError("Getter must be a function");if(!t)throw new TypeError(i);if(s)throw new TypeError(r);Object.__defineGetter__.call(u,o,e.get)}else u[o]=e.value;if(c){if("function"!==c)throw new TypeError("Setter must be a function");if(!t)throw new TypeError(i);if(s)throw new TypeError(r);Object.__defineSetter__.call(u,o,e.set)}return"value"in e&&(u[o]=e.value),u})}).call("object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||{}),function(){"bind"in Function.prototype||Object.defineProperty(Function.prototype,"bind",{value:function(n){var s,a=Array,h=Object,v=h.prototype,r=a.prototype,u=function(){},y=v.toString,p="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,w=Function.prototype.toString,b=function(n){try{return w.call(n),!0}catch(t){return!1}};s=function(n){if("function"!=typeof n)return!1;if(p)return b(n);var t=y.call(n);return"[object Function]"===t||"[object GeneratorFunction]"===t};var f=r.slice,c=r.concat,k=r.push,d=Math.max,t=this;if(!s(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var i,e=f.call(arguments,1),g=d(0,t.length-e.length),l=[],o=0;o<g;o++)k.call(l,"$"+o);return i=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this, arguments); }")(function(){if(this instanceof i){var r=t.apply(this,c.call(e,f.call(arguments)));return h(r)===r?r:this}return t.apply(n,c.call(e,f.call(arguments)))}),t.prototype&&(u.prototype=t.prototype,i.prototype=new u,u.prototype=null),i}})}.call("object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||{}),function(n){var i,r,t;(!("DOMTokenList"in this)||"classList"in(i=document.createElement("x"))&&(i.classList.toggle("x",!1)||i.className))&&("DOMTokenList"in(r=this)&&r.DOMTokenList&&(!document.createElementNS||!document.createElementNS("http://www.w3.org/2000/svg","svg")||document.createElementNS("http://www.w3.org/2000/svg","svg").classList instanceof DOMTokenList)||(r.DOMTokenList=function(){var i=!0,t=function(n,t,r,u){Object.defineProperty?Object.defineProperty(n,t,{configurable:!1===i||!!u,get:r}):n.__defineGetter__(t,r)};try{t({},"support")}catch(r){i=!1}return function(i,r){var f=this,u=[],o={},s=0,h=0,l=function(n){t(f,n,function(){return e(),u[n]},!1)},c=function(){if(h<=s)for(;h<s;++h)l(h)},e=function(){var f,n,t=arguments,e=/\s+/;if(t.length)for(n=0;n<t.length;++n)if(e.test(t[n]))throw(f=new SyntaxError('String "'+t[n]+'" contains an invalid character')).code=5,f.name="InvalidCharacterError",f;for(""===(u="object"==typeof i[r]?(""+i[r].baseVal).replace(/^\s+|\s+$/g,"").split(e):(""+i[r]).replace(/^\s+|\s+$/g,"").split(e))[0]&&(u=[]),o={},n=0;n<u.length;++n)o[u[n]]=!0;s=u.length;c()};return e(),t(f,"length",function(){return e(),s}),f.toLocaleString=f.toString=function(){return e(),u.join(" ")},f.item=function(n){return e(),u[n]},f.contains=function(n){return e(),!!o[n]},f.add=function(){e.apply(f,n=arguments);for(var n,t,h=0,l=n.length;h<l;++h)o[t=n[h]]||(u.push(t),o[t]=!0);s!==u.length&&(s=u.length>>>0,"object"==typeof i[r]?i[r].baseVal=u.join(" "):i[r]=u.join(" "),c())},f.remove=function(){e.apply(f,t=arguments);for(var t,h={},n=0,l=[];n<t.length;++n)h[t[n]]=!0,delete o[t[n]];for(n=0;n<u.length;++n)h[u[n]]||l.push(u[n]);s=(u=l).length>>>0;"object"==typeof i[r]?i[r].baseVal=u.join(" "):i[r]=u.join(" ");c()},f.toggle=function(t,i){return e.apply(f,[t]),n!==i?i?(f.add(t),!0):(f.remove(t),!1):o[t]?(f.remove(t),!1):(f.add(t),!0)},f}}()),"classList"in(t=document.createElement("span"))&&(t.classList.toggle("x",!1),t.classList.contains("x")&&(t.classList.constructor.prototype.toggle=function(t){var i=arguments[1],r;return i!==n?(this[(i=!!i)?"add":"remove"](t),i):(r=!this.contains(t),this[r?"add":"remove"](t),r)})),function(){var n=document.createElement("span"),t;"classList"in n&&(n.classList.add("a","b"),!n.classList.contains("b"))&&(t=n.classList.constructor.prototype.add,n.classList.constructor.prototype.add=function(){for(var i=arguments,r=arguments.length,n=0;n<r;n++)t.call(this,i[n])})}(),function(){var n=document.createElement("span"),t;"classList"in n&&(n.classList.add("a"),n.classList.add("b"),n.classList.remove("a","b"),n.classList.contains("b"))&&(t=n.classList.constructor.prototype.remove,n.classList.constructor.prototype.remove=function(){for(var i=arguments,r=arguments.length,n=0;n<r;n++)t.call(this,i[n])})}())}.call("object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||{}),function(){"Document"in this||"undefined"==typeof WorkerGlobalScope&&"function"!=typeof importScripts&&(this.HTMLDocument?this.Document=this.HTMLDocument:(this.Document=this.HTMLDocument=document.constructor=new Function("return function Document() {}")(),this.Document.prototype=document))}.call("object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||{}),function(){"Element"in this&&"HTMLElement"in this||function(){function u(){return h--||clearTimeout(i),!(!document.body||document.body.prototype||!/(complete|interactive)/.test(document.readyState))&&(r(document,!0),i&&document.body.prototype&&clearTimeout(i),!!document.body.prototype)}if(!window.Element||window.HTMLElement){window.Element=window.HTMLElement=new Function("return function Element() {}")();var i,f=document.appendChild(document.createElement("body")),e=f.appendChild(document.createElement("iframe")).contentWindow.document,n=Element.prototype=e.appendChild(e.createElement("*")),t={},r=function(n,i){var u,f,e,o=n.childNodes||[],s=-1;if(1===n.nodeType&&n.constructor!==Element)for(u in n.constructor=Element,t)f=t[u],n[u]=f;for(;e=i&&o[++s];)r(e,i);return n},o=document.getElementsByTagName("*"),s=document.createElement,h=100;n.attachEvent("onpropertychange",function(i){for(var u,r=i.propertyName,e=!t.hasOwnProperty(r),f=n[r],s=t[r],h=-1;u=o[++h];)1===u.nodeType&&(!e&&u[r]!==s||(u[r]=f));t[r]=f});n.constructor=Element;n.hasAttribute||(n.hasAttribute=function(n){return null!==this.getAttribute(n)});u()||(document.onreadystatechange=u,i=setInterval(u,25));document.createElement=function(n){var t=s(String(n).toLowerCase());return r(t)};document.removeChild(f)}else window.HTMLElement=window.Element}()}.call("object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||{}),function(){var n;"document"in this&&"classList"in document.documentElement&&"Element"in this&&"classList"in Element.prototype&&((n=document.createElement("span")).classList.add("a","b"),n.classList.contains("b"))||function(n){var i=!0,r=function(n,t,r,u){Object.defineProperty?Object.defineProperty(n,t,{configurable:!1===i||!!u,get:r}):n.__defineGetter__(t,r)},t;try{r({},"support")}catch(u){i=!1}t=function(n,u,f){r(n.prototype,u,function(){var e,n=this,h="__defineGetter__DEFINE_PROPERTY"+u;if(n[h])return e;if(!(n[h]=!0)===i){for(var o,l=t.mirror||document.createElement("div"),c=l.childNodes,a=c.length,s=0;s<a;++s)if(c[s]._R===n){o=c[s];break}o=o||l.appendChild(document.createElement("div"));e=DOMTokenList.call(o,n,f)}else e=new DOMTokenList(n,f);return r(n,u,function(){return e}),delete n[h],e},!0)};t(n.Element,"classList","className");t(n.HTMLElement,"classList","className");t(n.HTMLLinkElement,"relList","rel");t(n.HTMLAnchorElement,"relList","rel");t(n.HTMLAreaElement,"relList","rel")}(this)}.call("object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||{});r.prototype.init=function(){if(this.$module){this.initControls();this.initSectionHeaders();var n=this.checkIfAllSectionsOpen();this.updateOpenAllButton(n)}};r.prototype.initControls=function(){this.$openAllButton=document.createElement("button");this.$openAllButton.setAttribute("type","button");this.$openAllButton.innerHTML='Open all <span class="govuk-visually-hidden">sections<\/span>';this.$openAllButton.setAttribute("class",this.openAllClass);this.$openAllButton.setAttribute("aria-expanded","false");this.$openAllButton.setAttribute("type","button");var n=document.createElement("div");n.setAttribute("class",this.controlsClass);n.appendChild(this.$openAllButton);this.$module.insertBefore(n,this.$module.firstChild);this.$openAllButton.addEventListener("click",this.onOpenOrCloseAllToggle.bind(this))};r.prototype.initSectionHeaders=function(){i(this.$sections,function(n,t){var i=n.querySelector("."+this.sectionHeaderClass);this.initHeaderAttributes(i,t);this.setExpanded(this.isExpanded(n),n);i.addEventListener("click",this.onSectionToggle.bind(this,n));this.setInitialState(n)}.bind(this))};r.prototype.initHeaderAttributes=function(n,t){var e=this,r=n.querySelector("."+this.sectionButtonClass),s=n.querySelector("."+this.sectionHeadingClass),h=n.querySelector("."+this.sectionSummaryClass),i=document.createElement("button"),u,o,f;for(i.setAttribute("type","button"),i.setAttribute("id",this.moduleId+"-heading-"+(t+1)),i.setAttribute("aria-controls",this.moduleId+"-content-"+(t+1)),u=0;u<r.attributes.length;u++)o=r.attributes.item(u),i.setAttribute(o.nodeName,o.nodeValue);i.addEventListener("focusin",function(){n.classList.contains(e.sectionHeaderFocusedClass)||(n.className+=" "+e.sectionHeaderFocusedClass)});i.addEventListener("blur",function(){n.classList.remove(e.sectionHeaderFocusedClass)});null!=h&&i.setAttribute("aria-describedby",this.moduleId+"-summary-"+(t+1));i.innerHTML=r.innerHTML;s.removeChild(r);s.appendChild(i);f=document.createElement("span");f.className=this.iconClass;f.setAttribute("aria-hidden","true");i.appendChild(f)};r.prototype.onSectionToggle=function(n){var t=this.isExpanded(n);this.setExpanded(!t,n);this.storeState(n)};r.prototype.onOpenOrCloseAllToggle=function(){var n=this,r=this.$sections,t=!this.checkIfAllSectionsOpen();i(r,function(i){n.setExpanded(t,i);n.storeState(i)});n.updateOpenAllButton(t)};r.prototype.setExpanded=function(n,t){t.querySelector("."+this.sectionButtonClass).setAttribute("aria-expanded",n);n?t.classList.add(this.sectionExpandedClass):t.classList.remove(this.sectionExpandedClass);var i=this.checkIfAllSectionsOpen();this.updateOpenAllButton(i)};r.prototype.isExpanded=function(n){return n.classList.contains(this.sectionExpandedClass)};r.prototype.checkIfAllSectionsOpen=function(){return this.$sections.length===this.$module.querySelectorAll("."+this.sectionExpandedClass).length};r.prototype.updateOpenAllButton=function(n){var t=n?"Close all":"Open all";t+='<span class="govuk-visually-hidden"> sections<\/span>';this.$openAllButton.setAttribute("aria-expanded",n);this.$openAllButton.innerHTML=t};var l={checkForSessionStorage:function(){var t,n="this is the test string";try{return window.sessionStorage.setItem(n,n),t=window.sessionStorage.getItem(n)===n.toString(),window.sessionStorage.removeItem(n),t}catch(i){"undefined"!=typeof console&&"undefined"!=typeof console.log||console.log("Notice: sessionStorage not available.")}}};r.prototype.storeState=function(n){var t,i,r;this.browserSupportsSessionStorage&&(t=n.querySelector("."+this.sectionButtonClass),t&&(i=t.getAttribute("aria-controls"),r=t.getAttribute("aria-expanded"),void 0!==i||"undefined"!=typeof console&&"undefined"!=typeof console.log||console.error(new Error("No aria controls present in accordion section heading.")),void 0!==r||"undefined"!=typeof console&&"undefined"!=typeof console.log||console.error(new Error("No aria expanded present in accordion section heading.")),i&&r&&window.sessionStorage.setItem(i,r)))};r.prototype.setInitialState=function(n){var t,i,r;this.browserSupportsSessionStorage&&(t=n.querySelector("."+this.sectionButtonClass),t&&(i=t.getAttribute("aria-controls"),r=i?window.sessionStorage.getItem(i):null,null!==r&&this.setExpanded("true"===r,n)))},function(){"Window"in this||"undefined"==typeof WorkerGlobalScope&&"function"!=typeof importScripts&&function(n){n.constructor?n.Window=n.constructor:(n.Window=n.constructor=new Function("return function Window() {}")()).prototype=this}(this)}.call("object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||{}),function(n){(function(n){if(!("Event"in n))return!1;if("function"==typeof n.Event)return!0;try{return new Event("click"),!0}catch(t){return!1}})(this)||function(){function i(n,t){for(var i=-1,r=n.length;++i<r;)if(i in n&&n[i]===t)return i;return-1}var r={click:1,dblclick:1,keyup:1,keypress:1,keydown:1,mousedown:1,mouseup:1,mousemove:1,mouseover:1,mouseenter:1,mouseleave:1,mouseout:1,storage:1,storagecommit:1,textinput:1},t;"undefined"!=typeof document&&"undefined"!=typeof window&&(t=window.Event&&window.Event.prototype||null,window.Event=Window.prototype.Event=function(t,i){var r,u,f;if(!t)throw new Error("Not enough arguments");return"createEvent"in document?(r=document.createEvent("Event"),u=!(!i||i.bubbles===n)&&i.bubbles,f=!(!i||i.cancelable===n)&&i.cancelable,r.initEvent(t,u,f),r):((r=document.createEventObject()).type=t,r.bubbles=!(!i||i.bubbles===n)&&i.bubbles,r.cancelable=!(!i||i.cancelable===n)&&i.cancelable,r)},t&&Object.defineProperty(window.Event,"prototype",{configurable:!1,enumerable:!1,writable:!0,value:t}),"createEvent"in document||(window.addEventListener=Window.prototype.addEventListener=Document.prototype.addEventListener=Element.prototype.addEventListener=function(){var n=this,t=arguments[0],u=arguments[1];if(n===window&&t in r)throw new Error("In IE8 the event: "+t+" is not available on the window object. Please see https://github.com/Financial-Times/polyfill-service/issues/317 for more information.");n._events||(n._events={});n._events[t]||(n._events[t]=function(t){var r,e=n._events[t.type].list,u=e.slice(),f=-1,o=u.length;for(t.preventDefault=function(){!1!==t.cancelable&&(t.returnValue=!1)},t.stopPropagation=function(){t.cancelBubble=!0},t.stopImmediatePropagation=function(){t.cancelBubble=!0;t.cancelImmediate=!0},t.currentTarget=n,t.relatedTarget=t.fromElement||null,t.target=t.target||t.srcElement||n,t.timeStamp=(new Date).getTime(),t.clientX&&(t.pageX=t.clientX+document.documentElement.scrollLeft,t.pageY=t.clientY+document.documentElement.scrollTop);++f<o&&!t.cancelImmediate;)f in u&&-1!==i(e,r=u[f])&&"function"==typeof r&&r.call(n,t)},n._events[t].list=[],n.attachEvent&&n.attachEvent("on"+t,n._events[t]));n._events[t].list.push(u)},window.removeEventListener=Window.prototype.removeEventListener=Document.prototype.removeEventListener=Element.prototype.removeEventListener=function(){var r,n=this,t=arguments[0],u=arguments[1];n._events&&n._events[t]&&n._events[t].list&&-1!==(r=i(n._events[t].list,u))&&(n._events[t].list.splice(r,1),n._events[t].list.length||(n.detachEvent&&n.detachEvent("on"+t,n._events[t]),delete n._events[t]))},window.dispatchEvent=Window.prototype.dispatchEvent=Document.prototype.dispatchEvent=Element.prototype.dispatchEvent=function(n){var t,i,r;if(!arguments.length)throw new Error("Not enough arguments");if(!n||"string"!=typeof n.type)throw new Error("DOM Events Exception 0");t=this;i=n.type;try{n.bubbles||(n.cancelBubble=!0,r=function(n){n.cancelBubble=!0;(t||window).detachEvent("on"+i,r)},this.attachEvent("on"+i,r));this.fireEvent("on"+i,n)}catch(u){for(n.target=t;"_events"in(n.currentTarget=t)&&"function"==typeof t._events[i]&&t._events[i].call(t,n),"function"==typeof t["on"+i]&&t["on"+i].call(t,n),(t=9===t.nodeType?t.parentWindow:t.parentNode)&&!n.cancelBubble;);}return!0},document.attachEvent("onreadystatechange",function(){"complete"===document.readyState&&document.dispatchEvent(new Event("DOMContentLoaded",{bubbles:!0}))})))}()}.call("object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||{});o.prototype.handleKeyDown=function(n){var t=n.target;"button"===t.getAttribute("role")&&32===n.keyCode&&(n.preventDefault(),t.click())};o.prototype.debounce=function(n){if("true"===n.target.getAttribute("data-prevent-double-click"))return this.debounceFormSubmitTimer?(n.preventDefault(),!1):void(this.debounceFormSubmitTimer=setTimeout(function(){this.debounceFormSubmitTimer=null}.bind(this),1e3))};o.prototype.init=function(){this.$module.addEventListener("keydown",this.handleKeyDown);this.$module.addEventListener("click",this.debounce)};e.prototype.init=function(){this.$module&&("boolean"==typeof this.$module.open||this.polyfillDetails())};e.prototype.polyfillDetails=function(){var i=this.$module,n=this.$summary=i.getElementsByTagName("summary").item(0),t=this.$content=i.getElementsByTagName("div").item(0);n&&t&&(t.id||(t.id="details-content-"+function(){var n=(new Date).getTime();return"undefined"!=typeof performance&&"function"==typeof window.performance.now&&(n+=window.performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var i=(n+16*Math.random())%16|0;return n=Math.floor(n/16),("x"===t?i:3&i|8).toString(16)})}()),i.setAttribute("role","group"),n.setAttribute("role","button"),n.setAttribute("aria-controls",t.id),!(n.tabIndex=0)==(null!==i.getAttribute("open"))?(n.setAttribute("aria-expanded","true"),t.setAttribute("aria-hidden","false")):(n.setAttribute("aria-expanded","false"),t.setAttribute("aria-hidden","true"),t.style.display="none"),this.polyfillHandleInputs(n,this.polyfillSetAttributes.bind(this)))};e.prototype.polyfillSetAttributes=function(){var n=this.$module,i=this.$summary,t=this.$content,r="true"===i.getAttribute("aria-expanded"),u="true"===t.getAttribute("aria-hidden");return i.setAttribute("aria-expanded",r?"false":"true"),t.setAttribute("aria-hidden",u?"false":"true"),t.style.display=r?"none":"",null!==n.getAttribute("open")?n.removeAttribute("open"):n.setAttribute("open","open"),!0};e.prototype.polyfillHandleInputs=function(n,t){n.addEventListener("keypress",function(n){var i=n.target;13!==n.keyCode&&32!==n.keyCode||"summary"===i.nodeName.toLowerCase()&&(n.preventDefault(),i.click?i.click():t(n))});n.addEventListener("keyup",function(n){var t=n.target;32===n.keyCode&&"summary"===t.nodeName.toLowerCase()&&n.preventDefault()});n.addEventListener("click",t)};u.prototype.defaults={characterCountAttribute:"data-maxlength",wordCountAttribute:"data-maxwords"};u.prototype.init=function(){var n=this.$module,i=this.$textarea,r=this.$countMessage,t;i&&r&&(i.insertAdjacentElement("afterend",r),this.options=this.getDataset(n),t=this.defaults.characterCountAttribute,(this.options.maxwords&&(t=this.defaults.wordCountAttribute),this.maxLength=n.getAttribute(t),this.maxLength)&&(n.removeAttribute("maxlength"),this.bindChangeEvents.bind(this)(),this.updateCountMessage.bind(this)()))};u.prototype.getDataset=function(n){var f={},i=n.attributes,t,r,u;if(i)for(t=0;t<i.length;t++)r=i[t],u=r.name.match(/^data-(.+)/),u&&(f[u[1]]=r.value);return f};u.prototype.count=function(n){return this.options.maxwords?(n.match(/\S+/g)||[]).length:n.length};u.prototype.bindChangeEvents=function(){var n=this.$textarea;n.addEventListener("keyup",this.checkIfValueChanged.bind(this));n.addEventListener("focus",this.handleFocus.bind(this));n.addEventListener("blur",this.handleBlur.bind(this))};u.prototype.checkIfValueChanged=function(){this.$textarea.oldValue||(this.$textarea.oldValue="");this.$textarea.value!==this.$textarea.oldValue&&(this.$textarea.oldValue=this.$textarea.value,this.updateCountMessage.bind(this)())};u.prototype.updateCountMessage=function(){var r=this.$textarea,u=this.options,n=this.$countMessage,f=this.count(r.value),e=this.maxLength,t=e-f,o,s,i;f<e*(u.threshold?u.threshold:0)/100?(n.classList.add("govuk-character-count__message--disabled"),n.setAttribute("aria-hidden",!0)):(n.classList.remove("govuk-character-count__message--disabled"),n.removeAttribute("aria-hidden"));t<0?(r.classList.add("govuk-textarea--error"),n.classList.remove("govuk-hint"),n.classList.add("govuk-error-message")):(r.classList.remove("govuk-textarea--error"),n.classList.remove("govuk-error-message"),n.classList.add("govuk-hint"));i="character";u.maxwords&&(i="word");i+=-1==t||1==t?"":"s";o=t<0?"too many":"remaining";s=Math.abs(t);n.innerHTML="You have "+s+" "+i+" "+o};u.prototype.handleFocus=function(){this.valueChecker=setInterval(this.checkIfValueChanged.bind(this),1e3)};u.prototype.handleBlur=function(){clearInterval(this.valueChecker)};s.prototype.init=function(){var n=this.$module;i(this.$inputs,function(t){var i=t.getAttribute("data-aria-controls");i&&n.querySelector("#"+i)&&(t.setAttribute("aria-controls",i),t.removeAttribute("data-aria-controls"),this.setAttributes(t))}.bind(this));n.addEventListener("click",this.handleClick.bind(this))};s.prototype.setAttributes=function(n){var i=n.checked,t;n.setAttribute("aria-expanded",i);t=this.$module.querySelector("#"+n.getAttribute("aria-controls"));t&&t.classList.toggle("govuk-checkboxes__conditional--hidden",!i)};s.prototype.handleClick=function(n){var t=n.target,i="checkbox"===t.getAttribute("type"),r=t.getAttribute("aria-controls");i&&r&&this.setAttributes(t)},function(){"document"in this&&"matches"in document.documentElement||(Element.prototype.matches=Element.prototype.webkitMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.mozMatchesSelector||function(n){for(var i=(this.document||this.ownerDocument).querySelectorAll(n),t=0;i[t]&&i[t]!==this;)++t;return!!i[t]})}.call("object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||{}),function(){"document"in this&&"closest"in document.documentElement||(Element.prototype.closest=function(n){for(var t=this;t;){if(t.matches(n))return t;t="SVGElement"in window&&t instanceof SVGElement?t.parentNode:t.parentElement}return null})}.call("object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||{});f.prototype.init=function(){var n=this.$module;n&&(n.focus(),n.addEventListener("click",this.handleClick.bind(this)))};f.prototype.handleClick=function(n){var t=n.target;this.focusTarget(t)&&n.preventDefault()};f.prototype.focusTarget=function(n){var r,t,i;return"A"!==n.tagName||!1===n.href?!1:(r=this.getFragmentFromUrl(n.href),t=document.getElementById(r),!t)?!1:(i=this.getAssociatedLegendOrLabel(t),!!i&&(i.scrollIntoView(),t.focus({preventScroll:!0}),!0))};f.prototype.getFragmentFromUrl=function(n){return-1!==n.indexOf("#")&&n.split("#").pop()};f.prototype.getAssociatedLegendOrLabel=function(n){var u=n.closest("fieldset"),i,r,f,t;return u&&(i=u.getElementsByTagName("legend"),i.length&&((r=i[0],"checkbox"===n.type||"radio"===n.type)||(f=r.getBoundingClientRect().top,t=n.getBoundingClientRect(),t.height&&window.innerHeight&&t.top+t.height-f<window.innerHeight/2)))?r:document.querySelector("label[for='"+n.getAttribute("id")+"']")||n.closest("label")};h.prototype.init=function(){var t=this.$module,n;t&&(n=t.querySelector(".govuk-js-header-toggle"),n&&n.addEventListener("click",this.handleClick.bind(this)))};h.prototype.toggleClass=function(n,t){0<n.className.indexOf(t)?n.className=n.className.replace(" "+t,""):n.className+=" "+t};h.prototype.handleClick=function(n){var r=this.$module,t=n.target||n.srcElement,i=r.querySelector("#"+t.getAttribute("aria-controls"));t&&i&&(this.toggleClass(i,"govuk-header__navigation--open"),this.toggleClass(t,"govuk-header__menu-button--open"),t.setAttribute("aria-expanded","true"!==t.getAttribute("aria-expanded")),i.setAttribute("aria-hidden","false"===i.getAttribute("aria-hidden")))};c.prototype.init=function(){var n=this.$module;i(n.querySelectorAll('input[type="radio"]'),function(t){var i=t.getAttribute("data-aria-controls");i&&n.querySelector("#"+i)&&(t.setAttribute("aria-controls",i),t.removeAttribute("data-aria-controls"),this.setAttributes(t))}.bind(this));n.addEventListener("click",this.handleClick.bind(this))};c.prototype.setAttributes=function(n){var t=document.querySelector("#"+n.getAttribute("aria-controls")),i;t&&t.classList.contains("govuk-radios__conditional")&&(i=n.checked,n.setAttribute("aria-expanded",i),t.classList.toggle("govuk-radios__conditional--hidden",!i))};c.prototype.handleClick=function(n){var t=n.target;"radio"===t.type&&i(document.querySelectorAll('input[type="radio"][aria-controls]'),function(n){var i=n.form===t.form;n.name===t.name&&i&&this.setAttributes(n)}.bind(this))},function(){"document"in this&&"nextElementSibling"in document.documentElement||Object.defineProperty(Element.prototype,"nextElementSibling",{get:function(){for(var n=this.nextSibling;n&&1!==n.nodeType;)n=n.nextSibling;return n}})}.call("object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||{}),function(){"document"in this&&"previousElementSibling"in document.documentElement||Object.defineProperty(Element.prototype,"previousElementSibling",{get:function(){for(var n=this.previousSibling;n&&1!==n.nodeType;)n=n.previousSibling;return n}})}.call("object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||{});t.prototype.init=function(){"function"==typeof matchMedia?this.setupResponsiveChecks():this.setup()};t.prototype.setupResponsiveChecks=function(){this.mql=window.matchMedia("(min-width: 40.0625em)");this.mql.addListener(this.checkMode.bind(this));this.checkMode()};t.prototype.checkMode=function(){this.mql.matches?this.setup():this.teardown()};t.prototype.setup=function(){var n=this.$module,t=this.$tabs,r=n.querySelector(".govuk-tabs__list"),u=n.querySelectorAll(".govuk-tabs__list-item"),f;t&&r&&u&&(r.setAttribute("role","tablist"),i(u,function(n){n.setAttribute("role","presentation")}),i(t,function(n){this.setAttributes(n);n.boundTabClick=this.onTabClick.bind(this);n.boundTabKeydown=this.onTabKeydown.bind(this);n.addEventListener("click",n.boundTabClick,!0);n.addEventListener("keydown",n.boundTabKeydown,!0);this.hideTab(n)}.bind(this)),f=this.getTab(window.location.hash)||this.$tabs[0],this.showTab(f),n.boundOnHashChange=this.onHashChange.bind(this),window.addEventListener("hashchange",n.boundOnHashChange,!0))};t.prototype.teardown=function(){var n=this.$module,t=this.$tabs,r=n.querySelector(".govuk-tabs__list"),u=n.querySelectorAll(".govuk-tabs__list-item");t&&r&&u&&(r.removeAttribute("role"),i(u,function(n){n.removeAttribute("role","presentation")}),i(t,function(n){n.removeEventListener("click",n.boundTabClick,!0);n.removeEventListener("keydown",n.boundTabKeydown,!0);this.unsetAttributes(n)}.bind(this)),window.removeEventListener("hashchange",n.boundOnHashChange,!0))};t.prototype.onHashChange=function(){var i=window.location.hash,n=this.getTab(i),t;n&&(this.changingHash?this.changingHash=!1:(t=this.getCurrentTab(),this.hideTab(t),this.showTab(n),n.focus()))};t.prototype.hideTab=function(n){this.unhighlightTab(n);this.hidePanel(n)};t.prototype.showTab=function(n){this.highlightTab(n);this.showPanel(n)};t.prototype.getTab=function(n){return this.$module.querySelector('.govuk-tabs__tab[href="'+n+'"]')};t.prototype.setAttributes=function(n){var i=this.getHref(n).slice(1),t;n.setAttribute("id","tab_"+i);n.setAttribute("role","tab");n.setAttribute("aria-controls",i);n.setAttribute("aria-selected","false");n.setAttribute("tabindex","-1");t=this.getPanel(n);t.setAttribute("role","tabpanel");t.setAttribute("aria-labelledby",n.id);t.classList.add(this.jsHiddenClass)};t.prototype.unsetAttributes=function(n){n.removeAttribute("id");n.removeAttribute("role");n.removeAttribute("aria-controls");n.removeAttribute("aria-selected");n.removeAttribute("tabindex");var t=this.getPanel(n);t.removeAttribute("role");t.removeAttribute("aria-labelledby");t.classList.remove(this.jsHiddenClass)};t.prototype.onTabClick=function(n){if(!n.target.classList.contains("govuk-tabs__tab"))return!1;n.preventDefault();var t=n.target,i=this.getCurrentTab();this.hideTab(i);this.showTab(t);this.createHistoryEntry(t)};t.prototype.createHistoryEntry=function(n){var t=this.getPanel(n),i=t.id;t.id="";this.changingHash=!0;window.location.hash=this.getHref(n).slice(1);t.id=i};t.prototype.onTabKeydown=function(n){switch(n.keyCode){case this.keys.left:case this.keys.up:this.activatePreviousTab();n.preventDefault();break;case this.keys.right:case this.keys.down:this.activateNextTab();n.preventDefault()}};t.prototype.activateNextTab=function(){var t=this.getCurrentTab(),i=t.parentNode.nextElementSibling,n;i&&(n=i.querySelector(".govuk-tabs__tab"));n&&(this.hideTab(t),this.showTab(n),n.focus(),this.createHistoryEntry(n))};t.prototype.activatePreviousTab=function(){var t=this.getCurrentTab(),i=t.parentNode.previousElementSibling,n;i&&(n=i.querySelector(".govuk-tabs__tab"));n&&(this.hideTab(t),this.showTab(n),n.focus(),this.createHistoryEntry(n))};t.prototype.getPanel=function(n){return this.$module.querySelector(this.getHref(n))};t.prototype.showPanel=function(n){this.getPanel(n).classList.remove(this.jsHiddenClass)};t.prototype.hidePanel=function(n){this.getPanel(n).classList.add(this.jsHiddenClass)};t.prototype.unhighlightTab=function(n){n.setAttribute("aria-selected","false");n.parentNode.classList.remove("govuk-tabs__list-item--selected");n.setAttribute("tabindex","-1")};t.prototype.highlightTab=function(n){n.setAttribute("aria-selected","true");n.parentNode.classList.add("govuk-tabs__list-item--selected");n.setAttribute("tabindex","0")};t.prototype.getCurrentTab=function(){return this.$module.querySelector(".govuk-tabs__list-item--selected .govuk-tabs__tab")};t.prototype.getHref=function(n){var t=n.getAttribute("href");return t.slice(t.indexOf("#"),t.length)};n.initAll=function(n){var l="undefined"!=typeof(n=void 0!==n?n:{}).scope?n.scope:document;i(l.querySelectorAll('[data-module="govuk-button"]'),function(n){new o(n).init()});i(l.querySelectorAll('[data-module="govuk-accordion"]'),function(n){new r(n).init()});i(l.querySelectorAll('[data-module="govuk-details"]'),function(n){new e(n).init()});i(l.querySelectorAll('[data-module="govuk-character-count"]'),function(n){new u(n).init()});i(l.querySelectorAll('[data-module="govuk-checkboxes"]'),function(n){new s(n).init()});new f(l.querySelector('[data-module="govuk-error-summary"]')).init();new h(l.querySelector('[data-module="govuk-header"]')).init();i(l.querySelectorAll('[data-module="govuk-radios"]'),function(n){new c(n).init()});i(l.querySelectorAll('[data-module="govuk-tabs"]'),function(n){new t(n).init()})};n.Accordion=r;n.Button=o;n.Details=e;n.CharacterCount=u;n.Checkboxes=s;n.ErrorSummary=f;n.Header=h;n.Radios=c;n.Tabs=t})
function createGoogleAnalytics(){(function(n,t,i,r,u,f,e){n.GoogleAnalyticsObject=u;n[u]=n[u]||function(){(n[u].q=n[u].q||[]).push(arguments)};n[u].l=1*new Date;f=t.createElement(i);e=t.getElementsByTagName(i)[0];f.async=1;f.src=r;e.parentNode.insertBefore(f,e)})(window,document,"script","//www.google-analytics.com/analytics.js","ga");ga("create","UA-43455403-1","auto");ga("send","pageview")}function setGoogleAnalytics(){var n=getCookie("_ga");n||createGoogleAnalytics()}function deleteCookies(n){for(var t in n)document.cookie=n[t]+"=;expires = Thu, 01 Jan 1970 00:00:00 UTC; path=/"}function getCookie(n){for(var t,r=n+"=",f=decodeURIComponent(document.cookie),u=f.split(";"),i=0;i<u.length;i++){for(t=u[i];t.charAt(0)===" ";)t=t.substring(1);if(t.indexOf(r)===0)return t.substring(r.length,t.length)}return""}function setCookies(n){var r=new Date,e=r.getFullYear(),o=r.getMonth(),s=r.getDate(),h=new Date(e+1,o,s).toUTCString(),u="Expires="+h+";",t=!1,i=!1,f;switch(n){case CookieOptionType.UserSettings:t=!0;break;case CookieOptionType.Analytics:i=!0;break;case CookieOptionType.All:t=!0;i=!0}i?setGoogleAnalytics():deleteCookies(["_ga","_gid","_gat"]);t||deleteCookies(["preferredAreas","preferredAreaTypes"]);f={storeUserSettings:t,useAnalytics:i};document.cookie="cookies_policy = "+JSON.stringify(f)+";"+u+"Path =/; SameSite=Lax";document.cookie="cookies_preferences_set=true;"+u+"Path=/; SameSite=Lax"}function handleAcceptAllCookies(){setCookies(CookieOptionType.All);$("#cookies-message-container").hide();$("#cookies-accepted-message-container").show()}function handleSetCookiePreferences(){location.href="/information/site-cookies"}function handleSaveCookiePreferences(){var n=$('input[name="cookies-remember-usage"]:checked').val(),t=$('input[name="cookies-analytics-usage"]:checked').val();n==="on"&&t==="off"?setCookies(CookieOptionType.UserSettings):n==="off"&&t==="on"?setCookies(CookieOptionType.Analytics):n==="on"&&t==="on"?setCookies(CookieOptionType.All):setCookies(CookieOptionType.None);$("#global-cookie-message").hide();$("#cookies-saved-message-container").show();window.scrollTo({top:0,behavior:"smooth"})}function hideCookieContainer(){$("#global-cookie-message").hide()}var CookieOptionType={None:-1,All:0,UserSettings:1,Analytics:2};$(document).ready(function(){$("#cookies-saved-message-container").hide();$("#cookies-accepted-message-container").hide();var t=getCookie("cookies_preferences_set"),n=$("#global-cookie-message");t==="true"?n.hide():n.show()})
"use strict";var AreaTypeIds={District:1,Region:6,Practice:7,County:9,AcuteTrust:14,Country:15,UnitaryAuthority:16,GpShape:18,DeprivationDecile:23,Subregion:46,DistrictUA:101,CountyUA:102,PheCentres2013:103,PheCentres2015:104,OnsClusterGroup2001:110,OnsClusterGroup2011:115,AcuteTrusts:118,Stp:219,CombinedAuthorities:126,CCGPostApr2017:152,CCGPreApr2017:153,CCGSince2018:154,Uk:159,LAUnchanged:160,LANew2019:161,LAObsolete2019:162,CcgSinceApr2019:165,UAUnchanged:170,UANew2019:171,UAObsolete2019:172,UAFutureAreas:173,DistrictUASince2019:201,CountyUASince2019:202,AreaList:3e4},CategoryTypeIds={DeprivationDecileCountyUA2015:39,DeprivationDecileDistrictUA2015:40,HealthProfilesSSILimit:5,DeprivationDecileCCG2010:11,DeprivationDecileGp2015:38,SocioeconomicGroup:59,DeprivationDecileCountyUA2019:113},ValueTypeIds={IndirectlyStandardisedRatio:2,IndirectlyStandardisedRate:4,Ratio:6,Count:7,Score:8,LifeExpectancy:11},NearestNeighbourTypeIds={Cipfa2018:1,Cipfa2019:7},ComparatorMethodIds={SingleOverlappingCIsForOneCiLevel:1,SuicidePlan:14,Quintiles:15,Quartiles:16,SingleOverlappingCIsForTwoCiLevels:17},PolarityIds={NotApplicable:-1,RAGLowIsGood:0,RAGHighIsGood:1,BlueOrangeBlue:99},SexIds={Male:1,Female:2,Person:4},AgeIds={AllAges:1},ProfileIds={SearchResults:13,Tobacco:18,Phof:19,PracticeProfiles:20,Mortality:22,HealthProfiles:26,CommonMentalHealthDisorders:40,SevereMentalIllness:41,CommunityMentalHealth:50,Diabetes:51,Liver:55,Hypertension:67,Cancer:71,Suicide:73,DrugsAndAlcohol:75,HealthChecks:77,Dementia:84,SuicidePrevention:91,ChiMatWAY:94,MentalHealthJsna:98,ChildHealth:105,ChildHealthBehaviours:129,ChildrenYoungPeoplesWellBeing:133,PublicHealthDashboard:140},TrendMarkerValue={Up:1,Down:2,NoChange:3,CannotCalculate:4},ValueNoteIds={DataQualityIssue:401},IndicatorIds={Deprivation:338,SuicidePlan:92607,LarcPrescribed:92254,LivingInAqmas:93384},GroupIds={PracticeProfiles:{Population:1200006},HealthChecks:{HealthCheck:1938132782,DiseaseAndDeath:1938132785},Diabetes:{Complications:1938132699},DrugsAndAlcohol:{PrevalenceAndRisks:1938132771,TreatmentAndRecovery:1938132772},Cancer:{IncidenceAndMortality:1938132749},Suicide:{SuicideData:1938132762}}
"use strict";function isDefined(n){return!_.isUndefined(n)&&n!==null}function ajaxGet(n,t,i,r){var u,f;isDefined(r)||(r=function(n){unlock();ajaxError(n)});u=n+t;ajaxCache.hasOwnProperty(u)?i(ajaxCache[u]):(f={type:"GET",url:FT.url.bridge+n,data:t+"&v="+FT.version,cache:!0,contentType:"application/json; charset=utf-8",success:function(n){ajaxCache[u]=n;i(n)},dataType:"json",error:r},$.ajax(f))}function roundNumber(n,t){return Math.round(n*Math.pow(10,t))/Math.pow(10,t)}function ajaxError(n){ajaxMonitor.registerError(n)}function logError(n){var t="serviceAction=ex&errorMessage="+n.statusText+"&errorStatus="+n.status,i={type:"POST",url:FT.url.bridge+"log/exception?"+t,cache:!1,contentType:"application/json; charset=utf-8"};$.ajax(i)}function setUrl(n){window.location.href=n}function ParameterBuilder(){var n=[],t=[];this.add=function(i,r){return n.push(i),_.isArray(r)&&(r=r.join(",")),t.push(r),this};this.build=function(){var i=[];for(var r in n)r>0&&i.push("&"),i.push(n[r],"=",t[r]);return i.join("")};this.setNotToCache=function(){return this.add("no_cache",(new Date).getTime()),this}}function sortNumericAsc(n,t){return n-t}function logEvent(n,t,i){if(typeof ga!="undefined"){var r="send",u="event";i?ga(r,u,n,t,i):ga(r,u,n,t)}}function browserUpgradeMessage(){alert("Sorry this feature is not available for your browser. Please upgrade or use an alternative.")}function openFeedback(){return $("#footer-feedback").hide(),$("#footer-feedback-form").show(),$("#what-were-you-doing").focus(),!1}function closeFeedback(){return $("#footer-feedback").show(),$("#footer-feedback-form").hide(),clearFeedbackForm(),!1}function sendFeedback(){var n=$("#what-were-you-doing").val(),t=$("#what-went-wrong").val(),u=$("#email-for-user-feedback").val(),i,r;return n===""&&t===""?($("#footer-feedback-error-summary").html('<div class="alert alert-warning">Please tell us what went wrong?<\/div>'),!1):(i={url:window.location.href,whatUserWasDoing:n,whatWentWrong:t,email:u},r="/user_feedback",$.post(r,i).success(function(){$("#footer-feedback").show();$("#footer-feedback-form").hide();clearFeedbackForm();$("#feedback-message").html('<div style="color:white;">Thank you for your feedback<\/div>')}).error(function(){$("#footer-feedback-error-summary").html('<div class="alert alert-danger">Sorry, we are unable to receive your message right now.<\/div>')}),!1)}function clearFeedbackForm(){$("#user-feedback-form").each(function(){this.reset()})}function SendPostForm(n,t,i){var r,f,u;i=i||"post";r=document.createElement("form");r.setAttribute("method",i);r.setAttribute("action",n);for(f in t)t.hasOwnProperty(f)&&(u=document.createElement("input"),u.setAttribute("type","hidden"),u.setAttribute("name",f),u.setAttribute("value",t[f]),r.appendChild(u));document.body.appendChild(r);r.submit()}var ajaxCache,ajaxMonitor,ftHistory;String.isNullOrEmpty=function(n){return n===null||n===""};ajaxCache={};ajaxMonitor={count:0,errors:0,state:null,setCalls:function(n){var t=this;t.count=n;t.errors=0;t.state={}},setState:function(n){this.state=n},callCompleted:function(){this.count--},registerError:function(n){logError(n);this.errors++;this.callCompleted()},monitor:function(n){var t=this;t.errors=0;t.count===0?n():(t.fnFinished=n,t._pause())},_pause:function(){setTimeout("ajaxMonitor.checkCompleted()",10)},checkCompleted:function(){var n=this,t;n.count===0?n.fnFinished!==null&&(t=n.fnFinished,n.fnFinished=null,n.errors>0?handleAjaxFailure():t()):n._pause()},fnFinished:null};ftHistory=function(){var n=0,t,r="hashchange",i=window.location;return{getHash:function(){var n=i.href.split("#");return n.length===2?n[1]:null},init:function(n){t=n;$(window).bind(r,function(){ftHistory.hashChanged()})},setHistory:function(){n=1;i.hash=t.toString()},isParameterDefinedInHash:function(n){var t=this.getKeyValuePairsFromHash();return!!t[n]},getKeyValuePairsFromHash:function(){var n=this.getHash();return this.parseParameterString(n)},parseParameterString:function(n){var f={},i,t,r,u;if(n)for(i=n.split(/[/,]/),t=0;t<i.length;t++)r=i[t],r&&r!==""&&(u=i[t+1],u&&u!==""&&(f[r]=u)),t++;return f},hashChanged:function(){if(n){n--;n<0&&(n=0);return}FT.ajaxLock||lock();t.restore()},increaseBlock:function(){n++}}}();typeof console=="undefined"&&(console={log:function(){}})
