1!function(h,N){var t,n,y=typeof N,g=h.document,e=h.location,r=h.jQuery,i=h.$,o={},f=[],a="1.9.1",v=f.concat,s=f.push,c=f.slice,u=f.indexOf,l=o.toString,m=o.hasOwnProperty,p=a.trim,me=function(e,t){return new me.fn.init(e,t,n)},d=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,C=/\S+/g,b=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,x=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,w=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,T=/^[\],:{}\s]*$/,k=/(?:^|:|,)(?:\s*\[)+/g,E=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,S=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,A=/^-ms-/,j=/-([\da-z])/gi,D=function(e,t){return t.toUpperCase()},L=function(e){(g.addEventListener||"load"===e.type||"complete"===g.readyState)&&(H(),me.ready())},H=function(){g.addEventListener?(g.removeEventListener("DOMContentLoaded",L,!1),h.removeEventListener("load",L,!1)):(g.detachEvent("onreadystatechange",L),h.detachEvent("onload",L))};function q(e){var t=e.length,n=me.type(e);return!me.isWindow(e)&&(!(1!==e.nodeType||!t)||("array"===n||"function"!==n&&(0===t||"number"==typeof t&&0<t&&t-1 in e)))}me.fn=me.prototype={jquery:a,constructor:me,init:function(e,t,n){var r,i;if(!e)return this;if("string"!=typeof e)return e.nodeType?(this.context=this[0]=e,this.length=1,this):me.isFunction(e)?n.ready(e):(e.selector!==N&&(this.selector=e.selector,this.context=e.context),me.makeArray(e,this));if(!(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&3<=e.length?[null,e,null]:x.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof me?t[0]:t,me.merge(this,me.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:g,!0)),w.test(r[1])&&me.isPlainObject(t))for(r in t)me.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}if((i=g.getElementById(r[2]))&&i.parentNode){if(i.id!==r[2])return n.find(e);this.length=1,this[0]=i}return this.context=g,this.selector=e,this},selector:"",length:0,size:function(){return this.length},toArray:function(){return c.call(this)},get:function(e){return null==e?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e){var t=me.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return me.each(this,e,t)},ready:function(e){return me.ready.promise().done(e),this},slice:function(){return this.pushStack(c.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},map:function(n){return this.pushStack(me.map(this,function(e,t){return n.call(e,t,e)}))},end:function(){return this.prevObject||this.constructor(null)},push:s,sort:[].sort,splice:[].splice},me.fn.init.prototype=me.fn,me.extend=me.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[1]||{}
1,s=2),"object"==typeof a||me.isFunction(a)||(a={}),u===s&&(a=this,--s);s<u;s++)if(null!=(i=arguments[s]))for(r in i)e=a[r],a!==(n=i[r])&&(l&&n&&(me.isPlainObject(n)||(t=me.isArray(n)))?(o=t?(t=!1,e&&me.isArray(e)?e:[]):e&&me.isPlainObject(e)?e:{},a[r]=me.extend(l,o,n)):n!==N&&(a[r]=n));return a},me.extend({noConflict:function(e){return h.$===me&&(h.$=i),e&&h.jQuery===me&&(h.jQuery=r),me},isReady:!1,readyWait:1,holdReady:function(e){e?me.readyWait++:me.ready(!0)},ready:function(e){if(!0===e?!--me.readyWait:!me.isReady){if(!g.body)return setTimeout(me.ready);(me.isReady=!0)!==e&&0<--me.readyWait||(t.resolveWith(g,[me]),me.fn.trigger&&me(g).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===me.type(e)},isArray:Array.isArray||function(e){return"array"===me.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?String(e):"object"==typeof e||"function"==typeof e?o[l.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==me.type(e)||e.nodeType||me.isWindow(e))return!1;try{if(e.constructor&&!m.call(e,"constructor")&&!m.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}var t;for(t in e);return t===N||m.call(e,t)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||g;var r=w.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=me.buildFragment([e],t,i),i&&me(i).remove(),me.merge([],r.childNodes))},parseJSON:function(e){return h.JSON&&h.JSON.parse?h.JSON.parse(e):null===e?e:"string"==typeof e&&(e=me.trim(e))&&T.test(e.replace(E,"@").replace(S,"]").replace(k,""))?new Function("return "+e)():void me.error("Invalid JSON: "+e)},parseXML:function(e){var t;if(!e||"string"!=typeof e)return null;try{h.DOMParser?t=(new DOMParser).parseFromString(e,"text/xml"):((t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e))}catch(e){t=N}return t&&t.documentElement&&!t.getElementsByTagName("parsererror").length||me.error("Invalid XML: "+e),t},noop:function(){},globalEval:function(e){e&&me.trim(e)&&(h.execScript||function(e){h.eval.call(h,e)})(e)},camelCase:function(e){return e.replace(A,"ms-").replace(j,D)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r=0,i=e.length,o=q(e);if(n){if(o)for(;r<i&&!1!==t.apply(e[r],n);r++);else for(r in e)if(!1===t.apply(e[r],n))break}else if(o)for(;r<i&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:p&&!p.call("\ufeff ")?function(e){return null==e?"":p.call(e)}:function(e){return null==e?"":(e+"").replace(b,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(q(Object(e))?me.merge(n,"string"==typeof e?[e]:e):s.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(u)return u.call(t,e,n);for(r=t.length,n=n?n<0?Math.max(0,r+n):n:0;n<r;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,t){var n=t.length,r=e.length,i=0;if("number"==typeof n)for(;i<n;i++)e[r++]=t[i];else for(;t[i]!==N;)e[r++]=t[i++];return e.length=r,e},grep:function(e,t,n){var r=[],i=0,o=e.length;for(n=!!n;i<o;i++)n!==!!t(e[i],i)&&r.push(e[i]);return r},map:function(e,t,n){var r,i=0,o=e.length,a=[];if(q(e))for(;i<o;i++)null!=(r=t(e[i],i,n))&&(a[a.length]=r);else for(i in e)null!=(r=t(e[i],i,n))&&(a[a.length]=r);return v.apply([],a)},guid:1,proxy:function(e,t){var n,r,i;return"string"==typeof t&&(i=e[t],t=e,e=i),me.isFunction(e)?(n=c.call(arguments,2),(r=function(){return e.apply(t||this,n.concat(c.call(arguments)))}).guid=e.guid=e.guid||me.guid++,r):N},access:function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===me.type(n))for(s in i=!0,n)me.access(e,t,s,n[s],!0,o,a);else if(r!==N&&(i=!0,me.isFunction(r)||(a=!0),l&&(t=a?(t.call(e,r),null):(l=t,function(e,t,n){return l.call(me(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},now:function(){return(new Date).getTime()}}),me.ready.promise=function(e){if(!t)if(t=me.Deferred(),"complete"===g.readyState)setTimeout(me.ready);else if(g.addEventListener)g.addEventListener("DOMContentLoaded",L,!1),h.addEventListener("load",L,!1);else{g.attachEvent("onreadystatechange",L),h.attachEvent("onload",L);var n=!1;try{n=null==h.frameElement&&g.documentElement}catch(e){}n&&n.doScroll&&!function t(){if(!me.isReady){try{n.doScroll("left")}catch(e){return setTimeout(t,50)}H(),me.ready()}}()}return t.promise(e)},me.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){o["[object "+t+"]"]=t.toLowerCase()}),n=me(g);var M={};me.Callbacks=function(i){i="string"==typeof i?M[i]||function(e){var n=M[e]={};return me.each(e.match(C)||[],function(e,t){n[t]=!0}),n}(i):me.extend({},i);var r,t,n,o,a,s,u=[],l=!i.once&&[],c=function(e){for(t=i.memory&&e,n=!0,a=s||0,s=0,o=u.length,r=!0;u&&a<o;a++)if(!1===u[a].apply(e[0],e[1])&&i.stopOnFalse){t=!1;break}r=!1,u&&(l?l.length&&c(l.shift()):t?u=[]:f.disable())},f={add:function(){if(u){var e=u.length;!function r(e){me.each(e,function(e,t){var n=me.type(t);"function"===n?i.unique&&f.has(t)||u.push(t):t&&t.length&&"string"!==n&&r(t)})}(arguments),r?o=u.length:t&&(s=e,c(t))}return this},remove:function(){return u&&me.each(arguments,function(e,t){for(var n;-1<(n=me.inArray(t,u,n));)u.splice(n,1),r&&(n<=o&&o--,n<=a&&a--)}),this},has:function(e){return e?-1<me.inArray(e,u):!(!u||!u.length)},empty:function(){return u=[],this},disable:function(){return u=l=t=N,this},disabled:function(){return!u},lock:function(){return l=N,t||f.disable(),this},locked:function(){return!l},fireWith:function(e,t){return t=[e,(t=t||[]).slice?t.slice():t],!u||n&&!l||(r?l.push(t):c(t)),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!n}};return f},me.extend({Deferred:function(e){var a=[["resolve","done",me.Callbacks("once memory"),"resolved"],["reject","fail",me.Callbacks("once memory"),"rejected"],["notify","progress",me.Callbacks("memory")]],i="pending",s={state:function(){return i},always:function(){return u.done(arguments).fail(arguments),this},then:function(){var o=arguments;return me.Deferred(function(i){me.each(a,function(e,t){var n=t[0],r=me.isFunction(o[e])&&o[e];u[t[1]](function(){var e=r&&r.apply(this,arguments);e&&me.isFunction(e.promise)?e.promise().done(i.resolve).fail(i.reject).progress(i.notify):i[n+"With"](this===s?i.promise():this,r?[e]:arguments)})}),o=null}).promise()},promise:function(e){return null!=e?me.extend(e,s):s}},u={};return s.pipe=s.then,me.each(a,function(e,t){var n=t[2],r=t[3];s[t[1]]=n.add,r&&n.add(function(){i=r},a[1^e][2].disable,a[2][2].lock),u[t[0]]=function(){return u[t[0]+"With"](this===u?s:this,arguments),this},u[t[0]+"With"]=n.fireWith}),s.promise(u),e&&e.call(u,u),u},when:function(e){var i,t,n,r=0,o=c.call(arguments),a=o.length,s=1!==a||e&&me.
1isFunction(e.promise)?a:0,u=1===s?e:me.Deferred(),l=function(t,n,r){return function(e){n[t]=this,r[t]=1<arguments.length?c.call(arguments):e,r===i?u.notifyWith(n,r):--s||u.resolveWith(n,r)}};if(1<a)for(i=new Array(a),t=new Array(a),n=new Array(a);r<a;r++)o[r]&&me.isFunction(o[r].promise)?o[r].promise().done(l(r,n,o)).fail(u.reject).progress(l(r,t,i)):--s;return s||u.resolveWith(n,o),u.promise()}}),me.support=function(){var o,e,t,n,r,i,a,s,u,l,c=g.createElement("div");if(c.setAttribute("className","t"),c.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",e=c.getElementsByTagName("*"),t=c.getElementsByTagName("a")[0],!e||!t||!e.length)return{};a=(r=g.createElement("select")).appendChild(g.createElement("option")),n=c.getElementsByTagName("input")[0],t.style.cssText="top:1px;float:left;opacity:.5",o={getSetAttribute:"t"!==c.className,leadingWhitespace:3===c.firstChild.nodeType,tbody:!c.getElementsByTagName("tbody").length,htmlSerialize:!!c.getElementsByTagName("link").length,style:/top/.test(t.getAttribute("style")),hrefNormalized:"/a"===t.getAttribute("href"),opacity:/^0.5/.test(t.style.opacity),cssFloat:!!t.style.cssFloat,checkOn:!!n.value,optSelected:a.selected,enctype:!!g.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==g.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===g.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},n.checked=!0,o.noCloneChecked=n.cloneNode(!0).checked,r.disabled=!0,o.optDisabled=!a.disabled;try{delete c.test}catch(e){o.deleteExpando=!1}for(l in(n=g.createElement("input")).setAttribute("value",""),o.input=""===n.getAttribute("value"),n.value="t",n.setAttribute("type","radio"),o.radioValue="t"===n.value,n.setAttribute("checked","t"),n.setAttribute("name","t"),(i=g.createDocumentFragment()).appendChild(n),o.appendChecked=n.checked,o.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,c.attachEvent&&(c.attachEvent("onclick",function(){o.noCloneEvent=!1}),c.cloneNode(!0).click()),{submit:!0,change:!0,focusin:!0})c.setAttribute(s="on"+l,"t"),o[l+"Bubbles"]=s in h||!1===c.attributes[s].expando;return c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",o.clearCloneStyle="content-box"===c.style.backgroundClip,me(function(){var e,t,n,r="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",i=g.getElementsByTagName("body")[0];i&&((e=g.createElement("div")).style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",i.appendChild(e).appendChild(c),c.innerHTML="<table><tr><td></td><td>t</td></tr></table>",(n=c.getElementsByTagName("td"))[0].style.cssText="padding:0;margin:0;border:0;display:none",u=0===n[0].offsetHeight,n[0].style.display="",n[1].style.display="none",o.reliableHiddenOffsets=u&&0===n[0].offsetHeight,c.innerHTML="",c.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",o.boxSizing=4===c.offsetWidth,o.doesNotIncludeMarginInBodyOffset=1!==i.offsetTop,h.getComputedStyle&&(o.pixelPosition="1%"!==(h.getComputedStyle(c,null)||{}).top,o.boxSizingReliable="4px"===(h.getComputedStyle(c,null)||{width:"4px"}).width,(t=c.appendChild(g.createElement("div"))).style.cssText=c.style.cssText=r,t.style.marginRight=t.style.width="0",c.style.width="1px",o.reliableMarginRight=!parseFloat((h.getComputedStyle(t,null)||{}).marginRight)),typeof c.style.zoom!==y&&(c.innerHTML="",c.style.cssText=r+"width:1px;padding:1px;display:inline;zoom:1",o.inlineBlockNeedsLayout=3===c.offsetWidth,c.style.display="block",c.innerHTML="<div></div>",c.firstChild.style.width="5px",o.shrinkWrapBlocks=3!==c.offsetWidth,o.inlineBlockNeedsLayout&&(i.style.zoom=1)),i.removeChild(e),e=c=n=t=null)}),e=r=i=a=t=n=null,o}();var _=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,F=/([A-Z])/g;function O(e,t,n,r){if(me.acceptData(e)){var i,o,a=me.expando,s="string"==typeof t,u=e.nodeType,l=u?me.cache:e,c=u?e[a]:e[a]&&a;if(c&&l[c]&&(r||l[c].data)||!s||n!==N)return c||(u?e[a]=c=f.pop()||me.guid++:c=a),l[c]||(l[c]={},u||(l[c].toJSON=me.noop)),"object"!=typeof t&&"function"!=typeof t||(r?l[c]=me.extend(l[c],t):l[c].data=me.extend(l[c].data,t)),i=l[c],r||(i.data||(i.data={}),i=i.data),n!==N&&(i[me.camelCase(t)]=n),s?null==(o=i[t])&&(o=i[me.camelCase(t)]):o=i,o}}function B(e,t,n){if(me.acceptData(e)){var r,i,o,a=e.nodeType,s=a?me.cache:e,u=a?e[me.expando]:me.expando;if(s[u]){if(t&&(o=n?s[u]:s[u].data)){for((r=0,i=(t=me.isArray(t)?t.concat(me.map(t,me.camelCase)):t in o?[t]:(t=me.camelCase(t))in o?[t]:t.split(" ")).length);r<i;r++)delete o[t[r]];if(!(n?R:me.isEmptyObject)(o))return}(n||(delete s[u].data,R(s[u])))&&(a?me.cleanData([e],!0):me.support.deleteExpando||s!=s.window?delete s[u]:s[u]=null)}}}function P(e,t,n){if(n===N&&1===e.nodeType){var r="data-"+t.replace(F,"-$1").toLowerCase();if("string"==typeof(n=e.getAttribute(r))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:_.test(n)?me.parseJSON(n):n)}catch(e){}me.data(e,t,n)}else n=N}return n}function R(e){var t;for(t in e)if(("data"!==t||!me.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}me.extend({cache:{},expando:"jQuery"+(a+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return!!(e=e.nodeType?me.cache[e[me.expando]]:e[me.expando])&&!R(e)},data:function(e,t,n){return O(e,t,n)},removeData:function(e,t){return B(e,t)},_data:function(e,t,n){return O(e,t,n,!0)},_removeData:function(e,t){return B(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&me.noData[e.nodeName.toLowerCase()];return!t||!0!==t&&e.getAttribute("classid")===t}}),me.fn.extend({data:function(t,e){var n,r,i=this[0],o=0,a=null;if(t!==N)return"object"==typeof t?this.each(function(){me.data(this,t)}):me.access(this,function(e){if(e===N)return i?P(i,t,me.data(i,t)):null;this.each(function(){me.data(this,t,e)})},null,e,1<arguments.length,null,!0);if(this.length&&(a=me.data(i),1===i.nodeType&&!me._data(i,"parsedAttrs"))){for(n=i.attributes;o<n.length;o++)(r=n[o].name).indexOf("data-")||(r=me.camelCase(r.slice(5)),P(i,r,a[r]));me._data(i,"parsedAttrs",!0)}return a},removeData:function(e){return this.each(function(){me.removeData(this,e)})}}),me.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=me._data(e,t),n&&(!r||me.isArray(n)?r=me._data(e,t,me.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=me.queue(e,t),r=n.length,i=n.shift(),o=me._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),(o.cur=i)&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){me.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return me._data(e,n)||me._data(e,n,{empty:me.Callbacks("once memory").add(function(){me._removeData(e,t+"queue"),me._removeData(e,n)})})}}),me.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?me.queue(this[0],t):n===N?this:this.each(function(){var e=me.queue(this,t,n);me._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&me.dequeue(this,t)})},dequeue:function(e){return this.each(function(){me.dequeue(this,e)})},delay:function(r,e){return r=me.fx&&me.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=setTimeout(e,r);t.stop=function(){clearTimeout(n)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=me.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=N),e=e||"fx";a--;)(n=me._data(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var W,$,I=/[\t\r\n]/g,z=/\r/g,X=/^(?:input|select|textarea|button|object)$/i,U=/^(?:a|area)$/i,V=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,Y=/^(?:checked|selected)$/i,J=me.supp
1ort.getSetAttribute,G=me.support.input;me.fn.extend({attr:function(e,t){return me.access(this,me.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){me.removeAttr(this,e)})},prop:function(e,t){return me.access(this,me.prop,e,t,1<arguments.length)},removeProp:function(e){return e=me.propFix[e]||e,this.each(function(){try{this[e]=N,delete this[e]}catch(e){}})},addClass:function(t){var e,n,r,i,o,a=0,s=this.length,u="string"==typeof t&&t;if(me.isFunction(t))return this.each(function(e){me(this).addClass(t.call(this,e,this.className))});if(u)for(e=(t||"").match(C)||[];a<s;a++)if(r=1===(n=this[a]).nodeType&&(n.className?(" "+n.className+" ").replace(I," "):" ")){for(o=0;i=e[o++];)r.indexOf(" "+i+" ")<0&&(r+=i+" ");n.className=me.trim(r)}return this},removeClass:function(t){var e,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof t&&t;if(me.isFunction(t))return this.each(function(e){me(this).removeClass(t.call(this,e,this.className))});if(u)for(e=(t||"").match(C)||[];a<s;a++)if(r=1===(n=this[a]).nodeType&&(n.className?(" "+n.className+" ").replace(I," "):"")){for(o=0;i=e[o++];)for(;0<=r.indexOf(" "+i+" ");)r=r.replace(" "+i+" "," ");n.className=t?me.trim(r):""}return this},toggleClass:function(o,a){var s=typeof o,u="boolean"==typeof a;return me.isFunction(o)?this.each(function(e){me(this).toggleClass(o.call(this,e,this.className,a),a)}):this.each(function(){if("string"==s)for(var e,t=0,n=me(this),r=a,i=o.match(C)||[];e=i[t++];)r=u?r:!n.hasClass(e),n[r?"addClass":"removeClass"](e);else s!==y&&"boolean"!=s||(this.className&&me._data(this,"__className__",this.className),this.className=this.className||!1===o?"":me._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,r=this.length;n<r;n++)if(1===this[n].nodeType&&0<=(" "+this[n].className+" ").replace(I," ").indexOf(t))return!0;return!1},val:function(r){var e,i,o,t=this[0];return arguments.length?(o=me.isFunction(r),this.each(function(e){var t,n=me(this);1===this.nodeType&&(null==(t=o?r.call(this,e,n.val()):r)?t="":"number"==typeof t?t+="":me.isArray(t)&&(t=me.map(t,function(e){return null==e?"":e+""})),(i=me.valHooks[this.type]||me.valHooks[this.nodeName.toLowerCase()])&&"set"in i&&i.set(this,t,"value")!==N||(this.value=t))})):t?(i=me.valHooks[t.type]||me.valHooks[t.nodeName.toLowerCase()])&&"get"in i&&(e=i.get(t,"value"))!==N?e:"string"==typeof(e=t.value)?e.replace(z,""):null==e?"":e:void 0}}),me.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||i<0,a=o?null:[],s=o?i+1:r.length,u=i<0?s:o?i:0;u<s;u++)if(((n=r[u]).selected||u===i)&&(me.support.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!me.nodeName(n.parentNode,"optgroup"))){if(t=me(n).val(),o)return t;a.push(t)}return a}
1,set:function(e,t){var n=me.makeArray(t);return me(e).find("option").each(function(){this.selected=0<=me.inArray(me(this).val(),n)}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,t,n){var r,i,o,a=e.nodeType;if(e&&3!==a&&8!==a&&2!==a)return typeof e.getAttribute===y?me.prop(e,t,n):((i=1!==a||!me.isXMLDoc(e))&&(t=t.toLowerCase(),r=me.attrHooks[t]||(V.test(t)?$:W)),n===N?r&&i&&"get"in r&&null!==(o=r.get(e,t))?o:(typeof e.getAttribute!==y&&(o=e.getAttribute(t)),null==o?N:o):null!==n?r&&i&&"set"in r&&(o=r.set(e,n,t))!==N?o:(e.setAttribute(t,n+""),n):void me.removeAttr(e,t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(C);if(o&&1===e.nodeType)for(;n=o[i++];)r=me.propFix[n]||n,V.test(n)?!J&&Y.test(n)?e[me.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:me.attr(e,n,""),e.removeAttribute(J?n:r)},attrHooks:{type:{set:function(e,t){if(!me.support.radioValue&&"radio"===t&&me.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,t,n){var r,i,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o)return(1!==o||!me.isXMLDoc(e))&&(t=me.propFix[t]||t,i=me.propHooks[t]),n!==N?i&&"set"in i&&(r=i.set(e,n,t))!==N?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=e.getAttributeNode("tabindex");return t&&t.specified?parseInt(t.value,10):X.test(e.nodeName)||U.test(e.nodeName)&&e.href?0:N}}}}),$={get:function(e,t){var n=me.prop(e,t),r="boolean"==typeof n&&e.getAttribute(t),i="boolean"==typeof n?G&&J?null!=r:Y.test(t)?e[me.camelCase("default-"+t)]:!!r:e.getAttributeNode(t);return i&&!1!==i.value?t.toLowerCase():N},set:function(e,t,n){return!1===t?me.removeAttr(e,n):G&&J||!Y.test(n)?e.setAttribute(!J&&me.propFix[n]||n,n):e[me.camelCase("default-"+n)]=e[n]=!0,n}},G&&J||(me.attrHooks.value={get:function(e,t){var n=e.getAttributeNode(t);return me.nodeName(e,"input")?e.defaultValue:n&&n.specified?n.value:N},set:function(e,t,n){if(!me.nodeName(e,"input"))return W&&W.set(e,t,n);e.defaultValue=t}}),J||(W=me.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);return n&&("id"===t||"name"===t||"coords"===t?""!==n.value:n.specified)?n.value:N},set:function(e,t,n){var r=e.getAttributeNode(n);return r||e.setAttributeNode(r=e.ownerDocument.createAttribute(n)),r.value=t+="","value"===n||t===e.getAttribute(n)?t:N}},me.attrHooks.contenteditable={get:W.get,set:function(e,t,n){W.set(e,""!==t&&t,n)}},me.each(["width","height"],function(e,n){me.attrHooks[n]=me.extend(me.attrHooks[n],{set:function(e,t){if(""===t)return e.setAttribute(n,"auto"),t}})})),me.support.hrefNormalized||(me.each(["href","src","width","height"],function(e,n){me.attrHooks[n]=me.extend(me.attrHooks[n],{get:function(e){var t=e.getAttribute(n,2);return null==t?N:t}})}),me.each(["href","src"],function(e,t){me.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),me.support.style||(me.attrHooks.style={get:function(e){return e.style.cssText||N},set:function(e,t){return e.style.cssText=t+""}}),me.support.optSelected||(me.propHooks.selected=me.extend(me.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),me.support.enctype||(me.propFix.enctype="encoding"),me.support.checkOn||me.each(["radio","checkbox"],function(){me.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),me.each(["radio","checkbox"],function(){me.valHooks[this]=me.extend(me.valHooks[this],{set:function(e,t){if(me.isArray(t))return e.checked=0<=me.inArray(me(e).val(),t)}})});var Q=/^(?:input|select|textarea)$/i,K=/^key/,Z=/^(?:mouse|contextmenu)|click/,ee=/^(?:focusinfocus|focusoutblur)$/,te=/^([^.]*)(?:\.(.+)|)$/;function ne(){return!0}function re(){return!1}me.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,m=me._data(e);if(m){for(n.handler&&(n=(u=n).handler,i=u.selector),n.guid||(n.guid=me.guid++),(a=m.events)||(a=m.events={}),(c=m.handle)||((c=m.handle=function(e){return typeof me===y||e&&me.event.triggered===e.type?N:me.event.dispatch.apply(c.elem,arguments)}).elem=e),s=(t=(t||"").match(C)||[""]).length;s--;)d=g=(o=te.exec(t[s])||[])[1],h=(o[2]||"").split(".").sort(),l=me.event.special[d]||{},d=(i?l.delegateType:l.bindType)||d,l=me.event.special[d]||{},f=me.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&me.expr.match.needsContext.test(i),namespace:h.join(".")},u),(p=a[d])||((p=a[d]=[]).delegateCount=0,l.setup&&!1!==l.setup.call(e,r,h,c)||(e.addEventListener?e.addEventListener(d,c,!1):e.attachEvent&&e.attachEvent("on"+d,c))),l.add&&(l.add.call(e,f),f.handler.guid||(f.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,f):p.push(f),me.event.global[d]=!0;e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,m=me.hasData(e)&&me._data(e);if(m&&(c=m.events)){for(l=(t=(t||"").match(C)||[""]).length;l--;)if(d=g=(s=te.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){for(f=me.event.special[d]||{},p=c[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=p.length;o--;)a=p[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(p.splice(o,1),a.selector&&p.delegateCount--,f.remove&&f.remove.call(e,a));u&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,m.handle)||me.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)me.event.remove(e,d+t[l],n,r,!0);me.isEmptyObject(c)&&(delete m.handle,me._removeData(e,"events"))}},trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f=[n||g],p=m.call(e,"type")?e.type:e,d=m.call(e,"namespace")?e.namespace.split("."):[];if(a=l=n=n||g,3!==n.nodeType&&8!==n.nodeType&&!ee.test(p+me.event.triggered)&&(0<=p.indexOf(".")&&(p=(d=p.split(".")).shift(),d.sort()),o=p.indexOf(":")<0&&"on"+p,(e=e[me.expando]?e:new me.Event(p,"object"==typeof e&&e)).isTrigger=!0,e.namespace=d.join("."),e.namespace_re=e.namespace?new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=N,e.target||(e.target=n),t=null==t?[e]:me.makeArray(t,[e]),u=me.event.special[p]||{},r||!u.trigger||!1!==u.trigger.apply(n,t))){if(!r&&!u.noBubble&&!me.isWindow(n)){for(s=u.delegateType||p,ee.test(s+p)||(a=a.parentNode);a;a=a.parentNode)f.push(a),l=a;l===(n.ownerDocument||g)&&f.push(l.defaultView||l.parentWindow||h)}for(c=0;(a=f[c++])&&!e.isPropagationStopped();)e.type=1<c?s:u.bindType||p,(i=(me._data(a,"events")||{})[e.type]&&me._data(a,"handle"))&&i.apply(a,t),(i=o&&a[o])&&me.acceptData(a)&&i.apply&&!1===i.apply(a,t)&&e.preventDefault();if(e.type=p,!r&&!e.isDefaultPrevented()&&(!u._default||!1===u._default.apply(n.ownerDocument,t))&&("click"!==p||!me.nodeName(n,"a"))&&me.acceptData(n)&&o&&n[p]&&!me.isWindow(n)){(l=n[o])&&(n[o]=null),me.event.triggered=p;try{n[p]()}catch(e){}me.event.triggered=N,l&&(n[o]=l)}return e.result}},dispatch:function(e){e=me.event.fix(e);var t,n,r,i,o,a,s=c.call(arguments),u=(me._data(this,"events")||{})[e.type]||[],l=me.event.special[e.type]||{};if((s[0]=e).delegateTarget=this,!l.preDispatch||!1!==l.preDispatch.call(this,e)){for(a=me.event.handlers.call(this,e,u),t=0;(i=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,o=0;(r=i.handlers[o++])&&!e.isImmediatePropagationStopped();)e.namespace_re&&!e.namespace_re.test(r.namespace)||(e.handleObj=r,e.data=r.data,(n=((me.event.special[r.origType]||{}).handle||r.handler).apply(i.elem,s))!==N&&!1===(e.result=n)&&(e.preventDefault(),e.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,a=[],s=t.delegateCount,u=e.target;if(s&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(!0!==u.disabled||"click"!==e.type)){for(i=[],o=0;o<s;o++)i[n=(r=t[o]).selector+" "]===N&&(i[n]=r.needsContext?0<=me(n,this).index(u):me.find(n,this,null,[u]).length),i[n]&&i.push(r);i.length&&a.push({elem:u,handlers:i})}return s<t.length&&a.push({elem:this,handlers:t.slice(s)}),a},fix:function(e){if(e[me.expando])return e;var t,n,r,i=e.type,o=e,a=this.fixHooks[i];for(a||(this.fixHooks[i]=a=Z.test(i)?this.mouseHooks:K.test(i)?this.keyHooks:{}),r=a.props?this.props.concat(a.props):this.props,e=new me.Event(o),t=r.length;t--;)e[n=r[t]]=o[n];
1return e.target||(e.target=o.srcElement||g),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,a.filter?a.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,o=t.button,a=t.fromElement;return null==e.pageX&&null!=t.clientX&&(i=(r=e.target.ownerDocument||g).documentElement,n=r.body,e.pageX=t.clientX+(i&&i.scrollLeft||n&&n.scrollLeft||0)-(i&&i.clientLeft||n&&n.clientLeft||0),e.pageY=t.clientY+(i&&i.scrollTop||n&&n.scrollTop||0)-(i&&i.clientTop||n&&n.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?t.toElement:a),e.which||o===N||(e.which=1&o?1:2&o?3:4&o?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){if(me.nodeName(this,"input")&&"checkbox"===this.type&&this.click)return this.click(),!1}},focus:{trigger:function(){if(this!==g.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){if(this===g.activeElement&&this.blur)return this.blur(),!1},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==N&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=me.extend(new me.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?me.event.trigger(i,null,t):me.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},me.removeEvent=g.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===y&&(e[r]=null),e.detachEvent(r,n))},me.Event=function(e,t){if(!(this instanceof me.Event))return new me.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||!1===e.returnValue||e.getPreventDefault&&e.getPreventDefault()?ne:re):this.type=e,t&&me.extend(this,t),this.timeStamp=e&&e.timeStamp||me.now(),this[me.expando]=!0},me.Event.prototype={isDefaultPrevented:re,isPropagationStopped:re,isImmediatePropagationStopped:re,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=ne,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=ne,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ne,this.stopPropagation()}}
1,me.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,i){me.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||me.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),me.support.submitBubbles||(me.event.special.submit={setup:function(){if(me.nodeName(this,"form"))return!1;me.event.add(this,"click._submit keypress._submit",function(e){var t=e.target,n=me.nodeName(t,"input")||me.nodeName(t,"button")?t.form:N;n&&!me._data(n,"submitBubbles")&&(me.event.add(n,"submit._submit",function(e){e._submit_bubble=!0}),me._data(n,"submitBubbles",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&me.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){if(me.nodeName(this,"form"))return!1;me.event.remove(this,"._submit")}}),me.support.changeBubbles||(me.event.special.change={setup:function(){if(Q.test(this.nodeName))return"checkbox"!==this.type&&"radio"!==this.type||(me.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),me.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),me.event.simulate("change",this,e,!0)})),!1;me.event.add(this,"beforeactivate._change",function(e){var t=e.target;Q.test(t.nodeName)&&!me._data(t,"changeBubbles")&&(me.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||me.event.simulate("change",this.parentNode,e,!0)}),me._data(t,"changeBubbles",!0))})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type)return e.handleObj.handler.apply(this,arguments)},teardown:function(){return me.event.remove(this,"._change"),!Q.test(this.nodeName)}}),me.support.focusinBubbles||me.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){me.event.simulate(t,e.target,me.event.fix(e),!0)};me.event.special[t]={setup:function(){0==n++&&g.addEventListener(e,r,!0)},teardown:function(){0==--n&&g.removeEventListener(e,r,!0)}}}),me.fn.extend({on:function(e,t,n,r,i){var o,a;if("object"==typeof e){for(o in"string"!=typeof t&&(n=n||t,t=N),e)this.on(o,t,n,e[o],i);return this}if(null==n&&null==r?(r=t,n=t=N):null==r&&("string"==typeof t?(r=n,n=N):(r=n,n=t,t=N)),!1===r)r=re;else if(!r)return this;return 1===i&&(a=r,(r=function(e){return me().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=me.guid++)),this.each(function(){me.event.add(this,e,r,n,t)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,me(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"!=typeof e)return!1!==t&&"function"!=typeof t||(n=t,t=N),!1===n&&(n=re),this.each(function(){me.event.remove(this,e,n,t)});for(i in e)this.off(i,t,e[i]);return this},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){me.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return me.event.trigger(e,t,n,!0)}}),function(n,e){var t,w,T,o,r,h,l,N,g,C,i,m,y,a,s,v,c,b="sizzle"+-new Date,x=n.document,k={},E=0,f=0,u=ee(),p=ee(),d=ee(),S="undefined",A=[],j=A.pop,D=A.push,L=A.slice,H=A.indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(this[t]===e)return t;return-1},q="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",_=M.replace("w","w#"),F="\\["+q+"*("+M+")"+q+"*(?:([*^$|!~]?=)"+q+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+_+")|)|)"+q+"*\\]",O=":("+M+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+F.replace(3,8)+")*)|.*)\\)|)",B=new RegExp("^"+q+"+|((?:^|[^\\\\])(?:\\\\.)*)"+q+"+$","g"),P=new RegExp("^"+q+"*,"+q+"*"),R=new RegExp("^"+q+"*([\\x20\\t\\r\\n\\f>+~])"+q+"*"),W=new RegExp(O),$=new RegExp("^"+_+"$"),I={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),NAME:new RegExp("^\\[name=['\"]?("+M+")['\"]?\\]"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+F),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+q+"*(even|odd|(([+-]|)(\\d*)n|)"+q+"*(?:([+-]|)"+q+"*(\\d+)|))"+q+"*\\)|)","i"),needsContext:new RegExp("^"+q+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+q+"*((?:-\\d)?\\d*)"+q+"*\\)|)(?=[^-]|$)","i")},z=/[\x20\t\r\n\f]*[+~]/,X=/^[^{]+\{\s*\[native code/,U=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,V=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,J=/'|\\/g,G=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,Q=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,K=function(e,t){var n="0x"+t-65536;return n!=n?t:n<0?String.fromCharCode(65536+n):String.fromCharCode(n>>10|55296,1023&n|56320)};try{L.call(x.documentElement.childNodes,0)[0].nodeType}catch(e){L=function(e){for(var t,n=[];t=this[e++];)n.push(t);return n}}function Z(e){return X.test(e+"")}function ee(){var n,r=[];return n=function(e,t){return r.push(e+=" ")>T.cacheLength&&delete n[r.shift()],n[e]=t}}function te(e){return e[b]=!0,e}function ne(e){var t=C.createElement("div");try{return e(t)}catch(e){return!1}finally{t=null}}function re(e,t,n,r){var i,o,a,s,u,l,c,f,p,d;if((t?t.ownerDocument||t:x)!==C&&g(t),n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=(t=t||C).nodeType)&&9!==s)return[];if(!m&&!r){if(i=U.exec(e))if(a=i[1]){if(9===s){if(!(o=t.getElementById(a))||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&v(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return D.apply(n,L.call(t.getElementsByTagName(e),0)),n;if((a=i[3])&&k.getByClassName&&t.getElementsByClassName)return D.apply(n,L.call(t.getElementsByClassName(a),0)),n}if(k.qsa&&!y.test(e)){if(c=!0,f=b,p=t,d=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(l=ue(e),(c=t.getAttribute("id"))?f=c.replace(J,"\\$&"):t.setAttribute("id",f),f="[id='"+f+"'] ",u=l.length;u--;)l[u]=f+le(l[u]);p=z.test(e)&&t.parentNode||t,d=l.join(",")}if(d)try{return D.apply(n,L.call(p.querySelectorAll(d),0)),n}catch(e){}finally{c||t.removeAttribute("id")}}}return function(e,t,n,r){var i,o,a,s,u,l=ue(e);
1if(!r&&1===l.length){if(2<(o=l[0]=l[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&!m&&T.relative[o[1].type]){if(!(t=T.find.ID(a.matches[0].replace(Q,K),t)[0]))return n;e=e.slice(o.shift().value.length)}for(i=I.needsContext.test(e)?0:o.length;i--&&(a=o[i],!T.relative[s=a.type]);)if((u=T.find[s])&&(r=u(a.matches[0].replace(Q,K),z.test(o[0].type)&&t.parentNode||t))){if(o.splice(i,1),!(e=r.length&&le(o)))return D.apply(n,L.call(r,0)),n;break}}return h(e,l)(r,t,m,n,z.test(e)),n}(e.replace(B,"$1"),t,n,r)}function ie(e,t){var n=t&&e,r=n&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function oe(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function ae(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function se(a){return te(function(o){return o=+o,te(function(e,t){for(var n,r=a([],e.length,o),i=r.length;i--;)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}for(t in r=re.
1isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},g=re.setDocument=function(e){var u=e?e.ownerDocument||e:x;return u!==C&&9===u.nodeType&&u.documentElement&&(i=(C=u).documentElement,m=r(u),k.tagNameNoComments=ne(function(e){return e.appendChild(u.createComment("")),!e.getElementsByTagName("*").length}),k.attributes=ne(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!=t&&"string"!=t}),k.getByClassName=ne(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!(!e.getElementsByClassName||!e.getElementsByClassName("e").length)&&(e.lastChild.className="e",2===e.getElementsByClassName("e").length)}),k.getByName=ne(function(e){e.id=b+0,e.innerHTML="<a name='"+b+"'></a><div name='"+b+"'></div>",i.insertBefore(e,i.firstChild);var t=u.getElementsByName&&u.getElementsByName(b).length===2+u.getElementsByName(b+0).length;return k.getIdNotName=!u.getElementById(b),i.removeChild(e),t}),T.attrHandle=ne(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!=S&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},k.getIdNotName?(T.find.ID=function(e,t){if(typeof t.getElementById!=S&&!m){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},T.filter.ID=function(e){var t=e.replace(Q,K);return function(e){return e.getAttribute("id")===t}}):(T.find.ID=function(e,t){if(typeof t.getElementById!=S&&!m){var n=t.getElementById(e);return n?n.id===e||typeof n.getAttributeNode!=S&&n.getAttributeNode("id").value===e?[n]:void 0:[]}},T.filter.ID=function(e){var n=e.replace(Q,K);return function(e){var t=typeof e.getAttributeNode!=S&&e.getAttributeNode("id");return t&&t.value===n}}),T.find.TAG=k.tagNameNoComments?function(e,t){if(typeof t.getElementsByTagName!=S)return t.getElementsByTagName(e)}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"!==e)return o;for(;n=o[i++];)1===n.nodeType&&r.push(n);return r},T.find.NAME=k.getByName&&function(e,t){if(typeof t.getElementsByName!=S)return t.getElementsByName(name)},T.find.CLASS=k.getByClassName&&function(e,t){if(typeof t.getElementsByClassName!=S&&!m)return t.getElementsByClassName(e)},a=[],y=[":focus"],(k.qsa=Z(u.querySelectorAll))&&(ne(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||y.push("\\["+q+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||y.push(":checked")}),ne(function(e){e.innerHTML="<input type='hidden' i=''/>",e.querySelectorAll("[i^='']").length&&y.push("[*^$]="+q+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(k.matchesSelector=Z(s=i.matchesSelector||i.mozMatchesSelector||i.webkitMatchesSelector||i.oMatchesSelector||i.msMatchesSelector))&&ne(function(e){k.disconnectedMatch=s.call(e,"div"),s.call(e,"[s!='']:x"),a.push("!=",O)}),y=new RegExp(y.join("|")),a=new RegExp(a.join("|")),v=Z(i.contains)||i.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},c=i.compareDocumentPosition?function(e,t){var n;return e===t?(l=!0,0):(n=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&n||e.parentNode&&11===e.parentNode.nodeType?e===u||v(x,e)?-1:t===u||v(x,t)?1:0:4&n?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(e===t)return l=!0,0;if(!i||!o)return e===u?-1:t===u?1:i?-1:o?1:0;if(i===o)return ie(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?ie(a[r],s[r]):a[r]===x?-1:s[r]===x?1:0},l=!1,[0,0].sort(c),k.detectDuplicates=l),C},re.matches=function(e,t){return re(e,null,null,t)},re.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&g(e),t=t.replace(G,"='$1']"),k.matchesSelector&&!m&&(!a||!a.test(t))&&!y.test(t))try{var n=s.call(e,t);if(n||k.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return 0<re(t,C,null,[e]).length},re.contains=function(e,t){return(e.ownerDocument||e)!==C&&g(e),v(e,t)},re.attr=function(e,t){var n;return(e.ownerDocument||e)!==C&&g(e),m||(t=t.toLowerCase()),(n=T.attrHandle[t])?n(e):m||k.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&!0===e[t]?t:n&&n.specified?n.value:null},re.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},re.uniqueSort=function(e){var t,n=[],r=1,i=0;if(l=!k.detectDuplicates,e.sort(c),l){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return e},o=re.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}
vendor: 4,953 bytes, line 1
1else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},T=re.selectors={cacheLength:50,createPseudo:te,match:I,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Q,K),e[3]=(e[4]||e[5]||"").replace(Q,K),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||re.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&re.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return I.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&W.test(n)&&(t=ue(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(t){return"*"===t?function(){return!0}:(t=t.replace(Q,K).toLowerCase(),function(e){return e.nodeName&&e.nodeName.toLowerCase()===t})},CLASS:function(e){var t=u[e+" "];return t||(t=new RegExp("(^|"+q+")"+e+"("+q+"|$)"))&&u(e,function(e){return t.test(e.className||typeof e.getAttribute!=S&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=re.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(d,e,t,h,g){var m="nth"!==d.slice(0,3),y="last"!==d.slice(-4),v="of-type"===e;return 1===h&&0===g?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=m!=y?"nextSibling":"previousSibling",c=e.parentNode,f=v&&e.nodeName.toLowerCase(),p=!n&&!v;if(c){if(m){for(;l;){for(o=e;o=o[l];)if(v?o.nodeName.toLowerCase()===f:1===o.nodeType)return!1;u=l="only"===d&&!u&&"nextSibling"}return!0}if(u=[y?c.firstChild:c.lastChild],y&&p){for(s=(r=(i=c[b]||(c[b]={}))[d]||[])[0]===E&&r[1],a=r[0]===E&&r[2],o=s&&c.childNodes[s];o=++s&&o&&o[l]||(a=s=0)||u.pop();)if(1===o.nodeType&&++a&&o===e){i[d]=[E,s,a];break}}else if(p&&(r=(e[b]||(e[b]={}))[d])&&r[0]===E)a=r[1];else for(;(o=++s&&o&&o[l]||(a=s=0)||u.pop())&&((v?o.nodeName.toLowerCase()!==f:1!==o.nodeType)||!++a||(p&&((o[b]||(o[b]={}))[d]=[E,a]),o!==e)););return(a-=g)===h||a%h==0&&0<=a/h}}},PSEUDO:function(e,o){var t,a=T.pseudos[e]||T.setFilters[e.toLowerCase()]||re.error("unsupported pseudo: "+e);return a[b]?a(o):1<a.length?(t=[e,e,"",o],T.setFilters.hasOwnProperty(e.toLowerCase())?te(function(e,t){for(var n,r=a(e,o),i=r.length;i--;)e[n=H.call(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:te(function(e){var r=[],i=[],s=h(e.replace(B,"$1"));return s[b]?te(function(e,t,n,r){for(var i,o=s(e,null,r,[]),a=e.length;a--;)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),!i.pop()}}),has:te(function(t){return function(e){return 0<re(t,e).length}}),contains:te(function(t){return function(e){return-1<(e.textContent||e.innerText||o(e)).indexOf(t)}}),lang:te(function(n){return $.test(n||"")||re.error("unsupported lang: "+n),n=n.replace(Q,K).toLowerCase(),function(e){var t;do{if(t=m?e.getAttribute("xml:lang")||e.getAttribute("lang"):e.lang)return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===i},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if("@"<e.nodeName||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!T.pseudos.empty(e)},header:function(e){return Y.test(e.nodeName)},input:function(e){return V.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:se(function(){return[0]}),last:se(function(e,t){return[t-1]}),eq:se(function(e,t,n){return[n<0?n+t:n]}),even:se(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:se(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:se(function(e,t,n){for(var r=n<0?n+t:n;0<=--r;)e.push(r);return e}),gt:se(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})T.pseudos[t]=oe(t);for(t in{submit:!0,reset:!0})T.pseudos[t]=ae(t);function ue(e,t){var n,r,i,o,a,s,u,l=p[e+" "];if(l)return t?0:l.slice(0);for(a=e,s=[],u=T.preFilter;a;
1){for(o in n&&!(r=P.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=R.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace(B," ")}),a=a.slice(n.length)),T.filter)!(r=I[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?re.error(e):p(e,s).slice(0)}function le(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function ce(s,e,t){var u=e.dir,l=t&&"parentNode"===u,c=f++;return e.first?function(e,t,n){for(;e=e[u];)if(1===e.nodeType||l)return s(e,t,n)}:function(e,t,n){var r,i,o,a=E+" "+c;if(n){for(;e=e[u];)if((1===e.nodeType||l)&&s(e,t,n))return!0}else for(;e=e[u];)if(1===e.nodeType||l)if((i=(o=e[b]||(e[b]={}))[u])&&i[0]===a){if(!0===(r=i[1])||r===w)return!0===r}else if((i=o[u]=[a])[1]=s(e,t,n)||w,!0===i[1])return!0}}function fe(i){return 1<i.length?function(e,t,n){for(var r=i.length;r--;)if(!i[r](e,t,n))return!1;return!0}:i[0]}function pe(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function de(d,h,g,m,y,e){return m&&!m[b]&&(m=de(m)),y&&!y[b]&&(y=de(y,e)),te(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)re(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:pe(c,s,d,n,r),p=g?y||(e?d:l||m)?[]:t:f;if(g&&g(f,p,n,r),m)for(i=pe(p,u),m(i,[],n,r),o=i.length;o--;)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a));if(e){if(y||d){if(y){for(i=[],o=p.length;o--;)(a=p[o])&&i.push(f[o]=a);y(null,p=[],i,r)}for(o=p.length;o--;)(a=p[o])&&-1<(i=y?H.call(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=pe(p===t?p.splice(l,p.length):p),y?y(null,t,p,r):D.apply(t,p)})}function he(e){for(var r,t,n,i=e.length,o=T.relative[e[0].type],a=o||T.relative[" "],s=o?1:0,u=ce(function(e){return e===r},a,!0),l=ce(function(e){return-1<H.call(r,e)},a,!0),c=[function(e,t,n){return!o&&(n||t!==N)||((r=t).nodeType?u(e,t,n):l(e,t,n))}];s<i;s++)if(t=T.relative[e[s].type])c=[ce(fe(c),t)];else{if((t=T.filter[e[s].type].apply(null,e[s].matches))[b]){for(n=++s;n<i&&!T.relative[e[n].type];n++);return de(1<s&&fe(c),1<s&&le(e.slice(0,s-1)).replace(B,"$1"),t,s<n&&he(e.slice(s,n)),n<i&&he(e=e.slice(n)),n<i&&le(e))}c.push(t)}return fe(c)}function ge(){}h=re.compile=function(e,t){var n,r=[],i=[],o=d[e+" "];if(!o){for(t||(t=ue(e)),n=t.length;n--;)(o=he(t[n]))[b]?r.push(o):i.push(o);o=d(e,function(m,y){var v=0,b=0<y.length,x=0<m.length,e=function(e,t,n,r,i){var o,a,s,u=[],l=0,c="0",f=e&&[],p=null!=i,d=N,h=e||x&&T.find.TAG("*",i&&t.parentNode||t),g=E+=null==d?1:Math.random()||.1;for(p&&(N=t!==C&&t,w=v);null!=(o=h[c]);c++){if(x&&o){for(a=0;s=m[a++];)if(s(o,t,n)){r.push(o);break}p&&(E=g,w=++v)}b&&((o=!s&&o)&&l--,e&&f.push(o))}if(l+=c,b&&c!==l){for(a=0;s=y[a++];)s(f,u,t,n);if(e){if(0<l)for(;c--;)f[c]||u[c]||(u[c]=j.call(r));u=pe(u)}D.apply(r,u),p&&!e&&0<u.length&&1<l+y.length&&re.uniqueSort(r)}return p&&(E=g,N=d),f};return b?te(e):e}(i,r))}return o},T.pseudos.nth=T.pseudos.eq,T.filters=ge.prototype=T.pseudos,T.setFilters=new ge,g(),re.attr=me.attr,me.find=re,me.expr=re.selectors,me.expr[":"]=me.expr.pseudos,me.unique=re.uniqueSort,me.text=re.getText,me.isXMLDoc=re.isXML,me.contains=re.contains}(h);var ie=/Until$/,oe=/^(?:parents|prev(?:Until|All))/,ae=/^.[^:#\[\.,]*$/,se=me.expr.match.needsContext,ue={children:!0,contents:!0,next:!0,prev:!0};function le(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function ce(e,n,r){if(n=n||0,me.isFunction(n))return me.grep(e,function(e,t){return!!n.call(e,t,e)===r});if(n.nodeType)return me.grep(e,function(e){return e===n===r});if("string"==typeof n){var t=me.grep(e,function(e){return 1===e.nodeType});if(ae.test(n))return me.filter(n,t,!r);n=me.filter(n,t)}return me.grep(e,function(e){return 0<=me.inArray(e,n)===r})}function fe(e){var t=pe.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}me.fn.extend({find:function(e){var t,n,r,i=this.length;if("string"!=typeof e)return(r=this).pushStack(me(e).filter(function(){for(t=0;t<i;t++)if(me.contains(r[t],this))return!0}));for(n=[],t=0;t<i;t++)me.find(e,this[t],n);return(n=this.pushStack(1<i?me.unique(n):n)).selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=me(e,this),r=n.length;return this.filter(function(){for(t=0;t<r;t++)if(me.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ce(this,e,!1))},filter:function(e){return this.pushStack(ce(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?se.test(e)?0<=me(e,this.context).index(this[0]):0<me.filter(e,this).length:0<this.filter(e).length)},closest:function(e,t){for(var n,r=0,i=this.length,o=[],a=se.test(e)||"string"!=typeof e?me(e,t||this.context):0;r<i;r++)for(n=this[r];n&&n.ownerDocument&&n!==t&&11!==n.nodeType;){if(a?-1<a.index(n):me.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}return this.pushStack(1<o.length?me.unique(o):o)},index:function(e){return e?"string"==typeof e?me.inArray(this[0],me(e)):me.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?me(e,t):me.makeArray(e&&e.nodeType?[e]:e),r=me.merge(this.get(),n);return this.pushStack(me.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),me.fn.andSelf=me.fn.addBack,me.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return me.dir(e,"parentNode")},parentsUntil:function(e,t,n){return me.dir(e,"parentNode",n)},next:function(e){return le(e,"nextSibling")},prev:function(e){return le(e,"previousSibling")},nextAll:function(e){return me.dir(e,"nextSibling")},prevAll:function(e){return me.dir(e,"previousSibling")},nextUntil:function(e,t,n){return me.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return me.dir(e,"previousSibling",n)},siblings:function(e){return me.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return me.sibling(e.firstChild)},contents:function(e){return me.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:me.merge([],e.childNodes)}},function(r,i){me.fn[r]=function(e,t){var n=me.map(this,i,e);return ie.test(r)||(t=e),t&&"string"==typeof t&&(n=me.filter(t,n)),n=1<this.length&&!ue[r]?me.unique(n):n,1<this.length&&oe.test(r)&&(n=n.reverse()),this.pushStack(n)}}),me.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?me.find.matchesSelector(t[0],e)?[t[0]]:[]:me.find.matches(e,t)},dir:function(e,t,n){for(var r=[],i=e[t];i&&9!==i.nodeType&&(n===N||1!==i.nodeType||!me(i).is(n));)1===i.nodeType&&r.push(i),i=i[t];return r},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});var pe="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",de=/ jQuery\d+="(?:null|\d+)"/g,he=new RegExp("<(?:"+pe+")[\\s/>]","i"),ge=/^\s+/,ye=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ve=/<([\w:]+)/,be=/<tbody/i,xe=/<|&#?\w+;/,we=/<(?:script|style|link)/i,Te=/^(?:checkbox|radio)$/i,Ne=/checked\s*(?:[^=]|=\s*.checked.)/i,Ce=/^$|\/(?:java|ecma)script/i,ke=/^true\/(.*)/,Ee=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Se={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>
1"],_default:me.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},Ae=fe(g).appendChild(g.createElement("div"));function je(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function De(e){var t=ke.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Le(e,t){for(var n,r=0;null!=(n=e[r]);r++)me._data(n,"globalEval",!t||me._data(t[r],"globalEval"))}function He(e,t){if(1===t.nodeType&&me.hasData(e)){var n,r,i,o=me._data(e),a=me._data(t,o),s=o.events;if(s)for(n in delete a.handle,a.events={},s)for(r=0,i=s[n].length;r<i;r++)me.event.add(t,n,s[n][r]);a.data&&(a.data=me.extend({},a.data))}}function qe(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!me.support.noCloneEvent&&t[me.expando]){for(r in(i=me._data(t)).events)me.removeEvent(t,r,i.handle);t.removeAttribute(me.expando)}"script"===n&&t.text!==e.text?(je(t).text=e.text,De(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),me.support.html5Clone&&e.innerHTML&&!me.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Te.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}}function Me(e,t){var n,r,i=0,o=typeof e.getElementsByTagName!==y?e.getElementsByTagName(t||"*"):typeof e.querySelectorAll!==y?e.querySelectorAll(t||"*"):N;if(!o)for(o=[],n=e.childNodes||e;null!=(r=n[i]);i++)!t||me.nodeName(r,t)?o.push(r):me.merge(o,Me(r,t));return t===N||t&&me.nodeName(e,t)?me.merge([e],o):o}function _e(e){Te.test(e.type)&&(e.defaultChecked=e.checked)}Se.optgroup=Se.option,Se.tbody=Se.tfoot=Se.colgroup=Se.caption=Se.thead,Se.th=Se.td,me.fn.extend({text:function(e){return me.access(this,function(e){return e===N?me.text(this):this.empty().append((this[0]&&this[0].ownerDocument||g).createTextNode(e))},null,e,arguments.length)},wrapAll:function(t){if(me.isFunction(t))return this.each(function(e){me(this).wrapAll(t.call(this,e))});if(this[0]){var e=me(t,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(n){return me.isFunction(n)?this.each(function(e){me(this).wrapInner(n.call(this,e))}):this.each(function(){var e=me(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=me.isFunction(t);return this.each(function(e){me(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(){return this.parent().each(function(){me.nodeName(this,"body")||me(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,r=0;null!=(n=this[r]);r++)(!e||0<me.filter(e,[n]).length)&&(t||1!==n.nodeType||me.cleanData(Me(n)),n.parentNode&&(t&&me.contains(n.ownerDocument,n)&&Le(Me(n,"script")),n.parentNode.removeChild(n)));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&me.cleanData(Me(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&me.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return me.clone(this,e,t)})},html:function(e){return me.access(this,function(e){var t=this[0]||{},n=0,r=this.length;if(e===N)return 1===t.nodeType?t.innerHTML.replace(de,""):N;
1if("string"==typeof e&&!we.test(e)&&(me.support.htmlSerialize||!he.test(e))&&(me.support.leadingWhitespace||!ge.test(e))&&!Se[(ve.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(ye,"<$1></$2>");try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(me.cleanData(Me(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){return me.isFunction(e)||"string"==typeof e||(e=me(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;n&&(me(this).remove(),n.insertBefore(e,t))})},detach:function(e){return this.remove(e,!0)},domManip:function(n,r,i){n=v.apply([],n);var e,t,o,a,s,u,l,c,f=0,p=this.length,d=this,h=p-1,g=n[0],m=me.isFunction(g);if(m||!(p<=1||"string"!=typeof g||me.support.checkClone)&&Ne.test(g))return this.each(function(e){var t=d.eq(e);m&&(n[0]=g.call(this,e,r?t.html():N)),t.domManip(n,r,i)});if(p&&(e=(u=me.buildFragment(n,this[0].ownerDocument,!1,this)).firstChild,1===u.childNodes.length&&(u=e),e)){for(r=r&&me.nodeName(e,"tr"),o=(a=me.map(Me(u,"script"),je)).length;f<p;
1f++)t=u,f!==h&&(t=me.clone(t,!0,!0),o&&me.merge(a,Me(t,"script"))),i.call(r&&me.nodeName(this[f],"table")?(l=this[f],c="tbody",l.getElementsByTagName(c)[0]||l.appendChild(l.ownerDocument.createElement(c))):this[f],t,f);if(o)for(s=a[a.length-1].ownerDocument,me.map(a,De),f=0;f<o;f++)t=a[f],Ce.test(t.type||"")&&!me._data(t,"globalEval")&&me.contains(s,t)&&(t.src?me.ajax({url:t.src,type:"GET",dataType:"script",async:!1,global:!1,throws:!0}):me.globalEval((t.text||t.textContent||t.innerHTML||"").replace(Ee,"")));u=e=null}return this}}),me.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){me.fn[e]=function(e){for(var t,n=0,r=[],i=me(e),o=i.length-1;n<=o;n++)t=n===o?this:this.clone(!0),me(i[n])[a](t),s.apply(r,t.get());return this.pushStack(r)}}),me.extend({clone:function(e,t,n){var r,i,o,a,s,u=me.contains(e.ownerDocument,e);if(me.support.html5Clone||me.isXMLDoc(e)||!he.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Ae.innerHTML=e.outerHTML,Ae.removeChild(o=Ae.firstChild)),!(me.support.noCloneEvent&&me.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||me.isXMLDoc(e)))for(r=Me(o),s=Me(e),a=0;null!=(i=s[a]);++a)r[a]&&qe(i,r[a]);if(t)if(n)for(s=s||Me(e),r=r||Me(o),a=0;null!=(i=s[a]);a++)He(i,r[a]);else He(e,o);return 0<(r=Me(o,"script")).length&&Le(r,!u&&Me(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){for(var i,o,a,s,u,l,c,f=e.length,p=fe(t),d=[],h=0;h<f;h++)if((o=e[h])||0===o)if("object"===me.type(o))me.merge(d,o.nodeType?[o]:o);else if(xe.test(o)){for(s=s||p.appendChild(t.createElement("div")),u=(ve.exec(o)||["",""])[1].toLowerCase(),c=Se[u]||Se._default,s.innerHTML=c[1]+o.replace(ye,"<$1></$2>")+c[2],i=c[0];i--;)s=s.lastChild;if(!me.support.leadingWhitespace&&ge.test(o)&&d.push(t.createTextNode(ge.exec(o)[0])),!me.support.tbody)for(i=(o="table"!==u||be.test(o)?"<table>"!==c[1]||be.test(o)?0:s:s.firstChild)&&o.childNodes.length;i--;)me.nodeName(l=o.childNodes[i],"tbody")&&!l.childNodes.length&&o.removeChild(l);for(me.merge(d,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=p.lastChild}else d.push(t.createTextNode(o));for(s&&p.removeChild(s),me.support.appendChecked||me.grep(Me(d,"input"),_e),h=0;o=d[h++];)if((!r||-1===me.inArray(o,r))&&(a=me.contains(o.ownerDocument,o),s=Me(p.appendChild(o),"script"),a&&Le(s),n))for(i=0;o=s[i++];)Ce.test(o.type||"")&&n.push(o);return s=null,p},cleanData:function(e,t){for(var n,r,i,o,a=0,s=me.expando,u=me.cache,l=me.support.deleteExpando,c=me.event.special;null!=(n=e[a]);a++)if((t||me.acceptData(n))&&(o=(i=n[s])&&u[i])){if(o.events)for(r in o.events)c[r]?me.event.remove(n,r):me.removeEvent(n,r,o.handle);u[i]&&(delete u[i],l?delete n[s]:typeof n.removeAttribute!==y?n.removeAttribute(s):n[s]=null,f.push(i))}}});var Fe,Oe,Be,Pe=/alpha\([^)]*\)/i,Re=/opacity\s*=\s*([^)]*)/,We=/^(top|right|bottom|left)$/,$e=/^(none|table(?!-c[ea]).+)/,Ie=/^margin/,ze=new RegExp("^("+d+")(.*)$","i"),Xe=new RegExp("^("+d+")(?!px)[a-z%]+$","i"),Ue=new RegExp("^([+-])=("+d+")","i"),Ve={BODY:"block"},Ye={position:"absolute",visibility:"hidden",display:"block"},Je={letterSpacing:0,fontWeight:400},Ge=["Top","Right","Bottom","Left"],Qe=["Webkit","O","Moz","ms"];function Ke(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Qe.length;i--;)if((t=Qe[i]+n)in e)return t;return r}function Ze(e,t){return e=t||e,"none"===me.css(e,"display")||!me.contains(e.ownerDocument,e)}function et(e,t){for(var n,r,i,o=[],a=0,s=e.length;a<s;a++)(r=e[a]).style&&(o[a]=me._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&Ze(r)&&(o[a]=me._data(r,"olddisplay",it(r.nodeName)))):o[a]||(i=Ze(r),(n&&"none"!==n||!i)&&me._data(r,"olddisplay",i?n:me.css(r,"display"))));for(a=0;a<s;a++)(r=e[a]).style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}function tt(e,t,n){var r=ze.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function nt(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;o<4;o+=2)"margin"===n&&(a+=me.css(e,n+Ge[o],!0,i)),r?("content"===n&&(a-=me.css(e,"padding"+Ge[o],!0,i)),"margin"!==n&&(a-=me.css(e,"border"+Ge[o]+"Width",!0,i))):(a+=me.css(e,"padding"+Ge[o],!0,i),"padding"!==n&&(a+=me.css(e,"border"+Ge[o]+"Width",!0,i)));return a}function rt(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Oe(e),a=me.support.boxSizing&&"border-box"===me.css(e,"boxSizing",!1,o);if(i<=0||null==i){if(((i=Be(e,t,o))<0||null==i)&&(i=e.style[t]),Xe.test(i))return i;
1r=a&&(me.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+nt(e,t,n||(a?"border":"content"),r,o)+"px"}function it(e){var t=g,n=Ve[e];return n||("none"!==(n=ot(e,t))&&n||((t=((Fe=(Fe||me("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement))[0].contentWindow||Fe[0].contentDocument).document).write("<!doctype html><html><body>"),t.close(),n=ot(e,t),Fe.detach()),Ve[e]=n),n}function ot(e,t){var n=me(t.createElement(e)).appendTo(t.body),r=me.css(n[0],"display");return n.remove(),r}me.fn.extend({css:function(e,t){return me.access(this,function(e,t,n){var r,i,o={},a=0;if(me.isArray(t)){for(i=Oe(e),r=t.length;a<r;a++)o[t[a]]=me.css(e,t[a],!1,i);return o}return n!==N?me.style(e,t,n):me.css(e,t)},e,t,1<arguments.length)},show:function(){return et(this,!0)},hide:function(){return et(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:Ze(this))?me(this).show():me(this).hide()})}}),me.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Be(e,"o
1pacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:me.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=me.camelCase(t),u=e.style;if(t=me.cssProps[s]||(me.cssProps[s]=Ke(u,s)),a=me.cssHooks[t]||me.cssHooks[s],n===N)return a&&"get"in a&&(i=a.get(e,!1,r))!==N?i:u[t];if(!("string"===(o=typeof n)&&(i=Ue.exec(n))&&(n=(i[1]+1)*i[2]+parseFloat(me.css(e,t)),o="number"),null==n||"number"===o&&isNaN(n)||("number"!==o||me.cssNumber[s]||(n+="px"),me.support.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),a&&"set"in a&&(n=a.set(e,n,r))===N)))try{u[t]=n}catch(e){}}},css:function(e,t,n,r){var i,o,a,s=me.camelCase(t);return t=me.cssProps[s]||(me.cssProps[s]=Ke(e.style,s)),(a=me.cssHooks[t]||me.cssHooks[s])&&"get"in a&&(o=a.get(e,!0,n)),o===N&&(o=Be(e,t,r)),"normal"===o&&t in Je&&(o=Je[t]),""===n||n?(i=parseFloat(o),!0===n||me.isNumeric(i)?i||0:o):o},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];for(o in i=n.apply(e,r||[]),t)e.style[o]=a[o];return i}}),h.getComputedStyle?(Oe=function(e){return h.getComputedStyle(e,null)},Be=function(e,t,n){var r,i,o,a=n||Oe(e),s=a?a.getPropertyValue(t)||a[t]:N,u=e.style;return a&&(""!==s||me.contains(e.ownerDocument,e)||(s=me.style(e,t)),Xe.test(s)&&Ie.test(t)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=s,s=a.width,u.width=r,u.minWidth=i,u.maxWidth=o)),s}):g.documentElement.currentStyle&&(Oe=function(e){return e.currentStyle},Be=function(e,t,n){var r,i,o,a=n||Oe(e),s=a?a[t]:N,u=e.style;return null==s&&u&&u[t]&&(s=u[t]),Xe.test(s)&&!We.test(t)&&(r=u.left,(o=(i=e.runtimeStyle)&&i.left)&&(i.left
1=e.currentStyle.left),u.left="fontSize"===t?"1em":s,s=u.pixelLeft+"px",u.left=r,o&&(i.left=o)),""===s?"auto":s}),me.each(["height","width"],function(e,i){me.cssHooks[i]={get:function(e,t,n){if(t)return 0===e.offsetWidth&&$e.test(me.css(e,"display"))?me.swap(e,Ye,function(){return rt(e,i,n)}):rt(e,i,n)},set:function(e,t,n){var r=n&&Oe(e);return tt(0,t,n?nt(e,i,n,me.support.boxSizing&&"border-box"===me.css(e,"boxSizing",!1,r),r):0)}}}),me.support.opacity||(me.cssHooks.opacity={get:function(e,t){return Re.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=me.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";((n.zoom=1)<=t||""===t)&&""===me.trim(o.replace(Pe,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=Pe.test(o)?o.replace(Pe,i):o+" "+i)}}),me(function(){me.support.reliableMarginRight||(me.cssHooks.marginRight={get:function(e,t){if(t)return me.swap(e,{display:"inline-block"},Be,[e,"marginRight"])}}),!me.support.pixelPosition&&me.fn.position&&me.each(["top","left"],function(e,n){me.cssHooks[n]={get:function(e,t){if(t)return t=Be(e,n),Xe.test(t)?me(e).position()[n]+"px":t}}})}),me.expr&&me.expr.filters&&(me.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0||!me.supp
vendor: 4,282 bytes, line 1
1ort.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||me.css(e,"display"))},me.expr.filters.visible=function(e){return!me.expr.filters.hidden(e)}),me.each({margin:"",padding:"",border:"Width"},function(i,o){me.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+Ge[t]+o]=r[t]||r[t-2]||r[0];return n}},Ie.test(i)||(me.cssHooks[i+o].set=tt)});var at=/%20/g,st=/\[\]$/,ut=/\r?\n/g,lt=/^(?:submit|button|image|reset|file)$/i,ct=/^(?:input|select|textarea|keygen)/i;function ft(n,e,r,i){var t;if(me.isArray(e))me.each(e,function(e,t){r||st.test(n)?i(n,t):ft(n+"["+("object"==typeof t?e:"")+"]",t,r,i)});else if(r||"object"!==me.type(e))i(n,e);else for(t in e)ft(n+"["+t+"]",e[t],r,i)}me.fn.extend({serialize:function(){return me.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=me.prop(this,"elements");return e?me.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!me(this).is(":disabled")&&ct.test(this.nodeName)&&!lt.test(e)&&(this.checked||!Te.test(e))}).map(function(e,t){var n=me(this).val();return null==n?null:me.isArray(n)?me.map(n,function(e){return{name:t.name,value:e.replace(ut,"\r\n")}}):{name:t.name,value:n.replace(ut,"\r\n")}}).get()}}),me.param=function(e,t){var n,r=[],i=function(e,t){t=me.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(t===N&&(t=me.ajaxSettings&&me.ajaxSettings.traditional),me.isArray(e)||e.jquery&&!me.isPlainObject(e))me.each(e,function(){i(this.name,this.value)});else for(n in e)ft(n,e[n],t,i);return r.join("&").replace(at,"+")},me.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(e,n){me.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}}),me.fn.hover=function(e,t){return this.mouseenter(e).mouseleave(t||e)};var pt,dt,ht=me.now(),gt=/\?/,mt=/#.*$/,yt=/([?&])_=[^&]*/,vt=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,bt=/^(?:GET|HEAD)$/,xt=/^\/\//,wt=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Tt=me.fn.load,Nt={},Ct={},kt="*/".concat("*");try{dt=e.href}catch(e){(dt=g.createElement("a")).href="",dt=dt.href}function Et(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(C)||[];if(me.isFunction(t))for(;n=i[r++];)"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function St(t,i,o,a){var s={},u=t===Ct;function l(e){var r;return s[e]=!0,me.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function At(e,t){var n,r,i=me.ajaxSettings.flatOptions||{};for(r in t)t[r]!==N&&((i[r]?e:n||(n={}))[r]=t[r]);return n&&me.extend(!0,e,n),e}pt=wt.exec(dt.toLowerCase())||[],me.fn.load=function(e,t,n){if("string"!=typeof e&&Tt)return Tt.apply(this,arguments);var r,i,o,a=this,s=e.indexOf(" ");return 0<=s&&(r=e.slice(s,e.length),e=e.slice(0,s)),me.isFunction(t)?(n=t,t=N):t&&"object"==typeof t&&(o="POST"),0<a.length&&me.ajax({url:e,type:o,dataType:"html",data:t}).done(function(e){i=arguments,a.html(r?me("<div>").append(me.parseHTML(e)).find(r):e)}).complete(n&&function(e,t){a.each(n,i||[e.responseText,t,e])}),this},me.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){me.fn[t]=function(e){return this.on(t,e)}}),me.each(["get","post"],function(e,i){me[i]=function(e,t,n,r){return me.isFunction(t)&&(r=r||n,n=t,t=N),me.ajax({url:e,type:i,dataType:r,data:t,success:n})}}),me.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:dt,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(pt[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":kt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":h.String,"text html":!0,"text json":me.parseJSON,"text xml":me.parseXML}
1,flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?At(At(e,me.ajaxSettings),t):At(me.ajaxSettings,e)},ajaxPrefilter:Et(Nt),ajaxTransport:Et(Ct),ajax:function(e,t){"object"==typeof e&&(t=e,e=N),t=t||{};var n,r,c,f,p,d,h,i,g=me.ajaxSetup({},t),m=g.context||g,y=g.context&&(m.nodeType||m.jquery)?me(m):me.event,v=me.Deferred(),b=me.Callbacks("once memory"),x=g.statusCode||{},o={},a={},w=0,s="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===w){if(!i)for(i={};t=vt.exec(f);)i[t[1].toLowerCase()]=t[2];t=i[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===w?f:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return w||(e=a[n]=a[n]||e,o[e]=t),this},overrideMimeType:function(e){return w||(g.mimeType=e),this},statusCode:function(e){var t;if(e)if(w<2)for(t in e)x[t]=[x[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||s;return h&&h.abort(t),u(0,t),this}};if(v.promise(T).complete=b.add,T.success=T.done,T.error=T.fail,g.url=((e||g.url||dt)+"").replace(mt,"").replace(xt,pt[1]+"//"),g.type=t.method||t.type||g.method||g.type,g.dataTypes=me.trim(g.dataType||"*").toLowerCase().match(C)||[""],null==g.crossDomain&&(n=wt.exec(g.url.toLowerCase()),g.crossDomain=!(!n||n[1]===pt[1]&&n[2]===pt[2]&&(n[3]||("http:"===n[1]?80:443))==(pt[3]||("http:"===pt[1]?80:443)))),g.data&&g.processData&&"string"!=typeof g.data&&(g.data=me.param(g.data,g.traditional)),St(Nt,g,t,T),2===w)return T;for(r in(d=g.global)&&0==me.active++&&me.event.trigger("ajaxStart"),g.type=g.type.toUpperCase(),g.hasContent=!bt.test(g.type),c=g.url,g.hasContent||(g.data&&(c=g.url+=(gt.test(c)?"&":"?")+g.data,delete g.data),!1===g.cache&&(g.url=yt.test(c)?c.replace(yt,"$1_="+ht++):c+(gt.test(c)?"&":"?")+"_="+ht++)),g.ifModified&&(me.lastModified[c]&&T.setRequestHeader("If-Modified-Since",me.lastModified[c]),me.etag[c]&&T.setRequestHeader("If-None-Match",me.etag[c])),(g.data&&g.hasContent&&!1!==g.contentType||t.contentType)&&T.setRequestHeader("Content-Type",g.contentType),T.setRequestHeader("Accept",g.dataTypes[0]&&g.accepts[g.dataTypes[0]]?g.accepts[g.dataTypes[0]]+("*"!==g.dataTypes[0]?", "+kt+"; q=0.01":""):g.accepts["*"]),g.headers)T.setRequestHeader(r,g.headers[r]);if(g.beforeSend&&(!1===g.beforeSend.call(m,T,g)||2===w))return T.abort();for(r in s="abort",{success:1,error:1,complete:1})T[r](g[r]);if(h=St(Ct,g,t,T)){T.readyState=1,d&&y.trigger("ajaxSend",[T,g]),g.async&&0<g.timeout&&(p=setTimeout(function(){T.abort("timeout")},g.timeout));try{w=1,h.send(o,u)}catch(e){if(!(w<2))throw e;u(-1,e)}}else u(-1,"No Transport");function u(e,t,n,r){var i,o,a,s,u,l=t;2!==w&&(w=2,p&&clearTimeout(p),h=N,f=r||"",T.readyState=0<e?4:0,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes,l=e.responseFields;for(a in l)a in n&&(t[l[a]]=n[a]);for(;"*"===u[0];)u.shift(),i===N&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(a in s)if(s[a]&&s[a].test(i)){u.unshift(a);break}if(u[0]in n)o=u[0];else{for(a in n){if(!u[0]||e.converters[a+" "+u[0]]){o=a;break}r||(r=a)}o=o||r}if(o)return o!==u[0]&&u.unshift(o),n[o]}(g,T,n)),200<=e&&e<300||304===e?(g.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(me.lastModified[c]=u),(u=T.getResponseHeader("etag"))&&(me.etag[c]=u)),204===e?(i=!0,l="nocontent"):304===e?(i=!0,l="notmodified"):(l=(i=function(e,t){var n,r,i,o,a={},s=0,u=e.dataTypes.slice(),l=u[0];e.dataFilter&&(t=e.dataFilter(t,e.dataType));if(u[1])for(i in e.converters)a[i.toLowerCase()]=e.converters[i];for(;r=u[++s];)if("*"!==r){if("*"!==l&&l!==r){if(!(i=a[l+" "+r]||a["* "+r]))for(n in a)if((o=n.split(" "))[1]===r&&(i=a[l+" "+o[0]]||a["* "+o[0]])){!0===i?i=a[n]:!0!==a[n]&&(r=o[0],u.splice(s--,0,r));break}if(!0!==i)if(i&&e.throws)t=i(t);else try{t=i(t)}catch(e){return{state:"parsererror",error:i?e:"No conversion from "+l+" to "+r}}}l=r}return{state:"success",data:t}}(g,s)).state,o=i.data,i=!(a=i.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?v.resolveWith(m,[o,l,T]):v.rejectWith(m,[T,l,a]),T.statusCode(x),x=N,d&&y.trigger(i?"ajaxSuccess":"ajaxError",[T,g,i?o:a]),b.fireWith(m,[T,l]),d&&(y.trigger("ajaxComplete",[T,g]),--me.active||me.event.trigger("ajaxStop")))}return T},getScript:function(e,t){return me.get(e,N,t,"script")},getJSON:function(e,t,n){return me.get(e,t,n,"json")}}),me.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return me.globalEval(e),e}}}
1),me.ajaxPrefilter("script",function(e){e.cache===N&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),me.ajaxTransport("script",function(t){if(t.crossDomain){var r,i=g.head||me("head")[0]||g.documentElement;return{send:function(e,n){(r=g.createElement("script")).async=!0,t.scriptCharset&&(r.charset=t.scriptCharset),r.src=t.url,r.onload=r.onreadystatechange=function(e,t){(t||!r.readyState||/loaded|complete/.test(r.readyState))&&(r.onload=r.onreadystatechange=null,r.parentNode&&r.parentNode.removeChild(r),r=null,t||n(200,"success"))},i.insertBefore(r,i.firstChild)},abort:function(){r&&r.onload(N,!0)}}}});var jt=[],Dt=/(=)\?(?=&|$)|\?\?/;me.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=jt.pop()||me.expando+"_"+ht++;return this[e]=!0,e}}),me.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Dt.test(e.url)?"url":"string"==typeof e.data&&!(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Dt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=me.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Dt,"$1"+r):!1!==e.jsonp&&(e.url+=(gt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||me.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=h[r],h[r]=function(){o=arguments},n.always(function(){h[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,jt.push(r)),o&&me.isFunction(i)&&i(o[0]),o=i=N}),"script"});var Lt,Ht,qt=0,Mt=h.ActiveXObject&&function(){var e;for(e in Lt)Lt[e](N,!0)};function _t(){try{return new h.XMLHttpRequest}catch(e){}}me.ajaxSettings.xhr=h.ActiveXObject?function(){return!this.isLocal&&_t()||function(){try{return new h.ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}()}:_t,Ht=me.ajaxSettings.xhr(),me.support.cors=!!Ht&&"withCredentials"in Ht,(Ht=me.support.ajax=!!Ht)&&me.ajaxTransport(function(l){var c;if(!l.crossDomain||me.support.cors)return{send:function(e,a){var s,t,u=l.xhr();if(l.username?u.open(l.type,l.url,l.async,l.username,l.password):u.open(l.type,l.url,l.async),l.xhrFields)for(t in l.xhrFields)u[t]=l.xhrFields[t];l.mimeType&&u.overrideMimeType&&u.overrideMimeType(l.mimeType),l.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");try{for(t in e)u.setRequestHeader(t,e[t])}catch(e){}u.send(l.hasContent&&l.data||null),c=function(e,t){var n,r,i,o;try{if(c&&(t||4===u.readyState))if(c=N,s&&(u.onreadystatechange=me.noop,Mt&&delete Lt[s]),t)4!==u.readyState&&u.abort();else{o={},n=u.status,r=u.getAllResponseHeaders(),"string"==typeof u.responseText&&(o.text=u.responseText);try{i=u.statusText}catch(e){i=""}n||!l.isLocal||l.crossDomain?1223===n&&(n=204):n=o.text?200:404}}catch(e){t||a(-1,e)}o&&a(n,i,o,r)},l.async?4===u.readyState?setTimeout(c):(s=++qt,Mt&&(Lt||(Lt={},me(h).unload(Mt)),Lt[s]=c),u.onreadystatechange=c):c()},abort:function(){c&&c(N,!0)}}});var Ft,Ot,Bt=/^(?:toggle|show|hide)$/,Pt=new RegExp("^(?:([+-])=|)("+d+")([a-z%]*)$","i"),Rt=/queueHooks$/,Wt=[function(t,e,n){var r,i,o,a,s,u,l,c,f,p=this,d=t.style,h={},g=[],m=t.nodeType&&Ze(t);n.queue||(null==(c=me._queueHooks(t,"fx")).unqueued&&(c.unqueued=0,f=c.empty.fire,c.empty.fire=function(){c.unqueued||f()}),c.unqueued++,p.always(function(){p.always(function(){c.unqueued--,me.queue(t,"fx").length||c.empty.fire()})}));1===t.nodeType&&("height"in e||"width"in e)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===me.css(t,"display")&&"none"===me.css(t,"float")&&(me.supp
1ort.inlineBlockNeedsLayout&&"inline"!==it(t.nodeName)?d.zoom=1:d.display="inline-block"));n.overflow&&(d.overflow="hidden",me.support.shrinkWrapBlocks||p.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(i in e)if(a=e[i],Bt.exec(a)){if(delete e[i],u=u||"toggle"===a,a===(m?"hide":"show"))continue;g.push(i)}if(o=g.length){"hidden"in(s=me._data(t,"fxshow")||me._data(t,"fxshow",{}))&&(m=s.hidden),u&&(s.hidden=!m),m?me(t).show():p.done(function(){me(t).hide()}),p.done(function(){var e;for(e in me._removeData(t,"fxshow"),h)me.style(t,e,h[e])});for(i=0;i<o;i++)r=g[i],l=p.createTween(r,m?s[r]:0),h[r]=s[r]||me.style(t,r),r in s||(s[r]=l.start,m&&(l.end=l.start,l.start="width"===r||"height"===r?1:0))}}],$t={"*":[function(e,t){var n,r,i=this.createTween(e,t),o=Pt.exec(t),a=i.cur(),s=+a||0,u=1,l=20;if(o){if(n=+o[2],"px"!==(r=o[3]||(me.cssNumber[e]?"":"px"))&&s)for(s=me.css(i.elem,e,!0)||n||1;s/=u=u||".5",me.style(i.elem,e,s+r),u!==(u=i.cur()/a)&&1!==u&&--l;);i.unit=r,i.start=s,i.end=o[1]?s+(o[1]+1)*n:n}return i}]};function It(){return setTimeout(function(){Ft=N}),Ft=me.now()}function zt(o,e,t){var n,a,r=0,i=Wt.length,s=me.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=Ft||It(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:me.extend({},e),opts:me.extend(!0,{specialEasing:{}},t),originalProperties:e,originalOptions:t,startTime:Ft||It(),duration:t.duration,tweens:[],createTween:function(e,t){var n=me.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?s.resolveWith(o,[l,e]):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(i in e)if(r=me.camelCase(i),o=t[r],n=e[i],me.isArray(n)&&(o=n[1],n=e[i]=n[0]),i!==r&&(e[r]=n,delete e[i]),(a=me.cssHooks[r])&&"expand"in a)for(i in n=a.expand(n),delete e[r],n)i in e||(e[i]=n[i],t[i]=o);else t[r]=o}(c,l.opts.specialEasing);r<i;r++)if(n=Wt[r].call(l,o,c,l.opts))return n;return function(o,e){me.each(e,function(e,t){for(var n=($t[e]||[]).concat($t["*"]),r=0,i=n.length;r<i;r++)if(n[r].call(o,e,t))return})}(l,c),me.isFunction(l.opts.start)&&l.opts.start.call(o,l),me.fx.timer(me.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function Xt(e,t,n,r,i){return new Xt.prototype.init(e,t,n,r,i)}function Ut(e,t){var n,r={height:e},i=0;for(t=t?1:0;i<4;i+=2-t)r["margin"+(n=Ge[i])]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function Vt(e){return me.isWindow(e)?e:9===e.nodeType&&(e.defaultView||e.parentWindow)}me.Animation=me.extend(zt,{tweener:function(e,t){for(var n,r=0,i=(e=me.isFunction(e)?(t=e,["*"]):e.split(" ")).length;r<i;r++)n=e[r],$t[n]=$t[n]||[],$t[n].unshift(t)},prefilter:function(e,t){t?Wt.unshift(e):Wt.push(e)}}),((me.Tween=Xt).prototype={constructor:Xt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(me.cssNumber[n]?"":"px")},cur:function(){var e=Xt.propHooks[this.prop];return e&&e.get?e.get(this):Xt.propHooks._default.get(this)},run:function(e){var t,n=Xt.propHooks[this.prop];return this.options.duration?this.pos=t=me.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Xt.propHooks._default.set(this),this}}).init.prototype=Xt.prototype,(Xt.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=me.css(e.elem,e.prop,""))&&"auto"!==t?t:0:e.elem[e.prop]},set:function(e){me.fx.step[e.prop]?me.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[me.cssProps[e.prop]]||me.cssHooks[e.prop])?me.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}}).scrollTop=Xt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},me.each(["toggle","show","hide"],function(e,r){var i=me.fn[r];me.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(Ut(r,!0),e,t,n)}}),me.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Ze).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=me.isEmptyObject(t),o=me.speed(e,n,r),a=function(){var e=zt(this,me.extend({},t),o);a.finish=function(){e.stop(!0)},(i||me._data(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=N),e&&!1!==i&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=me.timers,r=me._data(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&Rt.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1)
1);!e&&o||me.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=me._data(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=me.timers,o=n?n.length:0;for(t.finish=!0,me.queue(this,a,[]),r&&r.cur&&r.cur.finish&&r.cur.finish.call(this),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),me.each({slideDown:Ut("show"),slideUp:Ut("hide"),slideToggle:Ut("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){me.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),me.speed=function(e,t,n){var r=e&&"object"==typeof e?me.extend({},e):{complete:n||!n&&t||me.isFunction(e)&&e,duration:e,easing:n&&t||t&&!me.isFunction(t)&&t};return r.duration=me.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in me.fx.speeds?me.fx.speeds[r.duration]:me.fx.speeds._default,null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){me.isFunction(r.old)&&r.old.call(this),r.queue&&me.dequeue(this,r.queue)},r},me.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},me.timers=[],me.fx=Xt.prototype.init,me.fx.tick=function(){var e,t=me.timers,n=0;for(Ft=me.now();n<t.length;n++)(e=t[n])()||t[n]!==e||t.splice(n--,1);t.length||me.fx.stop(),Ft=N},me.fx.timer=function(e){e()&&me.timers.push(e)&&me.fx.start()},me.fx.interval=13,me.fx.start=function(){Ot||(Ot=setInterval(me.fx.tick,me.fx.interval))},me.fx.stop=function(){clearInterval(Ot),Ot=null},me.fx.speeds={slow:600,fast:200,_default:400},me.fx.step={},me.expr&&me.expr.filters&&(me.expr.filters.animated=function(t){return me.grep(me.timers,function(e){return t===e.elem}).length}),me.fn.offset=function(t){if(arguments.length)return t===N?this:this.each(function(e){me.offset.setOffset(this,t,e)});var e,n,r={top:0,left:0},i=this[0],o=i&&i.ownerDocument;return o?(e=o.documentElement,me.contains(e,i)?(typeof i.getBoundingClientRect!==y&&(r=i.getBoundingClientRect()),n=Vt(o),{top:r.top+(n.pageYOffset||e.scrollTop)-(e.clientTop||0),left:r.left+(n.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}):r):void 0},me.offset={setOffset:function(e,t,n){var r=me.css(e,"position");"static"===r&&(e.style.position="relative");var i,o,a=me(e),s=a.offset(),u=me.css(e,"top"),l=me.css(e,"left"),c={},f={};o=("absolute"===r||"fixed"===r)&&-1<me.inArray("auto",[u,l])?(i=(f=a.position()).top,f.left):(i=parseFloat(u)||0,parseFloat(l)||0),me.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(c.top=t.top-s.top+i),null!=t.left&&(c.left=t.left-s.left+o),"using"in t?t.using.call(e,c):a.css(c)}},me.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===me.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),me.nodeName(e[0],"html")||(n=e.offset()),n.top+=me.css(e[0],"borderTopWidth",!0),n.left+=me.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-me.css(r,"marginTop",!0),left:t.left-n.left-me.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||g.documentElement;e&&!me.nodeName(e,"html")&&"static"===me.css(e,"position");)e=e.offsetParent;return e||g.documentElement})}}),me.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o=/Y/.test(i);me.fn[t]=function(e){return me.access(this,function(e,t,n){var r=Vt(e);if(n===N)return r?i in r?r[i]:r.document.documentElement[t]:e[t];r?r.scrollTo(o?me(r).scrollLeft():n,o?n:me(r).scrollTop()):e[t]=n},t,e,arguments.length,null)}}),me.each({Height:"height",Width:"width"},function(o,a){me.each({padding:"inner"+o,content:a,"":"outer"+o},function(r,e){me.fn[e]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return me.access(this,function(e,t,n){var r;return me.isWindow(e)?e.document.documentElement["client"+o]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+o],r["scroll"+o],e.body["offset"+o],r["offset"+o],r["client"+o])):n===N?me.css(e,t,i):me.style(e,t,n,i)},a,n?e:N,n,null)}})}),h.jQuery=h.$=me,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return me})}(window); 2!function(r,h){var t,e,i=0,s=/^ui-id-\d+$/;function n(t,e){var i,s,n,o=t.nodeName.toLowerCase();return"area"===o?(s=(i=t.parentNode).name,!(!t.href||!s||"map"!==i.nodeName.toLowerCase())&&(!!(n=r("img[usemap=#"+s+"]")[0])&&a(n))):(/input|select|textarea|button|object/.test(o)?!t.disabled:"a"===o&&t.href||e)&&a(t)}function a(t){return r.expr.filters.visible(t)&&!r(t).parents().addBack().filter(function(){return"hidden"===r.css(this,"visibility")}).length}r.ui=r.ui||{},r.extend(r.ui,{version:"1.10.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),r.fn.extend({focus:(t=r.fn.focus,function(e,i){return"number"==typeof e?this.each(function(){var t=this;setTimeout(function(){r(t).focus(),i&&i.call(t)},e)}):t.apply(this,arguments)}),scrollParent:function(){var t;return t=r.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(r.css(this,"position"))&&/(auto|scroll)/.test(r.css(this,"overflow")+r.css(this,"overflow-y")+r.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(r.css(this,"overflow")+r.css(this,"overflow-y")+r.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?r(document):t},zIndex:function(t){if(t!==h)return this.css("zIndex",t);if(this.length)for(var e,i,s=r(this[0]);s.length&&s[0]!==document;){if(("absolute"===(e=s.css("position"))||"relative"===e||"fixed"===e)&&(i=parseInt(s.css("zIndex"),10),!isNaN(i)&&0!==i))return i;s=s.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++i)})},removeUniqueId:function(){return this.each(function(){s.test(this.id
vendor: 5,812 bytes, line 2
2)&&r(this).removeAttr("id")})}}),r.extend(r.expr[":"],{data:r.expr.createPseudo?r.expr.createPseudo(function(e){return function(t){return!!r.data(t,e)}}):function(t,e,i){return!!r.data(t,i[3])},focusable:function(t){return n(t,!isNaN(r.attr(t,"tabindex")))},tabbable:function(t){var e=r.attr(t,"tabindex"),i=isNaN(e);return(i||0<=e)&&n(t,!i)}}),r("<a>").outerWidth(1).jquery||r.each(["Width","Height"],function(t,i){var n="Width"===i?["Left","Right"]:["Top","Bottom"],s=i.toLowerCase(),o={innerWidth:r.fn.innerWidth,innerHeight:r.fn.innerHeight,outerWidth:r.fn.outerWidth,outerHeight:r.fn.outerHeight};function a(t,e,i,s){return r.each(n,function(){e-=parseFloat(r.css(t,"padding"+this))||0,i&&(e-=parseFloat(r.css(t,"border"+this+"Width"))||0),s&&(e-=parseFloat(r.css(t,"margin"+this))||0)}),e}r.fn["inner"+i]=function(t){return t===h?o["inner"+i].call(this):this.each(function(){r(this).css(s,a(this,t)+"px")})},r.fn["outer"+i]=function(t,e){return"number"!=typeof t?o["outer"+i].call(this,t):this.each(function(){r(this).css(s,a(this,t,!0,e)+"px")})}}),r.fn.addBack||(r.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),r("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(r.fn.removeData=(e=r.fn.removeData,function(t){return arguments.length?e.call(this,r.camelCase(t)):e.call(this)})),r.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),r.support.selectstart="onselectstart"in document.createElement("div"),r.fn.extend({disableSelection:function(){return this.bind((r.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(t){t.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),r.extend(r.ui,{plugin:{add:function(t,e,i){var s,n=r.ui[t].prototype;for(s in i)n.plugins[s]=n.plugins[s]||[],n.plugins[s].push([e,i[s]])},call:function(t,e,i){var s,n=t.plugins[e];if(n&&t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType)for(s=0;s<n.length;s++)t.options[n[s][0]]&&n[s][1].apply(t.element,i)}},hasScroll:function(t,e){if("hidden"===r(t).css("overflow"))return!1;var i,s=e&&"left"===e?"scrollLeft":"scrollTop";return 0<t[s]||(t[s]=1,i=0<t[s],t[s]=0,i)}})}(jQuery),function(c,r){var i=0,h=Array.prototype.slice,s=c.cleanData;c.cleanData=function(t){for(var e,i=0;null!=(e=t[i]);i++)try{c(e).triggerHandler("remove")}catch(t){}s(t)},c.widget=function(t,i,e){var s,n,o,a,r={},h=t.split(".")[0];t=t.split(".")[1],s=h+"-"+t,e||(e=i,i=c.Widget),c.expr[":"][s.toLowerCase()]=function(t){return!!c.data(t,s)},c[h]=c[h]||{},n=c[h][t],o=c[h][t]=function(t,e){if(!this._createWidget)return new o(t,e);arguments.length&&this._createWidget(t,e)},c.extend(o,n,{version:e.version,_proto:c.extend({},e),_childConstructors:[]}),(a=new i).options=c.widget.extend({},a.options),c.each(e,function(e,s){var n,o;c.isFunction(s)?r[e]=(n=function(){return i.prototype[e].apply(this,arguments)},o=function(t){return i.prototype[e].apply(this,t)},function(){var t,e=this._super,i=this._superApply;return this._super=n,this._superApply=o,t=s.apply(this,arguments),this._super=e,this._superApply=i,t}):r[e]=s}),o.prototype=c.widget.extend(a,{widgetEventPrefix:n?a.widgetEventPrefix:t},r,{constructor:o,namespace:h,widgetName:t,widgetFullName:s}),n?(c.each(n._childConstructors,function(t,e){var i=e.prototype;c.widget(i.namespace+"."+i.widgetName,o,e._proto)}),delete n._childConstructors):i._childConstructors.push(o),c.widget.bridge(t,o)},c.widget.extend=function(t){for(var e,i,s=h.call(arguments,1),n=0,o=s.length;n<o;n++)for(e in s[n])i=s[n][e],s[n].hasOwnProperty(e)&&i!==r&&(c.isPlainObject(i)?t[e]=c.isPlainObject(t[e])?c.widget.extend({},t[e],i):c.widget.extend({},i):t[e]=i);return t},c.widget.bridge=function(o,e){var a=e.prototype.widgetFullName||o;c.fn[o]=function(i){var t="string"==typeof i,s=h.call(arguments,1),n=this;return i=!t&&s.length?c.widget.extend.apply(null,[i].concat(s)):i,t?this.each(function(){var t,e=c.data(this,a);return e?c.isFunction(e[i])&&"_"!==i.charAt(0)?(t=e[i].apply(e,s))!==e&&t!==r?(n=t&&t.jquery?n.pushStack(t.get()):t,!1):void 0:c.error("no such method '"+i+"' for "+o+" widget instance"):c.error("cannot call methods on "+o+" prior to initialization; attempted to call method '"+i+"'")}):this.each(function(){var t=c.data(this,a);t?t.option(i||{})._init():c.data(this,a,new e(i,this))}),n}},c.Widget=function(){},c.Widget._childConstructors=[],c.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,e){e=c(e||this.defaultElement||this)[0],this.element=c(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=c.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=c(),this.hoverable=c(),this.focusable=c(),e!==this&&(c.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=c(e.style?e.ownerDocument:e.document||e),this.window=c(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:c.noop,_getCreateEventData:c.noop,_create:c.noop,_init:c.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(c.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:c.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return c.widget.extend({},this.options);
vendor: 5,434 bytes, line 2
2if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=c.widget.extend({},this.options[t]),n=0;n<i.length-1;n++)s[i[n]]=s[i[n]]||{},s=s[i[n]];if(t=i.pop(),e===r)return s[t]===r?null:s[t];s[t]=e}else{if(e===r)return this.options[t]===r?null:this.options[t];o[t]=e}return this._setOptions(o),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!e).attr("aria-disabled",e),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(a,r,t){var h,l=this;"boolean"!=typeof a&&(t=r,r=a,a=!1),t?(r=h=c(r),this.bindings=this.bindings.add(r)):(t=r,r=this.element,h=this.widget()),c.each(t,function(t,e){function i(){if(a||!0!==l.options.disabled&&!c(this).hasClass("ui-state-disabled"))return("string"==typeof e?l[e]:e).apply(l,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||c.guid++);var s=t.match(/^(\w+)\s*(.*)$/),n=s[1]+l.eventNamespace,o=s[2];o?h.delegate(o,n,i):r.bind(n,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){c(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){c(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){c(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){c(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,e,i){var s,n,o=this.options[t];if(i=i||{},(e=c.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],n=e.originalEvent)for(s in n)s in e||(e[s]=n[s]);return this.element.trigger(e,i),!(c.isFunction(o)&&!1===o.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},c.each({show:"fadeIn",hide:"fadeOut"},function(o,a){c.Widget.prototype["_"+o]=function(e,t,i){"string"==typeof t&&(t={effect:t});var s,n=t?!0===t||"number"==typeof t?a:t.effect||a:o;"number"==typeof(t=t||{})&&(t={duration:t}),s=!c.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),s&&c.effects&&c.effects.effect[n]?e[o](t):n!==o&&e[n]?e[n](t.duration,t.easing,i):e.queue(function(t){c(this)[o](),i&&i.call(e[0]),t()})}})}(jQuery),function(n,t){var o=!1;n(document).mouseup(function(){o=!1}),n.widget("ui.mouse",{version:"1.10.3",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(t){if(!0===n.data(t.target,e.widgetName+".preventClickEvent"))return n.removeData(t.target,e.widgetName+".preventClickEvent"),t.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&n(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!o){this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var e=this,i=1===t.which,s=!("string"!=typeof this.options.cancel||!t.target.nodeName)&&n(t.target).closest(this.options.cancel).length;return!(i&&!s&&this._mouseCapture(t))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(t),!this._mouseStarted)?(t.preventDefault(),!0):(!0===n.data(t.target,this.widgetName+".preventClickEvent")&&n.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return e._mouseMove(t)},this._mouseUpDelegate=function(t){return e._mouseUp(t)},n(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),o=!0))}},_mouseMove:function(t){return n.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button?this._mouseUp(t):this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return n(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&n.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(jQuery),function(k,t){k.ui=k.ui||{};
vendor: 4,518 bytes, line 2
2var n,x=Math.max,D=Math.abs,C=Math.round,s=/left|center|right/,o=/top|center|bottom/,a=/[\+\-]\d+(\.[\d]+)?%?/,r=/^\w+/,h=/%$/,e=k.fn.position;function I(t,e,i){return[parseFloat(t[0])*(h.test(t[0])?e/100:1),parseFloat(t[1])*(h.test(t[1])?i/100:1)]}function P(t,e){return parseInt(k.css(t,e),10)||0}k.position={scrollbarWidth:function(){if(void 0!==n)return n;var t,e,i=k("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),s=i.children()[0];return k("body").append(i),t=s.offsetWidth,i.css("overflow","scroll"),t===(e=s.offsetWidth)&&(e=i[0].clientWidth),i.remove(),n=t-e},getScrollInfo:function(t){var e=t.isWindow?"":t.element.css("overflow-x"),i=t.isWindow?"":t.element.css("overflow-y"),s="scroll"===e||"auto"===e&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?k.position.scrollbarWidth():0,height:s?k.position.scrollbarWidth():0}},getWithinInfo:function(t){var e=k(t||window),i=k.isWindow(e[0]);return{element:e,isWindow:i,offset:e.offset()||{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:i?e.width():e.outerWidth(),height:i?e.height():e.outerHeight()}}},k.fn.position=function(u){if(!u||!u.of)return e.apply(this,arguments);u=k.extend({},u);var d,p,f,g,m,t,v=k(u.of),_=k.position.getWithinInfo(u.within),b=k.position.getScrollInfo(_),y=(u.collision||"flip").split(" "),w={};return t=function(t){var e=t[0];return 9===e.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:k.isWindow(e)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:e.preventDefault?{width:0,height:0,offset:{top:e.pageY,left:e.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}(v),v[0].preventDefault&&(u.at="left top"),p=t.width,f=t.height,g=t.offset,m=k.extend({},g),k.each(["my","at"],function(){var t,e,i=(u[this]||"").split(" ");1===i.length&&(i=s.test(i[0])?i.concat(["center"]):o.test(i[0])?["center"].concat(i):["center","center"]),i[0]=s.test(i[0])?i[0]:"center",i[1]=o.test(i[1])?i[1]:"center",t=a.exec(i[0]),e=a.exec(i[1]),w[this]=[t?t[0]:0,e?e[0]:0],u[this]=[r.exec(i[0])[0],r.exec(i[1])[0]]}),1===y.length&&(y[1]=y[0]),"right"===u.at[0]?m.left+=p:"center"===u.at[0]&&(m.left+=p/2),"bottom"===u.at[1]?m.top+=f:"center"===u.at[1]&&(m.top+=f/2),d=I(w.at,p,f),m.left+=d[0],m.top+=d[1],this.each(function(){var i,t,a=k(this),r=a.outerWidth(),h=a.outerHeight(),e=P(this,"marginLeft"),s=P(this,"marginTop"),n=r+e+P(this,"marginRight")+b.width,o=h+s+P(this,"marginBottom")+b.height,l=k.extend({},m),c=I(w.my,a.outerWidth(),a.outerHeight());"right"===u.my[0]?l.left-=r:"center"===u.my[0]&&(l.left-=r/2),"bottom"===u.my[1]?l.top-=h:"center"===u.my[1]&&(l.top-=h/2),l.left+=c[0],l.top+=c[1],k.support.offsetFractions||(l.left=C(l.left),l.top=C(l.top)),i={marginLeft:e,marginTop:s},k.each(["left","top"],function(t,e){k.ui.position[y[t]]&&k.ui.position[y[t]][e](l,{targetWidth:p,targetHeight:f,elemWidth:r,elemHeight:h,collisionPosition:i,collisionWidth:n,collisionHeight:o,offset:[d[0]+c[0],d[1]+c[1]],my:u.my,at:u.at,within:_,elem:a})}),u.using&&(t=function(t){var e=g.left-l.left,i=e+p-r,s=g.top-l.top,n=s+f-h,o={target:{element:v,left:g.left,top:g.top,width:p,height:f},element:{element:a,left:l.left,top:l.top,width:r,height:h},horizontal:i<0?"left":0<e?"right":"center",vertical:n<0?"top":0<s?"bottom":"middle"};p<r&&D(e+i)<p&&(o.horizontal="center"),f<h&&D(s+n)<f&&(o.vertical="middle"),x(D(e),D(i))>x(D(s),D(n))?o.important="horizontal":o.important="vertical",u.using.call(this,t,o)}),a.offset(k.extend(l,{using:t}))})},k.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,o=s.width,a=t.left-e.collisionPosition.marginLeft,r=n-a,h=a+e.collisionWidth-o-n;e.collisionWidth>o?0<r&&h<=0?(i=t.left+r+e.collisionWidth-o-n,t.left+=r-i):t.left=0<h&&r<=0?n:h<r?n+o-e.collisionWidth:n:0<r?t.left+=r:0<h?t.left-=h:t.left=x(t.left-a,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,o=e.within.height,a=t.top-e.collisionPosition.marginTop,r=n-a,h=a+e.collisionHeight-o-n;e.collisionHeight>o?0<r&&h<=0?(i=t.top+r+e.collisionHeight-o-n,t.top+=r-i):t.top=0<h&&r<=0?n:h<r?n+o-e.collisionHeight:n:0<r?t.top+=r:0<h?t.top-=h:t.top=x(t.top-a,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,a=n.width,r=n.isWindow?n.scrollLeft:n.offset.left,h=t.left-e.collisionPosition.marginLeft,l=h-r,c=h+e.collisionWidth-a-r,u="left"
2===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,d="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,p=-2*e.offset[0];l<0?((i=t.left+u+d+p+e.collisionWidth-a-o)<0||i<D(l))&&(t.left+=u+d+p):0<c&&(0<(s=t.left-e.collisionPosition.marginLeft+u+d+p-r)||D(s)<c)&&(t.left+=u+d+p)},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,a=n.height,r=n.isWindow?n.scrollTop:n.offset.top,h=t.top-e.collisionPosition.marginTop,l=h-r,c=h+e.collisionHeight-a-r,u="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,d="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,p=-2*e.offset[1];l<0?(s=t.top+u+d+p+e.collisionHeight-a-o,t.top+u+d+p>l&&(s<0||s<D(l))&&(t.top+=u+d+p)):0<c&&(i=t.top-e.collisionPosition.marginTop+u+d+p-r,t.top+u+d+p>c&&(0<i||D(i)<c)&&(t.top+=u+d+p))}},flipfit:{left:function(){k.ui.position.flip.left.apply(this,arguments),k.ui.position.fit.left.apply(this,arguments)},top:function(){k.ui.position.flip.top.apply(this,arguments),k.ui.position.fit.top.apply(this,arguments)}}},function(){var t,e,i,s,n,o=document.getElementsByTagName("body")[0],a=document.createElement("div");for(n in t=document.createElement(o?"div":"body"),i={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},o&&k.extend(i,{position:"absolute",left:"-1000px",top:"-1000px"}),i)t.style[n]=i[n];t.appendChild(a),(e=o||document.documentElement).insertBefore(t,e.firstChild),a.style.cssText="position: absolute; left: 10.7432222px;",s=k(a).offset().left,k.support.offsetFractions=10<s&&s<11,t.innerHTML="",e.removeChild(t)}()}(jQuery),function(b,t){b.widget("ui.draggable",b.ui.mouse,{version:"1.10.3",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(t){var e=this.options;return!(this.helper||e.disabled||0<b(t.target).closest(".ui-resizable-handle").length)&&(this.handle=this._getHandle(t),!!this.handle&&(b(!0===e.iframeFix?"iframe":e.iframeFix).each(function(){b("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(b(this).offset()).appendTo("body")}),!0))},_mouseStart:function(t){var e=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),b.ui.ddmanager&&(b.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,b.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt),this._setContainment(),!1===this._trigger("start",t)?(this._clear(),!1):(this._cacheHelperProportions(),b.ui.ddmanager&&!e.dropBehaviour&&b.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),b.ui.ddmanager&&b.ui.ddmanager.dragStart(this,t),!0)},_mouseDrag:function(t,e){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),!e){var i=this._uiHash();if(!1===this._trigger("drag",t,i))return this._mouseUp({}),!1;this.position=i.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),b.ui.ddmanager&&b.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var e=this,i=!1;return b.ui.ddmanager&&!this.options.dropBehaviour&&(i=b.ui.ddmanager.drop(this,t)),this.dropped&&(i=this.dropped,this.dropped=!1),("original"!==this.options.helper||b.contains(this.element[0].ownerDocument,this.element[0]))&&("invalid"===this.options.revert&&!i||"valid"===this.options.revert&&i||!0===this.options.revert||b.isFunction(this.options.revert)&&this.options.revert.call(this.element,i)?b(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==e._trigger("stop",t)&&e._clear()}):!1!==this._trigger("stop",t)&&this._clear()),!1},_mouseUp:function(t){return b("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),b.ui.ddmanager&&b.ui.ddmanager.dragStop(this,t),b.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){return!this.options.handle||!!b(t.target).closest(this.element.find(this.options.handle)).length},_createHelper:function(t){var e=this.options,i=b.isFunction(e.helper)?b(e.helper.apply(this.element[0],[t])):"clone"===e.helper?this.element.clone().removeAttr("id"):this.element;return i.parents("body").length||i.appendTo("parent"===e.appendTo?this.element[0].parentNode:e.appendTo),i[0]===this.element[0]||/(fixed|absolute)/.test(i.css("position"))||i.css("position","absolute"),i},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),b.isArray(t)&&(t={left:+t[0],top:+t[1]||0}
vendor: 16,470 bytes, line 2
2),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&b.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&b.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,e,i,s=this.options;s.containment?"window"!==s.containment?"document"!==s.containment?s.containment.constructor!==Array?("parent"===s.containment&&(s.containment=this.helper[0].parentNode),(i=(e=b(s.containment))[0])&&(t="hidden"!==e.css("overflow"),this.containment=[(parseInt(e.css("borderLeftWidth"),10)||0)+(parseInt(e.css("paddingLeft"),10)||0),(parseInt(e.css("borderTopWidth"),10)||0)+(parseInt(e.css("paddingTop"),10)||0),(t?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(e.css("borderRightWidth"),10)||0)-(parseInt(e.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(e.css("borderBottomWidth"),10)||0)-(parseInt(e.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=e)):this.containment=s.containment:this.containment=[0,0,b(document).width()-this.helperProportions.width-this.margins.left,(b(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[b(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,b(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,b(window).scrollLeft()+b(window).width()-this.helperProportions.width-this.margins.left,b(window).scrollTop()+(b(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=null},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,s="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&b.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:s.scrollTop(),left:s.scrollLeft()}),{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*i}},_generatePosition:function(t){var e,i,s,n,o=this.options,a="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&b.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,r=t.pageX,h=t.pageY;return this.offset.scroll||(this.offset.scroll={top:a.scrollTop(),left:a.scrollLeft()}),this.originalPosition&&(this.containment&&(e=this.relative_container?(i=this.relative_container.offset(),[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]):this.containment,t.pageX-this.offset.click.left<e[0]&&(r=e[0]+this.offset.click.left),t.pageY-this.offset.click.top<e[1]&&(h=e[1]+this.offset.click.top),t.pageX-this.offset.click.left>e[2]&&(r=e[2]+this.offset.click.left),t.pageY-this.offset.click.top>e[3]&&(h=e[3]+this.offset.click.top)),o.grid&&(s=o.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,h=e?s-this.offset.click.top>=e[1]||s-this.offset.click.top>e[3]?s:s-this.offset.click.top>=e[1]?s-o.grid[1]:s+o.grid[1]:s,n=o.grid[0]?this.originalPageX+Math.round((r-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,r=e?n-this.offset.click.left>=e[0]||n-this.offset.click.left>e[2]?n:n-this.offset.click.left>=e[0]?n-o.grid[0]:n+o.grid[0]:n)),{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:r-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(t,e,i){return i=i||this._uiHash(),b.ui.plugin.call(this,t,[e,i]),"drag"===t&&(this.positionAbs=this._convertPositionTo("absolute")),b.Widget.prototype._trigger.call(this,t,e,i)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),b.ui.plugin.add("draggable","connectToSortable",{start:function(e,t){var i=b(this).data("ui-draggable"),s=i.options,n=b.extend({},t,{item:i.element});i.sortables=[],b(s.connectToSortable).each(function(){var t=b.data(this,"ui-sortable");t&&!t.options.disabled&&(i.sortables.push({instance:t,shouldRevert:t.options.revert}),t.refreshPositions(),t._trigger("activate",e,n))})},stop:function(t,e){var i=b(this).data("ui-draggable"),s=b.extend({},e,{item:i.element});b.each(i.sortables,function(){this.instance.isOver?(this.instance.isOver=0,i.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(t),this.instance.options.helper=this.instance.options._helper,"original"===i.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",t,s))})},drag:function(i,s){var n=b(this).data("ui-draggable"),o=this;b.each(n.sortables,function(){var t=!1,e=this;this.instance.positionAbs=n.positionAbs,this.instance.helperProportions=n.helperProportions,this.instance.offset.click=n.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(t=!0,b.each(n.sortables,function(){return this.instance.positionAbs=n.positionAbs,this.instance.helperProportions=n.helperProportions,this.instance.offset.click=n.offset.click,this!==e&&this.instance._intersectsWith(this.instance.containerCache)&&b.contains(e.instance.element[0],this.instance.element[0])&&(t=!1),t})),t?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=b(o).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return s.helper[0]},i.target=this.instance.currentItem[0],this.instance._mouseCapture(i,!0),this.instance._mouseStart(i,!0,!0),this.instance.offset.click.top=n.offset.click.top,this.instance.offset.click.left=n.offset.click.left,this.instance.offset.parent.left-=n.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=n.offset.parent.top-this.instance.offset.parent.top,n._trigger("toSortable",i),n.dropped=this.instance.element,n.currentItem=n.element,this.instance.fromOutside=n),this.instance.currentItem&&this.instance._mouseDrag(i)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",i,this.instance._uiHash(this.instance)),this.instance._mouseStop(i,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),n._trigger("fromSortable",i),n.dropped=!1)})}}),b.ui.plugin.add("draggable","cursor",{start:function(){var t=b("body"),e=b(this).data("ui-draggable").options;t.css("cursor")&&(e._cursor=t.css("cursor")),t.css("cursor",e.cursor)},stop:function(){var t=b(this).data("ui-draggable").options;t._cursor&&b("body").css("cursor",t._cursor)}}),b.ui.plugin.add("draggable","opacity",{start:function(t,e){var i=b(e.helper),s=b(this).data("ui-draggable").options;i.css("opacity")&&(s._opacity=i.css("opacity")),i.css("opacity",s.opacity)},stop:function(t,e){var i=b(this).data("ui-draggable").options;i._opacity&&b(e.helper).css("opacity",i._opacity)}}),b.ui.plugin.add("draggable","scroll",{start:function(){var t=b(this).data("ui-draggable");t.scrollParent[0]!==document&&"HTML"!==t.scrollParent[0].tagName&&(t.overflowOffset=t.scrollParent.offset())},drag:function(t){var e=b(this).data("ui-draggable"),i=e.options,s=!1;e.scrollParent[0]!==document&&"HTML"!==e.scrollParent[0].tagName?(i.axis&&"x"===i.axis||(e.overflowOffset.top+e.scrollParent[0].offsetHeight-t.pageY<i.scrollSensitivity?e.scrollParent[0].scrollTop=s=e.scrollParent[0].scrollTop+i.scrollSpeed:t.pageY-e.overflowOffset.top<i.scrollSensitivity&&(e.scrollParent[0].scrollTop=s=e.scrollParent[0].scrollTop-i.scrollSpeed)),i.axis&&"y"===i.axis||(e.overflowOffset.left+e.scrollParent[0].offsetWidth-t.pageX<i.scrollSensitivity?e.scrollParent[0].scrollLeft=s=e.scrollParent[0].scrollLeft+i.scrollSpeed:t.pageX-e.overflowOffset.left<i.scrollSensitivity&&(e.scrollParent[0].scrollLeft=s=e.scrollParent[0].scrollLeft-i.scrollSpeed))):(i.axis&&"x"===i.axis||(t.pageY-b(document).scrollTop()<i.scrollSensitivity?s=b(document).scrollTop(b(document).scrollTop()-i.scrollSpeed):b(window).height()-(t.pageY-b(document).scrollTop())<i.scrollSensitivity&&(s=b(document).scrollTop(b(document).scrollTop()+i.scrollSpeed))),i.axis&&"y"===i.axis||(t.pageX-b(document).scrollLeft()<i.scrollSensitivity?s=b(document).scrollLeft(b(document).scrollLeft()-i.scrollSpeed):b(window).width()-(t.pageX-b(document).scrollLeft())<i.scrollSensitivity&&(s=b(document).scrollLeft(b(document).scrollLeft()+i.scrollSpeed)))),!1!==s&&b.ui.ddmanager&&!i.dropBehaviour&&b.ui.ddmanager.prepareOffsets(e,t)}}),b.ui.plugin.add("draggable","snap",{start:function(){var i=b(this).data("ui-draggable"),t=i.options;i.snapElements=[],b(t.snap.constructor!==String?t.snap.items||":data(ui-draggable)":t.snap).each(function(){var t=b(this),e=t.offset();this!==i.element[0]&&i.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:e.top,left:e.left})})},drag:function(t,e){var i,s,n,o,a,r,h,l,c,u,d=b(this).data("ui-draggable"),p=d.options,f=p.snapTolerance,g=e.offset.left,m=g+d.helperProportions.width,v=e.offset.top,_=v+d.helperProportions.height;for(c=d.snapElements.length-1;0<=c;c--)r=(a=d.snapElements[c].left)+d.snapElements[c].width,l=(h=d.snapElements[c].top)+d.snapElements[c].height,m<a-f||r+f<g||_<h-f||l+f<v||!b.contains(d.snapElements[c].item.ownerDocument,d.snapElements[c].item)?(d.snapElements[c].snapping&&d.options.snap.release&&d.options.snap.release.call(d.element,t,b.extend(d._uiHash(),{snapItem:d.snapElements[c].item})),d.snapElements[c].snapping=!1):("inner"!==p.snapMode&&(i=Math.abs(h-_)<=f,s=Math.abs(l-v)<=f,n=Math.abs(a-m)<=f,o=Math.abs(r-g)<=f,i&&(e.position.top=d._convertPositionTo("relative",{top:h-d.helperProportions.height,left:0}).top-d.margins.top),s&&(e.position.top=d._convertPositionTo("relative",{top:l,left:0}).top-d.margins.top),n&&(e.position.left=d._convertPositionTo("relative",{top:0,left:a-d.helperProportions.width}).left-d.margins.left),o&&(e.position.left=d._convertPositionTo("relative",{top:0,left:r}).left-d.margins.left)),u=i||s||n||o,"outer"!==p.snapMode&&(i=Math.abs(h-v)<=f,s=Math.abs(l-_)<=f,n=Math.abs(a-g)<=f,o=Math.abs(r-m)<=f,i&&(e.position.top=d._convertPositionTo("relative",{top:h,left:0}).top-d.margins.top),s&&(e.position.top=d._convertPositionTo("relative",{top:l-d.helperProportions.height,left:0}).top-d.margins.top),n&&(e.position.left=d._convertPositionTo("relative",{top:0,left:a}).left-d.margins.left),o&&(e.position.left=d._convertPositionTo("relative",{top:0,left:r-d.helperProportions.width}).left-d.margins.left)),!d.snapElements[c].snapping&&(i||s||n||o||u)&&d.options.snap.snap&&d.options.snap.snap.call(d.element,t,b.extend(d._uiHash(),{snapItem:d.snapElements[c].item})),d.snapElements[c].snapping=i||s||n||o||u)}}),b.ui.plugin.add("draggable","stack",{start:function(){var e,t=this.data("ui-draggable").options,i=b.makeArray(b(t.stack)).sort(function(t,e){return(parseInt(b(t).css("zIndex"),10)||0)-(parseInt(b(e).css("zIndex"),10)||0)});i.length&&(e=parseInt(b(i[0]).css("zIndex"),10)||0,b(i).each(function(t){b(this).css("zIndex",e+t)}),this.css("zIndex",e+i.length))}}),b.ui.plugin.add("draggable","zIndex",{start:function(t,e){var i=b(e.helper),s=b(this).data("ui-draggable").options;i.css("zIndex")&&(s._zIndex=i.css("zIndex")),i.css("zIndex",s.zIndex)},stop:function(t,e){var i=b(this).data("ui-draggable").options;i._zIndex&&b(e.helper).css("zIndex",i._zIndex)}})}(jQuery),function(r,t){function d(t,e,i){return e<t&&t<e+i}r.widget("ui.droppable",{version:"1.10.3",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t=this.options,e=t.accept;this.isover=!1,this.isout=!0,this.accept=r.isFunction(e)?e:function(t){return t.is(e)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},r.ui.ddmanager.droppables[t.scope]=r.ui.ddmanager.droppables[t.scope]||[],r.ui.ddmanager.droppables[t.scope].push(this),t.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var t=0,e=r.ui.ddmanager.droppables[this.options.scope];t<e.length;t++)e[t]===this&&e.splice(t,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(t,e){"accept"===t&&(this.accept=r.isFunction(e)?e:function(t){return t.is(e)}),r.Widget.prototype._setOption.apply(this,arguments)},_activate:function(t){var e=r.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),e&&this._trigger("activate",t,this.ui(e))},_deactivate:function(t){var e=r.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),e&&this._trigger("deactivate",t,this.ui(e))},_over:function(t){var e=r.ui.ddmanager.current;e&&(e.currentItem||e.element)[0]!==this.element[0]&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(e)))},_out:function(t){var e=r.ui.ddmanager.current;e&&(e.currentItem||e.element)[0]!==this.element[0]&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(e)))},_drop:function(t,e){var i=e||r.ui.ddmanager.current,s=!1;return!(!i||(i.currentItem||i.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var t=r.data(this,"ui-droppable");if(t.options.greedy&&!t.options.disabled&&t.options.scope===i.options.scope&&t.accept.call(t.element[0],i.currentItem||i.element)&&r.ui.intersect(i,r.extend(t,{offset:t.element.offset()}),t.options.tolerance))return!(s=!0)}),!s&&(!!this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(i)),this.element)))},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}}}
vendor: 25,826 bytes, line 2
2),r.ui.intersect=function(t,e,i){if(!e.offset)return!1;var s,n=(t.positionAbs||t.position.absolute).left,o=n+t.helperProportions.width,a=(t.positionAbs||t.position.absolute).top,r=a+t.helperProportions.height,h=e.offset.left,l=h+e.proportions.width,c=e.offset.top,u=c+e.proportions.height;switch(i){case"fit":return h<=n&&o<=l&&c<=a&&r<=u;case"intersect":return h<n+t.helperProportions.width/2&&o-t.helperProportions.width/2<l&&c<a+t.helperProportions.height/2&&r-t.helperProportions.height/2<u;case"pointer":return s=(t.positionAbs||t.position.absolute).left+(t.clickOffset||t.offset.click).left,d((t.positionAbs||t.position.absolute).top+(t.clickOffset||t.offset.click).top,c,e.proportions.height)&&d(s,h,e.proportions.width);case"touch":return(c<=a&&a<=u||c<=r&&r<=u||a<c&&u<r)&&(h<=n&&n<=l||h<=o&&o<=l||n<h&&l<o);default:return!1}},r.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(t,e){var i,s,n=r.ui.ddmanager.droppables[t.options.scope]||[],o=e?e.type:null,a=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();t:for(i=0;i<n.length;i++)if(!(n[i].options.disabled||t&&!n[i].accept.call(n[i].element[0],t.currentItem||t.element))){for(s=0;s<a.length;s++)if(a[s]===n[i].element[0]){n[i].proportions.height=0;continue t}n[i].visible="none"!==n[i].element.css("display"),n[i].visible&&("mousedown"===o&&n[i]._activate.call(n[i],e),n[i].offset=n[i].element.offset(),n[i].proportions={width:n[i].element[0].offsetWidth,height:n[i].element[0].offsetHeight})}},drop:function(t,e){var i=!1;return r.each((r.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&r.ui.intersect(t,this,this.options.tolerance)&&(i=this._drop.call(this,e)||i),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,e)))}),i},dragStart:function(t,e){t.element.parentsUntil("body").bind("scroll.droppable",function(){t.options.refreshPositions||r.ui.ddmanager.prepareOffsets(t,e)})},drag:function(o,a){o.options.refreshPositions&&r.ui.ddmanager.prepareOffsets(o,a),r.each(r.ui.ddmanager.droppables[o.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var t,e,i,s=r.ui.intersect(o,this,this.options.tolerance),n=!s&&this.isover?"isout":s&&!this.isover?"isover":null;n&&(this.options.greedy&&(e=this.options.scope,(i=this.element.parents(":data(ui-droppable)").filter(function(){return r.data(this,"ui-droppable").options.scope===e})).length&&((t=r.data(i[0],"ui-droppable")).greedyChild="isover"===n)),t&&"isover"===n&&(t.isover=!1,t.isout=!0,t._out.call(t,a)),this[n]=!0,this["isout"===n?"isover":"isout"]=!1,this["isover"===n?"_over":"_out"].call(this,a),t&&"isout"===n&&(t.isout=!1,t.isover=!0,t._over.call(t,a)))}})},dragStop:function(t,e){t.element.parentsUntil("body").unbind("scroll.droppable"),t.options.refreshPositions||r.ui.ddmanager.prepareOffsets(t,e)}}}(jQuery),function(v,t){function d(t){return parseInt(t,10)||0}function u(t){return!isNaN(parseInt(t,10))}v.widget("ui.resizable",v.ui.mouse,{version:"1.10.3",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var t,e,i,s,n=this,o=this.options;if(this.element.addClass("ui-resizable"),v.extend(this,{_aspectRatio:!!o.aspectRatio,aspectRatio:o.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:o.helper||o.ghost||o.animate?o.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(v("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=o.handles||(v(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),t=this.handles.split(","),this.handles={},e=0;e<t.length;e++)i=v.trim(t[e]),(s=v("<div class='ui-resizable-handle "+("ui-resizable-"+i)+"'></div>")).css({zIndex:o.zIndex}),"se"===i&&s.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[i]=".ui-resizable-"+i,this.element.append(s);this._renderAxis=function(t){var e,i,s,n;for(e in t=t||this.element,this.handles)this.handles[e].constructor===String&&(this.handles[e]=v(this.handles[e],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(i=v(this.handles[e],this.element),n=/sw|ne|nw|se|n|s/.test(e)?i.outerHeight():i.outerWidth(),s=["padding",/ne|nw|n/.test(e)?"Top":/se|sw|s/.test(e)?"Bottom":/^e$/.test(e)?"Right":"Left"].join(""),t.css(s,n),this._proportionallyResize()),v(this.handles[e]).length},this._renderAxis(this.element),this._handles=v(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){n.resizing||(this.className&&(s=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),n.axis=s&&s[1]?s[1]:"se")}),o.autoHide&&(this._handles.hide(),v(this.element).addClass("ui-resizable-autohide").mouseenter(function(){o.disabled||(v(this).removeClass("ui-resizable-autohide"),n._handles.show())}).mouseleave(function(){o.disabled||n.resizing||(v(this).addClass("ui-resizable-autohide"),n._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,e=function(t){v(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(e(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),e(this.originalElement),this},_mouseCapture:function(t){var e,i,s=!1;for(e in this.handles)((i=v(this.handles[e])[0])===t.target||v.contains(i,t.target))&&(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var e,i,s,n=this.options,o=this.element.position(),a=this.element;return this.resizing=!0,/absolute/.test(a.css("position"))?a.css({position:"absolute",top:a.css("top"),left:a.css("left")}):a.is(".ui-draggable")&&a.css({position:"absolute",top:o.top,left:o.left}),this._renderProxy(),e=d(this.helper.css("left")),i=d(this.helper.css("top")),n.containment&&(e+=v(n.containment).scrollLeft()||0,i+=v(n.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:i},this.size=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.originalPosition={left:e,top:i},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof n.aspectRatio?n.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=v(".ui-resizable-"+this.axis).css("cursor"),v("body").css("cursor","auto"===s?this.axis+"-resize":s),a.addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var e,i=this.helper,s={},n=this.originalMousePosition,o=this.axis,a=this.position.top,r=this.position.left,h=this.size.width,l=this.size.height,c=t.pageX-n.left||0,u=t.pageY-n.top||0,d=this._change[o];return d&&(e=d.apply(this,[t,c,u]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(e=this._updateRatio(e,t)),e=this._respectSize(e,t),this._updateCache(e),this._propagate("resize",t),this.position.top!==a&&(s.top=this.position.top+"px"),this.position.left!==r&&(s.left=this.position.left+"px"),this.size.width!==h&&(s.width=this.size.width+"px"),this.size.height!==l&&(s.height=this.size.height+"px"),i.css(s),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),v.isEmptyObject(s)||this._trigger("resize",t,this.ui())),!1},_mouseStop:function(t){this.resizing=!1;var e,i,s,n,o,a,r,h=this.options,l=this;return this._helper&&(s=(i=(e=this._proportionallyResizeElements).length&&/textarea/i.test(e[0].nodeName))&&v.ui.hasScroll(e[0],"left")?0:l.sizeDiff.height,n=i?0:l.sizeDiff.width,o={width:l.helper.width()-n,height:l.helper.height()-s},a=parseInt(l.element.css("left"),10)+(l.position.left-l.originalPosition.left)||null,r=parseInt(l.element.css("top"),10)+(l.position.top-l.originalPosition.top)||null,h.animate||this.element.css(v.extend(o,{top:r,left:a})),l.helper.height(l.size.height),l.helper.width(l.size.width),this._helper&&!h.animate&&this._proportionallyResize()),v("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(t){var e,i,s,n,o,a=this.options;o={minWidth:u(a.minWidth)?a.minWidth:0,maxWidth:u(a.maxWidth)?a.maxWidth:1/0,minHeight:u(a.minHeight)?a.minHeight:0,maxHeight:u(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),i<o.maxWidth&&(o.maxWidth=i),n<o.maxHeight&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),u(t.left)&&(this.position.left=t.left),u(t.top)&&(this.position.top=t.top),u(t.height)&&(this.size.height=t.height),u(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return u(t.height)?t.width=t.height*this.aspectRatio:u(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=u(t.width)&&e.maxWidth&&e.maxWidth<t.width,n=u(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=u(t.width)&&e.minWidth&&e.minWidth>t.width,a=u(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,h=this.position.top+this.size.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=r-e.minWidth),s&&l&&(t.left=r-e.maxWidth),a&&c&&(t.top=h-e.minHeight),n&&c&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var t,e,i,s,n,o=this.helper||this.element;for(t=0;t<this._proportionallyResizeElements.length;t++){if(n=this._proportionallyResizeElements[t],!this.borderDif)for(this.borderDif=[],i=[n.css("borderTopWidth"),n.css("borderRightWidth"),n.css("borderBottomWidth"),n.css("borderLeftWidth")],s=[n.css("paddingTop"),n.css("paddingRight"),n.css("paddingBottom"),n.css("paddingLeft")],e=0;e<i.length;e++)this.borderDif[e]=(parseInt(i[e],10)||0)+(parseInt(s[e],10)||0);n.css({height:o.height()-this.borderDif[0]-this.borderDif[2]||0,width:o.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var t=this.element,e=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||v("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++e.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(t,e,i){return v.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},sw:function(t,e,i){return v.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,e,i]))},ne:function(t,e,i){return v.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},nw:function(t,e,i){return v.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,e,i]))}},_propagate:function(t,e){v.ui.plugin.call(this,t,[e,this.ui()]),"resize"!==t&&this._trigger(t,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),v.ui.plugin.add("resizable","animate",{stop:function(e){var i=v(this).data("ui-resizable"),t=i.options,s=i._proportionallyResizeElements,n=s.length&&/textarea/i.test(s[0].nodeName),o=n&&v.ui.hasScroll(s[0],"left")?0:i.sizeDiff.height,a=n?0:i.sizeDiff.width,r={width:i.size.width-a,height:i.size.height-o},h=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,l=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(v.extend(r,l&&h?{top:l,left:h}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};s&&s.length&&v(s[0]).css({width:t.width,height:t.height}),i._updateCache(t),i._propagate("resize",e)}})}}),v.ui.plugin.add("resizable","containment",{start:function(){var i,s,t,e,n,o,a,r=v(this).data("ui-resizable"),h=r.options,l=r.element,c=h.containment,u=c instanceof v?c.get(0):/parent/.test(c)?l.parent().get(0):c;u&&(r.containerElement=v(u),/document/.test(c)||c===document?(r.containerOffset={left:0,top:0},r.containerPosition={left:0,top:0},r.parentData={element:v(document),left:0,top:0,width:v(document).width(),height:v(document).height()||document.body.parentNode.scrollHeight}):(i=v(u),s=[],v(["Top","Right","Left","Bottom"]).each(function(t,e){s[t]=d(i.css("padding"+e))}),r.containerOffset=i.offset(),r.containerPosition=i.position(),r.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},t=r.containerOffset,e=r.containerSize.height,n=r.containerSize.width,o=v.ui.hasScroll(u,"left")?u.scrollWidth:n,a=v.ui.hasScroll(u)?u.scrollHeight:e,r.parentData={element:u,left:t.left,top:t.top,width:o,height:a}))},resize:function(t){var e,i,s,n,o=v(this).data("ui-resizable"),a=o.options,r=o.containerOffset,h=o.position,l=o._aspectRatio||t.shiftKey,c={top:0,left:0},u=o.containerElement;u[0]!==document&&/static/.test(u.css("position"))&&(c=r),h.left<(o._helper?r.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-r.left:o.position.left-c.left),l&&(o.size.height=o.size.width/o.aspectRatio),o.position.left=a.helper?r.left:0),h.top<(o._helper?r.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-r.top:o.position.top),l&&(o.size.width=o.size.height*o.aspectRatio),o.position.top=o._helper?r.top:0),o.offset.left=o.parentData.left+o.position.left,o.offset.top=o.parentData.top+o.position.top,e=Math.abs((o._helper,o.offset.left-c.left+o.sizeDiff.width)),i=Math.abs((o._helper?o.offset.top-c.top:o.offset.top-r.top)+o.sizeDiff.height),s=o.containerElement.get(0)===o.element.parent().get(0),n=/relative|absolute/.test(o.containerElement.css("position")),s&&n&&(e-=o.parentData.left),e+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-e,l&&(o.size.height=o.size.width/o.aspectRatio)),i+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-i,l&&(o.size.width=o.size.height*o.aspectRatio))},stop:function(){var t=v(this).data("ui-resizable"),e=t.options,i=t.containerOffset,s=t.containerPosition,n=t.containerElement,o=v(t.helper),a=o.offset(),r=o.outerWidth()-t.sizeDiff.width,h=o.outerHeight()-t.sizeDiff.height;t._helper&&!e.animate&&/relative/.test(n.css("position"))&&v(this).css({left:a.left-s.left-i.left,width:r,height:h}),t._helper&&!e.animate&&/static/.test(n.css("position"))&&v(this).css({left:a.left-s.left-i.left,width:r,height:h})}}),v.ui.plugin.add("resizable","alsoResize",{start:function(){var t=v(this).data("ui-resizable").options,e=function(t){v(t).each(function(){var t=v(this);t.data("ui-resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})};"object"!=typeof t.alsoResize||t.alsoResize.parentNode?e(t.alsoResize):t.alsoResize.length?(t.alsoResize=t.alsoResize[0],e(t.alsoResize)):v.each(t.alsoResize,function(t){e(t)})},resize:function(t,o){var e=v(this).data("ui-resizable"),i=e.options,s=e.originalSize,n=e.originalPosition,a={height:e.size.height-s.height||0,width:e.size.width-s.width||0,top:e.position.top-n.top||0,left:e.position.left-n.left||0},r=function(t,i){v(t).each(function(){var t=v(this),s=v(this).data("ui-resizable-alsoresize"),n={},e=i&&i.length?i:t.parents(o.originalElement[0]).length?["width","height"]:["width","height","top","left"];v.each(e,function(t,e){var i=(s[e]||0)+(a[e]||0);i&&0<=i&&(n[e]=i||null)}),t.css(n)})};"object"!=typeof i.alsoResize||i.alsoResize.nodeType?r(i.alsoResize):v.each(i.alsoResize,function(t,e){r(t,e)})},stop:function(){v(this).removeData("resizable-alsoresize")}}),v.ui.plugin.add("resizable","ghost",{start:function(){var t=v(this).data("ui-resizable"),e=t.options,i=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof e.ghost?e.ghost:""),t.ghost.appendTo(t.helper)},resize:function(){var t=v(this).data("ui-resizable");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=v(this).data("ui-resizable");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),v.ui.plugin.add("resizable","grid",{resize:function(){var t=v(this).data("ui-resizable"),e=t.options,i=t.size,s=t.originalSize,n=t.originalPosition,o=t.axis,a="number"==typeof e.grid?[e.grid,e.grid]:e.grid,r=a[0]||1,h=a[1]||1,l=Math.round((i.width-s.width)/r)*r,c=Math.round((i.height-s.height)/h)*h,u=s.width+l,d=s.height+c,p=e.maxWidth&&e.maxWidth<u,f=e.maxHeight&&e.maxHeight<d,g=e.minWidth&&e.minWidth>u,m=e.minHeight&&e.minHeight>d;e.grid=a,g&&(u+=r),m&&(d+=h),p&&(u-=r),f&&(d-=h),/^(se|s|e)$/.test(o)?(t.size.width=u,t.size.height=d):/^(ne)$/.test(o)?(t.size.width=u,t.size.height=d,t.position.top=n.top-c):(/^(sw)$/.test(o)?(t.size.width=u,t.size.height=d):(t.size.width=u,t.size.height=d,t.position.top=n.top-c),t.position.left=n.left-l)}})}(jQuery),function(l,t){l.widget("ui.selectable",l.ui.mouse,{version:"1.10.3",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var t,e=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){(t=l(e.options.filter,e.element[0])).addClass("ui-selectee"),t.each(function(){var t=l(this),e=t.offset();l.data(this,"selectable-item",{element:this,$element:t,left:e.left,top:e.top,right:e.left+t.outerWidth(),bottom:e.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=t.addClass("ui-selectee"),this._mouseInit(),this.helper=l("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(i){var s=this,t=this.options;this.opos=[i.pageX,i.pageY],this.options.disabled||(this.selectees=l(t.filter,this.element[0]),this._trigger("start",i),l(t.appendTo).append(this.helper),this.helper.css({left:i.pageX,top:i.pageY,width:0,height:0}),t.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var t=l.data(this,"selectable-item");t.startselected=!0,i.metaKey||i.ctrlKey||(t.$element.removeClass("ui-selected"),t.selected=!1,t.$element.addClass("ui-unselecting"),t.unselecting=!0,s._trigger("unselecting",i,{unselecting:t.element}))}),l(i.target).parents().addBack().each(function(){var t,e=l.data(this,"selectable-item");if(e)return t=!i.metaKey&&!i.ctrlKey||!e.$element.hasClass("ui-selected"),e.$element.removeClass(t?"ui-unselecting":"ui-selected").addClass(t?"ui-selecting":"ui-unselecting"),e.unselecting=!t,e.selecting=t,(e.selected=t)?s._trigger("selecting",i,{selecting:e.element}):s._trigger("unselecting",i,{unselecting:e.element}),!1}))},_mouseDrag:function(i){if(this.dragged=!0,!this.options.disabled){var t,s=this,n=this.options,o=this.opos[0],a=this.opos[1],r=i.pageX,h=i.pageY;return r<o&&(t=r,r=o,o=t),h<a&&(t=h,h=a,a=t),this.helper.css({left:o,top:a,width:r-o,height:h-a}),this.selectees.each(function(){var t=l.data(this,"selectable-item"),e=!1;t&&t.element!==s.element[0]&&("touch"===n.tolerance?e=!(t.left>r||t.right<o||t.top>h||t.bottom<a):"fit"===n.tolerance&&(e=t.left>o&&t.right<r&&t.top>a&&t.bottom<h),e?(t.selected&&(t.$element.removeClass("ui-selected"),t.selected=!1),t.unselecting&&(t.$element.removeClass("ui-unselecting"),t.unselecting=!1),t.selecting||(t.$element.addClass("ui-selecting"),t.selecting=!0,s._trigger("selecting",i,{selecting:t.element}))):(t.selecting&&((i.metaKey||i.ctrlKey)&&t.startselected?(t.$element.removeClass("ui-selecting"),t.selecting=!1,t.$element.addClass("ui-selected"),t.selected=!0):(t.$element.removeClass("ui-selecting"),t.selecting=!1,t.startselected&&(t.$element.addClass("ui-unselecting"),t.unselecting=!0),s._trigger("unselecting",i,{unselecting:t.element}))),t.selected&&(i.metaKey||i.ctrlKey||t.startselected||(t.$element.removeClass("ui-selected"),t.selected=!1,t.$element.addClass("ui-unselecting"),t.unselecting=!0,s._trigger("unselecting",i,{unselecting:t.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,l(".ui-unselecting",this.element[0]).each(function(){var t=l.data(this,"selectable-item");t.$element.removeClass("ui-unselecting"),t.unselecting=!1,t.startselected=!1,i._trigger("unselected",e,{unselected:t.element})}),l(".ui-selecting",this.element[0]).each(function(){var t=l.data(this,"selectable-item");t.$element.removeClass("ui-selecting").addClass("ui-selected"),t.selecting=!1,t.selected=!0,t.startselected=!0,i._trigger("selected",e,{selected:t.element})}),this._trigger("stop",e),this.helper.remove(),!1}})}(jQuery),function(p,t){function f(t,e,i){return e<t&&t<e+i}function g(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}p.widget("ui.sortable",p.ui.mouse,{version:"1.10.3",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var t=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=!!this.items.length&&("x"===t.axis||g(this.items[0].item)),this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var t=this.items.length-1;0<=t;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(t,e){"disabled"===t?(this.options[t]=e,this.widget().toggleClass("ui-sortable-disabled",!!e)):p.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(t,e){var i=null,s=!1,n=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(t),p(t.target).parents().each(function(){if(p.data(this,n.widgetName+"-item")===n)return i=p(this),!1}),p.data(t.target,n.widgetName+"-item")===n&&(i=p(t.target)),!!i&&(!(this.options.handle&&!e&&(p(this.options.handle,i).find("*").addBack().each(function(){this===t.target&&(s=!0)}),!s))&&(this.currentItem=i,this._removeCurrentsFromItems(),!0))))}
vendor: 10,230 bytes, line 2
2,_mouseStart:function(t,e,i){var s,n,o=this.options;if((this.currentContainer=this).refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},p.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),o.containment&&this._setContainment(),o.cursor&&"auto"!==o.cursor&&(n=this.document.find("body"),this.storedCursor=n.css("cursor"),n.css("cursor",o.cursor),this.storedStylesheet=p("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(n)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(s=this.containers.length-1;0<=s;s--)this.containers[s]._trigger("activate",t,this._uiHash(this));return p.ui.ddmanager&&(p.ui.ddmanager.current=this),p.ui.ddmanager&&!o.dropBehaviour&&p.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var e,i,s,n,o=this.options,a=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<o.scrollSensitivity?this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+o.scrollSpeed:t.pageY-this.overflowOffset.top<o.scrollSensitivity&&(this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-o.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<o.scrollSensitivity?this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+o.scrollSpeed:t.pageX-this.overflowOffset.left<o.scrollSensitivity&&(this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-o.scrollSpeed)):(t.pageY-p(document).scrollTop()<o.scrollSensitivity?a=p(document).scrollTop(p(document).scrollTop()-o.scrollSpeed):p(window).height()-(t.pageY-p(document).scrollTop())<o.scrollSensitivity&&(a=p(document).scrollTop(p(document).scrollTop()+o.scrollSpeed)),t.pageX-p(document).scrollLeft()<o.scrollSensitivity?a=p(document).scrollLeft(p(document).scrollLeft()-o.scrollSpeed):p(window).width()-(t.pageX-p(document).scrollLeft())<o.scrollSensitivity&&(a=p(document).scrollLeft(p(document).scrollLeft()+o.scrollSpeed))),!1!==a&&p.ui.ddmanager&&!o.dropBehaviour&&p.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),e=this.items.length-1;0<=e;e--)if(s=(i=this.items[e]).item[0],(n=this._intersectsWithPointer(i))&&i.instance===this.currentContainer&&!(s===this.currentItem[0]||this.placeholder[1===n?"next":"prev"]()[0]===s||p.contains(this.placeholder[0],s)||"semi-dynamic"===this.options.type&&p.contains(this.element[0],s))){if(this.direction=1===n?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(i))break;this._rearrange(t,i),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),p.ui.ddmanager&&p.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,e){if(t){if(p.ui.ddmanager&&!this.options.dropBehaviour&&p.ui.ddmanager.drop(this,t),this.options.revert){var i=this,s=this.placeholder.offset(),n=this.options.axis,o={};n&&"x"!==n||(o.left=s.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),n&&"y"!==n||(o.top=s.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,p(this.helper).animate(o,parseInt(this.options.revert,10)||500,function(){i._clear(t)})}else this._clear(t,e);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var t=this.containers.length-1;0<=t;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),p.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?p(this.domPosition.prev).after(this.currentItem):p(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var t=this._getItemsAsjQuery(e&&e.connected),i=[];return e=e||{},p(t).each(function(){var t=(p(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);t&&i.push((e.key||t[1]+"[]")+"="+(e.key&&e.expression?t[1]:t[2]))}),!i.length&&e.key&&i.push(e.key+"="),i.join("&")},toArray:function(t){var e=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},e.each(function(){i.push(p(t.item||this).attr(t.attribute||"id")||"")}),i},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||r<s+l&&s+l<h,d="y"===this.options.axis||o<e+c&&e+c<a,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:o<e+this.helperProportions.width/2&&i-this.helperProportions.width/2<a&&r<s+this.helperProportions.height/2&&n-this.helperProportions.height/2<h},_intersectsWithPointer:function(t){var e="x"===this.options.axis||f(this.positionAbs.top+this.offset.click.top,t.top,t.height),i="y"===this.options.axis||f(this.positionAbs.left+this.offset.click.left,t.left,t.width),s=e&&i,n=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return!!s&&(this.floating?o&&"right"===o||"down"===n?2:1:n&&("down"===n?2:1))},_intersectsWithSides:function(t){var e=f(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=f(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection();return this.floating&&n?"right"===n&&i||"left"===n&&!i:s&&("down"===s&&e||"up"===s&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!=t&&(0<t?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!=t&&(0<t?"right":"left")},refresh:function(t){return this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(t){var e,i,s,n,o=[],a=[],r=this._connectWith();if(r&&t)for(e=r.length-1;0<=e;e--)for(i=(s=p(r[e])).length-1;0<=i;i--)(n=p.data(s[i],this.widgetFullName))&&n!==this&&!n.options.disabled&&a.push([p.isFunction(n.options.items)?n.options.items.call(n.element):p(n.options.items,n.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),n]);for(a.push([p.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):p(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),e=a.length-1;0<=e;e--)a[e][0].each(function(){o.push(this)});return p(o)},_removeCurrentsFromItems:function(){var i=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=p.grep(this.items,function(t){for(var e=0;e<i.length;e++)if(i[e]===t.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var e,i,s,n,o,a,r,h,l=this.items,c=[[p.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):p(this.options.items,this.element),this]],u=this._connectWith();if(u&&this.ready)for(e=u.length-1;0<=e;e--)for(i=(s=p(u[e])).length-1;0<=i;i--)(n=p.data(s[i],this.widgetFullName))&&n!==this&&!n.options.disabled&&(c.push([p.isFunction(n.options.items)?n.options.items.call(n.element[0],t,{item:this.currentItem}):p(n.options.items,n.element),n]),this.containers.push(n));for(e=c.length-1;0<=e;e--)for(o=c[e][1],i=0,h=(a=c[e][0]).length;i<h;i++)(r=p(a[i])).data(this.widgetName+"-item",o),l.push({item:r,instance:o,width:0,height:0,left:0,top:0})},refreshPositions:function(t){var e,i,s,n;for(this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),e=this.items.length-1;0<=e;e--)(i=this.items[e]).instance!==this.currentContainer&&this.currentContainer&&i.item[0]!==this.currentItem[0]||(s=this.options.toleranceElement?p(this.options.toleranceElement,i.item):i.item,t||(i.width=s.outerWidth(),i.height=s.outerHeight()),n=s.offset(),i.left=n.left,i.top=n.top);
2if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(e=this.containers.length-1;0<=e;e--)n=this.containers[e].element.offset(),this.containers[e].containerCache.left=n.left,this.containers[e].containerCache.top=n.top,this.containers[e].containerCache.width=this.containers[e].element.outerWidth(),this.containers[e].containerCache.height=this.containers[e].element.outerHeight();return this},_createPlaceholder:function(i){var s,n=(i=i||this).options;n.placeholder&&n.placeholder.constructor!==String||(s=n.placeholder,n.placeholder={element:function(){var t=i.currentItem[0].nodeName.toLowerCase(),e=p("<"+t+">",i.document[0]).addClass(s||i.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===t?i.currentItem.children().each(function(){p("<td> </td>",i.document[0]).attr("colspan",p(this).attr("colspan")||1).appendTo(e)}):"img"===t&&e.attr("src",i.currentItem.attr("src")),s||e.css("visibility","hidden"),e},update:function(t,e){s&&!n.forcePlaceholderSize||(e.height()||e.height(i.currentItem.innerHe
vendor: 5,241 bytes, line 2
2ight()-parseInt(i.currentItem.css("paddingTop")||0,10)-parseInt(i.currentItem.css("paddingBottom")||0,10)),e.width()||e.width(i.currentItem.innerWidth()-parseInt(i.currentItem.css("paddingLeft")||0,10)-parseInt(i.currentItem.css("paddingRight")||0,10)))}}),i.placeholder=p(n.placeholder.element.call(i.element,i.currentItem)),i.currentItem.after(i.placeholder),n.placeholder.update(i,i.placeholder)},_contactContainers:function(t){var e,i,s,n,o,a,r,h,l,c,u=null,d=null;for(e=this.containers.length-1;0<=e;e--)if(!p.contains(this.currentItem[0],this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(u&&p.contains(this.containers[e].element[0],u.element[0]))continue;u=this.containers[e],d=e}else this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",t,this._uiHash(this)),this.containers[e].containerCache.over=0);if(u)if(1===this.containers.length)this.containers[d].containerCache.over||(this.containers[d]._trigger("over",t,this._uiHash(this)),this.containers[d].containerCache.over=1);else{for(s=1e4,n=null,o=(c=u.floating||g(this.currentItem))?"left":"top",a=c?"width":"height",r=this.positionAbs[o]+this.offset.click[o],i=this.items.length-1;0<=i;i--)p.contains(this.containers[d].element[0],this.items[i].item[0])&&this.items[i].item[0]!==this.currentItem[0]&&(c&&!f(this.positionAbs.top+this.offset.click.top,this.items[i].top,this.items[i].height)||(h=this.items[i].item.offset()[o],l=!1,Math.abs(h-r)>Math.abs(h+this.items[i][a]-r)&&(l=!0,h+=this.items[i][a]),Math.abs(h-r)<s&&(s=Math.abs(h-r),n=this.items[i],this.direction=l?"up":"down")));if(!n&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[d])return;n?this._rearrange(t,n,null,!0):this._rearrange(t,null,this.containers[d].element,!0),this._trigger("change",t,this._uiHash()),this.containers[d]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[d],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[d]._trigger("over",t,this._uiHash(this)),this.containers[d].containerCache.over=1}},_createHelper:function(t){var e=this.options,i=p.isFunction(e.helper)?p(e.helper.apply(this.element[0],[t,this.currentItem])):"clone"===e.helper?this.currentItem.clone():this.currentItem;return i.parents("body").length||p("parent"!==e.appendTo?e.appendTo:this.currentItem[0].parentNode)[0].appendChild(i[0]),i[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),i[0].style.width&&!e.forceHelperSize||i.width(this.currentItem.width()),i[0].style.height&&!e.forceHelperSize||i.height(this.currentItem.height()),i},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),p.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&p.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&p.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,e,i,s=this.options;"parent"===s.containment&&(s.containment=this.helper[0].parentNode),"document"!==s.containment&&"window"!==s.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,p("document"===s.containment?document:window).width()-this.helperProportions.width-this.margins.left,(p("document"===s.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(s.containment)||(t=p(s.containment)[0],e=p(s.containment).offset(),i="hidden"!==p(t).css("overflow"),this.containment=[e.left+(parseInt(p(t).css("borderLeftWidth"),10)||0)+(parseInt(p(t).css("paddingLeft"),10)||0)-this.margins.left,e.top+(parseInt(p(t).css("borderTopWidth"),
vendor: 14,205 bytes, line 2
210)||0)+(parseInt(p(t).css("paddingTop"),10)||0)-this.margins.top,e.left+(i?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(p(t).css("borderLeftWidth"),10)||0)-(parseInt(p(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,e.top+(i?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(p(t).css("borderTopWidth"),10)||0)-(parseInt(p(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,s="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&p.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,n=/(html|body)/i.test(s[0].tagName);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():n?0:s.scrollTop())*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():n?0:s.scrollLeft())*i}},_generatePosition:function(t){var e,i,s=this.options,n=t.pageX,o=t.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&p.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,r=/(html|body)/i.test(a[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(n=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(o=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(n=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top)),s.grid&&(e=this.originalPageY+Math.round((o-this.originalPageY)/s.grid[1])*s.grid[1],o=this.containment?e-this.offset.click.top>=this.containment[1]&&e-this.offset.click.top<=this.containment[3]?e:e-this.offset.click.top>=this.containment[1]?e-s.grid[1]:e+s.grid[1]:e,i=this.originalPageX+Math.round((n-this.originalPageX)/s.grid[0])*s.grid[0],n=this.containment?i-this.offset.click.left>=this.containment[0]&&i-this.offset.click.left<=this.containment[2]?i:i-this.offset.click.left>=this.containment[0]?i-s.grid[0]:i+s.grid[0]:i)),{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():r?0:a.scrollTop()),left:n-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():r?0:a.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;0<=i;i--)e||s.push(function(e){return function(t){e._trigger("deactivate",t,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(function(e){return function(t){e._trigger("out",t,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!e){for(this._trigger("beforeStop",t,this._uiHash()),i=0;i<s.length;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1}if(e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!e){for(i=0;i<s.length;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return!(this.fromOutside=!1)},_trigger:function(){!1===p.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(t){var e=t||this;return{helper:e.helper,placeholder:e.placeholder||p([]),position:e.position,originalPosition:e.originalPosition,offset:e.positionAbs,item:e.currentItem,sender:t?t.element:null}}})}(jQuery),function(l,t){var n=0,d={},p={};d.height=d.paddingTop=d.paddingBottom=d.borderTopWidth=d.borderBottomWidth="hide",p.height=p.paddingTop=p.paddingBottom=p.borderTopWidth=p.borderBottomWidth="show",l.widget("ui.accordion",{version:"1.10.3",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var t=this.options;this.prevShow=this.prevHide=l(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),t.collapsible||!1!==t.active&&null!=t.active||(t.active=0),this._processPanels(),t.active<0&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():l(),content:this.active.length?this.active.next():l()}},_createIcons:function(){var t=this.options.icons;t&&(l("<span>").addClass("ui-accordion-header-icon ui-icon "+t.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){"active"!==t?("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||!1!==this.options.active||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),"disabled"===t&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!e)):this._activate(e)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var e=l.ui.keyCode,i=this.headers.length,s=this.headers.index(t.target),n=!1;switch(t.keyCode){case e.RIGHT:case e.DOWN:n=this.headers[(s+1)%i];break;case e.LEFT:case e.UP:n=this.headers[(s-1+i)%i];break;case e.SPACE:case e.ENTER:this._eventHandler(t);break;case e.HOME:n=this.headers[0];break;case e.END:n=this.headers[i-1]}n&&(l(t.target).attr("tabIndex",-1),l(n).attr("tabIndex",0),n.focus(),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===l.ui.keyCode.UP&&t.ctrlKey&&l(t.currentTarget).prev().focus()},refresh:function(){var t=this.options;this._processPanels(),!1===t.active&&!0===t.collapsible||!this.headers.length?(t.active=!1,this.active=l()):!1===t.active?this._activate(0):this.active.length&&!l.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=l()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var i,t=this.options,e=t.heightStyle,s=this.element.parent(),o=this.accordionId="ui-accordion-"+(this.element.attr("id")||++n);this.active=this._findActive(t.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(t){var e=l(this),i=e.attr("id"),s=e.next(),n=s.attr("id");i||(i=o+"-header-"+t,e.attr("id",i)),n||(n=o+"-panel-"+t,s.attr("id",n)),e.attr("aria-controls",n),s.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(t.event),"fill"===e?(i=s.height(),this.element.siblings(":visible").each(function(){var t=l(this),e=t.css("position");"absolute"!==e&&"fixed"!==e&&(i-=t.outerHeight(!0))}),this.headers.each(function(){i-=l(this).outerHeight(!0)}),this.headers.next().each(function(){l(this).height(Math.max(0,i-l(this).innerHeight()+l(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.headers.next().each(function(){i=Math.max(i,l(this).css("height","").height())}).height(i))},_activate:function(t){var e=this._findActive(t)[0];e!==this.active[0]&&(e=e||this.active[0],this._eventHandler({target:e,currentTarget:e,preventDefault:l.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):l()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&l.each(t.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var e=this.options,i=this.active,s=l(t.currentTarget),n=s[0]===i[0],o=n&&e.collapsible,a=o?l():s.next(),r=i.next(),h={oldHeader:i,oldPanel:r,newHeader:o?l():s,newPanel:a};t.preventDefault(),n&&!e.collapsible||!1===this._trigger("beforeActivate",t,h)||(e.active=!o&&this.headers.index(s),this.active=n?l():s,this._toggle(h),i.removeClass("ui-accordion-header-active ui-state-active"),e.icons&&i.children(".ui-accordion-header-icon").removeClass(e.icons.activeHeader).addClass(e.icons.header),n||(s.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),e.icons&&s.children(".ui-accordion-header-icon").removeClass(e.icons.header).addClass(e.icons.activeHeader),s.next().addClass("ui-accordion-content-active")))},_toggle:function(t){var e=t.newPanel,i=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=e,this.prevHide=i,this.options.animate?this._animate(e,i,t):(i.hide(),e.show(),this._toggleComplete(t)),i.attr({"aria-expanded":"false","aria-hidden":"true"}),i.prev().attr("aria-selected","false"),e.length&&i.length?i.prev().attr("tabIndex",-1):e.length&&this.headers.filter(function(){return 0===l(this).attr("tabIndex")}).attr("tabIndex",-1),e.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(t,i,e){var s,n,o,a=this,r=0,h=t.length&&(!i.length||t.index()<i.index()),l=this.options.animate||{},c=h&&l.down||l,u=function(){a._toggleComplete(e)};return"number"==typeof c&&(o=c),"string"==typeof c&&(n=c),n=n||c.easing||l.easing,o=o||c.duration||l.duration,i.length?t.length?(s=t.show().outerHeight(),i.animate(d,{duration:o,easing:n,step:function(t,e){e.now=Math.round(t)}}),void t.hide().animate(p,{duration:o,easing:n,complete:u,step:function(t,e){e.now=Math.round(t),"height"!==e.prop?r+=e.now:"content"!==a.options.heightStyle&&(e.now=Math.round(s-i.outerHeight()-r),r=0)}})):i.animate(d,o,n,u):t.animate(p,o,n,u)},_toggleComplete:function(t){var e=t.oldPanel;e.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}})}(jQuery),function(a,t){var s=0;a.widget("ui.autocomplete",{version:"1.10.3",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var i,s,n,t=this.element[0].nodeName.toLowerCase(),e="textarea"===t,o="input"===t;
vendor: 9,504 bytes, line 2
2this.isMultiLine=e||!o&&this.element.prop("isContentEditable"),this.valueMethod=this.element[e||o?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(t){if(this.element.prop("readOnly"))s=n=i=!0;else{s=n=i=!1;var e=a.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:i=!0,this._move("previousPage",t);break;case e.PAGE_DOWN:i=!0,this._move("nextPage",t);break;case e.UP:i=!0,this._keyEvent("previous",t);break;case e.DOWN:i=!0,this._keyEvent("next",t);break;case e.ENTER:case e.NUMPAD_ENTER:this.menu.active&&(i=!0,t.preventDefault(),this.menu.select(t));break;case e.TAB:this.menu.active&&this.menu.select(t);break;case e.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(t),t.preventDefault());break;default:s=!0,this._searchTimeout(t)}}},keypress:function(t){if(i)return i=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||t.preventDefault());if(!s){var e=a.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:this._move("previousPage",t);break;case e.PAGE_DOWN:this._move("nextPage",t);break;case e.UP:this._keyEvent("previous",t);break;case e.DOWN:this._keyEvent("next",t)}}},input:function(t){if(n)return n=!1,void t.preventDefault();this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){this.cancelBlur?delete this.cancelBlur:(clearTimeout(this.searching),this.close(t),this._change(t))}}),this._initSource(),this.menu=a("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];a(t.target).closest(".ui-menu-item").length||this._delay(function(){var e=this;this.document.one("mousedown",function(t){t.target===e.element[0]||t.target===i||a.contains(i,t.target)||e.close()})})},menufocus:function(t,e){if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){a(t.target).trigger(t.originalEvent)});var i=e.item.data("ui-autocomplete-item");!1!==this._trigger("focus",t,{item:i})?t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(i.value):this.liveRegion.text(i.value)},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=a("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?a(t):this.document.find(t).eq(0)),t||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_initSource:function(){var i,s,n=this;a.isArray(this.options.source)?(i=this.options.source,this.source=function(t,e){e(a.ui.autocomplete.filter(i,t.term))}):"string"==typeof this.options.source?(s=this.options.source,this.source=function(t,e){n.xhr&&n.xhr.abort(),n.xhr=a.ajax({url:s,data:t,dataType:"json",success:function(t){e(t)},error:function(){e([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):!1!==this._trigger("search",e)?this._search(t):void 0},_search:function(t){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=this,i=++s;return function(t){i===s&&e.__response(t),e.pending--,e.pending||e.element.removeClass("ui-autocomplete-loading")}},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:a.map(t,function(t){return"string"==typeof t?{label:t,value:t}:a.extend({label:t.label||t.value,value:t.value||t.label},t)})},_suggest:function(t){var e=this.menu.element.empty();this._renderMenu(e,t),this.isNewMenu=!0,this.menu.refresh(),e.show(),this._resizeMenu(),e.position(a.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(i,t){var s=this;a.each(t,function(t,e){s._renderItemData(i,e)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(t,e){return a("<li>").append(a("<a>").text(e.label)).appendTo(t)},_move:function(t,e){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this._value(this.term),void this.menu.blur()):void this.menu[t](e);this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())}}),a.extend(a.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,e){var i=new RegExp(a.ui.autocomplete.escapeRegex(e),"i");return a.grep(t,function(t){return i.test(t.label||t.value||t)})}}),a.widget("ui.autocomplete",a.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(1<t?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var e;this._superApply(arguments),this.options.disabled||this.cancelSearch||(e=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.text(e))}})}(jQuery),function(o,t){var a,r,h,l,c="ui-button ui-widget ui-state-default ui-corner-all",u="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",d=function(){var t=o(this);setTimeout(function(){t.find(":ui-button").button("refresh")},1)},p=function(t){var e=t.name,i=t.form,s=o([]);return e&&(e=e.replace(/'/g,"\\'"),s=i?o(i).find("[name='"+e+"']"):o("[name='"+e+"']",t.ownerDocument).filter(function(){return!this.form})),s};o.widget("ui.button",{version:"1.10.3",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,d),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var e=this,i=this.options,t="checkbox"===this.type||"radio"===this.type,s=t?"":"ui-state-active",n="ui-state-focus";null===i.label&&(i.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(c).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){i.disabled||this===a&&o(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){i.disabled||o(this).removeClass(s)}).bind("click"+this.eventNamespace,function(t){i.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}),this.element.bind("focus"+this.eventNamespace,function(){e.buttonElement.addClass(n)}).bind("blur"+this.eventNamespace,function(){e.buttonElement.removeClass(n)}),t&&(this.element.bind("change"+this.eventNamespace,function(){l||e.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(t){i.disabled||(l=!1,r=t.pageX,h=t.pageY)}).bind("mouseup"+this.eventNamespace,function(t){i.disabled||r===t.pageX&&h===t.pageY||(l=!0)})),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(i.disabled||l)return!1}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(i.disabled||l)return!1;o(this).addClass("ui-state-active"),e.buttonElement.attr("aria-pressed","true");var t=e.element[0];p(t).not(t).map(function(){return o(this).button("widget")[0]}
vendor: 5,497 bytes, line 2
2).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){if(i.disabled)return!1;o(this).addClass("ui-state-active"),a=this,e.document.one("mouseup",function(){a=null})}).bind("mouseup"+this.eventNamespace,function(){if(i.disabled)return!1;o(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(t){if(i.disabled)return!1;t.keyCode!==o.ui.keyCode.SPACE&&t.keyCode!==o.ui.keyCode.ENTER||o(this).addClass("ui-state-active")}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){o(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(t){t.keyCode===o.ui.keyCode.SPACE&&o(this).click()})),this._setOption("disabled",i.disabled),this._resetButton()},_determineButtonType:function(){var t,e,i;this.element.is("[type=checkbox]")?this.type="checkbox":this.element.is("[type=radio]")?this.type="radio":this.element.is("input")?this.type="input":this.type="button","checkbox"===this.type||"radio"===this.type?(t=this.element.parents().last(),e="label[for='"+this.element.attr("id")+"']",this.buttonElement=t.find(e),this.buttonElement.length||(t=t.length?t.siblings():this.element.siblings(),this.buttonElement=t.filter(e),this.buttonElement.length||(this.buttonElement=t.find(e))),this.element.addClass("ui-helper-hidden-accessible"),(i=this.element.is(":checked"))&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(c+" ui-state-hover ui-state-active "+u).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(t,e){this._super(t,e),"disabled"!==t?this._resetButton():e?this.element.prop("disabled",!0):this.element.prop("disabled",!1)},refresh:function(){var t=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOption("disabled",t),"radio"===this.type?p(this.element[0]).each(function(){o(this).is(":checked")?o(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):o(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"!==this.type){var t=this.buttonElement.removeClass(u),e=o("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(t.empty()).text(),i=this.options.icons,s=i.primary&&i.secondary,n=[];i.primary||i.secondary?(this.options.text&&n.push("ui-button-text-icon"+(s?"s":i.primary?"-primary":"-secondary")),i.primary&&t.prepend("<span class='ui-button-icon-primary ui-icon "+i.primary+"'></span>"),i.secondary&&t.append("<span class='ui-button-icon-secondary ui-icon "+i.secondary+"'></span>"),this.options.text||(n.push(s?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||t.attr("title",o.trim(e)))):n.push("ui-button-text-only"),t.addClass(n.join(" "))}else this.options.label&&this.element.val(this.options.label)}}),o.widget("ui.buttonset",{version:"1.10.3",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(t,e){"disabled"===t&&this.buttons.button("option",t,e),this._super(t,e)},refresh:function(){var t="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return o(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(t?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return o(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})}(jQuery),function(x,h){x.extend(x.ui,{datepicker:{version:"1.10.3"}});var n,u="datepicker";function t(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
2ay","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},x.extend(this._defaults,this.regional[""]),this.dpDiv=i(x("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function i(t){var e="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.delegate(e,"mouseout",function(){x(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&x(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&x(this).removeClass("ui-datepicker-next-hover")}).delegate(e,"mouseover",function(){x.datepicker._isDisabledDatepicker(n.inline?t.parent()[0]:n.input[0])||(x(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),x(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&x(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&x(this).addClass("ui-datepicker-next-hover"))})}function d(t,e){for(var i in x.extend(t,e),e)null==e[i]&&(t[i]=e[i]);return t}x.extend(t.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return d(this._defaults,t||{}),this},_attachDatepicker:function(t,e){var i,s,n;s="div"===(i=t.nodeName.toLowerCase())||"span"===i,t.id||(this.uuid+=1,t.id="dp"+this.uuid),(n=this._newInst(x(t),s)).settings=x.extend({},e||{}),"input"===i?this._connectDatepicker(t,n):s&&this._inlineDatepicker(t,n)},_newInst:function(t,e){return{id:t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:e,dpDiv:e?i(x("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,e){var i=x(t);e.append=x([]),e.trigger=x([]),i.hasClass(this.markerClassName)||(this._attachments(i,e),i.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(e),x.data(t,u,e),e.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,e){var i,s,n,o=this._get(e,"appendText"),a=this._get(e,"isRTL");e.append&&e.append.remove(),o&&(e.append=x("<span class='"+this._appendClass+"'>"+o+"</span>"),t[a?"before":"after"](e.append)),t.unbind("focus",this._showDatepicker),e.trigger&&e.trigger.remove(),"focus"!==(i=this._get(e,"showOn"))&&"both"!==i||t.focus(this._showDatepicker),"button"!==i&&"both"!==i||(s=this._get(e,"buttonText"),n=this._get(e,"buttonImage"),e.trigger=x(this._get(e,"buttonImageOnly")?x("<img/>").addClass(this._triggerClass).attr({src:n,alt:s,title:s}):x("<button type='button'></button>").addClass(this._triggerClass).html(n?x("<img/>").attr({src:n,alt:s,title:s}):s)),t[a?"before":"after"](e.trigger),e.trigger.click(function(){return x.datepicker._datepickerShowing&&x.datepicker._lastInput===t[0]?x.datepicker._hideDatepicker():(x.datepicker._datepickerShowing&&x.datepicker._lastInput!==t[0]&&x.datepicker._hideDatepicker(),x.datepicker._showDatepicker(t[0])),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,o=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(n=s=i=0;n<t.length;n++)t[n].length>i&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(t,e){var i=x(t);i.hasClass(this.markerClassName)||(i.addClass(this.markerClassName).append(e.dpDiv),x.data(t,u,e),this._setDate(e,this._getDefaultDate(e),!0),this._updateDatepicker(e),this._updateAlternate(e),e.settings.disabled&&this._disableDatepicker(t),e.dpDiv.css("display","block"))}
vendor: 8,826 bytes, line 2
2,_dialogDatepicker:function(t,e,i,s,n){var o,a,r,h,l,c=this._dialogInst;return c||(this.uuid+=1,o="dp"+this.uuid,this._dialogInput=x("<input type='text' id='"+o+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),x("body").append(this._dialogInput),(c=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},x.data(this._dialogInput[0],u,c)),d(c.settings,s||{}),e=e&&e.constructor===Date?this._formatDate(c,e):e,this._dialogInput.val(e),this._pos=n?n.length?n:[n.pageX,n.pageY]:null,this._pos||(a=document.documentElement.clientWidth,r=document.documentElement.clientHeight,h=document.documentElement.scrollLeft||document.body.scrollLeft,l=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[a/2-100+h,r/2-150+l]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),c.settings.onSelect=i,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),x.blockUI&&x.blockUI(this.dpDiv),x.data(this._dialogInput[0],u,c),this},_destroyDatepicker:function(t){var e,i=x(t),s=x.data(t,u);i.hasClass(this.markerClassName)&&(e=t.nodeName.toLowerCase(),x.removeData(t,u),"input"===e?(s.append.remove(),s.trigger.remove(),i.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):"div"!==e&&"span"!==e||i.removeClass(this.markerClassName).empty())},_enableDatepicker:function(e){var t,i,s=x(e),n=x.data(e,u);s.hasClass(this.markerClassName)&&("input"===(t=e.nodeName.toLowerCase())?(e.disabled=!1,n.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==t&&"span"!==t||((i=s.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=x.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var t,i,s=x(e),n=x.data(e,u);s.hasClass(this.markerClassName)&&("input"===(t=e.nodeName.toLowerCase())?(e.disabled=!0,n.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==t&&"span"!==t||((i=s.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=x.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;e<this._disabledInputs.length;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(t){try{return x.data(t,u)}catch(t){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(t,e,i){var s,n,o,a,r=this._getInst(t);if(2===arguments.length&&"string"==typeof e)return"defaults"===e?x.extend({},x.datepicker._defaults):r?"all"===e?x.extend({},r.settings):this._get(r,e):null;s=e||{},"string"==typeof e&&((s={})[e]=i),r&&(this._curInst===r&&this._hideDatepicker(),n=this._getDateDatepicker(t,!0),o=this._getMinMaxDate(r,"min"),a=this._getMinMaxDate(r,"max"),d(r.settings,s),null!==o&&s.dateFormat!==h&&s.minDate===h&&(r.settings.minDate=this._formatDate(r,o)),null!==a&&s.dateFormat!==h&&s.maxDate===h&&(r.settings.maxDate=this._formatDate(r,a)),"disabled"in s&&(s.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(x(t),r),this._autoSize(r),this._setDate(r,n),this._updateAlternate(r),this._updateDatepicker(r))},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(t){var e,i,s,n=x.datepicker._getInst(t.target),o=!0,a=n.dpDiv.is(".ui-datepicker-rtl");if(n._keyEvent=!0,x.datepicker._datepickerShowing)switch(t.keyCode){case 9:x.datepicker._hideDatepicker(),o=!1;break;case 13:return(s=x("td."+x.datepicker._dayOverClass+":not(."+x.datepicker._currentClass+")",n.dpDiv))[0]&&x.datepicker._selectDay(t.target,n.selectedMonth,n.selectedYear,s[0]),(e=x.datepicker._get(n,"onSelect"))?(i=x.datepicker._formatDate(n),e.apply(n.input?n.input[0]:null,[i,n])):x.datepicker._hideDatepicker(),!1;case 27:x.datepicker._hideDatepicker();break;case 33:x.datepicker._adjustDate(t.target,t.ctrlKey?-x.datepicker._get(n,"stepBigMonths"):-x.datepicker._get(n,"stepMonths"),"M");break;case 34:x.datepicker._adjustDate(t.target,t.ctrlKey?+x.datepicker._get(n,"stepBigMonths"):+x.datepicker._get(n,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&x.datepicker._clearDate(t.target),o=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&x.datepicker._gotoToday(t.target),o=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&x.datepicker._adjustDate(t.target,a?1:-1,"D"),o=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&x.datepicker._adjustDate(t.target,t.ctrlKey?-x.datepicker._get(n,"stepBigMonths"):-x.datepicker._get(n,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&x.datepicker._adjustDate(t.target,-7,"D"),o=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&x.datepicker._adjustDate(t.target,a?-1:1,"D"),o=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&x.datepicker._adjustDate(t.target,t.ctrlKey?+x.datepicker._get(n,"stepBigMonths"):+x.datepicker._get(n,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&x.datepicker._adjustDate(t.target,7,"D"),o=t.ctrlKey||t.metaKey;break;default:o=!1}else 36===t.keyCode&&t.ctrlKey?x.datepicker._showDatepicker(this):o=!1;o&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var e,i,s=x.datepicker._getInst(t.target);if(x.datepicker._get(s,"constrainInput"))return e=x.datepicker._possibleChars(x.datepicker._get(s,"dateFormat")),i=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||i<" "||!e||-1<e.indexOf(i)},_doKeyUp:function(t){var e=x.datepicker._getInst(t.target);if(e.input.val()!==e.lastVal)try{x.datepicker.parseDate(x.datepicker._get(e,"dateFormat"),e.input?e.input.val():null,x.datepicker._getFormatConfig(e))&&(x.datepicker._setDateFromField(e),x.datepicker._updateAlternate(e),x.datepicker._updateDatepicker(e))}catch(t){}return!0},_showDatepicker:function(t){var e,i,s,n,o,a,r;("input"!==(t=t.target||t).nodeName.toLowerCase()&&(t=x("input",t.parentNode)[0]),x.datepicker._isDisabledDatepicker(t)||x.datepicker._lastInput===t)||(e=x.datepicker._getInst(t),x.datepicker._curInst&&x.datepicker._curInst!==e&&(x.datepicker._curInst.dpDiv.stop(!0,!0),e&&x.datepicker._datepickerShowing&&x.datepicker._hideDatepicker(x.datepicker._curInst.input[0])),!1!==(s=(i=x.datepicker._get(e,"beforeShow"))?i.apply(t,[t,e]):{})&&(d(e.settings,s),e.lastVal=null,x.datepicker._lastInput=t,x.datepicker._setDateFromField(e),x.datepicker._inDialog&&(t.value=""),x.datepicker._pos||(x.datepicker._pos=x.datepicker._findPos(t),x.datepicker._pos[1]+=t.offsetHeight),n=!1,x(t).parents().each(function(){return!(n|="fixed"===x(this).css("position"))}),o={left:x.datepicker._pos[0],top:x.datepicker._pos[1]},x.datepicker._pos=null,e.dpDiv.empty(),e.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),x.datepicker._updateDatepicker(e),o=x.datepicker._checkOffset(e,o,n),e.dpDiv.css({position:x.datepicker._inDialog&&x.blockUI?"static":n?"fixed":"absolute",display:"none",left:o.left+"px",top:o.top+"px"}),e.inline||(a=x.datepicker._get(e,"showAnim"),r=x.datepicker._get(e,"duration"),e.dpDiv.zIndex(x(t).zIndex()+1),x.datepicker._datepickerShowing=!0,x.effects&&x.effects.effect[a]?e.dpDiv.show(a,x.datepicker._get(e,"showOptions"),r):e.dpDiv[a||"show"](a?r:null),x.datepicker._shouldFocusInput(e)&&e.input.focus(),x.datepicker._curInst=e)))},_updateDatepicker:function(t){this.maxRows=4,(n=t).dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t),t.dpDiv.find("."+this._dayOverClass+" a").mouseover();var e,i=this._getNumberOfMonths(t),s=i[1];t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),1<s&&t.dpDiv.addClass("ui-datepicker-multi-"+s).css("width",17*s+"em"),t.dpDiv[(1!==i[0]||1!==i[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===x.datepicker._curInst&&x.datepicker._datepickerShowing&&x.datepicker._shouldFocusInput(t)&&t.input.focus(),t.yearshtml&&(e=t.yearshtml,setTimeout(function(){e===t.yearshtml&&t.yearshtml&&t.dpDiv.f
vendor: 5,112 bytes, line 2
2ind("select.ui-datepicker-year:first").replaceWith(t.yearshtml),e=t.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(t,e,i){var s=t.dpDiv.outerWidth(),n=t.dpDiv.outerHeight(),o=t.input?t.input.outerWidth():0,a=t.input?t.input.outerHeight():0,r=document.documentElement.clientWidth+(i?0:x(document).scrollLeft()),h=document.documentElement.clientHeight+(i?0:x(document).scrollTop());return e.left-=this._get(t,"isRTL")?s-o:0,e.left-=i&&e.left===t.input.offset().left?x(document).scrollLeft():0,e.top-=i&&e.top===t.input.offset().top+a?x(document).scrollTop():0,e.left-=Math.min(e.left,e.left+s>r&&s<r?Math.abs(e.left+s-r):0),e.top-=Math.min(e.top,e.top+n>h&&n<h?Math.abs(n+a):0),e},_findPos:function(t){for(var e,i=this._getInst(t),s=this._get(i,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||x.expr.filters.hidden(t));)t=t[s?"previousSibling":"nextSibling"];return[(e=x(t).offset()).left,e.top]},_hideDatepicker:function(t){var e,i,s,n,o=this._curInst;!o||t&&o!==x.data(t,u)||this._datepickerShowing&&(e=this._get(o,"showAnim"),i=this._get(o,"duration"),s=function(){x.datepicker._tidyDialog(o)},x.effects&&(x.effects.effect[e]||x.effects[e])?o.dpDiv.hide(e,x.datepicker._get(o,"showOptions"),i,s):o.dpDiv["slideDown"===e?"slideUp":"fadeIn"===e?"fadeOut":"hide"](e?i:null,s),e||s(),this._datepickerShowing=!1,(n=this._get(o,"onClose"))&&n.apply(o.input?o.input[0]:null,[o.input?o.input.val():"",o]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),x.blockUI&&(x.unblockUI(),x("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(x.datepicker._curInst){var e=x(t.target),i=x.datepicker._getInst(e[0]);(e[0].id===x.datepicker._mainDivId||0!==e.parents("#"+x.datepicker._mainDivId).length||e.hasClass(x.datepicker.markerClassName)||e.closest("."+x.datepicker._triggerClass).length||!x.datepicker._datepickerShowing||x.datepicker._inDialog&&x.blockUI)&&(!e.hasClass(x.datepicker.markerClassName)||x.datepicker._curInst===i)||x.datepicker._hideDatepicker()}},_adjustDate:function(t,e,i){var s=x(t),n=this._getInst(s[0]);this._isDisabledDatepicker(s[0])||(this._adjustInstDate(n,e+("M"===i?this._get(n,"showCurrentAtPos"):0),i),this._updateDatepicker(n))},_gotoToday:function(t){var e,i=x(t),s=this._getInst(i[0]);this._get(s,"gotoCurrent")&&s.currentDay?(s.selectedDay=s.currentDay,s.drawMonth=s.selectedMonth=s.currentMonth,s.drawYear=s.selectedYear=s.currentYear):(e=new Date,s.selectedDay=e.getDate(),s.drawMonth=s.selectedMonth=e.getMonth(),s.drawYear=s.selectedYear=e.getFullYear()),this._notifyChange(s),this._adjustDate(i)},_selectMonthYear:function(t,e,i){var s=x(t),n=this._getInst(s[0]);n["selected"+("M"===i?"Month":"Year")]=n["draw"+("M"===i?"Month":"Year")]=parseInt(e.options[e.selectedIndex].value,10),this._notifyChange(n),this._adjustDate(s)},_selectDay:function(t,e,i,s){var n,o=x(t);x(s).hasClass(this._unselectableClass)||this._isDisabledDatepicker(o[0])||((n=this._getInst(o[0])).selectedDay=n.currentDay=x("a",s).html(),n.selectedMonth=n.currentMonth=e,n.selectedYear=n.currentYear=i,this._selectDate(t,this._formatDate(n,n.currentDay,n.currentMonth,n.currentYear)))},_clearDate:function(t){var e=x(t);this._selectDate(e,"")},_selectDate:function(t,e){var i,s=x(t),n=this._getInst(s[0]);e=null!=e?e:this._formatDate(n),n.input&&n.input.val(e),this._updateAlternate(n),(i=this._get(n,"onSelect"))?i.apply(n.input?n.input[0]:null,[e,n]):n.input&&n.input.trigger("change"),n.inline?this._updateDatepicker(n):(this._hideDatepicker(),this._lastInput=n.input[0],"object"!=typeof n.input[0]&&n.input.focus(),this._lastInput=null)},_updateAlternate:function(t){var e,i,s,n=this._get(t,"altField");n&&(e=this._get(t,"altFormat")||this._get(t,"dateFormat"),i=this._getDate(t),s=this.formatDate(e,i,this._getFormatConfig(t)),x(n).each(function(){x(this).val(s)}))},noWeekends:function(t){var e=t.getDay();return[0<e&&e<6,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(i,o,t){if(null==i||null==o)throw"Invalid arguments";if(""===(o="object"==typeof o?o.toString():o+""))return null;var s,e,n,a,r=0,h=(t?t.shortYearCutoff:null)||this._defaults.shortYearCutoff,l="string"!=typeof h?h:(new Date).getFullYear()%100+parseInt(h,10),c=(t?t.dayNamesShort:null)||this._defaults.dayNamesShort,u=(t?t.dayNames:null)||this._defaults.dayNames,d=(t?t.monthNamesShort:null)||this._defaults.monthNamesShort,p=(t?t.monthNames:null)||this._defaults.monthNames,f=-1,g=-1,m=-1,v=-1,_=!1,b=function(t){var e=s+1<i.length&&i.charAt(s+1)===t;return e&&s++,e},y=function(t){var e=b(t),i=new RegExp("^\\d{1,"+("@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2)+"}"),s=o.substring(r).match(i);if(!s)throw"Missing number at position "+r;return r+=s[0].length,parseInt(s[0],10)}
vendor: 4,755 bytes, line 2
2,w=function(t,e,i){var s=-1,n=x.map(b(t)?i:e,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(x.each(n,function(t,e){var i=e[1];if(o.substr(r,i.length).toLowerCase()===i.toLowerCase())return s=e[0],r+=i.length,!1}),-1!==s)return s+1;throw"Unknown name at position "+r},k=function(){if(o.charAt(r)!==i.charAt(s))throw"Unexpected literal at position "+r;r++};for(s=0;s<i.length;s++)if(_)"'"!==i.charAt(s)||b("'")?k():_=!1;else switch(i.charAt(s)){case"d":m=y("d");break;case"D":w("D",c,u);break;case"o":v=y("o");break;case"m":g=y("m");break;case"M":g=w("M",d,p);break;case"y":f=y("y");break;case"@":f=(a=new Date(y("@"))).getFullYear(),g=a.getMonth()+1,m=a.getDate();break;case"!":f=(a=new Date((y("!")-this._ticksTo1970)/1e4)).getFullYear(),g=a.getMonth()+1,m=a.getDate();break;case"'":b("'")?k():_=!0;break;default:k()}if(r<o.length&&(n=o.substr(r),!/^\s+/.test(n)))throw"Extra/unparsed characters found in date: "+n;if(-1===f?f=(new Date).getFullYear():f<100&&(f+=(new Date).getFullYear()-(new Date).getFullYear()%100+(f<=l?0:-100)),-1<v)for(g=1,m=v;;){if(m<=(e=this._getDaysInMonth(f,g-1)))break;g++,m-=e}if((a=this._daylightSavingAdjust(new Date(f,g-1,m))).getFullYear()!==f||a.getMonth()+1!==g||a.getDate()!==m)throw"Invalid date";return a},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(i,t,e){if(!t)return"";var s,n=(e?e.dayNamesShort:null)||this._defaults.dayNamesShort,o=(e?e.dayNames:null)||this._defaults.dayNames,a=(e?e.monthNamesShort:null)||this._defaults.monthNamesShort,r=(e?e.monthNames:null)||this._defaults.monthNames,h=function(t){var e=s+1<i.length&&i.charAt(s+1)===t;return e&&s++,e},l=function(t,e,i){var s=""+e;if(h(t))for(;s.length<i;)s="0"+s;return s},c=function(t,e,i,s){return h(t)?s[e]:i[e]},u="",d=!1;if(t)for(s=0;s<i.length;s++)if(d)"'"!==i.charAt(s)||h("'")?u+=i.charAt(s):d=!1;else switch(i.charAt(s)){case"d":u+=l("d",t.getDate(),2);break;case"D":u+=c("D",t.getDay(),n,o);break;case"o":u+=l("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=l("m",t.getMonth()+1,2);break;case"M":u+=c("M",t.getMonth(),a,r);break;case"y":u+=h("y")?t.getFullYear():(t.getYear()%100<10?"0":"")+t.getYear()%100;break;case"@":u+=t.getTime();break;case"!":u+=1e4*t.getTime()+this._ticksTo1970;break;case"'":h("'")?u+="'":d=!0;break;default:u+=i.charAt(s)}return u},_possibleChars:function(i){var s,t="",e=!1,n=function(t){var e=s+1<i.length&&i.charAt(s+1)===t;return e&&s++,e};for(s=0;s<i.length;s++)if(e)"'"!==i.charAt(s)||n("'")?t+=i.charAt(s):e=!1;else switch(i.charAt(s)){case"d":case"m":case"y":case"@":t+="0123456789";break;case"D":case"M":return null;case"'":n("'")?t+="'":e=!0;break;default:t+=i.charAt(s)}return t},_get:function(t,e){return t.settings[e]!==h?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,a=this._getFormatConfig(t);try{o=this.parseDate(i,s,a)||n}catch(t){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(r,t,e){var i,s,n=null==t||""===t?e:"string"==typeof t?function(t){try{return x.datepicker.parseDate(x.datepicker._get(r,"dateFormat"),t,x.datepicker._getFormatConfig(r))}catch(t){}for(var e=(t.toLowerCase().match(/^c/)?x.datepicker._getDate(r):null)||new Date,i=e.getFullYear(),s=e.getMonth(),n=e.getDate(),o=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,a=o.exec(t);a;){switch(a[2]||"d"){case"d":case"D":n+=parseInt(a[1],10);break;case"w":case"W":n+=7*parseInt(a[1],10);break;case"m":case"M":s+=parseInt(a[1],10),n=Math.min(n,x.datepicker._getDaysInMonth(i,s));break;case"y":case"Y":i+=parseInt(a[1],10),n=Math.min(n,x.datepicker._getDaysInMonth(i,s))}a=o.exec(t)}return new Date(i,s,n)}(t):"number"==typeof t?isNaN(t)?e:(i=t,(s=new Date).setDate(s.getDate()+i),s):new Date(t.getTime());return(n=n&&"Invalid Date"===n.toString()?e:n)&&(n.setHours(0),n.setMinutes(0),n.setSeconds(0),n.setMilliseconds(0)),this._daylightSavingAdjust(n)},_daylightSavingAdjust:function(t){return t?(t.setHours(12<t.getHours()?t.getHours()+2:0),t):null}
vendor: 4,298 bytes, line 2
2,_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){return!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay))},_attachHandlers:function(t){var e=this._get(t,"stepMonths"),i="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){x.datepicker._adjustDate(i,-e,"M")},next:function(){x.datepicker._adjustDate(i,+e,"M")},hide:function(){x.datepicker._hideDatepicker()},today:function(){x.datepicker._gotoToday(i)},selectDay:function(){return x.datepicker._selectDay(i,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return x.datepicker._selectMonthYear(i,this,"M"),!1},selectYear:function(){return x.datepicker._selectMonthYear(i,this,"Y"),!1}};x(this).bind(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,a,r,h,l,c,u,d,p,f,g,m,v,_,b,y,w,k,x,D,C,I,P,T,M,S,z,A,H,W,E,N,O,F,R,L=new Date,j=this._daylightSavingAdjust(new Date(L.getFullYear(),L.getMonth(),L.getDate())),Y=this._get(t,"isRTL"),B=this._get(t,"showButtonPanel"),K=this._get(t,"hideIfNoPrevNext"),U=this._get(t,"navigationAsDateFormat"),q=this._getNumberOfMonths(t),V=this._get(t,"showCurrentAtPos"),Q=this._get(t,"stepMonths"),X=1!==q[0]||1!==q[1],$=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),G=this._getMinMaxDate(t,"min"),J=this._getMinMaxDate(t,"max"),Z=t.drawMonth-V,tt=t.drawYear;if(Z<0&&(Z+=12,tt--),J)for(e=this._daylightSavingAdjust(new Date(J.getFullYear(),J.getMonth()-q[0]*q[1]+1,J.getDate())),e=G&&e<G?G:e;this._daylightSavingAdjust(new Date(tt,Z,1))>e;)--Z<0&&(Z=11,tt--);for(t.drawMonth=Z,t.drawYear=tt,i=this._get(t,"prevText"),i=U?this.formatDate(i,this._daylightSavingAdjust(new Date(tt,Z-Q,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,tt,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>":K?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=U?this.formatDate(n,this._daylightSavingAdjust(new Date(tt,Z+Q,1)),this._getFormatConfig(t)):n,o=this._canAdjustMonth(t,1,tt,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>":K?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>",a=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.currentDay?$:j,a=U?this.formatDate(a,r,this._getFormatConfig(t)):a,h=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",l=B?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Y?h:"")+(this._isInRange(t,r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+a+"</button>":"")+(Y?"":h)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),v=this._get(t,"showOtherMonths"),_=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",k=0;k<q[0];k++){for(x="",this.maxRows=4,D=0;D<q[1];D++){if(C=this._daylightSavingAdjust(new Date(tt,Z,t.selectedDay)),I=" ui-corner-all",P="",X){if(P+="<div class='ui-datepicker-group",1<q[1])switch(D){case 0:P
vendor: 4,705 bytes, line 2
2+=" ui-datepicker-group-first",I=" ui-corner-"+(Y?"right":"left");break;case q[1]-1:P+=" ui-datepicker-group-last",I=" ui-corner-"+(Y?"left":"right");break;default:P+=" ui-datepicker-group-middle",I=""}P+="'>"}for(P+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+I+"'>"+(/all|left/.test(I)&&0===k?Y?o:s:"")+(/all|right/.test(I)&&0===k?Y?s:o:"")+this._generateMonthYearHeader(t,Z,tt,G,J,0<k||0<D,f,g)+"</div><table class='ui-datepicker-calendar'><thead><tr>",T=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;w<7;w++)T+="<th"+(5<=(w+c+6)%7?" class='ui-datepicker-week-end'":"")+"><span title='"+d[M=(w+c)%7]+"'>"+p[M]+"</span></th>";for(P+=T+"</tr></thead><tbody>",S=this._getDaysInMonth(tt,Z),tt===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,S)),z=(this._getFirstDayOfMonth(tt,Z)-c+7)%7,A=Math.ceil((z+S)/7),H=X&&this.maxRows>A?this.maxRows:A,this.maxRows=H,W=this._daylightSavingAdjust(new Date(tt,Z,1-z)),E=0;E<H;E++){for(P+="<tr>",N=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(W)+"</td>":"",w=0;w<7;w++)O=m?m.apply(t.input?t.input[0]:null,[W]):[!0,""],R=(F=W.getMonth()!==Z)&&!_||!O[0]||G&&W<G||J&&J<W,N+="<td class='"+(5<=(w+c+6)%7?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(W.getTime()===C.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===W.getTime()&&b.getTime()===C.getTime()?" "+this._dayOverClass:"")+(R?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!v?"":" "+O[1]+(W.getTime()===$.getTime()?" "+this._currentClass:"")+(W.getTime()===j.getTime()?" ui-datepicker-today":""))+"'"+(F&&!v||!O[2]?"":" title='"+O[2].replace(/'/g,"'")+"'")+(R?"":" data-handler='selectDay' data-event='click' data-month='"+W.getMonth()+"' data-year='"+W.getFullYear()+"'")+">"+(F&&!v?" ":R?"<span class='ui-state-default'>"+W.getDate()+"</span>":"<a class='ui-state-default"+(W.getTime()===j.getTime()?" ui-state-highlight":"")+(W.getTime()===$.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#'>"+W.getDate()+"</a>")+"</td>",W.setDate(W.getDate()+1),W=this._daylightSavingAdjust(W);P+=N+"</tr>"}11<++Z&&(Z=0,tt++),x+=P+="</tbody></table>"+(X?"</div>"+(0<q[0]&&D===q[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"")}y+=x}return y+=l,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var h,l,c,u,d,p,f,g,m=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),_=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(o||!m)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;c<12;c++)(!h||c>=s.getMonth())&&(!l||c<=n.getMonth())&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(_||(b+=y+(!o&&m&&v?"":" ")),!t.yearshtml)if(t.yearshtml="",o||!v)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),f=(p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e})(u[0]),g=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,g=n?Math.min(g,n.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";f<=g;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),_&&(b+=(!o&&m&&v?"":" ")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.drawYear+("Y"===i?e:0),n=t.drawMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,o)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),"M"!==i&&"Y"!==i||this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&e<i?i:e;return s&&s<n?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()}
vendor: 26,321 bytes, line 2
2,_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,s+(e<0?e:n[0]*n[1]),1));return e<0&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),a=null,r=null,h=this._get(t,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),a=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||e.getTime()>=n.getTime())&&(!o||e.getTime()<=o.getTime())&&(!a||e.getFullYear()>=a)&&(!r||e.getFullYear()<=r)},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return{shortYearCutoff:e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),x.fn.datepicker=function(t){if(!this.length)return this;x.datepicker.initialized||(x(document).mousedown(x.datepicker._checkExternalClick),x.datepicker.initialized=!0),0===x("#"+x.datepicker._mainDivId).length&&x("body").append(x.datepicker.dpDiv);var e=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?x.datepicker["_"+t+"Datepicker"].apply(x.datepicker,[this[0]].concat(e)):this.each(function(){"string"==typeof t?x.datepicker["_"+t+"Datepicker"].apply(x.datepicker,[this].concat(e)):x.datepicker._attachDatepicker(this,t)}):x.datepicker["_"+t+"Datepicker"].apply(x.datepicker,[this[0]].concat(e))},x.datepicker=new t,x.datepicker.initialized=!1,x.datepicker.uuid=(new Date).getTime(),x.datepicker.version="1.10.3"}(jQuery),function(a,t){var o={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},r={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};a.widget("ui.dialog",{version:"1.10.3",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var e=a(this).css(t).offset().top;e<0&&a(this).css("top",t.top-e)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&a.fn.draggable&&this._makeDraggable(),this.options.resizable&&a.fn.resizable&&this._makeResizable(),this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?a(t):this.document.find(t||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),(t=e.parent.children().eq(e.index)).length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:a.noop,enable:a.noop,close:function(t){var e=this;this._isOpen&&!1!==this._trigger("beforeClose",t)&&(this._isOpen=!1,this._destroyOverlay(),this.opener.filter(":focusable").focus().length||a(this.document[0].activeElement).blur(),this._hide(this.uiDialog,this.options.hide,function(){e._trigger("close",t)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,e){var i=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return i&&!e&&this._trigger("focus",t),i},open:function(){var t=this;this._isOpen?this._moveToTop()&&this._focusTabbable():(this._isOpen=!0,this.opener=a(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable(),t._trigger("focus")}),this._trigger("open"))},_focusTabbable:function(){var t=this.element.find("[autofocus]");t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).focus()},_keepFocus:function(t){function e(){var t=this.document[0].activeElement;this.uiDialog[0]===t||a.contains(this.uiDialog[0],t)||this._focusTabbable()}t.preventDefault(),e.call(this),this._delay(e)},_createWrapper:function(){this.uiDialog=a("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===a.ui.keyCode.ESCAPE)return t.preventDefault(),void this.close(t);if(t.keyCode===a.ui.keyCode.TAB){var e=this.uiDialog.find(":tabbable"),i=e.filter(":first"),s=e.filter(":last");t.target!==s[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==i[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(s.focus(1),t.preventDefault()):(i.focus(1),t.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=a("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(t){a(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=a("<button></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),t=a("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(t),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(t){this.options.title||t.html(" "),t.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=a("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=a("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var n=this,t=this.options.buttons;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),a.isEmptyObject(t)||a.isArray(t)&&!t.length?this.uiDialog.removeClass("ui-dialog-buttons"):(a.each(t,function(t,e){var i,s;e=a.isFunction(e)?{click:e,text:t}:e,e=a.extend({type:"button"},e),i=e.click,e.click=function(){i.apply(n.element[0],arguments)},s={icons:e.icons,text:e.showText},delete e.icons,delete e.showText,a("<button></button>",e).button(s).appendTo(n.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){var i=this,s=this.options;function n(t){return{position:t.position,offset:t.offset}}this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(t,e){a(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",t,n(e))},drag:function(t,e){i._trigger("drag",t,n(e))},stop:function(t,e){s.position=[e.position.left-i.document.scrollLeft(),e.position.top-i.document.scrollTop()],a(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",t,n(e))}})},_makeResizable:function(){var i=this,s=this.options,t=s.resizable,e=this.uiDialog.css("position"),n="string"==typeof t?t:"n,e,s,w,se,sw,ne,nw";function o(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:n,start:function(t,e){a(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",t,o(e))},resize:function(t,e){i._trigger("resize",t,o(e))},stop:function(t,e){s.height=a(this).height(),s.width=a(this).width(),a(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",t,o(e))}}).css("position",e)},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(t){var i=this,s=!1,n={};a.each(t,function(t,e){i._setOption(t,e),t in o&&(s=!0),t in r&&(n[t]=e)}),s&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(t,e){var i,s,n=this.uiDialog;"dialogClass"===t&&n.removeClass(this.options.dialogClass).addClass(e),"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:""+e}),"draggable"===t&&((i=n.is(":data(ui-draggable)"))&&!e&&n.draggable("destroy"),!i&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&((s=n.is(":data(ui-resizable)"))&&!e&&n.resizable("destroy"),s&&"string"==typeof e&&n.resizable("option","handles",e),s||!1===e||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=a(this);return a("<div>").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return!!a(t.target).closest(".ui-dialog").length||!!a(t.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=this,i=this.widgetFullName;a.ui.dialog.overlayInstances||this._delay(function(){a.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(t){e._allowInteraction(t)||(t.preventDefault(),a(".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())})}),this.overlay=a("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),a.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(a.ui.dialog.overlayInstances--,a.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),a.ui.dialog.overlayInstances=0,!1!==a.uiBackCompat&&a.widget("ui.dialog",a.ui.dialog,{_position:function(){var t,e=this.options.position,i=[],s=[0,0];e=e?(("string"==typeof e||"object"==typeof e&&"0"in e)&&(1===(i=e.split?e.split(" "):[e[0],e[1]]).length&&(i[1]=i[0]),a.each(["left","top"],function(t,e){+i[t]===i[t]&&(s[t]=i[t],i[t]=e)}),e={my:i[0]+(s[0]<0?s[0]:"+"+s[0])+" "+i[1]+(s[1]<0?s[1]:"+"+s[1]),at:i.join(" ")}),a.extend({},a.ui.dialog.prototype.options.position,e)):a.ui.dialog.prototype.options.position,(t=this.uiDialog.is(":visible"))||this.uiDialog.show(),this.uiDialog.position(e),t||this.uiDialog.hide()}})}(jQuery),function(h,t){h.widget("ui.menu",{version:"1.10.3",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,h.proxy(function(t){this.options.disabled&&t.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(t){t.preventDefault()},"click .ui-state-disabled > a":function(t){t.preventDefault()},"click .ui-menu-item:has(a)":function(t){var e=h(t.target).closest(".ui-menu-item");!this.mouseHandled&&e.not(".ui-state-disabled").length&&(this.mouseHandled=!0,this.select(t),e.has(".ui-menu").length?this.expand(t):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){var e=h(t.currentTarget);e.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(t,e)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.children(".ui-menu-item").eq(0);e||this.focus(t,i)},blur:function(t){this._delay(function(){h.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){h(t.target).closest(".ui-menu").length||this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var t=h(this);t.data("ui-menu-submenu-carat")&&t.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(t){var e,i,s,n,o,a=!0;function r(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}switch(t.keyCode){case h.ui.keyCode.PAGE_UP:this.previousPage(t);break;case h.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case h.ui.keyCode.HOME:this._move("first","first",t);break;case h.ui.keyCode.END:this._move("last","last",t);break;case h.ui.keyCode.UP:this.previous(t);break;case h.ui.keyCode.DOWN:this.next(t);break;case h.ui.keyCode.LEFT:this.collapse(t);break;case h.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case h.ui.keyCode.ENTER:case h.ui.keyCode.SPACE:this._activate(t);break;case h.ui.keyCode.ESCAPE:this.collapse(t);break;default:a=!1,i=this.previousFilter||"",s=String.fromCharCode(t.keyCode),n=!1,clearTimeout(this.filterTimer),s===i?n=!0:s=i+s,o=new RegExp("^"+r(s),"i"),e=this.activeMenu.children(".ui-menu-item").filter(function(){return o.test(h(this).children("a").text())}),(e=n&&-1!==e.index(this.active.next())?this.active.nextAll(".ui-menu-item"):e).length||(s=String.fromCharCode(t.keyCode),o=new RegExp("^"+r(s),"i"),e=this.activeMenu.children(".ui-menu-item").filter(function(){return o.test(h(this).children("a").text())})),e.length?(this.focus(t,e),1<e.length?(this.previousFilter=s,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}a&&t.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var t,s=this.options.icons.submenu,e=this.element.find(this.options.menus);e.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=h(this),e=t.prev("a"),i=h("<span>").addClass("ui-menu-icon ui-icon "+s).data("ui-menu-submenu-carat",!0);e.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",e.attr("id"))}),(t=e.add(this.element)).children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),t.children(":not(.ui-menu-item)").each(function(){var t=h(this);/[^\-\u2014\u2013\s]/.test(t.text())||t.addClass("ui-widget-content ui-menu-divider")}),t.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!h.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),this._super(t,e)},focus:function(t,e){var i,s;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(i=e.children(".ui-menu")).length&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(t){var e,i,s,n,o,a;this._hasScroll()&&(e=parseFloat(h.css(this.activeMenu[0],"borderTopWidth"))||0,i=parseFloat(h.css(this.activeMenu[0],"paddingTop"))||0,s=t.offset().top-this.activeMenu.offset().top-e-i,n=this.activeMenu.scrollTop(),o=this.activeMenu.height(),a=t.height(),s<0?this.activeMenu.scrollTop(n+s):o<s+a&&this.activeMenu.scrollTop(n+s-o+a))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(t){var e=h.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(e)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var t=i?this.element:h(e&&e.target).closest(this.element.find(".ui-menu"));t.length||(t=this.element),this._close(t),this.blur(e),this.activeMenu=t},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.children(".ui-menu-item")[e]()),this.focus(i,s)},nextPage:function(t){var e,i,s;this.active?this.isLastItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return(e=h(this)).offset().top-i-s<0}),this.focus(t,e)):this.focus(t,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())):this.next(t)},previousPage:function(t){var e,i,s;this.active?this.isFirstItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return 0<(e=h(this)).offset().top-i+s}),this.focus(t,e)):this.focus(t,this.activeMenu.children(".ui-menu-item").first())):this.next(t)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||h(t.target).closest(".ui-menu-item");var e={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,e)}})}(jQuery),function(i,t){i.widget("ui.progressbar",{version:"1.10.3",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=i("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(t){if(void 0===t)return this.options.value;this.options.value=this._constrainedValue(t),this._refreshValue()},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=!1===t,"number"!=typeof t&&(t=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var t=this.options.value,e=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).toggleClass("ui-corner-right",t===this.options.max).width(e.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=i("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":t}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==t&&(this.oldValue=t,this._trigger("change")),t===this.options.max&&this._trigger("complete")}})}(jQuery),function(c,t){c.widget("ui.slider",c.ui.mouse,{version:"1.10.3",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,e,i=this.options,s=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),n=[];for(e=i.values&&i.values.length||1,s.length>e&&(s.slice(e).remove(),s=s.slice(0,e)),t=s.length;t<e;t++)n.push("<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>");this.handles=s.add(c(n.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(t){c(this).data("ui-slider-handle-index",t)})},_createRange:function(){var t=this.options,e="";t.range?(!0===t.range&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:c.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=c("<div></div>").appendTo(this.element),e="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(e+("min"===t.range||"max"===t.range?" ui-slider-range-"+t.range:""))):this.range=c([])},_setupEvents:function(){var t=this.handles.add(this.range).filter("a");this._off(t),this._on(t,this._handleEvents),this._hoverable(t),this._focusable(t)}
2,_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(t){var e,i,s,n,o,a,r,h=this,l=this.options;return!l.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e),s=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var e=Math.abs(i-h.values(t));(e<s||s===e&&(t===h._lastChangedValue||h.values(t)===l.min))&&(s=e,n=c(this),o=t)}),!1!==this._start(t,o)&&(this._mouseSliding=!0,this._handleIndex=o,n.addClass("ui-state-active").focus(),a=n.offset(),r=!c(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=r?{left:0,top:0}:{left:t.pageX-a.left-n.width()/2,top:t.pageY-a.top-n.height()/2-(parseInt(n.css("borderTopWidth"),10)||0)-(parseInt(n.css("borderBottomWidth"),10)||0)+(parseInt(n.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,o,i),this._animateOff=!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n;return 1<(i=("horizontal"===this.orientation?(e=this.elementSize.width,t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)))/e)&&(i=1),i<0&&(i=0),"vertical"===this.orientation&&(i=1-i),s=this._valueMax()-this._valueMin(),n=this._valueMin()+i*s,this._trimAlignValue(n)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var s,n,o;this.options.values&&this.options.values.length?(s=this.values(e?0:1),2===this.options.values.length&&!0===this.options.range&&(0===e&&s<i||1===e&&i<s)&&(i=s),i!==this.values(e)&&((n=this.values())[e]=i,o=this._trigger("slide",t,{handle:this.handles[e],value:i,values:n}),s=this.values(e?0:1),!1!==o&&this.values(e,i,!0))):i!==this.value()&&!1!==(o=this._trigger("slide",t,{handle:this.handles[e],value:i}))&&this.value(i)},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._lastChangedValue=e,this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),void this._change(null,0)):this._value()},values:function(t,e){var i,s,n;if(1<arguments.length)return this.options.values[t]=this._trimAlignValue(e),this._refreshValue(),void this._change(null,t);if(!arguments.length)return this._values();if(!c.isArray(t))return this.options.values&&this.options.values.length?this._values(t):this.value();for(i=this.options.values,s=t,n=0;n<i.length;n+=1)i[n]=this._trimAlignValue(s[n]),this._change(null,n);this._refreshValue()},_setOption:function(t,e){var i,s=0;switch("range"===t&&!0===this.options.range&&("min"===e?(this.options.value=this._values(0),this.options.values=null):"max"===e&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),c.isArray(this.options.values)&&(s=this.options.values.length),c.Widget.prototype._setOption.apply(this,arguments),t){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),i=0;i<s;i+=1)this._change(null,i);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;s<i.length;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(t<=this._valueMin())return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=0<this.options.step?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=0<i?e:-e),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,t,s,n,o=this.options.range,a=this.options,r=this,h=!this._animateOff&&a.animate,l={};this.options.values&&this.options.values.length?this.handles.each(function(t){i=(r.values(t)-r._valueMin())/(r._valueMax()-r._valueMin())*100,l["horizontal"===r.orientation?"left":"bottom"]=i+"%",c(this).stop(1,1)[h?"animate":"css"](l,a.animate),!0===r.options.range&&("horizontal"===r.orientation?(0===t&&r.range.stop(1,
vendor: 3,164 bytes, line 2
21)[h?"animate":"css"]({left:i+"%"},a.animate),1===t&&r.range[h?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:a.animate})):(0===t&&r.range.stop(1,1)[h?"animate":"css"]({bottom:i+"%"},a.animate),1===t&&r.range[h?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:a.animate}))),e=i}):(t=this.value(),s=this._valueMin(),n=this._valueMax(),i=n!==s?(t-s)/(n-s)*100:0,l["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[h?"animate":"css"](l,a.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:i+"%"},a.animate),"max"===o&&"horizontal"===this.orientation&&this.range[h?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:a.animate}),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:i+"%"},a.animate),"max"===o&&"vertical"===this.orientation&&this.range[h?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:a.animate}))},_handleEvents:{keydown:function(t){var e,i,s,n=c(t.target).data("ui-slider-handle-index");switch(t.keyCode){case c.ui.keyCode.HOME:case c.ui.keyCode.END:case c.ui.keyCode.PAGE_UP:case c.ui.keyCode.PAGE_DOWN:case c.ui.keyCode.UP:case c.ui.keyCode.RIGHT:case c.ui.keyCode.DOWN:case c.ui.keyCode.LEFT:if(t.preventDefault(),!this._keySliding&&(this._keySliding=!0,c(t.target).addClass("ui-state-active"),!1===this._start(t,n)))return}switch(s=this.options.step,e=i=this.options.values&&this.options.values.length?this.values(n):this.value(),t.keyCode){case c.ui.keyCode.HOME:i=this._valueMin();break;case c.ui.keyCode.END:i=this._valueMax();break;case c.ui.keyCode.PAGE_UP:i=this._trimAlignValue(e+(this._valueMax()-this._valueMin())/5);break;case c.ui.keyCode.PAGE_DOWN:i=this._trimAlignValue(e-(this._valueMax()-this._valueMin())/5);break;case c.ui.keyCode.UP:case c.ui.keyCode.RIGHT:if(e===this._valueMax())return;i=this._trimAlignValue(e+s);break;case c.ui.keyCode.DOWN:case c.ui.keyCode.LEFT:if(e===this._valueMin())return;i=this._trimAlignValue(e-s)}this._slide(t,n,i)},click:function(t){t.preventDefault()},keyup:function(t){var e=c(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,e),this._change(t,e),c(t.target).removeClass("ui-state-active"))}}})}(jQuery),function(o){function e(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}o.widget("ui.spinner",{version:"1.10.3",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var s={},n=this.element;return o.each(["min","max","step"],function(t,e){var i=n.attr(e);void 0!==i&&i.length&&(s[e]=i)}),s}
2,_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){this.cancelBlur?delete this.cancelBlur:(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t))},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((0<e?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(t){var e;function i(){this.element[0]===this.document[0].activeElement||(this.element.focus(),this.previous=e,this._delay(function(){this.previous=e}))}e=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),t.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),!1!==this._start(t)&&this._repeat(null,o(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){if(o(t.currentTarget).hasClass("ui-state-active"))return!1!==this._start(t)&&void this._repeat(null,o(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var t=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=t.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*t.height())&&0<t.height()&&t.height(t.height()),this.options.disabled&&this.disable()},_keydown:function(t){var e=this.options,i=o.ui.keyCode;switch(t.keyCode){case i.UP:return this._repeat(null,1,t),!0;case i.DOWN:return this._repeat(null,-1,t),!0;case i.PAGE_UP:return this._repeat(null,e.page,t),!0;case i.PAGE_DOWN:return this._repeat(null,-e.page,t),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>▲</span></a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon "+this.options.icons.down+"'>▼</span></a>"},_start:function(t){return!(!this.spinning&&!1===this._trigger("start",t))&&(this.counter||(this.counter=1),this.spinning=!0)},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&!1===this._trigger("spin",e,{value:i})||(this._value(i),this.counter++)},_increment:function(t){var e=this.options.incremental;return e?o.isFunction(e)?e(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=t.toString(),i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return i=t-(e=null!==s.min?s.min:0),t=e+(i=Math.round(i/s.step)*s.step),t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&t<s.min?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){if("culture"===t||"numberFormat"===t){var i=this._parse(this.element.val());return this.options[t]=e,void this.element.val(this._format(i))}"max"!==t&&"min"!==t&&"step"!==t||"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(e.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(e.down)),this._super(t,e),"disabled"===t&&(e?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:e(function(t){this._super(t),this._value(this.element.val())}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(t,e){var i;""!==t&&null!==(i=this._parse(t))&&(e||(i=this._adjustValue(i)),t=this._format(i)),this.element.val(t),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:e(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:e(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:e(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:e(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){if(!arguments.length)return this._parse(this.element.val());e(this._value).call(this,t)},widget:function(){return this.uiSpinner}}
vendor: 11,120 bytes, line 2
2)}(jQuery),function(l,t){var e=0,i=/#.*$/;function c(t){return 1<t.hash.length&&decodeURIComponent(t.href.replace(i,""))===decodeURIComponent(location.href.replace(i,""))}l.widget("ui.tabs",{version:"1.10.3",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var e=this,t=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",t.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(t){l(this).is(".ui-state-disabled")&&t.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){l(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),t.active=this._initialActive(),l.isArray(t.disabled)&&(t.disabled=l.unique(t.disabled.concat(l.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),!1!==this.options.active&&this.anchors.length?this.active=this._findActive(t.active):this.active=l(),this._refresh(),this.active.length&&this.load(t.active)},_initialActive:function(){var i=this.options.active,t=this.options.collapsible,s=location.hash.substring(1);return null===i&&(s&&this.tabs.each(function(t,e){if(l(e).attr("aria-controls")===s)return i=t,!1}),null===i&&(i=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),null!==i&&-1!==i||(i=!!this.tabs.length&&0)),!1!==i&&-1===(i=this.tabs.index(this.tabs.eq(i)))&&(i=!t&&0),!t&&!1===i&&this.anchors.length&&(i=0),i},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):l()}},_tabKeydown:function(t){var e=l(this.document[0].activeElement).closest("li"),i=this.tabs.index(e),s=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case l.ui.keyCode.RIGHT:case l.ui.keyCode.DOWN:i++;break;case l.ui.keyCode.UP:case l.ui.keyCode.LEFT:s=!1,i--;break;case l.ui.keyCode.END:i=this.anchors.length-1;break;case l.ui.keyCode.HOME:i=0;break;case l.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),void this._activate(i);case l.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),void this._activate(i!==this.options.active&&i);default:return}t.preventDefault(),clearTimeout(this.activating),i=this._focusNextTab(i,s),t.ctrlKey||(e.attr("aria-selected","false"),this.tabs.eq(i).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",i)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===l.ui.keyCode.UP&&(t.preventDefault(),this.active.focus())},_handlePageNav:function(t){return t.altKey&&t.keyCode===l.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===l.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,e){var i=this.tabs.length-1;for(;-1!==l.inArray((i<t&&(t=0),t<0&&(t=i),t),this.options.disabled);)t=e?t+1:t-1;return t},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).focus(),t},_setOption:function(t,e){"active"!==t?"disabled"!==t?(this._super(t,e),"collapsible"===t&&(this.element.toggleClass("ui-tabs-collapsible",e),e||!1!==this.options.active||this._activate(0)),"event"===t&&this._setupEvents(e),"heightStyle"===t&&this._setupHeightStyle(e)):this._setupDisabled(e):this._activate(e)},_tabId:function(t){return t.attr("aria-controls")||"ui-tabs-"+ ++e},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,e=this.tablist.children(":has(a[href])");t.disabled=l.map(e.filter(".ui-state-disabled"),function(t){return e.index(t)}),this._processTabs(),!1!==t.active&&this.anchors.length?this.active.length&&!l.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=l()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=l()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var h=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return l("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=l(),this.anchors.each(function(t,e){var i,s,n,o=l(e).uniqueId().attr("id"),a=l(e).closest("li"),r=a.attr("aria-controls");c(e)?(i=e.hash,s=h.element.find(h._sanitizeSelector(i))):(i="#"+(n=h._tabId(a)),(s=h.element.find(i)).length||(s=h._createPanel(n)).insertAfter(h.panels[t-1]||h.tablist),s.attr("aria-live","polite")),s.length&&(h.panels=h.panels.add(s)),r&&a.data("ui-tabs-aria-controls",r),a.attr({"aria-controls":i.substring(1),"aria-labelledby":o}),s.attr("aria-labelledby",o)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(t){return l("<div>").attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(t){l.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1);for(var e,i=0;e=this.tabs[i];i++)!0===t||-1!==l.inArray(i,t)?l(e).addClass("ui-state-disabled").attr("aria-disabled","true"):l(e).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=t},_setupEvents:function(t){var i={click:function(t){t.preventDefault()}};t&&l.each(t.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,e=this.element.parent();"fill"===t?(i=e.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=l(this),e=t.css("position");"absolute"!==e&&"fixed"!==e&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=l(this).outerHeight(!0)}),this.panels.each(function(){l(this).height(Math.max(0,i-l(this).innerHeight()+l(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each(function(){i=Math.max(i,l(this).height("").height())}).height(i))},_eventHandler:function(t){var e=this.options,i=this.active,s=l(t.currentTarget).closest("li"),n=s[0]===i[0],o=n&&e.collapsible,a=o?l():this._getPanelForTab(s),r=i.length?this._getPanelForTab(i):l(),h={oldTab:i,oldPanel:r,newTab:o?l():s,newPanel:a};t.preventDefault(),s.hasClass("ui-state-disabled")||s.hasClass("ui-tabs-loading")||this.running||n&&!e.collapsible||!1===this._trigger("beforeActivate",t,h)||(e.active=!o&&this.tabs.index(s),this.active=n?l():s,this.xhr&&this.xhr.abort(),r.length||a.length||l.error("jQuery UI Tabs: Mismatching fragment identifier."),a.length&&this.load(this.tabs.index(s),t),this._toggle(t,h))},_toggle:function(t,e){var i=this,s=e.newPanel,n=e.oldPanel;function o(){i.running=!1,i._trigger("activate",t,e)}function a(){e.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),s.length&&i.options.show?i._show(s,i.options.show,o):(s.show(),o())}this.running=!0,n.length&&this.options.hide?this._hide(n,this.options.hide,function(){e.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),a()}):(e.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n.hide(),a()),n.attr({"aria-expanded":"false","aria-hidden":"true"}),e.oldTab.attr("aria-selected","false"),s.length&&n.length?e.oldTab.attr("tabIndex",-1):s.length&&this.tabs.filter(function(){return 0===l(this).attr("tabIndex")}).attr("tabIndex",-1),s.attr({"aria-expanded":"true","aria-hidden":"false"}),e.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(t){var e,i=this._findActive(t);i[0]!==this.active[0]&&(i.length||(i=this.active),e=i.find(".ui-tabs-anchor")[0],this._eventHandler({target:e,currentTarget:e,preventDefault:l.noop}))},_findActive:function(t){return!1===t?l():this.tabs.eq(t)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+t+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){l.data(this,"ui-tabs-destroy")?l(this).remove():l(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var t=l(this),e=t.data("ui-tabs-aria-controls");e?t.attr("aria-controls",e).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var t=this.options.disabled;!1!==t&&(t=void 0!==i&&(i=this._getIndex(i),l.isArray(t)?l.map(t,function(t){return t!==i?t:null}):l.map(this.tabs,function(t,e){return e!==i?e:null})),this._setupDisabled(t))},disable:function(t){var e=this.options.disabled;if(!0!==e){if(void 0===t)e=!0;else{if(t=this._getIndex(t),-1!==l.inArray(t,e))return;e=l.isArray(e)?l.merge([t],e).sort():[t]}this._setupDisabled(e)}},load:function(t,e){t=this._getIndex(t);var i=this,s=this.tabs.eq(t),n=s.find(".ui-tabs-anchor"),o=this._getPanelForTab(s),a={tab:s,panel:o};c(n[0])||(this.xhr=l.ajax(this._ajaxSettings(n,e,a)),this.xhr&&"canceled"!==this.xhr.statusText&&(s.addClass("ui-tabs-loading"),o.attr("aria-busy","true"),this.xhr.success(function(t){setTimeout(function(){o.html(t),i._trigger("load",e,a)},1)}).complete(function(t,e){setTimeout(function(){"abort"===e&&i.panels.stop(!1,!0),s.removeClass("ui-tabs-loading"),o.removeAttr("aria-busy"),t===i.xhr&&delete i.xhr},1)}
vendor: 4,173 bytes, line 2
2)))},_ajaxSettings:function(t,i,s){var n=this;return{url:t.attr("href"),beforeSend:function(t,e){return n._trigger("beforeLoad",i,l.extend({jqXHR:t,ajaxSettings:e},s))}}},_getPanelForTab:function(t){var e=l(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+e))}})}(jQuery),function(h){var s=0;h.widget("ui.tooltip",{version:"1.10.3",options:{content:function(){var t=h(this).attr("title")||"";return h("<a>").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(t,e){var i=this;if("disabled"===t)return this[e?"_disable":"_enable"](),void(this.options[t]=e);this._super(t,e),"content"===t&&h.each(this.tooltips,function(t,e){i._updateContent(e)})},_disable:function(){var s=this;h.each(this.tooltips,function(t,e){var i=h.Event("blur");i.target=i.currentTarget=e[0],s.close(i,!0)}),this.element.find(this.options.items).addBack().each(function(){var t=h(this);t.is("[title]")&&t.data("ui-tooltip-title",t.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var t=h(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))})},open:function(t){var i=this,e=h(t?t.target:this.element).closest(this.options.items);e.length&&!e.data("ui-tooltip-id")&&(e.attr("title")&&e.data("ui-tooltip-title",e.attr("title")),e.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&e.parents().each(function(){var t,e=h(this);e.data("ui-tooltip-open")&&((t=h.Event("blur")).target=t.currentTarget=this,i.close(t,!0)),e.attr("title")&&(e.uniqueId(),i.parents[this.id]={element:this,title:e.attr("title")},e.attr("title",""))}),this._updateContent(e,t))},_updateContent:function(e,i){var t,s=this.options.content,n=this,o=i?i.type:null;if("string"==typeof s)return this._open(i,e,s);(t=s.call(e[0],function(t){e.data("ui-tooltip-open")&&n._delay(function(){i&&(i.type=o),this._open(i,e,t)})}))&&this._open(i,e,t)},_open:function(t,i,e){var s,n,o,a=h.extend({},this.options.position);function r(t){a.of=t,s.is(":hidden")||s.position(a)}e&&((s=this._find(i)).length?s.find(".ui-tooltip-content").html(e):(i.is("[title]")&&(t&&"mouseover"===t.type?i.attr("title",""):i.removeAttr("title")),s=this._tooltip(i),function(t,e){var i=(t.attr("aria-describedby")||"").split(/\s+/);i.push(e),t.data("ui-tooltip-id",e).attr("aria-describedby",h.trim(i.join(" ")))}(i,s.attr("id")),s.find(".ui-tooltip-content").html(e),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:r}),r(t)):s.position(h.extend({of:i},this.options.position)),s.hide(),this._show(s,this.options.show),this.options.show&&this.options.show.delay&&(o=this.delayedShow=setInterval(function(){s.is(":visible")&&(r(a.of),clearInterval(o))},h.fx.interval)),this._trigger("open",t,{tooltip:s}),n={keyup:function(t){if(t.keyCode===h.ui.keyCode.ESCAPE){var e=h.Event(t);e.currentTarget=i[0],this.close(e,!0)}},remove:function(){this._removeTooltip(s)}},t&&"mouseover"!==t.type||(n.mouseleave="close"),t&&"focusin"!==t.type||(n.focusout="close"),this._on(!0,i,n)))},close:function(t){var i=this,e=h(t?t.currentTarget:this.element),s=this._find(e);this.closing||(clearInterval(this.delayedShow),e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title")),function(t){var e=t.data("ui-tooltip-id"),i=(t.attr("aria-describedby")||"").split(/\s+/),s=h.inArray(e,i);-1!==s&&i.splice(s,1),t.removeData("ui-tooltip-id"),(i=h.trim(i.join(" ")))?t.attr("aria-describedby",i):t.removeAttr("aria-describedby")}(e),s.stop(!0),this._hide(s,this.options.hide,function(){i._removeTooltip(h(this))}),e.removeData("ui-tooltip-open"),this._off(e,"mouseleave focusout keyup"),e[0]!==this.element[0]&&this._off(e,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&h.each(this.parents,function(t,e){h(e.element).attr("title",e.title),delete i.parents[t]}),this.closing=!0,this._trigger("close",t,{tooltip:s}
vendor: 9,004 bytes, line 2
2),this.closing=!1)},_tooltip:function(t){var e="ui-tooltip-"+s++,i=h("<div>").attr({id:e,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return h("<div>").addClass("ui-tooltip-content").appendTo(i),i.appendTo(this.document[0].body),this.tooltips[e]=t,i},_find:function(t){var e=t.data("ui-tooltip-id");return e?h("#"+e):h()},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_destroy:function(){var s=this;h.each(this.tooltips,function(t,e){var i=h.Event("blur");i.target=i.currentTarget=e[0],s.close(i,!0),h("#"+t).remove(),e.data("ui-tooltip-title")&&(e.attr("title",e.data("ui-tooltip-title")),e.removeData("ui-tooltip-title"))})}})}(jQuery),function(c,t){var i,r="ui-effects-";c.effects={effect:{}},function(c,u){var l,d=/^([\-+])=\s*(\d+\.?\d*)/,t=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],p=c.Color=function(t,e,i,s){return new c.Color.fn.parse(t,e,i,s)},f={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},g={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},a=p.support={},e=c("<p>")[0],m=c.each;function v(t,e,i){var s=g[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:t<0?0:s.max<t?s.max:t)}function r(a){var r=p(),h=r._rgba=[];return a=a.toLowerCase(),m(t,function(t,e){var i,s=e.re.exec(a),n=s&&e.parse(s),o=e.space||"rgba";if(n)return i=r[o](n),r[f[o].cache]=i[f[o].cache],h=r._rgba=i._rgba,!1}),h.length?("0,0,0,0"===h.join()&&c.extend(h,l.transparent),r):l[a]}function h(t,e,i){return 6*(i=(i+1)%1)<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}e.style.cssText="background-color:rgba(1,1,1,.5)",a.rgba=-1<e.style.backgroundColor.indexOf("rgba"),m(f,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),p.fn=c.extend(p.prototype,{parse:function(n,t,e,i){if(n===u)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=c(n).css(t),t=u);var o=this,s=c.type(n),a=this._rgba=[];return t!==u&&(n=[n,t,e,i],s="array"),"string"===s?this.parse(r(n)||l._default):"array"===s?(m(f.rgba.props,function(t,e){a[e.idx]=v(n[e.idx],e)}),this):"object"===s?(m(f,n instanceof p?function(t,e){n[e.cache]&&(o[e.cache]=n[e.cache].slice())}:function(t,i){var s=i.cache;m(i.props,function(t,e){if(!o[s]&&i.to){if("alpha"===t||null==n[t])return;o[s]=i.to(o._rgba)}o[s][e.idx]=v(n[t],e,!0)}),o[s]&&c.inArray(null,o[s].slice(0,3))<0&&(o[s][3]=1,i.from&&(o._rgba=i.from(o[s])))}),this):void 0},is:function(t){var n=p(t),o=!0,a=this;return m(f,function(t,e){var i,s=n[e.cache];return s&&(i=a[e.cache]||e.to&&e.to(a._rgba)||[],m(e.props,function(t,e){if(null!=s[e.idx])return o=s[e.idx]===i[e.idx]})),o}),o},_space:function(){var i=[],s=this;return m(f,function(t,e){s[e.cache]&&i.push(t)}),i.pop()},transition:function(t,a){var r=p(t),e=r._space(),i=f[e],s=0===this.alpha()?p("transparent"):this,h=s[i.cache]||i.to(s._rgba),l=h.slice();return r=r[i.cache],m(i.props,function(t,e){var i=e.idx,s=h[i],n=r[i],o=g[e.type]||{};null!==n&&(null===s?l[i]=n:(o.mod&&(n-s>o.mod/2?s+=o.mod:s-n>o.mod/2&&(s-=o.mod)),l[i]=v((n-s)*a+s,e)))}),this[e](l)},blend:function(t){if(1===this._rgba[3])return this;var e=this._rgba.slice(),i=e.pop(),s=p(t)._rgba;return p(c.map(e,function(t,e){return(1-i)*s[e]+i*t}))},toRgbaString:function(){var t="rgba(",e=c.map(this._rgba,function(t,e){return null==t?2<e?1:0:t});return 1===e[3]&&(e.pop(),t="rgb("),t+e.join()+")"},toHslaString:function(){var t="hsla(",e=c.map(this.hsla(),function(t,e){return null==t&&(t=2<e?1:0),e&&e<3&&(t=Math.round(100*t)+"%"),t});return 1===e[3]&&(e.pop(),t="hsl("),t+e.join()+")"},toHexString:function(t){var e=this._rgba.slice(),i=e.pop();return t&&e.push(~~(255*i)),"#"+c.map(e,function(t){return 1===(t=(t||0).toString(16)).length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),p.fn.parse.prototype=p.fn,f.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,o=t[2]/255,a=t[3],r=Math.max(s,n,o),h=Math.min(s,n,o),l=r-h,c=r+h,u=.5*c;return e=h===r?0:s===r?60*(n-o)/l+360:n===r?60*(o-s)/l+120:60*(s-n)/l+240,i=0==l?0:u<=.5?l/c:l/(2-c),[Math.round(e)%360,i,u,null==a?1:a]},f.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],n=t[3],o=s<=.5?s*(1+i):s+i-s*i,a=2*s-o;return[Math.round(255*h(a,o,e+1/3)),Math.round(255*h(a,o,e)),Math.round(255*h(a,o,e-1/3)),n]},m(f,function(h,t){var i=t.props,a=t.cache,r=t.to,l=t.from;p.fn[h]=function(t){if(r&&!this[a]&&(this[a]=r(this._rgba)),t===u)return this[a].slice();var e,s=c.type(t),n="array"===s||"object"===s?t:arguments,o=this[a].slice();return m(i,function(t,e){var i=n["object"===s?t:e.idx];null==i&&(i=o[e.idx]),o[e.idx]=v(i,e)}),l?((e=p(l(o)))[a]=o,e):p(o)},m(i,function(a,r){p.fn[a]||(p.fn[a]=function(t){var e,i=c.type(t),s="alpha"===a?this._hsla?"hsla":"rgba":h,n=this[s](),o=n[r.idx];return"undefined"===i?o:("function"===i&&(t=t.call(this,o),i=c.type(t)),null==t&&r.empty?this:("string"===i&&(e=d.exec(t))&&(t=o+parseFloat(e[2])*("+"===e[1]?1:-1)),n[r.idx]=t,this[s](n)))})})}),p.hook=function(t){var e=t.split(" ");m(e,function(t,o){c.cssHooks[o]={set:function(t,e){var i,s,n="";if("transparent"!==e&&("string"!==c.type(e)||(i=r(e)))){if(e=p(i||e),!a.rgba&&1!==e._rgba[3]){for(s="backgroundColor"===o?t.parentNode:t;(""===n||"transparent"===n)&&s&&s.style;)try{n=c.css(s,"backgroundColor"),s=s.parentNode}catch(t){}e=e.blend(n&&"transparent"!==n?n:"_default")}e=e.toRgbaString()}try{t.style[o]=e}catch(t){}}},c.fx.step[o]=function(t){t.colorInit||(t.start=p(t.elem,o),t.end=p(t.end),t.colorInit=!0),c.cssHooks[o].set(t.elem,t.start.transition(t.end,t.pos))}})},p.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),c.cssHooks.borderColor={expand:function(i){var s={};return m(["Top","Right","Bottom","Left"],function(t,e){s["border"+e+"Color"]=i}),s}},l=c.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){var o,n,a,r=["add","remove","toggle"],h={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};function l(t){var e,i,s=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,n={};if(s&&s.length&&s[0]&&s[s[0]])for(i=s.length;i--;)"string"==typeof s[e=s[i]]&&(n[c.camelCase(e)]=s[e]);else for(e in s)"string"==typeof s[e]&&(n[e]=s[e]);return n}c.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,e){c.fx.step[e]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(jQuery.style(t.elem,e,t.end),t.setAttr=!0)}}),c.fn.addBack||(c.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),c.effects.animateClass=function(n,t,e,i){var o=c.speed(t,e,i);return this.queue(function(){var t,i=c(this),e=i.attr("class")||"",s=o.children?i.find("*").addBack():i;s=s.map(function(){return{el:c(this),start:l(this)}}),(t=function(){c.each(r,function(t,e){n[e]&&i[e+"Class"](n[e])})})(),s=s.map(function(){return this.end=l(this.el[0]),this.diff=function(t,e){var i,s,n={};for(i in e)s=e[i],t[i]!==s&&(h[i]||!c.fx.step[i]&&isNaN(parseFloat(s))||(n[i]=s));return n}(this.start,this.end),this}),i.attr("class",e),s=s.map(function(){var t=this,e=c.Deferred(),i=c.extend({},o,{queue:!1,complete:function(){e.resolve(t)}});return this.el.animate(this.diff,i),e.promise()}),c.when.apply(c,s.get()).done(function(){t(),c.each(arguments,function(){var e=this.el;c.each(this.diff,function(t){e.css(t,"")})}),o.complete.call(i[0])})})},c.fn.extend({addClass:(a=c.fn.addClass,function(t,e,i,s){return e?c.effects.animateClass.call(this,{add:t},e,i,s):a.apply(this,arguments)}
2),removeClass:(n=c.fn.removeClass,function(t,e,i,s){return 1<arguments.length?c.effects.animateClass.call(this,{remove:t},e,i,s):n.apply(this,arguments)}),toggleClass:(o=c.fn.toggleClass,function(t,e,i,s,n){return"boolean"==typeof e||void 0===e?i?c.effects.animateClass.call(this,e?{add:t}:{remove:t},i,s,n):o.apply(this,arguments):c.effects.animateClass.call(this,{toggle:t},e,i,s)}),switchClass:function(t,e,i,s,n){return c.effects.animateClass.call(this,{add:e,remove:t},i,s,n)}})}(),function(){function s(t,e,i,s){return c.isPlainObject(t)&&(t=(e=t).effect),t={effect:t},null==e&&(e={}),c.isFunction(e)&&(s=e,i=null,e={}),("number"==typeof e||c.fx.speeds[e])&&(s=i,i=e,e={}),c.isFunction(i)&&(s=i,i=null),e&&c.extend(t,e),i=i||e.duration,t.duration=c.fx.off?0:"number"==typeof i?i:i in c.fx.speeds?c.fx.speeds[i]:c.fx.speeds._default,t.complete=s||e.complete,t}function i(t){return!(t&&"number"!=typeof t&&!c.fx.speeds[t])||("string"==typeof t&&!c.effects.effect[t]||(!!c.isFunction(t)||"object"==typeof t&&!t.effect))}var n,o,a;c.extend(c.effects,{version:"1.10.3",save:function(t,e){for(var i=0;i<e.length;i++)null!==e[i]&&t.data(r+e[i],t[0].style[e[i]])},restore:function(t,e){var i,s;for(s=0;s<e.length;s++)null!==e[s]&&(void 0===(i=t.data(r+e[s]))&&(i=""),t.css(e[s],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createWrapper:function(i){if(i.parent().is(".ui-effects-wrapper"))return i.parent();var s={width:i.outerWidth(!0),height:i.outerHeight(!0),float:i.css("float")},t=c("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:i.width(),height:i.height()},n=document.activeElement;try{n.id}catch(t){n=document.body}return i.wrap(t),(i[0]===n||c.contains(i[0],n))&&c(n).focus(),t=i.parent(),"static"===i.css("position")?(t.css({position:"relative"}),i.css({position:"relative"})):(c.extend(s,{position:i.css("position"),zIndex:i.css("z-index")}),c.each(["top","left","bottom","right"],function(t,e){s[e]=i.css(e),isNaN(parseInt(s[e],10))&&(s[e]="auto")}),i.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),i.css(e),t.css(s).show()},removeWrapper:function(t){var e=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===e||c.contains(t[0],e))&&c(e).focus()),t},setTransition:function(s,t,n,o){return o=o||{},c.each(t,function(t,e){var i=s.cssUnit(e);0<i[0]&&(o[e]=i[0]*n+i[1])}),o}}),c.fn.extend({effect:function(){var o=s.apply(this,arguments),t=o.mode,e=o.queue,a=c.effects.effect[o.effect];if(c.fx.off||!a)return t?this[t](o.duration,o.complete):this.each(function(){o.complete&&o.complete.call(this)});function i(t){var e=c(this),i=o.complete,s=o.mode;function n(){c.isFunction(i)&&i.call(e[0]),c.isFunction(t)&&t()}(e.is(":hidden")?"hide"===s:"show"===s)?(e[s](),n()):a.call(e[0],o,n)}return!1===e?this.each(i):this.queue(e||"fx",i)},show:(a=c.fn.show,function(t){if(i(t))return a.apply(this,arguments);var e=s.apply(this,arguments);return e.mode="show",this.effect.call(this,e)}),hide:(o=c.fn.hide,function(t){if(i(t))return o.apply(this,arguments);var e=s.apply(this,arguments);return e.mode="hide",this.effect.call(this,e)}),toggle:(n=c.fn.toggle,function(t){if(i(t)||"boolean"==typeof t)return n.apply(this,arguments);var e=s.apply(this,arguments);return e.mode="toggle",this.effect.call(this,e)}),cssUnit:function(t){var i=this.css(t),s=[];return c.each(["em","px","%","pt"],function(t,e){0<i.indexOf(e)&&(s=[parseFloat(i),e])}),s}})}(),i={},c.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,t){i[t]=function(t){return Math.pow(t,e+2)}}),c.extend(i,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;t<((e=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),c.each(i,function(t,e){c.easing["easeIn"+t]=e,c.easing["easeOut"+t]=function(t){return 1-e(1-t)},c.easing["easeInOut"+t]=function(t){return t<.5?e(2*t)/2:1-e(-2*t+2)/2}})}(jQuery),function(g,t){var m=/up|down|vertical/,v=/up|left|vertical|horizontal/;g.effects.effect.blind=function(t,e){var i,s,n,o=g(this),a=["position","top","bottom","left","right","height","width"],r=g.effects.setMode(o,t.mode||"hide"),h=t.direction||"up",l=m.test(h),c=l?"height":"width",u=l?"top":"left",d=v.test(h),p={},f="show"===r;o.parent().is(".ui-effects-wrapper")?g.effects.save(o.parent(),a):g.effects.save(o,a),o.show(),s=(i=g.effects.createWrapper(o).css({overflow:"hidden"}))[c](),n=parseFloat(i.css(u))||0,p[c]=f?s:0,d||(o.css(l?"bottom":"right",0).css(l?"top":"left","auto").css({position:"absolute"}),p[u]=f?n:s+n),f&&(i.css(c,0),d||i.css(u,n+s)),i.animate(p,{duration:t.duration,easing:t.easing,queue:!1,complete:function(){"hide"===r&&o.hide(),g.effects.restore(o,a),g.effects.removeWrapper(o),e()}})}}(jQuery),function(y,t){y.effects.effect.bounce=function(t,e){var i,s,n,o=y(this),a=["position","top","bottom","left","right","height","width"],r=y.effects.setMode(o,t.mode||"effect"),h="hide"===r,l="show"===r,c=t.direction||"up",u=t.distance,d=t.times||5,p=2*d+(l||h?1:0),f=t.duration/p,g=t.easing,m="up"===c||"down"===c?"top":"left",v="up"===c||"left"===c,_=o.queue(),b=_.length;for((l||h)&&a.push("opacity"),y.effects.save(o,a),o.show(),y.effects.createWrapper(o),u||(u=o["top"==m?"outerHeight":"outerWidth"]()/3),l&&((n={opacity:1})[m]=0,o.css("opacity",0).css(m,v?2*-u:2*u).animate(n,f,g)),h&&(u/=Math.pow(2,d-1)),i=(n={})[m]=0;i<d;i++)(s={})[m]=(v?"-=":"+=")+u,o.animate(s,f,g).animate(n,f,g),u=h?2*u:u/2;h&&((s={opacity:0}
2)[m]=(v?"-=":"+=")+u,o.animate(s,f,g)),o.queue(function(){h&&o.hide(),y.effects.restore(o,a),y.effects.removeWrapper(o),e()}),1<b&&_.splice.apply(_,[1,0].concat(_.splice(b,1+p))),o.dequeue()}}(jQuery),function(d,t){d.effects.effect.clip=function(t,e){var i,s,n,o=d(this),a=["position","top","bottom","left","right","height","width"],r="show"===d.effects.setMode(o,t.mode||"hide"),h="vertical"===(t.direction||"vertical"),l=h?"height":"width",c=h?"top":"left",u={};d.effects.save(o,a),o.show(),i=d.effects.createWrapper(o).css({overflow:"hidden"}),n=(s="IMG"===o[0].tagName?i:o)[l](),r&&(s.css(l,0),s.css(c,n/2)),u[l]=r?n:0,u[c]=r?0:n/2,s.animate(u,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){r||o.hide(),d.effects.restore(o,a),d.effects.removeWrapper(o),e()}})}}(jQuery),function(u,t){u.effects.effect.drop=function(t,e){var i,s=u(this),n=["position","top","bottom","left","right","opacity","height","width"],o=u.effects.setMode(s,t.mode||"hide"),a="show"===o,r=t.direction||"left",h="up"===r||"down"===r?"top":"left",l="up"===r||"left"===r?"pos":"neg",c={opacity:a?1:0};u.effects.save(s,n),s.show(),u.effects.createWrapper(s),i=t.distance||s["top"==h?"outerHeight":"outerWidth"](!0)/2,a&&s.css("opacity",0).css(h,"pos"==l?-i:i),c[h]=(a?"pos"==l?"+=":"-=":"pos"==l?"-=":"+=")+i,s.animate(c,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===o&&s.hide(),u.effects.restore(s,n),u.effects.removeWrapper(s),e()}})}}(jQuery),function(v,t){v.effects.effect.explode=function(t,e){var i,s,n,o,a,r,h=t.pieces?Math.round(Math.sqrt(t.pieces)):3,l=h,c=v(this),u="show"===v.effects.setMode(c,t.mode||"hide"),d=c.show().css("visibility","hidden").offset(),p=Math.ceil(c.outerWidth()/l),f=Math.ceil(c.outerHeight()/h),g=[];function m(){g.push(this),g.length===h*l&&function(){c.css({visibility:"visible"}),v(g).remove(),u||c.hide();e()}()}for(i=0;i<h;i++)for(o=d.top+i*f,r=i-(h-1)/2,s=0;s<l;s++)n=d.left+s*p,a=s-(l-1)/2,c.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-s*p,top:-i*f}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:p,height:f,left:n+(u?a*p:0),top:o+(u?r*f:0),opacity:u?0:1}).animate({left:n+(u?0:a*p),top:o+(u?0:r*f),opacity:u?1:0},t.duration||500,t.easing,m)}}(jQuery),function(n,t){n.effects.effect.fade=function(t,e){var i=n(this),s=n.effects.setMode(i,t.mode||"toggle");i.animate({opacity:s},{queue:!1,duration:t.duration,easing:t.easing,complete:e})}}(jQuery),function(v,t){v.effects.effect.fold=function(t,e){var i,s,n=v(this),o=["position","top","bottom","left","right","height","width"],a=v.effects.setMode(n,t.mode||"hide"),r="show"===a,h="hide"===a,l=t.size||15,c=/([0-9]+)%/.exec(l),u=!!t.horizFirst,d=r!=u,p=d?["width","height"]:["height","width"],f=t.duration/2,g={},m={};v.effects.save(n,o),n.show(),i=v.effects.createWrapper(n).css({overflow:"hidden"}),s=d?[i.width(),i.height()]:[i.height(),i.width()],c&&(l=parseInt(c[1],10)/100*s[h?0:1]),r&&i.css(u?{height:0,width:l}:{height:l,width:0}),g[p[0]]=r?s[0]:l,m[p[1]]=r?s[1]:0,i.animate(g,f,t.easing).animate(m,f,t.easing,function(){h&&n.hide(),v.effects.restore(n,o),v.effects.removeWrapper(n),e()})}}(jQuery),function(a,t){a.effects.effect.highlight=function(t,e){var i=a(this),s=["backgroundImage","backgroundColor","opacity"],n=a.effects.setMode(i,t.mode||"show"),o={backgroundColor:i.css("backgroundColor")};"hide"===n&&(o.opacity=0),a.effects.save(i,s),i.show().css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(o,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===n&&i.hide(),a.effects.restore(i,s),e()}})}}(jQuery),function(p,t){p.effects.effect.pulsate=function(t,e){var i,s=p(this),n=p.effects.setMode(s,t.mode||"show"),o="show"===n,a="hide"===n,r=o||"hide"===n,h=2*(t.times||5)+(r?1:0),l=t.duration/h,c=0,u=s.queue(),d=u.length;for(!o&&s.is(":visible")||(s.css("opacity",0).show(),c=1),i=1;i<h;i++)s.animate({opacity:c},l,t.easing),c=1-c;s.animate({opacity:c},l,t.easing),s.queue(function(){a&&s.hide(),e()}),1<d&&u.splice.apply(u,[1,0].concat(u.splice(d,1+h))),s.dequeue()}}(jQuery),function(_,t){_.effects.effect.puff=function(t,e){var i=_(this),s=_.effects.setMode(i,t.mode||"hide"),n="hide"===s,o=parseInt(t.percent,10)||150,a=o/100,r={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};_.extend(t,{effect:"scale",queue:!1,fade:!0,mode:s,complete:e,percent:n?o:100,from:n?r:{height:r.height*a,width:r.width*a,outerHeight:r.outerHeight*a,outerWidth:r.outerWidth*a}}),i.effect(t)},_.effects.effect.scale=function(t,e){var i=_(this),s=_.extend(!0,{},t),n=_.effects.setMode(i,t.mode||"effect"),o=parseInt(t.percent,10)||(0===parseInt(t.percent,10)?0:"hide"===n?0:100),a=t.direction||"both",r=t.origin,h={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()},l="horizontal"!==a?o/100:1,c="vertical"!==a?o/100:1;
vendor: 3,109 bytes, line 2
2s.effect="size",s.queue=!1,s.complete=e,"effect"!==n&&(s.origin=r||["middle","center"],s.restore=!0),s.from=t.from||("show"===n?{height:0,width:0,outerHeight:0,outerWidth:0}:h),s.to={height:h.height*l,width:h.width*c,outerHeight:h.outerHeight*l,outerWidth:h.outerWidth*c},s.fade&&("show"===n&&(s.from.opacity=0,s.to.opacity=1),"hide"===n&&(s.from.opacity=1,s.to.opacity=0)),i.effect(s)},_.effects.effect.size=function(o,t){var e,i,a,r=_(this),s=["position","top","bottom","left","right","width","height","overflow","opacity"],h=["width","height","overflow"],n=["fontSize"],l=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],c=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],u=_.effects.setMode(r,o.mode||"effect"),d=o.restore||"effect"!==u,p=o.scale||"both",f=o.origin||["middle","center"],g=r.css("position"),m=d?s:["position","top","bottom","left","right","overflow","opacity"],v={height:0,width:0,outerHeight:0,outerWidth:0};"show"===u&&r.show(),e={height:r.height(),width:r.width(),outerHeight:r.outerHeight(),outerWidth:r.outerWidth()},"toggle"===o.mode&&"show"===u?(r.from=o.to||v,r.to=o.from||e):(r.from=o.from||("show"===u?v:e),r.to=o.to||("hide"===u?v:e)),a={from:{y:r.from.height/e.height,x:r.from.width/e.width},to:{y:r.to.height/e.height,x:r.to.width/e.width}},"box"!==p&&"both"!==p||(a.from.y!==a.to.y&&(m=m.concat(l),r.from=_.effects.setTransition(r,l,a.from.y,r.from),r.to=_.effects.setTransition(r,l,a.to.y,r.to)),a.from.x!==a.to.x&&(m=m.concat(c),r.from=_.effects.setTransition(r,c,a.from.x,r.from),r.to=_.effects.setTransition(r,c,a.to.x,r.to))),"content"!==p&&"both"!==p||a.from.y!==a.to.y&&(m=m.concat(n).concat(h),r.from=_.effects.setTransition(r,n,a.from.y,r.from),r.to=_.effects.setTransition(r,n,a.to.y,r.to)),_.effects.save(r,m),r.show(),_.effects.createWrapper(r),r.css("overflow","hidden").css(r.from),f&&(i=_.effects.getBaseline(f,e),r.from.top=(e.outerHeight-r.outerHeight())*i.y,r.from.left=(e.outerWidth-r.outerWidth())*i.x,r.to.top=(e.outerHeight-r.to.outerHeight)*i.y,r.to.left=(e.outerWidth-r.to.outerWidth)*i.x),r.css(r.from),"content"!==p&&"both"!==p||(l=l.concat(["marginTop","marginBottom"]).concat(n),c=c.concat(["marginLeft","marginRight"]),h=s.concat(l).concat(c),r.find("*[width]").each(function(){var t=_(this),e=t.height(),i=t.width(),s=t.outerHeight(),n=t.outerWidth();d&&_.effects.save(t,h),t.from={height:e*a.from.y,width:i*a.from.x,outerHeight:s*a.from.y,outerWidth:n*a.from.x},t.to={height:e*a.to.y,width:i*a.to.x,outerHeight:e*a.to.y,outerWidth:i*a.to.x},a.from.y!==a.to.y&&(t.from=_.effects.setTransition(t,l,a.from.y,t.from),t.to=_.effects.setTransition(t,l,a.to.y,t.to)),a.from.x!==a.to.x&&(t.from=_.effects.setTransition(t,c,a.from.x,t.from),t.to=_.effects.setTransition(t,c,a.to.x,t.to)),t.css(t.from),t.animate(t.to,o.duration,o.easing,function(){d&&_.effects.restore(t,h)})})),r.animate(r.to,{queue:!1,duration:o.duration,easing:o.easing,complete:function(){0===r.to.opacity&&r.css("opacity",r.from.opacity),"hide"===u&&r.hide(),_.effects.restore(r,m),d||("static"===g?r.css({position:"relative",top:r.to.top,left
2:r.to.left}):_.each(["top","left"],function(n,t){r.css(t,function(t,e){var i=parseInt(e,10),s=n?r.to.left:r.to.top;return"auto"===e?s+"px":i+s+"px"})})),_.effects.removeWrapper(r),t()}})}}(jQuery),function(_,t){_.effects.effect.shake=function(t,e){var i,s=_(this),n=["position","top","bottom","left","right","height","width"],o=_.effects.setMode(s,t.mode||"effect"),a=t.direction||"left",r=t.distance||20,h=t.times||3,l=2*h+1,c=Math.round(t.duration/l),u="up"===a||"down"===a?"top":"left",d="up"===a||"left"===a,p={},f={},g={},m=s.queue(),v=m.length;for(_.effects.save(s,n),s.show(),_.effects.createWrapper(s),p[u]=(d?"-=":"+=")+r,f[u]=(d?"+=":"-=")+2*r,g[u]=(d?"-=":"+=")+2*r,s.animate(p,c,t.easing),i=1;i<h;i++)s.animate(f,c,t.easing).animate(g,c,t.easing);s.animate(f,c,t.easing).animate(p,c/2,t.easing).queue(function(){"hide"===o&&s.hide(),_.effects.restore(s,n),_.effects.removeWrapper(s),e()}),1<v&&m.splice.apply(m,[1,0].concat(m.splice(v,1+l))),s.dequeue()}}(jQuery),function(u,t){u.effects.effect.slide=function(t,e){var i,s=u(this),n=["position","top","bottom","left","right","width","height"],o=u.effects.setMode(s,t.mode||"show"),a="show"===o,r=t.direction||"left",h="up"===r||"down"===r?"top":"left",l="up"===r||"left"===r,c={};u.effects.save(s,n),s.show(),i=t.distance||s["top"==h?"outerHeight":"outerWidth"](!0),u.effects.createWrapper(s).css({overflow:"hidden"}),a&&s.css(h,l?isNaN(i)?"-"+i:-i:i),c[h]=(a?l?"+=":"-=":l?"-=":"+=")+i,s.animate(c,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===o&&s.hide(),u.effects.restore(s,n),u.effects.removeWrapper(s),e()}})}}(jQuery),function(d,t){d.effects.effect.transfer=function(t,e){var i=d(this),s=d(t.to),n="fixed"===s.css("position"),o=d("body"),a=n?o.scrollTop():0,r=n?o.scrollLeft():0,h=s.offset(),l={top:h.top-a,left:h.left-r,height:s.innerHeight(),width:s.innerWidth()},c=i.offset(),u=d("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(t.className).css({top:c.top-a,left:c.left-r,height:i.innerHeight(),width:i.innerWidth(),position:n?"fixed":"absolute"}).animate(l,t.duration,t.easing,function(){u.remove(),e()})}}(jQuery); 3!function(l){l.extend(l.fn,{validate:function(t){if(this.length){var i=l.data(this[0],"validator");return i||(this.attr("novalidate","novalidate"),i=new l.validator(t,this[0]),l.data(this[0],"validator",i),i.settings.onsubmit&&(this.validateDelegate(":submit","click",function(t){i.settings.submitHandler&&(i.submitButton=t.target),l(t.target).hasClass("cancel")&&(i.cancelSubmit=!0),void 0!==l(t.target).attr("formnovalidate")&&(i.cancelSubmit=!0)}),this.submit(function(e){function t(){var t;return!i.settings.submitHandler||(i.submitButton&&(t=l("<input type='hidden'/>").attr("name",i.submitButton.name).val(l(i.submitButton).val()).appendTo(i.currentForm)),i.settings.submitHandler.call(i,i.currentForm,e),i.submitButton&&t.remove(),!1)}return i.settings.debug&&e.preventDefault(),i.cancelSubmit?(i.cancelSubmit=!1,t()):i.form()?i.pendingRequest?!(i.formSubmitted=!0):t():(i.focusInvalid(),!1)})),i)}t&&t.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing.")},valid:function(){if(l(this[0]).is("form"))return this.validate().form();var t=!0,e=l(this[0].form).validate();return this.each(function(){t=t&&e.element(this)}),t},removeAttrs:function(t){var i={},s=this;return l.each(t.split(/\s/),function(t,e){i[e]=s.attr(e),s.removeAttr(e)}),i},rules:function(t,e){var i=this[0];if(t){var s=l.data(i.form,"validator").settings,r=s.rules,n=l.validator.staticRules(i);switch(t){case"add":l.extend(n,l.validator.normalizeRule(e)),delete n.messages,r[i.name]=n,e.messages&&(s.messages[i.name]=l.extend(s.messages[i.name],e.messages));break;case"remove":if(!e)return delete r[i.name],n;var a={};return l.each(e.split(/\s/),function(t,e){a[e]=n[e],delete n[e]}),a}}var u=l.validator.normalizeRules(l.extend({},l.validator.classRules(i),l.validator.attributeRules(i),l.validator.dataRules(i),l.validator.staticRules(i)),i);if(u.required){var o=u.required;delete u.required,u=l.extend({required:o},u)}return u}}),l.extend(l.expr[":"],{blank:function(t){return!l.trim(""+l(t).val())},filled:function(t){return!!l.trim(""+l(t).val())},unchecked:function(t){return!l(t).prop("checked")}}),l.validator=function(t,e){this.settings=l.extend(!0,{},l.validator.defaults,t),this.currentForm=e,this.init()},l.validator.format=function(i,t){return 1===arguments.length?function(){var t=l.makeArray(arguments);return t.unshift(i),l.validator.format.apply(this,t)}:(2<arguments.length&&t.constructor!==Array&&(t=l.makeArray(arguments).slice(1)),t.constructor!==Array&&(t=[t]),l.each(t,function(t,e){i=i.replace(new RegExp("\\{"+t+"\\}","g"),function(){return e})}),i)},l.extend(l.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:!0,errorContainer:l([]),errorLabelContainer:l([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(t,e){this.lastActive=t,this.settings.focusCleanup&&!this.blockFocusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,t,this.settings.errorClass,this.settings.val
3idClass),this.addWrapper(this.errorsFor(t)).hide())},onfocusout:function(t,e){this.checkable(t)||!(t.name in this.submitted)&&this.optional(t)||this.element(t)},onkeyup:function(t,e){9===e.which&&""===this.elementValue(t)||(t.name in this.submitted||t===this.lastElement)&&this.element(t)},onclick:function(t,e){t.name in this.submitted?this.element(t):t.parentNode.name in this.submitted&&this.element(t.parentNode)},highlight:function(t,e,i){"radio"===t.type?this.findByName(t.name).addClass(e).removeClass(i):l(t).addClass(e).removeClass(i)},unhighlight:function(t,e,i){"radio"===t.type?this.findByName(t.name).removeClass(e).addClass(i):l(t).removeClass(e).addClass(i)}},setDefaults:function(t){l.extend(l.validator.defaults,t)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:l.validator.format("Please enter no more than {0} characters."),minlength:l.validator.format("Please enter at least {0} characters."),rangelength:l.validator.format("Please enter a value between {0} and {1} characters long."),range:l.validator.format("Please enter a value between {0} and {1}."),max:l.validator.format("Please enter a value less than or equal to {0}."),min:l.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){this.labelContainer=l(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||l(this.currentForm),this.containers=l(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var s=this.groups={};l.each(this.settings.groups,function(i,t){"string"==typeof t&&(t=t.split(/\s/)),l.each(t,function(t,e){s[e]=i})});var i=this.settings.rules;function t(t){var e=l.data(this[0].form,"validator"),i="on"+t.type.replace(/^validate/,"");e.settings[i]&&e.settings[i].call(e,this[0],t)}l.each(i,function(t,e){i[t]=l.validator.normalizeRule(e)}),l(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",t).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",t),this.settings.invalidHandler&&l(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),l.extend(this.submitted,this.errorMap),this.invalid=l.extend({},this.errorMap),this.valid()||l(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var t=0,e=this.currentElements=this.elements();e[t];t++)this.check(e[t]);return this.valid()},element:function(t){t=this.validationTargetFor(this.clean(t)),this.lastElement=t,this.prepareElement(t),this.currentElements=l(t);var e=!1!==this.check(t);return e?delete this.invalid[t.name]:this.invalid[t.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),e},showErrors:function(e){if(e){for(var t in l.extend(this.errorMap,e),this.errorList=[],e)this.errorList.push({message:e[t],element:this.findByName(t)[0]});this.successList=l.grep(this.successList,function(t){return!(t.name in e)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){l.fn.resetForm&&l(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors(),this.elements().removeClass(this.settings.errorClass).removeData("previousValue")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(t){var e=0;for(var i in t)e++;return e},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length}
3,focusInvalid:function(){if(this.settings.focusInvalid)try{l(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(t){}},findLastActive:function(){var e=this.lastActive;return e&&1===l.grep(this.errorList,function(t){return t.element.name===e.name}).length&&e},elements:function(){var t=this,e={};return l(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){return!this.name&&t.settings.debug&&window.console&&console.error("%o has no name assigned",this),!(this.name in e||!t.objectLength(l(this).rules()))&&(e[this.name]=!0)})},clean:function(t){return l(t)[0]},errors:function(){var t=this.settings.errorClass.replace(" ",".");return l(this.settings.errorElement+"."+t,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=l([]),this.toHide=l([]),this.currentElements=l([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(t){this.reset(),this.toHide=this.errorsFor(t)},elementValue:function(t){var e=l(t).attr("type"),i=l(t).val();return"radio"===e||"checkbox"===e?l("input[name='"+l(t).attr("name")+"']:checked").val():"string"==typeof i?i.replace(/\r/g,""):i},check:function(e){e=this.validationTargetFor(this.clean(e));var t,i=l(e).rules(),s=!1,r=this.elementValue(e);for(var n in i){var a={method:n,parameters:i[n]};try{if("dependency-mismatch"===(t=l.validator.methods[n].call(this,r,e,a.parameters))){s=!0;continue}if(s=!1,"pending"===t)return void(this.toHide=this.toHide.not(this.errorsFor(e)));if(!t)return this.formatAndAdd(e,a),!1}catch(t){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+e.id+", check the '"+a.method+"' method.",t),t}}if(!s)return this.objectLength(i)&&this.successList.push(e),!0},customDataMessage:function(t,e){return l(t).data("msg-"+e.toLowerCase())||t.attributes&&l(t).attr("data-msg-"+e.toLowerCase())},customMessage:function(t,e){var i=this.settings.messages[t];return i&&(i.constructor===String?i:i[e])},findDefined:function(){for(var t=0;t<arguments.length;t++)if(void 0!==arguments[t])return arguments[t]},defaultMessage:function(t,e){return this.findDefined(this.customMessage(t.name,e),this.customDataMessage(t,e),!this.settings.ignoreTitle&&t.title||void 0,l.validator.messages[e],"<strong>Warning: No message defined for "+t.name+"</strong>")},formatAndAdd:function(t,e){var i=this.defaultMessage(t,e.method),s=/\$?\{(\d+)\}/g;"function"==typeof i?i=i.call(this,e.parameters,t):s.test(i)&&(i=l.validator.format(i.replace(s,"{$1}"),e.parameters)),this.errorList.push({message:i,element:t}),this.errorMap[t.name]=i,this.submitted[t.name]=i},addWrapper:function(t){return this.settings.wrapper&&(t=t.add(t.parent(this.settings.wrapper))),t},defaultShowErrors:function(){var t,e;for(t=0;this.errorList[t];t++){var i=this.errorList[t];this.settings.highlight&&this.settings.highlight.call(this,i.element,this.settings.errorClass,this.settings.validClass),this.showLabel(i.element,i.message)}if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(t=0;this.successList[t];t++)this.showLabel(this.successList[t]);if(this.settings.unhighlight)for(t=0,e=this.validElements();e[t];t++)this.settings.unhighlight.call(this,e[t],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return l(this.errorList).map(function(){return this.element})},showLabel:function(t,e){var i=this.errorsFor(t);i.length?(i.removeClass(this.settings.validClass).addClass(this.settings.errorClass),i.html(e)):(i=l("<"+this.settings.errorElement+">").attr("for",this.idOrName(t)).addClass(this.settings.errorClass).html(e||""),this.settings.wrapper&&(i=i.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.append(i).length||(this.settings.errorPlacement?this.settings.errorPlacement(i,l(t)):i.insertAfter(t))),!e&&this.settings.success&&(i.text(""),"string"==typeof this.settings.success?i.addClass(this.settings.success):this.settings.success(i,t)),this.toShow=this.toShow.add(i)},errorsFor:function(t){var e=this.idOrName(t);return this.errors().filter(function(){return l(this).attr("for")===e})},idOrName:function(t){return this.groups[t.name]||(this.checkable(t)?t.name:t.id||t.name)}
3,validationTargetFor:function(t){return this.checkable(t)&&(t=this.findByName(t.name).not(this.settings.ignore)[0]),t},checkable:function(t){return/radio|checkbox/i.test(t.type)},findByName:function(t){return l(this.currentForm).find("[name='"+t+"']")},getLength:function(t,e){switch(e.nodeName.toLowerCase()){case"select":return l("option:selected",e).length;case"input":if(this.checkable(e))return this.findByName(e.name).filter(":checked").length}return t.length},depend:function(t,e){return!this.dependTypes[typeof t]||this.dependTypes[typeof t](t,e)},dependTypes:{boolean:function(t,e){return t},string:function(t,e){return!!l(t,e.form).length},function:function(t,e){return t(e)}},optional:function(t){var e=this.elementValue(t);return!l.validator.methods.required.call(this,e,t)&&"dependency-mismatch"},startRequest:function(t){this.pending[t.name]||(this.pendingRequest++,this.pending[t.name]=!0)},stopRequest:function(t,e){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[t.name],e&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(l(this.currentForm).submit(),this.formSubmitted=!1):!e&&0===this.pendingRequest&&this.formSubmitted&&(l(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(t){return l.data(t,"previousValue")||l.data(t,"previousValue",{old:null,valid:!0,message:this.defaultMessage(t,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(t,e){t.constructor===String?this.classRuleSettings[t]=e:l.extend(this.classRuleSettings,t)},classRules:function(t){var e={},i=l(t).attr("class");return i&&l.each(i.split(" "),function(){this in l.validator.classRuleSettings&&l.extend(e,l.validator.classRuleSettings[this])}),e},attributeRules:function(t){var e={},i=l(t),s=i[0].getAttribute("type");for(var r in l.validator.methods){var n;n="required"===r?(""===(n=i.get(0).getAttribute(r))&&(n=!0),!!n):i.attr(r),/min|max/.test(r)&&(null===s||/number|range|text/.test(s))&&(n=Number(n)),n?e[r]=n:s===r&&"range"!==s&&(e[r]=!0)}return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(t){var e,i,s={},r=l(t);for(e in l.validator.methods)void 0!==(i=r.data("rule-"+e.toLowerCase()))&&(s[e]=i);return s},staticRules:function(t){var e={},i=l.data(t.form,"validator");return i.settings.rules&&(e=l.validator.normalizeRule(i.settings.rules[t.name])||{}),e},normalizeRules:function(s,r){return l.each(s,function(t,e){if(!1!==e){if(e.param||e.depends){var i=!0;
3switch(typeof e.depends){case"string":i=!!l(e.depends,r.form).length;break;case"function":i=e.depends.call(r,r)}i?s[t]=void 0===e.param||e.param:delete s[t]}}else delete s[t]}),l.each(s,function(t,e){s[t]=l.isFunction(e)?e(r):e}),l.each(["minlength","maxlength"],function(){s[this]&&(s[this]=Number(s[this]))}),l.each(["rangelength","range"],function(){var t;s[this]&&(l.isArray(s[this])?s[this]=[Number(s[this][0]),Number(s[this][1])]:"string"==typeof s[this]&&(t=s[this].split(/[\s,]+/),s[this]=[Number(t[0]),Number(t[1])]))}),l.validator.autoCreateRanges&&(s.min&&s.max&&(s.range=[s.min,s.max],delete s.min,delete s.max),s.minlength&&s.maxlength&&(s.rangelength=[s.minlength,s.maxlength],delete s.minlength,delete s.maxlength)),s},normalizeRule:function(t){if("string"==typeof t){var e={};l.each(t.split(/\s/),function(){e[this]=!0}),t=e}return t},addMethod:function(t,e,i){l.validator.methods[t]=e,l.validator.messages[t]=void 0!==i?i:l.validator.messages[t],e.length<3&&l.validator.addClassRules(t,l.validator.normalizeRule(t))},methods:{required:function(t,e,i){if(!this.depend(i,e))return"dependency-mismatch";if("select"!==e.nodeName.toLowerCase())return this.checkable(e)?0<this.getLength(t,e):0<l.trim(t).length;var s=l(e).val();return s&&0<s.length},email:function(t,e){return this.optional(e)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(t)},url:function(t,e){return this.optional(e)||/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(t)},date:function(t,e){return this.optional(e)||!/Invalid|NaN/.test(new Date(t).toString())},dateISO:function(t,e){return this.optional(e)||/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(t)},number:function(t,e){return this.optional(e)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(t)},digits:function(t,e){return this.optional(e)||/^\d+$/.test(t)},creditcard:function(t,e){if(this.optional(e))return"dependency-mismatch";if(/[^0-9 \-]+/.test(t))return!1;for(var i=0,s=0,r=!1,n=(t=t.replace(/\D/g,"")).length-1;0<=n;n--){var a=t.charAt(n);s=parseInt(a,10),r&&9<(s*=2)&&(s-=9),i+=s,r=!r}return i%10==0},minlength:function(t,e,i){var s=l.isArray(t)?t.length:this.getLength(l.trim(t),e);return this.optional(e)||i<=s}
3,maxlength:function(t,e,i){var s=l.isArray(t)?t.length:this.getLength(l.trim(t),e);return this.optional(e)||s<=i},rangelength:function(t,e,i){var s=l.isArray(t)?t.length:this.getLength(l.trim(t),e);return this.optional(e)||s>=i[0]&&s<=i[1]},min:function(t,e,i){return this.optional(e)||i<=t},max:function(t,e,i){return this.optional(e)||t<=i},range:function(t,e,i){return this.optional(e)||t>=i[0]&&t<=i[1]},equalTo:function(t,e,i){var s=l(i);return this.settings.onfocusout&&s.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){l(e).valid()}),t===s.val()},remote:function(n,a,t){if(this.optional(a))return"dependency-mismatch";var u=this.previousValue(a);if(this.settings.messages[a.name]||(this.settings.messages[a.name]={}),u.originalMessage=this.settings.messages[a.name].remote,this.settings.messages[a.name].remote=u.message,t="string"==typeof t&&{url:t}||t,u.old===n)return u.valid;u.old=n;var o=this;this.startRequest(a);var e={};return e[a.name]=n,l.ajax(l.extend(!0,{url:t,mode:"abort",port:"validate"+a.name,dataType:"json",data:e,success:function(t){o.settings.messages[a.name].remote=u.originalMessage;var e=!0===t||"true"===t;if(e){var i=o.formSubmitted;o.prepareElement(a),o.formSubmitted=i,o.successList.push(a),delete o.invalid[a.name],o.showErrors()}else{var s={},r=t||o.defaultMessage(a,"remote");s[a.name]=u.message=l.isFunction(r)?r(n):r,o.invalid[a.name]=!0,o.showErrors(s)}u.valid=e,o.stopRequest(a,e)}},t)),"pending"}}}),l.format=l.validator.format}(jQuery),function(s){var r={};if(s.ajaxPrefilter)s.ajaxPrefilter(function(t,e,i){var s=t.port;"abort"===t.mode&&(r[s]&&r[s].abort(),r[s]=i)});else{var n=s.ajax;s.ajax=function(t){var e=("mode"in t?t:s.ajaxSettings).mode,i=("port"in t?t:s.ajaxSettings).port;return"abort"===e?(r[i]&&r[i].abort(),r[i]=n.apply(this,arguments),r[i]):n.apply(this,arguments)}}}(jQuery),function(r){r.extend(r.fn,{validateDelegate:function(i,t,s){return this.bind(t,function(t){var e=r(t.target);if(e.is(i))return s.apply(e,arguments)})}})}(jQuery); 4!function(re){var le="left",ue="right",ae="up",oe="down",se="in",ce="out",he="none",pe="auto",fe="swipe",ge="pinch",de="tap",we="doubletap",ve="longtap",Te="horizontal",be="vertical",Se="all",Ee=10,Oe="start",xe="move",ye="end",me="cancel",Le="ontouchstart"in window,Me="TouchSwipe";function i(e,u){var t=Le||!u.fallbackToMouseEvents,n=t?"touchstart":"mousedown",i=t?"touchmove":"mousemove",r=t?"touchend":"mouseup",l=t?null:"mouseleave",a="touchcancel",o=0,s=null,c=0,h=0,p=0,f=1,g=0,d=0,w=null,v=re(e),T="start",b=0,S=null,E=0,O=0,x=0,y=0,m=0,L=null;try{v.bind(n,M),v.bind(a,R)}catch(e){re.error("events not supported "+n+","+a+" on jQuery.swipe")}function M(e){if(!0!==v.data(Me+"_intouch")&&!(0<re(e.target).closest(u.excludedElements,v).length)){var t,n=e.originalEvent?e.originalEvent:e,i=Le?n.touches[0]:n;if(T=Oe,Le?b=n.touches.length:e.preventDefault(),d=s=null,f=1,g=p=h=c=o=0,S=function(){for(var e=[],t=0;t<=5;t++)e.push({start:{x:0,y:0},end:{x:0,y:0},identifier:0});return e}(),w=function(){var e={};return e[le]=ee(le),e[ue]=ee(ue),e[ae]=ee(ae),e[oe]=ee(oe),e}(),G(),!Le||b===u.fingers||u.fingers===Se||X()?(J(0,i),E=ie(),2==b&&(J(1,n.touches[1]),h=p=ne(S[0].start,S[1].start)),(u.swipeStatus||u.pinchStatus)&&(t=N(n,T))):t=!1,!1===t)return N(n,T=me),t;B(!0)}}function D(e){var t=e.originalEvent?e.originalEvent:e;if(T!==ye&&T!==me&&!Z()){var n,i=K(Le?t.touches[0]:t);if(O=ie(),Le&&(b=t.touches.length),T=xe,2==b&&(0==h?(J(1,t.touches[1]),h=p=ne(S[0].start,S[1].start)):(K(t.touches[1]),p=ne(S[0].end,S[1].end),S[0].end,S[1].end,d=f<1?ce:se),f=function(e,t){return(t/e*1).toFixed(2)}(h,p),g=Math.abs(h-p)),b===u.fingers||u.fingers===Se||!Le||X()){if(function(e,t){if(u.allowPageScroll===he||X())e.preventDefault();else{var n=u.allowPageScroll===pe;switch(t){case le:(u.swipeLeft&&n||!n&&u.allowPageScroll!=Te)&&e.preventDefault();break;case ue:(u.swipeRight&&n||!n&&u.allowPageScroll!=Te)&&e.preventDefault();break;case ae:(u.swipeUp&&n||!n&&u.allowPageScroll!=be)&&e.preventDefault();break;case oe:(u.swipeDown&&n||!n&&u.allowPageScroll!=be)&&e.preventDefault()}}}(e,s=function(e,t){var n=function(e,t){var n=e.x-t.x,i=t.y-e.y,r=Math.atan2(i,n),l=Math.round(180*r/Math.PI);l<0&&(l=360-Math.abs(l));return l}(e,t);return n<=45&&0<=n?le:n<=360&&315<=n?le:135<=n&&n<=225?ue:45<n&&n<135?oe:ae}(i.start,i.end)),o=function(e,t){return Math.round(Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)))}(i.start,i.end),c=te(),function(e,t){t=Math.max(t,$(e)),w[e].distance=t}(s,o),(u.swipeStatus||u.pinchStatus)&&(n=N(t,T)),!u.triggerOnTouchEnd||u.triggerOnTouchLeave){var r=!0;if(u.triggerOnTouchLeave){var l=function(e){var t=(e=re(e)).offset();return{left:t.left,right:t.left+e.outerWidth(),top:t.top,bottom:t.top+e.outerHeight()}}(this);r=function(e,t){return e.x>t.left&&e.x<t.right&&e.y>t.top&&e.y<t.bottom}(i.end,l)}!u.triggerOnTouchEnd&&r?T=I(xe):u.triggerOnTouchLeave&&!r&&(T=I(ye)),T!=me&&T!=ye||N(t,T)}}else N(t,T=me);!1===n&&N(t,T=me)}}function P(e){var t=e.originalEvent;if(Le&&0<t.touches.length)return x=ie(),y=event.touches.length+1,!0;Z()&&(b=y),e.preventDefault(),O=ie(),c=te(),_()?N(t,T=me):u.triggerOnTouchEnd||0==u.triggerOnTouchEnd&&T===xe?N(t,T=ye):!u.triggerOnTouchEnd&&F()?U(t,T=ye,de):T===xe&&N(t,T=me),B(!1)}function R(){p=h=E=O=b=0,f=1,G(),B(!1)}function k(e){var t=e.originalEvent;u.triggerOnTouchLeave&&N(t,T=I(ye))}function A(){v.unbind(n,M),v.unbind(a,R),v.unbind(i,D),v.unbind(r,P),l&&v.unbind(l,k),B(!1)}function I(e){var t=e,n=j(),i=H(),r=_();return!n||r?t=me:!i||e!=xe||u.triggerOnTouchEnd&&!u.triggerOnTouchLeave?!i&&e==ye&&u.triggerOnTouchLeave&&(t=me):t=ye,t}function N(e,t){var n=void 0;return Y()&&C()||C()?n=U(e,t,fe):(Q()&&X()||X())&&!1!==n&&(n=U(e,t,ge)),z()&&V()&&!1!==n?n=U(e,t,we):c>u.longTapThreshold&&o<Ee&&u.longTap&&!1!==n?n=U(e,t,ve):1!==b&&Le||!isNaN(o)&&0!==o||!F()||!1===n||(n=U(e,t,de)),t===me&&R(),t===ye&&(Le?0==e.touches.length&&R():R()),n}function U(e,t,n){var i=void 0;if(n==fe){if(v.trigger("swipeStatus",[t,s||null,o||0,c||0,b]),u.swipeStatus&&!1===(i=u.swipeStatus.call(v,e,t,s||null,o||0,c||0,b)))return!1;if(t==ye&&Y()){if(v.trigger("swipe",[s,o,c,b]),u.swipe&&!1===(i=u.swipe.call(v,e,s,o,c,b)))return!1;switch(s){case le:v.trigger("swipeLeft",[s,o,c,b]),u.swipeLeft&&(i=u.swipeLeft.call(v,e,s,o,c,b));break;case ue:v.trigger("swipeRight",[s,o,c,b]),u.swipeRight&&(i=u.swipeRight.call(v,e,s,o,c,b));break;case ae:v.trigger("swipeUp",[s,o,c,b]),u.swipeUp&&(i=u.swipeUp.call(v,e,s,o,c,b));break;case oe:v.trigger("swipeDown",[s,o,c,b]),u.swipeDown&&(i=u.swipeDown.call(v,e,s,o,c,b))}}}if(n==ge){if(v.trigger("pinchStatus",[t,d||null,g||0,c||0,b,f]),u.pinchStatus&&!1===(i=u.pinchStatus.call(v,e,t,d||null,g||0,c||0,b,f)))return!1;if(t==ye&&Q())switch(d){case se:v.trigger("pinchIn",[d||null,g||0,c||0,b,f]),u.pinchIn&&(i=u.pinchIn.call(v,e,d||null,g||0,c||0,b,f));break;case ce:v.trigger("pinchOut",[d||null,g||0,c||0,b,f]),u.pinchOut&&(i=u.pinchOut.call(v,e,d||null,g||0,c||0,b,f))}}return n==de?t!==me&&t!==ye||(clearTimeout(L),V()&&!z()?(m=ie(),L=setTimeout(re.proxy(function(){m=null,v.trigger("tap",[e.target]),u.tap&&(i=u.tap.call(v,e,e.target))},this),u.doubleTapThreshold)):(m=null,v.trigger("tap",[e.target]),u.tap&&(i=u.tap.call(v,e,e.target)))):n==we?t!==me&&t!==ye||(clearTimeout(L),m=null,v.trigger("doubletap",[e.target]),u.doubleTap&&(i=u.doubleTap.call(v,e,e.target))):n==ve&&(t!==me&&t!==ye||(clearTimeout(L),m=null,v.trigger("longtap",[e.target]),u.longTap&&(i=u.longTap.call(v,e,e.target)))),i}function H(){var e=!0;return null!==u.threshold&&(e=o>=u.threshold),e}function _(){var e=!1;return null!==u.cancelThreshold&&null!==s&&(e=$(s)-o>=u.cancelThreshold),e}function j(){return!u.maxTimeThreshold||!(c>=u.maxTimeThreshold)}function Q(){var e=W(),t=q(),n=null===u.pinchThreshold||g>=u.pinchThreshold;return e&&t&&n}function X(){return!!(u.pinchStatus||u.pinchIn||u.pinchOut)}function Y(){var e=j(),t=H(),n=W(),i=q();return!_()&&i&&n&&t&&e}function C(){return!!(u.swipe||u.swipeStatus||u.swipeLeft||u.swipeRight||u.swipeUp||u.swipeDown)}function W(){return b===u.fingers||u.fingers===Se||!Le}function q(){return 0!==S[0].end.x}
4function F(){return!!u.tap}function V(){return!!u.doubleTap}function z(){if(null==m)return!1;var e=ie();return V()&&e-m<=u.doubleTapThreshold}function G(){y=x=0}function Z(){var e=!1;x&&(ie()-x<=u.fingerReleaseThreshold&&(e=!0));return e}function B(e){!0===e?(v.bind(i,D),v.bind(r,P),l&&v.bind(l,k)):(v.unbind(i,D,!1),v.unbind(r,P,!1),l&&v.unbind(l,k,!1)),v.data(Me+"_intouch",!0===e)}function J(e,t){var n=void 0!==t.identifier?t.identifier:0;return S[e].identifier=n,S[e].start.x=S[e].end.x=t.pageX||t.clientX,S[e].start.y=S[e].end.y=t.pageY||t.clientY,S[e]}function K(e){var t=function(e){for(var t=0;t<S.length;t++)if(S[t].identifier==e)return S[t]}(void 0!==e.identifier?e.identifier:0);return t.end.x=e.pageX||e.clientX,t.end.y=e.pageY||e.clientY,t}function $(e){return w[e].distance}function ee(e){return{direction:e,distance:0}}function te(){return O-E}function ne(e,t){var n=Math.abs(e.x-t.x),i=Math.abs(e.y-t.y);return Math.round(Math.sqrt(n*n+i*i))}function ie(){return(new Date).getTime()}this.enable=function(){return v.bind(n,M),v.bind(a,R),v},this.disable=function(){return A(),v},this.destroy=function(){return A(),v.data(Me,null),v},this.option=function(e,t){if(void 0!==u[e]){if(void 0===t)return u[e];u[e]=t}else re.error("Option "+e+" does not exist on jQuery.swipe.options")}}re.fn.swipe=function(e){var t=re(this),n=t.data(Me);if(n&&"string"==typeof e){if(n[e])return n[e].apply(this,Array.prototype.slice.call(arguments,1));re.error("Method "+e+" does not exist on jQuery.swipe")}else if(!(n||"object"!=typeof e&&e))return function(n){!n||void 0!==n.allowPageScroll||void 0===n.swipe&&void 0===n.swipeStatus||(n.allowPageScroll=he);void 0!==n.click&&void 0===n.tap&&(n.tap=n.click);n||(n={});return n=re.extend({},re.fn.swipe.defaults,n),this.each(function(){var e=re(this),t=e.data(Me);t||(t=new i(this,n),e.data(Me,t))})}.apply(this,arguments);return t},re.fn.swipe.defaults={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:"button, input, select, textarea, a, .noSwipe"},re.fn.swipe.phases={PHASE_START:Oe,PHASE_MOVE:xe,PHASE_END:ye,PHASE_CANCEL:me},re.fn.swipe.directions={LEFT:le,RIGHT:ue,UP:ae,DOWN:oe,IN:se,OUT:ce},re.fn.swipe.pageScroll={NONE:he,HORIZONTAL:Te,VERTICAL:be,AUTO:pe},re.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,ALL:Se}}(jQuery); 5(function(a){function l(){window.console&&console.log&&console.log("[cycle2] "+Array.prototype.join.call(arguments," "))}function r(e){return(e||"").toLowerCase()}a.fn.cycle=function(o){var e;return 0!==this.length||a.isReady?this.each(function(){var e,i,t,n,s=a(this);if(!s.data("cycle.opts")){for(var c in(!1===s.data("cycle-log")||o&&!1===o.log||i&&!1===i.log)&&(l=a.noop),l("--c2 init--"),e=s.data())e.hasOwnProperty(c)&&/^cycle[A-Z]+/.test(c)&&(n=e[c],l((t=c.match(/^cycle(.*)/)[1].replace(/^[A-Z]/,r))+":",n,"("+typeof n+")"),e[t]=n);(i=a.extend({},a.fn.cycle.defaults,e,o||{})).timeoutId=0,i.paused=0,i.container=s,i._maxZ=i.maxZ,i.API=a.extend({_container:s},a.fn.cycle.API),i.API.log=l,i.API.trigger=function(e,t){return i.container.trigger(e,t),i.API},s.data("cycle.opts",i),s.data("cycle.API",i.API),i.API.trigger("cycle-bootstrap",[i,i.API]),i.API.addInitialSlides(),i.API.preInitSlideshow(),i.slides.length&&i.API.initSlideshow()}}):(e={s:this.selector,c:this.context},l("requeuing slideshow (dom not ready)"),a(function(){a(e.s,e.c).cycle(o)}),this)},a.fn.cycle.API={opts:function(){return this._container.data("cycle.opts")},addInitialSlides:function(){var e=this.opts(),t=e.slides;e.slideCount=0,e.slides=a(),t=t.jquery?t:e.container.find(t),e.random&&t.sort(function(){return Math.random()-.5}),e.API.add(t)},preInitSlideshow:function(){var e=this.opts();e.API.trigger("cycle-pre-initialize",[e]);var t=a.fn.cycle.transitions[e.fx];t&&a.isFunction(t.preInit)&&t.preInit(e),e._preInitialized=!0},postInitSlideshow:function(){var e=this.opts();e.API.trigger("cycle-post-initialize",[e]);var t=a.fn.cycle.transitions[e.fx];t&&a.isFunction(t.postInit)&&t.postInit(e)},initSlideshow:function(){var t=this.opts(),e=t.container;t.API.calcFirstSlide(),"static"==t.container.css("position")&&t.container.css("position","relative"),a(t.slides[t.currSlide]).css("opacity",1).show(),t.API.stackSlides(t.slides[t.currSlide],t.slides[t.nextSlide],!t.reverse),t.pauseOnHover&&(!0!==t.pauseOnHover&&(e=a(t.pauseOnHover)),e.hover(function(){t.paused=1,t.API.trigger("cycle-paused",[t])},function(){t.paused=0,t.API.trigger("cycle-resumed",[t])})),t.timeout&&(t.timeoutId=setTimeout(function(){t.API.prepareTx(!1,!t.reverse)},t.timeout+t.delay)),t._initialized=!0,t.API.updateView(!0),t.container.on("cycle-paused cycle-resumed",function(e){t.container["cycle-paused"===e.type?"addClass":"removeClass"]("cycle-paused")}),t.API.trigger("cycle-initialized",[t]),t.API.postInitSlideshow()},add:function(e,n){var t,s=this.opts(),i=s.slideCount;a(e).each(function(e){var t,i=a(this);n?s.container.prepend(i):s.container.append(i),s.slideCount++,t=s.API.buildSlideOpts(i),s.slides=n?a(i).add(s.slides):s.slides.add(i),s.API.initSlide(t,i,--s._maxZ),i.data("cycle.opts",t),s.API.trigger("cycle-slide-added",[s,t,i])}),s.API.updateView(!0),s._preInitialized&&i<2&&1<=s.slideCount&&(s._initialized?s.timeout&&(t=s.slides.length,s.nextSlide=s.reverse?t-1:1):s.API.initSlideshow())},calcFirstSlide:function(){var e,t=this.opts();((e=parseInt(t.startingSlide||0,10))>=t.slides.length||e<0)&&(e=0),t.currSlide=e,t.reverse?(t.nextSlide=e-1,t.nextSlide<0&&(t.nextSlide=t.slides.length-1)):(t.nextSlide=e+1,t.nextSlide==t.slides.length&&(t.nextSlide=0))},calcNextSlide:function(){var e,t=this.opts();t.reverse?(e=t.nextSlide-1<0,t.nextSlide=e?t.slideCount-1:t.nextSlide-1,t.currSlide=e?0:t.nextSlide+1):(e=t.nextSlide+1==t.slides.length,t.nextSlide=e?0:t.nextSlide+1,t.currSlide=e?t.slides.length-1:t.nextSlide-1)},calcTx:function(e,t){var i,n=e;return t&&n.manualFx&&(i=a.fn.cycle.transitions[n.manualFx]),i||(i=a.fn.cycle.transitions[n.fx]),i||(i=a.fn.cycle.transitions.fade,l('Transition "'+n.fx+'" not found. Using fade.')),i},prepareTx:function(e,t){var i,n,s,c,o,l=this.opts();l.slideCount<2?l.timeoutId=0:(e&&(l.API.stopTransition(),l.busy=!1,clearTimeout(l.timeoutId),l.timeoutId=0),l.busy||(0!==l.timeoutId||e)&&(n=l.slides[l.currSlide],s=l.slides[l.nextSlide],c=l.API.getSlideOpts(l.nextSlide),o=l.API.calcTx(c,e),l._tx=o,e&&void 0!==c.manualSpeed&&(c.speed=c.manualSpeed),l.nextSlide!=l.currSlide&&(e||!l.paused&&l.timeout)?(l.API.trigger("cycle-before",[c,n,s,t]),o.before&&o.before(c,n,s,t),i=function(){l.busy=!1,o.after&&o.after(c,n,s,t),l.API.trigger("cycle-after",[c,n,s,t]),l.API.queueTransition(c),l.API.updateView(!0)},l.busy=!0,o.transition?o.transition(c,n,s,t,i):l.API.doTransition(c,n,s,t,i),l.API.calcNextSlide(),l.updateView<0&&l.API.updateView()):l.API.queueTransition(c)))},doTransition:function(e,t,i,n,s){var c=e,o=a(t),l=a(i),r=function(){l.animate(c.animIn||{opacity:1},c.speed,c.easeIn||c.easing,s)};l.css(c.cssBefore||{}),o.animate(c.animOut||{},c.speed,c.easeOut||c.easing,function(){o.css(c.cssAfter||{}),c.sync||r()}),c.sync&&r()},queueTransition:function(e){var t=this.opts();if(0===t.nextSlide&&0==--t.loop)return t.API.log("terminating; loop=0"),t.timeout=0,t.API.trigger("cycle-finished",[t]),void(t.nextSlide=t.currSlide);e.timeout&&(t.timeoutId=setTimeout(function(){t.API.prepareTx(!1,!t.reverse)},e.timeout))},stopTransition:function(){var e=this.opts();e.slides.filter(":animated").length&&(e.slides.stop(!1,!0),e.API.trigger("cycle-transition-stopped",[e])),e._tx&&e._tx.stopTransition&&e._tx.stopTransition(e)},advanceSlide:function(e){var t=this.opts();return clearTimeout(t.timeoutId),t.timeoutId=0,t.nextSlide=t.currSlide+e,t.nextSlide<0?t.nextSlide=t.slides.length-1:t.nextSlide>=t.slides.length&&(t.nextSlide=0),t.API.prepareTx(!0,0<=e),!1},buildSlideOpts:function(e){var t,i,n=this.opts(),s=e.data()||{};for(var c in s)s.hasOwnProperty(c)&&/^cycle[A-Z]+/.test(c)&&(t=s[c],i=c.match(/^cycle(.*)/)[1].replace(/^[A-Z]/,r),l("["+(n.slideCount-1)+"]",i+":",t,"("+typeof t+")"),s[i]=t);(s=a.extend({},a.fn.cycle.defaults,n,s)).slideNum=n.slideCount;try{delete s.API,delete s.slideCount,delete s.currSlide,delete s.nextSlide,delete s.slides}catch(e){}return s},getSlideOpts:function(e){var t=this.opts();void 0===e&&(e=t.currSlide);var i=t.slides[e],n=a(i).data("cycle.opts");return a.extend({},t,n)},initSlide:function(e,t,i){var n=this.opts();t.css(e.slideCss||{}),0<i&&t.css("zIndex",i),isNaN(e.speed)&&(e.speed=a.fx.speeds[e.speed]||a.fx.speeds._default),e.sync||(e.speed=e.speed/2),t.addClass(n.slideClass)},updateView:function(e){var t=this.opts();if(t._initialized){var i=t.API.getSlideOpts(),n=t.slides[t.currSlide];t.slideActiveClass&&t.slides.removeClass(t.slideActiveClass).eq(t.currSlide).addClass(t.slideActiveClass),e&&t.hideNonActive&&t.slides.filter(":not(."+t.slideActiveClass+")").hide(),t.API.trigger("cycle-update-view",[t,i,n])}},getComponent:function(e){var t=this.opts(),i=t[e];return"string"==typeof i?/^\s*\>/.test(i)?t.container.find(i):a(i):i.jquery?i:a(i)},stackSlides:function(e,t,i){var n=this.opts();e||(e=n.slides[n.currSlide],t=n.slides[n.nextSlide],i=!n.reverse),a(e).css("zIndex",n.maxZ);var s,c=n.maxZ-2,o=n.slideCount;if(i){for(s=n.currSlide+1;s<o;s++)a(n.slides[s]).css("zIndex",c--);for(s=0;s<n.currSlide;s++)a(n.slides[s]).css("zIndex",c--)}else{for(s=n.currSlide-1;0<=s;s--)a(n.slides[s]).css("zIndex",c--);for(s=o-1;s>n.currSlide;s--)a(n.slides[s]).css("zIndex",c--)}a(t).css("zIndex",n.maxZ-1)},getSlideIndex:function(e){return this.opts().slides.index(e)}},a.fn.cycle.log=l,a.fn.cycle.version=function(){return"Cycle2: 20121125.2"},a.fn.cycle.transitions={custom:{},none:{before:function(e,t,i,n){e.API.stackSlides(i,t,n),e.cssBefore={opacity:1,display:"block"}}},fade:{before:function(e,t,i,n){var s=e.API.getSlideOpts(e.nextSlide).slideCss||{};e.API.stackSlides(t,i,n),e.cssBefore=a.extend(s,{opacity:0,display:"block"}),e.animIn={opacity:1},e.animOut={opacity:0}
5}},fadeout:{before:function(e,t,i,n){var s=e.API.getSlideOpts(e.nextSlide).slideCss||{};e.API.stackSlides(t,i,n),e.cssBefore=a.extend(s,{opacity:1,display:"block"}),e.animOut={opacity:0}}},scrollHorz:{before:function(e,t,i,n){e.API.stackSlides(t,i,n);var s=e.container.css("overflow","hidden").width();e.cssBefore={left:n?s:-s,top:0,opacity:1,display:"block"},e.cssAfter={zIndex:e._maxZ-2},e.animIn={left:0},e.animOut={left:n?-s:s}}}},a.fn.cycle.defaults={allowWrap:!0,autoSelector:".cycle-slideshow[data-cycle-auto-init!=false]",delay:0,easing:null,fx:"fade",hideNonActive:!0,loop:0,manualFx:void 0,manualSpeed:void 0,maxZ:100,pauseOnHover:!1,reverse:!1,slideActiveClass:"cycle-slide-active",slideClass:"cycle-slide",slideCss:{position:"absolute",top:0,left:0},slides:"> img",speed:500,startingSlide:0,sync:!0,timeout:4e3,updateView:-1},a(document).ready(function(){a(a.fn.cycle.defaults.autoSelector).cycle()})})(jQuery),function(l){l.extend(l.fn.cycle.defaults,{autoHeight:0}),l(document).on("cycle-initialized",function(e,t){function i(){t.container.height(t.container.width()/s)}var n,s,c=t.autoHeight,o=-1;"calc"===c||"number"==l.type(c)&&0<=c?("calc"===c?t.slides.each(function(e){var t=l(this).height();o<t&&(o=t,c=e)}):c>=t.slides.length&&(c=0),(n=l(t.slides[c]).clone()).removeAttr("id").find("[id]").removeAttr("id"),n.removeAttr("name").find("[name]").removeAttr("name"),n.css({position:"static",visibility:"hidden",display:"block"}).prependTo(t.container).removeClass().addClass("cycle-sentinel cycle-slide"),t._sentinel=n):"string"==l.type(c)&&/\d+\:\d+/.test(c)&&(s=(s=c.match(/(\d+)\:(\d+)/))[1]/s[2],l(window).on("resize",i),t._autoHeightOnResize=i,setTimeout(function(){l(window).triggerHandler("resize")},15))}),l(document).on("cycle-destroyed",function(e,t){t._sentinel&&t._sentinel.remove(),t._autoHeightOnResize&&l(window).off("resize",t._autoHeightOnResize)})}(jQuery),function(c){c.extend(c.fn.cycle.defaults,{caption:"> .cycle-caption",captionTemplate:"{{slideNum}} / {{slideCount}}",overlay:"> .cycle-overlay",overlayTemplate:"<div>{{title}}</div><div>{{desc}}</div>"}),c(document).on("cycle-update-view",function(e,i,n,s){c.each(["caption","overlay"],function(){var e=n[this+"Template"],t=i.API.getComponent(this);t.length&&e?(t.html(i.API.tmpl(e,n,i,s)),t.show()):t.hide()})}),c(document).on("cycle-destroyed",function(e,t){c.each(["caption","overlay"],function(){var e=t[this+"Template"];t[this]&&e&&t.API.getComponent("caption").empty()})})}(jQuery),function(l){"use strict";var o=l.fn.cycle;l.fn.cycle=function(t){var i,n,s,c=l.makeArray(arguments);return"number"==l.type(t)?this.cycle("goto",t):"string"==l.type(t)?this.each(function(){var e;if(i=t,void 0!==(s=l(this).data("cycle.opts"))){if(i="goto"==i?"jump":i,n=s.API[i],l.isFunction(n))return(e=l.makeArray(c)).shift(),n.apply(s.API,e);o.log("unknown command: ",i)}else o.log('slideshow must be initialized before sending commands; "'+i+'" ignored')}):o.apply(this,arguments)},l.extend(l.fn.cycle,o),l.extend(o.API,{next:function(){var e=this.opts(),t=e.reverse?-1:1;!1===e.allowWrap&&e.currSlide+t>=e.slideCount||(e.API.advanceSlide(t),e.API.trigger("cycle-next",[e]).log("cycle-next"))},prev:function(){var e=this.opts(),t=e.reverse?1:-1;!1===e.allowWrap&&e.currSlide+t<0||(e.API.advanceSlide(t),e.API.trigger("cycle-prev",[e]).log("cycle-prev"))},destroy:function(){var e=this.opts();clearTimeout(e.timeoutId),e.timeoutId=0,e.API.stop(),e.API.trigger("cycle-destroyed",[e]).log("cycle-destroyed"),e.container.removeData("cycle.opts")},jump:function(e){var t,i=this.opts(),n=parseInt(e,10);isNaN(n)||n<0||n>=i.slides.length?i.API.log("goto: invalid slide index: "+n):n!=i.currSlide?(i.nextSlide=n,clearTimeout(i.timeoutId),i.timeoutId=0,i.API.log("goto: ",n," (zero-index)"),t=i.currSlide<i.nextSlide,i.API.prepareTx(!0,t)):i.API.log("goto: skipping, already on slide",n)},stop:function(){var e=this.opts(),t=e.container;clearTimeout(e.timeoutId),e.timeoutId=0,e.API.stopTransition(),e.pauseOnHover&&(!0!==e.pauseOnHover&&(t=l(e.pauseOnHover)),t.off("mouseenter mouseleave")),e.API.trigger("cycle-stopped",[e]).log("cycle-stopped")},pause:function(){var e=this.opts();e.paused=!0,e.API.trigger("cycle-paused",[e]).log("cycle-paused")},resume:function(){var e=this.opts();e.paused=!1,e.API.trigger("cycle-resumed",[e]).log("cycle-resumed")},reinit:function(){var e=this.opts();e.API.destroy(),e.container.cycle()},remove:function(e){for(var t,i,n=this.opts(),s=[],c=1,o=0;o<n.slides.length;o++)t=n.slides[o],o==e?i=t:(s.push(t),l(t).data("cycle.opts").slideNum=c,c++);i&&(n.slides=l(s),n.slideCount--,l(i).remove(),e==n.currSlide&&n.API.advanceSlide(1),n.API.trigger("cycle-slide-removed",[n,e,i]).log("cycle-slide-removed"),n.API.updateView())}}),l(document).on("click.cycle","[data-cycle-cmd]",function(e){e.preventDefault();var t=l(this),i=t.data("cycle-cmd"),n=t.data("cycle-context")||".cycle-slideshow";l(n).cycle(i,t.data("cycle-arg"))})}(jQuery),function(s){function i(t,i){var n;t._hashFence?t._hashFence=!1:(n=window.location.hash.substring(1),t.slides.each(function(e){if(s(this).data("cycle-hash")==n)return!0===i?t.startingSlide=e:(t.nextSlide=e,t.API.prepareTx(!0,!1)),!1}))}s(document).on("cycle-pre-initialize",function(e,t){i(t,!0),t._onHashChange=function(){i(t,!1)},s(window).on("hashchange",t._onHashChange)}),s(document).on("cycle-update-view",function(e,t,i){i.hash&&(t._hashFence=!0,window.location.hash=i.hash)}),s(document).on("cycle-destroyed",function(e,t){t._onHashChange&&s(window).off("hashchange",t._onHashChange)})}(jQuery),function(a){a.extend(a.fn.cycle.defaults,{loader:!1}),a(document).on("cycle-bootstrap",function(e,l){var r;l.loader&&(r=l.API.add,l.API.add=function(e,s){var c=[],o=(e=a(e)).length;e.hide().each(function(){function e(){0==--t&&(--o,function(e){var t;
5"wait"==l.loader?(c.push(e),0===o&&(r.apply(l.API,[c,s]),l.container.removeClass("cycle-loading"))):(t=a(l.slides[l.currSlide]),r.apply(l.API,[e,s]),t.show(),l.container.removeClass("cycle-loading"))}(i))}var t=0,i=a(this),n=i.is("img")?i:i.find("img");if(!(n=n.filter(":not(.cycle-loader-ignore)")).length)return--o,void c.push(i);t=n.length,n.each(function(){this.complete?e():a(this).load(function(){e()}).error(function(){0==--t&&(l.API.log("slide skipped; img not loaded:",this.src),0==--o&&"wait"==l.loader&&r.apply(l.API,[c,s]))})})}),o&&l.container.addClass("cycle-loading")})})}(jQuery),function(o){function n(i,n,s){var c;i.API.getComponent("pager").each(function(){var t=o(this);if(n.pagerTemplate){var e=i.API.tmpl(n.pagerTemplate,n,i,s[0]);c=o(e).appendTo(t)}else c=t.children().eq(i.slideCount-1);c.on(i.pagerEvent,function(e){e.preventDefault(),i.API.page(t,e.currentTarget)})})}function s(e,t){var i=this.opts(),n=e.children().index(t),s=i.currSlide<n;i.currSlide!=n&&(i.nextSlide=n,i.API.prepareTx(!0,s),i.API.trigger("cycle-pager-activated",[i,e,t]))}o.extend(o.fn.cycle.defaults,{pager:"> .cycle-pager",pagerActiveClass:"cycle-pager-active",pagerEvent:"click.cycle",pagerTemplate:"<span>•</span>"}),o(document).on("cycle-bootstrap",function(e,t,i){i.buildPagerLink=n}),o(document).on("cycle-slide-added",function(e,t,i,n){t.pager&&(t.API.buildPagerLink(t,i,n),t.API.page=s)}),o(document).on("cycle-slide-removed",function(e,t,i,n){t.pager&&t.API.getComponent("pager").each(function(){var e=o(this);o(e.children()[i]).remove()})}),o(document).on("cycle-update-view",function(e,t,i){t.pager&&t.API.getComponent("pager").each(function(){o(this).children().removeClass(t.pagerActiveClass).eq(t.currSlide).addClass(t.pagerActiveClass)})}),o(document).on("cycle-destroyed",function(e,t){t.pager&&t.pagerTemplate&&t.API.getComponent("pager").empty()})}(jQuery),function(i){i.extend(i.fn.cycle.defaults,{next:"> .cycle-next",nextEvent:"click.cycle",disabledClass:"disabled",prev:"> .cycle-prev",prevEvent:"click.cycle",swipe:!1}),i(document).on("cycle-initialized",function(e,t){if(t.API.getComponent("next").off(t.nextEvent).on(t.nextEvent,function(e){e.preventDefault(),t.API.next()}),t.API.getComponent("prev").off(t.prevEvent).on(t.prevEvent,function(e){e.preventDefault(),t.API.prev()}),t.swipe){var i=t.swipeVert?"swipeUp.cycle":"swipeLeft.cycle swipeleft.cycle",n=t.swipeVert?"swipeDown.cycle":"swipeRight.cycle swiperight.cycle";t.container.on(i,function(e){t.API.next()}),t.container.on(n,function(){t.API.prev()})}}),i(document).on("cycle-update-view",function(e,t,i,n){if(!t.allowWrap){var s=t.disabledClass,c=t.API.getComponent("next"),o=t.API.getComponent("prev"),l=t._prevBoundry||0,r=t._nextBoundry||t.slideCount-1;t.currSlide==r?c.addClass(s).prop("disabled",!0):c.removeClass(s).prop("disabled",!1),t.currSlide===l?o.addClass(s).prop("disabled",!0):o.removeClass(s).prop("disabled",!1)}}),i(document).on("cycle-destroyed",function(e,t){i(t.next).off(t.nextEvent),i(t.prev).off(t.prevEvent),t.container.off("swipeleft.cycle swiperight.cycle swipeLeft.cycle swipeRight.cycle swipeUp.cycle swipeDown.cycle")})}(jQuery),function(r){r.extend(r.fn.cycle.defaults,{progressive:!1}),r(document).on("cycle-pre-initialize",function(e,s){if(s.progressive){var c,t=s.API,i=t.next,n=t.prev,o=t.prepareTx,l=r.type(s.progressive);if("array"==l)c=s.progressive;else if(r.isFunction(s.progressive))c=s.progressive(s);else if("string"==l){if(c=r(s.progressive).html(),!r.trim(c))return;try{c=r.parseJSON(c)}catch(e){return void t.log("error parsing progressive slides",e)}}o&&(t.prepareTx=function(e,t){var i,n;e||0===c.length?o.apply(s.API,[e,t]):t&&s.currSlide==s.slideCount-1?(n=c[0],c=c.slice(1),s.container.one("cycle-slide-added",function(e,t){t.API.advanceSlide(1)}),s.API.add(n)):t||0!==s.currSlide?o.apply(s.API,[e,t]):(i=c.length-1,n=c[i],c=c.slice(0,i),s.container.one("cycle-slide-added",function(e,t){t.currSlide=1,t.API.advanceSlide(-1)}),s.API.add(n,!0))}),i&&(t.next=function(){var e=this.opts();if(c.length&&e.currSlide==e.slideCount-1){var t=c[0];c=c.slice(1),e.container.one("cycle-slide-added",function(e,t){i.apply(t.API),t.container.removeClass("cycle-loading")}),e.container.addClass("cycle-loading"),e.API.add(t)}else i.apply(e.API)}),n&&(t.prev=function(){var e=this.opts();if(c.length&&0===e.currSlide){var t=c.length-1,i=c[t];c=c.slice(0,t),e.container.one("cycle-slide-added",function(e,t){t.currSlide=1,t.API.advanceSlide(-1),t.container.removeClass("cycle-loading")}),e.container.addClass("cycle-loading"),e.API.add(i,!0)}else n.apply(e.API)})}})}(jQuery),function(r){r.extend(r.fn.cycle.defaults,{tmplRegex:"{{((.)?.*?)}}"}),r.extend(r.fn.cycle.API,{tmpl:function(e,t){var i=new RegExp(t.tmplRegex||r.fn.cycle.defaults.tmplRegex,"g"),l=r.makeArray(arguments);return l.shift(),e.replace(i,function(e,t){var i,n,s,c,o=t.split(".");for(i=0;i<l.length;i++){if(s=l[i],1<o.length)for(c=s,n=0;n<o.length;n++)c=(s=c)[o[n]]||t;else c=s[t];if(r.isFunction(c))return c.apply(s,l);if(null!=c&&c!=t)return c}return t})}})}(jQuery); 6(function(){var l,i,r,n,o={}.hasOwnProperty;(n=function(){function t(){this.options_index=0,this.parsed=[]}return t.prototype.add_node=function(t){return"OPTGROUP"===t.nodeName.toUpperCase()?this.add_group(t):this.add_option(t)},t.prototype.add_group=function(t){var e,s,i,r,o,n;for(e=this.parsed.length,this.parsed.push({array_index:e,group:!0,label:this.escapeExpression(t.label),children:0,disabled:t.disabled,classes:t.className}),n=[],i=0,r=(o=t.childNodes).length;i<r;i++)s=o[i],n.push(this.add_option(s,e,t.disabled));return n},t.prototype.add_option=function(t,e,s){return"OPTION"===t.nodeName.toUpperCase()?(""!==t.text?(null!=e&&(this.parsed[e].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:t.value,text:t.text,html:t.innerHTML,selected:t.selected,disabled:!0===s?s:t.disabled,group_array_index:e,classes:t.className,style:t.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1):void 0},t.prototype.escapeExpression=function(t){var e,s;return null==t||!1===t?"":/[\&\<\>\"\'\`]/.test(t)?(e={"<":"<",">":">",'"':""","'":"'","`":"`"},s=/&(?!\w+;)|[\<\>\"\'\`]/g,t.replace(s,function(t){return e[t]||"&"})):t},t}()).select_to_array=function(t){var e,s,i,r,o;for(s=new n,i=0,r=(o=t.childNodes).length;i<r;i++)e=o[i],s.add_node(e);return s.parsed},i=function(){function s(t,e){this.form_field=t,this.options=null!=e?e:{},s.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return s.prototype.set_default_values=function(){var e=this;return this.click_test_action=function(t){return e.test_active_click(t)},this.activate_action=function(t){return e.activate_field(t)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text&&this.options.allow_single_deselect,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null==this.options.enable_split_word_search||this.options.enable_split_word_search,this.group_search=null==this.options.group_search||this.options.group_search,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null==this.options.single_backstroke_delete||this.options.single_backstroke_delete,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null==this.options.display_selected_options||this.options.display_selected_options,this.display_disabled_options=null==this.options.display_disabled_options||this.options.display_disabled_options},s.prototype.set_default_text=function(){return this.default_text=this.form_field.getAttribute("data-placeholder")?this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.options.placeholder_text_multiple||this.options.placeholder_text||s.default_multiple_text:this.options.placeholder_text_single||this.options.placeholder_text||s.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||s.default_no_result_text},s.prototype.mouse_enter=function(){return this.mouse_on_container=!0},s.prototype.mouse_leave=function(){return this.mouse_on_container=!1},s.prototype.input_focus=function(){var t=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return t.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},s.prototype.input_blur=function(){var t=this;return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(){return t.blur_test()},100))},s.prototype.results_option_build=function(t){var e,s,i,r,o;for(e="",i=0,r=(o=this.results_data).length;i<r;i++)e+=(s=o[i]).group?this.result_add_group(s):this.result_add_option(s),(null!=t?t.first:void 0)&&(s.selected&&this.is_multiple?this.choice_build(s):s.selected&&!this.is_multiple&&this.single_set_selected_text(s.text));return e},s.prototype.result_add_option=function(t){var e,s;return t.search_match&&this.include_option_in_results(t)?(e=[],t.disabled||t.selected&&this.is_multiple||e.push("active-result"),!t.disabled||t.selected&&this.is_multiple||e.push("disabled-result"),t.selected&&e.push("result-selected"),null!=t.group_array_index&&e.push("group-option"),""!==t.classes&&e.push(t.classes),(s=document.createElement("li")).className=e.join(" "),s.style.cssText=t.style,s.setAttribute("data-option-array-index",t.array_index),s.innerHTML=t.search_text,this.outerHTML(s)):""},s.prototype.result_add_group=function(t){var e,s;return(t.search_match||t.group_match)&&0<t.active_options?((e=[]).push("group-result"),t.classes&&e.push(t.classes),(s=document.createElement("li")).className=e.join(" "),s.innerHTML=t.search_text,this.outerHTML(s)):""},s.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing?this.winnow_results():void 0},s.prototype.reset_single_select_options=function(){var t,e,s,i,r;for(r=[],e=0,s=(i=this.results_data).length;e<s;e++)(t=i[e]).selected?r.push(t.selected=!1):r.push(void 0);return r},s.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},s.prototype.results_search=function(){return this.results_showing?this.winnow_results():this.results_show()},s.prototype.winnow_results=function(){var t,e,s,i,r,o,n,h,l,c,a,_;for(this.no_results_clear(),i=0,t=(o=this.get_search_text()).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),l=new RegExp(t,"i"),s=this.get_search_regex(t),c=0,a=(_=this.results_data).length;c<a;c++)(e=_[c]).search_match=!1,r=null,this.include_option_in_results(e)&&(e.group&&(e.group_match=!1,e.active_options=0),null!=e.group_array_index&&this.results_data[e.group_array_index]&&(0===(r=this.results_data[e.group_array_index]).active_options&&r.search_match&&(i+=1),r.active_options+=1),(!e.group||this.group_search)&&(e.search_text=e.group?e.label:e.text,e.search_match=this.search_string_match(e.search_text,s),e.search_match&&!e.group&&(i+=1),e.search_match?(o.length&&(n=e.search_text.search(l),h=e.search_text.substr(0,n+o.length)+"</em>"+e.search_text.substr(n+o.length),e.search_text=h.substr(0,n)+"<em>"+h.substr(n)),null!=r&&(r.group_match=!0)):null!=e.group_array_index&&this.results_data[e.group_array_index].search_match&&(e.search_match=!0)));return this.result_clear_highlight(),i<1&&o.length?(this.update_results_content(""),this.no_results(o)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},s.prototype.get_search_regex=function(t){var e;return e=this.search_contains?"":"^",new RegExp(e+t,"i")},s.prototype.search_string_match=function(t,e){var s,i,r,o;
6if(e.test(t))return!0;if(this.enable_split_word_search&&(0<=t.indexOf(" ")||0===t.indexOf("["))&&(i=t.replace(/\[|\]/g,"").split(" ")).length)for(r=0,o=i.length;r<o;r++)if(s=i[r],e.test(s))return!0},s.prototype.choices_count=function(){var t,e,s;if(null!=this.selected_option_count)return this.selected_option_count;for(t=this.selected_option_count=0,e=(s=this.form_field.options).length;t<e;t++)s[t].selected&&(this.selected_option_count+=1);return this.selected_option_count},s.prototype.choices_click=function(t){return t.preventDefault(),this.results_showing||this.is_disabled?void 0:this.results_show()},s.prototype.keyup_checker=function(t){var e,s;switch(e=null!=(s=t.which)?s:t.keyCode,this.search_field_scale(),e){case 8:if(this.is_multiple&&this.backstroke_length<1&&0<this.choices_count())return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(t.preventDefault(),this.results_showing)return this.result_select(t);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},s.prototype.clipboard_event_checker=function(){var t=this;return setTimeout(function(){return t.results_search()},50)},s.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.offsetWidth+"px"},s.prototype.include_option_in_results=function(t){return!(this.is_multiple&&!this.display_selected_options&&t.selected)&&(!(!this.display_disabled_options&&t.disabled)&&!t.empty)},s.prototype.search_results_touchstart=function(t){return this.touch_started=!0,this.search_results_mouseover(t)},s.prototype.search_results_touchmove=function(t){return this.touch_started=!1,this.search_results_mouseout(t)},s.prototype.search_results_touchend=function(t){return this.touch_started?this.search_results_mouseup(t):void 0},s.prototype.outerHTML=function(t){var e;return t.outerHTML?t.outerHTML:((e=document.createElement("div")).appendChild(t),e.innerHTML)},s.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?8<=document.documentMode:!/iP(od|hone)/i.test(window.navigator.userAgent)&&(!/Android/i.test(window.navigator.userAgent)||!/Mobile/i.test(window.navigator.userAgent))},s.default_multiple_text="Select Some Options",s.default_single_text="Select an Option",s.default_no_result_text="No results match",s}(),(l=jQuery).fn.extend({chosen:function(s){return i.browser_is_supported()?this.each(function(){var t,e;e=(t=l(this)).data("chosen"),"destroy"===s&&e instanceof r?e.destroy():e instanceof r||t.data("chosen",new r(this,s))}):this}}),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return function(t,e){function s(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);s.prototype=e.prototype,t.prototype=new s,t.__super__=e.prototype}(e,i),e.prototype.setup=function(){return this.form_field_jq=l(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},e.prototype.set_up_html=function(){var t,e;return(t=["chosen-container"]).push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&t.push(this.form_field.className),this.is_rtl&&t.push("chosen-rtl"),e={class:t.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(e.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=l("<div />",e),this.is_multiple?this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>'):this.container.html('<a class="chosen-single chosen-default" tabindex="-1"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>'),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},e.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},e.prototype.register_observers=function(){var e=this;return this.container.bind("touchstart.chosen",function(t){e.container_mousedown(t)}),this.container.bind("touchend.chosen",function(t){e.container_mouseup(t)}),this.container.bind("mousedown.chosen",function(t){e.container_mousedown(t)}),this.container.bind("mouseup.chosen",function(t){e.container_mouseup(t)}),this.container.bind("mouseenter.chosen",function(t){e.mouse_enter(t)}),this.container.bind("mouseleave.chosen",function(t){e.mouse_leave(t)}),this.search_results.bind("mouseup.chosen",function(t){e.search_results_mouseup(t)}),this.search_results.bind("mouseover.chosen",function(t){e.search_results_mouseover(t)}),this.search_results.bind("mouseout.chosen",function(t){e.search_results_mouseout(t)}),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(t){e.search_results_mousewheel(t)}),this.search_results.bind("touchstart.chosen",function(t){e.search_results_touchstart(t)}),this.search_results.bind("touchmove.chosen",function(t){e.search_results_touchmove(t)}),this.search_results.bind("touchend.chosen",function(t){e.search_results_touchend(t)}),this.form_field_jq.bind("chosen:updated.chosen",function(t){e.results_update_field(t)}),this.form_field_jq.bind("chosen:activate.chosen",function(t){e.activate_field(t)}),this.form_field_jq.bind("chosen:open.chosen",function(t){e.container_mousedown(t)}),this.form_field_jq.bind("chosen:close.chosen",function(t){e.input_blur(t)}),this.search_field.bind("blur.chosen",function(t){e.input_blur(t)}),this.search_field.bind("keyup.chosen",function(t){e.keyup_checker(t)}),this.search_field.bind("keydown.chosen",function(t){e.keydown_checker(t)}),this.search_field.bind("focus.chosen",function(t){e.input_focus(t)}),this.search_field.bind("cut.chosen",function(t){e.clipboard_event_checker(t)}),this.search_field.bind("paste.chosen",function(t){e.clipboard_event_checker(t)}),this.is_multiple?this.search_choices.bind("click.chosen",function(t){e.choices_click(t)}):this.container.bind("click.chosen",function(t){t.preventDefault()})},e.prototype.destroy=function(){return l(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},e.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chosen-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_action),this.close_field()):(this.container.removeClass("chosen-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus.chosen",this.activate_action))},e.prototype.container_mousedown=function(t){return this.is_disabled||(t&&"mousedown"===t.type&&!this.results_showing&&t.preventDefault(),null!=t&&l(t.target).hasClass("search-choice-close"))?void 0:(this.active_field?this.is_multiple||!t||l(t.target)[0]!==this.selected_item[0]&&!l(t.target).parents("a.chosen-single").length||(t.preventDefault(),this.results_toggle(
6)):(this.is_multiple&&this.search_field.val(""),l(this.container[0].ownerDocument).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},e.prototype.container_mouseup=function(t){return"ABBR"!==t.target.nodeName||this.is_disabled?void 0:this.results_reset(t)},e.prototype.search_results_mousewheel=function(t){var e;return t.originalEvent&&(e=t.originalEvent.deltaY||-t.originalEvent.wheelDelta||t.originalEvent.detail),null!=e?(t.preventDefault(),"DOMMouseScroll"===t.type&&(e*=40),this.search_results.scrollTop(e+this.search_results.scrollTop())):void 0},e.prototype.blur_test=function(){return!this.active_field&&this.container.hasClass("chosen-container-active")?this.close_field():void 0},e.prototype.close_field=function(){return l(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},e.prototype.activate_field=function(){return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},e.prototype.test_active_click=function(t){var e;return(e=l(t.target).closest(".chosen-container")).length&&this.container[0]===e[0]?this.active_field=!0:this.close_field()},e.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=n.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},e.prototype.result_do_highlight=function(t){var e,s,i,r;if(t.length){if(this.result_clear_highlight(),this.result_highlight=t,this.result_highlight.addClass("highlighted"),(i=parseInt(this.search_results.css("maxHeight"),10))+(r=this.search_results.scrollTop())<=(e=(s=this.result_highlight.position().top+this.search_results.scrollTop())+this.result_highlight.outerHeight()))return this.search_results.scrollTop(0<e-i?e-i:0);if(s<r)return this.search_results.scrollTop(s)}},e.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},e.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},e.prototype.update_results_content=function(t){return this.search_results.html(t)},e.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},e.prototype.set_tab_index=function(){var t;return this.form_field.tabIndex?(t=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=t):void 0},e.prototype.set_label_behavior=function(){var e=this;return this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=l("label[for='"+this.form_field.id+"']")),0<this.form_field_label.length?this.form_field_label.bind("click.chosen",function(t){return e.is_multiple?e.container_mousedown(t):e.activate_field()}):void 0},e.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},e.prototype.search_results_mouseup=function(t){var e;return(e=l(t.target).hasClass("active-result")?l(t.target):l(t.target).parents(".active-result").first()).length?(this.result_highlight=e,this.result_select(t),this.search_field.focus()):void 0},e.prototype.search_results_mouseover=function(t){var e;return(e=l(t.target).hasClass("active-result")?l(t.target):l(t.target).parents(".active-result").first())?this.result_do_highlight(e):void 0},e.prototype.search_results_mouseout=function(t){return l(t.target).hasClass("active-result")?this.result_clear_highlight():void 0},e.prototype.choice_build=function(t){var e,s,i=this;return e=l("<li />",{class:"search-choice"}).html("<span>"+t.html+"</span>"),t.disabled?e.addClass("search-choice-disabled"):((s=l("<a />",{class:"search-choice-close","data-option-array-index":t.array_index})).bind("click.chosen",function(t){return i.choice_destroy_link_click(t)}),e.append(s)),this.search_container.before(e)},e.prototype.choice_destroy_link_click=function(t){return t.preventDefault(),t.stopPropagation(),this.is_disabled?void 0:this.choice_destroy(l(t.target))},e.prototype.choice_destroy=function(t){return this.result_deselect(t[0].getAttribute("data-option-array-index"))?(this.show_search_field_default(),this.is_multiple&&0<this.choices_count()&&this.search_field.val().length<1&&this.results_hide(),t.parents("li").first().remove(),this.search_field_scale()):void 0},e.prototype.results_reset=function(){return this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field?this.results_hide():void 0},e.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},e.prototype.result_select=function(t){var e,s;return this.result_highlight?(e=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?e.removeClass("active-result"):this.reset_single_select_options(),(s=this.results_data[e[0].getAttribute("data-option-array-index")]).selected=!0,this.form_field.options[s.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(s):this.single_set_selected_text(s.text),(t.metaKey||t.ctrlKey)&&this.is_multiple||this.results_hide(),this.search_field.val(""),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[s.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,this.search_field_scale())):void 0},e.prototype.single_set_selected_text=function(t){return null==t&&(t=this.default_text),t===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").text(t)},e.prototype.result_deselect=function(t){var e;return e=this.results_data[t],!this.form_field.options[e.options_index].disabled&&(e.selected=!1,this.form_field.options[e.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[e.options_index].value}),this.search_field_scale(),!0)},e.prototype.single_deselect_control_build=function(){return this.allow_single_deselect?(this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")):void 0},e.prototype.get_search_text=function(){return this.search_field.val()===this.default_text?"":l("<div/>").text(l.trim(this.search_field.val())).html()},e.prototype.winnow_results_set_highlight=function(){var t,e;return null!=(t=(e=this.is_multiple?[]:this.search_results.find(".result-selected.active-result")).length?e.first():this.search_results.find(".active-result").first())?this.result_do_highlight(t):void 0},e.prototype.no_results=function(t){var e;return(e=l('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>')).find("span").first().html(t),this.search_results.append(e),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},e.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},e.prototype.keydown_arrow=function(){var t;return this.results_showing&&this.result_highlight?(t=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(t):void 0:this.results_show()},e.prototype.keyup_arrow=function(){var t;return this.results_showing||this.is_multiple?this.result_highlight?(t=this.result_highlight.prevAll("li.active-result")).length?this.result_do_highlight(t.first()):(0<this.choices_count()&&this.results_hide(),this.result_clear_highlight()):void 0:this.results_show()},e.prototype.keydown_backstroke=function(){var t;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(t=this.search_container.siblings("li.search-choice").last()).length&&!t.hasClass("search-choice-disabled")?(this.pending_backstroke=t,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0},e.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},e.prototype.keydown_checker=function(t){var e,s;switch(e=null!=(s=t.which)?s:t.keyCode,this.search_field_scale(),8!==e&&this.pending_backstroke&&this.clear_backstroke(),e){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(t),this.mouse_on_container=!1;break;case 13:this.results_showing&&t.preventDefault();break;case 32:this.disable_search&&t.preventDefault();break;case 38:t.preventDefault(),this.keyup_arrow();break;case 40:t.preventDefault(),this.keydown_arrow()}},e.prototype.search_field_scale=function(){var t,e,s,i,r,o,n,h;if(this.is_multiple){for(i="position:absolute; left: -1000px; top: -1000px; display:none;",n=o=0,h=(r=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"]).length;n<h;n++)i+=(s=r[n])+":"+this.search_field.css(s)+";";return(t=l("<div />",{style:i})).text(this.search_field.val()),l("body").append(t),o=t.width()+25,t.remove(),(e=this.container.outerWidth())-10<o&&(o=e-10),this.search_field.css({width:o+"px"})}},e}()}).call(this); 7!function(ne){ne.fn.areaPicker=function(e){var re=ne.extend({source:null,preSelectedItems:null,enabledItems:null,selectedItemsContainer:ne("#selectedAreas"),selectedItemsLabel:ne("#selectedAreasLabel"),autoCompleteMatchValues:ne("#autoCompleteMatchValues"),areaPickerExpandAllButtonClass:".areaPickerExpandAllButtonClass",areaPickerExpandAll:ne("#areaPickerExpandAll"),areaPickerExpandAllContainer:ne("#areaPickerExpandAllContainer"),numberOfColumnsExpandedMode:null,outerContainer:ne("#areaPickerContainer"),omitAreaTypesInExpandedMode:"",expandSubAreasButton:" + ",closeSubAreasButton:" − ",defaultAutocompleteValue:"City / Neighborhood / Zip",autocompleteTextLength:3,autocompleteMessage:"Enter a city, neighborhood or zip.",customAreaListToggle:ne("#areaPickerCustomListToggle"),customAreaListToggleMoreAreasText:" More Areas",customAreaListToggleLessAreasText:" Limit Areas",areaPickerClearAll:ne("#areaPickerClearAll"),isPhpStyle:"false",autocompleteRequestUrl:null,searchType:"basic",restrictCitySearchToCustomList:"false"},e);return this.each(function(){var t=ne(this),e=re.source,r=re.preSelectedItems,n=re.enabledItems,s=!0,d=re.selectedItemsContainer,l=re.selectedItemsLabel,f=re.autoCompleteMatchValues,a=re.areaPickerExpandAllButtonClass,c=re.areaPickerExpandAll,i=re.areaPickerExpandAllContainer,A=re.omitAreaTypesInExpandedMode,o=re.defaultAutocompleteValue,u=re.autocompleteMessage,p=re.autocompleteTextLength,v=re.outerContainer,C=re.numberOfColumnsExpandedMode,m=re.customAreaListToggle,h=re.customAreaListToggleMoreAreasText,b=re.customAreaListToggleLessAreasText,g=re.areaPickerClearAll,k=!1;"true"===re.isPhpStyle.toLowerCase()&&(k=!0);var x,y=re.autocompleteRequestUrl,P=re.searchType,E=!1;"true"===re.restrictCitySearchToCustomList.toLowerCase()&&(E=!0),E&&(m.hide(),b=h=""),null!==n&&void 0!==n.areas&&(s=!1);var L,T,_={},S={},I=-1,w=!0;m.html(h),null!=e&&void 0!==e.allAreas&&(L=e.allAreas.values),null!=e&&void 0!==e.customAreas&&(T=e.customAreas.values);var N=function(){x.is(":visible")?m.html(b):m.html(h)},M=function(e){if(e)for(var a=0;a<e.length;a++){var l=e[a];W(l),K(l)}},O=function(e){if(e)for(var a=0;a<e.length;a++){var l=e[a];X(l)}},D=function(e){if(s)return!0;var a=ee(e),l=S[a];return null!=l},U=function(e,a,l){for(var t=0,r=0;r<e.length;r++){var n=e[r];if(""!==n.label||""!==n.fieldName||""===n.groupLabel){if(-1==A.indexOf(n.fieldName)){null!=C&&t%C==0&&a.append("<div class='areaPickerExpandAllRow' style='clear:both'></div>"),t++;var s=l(n),i="areaPickerExpandAllElement";D(n)||(i="areaPickerExpandAllElementDisabled");var o=ne("<div/>",{class:i}),u=ne("<div/>",{id:s,class:"areaUnselected"});if(u.append(n.label),o.append(u),a.append(o),null!=n.subAreas&&null!=n.subAreas.values&&0<n.subAreas.values.length){var d=l(n)+"_expand_all_sub_areas",c=ne("<span/>");c.html(re.expandSubAreasButton);var p=ne("<div/>",{id:d,class:"areaPickerExpandAllSubAreaContainer"}),v=ne("<div/>",{style:"float:left"});v.append(c),u.css("float","left"),u.addClass("areaPickerElementHasSubAreas"),u.parent().append(v),p.append(ne("<div/>",{style:"clear:both"})),a.append(p);for(var f=n.subAreas.values,m=0;m<f.length;m++){var h=f[m];h.parentLabel=n.label;var b=l(h);b=b.replace(" ","_"),p.append("<div id='"+b+"' class='areaPickerExpandAllSubAreaElement'>"+h.label+"</div>"),z(h,b)}p.append("<div style='clear:both;'></div>"),p.hide(),H(c,d)}z(n,s)}}else a.append("<div style='clear:both'></div>"),a.append("<div class='areaPickerExpandAllGroup'>"+n.groupLabel+"</div>"),t=0}},B=function(e){return e.fieldName+"_expand_all_areas_"+e.uniqueId},R=function(e){return e.fieldName+"_expand_custom_areas_"+e.uniqueId},q=function(e){var a=e.fieldName+"_autocomplete_"+e.uniqueId;return a.replace(" ","_"),a}
7,j=function(a){var e={fieldName:"cityId",maxResults:0},l=y;w||(e.onlyCustomAreasIfAvailable=!1),ne("body *").css("cursor","progress"),ne.ajax({type:"GET",url:l,data:e,traditional:!0,dataType:"jsonp"}).done(function(e){ne("body *").css("cursor",""),ne("#areaPickerCustomListToggle").css("cursor","pointer"),ne("#areaPickerClearAll").css("cursor","pointer"),ne("#ihf-main-search-form-submit").css("cursor","pointer"),ne(".ihf-advanced-search-launch").css("cursor","pointer"),L=e,ne("#areaPickerExpandAllResults").empty(),U(L,x,B),F(!1),le(!0),a&&c.toggle(),w?(w=!1,m.html(h)):(w=!0,m.html(b)),V()})},V=function(){E?m.hide():(m.show(),m.unbind("click"),m.click(function(e){j(!1)}))},G=function(e,a){if(null!==e&&e.length>=p){var l={term:e,onlyCustomAreasIfAvailable:E},t=ne("[name='propertyType']").val();(void 0!==t&&-1===t.search(/SFR|CND/)||"advanced"===P)&&(l.fieldName=["cityId","zip"]);var r=y;ne.ajax({type:"GET",url:r,data:l,traditional:!0,dataType:"jsonp"}).done(function(e){a(e)})}},$=function(e,a){var l=ne("#"+a);l.click(function(){J(e)}),l.mouseover(function(){l.addClass("autocompleteMouseOver")}),l.mouseout(function(){l.removeClass("autocompleteMouseOver")})},z=function(e,a){if(D(e)){var l=ne("#"+a);l.click(function(){K(e),f.html(u)}),l.mouseenter(function(){l.addClass("autocompleteMouseOver")}),l.mouseout(function(){l.removeClass("autocompleteMouseOver")})}},H=function(e,a){e.click(function(){!function(e,a){var l=ne("#"+e);l.toggle(),l.is(":visible")?(ne(a).removeClass(),ne(a).html(re.closeSubAreasButton)):(ne(a).removeClass(),ne(a).html(re.expandSubAreasButton))}(a,this)})},F=function(e){Q(),le(e)},Q=function(){f.parent().hide(),I=-1},Z=function(){for(var e in _){var a=_[e];J(a)}},J=function(n){d.find("input:hidden").each(function(e){if($hidden=ne(this),$hidden.val()==n.value){$hidden.parent().remove();var a=B(n),l=ne("#"+a);l.removeClass("areaSelected"),l.addClass("areaUnselected"),z(n,a);var t=R(n),r=ne("#"+t);r.removeClass("areaSelected"),r.addClass("areaUnselected"),z(n,t),F(!0),Y(n),le(!0)}})},K=function(e){var a=ne("<div/>");a.addClass("ihf-one-selectedArea");var l=e.fieldName;k&&(l+="[]");var t=ne("<input type='hidden' data-ihf-location-field='true' value='"+e.value+"' name='"+l+"'/>"),r=e.label;null!=e.parentLabel&&(r+=" ("+e.parentLabel+")"),null!=e.fieldLabel&&(r+=" ("+e.fieldLabel+")");var n=ne("<button class='btn' type='button'> × "+r+"</button>");n.click(function(){J(e)}),a.append(t),a.append(n),d.append(a),F(!0),W(e);var s=B(e),i=ne("#"+s);i.addClass("areaSelected"),i.removeClass("areaUnselected"),i.unbind("click"),$(e,s);var o=R(e),u=ne("#"+o);u.addClass("areaSelected"),u.removeClass("areaUnselected"),u.unbind("click"),$(e,o),le(!0)},W=function(e){var a=ee(e);_[a]=e,l.show()},X=function(e){var a=ee(e);S[a]=e},Y=function(e){var a=ee(e);delete _[a],ne.isEmptyObject(_)&&l.hide()},ee=function(e){return e.fieldName+e.value},ae=function(e){var a=ee(e);return void 0!==_[a]},le=function(e){t.val(""),t.blur(),e&&t.focus()},te=function(e,d){if(13!=d.which){var a=e.value;a.length>=p?G(a,function(e){if(38==d.which?0<I&&I--:40==d.which?I<e.length&&I++:(f.text(""),f.parent().show(),c.hide(),function(e){for(var a=0;a<e.length;a++){var l=e[a];matchDivId=q(l);var t=ne("<div/>",{id:matchDivId}),r="areaPickerElement";if(D(l)||(r="areaPickerElementDisabled"),t.addClass(r),t.addClass("areaUnselected"),t.append(l.label),D(l)||t.append(" (None)"),null!=l.parentLabel&&t.append(" ("+l.parentLabel+")"),null!=l.fieldLabel&&t.append(" ("+l.fieldLabel+")"),f.append(t),null!=l.subAreas&&null!=l.subAreas.values&&0<l.subAreas.values.length){var n=l.fieldName+"_auto_complete_sub_areas_"+l.uniqueId,s=ne("<span/>");s.html(re.expandSubAreasButton);var i=ne("<div/>",{id:n}),o=ne("<div/>",{style:"float:left"});o.append(s),t.css("float","left"),f.append(o).append(ne("<div/>",{style:"clear:both"})),t.addClass("areaPickerElementHasSubAreas"),f.append(i);for(var u=l.subAreas.values,d=0;d<u.length;d++){var c=u[d],p=c.fieldName+"_expand_all_"+c.uniqueId;c.parentLabel=l.label,p=p.replace(" ","_");var v=ne("<div/>",{id:p,class:"areaPickerAutoCompleteSubAreaElement"});v.text(c.label),i.append(v),ae(c)?(v.addClass("areaSelected"),v.removeClass("areaUnselected")):z(c,p)}i.hide(),H(s,n)}ae(l)?(t.removeClass("areaUnselected"),t.addClass("areaSelected")):z(l,matchDivId)}}(e)),0<e.length&&I>e.length?I=0:0<e.length&&-1==I?I=0:0==e.length&&(I=-1),-1<I){var a=e[I],l=q(a),t="autocompleteArrowOver";D(a)||(t="autocompleteArrowOverDisabled"),ne("#"+l).addClass(t);var r=I-1;if(-1<r){var n=e[r],s=q(n);t="autocompleteArrowOver";D(n)||(t="autocompleteArrowOverDisabled"),ne("#"+s).removeClass(t)}var i=I+1;if(i<e.length){var o=e[i],u=q(o);t="autocompleteArrowOver";
7D(o)||(t="autocompleteArrowOverDisabled"),ne("#"+u).removeClass(t)}!function(e,a){var l=e*a,t=f.css("height");if(-1<t.indexOf("px")){var r=t.length-2;t=t.slice(0,r)}var n=f.scrollTop(),s=n+new Number(t);(l<n||s<l)&&f.scrollTop(l)}(I,15)}}):Q()}};t.keyup(function(e){te(this,e)}),t.keydown(function(e){if(13==e.which){e.preventDefault();var a=this.value;G(a,function(e){var a=e[I];D(a)&&void 0!==a&&(ae(a)||K(a),F(!0))})}}),t.click(function(e){t.val(""),t.removeClass("areaPickerDefaultText"),t.addClass("areaPickerActive");var a=ne("<div/>",{style:"padding: 2px"}).html(u);f.html(a);t.val();te(this,e)}),ne(a).each(function(){ne(this).click(function(){void 0===L?j(!0):(F(!1),le(!0),c.toggle())})}),c.mouseleave(function(){}),ne(document).click(function(e){if("image "==e.target.type&&e.target.form&&"INPUT"==e.target.nodeName){var a=ne(t).val();G(a,function(e){e&&1==e.length&&K(e[0])})}ne(e.target).hasClass("expand-sub-areas")||ne(e.target).hasClass("close-sub-areas")||-1==ne(e.target).parents().index(v)&&(c.hide(),F(!1))}),function(){if(t.attr("autocomplete","off"),le(!1),t.val(o),t.addClass("areaPickerDefaultText"),v.click(function(e){le(!0)}),!s){var e=n.areas.values;O(e)}if(g.click(function(e){Z()}),x=ne("<div/>",{id:"areaPickerExpandAllResults"}),i.append(x),null!=L&&U(L,x,B),void 0!==T){var a=ne("<div/>",{id:"areaPickerExpandCustomResults"});i.append(a),U(T,a,R),x.hide(),N(),m.click(function(e){x.toggle(),a.toggle(),N()})}else m.hide();if(void 0!==r&&null!=r&&void 0!==r.areas&&null!=r.areas){var l=r.areas.values;M(l)}}()})}}(jQuery); 8if(!jQuery)throw new Error("Bootstrap requires jQuery");!function(o){"use strict";o.fn.emulateTransitionEnd=function(t){var e=!1,i=this;o(this).one(o.support.transition.end,function(){e=!0});return setTimeout(function(){e||o(i).trigger(o.support.transition.end)},t),this},o(function(){o.support.transition=function(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]}}()})}(window.jQuery),function(s){"use strict";var e='[data-dismiss="alert"]',o=function(t){s(t).on("click",e,this.close)};o.prototype.close=function(t){var e=s(this),i=e.attr("data-target");i||(i=(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,""));var o=s(i);function n(){o.trigger("closed.bs.alert").remove()}t&&t.preventDefault(),o.length||(o=e.hasClass("alert")?e:e.parent()),o.trigger(t=s.Event("close.bs.alert")),t.isDefaultPrevented()||(o.removeClass("in"),s.support.transition&&o.hasClass("fade")?o.one(s.support.transition.end,n).emulateTransitionEnd(150):n())};var t=s.fn.alert;s.fn.alert=function(i){return this.each(function(){var t=s(this),e=t.data("bs.alert");e||t.data("bs.alert",e=new o(this)),"string"==typeof i&&e[i].call(t)})},s.fn.alert.Constructor=o,s.fn.alert.noConflict=function(){return s.fn.alert=t,this},s(document).on("click.bs.alert.data-api",e,o.prototype.close)}(window.jQuery),function(n){"use strict";var s=function(t,e){this.$element=n(t),this.options=n.extend({},s.DEFAULTS,e)};s.DEFAULTS={loadingText:"loading..."},s.prototype.setState=function(t){var e="disabled",i=this.$element,o=i.is("input")?"val":"html",n=i.data();t+="Text",n.resetText||i.data("resetText",i[o]()),i[o](n[t]||this.options[t]),setTimeout(function(){"loadingText"==t?i.addClass(e).attr(e,e):i.removeClass(e).removeAttr(e)},0)},s.prototype.toggle=function(){var t=this.$element.closest('[data-toggle="buttons"]');t.length&&("radio"===this.$element.find("input").prop("checked",!this.$element.hasClass("active")).trigger("change").prop("type")&&t.find(".active").removeClass("active"));this.$element.toggleClass("active")};var t=n.fn.button;n.fn.button=function(o){return this.each(function(){var t=n(this),e=t.data("bs.button"),i="object"==typeof o&&o;e||t.data("bs.button",e=new s(this,i)),"toggle"==o?e.toggle():o&&e.setState(o)})},n.fn.button.Constructor=s,n.fn.button.noConflict=function(){return n.fn.button=t,this},n(document).on("click.bs.button.data-api","[data-toggle^=button]",function(t){var e=n(t.target);e.hasClass("btn")||(e=e.closest(".btn")),e.button("toggle"),t.preventDefault()})}(window.jQuery),function(h){"use strict";var s=function(t,e){this.$element=h(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=e,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",h.proxy(this.pause,this)).on("mouseleave",h.proxy(this.cycle,this))};s.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},s.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(h.proxy(this.next,this),this.options.interval)),this},s.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".
8item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},s.prototype.to=function(t){var e=this,i=this.getActiveIndex();if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid",function(){e.to(t)}):i==t?this.pause().cycle():this.slide(i<t?"next":"prev",h(this.$items[t]))},s.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&h.support.transition.end&&(this.$element.trigger(h.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},s.prototype.next=function(){if(!this.sliding)return this.slide("next")},s.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},s.prototype.slide=function(t,e){var i=this.$element.find(".item.active"),o=e||i[t](),n=this.interval,s="next"==t?"left":"right",a="next"==t?"first":"last",r=this;if(!o.length){if(!this.options.wrap)return;o=this.$element.find(".item")[a]()}this.sliding=!0,n&&this.pause();var l=h.Event("slide.bs.carousel",{relatedTarget:o[0],direction:s});if(!o.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var t=h(r.$indicators.children()[r.getActiveIndex()]);t&&t.addClass("active")})),h.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(l),l.isDefaultPrevented())return;o.addClass(t),o[0].offsetWidth,i.addClass(s),o.addClass(s),i.one(h.support.transition.end,function(){o.removeClass([t,s].join(" ")).addClass("active"),i.removeClass(["active",s].join(" ")),r.sliding=!1,setTimeout(function(){r.$element.trigger("slid")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(l),l.isDefaultPrevented())return;i.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return n&&this.cycle(),this}};var t=h.fn.carousel;h.fn.carousel=function(n){return this.each(function(){var t=h(this),e=t.data("bs.carousel"),i=h.extend({},s.DEFAULTS,t.data(),"object"==typeof n&&n),o="string"==typeof n?n:i.slide;e||t.data("bs.carousel",e=new s(this,i)),"number"==typeof n?e.to(n):o?e[o]():i.interval&&e.pause().cycle()})},h.fn.carousel.Constructor=s,h.fn.carousel.noConflict=function(){return h.fn.carousel=t,this},h(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(t){var e,i=h(this),o=h(i.attr("data-target")||(e=i.attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")),n=h.extend({},o.data(),i.data()),s=i.attr("data-slide-to");s&&(n.interval=!1),o.carousel(n),(s=i.attr("data-slide-to"))&&o.data("bs.carousel").to(s),t.preventDefault()}),h(window).on("load",function(){h('[data-ride="carousel"]').each(function(){var t=h(this);t.carousel(t.data())})})}(window.jQuery),function(h){"use strict";var n=function(t,e){this.$element=h(t),this.options=h.extend({},n.DEFAULTS,e),this.transitioning=null,this.options.parent&&(this.$parent=h(this.options.parent)),this.options.toggle&&this.toggle()};n.DEFAULTS={toggle:!0},n.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},n.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var t=h.Event("show.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var e=this.$parent&&this.$parent.find("> .panel > .in");if(e&&e.length){var i=e.data("bs.collapse");if(i&&i.transitioning)return;e.collapse("hide"),i||e.data("bs.collapse",null)}var o=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[o](0),this.transitioning=1;var n=function(){this.$element.removeClass("collapsing").addClass("in")[o]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!h.support.transition)return n.call(this);var s=h.camelCase(["scroll",o].join("-"));this.$element.one(h.support.transition.end,h.proxy(n,this)).emulateTransitionEnd(350)[o](this.$element[0][s])}}},n.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var t=h.Event("hide.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var e=this.dimension();this.$element[e](this.$element[e]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var i=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};if(!h.support.transition)return i.call(this);this.$element[e](0).one(h.support.transition.end,h.proxy(i,this)).emulateTransitionEnd(350)}}},n.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var t=h.fn.collapse;h.fn.collapse=function(o){return this.each(function(){var t=h(this),e=t.data("bs.collapse"),i=h.extend({},n.DEFAULTS,t.data(),"object"==typeof o&&o);e||t.data("bs.collapse",e=new n(this,i)),"string"==typeof o&&e[o]()})},h.fn.collapse.Constructor=n,h.fn.collapse.noConflict=function(){return h.fn.collapse=t,this},h(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(t){var e,i=h(this),o=i.attr("data-target")||t.preventDefault()||(e=i.attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,""),n=h(o),s=n.data("bs.collapse"),a=s?"toggle":i.data(),r=i.attr("data-parent"),l=r&&h(r);s&&s.transitioning||(l&&l.find('[data-toggle=collapse][data-parent="'+r+'"]').not(i).addClass("collapsed"),i[n.hasClass("in")?"addClass":"removeClass"]("collapsed")),n.collapse(a)})}(window.jQuery),function(a){"use strict";var r="[data-toggle=dropdown]",o=function(t){a(t).on("click.bs.dropdown",this.toggle)};function n(){a(".dropdown-backdrop").remove(),a(r).each(function(t){var e=l(a(this));e.hasClass("open")&&(e.trigger(t=a.Event("hide.bs.dropdown")),t.isDefaultPrevented()||e.removeClass("open").trigger("hidden.bs.dropdown"))})}function l(t){var e=t.attr("data-target");e||(e=(e=t.attr("href"))&&/#/.test(e)&&e.replace(/.*(?=#[^\s]*$)/,""));var i=e&&a(e);return i&&i.length?i:t.parent()}o.prototype.toggle=function(t){var e=a(this);if(!e.is(".disabled, :disabled")){var i=l(e),o=i.hasClass("open");if(n(),!o){if("ontouchstart"in document.documentElement&&!i.closest(".
8navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",n),i.trigger(t=a.Event("show.bs.dropdown")),t.isDefaultPrevented())return;i.toggleClass("open").trigger("shown.bs.dropdown"),e.focus()}return!1}},o.prototype.keydown=function(t){if(/(38|40|27)/.test(t.keyCode)){var e=a(this);if(t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled")){var i=l(e),o=i.hasClass("open");if(!o||o&&27==t.keyCode)return 27==t.which&&i.find(r).focus(),e.click();var n=a("[role=menu] li:not(.divider):visible a",i);if(n.length){var s=n.index(n.filter(":focus"));38==t.keyCode&&0<s&&s--,40==t.keyCode&&s<n.length-1&&s++,~s||(s=0),n.eq(s).focus()}}}};var t=a.fn.dropdown;a.fn.dropdown=function(i){return this.each(function(){var t=a(this),e=t.data("dropdown");e||t.data("dropdown",e=new o(this)),"string"==typeof i&&e[i].call(t)})},a.fn.dropdown.Constructor=o,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=t,this},a(document).on("click.bs.dropdown.data-api",n).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",r,o.prototype.toggle).on("keydown.bs.dropdown.data-api",r+", [role=menu]",o.prototype.keydown)}(window.jQuery),function(s){"use strict";var a=function(t,e){this.options=e,this.$element=s(t),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.load(this.options.remote)};a.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},a.prototype.toggle=function(t){return this[this.isShown?"hide":"show"](t)},a.prototype.show=function(i){var o=this,t=s.Event("show.bs.modal",{relatedTarget:i});this.$element.trigger(t),this.isShown||t.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.$element.on("click.dismiss.modal",'[data-dismiss="modal"]',s.proxy(this.hide,this)),this.backdrop(function(){var t=s.support.transition&&o.$element.hasClass("fade");o.$element.parent().length||o.$element.appendTo(document.body),o.$element.show(),t&&o.$element[0].offsetWidth,o.$element.addClass("in").attr("aria-hidden",!1),o.enforceFocus();var e=s.Event("shown.bs.modal",{relatedTarget:i});t?o.$element.find(".modal-dialog").one(s.support.transition.end,function(){o.$element.focus().trigger(e)}).emulateTransitionEnd(300):o.$element.focus().trigger(e)}))},a.prototype.hide=function(t){t&&t.preventDefault(),t=s.Event("hide.bs.modal"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),s(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.modal"),s.support.transition&&this.$element.hasClass("fade")?this.$element.one(s.support.transition.end,s.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},a.prototype.enforceFocus=function(){s(document).off("focusin.bs.modal").on("focusin.bs.modal",s.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.focus()},this))},a.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",s.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},a.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.removeBackdrop(),t.$element.trigger("hidden.bs.modal")})},a.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},a.prototype.backdrop=function(t){var e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=s.support.transition&&e;if(this.$backdrop=s('<div class="modal-backdrop '+e+'" />').appendTo(document.body),this.$element.on("click.dismiss.modal",s.proxy(function(t){t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;i?this.$backdrop.one(s.support.transition.end,t).emulateTransitionEnd(150):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),s.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(s.support.transition.end,t).emulateTransitionEnd(150):t()):t&&t()};var t=s.fn.modal;s.fn.modal=function(o,n){return this.each(function(){var t=s(this),e=t.data("bs.modal"),i=s.extend({},a.DEFAULTS,t.data(),"object"==typeof o&&o);e||t.data("bs.modal",e=new a(this,i)),"string"==typeof o?e[o](n):i.show&&e.show(n)})},s.fn.modal.Constructor=a,s.fn.modal.noConflict=function(){return s.fn.modal=t,this},s(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var e=s(this),i=e.attr("href"),o=s(e.attr("data-target")||i&&i.replace(/.*(?=#[^\s]+$)/,"")),n=o.data("modal")?"toggle":s.extend({remote:!/#/.test(i)&&i},o.data(),e.data());t.preventDefault(),o.modal(n,this).one("hide",function(){e.is(":visible")&&e.focus()})}),s(document).on("show.bs.modal",".modal",function(){s(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){s(document.body).removeClass("modal-open")})}(window.jQuery),function(m){"use strict";var n=function(t,e){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",t,e)};n.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1}
vendor: 4,525 bytes, line 8
8,n.prototype.init=function(t,e,i){this.enabled=!0,this.type=t,this.$element=m(e),this.options=this.getOptions(i);for(var o=this.options.trigger.split(" "),n=o.length;n--;){var s=o[n];if("click"==s)this.$element.on("click."+this.type,this.options.selector,m.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focus",r="hover"==s?"mouseleave":"blur";this.$element.on(a+"."+this.type,this.options.selector,m.proxy(this.enter,this)),this.$element.on(r+"."+this.type,this.options.selector,m.proxy(this.leave,this))}}this.options.selector?this._options=m.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.getOptions=function(t){return(t=m.extend({},this.getDefaults(),this.$element.data(),t)).delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t},n.prototype.getDelegateOptions=function(){var i={},o=this.getDefaults();return this._options&&m.each(this._options,function(t,e){o[t]!=e&&(i[t]=e)}),i},n.prototype.enter=function(t){var e=t instanceof this.constructor?t:m(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);if(clearTimeout(e.timeout),e.hoverState="in",!e.options.delay||!e.options.delay.show)return e.show();e.timeout=setTimeout(function(){"in"==e.hoverState&&e.show()},e.options.delay.show)},n.prototype.leave=function(t){var e=t instanceof this.constructor?t:m(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);if(clearTimeout(e.timeout),e.hoverState="out",!e.options.delay||!e.options.delay.hide)return e.hide();e.timeout=setTimeout(function(){"out"==e.hoverState&&e.hide()},e.options.delay.hide)},n.prototype.show=function(){var t=m.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(t),t.isDefaultPrevented())return;var e=this.tip();this.setContent(),this.options.animation&&e.addClass("fade");var i="function"==typeof this.options.placement?this.options.placement.call(this,e[0],this.$element[0]):this.options.placement,o=/\s?auto?\s?/i,n=o.test(i);n&&(i=i.replace(o,"")||"top"),e.detach().css({top:0,left:0,display:"block"}).addClass(i),this.options.container?e.appendTo(this.options.container):e.insertAfter(this.$element);var s=this.getPosition(),a=e[0].offsetWidth,r=e[0].offsetHeight;if(n){var l=this.$element.parent(),h=i,p=document.documentElement.scrollTop||document.body.scrollTop,d="body"==this.options.container?window.innerWidth:l.outerWidth(),c="body"==this.options.container?window.innerHeight:l.outerHeight(),f="body"==this.options.container?0:l.offset().left;i="bottom"==i&&s.top+s.height+r-p>c?"top":"top"==i&&s.top-p-r<0?"bottom":"right"==i&&s.right+a>d?"left":"left"==i&&s.left-a<f?"right":i,e.removeClass(h).addClass(i)}var u=this.getCalculatedOffset(i,s,a,r);this.applyPlacement(u,i),this.$element.trigger("shown.bs."+this.type)}},n.prototype.applyPlacement=function(t,e){var i,o=this.tip(),n=o[0].offsetWidth,s=o[0].offsetHeight,a=parseInt(o.css("margin-top"),10),r=parseInt(o.css("margin-left"),10);isNaN(a)&&(a=0),isNaN(r)&&(r=0),t.top=t.top+a,t.left=t.left+r,o.offset(t).addClass("in");var l=o[0].offsetWidth,h=o[0].offsetHeight;if("top"==e&&h!=s&&(i=!0,t.top=t.top+s-h),/bottom|top/.test(e)){var p=0;t.left<0&&(p=-2*t.left,t.left=0,o.offset(t),l=o[0].offsetWidth,h=o[0].offsetHeight),this.replaceArrow(p-n+l,l,"left")}else this.replaceArrow(h-s,h,"top");i&&o.offset(t)},n.prototype.replaceArrow=function(t,e,i){this.arrow().css(i,t?50*(1-t/e)+"%":"")},n.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},n.prototype.hide=function(){var t=this,e=this.tip(),i=m.Event("hide.bs."+this.type);function o(){"in"!=t.hoverState&&e.detach()}if(this.$element.trigger(i),!i.isDefaultPrevented())return e.removeClass("in"),m.support.transition&&this.$tip.hasClass("fade")?e.one(m.support.transition.end,o).emulateTransitionEnd(150):o(),this.$element.trigger("hidden.bs."+this.type),this},n.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},n.prototype.hasContent=function(){return this.getTitle()},n.prototype.getPosition=function(){var t=this.$element[0];return m.extend({},"function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())}
vendor: 5,614 bytes, line 8
8,n.prototype.getCalculatedOffset=function(t,e,i,o){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"==t?{top:e.top-o,left:e.left+e.width/2-i/2}:"left"==t?{top:e.top+e.height/2-o/2,left:e.left-i}:{top:e.top+e.height/2-o/2,left:e.left+e.width}},n.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},n.prototype.tip=function(){return this.$tip=this.$tip||m(this.options.template)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},n.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},n.prototype.enable=function(){this.enabled=!0},n.prototype.disable=function(){this.enabled=!1},n.prototype.toggleEnabled=function(){this.enabled=!this.enabled},n.prototype.toggle=function(t){var e=t?m(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;e.tip().hasClass("in")?e.leave(e):e.enter(e)},n.prototype.destroy=function(){this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var t=m.fn.tooltip;m.fn.tooltip=function(o){return this.each(function(){var t=m(this),e=t.data("bs.tooltip"),i="object"==typeof o&&o;e||t.data("bs.tooltip",e=new n(this,i)),"string"==typeof o&&e[o]()})},m.fn.tooltip.Constructor=n,m.fn.tooltip.noConflict=function(){return m.fn.tooltip=t,this}}(window.jQuery),function(n){"use strict";var s=function(t,e){this.init("popover",t,e)};if(!n.fn.tooltip)throw new Error("Popover requires tooltip.js");s.DEFAULTS=n.extend({},n.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),((s.prototype=n.extend({},n.fn.tooltip.Constructor.prototype)).constructor=s).prototype.getDefaults=function(){return s.DEFAULTS},s.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content")[this.options.html?"html":"text"](i),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},s.prototype.hasContent=function(){return this.getTitle()||this.getContent()},s.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},s.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},s.prototype.tip=function(){return this.$tip||(this.$tip=n(this.options.template)),this.$tip};var t=n.fn.popover;n.fn.popover=function(o){return this.each(function(){var t=n(this),e=t.data("bs.popover"),i="object"==typeof o&&o;e||t.data("bs.popover",e=new s(this,i)),"string"==typeof o&&e[o]()})},n.fn.popover.Constructor=s,n.fn.popover.noConflict=function(){return n.fn.popover=t,this}}(window.jQuery),function(s){"use strict";function n(t,e){var i,o=s.proxy(this.process,this);this.$element=s(t).is("body")?s(window):s(t),this.$body=s("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",o),this.options=s.extend({},n.DEFAULTS,e),this.selector=(this.options.target||(i=s(t).attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=s([]),this.targets=s([]),this.activeTarget=null,this.refresh(),this.process()}n.DEFAULTS={offset:10},n.prototype.refresh=function(){var o=this.$element[0]==window?"offset":"position";this.offsets=s([]),this.targets=s([]);var n=this;this.$body.find(this.selector).map(function(){var t=s(this),e=t.data("target")||t.attr("href"),i=/^#\w/.test(e)&&s(e);return i&&i.length&&[[i[o]().top+(!s.isWindow(n.$scrollElement.get(0))&&n.$scrollElement.scrollTop()),e]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){n.offsets.push(this[0]),n.targets.push(this[1])})},n.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=(this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight)-this.$scrollElement.height(),o=this.offsets,n=this.targets,s=this.activeTarget;if(i<=e)return s!=(t=n.last()[0])&&this.activate(t);for(t=o.length;t--;)s!=n[t]&&e>=o[t]&&(!o[t+1]||e<=o[t+1])&&this.activate(n[t])},n.prototype.activate=function(t){this.activeTarget=t,s(this.selector).parents(".active").removeClass("active");var e=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=s(e).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate")};var t=s.fn.scrollspy;s.fn.scrollspy=function(o){return this.each(function(){var t=s(this),e=t.data("bs.scrollspy"),i="object"==typeof o&&o;e||t.data("bs.scrollspy",e=new n(this,i)),"string"==typeof o&&e[o]()})},s.fn.scrollspy.Constructor=n,s.fn.scrollspy.noConflict=function(){return s.fn.scrollspy=t,this},s(window).on("load",function(){s('[data-spy="scroll"]').each(function(){var t=s(this);t.scrollspy(t.data())})})}(window.jQuery),function(a){"use strict";var o=function(t){this.element=a(t)};o.prototype.show=function(){var t=this.element,e=t.closest("ul:not(.dropdown-menu)"),i=t.attr("data-target");if(i||(i=(i=t.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var o=e.find(".active:last a")[0],n=a.Event("show.bs.tab",{relatedTarget:o});if(t.trigger(n),!n.isDefaultPrevented()){var s=a(i);this.activate(t.parent("li"),e),this.activate(s,s.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:o})})}}}
8,o.prototype.activate=function(t,e,i){var o=e.find("> .active"),n=i&&a.support.transition&&o.hasClass("fade");function s(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),n?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),i&&i()}n?o.one(a.support.transition.end,s).emulateTransitionEnd(150):s(),o.removeClass("in")};var t=a.fn.tab;a.fn.tab=function(i){return this.each(function(){var t=a(this),e=t.data("bs.tab");e||t.data("bs.tab",e=new o(this)),"string"==typeof i&&e[i]()})},a.fn.tab.Constructor=o,a.fn.tab.noConflict=function(){return a.fn.tab=t,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),a(this).tab("show")})}(window.jQuery),function(r){"use strict";var l=function(t,e){this.options=r.extend({},l.DEFAULTS,e),this.$window=r(window).on("scroll.bs.affix.data-api",r.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",r.proxy(this.checkPositionWithEventLoop,this)),this.$element=r(t),this.affixed=this.unpin=null,this.checkPosition()};l.RESET="affix affix-top affix-bottom",l.DEFAULTS={offset:0},l.prototype.checkPositionWithEventLoop=function(){setTimeout(r.proxy(this.checkPosition,this),1)},l.prototype.checkPosition=function(){if(this.$element.is(":visible")){var t=r(document).height(),e=this.$window.scrollTop(),i=this.$element.offset(),o=this.options.offset,n=o.top,s=o.bottom;"object"!=typeof o&&(s=n=o),"function"==typeof n&&(n=o.top()),"function"==typeof s&&(s=o.bottom());var a=!(null!=this.unpin&&e+this.unpin<=i.top)&&(null!=s&&i.top+this.$element.height()>=t-s?"bottom":null!=n&&e<=n&&"top");this.affixed!==a&&(this.unpin&&this.$element.css("top",""),this.affixed=a,this.unpin="bottom"==a?i.top-e:null,this.$element.removeClass(l.RESET).addClass("affix"+(a?"-"+a:"")),"bottom"==a&&this.$element.offset({top:document.body.offsetHeight-s-this.$element.height()}))}};var t=r.fn.affix;r.fn.affix=function(o){return this.each(function(){var t=r(this),e=t.data("bs.affix"),i="object"==typeof o&&o;e||t.data("bs.affix",e=new l(this,i)),"string"==typeof o&&e[o]()})},r.fn.affix.Constructor=l,r.fn.affix.noConflict=function(){return r.fn.affix=t,this},r(window).on("load",function(){r('[data-spy="affix"]').each(function(){var t=r(this),e=t.data();e.offset=e.offset||{},e.offsetBottom&&(e.offset.bottom=e.offsetBottom),e.offsetTop&&(e.offset.top=e.offsetTop),t.affix(e)})})}(window.jQuery); 9window.ihfJquery=jQuery.noConflict(!0),"undefined"!=typeof ihfDisableJquery&&!1!==ihfDisableJquery||(window.$=ihfJquery,window.jQuery=ihfJquery); 10setInterval(function(){Array.from(document.querySelectorAll(".chosen-drop .chosen-search input")).forEach(function(e){e.setAttribute("aria-hidden","true"),e.setAttribute("disabled",""),e.setAttribute("type","hidden")}),Array.from(document.querySelectorAll(".chosen-choices .search-field input")).forEach(function(e){e.setAttribute("aria-label","Search This Field")}),Array.from(document.querySelectorAll("#ihf-main-container img")).filter(function(e){return!e.alt||!e.alt.trim()}).forEach(function(e){e.alt="IDX Image"}),Array.from(document.querySelectorAll(".ihf-main-container img")).filter(function(e){return!e.alt||!e.alt.trim()}).forEach(function(e){e.alt="IDX Image"});var e=document.getElementById("g-recaptcha-response");null!==e&&e.setAttribute("aria-label","g-recaptcha-response")},200); 11ihfJquery(document).ready(function(){var e={".ihf-chosen-select":{},".ihf-chosen-select-deselect":{allow_single_deselect:!0},".ihf-chosen-select-no-single":{disable_search_threshold:10},".ihf-chosen-select-no-results":{no_results_text:"Oops, nothing found!"},".ihf-chosen-select-width":{width:"100%",disable_search_threshold:10,placeholder_text_multiple:" ",placeholder_text_single:" "}};for(var s in e)ihfJquery(s).chosen(e[s])}); 12!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.L={})}(this,function(t){"use strict";var e=Object.freeze;function h(t){var e,i,n,o;for(i=1,n=arguments.length;i<n;i++)for(e in o=arguments[i])t[e]=o[e];return t}Object.freeze=function(t){return t};var s=Object.create||function(t){return i.prototype=t,new i};function i(){}function u(t,e){var i=Array.prototype.slice;
12if(t.bind)return t.bind.apply(t,i.call(arguments,1));var n=i.call(arguments,2);return function(){return t.apply(e,n.length?n.concat(i.call(arguments)):arguments)}}var n=0;function l(t){return t._leaflet_id=t._leaflet_id||++n,t._leaflet_id}function o(t,e,i){var n,o,s,r;return r=function(){n=!1,o&&(s.apply(i,o),o=!1)},s=function(){n?o=arguments:(t.apply(i,arguments),setTimeout(r,e),n=!0)}}function r(t,e,i){var n=e[1],o=e[0],s=n-o;return t===n&&i?t:((t-o)%s+s)%s+o}function a(){return!1}function c(t,e){var i=Math.pow(10,void 0===e?6:e);return Math.round(t*i)/i}function _(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function d(t){return _(t).split(/\s+/)}function p(t,e){for(var i in t.hasOwnProperty("options")||(t.options=t.options?s(t.options):{}),e)t.options[i]=e[i];return t.options}function m(t,e,i){var n=[];for(var o in t)n.push(encodeURIComponent(i?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")}var f=/\{ *([\w_-]+) *\}/g;function g(t,n){return t.replace(f,function(t,e){var i=n[e];if(void 0===i)throw new Error("No value provided for variable "+t);return"function"==typeof i&&(i=i(n)),i})}var v=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function y(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}var x="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function w(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var P=0;function b(t){var e=+new Date,i=Math.max(0,16-(e-P));return P=e+i,window.setTimeout(t,i)}var T=window.requestAnimationFrame||w("RequestAnimationFrame")||b,z=window.cancelAnimationFrame||w("CancelAnimationFrame")||w("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function M(t,e,i){if(!i||T!==b)return T.call(window,u(t,e));t.call(e)}function C(t){t&&z.call(window,t)}var E=(Object.freeze||Object)({freeze:e,extend:h,create:s,bind:u,lastId:n,stamp:l,throttle:o,wrapNum:r,falseFn:a,formatNum:c,trim:_,splitWords:d,setOptions:p,getParamString:m,template:g,isArray:v,indexOf:y,emptyImageUrl:x,requestFn:T,cancelFn:z,requestAnimFrame:M,cancelAnimFrame:C});function S(){}S.extend=function(t){function e(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()}var i=e.__super__=this.prototype,n=s(i);for(var o in(n.constructor=e).prototype=n,this)this.hasOwnProperty(o)&&"prototype"!==o&&"__super__"!==o&&(e[o]=this[o]);return t.statics&&(h(e,t.statics),delete t.statics),t.includes&&(function(t){if("undefined"!=typeof L&&L&&L.Mixin){t=v(t)?t:[t];for(var e=0;e<t.length;
vendor: 5,034 bytes, line 12
12e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}(t.includes),h.apply(null,[n].concat(t.includes)),delete t.includes),n.options&&(t.options=h(s(n.options),t.options)),h(n,t),n._initHooks=[],n.callInitHooks=function(){if(!this._initHooksCalled){i.callInitHooks&&i.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=n._initHooks.length;t<e;t++)n._initHooks[t].call(this)}},e},S.include=function(t){return h(this.prototype,t),this},S.mergeOptions=function(t){return h(this.prototype.options,t),this},S.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};var Z={on:function(t,e,i){if("object"==typeof t)for(var n in t)this._on(n,t[n],e);else for(var o=0,s=(t=d(t)).length;o<s;o++)this._on(t[o],e,i);return this},off:function(t,e,i){if(t)if("object"==typeof t)for(var n in t)this._off(n,t[n],e);else for(var o=0,s=(t=d(t)).length;o<s;o++)this._off(t[o],e,i);else delete this._events;return this},_on:function(t,e,i){this._events=this._events||{};var n=this._events[t];n||(n=[],this._events[t]=n),i===this&&(i=void 0);for(var o={fn:e,ctx:i},s=n,r=0,a=s.length;r<a;r++)if(s[r].fn===e&&s[r].ctx===i)return;s.push(o)},_off:function(t,e,i){var n,o,s;if(this._events&&(n=this._events[t]))if(e){if(i===this&&(i=void 0),n)for(o=0,s=n.length;o<s;o++){var r=n[o];if(r.ctx===i&&r.fn===e)return r.fn=a,this._firingCount&&(this._events[t]=n=n.slice()),void n.splice(o,1)}}else{for(o=0,s=n.length;o<s;o++)n[o].fn=a;delete this._events[t]}},fire:function(t,e,i){if(!this.listens(t,i))return this;var n=h({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var o=this._events[t];if(o){this._firingCount=this._firingCount+1||1;for(var s=0,r=o.length;s<r;s++){var a=o[s];a.fn.call(a.ctx||this,n)}this._firingCount--}}return i&&this._propagateEvent(n),this},listens:function(t,e){var i=this._events&&this._events[t];if(i&&i.length)return!0;if(e)for(var n in this._eventParents)if(this._eventParents[n].listens(t,e))return!0;return!1},once:function(t,e,i){if("object"==typeof t){for(var n in t)this.once(n,t[n],e);return this}var o=u(function(){this.off(t,e,i).off(t,o,i)},this);return this.on(t,e,i).on(t,o,i)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[l(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[l(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,h({layer:t.target,propagatedFrom:t.target},t),!0)}};Z.addEventListener=Z.on,Z.removeEventListener=Z.clearAllEventListeners=Z.off,Z.addOneTimeEventListener=Z.once,Z.fireEvent=Z.fire,Z.hasEventListeners=Z.listens;var k=S.extend(Z);function B(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e}var A=Math.trunc||function(t){return 0<t?Math.floor(t):Math.ceil(t)};function I(t,e,i){return t instanceof B?t:v(t)?new B(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new B(t.x,t.y):new B(t,e,i)}function O(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n<o;n++)this.extend(i[n])}function R(t,e){return!t||t instanceof O?t:new O(t,e)}function N(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n<o;n++)this.extend(i[n])}function D(t,e){return t instanceof N?t:new N(t,e)}function j(t,e,i){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==i&&(this.alt=+i)}function W(t,e,i){return t instanceof j?t:v(t)&&"object"!=typeof t[0]?3===t.length?new j(t[0],t[1],t[2]):2===t.length?new j(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new j(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new j(t,e,i)}B.prototype={clone:function(){return new B(this.x,this.y)},add:function(t){return this.clone()._add(I(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(I(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new B(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new B(this.x/t.x,this.y/t.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},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=A(this.x),this.y=A(this.y),this}
vendor: 4,890 bytes, line 12
12,distanceTo:function(t){var e=(t=I(t)).x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return(t=I(t)).x===this.x&&t.y===this.y},contains:function(t){return t=I(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+c(this.x)+", "+c(this.y)+")"}},O.prototype={extend:function(t){return t=I(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new B((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new B(this.min.x,this.max.y)},getTopRight:function(){return new B(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return(t="number"==typeof t[0]||t instanceof B?I(t):R(t))instanceof O?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=R(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>=e.x&&n.x<=i.x,r=o.y>=e.y&&n.y<=i.y;return s&&r},overlaps:function(t){t=R(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>e.x&&n.x<i.x,r=o.y>e.y&&n.y<i.y;return s&&r},isValid:function(){return!(!this.min||!this.max)}},N.prototype={extend:function(t){var e,i,n=this._southWest,o=this._northEast;if(t instanceof j)i=e=t;else{if(!(t instanceof N))return t?this.extend(W(t)||D(t)):this;if(e=t._southWest,i=t._northEast,!e||!i)return this}return n||o?(n.lat=Math.min(e.lat,n.lat),n.lng=Math.min(e.lng,n.lng),o.lat=Math.max(i.lat,o.lat),o.lng=Math.max(i.lng,o.lng)):(this._southWest=new j(e.lat,e.lng),this._northEast=new j(i.lat,i.lng)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,o=Math.abs(e.lng-i.lng)*t;return new N(new j(e.lat-n,e.lng-o),new j(i.lat+n,i.lng+o))},getCenter:function(){return new j((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 j(this.getNorth(),this.getWest())},getSouthEast:function(){return new j(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(t){t="number"==typeof t[0]||t instanceof j||"lat"in t?W(t):D(t);var e,i,n=this._southWest,o=this._northEast;return t instanceof N?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=o.lat&&e.lng>=n.lng&&i.lng<=o.lng},intersects:function(t){t=D(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=e.lat&&n.lat<=i.lat,r=o.lng>=e.lng&&n.lng<=i.lng;return s&&r},overlaps:function(t){t=D(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>e.lat&&n.lat<i.lat,r=o.lng>e.lng&&n.lng<i.lng;return s&&r},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=D(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}};var H,F={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,i=this.scale(t);return new O(this.transformation.transform(e.min,i),this.transformation.transform(e.max,i))},infinite:(j.prototype={equals:function(t,e){return!!t&&(t=W(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+c(this.lat,t)+", "+c(this.lng,t)+")"},distanceTo:function(t){return U.distance(this,W(t))},wrap:function(){return U.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,i=e/Math.cos(Math.PI/180*this.lat);return D([this.lat-e,this.lng-i],[this.lat+e,this.lng+i])},clone:function(){return new j(this.lat,this.lng,this.alt)}},!1),wrapLatLng:function(t){var e=this.wrapLng?r(t.lng,this.wrapLng,!0):t.lng;return new j(this.wrapLat?r(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),i=this.wrapLatLng(e),n=e.lat-i.lat,o=e.lng-i.lng;if(0==n&&0==o)return t;
vendor: 7,128 bytes, line 12
12var s=t.getSouthWest(),r=t.getNorthEast();return new N(new j(s.lat-n,s.lng-o),new j(r.lat-n,r.lng-o))}},U=h({},F,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,n=t.lat*i,o=e.lat*i,s=Math.sin((e.lat-t.lat)*i/2),r=Math.sin((e.lng-t.lng)*i/2),a=s*s+Math.cos(n)*Math.cos(o)*r*r,h=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*h}}),V=6378137,q={R:V,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),o=Math.sin(n*e);return new B(this.R*t.lng*e,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(t){var e=180/Math.PI;return new j((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(H=V*Math.PI,new O([-H,-H],[H,H]))};function G(t,e,i,n){if(v(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=i,this._d=n}function K(t,e,i,n){return new G(t,e,i,n)}G.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new B((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var Y,X=h({},U,{code:"EPSG:3857",projection:q,transformation:(Y=.5/(Math.PI*q.R),K(Y,.5,-Y,.5))}),J=h({},X,{code:"EPSG:900913"});function $(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Q(t,e){var i,n,o,s,r,a,h="";for(i=0,o=t.length;i<o;i++){for(n=0,s=(r=t[i]).length;n<s;n++)h+=(n?"L":"M")+(a=r[n]).x+" "+a.y;h+=e?Zt?"z":"x":""}return h||"M0 0"}var tt=document.documentElement.style,et="ActiveXObject"in window,it=et&&!document.addEventListener,nt="msLaunchUri"in navigator&&!("documentMode"in document),ot=Bt("webkit"),st=Bt("android"),rt=Bt("android 2")||Bt("android 3"),at=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),ht=st&&Bt("Google")&&at<537&&!("AudioNode"in window),ut=!!window.opera,lt=Bt("chrome"),ct=Bt("gecko")&&!ot&&!ut&&!et,_t=!lt&&Bt("safari"),dt=Bt("phantom"),pt="OTransition"in tt,mt=0===navigator.platform.indexOf("Win"),ft=et&&"transition"in tt,gt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!rt,vt="MozPerspective"in tt,yt=!window.L_DISABLE_3D&&(ft||gt||vt)&&!pt&&!dt,xt="undefined"!=typeof orientation||Bt("mobile"),wt=xt&&ot,Pt=xt&>,Lt=!window.PointerEvent&&window.MSPointerEvent,bt=!(ot||!window.PointerEvent&&!Lt),Tt=!window.L_NO_TOUCH&&(bt||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),zt=xt&&ut,Mt=xt&&ct,Ct=1<(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI),Et=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",a,e),window.removeEventListener("testPassiveEventSupport",a,e)}catch(t){}return t},St=!!document.createElement("canvas").getContext,Zt=!(!document.createElementNS||!$("svg").createSVGRect),kt=!Zt&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}();function Bt(t){return 0<=navigator.userAgent.toLowerCase().indexOf(t)}var At=(Object.freeze||Object)({ie:et,ielt9:it,edge:nt,webkit:ot,android:st,android23:rt,androidStock:ht,opera:ut,chrome:lt,gecko:ct,safari:_t,phantom:dt,opera12:pt,win:mt,ie3d:ft,webkit3d:gt,gecko3d:vt,any3d:yt,mobile:xt,mobileWebkit:wt,mobileWebkit3d:Pt,msPointer:Lt,pointer:bt,touch:Tt,mobileOpera:zt,mobileGecko:Mt,retina:Ct,passiveEvents:Et,canvas:St,svg:Zt,vml:kt}),It=Lt?"MSPointerDown":"pointerdown",Ot=Lt?"MSPointerMove":"pointermove",Rt=Lt?"MSPointerUp":"pointerup",Nt=Lt?"MSPointerCancel":"pointercancel",Dt=["INPUT","SELECT","OPTION"],jt={},Wt=!1,Ht=0;function Ft(t){jt[t.pointerId]=t,Ht++}function Ut(t){jt[t.pointerId]&&(jt[t.pointerId]=t)}function Vt(t){delete jt[t.pointerId],Ht--}function qt(t,e){for(var i in t.touches=[],jt)t.touches.push(jt[i]);t.changedTouches=[t],e(t)}var Gt=Lt?"MSPointerDown":bt?"pointerdown":"touchstart",Kt=Lt?"MSPointerUp":bt?"pointerup":"touchend",Yt="_leaflet_";var Xt,Jt,$t,Qt,te,ee=ge(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ie=ge(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ne="webkitTransition"===ie||"OTransition"===ie?ie+"End":"transitionend";function oe(t){return"string"==typeof t?document.getElementById(t):t}function se(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||"auto"===i)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return"auto"===i?null:i}function re(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function ae(t){var e=t.parentNode;e&&e.removeChild(t)}function he(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ue(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function le(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ce(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=me(t);return 0<i.length&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function _e(t,e){if(void 0!==t.classList)for(var i=d(e),n=0,o=i.length;n<o;n++)t.classList.add(i[n]);else if(!ce(t,e)){var s=me(t);pe(t,(s?s+" ":"")+e)}}function de(t,e){void 0!==t.classList?t.classList.remove(e):pe(t,_((" "+me(t)+" ").replace(" "+e+" "," ")))}function pe(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function me(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function fe(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&function(t,e){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(t){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}(t,e)}function ge(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1}function ve(t,e,i){var n=e||new B(0,0);t.style[ee]=(ft?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(i?" scale("+i+")":"")}function ye(t,e){t._leaflet_pos=e,yt?ve(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function xe(t){return t._leaflet_pos||new B(0,0)}if("onselectstart"in document)Xt=function(){Ee(window,"selectstart",Re)},Jt=function(){Ze(window,"selectstart",Re)};else{var we=ge(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Xt=function(){if(we){var t=document.documentElement.style;$t=t[we],t[we]="none"}},Jt=function(){we&&(document.documentElement.style[we]=$t,$t=void 0)}}function Pe(){Ee(window,"dragstart",Re)}function Le(){Ze(window,"dragstart",Re)}function be(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Te(),te=(Qt=t).style.outline,t.style.outline="none",Ee(window,"keydown",Te))}function Te(){Qt&&(Qt.style.outline=te,te=Qt=void 0,Ze(window,"keydown",Te))}function ze(t){for(;!((t=t.parentNode).offsetWidth&&t.offsetHeight||t===document.body););return t}function Me(t){var e=t.getBoundingClientRect();
12return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Ce=(Object.freeze||Object)({TRANSFORM:ee,TRANSITION:ie,TRANSITION_END:ne,get:oe,getStyle:se,create:re,remove:ae,empty:he,toFront:ue,toBack:le,hasClass:ce,addClass:_e,removeClass:de,setClass:pe,getClass:me,setOpacity:fe,testProp:ge,setTransform:ve,setPosition:ye,getPosition:xe,disableTextSelection:Xt,enableTextSelection:Jt,disableImageDrag:Pe,enableImageDrag:Le,preventOutline:be,restoreOutline:Te,getSizedParentNode:ze,getScale:Me});function Ee(t,e,i,n){if("object"==typeof e)for(var o in e)ke(t,o,e[o],i);else for(var s=0,r=(e=d(e)).length;s<r;s++)ke(t,e[s],i,n);return this}var Se="_leaflet_events";function Ze(t,e,i,n){if("object"==typeof e)for(var o in e)Be(t,o,e[o],i);else if(e)for(var s=0,r=(e=d(e)).length;s<r;s++)Be(t,e[s],i,n);else{for(var a in t[Se])Be(t,a,t[Se][a]);delete t[Se]}return this}function ke(e,t,i,n){var o=t+l(i)+(n?"_"+l(n):"");if(e[Se]&&e[Se][o])return this;var s=function(t){return i.call(n||e,t||window.event)},r=s;bt&&0===t.indexOf("touch")?function(t,e,i,o){return"touchstart"===e?(n=t,s=i,r=o,a=u(function(t){if("mouse"!==t.pointerType&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(Dt.indexOf(t.target.tagName)<0))return;Re(t)}qt(t,s)}),n["_leaflet_touchstart"+r]=a,n.addEventListener(It,a,!1),Wt||(document.documentElement.addEventListener(It,Ft,!0),document.documentElement.addEventListener(Ot,Ut,!0),document.documentElement.addEventListener(Rt,Vt,!0),document.documentElement.addEventListener(Nt,Vt,!0),Wt=!0)):"touchmove"===e?function(t,e,i){function n(t){(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons)&&qt(t,e)}t["_leaflet_touchmove"+o]=n,t.addEventListener(Ot,n,!1)}(t,i):"touchend"===e&&function(t,e,i){function n(t){qt(t,e)}t["_leaflet_touchend"+o]=n,t.addEventListener(Rt,n,!1),t.addEventListener(Nt,n,!1)}(t,i);var n,s,r,a}(e,t,s,o):!Tt||"dblclick"!==t||bt&<?"addEventListener"in e?"mousewheel"===t?e.addEventListener("onwheel"in e?"wheel":"mousewheel",s,!!Et&&{passive:!1}):"mouseenter"===t||"mouseleave"===t?(s=function(t){t=t||window.event,qe(e,t)&&r(t)},e.addEventListener("mouseenter"===t?"mouseover":"mouseout",s,!1)):("click"===t&&st&&(s=function(t){!function(t,e){var i=t.timeStamp||t.originalEvent&&t.originalEvent.timeStamp,n=He&&i-He;if(n&&100<n&&n<500||t.target._simulatedClick&&!t._simulated)return Ne(t);He=i,e(t)}(t,r)}),e.addEventListener(t,s,!1)):"attachEvent"in e&&e.attachEvent("on"+t,s):function(t,o,e){var s,r,a=!1;function i(t){var e;if(bt){if(!nt||"mouse"===t.pointerType)return;e=Ht}else e=t.touches.length;if(!(1<e)){var i=Date.now(),n=i-(s||i);r=t.touches?t.touches[0]:t,a=0<n&&n<=250,s=i}}function n(t){if(a&&!r.cancelBubble){if(bt){if(!nt||"mouse"===t.pointerType)return;var e,i,n={};for(i in r)e=r[i],n[i]=e&&e.bind?e.bind(r):e;r=n}r.type="dblclick",r.button=0,o(r),s=null}}t[Yt+Gt+e]=i,t[Yt+Kt+e]=n,t[Yt+"dblclick"+e]=o,t.addEventListener(Gt,i,!!Et&&{passive:!1}),t.addEventListener(Kt,n,!!Et&&{passive:!1}),t.addEventListener("dblclick",o,!1)}(e,s,o),e[Se]=e[Se]||{},e[Se][o]=s}function Be(t,e,i,n){var o,s,r,a=e+l(i)+(n?"_"+l(n):""),h=t[Se]&&t[Se][a];if(!h)return this;bt&&0===e.indexOf("touch")?(r=(o=t)["_leaflet_"+(s=e)+a],"touchstart"===s?o.removeEventListener(It,r,!1):"touchmove"===s?o.removeEventListener(Ot,r,!1):"touchend"===s&&(o.removeEventListener(Rt,r,!1),o.removeEventListener(Nt,r,!1))):!Tt||"dblclick"!==e||bt&<?"removeEventListener"in t?"mousewheel"===e?t.removeEventListener("onwheel"in t?"wheel":"mousewheel",h,!!Et&&{passive:!1}):t.removeEventListener("mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,h,!1):"detachEvent"in t&&t.detachEvent("on"+e,h):function(t,e){var i=t[Yt+Gt+e],n=t[Yt+Kt+e],o=t[Yt+"dblclick"+e];t.removeEventListener(Gt,i,!!Et&&{passive:!1}),t.removeEventListener(Kt,n,!!Et&&{passive:!1}),nt||t.removeEventListener("dblclick",o,!1)}(t,a),t[Se][a]=null}function Ae(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,Ve(t),this}function Ie(t){return ke(t,"mousewheel",Ae),this}function Oe(t){return Ee(t,"mousedown touchstart dblclick",Ae),ke(t,"click",Ue),this}function Re(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Ne(t){return Re(t),Ae(t),this}function De(t,e){if(!e)return new B(t.clientX,t.clientY);var i=Me(e),n=i.boundingClientRect;return new B((t.clientX-n.left)/i.x-e.clientLeft,(t.clientY-n.top)/i.y-e.clientTop)}var je=mt&<?2*window.devicePixelRatio:ct?window.devicePixelRatio:1;function We(t){return nt?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/je:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail
vendor: 35,743 bytes, line 12
12:t.detail?t.detail/-32765*60:0}var He,Fe={};function Ue(t){Fe[t.type]=!0}function Ve(t){var e=Fe[t.type];return Fe[t.type]=!1,e}function qe(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(t){return!1}return i!==t}var Ge=(Object.freeze||Object)({on:Ee,off:Ze,stopPropagation:Ae,disableScrollPropagation:Ie,disableClickPropagation:Oe,preventDefault:Re,stop:Ne,getMousePosition:De,getWheelDelta:We,fakeStop:Ue,skipped:Ve,isExternalTarget:qe,addListener:Ee,removeListener:Ze}),Ke=k.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=xe(t),this._offset=e.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=M(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=1e3*this._duration;e<i?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var i=this._startPos.add(this._offset.multiplyBy(t));e&&i._round(),ye(this._el,i),this.fire("step")},_complete:function(){C(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),Ye=k.extend({options:{crs:X,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=p(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=u(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(W(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=ie&&yt&&!zt&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Ee(this._proxy,ne,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,i){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(W(t),e,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&!0!==i&&(void 0!==i.animate&&(i.zoom=h({animate:i.animate},i.zoom),i.pan=h({animate:i.animate,duration:i.duration},i.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,i.zoom):this._tryAnimatedPan(t,i.pan))?clearTimeout(this._sizeTimer):this._resetView(t,e),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(yt?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(yt?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),o=this.getSize().divideBy(2),s=(t instanceof B?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/n),r=this.containerPointToLatLng(o.add(s));return this.setView(r,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():D(t);var i=I(e.paddingTopLeft||e.padding||[0,0]),n=I(e.paddingBottomRight||e.padding||[0,0]),o=this.getBoundsZoom(t,!1,i.add(n));if((o="number"==typeof e.maxZoom?Math.min(e.maxZoom,o):o)===1/0)return{center:t.getCenter(),zoom:o};var s=n.subtract(i).divideBy(2),r=this.project(t.getSouthWest(),o),a=this.project(t.getNorthEast(),o);return{center:this.unproject(r.add(a).divideBy(2).add(s),o),zoom:o}},fitBounds:function(t,e){if(!(t=D(t)).isValid())throw new Error("Bounds are not valid.");var i=this._getBoundsCenterZoom(t,e);return this.setView(i.center,i.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(e=e||{},!(t=I(t).round()).x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new Ke,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){_e(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(s,r,t){if(!1===(t=t||{}).animate||!yt)return this.setView(s,r,t);this._stop();var a=this.project(this.getCenter()),h=this.project(s),e=this.getSize(),u=this._zoom;s=W(s),r=void 0===r?u:r;var l=Math.max(e.x,e.y),n=l*this.getZoomScale(u,r),c=h.distanceTo(a)||1,_=1.42,d=_*_;function i(t){var e=(n*n-l*l+(t?-1:1)*d*d*c*c)/(2*(t?n:l)*d*c),i=Math.sqrt(e*e+1)-e;return i<1e-9?-18:Math.log(i)}function p(t){return(Math.exp(t)-Math.exp(-t))/2}function m(t){return(Math.exp(t)+Math.exp(-t))/2}var f=i(0);var g=Date.now(),v=(i(1)-f)/_,y=t.duration?1e3*t.duration:1e3*v*.8;return this._moveStart(!0,t.noMoveStart),function t(){var e,i,n=(Date.now()-g)/y,o=(e=n,(1-Math.pow(1-e,1.5))*v);n<=1?(this._flyToFrame=M(t,this),this._move(this.unproject(a.add(h.subtract(a).multiplyBy(function(t){return l*(m(f)*(p(e=f+_*t)/m(e))-p(f))/d;var e}(o)/c)),u),this.getScaleZoom(l/(i=o,l*(m(f)/m(f+_*i))),u),{flyTo:!0})):this._move(s,r)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,e){var i=this._getBoundsCenterZoom(t,e);return this.flyTo(i.center,i.zoom,e)},setMaxBounds:function(t){return(t=D(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,D(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=I((e=e||{}).paddingTopLeft||e.padding||[0,0]),n=I(e.paddingBottomRight||e.padding||[0,0]),o=this.getCenter(),s=this.project(o),r=this.project(t),a=this.getPixelBounds(),h=a.getSize().divideBy(2),u=R([a.min.add(i),a.max.subtract(n)]);if(!u.contains(r)){this._enforcingBounds=!0;var l=s.subtract(r),c=I(r.x+l.x,r.y+l.y);(r.x<u.min.x||r.x>u.max.x)&&(c.x=s.x-l.x,0<l.x?c.x+=h.x-i.x:c.x-=h.x-n.x),(r.y<u.min.y||r.y>u.max.y)&&(c.y=s.y-l.y,0<l.y?c.y+=h.y-i.y:c.y-=h.y-n.y),this.panTo(this.unproject(c),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=h({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),n=e.divideBy(2).round(),o=i.divideBy(2).round(),s=n.subtract(o);return s.x||s.y?(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(u(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=h({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=u(this._handleGeolocationResponse,this),i=u(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})},_handleGeolocationResponse:function(t){var e=new j(t.coords.latitude,t.coords.longitude),i=e.toBounds(2*t.coords.accuracy),n=this._locateOptions;if(n.setView){var o=this.getBoundsZoom(i);this.setView(e,n.maxZoom?Math.min(o,n.maxZoom):o)}var s={latlng:e,bounds:i,timestamp:t.timestamp};for(var r in t.coords)"number"==typeof t.coords[r]&&(s[r]=t.coords[r]);this.fire("locationfound",s)},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&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=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ae(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(C(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ae(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i=re("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=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 t=this.getPixelBounds();return new N(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=D(t),i=I(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),h=this.getSize().subtract(i),u=R(this.project(a,n),this.project(r,n)).getSize(),l=yt?this.options.zoomSnap:1,c=h.x/u.x,_=h.y/u.y,d=e?Math.max(c,_):Math.min(c,_);return n=this.getScaleZoom(d,n),l&&(n=Math.round(n/(l/100))*(l/100),n=e?Math.ceil(n/l)*l:Math.floor(n/l)*l),Math.max(o,Math.min(s,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new B(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new O(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=void 0===e?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(W(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(I(t),e)},layerPointToLatLng:function(t){var e=I(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(W(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(W(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(D(t))},distance:function(t,e){return this.options.crs.distance(W(t),W(e))},containerPointToLayerPoint:function(t){return I(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return I(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(I(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(W(t)))},mouseEventToContainerPoint:function(t){return De(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=oe(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");Ee(e,"scroll",this._onScroll,this),this._containerId=l(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&yt,_e(t,"leaflet-container"+(Tt?" leaflet-touch":"")+(Ct?" leaflet-retina":"")+(it?" leaflet-oldie":"")+(_t?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=se(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),ye(this._mapPane,new B(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(_e(t.markerPane,"leaflet-zoom-hide"),_e(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){ye(this._mapPane,new B(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var n=this._zoom!==e;this._moveStart(n,!1)._move(t,e)._moveEnd(n),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i){void 0===e&&(e=this._zoom);var n=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(n||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return C(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){ye(this._mapPane,this._getMapPanePos().subtract(t))},_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){this._targets={};var e=t?Ze:Ee;e((this._targets[l(this._container)]=this)._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),yt&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){C(this._resizeRequest),this._resizeRequest=M(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i,n=[],o="mouseout"===e||"mouseover"===e,s=t.target||t.srcElement,r=!1;s;){if((i=this._targets[l(s)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(i)){r=!0;break}if(i&&i.listens(e,!0)){if(o&&!qe(s,t))break;if(n.push(i),o)break}if(s===this._container)break;s=s.parentNode}return n.length||r||o||!qe(s,t)||(n=[this]),n},_handleDOMEvent:function(t){if(this._loaded&&!Ve(t)){var e=t.type;"mousedown"!==e&&"keypress"!==e&&"keyup"!==e&&"keydown"!==e||be(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if("click"===t.type){var n=h({},t);n.type="preclick",this._fireDOMEvent(n,n.type,i)}if(!t._stopped&&(i=(i||[]).concat(this._findEventTargets(t,e))).length){var o=i[0];"contextmenu"===e&&o.listens(e,!0)&&Re(t);var s={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var r=o.getLatLng&&(!o._radius||o._radius<=10);s.containerPoint=r?this.latLngToContainerPoint(o.getLatLng()):this.mouseEventToContainerPoint(t),s.layerPoint=this.containerPointToLayerPoint(s.containerPoint),s.latlng=r?o.getLatLng():this.layerPointToLatLng(s.layerPoint)}for(var a=0;a<i.length;a++)if(i[a].fire(e,s,!0),s.originalEvent._stopped||!1===i[a].options.bubblingMouseEvents&&-1!==y(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return xe(this._mapPane)||new B(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return R([this.project(t.getSouthWest(),e)._subtract(n),this.project(t.getNorthWest(),e)._subtract(n),this.project(t.getSouthEast(),e)._subtract(n),this.project(t.getNorthEast(),e)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),o=this.getSize().divideBy(2),s=new O(n.subtract(o),n.add(o)),r=this._getBoundsOffset(s,i,e);return r.round().equals([0,0])?t:this.unproject(n.add(r),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new O(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=R(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),o=n.min.subtract(t.min),s=n.max.subtract(t.max);return new B(this._rebound(o.x,-s.x),this._rebound(o.y,-s.y))},_rebound:function(t,e){return 0<t+e?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=yt?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){de(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(i)||(this.panBy(i,e),0))},_createAnimProxy:function(){var t=this._proxy=re("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var e=ee,i=this._proxy.style[e];ve(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),i===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ae(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();ve(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&0<=t.propertyName.indexOf("transform")&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||!1===i.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==i.animate&&!this.getSize().contains(o)||(M(function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)},this),0))},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,_e(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),setTimeout(u(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&de(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),M(function(){this._moveEnd(!0)},this))}});function Xe(t){return new Je(t)}var Je=S.extend({options:{position:"topright"},initialize:function(t){p(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return _e(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(ae(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&0<t.screenX&&0<t.screenY&&this._map.getContainer().focus()}});Ye.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var n=this._controlCorners={},o="leaflet-",s=this._controlContainer=re("div",o+"control-container",this._container);function t(t,e){var i=o+t+" "+o+e;n[t+e]=re("div",i,s)}t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ae(this._controlCorners[t]);ae(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var $e=Je.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i<n?-1:n<i?1:0}},initialize:function(t,e,i){for(var n in p(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){this._initLayout(),this._update(),(this._map=t).on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return Je.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(l(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){_e(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(_e(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):de(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return de(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=re("div",t),i=this.options.collapsed;e.setAttribute("aria-haspopup",!0),Oe(e),Ie(e);var n=this._section=re("section",t+"-list");i&&(this._map.on("click",this.collapse,this),st||Ee(e,{mouseenter:this.expand,mouseleave:this.collapse},this));var o=this._layersLink=re("a",t+"-toggle",e);o.href="#",o.title="Layers",Tt?(Ee(o,"click",Ne),Ee(o,"click",this.expand,this)):Ee(o,"focus",this.expand,this),i||this.expand(),this._baseLayersList=re("div",t+"-base",n),this._separator=re("div",t+"-separator",n),this._overlaysList=re("div",t+"-overlays",n),e.appendChild(n)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&l(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,i){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:i}),this.options.sortLayers&&this._layers.sort(u(function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;he(this._baseLayersList),he(this._overlaysList),this._layerControlInputs=[];var t,e,i,n,o=0;for(i=0;i<this._layers.length;i++)n=this._layers[i],this._addItem(n),e=e||n.overlay,t=t||!n.overlay,o+=n.overlay?0:1;return this.options.hideSingleBase&&(t=t&&1<o,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(l(t.target)),i=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,e){var i='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",n=document.createElement("div");return n.innerHTML=i,n.firstChild},_addItem:function(t){var e,i=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=n):e=this._createRadioElement("leaflet-base-layers_"+l(this),n),this._layerControlInputs.push(e),e.layerId=l(t.layer),Ee(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var s=document.createElement("div");return i.appendChild(s),s.appendChild(e),s.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){var t,e,i=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var s=i.length-1;0<=s;s--)t=i[s],e=this._getLayer(t.layerId).layer,t.checked?n.push(e):t.checked||o.push(e);for(s=0;s<o.length;s++)this._map.hasLayer(o[s])&&this._map.removeLayer(o[s]);for(s=0;s<n.length;s++)this._map.hasLayer(n[s])||this._map.addLayer(n[s]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,i=this._layerControlInputs,n=this._map.getZoom(),o=i.length-1;0<=o;o--)t=i[o],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&n<e.options.minZoom||void 0!==e.options.maxZoom&&n>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),Qe=Je.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=re("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.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(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,o){var s=re("a",i,n);return s.innerHTML=t,s.href="#",s.title=e,s.setAttribute("role","button"),s.setAttribute("aria-label",e),Oe(s),Ee(s,"click",Ne),Ee(s,"click",o,this),Ee(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";de(this._zoomInButton,e),de(this._zoomOutButton,e),!this._disabled&&t._zoom!==t.getMinZoom()||_e(this._zoomOutButton,e),!this._disabled&&t._zoom!==t.getMaxZoom()||_e(this._zoomInButton,e)}});Ye.mergeOptions({zoomControl:!0}),Ye.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Qe,this.addControl(this.zoomControl))});var ti=Je.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=re("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=re("div",e,i)),t.imperial&&(this._iScale=re("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e,i,n,o=3.2808399*t;5280<o?(e=o/5280,i=this._getRoundNum(e),this._updateScale(this._iScale,i+" mi",i/e)):(n=this._getRoundNum(o),this._updateScale(this._iScale,n+" ft",n/o))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return e*(10<=i?10:5<=i?5:3<=i?3:2<=i?2:1)}}),ei=Je.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){p(this,t),this._attributions={}},onAdd:function(t){for(var e in(t.attributionControl=this)._container=re("div","leaflet-control-attribution"),Oe(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t&&(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update()),this},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}}});Ye.mergeOptions({attributionControl:!0}),Ye.addInitHook(function(){this.options.attributionControl&&(new ei).addTo(this)}),Je.Layers=$e,Je.Zoom=Qe,Je.Scale=ti,Je.Attribution=ei,Xe.layers=function(t,e,i){return new $e(t,e,i)},Xe.zoom=function(t){return new Qe(t)},Xe.scale=function(t){return new ti(t)},Xe.attribution=function(t){return new ei(t)};var ii=S.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this},enabled:function(){return!!this._enabled}});ii.addTo=function(t,e){return t.addHandler(e,this),this};var ni,oi={Events:Z},si=Tt?"touchstart mousedown":"mousedown",ri={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},ai={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},hi=k.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){p(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(Ee(this._dragStartTarget,si,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(hi._dragging===this&&this.finishDrag(),Ze(this._dragStartTarget,si,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!ce(this._element,"leaflet-zoom-anim")&&!(hi._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||((hi._dragging=this)._preventOutline&&be(this._element),Pe(),Xt(),this._moving)))){this.fire("down");var e=t.touches?t.touches[0]:t,i=ze(this._element);this._startPoint=new B(e.clientX,e.clientY),this._parentScale=Me(i),Ee(document,ai[t.type],this._onMove,this),Ee(document,ri[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&this._enabled)if(t.touches&&1<t.touches.length)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,i=new B(e.clientX,e.clientY)._subtract(this._startPoint);(i.x||i.y)&&(Math.abs(i.x)+Math.abs(i.y)<this.options.clickTolerance||(i.x/=this._parentScale.x,i.y/=this._parentScale.y,Re(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=xe(this._element).subtract(i),_e(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),_e(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(i),this._moving=!0,C(this._animRequest),this._lastEvent=t,this._animRequest=M(this._updatePosition,this,!0)))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),ye(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){for(var t in de(document.body,"leaflet-dragging"),this._lastTarget&&(de(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),ai)Ze(document,ai[t],this._onMove,this),Ze(document,ri[t],this._onUp,this);Le(),Jt(),this._moved&&this._moving&&(C(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,hi._dragging=!1}});function ui(t,e){if(!e||!t.length)return t.slice();var i=e*e;return function(t,e){var i=t.length,n=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(i);n[0]=n[i-1]=1,function t(e,i,n,o,s){var r,a,h,u=0;for(a=o+1;a<=s-1;
12a++)u<(h=pi(e[a],e[o],e[s],!0))&&(r=a,u=h);n<u&&(i[r]=1,t(e,i,n,o,r),t(e,i,n,r,s))}(t,n,e,0,i-1);var o,s=[];for(o=0;o<i;o++)n[o]&&s.push(t[o]);return s}(t=function(t,e){for(var i=[t[0]],n=1,o=0,s=t.length;n<s;n++)r=t[n],e<(h=(a=t[o]).x-r.x)*h+(u=a.y-r.y)*u&&(i.push(t[n]),o=n);var r,a,h,u;return o<s-1&&i.push(t[s-1]),i}(t,i),i)}function li(t,e,i){return Math.sqrt(pi(t,e,i,!0))}function ci(t,e,i,n,o){var s,r,a,h=n?ni:di(t,i),u=di(e,i);for(ni=u;;){if(!(h|u))return[t,e];if(h&u)return!1;a=di(r=_i(t,e,s=h||u,i,o),i),s===h?(t=r,h=a):(e=r,u=a)}}function _i(t,e,i,n,o){var s,r,a=e.x-t.x,h=e.y-t.y,u=n.min,l=n.max;return 8&i?(s=t.x+a*(l.y-t.y)/h,r=l.y):4&i?(s=t.x+a*(u.y-t.y)/h,r=u.y):2&i?(s=l.x,r=t.y+h*(l.x-t.x)/a):1&i&&(s=u.x,r=t.y+h*(u.x-t.x)/a),new B(s,r,o)}function di(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i}function pi(t,e,i,n){var o,s=e.x,r=e.y,a=i.x-s,h=i.y-r,u=a*a+h*h;return 0<u&&(1<(o=((t.x-s)*a+(t.y-r)*h)/u)?(s=i.x,r=i.y):0<o&&(s+=a*o,r+=h*o)),a=t.x-s,h=t.y-r,n?a*a+h*h:new B(s,r)}function mi(t){return!v(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function fi(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),mi(t)}var gi=(Object.freeze||Object)({simplify:ui,pointToSegmentDistance:li,closestPointOnSegment:function(t,e,i){return pi(t,e,i)},clipSegment:ci,_getEdgeIntersection:_i,_getBitCode:di,_sqClosestPointOnSegment:pi,isFlat:mi,_flat:fi});function vi(t,e,i){var n,o,s,r,a,h,u,l,c,_=[1,4,2,8];for(o=0,u=t.length;o<u;o++)t[o]._code=di(t[o],e);for(r=0;r<4;r++){for(l=_[r],n=[],o=0,s=(u=t.length)-1;o<u;s=o++)a=t[o],h=t[s],a._code&l?h._code&l||((c=_i(h,a,l,e,i))._code=di(c,e),n.push(c)):(h._code&l&&((c=_i(h,a,l,e,i))._code=di(c,e),n.push(c)),n.push(a));t=n}return t}var yi,xi=(Object.freeze||Object)({clipPolygon:vi}),wi={project:function(t){return new B(t.lng,t.lat)},unproject:function(t){return new j(t.y,t.x)},bounds:new O([-180,-90],[180,90])},Pi={R:6378137,R_MINOR:6356752.314245179,bounds:new O([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,o=this.R_MINOR/i,s=Math.sqrt(1-o*o),r=s*Math.sin(n),a=Math.tan(Math.PI/4-n/2)/Math.pow((1-r)/(1+r),s/2);return n=-i*Math.log(Math.max(a,1e-10)),new B(t.lng*e*i,n)},unproject:function(t){for(var e,i=180/Math.PI,n=this.R,o=this.R_MINOR/n,s=Math.sqrt(1-o*o),r=Math.exp(-t.y/n),a=Math.PI/2-2*Math.atan(r),h=0,u=.1;h<15&&1e-7<Math.abs(u);h++)e=s*Math.sin(a),e=Math.pow((1-e)/(1+e),s/2),a+=u=Math.PI/2-2*Math.atan(r*e)-a;return new j(a*i,t.x*i/n)}},Li=(Object.freeze||Object)({LonLat:wi,Mercator:Pi,SphericalMercator:q}),bi=h({},U,{code:"EPSG:3395",projection:Pi,transformation:(yi=.5/(Math.PI*Pi.R),K(yi,.5,-yi,.5))}),Ti=h({},U,{code:"EPSG:4326",projection:wi,transformation:K(1/180,1,-1/180,.5)}),zi=h({},F,{projection:wi,transformation:K(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0});F.Earth=U,F.EPSG3395=bi,F.EPSG3857=X,F.EPSG900913=J,F.EPSG4326=Ti,F.Simple=zi;var Mi=k.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[l(t)]=this},removeInteractiveTarget:function(t){return delete this._map._targets[l(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",function(){e.off(i,this)},this)}this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}});Ye.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=l(t);return this._layers[e]||((this._layers[e]=t)._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=l(t);return this._layers[e]&&(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null),this},hasLayer:function(t){return!!t&&l(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){for(var e=0,i=(t=t?v(t)?t:[t]:[]).length;e<i;e++)this.addLayer(t[e])}
vendor: 11,066 bytes, line 12
12,_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[l(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=l(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,i=this._getZoomSpan();for(var n in this._zoomBoundLayers){var o=this._zoomBoundLayers[n].options;t=void 0===o.minZoom?t:Math.min(t,o.minZoom),e=void 0===o.maxZoom?e:Math.max(e,o.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,i!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Ci=Mi.extend({initialize:function(t,e){var i,n;if(p(this,e),this._layers={},t)for(i=0,n=t.length;i<n;i++)this.addLayer(t[i])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return!!t&&(t in this._layers||this.getLayerId(t)in this._layers)},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)(i=this._layers[e])[t]&&i[t].apply(i,n);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return l(t)}}),Ei=Ci.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Ci.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),Ci.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new N;for(var e in this._layers){var i=this._layers[e];t.extend(i.getBounds?i.getBounds():i.getLatLng())}return t}}),Si=S.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){p(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(i,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(n,t),n},_setIconStyles:function(t,e){var i=this.options,n=i[e+"Size"];"number"==typeof n&&(n=[n,n]);var o=I(n),s=I("shadow"===e&&i.shadowAnchor||i.iconAnchor||o&&o.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),s&&(t.style.marginLeft=-s.x+"px",t.style.marginTop=-s.y+"px"),o&&(t.style.width=o.x+"px",t.style.height=o.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return Ct&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),Zi=Si.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(t){return Zi.imagePath||(Zi.imagePath=this._detectIconPath()),(this.options.imagePath||Zi.imagePath)+Si.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=re("div","leaflet-default-icon-path",document.body),e=se(t,"background-image")||se(t,"backgroundImage");return document.body.removeChild(t),null===e||0!==e.indexOf("url")?"":e.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),ki=ii.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new hi(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),_e(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&de(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,i=e._map,n=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,s=xe(e._icon),r=i.getPixelBounds(),a=i.getPixelOrigin(),h=R(r.min._subtract(a).add(o),r.max._subtract(a).subtract(o));if(!h.contains(s)){var u=I((Math.max(h.max.x,s.x)-h.max.x)/(r.max.x-h.max.x)-(Math.min(h.min.x,s.x)-h.min.x)/(r.min.x-h.min.x),(Math.max(h.max.y,s.y)-h.max.y)/(r.max.y-h.max.y)-(Math.min(h.min.y,s.y)-h.min.y)/(r.min.y-h.min.y)).multiplyBy(n);i.panBy(u,{animate:!1}),this._draggable._newPos._add(u),this._draggable._startPos._add(u),ye(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=M(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup().fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(C(this._panRequest),this._panRequest=M(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,i=e._shadow,n=xe(e._icon),o=e._map.layerPointToLatLng(n);i&&ye(i,n),e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){C(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Bi=Mi.extend({options:{icon:new Zi,interactive:!0,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){p(this,e),this._latlng=W(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.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(t){var e=this._latlng;return this._latlng=W(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,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&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),i=t.icon.createIcon(this._icon),n=!1;i!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(i.title=t.title),"IMG"===i.tagName&&(i.alt=t.alt||"")),_e(i,e),t.keyboard&&(i.tabIndex="0"),this._icon=i,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var o=t.icon.createShadow(this._shadow),s=!1;o!==this._shadow&&(this._removeShadow(),s=!0),o&&(_e(o,e),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),o&&s&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),ae(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&ae(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&ye(this._icon,t),this._shadow&&ye(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(_e(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),ki)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new ki(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&fe(this._icon,t),this._shadow&&fe(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}}),Ai=Mi.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,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.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(t){return p(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&t.hasOwnProperty("weight")&&this._updateBounds()),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)+this._renderer.options.tolerance}}),Ii=Ai.extend({options:{fill:!0,radius:10},initialize:function(t,e){p(this,e),this._latlng=W(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=W(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius}
vendor: 2,418 bytes, line 12
12,setStyle:function(t){var e=t&&t.radius||this._radius;return Ai.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,i=this._clickTolerance(),n=[t+i,e+i];this._pxBounds=new O(this._point.subtract(n),this._point.add(n))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}}),Oi=Ii.extend({initialize:function(t,e,i){if("number"==typeof e&&(e=h({},i,{radius:e})),p(this,e),this._latlng=W(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new N(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:Ai.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,i=this._map,n=i.options.crs;if(n.distance===U.distance){var o=Math.PI/180,s=this._mRadius/U.R/o,r=i.project([e+s,t]),a=i.project([e-s,t]),h=r.add(a).divideBy(2),u=i.unproject(h).lat,l=Math.acos((Math.cos(s*o)-Math.sin(e*o)*Math.sin(u*o))/(Math.cos(e*o)*Math.cos(u*o)))/o;!isNaN(l)&&0!==l||(l=s/Math.cos(Math.PI/180*e)),this._point=h.subtract(i.getPixelOrigin()),this._radius=isNaN(l)?0:h.x-i.project([u,t-l]).x,this._radiusY=h.y-r.y}else{var c=n.unproject(n.project(this._latlng).subtract([this._mRadius,0]));this._point=i.latLngToLayerPoint(this._latlng),this._radius=this._point.x-i.latLngToLayerPoint(c).x}this._updateBounds()}}),Ri=Ai.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){p(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,i,n=1/0,o=null,s=pi,r=0,a=this._parts.length;r<a;r++)for(var h=this._parts[r],u=1,l=h.length;u<l;u++){var c=s(t,e=h[u-1],i=h[u],!0);c<n&&(n=c,o=s(t,e,i))}return o&&(o.distance=Math.sqrt(n)),o}
vendor: 7,073 bytes, line 12
12,getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,n,o,s,r,a=this._rings[0],h=a.length;if(!h)return null;for(e=t=0;t<h-1;t++)e+=a[t].distanceTo(a[t+1])/2;if(0===e)return this._map.layerPointToLatLng(a[0]);for(n=t=0;t<h-1;t++)if(o=a[t],s=a[t+1],e<(n+=i=o.distanceTo(s)))return r=(n-e)/i,this._map.layerPointToLatLng([s.x-r*(s.x-o.x),s.y-r*(s.y-o.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=W(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new N,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return mi(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=mi(t),n=0,o=t.length;n<o;n++)i?(e[n]=W(t[n]),this._bounds.extend(e[n])):e[n]=this._convertLatLngs(t[n]);return e},_project:function(){var t=new O;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),e=new B(t,t);this._pxBounds=new O([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)])},_projectLatlngs:function(t,e,i){var n,o,s=t[0]instanceof j,r=t.length;if(s){for(o=[],n=0;n<r;n++)o[n]=this._map.latLngToLayerPoint(t[n]),i.extend(o[n]);e.push(o)}else for(n=0;n<r;n++)this._projectLatlngs(t[n],e,i)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var e,i,n,o,s,r,a,h=this._parts;for(n=e=0,o=this._rings.length;e<o;e++)for(i=0,s=(a=this._rings[e]).length;i<s-1;i++)(r=ci(a[i],a[i+1],t,i,!0))&&(h[n]=h[n]||[],h[n].push(r[0]),r[1]===a[i+1]&&i!==s-2||(h[n].push(r[1]),n++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,n=t.length;i<n;i++)t[i]=ui(t[i],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var i,n,o,s,r,a,h=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,s=this._parts.length;i<s;i++)for(n=0,o=(r=(a=this._parts[i]).length)-1;n<r;o=n++)if((e||0!==n)&&li(t,a[o],a[n])<=h)return!0;return!1}});Ri._flat=fi;var Ni=Ri.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 t,e,i,n,o,s,r,a,h,u=this._rings[0],l=u.length;if(!l)return null;for(s=r=a=0,t=0,e=l-1;t<l;e=t++)i=u[t],n=u[e],o=i.y*n.x-n.y*i.x,r+=(i.x+n.x)*o,a+=(i.y+n.y)*o,s+=3*o;return h=0===s?u[0]:[r/s,a/s],this._map.layerPointToLatLng(h)},_convertLatLngs:function(t){var e=Ri.prototype._convertLatLngs.call(this,t),i=e.length;return 2<=i&&e[0]instanceof j&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){Ri.prototype._setLatLngs.call(this,t),mi(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return mi(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new B(e,e);if(t=new O(t.min.subtract(i),t.max.add(i)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var n,o=0,s=this._rings.length;o<s;o++)(n=vi(this._rings[o],t,!0)).length&&this._parts.push(n)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,i,n,o,s,r,a,h,u=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,a=this._parts.length;o<a;o++)for(s=0,r=(h=(e=this._parts[o]).length)-1;s<h;r=s++)i=e[s],n=e[r],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(u=!u);return u||Ri.prototype._containsPoint.call(this,t,!0)}}),Di=Ei.extend({initialize:function(t,e){p(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,o=v(t)?t:t.features;if(o){for(e=0,i=o.length;e<i;e++)((n=o[e]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var s=this.options;if(s.filter&&!s.filter(t))return this;var r=ji(t,s);return r?(r.feature=Gi(t),r.defaultOptions=r.options,this.resetStyle(r),s.onEachFeature&&s.onEachFeature(t,r),this.addLayer(r)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=h({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(e){return this.eachLayer(function(t){this._setLayerStyle(t,e)},this)},_setLayerStyle:function(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}});function ji(t,e){var i,n,o,s,r="Feature"===t.type?t.geometry:t,a=r?r.coordinates:null,h=[],u=e&&e.pointToLayer,l=e&&e.coordsToLatLng||Hi;if(!a&&!r)return null;switch(r.type){case"Point":return Wi(u,t,i=l(a),e);case"MultiPoint":for(o=0,s=a.length;o<s;o++)i=l(a[o]),h.push(Wi(u,t,i,e));return new Ei(h);case"LineString":case"MultiLineString":return n=Fi(a,"LineString"===r.type?0:1,l),new Ri(n,e);case"Polygon":case"MultiPolygon":return n=Fi(a,"Polygon"===r.type?1:2,l),new Ni(n,e);case"GeometryCollection":for(o=0,s=r.geometries.length;o<s;o++){var c=ji({geometry:r.geometries[o],type:"Feature",properties:t.properties},e);c&&h.push(c)}return new Ei(h);default:throw new Error("Invalid GeoJSON object.")}}function Wi(t,e,i,n){return t?t(e,i):new Bi(i,n&&n.markersInheritOptions&&n)}function Hi(t){return new j(t[1],t[0],t[2])}function Fi(t,e,i){for(var n,o=[],s=0,r=t.length;s<r;s++)n=e?Fi(t[s],e-1,i):(i||Hi)(t[s]),o.push(n);return o}function Ui(t,e){return e="number"==typeof e?e:6,void 0!==t.alt?[c(t.lng,e),c(t.lat,e),c(t.alt,e)]:[c(t.lng,e),c(t.lat,e)]}function Vi(t,e,i,n){for(var o=[],s=0,r=t.length;s<r;s++)o.push(e?Vi(t[s],e-1,i,n):Ui(t[s],n));return!e&&i&&o.push(o[0]),o}function qi(t,e){return t.feature?h({},t.feature,{geometry:e}):Gi(e)}function Gi(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var Ki={toGeoJSON:function(t){return qi(this,{type:"Point",coordinates:Ui(this.getLatLng(),t)})}};function Yi(t,e){return new Di(t,e)}Bi.include(Ki),Oi.include(Ki),Ii.include(Ki),Ri.include({toGeoJSON:function(t){var e=!mi(this._latlngs);return qi(this,{type:(e?"Multi":"")+"LineString",coordinates:Vi(this._latlngs,e?1:0,!1,t)})}}),Ni.include({toGeoJSON:function(t){var e=!mi(this._latlngs),i=e&&!mi(this._latlngs[0]),n=Vi(this._latlngs,i?2:e?1:0,!0,t);return e||(n=[n]),qi(this,{type:(i?"Multi":"")+"Polygon",coordinates:n})}}),Ci.include({toMultiPoint:function(e){var i=[];return this.eachLayer(function(t){i.push(t.toGeoJSON(e).geometry.coordinates)}),qi(this,{type:"MultiPoint",coordinates:i})},toGeoJSON:function(n){var t=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===t)return this.toMultiPoint(n);var o="GeometryCollection"===t,s=[];return this.eachLayer(function(t){if(t.toGeoJSON){var e=t.toGeoJSON(n);if(o)s.push(e.geometry);else{var i=Gi(e);
vendor: 5,158 bytes, line 12
12"FeatureCollection"===i.type?s.push.apply(s,i.features):s.push(i)}}}),o?qi(this,{geometries:s,type:"GeometryCollection"}):{type:"FeatureCollection",features:s}}});var Xi=Yi,Ji=Mi.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=D(e),p(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(_e(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ae(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&ue(this._image),this},bringToBack:function(){return this._map&&le(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=D(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:re("img");_e(e,"leaflet-image-layer"),this._zoomAnimated&&_e(e,"leaflet-zoom-animated"),this.options.className&&_e(e,this.options.className),e.onselectstart=a,e.onmousemove=a,e.onload=u(this.fire,this,"load"),e.onerror=u(this._overlayOnError,this,"error"),!this.options.crossOrigin&&""!==this.options.crossOrigin||(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;ve(this._image,i,e)},_reset:function(){var t=this._image,e=new O(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();ye(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){fe(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)}}),$i=Ji.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:re("video");if(_e(e,"leaflet-image-layer"),this._zoomAnimated&&_e(e,"leaflet-zoom-animated"),this.options.className&&_e(e,this.options.className),e.onselectstart=a,e.onmousemove=a,e.onloadeddata=u(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),n=[],o=0;o<i.length;o++)n.push(i[o].src);this._url=0<i.length?n:[e.src]}else{v(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&e.style.hasOwnProperty("objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop;for(var s=0;s<this._url.length;s++){var r=re("source");r.src=this._url[s],e.appendChild(r)}}}}),Qi=Ji.extend({_initImage:function(){var t=this._image=this._url;_e(t,"leaflet-image-layer"),this._zoomAnimated&&_e(t,"leaflet-zoom-animated"),this.options.className&&_e(t,this.options.className),t.onselectstart=a,t.onmousemove=a}}),tn=Mi.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,e){p(this,t),this._source=e},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&fe(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&fe(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(fe(this._container,0),this._removeTimeout=setTimeout(u(ae,void 0,this._container),200)):ae(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=W(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,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 t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&ue(this._container),this},bringToBack:function(){return this._map&&le(this._container),this}
vendor: 48,265 bytes, line 12
12,_prepareOpen:function(t,e,i){if(e instanceof Mi||(i=e,e=t),e instanceof Ei)for(var n in t._layers){e=t._layers[n];break}if(!i)if(e.getCenter)i=e.getCenter();else{if(!e.getLatLng)throw new Error("Unable to get source layer LatLng.");i=e.getLatLng()}return this._source=e,this.update(),i},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=I(this.options.offset),i=this._getAnchor();this._zoomAnimated?ye(this._container,t.add(i)):e=e.add(t).add(i);var n=this._containerBottom=-e.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=n+"px",this._container.style.left=o+"px"}},_getAnchor:function(){return[0,0]}}),en=tn.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t.openPopup(this),this},onAdd:function(t){tn.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Ai||this._source.on("preclick",Ae))},onRemove:function(t){tn.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Ai||this._source.off("preclick",Ae))},getEvents:function(){var t=tn.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t="leaflet-popup",e=this._container=re("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),i=this._wrapper=re("div",t+"-content-wrapper",e);if(this._contentNode=re("div",t+"-content",i),Oe(i),Ie(this._contentNode),Ee(i,"contextmenu",Ae),this._tipContainer=re("div",t+"-tip-container",e),this._tip=re("div",t+"-tip",this._tipContainer),this.options.closeButton){var n=this._closeButton=re("a",t+"-close-button",e);n.href="#close",n.innerHTML="×",Ee(n,"click",this._onCloseButtonClick,this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var n=t.offsetHeight,o=this.options.maxHeight,s="leaflet-popup-scrolled";o&&o<n?(e.height=o+"px",_e(t,s)):de(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();ye(this._container,e.add(i))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var t=this._map,e=parseInt(se(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,o=new B(this._containerLeft,-i-this._containerBottom);o._add(xe(this._container));var s=t.layerPointToContainerPoint(o),r=I(this.options.autoPanPadding),a=I(this.options.autoPanPaddingTopLeft||r),h=I(this.options.autoPanPaddingBottomRight||r),u=t.getSize(),l=0,c=0;s.x+n+h.x>u.x&&(l=s.x+n-u.x+h.x),s.x-l-a.x<0&&(l=s.x-a.x),s.y+i+h.y>u.y&&(c=s.y+i-u.y+h.y),s.y-c-a.y<0&&(c=s.y-a.y),(l||c)&&t.fire("autopanstart").panBy([l,c])}},_onCloseButtonClick:function(t){this._close(),Ne(t)},_getAnchor:function(){return I(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Ye.mergeOptions({closePopupOnClick:!0}),Ye.include({openPopup:function(t,e,i){return t instanceof en||(t=new en(i).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),Mi.include({bindPopup:function(t,e){return t instanceof en?(p(t,e),(this._popup=t)._source=this):(this._popup&&!e||(this._popup=new en(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){return this._popup&&this._map&&(e=this._popup._prepareOpen(this,t,e),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;this._popup&&this._map&&(Ne(t),e instanceof Ai?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var nn=tn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){tn.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){tn.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=tn.prototype.getEvents.call(this);return Tt&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=re("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e=this._map,i=this._container,n=e.latLngToContainerPoint(e.getCenter()),o=e.layerPointToContainerPoint(t),s=this.options.direction,r=i.offsetWidth,a=i.offsetHeight,h=I(this.options.offset),u=this._getAnchor();t="top"===s?t.add(I(-r/2+h.x,-a+h.y+u.y,!0)):"bottom"===s?t.subtract(I(r/2-h.x,-h.y,!0)):"center"===s?t.subtract(I(r/2+h.x,a/2-u.y+h.y,!0)):"right"===s||"auto"===s&&o.x<n.x?(s="right",t.add(I(h.x+u.x,u.y-a/2+h.y,!0))):(s="left",t.subtract(I(r+u.x-h.x,a/2-u.y-h.y,!0))),de(i,"leaflet-tooltip-right"),de(i,"leaflet-tooltip-left"),de(i,"leaflet-tooltip-top"),de(i,"leaflet-tooltip-bottom"),_e(i,"leaflet-tooltip-"+s),ye(i,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&fe(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return I(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});Ye.include({openTooltip:function(t,e,i){return t instanceof nn||(t=new nn(i).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),Mi.include({bindTooltip:function(t,e){return t instanceof nn?(p(t,e),(this._tooltip=t)._source=this):(this._tooltip&&!e||(this._tooltip=new nn(e,this)),this._tooltip.setContent(t)),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(t){if(t||!this._tooltipHandlersAdded){var e=t?"off":"on",i={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?i.add=this._openTooltip:(i.mouseover=this._openTooltip,i.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(i.mousemove=this._moveTooltip),Tt&&(i.click=this._openTooltip)),this[e](i),this._tooltipHandlersAdded=!t}},openTooltip:function(t,e){return this._tooltip&&this._map&&(e=this._tooltip._prepareOpen(this,t,e),this._map.openTooltip(this._tooltip,e),this._tooltip.options.interactive&&this._tooltip._container&&(_e(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&&(de(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(t){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(t)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){var e=t.layer||t.target;this._tooltip&&this._map&&this.openTooltip(e,this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e,i,n=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),i=this._map.containerPointToLayerPoint(e),n=this._map.layerPointToLatLng(i)),this._tooltip.setLatLng(n)}});var on=Si.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),i=this.options;if(i.html instanceof Element?(he(e),e.appendChild(i.html)):e.innerHTML=!1!==i.html?i.html:"",i.bgPos){var n=I(i.bgPos);e.style.backgroundPosition=-n.x+"px "+-n.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});Si.Default=Zi;var sn=Mi.extend({options:{tileSize:256,opacity:1,updateWhenIdle:xt,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){p(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),ae(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(ue(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(le(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=o(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof B?t:new B(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,i=this.getPane().children,n=-t(-1/0,1/0),o=0,s=i.length;o<s;o++)e=i[o].style.zIndex,i[o]!==this._container&&e&&(n=t(n,+e));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!it){fe(this._container,this.options.opacity);var t=+new Date,e=!1,i=!1;for(var n in this._tiles){var o=this._tiles[n];if(o.current&&o.loaded){var s=Math.min(1,(t-o.loaded)/200);fe(o.el,s),s<1?e=!0:(o.active?i=!0:this._onOpaqueTile(o),o.active=!0)}}i&&!this._noPrune&&this._pruneTiles(),e&&(C(this._fadeFrame),this._fadeFrame=M(this._updateOpacity,this))}},_onOpaqueTile:a,_initContainer:function(){this._container||(this._container=re("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var i in this._levels)this._levels[i].el.children.length||i===t?(this._levels[i].el.style.zIndex=e-Math.abs(t-i),this._onUpdateLevel(i)):(ae(this._levels[i].el),this._removeTilesAtZoom(i),this._onRemoveLevel(i),delete this._levels[i]);var n=this._levels[t],o=this._map;return n||((n=this._levels[t]={}).el=re("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=e,n.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,o.getCenter(),o.getZoom()),n.el.offsetWidth,this._onCreateLevel(n)),this._level=n}},_onUpdateLevel:a,_onRemoveLevel:a,_onCreateLevel:a,_pruneTiles:function(){if(this._map){var t,e,i=this._map.getZoom();if(i>this.options.maxZoom||i<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).current&&!e.active){var n=e.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(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)ae(this._levels[t].el),this._onRemoveLevel(t),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,i,n){var o=Math.floor(t/2),s=Math.floor(e/2),r=i-1,a=new B(+o,+s);a.z=+r;var h=this._tileCoordsToKey(a),u=this._tiles[h];return u&&u.active?u.retain=!0:(u&&u.loaded&&(u.retain=!0),n<r&&this._retainParent(o,s,r,n))},_retainChildren:function(t,e,i,n){for(var o=2*t;o<2*t+2;o++)for(var s=2*e;s<2*e+2;s++){var r=new B(o,s);r.z=i+1;var a=this._tileCoordsToKey(r),h=this._tiles[a];h&&h.active?h.retain=!0:(h&&h.loaded&&(h.retain=!0),i+1<n&&this._retainChildren(o,s,i+1,n))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,i,n){var o=this._clampZoom(Math.round(e));(void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom)&&(o=void 0);var s=this.options.updateWhenZooming&&o!==this._tileZoom;n&&!s||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&this._update(t),i||this._pruneTiles(),this._noPrune=!!i),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var i in this._levels)this._setZoomTransform(this._levels[i],t,e)},_setZoomTransform:function(t,e,i){var n=this._map.getZoomScale(i,t.zoom),o=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(e,i)).round();yt?ve(t.el,o,n):ye(t.el,o)},_resetGrid:function(){var t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),n=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],n).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],n).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],n).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],n).y/i.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,i=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),n=e.getZoomScale(i,this._tileZoom),o=e.project(t,this._tileZoom).floor(),s=e.getSize().divideBy(2*n);return new O(o.subtract(s),o.add(s))},_update:function(t){var e=this._map;if(e){var i=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var n=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(n),s=o.getCenter(),r=[],a=this.options.keepBuffer,h=new O(o.getBottomLeft().subtract([a,-a]),o.getTopRight().add([a,-a]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var u in this._tiles){var l=this._tiles[u].coords;l.z===this._tileZoom&&h.contains(new B(l.x,l.y))||(this._tiles[u].current=!1)}if(1<Math.abs(i-this._tileZoom))this._setView(t,i);else{for(var c=o.min.y;c<=o.max.y;c++)for(var _=o.min.x;_<=o.max.x;_++){var d=new B(_,c);if(d.z=this._tileZoom,this._isValidTile(d)){var p=this._tiles[this._tileCoordsToKey(d)];p?p.current=!0:r.push(d)}}if(r.sort(function(t,e){return t.distanceTo(s)-e.distanceTo(s)}),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(_=0;_<r.length;_++)this._addTile(r[_],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var i=this._globalTileRange;if(!e.wrapLng&&(t.x<i.min.x||t.x>i.max.x)||!e.wrapLat&&(t.y<i.min.y||t.y>i.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return D(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),o=n.add(i);return[e.unproject(n,t.z),e.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new N(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new B(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(ae(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){_e(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=a,t.onmousemove=a,it&&this.options.opacity<1&&fe(t,this.options.opacity),st&&!rt&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),u(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&M(u(this._tileReady,this,t,null,o)),ye(o,i),this._tiles[n]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);(i=this._tiles[n])&&(i.loaded=+new Date,this._map._fadeAnimated?(fe(i.el,0),C(this._fadeFrame),this._fadeFrame=M(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(_e(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),it||!this._map._fadeAnimated?M(this._pruneTiles,this):setTimeout(u(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new B(this._wrapX?r(t.x,this._wrapX):t.x,this._wrapY?r(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new O(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),rn=sn.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,(e=p(this,e)).detectRetina&&Ct&&0<e.maxZoom&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),st||this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var i=document.createElement("img");return Ee(i,"load",u(this._tileOnLoad,this,e,i)),Ee(i,"error",u(this._tileOnError,this,e,i)),!this.options.crossOrigin&&""!==this.options.crossOrigin||(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),i.alt="",i.setAttribute("role","presentation"),i.src=this.getTileUrl(t),i},getTileUrl:function(t){var e={r:Ct?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return g(this._url,h(e,this.options))},_tileOnLoad:function(t,e){it?setTimeout(u(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=a,e.onerror=a,e.complete||(e.src=x,ae(e),delete this._tiles[t]))},_removeTile:function(t){var e=this._tiles[t];if(e)return ht||e.el.setAttribute("src",x),sn.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(this._map&&(!i||i.getAttribute("src")!==x))return sn.prototype._tileReady.call(this,t,e,i)}});function an(t,e){return new rn(t,e)}var hn=rn.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i=h({},this.defaultWmsParams);for(var n in e)n in this.options||(i[n]=e[n]);var o=(e=p(this,e)).detectRetina&&Ct?2:1,s=this.getTileSize();i.width=s.x*o,i.height=s.y*o,this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=1.3<=this._wmsVersion?"crs":"srs";this.wmsParams[e]=this._crs.code,rn.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,n=R(i.project(e[0]),i.project(e[1])),o=n.min,s=n.max,r=(1.3<=this._wmsVersion&&this._crs===Ti?[o.y,o.x,s.y,s.x]:[o.x,o.y,s.x,s.y]).join(","),a=rn.prototype.getTileUrl.call(this,t);return a+m(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,e){return h(this.wmsParams,t),e||this.redraw(),this}});rn.WMS=hn,an.wms=function(t,e){return new hn(t,e)};var un=Mi.extend({options:{padding:.1,tolerance:0},initialize:function(t){p(this,t),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&_e(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var i=this._map.getZoomScale(e,this._zoom),n=xe(this._container),o=this._map.getSize().multiplyBy(.5+this.options.padding),s=this._map.project(this._center,e),r=this._map.project(t,e).subtract(s),a=o.multiplyBy(-i).add(n).add(o).subtract(r);yt?ve(this._container,a,i):ye(this._container,a)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new O(i,i.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),ln=un.extend({getEvents:function(){var t=un.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){un.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Ee(t,"mousemove",this._onMouseMove,this),Ee(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ee(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){C(this._redrawRequest),delete this._ctx,ae(this._container),Ze(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){un.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=Ct?2:1;ye(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",Ct&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){un.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t);var e=(this._layers[l(t)]=t)._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,n=e.prev;i?i.prev=n:this._drawLast=n,n?n.next=i:this._drawFirst=i,delete t._order,delete this._layers[l(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var e,i,n=t.options.dashArray.split(/[, ]+/),o=[];for(i=0;i<n.length;i++){if(e=Number(n[i]),isNaN(e))return;o.push(e)}t.options._dashArray=o}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||M(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new O,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_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 t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.clearRect(0,0,this._container.width,this._container.height)},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var i=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,i.x,i.y),this._ctx.clip()}this._drawing=!0;for(var n=this._drawFirst;n;n=n.next)t=n.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var i,n,o,s,r=t._parts,a=r.length,h=this._ctx;if(a){for(h.beginPath(),i=0;i<a;i++){for(n=0,o=r[i].length;n<o;n++)s=r[i][n],h[n?"lineTo":"moveTo"](s.x,s.y);e&&h.closePath()}this._fillStroke(h,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,i=this._ctx,n=Math.max(Math.round(t._radius),1),o=(Math.max(Math.round(t._radiusY),1)||n)/n;1!=o&&(i.save(),i.scale(1,o)),i.beginPath(),i.arc(e.x,e.y/o,n,0,2*Math.PI,!1),1!=o&&i.restore(),this._fillStroke(i,t)}},_fillStroke:function(t,e){var i=e.options;i.fill&&(t.globalAlpha=i.fillOpacity,t.fillStyle=i.fillColor||i.color,t.fill(i.fillRule||"evenodd")),i.stroke&&0!==i.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=i.opacity,t.lineWidth=i.weight,t.strokeStyle=i.color,t.lineCap=i.lineCap,t.lineJoin=i.lineJoin,t.stroke())},_onClick:function(t){for(var e,i,n=this._map.mouseEventToLayerPoint(t),o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(n)&&!this._map._draggableMoved(e)&&(i=e);i&&(Ue(t),this._fireEvent([i],t))},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(de(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var i,n,o=this._drawFirst;o;o=o.next)(i=o.layer).options.interactive&&i._containsPoint(e)&&(n=i);n!==this._hoveredLayer&&(this._handleMouseOut(t),n&&(_e(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(L.bind(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(t,e,i){this._map._fireDOMEvent(e,i||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var i=e.next,n=e.prev;i&&((i.prev=n)?n.next=i:i&&(this._drawFirst=i),e.prev=this._drawLast,(this._drawLast.next=e).next=null,this._drawLast=e,this._requestRedraw(t))}},_bringToBack:function(t){var e=t._order;if(e){var i=e.next,n=e.prev;n&&((n.next=i)?i.prev=n:n&&(this._drawLast=n),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function cn(t){return St?new ln(t):null}var _n=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),dn={_initContainer:function(){this._container=re("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(un.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=_n("shape");_e(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=_n("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[l(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;ae(e),t.removeInteractiveTarget(e),delete this._layers[l(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(e||(e=t._stroke=_n("stroke")),o.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=v(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(o.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=_n("fill")),o.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(o.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){ue(t._container)},_bringToBack:function(t){le(t._container)}},pn=kt?_n:$,mn=un.extend({getEvents:function(){var t=un.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=pn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=pn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ae(this._container),Ze(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){un.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),ye(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=pn("path");t.options.className&&_e(e,t.options.className),t.options.interactive&&_e(e,"leaflet-interactive"),this._updateStyle(t),this._layers[l(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ae(t._path),t.removeInteractiveTarget(t._path),delete this._layers[l(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,Q(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n="a"+i+","+(Math.max(Math.round(t._radiusY),1)||i)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+n+2*i+",0 "+n+2*-i+",0 ";this._setPath(t,o)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){ue(t._path)},_bringToBack:function(t){le(t._path)}});function fn(t){return Zt||kt?new mn(t):null}kt&&mn.include(dn),Ye.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&cn(t)||fn(t)}});var gn=Ni.extend({initialize:function(t,e){Ni.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=D(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});mn.create=pn,mn.pointsToPath=Q,Di.geometryToLayer=ji,Di.coordsToLatLng=Hi,Di.coordsToLatLngs=Fi,Di.latLngToCoords=Ui,Di.latLngsToCoords=Vi,Di.getFeature=qi,Di.asFeature=Gi,Ye.mergeOptions({boxZoom:!0});var vn=ii.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){Ee(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ze(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ae(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Xt(),Pe(),this._startPoint=this._map.mouseEventToContainerPoint(t),Ee(document,{contextmenu:Ne,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=re("div","leaflet-zoom-box",this._container),_e(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new O(this._point,this._startPoint),i=e.getSize();ye(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(ae(this._box),de(this._container,"leaflet-crosshair")),Jt(),Le(),Ze(document,{contextmenu:Ne,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(u(this._resetState,this),0);var e=new N(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});Ye.addInitHook("addHandler","boxZoom",vn),Ye.mergeOptions({doubleClickZoom:!0});var yn=ii.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,o=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});Ye.addInitHook("addHandler","doubleClickZoom",yn),Ye.mergeOptions({dragging:!0,inertia:!rt,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var xn=ii.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new hi(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}_e(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){de(this._map._container,"leaflet-grab"),de(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},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=D(this._map.options.maxBounds);this._offsetLimit=R(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;1<this._positions.length&&50<t-this._times[0];)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i,r=Math.abs(o+i)<Math.abs(s+i)?o:s;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=r},_onDragEnd:function(t){var e=this._map,i=e.options,n=!i.inertia||this._times.length<2;if(e.fire("dragend",t),n)e.fire("moveend");else{this._prunePositions(+new Date);var o=this._lastPos.subtract(this._positions[0]),s=(this._lastTime-this._times[0])/1e3,r=i.easeLinearity,a=o.multiplyBy(r/s),h=a.distanceTo([0,0]),u=Math.min(i.inertiaMaxSpeed,h),l=a.multiplyBy(u/h),c=u/(i.inertiaDeceleration*r),_=l.multiplyBy(-c/2).round();_.x||_.y?(_=e._limitOffset(_,e.options.maxBounds),M(function(){e.panBy(_,{duration:c,easeLinearity:r,noMoveStart:!0,animate:!0})})):e.fire("moveend")}}});Ye.addInitHook("addHandler","dragging",xn),Ye.mergeOptions({keyboard:!0,keyboardPanDelta:80});var wn=ii.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),Ee(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Ze(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 t=document.body,e=document.documentElement,i=t.scrollTop||e.scrollTop,n=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(n,i)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,i,n=this._panKeys={},o=this.keyCodes;for(e=0,i=o.left.length;e<i;e++)n[o.left[e]]=[-1*t,0];for(e=0,i=o.right.length;e<i;e++)n[o.right[e]]=[t,0];for(e=0,i=o.down.length;e<i;e++)n[o.down[e]]=[0,t];for(e=0,i=o.up.length;e<i;e++)n[o.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,i,n=this._zoomKeys={},o=this.keyCodes;for(e=0,i=o.zoomIn.length;e<i;e++)n[o.zoomIn[e]]=t;for(e=0,i=o.zoomOut.length;e<i;e++)n[o.zoomOut[e]]=-t},_addHooks:function(){Ee(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Ze(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,i=t.keyCode,n=this._map;if(i in this._panKeys)n._panAnim&&n._panAnim._inProgress||(e=this._panKeys[i],t.shiftKey&&(e=I(e).multiplyBy(3)),n.panBy(e),n.options.maxBounds&&n.panInsideBounds(n.options.maxBounds));else if(i in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[i]);else{if(27!==i||!n._popup||!n._popup.options.closeOnEscapeKey)return;n.closePopup()}Ne(t)}}});Ye.addInitHook("addHandler","keyboard",wn),Ye.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var Pn=ii.extend({addHooks:function(){Ee(this._map._container,"mousewheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Ze(this._map._container,"mousewheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=We(t),i=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var n=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(u(this._performZoom,this),n),Ne(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap||0;t._stop();var n=this._delta/(4*this._map.options.wheelPxPerZoomLevel),o=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,s=i?Math.ceil(o/i)*i:o,r=t._limitZoom(e+(0<this._delta?s:-s))-e;this._delta=0,this._startTime=null,r&&("center"===t.options.scrollWheelZoom?t.setZoom(e+r):t.setZoomAround(this._lastMousePos,e+r))}});Ye.addInitHook("addHandler","scrollWheelZoom",Pn),Ye.mergeOptions({tap:!0,tapTolerance:15});var Ln=ii.extend({addHooks:function(){Ee(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Ze(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(Re(t),this._fireClick=!0,1<t.touches.length)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],i=e.target;this._startPos=this._newPos=new B(e.clientX,e.clientY),i.tagName&&"a"===i.tagName.toLowerCase()&&_e(i,"leaflet-active"),this._holdTimeout=setTimeout(u(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))},this),1e3),this._simulateEvent("mousedown",e),Ee(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),Ze(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],i=e.target;i&&i.tagName&&"a"===i.tagName.toLowerCase()&&de(i,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new B(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var i=document.createEvent("MouseEvents");i._simulated=!0,e.target._simulatedClick=!0,i.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(i)}});Tt&&!bt&&Ye.addInitHook("addHandler","tap",Ln),Ye.mergeOptions({touchZoom:Tt&&!rt,bounceAtZoomLimits:!0});var bn=ii.extend({addHooks:function(){_e(this._map._container,"leaflet-touch-zoom"),Ee(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){de(this._map._container,"leaflet-touch-zoom"),Ze(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(i.add(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),Ee(document,"touchmove",this._onTouchMove,this),Ee(document,"touchend",this._onTouchEnd,this),Re(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),o=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMin
vendor: 4,188 bytes, lines 12-13
12Zoom()&&o<1||this._zoom>e.getMaxZoom()&&1<o)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1==o)return}else{var s=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(1==o&&0===s.x&&0===s.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),C(this._animRequest);var r=u(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=M(r,this,!0),Re(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,C(this._animRequest),Ze(document,"touchmove",this._onTouchMove),Ze(document,"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))):this._zooming=!1}});Ye.addInitHook("addHandler","touchZoom",bn),Ye.BoxZoom=vn,Ye.DoubleClickZoom=yn,Ye.Drag=xn,Ye.Keyboard=wn,Ye.ScrollWheelZoom=Pn,Ye.Tap=Ln,Ye.TouchZoom=bn,Object.freeze=e,t.version="1.6.0+HEAD.0c81bdf",t.Control=Je,t.control=Xe,t.Browser=At,t.Evented=k,t.Mixin=oi,t.Util=E,t.Class=S,t.Handler=ii,t.extend=h,t.bind=u,t.stamp=l,t.setOptions=p,t.DomEvent=Ge,t.DomUtil=Ce,t.PosAnimation=Ke,t.Draggable=hi,t.LineUtil=gi,t.PolyUtil=xi,t.Point=B,t.point=I,t.Bounds=O,t.bounds=R,t.Transformation=G,t.transformation=K,t.Projection=Li,t.LatLng=j,t.latLng=W,t.LatLngBounds=N,t.latLngBounds=D,t.CRS=F,t.GeoJSON=Di,t.geoJSON=Yi,t.geoJson=Xi,t.Layer=Mi,t.LayerGroup=Ci,t.layerGroup=function(t,e){return new Ci(t,e)},t.FeatureGroup=Ei,t.featureGroup=function(t){return new Ei(t)},t.ImageOverlay=Ji,t.imageOverlay=function(t,e,i){return new Ji(t,e,i)},t.VideoOverlay=$i,t.videoOverlay=function(t,e,i){return new $i(t,e,i)},t.SVGOverlay=Qi,t.svgOverlay=function(t,e,i){return new Qi(t,e,i)},t.DivOverlay=tn,t.Popup=en,t.popup=function(t,e){return new en(t,e)},t.Tooltip=nn,t.tooltip=function(t,e){return new nn(t,e)},t.Icon=Si,t.icon=function(t){return new Si(t)},t.DivIcon=on,t.divIcon=function(t){return new on(t)},t.Marker=Bi,t.marker=function(t,e){return new Bi(t,e)},t.TileLayer=rn,t.tileLayer=an,t.GridLayer=sn,t.gridLayer=function(t){return new sn(t)},t.SVG=mn,t.svg=fn,t.Renderer=un,t.Canvas=ln,t.canvas=cn,t.Path=Ai,t.CircleMarker=Ii,t.circleMarker=function(t,e){return new Ii(t,e)},t.Circle=Oi,t.circle=function(t,e,i){return new Oi(t,e,i)},t.Polyline=Ri,t.polyline=function(t,e){return new Ri(t,e)},t.Polygon=Ni,t.polygon=function(t,e){return new Ni(t,e)},t.Rectangle=gn,t.rectangle=function(t,e){return new gn(t,e)},t.Map=Ye,t.map=function(t,e){return new Ye(t,e)};var Tn=window.L;t.noConflict=function(){return window.L=Tn,this},window.L=t}); 13!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Leaflet=e.Leaflet||{},e.Leaflet.markercluster=e.Leaflet.markercluster||{}))}(this,function(e){"use strict";var t=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(e){L.Util.setOptions(this,e),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var t=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,t?this._withAnimation:this._noAnimation),this._markerCluster
vendor: 29,498 bytes, line 13
13=t?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(e){if(e instanceof L.LayerGroup)return this.addLayers([e]);if(!e.getLatLng)return this._nonPointGroup.addLayer(e),this.fire("layeradd",{layer:e}),this;if(!this._map)return this._needsClustering.push(e),this.fire("layeradd",{layer:e}),this;if(this.hasLayer(e))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(e,this._maxZoom),this.fire("layeradd",{layer:e}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var t=e,i=this._zoom;if(e.__parent)for(;t.__parent._zoom>=i;)t=t.__parent;return this._currentShownBounds.contains(t.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(e,t):this._animationAddLayerNonAnimated(e,t)),this},removeLayer:function(e){return e instanceof L.LayerGroup?this.removeLayers([e]):(e.getLatLng?this._map?e.__parent&&(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(e)),this._removeLayer(e,!0),this.fire("layerremove",{layer:e}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),e.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(e)&&(this._featureGroup.removeLayer(e),e.clusterShow&&e.clusterShow())):(!this._arraySplice(this._needsClustering,e)&&this.hasLayer(e)&&this._needsRemoving.push({layer:e,latlng:e._latlng}),this.fire("layerremove",{layer:e})):(this._nonPointGroup.removeLayer(e),this.fire("layerremove",{layer:e})),this)},addLayers:function(r,s){if(!L.Util.isArray(r))return this.addLayer(r);var o,a=this._featureGroup,h=this._nonPointGroup,l=this.options.chunkedLoading,u=this.options.chunkInterval,_=this.options.chunkProgress,d=r.length,c=0,p=!0;if(this._map){var f=(new Date).getTime(),m=L.bind(function(){for(var e=(new Date).getTime();c<d;c++){if(l&&0==c%200){var t=(new Date).getTime()-e;if(u<t)break}if((o=r[c])instanceof L.LayerGroup)p&&(r=r.slice(),p=!1),this._extractNonGroupLayers(o,r),d=r.length;else if(o.getLatLng){if(!this.hasLayer(o)&&(this._addLayer(o,this._maxZoom),s||this.fire("layeradd",{layer:o}),o.__parent&&2===o.__parent.getChildCount())){var i=o.__parent.getAllChildMarkers(),n=i[0]===o?i[1]:i[0];a.removeLayer(n)}}else h.addLayer(o),s||this.fire("layeradd",{layer:o})}_&&_(c,d,(new Date).getTime()-f),c===d?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(m,this.options.chunkDelay)},this);m()}else for(var e=this._needsClustering;c<d;c++)(o=r[c])instanceof L.LayerGroup?(p&&(r=r.slice(),p=!1),this._extractNonGroupLayers(o,r),d=r.length):o.getLatLng?this.hasLayer(o)||e.push(o):h.addLayer(o);return this},removeLayers:function(e){var t,i,n=e.length,r=this._featureGroup,s=this._nonPointGroup,o=!0;if(!this._map){for(t=0;t<n;t++)(i=e[t])instanceof L.LayerGroup?(o&&(e=e.slice(),o=!1),this._extractNonGroupLayers(i,e),n=e.length):(this._arraySplice(this._needsClustering,i),s.removeLayer(i),this.hasLayer(i)&&this._needsRemoving.push({layer:i,latlng:i._latlng}),this.fire("layerremove",{layer:i}));return this}if(this._unspiderfy){this._unspiderfy();var a=e.slice(),h=n;for(t=0;t<h;t++)(i=a[t])instanceof L.LayerGroup?(this._extractNonGroupLayers(i,a),h=a.length):this._unspiderfyLayer(i)}for(t=0;t<n;t++)(i=e[t])instanceof L.LayerGroup?(o&&(e=e.slice(),o=!1),this._extractNonGroupLayers(i,e),n=e.length):i.__parent?(this._removeLayer(i,!0,!0),this.fire("layerremove",{layer:i}),r.hasLayer(i)&&(r.removeLayer(i),i.clusterShow&&i.clusterShow())):(s.removeLayer(i),this.fire("layerremove",{layer:i}));return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],this._needsRemoving=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(e){e.off(this._childMarkerEventHandlers,this),delete e.__parent},this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var e=new L.LatLngBounds;this._topClusterLevel&&e.extend(this._topClusterLevel._bounds);for(var t=this._needsClustering.length-1;0<=t;t--)e.extend(this._needsClustering[t].getLatLng());return e.extend(this._nonPointGroup.getBounds()),e},eachLayer:function(e,t){var i,n,r,s=this._needsClustering.slice(),o=this._needsRemoving;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(s),n=s.length-1;0<=n;n--){for(i=!0,r=o.length-1;0<=r;r--)if(o[r].layer===s[n]){i=!1;break}i&&e.call(t,s[n])}this._nonPointGroup.eachLayer(e,t)},getLayers:function(){var t=[];return this.eachLayer(function(e){t.push(e)}),t},getLayer:function(t){var i=null;return t=parseInt(t,10),this.eachLayer(function(e){L.stamp(e)===t&&(i=e)}),i},hasLayer:function(e){if(!e)return!1;var t,i=this._needsClustering;for(t=i.length-1;0<=t;t--)if(i[t]===e)return!0;for(t=(i=this._needsRemoving).length-1;0<=t;t--)if(i[t].layer===e)return!1;return!(!e.__parent||e.__parent._group!==this)||this._nonPointGroup.hasLayer(e)},zoomToShowLayer:function(e,t){"function"!=typeof t&&(t=function(){});var i=function(){!e._icon&&!e.__parent._icon||this._inZoomAnimation||(this._map.off("moveend",i,this),this.off("animationend",i,this),e._icon?t():e.__parent._icon&&(this.once("spiderfied",t,this),e.__parent.spiderfy()))};e._icon&&this._map.getBounds().contains(e.getLatLng())?t():e.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",i,this),this._map.panTo(e.getLatLng())):(this._map.on("moveend",i,this),this.on("animationend",i,this),e.__parent.zoomToBounds())},onAdd:function(e){var t,i,n;if(this._map=e,!isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.addTo(e),this._nonPointGroup.addTo(e),this._gridClusters||this._generateInitialClusters(),this._maxLat=e.options.crs.projection.MAX_LATITUDE,t=0,i=this._needsRemoving.length;t<i;t++)(n=this._needsRemoving[t]).newlatlng=n.layer._latlng,n.layer._latlng=n.latlng;for(t=0,i=this._needsRemoving.length;t<i;t++)n=this._needsRemoving[t],this._removeLayer(n.layer,!0),n.layer._latlng=n.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),i=this._needsClustering,this._needsClustering=[],this.addLayers(i,!0)},onRemove:function(e){e.off("zoomend",this._zoomEnd,this),e.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(e){for(var t=e;t&&!t._icon;)t=t.__parent;return t||null},_arraySplice:function(e,t){for(var i=e.length-1;0<=i;i--)if(e[i]===t)return e.splice(i,1),!0},_removeFromGridUnclustered:function(e,t){for(var i=this._map,n=this._gridUnclustered,r=Math.floor(this._map.getMinZoom());r<=t&&n[t].removeObject(e,i.project(e.getLatLng(),t));t--);},_childMarkerDragStart:function(e){e.target.__dragStart=e.target._latlng},_childMarkerMoved:function(e){if(!this._ignoreMove&&!e.target.__dragStart){var t=e.target._popup&&e.target._popup.isOpen();this._moveChild(e.target,e.oldLatLng,e.latlng),t&&e.target.openPopup()}},_moveChild:function(e,t,i){e._latlng=t,this.removeLayer(e),e._latlng=i,this.addLayer(e)},_childMarkerDragEnd:function(e){var t=e.target.__dragStart;delete e.target.__dragStart,t&&this._moveChild(e.target,t,e.target._latlng)},_removeLayer:function(e,t,i){var n=this._gridClusters,r=this._gridUnclustered,s=this._featureGroup,o=this._map,a=Math.floor(this._map.getMinZoom());t&&this._removeFromGridUnclustered(e,this._maxZoom);var h,l=e.__parent,u=l._markers;for(this._arraySplice(u,e);l&&(l._childCount--,l._boundsNeedUpdate=!0,!(l._zoom<a));)t&&l._childCount<=1?(h=l._markers[0]===e?l._markers[1]:l._markers[0],n[l._zoom].removeObject(l,o.project(l._cLatLng,l._zoom)),r[l._zoom].addObject(h,o.project(h.getLatLng(),l._zoom)),this._arraySplice(l.__parent._childClusters,l),l.__parent._markers.push(h),h.__parent=l.__parent,l._icon&&(s.removeLayer(l),i||s.addLayer(h))):l._iconNeedsUpdate=!0,l=l.__parent;delete e.__parent},_isOrIsParent:function(e,t){for(;t;){if(e===t)return!0;t=t.parentNode}return!1},fire:function(e,t,i){if(t&&t.layer instanceof L.MarkerCluster){if(t.originalEvent&&this._isOrIsParent(t.layer._icon,t.originalEvent.relatedTarget))return;e="cluster"+e}L.FeatureGroup.prototype.fire.call(this,e,t,i)},listens:function(e,t){return L.FeatureGroup.prototype.listens.call(this,e,t)||L.FeatureGroup.prototype.listens.call(this,"cluster"+e,t)},_defaultIconCreateFunction:function(e){var t=e.getChildCount(),i=" marker-cluster-";return i+=t<10?"small":t<100?"medium":"large",new L.DivIcon({html:"<div><span>"+t+"</span></div>",className:"marker-cluster"+i,iconSize:new L.Point(40,40)})},_bindEvents:function(){var e=this._map,t=this.options.spiderfyOnMaxZoom,i=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick;(t||n)&&this.on("clusterclick",this._zoomOrSpiderfy,this),i&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),e.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(e){for(var t=e.layer,i=t;1===i._childClusters.length;)i=i._childClusters[0];i._zoom===this._maxZoom&&i._childCount===t._childCount&&this.options.spiderfyOnMaxZoom?t.spiderfy():this.options.zoomToBoundsOnClick&&t.zoomToBounds(),e.originalEvent&&13===e.originalEvent.keyCode&&this._map._container.focus()},_showCoverage:function(e){var t=this._map;this._inZoomAnimation||(this._shownPolygon&&t.removeLayer(this._shownPolygon),2<e.layer.getChildCount()&&e.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(e.layer.getConvexHull(),this.options.polygonOptions),t.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var e=this.options.spiderfyOnMaxZoom,t=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,n=this._map;(e||i)&&this.off("clusterclick",this._zoomOrSpiderfy,this),t&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),n.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var e=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),e),this._currentShownBounds=e}},_generateInitialClusters:function(){var e=Math.ceil(this._map.getMaxZoom()),t=Math.floor(this._map.getMinZoom()),i=this.options.maxClusterRadius,n=i;"function"!=typeof i&&(n=function(){return i}),null!==this.options.disableClusteringAtZoom&&(e=this.options.disableClusteringAtZoom-1),this._maxZoom=e,this._gridClusters={},this._gridUnclustered={};for(var r=e;t<=r;r--)this._gridClusters[r]=new L.DistanceGrid(n(r)),this._gridUnclustered[r]=new L.DistanceGrid(n(r));this._topClusterLevel=new this._markerCluster(this,t-1)},_addLayer:function(e,t){var i,n,r=this._gridClusters,s=this._gridUnclustered,o=Math.floor(this._map.getMinZoom());for(this.options.singleMarkerMode&&this._overrideMarkerIcon(e),e.on(this._childMarkerEventHandlers,this);o<=t;t--){i=this._map.project(e.getLatLng(),t);var a=r[t].getNearObject(i);if(a)return a._addChild(e),void(e.__parent=a);if(a=s[t].getNearObject(i)){var h=a.__parent;h&&this._removeLayer(a,!1);var l=new this._markerCluster(this,t,a,e);r[t].addObject(l,this._map.project(l._cLatLng,t)),a.__parent=l;var u=e.__parent=l;for(n=t-1;n>h._zoom;n--)u=new this._markerCluster(this,n,u),r[n].addObject(u,this._map.project(a.getLatLng(),n));return h._addChild(u),void this._removeFromGridUnclustered(a,t)}s[t].addObject(e,i)}this._topClusterLevel._addChild(e),e.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(function(e){e instanceof L.MarkerCluster&&e._iconNeedsUpdate&&e._updateIcon()})},_enqueue:function(e){this._queue.push(e),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var e=0;e<this._queue.length;e++)this._queue[e].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var e=Math.round(this._map._zoom);this._processQueue(),this._zoom<e&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,e)):this._zoom>e?(this._animationStart(),this._animationZoomOut(this._zoom,e)):this._moveEnd()},_getExpandedVisibleBounds:function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},_checkBoundsMaxLat:function(e){var t=this._maxLat;return void 0!==t&&(e.getNorth()>=t&&(e._northEast.lat=1/0),e.getSouth()<=-t&&(e._southWest.lat=-1/0)),e},_animationAddLayerNonAnimated:function(e,t){if(t===e)this._featureGroup.addLayer(e);else if(2===t._childCount){t._addToMap();var i=t.getAllChildMarkers();this._featureGroup.removeLayer(i[0]),this._featureGroup.removeLayer(i[1])}else t._updateIcon()},_extractNonGroupLayers:function(e,t){var i,n=e.getLayers(),r=0;for(t=t||[];r<n.length;r++)(i=n[r])instanceof L.LayerGroup?this._extractNonGroupLayers(i,t):t.push(i);return t},_overrideMarkerIcon:function(e){return e.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[e]}})}});L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(e,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),e),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(e,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),e),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(e,t){this._animationAddLayerNonAnimated(e,t)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(r,s){var o,a=this._getExpandedVisibleBounds(),h=this._featureGroup,e=Math.floor(this._map.getMinZoom());this._ignoreMove=!0,this._topClusterLevel._recursively(a,r,e,function(e){var t,i=e._latlng,n=e._markers;for(a.contains(i)||(i=null),e._isSingleParent()&&r+1===s?(h.removeLayer(e),e._recursivelyAddChildrenToMap(null,s,a)):(e.clusterHide(),e._recursivelyAddChildrenToMap(i,s,a)),o=n.length-1;0<=o;o--)t=n[o],a.contains(t._latlng)||h.removeLayer(t)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(a,s),h.eachLayer(function(e){e instanceof L.MarkerCluster||!e._icon||e.clusterShow()}),this._topClusterLevel._recursively(a,r,s,function(e){e._recursivelyRestoreChildPositions(s)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(a,r,e,function(e){h.removeLayer(e),e.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(e,t){this._animationZoomOutSingle(this._topClusterLevel,e-1,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),e,this._getExpandedVisibleBounds())},_animationAddLayer:function(e,t){var i=this,n=this._featureGroup;n.addLayer(e),t!==e&&(2<t._childCount?(t._updateIcon(),this._forceLayout(),this._animationStart(),e._setPos(this._map.latLngToLayerPoint(t.getLatLng())),e.clusterHide(),this._enqueue(function(){n.removeLayer(e),e.clusterShow(),i._animationEnd()})):(this._forceLayout(),i._animationStart(),i._animationZoomOutSingle(t,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(t,i,n){var r=this._getExpandedVisibleBounds(),s=Math.floor(this._map.getMinZoom());t._recursivelyAnimateChildrenInAndAddSelfToMap(r,s,i+1,n);var o=this;this._forceLayout(),t._recursivelyBecomeVisible(r,n),this._enqueue(function(){if(1===t._childCount){var e=t._markers[0];this._ignoreMove=!0,e.setLatLng(e.getLatLng()),this._ignoreMove=!1,e.clusterShow&&e.clusterShow()}else t._recursively(r,n,s,function(e){e._recursivelyRemoveChildrenFromMap(r,s,i+1)});o._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(e){return new L.MarkerClusterGroup(e)};var i=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(e,t,i,n){L.Marker.prototype.initialize.call(this,i?i._cLatLng||i.getLatLng():new L.LatLng(0,0),{icon:this,pane:e.options.clusterPane}),this._group=e,this._zoom=t,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,i&&this._addChild(i),n&&this._addChild(n)},getAllChildMarkers:function(e,t){e=e||[];for(var i=this._childClusters.length-1;0<=i;i--)this._childClusters[i].getAllChildMarkers(e);for(var n=this._markers.length-1;0<=n;n--)t&&this._markers[n].__dragStart||e.push(this._markers[n]);return e},getChildCount:function(){return this._childCount},zoomToBounds:function(e){for(var t,i=this._childClusters.slice(),n=this._group._map,r=n.getBoundsZoom(this._bounds),s=this._zoom+1,o=n.getZoom();0<i.length&&s<r;){s++;var a=[];for(t=0;t<i.length;t++)a=a.concat(i[t]._childClusters);i=a}s<r?this._group._map.setView(this._latlng,s):r<=o?this._group._map.setView(this._latlng,o+1):this._group._map.fitBounds(this._bounds,e)},getBounds:function(){var e=new L.LatLngBounds;return e.extend(this._bounds),e},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(e,t){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(e),e instanceof L.MarkerCluster?(t||(this._childClusters.push(e),e.__parent=this),this._childCount+=e._childCount):(t||this._markers.push(e),this._childCount++),this.__parent&&this.__parent._addChild(e,!0)},_setClusterCenter:function(e){this._cLatLng||(this._cLatLng=e._cLatLng||e._latlng)},_resetBounds:function(){var e=this._bounds;e._southWest&&(e._southWest.lat=1/0,e._southWest.lng=1/0),e._northEast&&(e._northEast.lat=-1/0,e._northEast.lng=-1/0)},_recalculateBounds:function(){var e,t,i,n,r=this._markers,s=this._childClusters,o=0,a=0,h=this._childCount;if(0!==h){for(this._resetBounds(),e=0;e<r.length;e++)i=r[e]._latlng,this._bounds.extend(i),o+=i.lat,a+=i.lng;for(e=0;e<s.length;e++)(t=s[e])._boundsNeedUpdate&&t._recalculateBounds(),this._bounds.extend(t._bounds),i=t._wLatLng,n=t._childCount,o+=i.lat*n,a+=i.lng*n;this._latlng=this._wLatLng=new L.LatLng(o/h,a/h),this._boundsNeedUpdate=!1}},_addToMap:function(e){e&&(this._backupLatlng=this._latlng,this.setLatLng(e)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(e,r,t){this._recursively(e,this._group._map.getMinZoom(),t-1,function(e){var t,i,n=e._markers;for(t=n.length-1;0<=t;t--)(i=n[t])._icon&&(i._setPos(r),i.clusterHide())},function(e){var t,i,n=e._childClusters;for(t=n.length-1;0<=t;t--)(i=n[t])._icon&&(i._setPos(r),i.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(t,i,n,r){this._recursively(t,r,i,function(e){e._recursivelyAnimateChildrenIn(t,e._group._map.latLngToLayerPoint(e.getLatLng()).round(),n),e._isSingleParent()&&n-1===r?(e.clusterShow(),e._recursivelyRemoveChildrenFromMap(t,i,n)):e.clusterHide(),e._addToMap()})},_recursivelyBecomeVisible:function(e,t){this._recursively(e,this._group._map.getMinZoom(),t,null,function(e){e.clusterShow()})},_recursivelyAddChildrenToMap:function(n,r,s){this._recursively(s,this._group._map.getMinZoom()-1,r,function(e){if(r!==e._zoom)for(var t=e._markers.length-1;0<=t;t--){var i=e._markers[t];s.contains(i._latlng)&&(n&&(i._backupLatlng=i.getLatLng(),i.setLatLng(n),i.clusterHide&&i.clusterHide()),e._group._featureGroup.addLayer(i))}},function(e){e._addToMap(n)})},_recursivelyRestoreChildPositions:function(e){for(var t=this._markers.length-1;0<=t;t--){var i=this._markers[t];i._backupLatlng&&(i.setLatLng(i._backupLatlng),delete i._backupLatlng)}if(e-1===this._zoom)for(var n=this._childClusters.length-1;0<=n;n--)this._childClusters[n]._restorePosition();else for(var r=this._childClusters.length-1;0<=r;r--)this._childClusters[r]._recursivelyRestoreChildPositions(e)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(e,t,i,n){var r,s;this._recursively(e,t-1,i-1,function(e){for(s=e._markers.length-1;0<=s;s--)r=e._markers[s],n&&n.contains(r._latlng)||(e._group._featureGroup.removeLayer(r),r.clusterShow&&r.clusterShow())},function(e){for(s=e._childClusters.length-1;0<=s;s--)r=e._childClusters[s],n&&n.contains(r._latlng)||(e._group._featureGroup.removeLayer(r),r.clusterShow&&r.clusterShow())})},_recursively:function(e,t,i,n,r){var s,o,a=this._childClusters,h=this._zoom;if(t<=h&&(n&&n(this),r&&h===i&&r(this)),h<t||h<i)for(s=a.length-1;0<=s;s--)(o=a[s])._boundsNeedUpdate&&o._recalculateBounds(),e.intersects(o._bounds)&&o._recursively(e,t,i,n,r)},_isSingleParent:function(){return 0<this._childClusters.length&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var e=this.options.opacity;return this.setOpacity(0),this.options.opacity=e,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(e){this._cellSize=e,this._sqCellSize=e*e,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(e,t){var i=this._getCoord(t.x),n=this._getCoord(t.y),r=this._grid,s=r[n]=r[n]||{},o=s[i]=s[i]||[],a=L.Util.stamp(e);this._objectPoint[a]=t,o.push(e)},updateObject:function(e,t){this.removeObject(e),this.addObject(e,t)},removeObject:function(e,t){var i,n,r=this._getCoord(t.x),s=this._getCoord(t.y),o=this._grid,a=o[s]=o[s]||{},h=a[r]=a[r]||[];for(delete this._objectPoint[L.Util.stamp(e)],i=0,n=h.length;i<n;i++)if(h[i]===e)return h.splice(i,1),1===n&&delete a[r],!0},eachObject:function(e,t){var i,n,r,s,o,a,h=this._grid;for(i in h)for(n in o=h[i])for(r=0,s=(a=o[n]).length;r<s;r++)e.call(t,a[r])&&(r--,s--)},getNearObject:function(e){var t,i,n,r,s,o,a,h,l=this._getCoord(e.x),u=this._getCoord(e.y),_=this._objectPoint,d=this._sqCellSize,c=null;for(t=u-1;t<=u+1;t++)if(r=this._grid[t])for(i=l-1;i<=l+1;i++)if(s=r[i])for(n=0,o=s.length;n<o;n++)a=s[n],((h=this._sqDist(_[L.Util.stamp(a)],e))<d||h<=d&&null===c)&&(d=h,c=a);return c},_getCoord:function(e){var t=Math.floor(e/this._cellSize);return isFinite(t)?t:e},_sqDist:function(e,t){var i=t.x-e.x,n=t.y-e.y;return i*i+n*n}},L.QuickHull={getDistant:function(e,t){var i=t[1].lat-t[0].lat;return(t[0].lng-t[1].lng)*(e.lat-t[0].lat)+i*(e.lng-t[0].lng)},findMostDistantPointFromBaseLine:function(e,t){var i,n,r,s=0,o=null,a=[];for(i=t.length-1;0<=i;i--)n=t[i],0<(r=this.getDistant(n,e))&&(a.push(n),s<r&&(s=r,o=n));return{maxPoint:o,newPoints:a}},buildConvexHull:function(e,t){var i=[],n=this.findMostDistantPointFromBaseLine(e,t);return n.maxPoint?i=(i=i.concat(this.buildConvexHull([e[0],n.maxPoint],n.newPoints))).concat(this.buildConvexHull([n.maxPoint,e[1]],n.newPoints)):[e[0]]},getConvexHull:function(e){var t,i=!1,n=!1,r=!1,s=!1,o=null,a=null,h=null,l=null,u=null,_=null;for(t=e.length-1;0<=t;t--){var d=e[t];(!1===i||d.lat>i)&&(i=(o=d).lat),(!1===n||d.lat<n)&&(n=(a=d).lat),(!1===r||d.lng>r)&&(r=(h=d).lng),(!1===s||d.lng<s)&&(s=(l=d).lng)}return u=n!==i?(_=a,o):(_=l,h),[].concat(this.buildConvexHull([_,u],e),this.buildConvexHull([u,_],e))}},L.MarkerCluster.include({getConvexHull:function(){var e,t,i=this.getAllChildMarkers(),n=[];for(t=i.length-1;0<=t;t--)e=i[t].getLatLng(),n.push(e);return L.QuickHull.getConvexHull(n)}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(this._group._spiderfied!==this&&!this._group._inZoomAnimation){var e,t=this.getAllChildMarkers(null,!0),i=this._group._map.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),this._group._spiderfied=this,e=t.length>=this._circleSpiralSwitchover?this._generatePointsSpiral(t.length,i):(i.y+=10,this._generatePointsCircle(t.length,i)),this._animationSpiderfy(t,e)}},unspiderfy:function(e){this._group._inZoomAnimation||(this._animationUnspiderfy(e),this._group._spiderfied=null)},_generatePointsCircle:function(e,t){var i,n,r=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+e)/this._2PI,s=this._2PI/e,o=[];for(r=Math.max(r,35),o.length=e,i=0;i<e;i++)n=this._circleStartAngle+i*s,o[i]=new L.Point(t.x+r*Math.cos(n),t.y+r*Math.sin(n))._round();return o},_generatePointsSpiral:function(e,t){var i,n=this._group.options.spiderfyDistanceMultiplier,r=n*this._spiralLengthStart,s=n*this._spiralFootSeparation,o=n*this._spiralLengthFactor*this._2PI,a=0,h=[];for(i=h.length=e;0<=i;i--)i<e&&(h[i]=new L.Point(t.x+r*Math.cos(a),t.y+r*Math.sin(a))._round()),r+=o/(a+=s/r+5e-4*i);return h},_noanimationUnspiderfy:function(){var e,t,i=this._group,n=i._map,r=i._featureGroup,s=this.getAllChildMarkers(null,!0);for(i._ignoreMove=!0,this.setOpacity(1),t=s.length-1;0<=t;t--)e=s[t],r.removeLayer(e),e._preSpiderfyLatlng&&(e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng),e.setZIndexOffset&&e.setZIndexOffset(0),e._spiderLeg&&(n.removeLayer(e._spiderLeg),delete e._spiderLeg);i.fire("unspiderfied",{cluster:this,markers:s}),i._ignoreMove=!1,i._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(e,t){var i,n,r,s,o=this._group,a=o._map,h=o._featureGroup,l=this._group.options.spiderLegPolylineOptions;for(o._ignoreMove=!0,i=0;i<e.length;i++)s=a.layerPointToLatLng(t[i]),n=e[i],r=new L.Polyline([this._latlng,s],l),a.addLayer(r),n._spiderLeg=r,n._preSpiderfyLatlng=n._latlng,n.setLatLng(s),n.setZIndexOffset&&n.setZIndexOffset(1e6),h.addLayer(n);this.setOpacity(.3),o._ignoreMove=!1,o.fire("spiderfied",{cluster:this,markers:e})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(e,t){var i,n,r,s,o,a,h=this,l=this._group,u=l._map,_=l._featureGroup,d=this._latlng,c=u.latLngToLayerPoint(d),p=L.Path.SVG,f=L.extend({},this._group.options.spiderLegPolylineOptions),m=f.opacity;for(void 0===m&&(m=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),p?(f.opacity=0,f.className=(f.className||"")+" leaflet-cluster-spider-leg"):f.opacity=m,l._ignoreMove=!0,i=0;i<e.length;i++)n=e[i],a=u.layerPointToLatLng(t[i]),r=new L.Polyline([d,a],f),u.addLayer(r),n._spiderLeg=r,p&&(o=(s=r._path).getTotalLength()+.1,s.style.strokeDasharray=o,s.style.strokeDashoffset=o),n.setZIndexOffset&&n.setZIndexOffset(1e6),n.clusterHide&&n.clusterHide(),_.addLayer(n),n._setPos&&n._setPos(c);for(l._forceLayout(),l._animationStart(),i=e.length-1;0<=i;i--)a=u.layerPointToLatLng(t[i]),(n=e[i])._preSpiderfyLatlng=n._latlng,n.setLatLng(a),n.clusterShow&&n.clusterShow(),p&&((s=(r=n._spiderLeg)._path).style.strokeDashoffset=0,r.setStyle({opacity:m}));this.setOpacity(.3),l._ignoreMove=!1,setTimeout(function(){l._animationEnd(),l.fire("spiderfied",{cluster:h,markers:e})},200)},_animationUnspiderfy:function(e){var t,i,n,r,s,o,a=this,h=this._group,l=h._map,u=h._featureGroup,_=e?l._latLngToNewLayerPoint(this._latlng,e.zoom,e.center):l.latLngToLayerPoint(this._latlng),d=this.getAllChildMarkers(null,!0),c=L.Path.SVG;for(h._ignoreMove=!0,h._animationStart(),this.setOpacity(1),i=d.length-1;0<=i;i--)(t=d[i])._preSpiderfyLatlng&&(t.closePopup(),t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng,o=!0,t._setPos&&(t._setPos(_),o=!1),t.clusterHide&&(t.clusterHide(),o=!1),o&&u.removeLayer(t),c&&(s=(r=(n=t._spiderLeg)._path).getTotalLength()+.1,r.style.strokeDashoffset=s,n.setStyle({opacity:0}
vendor: 25,960 bytes, lines 13-14
13)));h._ignoreMove=!1,setTimeout(function(){var e=0;for(i=d.length-1;0<=i;i--)(t=d[i])._spiderLeg&&e++;for(i=d.length-1;0<=i;i--)(t=d[i])._spiderLeg&&(t.clusterShow&&t.clusterShow(),t.setZIndexOffset&&t.setZIndexOffset(0),1<e&&u.removeLayer(t),l.removeLayer(t._spiderLeg),delete t._spiderLeg);h._animationEnd(),h.fire("unspiderfied",{cluster:a,markers:d})},200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(e){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(e))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(e){this._spiderfied&&this._spiderfied.unspiderfy(e)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(e){e._spiderLeg&&(this._featureGroup.removeLayer(e),e.clusterShow&&e.clusterShow(),e.setZIndexOffset&&e.setZIndexOffset(0),this._map.removeLayer(e._spiderLeg),delete e._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(e){return e?e instanceof L.MarkerClusterGroup?e=e._topClusterLevel.getAllChildMarkers():e instanceof L.LayerGroup?e=e._layers:e instanceof L.MarkerCluster?e=e.getAllChildMarkers():e instanceof L.Marker&&(e=[e]):e=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(e),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(e),this},_flagParentsIconsNeedUpdate:function(e){var t,i;for(t in e)for(i=e[t].__parent;i;)i._iconNeedsUpdate=!0,i=i.__parent},_refreshSingleMarkerModeMarkers:function(e){var t,i;for(t in e)i=e[t],this.hasLayer(i)&&i.setIcon(this._overrideMarkerIcon(i))}}),L.Marker.include({refreshIconOptions:function(e,t){var i=this.options.icon;return L.setOptions(i,e),this.setIcon(i),t&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),e.MarkerClusterGroup=t,e.MarkerCluster=i}); 14!function(n,e,t){var s;L.drawVersion="1.0.4",L.Draw={},L.drawLocal={draw:{toolbar:{actions:{title:"Cancel drawing",text:"Cancel"},finish:{title:"Finish drawing",text:"Finish"},undo:{title:"Delete last point drawn",text:"Delete last point"},buttons:{polyline:"Draw a polyline",polygon:"Draw a polygon",rectangle:"Draw a rectangle",circle:"Draw a circle",marker:"Draw a marker",circlemarker:"Draw a circlemarker"}},handlers:{circle:{tooltip:{start:"Click and drag to draw circle."},radius:"Radius"},circlemarker:{tooltip:{start:"Click map to place circle marker."}},marker:{tooltip:{start:"Click map to place marker."}},polygon:{tooltip:{start:"Click to start drawing shape.",cont:"Click to continue drawing shape.",end:"Click first point to close this shape."}},polyline:{error:"<strong>Error:</strong> shape edges cannot cross!",tooltip:{start:"Click to start drawing line.",cont:"Click to continue drawing line.",end:"Click last point to finish line."}},rectangle:{tooltip:{start:"Click and drag to draw rectangle."}},simpleshape:{tooltip:{end:"Release mouse to finish drawing."}}}},edit:{toolbar:{actions:{save:{title:"Save changes",text:"Save"},cancel:{title:"Cancel editing, discards all changes",text:"Cancel"},clearAll:{title:"Clear all layers",text:"Clear All"}},buttons:{edit:"Edit layers",editDisabled:"No layers to edit",remove:"Delete layers",removeDisabled:"No layers to delete"}},handlers:{edit:{tooltip:{text:"Drag handles or markers to edit features.",subtext:"Click cancel to undo changes."}},remove:{tooltip:{text:"Click on a feature to remove."}}}}},L.Draw.Event={},L.Draw.Event.CREATED="draw:created",L.Draw.Event.EDITED="draw:edited",L.Draw.Event.DELETED="draw:deleted",L.Draw.Event.DRAWSTART="draw:drawstart",L.Draw.Event.DRAWSTOP="draw:drawstop",L.Draw.Event.DRAWVERTEX="draw:drawvertex",L.Draw.Event.EDITSTART="draw:editstart",L.Draw.Event.EDITMOVE="draw:editmove",L.Draw.Event.EDITRESIZE="draw:editresize",L.Draw.Event.EDITVERTEX="draw:editvertex",L.Draw.Event.EDITSTOP="draw:editstop",L.Draw.Event.DELETESTART="draw:deletestart",L.Draw.Event.DELETESTOP="draw:deletestop",L.Draw.Event.TOOLBAROPENED="draw:toolbaropened",L.Draw.Event.TOOLBARCLOSED="draw:toolbarclosed",L.Draw.Event.MARKERCONTEXT="draw:markercontext",L.Draw=L.Draw||{},L.Draw.Feature=L.Handler.extend({initialize:function(t,e){this._map=t,this._container=t._container,this._overlayPane=t._panes.overlayPane,this._popupPane=t._panes.popupPane,e&&e.shapeOptions&&(e.shapeOptions=L.Util.extend({},this.options.shapeOptions,e.shapeOptions)),L.setOptions(this,e);var i=L.version.split(".");1===parseInt(i[0],10)&&2<=parseInt(i[1],10)?L.Draw.Feature.include(L.Evented.prototype):L.Draw.Feature.include(L.Mixin.Events)},enable:function(){this._enabled||(L.Handler.prototype.enable.call(this),this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DRAWSTART,{layerType:this.type}))},disable:function(){this._enabled&&(L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DRAWSTOP,{layerType:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(L.DomUtil.disableTextSelection(),t.getContainer().focus(),this._tooltip=new L.Draw.Tooltip(this._map),L.DomEvent.on(this._container,"keyup",this._cancelDrawing,this))},removeHooks:function(){this._map&&(L.DomUtil.enableTextSelection(),this._tooltip.dispose(),this._tooltip=null,L.DomEvent.off(this._container,"keyup",this._cancelDrawing,this))},setOptions:function(t){L.setOptions(this,t)},_fireCreatedEvent:function(t){this._map.fire(L.Draw.Event.CREATED,{layer:t,layerType:this.type})},_cancelDrawing:function(t){27===t.keyCode&&(this._map.fire("draw:canceled",{layerType:this.type}),this.disable())}}),L.Draw.Polyline=L.Draw.Feature.extend({statics:{TYPE:"polyline"},Poly:L.Polyline,options:{allowIntersection:!0,repeatMode:!1,drawError:{color:"#b00b00",timeout:2500},icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),guidelineDistance:20,maxGuideLineLength:4e3,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!1,clickable:!0},metric:!0,feet:!0,nautic:!1,showLength:!0,zIndexOffset:2e3,factor:1,maxPoints:0},initialize:function(t,e){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this.options.drawError.message=L.drawLocal.draw.handlers.polyline.error,e&&e.drawError&&(e.drawError=L.Util.extend({},this.options.drawError,e.drawError)),this.type=L.Draw.Polyline.TYPE,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._markers=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._poly=new L.Polyline([],this.options.shapeOptions),this._tooltip.updateContent(this._getTooltipText()),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("mouseout",this._onMouseOut,this).on("mousemove",this._onMouseMove,this).on("mousedown",this._onMouseDown,this).on("mouseup",this._onMouseUp,this).addTo(this._map),this._map.on("mouseup",this._onMouseUp,this).on("mousemove",this._onMouseMove,this).on("zoomlevelschange",this._onZoomEnd,this).on("touchstart",this._onTouch,this).on("zoomend",this._onZoomEnd,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._clearHideErrorTimeout(),this._cleanUpShape(),this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,this._map.removeLayer(this._poly),delete this._poly,this._mouseMarker.off("mousedown",this._onMouseDown,this).off("mouseout",this._onMouseOut,this).off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._clearGuides(),this._map.off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this).off("zoomlevelschange",this._onZoomEnd,this).off("zoomend",this._onZoomEnd,this).off("touchstart",this._onTouch,this).off("click",this._onTouch,this)},deleteLastVertex:function(){if(!(this._markers.length<=1)){var t=this._markers.pop(),e=this._poly,i=e.getLatLngs(),o=i.splice(-1,1)[0];this._poly.setLatLngs(i),this._markerGroup.removeLayer(t),e.getLatLngs().length<2&&this._map.removeLayer(e),this._vertexChanged(o,!1)}},addVertex:function(t){2<=this._markers.length&&!this.options.allowIntersection&&this._poly.newLatLngIntersects(t)?this._showErrorTooltip():(this._errorShown&&this._hideErrorTooltip(),this._markers.push(this._createMarker(t)),this._poly.addLatLng(t),2===this._poly.getLatLngs().length&&this._map.addLayer(this._poly),this._vertexChanged(t,!0))},completeShape:function(){this._markers.length<=1||!this._shapeIsValid()||(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_finishShape:function(){var t=this._poly._defaultShape?this._poly._defaultShape():this._poly.getLatLngs(),e=this._poly.newLatLngIntersects(t[t.length-1]);!this.options.allowIntersection&&e||!this._shapeIsValid()?this._showErrorTooltip():(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_shapeIsValid:function(){return!0},_onZoomEnd:function(){null!==this._markers&&this._updateGuide()},_onMouseMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent),i=this._map.layerPointToLatLng(e);this._currentLatLng=i,this._updateTooltip(i),this._updateGuide(e),this._mouseMarker.setLatLng(i),L.DomEvent.preventDefault(t.originalEvent)},_vertexChanged:function(t,e){this._map.fire(L.Draw.Event.DRAWVERTEX,{layers:this._markerGroup}),this._updateFinishHandler(),this._updateRunningMeasure(t,e),this._clearGuides(),this._updateTooltip()},_onMouseDown:function(t){if(!this._clickHandled&&!this._touchHandled&&!this._disableMarkers){this._onMouseMove(t),this._clickHandled=!0,this._disableNewMarkers();var e=t.originalEvent,i=e.clientX,o=e.clientY;this._startPoint.call(this,i,o)}},_startPoint:function(t,e){this._mouseDownOrigin=L.point(t,e)},_onMouseUp:function(t){var e=t.originalEvent,i=e.clientX,o=e.clientY;this._endPoint.call(this,i,o,t),this._clickHandled=null},_endPoint:function(t,e,i){if(this._mouseDownOrigin){var o=L.point(t,e).distanceTo(this._mouseDownOrigin),a=this._calculateFinishDistance(i.latlng);1<this.options.maxPoints&&this.options.maxPoints==this._markers.length+1?(this.addVertex(i.latlng),this._finishShape()):a<10&&L.Browser.touch?this._finishShape():Math.abs(o)<9*(n.devicePixelRatio||1)&&this.addVertex(i.latlng),this._enableNewMarkers()}this._mouseDownOrigin=null},_onTouch:function(t){var e,i,o=t.originalEvent;!o.touches||!o.touches[0]||this._clickHandled||this._touchHandled||this._disableMarkers||(e=o.touches[0].clientX,i=o.touches[0].clientY,this._disableNewMarkers(),this._touchHandled=!0,this._startPoint.call(this,e,i),this._endPoint.call(this,e,i,t),this._touchHandled=null),this._clickHandled=null},_onMouseOut:function(){this._tooltip&&this._tooltip._onMouseOut.call(this._tooltip)},_calculateFinishDistance:function(t){var e;if(0<this._markers.length){var i;if(this.type===L.Draw.Polyline.TYPE)i=this._markers[this._markers.length-1];else{if(this.type!==L.Draw.Polygon.TYPE)return 1/0;i=this._markers[0]}var o=this._map.latLngToContainerPoint(i.getLatLng()),a=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset}),n=this._map.latLngToContainerPoint(a.getLatLng());e=o.distanceTo(n)}else e=1/0;return e},_updateFinishHandler:function(){var t=this._markers.length;1<t&&this._markers[t-1].on("click",this._finishShape,this),2<t&&this._markers[t-2].off("click",this._finishShape,this)},_createMarker:function(t){var e=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset});return this._markerGroup.addLayer(e),e},_updateGuide:function(t){var e=this._markers?this._markers.length:0;0<e&&(t=t||this._map.latLngToLayerPoint(this._currentLatLng),this._clearGuides(),this._drawGuide(this._map.latLngToLayerPoint(this._markers[e-1].getLatLng()),t))},_updateTooltip:function(t){var e=this._getTooltipText();t&&this._tooltip.updatePosition(t),this._errorShown||this._tooltip.updateContent(e)},_drawGuide:function(t,e){var i,o,a,n=Math.floor(Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))),s=this.options.guidelineDistance,r=this.options.maxGuideLineLength,l=r<n?n-r:s;for(this._guidesContainer||(this._guidesContainer=L.DomUtil.create("div","leaflet-draw-guides",this._overlayPane));l<n;l+=this.options.guidelineDistance)i=l/n,o={x:Math.floor(t.x*(1-i)+i*e.x),y:Math.floor(t.y*(1-i)+i*e.y)},(a=L.DomUtil.create("div","leaflet-draw-guide-dash",this._guidesContainer)).style.backgroundColor=this._errorShown?this.options.drawError.color:this.options.shapeOptions.color,L.DomUtil.setPosition(a,o)},_updateGuideColor:function(t){if(this._guidesContainer)for(var e=0,i=this._guidesContainer.childNodes.length;e<i;e++)this._guidesContainer.childNodes[e].style.backgroundColor=t},_clearGuides:function(){if(this._guidesContainer)for(;this._guidesContainer.firstChild;)this._guidesContainer.removeChild(this._guidesContainer.firstChild)},_getTooltipText:function(){var t,e=this.options.showLength;return 0===this._markers.length?{text:L.drawLocal.draw.handlers.polyline.tooltip.start}:(t=e?this._getMeasurementString():"",1===this._markers.length?{text:L.drawLocal.draw.handlers.polyline.tooltip.cont,subtext:t}:{text:L.drawLocal.draw.handlers.polyline.tooltip.end,subtext:t})},_updateRunningMeasure:function(t,e){var i,o,a=this._markers.length;1===this._markers.length?this._measurementRunningTotal=0:(i=a-(e?2:1),o=L.GeometryUtil.isVersion07x()?t.distanceTo(this._markers[i].getLatLng())*(this.options.factor||1):this._map.distance(t,this._markers[i].getLatLng())*(this.options.factor||1),this._measurementRunningTotal+=o*(e?1:-1))},_getMeasurementString:function(){var t,e=this._currentLatLng,i=this._markers[this._markers.length-1].getLatLng();return t=L.GeometryUtil.isVersion07x()?i&&e&&e.distanceTo?this._measurementRunningTotal+e.distanceTo(i)*(this.options.factor||1):this._measurementRunningTotal||0:i&&e?this._measurementRunningTotal+this._map.distance(e,i)*(this.options.factor||1):this._measurementRunningTotal||0,L.GeometryUtil.readableDistance(t,this.options.metric,this.options.feet,this.options.nautic,this.options.precision)},_showErrorTooltip:function(){this._errorShown=!0,this._tooltip.showAsError().updateContent({text:this.options.drawError.message}),this._updateGuideColor(this.options.drawError.color),this._poly.setStyle({color:this.options.drawError.color}),this._clearHideErrorTimeout(),this._hideErrorTimeout=setTimeout(L.Util.bind(this._hideErrorTooltip,this),this.options.drawError.timeout)},_hideErrorTooltip:function(){this._errorShown=!1,this._clearHideErrorTimeout(),this._tooltip.removeError().updateContent(this._getTooltipText()),this._updateGuideColor(this.options.shapeOptions.color),this._poly.setStyle({color:this.options.shapeOptions.color})},_clearHideErrorTimeout:function(){this._hideErrorTimeout&&(clearTimeout(this._hideErrorTimeout),this._hideErrorTimeout=null)},_disableNewMarkers:function(){this._disableMarkers=!0},_enableNewMarkers:function(){setTimeout(function(){this._disableMarkers=!1}.bind(this),50)},_cleanUpShape:function(){1<this._markers.length&&this._markers[this._markers.length-1].off("click",this._finishShape,this)},_fireCreatedEvent:function(){var t=new this.Poly(this._poly.getLatLngs(),this.options.shapeOptions);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)}}),L.Draw.Polygon=L.Draw.Polyline.extend({statics:{TYPE:"polygon"},Poly:L.Polygon,options:{showArea:!1,showLength:!1,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},metric:!0,feet:!0,nautic:!1,precision:{}},initialize:function(t,e){L.Draw.Polyline.prototype.initialize.call(this,t,e),this.type=L.Draw.Polygon.TYPE},_updateFinishHandler:function(){var t=this._markers.length;1===t&&this._markers[0].on("click",this._finishShape,this),2<t&&(this._markers[t-1].on("dblclick",this._finishShape,this),3<t&&this._markers[t-2].off("dblclick",this._finishShape,this))},_getTooltipText:function(){var t,e;return 0===this._markers.length?t=L.drawLocal.draw.handlers.polygon.tooltip.start:e=(t=this._markers.length<3?L.drawLocal.draw.handlers.polygon.tooltip.cont:L.drawLocal.draw.handlers.polygon.tooltip.end,this._getMeasurementString()),{text:t,subtext:e}},_getMeasurementString:function(){var t=this._area,e="";return t||this.options.showLength?(this.options.showLength&&(e=L.Draw.Polyline.prototype._getMeasurementString.call(this)),t&&(e+="<br>"+L.GeometryUtil.readableArea(t,this.options.metric,this.options.precision)),e):null},_shapeIsValid:function(){return 3<=this._markers.length},_vertexChanged:function(t,e){var i;!this.options.allowIntersection&&this.options.showArea&&(i=this._poly.getLatLngs(),this._area=L.GeometryUtil.geodesicArea(i)),L.Draw.Polyline.prototype._vertexChanged.call(this,t,e)},_cleanUpShape:function(){var t=this._markers.length;0<t&&(this._markers[0].off("click",this._finishShape,this),2<t&&this._markers[t-1].off("dblclick",this._finishShape,this))}}),L.SimpleShape={},L.Draw.SimpleShape=L.Draw.Feature.extend({options:{repeatMode:!1},initialize:function(t,e){this._endLabelText=L.drawLocal.draw.handlers.simpleshape.tooltip.end,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._mapDraggable=this._map.dragging.enabled(),this._mapDraggable&&this._map.dragging.disable(),this._container.style.cursor="crosshair",this._tooltip.updateContent({text:this._initialLabelText}),this._map.on("mousedown",this._onMouseDown,this).on("mousemove",this._onMouseMove,this).on("touchstart",this._onMouseDown,this).on("touchmove",this._onMouseMove,this),e.addEventListener("touchstart",L.DomEvent.preventDefault,{passive:!1}))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._mapDraggable&&this._map.dragging.enable(),this._container.style.cursor="",this._map.off("mousedown",this._onMouseDown,this).off("mousemove",this._onMouseMove,this).off("touchstart",this._onMouseDown,this).off("touchmove",this._onMouseMove,this),L.DomEvent.off(e,"mouseup",this._onMouseUp,this),L.DomEvent.off(e,"touchend",this._onMouseUp,this),e.removeEventListener("touchstart",L.DomEvent.preventDefault),this._shape&&(this._map.removeLayer(this._shape),delete this._shape)),this._isDrawing=!1},_getTooltipText:function(){return{text:this._endLabelText}},_onMouseDown:function(t){this._isDrawing=!0,this._startLatLng=t.latlng,L.DomEvent.on(e,"mouseup",this._onMouseUp,this).on(e,"touchend",this._onMouseUp,this).preventDefault(t.originalEvent)},_onMouseMove:function(t){var e=t.latlng;this._tooltip.updatePosition(e),this._isDrawing&&(this._tooltip.updateContent(this._getTooltipText()),this._drawShape(e))},_onMouseUp:function(){this._shape&&this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()}}),L.Draw.Rectangle=L.Draw.SimpleShape.extend({statics:{TYPE:"rectangle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showArea:!0,metric:!0},initialize:function(t,e){this.type=L.Draw.Rectangle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.rectangle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,t,e)},disable:function(){this._enabled&&(this._isCurrentlyTwoClickDrawing=!1,L.Draw.SimpleShape.prototype.disable.call(this))},_onMouseUp:function(t){this._shape||this._isCurrentlyTwoClickDrawing?this._isCurrentlyTwoClickDrawing&&!function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}(t.target,"leaflet-pane")||L.Draw.SimpleShape.prototype._onMouseUp.call(this):this._isCurrentlyTwoClickDrawing=!0},_drawShape:function(t){this._shape?this._shape.setBounds(new L.LatLngBounds(this._startLatLng,t)):(this._shape=new L.Rectangle(new L.LatLngBounds(this._startLatLng,t),this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var t=new L.Rectangle(this._shape.getBounds(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},_getTooltipText:function(){var t,e,i,o=L.Draw.SimpleShape.prototype._getTooltipText.call(this),a=this._shape,n=this.options.showArea;return a&&(t=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),e=L.GeometryUtil.geodesicArea(t),i=n?L.GeometryUtil.readableArea(e,this.options.metric):""),{text:o.text,subtext:i}}}),L.Draw.Marker=L.Draw.Feature.extend({statics:{TYPE:"marker"},options:{icon:new L.Icon.Default,repeatMode:!1,zIndexOffset:2e3},initialize:function(t,e){this.type=L.Draw.Marker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.marker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._tooltip.updateContent({text:this._initialLabelText}),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("click",this._onClick,this).addTo(this._map),this._map.on("mousemove",this._onMouseMove,this),this._map.on("click",this._onTouch,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._map.off("click",this._onClick,this).off("click",this._onTouch,this),this._marker&&(this._marker.off("click",this._onClick,this),this._map.removeLayer(this._marker),delete this._marker),this._mouseMarker.off("click",this._onClick,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._map.off("mousemove",this._onMouseMove,this))},_onMouseMove:function(t){var e=t.latlng;this._tooltip.updatePosition(e),this._mouseMarker.setLatLng(e),this._marker?(e=this._mouseMarker.getLatLng(),this._marker.setLatLng(e)):(this._marker=this._createMarker(e),this._marker.on("click",this._onClick,this),this._map.on("click",this._onClick,this).addLayer(this._marker))},_createMarker:function(t){return new L.Marker(t,{icon:this.options.icon,zIndexOffset:this.options.zIndexOffset})},_onClick:function(){this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},_onTouch:function(t){this._onMouseMove(t),this._onClick()},_fireCreatedEvent:function(){var t=new L.Marker.Touch(this._marker.getLatLng(),{icon:this.options.icon});L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)}}),L.Draw.CircleMarker=L.Draw.Marker.extend({statics:{TYPE:"circlemarker"},options:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0,zIndexOffset:2e3},initialize:function(t,e){this.type=L.Draw.CircleMarker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circlemarker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,t,e)},_fireCreatedEvent:function(){var t=new L.CircleMarker(this._marker.getLatLng(),this.options);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)},_createMarker:function(t){return new L.CircleMarker(t,this.options)}}),L.Draw.Circle=L.Draw.SimpleShape.extend({statics:{TYPE:"circle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showRadius:!0,metric:!0,feet:!0,nautic:!1},initialize:function(t,e){this.type=L.Draw.Circle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,t,e)},_drawShape:function(t){if(L.GeometryUtil.isVersion07x())var e=this._startLatLng.distanceTo(t);else e=this._map.distance(this._startLatLng,t);this._shape?this._shape.setRadius(e):(this._shape=new L.Circle(this._startLatLng,e,this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var t=new L.Circle(this._startLatLng,this._shape.getRadius(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},_onMouseMove:function(t){var e,i=t.latlng,o=this.options.showRadius,a=this.options.metric;if(this._tooltip.updatePosition(i),this._isDrawing){this._drawShape(i),e=this._shape.getRadius().toFixed(1);var n="";o&&(n=L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(e,a,this.options.feet,this.options.nautic)),this._tooltip.updateContent({text:this._endLabelText,subtext:n})}}}),L.Edit=L.Edit||{},L.Edit.Marker=L.Handler.extend({initialize:function(t,e){this._marker=t,L.setOptions(this,e)},addHooks:function(){var t=this._marker;t.dragging.enable(),t.on("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},removeHooks:function(){var t=this._marker;t.dragging.disable(),t.off("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},_onDragEnd:function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},_toggleMarkerHighlight:function(){var t=this._marker._icon;t&&(t.style.display="none",L.DomUtil.hasClass(t,"leaflet-edit-marker-selected")?(L.DomUtil.removeClass(t,"leaflet-edit-marker-selected"),this._offsetMarker(t,-4)):(L.Dom
vendor: 12,933 bytes, line 14
14Util.addClass(t,"leaflet-edit-marker-selected"),this._offsetMarker(t,4)),t.style.display="")},_offsetMarker:function(t,e){var i=parseInt(t.style.marginTop,10)-e,o=parseInt(t.style.marginLeft,10)-e;t.style.marginTop=i+"px",t.style.marginLeft=o+"px"}}),L.Marker.addInitHook(function(){L.Edit.Marker&&(this.editing=new L.Edit.Marker(this),this.options.editable&&this.editing.enable())}),L.Edit=L.Edit||{},L.Edit.Poly=L.Handler.extend({initialize:function(t){this.latlngs=[t._latlngs],t._holes&&(this.latlngs=this.latlngs.concat(t._holes)),this._poly=t,this._poly.on("revert-edited",this._updateLatLngs,this)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._poly._latlngs)?this._poly._latlngs:this._poly._latlngs[0]:this._poly._latlngs},_eachVertexHandler:function(t){for(var e=0;e<this._verticesHandlers.length;e++)t(this._verticesHandlers[e])},addHooks:function(){this._initHandlers(),this._eachVertexHandler(function(t){t.addHooks()})},removeHooks:function(){this._eachVertexHandler(function(t){t.removeHooks()})},updateMarkers:function(){this._eachVertexHandler(function(t){t.updateMarkers()})},_initHandlers:function(){this._verticesHandlers=[];for(var t=0;t<this.latlngs.length;t++)this._verticesHandlers.push(new L.Edit.PolyVerticesEdit(this._poly,this.latlngs[t],this._poly.options.poly))},_updateLatLngs:function(t){this.latlngs=[t.layer._latlngs],t.layer._holes&&(this.latlngs=this.latlngs.concat(t.layer._holes))}}),L.Edit.PolyVerticesEdit=L.Handler.extend({options:{icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),drawError:{color:"#b00b00",timeout:1e3}},initialize:function(t,e,i){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this._poly=t,i&&i.drawError&&(i.drawError=L.Util.extend({},this.options.drawError,i.drawError)),this._latlngs=e,L.setOptions(this,i)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._latlngs)?this._latlngs:this._latlngs[0]:this._latlngs},addHooks:function(){var t=this._poly,e=t._path;t instanceof L.Polygon||(t.options.fill=!1,t.options.editing&&(t.options.editing.fill=!1)),e&&t.options.editing&&t.options.editing.className&&(t.options.original.className&&t.options.original.className.split(" ").forEach(function(t){L.DomUtil.removeClass(e,t)}),t.options.editing.className.split(" ").forEach(function(t){L.DomUtil.addClass(e,t)})),t.setStyle(t.options.editing),this._poly._map&&(this._map=this._poly._map,this._markerGroup||this._initMarkers(),this._poly._map.addLayer(this._markerGroup))},removeHooks:function(){var t=this._poly,e=t._path;e&&t.options.editing&&t.options.editing.className&&(t.options.editing.className.split(" ").forEach(function(t){L.DomUtil.removeClass(e,t)}),t.options.original.className&&t.options.original.className.split(" ").forEach(function(t){L.DomUtil.addClass(e,t)})),t.setStyle(t.options.original),t._map&&(t._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers)},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._markers=[];var t,e,i,o,a,n,s=this._defaultShape();for(t=0,i=s.length;t<i;t++)(o=this._createMarker(s[t],t)).on("click",this._onMarkerClick,this),o.on("contextmenu",this._onContextMenu,this),this._markers.push(o);for(t=0,e=i-1;t<i;e=t++)(0!==t||L.Polygon&&this._poly instanceof L.Polygon)&&(a=this._markers[e],n=this._markers[t],this._createMiddleMarker(a,n),this._updatePrevNext(a,n))},_createMarker:function(t,e){var i=new L.Marker.Touch(t,{draggable:!0,icon:this.options.icon});return i._origLatLng=t,i._index=e,i.on("dragstart",this._onMarkerDragStart,this).on("drag",this._onMarkerDrag,this).on("dragend",this._fireEdit,this).on("touchmove",this._onTouchMove,this).on("touchend",this._fireEdit,this).on("MSPointerMove",this._onTouchMove,this).on("MSPointerUp",this._fireEdit,this),this._markerGroup.addLayer(i),i},_onMarkerDragStart:function(){this._poly.fire("editstart")},_spliceLatLngs:function(){var t=this._defaultShape(),e=[].splice.apply(t,arguments);return this._poly._convertLatLngs(t,!0),this._poly.redraw(),e},_removeMarker:function(t){var e=t._index;this._markerGroup.removeLayer(t),this._markers.splice(e,1),this._spliceLatLngs(e,1),this._updateIndexes(e,-1),t.off("dragstart",this._onMarkerDragStart,this).off("drag",this._onMarkerDrag,this).off("dragend",this._fireEdit,this).off("touchmove",this._onMarkerDrag,this).off("touchend",this._fireEdit,this).off("click",this._onMarkerClick,this).off("MSPointerMove",this._onTouchMove,this).off("MSPointerUp",this._fireEdit,this)},_fireEdit:function(){this._poly.edited=!0,this._poly.fire("edit"),this._poly._map.fire(L.Draw.Event.EDITVERTEX,{layers:this._markerGroup,poly:this._poly})},_onMarkerDrag:function(t){var e=t.target,i=this._poly,o=L.LatLngUtil.cloneLatLng(e._origLatLng);if(L.extend(e._origLatLng,e._latlng),i.options.poly){var a=i._map._editTooltip;if(!i.options.poly.allowIntersection&&i.intersects()){L.extend(e._origLatLng,o),e.setLatLng(o);var n=i.options.color;i.setStyle({color:this.options.drawError.color}),a&&a.updateContent({text:L.drawLocal.draw.handlers.polyline.error}),setTimeout(function(){i.setStyle({color:n}),a&&a.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext})},1e3)}}e._middleLeft&&e._middleLeft.setLatLng(this._getMiddleLatLng(e._prev,e)),e._middleRight&&e._middleRight.setLatLng(this._getMiddleLatLng(e,e._next)),this._poly._bounds._southWest=L.latLng(1/0,1/0),this._poly._bounds._northEast=L.latLng(-1/0,-1/0);var s=this._poly.getLatLngs();this._poly._convertLatLngs(s,!0),this._poly.redraw(),this._poly.fire("editdrag")},_onMarkerClick:function(t){var e=L.Polygon&&this._poly instanceof L.Polygon?4:3,i=t.target;this._defaultShape().length<e||(this._removeMarker(i),this._updatePrevNext(i._prev,i._next),i._middleLeft&&this._markerGroup.removeLayer(i._middleLeft),i._middleRight&&this._markerGroup.removeLayer(i._middleRight),i._prev&&i._next?this._createMiddleMarker(i._prev,i._next):i._prev?i._next||(i._prev._middleRight=null):i._next._middleLeft=null,this._fireEdit())},_onContextMenu:function(t){var e=t.target;this._poly,this._poly._map.fire(L.Draw.Event.MARKERCONTEXT,{marker:e,layers:this._markerGroup,poly:this._poly}),L.DomEvent.stopPropagation},_onTouchMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent.touches[0]),i=this._map.layerPointToLatLng(e),o=t.target;L.extend(o._origLatLng,i),o._middleLeft&&o._middleLeft.setLatLng(this._getMiddleLatLng(o._prev,o)),o._middleRight&&o._middleRight.setLatLng(this._getMiddleLatLng(o,o._next)),this._poly.redraw(),this.updateMarkers()},_updateIndexes:function(e,i){this._markerGroup.eachLayer(function(t){t._index>e&&(t._index+=i)})},_createMiddleMarker:function(e,i){var o,a,t,n=this._getMiddleLatLng(e,i),s=this._createMarker(n);s.setOpacity(.6),e._middleRight=i._middleLeft=s,a=function(){s.off("touchmove",a,this);var t=i._index;s._index=t,s.off("click",o,this).on("click",this._onMarkerClick,this),n.lat=s.getLatLng().lat,n.lng=s.getLatLng().lng,this._spliceLatLngs(t,0,n),this._markers.splice(t,0,s),s.setOpacity(1),this._updateIndexes(t,1),i._index++,this._updatePrevNext(e,s),this._updatePrevNext(s,i),this._poly.fire("editstart")},t=function(){s.off("dragstart",a,this),s.off("dragend",t,this),s.off("touchmove",a,this),this._createMiddleMarker(e,s),this._createMiddleMarker(s,i)},o=function(){a.call(this),t.call(this),this._fireEdit()},s.on("click",o,this).on("dragstart",a,this).on("dragend",t,this).on("touchmove",a,this),this._markerGroup.addLayer(s)},_updatePrevNext:function(t,e){t&&(t._next=e),e&&(e._prev=t)},_getMiddleLatLng:function(t,e){var i=this._poly._map,o=i.project(t.getLatLng()),a=i.project(e.getLatLng());return i.unproject(o._add(a)._divideBy(2))}}),L.Polyline.addInitHook(function(){this.editing||(L.Edit.Poly&&(this.editing=new L.Edit.Poly(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()}))}),L.Edit=L.Edit||{},L.Edit.SimpleShape=L.Handler.extend({options:{moveIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move"}),resizeIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize"}),touchMoveIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move leaflet-touch-icon"}),touchResizeIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize leaflet-touch-icon"})},initialize:function(t,e){L.Browser.touch&&(this.options.moveIcon=this.options.touchMoveIcon,this.options.resizeIcon=this.options.touchResizeIcon),this._shape=t,L.Util.setOptions(this,e)},addHooks:function(){var t=this._shape;this._shape._map&&(this._map=this._shape._map,t.setStyle(t.options.editing),t._map&&(this._map=t._map,this._markerGroup||this._initMarkers(),this._map.addLayer(this._markerGroup)))},removeHooks:function(){var t=this._shape;if(t.setStyle(t.options.original),t._map){this._unbindMarker(this._moveMarker);for(var e=0,i=this._resizeMarkers.length;e<i;e++)this._unbindMarker(this._resizeMarkers[e]);this._resizeMarkers=null,this._map.removeLayer(this._markerGroup),delete this._markerGroup}this._map=null},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._createMoveMarker(),this._createResizeMarker()},_createMoveMarker:function(){},_createResizeMarker:function(){},_createMarker:function(t,e){var i=new L.Marker.Touch(t,{draggable:!0,icon:e,zIndexOffset:10});return this._bindMarker(i),this._markerGroup.addLayer(i),i},_bindMarker:function(t){t.on("dragstart",this._onMarkerDragStart,this).on("drag",this._onMarkerDrag,this).on("dragend",this._onMarkerDragEnd,this).on("touchstart",this._onTouchStart,this).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onTouchEnd,this).on("MSPointerUp",this._onTouchEnd,this)},_unbindMarker:function(t){t.off("dragstart",this._onMarkerDragStart,this).off("drag",this._onMarkerDrag,this).off("dragend",this._onMarkerDragEnd,this).off("touchstart",this._onTouchStart,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onTouchEnd,this).off("MSPointerUp",this._onTouchEnd,this)},_onMarkerDragStart:function(t){t.target.setOpacity(0),this._shape.fire("editstart")},_fireEdit:function(){this._shape.edited=!0,this._shape.fire("edit")},_onMarkerDrag:function(t){var e=t.target,i=e.getLatLng();e===this._moveMarker?this._move(i):this._resize(i),this._shape.redraw(),this._shape.fire("editdrag")},_onMarkerDragEnd:function(t){t.target.setOpacity(1),this._fireEdit()},_onTouchStart:function(t){if(L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,t),"function"==typeof this._getCorners){var e=this._getCorners(),i=t.target,o=i._cornerIndex;i.setOpacity(0),this._oppositeCorner=e[(o+2)%4],this._toggleCornerMarkers(0,o)}this._shape.fire("editstart")},_onTouchMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent.touches[0]),i=this._map.layerPointToLatLng(e);return t.target===this._moveMarker?this._move(i):this._resize(i),this._shape.redraw(),!1},_onTouchEnd:function(t){t.target.setOpacity(1),this.updateMarkers(),this._fireEdit()},_move:function(){},_resize:function(){}}),L.Edit=L.Edit||{},L.Edit.Rectangle=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var t=this._shape.getBounds().getCenter();this._moveMarker=this._createMarker(t,this.options.moveIcon)},_createResizeMarker:function(){var t=this._getCorners();this._resizeMarkers=[];for(var e=0,i=t.length;e<i;e++)this._resizeMarkers.push(this._createMarker(t[e],this.options.resizeIcon)),this._resizeMarkers[e]._cornerIndex=e},_onMarkerDragStart:function(t){L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,t);var e=this._getCorners(),i=t.target._cornerIndex;this._oppositeCorner=e[(i+2)%4],this._toggleCornerMarkers(0,i)},_onMarkerDragEnd:function(t){var e,i=t.target;i===this._moveMarker&&(e=this._shape.getBounds().getCenter(),i.setLatLng(e)),this._toggleCornerMarkers(1),this._repositionCornerMarkers(),L.Edit.SimpleShape.prototype._onMarkerDragEnd.call(this,t)},_move:function(t){for(var e,i=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),o=this._shape.getBounds().getCenter(),a=[],n=0,s=i.length;n<s;n++)e=[i[n].lat-o.lat,i[n].lng-o.lng],a.push([t.lat+e[0],t.lng+e[1]]);this._shape.setLatLngs(a
vendor: 4,754 bytes, line 14
14),this._repositionCornerMarkers(),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})},_resize:function(t){var e;this._shape.setBounds(L.latLngBounds(t,this._oppositeCorner)),e=this._shape.getBounds(),this._moveMarker.setLatLng(e.getCenter()),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})},_getCorners:function(){var t=this._shape.getBounds();return[t.getNorthWest(),t.getNorthEast(),t.getSouthEast(),t.getSouthWest()]},_toggleCornerMarkers:function(t){for(var e=0,i=this._resizeMarkers.length;e<i;e++)this._resizeMarkers[e].setOpacity(t)},_repositionCornerMarkers:function(){for(var t=this._getCorners(),e=0,i=this._resizeMarkers.length;e<i;e++)this._resizeMarkers[e].setLatLng(t[e])}}),L.Rectangle.addInitHook(function(){L.Edit.Rectangle&&(this.editing=new L.Edit.Rectangle(this),this.options.editable&&this.editing.enable())}),L.Edit=L.Edit||{},L.Edit.CircleMarker=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var t=this._shape.getLatLng();this._moveMarker=this._createMarker(t,this.options.moveIcon)},_createResizeMarker:function(){this._resizeMarkers=[]},_move:function(t){if(this._resizeMarkers.length){var e=this._getResizeMarkerPoint(t);this._resizeMarkers[0].setLatLng(e)}this._shape.setLatLng(t),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})}}),L.CircleMarker.addInitHook(function(){L.Edit.CircleMarker&&(this.editing=new L.Edit.CircleMarker(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()})}),L.Edit=L.Edit||{},L.Edit.Circle=L.Edit.CircleMarker.extend({_createResizeMarker:function(){var t=this._shape.getLatLng(),e=this._getResizeMarkerPoint(t);this._resizeMarkers=[],this._resizeMarkers.push(this._createMarker(e,this.options.resizeIcon))},_getResizeMarkerPoint:function(t){var e=this._shape._radius*Math.cos(Math.PI/4),i=this._map.project(t);return this._map.unproject([i.x+e,i.y-e])},_resize:function(t){var e=this._moveMarker.getLatLng();L.GeometryUtil.isVersion07x()?radius=e.distanceTo(t):radius=this._map.distance(e,t),this._shape.setRadius(radius),this._map.editTooltip&&this._map._editTooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.subtext+"<br />"+L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(radius,!0,this.options.feet,this.options.nautic)}),this._shape.setRadius(radius),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})}}),L.Circle.addInitHook(function(){L.Edit.Circle&&(this.editing=new L.Edit.Circle(this),this.options.editable&&this.editing.enable())}),L.Map.mergeOptions({touchExtend:!0}),L.Map.TouchExtend=L.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane},addHooks:function(){L.DomEvent.on(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.on(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.on(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.on(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.on(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.on(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.on(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.on(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.on(this._container,"touchleave",this._onTouchLeave,this))},removeHooks:function(){L.DomEvent.off(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.off(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.off(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.off(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.off(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.off(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.off(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.off(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.off(this._container,"touchleave",this._onTouchLeave,this))},_touchEvent:function(t,e){var i={};if(void 0!==t.touches){if(!t.touches.length)return;i=t.touches[0]}else{if("touch"!==t.pointerType)return;if(i=t,!this._filterClick(t))return}var o=this._map.mouseEventToContainerPoint(i),a=this._map.mouseEventToLayerPoint(i),n=this._map.layerPointToLatLng(a);this._map.fire(e,{latlng:n,layerPoint:a,containerPoint:o,pageX:i.pageX,pageY:i.pageY,originalEvent:t})},_filterClick:function(t){var e=t.timeStamp||t.originalEvent.timeStamp,i=L.DomEvent._lastClick&&e-L.DomEvent._lastClick;return i&&
14100<i&&i<500||t.target._simulatedClick&&!t._simulated?(L.DomEvent.stop(t),!1):(L.DomEvent._lastClick=e,!0)},_onTouchStart:function(t){this._map._loaded&&this._touchEvent(t,"touchstart")},_onTouchEnd:function(t){this._map._loaded&&this._touchEvent(t,"touchend")},_onTouchCancel:function(t){if(this._map._loaded){var e="touchcancel";this._detectIE()&&(e="pointercancel"),this._touchEvent(t,e)}},_onTouchLeave:function(t){this._map._loaded&&this._touchEvent(t,"touchleave")},_onTouchMove:function(t){this._map._loaded&&this._touchEvent(t,"touchmove")},_detectIE:function(){var t=n.navigator.userAgent,e=t.indexOf("MSIE ");if(0<e)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(0<t.indexOf("Trident/")){var i=t.indexOf("rv:");return parseInt(t.substring(i+3,t.indexOf(".",i)),10)}var o=t.indexOf("Edge/");return 0<o&&parseInt(t.substring(o+5,t.indexOf(".",o)),10)}}),L.Map.addInitHook("addHandler","touchExtend",L.Map.TouchExtend),L.Marker.Touch=L.Marker.extend({_initInteraction:function(){return this.addInteractiveTarget?L.Marker.prototype._initInteraction.apply(this):this._initInteractionLegacy()},_initInteractionLegacy:function(){if(this.options.clickable){var t=this._icon,e=["dblclick","mousedown","mouseover","mouseout","contextmenu","touchstart","touchend","touchmove"];this._detectIE?e.concat(["MSPointerDown","MSPointerUp","MSPointerMove","MSPointerCancel"]):e.concat(["touchcancel"]),L.DomUtil.addClass(t,"leaflet-clickable"),L.DomEvent.on(t,"click",this._onMouseClick,this),L.DomEvent.on(t,"keypress",this._onKeyPress,this);for(var i=0;i<e.length;i++)L.DomEvent.on(t,e[i],this._fireMouseEvent,this);L.Handler.MarkerDrag&&(this.dragging=new L.Handler.MarkerDrag(this),this.options.draggable&&this.dragging.enable())}},_detectIE:function(){var t=n.navigator.userAgent,e=t.indexOf("MSIE ");if(0<e)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(0<t.indexOf("Trident/")){var i=t.indexOf("rv:");return parseInt(t.substring(i+3,t.indexOf(".",i)),10)}var o=t.indexOf("Edge/");return 0<o&&parseInt(t.substring(o+5,t.indexOf(".",o)),10)}}),L.LatLngUtil={cloneLatLngs:function(t){for(var e=[],i=0,o=t.length;i<o;i++)Array.isArray(t[i])?e.push(L.LatLngUtil.cloneLatLngs(t[i])):e.push(this.cloneLatLng(t[i]));return e},cloneLatLng:function(t){return L.latLng(t.lat,t.lng)}},s={km:2,ha:2,m:0,mi:2,ac:2,yd:0,ft:0,nm:2},L.GeometryUtil=L.extend(L.GeometryUtil||{},{geodesicArea:function(t){var e,i,o=t.length,a=0,n=Math.PI/180;if(2<o){for(var s=0;s<o;s++)e=t[s],a+=((i=t[(s+1)%o]).lng-e.lng)*n*(2+Math.sin(e.lat*n)+Math.sin(i.lat*n));a=6378137*a*6378137/2}return Math.abs(a)},formattedNumber:function(t,e){var i=parseFloat(t).toFixed(e),o=L.drawLocal.format&&L.drawLocal.format.numeric,a=o&&o.delimiters,n=a&&a.thousands,s=a&&a.decimal;if(n||s){var r=i.split(".");i=n?r[0].replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+n):r[0],s=s||".",1<r.length&&(i=i+s+r[1])}return i},readableArea:function(t,e,i){var o;return i=L.Util.extend({},s,i),e?(o=["ha","m"],type=typeof e,"string"===type?o=[e]:"boolean"!==type&&(o=e),1e6<=t&&-1!==o.indexOf("km")?L.GeometryUtil.formattedNumber(1e-6*t,i.km)+" km²":1e4<=t&&-1!==o.indexOf("ha")?L.GeometryUtil.formattedNumber(1e-4*t,i.ha)+" ha":L.GeometryUtil.formattedNumber(t,i.m)+" m²"):3097600<=(t/=.836127)?L.GeometryUtil.formattedNumber(t/3097600,i.mi)+" mi²":4840<=t?L.GeometryUtil.formattedNumber(t/4840,i.ac)+" acres":L.GeometryUtil.formattedNumber(t,i.yd)+" yd²"},readableDistance:function(t,e,i,o,a){var n;switch(a=L.Util.extend({},s,a),e?"string"==typeof e?e:"metric":i?"feet":o?"nauticalMile":"yards"){case"metric":n=1e3<t?L.GeometryUtil.formattedNumber(t/1e3,a.km)+" km":L.GeometryUtil.formattedNumber(t,a.m)+" m";break;case"feet":t*=3.28083,n=L.GeometryUtil.formattedNumber(t,a.ft)+" ft";break;case"nauticalMile":t*=.53996,n=L.GeometryUtil.formattedNumber(t/1e3,a.nm)+" nm";break;case"yards":default:n=1760<(t*=1.09361)?L.GeometryUtil.formattedNumber(t/1760,a.mi)+" miles":L.GeometryUtil.formattedNumber(t,a.yd)+" yd"}return n},isVersion07x:function(){var t=L.version.split(".");return 0===parseInt(t[0],10)&&7===parseInt(t[1],10)}}
vendor: 4,638 bytes, line 14
14),L.Util.extend(L.LineUtil,{segmentsIntersect:function(t,e,i,o){return this._checkCounterclockwise(t,i,o)!==this._checkCounterclockwise(e,i,o)&&this._checkCounterclockwise(t,e,i)!==this._checkCounterclockwise(t,e,o)},_checkCounterclockwise:function(t,e,i){return(i.y-t.y)*(e.x-t.x)>(e.y-t.y)*(i.x-t.x)}}),L.Polyline.include({intersects:function(){var t,e,i,o=this._getProjectedPoints(),a=o?o.length:0;if(this._tooFewPointsForIntersection())return!1;for(t=a-1;3<=t;t--)if(e=o[t-1],i=o[t],this._lineSegmentsIntersectsRange(e,i,t-2))return!0;return!1},newLatLngIntersects:function(t,e){return!!this._map&&this.newPointIntersects(this._map.latLngToLayerPoint(t),e)},newPointIntersects:function(t,e){var i=this._getProjectedPoints(),o=i?i.length:0,a=i?i[o-1]:null,n=o-2;return!this._tooFewPointsForIntersection(1)&&this._lineSegmentsIntersectsRange(a,t,n,e?1:0)},_tooFewPointsForIntersection:function(t){var e=this._getProjectedPoints(),i=e?e.length:0;return!e||(i+=t||0)<=3},_lineSegmentsIntersectsRange:function(t,e,i,o){var a,n,s=this._getProjectedPoints();o=o||0;for(var r=i;o<r;r--)if(a=s[r-1],n=s[r],L.LineUtil.segmentsIntersect(t,e,a,n))return!0;return!1},_getProjectedPoints:function(){if(!this._defaultShape)return this._originalPoints;for(var t=[],e=this._defaultShape(),i=0;i<e.length;i++)t.push(this._map.latLngToLayerPoint(e[i]));return t}}),L.Polygon.include({intersects:function(){var t,e,i,o,a=this._getProjectedPoints();return!this._tooFewPointsForIntersection()&&(!!L.Polyline.prototype.intersects.call(this)||(t=a.length,e=a[0],i=a[t-1],o=t-2,this._lineSegmentsIntersectsRange(i,e,o,1)))}}),L.Control.Draw=L.Control.extend({options:{position:"topleft",draw:{},edit:!1},initialize:function(t){if(L.version<"0.7")throw new Error("Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/");var e;L.Control.prototype.initialize.call(this,t),this._toolbars={},L.DrawToolbar&&this.options.draw&&(e=new L.DrawToolbar(this.options.draw),this._toolbars[L.DrawToolbar.TYPE]=e,this._toolbars[L.DrawToolbar.TYPE].on("enable",this._toolbarEnabled,this)),L.EditToolbar&&this.options.edit&&(e=new L.EditToolbar(this.options.edit),this._toolbars[L.EditToolbar.TYPE]=e,this._toolbars[L.EditToolbar.TYPE].on("enable",this._toolbarEnabled,this)),L.toolbar=this},onAdd:function(t){var e,i=L.DomUtil.create("div","leaflet-draw"),o=!1;for(var a in this._toolbars)this._toolbars.hasOwnProperty(a)&&(e=this._toolbars[a].addToolbar(t))&&(o||(L.DomUtil.hasClass(e,"leaflet-draw-toolbar-top")||L.DomUtil.addClass(e.childNodes[0],"leaflet-draw-toolbar-top"),o=!0),i.appendChild(e));return i},onRemove:function(){for(var t in this._toolbars)this._toolbars.hasOwnProperty(t)&&this._toolbars[t].removeToolbar()},setDrawingOptions:function(t){for(var e in this._toolbars)this._toolbars[e]instanceof L.DrawToolbar&&this._toolbars[e].setOptions(t)},_toolbarEnabled:function(t){var e=t.target;for(var i in this._toolbars)this._toolbars[i]!==e&&this._toolbars[i].disable()}}),L.Map.mergeOptions({drawControlTooltips:!0,drawControl:!1}),L.Map.addInitHook(function(){this.options.drawControl&&(this.drawControl=new L.Control.Draw,this.addControl(this.drawControl))}),L.Toolbar=L.Class.extend({initialize:function(t){L.setOptions(this,t),this._modes={},this._actionButtons=[],this._activeMode=null;var e=L.version.split(".");1===parseInt(e[0],10)&&2<=parseInt(e[1],10)?L.Toolbar.include(L.Evented.prototype):L.Toolbar.include(L.Mixin.Events)},enabled:function(){return null!==this._activeMode},disable:function(){this.enabled()&&this._activeMode.handler.disable()},addToolbar:function(t){var e,i=L.DomUtil.create("div","leaflet-draw-section"),o=0,a=this._toolbarClass||"",n=this.getModeHandlers(t);for(this._toolbarContainer=L.DomUtil.create("div","leaflet-draw-toolbar leaflet-bar"),this._map=t,e=0;e<n.length;e++)n[e].enabled&&this._initModeHandler(n[e].handler,this._toolbarContainer,o++,a,n[e].title);if(o)return this._lastButtonIndex=--o,this._actionsContainer=L.DomUtil.create("ul","leaflet-draw-actions"),i.appendChild(this._toolbarContainer),i.appendChild(this._actionsContainer),i},removeToolbar:function(){for(var t in this._modes)this._modes.hasOwnProperty(t)&&(this._disposeButton(this._modes[t].button,this._modes[t].handler.enable,this._modes[t].handler),this._modes[t].handler.disable(),this._modes[t].handler.off("enabled",this._handlerActivated,this).off("disabled",this._handlerDeactivated,this));this._modes={};for(var e=0,i=this._actionButtons.length;e<i;e++)this._disposeButton(this._actionButtons[e].button,this._actionButtons[e].callback,this);this._actionButtons=[],this._actionsContainer=null}
vendor: 4,267 bytes, line 14
14,_initModeHandler:function(t,e,i,o,a){var n=t.type;this._modes[n]={},this._modes[n].handler=t,this._modes[n].button=this._createButton({type:n,title:a,className:o+"-"+n,container:e,callback:this._modes[n].handler.enable,context:this._modes[n].handler}),this._modes[n].buttonIndex=i,this._modes[n].handler.on("enabled",this._handlerActivated,this).on("disabled",this._handlerDeactivated,this)},_detectIOS:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!n.MSStream},_createButton:function(t){var e=L.DomUtil.create("a",t.className||"",t.container),i=L.DomUtil.create("span","sr-only",t.container);e.href="#",e.appendChild(i),t.title&&(e.title=t.title,i.innerHTML=t.title),t.text&&(e.innerHTML=t.text,i.innerHTML=t.text);var o=this._detectIOS()?"touchstart":"click";return L.DomEvent.on(e,"click",L.DomEvent.stopPropagation).on(e,"mousedown",L.DomEvent.stopPropagation).on(e,"dblclick",L.DomEvent.stopPropagation).on(e,"touchstart",L.DomEvent.stopPropagation).on(e,"click",L.DomEvent.preventDefault).on(e,o,t.callback,t.context),e},_disposeButton:function(t,e){var i=this._detectIOS()?"touchstart":"click";L.DomEvent.off(t,"click",L.DomEvent.stopPropagation).off(t,"mousedown",L.DomEvent.stopPropagation).off(t,"dblclick",L.DomEvent.stopPropagation).off(t,"touchstart",L.DomEvent.stopPropagation).off(t,"click",L.DomEvent.preventDefault).off(t,i,e)},_handlerActivated:function(t){this.disable(),this._activeMode=this._modes[t.handler],L.DomUtil.addClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._showActionsToolbar(),this.fire("enable")},_handlerDeactivated:function(){this._hideActionsToolbar(),L.DomUtil.removeClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._activeMode=null,this.fire("disable")},_createActions:function(t){var e,i,o,a,n=this._actionsContainer,s=this.getActions(t),r=s.length;for(i=0,o=this._actionButtons.length;i<o;i++)this._disposeButton(this._actionButtons[i].button,this._actionButtons[i].callback);for(this._actionButtons=[];n.firstChild;)n.removeChild(n.firstChild);for(var l=0;l<r;l++)"enabled"in s[l]&&!s[l].enabled||(e=L.DomUtil.create("li","",n),a=this._createButton({title:s[l].title,text:s[l].text,container:e,callback:s[l].callback,context:s[l].context}),this._actionButtons.push({button:a,callback:s[l].callback}))},_showActionsToolbar:function(){var t=this._activeMode.buttonIndex,e=this._lastButtonIndex,i=this._activeMode.button.offsetTop-1;this._createActions(this._activeMode.handler),this._actionsContainer.style.top=i+"px",0===t&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-top")),t===e&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-bottom")),this._actionsContainer.style.display="block",this._map.fire(L.Draw.Event.TOOLBAROPENED)},_hideActionsToolbar:function(){this._actionsContainer.style.display="none",L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-top"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-bottom"),this._map.fire(L.Draw.Event.TOOLBARCLOSED)}}),L.Draw=L.Draw||{},L.Draw.Tooltip=L.Class.extend({initialize:function(t){this._map=t,this._popupPane=t._panes.popupPane,this._visible=!1,this._container=t.options.drawControlTooltips?L.DomUtil.create("div","leaflet-draw-tooltip",this._popupPane):null,this._singleLineLabel=!1,this._map.on("mouseout",this._onMouseOut,this)},dispose:function(){this._map.off("mouseout",this._onMouseOut,this),this._container&&(this._popupPane.removeChild(this._container),this._container=null)},updateContent:function(t){return this._container&&(t.subtext=t.subtext||"",0!==t.subtext.length||this._singleLineLabel?0<t.subtext.length&&this._singleLineLabel&&(L.DomUtil.removeClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!1):(L.DomUtil.addClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!0),this._container.innerHTML=(0<t.subtext.length?'<span class="leaflet-draw-tooltip-subtext">
14'+t.subtext+"</span><br />":"")+"<span>"+t.text+"</span>",t.text||t.subtext?(this._visible=!0,this._container.style.visibility="inherit"):(this._visible=!1,this._container.style.visibility="hidden")),this},updatePosition:function(t){var e=this._map.latLngToLayerPoint(t),i=this._container;return this._container&&(this._visible&&(i.style.visibility="inherit"),L.DomUtil.setPosition(i,e)),this},showAsError:function(){return this._container&&L.DomUtil.addClass(this._container,"leaflet-error-draw-tooltip"),this},removeError:function(){return this._container&&L.DomUtil.removeClass(this._container,"leaflet-error-draw-tooltip"),this},_onMouseOut:function(){this._container&&(this._container.style.visibility="hidden")}}),L.DrawToolbar=L.Toolbar.extend({statics:{TYPE:"draw"},options:{polyline:{},polygon:{},rectangle:{},circle:{},marker:{},circlemarker:{}},initialize:function(t){for(var e in this.options)this.options.hasOwnProperty(e)&&t[e]&&(t[e]=L.extend({},this.options[e],t[e]));this._toolbarClass="leaflet-draw-draw",L.Toolbar.prototype.initialize.call(this,t)},getModeHandlers:function(t){return[{enabled:this.options.polyline,handler:new L.Draw.Polyline(t,this.options.polyline),title:L.drawLocal.draw.toolbar.buttons.polyline},{enabled:this.options.polygon,handler:new L.Draw.Polygon(t,this.options.polygon),title:L.drawLocal.draw.toolbar.buttons.polygon},{enabled:this.options.rectangle,handler:new L.Draw.Rectangle(t,this.options.rectangle),title:L.drawLocal.draw.toolbar.buttons.rectangle},{enabled:this.options.circle,handler:new L.Draw.Circle(t,this.options.circle),title:L.drawLocal.draw.toolbar.buttons.circle},{enabled:this.options.marker,handler:new L.Draw.Marker(t,this.options.marker),title:L.drawLocal.draw.toolbar.buttons.marker},{enabled:this.options.circlemarker,handler:new L.Draw.CircleMarker(t,this.options.circlemarker),title:L.drawLocal.draw.toolbar.buttons.circlemarker}]},getActions:function(t){return[{enabled:t.completeShape,title:L.drawLocal.draw.toolbar.finish.title,text:L.drawLocal.draw.toolbar.finish.text,callback:t.completeShape,context:t},{enabled:t.deleteLastVertex,title:L.drawLocal.draw.toolbar.undo.title,text:L.drawLocal.draw.toolbar.undo.text,callback:t.deleteLastVertex,context:t},{title:L.drawLocal.draw.toolbar.actions.title,text:L.drawLocal.draw.toolbar.actions.text,callback:this.disable,context:this}]},setOptions:function(t){for(var e in L.setOptions(this,t),this._modes)this._modes.hasOwnProperty(e)&&t.hasOwnProperty(e)&&this._modes[e].handler.setOptions(t[e])}}),L.EditToolbar=L.Toolbar.extend({statics:{TYPE:"edit"},options:{edit:{selectedPathOptions:{dashArray:"10, 10",fill:!0,fillColor:"#fe57a1",fillOpacity:.1,maintainColor:!1}},remove:{},poly:null,featureGroup:null},initialize:function(t){t.edit&&(void 0===t.edit.selectedPathOptions&&(t.edit.selectedPathOptions=this.options.edit.selectedPathOptions),t.edit.selectedPathOptions=L.extend({},this.options.edit.selectedPathOptions,t.edit.selectedPathOptions)),t.remove&&(t.remove=L.extend({},this.options.remove,t.remove)),t.poly&&(t.poly=L.extend({},this.options.poly,t.poly)),this._toolbarClass="leaflet-draw-edit",L.Toolbar.prototype.initialize.call(this,t),this._selectedFeatureCount=0},getModeHandlers:function(t){var e=this.options.featureGroup;return[{enabled:this.options.edit,handler:new L.EditToolbar.Edit(t,{featureGroup:e,selectedPathOptions:this.options.edit.selectedPathOptions,poly:this.options.poly}),title:L.drawLocal.edit.toolbar.buttons.edit},{enabled:this.options.remove,handler:new L.EditToolbar.Delete(t,{featureGroup:e}),title:L.drawLocal.edit.toolbar.buttons.remove}]},getActions:function(t){var e=[{title:L.drawLocal.edit.toolbar.actions.save.title,text:L.drawLocal.edit.toolbar.actions.save.text,callback:this._save,context:this},{title:L.drawLocal.edit.toolbar.actions.cancel.title,text:L.drawLocal.edit.toolbar.actions.cancel.text,callback:this.disable,context:this}];return t.removeAllLayers&&e.push({title:L.drawLocal.edit.toolbar.actions.clearAll.title,text:L.drawLocal.edit.toolbar.actions.clearAll.text,callback:this._clearAllLayers,context:this}),e},addToolbar:function(t){var e=L.Toolbar.prototype.addToolbar.call(this,t);return this._checkDisabled(),this.options.featureGroup.on("layeradd layerremove",this._checkDisabled,this),e},removeToolbar:function(){this.options.featureGroup.off("layeradd layerremove",this._checkDisabled,this),L.Toolbar.prototype.removeToolbar.call(this)},disable:function(){this.enabled()&&(this._activeMode.handler.revertLayers(),L.Toolbar.prototype.disable.call(this))},_save:function(){this._activeMode.handler.save(),this._activeMode&&this._activeMode.handler.disable()},_clearAllLayers:function(){this._activeMode.handler.removeAllLayers(),this._activeMode&&this._activeMode.handler.disable()},_checkDisabled:function(){var t,e=0!==this.options.featureGroup.getLayers().length;this.options.edit&&(t=this._modes[L.EditToolbar.Edit.TYPE].button,e?L.DomUtil.removeClass(t,"leaflet-disabled"):L.DomUtil.addClass(t,"leaflet-disabled"),t.setAttribute("title",e?L.drawLocal.edit.toolbar.buttons.edit:L.drawLocal.edit.toolbar.buttons.editDisabled)),this.options.remove&&(t=this._modes[L.EditToolbar.Delete.TYPE].button,e?L.DomUtil.removeClass(t,"leaflet-disabled"):L.DomUtil.addClass(t,"leaflet-disabled"),t.setAttribute("title",e?L.drawLocal.edit.toolbar.buttons.remove:L.drawLocal.edit.toolbar.buttons.removeDisabled))}}),L.EditToolbar.Edit=L.Handler.extend({statics:{TYPE:"edit"},initialize:function(t,e){if(L.Handler.prototype.initialize.call(this,t),L.setOptions(this,e),this._featureGroup=e.featureGroup,!(this._featureGroup instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this._uneditedLayerProps={},this.type=L.EditToolbar.Edit.TYPE;var i=L.version.split(".");1===parseInt(i[0],10)&&2<=parseInt(i[1],10)?L.EditToolbar.Edit.include(L.Evented.prototype):L.EditToolbar.Edit.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.t
vendor: 4,179 bytes, line 14
14ype}),this._map.fire(L.Draw.Event.EDITSTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._featureGroup.on("layeradd",this._enableLayerEdit,this).on("layerremove",this._disableLayerEdit,this))},disable:function(){this._enabled&&(this._featureGroup.off("layeradd",this._enableLayerEdit,this).off("layerremove",this._disableLayerEdit,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.EDITSTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(t.getContainer().focus(),this._featureGroup.eachLayer(this._enableLayerEdit,this),this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}),t._editTooltip=this._tooltip,this._updateTooltip(),this._map.on("mousemove",this._onMouseMove,this).on("touchmove",this._onMouseMove,this).on("MSPointerMove",this._onMouseMove,this).on(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},removeHooks:function(){this._map&&(this._featureGroup.eachLayer(this._disableLayerEdit,this),this._uneditedLayerProps={},this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this).off("touchmove",this._onMouseMove,this).off("MSPointerMove",this._onMouseMove,this).off(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},revertLayers:function(){this._featureGroup.eachLayer(function(t){this._revertLayer(t)},this)},save:function(){var e=new L.LayerGroup;this._featureGroup.eachLayer(function(t){t.edited&&(e.addLayer(t),t.edited=!1)}),this._map.fire(L.Draw.Event.EDITED,{layers:e})},_backupLayer:function(t){var e=L.Util.stamp(t);this._uneditedLayerProps[e]||(t instanceof L.Polyline||t instanceof L.Polygon||t instanceof L.Rectangle?this._uneditedLayerProps[e]={latlngs:L.LatLngUtil.cloneLatLngs(t.getLatLngs())}:t instanceof L.Circle?this._uneditedLayerProps[e]={latlng:L.LatLngUtil.cloneLatLng(t.getLatLng()),radius:t.getRadius()}:(t instanceof L.Marker||t instanceof L.CircleMarker)&&(this._uneditedLayerProps[e]={latlng:L.LatLngUtil.cloneLatLng(t.getLatLng())}))},_getTooltipText:function(){return{text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}},_updateTooltip:function(){this._tooltip.updateContent(this._getTooltipText())},_revertLayer:function(t){var e=L.Util.stamp(t);t.edited=!1,this._uneditedLayerProps.hasOwnProperty(e)&&(t instanceof L.Polyline||t instanceof L.Polygon||t instanceof L.Rectangle?t.setLatLngs(this._uneditedLayerProps[e].latlngs):t instanceof L.Circle?(t.setLatLng(this._uneditedLayerProps[e].latlng),t.setRadius(this._uneditedLayerProps[e].radius)):(t instanceof L.Marker||t instanceof L.CircleMarker)&&t.setLatLng(this._uneditedLayerProps[e].latlng),t.fire("revert-edited",{layer:t}))},_enableLayerEdit:function(t){var e,i,o=t.layer||t.target||t;this._backupLayer(o),this.options.poly&&(i=L.Util.extend({},this.options.poly),o.options.poly=i),this.options.selectedPathOptions&&((e=L.Util.extend({},this.options.selectedPathOptions)).maintainColor&&(e.color=o.options.color,e.fillColor=o.options.fillColor),o.options.original=L.extend({},o.options),o.options.editing=e),o instanceof L.Marker?(o.editing&&o.editing.enable(),o.dragging.enable(),o.on("dragend",this._onMarkerDragEnd).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onMarkerDragEnd,this).on("MSPointerUp",this._onMarkerDragEnd,this)):o.editing.enable()},_disableLayerEdit:function(t){var e=t.layer||t.target||t;e.edited=!1,e.editing&&e.editing.disable(),delete e.options.editing,delete e.options.original,this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e):(e.setStyle(e.options.previousOptions),delete e.options.previousOptions)),e instanceof L.Marker?(e.dragging.disable(),e.off("dragend",this._onMarkerDragEnd,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onMarkerDragEnd,this).off("MSPointerUp",this._onMarkerDragEnd,this)):e.editing.disable()},_onMouseMove:function(t){this._tooltip.updatePosition(t.latlng)}
14,_onMarkerDragEnd:function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},_onTouchMove:function(t){var e=t.originalEvent.changedTouches[0],i=this._map.mouseEventToLayerPoint(e),o=this._map.layerPointToLatLng(i);t.target.setLatLng(o)},_hasAvailableLayers:function(){return 0!==this._featureGroup.getLayers().length}}),L.EditToolbar.Delete=L.Handler.extend({statics:{TYPE:"remove"},initialize:function(t,e){if(L.Handler.prototype.initialize.call(this,t),L.Util.setOptions(this,e),this._deletableLayers=this.options.featureGroup,!(this._deletableLayers instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this.type=L.EditToolbar.Delete.TYPE;var i=L.version.split(".");1===parseInt(i[0],10)&&2<=parseInt(i[1],10)?L.EditToolbar.Delete.include(L.Evented.prototype):L.EditToolbar.Delete.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DELETESTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._deletableLayers.on("layeradd",this._enableLayerDelete,this).on("layerremove",this._disableLayerDelete,this))},disable:function(){this._enabled&&(this._deletableLayers.off("layeradd",this._enableLayerDelete,this).off("layerremove",this._disableLayerDelete,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DELETESTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(t.getContainer().focus(),this._deletableLayers.eachLayer(this._enableLayerDelete,this),this._deletedLayers=new L.LayerGroup,this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.remove.tooltip.text}),this._map.on("mousemove",this._onMouseMove,this))},removeHooks:function(){this._map&&(this._deletableLayers.eachLayer(this._disableLayerDelete,this),this._deletedLayers=null,this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this))},revertLayers:function(){this._deletedLayers.eachLayer(function(t){this._deletableLayers.addLayer(t),t.fire("revert-deleted",{layer:t})},this)},save:function(){this._map.fire(L.Draw.Event.DELETED,{layers:this._deletedLayers})},removeAllLayers:function(){this._deletableLayers.eachLayer(function(t){this._removeLayer({layer:t})},this),this.save()},_enableLayerDelete:function(t){(t.layer||t.target||t).on("click",this._removeLayer,this)},_disableLayerDelete:function(t){var e=t.layer||t.target||t;e.off("click",this._removeLayer,this),this._deletedLayers.removeLayer(e)},_removeLayer:function(t){var e=t.layer||t.target||t;this._deletableLayers.removeLayer(e),this._deletedLayers.addLayer(e),e.fire("deleted")},_onMouseMove:function(t){this._tooltip.updatePosition(t.latlng)},_hasAvailableLayers:function(){return 0!==this._deletableLayers.getLayers().length}})}(window,document); 15var MapManager=function(e){this.DEBUG=!1,this.STYLE_ID_ROADMAP="streets-v11",this.STYLE_ID_SATELLITE="satellite-v9",this.STYLE_ID_HYBRID="satellite-streets-v11",this.STYLE_ID_TERRAIN="outdoors-v11",this.MAPQUEST_KEY="Gmjtd%7Cluurn96bng%2Cb5%3Do5-lrba1",this.MAPBOX_ACCESS_TOKEN,this.containerId,this.markerAjaxUrl,this.detailAjaxUrl,this.map,this.clusterMarkers=!1,this.markerLayer=null,this.cachedMarkers,this.cachedAreas,this.ajaxRequest};MapManager.prototype.debug=function(e){this.DEBUG&&console.log(e)},MapManager.prototype.createMap=function(e,a){var t="https://api.mapbox.com/styles/v1/mapbox/{styleId}/tiles/{z}/{x}/{y}?access_token="+this.MAPBOX_ACCESS_TOKEN,r='<a href="https://www.mapbox.com/about/maps/" target="_blank">© Mapbox</a> <a href="https://www.openstreetmap.org/copyright" target="_blank">© OpenStreetMap</a> <a href="https://developer.mapquest.com/legal/" target="_blank">© MapQuest</a>',i=new L.TileLayer(t,{styleId:this.STYLE_ID_ROADMAP,maxZoom:18,tileSize:512,zoomOffset:-1,attribution:r}),n=new L.TileLayer(t,{styleId:this.STYLE_ID_SATELLITE,maxZoom:18,tileSize:512,zoomOffset:-1,attribution:r}),o=new L.TileLayer(t,{styleId:this.STYLE_ID_HYBRID,maxZoom:18,tileSize:512,zoomOffset:-1,attribution:r}),s=new L.TileLayer(t,{styleId:this.STYLE_ID_TERRAIN,maxZoom:18,tileSize:512,zoomOffset:-1,attribution:r});switch(e){case"G_NORMAL_MAP":case"ROADMAP":default:defaultLayer=i;break;case"G_SATELLITE_MAP":case"SATELLITE":defaultLayer=n;break;case"G_HYBRID_MAP":case"HYBRID":defaultLayer=o;break;case"G_PHYSICAL_MAP":case"TERRAIN":defaultLayer=s}if(this.map=new L.Map(this.containerId,{scrollWheelZoom:!1,layers:[defaultLayer]}),this.map.attributionControl.setPrefix(""),a){var l={Map:i,Satellite:n,Hybrid:o,Terrain:s};L.control.layers(l).addTo(this.map)}},MapManager.prototype.centerMap=function(e,a){null===a?this.map.setVie
15w(e):this.map.setView(e,a)},MapManager.prototype.fitBounds=function(e){1===e.length?this.map.setView(e[0],15):this.map.fitBounds(e,{padding:[5,5]})},MapManager.prototype.centerMapToMarker=function(e){var a=e.getLatLng();this.map.setView(a),e.getPopup()._isOpen&&this.map.panBy([0,-75])},MapManager.prototype.resetCachedAreas=function(){delete this.cachedAreas,this.cachedAreas=[]},MapManager.prototype.isCachedArea=function(){return!1},MapManager.prototype.setCachedArea=function(){this.cachedAreas.push(this.map.getBounds())},MapManager.prototype.resetMarkerCache=function(){delete this.cachedMarkers,this.cachedMarkers=[]},MapManager.prototype.isCachedMarker=function(e,a){return void 0!==this.cachedMarkers[e+"-"+a]},MapManager.prototype.setCachedMarker=function(e,a,t){this.cachedMarkers[e+"-"+a]=t},MapManager.prototype.resetMarkerLayer=function(){null!==this.markerLayer&&(this.map.removeLayer(this.markerLayer),delete this.markerLayer),this.resetMarkerCache(),this.resetCachedAreas(),this.clusterMarkers?this.markerLayer=new L.MarkerClusterGroup({showCoverageOnHover:!1,maxClusterRadius:80}):this.markerLayer=new L.LayerGroup,this.map.addLayer(this.markerLayer),this.updateCountText()},MapManager.prototype.abortAjaxRequest=function(){void 0!==this.ajaxRequest&&void 0!==this.ajaxRequest.abort()&&this.ajaxRequest.abort()},MapManager.prototype.updateCountText=function(){var a=0,t=this.map.getBounds();this.markerLayer.eachLayer(function(e){t.contains(e.getLatLng())&&a++}),ihfJquery(".ihf-map-results-count").html(a+" listings found")},MapManager.prototype.updateMarkerLayer=function(){data=this.getMarkerRequestData();var s=this;this.isCachedArea()||(this.ajaxRequest=ihfJquery.ajax({type:"GET",url:this.markerAjaxUrl,data:data,dataType:"jsonp"}).done(function(e){if(0<e.data.length){for(var a in e.data){var t=e.data[a],r=new L.LatLng(t.latitude,t.longitude),i=t.boardId,n=t.listingNumber,o=t.propertyType;s.addMarkerForMapSearch(r,i,n,o)}e.length<1e3&&s.setCachedArea(),s.updateCountText()}}))},MapManager.prototype.getMarkerRequestData=function(){var e=this.map.getBounds().getSouthWest
15(),a=this.map.getBounds().getNorthEast(),t=this.map.getZoom(),r=this.map.getCenter().lat,i=this.map.getCenter().lng,n={swlat:e.lat,swlong:e.lng,nelat:a.lat,nelong:a.lng,mapZoomLevel:t,centerLat:r,centerLong:i};return $location=ihfJquery("#ihf-refine-map-search-form input[name=location]"),$location.val()&&(n.location=$location.val()),$minPrice=ihfJquery("#ihf-refine-map-search-form input[name=minPrice]"),$minPrice.val()&&(n.minPrice=$minPrice.val()),$maxPrice=ihfJquery("#ihf-refine-map-search-form input[name=maxPrice]"),$maxPrice.val()&&(n.maxPrice=$maxPrice.val()),$bedRooms=ihfJquery("#ihf-refine-map-search-form select[name=bedRooms]"),$bedRooms.val()&&(n.bedRooms=$bedRooms.val()),$bathRooms=ihfJquery("#ihf-refine-map-search-form select[name=bathRooms]"),$bathRooms.val()&&(n.bathRooms=$bathRooms.val()),propertyType=ihfJquery('#ihf-refine-map-search-form input:checkbox[name="propertyType"]:checked').map(function(){return ihfJquery(this).val()}).get().join(","),0!==propertyType.length&&(n.propertyType=propertyType),n},MapManager.prototype.addMarkerForMapSearch=function(e,a,t,r){if(!this.isCachedMarker(a,t)){var i=this.getPropertyTypeSpecificMarkerIconHtml(r),n=new L.Point(24,24),o=new L.Point(12,30),s=new L.DivIcon({html:i,iconSize:n,iconAnchor:o}),l=new L.Marker(e,{icon:s});if(void 0!==l){this.markerLayer.addLayer(l),this.setCachedMarker(a,t,l);var p=this;l.on("click",function(e){p.openInfoWindow(this,a,t)})}}},MapManager.prototype.getPropertyTypeSpecificMarkerIconHtml=function(e){var a;switch(e){case"SFR":a='<div class="ihf-map-icon ihf-map-icon-house"><i class="fa fa-home"></i></div>';break;case"CND":a='<div class="ihf-map-icon ihf-map-icon-condo"><i class="glyphicon glyphicon-credit-card"></i></div>';break;case"LL":a='<div class="ihf-map-icon ihf-map-icon-land"><i class="glyphicon glyphicon-tree-conifer"></i></div>';break;case"COM":a='<div class="ihf-map-icon ihf-map-icon-commercial"><i class="fa fa-tag"></i></div>';break;case"RI":a='<div class="ihf-map-icon ihf-map-icon-multiunit"><i class="glyphicon glyphicon-th-large"></i></div>';break;case"MH":a='<div class="ihf-map-icon ihf-map-icon-mobilehome"><i class="fa fa-road"></i></div>';break;case"FRM":a='<div class="ihf-map-icon ihf-map-icon-house"><i class="fa fa-leaf"></i></div>';break;case"RNT":a='<div class="ihf-map-icon ihf-map-icon-rental"><i class="fa fa-building-o"></i></div>';break;default:a='<div class="ihf-map-icon ihf-map-icon-house"><i class="fa fa-home"></i></div>'}return a},MapManager.prototype.getNumericMarkerIconHtml=function(e){return'<div class="ihf-map-icon">'+e+"</div>"},MapManager.prototype.addMarkerForResultsOrDetail=function(e,a,t,r){var i=new L.Point(24,24),n=new L.Point(12,30),o=this.getNumericMarkerIconHtml(r),s=new L.DivIcon({html:o,iconSize:i,iconAnchor:n}),l=new L.Marker(a,{icon:s});if(this.markerLayer.addLayer(l),"results"===e){var p=(new L.Popup).setContent(t);l.bindPopup(p,{offset:[0,-35]});var c=this;ihfJquery('[data-map-icon="'+r+'"]').click(function(){l.togglePopup(),c.centerMapToMarker(l),ihfJquery("html, body").animate({scrollTop:ihfJquery("#"+c.containerId).offset().top-50},250)})}},MapManager.prototype.openInfoWindow=function(t,e,a){if(void 0===t.getPopup()){var r={boardId:e,listingNumber:a},i=this;this.abortAjaxRequest(),this.ajaxRequest=ihfJquery.ajax({type:"GET",url:i.detailAjaxUrl,dataType:"jsonp",data:r}).done(function(e){var a=(new L.Popup).setContent(e[0].content);t.bindPopup(a,{offset:[0,-35]}).openPopup(),i.centerMapToMarker(t)})}},MapManager.prototype.getGeoData=function(e,o){var a=ihfJquery.trim(e.term),s=this,t="//www.mapquestapi.com/geocoding/v1/address?key="+this.MAPQUEST_KEY+"&location="+encodeURIComponent(a);this.abortAjaxRequest(),this.ajaxRequest=ihfJquery.ajax({type:"GET",url:t,dataType:"jsonp"}).done(function(e){var t=s.map.getCenter(),a=[];for(var r in e.results[0].locations){var i=e.results[0].locations[r],n=s.generateLabel(i);null!==n&&a.push({label:n,value:{latLng:new L.LatLng(i.latLng.lat,i.latLng.lng)}})}a=a.sort(function(e,a){return t.distanceTo(e.value.latLng)-t.distanceTo(a.value.latLng)}),o(a)})},MapManager.prototype.generateLabel=function(e){var a=!0,t="";return 0!==e.street.length&&(t+=e.street+", "),0!==e.adminArea6.length&&(t+=e.adminArea6+", "),0!==e.adminArea5.length?t+=e.adminArea5+", ":a=!1,
150!==e.adminArea3.length?t+=e.adminArea3+", ":a=!1,0===e.adminArea1.length||"US"!==e.adminArea1&&"CA"!==e.adminArea1?a=!1:t+=e.adminArea1,a?t:null},MapManager.prototype.geocodeAddress=function(e,a,t){this.abortAjaxRequest(),this.ajaxRequest=ihfJquery.ajax({url:a,data:{address:e},dataType:"jsonp",crossDomain:!0}).done(function(e){lat=e.features[0].geometry.coordinates[1],lng=e.features[0].geometry.coordinates[0],latLng=new L.LatLng(lat,lng),t(latLng)})},MapManager.prototype.getDefaultCenter=function(){return new L.LatLng(39.8282,-98.5795)},MapManager.prototype.toggleRefineForm=function(){ihfJquery(".ihf-mapsearch-refine-overlay").toggle(),ihfJquery(".ihf-map-search-refine-link").toggle()},MapManager.prototype.getPolygonPaths=function(e){var a=[];if(e)for(var t=(e=(e=e.replace(new RegExp("^POLYGON ?\\(\\("),"")).replace(new RegExp("\\)\\)$"),"")).split(","),r=0;r<t.length;r++)if(r+1<t.length){var i=t[r].trim();if(null!=i){var n=i.split(" "),o=n[0],s=n[1],l=new L.LatLng(s,o);a.push(l)}}return a},MapManager.prototype.addPolygonToMap=function(e){null!=this.markerLayer&&new L.polygon(e,{stroke:!0,color:"#000000",weight:4,opacity:1,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0}).addTo(this.markerLayer)},MapManager.prototype.initializeMapSearch=function(e,a,t,r,i,n,o,s,l,p){this.containerId=e,this.markerAjaxUrl=o,this.detailAjaxUrl=s,this.MAPBOX_ACCESS_TOKEN=p;l=l;this.createMap(n);var c=this,h=function(e){c.centerMap(e,a),c.clusterMarkers=!0,c.resetMarkerLayer(),c.updateMarkerLayer(o),c.map.on("moveend",function(){c.updateCountText(),c.updateMarkerLayer()}),ihfJquery("#ihf-location").autocomplete({source:function(e,a){c.getGeoData(e,a)},select:function(e,a){e.preventDefault(),ihfJquery("#ihf-location").val(a.item.label),c.centerMap(a.item.value.latLng)},focus:function(e,a){e.preventDefault()}}),ihfJquery(".ihf-map-search-refine-link, #ihf-refine-search-close").click(function(){c.toggleRefineForm()}),ihfJquery("#ihf-main-search-form-submit").click(function(){c.toggleRefineForm(),c.resetMarkerLayer(),c.updateMarkerLayer()})};0!==r.length&&0!==i.length&&0!==r&&0!==i?h(new L.latLng(r,i)):0!==t.length?this.geocodeAddress(t,l,h):h(this.getDefaultCenter())},MapManager.prototype.initializeResultsOrDetailMap=function(e,i,n,a,o,s){if(!(0<!i.length)){this.containerId=e,this.MAPBOX_ACCESS_TOKEN=a;var l=this,p=(o=o,function(){if(null!==(a=function(){for(var e in i){var a=i[e];if(0===a.latitude.length||0===a.longitude.length||0===a.latitude||0===a.longitude)return a}return null}()))l.debug("listing #"+a.number+": invalid lat lng"),l.geocodeAddress(a.address,o,function(e){l.debug("listing #"+a.number+": updating listing lat lng"),a.latitude=e.lat,a.longitude=e.lng,p()});else{for(var e in l.createMap("ROADMAP",!0),listingCoordinates=[],i){var a=i[e],t=new L.LatLng(a.latitude,a.longitude);listingCoordinates.push(t)}var r=l.getPolygonPaths(s);for(var e in 0<r.length?l.fitBounds(r):l.fitBounds(listingCoordinates),l.resetMarkerLayer(),i){a=i[e];l.debug("listing #"+a.number+": adding marker");t=new L.LatLng(a.latitude,a.longitude);l.addMarkerForResultsOrDetail(n,t,a.message,a.number)}0<r.length&&l.addPolygonToMap(r)}});p()}},MapManager.prototype.initializeResultsMap=function(e,a,t,r,i){this.initializeResultsOrDetailMap(e,a,"results",t,r,i)},MapManager.prototype.initializeDetailMap=function(e,a,t,r){this.initializeResultsOrDetailMap(e,a,"detail",t,r,"")}; 16var PolygonMapManager=function(){this.containerId,this.mapBoxToken,this.map,this.ajaxRequest,this.shapeLayer=null,this.polygon,this.geocodeAddress=function(e,t,a){this.abortAjaxRequest(),t+="?address="+encodeURIComponent(e),this.ajaxRequest=ihfJquery.ajax({type:"GET",url:t,dataType:"jsonp"}).done(function(e){lat=e.features[0].geometry.coordinates[1],lng=e.features[0].geometry.coordinates[0],latLng=new L.LatLng(lat,lng),a(latLng)})},this.abortAjaxRequest=function(){void 0!==this.ajaxRequest&&void 0!==this.ajaxRequest.abort()&&this.ajaxRequest.abort()},this.createMap=function(){var e="https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/{z}/{x}/{y}?access_token="+this.mapBoxToken,t=new L.TileLayer(e,{maxZoom:18,tileSize:512,zoomOffset:-1,attribution:'<a href="https://www.mapbox.com/about/maps/" target="_blank">© Mapbox</a> <a href="https://www.openstreetmap.org/copyright" target="_blank">© OpenStreetMap</a> <a href="https://developer.mapquest.com/legal/" target="_blank">© MapQuest</a>'});this.map=new L.Map(this.containerId,{scrollWheelZoom:!1,layers:[t]}),this.map.attributionControl.setPrefix("")},this.centerMap=function(e,t,a,o,n){var i=this;if(e){var r=i.getPolygonBounds(e);
16i.map.setView(r.getCenter(),10),setTimeout(function(){i.map.fitBounds(r),n()},1e3)}else i.geocodeAddress(t,o,function(e){null===a?i.map.setView(e):i.map.setView(e,a),n()})},this.addPolygon=function(e){var t={stroke:!0,color:"#000000",weight:4,opacity:1,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},a={allowIntersection:!1,drawError:{color:"#b00b00",timeout:3e3,message:"<strong>Oh snap!<strong> you can't draw that!"},shapeOptions:t};this.shapeLayer=new L.FeatureGroup,this.map.addLayer(this.shapeLayer),null!=e&&0<e.length?(this.polygon=new L.Polygon(e,t).addTo(this.shapeLayer),this.shapeLayer.eachLayer(function(e){e.editing.enable()})):(this.polygon=new L.Draw.Polygon(this.map,a),this.polygon.enable())},this.updateBoundaryFormField=function(){var t=null;if(null!==this.shapeLayer){this.shapeLayer.eachLayer(function(e){t=e.toGeoJSON()});var e=this.polygonToWkt(t);null!=e&&ihfJquery("#ihf-boundary").val(e).trigger("change")}},this.polygonToWkt=function(e){for(var t=e.geometry.coordinates[0],a="POLYGON ((",o=(t[0],0);o<t.length;o++){var n=t[o];a+=n[0]+" "+n[1]+", "}return 100<o?(alert("Too many points drawn. Please remove "+(o-100)+" points."),null):(a=a.slice(0,-2),a+="))")},this.getPolygonBounds=function(e){for(var t=new L.LatLngBounds,a=0;a<e.length;a++)t.extend(e[a]);return t},this.getPolygonPaths=function(e){var t=[];if(!e||0===e.length)return null;for(var a=(e=(e=e.replace(new RegExp("^POLYGON ?\\(\\("),"")).replace(new RegExp("\\)\\)$"),"")).split(","),o=0;o<a.length;o++)if(o+1<a.length){var n=a[o].trim();if(null!=n){var i=n.split(" "),r=i[0],s=i[1],l=new L.LatLng(s,r);t.push(l)}}return t},this.addResetControl=function(){var e=L.Control.extend({options:{position:"topright"},onAdd:function(){var e=L.DomUtil.create("div","ihf-polygon-reset");return e.innerHTML="Start Over",e}});this.map.addControl(new e)},this.reset=function(){var t=this;if(null!=t.shapeLayer){t.shapeLayer.eachLayer(function(e){t.shapeLayer.removeLayer(e)}),void 0!==t.polygon&&void 0!==t.polygon.disable&&(t.polygon.disable(),delete t.polygon),ihfJquery("#ihf-boundary").val("").trigger("change");t.addPolygon(null)}},this.updateBoundaryFromString=function(){for(var e="POLYGON ((",t=ihfJquery("#ihf-polygon-id").val().split(","),a=0;a<t.length;a++){var o=t[a].indexOf("+"),n=t[a].substring(0,o);e+=t[a].substring(o+1)+" "+n+", "}if(100<a)return alert("Too many points drawn. Please remove "+(a-100)+" points."),null;e=e.slice(0,-2),e+="))",ihfJquery("#ihf-boundary").val(e).trigger("change")},this.updateMapLayer=function(e){var t=e.layer;t.editing.enable(),this.shapeLayer.addLayer(t)},this.initializeMapWithPolygon=function(e,t,a,o,n,i){this.containerId=e,this.mapBoxToken=t;var r=this,s=r.getPolygonPaths(i);r.createMap(),r.centerMap(s,a,o,n,function(){r.addResetControl(),r.map.on("draw:created",function(e){r.updateMapLayer(e),r.updateBoundaryFormField()}),r.addPolygon(s),r.polygon.on("edit",function(e){r.updateBoundaryFormField()}),ihfJquery("#ihf-polygon-id").on("input change",function(){r.updateBoundaryFromString()}),ihfJquery(".ihf-polygon-reset").on("click",function(){r.reset()})})}}; 17!function(){function a(n){return n&&(n.ownerDocument||n.document||n).documentElement}function T(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function o(n,t){return n<t?-1:t<n?1:t<=n?0:NaN}function c(n){return null===n?NaN:+n}function f(n){return!isNaN(n)}function n(u){return{left:function(n,t,e,r){for(arguments.length<3&&(e=0),arguments.length<4&&(r=n.length);e<r;){var i=e+r>>>1;u(n[i],t)<0?e=1+i:r=i}return e},right:function(n,t,e,r){for(arguments.length<3&&(e=0),arguments.length<4&&(r=n.length);e<r;){var i=e+r>>>1;0<u(n[i],t)?r=i:e=1+i}return e}}}function l(n){return n.length}function t(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function m(){this._=Object.create(null)}function e(n){return(n+="")===nu||n[0]===tu?tu+n:n}function r(n){return(n+="")[0]===tu?n.slice(1):n}function i(n){return e(n)in this._}function u(n){return(n=e(n))in this._&&delete this._[n]}function s(){var n=[];for(var t in this._)n.push(r(t));return n}function h(){var n=0;for(var t in this._)++n;return n}function p(){for(var n in this._)return!1;return!0}function g(){this._=Object.create(null)}function R(n){return n}function v(t,e,r){return function(){var n=r.apply(e,arguments);return n===e?t:n}}function d(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=eu.length;e<r;++e){var i=eu[e]+t;if(i in n)return i}}function y(){}function M(){}function x(i){function n(){for(var n,t=u,e=-1,r=t.length;++e<r;)(n=t[e].on)&&n.apply(this,arguments);return i}var u=[],o=new m;return n.on=function(n,t){var e,r=o.get(n);return arguments.length<2?r&&r.on:(r&&(r.on=null,u=u.slice(0,e=u.indexOf(r)).concat(u.slice(e+1)),o.remove(n)),t&&u.push(o.set(n,{on:t})),i)},n}function D(){Yi.event.preventDefault()}function b(){for(var n,t=Yi.event;n=t.sourceEvent;)t=n;return t}function P(i){for(var u=new M,n=0,t=arguments.length;++n<t;)u[arguments[n]]=x(u);return u.of=function(e,r){return function(n){try{var t=n.sourceEvent=Yi.event;n.target=i,Yi.event=n,u[n.type].apply(e,r)}finally{Yi.event=t}}},u}function _(n){return iu(n,lu),n}function w(n){return"function"==typeof n?n:function(){return uu(n,this)}}function S(n){return"function"==typeof n?n:function(){return ou(n,this)}}function k(t,e){return t=Yi.ns.qualify(t),null==e?t.local?function(){this.removeAttributeNS(t.space,t.local)}:function(){this.removeAttribute(t)}:"function"==typeof e?t.local?function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}:function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}:t.local?function(){this.setAttributeNS(t.space,t.local,e)}:function(){this.setAttribute(t,e)}}function N(n){return n.trim().replace(/\s+/g," ")}function E(n){return new RegExp("(?:^|\\s+)"+Yi.requote(n)+"(?:\\s+|$)","g")}function A(n){return(n+"").trim().split(/^|\s+/)}function C(e,r){var i=(e=A(e).map(z)).length;return"function"==typeof r?function(){for(var n=-1,t=r.apply(this,arguments);++n<i;)e[n](this,t)}:function(){for(var n=-1;++n<i;)e[n](this,r)}}function z(r){var i=E(r);return function(n,t){if(e=n.classList)return t?e.add(r):e.remove(r);var e=n.getAttribute("class")||"";t?(i.lastIndex=0,i.test(e)||n.setAttribute("class",N(e+" "+r))):n.setAttribute("class",N(e.replace(i," ")))}}function q(t,e,r){return null==e?function(){this.style.removeProperty(t)}:"function"==typeof e?function(){var n=e.apply(this,arguments);null==n?this.style.removeProperty(t):this.style.setProperty(t,n,r)}:function(){this.style.setProperty(t,e,r)}}function L(t,e){return null==e?function(){delete this[t]}:"function"==typeof e?function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}:function(){this[t]=e}}function U(e){return"function"==typeof e?e:(e=Yi.ns.qualify(e)).local?function(){return this.ownerDocument.createElementNS(e.space,e.local)}:function(){var n=this.ownerDocument,t=this.namespaceURI;return t?n.createElementNS(t,e):n.createElement(e)}}function j(){var n=this.parentNode;n&&n.removeChild(this)}function F(n){return{__data__:n}}function H(n){return function(){return au(this,n)}}function O(n,t){for(var e=0,r=n.length;e<r;e++)for(var i,u=n[e],o=0,a=u.length;o<a;o++)(i=u[o])&&t(i,o,e);return n}function I(n){return iu(n,fu),n}function Y(i,t,e){function r(){var n=this[u];n&&(this.removeEventListener(i,n,n.$),delete this[u])}var u="__on"+i,n=i.indexOf("."),o=Z;0<n&&(i=i.slice(0,n));var a=su.get(i);return a&&(i=a,o=V),n?t?function(){var n=o(t,Vi(arguments));r.call(this),this.addEventListener(i,this[u]=n,n.$=e),n._=t}:r:t?y:function(){var n,t=new RegExp("^__on([^.]+)"+Yi.requote(i)+"$");for(var e in this)if(n=e.match(t)){var r=this[e];this.removeEventListener(n[1],r,r.$),delete this[e]}}}function Z(e,r){return function(n){var t=Yi.event;Yi.event=n,r[0]=this.__data__;try{e.apply(this,r)}finally{Yi.event=t}}}function V(n,t){var e=Z(n,t);return function(n){var t=n.relatedTarget;t&&(t===this||8&t.compareDocumentPosition(this))||e.call(this,n)}}function X(n){var e=".dragsuppress-"+ ++pu,r="click"+e,i=Yi.select(T(n)).on("touchmove"+e,D).on("dragstart"+e,D).on("selectstart"+e,D);if(null==hu&&(hu=!("onselectstart"in n)&&d(n.style,"userSelect")),hu){var u=a(n).style,o=u[hu];u[hu]="none"}return function(n){if(i.on(e,null),hu&&(u[hu]=o),n){var t=function(){i.on(r,null)};i.on(r,function(){D(),t()},!0),setTimeout(t,0)}}}function $(n,t){t.changedTouches&&(t=t.changedTouches[0]);var e=n.ownerSVGElement||n;if(e.createSVGPoint){var r=e.createSVGPoint();if(gu<0){var i=T(n);if(i.scrollX||i.scrollY){var u=(e=Yi.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important"))[0][0].getScreenCTM();gu=!(u.f||u.e),e.remove()}}return gu?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),[(r=r.matrixTransform(n.getScreenCTM().inverse())).x,r.y]}var o=n.getBoundingClientRect();return[t.clientX-o.left-n.clientLeft,t.clientY-o.top-n.clientTop]}function B(){return Yi.event.changedTouches[0].identifier}function W(n){return 0<n?1:n<0?-1:0}function J(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function G(n){return 1<n?0:n<-1?yu:Math.acos(n)}function K(n){return 1<n?xu:n<-1?-xu:Math.asin(n)}function Q(n){return((n=Math.exp(n))+1/n)/2}function nn(n){return(n=Math.sin(n/2))*n}function tn(){}function en(n,t,e){return this instanceof en?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof en?new en(n.h,n.s,n.l):yn(""+n,mn,en):new en(n,t,e)}function rn(n,t,e){function r(n){return Math.round(255*function(n){return 360<n?n-=360:n<0&&(n+=360),n<60?i+(u-i)*n/60:n<180?u:n<240?i+(u-i)*(240-n)/60:i}(n))}var i,u;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:t<0?0:1<t?1:t,i=2*(e=e<0?0:1<e?1:e)-(u=e<=.5?e*(1+t):e+t-e*t),new pn(r(n+120),r(n),r(n-120))}function un(n,t,e){return this instanceof un?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof un?new un(n.h,n.c,n.l):cn(n instanceof an?n.l:(n=Mn((n=Yi.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new un(n,t,e)}function on(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new an(e,Math.cos(n*=bu)*t,Math.sin(n)*t)}function an(n,t,e){return this instanceof an?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof an?new an(n.l,n.a,n.b):n instanceof un?on(n.h,n.c,n.l):Mn((n=pn(n)).r,n.g,n.b):new an(n,t,e)}function ln(n,t,e){var r=(n+16)/116,i=r+t/500,u=r-e/200;return new pn(hn(3.2404542*(i=fn(i)*zu)-1.5371385*(r=fn(r)*qu)-.4985314*(u=fn(u)*Lu)),hn(-.969266*i+1.8760108*r+.041556*u),hn(.0556434*i-.2040259*r+1.0572252*u))}function cn(n,t,e){return 0<n?new un(Math.atan2(e,t)*_u,Math.sqrt(t*t+e*e),n):new un(NaN,NaN,n)}function fn(n){return.206893034<n?n*n*n:(n-4/29)/7.787037}function sn(n){return.008856<n?Math.pow(n,1/3):7.787037*n+4/29}function hn(n){return Math.round(255*(n<=.00304?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function pn(n,t,e){return this instanceof pn?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof pn?new pn(n.r,n.g,n.b):yn(""+n,pn,rn):new pn(n,t,e)}function gn(n){return new pn(n>>16,n>>8&255,255&n)}function vn(n){return gn(n)+""}function dn(n){return n<16?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function yn(n,t,e){n=n.toLowerCase();var r,i,u,o=0,a=0,l=0;if(r=/([a-z]+)\((.*)\)/.exec(n))switch(i=r[2].split(","),r[1]){case"hsl":return e(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(bn(i[0]),bn(i[1]),bn(i[2]))}return(u=Du.get(n))?t(u.r,u.g,u.b):(null==n||"#"!==n.charAt(0)||isNaN(u=parseInt(n.slice(1),16))||(4===n.length?(o=(3840&u)>>4,o|=o>>4,a=240&u,a|=a>>4,l=15&u,l|=l<<4):7===n.length&&(o=(16711680&u)>>16,a=(65280&u)>>8,l=255&u)),t(o,a,l))}function mn(n,t,e){var r,i,u=Math.min(n/=255,t/=255,e/=255),o=Math.max(n,t,e),a=o-u,l=(o+u)/2;return a?(i=l<.5?a/(o+u):a/(2-o-u),r=n==o?(t-e)/a+(t<e?6:0):t==o?(e-n)/a+2:(n-t)/a+4,r*=60):(r=NaN,i=0<l&&l<1?0:r),new en(r,i,l)}function Mn(n,t,e){var r=sn((.4124564*(n=xn(n))+.3575761*(t=xn(t))+.1804375*(e=xn(e)))/zu),i=sn((.2126729*n+.71
1751522*t+.072175*e)/qu);return an(116*i-16,500*(r-i),200*(i-sn((.0193339*n+.119192*t+.9503041*e)/Lu)))}function xn(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function bn(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function _n(n){return"function"==typeof n?n:function(){return n}}function wn(r){return function(n,t,e){return 2===arguments.length&&"function"==typeof t&&(e=t,t=null),Sn(n,t,r,e)}}function Sn(i,u,e,n){function t(){var n,t=c.status;if(!t&&function(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}(c)||200<=t&&t<300||304===t){try{n=e.call(o,c)}catch(n){return void a.error.call(o,n)}a.load.call(o,n)}else a.error.call(o,c)}var o={},a=Yi.dispatch("beforesend","progress","load","error"),l={},c=new XMLHttpRequest,f=null;return!this.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(i)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=t:c.onreadystatechange=function(){3<c.readyState&&t()},c.onprogress=function(n){var t=Yi.event;Yi.event=n;try{a.progress.call(o,c)}finally{Yi.event=t}},o.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?l[n]:(null==t?delete l[n]:l[n]=t+"",o)},o.mimeType=function(n){return arguments.length?(u=null==n?null:n+"",o):u},o.responseType=function(n){return arguments.length?(f=n,o):f},o.response=function(n){return e=n,o},["get","post"].forEach(function(n){o[n]=function(){return o.send.apply(o,[n].concat(Vi(arguments)))}}),o.send=function(n,t,e){if(2===arguments.length&&"function"==typeof t&&(e=t,t=null),c.open(n,i,!0),null==u||"accept"in l||(l.accept=u+",*/*"),c.setRequestHeader)for(var r in l)c.setRequestHeader(r,l[r]);return null!=u&&c.overrideMimeType&&c.overrideMimeType(u),null!=f&&(c.responseType=f),null!=e&&o.on("error",e).on("load",function(n){e(null,n)}),a.beforesend.call(o,c),c.send(null==t?null:t),o},o.abort=function(){return c.abort(),o},Yi.rebind(o,a,"on"),null==n?o:o.get(function(e){return 1===e.length?function(n,t){e(null==n?t:null)}:e}(n))}function kn(){var n=Nn(),t=En()-n;24<t?(isFinite(t)&&(clearTimeout(Fu),Fu=setTimeout(kn,t)),ju=0):(ju=1,Ou(kn))}function Nn(){var n=Date.now();for(Hu=Pu;Hu;)n>=Hu.t&&(Hu.f=Hu.c(n-Hu.t)),Hu=Hu.n;return n}function En(){for(var n,t=Pu,e=1/0;t;)t=t.f?n?n.n=t.n:Pu=t.n:(t.t<e&&(e=t.t),(n=t).n);return Uu=n,e}function An(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function Cn(n){return n+""}function zn(){this._=new Date(1<arguments.length?Date.UTC.apply(this,arguments):arguments[0])}function qn(r,u,o){function n(n){var t=r(n),e=i(t,1);return n-t<e-n?t:e}function a(n){return u(n=r(new Xu(n-1)),1),n}function i(n,t){return u(n=new Xu(+n),t),n}function l(n,t,e){var r=a(n),i=[];if(1<e)for(;r<t;)o(r)%e||i.push(new Date(+r)),u(r,1);else for(;r<t;)i.push(new Date(+r)),u(r,1);return i}(r.floor=r).round=n,r.ceil=a,r.offset=i,r.range=l;var t=r.utc=Ln(r);return(t.floor=t).round=Ln(n),t.ceil=Ln(a),t.offset=Ln(i),t.range=function(n,t,e){try{var r=new(Xu=zn);return r._=n,l(r,t,e)}finally{Xu=Date}},r}function Ln(r){return function(n,t){try{var e=new(Xu=zn);return e._=n,r(e,t)._}finally{Xu=Date}}}function Tn(n,t,e){var r=n<0?"-":"",i=(r?-n:n)+"",u=i.length;return r+(u<e?new Array(e-u+1).join(t)+i:i)}function Rn(n){return new RegExp("^(?:"+n.map(Yi.requote).join("|")+")","i")}function Dn(n){for(var t=new m,e=-1,r=n.length;++e<r;)t.set(n[e].toLowerCase(),e);return t}function Pn(n,t,e){Wu.lastIndex=0;var r=Wu.exec(t.slice(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function Un(n,t,e){Wu.lastIndex=0;var r=Wu.exec(t.slice(e));return r?(n.U=+r[0],e+r[0].length):-1}function jn(n,t,e){Wu.lastIndex=0;var r=Wu.exec(t.slice(e));return r?(n.W=+r[0],e+r[0].length):-1}function Fn(n,t,e){Wu.lastIndex=0;var r=Wu.exec(t.slice(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Hn(n,t,e){Wu.lastIndex=0;var r=Wu.exec(t.slice(e,e+2));return r?(n.y=function(n){return n+(68<n?1900:2e3)}(+r[0]),e+r[0].length):-1}function On(n,t,e){return/^[+-]\d{4}$/.test(t=t.slice(e,e+5))?(n.Z=-t,e+5):-1}function In(n,t,e){Wu.lastIndex=0;var r=Wu.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function Yn(n,t,e){Wu.lastIndex=0;var r=Wu.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function Zn(n,t,e){Wu.lastIndex=0;var r=Wu.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function Vn(n,t,e){Wu.lastIndex=0;var r=Wu.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function Xn(n,t,e){Wu.lastIndex=0;var r=Wu.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function $n(n,t,e){Wu.lastIndex=0;var r=Wu.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function Bn(n,t,e){Wu.lastIndex=0;var r=Wu.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function Wn(n){var t=n.getTimezoneOffset(),e=0<t?"-":"+",r=Qi(t)/60|0,i=Qi(t)%60;return e+Tn(r,"0",2)+Tn(i,"0",2)}function Jn(n,t,e){Ju.lastIndex=0;var r=Ju.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function Gn(r){for(var n=r.length,t=-1;++t<n;)r[t][0]=this(r[t][0]);return function(n){for(var t=0,e=r[t];!e[1](n);)e=r[++t];return e[0](n)}}function Kn(){}function Qn(n,t,e){var r=e.s=n+t,i=r-n,u=r-i;e.t=n-u+(t-i)}function nt(n,t){n&&no.hasOwnProperty(n.type)&&no[n.type](n,t)}function tt(n,t,e){var r,i=-1,u=n.length-e;for(t.lineStart();++i<u;)r=n[i],t.point(r[0],r[1],r[2]);t.lineEnd()}function et(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)tt(n[e],t,1);t.polygonEnd()}function rt(){function e(n,t){t=t*bu/2+yu/4;var e=(n*=bu)-f,r=0<=e?1:-1,i=r*e,u=Math.cos(t),o=Math.sin(t),a=h*o,l=s*u+a*Math.cos(i),c=a*r*Math.sin(i);eo.add(Math.atan2(c,l)),f=n,s=u,h=o}var r,i,f,s,h;ro.point=function(n,t){ro.point=e,f=(r=n)*bu,s=Math.cos(t=(i=t)*bu/2+yu/4),h=Math.sin(t)},ro.lineEnd=function(){e(r,i)}}
vendor: 3,889 bytes, line 17
17function it(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function ut(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function ot(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function at(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function lt(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function ct(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function ft(n){return[Math.atan2(n[1],n[0]),K(n[2])]}function st(n,t){return Qi(n[0]-t[0])<vu&&Qi(n[1]-t[1])<vu}function ht(n,t){n*=bu;var e=Math.cos(t*=bu);pt(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function pt(n,t,e){oo+=(n-oo)/++io,ao+=(t-ao)/io,lo+=(e-lo)/io}function gt(){function r(n,t){n*=bu;var e=Math.cos(t*=bu),r=e*Math.cos(n),i=e*Math.sin(n),u=Math.sin(t),o=Math.atan2(Math.sqrt((o=l*u-c*i)*o+(o=c*r-a*u)*o+(o=a*i-l*r)*o),a*r+l*i+c*u);uo+=o,co+=o*(a+(a=r)),fo+=o*(l+(l=i)),so+=o*(c+(c=u)),pt(a,l,c)}var a,l,c;vo.point=function(n,t){n*=bu;var e=Math.cos(t*=bu);a=e*Math.cos(n),l=e*Math.sin(n),c=Math.sin(t),vo.point=r,pt(a,l,c)}}function vt(){vo.point=ht}function dt(){function r(n,t){n*=bu;var e=Math.cos(t*=bu),r=e*Math.cos(n),i=e*Math.sin(n),u=Math.sin(t),o=g*u-v*i,a=v*r-p*u,l=p*i-g*r,c=Math.sqrt(o*o+a*a+l*l),f=p*r+g*i+v*u,s=c&&-G(f)/c,h=Math.atan2(c,f);ho+=s*o,po+=s*a,go+=s*l,uo+=h,co+=h*(p+(p=r)),fo+=h*(g+(g=i)),so+=h*(v+(v=u)),pt(p,g,v)}var i,u,p,g,v;vo.point=function(n,t){i=n,u=t,vo.point=r,n*=bu;var e=Math.cos(t*=bu);p=e*Math.cos(n),g=e*Math.sin(n),v=Math.sin(t),pt(p,g,v)},vo.lineEnd=function(){r(i,u),vo.lineEnd=vt,vo.point=ht}}function yt(e,r){function n(n,t){return n=e(n,t),r(n[0],n[1])}return e.invert&&r.invert&&(n.invert=function(n,t){return(n=r.invert(n,t))&&e.invert(n[0],n[1])}),n}function mt(){return!0}function Mt(n,t,e,r,a){var l=[],c=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,e=n[0],r=n[t];if(st(e,r)){a.lineStart();for(var i=0;i<t;++i)a.point((e=n[i])[0],e[1]);return void a.lineEnd()}var u=new bt(e,n,null,!0),o=new bt(e,null,u,!1);u.o=o,l.push(u),c.push(o),o=new bt(r,null,u=new bt(r,n,null,!1),!0),u.o=o,l.push(u),c.push(o)}}),c.sort(t),xt(l),xt(c),l.length){for(var i=0,u=e,o=c.length;i<o;++i)c[i].e=u=!u;for(var f,s,h=l[0];;){for(var p=h,g=!0;p.v;)if((p=p.n)===h)return;f=p.z,a.lineStart();do{if(p.v=p.o.v=!0,p.e){if(g)for(i=0,o=f.length;i<o;++i)a.point((s=f[i])[0],s[1]);else r(p.x,p.n.x,1,a);p=p.n}else{if(g)for(i=(f=p.p.z).length-1;0<=i;--i)a.point((s=f[i])[0],s[1]);else r(p.x,p.p.x,-1,a);p=p.p}f=(p=p.o).z,g=!g}while(!p.v);a.lineEnd()}}}function xt(n){if(t=n.length){for(var t,e,r=0,i=n[0];++r<t;)i.n=e=n[r],e.p=i,i=e;i.n=e=n[0],e.p=i}}function bt(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function _t(m,M,x,b){return function(r,o){function t(n,t){var e=r(n,t);m(n=e[0],t=e[1])&&o.point(n,t)}function n(n,t){var e=r(n,t);h.point(e[0],e[1])}function e(){g.point=n,h.lineStart()}function i(){g.point=t,h.lineEnd()}function a(n,t){s.push([n,t]);var e=r(n,t);d.point(e[0],e[1])}function u(){d.lineStart(),s=[]}function l(){a(s[0][0],s[0][1]),d.lineEnd();var n,t=d.clean(),e=v.buffer(),r=e.length;if(s.pop(),f.push(s),s=null,r)if(1&t){var i,u=-1;if(0<(r=(n=e[0]).length-1)){for(y||(o.polygonStart(),y=!0),o.lineStart();++u<r;)o.point((i=n[u])[0],i[1]);o.lineEnd()}}else 1<r&&2&t&&e.push(e.pop().concat(e.shift())),c.push(e.filter(wt))}var c,f,s,h=M(o),p=r.invert(b[0],b[1]),g={point:t,lineStart:e,lineEnd:i,polygonStart:function(){g.point=a,g.lineStart=u,g.lineEnd=l,c=[],f=[]},polygonEnd:function(){g.point=t,g.lineStart=e,g.lineEnd=i,c=Yi.merge(c);var n=function(n,t){var e=n[0],r=n[1],i=[Math.sin(e),-Math.cos(e),0],u=0,o=0;eo.reset();for(var a=0,l=t.length;a<l;++a){var c=t[a],f=c.length;if(f)for(var s=c[0],h=s[0],p=s[1]/2+yu/4,g=Math.sin(p),v=Math.cos(p),d=1;;){d===f&&(d=0);var y=(n=c[d])[0],m=n[1]/2+yu/4,M=Math.sin(m),x=Math.cos(m),b=y-h,_=0<=b?1:-1,w=_*b,S=yu<w,k=g*M;
17if(eo.add(Math.atan2(k*_*Math.sin(w),v*x+k*Math.cos(w))),u+=S?b+_*mu:b,S^e<=h^e<=y){var N=ot(it(s),it(n));ct(N);var E=ot(i,N);ct(E);var A=(S^0<=b?-1:1)*K(E[2]);(A<r||r===A&&(N[0]||N[1]))&&(o+=S^0<=b?1:-1)}if(!d++)break;h=y,g=M,v=x,s=n}}return(u<-vu||u<vu&&eo<0)^1&o}(p,f);c.length?(y||(o.polygonStart(),y=!0),Mt(c,kt,n,x,o)):n&&(y||(o.polygonStart(),y=!0),o.lineStart(),x(null,null,1,o),o.lineEnd()),y&&(o.polygonEnd(),y=!1),c=f=null},sphere:function(){o.polygonStart(),o.lineStart(),x(null,null,1,o),o.lineEnd(),o.polygonEnd()}},v=St(),d=M(v),y=!1;return g}}function wt(n){return 1<n.length}function St(){var e,t=[];return{lineStart:function(){t.push(e=[])},point:function(n,t){e.push([n,t])},lineEnd:y,buffer:function(){var n=t;return t=[],e=null,n},rejoin:function(){1<t.length&&t.push(t.pop().concat(t.shift()))}}}function kt(n,t){return((n=n.x)[0]<0?n[1]-xu-vu:xu-n[1])-((t=t.x)[0]<0?t[1]-xu-vu:xu-t[1])}function Nt(f,s,h,p){return function(n){var t,e=n.a,r=n.b,i=e.x,u=e.y,o=0,a=1,l=r.x-i,c=r.y-u;if(t=f-i,l||!(0<t)){if(t/=l,l<0){if(t<o)return;t<a&&(a=t)}else if(0<l){if(a<t)return;o<t&&(o=t)}if(t=h-i,l||!(t<0)){if(t/=l,l<0){if(a<t)return;o<t&&(o=t)}else if(0<l){if(t<o)return;t<a&&(a=t)}if(t=s-u,c||!(0<t)){if(t/=c,c<0){if(t<o)return;t<a&&(a=t)}else if(0<c){if(a<t)return;o<t&&(o=t)}if(t=p-u,c||!(t<0)){if(t/=c,c<0){if(a<t)return;o<t&&(o=t)}else if(0<c){if(t<o)return;t<a&&(a=t)}return 0<o&&(n.a={x:i+o*l,y:u+o*c}),a<1&&(n.b={x:i+a*l,y:u+a*c}),n}}}}}}function Et(x,b,_,w){function S(n,t){return Qi(n[0]-x)<vu?0<t?0:3:Qi(n[0]-_)<vu?0<t?2:1:Qi(n[1]-b)<vu?0<t?1:0:0<t?3:2}function k(n,t){return N(n.x,t.x)}function N(n,t){var e=S(n,1),r=S(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(i){function r(n,t,e,r){var i=0,u=0;if(null==n||(i=S(n,e))!==(u=S(t,e))||N(n,t)<0^0<e)for(;r.point(0===i||3===i?x:_,1<i?w:b),(i=(i+e+4)%4)!==u;);else r.point(t[0],t[1])}function u(n,t){return x<=n&&n<=_&&b<=t&&t<=w}function n(n,t){u(n,t)&&i.point(n,t)}function t(n,t){var e=u(n=Math.max(-mo,Math.min(mo,n)),t=Math.max(-mo,Math.min(mo,t)));if(f&&a.push([n,t]),v)l=n,c=t,v=!1,(s=e)&&(i.lineStart(),i.point(n,t));else if(e&&g)i.point(n,t);else{var r={a:{x:h,y:p},b:{x:n,y:t}};m(r)?(g||(i.lineStart(),i.point(r.a.x,r.a.y)),i.point(r.b.x,r.b.y),e||i.lineEnd(),d=!1):e&&(i.lineStart(),i.point(n,t),d=!1)}h=n,p=t,g=e}var o,f,a,l,c,s,h,p,g,v,d,y=i,e=St(),m=Nt(x,b,_,w),M={point:n,lineStart:function(){M.point=t,f&&f.push(a=[]),g=!(v=!0),h=p=NaN},lineEnd:function(){o&&(t(l,c),s&&g&&e.rejoin(),o.push(e.buffer())),M.point=n,g&&i.lineEnd()},polygonStart:function(){i=e,o=[],f=[],d=!0},polygonEnd:function(){i=y,o=Yi.merge(o);var n=function(n){for(var t=0,e=f.length,r=n[1],i=0;i<e;++i)for(var u,o=1,a=f[i],l=a.length,c=a[0];o<l;++o)u=a[o],c[1]<=r?u[1]>r&&0<J(c,u,n)&&++t:u[1]<=r&&J(c,u,n)<0&&--t,c=u;return 0!==t}([x,w]),t=d&&n,e=o.length;(t||e)&&(i.polygonStart(),t&&(i.lineStart(),r(null,null,1,i),i.lineEnd()),e&&Mt(o,k,n,r,i),i.polygonEnd()),o=f=a=null}};return M}}function At(n){var t=0,e=yu/3,r=It(n),i=r(t,e);return i.parallels=function(n){return arguments.length?r(t=n[0]*yu/180,e=n[1]*yu/180):[t/yu*180,e/yu*180]},i}function Ct(n,t){function e(n,t){var e=Math.sqrt(u-2*i*Math.sin(t))/i;return[e*Math.sin(n*=i),o-e*Math.cos(n)]}var r=Math.sin(n),i=(r+Math.sin(t))/2,u=1+r*(2*i-r),o=Math.sqrt(u)/i;return e.invert=function(n,t){var e=o-t;return[Math.atan2(n,e)/i,K((u-(n*n+e*e)*i*i)/(2*i))]},e}function zt(){function e(n,t){xo+=o*n-u*t,u=n,o=t}var r,i,u,o;ko.point=function(n,t){ko.point=e,r=u=n,i=o=t},ko.lineEnd=function(){e(r,i)}}function qt(){function n(n,t){o.push("M",n,",",t,u)}function t(n,t){o.push("M",n,",",t),a.point=e}function e(n,t){o.push("L",n,",",t)}function r(){a.point=n}function i(){o.push("Z")}var u=Lt(4.5),o=[],a={point:n,lineStart:function(){a.point=t},lineEnd:r,polygonStart:function(){a.lineEnd=i},polygonEnd:function(){a.lineEnd=r,a.point=n},pointRadius:function(n){return u=Lt(n),a},result:function(){if(o.length){var n=o.join("");return o=[],n}}};return a}function Lt(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Tt(n,t){oo+=n,ao+=t,++lo}function Rt(){function e(n,t){var e=n-u,r=t-o,i=Math.sqrt(e*e+r*r);co+=i*(u+n)/2,fo+=i*(o+t)/2,so+=i,Tt(u=n,o=t)}var u,o;Eo.point=function(n,t){Eo.point=e,Tt(u=n,o=t)}}function Dt(){Eo.point=Tt}function Pt(){function e(n,t){var e=n-u,r=t-o,i=Math.sqrt(e*e+r*r);co+=i*(u+n)/2,fo+=i*(o+t)/2,so+=i,ho+=(i=o*n-u*t)*(u+n),po+=i*(o+t),go+=3*i,Tt(u=n,o=t)}var r,i,u,o;Eo.point=function(n,t){Eo.point=e,Tt(r=u=n,i=o=t)},Eo.lineEnd=function(){e(r,i)}}function Ut(e){function n(n,t){e.moveTo(n+o,t),e.arc(n,t,o,0,mu)}function t(n,t){e.moveTo(n,t),a.point=r}function r(n,t){e.lineTo(n,t)}function i(){a.point=n}function u(){e.closePath()}var o=4.5,a={point:n,lineStart:function(){a.point=t},lineEnd:i,polygonStart:function(){a.lineEnd=u},polygonEnd:function(){a.lineEnd=i,a.point=n},pointRadius:function(n){return o=n,a},result:y};return a}function jt(C){function t(n){return(b?function(i){function n(n,t){n=C(n,t),i.point(n[0],n[1])}function t(){v=NaN,x.point=e,i.lineStart()}function e(n,t){var e=it([n,t]),r=C(n,t);z(v,d,g,y,m,M,v=r[0],d=r[1],g=n,y=e[0],m=e[1],M=e[2],b,i),i.point(v,d)}function r(){x.point=n,i.lineEnd()}function u(){t(),x.point=o,x.lineEnd=a}
17function o(n,t){e(l=n,t),c=v,f=d,s=y,h=m,p=M,x.point=e}function a(){z(v,d,g,y,m,M,c,f,l,s,h,p,b,i),(x.lineEnd=r)()}var l,c,f,s,h,p,g,v,d,y,m,M,x={point:n,lineStart:t,lineEnd:r,polygonStart:function(){i.polygonStart(),x.lineStart=u},polygonEnd:function(){i.polygonEnd(),x.lineStart=t}};return x}:function(e){return Ht(e,function(n,t){n=C(n,t),e.point(n[0],n[1])})})(n)}function z(n,t,e,r,i,u,o,a,l,c,f,s,h,p){var g=o-n,v=a-t,d=g*g+v*v;if(4*q<d&&h--){var y=r+c,m=i+f,M=u+s,x=Math.sqrt(y*y+m*m+M*M),b=Math.asin(M/=x),_=Qi(Qi(M)-1)<vu||Qi(e-l)<vu?(e+l)/2:Math.atan2(m,y),w=C(_,b),S=w[0],k=w[1],N=S-n,E=k-t,A=v*N-g*E;(q<A*A/d||.3<Qi((g*N+v*E)/d-.5)||r*c+i*f+u*s<L)&&(z(n,t,e,r,i,u,S,k,_,y/=x,m/=x,M,h,p),p.point(S,k),z(S,k,_,y,m,M,o,a,l,c,f,s,h,p))}}var q=.5,L=Math.cos(30*bu),b=16;return t.precision=function(n){return arguments.length?(b=0<(q=n*n)&&16,t):Math.sqrt(q)},t}function Ft(n){this.stream=n}function Ht(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function Ot(n){return It(function(){return n})()}function It(n){function t(n){return[(n=a(n[0]*bu,n[1]*bu))[0]*h+l,c-n[1]*h]}function e(n){return(n=a.invert((n[0]-l)/h,(c-n[1])/h))&&[n[0]*_u,n[1]*_u]}function r(){a=yt(o=Xt(y,m,M),u);var n=u(v,d);return l=p-n[0]*h,c=g+n[1]*h,i()}function i(){return f&&(f.valid=!1,f=null),t}var u,o,a,l,c,f,s=jt(function(n,t){return[(n=u(n,t))[0]*h+l,c-n[1]*h]}),h=150,p=480,g=250,v=0,d=0,y=0,m=0,M=0,x=yo,b=R,_=null,w=null;return t.stream=function(n){return f&&(f.valid=!1),(f=Yt(x(o,s(b(n))))).valid=!0,f},t.clipAngle=function(n){return arguments.length?(x=null==n?(_=n,yo):function(i){function p(n,t){return Math.cos(n)*Math.cos(t)>N}function g(n,t,e){var r=[1,0,0],i=ot(it(n),it(t)),u=ut(i,i),o=i[0],a=u-o*o;if(!a)return!e&&n;var l=N*u/a,c=-N*o/a,f=ot(r,i),s=lt(r,l);at(s,lt(i,c));var h=f,p=ut(s,h),g=ut(h,h),v=p*p-g*(ut(s,s)-1);if(!(v<0)){var d=Math.sqrt(v),y=lt(h,(-p-d)/g);if(at(y,s),y=ft(y),!e)return y;var m,M=n[0],x=t[0],b=n[1],_=t[1];x<M&&(m=M,M=x,x=m);var w=x-M,S=Qi(w-yu)<vu;if(!S&&_<b&&(m=b,b=_,_=m),S||w<vu?S?0<b+_^y[1]<(Qi(y[0]-M)<vu?b:_):b<=y[1]&&y[1]<=_:yu<w^(M<=y[0]&&y[0]<=x)){var k=lt(h,(-p+d)/g);return at(k,s),[y,ft(k)]}}}function v(n,t){var e=d?i:yu-i,r=0;return n<-e?r|=1:e<n&&(r|=2),t<-e?r|=4:e<t&&(r|=8),r}var N=Math.cos(i),d=0<N,y=Qi(N)>vu;return _t(p,function(a){var l,c,f,s,h;return{lineStart:function(){s=f=!1,h=1},point:function(n,t){var e,r=[n,t],i=p(n,t),u=d?i?0:v(n,t):i?v(n+(n<0?yu:-yu),t):0;if(!l&&(s=f=i)&&a.lineStart(),i!==f&&(e=g(l,r),(st(l,e)||st(r,e))&&(r[0]+=vu,r[1]+=vu,i=p(r[0],r[1]))),i!==f)h=0,i?(a.lineStart(),e=g(r,l),a.point(e[0],e[1])):(e=g(l,r),a.point(e[0],e[1]),a.lineEnd()),l=e;else if(y&&l&&d^i){var o;u&c||!(o=g(r,l,!0))||(h=0,d?(a.lineStart(),a.point(o[0][0],o[0][1]),a.point(o[1][0],o[1][1]),a.lineEnd()):(a.point(o[1][0],o[1][1]),a.lineEnd(),a.lineStart(),a.point(o[0][0],o[0][1])))}!i||l&&st(l,r)||a.point(r[0],r[1]),l=r,f=i,c=u},lineEnd:function(){f&&a.lineEnd(),l=null},clean:function(){return h|(s&&f)<<1}}},Jt(i,6*bu),d?[0,-i]:[-yu,i-yu])}((_=+n)*bu),i()):_},t.clipExtent=function(n){return arguments.length?(b=(w=n)?Et(n[0][0],n[0][1],n[1][0],n[1][1]):R,i()):w},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(p=+n[0],g=+n[1],r()):[p,g]},t.center=function(n){return arguments.length?(v=n[0]%360*bu,d=n[1]%360*bu,r()):[v*_u,d*_u]},t.rotate=function(n){return arguments.length?(y=n[0]%360*bu,m=n[1]%360*bu,M=2<n.length?n[2]%360*bu:0,r()):[y*_u,m*_u,M*_u]},Yi.rebind(t,s,"precision"),function(){return u=n.apply(this,arguments),t.invert=u.invert&&e,r()}}function Yt(e){return Ht(e,function(n,t){e.point(n*bu,t*bu)})}function Zt(n,t){return[n,t]}function Vt(n,t){return[yu<n?n-mu:n<-yu?n+mu:n,t]}function Xt(n,t,e){return n?t||e?yt(Bt(n),Wt(t,e)):Bt(n):t||e?Wt(t,e):Vt}function $t(e){return function(n,t){return[yu<(n+=e)?n-mu:n<-yu?n+mu:n,t]}}function Bt(n){var t=$t(n);return t.invert=$t(-n),t}function Wt(n,t){function e(n,t){var e=Math.cos(t),r=Math.cos(n)*e,i=Math.sin(n)*e,u=Math.sin(t),o=u*a+r*l;return[Math.atan2(i*c-o*f,r*a-u*l),K(o*c+i*f)]}var a=Math.cos(n),l=Math.sin(n),c=Math.cos(t),f=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),r=Math.cos(n)*e,i=Math.sin(n)*e,u=Math.sin(t),o=u*c-i*f;return[Math.atan2(i*c+u*f,r*a+o*l),K(o*a-r*l)]},e}function Jt(a,l){var c=Math.cos(a),f=Math.sin(a);return function(n,t,e,r){var i=e*l;null!=n?(n=Gt(c,n),t=Gt(c,t),(0<e?n<t:t<n)&&(n+=e*mu)):(n=a+e*mu,t=a-.5*i);for(var u,o=n;0<e?t<o:o<t;o-=i)r.point((u=ft([c,-f*Math.cos(o),-f*Math.sin(o)]))[0],u[1])}}function Gt(n,t){var e=it(t);e[0]-=n,ct(e);var r=G(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-vu)%(2*Math.PI)}function Kt(n,t,e){var r=Yi.range(n,t-vu,e).concat(t);return function(t){return r.map(function(n){return[t,n]})}}function Qt(n,t,e){var r=Yi.range(n,t-vu,e).concat(t);return function(t){return r.map(function(n){return[n,t]})}}function ne(n){return n.source}function te(n){return n.target}function ee(u,o){function n(n,t){var e=Math.cos(n),r=Math.cos(t),i=u(e*r);return[i*r*Math.sin(n),i*Math.sin(t)]}return n.invert=function(n,t){var e=Math.sqrt(n*n+t*t),r=o(e),i=Math.sin(r),u=Math.cos(r);return[Math.atan2(n*i,e*u),Math.asin(e&&t*i/e)]},n}function re(n,t){function e(n,t){0<o?t<-xu+vu&&(t=-xu+vu):xu-vu<t&&(t=xu-vu);var e=o/Math.pow(i(t),u);return[e*Math.sin(u*n),o-e*Math.cos(u*n)]}
vendor: 9,072 bytes, line 17
17var r=Math.cos(n),i=function(n){return Math.tan(yu/4+n/2)},u=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(i(t)/i(n)),o=r*Math.pow(i(n),u)/u;return u?(e.invert=function(n,t){var e=o-t,r=W(u)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/u,2*Math.atan(Math.pow(o/r,1/u))-xu]},e):ue}function ie(n,t){function e(n,t){var e=u-t;return[e*Math.sin(i*n),u-e*Math.cos(i*n)]}var r=Math.cos(n),i=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),u=r/i+n;return Qi(i)<vu?Zt:(e.invert=function(n,t){var e=u-t;return[Math.atan2(n,e)/i,u-W(i)*Math.sqrt(n*n+e*e)]},e)}function ue(n,t){return[n,Math.log(Math.tan(yu/4+t/2))]}function oe(n){var i,u=Ot(n),o=u.scale,a=u.translate,l=u.clipExtent;return u.scale=function(){var n=o.apply(u,arguments);return n===u?i?u.clipExtent(null):u:n},u.translate=function(){var n=a.apply(u,arguments);return n===u?i?u.clipExtent(null):u:n},u.clipExtent=function(n){var t=l.apply(u,arguments);if(t===u){if(i=null==n){var e=yu*o(),r=a();l([[r[0]-e,r[1]-e],[r[0]+e,r[1]+e]])}}else i&&(t=null);return t},u.clipExtent(null)}function ae(n,t){return[Math.log(Math.tan(yu/4+t/2)),-n]}function le(n){return n[0]}function ce(n){return n[1]}function fe(n){for(var t=n.length,e=[0,1],r=2,i=2;i<t;i++){for(;1<r&&J(n[e[r-2]],n[e[r-1]],n[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}function se(n,t){return n[0]-t[0]||n[1]-t[1]}function he(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function pe(n,t,e,r){var i=n[0],u=e[0],o=t[0]-i,a=r[0]-u,l=n[1],c=e[1],f=t[1]-l,s=r[1]-c,h=(a*(l-c)-s*(i-u))/(s*o-a*f);return[i+h*o,l+h*f]}function ge(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function ve(){Te(this),this.edge=this.site=this.circle=null}function de(n){var t=Oo.pop()||new ve;return t.site=n,t}function ye(n){Ne(n),jo.remove(n),Oo.push(n),Te(n)}function me(n){var t=n.circle,e=t.x,r=t.cy,i={x:e,y:r},u=n.P,o=n.N,a=[n];ye(n);for(var l=u;l.circle&&Qi(e-l.circle.x)<vu&&Qi(r-l.circle.cy)<vu;)u=l.P,a.unshift(l),ye(l),l=u;a.unshift(l),Ne(l);for(var c=o;c.circle&&Qi(e-c.circle.x)<vu&&Qi(r-c.circle.cy)<vu;)o=c.N,a.push(c),ye(c),c=o;a.push(c),Ne(c);var f,s=a.length;for(f=1;f<s;++f)c=a[f],l=a[f-1],ze(c.edge,l.site,c.site,i);l=a[0],(c=a[s-1]).edge=Ce(l.site,c.site,null,i),ke(l),ke(c)}function Me(n){for(var t,e,r,i,u=n.x,o=n.y,a=jo._;a;)if(r=xe(a,o)-u,vu<r)a=a.L;else{if(i=u-be(a,o),!(vu<i)){-vu<r?(t=a.P,e=a):-vu<i?e=(t=a).N:t=e=a;break}if(!a.R){t=a;break}a=a.R}var l=de(n);if(jo.insert(t,l),t||e){if(t===e)return Ne(t),e=de(t.site),jo.insert(l,e),l.edge=e.edge=Ce(t.site,l.site),ke(t),void ke(e);if(!e)return void(l.edge=Ce(t.site,l.site));Ne(t),Ne(e);var c=t.site,f=c.x,s=c.y,h=n.x-f,p=n.y-s,g=e.site,v=g.x-f,d=g.y-s,y=2*(h*d-p*v),m=h*h+p*p,M=v*v+d*d,x={x:(d*m-p*M)/y+f,y:(h*M-v*m)/y+s};ze(e.edge,c,g,x),l.edge=Ce(c,n,null,x),e.edge=Ce(n,g,null,x),ke(t),ke(e)}}function xe(n,t){var e=n.site,r=e.x,i=e.y,u=i-t;if(!u)return r;var o=n.P;if(!o)return-1/0;var a=(e=o.site).x,l=e.y,c=l-t;if(!c)return a;var f=a-r,s=1/u-1/c,h=f/c;return s?(-h+Math.sqrt(h*h-2*s*(f*f/(-2*c)-l+c/2+i-u/2)))/s+r:(r+a)/2}function be(n,t){var e=n.N;if(e)return xe(e,t);var r=n.site;return r.y===t?r.x:1/0}function _e(n){this.site=n,this.edges=[]}function we(n,t){return t.angle-n.angle}function Se(){Te(this),this.x=this.y=this.arc=this.site=this.cy=null}function ke(n){var t=n.P,e=n.N;if(t&&e){var r=t.site,i=n.site,u=e.site;if(r!==u){var o=i.x,a=i.y,l=r.x-o,c=r.y-a,f=u.x-o,s=2*(l*(d=u.y-a)-c*f);if(!(-du<=s)){var h=l*l+c*c,p=f*f+d*d,g=(d*h-c*p)/s,v=(l*p-f*h)/s,d=v+a,y=Io.pop()||new Se;y.arc=n,y.site=i,y.x=g+o,y.y=d+Math.sqrt(g*g+v*v),y.cy=d,n.circle=y;for(var m=null,M=Ho._;M;)if(y.y<M.y||y.y===M.y&&y.x<=M.x){if(!M.L){m=M.P;break}M=M.L}else{if(!M.R){m=M;break}M=M.R}Ho.insert(m,y),m||(Fo=y)}}}}function Ne(n){var t=n.circle;t&&(t.P||(Fo=t.N),Ho.remove(t),Io.push(t),Te(t),n.circle=null)}function Ee(n,t){var e=n.b;if(e)return!0;var r,i,u=n.a,o=t[0][0],a=t[1][0],l=t[0][1],c=t[1][1],f=n.l,s=n.r,h=f.x,p=f.y,g=s.x,v=s.y,d=(h+g)/2,y=(p+v)/2;if(v===p){if(d<o||a<=d)return;if(g<h){if(u){if(u.y>=c)return}else u={x:d,y:l};e={x:d,y:c}}else{if(u){if(u.y<l)return}else u={x:d,y:c};e={x:d,y:l}}}else if(i=y-(r=(h-g)/(v-p))*d,r<-1||1<r)if(g<h){if(u){if(u.y>=c)return}else u={x:(l-i)/r,y:l};e={x:(c-i)/r,y:c}}else{if(u){if(u.y<l)return}else u={x:(c-i)/r,y:c};e={x:(l-i)/r,y:l}}else if(p<v){if(u){if(u.x>=a)return}else u={x:o,y:r*o+i};e={x:a,y:r*a+i}}else{if(u){if(u.x<o)return}else u={x:a,y:r*a+i};e={x:o,y:r*o+i}}return n.a=u,n.b=e,!0}function Ae(n,t){this.l=n,this.r=t,this.a=this.b=null}function Ce(n,t,e,r){var i=new Ae(n,t);return Po.push(i),e&&ze(i,n,t,e),r&&ze(i,t,n,r),Uo[n.i].edges.push(new qe(i,n,t)),Uo[t.i].edges.push(new qe(i,t,n)),i}function ze(n,t,e,r){n.a||n.b?n.l===e?n.b=r:n.a=r:(n.a=r,n.l=t,n.r=e)}function qe(n,t,e){var r=n.a,i=n.b;this.edge=n,this.site=t,this.angle=e?Math.atan2(e.y-t.y,e.x-t.x):n.l===t?Math.atan2(i.x-r.x,r.y-i.y):Math.atan2(r.x-i.x,i.y-r.y)}function Le(){this._=null}function Te(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function Re(n,t){var e=t,r=t.R,i=e.U;i?i.L===e?i.L=r:i.R=r:n._=r,r.U=i,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function De(n,t){var e=t,r=t.L,i=e.U;i?i.L===e?i.L=r:i.R=r:n._=r,r.U=i,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function Pe(n){for(;n.L;)n=n.L;return n}function Ue(n,t){var e,r,i,u=n.sort(je).pop();for(Po=[],Uo=new Array(n.length),jo=new Le,Ho=new Le;;)if(i=Fo,u&&(!i||u.y<i.y||u.y===i.y&&u.x<i.x))(u.x!==e||u.y!==r)&&(Uo[u.i]=new _e(u),Me(u),e=u.x,r=u.y),u=n.pop();else{if(!i)break;me(i.arc)}t&&(function(n){for(var t,e=Po,r=Nt(n[0][0],n[0][1],n[1][0],n[1][1]),i=e.length;i--;)(!Ee(t=e[i],n)||!r(t)||Qi(t.a.x-t.b.x)<vu&&Qi(t.a.y-t.b.y)<vu)&&(t.a=t.b=null,e.splice(i,1))}(t),function(n){for(var t,e,r,i,u,o,a,l,c,f,s=n[0][0],h=n[1][0],p=n[0][1],g=n[1][1],v=Uo,d=v.length;d--;)if((u=v[d])&&u.prepare())for(l=(a=u.edges).length,o=0;o<l;)r=(f=a[o].end()).x,i=f.y,t=(c=a[++o%l].start()).x,e=c.y,(Qi(r-t)>vu||Qi(i-e)>vu)&&(a.splice(o,0,new qe((y=u.site,m=f,M=Qi(r-s)<vu&&vu<g-i?{x:s,y:Qi(t-s)<vu?e:g}:Qi(i-g)<vu&&vu<h-r?{x:Qi(e-g)<vu?t:h,y:g}:Qi(r-h)<vu&&vu<i-p?{x:h,y:Qi(t-h)<vu?e:p}:Qi(i-p)<vu&&vu<r-s?{x:Qi(e-p)<vu?t:s,y:p}:null,x=void 0,(x=new Ae(y,null)).a=m,x.b=M,Po.push(x),x),u.site,null)),++l);var y,m,M,x}(t));var o={cells:Uo,edges:Po};return jo=Ho=Po=Uo=null,o}function je(n,t){return t.y-n.y||t.x-n.x}function Fe(n){return n.x}function He(n){return n.y}function Oe(n,t){n=Yi.rgb(n),t=Yi.rgb(t);var e=n.r,r=n.g,i=n.b,u=t.r-e,o=t.g-r,a=t.b-i;return function(n){return"#"+dn(Math.round(e+u*n))+dn(Math.round(r+o*n))+dn(Math.round(i+a*n))}}function Ie(n,t){var e,r={},i={};for(e in n)e in t?r[e]=Ve(n[e],t[e]):i[e]=n[e];for(e in t)e in n||(i[e]=t[e]);return function(n){for(e in r)i[e]=r[e](n);return i}}function Ye(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Ze(n,r){var t,e,i,u=Zo.lastIndex=Vo.lastIndex=0,o=-1,a=[],l=[];for(n+="",r+="";(t=Zo.exec(n))&&(e=Vo.exec(r));)(i=e.index)>u&&(i=r.slice(u,i),a[o]?a[o]+=i:a[++o]=i),(t=t[0])===(e=e[0])?a[o]?a[o]+=e:a[++o]=e:(a[++o]=null,l.push({i:o,x:Ye(t,e)})),u=Vo.lastIndex;return u<r.length&&(i=r.slice(u),a[o]?a[o]+=i:a[++o]=i),a.length<2?l[0]?(r=l[0].x,function(n){return r(n)+""}):function(){return r}:(r=l.length,function(n){for(var t,e=0;e<r;++e)a[(t=l[e]).i]=t.x(n);return a.join("")})}function Ve(n,t){for(var e,r=Yi.interpolators.length;0<=--r&&!(e=Yi.interpolators[r](n,t)););return e}function Xe(n,t){var e,r=[],i=[],u=n.length,o=t.length,a=Math.min(n.length,t.length);for(e=0;e<a;++e)r.push(Ve(n[e],t[e]));for(;e<u;++e)i[e]=n[e];for(;e<o;++e)i[e]=t[e];return function(n){for(e=0;e<a;++e)i[e]=r[e](n);return i}}function $e(t){return function(n){return 1-t(1-n)}}function Be(t){return function(n){return.5*(n<.5?t(2*n):2-t(2-2*n))}}function We(n){return n*n}function Je(n){return n*n*n}function Ge(n){if(n<=0)return 0;if(1<=n)return 1;var t=n*n,e=t*n;return 4*(n<.5?e:3*(n-t)+e-.75)}function Ke(n){return 1-Math.cos(n*xu)}function Qe(n){return Math.pow(2,10*(n-1))}function nr(n){return 1-Math.sqrt(1-n*n)}function tr(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function er(t,e){return e-=t,function(n){return Math.round(t+e*n)}}function rr(n){var t=[n.a,n.b],e=[n.c,n.d],r=ur(t),i=ir(t,e),u=ur(function(n,t,e){return n[0]+=e*t[0],n[1]+=e*t[1],n}(e,t,-i))||0;t[0]*e[1]<e[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,i*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-e[0],e[1]))*_u,this.translate=[n.e,n.f],this.scale=[r,u],this.skew=u?Math.atan2(i,u)*_u:0}function ir(n,t){return n[0]*t[0]+n[1]*t[1]}function ur(n){var t=Math.sqrt(ir(n,n));return t&&(n[0]/=t,n[1]/=t),t}function or(n,t){var r,i=[],u=[],e=Yi.transform(n),o=Yi.transform(t),a=e.translate,l=o.translate,c=e.rotate,f=o.rotate,s=e.skew,h=o.skew,p=e.scale,g=o.scale;return a[0]!=l[0]||a[1]!=l[1]?(i.push("translate(",null,",",null,")"),u.push({i:1,x:Ye(a[0],l[0])},{i:3,x:Ye(a[1],l[1])})):i.push(l[0]||l[1]?"translate("+l+")":""),c!=f?(180<c-f?f+=360:180<f-c&&(c+=360),u.push({i:i.push(i.pop()+"rotate(",null,")")-2,x:Ye(c,f)})):f&&i.push(i.pop()+"rotate("+f+")"),s!=h?u.push({i:i.push(i.pop()+"skewX(",
17null,")")-2,x:Ye(s,h)}):h&&i.push(i.pop()+"skewX("+h+")"),p[0]!=g[0]||p[1]!=g[1]?(r=i.push(i.pop()+"scale(",null,",",null,")"),u.push({i:r-4,x:Ye(p[0],g[0])},{i:r-2,x:Ye(p[1],g[1])})):(1!=g[0]||1!=g[1])&&i.push(i.pop()+"scale("+g+")"),r=u.length,function(n){for(var t,e=-1;++e<r;)i[(t=u[e]).i]=t.x(n);return i.join("")}}function ar(t,e){return e=(e-=t=+t)||1/e,function(n){return(n-t)/e}}function lr(t,e){return e=(e-=t=+t)||1/e,function(n){return Math.max(0,Math.min(1,(n-t)/e))}}function cr(n){for(var t=n.source,e=n.target,r=function(n,t){if(n===t)return n;for(var e=fr(n),r=fr(t),i=e.pop(),u=r.pop(),o=null;i===u;)o=i,i=e.pop(),u=r.pop();return o}(t,e),i=[t];t!==r;)t=t.parent,i.push(t);for(var u=i.length;e!==r;)i.splice(u,0,e),e=e.parent;return i}function fr(n){for(var t=[],e=n.parent;null!=e;)t.push(n),e=(n=e).parent;return t.push(n),t}function sr(n){n.fixed|=2}function hr(n){n.fixed&=-7}function pr(n){n.fixed|=4,n.px=n.x,n.py=n.y}function gr(n){n.fixed&=-5}function vr(n,t){return Yi.rebind(n,t,"sort","children","value"),(n.nodes=n).links=br,n}function dr(n,t){for(var e=[n];null!=(n=e.pop());)if(t(n),(i=n.children)&&(r=i.length))for(var r,i;0<=--r;)e.push(i[r])}function yr(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(u=n.children)&&(i=u.length))for(var i,u,o=-1;++o<i;)e.push(u[o]);for(;null!=(n=r.pop());)t(n)}function mr(n){return n.children}function Mr(n){return n.value}function xr(n,t){return t.value-n.value}function br(n){return Yi.merge(n.map(function(t){return(t.children||[]).map(function(n){return{source:t,target:n}})}))}function _r(n){return n.x}function wr(n){return n.y}function Sr(n,t,e){n.y0=t,n.y=e}function kr(n){return Yi.range(n.length)}function Nr(n){for(var t=-1,e=n[0].length,r=[];++t<e;)r[t]=0;return r}function Er(n){for(var t,e=1,r=0,i=n[0][1],u=n.length;e<u;++e)(t=n[e][1])>i&&(r=e,i=t);return r}function Ar(n){return n.reduce(Cr,0)}function Cr(n,t){return n+t[1]}function zr(n,t){return qr(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function qr(n,t){for(var e=-1,r=+n[0],i=(n[1]-r)/t,u=[];++e<=t;)u[e]=i*e+r;return u}function Lr(n){return[Yi.min(n),Yi.max(n)]}function Tr(n,t){return n.value-t.value}function Rr(n,t){var e=n._pack_next;(n._pack_next=t)._pack_prev=n,(t._pack_next=e)._pack_prev=t}function Dr(n,t){(n._pack_next=t)._pack_prev=n}function Pr(n,t){var e=t.x-n.x,r=t.y-n.y,i=n.r+t.r;return e*e+r*r<.999*i*i}function Ur(n){function t(n){f=Math.min(n.x-n.r,f),s=Math.max(n.x+n.r,s),h=Math.min(n.y-n.r,h),p=Math.max(n.y+n.r,p)}if((e=n.children)&&(c=e.length)){var e,r,i,u,o,a,l,c,f=1/0,s=-1/0,h=1/0,p=-1/0;if(e.forEach(jr),(r=e[0]).x=-r.r,r.y=0,t(r),1<c&&((i=e[1]).x=i.r,i.y=0,t(i),2<c))for(Hr(r,i,u=e[2]),t(u),Rr(r,u),Rr(r._pack_prev=u,i),i=r._pack_next,o=3;o<c;o++){Hr(r,i,u=e[o]);var g=0,v=1,d=1;for(a=i._pack_next;a!==i;a=a._pack_next,v++)if(Pr(a,u)){g=1;break}if(1==g)for(l=r._pack_prev;l!==a._pack_prev&&!Pr(l,u);l=l._pack_prev,d++);g?(v<d||v==d&&i.r<r.r?Dr(r,i=a):Dr(r=l,i),o--):(Rr(r,u),t(i=u))}var y=(f+s)/2,m=(h+p)/2,M=0;for(o=0;o<c;o++)(u=e[o]).x-=y,u.y-=m,M=Math.max(M,u.r+Math.sqrt(u.x*u.x+u.y*u.y));n.r=M,e.forEach(Fr)}}function jr(n){n._pack_next=n._pack_prev=n}function Fr(n){delete n._pack_next,delete n._pack_prev}function Hr(n,t,e){var r=n.r+e.r,i=t.x-n.x,u=t.y-n.y;if(r&&(i||u)){var o=t.r+e.r,a=i*i+u*u,l=.5+((r*=r)-(o*=o))/(2*a),c=Math.sqrt(Math.max(0,2*o*(r+a)-(r-=a)*r-o*o))/(2*a);e.x=n.x+l*i+c*u,e.y=n.y+l*u-c*i}else e.x=n.x+r,e.y=n.y}function Or(n,t){return n.parent==t.parent?1:2}function Ir(n){var t=n.children;return t.length?t[0]:n.t}function Yr(n){var t,e=n.children;return(t=e.length)?e[t-1]:n.t}function Zr(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Vr(n,t){var e=n.x+t[3],r=n.y+t[0],i=n.dx-t[1]-t[3],u=n.dy-t[0]-t[2];return i<0&&(e+=i/2,i=0),u<0&&(r+=u/2,u=0),{x:e,y:r,dx:i,dy:u}}function Xr(n){var t=n[0],e=n[n.length-1];return t<e?[t,e]:[e,t]}function $r(n){return n.rangeExtent?n.rangeExtent():Xr(n.range())}function Br(n,t,e,r){var i=e(n[0],n[1]),u=r(t[0],t[1]);return function(n){return u(i(n))}}function Wr(n,t){var e,r=0,i=n.length-1,u=n[r],o=n[i];return o<u&&(e=r,r=i,i=e,e=u,u=o,o=e),n[r]=t.floor(u),n[i]=t.ceil(o),n}function Jr(e,n,t,r){var i=[],u=[],o=0,a=Math.min(e.length,n.length)-1;for(e[a]<e[0]&&(e=e.slice().reverse(),n=n.slice().reverse());++o<=a;)i.push(t(e[o-1],e[o])),u.push(r(n[o-1],n[o]));return function(n){var t=Yi.bisect(e,n,1,a)-1;return u[t](i[t](n))}}function Gr(n,t){return Yi.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Kr(n,t){return Wr(n,function(t){return t?{floor:function(n){return Math.floor(n/t)*t},ceil:function(n){return Math.ceil(n/t)*t}}:ea}(Qr(n,t)[2]))}function Qr(n,t){null==t&&(t=10);var e=Xr(n),r=e[1]-e[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),u=t/r*i;return u<=.15?i*=10:u<=.35?i*=5:u<=.75&&(i*=2),e[0]=Math.ceil(e[0]/i)*i,e[1]=Math.floor(e[1]/i)*i+.5*i,e[2]=i,e}function ni(n,t){return Yi.range.apply(Yi,Qr(n,t))}function ti(n,t,e){var r=Qr(n,t);if(e){var i=Yu.exec(e);if(i.shift(),"s"===i[8]){var u=Yi.formatPrefix(Math.max(Qi(r[0]),Qi(r[1])));return i[7]||(i[7]="."+ei(u.scale(r[2]))),i[8]="f",e=Yi.format(i.join("")),function(n){return e(u.scale(n))+u.symbol}}i[7]||(i[7]="."+function(n,t){var e=ei(t[2]);return n in ra?Math.abs(e-ei(Math.max(Qi(t[0]),Qi(t[1]))))+ +("e"!==n):e-2*("%"===n)}(i[8],r)),e=i.join("")}else e=",."+ei(r[2])+"f";return Yi.format(e)}function ei(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function ri(t){return function(n){return n<0?-Math.pow(-n,t):Math.pow(n,t)}}function ii(){return 0}function ui(n){return n.innerRadius}function oi(n){return n.outerRadius}function ai(n){return n.startAngle}function li(n){return n.endAngle}function ci(n){return n&&n.padAngle}function fi(n,t,e,r){return 0<(n-e)*t-(t-r)*n?0:1}function si(n,t,e,r,i){var u=n[0]-t[0],o=n[1]-t[1],a=(i?r:-r)/Math.sqrt(u*u+o*o),l=a*o,c=-a*u,f=n[0]+l,s=n[1]+c,h=t[0]+l,p=t[1]+c,g=(f+h)/2,v=(s+p)
vendor: 4,549 bytes, line 17
17/2,d=h-f,y=p-s,m=d*d+y*y,M=e-r,x=f*p-h*s,b=(y<0?-1:1)*Math.sqrt(M*M*m-x*x),_=(x*y-d*b)/m,w=(-x*d-y*b)/m,S=(x*y+d*b)/m,k=(-x*d+y*b)/m,N=_-g,E=w-v,A=S-g,C=k-v;return A*A+C*C<N*N+E*E&&(_=S,w=k),[[_-l,w-c],[_*e/M,w*e/M]]}function hi(c){function t(n){function t(){r.push("M",p(c(i),g))}for(var e,r=[],i=[],u=-1,o=n.length,a=_n(f),l=_n(s);++u<o;)h.call(this,e=n[u],u)?i.push([+a.call(this,e,u),+l.call(this,e,u)]):i.length&&(t(),i=[]);return i.length&&t(),r.length?r.join(""):null}var f=le,s=ce,h=mt,p=pi,e=p.key,g=.7;return t.x=function(n){return arguments.length?(f=n,t):f},t.y=function(n){return arguments.length?(s=n,t):s},t.defined=function(n){return arguments.length?(h=n,t):h},t.interpolate=function(n){return arguments.length?(e="function"==typeof n?p=n:(p=sa.get(n)||pi).key,t):e},t.tension=function(n){return arguments.length?(g=n,t):g},t}function pi(n){return n.join("L")}function gi(n){for(var t=0,e=n.length,r=n[0],i=[r[0],",",r[1]];++t<e;)i.push("V",(r=n[t])[1],"H",r[0]);return i.join("")}function vi(n){for(var t=0,e=n.length,r=n[0],i=[r[0],",",r[1]];++t<e;)i.push("H",(r=n[t])[0],"V",r[1]);return i.join("")}function di(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return pi(n);var e=n.length!=t.length,r="",i=n[0],u=n[1],o=t[0],a=o,l=1;if(e&&(r+="Q"+(u[0]-2*o[0]/3)+","+(u[1]-2*o[1]/3)+","+u[0]+","+u[1],i=n[1],l=2),1<t.length){a=t[1],u=n[l],l++,r+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(u[0]-a[0])+","+(u[1]-a[1])+","+u[0]+","+u[1];for(var c=2;c<t.length;c++,l++)u=n[l],a=t[c],r+="S"+(u[0]-a[0])+","+(u[1]-a[1])+","+u[0]+","+u[1]}if(e){var f=n[l];r+="Q"+(u[0]+2*a[0]/3)+","+(u[1]+2*a[1]/3)+","+f[0]+","+f[1]}return r}function yi(n,t){for(var e,r=[],i=(1-t)/2,u=n[0],o=n[1],a=1,l=n.length;++a<l;)e=u,u=o,o=n[a],r.push([i*(o[0]-e[0]),i*(o[1]-e[1])]);return r}function mi(n){if(n.length<3)return pi(n);var t=1,e=n.length,r=n[0],i=r[0],u=r[1],o=[i,i,i,(r=n[1])[0]],a=[u,u,u,r[1]],l=[i,",",u,"L",Mi(ga,o),",",Mi(ga,a)];for(n.push(n[e-1]);++t<=e;)r=n[t],o.shift(),o.push(r[0]),a.shift(),a.push(r[1]),xi(l,o,a);return n.pop(),l.push("L",r),l.join("")}function Mi(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function xi(n,t,e){n.push("C",Mi(ha,t),",",Mi(ha,e),",",Mi(pa,t),",",Mi(pa,e),",",Mi(ga,t),",",Mi(ga,e))}function bi(n,t){return(t[1]-n[1])/(t[0]-n[0])}function _i(n){for(var t,e,r,i,u=[],o=function(n){for(var t=0,e=n.length-1,r=[],i=n[0],u=n[1],o=r[0]=bi(i,u);++t<e;)r[t]=(o+(o=bi(i=u,u=n[t+1])))/2;return r[t]=o,r}(n),a=-1,l=n.length-1;++a<l;)t=bi(n[a],n[a+1]),Qi(t)<vu?o[a]=o[a+1]=0:9<(i=(e=o[a]/t)*e+(r=o[a+1]/t)*r)&&(i=3*t/Math.sqrt(i),o[a]=i*e,o[a+1]=i*r);for(a=-1;++a<=l;)i=(n[Math.min(l,a+1)][0]-n[Math.max(0,a-1)][0])/(6*(1+o[a]*o[a])),u.push([i||0,o[a]*i||0]);return u}function wi(n){for(var t,e,r,i=-1,u=n.length;++i<u;)e=(t=n[i])[0],r=t[1]-xu,t[0]=e*Math.cos(r),t[1]=e*Math.sin(r);return n}function Si(g){function t(n){function t(){u.push("M",x(g(a),w),_,b(g(o.reverse()),w),"Z")}for(var e,r,i,u=[],o=[],a=[],l=-1,c=n.length,f=_n(v),s=_n(y),h=v===d?function(){return r}:_n(d),p=y===m?function(){return i}:_n(m);++l<c;)M.call(this,e=n[l],l)?(o.push([r=+f.call(this,e,l),i=+s.call(this,e,l)]),a.push([+h.call(this,e,l),+p.call(this,e,l)])):o.length&&(t(),o=[],a=[]);return o.length&&t(),u.length?u.join(""):null}var v=le,d=le,y=0,m=ce,M=mt,x=pi,e=x.key,b=x,_="L",w=.7;return t.x=function(n){return arguments.length?(v=d=n,t):d},t.x0=function(n){return arguments.length?(v=n,t):v},t.x1=function(n){return arguments.length?(d=n,t):d},t.y=function(n){return arguments.length?(y=m=n,t):m},t.y0=function(n){return arguments.length?(y=n,t):y},t.y1=function(n){return arguments.length?(m=n,t):m},t.defined=function(n){return arguments.length?(M=n,t):M},t.interpolate=function(n){return arguments.length?(e="function"==typeof n?x=n:(x=sa.get(n)||pi).key,b=x.reverse||x,_=x.closed?"M":"L",t):e},t.tension=function(n){return arguments.length?(w=n,t):w},t}function ki(n){return n.radius}function Ni(n){return[n.x,n.y]}function Ei(){return 64}function Ai(){return"circle"}function Ci(n){var t=Math.sqrt(n/yu);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function zi(e){return function(){var n,t;(n=this[e])&&(t=n[n.active])&&(--n.count?delete n[n.active]:delete this[e],n.active+=.5,t.event&&t.event.interrupt.call(this,this.__data__,t.index))}}function qi(n,t,e){return iu(n,ba),n.namespace=t,n.id=e,n}function Li(n,r,i,u){var o=n.id,a=n.namespace;return O(n,"function"==typeof i?function(n,t,e){n[a][o].tween.set(r,u(i.call(n,n.__data__,t,e)))}:(i=u(i),function(n){n[a][o].tween.set(r,i)}
17))}function Ti(n){return null==n&&(n=""),function(){this.textContent=n}}function Ri(n){return null==n?"__transition__":"__transition_"+n+"__"}function Di(c,f,s,h,n){var p=c[s]||(c[s]={active:0,count:0}),g=p[h];if(!g){var v=n.time;g=p[h]={tween:new m,time:v,delay:n.delay,duration:n.duration,ease:n.ease,index:f},n=null,++p.count,Yi.timer(function(n){function t(n){if(p.active>h)return i();var t=p[p.active];t&&(--p.count,delete p[p.active],t.event&&t.event.interrupt.call(c,c.__data__,t.index)),p.active=h,g.event&&g.event.start.call(c,c.__data__,f),g.tween.forEach(function(n,t){(t=t.call(c,c.__data__,f))&&l.push(t)}),o=g.ease,u=g.duration,Yi.timer(function(){return a.c=e(n||1)?mt:e,1},0,v)}function e(n){if(p.active!==h)return 1;for(var t=n/u,e=o(t),r=l.length;0<r;)l[--r].call(c,e);return 1<=t?(g.event&&g.event.end.call(c,c.__data__,f),i()):void 0}function i(){return--p.count?delete p[h]:delete c[s],1}var u,o,r=g.delay,a=Hu,l=[];return a.t=r+v,r<=n?t(n-r):void(a.c=t)},0,v)}}function Pi(n,e,r){n.attr("transform",function(n){var t=e(n);return"translate("+(isFinite(t)?t:r(n))+",0)"})}function Ui(n,e,r){n.attr("transform",function(n){var t=e(n);return"translate(0,"+(isFinite(t)?t:r(n))+")"})}function ji(n){return n.toISOString()}function Fi(t,i,n){function o(n){return t(n)}function a(n,t){var e=(n[1]-n[0])/t,r=Yi.bisect(za,e);return r==za.length?[i.year,Qr(n.map(function(n){return n/31536e6}),t)[2]]:r?i[e/za[r-1]<za[r]/e?r-1:r]:[Ta,Qr(n,t)[2]]}return o.invert=function(n){return Hi(t.invert(n))},o.domain=function(n){return arguments.length?(t.domain(n),o):t.domain().map(Hi)},o.nice=function(t,e){function r(n){return!isNaN(n)&&!t.range(n,Hi(+n+1),e).length}var n=o.domain(),i=Xr(n),u=null==t?a(i,10):"number"==typeof t&&a(i,t);return u&&(t=u[0],e=u[1]),o.domain(Wr(n,1<e?{floor:function(n){for(;r(n=t.floor(n));)n=Hi(n-1);return n},ceil:function(n){for(;r(n=t.ceil(n));)n=Hi(+n+1);return n}}:t))},o.ticks=function(n,t){var e=Xr(o.domain()),r=null==n?a(e,10):"number"==typeof n?a(e,n):!n.range&&[{range:n},t];return r&&(n=r[0],t=r[1]),n.range(e[0],Hi(+e[1]+1),t<1?1:t)},o.tickFormat=function(){return n},o.copy=function(){return Fi(t.copy(),i,n)},Gr(o,t)}function Hi(n){return new Date(n)}function Oi(n){return JSON.parse(n.responseText)}function Ii(n){var t=Xi.createRange();return t.selectNode(Xi.body),t.createContextualFragment(n.responseText)}var Yi={version:"3.5.6"},Zi=[].slice,Vi=function(n){return Zi.call(n)},Xi=this.document;if(Xi)try{Vi(Xi.documentElement.childNodes)[0].nodeType}catch(n){Vi=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}if(Date.now||(Date.now=function(){return+new Date}),Xi)try{Xi.createElement("DIV").style.setProperty("opacity",0,"")}catch(n){var $i=this.Element.prototype,Bi=$i.setAttribute,Wi=$i.setAttributeNS,Ji=this.CSSStyleDeclaration.prototype,Gi=Ji.setProperty;$i.setAttribute=function(n,t){Bi.call(this,n,t+"")},$i.setAttributeNS=function(n,t,e){Wi.call(this,n,t,e+"")},Ji.setProperty=function(n,t,e){Gi.call(this,n,t+"",e)}}Yi.ascending=o,Yi.descending=function(n,t){return t<n?-1:n<t?1:n<=t?0:NaN},Yi.min=function(n,t){var e,r,i=-1,u=n.length;if(1===arguments.length){for(;++i<u;)if(null!=(r=n[i])&&r<=r){e=r;break}for(;++i<u;)null!=(r=n[i])&&r<e&&(e=r)}else{for(;++i<u;)if(null!=(r=t.call(n,n[i],i))&&r<=r){e=r;break}for(;++i<u;)null!=(r=t.call(n,n[i],i))&&r<e&&(e=r)}return e},Yi.max=function(n,t){var e,r,i=-1,u=n.length;if(1===arguments.length){for(;++i<u;)if(null!=(r=n[i])&&r<=r){e=r;break}for(;++i<u;)null!=(r=n[i])&&e<r&&(e=r)}else{for(;++i<u;)if(null!=(r=t.call(n,n[i],i))&&r<=r){e=r;break}for(;++i<u;)null!=(r=t.call(n,n[i],i))&&e<r&&(e=r)}return e},Yi.extent=function(n,t){var e,r,i,u=-1,o=n.length;if(1===arguments.length){for(;++u<o;)if(null!=(r=n[u])&&r<=r){e=i=r;break}for(;++u<o;)null!=(r=n[u])&&(r<e&&(e=r),i<r&&(i=r))}else{for(;++u<o;)if(null!=(r=t.call(n,n[u],u))&&r<=r){e=i=r;break}for(;++u<o;)null!=(r=t.call(n,n[u],u))&&(r<e&&(e=r),i<r&&(i=r))}return[e,i]},Yi.sum=function(n,t){var e,r=0,i=n.length,u=-1;if(1===arguments.length)for(;++u<i;)f(e=+n[u])&&(r+=e);else for(;++u<i;)f(e=+t.call(n,n[u],u))&&(r+=e);return r},Yi.mean=function(n,t){var e,r=0,i=n.length,u=-1,o=i;if(1===arguments.length)for(;++u<i;)f(e=c(n[u]))?r+=e:--o;else for(;++u<i;)f(e=c(t.call(n,n[u],u)))?r+=e:--o;return o?r/o:void 0},Yi.quantile=function(n,t){var e=(n.length-1)*t+1,r=Math.floor(e),i=+n[r-1],u=e-r;return u?i+u*(n[r]-i):i},Yi.median=function(n,t){var e,r=[],i=n.length,u=-1;if(1===arguments.length)for(;++u<i;)f(e=c(n[u]))&&r.push(e);else for(;++u<i;)f(e=c(t.call(n,n[u],u)))&&r.push(e);return r.length?Yi.quantile(r.sort(o),.5):void 0},Yi.variance=function(n,t){var e,r,i=n.length,u=0,o=0,a=-1,l=0;if(1===arguments.length)for(;++a<i;
vendor: 5,606 bytes, line 17
17)f(e=c(n[a]))&&(o+=(r=e-u)*(e-(u+=r/++l)));else for(;++a<i;)f(e=c(t.call(n,n[a],a)))&&(o+=(r=e-u)*(e-(u+=r/++l)));return 1<l?o/(l-1):void 0},Yi.deviation=function(){var n=Yi.variance.apply(this,arguments);return n?Math.sqrt(n):n};var Ki=n(o);Yi.bisectLeft=Ki.left,Yi.bisect=Yi.bisectRight=Ki.right,Yi.bisector=function(e){return n(1===e.length?function(n,t){return o(e(n),t)}:e)},Yi.shuffle=function(n,t,e){(u=arguments.length)<3&&(e=n.length,u<2&&(t=0));for(var r,i,u=e-t;u;)i=Math.random()*u--|0,r=n[u+t],n[u+t]=n[i+t],n[i+t]=r;return n},Yi.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},Yi.pairs=function(n){for(var t=0,e=n.length-1,r=n[0],i=new Array(e<0?0:e);t<e;)i[t]=[r,r=n[++t]];return i},Yi.zip=function(){if(!(r=arguments.length))return[];for(var n=-1,t=Yi.min(arguments,l),e=new Array(t);++n<t;)for(var r,i=-1,u=e[n]=new Array(r);++i<r;)u[i]=arguments[i][n];return e},Yi.transpose=function(n){return Yi.zip.apply(Yi,n)},Yi.keys=function(n){var t=[];for(var e in n)t.push(e);return t},Yi.values=function(n){var t=[];for(var e in n)t.push(n[e]);return t},Yi.entries=function(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t},Yi.merge=function(n){for(var t,e,r,i=n.length,u=-1,o=0;++u<i;)o+=n[u].length;for(e=new Array(o);0<=--i;)for(t=(r=n[i]).length;0<=--t;)e[--o]=r[t];return e};var Qi=Math.abs;Yi.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),(t-n)/e==1/0)throw new Error("infinite range");var r,i=[],u=function(n){for(var t=1;n*t%1;)t*=10;return t}(Qi(e)),o=-1;if(n*=u,t*=u,(e*=u)<0)for(;(r=n+e*++o)>t;)i.push(r/u);else for(;(r=n+e*++o)<t;)i.push(r/u);return i},Yi.map=function(n,t){var e=new m;if(n instanceof m)n.forEach(function(n,t){e.set(n,t)});else if(Array.isArray(n)){var r,i=-1,u=n.length;if(1===arguments.length)for(;++i<u;)e.set(i,n[i]);else for(;++i<u;)e.set(t.call(n,r=n[i],i),r)}else for(var o in n)e.set(o,n[o]);return e};var nu="__proto__",tu="\0";t(m,{has:i,get:function(n){return this._[e(n)]},set:function(n,t){return this._[e(n)]=t},remove:u,keys:s,values:function(){var n=[];for(var t in this._)n.push(this._[t]);return n},entries:function(){var n=[];for(var t in this._)n.push({key:r(t),value:this._[t]});return n},size:h,empty:p,forEach:function(n){for(var t in this._)n.call(this,r(t),this._[t])}}),Yi.nest=function(){function s(e,n,r){if(r>=v.length)return p?p.call(g,n):h?n.sort(h):n;for(var t,i,u,o,a=-1,l=n.length,c=v[r++],f=new m;++a<l;)(o=f.get(t=c(i=n[a])))?o.push(i):f.set(t,[i]);return u=e?(i=e(),function(n,t){i.set(n,s(e,t,r))}):(i={},function(n,t){i[n]=s(e,t,r)}),f.forEach(u),i}var h,p,g={},v=[],t=[];return g.map=function(n,t){return s(t,n,0)},g.entries=function(n){return function e(n,r){if(r>=v.length)return n;var i=[],u=t[r++];return n.forEach(function(n,t){i.push({key:n,values:e(t,r)})}),u?i.sort(function(n,t){return u(n.key,t.key)}):i}(s(Yi.map,n,0),0)},g.key=function(n){return v.push(n),g},g.sortKeys=function(n){return t[v.length-1]=n,g},g.sortValues=function(n){return h=n,g},g.rollup=function(n){return p=n,g},g},Yi.set=function(n){var t=new g;if(n)for(var e=0,r=n.length;e<r;++e)t.add(n[e]);return t},t(g,{has:i,add:function(n){return this._[e(n+="")]=!0,n},remove:u,values:s,size:h,empty:p,forEach:function(n){for(var t in this._)n.call(this,r(t))}}),Yi.behavior={},Yi.rebind=function(n,t){for(var e,r=1,i=arguments.length;++r<i;)n[e=arguments[r]]=v(n,t,t[e]);return n};var eu=["webkit","ms","moz","Moz","o","O"];Yi.dispatch=function(){for(var n=new M,t=-1,e=arguments.length;++t<e;)n[arguments[t]]=x(n);return n},M.prototype.on=function(n,t){var e=n.indexOf("."),r="";if(0<=e&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},Yi.event=null,Yi.requote=function(n){return n.replace(ru,"\\$&")};var ru=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,iu={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},uu=function(n,t){return t.querySelector(n)},ou=function(n,t){return t.querySelectorAll(n)},au=function(n,t){var e=n.matches||n[d(n,"matchesSelector")];return(au=function(n,t){return e.call(n,t)})(n,t)};"function"==typeof Sizzle&&(uu=function(n,t){return Sizzle(n,t)[0]||null},ou=Sizzle,au=Sizzle.matchesSelector),Yi.selection=function(){return Yi.select(Xi.documentElement)};var lu=Yi.selection.prototype=[];lu.select=function(n){var t,e,r,i,u=[];n=w(n);for(var o=-1,a=this.length;++o<a;){u.push(t=[]),t.parentNode=(r=this[o]).parentNode;for(var l=-1,c=r.length;++l<c;)(i=r[l])?(t.push(e=n.call(i,i.__data__,l,o)),e&&"__data__"in i&&(e.__data__=i.__data__)):t.push(null)}return _(u)},lu.selectAll=function(n){var t,e,r=[];n=S(n);for(var i=-1,u=this.length;++i<u;)for(var o=this[i],a=-1,l=o.length;++a<l;)(e=o[a])&&(r.push(t=Vi(n.call(e,e.__data__,a,i))),t.parentNode=e);return _(r)};var cu={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};Yi.ns={prefix:cu,qualify:function(n){var t=n.indexOf(":"),e=n;return 0<=t&&(e=n.slice(0,t),n=n.slice(t+1)),cu.hasOwnProperty(e)?{space:cu[e],local:n}:n}},lu.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return(n=Yi.ns.qualify(n)).local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(k(t,n[t]));return this}return this.each(k(n,t))},lu.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=A(n)).length,i=-1;
17if(t=e.classList){for(;++i<r;)if(!t.contains(n[i]))return!1}else for(t=e.getAttribute("class");++i<r;)if(!E(n[i]).test(t))return!1;return!0}for(t in n)this.each(C(t,n[t]));return this}return this.each(C(n,t))},lu.style=function(n,t,e){var r=arguments.length;if(r<3){if("string"!=typeof n){for(e in r<2&&(t=""),n)this.each(q(e,n[e],t));return this}if(r<2){var i=this.node();return T(i).getComputedStyle(i,null).getPropertyValue(n)}e=""}return this.each(q(n,t,e))},lu.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(L(t,n[t]));return this}return this.each(L(n,t))},lu.text=function(t){return arguments.length?this.each("function"==typeof t?function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}:null==t?function(){this.textContent=""}:function(){this.textContent=t}):this.node().textContent},lu.html=function(t){return arguments.length?this.each("function"==typeof t?function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}:null==t?function(){this.innerHTML=""}:function(){this.innerHTML=t}):this.node().innerHTML},lu.append=function(n){return n=U(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},lu.insert=function(n,t){return n=U(n),t=w(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},lu.remove=function(){return this.each(j)},lu.data=function(n,g){function t(n,t){var e,r,i,u=n.length,o=t.length,a=Math.min(u,o),l=new Array(o),c=new Array(o),f=new Array(u);if(g){var s,h=new m,p=new Array(u);for(e=-1;++e<u;)h.has(s=g.call(r=n[e],r.__data__,e))?f[e]=r:h.set(s,r),p[e]=s;for(e=-1;++e<o;)(r=h.get(s=g.call(t,i=t[e],e)))?!0!==r&&((l[e]=r).__data__=i):c[e]=F(i),h.set(s,!0);for(e=-1;++e<u;)!0!==h.get(p[e])&&(f[e]=n[e])}else{for(e=-1;++e<a;)r=n[e],i=t[e],r?(r.__data__=i,l[e]=r):c[e]=F(i);for(;e<o;++e)c[e]=F(t[e]);for(;e<u;++e)f[e]=n[e]}c.update=l,c.parentNode=l.parentNode=f.parentNode=n.parentNode,v.push(c),d.push(l),y.push(f)}var e,r,i=-1,u=this.length;if(!arguments.length){for(n=new Array(u=(e=this[0]).length);++i<u;)(r=e[i])&&(n[i]=r.__data__);return n}var v=I([]),d=_([]),y=_([]);if("function"==typeof n)for(;++i<u;)t(e=this[i],n.call(e,e.parentNode.__data__,i));else for(;++i<u;)t(e=this[i],n);return d.enter=function(){return v},d.exit=function(){return y},d},lu.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},lu.filter=function(n){var t,e,r,i=[];"function"!=typeof n&&(n=H(n));for(var u=0,o=this.length;u<o;u++){i.push(t=[]),t.parentNode=(e=this[u]).parentNode;for(var a=0,l=e.length;a<l;a++)(r=e[a])&&n.call(r,r.__data__,a,u)&&t.push(r)}return _(i)},lu.order=function(){for(var n=-1,t=this.length;++n<t;)for(var e,r=this[n],i=r.length-1,u=r[i];0<=--i;)(e=r[i])&&(u&&u!==e.nextSibling&&u.parentNode.insertBefore(e,u),u=e);return this},lu.sort=function(n){n=function(e){return arguments.length||(e=o),function(n,t){return n&&t?e(n.__data__,t.__data__):!n-!t}}.apply(this,arguments);for(var t=-1,e=this.length;++t<e;)this[t].sort(n);return this.order()},lu.each=function(r){return O(this,function(n,t,e){r.call(n,n.__data__,t,e)})},lu.call=function(n){var t=Vi(arguments);return n.apply(t[0]=this,t),this},lu.empty=function(){return!this.node()},lu.node=function(){for(var n=0,t=this.length;n<t;n++)for(var e=this[n],r=0,i=e.length;r<i;r++){var u=e[r];if(u)return u}return null},lu.size=function(){var n=0;return O(this,function(){++n}),n};var fu=[];Yi.selection.enter=I,(Yi.selection.enter.prototype=fu).append=lu.append,fu.empty=lu.empty,fu.node=lu.node,fu.call=lu.call,fu.size=lu.size,fu.select=function(n){for(var t,e,r,i,u,o=[],a=-1,l=this.length;++a<l;){r=(i=this[a]).update,o.push(t=[]),t.parentNode=i.parentNode;for(var c=-1,f=i.length;++c<f;)(u=i[c])?(t.push(r[c]=e=n.call(i.parentNode,u.__data__,c,a)),e.__data__=u.__data__):t.push(null)}return _(o)},fu.insert=function(n,t){return arguments.length<2&&(t=function(o){var a,l;return function(n,t,e){var r,i=o[e].update,u=i.length;for(e!=l&&(l=e,a=0),a<=t&&(a=t+1);!(r=i[a])&&++a<u;);return r}}(this)),lu.insert.call(this,n,t)},Yi.select=function(n){var t;
17return"string"==typeof n?(t=[uu(n,Xi)]).parentNode=Xi.documentElement:(t=[n]).parentNode=a(n),_([t])},Yi.selectAll=function(n){var t;return"string"==typeof n?(t=Vi(ou(n,Xi))).parentNode=Xi.documentElement:(t=n).parentNode=null,_([t])},lu.on=function(n,t,e){var r=arguments.length;if(r<3){if("string"!=typeof n){for(e in r<2&&(t=!1),n)this.each(Y(e,n[e],t));return this}if(r<2)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(Y(n,t,e))};var su=Yi.map({mouseenter:"mouseover",mouseleave:"mouseout"});Xi&&su.forEach(function(n){"on"+n in Xi&&su.remove(n)});var hu,pu=0;Yi.mouse=function(n){return $(n,b())};var gu=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;Yi.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=b().changedTouches),t)for(var r,i=0,u=t.length;i<u;++i)if((r=t[i]).identifier===e)return $(n,r)},Yi.behavior.drag=function(){function t(){this.on("mousedown.drag",e).on("touchstart.drag",r)}function n(f,s,h,p,g){return function(){var r,n=Yi.event.target,i=this.parentNode,u=v.of(this,arguments),o=0,a=f(),t=".drag"+(null==a?"":"-"+a),e=Yi.select(h(n)).on(p+t,function(){var n,t,e=s(i,a);e&&(n=e[0]-c[0],t=e[1]-c[1],o|=n|t,u({type:"drag",x:(c=e)[0]+r[0],y:e[1]+r[1],dx:n,dy:t}))}).on(g+t,function(){s(i,a)&&(e.on(p+t,null).on(g+t,null),l(o&&Yi.event.target===n),u({type:"dragend"}))}),l=X(n),c=s(i,a);r=d?[(r=d.apply(this,arguments)).x-c[0],r.y-c[1]]:[0,0],u({type:"dragstart"})}}var v=P(t,"drag","dragstart","dragend"),d=null,e=n(y,Yi.mouse,T,"mousemove","mouseup"),r=n(B,Yi.touch,R,"touchmove","touchend");return t.origin=function(n){return arguments.length?(d=n,t):d},Yi.rebind(t,v,"on")},Yi.touches=function(e,n){return arguments.length<2&&(n=b().touches),n?Vi(n).map(function(n){var t=$(e,n);return t.identifier=n.identifier,t}):[]};var vu=1e-6,du=vu*vu,yu=Math.PI,mu=2*yu,Mu=mu-vu,xu=yu/2,bu=yu/180,_u=180/yu,wu=Math.SQRT2;Yi.interpolateZoom=function(n,t){function e(n){var t=n*y;if(d){var e=Q(v),r=o/(2*h)*(e*function(n){return((n=Math.exp(2*n))-1)/(n+1)}(wu*t+v)-function(n){return((n=Math.exp(n))-1/n)/2}(v));return[i+r*c,u+r*f,o*e/Q(wu*t+v)]}return[i+n*c,u+n*f,o*Math.exp(wu*t)]}var i=n[0],u=n[1],o=n[2],r=t[0],a=t[1],l=t[2],c=r-i,f=a-u,s=c*c+f*f,h=Math.sqrt(s),p=(l*l-o*o+4*s)/(2*o*2*h),g=(l*l-o*o-4*s)/(2*l*2*h),v=Math.log(Math.sqrt(p*p+1)-p),d=Math.log(Math.sqrt(g*g+1)-g)-v,y=(d||Math.log(l/o))/wu;return e.duration=1e3*y,e},Yi.behavior.zoom=function(){function i(n){n.on(C,k).on(ku+".zoom",e).on("dblclick.zoom",r).on(q,N)}function a(n){return[(n[0]-A.x)/A.k,(n[1]-A.y)/A.k]}function x(n){A.k=Math.max(d[0],Math.min(d[1],n))}function b(n,t){t=function(n){return[n[0]*A.k+A.x,n[1]*A.k+A.y]}(t),A.x+=n[0]-t[0],A.y+=n[1]-t[1]}function _(n,t,e,r){n.__chart__={x:A.x,y:A.y,k:A.k},x(Math.pow(2,r)),b(c=t,e),n=Yi.select(n),0<y&&(n=n.transition().duration(y)),n.call(i.event)}function t(){h&&h.domain(s.range().map(function(n){return(n-A.x)/A.k}).map(s.invert)),g&&g.domain(p.range().map(function(n){return(n-A.y)/A.k}).map(p.invert))}function l(n){m++||n({type:"zoomstart"})}function w(n){t(),n({type:"zoom",scale:A.k,translate:[A.x,A.y]})}function S(n){--m||(n({type:"zoomend"}),c=null)}function k(){var n=this,t=Yi.event.target,e=L.of(n,arguments),r=0,i=Yi.select(T(n)).on(M,function(){r=1,b(Yi.mouse(n),u),w(e)}).on(z,function(){i.on(M,null).on(z,null),o(r&&Yi.event.target===t),S(e)}),u=a(Yi.mouse(n)),o=X(n);xa.call(n),l(e)}function N(){function f(){var n=Yi.touches(p);
vendor: 12,804 bytes, line 17
17return c=A.k,n.forEach(function(n){n.identifier in v&&(v[n.identifier]=a(n))}),n}function n(){var n=Yi.event.target;Yi.select(n).on(y,s).on(m,h),M.push(n);for(var t=Yi.event.changedTouches,e=0,r=t.length;e<r;++e)v[t[e].identifier]=null;var i=f(),u=Date.now();if(1===i.length){if(u-E<500){var o=i[0];_(p,o,v[o.identifier],Math.floor(Math.log(A.k)/Math.LN2)+1),D()}E=u}else if(1<i.length){o=i[0];var a=i[1],l=o[0]-a[0],c=o[1]-a[1];d=l*l+c*c}}function s(){var n,t,e,r,i=Yi.touches(p);xa.call(p);for(var u=0,o=i.length;u<o;++u,r=null)if(e=i[u],r=v[e.identifier]){if(t)break;n=e,t=r}if(r){var a=(a=e[0]-n[0])*a+(a=e[1]-n[1])*a,l=d&&Math.sqrt(a/d);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+r[0])/2,(t[1]+r[1])/2],x(l*c)}E=null,b(n,t),w(g)}function h(){if(Yi.event.touches.length){for(var n=Yi.event.changedTouches,t=0,e=n.length;t<e;++t)delete v[n[t].identifier];for(var r in v)return void f()}Yi.selectAll(M).on(i,null),u.on(C,k).on(q,N),o(),S(g)}var c,p=this,g=L.of(p,arguments),v={},d=0,i=".zoom-"+Yi.event.changedTouches[0].identifier,y="touchmove"+i,m="touchend"+i,M=[],u=Yi.select(p),o=X(p);n(),l(g),u.on(C,null).on(q,n)}function e(){var n=L.of(this,arguments);f?clearTimeout(f):(xa.call(this),u=a(c=o||Yi.mouse(this)),l(n)),f=setTimeout(function(){f=null,S(n)},50),D(),x(Math.pow(2,.002*Su())*A.k),b(c,u),w(n)}function r(){var n=Yi.mouse(this),t=Math.log(A.k)/Math.LN2;_(this,n,a(n),Yi.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}var u,c,o,f,E,s,h,p,g,A={x:0,y:0,k:1},v=[960,500],d=Nu,y=250,m=0,C="mousedown.zoom",M="mousemove.zoom",z="mouseup.zoom",q="touchstart.zoom",L=P(i,"zoomstart","zoom","zoomend");return ku||(ku="onwheel"in Xi?(Su=function(){return-Yi.event.deltaY*(Yi.event.deltaMode?120:1)},"wheel"):"onmousewheel"in Xi?(Su=function(){return Yi.event.wheelDelta},"mousewheel"):(Su=function(){return-Yi.event.detail},"MozMousePixelScroll")),i.event=function(n){n.each(function(){var a=L.of(this,arguments),t=A;ma?Yi.select(this).transition().each("start.zoom",function(){A=this.__chart__||{x:0,y:0,k:1},l(a)}).tween("zoom:zoom",function(){var r=v[0],n=v[1],i=c?c[0]:r/2,u=c?c[1]:n/2,o=Yi.interpolateZoom([(i-A.x)/A.k,(u-A.y)/A.k,r/A.k],[(i-t.x)/t.k,(u-t.y)/t.k,r/t.k]);return function(n){var t=o(n),e=r/t[2];this.__chart__=A={x:i-t[0]*e,y:u-t[1]*e,k:e},w(a)}}).each("interrupt.zoom",function(){S(a)}).each("end.zoom",function(){S(a)}):(this.__chart__=A,l(a),w(a),S(a))})},i.translate=function(n){return arguments.length?(A={x:+n[0],y:+n[1],k:A.k},t(),i):[A.x,A.y]},i.scale=function(n){return arguments.length?(A={x:A.x,y:A.y,k:+n},t(),i):A.k},i.scaleExtent=function(n){return arguments.length?(d=null==n?Nu:[+n[0],+n[1]],i):d},i.center=function(n){return arguments.length?(o=n&&[+n[0],+n[1]],i):o},i.size=function(n){return arguments.length?(v=n&&[+n[0],+n[1]],i):v},i.duration=function(n){return arguments.length?(y=+n,i):y},i.x=function(n){return arguments.length?(s=(h=n).copy(),A={x:0,y:0,k:1},i):h},i.y=function(n){return arguments.length?(p=(g=n).copy(),A={x:0,y:0,k:1},i):g},Yi.rebind(i,L,"on")};var Su,ku,Nu=[0,1/0];(Yi.color=tn).prototype.toString=function(){return this.rgb()+""};var Eu=(Yi.hsl=en).prototype=new tn;Eu.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new en(this.h,this.s,this.l/n)},Eu.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new en(this.h,this.s,n*this.l)},Eu.rgb=function(){return rn(this.h,this.s,this.l)};var Au=(Yi.hcl=un).prototype=new tn;Au.brighter=function(n){return new un(this.h,this.c,Math.min(100,this.l+Cu*(arguments.length?n:1)))},Au.darker=function(n){return new un(this.h,this.c,Math.max(0,this.l-Cu*(arguments.length?n:1)))},Au.rgb=function(){return on(this.h,this.c,this.l).rgb()},Yi.lab=an;var Cu=18,zu=.95047,qu=1,Lu=1.08883,Tu=an.prototype=new tn;Tu.brighter=function(n){return new an(Math.min(100,this.l+Cu*(arguments.length?n:1)),this.a,this.b)},Tu.darker=function(n){return new an(Math.max(0,this.l-Cu*(arguments.length?n:1)),this.a,this.b)},Tu.rgb=function(){return ln(this.l,this.a,this.b)};var Ru=(Yi.rgb=pn).prototype=new tn;Ru.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b;return t||e||r?(t&&t<30&&(t=30),e&&e<30&&(e=30),r&&r<30&&(r=30),new pn(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new pn(30,30,30)},Ru.darker=function(n){return new pn((n=Math.pow(.7,arguments.length?n:1))*this.r,n*this.g,n*this.b)},Ru.hsl=function(){return mn(this.r,this.g,this.b)},Ru.toString=function(){return"#"+dn(this.r)+dn(this.g)+dn(this.b)};var Du=Yi.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Du.forEach(function(n,t){Du.set(n,gn(t))}),Yi.functor=_n,Yi.xhr=wn(R),Yi.dsv=function(i,u){function o(n,t,e){arguments.length<3&&(e=t,t=null);var r=Sn(n,u,null==t?a:l(t),e);return r.row=function(n){return arguments.length?r.response(null==(t=n)?a:l(n)):t},r}function a(n){return o.parse(n.responseText)}function l(t){return function(n){return o.parse(n.responseText,t)}}function t(n){return n.map(c).join(i)}function c(n){return e.test(n)?'"'+n.replace(/\"/g,'""')+'"':n}var e=new RegExp('["'+i+"\n]"),h=i.charCodeAt(0);return o.parse=function(n,r){var i;return o.parseRows(n,function(n,t){if(i)return i(n,t-1);var e=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");i=r?function(n,t){return r(e(n),t)}:e})},o.parseRows=function(i,n){function t(){if(l<=c)return a;if(u)return u=!1,o;var n=c;if(34===i.charCodeAt(n)){for(var t=n;t++<l;)if(34===i.charCodeAt(t)){if(34!==i.charCodeAt(t+1))break;++t}return c=t+2,13===(e=i.charCodeAt(t+1))?(u=!0,10===i.charCodeAt(t+2)&&++c):10===e&&(u=!0),i.slice(n+1,t).replace(/""/g,'"')}for(;c<l;){var e,r=1;if(10===(e=i.charCodeAt(c++)))u=!0;else if(13===e)u=!0,10===i.charCodeAt(c)&&(++c,++r);else if(e!==h)continue;return i.slice(n,c-r)}return i.slice(n)}for(var e,u,o={},a={},r=[],l=i.length,c=0,f=0;(e=t())!==a;){for(var s=[];e!==o&&e!==a;)s.push(e),e=t();n&&null==(s=n(s,f++))||r.push(s)}return r},o.format=function(n){if(Array.isArray(n[0]))return o.formatRows(n);var e=new g,r=[];return n.forEach(function(n){for(var t in n)e.has(t)||r.push(e.add(t))}),[r.map(c).join(i)].concat(n.map(function(t){return r.map(function(n){return c(t[n])}).join(i)})).join("\n")},o.formatRows=function(n){return n.map(t).join("\n")},o},Yi.csv=Yi.dsv(",","text/csv"),Yi.tsv=Yi.dsv("\t","text/tab-separated-values");var Pu,Uu,ju,Fu,Hu,Ou=this[d(this,"requestAnimationFrame")]||function(n){setTimeout(n,17)};Yi.timer=function(n,t,e){var r=arguments.length;r<2&&(t=0),r<3&&(e=Date.now());var i={c:n,t:e+t,f:!1,n:null};Uu?Uu.n=i:Pu=i,Uu=i,ju||(Fu=clearTimeout(Fu),ju=1,Ou(kn))},Yi.timer.flush=function(){Nn(),En()},Yi.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var Iu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(function(n,t){var e=Math.pow(10,3*Qi(8-t));return{scale:8<t?function(n){return n/e}:function(n){return n*e},symbol:n}});Yi.formatPrefix=function(n,t){var e=0;return n&&(n<0&&(n*=-1),t&&(n=Yi.round(n,An(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),Iu[8+e/3]};var Yu=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,Zu=Yi.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=Yi.round(n,An(n,t))).toFixed(Math.max(0,Math.min(20,An(n*(1+1e-15),t))))}}),Vu=Yi.time={},Xu=Date;zn.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){$u.setUTCDate.apply(this._,arguments)},setDay:function(){$u.setUTCDay.apply(this._,arguments)},setFullYear:function(){$u.setUTCFullYear.apply(this._,arguments)},setHours:function(){$u.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){$u.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){$u.setUTCMinutes.apply(this._,arguments)},setMonth:function(){$u.setUTCMonth.apply(this._,arguments)},setSeconds:function(){$u.setUTCSeconds.apply(this._,arguments)},setTime:function(){$u.setTime.apply(this._,arguments)}};var $u=Date.prototype;Vu.year=qn(function(n){return(n=Vu.day(n)).setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),Vu.years=Vu.year.range,Vu.years.utc=Vu.year.utc.range,Vu.day=qn(function(n){var t=new Xu(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),Vu.days=Vu.day.range,Vu.days.utc=Vu.day.utc.range,Vu.dayOfYear=function(n){var t=Vu.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,e){e=7-e;var t=Vu[n]=qn(function(n){return(n=Vu.day(n)).setDate(n.getDate()-(n.getDay()+e)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var t=Vu.year(n).getDay();return Math.floor((Vu.dayOfYear(n)+(t+e)%7)/7)-(t!==e)});Vu[n+"s"]=t.range,Vu[n+"s"].utc=t.utc.range,Vu[n+"OfYear"]=function(n){var t=Vu.year(n).getDay();return Math.floor((Vu.dayOfYear(n)+(t+e)%7)/7)}}),Vu.week=Vu.sunday,Vu.weeks=Vu.sunday.range,Vu.weeks.utc=Vu.sunday.utc.range,Vu.weekOfYear=Vu.sundayOfYear;var Bu={"-":"",_:" ",0:"0"},Wu=/^\s*\d+/,Ju=/^%/;Yi.locale=function(n){return{numberFormat:function(n){var S=n.decimal,a=n.thousands,l=n.grouping,r=n.currency,k=l&&a?function(n,t){for(var e=n.length,r=[],i=0,u=l[0],o=0;
170<e&&0<u&&(t<o+u+1&&(u=Math.max(1,t-o)),r.push(n.substring(e-=u,e+u)),!((o+=u+1)>t));)u=l[i=(i+1)%l.length];return r.reverse().join(a)}:R;return function(n){var t=Yu.exec(n),f=t[1]||" ",s=t[2]||">",h=t[3]||"-",e=t[4]||"",p=t[5],g=+t[6],v=t[7],d=t[8],y=t[9],m=1,M="",x="",b=!1,_=!0;switch(d&&(d=+d.substring(1)),(p||"0"===f&&"="===s)&&(p=f="0",s="="),y){case"n":v=!0,y="g";break;case"%":m=100,x="%",y="f";break;case"p":m=100,x="%",y="r";break;case"b":case"o":case"x":case"X":"#"===e&&(M="0"+y.toLowerCase());case"c":_=!1;case"d":b=!0,d=0;break;case"s":m=-1,y="r"}"$"===e&&(M=r[0],x=r[1]),"r"!=y||d||(y="g"),null!=d&&("g"==y?d=Math.max(1,Math.min(21,d)):("e"==y||"f"==y)&&(d=Math.max(0,Math.min(20,d)))),y=Zu.get(y)||Cn;var w=p&&v;return function(n){var t=x;if(b&&n%1)return"";var e=n<0||0===n&&1/n<0?(n=-n,"-"):"-"===h?"":h;if(m<0){var r=Yi.formatPrefix(n,d);n=r.scale(n),t=r.symbol+x}else n*=m;var i,u,o=(n=y(n,d)).lastIndexOf(".");if(o<0){var a=_?n.lastIndexOf("e"):-1;u=a<0?(i=n,""):(i=n.substring(0,a),n.substring(a))}else i=n.substring(0,o),u=S+n.substring(o+1);!p&&v&&(i=k(i,1/0));var l=M.length+i.length+u.length+(w?0:e.length),c=l<g?new Array(l=g-l+1).join(f):"";return w&&(i=k(c+i,c.length?g-u.length:1/0)),e+=M,n=i+u,("<"===s?e+n+c:">"===s?c+e+n:"^"===s?c.substring(0,l>>=1)+e+n+c.substring(l):e+(w?n:c+n))+t}}}(n),timeFormat:function(n){function r(a){function n(n){for(var t,e,r,i=[],u=-1,o=0;++u<l;)37===a.charCodeAt(u)&&(i.push(a.slice(o,u)),null!=(e=Bu[t=a.charAt(++u)])&&(t=a.charAt(++u)),(r=x[t])&&(t=r(n,null==e?"e"===t?" ":"0":e)),i.push(t),o=u+1);return i.push(a.slice(o,u)),i.join("")}var l=a.length;return n.parse=function(n){var t={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null};if(i(t,a,n,0)!=n.length)return null;"p"in t&&(t.H=t.H%12+12*t.p);var e=null!=t.Z&&Xu!==zn,r=new(e?zn:Xu);return"j"in t?r.setFullYear(t.y,0,t.j):"w"in t&&("W"in t||"U"in t)?(r.setFullYear(t.y,0,1),r.setFullYear(t.y,0,"W"in t?(t.w+6)%7+7*t.W-(r.getDay()+5)%7:t.w+7*t.U-(r.getDay()+6)%7)):r.setFullYear(t.y,t.m,t.d),r.setHours(t.H+(t.Z/100|0),t.M+t.Z%100,t.S,t.L),e?r._:r},n.toString=function(){return a},n}function i(n,t,e,r){for(var i,u,o,a=0,l=t.length,c=e.length;a<l;){if(c<=r)return-1;if(37===(i=t.charCodeAt(a++))){if(o=t.charAt(a++),!(u=b[o in Bu?t.charAt(a++):o])||(r=u(n,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}var t=n.dateTime,e=n.date,u=n.time,o=n.periods,a=n.days,l=n.shortDays,c=n.months,f=n.shortMonths;r.multi=(r.utc=function(n){function t(n){try{var t=new(Xu=zn);return t._=n,e(t)}finally{Xu=Date}}var e=r(n);return t.parse=function(n){try{Xu=zn;var t=e.parse(n);return t&&t._}finally{Xu=Date}},t.toString=e.toString,t}).multi=Gn;var s=Yi.map(),h=Rn(a),p=Dn(a),g=Rn(l),v=Dn(l),d=Rn(c),y=Dn(c),m=Rn(f),M=Dn(f);o.forEach(function(n,t){s.set(n.toLowerCase(),t)});var x={a:function(n){return l[n.getDay()]},A:function(n){return a[n.getDay()]},b:function(n){return f[n.getMonth()]},B:function(n){return c[n.getMonth()]},c:r(t),d:function(n,t){return Tn(n.getDate(),t,2)},e:function(n,t){return Tn(n.getDate(),t,2)},H:function(n,t){return Tn(n.getHours(),t,2)},I:function(n,t){return Tn(n.getHours()%12||12,t,2)},j:function(n,t){return Tn(1+Vu.dayOfYear(n),t,3)},L:function(n,t){return Tn(n.getMilliseconds(),t,3)},m:function(n,t){return Tn(n.getMonth()+1,t,2)},M:function(n,t){return Tn(n.getMinutes(),t,2)},p:function(n){return o[+(12<=n.getHours())]},S:function(n,t){return Tn(n.getSeconds(),t,2)},U:function(n,t){return Tn(Vu.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Tn(Vu.mondayOfYear(n),t,2)},x:r(e),X:r(u),y:function(n,t){return Tn(n.getFullYear()%100,t,2)},Y:function(n,t){return Tn(n.getFullYear()%1e4,t,4)},Z:Wn,"%":function(){return"%"}},b={a:function(n,t,e){g.lastIndex=0;var r=g.exec(t.slice(e));return r?(n.w=v.get(r[0].toLowerCase()),e+r[0].length):-1},A:function(n,t,e){h.lastIndex=0;var r=h.exec(t.slice(e));return r?(n.w=p.get(r[0].toLowerCase()),e+r[0].length):-1},b:function(n,t,e){m.lastIndex=0;var r=m.exec(t.slice(e));return r?(n.m=M.get(r[0].toLowerCase()),e+r[0].length):-1},B:function(n,t,e){d.lastIndex=0;var r=d.exec(t.slice(e));return r?(n.m=y.get(r[0].toLowerCase()),e+r[0].length):-1},c:function(n,t,e){return i(n,x.c.toString(),t,e)},d:Yn,e:Yn,H:Vn,I:Vn,j:Zn,L:Bn,m:In,M:Xn,p:function(n,t,e){var r=s.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)},S:$n,U:Un,w:Pn,W:jn,x:function(n,t,e){return i(n,x.x.toString(),t,e)},X:function(n,t,e){return i(n,x.X.toString(),t,e)},y:Hn,Y:Fn,Z:On,"%":Jn};return r}(n)}};var Gu=Yi.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
17ay","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});Yi.format=Gu.numberFormat,Yi.geo={},Kn.prototype={s:0,t:0,add:function(n){Qn(n,this.t,Ku),Qn(Ku.s,this.s,this),this.s?this.t+=Ku.t:this.s=Ku.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var Ku=new Kn;Yi.geo.stream=function(n,t){n&&Qu.hasOwnProperty(n.type)?Qu[n.type](n,t):nt(n,t)};var Qu={Feature:function(n,t){nt(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,i=e.length;++r<i;)nt(e[r].geometry,t)}},no={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){tt(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)tt(e[r],t,0)},Polygon:function(n,t){et(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)et(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,i=e.length;++r<i;)nt(e[r],t)}};Yi.geo.area=function(n){return to=0,Yi.geo.stream(n,ro),to};var to,eo=new Kn,ro={sphere:function(){to+=4*yu},point:y,lineStart:y,lineEnd:y,polygonStart:function(){eo.reset(),ro.lineStart=rt},polygonEnd:function(){var n=2*eo;to+=n<0?4*yu+n:n,ro.lineStart=ro.lineEnd=ro.point=y}};Yi.geo.bounds=function(){function f(n,t){M.push(x=[h=n,g=n]),t<p&&(p=t),v<t&&(v=t)}function r(n,t){var e=it([n*bu,t*bu]);if(y){var r=ot(y,e),i=ot([r[1],-r[0],0],r);ct(i),i=ft(i);var u=n-d,o=0<u?1:-1,a=i[0]*_u*o,l=180<Qi(u);if(l^(o*d<a&&a<o*n)){var c=i[1]*_u;v<c&&(v=c)}else if(l^(o*d<(a=(a+360)%360-180)&&a<o*n)){(c=-i[1]*_u)<p&&(p=c)}else t<p&&(p=t),v<t&&(v=t);l?n<d?s(h,n)>s(h,g)&&(g=n):s(n,g)>s(h,g)&&(h=n):h<=g?(n<h&&(h=n),g<n&&(g=n)):d<n?s(h,n)>s(h,g)&&(g=n):s(n,g)>s(h,g)&&(h=n)}else f(n,t);y=e,d=n}function n(){b.point=r}function t(){x[0]=h,x[1]=g,b.point=f,y=null}function e(n,t){if(y){var e=n-d;m+=180<Qi(e)?e+(0<e?360:-360):e}else o=n,a=t;ro.point(n,t),r(n,t)}function i(){ro.lineStart()}function u(){e(o,a),ro.lineEnd(),Qi(m)>vu&&(h=-(g=180)),x[0]=h,x[1]=g,y=null}function s(n,t){return(t-=n)<0?t+360:t}function l(n,t){return n[0]-t[0]}function c(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var h,p,g,v,d,o,a,y,m,M,x,b={point:f,lineStart:n,lineEnd:t,polygonStart:function(){b.point=e,b.lineStart=i,b.lineEnd=u,m=0,ro.polygonStart()},polygonEnd:function(){ro.polygonEnd(),b.point=f,b.lineStart=n,b.lineEnd=t,eo<0?(h=-(g=180),p=-(v=90)):vu<m?v=90:m<-vu&&(p=-90),x[0]=h,x[1]=g}};return function(n){if(v=g=-(h=p=1/0),M=[],Yi.geo.stream(n,b),u=M.length){M.sort(l);for(var t=1,e=[a=M[0]];t<u;++t)c((i=M[t])[0],a)||c(i[1],a)?(s(a[0],i[1])>s(a[0],a[1])&&(a[1]=i[1]),s(i[0],a[1])>s(a[0],a[1])&&(a[0]=i[0])):e.push(a=i);for(var r,i,u,o=-1/0,a=(t=0,e[u=e.length-1]);t<=u;a=i,++t)i=e[t],(r=s(a[1],i[0]))>o&&(o=r,h=i[0],g=a[1])}return M=x=null,1/0===h||1/0===p?[[NaN,NaN],[NaN,NaN]]:[[h,p],[g,v]]}}(),Yi.geo.centroid=function(n){io=uo=oo=ao=lo=co=fo=so=ho=po=go=0,Yi.geo.stream(n,vo);var t=ho,e=po,r=go,i=t*t+e*e+r*r;return i<du&&(t=co,e=fo,r=so,uo<vu&&(t=oo,e=ao,r=lo),(i=t*t+e*e+r*r)<du)?[NaN,NaN]:[Math.atan2(e,t)*_u,K(r/Math.sqrt(i))*_u]};var io,uo,oo,ao,lo,co,fo,so,ho,po,go,vo={sphere:y,point:ht,lineStart:gt,lineEnd:vt,polygonStart:function(){vo.lineStart=dt},polygonEnd:function(){vo.lineStart=gt}},yo=_t(mt,function(i){var u,o=NaN,a=NaN,l=NaN;return{lineStart:function(){i.lineStart(),u=1},point:function(n,t){var e=0<n?yu:-yu,r=Qi(n-o);Qi(r-yu)<vu?(i.point(o,a=0<(a+t)/2?xu:-xu),i.point(l,a),i.lineEnd(),i.lineStart(),i.point(e,a),i.point(n,a),u=0):l!==e&&yu<=r&&(Qi(o-l)<vu&&(o-=l*vu),Qi(n-e)<vu&&(n-=e*vu),a=function(n,t,e,r){var i,u,o=Math.sin(n-e);return Qi(o)>vu?Math.atan((Math.sin(t)*(u=Math.cos(r))*Math.sin(e)-Math.sin(r)*(i=Math.cos(t))*Math.sin(n))/(i*u*o)):(t+r)/2}(o,a,n,t),i.point(l,a),i.lineEnd(),i.lineStart(),i.point(e,a),u=0),i.point(o=n,a=t),l=e},lineEnd:function(){i.lineEnd(),o=a=NaN},clean:function(){return 2-u}}},function(n,t,e,r){var i;if(null==n)i=e*xu,r.point(-yu,i),r.point(0,i),r.point(yu,i),r.point(yu,0),r.point(yu,-i),r.point(0,-i),r.point(-yu,-i),r.point(-yu,0),r.point(-yu,i);else if(Qi(n[0]-t[0])>vu){var u=n[0]<t[0]?yu:-yu;i=e*u/2,r.point(-u,i),r.point(0,i),r.point(u,i)}else r.point(t[0],t[1])},[-yu,-yu/2]),mo=1e9;Yi.geo.clipExtent=function(){var t,e,r,i,u,o,a={stream:function(n){return u&&(u.valid=!1),(u=
vendor: 11,349 bytes, line 17
17o(n)).valid=!0,u},extent:function(n){return arguments.length?(o=Et(t=+n[0][0],e=+n[0][1],r=+n[1][0],i=+n[1][1]),u&&(u.valid=!1,u=null),a):[[t,e],[r,i]]}};return a.extent([[0,0],[960,500]])},(Yi.geo.conicEqualArea=function(){return At(Ct)}).raw=Ct,Yi.geo.albers=function(){return Yi.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},Yi.geo.albersUsa=function(){function i(n){var t=n[0],e=n[1];return r=null,u(t,e),r||(o(t,e),r)||a(t,e),r}var r,u,o,a,l=Yi.geo.albers(),c=Yi.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),f=Yi.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s={point:function(n,t){r=[n,t]}};return i.invert=function(n){var t=l.scale(),e=l.translate(),r=(n[0]-e[0])/t,i=(n[1]-e[1])/t;return(.12<=i&&i<.234&&-.425<=r&&r<-.214?c:.166<=i&&i<.234&&-.214<=r&&r<-.115?f:l).invert(n)},i.stream=function(n){var e=l.stream(n),r=c.stream(n),i=f.stream(n);return{point:function(n,t){e.point(n,t),r.point(n,t),i.point(n,t)},sphere:function(){e.sphere(),r.sphere(),i.sphere()},lineStart:function(){e.lineStart(),r.lineStart(),i.lineStart()},lineEnd:function(){e.lineEnd(),r.lineEnd(),i.lineEnd()},polygonStart:function(){e.polygonStart(),r.polygonStart(),i.polygonStart()},polygonEnd:function(){e.polygonEnd(),r.polygonEnd(),i.polygonEnd()}}},i.precision=function(n){return arguments.length?(l.precision(n),c.precision(n),f.precision(n),i):l.precision()},i.scale=function(n){return arguments.length?(l.scale(n),c.scale(.35*n),f.scale(n),i.translate(l.translate())):l.scale()},i.translate=function(n){if(!arguments.length)return l.translate();var t=l.scale(),e=+n[0],r=+n[1];return u=l.translate(n).clipExtent([[e-.455*t,r-.238*t],[e+.455*t,r+.238*t]]).stream(s).point,o=c.translate([e-.307*t,r+.201*t]).clipExtent([[e-.425*t+vu,r+.12*t+vu],[e-.214*t-vu,r+.234*t-vu]]).stream(s).point,a=f.translate([e-.205*t,r+.212*t]).clipExtent([[e-.214*t+vu,r+.166*t+vu],[e-.115*t-vu,r+.234*t-vu]]).stream(s).point,i},i.scale(1070)};var Mo,xo,bo,_o,wo,So,ko={point:y,lineStart:y,lineEnd:y,polygonStart:function(){xo=0,ko.lineStart=zt},polygonEnd:function(){ko.lineStart=ko.lineEnd=ko.point=y,Mo+=Qi(xo/2)}},No={point:function(n,t){n<bo&&(bo=n),wo<n&&(wo=n),t<_o&&(_o=t),So<t&&(So=t)},lineStart:y,lineEnd:y,polygonStart:y,polygonEnd:y},Eo={point:Tt,lineStart:Rt,lineEnd:Dt,polygonStart:function(){Eo.lineStart=Pt},polygonEnd:function(){Eo.point=Tt,Eo.lineStart=Rt,Eo.lineEnd=Dt}};Yi.geo.path=function(){function t(n){return n&&("function"==typeof l&&o.pointRadius(+l.apply(this,arguments)),a&&a.valid||(a=u(o)),Yi.geo.stream(n,a)),o.result()}function e(){return a=null,t}var r,i,u,o,a,l=4.5;return t.area=function(n){return Mo=0,Yi.geo.stream(n,u(ko)),Mo},t.centroid=function(n){return oo=ao=lo=co=fo=so=ho=po=go=0,Yi.geo.stream(n,u(Eo)),go?[ho/go,po/go]:so?[co/so,fo/so]:lo?[oo/lo,ao/lo]:[NaN,NaN]},t.bounds=function(n){return wo=So=-(bo=_o=1/0),Yi.geo.stream(n,u(No)),[[bo,_o],[wo,So]]},t.projection=function(n){return arguments.length?(u=(r=n)?n.stream||function(e){var t=jt(function(n,t){return e([n*_u,t*_u])});return function(n){return Yt(t(n))}}(n):R,e()):r},t.context=function(n){return arguments.length?(o=null==(i=n)?new qt:new Ut(n),"function"!=typeof l&&o.pointRadius(l),e()):i},t.pointRadius=function(n){return arguments.length?(l="function"==typeof n?n:(o.pointRadius(+n),+n),t):l},t.projection(Yi.geo.albersUsa()).context(null)},Yi.geo.transform=function(r){return{stream:function(n){var t=new Ft(n);for(var e in r)t[e]=r[e];return t}}},Ft.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},Yi.geo.projection=Ot,Yi.geo.projectionMutator=It,(Yi.geo.equirectangular=function(){return Ot(Zt)}).raw=Zt.invert=Zt,Yi.geo.rotation=function(t){function n(n){return(n=t(n[0]*bu,n[1]*bu))[0]*=_u,n[1]*=_u,n}return t=Xt(t[0]%360*bu,t[1]*bu,2<t.length?t[2]*bu:0),n.invert=function(n){return(n=t.invert(n[0]*bu,n[1]*bu))[0]*=_u,n[1]*=_u,n},n},Vt.invert=Zt,Yi.geo.circle=function(){function t(){var n="function"==typeof u?u.apply(this,arguments):u,e=Xt(-n[0]*bu,-n[1]*bu,0).invert,r=[];return i(null,null,1,{point:function(n,t){r.push(n=e(n,t)),n[0]*=_u,n[1]*=_u}}),{type:"Polygon",coordinates:[r]}}var e,i,u=[0,0],r=6;return t.origin=function(n){return arguments.length?(u=n,t):u},t.angle=function(n){return arguments.length?(i=Jt((e=+n)*bu,r*bu),t):e},t.precision=function(n){return arguments.length?(i=Jt(e*bu,(r=+n)*bu),t):r},t.angle(90)},Yi.geo.distance=function(n,t){var e,r=(t[0]-n[0])*bu,i=n[1]*bu,u=t[1]*bu,o=Math.sin(r),a=Math.cos(r),l=Math.sin(i),c=Math.cos(i),f=Math.sin(u),s=Math.cos(u);return Math.atan2(Math.sqrt((e=s*o)*e+(e=c*f-l*s*a)*e),l*f+c*s*a)},Yi.geo.graticule=function(){function t(){return{type:"MultiLineString",coordinates:n()}}function n(){return Yi.range(Math.ceil(u/d)*d,i,d).map(h).concat(Yi.range(Math.ceil(c/y)*y,l,y).map(p)).concat(Yi.range(Math.ceil(r/g)*g,e,g).filter(function(n){return Qi(n%d)>vu}).map(f)).concat(Yi.range(Math.ceil(a/v)*v,o,v).filter(function(n){return Qi(n%y)>vu}).map(s))}var e,r,i,u,o,a,l,c,f,s,h,p,g=10,v=g,d=90,y=360,m=2.5;return t.lines=function(){return n().map(function(n){return{type:"LineString",coordinates:n}})},t.outline=function(){return{type:"Polygon",coordinates:[h(u).concat(p(l).slice(1),h(i).reverse().slice(1),p(c).reverse().slice(1))]}},t.extent=function(n){return arguments.length?t.majorExtent(n).minorExtent(n):t.minorExtent()},t.majorExtent=function(n){return arguments.length?(u=+n[0][0],i=+n[1][0],c=+n[0][1],l=+n[1][1],i<u&&(n=u,u=i,i=n),l<c&&(n=c,c=l,l=n),t.precision(m)):[[u,c],[i,l]]},t.minorExtent=function(n){return arguments.length?(r=+n[0][0],e=+n[1][0],a=+n[0][1],o=+n[1][1],e<r&&(n=r,r=e,e=n),o<a&&(n=a,a=o,o=n),t.precision(m)):[[r,a],[e,o]]},t.step=function(n){return arguments.length?t.majorStep(n).minorStep(n):t.minorStep()},t.majorStep=function(n){return arguments.length?(d=+n[0],y=+n[1],t):[d,y]},t.minorStep=function(n){return arguments.length?(g=+n[0],v=+n[1],t):[g,v]},t.precision=function(n){return arguments.length?(m=+n,f=Kt(a,o,90),s=Qt(r,e,m),h=Kt(c,l,90),p=Qt(u,i,m),t):m},t.majorExtent([[-180,-90+vu],[180,90-vu]]).minorExtent([[-180,-80-vu],[180,80+vu]])},Yi.geo.greatArc=function(){function t(){return{type:"LineString",coordinates:[e||i.apply(this,arguments),r||u.apply(this,arguments)]}}var e,r,i=ne,u=te;return t.distance=function(){return Yi.geo.distance(e||i.apply(this,arguments),r||u.apply(this,arguments))},t.source=function(n){return arguments.length?(e="function"==typeof(i=n)?null:n,t):i},t.target=function(n){return arguments.length?(r="function"==typeof(u=n)?null:n,t):u},t.precision=function(){return arguments.length?t:0},t},Yi.geo.interpolate=function(n,t){return function(n,t,e,r){var i=Math.cos(t),o=Math.sin(t),u=Math.cos(r),a=Math.sin(r),l=i*Math.cos(n),c=i*Math.sin(n),f=u*Math.cos(e),s=u*Math.sin(e),h=2*Math.asin(Math.sqrt(nn(r-t)+i*u*nn(e-n))),p=1/Math.sin(h),g=h?function(n){var t=Math.sin(n*=h)*p,e=Math.sin(h-n)*p,r=e*l+t*f,i=e*c+t*s,u=e*o+t*a;return[Math.atan2(i,r)*_u,Math.atan2(u,Math.sqrt(r*r+i*i))*_u]}:function(){return[n*_u,t*_u]};return g.distance=h,g}(n[0]*bu,n[1]*bu,t[0]*bu,t[1]*bu)},Yi.geo.length=function(n){return Ao=0,Yi.geo.stream(n,Co),Ao};var Ao,Co={sphere:y,point:y,lineStart:function(){function e(n,t){var e=Math.sin(t*=bu),r=Math.cos(t),i=Qi((n*=bu)-o),u=Math.cos(i);Ao+=Math.atan2(Math.sqrt((i=r*Math.sin(i))*i+(i=l*e-a*r*u)*i),a*e+l*r*u),o=n,a=e,l=r}var o,a,l;Co.point=function(n,t){o=n*bu,a=Math.sin(t*=bu),l=Math.cos(t),Co.point=e},Co.lineEnd=function(){Co.point=Co.lineEnd=y}},lineEnd:y,polygonStart:y,polygonEnd:y},zo=ee(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(Yi.geo.azimuthalEqualArea=function(){return Ot(zo)}).raw=zo;var qo=ee(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},R);(Yi.geo.azimuthalEquidistant=function(){return Ot(qo)}).raw=qo,(Yi.geo.conicConformal=function(){return At(re)}).raw=re,(Yi.geo.conicEquidistant=function(){return At(ie)}).raw=ie;var Lo=ee(function(n){return 1/n},Math.atan);(Yi.geo.gnomonic=function(){return Ot(Lo)}).raw=Lo,ue.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-xu]},(Yi.geo.mercator=function(){return oe(ue)}).raw=ue;var To=ee(function(){return 1},Math.asin);(Yi.geo.orthographic=function(){return Ot(To)}).raw=To;var Ro=ee(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(Yi.geo.stereographic=function(){return Ot(Ro)}).raw=Ro,ae.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-xu]},(Yi.geo.transverseMercator=function(){var n=oe(ae),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):[(n=t())[1],-n[0]]},n.rotate=function(n){return n?e([n[0],n[1],2<n.length?n[2]+90:90]):[(n=e())[0],n[1],n[2]-90]},e([0,0,90])}).raw=ae,Yi.geom={},Yi.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,e=_n(h),r=_n(p),i=n.length,u=[],o=[];for(t=0;t<i;t++)u.push([+e.call(this,n[t],t),+r.call(this,n[t],t),t]);for(u.sort(se),t=0;t<i;t++)o.push([u[t][0],-u[t][1]]);var a=fe(u),l=fe(o),c=l[0]===a[0],f=l[l.length-1]===a[a.length-1],s=[];for(t=a.length-1;0<=t;--t)s.push(n[u[a[t]][2]]);for(t=+c;t<l.length-f;++t)s.push(n[u[l[t]][2]]);return s}var h=le,p=ce;return arguments.length?t(n):(t.x=function(n){return arguments.length?(h=n,t):h},t.y=function(n){return arguments.length?(p=n,t):p},t)},Yi.geom.polygon=function(n){return iu(n,Do),n};var Do=Yi.geom.polygon.prototype=[];Do.area=function(){for(var n,t=-1,e=this.length,r=this[e-1],i=0;++t<e;)n=r,r=this[t],i+=n[1]*r[0]-n[0]*r[1];return.5*i},Do.centroid=function(n){var t,e,r=-1,i=this.length,u=0,o=0,a=this[i-1];for(arguments.length||(n=-1/(6*this.area()));++r<i;)t=a,a=this[r],e=t[0]*a[1]-a[0]*t[1],u+=(t[0]+a[0])*e,o+=(t[1]+a[1])*e;return[u*n,o*n]},Do.clip=function(n){for(var t,e,r,i,u,o,a=ge(n),l=-1,c=this.length-ge(this),f=this[c-1];++l<c;){for(t=n.slice(),n.length=0,i=this[l],u=t[(r=t.length-a)-1],e=-1;++e<r;)he(o=t[e],f,i)?(he(u,f,i)||n.push(pe(u,o,f,i)),n.push(o)):he(u,f,i)&&n.push(pe(u,o,f,i)),u=o;a&&n.push(n[0]),f=i}return n};var Po,Uo,jo,Fo,Ho,Oo=[],Io=[];_e.prototype.prepare=function(){for(var n,t=this.edges,e=t.length;e--;)(n=t[e].edge).b&&n.a||t.splice(e,1);return t.sort(we),t.length},qe.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},Le.prototype={insert:function(n,t){var e,r,i;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else e=this._?(n=Pe(this._),t.P=null,(t.N=n).P=n.L=t,n):(t.P=t.N=null,this._=t,null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)e===(r=e.U).L?(i=r.R)&&i.C?(e.C=i.C=!1,r.C=!0,n=r):(n===e.R&&(Re(this,e),e=(n=e).U),e.C=!1,r.C=!0,De(this,r)):(i=r.L)&&i.C?(e.C=i.C=!1,r.C=!0,n=r):(n===e.L&&(De(this,e),e=(n=e).U),e.C=!1,r.C=!0,Re(this,r)),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,e,r,i=n.U,u=n.L,o=n.R;if(e=u?o?Pe(o):u:o,i?i.L===n?i.L=e:i.R=e:this._=e,u&&o?(r=e.C,e.C=n.C,((e.L=u).U=e)!==o?(i=e.U,e.U=n.U,n=e.R,i.L=n,(e.R=o).U=e):(e.U=i,n=(i=e).R)):(r=n.C,n=e),n&&(n.U=i),!r){if(n&&n.C)return void(n.C=!1);do{if(n===this._)break;
17if(n===i.L){if((t=i.R).C&&(t.C=!1,i.C=!0,Re(this,i),t=i.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,De(this,t),t=i.R),t.C=i.C,i.C=t.R.C=!1,Re(this,i),n=this._;break}}else if((t=i.L).C&&(t.C=!1,i.C=!0,De(this,i),t=i.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,Re(this,t),t=i.L),t.C=i.C,i.C=t.L.C=!1,De(this,i),n=this._;break}t.C=!0,i=(n=i).U}while(!n.C);n&&(n.C=!1)}}},Yi.geom.voronoi=function(n){function t(i){var u=new Array(i.length),o=f[0][0],a=f[0][1],l=f[1][0],c=f[1][1];return Ue(e(i),f).cells.forEach(function(n,t){var e=n.edges,r=n.site;(u[t]=e.length?e.map(function(n){var t=n.start();return[t.x,t.y]}):r.x>=o&&r.x<=l&&r.y>=a&&r.y<=c?[[o,c],[l,c],[l,a],[o,a]]:[]).point=i[t]}),u}function e(n){return n.map(function(n,t){return{x:Math.round(u(n,t)/vu)*vu,y:Math.round(o(n,t)/vu)*vu,i:t}})}var r=le,i=ce,u=r,o=i,f=Yo;return n?t(n):(t.links=function(t){return Ue(e(t)).edges.filter(function(n){return n.l&&n.r}).map(function(n){return{source:t[n.l.i],target:t[n.r.i]}})},t.triangles=function(h){var p=[];return Ue(e(h)).cells.forEach(function(n,t){for(var e,r=n.site,i=n.edges.sort(we),u=-1,o=i.length,a=i[o-1].edge,l=a.l===r?a.r:a.l;++u<o;)a,e=l,l=(a=i[u].edge).l===r?a.r:a.l,t<e.i&&t<l.i&&(f=e,s=l,((c=r).x-s.x)*(f.y-c.y)-(c.x-f.x)*(s.y-c.y)<0)&&p.push([h[t],h[e.i],h[l.
17i]]);var c,f,s}),p},t.x=function(n){return arguments.length?(u=_n(r=n),t):r},t.y=function(n){return arguments.length?(o=_n(i=n),t):i},t.clipExtent=function(n){return arguments.length?(f=null==n?Yo:n,t):f===Yo?null:f},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):f===Yo?null:f&&f[1]},t)};var Yo=[[-1e6,-1e6],[1e6,1e6]];Yi.geom.delaunay=function(n){return Yi.geom.voronoi().triangles(n)},Yi.geom.quadtree=function(n,M,x,b,_){function t(n){function p(n,t,e,r,i,u,o,a){if(!isNaN(e)&&!isNaN(r))if(n.leaf){var l=n.x,c=n.y;if(null!=l)if(Qi(l-e)+Qi(c-r)<.01)s(n,t,e,r,i,u,o,a);else{var f=n.point;n.x=n.y=n.point=null,s(n,f,l,c,i,u,o,a),s(n,t,e,r,i,u,o,a)}else n.x=e,n.y=r,n.point=t}else s(n,t,e,r,i,u,o,a)}function s(n,t,e,r,i,u,o,a){var l=.5*(i+o),c=.5*(u+a),f=l<=e,s=c<=r,h=s<<1|f;n.leaf=!1,f?i=l:o=l,s?u=c:a=c,p(n=n.nodes[h]||(n.nodes[h]={leaf:!0,nodes:[],point:null,x:null,y:null}),t,e,r,i,u,o,a)}var t,e,r,i,u,o,a,l,c,f=_n(S),h=_n(k);if(null!=M)o=M,a=x,l=b,c=_;else if(l=c=-(o=a=1/0),e=[],r=[],u=n.length,w)for(i=0;i<u;++i)(t=n[i]).x<o&&(o=t.x),t.y<a&&(a=t.y),t.x>l&&(l=t.x),t.y>c&&(c=t.y),e.push(t.x),r.push(t.y);else for(i=0;i<u;++i){var g=+f(t=n[i],i),v=+h(t,i);g<o&&(o=g),v<a&&(a=v),l<g&&(l=g),c<v&&(c=v),e.push(g),r.push(v)}var d=l-o,y=c-a;y<d?c=a+d:l=o+y;var m={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(n){p(m,n,+f(n,++i),+h(n,i),o,a,l,c)}};if(m.visit=function(n){!function n(t,e,r,i,u,o){if(!t(e,r,i,u,o)){var a=.5*(r+u),l=.5*(i+o),c=e.nodes;c[0]&&n(t,c[0],r,i,a,l),c[1]&&n(t,c[1],a,i,u,l),c[2]&&n(t,c[2],r,l,a,o),c[3]&&n(t,c[3],a,l,u,o)}}(n,m,o,a,l,c)},m.find=function(n){return function(n,d,y,m,M,x,b){var _,w=1/0;return function n(t,e,r,i,u){if(!(x<e||b<r||i<m||u<M)){if(o=t.point){var o,a=d-t.x,l=y-t.y,c=a*a+l*l;if(c<w){var f=Math.sqrt(w=c);m=d-f,M=y-f,x=d+f,b=y+f,_=o}}for(var s=t.nodes,h=.5*(e+i),p=.5*(r+u),g=(p<=y)<<1|h<=d,v=g+4;g<v;++g)if(t=s[3&g])switch(3&g){case 0:n(t,e,r,h,p);break;case 1:n(t,h,r,i,p);break;case 2:n(t,e,p,h,u);break;case 3:n(t,h,p,i,u)}}}(n,m,M,x,b),_}(m,n[0],n[1],o,a,l,c)},i=-1,null==M){for(;++i<u;)p(m,n[i],e[i],r[i],o,a,l,c);--i}else n.forEach(m.add);return e=r=n=t=null,m}var w,S=le,k=ce;return(w=arguments.length)?(S=Fe,k=He,3===w&&(_=x,b=M,x=M=0),t(n)):(t.x=function(n){return arguments.length?(S=n,t):S},t.y=function(n){return arguments.length?(k=n,t):k},t.extent=function(n){return arguments.length?(null==n?M=x=b=_=null:(M=+n[0][0],x=+n[0][1],b=+n[1][0],_=+n[1][1]),t):null==M?null:[[M,x],[b,_]]},t.size=function(n){return arguments.length?(null==n?M=x=b=_=null:(M=x=0,b=+n[0],_=+n[1]),t):null==M?null:[b-M,_-x]},t)},Yi.interpolateRgb=Oe,Yi.interpolateObject=Ie,Yi.interpolateNumber=Ye,Yi.interpolateString=Ze;var Zo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Vo=new RegExp(Zo.source,"g");Yi.interpolate=Ve,Yi.interpolators=[function(n,t){var e=typeof t;return("string"==e?Du.has(t.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(t)?Oe:Ze:t instanceof tn?Oe:Array.isArray(t)?Xe:"object"==e&&isNaN(t)?Ie:Ye)(n,t)}],Yi.interpolateArray=Xe;var Xo=function(){return R},$o=Yi.map({linear:Xo,poly:function(t){return function(n){return Math.pow(n,t)}},quad:function(){return We},cubic:function(){return Je},sin:function(){return Ke},exp:function(){return Qe},circle:function(){return nr},elastic:function(t,e){var r;return arguments.length<2&&(e=.45),r=arguments.length?e/mu*Math.asin(1/t):(t=1,e/4),function(n){return 1+t*Math.pow(2,-10*n)*Math.sin((n-r)*mu/e)}},back:function(t){return t||(t=1.70158),function(n){return n*n*((t+1)*n-t)}},bounce:function(){return tr}}),Bo=Yi.map({in:R,out:$e,"in-out":Be,"out-in":function(n){return Be($e(n))}});Yi.ease=function(n){var t=n.indexOf("-"),e=0<=t?n.slice(0,t):n,r=0<=t?n.slice(t+1):"in";return e=$o.get(e)||Xo,function(t){return function(n){return n<=0?0:1<=n?1:t(n)}}((r=Bo.get(r)||R)(e.apply(null,Zi.call(arguments,1))))},Yi.interpolateHcl=function(n,t){n=Yi.hcl(n),t=Yi.hcl(t);var e=n.h,r=n.c,i=n.l,u=t.h-e,o=t.c-r,a=t.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?t.c:r),isNaN(u)?(u=0,e=isNaN(e)?t.h:e):180<u?u-=360:u<-180&&(u+=360),function(n){return on(e+u*n,r+o*n,i+a*n)+""}},Yi.interpolateHsl=function(n,t){n=Yi.hsl(n),t=Yi.hsl(t);var e=n.h,r=n.s,i=n.l,u=t.h-e,o=t.s-r,a=t.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?t.s:r),isNaN(u)?(u=0,e=isNaN(e)?t.h:e):180<u?u-=360:u<-180&&(u+=360),function(n){return rn(e+u*n,r+o*n,i+a*n)+""}},Yi.interpolateLab=function(n,t){n=Yi.lab(n),t=Yi.lab(t);var e=n.l,r=n.a,i=n.b,u=t.l-e,o=t.a-r,a=t.b-i;return function(n){return ln(e+u*n,r+o*n,i+a*n)+""}},Yi.interpolateRound=er,Yi.transform=function(n){var e=Xi.createElementNS(Yi.ns.prefix.svg,"g");
vendor: 4,858 bytes, line 17
17return(Yi.transform=function(n){if(null!=n){e.setAttribute("transform",n);var t=e.transform.baseVal.consolidate()}return new rr(t?t.matrix:Wo)})(n)},rr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Wo={a:1,b:0,c:0,d:1,e:0,f:0};Yi.interpolateTransform=or,Yi.layout={},Yi.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e<r;)t.push(cr(n[e]));return t}},Yi.layout.chord=function(){function n(){var n,t,e,r,i,u={},o=[],a=Yi.range(x),l=[];for(y=[],m=[],n=0,r=-1;++r<x;){for(t=0,i=-1;++i<x;)t+=M[r][i];o.push(t),l.push(Yi.range(x)),n+=t}for(b&&a.sort(function(n,t){return b(o[n],o[t])}),_&&l.forEach(function(n,e){n.sort(function(n,t){return _(M[e][n],M[e][t])})}),n=(mu-S*x)/n,t=0,r=-1;++r<x;){for(e=t,i=-1;++i<x;){var c=a[r],f=l[c][i],s=M[c][f],h=t,p=t+=s*n;u[c+"-"+f]={index:c,subindex:f,startAngle:h,endAngle:p,value:s}}m[c]={index:c,startAngle:e,endAngle:t,value:(t-e)/n},t+=S}for(r=-1;++r<x;)for(i=r-1;++i<x;){var g=u[r+"-"+i],v=u[i+"-"+r];(g.value||v.value)&&y.push(g.value<v.value?{source:v,target:g}:{source:g,target:v})}w&&d()}function d(){y.sort(function(n,t){return w((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var y,m,M,x,b,_,w,t={},S=0;return t.matrix=function(n){return arguments.length?(x=(M=n)&&M.length,y=m=null,t):M},t.padding=function(n){return arguments.length?(S=n,y=m=null,t):S},t.sortGroups=function(n){return arguments.length?(b=n,y=m=null,t):b},t.sortSubgroups=function(n){return arguments.length?(_=n,y=null,t):_},t.sortChords=function(n){return arguments.length?(w=n,y&&d(),t):w},t.chords=function(){return y||n(),y},t.groups=function(){return m||n(),m},t},Yi.layout.force=function(){function s(c){return function(n,t,e,r){if(n.point!==c){var i=n.cx-c.x,u=n.cy-c.y,o=r-t,a=i*i+u*u;if(o*o/b<a){if(a<f){var l=n.charge/a;c.px-=i*l,c.py-=u*l}return!0}if(n.point&&a&&a<f){l=n.pointCharge/a;c.px-=i*l,c.py-=u*l}}return!n.charge}}function n(n){n.px=Yi.event.x,n.py=Yi.event.y,i.resume()}var t,h,p,g,v,i={},d=Yi.dispatch("start","tick","end"),y=[1,1],m=.9,u=Jo,o=Go,M=-30,f=Ko,x=.1,b=.64,_=[],w=[];return i.tick=function(){if((h*=.99)<.005)return d.end({type:"end",alpha:h=0}),!0;var n,t,e,r,i,u,o,a,l,c=_.length,f=w.length;for(t=0;t<f;++t)r=(e=w[t]).source,(u=(a=(i=e.target).x-r.x)*a+(l=i.y-r.y)*l)&&(a*=u=h*g[t]*((u=Math.sqrt(u))-p[t])/u,l*=u,i.x-=a*(o=r.weight/(i.weight+r.weight)),i.y-=l*o,r.x+=a*(o=1-o),r.y+=l*o);if((o=h*x)&&(a=y[0]/2,l=y[1]/2,t=-1,o))for(;++t<c;)(e=_[t]).x+=(a-e.x)*o,e.y+=(l-e.y)*o;if(M)for(function n(t,e,r){var i=0,u=0;if(t.charge=0,!t.leaf)for(var o,a=t.nodes,l=a.length,c=-1;++c<l;)null!=(o=a[c])&&(n(o,e,r),t.charge+=o.charge,i+=o.charge*o.cx,u+=o.charge*o.cy);if(t.point){t.leaf||(t.point.x+=Math.random()-.5,t.point.y+=Math.random()-.5);var f=e*r[t.point.index];t.charge+=t.pointCharge=f,i+=f*t.point.x,u+=f*t.point.y}t.cx=i/t.charge,t.cy=u/t.charge}(n=Yi.geom.quadtree(_),h,v),t=-1;++t<c;)(e=_[t]).fixed||n.visit(s(e));for(t=-1;++t<c;)(e=_[t]).fixed?(e.x=e.px,e.y=e.py):(e.x-=(e.px-(e.px=e.x))*m,e.y-=(e.py-(e.py=e.y))*m);d.tick({type:"tick",alpha:h})},i.nodes=function(n){return arguments.length?(_=n,i):_},i.links=function(n){return arguments.length?(w=n,i):w},i.size=function(n){return arguments.length?(y=n,i):y},i.linkDistance=function(n){return arguments.length?(u="function"==typeof n?n:+n,i):u},i.distance=i.linkDistance,i.linkStrength=function(n){return arguments.length?(o="function"==typeof n?n:+n,i):o},i.friction=function(n){return arguments.length?(m=+n,i):m},i.charge=function(n){return arguments.length?(M="function"==typeof n?n:+n,i):M},i.chargeDistance=function(n){return arguments.length?(f=n*n,i):Math.sqrt(f)},i.gravity=function(n){return arguments.length?(x=+n,i):x},i.theta=function(n){return arguments.length?(b=n*n,i):Math.sqrt(b)},i.alpha=function(n){return arguments.length?(n=+n,h?h=0<n?n:0:0<n&&(d.start({type:"start",alpha:h=n}),Yi.timer(i.tick)),i):h},i.start=function(){function n(n,t){if(!l){for(l=new Array(c),u=0;u<c;++u)l[u]=[];for(u=0;u<f;++u){var e=w[u];l[e.source.index].push(e.target),l[e.target.index].push(e.source)}}for(var r,i=l[a],u=-1,o=i.length;++u<o;)if(!isNaN(r=i[u][n]))return r;return Math.random()*t}var a,l,t,c=_.length,f=w.length,e=y[0],r=y[1];for(a=0;a<c;++a)(t=_[a]).index=a,t.weight=0;for(a=0;a<f;++a)"number"==typeof(t=w[a]).source&&(t.source=_[t.source]),"number"==typeof t.target&&(t.target=_[t.target]),++t.source.weight,++t.target.weight;for(a=0;a<c;++a)t=_[a],isNaN(t.x)&&(t.x=n("x",e)),isNaN(t.y)&&(t.y=n("y",r)),isNaN(t.px)&&(t.px=t.x),isNaN(t.py)&&(t.py=t.y);if(p=[],"function"==typeof u)for(a=0;a<f;++a)p[a]=+u.call(this,w[a],a);else for(a=0;a<f;++a)p[a]=u;if(g=[],"function"==typeof o)for(a=0;a<f;++a)g[a]=+o.call(this,w[a],a);else for(a=0;a<f;++a)g[a]=o;if(v=[],"function"==typeof M)for(a=0;a<c;
vendor: 5,711 bytes, line 17
17++a)v[a]=+M.call(this,_[a],a);else for(a=0;a<c;++a)v[a]=M;return i.resume()},i.resume=function(){return i.alpha(.1)},i.stop=function(){return i.alpha(0)},i.drag=function(){return t||(t=Yi.behavior.drag().origin(R).on("dragstart.force",sr).on("drag.force",n).on("dragend.force",hr)),arguments.length?void this.on("mouseover.force",pr).on("mouseout.force",gr).call(t):t},Yi.rebind(i,d,"on")};var Jo=20,Go=1,Ko=1/0;Yi.layout.hierarchy=function(){function a(n){var t,e=[n],r=[];for(n.depth=0;null!=(t=e.pop());)if(r.push(t),(u=c.call(a,t,t.depth))&&(i=u.length)){for(var i,u,o;0<=--i;)e.push(o=u[i]),o.parent=t,o.depth=t.depth+1;f&&(t.value=0),t.children=u}else f&&(t.value=+f.call(a,t,t.depth)||0),delete t.children;return yr(n,function(n){var t,e;l&&(t=n.children)&&t.sort(l),f&&(e=n.parent)&&(e.value+=n.value)}),r}var l=xr,c=mr,f=Mr;return a.sort=function(n){return arguments.length?(l=n,a):l},a.children=function(n){return arguments.length?(c=n,a):c},a.value=function(n){return arguments.length?(f=n,a):f},a.revalue=function(n){return f&&(dr(n,function(n){n.children&&(n.value=0)}),yr(n,function(n){var t;n.children||(n.value=+f.call(a,n,n.depth)||0),(t=n.parent)&&(t.value+=n.value)})),n},a},Yi.layout.partition=function(){function t(n,t){var e=r.call(this,n,t);return function n(t,e,r,i){var u=t.children;if(t.x=e,t.y=t.depth*i,t.dx=r,t.dy=i,u&&(o=u.length)){var o,a,l,c=-1;for(r=t.value?r/t.value:0;++c<o;)n(a=u[c],e,l=a.value*r,i),e+=l}}(e[0],0,i[0],i[1]/function n(t){var e=t.children,r=0;if(e&&(i=e.length))for(var i,u=-1;++u<i;)r=Math.max(r,n(e[u]));return 1+r}(e[0])),e}var r=Yi.layout.hierarchy(),i=[1,1];return t.size=function(n){return arguments.length?(i=n,t):i},vr(t,r)},Yi.layout.pie=function(){function s(e){var t,n=e.length,r=e.map(function(n,t){return+h.call(s,n,t)}),i=+("function"==typeof g?g.apply(this,arguments):g),u=("function"==typeof v?v.apply(this,arguments):v)-i,o=Math.min(Math.abs(u)/n,+("function"==typeof d?d.apply(this,arguments):d)),a=o*(u<0?-1:1),l=(u-n*a)/Yi.sum(r),c=Yi.range(n),f=[];return null!=p&&c.sort(p===Qo?function(n,t){return r[t]-r[n]}:function(n,t){return p(e[n],e[t])}),c.forEach(function(n){f[n]={data:e[n],value:t=r[n],startAngle:i,endAngle:i+=t*l+a,padAngle:o}}),f}var h=Number,p=Qo,g=0,v=mu,d=0;return s.value=function(n){return arguments.length?(h=n,s):h},s.sort=function(n){return arguments.length?(p=n,s):p},s.startAngle=function(n){return arguments.length?(g=n,s):g},s.endAngle=function(n){return arguments.length?(v=n,s):v},s.padAngle=function(n){return arguments.length?(d=n,s):d},s};var Qo={};Yi.layout.stack=function(){function s(n,t){if(!(u=n.length))return n;var e=n.map(function(n,t){return h.call(s,n,t)}),r=e.map(function(n){return n.map(function(n,t){return[d.call(s,n,t),y.call(s,n,t)]})}),i=p.call(s,r,t);e=Yi.permute(e,i),r=Yi.permute(r,i);var u,o,a,l,c=g.call(s,r,t),f=e[0].length;for(a=0;a<f;++a)for(v.call(s,e[0][a],l=c[a],r[0][a][1]),o=1;o<u;++o)v.call(s,e[o][a],l+=r[o-1][a][1],r[o][a][1]);return n}var h=R,p=kr,g=Nr,v=Sr,d=_r,y=wr;return s.values=function(n){return arguments.length?(h=n,s):h},s.order=function(n){return arguments.length?(p="function"==typeof n?n:na.get(n)||kr,s):p},s.offset=function(n){return arguments.length?(g="function"==typeof n?n:ta.get(n)||Nr,s):g},s.x=function(n){return arguments.length?(d=n,s):d},s.y=function(n){return arguments.length?(y=n,s):y},s.out=function(n){return arguments.length?(v=n,s):v},s};var na=Yi.map({"inside-out":function(n){var t,e,r=n.length,i=n.map(Er),u=n.map(Ar),o=Yi.range(r).sort(function(n,t){return i[n]-i[t]}),a=0,l=0,c=[],f=[];for(t=0;t<r;++t)e=o[t],a<l?(a+=u[e],c.push(e)):(l+=u[e],f.push(e));return f.reverse().concat(c)},reverse:function(n){return Yi.range(n.length).reverse()},default:kr}),ta=Yi.map({silhouette:function(n){var t,e,r,i=n.length,u=n[0].length,o=[],a=0,l=[];for(e=0;e<u;++e){for(r=t=0;t<i;t++)r+=n[t][e][1];a<r&&(a=r),o.push(r)}for(e=0;e<u;++e)l[e]=(a-o[e])/2;return l},wiggle:function(n){var t,e,r,i,u,o,a,l,c,f=n.length,s=n[0],h=s.length,p=[];for(p[0]=l=c=0,e=1;e<h;++e){for(i=t=0;t<f;++t)i+=n[t][e][1];for(u=t=0,a=s[e][0]-s[e-1][0];t<f;++t){for(r=0,o=(n[t][e][1]-n[t][e-1][1])/(2*a);r<t;++r)o+=(n[r][e][1]-n[r][e-1][1])/a;u+=o*n[t][e][1]}p[e]=l-=i?u/i*a:0,l<c&&(c=l)}for(e=0;e<h;++e)p[e]-=c;return p},expand:function(n){var t,e,r,i=n.length,u=n[0].length,o=1/i,a=[];for(e=0;e<u;++e){for(r=t=0;t<i;t++)r+=n[t][e][1];if(r)for(t=0;t<i;t++)n[t][e][1]/=r;else for(t=0;t<i;t++)n[t][e][1]=o}for(e=0;e<u;++e)a[e]=0;return a},zero:Nr});Yi.layout.histogram=function(){function e(n,t){for(var e,r,i=[],u=n.map(h,this),o=p.call(this,u,t),a=g.call(this,o,u,t),l=(t=-1,u.length),c=a.length-1,f=s?1:1/l;++t<c;)(e=i[t]=[]).dx=a[t+1]-(e.x=a[t]),e.y=0;if(0<c)for(t=-1;++t<l;)(r=u[t])>=o[0]&&r<=o[1]&&((e=i[Yi.bisect(a,r,1,c)-1]).y+=f,e.push(n[t]));return i}var s=!0,h=Number,p=Lr,g=zr;return e.value=function(n){return arguments.length?(h=n,e):h},e.range=function(n){return arguments.length?(p=_n(n),e):p},e.bins=function(t){return arguments.length?(g="number"==typeof t?function(n){return qr(n,t)}:_n(t),e):g},e.frequency=function(n){return arguments.length?(s=!!n,e):s},e},Yi.layout.pack=function(){function t(n,t){var e=c.call(this,n,t),r=e[0],i=s[0],u=s[1],o=null==l?Math.sqrt:"function"==typeof l?l:function(){return l};if(r.x=r.y=0,yr(r,function(n){n.r=+o(n.value)}),yr(r,Ur),f){var a=f*(l?1:Math.max(2*r.r/i,2*r.r/u))/2;yr(r,function(n){n.r+=a}),yr(r,Ur),yr(r,function(n){n.r-=a})}return function n(t,e,r,i){var u=t.children;if(t.x=e+=i*t.x,t.y=r+=i*t.y,t.r*=i,u)for(var o=-1,a=u.length;++o<a;)n(u[o],e,r,i)}(r,i/2,u/2,l?1:1/Math.max(2*r.r/i,2*r.r/u)),e}var l,c=Yi.layout.hierarchy().sort(Tr),f=0,s=[1,1];return t.size=function(n){return arguments.length?(s=n,t):s}
17,t.radius=function(n){return arguments.length?(l=null==n||"function"==typeof n?n:+n,t):l},t.padding=function(n){return arguments.length?(f=+n,t):f},vr(t,c)},Yi.layout.tree=function(){function t(n,t){var e=g.call(this,n,t),r=e[0],i=function(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var i,u=t.children,o=0,a=u.length;o<a;++o)r.push((u[o]=i={_:u[o],parent:t,children:(i=u[o].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=i);return e.children[0]}(r);if(yr(i,s),i.parent.m=-i.z,dr(i,h),d)dr(r,p);else{var u=r,o=r,a=r;dr(r,function(n){n.x<u.x&&(u=n),n.x>o.x&&(o=n),n.depth>a.depth&&(a=n)});var l=M(u,o)/2-u.x,c=v[0]/(o.x+M(o,u)/2+l),f=v[1]/(a.depth||1);dr(r,function(n){n.x=(n.x+l)*c,n.y=n.depth*f})}return e}function s(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){!function(n){for(var t,e=0,r=0,i=n.children,u=i.length;0<=--u;)(t=i[u]).z+=e,t.m+=e,e+=t.s+(r+=t.c)}(n);var i=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+M(n._,r._),n.m=n.z-i):n.z=i}else r&&(n.z=r.z+M(n._,r._));n.parent.A=function(n,t,e){if(t){for(var r,i=n,u=n,o=t,a=i.parent.children[0],l=i.m,c=u.m,f=o.m,s=a.m;o=Yr(o),i=Ir(i),o&&i;)a=Ir(a),(u=Yr(u)).a=n,0<(r=o.z+f-i.z-l+M(o._,i._))&&(y=n,m=e,h=(d=o).a.parent===y.parent?d.a:m,void 0,v=(g=r)/((p=n).i-h.i),p.c-=v,p.s+=g,h.c+=v,p.z+=g,p.m+=g,l+=r,c+=r),f+=o.m,l+=i.m,s+=a.m,c+=u.m;o&&!Yr(u)&&(u.t=o,u.m+=f-c),i&&!Ir(a)&&(a.t=i,a.m+=l-s,e=n)}var h,p,g,v;var d,y,m;return e}(n,r,n.parent.A||e[0])}function h(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function p(n){n.x*=v[0],n.y=n.depth*v[1]}var g=Yi.layout.hierarchy().sort(null).value(null),M=Or,v=[1,1],d=null;return t.separation=function(n){return arguments.length?(M=n,t):M},t.size=function(n){return arguments.length?(d=null==(v=n)?p:null,t):d?null:v},t.nodeSize=function(n){return arguments.length?(d=null==(v=n)?null:p,t):d?v:null},vr(t,g)},Yi.layout.cluster=function(){function t(n,t){var e,r=f.call(this,n,t),i=r[0],u=0;yr(i,function(n){var t=n.children;t&&t.length?(n.x=function(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}(t),n.y=function(n){return 1+Yi.max(n,function(n){return n.y})}(t)):(n.x=e?u+=s(n,e):0,n.y=0,e=n)});var o=function n(t){var e=t.children;return e&&e.length?n(e[0]):t}(i),a=function n(t){var e,r=t.children;return r&&(e=r.length)?n(r[e-1]):t}(i),l=o.x-s(o,a)/2,c=a.x+s(a,o)/2;return yr(i,p?function(n){n.x=(n.x-i.x)*h[0],n.y=(i.y-n.y)*h[1]}:function(n){n.x=(n.x-l)/(c-l)*h[0],n.y=(1-(i.y?n.y/i.y:1))*h[1]}),r}var f=Yi.layout.hierarchy().sort(null).value(null),s=Or,h=[1,1],p=!1;return t.separation=function(n){return arguments.length?(s=n,t):s},t.size=function(n){return arguments.length?(p=null==(h=n),t):p?null:h},t.nodeSize=function(n){return arguments.length?(p=null!=(h=n),t):p?h:null},vr(t,f)},Yi.layout.treemap=function(){function f(n,t){for(var e,r,i=-1,u=n.length;++i<u;)r=(e=n[i]).value*(t<0?0:t),e.area=isNaN(r)||r<=0?0:r}function s(n){var t=n.children;if(t&&t.length){var e,r,i,u=v(n),o=[],a=t.slice(),l=1/0,c="slice"===d?u.dx:"dice"===d?u.dy:"slice-dice"===d?1&n.depth?u.dy:u.dx:Math.min(u.dx,u.dy);for(f(a,u.dx*u.dy/n.value),o.area=0;0<(i=a.length);)o.push(e=a[i-1]),o.area+=e.area,l="squarify"!==d||(r=h(o,c))<=l?(a.pop(),r):(o.area-=o.pop().area,p(o,c,u,!1),c=Math.min(u.dx,u.dy),o.length=o.area=0,1/0);o.length&&(p(o,c,u,!0),o.length=o.area=0),t.forEach(s)}}function o(n){var t=n.children;if(t&&t.length){var e,r=v(n),i=t.slice(),u=[];for(f(i,r.dx*r.dy/n.value),u.area=0;e=i.pop();)u.push(e),u.area+=e.area,null!=e.z&&(p(u,e.z?r.dx:r.dy,r,!i.length),u.length=u.area=0);t.forEach(o)}}function h(n,t){for(var e,r=n.area,i=0,u=1/0,o=-1,a=n.length;++o<a;)(e=n[o].area)&&(e<u&&(u=e),i<e&&(i=e));return t*=t,(r*=r)?Math.max(t*i*y/r,r/(t*u*y)):1/0}function p(n,t,e,r){var i,u=-1,o=n.length,a=e.x,l=e.y,c=t?g(n.area/t):0;if(t==e.dx){for((r||c>e.dy)&&(c=e.dy);++u<o;)(i=n[u]).x=a,i.y=l,i.dy=c,a+=i.dx=Math.min(e.x+e.dx-a,c?g(i.area/c):0);i.z=!0,i.dx+=e.x+e.dx-a,e.y+=c,e.dy-=c}else{for((r||c>e.dx)&&(c=e.dx);++u<o;)(i=n[u]).x=a,i.y=l,i.dx=c,l+=i.dy=Math.min(e.y+e.dy-l,c?g(i.area/c):0);i.z=!1,i.dy+=e.y+e.dy-l,e.x+=c,e.dx-=c}}function r(n){var t=i||u(n),e=t[0];return e.x=0,e.y=0,e.dx=a[0],e.dy=a[1],i&&u.revalue(e),f([e],e.dx*e.dy/e.value),(i?o:s)(e),c&&(i=t),t}var i,u=Yi.layout.hierarchy(),g=Math.round,a=[1,1],l=null,v=Zr,c=!1,d="squarify",y=.5*(1+Math.sqrt(5));return r.size=function(n){return arguments.length?(a=n,r):a},r.padding=function(e){function n(n){return Vr(n,e)}return arguments.length?(v=null==(l=e)?Zr:"function"==(t=typeof e)?function(n){var t=e.call(r,n,n.depth);return null==t?Zr(n):Vr(n,"number"==typeof t?[t,t,t,t]:t)}:("number"==t&&(e=[e,e,e,e]),n),r):l;var t},r.round=function(n){return arguments.length?(g=n?Math.round:Number,r):g!=Number},r.sticky=function(n){return arguments.length?(c=n,i=null,r):c},r.ratio=function(n){return arguments.length?(y=n,r):y},r.mode=function(n){return arguments.length?(d=n+"",r):d},vr(r,u)},Yi.random={normal:function(r,i){var n=arguments.length;return n<2&&(i=1),n<1&&(r=0),function(){for(var n,t,e;!(e=(n=2*Math.random()-1)*n+(t=2*Math.random()-1)*t)||1<e;);
17return r+i*n*Math.sqrt(-2*Math.log(e)/e)}},logNormal:function(){var n=Yi.random.normal.apply(Yi,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=Yi.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(e){return function(){for(var n=0,t=0;t<e;t++)n+=Math.random();return n}}},Yi.scale={};var ea={floor:R,ceil:R};Yi.scale.linear=function(){return function n(e,r,i,u){function t(){var n=2<Math.min(e.length,r.length)?Jr:Br,t=u?lr:ar;return a=n(e,r,t,i),l=n(r,e,t,Ve),o}function o(n){return a(n)}var a,l;return o.invert=function(n){return l(n)},o.domain=function(n){return arguments.length?(e=n.map(Number),t()):e},o.range=function(n){return arguments.length?(r=n,t()):r},o.rangeRound=function(n){return o.range(n).interpolate(er)},o.clamp=function(n){return arguments.length?(u=n,t()):u},o.interpolate=function(n){return arguments.length?(i=n,t()):i},o.ticks=function(n){return ni(e,n)},o.tickFormat=function(n,t){return ti(e,n,t)},o.nice=function(n){return Kr(e,n),t()},o.copy=function(){return n(e,r,i,u)},t()}([0,1],[0,1],Ve,!1)};var ra={s:1,g:1,p:1,r:1,e:1};Yi.scale.log=function(){return function n(t,l,c,f){function s(n){return(c?Math.log(n<0?0:n):-Math.log(0<n?0:-n))/Math.log(l)}function h(n){return c?Math.pow(l,n):-Math.pow(l,-n)}function u(n){return t(s(n))}return u.invert=function(n){return h(t.invert(n))},u.domain=function(n){return arguments.length?(c=0<=n[0],t.domain((f=n.map(Number)).map(s)),u):f},u.base=function(n){return arguments.length?(l=+n,t.domain(f.map(s)),u):l},u.nice=function(){var n=Wr(f.map(s),c?Math:ua);return t.domain(n),f=n.map(h),u},u.ticks=function(){var n=Xr(f),t=[],e=n[0],r=n[1],i=Math.floor(s(e)),u=Math.ceil(s(r)),o=l%1?2:l;if(isFinite(u-i)){if(c){for(;i<u;i++)for(var a=1;a<o;a++)t.push(h(i)*a);t.push(h(i))}else for(t.push(h(i));i++<u;)for(a=o-1;0<a;a--)t.push(h(i)*a);for(i=0;t[i]<e;i++);for(u=t.length;t[u-1]>r;u--);t=t.slice(i,u)}return t},u.tickFormat=function(n,t){if(!arguments.length)return ia;arguments.length<2?t=ia:"function"!=typeof t&&(t=Yi.format(t));var e,r=Math.max(.1,n/u.ticks().length),i=c?(e=1e-12,Math.ceil):(e=-1e-12,Math.floor);return function(n){return n/h(i(s(n)+e))<=r?t(n):""}},u.copy=function(){return n(t.copy(),l,c,f)},Gr(u,t)}(Yi.scale.linear().domain([0,1]),10,!0,[1,10])};var ia=Yi.format(".0e"),ua={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};Yi.scale.pow=function(){return function n(t,e,r){function i(n){return t(u(n))}var u=ri(e),o=ri(1/e);return i.invert=function(n){return o(t.invert(n))},i.domain=function(n){return arguments.length?(t.domain((r=n.map(Number)).map(u)),i):r},i.ticks=function(n){return ni(r,n)},i.tickFormat=function(n,t){return ti(r,n,t)},i.nice=function(n){return i.domain(Kr(r,n))},i.exponent=function(n){return arguments.length?(u=ri(e=n),o=ri(1/e),t.domain(r.map(u)),i):e},i.copy=function(){return n(t.copy(),e,r)},Gr(i,t)}(Yi.scale.linear(),1,[0,1])},Yi.scale.sqrt=function(){return Yi.scale.pow().exponent(.5)},Yi.scale.ordinal=function(){return function n(a,l){function c(n){return s[((i.get(n)||("range"===l.t?i.set(n,a.push(n)):NaN))-1)%s.length]}function f(t,e){return Yi.range(a.length).map(function(n){return t+e*n})}var i,s,h;return c.domain=function(n){if(!arguments.length)return a;a=[],i=new m;for(var t,e=-1,r=n.length;++e<r;)i.has(t=n[e])||i.set(t,a.push(t));return c[l.t].apply(c,l.a)},c.range=function(n){return arguments.length?(s=n,h=0,l={t:"range",a:arguments},c):s},c.rangePoints=function(n,t){arguments.length<2&&(t=0);var e=n[0],r=n[1],i=a.length<2?(e=(e+r)/2,0):(r-e)/(a.length-1+t);return s=f(e+i*t/2,i),h=0,l={t:"rangePoints",a:arguments},c},c.rangeRoundPoints=function(n,t){arguments.length<2&&(t=0);var e=n[0],r=n[1],i=a.length<2?(e=r=Math.round((e+r)/2),0):(r-e)/(a.length-1+t)|0;return s=f(e+Math.round(i*t/2+(r-e-(a.length-1+t)*i)/2),i),h=0,l={t:"rangeRoundPoints",a:arguments},c},c.rangeBands=function(n,t,e){arguments.length<2&&(t=0),arguments.length<3&&(e=t);var r=n[1]<n[0],i=n[r-0],u=(n[1-r]-i)/(a.length-t+2*e);return s=f(i+u*e,u),r&&s.reverse(),h=u*(1-t),l={t:"rangeBands",a:arguments},c},c.rangeRoundBands=function(n,t,e){arguments.length<2&&(t=0),arguments.length<3&&(e=t);var r=n[1]<n[0],i=n[r-0],u=n[1-r],o=Math.floor((u-i)/(a.length-t+2*e));return s=f(i+Math.round((u-i-(a.length-t)*o)/2),o),r&&s.reverse(),h=Math.round(o*(1-t)),l={t:"rangeRoundBands",a:arguments},c},c.rangeBand=function(){return h},c.rangeExtent=function(){return Xr(l.a[0])},c.copy=function(){return n(a,l)},c.domain(a)}([],{t:"range",a:[[]]})},Yi.scale.category10=function(){return Yi.scale.ordinal().range(oa)},Yi.scale.category20=function(){return Yi.scale.ordinal().range(aa)},Yi.scale.category20b=function(){return Yi.scale.ordinal().range(la)},Yi.scale.category20c=function(){return Yi.scale.ordinal().range(ca)};var oa=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(vn),aa=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9
17197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(vn),la=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(vn),ca=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(vn);Yi.scale.quantile=function(){return function n(e,r){function t(){var n=0,t=r.length;for(u=[];++n<t;)u[n-1]=Yi.quantile(e,n/t);return i}function i(n){return isNaN(n=+n)?void 0:r[Yi.bisect(u,n)]}var u;return i.domain=function(n){return arguments.length?(e=n.map(c).filter(f).sort(o),t()):e},i.range=function(n){return arguments.length?(r=n,t()):r},i.quantiles=function(){return u},i.invertExtent=function(n){return(n=r.indexOf(n))<0?[NaN,NaN]:[0<n?u[n-1]:e[0],n<u.length?u[n]:e[e.length-1]]},i.copy=function(){return n(e,r)},t()}([],[])},Yi.scale.quantize=function(){return function n(t,e,r){function i(n){return r[Math.max(0,Math.min(a,Math.floor(o*(n-t))))]}function u(){return o=r.length/(e-t),a=r.length-1,i}var o,a;return i.domain=function(n){return arguments.length?(t=+n[0],e=+n[n.length-1],u()):[t,e]},i.range=function(n){return arguments.length?(r=n,u()):r},i.invertExtent=function(n){return[n=(n=r.indexOf(n))<0?NaN:n/o+t,n+1/o]},i.copy=function(){return n(t,e,r)},u()}(0,1,[0,1])},Yi.scale.threshold=function(){return function n(t,e){function r(n){return n<=n?e[Yi.bisect(t,n)]:void 0}return r.domain=function(n){return arguments.length?(t=n,r):t},r.range=function(n){return arguments.length?(e=n,r):e},r.invertExtent=function(n){return n=e.indexOf(n),[t[n-1],t[n]]},r.copy=function(){return n(t,e)},r}([.5],[0,1])},Yi.scale.identity=function(){return function n(e){function t(n){return+n}return(t.invert=t).domain=t.range=function(n){return arguments.length?(e=n.map(t),t):e},t.ticks=function(n){return ni(e,n)},t.tickFormat=function(n,t){return ti(e,n,t)},t.copy=function(){return n(e)},t}([0,1])},Yi.svg={},Yi.svg.arc=function(){function t(){var n=Math.max(0,+F.apply(this,arguments)),t=Math.max(0,+H.apply(this,arguments)),e=Y.apply(this,arguments)-xu,r=Z.apply(this,arguments)-xu,i=Math.abs(r-e),u=r<e?0:1;if(t<n&&(o=t,t=n,n=o),Mu<=i)return j(t,u)+(n?j(n,1-u):"")+"Z";var o,a,l,c,f,s,h,p,g,v,d,y,m=0,M=0,x=[];if((c=(+V.apply(this,arguments)||0)/2)&&(l=I===fa?Math.sqrt(n*n+t*t):+I.apply(this,arguments),u||(M*=-1),t&&(M=K(l/t*Math.sin(c))),n&&(m=K(l/n*Math.sin(c)))),t){f=t*Math.cos(e+M),s=t*Math.sin(e+M),h=t*Math.cos(r-M),p=t*Math.sin(r-M);var b=Math.abs(r-e-2*M)<=yu?0:1;if(M&&fi(f,s,h,p)===u^b){var _=(e+r)/2;f=t*Math.cos(_),s=t*Math.sin(_),h=p=null}}else f=s=0;if(n){g=n*Math.cos(r-m),v=n*Math.sin(r-m),d=n*Math.cos(e+m),y=n*Math.sin(e+m);var w=Math.abs(e-r+2*m)<=yu?0:1;if(m&&fi(g,v,d,y)===1-u^w){var S=(e+r)/2;g=n*Math.cos(S),v=n*Math.sin(S),d=y=null}}else g=v=0;if(.001<(o=Math.min(Math.abs(t-n)/2,+O.apply(this,arguments)))){a=n<t^u?0:1;var k=null==d?[g,v]:null==h?[f,s]:pe([f,s],[d,y],[h,p],[g,v]),N=f-k[0],E=s-k[1],A=h-k[0],C=p-k[1],z=1/Math.sin(Math.acos((N*A+E*C)/(Math.sqrt(N*N+E*E)*Math.sqrt(A*A+C*C)))/2),q=Math.sqrt(k[0]*k[0]+k[1]*k[1]);if(null!=h){var L=Math.min(o,(t-q)/(1+z)),T=si(null==d?[g,v]:[d,y],[f,s],t,L,u),R=si([h,p],[g,v],t,L,u);o===L?x.push("M",T[0],"A",L,",",L," 0 0,",a," ",T[1],"A",t,",",t," 0 ",1-u^fi(T[1][0],T[1][1],R[1][0],R[1][1]),",",u," ",R[1],"A",L,",",L," 0 0,",a," ",R[0]):x.push("M",T[0],"A",L,",",L," 0 1,",a," ",R[0])}else x.push("M",f,",",s);if(null!=d){var D=Math.min(o,(n-q)/(z-1)),P=si([f,s],[d,y],n,-D,u),U=si([g,v],null==h?[f,s]:[h,p],n,-D,u);o===D?x.push("L",U[0],"A",D,",",D," 0 0,",a," ",U[1],"A",n,",",n," 0 ",u^fi(U[1][0],U[1][1],P[1][0],P[1][1]),",",1-u," ",P[1],"A",D,",",D," 0 0,",a," ",P[0]):x.push("L",U[0],"A",D,",",D," 0 0,",a," ",P[0])}else x.push("L",g,",",v)}else x.push("M",f,",",s),null!=h&&x.push("A",t,",",t," 0 ",b,",",u," ",h,",",p),x.push("L",g,",",v),null!=d&&x.push("A",n,",",n," 0 ",w,",",1-u," ",d,",",y);return x.push("Z"),x.join("")}function j(n,t){return"M0,"+n+"A"+n+","+n+" 0 1,"+t+" 0,"+-n+"A"+n+","+n+" 0 1,"+t+" 0,"+n}var F=ui,H=oi,O=ii,I=fa,Y=ai,Z=li,V=ci;return t.innerRadius=function(n){return arguments.length?(F=_n(n),t):F},t.outerRadius=function(n){return arguments.length?(H=_n(n),t):H},t.cornerRadius=function(n){return arguments.length?(O=_n(n),t):O}
vendor: 12,445 bytes, line 17
17,t.padRadius=function(n){return arguments.length?(I=n==fa?fa:_n(n),t):I},t.startAngle=function(n){return arguments.length?(Y=_n(n),t):Y},t.endAngle=function(n){return arguments.length?(Z=_n(n),t):Z},t.padAngle=function(n){return arguments.length?(V=_n(n),t):V},t.centroid=function(){var n=(+F.apply(this,arguments)+ +H.apply(this,arguments))/2,t=(+Y.apply(this,arguments)+ +Z.apply(this,arguments))/2-xu;return[Math.cos(t)*n,Math.sin(t)*n]},t};var fa="auto";Yi.svg.line=function(){return hi(R)};var sa=Yi.map({linear:pi,"linear-closed":function(n){return pi(n)+"Z"},step:function(n){for(var t=0,e=n.length,r=n[0],i=[r[0],",",r[1]];++t<e;)i.push("H",(r[0]+(r=n[t])[0])/2,"V",r[1]);return 1<e&&i.push("H",r[0]),i.join("")},"step-before":gi,"step-after":vi,basis:mi,"basis-open":function(n){if(n.length<4)return pi(n);for(var t,e=[],r=-1,i=n.length,u=[0],o=[0];++r<3;)t=n[r],u.push(t[0]),o.push(t[1]);for(e.push(Mi(ga,u)+","+Mi(ga,o)),--r;++r<i;)t=n[r],u.shift(),u.push(t[0]),o.shift(),o.push(t[1]),xi(e,u,o);return e.join("")},"basis-closed":function(n){for(var t,e,r=-1,i=n.length,u=i+4,o=[],a=[];++r<4;)e=n[r%i],o.push(e[0]),a.push(e[1]);for(t=[Mi(ga,o),",",Mi(ga,a)],--r;++r<u;)e=n[r%i],o.shift(),o.push(e[0]),a.shift(),a.push(e[1]),xi(t,o,a);return t.join("")},bundle:function(n,t){var e=n.length-1;if(e)for(var r,i,u=n[0][0],o=n[0][1],a=n[e][0]-u,l=n[e][1]-o,c=-1;++c<=e;)i=c/e,(r=n[c])[0]=t*r[0]+(1-t)*(u+i*a),r[1]=t*r[1]+(1-t)*(o+i*l);return mi(n)},cardinal:function(n,t){return n.length<3?pi(n):n[0]+di(n,yi(n,t))},"cardinal-open":function(n,t){return n.length<4?pi(n):n[1]+di(n.slice(1,-1),yi(n,t))},"cardinal-closed":function(n,t){return n.length<3?pi(n):n[0]+di((n.push(n[0]),n),yi([n[n.length-2]].concat(n,[n[1]]),t))},monotone:function(n){return n.length<3?pi(n):n[0]+di(n,_i(n))}});sa.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var ha=[0,2/3,1/3,0],pa=[0,1/3,2/3,0],ga=[0,1/6,2/3,1/6];Yi.svg.line.radial=function(){var n=hi(wi);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},(gi.reverse=vi).reverse=gi,Yi.svg.area=function(){return Si(R)},Yi.svg.area.radial=function(){var n=Si(wi);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},Yi.svg.chord=function(){function t(n,t){var e=i(this,a,n,t),r=i(this,l,n,t);return"M"+e.p0+u(e.r,e.p1,e.a1-e.a0)+(function(n,t){return n.a0==t.a0&&n.a1==t.a1}(e,r)?o(e.r,e.p1,e.r,e.p0):o(e.r,e.p1,r.r,r.p0)+u(r.r,r.p1,r.a1-r.a0)+o(r.r,r.p1,e.r,e.p0))+"Z"}function i(n,t,e,r){var i=t.call(n,e,r),u=c.call(n,i,r),o=f.call(n,i,r)-xu,a=s.call(n,i,r)-xu;return{r:u,a0:o,a1:a,p0:[u*Math.cos(o),u*Math.sin(o)],p1:[u*Math.cos(a),u*Math.sin(a)]}}function u(n,t,e){return"A"+n+","+n+" 0 "+ +(yu<e)+",1 "+t}function o(n,t,e,r){return"Q 0,0 "+r}var a=ne,l=te,c=ki,f=ai,s=li;return t.radius=function(n){return arguments.length?(c=_n(n),t):c},t.source=function(n){return arguments.length?(a=_n(n),t):a},t.target=function(n){return arguments.length?(l=_n(n),t):l},t.startAngle=function(n){return arguments.length?(f=_n(n),t):f},t.endAngle=function(n){return arguments.length?(s=_n(n),t):s},t},Yi.svg.diagonal=function(){function t(n,t){var e=o.call(this,n,t),r=a.call(this,n,t),i=(e.y+r.y)/2,u=[e,{x:e.x,y:i},{x:r.x,y:i},r];return"M"+(u=u.map(l))[0]+"C"+u[1]+" "+u[2]+" "+u[3]}var o=ne,a=te,l=Ni;return t.source=function(n){return arguments.length?(o=_n(n),t):o},t.target=function(n){return arguments.length?(a=_n(n),t):a},t.projection=function(n){return arguments.length?(l=n,t):l},t},Yi.svg.diagonal.radial=function(){var n=Yi.svg.diagonal(),t=Ni,e=n.projection;return n.projection=function(n){return arguments.length?e(function(r){return function(){var n=r.apply(this,arguments),t=n[0],e=n[1]-xu;return[t*Math.cos(e),t*Math.sin(e)]}}(t=n)):t},n},Yi.svg.symbol=function(){function t(n,t){return(va.get(e.call(this,n,t))||Ci)(r.call(this,n,t))}var e=Ai,r=Ei;return t.type=function(n){return arguments.length?(e=_n(n),t):e},t.size=function(n){return arguments.length?(r=_n(n),t):r},t};var va=Yi.map({circle:Ci,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*ya)),e=t*ya;return"M0,"+-t+"L"+e+",0 0,"+t+" "+-e+",0Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/da),e=t*da/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/da),e=t*da/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});Yi.svg.symbolTypes=va.keys();var da=Math.sqrt(3),ya=Math.tan(30*bu);lu.transition=function(n){for(var t,e,r=ma||++_a,i=Ri(n),u=[],o=Ma||{time:Date.now(),ease:Ge,delay:0,duration:250},a=-1,l=this.length;++a<l;){u.push(t=[]);for(var c=this[a],f=-1,s=c.length;++f<s;)(e=c[f])&&Di(e,f,i,r,o),t.push(e)}return qi(u,i,r)},lu.interrupt=function(n){return this.each(null==n?xa:zi(Ri(n)))};var ma,Ma,xa=zi(Ri()),ba=[],_a=0;ba.call=lu.call,ba.empty=lu.empty,ba.node=lu.node,ba.size=lu.size,Yi.transition=function(n,t){return n&&n.transition?ma?n.transition(t):n:Yi.selection().transition(n)},(Yi.transition.prototype=ba).select=function(n){var t,e,r,i=this.id,u=this.namespace,o=[];n=w(n);for(var a=-1,l=this.length;++a<l;){o.push(t=[]);for(var c=this[a],f=-1,s=c.length;++f<s;)(r=c[f])&&(e=n.call(r,r.__data__,f,a))?("__data__"in r&&(e.__data__=r.__data__),Di(e,f,u,i,r[u][i]),t.push(e)):t.push(null)}return qi(o,u,i)},ba.selectAll=function(n){var t,e,r,i,u,o=this.id,a=this.namespace,l=[];n=S(n);for(var c=-1,f=this.length;++c<f;)for(var s=this[c],h=-1,p=s.length;++h<p;)if(r=s[h]){u=r[a][o],e=n.call(r,r.__data__,h,c),l.push(t=[]);for(var g=-1,v=e.length;++g<v;)(i=e[g])&&Di(i,g,a,o,u),t.push(i)}return qi(l,a,o)},ba.filter=function(n){var t,e,r=[];"function"!=typeof n&&(n=H(n));for(var i=0,u=this.length;i<u;i++){r.push(t=[]);for(var o,a=0,l=(o=this[i]).length;a<l;a++)(e=o[a])&&n.call(e,e.__data__,a,i)&&t.push(e)}return qi(r,this.namespace,this.id)},ba.tween=function(t,e){var r=this.id,i=this.namespace;return arguments.length<2?this.node()[i][r].tween.get(t):O(this,null==e?function(n){n[i][r].tween.remove(t)}:function(n){n[i][r].tween.set(t,e)})},ba.attr=function(n,t){function r(){this.removeAttribute(o)}function i(){this.removeAttributeNS(o.space,o.local)}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var u="transform"==n?or:Ve,o=Yi.ns.qualify(n);return Li(this,"attr."+n,t,o.local?function(e){return null==e?i:(e+="",function(){var t,n=this.getAttributeNS(o.space,o.local);return n!==e&&(t=u(n,e),function(n){this.setAttributeNS(o.space,o.local,t(n))})})}:function(e){return null==e?r:(e+="",function(){var t,n=this.getAttribute(o);return n!==e&&(t=u(n,e),function(n){this.setAttribute(o,t(n))})})})},ba.attrTween=function(n,r){var i=Yi.ns.qualify(n);return this.tween("attr."+n,i.local?function(n,t){var e=r.call(this,n,t,this.getAttributeNS(i.space,i.local));return e&&function(n){this.setAttributeNS(i.space,i.local,e(n))}}:function(n,t){var e=r.call(this,n,t,this.getAttribute(i));return e&&function(n){this.setAttribute(i,e(n))}})},ba.style=function(r,n,i){function t(){this.style.removeProperty(r)}var e=arguments.length;if(e<3){if("string"!=typeof r){for(i in e<2&&(n=""),r)this.style(i,r[i],n);return this}i=""}return Li(this,"style."+r,n,function(e){return null==e?t:(e+="",function(){var t,n=T(this).getComputedStyle(this,null).getPropertyValue(r);return n!==e&&(t=Ve(n,e),function(n){this.style.setProperty(r,t(n),i)})})})},ba.styleTween=function(r,i,u){return arguments.length<3&&(u=""),this.tween("style."+r,function(n,t){var e=i.call(this,n,t,T(this).getComputedStyle(this,null).getPropertyValue(r));return e&&function(n){this.style.setProperty(r,e(n),u)}})},ba.text=function(n){return Li(this,"text",n,Ti)},ba.remove=function(){var t=this.namespace;return this.each("end.transition",function(){var n;this[t].count<2&&(n=this.parentNode)&&n.removeChild(this)})},ba.ease=function(t){var e=this.id,r=this.namespace;return arguments.length<1?this.node()[r][e].ease:("function"!=typeof t&&(t=Yi.ease.apply(Yi,arguments)),O(this,function(n){n[r][e].ease=t}))},ba.delay=function(r){var i=this.id,u=this.namespace;return arguments.length<1?this.node()[u][i].delay:O(this,"function"==typeof r?function(n,t,e){n[u][i].delay=+r.call(n,n.__data__,t,e)}:(r=+r,function(n){n[u][i].delay=r}))},ba.duration=function(r){var i=this.id,u=this.namespace;return arguments.length<1?this.node()[u][i].duration:O(this,"function"==typeof r?function(n,t,e){n[u][i].duration=Math.max(1,r.call(n,n.__data__,t,e))}:(r=Math.max(1,r),function(n){n[u][i].duration=r}))},ba.each=function(r,e){var i=this.id,u=this.namespace;if(arguments.length<2){var n=Ma,t=ma;try{ma=i,O(this,function(n,t,e){Ma=n[u][i],r.call(n,n.__data__,t,e)})}finally{Ma=n,ma=t}}else O(this,function(n){var t=n[u][i];(t.event||(t.event=Yi.dispatch("start","end","interrupt"))).on(r,e)});return this},ba.transition=function(){for(var n,t,e,r=this.id,i=++_a,u=this.namespace,o=[],a=0,l=this.length;a<l;a++){o.push(n=[]);for(var c,f=0,s=(c=this[a]).length;f<s;f++)(t=c[f])&&Di(t,f,u,i,{time:(e=t[u][r]).time,ease:e.ease,delay:e.delay+e.duration,duration:e.duration}),n.push(t)}return qi(o,u,i)},Yi.svg.axis=function(){function e(n){n.each(function(){var n,t=Yi.select(this),e=this.__chart__||E,r=this.__chart__=E.copy(),i=null==T?r.ticks?r.ticks.apply(r,L):r.domain():T,u=null==N?r.tickFormat?r.tickFormat.apply(r,L):R:N,o=t.selectAll(".tick").data(i,r),a=o.enter().insert("g",".domain").attr("class","tick").style("opacity",vu),l=Yi.transition(o.exit()).style("opacity",vu).remove(),c=Yi.transition(o.order()).style("opacity",1),f=Math.max(C,0)+q,s=$r(r),h=t.selectAll(".domain").data([0]),p=(h.enter().append("path").attr("class","domain"),Yi.transition(h));a.append("line"),a.append("text");var g,v,d,y,m=a.select("line"),M=c.select("line"),x=o.select("text").text(u),b=a.select("text"),_=c.select("text"),w="top"===A||"left"===A?-1:1;if("bottom"===A||"top"===A?(n=Pi,g="x",d="y",v="x2",y="y2",x.attr("dy",w<0?"0em":".71em").style("text-anchor","middle"),p.attr("d","M"+s[0]+","+w*z+"V0H"+s[1]+"V"+w*z)):(n=Ui,g="y",d="x",v="y2",y="x2",x.attr("dy",".32em").style("text-anchor",w<0?"end":"start"),p.attr("d","M"+w*z+","+s[0]+"H0V"+s[1]+"H"+w*z)),m.attr(y,w*C),b.attr(d,w*f),M.attr(v,0).attr(y,w*C),_.attr(g,0).attr(d,w*f),r.rangeBand){var S=r,k=S.rangeBand()/2;e=r=function(n){return S(n)+k}}else e.rangeBand?e=r:l.call(n,r,e);a.call(n,e,r),c.call(n,r,r)})}var N,E=Yi.scale.linear(),A=wa,C=6,z=6,q=3,L=[10],T=null;return e.scale=function(n){return arguments.length?(E=n,e):E},e.orient=function(n){return arguments.length?(A=n in Sa?n+"":wa,e):A},e.ticks=function(){return arguments.length?(L=arguments,e):L},e.tickValues=function(n){return arguments.length?(T=n,e):T},e.tickFormat=function(n){return arguments.length?(N=n,e):N},e.tickSize=function(n){var t=arguments.length;return t?(C=+n,z=+arguments[t-1],e):C},e.innerTickSize=function(n){return arguments.length?(C=+n,e):C},e.outerTickSize=function(n){return arguments.length?(z=+n,e):z},e.tickPadding=function(n){return arguments.length?(q=+n,e):q},e.tickSubdivide=function(){return arguments.length&&e},e};var wa="bottom",Sa={top:1,right:1,bottom:1,left:1};Yi.svg.brush=function(){function m(n){n.each(function(){var n=Yi.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",o).on("touchstart.brush",o),t=n.selectAll(".background").data([0]);t.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),n.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var e=n.selectAll(".resize").data(a,R);e.exit().remove(),e.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return ka[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),e.style("display",m.empty()?"none":null);var r,i=Yi.transition(n),u=Yi.transition(t);k&&(r=$r(k),u.attr("x",r[0]).attr("width",r[1]-r[0]),x(i)),N&&(r=$r(N),u.attr("y",r[0]).attr("height",r[1]-r[0]),b(i)),M(i)})}function M(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+E[+
vendor: 5,603 bytes, line 17
17/e$/.test(n)]+","+A[+/^s/.test(n)]+")"})}function x(n){n.select(".extent").attr("x",E[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",E[1]-E[0])}function b(n){n.select(".extent").attr("y",A[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",A[1]-A[0])}function o(){function n(){var n=Yi.mouse(i),t=!1;r&&(n[0]+=r[0],n[1]+=r[1]),h||(Yi.event.altKey?(s||(s=[(E[0]+E[1])/2,(A[0]+A[1])/2]),g[0]=E[+(n[0]<s[0])],g[1]=A[+(n[1]<s[1])]):s=null),c&&e(n,k,0)&&(x(a),t=!0),f&&e(n,N,1)&&(b(a),t=!0),t&&(M(a),o({type:"brush",mode:h?"move":"resize"}))}function e(n,t,e){var r,i,u=$r(t),o=u[0],a=u[1],l=g[e],c=e?A:E,f=c[1]-c[0];return h&&(o-=l,a-=f+l),r=(e?z:C)?Math.max(o,Math.min(a,n[e])):n[e],h?i=(r+=l)+f:(s&&(l=Math.max(o,Math.min(a,2*s[e]-r))),l<r?(i=r,r=l):i=l),c[0]!=r||c[1]!=i?(e?w=null:_=null,c[0]=r,c[1]=i,!0):void 0}function t(){n(),a.style("pointer-events","all").selectAll(".resize").style("display",m.empty()?"none":null),Yi.select("body").style("cursor",null),v.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),p(),o({type:"brushend"})}var s,r,i=this,u=Yi.select(Yi.event.target),o=S.of(i,arguments),a=Yi.select(i),l=u.datum(),c=!/^(n|s)$/.test(l)&&k,f=!/^(e|w)$/.test(l)&&N,h=u.classed("extent"),p=X(i),g=Yi.mouse(i),v=Yi.select(T(i)).on("keydown.brush",function(){32==Yi.event.keyCode&&(h||(s=null,g[0]-=E[1],g[1]-=A[1],h=2),D())}).on("keyup.brush",function(){32==Yi.event.keyCode&&2==h&&(g[0]+=E[1],g[1]+=A[1],h=0,D())});if(Yi.event.changedTouches?v.on("touchmove.brush",n).on("touchend.brush",t):v.on("mousemove.brush",n).on("mouseup.brush",t),a.interrupt().selectAll("*").interrupt(),h)g[0]=E[0]-g[0],g[1]=A[0]-g[1];else if(l){var d=+/w$/.test(l),y=+/^n/.test(l);r=[E[1-d]-g[0],A[1-y]-g[1]],g[0]=E[d],g[1]=A[y]}else Yi.event.altKey&&(s=g.slice());a.style("pointer-events","none").selectAll(".resize").style("display",null),Yi.select("body").style("cursor",u.style("cursor")),o({type:"brushstart"}),n()}var _,w,S=P(m,"brushstart","brush","brushend"),k=null,N=null,E=[0,0],A=[0,0],C=!0,z=!0,a=Na[0];return m.event=function(n){n.each(function(){var r=S.of(this,arguments),i={x:E,y:A,i:_,j:w},n=this.__chart__||i;this.__chart__=i,ma?Yi.select(this).transition().each("start.brush",function(){_=n.i,w=n.j,E=n.x,A=n.y,r({type:"brushstart"})}).tween("brush:brush",function(){var t=Xe(E,i.x),e=Xe(A,i.y);return _=w=null,function(n){E=i.x=t(n),A=i.y=e(n),r({type:"brush",mode:"resize"})}}).each("end.brush",function(){_=i.i,w=i.j,r({type:"brush",mode:"resize"}),r({type:"brushend"})}):(r({type:"brushstart"}),r({type:"brush",mode:"resize"}),r({type:"brushend"}))})},m.x=function(n){return arguments.length?(a=Na[!(k=n)<<1|!N],m):k},m.y=function(n){return arguments.length?(a=Na[!k<<1|!(N=n)],m):N},m.clamp=function(n){return arguments.length?(k&&N?(C=!!n[0],z=!!n[1]):k?C=!!n:N&&(z=!!n),m):k&&N?[C,z]:k?C:N?z:null},m.extent=function(n){var t,e,r,i,u;return arguments.length?(k&&(t=n[0],e=n[1],N&&(t=t[0],e=e[0]),_=[t,e],k.invert&&(t=k(t),e=k(e)),e<t&&(u=t,t=e,e=u),(t!=E[0]||e!=E[1])&&(E=[t,e])),N&&(r=n[0],i=n[1],k&&(r=r[1],i=i[1]),w=[r,i],N.invert&&(r=N(r),i=N(i)),i<r&&(u=r,r=i,i=u),(r!=A[0]||i!=A[1])&&(A=[r,i])),m):(k&&(_?(t=_[0],e=_[1]):(t=E[0],e=E[1],k.invert&&(t=k.invert(t),e=k.invert(e)),e<t&&(u=t,t=e,e=u))),N&&(w?(r=w[0],i=w[1]):(r=A[0],i=A[1],N.invert&&(r=N.invert(r),i=N.invert(i)),i<r&&(u=r,r=i,i=u))),k&&N?[[t,r],[e,i]]:k?[t,e]:N&&[r,i])},m.clear=function(){return m.empty()||(E=[0,0],A=[0,0],_=w=null),m},m.empty=function(){return!!k&&E[0]==E[1]||!!N&&A[0]==A[1]},Yi.rebind(m,S,"on")};var ka={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Na=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Ea=Vu.format=Gu.timeFormat,Aa=Ea.utc,Ca=Aa("%Y-%m-%dT%H:%M:%S.%LZ");Ea.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?ji:Ca,ji.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},ji.toString=Ca.toString,Vu.second=qn(function(n){return new Xu(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),Vu.seconds=Vu.second.range,Vu.seconds.utc=Vu.second.utc.range,Vu.minute=qn(function(n){return new Xu(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),Vu.minutes=Vu.minute.range,Vu.minutes.utc=Vu.minute.utc.range,Vu.hour=qn(function(n){var t=n.getTimezoneOffset()/60;return new Xu(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),Vu.hours=Vu.hour.range,Vu.hours.utc=Vu.hour.utc.range,Vu.month=qn(function(n){return(n=Vu.day(n)).setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),Vu.months=Vu.month.range,Vu.months.utc=Vu.month.utc.range;var za=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],qa=[[Vu.second,1],[Vu.second,5],[Vu.second,15],[Vu.second,30],[Vu.minute,1],[Vu.minute,5],[Vu.minute,15],[Vu.minute,30],[Vu.hour,1],[Vu.hour,3],[Vu.hour,6],[Vu.hour,12],[Vu.day,1],[Vu.day,2],[Vu.week,1],[Vu.month,1],[Vu.month,3],[Vu.year,1]],La=Ea.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}
17],["%Y",mt]]),Ta={range:function(n,t,e){return Yi.range(Math.ceil(n/e)*e,+t,e).map(Hi)},floor:R,ceil:R};qa.year=Vu.year,Vu.scale=function(){return Fi(Yi.scale.linear(),qa,La)};var Ra=qa.map(function(n){return[n[0].utc,n[1]]}),Da=Aa.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",mt]]);Ra.year=Vu.year.utc,Vu.scale.utc=function(){return Fi(Yi.scale.linear(),Ra,Da)},Yi.text=wn(function(n){return n.responseText}),Yi.json=function(n,t){return Sn(n,"application/json",Oi,t)},Yi.html=function(n,t){return Sn(n,"text/html",Ii,t)},Yi.xml=wn(function(n){return n.responseXML}),"function"==typeof define&&define.amd?define(Yi):"object"==typeof module&&module.exports&&(module.exports=Yi),this.d3=Yi}(); 18!function(d){"use strict";function e(t){this.owner=t}function i(t){var e=this.internal=new a(this);e.loadConfig(t),e.init(),function e(i,a,n){Object.keys(i).forEac
18h(function(t){a[t]=i[t].bind(n),0<Object.keys(i[t]).length&&e(i[t],a[t],n)})}(n,this,this)}function a(t){var e=this;e.d3=d.d3?d.d3:"undefined"!=typeof require?require("d3"):void 0,e.api=t,e.config=e.getDefaultConfig(),e.data={},e.cache={},e.axes={}}function o(t){e.call(this,t)}function u(k,E){function Y(t,e){t.attr("transform",function(t){return"translate("+Math.ceil(e(t)+U)+", 0)"})}function R(t,e){t.attr("transform",function(t){return"translate(0,"+Math.ceil(e(t))+")"})}function O(t){var e=i?i(t):t;return void 0!==e?e:""}function M(t){return E.withoutTransition?t:k.transition(t)}function B(t){t.each(function(){function t(t,e){var i=T.h;return 0===e&&(i="left"===G||"right"===G?-((b[t.index]-1)*(T.h/2)-3):".71em"),i}var e,i,a,n=B.g=k.select(this),r=this.__chart__||W,c=this.__chart__=function(){var t,e=W.copy();return E.isCategory&&(t=W.domain(),e.domain([t[0],t[1]-1])),e}(),d=j||function(t){var e,i,a=[];if(t.ticks)return t.ticks.apply(t,z);for(i=t.domain(),e=Math.ceil(i[0]);e<i[1];e++)a.push(e);return 0<a.length&&0<a[0]&&a.unshift(a[0]-(a[1]-a[0])),a}(c),s=n.selectAll(".tick").data(d,c),o=s.enter().insert("g",".domain").attr("class","tick").style("opacity",1e-6),l=s.exit().remove(),u=M(s).style("opacity",1),g=W.rangeExtent?W.rangeExtent():function(t){var e=t[0],i=t[t.length-1];return e<i?[e,i]:[i,e]}(W.range()),h=n.selectAll(".domain").data([0]),f=(h.enter().append("path").attr("class","domain"),M(h));o.append("line"),o.append("text");var x=o.select("line"),p=u.select("line"),_=o.select("text"),m=u.select("text");E.isCategory?(U=Math.ceil((c(1)-c(0))/2),i=V?0:U,a=V?U:0):U=i=0;var y,v,T=function(t){if(K)return K;var r={h:11.5,w:5.5};return t.select("text").text(O).each(function(t){var e=this.getBoundingClientRect(),i=O(t),a=e.height,n=i?e.width/i.length:void 0;a&&n&&(r.h=a,r.w=n)}).text(""),K=r}(n.select(".tick")),b=[],A=Math.max(H,0)+N,w="left"===G||"right"===G;(v=(y=s.select("text")).selectAll("tspan").data(function(t,e){var i=E.tickMultiline?function(t,n){var r,s,o,e=O(t);return"[object Array]"===Object.prototype.toString.call(e)?e:((!n||n<=0)&&(n=w?95:E.isCategory?Math.ceil(c(d[1])-c(d[0]))-12:110),function t(e,i){s=void 0;for(var a=1;a<i.length;a++)if(" "===i.charAt(a)&&(s=a),r=i.substr(0,a+1),o=T.w*r.length,n<o)return t(e.concat(i.substr(0,s||a)),i.slice(s?s+1:a));return e.concat(i)}([],e+""))}(t,E.tickWidth):[].concat(O(t));return b[e]=i.length,i.map(function(t){return{index:e,splitted:t}})})).enter().append("tspan"),v.exit().remove(),v.text(function(t){return t.splitted});var L,S,C,D,X=E.tickTextRotate;switch(G){case"bottom":e=Y,x.attr("y2",H),_.attr("y",A),p.attr("x1",i).attr("x2",i).attr("y2",function(t){var e=W(t)+(V?0:U);return g[0]<e&&e<g[1]?H:0}),m.attr("x",0).attr("y",(D=X)?11.5-D/15*2.5*(0<D?1:-1):A).style("text-anchor",(C=X)?0<C?"start":"end":"middle").attr("transform",(S=X)?"rotate("+S+")":""),v.attr("x",0).attr("dy",t).attr("dx",(L=X)?8*Math.sin(Math.PI*(L/180)):0),f.attr("d","M"+g[0]+","+P+"V0H"+g[1]+"V"+P);break;case"top":e=Y,x.attr("y2",-H),_.attr("y",-A),p.attr("x2",0).attr("y2",-H),m.attr("x",0).attr("y",-A),y.style("text-anchor","middle"),v.attr("x",0).attr("dy","0em"),f.attr("d","M"+g[0]+","+-P+"V0H"+g[1]+"V"+-P);break;case"left":e=R,x.attr("x2",-H),_.attr("x",-A),p.attr("x2",-H).attr("y1",a).attr("y2",a),m.attr("x",-A).attr("y",U),y.style("text-anchor","end"),v.attr("x",-A).attr("dy",t),f.attr("d","M"+-P+","+g[0]+"H0V"+g[1]+"H"+-P);break;case"right":e=R,x.attr("x2",H),_.attr("x",A),p.attr("x2",H).attr("y2",0),m.attr("x",A).attr("y",0),y.style("text-anchor","start"),v.attr("x",A).attr("dy",t),f.attr("d","M"+P+","+g[0]+"H0V"+g[1]+"H"+P)}if(c.rangeBand){var F=c,I=F.rangeBand()/2;r=c=function(t){return F(t)+I}}else r.rangeBand?r=c:l.call(e,c);o.call(e,r),u.call(e,c)})}var P,i,z,V,W=k.scale.linear(),G="bottom",H=6,N=3,j=null,U=0,e=!0;return P=(E=E||{}).withOuterTick?6:0,B.scale=function(t){return arguments.length?(W=t,B):W},B.orient=function(t){return arguments.length?(G=t in{top:1,right:1,bottom:1,left:1}?t+"":"bottom",B):G},B.tickFormat=function(t){return arguments.length?(i=t,B):i},B.tickCentered=function(t){return arguments.length?(V=t,B):V},B.tickOffset=function(){return U},B.tickInterval=function(){var t;return 1/0===(t=E.isCategory?2*U:(B.g.select("path.domain").node().getTotalLength()-2*P)/B.g.selectAll("line").size())?0:t},B.ticks=function(){return arguments.length?(z=arguments,B):z},B.tickCulling=function(t){return arguments.length?(e=t,B):e},B.tickValues=function(t){if("function"==typeof t)j=function(){return t(W.domain())};else{if(!arguments.length)return j;j=t}return B},B}var n,l,t={version:"0.4.10",generate:function(t){return new i(t)}};t.chart={fn:i.prototype,internal:{fn:a.prototype,axis:{fn:o.prototype}}},n=t.chart.fn,l=t.chart.internal.fn,t.chart.internal.axis.fn,l.init=function(){var t=this,e=t.config;if(t.initParams(),e.data_url)t.convertUrlToData(e.data_url,e.data_mimeType,e.data_keys,t.initWithData);else if(e.data_json)t.initWithData(t.convertJsonToData(e.data_json,e.data_keys));else if(e.data_rows)t.initWithData(t.convertRowsToData(e.data_rows));
18else{if(!e.data_columns)throw Error("url or json or rows or columns is required.");t.initWithData(t.convertColumnsToData(e.data_columns))}},l.initParams=function(){var t=this,e=t.d3,i=t.config;t.clipId="c3-"+ +new Date+"-clip",t.clipIdForXAxis=t.clipId+"-xaxis",t.clipIdForYAxis=t.clipId+"-yaxis",t.clipIdForGrid=t.clipId+"-grid",t.clipIdForSubchart=t.clipId+"-subchart",t.clipPath=t.getClipPath(t.clipId),t.clipPathForXAxis=t.getClipPath(t.clipIdForXAxis),t.clipPathForYAxis=t.getClipPath(t.clipIdForYAxis),t.clipPathForGrid=t.getClipPath(t.clipIdForGrid),t.clipPathForSubchart=t.getClipPath(t.clipIdForSubchart),t.dragStart=null,t.dragging=!1,t.flowing=!1,t.cancelClick=!1,t.mouseover=!1,t.transiting=!1,t.color=t.generateColor(),t.levelColor=t.generateLevelColor(),t.dataTimeFormat=i.data_xLocaltime?e.time.format:e.time.format.utc,t.axisTimeFormat=i.axis_x_localtime?e.time.format:e.time.format.utc,t.defaultAxisTimeFormat=t.axisTimeFormat.multi([[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%-m/%-d",function(t){return t.getDay()&&1!==t.getDate()}],["%-m/%-d",function(t){return 1!==t.getDate()}],["%-m/%-d",function(t){return t.getMonth()}],["%Y/%-m/%-d",function(){return!0}]]),t.hiddenTargetIds=[],t.hiddenLegendIds=[],t.focusedTargetIds=[],t.defocusedTargetIds=[],t.xOrient=i.axis_rotated?"left":"bottom",t.yOrient=i.axis_rotated?i.axis_y_inner?"top":"bottom":i.axis_y_inner?"right":"left",t.y2Orient=i.axis_rotated?i.axis_y2_inner?"bottom":"top":i.axis_y2_inner?"left":"right",t.subXOrient=i.axis_rotated?"left":"bottom",t.isLegendRight="right"===i.legend_position,t.isLegendInset="inset"===i.legend_position,t.isLegendTop="top-left"===i.legend_inset_anchor||"top-right"===i.legend_inset_anchor,t.isLegendLeft="top-left"===i.legend_inset_anchor||"bottom-left"===i.legend_inset_anchor,t.legendStep=0,t.legendItemWidth=0,t.legendItemHeight=0,t.currentMaxTickWidths={x:0,y:0,y2:0},t.rotated_padding_left=30,t.rotated_padding_right=i.axis_rotated&&!i.axis_x_show?0:30,t.rotated_padding_top=5,t.withoutFadeIn={},t.intervalForObserveInserted=void 0,t.axes.subx=e.selectAll([])},l.initChartElements=function(){this.initBar&&this.initBar(),this.initLine&&this.initLine(),this.initArc&&this.initArc(),this.initGauge&&this.initGauge(),this.initText&&this.initText()},l.initWithData=function(t){var e,i,a=this,n=a.d3,r=a.config,s=!0;a.axis=new o(a),a.initPie&&a.initPie(),a.initBrush&&a.initBrush(),a.initZoom&&a.initZoom(),a.selectChart=r.bindto?"function"==typeof r.bindto.node?r.bindto:n.select(r.bindto):n.selectAll([]),a.selectChart.empty()&&(a.selectChart=n.select(document.createElement("div")).style("opacity",0),a.observeInserted(a.selectChart),s=!1),a.selectChart.html("").classed("c3",!0),a.data.xs={},a.data.targets=a.convertDataToTargets(t),r.data_filter&&(a.data.targets=a.data.targets.filter(r.data_filter)),r.data_hide&&a.addHiddenTargetIds(!0===r.data_hide?a.mapToIds(a.data.targets):r.data_hide),r.legend_hide&&a.addHiddenLegendIds(!0===r.legend_hide?a.mapToIds(a.data.targets):r.legend_hide),a.hasType("gauge")&&(r.legend_show=!1),a.updateSizes(),a.updateScales(),a.x.domain(n.extent(a.getXDomain(a.data.targets))),a.y.domain(a.getYDomain(a.data.targets,"y")),a.y2.domain(a.getYDomain(a.data.targets,"y2")),a.subX.domain(a.x.domain()),a.subY.domain(a.y.domain()),a.subY2.domain(a.y2.domain()),a.orgXDomain=a.x.domain(),a.brush&&a.brush.scale(a.subX),r.zoom_enabled&&a.zoom.scale(a.x),a.svg=a.selectChart.append("svg").style("overflow","hidden").on("mouseenter",function(){return r.onmouseover.call(a)}).on("mouseleave",function(){return r.onmouseout.call(a)}),e=a.svg.append("defs"),a.clipChart=a.appendClip(e,a.clipId),a.clipXAxis=a.appendClip(e,a.clipIdForXAxis),a.clipYAxis=a.appendClip(e,a.clipIdForYAxis),a.clipGrid=a.appendClip(e,a.clipIdForGrid),a.clipSubchart=a.appendClip(e,a.clipIdForSubchart),a.updateSvgSize(),i=a.main=a.svg.append("g").attr("transform",a.getTranslate("main")),a.initSubchart&&a.initSubchart(),a.initTooltip&&a.initTooltip(),a.initLegend&&a.initLegend(),i.append("text").attr("class",V.text+" "+V.empty).attr("text-anchor","middle").attr("dominant-baseline","middle"),a.initRegion(),a.initGrid(),i.append("g").attr("clip-path",a.clipPath).attr("class",V.chart),r.grid_lines_front&&a.initGridLines(),a.initEventRect(),a.initChartElements(),i.insert("rect",r.zoom_privileged?null:"g."+V.regions).attr("class",V.zoomRect).attr("width",a.width).attr("height",a.height).style("opacity",0).on("dblclick.zoom",null),r.axis_x_extent&&a.brush.extent(a.getDefaultExtent()),a.axis.init(),a.updateTargets(a.data.targets),s&&(a.updateDimension(),a.config.oninit.call(a),a.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1})),null==d.onresize&&(d.onresize=a.generateResize()),d.onresize.add&&(d.onresize.add(function(){r.onresize.call(a)}),d.onresize.add(function(){a.api.flush()}),d.onresize.add(function(){r.onresized.call(a)})),a.api.element=a.selectChart.node()},l.smoothLines=function(t,e){var r=this;"grid"===e&&t.each(function(){var t=r.d3.select(this),e=t.attr("x1"),i=t.attr("x2"),a=t.attr("y1"),n=t.attr("y2");t.attr({x1:Math.ceil(e),x2:Math.ceil(i),y1:Math.ceil(a),y2:Math.ceil(n)})})},l.updateSizes=function(){var t=this,e=t.config,i=t.legend?t.getLegendHeight():0,a=t.legend?t.getLegendWidth():0,n=t.isLegendRight||t.isLegendInset?0:i,r=t.hasArcType(),s=e.axis_rotated||r?0:t.getHorizontalAxisHeight("x"),o=e.subchart_show&&!r?e.subchart_size_height+s:0;t.currentWidth=t.getCurrentWidth(),t.currentHeight=t.getCurrentHeight(),t.margin=e.axis_rotated?{top:t.getHorizontalAxisHeight("y2")+t.getCurrentPaddingTop(),right:r?0:t.getCurrentPaddingRight(),bottom:t.getHorizontalAxisHeight("y")+n+t.getCurrentPaddingBottom(),left:o+(r?0:t.getCurrentPaddingLeft())}:{top:4+t.getCurrentPaddingTop(),right:r?0:t.getCurrentPaddingRight(),bottom:s+o+n+t.getCurrentPaddingBottom(),left:r?0:t.getCurrentPaddingLeft()},t.margin2=e.axis_rotated?{top:t.margin.top,right:NaN,bottom:20+n,left:t.rotated_padding_left}:{top:t.currentHeight-o-n,right:NaN,bottom:s+n,left:t.margin.left},t.margin3={top:0,right:NaN,bottom:0,left:0},t.updateSizeForLegend&&t.updateSizeForLegend(i,a),t.width=t.currentWidth-t.margin.left-t.margin.right,t.height=t.currentHeight-t.margin.top-t.margin.bottom,t.width<0&&(t.width=0),t.height<0&&(t.height=0),t.width2=e.axis_rotated?t.margin.left-t.rotated_padding_left-t.rotated_padding_right:t.width,t.height2=e.axis_rotated?t.height:t.currentHeight-t.margin2.top-t.margin2.bottom,t.width2<0&&(t.width2=0),t.height2<0&&(t.height2=0),t.arcWidth=t.width-(t.isLegendRight?a+10:0),t.arcHeight=t.height-(t.isLegendRight?0:10),t.hasType("gauge")&&(t.arcHeight+=t.height-t.getGaugeLabelHeight()),t.updateRadius&&t.updateRadius(),t.isLegendRight&&r&&(t.margin3.left=t.arcWidth/2+1.1*t.radiusExpanded)},l.updateTargets=function(t){var e=this;e.updateTargetsForText(t),e.updateTargetsForBar(t),e.updateTargetsForLine(t),e.hasArcType()&&e.updateTargetsForArc&&e.updateTargetsForArc(t),e.updateTargetsForSubchart&&e.updateTargetsForSubchart(t),e.showTargets()},l.showTargets=function(){var e=this;e.svg.selectAll("."+V.target).filter(function(t){return e.isTargetToShow(t.id)}).transition().duration(e.config.transition_duration).style("opacity",1)},l.redraw=function(t,e){var i,a,n,r,s,o,c,d,l,u,g,h,f,x,p,_,m,y,v,T,b,A,
18w,L,S,C,D,X,F,I=this,k=I.main,E=I.d3,Y=I.config,R=I.getShapeIndices(I.isAreaType),O=I.getShapeIndices(I.isBarType),M=I.getShapeIndices(I.isLineType),B=I.hasArcType(),P=I.filterTargetsToShow(I.data.targets),z=I.xv.bind(I);if(i=W(t=t||{},"withY",!0),a=W(t,"withSubchart",!0),n=W(t,"withTransition",!0),o=W(t,"withTransform",!1),c=W(t,"withUpdateXDomain",!1),d=W(t,"withUpdateOrgXDomain",!1),l=W(t,"withTrimXDomain",!0),f=W(t,"withUpdateXAxis",c),u=W(t,"withLegend",!1),g=W(t,"withEventRect",!0),h=W(t,"withDimension",!0),r=W(t,"withTransitionForExit",n),s=W(t,"withTransitionForAxis",n),v=n?Y.transition_duration:0,T=r?v:0,b=s?v:0,e=e||I.axis.generateTransitions(b),u&&Y.legend_show?I.updateLegend(I.mapToIds(I.data.targets),t,e):h&&I.updateDimension(!0),I.isCategorized()&&0===P.length&&I.x.domain([0,I.axes.x.selectAll(".tick").size()]),P.length?(I.updateXDomain(P,c,d,l),Y.axis_x_tick_values||(L=I.axis.updateXAxisTickValues(P))):(I.xAxis.tickValues([]),I.subXAxis.tickValues([])),Y.zoom_rescale&&!t.flow&&(D=I.x.orgDomain()),I.y.domain(I.getYDomain(P,"y",D)),I.y2.domain(I.getYDomain(P,"y2",D)),!Y.axis_y_tick_values&&Y.axis_y_tick_count&&I.yAxis.tickValues(I.axis.generateTickValues(I.y.domain(),Y.axis_y_tick_count)),!Y.axis_y2_tick_values&&Y.axis_y2_tick_count&&I.y2Axis.tickValues(I.axis.generateTickValues(I.y2.domain(),Y.axis_y2_tick_count)),I.axis.redraw(e,B),I.axis.updateLabels(n),(c||f)&&P.length)if(Y.axis_x_tick_culling&&L){for(S=1;S<L.length;S++)if(L.length/S<Y.axis_x_tick_culling_max){C=S;break}I.svg.selectAll("."+V.axisX+" .tick text").each(function(t){var e=L.indexOf(t);0<=e&&E.select(this).style("display",e%C?"none":"block")})}else I.svg.selectAll("."+V.axisX+" .tick text").style("display","block");x=I.generateDrawArea?I.generateDrawArea(R,!1):void 0,p=I.generateDrawBar?I.generateDrawBar(O):void 0,_=I.generateDrawLine?I.generateDrawLine(M,!1):void 0,m=I.generateXYForText(R,O,M,!0),y=I.generateXYForText(R,O,M,!1),i&&(I.subY.domain(I.getYDomain(P,"y")),I.subY2.domain(I.getYDomain(P,"y2"))),I.tooltip.style("display","none"),I.updateXgridFocus(),k.select("text."+V.text+"."+V.empty).attr("x",I.width/2).attr("y",I.height/2).text(Y.data_empty_label_text).transition().style("opacity",P.length?0:1),I.updateGrid(v),I.updateRegion(v),I.updateBar(T),I.updateLine(T),I.updateArea(T),I.updateCircle(),I.hasDataLabel()&&I.updateText(T),I.redrawArc&&I.redrawArc(v,T,o),I.redrawSubchart&&I.redrawSubchart(a,e,v,T,R,O,M),k.selectAll("."+V.selectedCircles).filter(I.isBarType.bind(I)).selectAll("circle").remove(),Y.interaction_enabled&&!t.flow&&g&&(I.redrawEventRect(),I.updateZoom&&I.updateZoom()),I.updateCircleY(),X=(I.config.axis_rotated?I.circleY:I.circleX).bind(I),F=(I.config.axis_rotated?I.circleX:I.circleY).bind(I),t.flow&&(w=I.generateFlow({targets:P,flow:t.flow,duration:t.flow.duration,drawBar:p,drawLine:_,drawArea:x,cx:X,cy:F,xv:z,xForText:m,yForText:y})),(v||w)&&I.isTabVisible()?E.transition().duration(v).each(function(){var e=[];[I.redrawBar(p,!0),I.redrawLine(_,!0),I.redrawArea(x,!0),I.redrawCircle(X,F,!0),I.redrawText(m,y,t.flow,!0),I.redrawRegion(!0),I.redrawGrid(!0)].forEach(function(t){t.forEach(function(t){e.push(t)})}),A=I.generateWait(),e.forEach(function(t){A.add(t)})}).call(A,function(){w&&w(),Y.onrendered&&Y.onrendered.call(I)}):(I.redrawBar(p),I.redrawLine(_),I.redrawArea(x),I.redrawCircle(X,F),I.redrawText(m,y,t.flow),I.redrawRegion(),I.redrawGrid(),Y.onrendered&&Y.onrendered.call(I)),I.mapToIds(I.data.targets).forEach(function(t){I.withoutFadeIn[t]=!0})},l.updateAndRedraw=function(t){var e,i=this,a=i.config;(t=t||{}).withTransition=W(t,"withTransition",!0),t.withTransform=W(t,"withTransform",!1),t.withLegend=W(t,"withLegend",!1),t.withUpdateXDomain=!0,t.withUpdateOrgXDomain=!0,t.withTransitionForExit=!1,t.withTransitionForTransform=W(t,"withTransitionForTransform",t.withTransition),i.updateSizes(),t.withLegend&&a.legend_show||(e=i.axis.generateTransitions(t.withTransitionForAxis?a.transition_duration:0),i.updateScales(),i.updateSvgSize(),i.transformAll(t.withTransitionForTransform,e)),i.redraw(t,e)},l.redrawWithoutRescale=function(){this.redraw({withY:!1,withSubchart:!1,withEventRect:!1,withTransitionForAxis:!1})},l.isTimeSeries=function(){return"timeseries"===this.config.axis_x_type},l.isCategorized=function(){return 0<=this.config.axis_x_type.indexOf("categor")},l.isCustomX=function(){var t=this.config;return!this.isTimeSeries()&&(t.data_x||C(t.data_xs))},l.isTimeSeriesY=function(){return"timeseries"===this.config.axis_y_type},l.getTranslate=function(t){var e,i,a=this,n=a.config;
18return"main"===t?(e=c(a.margin.left),i=c(a.margin.top)):"context"===t?(e=c(a.margin2.left),i=c(a.margin2.top)):"legend"===t?(e=a.margin3.left,i=a.margin3.top):"x"===t?(e=0,i=n.axis_rotated?0:a.height):"y"===t?(e=0,i=n.axis_rotated?a.height:0):"y2"===t?(e=n.axis_rotated?0:a.width,i=n.axis_rotated?1:0):"subx"===t?(e=0,i=n.axis_rotated?0:a.height2):"arc"===t&&(e=a.arcWidth/2,i=a.arcHeight/2),"translate("+e+","+i+")"},l.initialOpacity=function(t){return null!==t.value&&this.withoutFadeIn[t.id]?1:0},l.initialOpacityForCircle=function(t){return null!==t.value&&this.withoutFadeIn[t.id]?this.opacityForCircle(t):0},l.opacityForCircle=function(t){var e=this.config.point_show?1:0;return S(t.value)?this.isScatterType(t)?.5:e:0},l.opacityForText=function(){return this.hasDataLabel()?1:0},l.xx=function(t){return t?this.x(t.x):null},l.xv=function(t){var e=this,i=t.value;return e.isTimeSeries()?i=e.parseDate(t.value):e.isCategorized()&&"string"==typeof t.value&&(i=e.config.axis_x_categories.indexOf(t.value)),Math.ceil(e.x(i))},l.yv=function(t){var e=t.axis&&"y2"===t.axis?this.y2:this.y;return Math.ceil(e(t.value))},l.subxx=function(t){return t?this.subX(t.x):null},l.transformMain=function(t,e){var i,a,n,r=this;e&&e.axisX?i=e.axisX:(i=r.main.select("."+V.axisX),t&&(i=i.transition())),e&&e.axisY?a=e.axisY:(a=r.main.select("."+V.axisY),t&&(a=a.transition())),e&&e.axisY2?n=e.axisY2:(n=r.main.select("."+V.axisY2),t&&(n=n.transition())),(t?r.main.transition():r.main).attr("transform",r.getTranslate("main")),i.attr("transform",r.getTranslate("x")),a.attr("transform",r.getTranslate("y")),n.attr("transform",r.getTranslate("y2")),r.main.select("."+V.chartArcs).attr("transform",r.getTranslate("arc"))},l.transformAll=function(t,e){var i=this;i.transformMain(t,e),i.config.subchart_show&&i.transformContext(t,e),i.legend&&i.transformLegend(t)},l.updateSvgSize=function(){var t=this,e=t.svg.select(".c3-brush .background");t.svg.attr("width",t.currentWidth).attr("height",t.currentHeight),t.svg.selectAll(["#"+t.clipId,"#"+t.clipIdForGrid]).select("rect").attr("width",t.width).attr("height",t.height),t.svg.select("#"+t.clipIdForXAxis).select("rect").attr("x",t.getXAxisClipX.bind(t)).attr("y",t.getXAxisClipY.bind(t)).attr("width",t.getXAxisClipWidth.bind(t)).attr("height",t.getXAxisClipHeight.bind(t)),t.svg.select("#"+t.clipIdForYAxis).select("rect").attr("x",t.getYAxisClipX.bind(t)).attr("y",t.getYAxisClipY.bind(t)).attr("width",t.getYAxisClipWidth.bind(t)).attr("height",t.getYAxisClipHeight.bind(t)),t.svg.select("#"+t.clipIdForSubchart).select("rect").attr("width",t.width).attr("height",e.size()?e.attr("height"):0),t.svg.select("."+V.zoomRect).attr("width",t.width).attr("height",t.height),t.selectChart.style("max-height",t.currentHeight+"px")},l.updateDimension=function(t){var e=this;t||(e.config.axis_rotated?(e.axes.x.call(e.xAxis),e.axes.subx.call(e.subXAxis)):(e.axes.y.call(e.yAxis),e.axes.y2.call(e.y2Axis))),e.updateSizes(),e.updateScales(),e.updateSvgSize(),e.transformAll(!1)},l.observeInserted=function(e){var i,a=this;return"undefined"==typeof MutationObserver?void d.console.error("MutationObserver not defined."):void(i=new MutationObserver(function(t){t.forEach(function(t){"childList"===t.type&&t.previousSibling&&(i.disconnect(),a.intervalForObserveInserted=d.setInterval(function(){e.node().parentNode&&(d.clearInterval(a.intervalForObserveInserted),a.updateDimension(),a.config.oninit.call(a),a.redraw({withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransition:!1,withTransitionForTransform:!1,withLegend:!0}),e.transition().style("opacity",1))},10))})})).observe(e.node(),{attributes:!0,childList:!0,characterData:!0})},l.generateResize=function(){function t(){e.forEach(function(t){t()})}var e=[];return t.add=function(t){e.push(t)},t},l.endall=function(t,e){var i=0;t.each(function(){++i}).each("end",function(){--i||e.apply(this,arguments)})},l.generateWait=function(){var n=[],t=function(t,i){var a=setInterval(function(){var e=0;n.forEach(function(t){if(t.empty())e+=1;else try{t.transition()}catch(t){e+=1}}),e===n.length&&(clearInterval(a),i&&i())},10)};return t.add=function(t){n.push(t)},t},l.parseDate=function(t){var e;return t instanceof Date?e=t:"string"==typeof t?e=this.dataTimeFormat(this.config.data_xFormat).parse(t):"number"!=typeof t&&isNaN(t)||(e=new Date(+t)),(!e||isNaN(+e))&&d.console.error("Failed to parse x '"+t+"' to Date object"),e},l.isTabVisible=function(){var t;return void 0!==document.hidden?t="hidden":void 0!==document.mozHidden?t="mozHidden":void 0!==document.msHidden?t="msHidden":void 0!==document.webkitHidden&&(t="webkitHidden"),!document[t]},l.getDefaultConfig=function(){var e={bindto:"#chart",size_width:void 0,size_height:void 0,padding_left:void 0,padding_right:void 0,padding_top:void 0,padding_bottom:void 0,zoom_enabled:!1,zoom_extent:void 0,zoom_privileged:!1,zoom_rescale:!1,zoom_onzoom:function(){},zoom_onzoomstart:function(){},zoom_onzoomend:function(){},interaction_enabled:!0,onmouseover:function(){},onmouseout:function(){},onresize:function(){},onresized:function(){},oninit:function(){},onrendered:function(){},transition_duration:350,data_x:void 0,data_xs:{},data_xFormat:"%Y-%m-%d",data_xLocaltime:!0,data_xSort:!0,data_idConverter:function(t){return t},data_names:{},data_classes:{},data_groups:[],data_axes:{},data_type:void 0,data_types:{},data_labels:{},data_order:"desc",data_regions:{},data_color:void 0,data_colors:{},data_hide:!1,data_filter:void 0,data_selection_enabled:!1,data_selection_grouped:!1,data_selection_isselectable:function(){return!0},data_selection_multiple:!0,data_selection_draggable:!1,data_onclick:function(){},data_onmouseover:function(){},data_onmouseout:function(){},data_onselected:function(){},data_onunselected:function(){},data_url:void 0,data_json:void 0,data_rows:void 0,data_columns:void 0,data_mimeType:void 0,data_keys:void 0,data_empty_label_text:"",subchart_show:!1,subchart_size_height:60,subchart_onbrush:function(){},color_pattern:[],color_threshold:{},legend_show:!0,legend_hide:!1,legend_position:"bottom",legend_inset_anch
vendor: 4,852 bytes, line 18
18or:"top-left",legend_inset_x:10,legend_inset_y:0,legend_inset_step:void 0,legend_item_onclick:void 0,legend_item_onmouseover:void 0,legend_item_onmouseout:void 0,legend_equally:!1,axis_rotated:!1,axis_x_show:!0,axis_x_type:"indexed",axis_x_localtime:!0,axis_x_categories:[],axis_x_tick_centered:!1,axis_x_tick_format:void 0,axis_x_tick_culling:{},axis_x_tick_culling_max:10,axis_x_tick_count:void 0,axis_x_tick_fit:!0,axis_x_tick_values:null,axis_x_tick_rotate:0,axis_x_tick_outer:!0,axis_x_tick_multiline:!0,axis_x_tick_width:null,axis_x_max:void 0,axis_x_min:void 0,axis_x_padding:{},axis_x_height:void 0,axis_x_extent:void 0,axis_x_label:{},axis_y_show:!0,axis_y_type:void 0,axis_y_max:void 0,axis_y_min:void 0,axis_y_inverted:!1,axis_y_center:void 0,axis_y_inner:void 0,axis_y_label:{},axis_y_tick_format:void 0,axis_y_tick_outer:!0,axis_y_tick_values:null,axis_y_tick_count:void 0,axis_y_tick_time_value:void 0,axis_y_tick_time_interval:void 0,axis_y_padding:{},axis_y_default:void 0,axis_y2_show:!1,axis_y2_max:void 0,axis_y2_min:void 0,axis_y2_inverted:!1,axis_y2_center:void 0,axis_y2_inner:void 0,axis_y2_label:{},axis_y2_tick_format:void 0,axis_y2_tick_outer:!0,axis_y2_tick_values:null,axis_y2_tick_count:void 0,axis_y2_padding:{},axis_y2_default:void 0,grid_x_show:!1,grid_x_type:"tick",grid_x_lines:[],grid_y_show:!1,grid_y_lines:[],grid_y_ticks:10,grid_focus_show:!0,grid_lines_front:!0,point_show:!0,point_r:2.5,point_focus_expand_enabled:!0,point_focus_expand_r:void 0,point_select_r:void 0,line_connectNull:!1,line_step_type:"step",bar_width:void 0,bar_width_ratio:.6,bar_width_max:void 0,bar_zerobased:!0,area_zerobased:!0,pie_label_show:!0,pie_label_format:void 0,pie_label_threshold:.05,pie_expand:!0,gauge_label_show:!0,gauge_label_format:void 0,gauge_expand:!0,gauge_min:0,gauge_max:100,gauge_units:void 0,gauge_width:void 0,donut_label_show:!0,donut_label_format:void 0,donut_label_threshold:.05,donut_width:void 0,donut_expand:!0,donut_title:"",regions:[],tooltip_show:!0,tooltip_grouped:!0,tooltip_format_title:void 0,tooltip_format_name:void 0,tooltip_format_value:void 0,tooltip_position:void 0,tooltip_contents:function(t,e,i,a){return this.getTooltipContent?this.getTooltipContent(t,e,i,a):""},tooltip_init_show:!1,tooltip_init_x:0,tooltip_init_position:{top:"0px",left:"50px"}};return Object.keys(this.additionalConfig).forEach(function(t){e[t]=this.additionalConfig[t]},this),e},l.additionalConfig={},l.loadConfig=function(e){var i,a,n,r=this.config;Object.keys(r).forEach(function(t){i=e,a=t.split("_"),n=function t(){var e=a.shift();return e&&i&&"object"==typeof i&&e in i?(i=i[e],t()):e?void 0:i}(),k(n)&&(r[t]=n)})},l.getScale=function(t,e,i){return(i?this.d3.time.scale():this.d3.scale.linear()).range([t,e])},l.getX=function(t,e,i,a){var n,r=this.getScale(t,e,this.isTimeSeries()),s=i?r.domain(i):r;for(n in r=this.isCategorized()?(a=a||function(){return 0},function(t,e){var i=s(t)+a(t);return e?i:Math.ceil(i)}):function(t,e){var i=s(t);return e?i:Math.ceil(i)},s)r[n]=s[n];return r.orgDomain=function(){return s.domain()},this.isCategorized()&&(r.domain=function(t){return arguments.length?(s.domain(t),r):[(t=this.orgDomain())[0],t[1]+1]}),r},l.getY=function(t,e,i){var a=this.getScale(t,e,this.isTimeSeriesY());return i&&a.domain(i),a},l.getYScale=function(t){return"y2"===this.axis.getId(t)?this.y2:this.y},l.getSubYScale=function(t){return"y2"===this.axis.getId(t)?this.subY2:this.subY},l.updateScales=function(){var e=this,t=e.config,i=!e.x;e.xMin=t.axis_rotated?1:0,e.xMax=t.axis_rotated?e.height:e.width,e.yMin=t.axis_rotated?0:e.height,e.yMax=t.axis_rotated?e.width:1,e.subXMin=e.xMin,e.subXMax=e.xMax,e.subYMin=t.axis_rotated?0:e.height2,e.subYMax=t.axis_rotated?e.width2:1,e.x=e.getX(e.xMin,e.xMax,i?void 0:e.x.orgDomain(),function(){return e.xAxis.tickOffset()}),e.y=e.getY(e.yMin,e.yMax,i?t.axis_y_default:e.y.domain()),e.y2=e.getY(e.yMin,e.yMax,i?t.axis_y2_default:e.y2.domain()),e.subX=e.getX(e.xMin,e.xMax,e.orgXDomain,function(t){return t%1?0:e.subXAxis.tickOffset()}),e.subY=e.getY(e.subYMin,e.subYMax,i?t.axis_y_default:e.subY.domain()),e.subY2=e.getY(e.subYMin,e.subYMax,i?t.axis_y2_default:e.subY2.domain()),e.xAxisTickFormat=e.axis.getXAxisTickFormat(),e.xAxisTickValues=e.axis.getXAxisTickValues(),e.yAxisTickValues=e.axis.getYAxisTickValues(),e.y2AxisTickValues=e.axis.getY2AxisTickValues(),e.xAxis=e.axis.getXAxis(e.x,e.xOrient,e.xAxisTickFormat,e.xAxisTickValues,t.axis_x_tick_outer),e.subXAxis=e.axis.getXAxis(e.subX,e.subXOrient,e.xAxisTickFormat,e.xAxisTickValues,t.axis_x_tick_outer),e.yAxis=e.axis.getYAxis(e.y,e.yOrient,t.axis_y_tick_format,e.yAxisTickValues,t.axis_y_tick_outer),e.y2Axis=e.axis.getYAxis(e.y2,e.y2Orient,t.axis_y2_tick_format,e.y2AxisTickValues,t.axis_y2_tick_outer),i||(e.brush&&e.brush.scale(e.subX),t.zoom_enabled&&e.zoom.scale(e.x)),e.updateArc&&e.updateArc()}
18,l.getYDomainMin=function(t){var e,i,a,n,r,s,o=this,c=o.config,d=o.mapToIds(t),l=o.getValuesAsIdKeyed(t);if(0<c.data_groups.length)for(s=o.hasNegativeValueInTargets(t),e=0;e<c.data_groups.length;e++)if(0!==(n=c.data_groups[e].filter(function(t){return 0<=d.indexOf(t)})).length)for(a=n[0],s&&l[a]&&l[a].forEach(function(t,e){l[a][e]=t<0?t:0}),i=1;i<n.length;i++)r=n[i],l[r]&&l[r].forEach(function(t,e){o.axis.getId(r)!==o.axis.getId(a)||!l[a]||s&&0<+t||(l[a][e]+=+t)});return o.d3.min(Object.keys(l).map(function(t){return o.d3.min(l[t])}))},l.getYDomainMax=function(t){var e,i,a,n,r,s,o=this,c=o.config,d=o.mapToIds(t),l=o.getValuesAsIdKeyed(t);if(0<c.data_groups.length)for(s=o.hasPositiveValueInTargets(t),e=0;e<c.data_groups.length;e++)if(0!==(n=c.data_groups[e].filter(function(t){return 0<=d.indexOf(t)})).length)for(a=n[0],s&&l[a]&&l[a].forEach(function(t,e){l[a][e]=0<t?t:0}),i=1;i<n.length;i++)r=n[i],l[r]&&l[r].forEach(function(t,e){o.axis.getId(r)!==o.axis.getId(a)||!l[a]||s&&+t<0||(l[a][e]+=+t)});return o.d3.max(Object.keys(l).map(function(t){return o.d3.max(l[t])}))},l.getYDomain=function(t,e,i){var a,n,r,s,o,c,d,l,u,g,h=this,f=h.config,x=t.filter(function(t){return h.axis.getId(t.id)===e}),p=i?h.filterByXDomain(x,i):x,_="y2"===e?f.axis_y2_min:f.axis_y_min,m="y2"===e?f.axis_y2_max:f.axis_y_max,y=h.getYDomainMin(p),v=h.getYDomainMax(p),T="y2"===e?f.axis_y2_center:f.axis_y_center,b=h.hasType("bar",p)&&f.bar_zerobased||h.hasType("area",p)&&f.area_zerobased,A="y2"===e?f.axis_y2_inverted:f.axis_y_inverted,w=h.hasDataLabel()&&f.axis_rotated,L=h.hasDataLabel()&&!f.axis_rotated;return y=S(_)?_:S(m)?y<m?y:m-10:y,v=S(m)?m:S(_)?_<v?v:_+10:v,0===p.length?"y2"===e?h.y2.domain():h.y.domain():(isNaN(y)&&(y=0),isNaN(v)&&(v=y),y===v&&(y<0?v=0:y=0),u=0<=y&&0<=v,g=y<=0&&v<=0,(S(_)&&u||S(m)&&g)&&(b=!1),b&&(u&&(y=0),g&&(v=0)),r=s=.1*(n=Math.abs(v-y)),void 0!==T&&(v=T+(o=Math.max(Math.abs(y),Math.abs(v))),y=T-o),w?(c=h.getDataLabelLength(y,v,"width"),d=R(h.y.range()),r+=n*((l=[c[0]/d,c[1]/d])[1]/(1-l[0]-l[1])),s+=n*(l[0]/(1-l[0]-l[1]))):L&&(c=h.getDataLabelLength(y,v,"height"),r+=h.axis.convertPixelsToAxisPadding(c[1],n),s+=h.axis.convertPixelsToAxisPadding(c[0],n)),"y"===e&&C(f.axis_y_padding)&&(r=h.axis.getPadding(f.axis_y_padding,"top",r,n),s=h.axis.getPadding(f.axis_y_padding,"bottom",s,n)),"y2"===e&&C(f.axis_y2_padding)&&(r=h.axis.getPadding(f.axis_y2_padding,"top",r,n),s=h.axis.getPadding(f.axis_y2_padding,"bottom",s,n)),b&&(u&&(s=y),g&&(r=-v)),a=[y-s,v+r],A?a.reverse():a)},l.getXDomainMin=function(t){var e=this,i=e.config;return k(i.axis_x_min)?e.isTimeSeries()?this.parseDate(i.axis_x_min):i.axis_x_min:e.d3.min(t,function(t){return e.d3.min(t.values,function(t){return t.x})})},l.getXDomainMax=function(t){var e=this,i=e.config;return k(i.axis_x_max)?e.isTimeSeries()?this.parseDate(i.axis_x_max):i.axis_x_max:e.d3.max(t,function(t){return e.d3.max(t.values,function(t){return t.x})})},l.getXDomainPadding=function(t){var e,i,a,n,r=this.config,s=t[1]-t[0];return i=this.isCategorized()?0:this.hasType("bar")?1<(e=this.getMaxDataCount())?s/(e-1)/2:.5:.01*s,"object"==typeof r.axis_x_padding&&C(r.axis_x_padding)?(a=S(r.axis_x_padding.left)?r.axis_x_padding.left:i,n=S(r.axis_x_padding.right)?r.axis_x_padding.right:i):a=n="number"==typeof r.axis_x_padding?r.axis_x_padding:i,{left:a,right:n}},l.getXDomain=function(t){var e=this,i=[e.getXDomainMin(t),e.getXDomainMax(t)],a=i[0],n=i[1],r=e.getXDomainPadding(i),s=0,o=0;return a-n!=0||e.isCategorized()||(n=e.isTimeSeries()?(a=new Date(.5*a.getTime()),new Date(1.5*n.getTime())):(a=0===a?1:.5*a,0===n?-1:1.5*n)),(a||0===a)&&(s=e.isTimeSeries()?new Date(a.getTime()-r.left):a-r.left),(n||0===n)&&(o=e.isTimeSeries()?new Date(n.getTime()+r.right):n+r.right),[s,o]},l.updateXDomain=function(t,e,i,a,n){var r=this,s=r.config;return i&&(r.x.domain(n||r.d3.extent(r.getXDomain(t))),r.orgXDomain=r.x.domain(),s.zoom_enabled&&r.zoom.scale(r.x).updateScaleExtent(),r.subX.domain(r.x.domain()),r.brush&&r.brush.scale(r.subX)),e&&(r.x.domain(n||(!r.brush||r.brush.empty()?r.orgXDomain:r.brush.extent())),s.zoom_enabled&&r.zoom.scale(r.x).updateScaleExtent()),a&&r.x.domain(r.trimXDomain(r.x.orgDomain())),r.x.domain()},l.trimXDomain=function(t){var e=this;return t[0]<=e.orgXDomain[0]&&(t[1]=+t[1]+(e.orgXDomain[0]-t[0]),t[0]=e.orgXDomain[0]),e.orgXDomain[1]<=t[1]&&(t[0]=+t[0]-(t[1]-e.orgXDomain[1]),t[1]=e.orgXDomain[1]),t},l.isX=function(t){var e=this.config;return e.data_x&&t===e.data_x||C(e.data_xs)&&f(e.data_xs,t)},l.isNotX=function(t){return!this.isX(t)},l.getXKey=function(t){var e=this.config;return e.data_x?e.data_x:C(e.data_xs)?e.data_xs[t]:null},l.getXValuesOfXKey=function(e,t){var i,a=this;
18return(t&&C(t)?a.mapToIds(t):[]).forEach(function(t){a.getXKey(t)===e&&(i=a.data.xs[t])}),i},l.getIndexByX=function(t){var e=this.filterByX(this.data.targets,t);return e.length?e[0].index:null},l.getXValue=function(t,e){return t in this.data.xs&&this.data.xs[t]&&S(this.data.xs[t][e])?this.data.xs[t][e]:e},l.getOtherTargetXs=function(){var t=Object.keys(this.data.xs);return t.length?this.data.xs[t[0]]:null},l.getOtherTargetX=function(t){var e=this.getOtherTargetXs();return e&&t<e.length?e[t]:null},l.addXs=function(e){var i=this;Object.keys(e).forEach(function(t){i.config.data_xs[t]=e[t]})},l.hasMultipleX=function(e){return 1<this.d3.set(Object.keys(e).map(function(t){return e[t]})).size()},l.isMultipleX=function(){return C(this.config.data_xs)||!this.config.data_xSort||this.hasType("scatter")},l.addName=function(t){var e;return t&&(e=this.config.data_names[t.id],t.name=e||t.id),t},l.getValueOnIndex=function(t,e){var i=t.filter(function(t){return t.index===e});return i.length?i[0]:null},l.updateTargetX=function(t,a){var n=this;t.forEach(function(i){i.values.forEach(function(t,e){t.x=n.generateTargetX(a[e],i.id,e)}),n.data.xs[i.id]=a})},l.updateTargetXs=function(t,e){var i=this;t.forEach(function(t){e[t.id]&&i.updateTargetX([t],e[t.id])})},l.generateTargetX=function(t,e,i){var a=this;return a.isTimeSeries()?a.parseDate(t||a.getXValue(e,i)):a.isCustomX()&&!a.isCategorized()?S(t)?+t:a.getXValue(e,i):i},l.cloneTarget=function(t){return{id:t.id,id_org:t.id_org,values:t.values.map(function(t){return{x:t.x,value:t.value,id:t.id}})}},l.updateXs=function(){var e=this;e.data.targets.length&&(e.xs=[],e.data.targets[0].values.forEach(function(t){e.xs[t.index]=t.x}))},l.getPrevX=function(t){var e=this.xs[t-1];return void 0!==e?e:null},l.getNextX=function(t){var e=this.xs[t+1];return void 0!==e?e:null},l.getMaxDataCount=function(){return this.d3.max(this.data.targets,function(t){return t.values.length})},l.getMaxDataCountTarget=function(t){var e,i=t.length,a=0;return 1<i?t.forEach(function(t){t.values.length>a&&(a=(e=t).values.length)}):e=i?t[0]:null,e},l.getEdgeX=function(t){return t.length?[this.d3.min(t,function(t){return t.values[0].x}),this.d3.max(t,function(t){return t.values[t.values.length-1].x})]:[0,0]},l.mapToIds=function(t){return t.map(function(t){return t.id})},l.mapToTargetIds=function(t){return t?r(t)?[t]:t:this.mapToIds(this.data.targets)},l.hasTarget=function(t,e){var i,a=this.mapToIds(t);for(i=0;i<a.length;i++)if(a[i]===e)return!0;return!1},l.isTargetToShow=function(t){return this.hiddenTargetIds.indexOf(t)<0},l.isLegendToShow=function(t){return this.hiddenLegendIds.indexOf(t)<0},l.filterTargetsToShow=function(t){var e=this;return t.filter(function(t){return e.isTargetToShow(t.id)})},l.mapTargetsToUniqueXs=function(t){return this.d3.set(this.d3.merge(t.map(function(t){return t.values.map(function(t){return+t.x})}))).values().map(this.isTimeSeries()?function(t){return new Date(+t)}:function(t){return+t})},l.addHiddenTargetIds=function(t){this.hiddenTargetIds=this.hiddenTargetIds.concat(t)},l.removeHiddenTargetIds=function(e){this.hiddenTargetIds=this.hiddenTargetIds.filter(function(t){return e.indexOf(t)<0})},l.addHiddenLegendIds=function(t){this.hiddenLegendIds=this.hiddenLegendIds.concat(t)},l.removeHiddenLegendIds=function(e){this.hiddenLegendIds=this.hiddenLegendIds.filter(function(t){return e.indexOf(t)<0})},l.getValuesAsIdKeyed=function(t){var i={};return t.forEach(function(e){i[e.id]=[],e.values.forEach(function(t){i[e.id].push(t.value)})}),i},l.checkValueInTargets=function(t,e){var i,a,n,r=Object.keys(t);for(i=0;i<r.length;i++)for(n=t[r[i]].values,a=0;a<n.length;a++)if(e(n[a].value))return!0;return!1},l.hasNegativeValueInTargets=function(t){return this.checkValueInTargets(t,function(t){return t<0})},l.hasPositiveValueInTargets=function(t){return this.checkValueInTargets(t,function(t){return 0<t})},l.isOrderDesc=function(){var t=this.config;return"string"==typeof t.data_order&&"desc"===t.data_order.toLowerCase()},l.isOrderAsc=function(){var t=this.config;return"string"==typeof t.data_order&&"asc"===t.data_order.toLowerCase()},l.orderTargets=function(t){var e=this.config,r=this.isOrderAsc(),i=this.isOrderDesc();return r||i?t.sort(function(t,e){var i=function(t,e){return t+Math.abs(e.value)},a=t.values.reduce(i,0),n=e.values.reduce(i,0);return r?n-a:a-n}):g(e.data_order)&&t.sort(e.data_order),t},l.filterByX=function(t,e){return this.d3.merge(t.map(function(t){return t.values})).filter(function(t){return t.x-e==0})},l.filterRemoveNull=function(t){return t.filter(function(t){return S(t.value)})},l.filterByXDomain=function(t,e){return t.map(function(t){return{id:t.id,id_org:t.id_org,values:t.values.filter(function(t){return e[0]<=t.x&&t.x<=e[1]})}})},l.hasDataLabel=function(){var t=this.config;return!("boolean"!=typeof t.data_labels||!t.data_labels)||!("object"!=typeof t.data_labels||!C(t.data_labels))}
18,l.getDataLabelLength=function(t,e,i){var a=this,n=[0,0];return a.selectChart.select("svg").selectAll(".dummy").data([t,e]).enter().append("text").text(function(t){return a.dataLabelFormat(t.id)(t)}).each(function(t,e){n[e]=1.3*this.getBoundingClientRect()[i]}).remove(),n},l.isNoneArc=function(t){return this.hasTarget(this.data.targets,t.id)},l.isArc=function(t){return"data"in t&&this.hasTarget(this.data.targets,t.data.id)},l.findSameXOfValues=function(t,e){var i,a=t[e].x,n=[];for(i=e-1;0<=i&&a===t[i].x;i--)n.push(t[i]);for(i=e;i<t.length&&a===t[i].x;i++)n.push(t[i]);return n},l.findClosestFromTargets=function(t,e){var i,a=this;return i=t.map(function(t){return a.findClosest(t.values,e)}),a.findClosest(i,e)},l.findClosest=function(t,i){var a,n=this,r=100;return t.filter(function(t){return t&&n.isBarType(t.id)}).forEach(function(t){var e=n.main.select("."+V.bars+n.getTargetSelectorSuffix(t.id)+" ."+V.bar+"-"+t.index).node();!a&&n.isWithinBar(e)&&(a=t)}),t.filter(function(t){return t&&!n.isBarType(t.id)}).forEach(function(t){var e=n.dist(t,i);e<r&&(r=e,a=t)}),a},l.dist=function(t,e){var i=this.config,a=i.axis_rotated?1:0,n=i.axis_rotated?0:1,r=this.circleY(t,t.index),s=this.x(t.x);return Math.pow(s-e[a],2)+Math.pow(r-e[n],2)},l.convertValuesToStep=function(t){var e,i=[].concat(t);if(!this.isCategorized())return t;for(e=t.length+1;0<e;e--)i[e]=i[e-1];return i[0]={x:i[0].x-1,value:i[0].value,id:i[0].id},i[t.length+1]={x:i[t.length].x+1,value:i[t.length].value,id:i[t.length].id},i},l.updateDataAttributes=function(t,e){var i=this.config["data_"+t];return void 0===e||(Object.keys(e).forEach(function(t){i[t]=e[t]}),this.redraw({withLegend:!0})),i},l.convertUrlToData=function(t,e,a,n){var r=this,s=e||"csv";r.d3.xhr(t,function(t,e){var i;if(!e)throw new Error(t.responseURL+" "+t.status+" ("+t.statusText+")");i="json"===s?r.convertJsonToData(JSON.parse(e.response),a):"tsv"===s?r.convertTsvToData(e.response):r.convertCsvToData(e.response),n.call(r,i)})},l.convertXsvToData=function(t,e){var i,a=e.parseRows(t);return 1===a.length?(i=[{}],a[0].forEach(function(t){i[0][t]=null})):i=e.parse(t),i},l.convertCsvToData=function(t){return this.convertXsvToData(t,this.d3.csv)},l.convertTsvToData=function(t){return this.convertXsvToData(t,this.d3.tsv)},l.convertJsonToData=function(e,t){var n,r=[];return t?(t.x?(n=t.value.concat(t.x),this.config.data_x=t.x):n=t.value,r.push(n),e.forEach(function(i){var a=[];n.forEach(function(t){var e=b(i[t])?null:i[t];a.push(e)}),r.push(a)}),this.convertRowsToData(r)):(Object.keys(e).forEach(function(t){r.push([t].concat(e[t]))}),this.convertColumnsToData(r))},l.convertRowsToData=function(t){var e,i,a=t[0],n={},r=[];for(e=1;e<t.length;e++){for(n={},i=0;i<t[e].length;i++){if(b(t[e][i]))throw new Error("Source data is missing a component at ("+e+","+i+")!");n[a[i]]=t[e][i]}r.push(n)}return r},l.convertColumnsToData=function(t){var e,i,a,n=[];for(e=0;e<t.length;e++)for(a=t[e][0],i=1;i<t[e].length;i++){if(b(n[i-1])&&(n[i-1]={}),b(t[e][i]))throw new Error("Source data is missing a component at ("+e+","+i+")!");n[i-1][a]=t[e][i]}return n},l.convertDataToTargets=function(t,a){var e,o=this,c=o.config,i=o.d3.keys(t[0]).filter(o.isNotX,o),n=o.d3.keys(t[0]).filter(o.isX,o);return i.forEach(function(i){var e=o.getXKey(i);o.isCustomX()||o.isTimeSeries()?0<=n.indexOf(e)?o.data.xs[i]=(a&&o.data.xs[i]?o.data.xs[i]:[]).concat(t.map(function(t){return t[e]}).filter(S).map(function(t,e){return o.generateTargetX(t,i,e)})):c.data_x?o.data.xs[i]=o.getOtherTargetXs():C(c.data_xs)&&(o.data.xs[i]=o.getXValuesOfXKey(e,o.data.targets)):o.data.xs[i]=t.map(function(t,e){return e})}
18),i.forEach(function(t){if(!o.data.xs[t])throw new Error('x is not defined for id = "'+t+'".')}),(e=i.map(function(n,r){var s=c.data_idConverter(n);return{id:s,id_org:n,values:t.map(function(t,e){var i=t[o.getXKey(n)],a=o.generateTargetX(i,n,e);return o.isCustomX()&&o.isCategorized()&&0===r&&i&&(0===e&&(c.axis_x_categories=[]),c.axis_x_categories.push(i)),(b(t[n])||o.data.xs[n].length<=e)&&(a=void 0),{x:a,value:null===t[n]||isNaN(t[n])?null:+t[n],id:s}}).filter(function(t){return k(t.x)})}})).forEach(function(t){var e;c.data_xSort&&(t.values=t.values.sort(function(t,e){return(t.x||0===t.x?t.x:1/0)-(e.x||0===e.x?e.x:1/0)})),e=0,t.values.forEach(function(t){t.index=e++}),o.data.xs[t.id].sort(function(t,e){return t-e})}),c.data_type&&o.setTargetType(o.mapToIds(e).filter(function(t){return!(t in c.data_types)}),c.data_type),e.forEach(function(t){o.addCache(t.id_org,t)}),e},l.load=function(i,a){var n=this;i&&(a.filter&&(i=i.filter(a.filter)),(a.type||a.types)&&i.forEach(function(t){var e=a.types&&a.types[t.id]?a.types[t.id]:a.type;n.setTargetType(t.id,e)}),n.data.targets.forEach(function(t){for(var e=0;e<i.length;e++)if(t.id===i[e].id){t.values=i[e].values,i.splice(e,1);break}}),n.data.targets=n.data.targets.concat(i)),n.updateTargets(n.data.targets),n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),a.done&&a.done()},l.loadFromArgs=function(e){var i=this;e.data?i.load(i.convertDataToTargets(e.data),e):e.url?i.convertUrlToData(e.url,e.mimeType,e.keys,function(t){i.load(i.convertDataToTargets(t),e)}):e.json?i.load(i.convertDataToTargets(i.convertJsonToData(e.json,e.keys)),e):e.rows?i.load(i.convertDataToTargets(i.convertRowsToData(e.rows)),e):e.columns?i.load(i.convertDataToTargets(i.convertColumnsToData(e.columns)),e):i.load(null,e)},l.unload=function(t,e){var i=this;return e||(e=function(){}),(t=t.filter(function(t){return i.hasTarget(i.data.targets,t)}))&&0!==t.length?(i.svg.selectAll(t.map(function(t){return i.selectorTarget(t)})).transition().style("opacity",0).remove().call(i.endall,e),void t.forEach(function(e){i.withoutFadeIn[e]=!1,i.legend&&i.legend.selectAll("."+V.legendItem+i.getTargetSelectorSuffix(e)).remove(),i.data.targets=i.data.targets.filter(function(t){return t.id!==e})})):void e()},l.categoryName=function(t){var e=this.config;return t<e.axis_x_categories.length?e.axis_x_categories[t]:t},l.initEventRect=function(){this.main.select("."+V.chart).append("g").attr("class",V.eventRects).style("fill-opacity",0)},l.redrawEventRect=function(){var t,e,i=this,a=i.config,n=i.isMultipleX(),r=i.main.select("."+V.eventRects).style("cursor",a.zoom_enabled?a.axis_rotated?"ns-resize":"ew-resize":null).classed(V.eventRectsMultiple,n).classed(V.eventRectsSingle,!n);r.selectAll("."+V.eventRect).remove(),i.eventRect=r.selectAll("."+V.eventRect),n?(t=i.eventRect.data([0]),i.generateEventRectsForMultipleXs(t.enter()),i.updateEventRect(t)):(e=i.getMaxDataCountTarget(i.data.targets),r.datum(e?e.values:[]),i.eventRect=r.selectAll("."+V.eventRect),t=i.eventRect.data(function(t){return t}),i.generateEventRectsForSingleX(t.enter()),i.updateEventRect(t),t.exit().remove())},l.updateEventRect=function(t){var e,i,a,n,r,s,o=this,c=o.config;t=t||o.eventRect.data(function(t){return t}),n=o.isMultipleX()?(i=e=0,a=o.width,o.height):(s=!o.isCustomX()&&!o.isTimeSeries()||o.isCategorized()?(r=o.getEventRectWidth(),function(t){return o.x(t.x)-r/2}):(o.updateXs(),r=function(t){var e=o.getPrevX(t.index),i=o.getNextX(t.index);return null===e&&null===i?c.axis_rotated?o.height:o.width:(null===e&&(e=o.x.domain()[0]),null===i&&(i=o.x.domain()[1]),Math.max(0,(o.x(i)-o.x(e))/2))},function(t){var e=o.getPrevX(t.index),i=o.getNextX(t.index),a=o.data.xs[t.id][t.index];return null===e&&null===i?0:(null===e&&(e=o.x.domain()[0]),(o.x(a)+o.x(e))/2)}),e=c.axis_rotated?0:s,i=c.axis_rotated?s:0,a=c.axis_rotated?o.width:r,c.axis_rotated?r:o.height),t.attr("class",o.classEvent.bind(o)).attr("x",e).attr("y",i).attr("width",a).attr("height",n)},l.generateEventRectsForSingleX=function(t){var n=this,r=n.d3,s=n.config;t.append("rect").attr("class",n.classEvent.bind(n)).style("cursor",s.data_selection_enabled&&s.data_selection_grouped?"pointer":null).on("mouseover",function(t){var e=t.index;n.dragging||n.flowing||n.hasArcType()||(s.point_focus_expand_enabled&&n.expandCircles(e,null,!0),n.expandBars(e,null,!0),n.main.selectAll("."+V.shape+"-"+e).each(function(t){s.data_onmouseover.call(n.api,t)}))}).on("mouseout",function(t){var e=t.index;n.config&&(n.hasArcType()||(n.hideXGridFocus(),n.hideTooltip(),n.unex
18pandCircles(),n.unexpandBars(),n.main.selectAll("."+V.shape+"-"+e).each(function(t){s.data_onmouseout.call(n.api,t)})))}).on("mousemove",function(t){var e,i=t.index,a=n.svg.select("."+V.eventRect+"-"+i);n.dragging||n.flowing||n.hasArcType()||(n.isStepType(t)&&"step-after"===n.config.line_step_type&&r.mouse(this)[0]<n.x(n.getXValue(t.id,i))&&(i-=1),e=n.filterTargetsToShow(n.data.targets).map(function(t){return n.addName(n.getValueOnIndex(t.values,i))}),s.tooltip_grouped&&(n.showTooltip(e,this),n.showXGridFocus(e)),(!s.tooltip_grouped||s.data_selection_enabled&&!s.data_selection_grouped)&&n.main.selectAll("."+V.shape+"-"+i).each(function(){r.select(this).classed(V.EXPANDED,!0),s.data_selection_enabled&&a.style("cursor",s.data_selection_grouped?"pointer":null),s.tooltip_grouped||(n.hideXGridFocus(),n.hideTooltip(),s.data_selection_grouped||(n.unexpandCircles(i),n.unexpandBars(i)))}).filter(function(t){return n.isWithinShape(this,t)}).each(function(t){s.data_selection_enabled&&(s.data_selection_grouped||s.data_selection_isselectable(t))&&a.style("cursor","pointer"),s.tooltip_grouped||(n.showTooltip([t],this),n.showXGridFocus([t]),s.point_focus_expand_enabled&&n.expandCircles(i,t.id,!0),n.expandBars(i,t.id,!0))}))}).on("click",function(t){var e=t.index;if(!n.hasArcType()&&n.toggleShape){if(n.cancelClick)return void(n.cancelClick=!1);n.isStepType(t)&&"step-after"===s.line_step_type&&r.mouse(this)[0]<n.x(n.getXValue(t.id,e))&&(e-=1),n.main.selectAll("."+V.shape+"-"+e).each(function(t){(s.data_selection_grouped||n.isWithinShape(this,t))&&(n.toggleShape(this,t,e),n.config.data_onclick.call(n.api,t,this))})}}).call(s.data_selection_draggable&&n.drag?r.behavior.drag().origin(Object).on("drag",function(){n.drag(r.mouse(this))}).on("dragstart",function(){n.dragstart(r.mouse(this))}).on("dragend",function(){n.dragend()}):function(){})},l.generateEventRectsForMultipleXs=function(t){function n(){r.svg.select("."+V.eventRect).style("cursor",null),r.hideXGridFocus(),r.hideTooltip(),r.unexpandCircles(),r.unexpandBars()}var r=this,s=r.d3,o=r.config;t.append("rect").attr("x",0).attr("y",0).attr("width",r.width).attr("height",r.height).attr("class",V.eventRect).on("mouseout",function(){r.config&&(r.hasArcType()||n())}).on("mousemove",function(){var t,e,i,a=r.filterTargetsToShow(r.data.targets);if(!r.dragging&&!r.hasArcType(a)){if(t=s.mouse(this),e=r.findClosestFromTargets(a,t),!r.mouseover||e&&e.id===r.mouseover.id||(o.data_onmouseout.call(r.api,r.mouseover),r.mouseover=void 0),!e)return void n();i=(r.isScatterType(e)||!o.tooltip_grouped?[e]:r.filterByX(a,e.x)).map(function(t){return r.addName(t)}),r.showTooltip(i,this),o.point_focus_expand_enabled&&r.expandCircles(e.index,e.id,!0),r.expandBars(e.index,e.id,!0),r.showXGridFocus(i),(r.isBarType(e.id)||r.dist(e,t)<100)&&(r.svg.select("."+V.eventRect).style("cursor","pointer"),r.mouseover||(o.data_onmouseover.call(r.api,e),r.mouseover=e))}}).on("click",function(){var t,e,i=r.filterTargetsToShow(r.data.targets);r.hasArcType(i)||(t=s.mouse(this),(e=r.findClosestFromTargets(i,t))&&(r.isBarType(e.id)||r.dist(e,t)<100)&&r.main.selectAll("."+V.shapes+r.getTargetSelectorSuffix(e.id)).selectAll("."+V.shape+"-"+e.index).each(function(){(o.data_selection_grouped||r.isWithinShape(this,e))&&(r.toggleShape(this,e,e.index),r.config.data_onclick.call(r.api,e,this))}))}).call(o.data_selection_draggable&&r.drag?s.behavior.drag().origin(Object).on("drag",function(){r.drag(s.mouse(this))}).on("dragstart",function(){r.dragstart(s.mouse(this))}).on("dragend",function(){r.dragend()}):function(){})},l.dispatchEvent=function(t,e,i){var a="."+V.eventRect+(this.isMultipleX()?"":"-"+e),n=this.main.select(a).node(),r=n.getBoundingClientRect(),s=r.left+(i?i[0]:0),o=r.top+(i?i[1]:0),c=document.createEvent("MouseEvents");c.initMouseEvent(t,!0,!0,d,0,s,o,s,o,!1,!1,!1,!1,0,null),n.dispatchEvent(c)},l.getCurrentWidth=function(){var t=this.config;return t.size_width?t.size_width:this.getParentWidth()},l.getCurrentHeight=function(){var t=this.config,e=t.size_height?t.size_height:this.getParentHeight();return 0<e?e:320/(this.hasType("gauge")?2:1)},l.getCurrentPaddingTop=function(){var t=this.config;return S(t.padding_top)?t.padding_top:0},l.getCurrentPaddingBottom=function(){var t=this.config;return S(t.padding_bottom)?t.padding_bottom:0},l.getCurrentPaddingLeft=function(t){var e=this.config;return S(e.padding_left)?e.padding_left:e.axis_rotated?e.axis_x_show?Math.max(s(this.getAxisWidthByAxisId("x",t)),40):1:!e.axis_y_show||e.axis_y_inner?this.axis.getYAxisLabelPosition().isOuter?30:1:s(this.getAxisWidthByAxisId("y",t))}
vendor: 2,145 bytes, line 18
18,l.getCurrentPaddingRight=function(){var t=this,e=t.config,i=t.isLegendRight?t.getLegendWidth()+20:0;return S(e.padding_right)?e.padding_right+1:e.axis_rotated?10+i:!e.axis_y2_show||e.axis_y2_inner?2+i+(t.axis.getY2AxisLabelPosition().isOuter?20:0):s(t.getAxisWidthByAxisId("y2"))+i},l.getParentRectValue=function(e){for(var i,a=this.selectChart.node();a&&"BODY"!==a.tagName;){try{i=a.getBoundingClientRect()[e]}catch(t){"width"===e&&(i=a.offsetWidth)}if(i)break;a=a.parentNode}return i},l.getParentWidth=function(){return this.getParentRectValue("width")},l.getParentHeight=function(){var t=this.selectChart.style("height");return 0<t.indexOf("px")?+t.replace("px",""):0},l.getSvgLeft=function(t){var e=this,i=e.config,a=i.axis_rotated||!i.axis_rotated&&!i.axis_y_inner,n=i.axis_rotated?V.axisX:V.axisY,r=e.main.select("."+n).node(),s=r&&a?r.getBoundingClientRect():{right:0},o=e.selectChart.node().getBoundingClientRect(),c=e.hasArcType(),d=s.right-o.left-(c?0:e.getCurrentPaddingLeft(t));return 0<d?d:0},l.getAxisWidthByAxisId=function(t,e){var i=this.axis.getLabelPositionById(t);return this.axis.getMaxTickWidth(t,e)+(i.isInner?20:40)},l.getHorizontalAxisHeight=function(t){var e=this,i=e.config,a=30;return"x"!==t||i.axis_x_show?"x"===t&&i.axis_x_height?i.axis_x_height:"y"!==t||i.axis_y_show?"y2"!==t||i.axis_y2_show?("x"===t&&!i.axis_rotated&&i.axis_x_tick_rotate&&(a=30+e.axis.getMaxTickWidth(t)*Math.cos(Math.PI*(90-i.axis_x_tick_rotate)/180)),a+(e.axis.getLabelPositionById(t).isInner?0:10)+("y2"===t?-10:0)):e.rotated_padding_top:!i.legend_show||e.isLegendRight||e.isLegendInset?1:10:8},l.getEventRectWidth=function(){return Math.max(0,this.xAxis.tickInterval())},l.getShapeIndices=function(t){var e,i,a=this.config,n={},r=0;return this.filterTargetsToShow(this.data.targets.filter(t,this)).forEach(function(t){for(e=0;e<a.data_groups.length;e++)if(!(a.data_groups[e].indexOf(t.id)<0))for(i=0;i<a.data_groups[e].length;i++)if(a.data_groups[e][i]in n){n[t.id]=n[a.data_groups[e][i]];break}b(n[t.id])&&(n[t.id]=r++)}),n.__max__=r-1,n},l.getShapeX=function(i,a,n,t){var r=t?this.subX:this.x;return function(t){var e=t.id in n?n[t.id]:0;
18return t.x||0===t.x?r(t.x)-i*(a/2-e):0}},l.getShapeY=function(e){var i=this;return function(t){return(e?i.getSubYScale(t.id):i.getYScale(t.id))(t.value)}},l.getShapeOffset=function(t,o,e){var c=this,d=c.orderTargets(c.filterTargetsToShow(c.data.targets.filter(t,c))),l=d.map(function(t){return t.id});return function(i,a){var n=e?c.getSubYScale(i.id):c.getYScale(i.id),r=n(0),s=r;return d.forEach(function(t){var e=c.isStepType(i)?c.convertValuesToStep(t.values):t.values;t.id!==i.id&&o[t.id]===o[i.id]&&l.indexOf(t.id)<l.indexOf(i.id)&&0<=e[a].value*i.value&&(s+=n(e[a].value)-r)}),s}},l.isWithinShape=function(t,e){var i,a=this,n=a.d3.select(t);return a.isTargetToShow(e.id)?"circle"===t.nodeName?i=a.isStepType(e)?a.isWithinStep(t,a.getYScale(e.id)(e.value)):a.isWithinCircle(t,1.5*a.pointSelectR(e)):"path"===t.nodeName&&(i=!n.classed(V.bar)||a.isWithinBar(t)):i=!1,i},l.getInterpolate=function(t){return this.isSplineType(t)?"cardinal":this.isStepType(t)?this.config.line_step_type:"linear"},l.initLine=function(){this.main.select("."+V.chart).append("g").attr("class",V.chartLines)},l.updateTargetsForLine=function(t){var e,i=this,a=i.config,n=i.classChartLine.bind(i),r=i.classLines.bind(i),s=i.classAreas.bind(i),o=i.classCircles.bind(i),c=i.classFocus.bind(i);(e=i.main.select("."+V.chartLines).selectAll("."+V.chartLine).data(t).attr("class",function(t){return n(t)+c(t)}).enter().append("g").attr("class",n).style("opacity",0).style("pointer-events","none")).append("g").attr("class",r),e.append("g").attr("class",s),e.append("g").attr("class",function(t){return i.generateClass(V.selectedCircles,t.id)}),e.append("g").attr("class",o).style("cursor",function(t){return a.data_selection_isselectable(t)?"pointer":null}),t.forEach(function(e){i.main.selectAll("."+V.selectedCircles+i.getTargetSelectorSuffix(e.id)).selectAll("."+V.selectedCircle).each(function(t){t.value=e.values[t.index].value})})},l.updateLine=function(t){var e=this;e.mainLine=e.main.selectAll("."+V.lines).selectAll("."+V.line).data(e.lineData.bind(e)),e.mainLine.enter().append("path").attr("class",e.classLine.bind(e)).style("stroke",e.color),e.mainLine.style("opacity",e.initialOpacity.bind(e)).style("shape-rendering",function(t){return e.isStepType(t)?"crispEdges":""}).attr("transform",null),e.mainLine.exit().transition().duration(t).style("opacity",0).remove()},l.redrawLine=function(t,e){return[(e?this.mainLine.transition():this.mainLine).attr("d",t).style("stroke",this.color).style("opacity",1)]},l.generateDrawLine=function(t,s){var o=this,c=o.config,d=o.d3.svg.line(),i=o.generateGetLinePoints(t,s),l=s?o.getSubYScale:o.getYScale,e=function(t){return(s?o.subxx:o.xx).call(o,t)},a=function(t,e){return 0<c.data_groups.length?i(t,e)[0][1]:l.call(o,t.id)(t.value)};return d=c.axis_rotated?d.x(a).y(e):d.x(e).y(a),c.line_connectNull||(d=d.defined(function(t){return null!=t.value})),function(t){var e=c.line_connectNull?o.filterRemoveNull(t.values):t.values,i=s?o.x:o.subX,a=l.call(o,t.id),n=0,r=0;return(o.isLineType(t)?c.data_regions[t.id]?o.lineWithRegions(e,i,a,c.data_regions[t.id]):(o.isStepType(t)&&(e=o.convertValuesToStep(e)),d.interpolate(o.getInterpolate(t))(e)):(e[0]&&(n=i(e[0].x),r=a(e[0].value)),c.axis_rotated?"M "+r+" "+n:"M "+n+" "+r))||"M 0 0"}},l.generateGetLinePoints=function(t,e){var s=this,o=s.config,i=t.__max__+1,c=s.getShapeX(0,i,t,!!e),d=s.getShapeY(!!e),l=s.getShapeOffset(s.isLineType,t,!!e),u=e?s.getSubYScale:s.getYScale;return function(t,e){var i=u.call(s,t.id)(0),a=l(t,e)||i,n=c(t),r=d(t);return o.axis_rotated&&(0<t.value&&r<i||t.value<0&&i<r)&&(r=i),[[n,r-(i-a)],[n,r-(i-a)],[n,r-(i-a)],[n,r-(i-a)]]}},l.lineWithRegions=function(t,c,d,e){function i(t,e){var i;for(i=0;i<e.length;i++)if(e[i].start<t&&t<=e[i].end)return!0;return!1}function l(t){return"M"+t[0][0]+" "+t[0][1]+" "+t[1][0]+" "+t[1][1]}var a,n,r,s,u,o,g,h,f,x,p,_=this,m=_.config,y="M",v=_.isCategorized()?.5:0,T=[];if(k(e))for(a=0;a<e.length;a++)T[a]={},T[a].start=b(e[a].start)?t[0].x:_.isTimeSeries()?_.parseDate(e[a].start):e[a].start,T[a].end=b(e[a].end)?t[t.length-1].x:_.isTimeSeries()?_.parseDate(e[a].end):e[a].end;for(x=m.axis_rotated?function(t){return d(t.value)}:function(t){return c(t.x)},p=m.axis_rotated?function(t){return c(t.x)}:function(t){return d(t.value)}
18,r=_.isTimeSeries()?function(t,e,i,a){var n=t.x.getTime(),r=e.x-t.x,s=new Date(n+r*i),o=new Date(n+r*(i+a));return l(m.axis_rotated?[[d(u(i)),c(s)],[d(u(i+a)),c(o)]]:[[c(s),d(u(i))],[c(o),d(u(i+a))]])}:function(t,e,i,a){return l(m.axis_rotated?[[d(u(i),!0),c(s(i))],[d(u(i+a),!0),c(s(i+a))]]:[[c(s(i),!0),d(u(i))],[c(s(i+a),!0),d(u(i+a))]])},a=0;a<t.length;a++){if(b(T)||!i(t[a].x,T))y+=" "+x(t[a])+" "+p(t[a]);else for(s=_.getScale(t[a-1].x+v,t[a].x+v,_.isTimeSeries()),u=_.getScale(t[a-1].value,t[a].value),o=c(t[a].x)-c(t[a-1].x),g=d(t[a].value)-d(t[a-1].value),f=2*(h=2/Math.sqrt(Math.pow(o,2)+Math.pow(g,2))),n=h;n<=1;n+=f)y+=r(t[a-1],t[a],n,h);t[a].x}return y},l.updateArea=function(t){var e=this,i=e.d3;e.mainArea=e.main.selectAll("."+V.areas).selectAll("."+V.area).data(e.lineData.bind(e)),e.mainArea.enter().append("path").attr("class",e.classArea.bind(e)).style("fill",e.color).style("opacity",function(){return e.orgAreaOpacity=+i.select(this).style("opacity"),0}),e.mainArea.style("opacity",e.orgAreaOpacity),e.mainArea.exit().transition().duration(t).style("opacity",0).remove()},l.redrawArea=function(t,e){return[(e?this.mainArea.transition():this.mainArea).attr("d",t).style("fill",this.color).style("opacity",this.orgAreaOpacity)]},l.generateDrawArea=function(t,e){var n=this,r=n.config,s=n.d3.svg.area(),i=n.generateGetAreaPoints(t,e),a=e?n.getSubYScale:n.getYScale,o=function(t){return(e?n.subxx:n.xx).call(n,t)},c=function(t,e){return 0<r.data_groups.length?i(t,e)[0][1]:a.call(n,t.id)(n.getAreaBaseValue(t.id))},d=function(t,e){return 0<r.data_groups.length?i(t,e)[1][1]:a.call(n,t.id)(t.value)};return s=r.axis_rotated?s.x0(c).x1(d).y(o):s.x(o).y0(c).y1(d),r.line_connectNull||(s=s.defined(function(t){return null!==t.value})),function(t){var e=r.line_connectNull?n.filterRemoveNull(t.values):t.values,i=0,a=0;return(n.isAreaType(t)?(n.isStepType(t)&&(e=n.convertValuesToStep(e)),s.interpolate(n.getInterpolate(t))(e)):(e[0]&&(i=n.x(e[0].x),a=n.getYScale(t.id)(e[0].value)),r.axis_rotated?"M "+a+" "+i:"M "+i+" "+a))||"M 0 0"}},l.getAreaBaseValue=function(){return 0},l.generateGetAreaPoints=function(t,e){var s=this,o=s.config,i=t.__max__+1,c=s.getShapeX(0,i,t,!!e),d=s.getShapeY(!!e),l=s.getShapeOffset(s.isAreaType,t,!!e),u=e?s.getSubYScale:s.getYScale;return function(t,e){var i=u.call(s,t.id)(0),a=l(t,e)||i,n=c(t),r=d(t);return o.axis_rotated&&(0<t.value&&r<i||t.value<0&&i<r)&&(r=i),[[n,a],[n,r-(i-a)],[n,r-(i-a)],[n,a]]}},l.updateCircle=function(){var t=this;t.mainCircle=t.main.selectAll("."+V.circles).selectAll("."+V.circle).data(t.lineOrScatterData.bind(t)),t.mainCircle.enter().append("circle").attr("class",t.classCircle.bind(t)).attr("r",t.pointR.bind(t)).style("fill",t.color),t.mainCircle.style("opacity",t.initialOpacityForCircle.bind(t)),t.mainCircle.exit().remove()},l.redrawCircle=function(t,e,i){var a=this.main.selectAll("."+V.selectedCircle);return[(i?this.mainCircle.transition():this.mainCircle).style("opacity",this.opacityForCircle.bind(this)).style("fill",this.color).attr("cx",t).attr("cy",e),(i?a.transition():a).attr("cx",t).attr("cy",e)]}
18,l.circleX=function(t){return t.x||0===t.x?this.x(t.x):null},l.updateCircleY=function(){var t,i,e=this;0<e.config.data_groups.length?(t=e.getShapeIndices(e.isLineType),i=e.generateGetLinePoints(t),e.circleY=function(t,e){return i(t,e)[0][1]}):e.circleY=function(t){return e.getYScale(t.id)(t.value)}},l.getCircles=function(t,e){return(e?this.main.selectAll("."+V.circles+this.getTargetSelectorSuffix(e)):this.main).selectAll("."+V.circle+(S(t)?"-"+t:""))},l.expandCircles=function(t,e,i){var a=this.pointExpandedR.bind(this);i&&this.unexpandCircles(),this.getCircles(t,e).classed(V.EXPANDED,!0).attr("r",a)},l.unexpandCircles=function(t){var e=this,i=e.pointR.bind(e);e.getCircles(t).filter(function(){return e.d3.select(this).classed(V.EXPANDED)}).classed(V.EXPANDED,!1).attr("r",i)},l.pointR=function(t){var e=this.config;return this.isStepType(t)?0:g(e.point_r)?e.point_r(t):e.point_r},l.pointExpandedR=function(t){var e=this.config;return e.point_focus_expand_enabled?e.point_focus_expand_r?e.point_focus_expand_r:1.75*this.pointR(t):this.pointR(t)},l.pointSelectR=function(t){var e=this.config;return e.point_select_r?e.point_select_r:4*this.pointR(t)},l.isWithinCircle=function(t,e){var i=this.d3,a=i.mouse(t),n=i.select(t),r=+n.attr("cx"),s=+n.attr("cy");return Math.sqrt(Math.pow(r-a[0],2)+Math.pow(s-a[1],2))<e},l.isWithinStep=function(t,e){return Math.abs(e-this.d3.mouse(t)[1])<30},l.initBar=function(){this.main.select("."+V.chart).append("g").attr("class",V.chartBars)},l.updateTargetsForBar=function(t){var e=this,i=e.config,a=e.classChartBar.bind(e),n=e.classBars.bind(e),r=e.classFocus.bind(e);e.main.select("."+V.chartBars).selectAll("."+V.chartBar).data(t).attr("class",function(t){return a(t)+r(t)}).enter().append("g").attr("class",a).style("opacity",0).style("pointer-events","none").append("g").attr("class",n).style("cursor",function(t){return i.data_selection_isselectable(t)?"pointer":null})},l.updateBar=function(t){var e=this,i=e.barData.bind(e),a=e.classBar.bind(e),n=e.initialOpacity.bind(e),r=function(t){return e.color(t.id)};e.mainBar=e.main.selectAll("."+V.bars).selectAll("."+V.bar).data(i),e.mainBar.enter().append("path").attr("class",a).style("stroke",r).style("fill",r),e.mainBar.style("opacity",n),e.mainBar.exit().transition().duration(t).style("opacity",0).remove()},l.redrawBar=function(t,e){return[(e?this.mainBar.transition():this.mainBar).attr("d",t).style("fill",this.color).style("opacity",1)]},l.getBarW=function(t,e){var i=this.config,a="number"==typeof i.bar_width?i.bar_width:e?t.tickInterval()*i.bar_width_ratio/e:0;return i.bar_width_max&&a>i.bar_width_max?i.bar_width_max:a},l.getBars=function(t,e){return(e?this.main.selectAll("."+V.bars+this.getTargetSelectorSuffix(e)):this.main).selectAll("."+V.bar+(S(t)?"-"+t:""))},l.expandBars=function(t,e,i){i&&this.unexpandBars(),this.getBars(t,e).classed(V.EXPANDED,!0)},l.unexpandBars=function(t){this.getBars(t).classed(V.EXPANDED,!1)},l.generateDrawBar=function(t,e){var r=this.config,s=this.generateGetBarPoints(t,e);return function(t,e){var i=s(t,e),a=r.axis_rotated?1:0,n=r.axis_rotated?0:1;return"M "+i[0][a]+","+i[0][n]+" L"+i[1][a]+","+i[1][n]+" L"+i[2][a]+","+i[2][n]+" L"+i[3][a]+","+i[3][n]+" z"}},l.generateGetBarPoints=function(t,e){var s=this,i=e?s.subXAxis:s.xAxis,a=t.__max__+1,o=s.getBarW(i,a),c=s.getShapeX(o,a,t,!!e),d=s.getShapeY(!!e),l=s.getShapeOffset(s.isBarType,t,!!e),u=e?s.getSubYScale:s.getYScale;return function(t,e){var i=u.call(s,t.id)(0),a=l(t,e)||i,n=c(t),r=d(t);return s.config.axis_rotated&&(0<t.value&&r<i||t.value<0&&i<r)&&(r=i),[[n,a],[n,r-(i-a)],[n+o,r-(i-a)],[n+o,a]]}},l.isWithinBar=function(t){var e=this.d3.mouse(t),i=t.getBoundingClientRect(),a=t.pathSegList.getItem(0),n=t.pathSegList.getItem(1),r=Math.min(a.x,n.x),s=Math.min(a.y,n.y),o=r+i.width+2,c=s+i.height+2,d=s-2;return r-2<e[0]&&e[0]<o&&d<e[1]&&e[1]<c},l.initText=function(){this.main.select("."+V.chart).append("g").attr("class",V.chartTexts),this.mainText=this.d3.selectAll([])},l.updateTargetsForText=function(t){var e=this,i=e.classChartText.bind(e),a=e.classTexts.bind(e),n=e.classFocus.bind(e);e.main.select("."+V.chartTexts).selectAll("."+V.chartText).data(t).attr("class",function(t){return i(t)+n(t)}).enter().append("g").attr("class",i).style("opacity",0).style("pointer-events","none").append("g").attr("class",a)},l.updateText=function(t){var a=this,e=a.config,i=a.barOrLineData.bind(a),n=a.classText.bind(a);a.mainText=a.main.selectAll("."+V.texts).selectAll("."+V.text).data(i),a.mainText.enter().append("text").attr("class",n).attr("text-anchor",function(t){return e.axis_rotated?t.value<0?"end":"start":"middle"}).style("stroke","none").style("fill",function(t){return a.color(t)}
18).style("fill-opacity",0),a.mainText.text(function(t,e,i){return a.dataLabelFormat(t.id)(t.value,t.id,e,i)}),a.mainText.exit().transition().duration(t).style("fill-opacity",0).remove()},l.redrawText=function(t,e,i,a){return[(a?this.mainText.transition():this.mainText).attr("x",t).attr("y",e).style("fill",this.color).style("fill-opacity",i?0:this.opacityForText.bind(this))]},l.getTextRect=function(t,e){var i,a=this.d3.select("body").append("div").classed("c3",!0);return a.append("svg").style("visibility","hidden").style("position","fixed").style("top",0).style("left",0).selectAll(".dummy").data([t]).enter().append("text").classed(e||"",!0).text(t).each(function(){i=this.getBoundingClientRect()}),a.remove(),i},l.generateXYForText=function(t,e,i,a){var n=this,r=n.generateGetAreaPoints(t,!1),s=n.generateGetBarPoints(e,!1),o=n.generateGetLinePoints(i,!1),c=a?n.getXForText:n.getYForText;return function(t,e){var i=n.isAreaType(t)?r:n.isBarType(t)?s:o;return c.call(n,i(t,e),t,this)}},l.getXForText=function(t,e,i){var a,n,r=this,s=i.getBoundingClientRect();return a=r.config.axis_rotated?(n=r.isBarType(e)?4:6,t[2][1]+n*(e.value<0?-1:1)):r.hasType("bar")?(t[2][0]+t[0][0])/2:t[0][0],null===e.value&&(a>r.width?a=r.width-s.width:a<0&&(a=4)),a},l.getYForText=function(t,e,i){var a,n=this,r=i.getBoundingClientRect();return n.config.axis_rotated?a=(t[0][0]+t[2][0]+.6*r.height)/2:(a=t[2][1],e.value<0?(a+=r.height,n.isBarType(e)&&n.isSafari()?a-=3:!n.isBarType(e)&&n.isChrome()&&(a+=3)):a+=n.isBarType(e)?-3:-6),null!==e.value||n.config.axis_rotated||(a<r.height?a=r.height:a>this.height&&(a=this.height-4)),a},l.setTargetType=function(t,e){var i=this,a=i.config;i.mapToTargetIds(t).forEach(function(t){i.withoutFadeIn[t]=e===a.data_types[t],a.data_types[t]=e}),t||(a.data_type=e)},l.hasType=function(i,t){var a=this.config.data_types,n=!1;return(t=t||this.data.targets)&&t.length?t.forEach(function(t){var e=a[t.id];(e&&0<=e.indexOf(i)||!e&&"line"===i)&&(n=!0)}):Object.keys(a).length?Object.keys(a).forEach(function(t){a[t]===i&&(n=!0)}):n=this.config.data_type===i,n},l.hasArcType=function(t){return this.hasType("pie",t)||this.hasType("donut",t)||this.hasType("gauge",t)},l.isLineType=function(t){var e=this.config,i=r(t)?t:t.id;return!e.data_types[i]||0<=["line","spline","area","area-spline","step","area-step"].indexOf(e.data_types[i])},l.isStepType=function(t){var e=r(t)?t:t.id;return 0<=["step","area-step"].indexOf(this.config.data_types[e])},l.isSplineType=function(t){var e=r(t)?t:t.id;return 0<=["spline","area-spline"].indexOf(this.config.data_types[e])},l.isAreaType=function(t){var e=r(t)?t:t.id;return 0<=["area","area-spline","area-step"].indexOf(this.config.data_types[e])},l.isBarType=function(t){var e=r(t)?t:t.id;return"bar"===this.config.data_types[e]},l.isScatterType=function(t){var e=r(t)?t:t.id;return"scatter"===this.config.data_types[e]},l.isPieType=function(t){var e=r(t)?t:t.id;return"pie"===this.config.data_types[e]},l.isGaugeType=function(t){var e=r(t)?t:t.id;return"gauge"===this.config.data_types[e]},l.isDonutType=function(t){var e=r(t)?t:t.id;return"donut"===this.config.data_types[e]},l.isArcType=function(t){return this.isPieType(t)||this.isDonutType(t)||this.isGaugeType(t)},l.lineData=function(t){return this.isLineType(t)?[t]:[]},l.arcData=function(t){return this.isArcType(t.data)?[t]:[]},l.barData=function(t){return this.isBarType(t)?t.values:[]},l.lineOrScatterData=function(t){return this.isLineType(t)||this.isScatterType(t)?t.values:[]},l.barOrLineData=function(t){return this.isBarType(t)||this.isLineType(t)?t.values:[]},l.initGrid=function(){var t=this,e=t.config,i=t.d3;t.grid=t.main.append("g").attr("clip-path",t.clipPathForGrid).attr("class",V.grid),e.grid_x_show&&t.grid.append("g").attr("class",V.xgrids),e.grid_y_show&&t.grid.append("g").attr("class",V.ygrids),e.grid_focus_show&&t.grid.append("g").attr("class",V.xgridFocus).append("line").attr("class",V.xgridFocus),t.xgrid=i.selectAll([]),e.grid_lines_front||t.initGridLines()},l.initGridLines=function(){var t=this,e=t.d3;t.gridLines=t.main.append("g").attr("clip-path",t.clipPathForGrid).attr("class",V.grid+" "+V.gridLines),t.gridLines.append("g").attr("class",V.xgridLines),t.gridLines.append("g").attr("class",V.ygridLines),t.xgridLines=e.selectAll([])},l.updateXGrid=function(t){var e=this,i=e.config,a=e.d3,n=e.generateGridData(i.grid_x_type,e.x),r=e.isCategorized()?e.xAxis.tickOffset():0;e.xgridAttr=i.axis_rotated?{x1:0,x2:e.width,y1:function(t){return e.x(t)-r},y2:function(t){return e.x(t)-r}}:{x1:function(t){return e.x(t)+r},x2:function(t){return e.x(t)+r},y1:0,y2:e.height},e.xgrid=e.main.select("."+V.xgrids).selectAll("."+V.xgrid).data(n),e.xgrid.enter().append("line").attr("class",V.xgrid),t||e.xgrid.attr(e.xgridAttr).style("opacity",function(){return+a.select(this).attr(i.axis_rotated?"y1":"x1")===(i.axis_rotated?e.height:0)?0:1}
vendor: 5,196 bytes, line 18
18),e.xgrid.exit().remove()},l.updateYGrid=function(){var t=this,e=t.config,i=t.yAxis.tickValues()||t.y.ticks(e.grid_y_ticks);t.ygrid=t.main.select("."+V.ygrids).selectAll("."+V.ygrid).data(i),t.ygrid.enter().append("line").attr("class",V.ygrid),t.ygrid.attr("x1",e.axis_rotated?t.y:0).attr("x2",e.axis_rotated?t.y:t.width).attr("y1",e.axis_rotated?0:t.y).attr("y2",e.axis_rotated?t.height:t.y),t.ygrid.exit().remove(),t.smoothLines(t.ygrid,"grid")},l.gridTextAnchor=function(t){return t.position?t.position:"end"},l.gridTextDx=function(t){return"start"===t.position?4:"middle"===t.position?0:-4},l.xGridTextX=function(t){return"start"===t.position?-this.height:"middle"===t.position?-this.height/2:0},l.yGridTextX=function(t){return"start"===t.position?0:"middle"===t.position?this.width/2:this.width},l.updateGrid=function(t){var e,i,a,n=this,r=n.main,s=n.config;n.grid.style("visibility",n.hasArcType()?"hidden":"visible"),r.select("line."+V.xgridFocus).style("visibility","hidden"),s.grid_x_show&&n.updateXGrid(),n.xgridLines=r.select("."+V.xgridLines).selectAll("."+V.xgridLine).data(s.grid_x_lines),(e=n.xgridLines.enter().append("g").attr("class",function(t){return V.xgridLine+(t.class?" "+t.class:"")})).append("line").style("opacity",0),e.append("text").attr("text-anchor",n.gridTextAnchor).attr("transform",s.axis_rotated?"":"rotate(-90)").attr("dx",n.gridTextDx).attr("dy",-5).style("opacity",0),n.xgridLines.exit().transition().duration(t).style("opacity",0).remove(),s.grid_y_show&&n.updateYGrid(),n.ygridLines=r.select("."+V.ygridLines).selectAll("."+V.ygridLine).data(s.grid_y_lines),(i=n.ygridLines.enter().append("g").attr("class",function(t){return V.ygridLine+(t.class?" "+t.class:"")})).append("line").style("opacity",0),i.append("text").attr("text-anchor",n.gridTextAnchor).attr("transform",s.axis_rotated?"rotate(-90)":"").attr("dx",n.gridTextDx).attr("dy",-5).style("opacity",0),a=n.yv.bind(n),n.ygridLines.select("line").transition().duration(t).attr("x1",s.axis_rotated?a:0).attr("x2",s.axis_rotated?a:n.width).attr("y1",s.axis_rotated?0:a).attr("y2",s.axis_rotated?n.height:a).style("opacity",1),n.ygridLines.select("text").transition().duration(t).attr("x",s.axis_rotated?n.xGridTextX.bind(n):n.yGridTextX.bind(n)).attr("y",a).text(function(t){return t.text}).style("opacity",1),n.ygridLines.exit().transition().duration(t).style("opacity",0).remove()},l.redrawGrid=function(t){var e=this,i=e.config,a=e.xv.bind(e),n=e.xgridLines.select("line"),r=e.xgridLines.select("text");return[(t?n.transition():n).attr("x1",i.axis_rotated?0:a).attr("x2",i.axis_rotated?e.width:a).attr("y1",i.axis_rotated?a:0).attr("y2",i.axis_rotated?a:e.height).style("opacity",1),(t?r.transition():r).attr("x",i.axis_rotated?e.yGridTextX.bind(e):e.xGridTextX.bind(e)).attr("y",a).text(function(t){return t.text}).style("opacity",1)]},l.showXGridFocus=function(t){var e=this,i=e.config,a=t.filter(function(t){return t&&S(t.value)}),n=e.main.selectAll("line."+V.xgridFocus),r=e.xx.bind(e);i.tooltip_show&&(e.hasType("scatter")||e.hasArcType()||(n.style("visibility","visible").data([a[0]]).attr(i.axis_rotated?"y1":"x1",r).attr(i.axis_rotated?"y2":"x2",r),e.smoothLines(n,"grid")))},l.hideXGridFocus=function(){this.main.select("line."+V.xgridFocus).style("visibility","hidden")},l.updateXgridFocus=function(){var t=this.config;this.main.select("line."+V.xgridFocus).attr("x1",t.axis_rotated?0:-10).attr("x2",t.axis_rotated?this.width:-10).attr("y1",t.axis_rotated?-10:0).attr("y2",t.axis_rotated?-10:this.height)},l.generateGridData=function(t,e){var i,a,n,r,s=[],o=this.main.select("."+V.axisX).selectAll(".tick").size();if("year"===t)for(a=(i=this.getXDomain())[0].getFullYear(),n=i[1].getFullYear(),r=a;r<=n;r++)s.push(new Date(r+"-01-01 00:00:00"));else(s=e.ticks(10)).length>o&&(s=s.filter(function(t){return(""+t).indexOf(".")<0}));return s},l.getGridFilterToRemove=function(t){return t?function(e){var i=!1;return[].concat(t).forEach(function(t){("value"in t&&e.value===t.value||"class"in t&&e.class===t.class)&&(i=!0)}),i}:function(){return!0}},l.removeGridLines=function(t,e){var i=this.config,a=this.getGridFilterToRemove(t),n=function(t){return!a(t)},r=e?V.xgridLines:V.ygridLines,s=e?V.xgridLine:V.ygridLine;this.main.select("."+r).selectAll("."+s).filter(a).transition().duration(i.transition_duration).style("opacity",0).remove(),e?i.grid_x_lines=i.grid_x_lines.filter(n):i.grid_y_lines=i.grid_y_lines.filter(n)},l.initTooltip=function(){var t,e=this,i=e.config;if(e.tooltip=e.selectChart.style("position","relative").append("div").attr("class",V.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none"),i.tooltip_init_show){if(e.isTimeSeries()&&r(i.tooltip_init_x)){for(i.tooltip_init_x=e.parseDate(i.tooltip_init_x),t=0;t<e.data.targets[0].values.length&&e.data.targets[0].values[t].x-i.tooltip_init_x!=0;t++);i.tooltip_init_x=t}e.tooltip.html(i.tooltip_contents.call(e,e.data.targets.map(function(t){return e.addName(t.values[i.tooltip_init_x])}),e.axis.getXAxisTickFormat(),e.getYFormat(e.hasArcType()),e.color)),e.tooltip.style("top",i.tooltip_init_position.top).style("left",i.tooltip_init_position.left).style("display","block")}}
18,l.getTooltipContent=function(t,e,i,a){var n,r,s,o,c,d,l=this.config,u=l.tooltip_format_title||e,g=l.tooltip_format_name||function(t){return t},h=l.tooltip_format_value||i;for(r=0;r<t.length;r++)t[r]&&(t[r].value||0===t[r].value)&&(n||(s=u?u(t[r].x):t[r].x,n="<table class='"+V.tooltip+"'>"+(s||0===s?"<tr><th colspan='2'>"+s+"</th></tr>":"")),void 0!==(o=h(t[r].value,t[r].ratio,t[r].id,t[r].index))&&(c=g(t[r].name,t[r].ratio,t[r].id,t[r].index),d=this.levelColor?this.levelColor(t[r].value):a(t[r].id),n+="<tr class='"+V.tooltipName+"-"+t[r].id+"'>",n+="<td class='name'><span style='background-color:"+d+"'></span>"+c+"</td>",n+="<td class='value'>"+o+"</td>",n+="</tr>"));return n+"</table>"},l.tooltipPosition=function(t,e,i,a){var n,r,s,o,c,d=this,l=d.config,u=d.d3,g=d.hasArcType(),h=u.mouse(a);return g?(r=(d.width-(d.isLegendRight?d.getLegendWidth():0))/2+h[0],o=d.height/2+h[1]+20):(n=d.getSvgLeft(!0),o=l.axis_rotated?(s=(r=n+h[0]+100)+e,c=d.currentWidth-d.getCurrentPaddingRight(),d.x(t[0].x)+20):(s=(r=n+d.getCurrentPaddingLeft(!0)+d.x(t[0].x)+20)+e,c=n+d.currentWidth-d.getCurrentPaddingRight(),h[1]+15),c<s&&(r-=s-c+20),o+i>d.currentHeight&&(o-=i+30)),o<0&&(o=0),{top:o,left:r}},l.showTooltip=function(t,e){var i,a,n,r=this,s=r.config,o=r.hasArcType(),c=t.filter(function(t){return t&&S(t.value)}),d=s.tooltip_position||l.tooltipPosition;0!==c.length&&s.tooltip_show&&(r.tooltip.html(s.tooltip_contents.call(r,t,r.axis.getXAxisTickFormat(),r.getYFormat(o),r.color)).style("display","block"),i=r.tooltip.property("offsetWidth"),a=r.tooltip.property("offsetHeight"),n=d.call(this,c,i,a,e),r.tooltip.style("top",n.top+"px").style("left",n.left+"px"))},l.hideTooltip=function(){this.tooltip.style("display","none")},l.initLegend=function(){var t=this;return t.legendItemTextBox={},t.legendHasRendered=!1,t.legend=t.svg.append("g").attr("transform",t.getTranslate("legend")),t.config.legend_show?void t.updateLegendWithDefaults():(t.legend.style("visibility","hidden"),void(t.hiddenLegendIds=t.mapToIds(t.data.targets)))},l.updateLegendWithDefaults=function(){this.updateLegend(this.mapToIds(this.data.targets),{withTransform:!1,withTransitionForTransform:!1,withTransition:!1})},l.updateSizeForLegend=function(t,e){var i=this,a=i.config,n={top:i.isLegendTop?i.getCurrentPaddingTop()+a.legend_inset_y+5.5:i.currentHeight-t-i.getCurrentPaddingBottom()-a.legend_inset_y,left:i.isLegendLeft?i.getCurrentPaddingLeft()+a.legend_inset_x+.5:i.currentWidth-e-i.getCurrentPaddingRight()-a.legend_inset_x+.5};i.margin3={top:i.isLegendRight?0:i.isLegendInset?n.top:i.currentHeight-t,right:NaN,bottom:0,left:i.isLegendRight?i.currentWidth-e:i.isLegendInset?n.left:0}},l.transformLegend=function(t){(t?this.legend.transition():this.legend).attr("transform",this.getTranslate("legend"))},l.updateLegendStep=function(t){this.legendStep=t},l.updateLegendItemWidth=function(t){this.legendItemWidth=t},l.updateLegendItemHeight=function(t){this.legendItemHeight=t},l.getLegendWidth=function(){var t=this;return t.config.legend_show?t.isLegendRight||t.isLegendInset?t.legendItemWidth*(t.legendStep+1):t.currentWidth:0},l.getLegendHeight=function(){var t=this,e=0;return t.config.legend_show&&(e=t.isLegendRight?t.currentHeight:Math.max(20,t.legendItemHeight)*(t.legendStep+1)),e},l.opacityForLegend=function(t){return t.classed(V.legendItemHidden)?null:1},l.opacityForUnfocusedLegend=function(t){return t.classed(V.legendItemHidden)?null:.3},l.toggleFocusLegend=function(e,t){var i=this;e=i.mapToTargetIds(e),i.legend.selectAll("."+V.legendItem).filter(function(t){return 0<=e.indexOf(t)}).classed(V.legendItemFocused,t).transition().duration(100).style("opacity",function(){return(t?i.opacityForLegend:i.opacityForUnfocusedLegend).call(i,i.d3.select(this))})},l.revertLegend=function(){var t=this,e=t.d3;t.legend.selectAll("."+V.legendItem).classed(V.legendItemFocused,!1).transition().duration(100).style("opacity",function(){return t.opacityForLegend(e.select(this))})},l.showLegend=function(t){var e=this,i=e.config;i.legend_show||(i.legend_show=!0,e.legend.style("visibility","visible"),e.legendHasRendered||e.updateLegendWithDefaults()),e.removeHiddenLegendIds(t),e.legend.selectAll(e.selectorLegends(t)).style("visibility","visible").transition().style("opacity",function(){return e.opacityForLegend(e.d3.select(this))})},l.hideLegend=function(t){var e=this,i=e.config;i.legend_show&&h(t)&&(i.legend_show=!1,e.legend.style("visibility","hidden")),e.addHiddenLegendIds(t),e.legend.selectAll(e.selectorLegends(t)).style("opacity",0).style("visibility","hidden")},l.clearLegendItemTextBoxCache=function(){this.legendItemTextBox={}},l.updateLegend=function(h,t,e){function i(t,e,i){function a(t,e){e||(n=(g-L-u)/2)<A&&(n=(g-u)/2,L=0,I++),F[t]=I,X[I]=_.isLegendInset?10:n,S[t]=L,L+=u}var n,r,s=0===i,o=i===h.length-1,c=function(t,e){return _.legendItemTextBox[e]||(_.legendItemTextBox[e]=_.getTextRect
18(t.textContent,V.legendItem)),_.legendItemTextBox[e]}(t,e),d=c.width+w+(!o||_.isLegendRight||_.isLegendInset?v:0),l=c.height+y,u=_.isLegendRight||_.isLegendInset?l:d,g=_.isLegendRight||_.isLegendInset?_.getLegendHeight():_.getLegendWidth();return s&&(b=T=I=L=0),m.legend_show&&!_.isLegendToShow(e)?void(C[e]=D[e]=F[e]=S[e]=0):(C[e]=d,D[e]=l,(!T||T<=d)&&(T=d),(!b||b<=l)&&(b=l),r=_.isLegendRight||_.isLegendInset?b:T,void(m.legend_equally?(Object.keys(C).forEach(function(t){C[t]=T}),Object.keys(D).forEach(function(t){D[t]=b}),(n=(g-r*h.length)/2)<A?(I=L=0,h.forEach(function(t){a(t)})):a(e,!0)):a(e)))}var a,n,r,s,o,c,d,l,u,g,f,x,p,_=this,m=_.config,y=4,v=10,T=0,b=0,A=10,w=15,L=0,S={},C={},D={},X=[0],F={},I=0;l=W(t=t||{},"withTransition",!0),u=W(t,"withTransitionForTransform",!0),_.isLegendInset&&(I=m.legend_inset_step?m.legend_inset_step:h.length,_.updateLegendStep(I)),s=_.isLegendRight?(a=function(t){return T*F[t]},function(t){return X[F[t]]+S[t]}):_.isLegendInset?(a=function(t){return T*F[t]+10},function(t){return X[F[t]]+S[t]}):(a=function(t){return X[F[t]]+S[t]},function(t){return b*F[t]}),n=function(t,e){return a(t,e)+14},o=function(t,e){return s(t,e)+9},r=function(t,e){return a(t,e)},c=function(t,e){return s(t,e)-5},(d=_.legend.selectAll("."+V.legendItem).data(h).enter().append("g").attr("class",function(t){return _.generateClass(V.legendItem,t)}).style("visibility",function(t){return _.isLegendToShow(t)?"visible":"hidden"}).style("cursor","pointer").on("click",function(t){m.legend_item_onclick?m.legend_item_onclick.call(_,t):_.d3.event.altKey?(_.api.hide(),_.api.show(t)):(_.api.toggle(t),_.isTargetToShow(t)?_.api.focus(t):_.api.revert())}).on("mouseover",function(t){_.d3.select(this).classed(V.legendItemFocused,!0),!_.transiting&&_.isTargetToShow(t)&&_.api.focus(t),m.legend_item_onmouseover&&m.legend_item_onmouseover.call(_,t)}).on("mouseout",function(t){_.d3.select(this).classed(V.legendItemFocused,!1),_.api.revert(),m.legend_item_onmouseout&&m.legend_item_onmouseout.call(_,t)})).append("text").text(function(t){return k(m.data_names[t])?m.data_names[t]:t}).each(function(t,e){i(this,t,e)}).style("pointer-events","none").attr("x",_.isLegendRight||_.isLegendInset?n:-200).attr("y",_.isLegendRight||_.isLegendInset?-200:o),d.append("rect").attr("class",V.legendItemEvent).style("fill-opacity",0).attr("x",_.isLegendRight||_.isLegendInset?r:-200).attr("y",_.isLegendRight||_.isLegendInset?-200:c),d.append("rect").attr("class",V.legendItemTile).style("pointer-events","none").style("fill",_.color).attr("x",_.isLegendRight||_.isLegendInset?n:-200).attr("y",_.isLegendRight||_.isLegendInset?-200:s).attr("width",10).attr("height",10),p=_.legend.select("."+V.legendBackground+" rect"),_.isLegendInset&&0<T&&0===p.size()&&(p=_.legend.insert("g","."+V.legendItem).attr("class",V.legendBackground).append("rect")),g=_.legend.selectAll("text").data(h).text(function(t){return k(m.data_names[t])?m.data_names[t]:t}).each(function(t,e){i(this,t,e)}),(l?g.transition():g).attr("x",n).attr("y",o),f=_.legend.selectAll("rect."+V.legendItemEvent).data(h),(l?f.transition():f).attr("width",function(t){return C[t]}).attr("height",function(t){return D[t]}).attr("x",r).attr("y",c),x=_.legend.selectAll("rect."+V.legendItemTile).data(h),(l?x.transition():x).style("fill",_.color).attr("x",a).attr("y",s),p&&(l?p.transition():p).attr("height",_.getLegendHeight()-12).attr("width",T*(I+1)+10),_.legend.selectAll("."+V.legendItem).classed(V.legendItemHidden,function(t){return!_.isTargetToShow(t)}),_.updateLegendItemWidth(T),_.updateLegendItemHeight(b),_.updateLegendStep(I),_.updateSizes(),_.updateScales(),_.updateSvgSize(),_.transformAll(u,e),_.legendHasRendered=!0},function(t,e){if(Object.create)e.prototype=Object.create(t.prototype);else{var i=function(){};i.prototype=t.prototype,e.prototype=new i}e.prototype.constructor=e}(e,o),o.prototype.init=function(){var t=this.owner,e=t.config,i=t.main;t.axes.x=i.append("g").attr("class",V.axis+" "+V.axisX).attr("clip-path",t.clipPathForXAxis).attr("transform",t.getTranslate("x")).style("visibility",e.axis_x_show?"visible":"hidden"),t.axes.x.append("text").attr("class",V.axisXLabel).attr("transform",e.axis_rotated?"rotate(-90)":"").style("text-anchor",this.textAnchorForXAxisLabel.bind(this)),t.axes.y=i.append("g").attr("class",V.axis+" "+V.axisY).attr("clip-path",e.axis_y_inner?"":t.clipPathForYAxis).attr("transform",t.getTranslate("y")).style("visibility",e.axis_y_show?"visible":"hidden"),t.axes.y.append("text").attr("class",V.axisYLabel).attr("transform",e.axis_rotated?"":"rotate(-90)").style("text-anchor",this.textAnchorForYAxisLabel.bind(this)),t.axes.y2=i.append("g").attr("class",V.axis+" "+V.axisY2).attr("transform",t.getTranslate("y2")).style("visibility",e.axis_y2_show?"visible":"hidden"),t.axes.y2.append("text").attr("class",V.axisY2Label).attr("transform",e.axis_rotated?"":"rotate(-90)").style("text-anchor",this.textAnchorForY2AxisLabel.bind(this))}
vendor: 2,972 bytes, line 18
18,o.prototype.getXAxis=function(t,e,i,a,n,r,s){var o=this.owner,c=o.config,d={isCategory:o.isCategorized(),withOuterTick:n,tickMultiline:c.axis_x_tick_multiline,tickWidth:c.axis_x_tick_width,tickTextRotate:s?0:c.axis_x_tick_rotate,withoutTransition:r},l=u(o.d3,d).scale(t).orient(e);return o.isTimeSeries()&&a&&(a=a.map(function(t){return o.parseDate(t)})),l.tickFormat(i).tickValues(a),o.isCategorized()&&(l.tickCentered(c.axis_x_tick_centered),h(c.axis_x_tick_culling)&&(c.axis_x_tick_culling=!1)),l},o.prototype.updateXAxisTickValues=function(t,e){var i,a=this.owner,n=a.config;return(n.axis_x_tick_fit||n.axis_x_tick_count)&&(i=this.generateTickValues(a.mapTargetsToUniqueXs(t),n.axis_x_tick_count,a.isTimeSeries())),e?e.tickValues(i):(a.xAxis.tickValues(i),a.subXAxis.tickValues(i)),i},o.prototype.getYAxis=function(t,e,i,a,n,r){var s={withOuterTick:n,withoutTransition:r},o=this.owner,c=o.d3,d=o.config,l=u(c,s).scale(t).orient(e).tickFormat(i);return o.isTimeSeriesY()?l.ticks(c.time[d.axis_y_tick_time_value],d.axis_y_tick_time_interval):l.tickValues(a),l},o.prototype.getId=function(t){var e=this.owner.config;return t in e.data_axes?e.data_axes[t]:"y"},o.prototype.getXAxisTickFormat=function(){var e=this.owner,i=e.config,a=e.isTimeSeries()?e.defaultAxisTimeFormat:e.isCategorized()?e.categoryName:function(t){return t<0?t.toFixed(0):t};return i.axis_x_tick_format&&(g(i.axis_x_tick_format)?a=i.axis_x_tick_format:e.isTimeSeries()&&(a=function(t){return t?e.axisTimeFormat(i.axis_x_tick_format)(t):""})),g(a)?function(t){return a.call(e,t)}:a},o.prototype.getTickValues=function(t,e){return t||(e?e.tickValues():void 0)},o.prototype.getXAxisTickValues=function(){return this.getTickValues(this.owner.config.axis_x_tick_values,this.owner.xAxis)},o.prototype.getYAxisTickValues=function(){return this.getTickValues(this.owner.config.axis_y_tick_values,this.owner.yAxis)},o.prototype.getY2AxisTickValues=function(){return this.getTickValues(this.owner.config.axis_y2_tick_values,this.owner.y2Axis)},o.prototype.getLabelOptionByAxisId=function(t){var e,i=this.owner.config;return"y"===t?e=i.axis_y_label:"y2"===t?e=i.axis_y2_label:"x"===t&&(e=i.axis_x_label),e},o.prototype.getLabelText=function(t){var e=this.getLabelOptionByAxisId(t);return r(e)?e:e?e.text:null},o.prototype.setLabelText=function(t,e){var i=this.owner.config,a=this.getLabelOptionByAxisId(t);r(a)?"y"===t?i.axis_y_label=e:"y2"===t?i.axis_y2_label=e:"x"===t&&(i.axis_x_label=e):a&&(a.text=e)},o.prototype.getLabelPosition=function(t,e){var i=this.getLabelOptionByAxisId(t),a=i&&"object"==typeof i&&i.position?i.position:e;return{isInner:0<=a.indexOf("inner"),isOuter:0<=a.indexOf("outer"),isLeft:0<=a.indexOf("left"),isCenter:0<=a.indexOf("center"),isRight:0<=a.indexOf("right"),isTop:0<=a.indexOf("top"),isMiddle:0<=a.indexOf("middle"),isBottom:0<=a.indexOf("bottom")}},o.prototype.getXAxisLabelPosition=function(){return this.getLabelPosition("x",this.owner.config.axis_rotated?"inner-top":"inner
18-right")},o.prototype.getYAxisLabelPosition=function(){return this.getLabelPosition("y",this.owner.config.axis_rotated?"inner-right":"inner-top")},o.prototype.getY2AxisLabelPosition=function(){return this.getLabelPosition("y2",this.owner.config.axis_rotated?"inner-right":"inner-top")},o.prototype.getLabelPositionById=function(t){return"y2"===t?this.getY2AxisLabelPosition():"y"===t?this.getYAxisLabelPosition():this.getXAxisLabelPosition()},o.prototype.textForXAxisLabel=function(){return this.getLabelText("x")},o.prototype.textForYAxisLabel=function(){return this.getLabelText("y")},o.prototype.textForY2AxisLabel=function(){return this.getLabelText("y2")},o.prototype.xForAxisLabel=function(t,e){var i=this.owner;return t?e.isLeft?0:e.isCenter?i.width/2:i.width:e.isBottom?-i.height:e.isMiddle?-i.height/2:0},o.prototype.dxForAxisLabel=function(t,e){return t?e.isLeft?"0.5em":e.isRight?"-0.5em":"0":e.isTop?"-0.5em":e.isBottom?"0.5em":"0"},o.prototype.textAnchorForAxisLabel=function(t,e){return t?e.isLeft?"start":e.isCenter?"middle":"end":e.isBottom?"start":e.isMiddle?"middle":"end"},o.prototype.xForXAxisLabel=function(){return this.xForAxisLabel(!this.owner.config.axis_rotated,this.getXAxisLabelPosition())},o.prototype.xForYAxisLabel=function(){return this.xForAxisLabel(this.owner.config.axis_rotated,this.getYAxisLabelPosition())},o.prototype.xForY2AxisLabel=function(){return this.xForAxisLabel(this.owner.config.axis_rotated,this.getY2AxisLabelPosition())},o.prototype.dxForXAxisLabel=function(){return this.dxForAxisLabel(!this.owner.config.axis_rotated,this.getXAxisLabelPosition())},o.prototype.dxForYAxisLabel=function(){return this.dxForAxisLabel(this.owner.config.axis_rotated,this.getYAxisLabelPosition())},o.prototype.dxForY2AxisLabel=function(){return this.dxForAxisLabel(this.owner.config.axis_rotated,this.getY2AxisLabelPosition())},o.prototype.dyForXAxisLabel=function(){var t=this.owner.config,e=this.getXAxisLabelPosition();return t.axis_rotated?e.isInner?"1.2em":-25-this.getMaxTickWidth("x"):e.isInner?"-0.5em":t.axis_x_height?t.axis_x_height-10:"3em"},o.prototype.dyForYAxisLabel=function(){var t=this.owner,e=this.getYAxisLabelPosition();return t.config.axis_rotated?e.isInner?"-0.5em":"3em":e.isInner?"1.2em":-10-(t.config.axis_y_inner?0:this.getMaxTickWidth("y")+10)},o.prototype.dyForY2AxisLabel=function(){var t=this.owner,e=this.getY2AxisLabelPosition();return t.config.axis_rotated?e.isInner?"1.2em":"-2.2em":e.isInner?"-0.5em":15+(t.config.axis_y2_inner?0:this.getMaxTickWidth("y2")+15)},o.prototype.textAnchorForXAxisLabel=function(){var t=this.owner;return this.textAnchorForAxisLabel(!t.config.axis_rotated,this.getXAxisLabelPosition())},o.prototype.textAnchorForYAxisLabel=function(){var t=this.owner;return this.textAnchorForAxisLabel(t.config.axis_rotated,this.getYAxisLabelPosition())},o.prototype.textAnchorForY2AxisLabel=function(){var t=this.owner;return this.textAnchorForAxisLabel(t.config.axis_rotated,this.getY2AxisLabelPosition())},o.prototype.getMaxTickWidth=function(t,e){var i,a,n,r,s=this.owner,o=s.config,c=0;return e&&s.currentMaxTickWidths[t]||(s.svg&&(i=s.filterTargetsToShow(s.data.targets),"y"===t?(a=s.y.copy().domain(s.getYDomain(i,"y")),n=this.getYAxis(a,s.yOrient,o.axis_y_tick_format,s.yAxisTickValues,!1,!0)):"y2"===t?(a=s.y2.copy().domain(s.getYDomain(i,"y2")),n=this.getYAxis(a,s.y2Orient,o.axis_y2_tick_format,s.y2AxisTickValues,!1,!0)):(a=s.x.copy().domain(s.getXDomain(i)),n=this.getXAxis(a,s.xOrient,s.xAxisTickFormat,s.xAxisTickValues,!1,!0,!0),this.updateXAxisTickValues(i,n)),(r=s.d3.select("body").append("div").classed("c3",!0)).append("svg").style("visibility","hidden").style("position","fixed").style("top",0).style("left",0).append("g").call(n).each(function(){s.d3.select(this).selectAll("text").each(function(){var t=this.getBoundingClientRect();c<t.width&&(c=t.width)}),r.remove()})),s.currentMaxTickWidths[t]=c<=0?s.currentMaxTickWidths[t]:c),s.currentMaxTickWidths[t]},o.prototype.updateLabels=function(t){var e=this.owner,i=e.main.select("."+V.axisX+" ."+V.axisXLabel),a=e.main.select("."+V.axisY+" ."+V.axisYLabel),n=e.main.select("."+V.axisY2+" ."+V.axisY2Label);(t?i.transition():i).attr("x",this.xForXAxisLabel.bind(this)).attr("dx",this.dxForXAxisLabel.bind(this)).attr("dy",this.dyForXAxisLabel.bind(this)).text(this.textForXAxisLabel.bind(this)),(t?a.transition():a).attr("x",this.xForYAxisLabel.bind(this)).attr("dx",this.dxForYAxisLabel.bind(this)).attr("dy",this.dyForYAxisLabel.bind(this)).text(this.textForYAxisLabel.bind(this)),(t?n.transition():n).attr("x",this.xForY2AxisLabel.bind(this)).attr("dx",this.dxForY2AxisLabel.bind(this)).attr("dy",this.dyForY2AxisLabel.bind(this)).text(this.textForY2AxisLabel.bind(this))}
18,o.prototype.getPadding=function(t,e,i,a){return S(t[e])?"ratio"===t.unit?t[e]*a:this.convertPixelsToAxisPadding(t[e],a):i},o.prototype.convertPixelsToAxisPadding=function(t,e){var i=this.owner;return e*(t/(i.config.axis_rotated?i.width:i.height))},o.prototype.generateTickValues=function(t,e,i){var a,n,r,s,o,c,d,l=t;if(e)if(1===(a=g(e)?e():e))l=[t[0]];else if(2===a)l=[t[0],t[t.length-1]];else if(2<a){for(s=a-2,n=t[0],o=((r=t[t.length-1])-n)/(1+s),l=[n],c=0;c<s;c++)d=+n+o*(c+1),l.push(i?new Date(d):d);l.push(r)}return i||(l=l.sort(function(t,e){return t-e})),l},o.prototype.generateTransitions=function(t){var e=this.owner.axes;return{axisX:t?e.x.transition().duration(t):e.x,axisY:t?e.y.transition().duration(t):e.y,axisY2:t?e.y2.transition().duration(t):e.y2,axisSubX:t?e.subx.transition().duration(t):e.subx}},o.prototype.redraw=function(t,e){var i=this.owner;i.axes.x.style("opacity",e?0:1),i.axes.y.style("opacity",e?0:1),i.axes.y2.style("opacity",e?0:1),i.axes.subx.style("opacity",e?0:1),t.axisX.call(i.xAxis),t.axisY.call(i.yAxis),t.axisY2.call(i.y2Axis),t.axisSubX.call(i.subXAxis)},l.getClipPath=function(t){return"url("+(0<=d.navigator.appVersion.toLowerCase().indexOf("msie 9.")?"":document.URL.split("#")[0])+"#"+t+")"},l.appendClip=function(t,e){return t.append("clipPath").attr("id",e).append("rect")},l.getAxisClipX=function(t){var e=Math.max(30,this.margin.left);return t?-(1+e):-(e-1)},l.getAxisClipY=function(t){return t?-20:-this.margin.top},l.getXAxisClipX=function(){return this.getAxisClipX(!this.config.axis_rotated)},l.getXAxisClipY=function(){return this.getAxisClipY(!this.config.axis_rotated)},l.getYAxisClipX=function(){return this.config.axis_y_inner?-1:this.getAxisClipX(this.config.axis_rotated)},l.getYAxisClipY=function(){return this.getAxisClipY(this.config.axis_rotated)},l.getAxisClipWidth=function(t){var e=Math.max(30,this.margin.left),i=Math.max(30,this.margin.right);return t?this.width+2+e+i:this.margin.left+20},l.getAxisClipHeight=function(t){return(t?this.margin.bottom:this.margin.top+this.height)+20},l.getXAxisClipWidth=function(){return this.getAxisClipWidth(!this.config.axis_rotated)},l.getXAxisClipHeight=function(){return this.getAxisClipHeight(!this.config.axis_rotated)},l.getYAxisClipWidth=function(){return this.getAxisClipWidth(this.config.axis_rotated)+(this.config.axis_y_inner?20:0)},l.getYAxisClipHeight=function(){return this.getAxisClipHeight(this.config.axis_rotated)},l.initPie=function(){var t=this.d3,e=this.config;this.pie=t.layout.pie().value(function(t){return t.values.reduce(function(t,e){return t+e.value},0)}
18),e.data_order||this.pie.sort(null)},l.updateRadius=function(){var t=this,e=t.config,i=e.gauge_width||e.donut_width;t.radiusExpanded=Math.min(t.arcWidth,t.arcHeight)/2,t.radius=.95*t.radiusExpanded,t.innerRadiusRatio=i?(t.radius-i)/t.radius:.6,t.innerRadius=t.hasType("donut")||t.hasType("gauge")?t.radius*t.innerRadiusRatio:0},l.updateArc=function(){var t=this;t.svgArc=t.getSvgArc(),t.svgArcExpanded=t.getSvgArcExpanded(),t.svgArcExpandedSub=t.getSvgArcExpanded(.98)},l.updateAngle=function(e){var t,i,a=this,n=a.config,r=!1,s=0,o=n.gauge_min,c=n.gauge_max;return a.pie(a.filterTargetsToShow(a.data.targets)).forEach(function(t){r||t.data.id!==e.data.id||(r=!0,(e=t).index=s),s++}),isNaN(e.startAngle)&&(e.startAngle=0),isNaN(e.endAngle)&&(e.endAngle=e.startAngle),a.isGaugeType(e.data)&&(t=Math.PI/(c-o),i=e.value<o?0:e.value<c?e.value-o:c-o,e.startAngle=Math.PI/2*-1,e.endAngle=e.startAngle+t*i),r?e:null},l.getSvgArc=function(){var a=this,n=a.d3.svg.arc().outerRadius(a.radius).innerRadius(a.innerRadius),t=function(t,e){var i;return e?n(t):(i=a.updateAngle(t))?n(i):"M 0 0"};return t.centroid=n.centroid,t},l.getSvgArcExpanded=function(t){var i=this,a=i.d3.svg.arc().outerRadius(i.radiusExpanded*(t||1)).innerRadius(i.innerRadius);return function(t){var e=i.updateAngle(t);return e?a(e):"M 0 0"}},l.getArc=function(t,e,i){return i||this.isArcType(t.data)?this.svgArc(t,e):"M 0 0"},l.transformForArcLabel=function(t){var e,i,a,n,r,s=this,o=s.updateAngle(t),c="";return o&&!s.hasType("gauge")&&(e=this.svgArc.centroid(o),i=isNaN(e[0])?0:e[0],a=isNaN(e[1])?0:e[1],n=Math.sqrt(i*i+a*a),c="translate("+i*(r=s.radius&&n?(.375<36/s.radius?1.175-36/s.radius:.8)*s.radius/n:0)+","+a*r+")"),c},l.getArcRatio=function(t){var e=this.hasType("gauge")?Math.PI:2*Math.PI;return t?(t.endAngle-t.startAngle)/e:null},l.convertToArcData=function(t){return this.addName({id:t.data.id,value:t.value,ratio:this.getArcRatio(t),index:t.index})},l.textForArcLabel=function(t){var e,i,a,n,r,s=this;return s.shouldShowArcLabel()?(i=(e=s.updateAngle(t))?e.value:null,a=s.getArcRatio(e),n=t.data.id,s.hasType("gauge")||s.meetsArcLabelThreshold(a)?(r=s.getArcLabelFormat())?r(i,a,n):s.defaultArcValueFormat(i,a):""):""},l.expandArc=function(t){var e,i=this;return i.transiting?void(e=d.setInterval(function(){i.transiting||(d.clearInterval(e),0<i.legend.selectAll(".c3-legend-item-focused").size()&&i.expandArc(t))},10)):(t=i.mapToTargetIds(t),void i.svg.selectAll(i.selectorTargets(t,"."+V.chartArc)).each(function(t){i.shouldExpand(t.data.id)&&i.d3.select(this).selectAll("path").transition().duration(50).attr("d",i.svgArcExpanded).transition().duration(100).attr("d",i.svgArcExpandedSub).each(function(t){i.isDonutType(t.data)})}))},l.unexpandArc=function(t){var e=this;e.transiting||(t=e.mapToTargetIds(t),e.svg.selectAll(e.selectorTargets(t,"."+V.chartArc)).selectAll("path").transition().duration(50).attr("d",e.svgArc),e.svg.selectAll("."+V.arc).style("opacity",1))},l.shouldExpand=function(t){var e=this.config;return this.isDonutType(t)&&e.donut_expand||this.isGaugeType(t)&&e.gauge_expand||this.isPieType(t)&&e.pie_expand},l.shouldShowArcLabel=function(){var t=this.config,e=!0;return this.hasType("donut")?e=t.donut_label_show:this.hasType("pie")&&(e=t.pie_label_show),e},l.meetsArcLabelThreshold=function(t){var e=this.config;return(this.hasType("donut")?e.donut_label_threshold:e.pie_label_threshold)<=t},l.getArcLabelFormat=function(){var t=this.config,e=t.pie_label_format;return this.hasType("gauge")?e=t.gauge_label_format:this.hasType("donut")&&(e=t.donut_label_format),e},l.getArcTitle=function(){return this.hasType("donut")?this.config.donut_title:""},l.updateTargetsForArc=function(t){var e,i=this,a=i.main,n=i.classChartArc.bind(i),r=i.classArcs.bind(i),s=i.classFocus.bind(i);(e=a.select("."+V.chartArcs).selectAll("."+V.chartArc).data(i.pie(t)).attr("class",function(t){return n(t)+s(t.data)}).enter().append("g").attr("class",n)).append("g").attr("class",r),e.append("text").attr("dy",i.hasType("gauge")?"-.1em":".35em").style("opacity",0).style("text-anchor","middle").style("pointer-events","none")},l.initArc=function(){var t=this;t.arcs=t.main.select("."+V.chart).append("g").attr("class",V.chartArcs).attr("transform",t.getTranslate("arc")),t.arcs.append("text").attr("class",V.chartArcsTitle).style("text-anchor","middle").text(t.getArcTitle())}
18,l.redrawArc=function(t,e,i){var a,n=this,r=n.d3,s=n.config,o=n.main;(a=o.selectAll("."+V.arcs).selectAll("."+V.arc).data(n.arcData.bind(n))).enter().append("path").attr("class",n.classArc.bind(n)).style("fill",function(t){return n.color(t.data)}).style("cursor",function(t){return s.interaction_enabled&&s.data_selection_isselectable(t)?"pointer":null}).style("opacity",0).each(function(t){n.isGaugeType(t.data)&&(t.startAngle=t.endAngle=Math.PI/2*-1),this._current=t}),a.attr("transform",function(t){return!n.isGaugeType(t.data)&&i?"scale(0)":""}).style("opacity",function(t){return t===this._current?0:1}).on("mouseover",s.interaction_enabled?function(t){var e,i;n.transiting||(e=n.updateAngle(t),i=n.convertToArcData(e),n.expandArc(e.data.id),n.api.focus(e.data.id),n.toggleFocusLegend(e.data.id,!0),n.config.data_onmouseover(i,this))}:null).on("mousemove",s.interaction_enabled?function(t){var e=n.updateAngle(t),i=[n.convertToArcData(e)];n.showTooltip(i,this)}:null).on("mouseout",s.interaction_enabled?function(t){var e,i;n.transiting||(e=n.updateAngle(t),i=n.convertToArcData(e),n.unexpandArc(e.data.id),n.api.revert(),n.revertLegend(),n.hideTooltip(),n.config.data_onmouseout(i,this))}:null).on("click",s.interaction_enabled?function(t,e){var i=n.updateAngle(t),a=n.convertToArcData(i);n.toggleShape&&n.toggleShape(this,a,e),n.config.data_onclick.call(n.api,a,this)}:null).each(function(){n.transiting=!0}).transition().duration(t).attrTween("d",function(i){var a,t=n.updateAngle(i);return t?(isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle),a=r.interpolate(this._current,t),this._current=a(0),function(t){var e=a(t);return e.data=i.data,n.getArc(e,!0)}):function(){return"M 0 0"}}).attr("transform",i?"scale(1)":"").style("fill",function(t){return n.levelColor?n.levelColor(t.data.values[0].value):n.color(t.data.id)}).style("opacity",1).call(n.endall,function(){n.transiting=!1}),a.exit().transition().duration(e).style("opacity",0).remove(),o.selectAll("."+V.chartArc).select("text").style("opacity",0).attr("class",function(t){return n.isGaugeType(t.data)?V.gaugeValue:""}).text(n.textForArcLabel.bind(n)).attr("transform",n.transformForArcLabel.bind(n)).style("font-size",function(t){return n.isGaugeType(t.data)?Math.round(n.radius/5)+"px":""}).transition().duration(t).style("opacity",function(t){return n.isTargetToShow(t.data.id)&&n.isArcType(t.data)?1:0}),o.select("."+V.chartArcsTitle).style("opacity",n.hasType("donut")||n.hasType("gauge")?1:0),n.hasType("gauge")&&(n.arcs.select("."+V.chartArcsBackground).attr("d",function(){var t={data:[{value:s.gauge_max}],startAngle:Math.PI/2*-1,endAngle:Math.PI/2};return n.getArc(t,!0,!0)}),n.arcs.select("."+V.chartArcsGaugeUnit).attr("dy",".75em").text(s.gauge_label_show?s.gauge_units:""),n.arcs.select("."+V.chartArcsGaugeMin).attr("dx",-1*(n.innerRadius+(n.radius-n.innerRadius)/2)+"px").attr("dy","1.2em").text(s.gauge_label_show?s.gauge_min:""),n.arcs.select("."+V.chartArcsGaugeMax).attr("dx",n.innerRadius+(n.radius-n.innerRadius)/2+"px").attr("dy","1.2em").text(s.gauge_label_show?s.gauge_max:""))},l.initGauge=function(){var t=this.arcs;this.hasType("gauge")&&(t.append("path").attr("class",V.chartArcsBackground),t.append("text").attr("class",V.chartArcsGaugeUnit).style("text-anchor","middle").style("pointer-events","none"),t.append("text").attr("class",V.chartArcsGaugeMin).style("text-anchor","middle").style("pointer-events","none"),t.append("text").attr("class",V.chartArcsGaugeMax).style("text-anchor","middle").style("pointer-events","none"))},l.getGaugeLabelHeight=function(){return this.config.gauge_label_show?20:0},l.initRegion=function(){this.region=this.main.append("g").attr("clip-path",this.clipPath).attr("class",V.regions)},l.updateRegion=function(t){var e=this,i=e.config;e.region.style("visibility",e.hasArcType()?"hidden":"visible"),e.mainRegion=e.main.select("."+V.regions).selectAll("."+V.region).data(i.regions),e.mainReg
18ion.enter().append("g").attr("class",e.classRegion.bind(e)).append("rect").style("fill-opacity",0),e.mainRegion.exit().transition().duration(t).style("opacity",0).remove()},l.redrawRegion=function(t){var e=this,i=e.mainRegion.selectAll("rect"),a=e.regionX.bind(e),n=e.regionY.bind(e),r=e.regionWidth.bind(e),s=e.regionHeight.bind(e);return[(t?i.transition():i).attr("x",a).attr("y",n).attr("width",r).attr("height",s).style("fill-opacity",function(t){return S(t.opacity)?t.opacity:.1})]},l.regionX=function(t){var e=this,i=e.config,a="y"===t.axis?e.y:e.y2;return"y"===t.axis||"y2"===t.axis?i.axis_rotated&&"start"in t?a(t.start):0:i.axis_rotated?0:"start"in t?e.x(e.isTimeSeries()?e.parseDate(t.start):t.start):0},l.regionY=function(t){var e=this,i=e.config,a="y"===t.axis?e.y:e.y2;return"y"===t.axis||"y2"===t.axis?i.axis_rotated?0:"end"in t?a(t.end):0:i.axis_rotated&&"start"in t?e.x(e.isTimeSeries()?e.parseDate(t.start):t.start):0},l.regionWidth=function(t){var e,i=this,a=i.config,n=i.regionX(t),r="y"===t.axis?i.y:i.y2;return(e="y"===t.axis||"y2"===t.axis?a.axis_rotated&&"end"in t?r(t.end):i.width:a.axis_rotated?i.width:"end"in t?i.x(i.isTimeSeries()?i.parseDate(t.end):t.end):i.width)<n?0:e-n},l.regionHeight=function(t){var e,i=this,a=i.config,n=this.regionY(t),r="y"===t.axis?i.y:i.y2;return(e="y"===t.axis||"y2"===t.axis?a.axis_rotated?i.height:"start"in t?r(t.start):i.height:a.axis_rotated&&"end"in t?i.x(i.isTimeSeries()?i.parseDate(t.end):t.end):i.height)<n?0:e-n},l.isRegionOnX=function(t){return!t.axis||"x"===t.axis},l.drag=function(t){var e,i,a,n,g,h,f,x,p=this,r=p.config,s=p.main,_=p.d3;p.hasArcType()||r.data_selection_enabled&&(!r.zoom_enabled||p.zoom.altDomain)&&r.data_selection_multiple&&(e=p.dragStart[0],i=p.dragStart[1],a=t[0],n=t[1],g=Math.min(e,a),h=Math.max(e,a),f=r.data_selection_grouped?p.margin.top:Math.min(i,n),x=r.data_selection_grouped?p.height:Math.max(i,n),s.select("."+V.dragarea).attr("x",g).attr("y",f).attr("width",h-g).attr("height",x-f),s.selectAll("."+V.shapes).selectAll("."+V.shape).filter(function(t){return r.data_selection_isselectable(t)}).each(function(t,e){var i,a,n,r,s,o,c=_.select(this),d=c.classed(V.SELECTED),l=c.classed(V.INCLUDED),u=!1;if(c.classed(V.circle))i=1*c.attr("cx"),a=1*c.attr("cy"),s=p.togglePoint,u=g<i&&i<h&&f<a&&a<x;else{if(!c.classed(V.bar))return;i=(o=m(this)).x,a=o.y,n=o.width,r=o.height,s=p.togglePath,u=!(h<i||i+n<g||x<a||a+r<f)}u^l&&(c.classed(V.INCLUDED,!l),c.classed(V.SELECTED,!d),s.call(p,!d,c,t,e))}))},l.dragstart=function(t){var e=this,i=e.config;e.hasArcType()||i.data_selection_enabled&&(e.dragStart=t,e.main.select("."+V.chart).append("rect").attr("class",V.dragarea).style("opacity",.1),e.dragging=!0)},l.dragend=function(){var t=this,e=t.config;t.hasArcType()||e.data_selection_enabled&&(t.main.select("."+V.dragarea).transition().duration(100).style("opacity",0).remove(),t.main.selectAll("."+V.shape).classed(V.INCLUDED,!1),t.dragging=!1)},l.selectPoint=function(t,e,i){var a=this,n=a.config,r=(n.axis_rotated?a.circleY:a.circleX).bind(a),s=(n.axis_rotated?a.circleX:a.circleY).bind(a),o=a.pointSelectR.bind(a);n.data_onselected.call(a.api,e,t.node()),a.main.select("."+V.selectedCircles+a.getTargetSelectorSuffix(e.id)).selectAll("."+V.selectedCircle+"-"+i).data([e]).enter().append("circle").attr("class",function(){return a.generateClass(V.selectedCircle,i)}).attr("cx",r).attr("cy",s).attr("stroke",function(){return a.color(e)}).attr("r",function(t){return 1.4*a.pointSelectR(t)}).transition().duration(100).attr("r",o)},l.unselectPoint=function(t,e,i){this.config.data_onunselected(e,t.node()),this.main.select("."+V.selectedCircles+this.getTargetSelectorSuffix(e.id)).selectAll("."+V.selectedCircle+"-"+i).transition().duration(100).attr("r",0).remove()},l.togglePoint=function(t,e,i,a){t?this.selectPoint(e,i,a):this.unselectPoint(e,i,a)},l.selectPath=function(t,e){var i=this;i.config.data_onselected.call(i,e,t.node()),t.transition().duration(100).style("fill",function(){return i.d3.rgb(i.color(e)).brighter(.75)})},l.unselectPath=function(t,e){var i=this;i.config.data_onunselected.call(i,e,t.node()),t.transition().duration(100).style("fill",function(){return i.color(e)})}
18,l.togglePath=function(t,e,i,a){t?this.selectPath(e,i,a):this.unselectPath(e,i,a)},l.getToggle=function(t,e){var i;return"circle"===t.nodeName?i=this.isStepType(e)?function(){}:this.togglePoint:"path"===t.nodeName&&(i=this.togglePath),i},l.toggleShape=function(t,e,i){var a=this,n=a.d3,r=a.config,s=n.select(t),o=s.classed(V.SELECTED),c=a.getToggle(t,e).bind(a);r.data_selection_enabled&&r.data_selection_isselectable(e)&&(r.data_selection_multiple||a.main.selectAll("."+V.shapes+(r.data_selection_grouped?a.getTargetSelectorSuffix(e.id):"")).selectAll("."+V.shape).each(function(t,e){var i=n.select(this);i.classed(V.SELECTED)&&c(!1,i.classed(V.SELECTED,!1),t,e)}),s.classed(V.SELECTED,!o),c(!o,s,e,i))},l.initBrush=function(){var e=this,t=e.d3;e.brush=t.svg.brush().on("brush",function(){e.redrawForBrush()}),e.brush.update=function(){return e.context&&e.context.select("."+V.brush).call(this),this},e.brush.scale=function(t){return e.config.axis_rotated?this.y(t):this.x(t)}},l.initSubchart=function(){var t=this,e=t.config,i=t.context=t.svg.append("g").attr("transform",t.getTranslate("context"));i.style("visibility",e.subchart_show?"visible":"hidden"),i.append("g").attr("clip-path",t.clipPathForSubchart).attr("class",V.chart),i.select("."+V.chart).append("g").attr("class",V.chartBars),i.select("."+V.chart).append("g").attr("class",V.chartLines),i.append("g").attr("clip-path",t.clipPath).attr("class",V.brush).call(t.brush),t.axes.subx=i.append("g").attr("class",V.axisX).attr("transform",t.getTranslate("subx")).attr("clip-path",e.axis_rotated?"":t.clipPathForXAxis)},l.updateTargetsForSubchart=function(t){var e,i=this,a=i.context,n=i.config,r=i.classChartBar.bind(i),s=i.classBars.bind(i),o=i.classChartLine.bind(i),c=i.classLines.bind(i),d=i.classAreas.bind(i);n.subchart_show&&(a.select("."+V.chartBars).selectAll("."+V.chartBar).data(t).attr("class",r).enter().append("g").style("opacity",0).attr("class",r).append("g").attr("class",s),(e=a.select("."+V.chartLines).selectAll("."+V.chartLine).data(t).attr("class",o).enter().append("g").style("opacity",0).attr("class",o)).append("g").attr("class",c),e.append("g").attr("class",d),a.selectAll("."+V.brush+" rect").attr(n.axis_rotated?"width":"height",n.axis_rotated?i.width2:i.height2))},l.updateBarForSubchart=function(t){var e=this;e.contextBar=e.context.selectAll("."+V.bars).selectAll("."+V.bar).data(e.barData.bind(e)),e.contextBar.enter().append("path").attr("class",e.classBar.bind(e)).style("stroke","none").style("fill",e.color),e.contextBar.style("opacity",e.initialOpacity.bind(e)),e.contextBar.exit().transition().duration(t).style("opacity",0).remove()},l.redrawBarForSubchart=function(t,e,i){(e?this.contextBar.transition().duration(i):this.contextBar).attr("d",t).style("opacity",1)},l.updateLineForSubchart=function(t){var e=this;e.contextLine=e.context.selectAll("."+V.lines).selectAll("."+V.line).data(e.lineData.bind(e)),e.contextLine.enter().append("path").attr("class",e.classLine.bind(e)).style("stroke",e.color),e.contextLine.style("opacity",e.initialOpacity.bind(e)),e.contextLine.exit().transition().duration(t).style("opacity",0).remove()},l.redrawLineForSubchart=function(t,e,i){(e?this.contextLine.transition().duration(i):this.contextLine).attr("d",t).style("opacity",1)},l.updateAreaForSubchart=function(t){var e=this,i=e.d3;e.contextArea=e.context.selectAll("."+V.areas).selectAll("."+V.area).data(e.lineData.bind(e)),e.contextArea.enter().append("path").attr("class",e.classArea.bind(e)).style("fill",e.color).style("opacity",function(){return e.orgAreaOpacity=+i.select(this).style("opacity"),0}),e.contextArea.style("opacity",0),e.contextArea.exit().transition().duration(t).style("opacity",0).remove()},l.redrawAreaForSubchart=function(t,e,i){(e?this.contextArea.transition().duration(i):this.contextArea).attr("d",t).style("fill",this.color).style("opacity",this.orgAreaOpacity)},l.redrawSubchart=function(t,e,i,a,n,r,s){var o,c,d,l=this,u=l.d3,g=l.config;l.context.style("visibility",g.subchart_show?"visible":"hidden"),g.subchart_show&&(u.event&&"zoom"===u.event.type&&l.brush.extent(l.x.orgDomain()).update(),t&&(l.brush.empty()||l.brush.extent(l.x.orgDomain()).update(),o=l.generateDrawArea(n,!0),c=l.generateDrawBar(r,!0),d=l.generateDrawLine(s,!0),l.updateBarForSubchart(i),l.updateLineForSubchart(i),l.updateAreaForSubchart(i),l.redrawBarForSubchart(c,i,i),l.redrawLineForSubchart(d,i,i),l.redrawAreaForSubchart(o,i,i)))},l.redrawForBrush=function(){var t=this,e=t.x;t.redraw({withTransition:!1,withY:t.config.zoom_rescale,withSubchart:!1,withUpdateXDomain:!0,withDimension:!1}),t.config.subchart_onbrush.call(t.api,e.orgDomain())},l.transformContext=function(t,e){var i;e&&e.axisSubX?i=e.axisSubX:(i=this.context.select("."+V.axisX),t&&(i=i.transition())),this.context.attr("transform",this.getTranslate("context")),i.attr("transform",this.getTranslate("subx"))},l.getDefaultExtent=function(){var t=this,e=t.config,i=g(e.axis_x_extent)?e.axis_x_extent(t.getXDomain(t.data.targets)):e.axis_x_extent;return t.isTimeSeries()&&(i=[t.parseDate(i[0]),t.parseDate(i[1])]),i},l.initZoom=function(){var e,i=this,a=i.d3,n=i.config;i.zoom=a.behavior.zoom().on("zoomstart",function(){e=a.event.sourceEvent,i.zoom.altDomain=a.event.sourceEvent.altKey?i.x.orgDomain():null,n.zoom_onzoomstart.call(i.api,a.event.sourceEvent)}).on("zoom",function(){i.redrawForZoom.call(i)}).on("zoomend",function(){var t=a.event.sourceEvent;t&&e.clientX===t.clientX&&e.clientY===t.clientY||(i.redrawEventRect(),i.updateZoom(),n.zoom_onzoomend.call(i.api,i.x.orgDomain()))}),i.zoom.scale=function(t){return n.axis_rotated?this.y(t):this.x(t)},i.zoom.orgScaleExtent=function(){var t=n.zoom_extent?n.zoom_extent:[1,10];return[t[0],Math.max(i.getMaxDataCount()/t[1],t[1])]},i.zoom.updateScaleExtent=function(){var t=R(i.x.orgDomain())/R(i.orgXDomain),e=this.orgScaleExtent();return this.scaleExtent([e[0]*t,e[1]*t]),this}},l.updateZoom=function(){var t=this.config.zoom_enabled?this.zoom:function(){};this.main.select("."+V.zoomRect).call(t).on("dblclick.zoom",null),this.main.selectAll("."+V.eventRect).call(t).on("dblclick.zoom",null)},l.redrawForZoom=function(){var t=this,e=t.d3,i=t.config,a=t.zoom,n=t.x;
18if(i.zoom_enabled&&0!==t.filterTargetsToShow(t.data.targets).length){if("mousemove"===e.event.sourceEvent.type&&a.altDomain)return n.domain(a.altDomain),void a.scale(n).updateScaleExtent();t.isCategorized()&&n.orgDomain()[0]===t.orgXDomain[0]&&n.domain([t.orgXDomain[0]-1e-10,n.orgDomain()[1]]),t.redraw({withTransition:!1,withY:i.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),"mousemove"===e.event.sourceEvent.type&&(t.cancelClick=!0),i.zoom_onzoom.call(t.api,n.orgDomain())}},l.generateColor=function(){var t=this.config,e=this.d3,a=t.data_colors,n=C(t.color_pattern)?t.color_pattern:e.scale.category10().range(),r=t.data_color,s=[];return function(t){var e,i=t.id||t.data&&t.data.id||t;return a[i]instanceof Function?e=a[i](t):a[i]?e=a[i]:(s.indexOf(i)<0&&s.push(i),e=n[s.indexOf(i)%n.length],a[i]=e),r instanceof Function?r(e,t):e}},l.generateLevelColor=function(){var t=this.config,a=t.color_pattern,e=t.color_threshold,n="value"===e.unit,r=e.values&&e.values.length?e.values:[],s=e.max||100;return C(t.color_threshold)?function(t){var e,i=a[a.length-1];for(e=0;e<r.length;e++)if((n?t:100*t/s)<r[e]){i=a[e];break}return i}:null},l.getYFormat=function(t){var a=this,n=t&&!a.hasType("gauge")?a.defaultArcValueFormat:a.yFormat,r=t&&!a.hasType("gauge")?a.defaultArcValueFormat:a.y2Format;return function(t,e,i){return("y2"===a.axis.getId(i)?r:n).call(a,t,e)}},l.yFormat=function(t){var e=this.config;return(e.axis_y_tick_format?e.axis_y_tick_format:this.defaultValueFormat)(t)},l.y2Format=function(t){var e=this.config;return(e.axis_y2_tick_format?e.axis_y2_tick_format:this.defaultValueFormat)(t)},l.defaultValueFormat=function(t){return S(t)?+t:""},l.defaultArcValueFormat=function(t,e){return(100*e).toFixed(1)+"%"},l.dataLabelFormat=function(t){var e=this.config.data_labels,i=function(t){return S(t)?+t:""};return"function"==typeof e.format?e.format:"object"==typeof e.format?e.format[t]?!0===e.format[t]?i:e.format[t]:function(){return""}:i},l.hasCaches=function(t){for(var e=0;e<t.length;e++)if(!(t[e]in this.cache))return!1;return!0},l.addCache=function(t,e){this.cache[t]=this.cloneTarget(e)},l.getCaches=function(t){var e,i=[];for(e=0;e<t.length;e++)t[e]in this.cache&&i.push(this.cloneTarget(this.cache[t[e]]));return i};var V=l.CLASS={target:"c3-target",chart:"c3-chart",chartLine:"c3-chart-line",chartLines:"c3-chart-lines",chartBar:"c3-chart-bar",chartBars:"c3-chart-bars",chartText:"c3-chart-text",chartTexts:"c3-chart-texts",chartArc:"c3-chart-arc",chartArcs:"c3-chart-arcs",chartArcsTitle:"c3-chart-arcs-title",chartArcsBackground:"c3-chart-arcs-background",chartArcsGaugeUnit:"c3-chart-arcs-gauge-unit",chartArcsGaugeMax:"c3-chart-arcs-gauge-max",chartArcsGaugeMin:"c3-chart-arcs-gauge-min",selectedCircle:"c3-selected-circle",selectedCircles:"c3-selected-circles",eventRect:"c3-event-rect",eventRects:"c3-event-rects",eventRectsSingle:"c3-event-rects-single",eventRectsMultiple:"c3-event-rects-multiple",zoomRect:"c3-zoom-rect",brush:"c3-brush",focused:"c3-focused",defocused:"c3-defocused",region:"c3-region",regions:"c3-regions",tooltipContainer:"c3-tooltip-container",tooltip:"c3-tooltip",tooltipName:"c3-tooltip-name",shape:"c3-shape",shapes:"c3-shapes",line:"c3-line",lines:"c3-lines",bar:"c3-bar",bars:"c3-bars",circle:"c3-circle",circles:"c3-circles",arc:"c3-arc",arcs:"c3-arcs",area:"c3-area",areas:"c3-areas",empty:"c3-empty",text:"c3-text",texts:"c3-texts",gaugeValue:"c3-gauge-value",grid:"c3-grid",gridLines:"c3-grid-lines",xgrid:"c3-xgrid",xgrids:"c3-xgrids",xgridLine:"c3-xgrid-line",xgridLines:"c3-xgrid-lines",xgridFocus:"c3-xgrid-focus",ygrid:"c3-ygrid",ygrids:"c3-ygrids",ygridLine:"c3-ygrid-line",ygridLines:"c3-ygrid-lines",axis:"c3-axis",axisX:"c3-axis-x",axisXLabel:"c3-axis-x-label",axisY:"c3-axis-y",axisYLabel:"c3-axis-y-label",axisY2:"c3-axis-y2",axisY2Label:"c3-axis-y2-label",legendBackground:"c3-legend-background",legendItem:"c3-legend-item",legendItemEvent:"c3-legend-item-event",legendItemTile:"c3-legend-item-tile",legendItemHidden:"c3-legend-item-hidden",legendItemFocused:"c3-legend-item-focused",dragarea:"c3-dragarea",EXPANDED:"_expanded_",SELECTED:"_selected_",INCLUDED:"_included_"};l.generateClass=function(t,e){return" "+t+" "+t+this.getTargetSelectorSuffix(e)},l.classText=function(t){return this.generateClass(V.text,t.index)},l.classTexts=function(t){return this.generateClass(V.texts,t.id)},l.classShape=function(t){return this.generateClass(V.shape,t.index)},l.classShapes=function(t){return this.generateClass(V.shapes,t.id)},l.classLine=function(t){return this.classShape(t)+this.generateClass(V.line,t.id)},l.classLines=function(t){return this.classShapes(t)+this.generateClass(V.lines,t.id)},l.classCircle=function(t){return this.classShape(t)+this.generateClass(V.circle,t.index)},l.classCircles=function(t){return this.classShapes(t)+this.generateClass(V.circles,t.id)},l.classBar=function(t){return this.classShape(t)+this.generateClass(V.bar,t.index)},l.classBars=function(t){return this.classShapes(t)+this.generateClass(V.bars,t.id)},l.classArc=function(t){return this.classShape(t.data)+this.generateClass(V.arc,t.data.id)},l.classArcs=function(t){return this.classShapes(t.data)+this.generateClass(V.arcs,t.data.id)},l.classArea=function(t){return this.classShape(t)+this.generateClass(V.area,t.id)},l.classAreas=function(t){return this.classShapes(t)+this.generateClass(V.areas,t.id)},l.classRegion=function(t,e){return this.generateClass(V.region,e)+" "+("class"in t?t.class:"")},l.classEvent=function(t){return this.generateClass(V.eventRect,t.index)},l.classTarget=function(t){var e=this.config.data_classes[t],i="";return e&&(i=" "+V.target+"-"+e),this.generateClass(V.target,t)+i},l.classFocus=function(t){return this.classFocused(t)+this.classDefocused(t)},l.classFocused=function(t){return" "+(0<=this.focusedTargetIds.indexOf(t.id)?V.focused:"")},l.classDefocused=function(t){return" "+(0<=this.defocusedTargetIds.indexOf(t.id)?V.defocused:"")},l.classChartText=function(t){return V.chartText+this.classTarget(t.id)},l.classChartLine=function(t){return V.chartLine+this.classTarget(t.id)},l.classChartBar=function(t){return V.chartBar+this.classTarget(t.id)},l.classChartArc=function(t){return V.chartArc+this.classTarget(t.data.id)},l.getTargetSelectorSuffix=function(t){return t||0===t?("-"+t).replace(/[\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g,"-"):""},l.selectorTarget=function(t,e){return(e||"")+"."+V.target+this.getTargetSelectorSuffix(t)},l.selectorTargets=function(t,e){var i=this;return(t=t||[]).length?t.map(function(t){return i.selectorTarget(t,e)}):null},l.selectorLegend=function(t){return"."+V.legendItem+this.getTargetSelectorSuffix(t)},l.selectorLegends=function(t){var e=this;return t&&t.length?t.map(function(t){return e.selectorLegend(t)}):null};var K,S=l.isValue=function(t){return t||0===t},g=l.isFunction=function(t){return"function"==typeof t},r=l.isString=function(t){return"string"==typeof t},b=l.isUndefined=function(t){return void 0===t},k=l.isDefined=function(t){return void 0!==t},s=l.ceil10=function(t){return 10*Math.ceil(t/10)},c=l.asHalfPixel=function(t){return Math.ceil(t)+.5},R=l.diffDomain=function(t){return t[1]-t[0]},h=l.isEmpty=function(t){return!t||r(t)&&0===t.length||"object"==typeof t&&0===Object.keys(t).length},C=l.notEmpty=function(t){return 0<Object.keys(t).length}
18,W=l.getOption=function(t,e,i){return k(t[e])?t[e]:i},f=l.hasValue=function(e,i){var a=!1;return Object.keys(e).forEach(function(t){e[t]===i&&(a=!0)}),a},m=l.getPathBox=function(t){var e=t.getBoundingClientRect(),i=[t.pathSegList.getItem(0),t.pathSegList.getItem(1)];return{x:i[0].x,y:Math.min(i[0].y,i[1].y),width:e.width,height:e.height}};n.focus=function(e){var t,i=this.internal;e=i.mapToTargetIds(e),t=i.svg.selectAll(i.selectorTargets(e.filter(i.isTargetToShow,i))),this.revert(),this.defocus(),t.classed(V.focused,!0).classed(V.defocused,!1),i.hasArcType()&&i.expandArc(e),i.toggleFocusLegend(e,!0),i.focusedTargetIds=e,i.defocusedTargetIds=i.defocusedTargetIds.filter(function(t){return e.indexOf(t)<0})},n.defocus=function(e){var t=this.internal;e=t.mapToTargetIds(e),t.svg.selectAll(t.selectorTargets(e.filter(t.isTargetToShow,t))).classed(V.focused,!1).classed(V.defocused,!0),t.hasArcType()&&t.unexpandArc(e),t.toggleFocusLegend(e,!1),t.focusedTargetIds=t.focusedTargetIds.filter(function(t){return e.indexOf(t)<0}),t.defocusedTargetIds=e},n.revert=function(t){var e=this.internal;t=e.mapToTargetIds(t),e.svg.selectAll(e.selectorTargets(t)).classed(V.focused,!1).classed(V.defocused,!1),e.hasArcType()&&e.unexpandArc(t),e.config.legend_show&&(e.showLegend(t.filter(e.isLegendToShow.bind(e))),e.legend.selectAll(e.selectorLegends(t)).filter(function(){return e.d3.select(this).classed(V.legendItemFocused)}).classed(V.legendItemFocused,!1)),e.focusedTargetIds=[],e.defocusedTargetIds=[]},n.show=function(t,e){var i,a=this.internal;t=a.mapToTargetIds(t),e=e||{},a.removeHiddenTargetIds(t),(i=a.svg.selectAll(a.selectorTargets(t))).transition().style("opacity",1,"important").call(a.endall,function(){i.style("opacity",null).style("opacity",1)}),e.withLegend&&a.showLegend(t),a.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},n.hide=function(t,e){var i,a=this.internal;t=a.mapToTargetIds(t),e=e||{},a.addHiddenTargetIds(t),(i=a.svg.selectAll(a.selectorTargets(t))).transition().style("opacity",0,"important").call(a.endall,function(){i.style("opacity",null).style("opacity",0)}),e.withLegend&&a.hideLegend(t),a.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},n.toggle=function(t,e){var i=this,a=this.internal;a.mapToTargetIds(t).forEach(function(t){a.isTargetToShow(t)?i.hide(t,e):i.show(t,e)})},n.zoom=function(t){var e=this.internal;return t&&(e.isTimeSeries()&&(t=t.map(function(t){return e.parseDate(t)})),e.brush.extent(t),e.redraw({withUpdateXDomain:!0,withY:e.config.zoom_rescale}),e.config.zoom_onzoom.call(this,e.x.orgDomain())),e.brush.extent()},n.zoom.enable=function(t){var e=this.internal;e.config.zoom_enabled=t,e.updateAndRedraw()},n.unzoom=function(){var t=this.internal;t.brush.clear().update(),t.redraw({withUpdateXDomain:!0})},n.load=function(e){var t=this.internal,i=t.config;return e.xs&&t.addXs(e.xs),"classes"in e&&Object.keys(e.classes).forEach(function(t){i.data_classes[t]=e.classes[t]}),"categories"in e&&t.isCategorized()&&(i.axis_x_categories=e.categories),"axes"in e&&Object.keys(e.axes).forEach(function(t){i.data_axes[t]=e.axes[t]}),"colors"in e&&Object.keys(e.colors).forEach(function(t){i.data_colors[t]=e.colors[t]}),"cacheIds"in e&&t.hasCaches(e.cacheIds)?void t.load(t.getCaches(e.cacheIds),e.done):void("unload"in e?t.unload(t.mapToTargetIds("boolean"==typeof e.unload&&e.unload?null:e.unload),function(){t.loadFromArgs(e)}):t.loadFromArgs(e))},n.unload=function(t){var e=this.internal;(t=t||{})instanceof Array?t={ids:t}
vendor: 6,587 bytes, line 18
18:"string"==typeof t&&(t={ids:[t]}),e.unload(e.mapToTargetIds(t.ids),function(){e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),t.done&&t.done()})},n.flow=function(t){var n,e,i,a,r,s,o,c=this.internal,d=[],l=c.getMaxDataCount(),u=0,g=0;if(t.json)e=c.convertJsonToData(t.json,t.keys);else if(t.rows)e=c.convertRowsToData(t.rows);else{if(!t.columns)return;e=c.convertColumnsToData(t.columns)}n=c.convertDataToTargets(e,!0),c.data.targets.forEach(function(t){var e,i,a=!1;for(e=0;e<n.length;e++)if(t.id===n[e].id){for(a=!0,t.values[t.values.length-1]&&(g=t.values[t.values.length-1].index+1),u=n[e].values.length,i=0;i<u;i++)n[e].values[i].index=g+i,c.isTimeSeries()||(n[e].values[i].x=g+i);t.values=t.values.concat(n[e].values),n.splice(e,1);break}a||d.push(t.id)}),c.data.targets.forEach(function(t){var e,i;for(e=0;e<d.length;e++)if(t.id===d[e])for(g=t.values[t.values.length-1].index+1,i=0;i<u;i++)t.values.push({id:t.id,index:g+i,x:c.isTimeSeries()?c.getOtherTargetX(g+i):g+i,value:null})}),c.data.targets.length&&n.forEach(function(t){var e,i=[];for(e=c.data.targets[0].values[0].index;e<g;e++)i.push({id:t.id,index:e,x:c.isTimeSeries()?c.getOtherTargetX(e):e,value:null});t.values.forEach(function(t){t.index+=g,c.isTimeSeries()||(t.x+=g)}),t.values=i.concat(t.values)}),c.data.targets=c.data.targets.concat(n),c.getMaxDataCount(),r=(a=c.data.targets[0]).values[0],k(t.to)?(u=0,o=c.isTimeSeries()?c.parseDate(t.to):t.to,a.values.forEach(function(t){t.x<o&&u++})):k(t.length)&&(u=t.length),l?1===l&&c.isTimeSeries()&&(s=(a.values[a.values.length-1].x-r.x)/2,i=[new Date(+r.x-s),new Date(+r.x+s)],c.updateXDomain(null,!0,!0,!1,i)):(s=c.isTimeSeries()?1<a.values.length?a.values[a.values.length-1].x-r.x:r.x-c.getXDomain(c.data.targets)[0]:1,i=[r.x-s,r.x],c.updateXDomain(null,!0,!0,!1,i)),c.updateTargets(c.data.targets),c.redraw({flow:{index:r.index,length:u,duration:S(t.duration)?t.duration:c.config.transition_duration,done:t.done,orgDataCount:l},withLegend:!0,withTransition:1<l,withTrimXDomain:!1,withUpdateXAxis:!0})},l.generateFlow=function(I){var k=this,E=k.config,Y=k.d3;return function(){var t,e,i,a,n=I.targets,r=I.flow,s=I.drawBar,o=I.drawLine,c=I.drawArea,d=I.cx,l=I.cy,u=I.xv,g=I.xForText,h=I.yForText,f=I.duration,x=r.index,p=r.length,_=k.getValueOnIndex(k.data.targets[0].values,x),m=k.getValueOnIndex(k.data.targets[0].values,x+p),y=k.x.domain(),v=r.duration||f,T=r.done||function(){},b=k.generateWait(),A=k.xgrid||Y.selectAll([]),w=k.xgridLines||Y.selectAll([]),L=k.mainRegion||Y.selectAll([]),S=k.mainText||Y.selectAll([]),C=k.mainBar||Y.selectAll([]),D=k.mainLine||Y.selectAll([]),X=k.mainArea||Y.selectAll([]),F=k.mainCircle||Y.selectAll([]);k.flowing=!0,k.data.targets.forEach(function(t){t.values.splice(0,p)}),i=k.updateXDomain(n,!0,!0),k.updateXGrid&&k.updateXGrid(!0),t=r.orgDataCount?1===r.orgDataCount||_.x===m.x?k.x(y[0])-k.x(i[0]):k.isTimeSeries()?k.x(y[0])-k.x(i[0]):k.x(_.x)-k.x(m.x):1!==k.data.targets[0].values.length?k.x(y[0])-k.x(i[0]):k.isTimeSeries()?(_=k.getValueOnIndex(k.data.targets[0].values,0),m=k.getValueOnIndex(k.data.targets[0].values,k.data.targets[0].values.length-1),k.x(_.x)-k.x(m.x)):R(i)/2,a=R(y)/R(i),e="translate("+t+",0) scale("+a+",1)",k.hideXGridFocus(),k.hideTooltip(),Y.transition().ease("linear").duration(v).each(function(){b.add(k.axes.x.transition().call(k.xAxis)),b.add(C.transition().attr("transform",e)),b.add(D.transition().attr("transform",e)),b.add(X.transition().attr("transform",e)),b.add(F.transition().attr("transform",e)),b.add(S.transition().attr("transform",e)),b.add(L.filter(k.isRegionOnX).transition().attr("transform",e)),b.add(A.transition().attr("transform",e)),b.add(w.transition().attr("transform",e))}).call(b,function(){var t,e=[],i=[],a=[];if(p){for(t=0;t<p;t++)e.push("."+V.shape+"-"+(x+t)),i.push("."+V.text+"-"+(x+t)),a.push("."+V.eventRect+"-"+(x+t));k.svg.selectAll("."+V.shapes).selectAll(e).remove(),k.svg.selectAll("."+V.texts).selectAll(i).remove(),k.svg.selectAll("."+V.eventRects).selectAll(a).remove(),k.svg.select("."+V.xgrid).remove()}A.attr("transform",null).attr(k.xgridAttr),w.attr("transform",null),w.select("line").attr("x1",E.axis_rotated?0:u).attr("x2",E.axis_rotated?k.width:u),w.select("text").attr("x",E.axis_rotated?k.width:0).attr("y",u),C.attr("transform",null).attr("d",s),D.attr("transform",null).attr("d",o),X.attr("transform",null).attr("d",c),F.attr("transform",null).attr("cx",d).attr("cy",l),S.attr("transform",null).attr("x",g).attr("y",h).style("fill-opacity",k.opacityForText.bind(k)),L.attr("transform",null),L.select("rect").filter(k.isRegionOnX).attr("x",k.regionX.bind(k)).attr("width",k.regionWidth.bind(k)),E.interaction_enabled&&k.redrawEventRect(),T(),k.flowing=!1})}},n.selected=function(t){var e=this.internal,i=e.d3;return i.merge(e.main.selectAll("."+V.shapes+e.getTargetSelectorSuffix(t)).selectAll("."+V.shape).filter(function(){return i.select(this).classed(V.SELECTED)}).map(function(t){return t.map(function(t){var e=t.__data__;return e.data?e.data:e})}))},n.select=function(c,d,l){var u=this.internal,g=u.d3,h=u.config;h.data_selection_enabled&&u.main.selectAll("."+V.shapes).selectAll("."+V.shape).each(function(t,e){var i=g.select(this),a=t.data?t.data.id:t.id,n=u.getToggle(this,t).bind(u),r=h.data_selection_grouped||!c||0<=c.indexOf(a),s=!d||0<=d.indexOf(e),o=i.classed(V.SELECTED);i.classed(V.line)||i.classed(V.area)||(r&&s?h.data_selection_isselectable(t)&&!o&&n(!0,i.classed(V.SELECTED,!0),t,e):k(l)&&l&&o&&n(!1,i.classed(V.SELECTED,!1),t,e))})},n.unselect=function(c,d){var l=this.internal,u=l.d3,g=l.config;g.data_selection_enabled&&l.main.selectAll("."+V.shapes).selectAll("."+V.shape).each(function(t,e){var i=u.select(this),a=t.data?t.data.id:t.id,n=l.getToggle(this,t).bind(l),r=g.data_selection_grouped||!c||0<=c.indexOf(a),s=!d||0<=d.indexOf(e),o=i.classed(V.SELECTED);i.classed(V.line)||i.classed(V.area)||r&&s&&g.data_selection_isselectable(t)&&o&&n(!1,i.classed(V.SELECTED,!1),t,e)})},n.transform=function(t,e){var i=this.internal,a=0<=["pie","donut"].indexOf(t)?{withTransform:!0}:null;i.transformTo(e,t,a)},l.transformTo=function(t,e,i){var a=this,n=!a.hasArcType(),r=i||{withTransitionForAxis:n};r.withTransitionForTransform=!1,a.transiting=!1,a.setTargetType(t,e),a.updateTargets(a.data.targets),a.updateAndRedraw(r)},n.groups=function(t){var e=this.internal,i=e.config;return b(t)||(i.data_groups=t,e.redraw()),i.data_groups},n.xgrids=function(t){var e=this.internal,i=e.config;return t&&(i.grid_x_lines=t,e.redrawWithoutRescale()),i.grid_x_lines},n.xgrids.add=function(t){var e=this.internal;
18return this.xgrids(e.config.grid_x_lines.concat(t||[]))},n.xgrids.remove=function(t){this.internal.removeGridLines(t,!0)},n.ygrids=function(t){var e=this.internal,i=e.config;return t&&(i.grid_y_lines=t,e.redrawWithoutRescale()),i.grid_y_lines},n.ygrids.add=function(t){var e=this.internal;return this.ygrids(e.config.grid_y_lines.concat(t||[]))},n.ygrids.remove=function(t){this.internal.removeGridLines(t,!1)},n.regions=function(t){var e=this.internal,i=e.config;return t&&(i.regions=t,e.redrawWithoutRescale()),i.regions},n.regions.add=function(t){var e=this.internal,i=e.config;return t&&(i.regions=i.regions.concat(t),e.redrawWithoutRescale()),i.regions},n.regions.remove=function(t){var e,i,a,n=this.internal,r=n.config;return t=t||{},e=n.getOption(t,"duration",r.transition_duration),i=n.getOption(t,"classes",[V.region]),a=n.main.select("."+V.regions).selectAll(i.map(function(t){return"."+t})),(e?a.transition().duration(e):a).style("opacity",0).remove(),r.regions=r.regions.filter(function(t){var e=!1;return!t.class||(t.class.split(" ").forEach(function(t){0<=i.indexOf(t)&&(e=!0)}),!e)}),r.regions},n.data=function(e){var t=this.internal.data.targets;return void 0===e?t:t.filter(function(t){return 0<=[].concat(e).indexOf(t.id)})},n.data.shown=function(t){return this.internal.filterTargetsToShow(this.data(t))},n.data.values=function(t){var e,i=null;return t&&(i=(e=this.data(t))[0]?e[0].values.map(function(t){return t.value}):null),i},n.data.names=function(t){return this.internal.clearLegendItemTextBoxCache(),this.internal.updateDataAttributes("names",t)},n.data.colors=function(t){return this.internal.updateDataAttributes("colors",t)},n.data.axes=function(t){return this.internal.updateDataAttributes("axes",t)},n.category=function(t,e){var i=this.internal,a=i.config;return 1<arguments.length&&(a.axis_x_categories[t]=e,i.redraw()),a.axis_x_categories[t]},n.categories=function(t){var e=this.internal,i=e.config;return arguments.length&&(i.axis_x_categories=t,e.redraw()),i.axis_x_categories},n.color=function(t){return this.internal.color(t)},n.x=function(t){var e=this.internal;return arguments.length&&(e.updateTargetX(e.data.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),e.data.xs},n.xs=function(t){var e=this.internal;return arguments.length&&(e.updateTargetXs(e.data.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),e.data.xs},n.axis=function(){},n.axis.labels=function(e){var i=this.internal;arguments.length&&(Object.keys(e).forEach(function(t){i.axis.setLabelText(t,e[t])}),i.axis.updateLabels())},n.axis.max=function(t){var e=this.internal,i=e.config;return arguments.length?("object"==typeof t?(S(t.x)&&(i.axis_x_max=t.x),S(t.y)&&(i.axis_y_max=t.y),S(t.y2)&&(i.axis_y2_max=t.y2)):i.axis_y_max=i.axis_y2_max=t,void e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})):{x:i.axis_x_max,y:i.axis_y_max,y2:i.axis_y2_max}},n.axis.min=function(t){var e=this.internal,i=e.config;return arguments.length?("object"==typeof t?(S(t.x)&&(i.axis_x_min=t.x),S(t.y)&&(i.axis_y_min=t.y),S(t.y2)&&(i.axis_y2_min=t.y2)):i.axis_y_min=i.axis_y2_min=t,void e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})):{x:i.axis_x_min,y:i.axis_y_min,y2:i.axis_y2_min}},n.axis.range=function(t){return arguments.length?(k(t.max)&&this.axis.max(t.max),void(k(t.min)&&this.axis.min(t.min))):{max:this.axis.max(),min:this.axis.min()}},n.legend=function(){},n.legend.show=function(t){var e=this.internal;e.showLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})},n.legend.hide=function(t){var e=this.internal;e.hideLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})},n.resize=function(t){var e=this.internal.config;e.size_width=t?t.width:null,e.size_height=t?t.height:null,this.flush()},n.flush=function(){this.internal.updateAndRedraw({withLegend:!0,withTransition:!1,withTransitionForTransform:!1})},n.destroy=function(){var e=this.internal;return d.clearInterval(e.intervalForObserveInserted),d.onresize=null,e.selectChart.classed("c3",!1).html(""),Object.keys(e).forEach(function(t){e[t]=null}),null},n.tooltip=function(){},n.tooltip.show=function(t){var e,i,a=this.internal;t.mouse&&(i=t.mouse),t.data?e=a.isMultipleX()?(i=[a.x(t.data.x),a.getYScale(t.data.id)(t.data.value)],null):S(t.data.index)?t.data.index:a.getIndexByX(t.data.x):void 0!==t.x?e=a.getIndexByX(t.x):void 0!==t.index&&(e=t.index),a.dispatchEvent("mouseover",e,i),a.dispatchEvent("mousemove",e,i)},n.tooltip.hide=function(){this.internal.dispatchEvent("mouseout",0)},l.isSafari=function(){var t=d.navigator.userAgent;return 0<=t.indexOf("Safari")&&t.indexOf("Chrome")<0},l.isChrome=function(){return 0<=d.navigator.userAgent.indexOf("Chrome")},Function.prototype.bind||(Function.prototype.bind=function(t){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");
18var e=Array.prototype.slice.call(arguments,1),i=this,a=function(){},n=function(){return i.apply(this instanceof a?this:t,e.concat(Array.prototype.slice.call(arguments)))};return a.prototype=this.prototype,n.prototype=new a,n}),"function"==typeof define&&define.amd?define("c3",["d3"],t):"undefined"!=typeof exports&&"undefined"!=typeof module?module.exports=t:d.c3=t}(window); 19function radialProgress(t){var n,a,o=1e3,s={top:0,right:0,bottom:30,left:0},r=150,c="",u=10,h=0,p=0,g=100,f=0,e=0,i=0,w=d3.svg.arc().startAngle(Math.PI/180*0),_=d3.svg.arc().startAngle(Math.PI/180*0).endAngle(0);function d(){function l(t){"function"==typeof a&&a.call()}n.each(function(t){var n=d3.select(this).selectAll("svg").data([t]),a=n.enter().append("svg").attr("class","radial-svg").append("g");A(),n.attr("width",300).attr("height",300);var r=a.append("g").attr("class","component").attr("cursor","pointer").on("click",l);w.endAngle(Math.PI/180*360),r.append("rect").attr("class","background").attr("width",_width).attr("height",_height),r.append("path").attr("transform","translate("+_width/2+","+_width/2+")").attr("d",w),r.append("text").attr("class","label").attr("transform","translate("+_width/2+","+(_width+u)+")").text(c);n.select("g").attr("transform","translate("+s.left+","+s.top+")");w.endAngle(f),a.append("g").attr("class","arcs");var e=n.select(".arcs").selectAll(".arc").data(t);e.enter().append("path").attr("class","arc").attr("transform","translate("+_width/2+","+_width/2+")").attr("d",w);var i=n.select(".arcs").selectAll(".arc2").data(t);i.enter().append("path").attr("class","arc2").attr("transform","translate("+_width/2+","+_width/2+")").attr("d",_),a.append("g").attr("class","labels");var d=n.select(".labels").selectAll(".label").data(t);d.enter().append("text").attr("class","label").attr("y",_width/2+u/3).attr("x",_width/2).attr("cursor","pointer").attr("width",_width).text(function(t){return Math.round((h-p)/(g-p)*100)+"%"}).style("font-size",u+"px").on("click",l),e.exit().transition().duration(500).attr("x",1e3).remove(),function(t){var n=(h-p)/(g-p),a=Math.min(360*n,360);a=a*Math.PI/180,e.datum(a),e.transition().duration(o).attrTween("d",v),1<n&&(i.datum(Math.min(360*(n-1),360)*Math.PI/180),i.transition().delay(o).duration(o).attrTween("d",x));d.datum(Math.round(100*n)),d.transition().duration(o).tween("text",m)}()})}function m(t){var n=d3.interpolate(i,t);return i=n(0),function(t){i=n(t),this.textContent=Math.round(n(t))+"%"}}function v(t){var n=d3.interpolate(f,t);return function(t){return f=n(t),w.endAngle(n(t))()}}function x(t){var n=d3.interpolate(e,t);return function(t){return _.endAngle(n(t))()}}function A(){_width=r-s.right-s.left-s.top-s.bottom,_height=_width,u=.2*_width,w.outerRadius(_width/2),w.innerRadius(_width/2*.85),_.outerRadius(_width/2*.85),_.innerRadius(_width/2*.85-_width/2*.15)}return n=d3.select(t),d.render=function(){return A(),d(),d},d.value=function(t){return arguments.length?(h=[t],n.datum([h]),d):h},d.margin=function(t){return arguments.length?(s=t,d):s},d.diameter=function(t){return arguments.length?(r=t,d):r},d.minValue=function(t){return arguments.length?(p=t,d):p},d.maxValue=function(t){return arguments.length?(g=t,d):g},d.label=function(t){return arguments.length?(c=t,d):c},d._duration=function(t){return arguments.length?(o=t,d):o},d.onClick=function(t){return arguments.length?(a=t,d):a},d} 20var Idx=function(){};Idx.prototype.events; 21Idx.Log=function(o){this.source=o},Idx.Log.prototype.source,Idx.Log.prototype.enabled=!0,Idx.Log.prototype.info=function(o){this.enabled&&console.log(this.source+": "+o)},Idx.Log.prototype.error=function(o){this.enabled&&console.error(this.source+": "+o)}; 22Idx.Events=function(){this.log=new Idx.Log("Events");var r=this,t=function(){ihfJquery("#ihf-main-container [data-ihf-event]").not("[data-ihf-event-bound]").each(function(){var n=this,e=ihfJquery(n),t=e.attr("data-ihf-event");e.attr("data-ihf-event-bound",!0),r._each(t,function(t){!function(n,e,a){var t=a.split("-").pop();"loaded"===t?r.publish(a,{$element:n,element:e}):n.on(t,function(t){r.publish(a,{event:t,$element:n,element:e})})}(e,n,t)})})};window.setInterval(function(){t()},1e3)},Idx.Events.prototype._log,Idx.Events.prototype._handlers=[],Idx.Events.prototype._addHandler=function(t,n){var e={name:t,callback:n};this._handlers.push(e)},Idx.Events.prototype._getHandlers=function(t){for(var n=[],e=0;e<this._handlers.length;e++){var a=this._handlers[e];a.name!==t&&"*"!==a.name||n.push(a)}return n},Idx.Events.prototype._toArray=function(t){return t=t||[],Array.isArray(t)||(t=t.
22split(/[ ,]+/)),t},Idx.Events.prototype._each=function(t,n){t=this._toArray(t);for(var e=0;e<t.length;e++){n(t[e],e)}},Idx.Events.prototype.subscribe=function(t,n){var e=this;return e._each(t,function(t){e._addHandler(t,n)}),e},Idx.Events.prototype.publish=function(t,e){var a=this;return e=e||{},a._each(t,function(n){var t=a._getHandlers(n);a._each(t,function(t){e.eventName=n,t.callback(e)})}),a}; 23document.addEventListener("DOMContentLoaded",function(){if(!!navigator.userAgent.match(/MSIE|Trident/))for(var e=document.querySelectorAll("*"),t=0;t<e.length;t++){var r=e[t];0===r.tagName.toLowerCase().indexOf("ihf-")&&(r.innerHTML='You are using an outdated browser that will not work with certain search features on this website. Please upgrade to a new browser. Suggested browsers: <a href="https://www.google.com/chrome" target="_blank">Chrome</a>, <a href="https://www.mozilla.org/en-US/firefox" target="_blank">Firefox</a>, <a href="https://www.microsoft.com/en-us/windows/microsoft-edge" target="_blank">Microsoft Edge</a>.')}},!1); 24var idx=new Idx;!function(){var n=new Idx.Events;idx.events=n}(); 25!function(){var t=function(e){var n=null;return e&&(n=e.closest("[data-ihf-listing-number]").attr("data-ihf-listing-number")),n},o=function(e,n,i,t){window.ga&&window.ga("send","event",{eventCategory:e,eventAction:n,eventLabel:i,eventValue:t}),window.__gaTracker&&window.__gaTracker("send","event",{eventCategory:e,eventAction:n,eventLabel:i,eventValue:t}),window.gtag&&window.gtag("event",n,{event_category:e,event_label:i,value:t})};"undefined"!=typeof idx&&void 0!==idx.events&&idx.events.subscribe("listing-detail-loaded",function(e){var n=t(e.$element);o("IDX: Listing","Detail View",n)}).subscribe("listing-image-carousel-advance",function(e){var n=t(e.$element),i=e.$element.attr("data-ihf-view-count");o("IDX: Listing","Carousel Advance",n,i)}).subscribe("listing-virtual-tour-open-click",function(e){var n=t(e.$element);o("IDX: Listing","Virtual Tour",n)}).subscribe("listing-extra-link-open-click",function(e){var n=t(e.$element);o("IDX: Listing","Extra Link",n)}).subscribe("social-share-click",function(e){var n=t(e.$element),i=e.$element.data("ihf-social-share-service");o("IDX: Social Share",i,n)}).subscribe("schedule-showing-confirmation-loaded",function(e){var n=t(e.$element);o("IDX: Schedule Showing","Confirmation",n)}).subscribe("more-info-request-confirmation-loaded",function(e){var n=t(e.$element);o("IDX: More Info Request","Confirmation",n)}).subscribe("save-listing-confirmation-loaded",function(e){var n=t(e.$element);o("IDX: Listing Saved","Confirmation",n)}).subscribe("valuation-request-confirmation-loaded",function(e){o("IDX: Valuation Request","Confirmation")}).subscribe("contact-confirmation-loaded",function(e){o("IDX: Contact","Confirmation")}).subscribe("save-search-confirmation-loaded",function(e){o("IDX: Search Saved","Confirmation")}).subscribe("property-organizer-signup-confirmation-loaded",function(e){o("IDX: Property Organizer Signup","Confirmation")}).subscribe("user-registration-login-confirmation-loaded",function(e){o("IDX: User Registration","Login")}).subscribe("user-registration-signup-confirmation-loaded",function(e){o("IDX: User Registration","Signup")}).subscribe("user-registration-postpone-form-submit",function(e){o("IDX: User Registration","Postpone")})}(); 26!function(){new Idx.Log("Brytecore");var t=function(e){var i={};return e&&(i.mlsId=n(e,"data-ihf-listing-number"),i.address=n(e,"data-ihf-listing-address"),i.price=n(e,"data-ihf-listing-price")),i},i=function(e){var i={};return e&&(i.id=n(e,"data-ihf-subscriber-id"),i.emailAddress=n(e,"data-ihf-subscriber-email"),i.firstName=n(e,"data-ihf-subscriber-first-name"),i.lastName=n(e,"data-ihf-subscriber-last-name")),i},r=function(e){var i={};if(e){var t=e.closest("[data-ihf-event='listing-search-results-loaded']").attr("data-ihf-json");if(t){var r=JSON.parse(t);i.bedroomsMin=r.bedrooms,i.cities=r.cityList;var n=[];r.oneStoryYn&&n.push("1 Story"),r.garYn&&n.push("Garage"),r.fireplaceYn&&n.push("Fireplace"),r.poolYn&&n.push("Pool"),r.viewYn&&n.push("View"),r.horsePropertyYn&&n.push("Horse Property"),r.diningRoomYn&&n.push("Dining Room"),r.waterFrontYn&&n.push("Water Front"),r.familyRoomYn&&n.push("Family Room"),r.newConstructionYn&&n.push("New Construction"),r.golfCourseYn&&n.push("Golf Course"),r.atticYn&&n.push("Attic"),r.basementYn&&n.push("Basement"),r.agedCommunityYn&&n.push("Aged Community"),i.features=n,i.fullBathsMin=r.bathCount,i.isAcreage=-1<r.propertyType.indexOf("LL"),i.isCondo=-1<r.propertyType.indexOf("CND"),i.isForeclosure=r.foreclosureYn,i.isReo=r.reoyn,i.isShortSale=r.shortSaleYn,i.isLot=-1<r.propertyType.indexOf("LL"),i.isMultiFamily=-1<r.propertyType.indexOf("RI"),i.isRental=-1<r.propertyType.indexOf("RNT"),i.isSingleFamily=-1<r.propertyType.indexOf("SFR"),i.postalCodes=r.zip,i.priceMax=r.maxListPrice,i.priceMin=r.minListPrice,i.schoolElementary=r.elementarySchool,i.schoolHigh=r.highSchool,i.schoolMiddle=r.jrHighSchool,i.yearBuiltMin=r.yearBuilt}}return i},n=function(e,i){return e.closest("["+i+"]").attr(i)},u=function(e,i){var t=null;return e&&i&&($field=e.find(":input[name='"+i+"']"),$field&&(t=$field.val())),t},s=function(e,i){var t="";return e&&(t+=e),i&&(t&&(t+=" "),t+=i),t};if("undefined"!=typeof idx&&void 0!==idx.events){var a=function(e,i){"undefined"!=typeof brytescore&&brytescore(e,i)};idx.events.subscribe(["property-organizer-login-confirmation-loaded","user-registration-login-confirmation-loaded"],function(e){a("authenticated",{userAccount:i(e.$element),isLead:(e.$element,!0)})}).subscribe(["property-organizer-signup-confirmation-loaded","user-registration-signup-confirmation-loaded"],function(e){a("registeredAccount",{userAccount:i(e.$element),isLead:(e.$element,!0),dateRegistered:function(e){var i=null;return e&&(i=n(e,"data-ihf-subscriber-create-date")),i}(e.$element)})}).subscribe("listing-result-loaded",function(e){a("realestate.listingImpression",{listing:t(e.$element)})}).subscribe("save-listing-confirmation-loaded",function(e){a("realestate.savedListing",{listing:t(e.$element)})}).subscribe("save-search-confirmation-loaded",function(e){a("realestate.savedSearch",{search:r(e.$element)})}).subscribe("listing-search-results-loaded",function(e){a("realestate.searchedListings",{search:r(e.$element)})}).subscribe("listing-detail-loaded",function(e){a("realestate.viewedListing",{listing:t(e.$element)})}).subscribe("listing-image-carousel-advance",function(e){a("realestate.viewedListingPhoto",{listing:t(e.$element),viewedPhotoURL:function(e){var i=e,t=i.data("bs.carousel").getActiveIndex();return i.find("img").eq(t).attr("src")}(e.$element)})}).subscribe("social-share-click",function(e){var i=e.$element.data("ihf-social-share-service");null===i||("Facebook"===i?a("realestate.sharedListingFacebook",{listing:t(e.$element)}):"Email"===i?a("realestate.sharedListingEmail",{fromEmail:u($form,"fromEmail"),toEmail:u($form,"toEmail"),message:u($form,"message"),relatedListing:t(e.$element)}):"Print"===i?a("realestate.printedListing",{listing:t(e.$element)}):"Twitter"===i&&a("realestate.sharedListingTwitter",{listing:t(e.$element)}))}).subscribe("more-info-request-form-submit",function(e){var i=e.$element;a("realestate.requestedInfo",{form:{fromEmail:u(i,"newEmail"),fromName:s(u(i,"firstName"),u(i,"lastName")),fromTelephone:u(i,"phone"),message:u(i,"message"),relatedListing:t(i)}})}).subscribe("schedule-showing-form-submit",function(e){var m=e.$element;a("realestate.requestedShowing",{form:{fromEmail:u(m,"newEmail"),fromName:s(u(m,"firstName"),u(m,"lastName")),fromTelephone:u(m,"phone"),message:u(m,"message"),relatedListing:t(m)},requestedDateTime:function(){var e=null,i=u(m,"prefDate"),t=u(m,"prefTime");if(i&&t){var r=i+" "+t,n=(r=r.replace(/-|:|\s/g," ")).split(" ")[0],s=r.split(" ")[1],a=r.split(" ")[2],o=r.split(" ")[3],l=r.split(" ")[4];"PM"===r.split(" ")[5]&&(o+=12),e=new Date(n,s-1,a,o,l).toISOString()}return e}()})}).subscribe("contact-form-submit",function(e){var i=e.$element;a("realestate.submittedAgentContactForm",{form:{fromEmail:u(i,"email"),fromName:u(i,"contactName"),fromTelephone:u(i,"phone"),message:u(i,"message")},agentId:u(i,"agentId")})}
26).subscribe("listing-virtual-tour-open-click",function(e){a("realestate.viewedListingVirtualTour",{listing:t(e.$element)})})}}();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.