if(function(n,t){typeof module=="object"&&typeof module.exports=="object"?module.exports=n.document?t(n,!0):function(n){if(!n.document)throw new Error("jQuery requires a window with a document");return t(n)}:t(n)}(typeof window!="undefined"?window:this,function(n,t){function ii(n){var t=!!n&&"length"in n&&n.length,r=i.type(n);return r==="function"||i.isWindow(n)?!1:r==="array"||t===0||typeof t=="number"&&t>0&&t-1 in n}function ri(n,t,r){if(i.isFunction(t))return i.grep(n,function(n,i){return!!t.call(n,i,n)!==r});if(t.nodeType)return i.grep(n,function(n){return n===t!==r});if(typeof t=="string"){if(bf.test(t))return i.filter(t,n,r);t=i.filter(t,n)}return i.grep(n,function(n){return lt.call(t,n)>-1!==r})}function hr(n,t){while((n=n[t])&&n.nodeType!==1);return n}function kf(n){var t={};return i.each(n.match(h)||[],function(n,i){t[i]=!0}),t}function yt(){u.removeEventListener("DOMContentLoaded",yt);n.removeEventListener("load",yt);i.ready()}function et(){this.expando=i.expando+et.uid++}function lr(n,t,r){var u;if(r===undefined&&n.nodeType===1)if(u="data-"+t.replace(cr,"-$&").toLowerCase(),r=n.getAttribute(u),typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:df.test(r)?i.parseJSON(r):r}catch(f){}e.set(n,t,r)}else r=undefined;return r}function vr(n,t,r,u){var h,e=1,l=20,c=u?function(){return u.cur()}:function(){return i.css(n,t,"")},s=c(),o=r&&r[3]||(i.cssNumber[t]?"":"px"),f=(i.cssNumber[t]||o!=="px"&&+s)&&ot.exec(i.css(n,t));if(f&&f[3]!==o){o=o||f[3];r=r||[];f=+s||1;do e=e||".5",f=f/e,i.style(n,t,f+o);while(e!==(e=c()/s)&&e!==1&&--l)}return r&&(f=+f||+s||0,h=r[1]?f+(r[1]+1)*r[2]:+r[2],u&&(u.unit=o,u.start=f,u.end=h)),h}function o(n,t){var r=typeof n.getElementsByTagName!="undefined"?n.getElementsByTagName(t||"*"):typeof n.querySelectorAll!="undefined"?n.querySelectorAll(t||"*"):[];return t===undefined||t&&i.nodeName(n,t)?i.merge([n],r):r}function ui(n,t){for(var i=0,u=n.length;i<u;i++)r.set(n[i],"globalEval",!t||r.get(t[i],"globalEval"))}function kr(n,t,r,u,f){for(var e,s,p,a,w,v,h=t.createDocumentFragment(),y=[],l=0,b=n.length;l<b;l++)if(e=n[l],e||e===0)if(i.type(e)==="object")i.merge(y,e.nodeType?[e]:e);else if(br.test(e)){for(s=s||h.appendChild(t.createElement("div")),p=(pr.exec(e)||["",""])[1].toLowerCase(),a=c[p]||c._default,s.innerHTML=a[1]+i.htmlPrefilter(e)+a[2],v=a[0];v--;)s=s.lastChild;i.merge(y,s.childNodes);s=h.firstChild;s.textContent=""}else y.push(t.createTextNode(e));for(h.textContent="",l=0;e=y[l++];){if(u&&i.inArray(e,u)>-1){f&&f.push(e);continue}if(w=i.contains(e.ownerDocument,e),s=o(h.appendChild(e),"script"),w&&ui(s),r)for(v=0;e=s[v++];)wr.test(e.type||"")&&r.push(e)}return h}function pt(){return!0}function nt(){return!1}function gr(){try{return u.activeElement}catch(n){}}function fi(n,t,r,u,f,e){var o,s;if(typeof t=="object"){typeof r!="string"&&(u=u||r,r=undefined);for(s in t)fi(n,s,r,u,t[s],e);return n}if(u==null&&f==null?(f=r,u=r=undefined):f==null&&(typeof r=="string"?(f=u,u=undefined):(f=u,u=r,r=undefined)),f===!1)f=nt;else if(!f)return n;return e===1&&(o=f,f=function(n){return i().off(n),o.apply(this,arguments)},f.guid=o.guid||(o.guid=i.guid++)),n.each(function(){i.event.add(this,t,f,u,r)})}function nu(n,t){return i.nodeName(n,"table")&&i.nodeName(t.nodeType!==11?t:t.firstChild,"tr")?n.getElementsByTagName("tbody")[0]||n.appendChild(n.ownerDocument.createElement("tbody")):n}function ee(n){return n.type=(n.getAttribute("type")!==null)+"/"+n.type,n}function oe(n){var t=ue.exec(n.type);return t?n.type=t[1]:n.removeAttribute("type"),n}function tu(n,t){var f,c,o,s,h,l,a,u;if(t.nodeType===1){if(r.hasData(n)&&(s=r.access(n),h=r.set(t,s),u=s.events,u)){delete h.handle;h.events={};for(o in u)for(f=0,c=u[o].length;f<c;f++)i.event.add(t,o,u[o][f])}e.hasData(n)&&(l=e.access(n),a=i.extend({},l),e.set(t,a))}}function se(n,t){var i=t.nodeName.toLowerCase();i==="input"&&yr.test(n.type)?t.checked=n.checked:(i==="input"||i==="textarea")&&(t.defaultValue=n.defaultValue)}function b(n,t,u,e){t=gi.apply([],t);var l,p,c,a,s,w,h=0,v=n.length,d=v-1,y=t[0],k=i.isFunction(y);if(k||v>1&&typeof y=="string"&&!f.checkClone&&re.test(y))return n.each(function(i){var r=n.eq(i);k&&(t[0]=y.call(this,i,r.html()));b(r,t,u,e)});if(v&&(l=kr(t,n[0].ownerDocument,!1,n,e),p=l.firstChild,l.childNodes.length===1&&(l=p),p||e)){for(c=i.map(o(l,"script"),ee),a=c.length;h<v;h++)s=l,h!==d&&(s=i.clone(s,!0,!0),a&&i.merge(c,o(s,"script"))),u.call(n[h],s,h);if(a)for(w=c[c.length-1].ownerDocument,i.map(c,oe),h=0;h<a;h++)s=c[h],wr.test(s.type||"")&&!r.access(s,"globalEval")&&i.contains(w,s)&&(s.src?i._evalUrl&&i._evalUrl(s.src):i.globalEval(s.textContent.replace(fe,"")))}return n}function iu(n,t,r){for(var u,e=t?i.filter(t,n):n,f=0;(u=e[f])!=null;f++)r||u.nodeType!==1||i.cleanData(o(u)),u.parentNode&&(r&&i.contains(u.ownerDocument,u)&&ui(o(u,"script")),u.parentNode.removeChild(u));return n}function ru(n,t){var r=i(t.createElement(n)).appendTo(t.body),u=i.css(r[0],"display");return r.detach(),u}function oi(n){var r=u,t=ei[n];return t||(t=ru(n,r),t!=="none"&&t||(wt=(wt||i("<iframe frameborder='0' width='0' height='0'/>")).appendTo(r.documentElement),r=wt[0].contentDocument,r.write(),r.close(),t=ru(n,r),wt.detach()),ei[n]=t),t}function tt(n,t,r){var o,s,h,u,e=n.style;return r=r||bt(n),u=r?r.getPropertyValue(t)||r[t]:undefined,u!==""&&u!==undefined||i.contains(n.ownerDocument,n)||(u=i.style(n,t)),r&&!f.pixelMarginRight()&&si.test(u)&&uu.test(t)&&(o=e.width,s=e.minWidth,h=e.maxWidth,e.minWidth=e.maxWidth=e.width=u,u=r.width,e.width=o,e.minWidth=s,e.maxWidth=h),u!==undefined?u+"":u}function ci(n,t){return{get:function(){if(n()){delete this.get;return}return(this.get=t).apply(this,arguments)}}}function su(n){if(n in ou)return n;for(var i=n[0].toUpperCase()+n.slice(1),t=eu.length;t--;)if(n=eu[t]+i,n in ou)return n}function hu(n,t,i){var r=ot.exec(t);return r?Math.max(0,r[2]-(i||0))+(r[3]||"px"):t}function cu(n,t,r,u,f){for(var e=r===(u?"border":"content")?4:t==="width"?1:0,o=0;e<4;e+=2)r==="margin"&&(o+=i.css(n,r+w[e],!0,f)),u?(r==="content"&&(o-=i.css(n,"padding"+w[e],!0,f)),r!=="margin"&&(o-=i.css(n,"border"+w[e]+"Width",!0,f))):(o+=i.css(n,"padding"+w[e],!0,f),r!=="padding"&&(o+=i.css(n,"border"+w[e]+"Width",!0,f)));return o}function lu(n,t,r){var o=!0,u=t==="width"?n.offsetWidth:n.offsetHeight,e=bt(n),s=i.css(n,"boxSizing",!1,e)==="border-box";if(u<=0||u==null){if(u=tt(n,t,e),(u<0||u==null)&&(u=n.style[t]),si.test(u))return u;o=s&&(f.boxSizingReliable()||u===n.style[t]);u=parseFloat(u)||0}return u+cu(n,t,r||(s?"border":"content"),o,e)+"px"}function au(n,t){for(var e,u,s,o=[],f=0,h=n.length;f<h;f++)(u=n[f],u.style)&&(o[f]=r.get(u,"olddisplay"),e=u.style.display,t?(o[f]||e!=="none"||(u.style.display=""),u.style.display===""&&st(u)&&(o[f]=r.access(u,"olddisplay",oi(u.nodeName)))):(s=st(u),e==="none"&&s||r.set(u,"olddisplay",s?e:i.css(u,"display"))));for(f=0;f<h;f++)(u=n[f],u.style)&&(t&&u.style.display!=="none"&&u.style.display!==""||(u.style.display=t?o[f]||"":"none"));return n}function s(n,t,i,r,u){return new s.prototype.init(n,t,i,r,u)}function pu(){return n.setTimeout(function(){it=undefined}),it=i.now()}function dt(n,t){var r,u=0,i={height:n};for(t=t?1:0;u<4;u+=2-t)r=w[u],i["margin"+r]=i["padding"+r]=n;return t&&(i.opacity=i.width=n),i}function wu(n,t,i){for(var u,f=(l.tweeners[t]||[]).concat(l.tweeners["*"]),r=0,e=f.length;r<e;r++)if(u=f[r].call(i,t,n))return u}function le(n,t,u){var f,a,p,v,o,w,h,b,l=this,y={},s=n.style,c=n.nodeType&&st(n),e=r.get(n,"fxshow");u.queue||(o=i._queueHooks(n,"fx"),o.unqueued==null&&(o.unqueued=0,w=o.empty.fire,o.empty.fire=function(){o.unqueued||w()}),o.unqueued++,l.always(function(){l.always(function(){o.unqueued--;i.queue(n,"fx").length||o.empty.fire()})}));n.nodeType===1&&("height"in t||"width"in t)&&(u.overflow=[s.overflow,s.overflowX,s.overflowY],h=i.css(n,"display"),b=h==="none"?r.get(n,"olddisplay")||oi(n.nodeName):h,b==="inline"&&i.css(n,"float")==="none"&&(s.display="inline-block"));u.overflow&&(s.overflow="hidden",l.always(function(){s.overflow=u.overflow[0];s.overflowX=u.overflow[1];s.overflowY=u.overflow[2]}));for(f in t)if(a=t[f],vu.exec(a)){if(delete t[f],p=p||a==="toggle",a===(c?"hide":"show"))if(a==="show"&&e&&e[f]!==undefined)c=!0;else continue;y[f]=e&&e[f]||i.style(n,f)}else h=undefined;if(i.isEmptyObject(y))(h==="none"?oi(n.nodeName):h)==="inline"&&(s.display=h);else{e?"hidden"in e&&(c=e.hidden):e=r.access(n,"fxshow",{});p&&(e.hidden=!c);c?i(n).show():l.done(function(){i(n).hide()});l.done(function(){var t;r.remove(n,"fxshow");for(t in y)i.style(n,t,y[t])});for(f in y)v=wu(c?e[f]:0,f,l),f in e||(e[f]=v.start,c&&(v.end=v.start,v.start=f==="width"||f==="height"?1:0))}}function ae(n,t){var r,f,e,u,o;for(r in n)if(f=i.camelCase(r),e=t[f],u=n[r],i.isArray(u)&&(e=u[1],u=n[r]=u[0]),r!==f&&(n[f]=u,delete n[r]),o=i.cssHooks[f],o&&"expand"in o){u=o.expand(u);delete n[f];for(r in u)r in n||(n[r]=u[r],t[r]=e)}else t[f]=e}function l(n,t,r){var f,o,s=0,a=l.prefilters.length,e=i.Deferred().always(function(){delete c.elem}),c=function(){if(o)return!1;for(var s=it||pu(),t=Math.max(0,u.startTime+u.duration-s),h=t/u.duration||0,i=1-h,r=0,f=u.tweens.length;r<f;r++)u.tweens[r].run(i);return e.notifyWith(n,[u,i,t]),i<1&&f?t:(e.resolveWith(n,[u]),!1)},u=e.promise({elem:n,props:i.extend({},t),opts:i.extend(!0,{specialEasing:{},easing:i.easing._default},r),originalProperties:t,originalOptions:r,startTime:it||pu(),duration:r.duration,tweens:[],createTween:function(t,r){var f=i.Tween(n,u.opts,t,r,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(f),f},stop:function(t){var i=0,r=t?u.tweens.length:0;if(o)return this;for(o=!0;i<r;i++)u.tweens[i].run(1);return t?(e.notifyWith(n,[u,1,0]),e.resolveWith(n,[u,t])):e.rejectWith(n,[u,t]),this}}),h=u.props;for(ae(h,u.opts.specialEasing);s<a;s++)if(f=l.prefilters[s].call(u,n,h,u.opts),f)return i.isFunction(f.stop)&&(i._queueHooks(u.elem,u.opts.queue).stop=i.proxy(f.stop,f)),f;return i.map(h,wu,u),i.isFunction(u.opts.start)&&u.opts.start.call(n,u),i.fx.timer(i.extend(c,{elem:n,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function k(n){return n.getAttribute&&n.getAttribute("class")||""}function ff(n){return function(t,r){typeof t!="string"&&(r=t,t="*");var u,f=0,e=t.toLowerCase().match(h)||[];if(i.isFunction(r))while(u=e[f++])u[0]==="+"?(u=u.slice(1)||"*",(n[u]=n[u]||[]).unshift(r)):(n[u]=n[u]||[]).push(r)}}function ef(n,t,r,u){function e(s){var h;return f[s]=!0,i.each(n[s]||[],function(n,i){var s=i(t,r,u);if(typeof s!="string"||o||f[s]){if(o)return!(h=s)}else return t.dataTypes.unshift(s),e(s),!1}),h}var f={},o=n===yi;return e(t.dataTypes[0])||!f["*"]&&e("*")}function wi(n,t){var r,u,f=i.ajaxSettings.flatOptions||{};for(r in t)t[r]!==undefined&&((f[r]?n:u||(u={}))[r]=t[r]);return u&&i.extend(!0,n,u),n}function be(n,t,i){for(var e,u,f,o,s=n.contents,r=n.dataTypes;r[0]==="*";)r.shift(),e===undefined&&(e=n.mimeType||t.getResponseHeader("Content-Type"));if(e)for(u in s)if(s[u]&&s[u].test(e)){r.unshift(u);break}if(r[0]in i)f=r[0];else{for(u in i){if(!r[0]||n.converters[u+" "+r[0]]){f=u;break}o||(o=u)}f=f||o}if(f)return f!==r[0]&&r.unshift(f),i[f]}function ke(n,t,i,r){var h,u,f,s,e,o={},c=n.dataTypes.slice();if(c[1])for(f in n.converters)o[f.toLowerCase()]=n.converters[f];for(u=c.shift();u;)if(n.responseFields[u]&&(i[n.responseFields[u]]=t),!e&&r&&n.dataFilter&&(t=n.dataFilter(t,n.dataType)),e=u,u=c.shift(),u)if(u==="*")u=e;else if(e!=="*"&&e!==u){if(f=o[e+" "+u]||o["* "+u],!f)for(h in o)if(s=h.split(" "),s[1]===u&&(f=o[e+" "+s[0]]||o["* "+s[0]],f)){f===!0?f=o[h]:o[h]!==!0&&(u=s[0],c.unshift(s[1]));break}if(f!==!0)if(f&&n.throws)t=f(t);else try{t=f(t)}catch(l){return{state:"parsererror",error:f?l:"No conversion from "+e+" to "+u}}}return{state:"success",data:t}}function bi(n,t,r,u){var f;if(i.isArray(t))i.each(t,function(t,i){r||ge.test(n)?u(n,i):bi(n+"["+(typeof i=="object"&&i!=null?t:"")+"]",i,r,u)});else if(r||i.type(t)!=="object")u(n,t);else for(f in t)bi(n+"["+f+"]",t[f],r,u)}function hf(n){return i.isWindow(n)?n:n.nodeType===9&&n.defaultView}var y=[],u=n.document,v=y.slice,gi=y.concat,ti=y.push,lt=y.indexOf,at={},af=at.toString,ft=at.hasOwnProperty,f={},nr="2.2.4",i=function(n,t){return new i.fn.init(n,t)},vf=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,yf=/^-ms-/,pf=/-([\da-z])/gi,wf=function(n,t){return t.toUpperCase()},p,ur,fr,er,or,sr,h,vt,a,g,br,wt,ei,it,kt,vu,yu,bu,rt,ku,du,gt,gu,nf,li,sf,ut,ki,ni,di,cf,lf;i.fn=i.prototype={jquery:nr,constructor:i,selector:"",length:0,toArray:function(){return v.call(this)},get:function(n){return n!=null?n<0?this[n+this.length]:this[n]:v.call(this)},pushStack:function(n){var t=i.merge(this.constructor(),n);return t.prevObject=this,t.context=this.context,t},each:function(n){return i.each(this,n)},map:function(n){return this.pushStack(i.map(this,function(t,i){return n.call(t,i,t)}))},slice:function(){return this.pushStack(v.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(n){var i=this.length,t=+n+(n<0?i:0);return this.pushStack(t>=0&&t<i?[this[t]]:[])},end:function(){return this.prevObject||this.constructor()},push:ti,sort:y.sort,splice:y.splice};i.extend=i.fn.extend=function(){var e,f,r,t,o,s,n=arguments[0]||{},u=1,c=arguments.length,h=!1;for(typeof n=="boolean"&&(h=n,n=arguments[u]||{},u++),typeof n=="object"||i.isFunction(n)||(n={}),u===c&&(n=this,u--);u<c;u++)if((e=arguments[u])!=null)for(f in e)(r=n[f],t=e[f],n!==t)&&(h&&t&&(i.isPlainObject(t)||(o=i.isArray(t)))?(o?(o=!1,s=r&&i.isArray(r)?r:[]):s=r&&i.isPlainObject(r)?r:{},n[f]=i.extend(h,s,t)):t!==undefined&&(n[f]=t));return n};i.extend({expando:"jQuery"+(nr+Math.random()).replace(/\D/g,""),isReady:!0,error:function(n){throw new Error(n);},noop:function(){},isFunction:function(n){return i.type(n)==="function"},isArray:Array.isArray,isWindow:function(n){return n!=null&&n===n.window},isNumeric:function(n){var t=n&&n.toString();return!i.isArray(n)&&t-parseFloat(t)+1>=0},isPlainObject:function(n){var t;if(i.type(n)!=="object"||n.nodeType||i.isWindow(n)||n.constructor&&!ft.call(n,"constructor")&&!ft.call(n.constructor.prototype||{},"isPrototypeOf"))return!1;for(t in n);return t===undefined||ft.call(n,t)},isEmptyObject:function(n){var t;for(t in n)return!1;return!0},type:function(n){return n==null?n+"":typeof n=="object"||typeof n=="function"?at[af.call(n)]||"object":typeof n},globalEval:function(n){var t,r=eval;n=i.trim(n);n&&(n.indexOf("use strict")===1?(t=u.createElement("script"),t.text=n,u.head.appendChild(t).parentNode.removeChild(t)):r(n))},camelCase:function(n){return n.replace(yf,"ms-").replace(pf,wf)},nodeName:function(n,t){return n.nodeName&&n.nodeName.toLowerCase()===t.toLowerCase()},each:function(n,t){var r,i=0;if(ii(n)){for(r=n.length;i<r;i++)if(t.call(n[i],i,n[i])===!1)break}else for(i in n)if(t.call(n[i],i,n[i])===!1)break;return n},trim:function(n){return n==null?"":(n+"").replace(vf,"")},makeArray:function(n,t){var r=t||[];return n!=null&&(ii(Object(n))?i.merge(r,typeof n=="string"?[n]:n):ti.call(r,n)),r},inArray:function(n,t,i){return t==null?-1:lt.call(t,n,i)},merge:function(n,t){for(var u=+t.length,i=0,r=n.length;i<u;i++)n[r++]=t[i];return n.length=r,n},grep:function(n,t,i){for(var u,f=[],r=0,e=n.length,o=!i;r<e;r++)u=!t(n[r],r),u!==o&&f.push(n[r]);return f},map:function(n,t,i){var e,u,r=0,f=[];if(ii(n))for(e=n.length;r<e;r++)u=t(n[r],r,i),u!=null&&f.push(u);else for(r in n)u=t(n[r],r,i),u!=null&&f.push(u);return gi.apply([],f)},guid:1,proxy:function(n,t){var u,f,r;return(typeof t=="string"&&(u=n[t],t=n,n=u),!i.isFunction(n))?undefined:(f=v.call(arguments,2),r=function(){return n.apply(t||this,f.concat(v.call(arguments)))},r.guid=n.guid=n.guid||i.guid++,r)},now:Date.now,support:f});typeof Symbol=="function"&&(i.fn[Symbol.iterator]=y[Symbol.iterator]);i.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(n,t){at["[object "+t+"]"]=t.toLowerCase()});p=function(n){function u(n,t,r,u){var l,w,a,s,nt,d,y,g,p=t&&t.ownerDocument,v=t?t.nodeType:9;if(r=r||[],typeof n!="string"||!n||v!==1&&v!==9&&v!==11)return r;if(!u&&((t?t.ownerDocument||t:c)!==i&&b(t),t=t||i,h)){if(v!==11&&(d=sr.exec(n)))if(l=d[1]){if(v===9)if(a=t.getElementById(l)){if(a.id===l)return r.push(a),r}else return r;else if(p&&(a=p.getElementById(l))&&et(t,a)&&a.id===l)return r.push(a),r}else{if(d[2])return k.apply(r,t.getElementsByTagName(n)),r;if((l=d[3])&&f.getElementsByClassName&&t.getElementsByClassName)return k.apply(r,t.getElementsByClassName(l)),r}if(f.qsa&&!lt[n+" "]&&(!o||!o.test(n))){if(v!==1)p=t,g=n;else if(t.nodeName.toLowerCase()!=="object"){for((s=t.getAttribute("id"))?s=s.replace(hr,"\\$&"):t.setAttribute("id",s=e),y=ft(n),w=y.length,nt=yi.test(s)?"#"+s:"[id='"+s+"']";w--;)y[w]=nt+" "+yt(y[w]);g=y.join(",");p=gt.test(n)&&ii(t.parentNode)||t}if(g)try{return k.apply(r,p.querySelectorAll(g)),r}catch(tt){}finally{s===e&&t.removeAttribute("id")}}}return si(n.replace(at,"$1"),t,r,u)}function ni(){function n(r,u){return i.push(r+" ")>t.cacheLength&&delete n[i.shift()],n[r+" "]=u}var i=[];return n}function l(n){return n[e]=!0,n}function a(n){var t=i.createElement("div");try{return!!n(t)}catch(r){return!1}finally{t.parentNode&&t.parentNode.removeChild(t);t=null}}function ti(n,i){for(var r=n.split("|"),u=r.length;u--;)t.attrHandle[r[u]]=i}function wi(n,t){var i=t&&n,r=i&&n.nodeType===1&&t.nodeType===1&&(~t.sourceIndex||li)-(~n.sourceIndex||li);if(r)return r;if(i)while(i=i.nextSibling)if(i===t)return-1;return n?1:-1}function cr(n){return function(t){var i=t.nodeName.toLowerCase();return i==="input"&&t.type===n}}function lr(n){return function(t){var i=t.nodeName.toLowerCase();return(i==="input"||i==="button")&&t.type===n}}function it(n){return l(function(t){return t=+t,l(function(i,r){for(var u,f=n([],i.length,t),e=f.length;e--;)i[u=f[e]]&&(i[u]=!(r[u]=i[u]))})})}function ii(n){return n&&typeof n.getElementsByTagName!="undefined"&&n}function bi(){}function yt(n){for(var t=0,r=n.length,i="";t<r;t++)i+=n[t].value;return i}function ri(n,t,i){var r=t.dir,u=i&&r==="parentNode",f=ki++;return t.first?function(t,i,f){while(t=t[r])if(t.nodeType===1||u)return n(t,i,f)}:function(t,i,o){var s,h,c,l=[v,f];if(o){while(t=t[r])if((t.nodeType===1||u)&&n(t,i,o))return!0}else while(t=t[r])if(t.nodeType===1||u){if(c=t[e]||(t[e]={}),h=c[t.uniqueID]||(c[t.uniqueID]={}),(s=h[r])&&s[0]===v&&s[1]===f)return l[2]=s[2];if(h[r]=l,l[2]=n(t,i,o))return!0}}}function ui(n){return n.length>1?function(t,i,r){for(var u=n.length;u--;)if(!n[u](t,i,r))return!1;return!0}:n[0]}function ar(n,t,i){for(var r=0,f=t.length;r<f;r++)u(n,t[r],i);return i}function pt(n,t,i,r,u){for(var e,o=[],f=0,s=n.length,h=t!=null;f<s;f++)(e=n[f])&&(!i||i(e,r,u))&&(o.push(e),h&&t.push(f));return o}function fi(n,t,i,r,u,f){return r&&!r[e]&&(r=fi(r)),u&&!u[e]&&(u=fi(u,f)),l(function(f,e,o,s){var l,c,a,p=[],y=[],w=e.length,b=f||ar(t||"*",o.nodeType?[o]:o,[]),v=n&&(f||!t)?pt(b,p,n,o,s):b,h=i?u||(f?n:w||r)?[]:e:v;if(i&&i(v,h,o,s),r)for(l=pt(h,y),r(l,[],o,s),c=l.length;c--;)(a=l[c])&&(h[y[c]]=!(v[y[c]]=a));if(f){if(u||n){if(u){for(l=[],c=h.length;c--;)(a=h[c])&&l.push(v[c]=a);u(null,h=[],l,s)}for(c=h.length;c--;)(a=h[c])&&(l=u?nt(f,a):p[c])>-1&&(f[l]=!(e[l]=a))}}else h=pt(h===e?h.splice(w,h.length):h),u?u(null,e,h,s):k.apply(e,h)})}function ei(n){for(var o,u,r,s=n.length,h=t.relative[n[0].type],c=h||t.relative[" "],i=h?1:0,l=ri(function(n){return n===o},c,!0),a=ri(function(n){return nt(o,n)>-1},c,!0),f=[function(n,t,i){var r=!h&&(i||t!==ht)||((o=t).nodeType?l(n,t,i):a(n,t,i));return o=null,r}];i<s;i++)if(u=t.relative[n[i].type])f=[ri(ui(f),u)];else{if(u=t.filter[n[i].type].apply(null,n[i].matches),u[e]){for(r=++i;r<s;r++)if(t.relative[n[r].type])break;return fi(i>1&&ui(f),i>1&&yt(n.slice(0,i-1).concat({value:n[i-2].type===" "?"*":""})).replace(at,"$1"),u,i<r&&ei(n.slice(i,r)),r<s&&ei(n=n.slice(r)),r<s&&yt(n))}f.push(u)}return ui(f)}function vr(n,r){var f=r.length>0,e=n.length>0,o=function(o,s,c,l,a){var y,nt,d,g=0,p="0",tt=o&&[],w=[],it=ht,rt=o||e&&t.find.TAG("*",a),ut=v+=it==null?1:Math.random()||.1,ft=rt.length;for(a&&(ht=s===i||s||a);p!==ft&&(y=rt[p])!=null;p++){if(e&&y){for(nt=0,s||y.ownerDocument===i||(b(y),c=!h);d=n[nt++];)if(d(y,s||i,c)){l.push(y);break}a&&(v=ut)}f&&((y=!d&&y)&&g--,o&&tt.push(y))}if(g+=p,f&&p!==g){for(nt=0;d=r[nt++];)d(tt,w,s,c);if(o){if(g>0)while(p--)tt[p]||w[p]||(w[p]=gi.call(l));w=pt(w)}k.apply(l,w);a&&!o&&w.length>0&&g+r.length>1&&u.uniqueSort(l)}return a&&(v=ut,ht=it),tt};return f?l(o):o}var rt,f,t,st,oi,ft,wt,si,ht,w,ut,b,i,s,h,o,d,ct,et,e="sizzle"+1*new Date,c=n.document,v=0,ki=0,hi=ni(),ci=ni(),lt=ni(),bt=function(n,t){return n===t&&(ut=!0),0},li=-2147483648,di={}.hasOwnProperty,g=[],gi=g.pop,nr=g.push,k=g.push,ai=g.slice,nt=function(n,t){for(var i=0,r=n.length;i<r;i++)if(n[i]===t)return i;return-1},kt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",r="[\\x20\\t\\r\\n\\f]",tt="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",vi="\\["+r+"*("+tt+")(?:"+r+"*([*^$|!~]?=)"+r+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+tt+"))|)"+r+"*\\]",dt=":("+tt+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+vi+")*)|.*)\\)|)",tr=new RegExp(r+"+","g"),at=new RegExp("^"+r+"+|((?:^|[^\\\\])(?:\\\\.)*)"+r+"+$","g"),ir=new RegExp("^"+r+"*,"+r+"*"),rr=new RegExp("^"+r+"*([>+~]|"+r+")"+r+"*"),ur=new RegExp("="+r+"*([^\\]'\"]*?)"+r+"*\\]","g"),fr=new RegExp(dt),yi=new RegExp("^"+tt+"$"),vt={ID:new RegExp("^#("+tt+")"),CLASS:new RegExp("^\\.("+tt+")"),TAG:new RegExp("^("+tt+"|[*])"),ATTR:new RegExp("^"+vi),PSEUDO:new RegExp("^"+dt),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+r+"*(even|odd|(([+-]|)(\\d*)n|)"+r+"*(?:([+-]|)"+r+"*(\\d+)|))"+r+"*\\)|)","i"),bool:new RegExp("^(?:"+kt+")$","i"),needsContext:new RegExp("^"+r+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+r+"*((?:-\\d)?\\d*)"+r+"*\\)|)(?=[^-]|$)","i")},er=/^(?:input|select|textarea|button)$/i,or=/^h\d$/i,ot=/^[^{]+\{\s*\[native \w/,sr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,gt=/[+~]/,hr=/'|\\/g,y=new RegExp("\\\\([\\da-f]{1,6}"+r+"?|("+r+")|.)","ig"),p=function(n,t,i){var r="0x"+t-65536;return r!==r||i?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,r&1023|56320)},pi=function(){b()};try{k.apply(g=ai.call(c.childNodes),c.childNodes);g[c.childNodes.length].nodeType}catch(yr){k={apply:g.length?function(n,t){nr.apply(n,ai.call(t))}:function(n,t){for(var i=n.length,r=0;n[i++]=t[r++];);n.length=i-1}}}f=u.support={};oi=u.isXML=function(n){var t=n&&(n.ownerDocument||n).documentElement;return t?t.nodeName!=="HTML":!1};b=u.setDocument=function(n){var v,u,l=n?n.ownerDocument||n:c;return l===i||l.nodeType!==9||!l.documentElement?i:(i=l,s=i.documentElement,h=!oi(i),(u=i.defaultView)&&u.top!==u&&(u.addEventListener?u.addEventListener("unload",pi,!1):u.attachEvent&&u.attachEvent("onunload",pi)),f.attributes=a(function(n){return n.className="i",!n.getAttribute("className")}),f.getElementsByTagName=a(function(n){return n.appendChild(i.createComment("")),!n.getElementsByTagName("*").length}),f.getElementsByClassName=ot.test(i.getElementsByClassName),f.getById=a(function(n){return s.appendChild(n).id=e,!i.getElementsByName||!i.getElementsByName(e).length}),f.getById?(t.find.ID=function(n,t){if(typeof t.getElementById!="undefined"&&h){var i=t.getElementById(n);return i?[i]:[]}},t.filter.ID=function(n){var t=n.replace(y,p);return function(n){return n.getAttribute("id")===t}}):(delete t.find.ID,t.filter.ID=function(n){var t=n.replace(y,p);return function(n){var i=typeof n.getAttributeNode!="undefined"&&n.getAttributeNode("id");return i&&i.value===t}}),t.find.TAG=f.getElementsByTagName?function(n,t){return typeof t.getElementsByTagName!="undefined"?t.getElementsByTagName(n):f.qsa?t.querySelectorAll(n):void 0}:function(n,t){var i,r=[],f=0,u=t.getElementsByTagName(n);if(n==="*"){while(i=u[f++])i.nodeType===1&&r.push(i);return r}return u},t.find.CLASS=f.getElementsByClassName&&function(n,t){if(typeof t.getElementsByClassName!="undefined"&&h)return t.getElementsByClassName(n)},d=[],o=[],(f.qsa=ot.test(i.querySelectorAll))&&(a(function(n){s.appendChild(n).innerHTML="<a id='"+e+"'><\/a><select id='"+e+"-\r\\' msallowcapture=''><option selected=''><\/option><\/select>";n.querySelectorAll("[msallowcapture^='']").length&&o.push("[*^$]="+r+"*(?:''|\"\")");n.querySelectorAll("[selected]").length||o.push("\\["+r+"*(?:value|"+kt+")");n.querySelectorAll("[id~="+e+"-]").length||o.push("~=");n.querySelectorAll(":checked").length||o.push(":checked");n.querySelectorAll("a#"+e+"+*").length||o.push(".#.+[+~]")}),a(function(n){var t=i.createElement("input");t.setAttribute("type","hidden");n.appendChild(t).setAttribute("name","D");n.querySelectorAll("[name=d]").length&&o.push("name"+r+"*[*^$|!~]?=");n.querySelectorAll(":enabled").length||o.push(":enabled",":disabled");n.querySelectorAll("*,:x");o.push(",.*:")})),(f.matchesSelector=ot.test(ct=s.matches||s.webkitMatchesSelector||s.mozMatchesSelector||s.oMatchesSelector||s.msMatchesSelector))&&a(function(n){f.disconnectedMatch=ct.call(n,"div");ct.call(n,"[s!='']:x");d.push("!=",dt)}),o=o.length&&new RegExp(o.join("|")),d=d.length&&new RegExp(d.join("|")),v=ot.test(s.compareDocumentPosition),et=v||ot.test(s.contains)?function(n,t){var r=n.nodeType===9?n.documentElement:n,i=t&&t.parentNode;return n===i||!!(i&&i.nodeType===1&&(r.contains?r.contains(i):n.compareDocumentPosition&&n.compareDocumentPosition(i)&16))}:function(n,t){if(t)while(t=t.parentNode)if(t===n)return!0;return!1},bt=v?function(n,t){if(n===t)return ut=!0,0;var r=!n.compareDocumentPosition-!t.compareDocumentPosition;return r?r:(r=(n.ownerDocument||n)===(t.ownerDocument||t)?n.compareDocumentPosition(t):1,r&1||!f.sortDetached&&t.compareDocumentPosition(n)===r)?n===i||n.ownerDocument===c&&et(c,n)?-1:t===i||t.ownerDocument===c&&et(c,t)?1:w?nt(w,n)-nt(w,t):0:r&4?-1:1}:function(n,t){if(n===t)return ut=!0,0;var r,u=0,o=n.parentNode,s=t.parentNode,f=[n],e=[t];if(o&&s){if(o===s)return wi(n,t)}else return n===i?-1:t===i?1:o?-1:s?1:w?nt(w,n)-nt(w,t):0;for(r=n;r=r.parentNode;)f.unshift(r);for(r=t;r=r.parentNode;)e.unshift(r);while(f[u]===e[u])u++;return u?wi(f[u],e[u]):f[u]===c?-1:e[u]===c?1:0},i)};u.matches=function(n,t){return u(n,null,null,t)};u.matchesSelector=function(n,t){if((n.ownerDocument||n)!==i&&b(n),t=t.replace(ur,"='$1']"),f.matchesSelector&&h&&!lt[t+" "]&&(!d||!d.test(t))&&(!o||!o.test(t)))try{var r=ct.call(n,t);if(r||f.disconnectedMatch||n.document&&n.document.nodeType!==11)return r}catch(e){}return u(t,i,null,[n]).length>0};u.contains=function(n,t){return(n.ownerDocument||n)!==i&&b(n),et(n,t)};u.attr=function(n,r){(n.ownerDocument||n)!==i&&b(n);var e=t.attrHandle[r.toLowerCase()],u=e&&di.call(t.attrHandle,r.toLowerCase())?e(n,r,!h):undefined;return u!==undefined?u:f.attributes||!h?n.getAttribute(r):(u=n.getAttributeNode(r))&&u.specified?u.value:null};u.error=function(n){throw new Error("Syntax error, unrecognized expression: "+n);};u.uniqueSort=function(n){var r,u=[],t=0,i=0;if(ut=!f.detectDuplicates,w=!f.sortStable&&n.slice(0),n.sort(bt),ut){while(r=n[i++])r===n[i]&&(t=u.push(i));while(t--)n.splice(u[t],1)}return w=null,n};st=u.getText=function(n){var r,i="",u=0,t=n.nodeType;if(t){if(t===1||t===9||t===11){if(typeof n.textContent=="string")return n.textContent;for(n=n.firstChild;n;n=n.nextSibling)i+=st(n)}else if(t===3||t===4)return n.nodeValue}else while(r=n[u++])i+=st(r);return i};t=u.selectors={cacheLength:50,createPseudo:l,match:vt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(n){return n[1]=n[1].replace(y,p),n[3]=(n[3]||n[4]||n[5]||"").replace(y,p),n[2]==="~="&&(n[3]=" "+n[3]+" "),n.slice(0,4)},CHILD:function(n){return n[1]=n[1].toLowerCase(),n[1].slice(0,3)==="nth"?(n[3]||u.error(n[0]),n[4]=+(n[4]?n[5]+(n[6]||1):2*(n[3]==="even"||n[3]==="odd")),n[5]=+(n[7]+n[8]||n[3]==="odd")):n[3]&&u.error(n[0]),n},PSEUDO:function(n){var i,t=!n[6]&&n[2];return vt.CHILD.test(n[0])?null:(n[3]?n[2]=n[4]||n[5]||"":t&&fr.test(t)&&(i=ft(t,!0))&&(i=t.indexOf(")",t.length-i)-t.length)&&(n[0]=n[0].slice(0,i),n[2]=t.slice(0,i)),n.slice(0,3))}},filter:{TAG:function(n){var t=n.replace(y,p).toLowerCase();return n==="*"?function(){return!0}:function(n){return n.nodeName&&n.nodeName.toLowerCase()===t}},CLASS:function(n){var t=hi[n+" "];return t||(t=new RegExp("(^|"+r+")"+n+"("+r+"|$)"))&&hi(n,function(n){return t.test(typeof n.className=="string"&&n.className||typeof n.getAttribute!="undefined"&&n.getAttribute("class")||"")})},ATTR:function(n,t,i){return function(r){var f=u.attr(r,n);return f==null?t==="!=":t?(f+="",t==="="?f===i:t==="!="?f!==i:t==="^="?i&&f.indexOf(i)===0:t==="*="?i&&f.indexOf(i)>-1:t==="$="?i&&f.slice(-i.length)===i:t==="~="?(" "+f.replace(tr," ")+" ").indexOf(i)>-1:t==="|="?f===i||f.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(n,t,i,r,u){var s=n.slice(0,3)!=="nth",o=n.slice(-4)!=="last",f=t==="of-type";return r===1&&u===0?function(n){return!!n.parentNode}:function(t,i,h){var p,w,y,c,a,b,k=s!==o?"nextSibling":"previousSibling",d=t.parentNode,nt=f&&t.nodeName.toLowerCase(),g=!h&&!f,l=!1;if(d){if(s){while(k){for(c=t;c=c[k];)if(f?c.nodeName.toLowerCase()===nt:c.nodeType===1)return!1;b=k=n==="only"&&!b&&"nextSibling"}return!0}if(b=[o?d.firstChild:d.lastChild],o&&g){for(c=d,y=c[e]||(c[e]={}),w=y[c.uniqueID]||(y[c.uniqueID]={}),p=w[n]||[],a=p[0]===v&&p[1],l=a&&p[2],c=a&&d.childNodes[a];c=++a&&c&&c[k]||(l=a=0)||b.pop();)if(c.nodeType===1&&++l&&c===t){w[n]=[v,a,l];break}}else if(g&&(c=t,y=c[e]||(c[e]={}),w=y[c.uniqueID]||(y[c.uniqueID]={}),p=w[n]||[],a=p[0]===v&&p[1],l=a),l===!1)while(c=++a&&c&&c[k]||(l=a=0)||b.pop())if((f?c.nodeName.toLowerCase()===nt:c.nodeType===1)&&++l&&(g&&(y=c[e]||(c[e]={}),w=y[c.uniqueID]||(y[c.uniqueID]={}),w[n]=[v,l]),c===t))break;return l-=u,l===r||l%r==0&&l/r>=0}}},PSEUDO:function(n,i){var f,r=t.pseudos[n]||t.setFilters[n.toLowerCase()]||u.error("unsupported pseudo: "+n);return r[e]?r(i):r.length>1?(f=[n,n,"",i],t.setFilters.hasOwnProperty(n.toLowerCase())?l(function(n,t){for(var u,f=r(n,i),e=f.length;e--;)u=nt(n,f[e]),n[u]=!(t[u]=f[e])}):function(n){return r(n,0,f)}):r}},pseudos:{not:l(function(n){var t=[],r=[],i=wt(n.replace(at,"$1"));return i[e]?l(function(n,t,r,u){for(var e,o=i(n,null,u,[]),f=n.length;f--;)(e=o[f])&&(n[f]=!(t[f]=e))}):function(n,u,f){return t[0]=n,i(t,null,f,r),t[0]=null,!r.pop()}}),has:l(function(n){return function(t){return u(n,t).length>0}}),contains:l(function(n){return n=n.replace(y,p),function(t){return(t.textContent||t.innerText||st(t)).indexOf(n)>-1}}),lang:l(function(n){return yi.test(n||"")||u.error("unsupported lang: "+n),n=n.replace(y,p).toLowerCase(),function(t){var i;do if(i=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return i=i.toLowerCase(),i===n||i.indexOf(n+"-")===0;while((t=t.parentNode)&&t.nodeType===1);return!1}}),target:function(t){var i=n.location&&n.location.hash;return i&&i.slice(1)===t.id},root:function(n){return n===s},focus:function(n){return n===i.activeElement&&(!i.hasFocus||i.hasFocus())&&!!(n.type||n.href||~n.tabIndex)},enabled:function(n){return n.disabled===!1},disabled:function(n){return n.disabled===!0},checked:function(n){var t=n.nodeName.toLowerCase();return t==="input"&&!!n.checked||t==="option"&&!!n.selected},selected:function(n){return n.parentNode&&n.parentNode.selectedIndex,n.selected===!0},empty:function(n){for(n=n.firstChild;n;n=n.nextSibling)if(n.nodeType<6)return!1;return!0},parent:function(n){return!t.pseudos.empty(n)},header:function(n){return or.test(n.nodeName)},input:function(n){return er.test(n.nodeName)},button:function(n){var t=n.nodeName.toLowerCase();return t==="input"&&n.type==="button"||t==="button"},text:function(n){var t;return n.nodeName.toLowerCase()==="input"&&n.type==="text"&&((t=n.getAttribute("type"))==null||t.toLowerCase()==="text")},first:it(function(){return[0]}),last:it(function(n,t){return[t-1]}),eq:it(function(n,t,i){return[i<0?i+t:i]}),even:it(function(n,t){for(var i=0;i<t;i+=2)n.push(i);return n}),odd:it(function(n,t){for(var i=1;i<t;i+=2)n.push(i);return n}),lt:it(function(n,t,i){for(var r=i<0?i+t:i;--r>=0;)n.push(r);return n}),gt:it(function(n,t,i){for(var r=i<0?i+t:i;++r<t;)n.push(r);return n})}};t.pseudos.nth=t.pseudos.eq;for(rt in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})t.pseudos[rt]=cr(rt);for(rt in{submit:!0,reset:!0})t.pseudos[rt]=lr(rt);return bi.prototype=t.filters=t.pseudos,t.setFilters=new bi,ft=u.tokenize=function(n,i){var e,f,s,o,r,h,c,l=ci[n+" "];if(l)return i?0:l.slice(0);for(r=n,h=[],c=t.preFilter;r;){(!e||(f=ir.exec(r)))&&(f&&(r=r.slice(f[0].length)||r),h.push(s=[]));e=!1;(f=rr.exec(r))&&(e=f.shift(),s.push({value:e,type:f[0].replace(at," ")}),r=r.slice(e.length));for(o in t.filter)(f=vt[o].exec(r))&&(!c[o]||(f=c[o](f)))&&(e=f.shift(),s.push({value:e,type:o,matches:f}),r=r.slice(e.length));if(!e)break}return i?r.length:r?u.error(n):ci(n,h).slice(0)},wt=u.compile=function(n,t){var r,u=[],f=[],i=lt[n+" "];if(!i){for(t||(t=ft(n)),r=t.length;r--;)i=ei(t[r]),i[e]?u.push(i):f.push(i);i=lt(n,vr(f,u));i.selector=n}return i},si=u.select=function(n,i,r,u){var s,e,o,a,v,l=typeof n=="function"&&n,c=!u&&ft(n=l.selector||n);if(r=r||[],c.length===1){if(e=c[0]=c[0].slice(0),e.length>2&&(o=e[0]).type==="ID"&&f.getById&&i.nodeType===9&&h&&t.relative[e[1].type]){if(i=(t.find.ID(o.matches[0].replace(y,p),i)||[])[0],i)l&&(i=i.parentNode);else return r;n=n.slice(e.shift().value.length)}for(s=vt.needsContext.test(n)?0:e.length;s--;){if(o=e[s],t.relative[a=o.type])break;if((v=t.find[a])&&(u=v(o.matches[0].replace(y,p),gt.test(e[0].type)&&ii(i.parentNode)||i))){if(e.splice(s,1),n=u.length&&yt(e),!n)return k.apply(r,u),r;break}}}return(l||wt(n,c))(u,i,!h,r,!i||gt.test(n)&&ii(i.parentNode)||i),r},f.sortStable=e.split("").sort(bt).join("")===e,f.detectDuplicates=!!ut,b(),f.sortDetached=a(function(n){return n.compareDocumentPosition(i.createElement("div"))&1}),a(function(n){return n.innerHTML="<a href='#'><\/a>",n.firstChild.getAttribute("href")==="#"})||ti("type|href|height|width",function(n,t,i){if(!i)return n.getAttribute(t,t.toLowerCase()==="type"?1:2)}),f.attributes&&a(function(n){return n.innerHTML="<input/>",n.firstChild.setAttribute("value",""),n.firstChild.getAttribute("value")===""})||ti("value",function(n,t,i){if(!i&&n.nodeName.toLowerCase()==="input")return n.defaultValue}),a(function(n){return n.getAttribute("disabled")==null})||ti(kt,function(n,t,i){var r;if(!i)return n[t]===!0?t.toLowerCase():(r=n.getAttributeNode(t))&&r.specified?r.value:null}),u}(n);i.find=p;i.expr=p.selectors;i.expr[":"]=i.expr.pseudos;i.uniqueSort=i.unique=p.uniqueSort;i.text=p.getText;i.isXMLDoc=p.isXML;i.contains=p.contains;var d=function(n,t,r){for(var u=[],f=r!==undefined;(n=n[t])&&n.nodeType!==9;)if(n.nodeType===1){if(f&&i(n).is(r))break;u.push(n)}return u},tr=function(n,t){for(var i=[];n;n=n.nextSibling)n.nodeType===1&&n!==t&&i.push(n);return i},ir=i.expr.match.needsContext,rr=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,bf=/^.[^:#\[\.,]*$/;i.filter=function(n,t,r){var u=t[0];return r&&(n=":not("+n+")"),t.length===1&&u.nodeType===1?i.find.matchesSelector(u,n)?[u]:[]:i.find.matches(n,i.grep(t,function(n){return n.nodeType===1}))};i.fn.extend({find:function(n){var t,u=this.length,r=[],f=this;if(typeof n!="string")return this.pushStack(i(n).filter(function(){for(t=0;t<u;t++)if(i.contains(f[t],this))return!0}));for(t=0;t<u;t++)i.find(n,f[t],r);return r=this.pushStack(u>1?i.unique(r):r),r.selector=this.selector?this.selector+" "+n:n,r},filter:function(n){return this.pushStack(ri(this,n||[],!1))},not:function(n){return this.pushStack(ri(this,n||[],!0))},is:function(n){return!!ri(this,typeof n=="string"&&ir.test(n)?i(n):n||[],!1).length}});fr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;er=i.fn.init=function(n,t,r){var f,e;if(!n)return this;if(r=r||ur,typeof n=="string"){if(f=n[0]==="<"&&n[n.length-1]===">"&&n.length>=3?[null,n,null]:fr.exec(n),f&&(f[1]||!t)){if(f[1]){if(t=t instanceof i?t[0]:t,i.merge(this,i.parseHTML(f[1],t&&t.nodeType?t.ownerDocument||t:u,!0)),rr.test(f[1])&&i.isPlainObject(t))for(f in t)i.isFunction(this[f])?this[f](t[f]):this.attr(f,t[f]);return this}return e=u.getElementById(f[2]),e&&e.parentNode&&(this.length=1,this[0]=e),this.context=u,this.selector=n,this}return!t||t.jquery?(t||r).find(n):this.constructor(t).find(n)}return n.nodeType?(this.context=this[0]=n,this.length=1,this):i.isFunction(n)?r.ready!==undefined?r.ready(n):n(i):(n.selector!==undefined&&(this.selector=n.selector,this.context=n.context),i.makeArray(n,this))};er.prototype=i.fn;ur=i(u);or=/^(?:parents|prev(?:Until|All))/;sr={children:!0,contents:!0,next:!0,prev:!0};i.fn.extend({has:function(n){var t=i(n,this),r=t.length;return this.filter(function(){for(var n=0;n<r;n++)if(i.contains(this,t[n]))return!0})},closest:function(n,t){for(var r,f=0,o=this.length,u=[],e=ir.test(n)||typeof n!="string"?i(n,t||this.context):0;f<o;f++)for(r=this[f];r&&r!==t;r=r.parentNode)if(r.nodeType<11&&(e?e.index(r)>-1:r.nodeType===1&&i.find.matchesSelector(r,n))){u.push(r);break}return this.pushStack(u.length>1?i.uniqueSort(u):u)},index:function(n){return n?typeof n=="string"?lt.call(i(n),this[0]):lt.call(this,n.jquery?n[0]:n):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(n,t){return this.pushStack(i.uniqueSort(i.merge(this.get(),i(n,t))))},addBack:function(n){return this.add(n==null?this.prevObject:this.prevObject.filter(n))}});i.each({parent:function(n){var t=n.parentNode;return t&&t.nodeType!==11?t:null},parents:function(n){return d(n,"parentNode")},parentsUntil:function(n,t,i){return d(n,"parentNode",i)},next:function(n){return hr(n,"nextSibling")},prev:function(n){return hr(n,"previousSibling")},nextAll:function(n){return d(n,"nextSibling")},prevAll:function(n){return d(n,"previousSibling")},nextUntil:function(n,t,i){return d(n,"nextSibling",i)},prevUntil:function(n,t,i){return d(n,"previousSibling",i)},siblings:function(n){return tr((n.parentNode||{}).firstChild,n)},children:function(n){return tr(n.firstChild)},contents:function(n){return n.contentDocument||i.merge([],n.childNodes)}},function(n,t){i.fn[n]=function(r,u){var f=i.map(this,t,r);return n.slice(-5)!=="Until"&&(u=r),u&&typeof u=="string"&&(f=i.filter(u,f)),this.length>1&&(sr[n]||i.uniqueSort(f),or.test(n)&&f.reverse()),this.pushStack(f)}});h=/\S+/g;i.Callbacks=function(n){n=typeof n=="string"?kf(n):i.extend({},n);var o,r,h,f,t=[],e=[],u=-1,c=function(){for(f=n.once,h=o=!0;e.length;u=-1)for(r=e.shift();++u<t.length;)t[u].apply(r[0],r[1])===!1&&n.stopOnFalse&&(u=t.length,r=!1);n.memory||(r=!1);o=!1;f&&(t=r?[]:"")},s={add:function(){return t&&(r&&!o&&(u=t.length-1,e.push(r)),function f(r){i.each(r,function(r,u){i.isFunction(u)?n.unique&&s.has(u)||t.push(u):u&&u.length&&i.type(u)!=="string"&&f(u)})}(arguments),r&&!o&&c()),this},remove:function(){return i.each(arguments,function(n,r){for(var f;(f=i.inArray(r,t,f))>-1;)t.splice(f,1),f<=u&&u--}),this},has:function(n){return n?i.inArray(n,t)>-1:t.length>0},empty:function(){return t&&(t=[]),this},disable:function(){return f=e=[],t=r="",this},disabled:function(){return!t},lock:function(){return f=e=[],r||(t=r=""),this},locked:function(){return!!f},fireWith:function(n,t){return f||(t=t||[],t=[n,t.slice?t.slice():t],e.push(t),o||c()),this},fire:function(){return s.fireWith(this,arguments),this},fired:function(){return!!h}};return s};i.extend({Deferred:function(n){var u=[["resolve","done",i.Callbacks("once memory"),"resolved"],["reject","fail",i.Callbacks("once memory"),"rejected"],["notify","progress",i.Callbacks("memory")]],f="pending",r={state:function(){return f},always:function(){return t.done(arguments).fail(arguments),this},then:function(){var n=arguments;return i.Deferred(function(f){i.each(u,function(u,e){var o=i.isFunction(n[u])&&n[u];t[e[1]](function(){var n=o&&o.apply(this,arguments);n&&i.isFunction(n.promise)?n.promise().progress(f.notify).done(f.resolve).fail(f.reject):f[e[0]+"With"](this===r?f.promise():this,o?[n]:arguments)})});n=null}).promise()},promise:function(n){return n!=null?i.extend(n,r):r}},t={};return r.pipe=r.then,i.each(u,function(n,i){var e=i[2],o=i[3];r[i[1]]=e.add;o&&e.add(function(){f=o},u[n^1][2].disable,u[2][2].lock);t[i[0]]=function(){return t[i[0]+"With"](this===t?r:this,arguments),this};t[i[0]+"With"]=e.fireWith}),r.promise(t),n&&n.call(t,t),t},when:function(n){var t=0,u=v.call(arguments),r=u.length,e=r!==1||n&&i.isFunction(n.promise)?r:0,f=e===1?n:i.Deferred(),h=function(n,t,i){return function(r){t[n]=this;i[n]=arguments.length>1?v.call(arguments):r;i===o?f.notifyWith(t,i):--e||f.resolveWith(t,i)}},o,c,s;if(r>1)for(o=new Array(r),c=new Array(r),s=new Array(r);t<r;t++)u[t]&&i.isFunction(u[t].promise)?u[t].promise().progress(h(t,c,o)).done(h(t,s,u)).fail(f.reject):--e;return e||f.resolveWith(s,u),f.promise()}});i.fn.ready=function(n){return i.ready.promise().done(n),this};i.extend({isReady:!1,readyWait:1,holdReady:function(n){n?i.readyWait++:i.ready(!0)},ready:function(n){(n===!0?--i.readyWait:i.isReady)||(i.isReady=!0,n!==!0&&--i.readyWait>0)||(vt.resolveWith(u,[i]),i.fn.triggerHandler&&(i(u).triggerHandler("ready"),i(u).off("ready")))}});i.ready.promise=function(t){return vt||(vt=i.Deferred(),u.readyState!=="complete"&&(u.readyState==="loading"||u.documentElement.doScroll)?(u.addEventListener("DOMContentLoaded",yt),n.addEventListener("load",yt)):n.setTimeout(i.ready)),vt.promise(t)};i.ready.promise();a=function(n,t,r,u,f,e,o){var s=0,c=n.length,h=r==null;if(i.type(r)==="object"){f=!0;for(s in r)a(n,t,s,r[s],!0,e,o)}else if(u!==undefined&&(f=!0,i.isFunction(u)||(o=!0),h&&(o?(t.call(n,u),t=null):(h=t,t=function(n,t,r){return h.call(i(n),r)})),t))for(;s<c;s++)t(n[s],r,o?u:u.call(n[s],s,t(n[s],r)));return f?n:h?t.call(n):c?t(n[0],r):e};g=function(n){return n.nodeType===1||n.nodeType===9||!+n.nodeType};et.uid=1;et.prototype={register:function(n,t){var i=t||{};return n.nodeType?n[this.expando]=i:Object.defineProperty(n,this.expando,{value:i,writable:!0,configurable:!0}),n[this.expando]},cache:function(n){if(!g(n))return{};var t=n[this.expando];return t||(t={},g(n)&&(n.nodeType?n[this.expando]=t:Object.defineProperty(n,this.expando,{value:t,configurable:!0}))),t},set:function(n,t,i){var r,u=this.cache(n);if(typeof t=="string")u[t]=i;else for(r in t)u[r]=t[r];return u},get:function(n,t){return t===undefined?this.cache(n):n[this.expando]&&n[this.expando][t]},access:function(n,t,r){var u;return t===undefined||t&&typeof t=="string"&&r===undefined?(u=this.get(n,t),u!==undefined?u:this.get(n,i.camelCase(t))):(this.set(n,t,r),r!==undefined?r:t)},remove:function(n,t){var f,r,e,u=n[this.expando];if(u!==undefined){if(t===undefined)this.register(n);else for(i.isArray(t)?r=t.concat(t.map(i.camelCase)):(e=i.camelCase(t),t in u?r=[t,e]:(r=e,r=r in u?[r]:r.match(h)||[])),f=r.length;f--;)delete u[r[f]];(t===undefined||i.isEmptyObject(u))&&(n.nodeType?n[this.expando]=undefined:delete n[this.expando])}},hasData:function(n){var t=n[this.expando];return t!==undefined&&!i.isEmptyObject(t)}};var r=new et,e=new et,df=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,cr=/[A-Z]/g;i.extend({hasData:function(n){return e.hasData(n)||r.hasData(n)},data:function(n,t,i){return e.access(n,t,i)},removeData:function(n,t){e.remove(n,t)},_data:function(n,t,i){return r.access(n,t,i)},_removeData:function(n,t){r.remove(n,t)}});i.fn.extend({data:function(n,t){var o,f,s,u=this[0],h=u&&u.attributes;if(n===undefined){if(this.length&&(s=e.get(u),u.nodeType===1&&!r.get(u,"hasDataAttrs"))){for(o=h.length;o--;)h[o]&&(f=h[o].name,f.indexOf("data-")===0&&(f=i.camelCase(f.slice(5)),lr(u,f,s[f])));r.set(u,"hasDataAttrs",!0)}return s}return typeof n=="object"?this.each(function(){e.set(this,n)}):a(this,function(t){var r,f;if(u&&t===undefined)return(r=e.get(u,n)||e.get(u,n.replace(cr,"-$&").toLowerCase()),r!==undefined)?r:(f=i.camelCase(n),r=e.get(u,f),r!==undefined)?r:(r=lr(u,f,undefined),r!==undefined)?r:void 0;f=i.camelCase(n);this.each(function(){var i=e.get(this,f);e.set(this,f,t);n.indexOf("-")>-1&&i!==undefined&&e.set(this,n,t)})},null,t,arguments.length>1,null,!0)},removeData:function(n){return this.each(function(){e.remove(this,n)})}});i.extend({queue:function(n,t,u){var f;if(n)return t=(t||"fx")+"queue",f=r.get(n,t),u&&(!f||i.isArray(u)?f=r.access(n,t,i.makeArray(u)):f.push(u)),f||[]},dequeue:function(n,t){t=t||"fx";var r=i.queue(n,t),e=r.length,u=r.shift(),f=i._queueHooks(n,t),o=function(){i.dequeue(n,t)};u==="inprogress"&&(u=r.shift(),e--);u&&(t==="fx"&&r.unshift("inprogress"),delete f.stop,u.call(n,o,f));!e&&f&&f.empty.fire()},_queueHooks:function(n,t){var u=t+"queueHooks";return r.get(n,u)||r.access(n,u,{empty:i.Callbacks("once memory").add(function(){r.remove(n,[t+"queue",u])})})}});i.fn.extend({queue:function(n,t){var r=2;return(typeof n!="string"&&(t=n,n="fx",r--),arguments.length<r)?i.queue(this[0],n):t===undefined?this:this.each(function(){var r=i.queue(this,n,t);i._queueHooks(this,n);n==="fx"&&r[0]!=="inprogress"&&i.dequeue(this,n)})},dequeue:function(n){return this.each(function(){i.dequeue(this,n)})},clearQueue:function(n){return this.queue(n||"fx",[])},promise:function(n,t){var u,e=1,o=i.Deferred(),f=this,s=this.length,h=function(){--e||o.resolveWith(f,[f])};for(typeof n!="string"&&(t=n,n=undefined),n=n||"fx";s--;)u=r.get(f[s],n+"queueHooks"),u&&u.empty&&(e++,u.empty.add(h));return h(),o.promise(t)}});var ar=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ot=new RegExp("^(?:([+-])=|)("+ar+")([a-z%]*)$","i"),w=["Top","Right","Bottom","Left"],st=function(n,t){return n=t||n,i.css(n,"display")==="none"||!i.contains(n.ownerDocument,n)};var yr=/^(?:checkbox|radio)$/i,pr=/<([\w:-]+)/,wr=/^$|\/(?:java|ecma)script/i,c={option:[1,"<select multiple='multiple'>","<\/select>"],thead:[1,"<table>","<\/table>"],col:[2,"<table><colgroup>","<\/colgroup><\/table>"],tr:[2,"<table><tbody>","<\/tbody><\/table>"],td:[3,"<table><tbody><tr>","<\/tr><\/tbody><\/table>"],_default:[0,"",""]};c.optgroup=c.option;c.tbody=c.tfoot=c.colgroup=c.caption=c.thead;c.th=c.td;br=/<|&#?\w+;/,function(){var i=u.createDocumentFragment(),n=i.appendChild(u.createElement("div")),t=u.createElement("input");t.setAttribute("type","radio");t.setAttribute("checked","checked");t.setAttribute("name","t");n.appendChild(t);f.checkClone=n.cloneNode(!0).cloneNode(!0).lastChild.checked;n.innerHTML="<textarea>x<\/textarea>";f.noCloneChecked=!!n.cloneNode(!0).lastChild.defaultValue}();var gf=/^key/,ne=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,dr=/^([^.]*)(?:\.(.+)|)/;i.event={global:{},add:function(n,t,u,f,e){var v,y,w,p,b,c,s,l,o,k,d,a=r.get(n);if(a)for(u.handler&&(v=u,u=v.handler,e=v.selector),u.guid||(u.guid=i.guid++),(p=a.events)||(p=a.events={}),(y=a.handle)||(y=a.handle=function(t){return typeof i!="undefined"&&i.event.triggered!==t.type?i.event.dispatch.apply(n,arguments):undefined}),t=(t||"").match(h)||[""],b=t.length;b--;)(w=dr.exec(t[b])||[],o=d=w[1],k=(w[2]||"").split(".").sort(),o)&&(s=i.event.special[o]||{},o=(e?s.delegateType:s.bindType)||o,s=i.event.special[o]||{},c=i.extend({type:o,origType:d,data:f,handler:u,guid:u.guid,selector:e,needsContext:e&&i.expr.match.needsContext.test(e),namespace:k.join(".")},v),(l=p[o])||(l=p[o]=[],l.delegateCount=0,s.setup&&s.setup.call(n,f,k,y)!==!1||n.addEventListener&&n.addEventListener(o,y)),s.add&&(s.add.call(n,c),c.handler.guid||(c.handler.guid=u.guid)),e?l.splice(l.delegateCount++,0,c):l.push(c),i.event.global[o]=!0)},remove:function(n,t,u,f,e){var y,k,c,v,p,s,l,a,o,b,d,w=r.hasData(n)&&r.get(n);if(w&&(v=w.events)){for(t=(t||"").match(h)||[""],p=t.length;p--;){if(c=dr.exec(t[p])||[],o=d=c[1],b=(c[2]||"").split(".").sort(),!o){for(o in v)i.event.remove(n,o+t[p],u,f,!0);continue}for(l=i.event.special[o]||{},o=(f?l.delegateType:l.bindType)||o,a=v[o]||[],c=c[2]&&new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"),k=y=a.length;y--;)s=a[y],(e||d===s.origType)&&(!u||u.guid===s.guid)&&(!c||c.test(s.namespace))&&(!f||f===s.selector||f==="**"&&s.selector)&&(a.splice(y,1),s.selector&&a.delegateCount--,l.remove&&l.remove.call(n,s));k&&!a.length&&(l.teardown&&l.teardown.call(n,b,w.handle)!==!1||i.removeEvent(n,o,w.handle),delete v[o])}i.isEmptyObject(v)&&r.remove(n,"handle events")}},dispatch:function(n){n=i.event.fix(n);var o,s,e,u,t,h=[],c=v.call(arguments),l=(r.get(this,"events")||{})[n.type]||[],f=i.event.special[n.type]||{};if(c[0]=n,n.delegateTarget=this,!f.preDispatch||f.preDispatch.call(this,n)!==!1){for(h=i.event.handlers.call(this,n,l),o=0;(u=h[o++])&&!n.isPropagationStopped();)for(n.currentTarget=u.elem,s=0;(t=u.handlers[s++])&&!n.isImmediatePropagationStopped();)(!n.rnamespace||n.rnamespace.test(t.namespace))&&(n.handleObj=t,n.data=t.data,e=((i.event.special[t.origType]||{}).handle||t.handler).apply(u.elem,c),e!==undefined&&(n.result=e)===!1&&(n.preventDefault(),n.stopPropagation()));return f.postDispatch&&f.postDispatch.call(this,n),n.result}},handlers:function(n,t){var e,u,f,o,h=[],s=t.delegateCount,r=n.target;if(s&&r.nodeType&&(n.type!=="click"||isNaN(n.button)||n.button<1))for(;r!==this;r=r.parentNode||this)if(r.nodeType===1&&(r.disabled!==!0||n.type!=="click")){for(u=[],e=0;e<s;e++)o=t[e],f=o.selector+" ",u[f]===undefined&&(u[f]=o.needsContext?i(f,this).index(r)>-1:i.find(f,this,null,[r]).length),u[f]&&u.push(o);u.length&&h.push({elem:r,handlers:u})}return s<t.length&&h.push({elem:this,handlers:t.slice(s)}),h},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(n,t){return n.which==null&&(n.which=t.charCode!=null?t.charCode:t.keyCode),n}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(n,t){var e,i,r,f=t.button;return n.pageX==null&&t.clientX!=null&&(e=n.target.ownerDocument||u,i=e.documentElement,r=e.body,n.pageX=t.clientX+(i&&i.scrollLeft||r&&r.scrollLeft||0)-(i&&i.clientLeft||r&&r.clientLeft||0),n.pageY=t.clientY+(i&&i.scrollTop||r&&r.scrollTop||0)-(i&&i.clientTop||r&&r.clientTop||0)),n.which||f===undefined||(n.which=f&1?1:f&2?3:f&4?2:0),n}},fix:function(n){if(n[i.expando])return n;var f,e,o,r=n.type,s=n,t=this.fixHooks[r];for(t||(this.fixHooks[r]=t=ne.test(r)?this.mouseHooks:gf.test(r)?this.keyHooks:{}),o=t.props?this.props.concat(t.props):this.props,n=new i.Event(s),f=o.length;f--;)e=o[f],n[e]=s[e];return n.target||(n.target=u),n.target.nodeType===3&&(n.target=n.target.parentNode),t.filter?t.filter(n,s):n},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==gr()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===gr()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if(this.type==="checkbox"&&this.click&&i.nodeName(this,"input"))return this.click(),!1},_default:function(n){return i.nodeName(n.target,"a")}},beforeunload:{postDispatch:function(n){n.result!==undefined&&n.originalEvent&&(n.originalEvent.returnValue=n.result)}}}};i.removeEvent=function(n,t,i){n.removeEventListener&&n.removeEventListener(t,i)};i.Event=function(n,t){if(!(this instanceof i.Event))return new i.Event(n,t);n&&n.type?(this.originalEvent=n,this.type=n.type,this.isDefaultPrevented=n.defaultPrevented||n.defaultPrevented===undefined&&n.returnValue===!1?pt:nt):this.type=n;t&&i.extend(this,t);this.timeStamp=n&&n.timeStamp||i.now();this[i.expando]=!0};i.Event.prototype={constructor:i.Event,isDefaultPrevented:nt,isPropagationStopped:nt,isImmediatePropagationStopped:nt,isSimulated:!1,preventDefault:function(){var n=this.originalEvent;this.isDefaultPrevented=pt;n&&!this.isSimulated&&n.preventDefault()},stopPropagation:function(){var n=this.originalEvent;this.isPropagationStopped=pt;n&&!this.isSimulated&&n.stopPropagation()},stopImmediatePropagation:function(){var n=this.originalEvent;this.isImmediatePropagationStopped=pt;n&&!this.isSimulated&&n.stopImmediatePropagation();this.stopPropagation()}};i.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(n,t){i.event.special[n]={delegateType:t,bindType:t,handle:function(n){var u,f=this,r=n.relatedTarget,e=n.handleObj;return r&&(r===f||i.contains(f,r))||(n.type=e.origType,u=e.handler.apply(this,arguments),n.type=t),u}}});i.fn.extend({on:function(n,t,i,r){return fi(this,n,t,i,r)},one:function(n,t,i,r){return fi(this,n,t,i,r,1)},off:function(n,t,r){var u,f;if(n&&n.preventDefault&&n.handleObj)return u=n.handleObj,i(n.delegateTarget).off(u.namespace?u.origType+"."+u.namespace:u.origType,u.selector,u.handler),this;if(typeof n=="object"){for(f in n)this.off(f,t,n[f]);return this}return(t===!1||typeof t=="function")&&(r=t,t=undefined),r===!1&&(r=nt),this.each(function(){i.event.remove(this,n,r,t)})}});var te=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,ie=/<script|<style|<link/i,re=/checked\s*(?:[^=]|=\s*.checked.)/i,ue=/^true\/(.*)/,fe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;i.extend({htmlPrefilter:function(n){return n.replace(te,"<$1><\/$2>")},clone:function(n,t,r){var u,c,s,e,h=n.cloneNode(!0),l=i.contains(n.ownerDocument,n);if(!f.noCloneChecked&&(n.nodeType===1||n.nodeType===11)&&!i.isXMLDoc(n))for(e=o(h),s=o(n),u=0,c=s.length;u<c;u++)se(s[u],e[u]);if(t)if(r)for(s=s||o(n),e=e||o(h),u=0,c=s.length;u<c;u++)tu(s[u],e[u]);else tu(n,h);return e=o(h,"script"),e.length>0&&ui(e,!l&&o(n,"script")),h},cleanData:function(n){for(var u,t,f,s=i.event.special,o=0;(t=n[o])!==undefined;o++)if(g(t)){if(u=t[r.expando]){if(u.events)for(f in u.events)s[f]?i.event.remove(t,f):i.removeEvent(t,f,u.handle);t[r.expando]=undefined}t[e.expando]&&(t[e.expando]=undefined)}}});i.fn.extend({domManip:b,detach:function(n){return iu(this,n,!0)},remove:function(n){return iu(this,n)},text:function(n){return a(this,function(n){return n===undefined?i.text(this):this.empty().each(function(){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&(this.textContent=n)})},null,n,arguments.length)},append:function(){return b(this,arguments,function(n){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var t=nu(this,n);t.appendChild(n)}})},prepend:function(){return b(this,arguments,function(n){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var t=nu(this,n);t.insertBefore(n,t.firstChild)}})},before:function(){return b(this,arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this)})},after:function(){return b(this,arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling)})},empty:function(){for(var n,t=0;(n=this[t])!=null;t++)n.nodeType===1&&(i.cleanData(o(n,!1)),n.textContent="");return this},clone:function(n,t){return n=n==null?!1:n,t=t==null?n:t,this.map(function(){return i.clone(this,n,t)})},html:function(n){return a(this,function(n){var t=this[0]||{},r=0,u=this.length;if(n===undefined&&t.nodeType===1)return t.innerHTML;if(typeof n=="string"&&!ie.test(n)&&!c[(pr.exec(n)||["",""])[1].toLowerCase()]){n=i.htmlPrefilter(n);try{for(;r<u;r++)t=this[r]||{},t.nodeType===1&&(i.cleanData(o(t,!1)),t.innerHTML=n);t=0}catch(f){}}t&&this.empty().append(n)},null,n,arguments.length)},replaceWith:function(){var n=[];return b(this,arguments,function(t){var r=this.parentNode;i.inArray(this,n)<0&&(i.cleanData(o(this)),r&&r.replaceChild(t,this))},n)}});i.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(n,t){i.fn[n]=function(n){for(var u,f=[],e=i(n),o=e.length-1,r=0;r<=o;r++)u=r===o?this:this.clone(!0),i(e[r])[t](u),ti.apply(f,u.get());return this.pushStack(f)}});ei={HTML:"block",BODY:"block"};var uu=/^margin/,si=new RegExp("^("+ar+")(?!px)[a-z%]+$","i"),bt=function(t){var i=t.ownerDocument.defaultView;return i&&i.opener||(i=n),i.getComputedStyle(t)},hi=function(n,t,i,r){var f,u,e={};for(u in t)e[u]=n.style[u],n.style[u]=t[u];f=i.apply(n,r||[]);for(u in t)n.style[u]=e[u];return f},ht=u.documentElement;(function(){function o(){t.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%";t.innerHTML="";ht.appendChild(r);var i=n.getComputedStyle(t);s=i.top!=="1%";c=i.marginLeft==="2px";e=i.width==="4px";t.style.marginRight="50%";h=i.marginRight==="4px";ht.removeChild(r)}var s,e,h,c,r=u.createElement("div"),t=u.createElement("div");t.style&&(t.style.backgroundClip="content-box",t.cloneNode(!0).style.backgroundClip="",f.clearCloneStyle=t.style.backgroundClip==="content-box",r.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",r.appendChild(t),i.extend(f,{pixelPosition:function(){return o(),s},boxSizingReliable:function(){return e==null&&o(),e},pixelMarginRight:function(){return e==null&&o(),h},reliableMarginLeft:function(){return e==null&&o(),c},reliableMarginRight:function(){var f,i=t.appendChild(u.createElement("div"));return i.style.cssText=t.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",t.style.width="1px",ht.appendChild(r),f=!parseFloat(n.getComputedStyle(i).marginRight),ht.removeChild(r),t.removeChild(i),f}}))})();var he=/^(none|table(?!-c[ea]).+)/,ce={position:"absolute",visibility:"hidden",display:"block"},fu={letterSpacing:"0",fontWeight:"400"},eu=["Webkit","O","Moz","ms"],ou=u.createElement("div").style;i.extend({cssHooks:{opacity:{get:function(n,t){if(t){var i=tt(n,"opacity");return i===""?"1":i}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(n,t,r,u){if(n&&n.nodeType!==3&&n.nodeType!==8&&n.style){var e,h,o,s=i.camelCase(t),c=n.style;if(t=i.cssProps[s]||(i.cssProps[s]=su(s)||s),o=i.cssHooks[t]||i.cssHooks[s],r!==undefined){if(h=typeof r,h==="string"&&(e=ot.exec(r))&&e[1]&&(r=vr(n,t,e),h="number"),r==null||r!==r)return;h==="number"&&(r+=e&&e[3]||(i.cssNumber[s]?"":"px"));f.clearCloneStyle||r!==""||t.indexOf("background")!==0||(c[t]="inherit");o&&"set"in o&&(r=o.set(n,r,u))===undefined||(c[t]=r)}else return o&&"get"in o&&(e=o.get(n,!1,u))!==undefined?e:c[t]}},css:function(n,t,r,u){var f,s,o,e=i.camelCase(t);return(t=i.cssProps[e]||(i.cssProps[e]=su(e)||e),o=i.cssHooks[t]||i.cssHooks[e],o&&"get"in o&&(f=o.get(n,!0,r)),f===undefined&&(f=tt(n,t,u)),f==="normal"&&t in fu&&(f=fu[t]),r===""||r)?(s=parseFloat(f),r===!0||isFinite(s)?s||0:f):f}});i.each(["height","width"],function(n,t){i.cssHooks[t]={get:function(n,r,u){if(r)return he.test(i.css(n,"display"))&&n.offsetWidth===0?hi(n,ce,function(){return lu(n,t,u)}):lu(n,t,u)},set:function(n,r,u){var f,e=u&&bt(n),o=u&&cu(n,t,u,i.css(n,"boxSizing",!1,e)==="border-box",e);return o&&(f=ot.exec(r))&&(f[3]||"px")!=="px"&&(n.style[t]=r,r=i.css(n,t)),hu(n,r,o)}}});i.cssHooks.marginLeft=ci(f.reliableMarginLeft,function(n,t){if(t)return(parseFloat(tt(n,"marginLeft"))||n.getBoundingClientRect().left-hi(n,{marginLeft:0},function(){return n.getBoundingClientRect().left}))+"px"});i.cssHooks.marginRight=ci(f.reliableMarginRight,function(n,t){if(t)return hi(n,{display:"inline-block"},tt,[n,"marginRight"])});i.each({margin:"",padding:"",border:"Width"},function(n,t){i.cssHooks[n+t]={expand:function(i){for(var r=0,f={},u=typeof i=="string"?i.split(" "):[i];r<4;r++)f[n+w[r]+t]=u[r]||u[r-2]||u[0];return f}};uu.test(n)||(i.cssHooks[n+t].set=hu)});i.fn.extend({css:function(n,t){return a(this,function(n,t,r){var f,e,o={},u=0;if(i.isArray(t)){for(f=bt(n),e=t.length;u<e;u++)o[t[u]]=i.css(n,t[u],!1,f);return o}return r!==undefined?i.style(n,t,r):i.css(n,t)},n,t,arguments.length>1)},show:function(){return au(this,!0)},hide:function(){return au(this)},toggle:function(n){return typeof n=="boolean"?n?this.show():this.hide():this.each(function(){st(this)?i(this).show():i(this).hide()})}});i.Tween=s;s.prototype={constructor:s,init:function(n,t,r,u,f,e){this.elem=n;this.prop=r;this.easing=f||i.easing._default;this.options=t;this.start=this.now=this.cur();this.end=u;this.unit=e||(i.cssNumber[r]?"":"px")},cur:function(){var n=s.propHooks[this.prop];return n&&n.get?n.get(this):s.propHooks._default.get(this)},run:function(n){var t,r=s.propHooks[this.prop];return this.pos=this.options.duration?t=i.easing[this.easing](n,this.options.duration*n,0,1,this.options.duration):t=n,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),r&&r.set?r.set(this):s.propHooks._default.set(this),this}};s.prototype.init.prototype=s.prototype;s.propHooks={_default:{get:function(n){var t;return n.elem.nodeType!==1||n.elem[n.prop]!=null&&n.elem.style[n.prop]==null?n.elem[n.prop]:(t=i.css(n.elem,n.prop,""),!t||t==="auto"?0:t)},set:function(n){i.fx.step[n.prop]?i.fx.step[n.prop](n):n.elem.nodeType===1&&(n.elem.style[i.cssProps[n.prop]]!=null||i.cssHooks[n.prop])?i.style(n.elem,n.prop,n.now+n.unit):n.elem[n.prop]=n.now}}};s.propHooks.scrollTop=s.propHooks.scrollLeft={set:function(n){n.elem.nodeType&&n.elem.parentNode&&(n.elem[n.prop]=n.now)}};i.easing={linear:function(n){return n},swing:function(n){return.5-Math.cos(n*Math.PI)/2},_default:"swing"};i.fx=s.prototype.init;i.fx.step={};vu=/^(?:toggle|show|hide)$/;yu=/queueHooks$/;i.Animation=i.extend(l,{tweeners:{"*":[function(n,t){var i=this.createTween(n,t);return vr(i.elem,n,ot.exec(t),i),i}]},tweener:function(n,t){i.isFunction(n)?(t=n,n=["*"]):n=n.match(h);for(var r,u=0,f=n.length;u<f;u++)r=n[u],l.tweeners[r]=l.tweeners[r]||[],l.tweeners[r].unshift(t)},prefilters:[le],prefilter:function(n,t){t?l.prefilters.unshift(n):l.prefilters.push(n)}});i.speed=function(n,t,r){var u=n&&typeof n=="object"?i.extend({},n):{complete:r||!r&&t||i.isFunction(n)&&n,duration:n,easing:r&&t||t&&!i.isFunction(t)&&t};return u.duration=i.fx.off?0:typeof u.duration=="number"?u.duration:u.duration in i.fx.speeds?i.fx.speeds[u.duration]:i.fx.speeds._default,(u.queue==null||u.queue===!0)&&(u.queue="fx"),u.old=u.complete,u.complete=function(){i.isFunction(u.old)&&u.old.call(this);u.queue&&i.dequeue(this,u.queue)},u};i.fn.extend({fadeTo:function(n,t,i,r){return this.filter(st).css("opacity",0).show().end().animate({opacity:t},n,i,r)},animate:function(n,t,u,f){var s=i.isEmptyObject(n),o=i.speed(t,u,f),e=function(){var t=l(this,i.extend({},n),o);(s||r.get(this,"finish"))&&t.stop(!0)};return e.finish=e,s||o.queue===!1?this.each(e):this.queue(o.queue,e)},stop:function(n,t,u){var f=function(n){var t=n.stop;delete n.stop;t(u)};return typeof n!="string"&&(u=t,t=n,n=undefined),t&&n!==!1&&this.queue(n||"fx",[]),this.each(function(){var s=!0,t=n!=null&&n+"queueHooks",o=i.timers,e=r.get(this);if(t)e[t]&&e[t].stop&&f(e[t]);else for(t in e)e[t]&&e[t].stop&&yu.test(t)&&f(e[t]);for(t=o.length;t--;)o[t].elem===this&&(n==null||o[t].queue===n)&&(o[t].anim.stop(u),s=!1,o.splice(t,1));(s||!u)&&i.dequeue(this,n)})},finish:function(n){return n!==!1&&(n=n||"fx"),this.each(function(){var t,e=r.get(this),u=e[n+"queue"],o=e[n+"queueHooks"],f=i.timers,s=u?u.length:0;for(e.finish=!0,i.queue(this,n,[]),o&&o.stop&&o.stop.call(this,!0),t=f.length;t--;)f[t].elem===this&&f[t].queue===n&&(f[t].anim.stop(!0),f.splice(t,1));for(t=0;t<s;t++)u[t]&&u[t].finish&&u[t].finish.call(this);delete e.finish})}});i.each(["toggle","show","hide"],function(n,t){var r=i.fn[t];i.fn[t]=function(n,i,u){return n==null||typeof n=="boolean"?r.apply(this,arguments):this.animate(dt(t,!0),n,i,u)}});i.each({slideDown:dt("show"),slideUp:dt("hide"),slideToggle:dt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(n,t){i.fn[n]=function(n,i,r){return this.animate(t,n,i,r)}});i.timers=[];i.fx.tick=function(){var r,n=0,t=i.timers;for(it=i.now();n<t.length;n++)r=t[n],r()||t[n]!==r||t.splice(n--,1);t.length||i.fx.stop();it=undefined};i.fx.timer=function(n){i.timers.push(n);n()?i.fx.start():i.timers.pop()};i.fx.interval=13;i.fx.start=function(){kt||(kt=n.setInterval(i.fx.tick,i.fx.interval))};i.fx.stop=function(){n.clearInterval(kt);kt=null};i.fx.speeds={slow:600,fast:200,_default:400};i.fn.delay=function(t,r){return t=i.fx?i.fx.speeds[t]||t:t,r=r||"fx",this.queue(r,function(i,r){var u=n.setTimeout(i,t);r.stop=function(){n.clearTimeout(u)}})},function(){var n=u.createElement("input"),t=u.createElement("select"),i=t.appendChild(u.createElement("option"));n.type="checkbox";f.checkOn=n.value!=="";f.optSelected=i.selected;t.disabled=!0;f.optDisabled=!i.disabled;n=u.createElement("input");n.value="t";n.type="radio";f.radioValue=n.value==="t"}();rt=i.expr.attrHandle;i.fn.extend({attr:function(n,t){return a(this,i.attr,n,t,arguments.length>1)},removeAttr:function(n){return this.each(function(){i.removeAttr(this,n)})}});i.extend({attr:function(n,t,r){var u,f,e=n.nodeType;if(e!==3&&e!==8&&e!==2){if(typeof n.getAttribute=="undefined")return i.prop(n,t,r);if(e===1&&i.isXMLDoc(n)||(t=t.toLowerCase(),f=i.attrHooks[t]||(i.expr.match.bool.test(t)?bu:undefined)),r!==undefined){if(r===null){i.removeAttr(n,t);return}return f&&"set"in f&&(u=f.set(n,r,t))!==undefined?u:(n.setAttribute(t,r+""),r)}return f&&"get"in f&&(u=f.get(n,t))!==null?u:(u=i.find.attr(n,t),u==null?undefined:u)}},attrHooks:{type:{set:function(n,t){if(!f.radioValue&&t==="radio"&&i.nodeName(n,"input")){var r=n.value;return n.setAttribute("type",t),r&&(n.value=r),t}}}},removeAttr:function(n,t){var r,u,e=0,f=t&&t.match(h);if(f&&n.nodeType===1)while(r=f[e++])u=i.propFix[r]||r,i.expr.match.bool.test(r)&&(n[u]=!1),n.removeAttribute(r)}});bu={set:function(n,t,r){return t===!1?i.removeAttr(n,r):n.setAttribute(r,r),r}};i.each(i.expr.match.bool.source.match(/\w+/g),function(n,t){var r=rt[t]||i.find.attr;rt[t]=function(n,t,i){var u,f;return i||(f=rt[t],rt[t]=u,u=r(n,t,i)!=null?t.toLowerCase():null,rt[t]=f),u}});ku=/^(?:input|select|textarea|button)$/i;du=/^(?:a|area)$/i;i.fn.extend({prop:function(n,t){return a(this,i.prop,n,t,arguments.length>1)},removeProp:function(n){return this.each(function(){delete this[i.propFix[n]||n]})}});i.extend({prop:function(n,t,r){var f,u,e=n.nodeType;if(e!==3&&e!==8&&e!==2)return(e===1&&i.isXMLDoc(n)||(t=i.propFix[t]||t,u=i.propHooks[t]),r!==undefined)?u&&"set"in u&&(f=u.set(n,r,t))!==undefined?f:n[t]=r:u&&"get"in u&&(f=u.get(n,t))!==null?f:n[t]},propHooks:{tabIndex:{get:function(n){var t=i.find.attr(n,"tabindex");return t?parseInt(t,10):ku.test(n.nodeName)||du.test(n.nodeName)&&n.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}});f.optSelected||(i.propHooks.selected={get:function(n){var t=n.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(n){var t=n.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}});i.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){i.propFix[this.toLowerCase()]=this});gt=/[\t\r\n\f]/g;i.fn.extend({addClass:function(n){var o,r,t,u,f,s,e,c=0;if(i.isFunction(n))return this.each(function(t){i(this).addClass(n.call(this,t,k(this)))});if(typeof n=="string"&&n)for(o=n.match(h)||[];r=this[c++];)if(u=k(r),t=r.nodeType===1&&(" "+u+" ").replace(gt," "),t){for(s=0;f=o[s++];)t.indexOf(" "+f+" ")<0&&(t+=f+" ");e=i.trim(t);u!==e&&r.setAttribute("class",e)}return this},removeClass:function(n){var o,r,t,u,f,s,e,c=0;if(i.isFunction(n))return this.each(function(t){i(this).removeClass(n.call(this,t,k(this)))});if(!arguments.length)return this.attr("class","");if(typeof n=="string"&&n)for(o=n.match(h)||[];r=this[c++];)if(u=k(r),t=r.nodeType===1&&(" "+u+" ").replace(gt," "),t){for(s=0;f=o[s++];)while(t.indexOf(" "+f+" ")>-1)t=t.replace(" "+f+" "," ");e=i.trim(t);u!==e&&r.setAttribute("class",e)}return this},toggleClass:function(n,t){var u=typeof n;return typeof t=="boolean"&&u==="string"?t?this.addClass(n):this.removeClass(n):i.isFunction(n)?this.each(function(r){i(this).toggleClass(n.call(this,r,k(this),t),t)}):this.each(function(){var t,e,f,o;if(u==="string")for(e=0,f=i(this),o=n.match(h)||[];t=o[e++];)f.hasClass(t)?f.removeClass(t):f.addClass(t);else(n===undefined||u==="boolean")&&(t=k(this),t&&r.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||n===!1?"":r.get(this,"__className__")||""))})},hasClass:function(n){for(var t,r=0,i=" "+n+" ";t=this[r++];)if(t.nodeType===1&&(" "+k(t)+" ").replace(gt," ").indexOf(i)>-1)return!0;return!1}});gu=/\r/g;nf=/[\x20\t\r\n\f]+/g;i.fn.extend({val:function(n){var t,r,f,u=this[0];return arguments.length?(f=i.isFunction(n),this.each(function(r){var u;this.nodeType===1&&(u=f?n.call(this,r,i(this).val()):n,u==null?u="":typeof u=="number"?u+="":i.isArray(u)&&(u=i.map(u,function(n){return n==null?"":n+""})),t=i.valHooks[this.type]||i.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&t.set(this,u,"value")!==undefined||(this.value=u))})):u?(t=i.valHooks[u.type]||i.valHooks[u.nodeName.toLowerCase()],t&&"get"in t&&(r=t.get(u,"value"))!==undefined)?r:(r=u.value,typeof r=="string"?r.replace(gu,""):r==null?"":r):void 0}});i.extend({valHooks:{option:{get:function(n){var t=i.find.attr(n,"value");return t!=null?t:i.trim(i.text(n)).replace(nf," ")}},select:{get:function(n){for(var o,t,s=n.options,r=n.selectedIndex,u=n.type==="select-one"||r<0,h=u?null:[],c=u?r+1:s.length,e=r<0?c:u?r:0;e<c;e++)if(t=s[e],(t.selected||e===r)&&(f.optDisabled?!t.disabled:t.getAttribute("disabled")===null)&&(!t.parentNode.disabled||!i.nodeName(t.parentNode,"optgroup"))){if(o=i(t).val(),u)return o;h.push(o)}return h},set:function(n,t){for(var u,r,f=n.options,e=i.makeArray(t),o=f.length;o--;)r=f[o],(r.selected=i.inArray(i.valHooks.option.get(r),e)>-1)&&(u=!0);return u||(n.selectedIndex=-1),e}}}});i.each(["radio","checkbox"],function(){i.valHooks[this]={set:function(n,t){if(i.isArray(t))return n.checked=i.inArray(i(n).val(),t)>-1}};f.checkOn||(i.valHooks[this].get=function(n){return n.getAttribute("value")===null?"on":n.value})});li=/^(?:focusinfocus|focusoutblur)$/;i.extend(i.event,{trigger:function(t,f,e,o){var w,s,c,b,a,v,l,p=[e||u],h=ft.call(t,"type")?t.type:t,y=ft.call(t,"namespace")?t.namespace.split("."):[];if((s=c=e=e||u,e.nodeType!==3&&e.nodeType!==8)&&!li.test(h+i.event.triggered)&&(h.indexOf(".")>-1&&(y=h.split("."),h=y.shift(),y.sort()),a=h.indexOf(":")<0&&"on"+h,t=t[i.expando]?t:new i.Event(h,typeof t=="object"&&t),t.isTrigger=o?2:3,t.namespace=y.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=undefined,t.target||(t.target=e),f=f==null?[t]:i.makeArray(f,[t]),l=i.event.special[h]||{},o||!l.trigger||l.trigger.apply(e,f)!==!1)){if(!o&&!l.noBubble&&!i.isWindow(e)){for(b=l.delegateType||h,li.test(b+h)||(s=s.parentNode);s;s=s.parentNode)p.push(s),c=s;c===(e.ownerDocument||u)&&p.push(c.defaultView||c.parentWindow||n)}for(w=0;(s=p[w++])&&!t.isPropagationStopped();)t.type=w>1?b:l.bindType||h,v=(r.get(s,"events")||{})[t.type]&&r.get(s,"handle"),v&&v.apply(s,f),v=a&&s[a],v&&v.apply&&g(s)&&(t.result=v.apply(s,f),t.result===!1&&t.preventDefault());return t.type=h,o||t.isDefaultPrevented()||(!l._default||l._default.apply(p.pop(),f)===!1)&&g(e)&&a&&i.isFunction(e[h])&&!i.isWindow(e)&&(c=e[a],c&&(e[a]=null),i.event.triggered=h,e[h](),i.event.triggered=undefined,c&&(e[a]=c)),t.result}},simulate:function(n,t,r){var u=i.extend(new i.Event,r,{type:n,isSimulated:!0});i.event.trigger(u,null,t)}});i.fn.extend({trigger:function(n,t){return this.each(function(){i.event.trigger(n,t,this)})},triggerHandler:function(n,t){var r=this[0];if(r)return i.event.trigger(n,t,r,!0)}});i.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(n,t){i.fn[t]=function(n,i){return arguments.length>0?this.on(t,null,n,i):this.trigger(t)}});i.fn.extend({hover:function(n,t){return this.mouseenter(n).mouseleave(t||n)}});f.focusin="onfocusin"in n;f.focusin||i.each({focus:"focusin",blur:"focusout"},function(n,t){var u=function(n){i.event.simulate(t,n.target,i.event.fix(n))};i.event.special[t]={setup:function(){var i=this.ownerDocument||this,f=r.access(i,t);f||i.addEventListener(n,u,!0);r.access(i,t,(f||0)+1)},teardown:function(){var i=this.ownerDocument||this,f=r.access(i,t)-1;f?r.access(i,t,f):(i.removeEventListener(n,u,!0),r.remove(i,t))}}});var ct=n.location,ai=i.now(),vi=/\?/;i.parseJSON=function(n){return JSON.parse(n+"")};i.parseXML=function(t){var r;if(!t||typeof t!="string")return null;try{r=(new n.DOMParser).parseFromString(t,"text/xml")}catch(u){r=undefined}return(!r||r.getElementsByTagName("parsererror").length)&&i.error("Invalid XML: "+t),r};var ve=/#.*$/,tf=/([?&])_=[^&]*/,ye=/^(.*?):[ \t]*([^\r\n]*)$/mg,pe=/^(?:GET|HEAD)$/,we=/^\/\//,rf={},yi={},uf="*/".concat("*"),pi=u.createElement("a");pi.href=ct.href;i.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ct.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(ct.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":uf,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":i.parseJSON,"text xml":i.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(n,t){return t?wi(wi(n,i.ajaxSettings),t):wi(i.ajaxSettings,n)},ajaxPrefilter:ff(rf),ajaxTransport:ff(yi),ajax:function(t,r){function b(t,r,u,h){var v,rt,it,p,b,a=r;s!==2&&(s=2,d&&n.clearTimeout(d),l=undefined,k=h||"",e.readyState=t>0?4:0,v=t>=200&&t<300||t===304,u&&(p=be(f,e,u)),p=ke(f,p,e,v),v?(f.ifModified&&(b=e.getResponseHeader("Last-Modified"),b&&(i.lastModified[o]=b),b=e.getResponseHeader("etag"),b&&(i.etag[o]=b)),t===204||f.type==="HEAD"?a="nocontent":t===304?a="notmodified":(a=p.state,rt=p.data,it=p.error,v=!it)):(it=a,(t||!a)&&(a="error",t<0&&(t=0))),e.status=t,e.statusText=(r||a)+"",v?nt.resolveWith(c,[rt,a,e]):nt.rejectWith(c,[e,a,it]),e.statusCode(w),w=undefined,y&&g.trigger(v?"ajaxSuccess":"ajaxError",[e,f,v?rt:it]),tt.fireWith(c,[e,a]),y&&(g.trigger("ajaxComplete",[e,f]),--i.active||i.event.trigger("ajaxStop")))}typeof t=="object"&&(r=t,t=undefined);r=r||{};var l,o,k,p,d,a,y,v,f=i.ajaxSetup({},r),c=f.context||f,g=f.context&&(c.nodeType||c.jquery)?i(c):i.event,nt=i.Deferred(),tt=i.Callbacks("once memory"),w=f.statusCode||{},it={},rt={},s=0,ut="canceled",e={readyState:0,getResponseHeader:function(n){var t;if(s===2){if(!p)for(p={};t=ye.exec(k);)p[t[1].toLowerCase()]=t[2];t=p[n.toLowerCase()]}return t==null?null:t},getAllResponseHeaders:function(){return s===2?k:null},setRequestHeader:function(n,t){var i=n.toLowerCase();return s||(n=rt[i]=rt[i]||n,it[n]=t),this},overrideMimeType:function(n){return s||(f.mimeType=n),this},statusCode:function(n){var t;if(n)if(s<2)for(t in n)w[t]=[w[t],n[t]];else e.always(n[e.status]);return this},abort:function(n){var t=n||ut;return l&&l.abort(t),b(0,t),this}};if(nt.promise(e).complete=tt.add,e.success=e.done,e.error=e.fail,f.url=((t||f.url||ct.href)+"").replace(ve,"").replace(we,ct.protocol+"//"),f.type=r.method||r.type||f.method||f.type,f.dataTypes=i.trim(f.dataType||"*").toLowerCase().match(h)||[""],f.crossDomain==null){a=u.createElement("a");try{a.href=f.url;a.href=a.href;f.crossDomain=pi.protocol+"//"+pi.host!=a.protocol+"//"+a.host}catch(ft){f.crossDomain=!0}}if(f.data&&f.processData&&typeof f.data!="string"&&(f.data=i.param(f.data,f.traditional)),ef(rf,f,r,e),s===2)return e;y=i.event&&f.global;y&&i.active++==0&&i.event.trigger("ajaxStart");f.type=f.type.toUpperCase();f.hasContent=!pe.test(f.type);o=f.url;f.hasContent||(f.data&&(o=f.url+=(vi.test(o)?"&":"?")+f.data,delete f.data),f.cache===!1&&(f.url=tf.test(o)?o.replace(tf,"$1_="+ai++):o+(vi.test(o)?"&":"?")+"_="+ai++));f.ifModified&&(i.lastModified[o]&&e.setRequestHeader("If-Modified-Since",i.lastModified[o]),i.etag[o]&&e.setRequestHeader("If-None-Match",i.etag[o]));(f.data&&f.hasContent&&f.contentType!==!1||r.contentType)&&e.setRequestHeader("Content-Type",f.contentType);e.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+(f.dataTypes[0]!=="*"?", "+uf+"; q=0.01":""):f.accepts["*"]);for(v in f.headers)e.setRequestHeader(v,f.headers[v]);if(f.beforeSend&&(f.beforeSend.call(c,e,f)===!1||s===2))return e.abort();ut="abort";for(v in{success:1,error:1,complete:1})e[v](f[v]);if(l=ef(yi,f,r,e),l){if(e.readyState=1,y&&g.trigger("ajaxSend",[e,f]),s===2)return e;f.async&&f.timeout>0&&(d=n.setTimeout(function(){e.abort("timeout")},f.timeout));try{s=1;l.send(it,b)}catch(ft){if(s<2)b(-1,ft);else throw ft;}}else b(-1,"No Transport");return e},getJSON:function(n,t,r){return i.get(n,t,r,"json")},getScript:function(n,t){return i.get(n,undefined,t,"script")}});i.each(["get","post"],function(n,t){i[t]=function(n,r,u,f){return i.isFunction(r)&&(f=f||u,u=r,r=undefined),i.ajax(i.extend({url:n,type:t,dataType:f,data:r,success:u},i.isPlainObject(n)&&n))}});i._evalUrl=function(n){return i.ajax({url:n,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})};i.fn.extend({wrapAll:function(n){var t;return i.isFunction(n)?this.each(function(t){i(this).wrapAll(n.call(this,t))}):(this[0]&&(t=i(n,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var n=this;n.firstElementChild;)n=n.firstElementChild;return n}).append(this)),this)},wrapInner:function(n){return i.isFunction(n)?this.each(function(t){i(this).wrapInner(n.call(this,t))}):this.each(function(){var t=i(this),r=t.contents();r.length?r.wrapAll(n):t.append(n)})},wrap:function(n){var t=i.isFunction(n);return this.each(function(r){i(this).wrapAll(t?n.call(this,r):n)})},unwrap:function(){return this.parent().each(function(){i.nodeName(this,"body")||i(this).replaceWith(this.childNodes)}).end()}});i.expr.filters.hidden=function(n){return!i.expr.filters.visible(n)};i.expr.filters.visible=function(n){return n.offsetWidth>0||n.offsetHeight>0||n.getClientRects().length>0};var de=/%20/g,ge=/\[\]$/,of=/\r?\n/g,no=/^(?:submit|button|image|reset|file)$/i,to=/^(?:input|select|textarea|keygen)/i;return i.param=function(n,t){var r,u=[],f=function(n,t){t=i.isFunction(t)?t():t==null?"":t;u[u.length]=encodeURIComponent(n)+"="+encodeURIComponent(t)};if(t===undefined&&(t=i.ajaxSettings&&i.ajaxSettings.traditional),i.isArray(n)||n.jquery&&!i.isPlainObject(n))i.each(n,function(){f(this.name,this.value)});else for(r in n)bi(r,n[r],t,f);return u.join("&").replace(de,"+")},i.fn.extend({serialize:function(){return i.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var n=i.prop(this,"elements");return n?i.makeArray(n):this}).filter(function(){var n=this.type;return this.name&&!i(this).is(":disabled")&&to.test(this.nodeName)&&!no.test(n)&&(this.checked||!yr.test(n))}).map(function(n,t){var r=i(this).val();return r==null?null:i.isArray(r)?i.map(r,function(n){return{name:t.name,value:n.replace(of,"\r\n")}}):{name:t.name,value:r.replace(of,"\r\n")}}).get()}}),i.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(t){}},sf={0:200,1223:204},ut=i.ajaxSettings.xhr(),f.cors=!!ut&&"withCredentials"in ut,f.ajax=ut=!!ut,i.ajaxTransport(function(t){var i,r;if(f.cors||ut&&!t.crossDomain)return{send:function(u,f){var o,e=t.xhr();if(e.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)e[o]=t.xhrFields[o];t.mimeType&&e.overrideMimeType&&e.overrideMimeType(t.mimeType);t.crossDomain||u["X-Requested-With"]||(u["X-Requested-With"]="XMLHttpRequest");for(o in u)e.setRequestHeader(o,u[o]);i=function(n){return function(){i&&(i=r=e.onload=e.onerror=e.onabort=e.onreadystatechange=null,n==="abort"?e.abort():n==="error"?typeof e.status!="number"?f(0,"error"):f(e.status,e.statusText):f(sf[e.status]||e.status,e.statusText,(e.responseType||"text")!=="text"||typeof e.responseText!="string"?{binary:e.response}:{text:e.responseText},e.getAllResponseHeaders()))}};e.onload=i();r=e.onerror=i("error");e.onabort!==undefined?e.onabort=r:e.onreadystatechange=function(){e.readyState===4&&n.setTimeout(function(){i&&r()})};i=i("abort");try{e.send(t.hasContent&&t.data||null)}catch(s){if(i)throw s;}},abort:function(){i&&i()}}}),i.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(n){return i.globalEval(n),n}}}),i.ajaxPrefilter("script",function(n){n.cache===undefined&&(n.cache=!1);n.crossDomain&&(n.type="GET")}),i.ajaxTransport("script",function(n){if(n.crossDomain){var r,t;return{send:function(f,e){r=i("<script>").prop({charset:n.scriptCharset,src:n.url}).on("load error",t=function(n){r.remove();t=null;n&&e(n.type==="error"?404:200,n.type)});u.head.appendChild(r[0])},abort:function(){t&&t()}}}}),ki=[],ni=/(=)\?(?=&|$)|\?\?/,i.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var n=ki.pop()||i.expando+"_"+ai++;return this[n]=!0,n}}),i.ajaxPrefilter("json jsonp",function(t,r,u){var f,e,o,s=t.jsonp!==!1&&(ni.test(t.url)?"url":typeof t.data=="string"&&(t.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&ni.test(t.data)&&"data");if(s||t.dataTypes[0]==="jsonp")return f=t.jsonpCallback=i.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(ni,"$1"+f):t.jsonp!==!1&&(t.url+=(vi.test(t.url)?"&":"?")+t.jsonp+"="+f),t.converters["script json"]=function(){return o||i.error(f+" was not called"),o[0]},t.dataTypes[0]="json",e=n[f],n[f]=function(){o=arguments},u.always(function(){e===undefined?i(n).removeProp(f):n[f]=e;t[f]&&(t.jsonpCallback=r.jsonpCallback,ki.push(f));o&&i.isFunction(e)&&e(o[0]);o=e=undefined}),"script"}),i.parseHTML=function(n,t,r){if(!n||typeof n!="string")return null;typeof t=="boolean"&&(r=t,t=!1);t=t||u;var f=rr.exec(n),e=!r&&[];return f?[t.createElement(f[1])]:(f=kr([n],t,e),e&&e.length&&i(e).remove(),i.merge([],f.childNodes))},di=i.fn.load,i.fn.load=function(n,t,r){if(typeof n!="string"&&di)return di.apply(this,arguments);var u,o,s,f=this,e=n.indexOf(" ");return e>-1&&(u=i.trim(n.slice(e)),n=n.slice(0,e)),i.isFunction(t)?(r=t,t=undefined):t&&typeof t=="object"&&(o="POST"),f.length>0&&i.ajax({url:n,type:o||"GET",dataType:"html",data:t}).done(function(n){s=arguments;f.html(u?i("<div>").append(i.parseHTML(n)).find(u):n)}).always(r&&function(n,t){f.each(function(){r.apply(this,s||[n.responseText,t,n])})}),this},i.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(n,t){i.fn[t]=function(n){return this.on(t,n)}}),i.expr.filters.animated=function(n){return i.grep(i.timers,function(t){return n===t.elem}).length},i.offset={setOffset:function(n,t,r){var e,o,s,h,u,c,v,l=i.css(n,"position"),a=i(n),f={};l==="static"&&(n.style.position="relative");u=a.offset();s=i.css(n,"top");c=i.css(n,"left");v=(l==="absolute"||l==="fixed")&&(s+c).indexOf("auto")>-1;v?(e=a.position(),h=e.top,o=e.left):(h=parseFloat(s)||0,o=parseFloat(c)||0);i.isFunction(t)&&(t=t.call(n,r,i.extend({},u)));t.top!=null&&(f.top=t.top-u.top+h);t.left!=null&&(f.left=t.left-u.left+o);"using"in t?t.using.call(n,f):a.css(f)}},i.fn.extend({offset:function(n){if(arguments.length)return n===undefined?this:this.each(function(t){i.offset.setOffset(this,n,t)});var t,f,r=this[0],u={top:0,left:0},e=r&&r.ownerDocument;if(e)return(t=e.documentElement,!i.contains(t,r))?u:(u=r.getBoundingClientRect(),f=hf(e),{top:u.top+f.pageYOffset-t.clientTop,left:u.left+f.pageXOffset-t.clientLeft})},position:function(){if(this[0]){var n,r,u=this[0],t={top:0,left:0};return i.css(u,"position")==="fixed"?r=u.getBoundingClientRect():(n=this.offsetParent(),r=this.offset(),i.nodeName(n[0],"html")||(t=n.offset()),t.top+=i.css(n[0],"borderTopWidth",!0),t.left+=i.css(n[0],"borderLeftWidth",!0)),{top:r.top-t.top-i.css(u,"marginTop",!0),left:r.left-t.left-i.css(u,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var n=this.offsetParent;n&&i.css(n,"position")==="static";)n=n.offsetParent;return n||ht})}}),i.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(n,t){var r="pageYOffset"===t;i.fn[n]=function(i){return a(this,function(n,i,u){var f=hf(n);if(u===undefined)return f?f[t]:n[i];f?f.scrollTo(r?f.pageXOffset:u,r?u:f.pageYOffset):n[i]=u},n,i,arguments.length)}}),i.each(["top","left"],function(n,t){i.cssHooks[t]=ci(f.pixelPosition,function(n,r){if(r)return r=tt(n,t),si.test(r)?i(n).position()[t]+"px":r})}),i.each({Height:"height",Width:"width"},function(n,t){i.each({padding:"inner"+n,content:t,"":"outer"+n},function(r,u){i.fn[u]=function(u,f){var e=arguments.length&&(r||typeof u!="boolean"),o=r||(u===!0||f===!0?"margin":"border");return a(this,function(t,r,u){var f;return i.isWindow(t)?t.document.documentElement["client"+n]:t.nodeType===9?(f=t.documentElement,Math.max(t.body["scroll"+n],f["scroll"+n],t.body["offset"+n],f["offset"+n],f["client"+n])):u===undefined?i.css(t,r,o):i.style(t,r,u,o)},t,e?u:undefined,e,null)}})}),i.fn.extend({bind:function(n,t,i){return this.on(n,null,t,i)},unbind:function(n,t){return this.off(n,null,t)},delegate:function(n,t,i,r){return this.on(t,n,i,r)},undelegate:function(n,t,i){return arguments.length===1?this.off(n,"**"):this.off(t,n||"**",i)},size:function(){return this.length}}),i.fn.andSelf=i.fn.addBack,typeof define=="function"&&define.amd&&define("jquery",[],function(){return i}),cf=n.jQuery,lf=n.$,i.noConflict=function(t){return n.$===i&&(n.$=lf),t&&n.jQuery===i&&(n.jQuery=cf),i},t||(n.jQuery=n.$=i),i}),typeof JSON!="object"&&(JSON={}),function(){"use strict";function i(n){return n<10?"0"+n:n}function o(){return this.valueOf()}function s(n){return f.lastIndex=0,f.test(n)?'"'+n.replace(f,function(n){var t=h[n];return typeof t=="string"?t:"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+n+'"'}function u(i,f){var o,l,h,a,v=n,c,e=f[i];e&&typeof e=="object"&&typeof e.toJSON=="function"&&(e=e.toJSON(i));typeof t=="function"&&(e=t.call(f,i,e));switch(typeof e){case"string":return s(e);case"number":return isFinite(e)?String(e):"null";case"boolean":case"null":return String(e);case"object":if(!e)return"null";if(n+=r,c=[],Object.prototype.toString.apply(e)==="[object Array]"){for(a=e.length,o=0;o<a;o+=1)c[o]=u(o,e)||"null";return h=c.length===0?"[]":n?"[\n"+n+c.join(",\n"+n)+"\n"+v+"]":"["+c.join(",")+"]",n=v,h}if(t&&typeof t=="object")for(a=t.length,o=0;o<a;o+=1)typeof t[o]=="string"&&(l=t[o],h=u(l,e),h&&c.push(s(l)+(n?": ":":")+h));else for(l in e)Object.prototype.hasOwnProperty.call(e,l)&&(h=u(l,e),h&&c.push(s(l)+(n?": ":":")+h));return h=c.length===0?"{}":n?"{\n"+n+c.join(",\n"+n)+"\n"+v+"}":"{"+c.join(",")+"}",n=v,h}}var c=/^[\],:{}\s]*$/,l=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,a=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,v=/(?:^|:|,)(?:\s*\[)+/g,f=/[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,e=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n,r,h,t;typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+i(this.getUTCMonth()+1)+"-"+i(this.getUTCDate())+"T"+i(this.getUTCHours())+":"+i(this.getUTCMinutes())+":"+i(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=o,Number.prototype.toJSON=o,String.prototype.toJSON=o);typeof JSON.stringify!="function"&&(h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(i,f,e){var o;if(n="",r="",typeof e=="number")for(o=0;o<e;o+=1)r+=" ";else typeof e=="string"&&(r=e);if(t=f,f&&typeof f!="function"&&(typeof f!="object"||typeof f.length!="number"))throw new Error("JSON.stringify");return u("",{"":i})});typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){function walk(n,t){var r,u,i=n[t];if(i&&typeof i=="object")for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(u=walk(i,r),u!==undefined?i[r]=u:delete i[r]);return reviver.call(n,t,i)}var j;if(text=String(text),e.lastIndex=0,e.test(text)&&(text=text.replace(e,function(n){return"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})),c.test(text.replace(l,"@").replace(a,"]").replace(v,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse");})}(),function(){function di(n,t){return n.set(t[0],t[1]),n}function gi(n,t){return n.add(t),n}function f(n,t,i){switch(i.length){case 0:return n.call(t);case 1:return n.call(t,i[0]);case 2:return n.call(t,i[0],i[1]);case 3:return n.call(t,i[0],i[1],i[2])}return n.apply(t,i)}function nr(n,t,i,r){for(var f,u=-1,e=n?n.length:0;++u<e;)f=n[u],t(r,f,i(f),n);return r}function s(n,t){for(var i=-1,r=n?n.length:0;++i<r&&!1!==t(n[i],i,n););return n}function tr(n,t){for(var i=n?n.length:0;i--&&!1!==t(n[i],i,n););return n}function bt(n,t){for(var i=-1,r=n?n.length:0;++i<r;)if(!t(n[i],i,n))return!1;return!0}function v(n,t){for(var r,i=-1,f=n?n.length:0,e=0,u=[];++i<f;)r=n[i],t(r,i,n)&&(u[e++]=r);return u}function tt(n,t){return!(!n||!n.length)&&-1<p(n,t,0)}function ot(n,t,i){for(var r=-1,u=n?n.length:0;++r<u;)if(i(t,n[r]))return!0;return!1}function r(n,t){for(var i=-1,r=n?n.length:0,u=Array(r);++i<r;)u[i]=t(n[i],i,n);return u}function c(n,t){for(var i=-1,r=t.length,u=n.length;++i<r;)n[u+i]=t[i];return n}function d(n,t,i,r){var u=-1,f=n?n.length:0;for(r&&f&&(i=n[++u]);++u<f;)i=t(i,n[u],u,n);return i}function ir(n,t,i,r){var u=n?n.length:0;for(r&&u&&(i=n[--u]);u--;)i=t(i,n[u],u,n);return i}function st(n,t){for(var i=-1,r=n?n.length:0;++i<r;)if(t(n[i],i,n))return!0;return!1}function kt(n,t,i){var r;return i(n,function(n,i,u){if(t(n,i,u))return r=i,!1}),r}function it(n,t,i,r){var u=n.length;for(i+=r?1:-1;r?i--:++i<u;)if(t(n[i],i,n))return i;return-1}function p(n,t,i){if(t===t)n:{--i;for(var r=n.length;++i<r;)if(n[i]===t){n=i;break n}n=-1}else n=it(n,dt,i);return n}function rr(n,t,i,r){--i;for(var u=n.length;++i<u;)if(r(n[i],t))return i;return-1}function dt(n){return n!==n}function gt(n,t){var i=n?n.length:0;return i?ct(n,t)/i:ut}function ht(t){return function(i){return null==i?n:i[t]}}function rt(t){return function(i){return null==t?n:t[i]}}function ni(n,t,i,r,u){return u(n,function(n,u,f){i=r?(r=!1,n):t(i,n,u,f)}),i}function ur(n,t){var i=n.length;for(n.sort(t);i--;)n[i]=n[i].c;return n}function ct(t,i){for(var r,u,f=-1,e=t.length;++f<e;)u=i(t[f]),u!==n&&(r=r===n?u:r+u);return r}function lt(n,t){for(var i=-1,r=Array(n);++i<n;)r[i]=t(i);return r}function fr(n,t){return r(t,function(t){return[t,n[t]]})}function o(n){return function(t){return n(t)}}function at(n,t){return r(t,function(t){return n[t]})}function g(n,t){return n.has(t)}function ti(n,t){for(var i=-1,r=n.length;++i<r&&-1<p(t,n[i],0););return i}function ii(n,t){for(var i=n.length;i--&&-1<p(t,n[i],0););return i}function er(n){return"\\"+gu[n]}function nt(n){var i=-1,t=Array(n.size);return n.forEach(function(n,r){t[++i]=[r,n]}),t}function vt(n,t){return function(i){return n(t(i))}}function l(n,t){for(var r,i=-1,f=n.length,e=0,u=[];++i<f;)r=n[i],r!==t&&"__lodash_placeholder__"!==r||(n[i]="__lodash_placeholder__",u[e++]=i);return u}function w(n){var i=-1,t=Array(n.size);return n.forEach(function(n){t[++i]=n}),t}function or(n){var i=-1,t=Array(n.size);return n.forEach(function(n){t[++i]=[n,n]}),t}function b(n){if(k.test(n)){for(var t=pt.lastIndex=0;pt.test(n);)++t;n=t}else n=uf(n);return n}function h(n){return k.test(n)?n.match(pt)||[]:n.split("")}var n,y=1/0,ut=NaN,sr=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],hr=/\b__p\+='';/g,cr=/\b(__p\+=)''\+/g,lr=/(__e\(.*?\)|\b__t\))\+'';/g,ri=/&(?:amp|lt|gt|quot|#39);/g,ui=/[&<>"']/g,ar=RegExp(ri.source),vr=RegExp(ui.source),yr=/<%-([\s\S]+?)%>/g,pr=/<%([\s\S]+?)%>/g,fi=/<%=([\s\S]+?)%>/g,wr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,br=/^\w*$/,kr=/^\./,dr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yt=/[\\^$.*+?()[\]{}|]/g,gr=RegExp(yt.source),ei=/^\s+|\s+$/g,oi=/^\s+/,nu=/\s+$/,tu=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,iu=/\{\n\/\* \[wrapped with (.+)\] \*/,ru=/,? & /,uu=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fu=/\\(\\)?/g,eu=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,si=/\w*$/,ou=/^[-+]0x[0-9a-f]+$/i,su=/^0b[01]+$/i,hu=/^\[object .+?Constructor\]$/,cu=/^0o[0-7]+$/i,lu=/^(?:0|[1-9]\d*)$/,au=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ft=/($^)/,vu=/['\n\r\u2028\u2029\\]/g,hi="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?)*",yu="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+hi,pu=RegExp("['’]","g"),wu=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]","g"),pt=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]?|[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])"+hi,"g"),bu=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\\d+",yu].join("|"),"g"),k=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),ku=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,du="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),i={},t;i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0;i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1;t={};t["[object Arguments]"]=t["[object Array]"]=t["[object ArrayBuffer]"]=t["[object DataView]"]=t["[object Boolean]"]=t["[object Date]"]=t["[object Float32Array]"]=t["[object Float64Array]"]=t["[object Int8Array]"]=t["[object Int16Array]"]=t["[object Int32Array]"]=t["[object Map]"]=t["[object Number]"]=t["[object Object]"]=t["[object RegExp]"]=t["[object Set]"]=t["[object String]"]=t["[object Symbol]"]=t["[object Uint8Array]"]=t["[object Uint8ClampedArray]"]=t["[object Uint16Array]"]=t["[object Uint32Array]"]=!0;t["[object Error]"]=t["[object Function]"]=t["[object WeakMap]"]=!1;var e,gu={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},nf=parseFloat,tf=parseInt,ci=typeof global=="object"&&global&&global.Object===Object&&global,rf=typeof self=="object"&&self&&self.Object===Object&&self,u=ci||rf||Function("return this")(),wt=typeof exports=="object"&&exports&&!exports.nodeType&&exports,et=wt&&typeof module=="object"&&module&&!module.nodeType&&module,li=et&&et.exports===wt,ai=li&&ci.h;n:{try{e=ai&&ai.g("util");break n}catch(di){}e=void 0}var vi=e&&e.isArrayBuffer,yi=e&&e.isDate,pi=e&&e.isMap,wi=e&&e.isRegExp,bi=e&&e.isSet,ki=e&&e.isTypedArray,uf=ht("length"),ff=rt({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","Ĳ":"IJ","ĳ":"ij","Œ":"Oe","œ":"oe","ŉ":"'n","ſ":"s"}),ef=rt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),of=rt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),a=function rt(e){function vf(n){return bf.call(n)}function et(n){if(hf(n)&&!wt(n)&&!(n instanceof ai)){if(n instanceof ue)return n;if(rf.call(n,"__wrapped__"))return wy(n)}return new ue(n)}function ds(){}function ue(t,i){this.__wrapped__=t;this.__actions__=[];this.__chain__=!!i;this.__index__=0;this.__values__=n}function ai(n){this.__wrapped__=n;this.__actions__=[];this.__dir__=1;this.__filtered__=!1;this.__iteratees__=[];this.__takeCount__=4294967295;this.__views__=[]}function fo(n){var i=-1,r=n?n.length:0,t;for(this.clear();++i<r;)t=n[i],this.set(t[0],t[1])}function pe(n){var i=-1,r=n?n.length:0,t;for(this.clear();++i<r;)t=n[i],this.set(t[0],t[1])}function we(n){var i=-1,r=n?n.length:0,t;for(this.clear();++i<r;)t=n[i],this.set(t[0],t[1])}function eo(n){var t=-1,i=n?n.length:0;for(this.__data__=new we;++t<i;)this.add(n[t])}function he(n){this.size=(this.__data__=new pe(n)).size}function pa(n,t){var i,u=wt(n),r=!u&&yo(n),f=!u&&!r&&uo(n),e=!u&&!r&&!f&&us(n),r=(u=u||r||f||e)?lt(n.length,hk):[],o=r.length;for(i in n)!t&&!rf.call(n,i)||u&&("length"==i||f&&("offset"==i||"parent"==i)||e&&("buffer"==i||"byteLength"==i||"byteOffset"==i)||de(i,o))||r.push(i);return r}function wa(t){var i=t.length;return i?t[il(0,i-1)]:n}function nb(n,t){return ah(kf(n),oo(t,0,n.length))}function tb(n){return ah(kf(n))}function ac(t,i,r,u){return t===n||ye(t,cs[r])&&!rf.call(u,r)?i:t}function vc(t,i,r){(r===n||ye(t[i],r))&&(r!==n||i in t)||ce(t,i,r)}function fs(t,i,r){var u=t[i];rf.call(t,i)&&ye(u,r)&&(r!==n||i in t)||ce(t,i,r)}function gs(n,t){for(var i=n.length;i--;)if(ye(n[i][0],t))return i;return-1}function ib(n,t,i,r){return ro(n,function(n,u,f){t(r,n,i(n),f)}),r}function ba(n,t){return n&&lo(t,cf(t),n)}function ce(n,t,i){"__proto__"==t&&ec?ec(n,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[t]=i}function yc(t,i){for(var r=-1,e=null==t,u=i.length,f=af(u);++r<u;)f[r]=e?n:bl(t,i[r]);return f}function oo(t,i,r){return t===t&&(r!==n&&(t=t<=r?t:r),i!==n&&(t=t>=i?t:i)),t}function le(i,r,u,f,e,o,h){var c,l,a,v;if(f&&(c=o?f(i,e,o,h):f(i)),c!==n)return c;if(!gu(i))return i;if(e=wt(i)){if(c=uk(i),!r)return kf(i,c)}else{if(l=vf(i),a="[object Function]"==l||"[object GeneratorFunction]"==l,uo(i))return pv(i,r);if("[object Object]"==l||"[object Arguments]"==l||a&&!o){if(c=cy(a?{}:i),!r)return db(i,ba(c,i))}else{if(!t[l])return o?i:{};c=fk(i,l,le,r)}}return(h||(h=new he),o=h.get(i))?o:(h.set(i,c),v=e?n:(u?rk:cf)(i),s(v||i,function(n,t){v&&(t=n,n=i[t]);fs(c,t,le(n,r,u,f,t,i,h))}),c)}function rb(n){var t=cf(n);return function(i){return ka(i,n,t)}}function ka(t,i,r){var u=r.length;if(null==t)return!u;for(t=uf(t);u--;){var f=r[u],o=i[f],e=t[f];if(e===n&&!(f in t)||!o(e))return!1}return!0}function da(t,i,r){if(typeof t!="function")throw new se("Expected a function");return bs(function(){t.apply(n,r)},i)}function so(n,t,i,u){var a=-1,h=tt,c=!0,v=n.length,e=[],y=t.length,l;if(!v)return e;i&&(t=r(t,o(i)));u?(h=ot,c=!1):200<=t.length&&(h=g,c=!1,t=new eo(t));n:for(;++a<v;){var f=n[a],s=i?i(f):f,f=u||0!==f?f:0;if(c&&s===s){for(l=y;l--;)if(t[l]===s)continue n;e.push(f)}else h(t,s,u)||e.push(f)}return e}function ub(n,t){var i=!0;return ro(n,function(n,r,u){return i=!!t(n,r,u)}),i}function nh(t,i,r){for(var e,u,o,h,f=-1,s=t.length;++f<s;)e=t[f],u=i(e),null!=u&&(o===n?u===u&&!re(u):r(u,o))&&(o=u,h=e);return h}function ga(n,t){var i=[];return ro(n,function(n,r,u){t(n,r,u)&&i.push(n)}),i}function yf(n,t,i,r,u){var e=-1,o=n.length,f;for(i||(i=ek),u||(u=[]);++e<o;)f=n[e],0<t&&i(f)?1<t?yf(f,t-1,i,r,u):c(u,f):r||(u[u.length]=f);return u}function ae(n,t){return n&&oa(n,t,cf)}function pc(n,t){return n&&hw(n,t,cf)}function th(n,t){return v(t,function(t){return ge(n[t])})}function po(t,i){i=ve(i,t)?[i]:co(i);for(var r=0,u=i.length;null!=t&&r<u;)t=t[gf(i[r++])];return r&&r==u?t:n}function wc(n,t,i){return t=t(n),wt(n)?t:c(t,i(n))}function bc(n,t){return n>t}function fb(n,t){return null!=n&&rf.call(n,t)}function eb(n,t){return null!=n&&t in uf(n)}function kc(t,i,u){for(var e,p,w=u?ot:tt,b=t[0].length,a=t.length,f=a,v=af(a),y=1/0,c=[];f--;)e=t[f],f&&i&&(e=r(e,o(i))),y=wf(e.length,y),v[f]=!u&&(i||120<=b&&120<=e.length)?new eo(f&&e):n;var e=t[0],k=-1,l=v[0];n:for(;++k<b&&c.length<y;){var s=e[k],h=i?i(s):s,s=u||0!==s?s:0;if(l?!g(l,h):!w(c,h,u)){for(f=a;--f;)if(p=v[f],p?!g(p,h):!w(t[f],h,u))continue n;l&&l.push(h);c.push(s)}}return c}function ob(n,t,i){var r={};return ae(n,function(n,u,f){t(r,i(n),u,f)}),r}function es(t,i,r){return ve(i,t)||(i=co(i),t=al(t,i),i=ne(i)),i=null==t?t:t[gf(i)],null==i?n:f(i,t,r)}function nv(n){return hf(n)&&"[object Arguments]"==bf.call(n)}function sb(n){return hf(n)&&"[object ArrayBuffer]"==bf.call(n)}function hb(n){return hf(n)&&"[object Date]"==bf.call(n)}function to(t,i,r,u,f){var h,l,c,a,p;if(t===i)i=!0;else if(null!=t&&null!=i&&(gu(t)||hf(i)))n:{var s=wt(t),l=wt(i),o="[object Array]",e="[object Array]";if(s||(o=vf(t),o="[object Arguments]"==o?"[object Object]":o),l||(e=vf(i),e="[object Arguments]"==e?"[object Object]":e),h="[object Object]"==o,l="[object Object]"==e,(e=o==e)&&uo(t)){if(!uo(i)){i=!1;break n}s=!0;h=!1}if(e&&!h)f||(f=new he),i=s||us(t)?sy(t,i,to,r,u,f):ik(t,i,o,to,r,u,f);else{if(!(2&u)&&(s=h&&rf.call(t,"__wrapped__"),o=l&&rf.call(i,"__wrapped__"),s||o)){t=s?t.value():t;i=o?i.value():i;f||(f=new he);i=to(t,i,r,u,f);break n}if(e)t:if(f||(f=new he),s=2&u,o=cf(t),l=o.length,e=cf(i).length,l==e||s){for(h=l;h--;)if(c=o[h],!(s?c in i:rf.call(i,c))){i=!1;break t}if((e=f.get(t))&&f.get(i))i=e==i;else{for(e=!0,f.set(t,i),f.set(i,t),a=s;++h<l;){var c=o[h],v=t[c],y=i[c];if(r&&(p=s?r(y,v,c,i,t,f):r(v,y,c,t,i,f)),p===n?v!==y&&!to(v,y,r,u,f):!p){e=!1;break}a||(a="constructor"==c)}e&&!a&&(r=t.constructor,u=i.constructor,r!=u&&"constructor"in t&&"constructor"in i&&!(typeof r=="function"&&r instanceof r&&typeof u=="function"&&u instanceof u)&&(e=!1));f.delete(t);f.delete(i);i=e}}else i=!1;else i=!1}}else i=t!==t&&i!==i;return i}function cb(n){return hf(n)&&"[object Map]"==vf(n)}function dc(t,i,r,u){var e=r.length,c=e,l=!u,f,h;if(null==t)return!c;for(t=uf(t);e--;)if(f=r[e],l&&f[2]?f[1]!==t[f[0]]:!(f[0]in t))return!1;for(;++e<c;){var f=r[e],o=f[0],s=t[o],a=f[1];if(l&&f[2]){if(s===n&&!(o in t))return!1}else if((f=new he,u)&&(h=u(s,a,o,t,i,f)),h===n?!to(a,s,u,3,f):!h)return!1}return!0}function tv(n){return!(!gu(n)||iw&&iw in n)&&(ge(n)?vk:hu).test(vo(n))}function lb(n){return gu(n)&&"[object RegExp]"==bf.call(n)}function ab(n){return hf(n)&&"[object Set]"==vf(n)}function vb(n){return hf(n)&&bh(n.length)&&!!i[bf.call(n)]}function iv(n){return typeof n=="function"?n:null==n?pf:typeof n=="object"?wt(n)?fv(n[0],n[1]):uv(n):gp(n)}function gc(n){if(!hs(n))return nd(n);var t,i=[];for(t in uf(n))rf.call(n,t)&&"constructor"!=t&&i.push(t);return i}function nl(n,t){return n<t}function rv(n,t){var r=-1,i=te(n)?af(n.length):[];return ro(n,function(n,u,f){i[++r]=t(n,u,f)}),i}function uv(n){var t=cl(n);return 1==t.length&&t[0][2]?ly(t[0][0],t[0][1]):function(i){return i===n||dc(i,n,t)}}function fv(t,i){return ve(t)&&i===i&&!gu(i)?ly(gf(t),i):function(r){var u=bl(r,t);return u===n&&u===i?pp(r,t):to(i,u,n,3)}}function ih(t,i,r,u,f){t!==i&&oa(i,function(e,o){var s,a;if(gu(e)){f||(f=new he);var l=f,c=t[o],h=i[o],s=l.get(h);if(s)vc(t,o,s);else{if(s=u?u(c,h,o+"",t,i,l):n,a=s===n,a){var v=wt(h),y=!v&&uo(h),p=!v&&!y&&us(h),s=h;v||y||p?wt(c)?s=c:sf(c)?s=kf(c):y?(a=!1,s=pv(h,!0)):p?(a=!1,s=wv(h,!0)):s=[]:wl(h)||yo(h)?(s=c,yo(c)?s=yp(c):(!gu(c)||r&&ge(c))&&(s=cy(h))):a=!1}a&&(l.set(h,s),ih(s,h,r,u,l),l.delete(h));vc(t,o,s)}}else l=u?u(t[o],e,o+"",t,i,f):n,l===n&&(l=e),vc(t,o,l)},oe)}function ev(t,i){var r=t.length;if(r)return i+=0>i?r:0,de(i,r)?t[i]:n}function ov(n,t,i){var u=-1;return t=r(t.length?t:[pf],o(pt())),n=rv(n,function(n){return{a:r(t,function(t){return t(n)}),b:++u,c:n}}),ur(n,function(n,t){var r,u;n:{r=-1;for(var f=n.a,e=t.a,o=f.length,s=i.length;++r<o;)if(u=bv(f[r],e[r]),u){r=r>=s?u:u*("desc"==i[r]?-1:1);break n}r=n.b-t.b}return r})}function sv(n,t){return n=uf(n),hv(n,t,function(t,i){return i in n})}function hv(n,t,i){for(var r,u,f=-1,o=t.length,e={};++f<o;)r=t[f],u=n[r],i(u,r)&&ce(e,r,u);return e}function yb(n){return function(t){return po(t,n)}}function tl(n,t,i,u){var c=u?rr:p,h=-1,l=t.length,f=n;for(n===t&&(t=kf(t)),i&&(f=r(n,o(i)));++h<l;)for(var e=0,s=t[h],s=i?i(s):s;-1<(e=c(f,s,e,u));)f!==n&&fc.call(f,e,1),fc.call(n,e,1);return n}function cv(n,t){for(var e,i,u,r=n?t.length:0,f=r-1;r--;)i=t[r],(r==f||i!==e)&&(e=i,de(i)?fc.call(n,i,1):ve(i,n)?delete n[gf(i)]:(i=co(i),u=al(n,i),null!=u&&delete u[gf(ne(i))]))}function il(n,t){return n+sc(ew()*(t-n+1))}function rl(n,t){var i="";if(!n||1>t||9007199254740991<t)return i;do t%2&&(i+=n),(t=sc(t/2))&&(n+=n);while(t);return i}function ci(n,t){return ca(vy(n,t,pf),n+"")}function pb(n){return wa(go(n))}function wb(n,t){var i=go(n);return ah(i,oo(t,0,i.length))}function os(t,i,r,u){var o,h,e;if(!gu(t))return t;i=ve(i,t)?[i]:co(i);for(var s=-1,c=i.length,l=c-1,f=t;null!=f&&++s<c;)o=gf(i[s]),e=r,s!=l&&(h=f[o],e=u?u(h,o,f):n,e===n&&(e=gu(h)?h:de(i[s+1])?[]:{})),fs(f,o,e),f=f[o];return t}function bb(n){return ah(go(n))}function fe(n,t,i){var u=-1,r=n.length;for(0>t&&(t=-t>r?0:r+t),i=i>r?r:i,0>i&&(i+=r),r=t>i?0:i-t>>>0,t>>>=0,i=af(r);++u<r;)i[u]=n[u+t];return i}function kb(n,t){var i;return ro(n,function(n,r,u){return i=t(n,r,u),!i}),!!i}function rh(n,t,i){var f=0,r=n?n.length:f,e,u;if(typeof t=="number"&&t===t&&2147483647>=r){for(;f<r;)e=f+r>>>1,u=n[e],null!==u&&!re(u)&&(i?u<=t:u<t)?f=e+1:r=e;return r}return ul(n,t,pf,i)}function ul(t,i,r,u){i=r(i);for(var s=0,e=t?t.length:0,v=i!==i,y=null===i,p=re(i),w=i===n;s<e;){var h=sc((s+e)/2),f=r(t[h]),c=f!==n,l=null===f,o=f===f,a=re(f);(v?u||o:w?o&&(u||c):y?o&&c&&(u||!l):p?o&&c&&!l&&(u||!a):l||a?0:u?f<=i:f<i)?s=h+1:e=h}return wf(e,4294967294)}function lv(n,t){for(var i,u,e,r=-1,o=n.length,s=0,f=[];++r<o;)i=n[r],u=t?t(i):i,r&&ye(u,e)||(e=u,f[s++]=0===i?0:i);return f}function av(n){return typeof n=="number"?n:re(n)?ut:+n}function ie(n){if(typeof n=="string")return n;if(wt(n))return r(n,ie)+"";if(re(n))return ow?ow.call(n):"";var t=n+"";return"0"==t&&1/n==-y?"-0":t}function ho(n,t,i){var c=-1,o=tt,l=n.length,s=!0,f=[],r=f,h;if(i)s=!1,o=ot;else if(200<=l){if(o=t?null:ld(n))return w(o);s=!1;o=g;r=new eo}else r=t?[]:f;n:for(;++c<l;){var u=n[c],e=t?t(u):u,u=i||0!==u?u:0;if(s&&e===e){for(h=r.length;h--;)if(r[h]===e)continue n;t&&r.push(e);f.push(u)}else o(r,e,i)||(r!==f&&r.push(e),f.push(u))}return f}function uh(n,t,i,r){for(var f=n.length,u=r?f:-1;(r?u--:++u<f)&&t(n[u],u,n););return i?fe(n,r?0:u,r?u+1:f):fe(n,r?u+1:0,r?f:u)}function vv(n,t){var i=n;return i instanceof ai&&(i=i.value()),d(t,function(n,t){return t.func.apply(t.thisArg,c([n],t.args))},i)}function fl(n,t,i){for(var r,u=-1,f=n.length;++u<f;)r=r?c(so(r,n[u],t,i),so(n[u],r,t,i)):n[u];return r&&r.length?ho(r,t,i):[]}function yv(t,i,r){for(var u=-1,e=t.length,o=i.length,f={};++u<e;)r(f,t[u],u<o?i[u]:n);return f}function el(n){return sf(n)?n:[]}function co(n){return wt(n)?n:vw(n)}function io(t,i,r){var u=t.length;return r=r===n?u:r,!i&&r>=u?t:fe(t,i,r)}function pv(n,t){if(t)return n.slice();var i=n.length,i=rw?rw(i):new n.constructor(i);return n.copy(i),i}function ol(n){var t=new n.constructor(n.byteLength);return new rc(t).set(new rc(n)),t}function wv(n,t){return new n.constructor(t?ol(n.buffer):n.buffer,n.byteOffset,n.length)}function bv(t,i){if(t!==i){var o=t!==n,s=null===t,r=t===t,u=re(t),h=i!==n,c=null===i,f=i===i,e=re(i);if(!c&&!e&&!u&&t>i||u&&h&&f&&!c&&!e||s&&h&&f||!o&&f||!r)return 1;if(!s&&!u&&!e&&t<i||e&&o&&r&&!s&&!u||c&&o&&r||!h&&r||!f)return-1}return 0}function kv(n,t,i,r){var u=-1,o=n.length,s=i.length,f=-1,h=t.length,c=lf(o-s,0),e=af(h+c);for(r=!r;++f<h;)e[f]=t[f];for(;++u<s;)(r||u<o)&&(e[i[u]]=n[u]);for(;c--;)e[f++]=n[u++];return e}function dv(n,t,i,r){var u=-1,s=n.length,h=-1,c=i.length,o=-1,l=t.length,f=lf(s-c,0),e=af(f+l);for(r=!r;++u<f;)e[u]=n[u];for(f=u;++o<l;)e[f+o]=t[o];for(;++h<c;)(r||u<s)&&(e[f+i[h]]=n[u++]);return e}function kf(n,t){var i=-1,r=n.length;for(t||(t=af(r));++i<r;)t[i]=n[i];return t}function lo(t,i,r,u){var h=!r,o,s,f,e;for(r||(r={}),o=-1,s=i.length;++o<s;)f=i[o],e=u?u(r[f],t[f],f,r,t):n,e===n&&(e=t[f]),h?ce(r,f,e):fs(r,f,e);return r}function db(n,t){return lo(n,ha(n),t)}function fh(n,t){return function(i,r){var u=wt(i)?nr:ib,f=t?t():{};return u(i,n,pt(r,2),f)}}function wo(t){return ci(function(i,r){var o=-1,u=r.length,f=1<u?r[u-1]:n,e=2<u?r[2]:n,f=3<t.length&&typeof f=="function"?(u--,f):n;for(e&&df(r[0],r[1],e)&&(f=3>u?n:f,u=1),i=uf(i);++o<u;)(e=r[o])&&t(i,e,o,f);return i})}function gv(n,t){return function(i,r){if(null==i)return i;if(!te(i))return n(i,r);for(var f=i.length,u=t?f:-1,e=uf(i);(t?u--:++u<f)&&!1!==r(e[u],u,e););return i}}function ny(n){return function(t,i,r){var o=-1,e=uf(t),u,f;for(r=r(t),u=r.length;u--;)if(f=r[n?u:++o],!1===i(e[f],f,e))break;return t}}function gb(n,t,i){function r(){return(this&&this!==u&&this instanceof r?e:n).apply(f?i:this,arguments)}var f=1&t,e=ss(n);return r}function ty(t){return function(i){i=yu(i);var r=k.test(i)?h(i):n,u=r?r[0]:i.charAt(0);return i=r?io(r,1).join(""):i.slice(1),u[t]()+i}}function bo(n){return function(t){return d(dp(kp(t).replace(pu,"")),n,"")}}function ss(n){return function(){var t=arguments,i;switch(t.length){case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}return i=rs(n.prototype),t=n.apply(i,t),gu(t)?t:i}}function nk(t,i,r){function e(){for(var s=arguments.length,h=af(s),c=s,a=ko(e);c--;)h[c]=arguments[c];return c=3>s&&h[0]!==a&&h[s-1]!==a?[]:l(h,a),s-=c.length,s<r?ey(t,i,eh,e.placeholder,n,h,c,n,n,r-s):f(this&&this!==u&&this instanceof e?o:t,this,h)}var o=ss(t);return e}function iy(t){return function(i,r,u){var f=uf(i),e;return te(i)||(e=pt(r,3),i=cf(i),r=function(n){return e(f[n],n,f)}),r=t(i,r,u),-1<r?f[e?i[r]:r]:n}}function ry(t){return ke(function(i){var o=i.length,e=o,s=ue.prototype.thru,u,r;for(t&&i.reverse();e--;){if(u=i[e],typeof u!="function")throw new se("Expected a function");s&&!r&&"wrapper"==ch(u)&&(r=new ue([],!0))}for(e=r?e:o;++e<o;)var u=i[e],s=ch(u),f="wrapper"==s?sa(u):n,r=f&&ll(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?r[ch(f[0])].apply(r,f[3]):1==u.length&&ll(u)?r[s]():r.thru(u);return function(){var n=arguments,t=n[0],u;if(r&&1==n.length&&wt(t)&&200<=t.length)return r.plant(t).value();for(u=0,n=o?i[u].apply(this,n):t;++u<o;)n=i[u].call(this,n);return n}})}function eh(t,i,r,f,e,o,s,h,c,a){function v(){for(var rt,it,ut,et,ft,tt=arguments.length,g=af(tt),nt=tt;nt--;)g[nt]=arguments[nt];if(y)for(it=ko(v),nt=g.length,rt=0;nt--;)g[nt]===it&&++rt;if(f&&(g=kv(g,f,e,y)),o&&(g=dv(g,o,s,y)),tt-=rt,y&&tt<a)return it=l(g,it),ey(t,i,eh,v.placeholder,r,g,it,h,c,a-tt);if(it=b?r:this,nt=p?it[t]:t,tt=g.length,h)for(rt=g.length,ut=wf(h.length,rt),et=kf(g);ut--;)ft=h[ut],g[ut]=de(ft,rt)?et[ft]:n;else k&&1<tt&&g.reverse();return w&&c<tt&&(g.length=c),this&&this!==u&&this instanceof v&&(nt=d||ss(nt)),nt.apply(it,g)}var w=128&i,b=1&i,p=2&i,y=24&i,k=512&i,d=p?n:ss(t);return v}function uy(n,t){return function(i,r){return ob(i,n,t(r))}}function oh(t,i){return function(r,u){var f;if(r===n&&u===n)return i;if(r!==n&&(f=r),u!==n){if(f===n)return u;typeof r=="string"||typeof u=="string"?(r=ie(r),u=ie(u)):(r=av(r),u=av(u));f=t(r,u)}return f}}function sl(n){return ke(function(t){return t=r(t,o(pt())),ci(function(i){var r=this;return n(t,function(n){return f(n,r,i)})})})}function sh(t,i){i=i===n?" ":ie(i);var r=i.length;return 2>r?r?rl(i,t):i:(r=rl(i,oc(t/b(i))),k.test(i)?io(h(r),0,t).join(""):r.slice(0,t))}function tk(n,t,i,r){function e(){for(var a=-1,c=arguments.length,t=-1,l=r.length,h=af(l+c),v=this&&this!==u&&this instanceof e?s:n;++t<l;)h[t]=r[t];for(;c--;)h[t++]=arguments[++a];return f(v,o?i:this,h)}var o=1&t,s=ss(n);return e}function fy(t){return function(i,r,u){var e,f;for(u&&typeof u!="number"&&df(i,r,u)&&(r=u=n),i=no(i),r===n?(r=i,i=0):r=no(r),u=u===n?i<r?1:-1:no(u),e=-1,r=lf(oc((r-i)/(u||1)),0),f=af(r);r--;)f[t?r:++e]=i,i+=u;return f}}function hh(n){return function(t,i){return typeof t=="string"&&typeof i=="string"||(t=ee(t),i=ee(i)),n(t,i)}}function ey(t,i,r,u,f,e,o,s,h,c){var l=8&i,v=l?o:n,a;return o=l?n:o,a=l?e:n,e=l?n:e,i=(i|(l?32:64))&~(l?64:32),4&i||(i&=-4),f=[t,i,f,a,v,e,o,s,h,c],r=r.apply(n,f),ll(t)&&aw(r,f),r.placeholder=u,yy(r,t,i)}function hl(n){var t=ns[n];return function(n,i){if(n=ee(n),i=wf(hi(i),292)){var r=(yu(n)+"e").split("e"),r=t(r[0]+"e"+(+r[1]+i)),r=(yu(r)+"e").split("e");return+(r[0]+"e"+(+r[1]-i))}return t(n)}}function oy(n){return function(t){var i=vf(t);return"[object Map]"==i?nt(t):"[object Set]"==i?or(t):fr(t,n(t))}}function be(t,i,r,u,f,e,o,s){var a=2&i,c,v,y,h;if(!a&&typeof t!="function")throw new se("Expected a function");return c=u?u.length:0,(c||(i&=-97,u=f=n),o=o===n?o:lf(hi(o),0),s=s===n?s:hi(s),c-=f?f.length:0,64&i)&&(v=u,y=f,u=f=n),h=a?n:sa(t),e=[t,i,r,u,f,v,y,e,o,s],h&&(r=e[1],t=h[1],i=r|t,u=128==t&&8==r||128==t&&256==r&&e[7].length<=h[8]||384==t&&h[7].length<=h[8]&&8==r,131>i||u)&&(1&t&&(e[2]=h[2],i|=1&r?0:4),(r=h[3])&&(u=e[3],e[3]=u?kv(u,r,h[4]):r,e[4]=u?l(e[3],"__lodash_placeholder__"):h[4]),(r=h[5])&&(u=e[5],e[5]=u?dv(u,r,h[6]):r,e[6]=u?l(e[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(e[7]=r),128&t&&(e[8]=null==e[8]?h[8]:wf(e[8],h[8])),null==e[9]&&(e[9]=h[9]),e[0]=h[0],e[1]=i),t=e[0],i=e[1],r=e[2],u=e[3],f=e[4],s=e[9]=null==e[9]?a?0:t.length:lf(e[9]-c,0),!s&&24&i&&(i&=-25),yy((h?cw:aw)(i&&1!=i?8==i||16==i?nk(t,i,s):32!=i&&33!=i||f.length?eh.apply(n,e):tk(t,i,r,u):gb(t,i,r),e),t,i)}function sy(t,i,r,u,f,e){var y=2&f,l=t.length,o=i.length,s,h,v;if(l!=o&&!(y&&o>l))return!1;if((o=e.get(t))&&e.get(i))return o==i;var o=-1,c=!0,a=1&f?new eo:n;for(e.set(t,i),e.set(i,t);++o<l;){if(s=t[o],h=i[o],u&&(v=y?u(h,s,o,i,t,e):u(s,h,o,t,i,e)),v!==n){if(v)continue;c=!1;break}if(a){if(!st(i,function(n,t){if(!g(a,t)&&(s===n||r(s,n,u,f,e)))return a.push(t)})){c=!1;break}}else if(s!==h&&!r(s,h,u,f,e)){c=!1;break}}return e.delete(t),e.delete(i),c}function ik(n,t,i,r,u,f,e){switch(i){case"[object DataView]":if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)break;n=n.buffer;t=t.buffer;case"[object ArrayBuffer]":if(n.byteLength!=t.byteLength||!r(new rc(n),new rc(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return ye(+n,+t);case"[object Error]":return n.name==t.name&&n.message==t.message;case"[object RegExp]":case"[object String]":return n==t+"";case"[object Map]":var o=nt;case"[object Set]":if(o||(o=w),n.size!=t.size&&!(2&f))break;return(i=e.get(n))?i==t:(f|=1,e.set(n,t),t=sy(o(n),o(t),r,u,f,e),e.delete(n),t);case"[object Symbol]":if(ws)return ws.call(n)==ws.call(t)}return!1}function ke(t){return ca(vy(t,n,dy),t+"")}function rk(n){return wc(n,cf,ha)}function ch(n){for(var i,r,t=n.name+"",u=ps[t],f=rf.call(ps,t)?u.length:0;f--;)if(i=u[f],r=i.func,null==r||r==n)return i.name;return t}function ko(n){return(rf.call(et,"placeholder")?et:n).placeholder}function pt(){var n=et.iteratee||dl,n=n===dl?iv:n;return arguments.length?n(arguments[0],arguments[1]):n}function lh(n,t){var r=n.__data__,i=typeof t;return("string"==i||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==t:null===t)?r[typeof t=="string"?"string":"hash"]:r.map}function cl(n){for(var u,i,t=cf(n),r=t.length;r--;)u=t[r],i=n[u],t[r]=[u,i,i===i&&!gu(i)];return t}function ao(t,i){var r=null==t?n:t[i];return tv(r)?r:n}function hy(n,t,i){var u;t=ve(t,n)?[t]:co(t);for(var f=-1,r=t.length,e=!1;++f<r;){if(u=gf(t[f]),!(e=null!=n&&i(n,u)))break;n=n[u]}return e||++f!=r?e:(r=n?n.length:0,!!r&&bh(r)&&de(u,r)&&(wt(n)||yo(n)))}function uk(n){var i=n.length,t=n.constructor(i);return i&&"string"==typeof n[0]&&rf.call(n,"index")&&(t.index=n.index,t.input=n.input),t}function cy(n){return typeof n.constructor!="function"||hs(n)?{}:rs(uc(n))}function fk(n,t,i,r){var u=n.constructor;switch(t){case"[object ArrayBuffer]":return ol(n);case"[object Boolean]":case"[object Date]":return new u(+n);case"[object DataView]":return t=r?ol(n.buffer):n.buffer,new n.constructor(t,n.byteOffset,n.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return wv(n,r);case"[object Map]":return t=r?i(nt(n),!0):nt(n),d(t,di,new n.constructor);case"[object Number]":case"[object String]":return new u(n);case"[object RegExp]":return t=new n.constructor(n.source,si.exec(n)),t.lastIndex=n.lastIndex,t;case"[object Set]":return t=r?i(w(n),!0):w(n),d(t,gi,new n.constructor);case"[object Symbol]":return ws?uf(ws.call(n)):{}}}function ek(n){return wt(n)||yo(n)||!!(fw&&n&&n[fw])}function de(n,t){return t=null==t?9007199254740991:t,!!t&&(typeof n=="number"||lu.test(n))&&-1<n&&0==n%1&&n<t}function df(n,t,i){if(!gu(i))return!1;var r=typeof t;return!!("number"==r?te(i)&&de(t,i.length):"string"==r&&t in i)&&ye(i[t],n)}function ve(n,t){if(wt(n))return!1;var i=typeof n;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=n&&!re(n))||br.test(n)||!wr.test(n)||null!=t&&n in uf(t)}function ll(n){var t=ch(n),i=et[t];return typeof i=="function"&&t in ai.prototype&&(n===i||(t=sa(i),!!t&&n===t[0]))}function hs(n){var t=n&&n.constructor;return n===(typeof t=="function"&&t.prototype||cs)}function ly(t,i){return function(r){return null!=r&&r[t]===i&&(i!==n||t in uf(r))}}function ay(t,i,r,u,f,e){return gu(t)&&gu(i)&&(e.set(i,t),ih(t,i,n,ay,e),e.delete(i)),t}function vy(t,i,r){return i=lf(i===n?t.length-1:i,0),function(){for(var e=arguments,n=-1,u=lf(e.length-i,0),o=af(u);++n<u;)o[n]=e[i+n];for(n=-1,u=af(i+1);++n<i;)u[n]=e[n];return u[i]=r(o),f(t,this,u)}}function al(n,t){return 1==t.length?n:po(n,fe(t,0,-1))}function yy(n,t,i){var f=t+"",r,u;return t=ca,u=ok,r=(r=f.match(iu))?r[1].split(ru):[],i=u(r,i),(u=i.length)&&(r=u-1,i[r]=(1<u?"& ":"")+i[r],i=i.join(2<u?", ":" "),f=f.replace(tu,"{\n/* [wrapped with "+i+"] */\n")),t(n,f)}function py(t){var i=0,r=0;return function(){var u=td(),f=16-(u-r);if(r=u,0<f){if(500<=++i)return arguments[0]}else i=0;return t.apply(n,arguments)}}function ah(t,i){var u=-1,r=t.length,e=r-1,f;for(i=i===n?r:i;++u<i;)r=il(u,e),f=t[r],t[r]=t[u],t[u]=f;return t.length=i,t}function gf(n){if(typeof n=="string"||re(n))return n;var t=n+"";return"0"==t&&1/n==-y?"-0":t}function vo(n){if(null!=n){try{return tc.call(n)}catch(n){}return n+""}return""}function ok(n,t){return s(sr,function(i){var r="_."+i[0];t&i[1]&&!tt(n,r)&&n.push(r)}),n.sort()}function wy(n){if(n instanceof ai)return n.clone();var t=new ue(n.__wrapped__,n.__chain__);return t.__actions__=kf(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}function by(n,t,i){var r=n?n.length:0;return r?(i=null==i?0:hi(i),0>i&&(i=lf(r+i,0)),it(n,pt(t,3),i)):-1}function ky(t,i,r){var f=t?t.length:0,u;return f?(u=f-1,r!==n&&(u=hi(r),u=0>r?lf(f+u,0):wf(u,f-1)),it(t,pt(i,3),u,!0)):-1}function dy(n){return n&&n.length?yf(n,1):[]}function gy(t){return t&&t.length?t[0]:n}function ne(t){var i=t?t.length:0;return i?t[i-1]:n}function np(n,t){return n&&n.length&&t&&t.length?tl(n,t):n}function vl(n){return n?rd.call(n):n}function yl(n){if(!n||!n.length)return[];var t=0;return n=v(n,function(n){if(sf(n))return t=lf(n.length,t),!0}),lt(t,function(t){return r(n,ht(t))})}function tp(t,i){if(!t||!t.length)return[];var u=yl(t);return null==i?u:r(u,function(t){return f(i,n,t)})}function ip(n){return n=et(n),n.__chain__=!0,n}function vh(n,t){return t(n)}function sk(){return this}function rp(n,t){return(wt(n)?s:ro)(n,pt(t,3))}function up(n,t){return(wt(n)?tr:sw)(n,pt(t,3))}function yh(n,t){return(wt(n)?r:rv)(n,pt(t,3))}function fp(t,i,r){return i=r?n:i,i=t&&null==i?t.length:i,be(t,128,n,n,n,n,i)}function ep(t,i){var r;if(typeof i!="function")throw new se("Expected a function");return t=hi(t),function(){return 0<--t&&(r=i.apply(this,arguments)),1>=t&&(i=n),r}}function op(t,i,r){return i=r?n:i,t=be(t,8,n,n,n,n,n,i),t.placeholder=op.placeholder,t}function sp(t,i,r){return i=r?n:i,t=be(t,16,n,n,n,n,n,i),t.placeholder=sp.placeholder,t}function hp(t,i,r){function v(i){var r=e,u=o;return e=o=n,h=i,s=t.apply(u,r)}function w(t){var r=t-f;return t-=h,f===n||r>=i||0>r||a&&t>=l}function c(){var n=lc(),t,r;if(w(n))return b(n);r=bs;t=n-h;n=i-(n-f);t=a?wf(n,l-t):n;u=r(c,t)}function b(t){return u=n,p&&e?v(t):(e=o=n,s)}function y(){var t=lc(),r=w(t);if(e=arguments,o=this,f=t,r){if(u===n)return h=t=f,u=bs(c,i),k?v(t):s;if(a)return u=bs(c,i),v(f)}return u===n&&(u=bs(c,i)),s}var e,o,l,s,u,f,h=0,k=!1,a=!1,p=!0;if(typeof t!="function")throw new se("Expected a function");return i=ee(i)||0,gu(r)&&(k=!!r.leading,l=(a="maxWait"in r)?lf(ee(r.maxWait)||0,i):l,p="trailing"in r?!!r.trailing:p),y.cancel=function(){u!==n&&cd(u);h=0;e=f=o=u=n},y.flush=function(){return u===n?s:b(lc())},y}function ph(n,t){function i(){var r=arguments,f=t?t.apply(this,r):r[0],u=i.cache;return u.has(f)?u.get(f):(r=n.apply(this,r),i.cache=u.set(f,r)||u,r)}if(typeof n!="function"||t&&typeof t!="function")throw new se("Expected a function");return i.cache=new(ph.Cache||we),i}function wh(n){if(typeof n!="function")throw new se("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function ye(n,t){return n===t||n!==n&&t!==t}function te(n){return null!=n&&bh(n.length)&&!ge(n)}function sf(n){return hf(n)&&te(n)}function pl(n){return!!hf(n)&&("[object Error]"==bf.call(n)||typeof n.message=="string"&&typeof n.name=="string")}function ge(n){return n=gu(n)?bf.call(n):"","[object Function]"==n||"[object GeneratorFunction]"==n||"[object Proxy]"==n}function cp(n){return typeof n=="number"&&n==hi(n)}function bh(n){return typeof n=="number"&&-1<n&&0==n%1&&9007199254740991>=n}function gu(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function hf(n){return null!=n&&typeof n=="object"}function lp(n){return typeof n=="number"||hf(n)&&"[object Number]"==bf.call(n)}function wl(n){return!(!hf(n)||"[object Object]"!=bf.call(n))&&(n=uc(n),null===n||(n=rf.call(n,"constructor")&&n.constructor,typeof n=="function"&&n instanceof n&&tc.call(n)==lk))}function kh(n){return typeof n=="string"||!wt(n)&&hf(n)&&"[object String]"==bf.call(n)}function re(n){return typeof n=="symbol"||hf(n)&&"[object Symbol]"==bf.call(n)}function ap(n){if(!n)return[];if(te(n))return kh(n)?h(n):kf(n);if(ls&&n[ls]){n=n[ls]();for(var t,i=[];!(t=n.next()).done;)i.push(t.value);return i}return t=vf(n),("[object Map]"==t?nt:"[object Set]"==t?w:go)(n)}function no(n){return n?(n=ee(n),n===y||n===-y?17976931348623157e292*(0>n?-1:1):n===n?n:0):0===n?n:0}function hi(n){n=no(n);var t=n%1;return n===n?t?n-t:n:0}function vp(n){return n?oo(hi(n),0,4294967295):0}function ee(n){if(typeof n=="number")return n;if(re(n))return ut;if(gu(n)&&(n=typeof n.valueOf=="function"?n.valueOf():n,n=gu(n)?n+"":n),typeof n!="string")return 0===n?n:+n;n=n.replace(ei,"");var t=su.test(n);return t||cu.test(n)?tf(n.slice(2),t?2:8):ou.test(n)?ut:+n}function yp(n){return lo(n,oe(n))}function yu(n){return null==n?"":ie(n)}function bl(t,i,r){return t=null==t?n:po(t,i),t===n?r:t}function pp(n,t){return null!=n&&hy(n,t,eb)}function cf(n){return te(n)?pa(n):gc(n)}function oe(n){if(te(n))n=pa(n,!0);else if(gu(n)){var t,i=hs(n),r=[];for(t in n)("constructor"!=t||!i&&rf.call(n,t))&&r.push(t);n=r}else{if(t=[],null!=n)for(i in uf(n))t.push(i);n=t}return n}function wp(n,t){return null==n?{}:hv(n,wc(n,oe,lw),pt(t))}function go(n){return n?at(n,cf(n)):[]}function bp(n){return ya(yu(n).toLowerCase())}function kp(n){return(n=yu(n))&&n.replace(au,ff).replace(wu,"")}function dp(t,i,r){return t=yu(t),i=r?n:i,i===n?ku.test(t)?t.match(bu)||[]:t.match(uu)||[]:t.match(i)||[]}function kl(n){return function(){return n}}function pf(n){return n}function dl(n){return iv(typeof n=="function"?n:le(n,!0))}function gl(n,t,i){var u=cf(t),r=th(t,u),f,e;return null!=i||gu(t)&&(r.length||!u.length)||(i=t,t=n,n=this,r=th(t,cf(t))),f=!(gu(i)&&"chain"in i&&!i.chain),e=ge(n),s(r,function(i){var r=t[i];n[i]=r;e&&(n.prototype[i]=function(){var i=this.__chain__,t;return f||i?(t=n(this.__wrapped__),(t.__actions__=kf(this.__actions__)).push({func:r,args:arguments,thisArg:n}),t.__chain__=i,t):r.apply(n,c([this.value()],arguments))})}),n}function na(){}function gp(n){return ve(n)?ht(gf(n)):yb(n)}function ta(){return[]}function ia(){return!1}e=e?a.defaults(u.Object(),e,a.pick(u,du)):u;var af=e.Array,dh=e.Date,nw=e.Error,tw=e.Function,ns=e.Math,uf=e.Object,ra=e.RegExp,hk=e.String,se=e.TypeError,gh=af.prototype,cs=uf.prototype,nc=e["__core-js_shared__"],iw=function(){var n=/[^.]+$/.exec(nc&&nc.keys&&nc.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),tc=tw.prototype.toString,rf=cs.hasOwnProperty,ck=0,lk=tc.call(uf),bf=cs.toString,ak=u._,vk=ra("^"+tc.call(rf).replace(yt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ic=li?e.Buffer:n,ts=e.Symbol,rc=e.Uint8Array,rw=ic?ic.f:n,uc=vt(uf.getPrototypeOf,uf),ls=ts?ts.iterator:n,uw=uf.create,yk=cs.propertyIsEnumerable,fc=gh.splice,fw=ts?ts.isConcatSpreadable:n,ec=function(){try{var n=ao(uf,"defineProperty");return n({},"",{}),n}catch(n){}}(),pk=e.clearTimeout!==u.clearTimeout&&e.clearTimeout,wk=dh&&dh.now!==u.Date.now&&dh.now,bk=e.setTimeout!==u.setTimeout&&e.setTimeout,oc=ns.ceil,sc=ns.floor,ua=uf.getOwnPropertySymbols,kk=ic?ic.isBuffer:n,dk=e.isFinite,gk=gh.join,nd=vt(uf.keys,uf),lf=ns.max,wf=ns.min,td=dh.now,id=e.parseInt,ew=ns.random,rd=gh.reverse,fa=ao(e,"DataView"),as=ao(e,"Map"),ea=ao(e,"Promise"),is=ao(e,"Set"),vs=ao(e,"WeakMap"),ys=ao(uf,"create"),hc=vs&&new vs,ps={},ud=vo(fa),fd=vo(as),ed=vo(ea),od=vo(is),sd=vo(vs),cc=ts?ts.prototype:n,ws=cc?cc.valueOf:n,ow=cc?cc.toString:n,rs=function(){function t(){}return function(i){return gu(i)?uw?uw(i):(t.prototype=i,i=new t,t.prototype=n,i):{}}}();et.templateSettings={escape:yr,evaluate:pr,interpolate:fi,variable:"",imports:{_:et}};et.prototype=ds.prototype;et.prototype.constructor=et;ue.prototype=rs(ds.prototype);ue.prototype.constructor=ue;ai.prototype=rs(ds.prototype);ai.prototype.constructor=ai;fo.prototype.clear=function(){this.__data__=ys?ys(null):{};this.size=0};fo.prototype.delete=function(n){return n=this.has(n)&&delete this.__data__[n],this.size-=n?1:0,n};fo.prototype.get=function(t){var i=this.__data__;return ys?(t=i[t],"__lodash_hash_undefined__"===t?n:t):rf.call(i,t)?i[t]:n};fo.prototype.has=function(t){var i=this.__data__;return ys?i[t]!==n:rf.call(i,t)};fo.prototype.set=function(t,i){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=ys&&i===n?"__lodash_hash_undefined__":i,this};pe.prototype.clear=function(){this.__data__=[];this.size=0};pe.prototype.delete=function(n){var t=this.__data__;return n=gs(t,n),!(0>n)&&(n==t.length-1?t.pop():fc.call(t,n,1),--this.size,!0)};pe.prototype.get=function(t){var i=this.__data__;return t=gs(i,t),0>t?n:i[t][1]};pe.prototype.has=function(n){return-1<gs(this.__data__,n)};pe.prototype.set=function(n,t){var i=this.__data__,r=gs(i,n);return 0>r?(++this.size,i.push([n,t])):i[r][1]=t,this};we.prototype.clear=function(){this.size=0;this.__data__={hash:new fo,map:new(as||pe),string:new fo}};we.prototype.delete=function(n){return n=lh(this,n).delete(n),this.size-=n?1:0,n};we.prototype.get=function(n){return lh(this,n).get(n)};we.prototype.has=function(n){return lh(this,n).has(n)};we.prototype.set=function(n,t){var i=lh(this,n),r=i.size;return i.set(n,t),this.size+=i.size==r?0:1,this};eo.prototype.add=eo.prototype.push=function(n){return this.__data__.set(n,"__lodash_hash_undefined__"),this};eo.prototype.has=function(n){return this.__data__.has(n)};he.prototype.clear=function(){this.__data__=new pe;this.size=0};he.prototype.delete=function(n){var t=this.__data__;return n=t.delete(n),this.size=t.size,n};he.prototype.get=function(n){return this.__data__.get(n)};he.prototype.has=function(n){return this.__data__.has(n)};he.prototype.set=function(n,t){var i=this.__data__,r;if(i instanceof pe){if(r=i.__data__,!as||199>r.length)return r.push([n,t]),this.size=++i.size,this;i=this.__data__=new we(r)}return i.set(n,t),this.size=i.size,this};var ro=gv(ae),sw=gv(pc,!0),oa=ny(),hw=ny(!0),cw=hc?function(n,t){return hc.set(n,t),n}:pf,hd=ec?function(n,t){return ec(n,"toString",{configurable:!0,enumerable:!1,value:kl(t),writable:!0})}:pf,cd=pk||function(n){return u.clearTimeout(n)},ld=is&&1/w(new is([,-0]))[1]==y?function(n){return new is(n)}:na,sa=hc?function(n){return hc.get(n)}:na,ha=ua?vt(ua,uf):ta,lw=ua?function(n){for(var t=[];n;)c(t,ha(n)),n=uc(n);return t}:ta;(fa&&"[object DataView]"!=vf(new fa(new ArrayBuffer(1)))||as&&"[object Map]"!=vf(new as)||ea&&"[object Promise]"!=vf(ea.resolve())||is&&"[object Set]"!=vf(new is)||vs&&"[object WeakMap]"!=vf(new vs))&&(vf=function(t){var i=bf.call(t);if(t=(t="[object Object]"==i?t.constructor:n)?vo(t):n)switch(t){case ud:return"[object DataView]";case fd:return"[object Map]";case ed:return"[object Promise]";case od:return"[object Set]";case sd:return"[object WeakMap]"}return i});var ad=nc?ge:ia,aw=py(cw),bs=bk||function(n,t){return u.setTimeout(n,t)},ca=py(hd),vw=function(n){n=ph(n,function(n){return 500===t.size&&t.clear(),n});var t=n.cache;return n}(function(n){n=yu(n);var t=[];return kr.test(n)&&t.push(""),n.replace(dr,function(n,i,r,u){t.push(r?u.replace(fu,"$1"):i||n)}),t}),vd=ci(function(n,t){return sf(n)?so(n,yf(t,1,sf,!0)):[]}),yd=ci(function(t,i){var r=ne(i);return sf(r)&&(r=n),sf(t)?so(t,yf(i,1,sf,!0),pt(r,2)):[]}),pd=ci(function(t,i){var r=ne(i);return sf(r)&&(r=n),sf(t)?so(t,yf(i,1,sf,!0),n,r):[]}),wd=ci(function(n){var t=r(n,el);return t.length&&t[0]===n[0]?kc(t):[]}),bd=ci(function(t){var u=ne(t),i=r(t,el);return u===ne(i)?u=n:i.pop(),i.length&&i[0]===t[0]?kc(i,pt(u,2)):[]}),kd=ci(function(t){var u=ne(t),i=r(t,el);return u===ne(i)?u=n:i.pop(),i.length&&i[0]===t[0]?kc(i,n,u):[]}),dd=ci(np),gd=ke(function(n,t){var i=n?n.length:0,u=yc(n,t);return cv(n,r(t,function(n){return de(n,i)?+n:n}).sort(bv)),u}),ng=ci(function(n){return ho(yf(n,1,sf,!0))}),tg=ci(function(t){var i=ne(t);return sf(i)&&(i=n),ho(yf(t,1,sf,!0),pt(i,2))}),ig=ci(function(t){var i=ne(t);return sf(i)&&(i=n),ho(yf(t,1,sf,!0),n,i)}),rg=ci(function(n,t){return sf(n)?so(n,t):[]}),ug=ci(function(n){return fl(v(n,sf))}),fg=ci(function(t){var i=ne(t);return sf(i)&&(i=n),fl(v(t,sf),pt(i,2))}),eg=ci(function(t){var i=ne(t);return sf(i)&&(i=n),fl(v(t,sf),n,i)}),og=ci(yl),sg=ci(function(t){var i=t.length,i=1<i?t[i-1]:n,i=typeof i=="function"?(t.pop(),i):n;return tp(t,i)}),hg=ke(function(t){function f(n){return yc(n,t)}var r=t.length,u=r?t[0]:0,i=this.__wrapped__;return!(1<r||this.__actions__.length)&&i instanceof ai&&de(u)?(i=i.slice(u,+u+(r?1:0)),i.__actions__.push({func:vh,args:[f],thisArg:n}),new ue(i,this.__chain__).thru(function(t){return r&&!t.length&&t.push(n),t})):this.thru(f)}),cg=fh(function(n,t,i){rf.call(n,i)?++n[i]:ce(n,i,1)}),lg=iy(by),ag=iy(ky),vg=fh(function(n,t,i){rf.call(n,i)?n[i].push(t):ce(n,i,[t])}),yg=ci(function(t,i,r){var e=-1,o=typeof i=="function",s=ve(i),u=te(t)?af(t.length):[];return ro(t,function(t){var h=o?i:s&&null!=t?t[i]:n;u[++e]=h?f(h,t,r):es(t,i,r)}),u}),pg=fh(function(n,t,i){ce(n,i,t)}),wg=fh(function(n,t,i){n[i?0:1].push(t)},function(){return[[],[]]}),bg=ci(function(n,t){if(null==n)return[];var i=t.length;return 1<i&&df(n,t[0],t[1])?t=[]:2<i&&df(t[0],t[1],t[2])&&(t=[t[0]]),ov(n,yf(t,1),[])}),lc=wk||function(){return u.Date.now()},la=ci(function(n,t,i){var r=1,u;return i.length&&(u=l(i,ko(la)),r=32|r),be(n,r,t,i,u)}),yw=ci(function(n,t,i){var r=3,u;return i.length&&(u=l(i,ko(yw)),r=32|r),be(t,r,n,i,u)}),kg=ci(function(n,t){return da(n,1,t)}),dg=ci(function(n,t,i){return da(n,ee(t)||0,i)});ph.Cache=we;var gg=ci(function(n,t){t=1==t.length&&wt(t[0])?r(t[0],o(pt())):r(yf(t,1),o(pt()));var i=t.length;return ci(function(r){for(var u=-1,e=wf(r.length,i);++u<e;)r[u]=t[u].call(this,r[u]);return f(n,this,r)})}),aa=ci(function(t,i){return be(t,32,n,i,l(i,ko(aa)))}),pw=ci(function(t,i){return be(t,64,n,i,l(i,ko(pw)))}),nn=ke(function(t,i){return be(t,256,n,n,n,i)}),tn=hh(bc),rn=hh(function(n,t){return n>=t}),yo=nv(function(){return arguments}())?nv:function(n){return hf(n)&&rf.call(n,"callee")&&!yk.call(n,"callee")},wt=af.isArray,un=vi?o(vi):sb,uo=kk||ia,fn=yi?o(yi):hb,en=pi?o(pi):cb,va=wi?o(wi):lb,on=bi?o(bi):ab,us=ki?o(ki):vb,sn=hh(nl),hn=hh(function(n,t){return n<=t}),cn=wo(function(n,t){if(hs(t)||te(t))lo(t,cf(t),n);else for(var i in t)rf.call(t,i)&&fs(n,i,t[i])}),ww=wo(function(n,t){lo(t,oe(t),n)}),ks=wo(function(n,t,i,r){lo(t,oe(t),n,r)}),ln=wo(function(n,t,i,r){lo(t,cf(t),n,r)}),an=ke(yc),vn=ci(function(t){return t.push(n,ac),f(ks,n,t)}),yn=ci(function(t){return t.push(n,ay),f(bw,n,t)}),pn=uy(function(n,t,i){n[t]=i},kl(pf)),wn=uy(function(n,t,i){rf.call(n,t)?n[t].push(i):n[t]=[i]},pt),bn=ci(es),kn=wo(function(n,t,i){ih(n,t,i)}),bw=wo(function(n,t,i,r){ih(n,t,i,r)}),dn=ke(function(n,t){return null==n?{}:(t=r(t,gf),sv(n,so(wc(n,oe,lw),t)))}),gn=ke(function(n,t){return null==n?{}:sv(n,r(t,gf))}),kw=oy(cf),dw=oy(oe),ntt=bo(function(n,t,i){return t=t.toLowerCase(),n+(i?bp(t):t)}),ttt=bo(function(n,t,i){return n+(i?"-":"")+t.toLowerCase()}),itt=bo(function(n,t,i){return n+(i?" ":"")+t.toLowerCase()}),rtt=ty("toLowerCase"),utt=bo(function(n,t,i){return n+(i?"_":"")+t.toLowerCase()}),ftt=bo(function(n,t,i){return n+(i?" ":"")+ya(t)}),ett=bo(function(n,t,i){return n+(i?" ":"")+t.toUpperCase()}),ya=ty("toUpperCase"),gw=ci(function(t,i){try{return f(t,n,i)}catch(t){return pl(t)?t:new nw(t)}}),ott=ke(function(n,t){return s(t,function(t){t=gf(t);ce(n,t,la(n[t],n))}),n}),stt=ry(),htt=ry(!0),ctt=ci(function(n,t){return function(i){return es(i,n,t)}}),ltt=ci(function(n,t){return function(i){return es(n,i,t)}}),att=sl(r),vtt=sl(bt),ytt=sl(st),ptt=fy(),wtt=fy(!0),btt=oh(function(n,t){return n+t},0),ktt=hl("ceil"),dtt=oh(function(n,t){return n/t},1),gtt=hl("floor"),nit=oh(function(n,t){return n*t},1),tit=hl("round"),iit=oh(function(n,t){return n-t},0);return et.after=function(n,t){if(typeof t!="function")throw new se("Expected a function");return n=hi(n),function(){if(1>--n)return t.apply(this,arguments)}},et.ary=fp,et.assign=cn,et.assignIn=ww,et.assignInWith=ks,et.assignWith=ln,et.at=an,et.before=ep,et.bind=la,et.bindAll=ott,et.bindKey=yw,et.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return wt(n)?n:[n]},et.chain=ip,et.chunk=function(t,i,r){if(i=(r?df(t,i,r):i===n)?1:lf(hi(i),0),r=t?t.length:0,!r||1>i)return[];for(var u=0,e=0,f=af(oc(r/i));u<r;)f[e++]=fe(t,u,u+=i);return f},et.compact=function(n){for(var t,i=-1,u=n?n.length:0,f=0,r=[];++i<u;)t=n[i],t&&(r[f++]=t);return r},et.concat=function(){var n=arguments.length,i,t;if(!n)return[];for(i=af(n-1),t=arguments[0];n--;)i[n-1]=arguments[n];return c(wt(t)?kf(t):[t],yf(i,1))},et.cond=function(n){var t=n?n.length:0,i=pt();return n=t?r(n,function(n){if("function"!=typeof n[1])throw new se("Expected a function");return[i(n[0]),n[1]]}):[],ci(function(i){for(var u,r=-1;++r<t;)if(u=n[r],f(u[0],this,i))return f(u[1],this,i)})},et.conforms=function(n){return rb(le(n,!0))},et.constant=kl,et.countBy=cg,et.create=function(n,t){var i=rs(n);return t?ba(i,t):i},et.curry=op,et.curryRight=sp,et.debounce=hp,et.defaults=vn,et.defaultsDeep=yn,et.defer=kg,et.delay=dg,et.difference=vd,et.differenceBy=yd,et.differenceWith=pd,et.drop=function(t,i,r){var u=t?t.length:0;return u?(i=r||i===n?1:hi(i),fe(t,0>i?0:i,u)):[]},et.dropRight=function(t,i,r){var u=t?t.length:0;return u?(i=r||i===n?1:hi(i),i=u-i,fe(t,0,0>i?0:i)):[]},et.dropRightWhile=function(n,t){return n&&n.length?uh(n,pt(t,3),!0,!0):[]},et.dropWhile=function(n,t){return n&&n.length?uh(n,pt(t,3),!0):[]},et.fill=function(t,i,r,u){var f=t?t.length:0;if(!f)return[];for(r&&typeof r!="number"&&df(t,i,r)&&(r=0,u=f),f=t.length,r=hi(r),0>r&&(r=-r>f?0:f+r),u=u===n||u>f?f:hi(u),0>u&&(u+=f),u=r>u?0:vp(u);r<u;)t[r++]=i;return t},et.filter=function(n,t){return(wt(n)?v:ga)(n,pt(t,3))},et.flatMap=function(n,t){return yf(yh(n,t),1)},et.flatMapDeep=function(n,t){return yf(yh(n,t),y)},et.flatMapDepth=function(t,i,r){return r=r===n?1:hi(r),yf(yh(t,i),r)},et.flatten=dy,et.flattenDeep=function(n){return n&&n.length?yf(n,y):[]},et.flattenDepth=function(t,i){return t&&t.length?(i=i===n?1:hi(i),yf(t,i)):[]},et.flip=function(n){return be(n,512)},et.flow=stt,et.flowRight=htt,et.fromPairs=function(n){for(var t,i=-1,u=n?n.length:0,r={};++i<u;)t=n[i],r[t[0]]=t[1];return r},et.functions=function(n){return null==n?[]:th(n,cf(n))},et.functionsIn=function(n){return null==n?[]:th(n,oe(n))},et.groupBy=vg,et.initial=function(n){return n&&n.length?fe(n,0,-1):[]},et.intersection=wd,et.intersectionBy=bd,et.intersectionWith=kd,et.invert=pn,et.invertBy=wn,et.invokeMap=yg,et.iteratee=dl,et.keyBy=pg,et.keys=cf,et.keysIn=oe,et.map=yh,et.mapKeys=function(n,t){var i={};return t=pt(t,3),ae(n,function(n,r,u){ce(i,t(n,r,u),n)}),i},et.mapValues=function(n,t){var i={};return t=pt(t,3),ae(n,function(n,r,u){ce(i,r,t(n,r,u))}),i},et.matches=function(n){return uv(le(n,!0))},et.matchesProperty=function(n,t){return fv(n,le(t,!0))},et.memoize=ph,et.merge=kn,et.mergeWith=bw,et.method=ctt,et.methodOf=ltt,et.mixin=gl,et.negate=wh,et.nthArg=function(n){return n=hi(n),ci(function(t){return ev(t,n)})},et.omit=dn,et.omitBy=function(n,t){return wp(n,wh(pt(t)))},et.once=function(n){return ep(2,n)},et.orderBy=function(t,i,r,u){return null==t?[]:(wt(i)||(i=null==i?[]:[i]),r=u?n:r,wt(r)||(r=null==r?[]:[r]),ov(t,i,r))},et.over=att,et.overArgs=gg,et.overEvery=vtt,et.overSome=ytt,et.partial=aa,et.partialRight=pw,et.partition=wg,et.pick=gn,et.pickBy=wp,et.property=gp,et.propertyOf=function(t){return function(i){return null==t?n:po(t,i)}},et.pull=dd,et.pullAll=np,et.pullAllBy=function(n,t,i){return n&&n.length&&t&&t.length?tl(n,t,pt(i,2)):n},et.pullAllWith=function(t,i,r){return t&&t.length&&i&&i.length?tl(t,i,n,r):t},et.pullAt=gd,et.range=ptt,et.rangeRight=wtt,et.rearg=nn,et.reject=function(n,t){return(wt(n)?v:ga)(n,wh(pt(t,3)))},et.remove=function(n,t){var r=[],u;if(!n||!n.length)return r;var i=-1,f=[],e=n.length;for(t=pt(t,3);++i<e;)u=n[i],t(u,i,n)&&(r.push(u),f.push(i));return cv(n,f),r},et.rest=function(t,i){if(typeof t!="function")throw new se("Expected a function");return i=i===n?i:hi(i),ci(t,i)},et.reverse=vl,et.sampleSize=function(t,i,r){return i=(r?df(t,i,r):i===n)?1:hi(i),(wt(t)?nb:wb)(t,i)},et.set=function(n,t,i){return null==n?n:os(n,t,i)},et.setWith=function(t,i,r,u){return u=typeof u=="function"?u:n,null==t?t:os(t,i,r,u)},et.shuffle=function(n){return(wt(n)?tb:bb)(n)},et.slice=function(t,i,r){var u=t?t.length:0;return u?(r&&typeof r!="number"&&df(t,i,r)?(i=0,r=u):(i=null==i?0:hi(i),r=r===n?u:hi(r)),fe(t,i,r)):[]},et.sortBy=bg,et.sortedUniq=function(n){return n&&n.length?lv(n):[]},et.sortedUniqBy=function(n,t){return n&&n.length?lv(n,pt(t,2)):[]},et.split=function(t,i,r){return r&&typeof r!="number"&&df(t,i,r)&&(i=r=n),r=r===n?4294967295:r>>>0,r?(t=yu(t))&&(typeof i=="string"||null!=i&&!va(i))&&(i=ie(i),!i&&k.test(t))?io(h(t),0,r):t.split(i,r):[]},et.spread=function(t,i){if(typeof t!="function")throw new se("Expected a function");return i=i===n?0:lf(hi(i),0),ci(function(n){var r=n[i];return n=io(n,0,i),r&&c(n,r),f(t,this,n)})},et.tail=function(n){var t=n?n.length:0;return t?fe(n,1,t):[]},et.take=function(t,i,r){return t&&t.length?(i=r||i===n?1:hi(i),fe(t,0,0>i?0:i)):[]},et.takeRight=function(t,i,r){var u=t?t.length:0;return u?(i=r||i===n?1:hi(i),i=u-i,fe(t,0>i?0:i,u)):[]},et.takeRightWhile=function(n,t){return n&&n.length?uh(n,pt(t,3),!1,!0):[]},et.takeWhile=function(n,t){return n&&n.length?uh(n,pt(t,3)):[]},et.tap=function(n,t){return t(n),n},et.throttle=function(n,t,i){var r=!0,u=!0;if(typeof n!="function")throw new se("Expected a function");return gu(i)&&(r="leading"in i?!!i.leading:r,u="trailing"in i?!!i.trailing:u),hp(n,t,{leading:r,maxWait:t,trailing:u})},et.thru=vh,et.toArray=ap,et.toPairs=kw,et.toPairsIn=dw,et.toPath=function(n){return wt(n)?r(n,gf):re(n)?[n]:kf(vw(n))},et.toPlainObject=yp,et.transform=function(n,t,i){var u=wt(n),f=u||uo(n)||us(n),r;return(t=pt(t,4),null==i)&&(r=n&&n.constructor,i=f?u?new r:[]:gu(n)&&ge(r)?rs(uc(n)):{}),(f?s:ae)(n,function(n,r,u){return t(i,n,r,u)}),i},et.unary=function(n){return fp(n,1)},et.union=ng,et.unionBy=tg,et.unionWith=ig,et.uniq=function(n){return n&&n.length?ho(n):[]},et.uniqBy=function(n,t){return n&&n.length?ho(n,pt(t,2)):[]},et.uniqWith=function(t,i){return t&&t.length?ho(t,n,i):[]},et.unset=function(n,t){var r,i;return null==n?r=!0:(r=n,i=t,i=ve(i,r)?[i]:co(i),r=al(r,i),i=gf(ne(i)),r=!(null!=r&&rf.call(r,i))||delete r[i]),r},et.unzip=yl,et.unzipWith=tp,et.update=function(n,t,i){return null==n?n:os(n,t,(typeof i=="function"?i:pf)(po(n,t)),void 0)},et.updateWith=function(t,i,r,u){return u=typeof u=="function"?u:n,null!=t&&(t=os(t,i,(typeof r=="function"?r:pf)(po(t,i)),u)),t},et.values=go,et.valuesIn=function(n){return null==n?[]:at(n,oe(n))},et.without=rg,et.words=dp,et.wrap=function(n,t){return t=null==t?pf:t,aa(t,n)},et.xor=ug,et.xorBy=fg,et.xorWith=eg,et.zip=og,et.zipObject=function(n,t){return yv(n||[],t||[],fs)},et.zipObjectDeep=function(n,t){return yv(n||[],t||[],os)},et.zipWith=sg,et.entries=kw,et.entriesIn=dw,et.extend=ww,et.extendWith=ks,gl(et,et),et.add=btt,et.attempt=gw,et.camelCase=ntt,et.capitalize=bp,et.ceil=ktt,et.clamp=function(t,i,r){return r===n&&(r=i,i=n),r!==n&&(r=ee(r),r=r===r?r:0),i!==n&&(i=ee(i),i=i===i?i:0),oo(ee(t),i,r)},et.clone=function(n){return le(n,!1,!0)},et.cloneDeep=function(n){return le(n,!0,!0)},et.cloneDeepWith=function(n,t){return le(n,!0,!0,t)},et.cloneWith=function(n,t){return le(n,!1,!0,t)},et.conformsTo=function(n,t){return null==t||ka(n,t,cf(t))},et.deburr=kp,et.defaultTo=function(n,t){return null==n||n!==n?t:n},et.divide=dtt,et.endsWith=function(t,i,r){t=yu(t);i=ie(i);var u=t.length,u=r=r===n?u:oo(hi(r),0,u);return r-=i.length,0<=r&&t.slice(r,u)==i},et.eq=ye,et.escape=function(n){return(n=yu(n))&&vr.test(n)?n.replace(ui,ef):n},et.escapeRegExp=function(n){return(n=yu(n))&&gr.test(n)?n.replace(yt,"\\$&"):n},et.every=function(t,i,r){var u=wt(t)?bt:ub;return r&&df(t,i,r)&&(i=n),u(t,pt(i,3))},et.find=lg,et.findIndex=by,et.findKey=function(n,t){return kt(n,pt(t,3),ae)},et.findLast=ag,et.findLastIndex=ky,et.findLastKey=function(n,t){return kt(n,pt(t,3),pc)},et.floor=gtt,et.forEach=rp,et.forEachRight=up,et.forIn=function(n,t){return null==n?n:oa(n,pt(t,3),oe)},et.forInRight=function(n,t){return null==n?n:hw(n,pt(t,3),oe)},et.forOwn=function(n,t){return n&&ae(n,pt(t,3))},et.forOwnRight=function(n,t){return n&&pc(n,pt(t,3))},et.get=bl,et.gt=tn,et.gte=rn,et.has=function(n,t){return null!=n&&hy(n,t,fb)},et.hasIn=pp,et.head=gy,et.identity=pf,et.includes=function(n,t,i,r){return n=te(n)?n:go(n),i=i&&!r?hi(i):0,r=n.length,0>i&&(i=lf(r+i,0)),kh(n)?i<=r&&-1<n.indexOf(t,i):!!r&&-1<p(n,t,i)},et.indexOf=function(n,t,i){var r=n?n.length:0;return r?(i=null==i?0:hi(i),0>i&&(i=lf(r+i,0)),p(n,t,i)):-1},et.inRange=function(t,i,r){return i=no(i),r===n?(r=i,i=0):r=no(r),t=ee(t),t>=wf(i,r)&&t<lf(i,r)},et.invoke=bn,et.isArguments=yo,et.isArray=wt,et.isArrayBuffer=un,et.isArrayLike=te,et.isArrayLikeObject=sf,et.isBoolean=function(n){return!0===n||!1===n||hf(n)&&"[object Boolean]"==bf.call(n)},et.isBuffer=uo,et.isDate=fn,et.isElement=function(n){return null!=n&&1===n.nodeType&&hf(n)&&!wl(n)},et.isEmpty=function(n){var t,i;if(te(n)&&(wt(n)||typeof n=="string"||typeof n.splice=="function"||uo(n)||us(n)||yo(n)))return!n.length;if(t=vf(n),"[object Map]"==t||"[object Set]"==t)return!n.size;if(hs(n))return!gc(n).length;for(i in n)if(rf.call(n,i))return!1;return!0},et.isEqual=function(n,t){return to(n,t)},et.isEqualWith=function(t,i,r){var u=(r=typeof r=="function"?r:n)?r(t,i):n;return u===n?to(t,i,r):!!u},et.isError=pl,et.isFinite=function(n){return typeof n=="number"&&dk(n)},et.isFunction=ge,et.isInteger=cp,et.isLength=bh,et.isMap=en,et.isMatch=function(n,t){return n===t||dc(n,t,cl(t))},et.isMatchWith=function(t,i,r){return r=typeof r=="function"?r:n,dc(t,i,cl(i),r)},et.isNaN=function(n){return lp(n)&&n!=+n},et.isNative=function(n){if(ad(n))throw new nw("Unsupported core-js use. Try https://github.com/es-shims.");return tv(n)},et.isNil=function(n){return null==n},et.isNull=function(n){return null===n},et.isNumber=lp,et.isObject=gu,et.isObjectLike=hf,et.isPlainObject=wl,et.isRegExp=va,et.isSafeInteger=function(n){return cp(n)&&-9007199254740991<=n&&9007199254740991>=n},et.isSet=on,et.isString=kh,et.isSymbol=re,et.isTypedArray=us,et.isUndefined=function(t){return t===n},et.isWeakMap=function(n){return hf(n)&&"[object WeakMap]"==vf(n)},et.isWeakSet=function(n){return hf(n)&&"[object WeakSet]"==bf.call(n)},et.join=function(n,t){return n?gk.call(n,t):""},et.kebabCase=ttt,et.last=ne,et.lastIndexOf=function(t,i,r){var f=t?t.length:0,u;if(!f)return-1;if(u=f,r!==n&&(u=hi(r),u=0>u?lf(f+u,0):wf(u,f-1)),i===i){for(r=u+1;r--&&t[r]!==i;);t=r}else t=it(t,dt,u,!0);return t},et.lowerCase=itt,et.lowerFirst=rtt,et.lt=sn,et.lte=hn,et.max=function(t){return t&&t.length?nh(t,pf,bc):n},et.maxBy=function(t,i){return t&&t.length?nh(t,pt(i,2),bc):n},et.mean=function(n){return gt(n,pf)},et.meanBy=function(n,t){return gt(n,pt(t,2))},et.min=function(t){return t&&t.length?nh(t,pf,nl):n},et.minBy=function(t,i){return t&&t.length?nh(t,pt(i,2),nl):n},et.stubArray=ta,et.stubFalse=ia,et.stubObject=function(){return{}},et.stubString=function(){return""},et.stubTrue=function(){return!0},et.multiply=nit,et.nth=function(t,i){return t&&t.length?ev(t,hi(i)):n},et.noConflict=function(){return u._===this&&(u._=ak),this},et.noop=na,et.now=lc,et.pad=function(n,t,i){n=yu(n);var r=(t=hi(t))?b(n):0;return!t||r>=t?n:(t=(t-r)/2,sh(sc(t),i)+n+sh(oc(t),i))},et.padEnd=function(n,t,i){n=yu(n);var r=(t=hi(t))?b(n):0;return t&&r<t?n+sh(t-r,i):n},et.padStart=function(n,t,i){n=yu(n);var r=(t=hi(t))?b(n):0;return t&&r<t?sh(t-r,i)+n:n},et.parseInt=function(n,t,i){return i||null==t?t=0:t&&(t=+t),id(yu(n).replace(oi,""),t||0)},et.random=function(t,i,r){if(r&&typeof r!="boolean"&&df(t,i,r)&&(i=r=n),r===n&&(typeof i=="boolean"?(r=i,i=n):typeof t=="boolean"&&(r=t,t=n)),t===n&&i===n?(t=0,i=1):(t=no(t),i===n?(i=t,t=0):i=no(i)),t>i){var u=t;t=i;i=u}return r||t%1||i%1?(r=ew(),wf(t+r*(i-t+nf("1e-"+((r+"").length-1))),i)):il(t,i)},et.reduce=function(n,t,i){var r=wt(n)?d:ni,u=3>arguments.length;return r(n,pt(t,4),i,u,ro)},et.reduceRight=function(n,t,i){var r=wt(n)?ir:ni,u=3>arguments.length;return r(n,pt(t,4),i,u,sw)},et.repeat=function(t,i,r){return i=(r?df(t,i,r):i===n)?1:hi(i),rl(yu(t),i)},et.replace=function(){var n=arguments,t=yu(n[0]);return 3>n.length?t:t.replace(n[1],n[2])},et.result=function(t,i,r){var e,f,u;for(i=ve(i,t)?[i]:co(i),e=-1,f=i.length,f||(t=n,f=1);++e<f;)u=null==t?n:t[gf(i[e])],u===n&&(e=f,u=r),t=ge(u)?u.call(t):u;return t},et.round=tit,et.runInContext=rt,et.sample=function(n){return(wt(n)?wa:pb)(n)},et.size=function(n){if(null==n)return 0;if(te(n))return kh(n)?b(n):n.length;var t=vf(n);return"[object Map]"==t||"[object Set]"==t?n.size:gc(n).length},et.snakeCase=utt,et.some=function(t,i,r){var u=wt(t)?st:kb;return r&&df(t,i,r)&&(i=n),u(t,pt(i,3))},et.sortedIndex=function(n,t){return rh(n,t)},et.sortedIndexBy=function(n,t,i){return ul(n,t,pt(i,2))},et.sortedIndexOf=function(n,t){var r=n?n.length:0,i;return r&&(i=rh(n,t),i<r&&ye(n[i],t))?i:-1},et.sortedLastIndex=function(n,t){return rh(n,t,!0)},et.sortedLastIndexBy=function(n,t,i){return ul(n,t,pt(i,2),!0)},et.sortedLastIndexOf=function(n,t){if(n&&n.length){var i=rh(n,t,!0)-1;if(ye(n[i],t))return i}return-1},et.startCase=ftt,et.startsWith=function(n,t,i){return n=yu(n),i=oo(hi(i),0,n.length),t=ie(t),n.slice(i,i+t.length)==t},et.subtract=iit,et.sum=function(n){return n&&n.length?ct(n,pf):0},et.sumBy=function(n,t){return n&&n.length?ct(n,pt(t,2)):0},et.template=function(t,i,r){var e=et.templateSettings,u,c;r&&df(t,i,r)&&(i=n);t=yu(t);i=ks({},i,e,ac);r=ks({},i.imports,e.imports,ac);var o,f,s=cf(r),l=at(r,s),h=0;if(r=i.interpolate||ft,u="__p+='",r=ra((i.escape||ft).source+"|"+r.source+"|"+(r===fi?eu:ft).source+"|"+(i.evaluate||ft).source+"|$","g"),c="sourceURL"in i?"//# sourceURL="+i.sourceURL+"\n":"",t.replace(r,function(n,i,r,e,s,c){return r||(r=e),u+=t.slice(h,c).replace(vu,er),i&&(o=!0,u+="'+__e("+i+")+'"),s&&(f=!0,u+="';"+s+";\n__p+='"),r&&(u+="'+((__t=("+r+"))==null?'':__t)+'"),h=c+n.length,n}),u+="';",(i=i.variable)||(u="with(obj){"+u+"}"),u=(f?u.replace(hr,""):u).replace(cr,"$1").replace(lr,"$1;"),u="function("+(i||"obj")+"){"+(i?"":"obj||(obj={});")+"var __t,__p=''"+(o?",__e=_.escape":"")+(f?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+u+"return __p}",i=gw(function(){return tw(s,c+"return "+u).apply(n,l)}),i.source=u,pl(i))throw i;return i},et.times=function(n,t){if(n=hi(n),1>n||9007199254740991<n)return[];var r=4294967295,i=wf(n,4294967295);for(t=pt(t),n-=4294967295,i=lt(i,t);++r<n;)t(r);return i},et.toFinite=no,et.toInteger=hi,et.toLength=vp,et.toLower=function(n){return yu(n).toLowerCase()},et.toNumber=ee,et.toSafeInteger=function(n){return oo(hi(n),-9007199254740991,9007199254740991)},et.toString=yu,et.toUpper=function(n){return yu(n).toUpperCase()},et.trim=function(t,i,r){return(t=yu(t))&&(r||i===n)?t.replace(ei,""):t&&(i=ie(i))?(t=h(t),r=h(i),i=ti(t,r),r=ii(t,r)+1,io(t,i,r).join("")):t},et.trimEnd=function(t,i,r){return(t=yu(t))&&(r||i===n)?t.replace(nu,""):t&&(i=ie(i))?(t=h(t),i=ii(t,h(i))+1,io(t,0,i).join("")):t},et.trimStart=function(t,i,r){return(t=yu(t))&&(r||i===n)?t.replace(oi,""):t&&(i=ie(i))?(t=h(t),i=ti(t,h(i)),io(t,i).join("")):t},et.truncate=function(t,i){var u=30,o="...",e,f,c,s;if(gu(i))var r="separator"in i?i.separator:r,u="length"in i?hi(i.length):u,o="omission"in i?ie(i.omission):o;if(t=yu(t),f=t.length,k.test(t)&&(e=h(t),f=e.length),u>=f)return t;if(f=u-b(o),1>f)return o;if(u=e?io(e,0,f).join(""):t.slice(0,f),r===n)return u+o;if(e&&(f+=u.length-f),va(r)){if(t.slice(f).search(r)){for(c=u,r.global||(r=ra(r.source,yu(si.exec(r))+"g")),r.lastIndex=0;e=r.exec(c);)s=e.index;u=u.slice(0,s===n?f:s)}}else t.indexOf(ie(r),f)!=f&&(r=u.lastIndexOf(r),-1<r&&(u=u.slice(0,r)));return u+o},et.unescape=function(n){return(n=yu(n))&&ar.test(n)?n.replace(ri,of):n},et.uniqueId=function(n){var t=++ck;return yu(n)+t},et.upperCase=ett,et.upperFirst=ya,et.each=rp,et.eachRight=up,et.first=gy,gl(et,function(){var n={};return ae(et,function(t,i){rf.call(et.prototype,i)||(n[i]=t)}),n}(),{chain:!1}),et.VERSION="4.16.4",s("bind bindKey curry curryRight partial partialRight".split(" "),function(n){et[n].placeholder=et}),s(["drop","take"],function(t,i){ai.prototype[t]=function(r){var f=this.__filtered__,u;return f&&!i?new ai(this):(r=r===n?1:lf(hi(r),0),u=this.clone(),f?u.__takeCount__=wf(r,u.__takeCount__):u.__views__.push({size:wf(r,4294967295),type:t+(0>u.__dir__?"Right":"")}),u)};ai.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}}),s(["filter","map","takeWhile"],function(n,t){var i=t+1,r=1==i||3==i;ai.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:pt(n,3),type:i}),t.__filtered__=t.__filtered__||r,t}}),s(["head","last"],function(n,t){var i="take"+(t?"Right":"");ai.prototype[n]=function(){return this[i](1).value()[0]}}),s(["initial","tail"],function(n,t){var i="drop"+(t?"":"Right");ai.prototype[n]=function(){return this.__filtered__?new ai(this):this[i](1)}}),ai.prototype.compact=function(){return this.filter(pf)},ai.prototype.find=function(n){return this.filter(n).head()},ai.prototype.findLast=function(n){return this.reverse().find(n)},ai.prototype.invokeMap=ci(function(n,t){return typeof n=="function"?new ai(this):this.map(function(i){return es(i,n,t)})}),ai.prototype.reject=function(n){return this.filter(wh(pt(n)))},ai.prototype.slice=function(t,i){t=hi(t);var r=this;return r.__filtered__&&(0<t||0>i)?new ai(r):(0>t?r=r.takeRight(-t):t&&(r=r.drop(t)),i!==n&&(i=hi(i),r=0>i?r.dropRight(-i):r.take(i-t)),r)},ai.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},ai.prototype.toArray=function(){return this.take(4294967295)},ae(ai.prototype,function(t,i){var e=/^(?:filter|find|map|reject)|While$/.test(i),r=/^(?:head|last)$/.test(i),u=et[r?"take"+("last"==i?"Right":""):i],f=r||/^find/.test(i);u&&(et.prototype[i]=function(){function v(n){return n=u.apply(et,c([n],h)),r&&a?n[0]:n}var i=this.__wrapped__,h=r?[1]:arguments,o=i instanceof ai,s=h[0],l=o||wt(i);l&&e&&typeof s=="function"&&1!=s.length&&(o=l=!1);var a=this.__chain__,y=!!this.__actions__.length,s=f&&!a,o=o&&!y;return!f&&l?(i=o?i:new ai(this),i=t.apply(i,h),i.__actions__.push({func:vh,args:[v],thisArg:n}),new ue(i,a)):s&&o?t.apply(this,h):(i=this.thru(v),s?r?i.value()[0]:i.value():i)})}),s("pop push shift sort splice unshift".split(" "),function(n){var t=gh[n],i=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);et.prototype[n]=function(){var u=arguments,n;return r&&!this.__chain__?(n=this.value(),t.apply(wt(n)?n:[],u)):this[i](function(n){return t.apply(wt(n)?n:[],u)})}}),ae(ai.prototype,function(n,t){var i=et[t],r;i&&(r=i.name+"",(ps[r]||(ps[r]=[])).push({name:t,func:i}))}),ps[eh(n,2).name]=[{name:"wrapper",func:n}],ai.prototype.clone=function(){var n=new ai(this.__wrapped__);return n.__actions__=kf(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=kf(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=kf(this.__views__),n},ai.prototype.reverse=function(){if(this.__filtered__){var n=new ai(this);n.__dir__=-1;n.__filtered__=!0}else n=this.clone(),n.__dir__*=-1;return n},ai.prototype.value=function(){var n,h=this.__wrapped__.value(),a=this.__dir__,e=wt(h),c=0>a,f=e?h.length:0,u,r;n=f;for(var i=this.__views__,t=0,o=-1,l=i.length;++o<l;){u=i[o];r=u.size;switch(u.type){case"drop":t+=r;break;case"dropRight":n-=r;break;case"take":n=wf(n,t+r);break;case"takeRight":t=lf(t,n-r)}}if(n={start:t,end:n},i=n.start,t=n.end,n=t-i,c=c?t:i-1,i=this.__iteratees__,t=i.length,o=0,l=wf(n,this.__takeCount__),!e||200>f||f==n&&l==n)return vv(h,this.__actions__);e=[];n:for(;n--&&o<l;){for(c+=a,f=-1,u=h[c];++f<t;){var s=i[f],r=s.type,s=s.iteratee(u);if(2==r)u=s;else if(!s){if(1==r)continue n;break n}}e[o++]=u}return e},et.prototype.at=hg,et.prototype.chain=function(){return ip(this)},et.prototype.commit=function(){return new ue(this.value(),this.__chain__)},et.prototype.next=function(){this.__values__===n&&(this.__values__=ap(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?n:this.__values__[this.__index__++]}},et.prototype.plant=function(t){for(var u,r,f,i=this;i instanceof ds;)r=wy(i),r.__index__=0,r.__values__=n,u?f.__wrapped__=r:u=r,f=r,i=i.__wrapped__;return f.__wrapped__=t,u},et.prototype.reverse=function(){var t=this.__wrapped__;return t instanceof ai?(this.__actions__.length&&(t=new ai(this)),t=t.reverse(),t.__actions__.push({func:vh,args:[vl],thisArg:n}),new ue(t,this.__chain__)):this.thru(vl)},et.prototype.toJSON=et.prototype.valueOf=et.prototype.value=function(){return vv(this.__wrapped__,this.__actions__)},et.prototype.first=et.prototype.head,ls&&(et.prototype[ls]=sk),et}();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(u._=a,define(function(){return a})):et?((et.exports=a)._=a,wt._=a):u._=a}.call(this),!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):n.Vue=t()}(this,function(){"use strict";function gu(n){return null==n?"":"object"==typeof n?JSON.stringify(n,null,2):String(n)}function nf(n){var t=parseFloat(n,10);return t||0===t?t:n}function o(n,t){for(var i=Object.create(null),u=n.split(","),r=0;r<u.length;r++)i[u[r]]=!0;return t?function(n){return i[n.toLowerCase()]}:function(n){return i[n]}}function st(n,t){if(n.length){var i=n.indexOf(t);if(i>-1)return n.splice(i,1)}}function s(n,t){return pp.call(n,t)}function si(n){return"string"==typeof n||"number"==typeof n}function y(n){var t=Object.create(null);return function(i){var r=t[i];return r||(t[i]=n(i))}}function b(n,t){function i(i){var r=arguments.length;return r?r>1?n.apply(t,arguments):n.call(t,i):n.call(t)}return i._length=n.length,i}function hi(n,t){t=t||0;for(var i=n.length-t,r=new Array(i);i--;)r[i]=n[i+t];return r}function r(n,t){for(var i in t)n[i]=t[i];return n}function e(n){return null!==n&&"object"==typeof n}function k(n){return bp.call(n)===kp}function fr(n){for(var i={},t=0;t<n.length;t++)n[t]&&r(i,n[t]);return i}function f(){}function tf(n){return n.reduce(function(n,t){return n.concat(t.staticKeys||[])},[]).join(",")}function yt(n,t){return n==t||!(!e(n)||!e(t))&&JSON.stringify(n)===JSON.stringify(t)}function er(n,t){for(var i=0;i<n.length;i++)if(yt(n[i],t))return i;return-1}function rf(n){var t=(n+"").charCodeAt(0);return 36===t||95===t}function ci(n,t,i,r){Object.defineProperty(n,t,{value:i,enumerable:!!r,writable:!0,configurable:!0})}function uf(n){if(!dp.test(n)){var t=n.split(".");return function(n){for(var i=0;i<t.length;i++){if(!n)return;n=n[t[i]]}return n}}}function or(n){return/native code/.test(n.toString())}function ah(n){u.target&&vo.push(u.target);u.target=n}function vh(){u.target=vo.pop()}function yh(){ut.length=0;bi={};fu=eu=!1}function ph(){for(eu=!0,ut.sort(function(n,t){return n.id-t.id}),ri=0;ri<ut.length;ri++){var n=ut[ri],t=n.id;bi[t]=null;n.run()}ii&&i.devtools&&ii.emit("flush");yh()}function wh(n){var i=n.id,t;if(null==bi[i]){if(bi[i]=!0,eu){for(t=ut.length-1;t>=0&&ut[t].id>n.id;)t--;ut.splice(Math.max(t,ri)+1,0,n)}else ut.push(n);fu||(fu=!0,wi(ph))}}function sr(n,t){var i,r,u,f,o;if(t||(t=nw,t.clear()),u=Array.isArray(n),f=e(n),(u||f)&&Object.isExtensible(n)){if(n.__ob__){if(o=n.__ob__.dep.id,t.has(o))return;t.add(o)}if(u)for(i=n.length;i--;)sr(n[i],t);else if(f)for(r=Object.keys(n),i=r.length;i--;)sr(n[r[i]],t)}}function bh(n,t){n.__proto__=t}function kh(n,t,i){for(var u,r=0,f=i.length;r<f;r++)u=i[r],ci(n,u,t[u])}function pt(n){if(e(n)){var t;return s(n,"__ob__")&&n.__ob__ instanceof ki?t=n.__ob__:ft.shouldConvert&&!i._isServer&&(Array.isArray(n)||k(n))&&Object.isExtensible(n)&&!n._isVue&&(t=new ki(n)),t}}function li(n,t,i){var o=new u,r=Object.getOwnPropertyDescriptor(n,t);if(!r||r.configurable!==!1){var f=r&&r.get,s=r&&r.set,e=pt(i);Object.defineProperty(n,t,{enumerable:!0,configurable:!0,get:function(){var t=f?f.call(n):i;return u.target&&(o.depend(),e&&e.dep.depend(),Array.isArray(t)&&ef(t)),t},set:function(t){var r=f?f.call(n):i;t!==r&&(s?s.call(n,t):i=t,e=pt(t),o.notify())}})}}function hr(n,t,i){if(Array.isArray(n))return n.splice(t,1,i),i;if(s(n,t))return void(n[t]=i);var r=n.__ob__;if(!(n._isVue||r&&r.vmCount))return r?(li(r.value,t,i),r.dep.notify(),i):void(n[t]=i)}function ff(n,t){var i=n.__ob__;n._isVue||i&&i.vmCount||s(n,t)&&(delete n[t],i&&i.dep.notify())}function ef(n){for(var t=void 0,i=0,r=n.length;i<r;i++)t=n[i],t&&t.__ob__&&t.__ob__.dep.depend(),Array.isArray(t)&&ef(t)}function dh(n){n._watchers=[];gh(n);nc(n);tc(n);ic(n);rc(n)}function gh(n){var i=n.$options.props,u,t;if(i){var f=n.$options.propsData||{},r=n.$options._propKeys=Object.keys(i),e=!n.$parent;for(ft.shouldConvert=e,u=function(t){var u=r[t];li(n,u,vi(u,i,f,n))},t=0;t<r.length;t++)u(t);ft.shouldConvert=!0}}function nc(n){var t=n.$options.data;t=n._data="function"==typeof t?t.call(n):t||{};k(t)||(t={});for(var i=Object.keys(t),u=n.$options.props,r=i.length;r--;)u&&s(u,i[r])||fc(n,i[r]);pt(t);t.__ob__&&t.__ob__.vmCount++}function tc(n){var i=n.$options.computed,r,t;if(i)for(r in i)t=i[r],"function"==typeof t?(ui.get=of(t,n),ui.set=f):(ui.get=t.get?t.cache!==!1?of(t.get,n):b(t.get,n):f,ui.set=t.set?b(t.set,n):f),Object.defineProperty(n,r,ui)}function of(n,t){var i=new a(t,n,f,{lazy:!0});return function(){return i.dirty&&i.evaluate(),u.target&&i.depend(),i.value}}function ic(n){var t=n.$options.methods,i;if(t)for(i in t)n[i]=null==t[i]?f:b(t[i],n)}function rc(n){var u=n.$options.watch,i,t,r;if(u)for(i in u)if(t=u[i],Array.isArray(t))for(r=0;r<t.length;r++)sf(n,i,t[r]);else sf(n,i,t)}function sf(n,t,i){var r;k(i)&&(r=i,i=i.handler);"string"==typeof i&&(i=n[i]);n.$watch(t,i,r)}function uc(n){var t={};t.get=function(){return this._data};Object.defineProperty(n.prototype,"$data",t);n.prototype.$set=hr;n.prototype.$delete=ff;n.prototype.$watch=function(n,t,i){var u=this,r;return i=i||{},i.user=!0,r=new a(u,n,t,i),i.immediate&&t.call(u,r.value),function(){r.teardown()}}}function fc(n,t){rf(t)||Object.defineProperty(n,t,{configurable:!0,enumerable:!0,get:function(){return n._data[t]},set:function(i){n._data[t]=i}})}function hf(n){var t=new v(n.tag,n.data,n.children,n.text,n.elm,n.ns,n.context,n.componentOptions);return t.isStatic=n.isStatic,t.key=n.key,t.isCloned=!0,t}function cf(n){for(var i=new Array(n.length),t=0;t<n.length;t++)i[t]=hf(n[t]);return i}function et(n,t,i,r){var u,f;r+=t;u=n.__injected||(n.__injected={});u[r]||(u[r]=!0,f=n[t],n[t]=f?function(){f.apply(this,arguments);i.apply(this,arguments)}:i)}function lf(n,t,i,r){var f,u,e,c,o,h,s;for(f in n)if(u=n[f],e=t[f],u)if(e){if(u!==e)if(Array.isArray(e)){for(e.length=u.length,s=0;s<e.length;s++)e[s]=u[s];n[f]=e}else e.fn=u,n[f]=e}else h="!"===f.charAt(0),o=h?f.slice(1):f,Array.isArray(u)?i(o,u.invoker=ec(u),h):(u.invoker||(c=u,u=n[f]={},u.fn=c,u.invoker=oc(u)),i(o,u.invoker,h));for(f in t)n[f]||(o="!"===f.charAt(0)?f.slice(1):f,r(o,t[f].invoker))}function ec(n){return function(t){for(var r=arguments,u=1===arguments.length,i=0;i<n.length;i++)u?n[i](t):n[i].apply(null,r)}}function oc(n){return function(t){var i=1===arguments.length;i?n.fn(t):n.fn.apply(null,arguments)}}function wt(n,t,i){var r,f;if(si(n))return[af(n)];if(Array.isArray(n)){for(var u=[],e=0,o=n.length;e<o;e++)r=n[e],f=u[u.length-1],Array.isArray(r)?u.push.apply(u,wt(r,t,(i||"")+"_"+e)):si(r)?f&&f.text?f.text+=String(r):""!==r&&u.push(af(r)):r instanceof v&&(r.text&&f&&f.text?f.text+=r.text:(t&&vf(r,t),r.tag&&null==r.key&&null!=i&&(r.key="__vlist"+i+"_"+e+"__"),u.push(r)));return u}}function af(n){return new v(void 0,void 0,void 0,String(n))}function vf(n,t){if(n.tag&&!n.ns&&(n.ns=t,n.children))for(var i=0,r=n.children.length;i<r;i++)vf(n.children[i],t)}function yf(n){return n&&n.filter(function(n){return n&&n.componentOptions})[0]}function sc(n){var i=n.$options,t=i.parent;if(t&&!i.abstract){for(;t.$options.abstract&&t.$parent;)t=t.$parent;t.$children.push(n)}n.$parent=t;n.$root=t?t.$root:n;n.$children=[];n.$refs={};n._watcher=null;n._inactive=!1;n._isMounted=!1;n._isDestroyed=!1;n._isBeingDestroyed=!1}function hc(n){n.prototype._mount=function(n,t){var i=this;return i.$el=n,i.$options.render||(i.$options.render=di),h(i,"beforeMount"),i._watcher=new a(i,function(){i._update(i._render(),t)},f),t=!1,null==i.$vnode&&(i._isMounted=!0,h(i,"mounted")),i};n.prototype._update=function(n,t){var i=this,r,f,u;i._isMounted&&h(i,"beforeUpdate");r=i.$el;f=ot;ot=i;u=i._vnode;i._vnode=n;i.$el=u?i.__patch__(u,n):i.__patch__(i.$el,n,t);ot=f;r&&(r.__vue__=null);i.$el&&(i.$el.__vue__=i);i.$vnode&&i.$parent&&i.$vnode===i.$parent._vnode&&(i.$parent.$el=i.$el);i._isMounted&&h(i,"updated")};n.prototype._updateFromParent=function(n,t,i,r){var u=this,h=!(!u.$options._renderChildren&&!r),e,f,o,s;if(u.$options._parentVnode=i,u.$options._renderChildren=r,n&&u.$options.props){for(ft.shouldConvert=!1,e=u.$options._propKeys||[],f=0;f<e.length;f++)o=e[f],u[o]=vi(o,u.$options.props,n,u);ft.shouldConvert=!0}t&&(s=u.$options._parentListeners,u.$options._parentListeners=t,u._updateListeners(t,s));h&&(u.$slots=ar(r,u._renderContext),u.$forceUpdate())};n.prototype.$forceUpdate=function(){var n=this;n._watcher&&n._watcher.update()};n.prototype.$destroy=function(){var n=this,t,i;if(!n._isBeingDestroyed){for(h(n,"beforeDestroy"),n._isBeingDestroyed=!0,t=n.$parent,!t||t._isBeingDestroyed||n.$options.abstract||st(t.$children,n),n._watcher&&n._watcher.teardown(),i=n._watchers.length;i--;)n._watchers[i].teardown();n._data.__ob__&&n._data.__ob__.vmCount--;n._isDestroyed=!0;h(n,"destroyed");n.$off();n.$el&&(n.$el.__vue__=null);n.__patch__(n._vnode,null)}}}function h(n,t){var r=n.$options[t],i,u;if(r)for(i=0,u=r.length;i<u;i++)r[i].call(n);n.$emit("hook:"+t)}function pf(n,i,r,u,f){var o,h,s,c;if(n&&(e(n)&&(n=t.extend(n)),"function"==typeof n)){if(!n.cid)if(n.resolved)n=n.resolved;else if(n=wc(n,function(){r.$forceUpdate()}),!n)return;return(i=i||{},o=bc(i,n),n.options.functional)?cc(n,o,i,r,u):(h=i.on,i.on=i.nativeOn,n.options.abstract&&(i={}),kc(i),s=n.options.name||f,c=new v("vue-component-"+n.cid+(s?"-"+s:""),i,void 0,void 0,void 0,void 0,r,{Ctor:n,propsData:o,listeners:h,tag:f,children:u}),c)}}function cc(n,t,i,r,u){var s={},e=n.options.props,o,f;if(e)for(o in e)s[o]=vi(o,e,t);return f=n.options.render.call(null,b(lr,{_self:Object.create(r)}),{props:s,data:i,parent:r,children:wt(u),slots:function(){return ar(u,r)}}),f instanceof v&&(f.functionalContext=r,i.slot&&((f.data||(f.data={})).slot=i.slot)),f}function lc(n,t){var i=n.componentOptions,r={_isComponent:!0,parent:t,propsData:i.propsData,_componentTag:i.tag,_parentVnode:n,_parentListeners:i.listeners,_renderChildren:i.children},u=n.data.inlineTemplate;return u&&(r.render=u.render,r.staticRenderFns=u.staticRenderFns),new i.Ctor(r)}function ac(n,t){if(!n.child||n.child._isDestroyed){var i=n.child=lc(n,ot);i.$mount(t?n.elm:void 0,t)}}function vc(n,t){var i=t.componentOptions,r=t.child=n.child;r._updateFromParent(i.propsData,i.listeners,t,i.children)}function yc(n){n.child._isMounted||(n.child._isMounted=!0,h(n.child,"mounted"));n.data.keepAlive&&(n.child._inactive=!1,h(n.child,"activated"))}function pc(n){n.child._isDestroyed||(n.data.keepAlive?(n.child._inactive=!0,h(n.child,"deactivated")):n.child.$destroy())}function wc(n,i){if(!n.requested){n.requested=!0;var u=n.pendingCallbacks=[i],f=!0,o=function(i){if(e(i)&&(i=t.extend(i)),n.resolved=i,!f)for(var r=0,o=u.length;r<o;r++)u[r](i)},s=function(){},r=n(o,s);return r&&"function"==typeof r.then&&!n.resolved&&r.then(o,s),f=!1,n.resolved}n.pendingCallbacks.push(i)}function bc(n,t){var f=t.options.props,i,u;if(f){var r={},e=n.attrs,o=n.props,s=n.domProps;if(e||o||s)for(i in f)u=uu(i),cr(r,o,i,u,!0)||cr(r,e,i,u)||cr(r,s,i,u);return r}}function cr(n,t,i,r,u){if(t){if(s(t,i))return n[i]=t[i],u||delete t[i],!0;if(s(t,r))return n[i]=t[r],u||delete t[r],!0}return!1}function kc(n){var t;for(n.hook||(n.hook={}),t=0;t<wo.length;t++){var i=wo[t],r=n.hook[i],u=po[i];n.hook[i]=r?dc(u,r):u}}function dc(n,t){return function(i,r){n(i,r);t(i,r)}}function lr(n,t,i){return t&&(Array.isArray(t)||"object"!=typeof t)&&(i=t,t=void 0),gc(this._self,n,t,i)}function gc(n,t,r,u){if(!r||!r.__ob__){if(!t)return di();if("string"==typeof t){var e,f=i.getTagNamespace(t);return i.isReservedTag(t)?new v(t,r,wt(u,f),void 0,void 0,f,n):(e=ai(n.$options,"components",t))?pf(e,r,n,u,t):new v(t,r,wt(u,f),void 0,void 0,f,n)}return pf(t,r,n,u)}}function nl(n){n.$vnode=null;n._vnode=null;n._staticTrees=null;n._renderContext=n.$options._parentVnode&&n.$options._parentVnode.context;n.$slots=ar(n.$options._renderChildren,n._renderContext);n.$createElement=b(lr,n);n.$options.el&&n.$mount(n.$options.el)}function tl(n){n.prototype.$nextTick=function(n){wi(n,this)};n.prototype._render=function(){var n=this,t=n.$options,e=t.render,o=t.staticRenderFns,f=t._parentVnode,u,r;if(n._isMounted)for(u in n.$slots)n.$slots[u]=cf(n.$slots[u]);o&&!n._staticTrees&&(n._staticTrees=[]);n.$vnode=f;try{r=e.call(n._renderProxy,n.$createElement)}catch(t){if(i.errorHandler)i.errorHandler.call(null,t,n);else{if(i._isServer)throw t;setTimeout(function(){throw t;},0)}r=n._vnode}return r instanceof v||(r=di()),r.parent=f,r};n.prototype._h=lr;n.prototype._s=gu;n.prototype._n=nf;n.prototype._e=di;n.prototype._q=yt;n.prototype._i=er;n.prototype._m=function(n,t){var i=this._staticTrees[n],r;if(i&&!t)return Array.isArray(i)?cf(i):hf(i);if(i=this._staticTrees[n]=this.$options.staticRenderFns[n].call(this._renderProxy),Array.isArray(i))for(r=0;r<i.length;r++)"string"!=typeof i[r]&&(i[r].isStatic=!0,i[r].key="__static__"+n+"_"+r);else i.isStatic=!0,i.key="__static__"+n;return i};var t=function(n){return n};n.prototype._f=function(n){return ai(this.$options,"filters",n,!0)||t};n.prototype._l=function(n,t){var r,i,u,f,o;if(Array.isArray(n))for(r=new Array(n.length),i=0,u=n.length;i<u;i++)r[i]=t(n[i],i);else if("number"==typeof n)for(r=new Array(n),i=0;i<n;i++)r[i]=t(i+1,i);else if(e(n))for(f=Object.keys(n),r=new Array(f.length),i=0,u=f.length;i<u;i++)o=f[i],r[i]=t(n[o],o,i);return r};n.prototype._t=function(n,t){var i=this.$slots[n];return i||t};n.prototype._b=function(n,t,r){var u,f;if(t&&e(t)){Array.isArray(t)&&(t=fr(t));for(u in t)"class"===u||"style"===u?n[u]=t[u]:(f=r||i.mustUseProp(u)?n.domProps||(n.domProps={}):n.attrs||(n.attrs={}),f[u]=t[u])}return n};n.prototype._k=function(n){return i.keyCodes[n]}}function ar(n,t){var u={},f;if(!n)return u;for(var e,i,s=wt(n)||[],r=[],o=0,h=s.length;o<h;o++)(i=s[o],(i.context===t||i.functionalContext===t)&&i.data&&(e=i.data.slot))?(f=u[e]||(u[e]=[]),"template"===i.tag?f.push.apply(f,i.children):f.push(i)):r.push(i);return r.length&&(1!==r.length||" "!==r[0].text&&!r[0].isComment)&&(u.default=r),u}function il(n){n._events=Object.create(null);var t=n.$options._parentListeners,i=b(n.$on,n),r=b(n.$off,n);n._updateListeners=function(t,u){lf(t,u||{},i,r,n)};t&&n._updateListeners(t)}function rl(n){n.prototype.$on=function(n,t){var i=this;return(i._events[n]||(i._events[n]=[])).push(t),i};n.prototype.$once=function(n,t){function r(){i.$off(n,r);t.apply(i,arguments)}var i=this;return r.fn=t,i.$on(n,r),i};n.prototype.$off=function(n,t){var i=this,r,f,u;if(!arguments.length)return i._events=Object.create(null),i;if(r=i._events[n],!r)return i;if(1===arguments.length)return i._events[n]=null,i;for(u=r.length;u--;)if(f=r[u],f===t||f.fn===t){r.splice(u,1);break}return i};n.prototype.$emit=function(n){var i=this,t=i._events[n];if(t){t=t.length>1?hi(t):t;for(var u=hi(arguments,1),r=0,f=t.length;r<f;r++)t[r].apply(i,u)}return i}}function ul(n){function i(n,i){var r=n.$options=Object.create(t(n));r.parent=i.parent;r.propsData=i.propsData;r._parentVnode=i._parentVnode;r._parentListeners=i._parentListeners;r._renderChildren=i._renderChildren;r._componentTag=i._componentTag;i.render&&(r.render=i.render,r.staticRenderFns=i.staticRenderFns)}function t(n){var t=n.constructor,i=t.options,r,u;return t.super&&(r=t.super.options,u=t.superOptions,r!==u&&(t.superOptions=r,i=t.options=d(r,t.extendOptions),i.name&&(i.components[i.name]=t))),i}n.prototype._init=function(n){var r=this;r._uid=iw++;r._isVue=!0;n&&n._isComponent?i(r,n):r.$options=d(t(r),n||{},r);r._renderProxy=r;r._self=r;sc(r);il(r);h(r,"beforeCreate");dh(r);h(r,"created");nl(r)}}function t(n){this._init(n)}function vr(n,t){var i,u,r;for(i in t)u=n[i],r=t[i],s(n,i)?e(u)&&e(r)&&vr(u,r):hr(n,i,r);return n}function fl(n,t){return t?n?n.concat(t):Array.isArray(t)?t:[t]:n}function el(n,t){var i=Object.create(n||null);return t?r(i,t):i}function ol(n){var f,r,u,e;if(n.components){r=n.components;for(u in r)e=u.toLowerCase(),ru(e)||i.isReservedTag(e)||(f=r[u],k(f)&&(r[u]=t.extend(f)))}}function sl(n){var t=n.props,f,i,r,u,e;if(t){if(u={},Array.isArray(t))for(f=t.length;f--;)i=t[f],"string"==typeof i&&(r=nt(i),u[r]={type:null});else if(k(t))for(e in t)i=t[e],r=nt(e),u[r]=k(i)?i:{type:i};n.props=u}}function hl(n){var t=n.directives,r,i;if(t)for(r in t)i=t[r],"function"==typeof i&&(t[r]={bind:i,update:i})}function d(n,i,r){function c(t){var u=w[t]||uw;h[t]=u(n[t],i[t],r,t)}var u,o,l,f,e,h;if(ol(i),sl(i),hl(i),u=i.extends,u&&(n="function"==typeof u?d(n,u.options,r):d(n,u,r)),i.mixins)for(o=0,l=i.mixins.length;o<l;o++)f=i.mixins[o],f.prototype instanceof t&&(f=f.options),n=d(n,f,r);h={};for(e in n)c(e);for(e in i)s(n,e)||c(e);return h}function ai(n,t,i){if("string"==typeof i){var r=n[t];return r[i]||r[nt(i)]||r[eo(nt(i))]}}function vi(n,t,i,r){var f=t[n],o=!s(i,n),u=i[n],e;return(ll(f.type)&&(o&&!s(f,"default")?u=!1:""!==u&&u!==uu(n)||(u=!0)),void 0===u)&&(u=cl(r,f,n),e=ft.shouldConvert,ft.shouldConvert=!0,pt(u),ft.shouldConvert=e),u}function cl(n,t){if(s(t,"default")){var i=t.default;return e(i),"function"==typeof i&&t.type!==Function?i.call(n):i}}function wf(n){var t=n&&n.toString().match(/^\s*function (\w+)/);return t&&t[1]}function ll(n){if(!Array.isArray(n))return"Boolean"===wf(n);for(var t=0,i=n.length;t<i;t++)if("Boolean"===wf(n[t]))return!0;return!1}function al(n){n.use=function(n){if(!n.installed){var t=hi(arguments,1);return t.unshift(this),"function"==typeof n.install?n.install.apply(n,t):n.apply(null,t),n.installed=!0,this}}}function vl(n){n.mixin=function(t){n.options=d(n.options,t)}}function yl(n){n.cid=0;var t=1;n.extend=function(n){var u,f,e,r;return(n=n||{},u=this,f=0===u.cid,f&&n._Ctor)?n._Ctor:(e=n.name||u.options.name,r=function(n){this._init(n)},r.prototype=Object.create(u.prototype),r.prototype.constructor=r,r.cid=t++,r.options=d(u.options,n),r.super=u,r.extend=u.extend,i._assetTypes.forEach(function(n){r[n]=u[n]}),e&&(r.options.components[e]=r),r.superOptions=u.options,r.extendOptions=n,f&&(n._Ctor=r),r)}}function pl(n){i._assetTypes.forEach(function(t){n[t]=function(i,r){return r?("component"===t&&k(r)&&(r.name=r.name||i,r=n.extend(r)),"directive"===t&&"function"==typeof r&&(r={bind:r,update:r}),this.options[t+"s"][i]=r,r):this.options[t+"s"][i]}})}function wl(n){var t={};t.get=function(){return i};Object.defineProperty(n,"config",t);n.util=fw;n.set=hr;n.delete=ff;n.nextTick=wi;n.options=Object.create(null);i._assetTypes.forEach(function(t){n.options[t+"s"]=Object.create(null)});r(n.options.components,ow);al(n);vl(n);yl(n);pl(n)}function bl(n){for(var t=n.data,r=n,i=n;i.child;)i=i.child._vnode,i.data&&(t=bf(i.data,t));for(;r=r.parent;)r.data&&(t=bf(t,r.data));return kl(t)}function bf(n,t){return{staticClass:yr(n.staticClass,t.staticClass),"class":n.class?[n.class,t.class]:t.class}}function kl(n){var t=n.class,i=n.staticClass;return i||t?yr(i,pr(t)):""}function yr(n,t){return n?t?n+" "+t:n:t||""}function pr(n){var t="",u,i,f,r;if(!n)return t;if("string"==typeof n)return n;if(Array.isArray(n)){for(i=0,f=n.length;i<f;i++)n[i]&&(u=pr(n[i]))&&(t+=u+" ");return t.slice(0,-1)}if(e(n)){for(r in n)n[r]&&(t+=r+" ");return t.slice(0,-1)}return t}function kf(n){return ns(n)?"svg":"math"===n?"math":void 0}function dl(n){if(!it)return!0;if(cu(n))return!1;if(n=n.toLowerCase(),null!=ir[n])return ir[n];var t=document.createElement(n);return ir[n]=n.indexOf("-")>-1?t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:/HTMLUnknownElement/.test(t.toString())}function wr(n){return"string"==typeof n&&(n=document.querySelector(n),!n)?document.createElement("div"):n}function gl(n,t){var i=document.createElement(n);return"select"!==n?i:(t.data&&t.data.attrs&&"multiple"in t.data.attrs&&i.setAttribute("multiple","multiple"),i)}function na(n,t){return document.createElementNS(hw[n],t)}function ta(n){return document.createTextNode(n)}function ia(n){return document.createComment(n)}function ra(n,t,i){n.insertBefore(t,i)}function ua(n,t){n.removeChild(t)}function fa(n,t){n.appendChild(t)}function ea(n){return n.parentNode}function oa(n){return n.nextSibling}function sa(n){return n.tagName}function ha(n,t){n.textContent=t}function ca(n){return n.childNodes}function la(n,t,i){n.setAttribute(t,i)}function bt(n,t){var i=n.data.ref;if(i){var f=n.context,u=n.child||n.elm,r=f.$refs;t?Array.isArray(r[i])?st(r[i],u):r[i]===u&&(r[i]=void 0):n.data.refInFor?Array.isArray(r[i])?r[i].push(u):r[i]=[u]:r[i]=u}}function ht(n){return null==n}function n(n){return null!=n}function kt(n,t){return n.key===t.key&&n.tag===t.tag&&n.isComment===t.isComment&&!n.data==!t.data}function aa(t,i,r){for(var f,e={},u=i;u<=r;++u)f=t[u].key,n(f)&&(e[f]=u);return e}function va(t){function tt(n){return new v(r.tagName(n).toLowerCase(),{},[],void 0,n)}function it(n,t){function i(){0==--i.listeners&&y(n)}return i.listeners=t,i}function y(n){var t=r.parentNode(n);r.removeChild(t,n)}function f(t,i,u){var f,o=t.data,s,e;return(t.isRootInsert=!u,n(o)&&(n(f=o.hook)&&n(f=f.init)&&f(t),n(f=t.child)))?(w(t,i),t.elm):(s=t.children,e=t.tag,n(e)?(t.elm=t.ns?r.createElementNS(t.ns,e):r.createElement(e,t),b(t),p(t,s,i),n(o)&&c(t,i)):t.elm=t.isComment?r.createComment(t.text):r.createTextNode(t.text),t.elm)}function p(n,t,i){if(Array.isArray(t))for(var u=0;u<t.length;++u)r.appendChild(n.elm,f(t[u],i,!0));else si(n.text)&&r.appendChild(n.elm,r.createTextNode(n.text))}function h(t){for(;t.child;)t=t.child._vnode;return n(t.tag)}function c(t,r){for(var f=0;f<u.create.length;++f)u.create[f](fi,t);i=t.data.hook;n(i)&&(i.create&&i.create(fi,t),i.insert&&r.push(t))}function w(n,t){n.data.pendingInsert&&t.push.apply(t,n.data.pendingInsert);n.elm=n.child.$el;h(n)?(c(n,t),b(n)):(bt(n),t.push(n))}function b(t){var i;n(i=t.context)&&n(i=i.$options._scopeId)&&r.setAttribute(t.elm,i,"");n(i=ot)&&i!==t.context&&n(i=i.$options._scopeId)&&r.setAttribute(t.elm,i,"")}function k(n,t,i,u,e,o){for(;u<=e;++u)r.insertBefore(n,f(i[u],o),t)}function s(t){var i,r,f=t.data;if(n(f))for(n(i=f.hook)&&n(i=i.destroy)&&i(t),i=0;i<u.destroy.length;++i)u.destroy[i](t);if(n(i=t.children))for(r=0;r<t.children.length;++r)s(t.children[r])}function l(t,i,u,f){for(;u<=f;++u){var e=i[u];n(e)&&(n(e.tag)?(d(e),s(e)):r.removeChild(t,e.elm))}}function d(t,r){if(r||n(t.data)){var f=u.remove.length+1;for(r?r.listeners+=f:r=it(t.elm,f),n(i=t.child)&&n(i=i._vnode)&&n(i.data)&&d(i,r),i=0;i<u.remove.length;++i)u.remove[i](t,r);n(i=t.data.hook)&&n(i=i.remove)?i(t,r):r()}else y(t.elm)}function rt(t,i,u,o,s){for(var g,d,nt,it,w=0,v=0,y=i.length-1,c=i[0],a=i[y],p=u.length-1,h=u[0],b=u[p],tt=!s;w<=y&&v<=p;)ht(c)?c=i[++w]:ht(a)?a=i[--y]:kt(c,h)?(e(c,h,o),c=i[++w],h=u[++v]):kt(a,b)?(e(a,b,o),a=i[--y],b=u[--p]):kt(c,b)?(e(c,b,o),tt&&r.insertBefore(t,c.elm,r.nextSibling(a.elm)),c=i[++w],b=u[--p]):kt(a,h)?(e(a,h,o),tt&&r.insertBefore(t,a.elm,c.elm),a=i[--y],h=u[++v]):(ht(g)&&(g=aa(i,w,y)),d=n(h.key)?g[h.key]:null,ht(d)?(r.insertBefore(t,f(h,o),c.elm),h=u[++v]):(nt=i[d],nt.tag!==h.tag?(r.insertBefore(t,f(h,o),c.elm),h=u[++v]):(e(nt,h,o),i[d]=void 0,tt&&r.insertBefore(t,h.elm,c.elm),h=u[++v])));w>y?(it=ht(u[p+1])?null:u[p+1].elm,k(t,it,u,v,p,o)):v>p&&l(t,i,w,y)}function e(t,i,f,e){var o,v,y;if(t!==i){if(i.isStatic&&t.isStatic&&i.key===t.key&&i.isCloned)return void(i.elm=t.elm);v=i.data;y=n(v);y&&n(o=v.hook)&&n(o=o.prepatch)&&o(t,i);var s=i.elm=t.elm,c=t.children,a=i.children;if(y&&h(i)){for(o=0;o<u.update.length;++o)u.update[o](t,i);n(o=v.hook)&&n(o=o.update)&&o(t,i)}ht(i.text)?n(c)&&n(a)?c!==a&&rt(s,c,a,f,e):n(a)?(n(t.text)&&r.setTextContent(s,""),k(s,null,a,0,a.length-1,f)):n(c)?l(s,c,0,c.length-1):n(t.text)&&r.setTextContent(s,""):t.text!==i.text&&r.setTextContent(s,i.text);y&&n(o=v.hook)&&n(o=o.postpatch)&&o(t,i)}}function g(n,t,i){if(i&&n.parent)n.parent.data.pendingInsert=t;else for(var r=0;r<t.length;++r)t[r].data.hook.insert(t[r])}function nt(t,u,f){var s,h,o;u.elm=t;var a=u.tag,l=u.data,e=u.children;if(n(l)&&(n(i=l.hook)&&n(i=i.init)&&i(u,!0),n(i=u.child)))return w(u,f),!0;if(n(a)){if(n(e))if(s=r.childNodes(t),s.length){if(h=!0,s.length!==e.length)h=!1;else for(o=0;o<e.length;o++)if(!nt(s[o],e[o],f)){h=!1;break}if(!h)return!1}else p(u,e,f);n(l)&&c(u,f)}return!0}for(var o,u={},a=t.modules,r=t.nodeOps,i=0;i<ei.length;++i)for(u[ei[i]]=[],o=0;o<a.length;++o)void 0!==a[o][ei[i]]&&u[ei[i]].push(a[o][ei[i]]);return function(t,i,o,c){var p,v,w,a,b,y;if(!i)return void(t&&s(t));if(w=!1,a=[],t)if(b=n(t.nodeType),!b&&kt(t,i))e(t,i,a,c);else{if(b){if(1===t.nodeType&&t.hasAttribute("server-rendered")&&(t.removeAttribute("server-rendered"),o=!0),o&&nt(t,i,a))return g(i,a,!0),t;t=tt(t)}if(p=t.elm,v=r.parentNode(p),f(i,a),i.parent&&(i.parent.elm=i.elm,h(i)))for(y=0;y<u.create.length;++y)u.create[y](fi,i.parent);null!==v?(r.insertBefore(v,i.elm,r.nextSibling(p)),l(v,[t],0,0)):n(t.tag)&&s(t)}else w=!0,f(i,a);return g(i,a,w),i.elm}}function br(n,t){var h;if(n.data.directives||t.data.directives){var r,u,i,c=n===fi,f=df(n.data.directives,n.context),e=df(t.data.directives,t.context),o=[],s=[];for(r in e)u=f[r],i=e[r],u?(i.oldValue=u.value,dt(i,"update",t,n),i.def&&i.def.componentUpdated&&s.push(i)):(dt(i,"bind",t,n),i.def&&i.def.inserted&&o.push(i));if(o.length&&(h=function(){o.forEach(function(i){dt(i,"inserted",t,n)})},c?et(t.data.hook||(t.data.hook={}),"insert",h,"dir-insert"):h()),s.length&&et(t.data.hook||(t.data.hook={}),"postpatch",function(){s.forEach(function(i){dt(i,"componentUpdated",t,n)})},"dir-postpatch"),!c)for(r in f)e[r]||dt(f[r],"unbind",n)}}function df(n,t){var u=Object.create(null),r,i;if(!n)return u;for(r=0;r<n.length;r++)i=n[r],i.modifiers||(i.modifiers=kw),u[ya(i)]=i,i.def=ai(t.$options,"directives",i.name,!0);return u}function ya(n){return n.rawName||n.name+"."+Object.keys(n.modifiers||{}).join(".")}function dt(n,t,i,r){var u=n.def&&n.def[t];u&&u(i.elm,n,i,r)}function gf(n,t){if(n.data.attrs||t.data.attrs){var i,f,o,e=t.elm,s=n.data.attrs||{},u=t.data.attrs||{};u.__ob__&&(u=t.data.attrs=r({},u));for(i in u)f=u[i],o=s[i],o!==f&&pa(e,i,f);for(i in s)null==u[i]&&(hu(i)?e.removeAttributeNS(su,go(i)):ko(i)||e.removeAttribute(i))}}function pa(n,t,i){sw(t)?tr(i)?n.removeAttribute(t):n.setAttribute(t,t):ko(t)?n.setAttribute(t,tr(i)||"false"===i?"false":"true"):hu(t)?tr(i)?n.removeAttributeNS(su,go(t)):n.setAttributeNS(su,t,i):tr(i)?n.removeAttribute(t):n.setAttribute(t,i)}function ne(n,t){var r=t.elm,e=t.data,u=n.data,i,f;(e.staticClass||e.class||u&&(u.staticClass||u.class))&&(i=bl(t),f=r._transitionClasses,f&&(i=yr(i,pr(f))),i!==r._prevClass&&(r.setAttribute("class",i),r._prevClass=i))}function te(n,t){if(n.data.on||t.data.on){var i=t.data.on||{},r=n.data.on||{},u=t.elm._v_add||(t.elm._v_add=function(n,i,r){t.elm.addEventListener(n,i,r)}),f=t.elm._v_remove||(t.elm._v_remove=function(n,i){t.elm.removeEventListener(n,i)});lf(i,r,u,f,t.context)}}function ie(n,t){var o;if(n.data.domProps||t.data.domProps){var i,e,u=t.elm,s=n.data.domProps||{},f=t.data.domProps||{};f.__ob__&&(f=t.data.domProps=r({},f));for(i in s)null==f[i]&&(u[i]=void 0);for(i in f)("textContent"!==i&&"innerHTML"!==i||!t.children||(t.children.length=0),e=f[i],"value"===i)?(u._value=e,o=null==e?"":String(e),u.value===o||u.composing||(u.value=o)):u[i]=e}}function re(n,t){var s;if(n.data&&n.data.style||t.data.style){var f,u,e=t.elm,o=n.data.style||{},i=t.data.style||{};if("string"==typeof i)return void(e.style.cssText=i);s=i.__ob__;Array.isArray(i)&&(i=t.data.style=fr(i));s&&(i=t.data.style=r({},i));for(u in o)null==i[u]&&(e.style[is(u)]="");for(u in i)f=i[u],f!==o[u]&&(e.style[is(u)]=null==f?"":f)}}function wa(n,t){if(n.classList)t.indexOf(" ")>-1?t.split(/\s+/).forEach(function(t){return n.classList.add(t)}):n.classList.add(t);else{var i=" "+n.getAttribute("class")+" ";i.indexOf(" "+t+" ")<0&&n.setAttribute("class",(i+t).trim())}}function ba(n,t){if(n.classList)t.indexOf(" ")>-1?t.split(/\s+/).forEach(function(t){return n.classList.remove(t)}):n.classList.remove(t);else{for(var i=" "+n.getAttribute("class")+" ",r=" "+t+" ";i.indexOf(r)>=0;)i=i.replace(r," ");n.setAttribute("class",i.trim())}}function ue(n){fs(function(){fs(n)})}function ct(n,t){(n._transitionClasses||(n._transitionClasses=[])).push(t);wa(n,t)}function g(n,t){n._transitionClasses&&st(n._transitionClasses,t);ba(n,t)}function fe(n,t,i){var r=ee(n,t),u=r.type,c=r.timeout,f=r.propCount;if(!u)return i();var e=u===vt?ur:us,o=0,s=function(){n.removeEventListener(e,h);i()},h=function(t){t.target===n&&++o>=f&&s()};setTimeout(function(){o<f&&s()},c+1);n.addEventListener(e,h)}function ee(n,t){var i,r=window.getComputedStyle(n),l=r[rr+"Delay"].split(", "),s=r[rr+"Duration"].split(", "),f=oe(l,s),a=r[au+"Delay"].split(", "),h=r[au+"Duration"].split(", "),e=oe(a,h),u=0,o=0,c;return t===vt?f>0&&(i=vt,u=f,o=s.length):t===lu?e>0&&(i=lu,u=e,o=h.length):(u=Math.max(f,e),i=u>0?f>e?vt:lu:null,o=i?i===vt?s.length:h.length:0),c=i===vt&&ub.test(r[rr+"Property"]),{type:i,timeout:u,propCount:o,hasTransform:c}}function oe(n,t){return Math.max.apply(null,t.map(function(t,i){return se(t)+se(n[i])}))}function se(n){return 1e3*Number(n.slice(0,-1))}function kr(n){var t=n.elm,i;if(t._leaveCb&&(t._leaveCb.cancelled=!0,t._leaveCb()),i=ce(n.data.transition),i&&!t._enterCb&&1===t.nodeType){var k=i.css,d=i.type,nt=i.enterClass,tt=i.enterActiveClass,it=i.appearClass,ut=i.appearActiveClass,c=i.beforeEnter,ft=i.enter,l=i.afterEnter,a=i.enterCancelled,st=i.beforeAppear,e=i.appear,ht=i.afterAppear,lt=i.appearCancelled,s=ot.$vnode,at=s&&s.parent?s.parent.context:ot,r=!at._isMounted||!n.isRootInsert;if(!r||e||""===e){var h=r?it:nt,v=r?ut:tt,y=r?st||c:c,u=r&&"function"==typeof e?e:ft,p=r?ht||l:l,w=r?lt||a:a,o=k!==!1&&!rt,b=u&&(u._length||u.length)>1,f=t._enterCb=le(function(){o&&g(t,v);f.cancelled?(o&&g(t,h),w&&w(t)):p&&p(t);t._enterCb=null});n.data.show||et(n.data.hook||(n.data.hook={}),"insert",function(){var r=t.parentNode,i=r&&r._pending&&r._pending[n.key];i&&i.tag===n.tag&&i.elm._leaveCb&&i.elm._leaveCb();u&&u(t,f)},"transition-insert");y&&y(t);o&&(ct(t,h),ct(t,v),ue(function(){g(t,h);f.cancelled||b||fe(t,d,f)}));n.data.show&&u&&u(t,f);o||b||f()}}}function he(n,t){function s(){u.cancelled||(n.data.show||((i.parentNode._pending||(i.parentNode._pending={}))[n.key]=n),c&&c(i),e&&(ct(i,o),ct(i,h),ue(function(){g(i,o);u.cancelled||y||fe(i,w,u)})),f&&f(i,u),e||y||u())}var i=n.elm,r;if(i._enterCb&&(i._enterCb.cancelled=!0,i._enterCb()),r=ce(n.data.transition),!r)return t();if(!i._leaveCb&&1===i.nodeType){var p=r.css,w=r.type,o=r.leaveClass,h=r.leaveActiveClass,c=r.beforeLeave,f=r.leave,l=r.afterLeave,a=r.leaveCancelled,v=r.delayLeave,e=p!==!1&&!rt,y=f&&(f._length||f.length)>1,u=i._leaveCb=le(function(){i.parentNode&&i.parentNode._pending&&(i.parentNode._pending[n.key]=null);e&&g(i,h);u.cancelled?(e&&g(i,o),a&&a(i)):(t(),l&&l(i));i._leaveCb=null});v?v(s):s()}}function ce(n){if(n){if("object"==typeof n){var t={};return n.css!==!1&&r(t,es(n.name||"v")),r(t,n),t}return"string"==typeof n?es(n):void 0}}function le(n){var t=!1;return function(){t||(t=!0,n())}}function ae(n,t){var u=t.value,f=n.multiple,e,r,i,o;if(!f||Array.isArray(u)){for(i=0,o=n.options.length;i<o;i++)if(r=n.options[i],f)e=er(u,dr(r))>-1,r.selected!==e&&(r.selected=e);else if(yt(dr(r),u))return void(n.selectedIndex!==i&&(n.selectedIndex=i));f||(n.selectedIndex=-1)}}function ve(n,t){for(var i=0,r=t.length;i<r;i++)if(yt(dr(t[i]),n))return!1;return!0}function dr(n){return"_value"in n?n._value:n.value}function ka(n){n.target.composing=!0}function da(n){n.target.composing=!1;gr(n.target,"input")}function gr(n,t){var i=document.createEvent("HTMLEvents");i.initEvent(t,!0,!0);n.dispatchEvent(i)}function nu(n){return!n.child||n.data&&n.data.transition?n:nu(n.child._vnode)}function tu(n){var t=n&&n.componentOptions;return t&&t.Ctor.options.abstract?tu(yf(t.children)):n}function ye(n){var t={},f=n.$options,i,r,u;for(i in f.propsData)t[i]=n[i];r=f._parentListeners;for(u in r)t[nt(u)]=r[u].fn;return t}function pe(n,t){return/\d-keep-alive$/.test(t.tag)?n("keep-alive"):null}function ga(n){for(;n=n.parent;)if(n.data.transition)return!0}function nv(n){n.elm._moveCb&&n.elm._moveCb();n.elm._enterCb&&n.elm._enterCb()}function tv(n){n.data.newPos=n.elm.getBoundingClientRect()}function iv(n){var i=n.data.pos,r=n.data.newPos,u=i.left-r.left,f=i.top-r.top,t;(u||f)&&(n.data.moved=!0,t=n.elm.style,t.transform=t.WebkitTransform="translate("+u+"px,"+f+"px)",t.transitionDuration="0s")}function rv(n,t){var i=document.createElement("div");return i.innerHTML='<div a="'+n+'">',i.innerHTML.indexOf(t)>0}function uv(n){return ls.innerHTML=n,ls.textContent}function fv(n,t){return t&&(n=n.replace(uk,"\n")),n.replace(ik,"<").replace(rk,">").replace(fk,"&").replace(ek,'"')}function ev(n,t){function u(t){i+=t;n=n.substring(t)}function d(){var f=n.match(wb),t,r,e;if(f){for(t={tagName:f[1],attrs:[],start:i},u(f[0].length);!(r=n.match(bb))&&(e=n.match(pb));)u(e[0].length),t.attrs.push(e);if(r)return t.unarySlash=r[1],u(r[0].length),t.end=i,t}}function g(n){var u=n.tagName,h=n.unarySlash,i,a;nt&&("p"===r&&vw(u)&&o("",r),aw(u)&&r===u&&o("",u));for(var c=it(u)||"html"===u&&"head"===r||!!h,l=n.attrs.length,s=new Array(l),f=0;f<l;f++)i=n.attrs[f],ys&&i[0].indexOf('""')===-1&&(""===i[3]&&delete i[3],""===i[4]&&delete i[4],""===i[5]&&delete i[5]),a=i[3]||i[4]||i[5]||"",s[f]={name:i[1],value:fv(a,t.shouldDecodeNewlines)};c||(e.push({tag:u,attrs:s}),r=u,h="");t.start&&t.start(u,s,c,n.start,n.end)}function o(n,u,f,o){var s,c,h;if(null==f&&(f=i),null==o&&(o=i),u)for(c=u.toLowerCase(),s=e.length-1;s>=0&&e[s].tag.toLowerCase()!==c;s--);else s=0;if(s>=0){for(h=e.length-1;h>=s;h--)t.end&&t.end(e[h].tag,f,o);e.length=s;r=s&&e[s-1].tag}else"br"===u.toLowerCase()?t.start&&t.start(u,[],!0,f,o):"p"===u.toLowerCase()&&(t.start&&t.start(u,[],!1,f,o),t.end&&t.end(u,f,o))}for(var s,l,a,v,h,k,y,c,p,r,e=[],nt=t.expectHTML,it=t.isUnaryTag||tt,i=0;n;){if(p=n,r&&tk(r)){var f=r.toLowerCase(),rt=ih[f]||(ih[f]=new RegExp("([\\s\\S]*?)(<\/"+f+"[^>]*>)","i")),w=0,b=n.replace(rt,function(n,i,r){return w=r.length,"script"!==f&&"style"!==f&&"noscript"!==f&&(i=i.replace(/<!--([\s\S]*?)-->/g,"$1").replace(/<!\[CDATA\[([\s\S]*?)\]\]>/g,"$1")),t.chars&&t.chars(i),""});i+=n.length-b.length;n=b;o("<\/"+f+">",f,i-w,i)}else{if(s=n.indexOf("<"),0===s){if(/^<!--/.test(n)&&(l=n.indexOf("-->"),l>=0)){u(l+3);continue}if(/^<!\[/.test(n)&&(a=n.indexOf("]>"),a>=0)){u(a+2);continue}if(v=n.match(db),v){u(v[0].length);continue}if(h=n.match(kb),h){k=i;u(h[0].length);o(h[0],h[1],k,i);continue}if(y=d(),y){g(y);continue}}c=void 0;s>=0?(c=n.substring(0,s),u(s)):(c=n,n="");t.chars&&t.chars(c)}if(n===p)throw new Error("Error parsing template:\n\n"+n);}o()}function ov(n){function a(){(u||(u=[])).push(n.slice(o,t).trim());o=t+1}for(var r,s,i,u,f=!1,e=!1,h=0,c=0,l=0,o=0,t=0;t<n.length;t++)if(s=r,r=n.charCodeAt(t),f)39===r&&92!==s&&(f=!f);else if(e)34===r&&92!==s&&(e=!e);else if(124!==r||124===n.charCodeAt(t+1)||124===n.charCodeAt(t-1)||h||c||l)switch(r){case 34:e=!0;break;case 39:f=!0;break;case 40:l++;break;case 41:l--;break;case 91:c++;break;case 93:c--;break;case 123:h++;break;case 125:h--}else void 0===i?(o=t+1,i=n.slice(0,t).trim()):a();if(void 0===i?i=n.slice(0,t).trim():0!==o&&a(),u)for(t=0;t<u.length;t++)i=sv(i,u[t]);return i}function sv(n,t){var i=t.indexOf("("),r,u;return i<0?'_f("'+t+'")('+n+")":(r=t.slice(0,i),u=t.slice(i+1),'_f("'+r+'")('+n+","+u)}function hv(n,t){var e=t?sk(t):ok,u,f,r,i,o;if(e.test(n)){for(r=[],i=e.lastIndex=0;u=e.exec(n);)f=u.index,f>i&&r.push(JSON.stringify(n.slice(i,f))),o=ov(u[1].trim()),r.push("_s("+o+")"),i=f+u[0].length;return i<n.length&&r.push(JSON.stringify(n.slice(i))),r.join("+")}}function iu(n){console.error("[Vue parser]: "+n)}function gt(n,t){return n?n.map(function(n){return n[t]}).filter(function(n){return n}):[]}function lt(n,t,i){(n.props||(n.props=[])).push({name:t,value:i})}function we(n,t,i){(n.attrs||(n.attrs=[])).push({name:t,value:i})}function cv(n,t,i,r,u,f){(n.directives||(n.directives=[])).push({name:t,rawName:i,value:r,arg:u,modifiers:f})}function ni(n,t,i,r,u){var o,e,f;r&&r.capture&&(delete r.capture,t="!"+t);r&&r.native?(delete r.native,o=n.nativeEvents||(n.nativeEvents={})):o=n.events||(n.events={});e={value:i,modifiers:r};f=o[t];Array.isArray(f)?u?f.unshift(e):f.push(e):o[t]=f?u?[e,f]:[f,e]:e}function c(n,t,i){var u=p(n,":"+t)||p(n,"v-bind:"+t),r;return null!=u?u:i!==!1&&(r=p(n,t),null!=r)?JSON.stringify(r):void 0}function p(n,t){var u;if(null!=(u=n.attrsMap[t]))for(var r=n.attrsList,i=0,f=r.length;i<f;i++)if(r[i].name===t){r.splice(i,1);break}return u}function lv(n,t){gb=t.warn||iu;ps=t.getTagNamespace||tt;ws=t.mustUseProp||tt;vu=t.isPreTag||tt;yu=gt(t.modules,"preTransformNode");pu=gt(t.modules,"transformNode");wu=gt(t.modules,"postTransformNode");bs=t.delimiters;var f,i,r=[],o=t.preserveWhitespace!==!1,u=!1,e=!1;return ev(n,{expectHTML:t.expectHTML,isUnaryTag:t.isUnaryTag,shouldDecodeNewlines:t.shouldDecodeNewlines,start:function(n,o,s){function y(){}var v=i&&i.ns||ps(n),h,c,l,a;for(t.isIE&&"svg"===v&&(o=oy(o)),h={type:1,tag:n,attrsList:o,attrsMap:uy(o,t.isIE),parent:i,children:[]},v&&(h.ns=v),ey(h)&&(h.forbidden=!0),c=0;c<yu.length;c++)yu[c](h,t);if(u||(av(h),h.pre&&(u=!0)),vu(h.tag)&&(e=!0),u)vv(h);else{for(wv(h),bv(h),dv(h),yv(h),h.plain=!h.key&&!o.length,pv(h),gv(h),ny(h),l=0;l<pu.length;l++)pu[l](h,t);ty(h)}for(f||(f=h,y(f)),i&&!h.forbidden&&(h.else?kv(h,i):(i.children.push(h),h.parent=i)),s||(i=h,r.push(h)),a=0;a<wu.length;a++)wu[a](h,t)},end:function(){var n=r[r.length-1],t=n.children[n.children.length-1];t&&3===t.type&&" "===t.text&&n.children.pop();r.length-=1;i=r[r.length-1];n.pre&&(u=!1);vu(n.tag)&&(e=!1)},chars:function(n){if(i&&(n=e||n.trim()?vk(n):o&&i.children.length?" ":"")){var t;!u&&" "!==n&&(t=hv(n,bs))?i.children.push({type:2,expression:t,text:n}):(n=n.replace(ak,""),i.children.push({type:3,text:n}))}}}),f}function av(n){null!=p(n,"v-pre")&&(n.pre=!0)}function vv(n){var i=n.attrsList.length,r,t;if(i)for(r=n.attrs=new Array(i),t=0;t<i;t++)r[t]={name:n.attrsList[t].name,value:JSON.stringify(n.attrsList[t].value)};else n.pre||(n.plain=!0)}function yv(n){var t=c(n,"key");t&&(n.key=t)}function pv(n){var t=c(n,"ref");t&&(n.ref=t,n.refInFor=iy(n))}function wv(n){var u,i,r,t;if(u=p(n,"v-for")){if(i=u.match(hk),!i)return;n.for=i[2].trim();r=i[1].trim();t=r.match(ck);t?(n.alias=t[1].trim(),n.iterator1=t[2].trim(),t[3]&&(n.iterator2=t[3].trim())):n.alias=r}}function bv(n){var t=p(n,"v-if");t&&(n.if=t);null!=p(n,"v-else")&&(n.else=!0)}function kv(n,t){var i=fy(t.children);i&&i.if&&(i.elseBlock=n)}function dv(n){var t=p(n,"v-once");null!=t&&(n.once=!0)}function gv(n){if("slot"===n.tag)n.slotName=c(n,"name");else{var t=c(n,"slot");t&&(n.slotTarget=t)}}function ny(n){var t;(t=c(n,"is"))&&(n.component=t);null!=p(n,"inline-template")&&(n.inlineTemplate=!0)}function ty(n){for(var t,h,i,f,r,c,e=n.attrsList,o,u=0,s=e.length;u<s;u++)(t=h=e[u].name,i=e[u].value,uh.test(t))?(n.hasBindings=!0,r=ry(t),r&&(t=t.replace(oh,"")),fh.test(t))?(t=t.replace(fh,""),r&&r.prop&&(c=!0,t=nt(t),"innerHtml"===t&&(t="innerHTML")),c||ws(t)?lt(n,t,i):we(n,t,i)):eh.test(t)?(t=t.replace(eh,""),ni(n,t,i,r)):(t=t.replace(uh,""),o=t.match(lk),o&&(f=o[1])&&(t=t.slice(0,-(f.length+1))),cv(n,t,h,i,f,r)):we(n,t,JSON.stringify(i))}function iy(n){for(var t=n;t;){if(void 0!==t.for)return!0;t=t.parent}return!1}function ry(n){var i=n.match(oh),t;if(i)return t={},i.forEach(function(n){t[n.slice(1)]=!0}),t}function uy(n){for(var i={},t=0,r=n.length;t<r;t++)i[n[t].name]=n[t].value;return i}function fy(n){for(var t=n.length;t--;)if(n[t].tag)return n[t]}function ey(n){return"style"===n.tag||"script"===n.tag&&(!n.attrsMap.type||"text/javascript"===n.attrsMap.type)}function oy(n){for(var t,r=[],i=0;i<n.length;i++)t=n[i],yk.test(t.name)||(t.name=t.name.replace(pk,""),r.push(t));return r}function sy(n,t){n&&(ks=wk(t.staticKeys||""),ds=t.isReservedTag||function(){return!1},be(n),ke(n,!1))}function hy(n){return o("type,tag,attrsList,attrsMap,plain,parent,children,attrs"+(n?","+n:""))}function be(n){var t,r,i;if(n.static=cy(n),1===n.type)for(t=0,r=n.children.length;t<r;t++)i=n.children[t],be(i),i.static||(n.static=!1)}function ke(n,t){if(1===n.type){if(n.once||n.static)return n.staticRoot=!0,void(n.staticInFor=t);if(n.children)for(var i=0,r=n.children.length;i<r;i++)ke(n.children[i],t||!!n.for)}}function cy(n){return 2!==n.type&&(3===n.type||!(!n.pre&&(n.hasBindings||n.if||n.for||ru(n.tag)||!ds(n.tag)||ly(n)||!Object.keys(n).every(ks))))}function ly(n){for(;n.parent;){if(n=n.parent,"template"!==n.tag)return!1;if(n.for)return!0}return!1}function de(n,t){var r=t?"nativeOn:{":"on:{",i;for(i in n)r+='"'+i+'":'+ge(n[i])+",";return r.slice(0,-1)+"}"}function ge(n){var t,i,r,u;if(n){if(Array.isArray(n))return"["+n.map(ge).join(",")+"]";if(n.modifiers){t="";i=[];for(r in n.modifiers)hh[r]?t+=hh[r]:i.push(r);return i.length&&(t=ay(i)+t),u=sh.test(n.value)?n.value+"($event)":n.value,"function($event){"+t+u+"}"}return sh.test(n.value)?n.value:"function($event){"+n.value+"}"}return"function(){}"}function ay(n){var t=1===n.length?no(n[0]):Array.prototype.concat.apply([],n.map(no));return Array.isArray(t)?"if("+t.map(function(n){return"$event.keyCode!=="+n}).join("&&")+")return;":"if($event.keyCode!=="+t+")return;"}function no(n){return parseInt(n,10)||bk[n]||"_k("+JSON.stringify(n)+")"}function vy(n,t){n.wrapData=function(n){return"_b("+n+","+t.value+(t.modifiers&&t.modifiers.prop?",true":"")+")"}}function to(n,t){var r=oi,u=oi=[],i;return th=t,gs=t.warn||iu,bu=gt(t.modules,"transformCode"),ku=gt(t.modules,"genData"),nh=t.directives||{},i=n?at(n):'_h("div")',oi=r,{render:"with(this){return "+i+"}",staticRenderFns:u}}function at(n){var t,r,u,i;if(n.staticRoot&&!n.staticProcessed)return n.staticProcessed=!0,oi.push("with(this){return "+at(n)+"}"),"_m("+(oi.length-1)+(n.staticInFor?",true":"")+")";if(n.for&&!n.forProcessed)return wy(n);if(n.if&&!n.ifProcessed)return yy(n);if("template"!==n.tag||n.slotTarget){if("slot"===n.tag)return gy(n);for(n.component?t=np(n):(r=io(n),u=n.inlineTemplate?null:yi(n),t="_h('"+n.tag+"'"+(r?","+r:"")+(u?","+u:"")+")"),i=0;i<bu.length;i++)t=bu[i](n,t);return t}return yi(n)||"void 0"}function yy(n){var t=n.if;return n.ifProcessed=!0,"("+t+")?"+at(n)+":"+py(n)}function py(n){return n.elseBlock?at(n.elseBlock):"_e()"}function wy(n){var t=n.for,i=n.alias,r=n.iterator1?","+n.iterator1:"",u=n.iterator2?","+n.iterator2:"";return n.forProcessed=!0,"_l(("+t+"),function("+i+r+u+"){return "+at(n)+"})"}function io(n){var t,r,i,u,f;if(!n.plain){for(t="{",r=by(n),r&&(t+=r+","),n.key&&(t+="key:"+n.key+","),n.ref&&(t+="ref:"+n.ref+","),n.refInFor&&(t+="refInFor:true,"),n.component&&(t+='tag:"'+n.tag+'",'),n.slotTarget&&(t+="slot:"+n.slotTarget+","),i=0;i<ku.length;i++)t+=ku[i](n);return(n.attrs&&(t+="attrs:{"+ro(n.attrs)+"},"),n.props&&(t+="domProps:{"+ro(n.props)+"},"),n.events&&(t+=de(n.events)+","),n.nativeEvents&&(t+=de(n.nativeEvents,!0)+","),n.inlineTemplate)&&(u=n.children[0],1===u.type&&(f=to(u,th),t+="inlineTemplate:{render:function(){"+f.render+"},staticRenderFns:["+f.staticRenderFns.map(function(n){return"function(){"+n+"}"}).join(",")+"]}")),t=t.replace(/,$/,"")+"}",n.wrapData&&(t=n.wrapData(t)),t}}function by(n){var r=n.directives,i,s,t,u,f,e,o;if(r){for(f="directives:[",e=!1,i=0,s=r.length;i<s;i++)t=r[i],u=!0,o=nh[t.name]||kk[t.name],o&&(u=!!o(n,t,gs)),u&&(e=!0,f+='{name:"'+t.name+'",rawName:"'+t.rawName+'"'+(t.value?",value:("+t.value+"),expression:"+JSON.stringify(t.value):"")+(t.arg?',arg:"'+t.arg+'"':"")+(t.modifiers?",modifiers:"+JSON.stringify(t.modifiers):"")+"},");return e?f.slice(0,-1)+"]":void 0}}function yi(n){if(n.children.length)return"["+n.children.map(ky).join(",")+"]"}function ky(n){return 1===n.type?at(n):dy(n)}function dy(n){return 2===n.type?n.expression:JSON.stringify(n.text)}function gy(n){var t=n.slotName||'"default"',i=yi(n);return i?"_t("+t+","+i+")":"_t("+t+")"}function np(n){var t=n.inlineTemplate?null:yi(n);return"_h("+n.component+","+io(n)+(t?","+t:"")+")"}function ro(n){for(var r,i="",t=0;t<n.length;t++)r=n[t],i+='"'+r.name+'":'+r.value+",";return i.slice(0,-1)}function tp(n,t){var i=lv(n.trim(),t),r;return sy(i,t),r=to(i,t),{ast:i,render:r.render,staticRenderFns:r.staticRenderFns}}function ip(n,t){var r=(t.warn||iu,p(n,"class")),i;r&&(n.staticClass=JSON.stringify(r));i=c(n,"class",!1);i&&(n.classBinding=i)}function rp(n){var t="";return n.staticClass&&(t+="staticClass:"+n.staticClass+","),n.classBinding&&(t+="class:"+n.classBinding+","),t}function up(n){var t=c(n,"style",!1);t&&(n.styleBinding=t)}function fp(n){return n.styleBinding?"style:("+n.styleBinding+"),":""}function ep(n,t,i){nk=i;var r=t.value,e=t.modifiers,u=n.tag,f=n.attrsMap.type;return"select"===u?cp(n,r):"input"===u&&"checkbox"===f?op(n,r):"input"===u&&"radio"===f?sp(n,r):hp(n,r,e),!0}function op(n,t){var i=c(n,"value")||"null",r=c(n,"true-value")||"true",u=c(n,"false-value")||"false";lt(n,"checked","Array.isArray("+t+")?_i("+t+","+i+")>-1:_q("+t+","+r+")");ni(n,"change","var $$a="+t+",$$el=$event.target,$$c=$$el.checked?("+r+"):("+u+");if(Array.isArray($$a)){var $$v="+i+",$$i=_i($$a,$$v);if($$c){$$i<0&&("+t+"=$$a.concat($$v))}else{$$i>-1&&("+t+"=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{"+t+"=$$c}",null,!0)}function sp(n,t){var i=c(n,"value")||"null";lt(n,"checked","_q("+t+","+i+")");ni(n,"change",t+"="+i,null,!0)}function hp(n,t,i){var r=n.attrsMap.type,u=i||{},o=u.lazy,h=u.number,c=u.trim,l=o||pi&&"range"===r?"change":"input",a=!o&&"range"!==r,f="input"===n.tag||"textarea"===n.tag,s=f?"$event.target.value"+(c?".trim()":""):"$event",e=h||"number"===r?t+"=_n("+s+")":t+"="+s;f&&a&&(e="if($event.target.composing)return;"+e);lt(n,"value",f?"_s("+t+")":"("+t+")");ni(n,l,e,null,!0)}function cp(n,t){var i=t+'=Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){return "_value" in o ? o._value : o.value})'+(null==n.attrsMap.multiple?"[0]":"");ni(n,"change",i,null,!0)}function lp(n,t){t.value&&lt(n,"textContent","_s("+t.value+")")}function ap(n,t){t.value&&lt(n,"innerHTML","_s("+t.value+")")}function vp(n,t){return t=t?r(r({},lh),t):lh,tp(n,t)}function uo(n,t){var f=(t&&t.warn||gi,t&&t.delimiters?String(t.delimiters)+n:n),i,u,e,r;if(du[f])return du[f];for(i={},u=vp(n,t),i.render=fo(u.render),e=u.staticRenderFns.length,i.staticRenderFns=new Array(e),r=0;r<e;r++)i.staticRenderFns[r]=fo(u.staticRenderFns[r]);return du[f]=i}function fo(n){try{return new Function(n)}catch(n){return f}}function yp(n){if(n.outerHTML)return n.outerHTML;var t=document.createElement("div");return t.appendChild(n.cloneNode(!0)),t.innerHTML}var ti,ru=o("slot,component",!0),pp=Object.prototype.hasOwnProperty,wp=/-(\w)/g,nt=y(function(n){return n.replace(wp,function(n,t){return t?t.toUpperCase():""})}),eo=y(function(n){return n.charAt(0).toUpperCase()+n.slice(1)}),oo=/([^-])([A-Z])/g,uu=y(function(n){return n.replace(oo,"$1-$2").replace(oo,"$1-$2").toLowerCase()}),bp=Object.prototype.toString,kp="[object Object]",tt=function(){return!1},i={optionMergeStrategies:Object.create(null),silent:!1,devtools:!1,errorHandler:null,ignoredElements:null,keyCodes:Object.create(null),isReservedTag:tt,isUnknownElement:tt,getTagNamespace:f,mustUseProp:tt,_assetTypes:["component","directive","filter"],_lifecycleHooks:["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated"],_maxUpdateCount:100,_isServer:!1},dp=/[^\w\.\$]/,so="__proto__"in{},it="undefined"!=typeof window&&"[object Object]"!==Object.prototype.toString.call(window),l=it&&window.navigator.userAgent.toLowerCase(),pi=l&&/msie|trident/.test(l),rt=l&&l.indexOf("msie 9.0")>0,ho=l&&l.indexOf("edge/")>0,co=l&&l.indexOf("android")>0,lo=l&&/iphone|ipad|ipod|ios/.test(l),ii=it&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,wi=function(){function i(){var t,n;for(u=!1,t=r.slice(0),r.length=0,n=0;n<t.length;n++)t[n]()}var n,r=[],u=!1,e;if("undefined"!=typeof Promise&&or(Promise))e=Promise.resolve(),n=function(){e.then(i);lo&&setTimeout(f)};else if("undefined"!=typeof MutationObserver&&(or(MutationObserver)||"[object MutationObserverConstructor]"===MutationObserver.toString())){var t=1,s=new MutationObserver(i),o=document.createTextNode(String(t));s.observe(o,{characterData:!0});n=function(){t=(t+1)%2;o.data=String(t)}}else n=function(){setTimeout(i,0)};return function(t,i){var f=i?function(){t.call(i)}:t;r.push(f);u||(u=!0,n())}}(),ao,u,rw,gi,w,hs,cs;ti="undefined"!=typeof Set&&or(Set)?Set:function(){function n(){this.set=Object.create(null)}return n.prototype.has=function(n){return void 0!==this.set[n]},n.prototype.add=function(n){this.set[n]=1},n.prototype.clear=function(){this.set=Object.create(null)},n}();ao=0;u=function(){this.id=ao++;this.subs=[]};u.prototype.addSub=function(n){this.subs.push(n)};u.prototype.removeSub=function(n){st(this.subs,n)};u.prototype.depend=function(){u.target&&u.target.addDep(this)};u.prototype.notify=function(){for(var t=this.subs.slice(),n=0,i=t.length;n<i;n++)t[n].update()};u.target=null;var vo=[],ut=[],bi={},fu=!1,eu=!1,ri=0,gp=0,a=function(n,t,i,r){void 0===r&&(r={});this.vm=n;n._watchers.push(this);this.deep=!!r.deep;this.user=!!r.user;this.lazy=!!r.lazy;this.sync=!!r.sync;this.expression=t.toString();this.cb=i;this.id=++gp;this.active=!0;this.dirty=this.lazy;this.deps=[];this.newDeps=[];this.depIds=new ti;this.newDepIds=new ti;"function"==typeof t?this.getter=t:(this.getter=uf(t),this.getter||(this.getter=function(){}));this.value=this.lazy?void 0:this.get()};a.prototype.get=function(){ah(this);var n=this.getter.call(this.vm,this.vm);return this.deep&&sr(n),vh(),this.cleanupDeps(),n};a.prototype.addDep=function(n){var t=n.id;this.newDepIds.has(t)||(this.newDepIds.add(t),this.newDeps.push(n),this.depIds.has(t)||n.addSub(this))};a.prototype.cleanupDeps=function(){for(var r,t,n=this,i=this.deps.length;i--;)r=n.deps[i],n.newDepIds.has(r.id)||r.removeSub(n);t=this.depIds;this.depIds=this.newDepIds;this.newDepIds=t;this.newDepIds.clear();t=this.deps;this.deps=this.newDeps;this.newDeps=t;this.newDeps.length=0};a.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():wh(this)};a.prototype.run=function(){var n,t;if(this.active&&(n=this.get(),n!==this.value||e(n)||this.deep))if(t=this.value,this.value=n,this.user)try{this.cb.call(this.vm,n,t)}catch(n){if(!i.errorHandler)throw n;i.errorHandler.call(null,n,this.vm)}else this.cb.call(this.vm,n,t)};a.prototype.evaluate=function(){this.value=this.get();this.dirty=!1};a.prototype.depend=function(){for(var t=this,n=this.deps.length;n--;)t.deps[n].depend()};a.prototype.teardown=function(){var t=this,n;if(this.active){for(this.vm._isBeingDestroyed||this.vm._vForRemoving||st(this.vm._watchers,this),n=this.deps.length;n--;)t.deps[n].removeSub(t);this.active=!1}};var nw=new ti,yo=Array.prototype,ou=Object.create(yo);["push","pop","shift","unshift","splice","sort","reverse"].forEach(function(n){var t=yo[n];ci(ou,n,function(){for(var r,e,f,o=arguments,u=arguments.length,i=new Array(u);u--;)i[u]=o[u];e=t.apply(this,i);f=this.__ob__;switch(n){case"push":r=i;break;case"unshift":r=i;break;case"splice":r=i.slice(2)}return r&&f.observeArray(r),f.dep.notify(),e})});var tw=Object.getOwnPropertyNames(ou),ft={shouldConvert:!0,isSettingProps:!1},ki=function(n){if(this.value=n,this.dep=new u,this.vmCount=0,ci(n,"__ob__",this),Array.isArray(n)){var t=so?bh:kh;t(n,ou,tw);this.observeArray(n)}else this.walk(n)};ki.prototype.walk=function(n){for(var i=Object.keys(n),t=0;t<i.length;t++)li(n,i[t],n[i[t]])};ki.prototype.observeArray=function(n){for(var t=0,i=n.length;t<i;t++)pt(n[t])};var ui={enumerable:!0,configurable:!0,get:f,set:f},v=function(n,t,i,r,u,f,e,o){this.tag=n;this.data=t;this.children=i;this.text=r;this.elm=u;this.ns=f;this.context=e;this.functionalContext=void 0;this.key=t&&t.key;this.componentOptions=o;this.child=void 0;this.parent=void 0;this.raw=!1;this.isStatic=!1;this.isRootInsert=!0;this.isComment=!1;this.isCloned=!1},di=function(){var n=new v;return n.text="",n.isComment=!0,n},ot=null,po={init:ac,prepatch:vc,insert:yc,destroy:pc},wo=Object.keys(po),iw=0;ul(t);uc(t);rl(t);hc(t);tl(t);gi=f;w=i.optionMergeStrategies;w.data=function(n,t,i){return i?n||t?function(){var r="function"==typeof t?t.call(i):t,u="function"==typeof n?n.call(i):void 0;return r?vr(r,u):u}:void 0:t?"function"!=typeof t?n:n?function(){return vr(t.call(this),n.call(this))}:t:n};i._lifecycleHooks.forEach(function(n){w[n]=fl});i._assetTypes.forEach(function(n){w[n+"s"]=el});w.watch=function(n,t){var u,f,i,e;if(!t)return n;if(!n)return t;u={};r(u,n);for(f in t)i=u[f],e=t[f],i&&!Array.isArray(i)&&(i=[i]),u[f]=i?i.concat(e):[e];return u};w.props=w.methods=w.computed=function(n,t){if(!t)return n;if(!n)return t;var i=Object.create(null);return r(i,n),r(i,t),i};var uw=function(n,t){return void 0===t?n:t},fw=Object.freeze({defineReactive:li,_toString:gu,toNumber:nf,makeMap:o,isBuiltInTag:ru,remove:st,hasOwn:s,isPrimitive:si,cached:y,camelize:nt,capitalize:eo,hyphenate:uu,bind:b,toArray:hi,extend:r,isObject:e,isPlainObject:k,toObject:fr,noop:f,no:tt,genStaticKeys:tf,looseEqual:yt,looseIndexOf:er,isReserved:rf,def:ci,parsePath:uf,hasProto:so,inBrowser:it,UA:l,isIE:pi,isIE9:rt,isEdge:ho,isAndroid:co,isIOS:lo,devtools:ii,nextTick:wi,get _Set(){return ti},mergeOptions:d,resolveAsset:ai,warn:gi,formatComponentName:rw,validateProp:vi}),ew={name:"keep-alive",abstract:!0,created:function(){this.cache=Object.create(null)},render:function(){var n=yf(this.$slots.default),i,t;return n&&n.componentOptions&&(i=n.componentOptions,t=null==n.key?i.Ctor.cid+"::"+i.tag:n.key,this.cache[t]?n.child=this.cache[t].child:this.cache[t]=n,n.data.keepAlive=!0),n},destroyed:function(){var i=this,t,n;for(t in this.cache)n=i.cache[t],h(n.child,"deactivated"),n.child.$destroy()}},ow={KeepAlive:ew};wl(t);Object.defineProperty(t.prototype,"$isServer",{get:function(){return i._isServer}});t.version="2.0.3";var nr,bo=o("value,selected,checked,muted"),ko=o("contenteditable,draggable,spellcheck"),sw=o("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),su="http://www.w3.org/1999/xlink",hu=function(n){return":"===n.charAt(5)&&"xlink"===n.slice(0,5)},go=function(n){return hu(n)?n.slice(6,n.length):""},tr=function(n){return null==n||n===!1},hw={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},cw=o("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template"),lw=o("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr",!0),aw=o("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source",!0),vw=o("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track",!0),ns=o("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font,font-face,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),yw=function(n){return"pre"===n},cu=function(n){return cw(n)||ns(n)},ir=Object.create(null),pw=Object.freeze({createElement:gl,createElementNS:na,createTextNode:ta,createComment:ia,insertBefore:ra,removeChild:ua,appendChild:fa,parentNode:ea,nextSibling:oa,tagName:sa,setTextContent:ha,childNodes:ca,setAttribute:la}),ww={create:function(n,t){bt(t)},update:function(n,t){n.data.ref!==t.data.ref&&(bt(n,!0),bt(t))},destroy:function(n){bt(n,!0)}},fi=new v("",{},[]),ei=["create","update","remove","destroy"],bw={create:br,update:br,destroy:function(n){br(n,fi)}},kw=Object.create(null),dw=[ww,bw],gw={create:gf,update:gf},nb={create:ne,update:ne},tb={create:te,update:te},ib={create:ie,update:ie},ts=["Webkit","Moz","ms"],is=y(function(n){var r,t,i;if(nr=nr||document.createElement("div"),n=nt(n),"filter"!==n&&n in nr.style)return n;for(r=n.charAt(0).toUpperCase()+n.slice(1),t=0;t<ts.length;t++)if(i=ts[t]+r,i in nr.style)return i}),rb={create:re,update:re},rs=it&&!rt,vt="transition",lu="animation",rr="transition",ur="transitionend",au="animation",us="animationend";rs&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(rr="WebkitTransition",ur="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(au="WebkitAnimation",us="webkitAnimationEnd"));var fs=it&&window.requestAnimationFrame||setTimeout,ub=/\b(transform|all)(,|$)/,es=y(function(n){return{enterClass:n+"-enter",leaveClass:n+"-leave",appearClass:n+"-enter",enterActiveClass:n+"-enter-active",leaveActiveClass:n+"-leave-active",appearActiveClass:n+"-enter-active"}}),fb=it?{create:function(n,t){t.data.show||kr(t)},remove:function(n,t){n.data.show?t():he(n,t)}}:{},eb=[gw,nb,tb,ib,rb,fb],ob=eb.concat(dw),sb=va({nodeOps:pw,modules:ob});rt&&document.addEventListener("selectionchange",function(){var n=document.activeElement;n&&n.vmodel&&gr(n,"input")});var hb={inserted:function(n,t,i){if("select"===i.tag){var r=function(){ae(n,t,i.context)};r();(pi||ho)&&setTimeout(r,0)}else"textarea"!==i.tag&&"text"!==n.type||t.modifiers.lazy||(co||(n.addEventListener("compositionstart",ka),n.addEventListener("compositionend",da)),rt&&(n.vmodel=!0))},componentUpdated:function(n,t,i){if("select"===i.tag){ae(n,t,i.context);var r=n.multiple?t.value.some(function(t){return ve(t,n.options)}):t.value!==t.oldValue&&ve(t.value,n.options);r&&gr(n,"change")}}},cb={bind:function(n,t,i){var u=t.value,f,r;i=nu(i);f=i.data&&i.data.transition;u&&f&&!rt&&kr(i);r="none"===n.style.display?"":n.style.display;n.style.display=u?r:"none";n.__vOriginalDisplay=r},update:function(n,t,i){var r=t.value,f=t.oldValue,u;r!==f&&(i=nu(i),u=i.data&&i.data.transition,u&&!rt?r?(kr(i),n.style.display=n.__vOriginalDisplay):he(i,function(){n.style.display="none"}):n.style.display=r?n.__vOriginalDisplay:"none")}},lb={model:hb,show:cb},os={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String},ab={name:"transition",props:os,abstract:!0,render:function(n){var l=this,u=this.$slots.default,o,i,t,h,a,c;if(u&&(u=u.filter(function(n){return n.tag}),u.length)){if((o=this.mode,i=u[0],ga(this.$vnode))||(t=tu(i),!t))return i;if(this._leaving)return pe(n,i);var f=t.key=null==t.key||t.isStatic?"__v"+(t.tag+this._uid)+"__":t.key,s=(t.data||(t.data={})).transition=ye(this),v=this._vnode,e=tu(v);if(t.data.directives&&t.data.directives.some(function(n){return"show"===n.name})&&(t.data.show=!0),e&&e.data&&e.key!==f){if(h=e.data.transition=r({},s),"out-in"===o)return this._leaving=!0,et(h,"afterLeave",function(){l._leaving=!1;l.$forceUpdate()},f),pe(n,i);"in-out"===o&&(c=function(){a()},et(s,"afterEnter",c,f),et(s,"enterCancelled",c,f),et(h,"delayLeave",function(n){a=n},f))}return i}}},ss=r({tag:String,moveClass:String},os);delete ss.mode;hs={props:ss,render:function(n){for(var t,i,e=this.tag||this.$vnode.data.tag||"span",o=Object.create(null),r=this.prevChildren=this.children,s=this.$slots.default||[],h=this.children=[],c=ye(this),u=0;u<s.length;u++)t=s[u],t.tag&&null!=t.key&&0!==String(t.key).indexOf("__vlist")&&(h.push(t),o[t.key]=t,(t.data||(t.data={})).transition=c);if(r){for(var l=[],a=[],f=0;f<r.length;f++)i=r[f],i.data.transition=c,i.data.pos=i.elm.getBoundingClientRect(),o[i.key]?l.push(i):a.push(i);this.kept=n(e,null,l);this.removed=a}return n(e,null,h)},beforeUpdate:function(){this.__patch__(this._vnode,this.kept,!1,!0);this._vnode=this.kept},updated:function(){var n=this.prevChildren,t=this.moveClass||this.name+"-move";n.length&&this.hasMove(n[0].elm,t)&&(n.forEach(nv),n.forEach(tv),n.forEach(iv),document.body.offsetHeight,n.forEach(function(n){if(n.data.moved){var i=n.elm,r=i.style;ct(i,t);r.transform=r.WebkitTransform=r.transitionDuration="";i.addEventListener(ur,i._moveCb=function n(r){r&&!/transform$/.test(r.propertyName)||(i.removeEventListener(ur,n),i._moveCb=null,g(i,t))})}}))},methods:{hasMove:function(n,t){if(!rs)return!1;if(null!=this._hasMove)return this._hasMove;ct(n,t);var i=ee(n);return g(n,t),this._hasMove=i.hasTransform}}};cs={Transition:ab,TransitionGroup:hs};t.config.isUnknownElement=dl;t.config.isReservedTag=cu;t.config.getTagNamespace=kf;t.config.mustUseProp=bo;r(t.options.directives,lb);r(t.options.components,cs);t.prototype.__patch__=i._isServer?f:sb;t.prototype.$mount=function(n,t){return n=n&&!i._isServer?wr(n):void 0,this._mount(n,t)};setTimeout(function(){i.devtools&&ii&&ii.emit("init",t)},0);var vb=!!it&&rv("\n","&#10;"),ls=document.createElement("div"),yb=[/"([^"]*)"+/.source,/'([^']*)'+/.source,/([^\s"'=<>`]+)/.source],pb=new RegExp("^\\s*"+/([^\s"'<>\/=]+)/.source+"(?:\\s*("+/(?:=)/.source+")\\s*(?:"+yb.join("|")+"))?"),as="[a-zA-Z_][\\w\\-\\.]*",vs="((?:"+as+"\\:)?"+as+")",wb=new RegExp("^<"+vs),bb=/^\s*(\/?)>/,kb=new RegExp("^<\\/"+vs+"[^>]*>"),db=/^<!DOCTYPE [^>]+>/i,ys=!1;"x".replace(/x(.)?/g,function(n,t){ys=""===t});var gb,ps,ws,vu,yu,pu,wu,bs,ks,ds,gs,bu,ku,nh,oi,th,nk,tk=o("script,style",!0),ih={},ik=/&lt;/g,rk=/&gt;/g,uk=/&#10;/g,fk=/&amp;/g,ek=/&quot;/g,ok=/\{\{((?:.|\n)+?)\}\}/g,rh=/[-.*+?^${}()|[\]\/\\]/g,sk=y(function(n){var t=n[0].replace(rh,"\\$&"),i=n[1].replace(rh,"\\$&");return new RegExp(t+"((?:.|\\n)+?)"+i,"g")}),uh=/^v-|^@|^:/,hk=/(.*?)\s+(?:in|of)\s+(.*)/,ck=/\(([^,]*),([^,]*)(?:,([^,]*))?\)/,fh=/^:|^v-bind:/,eh=/^@|^v-on:/,lk=/:(.*)$/,oh=/\.[^\.]+/g,ak=/\u2028|\u2029/g,vk=y(uv),yk=/^xmlns:NS\d+/,pk=/^NS\d+:/,wk=y(hy),sh=/^\s*[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['.*?'\]|\[".*?"\]|\[\d+\]|\[[A-Za-z_$][\w$]*\])*\s*$/,bk={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,"delete":[8,46]},hh={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:"if($event.target !== $event.currentTarget)return;"},kk={bind:vy,cloak:f},dk=(new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b")+"\\b"),{staticKeys:["staticClass"],transformNode:ip,genData:rp}),gk={transformNode:up,genData:fp},ch=[dk,gk],nd={model:ep,text:lp,html:ap},du=Object.create(null),lh={isIE:pi,expectHTML:!0,modules:ch,staticKeys:tf(ch),directives:nd,isReservedTag:cu,isUnaryTag:lw,mustUseProp:bo,getTagNamespace:kf,isPreTag:yw},td=y(function(n){var t=wr(n);return t&&t.innerHTML}),id=t.prototype.$mount;return t.prototype.$mount=function(n,t){var r,i;if(n=n&&wr(n),n===document.body||n===document.documentElement)return this;if(r=this.$options,!r.render){if(i=r.template,i)if("string"==typeof i)"#"===i.charAt(0)&&(i=td(i));else{if(!i.nodeType)return this;i=i.innerHTML}else n&&(i=yp(n));if(i){var u=uo(i,{warn:gi,shouldDecodeNewlines:vb,delimiters:r.delimiters},this),f=u.render,e=u.staticRenderFns;r.render=f;r.staticRenderFns=e}}return id.call(this,n,t)},t.compile=uo,t}),typeof jQuery=="undefined")throw new Error("Bootstrap's JavaScript requires jQuery");+function(n){"use strict";var t=n.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||t[0]==1&&t[1]==9&&t[2]<1||t[0]>2)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3");}(jQuery);+function(n){"use strict";function t(){var i=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(i.style[n]!==undefined)return{end:t[n]};return!1}n.fn.emulateTransitionEnd=function(t){var i=!1,u=this,r;n(this).one("bsTransitionEnd",function(){i=!0});return r=function(){i||n(u).trigger(n.support.transition.end)},setTimeout(r,t),this};n(function(){(n.support.transition=t(),n.support.transition)&&(n.event.special.bsTransitionEnd={bindType:n.support.transition.end,delegateType:n.support.transition.end,handle:function(t){if(n(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})})}(jQuery);+function(n){"use strict";function u(i){return this.each(function(){var r=n(this),u=r.data("bs.alert");u||r.data("bs.alert",u=new t(this));typeof i=="string"&&u[i].call(r)})}var i='[data-dismiss="alert"]',t=function(t){n(t).on("click",i,this.close)},r;t.VERSION="3.3.6";t.TRANSITION_DURATION=150;t.prototype.close=function(i){function e(){r.detach().trigger("closed.bs.alert").remove()}var f=n(this),u=f.attr("data-target"),r;(u||(u=f.attr("href"),u=u&&u.replace(/.*(?=#[^\s]*$)/,"")),r=n(u),i&&i.preventDefault(),r.length||(r=f.closest(".alert")),r.trigger(i=n.Event("close.bs.alert")),i.isDefaultPrevented())||(r.removeClass("in"),n.support.transition&&r.hasClass("fade")?r.one("bsTransitionEnd",e).emulateTransitionEnd(t.TRANSITION_DURATION):e())};r=n.fn.alert;n.fn.alert=u;n.fn.alert.Constructor=t;n.fn.alert.noConflict=function(){return n.fn.alert=r,this};n(document).on("click.bs.alert.data-api",i,t.prototype.close)}(jQuery);+function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.button"),f=typeof i=="object"&&i;r||u.data("bs.button",r=new t(this,f));i=="toggle"?r.toggle():i&&r.setState(i)})}var t=function(i,r){this.$element=n(i);this.options=n.extend({},t.DEFAULTS,r);this.isLoading=!1},r;t.VERSION="3.3.6";t.DEFAULTS={loadingText:"loading..."};t.prototype.setState=function(t){var r="disabled",i=this.$element,f=i.is("input")?"val":"html",u=i.data();t+="Text";u.resetText==null&&i.data("resetText",i[f]());setTimeout(n.proxy(function(){i[f](u[t]==null?this.options[t]:u[t]);t=="loadingText"?(this.isLoading=!0,i.addClass(r).attr(r,r)):this.isLoading&&(this.isLoading=!1,i.removeClass(r).removeAttr(r))},this),0)};t.prototype.toggle=function(){var t=!0,i=this.$element.closest('[data-toggle="buttons"]'),n;i.length?(n=this.$element.find("input"),n.prop("type")=="radio"?(n.prop("checked")&&(t=!1),i.find(".active").removeClass("active"),this.$element.addClass("active")):n.prop("type")=="checkbox"&&(n.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),t&&n.trigger("change")):(this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active"))};r=n.fn.button;n.fn.button=i;n.fn.button.Constructor=t;n.fn.button.noConflict=function(){return n.fn.button=r,this};n(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(t){var r=n(t.target);r.hasClass("btn")||(r=r.closest(".btn"));i.call(r,"toggle");n(t.target).is('input[type="radio"]')||n(t.target).is('input[type="checkbox"]')||t.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(t){n(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))})}(jQuery);+function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.carousel"),f=n.extend({},t.DEFAULTS,u.data(),typeof i=="object"&&i),e=typeof i=="string"?i:f.slide;r||u.data("bs.carousel",r=new t(this,f));typeof i=="number"?r.to(i):e?r[e]():f.interval&&r.pause().cycle()})}var t=function(t,i){this.$element=n(t);this.$indicators=this.$element.find(".carousel-indicators");this.options=i;this.paused=null;this.sliding=null;this.interval=null;this.$active=null;this.$items=null;this.options.keyboard&&this.$element.on("keydown.bs.carousel",n.proxy(this.keydown,this));this.options.pause!="hover"||"ontouchstart"in document.documentElement||this.$element.on("mouseenter.bs.carousel",n.proxy(this.pause,this)).on("mouseleave.bs.carousel",n.proxy(this.cycle,this))},u,r;t.VERSION="3.3.6";t.TRANSITION_DURATION=600;t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0};t.prototype.keydown=function(n){if(!/input|textarea/i.test(n.target.tagName)){switch(n.which){case 37:this.prev();break;case 39:this.next();break;default:return}n.preventDefault()}};t.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(n.proxy(this.next,this),this.options.interval)),this};t.prototype.getItemIndex=function(n){return this.$items=n.parent().children(".item"),this.$items.index(n||this.$active)};t.prototype.getItemForDirection=function(n,t){var i=this.getItemIndex(t),f=n=="prev"&&i===0||n=="next"&&i==this.$items.length-1,r,u;return f&&!this.options.wrap?t:(r=n=="prev"?-1:1,u=(i+r)%this.$items.length,this.$items.eq(u))};t.prototype.to=function(n){var i=this,t=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(n>this.$items.length-1)&&!(n<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){i.to(n)}):t==n?this.pause().cycle():this.slide(n>t?"next":"prev",this.$items.eq(n))};t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&n.support.transition&&(this.$element.trigger(n.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this};t.prototype.next=function(){if(!this.sliding)return this.slide("next")};t.prototype.prev=function(){if(!this.sliding)return this.slide("prev")};t.prototype.slide=function(i,r){var e=this.$element.find(".item.active"),u=r||this.getItemForDirection(i,e),l=this.interval,f=i=="next"?"left":"right",a=this,o,s,h,c;return u.hasClass("active")?this.sliding=!1:(o=u[0],s=n.Event("slide.bs.carousel",{relatedTarget:o,direction:f}),this.$element.trigger(s),s.isDefaultPrevented())?void 0:(this.sliding=!0,l&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),h=n(this.$indicators.children()[this.getItemIndex(u)]),h&&h.addClass("active")),c=n.Event("slid.bs.carousel",{relatedTarget:o,direction:f}),n.support.transition&&this.$element.hasClass("slide")?(u.addClass(i),u[0].offsetWidth,e.addClass(f),u.addClass(f),e.one("bsTransitionEnd",function(){u.removeClass([i,f].join(" ")).addClass("active");e.removeClass(["active",f].join(" "));a.sliding=!1;setTimeout(function(){a.$element.trigger(c)},0)}).emulateTransitionEnd(t.TRANSITION_DURATION)):(e.removeClass("active"),u.addClass("active"),this.sliding=!1,this.$element.trigger(c)),l&&this.cycle(),this)};u=n.fn.carousel;n.fn.carousel=i;n.fn.carousel.Constructor=t;n.fn.carousel.noConflict=function(){return n.fn.carousel=u,this};r=function(t){var o,r=n(this),u=n(r.attr("data-target")||(o=r.attr("href"))&&o.replace(/.*(?=#[^\s]+$)/,"")),e,f;u.hasClass("carousel")&&(e=n.extend({},u.data(),r.data()),f=r.attr("data-slide-to"),f&&(e.interval=!1),i.call(u,e),f&&u.data("bs.carousel").to(f),t.preventDefault())};n(document).on("click.bs.carousel.data-api","[data-slide]",r).on("click.bs.carousel.data-api","[data-slide-to]",r);n(window).on("load",function(){n('[data-ride="carousel"]').each(function(){var t=n(this);i.call(t,t.data())})})}(jQuery);+function(n){"use strict";function r(t){var i,r=t.attr("data-target")||(i=t.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return n(r)}function i(i){return this.each(function(){var u=n(this),r=u.data("bs.collapse"),f=n.extend({},t.DEFAULTS,u.data(),typeof i=="object"&&i);!r&&f.toggle&&/show|hide/.test(i)&&(f.toggle=!1);r||u.data("bs.collapse",r=new t(this,f));typeof i=="string"&&r[i]()})}var t=function(i,r){this.$element=n(i);this.options=n.extend({},t.DEFAULTS,r);this.$trigger=n('[data-toggle="collapse"][href="#'+i.id+'"],[data-toggle="collapse"][data-target="#'+i.id+'"]');this.transitioning=null;this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger);this.options.toggle&&this.toggle()},u;t.VERSION="3.3.6";t.TRANSITION_DURATION=350;t.DEFAULTS={toggle:!0};t.prototype.dimension=function(){var n=this.$element.hasClass("width");return n?"width":"height"};t.prototype.show=function(){var f,r,e,u,o,s;if(!this.transitioning&&!this.$element.hasClass("in")&&(r=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing"),!r||!r.length||(f=r.data("bs.collapse"),!f||!f.transitioning))&&(e=n.Event("show.bs.collapse"),this.$element.trigger(e),!e.isDefaultPrevented())){if(r&&r.length&&(i.call(r,"hide"),f||r.data("bs.collapse",null)),u=this.dimension(),this.$element.removeClass("collapse").addClass("collapsing")[u](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1,o=function(){this.$element.removeClass("collapsing").addClass("collapse in")[u]("");this.transitioning=0;this.$element.trigger("shown.bs.collapse")},!n.support.transition)return o.call(this);s=n.camelCase(["scroll",u].join("-"));this.$element.one("bsTransitionEnd",n.proxy(o,this)).emulateTransitionEnd(t.TRANSITION_DURATION)[u](this.$element[0][s])}};t.prototype.hide=function(){var r,i,u;if(!this.transitioning&&this.$element.hasClass("in")&&(r=n.Event("hide.bs.collapse"),this.$element.trigger(r),!r.isDefaultPrevented())){if(i=this.dimension(),this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1,u=function(){this.transitioning=0;this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")},!n.support.transition)return u.call(this);this.$element[i](0).one("bsTransitionEnd",n.proxy(u,this)).emulateTransitionEnd(t.TRANSITION_DURATION)}};t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};t.prototype.getParent=function(){return n(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(n.proxy(function(t,i){var u=n(i);this.addAriaAndCollapsedClass(r(u),u)},this)).end()};t.prototype.addAriaAndCollapsedClass=function(n,t){var i=n.hasClass("in");n.attr("aria-expanded",i);t.toggleClass("collapsed",!i).attr("aria-expanded",i)};u=n.fn.collapse;n.fn.collapse=i;n.fn.collapse.Constructor=t;n.fn.collapse.noConflict=function(){return n.fn.collapse=u,this};n(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(t){var u=n(this);u.attr("data-target")||t.preventDefault();var f=r(u),e=f.data("bs.collapse"),o=e?"toggle":u.data();i.call(f,o)})}(jQuery);+function(n){"use strict";function r(t){var i=t.attr("data-target"),r;return i||(i=t.attr("href"),i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,"")),r=i&&n(i),r&&r.length?r:t.parent()}function u(t){t&&t.which===3||(n(e).remove(),n(i).each(function(){var u=n(this),i=r(u),f={relatedTarget:this};i.hasClass("open")&&(t&&t.type=="click"&&/input|textarea/i.test(t.target.tagName)&&n.contains(i[0],t.target)||(i.trigger(t=n.Event("hide.bs.dropdown",f)),t.isDefaultPrevented())||(u.attr("aria-expanded","false"),i.removeClass("open").trigger(n.Event("hidden.bs.dropdown",f))))}))}function o(i){return this.each(function(){var r=n(this),u=r.data("bs.dropdown");u||r.data("bs.dropdown",u=new t(this));typeof i=="string"&&u[i].call(r)})}var e=".dropdown-backdrop",i='[data-toggle="dropdown"]',t=function(t){n(t).on("click.bs.dropdown",this.toggle)},f;t.VERSION="3.3.6";t.prototype.toggle=function(t){var f=n(this),i,o,e;if(!f.is(".disabled, :disabled")){if(i=r(f),o=i.hasClass("open"),u(),!o){if("ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length)n(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(n(this)).on("click",u);if(e={relatedTarget:this},i.trigger(t=n.Event("show.bs.dropdown",e)),t.isDefaultPrevented())return;f.trigger("focus").attr("aria-expanded","true");i.toggleClass("open").trigger(n.Event("shown.bs.dropdown",e))}return!1}};t.prototype.keydown=function(t){var e,o,s,h,f,u;if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)&&(e=n(this),t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled"))){if(o=r(e),s=o.hasClass("open"),!s&&t.which!=27||s&&t.which==27)return t.which==27&&o.find(i).trigger("focus"),e.trigger("click");(h=" li:not(.disabled):visible a",f=o.find(".dropdown-menu"+h),f.length)&&(u=f.index(t.target),t.which==38&&u>0&&u--,t.which==40&&u<f.length-1&&u++,~u||(u=0),f.eq(u).trigger("focus"))}};f=n.fn.dropdown;n.fn.dropdown=o;n.fn.dropdown.Constructor=t;n.fn.dropdown.noConflict=function(){return n.fn.dropdown=f,this};n(document).on("click.bs.dropdown.data-api",u).on("click.bs.dropdown.data-api",".dropdown form",function(n){n.stopPropagation()}).on("click.bs.dropdown.data-api",i,t.prototype.toggle).on("keydown.bs.dropdown.data-api",i,t.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",t.prototype.keydown)}(jQuery);+function(n){"use strict";function i(i,r){return this.each(function(){var f=n(this),u=f.data("bs.modal"),e=n.extend({},t.DEFAULTS,f.data(),typeof i=="object"&&i);u||f.data("bs.modal",u=new t(this,e));typeof i=="string"?u[i](r):e.show&&u.show(r)})}var t=function(t,i){this.options=i;this.$body=n(document.body);this.$element=n(t);this.$dialog=this.$element.find(".modal-dialog");this.$backdrop=null;this.isShown=null;this.originalBodyPad=null;this.scrollbarWidth=0;this.ignoreBackdropClick=!1;this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,n.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))},r;t.VERSION="3.3.6";t.TRANSITION_DURATION=300;t.BACKDROP_TRANSITION_DURATION=150;t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0};t.prototype.toggle=function(n){return this.isShown?this.hide():this.show(n)};t.prototype.show=function(i){var r=this,u=n.Event("show.bs.modal",{relatedTarget:i});if(this.$element.trigger(u),!this.isShown&&!u.isDefaultPrevented()){this.isShown=!0;this.checkScrollbar();this.setScrollbar();this.$body.addClass("modal-open");this.escape();this.resize();this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',n.proxy(this.hide,this));this.$dialog.on("mousedown.dismiss.bs.modal",function(){r.$element.one("mouseup.dismiss.bs.modal",function(t){n(t.target).is(r.$element)&&(r.ignoreBackdropClick=!0)})});this.backdrop(function(){var f=n.support.transition&&r.$element.hasClass("fade"),u;r.$element.parent().length||r.$element.appendTo(r.$body);r.$element.show().scrollTop(0);r.adjustDialog();f&&r.$element[0].offsetWidth;r.$element.addClass("in");r.enforceFocus();u=n.Event("shown.bs.modal",{relatedTarget:i});f?r.$dialog.one("bsTransitionEnd",function(){r.$element.trigger("focus").trigger(u)}).emulateTransitionEnd(t.TRANSITION_DURATION):r.$element.trigger("focus").trigger(u)})}};t.prototype.hide=function(i){(i&&i.preventDefault(),i=n.Event("hide.bs.modal"),this.$element.trigger(i),this.isShown&&!i.isDefaultPrevented())&&(this.isShown=!1,this.escape(),this.resize(),n(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),n.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",n.proxy(this.hideModal,this)).emulateTransitionEnd(t.TRANSITION_DURATION):this.hideModal())};t.prototype.enforceFocus=function(){n(document).off("focusin.bs.modal").on("focusin.bs.modal",n.proxy(function(n){this.$element[0]===n.target||this.$element.has(n.target).length||this.$element.trigger("focus")},this))};t.prototype.escape=function(){if(this.isShown&&this.options.keyboard)this.$element.on("keydown.dismiss.bs.modal",n.proxy(function(n){n.which==27&&this.hide()},this));else this.isShown||this.$element.off("keydown.dismiss.bs.modal")};t.prototype.resize=function(){if(this.isShown)n(window).on("resize.bs.modal",n.proxy(this.handleUpdate,this));else n(window).off("resize.bs.modal")};t.prototype.hideModal=function(){var n=this;this.$element.hide();this.backdrop(function(){n.$body.removeClass("modal-open");n.resetAdjustments();n.resetScrollbar();n.$element.trigger("hidden.bs.modal")})};t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove();this.$backdrop=null};t.prototype.backdrop=function(i){var e=this,f=this.$element.hasClass("fade")?"fade":"",r,u;if(this.isShown&&this.options.backdrop){r=n.support.transition&&f;this.$backdrop=n(document.createElement("div")).addClass("modal-backdrop "+f).appendTo(this.$body);this.$element.on("click.dismiss.bs.modal",n.proxy(function(n){if(this.ignoreBackdropClick){this.ignoreBackdropClick=!1;return}n.target===n.currentTarget&&(this.options.backdrop=="static"?this.$element[0].focus():this.hide())},this));if(r&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!i)return;r?this.$backdrop.one("bsTransitionEnd",i).emulateTransitionEnd(t.BACKDROP_TRANSITION_DURATION):i()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),u=function(){e.removeBackdrop();i&&i()},n.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",u).emulateTransitionEnd(t.BACKDROP_TRANSITION_DURATION):u()):i&&i()};t.prototype.handleUpdate=function(){this.adjustDialog()};t.prototype.adjustDialog=function(){var n=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&n?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!n?this.scrollbarWidth:""})};t.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})};t.prototype.checkScrollbar=function(){var n=window.innerWidth,t;n||(t=document.documentElement.getBoundingClientRect(),n=t.right-Math.abs(t.left));this.bodyIsOverflowing=document.body.clientWidth<n;this.scrollbarWidth=this.measureScrollbar()};t.prototype.setScrollbar=function(){var n=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"";this.bodyIsOverflowing&&this.$body.css("padding-right",n+this.scrollbarWidth)};t.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)};t.prototype.measureScrollbar=function(){var n=document.createElement("div"),t;return n.className="modal-scrollbar-measure",this.$body.append(n),t=n.offsetWidth-n.clientWidth,this.$body[0].removeChild(n),t};r=n.fn.modal;n.fn.modal=i;n.fn.modal.Constructor=t;n.fn.modal.noConflict=function(){return n.fn.modal=r,this};n(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var r=n(this),f=r.attr("href"),u=n(r.attr("data-target")||f&&f.replace(/.*(?=#[^\s]+$)/,"")),e=u.data("bs.modal")?"toggle":n.extend({remote:!/#/.test(f)&&f},u.data(),r.data());r.is("a")&&t.preventDefault();u.one("show.bs.modal",function(n){if(!n.isDefaultPrevented())u.one("hidden.bs.modal",function(){r.is(":visible")&&r.trigger("focus")})});i.call(u,e,this)})}(jQuery);+function(n){"use strict";function r(i){return this.each(function(){var u=n(this),r=u.data("bs.tooltip"),f=typeof i=="object"&&i;(r||!/destroy|hide/.test(i))&&(r||u.data("bs.tooltip",r=new t(this,f)),typeof i=="string"&&r[i]())})}var t=function(n,t){this.type=null;this.options=null;this.enabled=null;this.timeout=null;this.hoverState=null;this.$element=null;this.inState=null;this.init("tooltip",n,t)},i;t.VERSION="3.3.6";t.TRANSITION_DURATION=150;t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"><\/div><div class="tooltip-inner"><\/div><\/div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}};t.prototype.init=function(t,i,r){var f,e,u,o,s;if(this.enabled=!0,this.type=t,this.$element=n(i),this.options=this.getOptions(r),this.$viewport=this.options.viewport&&n(n.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(f=this.options.trigger.split(" "),e=f.length;e--;)if(u=f[e],u=="click")this.$element.on("click."+this.type,this.options.selector,n.proxy(this.toggle,this));else if(u!="manual"){o=u=="hover"?"mouseenter":"focusin";s=u=="hover"?"mouseleave":"focusout";this.$element.on(o+"."+this.type,this.options.selector,n.proxy(this.enter,this));this.$element.on(s+"."+this.type,this.options.selector,n.proxy(this.leave,this))}this.options.selector?this._options=n.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()};t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.getOptions=function(t){return t=n.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t};t.prototype.getDelegateOptions=function(){var t={},i=this.getDefaults();return this._options&&n.each(this._options,function(n,r){i[n]!=r&&(t[n]=r)}),t};t.prototype.enter=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget).data("bs."+this.type);if(i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)),t instanceof n.Event&&(i.inState[t.type=="focusin"?"focus":"hover"]=!0),i.tip().hasClass("in")||i.hoverState=="in"){i.hoverState="in";return}if(clearTimeout(i.timeout),i.hoverState="in",!i.options.delay||!i.options.delay.show)return i.show();i.timeout=setTimeout(function(){i.hoverState=="in"&&i.show()},i.options.delay.show)};t.prototype.isInStateTrue=function(){for(var n in this.inState)if(this.inState[n])return!0;return!1};t.prototype.leave=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget).data("bs."+this.type);if(i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)),t instanceof n.Event&&(i.inState[t.type=="focusout"?"focus":"hover"]=!1),!i.isInStateTrue()){if(clearTimeout(i.timeout),i.hoverState="out",!i.options.delay||!i.options.delay.hide)return i.hide();i.timeout=setTimeout(function(){i.hoverState=="out"&&i.hide()},i.options.delay.hide)}};t.prototype.show=function(){var c=n.Event("show.bs."+this.type),l,p,e,w,h;if(this.hasContent()&&this.enabled){if(this.$element.trigger(c),l=n.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]),c.isDefaultPrevented()||!l)return;var u=this,r=this.tip(),a=this.getUID(this.type);this.setContent();r.attr("id",a);this.$element.attr("aria-describedby",a);this.options.animation&&r.addClass("fade");var i=typeof this.options.placement=="function"?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,v=/\s?auto?\s?/i,y=v.test(i);y&&(i=i.replace(v,"")||"top");r.detach().css({top:0,left:0,display:"block"}).addClass(i).data("bs."+this.type,this);this.options.container?r.appendTo(this.options.container):r.insertAfter(this.$element);this.$element.trigger("inserted.bs."+this.type);var f=this.getPosition(),o=r[0].offsetWidth,s=r[0].offsetHeight;y&&(p=i,e=this.getPosition(this.$viewport),i=i=="bottom"&&f.bottom+s>e.bottom?"top":i=="top"&&f.top-s<e.top?"bottom":i=="right"&&f.right+o>e.width?"left":i=="left"&&f.left-o<e.left?"right":i,r.removeClass(p).addClass(i));w=this.getCalculatedOffset(i,f,o,s);this.applyPlacement(w,i);h=function(){var n=u.hoverState;u.$element.trigger("shown.bs."+u.type);u.hoverState=null;n=="out"&&u.leave(u)};n.support.transition&&this.$tip.hasClass("fade")?r.one("bsTransitionEnd",h).emulateTransitionEnd(t.TRANSITION_DURATION):h()}};t.prototype.applyPlacement=function(t,i){var r=this.tip(),l=r[0].offsetWidth,e=r[0].offsetHeight,o=parseInt(r.css("margin-top"),10),s=parseInt(r.css("margin-left"),10),h,f,u;isNaN(o)&&(o=0);isNaN(s)&&(s=0);t.top+=o;t.left+=s;n.offset.setOffset(r[0],n.extend({using:function(n){r.css({top:Math.round(n.top),left:Math.round(n.left)})}},t),0);r.addClass("in");h=r[0].offsetWidth;f=r[0].offsetHeight;i=="top"&&f!=e&&(t.top=t.top+e-f);u=this.getViewportAdjustedDelta(i,t,h,f);u.left?t.left+=u.left:t.top+=u.top;var c=/top|bottom/.test(i),a=c?u.left*2-l+h:u.top*2-e+f,v=c?"offsetWidth":"offsetHeight";r.offset(t);this.replaceArrow(a,r[0][v],c)};t.prototype.replaceArrow=function(n,t,i){this.arrow().css(i?"left":"top",50*(1-n/t)+"%").css(i?"top":"left","")};t.prototype.setContent=function(){var n=this.tip(),t=this.getTitle();n.find(".tooltip-inner")[this.options.html?"html":"text"](t);n.removeClass("fade in top bottom left right")};t.prototype.hide=function(i){function e(){u.hoverState!="in"&&r.detach();u.$element.removeAttr("aria-describedby").trigger("hidden.bs."+u.type);i&&i()}var u=this,r=n(this.$tip),f=n.Event("hide.bs."+this.type);if(this.$element.trigger(f),!f.isDefaultPrevented())return r.removeClass("in"),n.support.transition&&r.hasClass("fade")?r.one("bsTransitionEnd",e).emulateTransitionEnd(t.TRANSITION_DURATION):e(),this.hoverState=null,this};t.prototype.fixTitle=function(){var n=this.$element;(n.attr("title")||typeof n.attr("data-original-title")!="string")&&n.attr("data-original-title",n.attr("title")||"").attr("title","")};t.prototype.hasContent=function(){return this.getTitle()};t.prototype.getPosition=function(t){t=t||this.$element;var u=t[0],r=u.tagName=="BODY",i=u.getBoundingClientRect();i.width==null&&(i=n.extend({},i,{width:i.right-i.left,height:i.bottom-i.top}));var f=r?{top:0,left:0}:t.offset(),e={scroll:r?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},o=r?{width:n(window).width(),height:n(window).height()}:null;return n.extend({},i,e,o,f)};t.prototype.getCalculatedOffset=function(n,t,i,r){return n=="bottom"?{top:t.top+t.height,left:t.left+t.width/2-i/2}:n=="top"?{top:t.top-r,left:t.left+t.width/2-i/2}:n=="left"?{top:t.top+t.height/2-r/2,left:t.left-i}:{top:t.top+t.height/2-r/2,left:t.left+t.width}};t.prototype.getViewportAdjustedDelta=function(n,t,i,r){var f={top:0,left:0},e,u,o,s,h,c;return this.$viewport?(e=this.options.viewport&&this.options.viewport.padding||0,u=this.getPosition(this.$viewport),/right|left/.test(n)?(o=t.top-e-u.scroll,s=t.top+e-u.scroll+r,o<u.top?f.top=u.top-o:s>u.top+u.height&&(f.top=u.top+u.height-s)):(h=t.left-e,c=t.left+e+i,h<u.left?f.left=u.left-h:c>u.right&&(f.left=u.left+u.width-c)),f):f};t.prototype.getTitle=function(){var t=this.$element,n=this.options;return t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title)};t.prototype.getUID=function(n){do n+=~~(Math.random()*1e6);while(document.getElementById(n));return n};t.prototype.tip=function(){if(!this.$tip&&(this.$tip=n(this.options.template),this.$tip.length!=1))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")};t.prototype.enable=function(){this.enabled=!0};t.prototype.disable=function(){this.enabled=!1};t.prototype.toggleEnabled=function(){this.enabled=!this.enabled};t.prototype.toggle=function(t){var i=this;t&&(i=n(t.currentTarget).data("bs."+this.type),i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)));t?(i.inState.click=!i.inState.click,i.isInStateTrue()?i.enter(i):i.leave(i)):i.tip().hasClass("in")?i.leave(i):i.enter(i)};t.prototype.destroy=function(){var n=this;clearTimeout(this.timeout);this.hide(function(){n.$element.off("."+n.type).removeData("bs."+n.type);n.$tip&&n.$tip.detach();n.$tip=null;n.$arrow=null;n.$viewport=null})};i=n.fn.tooltip;n.fn.tooltip=r;n.fn.tooltip.Constructor=t;n.fn.tooltip.noConflict=function(){return n.fn.tooltip=i,this}}(jQuery);+function(n){"use strict";function r(i){return this.each(function(){var u=n(this),r=u.data("bs.popover"),f=typeof i=="object"&&i;(r||!/destroy|hide/.test(i))&&(r||u.data("bs.popover",r=new t(this,f)),typeof i=="string"&&r[i]())})}var t=function(n,t){this.init("popover",n,t)},i;if(!n.fn.tooltip)throw new Error("Popover requires tooltip.js");t.VERSION="3.3.6";t.DEFAULTS=n.extend({},n.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"><\/div><h3 class="popover-title"><\/h3><div class="popover-content"><\/div><\/div>'});t.prototype=n.extend({},n.fn.tooltip.Constructor.prototype);t.prototype.constructor=t;t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.setContent=function(){var n=this.tip(),i=this.getTitle(),t=this.getContent();n.find(".popover-title")[this.options.html?"html":"text"](i);n.find(".popover-content").children().detach().end()[this.options.html?typeof t=="string"?"html":"append":"text"](t);n.removeClass("fade top bottom left right in");n.find(".popover-title").html()||n.find(".popover-title").hide()};t.prototype.hasContent=function(){return this.getTitle()||this.getContent()};t.prototype.getContent=function(){var t=this.$element,n=this.options;return t.attr("data-content")||(typeof n.content=="function"?n.content.call(t[0]):n.content)};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};i=n.fn.popover;n.fn.popover=r;n.fn.popover.Constructor=t;n.fn.popover.noConflict=function(){return n.fn.popover=i,this}}(jQuery);+function(n){"use strict";function t(i,r){this.$body=n(document.body);this.$scrollElement=n(i).is(document.body)?n(window):n(i);this.options=n.extend({},t.DEFAULTS,r);this.selector=(this.options.target||"")+" .nav li > a";this.offsets=[];this.targets=[];this.activeTarget=null;this.scrollHeight=0;this.$scrollElement.on("scroll.bs.scrollspy",n.proxy(this.process,this));this.refresh();this.process()}function i(i){return this.each(function(){var u=n(this),r=u.data("bs.scrollspy"),f=typeof i=="object"&&i;r||u.data("bs.scrollspy",r=new t(this,f));typeof i=="string"&&r[i]()})}t.VERSION="3.3.6";t.DEFAULTS={offset:10};t.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)};t.prototype.refresh=function(){var t=this,i="offset",r=0;this.offsets=[];this.targets=[];this.scrollHeight=this.getScrollHeight();n.isWindow(this.$scrollElement[0])||(i="position",r=this.$scrollElement.scrollTop());this.$body.find(this.selector).map(function(){var f=n(this),u=f.data("target")||f.attr("href"),t=/^#./.test(u)&&n(u);return t&&t.length&&t.is(":visible")&&[[t[i]().top+r,u]]||null}).sort(function(n,t){return n[0]-t[0]}).each(function(){t.offsets.push(this[0]);t.targets.push(this[1])})};t.prototype.process=function(){var i=this.$scrollElement.scrollTop()+this.options.offset,f=this.getScrollHeight(),e=this.options.offset+f-this.$scrollElement.height(),t=this.offsets,r=this.targets,u=this.activeTarget,n;if(this.scrollHeight!=f&&this.refresh(),i>=e)return u!=(n=r[r.length-1])&&this.activate(n);if(u&&i<t[0])return this.activeTarget=null,this.clear();for(n=t.length;n--;)u!=r[n]&&i>=t[n]&&(t[n+1]===undefined||i<t[n+1])&&this.activate(r[n])};t.prototype.activate=function(t){this.activeTarget=t;this.clear();var r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=n(r).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active"));i.trigger("activate.bs.scrollspy")};t.prototype.clear=function(){n(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var r=n.fn.scrollspy;n.fn.scrollspy=i;n.fn.scrollspy.Constructor=t;n.fn.scrollspy.noConflict=function(){return n.fn.scrollspy=r,this};n(window).on("load.bs.scrollspy.data-api",function(){n('[data-spy="scroll"]').each(function(){var t=n(this);i.call(t,t.data())})})}(jQuery);+function(n){"use strict";function r(i){return this.each(function(){var u=n(this),r=u.data("bs.tab");r||u.data("bs.tab",r=new t(this));typeof i=="string"&&r[i]()})}var t=function(t){this.element=n(t)},u,i;t.VERSION="3.3.6";t.TRANSITION_DURATION=150;t.prototype.show=function(){var t=this.element,f=t.closest("ul:not(.dropdown-menu)"),i=t.data("target"),u;if(i||(i=t.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var r=f.find(".active:last a"),e=n.Event("hide.bs.tab",{relatedTarget:t[0]}),o=n.Event("show.bs.tab",{relatedTarget:r[0]});(r.trigger(e),t.trigger(o),o.isDefaultPrevented()||e.isDefaultPrevented())||(u=n(i),this.activate(t.closest("li"),f),this.activate(u,u.parent(),function(){r.trigger({type:"hidden.bs.tab",relatedTarget:t[0]});t.trigger({type:"shown.bs.tab",relatedTarget:r[0]})}))}};t.prototype.activate=function(i,r,u){function o(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1);i.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0);e?(i[0].offsetWidth,i.addClass("in")):i.removeClass("fade");i.parent(".dropdown-menu").length&&i.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0);u&&u()}var f=r.find("> .active"),e=u&&n.support.transition&&(f.length&&f.hasClass("fade")||!!r.find("> .fade").length);f.length&&e?f.one("bsTransitionEnd",o).emulateTransitionEnd(t.TRANSITION_DURATION):o();f.removeClass("in")};u=n.fn.tab;n.fn.tab=r;n.fn.tab.Constructor=t;n.fn.tab.noConflict=function(){return n.fn.tab=u,this};i=function(t){t.preventDefault();r.call(n(this),"show")};n(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery);+function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.affix"),f=typeof i=="object"&&i;r||u.data("bs.affix",r=new t(this,f));typeof i=="string"&&r[i]()})}var t=function(i,r){this.options=n.extend({},t.DEFAULTS,r);this.$target=n(this.options.target).on("scroll.bs.affix.data-api",n.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",n.proxy(this.checkPositionWithEventLoop,this));this.$element=n(i);this.affixed=null;this.unpin=null;this.pinnedOffset=null;this.checkPosition()},r;t.VERSION="3.3.6";t.RESET="affix affix-top affix-bottom";t.DEFAULTS={offset:0,target:window};t.prototype.getState=function(n,t,i,r){var u=this.$target.scrollTop(),f=this.$element.offset(),e=this.$target.height();if(i!=null&&this.affixed=="top")return u<i?"top":!1;if(this.affixed=="bottom")return i!=null?u+this.unpin<=f.top?!1:"bottom":u+e<=n-r?!1:"bottom";var o=this.affixed==null,s=o?u:f.top,h=o?e:t;return i!=null&&u<=i?"top":r!=null&&s+h>=n-r?"bottom":!1};t.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(t.RESET).addClass("affix");var n=this.$target.scrollTop(),i=this.$element.offset();return this.pinnedOffset=i.top-n};t.prototype.checkPositionWithEventLoop=function(){setTimeout(n.proxy(this.checkPosition,this),1)};t.prototype.checkPosition=function(){var i,e,o;if(this.$element.is(":visible")){var s=this.$element.height(),r=this.options.offset,f=r.top,u=r.bottom,h=Math.max(n(document).height(),n(document.body).height());if(typeof r!="object"&&(u=f=r),typeof f=="function"&&(f=r.top(this.$element)),typeof u=="function"&&(u=r.bottom(this.$element)),i=this.getState(h,s,f,u),this.affixed!=i){if(this.unpin!=null&&this.$element.css("top",""),e="affix"+(i?"-"+i:""),o=n.Event(e+".bs.affix"),this.$element.trigger(o),o.isDefaultPrevented())return;this.affixed=i;this.unpin=i=="bottom"?this.getPinnedOffset():null;this.$element.removeClass(t.RESET).addClass(e).trigger(e.replace("affix","affixed")+".bs.affix")}i=="bottom"&&this.$element.offset({top:h-s-u})}};r=n.fn.affix;n.fn.affix=i;n.fn.affix.Constructor=t;n.fn.affix.noConflict=function(){return n.fn.affix=r,this};n(window).on("load",function(){n('[data-spy="affix"]').each(function(){var r=n(this),t=r.data();t.offset=t.offset||{};t.offsetBottom!=null&&(t.offset.bottom=t.offsetBottom);t.offsetTop!=null&&(t.offset.top=t.offsetTop);i.call(r,t)})})}(jQuery),function(n){"use strict";typeof define=="function"&&define.amd?define(["jquery"],n):typeof exports=="object"&&typeof require=="function"?n(require("jquery")):n(jQuery)}(function(n){"use strict";function i(t,r){var f=n.noop,u=this,e={ajaxSettings:{},autoSelectFirst:!1,appendTo:document.body,serviceUrl:null,lookup:null,onSelect:null,width:"auto",minChars:1,maxHeight:300,deferRequestBy:0,params:{},formatResult:i.formatResult,formatGroup:i.formatGroup,delimiter:null,zIndex:9999,type:"GET",noCache:!1,onSearchStart:f,onSearchComplete:f,onSearchError:f,preserveInput:!1,containerClass:"autocomplete-suggestions",tabDisabled:!1,dataType:"text",currentRequest:null,triggerSelectOnValidInput:!0,preventBadQueries:!0,lookupFilter:function(n,t,i){return n.value.toLowerCase().indexOf(i)!==-1},paramName:"query",transformResult:function(t){return typeof t=="string"?n.parseJSON(t):t},showNoSuggestionNotice:!1,noSuggestionNotice:"No results",orientation:"bottom",forceFixPosition:!1};u.element=t;u.el=n(t);u.suggestions=[];u.badQueries=[];u.selectedIndex=-1;u.currentValue=u.element.value;u.intervalId=0;u.cachedResponse={};u.onChangeInterval=null;u.onChange=null;u.isLocal=!1;u.suggestionsContainer=null;u.noSuggestionsContainer=null;u.options=n.extend({},e,r);u.classes={selected:"autocomplete-selected",suggestion:"autocomplete-suggestion"};u.hint=null;u.hintValue="";u.selection=null;u.initialize();u.setOptions(r)}var r=function(){return{escapeRegExChars:function(n){return n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")},createNode:function(n){var t=document.createElement("div");return t.className=n,t.style.position="absolute",t.style.display="none",t}}}(),t={ESC:27,TAB:9,RETURN:13,LEFT:37,UP:38,RIGHT:39,DOWN:40};i.utils=r;n.Autocomplete=i;i.formatResult=function(n,t){if(!t)return n.value;var i="("+r.escapeRegExChars(t)+")";return n.value.replace(new RegExp(i,"gi"),"<strong>$1<\/strong>").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/&lt;(\/?strong)&gt;/g,"<$1>")};i.formatGroup=function(n,t){return'<div class="autocomplete-group"><strong>'+t+"<\/strong><\/div>"};i.prototype={killerFn:null,initialize:function(){var t=this,f="."+t.classes.suggestion,e=t.classes.selected,u=t.options,r;t.element.setAttribute("autocomplete","off");t.killerFn=function(i){n(i.target).closest("."+t.options.containerClass).length||(t.killSuggestions(),t.disableKillerFn())};t.noSuggestionsContainer=n('<div class="autocomplete-no-suggestion"><\/div>').html(this.options.noSuggestionNotice).get(0);t.suggestionsContainer=i.utils.createNode(u.containerClass);r=n(t.suggestionsContainer);r.appendTo(u.appendTo);u.width!=="auto"&&r.css("width",u.width);r.on("mouseover.autocomplete",f,function(){t.activate(n(this).data("index"))});r.on("mouseout.autocomplete",function(){t.selectedIndex=-1;r.children("."+e).removeClass(e)});r.on("click.autocomplete",f,function(){return t.select(n(this).data("index")),!1});t.fixPositionCapture=function(){t.visible&&t.fixPosition()};n(window).on("resize.autocomplete",t.fixPositionCapture);t.el.on("keydown.autocomplete",function(n){t.onKeyPress(n)});t.el.on("keyup.autocomplete",function(n){t.onKeyUp(n)});t.el.on("blur.autocomplete",function(){t.onBlur()});t.el.on("focus.autocomplete",function(){t.onFocus()});t.el.on("change.autocomplete",function(n){t.onKeyUp(n)});t.el.on("input.autocomplete",function(n){t.onKeyUp(n)})},onFocus:function(){var n=this;n.fixPosition();n.el.val().length>=n.options.minChars&&n.onValueChange()},onBlur:function(){this.enableKillerFn()},abortAjax:function(){var n=this;n.currentRequest&&(n.currentRequest.abort(),n.currentRequest=null)},setOptions:function(t){var r=this,i=r.options;n.extend(i,t);r.isLocal=n.isArray(i.lookup);r.isLocal&&(i.lookup=r.verifySuggestionsFormat(i.lookup));i.orientation=r.validateOrientation(i.orientation,"bottom");n(r.suggestionsContainer).css({"max-height":i.maxHeight+"px",width:i.width+"px","z-index":i.zIndex})},clearCache:function(){this.cachedResponse={};this.badQueries=[]},clear:function(){this.clearCache();this.currentValue="";this.suggestions=[]},disable:function(){var n=this;n.disabled=!0;clearInterval(n.onChangeInterval);n.abortAjax()},enable:function(){this.disabled=!1},fixPosition:function(){var t=this,i=n(t.suggestionsContainer),s=i.parent().get(0),a,o;if(s===document.body||t.options.forceFixPosition){var f=t.options.orientation,e=i.outerHeight(),h=t.el.outerHeight(),u=t.el.offset(),r={top:u.top,left:u.left};if(f==="auto"){var v=n(window).height(),c=n(window).scrollTop(),l=-c+u.top-e,y=c+v-(u.top+h+e);f=Math.max(l,y)===l?"top":"bottom"}r.top+=f==="top"?-e:h;s!==document.body&&(a=i.css("opacity"),t.visible||i.css("opacity",0).show(),o=i.offsetParent().offset(),r.top-=o.top,r.left-=o.left,t.visible||i.css("opacity",a).hide());t.options.width==="auto"&&(r.width=t.el.outerWidth()+"px");i.css(r)}},enableKillerFn:function(){var t=this;n(document).on("click.autocomplete",t.killerFn)},disableKillerFn:function(){var t=this;n(document).off("click.autocomplete",t.killerFn)},killSuggestions:function(){var n=this;n.stopKillSuggestions();n.intervalId=window.setInterval(function(){n.visible&&(n.options.preserveInput||n.el.val(n.currentValue),n.hide());n.stopKillSuggestions()},50)},stopKillSuggestions:function(){window.clearInterval(this.intervalId)},isCursorAtEnd:function(){var i=this,n=i.el.val().length,r=i.element.selectionStart,t;return typeof r=="number"?r===n:document.selection?(t=document.selection.createRange(),t.moveStart("character",-n),n===t.text.length):!0},onKeyPress:function(n){var i=this;if(!i.disabled&&!i.visible&&n.which===t.DOWN&&i.currentValue){i.suggest();return}if(!i.disabled&&i.visible){switch(n.which){case t.ESC:i.el.val(i.currentValue);i.hide();break;case t.RIGHT:if(i.hint&&i.options.onHint&&i.isCursorAtEnd()){i.selectHint();break}return;case t.TAB:if(i.hint&&i.options.onHint){i.selectHint();return}if(i.selectedIndex===-1){i.hide();return}if(i.select(i.selectedIndex),i.options.tabDisabled===!1)return;break;case t.RETURN:if(i.selectedIndex===-1){i.hide();return}i.select(i.selectedIndex);break;case t.UP:i.moveUp();break;case t.DOWN:i.moveDown();break;default:return}n.stopImmediatePropagation();n.preventDefault()}},onKeyUp:function(n){var i=this;if(!i.disabled){switch(n.which){case t.UP:case t.DOWN:return}clearInterval(i.onChangeInterval);i.currentValue!==i.el.val()&&(i.findBestHint(),i.options.deferRequestBy>0?i.onChangeInterval=setInterval(function(){i.onValueChange()},i.options.deferRequestBy):i.onValueChange())}},onValueChange:function(){var t=this,r=t.options,u=t.el.val(),i=t.getQuery(u);if(t.selection&&t.currentValue!==i&&(t.selection=null,(r.onInvalidateSelection||n.noop).call(t.element)),clearInterval(t.onChangeInterval),t.currentValue=u,t.selectedIndex=-1,r.triggerSelectOnValidInput&&t.isExactMatch(i)){t.select(0);return}i.length<r.minChars?t.hide():t.getSuggestions(i)},isExactMatch:function(n){var t=this.suggestions;return t.length===1&&t[0].value.toLowerCase()===n.toLowerCase()},getQuery:function(t){var r=this.options.delimiter,i;return r?(i=t.split(r),n.trim(i[i.length-1])):t},getSuggestionsLocal:function(t){var f=this,r=f.options,e=t.toLowerCase(),o=r.lookupFilter,u=parseInt(r.lookupLimit,10),i;return i={suggestions:n.grep(r.lookup,function(n){return o(n,t,e)})},u&&i.suggestions.length>u&&(i.suggestions=i.suggestions.slice(0,u)),i},getSuggestions:function(t){var u,i=this,r=i.options,f=r.serviceUrl,e,o,s;if(r.params[r.paramName]=t,e=r.ignoreParams?null:r.params,r.onSearchStart.call(i.element,r.params)!==!1){if(n.isFunction(r.lookup)){r.lookup(t,function(n){i.suggestions=n.suggestions;i.suggest();r.onSearchComplete.call(i.element,t,n.suggestions)});return}i.isLocal?u=i.getSuggestionsLocal(t):(n.isFunction(f)&&(f=f.call(i.element,t)),o=f+"?"+n.param(e||{}),u=i.cachedResponse[o]);u&&n.isArray(u.suggestions)?(i.suggestions=u.suggestions,i.suggest(),r.onSearchComplete.call(i.element,t,u.suggestions)):i.isBadQuery(t)?r.onSearchComplete.call(i.element,t,[]):(i.abortAjax(),s={url:f,data:e,type:r.type,dataType:r.dataType},n.extend(s,r.ajaxSettings),i.currentRequest=n.ajax(s).done(function(n){var u;i.currentRequest=null;u=r.transformResult(n,t);i.processResponse(u,t,o);r.onSearchComplete.call(i.element,t,u.suggestions)}).fail(function(n,u,f){r.onSearchError.call(i.element,t,n,u,f)}))}},isBadQuery:function(n){if(!this.options.preventBadQueries)return!1;for(var t=this.badQueries,i=t.length;i--;)if(n.indexOf(t[i])===0)return!0;return!1},hide:function(){var t=this,i=n(t.suggestionsContainer);n.isFunction(t.options.onHide)&&t.visible&&t.options.onHide.call(t.element,i);t.visible=!1;t.selectedIndex=-1;clearInterval(t.onChangeInterval);n(t.suggestionsContainer).hide();t.signalHint(null)},suggest:function(){if(!this.suggestions.length){this.options.showNoSuggestionNotice?this.noSuggestions():this.hide();return}var t=this,i=t.options,o=i.groupBy,c=i.formatResult,u=t.getQuery(t.currentValue),s=t.classes.suggestion,l=t.classes.selected,r=n(t.suggestionsContainer),a=n(t.noSuggestionsContainer),h=i.beforeRender,f="",e,v=function(n){var t=n.data[o];return e===t?"":(e=t,i.formatGroup(n,e))};if(i.triggerSelectOnValidInput&&t.isExactMatch(u)){t.select(0);return}n.each(t.suggestions,function(n,t){o&&(f+=v(t,u,n));f+='<div class="'+s+'" data-index="'+n+'">'+c(t,u,n)+"<\/div>"});this.adjustContainerWidth();a.detach();r.html(f);n.isFunction(h)&&h.call(t.element,r,t.suggestions);t.fixPosition();r.show();i.autoSelectFirst&&(t.selectedIndex=0,r.scrollTop(0),r.children("."+s).first().addClass(l));t.visible=!0;t.findBestHint()},noSuggestions:function(){var t=this,i=n(t.suggestionsContainer),r=n(t.noSuggestionsContainer);this.adjustContainerWidth();r.detach();i.empty();i.append(r);t.fixPosition();i.show();t.visible=!0},adjustContainerWidth:function(){var t=this,r=t.options,i,u=n(t.suggestionsContainer);r.width==="auto"?(i=t.el.outerWidth(),u.css("width",i>0?i:300)):r.width==="flex"&&u.css("width","")},findBestHint:function(){var t=this,i=t.el.val().toLowerCase(),r=null;i&&(n.each(t.suggestions,function(n,t){var u=t.value.toLowerCase().indexOf(i)===0;return u&&(r=t),!u}),t.signalHint(r))},signalHint:function(t){var r="",i=this;t&&(r=i.currentValue+t.value.substr(i.currentValue.length));i.hintValue!==r&&(i.hintValue=r,i.hint=t,(this.options.onHint||n.noop)(r))},verifySuggestionsFormat:function(t){return t.length&&typeof t[0]=="string"?n.map(t,function(n){return{value:n,data:null}}):t},validateOrientation:function(t,i){return t=n.trim(t||"").toLowerCase(),n.inArray(t,["auto","bottom","top"])===-1&&(t=i),t},processResponse:function(n,t,i){var r=this,u=r.options;(n.suggestions=r.verifySuggestionsFormat(n.suggestions),u.noCache||(r.cachedResponse[i]=n,u.preventBadQueries&&!n.suggestions.length&&r.badQueries.push(t)),t===r.getQuery(r.currentValue))&&(r.suggestions=n.suggestions,r.suggest())},activate:function(t){var i=this,r,u=i.classes.selected,f=n(i.suggestionsContainer),e=f.find("."+i.classes.suggestion);return(f.find("."+u).removeClass(u),i.selectedIndex=t,i.selectedIndex!==-1&&e.length>i.selectedIndex)?(r=e.get(i.selectedIndex),n(r).addClass(u),r):null},selectHint:function(){var t=this,i=n.inArray(t.hint,t.suggestions);t.select(i)},select:function(n){var t=this;t.hide();t.onSelect(n);t.disableKillerFn()},moveUp:function(){var t=this;if(t.selectedIndex!==-1){if(t.selectedIndex===0){n(t.suggestionsContainer).children().first().removeClass(t.classes.selected);t.selectedIndex=-1;t.el.val(t.currentValue);t.findBestHint();return}t.adjustScroll(t.selectedIndex-1)}},moveDown:function(){var n=this;n.selectedIndex!==n.suggestions.length-1&&n.adjustScroll(n.selectedIndex+1)},adjustScroll:function(t){var i=this,u=i.activate(t),r,f,o,e;u&&(e=n(u).outerHeight(),r=u.offsetTop,f=n(i.suggestionsContainer).scrollTop(),o=f+i.options.maxHeight-e,r<f?n(i.suggestionsContainer).scrollTop(r):r>o&&n(i.suggestionsContainer).scrollTop(r-i.options.maxHeight+e),i.options.preserveInput||i.el.val(i.getValue(i.suggestions[t].value)),i.signalHint(null))},onSelect:function(t){var i=this,u=i.options.onSelect,r=i.suggestions[t];i.currentValue=i.getValue(r.value);i.currentValue===i.el.val()||i.options.preserveInput||i.el.val(i.currentValue);i.signalHint(null);i.suggestions=[];i.selection=r;n.isFunction(u)&&u.call(i.element,r)},getValue:function(n){var r=this,u=r.options.delimiter,t,i;return u?(t=r.currentValue,i=t.split(u),i.length===1)?n:t.substr(0,t.length-i[i.length-1].length)+n:n},dispose:function(){var t=this;t.el.off(".autocomplete").removeData("autocomplete");t.disableKillerFn();n(window).off("resize.autocomplete",t.fixPositionCapture);n(t.suggestionsContainer).remove()}};n.fn.autocomplete=n.fn.devbridgeAutocomplete=function(t,r){var u="autocomplete";return arguments.length?this.each(function(){var e=n(this),f=e.data(u);typeof t=="string"?f&&typeof f[t]=="function"&&f[t](r):(f&&f.dispose&&f.dispose(),f=new i(this,t),e.data(u,f))}):this.first().data(u)}}),function(n,t){typeof module=="object"&&module.exports?module.exports=t():typeof define=="function"&&define.amd?define(t):n.Spinner=t()}(this,function(){"use strict";function i(n,t){var r=document.createElement(n||"div"),i;for(i in t)r[i]=t[i];return r}function t(n){for(var t=1,i=arguments.length;t<i;t++)n.appendChild(arguments[t]);return n}function a(n,t,i,r){var e=["opacity",t,~~(n*100),i,r].join("-"),o=.01+i/r*100,s=Math.max(1-(1-n)/t*(100-o),n),c=u.substring(0,u.indexOf("Animation")).toLowerCase(),l=c&&"-"+c+"-"||"";return h[e]||(f.insertRule("@"+l+"keyframes "+e+"{0%{opacity:"+s+"}"+o+"%{opacity:"+n+"}"+(o+.01)+"%{opacity:1}"+(o+t)%100+"%{opacity:"+n+"}100%{opacity:"+s+"}}",f.cssRules.length),h[e]=1),e}function o(n,t){var u=n.style,r,i;if(t=t.charAt(0).toUpperCase()+t.slice(1),u[t]!==undefined)return t;for(i=0;i<s.length;i++)if(r=s[i]+t,u[r]!==undefined)return r}function n(n,t){for(var i in t)n.style[o(n,i)||i]=t[i];return n}function c(n){for(var r,i,t=1;t<arguments.length;t++){r=arguments[t];for(i in r)n[i]===undefined&&(n[i]=r[i])}return n}function l(n,t){return typeof n=="string"?n:n[t%n.length]}function r(n){this.opts=c(n||{},r.defaults,v)}function y(){function u(n,t){return i("<"+n+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',t)}f.addRule(".spin-vml","behavior:url(#default#VML)");r.prototype.lines=function(i,r){function s(){return n(u("group",{coordsize:o+" "+o,coordorigin:-e+" "+-e}),{width:o,height:o})}function a(i,f,o){t(c,t(n(s(),{rotation:360/r.lines*i+"deg",left:~~f}),t(n(u("roundrect",{arcsize:r.corners}),{width:e,height:r.scale*r.width,left:r.scale*r.radius,top:-r.scale*r.width>>1,filter:o}),u("fill",{color:l(r.color,i),opacity:r.opacity}),u("stroke",{opacity:0}))))}var e=r.scale*(r.length+r.width),o=r.scale*2*e,h=-(r.width+r.length)*r.scale*2+"px",c=n(s(),{position:"absolute",top:h,left:h}),f;if(r.shadow)for(f=1;f<=r.lines;f++)a(f,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(f=1;f<=r.lines;f++)a(f);return t(i,c)};r.prototype.opacity=function(n,t,i,r){var u=n.firstChild;r=r.shadow&&r.lines||0;u&&t+r<u.childNodes.length&&(u=u.childNodes[t+r],u=u&&u.firstChild,u=u&&u.firstChild,u&&(u.opacity=i))}}var s=["webkit","Moz","ms","O"],h={},u,f,v={lines:12,length:7,width:5,radius:10,scale:1,corners:1,color:"#000",opacity:1/4,rotate:0,direction:1,speed:1,trail:100,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",shadow:!1,hwaccel:!1,position:"absolute"},e;return r.defaults={},c(r.prototype,{spin:function(t){this.stop();var f=this,r=f.opts,e=f.el=i(null,{className:r.className});if(n(e,{position:r.position,width:0,zIndex:r.zIndex,left:r.left,top:r.top}),t&&t.insertBefore(e,t.firstChild||null),e.setAttribute("role","progressbar"),f.lines(e,f.opts),!u){var s=0,l=(r.lines-1)*(1-r.direction)/2,h,c=r.fps,o=c/r.speed,a=(1-r.opacity)/(o*r.trail/100),v=o/r.lines;(function y(){s++;for(var n=0;n<r.lines;n++)h=Math.max(1-(s+(r.lines-n)*v)%o*a,r.opacity),f.opacity(e,n*r.direction+l,h,r);f.timeout=f.el&&setTimeout(y,~~(1e3/c))})()}return f},stop:function(){var n=this.el;return n&&(clearTimeout(this.timeout),n.parentNode&&n.parentNode.removeChild(n),this.el=undefined),this},lines:function(r,f){function s(t,r){return n(i(),{position:"absolute",width:f.scale*(f.length+f.width)+"px",height:f.scale*f.width+"px",background:t,boxShadow:r,transformOrigin:"left",transform:"rotate("+~~(360/f.lines*e+f.rotate)+"deg) translate("+f.scale*f.radius+"px,0)",borderRadius:(f.corners*f.scale*f.width>>1)+"px"})}for(var e=0,h=(f.lines-1)*(1-f.direction)/2,o;e<f.lines;e++)o=n(i(),{position:"absolute",top:1+~(f.scale*f.width/2)+"px",transform:f.hwaccel?"translate3d(0,0,0)":"",opacity:f.opacity,animation:u&&a(f.opacity,f.trail,h+e*f.direction,f.lines)+" "+1/f.speed+"s linear infinite"}),f.shadow&&t(o,n(s("#000","0 0 4px #000"),{top:"2px"})),t(r,t(o,s(l(f.color,e),"0 0 1px rgba(0,0,0,.1)")));return r},opacity:function(n,t,i){t<n.childNodes.length&&(n.childNodes[t].style.opacity=i)}}),typeof document!="undefined"&&(f=function(){var n=i("style",{type:"text/css"});return t(document.getElementsByTagName("head")[0],n),n.sheet||n.styleSheet}(),e=n(i("group"),{behavior:"url(#default#VML)"}),!o(e,"transform")&&e.adj?y():u=o(e,"animation")),r}),function(n,t,i){function o(){var t=n.L;r.noConflict=function(){return n.L=t,this};n.L=r}var r={version:"1.0.3+ed36a04"},u,f,e;typeof module=="object"&&typeof module.exports=="object"?module.exports=r:typeof define=="function"&&define.amd&&define(r);typeof n!="undefined"&&o();r.Util={extend:function(n){for(var i,r,t=1,u=arguments.length;t<u;t++){r=arguments[t];for(i in r)n[i]=r[i]}return n},create:Object.create||function(){function n(){}return function(t){return n.prototype=t,new n}}(),bind:function(n,t){var i=Array.prototype.slice,r;return n.bind?n.bind.apply(n,i.call(arguments,1)):(r=i.call(arguments,2),function(){return n.apply(t,r.length?r.concat(i.call(arguments)):arguments)})},stamp:function(n){return n._leaflet_id=n._leaflet_id||++r.Util.lastId,n._leaflet_id},lastId:0,throttle:function(n,t,i){var u,r,f,e;return e=function(){u=!1;r&&(f.apply(i,r),r=!1)},f=function(){u?r=arguments:(n.apply(i,arguments),setTimeout(e,t),u=!0)}},wrapNum:function(n,t,i){var f=t[1],r=t[0],u=f-r;return n===f&&i?n:((n-r)%u+u)%u+r},falseFn:function(){return!1},formatNum:function(n,t){var i=Math.pow(10,t||5);return Math.round(n*i)/i},trim:function(n){return n.trim?n.trim():n.replace(/^\s+|\s+$/g,"")},splitWords:function(n){return r.Util.trim(n).split(/\s+/)},setOptions:function(n,t){n.hasOwnProperty("options")||(n.options=n.options?r.Util.create(n.options):{});for(var i in t)n.options[i]=t[i];return n.options},getParamString:function(n,t,i){var u=[],r;for(r in n)u.push(encodeURIComponent(i?r.toUpperCase():r)+"="+encodeURIComponent(n[r]));return(!t||t.indexOf("?")===-1?"?":"&")+u.join("&")},template:function(n,t){return n.replace(r.Util.templateRe,function(n,r){var u=t[r];if(u===i)throw new Error("No value provided for variable "+n);else typeof u=="function"&&(u=u(t));return u})},templateRe:/\{ *([\w_\-]+) *\}/g,isArray:Array.isArray||function(n){return Object.prototype.toString.call(n)==="[object Array]"},indexOf:function(n,t){for(var i=0;i<n.length;i++)if(n[i]===t)return i;return-1},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},function(){function t(t){return n["webkit"+t]||n["moz"+t]||n["ms"+t]}function u(t){var r=+new Date,u=Math.max(0,16-(r-i));return i=r+u,n.setTimeout(t,u)}var i=0,f=n.requestAnimationFrame||t("RequestAnimationFrame")||u,e=n.cancelAnimationFrame||t("CancelAnimationFrame")||t("CancelRequestAnimationFrame")||function(t){n.clearTimeout(t)};r.Util.requestAnimFrame=function(t,i,e){if(e&&f===u)t.call(i);else return f.call(n,r.bind(t,i))};r.Util.cancelAnimFrame=function(t){t&&e.call(n,t)}}();r.extend=r.Util.extend;r.bind=r.Util.bind;r.stamp=r.Util.stamp;r.setOptions=r.Util.setOptions;r.Class=function(){};r.Class.extend=function(n){var i=function(){this.initialize&&this.initialize.apply(this,arguments);this.callInitHooks()},f=i.__super__=this.prototype,t=r.Util.create(f),u;t.constructor=i;i.prototype=t;for(u in this)this.hasOwnProperty(u)&&u!=="prototype"&&(i[u]=this[u]);return n.statics&&(r.extend(i,n.statics),delete n.statics),n.includes&&(r.Util.extend.apply(null,[t].concat(n.includes)),delete n.includes),t.options&&(n.options=r.Util.extend(r.Util.create(t.options),n.options)),r.extend(t,n),t._initHooks=[],t.callInitHooks=function(){if(!this._initHooksCalled){f.callInitHooks&&f.callInitHooks.call(this);this._initHooksCalled=!0;for(var n=0,i=t._initHooks.length;n<i;n++)t._initHooks[n].call(this)}},i};r.Class.include=function(n){return r.extend(this.prototype,n),this};r.Class.mergeOptions=function(n){return r.extend(this.prototype.options,n),this};r.Class.addInitHook=function(n){var t=Array.prototype.slice.call(arguments,1),i=typeof n=="function"?n:function(){this[n].apply(this,t)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};r.Evented=r.Class.extend({on:function(n,t,i){var f,u,e;if(typeof n=="object")for(f in n)this._on(f,n[f],t);else for(n=r.Util.splitWords(n),u=0,e=n.length;u<e;u++)this._on(n[u],t,i);return this},off:function(n,t,i){var f,u,e;if(n)if(typeof n=="object")for(f in n)this._off(f,n[f],t);else for(n=r.Util.splitWords(n),u=0,e=n.length;u<e;u++)this._off(n[u],t,i);else delete this._events;return this},_on:function(n,t,r){var u,o,f,e,s;for(this._events=this._events||{},u=this._events[n],u||(u=[],this._events[n]=u),r===this&&(r=i),o={fn:t,ctx:r},f=u,e=0,s=f.length;e<s;e++)if(f[e].fn===t&&f[e].ctx===r)return;f.push(o)},_off:function(n,t,u){var f,e,o,s;if(this._events&&(f=this._events[n],f)){if(!t){for(e=0,o=f.length;e<o;e++)f[e].fn=r.Util.falseFn;delete this._events[n];return}if(u===this&&(u=i),f)for(e=0,o=f.length;e<o;e++)if((s=f[e],s.ctx===u)&&s.fn===t){s.fn=r.Util.falseFn;this._firingCount&&(this._events[n]=f=f.slice());f.splice(e,1);return}}},fire:function(n,t,i){var e,u,f,s,o;if(!this.listens(n,i))return this;if(e=r.Util.extend({},t,{type:n,target:this}),this._events&&(u=this._events[n],u)){for(this._firingCount=this._firingCount+1||1,f=0,s=u.length;f<s;f++)o=u[f],o.fn.call(o.ctx||this,e);this._firingCount--}return i&&this._propagateEvent(e),this},listens:function(n,t){var i=this._events&&this._events[n],r;if(i&&i.length)return!0;if(t)for(r in this._eventParents)if(this._eventParents[r].listens(n,t))return!0;return!1},once:function(n,t,i){var u,f;if(typeof n=="object"){for(u in n)this.once(u,n[u],t);return this}f=r.bind(function(){this.off(n,t,i).off(n,f,i)},this);return this.on(n,t,i).on(n,f,i)},addEventParent:function(n){return this._eventParents=this._eventParents||{},this._eventParents[r.stamp(n)]=n,this},removeEventParent:function(n){return this._eventParents&&delete this._eventParents[r.stamp(n)],this},_propagateEvent:function(n){for(var t in this._eventParents)this._eventParents[t].fire(n.type,r.extend({layer:n.target},n),!0)}});u=r.Evented.prototype;u.addEventListener=u.on;u.removeEventListener=u.clearAllEventListeners=u.off;u.addOneTimeEventListener=u.once;u.fireEvent=u.fire;u.hasEventListeners=u.listens;r.Mixin={Events:u},function(){var i=navigator.userAgent.toLowerCase(),e=t.documentElement,f="ActiveXObject"in n,o=i.indexOf("webkit")!==-1,b=i.indexOf("phantom")!==-1,h=i.search("android [23]")!==-1,c=i.indexOf("chrome")!==-1,l=i.indexOf("gecko")!==-1&&!o&&!n.opera&&!f,k=navigator.platform.indexOf("Win")===0,u=typeof orientation!="undefined"||i.indexOf("mobile")!==-1,a=!n.PointerEvent&&n.MSPointerEvent,v=n.PointerEvent||a,y=f&&"transition"in e.style,s="WebKitCSSMatrix"in n&&"m11"in new n.WebKitCSSMatrix&&!h,p="MozPerspective"in e.style,w="OTransition"in e.style,d=!n.L_NO_TOUCH&&(v||"ontouchstart"in n||n.DocumentTouch&&t instanceof n.DocumentTouch);r.Browser={ie:f,ielt9:f&&!t.addEventListener,edge:"msLaunchUri"in navigator&&!("documentMode"in t),webkit:o,gecko:l,android:i.indexOf("android")!==-1,android23:h,chrome:c,safari:!c&&i.indexOf("safari")!==-1,win:k,ie3d:y,webkit3d:s,gecko3d:p,opera12:w,any3d:!n.L_DISABLE_3D&&(y||s||p)&&!w&&!b,mobile:u,mobileWebkit:u&&o,mobileWebkit3d:u&&s,mobileOpera:u&&n.opera,mobileGecko:u&&l,touch:!!d,msPointer:!!a,pointer:!!v,retina:(n.devicePixelRatio||n.screen.deviceXDPI/n.screen.logicalXDPI)>1}}();r.Point=function(n,t,i){this.x=i?Math.round(n):n;this.y=i?Math.round(t):t};r.Point.prototype={clone:function(){return new r.Point(this.x,this.y)},add:function(n){return this.clone()._add(r.point(n))},_add:function(n){return this.x+=n.x,this.y+=n.y,this},subtract:function(n){return this.clone()._subtract(r.point(n))},_subtract:function(n){return this.x-=n.x,this.y-=n.y,this},divideBy:function(n){return this.clone()._divideBy(n)},_divideBy:function(n){return this.x/=n,this.y/=n,this},multiplyBy:function(n){return this.clone()._multiplyBy(n)},_multiplyBy:function(n){return this.x*=n,this.y*=n,this},scaleBy:function(n){return new r.Point(this.x*n.x,this.y*n.y)},unscaleBy:function(n){return new r.Point(this.x/n.x,this.y/n.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},distanceTo:function(n){n=r.point(n);var t=n.x-this.x,i=n.y-this.y;return Math.sqrt(t*t+i*i)},equals:function(n){return n=r.point(n),n.x===this.x&&n.y===this.y},contains:function(n){return n=r.point(n),Math.abs(n.x)<=Math.abs(this.x)&&Math.abs(n.y)<=Math.abs(this.y)},toString:function(){return"Point("+r.Util.formatNum(this.x)+", "+r.Util.formatNum(this.y)+")"}};r.point=function(n,t,u){return n instanceof r.Point?n:r.Util.isArray(n)?new r.Point(n[0],n[1]):n===i||n===null?n:typeof n=="object"&&"x"in n&&"y"in n?new r.Point(n.x,n.y):new r.Point(n,t,u)};r.Bounds=function(n,t){var r,i,u;if(n)for(r=t?[n,t]:n,i=0,u=r.length;i<u;i++)this.extend(r[i])};r.Bounds.prototype={extend:function(n){return n=r.point(n),this.min||this.max?(this.min.x=Math.min(n.x,this.min.x),this.max.x=Math.max(n.x,this.max.x),this.min.y=Math.min(n.y,this.min.y),this.max.y=Math.max(n.y,this.max.y)):(this.min=n.clone(),this.max=n.clone()),this},getCenter:function(n){return new r.Point((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,n)},getBottomLeft:function(){return new r.Point(this.min.x,this.max.y)},getTopRight:function(){return new r.Point(this.max.x,this.min.y)},getSize:function(){return this.max.subtract(this.min)},contains:function(n){var t,i;return n=typeof n[0]=="number"||n instanceof r.Point?r.point(n):r.bounds(n),n instanceof r.Bounds?(t=n.min,i=n.max):t=i=n,t.x>=this.min.x&&i.x<=this.max.x&&t.y>=this.min.y&&i.y<=this.max.y},intersects:function(n){n=r.bounds(n);var t=this.min,i=this.max,u=n.min,f=n.max,e=f.x>=t.x&&u.x<=i.x,o=f.y>=t.y&&u.y<=i.y;return e&&o},overlaps:function(n){n=r.bounds(n);var t=this.min,i=this.max,u=n.min,f=n.max,e=f.x>t.x&&u.x<i.x,o=f.y>t.y&&u.y<i.y;return e&&o},isValid:function(){return!!(this.min&&this.max)}};r.bounds=function(n,t){return!n||n instanceof r.Bounds?n:new r.Bounds(n,t)};r.Transformation=function(n,t,i,r){this._a=n;this._b=t;this._c=i;this._d=r};r.Transformation.prototype={transform:function(n,t){return this._transform(n.clone(),t)},_transform:function(n,t){return t=t||1,n.x=t*(this._a*n.x+this._b),n.y=t*(this._c*n.y+this._d),n},untransform:function(n,t){return t=t||1,new r.Point((n.x/t-this._b)/this._a,(n.y/t-this._d)/this._c)}};r.DomUtil={get:function(n){return typeof n=="string"?t.getElementById(n):n},getStyle:function(n,i){var r=n.style[i]||n.currentStyle&&n.currentStyle[i],u;return(!r||r==="auto")&&t.defaultView&&(u=t.defaultView.getComputedStyle(n,null),r=u?u[i]:null),r==="auto"?null:r},create:function(n,i,r){var u=t.createElement(n);return u.className=i||"",r&&r.appendChild(u),u},remove:function(n){var t=n.parentNode;t&&t.removeChild(n)},empty:function(n){while(n.firstChild)n.removeChild(n.firstChild)},toFront:function(n){n.parentNode.appendChild(n)},toBack:function(n){var t=n.parentNode;t.insertBefore(n,t.firstChild)},hasClass:function(n,t){if(n.classList!==i)return n.classList.contains(t);var u=r.DomUtil.getClass(n);return u.length>0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(u)},addClass:function(n,t){var f,u,o,e;if(n.classList!==i)for(f=r.Util.splitWords(t),u=0,o=f.length;u<o;u++)n.classList.add(f[u]);else r.DomUtil.hasClass(n,t)||(e=r.DomUtil.getClass(n),r.DomUtil.setClass(n,(e?e+" ":"")+t))},removeClass:function(n,t){n.classList!==i?n.classList.remove(t):r.DomUtil.setClass(n,r.Util.trim((" "+r.DomUtil.getClass(n)+" ").replace(" "+t+" "," ")))},setClass:function(n,t){n.className.baseVal===i?n.className=t:n.className.baseVal=t},getClass:function(n){return n.className.baseVal===i?n.className:n.className.baseVal},setOpacity:function(n,t){"opacity"in n.style?n.style.opacity=t:"filter"in n.style&&r.DomUtil._setOpacityIE(n,t)},_setOpacityIE:function(n,t){var i=!1,r="DXImageTransform.Microsoft.Alpha";try{i=n.filters.item(r)}catch(u){if(t===1)return}t=Math.round(t*100);i?(i.Enabled=t!==100,i.Opacity=t):n.style.filter+=" progid:"+r+"(opacity="+t+")"},testProp:function(n){for(var r=t.documentElement.style,i=0;i<n.length;i++)if(n[i]in r)return n[i];return!1},setTransform:function(n,t,i){var u=t||new r.Point(0,0);n.style[r.DomUtil.TRANSFORM]=(r.Browser.ie3d?"translate("+u.x+"px,"+u.y+"px)":"translate3d("+u.x+"px,"+u.y+"px,0)")+(i?" scale("+i+")":"")},setPosition:function(n,t){n._leaflet_pos=t;r.Browser.any3d?r.DomUtil.setTransform(n,t):(n.style.left=t.x+"px",n.style.top=t.y+"px")},getPosition:function(n){return n._leaflet_pos||new r.Point(0,0)}},function(){var u,i;r.DomUtil.TRANSFORM=r.DomUtil.testProp(["transform","WebkitTransform","OTransform","MozTransform","msTransform"]);u=r.DomUtil.TRANSITION=r.DomUtil.testProp(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);r.DomUtil.TRANSITION_END=u==="webkitTransition"||u==="OTransition"?u+"End":"transitionend";"onselectstart"in t?(r.DomUtil.disableTextSelection=function(){r.DomEvent.on(n,"selectstart",r.DomEvent.preventDefault)},r.DomUtil.enableTextSelection=function(){r.DomEvent.off(n,"selectstart",r.DomEvent.preventDefault)}):(i=r.DomUtil.testProp(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]),r.DomUtil.disableTextSelection=function(){if(i){var n=t.documentElement.style;this._userSelect=n[i];n[i]="none"}},r.DomUtil.enableTextSelection=function(){i&&(t.documentElement.style[i]=this._userSelect,delete this._userSelect)});r.DomUtil.disableImageDrag=function(){r.DomEvent.on(n,"dragstart",r.DomEvent.preventDefault)};r.DomUtil.enableImageDrag=function(){r.DomEvent.off(n,"dragstart",r.DomEvent.preventDefault)};r.DomUtil.preventOutline=function(t){while(t.tabIndex===-1)t=t.parentNode;if(t&&t.style){r.DomUtil.restoreOutline();this._outlineElement=t;this._outlineStyle=t.style.outline;t.style.outline="none";r.DomEvent.on(n,"keydown",r.DomUtil.restoreOutline,this)}};r.DomUtil.restoreOutline=function(){this._outlineElement&&(this._outlineElement.style.outline=this._outlineStyle,delete this._outlineElement,delete this._outlineStyle,r.DomEvent.off(n,"keydown",r.DomUtil.restoreOutline,this))}}();r.LatLng=function(n,t,r){if(isNaN(n)||isNaN(t))throw new Error("Invalid LatLng object: ("+n+", "+t+")");this.lat=+n;this.lng=+t;r!==i&&(this.alt=+r)};r.LatLng.prototype={equals:function(n,t){if(!n)return!1;n=r.latLng(n);var u=Math.max(Math.abs(this.lat-n.lat),Math.abs(this.lng-n.lng));return u<=(t===i?1e-9:t)},toString:function(n){return"LatLng("+r.Util.formatNum(this.lat,n)+", "+r.Util.formatNum(this.lng,n)+")"},distanceTo:function(n){return r.CRS.Earth.distance(this,r.latLng(n))},wrap:function(){return r.CRS.Earth.wrapLatLng(this)},toBounds:function(n){var t=180*n/40075017,i=t/Math.cos(Math.PI/180*this.lat);return r.latLngBounds([this.lat-t,this.lng-i],[this.lat+t,this.lng+i])},clone:function(){return new r.LatLng(this.lat,this.lng,this.alt)}};r.latLng=function(n,t,u){return n instanceof r.LatLng?n:r.Util.isArray(n)&&typeof n[0]!="object"?n.length===3?new r.LatLng(n[0],n[1],n[2]):n.length===2?new r.LatLng(n[0],n[1]):null:n===i||n===null?n:typeof n=="object"&&"lat"in n?new r.LatLng(n.lat,"lng"in n?n.lng:n.lon,n.alt):t===i?null:new r.LatLng(n,t,u)};r.LatLngBounds=function(n,t){var r,i,u;if(n)for(r=t?[n,t]:n,i=0,u=r.length;i<u;i++)this.extend(r[i])};r.LatLngBounds.prototype={extend:function(n){var u=this._southWest,f=this._northEast,t,i;if(n instanceof r.LatLng)t=n,i=n;else if(n instanceof r.LatLngBounds){if(t=n._southWest,i=n._northEast,!t||!i)return this}else return n?this.extend(r.latLng(n)||r.latLngBounds(n)):this;return u||f?(u.lat=Math.min(t.lat,u.lat),u.lng=Math.min(t.lng,u.lng),f.lat=Math.max(i.lat,f.lat),f.lng=Math.max(i.lng,f.lng)):(this._southWest=new r.LatLng(t.lat,t.lng),this._northEast=new r.LatLng(i.lat,i.lng)),this},pad:function(n){var t=this._southWest,i=this._northEast,u=Math.abs(t.lat-i.lat)*n,f=Math.abs(t.lng-i.lng)*n;return new r.LatLngBounds(new r.LatLng(t.lat-u,t.lng-f),new r.LatLng(i.lat+u,i.lng+f))},getCenter:function(){return new r.LatLng((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new r.LatLng(this.getNorth(),this.getWest())},getSouthEast:function(){return new r.LatLng(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(n){n=typeof n[0]=="number"||n instanceof r.LatLng||"lat"in n?r.latLng(n):r.latLngBounds(n);var u=this._southWest,f=this._northEast,t,i;return n instanceof r.LatLngBounds?(t=n.getSouthWest(),i=n.getNorthEast()):t=i=n,t.lat>=u.lat&&i.lat<=f.lat&&t.lng>=u.lng&&i.lng<=f.lng},intersects:function(n){n=r.latLngBounds(n);var t=this._southWest,i=this._northEast,u=n.getSouthWest(),f=n.getNorthEast(),e=f.lat>=t.lat&&u.lat<=i.lat,o=f.lng>=t.lng&&u.lng<=i.lng;return e&&o},overlaps:function(n){n=r.latLngBounds(n);var t=this._southWest,i=this._northEast,u=n.getSouthWest(),f=n.getNorthEast(),e=f.lat>t.lat&&u.lat<i.lat,o=f.lng>t.lng&&u.lng<i.lng;return e&&o},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(n){return n?(n=r.latLngBounds(n),this._southWest.equals(n.getSouthWest())&&this._northEast.equals(n.getNorthEast())):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};r.latLngBounds=function(n,t){return n instanceof r.LatLngBounds?n:new r.LatLngBounds(n,t)};r.Projection={};r.Projection.LonLat={project:function(n){return new r.Point(n.lng,n.lat)},unproject:function(n){return new r.LatLng(n.y,n.x)},bounds:r.bounds([-180,-90],[180,90])};r.Projection.SphericalMercator={R:6378137,MAX_LATITUDE:85.0511287798,project:function(n){var t=Math.PI/180,i=this.MAX_LATITUDE,f=Math.max(Math.min(i,n.lat),-i),u=Math.sin(f*t);return new r.Point(this.R*n.lng*t,this.R*Math.log((1+u)/(1-u))/2)},unproject:function(n){var t=180/Math.PI;return new r.LatLng((2*Math.atan(Math.exp(n.y/this.R))-Math.PI/2)*t,n.x*t/this.R)},bounds:function(){var n=6378137*Math.PI;return r.bounds([-n,-n],[n,n])}()};r.CRS={latLngToPoint:function(n,t){var i=this.projection.project(n),r=this.scale(t);return this.transformation._transform(i,r)},pointToLatLng:function(n,t){var i=this.scale(t),r=this.transformation.untransform(n,i);return this.projection.unproject(r)},project:function(n){return this.projection.project(n)},unproject:function(n){return this.projection.unproject(n)},scale:function(n){return 256*Math.pow(2,n)},zoom:function(n){return Math.log(n/256)/Math.LN2},getProjectedBounds:function(n){if(this.infinite)return null;var t=this.projection.bounds,i=this.scale(n),u=this.transformation.transform(t.min,i),f=this.transformation.transform(t.max,i);return r.bounds(u,f)},infinite:!1,wrapLatLng:function(n){var t=this.wrapLng?r.Util.wrapNum(n.lng,this.wrapLng,!0):n.lng,i=this.wrapLat?r.Util.wrapNum(n.lat,this.wrapLat,!0):n.lat,u=n.alt;return r.latLng(i,t,u)},wrapLatLngBounds:function(n){var t=n.getCenter(),f=this.wrapLatLng(t),i=t.lat-f.lat,u=t.lng-f.lng;if(i===0&&u===0)return n;var e=n.getSouthWest(),o=n.getNorthEast(),s=r.latLng({lat:e.lat-i,lng:e.lng-u}),h=r.latLng({lat:o.lat-i,lng:o.lng-u});return new r.LatLngBounds(s,h)}};r.CRS.Simple=r.extend({},r.CRS,{projection:r.Projection.LonLat,transformation:new r.Transformation(1,0,-1,0),scale:function(n){return Math.pow(2,n)},zoom:function(n){return Math.log(n)/Math.LN2},distance:function(n,t){var i=t.lng-n.lng,r=t.lat-n.lat;return Math.sqrt(i*i+r*r)},infinite:!0});r.CRS.Earth=r.extend({},r.CRS,{wrapLng:[-180,180],R:6371e3,distance:function(n,t){var i=Math.PI/180,r=n.lat*i,u=t.lat*i,f=Math.sin(r)*Math.sin(u)+Math.cos(r)*Math.cos(u)*Math.cos((t.lng-n.lng)*i);return this.R*Math.acos(Math.min(f,1))}});r.CRS.EPSG3857=r.extend({},r.CRS.Earth,{code:"EPSG:3857",projection:r.Projection.SphericalMercator,transformation:function(){var n=.5/(Math.PI*r.Projection.SphericalMercator.R);return new r.Transformation(n,.5,-n,.5)}()});r.CRS.EPSG900913=r.extend({},r.CRS.EPSG3857,{code:"EPSG:900913"});r.CRS.EPSG4326=r.extend({},r.CRS.Earth,{code:"EPSG:4326",projection:r.Projection.LonLat,transformation:new r.Transformation(1/180,1,-1/180,.5)});r.Map=r.Evented.extend({options:{crs:r.CRS.EPSG3857,center:i,zoom:i,minZoom:i,maxZoom:i,layers:[],maxBounds:i,renderer:i,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(n,t){if(t=r.setOptions(this,t),this._initContainer(n),this._initLayout(),this._onResize=r.bind(this._onResize,this),this._initEvents(),t.maxBounds&&this.setMaxBounds(t.maxBounds),t.zoom!==i&&(this._zoom=this._limitZoom(t.zoom)),t.center&&t.zoom!==i&&this.setView(r.latLng(t.center),t.zoom,{reset:!0}),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this.callInitHooks(),this._zoomAnimated=r.DomUtil.TRANSITION&&r.Browser.any3d&&!r.Browser.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated){this._createAnimProxy();r.DomEvent.on(this._proxy,r.DomUtil.TRANSITION_END,this._catchTransitionEnd,this)}this._addLayers(this.options.layers)},setView:function(n,t,u){if(t=t===i?this._zoom:this._limitZoom(t),n=this._limitCenter(r.latLng(n),t,this.options.maxBounds),u=u||{},this._stop(),this._loaded&&!u.reset&&u!==!0){u.animate!==i&&(u.zoom=r.extend({animate:u.animate},u.zoom),u.pan=r.extend({animate:u.animate,duration:u.duration},u.pan));var f=this._zoom!==t?this._tryAnimatedZoom&&this._tryAnimatedZoom(n,t,u.zoom):this._tryAnimatedPan(n,u.pan);if(f)return clearTimeout(this._sizeTimer),this}return this._resetView(n,t),this},setZoom:function(n,t){return this._loaded?this.setView(this.getCenter(),n,{zoom:t}):(this._zoom=n,this)},zoomIn:function(n,t){return n=n||(r.Browser.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+n,t)},zoomOut:function(n,t){return n=n||(r.Browser.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-n,t)},setZoomAround:function(n,t,i){var f=this.getZoomScale(t),u=this.getSize().divideBy(2),e=n instanceof r.Point?n:this.latLngToContainerPoint(n),o=e.subtract(u).multiplyBy(1-1/f),s=this.containerPointToLatLng(u.add(o));return this.setView(s,t,{zoom:i})},_getBoundsCenterZoom:function(n,t){t=t||{};n=n.getBounds?n.getBounds():r.latLngBounds(n);var u=r.point(t.paddingTopLeft||t.padding||[0,0]),f=r.point(t.paddingBottomRight||t.padding||[0,0]),i=this.getBoundsZoom(n,!1,u.add(f));i=typeof t.maxZoom=="number"?Math.min(t.maxZoom,i):i;var e=f.subtract(u).divideBy(2),o=this.project(n.getSouthWest(),i),s=this.project(n.getNorthEast(),i),h=this.unproject(o.add(s).divideBy(2).add(e),i);return{center:h,zoom:i}},fitBounds:function(n,t){if(n=r.latLngBounds(n),!n.isValid())throw new Error("Bounds are not valid.");var i=this._getBoundsCenterZoom(n,t);return this.setView(i.center,i.zoom,t)},fitWorld:function(n){return this.fitBounds([[-90,-180],[90,180]],n)},panTo:function(n,t){return this.setView(n,this._zoom,{pan:t})},panBy:function(n,t){if(n=r.point(n).round(),t=t||{},!n.x&&!n.y)return this.fire("moveend");if(t.animate!==!0&&!this.getSize().contains(n))return this._resetView(this.unproject(this.project(this.getCenter()).add(n)),this.getZoom()),this;if(!this._panAnim){this._panAnim=new r.PosAnimation;this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)}if(t.noMoveStart||this.fire("movestart"),t.animate!==!1){r.DomUtil.addClass(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(n).round();this._panAnim.run(this._mapPane,i,t.duration||.25,t.easeLinearity)}else this._rawPanBy(n),this.fire("move").fire("moveend");return this},flyTo:function(n,t,u){function w(n){var r=n?-1:1,u=n?v:f,e=v*v-f*f+r*c*c*h*h,o=2*u*c*h,t=e/o,i=Math.sqrt(t*t+1)-t;return i<1e-9?-18:Math.log(i)}function b(n){return(Math.exp(n)-Math.exp(-n))/2}function l(n){return(Math.exp(n)+Math.exp(-n))/2}function g(n){return b(n)/l(n)}function nt(n){return f*(l(e)/l(e+o*n))}function tt(n){return f*(l(e)*g(e+o*n)-b(e))/c}function it(n){return 1-Math.pow(1-n,1.5)}function d(){var i=(Date.now()-rt)/ut,u=it(i)*k;i<=1?(this._flyToFrame=r.Util.requestAnimFrame(d,this),this._move(this.unproject(a.add(y.subtract(a).multiplyBy(tt(u)/h)),s),this.getScaleZoom(f/nt(u),s),{flyTo:!0})):this._move(n,t)._moveEnd(!0)}var e;if(u=u||{},u.animate===!1||!r.Browser.any3d)return this.setView(n,t,u);this._stop();var a=this.project(this.getCenter()),y=this.project(n),p=this.getSize(),s=this._zoom;n=r.latLng(n);t=t===i?s:t;var f=Math.max(p.x,p.y),v=f*this.getZoomScale(s,t),h=y.distanceTo(a)||1,o=1.42,c=o*o;e=w(0);var rt=Date.now(),k=(w(1)-e)/o,ut=u.duration?1e3*u.duration:1e3*k*.8;return this._moveStart(!0),d.call(this),this},flyToBounds:function(n,t){var i=this._getBoundsCenterZoom(n,t);return this.flyTo(i.center,i.zoom,t)},setMaxBounds:function(n){if(n=r.latLngBounds(n),n.isValid())this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds);else return this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds);this.options.maxBounds=n;this._loaded&&this._panInsideMaxBounds();return this.on("moveend",this._panInsideMaxBounds)},setMinZoom:function(n){return(this.options.minZoom=n,this._loaded&&this.getZoom()<this.options.minZoom)?this.setZoom(n):this},setMaxZoom:function(n){return(this.options.maxZoom=n,this._loaded&&this.getZoom()>this.options.maxZoom)?this.setZoom(n):this},panInsideBounds:function(n,t){this._enforcingBounds=!0;var i=this.getCenter(),u=this._limitCenter(i,this._zoom,r.latLngBounds(n));return i.equals(u)||this.panTo(u,t),this._enforcingBounds=!1,this},invalidateSize:function(n){var i;if(!this._loaded)return this;n=r.extend({animate:!1,pan:!0},n===!0?{animate:!0}:n);i=this.getSize();this._sizeChanged=!0;this._lastCenter=null;var u=this.getSize(),f=i.divideBy(2).round(),e=u.divideBy(2).round(),t=f.subtract(e);return!t.x&&!t.y?this:(n.animate&&n.pan?this.panBy(t):(n.pan&&this._rawPanBy(t),this.fire("move"),n.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(r.bind(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:i,newSize:u}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(n){if(n=this._locateOptions=r.extend({timeout:1e4,watch:!1},n),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var t=r.bind(this._handleGeolocationResponse,this),i=r.bind(this._handleGeolocationError,this);return n.watch?this._locationWatchId=navigator.geolocation.watchPosition(t,i,n):navigator.geolocation.getCurrentPosition(t,i,n),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(n){var t=n.code,i=n.message||(t===1?"permission denied":t===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld();this.fire("locationerror",{code:t,message:"Geolocation error: "+i+"."})},_handleGeolocationResponse:function(n){var s=n.coords.latitude,h=n.coords.longitude,i=new r.LatLng(s,h),o=i.toBounds(n.coords.accuracy),u=this._locateOptions,f,e,t;u.setView&&(f=this.getBoundsZoom(o),this.setView(i,u.maxZoom?Math.min(f,u.maxZoom):f));e={latlng:i,bounds:o,timestamp:n.timestamp};for(t in n.coords)typeof n.coords[t]=="number"&&(e[t]=n.coords[t]);this.fire("locationfound",e)},addHandler:function(n,t){if(!t)return this;var i=this[n]=new t(this);return this._handlers.push(i),this.options[n]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id;delete this._containerId}catch(t){this._container._leaflet_id=i;this._containerId=i}r.DomUtil.remove(this._mapPane);this._clearControlPos&&this._clearControlPos();this._clearHandlers();this._loaded&&this.fire("unload");for(var n in this._layers)this._layers[n].remove();return this},createPane:function(n,t){var u="leaflet-pane"+(n?" leaflet-"+n.replace("Pane","")+"-pane":""),i=r.DomUtil.create("div",u,t||this._mapPane);return n&&(this._panes[n]=i),i},getCenter:function(){return(this._checkIfLoaded(),this._lastCenter&&!this._moved())?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var n=this.getPixelBounds(),t=this.unproject(n.getBottomLeft()),i=this.unproject(n.getTopRight());return new r.LatLngBounds(t,i)},getMinZoom:function(){return this.options.minZoom===i?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===i?this._layersMaxZoom===i?Infinity:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(n,t,i){n=r.latLngBounds(n);i=r.point(i||[0,0]);var u=this.getZoom()||0,s=this.getMinZoom(),h=this.getMaxZoom(),c=n.getNorthWest(),l=n.getSouthEast(),e=this.getSize().subtract(i),o=r.bounds(this.project(l,u),this.project(c,u)).getSize(),f=r.Browser.any3d?this.options.zoomSnap:1,a=Math.min(e.x/o.x,e.y/o.y);return u=this.getScaleZoom(a,u),f&&(u=Math.round(u/(f/100))*(f/100),u=t?Math.ceil(u/f)*f:Math.floor(u/f)*f),Math.max(s,Math.min(h,u))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new r.Point(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(n,t){var i=this._getTopLeftPoint(n,t);return new r.Bounds(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(n){return this.options.crs.getProjectedBounds(n===i?this.getZoom():n)},getPane:function(n){return typeof n=="string"?this._panes[n]:n},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(n,t){var r=this.options.crs;return t=t===i?this._zoom:t,r.scale(n)/r.scale(t)},getScaleZoom:function(n,t){var u=this.options.crs,r;return t=t===i?this._zoom:t,r=u.zoom(n*u.scale(t)),isNaN(r)?Infinity:r},project:function(n,t){return t=t===i?this._zoom:t,this.options.crs.latLngToPoint(r.latLng(n),t)},unproject:function(n,t){return t=t===i?this._zoom:t,this.options.crs.pointToLatLng(r.point(n),t)},layerPointToLatLng:function(n){var t=r.point(n).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(n){var t=this.project(r.latLng(n))._round();return t._subtract(this.getPixelOrigin())},wrapLatLng:function(n){return this.options.crs.wrapLatLng(r.latLng(n))},wrapLatLngBounds:function(n){return this.options.crs.wrapLatLngBounds(r.latLngBounds(n))},distance:function(n,t){return this.options.crs.distance(r.latLng(n),r.latLng(t))},containerPointToLayerPoint:function(n){return r.point(n).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(n){return r.point(n).add(this._getMapPanePos())},containerPointToLatLng:function(n){var t=this.containerPointToLayerPoint(r.point(n));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(n){return this.layerPointToContainerPoint(this.latLngToLayerPoint(r.latLng(n)))},mouseEventToContainerPoint:function(n){return r.DomEvent.getMousePosition(n,this._container)},mouseEventToLayerPoint:function(n){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(n))},mouseEventToLatLng:function(n){return this.layerPointToLatLng(this.mouseEventToLayerPoint(n))},_initContainer:function(n){var t=this._container=r.DomUtil.get(n);if(t){if(t._leaflet_id)throw new Error("Map container is already initialized.");}else throw new Error("Map container not found.");r.DomEvent.addListener(t,"scroll",this._onScroll,this);this._containerId=r.Util.stamp(t)},_initLayout:function(){var t=this._container,n;this._fadeAnimated=this.options.fadeAnimation&&r.Browser.any3d;r.DomUtil.addClass(t,"leaflet-container"+(r.Browser.touch?" leaflet-touch":"")+(r.Browser.retina?" leaflet-retina":"")+(r.Browser.ielt9?" leaflet-oldie":"")+(r.Browser.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));n=r.DomUtil.getStyle(t,"position");n!=="absolute"&&n!=="relative"&&n!=="fixed"&&(t.style.position="relative");this._initPanes();this._initControlPos&&this._initControlPos()},_initPanes:function(){var n=this._panes={};this._paneRenderers={};this._mapPane=this.createPane("mapPane",this._container);r.DomUtil.setPosition(this._mapPane,new r.Point(0,0));this.createPane("tilePane");this.createPane("shadowPane");this.createPane("overlayPane");this.createPane("markerPane");this.createPane("tooltipPane");this.createPane("popupPane");this.options.markerZoomAnimation||(r.DomUtil.addClass(n.markerPane,"leaflet-zoom-hide"),r.DomUtil.addClass(n.shadowPane,"leaflet-zoom-hide"))},_resetView:function(n,t){var u,i;r.DomUtil.setPosition(this._mapPane,new r.Point(0,0));u=!this._loaded;this._loaded=!0;t=this._limitZoom(t);this.fire("viewprereset");i=this._zoom!==t;this._moveStart(i)._move(n,t)._moveEnd(i);this.fire("viewreset");u&&this.fire("load")},_moveStart:function(n){return n&&this.fire("zoomstart"),this.fire("movestart")},_move:function(n,t,r){t===i&&(t=this._zoom);var u=this._zoom!==t;return this._zoom=t,this._lastCenter=n,this._pixelOrigin=this._getNewPixelOrigin(n),(u||r&&r.pinch)&&this.fire("zoom",r),this.fire("move",r)},_moveEnd:function(n){return n&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return r.Util.cancelAnimFrame(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(n){r.DomUtil.setPosition(this._mapPane,this._getMapPanePos().subtract(n))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.");},_initEvents:function(t){if(r.DomEvent){this._targets={};this._targets[r.stamp(this._container)]=this;var i=t?"off":"on";r.DomEvent[i](this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress",this._handleDOMEvent,this);this.options.trackResize&&r.DomEvent[i](n,"resize",this._onResize,this);r.Browser.any3d&&this.options.transform3DLimit&&this[i]("moveend",this._onMoveEnd)}},_onResize:function(){r.Util.cancelAnimFrame(this._resizeRequest);this._resizeRequest=r.Util.requestAnimFrame(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0;this._container.scrollLeft=0},_onMoveEnd:function(){var n=this._getMapPanePos();Math.max(Math.abs(n.x),Math.abs(n.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(n,t){for(var f=[],u,e=t==="mouseout"||t==="mouseover",i=n.target||n.srcElement,o=!1;i;){if(u=this._targets[r.stamp(i)],u&&(t==="click"||t==="preclick")&&!n._simulated&&this._draggableMoved(u)){o=!0;break}if(u&&u.listens(t,!0)){if(e&&!r.DomEvent._isExternalTarget(i,n))break;if(f.push(u),e)break}if(i===this._container)break;i=i.parentNode}return f.length||o||e||!r.DomEvent._isExternalTarget(i,n)||(f=[this]),f},_handleDOMEvent:function(n){if(this._loaded&&!r.DomEvent._skipped(n)){var t=n.type==="keypress"&&n.keyCode===13?"click":n.type;t==="mousedown"&&r.DomUtil.preventOutline(n.target||n.srcElement);this._fireDOMEvent(n,t)}},_fireDOMEvent:function(n,t,i){var o,e,u,s,f;if((n.type==="click"&&(o=r.Util.extend({},n),o.type="preclick",this._fireDOMEvent(o,o.type,i)),!n._stopped)&&(i=(i||[]).concat(this._findEventTargets(n,t)),i.length))for(e=i[0],t==="contextmenu"&&e.listens(t,!0)&&r.DomEvent.preventDefault(n),u={originalEvent:n},n.type!=="keypress"&&(s=e instanceof r.Marker,u.containerPoint=s?this.latLngToContainerPoint(e.getLatLng()):this.mouseEventToContainerPoint(n),u.layerPoint=this.containerPointToLayerPoint(u.containerPoint),u.latlng=s?e.getLatLng():this.layerPointToLatLng(u.layerPoint)),f=0;f<i.length;f++)if(i[f].fire(t,u,!0),u.originalEvent._stopped||i[f].options.nonBubblingEvents&&r.Util.indexOf(i[f].options.nonBubblingEvents,t)!==-1)return},_draggableMoved:function(n){return n=n.dragging&&n.dragging.enabled()?n:this,n.dragging&&n.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var n=0,t=this._handlers.length;n<t;n++)this._handlers[n].disable()},whenReady:function(n,t){if(this._loaded)n.call(t||this,{target:this});else this.on("load",n,t);return this},_getMapPanePos:function(){return r.DomUtil.getPosition(this._mapPane)||new r.Point(0,0)},_moved:function(){var n=this._getMapPanePos();return n&&!n.equals([0,0])},_getTopLeftPoint:function(n,t){var r=n&&t!==i?this._getNewPixelOrigin(n,t):this.getPixelOrigin();return r.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(n,t){var i=this.getSize()._divideBy(2);return this.project(n,t)._subtract(i)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(n,t,i){var r=this._getNewPixelOrigin(i,t);return this.project(n,t)._subtract(r)},_latLngBoundsToNewLayerBounds:function(n,t,i){var u=this._getNewPixelOrigin(i,t);return r.bounds([this.project(n.getSouthWest(),t)._subtract(u),this.project(n.getNorthWest(),t)._subtract(u),this.project(n.getSouthEast(),t)._subtract(u),this.project(n.getNorthEast(),t)._subtract(u)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(n){return this.latLngToLayerPoint(n).subtract(this._getCenterLayerPoint())},_limitCenter:function(n,t,i){if(!i)return n;var u=this.project(n,t),f=this.getSize().divideBy(2),o=new r.Bounds(u.subtract(f),u.add(f)),e=this._getBoundsOffset(o,i,t);return e.round().equals([0,0])?n:this.unproject(u.add(e),t)},_limitOffset:function(n,t){if(!t)return n;var i=this.getPixelBounds(),u=new r.Bounds(i.min.add(n),i.max.add(n));return n.add(this._getBoundsOffset(u,t))},_getBoundsOffset:function(n,t,i){var u=r.bounds(this.project(t.getNorthEast(),i),this.project(t.getSouthWest(),i)),f=u.min.subtract(n.min),e=u.max.subtract(n.max),o=this._rebound(f.x,-e.x),s=this._rebound(f.y,-e.y);return new r.Point(o,s)},_rebound:function(n,t){return n+t>0?Math.round(n-t)/2:Math.max(0,Math.ceil(n))-Math.max(0,Math.floor(t))},_limitZoom:function(n){var i=this.getMinZoom(),u=this.getMaxZoom(),t=r.Browser.any3d?this.options.zoomSnap:1;return t&&(n=Math.round(n/t)*t),Math.max(i,Math.min(u,n))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){r.DomUtil.removeClass(this._mapPane,"leaflet-pan-anim");this.fire("moveend")},_tryAnimatedPan:function(n,t){var i=this._getCenterOffset(n)._floor();return(t&&t.animate)!==!0&&!this.getSize().contains(i)?!1:(this.panBy(i,t),!0)},_createAnimProxy:function(){var n=this._proxy=r.DomUtil.create("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(n);this.on("zoomanim",function(t){var i=r.DomUtil.TRANSFORM,u=n.style[i];r.DomUtil.setTransform(n,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1));u===n.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()},this);this.on("load moveend",function(){var i=this.getCenter(),t=this.getZoom();r.DomUtil.setTransform(n,this.project(i,t),this.getZoomScale(t,1))},this)},_catchTransitionEnd:function(n){this._animatingZoom&&n.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(n,t,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(t-this._zoom)>this.options.zoomAnimationThreshold)return!1;var u=this.getZoomScale(t),f=this._getCenterOffset(n)._divideBy(1-1/u);return i.animate!==!0&&!this.getSize().contains(f)?!1:(r.Util.requestAnimFrame(function(){this._moveStart(!0)._animateZoom(n,t,!0)},this),!0)},_animateZoom:function(n,t,i,u){i&&(this._animatingZoom=!0,this._animateToCenter=n,this._animateToZoom=t,r.DomUtil.addClass(this._mapPane,"leaflet-zoom-anim"));this.fire("zoomanim",{center:n,zoom:t,noUpdate:u});setTimeout(r.bind(this._onZoomTransitionEnd,this),250)},_onZoomTransitionEnd:function(){this._animatingZoom&&(r.DomUtil.removeClass(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),r.Util.requestAnimFrame(function(){this._moveEnd(!0)},this))}});r.map=function(n,t){return new r.Map(n,t)};r.Layer=r.Evented.extend({options:{pane:"overlayPane",nonBubblingEvents:[],attribution:null},addTo:function(n){return n.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(n){return n&&n.removeLayer(this),this},getPane:function(n){return this._map.getPane(n?this.options[n]||n:this.options.pane)},addInteractiveTarget:function(n){return this._map._targets[r.stamp(n)]=this,this},removeInteractiveTarget:function(n){return delete this._map._targets[r.stamp(n)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(n){var t=n.target,i;if(t.hasLayer(this)){if(this._map=t,this._zoomAnimated=t._zoomAnimated,this.getEvents){i=this.getEvents();t.on(i,this);this.once("remove",function(){t.off(i,this)},this)}this.onAdd(t);this.getAttribution&&t.attributionControl&&t.attributionControl.addAttribution(this.getAttribution());this.fire("add");t.fire("layeradd",{layer:this})}}});r.Map.include({addLayer:function(n){var t=r.stamp(n);return this._layers[t]?this:(this._layers[t]=n,n._mapToAdd=this,n.beforeAdd&&n.beforeAdd(this),this.whenReady(n._layerAdd,n),this)},removeLayer:function(n){var t=r.stamp(n);if(!this._layers[t])return this;if(this._loaded)n.onRemove(this);return n.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(n.getAttribution()),delete this._layers[t],this._loaded&&(this.fire("layerremove",{layer:n}),n.fire("remove")),n._map=n._mapToAdd=null,this},hasLayer:function(n){return!!n&&r.stamp(n)in this._layers},eachLayer:function(n,t){for(var i in this._layers)n.call(t,this._layers[i]);return this},_addLayers:function(n){n=n?r.Util.isArray(n)?n:[n]:[];for(var t=0,i=n.length;t<i;t++)this.addLayer(n[t])},_addZoomLimit:function(n){(isNaN(n.options.maxZoom)||!isNaN(n.options.minZoom))&&(this._zoomBoundLayers[r.stamp(n)]=n,this._updateZoomLevels())},_removeZoomLimit:function(n){var t=r.stamp(n);this._zoomBoundLayers[t]&&(delete this._zoomBoundLayers[t],this._updateZoomLevels())},_updateZoomLevels:function(){var n=Infinity,t=-Infinity,f=this._getZoomSpan(),u,r;for(u in this._zoomBoundLayers)r=this._zoomBoundLayers[u].options,n=r.minZoom===i?n:Math.min(n,r.minZoom),t=r.maxZoom===i?t:Math.max(t,r.maxZoom);this._layersMaxZoom=t===-Infinity?i:t;this._layersMinZoom=n===Infinity?i:n;f!==this._getZoomSpan()&&this.fire("zoomlevelschange");this.options.maxZoom===i&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom);this.options.minZoom===i&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});f="_leaflet_events";r.DomEvent={on:function(n,t,i,u){var e,f,o;if(typeof t=="object")for(e in t)this._on(n,e,t[e],i);else for(t=r.Util.splitWords(t),f=0,o=t.length;f<o;f++)this._on(n,t[f],i,u);return this},off:function(n,t,i,u){var e,f,o;if(typeof t=="object")for(e in t)this._off(n,e,t[e],i);else for(t=r.Util.splitWords(t),f=0,o=t.length;f<o;f++)this._off(n,t[f],i,u);return this},_on:function(t,i,u,e){var s=i+r.stamp(u)+(e?"_"+r.stamp(e):""),o,h;return t[f]&&t[f][s]?this:(o=function(i){return u.call(e||t,i||n.event)},h=o,r.Browser.pointer&&i.indexOf("touch")===0?this.addPointerListener(t,i,o,s):!r.Browser.touch||i!=="dblclick"||!this.addDoubleTapListener||r.Browser.pointer&&r.Browser.chrome?"addEventListener"in t?i==="mousewheel"?t.addEventListener("onwheel"in t?"wheel":"mousewheel",o,!1):i==="mouseenter"||i==="mouseleave"?(o=function(i){i=i||n.event;r.DomEvent._isExternalTarget(t,i)&&h(i)},t.addEventListener(i==="mouseenter"?"mouseover":"mouseout",o,!1)):(i==="click"&&r.Browser.android&&(o=function(n){return r.DomEvent._filterClick(n,h)}),t.addEventListener(i,o,!1)):"attachEvent"in t&&t.attachEvent("on"+i,o):this.addDoubleTapListener(t,o,s),t[f]=t[f]||{},t[f][s]=o,this)},_off:function(n,t,i,u){var e=t+r.stamp(i)+(u?"_"+r.stamp(u):""),o=n[f]&&n[f][e];return o?(r.Browser.pointer&&t.indexOf("touch")===0?this.removePointerListener(n,t,e):r.Browser.touch&&t==="dblclick"&&this.removeDoubleTapListener?this.removeDoubleTapListener(n,e):"removeEventListener"in n?t==="mousewheel"?n.removeEventListener("onwheel"in n?"wheel":"mousewheel",o,!1):n.removeEventListener(t==="mouseenter"?"mouseover":t==="mouseleave"?"mouseout":t,o,!1):"detachEvent"in n&&n.detachEvent("on"+t,o),n[f][e]=null,this):this},stopPropagation:function(n){return n.stopPropagation?n.stopPropagation():n.originalEvent?n.originalEvent._stopped=!0:n.cancelBubble=!0,r.DomEvent._skipped(n),this},disableScrollPropagation:function(n){return r.DomEvent.on(n,"mousewheel",r.DomEvent.stopPropagation)},disableClickPropagation:function(n){var t=r.DomEvent.stopPropagation;r.DomEvent.on(n,r.Draggable.START.join(" "),t);return r.DomEvent.on(n,{click:r.DomEvent._fakeStop,dblclick:t})},preventDefault:function(n){return n.preventDefault?n.preventDefault():n.returnValue=!1,this},stop:function(n){return r.DomEvent.preventDefault(n).stopPropagation(n)},getMousePosition:function(n,t){if(!t)return new r.Point(n.clientX,n.clientY);var i=t.getBoundingClientRect();return new r.Point(n.clientX-i.left-t.clientLeft,n.clientY-i.top-t.clientTop)},_wheelPxFactor:r.Browser.win&&r.Browser.chrome?2:r.Browser.gecko?n.devicePixelRatio:1,getWheelDelta:function(n){return r.Browser.edge?n.wheelDeltaY/2:n.deltaY&&n.deltaMode===0?-n.deltaY/r.DomEvent._wheelPxFactor:n.deltaY&&n.deltaMode===1?-n.deltaY*20:n.deltaY&&n.deltaMode===2?-n.deltaY*60:n.deltaX||n.deltaZ?0:n.wheelDelta?(n.wheelDeltaY||n.wheelDelta)/2:n.detail&&Math.abs(n.detail)<32765?-n.detail*20:n.detail?n.detail/-32765*60:0},_skipEvents:{},_fakeStop:function(n){r.DomEvent._skipEvents[n.type]=!0},_skipped:function(n){var t=this._skipEvents[n.type];return this._skipEvents[n.type]=!1,t},_isExternalTarget:function(n,t){var i=t.relatedTarget;if(!i)return!0;try{while(i&&i!==n)i=i.parentNode}catch(r){return!1}return i!==n},_filterClick:function(n,t){var u=n.timeStamp||n.originalEvent&&n.originalEvent.timeStamp,i=r.DomEvent._lastClick&&u-r.DomEvent._lastClick;if(i&&i>100&&i<500||n.target._simulatedClick&&!n._simulated){r.DomEvent.stop(n);return}r.DomEvent._lastClick=u;t(n)}};r.DomEvent.addListener=r.DomEvent.on;r.DomEvent.removeListener=r.DomEvent.off;r.PosAnimation=r.Evented.extend({run:function(n,t,i,u){this.stop();this._el=n;this._inProgress=!0;this._duration=i||.25;this._easeOutPower=1/Math.max(u||.5,.2);this._startPos=r.DomUtil.getPosition(n);this._offset=t.subtract(this._startPos);this._startTime=+new Date;this.fire("start");this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=r.Util.requestAnimFrame(this._animate,this);this._step()},_step:function(n){var t=+new Date-this._startTime,i=this._duration*1e3;t<i?this._runFrame(this._easeOut(t/i),n):(this._runFrame(1),this._complete())},_runFrame:function(n,t){var i=this._startPos.add(this._offset.multiplyBy(n));t&&i._round();r.DomUtil.setPosition(this._el,i);this.fire("step")},_complete:function(){r.Util.cancelAnimFrame(this._animId);this._inProgress=!1;this.fire("end")},_easeOut:function(n){return 1-Math.pow(1-n,this._easeOutPower)}});r.Projection.Mercator={R:6378137,R_MINOR:6356752.3142451793,bounds:r.bounds([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(n){var u=Math.PI/180,i=this.R,t=n.lat*u,f=this.R_MINOR/i,e=Math.sqrt(1-f*f),o=e*Math.sin(t),s=Math.tan(Math.PI/4-t/2)/Math.pow((1-o)/(1+o),e/2);return t=-i*Math.log(Math.max(s,1e-10)),new r.Point(n.lng*u*i,t)},unproject:function(n){for(var o=180/Math.PI,f=this.R,s=this.R_MINOR/f,h=Math.sqrt(1-s*s),c=Math.exp(-n.y/f),i=Math.PI/2-2*Math.atan(c),t,e=0,u=.1;e<15&&Math.abs(u)>1e-7;e++)t=h*Math.sin(i),t=Math.pow((1-t)/(1+t),h/2),u=Math.PI/2-2*Math.atan(c*t)-i,i+=u;return new r.LatLng(i*o,n.x*o/f)}};r.CRS.EPSG3395=r.extend({},r.CRS.Earth,{code:"EPSG:3395",projection:r.Projection.Mercator,transformation:function(){var n=.5/(Math.PI*r.Projection.Mercator.R);return new r.Transformation(n,.5,-n,.5)}()});r.GridLayer=r.Layer.extend({options:{tileSize:256,opacity:1,updateWhenIdle:r.Browser.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:i,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(n){r.setOptions(this,n)},onAdd:function(){this._initContainer();this._levels={};this._tiles={};this._resetView();this._update()},beforeAdd:function(n){n._addZoomLimit(this)},onRemove:function(n){this._removeAllTiles();r.DomUtil.remove(this._container);n._removeZoomLimit(this);this._container=null;this._tileZoom=null},bringToFront:function(){return this._map&&(r.DomUtil.toFront(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(r.DomUtil.toBack(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(n){return this.options.opacity=n,this._updateOpacity(),this},setZIndex:function(n){return this.options.zIndex=n,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var n={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=r.Util.throttle(this._onMoveEnd,this.options.updateInterval,this)),n.move=this._onMove),this._zoomAnimated&&(n.zoomanim=this._animateZoom),n},createTile:function(){return t.createElement("div")},getTileSize:function(){var n=this.options.tileSize;return n instanceof r.Point?n:new r.Point(n,n)},_updateZIndex:function(){this._container&&this.options.zIndex!==i&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(n){for(var r=this.getPane().children,i=-n(-Infinity,Infinity),u,t=0,f=r.length;t<f;t++)u=r[t].style.zIndex,r[t]!==this._container&&u&&(i=n(i,+u));isFinite(i)&&(this.options.zIndex=i+n(-1,1),this._updateZIndex())},_updateOpacity:function(){var f,n,t;if(this._map&&!r.Browser.ielt9){r.DomUtil.setOpacity(this._container,this.options.opacity);var e=+new Date,i=!1,u=!1;for(f in this._tiles)(n=this._tiles[f],n.current&&n.loaded)&&(t=Math.min(1,(e-n.loaded)/200),r.DomUtil.setOpacity(n.el,t),t<1?i=!0:(n.active&&(u=!0),n.active=!0));u&&!this._noPrune&&this._pruneTiles();i&&(r.Util.cancelAnimFrame(this._fadeFrame),this._fadeFrame=r.Util.requestAnimFrame(this._updateOpacity,this))}},_initContainer:function(){this._container||(this._container=r.DomUtil.create("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var u=this._tileZoom,e=this.options.maxZoom,t,n,f;if(u===i)return i;for(t in this._levels)this._levels[t].el.children.length||t===u?this._levels[t].el.style.zIndex=e-Math.abs(u-t):(r.DomUtil.remove(this._levels[t].el),this._removeTilesAtZoom(t),delete this._levels[t]);return n=this._levels[u],f=this._map,n||(n=this._levels[u]={},n.el=r.DomUtil.create("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=e,n.origin=f.project(f.unproject(f.getPixelOrigin()),u).round(),n.zoom=u,this._setZoomTransform(n,f.getCenter(),f.getZoom()),r.Util.falseFn(n.el.offsetWidth)),this._level=n,n},_pruneTiles:function(){var t,i,r,n;if(this._map){if(r=this._map.getZoom(),r>this.options.maxZoom||r<this.options.minZoom){this._removeAllTiles();return}for(t in this._tiles)i=this._tiles[t],i.retain=i.current;for(t in this._tiles)i=this._tiles[t],i.current&&!i.active&&(n=i.coords,this._retainParent(n.x,n.y,n.z,n.z-5)||this._retainChildren(n.x,n.y,n.z,n.z+2));for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}},_removeTilesAtZoom:function(n){for(var t in this._tiles)this._tiles[t].coords.z===n&&this._removeTile(t)},_removeAllTiles:function(){for(var n in this._tiles)this._removeTile(n)},_invalidateAll:function(){for(var n in this._levels)r.DomUtil.remove(this._levels[n].el),delete this._levels[n];this._removeAllTiles();this._tileZoom=null},_retainParent:function(n,t,i,u){var o=Math.floor(n/2),s=Math.floor(t/2),e=i-1,h=new r.Point(+o,+s),c,f;return(h.z=+e,c=this._tileCoordsToKey(h),f=this._tiles[c],f&&f.active)?(f.retain=!0,!0):(f&&f.loaded&&(f.retain=!0),e>u)?this._retainParent(o,s,e,u):!1},_retainChildren:function(n,t,i,u){for(var o,s,h,f,e=2*n;e<2*n+2;e++)for(o=2*t;o<2*t+2;o++){if(s=new r.Point(e,o),s.z=i+1,h=this._tileCoordsToKey(s),f=this._tiles[h],f&&f.active){f.retain=!0;continue}else f&&f.loaded&&(f.retain=!0);i+1<u&&this._retainChildren(e,o,i+1,u)}},_resetView:function(n){var t=n&&(n.pinch||n.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),t,t)},_animateZoom:function(n){this._setView(n.center,n.zoom,!0,n.noUpdate)},_setView:function(n,t,r,u){var f=Math.round(t),e;(this.options.maxZoom!==i&&f>this.options.maxZoom||this.options.minZoom!==i&&f<this.options.minZoom)&&(f=i);e=this.options.updateWhenZooming&&f!==this._tileZoom;(!u||e)&&(this._tileZoom=f,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),f!==i&&this._update(n),r||this._pruneTiles(),this._noPrune=!!r);this._setZoomTransforms(n,t)},_setZoomTransforms:function(n,t){for(var i in this._levels)this._setZoomTransform(this._levels[i],n,t)},_setZoomTransform:function(n,t,i){var u=this._map.getZoomScale(i,n.zoom),f=n.origin.multiplyBy(u).subtract(this._map._getNewPixelOrigin(t,i)).round();r.Browser.any3d?r.DomUtil.setTransform(n.el,f,u):r.DomUtil.setPosition(n.el,f)},_resetGrid:function(){var t=this._map,n=t.options.crs,i=this._tileSize=this.getTileSize(),r=this._tileZoom,u=this._map.getPixelWorldBounds(this._tileZoom);u&&(this._globalTileRange=this._pxBoundsToTileRange(u));this._wrapX=n.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,n.wrapLng[0]],r).x/i.x),Math.ceil(t.project([0,n.wrapLng[1]],r).x/i.y)];this._wrapY=n.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([n.wrapLat[0],0],r).y/i.x),Math.ceil(t.project([n.wrapLat[1],0],r).y/i.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(n){var t=this._map,f=t._animatingZoom?Math.max(t._animateToZoom,t.getZoom()):t.getZoom(),e=t.getZoomScale(f,this._tileZoom),i=t.project(n,this._tileZoom).floor(),u=t.getSize().divideBy(e*2);return new r.Bounds(i.subtract(u),i.add(u))},_update:function(n){var l=this._map,a,v,h,c,u,o,y,p;if(l&&(a=l.getZoom(),n===i&&(n=l.getCenter()),this._tileZoom!==i)){var b=this._getTiledPixelBounds(n),f=this._pxBoundsToTileRange(b),w=f.getCenter(),e=[],s=this.options.keepBuffer,k=new r.Bounds(f.getBottomLeft().subtract([s,-s]),f.getTopRight().add([s,-s]));for(v in this._tiles)h=this._tiles[v].coords,h.z===this._tileZoom&&k.contains(r.point(h.x,h.y))||(this._tiles[v].current=!1);if(Math.abs(a-this._tileZoom)>1){this._setView(n,a);return}for(c=f.min.y;c<=f.max.y;c++)for(u=f.min.x;u<=f.max.x;u++)(o=new r.Point(u,c),o.z=this._tileZoom,this._isValidTile(o))&&(y=this._tiles[this._tileCoordsToKey(o)],y?y.current=!0:e.push(o));if(e.sort(function(n,t){return n.distanceTo(w)-t.distanceTo(w)}),e.length!==0){for(this._loading||(this._loading=!0,this.fire("loading")),p=t.createDocumentFragment(),u=0;u<e.length;u++)this._addTile(e[u],p);this._level.el.appendChild(p)}}},_isValidTile:function(n){var i=this._map.options.crs,t,u;return!i.infinite&&(t=this._globalTileRange,!i.wrapLng&&(n.x<t.min.x||n.x>t.max.x)||!i.wrapLat&&(n.y<t.min.y||n.y>t.max.y))?!1:this.options.bounds?(u=this._tileCoordsToBounds(n),r.latLngBounds(this.options.bounds).overlaps(u)):!0},_keyToBounds:function(n){return this._tileCoordsToBounds(this._keyToTileCoords(n))},_tileCoordsToBounds:function(n){var t=this._map,i=this.getTileSize(),u=n.scaleBy(i),e=u.add(i),o=t.unproject(u,n.z),s=t.unproject(e,n.z),f=new r.LatLngBounds(o,s);return this.options.noWrap||t.wrapLatLngBounds(f),f},_tileCoordsToKey:function(n){return n.x+":"+n.y+":"+n.z},_keyToTileCoords:function(n){var t=n.split(":"),i=new r.Point(+t[0],+t[1]);return i.z=+t[2],i},_removeTile:function(n){var t=this._tiles[n];t&&(r.DomUtil.remove(t.el),delete this._tiles[n],this.fire("tileunload",{tile:t.el,coords:this._keyToTileCoords(n)}))},_initTile:function(n){r.DomUtil.addClass(n,"leaflet-tile");var t=this.getTileSize();n.style.width=t.x+"px";n.style.height=t.y+"px";n.onselectstart=r.Util.falseFn;n.onmousemove=r.Util.falseFn;r.Browser.ielt9&&this.options.opacity<1&&r.DomUtil.setOpacity(n,this.options.opacity);r.Browser.android&&!r.Browser.android23&&(n.style.WebkitBackfaceVisibility="hidden")},_addTile:function(n,t){var u=this._getTilePos(n),f=this._tileCoordsToKey(n),i=this.createTile(this._wrapCoords(n),r.bind(this._tileReady,this,n));this._initTile(i);this.createTile.length<2&&r.Util.requestAnimFrame(r.bind(this._tileReady,this,n,null,i));r.DomUtil.setPosition(i,u);this._tiles[f]={el:i,coords:n,current:!0};t.appendChild(i);this.fire("tileloadstart",{tile:i,coords:n})},_tileReady:function(n,t,i){if(this._map){t&&this.fire("tileerror",{error:t,tile:i,coords:n});var u=this._tileCoordsToKey(n);(i=this._tiles[u],i)&&(i.loaded=+new Date,this._map._fadeAnimated?(r.DomUtil.setOpacity(i.el,0),r.Util.cancelAnimFrame(this._fadeFrame),this._fadeFrame=r.Util.requestAnimFrame(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),t||(r.DomUtil.addClass(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:n})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),r.Browser.ielt9||!this._map._fadeAnimated?r.Util.requestAnimFrame(this._pruneTiles,this):setTimeout(r.bind(this._pruneTiles,this),250)))}},_getTilePos:function(n){return n.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(n){var t=new r.Point(this._wrapX?r.Util.wrapNum(n.x,this._wrapX):n.x,this._wrapY?r.Util.wrapNum(n.y,this._wrapY):n.y);return t.z=n.z,t},_pxBoundsToTileRange:function(n){var t=this.getTileSize();return new r.Bounds(n.min.unscaleBy(t).floor(),n.max.unscaleBy(t).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var n in this._tiles)if(!this._tiles[n].loaded)return!1;return!0}});r.gridLayer=function(n){return new r.GridLayer(n)};r.TileLayer=r.GridLayer.extend({options:{minZoom:0,maxZoom:18,maxNativeZoom:null,minNativeZoom:null,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(n,t){if(this._url=n,t=r.setOptions(this,t),t.detectRetina&&r.Browser.retina&&t.maxZoom>0&&(t.tileSize=Math.floor(t.tileSize/2),t.zoomReverse?(t.zoomOffset--,t.minZoom++):(t.zoomOffset++,t.maxZoom--),t.minZoom=Math.max(0,t.minZoom)),typeof t.subdomains=="string"&&(t.subdomains=t.subdomains.split("")),!r.Browser.android)this.on("tileunload",this._onTileRemove)},setUrl:function(n,t){return this._url=n,t||this.redraw(),this},createTile:function(n,i){var u=t.createElement("img");r.DomEvent.on(u,"load",r.bind(this._tileOnLoad,this,i,u));r.DomEvent.on(u,"error",r.bind(this._tileOnError,this,i,u));return this.options.crossOrigin&&(u.crossOrigin=""),u.alt="",u.setAttribute("role","presentation"),u.src=this.getTileUrl(n),u},getTileUrl:function(n){var t={r:r.Browser.retina?"@2x":"",s:this._getSubdomain(n),x:n.x,y:n.y,z:this._getZoomForUrl()},i;return this._map&&!this._map.options.crs.infinite&&(i=this._globalTileRange.max.y-n.y,this.options.tms&&(t.y=i),t["-y"]=i),r.Util.template(this._url,r.extend(t,this.options))},_tileOnLoad:function(n,t){r.Browser.ielt9?setTimeout(r.bind(n,this,null,t),0):n(null,t)},_tileOnError:function(n,t,i){var r=this.options.errorTileUrl;r&&t.src!==r&&(t.src=r);n(i,t)},getTileSize:function(){var f=this._map,t=r.GridLayer.prototype.getTileSize.call(this),n=this._tileZoom+this.options.zoomOffset,i=this.options.minNativeZoom,u=this.options.maxNativeZoom;return i!==null&&n<i?t.divideBy(f.getZoomScale(i,n)).round():u!==null&&n>u?t.divideBy(f.getZoomScale(u,n)).round():t},_onTileRemove:function(n){n.tile.onload=null},_getZoomForUrl:function(){var n=this._tileZoom,r=this.options.maxZoom,u=this.options.zoomReverse,f=this.options.zoomOffset,t=this.options.minNativeZoom,i=this.options.maxNativeZoom;return(u&&(n=r-n),n+=f,t!==null&&n<t)?t:i!==null&&n>i?i:n},_getSubdomain:function(n){var t=Math.abs(n.x+n.y)%this.options.subdomains.length;return this.options.subdomains[t]},_abortLoading:function(){var t,n;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&(n=this._tiles[t].el,n.onload=r.Util.falseFn,n.onerror=r.Util.falseFn,n.complete||(n.src=r.Util.emptyImageUrl,r.DomUtil.remove(n)))}});r.tileLayer=function(n,t){return new r.TileLayer(n,t)};r.TileLayer.WMS=r.TileLayer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(n,t){var i,u;this._url=n;i=r.extend({},this.defaultWmsParams);for(u in t)u in this.options||(i[u]=t[u]);t=r.setOptions(this,t);i.width=i.height=t.tileSize*(t.detectRetina&&r.Browser.retina?2:1);this.wmsParams=i},onAdd:function(n){this._crs=this.options.crs||n.options.crs;this._wmsVersion=parseFloat(this.wmsParams.version);var t=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[t]=this._crs.code;r.TileLayer.prototype.onAdd.call(this,n)},getTileUrl:function(n){var u=this._tileCoordsToBounds(n),t=this._crs.project(u.getNorthWest()),i=this._crs.project(u.getSouthEast()),e=(this._wmsVersion>=1.3&&this._crs===r.CRS.EPSG4326?[i.y,t.x,t.y,i.x]:[t.x,i.y,i.x,t.y]).join(","),f=r.TileLayer.prototype.getTileUrl.call(this,n);return f+r.Util.getParamString(this.wmsParams,f,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+e},setParams:function(n,t){return r.extend(this.wmsParams,n),t||this.redraw(),this}});r.tileLayer.wms=function(n,t){return new r.TileLayer.WMS(n,t)};r.ImageOverlay=r.Layer.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1},initialize:function(n,t,i){this._url=n;this._bounds=r.latLngBounds(t);r.setOptions(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity());this.options.interactive&&(r.DomUtil.addClass(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image));this.getPane().appendChild(this._image);this._reset()},onRemove:function(){r.DomUtil.remove(this._image);this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(n){return this.options.opacity=n,this._image&&this._updateOpacity(),this},setStyle:function(n){return n.opacity&&this.setOpacity(n.opacity),this},bringToFront:function(){return this._map&&r.DomUtil.toFront(this._image),this},bringToBack:function(){return this._map&&r.DomUtil.toBack(this._image),this},setUrl:function(n){return this._url=n,this._image&&(this._image.src=n),this},setBounds:function(n){return this._bounds=n,this._map&&this._reset(),this},getEvents:function(){var n={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(n.zoomanim=this._animateZoom),n},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var n=this._image=r.DomUtil.create("img","leaflet-image-layer "+(this._zoomAnimated?"leaflet-zoom-animated":""));n.onselectstart=r.Util.falseFn;n.onmousemove=r.Util.falseFn;n.onload=r.bind(this.fire,this,"load");this.options.crossOrigin&&(n.crossOrigin="");n.src=this._url;n.alt=this.options.alt},_animateZoom:function(n){var t=this._map.getZoomScale(n.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,n.zoom,n.center).min;r.DomUtil.setTransform(this._image,i,t)},_reset:function(){var n=this._image,t=new r.Bounds(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=t.getSize();r.DomUtil.setPosition(n,t.min);n.style.width=i.x+"px";n.style.height=i.y+"px"},_updateOpacity:function(){r.DomUtil.setOpacity(this._image,this.options.opacity)}});r.imageOverlay=function(n,t,i){return new r.ImageOverlay(n,t,i)};r.Icon=r.Class.extend({initialize:function(n){r.setOptions(this,n)},createIcon:function(n){return this._createIcon("icon",n)},createShadow:function(n){return this._createIcon("shadow",n)},_createIcon:function(n,t){var r=this._getIconUrl(n),i;if(!r){if(n==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}return i=this._createImg(r,t&&t.tagName==="IMG"?t:null),this._setIconStyles(i,n),i},_setIconStyles:function(n,t){var f=this.options,u=f[t+"Size"],i,e;typeof u=="number"&&(u=[u,u]);i=r.point(u);e=r.point(t==="shadow"&&f.shadowAnchor||f.iconAnchor||i&&i.divideBy(2,!0));n.className="leaflet-marker-"+t+" "+(f.className||"");e&&(n.style.marginLeft=-e.x+"px",n.style.marginTop=-e.y+"px");i&&(n.style.width=i.x+"px",n.style.height=i.y+"px")},_createImg:function(n,i){return i=i||t.createElement("img"),i.src=n,i},_getIconUrl:function(n){return r.Browser.retina&&this.options[n+"RetinaUrl"]||this.options[n+"Url"]}});r.icon=function(n){return new r.Icon(n)};r.Icon.Default=r.Icon.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(n){return r.Icon.Default.imagePath||(r.Icon.Default.imagePath=this._detectIconPath()),(this.options.imagePath||r.Icon.Default.imagePath)+r.Icon.prototype._getIconUrl.call(this,n)},_detectIconPath:function(){var n=r.DomUtil.create("div","leaflet-default-icon-path",t.body),i=r.DomUtil.getStyle(n,"background-image")||r.DomUtil.getStyle(n,"backgroundImage");return t.body.removeChild(n),i.indexOf("url")===0?i.replace(/^url\([\"\']?/,"").replace(/marker-icon\.png[\"\']?\)$/,""):""}});r.Marker=r.Layer.extend({options:{icon:new r.Icon.Default,interactive:!0,draggable:!1,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",nonBubblingEvents:["click","dblclick","mouseover","mouseout","contextmenu"]},initialize:function(n,t){r.setOptions(this,t);this._latlng=r.latLng(n)},onAdd:function(n){if(this._zoomAnimated=this._zoomAnimated&&n.options.markerZoomAnimation,this._zoomAnimated)n.on("zoomanim",this._animateZoom,this);this._initIcon();this.update()},onRemove:function(n){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks());this._zoomAnimated&&n.off("zoomanim",this._animateZoom,this);this._removeIcon();this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(n){var t=this._latlng;return this._latlng=r.latLng(n),this.update(),this.fire("move",{oldLatLng:t,latlng:this._latlng})},setZIndexOffset:function(n){return this.options.zIndexOffset=n,this.update()},setIcon:function(n){return this.options.icon=n,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon){var n=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(n)}return this},_initIcon:function(){var n=this.options,f="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),i=n.icon.createIcon(this._icon),e=!1,t,u;if(i!==this._icon&&(this._icon&&this._removeIcon(),e=!0,n.title&&(i.title=n.title),n.alt&&(i.alt=n.alt)),r.DomUtil.addClass(i,f),n.keyboard&&(i.tabIndex="0"),this._icon=i,n.riseOnHover)this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});t=n.icon.createShadow(this._shadow);u=!1;t!==this._shadow&&(this._removeShadow(),u=!0);t&&(r.DomUtil.addClass(t,f),t.alt="");this._shadow=t;n.opacity<1&&this._updateOpacity();e&&this.getPane().appendChild(this._icon);this._initInteraction();t&&u&&this.getPane("shadowPane").appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex});r.DomUtil.remove(this._icon);this.removeInteractiveTarget(this._icon);this._icon=null},_removeShadow:function(){this._shadow&&r.DomUtil.remove(this._shadow);this._shadow=null},_setPos:function(n){r.DomUtil.setPosition(this._icon,n);this._shadow&&r.DomUtil.setPosition(this._shadow,n);this._zIndex=n.y+this.options.zIndexOffset;this._resetZIndex()},_updateZIndex:function(n){this._icon.style.zIndex=this._zIndex+n},_animateZoom:function(n){var t=this._map._latLngToNewLayerPoint(this._latlng,n.zoom,n.center).round();this._setPos(t)},_initInteraction:function(){if(this.options.interactive&&(r.DomUtil.addClass(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),r.Handler.MarkerDrag)){var n=this.options.draggable;this.dragging&&(n=this.dragging.enabled(),this.dragging.disable());this.dragging=new r.Handler.MarkerDrag(this);n&&this.dragging.enable()}},setOpacity:function(n){return this.options.opacity=n,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var n=this.options.opacity;r.DomUtil.setOpacity(this._icon,n);this._shadow&&r.DomUtil.setOpacity(this._shadow,n)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor||[0,0]},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor||[0,0]}});r.marker=function(n,t){return new r.Marker(n,t)};r.DivIcon=r.Icon.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(n){var i=n&&n.tagName==="DIV"?n:t.createElement("div"),u=this.options,f;return i.innerHTML=u.html!==!1?u.html:"",u.bgPos&&(f=r.point(u.bgPos),i.style.backgroundPosition=-f.x+"px "+-f.y+"px"),this._setIconStyles(i,"icon"),i},createShadow:function(){return null}});r.divIcon=function(n){return new r.DivIcon(n)};r.DivOverlay=r.Layer.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(n,t){r.setOptions(this,n);this._source=t},onAdd:function(n){this._zoomAnimated=n._zoomAnimated;this._container||this._initLayout();n._fadeAnimated&&r.DomUtil.setOpacity(this._container,0);clearTimeout(this._removeTimeout);this.getPane().appendChild(this._container);this.update();n._fadeAnimated&&r.DomUtil.setOpacity(this._container,1);this.bringToFront()},onRemove:function(n){n._fadeAnimated?(r.DomUtil.setOpacity(this._container,0),this._removeTimeout=setTimeout(r.bind(r.DomUtil.remove,r.DomUtil,this._container),200)):r.DomUtil.remove(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(n){return this._latlng=r.latLng(n),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(n){return this._content=n,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var n={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(n.zoomanim=this._animateZoom),n},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&r.DomUtil.toFront(this._container),this},bringToBack:function(){return this._map&&r.DomUtil.toBack(this._container),this},_updateContent:function(){if(this._content){var n=this._contentNode,t=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof t=="string")n.innerHTML=t;else{while(n.hasChildNodes())n.removeChild(n.firstChild);n.appendChild(t)}this.fire("contentupdate")}},_updatePosition:function(){var u,f;if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),n=r.point(this.options.offset),i=this._getAnchor();this._zoomAnimated?r.DomUtil.setPosition(this._container,t.add(i)):n=n.add(t).add(i);u=this._containerBottom=-n.y;f=this._containerLeft=-Math.round(this._containerWidth/2)+n.x;this._container.style.bottom=u+"px";this._container.style.left=f+"px"}},_getAnchor:function(){return[0,0]}});r.Popup=r.DivOverlay.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,className:""},openOn:function(n){return n.openPopup(this),this},onAdd:function(n){if(r.DivOverlay.prototype.onAdd.call(this,n),n.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),!(this._source instanceof r.Path)))this._source.on("preclick",r.DomEvent.stopPropagation)},onRemove:function(n){r.DivOverlay.prototype.onRemove.call(this,n);n.fire("popupclose",{popup:this});this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof r.Path||this._source.off("preclick",r.DomEvent.stopPropagation))},getEvents:function(){var n=r.DivOverlay.prototype.getEvents.call(this);return("closeOnClick"in this.options?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(n.preclick=this._close),this.options.keepInView&&(n.moveend=this._adjustPan),n},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var n="leaflet-popup",u=this._container=r.DomUtil.create("div",n+" "+(this.options.className||"")+" leaflet-zoom-animated"),t,i;if(this.options.closeButton){t=this._closeButton=r.DomUtil.create("a",n+"-close-button",u);t.href="#close";t.innerHTML="&#215;";r.DomEvent.on(t,"click",this._onCloseButtonClick,this)}i=this._wrapper=r.DomUtil.create("div",n+"-content-wrapper",u);this._contentNode=r.DomUtil.create("div",n+"-content",i);r.DomEvent.disableClickPropagation(i).disableScrollPropagation(this._contentNode).on(i,"contextmenu",r.DomEvent.stopPropagation);this._tipContainer=r.DomUtil.create("div",n+"-tip-container",u);this._tip=r.DomUtil.create("div",n+"-tip",this._tipContainer)},_updateLayout:function(){var i=this._contentNode,n=i.style,t;n.width="";n.whiteSpace="nowrap";t=i.offsetWidth;t=Math.min(t,this.options.maxWidth);t=Math.max(t,this.options.minWidth);n.width=t+1+"px";n.whiteSpace="";n.height="";var e=i.offsetHeight,u=this.options.maxHeight,f="leaflet-popup-scrolled";u&&e>u?(n.height=u+"px",r.DomUtil.addClass(i,f)):r.DomUtil.removeClass(i,f);this._containerWidth=this._container.offsetWidth},_animateZoom:function(n){var t=this._map._latLngToNewLayerPoint(this._latlng,n.zoom,n.center),i=this._getAnchor();r.DomUtil.setPosition(this._container,t.add(i))},_adjustPan:function(){if(this.options.autoPan&&(!this._map._panAnim||!this._map._panAnim._inProgress)){var o=this._map,a=parseInt(r.DomUtil.getStyle(this._container,"marginBottom"),10)||0,s=this._container.offsetHeight+a,h=this._containerWidth,c=new r.Point(this._containerLeft,-s-this._containerBottom);c._add(r.DomUtil.getPosition(this._container));var n=o.layerPointToContainerPoint(c),l=r.point(this.options.autoPanPadding),u=r.point(this.options.autoPanPaddingTopLeft||l),f=r.point(this.options.autoPanPaddingBottomRight||l),e=o.getSize(),t=0,i=0;n.x+h+f.x>e.x&&(t=n.x+h-e.x+f.x);n.x-t-u.x<0&&(t=n.x-u.x);n.y+s+f.y>e.y&&(i=n.y+s-e.y+f.y);n.y-i-u.y<0&&(i=n.y-u.y);(t||i)&&o.fire("autopanstart").panBy([t,i])}},_onCloseButtonClick:function(n){this._close();r.DomEvent.stop(n)},_getAnchor:function(){return r.point(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});r.popup=function(n,t){return new r.Popup(n,t)};r.Map.mergeOptions({closePopupOnClick:!0});r.Map.include({openPopup:function(n,t,i){return(n instanceof r.Popup||(n=new r.Popup(i).setContent(n)),t&&n.setLatLng(t),this.hasLayer(n))?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=n,this.addLayer(n))},closePopup:function(n){return n&&n!==this._popup||(n=this._popup,this._popup=null),n&&this.removeLayer(n),this}});r.Layer.include({bindPopup:function(n,t){if(n instanceof r.Popup?(r.setOptions(n,t),this._popup=n,n._source=this):((!this._popup||t)&&(this._popup=new r.Popup(t,this)),this._popup.setContent(n)),!this._popupHandlersAdded){this.on({click:this._openPopup,remove:this.closePopup,move:this._movePopup});this._popupHandlersAdded=!0}return this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(n,t){if(n instanceof r.Layer||(t=n,n=this),n instanceof r.FeatureGroup)for(var i in this._layers){n=this._layers[i];break}return t||(t=n.getCenter?n.getCenter():n.getLatLng()),this._popup&&this._map&&(this._popup._source=n,this._popup.update(),this._map.openPopup(this._popup,t)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(n){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(n)),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(n){return this._popup&&this._popup.setContent(n),this},getPopup:function(){return this._popup},_openPopup:function(n){var t=n.layer||n.target;if(this._popup&&this._map){if(r.DomEvent.stop(n),t instanceof r.Path){this.openPopup(n.layer||n.target,n.latlng);return}this._map.hasLayer(this._popup)&&this._popup._source===t?this.closePopup():this.openPopup(t,n.latlng)}},_movePopup:function(n){this._popup.setLatLng(n.latlng)}});r.Tooltip=r.DivOverlay.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(n){r.DivOverlay.prototype.onAdd.call(this,n);this.setOpacity(this.options.opacity);n.fire("tooltipopen",{tooltip:this});this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(n){r.DivOverlay.prototype.onRemove.call(this,n);n.fire("tooltipclose",{tooltip:this});this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var n=r.DivOverlay.prototype.getEvents.call(this);return r.Browser.touch&&!this.options.permanent&&(n.preclick=this._close),n},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var n="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=r.DomUtil.create("div",n)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(n){var s=this._map,i=this._container,h=s.latLngToContainerPoint(s.getCenter()),c=s.layerPointToContainerPoint(n),u=this.options.direction,e=i.offsetWidth,o=i.offsetHeight,t=r.point(this.options.offset),f=this._getAnchor();u==="top"?n=n.add(r.point(-e/2+t.x,-o+t.y+f.y,!0)):u==="bottom"?n=n.subtract(r.point(e/2-t.x,-t.y,!0)):u==="center"?n=n.subtract(r.point(e/2+t.x,o/2-f.y+t.y,!0)):u==="right"||u==="auto"&&c.x<h.x?(u="right",n=n.add(r.point(t.x+f.x,f.y-o/2+t.y,!0))):(u="left",n=n.subtract(r.point(e+f.x-t.x,o/2-f.y-t.y,!0)));r.DomUtil.removeClass(i,"leaflet-tooltip-right");r.DomUtil.removeClass(i,"leaflet-tooltip-left");r.DomUtil.removeClass(i,"leaflet-tooltip-top");r.DomUtil.removeClass(i,"leaflet-tooltip-bottom");r.DomUtil.addClass(i,"leaflet-tooltip-"+u);r.DomUtil.setPosition(i,n)},_updatePosition:function(){var n=this._map.latLngToLayerPoint(this._latlng);this._setPosition(n)},setOpacity:function(n){this.options.opacity=n;this._container&&r.DomUtil.setOpacity(this._container,n)},_animateZoom:function(n){var t=this._map._latLngToNewLayerPoint(this._latlng,n.zoom,n.center);this._setPosition(t)},_getAnchor:function(){return r.point(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});r.tooltip=function(n,t){return new r.Tooltip(n,t)};r.Map.include({openTooltip:function(n,t,i){return(n instanceof r.Tooltip||(n=new r.Tooltip(i).setContent(n)),t&&n.setLatLng(t),this.hasLayer(n))?this:this.addLayer(n)},closeTooltip:function(n){return n&&this.removeLayer(n),this}});r.Layer.include({bindTooltip:function(n,t){return n instanceof r.Tooltip?(r.setOptions(n,t),this._tooltip=n,n._source=this):((!this._tooltip||t)&&(this._tooltip=r.tooltip(t,this)),this._tooltip.setContent(n)),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(n){if(n||!this._tooltipHandlersAdded){var i=n?"off":"on",t={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?t.add=this._openTooltip:(t.mouseover=this._openTooltip,t.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(t.mousemove=this._moveTooltip),r.Browser.touch&&(t.click=this._openTooltip));this[i](t);this._tooltipHandlersAdded=!n}},openTooltip:function(n,t){if(n instanceof r.Layer||(t=n,n=this),n instanceof r.FeatureGroup)for(var i in this._layers){n=this._layers[i];break}return t||(t=n.getCenter?n.getCenter():n.getLatLng()),this._tooltip&&this._map&&(this._tooltip._source=n,this._tooltip.update(),this._map.openTooltip(this._tooltip,t),this._tooltip.options.interactive&&this._tooltip._container&&(r.DomUtil.addClass(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(r.DomUtil.removeClass(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(n){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(n)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(n){return this._tooltip&&this._tooltip.setContent(n),this},getTooltip:function(){return this._tooltip},_openTooltip:function(n){var t=n.layer||n.target;this._tooltip&&this._map&&this.openTooltip(t,this._tooltip.options.sticky?n.latlng:i)},_moveTooltip:function(n){var t=n.latlng,i,r;this._tooltip.options.sticky&&n.originalEvent&&(i=this._map.mouseEventToContainerPoint(n.originalEvent),r=this._map.containerPointToLayerPoint(i),t=this._map.layerPointToLatLng(r));this._tooltip.setLatLng(t)}});r.LayerGroup=r.Layer.extend({initialize:function(n){this._layers={};var t,i;if(n)for(t=0,i=n.length;t<i;t++)this.addLayer(n[t])},addLayer:function(n){var t=this.getLayerId(n);return this._layers[t]=n,this._map&&this._map.addLayer(n),this},removeLayer:function(n){var t=n in this._layers?n:this.getLayerId(n);return this._map&&this._layers[t]&&this._map.removeLayer(this._layers[t]),delete this._layers[t],this},hasLayer:function(n){return!!n&&(n in this._layers||this.getLayerId(n)in this._layers)},clearLayers:function(){for(var n in this._layers)this.removeLayer(this._layers[n]);return this},invoke:function(n){var r=Array.prototype.slice.call(arguments,1),i,t;for(i in this._layers)t=this._layers[i],t[n]&&t[n].apply(t,r);return this},onAdd:function(n){for(var t in this._layers)n.addLayer(this._layers[t])},onRemove:function(n){for(var t in this._layers)n.removeLayer(this._layers[t])},eachLayer:function(n,t){for(var i in this._layers)n.call(t,this._layers[i]);return this},getLayer:function(n){return this._layers[n]},getLayers:function(){var n=[],t;for(t in this._layers)n.push(this._layers[t]);return n},setZIndex:function(n){return this.invoke("setZIndex",n)},getLayerId:function(n){return r.stamp(n)}});r.layerGroup=function(n){return new r.LayerGroup(n)};r.FeatureGroup=r.LayerGroup.extend({addLayer:function(n){return this.hasLayer(n)?this:(n.addEventParent(this),r.LayerGroup.prototype.addLayer.call(this,n),this.fire("layeradd",{layer:n}))},removeLayer:function(n){return this.hasLayer(n)?(n in this._layers&&(n=this._layers[n]),n.removeEventParent(this),r.LayerGroup.prototype.removeLayer.call(this,n),this.fire("layerremove",{layer:n})):this},setStyle:function(n){return this.invoke("setStyle",n)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new r.LatLngBounds,i,n;for(i in this._layers)n=this._layers[i],t.extend(n.getBounds?n.getBounds():n.getLatLng());return t}});r.featureGroup=function(n){return new r.FeatureGroup(n)};r.Renderer=r.Layer.extend({options:{padding:.1},initialize:function(n){r.setOptions(this,n);r.stamp(this);this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&r.DomUtil.addClass(this._container,"leaflet-zoom-animated"));this.getPane().appendChild(this._container);this._update();this.on("update",this._updatePaths,this)},onRemove:function(){r.DomUtil.remove(this._container);this.off("update",this._updatePaths,this)},getEvents:function(){var n={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(n.zoomanim=this._onAnimZoom),n},_onAnimZoom:function(n){this._updateTransform(n.center,n.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(n,t){var i=this._map.getZoomScale(t,this._zoom),e=r.DomUtil.getPosition(this._container),u=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,t),s=this._map.project(n,t),h=s.subtract(o),f=u.multiplyBy(-i).add(e).add(u).subtract(h);r.Browser.any3d?r.DomUtil.setTransform(this._container,f,i):r.DomUtil.setPosition(this._container,f)},_reset:function(){this._update();this._updateTransform(this._center,this._zoom);for(var n in this._layers)this._layers[n]._reset()},_onZoomEnd:function(){for(var n in this._layers)this._layers[n]._project()},_updatePaths:function(){for(var n in this._layers)this._layers[n]._update()},_update:function(){var n=this.options.padding,t=this._map.getSize(),i=this._map.containerPointToLayerPoint(t.multiplyBy(-n)).round();this._bounds=new r.Bounds(i,i.add(t.multiplyBy(1+n*2)).round());this._center=this._map.getCenter();this._zoom=this._map.getZoom()}});r.Map.include({getRenderer:function(n){var t=n.options.renderer||this._getPaneRenderer(n.options.pane)||this.options.renderer||this._renderer;return t||(t=this._renderer=this.options.preferCanvas&&r.canvas()||r.svg()),this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(n){if(n==="overlayPane"||n===i)return!1;var t=this._paneRenderers[n];return t===i&&(t=r.SVG&&r.svg({pane:n})||r.Canvas&&r.canvas({pane:n}),this._paneRenderers[n]=t),t}});r.Path=r.Layer.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0},beforeAdd:function(n){this._renderer=n.getRenderer(this)},onAdd:function(){this._renderer._initPath(this);this._reset();this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(n){return r.setOptions(this,n),this._renderer&&this._renderer._updateStyle(this),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project();this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(r.Browser.touch?10:0)}});r.LineUtil={simplify:function(n,t){if(!t||!n.length)return n.slice();var i=t*t;return n=this._reducePoints(n,i),this._simplifyDP(n,i)},pointToSegmentDistance:function(n,t,i){return Math.sqrt(this._sqClosestPointOnSegment(n,t,i,!0))},closestPointOnSegment:function(n,t,i){return this._sqClosestPointOnSegment(n,t,i)},_simplifyDP:function(n,t){var u=n.length,o=typeof Uint8Array!=i+""?Uint8Array:Array,f=new o(u),r,e;for(f[0]=f[u-1]=1,this._simplifyDPStep(n,f,t,0,u-1),e=[],r=0;r<u;r++)f[r]&&e.push(n[r]);return e},_simplifyDPStep:function(n,t,i,r,u){for(var o=0,e,s,f=r+1;f<=u-1;f++)s=this._sqClosestPointOnSegment(n[f],n[r],n[u],!0),s>o&&(e=f,o=s);o>i&&(t[e]=1,this._simplifyDPStep(n,t,i,r,e),this._simplifyDPStep(n,t,i,e,u))},_reducePoints:function(n,t){for(var r=[n[0]],i=1,u=0,f=n.length;i<f;i++)this._sqDist(n[i],n[u])>t&&(r.push(n[i]),u=i);return u<f-1&&r.push(n[f-1]),r},clipSegment:function(n,t,i,r,u){var f=r?this._lastCode:this._getBitCode(n,i),e=this._getBitCode(t,i),s,o,h;for(this._lastCode=e;;){if(!(f|e))return[n,t];if(f&e)return!1;s=f||e;o=this._getEdgeIntersection(n,t,s,i,u);h=this._getBitCode(o,i);s===f?(n=o,f=h):(t=o,e=h)}},_getEdgeIntersection:function(n,t,i,u,f){var s=t.x-n.x,h=t.y-n.y,c=u.min,l=u.max,e,o;return i&8?(e=n.x+s*(l.y-n.y)/h,o=l.y):i&4?(e=n.x+s*(c.y-n.y)/h,o=c.y):i&2?(e=l.x,o=n.y+h*(l.x-n.x)/s):i&1&&(e=c.x,o=n.y+h*(c.x-n.x)/s),new r.Point(e,o,f)},_getBitCode:function(n,t){var i=0;return n.x<t.min.x?i|=1:n.x>t.max.x&&(i|=2),n.y<t.min.y?i|=4:n.y>t.max.y&&(i|=8),i},_sqDist:function(n,t){var i=t.x-n.x,r=t.y-n.y;return i*i+r*r},_sqClosestPointOnSegment:function(n,t,i,u){var o=t.x,s=t.y,f=i.x-o,e=i.y-s,c=f*f+e*e,h;return c>0&&(h=((n.x-o)*f+(n.y-s)*e)/c,h>1?(o=i.x,s=i.y):h>0&&(o+=f*h,s+=e*h)),f=n.x-o,e=n.y-s,u?f*f+e*e:new r.Point(o,s)}};r.Polyline=r.Path.extend({options:{smoothFactor:1,noClip:!1},initialize:function(n,t){r.setOptions(this,t);this._setLatLngs(n)},getLatLngs:function(){return this._latlngs},setLatLngs:function(n){return this._setLatLngs(n),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(n){for(var e=Infinity,i=null,c=r.LineUtil._sqClosestPointOnSegment,o,s,f,t,a,h,u=0,l=this._parts.length;u<l;u++)for(f=this._parts[u],t=1,a=f.length;t<a;t++)o=f[t-1],s=f[t],h=c(n,o,s,!0),h<e&&(e=h,i=c(n,o,s));return i&&(i.distance=Math.sqrt(e)),i},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var n,r,e,u,f,t,o,i=this._rings[0],s=i.length;if(!s)return null;for(n=0,r=0;n<s-1;n++)r+=i[n].distanceTo(i[n+1])/2;if(r===0)return this._map.layerPointToLatLng(i[0]);for(n=0,u=0;n<s-1;n++)if(f=i[n],t=i[n+1],e=f.distanceTo(t),u+=e,u>r)return o=(u-r)/e,this._map.layerPointToLatLng([t.x-o*(t.x-f.x),t.y-o*(t.y-f.y)])},getBounds:function(){return this._bounds},addLatLng:function(n,t){return t=t||this._defaultShape(),n=r.latLng(n),t.push(n),this._bounds.extend(n),this.redraw()},_setLatLngs:function(n){this._bounds=new r.LatLngBounds;this._latlngs=this._convertLatLngs(n)},_defaultShape:function(){return r.Polyline._flat(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(n){for(var i=[],f=r.Polyline._flat(n),t=0,u=n.length;t<u;t++)f?(i[t]=r.latLng(n[t]),this._bounds.extend(i[t])):i[t]=this._convertLatLngs(n[t]);return i},_project:function(){var n=new r.Bounds,t,i;this._rings=[];this._projectLatlngs(this._latlngs,this._rings,n);t=this._clickTolerance();i=new r.Point(t,t);this._bounds.isValid()&&n.isValid()&&(n.min._subtract(i),n.max._add(i),this._pxBounds=n)},_projectLatlngs:function(n,t,i){var o=n[0]instanceof r.LatLng,e=n.length,u,f;if(o){for(f=[],u=0;u<e;u++)f[u]=this._map.latLngToLayerPoint(n[u]),i.extend(f[u]);t.push(f)}else for(u=0;u<e;u++)this._projectLatlngs(n[u],t,i)},_clipPoints:function(){var s=this._renderer._bounds,i,e,n,t,h,o,u,f;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(s)){if(this.options.noClip){this._parts=this._rings;return}for(i=this._parts,e=0,t=0,h=this._rings.length;e<h;e++)for(f=this._rings[e],n=0,o=f.length;n<o-1;n++)(u=r.LineUtil.clipSegment(f[n],f[n+1],s,n,!0),u)&&(i[t]=i[t]||[],i[t].push(u[0]),(u[1]!==f[n+1]||n===o-2)&&(i[t].push(u[1]),t++))}},_simplifyPoints:function(){for(var t=this._parts,u=this.options.smoothFactor,n=0,i=t.length;n<i;n++)t[n]=r.LineUtil.simplify(t[n],u)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)}});r.polyline=function(n,t){return new r.Polyline(n,t)};r.Polyline._flat=function(n){return!r.Util.isArray(n[0])||typeof n[0][0]!="object"&&typeof n[0][0]!="undefined"};r.PolyUtil={};r.PolyUtil.clipPolygon=function(n,t,i){for(var o,y=[1,4,2,8],v,a,s,h,e,f,l=r.LineUtil,u=0,c=n.length;u<c;u++)n[u]._code=l._getBitCode(n[u],t);for(a=0;a<4;a++){for(e=y[a],o=[],u=0,c=n.length,v=c-1;u<c;v=u++)s=n[u],h=n[v],s._code&e?h._code&e||(f=l._getEdgeIntersection(h,s,e,t,i),f._code=l._getBitCode(f,t),o.push(f)):(h._code&e&&(f=l._getEdgeIntersection(h,s,e,t,i),f._code=l._getBitCode(f,t),o.push(f)),o.push(s));n=o}return n};r.Polygon=r.Polyline.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var r,e,n,t,u,i,o,s,c,f=this._rings[0],h=f.length;if(!h)return null;for(i=o=s=0,r=0,e=h-1;r<h;e=r++)n=f[r],t=f[e],u=n.y*t.x-t.y*n.x,o+=(n.x+t.x)*u,s+=(n.y+t.y)*u,i+=u*3;return c=i===0?f[0]:[o/i,s/i],this._map.layerPointToLatLng(c)},_convertLatLngs:function(n){var t=r.Polyline.prototype._convertLatLngs.call(this,n),i=t.length;return i>=2&&t[0]instanceof r.LatLng&&t[0].equals(t[i-1])&&t.pop(),t},_setLatLngs:function(n){r.Polyline.prototype._setLatLngs.call(this,n);r.Polyline._flat(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return r.Polyline._flat(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var n=this._renderer._bounds,u=this.options.weight,f=new r.Point(u,u),t,e,i;if(n=new r.Bounds(n.min.subtract(f),n.max.add(f)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(n)){if(this.options.noClip){this._parts=this._rings;return}for(t=0,e=this._rings.length;t<e;t++)i=r.PolyUtil.clipPolygon(this._rings[t],n,!0),i.length&&this._parts.push(i)}},_updatePath:function(){this._renderer._updatePoly(this,!0)}});r.polygon=function(n,t){return new r.Polygon(n,t)};r.Rectangle=r.Polygon.extend({initialize:function(n,t){r.Polygon.prototype.initialize.call(this,this._boundsToLatLngs(n),t)},setBounds:function(n){return this.setLatLngs(this._boundsToLatLngs(n))},_boundsToLatLngs:function(n){return n=r.latLngBounds(n),[n.getSouthWest(),n.getNorthWest(),n.getNorthEast(),n.getSouthEast()]}});r.rectangle=function(n,t){return new r.Rectangle(n,t)};r.CircleMarker=r.Path.extend({options:{fill:!0,radius:10},initialize:function(n,t){r.setOptions(this,t);this._latlng=r.latLng(n);this._radius=this.options.radius},setLatLng:function(n){return this._latlng=r.latLng(n),this.redraw(),this.fire("move",{latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(n){return this.options.radius=this._radius=n,this.redraw()},getRadius:function(){return this._radius},setStyle:function(n){var t=n&&n.radius||this._radius;return r.Path.prototype.setStyle.call(this,n),this.setRadius(t),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng);this._updateBounds()},_updateBounds:function(){var n=this._radius,u=this._radiusY||n,t=this._clickTolerance(),i=[n+t,u+t];this._pxBounds=new r.Bounds(this._point.subtract(i),this._point.add(i))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)}});r.circleMarker=function(n,t){return new r.CircleMarker(n,t)};r.Circle=r.CircleMarker.extend({initialize:function(n,t,i){if(typeof t=="number"&&(t=r.extend({},i,{radius:t})),r.setOptions(this,t),this._latlng=r.latLng(n),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(n){return this._mRadius=n,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var n=[this._radius,this._radiusY||this._radius];return new r.LatLngBounds(this._map.layerPointToLatLng(this._point.subtract(n)),this._map.layerPointToLatLng(this._point.add(n)))},setStyle:r.Path.prototype.setStyle,_project:function(){var o=this._latlng.lng,i=this._latlng.lat,n=this._map,s=n.options.crs,l;if(s.distance===r.CRS.Earth.distance){var t=Math.PI/180,f=this._mRadius/r.CRS.Earth.R/t,c=n.project([i+f,o]),a=n.project([i-f,o]),e=c.add(a).divideBy(2),h=n.unproject(e).lat,u=Math.acos((Math.cos(f*t)-Math.sin(i*t)*Math.sin(h*t))/(Math.cos(i*t)*Math.cos(h*t)))/t;(isNaN(u)||u===0)&&(u=f/Math.cos(Math.PI/180*i));this._point=e.subtract(n.getPixelOrigin());this._radius=isNaN(u)?0:Math.max(Math.round(e.x-n.project([h,o-u]).x),1);this._radiusY=Math.max(Math.round(e.y-c.y),1)}else l=s.unproject(s.project(this._latlng).subtract([this._mRadius,0])),this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(l).x;this._updateBounds()}});r.circle=function(n,t,i){return new r.Circle(n,t,i)};r.SVG=r.Renderer.extend({getEvents:function(){var n=r.Renderer.prototype.getEvents.call(this);return n.zoomstart=this._onZoomStart,n},_initContainer:function(){this._container=r.SVG.create("svg");this._container.setAttribute("pointer-events","none");this._rootGroup=r.SVG.create("g");this._container.appendChild(this._rootGroup)},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){r.Renderer.prototype._update.call(this);var t=this._bounds,n=t.getSize(),i=this._container;this._svgSize&&this._svgSize.equals(n)||(this._svgSize=n,i.setAttribute("width",n.x),i.setAttribute("height",n.y));r.DomUtil.setPosition(i,t.min);i.setAttribute("viewBox",[t.min.x,t.min.y,n.x,n.y].join(" "));this.fire("update")}},_initPath:function(n){var t=n._path=r.SVG.create("path");n.options.className&&r.DomUtil.addClass(t,n.options.className);n.options.interactive&&r.DomUtil.addClass(t,"leaflet-interactive");this._updateStyle(n);this._layers[r.stamp(n)]=n},_addPath:function(n){this._rootGroup.appendChild(n._path);n.addInteractiveTarget(n._path)},_removePath:function(n){r.DomUtil.remove(n._path);n.removeInteractiveTarget(n._path);delete this._layers[r.stamp(n)]},_updatePath:function(n){n._project();n._update()},_updateStyle:function(n){var t=n._path,i=n.options;t&&(i.stroke?(t.setAttribute("stroke",i.color),t.setAttribute("stroke-opacity",i.opacity),t.setAttribute("stroke-width",i.weight),t.setAttribute("stroke-linecap",i.lineCap),t.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?t.setAttribute("stroke-dasharray",i.dashArray):t.removeAttribute("stroke-dasharray"),i.dashOffset?t.setAttribute("stroke-dashoffset",i.dashOffset):t.removeAttribute("stroke-dashoffset")):t.setAttribute("stroke","none"),i.fill?(t.setAttribute("fill",i.fillColor||i.color),t.setAttribute("fill-opacity",i.fillOpacity),t.setAttribute("fill-rule",i.fillRule||"evenodd")):t.setAttribute("fill","none"))},_updatePoly:function(n,t){this._setPath(n,r.SVG.pointsToPath(n._parts,t))},_updateCircle:function(n){var i=n._point,t=n._radius,u=n._radiusY||t,r="a"+t+","+u+" 0 1,0 ",f=n._empty()?"M0 0":"M"+(i.x-t)+","+i.y+r+t*2+",0 "+r+-t*2+",0 ";this._setPath(n,f)},_setPath:function(n,t){n._path.setAttribute("d",t)},_bringToFront:function(n){r.DomUtil.toFront(n._path)},_bringToBack:function(n){r.DomUtil.toBack(n._path)}});r.extend(r.SVG,{create:function(n){return t.createElementNS("http://www.w3.org/2000/svg",n)},pointsToPath:function(n,t){for(var f="",i,h,e,o,u=0,s=n.length;u<s;u++){for(e=n[u],i=0,h=e.length;i<h;i++)o=e[i],f+=(i?"L":"M")+o.x+" "+o.y;f+=t?r.Browser.svg?"z":"x":""}return f||"M0 0"}});r.Browser.svg=!!(t.createElementNS&&r.SVG.create("svg").createSVGRect);r.svg=function(n){return r.Browser.svg||r.Browser.vml?new r.SVG(n):null};r.Browser.vml=!r.Browser.svg&&function(){var i,n;try{return i=t.createElement("div"),i.innerHTML='<v:shape adj="1"/>',n=i.firstChild,n.style.behavior="url(#default#VML)",n&&typeof n.adj=="object"}catch(r){return!1}}();r.SVG.include(r.Browser.vml?{_initContainer:function(){this._container=r.DomUtil.create("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(r.Renderer.prototype._update.call(this),this.fire("update"))},_initPath:function(n){var t=n._container=r.SVG.create("shape");r.DomUtil.addClass(t,"leaflet-vml-shape "+(this.options.className||""));t.coordsize="1 1";n._path=r.SVG.create("path");t.appendChild(n._path);this._updateStyle(n);this._layers[r.stamp(n)]=n},_addPath:function(n){var t=n._container;this._container.appendChild(t);n.options.interactive&&n.addInteractiveTarget(t)},_removePath:function(n){var t=n._container;r.DomUtil.remove(t);n.removeInteractiveTarget(t);delete this._layers[r.stamp(n)]},_updateStyle:function(n){var i=n._stroke,u=n._fill,t=n.options,f=n._container;f.stroked=!!t.stroke;f.filled=!!t.fill;t.stroke?(i||(i=n._stroke=r.SVG.create("stroke")),f.appendChild(i),i.weight=t.weight+"px",i.color=t.color,i.opacity=t.opacity,i.dashStyle=t.dashArray?r.Util.isArray(t.dashArray)?t.dashArray.join(" "):t.dashArray.replace(/( *, *)/g," "):"",i.endcap=t.lineCap.replace("butt","flat"),i.joinstyle=t.lineJoin):i&&(f.removeChild(i),n._stroke=null);t.fill?(u||(u=n._fill=r.SVG.create("fill")),f.appendChild(u),u.color=t.fillColor||t.color,u.opacity=t.fillOpacity):u&&(f.removeChild(u),n._fill=null)},_updateCircle:function(n){var t=n._point.round(),i=Math.round(n._radius),r=Math.round(n._radiusY||i);this._setPath(n,n._empty()?"M0 0":"AL "+t.x+","+t.y+" "+i+","+r+" 0,23592600")},_setPath:function(n,t){n._path.v=t},_bringToFront:function(n){r.DomUtil.toFront(n._container)},_bringToBack:function(n){r.DomUtil.toBack(n._container)}}:{});r.Browser.vml&&(r.SVG.create=function(){try{return t.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(n){return t.createElement("<lvml:"+n+' class="lvml">')}}catch(n){return function(n){return t.createElement("<"+n+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}());r.Canvas=r.Renderer.extend({getEvents:function(){var n=r.Renderer.prototype.getEvents.call(this);return n.viewprereset=this._onViewPreReset,n},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){r.Renderer.prototype.onAdd.call(this);this._draw()},_initContainer:function(){var n=this._container=t.createElement("canvas");r.DomEvent.on(n,"mousemove",r.Util.throttle(this._onMouseMove,32,this),this).on(n,"click dblclick mousedown mouseup contextmenu",this._onClick,this).on(n,"mouseout",this._handleMouseOut,this);this._ctx=n.getContext("2d")},_updatePaths:function(){var n,t;if(!this._postponeUpdatePaths){this._redrawBounds=null;for(t in this._layers)n=this._layers[t],n._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){this._drawnLayers={};r.Renderer.prototype._update.call(this);var t=this._bounds,n=this._container,i=t.getSize(),u=r.Browser.retina?2:1;r.DomUtil.setPosition(n,t.min);n.width=u*i.x;n.height=u*i.y;n.style.width=i.x+"px";n.style.height=i.y+"px";r.Browser.retina&&this._ctx.scale(2,2);this._ctx.translate(-t.min.x,-t.min.y);this.fire("update")}},_reset:function(){r.Renderer.prototype._reset.call(this);this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(n){this._updateDashArray(n);this._layers[r.stamp(n)]=n;var t=n._order={layer:n,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=t);this._drawLast=t;this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(n){this._requestRedraw(n)},_removePath:function(n){var u=n._order,t=u.next,i=u.prev;t?t.prev=i:this._drawLast=i;i?i.next=t:this._drawFirst=t;delete n._order;delete this._layers[r.stamp(n)];this._requestRedraw(n)},_updatePath:function(n){this._extendRedrawBounds(n);n._project();n._update();this._requestRedraw(n)},_updateStyle:function(n){this._updateDashArray(n);this._requestRedraw(n)},_updateDashArray:function(n){if(n.options.dashArray){for(var i=n.options.dashArray.split(","),r=[],t=0;t<i.length;t++)r.push(Number(i[t]));n.options._dashArray=r}},_requestRedraw:function(n){this._map&&(this._extendRedrawBounds(n),this._redrawRequest=this._redrawRequest||r.Util.requestAnimFrame(this._redraw,this))},_extendRedrawBounds:function(n){var t=(n.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new r.Bounds;this._redrawBounds.extend(n._pxBounds.min.subtract([t,t]));this._redrawBounds.extend(n._pxBounds.max.add([t,t]))},_redraw:function(){this._redrawRequest=null;this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil());this._clear();this._draw();this._redrawBounds=null},_clear:function(){var n=this._redrawBounds,t;n?(t=n.getSize(),this._ctx.clearRect(n.min.x,n.min.y,t.x,t.y)):this._ctx.clearRect(0,0,this._container.width,this._container.height)},_draw:function(){var i,n=this._redrawBounds,r,t;for(this._ctx.save(),n&&(r=n.getSize(),this._ctx.beginPath(),this._ctx.rect(n.min.x,n.min.y,r.x,r.y),this._ctx.clip()),this._drawing=!0,t=this._drawFirst;t;t=t.next)i=t.layer,(!n||i._pxBounds&&i._pxBounds.intersects(n))&&i._updatePath();this._drawing=!1;this._ctx.restore()},_updatePoly:function(n,t){if(this._drawing){var r,u,o,f,e=n._parts,s=e.length,i=this._ctx;if(s){for(this._drawnLayers[n._leaflet_id]=n,i.beginPath(),i.setLineDash&&i.setLineDash(n.options&&n.options._dashArray||[]),r=0;r<s;r++){for(u=0,o=e[r].length;u<o;u++)f=e[r][u],i[u?"lineTo":"moveTo"](f.x,f.y);t&&i.closePath()}this._fillStroke(i,n)}}},_updateCircle:function(n){if(this._drawing&&!n._empty()){var u=n._point,t=this._ctx,r=n._radius,i=(n._radiusY||r)/r;this._drawnLayers[n._leaflet_id]=n;i!==1&&(t.save(),t.scale(1,i));t.beginPath();t.arc(u.x,u.y/i,r,0,Math.PI*2,!1);i!==1&&t.restore();this._fillStroke(t,n)}},_fillStroke:function(n,t){var i=t.options;i.fill&&(n.globalAlpha=i.fillOpacity,n.fillStyle=i.fillColor||i.color,n.fill(i.fillRule||"evenodd"));i.stroke&&i.weight!==0&&(n.globalAlpha=i.opacity,n.lineWidth=i.weight,n.strokeStyle=i.color,n.lineCap=i.lineCap,n.lineJoin=i.lineJoin,n.stroke())},_onClick:function(n){for(var f=this._map.mouseEventToLayerPoint(n),t,u,i=this._drawFirst;i;i=i.next)t=i.layer,t.options.interactive&&t._containsPoint(f)&&!this._map._draggableMoved(t)&&(u=t);u&&(r.DomEvent._fakeStop(n),this._fireEvent([u],n))},_onMouseMove:function(n){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var t=this._map.mouseEventToLayerPoint(n);this._handleMouseHover(n,t)}},_handleMouseOut:function(n){var t=this._hoveredLayer;t&&(r.DomUtil.removeClass(this._container,"leaflet-interactive"),this._fireEvent([t],n,"mouseout"),this._hoveredLayer=null)},_handleMouseHover:function(n,t){for(var f,i,u=this._drawFirst;u;u=u.next)f=u.layer,f.options.interactive&&f._containsPoint(t)&&(i=f);i!==this._hoveredLayer&&(this._handleMouseOut(n),i&&(r.DomUtil.addClass(this._container,"leaflet-interactive"),this._fireEvent([i],n,"mouseover"),this._hoveredLayer=i));this._hoveredLayer&&this._fireEvent([this._hoveredLayer],n)},_fireEvent:function(n,t,i){this._map._fireDOMEvent(t,i||t.type,n)},_bringToFront:function(n){var t=n._order,i=t.next,r=t.prev;if(i)i.prev=r;else return;r?r.next=i:i&&(this._drawFirst=i);t.prev=this._drawLast;this._drawLast.next=t;t.next=null;this._drawLast=t;this._requestRedraw(n)},_bringToBack:function(n){var t=n._order,r=t.next,i=t.prev;if(i)i.next=r;else return;r?r.prev=i:i&&(this._drawLast=i);t.prev=null;t.next=this._drawFirst;this._drawFirst.prev=t;this._drawFirst=t;this._requestRedraw(n)}});r.Browser.canvas=function(){return!!t.createElement("canvas").getContext}();r.canvas=function(n){return r.Browser.canvas?new r.Canvas(n):null};r.Polyline.prototype._containsPoint=function(n,t){var u,i,e,s,o,f,h=this._clickTolerance();if(!this._pxBounds.contains(n))return!1;for(u=0,s=this._parts.length;u<s;u++)for(f=this._parts[u],i=0,o=f.length,e=o-1;i<o;e=i++)if((t||i!==0)&&r.LineUtil.pointToSegmentDistance(n,f[e],f[i])<=h)return!0;return!1};r.Polygon.prototype._containsPoint=function(n){var o=!1,i,t,u,f,e,s,c,h;if(!this._pxBounds.contains(n))return!1;for(f=0,c=this._parts.length;f<c;f++)for(i=this._parts[f],e=0,h=i.length,s=h-1;e<h;s=e++)t=i[e],u=i[s],t.y>n.y!=u.y>n.y&&n.x<(u.x-t.x)*(n.y-t.y)/(u.y-t.y)+t.x&&(o=!o);return o||r.Polyline.prototype._containsPoint.call(this,n,!0)};r.CircleMarker.prototype._containsPoint=function(n){return n.distanceTo(this._point)<=this._radius+this._clickTolerance()};r.GeoJSON=r.FeatureGroup.extend({initialize:function(n,t){r.setOptions(this,t);this._layers={};n&&this.addData(n)},addData:function(n){var e=r.Util.isArray(n)?n:n.features,f,o,i,u,t;if(e){for(f=0,o=e.length;f<o;f++)i=e[f],(i.geometries||i.geometry||i.features||i.coordinates)&&this.addData(i);return this}if((u=this.options,u.filter&&!u.filter(n))||(t=r.GeoJSON.geometryToLayer(n,u),!t))return this;if(t.feature=r.GeoJSON.asFeature(n),t.defaultOptions=t.options,this.resetStyle(t),u.onEachFeature)u.onEachFeature(n,t);return this.addLayer(t)},resetStyle:function(n){return n.options=r.Util.extend({},n.defaultOptions),this._setLayerStyle(n,this.options.style),this},setStyle:function(n){return this.eachLayer(function(t){this._setLayerStyle(t,n)},this)},_setLayerStyle:function(n,t){typeof t=="function"&&(t=t(n.feature));n.setStyle&&n.setStyle(t)}});r.extend(r.GeoJSON,{geometryToLayer:function(n,t){var i=n.type==="Feature"?n.geometry:n,f=i?i.coordinates:null,o=[],s=t&&t.pointToLayer,h=t&&t.coordsToLatLng||this.coordsToLatLng,e,c,u,l,a;if(!f&&!i)return null;switch(i.type){case"Point":return e=h(f),s?s(n,e):new r.Marker(e);case"MultiPoint":for(u=0,l=f.length;u<l;u++)e=h(f[u]),o.push(s?s(n,e):new r.Marker(e));return new r.FeatureGroup(o);case"LineString":case"MultiLineString":return c=this.coordsToLatLngs(f,i.type==="LineString"?0:1,h),new r.Polyline(c,t);case"Polygon":case"MultiPolygon":return c=this.coordsToLatLngs(f,i.type==="Polygon"?1:2,h),new r.Polygon(c,t);case"GeometryCollection":for(u=0,l=i.geometries.length;u<l;u++)a=this.geometryToLayer({geometry:i.geometries[u],type:"Feature",properties:n.properties},t),a&&o.push(a);return new r.FeatureGroup(o);default:throw new Error("Invalid GeoJSON object.");}},coordsToLatLng:function(n){return new r.LatLng(n[1],n[0],n[2])},coordsToLatLngs:function(n,t,i){for(var u=[],e,r=0,f=n.length;r<f;r++)e=t?this.coordsToLatLngs(n[r],t-1,i):(i||this.coordsToLatLng)(n[r]),u.push(e);return u},latLngToCoords:function(n){return n.alt!==i?[n.lng,n.lat,n.alt]:[n.lng,n.lat]},latLngsToCoords:function(n,t,i){for(var f=[],u=0,e=n.length;u<e;u++)f.push(t?r.GeoJSON.latLngsToCoords(n[u],t-1,i):r.GeoJSON.latLngToCoords(n[u]));return!t&&i&&f.push(f[0]),f},getFeature:function(n,t){return n.feature?r.extend({},n.feature,{geometry:t}):r.GeoJSON.asFeature(t)},asFeature:function(n){return n.type==="Feature"||n.type==="FeatureCollection"?n:{type:"Feature",properties:{},geometry:n}}});e={toGeoJSON:function(){return r.GeoJSON.getFeature(this,{type:"Point",coordinates:r.GeoJSON.latLngToCoords(this.getLatLng())})}};r.Marker.include(e);r.Circle.include(e);r.CircleMarker.include(e);r.Polyline.prototype.toGeoJSON=function(){var n=!r.Polyline._flat(this._latlngs),t=r.GeoJSON.latLngsToCoords(this._latlngs,n?1:0);return r.GeoJSON.getFeature(this,{type:(n?"Multi":"")+"LineString",coordinates:t})};r.Polygon.prototype.toGeoJSON=function(){var n=!r.Polyline._flat(this._latlngs),i=n&&!r.Polyline._flat(this._latlngs[0]),t=r.GeoJSON.latLngsToCoords(this._latlngs,i?2:n?1:0,!0);return n||(t=[t]),r.GeoJSON.getFeature(this,{type:(i?"Multi":"")+"Polygon",coordinates:t})};r.LayerGroup.include({toMultiPoint:function(){var n=[];return this.eachLayer(function(t){n.push(t.toGeoJSON().geometry.coordinates)}),r.GeoJSON.getFeature(this,{type:"MultiPoint",coordinates:n})},toGeoJSON:function(){var i=this.feature&&this.feature.geometry&&this.feature.geometry.type,t,n;return i==="MultiPoint"?this.toMultiPoint():(t=i==="GeometryCollection",n=[],this.eachLayer(function(i){if(i.toGeoJSON){var u=i.toGeoJSON();n.push(t?u.geometry:r.GeoJSON.asFeature(u))}}),t)?r.GeoJSON.getFeature(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});r.geoJSON=function(n,t){return new r.GeoJSON(n,t)};r.geoJson=r.geoJSON;r.Draggable=r.Evented.extend({options:{clickTolerance:3},statics:{START:r.Browser.touch?["touchstart","mousedown"]:["mousedown"],END:{mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},MOVE:{mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"}},initialize:function(n,t,i){this._element=n;this._dragStartTarget=t||n;this._preventOutline=i},enable:function(){if(!this._enabled){r.DomEvent.on(this._dragStartTarget,r.Draggable.START.join(" "),this._onDown,this);this._enabled=!0}},disable:function(){this._enabled&&(r.Draggable._dragging===this&&this.finishDrag(),r.DomEvent.off(this._dragStartTarget,r.Draggable.START.join(" "),this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(n){if(!n._simulated&&this._enabled&&(this._moved=!1,!r.DomUtil.hasClass(this._element,"leaflet-zoom-anim"))&&!r.Draggable._dragging&&!n.shiftKey&&(n.which===1||n.button===1||n.touches)&&(r.Draggable._dragging=this,this._preventOutline&&r.DomUtil.preventOutline(this._element),r.DomUtil.disableImageDrag(),r.DomUtil.disableTextSelection(),!this._moving)){this.fire("down");var i=n.touches?n.touches[0]:n;this._startPoint=new r.Point(i.clientX,i.clientY);r.DomEvent.on(t,r.Draggable.MOVE[n.type],this._onMove,this).on(t,r.Draggable.END[n.type],this._onUp,this)}},_onMove:function(i){if(!i._simulated&&this._enabled){if(i.touches&&i.touches.length>1){this._moved=!0;return}var f=i.touches&&i.touches.length===1?i.touches[0]:i,e=new r.Point(f.clientX,f.clientY),u=e.subtract(this._startPoint);(u.x||u.y)&&(Math.abs(u.x)+Math.abs(u.y)<this.options.clickTolerance||(r.DomEvent.preventDefault(i),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=r.DomUtil.getPosition(this._element).subtract(u),r.DomUtil.addClass(t.body,"leaflet-dragging"),this._lastTarget=i.target||i.srcElement,n.SVGElementInstance&&this._lastTarget instanceof SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),r.DomUtil.addClass(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(u),this._moving=!0,r.Util.cancelAnimFrame(this._animRequest),this._lastEvent=i,this._animRequest=r.Util.requestAnimFrame(this._updatePosition,this,!0)))}},_updatePosition:function(){var n={originalEvent:this._lastEvent};this.fire("predrag",n);r.DomUtil.setPosition(this._element,this._newPos);this.fire("drag",n)},_onUp:function(n){!n._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){r.DomUtil.removeClass(t.body,"leaflet-dragging");this._lastTarget&&(r.DomUtil.removeClass(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null);for(var n in r.Draggable.MOVE)r.DomEvent.off(t,r.Draggable.MOVE[n],this._onMove,this).off(t,r.Draggable.END[n],this._onUp,this);r.DomUtil.enableImageDrag();r.DomUtil.enableTextSelection();this._moved&&this._moving&&(r.Util.cancelAnimFrame(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)}));this._moving=!1;r.Draggable._dragging=!1}});r.Handler=r.Class.extend({initialize:function(n){this._map=n},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});r.Map.mergeOptions({dragging:!0,inertia:!r.Browser.android23,inertiaDeceleration:3400,inertiaMaxSpeed:Infinity,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});r.Map.Drag=r.Handler.extend({addHooks:function(){if(!this._draggable){var n=this._map;this._draggable=new r.Draggable(n._mapPane,n._container);this._draggable.on({down:this._onDown,dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this);this._draggable.on("predrag",this._onPreDragLimit,this);if(n.options.worldCopyJump){this._draggable.on("predrag",this._onPreDragWrap,this);n.on("zoomend",this._onZoomEnd,this);n.whenReady(this._onZoomEnd,this)}}r.DomUtil.addClass(this._map._container,"leaflet-grab leaflet-touch-drag");this._draggable.enable();this._positions=[];this._times=[]},removeHooks:function(){r.DomUtil.removeClass(this._map._container,"leaflet-grab");r.DomUtil.removeClass(this._map._container,"leaflet-touch-drag");this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDown:function(){this._map._stop()},_onDragStart:function(){var t=this._map,n;this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(n=r.latLngBounds(this._map.options.maxBounds),this._offsetLimit=r.bounds(this._map.latLngToContainerPoint(n.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(n.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null;t.fire("movestart").fire("dragstart");t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(n){if(this._map.options.inertia){var t=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i);this._times.push(t);t-this._times[0]>50&&(this._positions.shift(),this._times.shift())}this._map.fire("move",n).fire("drag",n)},_onZoomEnd:function(){var n=this._map.getSize().divideBy(2),t=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=t.subtract(n).x;this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(n,t){return n-(n-t)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var n=this._draggable._newPos.subtract(this._draggable._startPos),t=this._offsetLimit;n.x<t.min.x&&(n.x=this._viscousLimit(n.x,t.min.x));n.y<t.min.y&&(n.y=this._viscousLimit(n.y,t.min.y));n.x>t.max.x&&(n.x=this._viscousLimit(n.x,t.max.x));n.y>t.max.y&&(n.y=this._viscousLimit(n.y,t.max.y));this._draggable._newPos=this._draggable._startPos.add(n)}},_onPreDragWrap:function(){var i=this._worldWidth,t=Math.round(i/2),n=this._initialWorldOffset,r=this._draggable._newPos.x,u=(r-t+n)%i+t-n,f=(r+t+n)%i-t-n,e=Math.abs(u+n)<Math.abs(f+n)?u:f;this._draggable._absPos=this._draggable._newPos.clone();this._draggable._newPos.x=e},_onDragEnd:function(n){var t=this._map,u=t.options,c=!u.inertia||this._times.length<2;if(t.fire("dragend",n),c)t.fire("moveend");else{var l=this._lastPos.subtract(this._positions[0]),a=(this._lastTime-this._times[0])/1e3,f=u.easeLinearity,e=l.multiplyBy(f/a),o=e.distanceTo([0,0]),s=Math.min(u.inertiaMaxSpeed,o),v=e.multiplyBy(s/o),h=s/(u.inertiaDeceleration*f),i=v.multiplyBy(-h/2).round();i.x||i.y?(i=t._limitOffset(i,t.options.maxBounds),r.Util.requestAnimFrame(function(){t.panBy(i,{duration:h,easeLinearity:f,noMoveStart:!0,animate:!0})})):t.fire("moveend")}}});r.Map.addInitHook("addHandler","dragging",r.Map.Drag);r.Map.mergeOptions({doubleClickZoom:!0});r.Map.DoubleClickZoom=r.Handler.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(n){var t=this._map,i=t.getZoom(),r=t.options.zoomDelta,u=n.originalEvent.shiftKey?i-r:i+r;t.options.doubleClickZoom==="center"?t.setZoom(u):t.setZoomAround(n.containerPoint,u)}});r.Map.addInitHook("addHandler","doubleClickZoom",r.Map.DoubleClickZoom);r.Map.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});r.Map.ScrollWheelZoom=r.Handler.extend({addHooks:function(){r.DomEvent.on(this._map._container,"mousewheel",this._onWheelScroll,this);this._delta=0},removeHooks:function(){r.DomEvent.off(this._map._container,"mousewheel",this._onWheelScroll,this)},_onWheelScroll:function(n){var i=r.DomEvent.getWheelDelta(n),u=this._map.options.wheelDebounceTime,t;this._delta+=i;this._lastMousePos=this._map.mouseEventToContainerPoint(n);this._startTime||(this._startTime=+new Date);t=Math.max(u-(+new Date-this._startTime),0);clearTimeout(this._timer);this._timer=setTimeout(r.bind(this._performZoom,this),t);r.DomEvent.stop(n)},_performZoom:function(){var n=this._map,t=n.getZoom(),i=this._map.options.zoomSnap||0;n._stop();var e=this._delta/(this._map.options.wheelPxPerZoomLevel*4),u=4*Math.log(2/(1+Math.exp(-Math.abs(e))))/Math.LN2,f=i?Math.ceil(u/i)*i:u,r=n._limitZoom(t+(this._delta>0?f:-f))-t;(this._delta=0,this._startTime=null,r)&&(n.options.scrollWheelZoom==="center"?n.setZoom(t+r):n.setZoomAround(this._lastMousePos,t+r))}});r.Map.addInitHook("addHandler","scrollWheelZoom",r.Map.ScrollWheelZoom);r.extend(r.DomEvent,{_touchstart:r.Browser.msPointer?"MSPointerDown":r.Browser.pointer?"pointerdown":"touchstart",_touchend:r.Browser.msPointer?"MSPointerUp":r.Browser.pointer?"pointerup":"touchend",addDoubleTapListener:function(n,t,i){function s(n){var i,t,e;if(r.Browser.pointer){if(!r.Browser.edge||n.pointerType==="mouse")return;i=r.DomEvent._pointersCount}else i=n.touches.length;i>1||(t=Date.now(),e=t-(f||t),u=n.touches?n.touches[0]:n,o=e>0&&e<=a,f=t)}function h(n){if(o&&!u.cancelBubble){if(r.Browser.pointer){if(!r.Browser.edge||n.pointerType==="mouse")return;var s={},i,e;for(e in u)i=u[e],s[e]=i&&i.bind?i.bind(u):i;u=s}u.type="dblclick";t(u);f=null}}var f,u,o=!1,a=250,e="_leaflet_",c=this._touchstart,l=this._touchend;return n[e+c+i]=s,n[e+l+i]=h,n[e+"dblclick"+i]=t,n.addEventListener(c,s,!1),n.addEventListener(l,h,!1),n.addEventListener("dblclick",t,!1),this},removeDoubleTapListener:function(n,t){var i="_leaflet_",u=n[i+this._touchstart+t],f=n[i+this._touchend+t],e=n[i+"dblclick"+t];return n.removeEventListener(this._touchstart,u,!1),n.removeEventListener(this._touchend,f,!1),r.Browser.edge||n.removeEventListener("dblclick",e,!1),this}});r.extend(r.DomEvent,{POINTER_DOWN:r.Browser.msPointer?"MSPointerDown":"pointerdown",POINTER_MOVE:r.Browser.msPointer?"MSPointerMove":"pointermove",POINTER_UP:r.Browser.msPointer?"MSPointerUp":"pointerup",POINTER_CANCEL:r.Browser.msPointer?"MSPointerCancel":"pointercancel",TAG_WHITE_LIST:["INPUT","SELECT","OPTION"],_pointers:{},_pointersCount:0,addPointerListener:function(n,t,i,r){return t==="touchstart"?this._addPointerStart(n,i,r):t==="touchmove"?this._addPointerMove(n,i,r):t==="touchend"&&this._addPointerEnd(n,i,r),this},removePointerListener:function(n,t,i){var r=n["_leaflet_"+t+i];return t==="touchstart"?n.removeEventListener(this.POINTER_DOWN,r,!1):t==="touchmove"?n.removeEventListener(this.POINTER_MOVE,r,!1):t==="touchend"&&(n.removeEventListener(this.POINTER_UP,r,!1),n.removeEventListener(this.POINTER_CANCEL,r,!1)),this},_addPointerStart:function(n,i,u){var e=r.bind(function(n){if(n.pointerType!=="mouse"&&n.MSPOINTER_TYPE_MOUSE&&n.pointerType!==n.MSPOINTER_TYPE_MOUSE)if(this.TAG_WHITE_LIST.indexOf(n.target.tagName)<0)r.DomEvent.preventDefault(n);else return;this._handlePointer(n,i)},this),f;n["_leaflet_touchstart"+u]=e;n.addEventListener(this.POINTER_DOWN,e,!1);this._pointerDocListener||(f=r.bind(this._globalPointerUp,this),t.documentElement.addEventListener(this.POINTER_DOWN,r.bind(this._globalPointerDown,this),!0),t.documentElement.addEventListener(this.POINTER_MOVE,r.bind(this._globalPointerMove,this),!0),t.documentElement.addEventListener(this.POINTER_UP,f,!0),t.documentElement.addEventListener(this.POINTER_CANCEL,f,!0),this._pointerDocListener=!0)},_globalPointerDown:function(n){this._pointers[n.pointerId]=n;this._pointersCount++},_globalPointerMove:function(n){this._pointers[n.pointerId]&&(this._pointers[n.pointerId]=n)},_globalPointerUp:function(n){delete this._pointers[n.pointerId];this._pointersCount--},_handlePointer:function(n,t){n.touches=[];for(var i in this._pointers)n.touches.push(this._pointers[i]);n.changedTouches=[n];t(n)},_addPointerMove:function(n,t,i){var u=r.bind(function(n){(n.pointerType!==n.MSPOINTER_TYPE_MOUSE&&n.pointerType!=="mouse"||n.buttons!==0)&&this._handlePointer(n,t)},this);n["_leaflet_touchmove"+i]=u;n.addEventListener(this.POINTER_MOVE,u,!1)},_addPointerEnd:function(n,t,i){var u=r.bind(function(n){this._handlePointer(n,t)},this);n["_leaflet_touchend"+i]=u;n.addEventListener(this.POINTER_UP,u,!1);n.addEventListener(this.POINTER_CANCEL,u,!1)}});r.Map.mergeOptions({touchZoom:r.Browser.touch&&!r.Browser.android23,bounceAtZoomLimits:!0});r.Map.TouchZoom=r.Handler.extend({addHooks:function(){r.DomUtil.addClass(this._map._container,"leaflet-touch-zoom");r.DomEvent.on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){r.DomUtil.removeClass(this._map._container,"leaflet-touch-zoom");r.DomEvent.off(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(n){var i=this._map,u,f;if(n.touches&&n.touches.length===2&&!i._animatingZoom&&!this._zooming){u=i.mouseEventToContainerPoint(n.touches[0]);f=i.mouseEventToContainerPoint(n.touches[1]);this._centerPoint=i.getSize()._divideBy(2);this._startLatLng=i.containerPointToLatLng(this._centerPoint);i.options.touchZoom!=="center"&&(this._pinchStartLatLng=i.containerPointToLatLng(u.add(f)._divideBy(2)));this._startDist=u.distanceTo(f);this._startZoom=i.getZoom();this._moved=!1;this._zooming=!0;i._stop();r.DomEvent.on(t,"touchmove",this._onTouchMove,this).on(t,"touchend",this._onTouchEnd,this);r.DomEvent.preventDefault(n)}},_onTouchMove:function(n){var u,o;if(n.touches&&n.touches.length===2&&this._zooming){var t=this._map,f=t.mouseEventToContainerPoint(n.touches[0]),e=t.mouseEventToContainerPoint(n.touches[1]),i=f.distanceTo(e)/this._startDist;if(this._zoom=t.getScaleZoom(i,this._startZoom),!t.options.bounceAtZoomLimits&&(this._zoom<t.getMinZoom()&&i<1||this._zoom>t.getMaxZoom()&&i>1)&&(this._zoom=t._limitZoom(this._zoom)),t.options.touchZoom==="center"){if(this._center=this._startLatLng,i===1)return}else{if(u=f._add(e)._divideBy(2)._subtract(this._centerPoint),i===1&&u.x===0&&u.y===0)return;this._center=t.unproject(t.project(this._pinchStartLatLng,this._zoom).subtract(u),this._zoom)}this._moved||(t._moveStart(!0),this._moved=!0);r.Util.cancelAnimFrame(this._animRequest);o=r.bind(t._move,t,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=r.Util.requestAnimFrame(o,this,!0);r.DomEvent.preventDefault(n)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1;r.Util.cancelAnimFrame(this._animRequest);r.DomEvent.off(t,"touchmove",this._onTouchMove).off(t,"touchend",this._onTouchEnd);this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});r.Map.addInitHook("addHandler","touchZoom",r.Map.TouchZoom);r.Map.mergeOptions({tap:!0,tapTolerance:15});r.Map.Tap=r.Handler.extend({addHooks:function(){r.DomEvent.on(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){r.DomEvent.off(this._map._container,"touchstart",this._onDown,this)},_onDown:function(n){if(n.touches){if(r.DomEvent.preventDefault(n),this._fireClick=!0,n.touches.length>1){this._fireClick=!1;clearTimeout(this._holdTimeout);return}var i=n.touches[0],u=i.target;this._startPos=this._newPos=new r.Point(i.clientX,i.clientY);u.tagName&&u.tagName.toLowerCase()==="a"&&r.DomUtil.addClass(u,"leaflet-active");this._holdTimeout=setTimeout(r.bind(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",i))},this),1e3);this._simulateEvent("mousedown",i);r.DomEvent.on(t,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(n){if(clearTimeout(this._holdTimeout),r.DomEvent.off(t,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&n&&n.changedTouches){var u=n.changedTouches[0],i=u.target;i&&i.tagName&&i.tagName.toLowerCase()==="a"&&r.DomUtil.removeClass(i,"leaflet-active");this._simulateEvent("mouseup",u);this._isTapValid()&&this._simulateEvent("click",u)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(n){var t=n.touches[0];this._newPos=new r.Point(t.clientX,t.clientY);this._simulateEvent("mousemove",t)},_simulateEvent:function(i,r){var u=t.createEvent("MouseEvents");u._simulated=!0;r.target._simulatedClick=!0;u.initMouseEvent(i,!0,!0,n,1,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null);r.target.dispatchEvent(u)}});r.Browser.touch&&!r.Browser.pointer&&r.Map.addInitHook("addHandler","tap",r.Map.Tap);r.Map.mergeOptions({boxZoom:!0});r.Map.BoxZoom=r.Handler.extend({initialize:function(n){this._map=n;this._container=n._container;this._pane=n._panes.overlayPane},addHooks:function(){r.DomEvent.on(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){r.DomEvent.off(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_resetState:function(){this._moved=!1},_onMouseDown:function(n){if(!n.shiftKey||n.which!==1&&n.button!==1)return!1;this._resetState();r.DomUtil.disableTextSelection();r.DomUtil.disableImageDrag();this._startPoint=this._map.mouseEventToContainerPoint(n);r.DomEvent.on(t,{contextmenu:r.DomEvent.stop,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(n){this._moved||(this._moved=!0,this._box=r.DomUtil.create("div","leaflet-zoom-box",this._container),r.DomUtil.addClass(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart"));this._point=this._map.mouseEventToContainerPoint(n);var t=new r.Bounds(this._point,this._startPoint),i=t.getSize();r.DomUtil.setPosition(this._box,t.min);this._box.style.width=i.x+"px";this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(r.DomUtil.remove(this._box),r.DomUtil.removeClass(this._container,"leaflet-crosshair"));r.DomUtil.enableTextSelection();r.DomUtil.enableImageDrag();r.DomEvent.off(t,{contextmenu:r.DomEvent.stop,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(n){if((n.which===1||n.button===1)&&(this._finish(),this._moved)){setTimeout(r.bind(this._resetState,this),0);var t=new r.LatLngBounds(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t})}},_onKeyDown:function(n){n.keyCode===27&&this._finish()}});r.Map.addInitHook("addHandler","boxZoom",r.Map.BoxZoom);r.Map.mergeOptions({keyboard:!0,keyboardPanDelta:80});r.Map.Keyboard=r.Handler.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(n){this._map=n;this._setPanDelta(n.options.keyboardPanDelta);this._setZoomDelta(n.options.zoomDelta)},addHooks:function(){var n=this._map._container;n.tabIndex<=0&&(n.tabIndex="0");r.DomEvent.on(n,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this);this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks();r.DomEvent.off(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this);this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var i=t.body,r=t.documentElement,u=i.scrollTop||r.scrollTop,f=i.scrollLeft||r.scrollLeft;this._map._container.focus();n.scrollTo(f,u)}},_onFocus:function(){this._focused=!0;this._map.fire("focus")},_onBlur:function(){this._focused=!1;this._map.fire("blur")},_setPanDelta:function(n){for(var u=this._panKeys={},i=this.keyCodes,t=0,r=i.left.length;t<r;t++)u[i.left[t]]=[-1*n,0];for(t=0,r=i.right.length;t<r;t++)u[i.right[t]]=[n,0];for(t=0,r=i.down.length;t<r;t++)u[i.down[t]]=[0,n];for(t=0,r=i.up.length;t<r;t++)u[i.up[t]]=[0,-1*n]},_setZoomDelta:function(n){for(var u=this._zoomKeys={},i=this.keyCodes,t=0,r=i.zoomIn.length;t<r;t++)u[i.zoomIn[t]]=n;for(t=0,r=i.zoomOut.length;t<r;t++)u[i.zoomOut[t]]=-n},_addHooks:function(){r.DomEvent.on(t,"keydown",this._onKeyDown,this)},_removeHooks:function(){r.DomEvent.off(t,"keydown",this._onKeyDown,this)},_onKeyDown:function(n){if(!n.altKey&&!n.ctrlKey&&!n.metaKey){var i=n.keyCode,t=this._map,u;if(i in this._panKeys){if(t._panAnim&&t._panAnim._inProgress)return;u=this._panKeys[i];n.shiftKey&&(u=r.point(u).multiplyBy(3));t.panBy(u);t.options.maxBounds&&t.panInsideBounds(t.options.maxBounds)}else if(i in this._zoomKeys)t.setZoom(t.getZoom()+(n.shiftKey?3:1)*this._zoomKeys[i]);else if(i===27)t.closePopup();else return;r.DomEvent.stop(n)}}});r.Map.addInitHook("addHandler","keyboard",r.Map.Keyboard);r.Handler.MarkerDrag=r.Handler.extend({initialize:function(n){this._marker=n},addHooks:function(){var n=this._marker._icon;this._draggable||(this._draggable=new r.Draggable(n,n,!0));this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this).enable();r.DomUtil.addClass(n,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this).disable();this._marker._icon&&r.DomUtil.removeClass(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng();this._marker.closePopup().fire("movestart").fire("dragstart")},_onDrag:function(n){var t=this._marker,i=t._shadow,u=r.DomUtil.getPosition(t._icon),f=t._map.layerPointToLatLng(u);i&&r.DomUtil.setPosition(i,u);t._latlng=f;n.latlng=f;n.oldLatLng=this._oldLatLng;t.fire("move",n).fire("drag",n)},_onDragEnd:function(n){delete this._oldLatLng;this._marker.fire("moveend").fire("dragend",n)}});r.Control=r.Class.extend({options:{position:"topright"},initialize:function(n){r.setOptions(this,n)},getPosition:function(){return this.options.position},setPosition:function(n){var t=this._map;return t&&t.removeControl(this),this.options.position=n,t&&t.addControl(this),this},getContainer:function(){return this._container},addTo:function(n){this.remove();this._map=n;var t=this._container=this.onAdd(n),u=this.getPosition(),i=n._controlCorners[u];return r.DomUtil.addClass(t,"leaflet-control"),u.indexOf("bottom")!==-1?i.insertBefore(t,i.firstChild):i.appendChild(t),this},remove:function(){if(!this._map)return this;if(r.DomUtil.remove(this._container),this.onRemove)this.onRemove(this._map);return this._map=null,this},_refocusOnMap:function(n){this._map&&n&&n.screenX>0&&n.screenY>0&&this._map.getContainer().focus()}});r.control=function(n){return new r.Control(n)};r.Map.include({addControl:function(n){return n.addTo(this),this},removeControl:function(n){return n.remove(),this},_initControlPos:function(){function n(n,f){var e=t+n+" "+t+f;i[n+f]=r.DomUtil.create("div",e,u)}var i=this._controlCorners={},t="leaflet-",u=this._controlContainer=r.DomUtil.create("div",t+"control-container",this._container);n("top","left");n("top","right");n("bottom","left");n("bottom","right")},_clearControlPos:function(){r.DomUtil.remove(this._controlContainer)}});r.Control.Zoom=r.Control.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"-",zoomOutTitle:"Zoom out"},onAdd:function(n){var i="leaflet-control-zoom",u=r.DomUtil.create("div",i+" leaflet-bar"),t=this.options;this._zoomInButton=this._createButton(t.zoomInText,t.zoomInTitle,i+"-in",u,this._zoomIn);this._zoomOutButton=this._createButton(t.zoomOutText,t.zoomOutTitle,i+"-out",u,this._zoomOut);this._updateDisabled();n.on("zoomend zoomlevelschange",this._updateDisabled,this);return u},onRemove:function(n){n.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(n){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(n.shiftKey?3:1))},_zoomOut:function(n){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(n.shiftKey?3:1))},_createButton:function(n,t,i,u,f){var e=r.DomUtil.create("a",i,u);e.innerHTML=n;e.href="#";e.title=t;e.setAttribute("role","button");e.setAttribute("aria-label",t);r.DomEvent.on(e,"mousedown dblclick",r.DomEvent.stopPropagation).on(e,"click",r.DomEvent.stop).on(e,"click",f,this).on(e,"click",this._refocusOnMap,this);return e},_updateDisabled:function(){var n=this._map,t="leaflet-disabled";r.DomUtil.removeClass(this._zoomInButton,t);r.DomUtil.removeClass(this._zoomOutButton,t);(this._disabled||n._zoom===n.getMinZoom())&&r.DomUtil.addClass(this._zoomOutButton,t);(this._disabled||n._zoom===n.getMaxZoom())&&r.DomUtil.addClass(this._zoomInButton,t)}});r.Map.mergeOptions({zoomControl:!0});r.Map.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new r.Control.Zoom,this.addControl(this.zoomControl))});r.control.zoom=function(n){return new r.Control.Zoom(n)};r.Control.Attribution=r.Control.extend({options:{position:"bottomright",prefix:'<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet<\/a>'},initialize:function(n){r.setOptions(this,n);this._attributions={}},onAdd:function(n){n.attributionControl=this;this._container=r.DomUtil.create("div","leaflet-control-attribution");r.DomEvent&&r.DomEvent.disableClickPropagation(this._container);for(var t in n._layers)n._layers[t].getAttribution&&this.addAttribution(n._layers[t].getAttribution());return this._update(),this._container},setPrefix:function(n){return this.options.prefix=n,this._update(),this},addAttribution:function(n){return n?(this._attributions[n]||(this._attributions[n]=0),this._attributions[n]++,this._update(),this):this},removeAttribution:function(n){return n?(this._attributions[n]&&(this._attributions[n]--,this._update()),this):this},_update:function(){var n,i,t;if(this._map){n=[];for(i in this._attributions)this._attributions[i]&&n.push(i);t=[];this.options.prefix&&t.push(this.options.prefix);n.length&&t.push(n.join(", "));this._container.innerHTML=t.join(" | ")}}});r.Map.mergeOptions({attributionControl:!0});r.Map.addInitHook(function(){this.options.attributionControl&&(new r.Control.Attribution).addTo(this)});r.control.attribution=function(n){return new r.Control.Attribution(n)};r.Control.Scale=r.Control.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(n){var t="leaflet-control-scale",i=r.DomUtil.create("div",t),u=this.options;this._addScales(u,t+"-line",i);n.on(u.updateWhenIdle?"moveend":"move",this._update,this);return n.whenReady(this._update,this),i},onRemove:function(n){n.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(n,t,i){n.metric&&(this._mScale=r.DomUtil.create("div",t,i));n.imperial&&(this._iScale=r.DomUtil.create("div",t,i))},_update:function(){var n=this._map,t=n.getSize().y/2,i=n.distance(n.containerPointToLatLng([0,t]),n.containerPointToLatLng([this.options.maxWidth,t]));this._updateScales(i)},_updateScales:function(n){this.options.metric&&n&&this._updateMetric(n);this.options.imperial&&n&&this._updateImperial(n)},_updateMetric:function(n){var t=this._getRoundNum(n),i=t<1e3?t+" m":t/1e3+" km";this._updateScale(this._mScale,i,t/n)},_updateImperial:function(n){var t=n*3.2808399,i,r,u;t>5280?(i=t/5280,r=this._getRoundNum(i),this._updateScale(this._iScale,r+" mi",r/i)):(u=this._getRoundNum(t),this._updateScale(this._iScale,u+" ft",u/t))},_updateScale:function(n,t,i){n.style.width=Math.round(this.options.maxWidth*i)+"px";n.innerHTML=t},_getRoundNum:function(n){var i=Math.pow(10,(Math.floor(n)+"").length-1),t=n/i;return t=t>=10?10:t>=5?5:t>=3?3:t>=2?2:1,i*t}});r.control.scale=function(n){return new r.Control.Scale(n)};r.Control.Layers=r.Control.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(n,t,i,r){return i<r?-1:r<i?1:0}},initialize:function(n,t,i){r.setOptions(this,i);this._layers=[];this._lastZIndex=0;this._handlingClick=!1;for(var u in n)this._addLayer(n[u],u);for(u in t)this._addLayer(t[u],u,!0)},onAdd:function(n){this._initLayout();this._update();this._map=n;n.on("zoomend",this._checkDisabledLayers,this);return this._container},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var n=0;n<this._layers.length;n++)this._layers[n].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(n,t){return this._addLayer(n,t),this._map?this._update():this},addOverlay:function(n,t){return this._addLayer(n,t,!0),this._map?this._update():this},removeLayer:function(n){n.off("add remove",this._onLayerChange,this);var t=this._getLayer(r.stamp(n));return t&&this._layers.splice(this._layers.indexOf(t),1),this._map?this._update():this},expand:function(){r.DomUtil.addClass(this._container,"leaflet-control-layers-expanded");this._form.style.height=null;var n=this._map.getSize().y-(this._container.offsetTop+50);return n<this._form.clientHeight?(r.DomUtil.addClass(this._form,"leaflet-control-layers-scrollbar"),this._form.style.height=n+"px"):r.DomUtil.removeClass(this._form,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return r.DomUtil.removeClass(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var n="leaflet-control-layers",t=this._container=r.DomUtil.create("div",n),f=this.options.collapsed,i,u;if(t.setAttribute("aria-haspopup",!0),r.DomEvent.disableClickPropagation(t),r.Browser.touch||r.DomEvent.disableScrollPropagation(t),i=this._form=r.DomUtil.create("form",n+"-list"),f){this._map.on("click",this.collapse,this);if(!r.Browser.android)r.DomEvent.on(t,{mouseenter:this.expand,mouseleave:this.collapse},this)}if(u=this._layersLink=r.DomUtil.create("a",n+"-toggle",t),u.href="#",u.title="Layers",r.Browser.touch)r.DomEvent.on(u,"click",r.DomEvent.stop).on(u,"click",this.expand,this);else r.DomEvent.on(u,"focus",this.expand,this);r.DomEvent.on(i,"click",function(){setTimeout(r.bind(this._onInputClick,this),0)},this);f||this.expand();this._baseLayersList=r.DomUtil.create("div",n+"-base",i);this._separator=r.DomUtil.create("div",n+"-separator",i);this._overlaysList=r.DomUtil.create("div",n+"-overlays",i);t.appendChild(i)},_getLayer:function(n){for(var t=0;t<this._layers.length;t++)if(this._layers[t]&&r.stamp(this._layers[t].layer)===n)return this._layers[t]},_addLayer:function(n,t,i){n.on("add remove",this._onLayerChange,this);this._layers.push({layer:n,name:t,overlay:i});this.options.sortLayers&&this._layers.sort(r.bind(function(n,t){return this.options.sortFunction(n.layer,t.layer,n.name,t.name)},this));this.options.autoZIndex&&n.setZIndex&&(this._lastZIndex++,n.setZIndex(this._lastZIndex))},_update:function(){if(!this._container)return this;r.DomUtil.empty(this._baseLayersList);r.DomUtil.empty(this._overlaysList);for(var n,u,t,f=0,i=0;i<this._layers.length;i++)t=this._layers[i],this._addItem(t),u=u||t.overlay,n=n||!t.overlay,f+=t.overlay?0:1;return this.options.hideSingleBase&&(n=n&&f>1,this._baseLayersList.style.display=n?"":"none"),this._separator.style.display=u&&n?"":"none",this},_onLayerChange:function(n){this._handlingClick||this._update();var t=this._getLayer(r.stamp(n.target)),i=t.overlay?n.type==="add"?"overlayadd":"overlayremove":n.type==="add"?"baselayerchange":null;i&&this._map.fire(i,t)},_createRadioElement:function(n,i){var u='<input type="radio" class="leaflet-control-layers-selector" name="'+n+'"'+(i?' checked="checked"':"")+"/>",r=t.createElement("div");return r.innerHTML=u,r.firstChild},_addItem:function(n){var f=t.createElement("label"),o=this._map.hasLayer(n.layer),i,e,u,s;n.overlay?(i=t.createElement("input"),i.type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=o):i=this._createRadioElement("leaflet-base-layers",o);i.layerId=r.stamp(n.layer);r.DomEvent.on(i,"click",this._onInputClick,this);return e=t.createElement("span"),e.innerHTML=" "+n.name,u=t.createElement("div"),f.appendChild(u),u.appendChild(i),u.appendChild(e),s=n.overlay?this._overlaysList:this._baseLayersList,s.appendChild(f),this._checkDisabledLayers(),f},_onInputClick:function(){var e=this._form.getElementsByTagName("input"),t,i,r,u=[],f=[],n;for(this._handlingClick=!0,n=e.length-1;n>=0;n--)t=e[n],i=this._getLayer(t.layerId).layer,r=this._map.hasLayer(i),t.checked&&!r?u.push(i):!t.checked&&r&&f.push(i);for(n=0;n<f.length;n++)this._map.removeLayer(f[n]);for(n=0;n<u.length;n++)this._map.addLayer(u[n]);this._handlingClick=!1;this._refocusOnMap()},_checkDisabledLayers:function(){for(var u=this._form.getElementsByTagName("input"),r,n,f=this._map.getZoom(),t=u.length-1;t>=0;t--)r=u[t],n=this._getLayer(r.layerId).layer,r.disabled=n.options.minZoom!==i&&f<n.options.minZoom||n.options.maxZoom!==i&&f>n.options.maxZoom},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}});r.control.layers=function(n,t,i){return new r.Control.Layers(n,t,i)}}(window,document),function(n){var t;if(typeof define=="function"&&define.amd)define(["leaflet"],n);else if(typeof module!="undefined")t=require("leaflet"),module.exports=n(t);else{if(typeof window.L=="undefined")throw"Leaflet must be loaded first";n(window.L)}}(function(n){"use strict";return n.Polyline._flat=n.Polyline._flat||function(t){return!n.Util.isArray(t[0])||typeof t[0][0]!="object"&&typeof t[0][0]!="undefined"},n.GeometryUtil=n.extend(n.GeometryUtil||{},{distance:function(n,t,i){return n.latLngToLayerPoint(t).distanceTo(n.latLngToLayerPoint(i))},distanceSegment:function(t,i,r,u){var f=t.latLngToLayerPoint(i),e=t.latLngToLayerPoint(r),o=t.latLngToLayerPoint(u);return n.LineUtil.pointToSegmentDistance(f,e,o)},readableDistance:function(n,t){var r=t!=="imperial",i;return r?i=n>1e3?(n/1e3).toFixed(2)+" km":Math.ceil(n)+" m":(n*=1.09361,i=n>1760?(n/1760).toFixed(2)+" miles":Math.ceil(n)+" yd"),i},belongsSegment:function(n,t,i,r){r=r===undefined?.2:r;var u=t.distanceTo(i),f=t.distanceTo(n)+n.distanceTo(i)-u;return f/u<r},length:function(t){var i=n.GeometryUtil.accumulatedLengths(t);return i.length>0?i[i.length-1]:0},accumulatedLengths:function(n){var i,r,t,u;if(typeof n.getLatLngs=="function"&&(n=n.getLatLngs()),n.length===0)return[];for(i=0,r=[0],t=0,u=n.length-1;t<u;t++)i+=n[t].distanceTo(n[t+1]),r.push(i);return r},closestOnSegment:function(t,i,r,u){var f=t.getMaxZoom();f===Infinity&&(f=t.getZoom());var e=t.project(i,f),o=t.project(r,f),s=t.project(u,f),h=n.LineUtil.closestPointOnSegment(e,o,s);return t.unproject(h,f)},closest:function(t,i,r,u){var o,h=Infinity,e=null,l,c,a,f,s,v,y,p;if(i instanceof Array){if(i[0]instanceof Array&&typeof i[0][0]!="number"){for(f=0;f<i.length;f++)s=n.GeometryUtil.closest(t,i[f],r,u),s.distance<h&&(h=s.distance,e=s);return e}if(i[0]instanceof n.LatLng||typeof i[0][0]=="number"||typeof i[0].lat=="number")i=n.polyline(i);else return e}if(!(i instanceof n.Polyline))return e;if(o=JSON.parse(JSON.stringify(i.getLatLngs().slice(0))),i instanceof n.Polygon&&(a=function(t){if(n.Polyline._flat(t))t.push(t[0]);else for(var i=0;i<t.length;i++)a(t[i])},a(o)),n.Polyline._flat(o)){if(u){for(f=0,l=o.length;f<l;f++)v=o[f],c=n.GeometryUtil.distance(t,r,v),c<h&&(h=c,e=v,e.distance=c);return e}for(f=0,l=o.length;f<l-1;f++)y=o[f],p=o[f+1],c=n.GeometryUtil.distanceSegment(t,r,y,p),c<=h&&(h=c,e=n.GeometryUtil.closestOnSegment(t,r,y,p),e.distance=c);return e}for(f=0;f<o.length;f++)s=n.GeometryUtil.closest(t,o[f],r,u),s.distance<h&&(h=s.distance,e=s);return e},closestLayer:function(t,i,r){for(var o=Infinity,c=null,f=null,e=Infinity,u,h,s=0,l=i.length;s<l;s++)u=i[s],u instanceof n.LayerGroup?(h=n.GeometryUtil.closestLayer(t,u.getLayers(),r),h.distance<o&&(o=h.distance,c=h)):(typeof u.getLatLng=="function"?(f=u.getLatLng(),e=n.GeometryUtil.distance(t,r,f)):(f=n.GeometryUtil.closest(t,u,r),f&&(e=f.distance)),e<o&&(o=e,c={layer:u,latlng:f,distance:e}));return c},nClosestLayers:function(t,i,r,u){var f,h,o,s,c,e,l;if(u=typeof u=="number"?u:i.length,u<1||i.length<1)return null;for(f=[],s=0,c=i.length;s<c;s++)e=i[s],e instanceof n.LayerGroup?(l=n.GeometryUtil.closestLayer(t,e.getLayers(),r),f.push(l)):(typeof e.getLatLng=="function"?(o=e.getLatLng(),h=n.GeometryUtil.distance(t,r,o)):(o=n.GeometryUtil.closest(t,e,r),o&&(h=o.distance)),f.push({layer:e,latlng:o,distance:h}));return f.sort(function(n,t){return n.distance-t.distance}),f.length>u?f.slice(0,u):f},layersWithin:function(t,i,r,u){var s,c,e;u=typeof u=="number"?u:Infinity;var h=[],f=null,o=0;for(s=0,c=i.length;s<c;s++)e=i[s],typeof e.getLatLng=="function"?(f=e.getLatLng(),o=n.GeometryUtil.distance(t,r,f)):(f=n.GeometryUtil.closest(t,e,r),f&&(o=f.distance)),f&&o<u&&h.push({layer:e,latlng:f,distance:o});return h.sort(function(n,t){return n.distance-t.distance})},closestLayerSnap:function(t,i,r,u,f){var e,o;return(u=typeof u=="number"?u:Infinity,f=typeof f=="boolean"?f:!0,e=n.GeometryUtil.closestLayer(t,i,r),!e||e.distance>u)?null:(f&&typeof e.layer.getLatLngs=="function"&&(o=n.GeometryUtil.closest(t,e.layer,e.latlng,!0),o.distance<u&&(e.latlng=o,e.distance=n.GeometryUtil.distance(t,o,r))),e)},interpolateOnPointSegment:function(t,i,r){return n.point(t.x*(1-r)+r*i.x,t.y*(1-r)+r*i.y)},interpolateOnLine:function(t,i,r){var h,e,f,v,u,p,w;if(i=i instanceof n.Polyline?i.getLatLngs():i,h=i.length,h<2)return null;if(r=Math.max(Math.min(r,1),0),r===0)return{latLng:i[0]instanceof n.LatLng?i[0]:n.latLng(i[0]),predecessor:-1};if(r==1)return{latLng:i[i.length-1]instanceof n.LatLng?i[i.length-1]:n.latLng(i[i.length-1]),predecessor:i.length-2};for(e=t.getMaxZoom(),e===Infinity&&(e=t.getZoom()),f=[],v=0,u=0;u<h;u++)f[u]=t.project(i[u],e),u>0&&(v+=f[u-1].distanceTo(f[u]));for(var y=v*r,c=f[0],o=f[1],l=0,s=c.distanceTo(o),a=1;a<h&&s<y;a++)c=o,l=s,o=f[a],s+=c.distanceTo(o);return p=s-l!=0?(y-l)/(s-l):0,w=n.GeometryUtil.interpolateOnPointSegment(c,o,p),{latLng:t.unproject(w,e),predecessor:a-2}},locateOnLine:function(t,i,r){var u=i.getLatLngs(),f,l,s,a;if(r.equals(u[0]))return 0;if(r.equals(u[u.length-1]))return 1;var h=n.GeometryUtil.closest(t,i,r,!1),e=n.GeometryUtil.accumulatedLengths(u),v=e[e.length-1],o=0,c=!1;for(f=0,l=u.length-1;f<l;f++)if(s=u[f],a=u[f+1],o=e[f],n.GeometryUtil.belongsSegment(h,s,a)){o+=s.distanceTo(h);c=!0;break}if(!c)throw"Could not interpolate "+r.toString()+" within "+i.toString();return o/v},reverse:function(t){return n.polyline(t.getLatLngs().slice(0).reverse())},extract:function(t,i,r,u){var s,o;if(r>u)return n.GeometryUtil.extract(t,n.GeometryUtil.reverse(i),1-r,1-u);r=Math.max(Math.min(r,1),0);u=Math.max(Math.min(u,1),0);var h=i.getLatLngs(),f=n.GeometryUtil.interpolateOnLine(t,i,r),e=n.GeometryUtil.interpolateOnLine(t,i,u);return r==u?(s=n.GeometryUtil.interpolateOnLine(t,i,u),[s.latLng]):(f.predecessor==-1&&(f.predecessor=0),e.predecessor==-1&&(e.predecessor=0),o=h.slice(f.predecessor+1,e.predecessor+1),o.unshift(f.latLng),o.push(e.latLng),o)},isBefore:function(n,t){if(!t)return!1;var i=n.getLatLngs(),r=t.getLatLngs();return i[i.length-1].equals(r[0])},isAfter:function(n,t){if(!t)return!1;var r=n.getLatLngs(),i=t.getLatLngs();return r[0].equals(i[i.length-1])},startsAtExtremity:function(n,t){if(!t)return!1;var u=n.getLatLngs(),i=t.getLatLngs(),r=u[0];return r.equals(i[0])||r.equals(i[i.length-1])},computeAngle:function(n,t){return Math.atan2(t.y-n.y,t.x-n.x)*180/Math.PI},computeSlope:function(n,t){var i=(t.y-n.y)/(t.x-n.x),r=n.y-i*n.x;return{a:i,b:r}},rotatePoint:function(t,i,r,u){var e=t.getMaxZoom();e===Infinity&&(e=t.getZoom());var o=r*Math.PI/180,s=t.project(i,e),f=t.project(u,e),h=Math.cos(o)*(s.x-f.x)-Math.sin(o)*(s.y-f.y)+f.x,c=Math.sin(o)*(s.x-f.x)+Math.cos(o)*(s.y-f.y)+f.y;return t.unproject(new n.Point(h,c),e)},bearing:function(n,t){var i=Math.PI/180,f=n.lat*i,r=t.lat*i,e=n.lng*i,o=t.lng*i,s=Math.sin(o-e)*Math.cos(r),h=Math.cos(f)*Math.sin(r)-Math.sin(f)*Math.cos(r)*Math.cos(o-e),u=(Math.atan2(s,h)*180/Math.PI+360)%360;return u>=180?u-360:u},destination:function(t,i,r){i=(i+360)%360;var f=Math.PI/180,e=180/Math.PI,o=6378137,p=t.lng*f,s=t.lat*f,h=i*f,c=Math.sin(s),l=Math.cos(s),a=Math.cos(r/o),v=Math.sin(r/o),y=Math.asin(c*a+l*v*Math.cos(h)),u=p+Math.atan2(Math.sin(h)*v*l,a-c*Math.sin(y));return u=u*e,u=u>180?u-360:u<-180?u+360:u,n.latLng([y*e,u])}}),n.GeometryUtil});!function(n){if("object"==typeof exports)module.exports=n();else if("function"==typeof define&&define.amd)define(n);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self);t.wellknown=n()}}(function(){return function n(t,i,r){function f(u,o){var h,s;if(!i[u]){if(!t[u]){if(h=typeof require=="function"&&require,!o&&h)return h(u,!0);if(e)return e(u,!0);throw new Error("Cannot find module '"+u+"'");}s=i[u]={exports:{}};t[u][0].call(s.exports,function(n){var i=t[u][1][n];return f(i?i:n)},s,s.exports,n,t,i,r)}return i[u].exports}for(var e=typeof require=="function"&&require,u=0;u<r.length;u++)f(r[u]);return f}({1:[function(n,t){function i(n){function t(t){var i=n.substring(e).match(t);return i?(e+=i[0].length,i[0]):null}function h(n){return n&&f.match(/\d+/)&&(n.crs={type:"name",properties:{name:"urn:ogc:def:crs:EPSG::"+f}}),n}function i(){t(/^\s*/)}function r(){i();for(var f=0,e=[],n=[e],r=e,u;u=t(/^(\()/)||t(/^(\))/)||t(/^(\,)/)||t(/^[-+]?([0-9]*\.[0-9]+|[0-9]+)/);){if(u=="(")n.push(r),r=[],n[n.length-1].push(r),f++;else if(u==")"){if(r=n.pop(),f--,f==0)break}else u===","?(r=[],n[n.length-1].push(r)):r.push(parseFloat(u));i()}return(n.length=0,f!==0)?null:e}function o(){for(var r=[],n,u;u=t(/^[-+]?([0-9]*\.[0-9]+|[0-9]+)/)||t(/^(\,)/);)u==","?(r.push(n),n=[]):(n||(n=[]),n.push(parseFloat(u))),i();return n&&r.push(n),r.length?r:null}function c(){if(!t(/^(point)/i)||(i(),!t(/^(\()/)))return null;var n=o();return(i(),!t(/^(\))/))?null:{type:"Point",coordinates:n[0]}}function l(){if(!t(/^(multipoint)/i))return null;i();var n=r();return i(),{type:"MultiPoint",coordinates:n}}function a(){if(!t(/^(multilinestring)/i))return null;i();var n=r();return i(),{type:"MultiLineString",coordinates:n}}function v(){if(!t(/^(linestring)/i)||(i(),!t(/^(\()/)))return null;var n=o();return t(/^(\))/)?{type:"LineString",coordinates:n}:null}function y(){return t(/^(polygon)/i)?(i(),{type:"Polygon",coordinates:r()}):null}function p(){return t(/^(multipolygon)/i)?(i(),{type:"MultiPolygon",coordinates:r()}):null}function w(){var n=[],r;if(!t(/^(geometrycollection)/i)||(i(),!t(/^(\()/)))return null;while(r=s())n.push(r),i(),t(/^(\,)/),i();return t(/^(\))/)?{type:"GeometryCollection",geometries:n}:null}function s(){return c()||v()||y()||l()||a()||p()||w()}var u=n.split(";"),n=u.pop(),f=(u.shift()||"").split("=").pop(),e=0;return h(s())}t.exports=i},{}]},{},[1])(1)});!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(n.topojson=n.topojson||{})}(this,function(n){"use strict";function r(){}function u(n){if(!n)return r;var t,i,u=n.scale[0],f=n.scale[1],e=n.translate[0],o=n.translate[1];return function(n,r){r||(t=i=0);n[0]=(t+=n[0])*u+e;n[1]=(i+=n[1])*f+o}}function c(n){if(!n)return r;var t,i,u=n.scale[0],f=n.scale[1],e=n.translate[0],o=n.translate[1];return function(n,r){r||(t=i=0);var s=Math.round((n[0]-e)/u),h=Math.round((n[1]-o)/f);n[0]=s-t;n[1]=h-i;t=s;i=h}}function l(n,t){for(var u,i=n.length,r=i-t;r<--i;)u=n[r],n[r++]=n[i],n[i]=u}function f(n,t){for(var u,i=0,r=n.length;r>i;)u=i+r>>>1,n[u]<t?i=u+1:r=u;return i}function a(n,t){return"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map(function(t){return e(n,t)})}:e(n,t)}function e(n,i){var r={type:"Feature",id:i.id,properties:i.properties||{},geometry:t(n,i)};return null==i.id&&delete r.id,r}function t(n,t){function h(n,t){t.length&&t.pop();for(var r,u=a[0>n?~n:n],i=0,f=u.length;f>i;++i)t.push(r=u[i].slice()),o(r,i);0>n&&l(t,f)}function r(n){return n=n.slice(),o(n,0),n}function i(n){for(var t=[],i=0,r=n.length;r>i;++i)h(n[i],t);return t.length<2&&t.push(t[0].slice()),t}function c(n){for(var t=i(n);t.length<4;)t.push(t[0].slice());return t}function f(n){return n.map(c)}function e(n){var t=n.type;return"GeometryCollection"===t?{type:t,geometries:n.geometries.map(e)}:t in s?{type:t,coordinates:s[t](n)}:null}var o=u(n.transform),a=n.arcs,s={Point:function(n){return r(n.coordinates)},MultiPoint:function(n){return n.coordinates.map(r)},LineString:function(n){return i(n.arcs)},MultiLineString:function(n){return n.arcs.map(i)},Polygon:function(n){return f(n.arcs)},MultiPolygon:function(n){return n.arcs.map(f)}};return e(t)}function o(n,t){function s(t){var i,r=n.arcs[0>t?~t:t],u=r[0];return n.transform?(i=[0,0],r.forEach(function(n){i[0]+=n[0];i[1]+=n[1]})):i=r[r.length-1],0>t?[i,u]:[u,i]}function f(n,t){var r,i;for(r in n)i=n[r],delete t[i.start],delete i.start,delete i.end,i.forEach(function(n){e[0>n?~n:n]=1}),u.push(i)}var e={},i={},r={},u=[],o=-1;return t.forEach(function(i,r){var f,u=n.arcs[0>i?~i:i];u.length<3&&!u[1][0]&&!u[1][1]&&(f=t[++o],t[o]=i,t[r]=f)}),t.forEach(function(n){var t,u,c=s(n),f=c[0],e=c[1],o,h;(t=r[f])?(delete r[t.end],t.push(n),t.end=e,u=i[e])?(delete i[u.start],o=u===t?t:t.concat(u),i[o.start=t.start]=r[o.end=u.end]=o):i[t.start]=r[t.end]=t:(t=i[e])?(delete i[t.start],t.unshift(n),t.start=f,u=r[f])?(delete r[u.end],h=u===t?t:u.concat(t),i[h.start=u.start]=r[h.end=t.end]=h):i[t.start]=r[t.end]=t:(t=[n],i[t.start=f]=r[t.end=e]=t)}),f(r,i),f(i,r),t.forEach(function(n){e[0>n?~n:n]||u.push([n])}),u}function v(n){return t(n,s.apply(this,arguments))}function s(n,t,i){function v(n){var t=0>n?~n:n;(u[t]||(u[t]=[])).push({i:n,g:l})}function h(n){n.forEach(v)}function e(n){n.forEach(h)}function c(n){"GeometryCollection"===n.type?n.geometries.forEach(c):n.type in s&&(l=n,s[n.type](n.arcs))}var r=[],l,u,s,f,a;if(arguments.length>1)u=[],s={LineString:h,MultiLineString:e,Polygon:e,MultiPolygon:function(n){n.forEach(e)}},c(t),u.forEach(arguments.length<3?function(n){r.push(n[0].i)}:function(n){i(n[0].g,n[n.length-1].g)&&r.push(n[0].i)});else for(f=0,a=n.arcs.length;a>f;++f)r.push(f);return{type:"MultiLineString",arcs:o(n,r)}}function y(n){var t=n[0],i=n[1],r=n[2];return Math.abs((t[0]-r[0])*(i[1]-t[1])-(t[0]-i[0])*(r[1]-t[1]))}function p(n){for(var i,r=-1,u=n.length,t=n[u-1],f=0;++r<u;)i=t,t=n[r],f+=i[0]*t[1]-i[1]*t[0];return f/2}function w(n){return t(n,h.apply(this,arguments))}function h(n,i){function f(n){n.forEach(function(t){t.forEach(function(t){(r[t=0>t?~t:t]||(r[t]=[])).push(n)})});u.push(n)}function e(i){return Math.abs(p(t(n,{type:"Polygon",arcs:[i]}).coordinates[0]))}var r={},u=[],s=[];return i.forEach(function(n){"Polygon"===n.type?f(n.arcs):"MultiPolygon"===n.type&&n.arcs.forEach(f)}),u.forEach(function(n){if(!n._){var t=[],i=[n];for(n._=1,s.push(t);n=i.pop();)t.push(n),n.forEach(function(n){n.forEach(function(n){r[0>n?~n:n].forEach(function(n){n._||(n._=1,i.push(n))})})})}}),u.forEach(function(n){delete n._}),{type:"MultiPolygon",arcs:s.map(function(t){var s,i=[],h,c,u,f;if(t.forEach(function(n){n.forEach(function(n){n.forEach(function(n){r[0>n?~n:n].length<2&&i.push(n)})})}),i=o(n,i),(s=i.length)>1)for(u=1,f=e(i[0]);s>u;++u)(h=e(i[u]))>f&&(c=i[0],i[0]=i[u],i[u]=c,f=h);return i})}}function b(n){function a(n,t){n.forEach(function(n){0>n&&(n=~n);var i=e[n];i?i.push(t):e[n]=[t]})}function h(n,t){n.forEach(function(n){a(n,t)})}function v(n,t){"GeometryCollection"===n.type?n.geometries.forEach(function(n){v(n,t)}):n.type in y&&y[n.type](n.arcs,t)}var e={},c=n.map(function(){return[]}),y={LineString:a,MultiLineString:h,Polygon:h,MultiPolygon:function(n,t){n.forEach(function(n){h(n,t)})}},t,s,i,r,u;n.forEach(v);for(t in e)for(var l=e[t],p=l.length,o=0;p>o;++o)for(s=o+1;p>s;++s)r=l[o],u=l[s],(i=c[r])[t=f(i,u)]!==u&&i.splice(t,0,u),(i=c[u])[t=f(i,r)]!==r&&i.splice(t,0,r);return c}function i(n,t){return n[1][2]-t[1][2]}function k(){function u(t,r){for(;r>0;){var f=(r+1>>1)-1,u=n[f];if(i(t,u)>=0)break;n[u._=r]=u;n[t._=r=f]=t}}function f(r,u){for(;;){var o=u+1<<1,s=o-1,e=u,f=n[e];if(t>s&&i(n[s],f)<0&&(f=n[e=s]),t>o&&i(n[o],f)<0&&(f=n[e=o]),e===u)break;n[f._=u]=f;n[r._=u=e]=r}}var r={},n=[],t=0;return r.push=function(i){return u(n[i._=t]=i,t++),t},r.pop=function(){if(!(0>=t)){var i,r=n[0];return--t>0&&(i=n[t],f(n[i._=0]=i,0)),r}},r.remove=function(r){var o,e=r._;if(n[e]===r)return e!==--t&&(o=n[t],(i(o,r)<0?u:f)(n[o._=e]=o,e)),e},r}function d(n,t){function r(n){i.remove(n);n[1][2]=t(n);i.push(n)}var f=u(n.transform),e=c(n.transform),i=k();return t||(t=y),n.arcs.forEach(function(n){for(var o,a,l=[],v=0,h,c,u=0,s=n.length;s>u;++u)a=n[u],f(n[u]=[a[0],a[1],1/0],u);for(u=1,s=n.length-1;s>u;++u)o=n.slice(u-1,u+2),o[1][2]=t(o),l.push(o),i.push(o);for(u=0,s=l.length;s>u;++u)o=l[u],o.previous=l[u-1],o.next=l[u+1];for(;o=i.pop();)h=o.previous,c=o.next,o[1][2]<v?o[1][2]=v:v=o[1][2],h&&(h.next=c,h[2]=o[2],r(h)),c&&(c.previous=h,c[0]=o[0],r(c));n.forEach(e)}),n}n.version="1.6.26";n.mesh=v;n.meshArcs=s;n.merge=w;n.mergeArcs=h;n.feature=a;n.neighbors=b;n.presimplify=d});!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("leaflet")):"function"==typeof define&&define.amd?define(["exports","leaflet"],t):t((n.L=n.L||{},n.L.esri=n.L.esri||{}),n.L)}(this,function(n,t){"use strict";function li(n,t){for(var i=0;i<n.length;i++)if(n[i]!==t[i])return!1;return!0}function tt(n){return li(n[0],n[n.length-1])||n.push(n[0]),n}function it(n){var i,u=0,t=0,f=n.length,r=n[t];for(t;f-1>t;t++)i=n[t+1],u+=(i[0]-r[0])*(i[1]+r[1]),r=i;return u>=0}function ai(n,t,i,r){var o=(r[0]-i[0])*(n[1]-i[1])-(r[1]-i[1])*(n[0]-i[0]),s=(t[0]-n[0])*(n[1]-i[1])-(t[1]-n[1])*(n[0]-i[0]),u=(r[1]-i[1])*(t[0]-n[0])-(r[0]-i[0])*(t[1]-n[1]),f,e;return 0!==u&&(f=o/u,e=s/u,f>=0&&1>=f&&e>=0&&1>=e)?!0:!1}function ht(n,t){for(var r,i=0;i<n.length-1;i++)for(r=0;r<t.length-1;r++)if(ai(n[i],n[i+1],t[r],t[r+1]))return!0;return!1}function vi(n,t){for(var u=!1,i=-1,f=n.length,r=f-1;++i<f;r=i)(n[i][1]<=t[1]&&t[1]<n[r][1]||n[r][1]<=t[1]&&t[1]<n[i][1])&&t[0]<(n[r][0]-n[i][0])*(t[1]-n[i][1])/(n[r][1]-n[i][1])+n[i][0]&&(u=!u);return u}function yi(n,t){var i=ht(n,t),r=vi(n,t[0]);return!(i||!r)}function pi(n){for(var u,l,e,h,c,i,f,r,t=[],o=[],s=0;s<n.length;s++)u=tt(n[s].slice(0)),u.length<4||(it(u)?(l=[u],t.push(l)):o.push(u));for(e=[];o.length;){for(r=o.pop(),h=!1,i=t.length-1;i>=0;i--)if(f=t[i][0],yi(f,r)){t[i].push(r);h=!0;break}h||e.push(r)}for(;e.length;){for(r=e.pop(),c=!1,i=t.length-1;i>=0;i--)if(f=t[i][0],ht(f,r)){t[i].push(r);c=!0;break}c||t.push([r.reverse()])}return 1===t.length?{type:"Polygon",coordinates:t[0]}:{type:"MultiPolygon",coordinates:t}}function ct(n){var u=[],f=n.slice(0),i=tt(f.shift().slice(0)),r,t;if(i.length>=4)for(it(i)||i.reverse(),u.push(i),r=0;r<f.length;r++)t=tt(f[r].slice(0)),t.length>=4&&(it(t)&&t.reverse(),u.push(t));return u}function wi(n){for(var u,i,f,r=[],t=0;t<n.length;t++)for(u=ct(n[t]),i=u.length-1;i>=0;i--)f=u[i].slice(0),r.push(f);return r}function lt(n){var i={},t;for(t in n)n.hasOwnProperty(t)&&(i[t]=n[t]);return i}function at(n,t){var i={};return"number"==typeof n.x&&"number"==typeof n.y&&(i.type="Point",i.coordinates=[n.x,n.y]),n.points&&(i.type="MultiPoint",i.coordinates=n.points.slice(0)),n.paths&&(1===n.paths.length?(i.type="LineString",i.coordinates=n.paths[0].slice(0)):(i.type="MultiLineString",i.coordinates=n.paths.slice(0))),n.rings&&(i=pi(n.rings.slice(0))),(n.geometry||n.attributes)&&(i.type="Feature",i.geometry=n.geometry?at(n.geometry):null,i.properties=n.attributes?lt(n.attributes):null,n.attributes&&(i.id=n.attributes[t]||n.attributes.OBJECTID||n.attributes.FID)),i}function l(n,t){t=t||"OBJECTID";var r,u={wkid:4326},i={};switch(n.type){case"Point":i.x=n.coordinates[0];i.y=n.coordinates[1];i.spatialReference=u;break;case"MultiPoint":i.points=n.coordinates.slice(0);i.spatialReference=u;break;case"LineString":i.paths=[n.coordinates.slice(0)];i.spatialReference=u;break;case"MultiLineString":i.paths=n.coordinates.slice(0);i.spatialReference=u;break;case"Polygon":i.rings=ct(n.coordinates.slice(0));i.spatialReference=u;break;case"MultiPolygon":i.rings=wi(n.coordinates.slice(0));i.spatialReference=u;break;case"Feature":n.geometry&&(i.geometry=l(n.geometry,t));i.attributes=n.properties?lt(n.properties):{};n.id&&(i.attributes[t]=n.id);break;case"FeatureCollection":for(i=[],r=0;r<n.features.length;r++)i.push(l(n.features[r],t));break;case"GeometryCollection":for(i=[],r=0;r<n.geometries.length;r++)i.push(l(n.geometries[r],t))}return i}function rt(n,t){return l(n,t)}function vt(n,t){return at(n,t)}function bi(n){var i={},t;for(t in n)n.hasOwnProperty(t)&&(i[t]=n[t]);return i}function ki(n){var i=t.latLng(n.ymin,n.xmin),r=t.latLng(n.ymax,n.xmax);return t.latLngBounds(i,r)}function di(n){return n=t.latLngBounds(n),{xmin:n.getSouthWest().lng,ymin:n.getSouthWest().lat,xmax:n.getNorthEast().lng,ymax:n.getNorthEast().lat,spatialReference:{wkid:4326}}}function gi(n,t){var i,r,e,u,f,o;if(t)i=t;else if(n.objectIdFieldName)i=n.objectIdFieldName;else if(n.fields){for(r=0;r<=n.fields.length-1;r++)if("esriFieldTypeOID"===n.fields[r].type){i=n.fields[r].name;break}}else i="OBJECTID";if(e={type:"FeatureCollection",features:[]},u=n.features||n.results,u.length)for(f=u.length-1;f>=0;f--)o=vt(u[f],i),e.features.push(o);return e}function e(n){return n=t.Util.trim(n),"/"!==n[n.length-1]&&(n+="/"),n}function nr(n){return/\.arcgis\.com.*?FeatureServer/g.test(n)}function tr(n){var t;switch(n){case"Point":t="esriGeometryPoint";break;case"MultiPoint":t="esriGeometryMultipoint";break;case"LineString":t="esriGeometryPolyline";break;case"MultiLineString":t="esriGeometryPolyline";break;case"Polygon":t="esriGeometryPolygon";break;case"MultiPolygon":t="esriGeometryPolygon"}return t}function a(){console&&console.warn&&console.warn.apply(console,arguments)}function v(n){var i="",r,f,t,u;n.f=n.f||"json";for(r in n)n.hasOwnProperty(r)&&(t=n[r],u=Object.prototype.toString.call(t),i.length&&(i+="&"),f="[object Array]"===u?"[object Object]"===Object.prototype.toString.call(t[0])?JSON.stringify(t):t.join(","):"[object Object]"===u?JSON.stringify(t):"[object Date]"===u?t.valueOf():t,i+=encodeURIComponent(r)+"="+encodeURIComponent(f));return i}function ut(n,i){var r=new window.XMLHttpRequest;return r.onerror=function(){r.onreadystatechange=t.Util.falseFn;n.call(i,{error:{code:500,message:"XMLHttpRequest error"}},null)},r.onreadystatechange=function(){var u,f;if(4===r.readyState){try{u=JSON.parse(r.responseText)}catch(e){u=null;f={code:500,message:"Could not parse response as JSON. This could also be caused by a CORS or XMLHttpRequest error."}}!f&&u.error&&(f=u.error,u=null);r.onerror=t.Util.falseFn;n.call(i,f,u)}},r.ontimeout=function(){this.onerror()},r}function yt(n,t,i,r){var u=ut(i,r);return u.open("POST",n),"undefined"!=typeof r&&null!==r&&"undefined"!=typeof r.options&&(u.timeout=r.options.timeout),u.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),u.send(v(t)),u}function pt(n,t,i,r){var u=ut(i,r);return u.open("GET",n+"?"+v(t),!0),"undefined"!=typeof r&&null!==r&&"undefined"!=typeof r.options&&(u.timeout=r.options.timeout),u.send(null),u}function wt(n,t,i,r){var e=v(t),u=ut(i,r),f=(n+"?"+e).length;if(2e3>=f&&o.cors?u.open("GET",n+"?"+e):f>2e3&&o.cors&&(u.open("POST",n),u.setRequestHeader("Content-Type","application/x-www-form-urlencoded")),"undefined"!=typeof r&&null!==r&&"undefined"!=typeof r.options&&(u.timeout=r.options.timeout),2e3>=f&&o.cors)u.send(null);else{if(!(f>2e3&&o.cors))return 2e3>=f&&!o.cors?y(n,t,i,r):void a("a request to "+n+" was longer then 2000 characters and this browser cannot make a cross-domain post request. Please use a proxy http://esri.github.io/esri-leaflet/api-reference/request.html");u.send(e)}return u}function y(n,i,r,u){var f,e;return window._EsriLeafletCallbacks=window._EsriLeafletCallbacks||{},f="c"+ti,i.callback="window._EsriLeafletCallbacks."+f,window._EsriLeafletCallbacks[f]=function(n){if(window._EsriLeafletCallbacks[f]!==!0){var t,i=Object.prototype.toString.call(n);"[object Object]"!==i&&"[object Array]"!==i&&(t={error:{code:500,message:"Expected array or object as JSONP response"}},n=null);!t&&n.error&&(t=n,n=null);r.call(u,t,n);window._EsriLeafletCallbacks[f]=!0}},e=t.DomUtil.create("script",null,document.body),e.type="text/javascript",e.src=n+"?"+v(i),e.id=f,ti++,{id:f,url:e.src,abort:function(){window._EsriLeafletCallbacks._callback[f]({code:0,message:"Request aborted."})}}}function ir(n){return new s(n)}function p(n){return new ii(n)}function bt(n){return new ri(n)}function rr(n){return new d(n)}function kt(n){return new ui(n)}function dt(n){return new fi(n)}function ur(n){return new h(n)}function ft(n){return new ei(n)}function gt(n){return new oi(n)}function ni(n){return new si(n)}function fr(n){return new lr(n)}function er(n,t){return new g(n,t)}function or(n,t){return new et(n,t)}function sr(n,t){return new hi(n,t)}function hr(n,t){return new ci(n,t)}function u(n){this.values=[].concat(n||[])}function cr(n){return new st(n)}var c,st;t="default"in t?t["default"]:t;var w=window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest,f=""===document.documentElement.style.pointerEvents,o={cors:w,pointerEvents:f},r={shallowClone:bi,warn:a,cleanUrl:e,isArcgisOnline:nr,geojsonTypeToArcGIS:tr,responseToFeatureCollection:gi,geojsonToArcGIS:rt,arcgisToGeoJSON:vt,boundsToExtent:di,extentToBounds:ki},ti=0,b=o.cors?pt:y;b.CORS=pt;b.JSONP=y;var k={request:wt,get:b,post:yt},s=t.Class.extend({options:{proxy:!1,useCors:w},generateSetter:function(n,i){return t.Util.bind(function(t){return this.params[n]=t,this},i)},initialize:function(n){var i,r;if(n.request&&n.options?(this._service=n,t.Util.setOptions(this,n.options)):(t.Util.setOptions(this,n),this.options.url=e(n.url)),this.params=t.Util.extend({},this.params||{}),this.setters)for(i in this.setters)r=this.setters[i],this[i]=this.generateSetter(r,this)},token:function(n){return this._service?this._service.authenticate(n):this.params.token=n,this},request:function(n,t){return this._service?this._service.request(this.path,this.params,n,t):this._request("request",this.path,this.params,n,t)},_request:function(n,t,i,r,u){var f=this.options.proxy?this.options.proxy+"?"+this.options.url+t:this.options.url+t;return"get"!==n&&"request"!==n||this.options.useCors?k[n](f,i,r,u):k.get.JSONP(f,i,r,u)}}),ii=s.extend({setters:{offset:"offset",limit:"limit",fields:"outFields",precision:"geometryPrecision",featureIds:"objectIds",returnGeometry:"returnGeometry",token:"token"},path:"query",params:{returnGeometry:!0,where:"1=1",outSr:4326,outFields:"*"},within:function(n){return this._setGeometry(n),this.params.spatialRel="esriSpatialRelContains",this},intersects:function(n){return this._setGeometry(n),this.params.spatialRel="esriSpatialRelIntersects",this},contains:function(n){return this._setGeometry(n),this.params.spatialRel="esriSpatialRelWithin",this},crosses:function(n){return this._setGeometry(n),this.params.spatialRel="esriSpatialRelCrosses",this},touches:function(n){return this._setGeometry(n),this.params.spatialRel="esriSpatialRelTouches",this},overlaps:function(n){return this._setGeometry(n),this.params.spatialRel="esriSpatialRelOverlaps",this},nearby:function(n,i){return n=t.latLng(n),this.params.geometry=[n.lng,n.lat],this.params.geometryType="esriGeometryPoint",this.params.spatialRel="esriSpatialRelIntersects",this.params.units="esriSRUnit_Meter",this.params.distance=i,this.params.inSr=4326,this},where:function(n){return this.params.where=n,this},between:function(n,t){return this.params.time=[n.valueOf(),t.valueOf()],this},simplify:function(n,t){var i=Math.abs(n.getBounds().getWest()-n.getBounds().getEast());return this.params.maxAllowableOffset=i/n.getSize().y*t,this},orderBy:function(n,t){return t=t||"ASC",this.params.orderByFields=this.params.orderByFields?this.params.orderByFields+",":"",this.params.orderByFields+=[n,t].join(" "),this},run:function(n,t){return this._cleanParams(),r.isArcgisOnline(this.options.url)?(this.params.f="geojson",this.request(function(i,r){this._trapSQLerrors(i);n.call(t,i,r,r)},this)):this.request(function(i,u){this._trapSQLerrors(i);n.call(t,i,u&&r.responseToFeatureCollection(u),u)},this)},count:function(n,t){return this._cleanParams(),this.params.returnCountOnly=!0,this.request(function(t,i){n.call(this,t,i&&i.count,i)},t)},ids:function(n,t){return this._cleanParams(),this.params.returnIdsOnly=!0,this.request(function(t,i){n.call(this,t,i&&i.objectIds,i)},t)},bounds:function(n,t){return this._cleanParams(),this.params.returnExtentOnly=!0,this.request(function(i,u){n.call(t,i,u&&u.extent&&r.extentToBounds(u.extent),u)},t)},pixelSize:function(n){return n=t.point(n),this.params.pixelSize=[n.x,n.y],this},layer:function(n){return this.path=n+"/query",this},_trapSQLerrors:function(n){n&&"400"===n.code&&r.warn("one common syntax error in query requests is encasing string values in double quotes instead of single quotes")},_cleanParams:function(){delete this.params.returnIdsOnly;delete this.params.returnExtentOnly;delete this.params.returnCountOnly},_setGeometry:function(n){return this.params.inSr=4326,n instanceof t.LatLngBounds?(this.params.geometry=r.boundsToExtent(n),void(this.params.geometryType="esriGeometryEnvelope")):(n.getLatLng&&(n=n.getLatLng()),n instanceof t.LatLng&&(n={type:"Point",coordinates:[n.lng,n.lat]}),n instanceof t.GeoJSON&&(n=n.getLayers()[0].feature.geometry,this.params.geometry=r.geojsonToArcGIS(n),this.params.geometryType=r.geojsonTypeToArcGIS(n.type)),n.toGeoJSON&&(n=n.toGeoJSON()),"Feature"===n.type&&(n=n.geometry),"Point"===n.type||"LineString"===n.type||"Polygon"===n.type?(this.params.geometry=r.geojsonToArcGIS(n),void(this.params.geometryType=r.geojsonTypeToArcGIS(n.type))):void r.warn("invalid geometry passed to spatial query. Should be an L.LatLng, L.LatLngBounds or L.Marker or a GeoJSON Point Line or Polygon object"))}}),ri=s.extend({setters:{contains:"contains",text:"searchText",fields:"searchFields",spatialReference:"sr",sr:"sr",layers:"layers",returnGeometry:"returnGeometry",maxAllowableOffset:"maxAllowableOffset",precision:"geometryPrecision",dynamicLayers:"dynamicLayers",returnZ:"returnZ",returnM:"returnM",gdbVersion:"gdbVersion",token:"token"},path:"find",params:{sr:4326,contains:!0,returnGeometry:!0,returnZ:!0,returnM:!1},layerDefs:function(n,t){return this.params.layerDefs=this.params.layerDefs?this.params.layerDefs+";":"",this.params.layerDefs+=[n,t].join(":"),this},simplify:function(n,t){var i=Math.abs(n.getBounds().getWest()-n.getBounds().getEast());return this.params.maxAllowableOffset=i/n.getSize().y*t,this},run:function(n,t){return this.request(function(i,u){n.call(t,i,u&&r.responseToFeatureCollection(u),u)},t)}}),d=s.extend({path:"identify",between:function(n,t){return this.params.time=[n.valueOf(),t.valueOf()],this}}),ui=d.extend({setters:{layers:"layers",precision:"geometryPrecision",tolerance:"tolerance",returnGeometry:"returnGeometry"},params:{sr:4326,layers:"all",tolerance:3,returnGeometry:!0},on:function(n){var t=r.boundsToExtent(n.getBounds()),i=n.getSize();return this.params.imageDisplay=[i.x,i.y,96],this.params.mapExtent=[t.xmin,t.ymin,t.xmax,t.ymax],this},at:function(n){return n=t.latLng(n),this.params.geometry=[n.lng,n.lat],this.params.geometryType="esriGeometryPoint",this},layerDef:function(n,t){return this.params.layerDefs=this.params.layerDefs?this.params.layerDefs+";":"",this.params.layerDefs+=[n,t].join(":"),this},simplify:function(n,t){var i=Math.abs(n.getBounds().getWest()-n.getBounds().getEast());return this.params.maxAllowableOffset=i/n.getSize().y*(1-t),this},run:function(n,t){return this.request(function(i,u){var e,f,o;if(i)return void n.call(t,i,void 0,u);for(e=r.responseToFeatureCollection(u),u.results=u.results.reverse(),f=0;f<e.features.length;f++)o=e.features[f],o.layerId=u.results[f].layerId;n.call(t,void 0,e,u)})}}),fi=d.extend({setters:{setMosaicRule:"mosaicRule",setRenderingRule:"renderingRule",setPixelSize:"pixelSize",returnCatalogItems:"returnCatalogItems",returnGeometry:"returnGeometry"},params:{returnGeometry:!1},at:function(n){return n=t.latLng(n),this.params.geometry=JSON.stringify({x:n.lng,y:n.lat,spatialReference:{wkid:4326}}),this.params.geometryType="esriGeometryPoint",this},getMosaicRule:function(){return this.params.mosaicRule},getRenderingRule:function(){return this.params.renderingRule},getPixelSize:function(){return this.params.pixelSize},run:function(n,t){return this.request(function(i,r){n.call(t,i,r&&this._responseToGeoJSON(r),r)},this)},_responseToGeoJSON:function(n){var f=n.location,e=n.catalogItems,u=n.catalogItemVisibilities,t={pixel:{type:"Feature",geometry:{type:"Point",coordinates:[f.x,f.y]},crs:{type:"EPSG",properties:{code:f.spatialReference.wkid}},properties:{OBJECTID:n.objectId,name:n.name,value:n.value},id:n.objectId}},i;if(n.properties&&n.properties.Values&&(t.pixel.properties.values=n.properties.Values),e&&e.features&&(t.catalogItems=r.responseToFeatureCollection(e),u&&u.length===t.catalogItems.features.length))for(i=u.length-1;i>=0;i--)t.catalogItems.features[i].properties.catalogItemVisibility=u[i];return t}}),h=t.Evented.extend({options:{proxy:!1,useCors:w,timeout:0},initialize:function(n){n=n||{};this._requestQueue=[];this._authenticating=!1;t.Util.setOptions(this,n);this.options.url=e(this.options.url)},get:function(n,t,i,r){return this._request("get",n,t,i,r)},post:function(n,t,i,r){return this._request("post",n,t,i,r)},request:function(n,t,i,r){return this._request("request",n,t,i,r)},metadata:function(n,t){return this._request("get","",{},n,t)},authenticate:function(n){return this._authenticating=!1,this.options.token=n,this._runQueue(),this},getTimeout:function(){return this.options.timeout},setTimeout:function(n){this.options.timeout=n},_request:function(n,t,i,r,u){var f,e;return(this.fire("requeststart",{url:this.options.url+t,params:i,method:n},!0),f=this._createServiceCallback(n,t,i,r,u),this.options.token&&(i.token=this.options.token),this._authenticating)?void this._requestQueue.push([n,t,i,r,u]):(e=this.options.proxy?this.options.proxy+"?"+this.options.url+t:this.options.url+t,"get"!==n&&"request"!==n||this.options.useCors?k[n](e,i,f,u):k.get.JSONP(e,i,f,u))},_createServiceCallback:function(n,i,r,u,f){return t.Util.bind(function(e,o){e&&(499===e.code||498===e.code)&&(this._authenticating=!0,this._requestQueue.push([n,i,r,u,f]),this.fire("authenticationrequired",{authenticate:t.Util.bind(this.authenticate,this)},!0),e.authenticate=t.Util.bind(this.authenticate,this));u.call(f,e,o);e?this.fire("requesterror",{url:this.options.url+i,params:r,message:e.message,code:e.code,method:n},!0):this.fire("requestsuccess",{url:this.options.url+i,params:r,response:o,method:n},!0);this.fire("requestend",{url:this.options.url+i,params:r,method:n},!0)},this)},_runQueue:function(){for(var t,i,n=this._requestQueue.length-1;n>=0;n--)t=this._requestQueue[n],i=t.shift(),this[i].apply(this,t);this._requestQueue=[]}}),ei=h.extend({identify:function(){return kt(this)},find:function(){return bt(this)},query:function(){return p(this)}}),oi=h.extend({query:function(){return p(this)},identify:function(){return dt(this)}}),si=h.extend({options:{idAttribute:"OBJECTID"},query:function(){return p(this)},addFeature:function(n,t,i){return delete n.id,n=rt(n),this.post("addFeatures",{features:[n]},function(n,r){var u=r&&r.addResults?r.addResults[0]:void 0;t&&t.call(i,n||r.addResults[0].error,u)},i)},updateFeature:function(n,t,i){return n=rt(n,this.options.idAttribute),this.post("updateFeatures",{features:[n]},function(n,r){var u=r&&r.updateResults?r.updateResults[0]:void 0;t&&t.call(i,n||r.updateResults[0].error,u)},i)},deleteFeature:function(n,t,i){return this.post("deleteFeatures",{objectIds:n},function(n,r){var u=r&&r.deleteResults?r.deleteResults[0]:void 0;t&&t.call(i,n||r.deleteResults[0].error,u)},i)},deleteFeatures:function(n,t,i){return this.post("deleteFeatures",{objectIds:n},function(n,r){var u=r&&r.deleteResults?r.deleteResults:void 0;t&&t.call(i,n||r.deleteResults[0].error,u)},i)}}),lr=t.Control.extend({options:{position:"bottomright",marginTop:0,marginLeft:0,marginBottom:0,marginRight:0},onAdd:function(){var n=t.DomUtil.create("div","esri-leaflet-logo");return n.style.marginTop=this.options.marginTop,n.style.marginLeft=this.options.marginLeft,n.style.marginBottom=this.options.marginBottom,n.style.marginRight=this.options.marginRight,n.innerHTML='<a href="http://www.esri.com" target="_blank" style="border: none;"><img src="https://js.arcgis.com/3.13/esri/images/map/logo-sm.png" alt="Powered by Esri" style="border: none;"><\/a>',n}}),i="https:"!==window.location.protocol?"http:":"https:",g=t.TileLayer.extend({statics:{TILES:{Streets:{urlTemplate:i+"//{s}.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}",attributionUrl:"https://static.arcgis.com/attribution/World_Street_Map",options:{hideLogo:!1,logoPosition:"bottomright",minZoom:1,maxZoom:19,subdomains:["server","services"],attribution:"Esri"}},Topographic:{urlTemplate:i+"//{s}.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}",attributionUrl:"https://static.arcgis.com/attribution/World_Topo_Map",options:{hideLogo:!1,logoPosition:"bottomright",minZoom:1,maxZoom:19,subdomains:["server","services"],attribution:"Esri"}},Oceans:{urlTemplate:i+"//{s}.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer/tile/{z}/{y}/{x}",attributionUrl:"https://static.arcgis.com/attribution/Ocean_Basemap",options:{hideLogo:!1,logoPosition:"bottomright",minZoom:1,maxZoom:16,subdomains:["server","services"],attribution:"Esri"}},OceansLabels:{urlTemplate:i+"//{s}.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Reference/MapServer/tile/{z}/{y}/{x}",options:{hideLogo:!0,logoPosition:"bottomright",minZoom:1,maxZoom:16,subdomains:["server","services"],pane:f?"esri-labels":"tilePane"}},NationalGeographic:{urlTemplate:i+"//{s}.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/tile/{z}/{y}/{x}",options:{hideLogo:!1,logoPosition:"bottomright",minZoom:1,maxZoom:16,subdomains:["server","services"],attribution:"National Geographic, Esri, DeLorme, HERE, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, increment P Corp."}},DarkGray:{urlTemplate:i+"//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Base/MapServer/tile/{z}/{y}/{x}",options:{hideLogo:!1,logoPosition:"bottomright",minZoom:1,maxZoom:16,subdomains:["server","services"],attribution:"Esri, HERE, DeLorme, MapmyIndia, © OpenStreetMap contributors"}},DarkGrayLabels:{urlTemplate:i+"//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Reference/MapServer/tile/{z}/{y}/{x}",options:{hideLogo:!0,logoPosition:"bottomright",minZoom:1,maxZoom:16,subdomains:["server","services"],pane:f?"esri-labels":"tilePane"}},Gray:{urlTemplate:i+"//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}",options:{hideLogo:!1,logoPosition:"bottomright",minZoom:1,maxZoom:16,subdomains:["server","services"],attribution:"Esri, HERE, DeLorme, MapmyIndia, © OpenStreetMap contributors"}},GrayLabels:{urlTemplate:i+"//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer/tile/{z}/{y}/{x}",options:{hideLogo:!0,logoPosition:"bottomright",minZoom:1,maxZoom:16,subdomains:["server","services"],pane:f?"esri-labels":"tilePane"}},Imagery:{urlTemplate:i+"//{s}.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",options:{hideLogo:!1,logoPosition:"bottomright",minZoom:1,maxZoom:19,subdomains:["server","services"],attribution:"Esri, DigitalGlobe, GeoEye, i-cubed, USDA, USGS, AEX, Getmapping, Aerogrid, IGN, IGP, swisstopo, and the GIS User Community"}},ImageryLabels:{urlTemplate:i+"//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer/tile/{z}/{y}/{x}",options:{hideLogo:!0,logoPosition:"bottomright",minZoom:1,maxZoom:19,subdomains:["server","services"],pane:f?"esri-labels":"tilePane"}},ImageryTransportation:{urlTemplate:i+"//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Transportation/MapServer/tile/{z}/{y}/{x}",options:{hideLogo:!0,logoPosition:"bottomright",minZoom:1,maxZoom:19,subdomains:["server","services"],pane:f?"esri-labels":"tilePane"}},ShadedRelief:{urlTemplate:i+"//{s}.arcgisonline.com/ArcGIS/rest/services/World_Shaded_Relief/MapServer/tile/{z}/{y}/{x}",options:{hideLogo:!1,logoPosition:"bottomright",minZoom:1,maxZoom:13,subdomains:["server","services"],attribution:"Esri, USGS"}},ShadedReliefLabels:{urlTemplate:i+"//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places_Alternate/MapServer/tile/{z}/{y}/{x}",options:{hideLogo:!0,logoPosition:"bottomright",minZoom:1,maxZoom:12,subdomains:["server","services"],pane:f?"esri-labels":"tilePane"}},Terrain:{urlTemplate:i+"//{s}.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer/tile/{z}/{y}/{x}",options:{hideLogo:!1,logoPosition:"bottomright",minZoom:1,maxZoom:13,subdomains:["server","services"],attribution:"Esri, USGS, NOAA"}},TerrainLabels:{urlTemplate:i+"//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer/tile/{z}/{y}/{x}",options:{hideLogo:!0,logoPosition:"bottomright",minZoom:1,maxZoom:13,subdomains:["server","services"],pane:f?"esri-labels":"tilePane"}},USATopo:{urlTemplate:i+"//{s}.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer/tile/{z}/{y}/{x}",options:{hideLogo:!1,logoPosition:"bottomright",minZoom:1,maxZoom:15,subdomains:["server","services"],attribution:"National Geographic Society, i-cubed"}}}},initialize:function(n,i){var r,u;if("object"==typeof n&&n.urlTemplate&&n.options)r=n;else{if("string"!=typeof n||!g.TILES[n])throw new Error('L.esri.BasemapLayer: Invalid parameter. Use one of "Streets", "Topographic", "Oceans", "OceansLabels", "NationalGeographic", "Gray", "GrayLabels", "DarkGray", "DarkGrayLabels", "Imagery", "ImageryLabels", "ImageryTransportation", "ShadedRelief", "ShadedReliefLabels", "Terrain" or "TerrainLabels"');r=g.TILES[n]}u=t.Util.extend(r.options,i);t.Util.setOptions(this,u);t.TileLayer.prototype.initialize.call(this,r.urlTemplate,u);r.attributionUrl&&this._getAttributionData(r.attributionUrl);this._logo=fr({position:this.options.logoPosition})},onAdd:function(n){this.options.hideLogo||n._hasEsriLogo||(this._logo.addTo(n),n._hasEsriLogo=!0);"esri-labels"===this.options.pane&&this._initPane();n.on("moveend",this._updateMapAttribution,this);t.TileLayer.prototype.onAdd.call(this,n)},onRemove:function(n){this._logo&&this._logo._container&&(n.removeControl(this._logo),n._hasEsriLogo=!1);n.off("moveend",this._updateMapAttribution,this);t.TileLayer.prototype.onRemove.call(this,n)},getAttribution:function(){if(this.options.attribution)var n='<span class="esri-attributions" style="line-height:14px; vertical-align: -3px; text-overflow:ellipsis; white-space:nowrap; overflow:hidden; display:inline-block;">'+this.options.attribution+"<\/span>";return n},_initPane:function(){if(!this._map.getPane(this.options.pane)){var n=this._map.createPane(this.options.pane);n.style.pointerEvents="none";n.style.zIndex=500}},_getAttributionData:function(n){y(n,{},t.Util.bind(function(n,i){var u,f,e;if(!n){for(this._attributions=[],u=0;u<i.contributors.length;u++)for(f=i.contributors[u],e=0;e<f.coverageAreas.length;e++){var r=f.coverageAreas[e],o=t.latLng(r.bbox[0],r.bbox[1]),s=t.latLng(r.bbox[2],r.bbox[3]);this._attributions.push({attribution:f.attribution,score:r.score,bounds:t.latLngBounds(o,s),minZoom:r.zoomMin,maxZoom:r.zoomMax})}this._attributions.sort(function(n,t){return t.score-n.score});this._updateMapAttribution()}},this))},_updateMapAttribution:function(){var t,r,u;if(this._map&&this._map.attributionControl&&this._attributions){for(var n="",e=this._map.getBounds(),f=this._map.getZoom(),i=0;i<this._attributions.length;i++)t=this._attributions[i],r=t.attribution,!n.match(r)&&e.intersects(t.bounds)&&f>=t.minZoom&&f<=t.maxZoom&&(n+=", "+r);n=n.substr(2);u=this._map.attributionControl._container.querySelector(".esri-attributions");u.innerHTML=n;u.style.maxWidth=.65*this._map.getSize().x+"px";this.fire("attributionupdated",{attribution:n})}}}),et=t.TileLayer.extend({options:{zoomOffsetAllowance:.1},statics:{MercatorZoomLevels:{0:156543.033928,1:78271.5169639999,2:39135.7584820001,3:19567.8792409999,4:9783.93962049996,5:4891.96981024998,6:2445.98490512499,7:1222.99245256249,8:611.49622628138,9:305.748113140558,10:152.874056570411,11:76.4370282850732,12:38.2185141425366,13:19.1092570712683,14:9.55462853563415,15:4.77731426794937,16:2.38865713397468,17:1.19432856685505,18:.597164283559817,19:.298582141647617,20:.14929107082381,21:.07464553541191,22:.0373227677059525,23:.0186613838529763}},initialize:function(n){n.url=e(n.url);n=t.Util.setOptions(this,n);this.tileUrl=n.url+"tile/{z}/{y}/{x}";this.service=ft(n);this.service.addEventParent(this);var i=new RegExp(/tiles.arcgis(online)?\.com/g);i.test(n.url)&&(this.tileUrl=this.tileUrl.replace("://tiles","://tiles{s}"),n.subdomains=["1","2","3","4"]);this.options.token&&(this.tileUrl+="?token="+this.options.token);t.TileLayer.prototype.initialize.call(this,this.tileUrl,n)},getTileUrl:function(n){return t.Util.template(this.tileUrl,t.extend({s:this._getSubdomain(n),z:this._lodMap&&this._lodMap[n.z]?this._lodMap[n.z]:n.z,x:n.x,y:n.y},this.options))},createTile:function(n,i){var r=document.createElement("img");return t.DomEvent.on(r,"load",t.bind(this._tileOnLoad,this,i,r)),t.DomEvent.on(r,"error",t.bind(this._tileOnError,this,i,r)),this.options.crossOrigin&&(r.crossOrigin=""),r.alt="",!this._lodMap||this._lodMap&&this._lodMap[n.z]?r.src=this.getTileUrl(n):this.once("lodmap",function(){r.src=this.getTileUrl(n)},this),r},onAdd:function(n){n.options.crs!==t.CRS.EPSG3857||this._lodMap||(this._lodMap={},this.metadata(function(n,t){var i,u,f,s;if(!n)if(i=t.spatialReference.latestWkid||t.spatialReference.wkid,102100===i||3857===i){for(var e=t.tileInfo.lods,o=et.MercatorZoomLevels,r=0;r<e.length;r++){u=e[r];for(f in o)if(s=o[f],this._withinPercentage(u.resolution,s,this.options.zoomOffsetAllowance)){this._lodMap[f]=u.level;break}}this.fire("lodmap")}else a("L.esri.TiledMapLayer is using a non-mercator spatial reference. Support may be available through Proj4Leaflet http://esri.github.io/esri-leaflet/examples/non-mercator-projection.html")},this));t.TileLayer.prototype.onAdd.call(this,n)},metadata:function(n,t){return this.service.metadata(n,t),this},identify:function(){return this.service.identify()},find:function(){return this.service.find()},query:function(){return this.service.query()},authenticate:function(n){var t="?token="+n;return this.tileUrl=this.options.token?this.tileUrl.replace(/\?token=(.+)/g,t):this.tileUrl+t,this.options.token=n,this.service.authenticate(n),this},_withinPercentage:function(n,t,i){var r=Math.abs(n/t-1);return i>r}}),ar=t.ImageOverlay.extend({onAdd:function(n){this._topLeft=n.getPixelBounds().min;t.ImageOverlay.prototype.onAdd.call(this,n)},_reset:function(){this._map.options.crs===t.CRS.EPSG3857?t.ImageOverlay.prototype._reset.call(this):t.DomUtil.setPosition(this._image,this._topLeft.subtract(this._map.getPixelOrigin()))}}),ot=t.Layer.extend({options:{opacity:1,position:"front",f:"image",useCors:w,attribution:null,interactive:!1,alt:""},onAdd:function(n){this._update=t.Util.throttle(this._update,this.options.updateInterval,this);n.on("moveend",this._update,this);this._currentImage&&this._currentImage._bounds.equals(this._map.getBounds())?n.addLayer(this._currentImage):this._currentImage&&(this._map.removeLayer(this._currentImage),this._currentImage=null);this._update();this._popup&&(this._map.on("click",this._getPopupData,this),this._map.on("dblclick",this._resetPopupState,this))},onRemove:function(){this._currentImage&&this._map.removeLayer(this._currentImage);this._popup&&(this._map.off("click",this._getPopupData,this),this._map.off("dblclick",this._resetPopupState,this));this._map.off("moveend",this._update,this)},bindPopup:function(n,i){return this._shouldRenderPopup=!1,this._lastClick=!1,this._popup=t.popup(i),this._popupFunction=n,this._map&&(this._map.on("click",this._getPopupData,this),this._map.on("dblclick",this._resetPopupState,this)),this},unbindPopup:function(){return this._map&&(this._map.closePopup(this._popup),this._map.off("click",this._getPopupData,this),this._map.off("dblclick",this._resetPopupState,this)),this._popup=!1,this},bringToFront:function(){return this.options.position="front",this._currentImage&&this._currentImage.bringToFront(),this},bringToBack:function(){return this.options.position="back",this._currentImage&&this._currentImage.bringToBack(),this},getAttribution:function(){return this.options.attribution},getOpacity:function(){return this.options.opacity},setOpacity:function(n){return this.options.opacity=n,this._currentImage.setOpacity(n),this},getTimeRange:function(){return[this.options.from,this.options.to]},setTimeRange:function(n,t){return this.options.from=n,this.options.to=t,this._update(),this},metadata:function(n,t){return this.service.metadata(n,t),this},authenticate:function(n){return this.service.authenticate(n),this},_renderImage:function(n,t){if(this._map){var i=new ar(n,t,{opacity:0,crossOrigin:this.options.useCors,alt:this.options.alt,pane:this.options.pane||this.getPane(),interactive:this.options.interactive}).addTo(this._map);i.once("load",function(n){if(this._map){var r=n.target,i=this._currentImage;r._bounds.equals(t)&&r._bounds.equals(this._map.getBounds())?(this._currentImage=r,"front"===this.options.position?this.bringToFront():this.bringToBack(),this._map&&this._currentImage._map?this._currentImage.setOpacity(this.options.opacity):this._currentImage._map.removeLayer(this._currentImage),i&&this._map&&this._map.removeLayer(i),i&&i._map&&i._map.removeLayer(i)):this._map.removeLayer(r)}this.fire("load",{bounds:t})},this);this.fire("loading",{bounds:t})}},_update:function(){var n,t,i;if(this._map&&(n=this._map.getZoom(),t=this._map.getBounds(),!(this._animatingZoom||this._map._panTransition&&this._map._panTransition._inProgress))){if(n>this.options.maxZoom||n<this.options.minZoom)return void this._currentImage._map.removeLayer(this._currentImage);i=this._buildExportParams();this._requestExport(i,t)}},_renderPopup:function(n,i,r,u){if(n=t.latLng(n),this._shouldRenderPopup&&this._lastClick.equals(n)){var f=this._popupFunction(i,r,u);f&&this._popup.setLatLng(n).setContent(f).openOn(this._map)}},_resetPopupState:function(n){this._shouldRenderPopup=!1;this._lastClick=n.latlng}}),hi=ot.extend({options:{updateInterval:150,format:"jpgpng",transparent:!0,f:"json"},query:function(){return this.service.query()},identify:function(){return this.service.identify()},initialize:function(n){n.url=e(n.url);this.service=gt(n);this.service.addEventParent(this);t.Util.setOptions(this,n)},setPixelType:function(n){return this.options.pixelType=n,this._update(),this},getPixelType:function(){return this.options.pixelType},setBandIds:function(n){return this.options.bandIds=t.Util.isArray(n)?n.join(","):n.toString(),this._update(),this},getBandIds:function(){return this.options.bandIds},setNoData:function(n,i){return this.options.noData=t.Util.isArray(n)?n.join(","):n.toString(),i&&(this.options.noDataInterpretation=i),this._update(),this},getNoData:function(){return this.options.noData},getNoDataInterpretation:function(){return this.options.noDataInterpretation},setRenderingRule:function(n){this.options.renderingRule=n;this._update()},getRenderingRule:function(){return this.options.renderingRule},setMosaicRule:function(n){this.options.mosaicRule=n;this._update()},getMosaicRule:function(){return this.options.mosaicRule},_getPopupData:function(n){var r=t.Util.bind(function(i,r,u){i||setTimeout(t.Util.bind(function(){this._renderPopup(n.latlng,i,r,u)},this),300)},this),i=this.identify().at(n.latlng);this.options.mosaicRule&&i.setMosaicRule(this.options.mosaicRule);i.run(r);this._shouldRenderPopup=!0;this._lastClick=n.latlng},_buildExportParams:function(){var t=this._map.getBounds(),i=this._map.getSize(),u=this._map.options.crs.project(t._northEast),f=this._map.options.crs.project(t._southWest),e=this._map.latLngToLayerPoint(t._northEast),o=this._map.latLngToLayerPoint(t._southWest),r,n;return(e.y>0||o.y<i.y)&&(i.y=o.y-e.y),r=parseInt(this._map.options.crs.code.split(":")[1],10),n={bbox:[f.x,f.y,u.x,u.y].join(","),size:i.x+","+i.y,format:this.options.format,transparent:this.options.transparent,bboxSR:r,imageSR:r},this.options.from&&this.options.to&&(n.time=this.options.from.valueOf()+","+this.options.to.valueOf()),this.options.pixelType&&(n.pixelType=this.options.pixelType),this.options.interpolation&&(n.interpolation=this.options.interpolation),this.options.compressionQuality&&(n.compressionQuality=this.options.compressionQuality),this.options.bandIds&&(n.bandIds=this.options.bandIds),this.options.noData&&(n.noData=this.options.noData),this.options.noDataInterpretation&&(n.noDataInterpretation=this.options.noDataInterpretation),this.service.options.token&&(n.token=this.service.options.token),this.options.renderingRule&&(n.renderingRule=JSON.stringify(this.options.renderingRule)),this.options.mosaicRule&&(n.mosaicRule=JSON.stringify(this.options.mosaicRule)),n},_requestExport:function(n,i){"json"===this.options.f?this.service.request("exportImage",n,function(n,t){n||this._renderImage(t.href,i)},this):(n.f="image",this._renderImage(this.options.url+"exportImage"+t.Util.getParamString(n),i))}}),ci=ot.extend({options:{updateInterval:150,layers:!1,layerDefs:!1,timeOptions:!1,format:"png24",transparent:!0,f:"json"},initialize:function(n){n.url=e(n.url);this.service=ft(n);this.service.addEventParent(this);(n.proxy||n.token)&&"json"!==n.f&&(n.f="json");t.Util.setOptions(this,n)},getDynamicLayers:function(){return this.options.dynamicLayers},setDynamicLayers:function(n){return this.options.dynamicLayers=n,this._update(),this},getLayers:function(){return this.options.layers},setLayers:function(n){return this.options.layers=n,this._update(),this},getLayerDefs:function(){return this.options.layerDefs},setLayerDefs:function(n){return this.options.layerDefs=n,this._update(),this},getTimeOptions:function(){return this.options.timeOptions},setTimeOptions:function(n){return this.options.timeOptions=n,this._update(),this},query:function(){return this.service.query()},identify:function(){return this.service.identify()},find:function(){return this.service.find()},_getPopupData:function(n){var r=t.Util.bind(function(i,r,u){i||setTimeout(t.Util.bind(function(){this._renderPopup(n.latlng,i,r,u)},this),300)},this),i=this.identify().on(this._map).at(n.latlng);this.options.layers?i.layers("visible:"+this.options.layers.join(",")):i.layers("visible");i.run(r);this._shouldRenderPopup=!0;this._lastClick=n.latlng},_buildExportParams:function(){var t=this._map.getBounds(),i=this._map.getSize(),r=this._map.options.crs.project(t.getNorthEast()),u=this._map.options.crs.project(t.getSouthWest()),f=parseInt(this._map.options.crs.code.split(":")[1],10),e=this._map.latLngToLayerPoint(t._northEast),o=this._map.latLngToLayerPoint(t._southWest),n;return(e.y>0||o.y<i.y)&&(i.y=o.y-e.y),n={bbox:[u.x,u.y,r.x,r.y].join(","),size:i.x+","+i.y,dpi:96,format:this.options.format,transparent:this.options.transparent,bboxSR:f,imageSR:f},this.options.dynamicLayers&&(n.dynamicLayers=this.options.dynamicLayers),this.options.layers&&(n.layers="show:"+this.options.layers.join(",")),this.options.layerDefs&&(n.layerDefs=JSON.stringify(this.options.layerDefs)),this.options.timeOptions&&(n.timeOptions=JSON.stringify(this.options.timeOptions)),this.options.from&&this.options.to&&(n.time=this.options.from.valueOf()+","+this.options.to.valueOf()),this.service.options.token&&(n.token=this.service.options.token),n},_requestExport:function(n,i){"json"===this.options.f?this.service.request("export",n,function(n,t){n||this._renderImage(t.href,i)},this):(n.f="image",this._renderImage(this.options.url+"export"+t.Util.getParamString(n),i))}}),nt=t.Layer.extend({options:{cellSize:512,updateInterval:150},initialize:function(n){n=t.setOptions(this,n);this._zooming=!1},onAdd:function(n){this._map=n;this._update=t.Util.throttle(this._update,this.options.updateInterval,this);this._reset();this._update()},onRemove:function(){this._map.removeEventListener(this.getEvents(),this);this._removeCells()},getEvents:function(){return{moveend:this._update,zoomstart:this._zoomstart,zoomend:this._reset}},addTo:function(n){return n.addLayer(this),this},removeFrom:function(n){return n.removeLayer(this),this},_zoomstart:function(){this._zooming=!0},_reset:function(){this._removeCells();this._cells={};this._activeCells={};this._cellsToLoad=0;this._cellsTotal=0;this._cellNumBounds=this._getCellNumBounds();this._resetWrap();this._zooming=!1},_resetWrap:function(){var t=this._map,n=t.options.crs,i;n.infinite||(i=this._getCellSize(),n.wrapLng&&(this._wrapLng=[Math.floor(t.project([0,n.wrapLng[0]]).x/i),Math.ceil(t.project([0,n.wrapLng[1]]).x/i)]),n.wrapLat&&(this._wrapLat=[Math.floor(t.project([n.wrapLat[0],0]).y/i),Math.ceil(t.project([n.wrapLat[1],0]).y/i)]))},_getCellSize:function(){return this.options.cellSize},_update:function(){if(this._map){var n=this._map.getPixelBounds(),i=this._getCellSize(),r=t.bounds(n.min.divideBy(i).floor(),n.max.divideBy(i).floor());this._removeOtherCells(r);this._addCells(r);this.fire("cellsupdated")}},_addCells:function(n){for(var i,f,e=[],o=n.getCenter(),s=this._map.getZoom(),r,u=n.min.y;u<=n.max.y;u++)for(i=n.min.x;i<=n.max.x;i++)f=t.point(i,u),f.z=s,this._isValidCell(f)&&e.push(f);if(r=e.length,0!==r)for(this._cellsToLoad+=r,this._cellsTotal+=r,e.sort(function(n,t){return n.distanceTo(o)-t.distanceTo(o)}),i=0;r>i;i++)this._addCell(e[i])},_isValidCell:function(n){var r=this._map.options.crs,i,u;return!r.infinite&&(i=this._cellNumBounds,!r.wrapLng&&(n.x<i.min.x||n.x>i.max.x)||!r.wrapLat&&(n.y<i.min.y||n.y>i.max.y))?!1:this.options.bounds?(u=this._cellCoordsToBounds(n),t.latLngBounds(this.options.bounds).intersects(u)):!0},_cellCoordsToBounds:function(n){var i=this._map,r=this.options.cellSize,u=n.multiplyBy(r),f=u.add([r,r]),e=i.wrapLatLng(i.unproject(u,n.z)),o=i.wrapLatLng(i.unproject(f,n.z));return t.latLngBounds(e,o)},_cellCoordsToKey:function(n){return n.x+":"+n.y},_keyToCellCoords:function(n){var i=n.split(":"),r=parseInt(i[0],10),u=parseInt(i[1],10);return t.point(r,u)},_removeOtherCells:function(n){for(var t in this._cells)n.contains(this._keyToCellCoords(t))||this._removeCell(t)},_removeCell:function(n){var t=this._activeCells[n];t&&(delete this._activeCells[n],this.cellLeave&&this.cellLeave(t.bounds,t.coords),this.fire("cellleave",{bounds:t.bounds,coords:t.coords}))},_removeCells:function(){var n,t,i;for(n in this._cells)t=this._cells[n].bounds,i=this._cells[n].coords,this.cellLeave&&this.cellLeave(t,i),this.fire("cellleave",{bounds:t,coords:i})},_addCell:function(n){this._wrapCoords(n);var i=this._cellCoordsToKey(n),t=this._cells[i];t&&!this._activeCells[i]&&(this.cellEnter&&this.cellEnter(t.bounds,n),this.fire("cellenter",{bounds:t.bounds,coords:n}),this._activeCells[i]=t);t||(t={coords:n,bounds:this._cellCoordsToBounds(n)},this._cells[i]=t,this._activeCells[i]=t,this.createCell&&this.createCell(t.bounds,n),this.fire("cellcreate",{bounds:t.bounds,coords:n}))},_wrapCoords:function(n){n.x=this._wrapLng?t.Util.wrapNum(n.x,this._wrapLng):n.x;n.y=this._wrapLat?t.Util.wrapNum(n.y,this._wrapLat):n.y},_getCellNumBounds:function(){var n=this._map.getPixelWorldBounds(),i=this._getCellSize();return n?t.bounds(n.min.divideBy(i).floor(),n.max.divideBy(i).ceil().subtract([1,1])):null}});u.prototype.query=function(n){var t=this.getIndex(n);return this.values[t]};u.prototype.getIndex=function(n){this.dirty&&this.sort();for(var t,r,u=0,i=this.values.length-1;i>=u;)if(t=(u+i)/2|0,r=this.values[Math.round(t)],+r.value<+n)u=t+1;else{if(!(+r.value>+n))return t;i=t-1}return Math.abs(~i)};u.prototype.between=function(n,t){var r=this.getIndex(n),i=this.getIndex(t);if(0===r&&0===i)return[];for(;this.values[r-1]&&this.values[r-1].value===n;)r--;for(;this.values[i+1]&&this.values[i+1].value===t;)i++;return this.values[i]&&this.values[i].value===t&&this.values[i+1]&&i++,this.values.slice(r,i)};u.prototype.insert=function(n){return this.values.splice(this.getIndex(n.value),0,n),this};u.prototype.bulkAdd=function(n,t){return this.values=this.values.concat([].concat(n||[])),t?this.sort():this.dirty=!0,this};u.prototype.sort=function(){return this.values.sort(function(n,t){return+t.value-+n.value}).reverse(),this.dirty=!1,this};c=nt.extend({options:{attribution:null,where:"1=1",fields:["*"],from:!1,to:!1,timeField:!1,timeFilterMode:"server",simplifyFactor:0,precision:6},initialize:function(n){if(nt.prototype.initialize.call(this,n),n.url=e(n.url),n=t.setOptions(this,n),this.service=ni(n),this.service.addEventParent(this),"*"!==this.options.fields[0]){for(var r=!1,i=0;i<this.options.fields.length;i++)this.options.fields[i].match(/^(OBJECTID|FID|OID|ID)$/i)&&(r=!0);r===!1&&a("no known esriFieldTypeOID field detected in fields Array.  Please add an attribute field containing unique IDs to ensure the layer can be drawn correctly.")}this.options.timeField.start&&this.options.timeField.end?(this._startTimeIndex=new u,this._endTimeIndex=new u):this.options.timeField&&(this._timeIndex=new u);this._cache={};this._currentSnapshot=[];this._activeRequests=0},onAdd:function(n){return n.on("zoomend",this._handleZoomChange,this),nt.prototype.onAdd.call(this,n)},onRemove:function(n){return n.off("zoomend",this._handleZoomChange,this),nt.prototype.onRemove.call(this,n)},getAttribution:function(){return this.options.attribution},createCell:function(n,t){this._requestFeatures(n,t)},_requestFeatures:function(n,i,r){return this._activeRequests++,1===this._activeRequests&&this.fire("loading",{bounds:n},!0),this._buildQuery(n).run(function(u,f,e){e&&e.exceededTransferLimit&&this.fire("drawlimitexceeded");!u&&f&&f.features.length&&t.Util.requestAnimFrame(t.Util.bind(function(){this._addFeatures(f.features,i);this._postProcessFeatures(n)},this));u||!f||f.features.length||this._postProcessFeatures(n);u&&this._postProcessFeatures(n);r&&r.call(this,u,f)},this)},_postProcessFeatures:function(n){this._activeRequests--;this._activeRequests<=0&&this.fire("load",{bounds:n})},_cacheKey:function(n){return n.z+":"+n.x+":"+n.y},_addFeatures:function(n,t){var r=this._cacheKey(t),i,u;for(this._cache[r]=this._cache[r]||[],i=n.length-1;i>=0;i--)u=n[i].id,this._currentSnapshot.push(u),this._cache[r].push(u);this.options.timeField&&this._buildTimeIndexes(n);this.createLayers(n)},_buildQuery:function(n){var t=this.service.query().intersects(n).where(this.options.where).fields(this.options.fields).precision(this.options.precision);return this.options.simplifyFactor&&t.simplify(this._map,this.options.simplifyFactor),"server"===this.options.timeFilterMode&&this.options.from&&this.options.to&&t.between(this.options.from,this.options.to),t},setWhere:function(n,i,r){var o,c,l;this.options.where=n&&n.length?n:"1=1";for(var s=[],u=[],f=0,h=null,a=t.Util.bind(function(n,e){if(n&&(h=n),e)for(var o=e.features.length-1;o>=0;o--)u.push(e.features[o].id);f--;0>=f&&(this._currentSnapshot=u,t.Util.requestAnimFrame(t.Util.bind(function(){this.removeLayers(s);this.addLayers(u);i&&i.call(r,h)},this)))},this),e=this._currentSnapshot.length-1;e>=0;e--)s.push(this._currentSnapshot[e]);for(o in this._activeCells)f++,c=this._keyToCellCoords(o),l=this._cellCoordsToBounds(c),this._requestFeatures(l,o,a);return this},getWhere:function(){return this.options.where},getTimeRange:function(){return[this.options.from,this.options.to]},setTimeRange:function(n,i,r,u){var o=this.options.from,s=this.options.to,f=0,h=null,a=t.Util.bind(function(t){t&&(h=t);this._filterExistingFeatures(o,s,n,i);f--;r&&0>=f&&r.call(u,h)},this),e,c,l;if(this.options.from=n,this.options.to=i,this._filterExistingFeatures(o,s,n,i),"server"===this.options.timeFilterMode)for(e in this._activeCells)f++,c=this._keyToCellCoords(e),l=this._cellCoordsToBounds(c),this._requestFeatures(l,e,a);return this},refresh:function(){var n,t,i;for(n in this._activeCells)t=this._keyToCellCoords(n),i=this._cellCoordsToBounds(t),this._requestFeatures(i,n);this.redraw&&this.once("load",function(){this.eachFeature(function(n){this._redraw(n.feature.id)},this)},this)},_filterExistingFeatures:function(n,i,r,u){var o=n&&i?this._getFeaturesInTimeRange(n,i):this._currentSnapshot,f=this._getFeaturesInTimeRange(r,u),e,s;if(f.indexOf)for(e=0;e<f.length;e++)s=o.indexOf(f[e]),s>=0&&o.splice(s,1);t.Util.requestAnimFrame(t.Util.bind(function(){this.removeLayers(o);this.addLayers(f)},this))},_getFeaturesInTimeRange:function(n,t){var i,u=[],f,e,r;for(this.options.timeField.start&&this.options.timeField.end?(f=this._startTimeIndex.between(n,t),e=this._endTimeIndex.between(n,t),i=f.concat(e)):i=this._timeIndex.between(n,t),r=i.length-1;r>=0;r--)u.push(i[r].id);return u},_buildTimeIndexes:function(n){var t,i,r,u,f;if(this.options.timeField.start&&this.options.timeField.end){for(r=[],u=[],t=n.length-1;t>=0;t--)i=n[t],r.push({id:i.id,value:new Date(i.properties[this.options.timeField.start])}),u.push({id:i.id,value:new Date(i.properties[this.options.timeField.end])});this._startTimeIndex.bulkAdd(r);this._endTimeIndex.bulkAdd(u)}else{for(f=[],t=n.length-1;t>=0;t--)i=n[t],f.push({id:i.id,value:new Date(i.properties[this.options.timeField])});this._timeIndex.bulkAdd(f)}},_featureWithinTimeRange:function(n){var t,i,r,u,f;return!this.options.from||!this.options.to?!0:(t=+this.options.from.valueOf(),i=+this.options.to.valueOf(),"string"==typeof this.options.timeField)?(r=+n.properties[this.options.timeField],r>=t&&i>=r):this.options.timeField.start&&this.options.timeField.end?(u=+n.properties[this.options.timeField.start],f=+n.properties[this.options.timeField.end],u>=t&&i>=u||f>=t&&i>=f):void 0},_visibleZoom:function(){if(!this._map)return!1;var n=this._map.getZoom();return!(n>this.options.maxZoom||n<this.options.minZoom)},_handleZoomChange:function(){var t,i,n;if(this._visibleZoom())for(t in this._activeCells)i=this._activeCells[t].coords,n=this._cacheKey(i),this._cache[n]&&this.addLayers(this._cache[n]);else this.removeLayers(this._currentSnapshot),this._currentSnapshot=[]},authenticate:function(n){return this.service.authenticate(n),this},metadata:function(n,t){return this.service.metadata(n,t),this},query:function(){return this.service.query()},_getMetadata:function(n){if(this._metadata){var i;n(i,this._metadata)}else this.metadata(t.Util.bind(function(t,i){this._metadata=i;n(t,this._metadata)},this))},addFeature:function(n,i,r){this._getMetadata(t.Util.bind(function(u,f){return u?void(i&&i.call(this,u,null)):void this.service.addFeature(n,t.Util.bind(function(t,u){t||(n.properties[f.objectIdField]=u.objectId,n.id=u.objectId,this.createLayers([n]));i&&i.call(r,t,u)},this))},this))},updateFeature:function(n,t,i){this.service.updateFeature(n,function(r,u){r||(this.removeLayers([n.id],!0),this.createLayers([n]));t&&t.call(i,r,u)},this)},deleteFeature:function(n,t,i){this.service.deleteFeature(n,function(n,r){!n&&r.objectId&&this.removeLayers([r.objectId],!0);t&&t.call(i,n,r)},this)},deleteFeatures:function(n,t,i){return this.service.deleteFeatures(n,function(n,r){if(!n&&r.length>0)for(var u=0;u<r.length;u++)this.removeLayers([r[u].objectId],!0);t&&t.call(i,n,r)},this)}});st=c.extend({options:{cacheLayers:!0},initialize:function(n){c.prototype.initialize.call(this,n);this._originalStyle=this.options.style;this._layers={}},onRemove:function(n){for(var t in this._layers)n.removeLayer(this._layers[t]);return c.prototype.onRemove.call(this,n)},createNewLayer:function(n){var i=t.GeoJSON.geometryToLayer(n,this.options);return i.defaultOptions=i.options,i},_updateLayer:function(n,i){var r=[],u=this.options.coordsToLatLng||t.GeoJSON.coordsToLatLng;switch(i.properties&&(n.feature.properties=i.properties),i.geometry.type){case"Point":r=t.GeoJSON.coordsToLatLng(i.geometry.coordinates);n.setLatLng(r);break;case"LineString":r=t.GeoJSON.coordsToLatLngs(i.geometry.coordinates,0,u);n.setLatLngs(r);break;case"MultiLineString":r=t.GeoJSON.coordsToLatLngs(i.geometry.coordinates,1,u);n.setLatLngs(r);break;case"Polygon":r=t.GeoJSON.coordsToLatLngs(i.geometry.coordinates,1,u);n.setLatLngs(r);break;case"MultiPolygon":r=t.GeoJSON.coordsToLatLngs(i.geometry.coordinates,2,u);n.setLatLngs(r)}},createLayers:function(n){for(var t,r,i,u=n.length-1;u>=0;u--)r=n[u],i=this._layers[r.id],this._visibleZoom()&&i&&!this._map.hasLayer(i)&&this._map.addLayer(i),i&&this.options.simplifyFactor>0&&(i.setLatLngs||i.setLatLng)&&this._updateLayer(i,r),i||(t=this.createNewLayer(r),t.feature=r,t.addEventParent(this),this.options.onEachFeature&&this.options.onEachFeature(t.feature,t),this._layers[t.feature.id]=t,this.setFeatureStyle(t.feature.id,this.options.style),this.fire("createfeature",{feature:t.feature},!0),this._visibleZoom()&&(!this.options.timeField||this.options.timeField&&this._featureWithinTimeRange(r))&&this._map.addLayer(t))},addLayers:function(n){for(var i,t=n.length-1;t>=0;t--)i=this._layers[n[t]],i&&(this.fire("addfeature",{feature:i.feature},!0),this._map.addLayer(i))},removeLayers:function(n,t){for(var u,i,r=n.length-1;r>=0;r--)u=n[r],i=this._layers[u],i&&(this.fire("removefeature",{feature:i.feature,permanent:t},!0),this._map.removeLayer(i)),i&&t&&delete this._layers[u]},cellEnter:function(n,i){!this._zooming&&this._map&&t.Util.requestAnimFrame(t.Util.bind(function(){var t=this._cacheKey(i),r=this._cellCoordsToKey(i),n=this._cache[t];this._activeCells[r]&&n&&this.addLayers(n)},this))},cellLeave:function(n,i){this._zooming||t.Util.requestAnimFrame(t.Util.bind(function(){var t,r,u;if(this._map){var e=this._cacheKey(i),f=this._cellCoordsToKey(i),n=this._cache[e],o=this._map.getBounds();if(!this._activeCells[f]&&n){for(t=!0,r=0;r<n.length;r++)u=this._layers[n[r]],u&&u.getBounds&&o.intersects(u.getBounds())&&(t=!1);t&&this.removeLayers(n,!this.options.cacheLayers);!this.options.cacheLayers&&t&&(delete this._cache[e],delete this._cells[f],delete this._activeCells[f])}}},this))},resetStyle:function(){return this.options.style=this._originalStyle,this.eachFeature(function(n){this.resetFeatureStyle(n.feature.id)},this),this},setStyle:function(n){return this.options.style=n,this.eachFeature(function(t){this.setFeatureStyle(t.feature.id,n)},this),this},resetFeatureStyle:function(n){var i=this._layers[n],r=this._originalStyle||t.Path.prototype.options;return i&&(t.Util.extend(i.options,i.defaultOptions),this.setFeatureStyle(n,r)),this},setFeatureStyle:function(n,t){var i=this._layers[n];return"function"==typeof t&&(t=t(i.feature)),i.setStyle&&i.setStyle(t),this},eachFeature:function(n,t){for(var i in this._layers)n.call(t,this._layers[i]);return this},getFeature:function(n){return this._layers[n]},bringToBack:function(){this.eachFeature(function(n){n.bringToBack&&n.bringToBack()})},bringToFront:function(){this.eachFeature(function(n){n.bringToFront&&n.bringToFront()})},redraw:function(n){return n&&this._redraw(n),this},_redraw:function(n){var i=this._layers[n],r=i.feature,u,f,e,o;i&&i.setIcon&&this.options.pointToLayer&&this.options.pointToLayer&&(u=this.options.pointToLayer(r,t.latLng(r.geometry.coordinates[1],r.geometry.coordinates[0])),f=u.options.icon,i.setIcon(f));i&&i.setStyle&&this.options.pointToLayer&&(e=this.options.pointToLayer(r,t.latLng(r.geometry.coordinates[1],r.geometry.coordinates[0])),o=e.options,this.setFeatureStyle(r.id,o));i&&i.setStyle&&this.options.style&&this.resetStyle(r.id)}});n.VERSION="2.0.0";n.Support=o;n.Util=r;n.get=b;n.post=yt;n.request=wt;n.Task=s;n.task=ir;n.Query=ii;n.query=p;n.Find=ri;n.find=bt;n.Identify=d;n.identify=rr;n.IdentifyFeatures=ui;n.identifyFeatures=kt;n.IdentifyImage=fi;n.identifyImage=dt;n.Service=h;n.service=ur;n.MapService=ei;n.mapService=ft;n.ImageService=oi;n.imageService=gt;n.FeatureLayerService=si;n.featureLayerService=ni;n.BasemapLayer=g;n.basemapLayer=er;n.TiledMapLayer=et;n.tiledMapLayer=or;n.RasterLayer=ot;n.ImageMapLayer=hi;n.imageMapLayer=sr;n.DynamicMapLayer=ci;n.dynamicMapLayer=hr;n.FeatureManager=c;n.FeatureLayer=st;n.featureLayer=cr});!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("leaflet"),require("esri-leaflet")):"function"==typeof define&&define.amd?define(["exports","leaflet","esri-leaflet"],t):t((n.L=n.L||{},n.L.esri=n.L.esri||{},n.L.esri.Geocoding=n.L.esri.Geocoding||{}),n.L,n.L.esri)}(this,function(n,t,i){"use strict";function f(n){return new c(n)}function e(n){return new l(n)}function o(n){return new a(n)}function d(n){return new u(n)}function s(n,t){return new v(n,t)}function h(n){return new y(n)}function g(n){return new p(n)}function nt(n){return new w(n)}function tt(n){return new b(n)}function it(n){return new k(n)}t="default"in t?t["default"]:t;var c=i.Task.extend({path:"find",params:{outSr:4326,forStorage:!1,outFields:"*",maxLocations:20},setters:{address:"address",neighborhood:"neighborhood",city:"city",subregion:"subregion",region:"region",postal:"postal",country:"country",text:"text",category:"category",token:"token",key:"magicKey",fields:"outFields",forStorage:"forStorage",maxLocations:"maxLocations"},initialize:function(n){n=n||{};n.url=n.url||r;i.Task.prototype.initialize.call(this,n)},within:function(n){return n=t.latLngBounds(n),this.params.bbox=i.Util.boundsToExtent(n),this},nearby:function(n,i){return n=t.latLng(n),this.params.location=n.lng+","+n.lat,this.params.distance=Math.min(Math.max(i,2e3),5e4),this},run:function(n,t){return this.options.customParam?(this.path="findAddressCandidates",this.params[this.options.customParam]=this.params.text,delete this.params.text):this.path=this.params.text?"find":"findAddressCandidates","findAddressCandidates"===this.path&&this.params.bbox&&(this.params.searchExtent=this.params.bbox,delete this.params.bbox),this.request(function(i,r){var u="find"===this.path?this._processFindResponse:this._processFindAddressCandidatesResponse,f=i?void 0:u(r);n.call(t,i,{results:f},r)},this)},_processFindResponse:function(n){for(var e,r,f=[],u=0;u<n.locations.length;u++)r=n.locations[u],r.extent&&(e=i.Util.extentToBounds(r.extent)),f.push({text:r.name,bounds:e,score:r.feature.attributes.Score,latlng:t.latLng(r.feature.geometry.y,r.feature.geometry.x),properties:r.feature.attributes});return f},_processFindAddressCandidatesResponse:function(n){for(var r,e,f=[],u=0;u<n.candidates.length;u++)r=n.candidates[u],r.extent&&(e=i.Util.extentToBounds(r.extent)),f.push({text:r.address,bounds:e,score:r.score,latlng:t.latLng(r.location.y,r.location.x),properties:r.attributes});return f}}),l=i.Task.extend({path:"reverseGeocode",params:{outSR:4326,returnIntersection:!1},setters:{distance:"distance",language:"langCode",intersection:"returnIntersection"},initialize:function(n){n=n||{};n.url=n.url||r;i.Task.prototype.initialize.call(this,n)},latlng:function(n){return n=t.latLng(n),this.params.location=n.lng+","+n.lat,this},run:function(n,i){return this.request(function(r,u){var f;f=r?void 0:{latlng:t.latLng(u.location.y,u.location.x),address:u.address};n.call(i,r,f,u)},this)}}),a=i.Task.extend({path:"suggest",params:{},setters:{text:"text",category:"category",countries:"countryCode",maxSuggestions:"maxSuggestions"},initialize:function(n){n=n||{};n.url||(n.url=r,n.supportsSuggest=!0);i.Task.prototype.initialize.call(this,n)},within:function(n){n=t.latLngBounds(n);n=n.pad(.5);var r=n.getCenter(),u=n.getNorthWest();return this.params.location=r.lng+","+r.lat,this.params.distance=Math.min(Math.max(r.distanceTo(u),2e3),5e4),this.params.searchExtent=i.Util.boundsToExtent(n),this},nearby:function(n,i){return n=t.latLng(n),this.params.location=n.lng+","+n.lat,this.params.distance=Math.min(Math.max(i,2e3),5e4),this},run:function(n,t){return this.options.supportsSuggest?this.request(function(i,r){n.call(t,i,r,r)},this):void console.warn("this geocoding service does not support asking for suggestions")}}),u=i.Service.extend({initialize:function(n){n=n||{};n.url?(i.Service.prototype.initialize.call(this,n),this._confirmSuggestSupport()):(n.url=r,n.supportsSuggest=!0,i.Service.prototype.initialize.call(this,n))},geocode:function(){return f(this)},reverse:function(){return e(this)},suggest:function(){return o(this)},_confirmSuggestSupport:function(){this.metadata(function(n,t){n||(t.capabilities?this.options.supportsSuggest=t.capabilities.indexOf("Suggest")>-1?!0:!1:(this.options.supportsSuggest=!1,this.options.customParam=t.singleLineAddressField.name))},this)}}),v=t.Evented.extend({options:{zoomToResult:!0,useMapBounds:12,searchBounds:null},initialize:function(n,i){if(t.Util.setOptions(this,i),this._control=n,!i||!i.providers||!i.providers.length)throw new Error("You must specify at least one provider");this._providers=i.providers},_geocode:function(n,i,r){var u,f=0,e=[],s=t.Util.bind(function(t,i){f--;t||(i&&(e=e.concat(i)),0>=f&&(u=this._boundsFromResults(e),this.fire("results",{results:e,bounds:u,latlng:u?u.getCenter():void 0,text:n},!0),this.options.zoomToResult&&u&&this._control._map.fitBounds(u),this.fire("load")))},this),o;if(i)f++,r.results(n,i,this._searchBounds(),s);else for(o=0;o<this._providers.length;o++)f++,this._providers[o].results(n,i,this._searchBounds(),s)},_suggest:function(n){var f=this._providers.length,e=t.Util.bind(function(n,i){return t.Util.bind(function(t,r){if(!t){var u;if(f-=1,n.length<2)return this._suggestions.innerHTML="",void(this._suggestions.style.display="none");if(r.length)for(u=0;u<r.length;u++)r[u].provider=i;else this._control._renderSuggestions(r);if(i._lastRender!==n&&i.nodes){for(u=0;u<i.nodes.length;u++)i.nodes[u].parentElement&&this._control._suggestions.removeChild(i.nodes[u]);i.nodes=[]}r.length&&this._control._input.value===n&&(this._control.clearSuggestions(i.nodes),i._lastRender=n,i.nodes=this._control._renderSuggestions(r),this._control._nodes=[])}},this)},this),i,r,u;for(this._pendingSuggestions=[],i=0;i<this._providers.length;i++)r=this._providers[i],u=r.suggestions(n,this._searchBounds(),e(n,r)),this._pendingSuggestions.push(u)},_searchBounds:function(){return null!==this.options.searchBounds?this.options.searchBounds:this.options.useMapBounds===!1?null:this.options.useMapBounds===!0?this._control._map.getBounds():this.options.useMapBounds<=this._control._map.getZoom()?this._control._map.getBounds():null},_boundsFromResults:function(n){var i,e,r;if(n.length){for(var s=t.latLngBounds([0,0],[0,0]),u=[],o=[],f=n.length-1;f>=0;f--)i=n[f],o.push(i.latlng),i.bounds&&i.bounds.isValid()&&!i.bounds.equals(s)&&u.push(i.bounds);for(e=t.latLngBounds(o),r=0;r<u.length;r++)e.extend(u[r]);return e}},_getAttribution:function(){for(var i=[],t=this._providers,n=0;n<t.length;n++)t[n].options.attribution&&i.push(t[n].options.attribution);return i.join(", ")}}),y=u.extend({options:{label:"Places and Addresses",maxResults:5},suggestions:function(n,t,i){var r=this.suggest().text(n);return t&&r.within(t),this.options.countries&&r.countries(this.options.countries),this.options.categories&&r.category(this.options.categories),r.maxSuggestions(this.options.maxResults),r.run(function(n,t,r){var f=[],u;if(!n)for(;r.suggestions.length&&f.length<=this.options.maxResults-1;)u=r.suggestions.shift(),u.isCollection||f.push({text:u.text,magicKey:u.magicKey});i(n,f)},this)},results:function(n,t,i,r){var u=this.geocode().text(n);return t&&u.key(t),u.maxLocations(this.options.maxResults),i&&u.within(i),this.options.forStorage&&u.forStorage(!0),u.run(function(n,t){r(n,t.results)},this)}}),p=t.Control.extend({includes:t.Mixin.Events,options:{position:"topleft",collapseAfterResult:!0,expanded:!1,allowMultipleResults:!0,placeholder:"Search for places or addresses",title:"Location Search"},initialize:function(n){t.Util.setOptions(this,n);n&&n.providers&&n.providers.length||(n={},n.providers=[h()]);this._geosearchCore=s(this,n);this._geosearchCore._providers=n.providers;this._geosearchCore.addEventParent(this);for(var i=0;i<this._geosearchCore._providers.length;i++)this._geosearchCore._providers[i].addEventParent(this);this._geosearchCore._pendingSuggestions=[];t.Control.prototype.initialize.call(n)},_renderSuggestions:function(n){var s,u,r,f,e,i,o;for(this._suggestions.style.display="block",this._suggestions.style.maxHeight=this._map.getSize().y-this._suggestions.offsetTop-this._wrapper.offsetTop-10+"px",f=[],e=0;e<n.length;e++)i=n[e],!r&&this._geosearchCore._providers.length>1&&s!==i.provider.options.label&&(r=t.DomUtil.create("span","geocoder-control-header",this._suggestions),r.textContent=i.provider.options.label,r.innerText=i.provider.options.label,s=i.provider.options.label,f.push(r)),u||(u=t.DomUtil.create("ul","geocoder-control-list",this._suggestions)),o=t.DomUtil.create("li","geocoder-control-suggestion",u),o.innerHTML=i.text,o.provider=i.provider,o["data-magic-key"]=i.magicKey;return t.DomUtil.removeClass(this._input,"geocoder-control-loading"),f.push(u),f},_boundsFromResults:function(n){var i,e,r;if(n.length){for(var s=t.latLngBounds([0,0],[0,0]),u=[],o=[],f=n.length-1;f>=0;f--)i=n[f],o.push(i.latlng),i.bounds&&i.bounds.isValid()&&!i.bounds.equals(s)&&u.push(i.bounds);for(e=t.latLngBounds(o),r=0;r<u.length;r++)e.extend(u[r]);return e}},clear:function(){this._suggestions.innerHTML="";this._suggestions.style.display="none";this._input.value="";this.options.collapseAfterResult&&(this._input.placeholder="",t.DomUtil.removeClass(this._wrapper,"geocoder-control-expanded"));!this._map.scrollWheelZoom.enabled()&&this._map.options.scrollWheelZoom&&this._map.scrollWheelZoom.enable()},clearSuggestions:function(){if(this._nodes)for(var n=0;n<this._nodes.length;n++)this._nodes[n].parentElement&&this._suggestions.removeChild(this._nodes[n])},_setupClick:function(){t.DomUtil.addClass(this._wrapper,"geocoder-control-expanded");this._input.focus()},disable:function(){this._input.disabled=!0;t.DomUtil.addClass(this._input,"geocoder-control-input-disabled");t.DomEvent.removeListener(this._wrapper,"click",this._setupClick,this)},enable:function(){this._input.disabled=!1;t.DomUtil.removeClass(this._input,"geocoder-control-input-disabled");t.DomEvent.addListener(this._wrapper,"click",this._setupClick,this)},getAttribution:function(){for(var t=[],n=0;n<this._providers.length;n++)this._providers[n].options.attribution&&t.push(this._providers[n].options.attribution);return t.join(", ")},onAdd:function(n){i.Util.setEsriAttribution(n);this._map=n;this._wrapper=t.DomUtil.create("div","geocoder-control "+(this.options.expanded?" geocoder-control-expanded":""));this._input=t.DomUtil.create("input","geocoder-control-input leaflet-bar",this._wrapper);this._input.title=this.options.title;this._suggestions=t.DomUtil.create("div","geocoder-control-suggestions leaflet-bar",this._wrapper);var r=this._geosearchCore._getAttribution();return n.attributionControl.addAttribution(r),t.DomEvent.addListener(this._input,"focus",function(){this._input.placeholder=this.options.placeholder;t.DomUtil.addClass(this._wrapper,"geocoder-control-expanded")},this),t.DomEvent.addListener(this._wrapper,"click",this._setupClick,this),t.DomEvent.addListener(this._suggestions,"mousedown",function(n){var t=n.target||n.srcElement;this._geosearchCore._geocode(t.innerHTML,t["data-magic-key"],t.provider);this.clear()},this),t.DomEvent.addListener(this._input,"blur",function(){this.clear()},this),t.DomEvent.addListener(this._input,"keydown",function(n){var s,h,e,u;t.DomUtil.addClass(this._wrapper,"geocoder-control-expanded");for(var o,r=this._suggestions.querySelectorAll(".geocoder-control-suggestion"),i=this._suggestions.querySelectorAll(".geocoder-control-selected")[0],f=0;f<r.length;f++)if(r[f]===i){o=f;break}switch(n.keyCode){case 13:i?(this._geosearchCore._geocode(i.innerHTML,i["data-magic-key"],i.provider),this.clear()):this.options.allowMultipleResults?(this._geosearchCore._geocode(this._input.value,void 0),this.clear()):t.DomUtil.addClass(r[0],"geocoder-control-selected");t.DomEvent.preventDefault(n);break;case 38:i&&t.DomUtil.removeClass(i,"geocoder-control-selected");s=r[o-1];i&&s?t.DomUtil.addClass(s,"geocoder-control-selected"):t.DomUtil.addClass(r[r.length-1],"geocoder-control-selected");t.DomEvent.preventDefault(n);break;case 40:i&&t.DomUtil.removeClass(i,"geocoder-control-selected");h=r[o+1];i&&h?t.DomUtil.addClass(h,"geocoder-control-selected"):t.DomUtil.addClass(r[0],"geocoder-control-selected");t.DomEvent.preventDefault(n);break;default:for(e=0;e<this._geosearchCore._pendingSuggestions.length;e++)u=this._geosearchCore._pendingSuggestions[e],u&&u.abort&&!u.id&&u.abort()}},this),t.DomEvent.addListener(this._input,"keyup",t.Util.throttle(function(n){var i=n.which||n.keyCode,r=(n.target||n.srcElement).value;return r.length<2?(this._suggestions.innerHTML="",this._suggestions.style.display="none",void t.DomUtil.removeClass(this._input,"geocoder-control-loading")):27===i?(this._suggestions.innerHTML="",void(this._suggestions.style.display="none")):void(13!==i&&38!==i&&40!==i&&this._input.value!==this._lastValue&&(this._lastValue=this._input.value,t.DomUtil.addClass(this._input,"geocoder-control-loading"),this._geosearchCore._suggest(r)))},50,this),this),t.DomEvent.disableClickPropagation(this._wrapper),t.DomEvent.addListener(this._suggestions,"mouseover",function(){n.scrollWheelZoom.enabled()&&n.options.scrollWheelZoom&&n.scrollWheelZoom.disable()}),t.DomEvent.addListener(this._suggestions,"mouseout",function(){!n.scrollWheelZoom.enabled()&&n.options.scrollWheelZoom&&n.scrollWheelZoom.enable()}),this._geosearchCore.on("load",function(){t.DomUtil.removeClass(this._input,"geocoder-control-loading");this.clear();this._input.blur()},this),this._wrapper}}),w=i.FeatureLayerService.extend({options:{label:"Feature Layer",maxResults:5,bufferRadius:1e3,formatSuggestion:function(n){return n.properties[this.options.searchFields[0]]}},initialize:function(n){i.FeatureLayerService.prototype.initialize.call(this,n);"string"==typeof this.options.searchFields&&(this.options.searchFields=[this.options.searchFields])},suggestions:function(n,t,i){var r=this.query().where(this._buildQuery(n)).returnGeometry(!1);return t&&r.intersects(t),this.options.idField&&r.fields([this.options.idField].concat(this.options.searchFields)),r.run(function(n,t,r){var f;if(n)i(n,[]);else{this.options.idField=r.objectIdFieldName;for(var e=[],o=Math.min(t.features.length,this.options.maxResults),u=0;o>u;u++)f=t.features[u],e.push({text:this.options.formatSuggestion.call(this,f),magicKey:f.id});i(n,e.slice(0,this.options.maxResults).reverse())}},this)},results:function(n,i,r,u){var f=this.query();return i?f.featureIds([i]):f.where(this._buildQuery(n)),r&&f.within(r),f.run(t.Util.bind(function(n,t){for(var i,e,o,f=[],r=0;r<t.features.length;r++)i=t.features[r],i&&(e=this._featureBounds(i),o={latlng:e.getCenter(),bounds:e,text:this.options.formatSuggestion.call(this,i),properties:i.properties,geojson:i},f.push(o));u(n,f)},this))},_buildQuery:function(n){for(var r,t=[],i=this.options.searchFields.length-1;i>=0;i--)r='upper("'+this.options.searchFields[i]+'")',t.push(r+" LIKE upper('%"+n+"%')");return this.options.where?this.options.where+" AND ("+t.join(" OR ")+")":t.join(" OR ")},_featureBounds:function(n){var r=t.geoJson(n);if("Point"===n.geometry.type){var i=r.getBounds().getCenter(),u=this.options.bufferRadius/40075017*360/Math.cos(180/Math.PI*i.lat),f=this.options.bufferRadius/40075017*360;return t.latLngBounds([i.lat-f,i.lng-u],[i.lat+f,i.lng+u])}return r.getBounds()}}),b=i.MapService.extend({options:{layers:[0],label:"Map Service",bufferRadius:1e3,maxResults:5,formatSuggestion:function(n){return n.properties[n.displayFieldName]+" <small>"+n.layerName+"<\/small>"}},initialize:function(n){i.MapService.prototype.initialize.call(this,n);this._getIdFields()},suggestions:function(n,t,i){var r=this.find().text(n).fields(this.options.searchFields).returnGeometry(!1).layers(this.options.layers);return r.run(function(n,t,r){var o=[],s,u;if(!n)for(s=Math.min(this.options.maxResults,t.features.length),r.results=r.results.reverse(),u=0;s>u;u++){var e=t.features[u],h=r.results[u],f=h.layerId,c=this._idFields[f];e.layerId=f;e.layerName=this._layerNames[f];e.displayFieldName=this._displayFields[f];c&&o.push({text:this.options.formatSuggestion.call(this,e),magicKey:h.attributes[c]+":"+f})}i(n,o.reverse())},this)},results:function(n,t,i,r){var f,e=[],o,u;return t?(o=t.split(":")[0],u=t.split(":")[1],f=this.query().layer(u).featureIds(o)):f=this.find().text(n).fields(this.options.searchFields).contains(!1).layers(this.options.layers),f.run(function(n,t,i){var o,f,s,h;if(!n)for(i.results&&(i.results=i.results.reverse()),o=0;o<t.features.length;o++)f=t.features[o],(u=u||i.results[o].layerId,f&&void 0!==u)&&(s=this._featureBounds(f),f.layerId=u,f.layerName=this._layerNames[u],f.displayFieldName=this._displayFields[u],h={latlng:s.getCenter(),bounds:s,text:this.options.formatSuggestion.call(this,f),properties:f.properties,geojson:f},e.push(h));r(n,e.reverse())},this)},_featureBounds:function(n){var r=t.geoJson(n);if("Point"===n.geometry.type){var i=r.getBounds().getCenter(),u=this.options.bufferRadius/40075017*360/Math.cos(180/Math.PI*i.lat),f=this.options.bufferRadius/40075017*360;return t.latLngBounds([i.lat-f,i.lng-u],[i.lat+f,i.lng+u])}return r.getBounds()},_layerMetadataCallback:function(n){return t.Util.bind(function(t,i){var r,u;if(!t)for(this._displayFields[n]=i.displayField,this._layerNames[n]=i.name,r=0;r<i.fields.length;r++)if(u=i.fields[r],"esriFieldTypeOID"===u.type){this._idFields[n]=u.name;break}},this)},_getIdFields:function(){var n,t;for(this._idFields={},this._displayFields={},this._layerNames={},n=0;n<this.options.layers.length;n++)t=this.options.layers[n],this.get(t,{},this._layerMetadataCallback(t))}}),k=u.extend({options:{label:"Geocode Server",maxResults:5},suggestions:function(n,t,i){if(this.options.supportsSuggest){var r=this.suggest().text(n);return t&&r.within(t),r.run(function(n,t,r){var f=[],u;if(!n)for(;r.suggestions.length&&f.length<=this.options.maxResults-1;)u=r.suggestions.shift(),u.isCollection||f.push({text:u.text,magicKey:u.magicKey});i(n,f)},this)}return i(void 0,[]),!1},results:function(n,t,i,r){var u=this.geocode().text(n);return u.maxLocations(this.options.maxResults),i&&u.within(i),u.run(function(n,t){r(n,t.results)},this)}}),r="https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/";n.WorldGeocodingServiceUrl=r;n.VERSION="2.1.4";n.Geocode=c;n.geocode=f;n.ReverseGeocode=l;n.reverseGeocode=e;n.Suggest=a;n.suggest=o;n.GeocodeService=u;n.geocodeService=d;n.Geosearch=p;n.geosearch=g;n.GeosearchCore=v;n.geosearchCore=s;n.ArcgisOnlineProvider=y;n.arcgisOnlineProvider=h;n.FeatureLayerProvider=w;n.featureLayerProvider=nt;n.MapServiceProvider=b;n.mapServiceProvider=tt;n.GeocodeServiceProvider=k;n.geocodeServiceProvider=it});L.Control.Sidebar=L.Control.extend({includes:L.Mixin.Events,options:{closeButton:!0,position:"left",autoPan:!0},initialize:function(n,t){var i,r,u,f;L.setOptions(this,t);i=this._contentContainer=L.DomUtil.get(n);i.parentNode.removeChild(i);r="leaflet-";u=this._container=L.DomUtil.create("div",r+"sidebar "+this.options.position);L.DomUtil.addClass(i,r+"control");u.appendChild(i);this.options.closeButton&&(f=this._closeButton=L.DomUtil.create("a","close",u),f.innerHTML="&times;")},addTo:function(n){var r=this._container,t=this._contentContainer,e,u,i,f;if(this.options.closeButton){e=this._closeButton;L.DomEvent.on(e,"click",this.hide,this)}L.DomEvent.on(r,"transitionend",this._handleTransitionEvent,this).on(r,"webkitTransitionEnd",this._handleTransitionEvent,this);u=n._controlContainer;u.insertBefore(r,u.firstChild);this._map=n;i=L.DomEvent.stopPropagation;f=L.DomEvent._fakeStop||i;L.DomEvent.on(t,"contextmenu",i).on(t,"click",f).on(t,"mousedown",i).on(t,"touchstart",i).on(t,"dblclick",f).on(t,"mousewheel",i).on(t,"MozMousePixelScroll",i);return this},removeFrom:function(n){var i,u,f;this.hide();var r=this._container,t=this._contentContainer,e=n._controlContainer;return e.removeChild(r),this._map=null,i=L.DomEvent.stopPropagation,u=L.DomEvent._fakeStop||i,L.DomEvent.off(t,"contextmenu",i).off(t,"click",u).off(t,"mousedown",i).off(t,"touchstart",i).off(t,"dblclick",u).off(t,"mousewheel",i).off(t,"MozMousePixelScroll",i),L.DomEvent.off(r,"transitionend",this._handleTransitionEvent,this).off(r,"webkitTransitionEnd",this._handleTransitionEvent,this),this._closeButton&&this._close&&(f=this._closeButton,L.DomEvent.off(f,"click",this.hide,this)),this},isVisible:function(){return L.DomUtil.hasClass(this._container,"visible")},show:function(){this.isVisible()||(L.DomUtil.addClass(this._container,"visible"),this.options.autoPan&&this._map.panBy([-this.getOffset()/2,0],{duration:.5}),this.fire("show"))},hide:function(n){this.isVisible()&&(L.DomUtil.removeClass(this._container,"visible"),this.options.autoPan&&this._map.panBy([this.getOffset()/2,0],{duration:.5}),this.fire("hide"));n&&L.DomEvent.stopPropagation(n)},toggle:function(){this.isVisible()?this.hide():this.show()},getContainer:function(){return this._contentContainer},getCloseButton:function(){return this._closeButton},setContent:function(n){var t=this.getContainer();if(typeof n=="string")t.innerHTML=n;else{while(t.firstChild)t.removeChild(t.firstChild);t.appendChild(n)}return this},getOffset:function(){return this.options.position==="right"?-this._container.offsetWidth:this._container.offsetWidth},_handleTransitionEvent:function(n){(n.propertyName=="left"||n.propertyName=="right")&&this.fire(this.isVisible()?"shown":"hidden")}});L.control.sidebar=function(n,t){return new L.Control.Sidebar(n,t)},function(n){if(!n){var t={},i;window.localStorage={setItem:function(n,i){return t[n]=String(i)},getItem:function(n){return t.hasOwnProperty(n)?t[n]:i},removeItem:function(n){return delete t[n]},clear:function(){return t={}}}}}(function(){try{return"localStorage"in window&&window.localStorage!=null}catch(n){return!1}}());L.TileLayer.AgsCached=L.TileLayer.extend({initialize:function(n,t){L.TileLayer.prototype.initialize.call(this,n,t)},getTileUrl:function(n){return L.Util.template(this._url,L.extend({r:this.options.detectRetina&&L.Browser.retina&&this.options.maxZoom>0?"@2x":"",s:this._getSubdomain(n),x:"C"+this._lpad(n.x.toString(16),8,0),y:"R"+this._lpad(n.y.toString(16),8,0),z:"L"+this._lpad(this._getZoomForUrl().toString(),2,0)},this.options))},_lpad:function(n,t,i){return i=i||"0",n=n+"",n.length>=t?n:new Array(t-n.length+1).join(i)+n}});L.tileLayer.agsCached=function(n,t){return new L.TileLayer.AgsCached(n,t)};L.TileLayer.AgsDynamic=L.TileLayer.extend({options:{bboxSR:null,imageSR:null,layers:[],format:"png",transparent:!0,dpi:96},initialize:function(n,t){this._url=n;t=L.setOptions(this,t)},getTileUrl:function(n){var t=this.options.tileSize,i=n.multiplyBy(t),o=i.add(new L.Point(t,t)),s=this._map.unproject(i,this._getZoomForUrl(),!0),h=this._map.unproject(o,this._getZoomForUrl(),!0),r=this._map.options.crs.project(s),u=this._map.options.crs.project(h),c=[r.x,u.y,u.x,r.y].join(","),l="&size="+this.options.tileSize+","+this.options.tileSize,a="&format="+this.options.format,v="&transparent="+this.options.transparent,y=this.options.bboxSR?"&bboxSR="+this.options.bboxSR:"",p=this.options.imageSR?"&imageSR="+this.options.imageSR:"",f=this._url+"/export?bbox="+c+l+a+v+y+p+"&f=image",e;return this.options.layers&&(e="&layers=show:"+this.options.layers.join(","),f+=e),f}});L.tileLayer.agsDynamic=function(n,t){return new L.TileLayer.AgsDyamic(n,t)};var app=function(){"use strict";return $("document").ready(function(){$("#open-on-load").click()}),{}}();app.config=function(){"use strict";_.templateSettings.interpolate=/{{([\s\S]+?)}}/g;var n=window.appConfigBaseUrl,t="http://dev.urbanresearchmaps.org",i=t+"/arcgis_cur/rest/services/LongIslandWGS84/LIIndexMapWGS84/MapServer";return{baseUrl:n,mapServerUrl:t,liMapServiceUrl:i,map:{initialBounds:[[40.543,-73.905],[41.1612,-71.9632]],maxBounds:[[37.219487,-78.448364],[44.443727,-67.417114,]],minZoom:8,layerMaxBounds:[[40.543,-74.0419,],[41.299,-71.8562]]},basemap:{basemaps:[{name:"StreetMap",label:"Street",visible:!0,layers:[{type:L.tileLayer,url:"http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png",options:{attribution:'Map tiles by &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap<\/a> &copy; <a href="http://cartodb.com/attributions">CartoDB<\/a>'}},{type:L.tileLayer.agsCached,url:t+"/arcgiscache/LongIslandWGS84_BldgFootprintsWGS84/Layers/_alllayers/{z}/{y}/{x}.png",options:{opacity:.7,minZoom:14}}]},{name:"SatelliteImagery",label:"Satellite",visible:!1,layers:[{type:L.esri.basemapLayer,key:"Imagery"},{type:L.esri.basemapLayer,key:"ImageryTransportation",options:{minZoom:16}}]}]},geoJsonUrls:{blockgroups:n+"geography/LI_bg2010.topojson.js",schooldistricts:n+"geography/LI_SchoolDistORPS04.topojson.js"}}}(app);app.config.layersConfig=function(n){"use strict";var t=window.appConfigBaseUrl,i=n.config.mapServerUrl,r=n.config.liMapServiceUrl;return{groups:[{name:"Demographics",expanded:!0,radioGroup:!0,layers:[{name:"Population density",keywords:"I want to map,census,block group,decennial census,2010,population,person,density,concentration,where people live",type:"app.map.layer.ChoroplethLayer",description:'<strong>Density in 2010 displayed by Census block group.<\/strong> Square miles for each block group were calculated based on land area provided by the Census Bureau.<br /><em><b>Source:<\/b> <a href="https://factfinder.census.gov/bkmk/table/1.0/en/DEC/10_SF1/GCTPH1.CY07/0500000US36059|0500000US36103" target="_blank">U.S. Census Bureau, 2010 Summary File 1.<\/a><\/em><br />',footer:'View <a href="http://historiccensus.longislandindexmaps.org/?latlng=40.867798%2C-72.858149&z=9&variable=Density&year=2010" target="_blank">mapped density patterns<\/a> back to 1970 (opens in new window).',visible:!1,options:{boundaryType:"blockgroups",dataUrl:t+"api/blockgroups/",dataProperty:"totPop10",dataDivisor:"bgSqMi",dataBreaks:"density",tooltipTemplate:"#tooltip-choropleth-popdensity"}},{name:"Diversity",keywords:"I want to map,census,block group,american community survey,2013,2017,population,person,where people live,race,ethnicity,black,white,hispanic,latino,non hispanic,asian,american,native american,indian,multiple race,more than one race,minority,majority,non white",type:"app.map.layer.ChoroplethLayer",description:'<strong>Percent of each Census block group\'s population during the 2013-17 period.<\/strong><br />View <a target="_blank" href="http://historiccensus.longislandindexmaps.org/img/PDFmaps/RacePlurality.pdf">Long Island\'s diversity mapped by predominant race/ethnicity<\/a> [PDF] for the past 40 years.<br /><em><b>Source:<\/b> <a href="https://factfinder.census.gov/bkmk/table/1.0/en/ACS/17_5YR/B03002/0500000US36059.15000|0500000US36103.15000" target="_blank"> U.S. Census Bureau, American Community Survey, Table B03002.<\/a><\/em><br />',footer:'View <a href="http://historiccensus.longislandindexmaps.org/?latlng=40.867798%2C-72.858149&z=9&variable=pcthisp&year=2010" target="_blank">mapped diversity patterns<\/a> back to 1970 (opens in new window).',options:{boundaryType:"blockgroups",dataUrl:t+"api/blockgroups/",dataProperty:"nonWhite10",dataDivisor:"totPop10",dataBreaks:"diversity",tooltipTemplate:"#tooltip-choropleth-diversity"}},{name:"High income households",keywords:"I want to map,census,block group,american community survey,2013,2017,household,income,high income,dollars,earning",type:"app.map.layer.ChoroplethLayer",description:'<strong>Percent of each block group\'s households (HHs), on average during 2013-17 period.<\/strong><br />Percents represent Census Bureau\'s best estimate for each block group based on American Community Survey; actual percents may be different where surveyed population is relatively small.<br /><em><b>Source:<\/b> <a href="https://factfinder.census.gov/bkmk/table/1.0/en/ACS/17_5YR/B19001/0500000US36059.15000|0500000US36103.15000" target="_blank"> U.S. Census Bureau, American Community Survey, Table B19001.<\/a><\/em><br />',footer:'View <a href="http://historiccensus.longislandindexmaps.org/?latlng=40.867798%2C-72.858149&z=9&variable=MedHHIncAdj&year=2010" target="_blank">mapped household income patterns<\/a> back to 1970 (opens in new window).',options:{boundaryType:"blockgroups",dataUrl:t+"api/blockgroups/",dataProperty:"hiIncHH",dataDivisor:"acsTotHH",dataBreaks:"highIncome",tooltipTemplate:"#tooltip-choropleth-high-income-households"}},{name:"Population in poverty",keywords:"I want to map,census,block group,american community survey,2013,2017,population,person,income,dollars,poverty,low income,earning",type:"app.map.layer.ChoroplethLayer",description:'<strong>Percent of population by block group, on average during 2013-17 period, based on the number of people for whom poverty was determined, with incomes below 100% of the poverty line.<\/strong> Poverty is defined as family of 4 earning under $23,550.<br />Percents represent Census Bureau\'s best estimate based on American Community Survey; actual %s may be different where surveyed population is small.<br /><em><b>Source:<\/b> <a href="https://factfinder.census.gov/bkmk/table/1.0/en/ACS/17_5YR/C17002/0500000US36059.15000|0500000US36103.15000" target="_blank"> U.S. Census Bureau, American Community Survey, Table C17002.<\/a><\/em><br />',footer:'View <a href="http://historiccensus.longislandindexmaps.org/?latlng=40.867798%2C-72.858149&z=9&variable=PctPopPov&year=2010" target="_blank">mapped poverty patterns<\/a> back to 1970 (opens in new window).',options:{boundaryType:"blockgroups",dataUrl:t+"api/blockgroups/",dataProperty:"pov100",dataDivisor:"totPvPop",dataBreaks:"poverty",tooltipTemplate:"#tooltip-choropleth-pop-in-poverty"}},{name:"Population in near poverty",keywords:"I want to map,census,block group,american community survey,2013,2017,population,person,income,dollars,poverty,near poverty,low income,earning",type:"app.map.layer.ChoroplethLayer",description:'<strong>Percent of population by block group, on average during 2013-17 period, based on the number of people for whom poverty was determined, with incomes below 200% of the poverty line.<\/strong> Near poverty is defined as family of 4 earning under $47,100 (ie, < 200% of poverty line).<br />Percents represent Census Bureau\'s best estimate from American Community Survey; actual % may be different where population is small.<br /><em><b>Source:<\/b> <a href="https://factfinder.census.gov/bkmk/table/1.0/en/ACS/17_5YR/C17002/0500000US36059.15000|0500000US36103.15000" target="_blank"> U.S. Census Bureau, American Community Survey, Table C17002.<\/a><\/em><br />',footer:'View <a href="http://historiccensus.longislandindexmaps.org/?latlng=40.867798%2C-72.858149&z=9&variable=PctPop200Pov&year=2010" target="_blank">mapped patterns of the population in near<\/a> back to 1970 (opens in new window).',options:{boundaryType:"blockgroups",dataUrl:t+"api/blockgroups/",dataProperty:"pov200",dataDivisor:"totPvPop",dataBreaks:"povertyNear",tooltipTemplate:"#tooltip-choropleth-pop-in-near-poverty"}}]},{name:"Age",expanded:!0,radioGroup:!0,layers:[{name:"Kids (age 5 or younger)",keywords:"I want to map,census,block group,american community survey,2013,2017,population,person,age,where people live,kids,children,child,school,pre-k,kindergarten",type:"app.map.layer.ChoroplethLayer",description:'<strong>Percent of each Census block group\'s population during the 2013-17 period.<\/strong><br />Percents represent Census Bureau\'s best estimate from American Community Survey; actual % may be different where population is small.<br /><em><b>Source:<\/b> <a href="https://factfinder.census.gov/bkmk/table/1.0/en/ACS/17_5YR/B01001/0500000US36059.15000|0500000US36103.15000" target="_blank"> U.S. Census Bureau, American Community Survey, Table B01001.<\/a><\/em><br />',footer:'View <a href="http://historiccensus.longislandindexmaps.org/?latlng=40.867798%2C-72.858149&z=9&variable=PctUnder5&year=2010" target="_blank">mapped patterns of the population under 5<\/a> back to 1970 (opens in new window).',options:{boundaryType:"blockgroups",dataUrl:t+"api/blockgroups/",dataProperty:"age0510",dataDivisor:"totPop10",dataBreaks:"age",tooltipTemplate:"#tooltip-choropleth-age-5-younger"}},{name:"School age (6 to 17 years)",keywords:"I want to map,census,block group,american community survey,2013,2017,population,person,age,where people live,kids,children,child,school,elementary,pre-teen,teenager",type:"app.map.layer.ChoroplethLayer",description:'<strong>Percent of each Census block group\'s population during the 2013-17 period.<\/strong><br />Percents represent Census Bureau\'s best estimate from American Community Survey; actual % may be different where population is small.<br /><em><b>Source:<\/b> <a href="https://factfinder.census.gov/bkmk/table/1.0/en/ACS/17_5YR/B01001/0500000US36059.15000|0500000US36103.15000" target="_blank"> U.S. Census Bureau, American Community Survey, Table B01001.<\/a><\/em><br />',footer:'View <a href="http://historiccensus.longislandindexmaps.org/?latlng=40.867798%2C-72.858149&z=9&variable=Pct5to17&year=2010" target="_blank">mapped patterns of the population age 6-17<\/a> back to 1970 (opens in new window).',options:{boundaryType:"blockgroups",dataUrl:t+"api/blockgroups/",dataProperty:"age61710",dataDivisor:"totPop10",dataBreaks:"age",tooltipTemplate:"#tooltip-choropleth-age-6-17"}},{name:"Age 18 to 34",keywords:"I want to map,census,block group,american community survey,2013,2017,population,person,age,where people live,kids,children,child,young adult,school,middle,junior,high school,workforce,college,university,labor",type:"app.map.layer.ChoroplethLayer",description:'<strong>Percent of each Census block group\'s population during the 2013-17 period.<\/strong><br />Percents represent Census Bureau\'s best estimate from American Community Survey; actual % may be different where population is small.<br /><em><b>Source:<\/b> <a href="https://factfinder.census.gov/bkmk/table/1.0/en/ACS/17_5YR/B01001/0500000US36059.15000|0500000US36103.15000" target="_blank"> U.S. Census Bureau, American Community Survey, Table B01001.<\/a><\/em><br />',footer:'View <a href="http://historiccensus.longislandindexmaps.org/?latlng=40.867798%2C-72.858149&z=9&variable=Pct18to24&year=2010" target="_blank">mapped patterns of the population age 18-34<\/a> back to 1970 (opens in new window).',options:{boundaryType:"blockgroups",dataUrl:t+"api/blockgroups/",dataProperty:"age183410",dataDivisor:"totPop10",dataBreaks:"age",tooltipTemplate:"#tooltip-choropleth-age-18-34"}},{name:"Age 35 to 54",keywords:"I want to map,census,block group,american community survey,2013,2017,population,person,age,where people live,adult,workforce,graduate school,university,labor",type:"app.map.layer.ChoroplethLayer",description:'<strong>Percent of each Census block group\'s population during the 2013-17 period.<\/strong><br />Percents represent Census Bureau\'s best estimate from American Community Survey; actual % may be different where population is small.<br /><em><b>Source:<\/b> <a href="https://factfinder.census.gov/bkmk/table/1.0/en/ACS/17_5YR/B01001/0500000US36059.15000|0500000US36103.15000" target="_blank"> U.S. Census Bureau, American Community Survey, Table B01001.<\/a><\/em><br />',footer:'View <a href="http://historiccensus.longislandindexmaps.org/?latlng=40.867798%2C-72.858149&z=9&variable=Pct35to44&year=2010" target="_blank">mapped patterns of the population age 35-54<\/a> back to 1970 (opens in new window).',options:{boundaryType:"blockgroups",dataUrl:t+"api/blockgroups/",dataProperty:"age355410",dataDivisor:"totPop10",dataBreaks:"age",tooltipTemplate:"#tooltip-choropleth-age-35-54"}},{name:"Age 55 or older",keywords:"I want to map,census,block group,american community survey,2013,2017,population,person,age,aging,where people live,adult,workforce,older adults,senior,elderly",type:"app.map.layer.ChoroplethLayer",description:'<strong>Percent of each Census block group\'s population during the 2013-17 period.<\/strong><br />Percents represent Census Bureau\'s best estimate from American Community Survey; actual % may be different where population is small.<br /><em><b>Source:<\/b> <a href="https://factfinder.census.gov/bkmk/table/1.0/en/ACS/17_5YR/B01001/0500000US36059.15000|0500000US36103.15000" target="_blank"> U.S. Census Bureau, American Community Survey, Table B01001.<\/a><\/em><br />',footer:'View <a href="http://historiccensus.longislandindexmaps.org/?latlng=40.867798%2C-72.858149&z=9&variable=Pct55to84&year=2010" target="_blank">mapped patterns of the population 55 or older<\/a> back to 1970 (opens in new window).',options:{boundaryType:"blockgroups",dataUrl:t+"api/blockgroups/",dataProperty:"age55Pl10",dataDivisor:"totPop10",dataBreaks:"age",tooltipTemplate:"#tooltip-choropleth-age-55-older"}}]},{name:"Housing",layers:[{name:"Households with children",keywords:"I want to map,census,block group,american community survey,2013,2017,household,housing,parents,children,under 18,kids,dependents",type:"app.map.layer.ChoroplethLayer",description:'<strong>Percent of each block group\'s households (HHs), on average during 2013-17 period.<\/strong><br />Percents represent Census Bureau\'s best estimate for each block group based on American Community Survey; actual percents may be different where surveyed population is relatively small.<br /><em><b>Source:<\/b> <a href="https://factfinder.census.gov/bkmk/table/1.0/en/ACS/17_5YR/B11005/0500000US36059.15000|0500000US36103.15000" target="_blank"> U.S. Census Bureau, American Community Survey, Table B11005.<\/a><\/em><br />',footer:'View <a href="http://historiccensus.longislandindexmaps.org/?latlng=40.867798%2C-72.858149&z=9&variable=PctMFKidHHs&year=2010" target="_blank">mapped patterns of households w/children<\/a> back to 1970 (opens in new window).',options:{boundaryType:"blockgroups",dataUrl:t+"api/blockgroups/",dataProperty:"hhKids",dataDivisor:"acsTotHH",dataBreaks:"housingKids",tooltipTemplate:"#tooltip-choropleth-households-children"}},{name:"People living alone",keywords:"I want to map,census,block group,american community survey,2013,2017,household,housing,alone,living alone,single",type:"app.map.layer.ChoroplethLayer",description:'<strong>Percent of each block group\'s households (HHs), on average during 2013-17 period.<\/strong><br />Percents represent Census Bureau\'s best estimate for each block group based on American Community Survey; actual percents may be different where surveyed population is relatively small.<br /><em><b>Source:<\/b> <a href="https://factfinder.census.gov/bkmk/table/1.0/en/ACS/17_5YR/B11016/0500000US36059.15000|0500000US36103.15000" target="_blank"> U.S. Census Bureau, American Community Survey, Table B11016.<\/a><\/em><br />',footer:'View <a href="http://historiccensus.longislandindexmaps.org/?latlng=40.867798%2C-72.858149&z=9&variable=PctLiveAlone&year=2010" target="_blank">mapped patterns of people living alone<\/a> back to 1970 (opens in new window).',options:{boundaryType:"blockgroups",dataUrl:t+"api/blockgroups/",dataProperty:"liveAlone",dataDivisor:"acsTotHH",dataBreaks:"housingAlone",tooltipTemplate:"#tooltip-choropleth-people-living-alone"}},{name:"Housing cost burden",keywords:"I want to map,census,block group,american community survey,2013,2017,household,housing,income,housing costs,rent,home ownership,expense",type:"app.map.layer.ChoroplethLayer",description:'<strong>Percent of each block group\'s households (HHs), on average during 2013-17 period.<\/strong><br />Percents represent Census Bureau\'s best estimate for each block group based on American Community Survey; actual percents may be different where surveyed population is relatively small.<br /><em><b>Source:<\/b> <a href="https://factfinder.census.gov/bkmk/table/1.0/en/ACS/17_5YR/B25072/0500000US36059.15000|0500000US36103.15000" target="_blank">U.S. Census Bureau, American Community Survey, Table B25072<\/a> &amp; <a href="https://factfinder.census.gov/bkmk/table/1.0/en/ACS/17_5YR/B25093/0500000US36059.15000|0500000US36103.15000" target="_blank">Table B25093<\/a><br />',options:{boundaryType:"blockgroups",dataUrl:t+"api/blockgroups/",dataProperty:"burdHH",dataDivisor:"acsTotHH",dataBreaks:"housingCost",tooltipTemplate:"#tooltip-choropleth-households-costburden"}}]},{name:"Multifamily Housing",layers:[{name:"Proposed multi-family rental properties",keywords:"I want to map,point,location,multifamily,housing,rent,rental,real estate,downtown,development,proposed,planned,pipeline",type:"app.map.layer.WebApiPointLayer",description:'Information about each one was provided to the Long Island Index through subscriptions with Costar and REIS Services as well as data provided by the counties and several town websites. This information was updated and/or corrected and supplemented based on research undertaken by Index staff. <a href="html/multifamily.html" data-targetmodal="layerModal">More info.<\/a><br />',url:t+"api/rentals/proposed",dataProperty:"decadeBlt",tooltipTemplate:"#tooltip-rental",defaultMarkerOptions:{radius:5,weight:2,color:"rgb(32,32,32)",opacity:.7,fillOpacity:1},circleMarkers:[{min:9999,max:9999,label:"Pipeline",options:{fillColor:"rgb(0,0,0)",color:"rgb(254, 227, 145)"}}]},{name:"Existing multi-family rental properties by decade",keywords:"I want to map,point,location,multifamily,housing,rent,rental,real estate,downtown,development,existing",type:"app.map.layer.WebApiPointLayer",description:'<strong>Rental multi-family housing locations are displayed by decade built.<\/strong><br />Information about each one was provided to the Long Island Index through subscriptions with Costar and REIS Services as well as data provided by the counties and several town websites. This information was updated and/or corrected and supplemented based on research undertaken by Index staff. <a href="html/multifamily.html" data-targetmodal="layerModal">More info.<\/a><br />',url:t+"api/rentals/existing",dataProperty:"decadeBlt",tooltipTemplate:"#tooltip-rental",defaultMarkerOptions:{radius:5,weight:1,color:"rgb(32,32,32)",opacity:.7,fillOpacity:1},circleMarkers:[{min:2010,max:2010,label:"2010s",options:{fillColor:"rgb(102,37,0)"}},{min:2e3,max:2e3,label:"2000s",options:{fillColor:"rgb(179,59,0)"}},{min:1990,max:1990,label:"1990s",options:{fillColor:"rgb(204,76,0)"}},{min:1980,max:1980,label:"1980s",options:{fillColor:"rgb(236,112,0)"}},{min:1970,max:1970,label:"1970s",options:{fillColor:"rgb(254,153,0)"}},{min:1960,max:1960,label:"1960s",options:{fillColor:"rgb(254,196,0)"}},{min:1900,max:1959,label:"1900 to 1960",options:{fillColor:"rgb(254,227,145)"}},{min:1700,max:1890,label:"Pre-1900",options:{fillColor:"rgb(255,255,185)"}},{min:0,max:0,label:"Unknown",options:{fillColor:"rgb(185,185,185)"}}]},{name:"Proposed multi-family coops/condo projects",keywords:"I want to map,point,location,multifamily,housing,coop,condo,real estate,downtown,development,planned,proposed,pipeline",type:"app.map.layer.WebApiPointLayer",description:'Information about each one was provided to the Long Island Index through subscriptions with Costar and REIS Services as well as data provided by the counties and several town websites. This information was updated and/or corrected and supplemented based on research undertaken by Index staff. <a href="html/multifamily.html" data-targetmodal="layerModal">More info.<\/a><br />',url:t+"api/coopscondos/proposed",dataProperty:"decadeBlt",tooltipTemplate:"#tooltip-coopcondo",defaultMarkerOptions:{radius:5,weight:1,color:"rgb(32,32,32)",opacity:.7,fillOpacity:1},circleMarkers:[{min:9999,max:9999,label:"Pipeline",options:{fillColor:"rgb(0,0,0)",color:"rgb(107, 174, 214)"}}]},{name:"Existing multi-family coops/condos by decade",keywords:"I want to map,point,location,multifamily,housing,coop,condo,real estate,downtown,development,existing",type:"app.map.layer.WebApiPointLayer",description:'<strong>Coop/condo multi-family housing locations are displayed by decade built.<\/strong><br />Information about each one was provided to the Long Island Index through subscriptions with Costar and REIS Services as well as data provided by the counties and several town websites. This information was updated and/or corrected and supplemented based on research undertaken by Index staff. <a href="html/multifamily.html" data-targetmodal="layerModal">More info.<\/a><br />',url:t+"api/coopscondos/existing",dataProperty:"decadeBlt",tooltipTemplate:"#tooltip-coopcondo",defaultMarkerOptions:{radius:5,weight:1,color:"rgb(32,32,32)",opacity:.7,fillOpacity:1},circleMarkers:[{min:2010,max:2010,label:"2010s",options:{fillColor:"rgb(8,48,107)"}},{min:2e3,max:2e3,label:"2000s",options:{fillColor:"rgb(8,81,156)"}},{min:1990,max:1990,label:"1990s",options:{fillColor:"rgb(33,113,181)"}},{min:1980,max:1980,label:"1980s",options:{fillColor:"rgb(66,146,198)"}},{min:1970,max:1970,label:"1970s",options:{fillColor:"rgb(107,174,214)"}},{min:1960,max:1960,label:"1960s",options:{fillColor:"rgb(155,195,255)"}},{min:1920,max:1959,label:"Pre-1960",options:{fillColor:"rgb(222,235,247)"}},{min:0,max:0,label:"Unknown",options:{fillColor:"rgb(255,255,250)"}}]}]},{name:"Education",layers:[{name:"District size: # of students",keywords:"I want to map,boundary,boundaries,polygon,education,school,school district,student body,enrollment,students,2012,2013",type:"app.map.layer.ChoroplethLayer",description:"<strong>Number of students enrolled by district in the 2012-13 school year.<\/strong> (NB: only includes pre_K thru 12th grade.)<br /><em>Source: NYS Education Department.<br />",options:{boundaryType:"schooldistricts",dataUrl:t+"api/schooldistricts/",dataProperty:"enroll2013",dataDivisor:null,dataBreaks:"enrollment",tooltipTemplate:"#tooltip-choropleth-school-district-enrollment"}},{name:"District size: square miles",keywords:"I want to map,boundary,boundaries,polygon,education,school,school district,size,square miles,area",description:'<em>Source:<\/em> <a href="http://gis.ny.gov/gisdata/inventories/details.cfm?DSID=1326" target="_blank">New York State Education Department<\/a>; analysis by the CUNY Mapping Service at the City University of New York Graduate Center.<br />',type:"app.map.layer.ChoroplethLayer",options:{boundaryType:"schooldistricts",dataUrl:t+"api/schooldistricts/",dataProperty:"sqMiles",dataDivisor:null,dataBreaks:"schoolDistArea",tooltipTemplate:"#tooltip-choropleth-school-district-squaremiles"}},{name:"Enrollment change 2006-2015",keywords:"I want to map,boundary,boundaries,polygon,education,school,school district,student body,enrollment,students,change,2005,2006,2014,2015",type:"app.map.layer.ChoroplethLayer",description:"<strong>Net change in overall enrollment from 2005-06 to 2014-15 school year, by district.<\/strong><br /><em>Source:<\/em> Analysis by Long Island Index staff.<br />",options:{boundaryType:"schooldistricts",dataUrl:t+"api/schooldistricts/",dataProperty:"chg0506to1415",dataDivisor:"enroll0506",dataBreaks:"enrollmentChange0516",tooltipTemplate:"#tooltip-choropleth-school-district-enrollment-change"}}]},{name:"Schools",layers:[{name:"School districts ",keywords:"I want to map,boundary,boundaries,polygon,education,district,special district,services,service provider,taxation,special tax,real property,real property tax,school,school district,high school",description:'<em>Source:<\/em> <a href="http://gis.ny.gov/gisdata/inventories/details.cfm?DSID=1326" target="_blank">New York State Education Department<\/a>.<br />',type:"L.TileLayer.AgsCached",url:i+"/arcgiscache/LongIslandWGS84_SchoolDistcacheWGS84/Layers/_alllayers/{z}/{y}/{x}.png",legend:[{image:t+"img/schooldistrict_both_horizontal.gif"},"multiline"],options:{zIndex:6}},{name:"High schools",keywords:"I want to map,point,location,education,school,high school",description:'<em>Source:<\/em> <a href="http://www.nysed.gov/admin/bedsdata.html" target="_blank">New York State Education Department, Directory of Public and Non-Public Schools and Administrators for The State of New York<\/a>, for the 2015-2016 school year.',type:"app.map.layer.WebApiPointLayer",url:t+"api/schools/highschools/",icons:[{icon:{iconUrl:t+"img/highschool.png",iconSize:[20,20],iconAnchor:[10,17]}}]},{name:"Middle schools",keywords:"I want to map,point,location,education,school,middle school,junior high",description:'<em>Source:<\/em> <a href="http://www.nysed.gov/admin/bedsdata.html" target="_blank">New York State Education Department, Directory of Public and Non-Public Schools and Administrators for The State of New York<\/a>, for the 2015-2016 school year.',type:"app.map.layer.WebApiPointLayer",url:t+"api/schools/juniorhighschools/",icons:[{icon:{iconUrl:t+"img/juniorhighschool.png",iconSize:[20,20],iconAnchor:[10,17]}}]},{name:"Elementary schools",keywords:"I want to map,point,location,education,school,elementary school",description:'<em>Source:<\/em> <a href="http://www.nysed.gov/admin/bedsdata.html" target="_blank">New York State Education Department, Directory of Public and Non-Public Schools and Administrators for The State of New York<\/a>, for the 2015-2016 school year.',type:"app.map.layer.WebApiPointLayer",url:t+"api/schools/elementaryschools/",icons:[{icon:{iconUrl:t+"img/elementaryschool.png",iconSize:[20,20],iconAnchor:[10,17]}}]}]},{name:"Land Use",expanded:!0,layers:[{name:"Predominant land use",keywords:"I want to map,boundary,boundaries,polygon,parcel,tax parcel,property,land use,landuse,real property,real estate,downtown,development,residential,commercial,industrial,transportation,institutional,vacant",description:'Parcel by parcel land use information from Nassau and Suffolk counties. <a href="html/landuse.html" data-targetmodal="layerModal">More info.<\/a>',type:"L.TileLayer.AgsCached",url:i+"/arcgiscache/LongIslandWGS84_ParcelcacheWGS84/Layers/_alllayers/{z}/{y}/{x}.png",legend:[{image:t+"img/landuse_landscape.gif"},"multiline"],visible:!0,options:{opacity:.8,zIndex:1,pane:"tilePane"}},{name:"Downtown/Train Station areas",keywords:"I want to map,boundary,boundaries,polygon,downtown,development,transit oriented",description:"These areas are displayed as 1/2 mile radius circles on the map, based on an analysis by the Regional Plan Association in 2009. RPA determined the centerpoint of each downtown area (such as an LIRR station or a street intersection) and used a geographic information system (GIS) to create 1/2 mile radius buffers around these centers. RPA's land use and Census analysis for each downtown focused on the properties and Census data within these buffers.",type:"L.TileLayer.AgsCached",url:i+"/arcgiscache/LongIslandWGS84_DowntownAreacacheWGS84/Layers/_alllayers/{z}/{y}/{x}.png",legend:[{image:t+"img/DowntownArea.gif"}],options:{opacity:.8,zIndex:6}},{name:"Downtown developable land",keywords:"I want to map,boundary,boundaries,polygon,downtown,development,transit oriented,8300 acres,land use,landuse",description:'Land with high development potential includes surface parking, vacant land, and unprotected open space. <a href="html/developableland.html" data-targetmodal="layerModal">More info.<\/a>',options:{opacity:.7}}]},{name:"Service Providers",expanded:!1,description:'Services such as fire, police, water, sewer services, are provided either by the county, the town or incorporated villages. In unincorporated areas, special districts were created beginning in the early 20th century to provide similar services and have the authority to tax residents to pay for themselves.<br /><br /><em>Sources:<\/em> Data for service provider districts came from multiple sources such as the Nassau County Assessor\'s Office, individual town/city tax rolls in both counties, online resources, and direct interviews. Additional data was found in reports conducted by former Comptroller Weitzman from 2006 to 2008 that are available from the Nassau County Comptroller\'s website. <a href="html/serviceproviders.html" data-targetmodal="layerModal">More info.<\/a><br />',layers:[{name:"Ambulance districts",keywords:"I want to map,boundary,boundaries,polygon,district,special district,services,service provider,taxation,special tax,real property,real property tax,ambulance,volunteer,suffolk",description:"<strong>Volunteer ambulance agency districts<\/strong><br />Data for Suffolk County only.",legendLayerName:"AmbulanceBdry",options:{opacity:.8}},{name:"Fire districts",keywords:"I want to map,boundary,boundaries,polygon,district,special district,services,service provider,taxation,special tax,real property,real property tax,fire,fire protection,fire house,fire district",legendLayerName:"FireBdry",options:{opacity:.8}},{name:"Garbage districts",keywords:"I want to map,boundary,boundaries,polygon,district,special district,services,service provider,taxation,special tax,real property,real property tax,garbage,garbage collection,trash,trash pickup,solid waste,sanitation",legendLayerName:"GarbageBdry"},{name:"Library districts",keywords:"I want to map,boundary,boundaries,polygon,district,special district,services,service provider,taxation,special tax,real property,real property tax,library,library district",legendLayerName:"LibraryBdry"},{name:"Park districts",keywords:"I want to map,boundary,boundaries,polygon,district,special district,services,service provider,taxation,special tax,real property,real property tax,park,park district,open space,nassau",description:"<strong>Data for Nassau County only.<\/strong><br />In addition to park districts and special districts, many incorporated villages, cities and towns have parks within their boundaries. These are paid for by residents of the village, city or town and access is typically restricted to those residents.",legendLayerName:"ParksBdry"},{name:"Parking districts",keywords:"I want to map,boundary,boundaries,polygon,district,special district,services,service provider,taxation,special tax,real property,real property tax,parking,parking district,nassau",description:"<strong>Data for Nassau County only.<\/strong><br />In Nassau, public parking is provided by the county, towns, villages and cities. Also, 17 public parking taxing districts are governed by Town Board members. Access varies: some are open to residents, others are available to non-district residents.",legendLayerName:"ParkingBdry",options:{opacity:.8}},{name:"Police precincts",keywords:"I want to map,boundary,boundaries,polygon,district,special district,services,service provider,taxation,special tax,real property,real property tax,police,police district,precinct,police services,public safety",description:"(As of early 2012, Nassau County Police Precincts are in the process of being consolidated.)",legendLayerName:"PoliceBdry"},{name:"School & HS districts",keywords:"I want to map,boundary,boundaries,polygon,district,special district,services,service provider,taxation,special tax,real property,real property tax,school,school district,elementary,high school",type:"L.TileLayer.AgsCached",url:i+"/arcgiscache/LongIslandWGS84_SchoolDistcacheWGS84/Layers/_alllayers/{z}/{y}/{x}.png",legend:[{image:t+"img/schooldistrict_both_horizontal.gif"},"multiline"]},{name:"Sewer districts",keywords:"I want to map,boundary,boundaries,polygon,district,special district,services,service provider,taxation,special tax,real property,real property tax,sewer,sewer district,sewage,sanitation",description:"<strong>Areas with sewers are shown on this map.<\/strong><br />Some areas of Nassau County, particularly on the North Shore, are not connected to public sewers. These have on-site sanitary systems (i.e., cesspools, leaching pools, or septic tanks) subject to County Health Dept. guidelines. Most of Suffolk is unsewered.",legendLayerName:"SewerBdry",options:{opacity:.6}},{name:"Water districts",keywords:"I want to map,boundary,boundaries,polygon,district,special district,services,service provider,taxation,special tax,real property,real property tax,water,water district,drinking water",legendLayerName:"WaterBdry"}]},{name:"Environment",layers:[{name:"Water Clarity (depth in feet)",keywords:"I want to map,point,location,environment,water,water quality,clarity,depth,secchi",type:"app.map.layer.WebApiPointLayer",description:'<strong>Water clarity is determined by measuring the depth at which a white disc, known as a <em>secchi disc<\/em>, ceases to be visible from the surface.<\/strong><br />Water clarity is highest in regions on the East End (i.e. Peconic Estuary), eastern Shinnecock Bay, &amp; the south shore bays of Nassau County.  In south shore regions of Suffolk County, water clarity is low across Great South Bay, Moriches Bay, and western Shinnecock Bay.  On the north shore, regions further inland such as back-harbor regions have lower water clarity whereas water in Long Island Sound has higher water clarity. <a href="html/watermonitoring.html" data-targetmodal="layerModal">More info.<\/a>',url:t+"api/waterMonitoringSites/",dataProperty:"meanSecchiDepth",tooltipTemplate:"#tooltip-secchi-depth",bringToBack:!0,defaultMarkerOptions:{radius:8,weight:1,color:"rgb(43, 19, 18)",opacity:1,fillOpacity:.9},circleMarkers:[{min:0,max:3,label:"1 to 3 feet (murky)",options:{fillColor:"rgb(84, 49, 5)"}},{min:3.00001,max:5,label:"3 to 5 ft",options:{fillColor:"rgb(140, 82, 10)"}},{min:5.00001,max:7,label:"5 to 7 ft",options:{fillColor:"rgb(191, 131, 46)"}},{min:7.00001,max:Infinity,label:"7 to 14 feet (clear)",options:{fillColor:"rgb(245, 231, 193)"}}]},{name:"Algae levels (micrograms/liter)",keywords:"I want to map,point,location,environment,water,water quality,algae,chlorophyll",type:"app.map.layer.WebApiPointLayer",description:'<strong>Algae impact is determined by measuring <em>Chlorophyll A<\/em> levels.<\/strong><br />Very near shore regions with stagnant water &amp; heavy nitrogen pollution have high Chlorophyll A (i.e., algae) levels and thus are murky.  Conversely, regions with good water circulation such as zones near ocean inlets or zones further from land have low algae levels and thus better water clarity. <a href="html/watermonitoring.html" data-targetmodal="layerModal">More info.<\/a>',url:t+"api/waterMonitoringSites/",dataProperty:"chlorophyllA",tooltipTemplate:"#tooltip-chlorophylla",defaultMarkerOptions:{radius:6,weight:1,color:"rgb(18, 40, 19)",opacity:1,fillOpacity:.7},circleMarkers:[{min:0,max:5,label:"1 to 5 mcg/l (low algae; clear)",options:{fillColor:"rgb(247, 252, 245)"}},{min:5.00001,max:10,label:"5 to 10",options:{fillColor:"rgb(197, 232, 190)"}},{min:10.00001,max:15,label:"10 to 15",options:{fillColor:"rgb(65, 171, 93)"}},{min:15.00001,max:Infinity,label:"15 to 60 mcg/l (high algae; murky)",options:{fillColor:"rgb(0, 69, 28)"}}]}]},{name:"Transportation",expanded:!0,layers:[{name:"Commuting by public transit",keywords:"I want to map,census,block group,american community survey,2013,2017,household,commuting,transportation,public,transit",type:"app.map.layer.ChoroplethLayer",description:'<strong>Percent of each block group\'s workers age 16+, on average, during 2013-17 period.<\/strong><br />Percents represent Census Bureau\'s best estimate for each block group based on American Community Survey; actual percents may be different where surveyed population is relatively small.<br /><em><b>Source:<\/b> <a href="https://factfinder.census.gov/bkmk/table/1.0/en/ACS/17_5YR/B08301/0500000US36059.15000|0500000US36103.15000" target="_blank"> U.S. Census Bureau, American Community Survey, Table B08301.<\/a><\/em><br />',options:{boundaryType:"blockgroups",dataUrl:t+"api/blockgroups/",dataProperty:"pubTrans",dataDivisor:"totWrk16pl",dataBreaks:"publicTransport",tooltipTemplate:"#tooltip-choropleth-commuting-public-transit"}},{name:"Households with no cars",keywords:"I want to map,census,block group,american community survey,2013,2017,household,commuting,transportation,public,transit,cars,no cars",type:"app.map.layer.ChoroplethLayer",description:'<strong>Percent of each block group\'s households (HHs), on average during 2013-17 period.<\/strong><br />Percents represent Census Bureau\'s best estimate for each block group based on American Community Survey; actual percents may be different where surveyed population is relatively small.<br /><em><b>Source:<\/b> <a href="https://factfinder.census.gov/bkmk/table/1.0/en/ACS/17_5YR/B25044/0500000US36059.15000|0500000US36103.15000" target="_blank"> U.S. Census Bureau, American Community Survey, Table B25044.<\/a><\/em><br />',options:{boundaryType:"blockgroups",dataUrl:t+"api/blockgroups/",dataProperty:"noCarHH",dataDivisor:"totHH10",dataBreaks:"noCars",opacity:.8,tooltipTemplate:"#tooltip-choropleth-households-no-cars"}}]},{name:"Transit Routes",expanded:!0,layers:[{name:"Long Island Railroad",keywords:"I want to map,line,polyline,transportation,transit,long island railroad,railroad,rail,commuter rail,mta,metropolitan transportation authority",type:"L.TileLayer.AgsCached",description:'<em>Source:<\/em> Metropolitan Transportation Authority <a href="http://web.mta.info/developers/developer-data-terms.html#data" target="_blank">GTFS data<\/a>. Current as of: December 2016.<br />',url:i+"/arcgiscache/LongIslandWGS84_LIRRcacheWGS84/Layers/_alllayers/{z}/{y}/{x}.png",legend:[{image:t+"img/LIRRlegend_compact.gif"},"multiline"],visible:!0,options:{zIndex:8}},{name:"Bus Routes",keywords:"I want to map,line,polyline,transportation,transit,mta,metropolitan transportation authority,bus,bus route,NICE",description:"Includes NICE, Suffolk, MTA, and local routes.<br /><em>Sources:<\/em> Nassau Inter-County Express (via the NICE website); Metropolitan Transportation Authority; NY Metropolitan Transportation Council. Current as of: 2013 (Nassau County); 2005 (Suffolk County); and the Huntington Area Rapid Transit/HART routes are based on data from New York Metropolitan Transportation Council (NYMTC) circa 2003.<br />",type:"app.map.layer.WebApiLineLayer",url:t+"api/busroutes/",dataProperty:"route",tooltipTemplate:"#tooltip-bus-route",outlineColor:"#ffffff",defaultMarkerOptions:{weight:4,color:"rgb(31,107,180)"}},{name:"Bike Routes",keywords:"I want to map,line,polyline,transportation,transit,bicycle,bike,bike lane,bike trail",description:'<em>Source:<\/em> <a href="https://data.ny.gov/Transportation/Bicycle-Routes-Across-New-York-State-Map/9n3d-pfjs" target="_blank">NYS Department of Transportation<\/a>. Current 2016.',type:"app.map.layer.WebApiLineLayer",url:t+"api/bikeroutes/",dataProperty:"surfaceType",tooltipTemplate:"#tooltip-bike-route",outlineColor:"#ffffff",defaultMarkerOptions:{weight:4,color:"rgb(77,0,116)"}},{name:"Historic trolleys",keywords:"I want to map,line,polyline,transportation,transit,trolley,historic,traction,shuttle",description:'Long Island Index research on historic trolley lines <a href="html/trolley.html" data-targetmodal="layerModal">available here.<\/a><br />',type:"app.map.layer.WebApiLineLayer",url:t+"api/trolleys/",dataProperty:"route",tooltipTemplate:"#tooltip-trolley",defaultMarkerOptions:{weight:5,color:"#ff0000"},markers:[{value:"Babylon Railroad Company",options:{color:"rgb(255, 162, 24)"}},{value:"Cedarhurst Railway",options:{color:"rgb(27, 158, 119)"}},{value:"Glen Cove Railroad",options:{color:"rgb(217, 95, 2)"}},{value:"Huntington Railroad",options:{weight:10,color:"rgb(117, 112, 179)"}},{value:"Huntington Traction Company",options:{color:"rgb(232, 42, 140)"}},{value:"LIRR Trolley",options:{color:"rgb(102, 166, 30)"}},{value:"Long Beach Railway",options:{color:"rgb(255, 85, 0)"}},{value:"Meadowbrook Shuttle",options:{color:"rgb(166, 118, 28)"}},{value:"Nassau County Railway",options:{color:"rgb(102, 102, 102)"}},{value:"New York and Long Island Traction",options:{color:"rgb(0, 77, 168)"}},{value:"New York and North Shore Traction",options:{color:"rgb(56, 168, 0)"}},{value:"Northport Traction Company",options:{color:"rgb(255, 0, 0)"}},{value:"Seashore Municipal Railroad",options:{color:"rgb(255, 128, 0)"}},{value:"South Shore Traction Company",options:{color:"rgb(106, 61, 153)"}},{value:"Suffolk Traction Company",options:{color:"rgb(176, 88, 40)"}}]},{name:"Long Island Expressway (LIE)",keywords:"I want to map,line,polyline,transportation,LIE,long island expressway,highway,road",visible:!0,options:{opacity:.6}}]},{name:"Boundaries",expanded:!0,layers:[{name:"Towns / Cities",keywords:"I want to map,boundary,boundaries,polygon,town,municipal,local government",type:"L.TileLayer.AgsCached",url:i+"/arcgiscache/LongIslandWGS84_BoundariesWGS84/Layers/_alllayers/{z}/{y}/{x}.png",legend:[{image:t+"img/TownCity.gif"}],visible:!0,options:{zIndex:8}},{name:"Incorporated village",keywords:"I want to map,boundary,boundaries,polygon,village,incorporated,municipal,local government",type:"L.TileLayer.AgsCached",url:i+"/arcgiscache/LongIslandWGS84_VillageInccacheWGS84/Layers/_alllayers/{z}/{y}/{x}.png",legend:[{image:t+"img/IncVillageLegend_shaded.gif"},"multiline"],options:{zIndex:6,opacity:.6}},{name:"Unincorporated hamlet",keywords:"I want to map,boundary,boundaries,polygon,village,hamlet,unincorporated,local government",type:"L.TileLayer.AgsCached",url:i+"/arcgiscache/LongIslandWGS84_VillageUninccacheWGS84/Layers/_alllayers/{z}/{y}/{x}.png",legend:[{image:t+"img/UnIncVillageLegend_shaded.gif"},"multiline"],options:{zIndex:6}},{name:"County leg. districts",keywords:"I want to map,boundary,boundaries,polygon,legislature,legislative,county,local government",description:'<em>Source:<\/em> Nassau County GIS (Basemap copyright, County of Nassau, NY) and <a href="https://gisportal.suffolkcountyny.gov/gis/home/item.html?id=fb7cd7b6cf434fc48cb69f2fe6a1b7bb" target="_blank"> Suffolk County GIS<\/a>. Current as of 2014.',legendLayerName:"County legislature"},{name:"NYS Assembly districts",keywords:"I want to map,boundary,boundaries,polygon,legislature,legislative,assembly,new york state,new york state assembly,state assembly,nys,state government",description:'<em>Source:<\/em> <a href="http://www.latfor.state.ny.us/maps/?sec=2012a_color" target="_blank">New York State Legislative Task Force on Demographic Research and Reapportionment.<\/a> Current as of 2012.',legendLayerName:"NYS Assembly"},{name:"NYS Senate districts",keywords:"I want to map,boundary,boundaries,polygon,legislature,legislative,senate,new york state,new york state senate,state senate,nys,state government",description:'<em>Source:<\/em> <a href="http://www.latfor.state.ny.us/maps/?sec=2012a_color" target="_blank">New York State Legislative Task Force on Demographic Research and Reapportionment.<\/a> Current as of 2012.',legendLayerName:"NYS Senate"},{name:"Congressional districts",keywords:"I want to map,boundary,boundaries,polygon,legislature,congress,congressional,federal government",description:'<em>Source:<\/em> <a href="http://www.latfor.state.ny.us/maps/?sec=2012c_color" target="_blank">New York State Legislative Task Force on Demographic Research and Reapportionment, as drawn originally by the US District Court for the Eastern District<\/a>. Current as of 2012.',legendLayerName:"Congress"},{name:"Reference",type:"L.TileLayer.AgsCached",url:i+"/arcgiscache/LongIslandWGS84_ReferenceLabelsWGS84/Layers/_alllayers/{z}/{y}/{x}.png",visible:!0,options:{minZoom:14}}]}]}}(app);app.config.choropleth=function(){"use strict";return{dataBreaks:{percentDefault:{type:"percent",colorScheme:"greenAlphaYellowBlack",breaks:[{min:0,max:.1},{min:.1,max:.2},{min:.2,max:.3},{min:.3,max:.4},{min:.4,max:1}]},density:{colorScheme:"yellowBlue_historic",type:"number",breaks:[{min:0,max:500,label:"less than 500 persons per square mile"},{min:500,max:1e3,label:"500 - 1,000 persons/sq mi"},{min:1e3,max:2500,label:"1,000 - 2,500 persons/sq mi"},{min:2500,max:5e3,label:"2,500 - 5,000 persons/sq mi"},{min:5e3,max:1e4,label:"5,000 - 10,000 persons/sq mi"},{min:1e4,max:25e3,label:"10,000 - 25,000 persons/sq mi"},{min:25e3,max:45e3,label:"25,000 - 45,000 persons/sq mi"}]},age:{type:"percent",colorScheme:"yellowBrown_historic",breaks:[{min:0,max:0,label:"No persons in this age group"},{min:1e-5,max:.025,label:"2.5% or less"},{min:.025,max:.05},{min:.05,max:.1},{min:.1,max:.15},{min:.15,max:.2},{min:.2,max:.3},{min:.3,max:.4},{min:.4,max:1,label:"40% or more"}]},diversity:{type:"percent",colorScheme:"lightdarkBlueCB_historic",breaks:[{min:0,max:.05,label:"5% or less of population is non-white"},{min:.05,max:.1},{min:.1,max:.2},{min:.2,max:.3},{min:.3,max:.6},{min:.6,max:.8},{min:.8,max:.9},{min:.9,max:1}]},highIncome:{type:"percent",colorScheme:"green7_nohistoricmatch",breaks:[{min:0,max:0,label:"No HHs w/income > $100K"},{min:1e-6,max:.2,label:"20% or fewer HHs w/income > $100K"},{min:.2,max:.3},{min:.3,max:.4},{min:.4,max:.5},{min:.5,max:.7},{min:.7,max:1,label:"70% or more"}]},poverty:{type:"percent",colorScheme:"yellowRed_historic",breaks:[{min:0,max:0,label:"No population w/incomes below poverty line"},{min:1e-6,max:.05,label:"5% or less w/incomes below poverty line"},{min:.05,max:.1},{min:.1,max:.2},{min:.2,max:.3},{min:.3,max:.4},{min:.4,max:.6},{min:.6,max:1,label:"60% or more"}]},povertyNear:{type:"percent",colorScheme:"yellowRed_historic",breaks:[{min:0,max:0,label:"No population w/incomes < 200% of poverty line"},{min:1e-6,max:.05,label:"5% or less w/incomes < 200% of poverty line"},{min:.05,max:.1},{min:.1,max:.2},{min:.2,max:.3},{min:.3,max:.4},{min:.4,max:.6},{min:.6,max:1,label:"60% or more"}]},housingKids:{type:"percent",colorScheme:"lightdarkRed8_historic",breaks:[{min:0,max:0,label:"No HHs with children"},{min:1e-6,max:.05,label:"less than 5% HHs with children"},{min:.05,max:.1},{min:.1,max:.2},{min:.2,max:.3},{min:.3,max:.4},{min:.4,max:.6},{min:.6,max:1,label:"60% or more"}]},housingAlone:{type:"percent",colorScheme:"lightdarkRed8_historic",breaks:[{min:0,max:0,label:"No HHs with people living alone"},{min:1e-6,max:.05,label:"less than 5% HHs w/ people living alone"},{min:.05,max:.1},{min:.1,max:.2},{min:.2,max:.3},{min:.3,max:.4},{min:.4,max:.6},{min:.6,max:1,label:"60% or more"}]},housingCost:{type:"percent",colorScheme:"lightdarkPurple_historic",breaks:[{min:0,max:0,label:"No HHs have costs > 35% of income"},{min:1e-6,max:.2,label:"20% or fewer HHs have costs > 35% of income"},{min:.2,max:.3},{min:.3,max:.4},{min:.4,max:.5},{min:.5,max:1,label:"50% or more"}]},enrollment:{type:"number",colorScheme:"green6",breaks:[{min:0,max:500,label:"fewer than 500 students per district"},{min:500,max:1e3,label:"500 - 1,000 students/district"},{min:1e3,max:2e3,label:"1,000 - 2,000 students/district"},{min:2e3,max:4e3,label:"2,000 - 4,000 students/district"},{min:4e3,max:7e3,label:"4,000 - 7,000 students/district"},{min:7e3,max:Infinity,label:"7,000 or more students/district"}]},schoolDistArea:{type:"number",colorScheme:"yellowBrown4",breaks:[{min:0,max:5,label:"1.1 - 5 square miles"},{min:5,max:15},{min:15,max:35},{min:35,max:91}]},enrollmentChange:{colorScheme:"brownPurple",breaks:[{min:-1e5,max:-250,label:"Net reduction of 250 students or more"},{min:-250,max:-100,label:"Net reduction of 100-250 students"},{min:-100,max:-5,label:"Net reduction of up to 100 students"},{min:-5,max:5,label:"No change (+/- 5 students)"},{min:5,max:100,label:"Net gain of 5-100 students"},{min:100,max:450,label:"Net gain of 100-450 students"},{min:450,max:Infinity,label:"Net gain of 450 students or more"}]},enrollmentChange0516:{colorScheme:"brownPurple2",breaks:[{min:-.5,max:-.1,label:"Net loss of 10 to 50%"},{min:-.1,max:-.02,label:"Net loss of up to 10%"},{min:-.02,max:.02,label:"No change (+/- 2%)"},{min:.02,max:.1,label:"Net gain of up to 10%"},{min:.1,max:Infinity,label:"Net gain of 10% or more"}]},publicTransport:{colorScheme:"lightdarkRed_historic",type:"percent",breaks:[{min:-.5,max:-.1,label:"2.5% or fewer workers commuting by public transit"},{min:.025,max:.05},{min:.05,max:.1},{min:.1,max:.2},{min:.2,max:.3},{min:.3,max:1,label:"20% or more commuting by public transit"}]},noCars:{colorScheme:"noCars",type:"percent",breaks:[{min:0,max:0,label:"No HHs with no cars (100% w/at least 1 car)"},{min:0,max:.1,label:"10% or fewer HHs with no cars (90-99% w/cars)"},{min:.1,max:.2,label:"10% - 20% (80-90% w/cars)"},{min:.2,max:.33,label:"20% - 33% (66-80% w/cars)"},{min:.33,max:1,label:"33% or more (less than 66% w/cars)"}]}},colorSchemes:{yellowBlue_historic:["rgba(255,255,217,0.8)","rgba(237,248,177,0.8)","rgba(199,233,180,0.8)","rgba(127,205,187,0.8)","rgba(29,145,192,0.8)","rgba(34,94,168,0.8)","rgba(8,29,88,0.8)"],reddish:["rgba(254,240,217, 0.8)","rgba(253,212,158, 0.8)","rgba(253,187,132, 0.8)","rgba(252,141,89, 0.8)","rgba(227,74,51, 0.8)","rgba(179,0,0, 0.8)"],lightdarkBlueCB_historic:["rgba(222,235,247, 0.8)","rgba(198,219,239, 0.8)","rgba(158,202,225, 0.8)","rgba(107,174,214, 0.8)","rgba(66,146,198, 0.8)","rgba(33,113,181, 0.8)","rgba(8,81,156, 0.8)","rgba(8,40,90, 0.8)"],blue:["rgba(240, 244, 255, 0.8)","rgba(199, 220, 240, 0.8)","rgba(157, 201, 224, 0.8)","rgba(107, 175, 214, 0.8)","rgba(49, 131, 189, 0.8)","rgba(8, 82, 156, 0.8)"],green7_nohistoricmatch:["rgba(175,175,175, 0.8)","rgba(237,248,233, 0.8)","rgba(199,233,192, 0.8)","rgba(161,217,155, 0.8)","rgba(116,196,118, 0.8)","rgba(49,163,84, 0.8)","rgba(0,109,44, 0.8)"],yellowRed_historic:["rgba(175,175,175, 0.8)","rgba(255,237,160,0.8)","rgba(254,217,118,0.8)","rgba(254,178,76,0.8)","rgba(253,141,60,0.8)","rgba(252,78,42,0.8)","rgba(227,26,28,0.8)","rgba(177,0,38,0.8)"],lightdarkRed8_historic:["rgba(175,175,175, 0.8)","rgba(254,224,210, 0.8)","rgba(252,187,161, 0.8)","rgba(252,146,114, 0.8)","rgba(251,106,74, 0.8)","rgba(239,59,44, 0.8)","rgba(203,24,29, 0.8)","rgba(153,0,13, 0.8)"],fuschia:["rgba(175,175,175, 0.8)","rgba(254,235,226, 0.8)","rgba(251,180,185, 0.8)","rgba(247,104,161, 0.8)","rgba(197,27,138, 0.8)","rgba(122,1,119, 0.8)"],lightdarkPurple_historic:["rgba(241,206,237,0.8)","rgba(224,175,228,0.8)","rgba(205,143,216,0.8)","rgba(183,113,203,0.8)","rgba(134,57,170,0.8)","rgba(106,30,151,0.8)","rgba(75,0,130,0.8)"],yellowBlue6:["rgba(175,175,175, 0.8)","rgba(255,255,204, 0.8)","rgba(161,218,180, 0.8)","rgba(65,182,196, 0.8)","rgba(44,127,184, 0.8)","rgba(37,52,148, 0.8)"],yellowBrown_historic:["rgba(175,175,175, 0.8)","rgba(255,247,188, 0.8)","rgba(254,227,145, 0.8)","rgba(254,196,79, 0.8)","rgba(254,153,41, 0.8)","rgba(236,112,20, 0.8)","rgba(204,76,2, 0.8)","rgba(153,52,4, 0.8)","rgba(102,37,6, 0.8)"],yellowBrown_nohistoricmatch:["rgba(175,175,175, 0.8)","rgba(255,255,212, 0.8)","rgba(254,217,142, 0.8)","rgba(254,153,41, 0.8)","rgba(217,95,14, 0.8)","rgba(153,52,4, 0.8)"],lightdarkRed_historic:["rgba(253,224,221,0.8)","rgba(252,197,192,0.8)","rgba(247,104,161,0.8)","rgba(221,52,151,0.8)","rgba(122,1,119,0.8)","rgba(73,0,106,0.8)"],lightGreenBlue:["rgba(240,249,232, 0.8)","rgba(186,228,188, 0.8)","rgba(123,204,196, 0.8)","rgba(67,162,202, 0.8)","rgba(8,104,172, 0.8)"],noCars:["rgba(240,240,204, 0.8)","rgba(255, 203, 92, 0.8)","rgba(252, 141, 61, 0.8)","rgba(240, 59, 31, 0.8)","rgba(189, 0, 38, 0.8)"],green6:["rgba(240,249,232, 0.8)","rgba(204,235,197, 0.8)","rgba(168,221,181, 0.8)","rgba(123,204,196, 0.8)","rgba(67,162,202, 0.8)","rgba(8,104,172, 0.8)"],yellowBrown4:["rgba(255,255,212, 0.8)","rgba(254,217,142, 0.8)","rgba(254,153,41, 0.8)","rgba(204,76,2, 0.8)"],greenAlphaYellowBlack:["rgba(255, 255, 255, 0.8)","rgba(217,240,163, 0.8)","rgba(173,221,142, 0.8)","rgba(120,198,121, 0.8)","rgba(65,171,93, 0.8)"],orange:["rgba(254,237,222, 0.8)","rgba(253,208,162, 0.8)","rgba(253,174,107, 0.8)","rgba(253,141,60, 0.8)","rgba(241,105,19, 0.8)","rgba(217,72,1, 0.8)","rgba(140,45,4, 0.8)"],brownPurple:["rgba(179,88,6, 0.8)","rgba(241,163,64, 0.8)","rgba(254,224,182, 0.8)","rgba(247,247,247, 0.8)","rgba(216,218,235, 0.8)","rgba(153,142,195, 0.8)","rgba(84,39,136, 0.8)"],brownPurple2:["rgba(179,88,6, 0.8)","rgba(241,163,64, 0.8)","rgba(247,247,247, 0.8)","rgba(153,142,195, 0.8)","rgba(84,39,136, 0.8)"]}}}(app);app.config.identified=function(){"use strict";return{identifiableFeatures:[{featureType:"waterMonitoringSites",layer:["Water Clarity (depth in feet)","Algae Levels (micrograms/liter)"]},{featureType:"rentals",layer:["Proposed multi-family rental properties","Existing multi-family rental properties by decade"]},{featureType:"coopsCondos",layer:["Proposed multi-family coops/condo projects","Existing multi-family coops/condos by decade"]},{featureType:"schools",layer:["High schools","Middle schools","Elementary schools"]},{featureType:"blockGroups",layer:null,symbol:{options:{color:"rgba(255, 0, 0, 255)"}}},{featureType:"villages",symbol:{options:{color:"rgba(205,105, 0, 255)"}}},{featureType:"towns",symbol:{options:{color:"rgba(0,0,0, 255)"}}},{featureType:"counties",symbol:{options:{color:"rgba(75,105,105, 255)"}}},{featureType:"nysAssemblyDistricts",layer:"NYS Assembly districts"},{featureType:"countyLegislativeDistricts",layer:"County LEG. Districts"},{featureType:"nysSenateDistricts",layer:"NYS Senate districts"},{featureType:"congressionalDistricts",layer:"Congressional districts"},{featureType:"fireDistricts",layer:"Fire Districts"},{featureType:"ambulanceDistricts",layer:"Ambulance Districts"},{featureType:"garbageDistricts",layer:"Garbage Districts"},{featureType:"libraryDistricts",layer:"Library Districts"},{featureType:"policePrecincts",layer:"Police Precincts"},{featureType:"schoolDistricts",symbol:{options:{color:"rgba(0,0,0, 255)"}}},{featureType:"waterDistricts",layer:"Water Districts"},{featureType:"parkDistricts",layer:"Park Districts"},{featureType:"parkingDistricts",layer:"Parking Districts"},{featureType:"sewerDistricts",layer:"Sewer Districts"},{featureType:"trolleys",layer:"Historic Trolleys"},{featureType:"bikeRoutes",layer:"Bike Routes"},{featureType:"busRoutes",layer:"Bus Routes"}]}}(app);app.config.census=function(){"use strict";return{url:"https://api.census.gov/data/2017/acs/acs5",key:"ccb61d5d5fe6ef4a7c99c1677cbaa193e20a9254",geography:{blockGroups:_.template("for=block+group:{{ id.substring(11, 12) }}&in=state:36+county:{{ id.substring(2, 5) }}+tract:{{ id.substring(5, 11) }}"),villages:_.template("for=place:{{id}}&in=state:36"),towns:_.template("for=county+subdivision:{{cousubfp}}&in=state:36+county:{{county}}"),counties:_.template("for=county:{{fips}}&in=state:36"),nysAssemblyDistricts:_.template("for=state+legislative+district+(lower+chamber):{{id}}&in=state:36"),nysSenateDistricts:_.template("for=state+legislative+district+(upper+chamber):{{id}}&in=state:36"),congressionalDistricts:_.template("for=congressional+district:{{id}}&in=state:36"),schoolDistricts:null},variables:{diversity:{add:["B03002_001E"],subtract:["B03002_003E"],divisor:["B01001_001E"]},"high income households":{add:["B19001_014E","B19001_015E","B19001_016E","B19001_017E"],divisor:["B11005_001E"]},"population in poverty":{add:["C17002_002E","C17002_003E"],divisor:["C17002_001E"]},"population in near poverty":{add:["C17002_002E","C17002_003E","C17002_004E","C17002_005E","C17002_006E","C17002_007E"],divisor:["C17002_001E"]},"kids (age 5 or younger)":{add:["B01001_003E","B01001_027E"],divisor:["B01001_001E"]},"school age (6 to 17 years)":{add:["B01001_004E","B01001_005E","B01001_006E","B01001_028E","B01001_029E","B01001_030E"],divisor:["B01001_001E"]},"age 18 to 34":{add:["B01001_007E","B01001_008E","B01001_009E","B01001_010E","B01001_011E","B01001_012E","B01001_031E","B01001_032E","B01001_033E","B01001_034E","B01001_035E","B01001_036E"],divisor:["B01001_001E"]},"age 35 to 54":{add:["B01001_013E","B01001_014E","B01001_015E","B01001_016E","B01001_037E","B01001_038E","B01001_039E","B01001_040E"],divisor:["B01001_001E"]},"age 55 or older":{add:["B01001_017E","B01001_018E","B01001_019E","B01001_020E","B01001_021E","B01001_022E","B01001_023E","B01001_024E","B01001_025E","B01001_041E","B01001_042E","B01001_043E","B01001_044E","B01001_045E","B01001_046E","B01001_047E","B01001_048E","B01001_049E"],divisor:["B01001_001E"]},"housing cost burden":{add:["B25072_007E","B25072_014E","B25072_021E","B25072_028E","B25093_007E","B25093_014E","B25093_021E","B25093_028E"],divisor:["B11005_001E"]},"households with children":{add:["B11005_002E"],divisor:["B11005_001E"]},"people living alone":{add:["B11016_010E"],divisor:["B11005_001E"]},"commuting by public transit":{add:["B08301_010E"],divisor:["B08301_001E"]},"households with no cars":{add:["B25044_003E","B25044_010E"],divisor:["B11005_001E"]}}}}(app);app.entities=app.entities||{};app.entities.FeatureBundle=function(){"use strict";var n="villages",t=function(n,t){this.bundle=n;t&&this.selectInitialFeature()};return $.extend(t.prototype,{selectInitialFeature:function(){var t;this.bundle[n]&&this.bundle[n].length>0?t=this.bundle[n][0]:$.each(this.bundle,function(n,i){if(i.length>0)return t=i[0],!1});t&&this.select(t)},getFeatureCount:function(){return this.getFlattenedBundle().length},getFlattenedBundle:function(){var n=this.bundle;return $.map(n,function(n){return n})},setLastSelectedFeatureType:function(t){$.each(this.bundle,function(i,r){$.each(r,function(r,u){u===t&&(n=i)})})},highlight:function(n){Vue.set(n,"highlighted",!0)},unhighlight:function(n){Vue.set(n,"highlighted",!1)},select:function(n){var t=this.getFlattenedBundle();$.each(t,function(n,t){t.selected&&Vue.set(t,"selected",!1)});Vue.set(n,"selected",!0);this.setLastSelectedFeatureType(n)},unselect:function(n){Vue.set(n,"selected",!1)},focus:function(n){Vue.set(n,"focused",Date.now())},promote:function(n){Vue.set(n,"promoted",Date.now())}}),t}(app);app.entities=app.entities||{};app.entities.featureState=function(){"use strict";return{identifiedFeatures:{},identifiedCount:0,currentQuery:null,busy:!1,activeChoropleth:null,choroplethIsLoading:!1}}(app);app.entities=app.entities||{};app.entities.featureQuery=function(n){"use strict";function e(){var u=n.service.pageLink.getValue("q"),t,f,i;if(u&&u.trim().length>0){if(t=u.split(":"),t.length!==2)return;switch(t[0]){case"village":return f=new n.entities.featureQuery.VillageQuery({id:t[1]}),f.search().then(function(){Vue.set(f.feature,"focused",Date.now())});case"point":if(i=t[1].split(","),i.length===2&&!isNaN(parseFloat(i[0]))&&!isNaN(parseFloat(i[0]))){var r=new L.LatLng(i[0],i[1]),e=n.service.coordinateConverter.toServerCoords(r),t=new n.entities.featureQuery.PointLocationQuery({x:e.x,y:e.y,lat:r.lat,lng:r.lng});t.search().then(function(){n.service.geocoder.reverseGeocode(r).then(function(n){Vue.set(t.feature,"address",n)})})}}}}var i=n.entities.featureState,t,r,u,f;return $(e),t=function(){this.params={};this.queryService=null;this.featureType=null;this.feature=null},_.extend(t.prototype,{search:function(){return this.beforeSearch(),this.queryService.get(this.params).then($.proxy(function(n){this.afterSearch();return this.onSearchComplete(n)},this))},beforeSearch:function(){i.busy=!0},afterSearch:function(){i.busy=!1},onSearchComplete:function(t){this.bundleHasQueriedFeature(t)&&(this.feature=this.getQueriedFeatureFromBundle(t),this.removeQueriedFeatureFromData(t));var r=new n.entities.FeatureBundle(t);return i.currentQuery=this,i.identifiedFeatures=r,r},bundleHasQueriedFeature:function(n){return n[this.featureType]&&n[this.featureType].length>0},getQueriedFeatureFromBundle:function(n){return this.params.id?_.find(n[this.featureType],{id:this.params.id}):n[this.featureType][0]},removeQueriedFeatureFromData:function(n){n[this.featureType]=null;delete n[this.featureType]},toUrlString:function(){return this.urlString}}),r=function(i){t.call(this);this.params={id:i.id};this.queryService=n.service.villages;this.featureType="villages";this.urlString="village:"+i.id},r.prototype=_.create(t.prototype),u=function(i){if(t.call(this),this.queryService=n.service.features,this.params={x:i.x,y:i.y,tolerance:i.tolerance||7},!i.lat&&!i.lng){var r=n.service.coordinateConverter.serverCoordToLatLng([i.x,i.y]);i.lat=r.lat;i.lng=r.lng}this.featureType="pointLocations";this.feature={lat:i.lat,lng:i.lng,wkt:"POINT ("+this.params.x+" "+this.params.y+")"};this.urlString="point:"+i.lat.toFixed(5)+","+i.lng.toFixed(5)},u.prototype=_.create(t.prototype),f=function(i){t.call(this);this.queryService=n.service.features;this.featureType="addresses";var u=i.geocodeResult,r=new L.LatLng(u.properties.DisplayY,u.properties.DisplayX),f=n.service.coordinateConverter.toServerCoords(r);this.params={x:f.x,y:f.y,tolerance:7};this.feature={geocodeResult:i.geocodeResult,wkt:"POINT ("+this.params.x+" "+this.params.y+")"};this.urlString="point:"+r.lat.toFixed(5)+","+r.lng.toFixed(5)},f.prototype=_.create(t.prototype),{FeatureQuery:t,PointLocationQuery:u,AddressQuery:f,VillageQuery:r}}(app);app.service=app.service||{};app.service.pageLink=function(n){"use strict";function r(n){var t,u,i,r;if(n=="")return{};if(t=n.toLowerCase().split("?")[1].split("&"),t=="")return{};for(u={},i=0;i<t.length;++i)(r=t[i].split("="),r.length==2)&&(u[r[0]]=decodeURIComponent(r[1].replace(/\+/g," ")));return u}function u(){var n=location.href.split("?")[0];return n.split("#")[0]}function f(){return n.service.layers.getVisibleLayers().then(function(i){var r={},f=n.map.map,e;return r.latlng=f.getCenter().lat.toFixed(5)+","+f.getCenter().lng.toFixed(5),r.z=f.getZoom(),t.currentQuery&&(r.q=t.currentQuery.toUrlString()),i.length>0&&(e=_.filter(i,function(n){return n.legend}),e.length&&(r.layers=_.map(e,function(n){return n.name.toLowerCase()}).join(","))),u()+"?"+$.param(r)})}function e(n){return i[n]}var t=n.entities.featureState,i=r(window.location.search);return{getValue:e,getLink:f}}(app);app.service=app.service||{};app.service.arcgisserver=function(n){"use strict";function u(n,t){return n.parentLayer&&!t[n.parentLayer.id].parentLayer}function f(n,t){return n.subLayers.length>0?$.map(n.subLayers,function(n){if(t[n.id].name.indexOf("_label")===-1)return n.id}):[n.id]}function e(n,t){return $.map(n.subLayers,function(n){if(t[n.id].name.indexOf("_label")>-1)return n.id})}function o(n,t){var i=s(n,t);return i&&i.renderer.type==="simple"?{options:{color:i.renderer.symbol.outline?"rgba("+i.renderer.symbol.outline.color.join(",")+")":null}}:null}function s(n,t){return n.subLayers.length>0?$.map(n.subLayers,function(n){if(t[n.id].name.indexOf("_label")===-1)return t[n.id].drawingInfo?t[n.id].drawingInfo:null})[0]:n.drawingInfo?n.drawingInfo:null}function h(){return $.ajax({url:i,dataType:"json"}).then(function(n){var i={};return $.each(n.layers,function(n,t){i[t.id]=t}),$.map(n.layers,function(n){if(u(n,i))return{id:n.id,name:n.name,url:t.liMapServiceUrl,requestIds:f(n,i),requestLabelIds:e(n,i),description:n.description,identifySymbol:o(n,i)}})})}function c(){return $.ajax({url:r,dataType:"json"}).then(function(n){return n.layers})}var t=n.config,i=t.liMapServiceUrl+"/layers?f=json",r=t.liMapServiceUrl+"/legend?f=json";return{getLayers:h,getLegend:c}}(app);app.service=app.service||{};app.service.layers=function(n){"use strict";function c(t){var i=n.service.pageLink.getValue("layers");i&&(i=i.split(","),_.forEach(t.groups,function(n){_.forEach(n.layers,function(n){n.visible=_.indexOf(i,n.name.toLowerCase())>-1})}))}function l(n,t,i){var r={},e;$.each(t,function(n,t){r[t.name.toLowerCase()]=t});e={};$.each(i,function(n,t){e[t.layerName.toLowerCase()]=t});$.each(n.groups,function(n,t){$.each(t.layers,function(n,i){var s,o;if(r[i.name.toLowerCase()]?(o=i.legend?i.legend:i.legendLayerName?e[i.legendLayerName.toLowerCase()].legend:e[i.name.toLowerCase()].legend,s=$.extend({},{zIndex:200-r[i.name.toLowerCase()].id},{bounds:u.map.layerMaxBounds},i.options),t.layers[n]=$.extend({visible:!1},r[i.name.toLowerCase()],{legend:o},i,{options:s})):(s=$.extend({},{zIndex:10},{bounds:u.map.layerMaxBounds},i.options),t.layers[n]=$.extend({visible:!1},i,{options:s})),i.type&&i.type.indexOf("ChoroplethLayer")>1){var h=f.dataBreaks[i.options.dataBreaks],c=f.colorSchemes[h.colorScheme],o=$.map(h.breaks,function(n,t){if(n.label)return{label:n.label,color:c[t]};if(h.type==="percent")return{label:n.min*100+"% - "+n.max*100+"%",color:c[t]};var i=n.max===Infinity?n.min+" or more":n.min+" - "+n.max;return{label:i,color:c[t]}});t.layers[n].legend=o}i.type&&i.type.indexOf("WebApiPointLayer")>1&&(i.icons&&(o=$.map(i.icons,function(n){return{label:n.label,image:n.icon.iconUrl}}),t.layers[n].legend=o,t.layers[n].icons.sort(function(n,t){return n.max-t.max})),t.layers[n].circleMarkers&&($.each(t.layers[n].circleMarkers,function(i){t.layers[n].circleMarkers[i].options=$.extend({},t.layers[n].defaultMarkerOptions,t.layers[n].circleMarkers[i].options)}),t.layers[n].legend=$.map(i.circleMarkers,function(n){return{label:n.label,fillColor:n.options.fillColor,color:n.options.color}}),t.layers[n].circleMarkers.sort(function(n,t){return n.max-t.max})));i.type&&i.type.indexOf("WebApiLineLayer")>1&&($.each(t.layers[n].markers,function(i){t.layers[n].markers[i].options=$.extend({},t.layers[n].defaultMarkerOptions,t.layers[n].markers[i].options)}),t.layers[n].legend=i.markers&&i.markers.length>0?$.map(i.markers,function(n){return{label:n.label||n.value,color:n.options.color}}):[{label:"",color:t.layers[n].defaultMarkerOptions.color}])})})}function o(){return i||(i=$.when(e.getLayers(),e.getLegend()).then(function(n,i){return l(t,n,i),t})),i}function r(){return o().then(function(n){return $.map(n.groups,function(n){return n.layers})})}function a(){return r().then(function(n){return _.filter(n,{visible:!0})})}function v(n){return r().then(function(t){if(!n)return null;n=$.trim(n.toLowerCase());for(var i=0,r=t.length;i<r;i++)if($.trim(t[i].name.toLowerCase())===n)return t[i];return null})}function s(n){var i=_.find(t.groups,{layers:[{name:n}]});return i?_.find(i.layers,{name:n}):null}function y(n){var t;switch(n){case"elementary":t="Elementary schools";break;case"juniorhigh":t="Middle schools";break;case"high":t="High schools"}return s(t)}function p(n){var i=_.find(h.identifiableFeatures,{featureType:n}),r=_.isArray(i.layer)?i.layer[0]:i.layer,u=_.find(t.groups,{layers:[{name:r}]});return _.find(u.layers,{name:r})}var u=n.config,t=n.config.layersConfig,f=n.config.choropleth,h=n.config.identified,e=n.service.arcgisserver,i;return c(t),{getLayerGroups:o,getLayers:r,getLayer:v,getVisibleLayers:a,getLayerConfig:s,getLayerConfigByFeatureType:p,getLayerConfigBySchoolType:y}}(app);app.service=app.service||{};app.service.features=function(n){"use strict";function i(n){var i={x:n.x,y:n.y,t:n.tolerance};return t.fire("getfeaturesstarted",{query:i}),$.ajax({url:r,method:"GET",dataType:"json",data:i}).then(function(n){var i=n;return t.fire("getfeaturescompleted",{data:i}),i})}var r=n.config.baseUrl+"api/features",u=L.Evented.extend({getFeatures:i,get:i}),t=new u;return t}(app);app.service=app.service||{};app.service.eventBus=function(){"use strict";var n=new Vue;return n}();app.service=app.service||{};app.service.villages=function(n){"use strict";function r(){return t||(t=$.ajax({url:i,method:"GET",dataType:"json"}).then(function(n){return n})),t}function u(n){var t=n.id,r=i+"/"+t;return $.ajax({url:r,method:"GET",dataType:"json"}).then(function(n){return n})}var i=n.config.baseUrl+"api/villages",t;return{getAll:r,get:u}}(app);app.service=app.service||{};app.service.multifamily=function(n){"use strict";function h(){return t||(t=$.ajax({url:o,method:"GET",dataType:"json"}).then(function(n){return n})),t}function c(){return i||(i=$.ajax({url:s,method:"GET",dataType:"json"}).then(function(n){return n})),i}function u(){return r||(r=$.ajax({url:e,method:"GET",dataType:"json"}).then(function(n){return n})),r}function f(n){return n.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")}function l(n,t){var n=n.trim();return n.length===0?t:_.filter(t,function(t){return RegExp(f(n),"i").test(t.name)||RegExp(f(n),"i").test(t.address)})}function a(n){return u().then($.proxy(function(t){return l(n,t.rentals.concat(t.coopsCondos)).sort(function(n,t){return n.name<t.name?-1:1})},this))}var e=n.config.baseUrl+"api/multifamily",o=n.config.baseUrl+"api/coopscondos",s=n.config.baseUrl+"api/rentals",t,i,r;return{getAll:u,getCoopsCondos:h,getRentals:c,suggest:a}}(app);app.service=app.service||{};app.service.schools=function(n){"use strict";function i(){return t||(t=$.ajax({url:r,method:"GET",dataType:"json"}).then(function(n){return n})),t}function u(n,t){var n=n.trim();return n.length===0?t:_.filter(t,function(t){return RegExp(_.escapeRegExp(n),"i").test(t.name)})}function f(n){return i().then(function(t){return u(n,t).sort(function(n,t){return n.name<t.name?-1:1})})}var r=n.config.baseUrl+"api/schools",t;return{getAll:i,suggest:f}}(app);app.service=app.service||{};app.service.identifiedSymbols=function(n){"use strict";function r(n,t){var i=n.markers||n.circleMarkers,r=t[n.dataProperty];return i[0].value?_.find(i,{value:r}):_.find(i,function(n){return r<=n.max})}function e(n,t){var o=_.find(f,{featureType:n}),s,u,e;return o?_.isArray(o.layer)?(e={},_.each(o.layer,function(n){var u=_.find(i,function(t){return _.trim(t.name).toLowerCase()===_.trim(n).toLowerCase()}),f;(u.markers||u.circleMarkers)&&(f=r(u,t),f&&(e[u.dataProperty]=r(u,t)))}),e):(s=o.layer,u=_.find(i,function(n){return _.trim(n.name).toLowerCase()===_.trim(s).toLowerCase()}),u?((u.markers||u.circleMarkers)&&(e=r(u,t)),u.identifySymbol&&(e=u.identifySymbol),u.type&&u.type.toLowerCase().indexOf("webapilinelayer")>-1&&(!u.markers||u.markers.length===0)&&(e={options:u.defaultMarkerOptions})):e=o.symbol,e):null}var u=n.service.layers,f=n.config.identified.identifiableFeatures,i,t;return u.getLayers().then(function(n){i=n}),t=null,{getSymbol:e}}(app);app.service=app.service||{};app.service.coordinateConverter=function(n,t){function u(n){return r.project(n)}function i(n){return r.unproject(t.point([n[0],n[1]]))}function f(n,t){for(var u=[],o,r=0,e=n.length;r<e;r++)o=t?f(n[r],t-1):i(n[r]),u.push(o);return u}var r=t.Projection.SphericalMercator;return{toServerCoords:u,latLngToServerCoord:u,fromServerCoords:i,serverCoordToLatLng:i,serverCoordsToLatLngs:f}}(app,L);app.service=app.service||{};app.service.geocoder=function(n){"use strict";var t;$(function(){t=n.service.geocoder.google});var i=function(n,i){return t.suggest(n,i)},r=function(n,i){return t.find(n,i)},u=function(i){return t.reverseGeocode?t.reverseGeocode(i):n.service.geocoder.esri.reverseGeocode(i)};return{suggest:i,find:r,reverseGeocode:u}}(app);app.service=app.service||{};app.service.geocoder.esri=function(n){"use strict";var i=10,r=new L.LatLngBounds(n.config.map.layerMaxBounds),t=function(n){return n.replace(/, usa$/i,"").replace(/, town of,/i,"")},u=function(u,f){var e=$.Deferred();return L.esri.Geocoding.suggest().text(u).within(r).nearby(n.map.map.getCenter()).maxSuggestions(f||i).run(function(n,i){var r=i.suggestions;_.forEach(r,function(n){n.text=t(n.text)});e.resolve(r)}),e.promise()},f=function(n,i){var r=$.Deferred();return L.esri.Geocoding.geocode().text(n).key(i).run(function(n,i){var u=i.results[0];u.text=t(u.text);r.resolve(u)}),r.promise()},e=function(n){var t=$.Deferred();return L.esri.Geocoding.reverseGeocode().latlng(n).run(function(n,i){t.resolve(i?i.address:null)}),t.promise()};return{suggest:u,find:f,reverseGeocode:e}}(app);app.service=app.service||{};app.service.geocoder.google=function(n){"use strict";function u(){return i||(i=new google.maps.places.AutocompleteService),i}var t=n.config.map.initialBounds,r={south:t[0][0],west:t[0][1],north:t[1][0],east:t[1][1]},i,f=function(n){var t=$.Deferred();return u().getPlacePredictions({input:n,bounds:r,strictBounds:!0,componentRestrictions:{country:"us"}},function(n){var i=_.map(n,function(n){return{text:n.description,magicKey:n.place_id}});t.resolve(i)}),t.promise()},e=function(n,t){var i=$.Deferred(),r=new google.maps.Geocoder;return r.geocode({placeId:t},function(n){var t=_.map(n,function(n){return{text:n.formatted_address,properties:{DisplayX:n.geometry.location.lng(),DisplayY:n.geometry.location.lat()}}});i.resolve(t[0])}),i.promise()};return{suggest:f,find:e}}(app);app.service=app.service||{};app.service.censusData=function(n){"use strict";function e(n,e){var o=new t({url:i,key:r,censusVariables:e?u[e.layer.name.toLowerCase()]:null,geographyParameterTemplates:f,choroplethLayer:e});return o.updateFeatureBundle(n),n}function o(n,e,o){var s=new t({url:i,key:r,censusVariables:o?u[o.layer.name.toLowerCase()]:null,geographyParameterTemplates:f,choroplethLayer:o});return s.updateFeatureCollection([n],e),n}var i=n.config.census.url,r=n.config.census.key,u=n.config.census.variables,f=n.config.census.geography,t=function(n){this.url=n.url;this.censusVariables=n.censusVariables;this.geographyParameterTemplates=n.geographyParameterTemplates;this.choroplethLayer=n.choroplethLayer;this.keyParam="key="+n.key;this.variablesParam=this.censusVariables?"get="+_.compact([].concat(this.censusVariables.add,this.censusVariables.subtract,this.censusVariables.divisor)).join(","):null};return _.extend(t.prototype,{updateFeatureBundle:function(n){var t=this.updaters;_.forEach(n.bundle,_.bind(this.updateFeatureCollection,this))},updateFeatureCollection:function(n,t){var i=this.updaters[t]||this.baseUpdater;i&&_.forEach(n,_.bind(function(n){this.censusVariables?i.call(this,n,t):this.updateFeature(n,null)},this))},baseUpdater:function(n,t){var i=this.geographyParameterTemplates[t],r;if(i)return r=i(n),this.get(r).then(_.bind(function(t){this.updateFeature(n,t)},this))},updaters:{},updateFeature:function(n,t){Vue.set(n,"choroplethData",this.calculateValue(t))},calculateValue:function(n){if(!n)return null;var i=this.censusVariables,u=this.getSum(n,i.add),f=this.getSum(n,i.subtract),r=this.getSum(n,i.divisor),t={value:u-f,divisor:r,percent:r?(u-f)/r:null,tooltipTemplate:this.choroplethLayer.tooltipTemplate,name:this.choroplethLayer.layer.name};return t.fillColor=this.getColor(t.percent||t.value),t},getColor:function(n){for(var i,f=this.choroplethLayer.colorScheme,r=this.choroplethLayer.dataBreaks.breaks,t=0,u=r.length;t<u;t++)if(n<=r[t].max){i=f[t];break}return i},getSum:function(n,t){var i=0,r;return _.forEach(t,function(t){r=_.indexOf(n[0],t);i+=+n[1][r]}),i},get:function(n){var t=this.url,i=[n,this.variablesParam,this.keyParam];return $.get(t,i.join("&")).then(function(n){return n})}}),{updateFeatureBundle:e,updateFeature:o}}(app);app.modal=app.modal||{};app.modal.layer=function(n){"use strict";function f(n,f){var n=r+n;i.html('<h2 class="text-center">LOADING<\/h2>');u.text(f);t.modal();$.ajax({url:n,type:"GET",dataType:"html",cache:!1,success:function(n){var t=n.replace(/^[\S\s]*<body[^>]*?>/i,"").replace(/<\/body[\S\s]*$/i,"");i.html(t)}})}var r=n.config.baseUrl,t=$("#layerModal"),u=t.find(".modal-title"),i=t.find(".modal-body");return{open:f}}(app);app.modal=app.modal||{};app.modal.about=function(n){"use strict";function e(){return r($(this).attr("href")),!1}function o(n){var t=$(n.target),i=$(t.attr("href")),r=u+i.attr("data-html");$.ajax({url:r,type:"GET",dataType:"html",cache:!1,success:function(n){var r=n.replace(/^[\S\s]*<body[^>]*?>/i,"").replace(/<\/body[\S\s]*$/i,"");i.html(r);t.tab()}})}function r(n){var r=i.find(n);t.modal();r.tab("show")}var u=n.config.baseUrl,f=$(".aboutModalOpener"),t=$("#aboutModal"),i=t.find("#aboutTabs");return f.click(e),i.bind("show.bs.tab",o),{open:r}}(app);app.modal=app.modal||{};app.modal.share=function(n){"use strict";function u(){t||(t=new r({data:{link:"",embedLink:""}}));t.show()}function f(){$(".share-modal-opener").click(function(){return u(),!1})}var t,i=n.service.pageLink,r=Vue.extend({el:"#share-modal",template:"#share-modal-template",mounted:function(){$(this.$el).modal({show:!1})},methods:{onTextBoxClick:function(n){n.currentTarget.select()},show:function(){this.beforeShow();$(this.$el).modal("show")},beforeShow:function(){this.updateLinks()},updateLinks:function(){var n=this._data;i.getLink().then(function(t){n.link=t})}}});$(function(){f()})}(app);app.sidebar=app.sidebar||{};app.sidebar.sidebarControl=function(n,t){"use strict";t.Control.SidebarExtended=t.Control.Sidebar.extend({includes:t.Mixin.Events,options:{opened:!0},initialize:function(n,i){var r,u,f,e;t.setOptions(this,i);r=this._contentContainer=t.DomUtil.get(n);r.parentNode.removeChild(r);u="leaflet-";f=this._container=t.DomUtil.create("div",u+"sidebar "+this.options.position);t.DomUtil.addClass(r,u+"control");this.options.opened&&t.DomUtil.addClass(this._container,"visible");setTimeout(function(){$(".leaflet-left").addClass("leaflet-control-container-transition-left");$(".leaflet-right").addClass("leaflet-control-container-transition-right")},50);f.appendChild(r);this.options.closeButton&&(e=this._closeButton=t.DomUtil.create("a","close",f),e.innerHTML="&times;")}});t.control.sidebarextended=function(n,i){return new t.Control.SidebarExtended(n,i)}}(app,L);app.sidebar=app.sidebar||{};app.sidebar.sidebar=function(n){"use strict";function f(){return!t.hasClass("hid")}function e(){t.removeClass("hid");setTimeout(u,350)}function o(){t.addClass("hid");setTimeout(u,350)}function u(){r.invalidateSize({debounceMoveend:!0,pan:!1})}function s(){f()?o():e()}function h(n){r=n.map;t=$("#sidebar");i=$("#sidebar-toggle");i.on("click",s)}var c=n.entities.featureState,t,i,r;return{init:h}}(app);app.choropleth=app.choropleth||{};app.choropleth.choroplethSelector=function(n){"use strict";var i=n.config.layersConfig,t=_.compact(_.map(i.groups,function(n){var t=_.filter(n.layers,function(n){return n.type&&n.type.indexOf("Choropleth")>-1});if(t.length)return{name:n.name,isExpanded:!1,layers:t}})),r=_.findLast(t,function(n){return _.findLast(n.layers,{visible:!0})}),u=Vue.component("choropleth-selector",{template:"#choropleth-selector-template",mounted:function(){var n=this;$(this.$el).find(".collapse").on("show.bs.collapse",function(){n.showing=!0});$(this.$el).find(".collapse").on("shown.bs.collapse",function(){n.showing=!1});$(this.$el).on("shown.bs.dropdown",function(){var t=n.activeGroup;t&&(_.forEach(n.groups,function(n){n.isExpanded=n.name===t.name}),$(n.$el).find(".collapse").each(function(n,i){var r=$(i);r.data("group")===t.name?r.collapse("show"):r.collapse("hide")}))})},data:function(){return{groups:t,showing:!1,featureState:n.entities.featureState}},computed:{activeGroup:function(){var n=this.featureState.activeChoropleth;return n?_.findLast(this.groups,function(t){return _.findLast(t.layers,{name:n.layer.name})}):null}},watch:{"featureState.activeChoropleth":{handler:function(){},immediate:!0}},methods:{isActiveGroup:function(n){var t=this.activeGroup;return t&&t.name===n.name},isActiveLayer:function(n){var t=this.featureState.activeChoropleth;return t&&t.layer.name===n.name},onGroupClick:function(n,t){var i,r;if(t.preventDefault(),t.stopPropagation(),!this.showing){i=$(t.currentTarget);n.isExpanded?(n.isExpanded=!1,i.next(".collapse").collapse("hide")):(n.isExpanded=!0,i.next(".collapse").collapse("show"),r=_.filter(this.groups,function(t){return t.name!==n.name}),_.forEach(r,function(n){n.isExpanded=!1}),i.parent().siblings().find(".collapse").collapse("hide"));return}},onLayerClick:function(t){t.preventDefault();var i=$(t.currentTarget).text().trim();this.featureState.activeChoropleth&&this.featureState.activeChoropleth.layer.name===i?($(t.currentTarget).removeClass("active"),this.featureState.activeChoropleth.layer.visible=!1):($(t.currentTarget).addClass("active"),this.featureState.choroplethIsLoading=!0,setTimeout(function(){n.service.layers.getLayer(i).then(function(n){n.visible=!0})},50))},onClearClick:function(){this.featureState.activeChoropleth&&(this.featureState.activeChoropleth.layer.visible=!1)}}})}(app);app.choropleth=app.choropleth||{};app.choropleth.choroplethSelectorModal=function(){"use strict";function i(){n||(n=new t({data:{}}));n.show()}var n,t=Vue.extend({el:"#choropleth-selector-modal",template:"#choropleth-selector-modal-template",mounted:function(){$(this.$el).modal({show:!1})},methods:{show:function(){this.beforeShow();$(this.$el).modal("show")},beforeShow:function(){}}});return{open:i}}(app);app.locationReport=app.locationReport||{};app.locationReport.snippets=function(n){"use strict";var t=Vue.component("choropleth-data-snippet",{props:["data"],template:"#location-report-choropleth-snippet",computed:{choroplethHtml:function(){return this.data.tooltipTemplate({data:this.data})}},methods:{openChoroplethSelector:function(){n.choropleth.choroplethSelectorModal.open()}}})}(app,L);app.locationReport=app.locationReport||{};app.locationReport.featureItem=function(n){var i=n.entities.featureState,r=n.service.identifiedSymbols,t=Vue.extend({props:["feature"],template:"#location-report-feature-item",watch:{"feature.promoted":function(n){if(n){var t=$(".location-report"),r=t.scrollTop(),u=t.offset().top,i=$(this.$el).offset().top,f=$(this.$el).height(),e=t.height();i&&t.animate({scrollTop:i+r-u})}}},computed:{symbol:function(){return r.getSymbol(this.featureType,this.feature)}},methods:{onMouseEnter:function(){i.identifiedFeatures.highlight(this.feature)},onMouseLeave:function(){i.identifiedFeatures.unhighlight(this.feature)},onClick:function(){this.feature.selected?i.identifiedFeatures.unselect(this.feature):i.identifiedFeatures.select(this.feature)},onFocusClick:function(){i.identifiedFeatures.focus(this.feature);i.identifiedFeatures.select(this.feature)}}});Vue.component("feature-item",t);Vue.component("feature-item-pointlocation",t.extend({template:"#location-report-feature-item-pointlocation",computed:{featureType:function(){return"pointLocations"}}}));Vue.component("feature-item-address",t.extend({template:"#location-report-feature-item-address",computed:{featureType:function(){return"adresses"}}}));Vue.component("feature-item-school",t.extend({template:"#location-report-feature-item-school",computed:{featureType:function(){return"schools"}}}));Vue.component("feature-item-watermonitoringsite",t.extend({template:"#location-report-feature-item-watermonitoringsite",computed:{featureType:function(){return"waterMonitoringSites"}}}));Vue.component("feature-item-rental",t.extend({template:"#location-report-feature-item-rental",computed:{featureType:function(){return"rentals"}}}));Vue.component("feature-item-coopcondo",t.extend({template:"#location-report-feature-item-coopcondo",computed:{featureType:function(){return"coopsCondos"}}}));Vue.component("feature-item-trolley",t.extend({template:"#location-report-feature-item-trolley",computed:{featureType:function(){return"trolleys"}}}));Vue.component("feature-item-bike-route",t.extend({template:"#location-report-feature-item-bike-route",computed:{featureType:function(){return"bikeRoutes"}}}));Vue.component("feature-item-bus-route",t.extend({template:"#location-report-feature-item-bus-route",computed:{featureType:function(){return"busRoutes"}}}));Vue.component("feature-item-blockgroup",t.extend({template:"#location-report-feature-item-blockgroup",computed:{featureType:function(){return"blockGroups"}}}));Vue.component("feature-item-village",t.extend({template:"#location-report-feature-item-village",computed:{featureType:function(){return"villages"}}}));Vue.component("feature-item-town",t.extend({template:"#location-report-feature-item-town",computed:{featureType:function(){return"towns"}}}));Vue.component("feature-item-county",t.extend({template:"#location-report-feature-item-county",computed:{featureType:function(){return"counties"}}}));Vue.component("feature-item-countylegislativedistrict",t.extend({template:"#location-report-feature-item-countylegislativedistrict",computed:{featureType:function(){return"countyLegislativeDistricts"}}}));Vue.component("feature-item-nysassemblydistrict",t.extend({template:"#location-report-feature-item-nysassemblydistrict",computed:{featureType:function(){return"nysAssemblyDistricts"}}}));Vue.component("feature-item-nyssenatedistrict",t.extend({template:"#location-report-feature-item-nyssenatedistrict",computed:{featureType:function(){return"nysSenateDistricts"}}}));Vue.component("feature-item-congressionaldistrict",t.extend({template:"#location-report-feature-item-congressionaldistrict",computed:{featureType:function(){return"congressionalDistricts"}}}));Vue.component("feature-item-firedistrict",t.extend({template:"#location-report-feature-item-firedistrict",computed:{featureType:function(){return"fireDistricts"}}}));Vue.component("feature-item-ambulancedistrict",t.extend({template:"#location-report-feature-item-ambulancedistrict",computed:{featureType:function(){return"ambulanceDistricts"}}}));Vue.component("feature-item-garbagedistrict",t.extend({template:"#location-report-feature-item-garbagedistrict",computed:{featureType:function(){return"garbageDistricts"}}}));Vue.component("feature-item-librarydistrict",t.extend({template:"#location-report-feature-item-librarydistrict",computed:{featureType:function(){return"libraryDistricts"}}}));Vue.component("feature-item-policeprecinct",t.extend({template:"#location-report-feature-item-policeprecinct",computed:{featureType:function(){return"policePrecincts"}}}));Vue.component("feature-item-schooldistrict",t.extend({template:"#location-report-feature-item-schooldistrict",computed:{featureType:function(){return"schoolDistricts"}}}));Vue.component("feature-item-waterdistrict",t.extend({template:"#location-report-feature-item-waterdistrict",computed:{featureType:function(){return"waterDistricts"}}}));Vue.component("feature-item-parkdistrict",t.extend({template:"#location-report-feature-item-parkdistrict",computed:{featureType:function(){return"parkDistricts"}}}));Vue.component("feature-item-parkingdistrict",t.extend({template:"#location-report-feature-item-parkingdistrict",computed:{featureType:function(){return"parkingDistricts"}}}));Vue.component("feature-item-sewerdistrict",t.extend({template:"#location-report-feature-item-sewerdistrict",computed:{featureType:function(){return"sewerDistricts"}}}))}(app,L);app.locationReport=app.locationReport||{};app.locationReport.featureItem=function(){"use strict";var n=Vue.component("feature-item-list",{props:["featureBundle","featureQuery"],watch:{"features.selected":{handler:function(){var n=_.find(this.features,"selected");n&&this.show()},deep:!0}},mounted:function(){var n=$(this.$el).find(".collapse"),t=$(this.$el).find(".header");n.on("hidden.bs.collapse",function(){$(this).css({height:""});t.addClass("collapsed")});n.on("show.bs.collapse",function(){t.removeClass("collapsed")})},methods:{onHeadingClicked:function(){this.toggle()},toggle:function(){$(this.$el).find(".collapse").collapse("toggle")},show:function(){$(this.$el).find(".collapse").collapse("show")}},computed:{showHeader:function(){return this.featureQuery?this.featureQuery.feature.name:null}}});Vue.component("feature-item-school-list",n.extend({template:"#location-report-feature-item-school-list",computed:{features:function(){return this.featureBundle.bundle.schools}}}));Vue.component("feature-item-multifamily-list",n.extend({template:"#location-report-feature-item-multifamily-list",computed:{features:function(){if(this.featureBundle.bundle.coopsCondos)return this.featureBundle.bundle.coopsCondos.concat(this.featureBundle.bundle.rentals)}}}));Vue.component("feature-item-watermonitoringsite-list",n.extend({template:"#location-report-feature-item-watermonitoringsite-list",computed:{features:function(){return this.featureBundle.bundle.waterMonitoringSites}}}));Vue.component("feature-item-trolley-list",n.extend({template:"#location-report-feature-item-trolley-list",computed:{features:function(){return this.featureBundle.bundle.trolleys}}}));Vue.component("feature-item-bike-route-list",n.extend({template:"#location-report-feature-item-bike-route-list",computed:{features:function(){return this.featureBundle.bundle.bikeRoutes}}}));Vue.component("feature-item-bus-route-list",n.extend({template:"#location-report-feature-item-bus-route-list",computed:{features:function(){return this.featureBundle.bundle.busRoutes}}}));Vue.component("feature-item-blockgroup-list",n.extend({template:"#location-report-feature-item-blockgroup-list",computed:{features:function(){return this.featureBundle.bundle.blockGroups}}}));Vue.component("feature-item-legislative-district-list",n.extend({template:"#location-report-feature-item-legislative-district-list",computed:{features:function(){return[].concat(this.featureBundle.bundle.countyLegislativeDistricts,this.featureBundle.bundle.nysAssemblyDistricts,this.featureBundle.bundle.nysSenateDistricts,this.featureBundle.bundle.congressionalDistricts)}}}))}(app);app.locationReport=app.locationReport||{};app.locationReport.featureGroup=function(){var n=Vue.component("feature-group",{props:["featureBundle","featureQuery"],template:"#location-report-feature-group",methods:{onHeadingClicked:function(){this.toggle()},toggle:function(){$(this.$el).find(".panel-collapse").collapse("toggle")}},computed:{featureCount:function(){if(!this.featureBundle.bundle)return 0;var n=this.featureBundle.bundle,i=this.featureTypes,t=0;return i.forEach(function(i){t+=n[i]?n[i].length:0}),t},isVisible:function(){return this.featureCount>0}}}),r=n.extend({template:"#location-report-feature-group-points",computed:{featureTypes:function(){return["schools","waterMonitoringSites","rentals","coopsCondos","trolleys","bikeRoutes","busRoutes"]}}}),t,i;Vue.component("feature-group-points",r);t=n.extend({template:"#location-report-feature-group-polys",computed:{featureTypes:function(){return["blockGroups","villages","towns","counties","countyLegislativeDistricts","nysAssemblyDistricts","nysSenateDistricts","congressionalDistricts"]}}});Vue.component("feature-group-polys",t);i=n.extend({template:"#location-report-feature-group-service-providers",computed:{featureTypes:function(){return["fireDistricts","ambulanceDistricts","schoolDistricts"]}}});Vue.component("feature-group-service-providers",i)}(app,L);app.locationReport=app.locationReport||{};app.locationReport.locationReport=function(n){"use strict";function s(){o.tab("show")}function h(n){$.isNumeric(n)&&(n>0?f.css({visibility:"visible"}):f.css({visibility:"hidden"}))}function e(n){var t=n?"block":"none";$("#sidebar .loading-mask").css({display:t})}function c(n){n?r.addClass("busy"):r.removeClass("busy")}function l(n){n?u.addClass("busy"):u.removeClass("busy")}var t=n.entities.featureState,v=n.service.features,i={loading:!1,featureState:t},o=$("#location-report-tab"),r=$("#location-report-tab .status-badge"),u=$("#legend-tab .status-badge"),y=$("#location-report-tab .tab-status"),f=$(".location-report-status"),p=Vue.component("feature-query",{props:["query"],template:"#location-report-current-query",methods:{clearSelection:function(){t.currentQuery=null;t.identifiedFeatures=new n.entities.FeatureBundle({})}}}),a=Vue.extend({template:"#location-report-template",created:function(){},watch:{"featureState.currentQuery":function(t){t&&n.service.censusData.updateFeature(t.feature,t.featureType,this.featureState.activeChoropleth)},"featureState.identifiedFeatures":{handler:function(t){if(this.featureState.currentQuery){var i=this.featureState.currentQuery.feature;i&&i.focused&&s();h(t.getFeatureCount());n.service.censusData.updateFeatureBundle(t,this.featureState.activeChoropleth)}}},"featureState.busy":function(n){e(n);c(n);i.loading=n},"featureState.choroplethIsLoading":function(n){e(n);l(n)},"featureState.activeChoropleth":function(){n.service.censusData.updateFeatureBundle(this.featureState.identifiedFeatures,this.featureState.activeChoropleth);this.featureState.currentQuery&&n.service.censusData.updateFeature(this.featureState.currentQuery.feature,this.featureState.currentQuery.featureType,this.featureState.activeChoropleth)}},methods:{}}),w=new a({el:"#location-report",data:i})}(app,L),function(){"use strict";var n=Vue.component("layer-item",{props:["layer"],template:"#layer-item-template"});Vue.component("layer-item-default",{props:["layer"],template:"#layer-item-default-template"});Vue.component("layer-item-choropleth",{props:["layer"],template:"#layer-item-choropleth-template"});Vue.component("layer-item-webapipoint",{props:["layer"],template:"#layer-item-webapipoint-template"});Vue.component("layer-item-webapiline",{props:["layer"],template:"#layer-item-webapiline-template"})}(app),function(){"use strict";var n=Vue.component("layer-group",{props:["item"],template:"#layer-group-template",methods:{onShowAllClick:function(){_.forEach(this.item.layers,function(n){n.visible=!0})},onHideAllClick:function(){_.forEach(this.item.layers,function(n){n.visible=!1})}}})}(app);app.layerList=app.layerList||{};app.layerList.layerList=function(n,t){"use strict";function i(){var n=$(window).height(),t=$(window).width(),i=$(".layer-list-groups .dropdown-menu"),r=20;i.each(function(){var i=$(this),u=i.parent(),f=u.offset(),e=f.top+u.height(),o=n-(e+r);i.css("max-height",o);f.left+i.width()>t?i.addClass("dropdown-menu-right"):i.removeClass("dropdown-menu-right")})}function e(n){$(n.$el).find("ul").click(function(n){n.stopPropagation()});t.DomEvent.disableScrollPropagation(n.$el);$(window).resize(_.throttle(i,100))}function r(n){u.getLayerGroups().then(function(t){var r=new f({data:{layerGroups:t.groups}});r.$mount(n);e(r);$(i)})}function o(){return $("#layer-list")}var u=n.service.layers,f=Vue.extend({template:"#layer-list-template",methods:{}});return r(o().find(".layer-list-groups")[0]),{init:r}}(app,L);app.search=app.search||{};app.search.searchTypeSelector=function(){"use strict";var n=$("#search-panel #searchType"),t=n.find(".dropdown-menu li a");t.click(function(t){t.preventDefault();var i=$(this).text();$(this).parents(".btn-group").find(".dropdown-toggle").html(i+' <span class="caret"><\/span>');$(this).tab("show");n.find(".dropdown-menu li").removeClass("active")})}(app);app.search=app.search||{};app.search.searchBox=function(n){"use strict";function u(n,i){t(!0);f(n).then(e).then(function(n){i({suggestions:n});t(!1)})}function f(n){return r.getAll().then(function(t){return n.length===0?t:_.filter(t,function(t){return RegExp(_.escapeRegExp(n),"i").test(t.name)})})}function e(n){return _.map(n,function(n){return{value:n.name,data:{village:n}}})}function o(n){t(!0);s(n.data.village).then(function(){t(!1)})}function s(t){var i=new n.entities.featureQuery.VillageQuery({id:t.id});return i.search().then(function(){Vue.set(i.feature,"focused",Date.now())})}function t(n){n?i.addClass("textbox-loading"):i.removeClass("textbox-loading")}var r=n.service.villages,i=$("#txtVillageSearch");i.autocomplete({lookup:u,onSelect:o,autoSelectFirst:!0,minChars:0,triggerSelectOnValidInput:!1,maxHeight:400})}(app);app.search=app.search||{};app.search.AutocompleteGroup=function(){"use strict";function n(n){this.group=n.group;this.title=n.title;this.searchService=n.searchService;this.suggestTemplate=n.suggestTemplate;this.headerTemplate=n.headerTemplate||_.template($("#search-default-suggest-header-template").html());this.footerTemplate=n.footerTemplate;this.convertDataToSuggestFormat=n.convertDataToSuggestFormat;this.formatResult=n.formatResult;this.find=n.find;this.addFooter=n.addFooter||this.addFooter}return _.extend(n.prototype,{highlightText:function(n,t){var i="("+_.escapeRegExp(t)+")";return n?n.replace(new RegExp(i,"gi"),"<strong>$1<\/strong>"):""},suggest:function(n){return this.searchService.suggest(n,this.maxSuggestions).then($.proxy(this.convertDataToSuggestFormat,this))},find:function(){},formatResult:function(){},formatGroup:function(){return this.headerTemplate({title:this.title})},addFooter:function(){}}),n}(app);app.search=app.search||{};app.search.addressGroup=function(n){"use strict";function t(){return new n.search.AutocompleteGroup({group:"address",title:"Address Search",searchService:n.service.geocoder,suggestTemplate:_.template($("#search-address-suggest-template").html()),footerTemplate:_.template($("#search-address-suggest-footer-template").html()),convertDataToSuggestFormat:function(n){var t=this.group;return _.map(n,function(n){return{value:n.text,data:{item:n,group:t}}})},formatResult:function(n,t){return this.suggestTemplate({highlightedAddress:this.highlightText(n.data.item.text,t)})},find:function(t){var i=t.data.item;return this.searchService.find(i.text,i.magicKey).then(function(t){var i=new n.entities.featureQuery.AddressQuery({geocodeResult:t});return i.search().then(function(n){n.focus(i.feature)})})},addFooter:function(n){$(n).find(".address-suggest").last().parent().after(this.footerTemplate())}})}return{init:t}}(app);app.search=app.search||{};app.search.multifamilyGroup=function(n){"use strict";function i(){return new n.search.AutocompleteGroup({group:"multifamily",title:"Multifamily Properties",searchService:n.service.multifamily,suggestTemplate:_.template($("#search-multifamily-suggest-template").html()),convertDataToSuggestFormat:function(n){var t=this.group;return _.map(n,function(n){return{value:n.name||n.address,data:{item:n,group:t}}})},formatResult:function(n,i){var r=n.data.item,u=t.getSymbol(r.hasOwnProperty("aptConversion")?"coopsCondos":"rentals",r);return this.suggestTemplate({highlightedName:this.highlightText(r.name,i),highlightedAddress:this.highlightText(r.address,i),symbol:u})},find:function(t){var u=t.data.item,r=wellknown(u.wkt).coordinates,i=new n.entities.featureQuery.PointLocationQuery({x:r[0],y:r[1]});return i.featureType=null,i.search().then(function(n){n.focus(i.feature)})}})}var t=n.service.identifiedSymbols;return{init:i}}(app);app.search=app.search||{};app.search.schoolGroup=function(n){"use strict";function t(){return new n.search.AutocompleteGroup({group:"school",title:"Schools",searchService:n.service.schools,suggestTemplate:_.template($("#search-school-suggest-template").html()),convertDataToSuggestFormat:function(n){var t=this.group;return _.map(n,function(n){return{value:n.name,data:{item:n,group:t}}})},formatResult:function(n,t){var i=n.data.item;return this.suggestTemplate({highlightedName:this.highlightText(i.name,t),schoolType:i.schoolType})},find:function(t){var u=t.data.item,r=wellknown(u.wkt).coordinates,i=new n.entities.featureQuery.PointLocationQuery({x:r[0],y:r[1]});return i.featureType=null,i.search().then(function(n){n.focus(i.feature)})}})}return{init:t}}(app);app.search=app.search||{};app.search.address=function(n){"use strict";function i(n){n?r.addClass("textbox-loading"):r.removeClass("textbox-loading")}function u(n,r){i(!0);var u=$.map(t,function(t){return t.suggest.call(t,n)});$.when.apply(this,u).done(function(){r({suggestions:[].concat.apply([],arguments)});i(!1)})}function f(n,i){return i?_.find(t,{group:n.data.group}).formatResult(n,i):n.value}function e(n,i){return _.find(t,{group:i}).formatGroup()}function o(n){_.each(t,function(t){t.addFooter(n)})}function s(n){i(!0);_.find(t,{group:n.data.group}).find(n).then(function(){i(!1)})}var t=[n.search.addressGroup.init(),n.search.multifamilyGroup.init(),n.search.schoolGroup.init()],r=$("#txtAddressSearch");r.autocomplete({lookup:u,formatResult:f,formatGroup:e,onSelect:s,groupBy:"group",deferRequestBy:200,autoSelectFirst:!0,minChars:3,triggerSelectOnValidInput:!1,maxHeight:400,beforeRender:o});return}(app);app.search=app.search||{};app.search.searchLayersModal=function(n){"use strict";function o(){return!1}function v(n){localStorage.setItem("openSearchLayersModalOnLoad",n)}function i(n){return n.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")}function y(n){return n.replace(/,/g,"")}function r(n){u||(u=new Spinner({color:"#DD00DD",scale:2}));n?($(t.$el).find(".loading-mask").show(),u.spin($(t.$el).find(".loading-spinner")[0])):($(t.$el).find(".loading-mask").hide(),u.stop())}function p(){$(".search-layers-opener").click(function(){return f(),!1})}function w(){return $.when(s.getLayers(),c.getAll()).then(function(n,i){var r={filter:"",layers:n,villages:i,filteredProperties:[],filteredAddresses:[],showResults:!0,openOnPageLoad:o()};return t=new b({el:"#search-layers-modal",data:r})})}function f(){t?$(t.$el).modal():w().then(function(){$(t.$el).modal()})}var s=n.service.layers,h=n.service.multifamily,c=n.service.villages,l=n.service.identifiedSymbols,e=n.service.geocoder,a=n.modal,t,u;$(function(){o()&&f()});p();var k=Vue.component("search-layers-item",{template:"#search-layers-item-template",props:["layer","filter"],computed:{highlightedName:function(){var n=this.filter.trim(),t=this.layer.name;return n===""?t:t.replace(RegExp(i(n),"gi"),"<mark>$&<\/mark>")},highlightedKeywords:function(){var n=this.filter.trim(),t,r;return n===""?"":(t=this.layer.keywords?this.layer.keywords.split(","):[],r=_.map(t,function(t){return RegExp(i(n),"i").test(t)?t.replace(RegExp(i(n),"gi"),"<mark>$&<\/mark>"):null}),_.compact(r).join(","))}},methods:{onDescriptionClicked:function(n){var t=$(n.target);return t.data("targetmodal")?(n.preventDefault(),a.open(t.attr("href"),this.layer.name),!1):!0}}}),d=Vue.component("search-villages-item",{template:"#search-villages-item-template",props:["village","filter"],computed:{highlightedName:function(){var n=this.filter.trim(),t=this.village.name||this.village.address;return n===""?t:t.replace(RegExp(i(n),"gi"),"<mark>$&<\/mark>")}},methods:{onHeaderClick:function(){r(!0);var i=new n.entities.featureQuery.VillageQuery({id:this.village.id});return i.search().then(function(){Vue.set(i.feature,"focused",Date.now());r(!1);$(t.$el).modal("hide")})}}}),g=Vue.component("search-multifamily-item",{template:"#search-multifamily-item-template",props:["feature","filter"],computed:{highlightedName:function(){var n=this.filter.trim(),t=this.feature.name||this.feature.address;return n===""?t:t.replace(RegExp(i(n),"gi"),"<mark>$&<\/mark>")},highlightedAddress:function(){if(!this.feature.address)return"";var n=this.filter.trim(),t=this.feature.address;return n===""?t:t.replace(RegExp(i(n),"gi"),"<mark>$&<\/mark>")},featureType:function(){return this.feature.hasOwnProperty("aptConversion")?"coopsCondos":"rentals"},symbol:function(){return l.getSymbol(this.featureType,this.feature)}},methods:{onHeaderClick:function(){var u,i,f;r(!0);u=wellknown(this.feature.wkt).coordinates;i=new n.entities.featureQuery.PointLocationQuery({x:u[0],y:u[1]});i.featureType=null;f=this.feature;i.search().then(function(n){n.focus(i.feature);r(!1);$(t.$el).modal("hide")})}}}),nt=Vue.component("search-addresses-item",{template:"#search-addresses-item-template",props:["feature","filter"],computed:{highlightedName:function(){var n=this.filter.trim(),t=this.feature.text;return n===""?t:t.replace(RegExp(i(n),"gi"),"<mark>$&<\/mark>")}},methods:{onHeaderClick:function(){r(!0);e.find(this.feature.text,this.feature.magicKey).then(function(i){var u=new n.entities.featureQuery.AddressQuery({geocodeResult:i});return u.search().then(function(){Vue.set(u.feature,"focused",Date.now());r(!1);$(t.$el).modal("hide")})})}}}),b=Vue.extend({template:"#search-layers-modal-template",watch:{openOnPageLoad:function(n){v(n)},filter:function(){this.updateMultifamily();this.updateAddresses()}},computed:{choroplethLayers:function(){var n=_.filter(this.layers,function(n){return n.type&&n.type.indexOf("Choropleth")>-1});return this.filterLayers(n)},notChoroplethLayers:function(){var n=_.filter(this.layers,function(n){return n.legend&&(!n.type||n.type&&n.type.indexOf("Choropleth")===-1)});return this.filterLayers(n)},filteredVillages:function(){var n=this.filter.trim();return n.length>=1?this.filterLayers(this.villages):[]}},methods:{updateMultifamily:_.throttle(function(){this.filter.length>1?h.getAll().then($.proxy(function(n){this.filteredProperties=this.filterLayers(n.rentals.concat(n.coopsCondos)).sort(function(n,t){return n.name<t.name?-1:1})},this)):this.filteredProperties=[]},500),updateAddresses:_.throttle(function(){this.filter.length>1?e.suggest(this.filter).then($.proxy(function(n){this.filteredAddresses=n},this)):this.filteredAddresses=[]},500),filterLayers:function(n){var t=this.filter.trim();return this.filter&&this.filter.length!==0?_.filter(n,function(n){return RegExp(i(t),"i").test(n.name)||RegExp(i(y(t)),"i").test(n.keywords)||RegExp(i(t),"i").test(n.address)}):n},onInputFocus:function(){this.showResults=!0}}});return{open:f}}(app);app.map=app.map||{};app.map.choropleth=app.map.choropleth||{};app.map.choropleth.choroplethGeoJson=function(n,t){"use strict";function f(n){return i[n]||(i[n]=$.ajax({url:r[n],method:"GET",dataType:"json"}).then(function(i){var r=topojson.feature(i,i.objects[n]);return new t.GeoJSON(r,u)})),i[n]}var r=n.config.geoJsonUrls,u={style:{fillOpacity:1,opacity:.3,color:"rgb(205,205,205)",weight:.5},smoothFactor:0,pane:"choroplethPane"},i={};return{getData:f}}(app,L);app.map=app.map||{};app.map.choropleth=app.map.choropleth||{};app.map.choropleth.ChoroplethLayer=function(n,t){"use strict";function i(){return n.entities.featureState.activeChoropleth}function f(t){n.entities.featureState.activeChoropleth=t}function e(t){n.entities.featureState.choroplethIsLoading=t}function s(n){return r[n]||(r[n]=$.ajax({url:n,method:"GET",dataType:"json"}).then(function(n){return n})),r[n]}function h(r){return u[r]||(u[r]=n.map.choropleth.choroplethGeoJson.getData(r).then(function(n){function u(n){var e=n.layer;e.setStyle({weight:5,color:"#000000",opacity:.6});var u=i(),o=e.feature.id,f=u.data[o],s=u.tooltipTemplate({data:{feature:f,value:f[u.dataProperty],divisor:f[u.dataDivisor],percent:f[u.dataDivisor]?f[u.dataProperty]/f[u.dataDivisor]:null,fillColor:e.options.fillColor,name:u.layer.name}});r.setContent(s).setLatLng(n.latlng).openOn(e._map);t.Browser.ie||t.Browser.opera||e.bringToFront()}function f(n){n.layer.setStyle({color:"rgb(205,205,205)",weight:.5,opacity:.3});n.layer._map.closePopup(r)}function e(n){r.isOpen()&&r.setLatLng(n.latlng)}var r=t.popup({autoPan:!1,closeButton:!1,offset:[0,-10],className:"map-tooltip"});n.on("mouseover",u);n.on("mouseout",f);n.on("mousemove",e);return n})),u[r]}var r={},u={},o=function(t,i){this.layer=t;this.dataUrl=i.dataUrl;this.dataProperty=i.dataProperty;this.dataDivisor=i.dataDivisor;this.data=null;this.boundaryType=i.boundaryType;this.tooltipTemplate=_.template($(i.tooltipTemplate||"#tooltip-choropleth-default").html());this.dataBreaks=n.config.choropleth.dataBreaks[i.dataBreaks];this.colorScheme=n.config.choropleth.colorSchemes[this.dataBreaks.colorScheme]};return $.extend(o.prototype,{addTo:function(n){var t=this;e(!0);$.when(this.getGeoJson(this.boundaryType),this.getData(this.dataUrl)).then(function(r,u){var o;t.data=u;o=i();f(t);o&&(o.layer.visible=!1);var s=t.dataBreaks.breaks,a=t.dataBreaks.type,l=t.colorScheme,h=t.dataProperty,c=t.dataDivisor;r.setStyle(function(n){for(var e=n.id,i=u[e],o=c?i[h]/i[c]:i[h],r,t=0,f=s.length;t<f;t++)if(o<=s[t].max){r=l[t];break}return r?{fillColor:r}:{fillColor:"rgba(0,0,0,0)"}});n.addLayer(r);e(!1)})},removeFrom:function(n){var t=i();t.layer.name===this.layer.name&&this.getGeoJson(this.boundaryType).then(function(t){n.removeLayer(t);f(null)});t&&t.boundaryType!==this.boundaryType&&this.getGeoJson(this.boundaryType).then(function(t){n.removeLayer(t)})},getData:s,getGeoJson:h}),o}(app,L);app.map=app.map||{};app.map.mapTooltip=function(){function t(t,i,r){var u=_.assign({},n,r);t.bindTooltip(i,u)}var n={className:"map-tooltip",opacity:1,direction:"top",offset:[0,-10]};return{bindTooltip:t}}(app,L);app.map=app.map||{};app.map.layer=app.map.layer||{};app.map.layer.WebApiPointLayer=function(n,t){"use strict";var f=wellknown,r=n.service.coordinateConverter,o=n.entities.featureQuery,e=n.map.mapTooltip,i=function(n){this.layer=n.layer;this.tooltipTemplate=n.tooltipTemplate},u;return $.extend(i.prototype,{generateMarkers:function(n){for(var r=[],i,t=0,u=n.length;t<u;t++)i=this.generateMarker(n[t]),i&&r.push(i);return r},generateMarker:function(n){var i=this.layer,o,h,s,u,c;if(i.icons.length===1)s=t.icon(i.icons[0].icon);else for(u=0,c=this.layer.icons.length;u<c;u++)if(n[i.dataProperty]<=i.icons[u].max){s=t.icon(i.icons[u].icon);break}return h=r.fromServerCoords(f(n.wkt).coordinates),o=new t.Marker(h,{alt:n.name,icon:s,riseOnHover:!0}),e.bindTooltip(o,this.tooltipTemplate({feature:n,marker:o,layer:this.layer})),o}}),u=function(n){i.call(this,n)},$.extend(u.prototype,i.prototype,{generateMarker:function(n){var i=this.layer,o,h,s,u,c;if(n[i.dataProperty]==null)return null;if(i.circleMarkers.length===1)s=i.circleMarkers[0].options;else for(u=0,c=this.layer.circleMarkers.length;u<c;u++)if(n[i.dataProperty]<=i.circleMarkers[u].max){s=i.circleMarkers[u].options;break}return h=r.fromServerCoords(f(n.wkt).coordinates),o=new t.CircleMarker(h,s),e.bindTooltip(o,this.tooltipTemplate({feature:n,marker:o,layer:this.layer})),o}}),t.FeatureGroup.extend({initialize:function(n,r){t.LayerGroup.prototype.initialize.call(this,null);var f=_.template(r.tooltipTemplate?$(r.tooltipTemplate).html():$("#tooltip-default").html());this.markerGenerator=r.circleMarkers?new u({layer:r,tooltipTemplate:f}):new i({layer:r,tooltipTemplate:f});this.url=n;this.layer=r;this.data=null;this.on("add",this.onAdded);this.on("click",this.onClicked)},onAdded:function(){var n=this;this.data||this.getData().then($.proxy(this.addFeatures,this));this.adjustZ()},adjustZ:function(){this.layer.bringToBack&&this.eachLayer(function(n){n.bringToBack()})},onClicked:function(n){t.DomEvent.stopPropagation(n);var i=n.layer.getLatLng(),u=r.toServerCoords(i),f=new o.PointLocationQuery({x:u.x,y:u.y,tolerance:7,lat:i.lat,lng:i.lng});f.featureType=null;f.search()},addFeatures:function(n){for(var i=this.markerGenerator.generateMarkers(n),t=0,r=i.length;t<r;t++)this.addLayer(i[t]);this.adjustZ()},getData:function(){return this.data||(this.data=$.ajax({url:this.url,method:"GET",dataType:"json"}).then(function(n){return n})),this.data}})}(app,L);app.map=app.map||{};app.map.layer=app.map.layer||{};app.map.layer.WebApiLineLayer=function(n,t){"use strict";var r=wellknown,i=n.service.coordinateConverter,u=n.map.mapTooltip,f=n.entities.featureQuery;return t.FeatureGroup.extend({initialize:function(n,i){t.LayerGroup.prototype.initialize.call(this,null);this.url=n;this.layer=i;this.tooltipTemplate=_.template(this.layer.tooltipTemplate?$(this.layer.tooltipTemplate).html():$("#tooltip-default").html());this.data=null;this.on("add",this.onAdded);this.on("click",this.onClicked)},onAdded:function(){var n=this;this.data||this.getData().then($.proxy(this.addFeatures,this))},onClicked:function(n){t.DomEvent.stopPropagation(n);var r=t.GeometryUtil.closest(n.layer._map,n.layer,n.latlng),u=i.toServerCoords(r),e=new f.PointLocationQuery({x:u.x,y:u.y,tolerance:7,lat:r.lat,lng:r.lng});e.featureType=null;e.search()},getStyleOptions:function(n){var t=this.layer.markers,f=_.trim(n[this.layer.dataProperty].toLowerCase()),r=_.assign({},this.layer.defaultMarkerOptions),i,u;if(t&&t.length>0)for(i=0,u=t.length;i<u;i++)if(f===_.trim(t[i].value.toLowerCase())){_.assign(r,t[i].options);break}return r},addLine:function(n,i,r){var f=t.polyline(n,i);this.addLayer(f);u.bindTooltip(f,this.tooltipTemplate({feature:r,marker:f,layer:this.layer}),{sticky:!0})},addOutline:function(n,i){var r=this.layer.outlineColor;r&&this.addLayer(t.polyline(n,{color:r,opacity:.8,weight:i.weight+2,interactive:!1}))},addFeatures:function(n){_.forEach(n,_.bind(function(n){var t=r(n.wkt),u=i.serverCoordsToLatLngs(t.coordinates,t.type==="LineString"?0:1),f=this.getStyleOptions(n);this.addOutline(u,f);this.addLine(u,f,n)},this))},getData:function(){return this.data||(this.data=$.ajax({url:this.url,method:"GET",dataType:"json"}).then(function(n){return n})),this.data}})}(app,L);app.map=app.map||{};app.map.layer=app.map.layer||{};app.map.layer.LabelLayer=function(n,t){"use strict";var r=n.config.liMapServiceUrl,i=function(n){this.map=n.map;this.layerVues=$.map(n.layerVues,function(n){var t=n.$data.layer.requestLabelIds;if(t&&t.length>0)return n});var i=this;$.each(this.layerVues,function(n,t){t.$on("visible:changed",function(){i.updateVisibleLayerIds()})});this.mapLayer=t.esri.dynamicMapLayer({url:r,f:"image",updateInterval:250});this.mapLayer.bringToFront();this.mapLayer.on("load",function(){this._currentImage&&this.setOpacity(1)});this.updateVisibleLayerIds()};return $.extend(i.prototype,{updateVisibleLayerIds:_.debounce(function(){var n=$.map(this.layerVues,function(n){var t=n.$data.layer;if(t.visible)return t.requestLabelIds});n.length>0?(this.mapLayer.setLayers(n),this.mapLayer.addTo(this.map)):(this.mapLayer.removeFrom(this.map),this.mapLayer._currentImage&&this.mapLayer.setOpacity(0),this.mapLayer.setLayers(n))},500)}),i}(app,L);app.map=app.map||{};app.map.layer=app.map.layer||{};app.map.layer.layerManager=function(n,t){"use strict";function s(n){r=n.map;h()}function h(){f.getLayerGroups().then(function(n){var t=$.map(n.groups,function(n){return n.layers});c(t)})}function c(t){$.each(t,function(n,t){l(t)});e=new n.map.layer.LabelLayer({map:r,layerVues:u})}function l(f){switch(f.type){case"L.TileLayer.AgsCached":i[f.name]=new t.TileLayer.AgsCached(f.url,$.extend({pane:"upperTilePane"},f.options));f.visible&&i[f.name].addTo(r);break;case"L.TileLayer.AgsDynamic":i[f.name]=new t.TileLayer.AgsDynamic(f.url,$.extend({pane:"upperTilePane"},f.options,{layers:f.requestIds}));f.visible&&i[f.name].addTo(r);break;case"app.map.layer.ChoroplethLayer":i[f.name]=new n.map.choropleth.ChoroplethLayer(f,f.options);f.visible&&i[f.name].addTo(r);break;case"app.map.layer.WebApiPointLayer":i[f.name]=new n.map.layer.WebApiPointLayer(f.url,f);f.visible&&i[f.name].addTo(r);break;case"app.map.layer.WebApiLineLayer":i[f.name]=new n.map.layer.WebApiLineLayer(f.url,f);f.visible&&i[f.name].addTo(r);break;default:i[f.name]=new t.TileLayer.AgsDynamic(f.url,$.extend({pane:"upperTilePane"},f.options,{layers:f.requestIds}));f.visible&&i[f.name].addTo(r)}u[f.name]=new o({data:{layer:f}})}var f=n.service.layers,r,i={},u={},e,o=Vue.extend({watch:{"layer.visible":{handler:function(n,t){n?i[this.layer.name].addTo(r):i[this.layer.name].removeFrom(r);this.$emit("visible:changed",n,t)}}}});return{init:s}}(app,L);app.map=app.map||{};app.map.identify=app.map.identify||{};app.map.identify.IdentifiedFeature=function(n,t){"use strict";var i=wellknown,r=n.service.coordinateConverter;return t.GeoJSON.extend({options:{interactive:!1,color:"rgb(255,0,0)",opacity:.9,fillOpacity:.1,weight:5,coordsToLatLng:function(n){return r.fromServerCoords(n)}},initialize:function(n,r){var u=i(r.wkt);t.GeoJSON.prototype.initialize.call(this,u,n)},highlight:function(n){this.addTo(n);this.setStyle({opacity:this.options.opacity+.1,fillOpacity:this.options.fillOpacity+.2,weight:this.options.weight+5})},unhighlight:function(n,t){this.setStyle({opacity:this.options.opacity,fillOpacity:this.options.fillOpacity,weight:this.options.weight});t.selected||this.removeFrom(n)},select:function(n){this.addTo(n)},unselect:function(n){this.removeFrom(n)},focus:function(n){n.fitBounds(this.getBounds())}})}(app,L);app.map=app.map||{};app.map.identify=app.map.identify||{};app.map.identify.IdentifiedPointFeature=function(n,t){"use strict";var r=wellknown,f=n.service.coordinateConverter,i=n.entities.featureState,e=t.Marker.extend({options:{pane:"identifiedPointPane"},initialize:function(i,r,u){var f=n.service.layers.getLayerConfigBySchoolType(r.schoolType),u=u||{};f&&(u.icon=new t.Icon(f.icons[0].icon));t.Marker.prototype.initialize.call(this,i,u);this.initialIcon=this.options.icon;this.highlightedIcon=t.icon(_.extend({},this.options.icon.options,{iconSize:[30,30],iconAnchor:[15,25]}))},select:function(){this.setIcon(this.highlightedIcon)},unselect:function(){this.setIcon(this.initialIcon)},highlight:function(){this.setIcon(this.highlightedIcon)},unhighlight:function(){this.setIcon(this.initialIcon)}}),u=t.CircleMarker.extend({options:{pane:"identifiedPointPane",color:"rgb(55,55,55)",fillColor:"#dd00dd",radius:8,weight:1,opacity:.8,fillOpacity:1},initialize:function(n,i){t.CircleMarker.prototype.initialize.call(this,n,i);this.initialStyle={radius:this.options.radius,weight:this.options.weight,opacity:this.options.opacity};this.highlightedStyle={radius:this.options.radius+9,weight:this.options.weight+3,opacity:.6};this.selectedStyle={radius:this.options.radius+8}},select:function(){this.setStyle(this.selectedStyle)},unselect:function(){this.setStyle(this.initialStyle)},highlight:function(){this.setStyle(this.highlightedStyle)},unhighlight:function(){this.setStyle(this.initialStyle)}});return t.FeatureGroup.extend({options:{pane:"identifiedPointPane"},showOnCreated:!0,initialize:function(o,s,h,c){var p=r(o.wkt),y=f.fromServerCoords(r(o.wkt).coordinates),v,l,a;v=s==="schools"?[new e(y,o)]:_.keys(h).length>0?_.map(h,function(n){return new u(y,n.options)}):[new u(y)];t.FeatureGroup.prototype.initialize.call(this,v,c);l=s==="schools"?n.service.layers.getLayerConfigBySchoolType(o.schoolType):n.service.layers.getLayerConfigByFeatureType(s);l&&l.tooltipTemplate?(a=_.template($(l.tooltipTemplate).html()),n.map.mapTooltip.bindTooltip(this,a({feature:o,marker:v[0],layer:l}),{permanent:!0,offset:[0,-19],interactive:!0})):(a=_.template($("#tooltip-default").html()),n.map.mapTooltip.bindTooltip(this,a({feature:o,marker:v[0],layer:l}),{permanent:!0,offset:[0,-19],interactive:!0}));this.feature=o;this.on("click",function(n){t.DomEvent.stopPropagation(n);this.feature.selected?i.identifiedFeatures.unselect(this.feature):(i.identifiedFeatures.select(this.feature),i.identifiedFeatures.promote(this.feature))});this.on("mouseover",function(){i.identifiedFeatures.highlight(this.feature)});this.on("mouseout",function(){i.identifiedFeatures.unhighlight(this.feature)});this.on("add",function(){this.closeTooltip()})},highlight:function(){this.eachLayer(function(n){n.highlight()},this);this.bringToFront();this.openTooltip()},unhighlight:function(){this.eachLayer(function(n){n.unhighlight();this.feature.selected&&n.select()},this);this.feature.selected||this.closeTooltip()},select:function(){this.eachLayer(function(n){n.select()},this);this.openTooltip()},unselect:function(){this.eachLayer(function(n){n.unselect();this.feature.highlighted&&n.highlight()},this);this.closeTooltip()},focus:function(n){n.setView(this.getBounds().getCenter(),n.getMaxZoom()-2)}})}(app,L);app.map=app.map||{};app.map.identify=app.map.identify||{};app.map.identify.identifiedFeatureManager=function(n){"use strict";function e(t,i){return n.service.identifiedSymbols.getSymbol(i,t)||{}}function c(r){if(r){var u=e(r.feature,r.featureType);i=new n.map.identify.IdentifiedFeature(u.options,r.feature);f=new s({data:{feature:r.feature,layer:i}});i.addTo(t)}}function l(){i&&t.removeLayer(i);i=null;f=null}function a(n){$.each(n,function(n,t){$.each(t,function(t,i){i.wkt&&v(i,n)})})}function v(t,i){var o=e(t,i),f;f=t.wkt.indexOf("POINT")===0?new n.map.identify.IdentifiedPointFeature(t,i,o):new n.map.identify.IdentifiedFeature(o.options,t);r.push(f);u.push(new h({data:{feature:t,layer:f}}))}function y(){$.each(r,function(n){t.removeLayer(r[n]);delete r[n];delete u[n]});r.length=0;u.length=0}function p(n){t=n.map}var w=n.service.features,b=n.service.eventBus,t,r=[],u=[],i=null,f=null,o=n.entities.featureState,k=new Vue({data:{featureState:o},watch:{"featureState.identifiedFeatures":function(n){y();var t=n.bundle;a(t)},"featureState.currentQuery":function(n){l();c(n)}}}),s=Vue.extend({watch:{"feature.focused":{handler:function(n){if(!n)return!1;this.layer.focus(t)},immediate:!0}}}),h=Vue.extend({created:function(){this.layer.showOnCreated&&this.layer.addTo(t)},watch:{"feature.selected":{handler:function(n){n?this.layer.select(t,this.feature):this.layer.unselect(t,this.feature)},immediate:!0},"feature.highlighted":{handler:function(n){n?this.layer.highlight(t,this.feature):this.layer.unhighlight(t,this.feature)}},"feature.focused":{handler:function(n){if(!n)return!1;this.layer.focus(t)},immediate:!0}}});return{init:p}}(app,L);app.layerList=app.layerList||{};app.layerList.LayerListControl=function(n,t){"use strict";var i=n.layerList.layerList;t.Control.LayerList=t.Control.extend({options:{position:"topleft"},initialize:function(n){n&&t.Util.setOptions(this,n)},onAdd:function(){var n=t.DomUtil.create("div","layer-list-control"),r;return t.DomEvent.disableClickPropagation(n),r=t.DomUtil.create("div"),$(n).append(r),i.init(r),n}});t.control.layerlist=function(n){return new t.Control.LayerList(n)}}(app,L),function(n,t){"use strict";var i=n.config.basemap,r=Vue.extend({data:function(){return{currentLayers:[]}},template:"#basemap-switcher-template",created:function(){var n=$.grep(this.basemaps,function(n){return n.visible})[0];this.setBasemap(n.name)},methods:{onRadioClick:function(n){var t=$(n.currentTarget).val();this.setBasemap(t)},setBasemap:function(n){if(this.currentBasemap&&this.currentBasemap.name===n)return!1;this.removeFromMap(this.currentLayers);var t=this.getBasemap(n);this.addToMap(t);this.currentBasemap=t},getBasemap:function(n){return $.grep(this.basemaps,function(t){return t.name===n})[0]},addToMap:function(n){var t=this.map,i=this.currentLayers;$.each(n.layers,function(n,r){var u,f=$.extend({},{zIndex:0},r.options);r.key&&(u=r.type(r.key,f));r.url&&(u=r.type(r.url,f));t.addLayer(u);i.push(u)})},removeFromMap:function(n){if(!n)return!1;var t=this.map;$.each(n,function(n,i){t.removeLayer(i)});$.each(n,function(t){n.splice(t,1)})}}});t.Control.BasemapSwitcher=t.Control.extend({options:{position:"topleft"},initialize:function(n,i){i&&t.Util.setOptions(this,i)},onAdd:function(n){var u=t.DomUtil.create("div","basemap-switcher"),f,e;return t.DomEvent.disableClickPropagation(u),f=t.DomUtil.create("div"),$(u).append(f),e=new r({data:{basemaps:i.basemaps,map:n}}),e.$mount(f),u}});t.control.basemapswitcher=function(n,i){return new t.Control.BasemapSwitcher(i)}}(app,L);app.map=app.map||{};app.map.mapClickHandler=function(n,t){function e(n){var t=0;n.on("click",function(n){t+=1;t<=1&&setTimeout(function(){t<=1&&l(n);t=0},300)})}function s(){var r=i.layerPointToLatLng([0,0]),f=i.layerPointToLatLng([o,0]),n=t.Util.formatNum(r.distanceTo(f),2);return n>u?n:u}function h(n){r.setLatLng(n);r.addTo(i)}function c(){r.removeFrom(i)}function l(n){n.latlng&&(a(n.latlng),h(n.latlng))}function a(t){var i=f.toServerCoords(t),u=s(),r=new n.entities.featureQuery.PointLocationQuery({x:i.x,y:i.y,tolerance:u,lat:t.lat,lng:t.lng});r.search().then(function(i){n.service.geocoder.reverseGeocode(t).then(function(n){Vue.set(r.feature,"address",n)});c();i.selectInitialFeature()})}function v(n){i=n.map;r=new t.Marker;e(i)}var i=null,r,f=n.service.coordinateConverter,o=4,u=7;return{init:v}}(app,L);app.map=app.map||{};app.map.map=function(n,t){"use strict";function l(){return i._getBoundsCenterZoom(i.getBounds(),{paddingTopLeft:[-0,-0]}).center}function a(){return i.getZoom()}var u=n.config,f=n.service.pageLink,i,e,o,s,h,r,c;return t.Icon.Default.imagePath=u.baseUrl+"img/leaflet/",i=t.map("map",{zoomControl:!1,minZoom:u.map.minZoom,maxBounds:u.map.maxBounds}),i.createPane("choroplethPane"),i.getPane("choroplethPane").style.zIndex=250,i.createPane("upperTilePane"),i.getPane("upperTilePane").style.zIndex=300,i.createPane("identifiedPointPane"),i.getPane("identifiedPointPane").style.zIndex=625,t.control.basemapswitcher().addTo(i),t.control.zoom().addTo(i),e=n.sidebar.sidebar,e.init({map:i}),o=n.map.layer.layerManager,o.init({map:i}),s=n.map.identify.identifiedFeatureManager,s.init({map:i}),h=n.map.mapClickHandler,h.init({map:i}),r=f.getValue("latlng"),r&&(r=r.split(",")),c=f.getValue("z")||9,r&&r.length===2?i.setView(r,c):i.fitBounds(n.config.map.initialBounds),{getCenter:l,getZoom:a}}(app,L),function(n){"use strict";var t=n.modal.layer,i=Vue.component("legend-group",{props:["group","isExpanded"],template:"#legend-group-template",mounted:function(){var n=this.group,t=$(this.$el).find(".panel-collapse");t.on("shown.bs.collapse",function(){Vue.set(n,"expanded",!0)});t.on("hidden.bs.collapse",function(){Vue.set(n,"expanded",!1)})},computed:{hasVisibleLayers:function(){return _.some(this.selectableLayers,{visible:!0})},selectableLayers:function(){return $.map(this.group.layers,function(n){return!(n.type&&n.type.indexOf("Choropleth")>-1)&&n.legend?n:null})}},methods:{onHeadingClicked:function(){this.toggle()},toggle:function(){$(this.$el).find(".panel-collapse").collapse("toggle")},onDescriptionClicked:function(n){var i=$(n.target);return i.data("targetmodal")?(n.preventDefault(),t.open(i.attr("href"),this.group.name),!1):!0},onShowAllClicked:function(){_.forEach(this.selectableLayers,function(n){n.visible=!0})},onHideAllClicked:function(){_.forEach(this.selectableLayers,function(n){n.visible=!1})}}}),r=Vue.component("legend-group-choropleth",{template:"#legend-group-choropleth-template",computed:{group:function(){return{name:"CHOROPLETH"}},selectableLayers:function(){return n.entities.featureState.activeChoropleth?[n.entities.featureState.activeChoropleth.layer]:[]}},methods:{onDescriptionClicked:function(n){var i=$(n.target);return i.data("targetmodal")?(n.preventDefault(),t.open(i.attr("href"),this.group.name),!1):!0}}})}(app),function(n){"use strict";var i=n.modal.layer,t=Vue.component("legend-item",{props:["layer"],template:"#legend-item-template",methods:{onDescriptionClicked:function(n){var r=this,t=$(n.target);return t.data("targetmodal")?(n.preventDefault(),i.open(t.attr("href"),this.layer.name),!1):!0}}});Vue.component("legend-item-choropleth",t.extend({props:["layer"],template:"#legend-item-choropleth"}));Vue.component("legend-item-webapipoint",t.extend({props:["layer"],template:"#legend-item-webapipoint"}));Vue.component("legend-item-webapiline",t.extend({props:["layer"],template:"#legend-item-webapiline"}))}(app),function(n){"use strict";var t=n.service.layers;t.getLayerGroups().then(function(n){var t=n.groups,i=$.map(n.groups,function(n){return n.layers});new Vue({el:"#legend",template:"#legend-template",data:{groups:t,layers:i},watch:{},computed:{visibleGroups:function(){return $.map(this.groups,function(n){var t=$.map(n.layers,function(n){return(n.type&&n.type.indexOf("Choropleth")>-1)?null:n});return t.length>0?n:null})}}})})}(app)