/*!
 * jQuery JavaScript Library v2.2.3
 * http://jquery.com/
 *
 * Includes Sizzle.js
 * http://sizzlejs.com/
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license
 * http://jquery.org/license
 *
 * Date: 2016-04-05T19:26Z
 */
/*!
 * Bootstrap v3.3.2 (http://getbootstrap.com)
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 */
if(function(t,e){"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(t,e){function n(t){var e=!!t&&"length"in t&&t.length,n=oe.type(t);return"function"===n||oe.isWindow(t)?!1:"array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t}function i(t,e,n){if(oe.isFunction(e))return oe.grep(t,function(t,i){return!!e.call(t,i,t)!==n});if(e.nodeType)return oe.grep(t,function(t){return t===e!==n});if("string"==typeof e){if(ge.test(e))return oe.filter(e,t,n);e=oe.filter(e,t)}return oe.grep(t,function(t){return J.call(e,t)>-1!==n})}function r(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function o(t){var e={};return oe.each(t.match(we)||[],function(t,n){e[n]=!0}),e}function a(){X.removeEventListener("DOMContentLoaded",a),t.removeEventListener("load",a),oe.ready()}function s(){this.expando=oe.expando+s.uid++}function l(t,e,n){var i;if(void 0===n&&1===t.nodeType)if(i="data-"+e.replace(Se,"-$&").toLowerCase(),n=t.getAttribute(i),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:De.test(n)?oe.parseJSON(n):n}catch(r){}Me.set(t,e,n)}else n=void 0;return n}function u(t,e,n,i){var r,o=1,a=20,s=i?function(){return i.cur()}:function(){return oe.css(t,e,"")},l=s(),u=n&&n[3]||(oe.cssNumber[e]?"":"px"),c=(oe.cssNumber[e]||"px"!==u&&+l)&&Ae.exec(oe.css(t,e));if(c&&c[3]!==u){u=u||c[3],n=n||[],c=+l||1;do o=o||".5",c/=o,oe.style(t,e,c+u);while(o!==(o=s()/l)&&1!==o&&--a)}return n&&(c=+c||+l||0,r=n[1]?c+(n[1]+1)*n[2]:+n[2],i&&(i.unit=u,i.start=c,i.end=r)),r}function c(t,e){var n="undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e||"*"):"undefined"!=typeof t.querySelectorAll?t.querySelectorAll(e||"*"):[];return void 0===e||e&&oe.nodeName(t,e)?oe.merge([t],n):n}function d(t,e){for(var n=0,i=t.length;i>n;n++)Ce.set(t[n],"globalEval",!e||Ce.get(e[n],"globalEval"))}function h(t,e,n,i,r){for(var o,a,s,l,u,h,f=e.createDocumentFragment(),p=[],g=0,m=t.length;m>g;g++)if(o=t[g],o||0===o)if("object"===oe.type(o))oe.merge(p,o.nodeType?[o]:o);else if(Fe.test(o)){for(a=a||f.appendChild(e.createElement("div")),s=(Ie.exec(o)||["",""])[1].toLowerCase(),l=He[s]||He._default,a.innerHTML=l[1]+oe.htmlPrefilter(o)+l[2],h=l[0];h--;)a=a.lastChild;oe.merge(p,a.childNodes),a=f.firstChild,a.textContent=""}else p.push(e.createTextNode(o));for(f.textContent="",g=0;o=p[g++];)if(i&&oe.inArray(o,i)>-1)r&&r.push(o);else if(u=oe.contains(o.ownerDocument,o),a=c(f.appendChild(o),"script"),u&&d(a),n)for(h=0;o=a[h++];)Pe.test(o.type||"")&&n.push(o);return f}function f(){return!0}function p(){return!1}function g(){try{return X.activeElement}catch(t){}}function m(t,e,n,i,r,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(i=i||n,n=void 0);for(s in e)m(t,s,n,i,e[s],o);return t}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),r===!1)r=p;else if(!r)return t;return 1===o&&(a=r,r=function(t){return oe().off(t),a.apply(this,arguments)},r.guid=a.guid||(a.guid=oe.guid++)),t.each(function(){oe.event.add(this,e,r,i,n)})}function v(t,e){return oe.nodeName(t,"table")&&oe.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function y(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function b(t){var e=Ve.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function x(t,e){var n,i,r,o,a,s,l,u;if(1===e.nodeType){if(Ce.hasData(t)&&(o=Ce.access(t),a=Ce.set(e,o),u=o.events)){delete a.handle,a.events={};for(r in u)for(n=0,i=u[r].length;i>n;n++)oe.event.add(e,r,u[r][n])}Me.hasData(t)&&(s=Me.access(t),l=oe.extend({},s),Me.set(e,l))}}function w(t,e){var n=e.nodeName.toLowerCase();"input"===n&&Ne.test(t.type)?e.checked=t.checked:("input"===n||"textarea"===n)&&(e.defaultValue=t.defaultValue)}function $(t,e,n,i){e=Z.apply([],e);var r,o,a,s,l,u,d=0,f=t.length,p=f-1,g=e[0],m=oe.isFunction(g);if(m||f>1&&"string"==typeof g&&!ie.checkClone&&qe.test(g))return t.each(function(r){var o=t.eq(r);m&&(e[0]=g.call(this,r,o.html())),$(o,e,n,i)});if(f&&(r=h(e,t[0].ownerDocument,!1,t,i),o=r.firstChild,1===r.childNodes.length&&(r=o),o||i)){for(a=oe.map(c(r,"script"),y),s=a.length;f>d;d++)l=r,d!==p&&(l=oe.clone(l,!0,!0),s&&oe.merge(a,c(l,"script"))),n.call(t[d],l,d);if(s)for(u=a[a.length-1].ownerDocument,oe.map(a,b),d=0;s>d;d++)l=a[d],Pe.test(l.type||"")&&!Ce.access(l,"globalEval")&&oe.contains(u,l)&&(l.src?oe._evalUrl&&oe._evalUrl(l.src):oe.globalEval(l.textContent.replace(Be,"")))}return t}function k(t,e,n){for(var i,r=e?oe.filter(e,t):t,o=0;null!=(i=r[o]);o++)n||1!==i.nodeType||oe.cleanData(c(i)),i.parentNode&&(n&&oe.contains(i.ownerDocument,i)&&d(c(i,"script")),i.parentNode.removeChild(i));return t}function _(t,e){var n=oe(e.createElement(t)).appendTo(e.body),i=oe.css(n[0],"display");return n.detach(),i}function C(t){var e=X,n=Ye[t];return n||(n=_(t,e),"none"!==n&&n||(Ue=(Ue||oe("<iframe frameborder='0' width='0' height='0'/>")).appendTo(e.documentElement),e=Ue[0].contentDocument,e.write(),e.close(),n=_(t,e),Ue.detach()),Ye[t]=n),n}function M(t,e,n){var i,r,o,a,s=t.style;return n=n||Ke(t),a=n?n.getPropertyValue(e)||n[e]:void 0,""!==a&&void 0!==a||oe.contains(t.ownerDocument,t)||(a=oe.style(t,e)),n&&!ie.pixelMarginRight()&&Xe.test(a)&&Ge.test(e)&&(i=s.width,r=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=i,s.minWidth=r,s.maxWidth=o),void 0!==a?a+"":a}function D(t,e){return{get:function(){return t()?void delete this.get:(this.get=e).apply(this,arguments)}}}function S(t){if(t in rn)return t;for(var e=t[0].toUpperCase()+t.slice(1),n=nn.length;n--;)if(t=nn[n]+e,t in rn)return t}function T(t,e,n){var i=Ae.exec(e);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):e}function A(t,e,n,i,r){for(var o=n===(i?"border":"content")?4:"width"===e?1:0,a=0;4>o;o+=2)"margin"===n&&(a+=oe.css(t,n+Ee[o],!0,r)),i?("content"===n&&(a-=oe.css(t,"padding"+Ee[o],!0,r)),"margin"!==n&&(a-=oe.css(t,"border"+Ee[o]+"Width",!0,r))):(a+=oe.css(t,"padding"+Ee[o],!0,r),"padding"!==n&&(a+=oe.css(t,"border"+Ee[o]+"Width",!0,r)));return a}function E(e,n,i){var r=!0,o="width"===n?e.offsetWidth:e.offsetHeight,a=Ke(e),s="border-box"===oe.css(e,"boxSizing",!1,a);if(X.msFullscreenElement&&t.top!==t&&e.getClientRects().length&&(o=Math.round(100*e.getBoundingClientRect()[n])),0>=o||null==o){if(o=M(e,n,a),(0>o||null==o)&&(o=e.style[n]),Xe.test(o))return o;r=s&&(ie.boxSizingReliable()||o===e.style[n]),o=parseFloat(o)||0}return o+A(e,n,i||(s?"border":"content"),r,a)+"px"}function O(t,e){for(var n,i,r,o=[],a=0,s=t.length;s>a;a++)i=t[a],i.style&&(o[a]=Ce.get(i,"olddisplay"),n=i.style.display,e?(o[a]||"none"!==n||(i.style.display=""),""===i.style.display&&Oe(i)&&(o[a]=Ce.access(i,"olddisplay",C(i.nodeName)))):(r=Oe(i),"none"===n&&r||Ce.set(i,"olddisplay",r?n:oe.css(i,"display"))));for(a=0;s>a;a++)i=t[a],i.style&&(e&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=e?o[a]||"":"none"));return t}function N(t,e,n,i,r){return new N.prototype.init(t,e,n,i,r)}function I(){return t.setTimeout(function(){on=void 0}),on=oe.now()}function P(t,e){var n,i=0,r={height:t};for(e=e?1:0;4>i;i+=2-e)n=Ee[i],r["margin"+n]=r["padding"+n]=t;return e&&(r.opacity=r.width=t),r}function H(t,e,n){for(var i,r=(L.tweeners[e]||[]).concat(L.tweeners["*"]),o=0,a=r.length;a>o;o++)if(i=r[o].call(n,e,t))return i}function F(t,e,n){var i,r,o,a,s,l,u,c,d=this,h={},f=t.style,p=t.nodeType&&Oe(t),g=Ce.get(t,"fxshow");n.queue||(s=oe._queueHooks(t,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,d.always(function(){d.always(function(){s.unqueued--,oe.queue(t,"fx").length||s.empty.fire()})})),1===t.nodeType&&("height"in e||"width"in e)&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],u=oe.css(t,"display"),c="none"===u?Ce.get(t,"olddisplay")||C(t.nodeName):u,"inline"===c&&"none"===oe.css(t,"float")&&(f.display="inline-block")),n.overflow&&(f.overflow="hidden",d.always(function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]}));for(i in e)if(r=e[i],sn.exec(r)){if(delete e[i],o=o||"toggle"===r,r===(p?"hide":"show")){if("show"!==r||!g||void 0===g[i])continue;p=!0}h[i]=g&&g[i]||oe.style(t,i)}else u=void 0;if(oe.isEmptyObject(h))"inline"===("none"===u?C(t.nodeName):u)&&(f.display=u);else{g?"hidden"in g&&(p=g.hidden):g=Ce.access(t,"fxshow",{}),o&&(g.hidden=!p),p?oe(t).show():d.done(function(){oe(t).hide()}),d.done(function(){var e;Ce.remove(t,"fxshow");for(e in h)oe.style(t,e,h[e])});for(i in h)a=H(p?g[i]:0,i,d),i in g||(g[i]=a.start,p&&(a.end=a.start,a.start="width"===i||"height"===i?1:0))}}function W(t,e){var n,i,r,o,a;for(n in t)if(i=oe.camelCase(n),r=e[i],o=t[n],oe.isArray(o)&&(r=o[1],o=t[n]=o[0]),n!==i&&(t[i]=o,delete t[n]),a=oe.cssHooks[i],a&&"expand"in a){o=a.expand(o),delete t[i];for(n in o)n in t||(t[n]=o[n],e[n]=r)}else e[i]=r}function L(t,e,n){var i,r,o=0,a=L.prefilters.length,s=oe.Deferred().always(function(){delete l.elem}),l=function(){if(r)return!1;for(var e=on||I(),n=Math.max(0,u.startTime+u.duration-e),i=n/u.duration||0,o=1-i,a=0,l=u.tweens.length;l>a;a++)u.tweens[a].run(o);return s.notifyWith(t,[u,o,n]),1>o&&l?n:(s.resolveWith(t,[u]),!1)},u=s.promise({elem:t,props:oe.extend({},e),opts:oe.extend(!0,{specialEasing:{},easing:oe.easing._default},n),originalProperties:e,originalOptions:n,startTime:on||I(),duration:n.duration,tweens:[],createTween:function(e,n){var i=oe.Tween(t,u.opts,e,n,u.opts.specialEasing[e]||u.opts.easing);return u.tweens.push(i),i},stop:function(e){var n=0,i=e?u.tweens.length:0;if(r)return this;for(r=!0;i>n;n++)u.tweens[n].run(1);return e?(s.notifyWith(t,[u,1,0]),s.resolveWith(t,[u,e])):s.rejectWith(t,[u,e]),this}}),c=u.props;for(W(c,u.opts.specialEasing);a>o;o++)if(i=L.prefilters[o].call(u,t,c,u.opts))return oe.isFunction(i.stop)&&(oe._queueHooks(u.elem,u.opts.queue).stop=oe.proxy(i.stop,i)),i;return oe.map(c,H,u),oe.isFunction(u.opts.start)&&u.opts.start.call(t,u),oe.fx.timer(oe.extend(l,{elem:t,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function z(t){return t.getAttribute&&t.getAttribute("class")||""}function R(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var i,r=0,o=e.toLowerCase().match(we)||[];if(oe.isFunction(n))for(;i=o[r++];)"+"===i[0]?(i=i.slice(1)||"*",(t[i]=t[i]||[]).unshift(n)):(t[i]=t[i]||[]).push(n)}}function j(t,e,n,i){function r(s){var l;return o[s]=!0,oe.each(t[s]||[],function(t,s){var u=s(e,n,i);return"string"!=typeof u||a||o[u]?a?!(l=u):void 0:(e.dataTypes.unshift(u),r(u),!1)}),l}var o={},a=t===Dn;return r(e.dataTypes[0])||!o["*"]&&r("*")}function q(t,e){var n,i,r=oe.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((r[n]?t:i||(i={}))[n]=e[n]);return i&&oe.extend(!0,t,i),t}function V(t,e,n){for(var i,r,o,a,s=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=t.mimeType||e.getResponseHeader("Content-Type"));if(i)for(r in s)if(s[r]&&s[r].test(i)){l.unshift(r);break}if(l[0]in n)o=l[0];else{for(r in n){if(!l[0]||t.converters[r+" "+l[0]]){o=r;break}a||(a=r)}o=o||a}return o?(o!==l[0]&&l.unshift(o),n[o]):void 0}function B(t,e,n,i){var r,o,a,s,l,u={},c=t.dataTypes.slice();if(c[1])for(a in t.converters)u[a.toLowerCase()]=t.converters[a];for(o=c.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!l&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(r in u)if(s=r.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[r]:u[r]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&t["throws"])e=a(e);else try{e=a(e)}catch(d){return{state:"parsererror",error:a?d:"No conversion from "+l+" to "+o}}}return{state:"success",data:e}}function U(t,e,n,i){var r;if(oe.isArray(e))oe.each(e,function(e,r){n||En.test(t)?i(t,r):U(t+"["+("object"==typeof r&&null!=r?e:"")+"]",r,n,i)});else if(n||"object"!==oe.type(e))i(t,e);else for(r in e)U(t+"["+r+"]",e[r],n,i)}function Y(t){return oe.isWindow(t)?t:9===t.nodeType&&t.defaultView}var G=[],X=t.document,K=G.slice,Z=G.concat,Q=G.push,J=G.indexOf,te={},ee=te.toString,ne=te.hasOwnProperty,ie={},re="2.2.3",oe=function(t,e){return new oe.fn.init(t,e)},ae=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,se=/^-ms-/,le=/-([\da-z])/gi,ue=function(t,e){return e.toUpperCase()};oe.fn=oe.prototype={jquery:re,constructor:oe,selector:"",length:0,toArray:function(){return K.call(this)},get:function(t){return null!=t?0>t?this[t+this.length]:this[t]:K.call(this)},pushStack:function(t){var e=oe.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t){return oe.each(this,t)},map:function(t){return this.pushStack(oe.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return this.pushStack(K.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,n=+t+(0>t?e:0);return this.pushStack(n>=0&&e>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:Q,sort:G.sort,splice:G.splice},oe.extend=oe.fn.extend=function(){var t,e,n,i,r,o,a=arguments[0]||{},s=1,l=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[s]||{},s++),"object"==typeof a||oe.isFunction(a)||(a={}),s===l&&(a=this,s--);l>s;s++)if(null!=(t=arguments[s]))for(e in t)n=a[e],i=t[e],a!==i&&(u&&i&&(oe.isPlainObject(i)||(r=oe.isArray(i)))?(r?(r=!1,o=n&&oe.isArray(n)?n:[]):o=n&&oe.isPlainObject(n)?n:{},a[e]=oe.extend(u,o,i)):void 0!==i&&(a[e]=i));return a},oe.extend({expando:"jQuery"+(re+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isFunction:function(t){return"function"===oe.type(t)},isArray:Array.isArray,isWindow:function(t){return null!=t&&t===t.window},isNumeric:function(t){var e=t&&t.toString();return!oe.isArray(t)&&e-parseFloat(e)+1>=0},isPlainObject:function(t){var e;if("object"!==oe.type(t)||t.nodeType||oe.isWindow(t))return!1;if(t.constructor&&!ne.call(t,"constructor")&&!ne.call(t.constructor.prototype||{},"isPrototypeOf"))return!1;for(e in t);return void 0===e||ne.call(t,e)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?te[ee.call(t)]||"object":typeof t},globalEval:function(t){var e,n=eval;t=oe.trim(t),t&&(1===t.indexOf("use strict")?(e=X.createElement("script"),e.text=t,X.head.appendChild(e).parentNode.removeChild(e)):n(t))},camelCase:function(t){return t.replace(se,"ms-").replace(le,ue)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e){var i,r=0;if(n(t))for(i=t.length;i>r&&e.call(t[r],r,t[r])!==!1;r++);else for(r in t)if(e.call(t[r],r,t[r])===!1)break;return t},trim:function(t){return null==t?"":(t+"").replace(ae,"")},makeArray:function(t,e){var i=e||[];return null!=t&&(n(Object(t))?oe.merge(i,"string"==typeof t?[t]:t):Q.call(i,t)),i},inArray:function(t,e,n){return null==e?-1:J.call(e,t,n)},merge:function(t,e){for(var n=+e.length,i=0,r=t.length;n>i;i++)t[r++]=e[i];return t.length=r,t},grep:function(t,e,n){for(var i,r=[],o=0,a=t.length,s=!n;a>o;o++)i=!e(t[o],o),i!==s&&r.push(t[o]);return r},map:function(t,e,i){var r,o,a=0,s=[];if(n(t))for(r=t.length;r>a;a++)o=e(t[a],a,i),null!=o&&s.push(o);else for(a in t)o=e(t[a],a,i),null!=o&&s.push(o);return Z.apply([],s)},guid:1,proxy:function(t,e){var n,i,r;return"string"==typeof e&&(n=t[e],e=t,t=n),oe.isFunction(t)?(i=K.call(arguments,2),r=function(){return t.apply(e||this,i.concat(K.call(arguments)))},r.guid=t.guid=t.guid||oe.guid++,r):void 0},now:Date.now,support:ie}),"function"==typeof Symbol&&(oe.fn[Symbol.iterator]=G[Symbol.iterator]),oe.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){te["[object "+e+"]"]=e.toLowerCase()});var ce=/*!
 * Sizzle CSS Selector Engine v2.2.1
 * http://sizzlejs.com/
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license
 * http://jquery.org/license
 *
 * Date: 2015-10-17
 */
function(t){function e(t,e,n,i){var r,o,a,s,l,u,d,f,p=e&&e.ownerDocument,g=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==g&&9!==g&&11!==g)return n;if(!i&&((e?e.ownerDocument||e:z)!==O&&E(e),e=e||O,I)){if(11!==g&&(u=ve.exec(t)))if(r=u[1]){if(9===g){if(!(a=e.getElementById(r)))return n;if(a.id===r)return n.push(a),n}else if(p&&(a=p.getElementById(r))&&W(e,a)&&a.id===r)return n.push(a),n}else{if(u[2])return Q.apply(n,e.getElementsByTagName(t)),n;if((r=u[3])&&w.getElementsByClassName&&e.getElementsByClassName)return Q.apply(n,e.getElementsByClassName(r)),n}if(!(!w.qsa||B[t+" "]||P&&P.test(t))){if(1!==g)p=e,f=t;else if("object"!==e.nodeName.toLowerCase()){for((s=e.getAttribute("id"))?s=s.replace(be,"\\$&"):e.setAttribute("id",s=L),d=C(t),o=d.length,l=he.test(s)?"#"+s:"[id='"+s+"']";o--;)d[o]=l+" "+h(d[o]);f=d.join(","),p=ye.test(t)&&c(e.parentNode)||e}if(f)try{return Q.apply(n,p.querySelectorAll(f)),n}catch(m){}finally{s===L&&e.removeAttribute("id")}}}return D(t.replace(se,"$1"),e,n,i)}function n(){function t(n,i){return e.push(n+" ")>$.cacheLength&&delete t[e.shift()],t[n+" "]=i}var e=[];return t}function i(t){return t[L]=!0,t}function r(t){var e=O.createElement("div");try{return!!t(e)}catch(n){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function o(t,e){for(var n=t.split("|"),i=n.length;i--;)$.attrHandle[n[i]]=e}function a(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||Y)-(~t.sourceIndex||Y);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function s(t){return function(e){var n=e.nodeName.toLowerCase();return"input"===n&&e.type===t}}function l(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function u(t){return i(function(e){return e=+e,i(function(n,i){for(var r,o=t([],n.length,e),a=o.length;a--;)n[r=o[a]]&&(n[r]=!(i[r]=n[r]))})})}function c(t){return t&&"undefined"!=typeof t.getElementsByTagName&&t}function d(){}function h(t){for(var e=0,n=t.length,i="";n>e;e++)i+=t[e].value;return i}function f(t,e,n){var i=e.dir,r=n&&"parentNode"===i,o=j++;return e.first?function(e,n,o){for(;e=e[i];)if(1===e.nodeType||r)return t(e,n,o)}:function(e,n,a){var s,l,u,c=[R,o];if(a){for(;e=e[i];)if((1===e.nodeType||r)&&t(e,n,a))return!0}else for(;e=e[i];)if(1===e.nodeType||r){if(u=e[L]||(e[L]={}),l=u[e.uniqueID]||(u[e.uniqueID]={}),(s=l[i])&&s[0]===R&&s[1]===o)return c[2]=s[2];if(l[i]=c,c[2]=t(e,n,a))return!0}}}function p(t){return t.length>1?function(e,n,i){for(var r=t.length;r--;)if(!t[r](e,n,i))return!1;return!0}:t[0]}function g(t,n,i){for(var r=0,o=n.length;o>r;r++)e(t,n[r],i);return i}function m(t,e,n,i,r){for(var o,a=[],s=0,l=t.length,u=null!=e;l>s;s++)(o=t[s])&&(!n||n(o,i,r))&&(a.push(o),u&&e.push(s));return a}function v(t,e,n,r,o,a){return r&&!r[L]&&(r=v(r)),o&&!o[L]&&(o=v(o,a)),i(function(i,a,s,l){var u,c,d,h=[],f=[],p=a.length,v=i||g(e||"*",s.nodeType?[s]:s,[]),y=!t||!i&&e?v:m(v,h,t,s,l),b=n?o||(i?t:p||r)?[]:a:y;if(n&&n(y,b,s,l),r)for(u=m(b,f),r(u,[],s,l),c=u.length;c--;)(d=u[c])&&(b[f[c]]=!(y[f[c]]=d));if(i){if(o||t){if(o){for(u=[],c=b.length;c--;)(d=b[c])&&u.push(y[c]=d);o(null,b=[],u,l)}for(c=b.length;c--;)(d=b[c])&&(u=o?te(i,d):h[c])>-1&&(i[u]=!(a[u]=d))}}else b=m(b===a?b.splice(p,b.length):b),o?o(null,a,b,l):Q.apply(a,b)})}function y(t){for(var e,n,i,r=t.length,o=$.relative[t[0].type],a=o||$.relative[" "],s=o?1:0,l=f(function(t){return t===e},a,!0),u=f(function(t){return te(e,t)>-1},a,!0),c=[function(t,n,i){var r=!o&&(i||n!==S)||((e=n).nodeType?l(t,n,i):u(t,n,i));return e=null,r}];r>s;s++)if(n=$.relative[t[s].type])c=[f(p(c),n)];else{if(n=$.filter[t[s].type].apply(null,t[s].matches),n[L]){for(i=++s;r>i&&!$.relative[t[i].type];i++);return v(s>1&&p(c),s>1&&h(t.slice(0,s-1).concat({value:" "===t[s-2].type?"*":""})).replace(se,"$1"),n,i>s&&y(t.slice(s,i)),r>i&&y(t=t.slice(i)),r>i&&h(t))}c.push(n)}return p(c)}function b(t,n){var r=n.length>0,o=t.length>0,a=function(i,a,s,l,u){var c,d,h,f=0,p="0",g=i&&[],v=[],y=S,b=i||o&&$.find.TAG("*",u),x=R+=null==y?1:Math.random()||.1,w=b.length;for(u&&(S=a===O||a||u);p!==w&&null!=(c=b[p]);p++){if(o&&c){for(d=0,a||c.ownerDocument===O||(E(c),s=!I);h=t[d++];)if(h(c,a||O,s)){l.push(c);break}u&&(R=x)}r&&((c=!h&&c)&&f--,i&&g.push(c))}if(f+=p,r&&p!==f){for(d=0;h=n[d++];)h(g,v,a,s);if(i){if(f>0)for(;p--;)g[p]||v[p]||(v[p]=K.call(l));v=m(v)}Q.apply(l,v),u&&!i&&v.length>0&&f+n.length>1&&e.uniqueSort(l)}return u&&(R=x,S=y),g};return r?i(a):a}var x,w,$,k,_,C,M,D,S,T,A,E,O,N,I,P,H,F,W,L="sizzle"+1*new Date,z=t.document,R=0,j=0,q=n(),V=n(),B=n(),U=function(t,e){return t===e&&(A=!0),0},Y=1<<31,G={}.hasOwnProperty,X=[],K=X.pop,Z=X.push,Q=X.push,J=X.slice,te=function(t,e){for(var n=0,i=t.length;i>n;n++)if(t[n]===e)return n;return-1},ee="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",ie="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",re="\\["+ne+"*("+ie+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ie+"))|)"+ne+"*\\]",oe=":("+ie+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+re+")*)|.*)\\)|)",ae=new RegExp(ne+"+","g"),se=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),le=new RegExp("^"+ne+"*,"+ne+"*"),ue=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),ce=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),de=new RegExp(oe),he=new RegExp("^"+ie+"$"),fe={ID:new RegExp("^#("+ie+")"),CLASS:new RegExp("^\\.("+ie+")"),TAG:new RegExp("^("+ie+"|[*])"),ATTR:new RegExp("^"+re),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+ee+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},pe=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,me=/^[^{]+\{\s*\[native \w/,ve=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ye=/[+~]/,be=/'|\\/g,xe=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),we=function(t,e,n){var i="0x"+e-65536;return i!==i||n?e:0>i?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},$e=function(){E()};try{Q.apply(X=J.call(z.childNodes),z.childNodes),X[z.childNodes.length].nodeType}catch(ke){Q={apply:X.length?function(t,e){Z.apply(t,J.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}w=e.support={},_=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return e?"HTML"!==e.nodeName:!1},E=e.setDocument=function(t){var e,n,i=t?t.ownerDocument||t:z;return i!==O&&9===i.nodeType&&i.documentElement?(O=i,N=O.documentElement,I=!_(O),(n=O.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",$e,!1):n.attachEvent&&n.attachEvent("onunload",$e)),w.attributes=r(function(t){return t.className="i",!t.getAttribute("className")}),w.getElementsByTagName=r(function(t){return t.appendChild(O.createComment("")),!t.getElementsByTagName("*").length}),w.getElementsByClassName=me.test(O.getElementsByClassName),w.getById=r(function(t){return N.appendChild(t).id=L,!O.getElementsByName||!O.getElementsByName(L).length}),w.getById?($.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&I){var n=e.getElementById(t);return n?[n]:[]}},$.filter.ID=function(t){var e=t.replace(xe,we);return function(t){return t.getAttribute("id")===e}}):(delete $.find.ID,$.filter.ID=function(t){var e=t.replace(xe,we);return function(t){var n="undefined"!=typeof t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}}),$.find.TAG=w.getElementsByTagName?function(t,e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t):w.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],r=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},$.find.CLASS=w.getElementsByClassName&&function(t,e){return"undefined"!=typeof e.getElementsByClassName&&I?e.getElementsByClassName(t):void 0},H=[],P=[],(w.qsa=me.test(O.querySelectorAll))&&(r(function(t){N.appendChild(t).innerHTML="<a id='"+L+"'></a><select id='"+L+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&P.push("[*^$]="+ne+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||P.push("\\["+ne+"*(?:value|"+ee+")"),t.querySelectorAll("[id~="+L+"-]").length||P.push("~="),t.querySelectorAll(":checked").length||P.push(":checked"),t.querySelectorAll("a#"+L+"+*").length||P.push(".#.+[+~]")}),r(function(t){var e=O.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&P.push("name"+ne+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||P.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),P.push(",.*:")})),(w.matchesSelector=me.test(F=N.matches||N.webkitMatchesSelector||N.mozMatchesSelector||N.oMatchesSelector||N.msMatchesSelector))&&r(function(t){w.disconnectedMatch=F.call(t,"div"),F.call(t,"[s!='']:x"),H.push("!=",oe)}),P=P.length&&new RegExp(P.join("|")),H=H.length&&new RegExp(H.join("|")),e=me.test(N.compareDocumentPosition),W=e||me.test(N.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},U=e?function(t,e){if(t===e)return A=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n?n:(n=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&n||!w.sortDetached&&e.compareDocumentPosition(t)===n?t===O||t.ownerDocument===z&&W(z,t)?-1:e===O||e.ownerDocument===z&&W(z,e)?1:T?te(T,t)-te(T,e):0:4&n?-1:1)}:function(t,e){if(t===e)return A=!0,0;var n,i=0,r=t.parentNode,o=e.parentNode,s=[t],l=[e];if(!r||!o)return t===O?-1:e===O?1:r?-1:o?1:T?te(T,t)-te(T,e):0;if(r===o)return a(t,e);for(n=t;n=n.parentNode;)s.unshift(n);for(n=e;n=n.parentNode;)l.unshift(n);for(;s[i]===l[i];)i++;return i?a(s[i],l[i]):s[i]===z?-1:l[i]===z?1:0},O):O},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==O&&E(t),n=n.replace(ce,"='$1']"),!(!w.matchesSelector||!I||B[n+" "]||H&&H.test(n)||P&&P.test(n)))try{var i=F.call(t,n);if(i||w.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(r){}return e(n,O,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==O&&E(t),W(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==O&&E(t);var n=$.attrHandle[e.toLowerCase()],i=n&&G.call($.attrHandle,e.toLowerCase())?n(t,e,!I):void 0;return void 0!==i?i:w.attributes||!I?t.getAttribute(e):(i=t.getAttributeNode(e))&&i.specified?i.value:null},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,n=[],i=0,r=0;if(A=!w.detectDuplicates,T=!w.sortStable&&t.slice(0),t.sort(U),A){for(;e=t[r++];)e===t[r]&&(i=n.push(r));for(;i--;)t.splice(n[i],1)}return T=null,t},k=e.getText=function(t){var e,n="",i=0,r=t.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=k(t)}else if(3===r||4===r)return t.nodeValue}else for(;e=t[i++];)n+=k(e);return n},$=e.selectors={cacheLength:50,createPseudo:i,match:fe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(xe,we),t[3]=(t[3]||t[4]||t[5]||"").replace(xe,we),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return fe.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&de.test(n)&&(e=C(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(xe,we).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=q[t+" "];return e||(e=new RegExp("(^|"+ne+")"+t+"("+ne+"|$)"))&&q(t,function(t){return e.test("string"==typeof t.className&&t.className||"undefined"!=typeof t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,n,i){return function(r){var o=e.attr(r,t);return null==o?"!="===n:n?(o+="","="===n?o===i:"!="===n?o!==i:"^="===n?i&&0===o.indexOf(i):"*="===n?i&&o.indexOf(i)>-1:"$="===n?i&&o.slice(-i.length)===i:"~="===n?(" "+o.replace(ae," ")+" ").indexOf(i)>-1:"|="===n?o===i||o.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(t,e,n,i,r){var o="nth"!==t.slice(0,3),a="last"!==t.slice(-4),s="of-type"===e;return 1===i&&0===r?function(t){return!!t.parentNode}:function(e,n,l){var u,c,d,h,f,p,g=o!==a?"nextSibling":"previousSibling",m=e.parentNode,v=s&&e.nodeName.toLowerCase(),y=!l&&!s,b=!1;if(m){if(o){for(;g;){for(h=e;h=h[g];)if(s?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;p=g="only"===t&&!p&&"nextSibling"}return!0}if(p=[a?m.firstChild:m.lastChild],a&&y){for(h=m,d=h[L]||(h[L]={}),c=d[h.uniqueID]||(d[h.uniqueID]={}),u=c[t]||[],f=u[0]===R&&u[1],b=f&&u[2],h=f&&m.childNodes[f];h=++f&&h&&h[g]||(b=f=0)||p.pop();)if(1===h.nodeType&&++b&&h===e){c[t]=[R,f,b];break}}else if(y&&(h=e,d=h[L]||(h[L]={}),c=d[h.uniqueID]||(d[h.uniqueID]={}),u=c[t]||[],f=u[0]===R&&u[1],b=f),b===!1)for(;(h=++f&&h&&h[g]||(b=f=0)||p.pop())&&((s?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++b||(y&&(d=h[L]||(h[L]={}),c=d[h.uniqueID]||(d[h.uniqueID]={}),c[t]=[R,b]),h!==e)););return b-=r,b===i||b%i===0&&b/i>=0}}},PSEUDO:function(t,n){var r,o=$.pseudos[t]||$.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return o[L]?o(n):o.length>1?(r=[t,t,"",n],$.setFilters.hasOwnProperty(t.toLowerCase())?i(function(t,e){for(var i,r=o(t,n),a=r.length;a--;)i=te(t,r[a]),t[i]=!(e[i]=r[a])}):function(t){return o(t,0,r)}):o}},pseudos:{not:i(function(t){var e=[],n=[],r=M(t.replace(se,"$1"));return r[L]?i(function(t,e,n,i){for(var o,a=r(t,null,i,[]),s=t.length;s--;)(o=a[s])&&(t[s]=!(e[s]=o))}):function(t,i,o){return e[0]=t,r(e,null,o,n),e[0]=null,!n.pop()}}),has:i(function(t){return function(n){return e(t,n).length>0}}),contains:i(function(t){return t=t.replace(xe,we),function(e){return(e.textContent||e.innerText||k(e)).indexOf(t)>-1}}),lang:i(function(t){return he.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(xe,we).toLowerCase(),function(e){var n;do if(n=I?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return n=n.toLowerCase(),n===t||0===n.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===N},focus:function(t){return t===O.activeElement&&(!O.hasFocus||O.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return t.disabled===!1},disabled:function(t){return t.disabled===!0},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,t.selected===!0},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!$.pseudos.empty(t)},header:function(t){return ge.test(t.nodeName)},input:function(t){return pe.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:u(function(){return[0]}),last:u(function(t,e){return[e-1]}),eq:u(function(t,e,n){return[0>n?n+e:n]}),even:u(function(t,e){for(var n=0;e>n;n+=2)t.push(n);return t}),odd:u(function(t,e){for(var n=1;e>n;n+=2)t.push(n);return t}),lt:u(function(t,e,n){for(var i=0>n?n+e:n;--i>=0;)t.push(i);return t}),gt:u(function(t,e,n){for(var i=0>n?n+e:n;++i<e;)t.push(i);return t})}},$.pseudos.nth=$.pseudos.eq;for(x in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})$.pseudos[x]=s(x);for(x in{submit:!0,reset:!0})$.pseudos[x]=l(x);return d.prototype=$.filters=$.pseudos,$.setFilters=new d,C=e.tokenize=function(t,n){var i,r,o,a,s,l,u,c=V[t+" "];if(c)return n?0:c.slice(0);for(s=t,l=[],u=$.preFilter;s;){(!i||(r=le.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(o=[])),i=!1,(r=ue.exec(s))&&(i=r.shift(),o.push({value:i,type:r[0].replace(se," ")}),s=s.slice(i.length));for(a in $.filter)!(r=fe[a].exec(s))||u[a]&&!(r=u[a](r))||(i=r.shift(),o.push({value:i,type:a,matches:r}),s=s.slice(i.length));if(!i)break}return n?s.length:s?e.error(t):V(t,l).slice(0)},M=e.compile=function(t,e){var n,i=[],r=[],o=B[t+" "];if(!o){for(e||(e=C(t)),n=e.length;n--;)o=y(e[n]),o[L]?i.push(o):r.push(o);o=B(t,b(r,i)),o.selector=t}return o},D=e.select=function(t,e,n,i){var r,o,a,s,l,u="function"==typeof t&&t,d=!i&&C(t=u.selector||t);if(n=n||[],1===d.length){if(o=d[0]=d[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&w.getById&&9===e.nodeType&&I&&$.relative[o[1].type]){if(e=($.find.ID(a.matches[0].replace(xe,we),e)||[])[0],!e)return n;u&&(e=e.parentNode),t=t.slice(o.shift().value.length)}for(r=fe.needsContext.test(t)?0:o.length;r--&&(a=o[r],!$.relative[s=a.type]);)if((l=$.find[s])&&(i=l(a.matches[0].replace(xe,we),ye.test(o[0].type)&&c(e.parentNode)||e))){if(o.splice(r,1),t=i.length&&h(o),!t)return Q.apply(n,i),n;break}}return(u||M(t,d))(i,e,!I,n,!e||ye.test(t)&&c(e.parentNode)||e),n},w.sortStable=L.split("").sort(U).join("")===L,w.detectDuplicates=!!A,E(),w.sortDetached=r(function(t){return 1&t.compareDocumentPosition(O.createElement("div"))}),r(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||o("type|href|height|width",function(t,e,n){return n?void 0:t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),w.attributes&&r(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||o("value",function(t,e,n){return n||"input"!==t.nodeName.toLowerCase()?void 0:t.defaultValue}),r(function(t){return null==t.getAttribute("disabled")})||o(ee,function(t,e,n){var i;return n?void 0:t[e]===!0?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null}),e}(t);oe.find=ce,oe.expr=ce.selectors,oe.expr[":"]=oe.expr.pseudos,oe.uniqueSort=oe.unique=ce.uniqueSort,oe.text=ce.getText,oe.isXMLDoc=ce.isXML,oe.contains=ce.contains;var de=function(t,e,n){for(var i=[],r=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(r&&oe(t).is(n))break;i.push(t)}return i},he=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},fe=oe.expr.match.needsContext,pe=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,ge=/^.[^:#\[\.,]*$/;oe.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?oe.find.matchesSelector(i,t)?[i]:[]:oe.find.matches(t,oe.grep(e,function(t){return 1===t.nodeType}))},oe.fn.extend({find:function(t){var e,n=this.length,i=[],r=this;if("string"!=typeof t)return this.pushStack(oe(t).filter(function(){for(e=0;n>e;e++)if(oe.contains(r[e],this))return!0}));for(e=0;n>e;e++)oe.find(t,r[e],i);return i=this.pushStack(n>1?oe.unique(i):i),i.selector=this.selector?this.selector+" "+t:t,i},filter:function(t){return this.pushStack(i(this,t||[],!1))},not:function(t){return this.pushStack(i(this,t||[],!0))},is:function(t){return!!i(this,"string"==typeof t&&fe.test(t)?oe(t):t||[],!1).length}});var me,ve=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ye=oe.fn.init=function(t,e,n){var i,r;if(!t)return this;if(n=n||me,"string"==typeof t){if(i="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:ve.exec(t),!i||!i[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(i[1]){if(e=e instanceof oe?e[0]:e,oe.merge(this,oe.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:X,!0)),pe.test(i[1])&&oe.isPlainObject(e))for(i in e)oe.isFunction(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}return r=X.getElementById(i[2]),r&&r.parentNode&&(this.length=1,this[0]=r),this.context=X,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):oe.isFunction(t)?void 0!==n.ready?n.ready(t):t(oe):(void 0!==t.selector&&(this.selector=t.selector,this.context=t.context),oe.makeArray(t,this))};ye.prototype=oe.fn,me=oe(X);var be=/^(?:parents|prev(?:Until|All))/,xe={children:!0,contents:!0,next:!0,prev:!0};oe.fn.extend({has:function(t){var e=oe(t,this),n=e.length;return this.filter(function(){for(var t=0;n>t;t++)if(oe.contains(this,e[t]))return!0})},closest:function(t,e){for(var n,i=0,r=this.length,o=[],a=fe.test(t)||"string"!=typeof t?oe(t,e||this.context):0;r>i;i++)for(n=this[i];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&oe.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?oe.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?J.call(oe(t),this[0]):J.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(oe.uniqueSort(oe.merge(this.get(),oe(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),oe.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return de(t,"parentNode")},parentsUntil:function(t,e,n){return de(t,"parentNode",n)},next:function(t){return r(t,"nextSibling")},prev:function(t){return r(t,"previousSibling")},nextAll:function(t){return de(t,"nextSibling")},prevAll:function(t){return de(t,"previousSibling")},nextUntil:function(t,e,n){return de(t,"nextSibling",n)},prevUntil:function(t,e,n){return de(t,"previousSibling",n)},siblings:function(t){return he((t.parentNode||{}).firstChild,t)},children:function(t){return he(t.firstChild)},contents:function(t){return t.contentDocument||oe.merge([],t.childNodes)}},function(t,e){oe.fn[t]=function(n,i){var r=oe.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=oe.filter(i,r)),this.length>1&&(xe[t]||oe.uniqueSort(r),be.test(t)&&r.reverse()),this.pushStack(r)}});var we=/\S+/g;oe.Callbacks=function(t){t="string"==typeof t?o(t):oe.extend({},t);var e,n,i,r,a=[],s=[],l=-1,u=function(){for(r=t.once,i=e=!0;s.length;l=-1)for(n=s.shift();++l<a.length;)a[l].apply(n[0],n[1])===!1&&t.stopOnFalse&&(l=a.length,n=!1);t.memory||(n=!1),e=!1,r&&(a=n?[]:"")},c={add:function(){return a&&(n&&!e&&(l=a.length-1,s.push(n)),function i(e){oe.each(e,function(e,n){oe.isFunction(n)?t.unique&&c.has(n)||a.push(n):n&&n.length&&"string"!==oe.type(n)&&i(n)})}(arguments),n&&!e&&u()),this},remove:function(){return oe.each(arguments,function(t,e){for(var n;(n=oe.inArray(e,a,n))>-1;)a.splice(n,1),l>=n&&l--}),this},has:function(t){return t?oe.inArray(t,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return r=s=[],a=n="",this},disabled:function(){return!a},lock:function(){return r=s=[],n||(a=n=""),this},locked:function(){return!!r},fireWith:function(t,n){return r||(n=n||[],n=[t,n.slice?n.slice():n],s.push(n),e||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},oe.extend({Deferred:function(t){var e=[["resolve","done",oe.Callbacks("once memory"),"resolved"],["reject","fail",oe.Callbacks("once memory"),"rejected"],["notify","progress",oe.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return r.done(arguments).fail(arguments),this},then:function(){var t=arguments;return oe.Deferred(function(n){oe.each(e,function(e,o){var a=oe.isFunction(t[e])&&t[e];r[o[1]](function(){var t=a&&a.apply(this,arguments);t&&oe.isFunction(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[o[0]+"With"](this===i?n.promise():this,a?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?oe.extend(t,i):i}},r={};return i.pipe=i.then,oe.each(e,function(t,o){var a=o[2],s=o[3];i[o[1]]=a.add,s&&a.add(function(){n=s},e[1^t][2].disable,e[2][2].lock),r[o[0]]=function(){return r[o[0]+"With"](this===r?i:this,arguments),this},r[o[0]+"With"]=a.fireWith}),i.promise(r),t&&t.call(r,r),r},when:function(t){var e,n,i,r=0,o=K.call(arguments),a=o.length,s=1!==a||t&&oe.isFunction(t.promise)?a:0,l=1===s?t:oe.Deferred(),u=function(t,n,i){return function(r){n[t]=this,i[t]=arguments.length>1?K.call(arguments):r,i===e?l.notifyWith(n,i):--s||l.resolveWith(n,i)}};if(a>1)for(e=new Array(a),n=new Array(a),i=new Array(a);a>r;r++)o[r]&&oe.isFunction(o[r].promise)?o[r].promise().progress(u(r,n,e)).done(u(r,i,o)).fail(l.reject):--s;return s||l.resolveWith(i,o),l.promise()}});var $e;oe.fn.ready=function(t){return oe.ready.promise().done(t),this},oe.extend({isReady:!1,readyWait:1,holdReady:function(t){t?oe.readyWait++:oe.ready(!0)},ready:function(t){(t===!0?--oe.readyWait:oe.isReady)||(oe.isReady=!0,t!==!0&&--oe.readyWait>0||($e.resolveWith(X,[oe]),oe.fn.triggerHandler&&(oe(X).triggerHandler("ready"),oe(X).off("ready"))))}}),oe.ready.promise=function(e){return $e||($e=oe.Deferred(),"complete"===X.readyState||"loading"!==X.readyState&&!X.documentElement.doScroll?t.setTimeout(oe.ready):(X.addEventListener("DOMContentLoaded",a),t.addEventListener("load",a))),$e.promise(e)},oe.ready.promise();var ke=function(t,e,n,i,r,o,a){var s=0,l=t.length,u=null==n;if("object"===oe.type(n)){r=!0;for(s in n)ke(t,e,s,n[s],!0,o,a)}else if(void 0!==i&&(r=!0,oe.isFunction(i)||(a=!0),u&&(a?(e.call(t,i),e=null):(u=e,e=function(t,e,n){return u.call(oe(t),n)})),e))for(;l>s;s++)e(t[s],n,a?i:i.call(t[s],s,e(t[s],n)));return r?t:u?e.call(t):l?e(t[0],n):o},_e=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};s.uid=1,s.prototype={register:function(t,e){var n=e||{};return t.nodeType?t[this.expando]=n:Object.defineProperty(t,this.expando,{value:n,writable:!0,configurable:!0}),t[this.expando]},cache:function(t){if(!_e(t))return{};var e=t[this.expando];return e||(e={},_e(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var i,r=this.cache(t);if("string"==typeof e)r[e]=n;else for(i in e)r[i]=e[i];return r},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][e]},access:function(t,e,n){var i;return void 0===e||e&&"string"==typeof e&&void 0===n?(i=this.get(t,e),void 0!==i?i:this.get(t,oe.camelCase(e))):(this.set(t,e,n),void 0!==n?n:e)},remove:function(t,e){var n,i,r,o=t[this.expando];if(void 0!==o){if(void 0===e)this.register(t);else{oe.isArray(e)?i=e.concat(e.map(oe.camelCase)):(r=oe.camelCase(e),e in o?i=[e,r]:(i=r,i=i in o?[i]:i.match(we)||[])),n=i.length;for(;n--;)delete o[i[n]]}(void 0===e||oe.isEmptyObject(o))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!oe.isEmptyObject(e)}};var Ce=new s,Me=new s,De=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Se=/[A-Z]/g;oe.extend({hasData:function(t){return Me.hasData(t)||Ce.hasData(t)},data:function(t,e,n){return Me.access(t,e,n)},removeData:function(t,e){Me.remove(t,e)},_data:function(t,e,n){return Ce.access(t,e,n)},_removeData:function(t,e){Ce.remove(t,e)}}),oe.fn.extend({data:function(t,e){var n,i,r,o=this[0],a=o&&o.attributes;if(void 0===t){if(this.length&&(r=Me.get(o),1===o.nodeType&&!Ce.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&(i=a[n].name,0===i.indexOf("data-")&&(i=oe.camelCase(i.slice(5)),l(o,i,r[i])));Ce.set(o,"hasDataAttrs",!0)}return r}return"object"==typeof t?this.each(function(){Me.set(this,t)}):ke(this,function(e){var n,i;if(o&&void 0===e){if(n=Me.get(o,t)||Me.get(o,t.replace(Se,"-$&").toLowerCase()),void 0!==n)return n;if(i=oe.camelCase(t),n=Me.get(o,i),void 0!==n)return n;if(n=l(o,i,void 0),void 0!==n)return n}else i=oe.camelCase(t),this.each(function(){var n=Me.get(this,i);Me.set(this,i,e),t.indexOf("-")>-1&&void 0!==n&&Me.set(this,t,e)})},null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each(function(){Me.remove(this,t)})}}),oe.extend({queue:function(t,e,n){var i;return t?(e=(e||"fx")+"queue",i=Ce.get(t,e),n&&(!i||oe.isArray(n)?i=Ce.access(t,e,oe.makeArray(n)):i.push(n)),i||[]):void 0},dequeue:function(t,e){e=e||"fx";var n=oe.queue(t,e),i=n.length,r=n.shift(),o=oe._queueHooks(t,e),a=function(){oe.dequeue(t,e)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===e&&n.unshift("inprogress"),delete o.stop,r.call(t,a,o)),!i&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return Ce.get(t,n)||Ce.access(t,n,{empty:oe.Callbacks("once memory").add(function(){Ce.remove(t,[e+"queue",n])})})}}),oe.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?oe.queue(this[0],t):void 0===e?this:this.each(function(){var n=oe.queue(this,t,e);oe._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&oe.dequeue(this,t)})},dequeue:function(t){return this.each(function(){oe.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,i=1,r=oe.Deferred(),o=this,a=this.length,s=function(){--i||r.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";a--;)n=Ce.get(o[a],t+"queueHooks"),n&&n.empty&&(i++,n.empty.add(s));return s(),r.promise(e)}});var Te=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Ae=new RegExp("^(?:([+-])=|)("+Te+")([a-z%]*)$","i"),Ee=["Top","Right","Bottom","Left"],Oe=function(t,e){return t=e||t,"none"===oe.css(t,"display")||!oe.contains(t.ownerDocument,t)},Ne=/^(?:checkbox|radio)$/i,Ie=/<([\w:-]+)/,Pe=/^$|\/(?:java|ecma)script/i,He={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};He.optgroup=He.option,He.tbody=He.tfoot=He.colgroup=He.caption=He.thead,He.th=He.td;var Fe=/<|&#?\w+;/;!function(){var t=X.createDocumentFragment(),e=t.appendChild(X.createElement("div")),n=X.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),e.appendChild(n),ie.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="<textarea>x</textarea>",ie.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var We=/^key/,Le=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ze=/^([^.]*)(?:\.(.+)|)/;oe.event={global:{},add:function(t,e,n,i,r){var o,a,s,l,u,c,d,h,f,p,g,m=Ce.get(t);if(m)for(n.handler&&(o=n,n=o.handler,r=o.selector),n.guid||(n.guid=oe.guid++),(l=m.events)||(l=m.events={}),(a=m.handle)||(a=m.handle=function(e){return"undefined"!=typeof oe&&oe.event.triggered!==e.type?oe.event.dispatch.apply(t,arguments):void 0}),e=(e||"").match(we)||[""],u=e.length;u--;)s=ze.exec(e[u])||[],f=g=s[1],p=(s[2]||"").split(".").sort(),f&&(d=oe.event.special[f]||{},f=(r?d.delegateType:d.bindType)||f,d=oe.event.special[f]||{},c=oe.extend({type:f,origType:g,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&oe.expr.match.needsContext.test(r),namespace:p.join(".")},o),(h=l[f])||(h=l[f]=[],h.delegateCount=0,d.setup&&d.setup.call(t,i,p,a)!==!1||t.addEventListener&&t.addEventListener(f,a)),d.add&&(d.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),r?h.splice(h.delegateCount++,0,c):h.push(c),oe.event.global[f]=!0)},remove:function(t,e,n,i,r){var o,a,s,l,u,c,d,h,f,p,g,m=Ce.hasData(t)&&Ce.get(t);if(m&&(l=m.events)){for(e=(e||"").match(we)||[""],u=e.length;u--;)if(s=ze.exec(e[u])||[],f=g=s[1],p=(s[2]||"").split(".").sort(),f){for(d=oe.event.special[f]||{},f=(i?d.delegateType:d.bindType)||f,h=l[f]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=h.length;o--;)c=h[o],!r&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||i&&i!==c.selector&&("**"!==i||!c.selector)||(h.splice(o,1),c.selector&&h.delegateCount--,d.remove&&d.remove.call(t,c));
a&&!h.length&&(d.teardown&&d.teardown.call(t,p,m.handle)!==!1||oe.removeEvent(t,f,m.handle),delete l[f])}else for(f in l)oe.event.remove(t,f+e[u],n,i,!0);oe.isEmptyObject(l)&&Ce.remove(t,"handle events")}},dispatch:function(t){t=oe.event.fix(t);var e,n,i,r,o,a=[],s=K.call(arguments),l=(Ce.get(this,"events")||{})[t.type]||[],u=oe.event.special[t.type]||{};if(s[0]=t,t.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,t)!==!1){for(a=oe.event.handlers.call(this,t,l),e=0;(r=a[e++])&&!t.isPropagationStopped();)for(t.currentTarget=r.elem,n=0;(o=r.handlers[n++])&&!t.isImmediatePropagationStopped();)(!t.rnamespace||t.rnamespace.test(o.namespace))&&(t.handleObj=o,t.data=o.data,i=((oe.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,s),void 0!==i&&(t.result=i)===!1&&(t.preventDefault(),t.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,t),t.result}},handlers:function(t,e){var n,i,r,o,a=[],s=e.delegateCount,l=t.target;if(s&&l.nodeType&&("click"!==t.type||isNaN(t.button)||t.button<1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==t.type)){for(i=[],n=0;s>n;n++)o=e[n],r=o.selector+" ",void 0===i[r]&&(i[r]=o.needsContext?oe(r,this).index(l)>-1:oe.find(r,this,null,[l]).length),i[r]&&i.push(o);i.length&&a.push({elem:l,handlers:i})}return s<e.length&&a.push({elem:this,handlers:e.slice(s)}),a},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(t,e){return null==t.which&&(t.which=null!=e.charCode?e.charCode:e.keyCode),t}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(t,e){var n,i,r,o=e.button;return null==t.pageX&&null!=e.clientX&&(n=t.target.ownerDocument||X,i=n.documentElement,r=n.body,t.pageX=e.clientX+(i&&i.scrollLeft||r&&r.scrollLeft||0)-(i&&i.clientLeft||r&&r.clientLeft||0),t.pageY=e.clientY+(i&&i.scrollTop||r&&r.scrollTop||0)-(i&&i.clientTop||r&&r.clientTop||0)),t.which||void 0===o||(t.which=1&o?1:2&o?3:4&o?2:0),t}},fix:function(t){if(t[oe.expando])return t;var e,n,i,r=t.type,o=t,a=this.fixHooks[r];for(a||(this.fixHooks[r]=a=Le.test(r)?this.mouseHooks:We.test(r)?this.keyHooks:{}),i=a.props?this.props.concat(a.props):this.props,t=new oe.Event(o),e=i.length;e--;)n=i[e],t[n]=o[n];return t.target||(t.target=X),3===t.target.nodeType&&(t.target=t.target.parentNode),a.filter?a.filter(t,o):t},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==g()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===g()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&oe.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(t){return oe.nodeName(t.target,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},oe.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},oe.Event=function(t,e){return this instanceof oe.Event?(t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&t.returnValue===!1?f:p):this.type=t,e&&oe.extend(this,e),this.timeStamp=t&&t.timeStamp||oe.now(),void(this[oe.expando]=!0)):new oe.Event(t,e)},oe.Event.prototype={constructor:oe.Event,isDefaultPrevented:p,isPropagationStopped:p,isImmediatePropagationStopped:p,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=f,t&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=f,t&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=f,t&&t.stopImmediatePropagation(),this.stopPropagation()}},oe.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,e){oe.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,i=this,r=t.relatedTarget,o=t.handleObj;return(!r||r!==i&&!oe.contains(i,r))&&(t.type=o.origType,n=o.handler.apply(this,arguments),t.type=e),n}}}),oe.fn.extend({on:function(t,e,n,i){return m(this,t,e,n,i)},one:function(t,e,n,i){return m(this,t,e,n,i,1)},off:function(t,e,n){var i,r;if(t&&t.preventDefault&&t.handleObj)return i=t.handleObj,oe(t.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof t){for(r in t)this.off(r,e,t[r]);return this}return(e===!1||"function"==typeof e)&&(n=e,e=void 0),n===!1&&(n=p),this.each(function(){oe.event.remove(this,t,n,e)})}});var Re=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,je=/<script|<style|<link/i,qe=/checked\s*(?:[^=]|=\s*.checked.)/i,Ve=/^true\/(.*)/,Be=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;oe.extend({htmlPrefilter:function(t){return t.replace(Re,"<$1></$2>")},clone:function(t,e,n){var i,r,o,a,s=t.cloneNode(!0),l=oe.contains(t.ownerDocument,t);if(!(ie.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||oe.isXMLDoc(t)))for(a=c(s),o=c(t),i=0,r=o.length;r>i;i++)w(o[i],a[i]);if(e)if(n)for(o=o||c(t),a=a||c(s),i=0,r=o.length;r>i;i++)x(o[i],a[i]);else x(t,s);return a=c(s,"script"),a.length>0&&d(a,!l&&c(t,"script")),s},cleanData:function(t){for(var e,n,i,r=oe.event.special,o=0;void 0!==(n=t[o]);o++)if(_e(n)){if(e=n[Ce.expando]){if(e.events)for(i in e.events)r[i]?oe.event.remove(n,i):oe.removeEvent(n,i,e.handle);n[Ce.expando]=void 0}n[Me.expando]&&(n[Me.expando]=void 0)}}}),oe.fn.extend({domManip:$,detach:function(t){return k(this,t,!0)},remove:function(t){return k(this,t)},text:function(t){return ke(this,function(t){return void 0===t?oe.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=t)})},null,t,arguments.length)},append:function(){return $(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=v(this,t);e.appendChild(t)}})},prepend:function(){return $(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=v(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return $(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return $(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(oe.cleanData(c(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null==t?!1:t,e=null==e?t:e,this.map(function(){return oe.clone(this,t,e)})},html:function(t){return ke(this,function(t){var e=this[0]||{},n=0,i=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!je.test(t)&&!He[(Ie.exec(t)||["",""])[1].toLowerCase()]){t=oe.htmlPrefilter(t);try{for(;i>n;n++)e=this[n]||{},1===e.nodeType&&(oe.cleanData(c(e,!1)),e.innerHTML=t);e=0}catch(r){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=[];return $(this,arguments,function(e){var n=this.parentNode;oe.inArray(this,t)<0&&(oe.cleanData(c(this)),n&&n.replaceChild(e,this))},t)}}),oe.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){oe.fn[t]=function(t){for(var n,i=[],r=oe(t),o=r.length-1,a=0;o>=a;a++)n=a===o?this:this.clone(!0),oe(r[a])[e](n),Q.apply(i,n.get());return this.pushStack(i)}});var Ue,Ye={HTML:"block",BODY:"block"},Ge=/^margin/,Xe=new RegExp("^("+Te+")(?!px)[a-z%]+$","i"),Ke=function(e){var n=e.ownerDocument.defaultView;return n&&n.opener||(n=t),n.getComputedStyle(e)},Ze=function(t,e,n,i){var r,o,a={};for(o in e)a[o]=t.style[o],t.style[o]=e[o];r=n.apply(t,i||[]);for(o in e)t.style[o]=a[o];return r},Qe=X.documentElement;!function(){function e(){s.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",s.innerHTML="",Qe.appendChild(a);var e=t.getComputedStyle(s);n="1%"!==e.top,o="2px"===e.marginLeft,i="4px"===e.width,s.style.marginRight="50%",r="4px"===e.marginRight,Qe.removeChild(a)}var n,i,r,o,a=X.createElement("div"),s=X.createElement("div");s.style&&(s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",ie.clearCloneStyle="content-box"===s.style.backgroundClip,a.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",a.appendChild(s),oe.extend(ie,{pixelPosition:function(){return e(),n},boxSizingReliable:function(){return null==i&&e(),i},pixelMarginRight:function(){return null==i&&e(),r},reliableMarginLeft:function(){return null==i&&e(),o},reliableMarginRight:function(){var e,n=s.appendChild(X.createElement("div"));return n.style.cssText=s.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",n.style.marginRight=n.style.width="0",s.style.width="1px",Qe.appendChild(a),e=!parseFloat(t.getComputedStyle(n).marginRight),Qe.removeChild(a),s.removeChild(n),e}}))}();var Je=/^(none|table(?!-c[ea]).+)/,tn={position:"absolute",visibility:"hidden",display:"block"},en={letterSpacing:"0",fontWeight:"400"},nn=["Webkit","O","Moz","ms"],rn=X.createElement("div").style;oe.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=M(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var r,o,a,s=oe.camelCase(e),l=t.style;return e=oe.cssProps[s]||(oe.cssProps[s]=S(s)||s),a=oe.cssHooks[e]||oe.cssHooks[s],void 0===n?a&&"get"in a&&void 0!==(r=a.get(t,!1,i))?r:l[e]:(o=typeof n,"string"===o&&(r=Ae.exec(n))&&r[1]&&(n=u(t,e,r),o="number"),null!=n&&n===n&&("number"===o&&(n+=r&&r[3]||(oe.cssNumber[s]?"":"px")),ie.clearCloneStyle||""!==n||0!==e.indexOf("background")||(l[e]="inherit"),a&&"set"in a&&void 0===(n=a.set(t,n,i))||(l[e]=n)),void 0)}},css:function(t,e,n,i){var r,o,a,s=oe.camelCase(e);return e=oe.cssProps[s]||(oe.cssProps[s]=S(s)||s),a=oe.cssHooks[e]||oe.cssHooks[s],a&&"get"in a&&(r=a.get(t,!0,n)),void 0===r&&(r=M(t,e,i)),"normal"===r&&e in en&&(r=en[e]),""===n||n?(o=parseFloat(r),n===!0||isFinite(o)?o||0:r):r}}),oe.each(["height","width"],function(t,e){oe.cssHooks[e]={get:function(t,n,i){return n?Je.test(oe.css(t,"display"))&&0===t.offsetWidth?Ze(t,tn,function(){return E(t,e,i)}):E(t,e,i):void 0},set:function(t,n,i){var r,o=i&&Ke(t),a=i&&A(t,e,i,"border-box"===oe.css(t,"boxSizing",!1,o),o);return a&&(r=Ae.exec(n))&&"px"!==(r[3]||"px")&&(t.style[e]=n,n=oe.css(t,e)),T(t,n,a)}}}),oe.cssHooks.marginLeft=D(ie.reliableMarginLeft,function(t,e){return e?(parseFloat(M(t,"marginLeft"))||t.getBoundingClientRect().left-Ze(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px":void 0}),oe.cssHooks.marginRight=D(ie.reliableMarginRight,function(t,e){return e?Ze(t,{display:"inline-block"},M,[t,"marginRight"]):void 0}),oe.each({margin:"",padding:"",border:"Width"},function(t,e){oe.cssHooks[t+e]={expand:function(n){for(var i=0,r={},o="string"==typeof n?n.split(" "):[n];4>i;i++)r[t+Ee[i]+e]=o[i]||o[i-2]||o[0];return r}},Ge.test(t)||(oe.cssHooks[t+e].set=T)}),oe.fn.extend({css:function(t,e){return ke(this,function(t,e,n){var i,r,o={},a=0;if(oe.isArray(e)){for(i=Ke(t),r=e.length;r>a;a++)o[e[a]]=oe.css(t,e[a],!1,i);return o}return void 0!==n?oe.style(t,e,n):oe.css(t,e)},t,e,arguments.length>1)},show:function(){return O(this,!0)},hide:function(){return O(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){Oe(this)?oe(this).show():oe(this).hide()})}}),oe.Tween=N,N.prototype={constructor:N,init:function(t,e,n,i,r,o){this.elem=t,this.prop=n,this.easing=r||oe.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=o||(oe.cssNumber[n]?"":"px")},cur:function(){var t=N.propHooks[this.prop];return t&&t.get?t.get(this):N.propHooks._default.get(this)},run:function(t){var e,n=N.propHooks[this.prop];return this.pos=e=this.options.duration?oe.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):N.propHooks._default.set(this),this}},N.prototype.init.prototype=N.prototype,N.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=oe.css(t.elem,t.prop,""),e&&"auto"!==e?e:0)},set:function(t){oe.fx.step[t.prop]?oe.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[oe.cssProps[t.prop]]&&!oe.cssHooks[t.prop]?t.elem[t.prop]=t.now:oe.style(t.elem,t.prop,t.now+t.unit)}}},N.propHooks.scrollTop=N.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},oe.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},oe.fx=N.prototype.init,oe.fx.step={};var on,an,sn=/^(?:toggle|show|hide)$/,ln=/queueHooks$/;oe.Animation=oe.extend(L,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return u(n.elem,t,Ae.exec(e),n),n}]},tweener:function(t,e){oe.isFunction(t)?(e=t,t=["*"]):t=t.match(we);for(var n,i=0,r=t.length;r>i;i++)n=t[i],L.tweeners[n]=L.tweeners[n]||[],L.tweeners[n].unshift(e)},prefilters:[F],prefilter:function(t,e){e?L.prefilters.unshift(t):L.prefilters.push(t)}}),oe.speed=function(t,e,n){var i=t&&"object"==typeof t?oe.extend({},t):{complete:n||!n&&e||oe.isFunction(t)&&t,duration:t,easing:n&&e||e&&!oe.isFunction(e)&&e};return i.duration=oe.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in oe.fx.speeds?oe.fx.speeds[i.duration]:oe.fx.speeds._default,(null==i.queue||i.queue===!0)&&(i.queue="fx"),i.old=i.complete,i.complete=function(){oe.isFunction(i.old)&&i.old.call(this),i.queue&&oe.dequeue(this,i.queue)},i},oe.fn.extend({fadeTo:function(t,e,n,i){return this.filter(Oe).css("opacity",0).show().end().animate({opacity:e},t,n,i)},animate:function(t,e,n,i){var r=oe.isEmptyObject(t),o=oe.speed(e,n,i),a=function(){var e=L(this,oe.extend({},t),o);(r||Ce.get(this,"finish"))&&e.stop(!0)};return a.finish=a,r||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(t,e,n){var i=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&t!==!1&&this.queue(t||"fx",[]),this.each(function(){var e=!0,r=null!=t&&t+"queueHooks",o=oe.timers,a=Ce.get(this);if(r)a[r]&&a[r].stop&&i(a[r]);else for(r in a)a[r]&&a[r].stop&&ln.test(r)&&i(a[r]);for(r=o.length;r--;)o[r].elem!==this||null!=t&&o[r].queue!==t||(o[r].anim.stop(n),e=!1,o.splice(r,1));(e||!n)&&oe.dequeue(this,t)})},finish:function(t){return t!==!1&&(t=t||"fx"),this.each(function(){var e,n=Ce.get(this),i=n[t+"queue"],r=n[t+"queueHooks"],o=oe.timers,a=i?i.length:0;for(n.finish=!0,oe.queue(this,t,[]),r&&r.stop&&r.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;a>e;e++)i[e]&&i[e].finish&&i[e].finish.call(this);delete n.finish})}}),oe.each(["toggle","show","hide"],function(t,e){var n=oe.fn[e];oe.fn[e]=function(t,i,r){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(P(e,!0),t,i,r)}}),oe.each({slideDown:P("show"),slideUp:P("hide"),slideToggle:P("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){oe.fn[t]=function(t,n,i){return this.animate(e,t,n,i)}}),oe.timers=[],oe.fx.tick=function(){var t,e=0,n=oe.timers;for(on=oe.now();e<n.length;e++)t=n[e],t()||n[e]!==t||n.splice(e--,1);n.length||oe.fx.stop(),on=void 0},oe.fx.timer=function(t){oe.timers.push(t),t()?oe.fx.start():oe.timers.pop()},oe.fx.interval=13,oe.fx.start=function(){an||(an=t.setInterval(oe.fx.tick,oe.fx.interval))},oe.fx.stop=function(){t.clearInterval(an),an=null},oe.fx.speeds={slow:600,fast:200,_default:400},oe.fn.delay=function(e,n){return e=oe.fx?oe.fx.speeds[e]||e:e,n=n||"fx",this.queue(n,function(n,i){var r=t.setTimeout(n,e);i.stop=function(){t.clearTimeout(r)}})},function(){var t=X.createElement("input"),e=X.createElement("select"),n=e.appendChild(X.createElement("option"));t.type="checkbox",ie.checkOn=""!==t.value,ie.optSelected=n.selected,e.disabled=!0,ie.optDisabled=!n.disabled,t=X.createElement("input"),t.value="t",t.type="radio",ie.radioValue="t"===t.value}();var un,cn=oe.expr.attrHandle;oe.fn.extend({attr:function(t,e){return ke(this,oe.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){oe.removeAttr(this,t)})}}),oe.extend({attr:function(t,e,n){var i,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof t.getAttribute?oe.prop(t,e,n):(1===o&&oe.isXMLDoc(t)||(e=e.toLowerCase(),r=oe.attrHooks[e]||(oe.expr.match.bool.test(e)?un:void 0)),void 0!==n?null===n?void oe.removeAttr(t,e):r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:(t.setAttribute(e,n+""),n):r&&"get"in r&&null!==(i=r.get(t,e))?i:(i=oe.find.attr(t,e),null==i?void 0:i))},attrHooks:{type:{set:function(t,e){if(!ie.radioValue&&"radio"===e&&oe.nodeName(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,i,r=0,o=e&&e.match(we);if(o&&1===t.nodeType)for(;n=o[r++];)i=oe.propFix[n]||n,oe.expr.match.bool.test(n)&&(t[i]=!1),t.removeAttribute(n)}}),un={set:function(t,e,n){return e===!1?oe.removeAttr(t,n):t.setAttribute(n,n),n}},oe.each(oe.expr.match.bool.source.match(/\w+/g),function(t,e){var n=cn[e]||oe.find.attr;cn[e]=function(t,e,i){var r,o;return i||(o=cn[e],cn[e]=r,r=null!=n(t,e,i)?e.toLowerCase():null,cn[e]=o),r}});var dn=/^(?:input|select|textarea|button)$/i,hn=/^(?:a|area)$/i;oe.fn.extend({prop:function(t,e){return ke(this,oe.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[oe.propFix[t]||t]})}}),oe.extend({prop:function(t,e,n){var i,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&oe.isXMLDoc(t)||(e=oe.propFix[e]||e,r=oe.propHooks[e]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:t[e]=n:r&&"get"in r&&null!==(i=r.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=oe.find.attr(t,"tabindex");return e?parseInt(e,10):dn.test(t.nodeName)||hn.test(t.nodeName)&&t.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),ie.optSelected||(oe.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),oe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){oe.propFix[this.toLowerCase()]=this});var fn=/[\t\r\n\f]/g;oe.fn.extend({addClass:function(t){var e,n,i,r,o,a,s,l=0;if(oe.isFunction(t))return this.each(function(e){oe(this).addClass(t.call(this,e,z(this)))});if("string"==typeof t&&t)for(e=t.match(we)||[];n=this[l++];)if(r=z(n),i=1===n.nodeType&&(" "+r+" ").replace(fn," ")){for(a=0;o=e[a++];)i.indexOf(" "+o+" ")<0&&(i+=o+" ");s=oe.trim(i),r!==s&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,i,r,o,a,s,l=0;if(oe.isFunction(t))return this.each(function(e){oe(this).removeClass(t.call(this,e,z(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(we)||[];n=this[l++];)if(r=z(n),i=1===n.nodeType&&(" "+r+" ").replace(fn," ")){for(a=0;o=e[a++];)for(;i.indexOf(" "+o+" ")>-1;)i=i.replace(" "+o+" "," ");s=oe.trim(i),r!==s&&n.setAttribute("class",s)}return this},toggleClass:function(t,e){var n=typeof t;return"boolean"==typeof e&&"string"===n?e?this.addClass(t):this.removeClass(t):this.each(oe.isFunction(t)?function(n){oe(this).toggleClass(t.call(this,n,z(this),e),e)}:function(){var e,i,r,o;if("string"===n)for(i=0,r=oe(this),o=t.match(we)||[];e=o[i++];)r.hasClass(e)?r.removeClass(e):r.addClass(e);else(void 0===t||"boolean"===n)&&(e=z(this),e&&Ce.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||t===!1?"":Ce.get(this,"__className__")||""))})},hasClass:function(t){var e,n,i=0;for(e=" "+t+" ";n=this[i++];)if(1===n.nodeType&&(" "+z(n)+" ").replace(fn," ").indexOf(e)>-1)return!0;return!1}});var pn=/\r/g,gn=/[\x20\t\r\n\f]+/g;oe.fn.extend({val:function(t){var e,n,i,r=this[0];{if(arguments.length)return i=oe.isFunction(t),this.each(function(n){var r;1===this.nodeType&&(r=i?t.call(this,n,oe(this).val()):t,null==r?r="":"number"==typeof r?r+="":oe.isArray(r)&&(r=oe.map(r,function(t){return null==t?"":t+""})),e=oe.valHooks[this.type]||oe.valHooks[this.nodeName.toLowerCase()],e&&"set"in e&&void 0!==e.set(this,r,"value")||(this.value=r))});if(r)return e=oe.valHooks[r.type]||oe.valHooks[r.nodeName.toLowerCase()],e&&"get"in e&&void 0!==(n=e.get(r,"value"))?n:(n=r.value,"string"==typeof n?n.replace(pn,""):null==n?"":n)}}}),oe.extend({valHooks:{option:{get:function(t){var e=oe.find.attr(t,"value");return null!=e?e:oe.trim(oe.text(t)).replace(gn," ")}},select:{get:function(t){for(var e,n,i=t.options,r=t.selectedIndex,o="select-one"===t.type||0>r,a=o?null:[],s=o?r+1:i.length,l=0>r?s:o?r:0;s>l;l++)if(n=i[l],!(!n.selected&&l!==r||(ie.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&oe.nodeName(n.parentNode,"optgroup"))){if(e=oe(n).val(),o)return e;a.push(e)}return a},set:function(t,e){for(var n,i,r=t.options,o=oe.makeArray(e),a=r.length;a--;)i=r[a],(i.selected=oe.inArray(oe.valHooks.option.get(i),o)>-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),oe.each(["radio","checkbox"],function(){oe.valHooks[this]={set:function(t,e){return oe.isArray(e)?t.checked=oe.inArray(oe(t).val(),e)>-1:void 0}},ie.checkOn||(oe.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var mn=/^(?:focusinfocus|focusoutblur)$/;oe.extend(oe.event,{trigger:function(e,n,i,r){var o,a,s,l,u,c,d,h=[i||X],f=ne.call(e,"type")?e.type:e,p=ne.call(e,"namespace")?e.namespace.split("."):[];if(a=s=i=i||X,3!==i.nodeType&&8!==i.nodeType&&!mn.test(f+oe.event.triggered)&&(f.indexOf(".")>-1&&(p=f.split("."),f=p.shift(),p.sort()),u=f.indexOf(":")<0&&"on"+f,e=e[oe.expando]?e:new oe.Event(f,"object"==typeof e&&e),e.isTrigger=r?2:3,e.namespace=p.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),n=null==n?[e]:oe.makeArray(n,[e]),d=oe.event.special[f]||{},r||!d.trigger||d.trigger.apply(i,n)!==!1)){if(!r&&!d.noBubble&&!oe.isWindow(i)){for(l=d.delegateType||f,mn.test(l+f)||(a=a.parentNode);a;a=a.parentNode)h.push(a),s=a;s===(i.ownerDocument||X)&&h.push(s.defaultView||s.parentWindow||t)}for(o=0;(a=h[o++])&&!e.isPropagationStopped();)e.type=o>1?l:d.bindType||f,c=(Ce.get(a,"events")||{})[e.type]&&Ce.get(a,"handle"),c&&c.apply(a,n),c=u&&a[u],c&&c.apply&&_e(a)&&(e.result=c.apply(a,n),e.result===!1&&e.preventDefault());return e.type=f,r||e.isDefaultPrevented()||d._default&&d._default.apply(h.pop(),n)!==!1||!_e(i)||u&&oe.isFunction(i[f])&&!oe.isWindow(i)&&(s=i[u],s&&(i[u]=null),oe.event.triggered=f,i[f](),oe.event.triggered=void 0,s&&(i[u]=s)),e.result}},simulate:function(t,e,n){var i=oe.extend(new oe.Event,n,{type:t,isSimulated:!0});oe.event.trigger(i,null,e),i.isDefaultPrevented()&&n.preventDefault()}}),oe.fn.extend({trigger:function(t,e){return this.each(function(){oe.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];return n?oe.event.trigger(t,e,n,!0):void 0}}),oe.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(t,e){oe.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),oe.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),ie.focusin="onfocusin"in t,ie.focusin||oe.each({focus:"focusin",blur:"focusout"},function(t,e){var n=function(t){oe.event.simulate(e,t.target,oe.event.fix(t))};oe.event.special[e]={setup:function(){var i=this.ownerDocument||this,r=Ce.access(i,e);r||i.addEventListener(t,n,!0),Ce.access(i,e,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this,r=Ce.access(i,e)-1;r?Ce.access(i,e,r):(i.removeEventListener(t,n,!0),Ce.remove(i,e))}}});var vn=t.location,yn=oe.now(),bn=/\?/;oe.parseJSON=function(t){return JSON.parse(t+"")},oe.parseXML=function(e){var n;if(!e||"string"!=typeof e)return null;try{n=(new t.DOMParser).parseFromString(e,"text/xml")}catch(i){n=void 0}return(!n||n.getElementsByTagName("parsererror").length)&&oe.error("Invalid XML: "+e),n};var xn=/#.*$/,wn=/([?&])_=[^&]*/,$n=/^(.*?):[ \t]*([^\r\n]*)$/gm,kn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,_n=/^(?:GET|HEAD)$/,Cn=/^\/\//,Mn={},Dn={},Sn="*/".concat("*"),Tn=X.createElement("a");Tn.href=vn.href,oe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:vn.href,type:"GET",isLocal:kn.test(vn.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Sn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":oe.parseJSON,"text xml":oe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?q(q(t,oe.ajaxSettings),e):q(oe.ajaxSettings,t)},ajaxPrefilter:R(Mn),ajaxTransport:R(Dn),ajax:function(e,n){function i(e,n,i,s){var u,d,y,b,w,k=n;2!==x&&(x=2,l&&t.clearTimeout(l),r=void 0,a=s||"",$.readyState=e>0?4:0,u=e>=200&&300>e||304===e,i&&(b=V(h,$,i)),b=B(h,b,$,u),u?(h.ifModified&&(w=$.getResponseHeader("Last-Modified"),w&&(oe.lastModified[o]=w),w=$.getResponseHeader("etag"),w&&(oe.etag[o]=w)),204===e||"HEAD"===h.type?k="nocontent":304===e?k="notmodified":(k=b.state,d=b.data,y=b.error,u=!y)):(y=k,(e||!k)&&(k="error",0>e&&(e=0))),$.status=e,$.statusText=(n||k)+"",u?g.resolveWith(f,[d,k,$]):g.rejectWith(f,[$,k,y]),$.statusCode(v),v=void 0,c&&p.trigger(u?"ajaxSuccess":"ajaxError",[$,h,u?d:y]),m.fireWith(f,[$,k]),c&&(p.trigger("ajaxComplete",[$,h]),--oe.active||oe.event.trigger("ajaxStop")))}"object"==typeof e&&(n=e,e=void 0),n=n||{};var r,o,a,s,l,u,c,d,h=oe.ajaxSetup({},n),f=h.context||h,p=h.context&&(f.nodeType||f.jquery)?oe(f):oe.event,g=oe.Deferred(),m=oe.Callbacks("once memory"),v=h.statusCode||{},y={},b={},x=0,w="canceled",$={readyState:0,getResponseHeader:function(t){var e;if(2===x){if(!s)for(s={};e=$n.exec(a);)s[e[1].toLowerCase()]=e[2];e=s[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===x?a:null},setRequestHeader:function(t,e){var n=t.toLowerCase();return x||(t=b[n]=b[n]||t,y[t]=e),this},overrideMimeType:function(t){return x||(h.mimeType=t),this},statusCode:function(t){var e;if(t)if(2>x)for(e in t)v[e]=[v[e],t[e]];else $.always(t[$.status]);return this},abort:function(t){var e=t||w;return r&&r.abort(e),i(0,e),this}};if(g.promise($).complete=m.add,$.success=$.done,$.error=$.fail,h.url=((e||h.url||vn.href)+"").replace(xn,"").replace(Cn,vn.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=oe.trim(h.dataType||"*").toLowerCase().match(we)||[""],null==h.crossDomain){u=X.createElement("a");try{u.href=h.url,u.href=u.href,h.crossDomain=Tn.protocol+"//"+Tn.host!=u.protocol+"//"+u.host}catch(k){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=oe.param(h.data,h.traditional)),j(Mn,h,n,$),2===x)return $;c=oe.event&&h.global,c&&0===oe.active++&&oe.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!_n.test(h.type),o=h.url,h.hasContent||(h.data&&(o=h.url+=(bn.test(o)?"&":"?")+h.data,delete h.data),h.cache===!1&&(h.url=wn.test(o)?o.replace(wn,"$1_="+yn++):o+(bn.test(o)?"&":"?")+"_="+yn++)),h.ifModified&&(oe.lastModified[o]&&$.setRequestHeader("If-Modified-Since",oe.lastModified[o]),oe.etag[o]&&$.setRequestHeader("If-None-Match",oe.etag[o])),(h.data&&h.hasContent&&h.contentType!==!1||n.contentType)&&$.setRequestHeader("Content-Type",h.contentType),$.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Sn+"; q=0.01":""):h.accepts["*"]);for(d in h.headers)$.setRequestHeader(d,h.headers[d]);if(h.beforeSend&&(h.beforeSend.call(f,$,h)===!1||2===x))return $.abort();w="abort";for(d in{success:1,error:1,complete:1})$[d](h[d]);if(r=j(Dn,h,n,$)){if($.readyState=1,c&&p.trigger("ajaxSend",[$,h]),2===x)return $;h.async&&h.timeout>0&&(l=t.setTimeout(function(){$.abort("timeout")},h.timeout));try{x=1,r.send(y,i)}catch(k){if(!(2>x))throw k;i(-1,k)}}else i(-1,"No Transport");return $},getJSON:function(t,e,n){return oe.get(t,e,n,"json")},getScript:function(t,e){return oe.get(t,void 0,e,"script")}}),oe.each(["get","post"],function(t,e){oe[e]=function(t,n,i,r){return oe.isFunction(n)&&(r=r||i,i=n,n=void 0),oe.ajax(oe.extend({url:t,type:e,dataType:r,data:n,success:i},oe.isPlainObject(t)&&t))}}),oe._evalUrl=function(t){return oe.ajax({url:t,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},oe.fn.extend({wrapAll:function(t){var e;return oe.isFunction(t)?this.each(function(e){oe(this).wrapAll(t.call(this,e))}):(this[0]&&(e=oe(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this)},wrapInner:function(t){return this.each(oe.isFunction(t)?function(e){oe(this).wrapInner(t.call(this,e))}:function(){var e=oe(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=oe.isFunction(t);return this.each(function(n){oe(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(){return this.parent().each(function(){oe.nodeName(this,"body")||oe(this).replaceWith(this.childNodes)}).end()}}),oe.expr.filters.hidden=function(t){return!oe.expr.filters.visible(t)},oe.expr.filters.visible=function(t){return t.offsetWidth>0||t.offsetHeight>0||t.getClientRects().length>0};var An=/%20/g,En=/\[\]$/,On=/\r?\n/g,Nn=/^(?:submit|button|image|reset|file)$/i,In=/^(?:input|select|textarea|keygen)/i;oe.param=function(t,e){var n,i=[],r=function(t,e){e=oe.isFunction(e)?e():null==e?"":e,i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(void 0===e&&(e=oe.ajaxSettings&&oe.ajaxSettings.traditional),oe.isArray(t)||t.jquery&&!oe.isPlainObject(t))oe.each(t,function(){r(this.name,this.value)});else for(n in t)U(n,t[n],e,r);return i.join("&").replace(An,"+")},oe.fn.extend({serialize:function(){return oe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=oe.prop(this,"elements");return t?oe.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!oe(this).is(":disabled")&&In.test(this.nodeName)&&!Nn.test(t)&&(this.checked||!Ne.test(t))}).map(function(t,e){var n=oe(this).val();return null==n?null:oe.isArray(n)?oe.map(n,function(t){return{name:e.name,value:t.replace(On,"\r\n")}}):{name:e.name,value:n.replace(On,"\r\n")}}).get()}}),oe.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch(e){}};var Pn={0:200,1223:204},Hn=oe.ajaxSettings.xhr();ie.cors=!!Hn&&"withCredentials"in Hn,ie.ajax=Hn=!!Hn,oe.ajaxTransport(function(e){var n,i;return ie.cors||Hn&&!e.crossDomain?{send:function(r,o){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(a in r)s.setRequestHeader(a,r[a]);
n=function(t){return function(){n&&(n=i=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===t?s.abort():"error"===t?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Pn[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),i=s.onerror=n("error"),void 0!==s.onabort?s.onabort=i:s.onreadystatechange=function(){4===s.readyState&&t.setTimeout(function(){n&&i()})},n=n("abort");try{s.send(e.hasContent&&e.data||null)}catch(l){if(n)throw l}},abort:function(){n&&n()}}:void 0}),oe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return oe.globalEval(t),t}}}),oe.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),oe.ajaxTransport("script",function(t){if(t.crossDomain){var e,n;return{send:function(i,r){e=oe("<script>").prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&r("error"===t.type?404:200,t.type)}),X.head.appendChild(e[0])},abort:function(){n&&n()}}}});var Fn=[],Wn=/(=)\?(?=&|$)|\?\?/;oe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Fn.pop()||oe.expando+"_"+yn++;return this[t]=!0,t}}),oe.ajaxPrefilter("json jsonp",function(e,n,i){var r,o,a,s=e.jsonp!==!1&&(Wn.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Wn.test(e.data)&&"data");return s||"jsonp"===e.dataTypes[0]?(r=e.jsonpCallback=oe.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Wn,"$1"+r):e.jsonp!==!1&&(e.url+=(bn.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return a||oe.error(r+" was not called"),a[0]},e.dataTypes[0]="json",o=t[r],t[r]=function(){a=arguments},i.always(function(){void 0===o?oe(t).removeProp(r):t[r]=o,e[r]&&(e.jsonpCallback=n.jsonpCallback,Fn.push(r)),a&&oe.isFunction(o)&&o(a[0]),a=o=void 0}),"script"):void 0}),oe.parseHTML=function(t,e,n){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(n=e,e=!1),e=e||X;var i=pe.exec(t),r=!n&&[];return i?[e.createElement(i[1])]:(i=h([t],e,r),r&&r.length&&oe(r).remove(),oe.merge([],i.childNodes))};var Ln=oe.fn.load;oe.fn.load=function(t,e,n){if("string"!=typeof t&&Ln)return Ln.apply(this,arguments);var i,r,o,a=this,s=t.indexOf(" ");return s>-1&&(i=oe.trim(t.slice(s)),t=t.slice(0,s)),oe.isFunction(e)?(n=e,e=void 0):e&&"object"==typeof e&&(r="POST"),a.length>0&&oe.ajax({url:t,type:r||"GET",dataType:"html",data:e}).done(function(t){o=arguments,a.html(i?oe("<div>").append(oe.parseHTML(t)).find(i):t)}).always(n&&function(t,e){a.each(function(){n.apply(this,o||[t.responseText,e,t])})}),this},oe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){oe.fn[e]=function(t){return this.on(e,t)}}),oe.expr.filters.animated=function(t){return oe.grep(oe.timers,function(e){return t===e.elem}).length},oe.offset={setOffset:function(t,e,n){var i,r,o,a,s,l,u,c=oe.css(t,"position"),d=oe(t),h={};"static"===c&&(t.style.position="relative"),s=d.offset(),o=oe.css(t,"top"),l=oe.css(t,"left"),u=("absolute"===c||"fixed"===c)&&(o+l).indexOf("auto")>-1,u?(i=d.position(),a=i.top,r=i.left):(a=parseFloat(o)||0,r=parseFloat(l)||0),oe.isFunction(e)&&(e=e.call(t,n,oe.extend({},s))),null!=e.top&&(h.top=e.top-s.top+a),null!=e.left&&(h.left=e.left-s.left+r),"using"in e?e.using.call(t,h):d.css(h)}},oe.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){oe.offset.setOffset(this,t,e)});var e,n,i=this[0],r={top:0,left:0},o=i&&i.ownerDocument;if(o)return e=o.documentElement,oe.contains(e,i)?(r=i.getBoundingClientRect(),n=Y(o),{top:r.top+n.pageYOffset-e.clientTop,left:r.left+n.pageXOffset-e.clientLeft}):r},position:function(){if(this[0]){var t,e,n=this[0],i={top:0,left:0};return"fixed"===oe.css(n,"position")?e=n.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),oe.nodeName(t[0],"html")||(i=t.offset()),i.top+=oe.css(t[0],"borderTopWidth",!0),i.left+=oe.css(t[0],"borderLeftWidth",!0)),{top:e.top-i.top-oe.css(n,"marginTop",!0),left:e.left-i.left-oe.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===oe.css(t,"position");)t=t.offsetParent;return t||Qe})}}),oe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var n="pageYOffset"===e;oe.fn[t]=function(i){return ke(this,function(t,i,r){var o=Y(t);return void 0===r?o?o[e]:t[i]:void(o?o.scrollTo(n?o.pageXOffset:r,n?r:o.pageYOffset):t[i]=r)},t,i,arguments.length)}}),oe.each(["top","left"],function(t,e){oe.cssHooks[e]=D(ie.pixelPosition,function(t,n){return n?(n=M(t,e),Xe.test(n)?oe(t).position()[e]+"px":n):void 0})}),oe.each({Height:"height",Width:"width"},function(t,e){oe.each({padding:"inner"+t,content:e,"":"outer"+t},function(n,i){oe.fn[i]=function(i,r){var o=arguments.length&&(n||"boolean"!=typeof i),a=n||(i===!0||r===!0?"margin":"border");return ke(this,function(e,n,i){var r;return oe.isWindow(e)?e.document.documentElement["client"+t]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+t],r["scroll"+t],e.body["offset"+t],r["offset"+t],r["client"+t])):void 0===i?oe.css(e,n,a):oe.style(e,n,i,a)},e,o?i:void 0,o,null)}})}),oe.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,i){return this.on(e,t,n,i)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)},size:function(){return this.length}}),oe.fn.andSelf=oe.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return oe});var zn=t.jQuery,Rn=t.$;return oe.noConflict=function(e){return t.$===oe&&(t.$=Rn),e&&t.jQuery===oe&&(t.jQuery=zn),oe},e||(t.jQuery=t.$=oe),oe}),/**
 * @license AngularJS v1.3.17
 * (c) 2010-2014 Google, Inc. http://angularjs.org
 * License: MIT
 */
function(t,e,n){"use strict";function i(t,e){return e=e||Error,function(){var n,i,r=arguments[0],o="["+(t?t+":":"")+r+"] ",a=arguments[1],s=arguments;for(n=o+a.replace(/\{\d+\}/g,function(t){var e=+t.slice(1,-1);return e+2<s.length?he(s[e+2]):t}),n=n+"\nhttp://errors.angularjs.org/1.3.17/"+(t?t+"/":"")+r,i=2;i<arguments.length;i++)n=n+(2==i?"?":"&")+"p"+(i-2)+"="+encodeURIComponent(he(arguments[i]));return new e(n)}}function r(t){if(null==t||C(t))return!1;var e="length"in Object(t)&&t.length;return t.nodeType===br&&e?!0:x(t)||hr(t)||0===e||"number"==typeof e&&e>0&&e-1 in t}function o(t,e,n){var i,a;if(t)if(k(t))for(i in t)"prototype"==i||"length"==i||"name"==i||t.hasOwnProperty&&!t.hasOwnProperty(i)||e.call(n,t[i],i,t);else if(hr(t)||r(t)){var s="object"!=typeof t;for(i=0,a=t.length;a>i;i++)(s||i in t)&&e.call(n,t[i],i,t)}else if(t.forEach&&t.forEach!==o)t.forEach(e,n,t);else for(i in t)t.hasOwnProperty(i)&&e.call(n,t[i],i,t);return t}function a(t){return Object.keys(t).sort()}function s(t,e,n){for(var i=a(t),r=0;r<i.length;r++)e.call(n,t[i[r]],i[r]);return i}function l(t){return function(e,n){t(n,e)}}function u(){return++cr}function c(t,e){e?t.$$hashKey=e:delete t.$$hashKey}function d(t){for(var e=t.$$hashKey,n=1,i=arguments.length;i>n;n++){var r=arguments[n];if(r)for(var o=Object.keys(r),a=0,s=o.length;s>a;a++){var l=o[a];t[l]=r[l]}}return c(t,e),t}function h(t){return parseInt(t,10)}function f(t,e){return d(Object.create(t),e)}function p(){}function g(t){return t}function m(t){return function(){return t}}function v(t){return"undefined"==typeof t}function y(t){return"undefined"!=typeof t}function b(t){return null!==t&&"object"==typeof t}function x(t){return"string"==typeof t}function w(t){return"number"==typeof t}function $(t){return"[object Date]"===sr.call(t)}function k(t){return"function"==typeof t}function _(t){return"[object RegExp]"===sr.call(t)}function C(t){return t&&t.window===t}function M(t){return t&&t.$evalAsync&&t.$watch}function D(t){return"[object File]"===sr.call(t)}function S(t){return"[object FormData]"===sr.call(t)}function T(t){return"[object Blob]"===sr.call(t)}function A(t){return"boolean"==typeof t}function E(t){return t&&k(t.then)}function O(t){return!(!t||!(t.nodeName||t.prop&&t.attr&&t.find))}function N(t){var e,n={},i=t.split(",");for(e=0;e<i.length;e++)n[i[e]]=!0;return n}function I(t){return Xi(t.nodeName||t[0]&&t[0].nodeName)}function P(t,e){var n=t.indexOf(e);return n>=0&&t.splice(n,1),e}function H(t,e,n,i){if(C(t)||M(t))throw lr("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");if(e){if(t===e)throw lr("cpi","Can't copy! Source and destination are identical.");if(n=n||[],i=i||[],b(t)){var r=n.indexOf(t);if(-1!==r)return i[r];n.push(t),i.push(e)}var a;if(hr(t)){e.length=0;for(var s=0;s<t.length;s++)a=H(t[s],null,n,i),b(t[s])&&(n.push(t[s]),i.push(a)),e.push(a)}else{var l=e.$$hashKey;hr(e)?e.length=0:o(e,function(t,n){delete e[n]});for(var u in t)t.hasOwnProperty(u)&&(a=H(t[u],null,n,i),b(t[u])&&(n.push(t[u]),i.push(a)),e[u]=a);c(e,l)}}else if(e=t,t)if(hr(t))e=H(t,[],n,i);else if($(t))e=new Date(t.getTime());else if(_(t))e=new RegExp(t.source,t.toString().match(/[^\/]*$/)[0]),e.lastIndex=t.lastIndex;else if(b(t)){var d=Object.create(Object.getPrototypeOf(t));e=H(t,d,n,i)}return e}function F(t,e){if(hr(t)){e=e||[];for(var n=0,i=t.length;i>n;n++)e[n]=t[n]}else if(b(t)){e=e||{};for(var r in t)("$"!==r.charAt(0)||"$"!==r.charAt(1))&&(e[r]=t[r])}return e||t}function W(t,e){if(t===e)return!0;if(null===t||null===e)return!1;if(t!==t&&e!==e)return!0;var i,r,o,a=typeof t,s=typeof e;if(a==s&&"object"==a){if(!hr(t)){if($(t))return $(e)?W(t.getTime(),e.getTime()):!1;if(_(t))return _(e)?t.toString()==e.toString():!1;if(M(t)||M(e)||C(t)||C(e)||hr(e)||$(e)||_(e))return!1;o={};for(r in t)if("$"!==r.charAt(0)&&!k(t[r])){if(!W(t[r],e[r]))return!1;o[r]=!0}for(r in e)if(!o.hasOwnProperty(r)&&"$"!==r.charAt(0)&&e[r]!==n&&!k(e[r]))return!1;return!0}if(!hr(e))return!1;if((i=t.length)==e.length){for(r=0;i>r;r++)if(!W(t[r],e[r]))return!1;return!0}}return!1}function L(t,e,n){return t.concat(rr.call(e,n))}function z(t,e){return rr.call(t,e||0)}function R(t,e){var n=arguments.length>2?z(arguments,2):[];return!k(e)||e instanceof RegExp?e:n.length?function(){return arguments.length?e.apply(t,L(n,arguments,0)):e.apply(t,n)}:function(){return arguments.length?e.apply(t,arguments):e.call(t)}}function j(t,i){var r=i;return"string"==typeof t&&"$"===t.charAt(0)&&"$"===t.charAt(1)?r=n:C(i)?r="$WINDOW":i&&e===i?r="$DOCUMENT":M(i)&&(r="$SCOPE"),r}function q(t,e){return"undefined"==typeof t?n:(w(e)||(e=e?2:null),JSON.stringify(t,j,e))}function V(t){return x(t)?JSON.parse(t):t}function B(t){t=er(t).clone();try{t.empty()}catch(e){}var n=er("<div>").append(t).html();try{return t[0].nodeType===wr?Xi(n):n.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(t,e){return"<"+Xi(e)})}catch(e){return Xi(n)}}function U(t){try{return decodeURIComponent(t)}catch(e){}}function Y(t){var e,n,i={};return o((t||"").split("&"),function(t){if(t&&(e=t.replace(/\+/g,"%20").split("="),n=U(e[0]),y(n))){var r=y(e[1])?U(e[1]):!0;Ki.call(i,n)?hr(i[n])?i[n].push(r):i[n]=[i[n],r]:i[n]=r}}),i}function G(t){var e=[];return o(t,function(t,n){hr(t)?o(t,function(t){e.push(K(n,!0)+(t===!0?"":"="+K(t,!0)))}):e.push(K(n,!0)+(t===!0?"":"="+K(t,!0)))}),e.length?e.join("&"):""}function X(t){return K(t,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function K(t,e){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,e?"%20":"+")}function Z(t,e){var n,i,r=mr.length;for(t=er(t),i=0;r>i;++i)if(n=mr[i]+e,x(n=t.attr(n)))return n;return null}function Q(t,e){var n,i,r={};o(mr,function(e){var r=e+"app";!n&&t.hasAttribute&&t.hasAttribute(r)&&(n=t,i=t.getAttribute(r))}),o(mr,function(e){var r,o=e+"app";!n&&(r=t.querySelector("["+o.replace(":","\\:")+"]"))&&(n=r,i=r.getAttribute(o))}),n&&(r.strictDi=null!==Z(n,"strict-di"),e(n,i?[i]:[],r))}function J(n,i,r){b(r)||(r={});var a={strictDi:!1};r=d(a,r);var s=function(){if(n=er(n),n.injector()){var t=n[0]===e?"document":B(n);throw lr("btstrpd","App Already Bootstrapped with this Element '{0}'",t.replace(/</,"&lt;").replace(/>/,"&gt;"))}i=i||[],i.unshift(["$provide",function(t){t.value("$rootElement",n)}]),r.debugInfoEnabled&&i.push(["$compileProvider",function(t){t.debugInfoEnabled(!0)}]),i.unshift("ng");var o=Ve(i,r.strictDi);return o.invoke(["$rootScope","$rootElement","$compile","$injector",function(t,e,n,i){t.$apply(function(){e.data("$injector",i),n(e)(t)})}]),o},l=/^NG_ENABLE_DEBUG_INFO!/,u=/^NG_DEFER_BOOTSTRAP!/;return t&&l.test(t.name)&&(r.debugInfoEnabled=!0,t.name=t.name.replace(l,"")),t&&!u.test(t.name)?s():(t.name=t.name.replace(u,""),ur.resumeBootstrap=function(t){return o(t,function(t){i.push(t)}),s()},void(k(ur.resumeDeferredBootstrap)&&ur.resumeDeferredBootstrap()))}function te(){t.name="NG_ENABLE_DEBUG_INFO!"+t.name,t.location.reload()}function ee(t){var e=ur.element(t).injector();if(!e)throw lr("test","no injector found for element argument to getTestability");return e.get("$$testability")}function ne(t,e){return e=e||"_",t.replace(vr,function(t,n){return(n?e:"")+t.toLowerCase()})}function ie(){var e;yr||(nr=t.jQuery,nr&&nr.fn.on?(er=nr,d(nr.fn,{scope:Lr.scope,isolateScope:Lr.isolateScope,controller:Lr.controller,injector:Lr.injector,inheritedData:Lr.inheritedData}),e=nr.cleanData,nr.cleanData=function(t){var n;if(dr)dr=!1;else for(var i,r=0;null!=(i=t[r]);r++)n=nr._data(i,"events"),n&&n.$destroy&&nr(i).triggerHandler("$destroy");e(t)}):er=xe,ur.element=er,yr=!0)}function re(t,e,n){if(!t)throw lr("areq","Argument '{0}' is {1}",e||"?",n||"required");return t}function oe(t,e,n){return n&&hr(t)&&(t=t[t.length-1]),re(k(t),e,"not a function, got "+(t&&"object"==typeof t?t.constructor.name||"Object":typeof t)),t}function ae(t,e){if("hasOwnProperty"===t)throw lr("badname","hasOwnProperty is not a valid {0} name",e)}function se(t,e,n){if(!e)return t;for(var i,r=e.split("."),o=t,a=r.length,s=0;a>s;s++)i=r[s],t&&(t=(o=t)[i]);return!n&&k(t)?R(o,t):t}function le(t){var e=t[0],n=t[t.length-1],i=[e];do{if(e=e.nextSibling,!e)break;i.push(e)}while(e!==n);return er(i)}function ue(){return Object.create(null)}function ce(t){function e(t,e,n){return t[e]||(t[e]=n())}var n=i("$injector"),r=i("ng"),o=e(t,"angular",Object);return o.$$minErr=o.$$minErr||i,e(o,"module",function(){var t={};return function(i,o,a){var s=function(t,e){if("hasOwnProperty"===t)throw r("badname","hasOwnProperty is not a valid {0} name",e)};return s(i,"module"),o&&t.hasOwnProperty(i)&&(t[i]=null),e(t,i,function(){function t(t,n,i,r){return r||(r=e),function(){return r[i||"push"]([t,n,arguments]),u}}if(!o)throw n("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",i);var e=[],r=[],s=[],l=t("$injector","invoke","push",r),u={_invokeQueue:e,_configBlocks:r,_runBlocks:s,requires:o,name:i,provider:t("$provide","provider"),factory:t("$provide","factory"),service:t("$provide","service"),value:t("$provide","value"),constant:t("$provide","constant","unshift"),animation:t("$animateProvider","register"),filter:t("$filterProvider","register"),controller:t("$controllerProvider","register"),directive:t("$compileProvider","directive"),config:l,run:function(t){return s.push(t),this}};return a&&l(a),u})}})}function de(t){var e=[];return JSON.stringify(t,function(t,n){if(n=j(t,n),b(n)){if(e.indexOf(n)>=0)return"<<already seen>>";e.push(n)}return n})}function he(t){return"function"==typeof t?t.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof t?"undefined":"string"!=typeof t?de(t):t}function fe(e){d(e,{bootstrap:J,copy:H,extend:d,equals:W,element:er,forEach:o,injector:Ve,noop:p,bind:R,toJson:q,fromJson:V,identity:g,isUndefined:v,isDefined:y,isString:x,isFunction:k,isObject:b,isNumber:w,isElement:O,isArray:hr,version:Cr,isDate:$,lowercase:Xi,uppercase:Zi,callbacks:{counter:0},getTestability:ee,$$minErr:i,$$csp:gr,reloadWithDebugInfo:te}),ir=ce(t);try{ir("ngLocale")}catch(n){ir("ngLocale",[]).provider("$locale",vn)}ir("ng",["ngLocale"],["$provide",function(t){t.provider({$$sanitizeUri:Xn}),t.provider("$compile",Ze).directive({a:Oo,input:Xo,textarea:Xo,form:Fo,script:Wa,select:Ra,style:qa,option:ja,ngBind:Qo,ngBindHtml:ta,ngBindTemplate:Jo,ngClass:na,ngClassEven:ra,ngClassOdd:ia,ngCloak:oa,ngController:aa,ngForm:Wo,ngHide:Oa,ngIf:ua,ngInclude:ca,ngInit:ha,ngNonBindable:Ma,ngPluralize:Da,ngRepeat:Sa,ngShow:Ea,ngStyle:Na,ngSwitch:Ia,ngSwitchWhen:Pa,ngSwitchDefault:Ha,ngOptions:za,ngTransclude:Fa,ngModel:ka,ngList:fa,ngChange:ea,pattern:Ba,ngPattern:Ba,required:Va,ngRequired:Va,minlength:Ya,ngMinlength:Ya,maxlength:Ua,ngMaxlength:Ua,ngValue:Zo,ngModelOptions:Ca}).directive({ngInclude:da}).directive(No).directive(sa),t.provider({$anchorScroll:Be,$animate:Xr,$browser:Ge,$cacheFactory:Xe,$controller:en,$document:nn,$exceptionHandler:rn,$filter:si,$interpolate:gn,$interval:mn,$http:dn,$httpBackend:fn,$location:En,$log:On,$parse:qn,$rootScope:Gn,$q:Vn,$$q:Bn,$sce:Jn,$sceDelegate:Qn,$sniffer:ti,$templateCache:Ke,$templateRequest:ei,$$testability:ni,$timeout:ii,$window:ai,$$rAF:Yn,$$asyncCallback:Ue,$$jqLite:Le})}])}function pe(){return++Dr}function ge(t){return t.replace(Ar,function(t,e,n,i){return i?n.toUpperCase():n}).replace(Er,"Moz$1")}function me(t){return!Pr.test(t)}function ve(t){var e=t.nodeType;return e===br||!e||e===kr}function ye(t,e){var n,i,r,a,s=e.createDocumentFragment(),l=[];if(me(t))l.push(e.createTextNode(t));else{for(n=n||s.appendChild(e.createElement("div")),i=(Hr.exec(t)||["",""])[1].toLowerCase(),r=Wr[i]||Wr._default,n.innerHTML=r[1]+t.replace(Fr,"<$1></$2>")+r[2],a=r[0];a--;)n=n.lastChild;l=L(l,n.childNodes),n=s.firstChild,n.textContent=""}return s.textContent="",s.innerHTML="",o(l,function(t){s.appendChild(t)}),s}function be(t,n){n=n||e;var i;return(i=Ir.exec(t))?[n.createElement(i[1])]:(i=ye(t,n))?i.childNodes:[]}function xe(t){if(t instanceof xe)return t;var e;if(x(t)&&(t=fr(t),e=!0),!(this instanceof xe)){if(e&&"<"!=t.charAt(0))throw Nr("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new xe(t)}e?Ae(this,be(t)):Ae(this,t)}function we(t){return t.cloneNode(!0)}function $e(t,e){if(e||_e(t),t.querySelectorAll)for(var n=t.querySelectorAll("*"),i=0,r=n.length;r>i;i++)_e(n[i])}function ke(t,e,n,i){if(y(i))throw Nr("offargs","jqLite#off() does not support the `selector` argument");var r=Ce(t),a=r&&r.events,s=r&&r.handle;if(s)if(e)o(e.split(" "),function(e){if(y(n)){var i=a[e];if(P(i||[],n),i&&i.length>0)return}Tr(t,e,s),delete a[e]});else for(e in a)"$destroy"!==e&&Tr(t,e,s),delete a[e]}function _e(t,e){var i=t.ng339,r=i&&Mr[i];if(r){if(e)return void delete r.data[e];r.handle&&(r.events.$destroy&&r.handle({},"$destroy"),ke(t)),delete Mr[i],t.ng339=n}}function Ce(t,e){var i=t.ng339,r=i&&Mr[i];return e&&!r&&(t.ng339=i=pe(),r=Mr[i]={events:{},data:{},handle:n}),r}function Me(t,e,n){if(ve(t)){var i=y(n),r=!i&&e&&!b(e),o=!e,a=Ce(t,!r),s=a&&a.data;if(i)s[e]=n;else{if(o)return s;if(r)return s&&s[e];d(s,e)}}}function De(t,e){return t.getAttribute?(" "+(t.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+e+" ")>-1:!1}function Se(t,e){e&&t.setAttribute&&o(e.split(" "),function(e){t.setAttribute("class",fr((" "+(t.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+fr(e)+" "," ")))})}function Te(t,e){if(e&&t.setAttribute){var n=(" "+(t.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");o(e.split(" "),function(t){t=fr(t),-1===n.indexOf(" "+t+" ")&&(n+=t+" ")}),t.setAttribute("class",fr(n))}}function Ae(t,e){if(e)if(e.nodeType)t[t.length++]=e;else{var n=e.length;if("number"==typeof n&&e.window!==e){if(n)for(var i=0;n>i;i++)t[t.length++]=e[i]}else t[t.length++]=e}}function Ee(t,e){return Oe(t,"$"+(e||"ngController")+"Controller")}function Oe(t,e,i){t.nodeType==kr&&(t=t.documentElement);for(var r=hr(e)?e:[e];t;){for(var o=0,a=r.length;a>o;o++)if((i=er.data(t,r[o]))!==n)return i;t=t.parentNode||t.nodeType===_r&&t.host}}function Ne(t){for($e(t,!0);t.firstChild;)t.removeChild(t.firstChild)}function Ie(t,e){e||$e(t);var n=t.parentNode;n&&n.removeChild(t)}function Pe(e,n){n=n||t,"complete"===n.document.readyState?n.setTimeout(e):er(n).on("load",e)}function He(t,e){var n=zr[e.toLowerCase()];return n&&Rr[I(t)]&&n}function Fe(t,e){var n=t.nodeName;return("INPUT"===n||"TEXTAREA"===n)&&jr[e]}function We(t,e){var n=function(n,i){n.isDefaultPrevented=function(){return n.defaultPrevented};var r=e[i||n.type],o=r?r.length:0;if(o){if(v(n.immediatePropagationStopped)){var a=n.stopImmediatePropagation;n.stopImmediatePropagation=function(){n.immediatePropagationStopped=!0,n.stopPropagation&&n.stopPropagation(),a&&a.call(n)}}n.isImmediatePropagationStopped=function(){return n.immediatePropagationStopped===!0},o>1&&(r=F(r));for(var s=0;o>s;s++)n.isImmediatePropagationStopped()||r[s].call(t,n)}};return n.elem=t,n}function Le(){this.$get=function(){return d(xe,{hasClass:function(t,e){return t.attr&&(t=t[0]),De(t,e)},addClass:function(t,e){return t.attr&&(t=t[0]),Te(t,e)},removeClass:function(t,e){return t.attr&&(t=t[0]),Se(t,e)}})}}function ze(t,e){var n=t&&t.$$hashKey;if(n)return"function"==typeof n&&(n=t.$$hashKey()),n;var i=typeof t;return n="function"==i||"object"==i&&null!==t?t.$$hashKey=i+":"+(e||u)():i+":"+t}function Re(t,e){if(e){var n=0;this.nextUid=function(){return++n}}o(t,this.put,this)}function je(t){var e=t.toString().replace(Ur,""),n=e.match(qr);return n?"function("+(n[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function qe(t,e,n){var i,r,a,s;if("function"==typeof t){if(!(i=t.$inject)){if(i=[],t.length){if(e)throw x(n)&&n||(n=t.name||je(t)),Yr("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",n);r=t.toString().replace(Ur,""),a=r.match(qr),o(a[1].split(Vr),function(t){t.replace(Br,function(t,e,n){i.push(n)})})}t.$inject=i}}else hr(t)?(s=t.length-1,oe(t[s],"fn"),i=t.slice(0,s)):oe(t,"fn",!0);return i}function Ve(t,e){function i(t){return function(e,n){return b(e)?void o(e,l(t)):t(e,n)}}function r(t,e){if(ae(t,"service"),(k(e)||hr(e))&&(e=M.instantiate(e)),!e.$get)throw Yr("pget","Provider '{0}' must define $get factory method.",t);return C[t+w]=e}function a(t,e){return function(){var n=S.invoke(e,this);if(v(n))throw Yr("undef","Provider '{0}' must return a value from $get factory method.",t);return n}}function s(t,e,n){return r(t,{$get:n!==!1?a(t,e):e})}function u(t,e){return s(t,["$injector",function(t){return t.instantiate(e)}])}function c(t,e){return s(t,m(e),!1)}function d(t,e){ae(t,"constant"),C[t]=e,D[t]=e}function h(t,e){var n=M.get(t+w),i=n.$get;n.$get=function(){var t=S.invoke(i,n);return S.invoke(e,null,{$delegate:t})}}function f(t){var e,n=[];return o(t,function(t){function i(t){var e,n;for(e=0,n=t.length;n>e;e++){var i=t[e],r=M.get(i[0]);r[i[1]].apply(r,i[2])}}if(!_.get(t)){_.put(t,!0);try{x(t)?(e=ir(t),n=n.concat(f(e.requires)).concat(e._runBlocks),i(e._invokeQueue),i(e._configBlocks)):k(t)?n.push(M.invoke(t)):hr(t)?n.push(M.invoke(t)):oe(t,"module")}catch(r){throw hr(t)&&(t=t[t.length-1]),r.message&&r.stack&&-1==r.stack.indexOf(r.message)&&(r=r.message+"\n"+r.stack),Yr("modulerr","Failed to instantiate module {0} due to:\n{1}",t,r.stack||r.message||r)}}}),n}function g(t,n){function i(e,i){if(t.hasOwnProperty(e)){if(t[e]===y)throw Yr("cdep","Circular dependency found: {0}",e+" <- "+$.join(" <- "));return t[e]}try{return $.unshift(e),t[e]=y,t[e]=n(e,i)}catch(r){throw t[e]===y&&delete t[e],r}finally{$.shift()}}function r(t,n,r,o){"string"==typeof r&&(o=r,r=null);var a,s,l,u=[],c=Ve.$$annotate(t,e,o);for(s=0,a=c.length;a>s;s++){if(l=c[s],"string"!=typeof l)throw Yr("itkn","Incorrect injection token! Expected service name as string, got {0}",l);u.push(r&&r.hasOwnProperty(l)?r[l]:i(l,o))}return hr(t)&&(t=t[a]),t.apply(n,u)}function o(t,e,n){var i=Object.create((hr(t)?t[t.length-1]:t).prototype||null),o=r(t,i,e,n);return b(o)||k(o)?o:i}return{invoke:r,instantiate:o,get:i,annotate:Ve.$$annotate,has:function(e){return C.hasOwnProperty(e+w)||t.hasOwnProperty(e)}}}e=e===!0;var y={},w="Provider",$=[],_=new Re([],!0),C={$provide:{provider:i(r),factory:i(s),service:i(u),value:i(c),constant:i(d),decorator:h}},M=C.$injector=g(C,function(t,e){throw ur.isString(e)&&$.push(e),Yr("unpr","Unknown provider: {0}",$.join(" <- "))}),D={},S=D.$injector=g(D,function(t,e){var i=M.get(t+w,e);return S.invoke(i.$get,i,n,t)});return o(f(t),function(t){S.invoke(t||p)}),S}function Be(){var t=!0;this.disableAutoScrolling=function(){t=!1},this.$get=["$window","$location","$rootScope",function(e,n,i){function r(t){var e=null;return Array.prototype.some.call(t,function(t){return"a"===I(t)?(e=t,!0):void 0}),e}function o(){var t=s.yOffset;if(k(t))t=t();else if(O(t)){var n=t[0],i=e.getComputedStyle(n);t="fixed"!==i.position?0:n.getBoundingClientRect().bottom}else w(t)||(t=0);return t}function a(t){if(t){t.scrollIntoView();var n=o();if(n){var i=t.getBoundingClientRect().top;e.scrollBy(0,i-n)}}else e.scrollTo(0,0)}function s(){var t,e=n.hash();e?(t=l.getElementById(e))?a(t):(t=r(l.getElementsByName(e)))?a(t):"top"===e&&a(null):a(null)}var l=e.document;return t&&i.$watch(function(){return n.hash()},function(t,e){(t!==e||""!==t)&&Pe(function(){i.$evalAsync(s)})}),s}]}function Ue(){this.$get=["$$rAF","$timeout",function(t,e){return t.supported?function(e){return t(e)}:function(t){return e(t,0,!1)}}]}function Ye(t,e,i,r){function a(t){try{t.apply(null,z(arguments,1))}finally{if(_--,0===_)for(;C.length;)try{C.pop()()}catch(e){i.error(e)}}}function s(t){var e=t.indexOf("#");return-1===e?"":t.substr(e)}function l(t,e){!function n(){o(D,function(t){t()}),M=e(n,t)}()}function u(){d(),h()}function c(){try{return b.state}catch(t){}}function d(){S=c(),S=v(S)?null:S,W(S,P)&&(S=P),P=S}function h(){(A!==g.url()||T!==S)&&(A=g.url(),T=S,o(N,function(t){t(g.url(),S)}))}function f(t){try{return decodeURIComponent(t)}catch(e){return t}}var g=this,m=e[0],y=t.location,b=t.history,w=t.setTimeout,$=t.clearTimeout,k={};g.isMock=!1;var _=0,C=[];g.$$completeOutstandingRequest=a,g.$$incOutstandingRequestCount=function(){_++},g.notifyWhenNoOutstandingRequests=function(t){o(D,function(t){t()}),0===_?t():C.push(t)};var M,D=[];g.addPollFn=function(t){return v(M)&&l(100,w),D.push(t),t};var S,T,A=y.href,E=e.find("base"),O=null;d(),T=S,g.url=function(e,n,i){if(v(i)&&(i=null),y!==t.location&&(y=t.location),b!==t.history&&(b=t.history),e){var o=T===i;if(A===e&&(!r.history||o))return g;var a=A&&$n(A)===$n(e);return A=e,T=i,!r.history||a&&o?((!a||O)&&(O=e),n?y.replace(e):a?y.hash=s(e):y.href=e):(b[n?"replaceState":"pushState"](i,"",e),d(),T=S),g}return O||y.href.replace(/%27/g,"'")},g.state=function(){return S};var N=[],I=!1,P=null;g.onUrlChange=function(e){return I||(r.history&&er(t).on("popstate",u),er(t).on("hashchange",u),I=!0),N.push(e),e},g.$$checkUrlChange=h,g.baseHref=function(){var t=E.attr("href");return t?t.replace(/^(https?\:)?\/\/[^\/]*/,""):""};var H={},F="",L=g.baseHref();g.cookies=function(t,e){var r,o,a,s,l;if(!t){if(m.cookie!==F)for(F=m.cookie,o=F.split("; "),H={},s=0;s<o.length;s++)a=o[s],l=a.indexOf("="),l>0&&(t=f(a.substring(0,l)),H[t]===n&&(H[t]=f(a.substring(l+1))));return H}e===n?m.cookie=encodeURIComponent(t)+"=;path="+L+";expires=Thu, 01 Jan 1970 00:00:00 GMT":x(e)&&(r=(m.cookie=encodeURIComponent(t)+"="+encodeURIComponent(e)+";path="+L).length+1,r>4096&&i.warn("Cookie '"+t+"' possibly not set or overflowed because it was too large ("+r+" > 4096 bytes)!"))},g.defer=function(t,e){var n;return _++,n=w(function(){delete k[n],a(t)},e||0),k[n]=!0,n},g.defer.cancel=function(t){return k[t]?(delete k[t],$(t),a(p),!0):!1}}function Ge(){this.$get=["$window","$log","$sniffer","$document",function(t,e,n,i){return new Ye(t,i,e,n)}]}function Xe(){this.$get=function(){function t(t,n){function r(t){t!=h&&(f?f==t&&(f=t.n):f=t,o(t.n,t.p),o(t,h),h=t,h.n=null)}function o(t,e){t!=e&&(t&&(t.p=e),e&&(e.n=t))}if(t in e)throw i("$cacheFactory")("iid","CacheId '{0}' is already taken!",t);var a=0,s=d({},n,{id:t}),l={},u=n&&n.capacity||Number.MAX_VALUE,c={},h=null,f=null;return e[t]={put:function(t,e){if(u<Number.MAX_VALUE){var n=c[t]||(c[t]={key:t});r(n)}if(!v(e))return t in l||a++,l[t]=e,a>u&&this.remove(f.key),e},get:function(t){if(u<Number.MAX_VALUE){var e=c[t];if(!e)return;r(e)}return l[t]},remove:function(t){if(u<Number.MAX_VALUE){var e=c[t];if(!e)return;e==h&&(h=e.p),e==f&&(f=e.n),o(e.n,e.p),delete c[t]}delete l[t],a--},removeAll:function(){l={},a=0,c={},h=f=null},destroy:function(){l=null,s=null,c=null,delete e[t]},info:function(){return d({},s,{size:a})}}}var e={};return t.info=function(){var t={};return o(e,function(e,n){t[n]=e.info()}),t},t.get=function(t){return e[t]},t}}function Ke(){this.$get=["$cacheFactory",function(t){return t("templates")}]}function Ze(t,i){function r(t,e){var n=/^\s*([@&]|=(\*?))(\??)\s*(\w*)\s*$/,i={};return o(t,function(t,r){var o=t.match(n);if(!o)throw Kr("iscp","Invalid isolate scope definition for directive '{0}'. Definition: {... {1}: '{2}' ...}",e,r,t);i[r]={mode:o[1][0],collection:"*"===o[2],optional:"?"===o[3],attrName:o[4]||r}}),i}function a(t){var e=t.charAt(0);if(!e||e!==Xi(e))throw Kr("baddir","Directive name '{0}' is invalid. The first character must be a lowercase letter",t);return t}var s={},u="Directive",c=/^\s*directive\:\s*([\w\-]+)\s+(.*)$/,h=/(([\w\-]+)(?:\:([^;]+))?;?)/,v=N("ngSrc,ngSrcset,src,srcset"),w=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,$=/^(on[a-z]+|formaction)$/;this.directive=function C(e,n){return ae(e,"directive"),x(e)?(a(e),re(n,"directiveFactory"),s.hasOwnProperty(e)||(s[e]=[],t.factory(e+u,["$injector","$exceptionHandler",function(t,n){var i=[];return o(s[e],function(o,a){try{var s=t.invoke(o);k(s)?s={compile:m(s)}:!s.compile&&s.link&&(s.compile=m(s.link)),s.priority=s.priority||0,s.index=a,s.name=s.name||e,s.require=s.require||s.controller&&s.name,s.restrict=s.restrict||"EA",b(s.scope)&&(s.$$isolateBindings=r(s.scope,s.name)),i.push(s)}catch(l){n(l)}}),i}])),s[e].push(n)):o(e,l(C)),this},this.aHrefSanitizationWhitelist=function(t){return y(t)?(i.aHrefSanitizationWhitelist(t),this):i.aHrefSanitizationWhitelist()},this.imgSrcSanitizationWhitelist=function(t){return y(t)?(i.imgSrcSanitizationWhitelist(t),this):i.imgSrcSanitizationWhitelist()};var _=!0;this.debugInfoEnabled=function(t){return y(t)?(_=t,this):_},this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$document","$sce","$animate","$$sanitizeUri",function(t,i,r,a,l,m,y,C,D,S,T){function A(t,e){try{t.addClass(e)}catch(n){}}function E(t,e,n,i,r){t instanceof er||(t=er(t)),o(t,function(e,n){e.nodeType==wr&&e.nodeValue.match(/\S+/)&&(t[n]=er(e).wrap("<span></span>").parent()[0])});var a=N(t,e,t,n,i,r);E.$$addScopeClass(t);var s=null;return function(e,n,i){re(e,"scope"),i=i||{};var r=i.parentBoundTranscludeFn,o=i.transcludeControllers,l=i.futureParentElement;r&&r.$$boundTransclude&&(r=r.$$boundTransclude),s||(s=O(l));var u;if(u="html"!==s?er(Q(s,er("<div>").append(t).html())):n?Lr.clone.call(t):t,o)for(var c in o)u.data("$"+c+"Controller",o[c].instance);return E.$$addScopeInfo(u,e),n&&n(u,e),a&&a(e,u,u,r),u}}function O(t){var e=t&&t[0];return e&&"foreignobject"!==I(e)&&e.toString().match(/SVG/)?"svg":"html"}function N(t,e,i,r,o,a){function s(t,i,r,o){var a,s,l,u,c,d,h,f,m;if(p){var v=i.length;for(m=new Array(v),c=0;c<g.length;c+=3)h=g[c],m[h]=i[h]}else m=i;for(c=0,d=g.length;d>c;)l=m[g[c++]],a=g[c++],s=g[c++],a?(a.scope?(u=t.$new(),E.$$addScopeInfo(er(l),u)):u=t,f=a.transcludeOnThisElement?H(t,a.transclude,o,a.elementTranscludeOnThisElement):!a.templateOnThisElement&&o?o:!o&&e?H(t,e):null,a(s,u,l,r,f)):s&&s(t,l.childNodes,n,o)}for(var l,u,c,d,h,f,p,g=[],m=0;m<t.length;m++)l=new ae,u=F(t[m],[],l,0===m?r:n,o),c=u.length?j(u,t[m],l,e,i,null,[],[],a):null,c&&c.scope&&E.$$addScopeClass(l.$$element),h=c&&c.terminal||!(d=t[m].childNodes)||!d.length?null:N(d,c?(c.transcludeOnThisElement||!c.templateOnThisElement)&&c.transclude:e),(c||h)&&(g.push(m,c,h),f=!0,p=p||c),a=null;return f?s:null}function H(t,e,n){var i=function(i,r,o,a,s){return i||(i=t.$new(!1,s),i.$$transcluded=!0),e(i,r,{parentBoundTranscludeFn:n,transcludeControllers:o,futureParentElement:a})};return i}function F(t,e,n,i,r){var o,a,s=t.nodeType,l=n.$attr;switch(s){case br:V(e,Qe(I(t)),"E",i,r);for(var u,d,f,p,g,m,v=t.attributes,y=0,w=v&&v.length;w>y;y++){var $=!1,k=!1;u=v[y],d=u.name,g=fr(u.value),p=Qe(d),(m=de.test(p))&&(d=d.replace(Zr,"").substr(8).replace(/_(.)/g,function(t,e){return e.toUpperCase()}));var _=p.replace(/(Start|End)$/,"");U(_)&&p===_+"Start"&&($=d,k=d.substr(0,d.length-5)+"end",d=d.substr(0,d.length-6)),f=Qe(d.toLowerCase()),l[f]=d,(m||!n.hasOwnProperty(f))&&(n[f]=g,He(t,f)&&(n[f]=!0)),te(t,e,g,f,m),V(e,f,"A",i,r,$,k)}if(a=t.className,b(a)&&(a=a.animVal),x(a)&&""!==a)for(;o=h.exec(a);)f=Qe(o[2]),V(e,f,"C",i,r)&&(n[f]=fr(o[3])),a=a.substr(o.index+o[0].length);break;case wr:Z(e,t.nodeValue);break;case $r:try{o=c.exec(t.nodeValue),o&&(f=Qe(o[1]),V(e,f,"M",i,r)&&(n[f]=fr(o[2])))}catch(C){}}return e.sort(X),e}function L(t,e,n){var i=[],r=0;if(e&&t.hasAttribute&&t.hasAttribute(e)){do{if(!t)throw Kr("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",e,n);t.nodeType==br&&(t.hasAttribute(e)&&r++,t.hasAttribute(n)&&r--),i.push(t),t=t.nextSibling}while(r>0)}else i.push(t);return er(i)}function R(t,e,n){return function(i,r,o,a,s){return r=L(r[0],e,n),t(i,r,o,a,s)}}function j(t,a,s,u,c,d,h,f,p){function g(t,e,n,i){t&&(n&&(t=R(t,n,i)),t.require=C.require,t.directiveName=D,(I===C||C.$$isolateScope)&&(t=ie(t,{isolateScope:!0})),h.push(t)),e&&(n&&(e=R(e,n,i)),e.require=C.require,e.directiveName=D,(I===C||C.$$isolateScope)&&(e=ie(e,{isolateScope:!0})),f.push(e))}function v(t,e,n,i){var r,a,s="data",l=!1,u=n;if(x(e)){if(a=e.match(w),e=e.substring(a[0].length),a[3]&&(a[1]?a[3]=null:a[1]=a[3]),"^"===a[1]?s="inheritedData":"^^"===a[1]&&(s="inheritedData",u=n.parent()),"?"===a[2]&&(l=!0),r=null,i&&"data"===s&&(r=i[e])&&(r=r.instance),r=r||u[s]("$"+e+"Controller"),!r&&!l)throw Kr("ctreq","Controller '{0}', required by directive '{1}', can't be found!",e,t);return r||null}return hr(e)&&(r=[],o(e,function(e){r.push(v(t,e,n,i))})),r}function y(t,e,r,u,c){function d(t,e,i){var r;return M(t)||(i=e,e=t,t=n),U&&(r=w),i||(i=U?k.parent():k),c(t,e,r,i,T)}var p,g,y,b,x,w,$,k,C;if(a===r?(C=s,k=s.$$element):(k=er(r),C=new ae(k,s)),I&&(x=e.$new(!0)),c&&($=d,$.$$boundTransclude=c),N&&(_={},w={},o(N,function(t){var n,i={$scope:t===I||t.$$isolateScope?x:e,$element:k,$attrs:C,$transclude:$};b=t.controller,"@"==b&&(b=C[t.name]),n=m(b,i,!0,t.controllerAs),w[t.name]=n,U||k.data("$"+t.name+"Controller",n.instance),_[t.name]=n})),I){E.$$addScopeInfo(k,x,!0,!(P&&(P===I||P===I.$$originalDirective))),E.$$addScopeClass(k,!0);var D=_&&_[I.name],S=x;D&&D.identifier&&I.bindToController===!0&&(S=D.instance),o(x.$$isolateBindings=I.$$isolateBindings,function(t,n){var r,o,a,s,u=t.attrName,c=t.optional,d=t.mode;switch(d){case"@":C.$observe(u,function(t){S[n]=t}),C.$$observers[u].$$scope=e,C[u]&&(S[n]=i(C[u])(e));break;case"=":if(c&&!C[u])return;o=l(C[u]),s=o.literal?W:function(t,e){return t===e||t!==t&&e!==e},a=o.assign||function(){throw r=S[n]=o(e),Kr("nonassign","Expression '{0}' used with directive '{1}' is non-assignable!",C[u],I.name)},r=S[n]=o(e);var h=function(t){return s(t,S[n])||(s(t,r)?a(e,t=S[n]):S[n]=t),r=t};h.$stateful=!0;var f;f=t.collection?e.$watchCollection(C[u],h):e.$watch(l(C[u],h),null,o.literal),x.$on("$destroy",f);break;case"&":o=l(C[u]),S[n]=function(t){return o(e,t)}}})}for(_&&(o(_,function(t){t()}),_=null),p=0,g=h.length;g>p;p++)y=h[p],oe(y,y.isolateScope?x:e,k,C,y.require&&v(y.directiveName,y.require,k,w),$);var T=e;for(I&&(I.template||null===I.templateUrl)&&(T=x),t&&t(T,r.childNodes,n,c),p=f.length-1;p>=0;p--)y=f[p],oe(y,y.isolateScope?x:e,k,C,y.require&&v(y.directiveName,y.require,k,w),$)}p=p||{};for(var $,_,C,D,S,T,A,O=-Number.MAX_VALUE,N=p.controllerDirectives,I=p.newIsolateScopeDirective,P=p.templateDirective,H=p.nonTlbTranscludeDirective,j=!1,V=!1,U=p.hasElementTranscludeDirective,X=s.$$element=er(a),Z=d,J=u,te=0,ne=t.length;ne>te;te++){C=t[te];var re=C.$$start,se=C.$$end;if(re&&(X=L(a,re,se)),S=n,O>C.priority)break;if((A=C.scope)&&(C.templateUrl||(b(A)?(K("new/isolated scope",I||$,C,X),I=C):K("new/isolated scope",I,C,X)),$=$||C),D=C.name,!C.templateUrl&&C.controller&&(A=C.controller,N=N||{},K("'"+D+"' controller",N[D],C,X),N[D]=C),(A=C.transclude)&&(j=!0,C.$$tlb||(K("transclusion",H,C,X),H=C),"element"==A?(U=!0,O=C.priority,S=X,X=s.$$element=er(e.createComment(" "+D+": "+s[D]+" ")),a=X[0],ee(c,z(S),a),J=E(S,u,O,Z&&Z.name,{nonTlbTranscludeDirective:H})):(S=er(we(a)).contents(),X.empty(),J=E(S,u))),C.template)if(V=!0,K("template",P,C,X),P=C,A=k(C.template)?C.template(X,s):C.template,A=ce(A),C.replace){if(Z=C,S=me(A)?[]:tn(Q(C.templateNamespace,fr(A))),a=S[0],1!=S.length||a.nodeType!==br)throw Kr("tplrt","Template for directive '{0}' must have exactly one root element. {1}",D,"");ee(c,X,a);var le={$attr:{}},ue=F(a,[],le),de=t.splice(te+1,t.length-(te+1));I&&q(ue),t=t.concat(ue).concat(de),Y(s,le),ne=t.length}else X.html(A);if(C.templateUrl)V=!0,K("template",P,C,X),P=C,C.replace&&(Z=C),y=G(t.splice(te,t.length-te),X,s,c,j&&J,h,f,{controllerDirectives:N,newIsolateScopeDirective:I,templateDirective:P,nonTlbTranscludeDirective:H}),ne=t.length;else if(C.compile)try{T=C.compile(X,s,J),k(T)?g(null,T,re,se):T&&g(T.pre,T.post,re,se)}catch(he){r(he,B(X))}C.terminal&&(y.terminal=!0,O=Math.max(O,C.priority))}return y.scope=$&&$.scope===!0,y.transcludeOnThisElement=j,y.elementTranscludeOnThisElement=U,y.templateOnThisElement=V,y.transclude=J,p.hasElementTranscludeDirective=U,y}function q(t){for(var e=0,n=t.length;n>e;e++)t[e]=f(t[e],{$$isolateScope:!0})}function V(e,i,o,a,l,c,d){if(i===l)return null;
var h=null;if(s.hasOwnProperty(i))for(var p,g=t.get(i+u),m=0,v=g.length;v>m;m++)try{p=g[m],(a===n||a>p.priority)&&-1!=p.restrict.indexOf(o)&&(c&&(p=f(p,{$$start:c,$$end:d})),e.push(p),h=p)}catch(y){r(y)}return h}function U(e){if(s.hasOwnProperty(e))for(var n,i=t.get(e+u),r=0,o=i.length;o>r;r++)if(n=i[r],n.multiElement)return!0;return!1}function Y(t,e){var n=e.$attr,i=t.$attr,r=t.$$element;o(t,function(i,r){"$"!=r.charAt(0)&&(e[r]&&e[r]!==i&&(i+=("style"===r?";":" ")+e[r]),t.$set(r,i,!0,n[r]))}),o(e,function(e,o){"class"==o?(A(r,e),t["class"]=(t["class"]?t["class"]+" ":"")+e):"style"==o?(r.attr("style",r.attr("style")+";"+e),t.style=(t.style?t.style+";":"")+e):"$"==o.charAt(0)||t.hasOwnProperty(o)||(t[o]=e,i[o]=n[o])})}function G(t,e,n,i,r,s,l,u){var c,d,h=[],p=e[0],g=t.shift(),m=f(g,{templateUrl:null,transclude:null,replace:null,$$originalDirective:g}),v=k(g.templateUrl)?g.templateUrl(e,n):g.templateUrl,y=g.templateNamespace;return e.empty(),a(v).then(function(a){var f,x,w,$;if(a=ce(a),g.replace){if(w=me(a)?[]:tn(Q(y,fr(a))),f=w[0],1!=w.length||f.nodeType!==br)throw Kr("tplrt","Template for directive '{0}' must have exactly one root element. {1}",g.name,v);x={$attr:{}},ee(i,e,f);var k=F(f,[],x);b(g.scope)&&q(k),t=k.concat(t),Y(n,x)}else f=p,e.html(a);for(t.unshift(m),c=j(t,f,n,r,e,g,s,l,u),o(i,function(t,n){t==f&&(i[n]=e[0])}),d=N(e[0].childNodes,r);h.length;){var _=h.shift(),C=h.shift(),M=h.shift(),D=h.shift(),S=e[0];if(!_.$$destroyed){if(C!==p){var T=C.className;u.hasElementTranscludeDirective&&g.replace||(S=we(f)),ee(M,er(C),S),A(er(S),T)}$=c.transcludeOnThisElement?H(_,c.transclude,D):D,c(d,_,S,i,$)}}h=null}),function(t,e,n,i,r){var o=r;e.$$destroyed||(h?h.push(e,n,i,o):(c.transcludeOnThisElement&&(o=H(e,c.transclude,r)),c(d,e,n,i,o)))}}function X(t,e){var n=e.priority-t.priority;return 0!==n?n:t.name!==e.name?t.name<e.name?-1:1:t.index-e.index}function K(t,e,n,i){if(e)throw Kr("multidir","Multiple directives [{0}, {1}] asking for {2} on: {3}",e.name,n.name,t,B(i))}function Z(t,e){var n=i(e,!0);n&&t.push({priority:0,compile:function(t){var e=t.parent(),i=!!e.length;return i&&E.$$addBindingClass(e),function(t,e){var r=e.parent();i||E.$$addBindingClass(r),E.$$addBindingInfo(r,n.expressions),t.$watch(n,function(t){e[0].nodeValue=t})}}})}function Q(t,n){switch(t=Xi(t||"html")){case"svg":case"math":var i=e.createElement("div");return i.innerHTML="<"+t+">"+n+"</"+t+">",i.childNodes[0].childNodes;default:return n}}function J(t,e){if("srcdoc"==e)return D.HTML;var n=I(t);return"xlinkHref"==e||"form"==n&&"action"==e||"img"!=n&&("src"==e||"ngSrc"==e)?D.RESOURCE_URL:void 0}function te(t,e,n,r,o){var a=J(t,r);o=v[r]||o;var s=i(n,!0,a,o);if(s){if("multiple"===r&&"select"===I(t))throw Kr("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",B(t));e.push({priority:100,compile:function(){return{pre:function(t,e,l){var u=l.$$observers||(l.$$observers={});if($.test(r))throw Kr("nodomevents","Interpolations for HTML DOM event attributes are disallowed.  Please use the ng- versions (such as ng-click instead of onclick) instead.");var c=l[r];c!==n&&(s=c&&i(c,!0,a,o),n=c),s&&(l[r]=s(t),(u[r]||(u[r]=[])).$$inter=!0,(l.$$observers&&l.$$observers[r].$$scope||t).$watch(s,function(t,e){"class"===r&&t!=e?l.$updateClass(t,e):l.$set(r,t)}))}}}})}}function ee(t,n,i){var r,o,a=n[0],s=n.length,l=a.parentNode;if(t)for(r=0,o=t.length;o>r;r++)if(t[r]==a){t[r++]=i;for(var u=r,c=u+s-1,d=t.length;d>u;u++,c++)d>c?t[u]=t[c]:delete t[u];t.length-=s-1,t.context===a&&(t.context=i);break}l&&l.replaceChild(i,a);var h=e.createDocumentFragment();h.appendChild(a),er(i).data(er(a).data()),nr?(dr=!0,nr.cleanData([a])):delete er.cache[a[er.expando]];for(var f=1,p=n.length;p>f;f++){var g=n[f];er(g).remove(),h.appendChild(g),delete n[f]}n[0]=i,n.length=1}function ie(t,e){return d(function(){return t.apply(null,arguments)},t,e)}function oe(t,e,n,i,o,a){try{t(e,n,i,o,a)}catch(s){r(s,B(n))}}var ae=function(t,e){if(e){var n,i,r,o=Object.keys(e);for(n=0,i=o.length;i>n;n++)r=o[n],this[r]=e[r]}else this.$attr={};this.$$element=t};ae.prototype={$normalize:Qe,$addClass:function(t){t&&t.length>0&&S.addClass(this.$$element,t)},$removeClass:function(t){t&&t.length>0&&S.removeClass(this.$$element,t)},$updateClass:function(t,e){var n=Je(t,e);n&&n.length&&S.addClass(this.$$element,n);var i=Je(e,t);i&&i.length&&S.removeClass(this.$$element,i)},$set:function(t,e,i,a){var s,l=this.$$element[0],u=He(l,t),c=Fe(l,t),d=t;if(u?(this.$$element.prop(t,e),a=u):c&&(this[c]=e,d=c),this[t]=e,a?this.$attr[t]=a:(a=this.$attr[t],a||(this.$attr[t]=a=ne(t,"-"))),s=I(this.$$element),"a"===s&&"href"===t||"img"===s&&"src"===t)this[t]=e=T(e,"src"===t);else if("img"===s&&"srcset"===t){for(var h="",f=fr(e),p=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,g=/\s/.test(f)?p:/(,)/,m=f.split(g),v=Math.floor(m.length/2),y=0;v>y;y++){var b=2*y;h+=T(fr(m[b]),!0),h+=" "+fr(m[b+1])}var x=fr(m[2*y]).split(/\s/);h+=T(fr(x[0]),!0),2===x.length&&(h+=" "+fr(x[1])),this[t]=e=h}i!==!1&&(null===e||e===n?this.$$element.removeAttr(a):this.$$element.attr(a,e));var w=this.$$observers;w&&o(w[d],function(t){try{t(e)}catch(n){r(n)}})},$observe:function(t,e){var n=this,i=n.$$observers||(n.$$observers=ue()),r=i[t]||(i[t]=[]);return r.push(e),y.$evalAsync(function(){!r.$$inter&&n.hasOwnProperty(t)&&e(n[t])}),function(){P(r,e)}}};var se=i.startSymbol(),le=i.endSymbol(),ce="{{"==se||"}}"==le?g:function(t){return t.replace(/\{\{/g,se).replace(/}}/g,le)},de=/^ngAttr[A-Z]/;return E.$$addBindingInfo=_?function(t,e){var n=t.data("$binding")||[];hr(e)?n=n.concat(e):n.push(e),t.data("$binding",n)}:p,E.$$addBindingClass=_?function(t){A(t,"ng-binding")}:p,E.$$addScopeInfo=_?function(t,e,n,i){var r=n?i?"$isolateScopeNoTemplate":"$isolateScope":"$scope";t.data(r,e)}:p,E.$$addScopeClass=_?function(t,e){A(t,e?"ng-isolate-scope":"ng-scope")}:p,E}]}function Qe(t){return ge(t.replace(Zr,""))}function Je(t,e){var n="",i=t.split(/\s+/),r=e.split(/\s+/);t:for(var o=0;o<i.length;o++){for(var a=i[o],s=0;s<r.length;s++)if(a==r[s])continue t;n+=(n.length>0?" ":"")+a}return n}function tn(t){t=er(t);var e=t.length;if(1>=e)return t;for(;e--;){var n=t[e];n.nodeType===$r&&or.call(t,e,1)}return t}function en(){var t={},e=!1,r=/^(\S+)(\s+as\s+(\w+))?$/;this.register=function(e,n){ae(e,"controller"),b(e)?d(t,e):t[e]=n},this.allowGlobals=function(){e=!0},this.$get=["$injector","$window",function(o,a){function s(t,e,n,r){if(!t||!b(t.$scope))throw i("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",r,e);t.$scope[e]=n}return function(i,l,u,c){var h,f,p,g;if(u=u===!0,c&&x(c)&&(g=c),x(i)){if(f=i.match(r),!f)throw Qr("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",i);p=f[1],g=g||f[3],i=t.hasOwnProperty(p)?t[p]:se(l.$scope,p,!0)||(e?se(a,p,!0):n),oe(i,p,!0)}if(u){var m=(hr(i)?i[i.length-1]:i).prototype;return h=Object.create(m||null),g&&s(l,g,h,p||i.name),d(function(){return o.invoke(i,h,l,p),h},{instance:h,identifier:g})}return h=o.instantiate(i,l,p),g&&s(l,g,h,p||i.name),h}}]}function nn(){this.$get=["$window",function(t){return er(t.document)}]}function rn(){this.$get=["$log",function(t){return function(){t.error.apply(t,arguments)}}]}function on(t,e){if(x(t)){var n=t.replace(io,"").trim();if(n){var i=e("Content-Type");(i&&0===i.indexOf(Jr)||an(n))&&(t=V(n))}}return t}function an(t){var e=t.match(eo);return e&&no[e[0]].test(t)}function sn(t){var e,n,i,r=ue();return t?(o(t.split("\n"),function(t){i=t.indexOf(":"),e=Xi(fr(t.substr(0,i))),n=fr(t.substr(i+1)),e&&(r[e]=r[e]?r[e]+", "+n:n)}),r):r}function ln(t){var e=b(t)?t:n;return function(n){if(e||(e=sn(t)),n){var i=e[Xi(n)];return void 0===i&&(i=null),i}return e}}function un(t,e,n,i){return k(i)?i(t,e,n):(o(i,function(i){t=i(t,e,n)}),t)}function cn(t){return t>=200&&300>t}function dn(){var t=this.defaults={transformResponse:[on],transformRequest:[function(t){return!b(t)||D(t)||T(t)||S(t)?t:q(t)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:F(to),put:F(to),patch:F(to)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"},e=!1;this.useApplyAsync=function(t){return y(t)?(e=!!t,this):e};var r=this.interceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(a,l,u,c,h,f){function p(e){function r(t){var e=d({},t);return e.data=t.data?un(t.data,t.headers,t.status,l.transformResponse):t.data,cn(t.status)?e:h.reject(e)}function a(t){var e,n={};return o(t,function(t,i){k(t)?(e=t(),null!=e&&(n[i]=e)):n[i]=t}),n}function s(e){var n,i,r,o=t.headers,s=d({},e.headers);o=d({},o.common,o[Xi(e.method)]);t:for(n in o){i=Xi(n);for(r in s)if(Xi(r)===i)continue t;s[n]=o[n]}return a(s)}if(!ur.isObject(e))throw i("$http")("badreq","Http request configuration must be an object.  Received: {0}",e);var l=d({method:"get",transformRequest:t.transformRequest,transformResponse:t.transformResponse},e);l.headers=s(e),l.method=Zi(l.method);var u=function(e){var i=e.headers,a=un(e.data,ln(i),n,e.transformRequest);return v(a)&&o(i,function(t,e){"content-type"===Xi(e)&&delete i[e]}),v(e.withCredentials)&&!v(t.withCredentials)&&(e.withCredentials=t.withCredentials),w(e,a).then(r,r)},c=[u,n],f=h.when(l);for(o(M,function(t){(t.request||t.requestError)&&c.unshift(t.request,t.requestError),(t.response||t.responseError)&&c.push(t.response,t.responseError)});c.length;){var p=c.shift(),g=c.shift();f=f.then(p,g)}return f.success=function(t){return oe(t,"fn"),f.then(function(e){t(e.data,e.status,e.headers,l)}),f},f.error=function(t){return oe(t,"fn"),f.then(null,function(e){t(e.data,e.status,e.headers,l)}),f},f}function g(){o(arguments,function(t){p[t]=function(e,n){return p(d(n||{},{method:t,url:e}))}})}function m(){o(arguments,function(t){p[t]=function(e,n,i){return p(d(i||{},{method:t,url:e,data:n}))}})}function w(i,r){function o(t,n,i,r){function o(){s(n,t,i,r)}f&&(cn(t)?f.put($,[t,n,sn(i),r]):f.remove($)),e?c.$applyAsync(o):(o(),c.$$phase||c.$apply())}function s(t,e,n,r){e=Math.max(e,0),(cn(e)?m.resolve:m.reject)({data:t,status:e,headers:ln(n),config:i,statusText:r})}function u(t){s(t.data,t.status,F(t.headers()),t.statusText)}function d(){var t=p.pendingRequests.indexOf(i);-1!==t&&p.pendingRequests.splice(t,1)}var f,g,m=h.defer(),x=m.promise,w=i.headers,$=_(i.url,i.params);if(p.pendingRequests.push(i),x.then(d,d),!i.cache&&!t.cache||i.cache===!1||"GET"!==i.method&&"JSONP"!==i.method||(f=b(i.cache)?i.cache:b(t.cache)?t.cache:C),f&&(g=f.get($),y(g)?E(g)?g.then(u,u):hr(g)?s(g[1],g[0],F(g[2]),g[3]):s(g,200,{},"OK"):f.put($,x)),v(g)){var k=oi(i.url)?l.cookies()[i.xsrfCookieName||t.xsrfCookieName]:n;k&&(w[i.xsrfHeaderName||t.xsrfHeaderName]=k),a(i.method,$,r,o,w,i.timeout,i.withCredentials,i.responseType)}return x}function _(t,e){if(!e)return t;var n=[];return s(e,function(t,e){null===t||v(t)||(hr(t)||(t=[t]),o(t,function(t){b(t)&&(t=$(t)?t.toISOString():q(t)),n.push(K(e)+"="+K(t))}))}),n.length>0&&(t+=(-1==t.indexOf("?")?"?":"&")+n.join("&")),t}var C=u("$http"),M=[];return o(r,function(t){M.unshift(x(t)?f.get(t):f.invoke(t))}),p.pendingRequests=[],g("get","delete","head","jsonp"),m("post","put","patch"),p.defaults=t,p}]}function hn(){return new t.XMLHttpRequest}function fn(){this.$get=["$browser","$window","$document",function(t,e,n){return pn(t,hn,t.defer,e.angular.callbacks,n[0])}]}function pn(t,e,i,r,a){function s(t,e,n){var i=a.createElement("script"),o=null;return i.type="text/javascript",i.src=t,i.async=!0,o=function(t){Tr(i,"load",o),Tr(i,"error",o),a.body.removeChild(i),i=null;var s=-1,l="unknown";t&&("load"!==t.type||r[e].called||(t={type:"error"}),l=t.type,s="error"===t.type?404:200),n&&n(s,l)},Sr(i,"load",o),Sr(i,"error",o),a.body.appendChild(i),o}return function(a,l,u,c,d,h,f,g){function m(){x&&x(),w&&w.abort()}function v(e,r,o,a,s){_!==n&&i.cancel(_),x=w=null,e(r,o,a,s),t.$$completeOutstandingRequest(p)}if(t.$$incOutstandingRequestCount(),l=l||t.url(),"jsonp"==Xi(a)){var b="_"+(r.counter++).toString(36);r[b]=function(t){r[b].data=t,r[b].called=!0};var x=s(l.replace("JSON_CALLBACK","angular.callbacks."+b),b,function(t,e){v(c,t,r[b].data,"",e),r[b]=p})}else{var w=e();w.open(a,l,!0),o(d,function(t,e){y(t)&&w.setRequestHeader(e,t)}),w.onload=function(){var t=w.statusText||"",e="response"in w?w.response:w.responseText,n=1223===w.status?204:w.status;0===n&&(n=e?200:"file"==ri(l).protocol?404:0),v(c,n,e,w.getAllResponseHeaders(),t)};var $=function(){v(c,-1,null,null,"")};if(w.onerror=$,w.onabort=$,f&&(w.withCredentials=!0),g)try{w.responseType=g}catch(k){if("json"!==g)throw k}w.send(u||null)}if(h>0)var _=i(m,h);else E(h)&&h.then(m)}}function gn(){var t="{{",e="}}";this.startSymbol=function(e){return e?(t=e,this):t},this.endSymbol=function(t){return t?(e=t,this):e},this.$get=["$parse","$exceptionHandler","$sce",function(n,i,r){function o(t){return"\\\\\\"+t}function a(o,a,h,f){function p(n){return n.replace(u,t).replace(c,e)}function g(t){try{return t=T(t),f&&!y(t)?t:A(t)}catch(e){var n=ro("interr","Can't interpolate: {0}\n{1}",o,e.toString());i(n)}}f=!!f;for(var m,b,x,w=0,$=[],_=[],C=o.length,M=[],D=[];C>w;){if(-1==(m=o.indexOf(t,w))||-1==(b=o.indexOf(e,m+s))){w!==C&&M.push(p(o.substring(w)));break}w!==m&&M.push(p(o.substring(w,m))),x=o.substring(m+s,b),$.push(x),_.push(n(x,g)),w=b+l,D.push(M.length),M.push("")}if(h&&M.length>1)throw ro("noconcat","Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required.  See http://docs.angularjs.org/api/ng.$sce",o);if(!a||$.length){var S=function(t){for(var e=0,n=$.length;n>e;e++){if(f&&v(t[e]))return;M[D[e]]=t[e]}return M.join("")},T=function(t){return h?r.getTrusted(h,t):r.valueOf(t)},A=function(t){if(null==t)return"";switch(typeof t){case"string":break;case"number":t=""+t;break;default:t=q(t)}return t};return d(function(t){var e=0,n=$.length,r=new Array(n);try{for(;n>e;e++)r[e]=_[e](t);return S(r)}catch(a){var s=ro("interr","Can't interpolate: {0}\n{1}",o,a.toString());i(s)}},{exp:o,expressions:$,$$watchDelegate:function(t,e,n){var i;return t.$watchGroup(_,function(n,r){var o=S(n);k(e)&&e.call(this,o,n!==r?i:o,t),i=o},n)}})}}var s=t.length,l=e.length,u=new RegExp(t.replace(/./g,o),"g"),c=new RegExp(e.replace(/./g,o),"g");return a.startSymbol=function(){return t},a.endSymbol=function(){return e},a}]}function mn(){this.$get=["$rootScope","$window","$q","$$q",function(t,e,n,i){function r(r,a,s,l){var u=e.setInterval,c=e.clearInterval,d=0,h=y(l)&&!l,f=(h?i:n).defer(),p=f.promise;return s=y(s)?s:0,p.then(null,null,r),p.$$intervalId=u(function(){f.notify(d++),s>0&&d>=s&&(f.resolve(d),c(p.$$intervalId),delete o[p.$$intervalId]),h||t.$apply()},a),o[p.$$intervalId]=f,p}var o={};return r.cancel=function(t){return t&&t.$$intervalId in o?(o[t.$$intervalId].reject("canceled"),e.clearInterval(t.$$intervalId),delete o[t.$$intervalId],!0):!1},r}]}function vn(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"¤",posSuf:"",negPre:"(¤",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),SHORTMONTH:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),DAY:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),SHORTDAY:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a",ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"]},pluralCat:function(t){return 1===t?"one":"other"}}}}function yn(t){for(var e=t.split("/"),n=e.length;n--;)e[n]=X(e[n]);return e.join("/")}function bn(t,e){var n=ri(t);e.$$protocol=n.protocol,e.$$host=n.hostname,e.$$port=h(n.port)||ao[n.protocol]||null}function xn(t,e){var n="/"!==t.charAt(0);n&&(t="/"+t);var i=ri(t);e.$$path=decodeURIComponent(n&&"/"===i.pathname.charAt(0)?i.pathname.substring(1):i.pathname),e.$$search=Y(i.search),e.$$hash=decodeURIComponent(i.hash),e.$$path&&"/"!=e.$$path.charAt(0)&&(e.$$path="/"+e.$$path)}function wn(t,e){return 0===e.indexOf(t)?e.substr(t.length):void 0}function $n(t){var e=t.indexOf("#");return-1==e?t:t.substr(0,e)}function kn(t){return t.replace(/(#.+)|#$/,"$1")}function _n(t){return t.substr(0,$n(t).lastIndexOf("/")+1)}function Cn(t){return t.substring(0,t.indexOf("/",t.indexOf("//")+2))}function Mn(t,e){this.$$html5=!0,e=e||"";var i=_n(t);bn(t,this),this.$$parse=function(t){var e=wn(i,t);if(!x(e))throw so("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',t,i);xn(e,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var t=G(this.$$search),e=this.$$hash?"#"+X(this.$$hash):"";this.$$url=yn(this.$$path)+(t?"?"+t:"")+e,this.$$absUrl=i+this.$$url.substr(1)},this.$$parseLinkUrl=function(r,o){if(o&&"#"===o[0])return this.hash(o.slice(1)),!0;var a,s,l;return(a=wn(t,r))!==n?(s=a,l=(a=wn(e,a))!==n?i+(wn("/",a)||a):t+s):(a=wn(i,r))!==n?l=i+a:i==r+"/"&&(l=i),l&&this.$$parse(l),!!l}}function Dn(t,e){var n=_n(t);bn(t,this),this.$$parse=function(i){function r(t,e,n){var i,r=/^\/[A-Z]:(\/.*)/;return 0===e.indexOf(n)&&(e=e.replace(n,"")),r.exec(e)?t:(i=r.exec(t),i?i[1]:t)}var o,a=wn(t,i)||wn(n,i);v(a)||"#"!==a.charAt(0)?this.$$html5?o=a:(o="",v(a)&&(t=i,this.replace())):(o=wn(e,a),v(o)&&(o=a)),xn(o,this),this.$$path=r(this.$$path,o,t),this.$$compose()},this.$$compose=function(){var n=G(this.$$search),i=this.$$hash?"#"+X(this.$$hash):"";this.$$url=yn(this.$$path)+(n?"?"+n:"")+i,this.$$absUrl=t+(this.$$url?e+this.$$url:"")},this.$$parseLinkUrl=function(e){return $n(t)==$n(e)?(this.$$parse(e),!0):!1}}function Sn(t,e){this.$$html5=!0,Dn.apply(this,arguments);var n=_n(t);this.$$parseLinkUrl=function(i,r){if(r&&"#"===r[0])return this.hash(r.slice(1)),!0;var o,a;return t==$n(i)?o=i:(a=wn(n,i))?o=t+e+a:n===i+"/"&&(o=n),o&&this.$$parse(o),!!o},this.$$compose=function(){var n=G(this.$$search),i=this.$$hash?"#"+X(this.$$hash):"";this.$$url=yn(this.$$path)+(n?"?"+n:"")+i,this.$$absUrl=t+e+this.$$url}}function Tn(t){return function(){return this[t]}}function An(t,e){return function(n){return v(n)?this[t]:(this[t]=e(n),this.$$compose(),this)}}function En(){var t="",e={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(e){return y(e)?(t=e,this):t},this.html5Mode=function(t){return A(t)?(e.enabled=t,this):b(t)?(A(t.enabled)&&(e.enabled=t.enabled),A(t.requireBase)&&(e.requireBase=t.requireBase),A(t.rewriteLinks)&&(e.rewriteLinks=t.rewriteLinks),this):e},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(n,i,r,o,a){function s(t,e,n){var r=u.url(),o=u.$$state;try{i.url(t,e,n),u.$$state=i.state()}catch(a){throw u.url(r),u.$$state=o,a}}function l(t,e){n.$broadcast("$locationChangeSuccess",u.absUrl(),t,u.$$state,e)}var u,c,d,h=i.baseHref(),f=i.url();if(e.enabled){if(!h&&e.requireBase)throw so("nobase","$location in HTML5 mode requires a <base> tag to be present!");d=Cn(f)+(h||"/"),c=r.history?Mn:Sn}else d=$n(f),c=Dn;u=new c(d,"#"+t),u.$$parseLinkUrl(f,f),u.$$state=i.state();var p=/^\s*(javascript|mailto):/i;o.on("click",function(t){if(e.rewriteLinks&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey&&2!=t.which&&2!=t.button){for(var r=er(t.target);"a"!==I(r[0]);)if(r[0]===o[0]||!(r=r.parent())[0])return;var s=r.prop("href"),l=r.attr("href")||r.attr("xlink:href");b(s)&&"[object SVGAnimatedString]"===s.toString()&&(s=ri(s.animVal).href),p.test(s)||!s||r.attr("target")||t.isDefaultPrevented()||u.$$parseLinkUrl(s,l)&&(t.preventDefault(),u.absUrl()!=i.url()&&(n.$apply(),a.angular["ff-684208-preventDefault"]=!0))}}),kn(u.absUrl())!=kn(f)&&i.url(u.absUrl(),!0);var g=!0;return i.onUrlChange(function(t,e){n.$evalAsync(function(){var i,r=u.absUrl(),o=u.$$state;u.$$parse(t),u.$$state=e,i=n.$broadcast("$locationChangeStart",t,r,e,o).defaultPrevented,u.absUrl()===t&&(i?(u.$$parse(r),u.$$state=o,s(r,!1,o)):(g=!1,l(r,o)))}),n.$$phase||n.$digest()}),n.$watch(function(){var t=kn(i.url()),e=kn(u.absUrl()),o=i.state(),a=u.$$replace,c=t!==e||u.$$html5&&r.history&&o!==u.$$state;(g||c)&&(g=!1,n.$evalAsync(function(){var e=u.absUrl(),i=n.$broadcast("$locationChangeStart",e,t,u.$$state,o).defaultPrevented;u.absUrl()===e&&(i?(u.$$parse(t),u.$$state=o):(c&&s(e,a,o===u.$$state?null:u.$$state),l(t,o)))})),u.$$replace=!1}),u}]}function On(){var t=!0,e=this;this.debugEnabled=function(e){return y(e)?(t=e,this):t},this.$get=["$window",function(n){function i(t){return t instanceof Error&&(t.stack?t=t.message&&-1===t.stack.indexOf(t.message)?"Error: "+t.message+"\n"+t.stack:t.stack:t.sourceURL&&(t=t.message+"\n"+t.sourceURL+":"+t.line)),t}function r(t){var e=n.console||{},r=e[t]||e.log||p,a=!1;try{a=!!r.apply}catch(s){}return a?function(){var t=[];return o(arguments,function(e){t.push(i(e))}),r.apply(e,t)}:function(t,e){r(t,null==e?"":e)}}return{log:r("log"),info:r("info"),warn:r("warn"),error:r("error"),debug:function(){var n=r("debug");return function(){t&&n.apply(e,arguments)}}()}}]}function Nn(t,e){if("__defineGetter__"===t||"__defineSetter__"===t||"__lookupGetter__"===t||"__lookupSetter__"===t||"__proto__"===t)throw uo("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",e);return t}function In(t,e){if(t){if(t.constructor===t)throw uo("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",e);if(t.window===t)throw uo("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",e);if(t.children&&(t.nodeName||t.prop&&t.attr&&t.find))throw uo("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",e);if(t===Object)throw uo("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",e)}return t}function Pn(t,e){if(t){if(t.constructor===t)throw uo("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",e);if(t===co||t===ho||t===fo)throw uo("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",e)}}function Hn(t){return t.constant}function Fn(t,e,n,i,r){In(t,r),In(e,r);for(var o,a=n.split("."),s=0;a.length>1;s++){o=Nn(a.shift(),r);var l=0===s&&e&&e[o]||t[o];l||(l={},t[o]=l),t=In(l,r)}return o=Nn(a.shift(),r),In(t[o],r),t[o]=i,i}function Wn(t){return"constructor"==t}function Ln(t,e,i,r,o,a,s){Nn(t,a),Nn(e,a),Nn(i,a),Nn(r,a),Nn(o,a);var l=function(t){return In(t,a)},u=s||Wn(t)?l:g,c=s||Wn(e)?l:g,d=s||Wn(i)?l:g,h=s||Wn(r)?l:g,f=s||Wn(o)?l:g;return function(a,s){var l=s&&s.hasOwnProperty(t)?s:a;return null==l?l:(l=u(l[t]),e?null==l?n:(l=c(l[e]),i?null==l?n:(l=d(l[i]),r?null==l?n:(l=h(l[r]),o?null==l?n:l=f(l[o]):l):l):l):l)}}function zn(t,e){return function(n,i){return t(n,i,In,e)}}function Rn(t,e,i){var r=e.expensiveChecks,a=r?xo:bo,s=a[t];if(s)return s;var l=t.split("."),u=l.length;if(e.csp)s=6>u?Ln(l[0],l[1],l[2],l[3],l[4],i,r):function(t,e){var o,a=0;do o=Ln(l[a++],l[a++],l[a++],l[a++],l[a++],i,r)(t,e),e=n,t=o;while(u>a);return o};else{var c="";r&&(c+="s = eso(s, fe);\nl = eso(l, fe);\n");var d=r;o(l,function(t,e){Nn(t,i);var n=(e?"s":'((l&&l.hasOwnProperty("'+t+'"))?l:s)')+"."+t;(r||Wn(t))&&(n="eso("+n+", fe)",d=!0),c+="if(s == null) return undefined;\ns="+n+";\n"}),c+="return s;";var h=new Function("s","l","eso","fe",c);h.toString=m(c),d&&(h=zn(h,i)),s=h}return s.sharedGetter=!0,s.assign=function(e,n,i){return Fn(e,i,t,n,t)},a[t]=s,s}function jn(t){return k(t.valueOf)?t.valueOf():wo.call(t)}function qn(){var t=ue(),e=ue();this.$get=["$filter","$sniffer",function(n,i){function r(t){var e=t;return t.sharedGetter&&(e=function(e,n){return t(e,n)},e.literal=t.literal,e.constant=t.constant,e.assign=t.assign),e}function a(t,e){for(var n=0,i=t.length;i>n;n++){var r=t[n];r.constant||(r.inputs?a(r.inputs,e):-1===e.indexOf(r)&&e.push(r))}return e}function s(t,e){return null==t||null==e?t===e:"object"==typeof t&&(t=jn(t),"object"==typeof t)?!1:t===e||t!==t&&e!==e}function l(t,e,n,i){var r,o=i.$$inputs||(i.$$inputs=a(i.inputs,[]));if(1===o.length){var l=s;return o=o[0],t.$watch(function(t){var e=o(t);return s(e,l)||(r=i(t),l=e&&jn(e)),r},e,n)}for(var u=[],c=0,d=o.length;d>c;c++)u[c]=s;return t.$watch(function(t){for(var e=!1,n=0,a=o.length;a>n;n++){var l=o[n](t);(e||(e=!s(l,u[n])))&&(u[n]=l&&jn(l))}return e&&(r=i(t)),r},e,n)}function u(t,e,n,i){var r,o;return r=t.$watch(function(t){return i(t)},function(t,n,i){o=t,k(e)&&e.apply(this,arguments),y(t)&&i.$$postDigest(function(){y(o)&&r()})},n)}function c(t,e,n,i){function r(t){var e=!0;return o(t,function(t){y(t)||(e=!1)}),e}var a,s;return a=t.$watch(function(t){return i(t)},function(t,n,i){s=t,k(e)&&e.call(this,t,n,i),r(t)&&i.$$postDigest(function(){r(s)&&a()})},n)}function d(t,e,n,i){var r;return r=t.$watch(function(t){return i(t)},function(){k(e)&&e.apply(this,arguments),r()},n)}function h(t,e){if(!e)return t;var n=t.$$watchDelegate,i=n!==c&&n!==u,r=i?function(n,i){var r=t(n,i);return e(r,n,i)}:function(n,i){var r=t(n,i),o=e(r,n,i);return y(r)?o:r};return t.$$watchDelegate&&t.$$watchDelegate!==l?r.$$watchDelegate=t.$$watchDelegate:e.$stateful||(r.$$watchDelegate=l,r.inputs=[t]),r}var f={csp:i.csp,expensiveChecks:!1},g={csp:i.csp,expensiveChecks:!0};return function(i,o,a){var s,m,v;switch(typeof i){case"string":v=i=i.trim();var y=a?e:t;if(s=y[v],!s){":"===i.charAt(0)&&":"===i.charAt(1)&&(m=!0,i=i.substring(2));var b=a?g:f,x=new vo(b),w=new yo(x,n,b);s=w.parse(i),s.constant?s.$$watchDelegate=d:m?(s=r(s),s.$$watchDelegate=s.literal?c:u):s.inputs&&(s.$$watchDelegate=l),y[v]=s}return h(s,o);case"function":return h(i,o);default:return h(p,o)}}}]}function Vn(){this.$get=["$rootScope","$exceptionHandler",function(t,e){return Un(function(e){t.$evalAsync(e)},e)}]}function Bn(){this.$get=["$browser","$exceptionHandler",function(t,e){return Un(function(e){t.defer(e)},e)}]}function Un(t,e){function r(t,e,n){function i(e){return function(n){r||(r=!0,e.call(t,n))}}var r=!1;return[i(e),i(n)]}function a(){this.$$state={status:0}}function s(t,e){return function(n){e.call(t,n)}}function l(t){var i,r,o;o=t.pending,t.processScheduled=!1,t.pending=n;for(var a=0,s=o.length;s>a;++a){r=o[a][0],i=o[a][t.status];try{k(i)?r.resolve(i(t.value)):1===t.status?r.resolve(t.value):r.reject(t.value)}catch(l){r.reject(l),e(l)}}}function u(e){!e.processScheduled&&e.pending&&(e.processScheduled=!0,t(function(){l(e)}))}function c(){this.promise=new a,this.resolve=s(this,this.resolve),this.reject=s(this,this.reject),this.notify=s(this,this.notify)}function d(t){var e=new c,n=0,i=hr(t)?[]:{};return o(t,function(t,r){n++,v(t).then(function(t){i.hasOwnProperty(r)||(i[r]=t,--n||e.resolve(i))},function(t){i.hasOwnProperty(r)||e.reject(t)})}),0===n&&e.resolve(i),e.promise}var h=i("$q",TypeError),f=function(){return new c};a.prototype={then:function(t,e,n){var i=new c;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([i,t,e,n]),this.$$state.status>0&&u(this.$$state),i.promise},"catch":function(t){return this.then(null,t)},"finally":function(t,e){return this.then(function(e){return m(e,!0,t)},function(e){return m(e,!1,t)},e)}},c.prototype={resolve:function(t){this.promise.$$state.status||(t===this.promise?this.$$reject(h("qcycle","Expected promise to be resolved with value other than itself '{0}'",t)):this.$$resolve(t))},$$resolve:function(t){var n,i;i=r(this,this.$$resolve,this.$$reject);try{(b(t)||k(t))&&(n=t&&t.then),k(n)?(this.promise.$$state.status=-1,n.call(t,i[0],i[1],this.notify)):(this.promise.$$state.value=t,this.promise.$$state.status=1,u(this.promise.$$state))}catch(o){i[1](o),e(o)}},reject:function(t){this.promise.$$state.status||this.$$reject(t)},$$reject:function(t){this.promise.$$state.value=t,this.promise.$$state.status=2,u(this.promise.$$state)},notify:function(n){var i=this.promise.$$state.pending;this.promise.$$state.status<=0&&i&&i.length&&t(function(){for(var t,r,o=0,a=i.length;a>o;o++){r=i[o][0],t=i[o][3];try{r.notify(k(t)?t(n):n)}catch(s){e(s)}}})}};var p=function(t){var e=new c;return e.reject(t),e.promise},g=function(t,e){var n=new c;return e?n.resolve(t):n.reject(t),n.promise},m=function(t,e,n){var i=null;try{k(n)&&(i=n())}catch(r){return g(r,!1)}return E(i)?i.then(function(){return g(t,e)},function(t){return g(t,!1)}):g(t,e)},v=function(t,e,n,i){var r=new c;return r.resolve(t),r.promise.then(e,n,i)},y=function x(t){function e(t){i.resolve(t)}function n(t){i.reject(t)}if(!k(t))throw h("norslvr","Expected resolverFn, got '{0}'",t);if(!(this instanceof x))return new x(t);var i=new c;return t(e,n),i.promise};return y.defer=f,y.reject=p,y.when=v,y.all=d,y}function Yn(){this.$get=["$window","$timeout",function(t,e){function n(){for(var t=0;t<c.length;t++){var e=c[t];e&&(c[t]=null,e())}u=c.length=0}function i(t){var e=c.length;return u++,c.push(t),0===e&&(l=s(n)),function(){e>=0&&(c[e]=null,e=null,0===--u&&l&&(l(),l=null,c.length=0))}}var r=t.requestAnimationFrame||t.webkitRequestAnimationFrame,o=t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.webkitCancelRequestAnimationFrame,a=!!r,s=a?function(t){var e=r(t);return function(){o(e)}}:function(t){var n=e(t,16.66,!1);return function(){e.cancel(n)}};i.supported=a;var l,u=0,c=[];return i}]}function Gn(){function t(t){function e(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$id=u(),this.$$ChildScope=null}return e.prototype=t,e}var e=10,n=i("$rootScope"),a=null,s=null;this.digestTtl=function(t){return arguments.length&&(e=t),e},this.$get=["$injector","$exceptionHandler","$parse","$browser",function(i,l,c,d){function h(t){t.currentScope.$$destroyed=!0}function f(){this.$id=u(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this.$root=this,this.$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$isolateBindings=null}function g(t){if(_.$$phase)throw n("inprog","{0} already in progress",_.$$phase);_.$$phase=t}function m(){_.$$phase=null}function y(t,e,n){do t.$$listenerCount[n]-=e,0===t.$$listenerCount[n]&&delete t.$$listenerCount[n];while(t=t.$parent)}function x(){}function w(){for(;D.length;)try{D.shift()()}catch(t){l(t)}s=null}function $(){null===s&&(s=d.defer(function(){_.$apply(w)}))}f.prototype={constructor:f,$new:function(e,n){var i;return n=n||this,e?(i=new f,i.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=t(this)),i=new this.$$ChildScope),i.$parent=n,i.$$prevSibling=n.$$childTail,n.$$childHead?(n.$$childTail.$$nextSibling=i,n.$$childTail=i):n.$$childHead=n.$$childTail=i,(e||n!=this)&&i.$on("$destroy",h),i},$watch:function(t,e,n){var i=c(t);if(i.$$watchDelegate)return i.$$watchDelegate(this,e,n,i);var r=this,o=r.$$watchers,s={fn:e,last:x,get:i,exp:t,eq:!!n};return a=null,k(e)||(s.fn=p),o||(o=r.$$watchers=[]),o.unshift(s),function(){P(o,s),a=null}},$watchGroup:function(t,e){function n(){l=!1,u?(u=!1,e(r,r,s)):e(r,i,s)}var i=new Array(t.length),r=new Array(t.length),a=[],s=this,l=!1,u=!0;if(!t.length){var c=!0;return s.$evalAsync(function(){c&&e(r,r,s)}),function(){c=!1}}return 1===t.length?this.$watch(t[0],function(t,n,o){r[0]=t,i[0]=n,e(r,t===n?r:i,o)}):(o(t,function(t,e){var o=s.$watch(t,function(t,o){r[e]=t,i[e]=o,l||(l=!0,s.$evalAsync(n))});a.push(o)}),function(){for(;a.length;)a.shift()()})},$watchCollection:function(t,e){function n(t){o=t;var e,n,i,s,l;if(!v(o)){if(b(o))if(r(o)){a!==f&&(a=f,m=a.length=0,d++),e=o.length,m!==e&&(d++,a.length=m=e);for(var u=0;e>u;u++)l=a[u],s=o[u],i=l!==l&&s!==s,i||l===s||(d++,a[u]=s)}else{a!==p&&(a=p={},m=0,d++),e=0;for(n in o)o.hasOwnProperty(n)&&(e++,s=o[n],l=a[n],n in a?(i=l!==l&&s!==s,i||l===s||(d++,a[n]=s)):(m++,a[n]=s,d++));if(m>e){d++;for(n in a)o.hasOwnProperty(n)||(m--,delete a[n])}}else a!==o&&(a=o,d++);return d}}function i(){if(g?(g=!1,e(o,o,l)):e(o,s,l),u)if(b(o))if(r(o)){s=new Array(o.length);
for(var t=0;t<o.length;t++)s[t]=o[t]}else{s={};for(var n in o)Ki.call(o,n)&&(s[n]=o[n])}else s=o}n.$stateful=!0;var o,a,s,l=this,u=e.length>1,d=0,h=c(t,n),f=[],p={},g=!0,m=0;return this.$watch(h,i)},$digest:function(){var t,i,r,o,u,c,h,f,p,v,y=e,b=this,$=[];g("$digest"),d.$$checkUrlChange(),this===_&&null!==s&&(d.defer.cancel(s),w()),a=null;do{for(c=!1,f=b;C.length;){try{v=C.shift(),v.scope.$eval(v.expression,v.locals)}catch(D){l(D)}a=null}t:do{if(o=f.$$watchers)for(u=o.length;u--;)try{if(t=o[u])if((i=t.get(f))===(r=t.last)||(t.eq?W(i,r):"number"==typeof i&&"number"==typeof r&&isNaN(i)&&isNaN(r))){if(t===a){c=!1;break t}}else c=!0,a=t,t.last=t.eq?H(i,null):i,t.fn(i,r===x?i:r,f),5>y&&(p=4-y,$[p]||($[p]=[]),$[p].push({msg:k(t.exp)?"fn: "+(t.exp.name||t.exp.toString()):t.exp,newVal:i,oldVal:r}))}catch(D){l(D)}if(!(h=f.$$childHead||f!==b&&f.$$nextSibling))for(;f!==b&&!(h=f.$$nextSibling);)f=f.$parent}while(f=h);if((c||C.length)&&!y--)throw m(),n("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",e,$)}while(c||C.length);for(m();M.length;)try{M.shift()()}catch(D){l(D)}},$destroy:function(){if(!this.$$destroyed){var t=this.$parent;if(this.$broadcast("$destroy"),this.$$destroyed=!0,this!==_){for(var e in this.$$listenerCount)y(this,this.$$listenerCount[e],e);t.$$childHead==this&&(t.$$childHead=this.$$nextSibling),t.$$childTail==this&&(t.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=p,this.$on=this.$watch=this.$watchGroup=function(){return p},this.$$listeners={},this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=this.$$watchers=null}}},$eval:function(t,e){return c(t)(this,e)},$evalAsync:function(t,e){_.$$phase||C.length||d.defer(function(){C.length&&_.$digest()}),C.push({scope:this,expression:t,locals:e})},$$postDigest:function(t){M.push(t)},$apply:function(t){try{return g("$apply"),this.$eval(t)}catch(e){l(e)}finally{m();try{_.$digest()}catch(e){throw l(e),e}}},$applyAsync:function(t){function e(){n.$eval(t)}var n=this;t&&D.push(e),$()},$on:function(t,e){var n=this.$$listeners[t];n||(this.$$listeners[t]=n=[]),n.push(e);var i=this;do i.$$listenerCount[t]||(i.$$listenerCount[t]=0),i.$$listenerCount[t]++;while(i=i.$parent);var r=this;return function(){var i=n.indexOf(e);-1!==i&&(n[i]=null,y(r,1,t))}},$emit:function(t){var e,n,i,r=[],o=this,a=!1,s={name:t,targetScope:o,stopPropagation:function(){a=!0},preventDefault:function(){s.defaultPrevented=!0},defaultPrevented:!1},u=L([s],arguments,1);do{for(e=o.$$listeners[t]||r,s.currentScope=o,n=0,i=e.length;i>n;n++)if(e[n])try{e[n].apply(null,u)}catch(c){l(c)}else e.splice(n,1),n--,i--;if(a)return s.currentScope=null,s;o=o.$parent}while(o);return s.currentScope=null,s},$broadcast:function(t){var e=this,n=e,i=e,r={name:t,targetScope:e,preventDefault:function(){r.defaultPrevented=!0},defaultPrevented:!1};if(!e.$$listenerCount[t])return r;for(var o,a,s,u=L([r],arguments,1);n=i;){for(r.currentScope=n,o=n.$$listeners[t]||[],a=0,s=o.length;s>a;a++)if(o[a])try{o[a].apply(null,u)}catch(c){l(c)}else o.splice(a,1),a--,s--;if(!(i=n.$$listenerCount[t]&&n.$$childHead||n!==e&&n.$$nextSibling))for(;n!==e&&!(i=n.$$nextSibling);)n=n.$parent}return r.currentScope=null,r}};var _=new f,C=_.$$asyncQueue=[],M=_.$$postDigestQueue=[],D=_.$$applyAsyncQueue=[];return _}]}function Xn(){var t=/^\s*(https?|ftp|mailto|tel|file):/,e=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(e){return y(e)?(t=e,this):t},this.imgSrcSanitizationWhitelist=function(t){return y(t)?(e=t,this):e},this.$get=function(){return function(n,i){var r,o=i?e:t;return r=ri(n).href,""===r||r.match(o)?n:"unsafe:"+r}}}function Kn(t){if("self"===t)return t;if(x(t)){if(t.indexOf("***")>-1)throw $o("iwcard","Illegal sequence *** in string matcher.  String: {0}",t);return t=pr(t).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+t+"$")}if(_(t))return new RegExp("^"+t.source+"$");throw $o("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function Zn(t){var e=[];return y(t)&&o(t,function(t){e.push(Kn(t))}),e}function Qn(){this.SCE_CONTEXTS=ko;var t=["self"],e=[];this.resourceUrlWhitelist=function(e){return arguments.length&&(t=Zn(e)),t},this.resourceUrlBlacklist=function(t){return arguments.length&&(e=Zn(t)),e},this.$get=["$injector",function(i){function r(t,e){return"self"===t?oi(e):!!t.exec(e.href)}function o(n){var i,o,a=ri(n.toString()),s=!1;for(i=0,o=t.length;o>i;i++)if(r(t[i],a)){s=!0;break}if(s)for(i=0,o=e.length;o>i;i++)if(r(e[i],a)){s=!1;break}return s}function a(t){var e=function(t){this.$$unwrapTrustedValue=function(){return t}};return t&&(e.prototype=new t),e.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},e.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},e}function s(t,e){var i=h.hasOwnProperty(t)?h[t]:null;if(!i)throw $o("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",t,e);if(null===e||e===n||""===e)return e;if("string"!=typeof e)throw $o("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",t);return new i(e)}function l(t){return t instanceof d?t.$$unwrapTrustedValue():t}function u(t,e){if(null===e||e===n||""===e)return e;var i=h.hasOwnProperty(t)?h[t]:null;if(i&&e instanceof i)return e.$$unwrapTrustedValue();if(t===ko.RESOURCE_URL){if(o(e))return e;throw $o("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy.  URL: {0}",e.toString())}if(t===ko.HTML)return c(e);throw $o("unsafe","Attempting to use an unsafe value in a safe context.")}var c=function(){throw $o("unsafe","Attempting to use an unsafe value in a safe context.")};i.has("$sanitize")&&(c=i.get("$sanitize"));var d=a(),h={};return h[ko.HTML]=a(d),h[ko.CSS]=a(d),h[ko.URL]=a(d),h[ko.JS]=a(d),h[ko.RESOURCE_URL]=a(h[ko.URL]),{trustAs:s,getTrusted:u,valueOf:l}}]}function Jn(){var t=!0;this.enabled=function(e){return arguments.length&&(t=!!e),t},this.$get=["$parse","$sceDelegate",function(e,n){if(t&&8>tr)throw $o("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode.  You can fix this by adding the text <!doctype html> to the top of your HTML document.  See http://docs.angularjs.org/api/ng.$sce for more information.");var i=F(ko);i.isEnabled=function(){return t},i.trustAs=n.trustAs,i.getTrusted=n.getTrusted,i.valueOf=n.valueOf,t||(i.trustAs=i.getTrusted=function(t,e){return e},i.valueOf=g),i.parseAs=function(t,n){var r=e(n);return r.literal&&r.constant?r:e(n,function(e){return i.getTrusted(t,e)})};var r=i.parseAs,a=i.getTrusted,s=i.trustAs;return o(ko,function(t,e){var n=Xi(e);i[ge("parse_as_"+n)]=function(e){return r(t,e)},i[ge("get_trusted_"+n)]=function(e){return a(t,e)},i[ge("trust_as_"+n)]=function(e){return s(t,e)}}),i}]}function ti(){this.$get=["$window","$document",function(t,e){var n,i,r={},o=h((/android (\d+)/.exec(Xi((t.navigator||{}).userAgent))||[])[1]),a=/Boxee/i.test((t.navigator||{}).userAgent),s=e[0]||{},l=/^(Moz|webkit|ms)(?=[A-Z])/,u=s.body&&s.body.style,c=!1,d=!1;if(u){for(var f in u)if(i=l.exec(f)){n=i[0],n=n.substr(0,1).toUpperCase()+n.substr(1);break}n||(n="WebkitOpacity"in u&&"webkit"),c=!!("transition"in u||n+"Transition"in u),d=!!("animation"in u||n+"Animation"in u),!o||c&&d||(c=x(s.body.style.webkitTransition),d=x(s.body.style.webkitAnimation))}return{history:!(!t.history||!t.history.pushState||4>o||a),hasEvent:function(t){if("input"===t&&11>=tr)return!1;if(v(r[t])){var e=s.createElement("div");r[t]="on"+t in e}return r[t]},csp:gr(),vendorPrefix:n,transitions:c,animations:d,android:o}}]}function ei(){this.$get=["$templateCache","$http","$q","$sce",function(t,e,n,i){function r(o,a){function s(t){if(!a)throw Kr("tpload","Failed to load template: {0}",o);return n.reject(t)}r.totalPendingRequests++,x(o)&&t.get(o)||(o=i.getTrustedResourceUrl(o));var l=e.defaults&&e.defaults.transformResponse;hr(l)?l=l.filter(function(t){return t!==on}):l===on&&(l=null);var u={cache:t,transformResponse:l};return e.get(o,u)["finally"](function(){r.totalPendingRequests--}).then(function(t){return t.data},s)}return r.totalPendingRequests=0,r}]}function ni(){this.$get=["$rootScope","$browser","$location",function(t,e,n){var i={};return i.findBindings=function(t,e,n){var i=t.getElementsByClassName("ng-binding"),r=[];return o(i,function(t){var i=ur.element(t).data("$binding");i&&o(i,function(i){if(n){var o=new RegExp("(^|\\s)"+pr(e)+"(\\s|\\||$)");o.test(i)&&r.push(t)}else-1!=i.indexOf(e)&&r.push(t)})}),r},i.findModels=function(t,e,n){for(var i=["ng-","data-ng-","ng\\:"],r=0;r<i.length;++r){var o=n?"=":"*=",a="["+i[r]+"model"+o+'"'+e+'"]',s=t.querySelectorAll(a);if(s.length)return s}},i.getLocation=function(){return n.url()},i.setLocation=function(e){e!==n.url()&&(n.url(e),t.$digest())},i.whenStable=function(t){e.notifyWhenNoOutstandingRequests(t)},i}]}function ii(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(t,e,n,i,r){function o(o,s,l){var u,c=y(l)&&!l,d=(c?i:n).defer(),h=d.promise;return u=e.defer(function(){try{d.resolve(o())}catch(e){d.reject(e),r(e)}finally{delete a[h.$$timeoutId]}c||t.$apply()},s),h.$$timeoutId=u,a[u]=d,h}var a={};return o.cancel=function(t){return t&&t.$$timeoutId in a?(a[t.$$timeoutId].reject("canceled"),delete a[t.$$timeoutId],e.defer.cancel(t.$$timeoutId)):!1},o}]}function ri(t){var e=t;return tr&&(_o.setAttribute("href",e),e=_o.href),_o.setAttribute("href",e),{href:_o.href,protocol:_o.protocol?_o.protocol.replace(/:$/,""):"",host:_o.host,search:_o.search?_o.search.replace(/^\?/,""):"",hash:_o.hash?_o.hash.replace(/^#/,""):"",hostname:_o.hostname,port:_o.port,pathname:"/"===_o.pathname.charAt(0)?_o.pathname:"/"+_o.pathname}}function oi(t){var e=x(t)?ri(t):t;return e.protocol===Co.protocol&&e.host===Co.host}function ai(){this.$get=m(t)}function si(t){function e(i,r){if(b(i)){var a={};return o(i,function(t,n){a[n]=e(n,t)}),a}return t.factory(i+n,r)}var n="Filter";this.register=e,this.$get=["$injector",function(t){return function(e){return t.get(e+n)}}],e("currency",di),e("date",_i),e("filter",li),e("json",Ci),e("limitTo",Mi),e("lowercase",Ao),e("number",hi),e("orderBy",Di),e("uppercase",Eo)}function li(){return function(t,e,n){if(!hr(t))return t;var i,r,o=null!==e?typeof e:"null";switch(o){case"function":i=e;break;case"boolean":case"null":case"number":case"string":r=!0;case"object":i=ui(e,n,r);break;default:return t}return t.filter(i)}}function ui(t,e,n){var i,r=b(t)&&"$"in t;return e===!0?e=W:k(e)||(e=function(t,e){return v(t)?!1:null===t||null===e?t===e:b(t)||b(e)?!1:(t=Xi(""+t),e=Xi(""+e),-1!==t.indexOf(e))}),i=function(i){return r&&!b(i)?ci(i,t.$,e,!1):ci(i,t,e,n)}}function ci(t,e,n,i,r){var o=null!==t?typeof t:"null",a=null!==e?typeof e:"null";if("string"===a&&"!"===e.charAt(0))return!ci(t,e.substring(1),n,i);if(hr(t))return t.some(function(t){return ci(t,e,n,i)});switch(o){case"object":var s;if(i){for(s in t)if("$"!==s.charAt(0)&&ci(t[s],e,n,!0))return!0;return r?!1:ci(t,e,n,!1)}if("object"===a){for(s in e){var l=e[s];if(!k(l)&&!v(l)){var u="$"===s,c=u?t:t[s];if(!ci(c,l,n,u,u))return!1}}return!0}return n(t,e);case"function":return!1;default:return n(t,e)}}function di(t){var e=t.NUMBER_FORMATS;return function(t,n,i){return v(n)&&(n=e.CURRENCY_SYM),v(i)&&(i=e.PATTERNS[1].maxFrac),null==t?t:fi(t,e.PATTERNS[1],e.GROUP_SEP,e.DECIMAL_SEP,i).replace(/\u00A4/g,n)}}function hi(t){var e=t.NUMBER_FORMATS;return function(t,n){return null==t?t:fi(t,e.PATTERNS[0],e.GROUP_SEP,e.DECIMAL_SEP,n)}}function fi(t,e,n,i,r){if(!isFinite(t)||b(t))return"";var o=0>t;t=Math.abs(t);var a=t+"",s="",l=[],u=!1;if(-1!==a.indexOf("e")){var c=a.match(/([\d\.]+)e(-?)(\d+)/);c&&"-"==c[2]&&c[3]>r+1?t=0:(s=a,u=!0)}if(u)r>0&&1>t&&(s=t.toFixed(r),t=parseFloat(s));else{var d=(a.split(Mo)[1]||"").length;v(r)&&(r=Math.min(Math.max(e.minFrac,d),e.maxFrac)),t=+(Math.round(+(t.toString()+"e"+r)).toString()+"e"+-r);var h=(""+t).split(Mo),f=h[0];h=h[1]||"";var p,g=0,m=e.lgSize,y=e.gSize;if(f.length>=m+y)for(g=f.length-m,p=0;g>p;p++)(g-p)%y===0&&0!==p&&(s+=n),s+=f.charAt(p);for(p=g;p<f.length;p++)(f.length-p)%m===0&&0!==p&&(s+=n),s+=f.charAt(p);for(;h.length<r;)h+="0";r&&"0"!==r&&(s+=i+h.substr(0,r))}return 0===t&&(o=!1),l.push(o?e.negPre:e.posPre,s,o?e.negSuf:e.posSuf),l.join("")}function pi(t,e,n){var i="";for(0>t&&(i="-",t=-t),t=""+t;t.length<e;)t="0"+t;return n&&(t=t.substr(t.length-e)),i+t}function gi(t,e,n,i){return n=n||0,function(r){var o=r["get"+t]();return(n>0||o>-n)&&(o+=n),0===o&&-12==n&&(o=12),pi(o,e,i)}}function mi(t,e){return function(n,i){var r=n["get"+t](),o=Zi(e?"SHORT"+t:t);return i[o][r]}}function vi(t){var e=-1*t.getTimezoneOffset(),n=e>=0?"+":"";return n+=pi(Math[e>0?"floor":"ceil"](e/60),2)+pi(Math.abs(e%60),2)}function yi(t){var e=new Date(t,0,1).getDay();return new Date(t,0,(4>=e?5:12)-e)}function bi(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate()+(4-t.getDay()))}function xi(t){return function(e){var n=yi(e.getFullYear()),i=bi(e),r=+i-+n,o=1+Math.round(r/6048e5);return pi(o,t)}}function wi(t,e){return t.getHours()<12?e.AMPMS[0]:e.AMPMS[1]}function $i(t,e){return t.getFullYear()<=0?e.ERAS[0]:e.ERAS[1]}function ki(t,e){return t.getFullYear()<=0?e.ERANAMES[0]:e.ERANAMES[1]}function _i(t){function e(t){var e;if(e=t.match(n)){var i=new Date(0),r=0,o=0,a=e[8]?i.setUTCFullYear:i.setFullYear,s=e[8]?i.setUTCHours:i.setHours;e[9]&&(r=h(e[9]+e[10]),o=h(e[9]+e[11])),a.call(i,h(e[1]),h(e[2])-1,h(e[3]));var l=h(e[4]||0)-r,u=h(e[5]||0)-o,c=h(e[6]||0),d=Math.round(1e3*parseFloat("0."+(e[7]||0)));return s.call(i,l,u,c,d),i}return t}var n=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(n,i,r){var a,s,l="",u=[];if(i=i||"mediumDate",i=t.DATETIME_FORMATS[i]||i,x(n)&&(n=To.test(n)?h(n):e(n)),w(n)&&(n=new Date(n)),!$(n))return n;for(;i;)s=So.exec(i),s?(u=L(u,s,1),i=u.pop()):(u.push(i),i=null);return r&&"UTC"===r&&(n=new Date(n.getTime()),n.setMinutes(n.getMinutes()+n.getTimezoneOffset())),o(u,function(e){a=Do[e],l+=a?a(n,t.DATETIME_FORMATS):e.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}}function Ci(){return function(t,e){return v(e)&&(e=2),q(t,e)}}function Mi(){return function(t,e){return w(t)&&(t=t.toString()),hr(t)||x(t)?(e=1/0===Math.abs(Number(e))?Number(e):h(e),e?e>0?t.slice(0,e):t.slice(e):x(t)?"":[]):t}}function Di(t){return function(e,n,i){function o(t,e){for(var i=0;i<n.length;i++){var r=n[i](t,e);if(0!==r)return r}return 0}function a(t,e){return e?function(e,n){return t(n,e)}:t}function s(t){switch(typeof t){case"number":case"boolean":case"string":return!0;default:return!1}}function l(t){return null===t?"null":"function"==typeof t.valueOf&&(t=t.valueOf(),s(t))?t:"function"==typeof t.toString&&(t=t.toString(),s(t))?t:""}function u(t,e){var n=typeof t,i=typeof e;return n===i&&"object"===n&&(t=l(t),e=l(e)),n===i?("string"===n&&(t=t.toLowerCase(),e=e.toLowerCase()),t===e?0:e>t?-1:1):i>n?-1:1}return r(e)?(n=hr(n)?n:[n],0===n.length&&(n=["+"]),n=n.map(function(e){var n=!1,i=e||g;if(x(e)){if(("+"==e.charAt(0)||"-"==e.charAt(0))&&(n="-"==e.charAt(0),e=e.substring(1)),""===e)return a(u,n);if(i=t(e),i.constant){var r=i();return a(function(t,e){return u(t[r],e[r])},n)}}return a(function(t,e){return u(i(t),i(e))},n)}),rr.call(e).sort(a(o,i))):e}}function Si(t){return k(t)&&(t={link:t}),t.restrict=t.restrict||"AC",m(t)}function Ti(t,e){t.$name=e}function Ai(t,e,i,r,a){var s=this,l=[],u=s.$$parentForm=t.parent().controller("form")||Io;s.$error={},s.$$success={},s.$pending=n,s.$name=a(e.name||e.ngForm||"")(i),s.$dirty=!1,s.$pristine=!0,s.$valid=!0,s.$invalid=!1,s.$submitted=!1,u.$addControl(s),s.$rollbackViewValue=function(){o(l,function(t){t.$rollbackViewValue()})},s.$commitViewValue=function(){o(l,function(t){t.$commitViewValue()})},s.$addControl=function(t){ae(t.$name,"input"),l.push(t),t.$name&&(s[t.$name]=t)},s.$$renameControl=function(t,e){var n=t.$name;s[n]===t&&delete s[n],s[e]=t,t.$name=e},s.$removeControl=function(t){t.$name&&s[t.$name]===t&&delete s[t.$name],o(s.$pending,function(e,n){s.$setValidity(n,null,t)}),o(s.$error,function(e,n){s.$setValidity(n,null,t)}),o(s.$$success,function(e,n){s.$setValidity(n,null,t)}),P(l,t)},Bi({ctrl:this,$element:t,set:function(t,e,n){var i=t[e];if(i){var r=i.indexOf(n);-1===r&&i.push(n)}else t[e]=[n]},unset:function(t,e,n){var i=t[e];i&&(P(i,n),0===i.length&&delete t[e])},parentForm:u,$animate:r}),s.$setDirty=function(){r.removeClass(t,ma),r.addClass(t,va),s.$dirty=!0,s.$pristine=!1,u.$setDirty()},s.$setPristine=function(){r.setClass(t,ma,va+" "+Po),s.$dirty=!1,s.$pristine=!0,s.$submitted=!1,o(l,function(t){t.$setPristine()})},s.$setUntouched=function(){o(l,function(t){t.$setUntouched()})},s.$setSubmitted=function(){r.addClass(t,Po),s.$submitted=!0,u.$setSubmitted()}}function Ei(t){t.$formatters.push(function(e){return t.$isEmpty(e)?e:e.toString()})}function Oi(t,e,n,i,r,o){Ni(t,e,n,i,r,o),Ei(i)}function Ni(t,e,n,i,r,o){var a=Xi(e[0].type);if(!r.android){var s=!1;e.on("compositionstart",function(){s=!0}),e.on("compositionend",function(){s=!1,l()})}var l=function(t){if(u&&(o.defer.cancel(u),u=null),!s){var r=e.val(),l=t&&t.type;"password"===a||n.ngTrim&&"false"===n.ngTrim||(r=fr(r)),(i.$viewValue!==r||""===r&&i.$$hasNativeValidators)&&i.$setViewValue(r,l)}};if(r.hasEvent("input"))e.on("input",l);else{var u,c=function(t,e,n){u||(u=o.defer(function(){u=null,e&&e.value===n||l(t)}))};e.on("keydown",function(t){var e=t.keyCode;91===e||e>15&&19>e||e>=37&&40>=e||c(t,this,this.value)}),r.hasEvent("paste")&&e.on("paste cut",c)}e.on("change",l),i.$render=function(){e.val(i.$isEmpty(i.$viewValue)?"":i.$viewValue)}}function Ii(t,e){if($(t))return t;if(x(t)){Bo.lastIndex=0;var n=Bo.exec(t);if(n){var i=+n[1],r=+n[2],o=0,a=0,s=0,l=0,u=yi(i),c=7*(r-1);return e&&(o=e.getHours(),a=e.getMinutes(),s=e.getSeconds(),l=e.getMilliseconds()),new Date(i,0,u.getDate()+c,o,a,s,l)}}return 0/0}function Pi(t,e){return function(n,i){var r,a;if($(n))return n;if(x(n)){if('"'==n.charAt(0)&&'"'==n.charAt(n.length-1)&&(n=n.substring(1,n.length-1)),Lo.test(n))return new Date(n);if(t.lastIndex=0,r=t.exec(n))return r.shift(),a=i?{yyyy:i.getFullYear(),MM:i.getMonth()+1,dd:i.getDate(),HH:i.getHours(),mm:i.getMinutes(),ss:i.getSeconds(),sss:i.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},o(r,function(t,n){n<e.length&&(a[e[n]]=+t)}),new Date(a.yyyy,a.MM-1,a.dd,a.HH,a.mm,a.ss||0,1e3*a.sss||0)}return 0/0}}function Hi(t,e,i,r){return function(o,a,s,l,u,c,d){function h(t){return t&&!(t.getTime&&t.getTime()!==t.getTime())}function f(t){return y(t)?$(t)?t:i(t):n}Fi(o,a,s,l),Ni(o,a,s,l,u,c);var p,g=l&&l.$options&&l.$options.timezone;if(l.$$parserName=t,l.$parsers.push(function(t){if(l.$isEmpty(t))return null;if(e.test(t)){var r=i(t,p);return"UTC"===g&&r.setMinutes(r.getMinutes()-r.getTimezoneOffset()),r}return n}),l.$formatters.push(function(t){if(t&&!$(t))throw wa("datefmt","Expected `{0}` to be a date",t);if(h(t)){if(p=t,p&&"UTC"===g){var e=6e4*p.getTimezoneOffset();p=new Date(p.getTime()+e)}return d("date")(t,r,g)}return p=null,""}),y(s.min)||s.ngMin){var m;l.$validators.min=function(t){return!h(t)||v(m)||i(t)>=m},s.$observe("min",function(t){m=f(t),l.$validate()})}if(y(s.max)||s.ngMax){var b;l.$validators.max=function(t){return!h(t)||v(b)||i(t)<=b},s.$observe("max",function(t){b=f(t),l.$validate()})}}}function Fi(t,e,i,r){var o=e[0],a=r.$$hasNativeValidators=b(o.validity);a&&r.$parsers.push(function(t){var i=e.prop(Gi)||{};return i.badInput&&!i.typeMismatch?n:t})}function Wi(t,e,i,r,o,a){if(Fi(t,e,i,r),Ni(t,e,i,r,o,a),r.$$parserName="number",r.$parsers.push(function(t){return r.$isEmpty(t)?null:jo.test(t)?parseFloat(t):n}),r.$formatters.push(function(t){if(!r.$isEmpty(t)){if(!w(t))throw wa("numfmt","Expected `{0}` to be a number",t);t=t.toString()}return t}),y(i.min)||i.ngMin){var s;r.$validators.min=function(t){return r.$isEmpty(t)||v(s)||t>=s},i.$observe("min",function(t){y(t)&&!w(t)&&(t=parseFloat(t,10)),s=w(t)&&!isNaN(t)?t:n,r.$validate()})}if(y(i.max)||i.ngMax){var l;r.$validators.max=function(t){return r.$isEmpty(t)||v(l)||l>=t},i.$observe("max",function(t){y(t)&&!w(t)&&(t=parseFloat(t,10)),l=w(t)&&!isNaN(t)?t:n,r.$validate()})}}function Li(t,e,n,i,r,o){Ni(t,e,n,i,r,o),Ei(i),i.$$parserName="url",i.$validators.url=function(t,e){var n=t||e;return i.$isEmpty(n)||zo.test(n)}}function zi(t,e,n,i,r,o){Ni(t,e,n,i,r,o),Ei(i),i.$$parserName="email",i.$validators.email=function(t,e){var n=t||e;return i.$isEmpty(n)||Ro.test(n)}}function Ri(t,e,n,i){v(n.name)&&e.attr("name",u());var r=function(t){e[0].checked&&i.$setViewValue(n.value,t&&t.type)};e.on("click",r),i.$render=function(){var t=n.value;e[0].checked=t==i.$viewValue},n.$observe("value",i.$render)}function ji(t,e,n,r,o){var a;if(y(r)){if(a=t(r),!a.constant)throw i("ngModel")("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",n,r);return a(e)}return o}function qi(t,e,n,i,r,o,a,s){var l=ji(s,t,"ngTrueValue",n.ngTrueValue,!0),u=ji(s,t,"ngFalseValue",n.ngFalseValue,!1),c=function(t){i.$setViewValue(e[0].checked,t&&t.type)};e.on("click",c),i.$render=function(){e[0].checked=i.$viewValue},i.$isEmpty=function(t){return t===!1},i.$formatters.push(function(t){return W(t,l)}),i.$parsers.push(function(t){return t?l:u})}function Vi(t,e){return t="ngClass"+t,["$animate",function(n){function i(t,e){var n=[];t:for(var i=0;i<t.length;i++){for(var r=t[i],o=0;o<e.length;o++)if(r==e[o])continue t;n.push(r)}return n}function r(t){if(hr(t))return t;if(x(t))return t.split(" ");if(b(t)){var e=[];return o(t,function(t,n){t&&(e=e.concat(n.split(" ")))}),e}return t}return{restrict:"AC",link:function(a,s,l){function u(t){var e=d(t,1);l.$addClass(e)}function c(t){var e=d(t,-1);l.$removeClass(e)}function d(t,e){var n=s.data("$classCounts")||{},i=[];return o(t,function(t){(e>0||n[t])&&(n[t]=(n[t]||0)+e,n[t]===+(e>0)&&i.push(t))}),s.data("$classCounts",n),i.join(" ")}function h(t,e){var r=i(e,t),o=i(t,e);r=d(r,1),o=d(o,-1),r&&r.length&&n.addClass(s,r),o&&o.length&&n.removeClass(s,o)}function f(t){if(e===!0||a.$index%2===e){var n=r(t||[]);if(p){if(!W(t,p)){var i=r(p);h(i,n)}}else u(n)}p=F(t)}var p;a.$watch(l[t],f,!0),l.$observe("class",function(){f(a.$eval(l[t]))}),"ngClass"!==t&&a.$watch("$index",function(n,i){var o=1&n;if(o!==(1&i)){var s=r(a.$eval(l[t]));o===e?u(s):c(s)}})}}}]}function Bi(t){function e(t,e,l){e===n?i("$pending",t,l):r("$pending",t,l),A(e)?e?(d(s.$error,t,l),c(s.$$success,t,l)):(c(s.$error,t,l),d(s.$$success,t,l)):(d(s.$error,t,l),d(s.$$success,t,l)),s.$pending?(o(xa,!0),s.$valid=s.$invalid=n,a("",null)):(o(xa,!1),s.$valid=Ui(s.$error),s.$invalid=!s.$valid,a("",s.$valid));var u;u=s.$pending&&s.$pending[t]?n:s.$error[t]?!1:s.$$success[t]?!0:null,a(t,u),h.$setValidity(t,u,s)}function i(t,e,n){s[t]||(s[t]={}),c(s[t],e,n)}function r(t,e,i){s[t]&&d(s[t],e,i),Ui(s[t])&&(s[t]=n)}function o(t,e){e&&!u[t]?(f.addClass(l,t),u[t]=!0):!e&&u[t]&&(f.removeClass(l,t),u[t]=!1)}function a(t,e){t=t?"-"+ne(t,"-"):"",o(pa+t,e===!0),o(ga+t,e===!1)}var s=t.ctrl,l=t.$element,u={},c=t.set,d=t.unset,h=t.parentForm,f=t.$animate;u[ga]=!(u[pa]=l.hasClass(pa)),s.$setValidity=e}function Ui(t){if(t)for(var e in t)return!1;return!0}var Yi=/^\/(.+)\/([a-z]*)$/,Gi="validity",Xi=function(t){return x(t)?t.toLowerCase():t},Ki=Object.prototype.hasOwnProperty,Zi=function(t){return x(t)?t.toUpperCase():t},Qi=function(t){return x(t)?t.replace(/[A-Z]/g,function(t){return String.fromCharCode(32|t.charCodeAt(0))}):t},Ji=function(t){return x(t)?t.replace(/[a-z]/g,function(t){return String.fromCharCode(-33&t.charCodeAt(0))}):t};"i"!=="I".toLowerCase()&&(Xi=Qi,Zi=Ji);var tr,er,nr,ir,rr=[].slice,or=[].splice,ar=[].push,sr=Object.prototype.toString,lr=i("ng"),ur=t.angular||(t.angular={}),cr=0;tr=e.documentMode,p.$inject=[],g.$inject=[];var dr,hr=Array.isArray,fr=function(t){return x(t)?t.trim():t},pr=function(t){return t.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},gr=function(){if(y(gr.isActive_))return gr.isActive_;var t=!(!e.querySelector("[ng-csp]")&&!e.querySelector("[data-ng-csp]"));if(!t)try{new Function("")}catch(n){t=!0}return gr.isActive_=t},mr=["ng-","data-ng-","ng:","x-ng-"],vr=/[A-Z]/g,yr=!1,br=1,xr=2,wr=3,$r=8,kr=9,_r=11,Cr={full:"1.3.17",major:1,minor:3,dot:17,codeName:"tsktskskly-euouae"};xe.expando="ng339";var Mr=xe.cache={},Dr=1,Sr=function(t,e,n){t.addEventListener(e,n,!1)},Tr=function(t,e,n){t.removeEventListener(e,n,!1)};xe._data=function(t){return this.cache[t[this.expando]]||{}};var Ar=/([\:\-\_]+(.))/g,Er=/^moz([A-Z])/,Or={mouseleave:"mouseout",mouseenter:"mouseover"},Nr=i("jqLite"),Ir=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,Pr=/<|&#?\w+;/,Hr=/<([\w:]+)/,Fr=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Wr={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Wr.optgroup=Wr.option,Wr.tbody=Wr.tfoot=Wr.colgroup=Wr.caption=Wr.thead,Wr.th=Wr.td;var Lr=xe.prototype={ready:function(n){function i(){r||(r=!0,n())}var r=!1;"complete"===e.readyState?setTimeout(i):(this.on("DOMContentLoaded",i),xe(t).on("load",i))},toString:function(){var t=[];return o(this,function(e){t.push(""+e)}),"["+t.join(", ")+"]"},eq:function(t){return er(t>=0?this[t]:this[this.length+t])},length:0,push:ar,sort:[].sort,splice:[].splice},zr={};o("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(t){zr[Xi(t)]=t});var Rr={};o("input,select,option,textarea,button,form,details".split(","),function(t){Rr[t]=!0});var jr={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};o({data:Me,removeData:_e},function(t,e){xe[e]=t}),o({data:Me,inheritedData:Oe,scope:function(t){return er.data(t,"$scope")||Oe(t.parentNode||t,["$isolateScope","$scope"])},isolateScope:function(t){return er.data(t,"$isolateScope")||er.data(t,"$isolateScopeNoTemplate")},controller:Ee,injector:function(t){return Oe(t,"$injector")},removeAttr:function(t,e){t.removeAttribute(e)},hasClass:De,css:function(t,e,n){return e=ge(e),y(n)?void(t.style[e]=n):t.style[e]},attr:function(t,e,i){var r=t.nodeType;if(r!==wr&&r!==xr&&r!==$r){var o=Xi(e);if(zr[o]){if(!y(i))return t[e]||(t.attributes.getNamedItem(e)||p).specified?o:n;i?(t[e]=!0,t.setAttribute(e,o)):(t[e]=!1,t.removeAttribute(o))}else if(y(i))t.setAttribute(e,i);else if(t.getAttribute){var a=t.getAttribute(e,2);return null===a?n:a}}},prop:function(t,e,n){return y(n)?void(t[e]=n):t[e]},text:function(){function t(t,e){if(v(e)){var n=t.nodeType;return n===br||n===wr?t.textContent:""}t.textContent=e}return t.$dv="",t}(),val:function(t,e){if(v(e)){if(t.multiple&&"select"===I(t)){var n=[];return o(t.options,function(t){t.selected&&n.push(t.value||t.text)}),0===n.length?null:n}return t.value}t.value=e},html:function(t,e){return v(e)?t.innerHTML:($e(t,!0),void(t.innerHTML=e))},empty:Ne},function(t,e){xe.prototype[e]=function(e,i){var r,o,a=this.length;if(t!==Ne&&(2==t.length&&t!==De&&t!==Ee?e:i)===n){if(b(e)){for(r=0;a>r;r++)if(t===Me)t(this[r],e);else for(o in e)t(this[r],o,e[o]);return this}for(var s=t.$dv,l=s===n?Math.min(a,1):a,u=0;l>u;u++){var c=t(this[u],e,i);s=s?s+c:c}return s}for(r=0;a>r;r++)t(this[r],e,i);return this}}),o({removeData:_e,on:function Ga(t,e,n,i){if(y(i))throw Nr("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(ve(t)){var r=Ce(t,!0),o=r.events,a=r.handle;a||(a=r.handle=We(t,o));for(var s=e.indexOf(" ")>=0?e.split(" "):[e],l=s.length;l--;){e=s[l];var u=o[e];u||(o[e]=[],"mouseenter"===e||"mouseleave"===e?Ga(t,Or[e],function(t){var n=this,i=t.relatedTarget;(!i||i!==n&&!n.contains(i))&&a(t,e)}):"$destroy"!==e&&Sr(t,e,a),u=o[e]),u.push(n)}}},off:ke,one:function(t,e,n){t=er(t),t.on(e,function i(){t.off(e,n),t.off(e,i)}),t.on(e,n)},replaceWith:function(t,e){var n,i=t.parentNode;$e(t),o(new xe(e),function(e){n?i.insertBefore(e,n.nextSibling):i.replaceChild(e,t),n=e})},children:function(t){var e=[];return o(t.childNodes,function(t){t.nodeType===br&&e.push(t)}),e},contents:function(t){return t.contentDocument||t.childNodes||[]},append:function(t,e){var n=t.nodeType;if(n===br||n===_r){e=new xe(e);for(var i=0,r=e.length;r>i;i++){var o=e[i];t.appendChild(o)}}},prepend:function(t,e){if(t.nodeType===br){var n=t.firstChild;o(new xe(e),function(e){t.insertBefore(e,n)})}},wrap:function(t,e){e=er(e).eq(0).clone()[0];var n=t.parentNode;n&&n.replaceChild(e,t),e.appendChild(t)},remove:Ie,detach:function(t){Ie(t,!0)},after:function(t,e){var n=t,i=t.parentNode;e=new xe(e);for(var r=0,o=e.length;o>r;r++){var a=e[r];i.insertBefore(a,n.nextSibling),n=a}},addClass:Te,removeClass:Se,toggleClass:function(t,e,n){e&&o(e.split(" "),function(e){var i=n;v(i)&&(i=!De(t,e)),(i?Te:Se)(t,e)})},parent:function(t){var e=t.parentNode;return e&&e.nodeType!==_r?e:null},next:function(t){return t.nextElementSibling},find:function(t,e){return t.getElementsByTagName?t.getElementsByTagName(e):[]},clone:we,triggerHandler:function(t,e,n){var i,r,a,s=e.type||e,l=Ce(t),u=l&&l.events,c=u&&u[s];c&&(i={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented===!0},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return this.immediatePropagationStopped===!0},stopPropagation:p,type:s,target:t},e.type&&(i=d(i,e)),r=F(c),a=n?[i].concat(n):[i],o(r,function(e){i.isImmediatePropagationStopped()||e.apply(t,a)}))}},function(t,e){xe.prototype[e]=function(e,n,i){for(var r,o=0,a=this.length;a>o;o++)v(r)?(r=t(this[o],e,n,i),y(r)&&(r=er(r))):Ae(r,t(this[o],e,n,i));return y(r)?r:this},xe.prototype.bind=xe.prototype.on,xe.prototype.unbind=xe.prototype.off}),Re.prototype={put:function(t,e){this[ze(t,this.nextUid)]=e},get:function(t){return this[ze(t,this.nextUid)]},remove:function(t){var e=this[t=ze(t,this.nextUid)];return delete this[t],e}};var qr=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,Vr=/,/,Br=/^\s*(_?)(\S+?)\1\s*$/,Ur=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Yr=i("$injector");Ve.$$annotate=qe;var Gr=i("$animate"),Xr=["$provide",function(t){this.$$selectors={},this.register=function(e,n){var i=e+"-animation";if(e&&"."!=e.charAt(0))throw Gr("notcsel","Expecting class selector starting with '.' got '{0}'.",e);this.$$selectors[e.substr(1)]=i,t.factory(i,n)},this.classNameFilter=function(t){return 1===arguments.length&&(this.$$classNameFilter=t instanceof RegExp?t:null),this.$$classNameFilter},this.$get=["$$q","$$asyncCallback","$rootScope",function(t,e,n){function i(e){var i,r=t.defer();return r.promise.$$cancelFn=function(){i&&i()},n.$$postDigest(function(){i=e(function(){r.resolve()})}),r.promise}function r(t,e){var n=[],i=[],r=ue();return o((t.attr("class")||"").split(/\s+/),function(t){r[t]=!0}),o(e,function(t,e){var o=r[e];t===!1&&o?i.push(e):t!==!0||o||n.push(e)}),n.length+i.length>0&&[n.length?n:null,i.length?i:null]}function a(t,e,n){for(var i=0,r=e.length;r>i;++i){var o=e[i];t[o]=n}}function s(){return u||(u=t.defer(),e(function(){u.resolve(),u=null})),u.promise}function l(t,e){if(ur.isObject(e)){var n=d(e.from||{},e.to||{});t.css(n)}}var u;return{animate:function(t,e,n){return l(t,{from:e,to:n}),s()},enter:function(t,e,n,i){return l(t,i),n?n.after(t):e.prepend(t),s()},leave:function(t,e){return l(t,e),t.remove(),s()},move:function(t,e,n,i){return this.enter(t,e,n,i)},addClass:function(t,e,n){return this.setClass(t,e,[],n)},$$addClassImmediately:function(t,e,n){return t=er(t),e=x(e)?e:hr(e)?e.join(" "):"",o(t,function(t){Te(t,e)}),l(t,n),s()},removeClass:function(t,e,n){return this.setClass(t,[],e,n)},$$removeClassImmediately:function(t,e,n){return t=er(t),e=x(e)?e:hr(e)?e.join(" "):"",o(t,function(t){Se(t,e)
}),l(t,n),s()},setClass:function(t,e,n,o){var s=this,l="$$animateClasses",u=!1;t=er(t);var c=t.data(l);c?o&&c.options&&(c.options=ur.extend(c.options||{},o)):(c={classes:{},options:o},u=!0);var d=c.classes;return e=hr(e)?e:e.split(" "),n=hr(n)?n:n.split(" "),a(d,e,!0),a(d,n,!1),u&&(c.promise=i(function(e){var n=t.data(l);if(t.removeData(l),n){var i=r(t,n.classes);i&&s.$$setClassImmediately(t,i[0],i[1],n.options)}e()}),t.data(l,c)),c.promise},$$setClassImmediately:function(t,e,n,i){return e&&this.$$addClassImmediately(t,e),n&&this.$$removeClassImmediately(t,n),l(t,i),s()},enabled:p,cancel:p}}]}],Kr=i("$compile");Ze.$inject=["$provide","$$sanitizeUriProvider"];var Zr=/^((?:x|data)[\:\-_])/i,Qr=i("$controller"),Jr="application/json",to={"Content-Type":Jr+";charset=utf-8"},eo=/^\[|^\{(?!\{)/,no={"[":/]$/,"{":/}$/},io=/^\)\]\}',?\n/,ro=i("$interpolate"),oo=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,ao={http:80,https:443,ftp:21},so=i("$location"),lo={$$html5:!1,$$replace:!1,absUrl:Tn("$$absUrl"),url:function(t){if(v(t))return this.$$url;var e=oo.exec(t);return(e[1]||""===t)&&this.path(decodeURIComponent(e[1])),(e[2]||e[1]||""===t)&&this.search(e[3]||""),this.hash(e[5]||""),this},protocol:Tn("$$protocol"),host:Tn("$$host"),port:Tn("$$port"),path:An("$$path",function(t){return t=null!==t?t.toString():"","/"==t.charAt(0)?t:"/"+t}),search:function(t,e){switch(arguments.length){case 0:return this.$$search;case 1:if(x(t)||w(t))t=t.toString(),this.$$search=Y(t);else{if(!b(t))throw so("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");t=H(t,{}),o(t,function(e,n){null==e&&delete t[n]}),this.$$search=t}break;default:v(e)||null===e?delete this.$$search[t]:this.$$search[t]=e}return this.$$compose(),this},hash:An("$$hash",function(t){return null!==t?t.toString():""}),replace:function(){return this.$$replace=!0,this}};o([Sn,Dn,Mn],function(t){t.prototype=Object.create(lo),t.prototype.state=function(e){if(!arguments.length)return this.$$state;if(t!==Mn||!this.$$html5)throw so("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=v(e)?null:e,this}});var uo=i("$parse"),co=Function.prototype.call,ho=Function.prototype.apply,fo=Function.prototype.bind,po=ue();o({"null":function(){return null},"true":function(){return!0},"false":function(){return!1},undefined:function(){}},function(t,e){t.constant=t.literal=t.sharedGetter=!0,po[e]=t}),po["this"]=function(t){return t},po["this"].sharedGetter=!0;var go=d(ue(),{"+":function(t,e,i,r){return i=i(t,e),r=r(t,e),y(i)?y(r)?i+r:i:y(r)?r:n},"-":function(t,e,n,i){return n=n(t,e),i=i(t,e),(y(n)?n:0)-(y(i)?i:0)},"*":function(t,e,n,i){return n(t,e)*i(t,e)},"/":function(t,e,n,i){return n(t,e)/i(t,e)},"%":function(t,e,n,i){return n(t,e)%i(t,e)},"===":function(t,e,n,i){return n(t,e)===i(t,e)},"!==":function(t,e,n,i){return n(t,e)!==i(t,e)},"==":function(t,e,n,i){return n(t,e)==i(t,e)},"!=":function(t,e,n,i){return n(t,e)!=i(t,e)},"<":function(t,e,n,i){return n(t,e)<i(t,e)},">":function(t,e,n,i){return n(t,e)>i(t,e)},"<=":function(t,e,n,i){return n(t,e)<=i(t,e)},">=":function(t,e,n,i){return n(t,e)>=i(t,e)},"&&":function(t,e,n,i){return n(t,e)&&i(t,e)},"||":function(t,e,n,i){return n(t,e)||i(t,e)},"!":function(t,e,n){return!n(t,e)},"=":!0,"|":!0}),mo={n:"\n",f:"\f",r:"\r",t:"	",v:"","'":"'",'"':'"'},vo=function(t){this.options=t};vo.prototype={constructor:vo,lex:function(t){for(this.text=t,this.index=0,this.tokens=[];this.index<this.text.length;){var e=this.text.charAt(this.index);if('"'===e||"'"===e)this.readString(e);else if(this.isNumber(e)||"."===e&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(e))this.readIdent();else if(this.is(e,"(){}[].,;:?"))this.tokens.push({index:this.index,text:e}),this.index++;else if(this.isWhitespace(e))this.index++;else{var n=e+this.peek(),i=n+this.peek(2),r=go[e],o=go[n],a=go[i];if(r||o||a){var s=a?i:o?n:e;this.tokens.push({index:this.index,text:s,operator:!0}),this.index+=s.length}else this.throwError("Unexpected next character ",this.index,this.index+1)}}return this.tokens},is:function(t,e){return-1!==e.indexOf(t)},peek:function(t){var e=t||1;return this.index+e<this.text.length?this.text.charAt(this.index+e):!1},isNumber:function(t){return t>="0"&&"9">=t&&"string"==typeof t},isWhitespace:function(t){return" "===t||"\r"===t||"	"===t||"\n"===t||""===t||" "===t},isIdent:function(t){return t>="a"&&"z">=t||t>="A"&&"Z">=t||"_"===t||"$"===t},isExpOperator:function(t){return"-"===t||"+"===t||this.isNumber(t)},throwError:function(t,e,n){n=n||this.index;var i=y(e)?"s "+e+"-"+this.index+" ["+this.text.substring(e,n)+"]":" "+n;throw uo("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",t,i,this.text)},readNumber:function(){for(var t="",e=this.index;this.index<this.text.length;){var n=Xi(this.text.charAt(this.index));if("."==n||this.isNumber(n))t+=n;else{var i=this.peek();if("e"==n&&this.isExpOperator(i))t+=n;else if(this.isExpOperator(n)&&i&&this.isNumber(i)&&"e"==t.charAt(t.length-1))t+=n;else{if(!this.isExpOperator(n)||i&&this.isNumber(i)||"e"!=t.charAt(t.length-1))break;this.throwError("Invalid exponent")}}this.index++}this.tokens.push({index:e,text:t,constant:!0,value:Number(t)})},readIdent:function(){for(var t=this.index;this.index<this.text.length;){var e=this.text.charAt(this.index);if(!this.isIdent(e)&&!this.isNumber(e))break;this.index++}this.tokens.push({index:t,text:this.text.slice(t,this.index),identifier:!0})},readString:function(t){var e=this.index;this.index++;for(var n="",i=t,r=!1;this.index<this.text.length;){var o=this.text.charAt(this.index);if(i+=o,r){if("u"===o){var a=this.text.substring(this.index+1,this.index+5);a.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+a+"]"),this.index+=4,n+=String.fromCharCode(parseInt(a,16))}else{var s=mo[o];n+=s||o}r=!1}else if("\\"===o)r=!0;else{if(o===t)return this.index++,void this.tokens.push({index:e,text:i,constant:!0,value:n});n+=o}this.index++}this.throwError("Unterminated quote",e)}};var yo=function(t,e,n){this.lexer=t,this.$filter=e,this.options=n};yo.ZERO=d(function(){return 0},{sharedGetter:!0,constant:!0}),yo.prototype={constructor:yo,parse:function(t){this.text=t,this.tokens=this.lexer.lex(t);var e=this.statements();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),e.literal=!!e.literal,e.constant=!!e.constant,e},primary:function(){var t;this.expect("(")?(t=this.filterChain(),this.consume(")")):this.expect("[")?t=this.arrayDeclaration():this.expect("{")?t=this.object():this.peek().identifier&&this.peek().text in po?t=po[this.consume().text]:this.peek().identifier?t=this.identifier():this.peek().constant?t=this.constant():this.throwError("not a primary expression",this.peek());for(var e,n;e=this.expect("(","[",".");)"("===e.text?(t=this.functionCall(t,n),n=null):"["===e.text?(n=t,t=this.objectIndex(t)):"."===e.text?(n=t,t=this.fieldAccess(t)):this.throwError("IMPOSSIBLE");return t},throwError:function(t,e){throw uo("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",e.text,t,e.index+1,this.text,this.text.substring(e.index))},peekToken:function(){if(0===this.tokens.length)throw uo("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(t,e,n,i){return this.peekAhead(0,t,e,n,i)},peekAhead:function(t,e,n,i,r){if(this.tokens.length>t){var o=this.tokens[t],a=o.text;if(a===e||a===n||a===i||a===r||!e&&!n&&!i&&!r)return o}return!1},expect:function(t,e,n,i){var r=this.peek(t,e,n,i);return r?(this.tokens.shift(),r):!1},consume:function(t){if(0===this.tokens.length)throw uo("ueoe","Unexpected end of expression: {0}",this.text);var e=this.expect(t);return e||this.throwError("is unexpected, expecting ["+t+"]",this.peek()),e},unaryFn:function(t,e){var n=go[t];return d(function(t,i){return n(t,i,e)},{constant:e.constant,inputs:[e]})},binaryFn:function(t,e,n,i){var r=go[e];return d(function(e,i){return r(e,i,t,n)},{constant:t.constant&&n.constant,inputs:!i&&[t,n]})},identifier:function(){for(var t=this.consume().text;this.peek(".")&&this.peekAhead(1).identifier&&!this.peekAhead(2,"(");)t+=this.consume().text+this.consume().text;return Rn(t,this.options,this.text)},constant:function(){var t=this.consume().value;return d(function(){return t},{constant:!0,literal:!0})},statements:function(){for(var t=[];;)if(this.tokens.length>0&&!this.peek("}",")",";","]")&&t.push(this.filterChain()),!this.expect(";"))return 1===t.length?t[0]:function(e,n){for(var i,r=0,o=t.length;o>r;r++)i=t[r](e,n);return i}},filterChain:function(){for(var t,e=this.expression();t=this.expect("|");)e=this.filter(e);return e},filter:function(t){var e,i,r=this.$filter(this.consume().text);if(this.peek(":"))for(e=[],i=[];this.expect(":");)e.push(this.expression());var o=[t].concat(e||[]);return d(function(o,a){var s=t(o,a);if(i){i[0]=s;for(var l=e.length;l--;)i[l+1]=e[l](o,a);return r.apply(n,i)}return r(s)},{constant:!r.$stateful&&o.every(Hn),inputs:!r.$stateful&&o})},expression:function(){return this.assignment()},assignment:function(){var t,e,n=this.ternary();return(e=this.expect("="))?(n.assign||this.throwError("implies assignment but ["+this.text.substring(0,e.index)+"] can not be assigned to",e),t=this.ternary(),d(function(e,i){return n.assign(e,t(e,i),i)},{inputs:[n,t]})):n},ternary:function(){var t,e,n=this.logicalOR();if((e=this.expect("?"))&&(t=this.assignment(),this.consume(":"))){var i=this.assignment();return d(function(e,r){return n(e,r)?t(e,r):i(e,r)},{constant:n.constant&&t.constant&&i.constant})}return n},logicalOR:function(){for(var t,e=this.logicalAND();t=this.expect("||");)e=this.binaryFn(e,t.text,this.logicalAND(),!0);return e},logicalAND:function(){for(var t,e=this.equality();t=this.expect("&&");)e=this.binaryFn(e,t.text,this.equality(),!0);return e},equality:function(){for(var t,e=this.relational();t=this.expect("==","!=","===","!==");)e=this.binaryFn(e,t.text,this.relational());return e},relational:function(){for(var t,e=this.additive();t=this.expect("<",">","<=",">=");)e=this.binaryFn(e,t.text,this.additive());return e},additive:function(){for(var t,e=this.multiplicative();t=this.expect("+","-");)e=this.binaryFn(e,t.text,this.multiplicative());return e},multiplicative:function(){for(var t,e=this.unary();t=this.expect("*","/","%");)e=this.binaryFn(e,t.text,this.unary());return e},unary:function(){var t;return this.expect("+")?this.primary():(t=this.expect("-"))?this.binaryFn(yo.ZERO,t.text,this.unary()):(t=this.expect("!"))?this.unaryFn(t.text,this.unary()):this.primary()},fieldAccess:function(t){var e=this.identifier();return d(function(i,r,o){var a=o||t(i,r);return null==a?n:e(a)},{assign:function(n,i,r){var o=t(n,r);return o||t.assign(n,o={},r),e.assign(o,i)}})},objectIndex:function(t){var e=this.text,i=this.expression();return this.consume("]"),d(function(r,o){var a,s=t(r,o),l=i(r,o);return Nn(l,e),s?a=In(s[l],e):n},{assign:function(n,r,o){var a=Nn(i(n,o),e),s=In(t(n,o),e);return s||t.assign(n,s={},o),s[a]=r}})},functionCall:function(t,e){var i=[];if(")"!==this.peekToken().text)do i.push(this.expression());while(this.expect(","));this.consume(")");var r=this.text,o=i.length?[]:null;return function(a,s){var l=e?e(a,s):y(e)?n:a,u=t(a,s,l)||p;if(o)for(var c=i.length;c--;)o[c]=In(i[c](a,s),r);In(l,r),Pn(u,r);var d=u.apply?u.apply(l,o):u(o[0],o[1],o[2],o[3],o[4]);return o&&(o.length=0),In(d,r)}},arrayDeclaration:function(){var t=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;t.push(this.expression())}while(this.expect(","));return this.consume("]"),d(function(e,n){for(var i=[],r=0,o=t.length;o>r;r++)i.push(t[r](e,n));return i},{literal:!0,constant:t.every(Hn),inputs:t})},object:function(){var t=[],e=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;var n=this.consume();n.constant?t.push(n.value):n.identifier?t.push(n.text):this.throwError("invalid key",n),this.consume(":"),e.push(this.expression())}while(this.expect(","));return this.consume("}"),d(function(n,i){for(var r={},o=0,a=e.length;a>o;o++)r[t[o]]=e[o](n,i);return r},{literal:!0,constant:e.every(Hn),inputs:e})}};var bo=ue(),xo=ue(),wo=Object.prototype.valueOf,$o=i("$sce"),ko={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Kr=i("$compile"),_o=e.createElement("a"),Co=ri(t.location.href);si.$inject=["$provide"],di.$inject=["$locale"],hi.$inject=["$locale"];var Mo=".",Do={yyyy:gi("FullYear",4),yy:gi("FullYear",2,0,!0),y:gi("FullYear",1),MMMM:mi("Month"),MMM:mi("Month",!0),MM:gi("Month",2,1),M:gi("Month",1,1),dd:gi("Date",2),d:gi("Date",1),HH:gi("Hours",2),H:gi("Hours",1),hh:gi("Hours",2,-12),h:gi("Hours",1,-12),mm:gi("Minutes",2),m:gi("Minutes",1),ss:gi("Seconds",2),s:gi("Seconds",1),sss:gi("Milliseconds",3),EEEE:mi("Day"),EEE:mi("Day",!0),a:wi,Z:vi,ww:xi(2),w:xi(1),G:$i,GG:$i,GGG:$i,GGGG:ki},So=/((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,To=/^\-?\d+$/;_i.$inject=["$locale"];var Ao=m(Xi),Eo=m(Zi);Di.$inject=["$parse"];var Oo=m({restrict:"E",compile:function(t,e){return e.href||e.xlinkHref||e.name?void 0:function(t,e){if("a"===e[0].nodeName.toLowerCase()){var n="[object SVGAnimatedString]"===sr.call(e.prop("href"))?"xlink:href":"href";e.on("click",function(t){e.attr(n)||t.preventDefault()})}}}}),No={};o(zr,function(t,e){if("multiple"!=t){var n=Qe("ng-"+e);No[n]=function(){return{restrict:"A",priority:100,link:function(t,i,r){t.$watch(r[n],function(t){r.$set(e,!!t)})}}}}}),o(jr,function(t,e){No[e]=function(){return{priority:100,link:function(t,n,i){if("ngPattern"===e&&"/"==i.ngPattern.charAt(0)){var r=i.ngPattern.match(Yi);if(r)return void i.$set("ngPattern",new RegExp(r[1],r[2]))}t.$watch(i[e],function(t){i.$set(e,t)})}}}}),o(["src","srcset","href"],function(t){var e=Qe("ng-"+t);No[e]=function(){return{priority:99,link:function(n,i,r){var o=t,a=t;"href"===t&&"[object SVGAnimatedString]"===sr.call(i.prop("href"))&&(a="xlinkHref",r.$attr[a]="xlink:href",o=null),r.$observe(e,function(e){return e?(r.$set(a,e),void(tr&&o&&i.prop(o,r[a]))):void("href"===t&&r.$set(a,null))})}}}});var Io={$addControl:p,$$renameControl:Ti,$removeControl:p,$setValidity:p,$setDirty:p,$setPristine:p,$setSubmitted:p},Po="ng-submitted";Ai.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Ho=function(t){return["$timeout",function(e){var i={name:"form",restrict:t?"EAC":"E",controller:Ai,compile:function(i,r){i.addClass(ma).addClass(pa);var o=r.name?"name":t&&r.ngForm?"ngForm":!1;return{pre:function(t,i,r,a){if(!("action"in r)){var s=function(e){t.$apply(function(){a.$commitViewValue(),a.$setSubmitted()}),e.preventDefault()};Sr(i[0],"submit",s),i.on("$destroy",function(){e(function(){Tr(i[0],"submit",s)},0,!1)})}var l=a.$$parentForm;o&&(Fn(t,null,a.$name,a,a.$name),r.$observe(o,function(e){a.$name!==e&&(Fn(t,null,a.$name,n,a.$name),l.$$renameControl(a,e),Fn(t,null,a.$name,a,a.$name))})),i.on("$destroy",function(){l.$removeControl(a),o&&Fn(t,null,r[o],n,a.$name),d(a,Io)})}}}};return i}]},Fo=Ho(),Wo=Ho(!0),Lo=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,zo=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,Ro=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,jo=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,qo=/^(\d{4})-(\d{2})-(\d{2})$/,Vo=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Bo=/^(\d{4})-W(\d\d)$/,Uo=/^(\d{4})-(\d\d)$/,Yo=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Go={text:Oi,date:Hi("date",qo,Pi(qo,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":Hi("datetimelocal",Vo,Pi(Vo,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:Hi("time",Yo,Pi(Yo,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:Hi("week",Bo,Ii,"yyyy-Www"),month:Hi("month",Uo,Pi(Uo,["yyyy","MM"]),"yyyy-MM"),number:Wi,url:Li,email:zi,radio:Ri,checkbox:qi,hidden:p,button:p,submit:p,reset:p,file:p},Xo=["$browser","$sniffer","$filter","$parse",function(t,e,n,i){return{restrict:"E",require:["?ngModel"],link:{pre:function(r,o,a,s){s[0]&&(Go[Xi(a.type)]||Go.text)(r,o,a,s[0],e,t,n,i)}}}}],Ko=/^(true|false|\d+)$/,Zo=function(){return{restrict:"A",priority:100,compile:function(t,e){return Ko.test(e.ngValue)?function(t,e,n){n.$set("value",t.$eval(n.ngValue))}:function(t,e,n){t.$watch(n.ngValue,function(t){n.$set("value",t)})}}}},Qo=["$compile",function(t){return{restrict:"AC",compile:function(e){return t.$$addBindingClass(e),function(e,i,r){t.$$addBindingInfo(i,r.ngBind),i=i[0],e.$watch(r.ngBind,function(t){i.textContent=t===n?"":t})}}}}],Jo=["$interpolate","$compile",function(t,e){return{compile:function(i){return e.$$addBindingClass(i),function(i,r,o){var a=t(r.attr(o.$attr.ngBindTemplate));e.$$addBindingInfo(r,a.expressions),r=r[0],o.$observe("ngBindTemplate",function(t){r.textContent=t===n?"":t})}}}}],ta=["$sce","$parse","$compile",function(t,e,n){return{restrict:"A",compile:function(i,r){var o=e(r.ngBindHtml),a=e(r.ngBindHtml,function(t){return(t||"").toString()});return n.$$addBindingClass(i),function(e,i,r){n.$$addBindingInfo(i,r.ngBindHtml),e.$watch(a,function(){i.html(t.getTrustedHtml(o(e))||"")})}}}}],ea=m({restrict:"A",require:"ngModel",link:function(t,e,n,i){i.$viewChangeListeners.push(function(){t.$eval(n.ngChange)})}}),na=Vi("",!0),ia=Vi("Odd",0),ra=Vi("Even",1),oa=Si({compile:function(t,e){e.$set("ngCloak",n),t.removeClass("ng-cloak")}}),aa=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],sa={},la={blur:!0,focus:!0};o("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(t){var e=Qe("ng-"+t);sa[e]=["$parse","$rootScope",function(n,i){return{restrict:"A",compile:function(r,o){var a=n(o[e],null,!0);return function(e,n){n.on(t,function(n){var r=function(){a(e,{$event:n})};la[t]&&i.$$phase?e.$evalAsync(r):e.$apply(r)})}}}}]});var ua=["$animate",function(t){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(n,i,r,o,a){var s,l,u;n.$watch(r.ngIf,function(n){n?l||a(function(n,o){l=o,n[n.length++]=e.createComment(" end ngIf: "+r.ngIf+" "),s={clone:n},t.enter(n,i.parent(),i)}):(u&&(u.remove(),u=null),l&&(l.$destroy(),l=null),s&&(u=le(s.clone),t.leave(u).then(function(){u=null}),s=null))})}}}],ca=["$templateRequest","$anchorScroll","$animate",function(t,e,n){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:ur.noop,compile:function(i,r){var o=r.ngInclude||r.src,a=r.onload||"",s=r.autoscroll;return function(i,r,l,u,c){var d,h,f,p=0,g=function(){h&&(h.remove(),h=null),d&&(d.$destroy(),d=null),f&&(n.leave(f).then(function(){h=null}),h=f,f=null)};i.$watch(o,function(o){var l=function(){!y(s)||s&&!i.$eval(s)||e()},h=++p;o?(t(o,!0).then(function(t){if(h===p){var e=i.$new();u.template=t;var s=c(e,function(t){g(),n.enter(t,null,r).then(l)});d=e,f=s,d.$emit("$includeContentLoaded",o),i.$eval(a)}},function(){h===p&&(g(),i.$emit("$includeContentError",o))}),i.$emit("$includeContentRequested",o)):(g(),u.template=null)})}}}}],da=["$compile",function(t){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(n,i,r,o){return/SVG/.test(i[0].toString())?(i.empty(),void t(ye(o.template,e).childNodes)(n,function(t){i.append(t)},{futureParentElement:i})):(i.html(o.template),void t(i.contents())(n))}}}],ha=Si({priority:450,compile:function(){return{pre:function(t,e,n){t.$eval(n.ngInit)}}}}),fa=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(t,e,i,r){var a=e.attr(i.$attr.ngList)||", ",s="false"!==i.ngTrim,l=s?fr(a):a,u=function(t){if(!v(t)){var e=[];return t&&o(t.split(l),function(t){t&&e.push(s?fr(t):t)}),e}};r.$parsers.push(u),r.$formatters.push(function(t){return hr(t)?t.join(a):n}),r.$isEmpty=function(t){return!t||!t.length}}}},pa="ng-valid",ga="ng-invalid",ma="ng-pristine",va="ng-dirty",ya="ng-untouched",ba="ng-touched",xa="ng-pending",wa=new i("ngModel"),$a=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(t,e,i,r,a,s,l,u,c,d){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=n,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=n,this.$name=d(i.name||"",!1)(t);var h,f=a(i.ngModel),g=f.assign,m=f,b=g,x=null,$=this;this.$$setOptions=function(t){if($.$options=t,t&&t.getterSetter){var e=a(i.ngModel+"()"),n=a(i.ngModel+"($$$p)");m=function(t){var n=f(t);return k(n)&&(n=e(t)),n},b=function(t){k(f(t))?n(t,{$$$p:$.$modelValue}):g(t,$.$modelValue)}}else if(!f.assign)throw wa("nonassign","Expression '{0}' is non-assignable. Element: {1}",i.ngModel,B(r))},this.$render=p,this.$isEmpty=function(t){return v(t)||""===t||null===t||t!==t};var _=r.inheritedData("$formController")||Io,C=0;Bi({ctrl:this,$element:r,set:function(t,e){t[e]=!0},unset:function(t,e){delete t[e]},parentForm:_,$animate:s}),this.$setPristine=function(){$.$dirty=!1,$.$pristine=!0,s.removeClass(r,va),s.addClass(r,ma)},this.$setDirty=function(){$.$dirty=!0,$.$pristine=!1,s.removeClass(r,ma),s.addClass(r,va),_.$setDirty()},this.$setUntouched=function(){$.$touched=!1,$.$untouched=!0,s.setClass(r,ya,ba)},this.$setTouched=function(){$.$touched=!0,$.$untouched=!1,s.setClass(r,ba,ya)},this.$rollbackViewValue=function(){l.cancel(x),$.$viewValue=$.$$lastCommittedViewValue,$.$render()},this.$validate=function(){if(!w($.$modelValue)||!isNaN($.$modelValue)){var t=$.$$lastCommittedViewValue,e=$.$$rawModelValue,i=$.$valid,r=$.$modelValue,o=$.$options&&$.$options.allowInvalid;$.$$runValidators(e,t,function(t){o||i===t||($.$modelValue=t?e:n,$.$modelValue!==r&&$.$$writeModelToScope())})}},this.$$runValidators=function(t,e,i){function r(){var t=$.$$parserName||"parse";return h!==n?(h||(o($.$validators,function(t,e){l(e,null)}),o($.$asyncValidators,function(t,e){l(e,null)})),l(t,h),h):(l(t,null),!0)}function a(){var n=!0;return o($.$validators,function(i,r){var o=i(t,e);n=n&&o,l(r,o)}),n?!0:(o($.$asyncValidators,function(t,e){l(e,null)}),!1)}function s(){var i=[],r=!0;o($.$asyncValidators,function(o,a){var s=o(t,e);if(!E(s))throw wa("$asyncValidators","Expected asynchronous validator to return a promise but got '{0}' instead.",s);l(a,n),i.push(s.then(function(){l(a,!0)},function(){r=!1,l(a,!1)}))}),i.length?c.all(i).then(function(){u(r)},p):u(!0)}function l(t,e){d===C&&$.$setValidity(t,e)}function u(t){d===C&&i(t)}C++;var d=C;return r()&&a()?void s():void u(!1)},this.$commitViewValue=function(){var t=$.$viewValue;l.cancel(x),($.$$lastCommittedViewValue!==t||""===t&&$.$$hasNativeValidators)&&($.$$lastCommittedViewValue=t,$.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function e(){$.$modelValue!==a&&$.$$writeModelToScope()}var i=$.$$lastCommittedViewValue,r=i;if(h=v(r)?n:!0)for(var o=0;o<$.$parsers.length;o++)if(r=$.$parsers[o](r),v(r)){h=!1;break}w($.$modelValue)&&isNaN($.$modelValue)&&($.$modelValue=m(t));var a=$.$modelValue,s=$.$options&&$.$options.allowInvalid;$.$$rawModelValue=r,s&&($.$modelValue=r,e()),$.$$runValidators(r,$.$$lastCommittedViewValue,function(t){s||($.$modelValue=t?r:n,e())})},this.$$writeModelToScope=function(){b(t,$.$modelValue),o($.$viewChangeListeners,function(t){try{t()}catch(n){e(n)}})},this.$setViewValue=function(t,e){$.$viewValue=t,(!$.$options||$.$options.updateOnDefault)&&$.$$debounceViewValueCommit(e)},this.$$debounceViewValueCommit=function(e){var n,i=0,r=$.$options;r&&y(r.debounce)&&(n=r.debounce,w(n)?i=n:w(n[e])?i=n[e]:w(n["default"])&&(i=n["default"])),l.cancel(x),i?x=l(function(){$.$commitViewValue()},i):u.$$phase?$.$commitViewValue():t.$apply(function(){$.$commitViewValue()})},t.$watch(function(){var e=m(t);if(e!==$.$modelValue&&($.$modelValue===$.$modelValue||e===e)){$.$modelValue=$.$$rawModelValue=e,h=n;for(var i=$.$formatters,r=i.length,o=e;r--;)o=i[r](o);$.$viewValue!==o&&($.$viewValue=$.$$lastCommittedViewValue=o,$.$render(),$.$$runValidators(e,o,p))}return e})}],ka=["$rootScope",function(t){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:$a,priority:1,compile:function(e){return e.addClass(ma).addClass(ya).addClass(pa),{pre:function(t,e,n,i){var r=i[0],o=i[1]||Io;r.$$setOptions(i[2]&&i[2].$options),o.$addControl(r),n.$observe("name",function(t){r.$name!==t&&o.$$renameControl(r,t)}),t.$on("$destroy",function(){o.$removeControl(r)})},post:function(e,n,i,r){var o=r[0];o.$options&&o.$options.updateOn&&n.on(o.$options.updateOn,function(t){o.$$debounceViewValueCommit(t&&t.type)}),n.on("blur",function(){o.$touched||(t.$$phase?e.$evalAsync(o.$setTouched):e.$apply(o.$setTouched))})}}}}}],_a=/(\s+|^)default(\s+|$)/,Ca=function(){return{restrict:"A",controller:["$scope","$attrs",function(t,e){var i=this;this.$options=t.$eval(e.ngModelOptions),this.$options.updateOn!==n?(this.$options.updateOnDefault=!1,this.$options.updateOn=fr(this.$options.updateOn.replace(_a,function(){return i.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}},Ma=Si({terminal:!0,priority:1e3}),Da=["$locale","$interpolate",function(t,e){var n=/{}/g,i=/^when(Minus)?(.+)$/;return{restrict:"EA",link:function(r,a,s){function l(t){a.text(t||"")}var u,c=s.count,d=s.$attr.when&&a.attr(s.$attr.when),h=s.offset||0,f=r.$eval(d)||{},p={},g=e.startSymbol(),m=e.endSymbol(),v=g+c+"-"+h+m,y=ur.noop;o(s,function(t,e){var n=i.exec(e);if(n){var r=(n[1]?"-":"")+Xi(n[2]);f[r]=a.attr(s.$attr[e])}}),o(f,function(t,i){p[i]=e(t.replace(n,v))}),r.$watch(c,function(e){var n=parseFloat(e),i=isNaN(n);i||n in f||(n=t.pluralCat(n-h)),n===u||i&&isNaN(u)||(y(),y=r.$watch(p[n],l),u=n)})}}}],Sa=["$parse","$animate",function(t,a){var s="$$NG_REMOVED",l=i("ngRepeat"),u=function(t,e,n,i,r,o,a){t[n]=i,r&&(t[r]=o),t.$index=e,t.$first=0===e,t.$last=e===a-1,t.$middle=!(t.$first||t.$last),t.$odd=!(t.$even=0===(1&e))},c=function(t){return t.clone[0]},d=function(t){return t.clone[t.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(i,h){var f=h.ngRepeat,p=e.createComment(" end ngRepeat: "+f+" "),g=f.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!g)throw l("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",f);var m=g[1],v=g[2],y=g[3],b=g[4];if(g=m.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/),!g)throw l("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",m);var x=g[3]||g[1],w=g[2];if(y&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(y)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(y)))throw l("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",y);var $,k,_,C,M={$id:ze};return b?$=t(b):(_=function(t,e){return ze(e)},C=function(t){return t}),function(t,e,i,h,g){$&&(k=function(e,n,i){return w&&(M[w]=e),M[x]=n,M.$index=i,$(t,M)});var m=ue();t.$watchCollection(v,function(i){var h,v,b,$,M,D,S,T,A,E,O,N,I=e[0],P=ue();if(y&&(t[y]=i),r(i))A=i,T=k||_;else{T=k||C,A=[];for(var H in i)i.hasOwnProperty(H)&&"$"!=H.charAt(0)&&A.push(H);A.sort()}for($=A.length,O=new Array($),h=0;$>h;h++)if(M=i===A?h:A[h],D=i[M],S=T(M,D,h),m[S])E=m[S],delete m[S],P[S]=E,O[h]=E;else{if(P[S])throw o(O,function(t){t&&t.scope&&(m[t.id]=t)}),l("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",f,S,D);O[h]={id:S,scope:n,clone:n},P[S]=!0}for(var F in m){if(E=m[F],N=le(E.clone),a.leave(N),N[0].parentNode)for(h=0,v=N.length;v>h;h++)N[h][s]=!0;E.scope.$destroy()}for(h=0;$>h;h++)if(M=i===A?h:A[h],D=i[M],E=O[h],E.scope){b=I;do b=b.nextSibling;while(b&&b[s]);c(E)!=b&&a.move(le(E.clone),null,er(I)),I=d(E),u(E.scope,h,x,D,w,M,$)}else g(function(t,e){E.scope=e;var n=p.cloneNode(!1);t[t.length++]=n,a.enter(t,null,er(I)),I=n,E.clone=t,P[E.id]=E,u(E.scope,h,x,D,w,M,$)});m=P})}}}}],Ta="ng-hide",Aa="ng-hide-animate",Ea=["$animate",function(t){return{restrict:"A",multiElement:!0,link:function(e,n,i){e.$watch(i.ngShow,function(e){t[e?"removeClass":"addClass"](n,Ta,{tempClasses:Aa})})}}}],Oa=["$animate",function(t){return{restrict:"A",multiElement:!0,link:function(e,n,i){e.$watch(i.ngHide,function(e){t[e?"addClass":"removeClass"](n,Ta,{tempClasses:Aa})})}}}],Na=Si(function(t,e,n){t.$watch(n.ngStyle,function(t,n){n&&t!==n&&o(n,function(t,n){e.css(n,"")}),t&&e.css(t)},!0)}),Ia=["$animate",function(t){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(n,i,r,a){var s=r.ngSwitch||r.on,l=[],u=[],c=[],d=[],h=function(t,e){return function(){t.splice(e,1)}};n.$watch(s,function(n){var i,r;for(i=0,r=c.length;r>i;++i)t.cancel(c[i]);for(c.length=0,i=0,r=d.length;r>i;++i){var s=le(u[i].clone);d[i].$destroy();var f=c[i]=t.leave(s);f.then(h(c,i))}u.length=0,d.length=0,(l=a.cases["!"+n]||a.cases["?"])&&o(l,function(n){n.transclude(function(i,r){d.push(r);var o=n.element;i[i.length++]=e.createComment(" end ngSwitchWhen: ");var a={clone:i};u.push(a),t.enter(i,o.parent(),o)})})})}}}],Pa=Si({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(t,e,n,i,r){i.cases["!"+n.ngSwitchWhen]=i.cases["!"+n.ngSwitchWhen]||[],i.cases["!"+n.ngSwitchWhen].push({transclude:r,element:e})}}),Ha=Si({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(t,e,n,i,r){i.cases["?"]=i.cases["?"]||[],i.cases["?"].push({transclude:r,element:e})}}),Fa=Si({restrict:"EAC",link:function(t,e,n,r,o){if(!o)throw i("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",B(e));o(function(t){e.empty(),e.append(t)})}}),Wa=["$templateCache",function(t){return{restrict:"E",terminal:!0,compile:function(e,n){if("text/ng-template"==n.type){var i=n.id,r=e[0].text;t.put(i,r)}}}}],La=i("ngOptions"),za=m({restrict:"A",terminal:!0}),Ra=["$compile","$parse",function(t,i){var r=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,s={$setViewValue:p};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(t,e,n){var i,r,o=this,a={},l=s;o.databound=n.ngModel,o.init=function(t,e,n){l=t,i=e,r=n},o.addOption=function(e,n){ae(e,'"option value"'),a[e]=!0,l.$viewValue==e&&(t.val(e),r.parent()&&r.remove()),n&&n[0].hasAttribute("selected")&&(n[0].selected=!0)},o.removeOption=function(t){this.hasOption(t)&&(delete a[t],l.$viewValue===t&&this.renderUnknownOption(t))},o.renderUnknownOption=function(e){var n="? "+ze(e)+" ?";r.val(n),t.prepend(r),t.val(n),r.prop("selected",!0)},o.hasOption=function(t){return a.hasOwnProperty(t)},e.$on("$destroy",function(){o.renderUnknownOption=p})}],link:function(s,l,u,c){function d(t,e,n,i){n.$render=function(){var t=n.$viewValue;i.hasOption(t)?(_.parent()&&_.remove(),e.val(t),""===t&&p.prop("selected",!0)):null==t&&p?e.val(""):i.renderUnknownOption(t)},e.on("change",function(){t.$apply(function(){_.parent()&&_.remove(),n.$setViewValue(e.val())})})}function h(t,e,n){var i;n.$render=function(){var t=new Re(n.$viewValue);o(e.find("option"),function(e){e.selected=y(t.get(e.value))})},t.$watch(function(){W(i,n.$viewValue)||(i=F(n.$viewValue),n.$render())}),e.on("change",function(){t.$apply(function(){var t=[];o(e.find("option"),function(e){e.selected&&t.push(e.value)}),n.$setViewValue(t)})})}function f(e,s,l){function u(t,n,i){return W[D]=i,A&&(W[A]=n),t(e,W)
}function c(){e.$apply(function(){var t,n=N(e)||[];if(v)t=[],o(s.val(),function(e){e=P?H[e]:e,t.push(d(e,n[e]))});else{var i=P?H[s.val()]:s.val();t=d(i,n[i])}l.$setViewValue(t),_()})}function d(t,e){if("?"===t)return n;if(""===t)return null;var i=T?T:O;return u(i,t,e)}function h(){var t,n=N(e);if(n&&hr(n)){t=new Array(n.length);for(var i=0,r=n.length;r>i;i++)t[i]=u(M,i,n[i]);return t}if(n){t={};for(var o in n)n.hasOwnProperty(o)&&(t[o]=u(M,o,n[o]))}return t}function f(t){var e;if(v)if(P&&hr(t)){e=new Re([]);for(var n=0;n<t.length;n++)e.put(u(P,null,t[n]),!0)}else e=new Re(t);else P&&(t=u(P,null,t));return function(n,i){var r;return r=P?P:T?T:O,v?y(e.remove(u(r,n,i))):t===u(r,n,i)}}function p(){w||(e.$$postDigest(_),w=!0)}function m(t,e,n){t[e]=t[e]||0,t[e]+=n?1:-1}function _(){w=!1;var t,n,i,r,c,d,h,p,b,_,C,D,S,T,O,I,L,z={"":[]},R=[""],j=l.$viewValue,q=N(e)||[],V=A?a(q):q,B={},U=f(j),Y=!1;for(H={},D=0;_=V.length,_>D;D++)h=D,A&&(h=V[D],"$"===h.charAt(0))||(p=q[h],t=u(E,h,p)||"",(n=z[t])||(n=z[t]=[],R.push(t)),S=U(h,p),Y=Y||S,I=u(M,h,p),I=y(I)?I:"",L=P?P(e,W):A?V[D]:D,P&&(H[L]=h),n.push({id:L,label:I,selected:S}));for(v||(x||null===j?z[""].unshift({id:"",label:"",selected:!Y}):Y||z[""].unshift({id:"?",label:"",selected:!0})),C=0,b=R.length;b>C;C++){for(t=R[C],n=z[t],F.length<=C?(r={element:k.clone().attr("label",t),label:n.label},c=[r],F.push(c),s.append(r.element)):(c=F[C],r=c[0],r.label!=t&&r.element.attr("label",r.label=t)),T=null,D=0,_=n.length;_>D;D++)i=n[D],(d=c[D+1])?(T=d.element,d.label!==i.label&&(m(B,d.label,!1),m(B,i.label,!0),T.text(d.label=i.label),T.prop("label",d.label)),d.id!==i.id&&T.val(d.id=i.id),T[0].selected!==i.selected&&(T.prop("selected",d.selected=i.selected),tr&&T.prop("selected",d.selected))):(""===i.id&&x?O=x:(O=$.clone()).val(i.id).prop("selected",i.selected).attr("selected",i.selected).prop("label",i.label).text(i.label),c.push(d={element:O,label:i.label,id:i.id,selected:i.selected}),m(B,i.label,!0),T?T.after(O):r.element.append(O),T=O);for(D++;c.length>D;)i=c.pop(),m(B,i.label,!1),i.element.remove()}for(;F.length>C;){for(n=F.pop(),D=1;D<n.length;++D)m(B,n[D].label,!1);n[0].element.remove()}o(B,function(t,e){t>0?g.addOption(e):0>t&&g.removeOption(e)})}var C;if(!(C=b.match(r)))throw La("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",b,B(s));var M=i(C[2]||C[1]),D=C[4]||C[6],S=/ as /.test(C[0])&&C[1],T=S?i(S):null,A=C[5],E=i(C[3]||""),O=i(C[2]?C[1]:D),N=i(C[7]),I=C[8],P=I?i(C[8]):null,H={},F=[[{element:s,label:""}]],W={};x&&(t(x)(e),x.removeClass("ng-scope"),x.remove()),s.empty(),s.on("change",c),l.$render=_,e.$watchCollection(N,p),e.$watchCollection(h,p),v&&e.$watchCollection(function(){return l.$modelValue},p)}if(c[1]){for(var p,g=c[0],m=c[1],v=u.multiple,b=u.ngOptions,x=!1,w=!1,$=er(e.createElement("option")),k=er(e.createElement("optgroup")),_=$.clone(),C=0,M=l.children(),D=M.length;D>C;C++)if(""===M[C].value){p=x=M.eq(C);break}g.init(m,x,_),v&&(m.$isEmpty=function(t){return!t||0===t.length}),b?f(s,l,m):v?h(s,l,m):d(s,l,m,g)}}}}],ja=["$interpolate",function(t){var e={addOption:p,removeOption:p};return{restrict:"E",priority:100,compile:function(n,i){if(v(i.value)){var r=t(n.text(),!0);r||i.$set("value",n.text())}return function(t,n,i){var o="$selectController",a=n.parent(),s=a.data(o)||a.parent().data(o);s&&s.databound||(s=e),r?t.$watch(r,function(t,e){i.$set("value",t),e!==t&&s.removeOption(e),s.addOption(t,n)}):s.addOption(i.value,n),n.on("$destroy",function(){s.removeOption(i.value)})}}}}],qa=m({restrict:"E",terminal:!1}),Va=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,n,i){i&&(n.required=!0,i.$validators.required=function(t,e){return!n.required||!i.$isEmpty(e)},n.$observe("required",function(){i.$validate()}))}}},Ba=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,r,o){if(o){var a,s=r.ngPattern||r.pattern;r.$observe("pattern",function(t){if(x(t)&&t.length>0&&(t=new RegExp("^"+t+"$")),t&&!t.test)throw i("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",s,t,B(e));a=t||n,o.$validate()}),o.$validators.pattern=function(t){return o.$isEmpty(t)||v(a)||a.test(t)}}}}},Ua=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,n,i){if(i){var r=-1;n.$observe("maxlength",function(t){var e=h(t);r=isNaN(e)?-1:e,i.$validate()}),i.$validators.maxlength=function(t,e){return 0>r||i.$isEmpty(e)||e.length<=r}}}}},Ya=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,n,i){if(i){var r=0;n.$observe("minlength",function(t){r=h(t)||0,i.$validate()}),i.$validators.minlength=function(t,e){return i.$isEmpty(e)||e.length>=r}}}}};return t.angular.bootstrap?void console.log("WARNING: Tried to load angular more than once."):(ie(),fe(ur),void er(e).ready(function(){Q(e,J)}))}(window,document),!window.angular.$$csp()&&window.angular.element(document).find("head").prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}</style>'),/**! 
 * @license angular-flash v0.1.14
 * Copyright (c) 2013 William L. Bunselmeyer. https://github.com/wmluke/angular-flash
 * License: MIT
 */
function(){"use strict";var t=0,e=function(n){function i(t,e){angular.forEach(u.subscribers,function(n){var i=!n.type||n.type===t,r=!u.id&&!n.id||n.id===u.id;i&&r&&n.cb(e,t)})}var r,o,a,s,l,u=angular.extend({id:null,subscribers:{},classnames:{error:[],warn:[],info:[],success:[]}},n),c=this;this.clean=function(){r=null,o=null,a=null,s=null,l=null},this.subscribe=function(e,n,i){return t+=1,u.subscribers[t]={cb:e,type:n,id:i},t},this.unsubscribe=function(t){delete u.subscribers[t]},this.to=function(t){var n=angular.copy(u);return n.id=t,new e(n)},Object.defineProperty(this,"success",{get:function(){return r},set:function(t){r=t,l="success",i(l,t)}}),Object.defineProperty(this,"info",{get:function(){return o},set:function(t){o=t,l="info",i(l,t)}}),Object.defineProperty(this,"warn",{get:function(){return a},set:function(t){a=t,l="warn",i(l,t)}}),Object.defineProperty(this,"error",{get:function(){return s},set:function(t){s=t,l="error",i(l,t)}}),Object.defineProperty(this,"type",{get:function(){return l}}),Object.defineProperty(this,"message",{get:function(){return l?c[l]:null}}),Object.defineProperty(this,"classnames",{get:function(){return u.classnames}}),Object.defineProperty(this,"id",{get:function(){return u.id}})};angular.module("angular-flash.service",[]).provider("flash",function(){var t=this;this.errorClassnames=["alert-error"],this.warnClassnames=["alert-warn"],this.infoClassnames=["alert-info"],this.successClassnames=["alert-success"],this.$get=function(){return new e({classnames:{error:t.errorClassnames,warn:t.warnClassnames,info:t.infoClassnames,success:t.successClassnames}})}})}(),function(){"use strict";function t(t){return(null===t||void 0===t)&&(t=""),/^\s*$/.test(t)}function e(e,n){return{scope:!0,link:function(i,r,o){function a(){var t=[].concat(e.classnames.error,e.classnames.warn,e.classnames.info,e.classnames.success);angular.forEach(t,function(t){r.removeClass(t)})}function s(s,u){if(l&&n.cancel(l),i.flash.type=u,i.flash.message=s,a(),angular.forEach(e.classnames[u],function(t){r.addClass(t)}),t(o.activeClass)||r.addClass(o.activeClass),!s)return void i.hide();var c=Number(o.duration||5e3);c>0&&(l=n(i.hide,c))}var l,u;i.flash={},i.hide=function(){a(),t(o.activeClass)||r.removeClass(o.activeClass)},i.$on("$destroy",function(){e.clean(),e.unsubscribe(u)}),u=e.subscribe(s,o.flashAlert,o.id),o.flashAlert&&e[o.flashAlert]&&s(e[o.flashAlert],o.flashAlert),!o.flashAlert&&e.message&&s(e.message,e.type)}}}angular.module("angular-flash.flash-alert-directive",["angular-flash.service"]).directive("flashAlert",["flash","$timeout",e])}(),!function(){function t(t,e){return e>t?-1:t>e?1:t>=e?0:0/0}function e(t){return null===t?0/0:+t}function n(t){return!isNaN(t)}function i(t){return{left:function(e,n,i,r){for(arguments.length<3&&(i=0),arguments.length<4&&(r=e.length);r>i;){var o=i+r>>>1;t(e[o],n)<0?i=o+1:r=o}return i},right:function(e,n,i,r){for(arguments.length<3&&(i=0),arguments.length<4&&(r=e.length);r>i;){var o=i+r>>>1;t(e[o],n)>0?r=o:i=o+1}return i}}}function r(t){return t.length}function o(t){for(var e=1;t*e%1;)e*=10;return e}function a(t,e){for(var n in e)Object.defineProperty(t.prototype,n,{value:e[n],enumerable:!1})}function s(){this._=Object.create(null)}function l(t){return(t+="")===vs||t[0]===ys?ys+t:t}function u(t){return(t+="")[0]===ys?t.slice(1):t}function c(t){return l(t)in this._}function d(t){return(t=l(t))in this._&&delete this._[t]}function h(){var t=[];for(var e in this._)t.push(u(e));return t}function f(){var t=0;for(var e in this._)++t;return t}function p(){for(var t in this._)return!1;return!0}function g(){this._=Object.create(null)}function m(t,e,n){return function(){var i=n.apply(e,arguments);return i===e?t:i}}function v(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var n=0,i=bs.length;i>n;++n){var r=bs[n]+e;if(r in t)return r}}function y(){}function b(){}function x(t){function e(){for(var e,i=n,r=-1,o=i.length;++r<o;)(e=i[r].on)&&e.apply(this,arguments);return t}var n=[],i=new s;return e.on=function(e,r){var o,a=i.get(e);return arguments.length<2?a&&a.on:(a&&(a.on=null,n=n.slice(0,o=n.indexOf(a)).concat(n.slice(o+1)),i.remove(e)),r&&n.push(i.set(e,{on:r})),t)},e}function w(){ns.event.preventDefault()}function $(){for(var t,e=ns.event;t=e.sourceEvent;)e=t;return e}function k(t){for(var e=new b,n=0,i=arguments.length;++n<i;)e[arguments[n]]=x(e);return e.of=function(n,i){return function(r){try{var o=r.sourceEvent=ns.event;r.target=t,ns.event=r,e[r.type].apply(n,i)}finally{ns.event=o}}},e}function _(t){return ws(t,Ms),t}function C(t){return"function"==typeof t?t:function(){return $s(t,this)}}function M(t){return"function"==typeof t?t:function(){return ks(t,this)}}function D(t,e){function n(){this.removeAttribute(t)}function i(){this.removeAttributeNS(t.space,t.local)}function r(){this.setAttribute(t,e)}function o(){this.setAttributeNS(t.space,t.local,e)}function a(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}function s(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}return t=ns.ns.qualify(t),null==e?t.local?i:n:"function"==typeof e?t.local?s:a:t.local?o:r}function S(t){return t.trim().replace(/\s+/g," ")}function T(t){return new RegExp("(?:^|\\s+)"+ns.requote(t)+"(?:\\s+|$)","g")}function A(t){return(t+"").trim().split(/^|\s+/)}function E(t,e){function n(){for(var n=-1;++n<r;)t[n](this,e)}function i(){for(var n=-1,i=e.apply(this,arguments);++n<r;)t[n](this,i)}t=A(t).map(O);var r=t.length;return"function"==typeof e?i:n}function O(t){var e=T(t);return function(n,i){if(r=n.classList)return i?r.add(t):r.remove(t);var r=n.getAttribute("class")||"";i?(e.lastIndex=0,e.test(r)||n.setAttribute("class",S(r+" "+t))):n.setAttribute("class",S(r.replace(e," ")))}}function N(t,e,n){function i(){this.style.removeProperty(t)}function r(){this.style.setProperty(t,e,n)}function o(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}return null==e?i:"function"==typeof e?o:r}function I(t,e){function n(){delete this[t]}function i(){this[t]=e}function r(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}return null==e?n:"function"==typeof e?r:i}function P(t){return"function"==typeof t?t:(t=ns.ns.qualify(t)).local?function(){return this.ownerDocument.createElementNS(t.space,t.local)}:function(){return this.ownerDocument.createElementNS(this.namespaceURI,t)}}function H(){var t=this.parentNode;t&&t.removeChild(this)}function F(t){return{__data__:t}}function W(t){return function(){return Cs(this,t)}}function L(e){return arguments.length||(e=t),function(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}}function z(t,e){for(var n=0,i=t.length;i>n;n++)for(var r,o=t[n],a=0,s=o.length;s>a;a++)(r=o[a])&&e(r,a,n);return t}function R(t){return ws(t,Ss),t}function j(t){var e,n;return function(i,r,o){var a,s=t[o].update,l=s.length;for(o!=n&&(n=o,e=0),r>=e&&(e=r+1);!(a=s[e])&&++e<l;);return a}}function q(t,e,n){function i(){var e=this[a];e&&(this.removeEventListener(t,e,e.$),delete this[a])}function r(){var r=l(e,rs(arguments));i.call(this),this.addEventListener(t,this[a]=r,r.$=n),r._=e}function o(){var e,n=new RegExp("^__on([^.]+)"+ns.requote(t)+"$");for(var i in this)if(e=i.match(n)){var r=this[i];this.removeEventListener(e[1],r,r.$),delete this[i]}}var a="__on"+t,s=t.indexOf("."),l=V;s>0&&(t=t.slice(0,s));var u=As.get(t);return u&&(t=u,l=B),s?e?r:i:e?y:o}function V(t,e){return function(n){var i=ns.event;ns.event=n,e[0]=this.__data__;try{t.apply(this,e)}finally{ns.event=i}}}function B(t,e){var n=V(t,e);return function(t){var e=this,i=t.relatedTarget;i&&(i===e||8&i.compareDocumentPosition(e))||n.call(e,t)}}function U(){var t=".dragsuppress-"+ ++Os,e="click"+t,n=ns.select(ss).on("touchmove"+t,w).on("dragstart"+t,w).on("selectstart"+t,w);if(Es){var i=as.style,r=i[Es];i[Es]="none"}return function(o){if(n.on(t,null),Es&&(i[Es]=r),o){var a=function(){n.on(e,null)};n.on(e,function(){w(),a()},!0),setTimeout(a,0)}}}function Y(t,e){e.changedTouches&&(e=e.changedTouches[0]);var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();if(0>Ns&&(ss.scrollX||ss.scrollY)){n=ns.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var r=n[0][0].getScreenCTM();Ns=!(r.f||r.e),n.remove()}return Ns?(i.x=e.pageX,i.y=e.pageY):(i.x=e.clientX,i.y=e.clientY),i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}function G(){return ns.event.changedTouches[0].identifier}function X(){return ns.event.target}function K(){return ss}function Z(t){return t>0?1:0>t?-1:0}function Q(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function J(t){return t>1?0:-1>t?Hs:Math.acos(t)}function te(t){return t>1?Ls:-1>t?-Ls:Math.asin(t)}function ee(t){return((t=Math.exp(t))-1/t)/2}function ne(t){return((t=Math.exp(t))+1/t)/2}function ie(t){return((t=Math.exp(2*t))-1)/(t+1)}function re(t){return(t=Math.sin(t/2))*t}function oe(){}function ae(t,e,n){return this instanceof ae?(this.h=+t,this.s=+e,void(this.l=+n)):arguments.length<2?t instanceof ae?new ae(t.h,t.s,t.l):xe(""+t,we,ae):new ae(t,e,n)}function se(t,e,n){function i(t){return t>360?t-=360:0>t&&(t+=360),60>t?o+(a-o)*t/60:180>t?a:240>t?o+(a-o)*(240-t)/60:o}function r(t){return Math.round(255*i(t))}var o,a;return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)?0:0>e?0:e>1?1:e,n=0>n?0:n>1?1:n,a=.5>=n?n*(1+e):n+e-n*e,o=2*n-a,new me(r(t+120),r(t),r(t-120))}function le(t,e,n){return this instanceof le?(this.h=+t,this.c=+e,void(this.l=+n)):arguments.length<2?t instanceof le?new le(t.h,t.c,t.l):t instanceof ce?he(t.l,t.a,t.b):he((t=$e((t=ns.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new le(t,e,n)}function ue(t,e,n){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new ce(n,Math.cos(t*=zs)*e,Math.sin(t)*e)}function ce(t,e,n){return this instanceof ce?(this.l=+t,this.a=+e,void(this.b=+n)):arguments.length<2?t instanceof ce?new ce(t.l,t.a,t.b):t instanceof le?ue(t.h,t.c,t.l):$e((t=me(t)).r,t.g,t.b):new ce(t,e,n)}function de(t,e,n){var i=(t+16)/116,r=i+e/500,o=i-n/200;return r=fe(r)*Zs,i=fe(i)*Qs,o=fe(o)*Js,new me(ge(3.2404542*r-1.5371385*i-.4985314*o),ge(-.969266*r+1.8760108*i+.041556*o),ge(.0556434*r-.2040259*i+1.0572252*o))}function he(t,e,n){return t>0?new le(Math.atan2(n,e)*Rs,Math.sqrt(e*e+n*n),t):new le(0/0,0/0,t)}function fe(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function pe(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function ge(t){return Math.round(255*(.00304>=t?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function me(t,e,n){return this instanceof me?(this.r=~~t,this.g=~~e,void(this.b=~~n)):arguments.length<2?t instanceof me?new me(t.r,t.g,t.b):xe(""+t,me,se):new me(t,e,n)}function ve(t){return new me(t>>16,t>>8&255,255&t)}function ye(t){return ve(t)+""}function be(t){return 16>t?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function xe(t,e,n){var i,r,o,a=0,s=0,l=0;if(i=/([a-z]+)\((.*)\)/i.exec(t))switch(r=i[2].split(","),i[1]){case"hsl":return n(parseFloat(r[0]),parseFloat(r[1])/100,parseFloat(r[2])/100);case"rgb":return e(_e(r[0]),_e(r[1]),_e(r[2]))}return(o=nl.get(t))?e(o.r,o.g,o.b):(null==t||"#"!==t.charAt(0)||isNaN(o=parseInt(t.slice(1),16))||(4===t.length?(a=(3840&o)>>4,a=a>>4|a,s=240&o,s=s>>4|s,l=15&o,l=l<<4|l):7===t.length&&(a=(16711680&o)>>16,s=(65280&o)>>8,l=255&o)),e(a,s,l))}function we(t,e,n){var i,r,o=Math.min(t/=255,e/=255,n/=255),a=Math.max(t,e,n),s=a-o,l=(a+o)/2;return s?(r=.5>l?s/(a+o):s/(2-a-o),i=t==a?(e-n)/s+(n>e?6:0):e==a?(n-t)/s+2:(t-e)/s+4,i*=60):(i=0/0,r=l>0&&1>l?0:i),new ae(i,r,l)}function $e(t,e,n){t=ke(t),e=ke(e),n=ke(n);var i=pe((.4124564*t+.3575761*e+.1804375*n)/Zs),r=pe((.2126729*t+.7151522*e+.072175*n)/Qs),o=pe((.0193339*t+.119192*e+.9503041*n)/Js);return ce(116*r-16,500*(i-r),200*(r-o))}function ke(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function _e(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}function Ce(t){return"function"==typeof t?t:function(){return t}}function Me(t){return t}function De(t){return function(e,n,i){return 2===arguments.length&&"function"==typeof n&&(i=n,n=null),Se(e,n,t,i)}}function Se(t,e,n,i){function r(){var t,e=l.status;if(!e&&Ae(l)||e>=200&&300>e||304===e){try{t=n.call(o,l)}catch(i){return void a.error.call(o,i)}a.load.call(o,t)}else a.error.call(o,l)}var o={},a=ns.dispatch("beforesend","progress","load","error"),s={},l=new XMLHttpRequest,u=null;return!ss.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(t)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=r:l.onreadystatechange=function(){l.readyState>3&&r()},l.onprogress=function(t){var e=ns.event;ns.event=t;try{a.progress.call(o,l)}finally{ns.event=e}},o.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?s[t]:(null==e?delete s[t]:s[t]=e+"",o)},o.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",o):e},o.responseType=function(t){return arguments.length?(u=t,o):u},o.response=function(t){return n=t,o},["get","post"].forEach(function(t){o[t]=function(){return o.send.apply(o,[t].concat(rs(arguments)))}}),o.send=function(n,i,r){if(2===arguments.length&&"function"==typeof i&&(r=i,i=null),l.open(n,t,!0),null==e||"accept"in s||(s.accept=e+",*/*"),l.setRequestHeader)for(var c in s)l.setRequestHeader(c,s[c]);return null!=e&&l.overrideMimeType&&l.overrideMimeType(e),null!=u&&(l.responseType=u),null!=r&&o.on("error",r).on("load",function(t){r(null,t)}),a.beforesend.call(o,l),l.send(null==i?null:i),o},o.abort=function(){return l.abort(),o},ns.rebind(o,a,"on"),null==i?o:o.get(Te(i))}function Te(t){return 1===t.length?function(e,n){t(null==e?n:null)}:t}function Ae(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}function Ee(){var t=Oe(),e=Ne()-t;e>24?(isFinite(e)&&(clearTimeout(al),al=setTimeout(Ee,e)),ol=0):(ol=1,ll(Ee))}function Oe(){var t=Date.now();for(sl=il;sl;)t>=sl.t&&(sl.f=sl.c(t-sl.t)),sl=sl.n;return t}function Ne(){for(var t,e=il,n=1/0;e;)e.f?e=t?t.n=e.n:il=e.n:(e.t<n&&(n=e.t),e=(t=e).n);return rl=t,n}function Ie(t,e){return e-(t?Math.ceil(Math.log(t)/Math.LN10):1)}function Pe(t,e){var n=Math.pow(10,3*ms(8-e));return{scale:e>8?function(t){return t/n}:function(t){return t*n},symbol:t}}function He(t){var e=t.decimal,n=t.thousands,i=t.grouping,r=t.currency,o=i&&n?function(t,e){for(var r=t.length,o=[],a=0,s=i[0],l=0;r>0&&s>0&&(l+s+1>e&&(s=Math.max(1,e-l)),o.push(t.substring(r-=s,r+s)),!((l+=s+1)>e));)s=i[a=(a+1)%i.length];return o.reverse().join(n)}:Me;return function(t){var n=cl.exec(t),i=n[1]||" ",a=n[2]||">",s=n[3]||"-",l=n[4]||"",u=n[5],c=+n[6],d=n[7],h=n[8],f=n[9],p=1,g="",m="",v=!1,y=!0;switch(h&&(h=+h.substring(1)),(u||"0"===i&&"="===a)&&(u=i="0",a="="),f){case"n":d=!0,f="g";break;case"%":p=100,m="%",f="f";break;case"p":p=100,m="%",f="r";break;case"b":case"o":case"x":case"X":"#"===l&&(g="0"+f.toLowerCase());case"c":y=!1;case"d":v=!0,h=0;break;case"s":p=-1,f="r"}"$"===l&&(g=r[0],m=r[1]),"r"!=f||h||(f="g"),null!=h&&("g"==f?h=Math.max(1,Math.min(21,h)):("e"==f||"f"==f)&&(h=Math.max(0,Math.min(20,h)))),f=dl.get(f)||Fe;var b=u&&d;return function(t){var n=m;if(v&&t%1)return"";var r=0>t||0===t&&0>1/t?(t=-t,"-"):"-"===s?"":s;if(0>p){var l=ns.formatPrefix(t,h);t=l.scale(t),n=l.symbol+m}else t*=p;t=f(t,h);var x,w,$=t.lastIndexOf(".");if(0>$){var k=y?t.lastIndexOf("e"):-1;0>k?(x=t,w=""):(x=t.substring(0,k),w=t.substring(k))}else x=t.substring(0,$),w=e+t.substring($+1);!u&&d&&(x=o(x,1/0));var _=g.length+x.length+w.length+(b?0:r.length),C=c>_?new Array(_=c-_+1).join(i):"";return b&&(x=o(C+x,C.length?c-w.length:1/0)),r+=g,t=x+w,("<"===a?r+t+C:">"===a?C+r+t:"^"===a?C.substring(0,_>>=1)+r+t+C.substring(_):r+(b?t:C+t))+n}}}function Fe(t){return t+""}function We(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Le(t,e,n){function i(e){var n=t(e),i=o(n,1);return i-e>e-n?n:i}function r(n){return e(n=t(new fl(n-1)),1),n}function o(t,n){return e(t=new fl(+t),n),t}function a(t,i,o){var a=r(t),s=[];if(o>1)for(;i>a;)n(a)%o||s.push(new Date(+a)),e(a,1);else for(;i>a;)s.push(new Date(+a)),e(a,1);return s}function s(t,e,n){try{fl=We;var i=new We;return i._=t,a(i,e,n)}finally{fl=Date}}t.floor=t,t.round=i,t.ceil=r,t.offset=o,t.range=a;var l=t.utc=ze(t);return l.floor=l,l.round=ze(i),l.ceil=ze(r),l.offset=ze(o),l.range=s,t}function ze(t){return function(e,n){try{fl=We;var i=new We;return i._=e,t(i,n)._}finally{fl=Date}}}function Re(t){function e(t){function e(e){for(var n,r,o,a=[],s=-1,l=0;++s<i;)37===t.charCodeAt(s)&&(a.push(t.slice(l,s)),null!=(r=gl[n=t.charAt(++s)])&&(n=t.charAt(++s)),(o=S[n])&&(n=o(e,null==r?"e"===n?" ":"0":r)),a.push(n),l=s+1);return a.push(t.slice(l,s)),a.join("")}var i=t.length;return e.parse=function(e){var i={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},r=n(i,t,e,0);if(r!=e.length)return null;"p"in i&&(i.H=i.H%12+12*i.p);var o=null!=i.Z&&fl!==We,a=new(o?We:fl);return"j"in i?a.setFullYear(i.y,0,i.j):"w"in i&&("W"in i||"U"in i)?(a.setFullYear(i.y,0,1),a.setFullYear(i.y,0,"W"in i?(i.w+6)%7+7*i.W-(a.getDay()+5)%7:i.w+7*i.U-(a.getDay()+6)%7)):a.setFullYear(i.y,i.m,i.d),a.setHours(i.H+(i.Z/100|0),i.M+i.Z%100,i.S,i.L),o?a._:a},e.toString=function(){return t},e}function n(t,e,n,i){for(var r,o,a,s=0,l=e.length,u=n.length;l>s;){if(i>=u)return-1;if(r=e.charCodeAt(s++),37===r){if(a=e.charAt(s++),o=T[a in gl?e.charAt(s++):a],!o||(i=o(t,n,i))<0)return-1}else if(r!=n.charCodeAt(i++))return-1}return i}function i(t,e,n){$.lastIndex=0;var i=$.exec(e.slice(n));return i?(t.w=k.get(i[0].toLowerCase()),n+i[0].length):-1}function r(t,e,n){x.lastIndex=0;var i=x.exec(e.slice(n));return i?(t.w=w.get(i[0].toLowerCase()),n+i[0].length):-1}function o(t,e,n){M.lastIndex=0;var i=M.exec(e.slice(n));return i?(t.m=D.get(i[0].toLowerCase()),n+i[0].length):-1}function a(t,e,n){_.lastIndex=0;var i=_.exec(e.slice(n));return i?(t.m=C.get(i[0].toLowerCase()),n+i[0].length):-1}function s(t,e,i){return n(t,S.c.toString(),e,i)}function l(t,e,i){return n(t,S.x.toString(),e,i)}function u(t,e,i){return n(t,S.X.toString(),e,i)}function c(t,e,n){var i=b.get(e.slice(n,n+=2).toLowerCase());return null==i?-1:(t.p=i,n)}var d=t.dateTime,h=t.date,f=t.time,p=t.periods,g=t.days,m=t.shortDays,v=t.months,y=t.shortMonths;e.utc=function(t){function n(t){try{fl=We;var e=new fl;return e._=t,i(e)}finally{fl=Date}}var i=e(t);return n.parse=function(t){try{fl=We;var e=i.parse(t);return e&&e._}finally{fl=Date}},n.toString=i.toString,n},e.multi=e.utc.multi=ln;var b=ns.map(),x=qe(g),w=Ve(g),$=qe(m),k=Ve(m),_=qe(v),C=Ve(v),M=qe(y),D=Ve(y);p.forEach(function(t,e){b.set(t.toLowerCase(),e)});var S={a:function(t){return m[t.getDay()]},A:function(t){return g[t.getDay()]},b:function(t){return y[t.getMonth()]},B:function(t){return v[t.getMonth()]},c:e(d),d:function(t,e){return je(t.getDate(),e,2)},e:function(t,e){return je(t.getDate(),e,2)},H:function(t,e){return je(t.getHours(),e,2)},I:function(t,e){return je(t.getHours()%12||12,e,2)},j:function(t,e){return je(1+hl.dayOfYear(t),e,3)},L:function(t,e){return je(t.getMilliseconds(),e,3)},m:function(t,e){return je(t.getMonth()+1,e,2)},M:function(t,e){return je(t.getMinutes(),e,2)},p:function(t){return p[+(t.getHours()>=12)]},S:function(t,e){return je(t.getSeconds(),e,2)},U:function(t,e){return je(hl.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return je(hl.mondayOfYear(t),e,2)},x:e(h),X:e(f),y:function(t,e){return je(t.getFullYear()%100,e,2)},Y:function(t,e){return je(t.getFullYear()%1e4,e,4)},Z:an,"%":function(){return"%"}},T={a:i,A:r,b:o,B:a,c:s,d:Je,e:Je,H:en,I:en,j:tn,L:on,m:Qe,M:nn,p:c,S:rn,U:Ue,w:Be,W:Ye,x:l,X:u,y:Xe,Y:Ge,Z:Ke,"%":sn};return e}function je(t,e,n){var i=0>t?"-":"",r=(i?-t:t)+"",o=r.length;return i+(n>o?new Array(n-o+1).join(e)+r:r)}function qe(t){return new RegExp("^(?:"+t.map(ns.requote).join("|")+")","i")}function Ve(t){for(var e=new s,n=-1,i=t.length;++n<i;)e.set(t[n].toLowerCase(),n);return e}function Be(t,e,n){ml.lastIndex=0;var i=ml.exec(e.slice(n,n+1));return i?(t.w=+i[0],n+i[0].length):-1}function Ue(t,e,n){ml.lastIndex=0;var i=ml.exec(e.slice(n));return i?(t.U=+i[0],n+i[0].length):-1}function Ye(t,e,n){ml.lastIndex=0;var i=ml.exec(e.slice(n));return i?(t.W=+i[0],n+i[0].length):-1}function Ge(t,e,n){ml.lastIndex=0;var i=ml.exec(e.slice(n,n+4));return i?(t.y=+i[0],n+i[0].length):-1}function Xe(t,e,n){ml.lastIndex=0;var i=ml.exec(e.slice(n,n+2));return i?(t.y=Ze(+i[0]),n+i[0].length):-1}function Ke(t,e,n){return/^[+-]\d{4}$/.test(e=e.slice(n,n+5))?(t.Z=-e,n+5):-1}function Ze(t){return t+(t>68?1900:2e3)}function Qe(t,e,n){ml.lastIndex=0;var i=ml.exec(e.slice(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}function Je(t,e,n){ml.lastIndex=0;var i=ml.exec(e.slice(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}function tn(t,e,n){ml.lastIndex=0;var i=ml.exec(e.slice(n,n+3));return i?(t.j=+i[0],n+i[0].length):-1}function en(t,e,n){ml.lastIndex=0;var i=ml.exec(e.slice(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function nn(t,e,n){ml.lastIndex=0;var i=ml.exec(e.slice(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}function rn(t,e,n){ml.lastIndex=0;var i=ml.exec(e.slice(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}function on(t,e,n){ml.lastIndex=0;var i=ml.exec(e.slice(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}function an(t){var e=t.getTimezoneOffset(),n=e>0?"-":"+",i=ms(e)/60|0,r=ms(e)%60;return n+je(i,"0",2)+je(r,"0",2)}function sn(t,e,n){vl.lastIndex=0;var i=vl.exec(e.slice(n,n+1));return i?n+i[0].length:-1}function ln(t){for(var e=t.length,n=-1;++n<e;)t[n][0]=this(t[n][0]);return function(e){for(var n=0,i=t[n];!i[1](e);)i=t[++n];return i[0](e)}}function un(){}function cn(t,e,n){var i=n.s=t+e,r=i-t,o=i-r;n.t=t-o+(e-r)}function dn(t,e){t&&wl.hasOwnProperty(t.type)&&wl[t.type](t,e)}function hn(t,e,n){var i,r=-1,o=t.length-n;for(e.lineStart();++r<o;)i=t[r],e.point(i[0],i[1],i[2]);e.lineEnd()}function fn(t,e){var n=-1,i=t.length;for(e.polygonStart();++n<i;)hn(t[n],e,1);e.polygonEnd()}function pn(){function t(t,e){t*=zs,e=e*zs/2+Hs/4;var n=t-i,a=n>=0?1:-1,s=a*n,l=Math.cos(e),u=Math.sin(e),c=o*u,d=r*l+c*Math.cos(s),h=c*a*Math.sin(s);kl.add(Math.atan2(h,d)),i=t,r=l,o=u}var e,n,i,r,o;_l.point=function(a,s){_l.point=t,i=(e=a)*zs,r=Math.cos(s=(n=s)*zs/2+Hs/4),o=Math.sin(s)},_l.lineEnd=function(){t(e,n)}}function gn(t){var e=t[0],n=t[1],i=Math.cos(n);return[i*Math.cos(e),i*Math.sin(e),Math.sin(n)]}function mn(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function vn(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function yn(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function bn(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function xn(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function wn(t){return[Math.atan2(t[1],t[0]),te(t[2])]}function $n(t,e){return ms(t[0]-e[0])<Is&&ms(t[1]-e[1])<Is}function kn(t,e){t*=zs;var n=Math.cos(e*=zs);_n(n*Math.cos(t),n*Math.sin(t),Math.sin(e))}function _n(t,e,n){++Cl,Dl+=(t-Dl)/Cl,Sl+=(e-Sl)/Cl,Tl+=(n-Tl)/Cl}function Cn(){function t(t,r){t*=zs;var o=Math.cos(r*=zs),a=o*Math.cos(t),s=o*Math.sin(t),l=Math.sin(r),u=Math.atan2(Math.sqrt((u=n*l-i*s)*u+(u=i*a-e*l)*u+(u=e*s-n*a)*u),e*a+n*s+i*l);Ml+=u,Al+=u*(e+(e=a)),El+=u*(n+(n=s)),Ol+=u*(i+(i=l)),_n(e,n,i)}var e,n,i;Hl.point=function(r,o){r*=zs;var a=Math.cos(o*=zs);e=a*Math.cos(r),n=a*Math.sin(r),i=Math.sin(o),Hl.point=t,_n(e,n,i)}}function Mn(){Hl.point=kn}function Dn(){function t(t,e){t*=zs;var n=Math.cos(e*=zs),a=n*Math.cos(t),s=n*Math.sin(t),l=Math.sin(e),u=r*l-o*s,c=o*a-i*l,d=i*s-r*a,h=Math.sqrt(u*u+c*c+d*d),f=i*a+r*s+o*l,p=h&&-J(f)/h,g=Math.atan2(h,f);Nl+=p*u,Il+=p*c,Pl+=p*d,Ml+=g,Al+=g*(i+(i=a)),El+=g*(r+(r=s)),Ol+=g*(o+(o=l)),_n(i,r,o)}var e,n,i,r,o;Hl.point=function(a,s){e=a,n=s,Hl.point=t,a*=zs;var l=Math.cos(s*=zs);i=l*Math.cos(a),r=l*Math.sin(a),o=Math.sin(s),_n(i,r,o)},Hl.lineEnd=function(){t(e,n),Hl.lineEnd=Mn,Hl.point=kn}}function Sn(t,e){function n(n,i){return n=t(n,i),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,i){return n=e.invert(n,i),n&&t.invert(n[0],n[1])}),n}function Tn(){return!0}function An(t,e,n,i,r){var o=[],a=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n=t[0],i=t[e];if($n(n,i)){r.lineStart();for(var s=0;e>s;++s)r.point((n=t[s])[0],n[1]);return void r.lineEnd()}var l=new On(n,t,null,!0),u=new On(n,null,l,!1);l.o=u,o.push(l),a.push(u),l=new On(i,t,null,!1),u=new On(i,null,l,!0),l.o=u,o.push(l),a.push(u)}}),a.sort(e),En(o),En(a),o.length){for(var s=0,l=n,u=a.length;u>s;++s)a[s].e=l=!l;for(var c,d,h=o[0];;){for(var f=h,p=!0;f.v;)if((f=f.n)===h)return;c=f.z,r.lineStart();do{if(f.v=f.o.v=!0,f.e){if(p)for(var s=0,u=c.length;u>s;++s)r.point((d=c[s])[0],d[1]);else i(f.x,f.n.x,1,r);f=f.n}else{if(p){c=f.p.z;for(var s=c.length-1;s>=0;--s)r.point((d=c[s])[0],d[1])}else i(f.x,f.p.x,-1,r);f=f.p}f=f.o,c=f.z,p=!p}while(!f.v);r.lineEnd()}}}function En(t){if(e=t.length){for(var e,n,i=0,r=t[0];++i<e;)r.n=n=t[i],n.p=r,r=n;r.n=n=t[0],n.p=r}}function On(t,e,n,i){this.x=t,this.z=e,this.o=n,this.e=i,this.v=!1,this.n=this.p=null}function Nn(t,e,n,i){return function(r,o){function a(e,n){var i=r(e,n);t(e=i[0],n=i[1])&&o.point(e,n)}function s(t,e){var n=r(t,e);m.point(n[0],n[1])}function l(){y.point=s,m.lineStart()}function u(){y.point=a,m.lineEnd()}function c(t,e){g.push([t,e]);var n=r(t,e);x.point(n[0],n[1])}function d(){x.lineStart(),g=[]}function h(){c(g[0][0],g[0][1]),x.lineEnd();var t,e=x.clean(),n=b.buffer(),i=n.length;if(g.pop(),p.push(g),g=null,i)if(1&e){t=n[0];var r,i=t.length-1,a=-1;if(i>0){for(w||(o.polygonStart(),w=!0),o.lineStart();++a<i;)o.point((r=t[a])[0],r[1]);o.lineEnd()}}else i>1&&2&e&&n.push(n.pop().concat(n.shift())),f.push(n.filter(In))}var f,p,g,m=e(o),v=r.invert(i[0],i[1]),y={point:a,lineStart:l,lineEnd:u,polygonStart:function(){y.point=c,y.lineStart=d,y.lineEnd=h,f=[],p=[]},polygonEnd:function(){y.point=a,y.lineStart=l,y.lineEnd=u,f=ns.merge(f);var t=zn(v,p);f.length?(w||(o.polygonStart(),w=!0),An(f,Hn,t,n,o)):t&&(w||(o.polygonStart(),w=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),w&&(o.polygonEnd(),w=!1),f=p=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}},b=Pn(),x=e(b),w=!1;return y}}function In(t){return t.length>1}function Pn(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,n){t.push([e,n])},lineEnd:y,buffer:function(){var n=e;return e=[],t=null,n},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function Hn(t,e){return((t=t.x)[0]<0?t[1]-Ls-Is:Ls-t[1])-((e=e.x)[0]<0?e[1]-Ls-Is:Ls-e[1])}function Fn(t){var e,n=0/0,i=0/0,r=0/0;return{lineStart:function(){t.lineStart(),e=1},point:function(o,a){var s=o>0?Hs:-Hs,l=ms(o-n);ms(l-Hs)<Is?(t.point(n,i=(i+a)/2>0?Ls:-Ls),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(s,i),t.point(o,i),e=0):r!==s&&l>=Hs&&(ms(n-r)<Is&&(n-=r*Is),ms(o-s)<Is&&(o-=s*Is),i=Wn(n,i,o,a),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(s,i),e=0),t.point(n=o,i=a),r=s},lineEnd:function(){t.lineEnd(),n=i=0/0},clean:function(){return 2-e}}}function Wn(t,e,n,i){var r,o,a=Math.sin(t-n);return ms(a)>Is?Math.atan((Math.sin(e)*(o=Math.cos(i))*Math.sin(n)-Math.sin(i)*(r=Math.cos(e))*Math.sin(t))/(r*o*a)):(e+i)/2}function Ln(t,e,n,i){var r;if(null==t)r=n*Ls,i.point(-Hs,r),i.point(0,r),i.point(Hs,r),i.point(Hs,0),i.point(Hs,-r),i.point(0,-r),i.point(-Hs,-r),i.point(-Hs,0),i.point(-Hs,r);else if(ms(t[0]-e[0])>Is){var o=t[0]<e[0]?Hs:-Hs;r=n*o/2,i.point(-o,r),i.point(0,r),i.point(o,r)}else i.point(e[0],e[1])}function zn(t,e){var n=t[0],i=t[1],r=[Math.sin(n),-Math.cos(n),0],o=0,a=0;kl.reset();for(var s=0,l=e.length;l>s;++s){var u=e[s],c=u.length;if(c)for(var d=u[0],h=d[0],f=d[1]/2+Hs/4,p=Math.sin(f),g=Math.cos(f),m=1;;){m===c&&(m=0),t=u[m];var v=t[0],y=t[1]/2+Hs/4,b=Math.sin(y),x=Math.cos(y),w=v-h,$=w>=0?1:-1,k=$*w,_=k>Hs,C=p*b;if(kl.add(Math.atan2(C*$*Math.sin(k),g*x+C*Math.cos(k))),o+=_?w+$*Fs:w,_^h>=n^v>=n){var M=vn(gn(d),gn(t));xn(M);var D=vn(r,M);xn(D);var S=(_^w>=0?-1:1)*te(D[2]);(i>S||i===S&&(M[0]||M[1]))&&(a+=_^w>=0?1:-1)}if(!m++)break;h=v,p=b,g=x,d=t}}return(-Is>o||Is>o&&0>kl)^1&a}function Rn(t){function e(t,e){return Math.cos(t)*Math.cos(e)>o}function n(t){var n,o,l,u,c;return{lineStart:function(){u=l=!1,c=1},point:function(d,h){var f,p=[d,h],g=e(d,h),m=a?g?0:r(d,h):g?r(d+(0>d?Hs:-Hs),h):0;if(!n&&(u=l=g)&&t.lineStart(),g!==l&&(f=i(n,p),($n(n,f)||$n(p,f))&&(p[0]+=Is,p[1]+=Is,g=e(p[0],p[1]))),g!==l)c=0,g?(t.lineStart(),f=i(p,n),t.point(f[0],f[1])):(f=i(n,p),t.point(f[0],f[1]),t.lineEnd()),n=f;else if(s&&n&&a^g){var v;m&o||!(v=i(p,n,!0))||(c=0,a?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!g||n&&$n(n,p)||t.point(p[0],p[1]),n=p,l=g,o=m},lineEnd:function(){l&&t.lineEnd(),n=null},clean:function(){return c|(u&&l)<<1}}}function i(t,e,n){var i=gn(t),r=gn(e),a=[1,0,0],s=vn(i,r),l=mn(s,s),u=s[0],c=l-u*u;if(!c)return!n&&t;var d=o*l/c,h=-o*u/c,f=vn(a,s),p=bn(a,d),g=bn(s,h);yn(p,g);var m=f,v=mn(p,m),y=mn(m,m),b=v*v-y*(mn(p,p)-1);if(!(0>b)){var x=Math.sqrt(b),w=bn(m,(-v-x)/y);if(yn(w,p),w=wn(w),!n)return w;var $,k=t[0],_=e[0],C=t[1],M=e[1];k>_&&($=k,k=_,_=$);var D=_-k,S=ms(D-Hs)<Is,T=S||Is>D;if(!S&&C>M&&($=C,C=M,M=$),T?S?C+M>0^w[1]<(ms(w[0]-k)<Is?C:M):C<=w[1]&&w[1]<=M:D>Hs^(k<=w[0]&&w[0]<=_)){var A=bn(m,(-v+x)/y);return yn(A,p),[w,wn(A)]}}}function r(e,n){var i=a?t:Hs-t,r=0;return-i>e?r|=1:e>i&&(r|=2),-i>n?r|=4:n>i&&(r|=8),r}var o=Math.cos(t),a=o>0,s=ms(o)>Is,l=pi(t,6*zs);return Nn(e,n,l,a?[0,-t]:[-Hs,t-Hs])}function jn(t,e,n,i){return function(r){var o,a=r.a,s=r.b,l=a.x,u=a.y,c=s.x,d=s.y,h=0,f=1,p=c-l,g=d-u;if(o=t-l,p||!(o>0)){if(o/=p,0>p){if(h>o)return;f>o&&(f=o)}else if(p>0){if(o>f)return;o>h&&(h=o)}if(o=n-l,p||!(0>o)){if(o/=p,0>p){if(o>f)return;o>h&&(h=o)}else if(p>0){if(h>o)return;f>o&&(f=o)}if(o=e-u,g||!(o>0)){if(o/=g,0>g){if(h>o)return;f>o&&(f=o)}else if(g>0){if(o>f)return;o>h&&(h=o)}if(o=i-u,g||!(0>o)){if(o/=g,0>g){if(o>f)return;o>h&&(h=o)}else if(g>0){if(h>o)return;f>o&&(f=o)}return h>0&&(r.a={x:l+h*p,y:u+h*g}),1>f&&(r.b={x:l+f*p,y:u+f*g}),r}}}}}}function qn(t,e,n,i){function r(i,r){return ms(i[0]-t)<Is?r>0?0:3:ms(i[0]-n)<Is?r>0?2:1:ms(i[1]-e)<Is?r>0?1:0:r>0?3:2}function o(t,e){return a(t.x,e.x)}function a(t,e){var n=r(t,1),i=r(e,1);return n!==i?n-i:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(s){function l(t){for(var e=0,n=m.length,i=t[1],r=0;n>r;++r)for(var o,a=1,s=m[r],l=s.length,u=s[0];l>a;++a)o=s[a],u[1]<=i?o[1]>i&&Q(u,o,t)>0&&++e:o[1]<=i&&Q(u,o,t)<0&&--e,u=o;return 0!==e}function u(o,s,l,u){var c=0,d=0;if(null==o||(c=r(o,l))!==(d=r(s,l))||a(o,s)<0^l>0){do u.point(0===c||3===c?t:n,c>1?i:e);while((c=(c+l+4)%4)!==d)}else u.point(s[0],s[1])}function c(r,o){return r>=t&&n>=r&&o>=e&&i>=o}function d(t,e){c(t,e)&&s.point(t,e)}function h(){T.point=p,m&&m.push(v=[]),_=!0,k=!1,w=$=0/0}function f(){g&&(p(y,b),x&&k&&D.rejoin(),g.push(D.buffer())),T.point=d,k&&s.lineEnd()}function p(t,e){t=Math.max(-Wl,Math.min(Wl,t)),e=Math.max(-Wl,Math.min(Wl,e));var n=c(t,e);if(m&&v.push([t,e]),_)y=t,b=e,x=n,_=!1,n&&(s.lineStart(),s.point(t,e));else if(n&&k)s.point(t,e);else{var i={a:{x:w,y:$},b:{x:t,y:e}};S(i)?(k||(s.lineStart(),s.point(i.a.x,i.a.y)),s.point(i.b.x,i.b.y),n||s.lineEnd(),C=!1):n&&(s.lineStart(),s.point(t,e),C=!1)}w=t,$=e,k=n}var g,m,v,y,b,x,w,$,k,_,C,M=s,D=Pn(),S=jn(t,e,n,i),T={point:d,lineStart:h,lineEnd:f,polygonStart:function(){s=D,g=[],m=[],C=!0},polygonEnd:function(){s=M,g=ns.merge(g);var e=l([t,i]),n=C&&e,r=g.length;(n||r)&&(s.polygonStart(),n&&(s.lineStart(),u(null,null,1,s),s.lineEnd()),r&&An(g,o,e,u,s),s.polygonEnd()),g=m=v=null}};return T}}function Vn(t){var e=0,n=Hs/3,i=ai(t),r=i(e,n);return r.parallels=function(t){return arguments.length?i(e=t[0]*Hs/180,n=t[1]*Hs/180):[e/Hs*180,n/Hs*180]},r}function Bn(t,e){function n(t,e){var n=Math.sqrt(o-2*r*Math.sin(e))/r;return[n*Math.sin(t*=r),a-n*Math.cos(t)]}var i=Math.sin(t),r=(i+Math.sin(e))/2,o=1+i*(2*r-i),a=Math.sqrt(o)/r;
return n.invert=function(t,e){var n=a-e;return[Math.atan2(t,n)/r,te((o-(t*t+n*n)*r*r)/(2*r))]},n}function Un(){function t(t,e){zl+=r*t-i*e,i=t,r=e}var e,n,i,r;Bl.point=function(o,a){Bl.point=t,e=i=o,n=r=a},Bl.lineEnd=function(){t(e,n)}}function Yn(t,e){Rl>t&&(Rl=t),t>ql&&(ql=t),jl>e&&(jl=e),e>Vl&&(Vl=e)}function Gn(){function t(t,e){a.push("M",t,",",e,o)}function e(t,e){a.push("M",t,",",e),s.point=n}function n(t,e){a.push("L",t,",",e)}function i(){s.point=t}function r(){a.push("Z")}var o=Xn(4.5),a=[],s={point:t,lineStart:function(){s.point=e},lineEnd:i,polygonStart:function(){s.lineEnd=r},polygonEnd:function(){s.lineEnd=i,s.point=t},pointRadius:function(t){return o=Xn(t),s},result:function(){if(a.length){var t=a.join("");return a=[],t}}};return s}function Xn(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Kn(t,e){Dl+=t,Sl+=e,++Tl}function Zn(){function t(t,i){var r=t-e,o=i-n,a=Math.sqrt(r*r+o*o);Al+=a*(e+t)/2,El+=a*(n+i)/2,Ol+=a,Kn(e=t,n=i)}var e,n;Yl.point=function(i,r){Yl.point=t,Kn(e=i,n=r)}}function Qn(){Yl.point=Kn}function Jn(){function t(t,e){var n=t-i,o=e-r,a=Math.sqrt(n*n+o*o);Al+=a*(i+t)/2,El+=a*(r+e)/2,Ol+=a,a=r*t-i*e,Nl+=a*(i+t),Il+=a*(r+e),Pl+=3*a,Kn(i=t,r=e)}var e,n,i,r;Yl.point=function(o,a){Yl.point=t,Kn(e=i=o,n=r=a)},Yl.lineEnd=function(){t(e,n)}}function ti(t){function e(e,n){t.moveTo(e+a,n),t.arc(e,n,a,0,Fs)}function n(e,n){t.moveTo(e,n),s.point=i}function i(e,n){t.lineTo(e,n)}function r(){s.point=e}function o(){t.closePath()}var a=4.5,s={point:e,lineStart:function(){s.point=n},lineEnd:r,polygonStart:function(){s.lineEnd=o},polygonEnd:function(){s.lineEnd=r,s.point=e},pointRadius:function(t){return a=t,s},result:y};return s}function ei(t){function e(t){return(s?i:n)(t)}function n(e){return ri(e,function(n,i){n=t(n,i),e.point(n[0],n[1])})}function i(e){function n(n,i){n=t(n,i),e.point(n[0],n[1])}function i(){b=0/0,_.point=o,e.lineStart()}function o(n,i){var o=gn([n,i]),a=t(n,i);r(b,x,y,w,$,k,b=a[0],x=a[1],y=n,w=o[0],$=o[1],k=o[2],s,e),e.point(b,x)}function a(){_.point=n,e.lineEnd()}function l(){i(),_.point=u,_.lineEnd=c}function u(t,e){o(d=t,h=e),f=b,p=x,g=w,m=$,v=k,_.point=o}function c(){r(b,x,y,w,$,k,f,p,d,g,m,v,s,e),_.lineEnd=a,a()}var d,h,f,p,g,m,v,y,b,x,w,$,k,_={point:n,lineStart:i,lineEnd:a,polygonStart:function(){e.polygonStart(),_.lineStart=l},polygonEnd:function(){e.polygonEnd(),_.lineStart=i}};return _}function r(e,n,i,s,l,u,c,d,h,f,p,g,m,v){var y=c-e,b=d-n,x=y*y+b*b;if(x>4*o&&m--){var w=s+f,$=l+p,k=u+g,_=Math.sqrt(w*w+$*$+k*k),C=Math.asin(k/=_),M=ms(ms(k)-1)<Is||ms(i-h)<Is?(i+h)/2:Math.atan2($,w),D=t(M,C),S=D[0],T=D[1],A=S-e,E=T-n,O=b*A-y*E;(O*O/x>o||ms((y*A+b*E)/x-.5)>.3||a>s*f+l*p+u*g)&&(r(e,n,i,s,l,u,S,T,M,w/=_,$/=_,k,m,v),v.point(S,T),r(S,T,M,w,$,k,c,d,h,f,p,g,m,v))}}var o=.5,a=Math.cos(30*zs),s=16;return e.precision=function(t){return arguments.length?(s=(o=t*t)>0&&16,e):Math.sqrt(o)},e}function ni(t){var e=ei(function(e,n){return t([e*Rs,n*Rs])});return function(t){return si(e(t))}}function ii(t){this.stream=t}function ri(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function oi(t){return ai(function(){return t})()}function ai(t){function e(t){return t=s(t[0]*zs,t[1]*zs),[t[0]*h+l,u-t[1]*h]}function n(t){return t=s.invert((t[0]-l)/h,(u-t[1])/h),t&&[t[0]*Rs,t[1]*Rs]}function i(){s=Sn(a=ci(v,y,b),o);var t=o(g,m);return l=f-t[0]*h,u=p+t[1]*h,r()}function r(){return c&&(c.valid=!1,c=null),e}var o,a,s,l,u,c,d=ei(function(t,e){return t=o(t,e),[t[0]*h+l,u-t[1]*h]}),h=150,f=480,p=250,g=0,m=0,v=0,y=0,b=0,x=Fl,w=Me,$=null,k=null;return e.stream=function(t){return c&&(c.valid=!1),c=si(x(a,d(w(t)))),c.valid=!0,c},e.clipAngle=function(t){return arguments.length?(x=null==t?($=t,Fl):Rn(($=+t)*zs),r()):$},e.clipExtent=function(t){return arguments.length?(k=t,w=t?qn(t[0][0],t[0][1],t[1][0],t[1][1]):Me,r()):k},e.scale=function(t){return arguments.length?(h=+t,i()):h},e.translate=function(t){return arguments.length?(f=+t[0],p=+t[1],i()):[f,p]},e.center=function(t){return arguments.length?(g=t[0]%360*zs,m=t[1]%360*zs,i()):[g*Rs,m*Rs]},e.rotate=function(t){return arguments.length?(v=t[0]%360*zs,y=t[1]%360*zs,b=t.length>2?t[2]%360*zs:0,i()):[v*Rs,y*Rs,b*Rs]},ns.rebind(e,d,"precision"),function(){return o=t.apply(this,arguments),e.invert=o.invert&&n,i()}}function si(t){return ri(t,function(e,n){t.point(e*zs,n*zs)})}function li(t,e){return[t,e]}function ui(t,e){return[t>Hs?t-Fs:-Hs>t?t+Fs:t,e]}function ci(t,e,n){return t?e||n?Sn(hi(t),fi(e,n)):hi(t):e||n?fi(e,n):ui}function di(t){return function(e,n){return e+=t,[e>Hs?e-Fs:-Hs>e?e+Fs:e,n]}}function hi(t){var e=di(t);return e.invert=di(-t),e}function fi(t,e){function n(t,e){var n=Math.cos(e),s=Math.cos(t)*n,l=Math.sin(t)*n,u=Math.sin(e),c=u*i+s*r;return[Math.atan2(l*o-c*a,s*i-u*r),te(c*o+l*a)]}var i=Math.cos(t),r=Math.sin(t),o=Math.cos(e),a=Math.sin(e);return n.invert=function(t,e){var n=Math.cos(e),s=Math.cos(t)*n,l=Math.sin(t)*n,u=Math.sin(e),c=u*o-l*a;return[Math.atan2(l*o+u*a,s*i+c*r),te(c*i-s*r)]},n}function pi(t,e){var n=Math.cos(t),i=Math.sin(t);return function(r,o,a,s){var l=a*e;null!=r?(r=gi(n,r),o=gi(n,o),(a>0?o>r:r>o)&&(r+=a*Fs)):(r=t+a*Fs,o=t-.5*l);for(var u,c=r;a>0?c>o:o>c;c-=l)s.point((u=wn([n,-i*Math.cos(c),-i*Math.sin(c)]))[0],u[1])}}function gi(t,e){var n=gn(e);n[0]-=t,xn(n);var i=J(-n[1]);return((-n[2]<0?-i:i)+2*Math.PI-Is)%(2*Math.PI)}function mi(t,e,n){var i=ns.range(t,e-Is,n).concat(e);return function(t){return i.map(function(e){return[t,e]})}}function vi(t,e,n){var i=ns.range(t,e-Is,n).concat(e);return function(t){return i.map(function(e){return[e,t]})}}function yi(t){return t.source}function bi(t){return t.target}function xi(t,e,n,i){var r=Math.cos(e),o=Math.sin(e),a=Math.cos(i),s=Math.sin(i),l=r*Math.cos(t),u=r*Math.sin(t),c=a*Math.cos(n),d=a*Math.sin(n),h=2*Math.asin(Math.sqrt(re(i-e)+r*a*re(n-t))),f=1/Math.sin(h),p=h?function(t){var e=Math.sin(t*=h)*f,n=Math.sin(h-t)*f,i=n*l+e*c,r=n*u+e*d,a=n*o+e*s;return[Math.atan2(r,i)*Rs,Math.atan2(a,Math.sqrt(i*i+r*r))*Rs]}:function(){return[t*Rs,e*Rs]};return p.distance=h,p}function wi(){function t(t,r){var o=Math.sin(r*=zs),a=Math.cos(r),s=ms((t*=zs)-e),l=Math.cos(s);Gl+=Math.atan2(Math.sqrt((s=a*Math.sin(s))*s+(s=i*o-n*a*l)*s),n*o+i*a*l),e=t,n=o,i=a}var e,n,i;Xl.point=function(r,o){e=r*zs,n=Math.sin(o*=zs),i=Math.cos(o),Xl.point=t},Xl.lineEnd=function(){Xl.point=Xl.lineEnd=y}}function $i(t,e){function n(e,n){var i=Math.cos(e),r=Math.cos(n),o=t(i*r);return[o*r*Math.sin(e),o*Math.sin(n)]}return n.invert=function(t,n){var i=Math.sqrt(t*t+n*n),r=e(i),o=Math.sin(r),a=Math.cos(r);return[Math.atan2(t*o,i*a),Math.asin(i&&n*o/i)]},n}function ki(t,e){function n(t,e){a>0?-Ls+Is>e&&(e=-Ls+Is):e>Ls-Is&&(e=Ls-Is);var n=a/Math.pow(r(e),o);return[n*Math.sin(o*t),a-n*Math.cos(o*t)]}var i=Math.cos(t),r=function(t){return Math.tan(Hs/4+t/2)},o=t===e?Math.sin(t):Math.log(i/Math.cos(e))/Math.log(r(e)/r(t)),a=i*Math.pow(r(t),o)/o;return o?(n.invert=function(t,e){var n=a-e,i=Z(o)*Math.sqrt(t*t+n*n);return[Math.atan2(t,n)/o,2*Math.atan(Math.pow(a/i,1/o))-Ls]},n):Ci}function _i(t,e){function n(t,e){var n=o-e;return[n*Math.sin(r*t),o-n*Math.cos(r*t)]}var i=Math.cos(t),r=t===e?Math.sin(t):(i-Math.cos(e))/(e-t),o=i/r+t;return ms(r)<Is?li:(n.invert=function(t,e){var n=o-e;return[Math.atan2(t,n)/r,o-Z(r)*Math.sqrt(t*t+n*n)]},n)}function Ci(t,e){return[t,Math.log(Math.tan(Hs/4+e/2))]}function Mi(t){var e,n=oi(t),i=n.scale,r=n.translate,o=n.clipExtent;return n.scale=function(){var t=i.apply(n,arguments);return t===n?e?n.clipExtent(null):n:t},n.translate=function(){var t=r.apply(n,arguments);return t===n?e?n.clipExtent(null):n:t},n.clipExtent=function(t){var a=o.apply(n,arguments);if(a===n){if(e=null==t){var s=Hs*i(),l=r();o([[l[0]-s,l[1]-s],[l[0]+s,l[1]+s]])}}else e&&(a=null);return a},n.clipExtent(null)}function Di(t,e){return[Math.log(Math.tan(Hs/4+e/2)),-t]}function Si(t){return t[0]}function Ti(t){return t[1]}function Ai(t){for(var e=t.length,n=[0,1],i=2,r=2;e>r;r++){for(;i>1&&Q(t[n[i-2]],t[n[i-1]],t[r])<=0;)--i;n[i++]=r}return n.slice(0,i)}function Ei(t,e){return t[0]-e[0]||t[1]-e[1]}function Oi(t,e,n){return(n[0]-e[0])*(t[1]-e[1])<(n[1]-e[1])*(t[0]-e[0])}function Ni(t,e,n,i){var r=t[0],o=n[0],a=e[0]-r,s=i[0]-o,l=t[1],u=n[1],c=e[1]-l,d=i[1]-u,h=(s*(l-u)-d*(r-o))/(d*a-s*c);return[r+h*a,l+h*c]}function Ii(t){var e=t[0],n=t[t.length-1];return!(e[0]-n[0]||e[1]-n[1])}function Pi(){nr(this),this.edge=this.site=this.circle=null}function Hi(t){var e=su.pop()||new Pi;return e.site=t,e}function Fi(t){Yi(t),ru.remove(t),su.push(t),nr(t)}function Wi(t){var e=t.circle,n=e.x,i=e.cy,r={x:n,y:i},o=t.P,a=t.N,s=[t];Fi(t);for(var l=o;l.circle&&ms(n-l.circle.x)<Is&&ms(i-l.circle.cy)<Is;)o=l.P,s.unshift(l),Fi(l),l=o;s.unshift(l),Yi(l);for(var u=a;u.circle&&ms(n-u.circle.x)<Is&&ms(i-u.circle.cy)<Is;)a=u.N,s.push(u),Fi(u),u=a;s.push(u),Yi(u);var c,d=s.length;for(c=1;d>c;++c)u=s[c],l=s[c-1],Ji(u.edge,l.site,u.site,r);l=s[0],u=s[d-1],u.edge=Zi(l.site,u.site,null,r),Ui(l),Ui(u)}function Li(t){for(var e,n,i,r,o=t.x,a=t.y,s=ru._;s;)if(i=zi(s,a)-o,i>Is)s=s.L;else{if(r=o-Ri(s,a),!(r>Is)){i>-Is?(e=s.P,n=s):r>-Is?(e=s,n=s.N):e=n=s;break}if(!s.R){e=s;break}s=s.R}var l=Hi(t);if(ru.insert(e,l),e||n){if(e===n)return Yi(e),n=Hi(e.site),ru.insert(l,n),l.edge=n.edge=Zi(e.site,l.site),Ui(e),void Ui(n);if(!n)return void(l.edge=Zi(e.site,l.site));Yi(e),Yi(n);var u=e.site,c=u.x,d=u.y,h=t.x-c,f=t.y-d,p=n.site,g=p.x-c,m=p.y-d,v=2*(h*m-f*g),y=h*h+f*f,b=g*g+m*m,x={x:(m*y-f*b)/v+c,y:(h*b-g*y)/v+d};Ji(n.edge,u,p,x),l.edge=Zi(u,t,null,x),n.edge=Zi(t,p,null,x),Ui(e),Ui(n)}}function zi(t,e){var n=t.site,i=n.x,r=n.y,o=r-e;if(!o)return i;var a=t.P;if(!a)return-1/0;n=a.site;var s=n.x,l=n.y,u=l-e;if(!u)return s;var c=s-i,d=1/o-1/u,h=c/u;return d?(-h+Math.sqrt(h*h-2*d*(c*c/(-2*u)-l+u/2+r-o/2)))/d+i:(i+s)/2}function Ri(t,e){var n=t.N;if(n)return zi(n,e);var i=t.site;return i.y===e?i.x:1/0}function ji(t){this.site=t,this.edges=[]}function qi(t){for(var e,n,i,r,o,a,s,l,u,c,d=t[0][0],h=t[1][0],f=t[0][1],p=t[1][1],g=iu,m=g.length;m--;)if(o=g[m],o&&o.prepare())for(s=o.edges,l=s.length,a=0;l>a;)c=s[a].end(),i=c.x,r=c.y,u=s[++a%l].start(),e=u.x,n=u.y,(ms(i-e)>Is||ms(r-n)>Is)&&(s.splice(a,0,new tr(Qi(o.site,c,ms(i-d)<Is&&p-r>Is?{x:d,y:ms(e-d)<Is?n:p}:ms(r-p)<Is&&h-i>Is?{x:ms(n-p)<Is?e:h,y:p}:ms(i-h)<Is&&r-f>Is?{x:h,y:ms(e-h)<Is?n:f}:ms(r-f)<Is&&i-d>Is?{x:ms(n-f)<Is?e:d,y:f}:null),o.site,null)),++l)}function Vi(t,e){return e.angle-t.angle}function Bi(){nr(this),this.x=this.y=this.arc=this.site=this.cy=null}function Ui(t){var e=t.P,n=t.N;if(e&&n){var i=e.site,r=t.site,o=n.site;if(i!==o){var a=r.x,s=r.y,l=i.x-a,u=i.y-s,c=o.x-a,d=o.y-s,h=2*(l*d-u*c);if(!(h>=-Ps)){var f=l*l+u*u,p=c*c+d*d,g=(d*f-u*p)/h,m=(l*p-c*f)/h,d=m+s,v=lu.pop()||new Bi;v.arc=t,v.site=r,v.x=g+a,v.y=d+Math.sqrt(g*g+m*m),v.cy=d,t.circle=v;for(var y=null,b=au._;b;)if(v.y<b.y||v.y===b.y&&v.x<=b.x){if(!b.L){y=b.P;break}b=b.L}else{if(!b.R){y=b;break}b=b.R}au.insert(y,v),y||(ou=v)}}}}function Yi(t){var e=t.circle;e&&(e.P||(ou=e.N),au.remove(e),lu.push(e),nr(e),t.circle=null)}function Gi(t){for(var e,n=nu,i=jn(t[0][0],t[0][1],t[1][0],t[1][1]),r=n.length;r--;)e=n[r],(!Xi(e,t)||!i(e)||ms(e.a.x-e.b.x)<Is&&ms(e.a.y-e.b.y)<Is)&&(e.a=e.b=null,n.splice(r,1))}function Xi(t,e){var n=t.b;if(n)return!0;var i,r,o=t.a,a=e[0][0],s=e[1][0],l=e[0][1],u=e[1][1],c=t.l,d=t.r,h=c.x,f=c.y,p=d.x,g=d.y,m=(h+p)/2,v=(f+g)/2;if(g===f){if(a>m||m>=s)return;if(h>p){if(o){if(o.y>=u)return}else o={x:m,y:l};n={x:m,y:u}}else{if(o){if(o.y<l)return}else o={x:m,y:u};n={x:m,y:l}}}else if(i=(h-p)/(g-f),r=v-i*m,-1>i||i>1)if(h>p){if(o){if(o.y>=u)return}else o={x:(l-r)/i,y:l};n={x:(u-r)/i,y:u}}else{if(o){if(o.y<l)return}else o={x:(u-r)/i,y:u};n={x:(l-r)/i,y:l}}else if(g>f){if(o){if(o.x>=s)return}else o={x:a,y:i*a+r};n={x:s,y:i*s+r}}else{if(o){if(o.x<a)return}else o={x:s,y:i*s+r};n={x:a,y:i*a+r}}return t.a=o,t.b=n,!0}function Ki(t,e){this.l=t,this.r=e,this.a=this.b=null}function Zi(t,e,n,i){var r=new Ki(t,e);return nu.push(r),n&&Ji(r,t,e,n),i&&Ji(r,e,t,i),iu[t.i].edges.push(new tr(r,t,e)),iu[e.i].edges.push(new tr(r,e,t)),r}function Qi(t,e,n){var i=new Ki(t,null);return i.a=e,i.b=n,nu.push(i),i}function Ji(t,e,n,i){t.a||t.b?t.l===n?t.b=i:t.a=i:(t.a=i,t.l=e,t.r=n)}function tr(t,e,n){var i=t.a,r=t.b;this.edge=t,this.site=e,this.angle=n?Math.atan2(n.y-e.y,n.x-e.x):t.l===e?Math.atan2(r.x-i.x,i.y-r.y):Math.atan2(i.x-r.x,r.y-i.y)}function er(){this._=null}function nr(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function ir(t,e){var n=e,i=e.R,r=n.U;r?r.L===n?r.L=i:r.R=i:t._=i,i.U=r,n.U=i,n.R=i.L,n.R&&(n.R.U=n),i.L=n}function rr(t,e){var n=e,i=e.L,r=n.U;r?r.L===n?r.L=i:r.R=i:t._=i,i.U=r,n.U=i,n.L=i.R,n.L&&(n.L.U=n),i.R=n}function or(t){for(;t.L;)t=t.L;return t}function ar(t,e){var n,i,r,o=t.sort(sr).pop();for(nu=[],iu=new Array(t.length),ru=new er,au=new er;;)if(r=ou,o&&(!r||o.y<r.y||o.y===r.y&&o.x<r.x))(o.x!==n||o.y!==i)&&(iu[o.i]=new ji(o),Li(o),n=o.x,i=o.y),o=t.pop();else{if(!r)break;Wi(r.arc)}e&&(Gi(e),qi(e));var a={cells:iu,edges:nu};return ru=au=nu=iu=null,a}function sr(t,e){return e.y-t.y||e.x-t.x}function lr(t,e,n){return(t.x-n.x)*(e.y-t.y)-(t.x-e.x)*(n.y-t.y)}function ur(t){return t.x}function cr(t){return t.y}function dr(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function hr(t,e,n,i,r,o){if(!t(e,n,i,r,o)){var a=.5*(n+r),s=.5*(i+o),l=e.nodes;l[0]&&hr(t,l[0],n,i,a,s),l[1]&&hr(t,l[1],a,i,r,s),l[2]&&hr(t,l[2],n,s,a,o),l[3]&&hr(t,l[3],a,s,r,o)}}function fr(t,e,n,i,r,o,a){var s,l=1/0;return function u(t,c,d,h,f){if(!(c>o||d>a||i>h||r>f)){if(p=t.point){var p,g=e-p[0],m=n-p[1],v=g*g+m*m;if(l>v){var y=Math.sqrt(l=v);i=e-y,r=n-y,o=e+y,a=n+y,s=p}}for(var b=t.nodes,x=.5*(c+h),w=.5*(d+f),$=e>=x,k=n>=w,_=k<<1|$,C=_+4;C>_;++_)if(t=b[3&_])switch(3&_){case 0:u(t,c,d,x,w);break;case 1:u(t,x,d,h,w);break;case 2:u(t,c,w,x,f);break;case 3:u(t,x,w,h,f)}}}(t,i,r,o,a),s}function pr(t,e){t=ns.rgb(t),e=ns.rgb(e);var n=t.r,i=t.g,r=t.b,o=e.r-n,a=e.g-i,s=e.b-r;return function(t){return"#"+be(Math.round(n+o*t))+be(Math.round(i+a*t))+be(Math.round(r+s*t))}}function gr(t,e){var n,i={},r={};for(n in t)n in e?i[n]=yr(t[n],e[n]):r[n]=t[n];for(n in e)n in t||(r[n]=e[n]);return function(t){for(n in i)r[n]=i[n](t);return r}}function mr(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function vr(t,e){var n,i,r,o=cu.lastIndex=du.lastIndex=0,a=-1,s=[],l=[];for(t+="",e+="";(n=cu.exec(t))&&(i=du.exec(e));)(r=i.index)>o&&(r=e.slice(o,r),s[a]?s[a]+=r:s[++a]=r),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:mr(n,i)})),o=du.lastIndex;return o<e.length&&(r=e.slice(o),s[a]?s[a]+=r:s[++a]=r),s.length<2?l[0]?(e=l[0].x,function(t){return e(t)+""}):function(){return e}:(e=l.length,function(t){for(var n,i=0;e>i;++i)s[(n=l[i]).i]=n.x(t);return s.join("")})}function yr(t,e){for(var n,i=ns.interpolators.length;--i>=0&&!(n=ns.interpolators[i](t,e)););return n}function br(t,e){var n,i=[],r=[],o=t.length,a=e.length,s=Math.min(t.length,e.length);for(n=0;s>n;++n)i.push(yr(t[n],e[n]));for(;o>n;++n)r[n]=t[n];for(;a>n;++n)r[n]=e[n];return function(t){for(n=0;s>n;++n)r[n]=i[n](t);return r}}function xr(t){return function(e){return 0>=e?0:e>=1?1:t(e)}}function wr(t){return function(e){return 1-t(1-e)}}function $r(t){return function(e){return.5*(.5>e?t(2*e):2-t(2-2*e))}}function kr(t){return t*t}function _r(t){return t*t*t}function Cr(t){if(0>=t)return 0;if(t>=1)return 1;var e=t*t,n=e*t;return 4*(.5>t?n:3*(t-e)+n-.75)}function Mr(t){return function(e){return Math.pow(e,t)}}function Dr(t){return 1-Math.cos(t*Ls)}function Sr(t){return Math.pow(2,10*(t-1))}function Tr(t){return 1-Math.sqrt(1-t*t)}function Ar(t,e){var n;return arguments.length<2&&(e=.45),arguments.length?n=e/Fs*Math.asin(1/t):(t=1,n=e/4),function(i){return 1+t*Math.pow(2,-10*i)*Math.sin((i-n)*Fs/e)}}function Er(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}}function Or(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function Nr(t,e){t=ns.hcl(t),e=ns.hcl(e);var n=t.h,i=t.c,r=t.l,o=e.h-n,a=e.c-i,s=e.l-r;return isNaN(a)&&(a=0,i=isNaN(i)?e.c:i),isNaN(o)?(o=0,n=isNaN(n)?e.h:n):o>180?o-=360:-180>o&&(o+=360),function(t){return ue(n+o*t,i+a*t,r+s*t)+""}}function Ir(t,e){t=ns.hsl(t),e=ns.hsl(e);var n=t.h,i=t.s,r=t.l,o=e.h-n,a=e.s-i,s=e.l-r;return isNaN(a)&&(a=0,i=isNaN(i)?e.s:i),isNaN(o)?(o=0,n=isNaN(n)?e.h:n):o>180?o-=360:-180>o&&(o+=360),function(t){return se(n+o*t,i+a*t,r+s*t)+""}}function Pr(t,e){t=ns.lab(t),e=ns.lab(e);var n=t.l,i=t.a,r=t.b,o=e.l-n,a=e.a-i,s=e.b-r;return function(t){return de(n+o*t,i+a*t,r+s*t)+""}}function Hr(t,e){return e-=t,function(n){return Math.round(t+e*n)}}function Fr(t){var e=[t.a,t.b],n=[t.c,t.d],i=Lr(e),r=Wr(e,n),o=Lr(zr(n,e,-r))||0;e[0]*n[1]<n[0]*e[1]&&(e[0]*=-1,e[1]*=-1,i*=-1,r*=-1),this.rotate=(i?Math.atan2(e[1],e[0]):Math.atan2(-n[0],n[1]))*Rs,this.translate=[t.e,t.f],this.scale=[i,o],this.skew=o?Math.atan2(r,o)*Rs:0}function Wr(t,e){return t[0]*e[0]+t[1]*e[1]}function Lr(t){var e=Math.sqrt(Wr(t,t));return e&&(t[0]/=e,t[1]/=e),e}function zr(t,e,n){return t[0]+=n*e[0],t[1]+=n*e[1],t}function Rr(t,e){var n,i=[],r=[],o=ns.transform(t),a=ns.transform(e),s=o.translate,l=a.translate,u=o.rotate,c=a.rotate,d=o.skew,h=a.skew,f=o.scale,p=a.scale;return s[0]!=l[0]||s[1]!=l[1]?(i.push("translate(",null,",",null,")"),r.push({i:1,x:mr(s[0],l[0])},{i:3,x:mr(s[1],l[1])})):i.push(l[0]||l[1]?"translate("+l+")":""),u!=c?(u-c>180?c+=360:c-u>180&&(u+=360),r.push({i:i.push(i.pop()+"rotate(",null,")")-2,x:mr(u,c)})):c&&i.push(i.pop()+"rotate("+c+")"),d!=h?r.push({i:i.push(i.pop()+"skewX(",null,")")-2,x:mr(d,h)}):h&&i.push(i.pop()+"skewX("+h+")"),f[0]!=p[0]||f[1]!=p[1]?(n=i.push(i.pop()+"scale(",null,",",null,")"),r.push({i:n-4,x:mr(f[0],p[0])},{i:n-2,x:mr(f[1],p[1])})):(1!=p[0]||1!=p[1])&&i.push(i.pop()+"scale("+p+")"),n=r.length,function(t){for(var e,o=-1;++o<n;)i[(e=r[o]).i]=e.x(t);return i.join("")}}function jr(t,e){return e=(e-=t=+t)||1/e,function(n){return(n-t)/e}}function qr(t,e){return e=(e-=t=+t)||1/e,function(n){return Math.max(0,Math.min(1,(n-t)/e))}}function Vr(t){for(var e=t.source,n=t.target,i=Ur(e,n),r=[e];e!==i;)e=e.parent,r.push(e);for(var o=r.length;n!==i;)r.splice(o,0,n),n=n.parent;return r}function Br(t){for(var e=[],n=t.parent;null!=n;)e.push(t),t=n,n=n.parent;return e.push(t),e}function Ur(t,e){if(t===e)return t;for(var n=Br(t),i=Br(e),r=n.pop(),o=i.pop(),a=null;r===o;)a=r,r=n.pop(),o=i.pop();return a}function Yr(t){t.fixed|=2}function Gr(t){t.fixed&=-7}function Xr(t){t.fixed|=4,t.px=t.x,t.py=t.y}function Kr(t){t.fixed&=-5}function Zr(t,e,n){var i=0,r=0;if(t.charge=0,!t.leaf)for(var o,a=t.nodes,s=a.length,l=-1;++l<s;)o=a[l],null!=o&&(Zr(o,e,n),t.charge+=o.charge,i+=o.charge*o.cx,r+=o.charge*o.cy);if(t.point){t.leaf||(t.point.x+=Math.random()-.5,t.point.y+=Math.random()-.5);var u=e*n[t.point.index];t.charge+=t.pointCharge=u,i+=u*t.point.x,r+=u*t.point.y}t.cx=i/t.charge,t.cy=r/t.charge}function Qr(t,e){return ns.rebind(t,e,"sort","children","value"),t.nodes=t,t.links=ro,t}function Jr(t,e){for(var n=[t];null!=(t=n.pop());)if(e(t),(r=t.children)&&(i=r.length))for(var i,r;--i>=0;)n.push(r[i])}function to(t,e){for(var n=[t],i=[];null!=(t=n.pop());)if(i.push(t),(o=t.children)&&(r=o.length))for(var r,o,a=-1;++a<r;)n.push(o[a]);for(;null!=(t=i.pop());)e(t)}function eo(t){return t.children}function no(t){return t.value}function io(t,e){return e.value-t.value}function ro(t){return ns.merge(t.map(function(t){return(t.children||[]).map(function(e){return{source:t,target:e}})}))}function oo(t){return t.x}function ao(t){return t.y}function so(t,e,n){t.y0=e,t.y=n}function lo(t){return ns.range(t.length)}function uo(t){for(var e=-1,n=t[0].length,i=[];++e<n;)i[e]=0;return i}function co(t){for(var e,n=1,i=0,r=t[0][1],o=t.length;o>n;++n)(e=t[n][1])>r&&(i=n,r=e);return i}function ho(t){return t.reduce(fo,0)}function fo(t,e){return t+e[1]}function po(t,e){return go(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function go(t,e){for(var n=-1,i=+t[0],r=(t[1]-i)/e,o=[];++n<=e;)o[n]=r*n+i;return o}function mo(t){return[ns.min(t),ns.max(t)]}function vo(t,e){return t.value-e.value}function yo(t,e){var n=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=n,n._pack_prev=e}function bo(t,e){t._pack_next=e,e._pack_prev=t}function xo(t,e){var n=e.x-t.x,i=e.y-t.y,r=t.r+e.r;return.999*r*r>n*n+i*i}function wo(t){function e(t){c=Math.min(t.x-t.r,c),d=Math.max(t.x+t.r,d),h=Math.min(t.y-t.r,h),f=Math.max(t.y+t.r,f)}if((n=t.children)&&(u=n.length)){var n,i,r,o,a,s,l,u,c=1/0,d=-1/0,h=1/0,f=-1/0;if(n.forEach($o),i=n[0],i.x=-i.r,i.y=0,e(i),u>1&&(r=n[1],r.x=r.r,r.y=0,e(r),u>2))for(o=n[2],Co(i,r,o),e(o),yo(i,o),i._pack_prev=o,yo(o,r),r=i._pack_next,a=3;u>a;a++){Co(i,r,o=n[a]);var p=0,g=1,m=1;for(s=r._pack_next;s!==r;s=s._pack_next,g++)if(xo(s,o)){p=1;break}if(1==p)for(l=i._pack_prev;l!==s._pack_prev&&!xo(l,o);l=l._pack_prev,m++);p?(m>g||g==m&&r.r<i.r?bo(i,r=s):bo(i=l,r),a--):(yo(i,o),r=o,e(o))}var v=(c+d)/2,y=(h+f)/2,b=0;for(a=0;u>a;a++)o=n[a],o.x-=v,o.y-=y,b=Math.max(b,o.r+Math.sqrt(o.x*o.x+o.y*o.y));t.r=b,n.forEach(ko)}}function $o(t){t._pack_next=t._pack_prev=t}function ko(t){delete t._pack_next,delete t._pack_prev}function _o(t,e,n,i){var r=t.children;if(t.x=e+=i*t.x,t.y=n+=i*t.y,t.r*=i,r)for(var o=-1,a=r.length;++o<a;)_o(r[o],e,n,i)}function Co(t,e,n){var i=t.r+n.r,r=e.x-t.x,o=e.y-t.y;if(i&&(r||o)){var a=e.r+n.r,s=r*r+o*o;a*=a,i*=i;var l=.5+(i-a)/(2*s),u=Math.sqrt(Math.max(0,2*a*(i+s)-(i-=s)*i-a*a))/(2*s);n.x=t.x+l*r+u*o,n.y=t.y+l*o-u*r}else n.x=t.x+i,n.y=t.y}function Mo(t,e){return t.parent==e.parent?1:2}function Do(t){var e=t.children;return e.length?e[0]:t.t}function So(t){var e,n=t.children;return(e=n.length)?n[e-1]:t.t}function To(t,e,n){var i=n/(e.i-t.i);e.c-=i,e.s+=n,t.c+=i,e.z+=n,e.m+=n}function Ao(t){for(var e,n=0,i=0,r=t.children,o=r.length;--o>=0;)e=r[o],e.z+=n,e.m+=n,n+=e.s+(i+=e.c)}function Eo(t,e,n){return t.a.parent===e.parent?t.a:n}function Oo(t){return 1+ns.max(t,function(t){return t.y})}function No(t){return t.reduce(function(t,e){return t+e.x},0)/t.length}function Io(t){var e=t.children;return e&&e.length?Io(e[0]):t}function Po(t){var e,n=t.children;return n&&(e=n.length)?Po(n[e-1]):t}function Ho(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function Fo(t,e){var n=t.x+e[3],i=t.y+e[0],r=t.dx-e[1]-e[3],o=t.dy-e[0]-e[2];return 0>r&&(n+=r/2,r=0),0>o&&(i+=o/2,o=0),{x:n,y:i,dx:r,dy:o}}function Wo(t){var e=t[0],n=t[t.length-1];return n>e?[e,n]:[n,e]}function Lo(t){return t.rangeExtent?t.rangeExtent():Wo(t.range())}function zo(t,e,n,i){var r=n(t[0],t[1]),o=i(e[0],e[1]);return function(t){return o(r(t))}}function Ro(t,e){var n,i=0,r=t.length-1,o=t[i],a=t[r];return o>a&&(n=i,i=r,r=n,n=o,o=a,a=n),t[i]=e.floor(o),t[r]=e.ceil(a),t}function jo(t){return t?{floor:function(e){return Math.floor(e/t)*t},ceil:function(e){return Math.ceil(e/t)*t}}:$u}function qo(t,e,n,i){var r=[],o=[],a=0,s=Math.min(t.length,e.length)-1;for(t[s]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<=s;)r.push(n(t[a-1],t[a])),o.push(i(e[a-1],e[a]));return function(e){var n=ns.bisect(t,e,1,s)-1;return o[n](r[n](e))}}function Vo(t,e,n,i){function r(){var r=Math.min(t.length,e.length)>2?qo:zo,l=i?qr:jr;return a=r(t,e,l,n),s=r(e,t,l,yr),o}function o(t){return a(t)}var a,s;return o.invert=function(t){return s(t)},o.domain=function(e){return arguments.length?(t=e.map(Number),r()):t},o.range=function(t){return arguments.length?(e=t,r()):e},o.rangeRound=function(t){return o.range(t).interpolate(Hr)},o.clamp=function(t){return arguments.length?(i=t,r()):i},o.interpolate=function(t){return arguments.length?(n=t,r()):n},o.ticks=function(e){return Go(t,e)},o.tickFormat=function(e,n){return Xo(t,e,n)},o.nice=function(e){return Uo(t,e),r()},o.copy=function(){return Vo(t,e,n,i)},r()}function Bo(t,e){return ns.rebind(t,e,"range","rangeRound","interpolate","clamp")}function Uo(t,e){return Ro(t,jo(Yo(t,e)[2]))}function Yo(t,e){null==e&&(e=10);var n=Wo(t),i=n[1]-n[0],r=Math.pow(10,Math.floor(Math.log(i/e)/Math.LN10)),o=e/i*r;return.15>=o?r*=10:.35>=o?r*=5:.75>=o&&(r*=2),n[0]=Math.ceil(n[0]/r)*r,n[1]=Math.floor(n[1]/r)*r+.5*r,n[2]=r,n}function Go(t,e){return ns.range.apply(ns,Yo(t,e))}function Xo(t,e,n){var i=Yo(t,e);if(n){var r=cl.exec(n);if(r.shift(),"s"===r[8]){var o=ns.formatPrefix(Math.max(ms(i[0]),ms(i[1])));return r[7]||(r[7]="."+Ko(o.scale(i[2]))),r[8]="f",n=ns.format(r.join("")),function(t){return n(o.scale(t))+o.symbol}}r[7]||(r[7]="."+Zo(r[8],i)),n=r.join("")}else n=",."+Ko(i[2])+"f";return ns.format(n)}function Ko(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function Zo(t,e){var n=Ko(e[2]);return t in ku?Math.abs(n-Ko(Math.max(ms(e[0]),ms(e[1]))))+ +("e"!==t):n-2*("%"===t)}function Qo(t,e,n,i){function r(t){return(n?Math.log(0>t?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function o(t){return n?Math.pow(e,t):-Math.pow(e,-t)}function a(e){return t(r(e))}return a.invert=function(e){return o(t.invert(e))},a.domain=function(e){return arguments.length?(n=e[0]>=0,t.domain((i=e.map(Number)).map(r)),a):i},a.base=function(n){return arguments.length?(e=+n,t.domain(i.map(r)),a):e},a.nice=function(){var e=Ro(i.map(r),n?Math:Cu);return t.domain(e),i=e.map(o),a},a.ticks=function(){var t=Wo(i),a=[],s=t[0],l=t[1],u=Math.floor(r(s)),c=Math.ceil(r(l)),d=e%1?2:e;if(isFinite(c-u)){if(n){for(;c>u;u++)for(var h=1;d>h;h++)a.push(o(u)*h);a.push(o(u))}else for(a.push(o(u));u++<c;)for(var h=d-1;h>0;h--)a.push(o(u)*h);for(u=0;a[u]<s;u++);for(c=a.length;a[c-1]>l;c--);a=a.slice(u,c)}return a},a.tickFormat=function(t,e){if(!arguments.length)return _u;arguments.length<2?e=_u:"function"!=typeof e&&(e=ns.format(e));var i,s=Math.max(.1,t/a.ticks().length),l=n?(i=1e-12,Math.ceil):(i=-1e-12,Math.floor);return function(t){return t/o(l(r(t)+i))<=s?e(t):""}},a.copy=function(){return Qo(t.copy(),e,n,i)},Bo(a,t)}function Jo(t,e,n){function i(e){return t(r(e))}var r=ta(e),o=ta(1/e);return i.invert=function(e){return o(t.invert(e))},i.domain=function(e){return arguments.length?(t.domain((n=e.map(Number)).map(r)),i):n},i.ticks=function(t){return Go(n,t)},i.tickFormat=function(t,e){return Xo(n,t,e)},i.nice=function(t){return i.domain(Uo(n,t))},i.exponent=function(a){return arguments.length?(r=ta(e=a),o=ta(1/e),t.domain(n.map(r)),i):e},i.copy=function(){return Jo(t.copy(),e,n)},Bo(i,t)}function ta(t){return function(e){return 0>e?-Math.pow(-e,t):Math.pow(e,t)}}function ea(t,e){function n(n){return o[((r.get(n)||("range"===e.t?r.set(n,t.push(n)):0/0))-1)%o.length]}function i(e,n){return ns.range(t.length).map(function(t){return e+n*t})}var r,o,a;return n.domain=function(i){if(!arguments.length)return t;t=[],r=new s;for(var o,a=-1,l=i.length;++a<l;)r.has(o=i[a])||r.set(o,t.push(o));return n[e.t].apply(n,e.a)},n.range=function(t){return arguments.length?(o=t,a=0,e={t:"range",a:arguments},n):o},n.rangePoints=function(r,s){arguments.length<2&&(s=0);var l=r[0],u=r[1],c=t.length<2?(l=(l+u)/2,0):(u-l)/(t.length-1+s);return o=i(l+c*s/2,c),a=0,e={t:"rangePoints",a:arguments},n},n.rangeRoundPoints=function(r,s){arguments.length<2&&(s=0);var l=r[0],u=r[1],c=t.length<2?(l=u=Math.round((l+u)/2),0):(u-l)/(t.length-1+s)|0;return o=i(l+Math.round(c*s/2+(u-l-(t.length-1+s)*c)/2),c),a=0,e={t:"rangeRoundPoints",a:arguments},n},n.rangeBands=function(r,s,l){arguments.length<2&&(s=0),arguments.length<3&&(l=s);var u=r[1]<r[0],c=r[u-0],d=r[1-u],h=(d-c)/(t.length-s+2*l);return o=i(c+h*l,h),u&&o.reverse(),a=h*(1-s),e={t:"rangeBands",a:arguments},n},n.rangeRoundBands=function(r,s,l){arguments.length<2&&(s=0),arguments.length<3&&(l=s);var u=r[1]<r[0],c=r[u-0],d=r[1-u],h=Math.floor((d-c)/(t.length-s+2*l));return o=i(c+Math.round((d-c-(t.length-s)*h)/2),h),u&&o.reverse(),a=Math.round(h*(1-s)),e={t:"rangeRoundBands",a:arguments},n},n.rangeBand=function(){return a},n.rangeExtent=function(){return Wo(e.a[0])},n.copy=function(){return ea(t,e)},n.domain(t)}function na(i,r){function o(){var t=0,e=r.length;for(s=[];++t<e;)s[t-1]=ns.quantile(i,t/e);return a}function a(t){return isNaN(t=+t)?void 0:r[ns.bisect(s,t)]}var s;return a.domain=function(r){return arguments.length?(i=r.map(e).filter(n).sort(t),o()):i},a.range=function(t){return arguments.length?(r=t,o()):r},a.quantiles=function(){return s},a.invertExtent=function(t){return t=r.indexOf(t),0>t?[0/0,0/0]:[t>0?s[t-1]:i[0],t<s.length?s[t]:i[i.length-1]]},a.copy=function(){return na(i,r)},o()}function ia(t,e,n){function i(e){return n[Math.max(0,Math.min(a,Math.floor(o*(e-t))))]}function r(){return o=n.length/(e-t),a=n.length-1,i}var o,a;return i.domain=function(n){return arguments.length?(t=+n[0],e=+n[n.length-1],r()):[t,e]},i.range=function(t){return arguments.length?(n=t,r()):n},i.invertExtent=function(e){return e=n.indexOf(e),e=0>e?0/0:e/o+t,[e,e+1/o]},i.copy=function(){return ia(t,e,n)},r()}function ra(t,e){function n(n){return n>=n?e[ns.bisect(t,n)]:void 0}return n.domain=function(e){return arguments.length?(t=e,n):t},n.range=function(t){return arguments.length?(e=t,n):e},n.invertExtent=function(n){return n=e.indexOf(n),[t[n-1],t[n]]},n.copy=function(){return ra(t,e)},n}function oa(t){function e(t){return+t}return e.invert=e,e.domain=e.range=function(n){return arguments.length?(t=n.map(e),e):t},e.ticks=function(e){return Go(t,e)},e.tickFormat=function(e,n){return Xo(t,e,n)},e.copy=function(){return oa(t)},e}function aa(){return 0}function sa(t){return t.innerRadius}function la(t){return t.outerRadius}function ua(t){return t.startAngle}function ca(t){return t.endAngle}function da(t){return t&&t.padAngle}function ha(t,e,n,i){return(t-n)*e-(e-i)*t>0?0:1}function fa(t,e,n,i,r){var o=t[0]-e[0],a=t[1]-e[1],s=(r?i:-i)/Math.sqrt(o*o+a*a),l=s*a,u=-s*o,c=t[0]+l,d=t[1]+u,h=e[0]+l,f=e[1]+u,p=(c+h)/2,g=(d+f)/2,m=h-c,v=f-d,y=m*m+v*v,b=n-i,x=c*f-h*d,w=(0>v?-1:1)*Math.sqrt(b*b*y-x*x),$=(x*v-m*w)/y,k=(-x*m-v*w)/y,_=(x*v+m*w)/y,C=(-x*m+v*w)/y,M=$-p,D=k-g,S=_-p,T=C-g;return M*M+D*D>S*S+T*T&&($=_,k=C),[[$-l,k-u],[$*n/b,k*n/b]]}function pa(t){function e(e){function a(){u.push("M",o(t(c),s))}for(var l,u=[],c=[],d=-1,h=e.length,f=Ce(n),p=Ce(i);++d<h;)r.call(this,l=e[d],d)?c.push([+f.call(this,l,d),+p.call(this,l,d)]):c.length&&(a(),c=[]);return c.length&&a(),u.length?u.join(""):null}var n=Si,i=Ti,r=Tn,o=ga,a=o.key,s=.7;return e.x=function(t){return arguments.length?(n=t,e):n},e.y=function(t){return arguments.length?(i=t,e):i},e.defined=function(t){return arguments.length?(r=t,e):r},e.interpolate=function(t){return arguments.length?(a="function"==typeof t?o=t:(o=Eu.get(t)||ga).key,e):a},e.tension=function(t){return arguments.length?(s=t,e):s},e}function ga(t){return t.join("L")}function ma(t){return ga(t)+"Z"}function va(t){for(var e=0,n=t.length,i=t[0],r=[i[0],",",i[1]];++e<n;)r.push("H",(i[0]+(i=t[e])[0])/2,"V",i[1]);return n>1&&r.push("H",i[0]),r.join("")}function ya(t){for(var e=0,n=t.length,i=t[0],r=[i[0],",",i[1]];++e<n;)r.push("V",(i=t[e])[1],"H",i[0]);return r.join("")}function ba(t){for(var e=0,n=t.length,i=t[0],r=[i[0],",",i[1]];++e<n;)r.push("H",(i=t[e])[0],"V",i[1]);return r.join("")}function xa(t,e){return t.length<4?ga(t):t[1]+ka(t.slice(1,-1),_a(t,e))}function wa(t,e){return t.length<3?ga(t):t[0]+ka((t.push(t[0]),t),_a([t[t.length-2]].concat(t,[t[1]]),e))}function $a(t,e){return t.length<3?ga(t):t[0]+ka(t,_a(t,e))}function ka(t,e){if(e.length<1||t.length!=e.length&&t.length!=e.length+2)return ga(t);var n=t.length!=e.length,i="",r=t[0],o=t[1],a=e[0],s=a,l=1;if(n&&(i+="Q"+(o[0]-2*a[0]/3)+","+(o[1]-2*a[1]/3)+","+o[0]+","+o[1],r=t[1],l=2),e.length>1){s=e[1],o=t[l],l++,i+="C"+(r[0]+a[0])+","+(r[1]+a[1])+","+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1];for(var u=2;u<e.length;u++,l++)o=t[l],s=e[u],i+="S"+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1]}if(n){var c=t[l];i+="Q"+(o[0]+2*s[0]/3)+","+(o[1]+2*s[1]/3)+","+c[0]+","+c[1]}return i}function _a(t,e){for(var n,i=[],r=(1-e)/2,o=t[0],a=t[1],s=1,l=t.length;++s<l;)n=o,o=a,a=t[s],i.push([r*(a[0]-n[0]),r*(a[1]-n[1])]);return i}function Ca(t){if(t.length<3)return ga(t);
var e=1,n=t.length,i=t[0],r=i[0],o=i[1],a=[r,r,r,(i=t[1])[0]],s=[o,o,o,i[1]],l=[r,",",o,"L",Ta(Iu,a),",",Ta(Iu,s)];for(t.push(t[n-1]);++e<=n;)i=t[e],a.shift(),a.push(i[0]),s.shift(),s.push(i[1]),Aa(l,a,s);return t.pop(),l.push("L",i),l.join("")}function Ma(t){if(t.length<4)return ga(t);for(var e,n=[],i=-1,r=t.length,o=[0],a=[0];++i<3;)e=t[i],o.push(e[0]),a.push(e[1]);for(n.push(Ta(Iu,o)+","+Ta(Iu,a)),--i;++i<r;)e=t[i],o.shift(),o.push(e[0]),a.shift(),a.push(e[1]),Aa(n,o,a);return n.join("")}function Da(t){for(var e,n,i=-1,r=t.length,o=r+4,a=[],s=[];++i<4;)n=t[i%r],a.push(n[0]),s.push(n[1]);for(e=[Ta(Iu,a),",",Ta(Iu,s)],--i;++i<o;)n=t[i%r],a.shift(),a.push(n[0]),s.shift(),s.push(n[1]),Aa(e,a,s);return e.join("")}function Sa(t,e){var n=t.length-1;if(n)for(var i,r,o=t[0][0],a=t[0][1],s=t[n][0]-o,l=t[n][1]-a,u=-1;++u<=n;)i=t[u],r=u/n,i[0]=e*i[0]+(1-e)*(o+r*s),i[1]=e*i[1]+(1-e)*(a+r*l);return Ca(t)}function Ta(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function Aa(t,e,n){t.push("C",Ta(Ou,e),",",Ta(Ou,n),",",Ta(Nu,e),",",Ta(Nu,n),",",Ta(Iu,e),",",Ta(Iu,n))}function Ea(t,e){return(e[1]-t[1])/(e[0]-t[0])}function Oa(t){for(var e=0,n=t.length-1,i=[],r=t[0],o=t[1],a=i[0]=Ea(r,o);++e<n;)i[e]=(a+(a=Ea(r=o,o=t[e+1])))/2;return i[e]=a,i}function Na(t){for(var e,n,i,r,o=[],a=Oa(t),s=-1,l=t.length-1;++s<l;)e=Ea(t[s],t[s+1]),ms(e)<Is?a[s]=a[s+1]=0:(n=a[s]/e,i=a[s+1]/e,r=n*n+i*i,r>9&&(r=3*e/Math.sqrt(r),a[s]=r*n,a[s+1]=r*i));for(s=-1;++s<=l;)r=(t[Math.min(l,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+a[s]*a[s])),o.push([r||0,a[s]*r||0]);return o}function Ia(t){return t.length<3?ga(t):t[0]+ka(t,Na(t))}function Pa(t){for(var e,n,i,r=-1,o=t.length;++r<o;)e=t[r],n=e[0],i=e[1]-Ls,e[0]=n*Math.cos(i),e[1]=n*Math.sin(i);return t}function Ha(t){function e(e){function l(){g.push("M",s(t(v),d),c,u(t(m.reverse()),d),"Z")}for(var h,f,p,g=[],m=[],v=[],y=-1,b=e.length,x=Ce(n),w=Ce(r),$=n===i?function(){return f}:Ce(i),k=r===o?function(){return p}:Ce(o);++y<b;)a.call(this,h=e[y],y)?(m.push([f=+x.call(this,h,y),p=+w.call(this,h,y)]),v.push([+$.call(this,h,y),+k.call(this,h,y)])):m.length&&(l(),m=[],v=[]);return m.length&&l(),g.length?g.join(""):null}var n=Si,i=Si,r=0,o=Ti,a=Tn,s=ga,l=s.key,u=s,c="L",d=.7;return e.x=function(t){return arguments.length?(n=i=t,e):i},e.x0=function(t){return arguments.length?(n=t,e):n},e.x1=function(t){return arguments.length?(i=t,e):i},e.y=function(t){return arguments.length?(r=o=t,e):o},e.y0=function(t){return arguments.length?(r=t,e):r},e.y1=function(t){return arguments.length?(o=t,e):o},e.defined=function(t){return arguments.length?(a=t,e):a},e.interpolate=function(t){return arguments.length?(l="function"==typeof t?s=t:(s=Eu.get(t)||ga).key,u=s.reverse||s,c=s.closed?"M":"L",e):l},e.tension=function(t){return arguments.length?(d=t,e):d},e}function Fa(t){return t.radius}function Wa(t){return[t.x,t.y]}function La(t){return function(){var e=t.apply(this,arguments),n=e[0],i=e[1]-Ls;return[n*Math.cos(i),n*Math.sin(i)]}}function za(){return 64}function Ra(){return"circle"}function ja(t){var e=Math.sqrt(t/Hs);return"M0,"+e+"A"+e+","+e+" 0 1,1 0,"+-e+"A"+e+","+e+" 0 1,1 0,"+e+"Z"}function qa(t){return function(){var e,n;(e=this[t])&&(n=e[e.active])&&(--e.count?delete e[e.active]:delete this[t],e.active+=.5,n.event&&n.event.interrupt.call(this,this.__data__,n.index))}}function Va(t,e,n){return ws(t,Ru),t.namespace=e,t.id=n,t}function Ba(t,e,n,i){var r=t.id,o=t.namespace;return z(t,"function"==typeof n?function(t,a,s){t[o][r].tween.set(e,i(n.call(t,t.__data__,a,s)))}:(n=i(n),function(t){t[o][r].tween.set(e,n)}))}function Ua(t){return null==t&&(t=""),function(){this.textContent=t}}function Ya(t){return null==t?"__transition__":"__transition_"+t+"__"}function Ga(t,e,n,i,r){var o=t[n]||(t[n]={active:0,count:0}),a=o[i];if(!a){var l=r.time;a=o[i]={tween:new s,time:l,delay:r.delay,duration:r.duration,ease:r.ease,index:e},r=null,++o.count,ns.timer(function(r){function s(n){if(o.active>i)return c();var r=o[o.active];r&&(--o.count,delete o[o.active],r.event&&r.event.interrupt.call(t,t.__data__,r.index)),o.active=i,a.event&&a.event.start.call(t,t.__data__,e),a.tween.forEach(function(n,i){(i=i.call(t,t.__data__,e))&&g.push(i)}),h=a.ease,d=a.duration,ns.timer(function(){return p.c=u(n||1)?Tn:u,1},0,l)}function u(n){if(o.active!==i)return 1;for(var r=n/d,s=h(r),l=g.length;l>0;)g[--l].call(t,s);return r>=1?(a.event&&a.event.end.call(t,t.__data__,e),c()):void 0}function c(){return--o.count?delete o[i]:delete t[n],1}var d,h,f=a.delay,p=sl,g=[];return p.t=f+l,r>=f?s(r-f):void(p.c=s)},0,l)}}function Xa(t,e,n){t.attr("transform",function(t){var i=e(t);return"translate("+(isFinite(i)?i:n(t))+",0)"})}function Ka(t,e,n){t.attr("transform",function(t){var i=e(t);return"translate(0,"+(isFinite(i)?i:n(t))+")"})}function Za(t){return t.toISOString()}function Qa(t,e,n){function i(e){return t(e)}function r(t,n){var i=t[1]-t[0],r=i/n,o=ns.bisect(Ku,r);return o==Ku.length?[e.year,Yo(t.map(function(t){return t/31536e6}),n)[2]]:o?e[r/Ku[o-1]<Ku[o]/r?o-1:o]:[Ju,Yo(t,n)[2]]}return i.invert=function(e){return Ja(t.invert(e))},i.domain=function(e){return arguments.length?(t.domain(e),i):t.domain().map(Ja)},i.nice=function(t,e){function n(n){return!isNaN(n)&&!t.range(n,Ja(+n+1),e).length}var o=i.domain(),a=Wo(o),s=null==t?r(a,10):"number"==typeof t&&r(a,t);return s&&(t=s[0],e=s[1]),i.domain(Ro(o,e>1?{floor:function(e){for(;n(e=t.floor(e));)e=Ja(e-1);return e},ceil:function(e){for(;n(e=t.ceil(e));)e=Ja(+e+1);return e}}:t))},i.ticks=function(t,e){var n=Wo(i.domain()),o=null==t?r(n,10):"number"==typeof t?r(n,t):!t.range&&[{range:t},e];return o&&(t=o[0],e=o[1]),t.range(n[0],Ja(+n[1]+1),1>e?1:e)},i.tickFormat=function(){return n},i.copy=function(){return Qa(t.copy(),e,n)},Bo(i,t)}function Ja(t){return new Date(t)}function ts(t){return JSON.parse(t.responseText)}function es(t){var e=os.createRange();return e.selectNode(os.body),e.createContextualFragment(t.responseText)}var ns={version:"3.5.3"};Date.now||(Date.now=function(){return+new Date});var is=[].slice,rs=function(t){return is.call(t)},os=document,as=os.documentElement,ss=window;try{rs(as.childNodes)[0].nodeType}catch(ls){rs=function(t){for(var e=t.length,n=new Array(e);e--;)n[e]=t[e];return n}}try{os.createElement("div").style.setProperty("opacity",0,"")}catch(us){var cs=ss.Element.prototype,ds=cs.setAttribute,hs=cs.setAttributeNS,fs=ss.CSSStyleDeclaration.prototype,ps=fs.setProperty;cs.setAttribute=function(t,e){ds.call(this,t,e+"")},cs.setAttributeNS=function(t,e,n){hs.call(this,t,e,n+"")},fs.setProperty=function(t,e,n){ps.call(this,t,e+"",n)}}ns.ascending=t,ns.descending=function(t,e){return t>e?-1:e>t?1:e>=t?0:0/0},ns.min=function(t,e){var n,i,r=-1,o=t.length;if(1===arguments.length){for(;++r<o;)if(null!=(i=t[r])&&i>=i){n=i;break}for(;++r<o;)null!=(i=t[r])&&n>i&&(n=i)}else{for(;++r<o;)if(null!=(i=e.call(t,t[r],r))&&i>=i){n=i;break}for(;++r<o;)null!=(i=e.call(t,t[r],r))&&n>i&&(n=i)}return n},ns.max=function(t,e){var n,i,r=-1,o=t.length;if(1===arguments.length){for(;++r<o;)if(null!=(i=t[r])&&i>=i){n=i;break}for(;++r<o;)null!=(i=t[r])&&i>n&&(n=i)}else{for(;++r<o;)if(null!=(i=e.call(t,t[r],r))&&i>=i){n=i;break}for(;++r<o;)null!=(i=e.call(t,t[r],r))&&i>n&&(n=i)}return n},ns.extent=function(t,e){var n,i,r,o=-1,a=t.length;if(1===arguments.length){for(;++o<a;)if(null!=(i=t[o])&&i>=i){n=r=i;break}for(;++o<a;)null!=(i=t[o])&&(n>i&&(n=i),i>r&&(r=i))}else{for(;++o<a;)if(null!=(i=e.call(t,t[o],o))&&i>=i){n=r=i;break}for(;++o<a;)null!=(i=e.call(t,t[o],o))&&(n>i&&(n=i),i>r&&(r=i))}return[n,r]},ns.sum=function(t,e){var i,r=0,o=t.length,a=-1;if(1===arguments.length)for(;++a<o;)n(i=+t[a])&&(r+=i);else for(;++a<o;)n(i=+e.call(t,t[a],a))&&(r+=i);return r},ns.mean=function(t,i){var r,o=0,a=t.length,s=-1,l=a;if(1===arguments.length)for(;++s<a;)n(r=e(t[s]))?o+=r:--l;else for(;++s<a;)n(r=e(i.call(t,t[s],s)))?o+=r:--l;return l?o/l:void 0},ns.quantile=function(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),r=+t[i-1],o=n-i;return o?r+o*(t[i]-r):r},ns.median=function(i,r){var o,a=[],s=i.length,l=-1;if(1===arguments.length)for(;++l<s;)n(o=e(i[l]))&&a.push(o);else for(;++l<s;)n(o=e(r.call(i,i[l],l)))&&a.push(o);return a.length?ns.quantile(a.sort(t),.5):void 0},ns.variance=function(t,i){var r,o,a=t.length,s=0,l=0,u=-1,c=0;if(1===arguments.length)for(;++u<a;)n(r=e(t[u]))&&(o=r-s,s+=o/++c,l+=o*(r-s));else for(;++u<a;)n(r=e(i.call(t,t[u],u)))&&(o=r-s,s+=o/++c,l+=o*(r-s));return c>1?l/(c-1):void 0},ns.deviation=function(){var t=ns.variance.apply(this,arguments);return t?Math.sqrt(t):t};var gs=i(t);ns.bisectLeft=gs.left,ns.bisect=ns.bisectRight=gs.right,ns.bisector=function(e){return i(1===e.length?function(n,i){return t(e(n),i)}:e)},ns.shuffle=function(t,e,n){(o=arguments.length)<3&&(n=t.length,2>o&&(e=0));for(var i,r,o=n-e;o;)r=Math.random()*o--|0,i=t[o+e],t[o+e]=t[r+e],t[r+e]=i;return t},ns.permute=function(t,e){for(var n=e.length,i=new Array(n);n--;)i[n]=t[e[n]];return i},ns.pairs=function(t){for(var e,n=0,i=t.length-1,r=t[0],o=new Array(0>i?0:i);i>n;)o[n]=[e=r,r=t[++n]];return o},ns.zip=function(){if(!(i=arguments.length))return[];for(var t=-1,e=ns.min(arguments,r),n=new Array(e);++t<e;)for(var i,o=-1,a=n[t]=new Array(i);++o<i;)a[o]=arguments[o][t];return n},ns.transpose=function(t){return ns.zip.apply(ns,t)},ns.keys=function(t){var e=[];for(var n in t)e.push(n);return e},ns.values=function(t){var e=[];for(var n in t)e.push(t[n]);return e},ns.entries=function(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e},ns.merge=function(t){for(var e,n,i,r=t.length,o=-1,a=0;++o<r;)a+=t[o].length;for(n=new Array(a);--r>=0;)for(i=t[r],e=i.length;--e>=0;)n[--a]=i[e];return n};var ms=Math.abs;ns.range=function(t,e,n){if(arguments.length<3&&(n=1,arguments.length<2&&(e=t,t=0)),(e-t)/n===1/0)throw new Error("infinite range");var i,r=[],a=o(ms(n)),s=-1;if(t*=a,e*=a,n*=a,0>n)for(;(i=t+n*++s)>e;)r.push(i/a);else for(;(i=t+n*++s)<e;)r.push(i/a);return r},ns.map=function(t,e){var n=new s;if(t instanceof s)t.forEach(function(t,e){n.set(t,e)});else if(Array.isArray(t)){var i,r=-1,o=t.length;if(1===arguments.length)for(;++r<o;)n.set(r,t[r]);else for(;++r<o;)n.set(e.call(t,i=t[r],r),i)}else for(var a in t)n.set(a,t[a]);return n};var vs="__proto__",ys="\x00";a(s,{has:c,get:function(t){return this._[l(t)]},set:function(t,e){return this._[l(t)]=e},remove:d,keys:h,values:function(){var t=[];for(var e in this._)t.push(this._[e]);return t},entries:function(){var t=[];for(var e in this._)t.push({key:u(e),value:this._[e]});return t},size:f,empty:p,forEach:function(t){for(var e in this._)t.call(this,u(e),this._[e])}}),ns.nest=function(){function t(e,a,l){if(l>=o.length)return i?i.call(r,a):n?a.sort(n):a;for(var u,c,d,h,f=-1,p=a.length,g=o[l++],m=new s;++f<p;)(h=m.get(u=g(c=a[f])))?h.push(c):m.set(u,[c]);return e?(c=e(),d=function(n,i){c.set(n,t(e,i,l))}):(c={},d=function(n,i){c[n]=t(e,i,l)}),m.forEach(d),c}function e(t,n){if(n>=o.length)return t;var i=[],r=a[n++];return t.forEach(function(t,r){i.push({key:t,values:e(r,n)})}),r?i.sort(function(t,e){return r(t.key,e.key)}):i}var n,i,r={},o=[],a=[];return r.map=function(e,n){return t(n,e,0)},r.entries=function(n){return e(t(ns.map,n,0),0)},r.key=function(t){return o.push(t),r},r.sortKeys=function(t){return a[o.length-1]=t,r},r.sortValues=function(t){return n=t,r},r.rollup=function(t){return i=t,r},r},ns.set=function(t){var e=new g;if(t)for(var n=0,i=t.length;i>n;++n)e.add(t[n]);return e},a(g,{has:c,add:function(t){return this._[l(t+="")]=!0,t},remove:d,values:h,size:f,empty:p,forEach:function(t){for(var e in this._)t.call(this,u(e))}}),ns.behavior={},ns.rebind=function(t,e){for(var n,i=1,r=arguments.length;++i<r;)t[n=arguments[i]]=m(t,e,e[n]);return t};var bs=["webkit","ms","moz","Moz","o","O"];ns.dispatch=function(){for(var t=new b,e=-1,n=arguments.length;++e<n;)t[arguments[e]]=x(t);return t},b.prototype.on=function(t,e){var n=t.indexOf("."),i="";if(n>=0&&(i=t.slice(n+1),t=t.slice(0,n)),t)return arguments.length<2?this[t].on(i):this[t].on(i,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(i,null);return this}},ns.event=null,ns.requote=function(t){return t.replace(xs,"\\$&")};var xs=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,ws={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)t[n]=e[n]},$s=function(t,e){return e.querySelector(t)},ks=function(t,e){return e.querySelectorAll(t)},_s=as.matches||as[v(as,"matchesSelector")],Cs=function(t,e){return _s.call(t,e)};"function"==typeof Sizzle&&($s=function(t,e){return Sizzle(t,e)[0]||null},ks=Sizzle,Cs=Sizzle.matchesSelector),ns.selection=function(){return Ts};var Ms=ns.selection.prototype=[];Ms.select=function(t){var e,n,i,r,o=[];t=C(t);for(var a=-1,s=this.length;++a<s;){o.push(e=[]),e.parentNode=(i=this[a]).parentNode;for(var l=-1,u=i.length;++l<u;)(r=i[l])?(e.push(n=t.call(r,r.__data__,l,a)),n&&"__data__"in r&&(n.__data__=r.__data__)):e.push(null)}return _(o)},Ms.selectAll=function(t){var e,n,i=[];t=M(t);for(var r=-1,o=this.length;++r<o;)for(var a=this[r],s=-1,l=a.length;++s<l;)(n=a[s])&&(i.push(e=rs(t.call(n,n.__data__,s,r))),e.parentNode=n);return _(i)};var Ds={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/"};ns.ns={prefix:Ds,qualify:function(t){var e=t.indexOf(":"),n=t;return e>=0&&(n=t.slice(0,e),t=t.slice(e+1)),Ds.hasOwnProperty(n)?{space:Ds[n],local:t}:t}},Ms.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node();return t=ns.ns.qualify(t),t.local?n.getAttributeNS(t.space,t.local):n.getAttribute(t)}for(e in t)this.each(D(e,t[e]));return this}return this.each(D(t,e))},Ms.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node(),i=(t=A(t)).length,r=-1;if(e=n.classList){for(;++r<i;)if(!e.contains(t[r]))return!1}else for(e=n.getAttribute("class");++r<i;)if(!T(t[r]).test(e))return!1;return!0}for(e in t)this.each(E(e,t[e]));return this}return this.each(E(t,e))},Ms.style=function(t,e,n){var i=arguments.length;if(3>i){if("string"!=typeof t){2>i&&(e="");for(n in t)this.each(N(n,t[n],e));return this}if(2>i)return ss.getComputedStyle(this.node(),null).getPropertyValue(t);n=""}return this.each(N(t,e,n))},Ms.property=function(t,e){if(arguments.length<2){if("string"==typeof t)return this.node()[t];for(e in t)this.each(I(e,t[e]));return this}return this.each(I(t,e))},Ms.text=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}:null==t?function(){this.textContent=""}:function(){this.textContent=t}):this.node().textContent},Ms.html=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}:null==t?function(){this.innerHTML=""}:function(){this.innerHTML=t}):this.node().innerHTML},Ms.append=function(t){return t=P(t),this.select(function(){return this.appendChild(t.apply(this,arguments))})},Ms.insert=function(t,e){return t=P(t),e=C(e),this.select(function(){return this.insertBefore(t.apply(this,arguments),e.apply(this,arguments)||null)})},Ms.remove=function(){return this.each(H)},Ms.data=function(t,e){function n(t,n){var i,r,o,a=t.length,d=n.length,h=Math.min(a,d),f=new Array(d),p=new Array(d),g=new Array(a);if(e){var m,v=new s,y=new Array(a);for(i=-1;++i<a;)v.has(m=e.call(r=t[i],r.__data__,i))?g[i]=r:v.set(m,r),y[i]=m;for(i=-1;++i<d;)(r=v.get(m=e.call(n,o=n[i],i)))?r!==!0&&(f[i]=r,r.__data__=o):p[i]=F(o),v.set(m,!0);for(i=-1;++i<a;)v.get(y[i])!==!0&&(g[i]=t[i])}else{for(i=-1;++i<h;)r=t[i],o=n[i],r?(r.__data__=o,f[i]=r):p[i]=F(o);for(;d>i;++i)p[i]=F(n[i]);for(;a>i;++i)g[i]=t[i]}p.update=f,p.parentNode=f.parentNode=g.parentNode=t.parentNode,l.push(p),u.push(f),c.push(g)}var i,r,o=-1,a=this.length;if(!arguments.length){for(t=new Array(a=(i=this[0]).length);++o<a;)(r=i[o])&&(t[o]=r.__data__);return t}var l=R([]),u=_([]),c=_([]);if("function"==typeof t)for(;++o<a;)n(i=this[o],t.call(i,i.parentNode.__data__,o));else for(;++o<a;)n(i=this[o],t);return u.enter=function(){return l},u.exit=function(){return c},u},Ms.datum=function(t){return arguments.length?this.property("__data__",t):this.property("__data__")},Ms.filter=function(t){var e,n,i,r=[];"function"!=typeof t&&(t=W(t));for(var o=0,a=this.length;a>o;o++){r.push(e=[]),e.parentNode=(n=this[o]).parentNode;for(var s=0,l=n.length;l>s;s++)(i=n[s])&&t.call(i,i.__data__,s,o)&&e.push(i)}return _(r)},Ms.order=function(){for(var t=-1,e=this.length;++t<e;)for(var n,i=this[t],r=i.length-1,o=i[r];--r>=0;)(n=i[r])&&(o&&o!==n.nextSibling&&o.parentNode.insertBefore(n,o),o=n);return this},Ms.sort=function(t){t=L.apply(this,arguments);for(var e=-1,n=this.length;++e<n;)this[e].sort(t);return this.order()},Ms.each=function(t){return z(this,function(e,n,i){t.call(e,e.__data__,n,i)})},Ms.call=function(t){var e=rs(arguments);return t.apply(e[0]=this,e),this},Ms.empty=function(){return!this.node()},Ms.node=function(){for(var t=0,e=this.length;e>t;t++)for(var n=this[t],i=0,r=n.length;r>i;i++){var o=n[i];if(o)return o}return null},Ms.size=function(){var t=0;return z(this,function(){++t}),t};var Ss=[];ns.selection.enter=R,ns.selection.enter.prototype=Ss,Ss.append=Ms.append,Ss.empty=Ms.empty,Ss.node=Ms.node,Ss.call=Ms.call,Ss.size=Ms.size,Ss.select=function(t){for(var e,n,i,r,o,a=[],s=-1,l=this.length;++s<l;){i=(r=this[s]).update,a.push(e=[]),e.parentNode=r.parentNode;for(var u=-1,c=r.length;++u<c;)(o=r[u])?(e.push(i[u]=n=t.call(r.parentNode,o.__data__,u,s)),n.__data__=o.__data__):e.push(null)}return _(a)},Ss.insert=function(t,e){return arguments.length<2&&(e=j(this)),Ms.insert.call(this,t,e)},ns.select=function(t){var e=["string"==typeof t?$s(t,os):t];return e.parentNode=as,_([e])},ns.selectAll=function(t){var e=rs("string"==typeof t?ks(t,os):t);return e.parentNode=as,_([e])};var Ts=ns.select(as);Ms.on=function(t,e,n){var i=arguments.length;if(3>i){if("string"!=typeof t){2>i&&(e=!1);for(n in t)this.each(q(n,t[n],e));return this}if(2>i)return(i=this.node()["__on"+t])&&i._;n=!1}return this.each(q(t,e,n))};var As=ns.map({mouseenter:"mouseover",mouseleave:"mouseout"});As.forEach(function(t){"on"+t in os&&As.remove(t)});var Es="onselectstart"in os?null:v(as.style,"userSelect"),Os=0;ns.mouse=function(t){return Y(t,$())};var Ns=/WebKit/.test(ss.navigator.userAgent)?-1:0;ns.touch=function(t,e,n){if(arguments.length<3&&(n=e,e=$().changedTouches),e)for(var i,r=0,o=e.length;o>r;++r)if((i=e[r]).identifier===n)return Y(t,i)},ns.behavior.drag=function(){function t(){this.on("mousedown.drag",r).on("touchstart.drag",o)}function e(t,e,r,o,a){return function(){function s(){var t,n,i=e(h,g);i&&(t=i[0]-b[0],n=i[1]-b[1],p|=t|n,b=i,f({type:"drag",x:i[0]+u[0],y:i[1]+u[1],dx:t,dy:n}))}function l(){e(h,g)&&(v.on(o+m,null).on(a+m,null),y(p&&ns.event.target===d),f({type:"dragend"}))}var u,c=this,d=ns.event.target,h=c.parentNode,f=n.of(c,arguments),p=0,g=t(),m=".drag"+(null==g?"":"-"+g),v=ns.select(r()).on(o+m,s).on(a+m,l),y=U(),b=e(h,g);i?(u=i.apply(c,arguments),u=[u.x-b[0],u.y-b[1]]):u=[0,0],f({type:"dragstart"})}}var n=k(t,"drag","dragstart","dragend"),i=null,r=e(y,ns.mouse,K,"mousemove","mouseup"),o=e(G,ns.touch,X,"touchmove","touchend");return t.origin=function(e){return arguments.length?(i=e,t):i},ns.rebind(t,n,"on")},ns.touches=function(t,e){return arguments.length<2&&(e=$().touches),e?rs(e).map(function(e){var n=Y(t,e);return n.identifier=e.identifier,n}):[]};var Is=1e-6,Ps=Is*Is,Hs=Math.PI,Fs=2*Hs,Ws=Fs-Is,Ls=Hs/2,zs=Hs/180,Rs=180/Hs,js=Math.SQRT2,qs=2,Vs=4;ns.interpolateZoom=function(t,e){function n(t){var e=t*y;if(v){var n=ne(g),a=o/(qs*h)*(n*ie(js*e+g)-ee(g));return[i+a*u,r+a*c,o*n/ne(js*e+g)]}return[i+t*u,r+t*c,o*Math.exp(js*e)]}var i=t[0],r=t[1],o=t[2],a=e[0],s=e[1],l=e[2],u=a-i,c=s-r,d=u*u+c*c,h=Math.sqrt(d),f=(l*l-o*o+Vs*d)/(2*o*qs*h),p=(l*l-o*o-Vs*d)/(2*l*qs*h),g=Math.log(Math.sqrt(f*f+1)-f),m=Math.log(Math.sqrt(p*p+1)-p),v=m-g,y=(v||Math.log(l/o))/js;return n.duration=1e3*y,n},ns.behavior.zoom=function(){function t(t){t.on(A,c).on(Ys+".zoom",h).on("dblclick.zoom",f).on(N,d)}function e(t){return[(t[0]-C.x)/C.k,(t[1]-C.y)/C.k]}function n(t){return[t[0]*C.k+C.x,t[1]*C.k+C.y]}function i(t){C.k=Math.max(D[0],Math.min(D[1],t))}function r(t,e){e=n(e),C.x+=t[0]-e[0],C.y+=t[1]-e[1]}function o(e,n,o,a){e.__chart__={x:C.x,y:C.y,k:C.k},i(Math.pow(2,a)),r(g=n,o),e=ns.select(e),S>0&&(e=e.transition().duration(S)),e.call(t.event)}function a(){x&&x.domain(b.range().map(function(t){return(t-C.x)/C.k}).map(b.invert)),_&&_.domain($.range().map(function(t){return(t-C.y)/C.k}).map($.invert))}function s(t){T++||t({type:"zoomstart"})}function l(t){a(),t({type:"zoom",scale:C.k,translate:[C.x,C.y]})}function u(t){--T||t({type:"zoomend"}),g=null}function c(){function t(){c=1,r(ns.mouse(i),h),l(a)}function n(){d.on(E,null).on(O,null),f(c&&ns.event.target===o),u(a)}var i=this,o=ns.event.target,a=I.of(i,arguments),c=0,d=ns.select(ss).on(E,t).on(O,n),h=e(ns.mouse(i)),f=U();zu.call(i),s(a)}function d(){function t(){var t=ns.touches(p);return f=C.k,t.forEach(function(t){t.identifier in m&&(m[t.identifier]=e(t))}),t}function n(){var e=ns.event.target;ns.select(e).on(x,a).on($,h),k.push(e);for(var n=ns.event.changedTouches,i=0,r=n.length;r>i;++i)m[n[i].identifier]=null;var s=t(),l=Date.now();if(1===s.length){if(500>l-y){var u=s[0];o(p,u,m[u.identifier],Math.floor(Math.log(C.k)/Math.LN2)+1),w()}y=l}else if(s.length>1){var u=s[0],c=s[1],d=u[0]-c[0],f=u[1]-c[1];v=d*d+f*f}}function a(){var t,e,n,o,a=ns.touches(p);zu.call(p);for(var s=0,u=a.length;u>s;++s,o=null)if(n=a[s],o=m[n.identifier]){if(e)break;t=n,e=o}if(o){var c=(c=n[0]-t[0])*c+(c=n[1]-t[1])*c,d=v&&Math.sqrt(c/v);t=[(t[0]+n[0])/2,(t[1]+n[1])/2],e=[(e[0]+o[0])/2,(e[1]+o[1])/2],i(d*f)}y=null,r(t,e),l(g)}function h(){if(ns.event.touches.length){for(var e=ns.event.changedTouches,n=0,i=e.length;i>n;++n)delete m[e[n].identifier];for(var r in m)return void t()}ns.selectAll(k).on(b,null),_.on(A,c).on(N,d),M(),u(g)}var f,p=this,g=I.of(p,arguments),m={},v=0,b=".zoom-"+ns.event.changedTouches[0].identifier,x="touchmove"+b,$="touchend"+b,k=[],_=ns.select(p),M=U();n(),s(g),_.on(A,null).on(N,n)}function h(){var t=I.of(this,arguments);v?clearTimeout(v):(p=e(g=m||ns.mouse(this)),zu.call(this),s(t)),v=setTimeout(function(){v=null,u(t)},50),w(),i(Math.pow(2,.002*Bs())*C.k),r(g,p),l(t)}function f(){var t=ns.mouse(this),n=Math.log(C.k)/Math.LN2;o(this,t,e(t),ns.event.shiftKey?Math.ceil(n)-1:Math.floor(n)+1)}var p,g,m,v,y,b,x,$,_,C={x:0,y:0,k:1},M=[960,500],D=Us,S=250,T=0,A="mousedown.zoom",E="mousemove.zoom",O="mouseup.zoom",N="touchstart.zoom",I=k(t,"zoomstart","zoom","zoomend");return t.event=function(t){t.each(function(){var t=I.of(this,arguments),e=C;Wu?ns.select(this).transition().each("start.zoom",function(){C=this.__chart__||{x:0,y:0,k:1},s(t)}).tween("zoom:zoom",function(){var n=M[0],i=M[1],r=g?g[0]:n/2,o=g?g[1]:i/2,a=ns.interpolateZoom([(r-C.x)/C.k,(o-C.y)/C.k,n/C.k],[(r-e.x)/e.k,(o-e.y)/e.k,n/e.k]);return function(e){var i=a(e),s=n/i[2];this.__chart__=C={x:r-i[0]*s,y:o-i[1]*s,k:s},l(t)}}).each("interrupt.zoom",function(){u(t)}).each("end.zoom",function(){u(t)}):(this.__chart__=C,s(t),l(t),u(t))})},t.translate=function(e){return arguments.length?(C={x:+e[0],y:+e[1],k:C.k},a(),t):[C.x,C.y]},t.scale=function(e){return arguments.length?(C={x:C.x,y:C.y,k:+e},a(),t):C.k},t.scaleExtent=function(e){return arguments.length?(D=null==e?Us:[+e[0],+e[1]],t):D},t.center=function(e){return arguments.length?(m=e&&[+e[0],+e[1]],t):m},t.size=function(e){return arguments.length?(M=e&&[+e[0],+e[1]],t):M},t.duration=function(e){return arguments.length?(S=+e,t):S},t.x=function(e){return arguments.length?(x=e,b=e.copy(),C={x:0,y:0,k:1},t):x},t.y=function(e){return arguments.length?(_=e,$=e.copy(),C={x:0,y:0,k:1},t):_},ns.rebind(t,I,"on")};var Bs,Us=[0,1/0],Ys="onwheel"in os?(Bs=function(){return-ns.event.deltaY*(ns.event.deltaMode?120:1)},"wheel"):"onmousewheel"in os?(Bs=function(){return ns.event.wheelDelta},"mousewheel"):(Bs=function(){return-ns.event.detail},"MozMousePixelScroll");ns.color=oe,oe.prototype.toString=function(){return this.rgb()+""},ns.hsl=ae;var Gs=ae.prototype=new oe;Gs.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new ae(this.h,this.s,this.l/t)},Gs.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new ae(this.h,this.s,t*this.l)},Gs.rgb=function(){return se(this.h,this.s,this.l)},ns.hcl=le;var Xs=le.prototype=new oe;Xs.brighter=function(t){return new le(this.h,this.c,Math.min(100,this.l+Ks*(arguments.length?t:1)))},Xs.darker=function(t){return new le(this.h,this.c,Math.max(0,this.l-Ks*(arguments.length?t:1)))},Xs.rgb=function(){return ue(this.h,this.c,this.l).rgb()},ns.lab=ce;var Ks=18,Zs=.95047,Qs=1,Js=1.08883,tl=ce.prototype=new oe;tl.brighter=function(t){return new ce(Math.min(100,this.l+Ks*(arguments.length?t:1)),this.a,this.b)},tl.darker=function(t){return new ce(Math.max(0,this.l-Ks*(arguments.length?t:1)),this.a,this.b)},tl.rgb=function(){return de(this.l,this.a,this.b)},ns.rgb=me;var el=me.prototype=new oe;el.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,n=this.g,i=this.b,r=30;return e||n||i?(e&&r>e&&(e=r),n&&r>n&&(n=r),i&&r>i&&(i=r),new me(Math.min(255,e/t),Math.min(255,n/t),Math.min(255,i/t))):new me(r,r,r)},el.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new me(t*this.r,t*this.g,t*this.b)},el.hsl=function(){return we(this.r,this.g,this.b)},el.toString=function(){return"#"+be(this.r)+be(this.g)+be(this.b)};var nl=ns.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,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});nl.forEach(function(t,e){nl.set(t,ve(e))}),ns.functor=Ce,ns.xhr=De(Me),ns.dsv=function(t,e){function n(t,n,o){arguments.length<3&&(o=n,n=null);var a=Se(t,e,null==n?i:r(n),o);return a.row=function(t){return arguments.length?a.response(null==(n=t)?i:r(t)):n},a}function i(t){return n.parse(t.responseText)}function r(t){return function(e){return n.parse(e.responseText,t)}}function o(e){return e.map(a).join(t)}function a(t){return s.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}var s=new RegExp('["'+t+"\n]"),l=t.charCodeAt(0);return n.parse=function(t,e){var i;return n.parseRows(t,function(t,n){if(i)return i(t,n-1);var r=new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+"]"}).join(",")+"}");i=e?function(t,n){return e(r(t),n)}:r})},n.parseRows=function(t,e){function n(){if(c>=u)return a;if(r)return r=!1,o;var e=c;if(34===t.charCodeAt(e)){for(var n=e;n++<u;)if(34===t.charCodeAt(n)){if(34!==t.charCodeAt(n+1))break;++n}c=n+2;var i=t.charCodeAt(n+1);return 13===i?(r=!0,10===t.charCodeAt(n+2)&&++c):10===i&&(r=!0),t.slice(e+1,n).replace(/""/g,'"')}for(;u>c;){var i=t.charCodeAt(c++),s=1;if(10===i)r=!0;else if(13===i)r=!0,10===t.charCodeAt(c)&&(++c,++s);else if(i!==l)continue;return t.slice(e,c-s)}return t.slice(e)}for(var i,r,o={},a={},s=[],u=t.length,c=0,d=0;(i=n())!==a;){for(var h=[];i!==o&&i!==a;)h.push(i),i=n();e&&null==(h=e(h,d++))||s.push(h)}return s},n.format=function(e){if(Array.isArray(e[0]))return n.formatRows(e);var i=new g,r=[];return e.forEach(function(t){for(var e in t)i.has(e)||r.push(i.add(e))}),[r.map(a).join(t)].concat(e.map(function(e){return r.map(function(t){return a(e[t])}).join(t)})).join("\n")},n.formatRows=function(t){return t.map(o).join("\n")},n},ns.csv=ns.dsv(",","text/csv"),ns.tsv=ns.dsv("	","text/tab-separated-values");var il,rl,ol,al,sl,ll=ss[v(ss,"requestAnimationFrame")]||function(t){setTimeout(t,17)};ns.timer=function(t,e,n){var i=arguments.length;2>i&&(e=0),3>i&&(n=Date.now());var r=n+e,o={c:t,t:r,f:!1,n:null};rl?rl.n=o:il=o,rl=o,ol||(al=clearTimeout(al),ol=1,ll(Ee))},ns.timer.flush=function(){Oe(),Ne()},ns.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)};var ul=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(Pe);ns.formatPrefix=function(t,e){var n=0;return t&&(0>t&&(t*=-1),e&&(t=ns.round(t,Ie(t,e))),n=1+Math.floor(1e-12+Math.log(t)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),ul[8+n/3]};var cl=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,dl=ns.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(t,e){return(t=ns.round(t,Ie(t,e))).toFixed(Math.max(0,Math.min(20,Ie(t*(1+1e-15),e))))}}),hl=ns.time={},fl=Date;We.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(){pl.setUTCDate.apply(this._,arguments)},setDay:function(){pl.setUTCDay.apply(this._,arguments)},setFullYear:function(){pl.setUTCFullYear.apply(this._,arguments)},setHours:function(){pl.setUTCHours.apply(this._,arguments)
},setMilliseconds:function(){pl.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){pl.setUTCMinutes.apply(this._,arguments)},setMonth:function(){pl.setUTCMonth.apply(this._,arguments)},setSeconds:function(){pl.setUTCSeconds.apply(this._,arguments)},setTime:function(){pl.setTime.apply(this._,arguments)}};var pl=Date.prototype;hl.year=Le(function(t){return t=hl.day(t),t.setMonth(0,1),t},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t){return t.getFullYear()}),hl.years=hl.year.range,hl.years.utc=hl.year.utc.range,hl.day=Le(function(t){var e=new fl(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e},function(t,e){t.setDate(t.getDate()+e)},function(t){return t.getDate()-1}),hl.days=hl.day.range,hl.days.utc=hl.day.utc.range,hl.dayOfYear=function(t){var e=hl.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(t,e){e=7-e;var n=hl[t]=Le(function(t){return(t=hl.day(t)).setDate(t.getDate()-(t.getDay()+e)%7),t},function(t,e){t.setDate(t.getDate()+7*Math.floor(e))},function(t){var n=hl.year(t).getDay();return Math.floor((hl.dayOfYear(t)+(n+e)%7)/7)-(n!==e)});hl[t+"s"]=n.range,hl[t+"s"].utc=n.utc.range,hl[t+"OfYear"]=function(t){var n=hl.year(t).getDay();return Math.floor((hl.dayOfYear(t)+(n+e)%7)/7)}}),hl.week=hl.sunday,hl.weeks=hl.sunday.range,hl.weeks.utc=hl.sunday.utc.range,hl.weekOfYear=hl.sundayOfYear;var gl={"-":"",_:" ",0:"0"},ml=/^\s*\d+/,vl=/^%/;ns.locale=function(t){return{numberFormat:He(t),timeFormat:Re(t)}};var yl=ns.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","Friday","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"]});ns.format=yl.numberFormat,ns.geo={},un.prototype={s:0,t:0,add:function(t){cn(t,this.t,bl),cn(bl.s,this.s,this),this.s?this.t+=bl.t:this.s=bl.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var bl=new un;ns.geo.stream=function(t,e){t&&xl.hasOwnProperty(t.type)?xl[t.type](t,e):dn(t,e)};var xl={Feature:function(t,e){dn(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,i=-1,r=n.length;++i<r;)dn(n[i].geometry,e)}},wl={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,i=-1,r=n.length;++i<r;)t=n[i],e.point(t[0],t[1],t[2])},LineString:function(t,e){hn(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,i=-1,r=n.length;++i<r;)hn(n[i],e,0)},Polygon:function(t,e){fn(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,i=-1,r=n.length;++i<r;)fn(n[i],e)},GeometryCollection:function(t,e){for(var n=t.geometries,i=-1,r=n.length;++i<r;)dn(n[i],e)}};ns.geo.area=function(t){return $l=0,ns.geo.stream(t,_l),$l};var $l,kl=new un,_l={sphere:function(){$l+=4*Hs},point:y,lineStart:y,lineEnd:y,polygonStart:function(){kl.reset(),_l.lineStart=pn},polygonEnd:function(){var t=2*kl;$l+=0>t?4*Hs+t:t,_l.lineStart=_l.lineEnd=_l.point=y}};ns.geo.bounds=function(){function t(t,e){b.push(x=[c=t,h=t]),d>e&&(d=e),e>f&&(f=e)}function e(e,n){var i=gn([e*zs,n*zs]);if(v){var r=vn(v,i),o=[r[1],-r[0],0],a=vn(o,r);xn(a),a=wn(a);var l=e-p,u=l>0?1:-1,g=a[0]*Rs*u,m=ms(l)>180;if(m^(g>u*p&&u*e>g)){var y=a[1]*Rs;y>f&&(f=y)}else if(g=(g+360)%360-180,m^(g>u*p&&u*e>g)){var y=-a[1]*Rs;d>y&&(d=y)}else d>n&&(d=n),n>f&&(f=n);m?p>e?s(c,e)>s(c,h)&&(h=e):s(e,h)>s(c,h)&&(c=e):h>=c?(c>e&&(c=e),e>h&&(h=e)):e>p?s(c,e)>s(c,h)&&(h=e):s(e,h)>s(c,h)&&(c=e)}else t(e,n);v=i,p=e}function n(){w.point=e}function i(){x[0]=c,x[1]=h,w.point=t,v=null}function r(t,n){if(v){var i=t-p;y+=ms(i)>180?i+(i>0?360:-360):i}else g=t,m=n;_l.point(t,n),e(t,n)}function o(){_l.lineStart()}function a(){r(g,m),_l.lineEnd(),ms(y)>Is&&(c=-(h=180)),x[0]=c,x[1]=h,v=null}function s(t,e){return(e-=t)<0?e+360:e}function l(t,e){return t[0]-e[0]}function u(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}var c,d,h,f,p,g,m,v,y,b,x,w={point:t,lineStart:n,lineEnd:i,polygonStart:function(){w.point=r,w.lineStart=o,w.lineEnd=a,y=0,_l.polygonStart()},polygonEnd:function(){_l.polygonEnd(),w.point=t,w.lineStart=n,w.lineEnd=i,0>kl?(c=-(h=180),d=-(f=90)):y>Is?f=90:-Is>y&&(d=-90),x[0]=c,x[1]=h}};return function(t){f=h=-(c=d=1/0),b=[],ns.geo.stream(t,w);var e=b.length;if(e){b.sort(l);for(var n,i=1,r=b[0],o=[r];e>i;++i)n=b[i],u(n[0],r)||u(n[1],r)?(s(r[0],n[1])>s(r[0],r[1])&&(r[1]=n[1]),s(n[0],r[1])>s(r[0],r[1])&&(r[0]=n[0])):o.push(r=n);for(var a,n,p=-1/0,e=o.length-1,i=0,r=o[e];e>=i;r=n,++i)n=o[i],(a=s(r[1],n[0]))>p&&(p=a,c=n[0],h=r[1])}return b=x=null,1/0===c||1/0===d?[[0/0,0/0],[0/0,0/0]]:[[c,d],[h,f]]}}(),ns.geo.centroid=function(t){Cl=Ml=Dl=Sl=Tl=Al=El=Ol=Nl=Il=Pl=0,ns.geo.stream(t,Hl);var e=Nl,n=Il,i=Pl,r=e*e+n*n+i*i;return Ps>r&&(e=Al,n=El,i=Ol,Is>Ml&&(e=Dl,n=Sl,i=Tl),r=e*e+n*n+i*i,Ps>r)?[0/0,0/0]:[Math.atan2(n,e)*Rs,te(i/Math.sqrt(r))*Rs]};var Cl,Ml,Dl,Sl,Tl,Al,El,Ol,Nl,Il,Pl,Hl={sphere:y,point:kn,lineStart:Cn,lineEnd:Mn,polygonStart:function(){Hl.lineStart=Dn},polygonEnd:function(){Hl.lineStart=Cn}},Fl=Nn(Tn,Fn,Ln,[-Hs,-Hs/2]),Wl=1e9;ns.geo.clipExtent=function(){var t,e,n,i,r,o,a={stream:function(t){return r&&(r.valid=!1),r=o(t),r.valid=!0,r},extent:function(s){return arguments.length?(o=qn(t=+s[0][0],e=+s[0][1],n=+s[1][0],i=+s[1][1]),r&&(r.valid=!1,r=null),a):[[t,e],[n,i]]}};return a.extent([[0,0],[960,500]])},(ns.geo.conicEqualArea=function(){return Vn(Bn)}).raw=Bn,ns.geo.albers=function(){return ns.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},ns.geo.albersUsa=function(){function t(t){var o=t[0],a=t[1];return e=null,n(o,a),e||(i(o,a),e)||r(o,a),e}var e,n,i,r,o=ns.geo.albers(),a=ns.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=ns.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(t,n){e=[t,n]}};return t.invert=function(t){var e=o.scale(),n=o.translate(),i=(t[0]-n[0])/e,r=(t[1]-n[1])/e;return(r>=.12&&.234>r&&i>=-.425&&-.214>i?a:r>=.166&&.234>r&&i>=-.214&&-.115>i?s:o).invert(t)},t.stream=function(t){var e=o.stream(t),n=a.stream(t),i=s.stream(t);return{point:function(t,r){e.point(t,r),n.point(t,r),i.point(t,r)},sphere:function(){e.sphere(),n.sphere(),i.sphere()},lineStart:function(){e.lineStart(),n.lineStart(),i.lineStart()},lineEnd:function(){e.lineEnd(),n.lineEnd(),i.lineEnd()},polygonStart:function(){e.polygonStart(),n.polygonStart(),i.polygonStart()},polygonEnd:function(){e.polygonEnd(),n.polygonEnd(),i.polygonEnd()}}},t.precision=function(e){return arguments.length?(o.precision(e),a.precision(e),s.precision(e),t):o.precision()},t.scale=function(e){return arguments.length?(o.scale(e),a.scale(.35*e),s.scale(e),t.translate(o.translate())):o.scale()},t.translate=function(e){if(!arguments.length)return o.translate();var u=o.scale(),c=+e[0],d=+e[1];return n=o.translate(e).clipExtent([[c-.455*u,d-.238*u],[c+.455*u,d+.238*u]]).stream(l).point,i=a.translate([c-.307*u,d+.201*u]).clipExtent([[c-.425*u+Is,d+.12*u+Is],[c-.214*u-Is,d+.234*u-Is]]).stream(l).point,r=s.translate([c-.205*u,d+.212*u]).clipExtent([[c-.214*u+Is,d+.166*u+Is],[c-.115*u-Is,d+.234*u-Is]]).stream(l).point,t},t.scale(1070)};var Ll,zl,Rl,jl,ql,Vl,Bl={point:y,lineStart:y,lineEnd:y,polygonStart:function(){zl=0,Bl.lineStart=Un},polygonEnd:function(){Bl.lineStart=Bl.lineEnd=Bl.point=y,Ll+=ms(zl/2)}},Ul={point:Yn,lineStart:y,lineEnd:y,polygonStart:y,polygonEnd:y},Yl={point:Kn,lineStart:Zn,lineEnd:Qn,polygonStart:function(){Yl.lineStart=Jn},polygonEnd:function(){Yl.point=Kn,Yl.lineStart=Zn,Yl.lineEnd=Qn}};ns.geo.path=function(){function t(t){return t&&("function"==typeof s&&o.pointRadius(+s.apply(this,arguments)),a&&a.valid||(a=r(o)),ns.geo.stream(t,a)),o.result()}function e(){return a=null,t}var n,i,r,o,a,s=4.5;return t.area=function(t){return Ll=0,ns.geo.stream(t,r(Bl)),Ll},t.centroid=function(t){return Dl=Sl=Tl=Al=El=Ol=Nl=Il=Pl=0,ns.geo.stream(t,r(Yl)),Pl?[Nl/Pl,Il/Pl]:Ol?[Al/Ol,El/Ol]:Tl?[Dl/Tl,Sl/Tl]:[0/0,0/0]},t.bounds=function(t){return ql=Vl=-(Rl=jl=1/0),ns.geo.stream(t,r(Ul)),[[Rl,jl],[ql,Vl]]},t.projection=function(t){return arguments.length?(r=(n=t)?t.stream||ni(t):Me,e()):n},t.context=function(t){return arguments.length?(o=null==(i=t)?new Gn:new ti(t),"function"!=typeof s&&o.pointRadius(s),e()):i},t.pointRadius=function(e){return arguments.length?(s="function"==typeof e?e:(o.pointRadius(+e),+e),t):s},t.projection(ns.geo.albersUsa()).context(null)},ns.geo.transform=function(t){return{stream:function(e){var n=new ii(e);for(var i in t)n[i]=t[i];return n}}},ii.prototype={point:function(t,e){this.stream.point(t,e)},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()}},ns.geo.projection=oi,ns.geo.projectionMutator=ai,(ns.geo.equirectangular=function(){return oi(li)}).raw=li.invert=li,ns.geo.rotation=function(t){function e(e){return e=t(e[0]*zs,e[1]*zs),e[0]*=Rs,e[1]*=Rs,e}return t=ci(t[0]%360*zs,t[1]*zs,t.length>2?t[2]*zs:0),e.invert=function(e){return e=t.invert(e[0]*zs,e[1]*zs),e[0]*=Rs,e[1]*=Rs,e},e},ui.invert=li,ns.geo.circle=function(){function t(){var t="function"==typeof i?i.apply(this,arguments):i,e=ci(-t[0]*zs,-t[1]*zs,0).invert,r=[];return n(null,null,1,{point:function(t,n){r.push(t=e(t,n)),t[0]*=Rs,t[1]*=Rs}}),{type:"Polygon",coordinates:[r]}}var e,n,i=[0,0],r=6;return t.origin=function(e){return arguments.length?(i=e,t):i},t.angle=function(i){return arguments.length?(n=pi((e=+i)*zs,r*zs),t):e},t.precision=function(i){return arguments.length?(n=pi(e*zs,(r=+i)*zs),t):r},t.angle(90)},ns.geo.distance=function(t,e){var n,i=(e[0]-t[0])*zs,r=t[1]*zs,o=e[1]*zs,a=Math.sin(i),s=Math.cos(i),l=Math.sin(r),u=Math.cos(r),c=Math.sin(o),d=Math.cos(o);return Math.atan2(Math.sqrt((n=d*a)*n+(n=u*c-l*d*s)*n),l*c+u*d*s)},ns.geo.graticule=function(){function t(){return{type:"MultiLineString",coordinates:e()}}function e(){return ns.range(Math.ceil(o/m)*m,r,m).map(h).concat(ns.range(Math.ceil(u/v)*v,l,v).map(f)).concat(ns.range(Math.ceil(i/p)*p,n,p).filter(function(t){return ms(t%m)>Is}).map(c)).concat(ns.range(Math.ceil(s/g)*g,a,g).filter(function(t){return ms(t%v)>Is}).map(d))}var n,i,r,o,a,s,l,u,c,d,h,f,p=10,g=p,m=90,v=360,y=2.5;return t.lines=function(){return e().map(function(t){return{type:"LineString",coordinates:t}})},t.outline=function(){return{type:"Polygon",coordinates:[h(o).concat(f(l).slice(1),h(r).reverse().slice(1),f(u).reverse().slice(1))]}},t.extent=function(e){return arguments.length?t.majorExtent(e).minorExtent(e):t.minorExtent()},t.majorExtent=function(e){return arguments.length?(o=+e[0][0],r=+e[1][0],u=+e[0][1],l=+e[1][1],o>r&&(e=o,o=r,r=e),u>l&&(e=u,u=l,l=e),t.precision(y)):[[o,u],[r,l]]},t.minorExtent=function(e){return arguments.length?(i=+e[0][0],n=+e[1][0],s=+e[0][1],a=+e[1][1],i>n&&(e=i,i=n,n=e),s>a&&(e=s,s=a,a=e),t.precision(y)):[[i,s],[n,a]]},t.step=function(e){return arguments.length?t.majorStep(e).minorStep(e):t.minorStep()},t.majorStep=function(e){return arguments.length?(m=+e[0],v=+e[1],t):[m,v]},t.minorStep=function(e){return arguments.length?(p=+e[0],g=+e[1],t):[p,g]},t.precision=function(e){return arguments.length?(y=+e,c=mi(s,a,90),d=vi(i,n,y),h=mi(u,l,90),f=vi(o,r,y),t):y},t.majorExtent([[-180,-90+Is],[180,90-Is]]).minorExtent([[-180,-80-Is],[180,80+Is]])},ns.geo.greatArc=function(){function t(){return{type:"LineString",coordinates:[e||i.apply(this,arguments),n||r.apply(this,arguments)]}}var e,n,i=yi,r=bi;return t.distance=function(){return ns.geo.distance(e||i.apply(this,arguments),n||r.apply(this,arguments))},t.source=function(n){return arguments.length?(i=n,e="function"==typeof n?null:n,t):i},t.target=function(e){return arguments.length?(r=e,n="function"==typeof e?null:e,t):r},t.precision=function(){return arguments.length?t:0},t},ns.geo.interpolate=function(t,e){return xi(t[0]*zs,t[1]*zs,e[0]*zs,e[1]*zs)},ns.geo.length=function(t){return Gl=0,ns.geo.stream(t,Xl),Gl};var Gl,Xl={sphere:y,point:y,lineStart:wi,lineEnd:y,polygonStart:y,polygonEnd:y},Kl=$i(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(ns.geo.azimuthalEqualArea=function(){return oi(Kl)}).raw=Kl;var Zl=$i(function(t){var e=Math.acos(t);return e&&e/Math.sin(e)},Me);(ns.geo.azimuthalEquidistant=function(){return oi(Zl)}).raw=Zl,(ns.geo.conicConformal=function(){return Vn(ki)}).raw=ki,(ns.geo.conicEquidistant=function(){return Vn(_i)}).raw=_i;var Ql=$i(function(t){return 1/t},Math.atan);(ns.geo.gnomonic=function(){return oi(Ql)}).raw=Ql,Ci.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-Ls]},(ns.geo.mercator=function(){return Mi(Ci)}).raw=Ci;var Jl=$i(function(){return 1},Math.asin);(ns.geo.orthographic=function(){return oi(Jl)}).raw=Jl;var tu=$i(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});(ns.geo.stereographic=function(){return oi(tu)}).raw=tu,Di.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-Ls]},(ns.geo.transverseMercator=function(){var t=Mi(Di),e=t.center,n=t.rotate;return t.center=function(t){return t?e([-t[1],t[0]]):(t=e(),[t[1],-t[0]])},t.rotate=function(t){return t?n([t[0],t[1],t.length>2?t[2]+90:90]):(t=n(),[t[0],t[1],t[2]-90])},n([0,0,90])}).raw=Di,ns.geom={},ns.geom.hull=function(t){function e(t){if(t.length<3)return[];var e,r=Ce(n),o=Ce(i),a=t.length,s=[],l=[];for(e=0;a>e;e++)s.push([+r.call(this,t[e],e),+o.call(this,t[e],e),e]);for(s.sort(Ei),e=0;a>e;e++)l.push([s[e][0],-s[e][1]]);var u=Ai(s),c=Ai(l),d=c[0]===u[0],h=c[c.length-1]===u[u.length-1],f=[];for(e=u.length-1;e>=0;--e)f.push(t[s[u[e]][2]]);for(e=+d;e<c.length-h;++e)f.push(t[s[c[e]][2]]);return f}var n=Si,i=Ti;return arguments.length?e(t):(e.x=function(t){return arguments.length?(n=t,e):n},e.y=function(t){return arguments.length?(i=t,e):i},e)},ns.geom.polygon=function(t){return ws(t,eu),t};var eu=ns.geom.polygon.prototype=[];eu.area=function(){for(var t,e=-1,n=this.length,i=this[n-1],r=0;++e<n;)t=i,i=this[e],r+=t[1]*i[0]-t[0]*i[1];return.5*r},eu.centroid=function(t){var e,n,i=-1,r=this.length,o=0,a=0,s=this[r-1];for(arguments.length||(t=-1/(6*this.area()));++i<r;)e=s,s=this[i],n=e[0]*s[1]-s[0]*e[1],o+=(e[0]+s[0])*n,a+=(e[1]+s[1])*n;return[o*t,a*t]},eu.clip=function(t){for(var e,n,i,r,o,a,s=Ii(t),l=-1,u=this.length-Ii(this),c=this[u-1];++l<u;){for(e=t.slice(),t.length=0,r=this[l],o=e[(i=e.length-s)-1],n=-1;++n<i;)a=e[n],Oi(a,c,r)?(Oi(o,c,r)||t.push(Ni(o,a,c,r)),t.push(a)):Oi(o,c,r)&&t.push(Ni(o,a,c,r)),o=a;s&&t.push(t[0]),c=r}return t};var nu,iu,ru,ou,au,su=[],lu=[];ji.prototype.prepare=function(){for(var t,e=this.edges,n=e.length;n--;)t=e[n].edge,t.b&&t.a||e.splice(n,1);return e.sort(Vi),e.length},tr.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}},er.prototype={insert:function(t,e){var n,i,r;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=or(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)i=n.U,n===i.L?(r=i.R,r&&r.C?(n.C=r.C=!1,i.C=!0,t=i):(t===n.R&&(ir(this,n),t=n,n=t.U),n.C=!1,i.C=!0,rr(this,i))):(r=i.L,r&&r.C?(n.C=r.C=!1,i.C=!0,t=i):(t===n.L&&(rr(this,n),t=n,n=t.U),n.C=!1,i.C=!0,ir(this,i))),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,i,r=t.U,o=t.L,a=t.R;if(n=o?a?or(a):o:a,r?r.L===t?r.L=n:r.R=n:this._=n,o&&a?(i=n.C,n.C=t.C,n.L=o,o.U=n,n!==a?(r=n.U,n.U=t.U,t=n.R,r.L=t,n.R=a,a.U=n):(n.U=r,r=n,t=n.R)):(i=t.C,t=n),t&&(t.U=r),!i){if(t&&t.C)return void(t.C=!1);do{if(t===this._)break;if(t===r.L){if(e=r.R,e.C&&(e.C=!1,r.C=!0,ir(this,r),e=r.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,rr(this,e),e=r.R),e.C=r.C,r.C=e.R.C=!1,ir(this,r),t=this._;break}}else if(e=r.L,e.C&&(e.C=!1,r.C=!0,rr(this,r),e=r.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,ir(this,e),e=r.L),e.C=r.C,r.C=e.L.C=!1,rr(this,r),t=this._;break}e.C=!0,t=r,r=r.U}while(!t.C);t&&(t.C=!1)}}},ns.geom.voronoi=function(t){function e(t){var e=new Array(t.length),i=s[0][0],r=s[0][1],o=s[1][0],a=s[1][1];return ar(n(t),s).cells.forEach(function(n,s){var l=n.edges,u=n.site,c=e[s]=l.length?l.map(function(t){var e=t.start();return[e.x,e.y]}):u.x>=i&&u.x<=o&&u.y>=r&&u.y<=a?[[i,a],[o,a],[o,r],[i,r]]:[];c.point=t[s]}),e}function n(t){return t.map(function(t,e){return{x:Math.round(o(t,e)/Is)*Is,y:Math.round(a(t,e)/Is)*Is,i:e}})}var i=Si,r=Ti,o=i,a=r,s=uu;return t?e(t):(e.links=function(t){return ar(n(t)).edges.filter(function(t){return t.l&&t.r}).map(function(e){return{source:t[e.l.i],target:t[e.r.i]}})},e.triangles=function(t){var e=[];return ar(n(t)).cells.forEach(function(n,i){for(var r,o,a=n.site,s=n.edges.sort(Vi),l=-1,u=s.length,c=s[u-1].edge,d=c.l===a?c.r:c.l;++l<u;)r=c,o=d,c=s[l].edge,d=c.l===a?c.r:c.l,i<o.i&&i<d.i&&lr(a,o,d)<0&&e.push([t[i],t[o.i],t[d.i]])}),e},e.x=function(t){return arguments.length?(o=Ce(i=t),e):i},e.y=function(t){return arguments.length?(a=Ce(r=t),e):r},e.clipExtent=function(t){return arguments.length?(s=null==t?uu:t,e):s===uu?null:s},e.size=function(t){return arguments.length?e.clipExtent(t&&[[0,0],t]):s===uu?null:s&&s[1]},e)};var uu=[[-1e6,-1e6],[1e6,1e6]];ns.geom.delaunay=function(t){return ns.geom.voronoi().triangles(t)},ns.geom.quadtree=function(t,e,n,i,r){function o(t){function o(t,e,n,i,r,o,a,s){if(!isNaN(n)&&!isNaN(i))if(t.leaf){var l=t.x,c=t.y;if(null!=l)if(ms(l-n)+ms(c-i)<.01)u(t,e,n,i,r,o,a,s);else{var d=t.point;t.x=t.y=t.point=null,u(t,d,l,c,r,o,a,s),u(t,e,n,i,r,o,a,s)}else t.x=n,t.y=i,t.point=e}else u(t,e,n,i,r,o,a,s)}function u(t,e,n,i,r,a,s,l){var u=.5*(r+s),c=.5*(a+l),d=n>=u,h=i>=c,f=h<<1|d;t.leaf=!1,t=t.nodes[f]||(t.nodes[f]=dr()),d?r=u:s=u,h?a=c:l=c,o(t,e,n,i,r,a,s,l)}var c,d,h,f,p,g,m,v,y,b=Ce(s),x=Ce(l);if(null!=e)g=e,m=n,v=i,y=r;else if(v=y=-(g=m=1/0),d=[],h=[],p=t.length,a)for(f=0;p>f;++f)c=t[f],c.x<g&&(g=c.x),c.y<m&&(m=c.y),c.x>v&&(v=c.x),c.y>y&&(y=c.y),d.push(c.x),h.push(c.y);else for(f=0;p>f;++f){var w=+b(c=t[f],f),$=+x(c,f);g>w&&(g=w),m>$&&(m=$),w>v&&(v=w),$>y&&(y=$),d.push(w),h.push($)}var k=v-g,_=y-m;k>_?y=m+k:v=g+_;var C=dr();if(C.add=function(t){o(C,t,+b(t,++f),+x(t,f),g,m,v,y)},C.visit=function(t){hr(t,C,g,m,v,y)},C.find=function(t){return fr(C,t[0],t[1],g,m,v,y)},f=-1,null==e){for(;++f<p;)o(C,t[f],d[f],h[f],g,m,v,y);--f}else t.forEach(C.add);return d=h=t=c=null,C}var a,s=Si,l=Ti;return(a=arguments.length)?(s=ur,l=cr,3===a&&(r=n,i=e,n=e=0),o(t)):(o.x=function(t){return arguments.length?(s=t,o):s},o.y=function(t){return arguments.length?(l=t,o):l},o.extent=function(t){return arguments.length?(null==t?e=n=i=r=null:(e=+t[0][0],n=+t[0][1],i=+t[1][0],r=+t[1][1]),o):null==e?null:[[e,n],[i,r]]},o.size=function(t){return arguments.length?(null==t?e=n=i=r=null:(e=n=0,i=+t[0],r=+t[1]),o):null==e?null:[i-e,r-n]},o)},ns.interpolateRgb=pr,ns.interpolateObject=gr,ns.interpolateNumber=mr,ns.interpolateString=vr;var cu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,du=new RegExp(cu.source,"g");ns.interpolate=yr,ns.interpolators=[function(t,e){var n=typeof e;return("string"===n?nl.has(e)||/^(#|rgb\(|hsl\()/.test(e)?pr:vr:e instanceof oe?pr:Array.isArray(e)?br:"object"===n&&isNaN(e)?gr:mr)(t,e)}],ns.interpolateArray=br;var hu=function(){return Me},fu=ns.map({linear:hu,poly:Mr,quad:function(){return kr},cubic:function(){return _r},sin:function(){return Dr},exp:function(){return Sr},circle:function(){return Tr},elastic:Ar,back:Er,bounce:function(){return Or}}),pu=ns.map({"in":Me,out:wr,"in-out":$r,"out-in":function(t){return $r(wr(t))}});ns.ease=function(t){var e=t.indexOf("-"),n=e>=0?t.slice(0,e):t,i=e>=0?t.slice(e+1):"in";return n=fu.get(n)||hu,i=pu.get(i)||Me,xr(i(n.apply(null,is.call(arguments,1))))},ns.interpolateHcl=Nr,ns.interpolateHsl=Ir,ns.interpolateLab=Pr,ns.interpolateRound=Hr,ns.transform=function(t){var e=os.createElementNS(ns.ns.prefix.svg,"g");return(ns.transform=function(t){if(null!=t){e.setAttribute("transform",t);var n=e.transform.baseVal.consolidate()}return new Fr(n?n.matrix:gu)})(t)},Fr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var gu={a:1,b:0,c:0,d:1,e:0,f:0};ns.interpolateTransform=Rr,ns.layout={},ns.layout.bundle=function(){return function(t){for(var e=[],n=-1,i=t.length;++n<i;)e.push(Vr(t[n]));return e}},ns.layout.chord=function(){function t(){var t,u,d,h,f,p={},g=[],m=ns.range(o),v=[];for(n=[],i=[],t=0,h=-1;++h<o;){for(u=0,f=-1;++f<o;)u+=r[h][f];g.push(u),v.push(ns.range(o)),t+=u}for(a&&m.sort(function(t,e){return a(g[t],g[e])}),s&&v.forEach(function(t,e){t.sort(function(t,n){return s(r[e][t],r[e][n])})}),t=(Fs-c*o)/t,u=0,h=-1;++h<o;){for(d=u,f=-1;++f<o;){var y=m[h],b=v[y][f],x=r[y][b],w=u,$=u+=x*t;p[y+"-"+b]={index:y,subindex:b,startAngle:w,endAngle:$,value:x}}i[y]={index:y,startAngle:d,endAngle:u,value:(u-d)/t},u+=c}for(h=-1;++h<o;)for(f=h-1;++f<o;){var k=p[h+"-"+f],_=p[f+"-"+h];(k.value||_.value)&&n.push(k.value<_.value?{source:_,target:k}:{source:k,target:_})}l&&e()}function e(){n.sort(function(t,e){return l((t.source.value+t.target.value)/2,(e.source.value+e.target.value)/2)})}var n,i,r,o,a,s,l,u={},c=0;return u.matrix=function(t){return arguments.length?(o=(r=t)&&r.length,n=i=null,u):r},u.padding=function(t){return arguments.length?(c=t,n=i=null,u):c},u.sortGroups=function(t){return arguments.length?(a=t,n=i=null,u):a},u.sortSubgroups=function(t){return arguments.length?(s=t,n=null,u):s},u.sortChords=function(t){return arguments.length?(l=t,n&&e(),u):l},u.chords=function(){return n||t(),n},u.groups=function(){return i||t(),i},u},ns.layout.force=function(){function t(t){return function(e,n,i,r){if(e.point!==t){var o=e.cx-t.x,a=e.cy-t.y,s=r-n,l=o*o+a*a;if(l>s*s/m){if(p>l){var u=e.charge/l;t.px-=o*u,t.py-=a*u}return!0}if(e.point&&l&&p>l){var u=e.pointCharge/l;t.px-=o*u,t.py-=a*u}}return!e.charge}}function e(t){t.px=ns.event.x,t.py=ns.event.y,s.resume()}var n,i,r,o,a,s={},l=ns.dispatch("start","tick","end"),u=[1,1],c=.9,d=mu,h=vu,f=-30,p=yu,g=.1,m=.64,v=[],y=[];return s.tick=function(){if((i*=.99)<.005)return l.end({type:"end",alpha:i=0}),!0;var e,n,s,d,h,p,m,b,x,w=v.length,$=y.length;for(n=0;$>n;++n)s=y[n],d=s.source,h=s.target,b=h.x-d.x,x=h.y-d.y,(p=b*b+x*x)&&(p=i*o[n]*((p=Math.sqrt(p))-r[n])/p,b*=p,x*=p,h.x-=b*(m=d.weight/(h.weight+d.weight)),h.y-=x*m,d.x+=b*(m=1-m),d.y+=x*m);if((m=i*g)&&(b=u[0]/2,x=u[1]/2,n=-1,m))for(;++n<w;)s=v[n],s.x+=(b-s.x)*m,s.y+=(x-s.y)*m;if(f)for(Zr(e=ns.geom.quadtree(v),i,a),n=-1;++n<w;)(s=v[n]).fixed||e.visit(t(s));for(n=-1;++n<w;)s=v[n],s.fixed?(s.x=s.px,s.y=s.py):(s.x-=(s.px-(s.px=s.x))*c,s.y-=(s.py-(s.py=s.y))*c);l.tick({type:"tick",alpha:i})},s.nodes=function(t){return arguments.length?(v=t,s):v},s.links=function(t){return arguments.length?(y=t,s):y},s.size=function(t){return arguments.length?(u=t,s):u},s.linkDistance=function(t){return arguments.length?(d="function"==typeof t?t:+t,s):d},s.distance=s.linkDistance,s.linkStrength=function(t){return arguments.length?(h="function"==typeof t?t:+t,s):h},s.friction=function(t){return arguments.length?(c=+t,s):c},s.charge=function(t){return arguments.length?(f="function"==typeof t?t:+t,s):f},s.chargeDistance=function(t){return arguments.length?(p=t*t,s):Math.sqrt(p)},s.gravity=function(t){return arguments.length?(g=+t,s):g},s.theta=function(t){return arguments.length?(m=t*t,s):Math.sqrt(m)},s.alpha=function(t){return arguments.length?(t=+t,i?i=t>0?t:0:t>0&&(l.start({type:"start",alpha:i=t}),ns.timer(s.tick)),s):i},s.start=function(){function t(t,i){if(!n){for(n=new Array(l),s=0;l>s;++s)n[s]=[];for(s=0;u>s;++s){var r=y[s];n[r.source.index].push(r.target),n[r.target.index].push(r.source)}}for(var o,a=n[e],s=-1,u=a.length;++s<u;)if(!isNaN(o=a[s][t]))return o;return Math.random()*i}var e,n,i,l=v.length,c=y.length,p=u[0],g=u[1];for(e=0;l>e;++e)(i=v[e]).index=e,i.weight=0;for(e=0;c>e;++e)i=y[e],"number"==typeof i.source&&(i.source=v[i.source]),"number"==typeof i.target&&(i.target=v[i.target]),++i.source.weight,++i.target.weight;for(e=0;l>e;++e)i=v[e],isNaN(i.x)&&(i.x=t("x",p)),isNaN(i.y)&&(i.y=t("y",g)),isNaN(i.px)&&(i.px=i.x),isNaN(i.py)&&(i.py=i.y);if(r=[],"function"==typeof d)for(e=0;c>e;++e)r[e]=+d.call(this,y[e],e);else for(e=0;c>e;++e)r[e]=d;if(o=[],"function"==typeof h)for(e=0;c>e;++e)o[e]=+h.call(this,y[e],e);else for(e=0;c>e;++e)o[e]=h;if(a=[],"function"==typeof f)for(e=0;l>e;++e)a[e]=+f.call(this,v[e],e);else for(e=0;l>e;++e)a[e]=f;return s.resume()},s.resume=function(){return s.alpha(.1)},s.stop=function(){return s.alpha(0)},s.drag=function(){return n||(n=ns.behavior.drag().origin(Me).on("dragstart.force",Yr).on("drag.force",e).on("dragend.force",Gr)),arguments.length?void this.on("mouseover.force",Xr).on("mouseout.force",Kr).call(n):n},ns.rebind(s,l,"on")};var mu=20,vu=1,yu=1/0;ns.layout.hierarchy=function(){function t(r){var o,a=[r],s=[];for(r.depth=0;null!=(o=a.pop());)if(s.push(o),(u=n.call(t,o,o.depth))&&(l=u.length)){for(var l,u,c;--l>=0;)a.push(c=u[l]),c.parent=o,c.depth=o.depth+1;i&&(o.value=0),o.children=u}else i&&(o.value=+i.call(t,o,o.depth)||0),delete o.children;return to(r,function(t){var n,r;e&&(n=t.children)&&n.sort(e),i&&(r=t.parent)&&(r.value+=t.value)}),s}var e=io,n=eo,i=no;return t.sort=function(n){return arguments.length?(e=n,t):e},t.children=function(e){return arguments.length?(n=e,t):n},t.value=function(e){return arguments.length?(i=e,t):i},t.revalue=function(e){return i&&(Jr(e,function(t){t.children&&(t.value=0)}),to(e,function(e){var n;e.children||(e.value=+i.call(t,e,e.depth)||0),(n=e.parent)&&(n.value+=e.value)})),e},t},ns.layout.partition=function(){function t(e,n,i,r){var o=e.children;if(e.x=n,e.y=e.depth*r,e.dx=i,e.dy=r,o&&(a=o.length)){var a,s,l,u=-1;for(i=e.value?i/e.value:0;++u<a;)t(s=o[u],n,l=s.value*i,r),n+=l}}function e(t){var n=t.children,i=0;if(n&&(r=n.length))for(var r,o=-1;++o<r;)i=Math.max(i,e(n[o]));return 1+i}function n(n,o){var a=i.call(this,n,o);return t(a[0],0,r[0],r[1]/e(a[0])),a}var i=ns.layout.hierarchy(),r=[1,1];return n.size=function(t){return arguments.length?(r=t,n):r},Qr(n,i)},ns.layout.pie=function(){function t(a){var s,l=a.length,u=a.map(function(n,i){return+e.call(t,n,i)}),c=+("function"==typeof i?i.apply(this,arguments):i),d=("function"==typeof r?r.apply(this,arguments):r)-c,h=Math.min(Math.abs(d)/l,+("function"==typeof o?o.apply(this,arguments):o)),f=h*(0>d?-1:1),p=(d-l*f)/ns.sum(u),g=ns.range(l),m=[];return null!=n&&g.sort(n===bu?function(t,e){return u[e]-u[t]}:function(t,e){return n(a[t],a[e])}),g.forEach(function(t){m[t]={data:a[t],value:s=u[t],startAngle:c,endAngle:c+=s*p+f,padAngle:h}}),m}var e=Number,n=bu,i=0,r=Fs,o=0;return t.value=function(n){return arguments.length?(e=n,t):e},t.sort=function(e){return arguments.length?(n=e,t):n},t.startAngle=function(e){return arguments.length?(i=e,t):i},t.endAngle=function(e){return arguments.length?(r=e,t):r},t.padAngle=function(e){return arguments.length?(o=e,t):o},t};var bu={};ns.layout.stack=function(){function t(s,l){if(!(h=s.length))return s;var u=s.map(function(n,i){return e.call(t,n,i)}),c=u.map(function(e){return e.map(function(e,n){return[o.call(t,e,n),a.call(t,e,n)]})}),d=n.call(t,c,l);u=ns.permute(u,d),c=ns.permute(c,d);var h,f,p,g,m=i.call(t,c,l),v=u[0].length;for(p=0;v>p;++p)for(r.call(t,u[0][p],g=m[p],c[0][p][1]),f=1;h>f;++f)r.call(t,u[f][p],g+=c[f-1][p][1],c[f][p][1]);return s}var e=Me,n=lo,i=uo,r=so,o=oo,a=ao;return t.values=function(n){return arguments.length?(e=n,t):e},t.order=function(e){return arguments.length?(n="function"==typeof e?e:xu.get(e)||lo,t):n},t.offset=function(e){return arguments.length?(i="function"==typeof e?e:wu.get(e)||uo,t):i},t.x=function(e){return arguments.length?(o=e,t):o},t.y=function(e){return arguments.length?(a=e,t):a},t.out=function(e){return arguments.length?(r=e,t):r},t};var xu=ns.map({"inside-out":function(t){var e,n,i=t.length,r=t.map(co),o=t.map(ho),a=ns.range(i).sort(function(t,e){return r[t]-r[e]}),s=0,l=0,u=[],c=[];for(e=0;i>e;++e)n=a[e],l>s?(s+=o[n],u.push(n)):(l+=o[n],c.push(n));return c.reverse().concat(u)},reverse:function(t){return ns.range(t.length).reverse()},"default":lo}),wu=ns.map({silhouette:function(t){var e,n,i,r=t.length,o=t[0].length,a=[],s=0,l=[];for(n=0;o>n;++n){for(e=0,i=0;r>e;e++)i+=t[e][n][1];i>s&&(s=i),a.push(i)}for(n=0;o>n;++n)l[n]=(s-a[n])/2;return l},wiggle:function(t){var e,n,i,r,o,a,s,l,u,c=t.length,d=t[0],h=d.length,f=[];for(f[0]=l=u=0,n=1;h>n;++n){for(e=0,r=0;c>e;++e)r+=t[e][n][1];for(e=0,o=0,s=d[n][0]-d[n-1][0];c>e;++e){for(i=0,a=(t[e][n][1]-t[e][n-1][1])/(2*s);e>i;++i)a+=(t[i][n][1]-t[i][n-1][1])/s;o+=a*t[e][n][1]}f[n]=l-=r?o/r*s:0,u>l&&(u=l)}for(n=0;h>n;++n)f[n]-=u;return f},expand:function(t){var e,n,i,r=t.length,o=t[0].length,a=1/r,s=[];for(n=0;o>n;++n){for(e=0,i=0;r>e;e++)i+=t[e][n][1];if(i)for(e=0;r>e;e++)t[e][n][1]/=i;else for(e=0;r>e;e++)t[e][n][1]=a}for(n=0;o>n;++n)s[n]=0;return s},zero:uo});ns.layout.histogram=function(){function t(t,o){for(var a,s,l=[],u=t.map(n,this),c=i.call(this,u,o),d=r.call(this,c,u,o),o=-1,h=u.length,f=d.length-1,p=e?1:1/h;++o<f;)a=l[o]=[],a.dx=d[o+1]-(a.x=d[o]),a.y=0;if(f>0)for(o=-1;++o<h;)s=u[o],s>=c[0]&&s<=c[1]&&(a=l[ns.bisect(d,s,1,f)-1],a.y+=p,a.push(t[o]));return l}var e=!0,n=Number,i=mo,r=po;return t.value=function(e){return arguments.length?(n=e,t):n},t.range=function(e){return arguments.length?(i=Ce(e),t):i},t.bins=function(e){return arguments.length?(r="number"==typeof e?function(t){return go(t,e)}:Ce(e),t):r},t.frequency=function(n){return arguments.length?(e=!!n,t):e},t},ns.layout.pack=function(){function t(t,o){var a=n.call(this,t,o),s=a[0],l=r[0],u=r[1],c=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(s.x=s.y=0,to(s,function(t){t.r=+c(t.value)}),to(s,wo),i){var d=i*(e?1:Math.max(2*s.r/l,2*s.r/u))/2;to(s,function(t){t.r+=d}),to(s,wo),to(s,function(t){t.r-=d})}return _o(s,l/2,u/2,e?1:1/Math.max(2*s.r/l,2*s.r/u)),a}var e,n=ns.layout.hierarchy().sort(vo),i=0,r=[1,1];return t.size=function(e){return arguments.length?(r=e,t):r},t.radius=function(n){return arguments.length?(e=null==n||"function"==typeof n?n:+n,t):e},t.padding=function(e){return arguments.length?(i=+e,t):i},Qr(t,n)},ns.layout.tree=function(){function t(t,r){var c=a.call(this,t,r),d=c[0],h=e(d);if(to(h,n),h.parent.m=-h.z,Jr(h,i),u)Jr(d,o);else{var f=d,p=d,g=d;Jr(d,function(t){t.x<f.x&&(f=t),t.x>p.x&&(p=t),t.depth>g.depth&&(g=t)});var m=s(f,p)/2-f.x,v=l[0]/(p.x+s(p,f)/2+m),y=l[1]/(g.depth||1);Jr(d,function(t){t.x=(t.x+m)*v,t.y=t.depth*y})}return c}function e(t){for(var e,n={A:null,children:[t]},i=[n];null!=(e=i.pop());)for(var r,o=e.children,a=0,s=o.length;s>a;++a)i.push((o[a]=r={_:o[a],parent:e,children:(r=o[a].children)&&r.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:a}).a=r);return n.children[0]}function n(t){var e=t.children,n=t.parent.children,i=t.i?n[t.i-1]:null;if(e.length){Ao(t);var o=(e[0].z+e[e.length-1].z)/2;i?(t.z=i.z+s(t._,i._),t.m=t.z-o):t.z=o}else i&&(t.z=i.z+s(t._,i._));t.parent.A=r(t,i,t.parent.A||n[0])}function i(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function r(t,e,n){if(e){for(var i,r=t,o=t,a=e,l=r.parent.children[0],u=r.m,c=o.m,d=a.m,h=l.m;a=So(a),r=Do(r),a&&r;)l=Do(l),o=So(o),o.a=t,i=a.z+d-r.z-u+s(a._,r._),i>0&&(To(Eo(a,t,n),t,i),u+=i,c+=i),d+=a.m,u+=r.m,h+=l.m,c+=o.m;a&&!So(o)&&(o.t=a,o.m+=d-c),r&&!Do(l)&&(l.t=r,l.m+=u-h,n=t)}return n}function o(t){t.x*=l[0],t.y=t.depth*l[1]}var a=ns.layout.hierarchy().sort(null).value(null),s=Mo,l=[1,1],u=null;return t.separation=function(e){return arguments.length?(s=e,t):s},t.size=function(e){return arguments.length?(u=null==(l=e)?o:null,t):u?null:l
},t.nodeSize=function(e){return arguments.length?(u=null==(l=e)?null:o,t):u?l:null},Qr(t,a)},ns.layout.cluster=function(){function t(t,o){var a,s=e.call(this,t,o),l=s[0],u=0;to(l,function(t){var e=t.children;e&&e.length?(t.x=No(e),t.y=Oo(e)):(t.x=a?u+=n(t,a):0,t.y=0,a=t)});var c=Io(l),d=Po(l),h=c.x-n(c,d)/2,f=d.x+n(d,c)/2;return to(l,r?function(t){t.x=(t.x-l.x)*i[0],t.y=(l.y-t.y)*i[1]}:function(t){t.x=(t.x-h)/(f-h)*i[0],t.y=(1-(l.y?t.y/l.y:1))*i[1]}),s}var e=ns.layout.hierarchy().sort(null).value(null),n=Mo,i=[1,1],r=!1;return t.separation=function(e){return arguments.length?(n=e,t):n},t.size=function(e){return arguments.length?(r=null==(i=e),t):r?null:i},t.nodeSize=function(e){return arguments.length?(r=null!=(i=e),t):r?i:null},Qr(t,e)},ns.layout.treemap=function(){function t(t,e){for(var n,i,r=-1,o=t.length;++r<o;)i=(n=t[r]).value*(0>e?0:e),n.area=isNaN(i)||0>=i?0:i}function e(n){var o=n.children;if(o&&o.length){var a,s,l,u=d(n),c=[],h=o.slice(),p=1/0,g="slice"===f?u.dx:"dice"===f?u.dy:"slice-dice"===f?1&n.depth?u.dy:u.dx:Math.min(u.dx,u.dy);for(t(h,u.dx*u.dy/n.value),c.area=0;(l=h.length)>0;)c.push(a=h[l-1]),c.area+=a.area,"squarify"!==f||(s=i(c,g))<=p?(h.pop(),p=s):(c.area-=c.pop().area,r(c,g,u,!1),g=Math.min(u.dx,u.dy),c.length=c.area=0,p=1/0);c.length&&(r(c,g,u,!0),c.length=c.area=0),o.forEach(e)}}function n(e){var i=e.children;if(i&&i.length){var o,a=d(e),s=i.slice(),l=[];for(t(s,a.dx*a.dy/e.value),l.area=0;o=s.pop();)l.push(o),l.area+=o.area,null!=o.z&&(r(l,o.z?a.dx:a.dy,a,!s.length),l.length=l.area=0);i.forEach(n)}}function i(t,e){for(var n,i=t.area,r=0,o=1/0,a=-1,s=t.length;++a<s;)(n=t[a].area)&&(o>n&&(o=n),n>r&&(r=n));return i*=i,e*=e,i?Math.max(e*r*p/i,i/(e*o*p)):1/0}function r(t,e,n,i){var r,o=-1,a=t.length,s=n.x,u=n.y,c=e?l(t.area/e):0;if(e==n.dx){for((i||c>n.dy)&&(c=n.dy);++o<a;)r=t[o],r.x=s,r.y=u,r.dy=c,s+=r.dx=Math.min(n.x+n.dx-s,c?l(r.area/c):0);r.z=!0,r.dx+=n.x+n.dx-s,n.y+=c,n.dy-=c}else{for((i||c>n.dx)&&(c=n.dx);++o<a;)r=t[o],r.x=s,r.y=u,r.dx=c,u+=r.dy=Math.min(n.y+n.dy-u,c?l(r.area/c):0);r.z=!1,r.dy+=n.y+n.dy-u,n.x+=c,n.dx-=c}}function o(i){var r=a||s(i),o=r[0];return o.x=0,o.y=0,o.dx=u[0],o.dy=u[1],a&&s.revalue(o),t([o],o.dx*o.dy/o.value),(a?n:e)(o),h&&(a=r),r}var a,s=ns.layout.hierarchy(),l=Math.round,u=[1,1],c=null,d=Ho,h=!1,f="squarify",p=.5*(1+Math.sqrt(5));return o.size=function(t){return arguments.length?(u=t,o):u},o.padding=function(t){function e(e){var n=t.call(o,e,e.depth);return null==n?Ho(e):Fo(e,"number"==typeof n?[n,n,n,n]:n)}function n(e){return Fo(e,t)}if(!arguments.length)return c;var i;return d=null==(c=t)?Ho:"function"==(i=typeof t)?e:"number"===i?(t=[t,t,t,t],n):n,o},o.round=function(t){return arguments.length?(l=t?Math.round:Number,o):l!=Number},o.sticky=function(t){return arguments.length?(h=t,a=null,o):h},o.ratio=function(t){return arguments.length?(p=t,o):p},o.mode=function(t){return arguments.length?(f=t+"",o):f},Qr(o,s)},ns.random={normal:function(t,e){var n=arguments.length;return 2>n&&(e=1),1>n&&(t=0),function(){var n,i,r;do n=2*Math.random()-1,i=2*Math.random()-1,r=n*n+i*i;while(!r||r>1);return t+e*n*Math.sqrt(-2*Math.log(r)/r)}},logNormal:function(){var t=ns.random.normal.apply(ns,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=ns.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,n=0;t>n;n++)e+=Math.random();return e}}},ns.scale={};var $u={floor:Me,ceil:Me};ns.scale.linear=function(){return Vo([0,1],[0,1],yr,!1)};var ku={s:1,g:1,p:1,r:1,e:1};ns.scale.log=function(){return Qo(ns.scale.linear().domain([0,1]),10,!0,[1,10])};var _u=ns.format(".0e"),Cu={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};ns.scale.pow=function(){return Jo(ns.scale.linear(),1,[0,1])},ns.scale.sqrt=function(){return ns.scale.pow().exponent(.5)},ns.scale.ordinal=function(){return ea([],{t:"range",a:[[]]})},ns.scale.category10=function(){return ns.scale.ordinal().range(Mu)},ns.scale.category20=function(){return ns.scale.ordinal().range(Du)},ns.scale.category20b=function(){return ns.scale.ordinal().range(Su)},ns.scale.category20c=function(){return ns.scale.ordinal().range(Tu)};var Mu=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(ye),Du=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(ye),Su=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(ye),Tu=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(ye);ns.scale.quantile=function(){return na([],[])},ns.scale.quantize=function(){return ia(0,1,[0,1])},ns.scale.threshold=function(){return ra([.5],[0,1])},ns.scale.identity=function(){return oa([0,1])},ns.svg={},ns.svg.arc=function(){function t(){var t=Math.max(0,+n.apply(this,arguments)),u=Math.max(0,+i.apply(this,arguments)),c=a.apply(this,arguments)-Ls,d=s.apply(this,arguments)-Ls,h=Math.abs(d-c),f=c>d?0:1;if(t>u&&(p=u,u=t,t=p),h>=Ws)return e(u,f)+(t?e(t,1-f):"")+"Z";var p,g,m,v,y,b,x,w,$,k,_,C,M=0,D=0,S=[];if((v=(+l.apply(this,arguments)||0)/2)&&(m=o===Au?Math.sqrt(t*t+u*u):+o.apply(this,arguments),f||(D*=-1),u&&(D=te(m/u*Math.sin(v))),t&&(M=te(m/t*Math.sin(v)))),u){y=u*Math.cos(c+D),b=u*Math.sin(c+D),x=u*Math.cos(d-D),w=u*Math.sin(d-D);var T=Math.abs(d-c-2*D)<=Hs?0:1;if(D&&ha(y,b,x,w)===f^T){var A=(c+d)/2;y=u*Math.cos(A),b=u*Math.sin(A),x=w=null}}else y=b=0;if(t){$=t*Math.cos(d-M),k=t*Math.sin(d-M),_=t*Math.cos(c+M),C=t*Math.sin(c+M);var E=Math.abs(c-d+2*M)<=Hs?0:1;if(M&&ha($,k,_,C)===1-f^E){var O=(c+d)/2;$=t*Math.cos(O),k=t*Math.sin(O),_=C=null}}else $=k=0;if((p=Math.min(Math.abs(u-t)/2,+r.apply(this,arguments)))>.001){g=u>t^f?0:1;var N=null==_?[$,k]:null==x?[y,b]:Ni([y,b],[_,C],[x,w],[$,k]),I=y-N[0],P=b-N[1],H=x-N[0],F=w-N[1],W=1/Math.sin(Math.acos((I*H+P*F)/(Math.sqrt(I*I+P*P)*Math.sqrt(H*H+F*F)))/2),L=Math.sqrt(N[0]*N[0]+N[1]*N[1]);if(null!=x){var z=Math.min(p,(u-L)/(W+1)),R=fa(null==_?[$,k]:[_,C],[y,b],u,z,f),j=fa([x,w],[$,k],u,z,f);p===z?S.push("M",R[0],"A",z,",",z," 0 0,",g," ",R[1],"A",u,",",u," 0 ",1-f^ha(R[1][0],R[1][1],j[1][0],j[1][1]),",",f," ",j[1],"A",z,",",z," 0 0,",g," ",j[0]):S.push("M",R[0],"A",z,",",z," 0 1,",g," ",j[0])}else S.push("M",y,",",b);if(null!=_){var q=Math.min(p,(t-L)/(W-1)),V=fa([y,b],[_,C],t,-q,f),B=fa([$,k],null==x?[y,b]:[x,w],t,-q,f);p===q?S.push("L",B[0],"A",q,",",q," 0 0,",g," ",B[1],"A",t,",",t," 0 ",f^ha(B[1][0],B[1][1],V[1][0],V[1][1]),",",1-f," ",V[1],"A",q,",",q," 0 0,",g," ",V[0]):S.push("L",B[0],"A",q,",",q," 0 0,",g," ",V[0])}else S.push("L",$,",",k)}else S.push("M",y,",",b),null!=x&&S.push("A",u,",",u," 0 ",T,",",f," ",x,",",w),S.push("L",$,",",k),null!=_&&S.push("A",t,",",t," 0 ",E,",",1-f," ",_,",",C);return S.push("Z"),S.join("")}function e(t,e){return"M0,"+t+"A"+t+","+t+" 0 1,"+e+" 0,"+-t+"A"+t+","+t+" 0 1,"+e+" 0,"+t}var n=sa,i=la,r=aa,o=Au,a=ua,s=ca,l=da;return t.innerRadius=function(e){return arguments.length?(n=Ce(e),t):n},t.outerRadius=function(e){return arguments.length?(i=Ce(e),t):i},t.cornerRadius=function(e){return arguments.length?(r=Ce(e),t):r},t.padRadius=function(e){return arguments.length?(o=e==Au?Au:Ce(e),t):o},t.startAngle=function(e){return arguments.length?(a=Ce(e),t):a},t.endAngle=function(e){return arguments.length?(s=Ce(e),t):s},t.padAngle=function(e){return arguments.length?(l=Ce(e),t):l},t.centroid=function(){var t=(+n.apply(this,arguments)+ +i.apply(this,arguments))/2,e=(+a.apply(this,arguments)+ +s.apply(this,arguments))/2-Ls;return[Math.cos(e)*t,Math.sin(e)*t]},t};var Au="auto";ns.svg.line=function(){return pa(Me)};var Eu=ns.map({linear:ga,"linear-closed":ma,step:va,"step-before":ya,"step-after":ba,basis:Ca,"basis-open":Ma,"basis-closed":Da,bundle:Sa,cardinal:$a,"cardinal-open":xa,"cardinal-closed":wa,monotone:Ia});Eu.forEach(function(t,e){e.key=t,e.closed=/-closed$/.test(t)});var Ou=[0,2/3,1/3,0],Nu=[0,1/3,2/3,0],Iu=[0,1/6,2/3,1/6];ns.svg.line.radial=function(){var t=pa(Pa);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},ya.reverse=ba,ba.reverse=ya,ns.svg.area=function(){return Ha(Me)},ns.svg.area.radial=function(){var t=Ha(Pa);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},ns.svg.chord=function(){function t(t,s){var l=e(this,o,t,s),u=e(this,a,t,s);return"M"+l.p0+i(l.r,l.p1,l.a1-l.a0)+(n(l,u)?r(l.r,l.p1,l.r,l.p0):r(l.r,l.p1,u.r,u.p0)+i(u.r,u.p1,u.a1-u.a0)+r(u.r,u.p1,l.r,l.p0))+"Z"}function e(t,e,n,i){var r=e.call(t,n,i),o=s.call(t,r,i),a=l.call(t,r,i)-Ls,c=u.call(t,r,i)-Ls;return{r:o,a0:a,a1:c,p0:[o*Math.cos(a),o*Math.sin(a)],p1:[o*Math.cos(c),o*Math.sin(c)]}}function n(t,e){return t.a0==e.a0&&t.a1==e.a1}function i(t,e,n){return"A"+t+","+t+" 0 "+ +(n>Hs)+",1 "+e}function r(t,e,n,i){return"Q 0,0 "+i}var o=yi,a=bi,s=Fa,l=ua,u=ca;return t.radius=function(e){return arguments.length?(s=Ce(e),t):s},t.source=function(e){return arguments.length?(o=Ce(e),t):o},t.target=function(e){return arguments.length?(a=Ce(e),t):a},t.startAngle=function(e){return arguments.length?(l=Ce(e),t):l},t.endAngle=function(e){return arguments.length?(u=Ce(e),t):u},t},ns.svg.diagonal=function(){function t(t,r){var o=e.call(this,t,r),a=n.call(this,t,r),s=(o.y+a.y)/2,l=[o,{x:o.x,y:s},{x:a.x,y:s},a];return l=l.map(i),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var e=yi,n=bi,i=Wa;return t.source=function(n){return arguments.length?(e=Ce(n),t):e},t.target=function(e){return arguments.length?(n=Ce(e),t):n},t.projection=function(e){return arguments.length?(i=e,t):i},t},ns.svg.diagonal.radial=function(){var t=ns.svg.diagonal(),e=Wa,n=t.projection;return t.projection=function(t){return arguments.length?n(La(e=t)):e},t},ns.svg.symbol=function(){function t(t,i){return(Pu.get(e.call(this,t,i))||ja)(n.call(this,t,i))}var e=Ra,n=za;return t.type=function(n){return arguments.length?(e=Ce(n),t):e},t.size=function(e){return arguments.length?(n=Ce(e),t):n},t};var Pu=ns.map({circle:ja,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*Fu)),n=e*Fu;return"M0,"+-e+"L"+n+",0 0,"+e+" "+-n+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/Hu),n=e*Hu/2;return"M0,"+n+"L"+e+","+-n+" "+-e+","+-n+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/Hu),n=e*Hu/2;return"M0,"+-n+"L"+e+","+n+" "+-e+","+n+"Z"}});ns.svg.symbolTypes=Pu.keys();var Hu=Math.sqrt(3),Fu=Math.tan(30*zs);Ms.transition=function(t){for(var e,n,i=Wu||++ju,r=Ya(t),o=[],a=Lu||{time:Date.now(),ease:Cr,delay:0,duration:250},s=-1,l=this.length;++s<l;){o.push(e=[]);for(var u=this[s],c=-1,d=u.length;++c<d;)(n=u[c])&&Ga(n,c,r,i,a),e.push(n)}return Va(o,r,i)},Ms.interrupt=function(t){return this.each(null==t?zu:qa(Ya(t)))};var Wu,Lu,zu=qa(Ya()),Ru=[],ju=0;Ru.call=Ms.call,Ru.empty=Ms.empty,Ru.node=Ms.node,Ru.size=Ms.size,ns.transition=function(t,e){return t&&t.transition?Wu?t.transition(e):t:Ts.transition(t)},ns.transition.prototype=Ru,Ru.select=function(t){var e,n,i,r=this.id,o=this.namespace,a=[];t=C(t);for(var s=-1,l=this.length;++s<l;){a.push(e=[]);for(var u=this[s],c=-1,d=u.length;++c<d;)(i=u[c])&&(n=t.call(i,i.__data__,c,s))?("__data__"in i&&(n.__data__=i.__data__),Ga(n,c,o,r,i[o][r]),e.push(n)):e.push(null)}return Va(a,o,r)},Ru.selectAll=function(t){var e,n,i,r,o,a=this.id,s=this.namespace,l=[];t=M(t);for(var u=-1,c=this.length;++u<c;)for(var d=this[u],h=-1,f=d.length;++h<f;)if(i=d[h]){o=i[s][a],n=t.call(i,i.__data__,h,u),l.push(e=[]);for(var p=-1,g=n.length;++p<g;)(r=n[p])&&Ga(r,p,s,a,o),e.push(r)}return Va(l,s,a)},Ru.filter=function(t){var e,n,i,r=[];"function"!=typeof t&&(t=W(t));for(var o=0,a=this.length;a>o;o++){r.push(e=[]);for(var n=this[o],s=0,l=n.length;l>s;s++)(i=n[s])&&t.call(i,i.__data__,s,o)&&e.push(i)}return Va(r,this.namespace,this.id)},Ru.tween=function(t,e){var n=this.id,i=this.namespace;return arguments.length<2?this.node()[i][n].tween.get(t):z(this,null==e?function(e){e[i][n].tween.remove(t)}:function(r){r[i][n].tween.set(t,e)})},Ru.attr=function(t,e){function n(){this.removeAttribute(s)}function i(){this.removeAttributeNS(s.space,s.local)}function r(t){return null==t?n:(t+="",function(){var e,n=this.getAttribute(s);return n!==t&&(e=a(n,t),function(t){this.setAttribute(s,e(t))})})}function o(t){return null==t?i:(t+="",function(){var e,n=this.getAttributeNS(s.space,s.local);return n!==t&&(e=a(n,t),function(t){this.setAttributeNS(s.space,s.local,e(t))})})}if(arguments.length<2){for(e in t)this.attr(e,t[e]);return this}var a="transform"==t?Rr:yr,s=ns.ns.qualify(t);return Ba(this,"attr."+t,e,s.local?o:r)},Ru.attrTween=function(t,e){function n(t,n){var i=e.call(this,t,n,this.getAttribute(r));return i&&function(t){this.setAttribute(r,i(t))}}function i(t,n){var i=e.call(this,t,n,this.getAttributeNS(r.space,r.local));return i&&function(t){this.setAttributeNS(r.space,r.local,i(t))}}var r=ns.ns.qualify(t);return this.tween("attr."+t,r.local?i:n)},Ru.style=function(t,e,n){function i(){this.style.removeProperty(t)}function r(e){return null==e?i:(e+="",function(){var i,r=ss.getComputedStyle(this,null).getPropertyValue(t);return r!==e&&(i=yr(r,e),function(e){this.style.setProperty(t,i(e),n)})})}var o=arguments.length;if(3>o){if("string"!=typeof t){2>o&&(e="");for(n in t)this.style(n,t[n],e);return this}n=""}return Ba(this,"style."+t,e,r)},Ru.styleTween=function(t,e,n){function i(i,r){var o=e.call(this,i,r,ss.getComputedStyle(this,null).getPropertyValue(t));return o&&function(e){this.style.setProperty(t,o(e),n)}}return arguments.length<3&&(n=""),this.tween("style."+t,i)},Ru.text=function(t){return Ba(this,"text",t,Ua)},Ru.remove=function(){var t=this.namespace;return this.each("end.transition",function(){var e;this[t].count<2&&(e=this.parentNode)&&e.removeChild(this)})},Ru.ease=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].ease:("function"!=typeof t&&(t=ns.ease.apply(ns,arguments)),z(this,function(i){i[n][e].ease=t}))},Ru.delay=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].delay:z(this,"function"==typeof t?function(i,r,o){i[n][e].delay=+t.call(i,i.__data__,r,o)}:(t=+t,function(i){i[n][e].delay=t}))},Ru.duration=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].duration:z(this,"function"==typeof t?function(i,r,o){i[n][e].duration=Math.max(1,t.call(i,i.__data__,r,o))}:(t=Math.max(1,t),function(i){i[n][e].duration=t}))},Ru.each=function(t,e){var n=this.id,i=this.namespace;if(arguments.length<2){var r=Lu,o=Wu;try{Wu=n,z(this,function(e,r,o){Lu=e[i][n],t.call(e,e.__data__,r,o)})}finally{Lu=r,Wu=o}}else z(this,function(r){var o=r[i][n];(o.event||(o.event=ns.dispatch("start","end","interrupt"))).on(t,e)});return this},Ru.transition=function(){for(var t,e,n,i,r=this.id,o=++ju,a=this.namespace,s=[],l=0,u=this.length;u>l;l++){s.push(t=[]);for(var e=this[l],c=0,d=e.length;d>c;c++)(n=e[c])&&(i=n[a][r],Ga(n,c,a,o,{time:i.time,ease:i.ease,delay:i.delay+i.duration,duration:i.duration})),t.push(n)}return Va(s,a,o)},ns.svg.axis=function(){function t(t){t.each(function(){var t,u=ns.select(this),c=this.__chart__||n,d=this.__chart__=n.copy(),h=null==l?d.ticks?d.ticks.apply(d,s):d.domain():l,f=null==e?d.tickFormat?d.tickFormat.apply(d,s):Me:e,p=u.selectAll(".tick").data(h,d),g=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Is),m=ns.transition(p.exit()).style("opacity",Is).remove(),v=ns.transition(p.order()).style("opacity",1),y=Math.max(r,0)+a,b=Lo(d),x=u.selectAll(".domain").data([0]),w=(x.enter().append("path").attr("class","domain"),ns.transition(x));g.append("line"),g.append("text");var $,k,_,C,M=g.select("line"),D=v.select("line"),S=p.select("text").text(f),T=g.select("text"),A=v.select("text"),E="top"===i||"left"===i?-1:1;if("bottom"===i||"top"===i?(t=Xa,$="x",_="y",k="x2",C="y2",S.attr("dy",0>E?"0em":".71em").style("text-anchor","middle"),w.attr("d","M"+b[0]+","+E*o+"V0H"+b[1]+"V"+E*o)):(t=Ka,$="y",_="x",k="y2",C="x2",S.attr("dy",".32em").style("text-anchor",0>E?"end":"start"),w.attr("d","M"+E*o+","+b[0]+"H0V"+b[1]+"H"+E*o)),M.attr(C,E*r),T.attr(_,E*y),D.attr(k,0).attr(C,E*r),A.attr($,0).attr(_,E*y),d.rangeBand){var O=d,N=O.rangeBand()/2;c=d=function(t){return O(t)+N}}else c.rangeBand?c=d:m.call(t,d,c);g.call(t,c,d),v.call(t,d,d)})}var e,n=ns.scale.linear(),i=qu,r=6,o=6,a=3,s=[10],l=null;return t.scale=function(e){return arguments.length?(n=e,t):n},t.orient=function(e){return arguments.length?(i=e in Vu?e+"":qu,t):i},t.ticks=function(){return arguments.length?(s=arguments,t):s},t.tickValues=function(e){return arguments.length?(l=e,t):l},t.tickFormat=function(n){return arguments.length?(e=n,t):e},t.tickSize=function(e){var n=arguments.length;return n?(r=+e,o=+arguments[n-1],t):r},t.innerTickSize=function(e){return arguments.length?(r=+e,t):r},t.outerTickSize=function(e){return arguments.length?(o=+e,t):o},t.tickPadding=function(e){return arguments.length?(a=+e,t):a},t.tickSubdivide=function(){return arguments.length&&t},t};var qu="bottom",Vu={top:1,right:1,bottom:1,left:1};ns.svg.brush=function(){function t(o){o.each(function(){var o=ns.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",r).on("touchstart.brush",r),a=o.selectAll(".background").data([0]);a.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),o.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var s=o.selectAll(".resize").data(p,Me);s.exit().remove(),s.enter().append("g").attr("class",function(t){return"resize "+t}).style("cursor",function(t){return Bu[t]}).append("rect").attr("x",function(t){return/[ew]$/.test(t)?-3:null}).attr("y",function(t){return/^[ns]/.test(t)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),s.style("display",t.empty()?"none":null);var c,d=ns.transition(o),h=ns.transition(a);l&&(c=Lo(l),h.attr("x",c[0]).attr("width",c[1]-c[0]),n(d)),u&&(c=Lo(u),h.attr("y",c[0]).attr("height",c[1]-c[0]),i(d)),e(d)})}function e(t){t.selectAll(".resize").attr("transform",function(t){return"translate("+c[+/e$/.test(t)]+","+d[+/^s/.test(t)]+")"})}function n(t){t.select(".extent").attr("x",c[0]),t.selectAll(".extent,.n>rect,.s>rect").attr("width",c[1]-c[0])}function i(t){t.select(".extent").attr("y",d[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",d[1]-d[0])}function r(){function r(){32==ns.event.keyCode&&(S||(y=null,A[0]-=c[1],A[1]-=d[1],S=2),w())}function p(){32==ns.event.keyCode&&2==S&&(A[0]+=c[1],A[1]+=d[1],S=0,w())}function g(){var t=ns.mouse(x),r=!1;b&&(t[0]+=b[0],t[1]+=b[1]),S||(ns.event.altKey?(y||(y=[(c[0]+c[1])/2,(d[0]+d[1])/2]),A[0]=c[+(t[0]<y[0])],A[1]=d[+(t[1]<y[1])]):y=null),M&&m(t,l,0)&&(n(_),r=!0),D&&m(t,u,1)&&(i(_),r=!0),r&&(e(_),k({type:"brush",mode:S?"move":"resize"}))}function m(t,e,n){var i,r,s=Lo(e),l=s[0],u=s[1],p=A[n],g=n?d:c,m=g[1]-g[0];return S&&(l-=p,u-=m+p),i=(n?f:h)?Math.max(l,Math.min(u,t[n])):t[n],S?r=(i+=p)+m:(y&&(p=Math.max(l,Math.min(u,2*y[n]-i))),i>p?(r=i,i=p):r=p),g[0]!=i||g[1]!=r?(n?a=null:o=null,g[0]=i,g[1]=r,!0):void 0}function v(){g(),_.style("pointer-events","all").selectAll(".resize").style("display",t.empty()?"none":null),ns.select("body").style("cursor",null),E.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),T(),k({type:"brushend"})}var y,b,x=this,$=ns.select(ns.event.target),k=s.of(x,arguments),_=ns.select(x),C=$.datum(),M=!/^(n|s)$/.test(C)&&l,D=!/^(e|w)$/.test(C)&&u,S=$.classed("extent"),T=U(),A=ns.mouse(x),E=ns.select(ss).on("keydown.brush",r).on("keyup.brush",p);if(ns.event.changedTouches?E.on("touchmove.brush",g).on("touchend.brush",v):E.on("mousemove.brush",g).on("mouseup.brush",v),_.interrupt().selectAll("*").interrupt(),S)A[0]=c[0]-A[0],A[1]=d[0]-A[1];else if(C){var O=+/w$/.test(C),N=+/^n/.test(C);b=[c[1-O]-A[0],d[1-N]-A[1]],A[0]=c[O],A[1]=d[N]}else ns.event.altKey&&(y=A.slice());_.style("pointer-events","none").selectAll(".resize").style("display",null),ns.select("body").style("cursor",$.style("cursor")),k({type:"brushstart"}),g()}var o,a,s=k(t,"brushstart","brush","brushend"),l=null,u=null,c=[0,0],d=[0,0],h=!0,f=!0,p=Uu[0];return t.event=function(t){t.each(function(){var t=s.of(this,arguments),e={x:c,y:d,i:o,j:a},n=this.__chart__||e;this.__chart__=e,Wu?ns.select(this).transition().each("start.brush",function(){o=n.i,a=n.j,c=n.x,d=n.y,t({type:"brushstart"})}).tween("brush:brush",function(){var n=br(c,e.x),i=br(d,e.y);return o=a=null,function(r){c=e.x=n(r),d=e.y=i(r),t({type:"brush",mode:"resize"})}}).each("end.brush",function(){o=e.i,a=e.j,t({type:"brush",mode:"resize"}),t({type:"brushend"})}):(t({type:"brushstart"}),t({type:"brush",mode:"resize"}),t({type:"brushend"}))})},t.x=function(e){return arguments.length?(l=e,p=Uu[!l<<1|!u],t):l},t.y=function(e){return arguments.length?(u=e,p=Uu[!l<<1|!u],t):u},t.clamp=function(e){return arguments.length?(l&&u?(h=!!e[0],f=!!e[1]):l?h=!!e:u&&(f=!!e),t):l&&u?[h,f]:l?h:u?f:null},t.extent=function(e){var n,i,r,s,h;return arguments.length?(l&&(n=e[0],i=e[1],u&&(n=n[0],i=i[0]),o=[n,i],l.invert&&(n=l(n),i=l(i)),n>i&&(h=n,n=i,i=h),(n!=c[0]||i!=c[1])&&(c=[n,i])),u&&(r=e[0],s=e[1],l&&(r=r[1],s=s[1]),a=[r,s],u.invert&&(r=u(r),s=u(s)),r>s&&(h=r,r=s,s=h),(r!=d[0]||s!=d[1])&&(d=[r,s])),t):(l&&(o?(n=o[0],i=o[1]):(n=c[0],i=c[1],l.invert&&(n=l.invert(n),i=l.invert(i)),n>i&&(h=n,n=i,i=h))),u&&(a?(r=a[0],s=a[1]):(r=d[0],s=d[1],u.invert&&(r=u.invert(r),s=u.invert(s)),r>s&&(h=r,r=s,s=h))),l&&u?[[n,r],[i,s]]:l?[n,i]:u&&[r,s])},t.clear=function(){return t.empty()||(c=[0,0],d=[0,0],o=a=null),t},t.empty=function(){return!!l&&c[0]==c[1]||!!u&&d[0]==d[1]},ns.rebind(t,s,"on")};var Bu={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Uu=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Yu=hl.format=yl.timeFormat,Gu=Yu.utc,Xu=Gu("%Y-%m-%dT%H:%M:%S.%LZ");Yu.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Za:Xu,Za.parse=function(t){var e=new Date(t);return isNaN(e)?null:e},Za.toString=Xu.toString,hl.second=Le(function(t){return new fl(1e3*Math.floor(t/1e3))},function(t,e){t.setTime(t.getTime()+1e3*Math.floor(e))},function(t){return t.getSeconds()}),hl.seconds=hl.second.range,hl.seconds.utc=hl.second.utc.range,hl.minute=Le(function(t){return new fl(6e4*Math.floor(t/6e4))},function(t,e){t.setTime(t.getTime()+6e4*Math.floor(e))},function(t){return t.getMinutes()}),hl.minutes=hl.minute.range,hl.minutes.utc=hl.minute.utc.range,hl.hour=Le(function(t){var e=t.getTimezoneOffset()/60;return new fl(36e5*(Math.floor(t/36e5-e)+e))},function(t,e){t.setTime(t.getTime()+36e5*Math.floor(e))},function(t){return t.getHours()}),hl.hours=hl.hour.range,hl.hours.utc=hl.hour.utc.range,hl.month=Le(function(t){return t=hl.day(t),t.setDate(1),t},function(t,e){t.setMonth(t.getMonth()+e)},function(t){return t.getMonth()}),hl.months=hl.month.range,hl.months.utc=hl.month.utc.range;var Ku=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Zu=[[hl.second,1],[hl.second,5],[hl.second,15],[hl.second,30],[hl.minute,1],[hl.minute,5],[hl.minute,15],[hl.minute,30],[hl.hour,1],[hl.hour,3],[hl.hour,6],[hl.hour,12],[hl.day,1],[hl.day,2],[hl.week,1],[hl.month,1],[hl.month,3],[hl.year,1]],Qu=Yu.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()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}],["%Y",Tn]]),Ju={range:function(t,e,n){return ns.range(Math.ceil(t/n)*n,+e,n).map(Ja)},floor:Me,ceil:Me};Zu.year=hl.year,hl.scale=function(){return Qa(ns.scale.linear(),Zu,Qu)};var tc=Zu.map(function(t){return[t[0].utc,t[1]]}),ec=Gu.multi([[".%L",function(t){return t.getUTCMilliseconds()}],[":%S",function(t){return t.getUTCSeconds()}],["%I:%M",function(t){return t.getUTCMinutes()}],["%I %p",function(t){return t.getUTCHours()}],["%a %d",function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],["%b %d",function(t){return 1!=t.getUTCDate()}],["%B",function(t){return t.getUTCMonth()}],["%Y",Tn]]);tc.year=hl.year.utc,hl.scale.utc=function(){return Qa(ns.scale.linear(),tc,ec)},ns.text=De(function(t){return t.responseText}),ns.json=function(t,e){return Se(t,"application/json",ts,e)},ns.html=function(t,e){return Se(t,"text/html",es,e)},ns.xml=De(function(t){return t.responseXML}),"function"==typeof define&&define.amd?define(ns):"object"==typeof module&&module.exports&&(module.exports=ns),this.d3=ns}(),function(){var t={};t.dev=!1,t.tooltip=t.tooltip||{},t.utils=t.utils||{},t.models=t.models||{},t.charts={},t.logs={},t.dom={},"undefined"!=typeof module&&"undefined"!=typeof exports&&"undefined"==typeof d3&&(d3=require("d3")),t.dispatch=d3.dispatch("render_start","render_end"),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");var e=Array.prototype.slice.call(arguments,1),n=this,i=function(){},r=function(){return n.apply(this instanceof i&&t?this:t,e.concat(Array.prototype.slice.call(arguments)))};return i.prototype=this.prototype,r.prototype=new i,r}),t.dev&&(t.dispatch.on("render_start",function(){t.logs.startTime=+new Date}),t.dispatch.on("render_end",function(){t.logs.endTime=+new Date,t.logs.totalTime=t.logs.endTime-t.logs.startTime,t.log("total",t.logs.totalTime)})),t.log=function(){if(t.dev&&window.console&&console.log&&console.log.apply)console.log.apply(console,arguments);else if(t.dev&&window.console&&"function"==typeof console.log&&Function.prototype.bind){var e=Function.prototype.bind.call(console.log,console);e.apply(console,arguments)}return arguments[arguments.length-1]},t.deprecated=function(t,e){console&&console.warn&&console.warn("nvd3 warning: `"+t+"` has been deprecated. ",e||"")},t.render=function(e){e=e||1,t.render.active=!0,t.dispatch.render_start();var n=function(){for(var i,r,o=0;e>o&&(r=t.render.queue[o]);o++)i=r.generate(),typeof r.callback==typeof Function&&r.callback(i);t.render.queue.splice(0,o),t.render.queue.length?setTimeout(n):(t.dispatch.render_end(),t.render.active=!1)};setTimeout(n)},t.render.active=!1,t.render.queue=[],t.addGraph=function(e){typeof arguments[0]==typeof Function&&(e={generate:arguments[0],callback:arguments[1]}),t.render.queue.push(e),t.render.active||t.render()},"undefined"!=typeof module&&"undefined"!=typeof exports&&(module.exports=t),"undefined"!=typeof window&&(window.nv=t),t.dom.write=function(t){return void 0!==window.fastdom?fastdom.mutate(t):t()},t.dom.read=function(t){return void 0!==window.fastdom?fastdom.measure(t):t()},t.interactiveGuideline=function(){"use strict";function e(d){d.each(function(d){function h(){var t=d3.mouse(this),i=t[0],r=t[1],s=!0,l=!1;if(c&&(i=d3.event.offsetX,r=d3.event.offsetY,"svg"!==d3.event.target.tagName&&(s=!1),d3.event.target.className.baseVal.match("nv-legend")&&(l=!0)),s&&(i-=n.left,r-=n.top),"mouseout"===d3.event.type||0>i||0>r||i>p||r>g||d3.event.relatedTarget&&void 0===d3.event.relatedTarget.ownerSVGElement||l){if(c&&d3.event.relatedTarget&&void 0===d3.event.relatedTarget.ownerSVGElement&&(void 0===d3.event.relatedTarget.className||d3.event.relatedTarget.className.match(u.nvPointerEventsClass)))return;return a.elementMouseout({mouseX:i,mouseY:r}),e.renderGuideLine(null),void u.hidden(!0)}u.hidden(!1);var d="function"==typeof o.rangeBands,h=void 0;if(d){var f=d3.bisect(o.range(),i)-1;if(!(o.range()[f]+o.rangeBand()>=i))return a.elementMouseout({mouseX:i,mouseY:r}),e.renderGuideLine(null),void u.hidden(!0);h=o.domain()[d3.bisect(o.range(),i)-1]}else h=o.invert(i);a.elementMousemove({mouseX:i,mouseY:r,pointXValue:h}),"dblclick"===d3.event.type&&a.elementDblclick({mouseX:i,mouseY:r,pointXValue:h}),"click"===d3.event.type&&a.elementClick({mouseX:i,mouseY:r,pointXValue:h}),"mousedown"===d3.event.type&&a.elementMouseDown({mouseX:i,mouseY:r,pointXValue:h}),"mouseup"===d3.event.type&&a.elementMouseUp({mouseX:i,mouseY:r,pointXValue:h})}var f=d3.select(this),p=i||960,g=r||400,m=f.selectAll("g.nv-wrap.nv-interactiveLineLayer").data([d]),v=m.enter().append("g").attr("class"," nv-wrap nv-interactiveLineLayer");v.append("g").attr("class","nv-interactiveGuideLine"),l&&(l.on("touchmove",h).on("mousemove",h,!0).on("mouseout",h,!0).on("mousedown",h,!0).on("mouseup",h,!0).on("dblclick",h).on("click",h),e.guideLine=null,e.renderGuideLine=function(n){s&&(e.guideLine&&e.guideLine.attr("x1")===n||t.dom.write(function(){var e=m.select(".nv-interactiveGuideLine").selectAll("line").data(null!=n?[t.utils.NaNtoZero(n)]:[],String);e.enter().append("line").attr("class","nv-guideline").attr("x1",function(t){return t}).attr("x2",function(t){return t}).attr("y1",g).attr("y2",0),e.exit().remove()}))})})}var n={left:0,top:0},i=null,r=null,o=d3.scale.linear(),a=d3.dispatch("elementMousemove","elementMouseout","elementClick","elementDblclick","elementMouseDown","elementMouseUp"),s=!0,l=null,u=t.models.tooltip(),c="ActiveXObject"in window;return u.duration(0).hideDelay(0).hidden(!1),e.dispatch=a,e.tooltip=u,e.margin=function(t){return arguments.length?(n.top="undefined"!=typeof t.top?t.top:n.top,n.left="undefined"!=typeof t.left?t.left:n.left,e):n},e.width=function(t){return arguments.length?(i=t,e):i},e.height=function(t){return arguments.length?(r=t,e):r},e.xScale=function(t){return arguments.length?(o=t,e):o},e.showGuideLine=function(t){return arguments.length?(s=t,e):s},e.svgContainer=function(t){return arguments.length?(l=t,e):l},e},t.interactiveBisect=function(t,e,n){"use strict";if(!(t instanceof Array))return null;var i;i="function"!=typeof n?function(t){return t.x}:n;var r=function(t,e){return i(t)-e},o=d3.bisector(r).left,a=d3.max([0,o(t,e)-1]),s=i(t[a]);if("undefined"==typeof s&&(s=a),s===e)return a;var l=d3.min([a+1,t.length-1]),u=i(t[l]);return"undefined"==typeof u&&(u=l),Math.abs(u-e)>=Math.abs(s-e)?a:l},t.nearestValueIndex=function(t,e,n){"use strict";var i=1/0,r=null;return t.forEach(function(t,o){var a=Math.abs(e-t);null!=t&&i>=a&&n>a&&(i=a,r=o)}),r},t.models.tooltip=function(){"use strict";function e(){if(!h||!h.node()){var t=u?u:document.body,e=[1];h=d3.select(t).selectAll(".nvtooltip").data(e),h.enter().append("div").attr("class","nvtooltip "+(l?l:"xy-tooltip")).attr("id",i).style("top",0).style("left",0).style("opacity",0).style("position","fixed").selectAll("div, table, td, tr").classed(v,!0).classed(v,!0),h.exit().remove()}}function n(){return p&&k(r)?(t.dom.write(function(){e();var t=$(r);t&&(h.node().innerHTML=t),C()}),n):void 0}var i="nvtooltip-"+Math.floor(1e5*Math.random()),r=null,o="w",a=25,s=0,l=null,u=null,c=!0,d=200,h=null,f={left:null,top:null},p=!0,g=100,m=!0,v="nv-pointer-events-none",y=function(){return{left:null!==d3.event?d3.event.clientX:0,top:null!==d3.event?d3.event.clientY:0}},b=function(t){return t},x=function(t){return t},w=function(t){return t},$=function(t){if(null===t)return"";var e=d3.select(document.createElement("table"));if(m){var n=e.selectAll("thead").data([t]).enter().append("thead");n.append("tr").append("td").attr("colspan",3).append("strong").classed("x-value",!0).html(x(t.value))}var i=e.selectAll("tbody").data([t]).enter().append("tbody"),r=i.selectAll("tr").data(function(t){return t.series
}).enter().append("tr").classed("highlight",function(t){return t.highlight});r.append("td").classed("legend-color-guide",!0).append("div").style("background-color",function(t){return t.color}),r.append("td").classed("key",!0).classed("total",function(t){return!!t.total}).html(function(t,e){return w(t.key,e)}),r.append("td").classed("value",!0).html(function(t,e){return b(t.value,e)}),r.filter(function(t){return void 0!==t.percent}).append("td").classed("percent",!0).html(function(t){return"("+d3.format("%")(t.percent)+")"}),r.selectAll("td").each(function(t){if(t.highlight){var e=d3.scale.linear().domain([0,1]).range(["#fff",t.color]),n=.6;d3.select(this).style("border-bottom-color",e(n)).style("border-top-color",e(n))}});var o=e.node().outerHTML;return void 0!==t.footer&&(o+="<div class='footer'>"+t.footer+"</div>"),o},k=function(e){if(e&&e.series){if(t.utils.isArray(e.series))return!0;if(t.utils.isObject(e.series))return e.series=[e.series],!0}return!1},_=function(t){var e,n,i,r=h.node().offsetHeight,s=h.node().offsetWidth,l=document.documentElement.clientWidth,u=document.documentElement.clientHeight;switch(o){case"e":e=-s-a,n=-(r/2),t.left+e<0&&(e=a),(i=t.top+n)<0&&(n-=i),(i=t.top+n+r)>u&&(n-=i-u);break;case"w":e=a,n=-(r/2),t.left+e+s>l&&(e=-s-a),(i=t.top+n)<0&&(n-=i),(i=t.top+n+r)>u&&(n-=i-u);break;case"n":e=-(s/2)-5,n=a,t.top+n+r>u&&(n=-r-a),(i=t.left+e)<0&&(e-=i),(i=t.left+e+s)>l&&(e-=i-l);break;case"s":e=-(s/2),n=-r-a,t.top+n<0&&(n=a),(i=t.left+e)<0&&(e-=i),(i=t.left+e+s)>l&&(e-=i-l);break;case"center":e=-(s/2),n=-(r/2);break;default:e=0,n=0}return{left:e,top:n}},C=function(){t.dom.read(function(){var t=y(),e=_(t),n=t.left+e.left,i=t.top+e.top;if(c)h.interrupt().transition().delay(d).duration(0).style("opacity",0);else{var r="translate("+f.left+"px, "+f.top+"px)",o="translate("+Math.round(n)+"px, "+Math.round(i)+"px)",a=d3.interpolateString(r,o),s=h.style("opacity")<.1;h.interrupt().transition().duration(s?0:g).styleTween("transform",function(){return a},"important").styleTween("-webkit-transform",function(){return a}).style("-ms-transform",o).style("opacity",1)}f.left=n,f.top=i})};return n.nvPointerEventsClass=v,n.options=t.utils.optionsFunc.bind(n),n._options=Object.create({},{duration:{get:function(){return g},set:function(t){g=t}},gravity:{get:function(){return o},set:function(t){o=t}},distance:{get:function(){return a},set:function(t){a=t}},snapDistance:{get:function(){return s},set:function(t){s=t}},classes:{get:function(){return l},set:function(t){l=t}},chartContainer:{get:function(){return u},set:function(t){u=t}},enabled:{get:function(){return p},set:function(t){p=t}},hideDelay:{get:function(){return d},set:function(t){d=t}},contentGenerator:{get:function(){return $},set:function(t){$=t}},valueFormatter:{get:function(){return b},set:function(t){b=t}},headerFormatter:{get:function(){return x},set:function(t){x=t}},keyFormatter:{get:function(){return w},set:function(t){w=t}},headerEnabled:{get:function(){return m},set:function(t){m=t}},position:{get:function(){return y},set:function(t){y=t}},fixedTop:{get:function(){return null},set:function(){t.deprecated("fixedTop","feature removed after 1.8.1")}},offset:{get:function(){return{left:0,top:0}},set:function(){t.deprecated("offset","use chart.tooltip.distance() instead")}},hidden:{get:function(){return c},set:function(t){c!=t&&(c=!!t,n())}},data:{get:function(){return r},set:function(t){t.point&&(t.value=t.point.x,t.series=t.series||{},t.series.value=t.point.y,t.series.color=t.point.color||t.series.color),r=t}},node:{get:function(){return h.node()},set:function(){}},id:{get:function(){return i},set:function(){}}}),t.utils.initOptions(n),n},t.utils.windowSize=function(){var t={width:640,height:480};return window.innerWidth&&window.innerHeight?(t.width=window.innerWidth,t.height=window.innerHeight,t):"CSS1Compat"==document.compatMode&&document.documentElement&&document.documentElement.offsetWidth?(t.width=document.documentElement.offsetWidth,t.height=document.documentElement.offsetHeight,t):document.body&&document.body.offsetWidth?(t.width=document.body.offsetWidth,t.height=document.body.offsetHeight,t):t},t.utils.isArray=Array.isArray,t.utils.isObject=function(t){return null!==t&&"object"==typeof t},t.utils.isFunction=function(t){return"function"==typeof t},t.utils.isDate=function(t){return"[object Date]"===toString.call(t)},t.utils.isNumber=function(t){return!isNaN(t)&&"number"==typeof t},t.utils.windowResize=function(e){return window.addEventListener?window.addEventListener("resize",e):t.log("ERROR: Failed to bind to window.resize with: ",e),{callback:e,clear:function(){window.removeEventListener("resize",e)}}},t.utils.getColor=function(e){if(void 0===e)return t.utils.defaultColor();if(t.utils.isArray(e)){var n=d3.scale.ordinal().range(e);return function(t,e){var i=void 0===e?t:e;return t.color||n(i)}}return e},t.utils.defaultColor=function(){return t.utils.getColor(d3.scale.category20().range())},t.utils.customTheme=function(e,n,i){n=n||function(t){return t.key},i=i||d3.scale.category20().range();var r=i.length;return function(o){var a=n(o);return t.utils.isFunction(e[a])?e[a]():void 0!==e[a]?e[a]:(r||(r=i.length),r-=1,i[r])}},t.utils.pjax=function(e,n){var i=function(i){d3.html(i,function(i){var r=d3.select(n).node();r.parentNode.replaceChild(d3.select(i).select(n).node(),r),t.utils.pjax(e,n)})};d3.selectAll(e).on("click",function(){history.pushState(this.href,this.textContent,this.href),i(this.href),d3.event.preventDefault()}),d3.select(window).on("popstate",function(){d3.event.state&&i(d3.event.state)})},t.utils.calcApproxTextWidth=function(e){if(t.utils.isFunction(e.style)&&t.utils.isFunction(e.text)){var n=parseInt(e.style("font-size").replace("px",""),10),i=e.text().length;return t.utils.NaNtoZero(i*n*.5)}return 0},t.utils.NaNtoZero=function(e){return!t.utils.isNumber(e)||isNaN(e)||null===e||1/0===e||e===-1/0?0:e},d3.selection.prototype.watchTransition=function(t){var e=[this].concat([].slice.call(arguments,1));return t.transition.apply(t,e)},t.utils.renderWatch=function(e,n){if(!(this instanceof t.utils.renderWatch))return new t.utils.renderWatch(e,n);var i=void 0!==n?n:250,r=[],o=this;this.models=function(t){return t=[].slice.call(arguments,0),t.forEach(function(t){t.__rendered=!1,function(t){t.dispatch.on("renderEnd",function(){t.__rendered=!0,o.renderEnd("model")})}(t),r.indexOf(t)<0&&r.push(t)}),this},this.reset=function(t){void 0!==t&&(i=t),r=[]},this.transition=function(t,e,n){if(e=arguments.length>1?[].slice.call(arguments,1):[],n=e.length>1?e.pop():void 0!==i?i:250,t.__rendered=!1,r.indexOf(t)<0&&r.push(t),0===n)return t.__rendered=!0,t.delay=function(){return this},t.duration=function(){return this},t;t.__rendered=0===t.length?!0:t.every(function(t){return!t.length})?!0:!1;var a=0;return t.transition().duration(n).each(function(){++a}).each("end",function(){0===--a&&(t.__rendered=!0,o.renderEnd.apply(this,e))})},this.renderEnd=function(){r.every(function(t){return t.__rendered})&&(r.forEach(function(t){t.__rendered=!1}),e.renderEnd.apply(this,arguments))}},t.utils.deepExtend=function(e){var n=arguments.length>1?[].slice.call(arguments,1):[];n.forEach(function(n){for(var i in n){var r=t.utils.isArray(e[i]),o=t.utils.isObject(e[i]),a=t.utils.isObject(n[i]);o&&!r&&a?t.utils.deepExtend(e[i],n[i]):e[i]=n[i]}})},t.utils.state=function(){if(!(this instanceof t.utils.state))return new t.utils.state;var e={},n=function(){},i=function(){return{}},r=null,o=null;this.dispatch=d3.dispatch("change","set"),this.dispatch.on("set",function(t){n(t,!0)}),this.getter=function(t){return i=t,this},this.setter=function(t,e){return e||(e=function(){}),n=function(n,i){t(n),i&&e()},this},this.init=function(e){r=r||{},t.utils.deepExtend(r,e)};var a=function(){var t=i();if(JSON.stringify(t)===JSON.stringify(e))return!1;for(var n in t)void 0===e[n]&&(e[n]={}),e[n]=t[n],o=!0;return!0};this.update=function(){r&&(n(r,!1),r=null),a.call(this)&&this.dispatch.change(e)}},t.utils.optionsFunc=function(e){return e&&d3.map(e).forEach(function(e,n){t.utils.isFunction(this[e])&&this[e](n)}.bind(this)),this},t.utils.calcTicksX=function(e,n){var i=1,r=0;for(r;r<n.length;r+=1){var o=n[r]&&n[r].values?n[r].values.length:0;i=o>i?o:i}return t.log("Requested number of ticks: ",e),t.log("Calculated max values to be: ",i),e=e>i?e=i-1:e,e=1>e?1:e,e=Math.floor(e),t.log("Calculating tick count as: ",e),e},t.utils.calcTicksY=function(e,n){return t.utils.calcTicksX(e,n)},t.utils.initOption=function(t,e){t._calls&&t._calls[e]?t[e]=t._calls[e]:(t[e]=function(n){return arguments.length?(t._overrides[e]=!0,t._options[e]=n,t):t._options[e]},t["_"+e]=function(n){return arguments.length?(t._overrides[e]||(t._options[e]=n),t):t._options[e]})},t.utils.initOptions=function(e){e._overrides=e._overrides||{};var n=Object.getOwnPropertyNames(e._options||{}),i=Object.getOwnPropertyNames(e._calls||{});n=n.concat(i);for(var r in n)t.utils.initOption(e,n[r])},t.utils.inheritOptionsD3=function(t,e,n){t._d3options=n.concat(t._d3options||[]),n.unshift(e),n.unshift(t),d3.rebind.apply(this,n)},t.utils.arrayUnique=function(t){return t.sort().filter(function(e,n){return!n||e!=t[n-1]})},t.utils.symbolMap=d3.map(),t.utils.symbol=function(){function e(e,r){var o=n.call(this,e,r),a=i.call(this,e,r);return-1!==d3.svg.symbolTypes.indexOf(o)?d3.svg.symbol().type(o).size(a)():t.utils.symbolMap.get(o)(a)}var n,i=64;return e.type=function(t){return arguments.length?(n=d3.functor(t),e):n},e.size=function(t){return arguments.length?(i=d3.functor(t),e):i},e},t.utils.inheritOptions=function(e,n){var i=Object.getOwnPropertyNames(n._options||{}),r=Object.getOwnPropertyNames(n._calls||{}),o=n._inherited||[],a=n._d3options||[],s=i.concat(r).concat(o).concat(a);s.unshift(n),s.unshift(e),d3.rebind.apply(this,s),e._inherited=t.utils.arrayUnique(i.concat(r).concat(o).concat(i).concat(e._inherited||[])),e._d3options=t.utils.arrayUnique(a.concat(e._d3options||[]))},t.utils.initSVG=function(t){t.classed({"nvd3-svg":!0})},t.utils.sanitizeHeight=function(t,e){return t||parseInt(e.style("height"),10)||400},t.utils.sanitizeWidth=function(t,e){return t||parseInt(e.style("width"),10)||960},t.utils.availableHeight=function(e,n,i){return Math.max(0,t.utils.sanitizeHeight(e,n)-i.top-i.bottom)},t.utils.availableWidth=function(e,n,i){return Math.max(0,t.utils.sanitizeWidth(e,n)-i.left-i.right)},t.utils.noData=function(e,n){var i=e.options(),r=i.margin(),o=i.noData(),a=null==o?["No Data Available."]:[o],s=t.utils.availableHeight(null,n,r),l=t.utils.availableWidth(null,n,r),u=r.left+l/2,c=r.top+s/2;n.selectAll("g").remove();var d=n.selectAll(".nv-noData").data(a);d.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),d.attr("x",u).attr("y",c).text(function(t){return t})},t.utils.wrapTicks=function(t,e){t.each(function(){for(var t,n=d3.select(this),i=n.text().split(/\s+/).reverse(),r=[],o=0,a=1.1,s=n.attr("y"),l=parseFloat(n.attr("dy")),u=n.text(null).append("tspan").attr("x",0).attr("y",s).attr("dy",l+"em");t=i.pop();)r.push(t),u.text(r.join(" ")),u.node().getComputedTextLength()>e&&(r.pop(),u.text(r.join(" ")),r=[t],u=n.append("tspan").attr("x",0).attr("y",s).attr("dy",++o*a+l+"em").text(t))})},t.utils.arrayEquals=function(e,n){if(e===n)return!0;if(!e||!n)return!1;if(e.length!=n.length)return!1;for(var i=0,r=e.length;r>i;i++)if(e[i]instanceof Array&&n[i]instanceof Array){if(!t.arrayEquals(e[i],n[i]))return!1}else if(e[i]!=n[i])return!1;return!0},t.models.axis=function(){"use strict";function e(a){return b.reset(),a.each(function(e){var a=d3.select(this);t.utils.initSVG(a);var m=a.selectAll("g.nv-wrap.nv-axis").data([e]),v=m.enter().append("g").attr("class","nvd3 nv-wrap nv-axis"),x=(v.append("g"),m.select("g"));null!==f?n.ticks(f):("top"==n.orient()||"bottom"==n.orient())&&n.ticks(Math.abs(i.range()[1]-i.range()[0])/100),x.watchTransition(b,"axis").call(n),y=y||n.scale();var w=n.tickFormat();null==w&&(w=y.tickFormat());var $=x.selectAll("text.nv-axislabel").data([s||null]);$.exit().remove(),void 0!==g&&x.selectAll("g").select("text").style("font-size",g);var k,_,C;switch(n.orient()){case"top":$.enter().append("text").attr("class","nv-axislabel"),C=0,1===i.range().length?C=h?2*i.range()[0]+i.rangeBand():0:2===i.range().length?C=h?i.range()[0]+i.range()[1]+i.rangeBand():i.range()[1]:i.range().length>2&&(C=i.range()[i.range().length-1]+(i.range()[1]-i.range()[0])),$.attr("text-anchor","middle").attr("y",0).attr("x",C/2),l&&(_=m.selectAll("g.nv-axisMaxMin").data(i.domain()),_.enter().append("g").attr("class",function(t,e){return["nv-axisMaxMin","nv-axisMaxMin-x",0==e?"nv-axisMin-x":"nv-axisMax-x"].join(" ")}).append("text"),_.exit().remove(),_.attr("transform",function(e){return"translate("+t.utils.NaNtoZero(i(e))+",0)"}).select("text").attr("dy","-0.5em").attr("y",-n.tickPadding()).attr("text-anchor","middle").text(function(t){var e=w(t);return(""+e).match("NaN")?"":e}),_.watchTransition(b,"min-max top").attr("transform",function(e,n){return"translate("+t.utils.NaNtoZero(i.range()[n])+",0)"}));break;case"bottom":k=p+36;var M=30,D=0,S=x.selectAll("g").select("text"),T="";if(u%360){S.attr("transform",""),S.each(function(){var t=this.getBoundingClientRect(),e=t.width;D=t.height,e>M&&(M=e)}),T="rotate("+u+" 0,"+(D/2+n.tickPadding())+")";var A=Math.abs(Math.sin(u*Math.PI/180));k=(A?A*M:M)+30,S.attr("transform",T).style("text-anchor",u%360>0?"start":"end")}else d?S.attr("transform",function(t,e){return"translate(0,"+(e%2==0?"0":"12")+")"}):S.attr("transform","translate(0,0)");$.enter().append("text").attr("class","nv-axislabel"),C=0,1===i.range().length?C=h?2*i.range()[0]+i.rangeBand():0:2===i.range().length?C=h?i.range()[0]+i.range()[1]+i.rangeBand():i.range()[1]:i.range().length>2&&(C=i.range()[i.range().length-1]+(i.range()[1]-i.range()[0])),$.attr("text-anchor","middle").attr("y",k).attr("x",C/2),l&&(_=m.selectAll("g.nv-axisMaxMin").data([i.domain()[0],i.domain()[i.domain().length-1]]),_.enter().append("g").attr("class",function(t,e){return["nv-axisMaxMin","nv-axisMaxMin-x",0==e?"nv-axisMin-x":"nv-axisMax-x"].join(" ")}).append("text"),_.exit().remove(),_.attr("transform",function(e){return"translate("+t.utils.NaNtoZero(i(e)+(h?i.rangeBand()/2:0))+",0)"}).select("text").attr("dy",".71em").attr("y",n.tickPadding()).attr("transform",T).style("text-anchor",u?u%360>0?"start":"end":"middle").text(function(t){var e=w(t);return(""+e).match("NaN")?"":e}),_.watchTransition(b,"min-max bottom").attr("transform",function(e){return"translate("+t.utils.NaNtoZero(i(e)+(h?i.rangeBand()/2:0))+",0)"}));break;case"right":$.enter().append("text").attr("class","nv-axislabel"),$.style("text-anchor",c?"middle":"begin").attr("transform",c?"rotate(90)":"").attr("y",c?-Math.max(r.right,o)+12-(p||0):-10).attr("x",c?d3.max(i.range())/2:n.tickPadding()),l&&(_=m.selectAll("g.nv-axisMaxMin").data(i.domain()),_.enter().append("g").attr("class",function(t,e){return["nv-axisMaxMin","nv-axisMaxMin-y",0==e?"nv-axisMin-y":"nv-axisMax-y"].join(" ")}).append("text").style("opacity",0),_.exit().remove(),_.attr("transform",function(e){return"translate(0,"+t.utils.NaNtoZero(i(e))+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",n.tickPadding()).style("text-anchor","start").text(function(t){var e=w(t);return(""+e).match("NaN")?"":e}),_.watchTransition(b,"min-max right").attr("transform",function(e,n){return"translate(0,"+t.utils.NaNtoZero(i.range()[n])+")"}).select("text").style("opacity",1));break;case"left":$.enter().append("text").attr("class","nv-axislabel"),$.style("text-anchor",c?"middle":"end").attr("transform",c?"rotate(-90)":"").attr("y",c?-Math.max(r.left,o)+25-(p||0):-10).attr("x",c?-d3.max(i.range())/2:-n.tickPadding()),l&&(_=m.selectAll("g.nv-axisMaxMin").data(i.domain()),_.enter().append("g").attr("class",function(t,e){return["nv-axisMaxMin","nv-axisMaxMin-y",0==e?"nv-axisMin-y":"nv-axisMax-y"].join(" ")}).append("text").style("opacity",0),_.exit().remove(),_.attr("transform",function(e){return"translate(0,"+t.utils.NaNtoZero(y(e))+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",-n.tickPadding()).attr("text-anchor","end").text(function(t){var e=w(t);return(""+e).match("NaN")?"":e}),_.watchTransition(b,"min-max right").attr("transform",function(e,n){return"translate(0,"+t.utils.NaNtoZero(i.range()[n])+")"}).select("text").style("opacity",1))}if($.text(function(t){return t}),!l||"left"!==n.orient()&&"right"!==n.orient()||(x.selectAll("g").each(function(t){d3.select(this).select("text").attr("opacity",1),(i(t)<i.range()[1]+10||i(t)>i.range()[0]-10)&&((t>1e-10||-1e-10>t)&&d3.select(this).attr("opacity",0),d3.select(this).select("text").attr("opacity",0))}),i.domain()[0]==i.domain()[1]&&0==i.domain()[0]&&m.selectAll("g.nv-axisMaxMin").style("opacity",function(t,e){return e?0:1})),l&&("top"===n.orient()||"bottom"===n.orient())){var E=[];m.selectAll("g.nv-axisMaxMin").each(function(t,e){try{E.push(e?i(t)-this.getBoundingClientRect().width-4:i(t)+this.getBoundingClientRect().width+4)}catch(n){E.push(e?i(t)-4:i(t)+4)}}),x.selectAll("g").each(function(t){(i(t)<E[0]||i(t)>E[1])&&(t>1e-10||-1e-10>t?d3.select(this).remove():d3.select(this).select("text").remove())})}x.selectAll(".tick").filter(function(t){return!parseFloat(Math.round(1e5*t)/1e6)&&void 0!==t}).classed("zero",!0),y=i.copy()}),b.renderEnd("axis immediate"),e}var n=d3.svg.axis(),i=d3.scale.linear(),r={top:0,right:0,bottom:0,left:0},o=75,a=60,s=null,l=!0,u=0,c=!0,d=!1,h=!1,f=null,p=0,g=void 0,m=250,v=d3.dispatch("renderEnd");n.scale(i).orient("bottom").tickFormat(function(t){return t});var y,b=t.utils.renderWatch(v,m);return e.axis=n,e.dispatch=v,e.options=t.utils.optionsFunc.bind(e),e._options=Object.create({},{axisLabelDistance:{get:function(){return p},set:function(t){p=t}},staggerLabels:{get:function(){return d},set:function(t){d=t}},rotateLabels:{get:function(){return u},set:function(t){u=t}},rotateYLabel:{get:function(){return c},set:function(t){c=t}},showMaxMin:{get:function(){return l},set:function(t){l=t}},axisLabel:{get:function(){return s},set:function(t){s=t}},height:{get:function(){return a},set:function(t){a=t}},ticks:{get:function(){return f},set:function(t){f=t}},width:{get:function(){return o},set:function(t){o=t}},fontSize:{get:function(){return g},set:function(t){g=t}},margin:{get:function(){return r},set:function(t){r.top=void 0!==t.top?t.top:r.top,r.right=void 0!==t.right?t.right:r.right,r.bottom=void 0!==t.bottom?t.bottom:r.bottom,r.left=void 0!==t.left?t.left:r.left}},duration:{get:function(){return m},set:function(t){m=t,b.reset(m)}},scale:{get:function(){return i},set:function(r){i=r,n.scale(i),h="function"==typeof i.rangeBands,t.utils.inheritOptionsD3(e,i,["domain","range","rangeBand","rangeBands"])}}}),t.utils.initOptions(e),t.utils.inheritOptionsD3(e,n,["orient","tickValues","tickSubdivide","tickSize","tickPadding","tickFormat"]),t.utils.inheritOptionsD3(e,i,["domain","range","rangeBand","rangeBands"]),e},t.models.boxPlot=function(){"use strict";function e(d){return A.reset(),d.each(function(e){var d=u-l.left-l.right,E=c-l.top-l.bottom;M=d3.select(this),t.utils.initSVG(M),h.domain(n||e.map(function(t,e){return p(t,e)})).rangeBands(i||[0,d],.1);var O=[];if(!r){var N,I,P=[];e.forEach(function(t){var e=g(t),n=v(t),i=y(t),r=b(t),o=w(t);o&&o.forEach(function(t,e){P.push($(t,e,void 0))}),i&&P.push(i),e&&P.push(e),n&&P.push(n),r&&P.push(r)}),N=d3.min(P),I=d3.max(P),O=[N,I]}f.domain(r||O),f.range(o||[E,0]),a=a||h,s=s||f.copy().range([f(0),f(0)]);{var H=M.selectAll("g.nv-wrap").data([e]);H.enter().append("g").attr("class","nvd3 nv-wrap")}H.attr("transform","translate("+l.left+","+l.top+")");var F=H.selectAll(".nv-boxplot").data(function(t){return t}),W=F.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);F.attr("class","nv-boxplot").attr("transform",function(t,e){return"translate("+(h(p(t,e))+.05*h.rangeBand())+", 0)"}).classed("hover",function(t){return t.hover}),F.watchTransition(A,"nv-boxplot: boxplots").style("stroke-opacity",1).style("fill-opacity",.75).delay(function(t,n){return n*S/e.length}).attr("transform",function(t,e){return"translate("+(h(p(t,e))+.05*h.rangeBand())+", 0)"}),F.exit().remove(),W.each(function(t,e){var n=d3.select(this);[y,b].forEach(function(i){if(i(t)){var r=i===y?"low":"high";n.append("line").style("stroke",x(t)||C(t,e)).attr("class","nv-boxplot-whisker nv-boxplot-"+r),n.append("line").style("stroke",x(t)||C(t,e)).attr("class","nv-boxplot-tick nv-boxplot-"+r)}})});var L=function(){return null===T?.9*h.rangeBand():Math.min(75,.9*h.rangeBand())},z=function(){return.45*h.rangeBand()-L()/2},R=function(){return.45*h.rangeBand()+L()/2};[y,b].forEach(function(t){var e=t===y?"low":"high",n=t===y?g:v;F.select("line.nv-boxplot-whisker.nv-boxplot-"+e).watchTransition(A,"nv-boxplot: boxplots").attr("x1",.45*h.rangeBand()).attr("y1",function(e){return f(t(e))}).attr("x2",.45*h.rangeBand()).attr("y2",function(t){return f(n(t))}),F.select("line.nv-boxplot-tick.nv-boxplot-"+e).watchTransition(A,"nv-boxplot: boxplots").attr("x1",z).attr("y1",function(e){return f(t(e))}).attr("x2",R).attr("y2",function(e){return f(t(e))})}),[y,b].forEach(function(t){var e=t===y?"low":"high";W.selectAll(".nv-boxplot-"+e).on("mouseover",function(e,n,i){d3.select(this).classed("hover",!0),D.elementMouseover({series:{key:t(e),color:x(e)||C(e,i)},e:d3.event})}).on("mouseout",function(e,n,i){d3.select(this).classed("hover",!1),D.elementMouseout({series:{key:t(e),color:x(e)||C(e,i)},e:d3.event})}).on("mousemove",function(){D.elementMousemove({e:d3.event})})}),W.append("rect").attr("class","nv-boxplot-box").on("mouseover",function(t,e){d3.select(this).classed("hover",!0),D.elementMouseover({key:p(t),value:p(t),series:[{key:"Q3",value:v(t),color:x(t)||C(t,e)},{key:"Q2",value:m(t),color:x(t)||C(t,e)},{key:"Q1",value:g(t),color:x(t)||C(t,e)}],data:t,index:e,e:d3.event})}).on("mouseout",function(t,e){d3.select(this).classed("hover",!1),D.elementMouseout({key:p(t),value:p(t),series:[{key:"Q3",value:v(t),color:x(t)||C(t,e)},{key:"Q2",value:m(t),color:x(t)||C(t,e)},{key:"Q1",value:g(t),color:x(t)||C(t,e)}],data:t,index:e,e:d3.event})}).on("mousemove",function(){D.elementMousemove({e:d3.event})}),F.select("rect.nv-boxplot-box").watchTransition(A,"nv-boxplot: boxes").attr("y",function(t){return f(v(t))}).attr("width",L).attr("x",z).attr("height",function(t){return Math.abs(f(v(t))-f(g(t)))||1}).style("fill",function(t,e){return x(t)||C(t,e)}).style("stroke",function(t,e){return x(t)||C(t,e)}),W.append("line").attr("class","nv-boxplot-median"),F.select("line.nv-boxplot-median").watchTransition(A,"nv-boxplot: boxplots line").attr("x1",z).attr("y1",function(t){return f(m(t))}).attr("x2",R).attr("y2",function(t){return f(m(t))});var j=F.selectAll(".nv-boxplot-outlier").data(function(t){return w(t)||[]});j.enter().append("circle").style("fill",function(t,e,n){return _(t,e,n)||C(t,n)}).style("stroke",function(t,e,n){return _(t,e,n)||C(t,n)}).style("z-index",9e3).on("mouseover",function(t,e,n){d3.select(this).classed("hover",!0),D.elementMouseover({series:{key:k(t,e,n),color:_(t,e,n)||C(t,n)},e:d3.event})}).on("mouseout",function(t,e,n){d3.select(this).classed("hover",!1),D.elementMouseout({series:{key:k(t,e,n),color:_(t,e,n)||C(t,n)},e:d3.event})}).on("mousemove",function(){D.elementMousemove({e:d3.event})}),j.attr("class","nv-boxplot-outlier"),j.watchTransition(A,"nv-boxplot: nv-boxplot-outlier").attr("cx",.45*h.rangeBand()).attr("cy",function(t,e,n){return f($(t,e,n))}).attr("r","3"),j.exit().remove(),a=h.copy(),s=f.copy()}),A.renderEnd("nv-boxplot immediate"),e}var n,i,r,o,a,s,l={top:0,right:0,bottom:0,left:0},u=960,c=500,d=Math.floor(1e4*Math.random()),h=d3.scale.ordinal(),f=d3.scale.linear(),p=function(t){return t.label},g=function(t){return t.values.Q1},m=function(t){return t.values.Q2},v=function(t){return t.values.Q3},y=function(t){return t.values.whisker_low},b=function(t){return t.values.whisker_high},x=function(t){return t.color},w=function(t){return t.values.outliers},$=function(t){return t},k=function(t){return t},_=function(){return void 0},C=t.utils.defaultColor(),M=null,D=d3.dispatch("elementMouseover","elementMouseout","elementMousemove","renderEnd"),S=250,T=null,A=t.utils.renderWatch(D,S);return e.dispatch=D,e.options=t.utils.optionsFunc.bind(e),e._options=Object.create({},{width:{get:function(){return u},set:function(t){u=t}},height:{get:function(){return c},set:function(t){c=t}},maxBoxWidth:{get:function(){return T},set:function(t){T=t}},x:{get:function(){return p},set:function(t){p=t}},q1:{get:function(){return g},set:function(t){g=t}},q2:{get:function(){return m},set:function(t){m=t}},q3:{get:function(){return v},set:function(t){v=t}},wl:{get:function(){return y},set:function(t){y=t}},wh:{get:function(){return b},set:function(t){b=t}},itemColor:{get:function(){return x},set:function(t){x=t}},outliers:{get:function(){return w},set:function(t){w=t}},outlierValue:{get:function(){return $},set:function(t){$=t}},outlierLabel:{get:function(){return k},set:function(t){k=t}},outlierColor:{get:function(){return _},set:function(t){_=t}},xScale:{get:function(){return h},set:function(t){h=t}},yScale:{get:function(){return f},set:function(t){f=t}},xDomain:{get:function(){return n},set:function(t){n=t}},yDomain:{get:function(){return r},set:function(t){r=t}},xRange:{get:function(){return i},set:function(t){i=t}},yRange:{get:function(){return o},set:function(t){o=t}},id:{get:function(){return d},set:function(t){d=t}},y:{get:function(){return console.warn("BoxPlot 'y' chart option is deprecated. Please use model overrides instead."),{}},set:function(){console.warn("BoxPlot 'y' chart option is deprecated. Please use model overrides instead.")}},margin:{get:function(){return l},set:function(t){l.top=void 0!==t.top?t.top:l.top,l.right=void 0!==t.right?t.right:l.right,l.bottom=void 0!==t.bottom?t.bottom:l.bottom,l.left=void 0!==t.left?t.left:l.left}},color:{get:function(){return C},set:function(e){C=t.utils.getColor(e)}},duration:{get:function(){return S},set:function(t){S=t,A.reset(S)}}}),t.utils.initOptions(e),e},t.models.boxPlotChart=function(){"use strict";function e(c){return b.reset(),b.models(r),d&&b.models(o),h&&b.models(a),c.each(function(c){var g=d3.select(this);t.utils.initSVG(g);var b=(l||parseInt(g.style("width"))||960)-s.left-s.right,x=(u||parseInt(g.style("height"))||400)-s.top-s.bottom;if(e.update=function(){v.beforeUpdate(),g.transition().duration(y).call(e)},e.container=this,!c||!c.length){var w=g.selectAll(".nv-noData").data([m]);return w.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),w.attr("x",s.left+b/2).attr("y",s.top+x/2).text(function(t){return t}),e}g.selectAll(".nv-noData").remove(),n=r.xScale(),i=r.yScale().clamp(!0);var $=g.selectAll("g.nv-wrap.nv-boxPlotWithAxes").data([c]),k=$.enter().append("g").attr("class","nvd3 nv-wrap nv-boxPlotWithAxes").append("g"),_=k.append("defs"),C=$.select("g");k.append("g").attr("class","nv-x nv-axis"),k.append("g").attr("class","nv-y nv-axis").append("g").attr("class","nv-zeroLine").append("line"),k.append("g").attr("class","nv-barsWrap"),C.attr("transform","translate("+s.left+","+s.top+")"),f&&C.select(".nv-y.nv-axis").attr("transform","translate("+b+",0)"),r.width(b).height(x);var M=C.select(".nv-barsWrap").datum(c.filter(function(t){return!t.disabled}));if(M.transition().call(r),_.append("clipPath").attr("id","nv-x-label-clip-"+r.id()).append("rect"),C.select("#nv-x-label-clip-"+r.id()+" rect").attr("width",n.rangeBand()*(p?2:1)).attr("height",16).attr("x",-n.rangeBand()/(p?1:2)),d){o.scale(n).ticks(t.utils.calcTicksX(b/100,c)).tickSize(-x,0),C.select(".nv-x.nv-axis").attr("transform","translate(0,"+i.range()[0]+")"),C.select(".nv-x.nv-axis").call(o);var D=C.select(".nv-x.nv-axis").selectAll("g");p&&D.selectAll("text").attr("transform",function(t,e,n){return"translate(0,"+(n%2===0?"5":"17")+")"})}h&&(a.scale(i).ticks(Math.floor(x/36)).tickSize(-b,0),C.select(".nv-y.nv-axis").call(a)),C.select(".nv-zeroLine line").attr("x1",0).attr("x2",b).attr("y1",i(0)).attr("y2",i(0))}),b.renderEnd("nv-boxplot chart immediate"),e}var n,i,r=t.models.boxPlot(),o=t.models.axis(),a=t.models.axis(),s={top:15,right:10,bottom:50,left:60},l=null,u=null,c=t.utils.getColor(),d=!0,h=!0,f=!1,p=!1,g=t.models.tooltip(),m="No Data Available.",v=d3.dispatch("beforeUpdate","renderEnd"),y=250;o.orient("bottom").showMaxMin(!1).tickFormat(function(t){return t}),a.orient(f?"right":"left").tickFormat(d3.format(",.1f")),g.duration(0);var b=t.utils.renderWatch(v,y);return r.dispatch.on("elementMouseover.tooltip",function(t){g.data(t).hidden(!1)}),r.dispatch.on("elementMouseout.tooltip",function(t){g.data(t).hidden(!0)}),r.dispatch.on("elementMousemove.tooltip",function(){g()}),e.dispatch=v,e.boxplot=r,e.xAxis=o,e.yAxis=a,e.tooltip=g,e.options=t.utils.optionsFunc.bind(e),e._options=Object.create({},{width:{get:function(){return l},set:function(t){l=t}},height:{get:function(){return u},set:function(t){u=t}},staggerLabels:{get:function(){return p},set:function(t){p=t}},showXAxis:{get:function(){return d},set:function(t){d=t}},showYAxis:{get:function(){return h},set:function(t){h=t}},tooltipContent:{get:function(){return g},set:function(t){g=t}},noData:{get:function(){return m},set:function(t){m=t}},margin:{get:function(){return s},set:function(t){s.top=void 0!==t.top?t.top:s.top,s.right=void 0!==t.right?t.right:s.right,s.bottom=void 0!==t.bottom?t.bottom:s.bottom,s.left=void 0!==t.left?t.left:s.left}},duration:{get:function(){return y},set:function(t){y=t,b.reset(y),r.duration(y),o.duration(y),a.duration(y)}},color:{get:function(){return c},set:function(e){c=t.utils.getColor(e),r.color(c)}},rightAlignYAxis:{get:function(){return f},set:function(t){f=t,a.orient(t?"right":"left")}}}),t.utils.inheritOptions(e,r),t.utils.initOptions(e),e},t.models.bullet=function(){"use strict";function e(t,e){var n=t.slice();t.sort(function(t,i){var r=n.indexOf(t),o=n.indexOf(i);return d3.descending(e[r],e[o])})}function n(r){return r.each(function(n,r){var m=f-i.left-i.right,w=p-i.top-i.bottom;g=d3.select(this),t.utils.initSVG(g);var $=a.call(this,n,r).slice(),k=s.call(this,n,r).slice(),_=l.call(this,n,r).slice(),C=u.call(this,n,r).slice(),M=c.call(this,n,r).slice(),D=d.call(this,n,r).slice();e(C,$),e(M,k),e(D,_),$.sort(d3.descending),k.sort(d3.descending),_.sort(d3.descending);{var S=d3.scale.linear().domain(d3.extent(d3.merge([h,$]))).range(o?[m,0]:[0,m]);this.__chart__||d3.scale.linear().domain([0,1/0]).range(S.range())}this.__chart__=S;for(var T=(d3.min($),d3.max($),$[1],g.selectAll("g.nv-wrap.nv-bullet").data([n])),A=T.enter().append("g").attr("class","nvd3 nv-wrap nv-bullet"),E=A.append("g"),O=T.select("g"),r=0,N=$.length;N>r;r++){var I="nv-range nv-range"+r;2>=r&&(I=I+" nv-range"+x[r]),E.append("rect").attr("class",I)}E.append("rect").attr("class","nv-measure"),T.attr("transform","translate("+i.left+","+i.top+")");for(var P=function(t){return Math.abs(S(t)-S(0))},H=function(t){return S(0>t?t:0)},r=0,N=$.length;N>r;r++){var F=$[r];O.select("rect.nv-range"+r).attr("height",w).attr("width",P(F)).attr("x",H(F)).datum(F)}O.select("rect.nv-measure").style("fill",v).attr("height",w/3).attr("y",w/3).attr("width",0>_?S(0)-S(_[0]):S(_[0])-S(0)).attr("x",H(_)).on("mouseover",function(){y.elementMouseover({value:_[0],label:D[0]||"Current",color:d3.select(this).style("fill")})}).on("mousemove",function(){y.elementMousemove({value:_[0],label:D[0]||"Current",color:d3.select(this).style("fill")})}).on("mouseout",function(){y.elementMouseout({value:_[0],label:D[0]||"Current",color:d3.select(this).style("fill")})});var W=w/6,L=k.map(function(t,e){return{value:t,label:M[e]}});E.selectAll("path.nv-markerTriangle").data(L).enter().append("path").attr("class","nv-markerTriangle").attr("d","M0,"+W+"L"+W+","+-W+" "+-W+","+-W+"Z").on("mouseover",function(t){y.elementMouseover({value:t.value,label:t.label||"Previous",color:d3.select(this).style("fill"),pos:[S(t.value),w/2]})
}).on("mousemove",function(t){y.elementMousemove({value:t.value,label:t.label||"Previous",color:d3.select(this).style("fill")})}).on("mouseout",function(t){y.elementMouseout({value:t.value,label:t.label||"Previous",color:d3.select(this).style("fill")})}),O.selectAll("path.nv-markerTriangle").data(L).attr("transform",function(t){return"translate("+S(t.value)+","+w/2+")"}),T.selectAll(".nv-range").on("mouseover",function(t,e){var n=C[e]||b[e];y.elementMouseover({value:t,label:n,color:d3.select(this).style("fill")})}).on("mousemove",function(){y.elementMousemove({value:_[0],label:D[0]||"Previous",color:d3.select(this).style("fill")})}).on("mouseout",function(t,e){var n=C[e]||b[e];y.elementMouseout({value:t,label:n,color:d3.select(this).style("fill")})})}),n}var i={top:0,right:0,bottom:0,left:0},r="left",o=!1,a=function(t){return t.ranges},s=function(t){return t.markers?t.markers:[]},l=function(t){return t.measures},u=function(t){return t.rangeLabels?t.rangeLabels:[]},c=function(t){return t.markerLabels?t.markerLabels:[]},d=function(t){return t.measureLabels?t.measureLabels:[]},h=[0],f=380,p=30,g=null,m=null,v=t.utils.getColor(["#1f77b4"]),y=d3.dispatch("elementMouseover","elementMouseout","elementMousemove"),b=["Maximum","Mean","Minimum"],x=["Max","Avg","Min"];return n.dispatch=y,n.options=t.utils.optionsFunc.bind(n),n._options=Object.create({},{ranges:{get:function(){return a},set:function(t){a=t}},markers:{get:function(){return s},set:function(t){s=t}},measures:{get:function(){return l},set:function(t){l=t}},forceX:{get:function(){return h},set:function(t){h=t}},width:{get:function(){return f},set:function(t){f=t}},height:{get:function(){return p},set:function(t){p=t}},tickFormat:{get:function(){return m},set:function(t){m=t}},margin:{get:function(){return i},set:function(t){i.top=void 0!==t.top?t.top:i.top,i.right=void 0!==t.right?t.right:i.right,i.bottom=void 0!==t.bottom?t.bottom:i.bottom,i.left=void 0!==t.left?t.left:i.left}},orient:{get:function(){return r},set:function(t){r=t,o="right"==r||"bottom"==r}},color:{get:function(){return v},set:function(e){v=t.utils.getColor(e)}}}),t.utils.initOptions(n),n},t.models.bulletChart=function(){"use strict";function e(i){return i.each(function(r,p){var g=d3.select(this);t.utils.initSVG(g);var m=t.utils.availableWidth(c,g,a),v=d-a.top-a.bottom;if(e.update=function(){e(i)},e.container=this,!r||!s.call(this,r,p))return t.utils.noData(e,g),e;g.selectAll(".nv-noData").remove();var y=s.call(this,r,p).slice().sort(d3.descending),b=l.call(this,r,p).slice().sort(d3.descending),x=u.call(this,r,p).slice().sort(d3.descending),w=g.selectAll("g.nv-wrap.nv-bulletChart").data([r]),$=w.enter().append("g").attr("class","nvd3 nv-wrap nv-bulletChart"),k=$.append("g"),_=w.select("g");k.append("g").attr("class","nv-bulletWrap"),k.append("g").attr("class","nv-titles"),w.attr("transform","translate("+a.left+","+a.top+")");var C=d3.scale.linear().domain([0,Math.max(y[0],b[0]||0,x[0])]).range(o?[m,0]:[0,m]),M=this.__chart__||d3.scale.linear().domain([0,1/0]).range(C.range());this.__chart__=C;var D=k.select(".nv-titles").append("g").attr("text-anchor","end").attr("transform","translate(-6,"+(d-a.top-a.bottom)/2+")");D.append("text").attr("class","nv-title").text(function(t){return t.title}),D.append("text").attr("class","nv-subtitle").attr("dy","1em").text(function(t){return t.subtitle}),n.width(m).height(v);var S=_.select(".nv-bulletWrap");d3.transition(S).call(n);var T=h||C.tickFormat(m/100),A=_.selectAll("g.nv-tick").data(C.ticks(f?f:m/50),function(t){return this.textContent||T(t)}),E=A.enter().append("g").attr("class","nv-tick").attr("transform",function(t){return"translate("+M(t)+",0)"}).style("opacity",1e-6);E.append("line").attr("y1",v).attr("y2",7*v/6),E.append("text").attr("text-anchor","middle").attr("dy","1em").attr("y",7*v/6).text(T);var O=d3.transition(A).attr("transform",function(t){return"translate("+C(t)+",0)"}).style("opacity",1);O.select("line").attr("y1",v).attr("y2",7*v/6),O.select("text").attr("y",7*v/6),d3.transition(A.exit()).attr("transform",function(t){return"translate("+C(t)+",0)"}).style("opacity",1e-6).remove()}),d3.timer.flush(),e}var n=t.models.bullet(),i=t.models.tooltip(),r="left",o=!1,a={top:5,right:40,bottom:20,left:120},s=function(t){return t.ranges},l=function(t){return t.markers?t.markers:[]},u=function(t){return t.measures},c=null,d=55,h=null,f=null,p=null,g=d3.dispatch();return i.duration(0).headerEnabled(!1),n.dispatch.on("elementMouseover.tooltip",function(t){t.series={key:t.label,value:t.value,color:t.color},i.data(t).hidden(!1)}),n.dispatch.on("elementMouseout.tooltip",function(){i.hidden(!0)}),n.dispatch.on("elementMousemove.tooltip",function(){i()}),e.bullet=n,e.dispatch=g,e.tooltip=i,e.options=t.utils.optionsFunc.bind(e),e._options=Object.create({},{ranges:{get:function(){return s},set:function(t){s=t}},markers:{get:function(){return l},set:function(t){l=t}},measures:{get:function(){return u},set:function(t){u=t}},width:{get:function(){return c},set:function(t){c=t}},height:{get:function(){return d},set:function(t){d=t}},tickFormat:{get:function(){return h},set:function(t){h=t}},ticks:{get:function(){return f},set:function(t){f=t}},noData:{get:function(){return p},set:function(t){p=t}},margin:{get:function(){return a},set:function(t){a.top=void 0!==t.top?t.top:a.top,a.right=void 0!==t.right?t.right:a.right,a.bottom=void 0!==t.bottom?t.bottom:a.bottom,a.left=void 0!==t.left?t.left:a.left}},orient:{get:function(){return r},set:function(t){r=t,o="right"==r||"bottom"==r}}}),t.utils.inheritOptions(e,n),t.utils.initOptions(e),e},t.models.candlestickBar=function(){"use strict";function e(k){return k.each(function(e){n=d3.select(this);var k=t.utils.availableWidth(l,n,s),_=t.utils.availableHeight(u,n,s);t.utils.initSVG(n);var M=k/e[0].values.length*.45;d.domain(i||d3.extent(e[0].values.map(f).concat(b))),d.range(w?o||[.5*k/e[0].values.length,k*(e[0].values.length-.5)/e[0].values.length]:o||[5+M/2,k-M/2-5]),h.domain(r||[d3.min(e[0].values.map(y).concat(x)),d3.max(e[0].values.map(v).concat(x))]).range(a||[_,0]),d.domain()[0]===d.domain()[1]&&d.domain(d.domain()[0]?[d.domain()[0]-.01*d.domain()[0],d.domain()[1]+.01*d.domain()[1]]:[-1,1]),h.domain()[0]===h.domain()[1]&&h.domain(h.domain()[0]?[h.domain()[0]+.01*h.domain()[0],h.domain()[1]-.01*h.domain()[1]]:[-1,1]);var D=d3.select(this).selectAll("g.nv-wrap.nv-candlestickBar").data([e[0].values]),S=D.enter().append("g").attr("class","nvd3 nv-wrap nv-candlestickBar"),T=S.append("defs"),A=S.append("g"),E=D.select("g");A.append("g").attr("class","nv-ticks"),D.attr("transform","translate("+s.left+","+s.top+")"),n.on("click",function(t,e){C.chartClick({data:t,index:e,pos:d3.event,id:c})}),T.append("clipPath").attr("id","nv-chart-clip-path-"+c).append("rect"),D.select("#nv-chart-clip-path-"+c+" rect").attr("width",k).attr("height",_),E.attr("clip-path",$?"url(#nv-chart-clip-path-"+c+")":"");var O=D.select(".nv-ticks").selectAll(".nv-tick").data(function(t){return t});O.exit().remove();var N=O.enter().append("g");O.attr("class",function(t,e,n){return(g(t,e)>m(t,e)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+n+"-"+e});N.append("line").attr("class","nv-candlestick-lines").attr("transform",function(t,e){return"translate("+d(f(t,e))+",0)"}).attr("x1",0).attr("y1",function(t,e){return h(v(t,e))}).attr("x2",0).attr("y2",function(t,e){return h(y(t,e))}),N.append("rect").attr("class","nv-candlestick-rects nv-bars").attr("transform",function(t,e){return"translate("+(d(f(t,e))-M/2)+","+(h(p(t,e))-(g(t,e)>m(t,e)?h(m(t,e))-h(g(t,e)):0))+")"}).attr("x",0).attr("y",0).attr("width",M).attr("height",function(t,e){var n=g(t,e),i=m(t,e);return n>i?h(i)-h(n):h(n)-h(i)});O.select(".nv-candlestick-lines").transition().attr("transform",function(t,e){return"translate("+d(f(t,e))+",0)"}).attr("x1",0).attr("y1",function(t,e){return h(v(t,e))}).attr("x2",0).attr("y2",function(t,e){return h(y(t,e))}),O.select(".nv-candlestick-rects").transition().attr("transform",function(t,e){return"translate("+(d(f(t,e))-M/2)+","+(h(p(t,e))-(g(t,e)>m(t,e)?h(m(t,e))-h(g(t,e)):0))+")"}).attr("x",0).attr("y",0).attr("width",M).attr("height",function(t,e){var n=g(t,e),i=m(t,e);return n>i?h(i)-h(n):h(n)-h(i)})}),e}var n,i,r,o,a,s={top:0,right:0,bottom:0,left:0},l=null,u=null,c=Math.floor(1e4*Math.random()),d=d3.scale.linear(),h=d3.scale.linear(),f=function(t){return t.x},p=function(t){return t.y},g=function(t){return t.open},m=function(t){return t.close},v=function(t){return t.high},y=function(t){return t.low},b=[],x=[],w=!1,$=!0,k=t.utils.defaultColor(),_=!1,C=d3.dispatch("stateChange","changeState","renderEnd","chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove");return e.highlightPoint=function(t,i){e.clearHighlights(),n.select(".nv-candlestickBar .nv-tick-0-"+t).classed("hover",i)},e.clearHighlights=function(){n.select(".nv-candlestickBar .nv-tick.hover").classed("hover",!1)},e.dispatch=C,e.options=t.utils.optionsFunc.bind(e),e._options=Object.create({},{width:{get:function(){return l},set:function(t){l=t}},height:{get:function(){return u},set:function(t){u=t}},xScale:{get:function(){return d},set:function(t){d=t}},yScale:{get:function(){return h},set:function(t){h=t}},xDomain:{get:function(){return i},set:function(t){i=t}},yDomain:{get:function(){return r},set:function(t){r=t}},xRange:{get:function(){return o},set:function(t){o=t}},yRange:{get:function(){return a},set:function(t){a=t}},forceX:{get:function(){return b},set:function(t){b=t}},forceY:{get:function(){return x},set:function(t){x=t}},padData:{get:function(){return w},set:function(t){w=t}},clipEdge:{get:function(){return $},set:function(t){$=t}},id:{get:function(){return c},set:function(t){c=t}},interactive:{get:function(){return _},set:function(t){_=t}},x:{get:function(){return f},set:function(t){f=t}},y:{get:function(){return p},set:function(t){p=t}},open:{get:function(){return g()},set:function(t){g=t}},close:{get:function(){return m()},set:function(t){m=t}},high:{get:function(){return v},set:function(t){v=t}},low:{get:function(){return y},set:function(t){y=t}},margin:{get:function(){return s},set:function(t){s.top=void 0!=t.top?t.top:s.top,s.right=void 0!=t.right?t.right:s.right,s.bottom=void 0!=t.bottom?t.bottom:s.bottom,s.left=void 0!=t.left?t.left:s.left}},color:{get:function(){return k},set:function(e){k=t.utils.getColor(e)}}}),t.utils.initOptions(e),e},t.models.cumulativeLineChart=function(){"use strict";function e(d){return N.reset(),N.models(o),v&&N.models(a),y&&N.models(s),d.each(function(d){function M(){d3.select(e.container).style("cursor","ew-resize")}function A(){O.x=d3.event.x,O.i=Math.round(E.invert(O.x)),H()}function N(){d3.select(e.container).style("cursor","auto"),_.index=O.i,S.stateChange(_)}function H(){ee.data([O]);var t=e.duration();e.duration(0),e.update(),e.duration(t)}var F=d3.select(this);t.utils.initSVG(F),F.classed("nv-chart-"+k,!0);var W=this,L=t.utils.availableWidth(p,F,h),z=t.utils.availableHeight(g,F,h);if(e.update=function(){0===T?F.call(e):F.transition().duration(T).call(e)},e.container=this,_.setter(P(d),e.update).getter(I(d)).update(),_.disabled=d.map(function(t){return!!t.disabled}),!C){var R;C={};for(R in _)C[R]=_[R]instanceof Array?_[R].slice(0):_[R]}var j=d3.behavior.drag().on("dragstart",M).on("drag",A).on("dragend",N);if(!(d&&d.length&&d.filter(function(t){return t.values.length}).length))return t.utils.noData(e,F),e;if(F.selectAll(".nv-noData").remove(),i=o.xScale(),r=o.yScale(),$)o.yDomain(null);else{var q=d.filter(function(t){return!t.disabled}).map(function(t){var e=d3.extent(t.values,o.y());return e[0]<-.95&&(e[0]=-.95),[(e[0]-e[1])/(1+e[1]),(e[1]-e[0])/(1+e[0])]}),V=[d3.min(q,function(t){return t[0]}),d3.max(q,function(t){return t[1]})];o.yDomain(V)}E.domain([0,d[0].values.length-1]).range([0,L]).clamp(!0);var d=n(O.i,d),B=w?"none":"all",U=F.selectAll("g.nv-wrap.nv-cumulativeLine").data([d]),Y=U.enter().append("g").attr("class","nvd3 nv-wrap nv-cumulativeLine").append("g"),G=U.select("g");if(Y.append("g").attr("class","nv-interactive"),Y.append("g").attr("class","nv-x nv-axis").style("pointer-events","none"),Y.append("g").attr("class","nv-y nv-axis"),Y.append("g").attr("class","nv-background"),Y.append("g").attr("class","nv-linesWrap").style("pointer-events",B),Y.append("g").attr("class","nv-avgLinesWrap").style("pointer-events","none"),Y.append("g").attr("class","nv-legendWrap"),Y.append("g").attr("class","nv-controlsWrap"),m?(l.width(L),G.select(".nv-legendWrap").datum(d).call(l),h.top!=l.height()&&(h.top=l.height(),z=t.utils.availableHeight(g,F,h)),G.select(".nv-legendWrap").attr("transform","translate(0,"+-h.top+")")):G.select(".nv-legendWrap").selectAll("*").remove(),x){var X=[{key:"Re-scale y-axis",disabled:!$}];u.width(140).color(["#444","#444","#444"]).rightAlign(!1).margin({top:5,right:0,bottom:5,left:20}),G.select(".nv-controlsWrap").datum(X).attr("transform","translate(0,"+-h.top+")").call(u)}else G.select(".nv-controlsWrap").selectAll("*").remove();U.attr("transform","translate("+h.left+","+h.top+")"),b&&G.select(".nv-y.nv-axis").attr("transform","translate("+L+",0)");var K=d.filter(function(t){return t.tempDisabled});U.select(".tempDisabled").remove(),K.length&&U.append("text").attr("class","tempDisabled").attr("x",L/2).attr("y","-.71em").style("text-anchor","end").text(K.map(function(t){return t.key}).join(", ")+" values cannot be calculated for this time period."),w&&(c.width(L).height(z).margin({left:h.left,top:h.top}).svgContainer(F).xScale(i),U.select(".nv-interactive").call(c)),Y.select(".nv-background").append("rect"),G.select(".nv-background rect").attr("width",L).attr("height",z),o.y(function(t){return t.display.y}).width(L).height(z).color(d.map(function(t,e){return t.color||f(t,e)}).filter(function(t,e){return!d[e].disabled&&!d[e].tempDisabled}));var Z=G.select(".nv-linesWrap").datum(d.filter(function(t){return!t.disabled&&!t.tempDisabled}));Z.call(o),d.forEach(function(t,e){t.seriesIndex=e});var Q=d.filter(function(t){return!t.disabled&&!!D(t)}),J=G.select(".nv-avgLinesWrap").selectAll("line").data(Q,function(t){return t.key}),te=function(t){var e=r(D(t));return 0>e?0:e>z?z:e};J.enter().append("line").style("stroke-width",2).style("stroke-dasharray","10,10").style("stroke",function(t){return o.color()(t,t.seriesIndex)}).attr("x1",0).attr("x2",L).attr("y1",te).attr("y2",te),J.style("stroke-opacity",function(t){var e=r(D(t));return 0>e||e>z?0:1}).attr("x1",0).attr("x2",L).attr("y1",te).attr("y2",te),J.exit().remove();var ee=Z.selectAll(".nv-indexLine").data([O]);ee.enter().append("rect").attr("class","nv-indexLine").attr("width",3).attr("x",-2).attr("fill","red").attr("fill-opacity",.5).style("pointer-events","all").call(j),ee.attr("transform",function(t){return"translate("+E(t.i)+",0)"}).attr("height",z),v&&(a.scale(i)._ticks(t.utils.calcTicksX(L/70,d)).tickSize(-z,0),G.select(".nv-x.nv-axis").attr("transform","translate(0,"+r.range()[0]+")"),G.select(".nv-x.nv-axis").call(a)),y&&(s.scale(r)._ticks(t.utils.calcTicksY(z/36,d)).tickSize(-L,0),G.select(".nv-y.nv-axis").call(s)),G.select(".nv-background rect").on("click",function(){O.x=d3.mouse(this)[0],O.i=Math.round(E.invert(O.x)),_.index=O.i,S.stateChange(_),H()}),o.dispatch.on("elementClick",function(t){O.i=t.pointIndex,O.x=E(O.i),_.index=O.i,S.stateChange(_),H()}),u.dispatch.on("legendClick",function(t){t.disabled=!t.disabled,$=!t.disabled,_.rescaleY=$,S.stateChange(_),e.update()}),l.dispatch.on("stateChange",function(t){for(var n in t)_[n]=t[n];S.stateChange(_),e.update()}),c.dispatch.on("elementMousemove",function(n){o.clearHighlights();var i,r,l,u=[];if(d.filter(function(t,e){return t.seriesIndex=e,!t.disabled}).forEach(function(a,s){r=t.interactiveBisect(a.values,n.pointXValue,e.x()),o.highlightPoint(s,r,!0);var c=a.values[r];"undefined"!=typeof c&&("undefined"==typeof i&&(i=c),"undefined"==typeof l&&(l=e.xScale()(e.x()(c,r))),u.push({key:a.key,value:e.y()(c,r),color:f(a,a.seriesIndex)}))}),u.length>2){var h=e.yScale().invert(n.mouseY),p=Math.abs(e.yScale().domain()[0]-e.yScale().domain()[1]),g=.03*p,m=t.nearestValueIndex(u.map(function(t){return t.value}),h,g);null!==m&&(u[m].highlight=!0)}var v=a.tickFormat()(e.x()(i,r),r);c.tooltip.chartContainer(W.parentNode).valueFormatter(function(t){return s.tickFormat()(t)}).data({value:v,series:u})(),c.renderGuideLine(l)}),c.dispatch.on("elementMouseout",function(){o.clearHighlights()}),S.on("changeState",function(t){"undefined"!=typeof t.disabled&&(d.forEach(function(e,n){e.disabled=t.disabled[n]}),_.disabled=t.disabled),"undefined"!=typeof t.index&&(O.i=t.index,O.x=E(O.i),_.index=t.index,ee.data([O])),"undefined"!=typeof t.rescaleY&&($=t.rescaleY),e.update()})}),N.renderEnd("cumulativeLineChart immediate"),e}function n(t,e){return H||(H=o.y()),e.map(function(e){if(!e.values)return e;var n=e.values[t];if(null==n)return e;var i=H(n,t);return-.95>i&&!A?(e.tempDisabled=!0,e):(e.tempDisabled=!1,e.values=e.values.map(function(t,e){return t.display={y:(H(t,e)-i)/(1+i)},t}),e)})}var i,r,o=t.models.line(),a=t.models.axis(),s=t.models.axis(),l=t.models.legend(),u=t.models.legend(),c=t.interactiveGuideline(),d=t.models.tooltip(),h={top:30,right:30,bottom:50,left:60},f=t.utils.defaultColor(),p=null,g=null,m=!0,v=!0,y=!0,b=!1,x=!0,w=!1,$=!0,k=o.id(),_=t.utils.state(),C=null,M=null,D=function(t){return t.average},S=d3.dispatch("stateChange","changeState","renderEnd"),T=250,A=!1;_.index=0,_.rescaleY=$,a.orient("bottom").tickPadding(7),s.orient(b?"right":"left"),d.valueFormatter(function(t,e){return s.tickFormat()(t,e)}).headerFormatter(function(t,e){return a.tickFormat()(t,e)}),u.updateState(!1);var E=d3.scale.linear(),O={i:0,x:0},N=t.utils.renderWatch(S,T),I=function(t){return function(){return{active:t.map(function(t){return!t.disabled}),index:O.i,rescaleY:$}}},P=function(t){return function(e){void 0!==e.index&&(O.i=e.index),void 0!==e.rescaleY&&($=e.rescaleY),void 0!==e.active&&t.forEach(function(t,n){t.disabled=!e.active[n]})}};o.dispatch.on("elementMouseover.tooltip",function(t){var n={x:e.x()(t.point),y:e.y()(t.point),color:t.point.color};t.point=n,d.data(t).hidden(!1)}),o.dispatch.on("elementMouseout.tooltip",function(){d.hidden(!0)});var H=null;return e.dispatch=S,e.lines=o,e.legend=l,e.controls=u,e.xAxis=a,e.yAxis=s,e.interactiveLayer=c,e.state=_,e.tooltip=d,e.options=t.utils.optionsFunc.bind(e),e._options=Object.create({},{width:{get:function(){return p},set:function(t){p=t}},height:{get:function(){return g},set:function(t){g=t}},rescaleY:{get:function(){return $},set:function(t){$=t}},showControls:{get:function(){return x},set:function(t){x=t}},showLegend:{get:function(){return m},set:function(t){m=t}},average:{get:function(){return D},set:function(t){D=t}},defaultState:{get:function(){return C},set:function(t){C=t}},noData:{get:function(){return M},set:function(t){M=t}},showXAxis:{get:function(){return v},set:function(t){v=t}},showYAxis:{get:function(){return y},set:function(t){y=t}},noErrorCheck:{get:function(){return A},set:function(t){A=t}},margin:{get:function(){return h},set:function(t){h.top=void 0!==t.top?t.top:h.top,h.right=void 0!==t.right?t.right:h.right,h.bottom=void 0!==t.bottom?t.bottom:h.bottom,h.left=void 0!==t.left?t.left:h.left}},color:{get:function(){return f},set:function(e){f=t.utils.getColor(e),l.color(f)}},useInteractiveGuideline:{get:function(){return w},set:function(t){w=t,t===!0&&(e.interactive(!1),e.useVoronoi(!1))}},rightAlignYAxis:{get:function(){return b},set:function(t){b=t,s.orient(t?"right":"left")}},duration:{get:function(){return T},set:function(t){T=t,o.duration(T),a.duration(T),s.duration(T),N.reset(T)}}}),t.utils.inheritOptions(e,o),t.utils.initOptions(e),e},t.models.discreteBar=function(){"use strict";function e(h){return _.reset(),h.each(function(e){var h=c-u.left-u.right,k=d-u.top-u.bottom;n=d3.select(this),t.utils.initSVG(n),e.forEach(function(t,e){t.values.forEach(function(t){t.series=e})});var C=i&&r?[]:e.map(function(t){return t.values.map(function(t,e){return{x:g(t,e),y:m(t,e),y0:t.y0}})});f.domain(i||d3.merge(C).map(function(t){return t.x})).rangeBands(o||[0,h],.1),p.domain(r||d3.extent(d3.merge(C).map(function(t){return t.y}).concat(v))),p.range(b?a||[k-(p.domain()[0]<0?12:0),p.domain()[1]>0?12:0]:a||[k,0]),s=s||f,l=l||p.copy().range([p(0),p(0)]);{var M=n.selectAll("g.nv-wrap.nv-discretebar").data([e]),D=M.enter().append("g").attr("class","nvd3 nv-wrap nv-discretebar"),S=D.append("g");M.select("g")}S.append("g").attr("class","nv-groups"),M.attr("transform","translate("+u.left+","+u.top+")");var T=M.select(".nv-groups").selectAll(".nv-group").data(function(t){return t},function(t){return t.key});T.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),T.exit().watchTransition(_,"discreteBar: exit groups").style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove(),T.attr("class",function(t,e){return"nv-group nv-series-"+e}).classed("hover",function(t){return t.hover}),T.watchTransition(_,"discreteBar: groups").style("stroke-opacity",1).style("fill-opacity",.75);var A=T.selectAll("g.nv-bar").data(function(t){return t.values});A.exit().remove();var E=A.enter().append("g").attr("transform",function(t,e){return"translate("+(f(g(t,e))+.05*f.rangeBand())+", "+p(0)+")"}).on("mouseover",function(t,e){d3.select(this).classed("hover",!0),w.elementMouseover({data:t,index:e,color:d3.select(this).style("fill")})}).on("mouseout",function(t,e){d3.select(this).classed("hover",!1),w.elementMouseout({data:t,index:e,color:d3.select(this).style("fill")})}).on("mousemove",function(t,e){w.elementMousemove({data:t,index:e,color:d3.select(this).style("fill")})}).on("click",function(t,e){var n=this;w.elementClick({data:t,index:e,color:d3.select(this).style("fill"),event:d3.event,element:n}),d3.event.stopPropagation()}).on("dblclick",function(t,e){w.elementDblClick({data:t,index:e,color:d3.select(this).style("fill")}),d3.event.stopPropagation()});E.append("rect").attr("height",0).attr("width",.9*f.rangeBand()/e.length),b?(E.append("text").attr("text-anchor","middle"),A.select("text").text(function(t,e){return x(m(t,e))}).watchTransition(_,"discreteBar: bars text").attr("x",.9*f.rangeBand()/2).attr("y",function(t,e){return m(t,e)<0?p(m(t,e))-p(0)+12:-4})):A.selectAll("text").remove(),A.attr("class",function(t,e){return m(t,e)<0?"nv-bar negative":"nv-bar positive"}).style("fill",function(t,e){return t.color||y(t,e)}).style("stroke",function(t,e){return t.color||y(t,e)}).select("rect").attr("class",$).watchTransition(_,"discreteBar: bars rect").attr("width",.9*f.rangeBand()/e.length),A.watchTransition(_,"discreteBar: bars").attr("transform",function(t,e){var n=f(g(t,e))+.05*f.rangeBand(),i=m(t,e)<0?p(0):p(0)-p(m(t,e))<1?p(0)-1:p(m(t,e));return"translate("+n+", "+i+")"}).select("rect").attr("height",function(t,e){return Math.max(Math.abs(p(m(t,e))-p(0)),1)}),s=f.copy(),l=p.copy()}),_.renderEnd("discreteBar immediate"),e}var n,i,r,o,a,s,l,u={top:0,right:0,bottom:0,left:0},c=960,d=500,h=Math.floor(1e4*Math.random()),f=d3.scale.ordinal(),p=d3.scale.linear(),g=function(t){return t.x},m=function(t){return t.y},v=[0],y=t.utils.defaultColor(),b=!1,x=d3.format(",.2f"),w=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),$="discreteBar",k=250,_=t.utils.renderWatch(w,k);return e.dispatch=w,e.options=t.utils.optionsFunc.bind(e),e._options=Object.create({},{width:{get:function(){return c},set:function(t){c=t}},height:{get:function(){return d},set:function(t){d=t}},forceY:{get:function(){return v},set:function(t){v=t}},showValues:{get:function(){return b},set:function(t){b=t}},x:{get:function(){return g},set:function(t){g=t}},y:{get:function(){return m},set:function(t){m=t}},xScale:{get:function(){return f},set:function(t){f=t}},yScale:{get:function(){return p},set:function(t){p=t}},xDomain:{get:function(){return i},set:function(t){i=t}},yDomain:{get:function(){return r},set:function(t){r=t}},xRange:{get:function(){return o},set:function(t){o=t}},yRange:{get:function(){return a},set:function(t){a=t}},valueFormat:{get:function(){return x},set:function(t){x=t}},id:{get:function(){return h},set:function(t){h=t}},rectClass:{get:function(){return $},set:function(t){$=t}},margin:{get:function(){return u},set:function(t){u.top=void 0!==t.top?t.top:u.top,u.right=void 0!==t.right?t.right:u.right,u.bottom=void 0!==t.bottom?t.bottom:u.bottom,u.left=void 0!==t.left?t.left:u.left}},color:{get:function(){return y},set:function(e){y=t.utils.getColor(e)}},duration:{get:function(){return k},set:function(t){k=t,_.reset(k)}}}),t.utils.initOptions(e),e},t.models.discreteBarChart=function(){"use strict";function e(l){return k.reset(),k.models(r),p&&k.models(o),g&&k.models(a),l.each(function(l){var h=d3.select(this);t.utils.initSVG(h);var x=t.utils.availableWidth(c,h,u),k=t.utils.availableHeight(d,h,u);if(e.update=function(){w.beforeUpdate(),h.transition().duration($).call(e)},e.container=this,!(l&&l.length&&l.filter(function(t){return t.values.length}).length))return t.utils.noData(e,h),e;h.selectAll(".nv-noData").remove(),n=r.xScale(),i=r.yScale().clamp(!0);var _=h.selectAll("g.nv-wrap.nv-discreteBarWithAxes").data([l]),C=_.enter().append("g").attr("class","nvd3 nv-wrap nv-discreteBarWithAxes").append("g"),M=C.append("defs"),D=_.select("g");C.append("g").attr("class","nv-x nv-axis"),C.append("g").attr("class","nv-y nv-axis").append("g").attr("class","nv-zeroLine").append("line"),C.append("g").attr("class","nv-barsWrap"),C.append("g").attr("class","nv-legendWrap"),D.attr("transform","translate("+u.left+","+u.top+")"),f?(s.width(x),D.select(".nv-legendWrap").datum(l).call(s),u.top!=s.height()&&(u.top=s.height(),k=t.utils.availableHeight(d,h,u)),_.select(".nv-legendWrap").attr("transform","translate(0,"+-u.top+")")):D.select(".nv-legendWrap").selectAll("*").remove(),m&&D.select(".nv-y.nv-axis").attr("transform","translate("+x+",0)"),r.width(x).height(k);var S=D.select(".nv-barsWrap").datum(l.filter(function(t){return!t.disabled}));if(S.transition().call(r),M.append("clipPath").attr("id","nv-x-label-clip-"+r.id()).append("rect"),D.select("#nv-x-label-clip-"+r.id()+" rect").attr("width",n.rangeBand()*(v?2:1)).attr("height",16).attr("x",-n.rangeBand()/(v?1:2)),p){o.scale(n)._ticks(t.utils.calcTicksX(x/100,l)).tickSize(-k,0),D.select(".nv-x.nv-axis").attr("transform","translate(0,"+(i.range()[0]+(r.showValues()&&i.domain()[0]<0?16:0))+")"),D.select(".nv-x.nv-axis").call(o);var T=D.select(".nv-x.nv-axis").selectAll("g");v&&T.selectAll("text").attr("transform",function(t,e,n){return"translate(0,"+(n%2==0?"5":"17")+")"}),b&&T.selectAll(".tick text").attr("transform","rotate("+b+" 0,0)").style("text-anchor",b>0?"start":"end"),y&&D.selectAll(".tick text").call(t.utils.wrapTicks,e.xAxis.rangeBand())}g&&(a.scale(i)._ticks(t.utils.calcTicksY(k/36,l)).tickSize(-x,0),D.select(".nv-y.nv-axis").call(a)),D.select(".nv-zeroLine line").attr("x1",0).attr("x2",m?-x:x).attr("y1",i(0)).attr("y2",i(0))}),k.renderEnd("discreteBar chart immediate"),e}var n,i,r=t.models.discreteBar(),o=t.models.axis(),a=t.models.axis(),s=t.models.legend(),l=t.models.tooltip(),u={top:15,right:10,bottom:50,left:60},c=null,d=null,h=t.utils.getColor(),f=!1,p=!0,g=!0,m=!1,v=!1,y=!1,b=0,x=null,w=d3.dispatch("beforeUpdate","renderEnd"),$=250;o.orient("bottom").showMaxMin(!1).tickFormat(function(t){return t}),a.orient(m?"right":"left").tickFormat(d3.format(",.1f")),l.duration(0).headerEnabled(!1).valueFormatter(function(t,e){return a.tickFormat()(t,e)}).keyFormatter(function(t,e){return o.tickFormat()(t,e)});var k=t.utils.renderWatch(w,$);return r.dispatch.on("elementMouseover.tooltip",function(t){t.series={key:e.x()(t.data),value:e.y()(t.data),color:t.color},l.data(t).hidden(!1)}),r.dispatch.on("elementMouseout.tooltip",function(){l.hidden(!0)}),r.dispatch.on("elementMousemove.tooltip",function(){l()}),e.dispatch=w,e.discretebar=r,e.legend=s,e.xAxis=o,e.yAxis=a,e.tooltip=l,e.options=t.utils.optionsFunc.bind(e),e._options=Object.create({},{width:{get:function(){return c},set:function(t){c=t}},height:{get:function(){return d},set:function(t){d=t}},showLegend:{get:function(){return f},set:function(t){f=t}},staggerLabels:{get:function(){return v},set:function(t){v=t}},rotateLabels:{get:function(){return b},set:function(t){b=t}},wrapLabels:{get:function(){return y},set:function(t){y=!!t}},showXAxis:{get:function(){return p},set:function(t){p=t}},showYAxis:{get:function(){return g},set:function(t){g=t}},noData:{get:function(){return x},set:function(t){x=t}},margin:{get:function(){return u},set:function(t){u.top=void 0!==t.top?t.top:u.top,u.right=void 0!==t.right?t.right:u.right,u.bottom=void 0!==t.bottom?t.bottom:u.bottom,u.left=void 0!==t.left?t.left:u.left}},duration:{get:function(){return $},set:function(t){$=t,k.reset($),r.duration($),o.duration($),a.duration($)}},color:{get:function(){return h},set:function(e){h=t.utils.getColor(e),r.color(h),s.color(h)}},rightAlignYAxis:{get:function(){return m},set:function(t){m=t,a.orient(t?"right":"left")}}}),t.utils.inheritOptions(e,r),t.utils.initOptions(e),e},t.models.distribution=function(){"use strict";function e(c){return h.reset(),c.each(function(e){var c=(r-("x"===a?i.left+i.right:i.top+i.bottom),"x"==a?"y":"x"),d=d3.select(this);t.utils.initSVG(d),n=n||u;var f=d.selectAll("g.nv-distribution").data([e]),p=f.enter().append("g").attr("class","nvd3 nv-distribution"),g=(p.append("g"),f.select("g"));f.attr("transform","translate("+i.left+","+i.top+")");var m=g.selectAll("g.nv-dist").data(function(t){return t},function(t){return t.key});m.enter().append("g"),m.attr("class",function(t,e){return"nv-dist nv-series-"+e}).style("stroke",function(t,e){return l(t,e)});var v=m.selectAll("line.nv-dist"+a).data(function(t){return t.values});v.enter().append("line").attr(a+"1",function(t,e){return n(s(t,e))}).attr(a+"2",function(t,e){return n(s(t,e))}),h.transition(m.exit().selectAll("line.nv-dist"+a),"dist exit").attr(a+"1",function(t,e){return u(s(t,e))}).attr(a+"2",function(t,e){return u(s(t,e))}).style("stroke-opacity",0).remove(),v.attr("class",function(t,e){return"nv-dist"+a+" nv-dist"+a+"-"+e}).attr(c+"1",0).attr(c+"2",o),h.transition(v,"dist").attr(a+"1",function(t,e){return u(s(t,e))}).attr(a+"2",function(t,e){return u(s(t,e))}),n=u.copy()}),h.renderEnd("distribution immediate"),e}var n,i={top:0,right:0,bottom:0,left:0},r=400,o=8,a="x",s=function(t){return t[a]},l=t.utils.defaultColor(),u=d3.scale.linear(),c=250,d=d3.dispatch("renderEnd"),h=t.utils.renderWatch(d,c);return e.options=t.utils.optionsFunc.bind(e),e.dispatch=d,e.margin=function(t){return arguments.length?(i.top="undefined"!=typeof t.top?t.top:i.top,i.right="undefined"!=typeof t.right?t.right:i.right,i.bottom="undefined"!=typeof t.bottom?t.bottom:i.bottom,i.left="undefined"!=typeof t.left?t.left:i.left,e):i},e.width=function(t){return arguments.length?(r=t,e):r},e.axis=function(t){return arguments.length?(a=t,e):a},e.size=function(t){return arguments.length?(o=t,e):o},e.getData=function(t){return arguments.length?(s=d3.functor(t),e):s},e.scale=function(t){return arguments.length?(u=t,e):u},e.color=function(n){return arguments.length?(l=t.utils.getColor(n),e):l},e.duration=function(t){return arguments.length?(c=t,h.reset(c),e):c},e},t.models.focus=function(e){"use strict";function n(b){return y.reset(),y.models(e),h&&y.models(o),f&&y.models(a),b.each(function(y){function b(t){var e=+("e"==t),n=e?1:-1,i=_/3;return"M"+.5*n+","+i+"A6,6 0 0 "+e+" "+6.5*n+","+(i+6)+"V"+(2*i-6)+"A6,6 0 0 "+e+" "+.5*n+","+2*i+"ZM"+2.5*n+","+(i+8)+"V"+(2*i-8)+"M"+4.5*n+","+(i+8)+"V"+(2*i-8)}function x(){s.empty()||s.extent(g),T.data([s.empty()?i.domain():g]).each(function(t){var e=i(t[0])-i.range()[0],n=k-i(t[1]);d3.select(this).select(".left").attr("width",0>e?0:e),d3.select(this).select(".right").attr("x",i(t[1])).attr("width",0>n?0:n)})}function w(){g=s.empty()?null:s.extent();var t=s.empty()?i.domain():s.extent();Math.abs(t[0]-t[1])<=1||(v.brush({extent:t,brush:s}),x(),v.onBrush(t))
}var $=d3.select(this);t.utils.initSVG($);var k=t.utils.availableWidth(c,$,l),_=d-l.top-l.bottom;n.update=function(){0===m?$.call(n):$.transition().duration(m).call(n)},n.container=this,i=e.xScale(),r=e.yScale();var C=$.selectAll("g.nv-focus").data([y]),M=C.enter().append("g").attr("class","nvd3 nv-focus").append("g"),D=C.select("g");C.attr("transform","translate("+l.left+","+l.top+")"),M.append("g").attr("class","nv-background").append("rect"),M.append("g").attr("class","nv-x nv-axis"),M.append("g").attr("class","nv-y nv-axis"),M.append("g").attr("class","nv-contentWrap"),M.append("g").attr("class","nv-brushBackground"),M.append("g").attr("class","nv-x nv-brush"),p&&D.select(".nv-y.nv-axis").attr("transform","translate("+k+",0)"),D.select(".nv-background rect").attr("width",k).attr("height",_),e.width(k).height(_).color(y.map(function(t,e){return t.color||u(t,e)}).filter(function(t,e){return!y[e].disabled}));var S=D.select(".nv-contentWrap").datum(y.filter(function(t){return!t.disabled}));d3.transition(S).call(e),s.x(i).on("brush",function(){w()}),g&&s.extent(g);var T=D.select(".nv-brushBackground").selectAll("g").data([g||s.extent()]),A=T.enter().append("g");A.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",_),A.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",_);var E=D.select(".nv-x.nv-brush").call(s);E.selectAll("rect").attr("height",_),E.selectAll(".resize").append("path").attr("d",b),w(),D.select(".nv-background rect").attr("width",k).attr("height",_),h&&(o.scale(i)._ticks(t.utils.calcTicksX(k/100,y)).tickSize(-_,0),D.select(".nv-x.nv-axis").attr("transform","translate(0,"+r.range()[0]+")"),d3.transition(D.select(".nv-x.nv-axis")).call(o)),f&&(a.scale(r)._ticks(t.utils.calcTicksY(_/36,y)).tickSize(-k,0),d3.transition(D.select(".nv-y.nv-axis")).call(a)),D.select(".nv-x.nv-axis").attr("transform","translate(0,"+r.range()[0]+")")}),y.renderEnd("focus immediate"),n}var i,r,e=e||t.models.line(),o=t.models.axis(),a=t.models.axis(),s=d3.svg.brush(),l={top:10,right:0,bottom:30,left:0},u=t.utils.defaultColor(),c=null,d=70,h=!0,f=!1,p=!1,g=null,m=250,v=d3.dispatch("brush","onBrush","renderEnd");e.interactive(!1),e.pointActive(function(){return!1});var y=t.utils.renderWatch(v,m);return n.dispatch=v,n.content=e,n.brush=s,n.xAxis=o,n.yAxis=a,n.options=t.utils.optionsFunc.bind(n),n._options=Object.create({},{width:{get:function(){return c},set:function(t){c=t}},height:{get:function(){return d},set:function(t){d=t}},showXAxis:{get:function(){return h},set:function(t){h=t}},showYAxis:{get:function(){return f},set:function(t){f=t}},brushExtent:{get:function(){return g},set:function(t){g=t}},margin:{get:function(){return l},set:function(t){l.top=void 0!==t.top?t.top:l.top,l.right=void 0!==t.right?t.right:l.right,l.bottom=void 0!==t.bottom?t.bottom:l.bottom,l.left=void 0!==t.left?t.left:l.left}},duration:{get:function(){return m},set:function(t){m=t,y.reset(m),e.duration(m),o.duration(m),a.duration(m)}},color:{get:function(){return u},set:function(n){u=t.utils.getColor(n),e.color(u)}},interpolate:{get:function(){return e.interpolate()},set:function(t){e.interpolate(t)}},xTickFormat:{get:function(){return o.tickFormat()},set:function(t){o.tickFormat(t)}},yTickFormat:{get:function(){return a.tickFormat()},set:function(t){a.tickFormat(t)}},x:{get:function(){return e.x()},set:function(t){e.x(t)}},y:{get:function(){return e.y()},set:function(t){e.y(t)}},rightAlignYAxis:{get:function(){return p},set:function(t){p=t,a.orient(p?"right":"left")}}}),t.utils.inheritOptions(n,e),t.utils.initOptions(n),n},t.models.forceDirectedGraph=function(){"use strict";function e(a){return x.reset(),a.each(function(a){o=d3.select(this),t.utils.initSVG(o);var u=t.utils.availableWidth(i,o,n),x=t.utils.availableHeight(r,o,n);if(o.attr("width",u).attr("height",x),!(a&&a.links&&a.nodes))return t.utils.noData(e,o),e;o.selectAll(".nv-noData").remove(),o.selectAll("*").remove();var w=new Set;a.nodes.forEach(function(t){var e=Object.keys(t);e.forEach(function(t){w.add(t)})});var $=d3.layout.force().nodes(a.nodes).links(a.links).size([u,x]).linkStrength(c).friction(d).linkDistance(h).charge(f).gravity(p).theta(g).alpha(m).start(),k=o.selectAll(".link").data(a.links).enter().append("line").attr("class","nv-force-link").style("stroke-width",function(t){return Math.sqrt(t.value)}),_=o.selectAll(".node").data(a.nodes).enter().append("g").attr("class","nv-force-node").call($.drag);_.append("circle").attr("r",v).style("fill",function(t){return s(t)}).on("mouseover",function(t){o.select(".nv-series-"+t.seriesIndex+" .nv-distx-"+t.pointIndex).attr("y1",t.py),o.select(".nv-series-"+t.seriesIndex+" .nv-disty-"+t.pointIndex).attr("x2",t.px);var e=s(t);t.series=[],w.forEach(function(n){t.series.push({color:e,key:n,value:t[n]})}),l.data(t).hidden(!1)}).on("mouseout",function(){l.hidden(!0)}),l.headerFormatter(function(){return"Node"}),b(k),y(_),$.on("tick",function(){k.attr("x1",function(t){return t.source.x}).attr("y1",function(t){return t.source.y}).attr("x2",function(t){return t.target.x}).attr("y2",function(t){return t.target.y}),_.attr("transform",function(t){return"translate("+t.x+", "+t.y+")"})})}),e}var n={top:2,right:0,bottom:2,left:0},i=400,r=32,o=null,a=d3.dispatch("renderEnd"),s=t.utils.getColor(["#000"]),l=t.models.tooltip(),u=null,c=.1,d=.9,h=30,f=-120,p=.1,g=.8,m=.1,v=5,y=function(){},b=function(){},x=t.utils.renderWatch(a);return e.options=t.utils.optionsFunc.bind(e),e._options=Object.create({},{width:{get:function(){return i},set:function(t){i=t}},height:{get:function(){return r},set:function(t){r=t}},linkStrength:{get:function(){return c},set:function(t){c=t}},friction:{get:function(){return d},set:function(t){d=t}},linkDist:{get:function(){return h},set:function(t){h=t}},charge:{get:function(){return f},set:function(t){f=t}},gravity:{get:function(){return p},set:function(t){p=t}},theta:{get:function(){return g},set:function(t){g=t}},alpha:{get:function(){return m},set:function(t){m=t}},radius:{get:function(){return v},set:function(t){v=t}},x:{get:function(){return getX},set:function(t){getX=d3.functor(t)}},y:{get:function(){return getY},set:function(t){getY=d3.functor(t)}},margin:{get:function(){return n},set:function(t){n.top=void 0!==t.top?t.top:n.top,n.right=void 0!==t.right?t.right:n.right,n.bottom=void 0!==t.bottom?t.bottom:n.bottom,n.left=void 0!==t.left?t.left:n.left}},color:{get:function(){return s},set:function(e){s=t.utils.getColor(e)}},noData:{get:function(){return u},set:function(t){u=t}},nodeExtras:{get:function(){return y},set:function(t){y=t}},linkExtras:{get:function(){return b},set:function(t){b=t}}}),e.dispatch=a,e.tooltip=l,t.utils.initOptions(e),e},t.models.furiousLegend=function(){"use strict";function e(m){function v(t,e){return"furious"!=g?"#000":f?t.disengaged?a(t,e):"#fff":f?void 0:t.disabled?a(t,e):"#fff"}function y(t,e){return f&&"furious"==g?t.disengaged?"#fff":a(t,e):t.disabled?"#fff":a(t,e)}return m.each(function(e){var m=i-n.left-n.right,b=d3.select(this);t.utils.initSVG(b);var x=b.selectAll("g.nv-legend").data([e]),w=(x.enter().append("g").attr("class","nvd3 nv-legend").append("g"),x.select("g"));x.attr("transform","translate("+n.left+","+n.top+")");var $,k=w.selectAll(".nv-series").data(function(t){return"furious"!=g?t:t.filter(function(t){return f?!0:!t.disengaged})}),_=k.enter().append("g").attr("class","nv-series");if("classic"==g)_.append("circle").style("stroke-width",2).attr("class","nv-legend-symbol").attr("r",5),$=k.select("circle");else if("furious"==g){_.append("rect").style("stroke-width",2).attr("class","nv-legend-symbol").attr("rx",3).attr("ry",3),$=k.select("rect"),_.append("g").attr("class","nv-check-box").property("innerHTML",'<path d="M0.5,5 L22.5,5 L22.5,26.5 L0.5,26.5 L0.5,5 Z" class="nv-box"></path><path d="M5.5,12.8618467 L11.9185089,19.2803556 L31,0.198864511" class="nv-check"></path>').attr("transform","translate(-10,-8)scale(0.5)");var C=k.select(".nv-check-box");C.each(function(t,e){d3.select(this).selectAll("path").attr("stroke",v(t,e))})}_.append("text").attr("text-anchor","start").attr("class","nv-legend-text").attr("dy",".32em").attr("dx","8");var M=k.select("text.nv-legend-text");k.on("mouseover",function(t,e){p.legendMouseover(t,e)}).on("mouseout",function(t,e){p.legendMouseout(t,e)}).on("click",function(t,e){p.legendClick(t,e);var n=k.data();if(d){if("classic"==g)h?(n.forEach(function(t){t.disabled=!0}),t.disabled=!1):(t.disabled=!t.disabled,n.every(function(t){return t.disabled})&&n.forEach(function(t){t.disabled=!1}));else if("furious"==g)if(f)t.disengaged=!t.disengaged,t.userDisabled=void 0==t.userDisabled?!!t.disabled:t.userDisabled,t.disabled=t.disengaged||t.userDisabled;else if(!f){t.disabled=!t.disabled,t.userDisabled=t.disabled;var i=n.filter(function(t){return!t.disengaged});i.every(function(t){return t.userDisabled})&&n.forEach(function(t){t.disabled=t.userDisabled=!1})}p.stateChange({disabled:n.map(function(t){return!!t.disabled}),disengaged:n.map(function(t){return!!t.disengaged})})}}).on("dblclick",function(t,e){if(("furious"!=g||!f)&&(p.legendDblclick(t,e),d)){var n=k.data();n.forEach(function(t){t.disabled=!0,"furious"==g&&(t.userDisabled=t.disabled)}),t.disabled=!1,"furious"==g&&(t.userDisabled=t.disabled),p.stateChange({disabled:n.map(function(t){return!!t.disabled})})}}),k.classed("nv-disabled",function(t){return t.userDisabled}),k.exit().remove(),M.attr("fill",v).text(o);var D;switch(g){case"furious":D=23;break;case"classic":D=20}if(l){var S=[];k.each(function(e){var n;if(o(e)&&o(e).length>s){var i=o(e).substring(0,s);n=d3.select(this).select("text").text(i+"..."),d3.select(this).append("svg:title").text(o(e))}else n=d3.select(this).select("text");var r;try{if(r=n.node().getComputedTextLength(),0>=r)throw Error()}catch(a){r=t.utils.calcApproxTextWidth(n)}S.push(r+u)});for(var T=0,A=0,E=[];m>A&&T<S.length;)E[T]=S[T],A+=S[T++];for(0===T&&(T=1);A>m&&T>1;){E=[],T--;for(var O=0;O<S.length;O++)S[O]>(E[O%T]||0)&&(E[O%T]=S[O]);A=E.reduce(function(t,e){return t+e})}for(var N=[],I=0,P=0;T>I;I++)N[I]=P,P+=E[I];k.attr("transform",function(t,e){return"translate("+N[e%T]+","+(5+Math.floor(e/T)*D)+")"}),c?w.attr("transform","translate("+(i-n.right-A)+","+n.top+")"):w.attr("transform","translate(0,"+n.top+")"),r=n.top+n.bottom+Math.ceil(S.length/T)*D}else{var H,F=5,W=5,L=0;k.attr("transform",function(){var t=d3.select(this).select("text").node().getComputedTextLength()+u;return H=W,i<n.left+n.right+H+t&&(W=H=5,F+=D),W+=t,W>L&&(L=W),"translate("+H+","+F+")"}),w.attr("transform","translate("+(i-n.right-L)+","+n.top+")"),r=n.top+n.bottom+F+15}"furious"==g&&$.attr("width",function(t,e){return M[0][e].getComputedTextLength()+27}).attr("height",18).attr("y",-9).attr("x",-15),$.style("fill",y).style("stroke",function(t,e){return t.color||a(t,e)})}),e}var n={top:5,right:0,bottom:5,left:0},i=400,r=20,o=function(t){return t.key},a=t.utils.getColor(),s=20,l=!0,u=28,c=!0,d=!0,h=!1,f=!1,p=d3.dispatch("legendClick","legendDblclick","legendMouseover","legendMouseout","stateChange"),g="classic";return e.dispatch=p,e.options=t.utils.optionsFunc.bind(e),e._options=Object.create({},{width:{get:function(){return i},set:function(t){i=t}},height:{get:function(){return r},set:function(t){r=t}},key:{get:function(){return o},set:function(t){o=t}},align:{get:function(){return l},set:function(t){l=t}},rightAlign:{get:function(){return c},set:function(t){c=t}},maxKeyLength:{get:function(){return s},set:function(t){s=t}},padding:{get:function(){return u},set:function(t){u=t}},updateState:{get:function(){return d},set:function(t){d=t}},radioButtonMode:{get:function(){return h},set:function(t){h=t}},expanded:{get:function(){return f},set:function(t){f=t}},vers:{get:function(){return g},set:function(t){g=t}},margin:{get:function(){return n},set:function(t){n.top=void 0!==t.top?t.top:n.top,n.right=void 0!==t.right?t.right:n.right,n.bottom=void 0!==t.bottom?t.bottom:n.bottom,n.left=void 0!==t.left?t.left:n.left}},color:{get:function(){return a},set:function(e){a=t.utils.getColor(e)}}}),t.utils.initOptions(e),e},t.models.historicalBar=function(){"use strict";function e(k){return k.each(function(e){$.reset(),c=d3.select(this);var k=t.utils.availableWidth(s,c,a),_=t.utils.availableHeight(l,c,a);t.utils.initSVG(c),d.domain(n||d3.extent(e[0].values.map(f).concat(g))),d.range(v?r||[.5*k/e[0].values.length,k*(e[0].values.length-.5)/e[0].values.length]:r||[0,k]),h.domain(i||d3.extent(e[0].values.map(p).concat(m))).range(o||[_,0]),d.domain()[0]===d.domain()[1]&&d.domain(d.domain()[0]?[d.domain()[0]-.01*d.domain()[0],d.domain()[1]+.01*d.domain()[1]]:[-1,1]),h.domain()[0]===h.domain()[1]&&h.domain(h.domain()[0]?[h.domain()[0]+.01*h.domain()[0],h.domain()[1]-.01*h.domain()[1]]:[-1,1]);var C=c.selectAll("g.nv-wrap.nv-historicalBar-"+u).data([e[0].values]),M=C.enter().append("g").attr("class","nvd3 nv-wrap nv-historicalBar-"+u),D=M.append("defs"),S=M.append("g"),T=C.select("g");S.append("g").attr("class","nv-bars"),C.attr("transform","translate("+a.left+","+a.top+")"),c.on("click",function(t,e){x.chartClick({data:t,index:e,pos:d3.event,id:u})}),D.append("clipPath").attr("id","nv-chart-clip-path-"+u).append("rect"),C.select("#nv-chart-clip-path-"+u+" rect").attr("width",k).attr("height",_),T.attr("clip-path",y?"url(#nv-chart-clip-path-"+u+")":"");var A=C.select(".nv-bars").selectAll(".nv-bar").data(function(t){return t},function(t,e){return f(t,e)});A.exit().remove(),A.enter().append("rect").attr("x",0).attr("y",function(e,n){return t.utils.NaNtoZero(h(Math.max(0,p(e,n))))}).attr("height",function(e,n){return t.utils.NaNtoZero(Math.abs(h(p(e,n))-h(0)))}).attr("transform",function(t,n){return"translate("+(d(f(t,n))-k/e[0].values.length*.45)+",0)"}).on("mouseover",function(t,e){w&&(d3.select(this).classed("hover",!0),x.elementMouseover({data:t,index:e,color:d3.select(this).style("fill")}))}).on("mouseout",function(t,e){w&&(d3.select(this).classed("hover",!1),x.elementMouseout({data:t,index:e,color:d3.select(this).style("fill")}))}).on("mousemove",function(t,e){w&&x.elementMousemove({data:t,index:e,color:d3.select(this).style("fill")})}).on("click",function(t,e){w&&(x.elementClick({data:t,index:e,color:d3.select(this).style("fill")}),d3.event.stopPropagation())}).on("dblclick",function(t,e){w&&(x.elementDblClick({data:t,index:e,color:d3.select(this).style("fill")}),d3.event.stopPropagation())}),A.attr("fill",function(t,e){return b(t,e)}).attr("class",function(t,e,n){return(p(t,e)<0?"nv-bar negative":"nv-bar positive")+" nv-bar-"+n+"-"+e}).watchTransition($,"bars").attr("transform",function(t,n){return"translate("+(d(f(t,n))-k/e[0].values.length*.45)+",0)"}).attr("width",k/e[0].values.length*.9),A.watchTransition($,"bars").attr("y",function(e,n){var i=p(e,n)<0?h(0):h(0)-h(p(e,n))<1?h(0)-1:h(p(e,n));return t.utils.NaNtoZero(i)}).attr("height",function(e,n){return t.utils.NaNtoZero(Math.max(Math.abs(h(p(e,n))-h(0)),1))})}),$.renderEnd("historicalBar immediate"),e}var n,i,r,o,a={top:0,right:0,bottom:0,left:0},s=null,l=null,u=Math.floor(1e4*Math.random()),c=null,d=d3.scale.linear(),h=d3.scale.linear(),f=function(t){return t.x},p=function(t){return t.y},g=[],m=[0],v=!1,y=!0,b=t.utils.defaultColor(),x=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),w=!0,$=t.utils.renderWatch(x,0);return e.highlightPoint=function(t,e){c.select(".nv-bars .nv-bar-0-"+t).classed("hover",e)},e.clearHighlights=function(){c.select(".nv-bars .nv-bar.hover").classed("hover",!1)},e.dispatch=x,e.options=t.utils.optionsFunc.bind(e),e._options=Object.create({},{width:{get:function(){return s},set:function(t){s=t}},height:{get:function(){return l},set:function(t){l=t}},forceX:{get:function(){return g},set:function(t){g=t}},forceY:{get:function(){return m},set:function(t){m=t}},padData:{get:function(){return v},set:function(t){v=t}},x:{get:function(){return f},set:function(t){f=t}},y:{get:function(){return p},set:function(t){p=t}},xScale:{get:function(){return d},set:function(t){d=t}},yScale:{get:function(){return h},set:function(t){h=t}},xDomain:{get:function(){return n},set:function(t){n=t}},yDomain:{get:function(){return i},set:function(t){i=t}},xRange:{get:function(){return r},set:function(t){r=t}},yRange:{get:function(){return o},set:function(t){o=t}},clipEdge:{get:function(){return y},set:function(t){y=t}},id:{get:function(){return u},set:function(t){u=t}},interactive:{get:function(){return w},set:function(t){w=t}},margin:{get:function(){return a},set:function(t){a.top=void 0!==t.top?t.top:a.top,a.right=void 0!==t.right?t.right:a.right,a.bottom=void 0!==t.bottom?t.bottom:a.bottom,a.left=void 0!==t.left?t.left:a.left}},color:{get:function(){return b},set:function(e){b=t.utils.getColor(e)}}}),t.utils.initOptions(e),e},t.models.historicalBarChart=function(e){"use strict";function n(e){return e.each(function(c){C.reset(),C.models(o),m&&C.models(a),v&&C.models(s);var $=d3.select(this),M=this;t.utils.initSVG($);var D=t.utils.availableWidth(f,$,d),S=t.utils.availableHeight(p,$,d);if(n.update=function(){$.transition().duration(_).call(n)},n.container=this,x.disabled=c.map(function(t){return!!t.disabled}),!w){var T;w={};for(T in x)w[T]=x[T]instanceof Array?x[T].slice(0):x[T]}if(!(c&&c.length&&c.filter(function(t){return t.values.length}).length))return t.utils.noData(n,$),n;$.selectAll(".nv-noData").remove(),i=o.xScale(),r=o.yScale();var A=$.selectAll("g.nv-wrap.nv-historicalBarChart").data([c]),E=A.enter().append("g").attr("class","nvd3 nv-wrap nv-historicalBarChart").append("g"),O=A.select("g");E.append("g").attr("class","nv-x nv-axis"),E.append("g").attr("class","nv-y nv-axis"),E.append("g").attr("class","nv-barsWrap"),E.append("g").attr("class","nv-legendWrap"),E.append("g").attr("class","nv-interactive"),g?(l.width(D),O.select(".nv-legendWrap").datum(c).call(l),d.top!=l.height()&&(d.top=l.height(),S=t.utils.availableHeight(p,$,d)),A.select(".nv-legendWrap").attr("transform","translate(0,"+-d.top+")")):O.select(".nv-legendWrap").selectAll("*").remove(),A.attr("transform","translate("+d.left+","+d.top+")"),y&&O.select(".nv-y.nv-axis").attr("transform","translate("+D+",0)"),b&&(u.width(D).height(S).margin({left:d.left,top:d.top}).svgContainer($).xScale(i),A.select(".nv-interactive").call(u)),o.width(D).height(S).color(c.map(function(t,e){return t.color||h(t,e)}).filter(function(t,e){return!c[e].disabled}));var N=O.select(".nv-barsWrap").datum(c.filter(function(t){return!t.disabled}));N.transition().call(o),m&&(a.scale(i)._ticks(t.utils.calcTicksX(D/100,c)).tickSize(-S,0),O.select(".nv-x.nv-axis").attr("transform","translate(0,"+r.range()[0]+")"),O.select(".nv-x.nv-axis").transition().call(a)),v&&(s.scale(r)._ticks(t.utils.calcTicksY(S/36,c)).tickSize(-D,0),O.select(".nv-y.nv-axis").transition().call(s)),u.dispatch.on("elementMousemove",function(e){o.clearHighlights();var i,r,l,d=[];c.filter(function(t,e){return t.seriesIndex=e,!t.disabled}).forEach(function(a){r=t.interactiveBisect(a.values,e.pointXValue,n.x()),o.highlightPoint(r,!0);var s=a.values[r];void 0!==s&&(void 0===i&&(i=s),void 0===l&&(l=n.xScale()(n.x()(s,r))),d.push({key:a.key,value:n.y()(s,r),color:h(a,a.seriesIndex),data:a.values[r]}))});var f=a.tickFormat()(n.x()(i,r));u.tooltip.chartContainer(M.parentNode).valueFormatter(function(t){return s.tickFormat()(t)}).data({value:f,index:r,series:d})(),u.renderGuideLine(l)}),u.dispatch.on("elementMouseout",function(){k.tooltipHide(),o.clearHighlights()}),l.dispatch.on("legendClick",function(t){t.disabled=!t.disabled,c.filter(function(t){return!t.disabled}).length||c.map(function(t){return t.disabled=!1,A.selectAll(".nv-series").classed("disabled",!1),t}),x.disabled=c.map(function(t){return!!t.disabled}),k.stateChange(x),e.transition().call(n)}),l.dispatch.on("legendDblclick",function(t){c.forEach(function(t){t.disabled=!0}),t.disabled=!1,x.disabled=c.map(function(t){return!!t.disabled}),k.stateChange(x),n.update()}),k.on("changeState",function(t){"undefined"!=typeof t.disabled&&(c.forEach(function(e,n){e.disabled=t.disabled[n]}),x.disabled=t.disabled),n.update()})}),C.renderEnd("historicalBarChart immediate"),n}var i,r,o=e||t.models.historicalBar(),a=t.models.axis(),s=t.models.axis(),l=t.models.legend(),u=t.interactiveGuideline(),c=t.models.tooltip(),d={top:30,right:90,bottom:50,left:90},h=t.utils.defaultColor(),f=null,p=null,g=!1,m=!0,v=!0,y=!1,b=!1,x={},w=null,$=null,k=d3.dispatch("tooltipHide","stateChange","changeState","renderEnd"),_=250;a.orient("bottom").tickPadding(7),s.orient(y?"right":"left"),c.duration(0).headerEnabled(!1).valueFormatter(function(t,e){return s.tickFormat()(t,e)}).headerFormatter(function(t,e){return a.tickFormat()(t,e)});var C=t.utils.renderWatch(k,0);return o.dispatch.on("elementMouseover.tooltip",function(t){t.series={key:n.x()(t.data),value:n.y()(t.data),color:t.color},c.data(t).hidden(!1)}),o.dispatch.on("elementMouseout.tooltip",function(){c.hidden(!0)}),o.dispatch.on("elementMousemove.tooltip",function(){c()}),n.dispatch=k,n.bars=o,n.legend=l,n.xAxis=a,n.yAxis=s,n.interactiveLayer=u,n.tooltip=c,n.options=t.utils.optionsFunc.bind(n),n._options=Object.create({},{width:{get:function(){return f},set:function(t){f=t}},height:{get:function(){return p},set:function(t){p=t}},showLegend:{get:function(){return g},set:function(t){g=t}},showXAxis:{get:function(){return m},set:function(t){m=t}},showYAxis:{get:function(){return v},set:function(t){v=t}},defaultState:{get:function(){return w},set:function(t){w=t}},noData:{get:function(){return $},set:function(t){$=t}},margin:{get:function(){return d},set:function(t){d.top=void 0!==t.top?t.top:d.top,d.right=void 0!==t.right?t.right:d.right,d.bottom=void 0!==t.bottom?t.bottom:d.bottom,d.left=void 0!==t.left?t.left:d.left}},color:{get:function(){return h},set:function(e){h=t.utils.getColor(e),l.color(h),o.color(h)}},duration:{get:function(){return _},set:function(t){_=t,C.reset(_),s.duration(_),a.duration(_)}},rightAlignYAxis:{get:function(){return y},set:function(t){y=t,s.orient(t?"right":"left")}},useInteractiveGuideline:{get:function(){return b},set:function(t){b=t,t===!0&&n.interactive(!1)}}}),t.utils.inheritOptions(n,o),t.utils.initOptions(n),n},t.models.ohlcBarChart=function(){var e=t.models.historicalBarChart(t.models.ohlcBar());return e.useInteractiveGuideline(!0),e.interactiveLayer.tooltip.contentGenerator(function(t){var n=t.series[0].data,i=n.open<n.close?"2ca02c":"d62728";return'<h3 style="color: #'+i+'">'+t.value+"</h3><table><tr><td>open:</td><td>"+e.yAxis.tickFormat()(n.open)+"</td></tr><tr><td>close:</td><td>"+e.yAxis.tickFormat()(n.close)+"</td></tr><tr><td>high</td><td>"+e.yAxis.tickFormat()(n.high)+"</td></tr><tr><td>low:</td><td>"+e.yAxis.tickFormat()(n.low)+"</td></tr></table>"}),e},t.models.candlestickBarChart=function(){var e=t.models.historicalBarChart(t.models.candlestickBar());return e.useInteractiveGuideline(!0),e.interactiveLayer.tooltip.contentGenerator(function(t){var n=t.series[0].data,i=n.open<n.close?"2ca02c":"d62728";return'<h3 style="color: #'+i+'">'+t.value+"</h3><table><tr><td>open:</td><td>"+e.yAxis.tickFormat()(n.open)+"</td></tr><tr><td>close:</td><td>"+e.yAxis.tickFormat()(n.close)+"</td></tr><tr><td>high</td><td>"+e.yAxis.tickFormat()(n.high)+"</td></tr><tr><td>low:</td><td>"+e.yAxis.tickFormat()(n.low)+"</td></tr></table>"}),e},t.models.legend=function(){"use strict";function e(m){function v(t,e){return"furious"!=g?"#000":f?t.disengaged?"#000":"#fff":f?void 0:(t.color||(t.color=a(t,e)),t.disabled?t.color:"#fff")}function y(t,e){return f&&"furious"==g&&t.disengaged?"#eee":t.color||a(t,e)}function b(t){return f&&"furious"==g?1:t.disabled?0:1}return m.each(function(e){var a=i-n.left-n.right,m=d3.select(this);t.utils.initSVG(m);var x=m.selectAll("g.nv-legend").data([e]),w=x.enter().append("g").attr("class","nvd3 nv-legend").append("g"),$=x.select("g");x.attr("transform","translate("+n.left+","+n.top+")");var k,_,C=$.selectAll(".nv-series").data(function(t){return"furious"!=g?t:t.filter(function(t){return f?!0:!t.disengaged})}),M=C.enter().append("g").attr("class","nv-series");switch(g){case"furious":_=23;break;case"classic":_=20}if("classic"==g)M.append("circle").style("stroke-width",2).attr("class","nv-legend-symbol").attr("r",5),k=C.select(".nv-legend-symbol");else if("furious"==g){M.append("rect").style("stroke-width",2).attr("class","nv-legend-symbol").attr("rx",3).attr("ry",3),k=C.select(".nv-legend-symbol"),M.append("g").attr("class","nv-check-box").property("innerHTML",'<path d="M0.5,5 L22.5,5 L22.5,26.5 L0.5,26.5 L0.5,5 Z" class="nv-box"></path><path d="M5.5,12.8618467 L11.9185089,19.2803556 L31,0.198864511" class="nv-check"></path>').attr("transform","translate(-10,-8)scale(0.5)");var D=C.select(".nv-check-box");D.each(function(t,e){d3.select(this).selectAll("path").attr("stroke",v(t,e))})}M.append("text").attr("text-anchor","start").attr("class","nv-legend-text").attr("dy",".32em").attr("dx","8");var S=C.select("text.nv-legend-text");C.on("mouseover",function(t,e){p.legendMouseover(t,e)}).on("mouseout",function(t,e){p.legendMouseout(t,e)}).on("click",function(t,e){p.legendClick(t,e);var n=C.data();if(d){if("classic"==g)h?(n.forEach(function(t){t.disabled=!0}),t.disabled=!1):(t.disabled=!t.disabled,n.every(function(t){return t.disabled})&&n.forEach(function(t){t.disabled=!1}));else if("furious"==g)if(f)t.disengaged=!t.disengaged,t.userDisabled=void 0==t.userDisabled?!!t.disabled:t.userDisabled,t.disabled=t.disengaged||t.userDisabled;else if(!f){t.disabled=!t.disabled,t.userDisabled=t.disabled;var i=n.filter(function(t){return!t.disengaged});i.every(function(t){return t.userDisabled})&&n.forEach(function(t){t.disabled=t.userDisabled=!1})}p.stateChange({disabled:n.map(function(t){return!!t.disabled}),disengaged:n.map(function(t){return!!t.disengaged})})}}).on("dblclick",function(t,e){if(("furious"!=g||!f)&&(p.legendDblclick(t,e),d)){var n=C.data();n.forEach(function(t){t.disabled=!0,"furious"==g&&(t.userDisabled=t.disabled)}),t.disabled=!1,"furious"==g&&(t.userDisabled=t.disabled),p.stateChange({disabled:n.map(function(t){return!!t.disabled})})}}),C.classed("nv-disabled",function(t){return t.userDisabled}),C.exit().remove(),S.attr("fill",v).text(o);var T=0;if(l){var A=[];C.each(function(e){var n;if(o(e)&&o(e).length>s){var i=o(e).substring(0,s);n=d3.select(this).select("text").text(i+"..."),d3.select(this).append("svg:title").text(o(e))}else n=d3.select(this).select("text");var r;try{if(r=n.node().getComputedTextLength(),0>=r)throw Error()}catch(a){r=t.utils.calcApproxTextWidth(n)}A.push(r+u)});var E=0,O=[];for(T=0;a>T&&E<A.length;)O[E]=A[E],T+=A[E++];for(0===E&&(E=1);T>a&&E>1;){O=[],E--;for(var N=0;N<A.length;N++)A[N]>(O[N%E]||0)&&(O[N%E]=A[N]);T=O.reduce(function(t,e){return t+e})}for(var I=[],P=0,H=0;E>P;P++)I[P]=H,H+=O[P];C.attr("transform",function(t,e){return"translate("+I[e%E]+","+(5+Math.floor(e/E)*_)+")"}),c?$.attr("transform","translate("+(i-n.right-T)+","+n.top+")"):$.attr("transform","translate(0,"+n.top+")"),r=n.top+n.bottom+Math.ceil(A.length/E)*_}else{var F,W=5,L=5,z=0;C.attr("transform",function(){var t=d3.select(this).select("text").node().getComputedTextLength()+u;return F=L,i<n.left+n.right+F+t&&(L=F=5,W+=_),L+=t,L>z&&(z=L),F+z>T&&(T=F+z),"translate("+F+","+W+")"}),$.attr("transform","translate("+(i-n.right-z)+","+n.top+")"),r=n.top+n.bottom+W+15}if("furious"==g){k.attr("width",function(t,e){return S[0][e].getComputedTextLength()+27}).attr("height",18).attr("y",-9).attr("x",-15),w.insert("rect",":first-child").attr("class","nv-legend-bg").attr("fill","#eee").attr("opacity",0);var R=$.select(".nv-legend-bg");R.transition().duration(300).attr("x",-_).attr("width",T+_-12).attr("height",r+10).attr("y",-n.top-10).attr("opacity",f?1:0)}k.style("fill",y).style("fill-opacity",b).style("stroke",y)}),e}var n={top:5,right:0,bottom:5,left:0},i=400,r=20,o=function(t){return t.key},a=t.utils.getColor(),s=20,l=!0,u=32,c=!0,d=!0,h=!1,f=!1,p=d3.dispatch("legendClick","legendDblclick","legendMouseover","legendMouseout","stateChange"),g="classic";return e.dispatch=p,e.options=t.utils.optionsFunc.bind(e),e._options=Object.create({},{width:{get:function(){return i},set:function(t){i=t}},height:{get:function(){return r},set:function(t){r=t}},key:{get:function(){return o},set:function(t){o=t}},align:{get:function(){return l},set:function(t){l=t}},maxKeyLength:{get:function(){return s},set:function(t){s=t}},rightAlign:{get:function(){return c},set:function(t){c=t}},padding:{get:function(){return u},set:function(t){u=t}},updateState:{get:function(){return d},set:function(t){d=t}},radioButtonMode:{get:function(){return h},set:function(t){h=t}},expanded:{get:function(){return f},set:function(t){f=t}},vers:{get:function(){return g},set:function(t){g=t}},margin:{get:function(){return n},set:function(t){n.top=void 0!==t.top?t.top:n.top,n.right=void 0!==t.right?t.right:n.right,n.bottom=void 0!==t.bottom?t.bottom:n.bottom,n.left=void 0!==t.left?t.left:n.left}},color:{get:function(){return a},set:function(e){a=t.utils.getColor(e)}}}),t.utils.initOptions(e),e},t.models.line=function(){"use strict";function e(v){return w.reset(),w.models(r),v.each(function(e){l=d3.select(this);var v=t.utils.availableWidth(a,l,o),y=t.utils.availableHeight(s,l,o);t.utils.initSVG(l),n=r.xScale(),i=r.yScale(),b=b||n,x=x||i;var $=l.selectAll("g.nv-wrap.nv-line").data([e]),k=$.enter().append("g").attr("class","nvd3 nv-wrap nv-line"),_=k.append("defs"),C=k.append("g"),M=$.select("g");C.append("g").attr("class","nv-groups"),C.append("g").attr("class","nv-scatterWrap"),$.attr("transform","translate("+o.left+","+o.top+")"),r.width(v).height(y);var D=$.select(".nv-scatterWrap");D.call(r),_.append("clipPath").attr("id","nv-edge-clip-"+r.id()).append("rect"),$.select("#nv-edge-clip-"+r.id()+" rect").attr("width",v).attr("height",y>0?y:0),M.attr("clip-path",g?"url(#nv-edge-clip-"+r.id()+")":""),D.attr("clip-path",g?"url(#nv-edge-clip-"+r.id()+")":"");var S=$.select(".nv-groups").selectAll(".nv-group").data(function(t){return t},function(t){return t.key});S.enter().append("g").style("stroke-opacity",1e-6).style("stroke-width",function(t){return t.strokeWidth||u}).style("fill-opacity",1e-6),S.exit().remove(),S.attr("class",function(t,e){return(t.classed||"")+" nv-group nv-series-"+e}).classed("hover",function(t){return t.hover}).style("fill",function(t,e){return c(t,e)}).style("stroke",function(t,e){return c(t,e)}),S.watchTransition(w,"line: groups").style("stroke-opacity",1).style("fill-opacity",function(t){return t.fillOpacity||.5});var T=S.selectAll("path.nv-area").data(function(t){return p(t)?[t]:[]});T.enter().append("path").attr("class","nv-area").attr("d",function(e){return d3.svg.area().interpolate(m).defined(f).x(function(e,n){return t.utils.NaNtoZero(b(d(e,n)))}).y0(function(e,n){return t.utils.NaNtoZero(x(h(e,n)))}).y1(function(){return x(i.domain()[0]<=0?i.domain()[1]>=0?0:i.domain()[1]:i.domain()[0])}).apply(this,[e.values])}),S.exit().selectAll("path.nv-area").remove(),T.watchTransition(w,"line: areaPaths").attr("d",function(e){return d3.svg.area().interpolate(m).defined(f).x(function(e,i){return t.utils.NaNtoZero(n(d(e,i)))}).y0(function(e,n){return t.utils.NaNtoZero(i(h(e,n)))}).y1(function(){return i(i.domain()[0]<=0?i.domain()[1]>=0?0:i.domain()[1]:i.domain()[0])}).apply(this,[e.values])});var A=S.selectAll("path.nv-line").data(function(t){return[t.values]});A.enter().append("path").attr("class","nv-line").attr("d",d3.svg.line().interpolate(m).defined(f).x(function(e,n){return t.utils.NaNtoZero(b(d(e,n)))}).y(function(e,n){return t.utils.NaNtoZero(x(h(e,n)))})),A.watchTransition(w,"line: linePaths").attr("d",d3.svg.line().interpolate(m).defined(f).x(function(e,i){return t.utils.NaNtoZero(n(d(e,i)))}).y(function(e,n){return t.utils.NaNtoZero(i(h(e,n)))})),b=n.copy(),x=i.copy()}),w.renderEnd("line immediate"),e}var n,i,r=t.models.scatter(),o={top:0,right:0,bottom:0,left:0},a=960,s=500,l=null,u=1.5,c=t.utils.defaultColor(),d=function(t){return t.x
},h=function(t){return t.y},f=function(t,e){return!isNaN(h(t,e))&&null!==h(t,e)},p=function(t){return t.area},g=!1,m="linear",v=250,y=d3.dispatch("elementClick","elementMouseover","elementMouseout","renderEnd");r.pointSize(16).pointDomain([16,256]);var b,x,w=t.utils.renderWatch(y,v);return e.dispatch=y,e.scatter=r,r.dispatch.on("elementClick",function(){y.elementClick.apply(this,arguments)}),r.dispatch.on("elementMouseover",function(){y.elementMouseover.apply(this,arguments)}),r.dispatch.on("elementMouseout",function(){y.elementMouseout.apply(this,arguments)}),e.options=t.utils.optionsFunc.bind(e),e._options=Object.create({},{width:{get:function(){return a},set:function(t){a=t}},height:{get:function(){return s},set:function(t){s=t}},defined:{get:function(){return f},set:function(t){f=t}},interpolate:{get:function(){return m},set:function(t){m=t}},clipEdge:{get:function(){return g},set:function(t){g=t}},margin:{get:function(){return o},set:function(t){o.top=void 0!==t.top?t.top:o.top,o.right=void 0!==t.right?t.right:o.right,o.bottom=void 0!==t.bottom?t.bottom:o.bottom,o.left=void 0!==t.left?t.left:o.left}},duration:{get:function(){return v},set:function(t){v=t,w.reset(v),r.duration(v)}},isArea:{get:function(){return p},set:function(t){p=d3.functor(t)}},x:{get:function(){return d},set:function(t){d=t,r.x(t)}},y:{get:function(){return h},set:function(t){h=t,r.y(t)}},color:{get:function(){return c},set:function(e){c=t.utils.getColor(e),r.color(c)}}}),t.utils.inheritOptions(e,r),t.utils.initOptions(e),e},t.models.lineChart=function(){"use strict";function e(u){return D.reset(),D.models(r),v&&D.models(o),y&&D.models(a),u.each(function(u){function _(){v&&F.select(".nv-focus .nv-x.nv-axis").transition().duration(M).call(o)}function D(){y&&F.select(".nv-focus .nv-y.nv-axis").transition().duration(M).call(a)}function A(t){var e=F.select(".nv-focus .nv-linesWrap").datum(u.filter(function(t){return!t.disabled}).map(function(e){return{key:e.key,area:e.area,classed:e.classed,values:e.values.filter(function(e,n){return r.x()(e,n)>=t[0]&&r.x()(e,n)<=t[1]}),disableTooltip:e.disableTooltip}}));e.transition().duration(M).call(r),_(),D()}var E=d3.select(this);t.utils.initSVG(E);var O=t.utils.availableWidth(f,E,d),N=t.utils.availableHeight(p,E,d)-(w?c.height():0);if(e.update=function(){0===M?E.call(e):E.transition().duration(M).call(e)},e.container=this,$.setter(T(u),e.update).getter(S(u)).update(),$.disabled=u.map(function(t){return!!t.disabled}),!k){var I;k={};for(I in $)k[I]=$[I]instanceof Array?$[I].slice(0):$[I]}if(!(u&&u.length&&u.filter(function(t){return t.values.length}).length))return t.utils.noData(e,E),e;E.selectAll(".nv-noData").remove(),n=r.xScale(),i=r.yScale();var P=E.selectAll("g.nv-wrap.nv-lineChart").data([u]),H=P.enter().append("g").attr("class","nvd3 nv-wrap nv-lineChart").append("g"),F=P.select("g");H.append("g").attr("class","nv-legendWrap");var W=H.append("g").attr("class","nv-focus");W.append("g").attr("class","nv-background").append("rect"),W.append("g").attr("class","nv-x nv-axis"),W.append("g").attr("class","nv-y nv-axis"),W.append("g").attr("class","nv-linesWrap"),W.append("g").attr("class","nv-interactive");H.append("g").attr("class","nv-focusWrap");g?(s.width(O),F.select(".nv-legendWrap").datum(u).call(s),"bottom"===m?P.select(".nv-legendWrap").attr("transform","translate(0,"+N+")"):"top"===m&&(d.top!=s.height()&&(d.top=s.height(),N=t.utils.availableHeight(p,E,d)-(w?c.height():0)),P.select(".nv-legendWrap").attr("transform","translate(0,"+-d.top+")"))):F.select(".nv-legendWrap").selectAll("*").remove(),P.attr("transform","translate("+d.left+","+d.top+")"),b&&F.select(".nv-y.nv-axis").attr("transform","translate("+O+",0)"),x&&(l.width(O).height(N).margin({left:d.left,top:d.top}).svgContainer(E).xScale(n),P.select(".nv-interactive").call(l)),F.select(".nv-focus .nv-background rect").attr("width",O).attr("height",N),r.width(O).height(N).color(u.map(function(t,e){return t.color||h(t,e)}).filter(function(t,e){return!u[e].disabled}));var L=F.select(".nv-linesWrap").datum(u.filter(function(t){return!t.disabled}));if(v&&o.scale(n)._ticks(t.utils.calcTicksX(O/100,u)).tickSize(-N,0),y&&a.scale(i)._ticks(t.utils.calcTicksY(N/36,u)).tickSize(-O,0),F.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+N+")"),w){c.width(O),F.select(".nv-focusWrap").attr("transform","translate(0,"+(N+d.bottom+c.margin().top)+")").datum(u.filter(function(t){return!t.disabled})).call(c);var z=c.brush.empty()?c.xDomain():c.brush.extent();null!==z&&A(z)}else L.call(r),_(),D();s.dispatch.on("stateChange",function(t){for(var n in t)$[n]=t[n];C.stateChange($),e.update()}),l.dispatch.on("elementMousemove",function(i){r.clearHighlights();var o,s,d,f=[];if(u.filter(function(t,e){return t.seriesIndex=e,!t.disabled&&!t.disableTooltip}).forEach(function(a){var l=w?c.brush.empty()?c.xScale().domain():c.brush.extent():n.domain(),u=a.values.filter(function(t,e){return r.x()(t,e)>=l[0]&&r.x()(t,e)<=l[1]});s=t.interactiveBisect(u,i.pointXValue,r.x());var p=u[s],g=e.y()(p,s);null!==g&&r.highlightPoint(a.seriesIndex,s,!0),void 0!==p&&(void 0===o&&(o=p),void 0===d&&(d=e.xScale()(e.x()(p,s))),f.push({key:a.key,value:g,color:h(a,a.seriesIndex),data:p}))}),f.length>2){var p=e.yScale().invert(i.mouseY),g=Math.abs(e.yScale().domain()[0]-e.yScale().domain()[1]),m=.03*g,v=t.nearestValueIndex(f.map(function(t){return t.value}),p,m);null!==v&&(f[v].highlight=!0)}var y=function(t){return null==t?"N/A":a.tickFormat()(t)};l.tooltip.chartContainer(e.container.parentNode).valueFormatter(l.tooltip.valueFormatter()||y).data({value:e.x()(o,s),index:s,series:f})(),l.renderGuideLine(d)}),l.dispatch.on("elementClick",function(n){var i,o=[];u.filter(function(t,e){return t.seriesIndex=e,!t.disabled}).forEach(function(r){var a=t.interactiveBisect(r.values,n.pointXValue,e.x()),s=r.values[a];if("undefined"!=typeof s){"undefined"==typeof i&&(i=e.xScale()(e.x()(s,a)));var l=e.yScale()(e.y()(s,a));o.push({point:s,pointIndex:a,pos:[i,l],seriesIndex:r.seriesIndex,series:r})}}),r.dispatch.elementClick(o)}),l.dispatch.on("elementMouseout",function(){r.clearHighlights()}),c.dispatch.on("onBrush",function(t){A(t)}),C.on("changeState",function(t){"undefined"!=typeof t.disabled&&u.length===t.disabled.length&&(u.forEach(function(e,n){e.disabled=t.disabled[n]}),$.disabled=t.disabled),e.update()})}),D.renderEnd("lineChart immediate"),e}var n,i,r=t.models.line(),o=t.models.axis(),a=t.models.axis(),s=t.models.legend(),l=t.interactiveGuideline(),u=t.models.tooltip(),c=t.models.focus(t.models.line()),d={top:30,right:20,bottom:50,left:60},h=t.utils.defaultColor(),f=null,p=null,g=!0,m="top",v=!0,y=!0,b=!1,x=!1,w=!1,$=t.utils.state(),k=null,_=null,C=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState","renderEnd"),M=250;o.orient("bottom").tickPadding(7),a.orient(b?"right":"left"),r.clipEdge(!0).duration(0),u.valueFormatter(function(t,e){return a.tickFormat()(t,e)}).headerFormatter(function(t,e){return o.tickFormat()(t,e)}),l.tooltip.valueFormatter(function(t,e){return a.tickFormat()(t,e)}).headerFormatter(function(t,e){return o.tickFormat()(t,e)});var D=t.utils.renderWatch(C,M),S=function(t){return function(){return{active:t.map(function(t){return!t.disabled})}}},T=function(t){return function(e){void 0!==e.active&&t.forEach(function(t,n){t.disabled=!e.active[n]})}};return r.dispatch.on("elementMouseover.tooltip",function(t){t.series.disableTooltip||u.data(t).hidden(!1)}),r.dispatch.on("elementMouseout.tooltip",function(){u.hidden(!0)}),e.dispatch=C,e.lines=r,e.legend=s,e.focus=c,e.xAxis=o,e.x2Axis=c.xAxis,e.yAxis=a,e.y2Axis=c.yAxis,e.interactiveLayer=l,e.tooltip=u,e.state=$,e.dispatch=C,e.options=t.utils.optionsFunc.bind(e),e._options=Object.create({},{width:{get:function(){return f},set:function(t){f=t}},height:{get:function(){return p},set:function(t){p=t}},showLegend:{get:function(){return g},set:function(t){g=t}},legendPosition:{get:function(){return m},set:function(t){m=t}},showXAxis:{get:function(){return v},set:function(t){v=t}},showYAxis:{get:function(){return y},set:function(t){y=t}},defaultState:{get:function(){return k},set:function(t){k=t}},noData:{get:function(){return _},set:function(t){_=t}},focusEnable:{get:function(){return w},set:function(t){w=t}},focusHeight:{get:function(){return c.height()},set:function(t){c.height(t)}},focusShowAxisX:{get:function(){return c.showXAxis()},set:function(t){c.showXAxis(t)}},focusShowAxisY:{get:function(){return c.showYAxis()},set:function(t){c.showYAxis(t)}},brushExtent:{get:function(){return c.brushExtent()},set:function(t){c.brushExtent(t)}},focusMargin:{get:function(){return c.margin},set:function(t){c.margin.top=void 0!==t.top?t.top:c.margin.top,c.margin.right=void 0!==t.right?t.right:c.margin.right,c.margin.bottom=void 0!==t.bottom?t.bottom:c.margin.bottom,c.margin.left=void 0!==t.left?t.left:c.margin.left}},margin:{get:function(){return d},set:function(t){d.top=void 0!==t.top?t.top:d.top,d.right=void 0!==t.right?t.right:d.right,d.bottom=void 0!==t.bottom?t.bottom:d.bottom,d.left=void 0!==t.left?t.left:d.left}},duration:{get:function(){return M},set:function(t){M=t,D.reset(M),r.duration(M),c.duration(M),o.duration(M),a.duration(M)}},color:{get:function(){return h},set:function(e){h=t.utils.getColor(e),s.color(h),r.color(h),c.color(h)}},interpolate:{get:function(){return r.interpolate()},set:function(t){r.interpolate(t),c.interpolate(t)}},xTickFormat:{get:function(){return o.tickFormat()},set:function(t){o.tickFormat(t),c.xTickFormat(t)}},yTickFormat:{get:function(){return a.tickFormat()},set:function(t){a.tickFormat(t),c.yTickFormat(t)}},x:{get:function(){return r.x()},set:function(t){r.x(t),c.x(t)}},y:{get:function(){return r.y()},set:function(t){r.y(t),c.y(t)}},rightAlignYAxis:{get:function(){return b},set:function(t){b=t,a.orient(b?"right":"left")}},useInteractiveGuideline:{get:function(){return x},set:function(t){x=t,x&&(r.interactive(!1),r.useVoronoi(!1))}}}),t.utils.inheritOptions(e,r),t.utils.initOptions(e),e},t.models.lineWithFocusChart=function(){return t.models.lineChart().margin({bottom:30}).focusEnable(!0)},t.models.linePlusBarChart=function(){"use strict";function e(w){return w.each(function(w){function P(t){var e=+("e"==t),n=e?1:-1,i=Z/3;return"M"+.5*n+","+i+"A6,6 0 0 "+e+" "+6.5*n+","+(i+6)+"V"+(2*i-6)+"A6,6 0 0 "+e+" "+.5*n+","+2*i+"ZM"+2.5*n+","+(i+8)+"V"+(2*i-8)+"M"+4.5*n+","+(i+8)+"V"+(2*i-8)}function q(){x.empty()||x.extent(I),he.data([x.empty()?r.domain():I]).each(function(t){var e=r(t[0])-r.range()[0],n=r.range()[1]-r(t[1]);d3.select(this).select(".left").attr("width",0>e?0:e),d3.select(this).select(".right").attr("x",r(t[1])).attr("width",0>n?0:n)})}function V(){I=x.empty()?null:x.extent(),n=x.empty()?r.domain():x.extent(),H.brush({extent:n,brush:x}),q(),d.width(X).height(K).color(w.map(function(t,e){return t.color||S(t,e)}).filter(function(t,e){return!w[e].disabled&&w[e].bar})),u.width(X).height(K).color(w.map(function(t,e){return t.color||S(t,e)}).filter(function(t,e){return!w[e].disabled&&!w[e].bar}));var e=oe.select(".nv-focus .nv-barsWrap").datum(J.length?J.map(function(t){return{key:t.key,values:t.values.filter(function(t,e){return d.x()(t,e)>=n[0]&&d.x()(t,e)<=n[1]})}}):[{values:[]}]),s=oe.select(".nv-focus .nv-linesWrap").datum(Y(te)?[{values:[]}]:te.filter(function(t){return!t.disabled}).map(function(t){return{area:t.area,fillOpacity:t.fillOpacity,key:t.key,values:t.values.filter(function(t,e){return u.x()(t,e)>=n[0]&&u.x()(t,e)<=n[1]})}}));i=J.length&&!j?d.xScale():u.xScale(),f.scale(i)._ticks(t.utils.calcTicksX(X/100,w)).tickSize(-K,0),f.domain([Math.ceil(n[0]),Math.floor(n[1])]),oe.select(".nv-x.nv-axis").transition().duration(F).call(f),e.transition().duration(F).call(d),s.transition().duration(F).call(u),oe.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+o.range()[0]+")"),g.scale(o)._ticks(t.utils.calcTicksY(K/36,w)).tickSize(-X,0),m.scale(a)._ticks(t.utils.calcTicksY(K/36,w)),j?m.tickSize(te.length?0:-X,0):m.tickSize(J.length?0:-X,0);var l=J.length?1:0,c=te.length&&!Y(te)?1:0,h=j?c:l,p=j?l:c;oe.select(".nv-focus .nv-y1.nv-axis").style("opacity",h),oe.select(".nv-focus .nv-y2.nv-axis").style("opacity",p).attr("transform","translate("+i.range()[1]+",0)"),oe.select(".nv-focus .nv-y1.nv-axis").transition().duration(F).call(g),oe.select(".nv-focus .nv-y2.nv-axis").transition().duration(F).call(m)}var G=d3.select(this);t.utils.initSVG(G);var X=t.utils.availableWidth(_,G,$),K=t.utils.availableHeight(C,G,$)-(A?N:0),Z=N-k.top-k.bottom;if(e.update=function(){G.transition().duration(F).call(e)},e.container=this,W.setter(U(w),e.update).getter(B(w)).update(),W.disabled=w.map(function(t){return!!t.disabled}),!L){var Q;L={};for(Q in W)L[Q]=W[Q]instanceof Array?W[Q].slice(0):W[Q]}if(!(w&&w.length&&w.filter(function(t){return t.values.length}).length))return t.utils.noData(e,G),e;G.selectAll(".nv-noData").remove();var J=w.filter(function(t){return!t.disabled&&t.bar}),te=w.filter(function(t){return!t.bar});i=J.length&&!j?d.xScale():u.xScale(),r=p.scale(),o=j?u.yScale():d.yScale(),a=j?d.yScale():u.yScale(),s=j?c.yScale():h.yScale(),l=j?h.yScale():c.yScale();var ee=w.filter(function(t){return!t.disabled&&(j?!t.bar:t.bar)}).map(function(t){return t.values.map(function(t,e){return{x:M(t,e),y:D(t,e)}})}),ne=w.filter(function(t){return!t.disabled&&(j?t.bar:!t.bar)}).map(function(t){return t.values.map(function(t,e){return{x:M(t,e),y:D(t,e)}})});i.range([0,X]),r.domain(d3.extent(d3.merge(ee.concat(ne)),function(t){return t.x})).range([0,X]);var ie=G.selectAll("g.nv-wrap.nv-linePlusBar").data([w]),re=ie.enter().append("g").attr("class","nvd3 nv-wrap nv-linePlusBar").append("g"),oe=ie.select("g");re.append("g").attr("class","nv-legendWrap");var ae=re.append("g").attr("class","nv-focus");ae.append("g").attr("class","nv-x nv-axis"),ae.append("g").attr("class","nv-y1 nv-axis"),ae.append("g").attr("class","nv-y2 nv-axis"),ae.append("g").attr("class","nv-barsWrap"),ae.append("g").attr("class","nv-linesWrap");var se=re.append("g").attr("class","nv-context");if(se.append("g").attr("class","nv-x nv-axis"),se.append("g").attr("class","nv-y1 nv-axis"),se.append("g").attr("class","nv-y2 nv-axis"),se.append("g").attr("class","nv-barsWrap"),se.append("g").attr("class","nv-linesWrap"),se.append("g").attr("class","nv-brushBackground"),se.append("g").attr("class","nv-x nv-brush"),T){var le=b.align()?X/2:X,ue=b.align()?le:0;b.width(le),oe.select(".nv-legendWrap").datum(w.map(function(t){return t.originalKey=void 0===t.originalKey?t.key:t.originalKey,t.key=j?t.originalKey+(t.bar?R:z):t.originalKey+(t.bar?z:R),t})).call(b),$.top!=b.height()&&($.top=b.height(),K=t.utils.availableHeight(C,G,$)-N),oe.select(".nv-legendWrap").attr("transform","translate("+ue+","+-$.top+")")}else oe.select(".nv-legendWrap").selectAll("*").remove();ie.attr("transform","translate("+$.left+","+$.top+")"),oe.select(".nv-context").style("display",A?"initial":"none"),h.width(X).height(Z).color(w.map(function(t,e){return t.color||S(t,e)}).filter(function(t,e){return!w[e].disabled&&w[e].bar})),c.width(X).height(Z).color(w.map(function(t,e){return t.color||S(t,e)}).filter(function(t,e){return!w[e].disabled&&!w[e].bar}));var ce=oe.select(".nv-context .nv-barsWrap").datum(J.length?J:[{values:[]}]),de=oe.select(".nv-context .nv-linesWrap").datum(Y(te)?[{values:[]}]:te.filter(function(t){return!t.disabled}));oe.select(".nv-context").attr("transform","translate(0,"+(K+$.bottom+k.top)+")"),ce.transition().call(h),de.transition().call(c),O&&(p._ticks(t.utils.calcTicksX(X/100,w)).tickSize(-Z,0),oe.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+s.range()[0]+")"),oe.select(".nv-context .nv-x.nv-axis").transition().call(p)),E&&(v.scale(s)._ticks(Z/36).tickSize(-X,0),y.scale(l)._ticks(Z/36).tickSize(J.length?0:-X,0),oe.select(".nv-context .nv-y3.nv-axis").style("opacity",J.length?1:0).attr("transform","translate(0,"+r.range()[0]+")"),oe.select(".nv-context .nv-y2.nv-axis").style("opacity",te.length?1:0).attr("transform","translate("+r.range()[1]+",0)"),oe.select(".nv-context .nv-y1.nv-axis").transition().call(v),oe.select(".nv-context .nv-y2.nv-axis").transition().call(y)),x.x(r).on("brush",V),I&&x.extent(I);var he=oe.select(".nv-brushBackground").selectAll("g").data([I||x.extent()]),fe=he.enter().append("g");fe.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",Z),fe.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",Z);var pe=oe.select(".nv-x.nv-brush").call(x);pe.selectAll("rect").attr("height",Z),pe.selectAll(".resize").append("path").attr("d",P),b.dispatch.on("stateChange",function(t){for(var n in t)W[n]=t[n];H.stateChange(W),e.update()}),H.on("changeState",function(t){"undefined"!=typeof t.disabled&&(w.forEach(function(e,n){e.disabled=t.disabled[n]}),W.disabled=t.disabled),e.update()}),V()}),e}var n,i,r,o,a,s,l,u=t.models.line(),c=t.models.line(),d=t.models.historicalBar(),h=t.models.historicalBar(),f=t.models.axis(),p=t.models.axis(),g=t.models.axis(),m=t.models.axis(),v=t.models.axis(),y=t.models.axis(),b=t.models.legend(),x=d3.svg.brush(),w=t.models.tooltip(),$={top:30,right:30,bottom:30,left:60},k={top:0,right:30,bottom:20,left:60},_=null,C=null,M=function(t){return t.x},D=function(t){return t.y},S=t.utils.defaultColor(),T=!0,A=!0,E=!1,O=!0,N=50,I=null,P=null,H=d3.dispatch("brush","stateChange","changeState"),F=0,W=t.utils.state(),L=null,z=" (left axis)",R=" (right axis)",j=!1;u.clipEdge(!0),c.interactive(!1),c.pointActive(function(){return!1}),f.orient("bottom").tickPadding(5),g.orient("left"),m.orient("right"),p.orient("bottom").tickPadding(5),v.orient("left"),y.orient("right"),w.headerEnabled(!0).headerFormatter(function(t,e){return f.tickFormat()(t,e)});var q=function(){return j?{main:g,focus:v}:{main:m,focus:y}},V=function(){return j?{main:m,focus:y}:{main:g,focus:v}},B=function(t){return function(){return{active:t.map(function(t){return!t.disabled})}}},U=function(t){return function(e){void 0!==e.active&&t.forEach(function(t,n){t.disabled=!e.active[n]})}},Y=function(t){return t.every(function(t){return t.disabled})};return u.dispatch.on("elementMouseover.tooltip",function(t){w.duration(100).valueFormatter(function(t,e){return V().main.tickFormat()(t,e)}).data(t).hidden(!1)}),u.dispatch.on("elementMouseout.tooltip",function(){w.hidden(!0)}),d.dispatch.on("elementMouseover.tooltip",function(t){t.value=e.x()(t.data),t.series={value:e.y()(t.data),color:t.color},w.duration(0).valueFormatter(function(t,e){return q().main.tickFormat()(t,e)}).data(t).hidden(!1)}),d.dispatch.on("elementMouseout.tooltip",function(){w.hidden(!0)}),d.dispatch.on("elementMousemove.tooltip",function(){w()}),e.dispatch=H,e.legend=b,e.lines=u,e.lines2=c,e.bars=d,e.bars2=h,e.xAxis=f,e.x2Axis=p,e.y1Axis=g,e.y2Axis=m,e.y3Axis=v,e.y4Axis=y,e.tooltip=w,e.options=t.utils.optionsFunc.bind(e),e._options=Object.create({},{width:{get:function(){return _},set:function(t){_=t}},height:{get:function(){return C},set:function(t){C=t}},showLegend:{get:function(){return T},set:function(t){T=t}},brushExtent:{get:function(){return I},set:function(t){I=t}},noData:{get:function(){return P},set:function(t){P=t}},focusEnable:{get:function(){return A},set:function(t){A=t}},focusHeight:{get:function(){return N},set:function(t){N=t}},focusShowAxisX:{get:function(){return O},set:function(t){O=t}},focusShowAxisY:{get:function(){return E},set:function(t){E=t}},legendLeftAxisHint:{get:function(){return z},set:function(t){z=t}},legendRightAxisHint:{get:function(){return R},set:function(t){R=t}},margin:{get:function(){return $},set:function(t){$.top=void 0!==t.top?t.top:$.top,$.right=void 0!==t.right?t.right:$.right,$.bottom=void 0!==t.bottom?t.bottom:$.bottom,$.left=void 0!==t.left?t.left:$.left}},focusMargin:{get:function(){return k},set:function(t){k.top=void 0!==t.top?t.top:k.top,k.right=void 0!==t.right?t.right:k.right,k.bottom=void 0!==t.bottom?t.bottom:k.bottom,k.left=void 0!==t.left?t.left:k.left}},duration:{get:function(){return F},set:function(t){F=t}},color:{get:function(){return S},set:function(e){S=t.utils.getColor(e),b.color(S)}},x:{get:function(){return M},set:function(t){M=t,u.x(t),c.x(t),d.x(t),h.x(t)}},y:{get:function(){return D},set:function(t){D=t,u.y(t),c.y(t),d.y(t),h.y(t)}},switchYAxisOrder:{get:function(){return j},set:function(t){if(j!==t){var e=g;g=m,m=e;var n=v;v=y,y=n}j=t,g.orient("left"),m.orient("right"),v.orient("left"),y.orient("right")}}}),t.utils.inheritOptions(e,u),t.utils.initOptions(e),e},t.models.multiBar=function(){"use strict";function e(E){return T.reset(),E.each(function(e){var E=c-u.left-u.right,O=d-u.top-u.bottom;g=d3.select(this),t.utils.initSVG(g);var N=0;if(k&&e.length&&(k=[{values:e[0].values.map(function(t){return{x:t.x,y:0,series:t.series,size:.01}})}]),x){var I=d3.layout.stack().offset(w).values(function(t){return t.values}).y(v)(!e.length&&k?k:e);I.forEach(function(t,n){t.nonStackable?(e[n].nonStackableSeries=N++,I[n]=e[n]):n>0&&I[n-1].nonStackable&&I[n].values.map(function(t,e){t.y0-=I[n-1].values[e].y,t.y1=t.y0+t.y})}),e=I}e.forEach(function(t,e){t.values.forEach(function(n){n.series=e,n.key=t.key})}),x&&e.length>0&&e[0].values.map(function(t,n){var i=0,r=0;e.map(function(t,o){if(!e[o].nonStackable){var a=t.values[n];a.size=Math.abs(a.y),a.y<0?(a.y1=r,r-=a.size):(a.y1=a.size+i,i+=a.size)}})});var P=i&&r?[]:e.map(function(t,e){return t.values.map(function(t,n){return{x:m(t,n),y:v(t,n),y0:t.y0,y1:t.y1,idx:e}})});h.domain(i||d3.merge(P).map(function(t){return t.x})).rangeBands(o||[0,E],M),f.domain(r||d3.extent(d3.merge(P).map(function(t){var n=t.y;return x&&!e[t.idx].nonStackable&&(n=t.y>0?t.y1:t.y1+t.y),n}).concat(y))).range(a||[O,0]),h.domain()[0]===h.domain()[1]&&h.domain(h.domain()[0]?[h.domain()[0]-.01*h.domain()[0],h.domain()[1]+.01*h.domain()[1]]:[-1,1]),f.domain()[0]===f.domain()[1]&&f.domain(f.domain()[0]?[f.domain()[0]+.01*f.domain()[0],f.domain()[1]-.01*f.domain()[1]]:[-1,1]),s=s||h,l=l||f;var H=g.selectAll("g.nv-wrap.nv-multibar").data([e]),F=H.enter().append("g").attr("class","nvd3 nv-wrap nv-multibar"),W=F.append("defs"),L=F.append("g"),z=H.select("g");L.append("g").attr("class","nv-groups"),H.attr("transform","translate("+u.left+","+u.top+")"),W.append("clipPath").attr("id","nv-edge-clip-"+p).append("rect"),H.select("#nv-edge-clip-"+p+" rect").attr("width",E).attr("height",O),z.attr("clip-path",b?"url(#nv-edge-clip-"+p+")":"");var R=H.select(".nv-groups").selectAll(".nv-group").data(function(t){return t},function(t,e){return e});R.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);var j=T.transition(R.exit().selectAll("rect.nv-bar"),"multibarExit",Math.min(100,C)).attr("y",function(t){var n=l(0)||0;return x&&e[t.series]&&!e[t.series].nonStackable&&(n=l(t.y0)),n}).attr("height",0).remove();j.delay&&j.delay(function(t,e){var n=e*(C/(A+1))-e;return n}),R.attr("class",function(t,e){return"nv-group nv-series-"+e}).classed("hover",function(t){return t.hover}).style("fill",function(t,e){return $(t,e)}).style("stroke",function(t,e){return $(t,e)}),R.style("stroke-opacity",1).style("fill-opacity",D);var q=R.selectAll("rect.nv-bar").data(function(t){return k&&!e.length?k.values:t.values});q.exit().remove();q.enter().append("rect").attr("class",function(t,e){return v(t,e)<0?"nv-bar negative":"nv-bar positive"}).attr("x",function(t,n,i){return x&&!e[i].nonStackable?0:i*h.rangeBand()/e.length}).attr("y",function(t,n,i){return l(x&&!e[i].nonStackable?t.y0:0)||0}).attr("height",0).attr("width",function(t,n,i){return h.rangeBand()/(x&&!e[i].nonStackable?1:e.length)}).attr("transform",function(t,e){return"translate("+h(m(t,e))+",0)"});q.style("fill",function(t,e,n){return $(t,n,e)}).style("stroke",function(t,e,n){return $(t,n,e)}).on("mouseover",function(t,e){d3.select(this).classed("hover",!0),S.elementMouseover({data:t,index:e,color:d3.select(this).style("fill")})}).on("mouseout",function(t,e){d3.select(this).classed("hover",!1),S.elementMouseout({data:t,index:e,color:d3.select(this).style("fill")})}).on("mousemove",function(t,e){S.elementMousemove({data:t,index:e,color:d3.select(this).style("fill")})}).on("click",function(t,e){var n=this;S.elementClick({data:t,index:e,color:d3.select(this).style("fill"),event:d3.event,element:n}),d3.event.stopPropagation()}).on("dblclick",function(t,e){S.elementDblClick({data:t,index:e,color:d3.select(this).style("fill")}),d3.event.stopPropagation()}),q.attr("class",function(t,e){return v(t,e)<0?"nv-bar negative":"nv-bar positive"}).attr("transform",function(t,e){return"translate("+h(m(t,e))+",0)"}),_&&(n||(n=e.map(function(){return!0})),q.style("fill",function(t,e,i){return d3.rgb(_(t,e)).darker(n.map(function(t,e){return e}).filter(function(t,e){return!n[e]})[i]).toString()}).style("stroke",function(t,e,i){return d3.rgb(_(t,e)).darker(n.map(function(t,e){return e}).filter(function(t,e){return!n[e]})[i]).toString()}));var V=q.watchTransition(T,"multibar",Math.min(250,C)).delay(function(t,n){return n*C/e[0].values.length});x?V.attr("y",function(t,n,i){var r=0;return r=e[i].nonStackable?v(t,n)<0?f(0):f(0)-f(v(t,n))<-1?f(0)-1:f(v(t,n))||0:f(t.y1)}).attr("height",function(t,n,i){return e[i].nonStackable?Math.max(Math.abs(f(v(t,n))-f(0)),0)||0:Math.max(Math.abs(f(t.y+t.y0)-f(t.y0)),0)}).attr("x",function(t,n,i){var r=0;return e[i].nonStackable&&(r=t.series*h.rangeBand()/e.length,e.length!==N&&(r=e[i].nonStackableSeries*h.rangeBand()/(2*N))),r}).attr("width",function(t,n,i){if(e[i].nonStackable){var r=h.rangeBand()/N;return e.length!==N&&(r=h.rangeBand()/(2*N)),r}return h.rangeBand()}):V.attr("x",function(t){return t.series*h.rangeBand()/e.length}).attr("width",h.rangeBand()/e.length).attr("y",function(t,e){return v(t,e)<0?f(0):f(0)-f(v(t,e))<1?f(0)-1:f(v(t,e))||0}).attr("height",function(t,e){return Math.max(Math.abs(f(v(t,e))-f(0)),1)||0}),s=h.copy(),l=f.copy(),e[0]&&e[0].values&&(A=e[0].values.length)}),T.renderEnd("multibar immediate"),e}var n,i,r,o,a,s,l,u={top:0,right:0,bottom:0,left:0},c=960,d=500,h=d3.scale.ordinal(),f=d3.scale.linear(),p=Math.floor(1e4*Math.random()),g=null,m=function(t){return t.x},v=function(t){return t.y},y=[0],b=!0,x=!1,w="zero",$=t.utils.defaultColor(),k=!1,_=null,C=500,M=.1,D=.75,S=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),T=t.utils.renderWatch(S,C),A=0;return e.dispatch=S,e.options=t.utils.optionsFunc.bind(e),e._options=Object.create({},{width:{get:function(){return c},set:function(t){c=t}},height:{get:function(){return d},set:function(t){d=t}},x:{get:function(){return m},set:function(t){m=t}},y:{get:function(){return v},set:function(t){v=t}},xScale:{get:function(){return h},set:function(t){h=t}},yScale:{get:function(){return f},set:function(t){f=t}},xDomain:{get:function(){return i},set:function(t){i=t}},yDomain:{get:function(){return r},set:function(t){r=t}},xRange:{get:function(){return o},set:function(t){o=t}},yRange:{get:function(){return a},set:function(t){a=t}},forceY:{get:function(){return y},set:function(t){y=t}},stacked:{get:function(){return x},set:function(t){x=t}},stackOffset:{get:function(){return w},set:function(t){w=t}},clipEdge:{get:function(){return b},set:function(t){b=t}},disabled:{get:function(){return n},set:function(t){n=t}},id:{get:function(){return p},set:function(t){p=t}},hideable:{get:function(){return k},set:function(t){k=t}},groupSpacing:{get:function(){return M},set:function(t){M=t}},fillOpacity:{get:function(){return D},set:function(t){D=t}},margin:{get:function(){return u},set:function(t){u.top=void 0!==t.top?t.top:u.top,u.right=void 0!==t.right?t.right:u.right,u.bottom=void 0!==t.bottom?t.bottom:u.bottom,u.left=void 0!==t.left?t.left:u.left}},duration:{get:function(){return C},set:function(t){C=t,T.reset(C)}},color:{get:function(){return $},set:function(e){$=t.utils.getColor(e)}},barColor:{get:function(){return _},set:function(e){_=e?t.utils.getColor(e):null}}}),t.utils.initOptions(e),e},t.models.multiBarChart=function(){"use strict";function e(D){return O.reset(),O.models(r),y&&O.models(o),b&&O.models(a),D.each(function(D){var O=d3.select(this),H=this;t.utils.initSVG(O);var F=t.utils.availableWidth(h,O,d),W=t.utils.availableHeight(f,O,d);if(e.update=function(){0===A?O.call(e):O.transition().duration(A).call(e)},e.container=this,C.setter(P(D),e.update).getter(I(D)).update(),C.disabled=D.map(function(t){return!!t.disabled}),!M){var L;M={};for(L in C)M[L]=C[L]instanceof Array?C[L].slice(0):C[L]}if(!(D&&D.length&&D.filter(function(t){return t.values.length}).length))return t.utils.noData(e,O),e;O.selectAll(".nv-noData").remove(),n=r.xScale(),i=r.yScale();var z=O.selectAll("g.nv-wrap.nv-multiBarWithLegend").data([D]),R=z.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarWithLegend").append("g"),j=z.select("g");if(R.append("g").attr("class","nv-x nv-axis"),R.append("g").attr("class","nv-y nv-axis"),R.append("g").attr("class","nv-barsWrap"),R.append("g").attr("class","nv-legendWrap"),R.append("g").attr("class","nv-controlsWrap"),R.append("g").attr("class","nv-interactive"),v?(l.width(F-T()),j.select(".nv-legendWrap").datum(D).call(l),d.top!=l.height()&&(d.top=l.height(),W=t.utils.availableHeight(f,O,d)),j.select(".nv-legendWrap").attr("transform","translate("+T()+","+-d.top+")")):j.select(".nv-legendWrap").selectAll("*").remove(),g){var q=[{key:m.grouped||"Grouped",disabled:r.stacked()},{key:m.stacked||"Stacked",disabled:!r.stacked()}];u.width(T()).color(["#444","#444","#444"]),j.select(".nv-controlsWrap").datum(q).attr("transform","translate(0,"+-d.top+")").call(u)}else j.select(".nv-controlsWrap").selectAll("*").remove();z.attr("transform","translate("+d.left+","+d.top+")"),x&&j.select(".nv-y.nv-axis").attr("transform","translate("+F+",0)"),r.disabled(D.map(function(t){return t.disabled})).width(F).height(W).color(D.map(function(t,e){return t.color||p(t,e)}).filter(function(t,e){return!D[e].disabled}));var V=j.select(".nv-barsWrap").datum(D.filter(function(t){return!t.disabled}));if(V.call(r),y){o.scale(n)._ticks(t.utils.calcTicksX(F/100,D)).tickSize(-W,0),j.select(".nv-x.nv-axis").attr("transform","translate(0,"+i.range()[0]+")"),j.select(".nv-x.nv-axis").call(o);var B=j.select(".nv-x.nv-axis > g").selectAll("g");if(B.selectAll("line, text").style("opacity",1),$){var U=function(t,e){return"translate("+t+","+e+")"},Y=5,G=17;B.selectAll("text").attr("transform",function(t,e,n){return U(0,n%2==0?Y:G)});var X=d3.selectAll(".nv-x.nv-axis .nv-wrap g g text")[0].length;j.selectAll(".nv-x.nv-axis .nv-axisMaxMin text").attr("transform",function(t,e){return U(0,0===e||X%2!==0?G:Y)})}k&&j.selectAll(".tick text").call(t.utils.wrapTicks,e.xAxis.rangeBand()),w&&B.filter(function(t,e){return e%Math.ceil(D[0].values.length/(F/100))!==0}).selectAll("text, line").style("opacity",0),_&&B.selectAll(".tick text").attr("transform","rotate("+_+" 0,0)").style("text-anchor",_>0?"start":"end"),j.select(".nv-x.nv-axis").selectAll("g.nv-axisMaxMin text").style("opacity",1)}b&&(a.scale(i)._ticks(t.utils.calcTicksY(W/36,D)).tickSize(-F,0),j.select(".nv-y.nv-axis").call(a)),E&&(s.width(F).height(W).margin({left:d.left,top:d.top}).svgContainer(O).xScale(n),z.select(".nv-interactive").call(s)),l.dispatch.on("stateChange",function(t){for(var n in t)C[n]=t[n];S.stateChange(C),e.update()}),u.dispatch.on("legendClick",function(t){if(t.disabled){switch(q=q.map(function(t){return t.disabled=!0,t}),t.disabled=!1,t.key){case"Grouped":case m.grouped:r.stacked(!1);break;case"Stacked":case m.stacked:r.stacked(!0)}C.stacked=r.stacked(),S.stateChange(C),e.update()}}),S.on("changeState",function(t){"undefined"!=typeof t.disabled&&(D.forEach(function(e,n){e.disabled=t.disabled[n]}),C.disabled=t.disabled),"undefined"!=typeof t.stacked&&(r.stacked(t.stacked),C.stacked=t.stacked,N=t.stacked),e.update()}),E?(s.dispatch.on("elementMousemove",function(t){if(void 0!=t.pointXValue){var i,r,o,a,l=[];D.filter(function(t,e){return t.seriesIndex=e,!t.disabled}).forEach(function(s){r=n.domain().indexOf(t.pointXValue);
var u=s.values[r];void 0!==u&&(a=u.x,void 0===i&&(i=u),void 0===o&&(o=t.mouseX),l.push({key:s.key,value:e.y()(u,r),color:p(s,s.seriesIndex),data:s.values[r]}))}),s.tooltip.chartContainer(H.parentNode).data({value:a,index:r,series:l})(),s.renderGuideLine(o)}}),s.dispatch.on("elementMouseout",function(){s.tooltip.hidden(!0)})):(r.dispatch.on("elementMouseover.tooltip",function(t){t.value=e.x()(t.data),t.series={key:t.data.key,value:e.y()(t.data),color:t.color},c.data(t).hidden(!1)}),r.dispatch.on("elementMouseout.tooltip",function(){c.hidden(!0)}),r.dispatch.on("elementMousemove.tooltip",function(){c()}))}),O.renderEnd("multibarchart immediate"),e}var n,i,r=t.models.multiBar(),o=t.models.axis(),a=t.models.axis(),s=t.interactiveGuideline(),l=t.models.legend(),u=t.models.legend(),c=t.models.tooltip(),d={top:30,right:20,bottom:50,left:60},h=null,f=null,p=t.utils.defaultColor(),g=!0,m={},v=!0,y=!0,b=!0,x=!1,w=!0,$=!1,k=!1,_=0,C=t.utils.state(),M=null,D=null,S=d3.dispatch("stateChange","changeState","renderEnd"),T=function(){return g?180:0},A=250,E=!1;C.stacked=!1,r.stacked(!1),o.orient("bottom").tickPadding(7).showMaxMin(!1).tickFormat(function(t){return t}),a.orient(x?"right":"left").tickFormat(d3.format(",.1f")),c.duration(0).valueFormatter(function(t,e){return a.tickFormat()(t,e)}).headerFormatter(function(t,e){return o.tickFormat()(t,e)}),u.updateState(!1);var O=t.utils.renderWatch(S),N=!1,I=function(t){return function(){return{active:t.map(function(t){return!t.disabled}),stacked:N}}},P=function(t){return function(e){void 0!==e.stacked&&(N=e.stacked),void 0!==e.active&&t.forEach(function(t,n){t.disabled=!e.active[n]})}};return e.dispatch=S,e.multibar=r,e.legend=l,e.controls=u,e.xAxis=o,e.yAxis=a,e.state=C,e.tooltip=c,e.interactiveLayer=s,e.options=t.utils.optionsFunc.bind(e),e._options=Object.create({},{width:{get:function(){return h},set:function(t){h=t}},height:{get:function(){return f},set:function(t){f=t}},showLegend:{get:function(){return v},set:function(t){v=t}},showControls:{get:function(){return g},set:function(t){g=t}},controlLabels:{get:function(){return m},set:function(t){m=t}},showXAxis:{get:function(){return y},set:function(t){y=t}},showYAxis:{get:function(){return b},set:function(t){b=t}},defaultState:{get:function(){return M},set:function(t){M=t}},noData:{get:function(){return D},set:function(t){D=t}},reduceXTicks:{get:function(){return w},set:function(t){w=t}},rotateLabels:{get:function(){return _},set:function(t){_=t}},staggerLabels:{get:function(){return $},set:function(t){$=t}},wrapLabels:{get:function(){return k},set:function(t){k=!!t}},margin:{get:function(){return d},set:function(t){d.top=void 0!==t.top?t.top:d.top,d.right=void 0!==t.right?t.right:d.right,d.bottom=void 0!==t.bottom?t.bottom:d.bottom,d.left=void 0!==t.left?t.left:d.left}},duration:{get:function(){return A},set:function(t){A=t,r.duration(A),o.duration(A),a.duration(A),O.reset(A)}},color:{get:function(){return p},set:function(e){p=t.utils.getColor(e),l.color(p)}},rightAlignYAxis:{get:function(){return x},set:function(t){x=t,a.orient(x?"right":"left")}},useInteractiveGuideline:{get:function(){return E},set:function(t){E=t}},barColor:{get:function(){return r.barColor},set:function(t){r.barColor(t),l.color(function(t,e){return d3.rgb("#ccc").darker(1.5*e).toString()})}}}),t.utils.inheritOptions(e,r),t.utils.initOptions(e),e},t.models.multiBarHorizontal=function(){"use strict";function e(h){return E.reset(),h.each(function(e){var h=c-u.left-u.right,T=d-u.top-u.bottom;f=d3.select(this),t.utils.initSVG(f),$&&(e=d3.layout.stack().offset("zero").values(function(t){return t.values}).y(v)(e)),e.forEach(function(t,e){t.values.forEach(function(n){n.series=e,n.key=t.key})}),$&&e[0].values.map(function(t,n){var i=0,r=0;e.map(function(t){var e=t.values[n];e.size=Math.abs(e.y),e.y<0?(e.y1=r-e.size,r-=e.size):(e.y1=i,i+=e.size)})});var O=i&&r?[]:e.map(function(t){return t.values.map(function(t,e){return{x:m(t,e),y:v(t,e),y0:t.y0,y1:t.y1}})});p.domain(i||d3.merge(O).map(function(t){return t.x})).rangeBands(o||[0,T],M),g.domain(r||d3.extent(d3.merge(O).map(function(t){return $?t.y>0?t.y1+t.y:t.y1:t.y}).concat(b))),g.range(k&&!$?a||[g.domain()[0]<0?C:0,h-(g.domain()[1]>0?C:0)]:a||[0,h]),s=s||p,l=l||d3.scale.linear().domain(g.domain()).range([g(0),g(0)]);{var N=d3.select(this).selectAll("g.nv-wrap.nv-multibarHorizontal").data([e]),I=N.enter().append("g").attr("class","nvd3 nv-wrap nv-multibarHorizontal"),P=(I.append("defs"),I.append("g"));N.select("g")}P.append("g").attr("class","nv-groups"),N.attr("transform","translate("+u.left+","+u.top+")");var H=N.select(".nv-groups").selectAll(".nv-group").data(function(t){return t},function(t,e){return e});H.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),H.exit().watchTransition(E,"multibarhorizontal: exit groups").style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove(),H.attr("class",function(t,e){return"nv-group nv-series-"+e}).classed("hover",function(t){return t.hover}).style("fill",function(t,e){return x(t,e)}).style("stroke",function(t,e){return x(t,e)}),H.watchTransition(E,"multibarhorizontal: groups").style("stroke-opacity",1).style("fill-opacity",D);var F=H.selectAll("g.nv-bar").data(function(t){return t.values});F.exit().remove();var W=F.enter().append("g").attr("transform",function(t,n,i){return"translate("+l($?t.y0:0)+","+($?0:i*p.rangeBand()/e.length+p(m(t,n)))+")"});W.append("rect").attr("width",0).attr("height",p.rangeBand()/($?1:e.length)),F.on("mouseover",function(t,e){d3.select(this).classed("hover",!0),A.elementMouseover({data:t,index:e,color:d3.select(this).style("fill")})}).on("mouseout",function(t,e){d3.select(this).classed("hover",!1),A.elementMouseout({data:t,index:e,color:d3.select(this).style("fill")})}).on("mouseout",function(t,e){A.elementMouseout({data:t,index:e,color:d3.select(this).style("fill")})}).on("mousemove",function(t,e){A.elementMousemove({data:t,index:e,color:d3.select(this).style("fill")})}).on("click",function(t,e){var n=this;A.elementClick({data:t,index:e,color:d3.select(this).style("fill"),event:d3.event,element:n}),d3.event.stopPropagation()}).on("dblclick",function(t,e){A.elementDblClick({data:t,index:e,color:d3.select(this).style("fill")}),d3.event.stopPropagation()}),y(e[0],0)&&(W.append("polyline"),F.select("polyline").attr("fill","none").attr("points",function(t,n){var i=y(t,n),r=.8*p.rangeBand()/(2*($?1:e.length));i=i.length?i:[-Math.abs(i),Math.abs(i)],i=i.map(function(t){return g(t)-g(0)});var o=[[i[0],-r],[i[0],r],[i[0],0],[i[1],0],[i[1],-r],[i[1],r]];return o.map(function(t){return t.join(",")}).join(" ")}).attr("transform",function(t,n){var i=p.rangeBand()/(2*($?1:e.length));return"translate("+(v(t,n)<0?0:g(v(t,n))-g(0))+", "+i+")"})),W.append("text"),k&&!$?(F.select("text").attr("text-anchor",function(t,e){return v(t,e)<0?"end":"start"}).attr("y",p.rangeBand()/(2*e.length)).attr("dy",".32em").text(function(t,e){var n=S(v(t,e)),i=y(t,e);return void 0===i?n:i.length?n+"+"+S(Math.abs(i[1]))+"-"+S(Math.abs(i[0])):n+"±"+S(Math.abs(i))}),F.watchTransition(E,"multibarhorizontal: bars").select("text").attr("x",function(t,e){return v(t,e)<0?-4:g(v(t,e))-g(0)+4})):F.selectAll("text").text(""),_&&!$?(W.append("text").classed("nv-bar-label",!0),F.select("text.nv-bar-label").attr("text-anchor",function(t,e){return v(t,e)<0?"start":"end"}).attr("y",p.rangeBand()/(2*e.length)).attr("dy",".32em").text(function(t,e){return m(t,e)}),F.watchTransition(E,"multibarhorizontal: bars").select("text.nv-bar-label").attr("x",function(t,e){return v(t,e)<0?g(0)-g(v(t,e))+4:-4})):F.selectAll("text.nv-bar-label").text(""),F.attr("class",function(t,e){return v(t,e)<0?"nv-bar negative":"nv-bar positive"}),w&&(n||(n=e.map(function(){return!0})),F.style("fill",function(t,e,i){return d3.rgb(w(t,e)).darker(n.map(function(t,e){return e}).filter(function(t,e){return!n[e]})[i]).toString()}).style("stroke",function(t,e,i){return d3.rgb(w(t,e)).darker(n.map(function(t,e){return e}).filter(function(t,e){return!n[e]})[i]).toString()})),$?F.watchTransition(E,"multibarhorizontal: bars").attr("transform",function(t,e){return"translate("+g(t.y1)+","+p(m(t,e))+")"}).select("rect").attr("width",function(t,e){return Math.abs(g(v(t,e)+t.y0)-g(t.y0))||0}).attr("height",p.rangeBand()):F.watchTransition(E,"multibarhorizontal: bars").attr("transform",function(t,n){return"translate("+g(v(t,n)<0?v(t,n):0)+","+(t.series*p.rangeBand()/e.length+p(m(t,n)))+")"}).select("rect").attr("height",p.rangeBand()/e.length).attr("width",function(t,e){return Math.max(Math.abs(g(v(t,e))-g(0)),1)||0}),s=p.copy(),l=g.copy()}),E.renderEnd("multibarHorizontal immediate"),e}var n,i,r,o,a,s,l,u={top:0,right:0,bottom:0,left:0},c=960,d=500,h=Math.floor(1e4*Math.random()),f=null,p=d3.scale.ordinal(),g=d3.scale.linear(),m=function(t){return t.x},v=function(t){return t.y},y=function(t){return t.yErr},b=[0],x=t.utils.defaultColor(),w=null,$=!1,k=!1,_=!1,C=60,M=.1,D=.75,S=d3.format(",.2f"),T=250,A=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),E=t.utils.renderWatch(A,T);return e.dispatch=A,e.options=t.utils.optionsFunc.bind(e),e._options=Object.create({},{width:{get:function(){return c},set:function(t){c=t}},height:{get:function(){return d},set:function(t){d=t}},x:{get:function(){return m},set:function(t){m=t}},y:{get:function(){return v},set:function(t){v=t}},yErr:{get:function(){return y},set:function(t){y=t}},xScale:{get:function(){return p},set:function(t){p=t}},yScale:{get:function(){return g},set:function(t){g=t}},xDomain:{get:function(){return i},set:function(t){i=t}},yDomain:{get:function(){return r},set:function(t){r=t}},xRange:{get:function(){return o},set:function(t){o=t}},yRange:{get:function(){return a},set:function(t){a=t}},forceY:{get:function(){return b},set:function(t){b=t}},stacked:{get:function(){return $},set:function(t){$=t}},showValues:{get:function(){return k},set:function(t){k=t}},disabled:{get:function(){return n},set:function(t){n=t}},id:{get:function(){return h},set:function(t){h=t}},valueFormat:{get:function(){return S},set:function(t){S=t}},valuePadding:{get:function(){return C},set:function(t){C=t}},groupSpacing:{get:function(){return M},set:function(t){M=t}},fillOpacity:{get:function(){return D},set:function(t){D=t}},margin:{get:function(){return u},set:function(t){u.top=void 0!==t.top?t.top:u.top,u.right=void 0!==t.right?t.right:u.right,u.bottom=void 0!==t.bottom?t.bottom:u.bottom,u.left=void 0!==t.left?t.left:u.left}},duration:{get:function(){return T},set:function(t){T=t,E.reset(T)}},color:{get:function(){return x},set:function(e){x=t.utils.getColor(e)}},barColor:{get:function(){return w},set:function(e){w=e?t.utils.getColor(e):null}}}),t.utils.initOptions(e),e},t.models.multiBarHorizontalChart=function(){"use strict";function e(u){return S.reset(),S.models(r),v&&S.models(o),y&&S.models(a),u.each(function(u){var $=d3.select(this);t.utils.initSVG($);var S=t.utils.availableWidth(d,$,c),T=t.utils.availableHeight(h,$,c);if(e.update=function(){$.transition().duration(C).call(e)},e.container=this,b=r.stacked(),x.setter(D(u),e.update).getter(M(u)).update(),x.disabled=u.map(function(t){return!!t.disabled}),!w){var A;w={};for(A in x)w[A]=x[A]instanceof Array?x[A].slice(0):x[A]}if(!(u&&u.length&&u.filter(function(t){return t.values.length}).length))return t.utils.noData(e,$),e;$.selectAll(".nv-noData").remove(),n=r.xScale(),i=r.yScale().clamp(!0);var E=$.selectAll("g.nv-wrap.nv-multiBarHorizontalChart").data([u]),O=E.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarHorizontalChart").append("g"),N=E.select("g");if(O.append("g").attr("class","nv-x nv-axis"),O.append("g").attr("class","nv-y nv-axis").append("g").attr("class","nv-zeroLine").append("line"),O.append("g").attr("class","nv-barsWrap"),O.append("g").attr("class","nv-legendWrap"),O.append("g").attr("class","nv-controlsWrap"),m?(s.width(S-_()),N.select(".nv-legendWrap").datum(u).call(s),c.top!=s.height()&&(c.top=s.height(),T=t.utils.availableHeight(h,$,c)),N.select(".nv-legendWrap").attr("transform","translate("+_()+","+-c.top+")")):N.select(".nv-legendWrap").selectAll("*").remove(),p){var I=[{key:g.grouped||"Grouped",disabled:r.stacked()},{key:g.stacked||"Stacked",disabled:!r.stacked()}];l.width(_()).color(["#444","#444","#444"]),N.select(".nv-controlsWrap").datum(I).attr("transform","translate(0,"+-c.top+")").call(l)}else N.select(".nv-controlsWrap").selectAll("*").remove();E.attr("transform","translate("+c.left+","+c.top+")"),r.disabled(u.map(function(t){return t.disabled})).width(S).height(T).color(u.map(function(t,e){return t.color||f(t,e)}).filter(function(t,e){return!u[e].disabled}));var P=N.select(".nv-barsWrap").datum(u.filter(function(t){return!t.disabled}));if(P.transition().call(r),v){o.scale(n)._ticks(t.utils.calcTicksY(T/24,u)).tickSize(-S,0),N.select(".nv-x.nv-axis").call(o);var H=N.select(".nv-x.nv-axis").selectAll("g");H.selectAll("line, text")}y&&(a.scale(i)._ticks(t.utils.calcTicksX(S/100,u)).tickSize(-T,0),N.select(".nv-y.nv-axis").attr("transform","translate(0,"+T+")"),N.select(".nv-y.nv-axis").call(a)),N.select(".nv-zeroLine line").attr("x1",i(0)).attr("x2",i(0)).attr("y1",0).attr("y2",-T),s.dispatch.on("stateChange",function(t){for(var n in t)x[n]=t[n];k.stateChange(x),e.update()}),l.dispatch.on("legendClick",function(t){if(t.disabled){switch(I=I.map(function(t){return t.disabled=!0,t}),t.disabled=!1,t.key){case"Grouped":case g.grouped:r.stacked(!1);break;case"Stacked":case g.stacked:r.stacked(!0)}x.stacked=r.stacked(),k.stateChange(x),b=r.stacked(),e.update()}}),k.on("changeState",function(t){"undefined"!=typeof t.disabled&&(u.forEach(function(e,n){e.disabled=t.disabled[n]}),x.disabled=t.disabled),"undefined"!=typeof t.stacked&&(r.stacked(t.stacked),x.stacked=t.stacked,b=t.stacked),e.update()})}),S.renderEnd("multibar horizontal chart immediate"),e}var n,i,r=t.models.multiBarHorizontal(),o=t.models.axis(),a=t.models.axis(),s=t.models.legend().height(30),l=t.models.legend().height(30),u=t.models.tooltip(),c={top:30,right:20,bottom:50,left:60},d=null,h=null,f=t.utils.defaultColor(),p=!0,g={},m=!0,v=!0,y=!0,b=!1,x=t.utils.state(),w=null,$=null,k=d3.dispatch("stateChange","changeState","renderEnd"),_=function(){return p?180:0},C=250;x.stacked=!1,r.stacked(b),o.orient("left").tickPadding(5).showMaxMin(!1).tickFormat(function(t){return t}),a.orient("bottom").tickFormat(d3.format(",.1f")),u.duration(0).valueFormatter(function(t,e){return a.tickFormat()(t,e)}).headerFormatter(function(t,e){return o.tickFormat()(t,e)}),l.updateState(!1);var M=function(t){return function(){return{active:t.map(function(t){return!t.disabled}),stacked:b}}},D=function(t){return function(e){void 0!==e.stacked&&(b=e.stacked),void 0!==e.active&&t.forEach(function(t,n){t.disabled=!e.active[n]})}},S=t.utils.renderWatch(k,C);return r.dispatch.on("elementMouseover.tooltip",function(t){t.value=e.x()(t.data),t.series={key:t.data.key,value:e.y()(t.data),color:t.color},u.data(t).hidden(!1)}),r.dispatch.on("elementMouseout.tooltip",function(){u.hidden(!0)}),r.dispatch.on("elementMousemove.tooltip",function(){u()}),e.dispatch=k,e.multibar=r,e.legend=s,e.controls=l,e.xAxis=o,e.yAxis=a,e.state=x,e.tooltip=u,e.options=t.utils.optionsFunc.bind(e),e._options=Object.create({},{width:{get:function(){return d},set:function(t){d=t}},height:{get:function(){return h},set:function(t){h=t}},showLegend:{get:function(){return m},set:function(t){m=t}},showControls:{get:function(){return p},set:function(t){p=t}},controlLabels:{get:function(){return g},set:function(t){g=t}},showXAxis:{get:function(){return v},set:function(t){v=t}},showYAxis:{get:function(){return y},set:function(t){y=t}},defaultState:{get:function(){return w},set:function(t){w=t}},noData:{get:function(){return $},set:function(t){$=t}},margin:{get:function(){return c},set:function(t){c.top=void 0!==t.top?t.top:c.top,c.right=void 0!==t.right?t.right:c.right,c.bottom=void 0!==t.bottom?t.bottom:c.bottom,c.left=void 0!==t.left?t.left:c.left}},duration:{get:function(){return C},set:function(t){C=t,S.reset(C),r.duration(C),o.duration(C),a.duration(C)}},color:{get:function(){return f},set:function(e){f=t.utils.getColor(e),s.color(f)}},barColor:{get:function(){return r.barColor},set:function(t){r.barColor(t),s.color(function(t,e){return d3.rgb("#ccc").darker(1.5*e).toString()})}}}),t.utils.inheritOptions(e,r),t.utils.initOptions(e),e},t.models.multiChart=function(){"use strict";function e(u){return u.each(function(u){function f(t){var e=2===u[t.seriesIndex].yAxis?A:T;t.value=t.point.x,t.series={value:t.point.y,color:t.point.color,key:t.series.key},O.duration(0).headerFormatter(function(t,e){return S.tickFormat()(t,e)}).valueFormatter(function(t,n){return e.tickFormat()(t,n)}).data(t).hidden(!1)}function N(t){var e=2===u[t.seriesIndex].yAxis?A:T;t.value=t.point.x,t.series={value:t.point.y,color:t.point.color,key:t.series.key},O.duration(100).headerFormatter(function(t,e){return S.tickFormat()(t,e)}).valueFormatter(function(t,n){return e.tickFormat()(t,n)}).data(t).hidden(!1)}function P(t){var e=2===u[t.seriesIndex].yAxis?A:T;t.point.x=M.x()(t.point),t.point.y=M.y()(t.point),O.duration(0).headerFormatter(function(t,e){return S.tickFormat()(t,e)}).valueFormatter(function(t,n){return e.tickFormat()(t,n)}).data(t).hidden(!1)}function H(t){var e=2===u[t.data.series].yAxis?A:T;t.value=_.x()(t.data),t.series={value:_.y()(t.data),color:t.color,key:t.data.key},O.duration(0).headerFormatter(function(t,e){return S.tickFormat()(t,e)}).valueFormatter(function(t,n){return e.tickFormat()(t,n)}).data(t).hidden(!1)}function F(){for(var t=0,e=I.length;e>t;t++){var n=I[t];try{n.clearHighlights()}catch(i){}}}function W(t,e,n){for(var i=0,r=I.length;r>i;i++){var o=I[i];try{o.highlightPoint(t,e,n)}catch(a){}}}var L=d3.select(this);t.utils.initSVG(L),e.update=function(){L.transition().call(e)},e.container=this;var z=t.utils.availableWidth(a,L,r),R=t.utils.availableHeight(s,L,r),j=u.filter(function(t){return"line"==t.type&&1==t.yAxis}),q=u.filter(function(t){return"line"==t.type&&2==t.yAxis}),V=u.filter(function(t){return"scatter"==t.type&&1==t.yAxis}),B=u.filter(function(t){return"scatter"==t.type&&2==t.yAxis}),U=u.filter(function(t){return"bar"==t.type&&1==t.yAxis}),Y=u.filter(function(t){return"bar"==t.type&&2==t.yAxis}),G=u.filter(function(t){return"area"==t.type&&1==t.yAxis}),X=u.filter(function(t){return"area"==t.type&&2==t.yAxis});if(!(u&&u.length&&u.filter(function(t){return t.values.length}).length))return t.utils.noData(e,L),e;L.selectAll(".nv-noData").remove();var K=u.filter(function(t){return!t.disabled&&1==t.yAxis}).map(function(t){return t.values.map(function(t){return{x:c(t),y:d(t)}})}),Z=u.filter(function(t){return!t.disabled&&2==t.yAxis}).map(function(t){return t.values.map(function(t){return{x:c(t),y:d(t)}})});v.domain(d3.extent(d3.merge(K.concat(Z)),function(t){return t.x})).range([0,z]);var Q=L.selectAll("g.wrap.multiChart").data([u]),J=Q.enter().append("g").attr("class","wrap nvd3 multiChart").append("g");J.append("g").attr("class","nv-x nv-axis"),J.append("g").attr("class","nv-y1 nv-axis"),J.append("g").attr("class","nv-y2 nv-axis"),J.append("g").attr("class","stack1Wrap"),J.append("g").attr("class","stack2Wrap"),J.append("g").attr("class","bars1Wrap"),J.append("g").attr("class","bars2Wrap"),J.append("g").attr("class","scatters1Wrap"),J.append("g").attr("class","scatters2Wrap"),J.append("g").attr("class","lines1Wrap"),J.append("g").attr("class","lines2Wrap"),J.append("g").attr("class","legendWrap"),J.append("g").attr("class","nv-interactive");var te=Q.select("g"),ee=u.map(function(t,e){return u[e].color||o(t,e)});if(l){var ne=E.align()?z/2:z,ie=E.align()?ne:0;E.width(ne),E.color(ee),te.select(".legendWrap").datum(u.map(function(t){return t.originalKey=void 0===t.originalKey?t.key:t.originalKey,t.key=t.originalKey+(1==t.yAxis?"":m),t})).call(E),r.top!=E.height()&&(r.top=E.height(),R=t.utils.availableHeight(s,L,r)),te.select(".legendWrap").attr("transform","translate("+ie+","+-r.top+")")}else te.select(".legendWrap").selectAll("*").remove();x.width(z).height(R).interpolate(h).color(ee.filter(function(t,e){return!u[e].disabled&&1==u[e].yAxis&&"line"==u[e].type})),w.width(z).height(R).interpolate(h).color(ee.filter(function(t,e){return!u[e].disabled&&2==u[e].yAxis&&"line"==u[e].type})),$.width(z).height(R).color(ee.filter(function(t,e){return!u[e].disabled&&1==u[e].yAxis&&"scatter"==u[e].type})),k.width(z).height(R).color(ee.filter(function(t,e){return!u[e].disabled&&2==u[e].yAxis&&"scatter"==u[e].type})),_.width(z).height(R).color(ee.filter(function(t,e){return!u[e].disabled&&1==u[e].yAxis&&"bar"==u[e].type})),C.width(z).height(R).color(ee.filter(function(t,e){return!u[e].disabled&&2==u[e].yAxis&&"bar"==u[e].type})),M.width(z).height(R).interpolate(h).color(ee.filter(function(t,e){return!u[e].disabled&&1==u[e].yAxis&&"area"==u[e].type})),D.width(z).height(R).interpolate(h).color(ee.filter(function(t,e){return!u[e].disabled&&2==u[e].yAxis&&"area"==u[e].type})),te.attr("transform","translate("+r.left+","+r.top+")");var re=te.select(".lines1Wrap").datum(j.filter(function(t){return!t.disabled})),oe=te.select(".scatters1Wrap").datum(V.filter(function(t){return!t.disabled})),ae=te.select(".bars1Wrap").datum(U.filter(function(t){return!t.disabled})),se=te.select(".stack1Wrap").datum(G.filter(function(t){return!t.disabled})),le=te.select(".lines2Wrap").datum(q.filter(function(t){return!t.disabled})),ue=te.select(".scatters2Wrap").datum(B.filter(function(t){return!t.disabled})),ce=te.select(".bars2Wrap").datum(Y.filter(function(t){return!t.disabled})),de=te.select(".stack2Wrap").datum(X.filter(function(t){return!t.disabled})),he=G.length?G.map(function(t){return t.values}).reduce(function(t,e){return t.map(function(t,n){return{x:t.x,y:t.y+e[n].y}})}).concat([{x:0,y:0}]):[],fe=X.length?X.map(function(t){return t.values}).reduce(function(t,e){return t.map(function(t,n){return{x:t.x,y:t.y+e[n].y}})}).concat([{x:0,y:0}]):[];y.domain(n||d3.extent(d3.merge(K).concat(he),function(t){return t.y})).range([0,R]),b.domain(i||d3.extent(d3.merge(Z).concat(fe),function(t){return t.y})).range([0,R]),x.yDomain(y.domain()),$.yDomain(y.domain()),_.yDomain(y.domain()),M.yDomain(y.domain()),w.yDomain(b.domain()),k.yDomain(b.domain()),C.yDomain(b.domain()),D.yDomain(b.domain()),G.length&&d3.transition(se).call(M),X.length&&d3.transition(de).call(D),U.length&&d3.transition(ae).call(_),Y.length&&d3.transition(ce).call(C),j.length&&d3.transition(re).call(x),q.length&&d3.transition(le).call(w),V.length&&d3.transition(oe).call($),B.length&&d3.transition(ue).call(k),S._ticks(t.utils.calcTicksX(z/100,u)).tickSize(-R,0),te.select(".nv-x.nv-axis").attr("transform","translate(0,"+R+")"),d3.transition(te.select(".nv-x.nv-axis")).call(S),T._ticks(t.utils.calcTicksY(R/36,u)).tickSize(-z,0),d3.transition(te.select(".nv-y1.nv-axis")).call(T),A._ticks(t.utils.calcTicksY(R/36,u)).tickSize(-z,0),d3.transition(te.select(".nv-y2.nv-axis")).call(A),te.select(".nv-y1.nv-axis").classed("nv-disabled",K.length?!1:!0).attr("transform","translate("+v.range()[0]+",0)"),te.select(".nv-y2.nv-axis").classed("nv-disabled",Z.length?!1:!0).attr("transform","translate("+v.range()[1]+",0)"),E.dispatch.on("stateChange",function(){e.update()}),g&&(p.width(z).height(R).margin({left:r.left,top:r.top}).svgContainer(L).xScale(v),Q.select(".nv-interactive").call(p)),g?(p.dispatch.on("elementMousemove",function(n){F();var i,r,a,s=[];u.filter(function(t,e){return t.seriesIndex=e,!t.disabled}).forEach(function(l,u){var c=v.domain(),d=l.values.filter(function(t,n){return e.x()(t,n)>=c[0]&&e.x()(t,n)<=c[1]});r=t.interactiveBisect(d,n.pointXValue,e.x());var h=d[r],f=e.y()(h,r);null!==f&&W(u,r,!0),void 0!==h&&(void 0===i&&(i=h),void 0===a&&(a=v(e.x()(h,r))),s.push({key:l.key,value:f,color:o(l,l.seriesIndex),data:h,yAxis:2==l.yAxis?A:T}))}),p.tooltip.chartContainer(e.container.parentNode).headerFormatter(function(t,e){return S.tickFormat()(t,e)}).valueFormatter(function(t,e){var n=s[e].yAxis;return null===t?"N/A":n.tickFormat()(t)}).data({value:e.x()(i,r),index:r,series:s})(),p.renderGuideLine(a)}),p.dispatch.on("elementMouseout",function(){F()})):(x.dispatch.on("elementMouseover.tooltip",f),w.dispatch.on("elementMouseover.tooltip",f),x.dispatch.on("elementMouseout.tooltip",function(){O.hidden(!0)}),w.dispatch.on("elementMouseout.tooltip",function(){O.hidden(!0)}),$.dispatch.on("elementMouseover.tooltip",N),k.dispatch.on("elementMouseover.tooltip",N),$.dispatch.on("elementMouseout.tooltip",function(){O.hidden(!0)}),k.dispatch.on("elementMouseout.tooltip",function(){O.hidden(!0)}),M.dispatch.on("elementMouseover.tooltip",P),D.dispatch.on("elementMouseover.tooltip",P),M.dispatch.on("elementMouseout.tooltip",function(){O.hidden(!0)}),D.dispatch.on("elementMouseout.tooltip",function(){O.hidden(!0)}),_.dispatch.on("elementMouseover.tooltip",H),C.dispatch.on("elementMouseover.tooltip",H),_.dispatch.on("elementMouseout.tooltip",function(){O.hidden(!0)}),C.dispatch.on("elementMouseout.tooltip",function(){O.hidden(!0)}),_.dispatch.on("elementMousemove.tooltip",function(){O()}),C.dispatch.on("elementMousemove.tooltip",function(){O()}))}),e}var n,i,r={top:30,right:20,bottom:50,left:60},o=t.utils.defaultColor(),a=null,s=null,l=!0,u=null,c=function(t){return t.x},d=function(t){return t.y},h="linear",f=!0,p=t.interactiveGuideline(),g=!1,m=" (right axis)",v=d3.scale.linear(),y=d3.scale.linear(),b=d3.scale.linear(),x=t.models.line().yScale(y),w=t.models.line().yScale(b),$=t.models.scatter().yScale(y),k=t.models.scatter().yScale(b),_=t.models.multiBar().stacked(!1).yScale(y),C=t.models.multiBar().stacked(!1).yScale(b),M=t.models.stackedArea().yScale(y),D=t.models.stackedArea().yScale(b),S=t.models.axis().scale(v).orient("bottom").tickPadding(5),T=t.models.axis().scale(y).orient("left"),A=t.models.axis().scale(b).orient("right"),E=t.models.legend().height(30),O=t.models.tooltip(),N=d3.dispatch(),I=[x,w,$,k,_,C,M,D];return e.dispatch=N,e.legend=E,e.lines1=x,e.lines2=w,e.scatters1=$,e.scatters2=k,e.bars1=_,e.bars2=C,e.stack1=M,e.stack2=D,e.xAxis=S,e.yAxis1=T,e.yAxis2=A,e.tooltip=O,e.interactiveLayer=p,e.options=t.utils.optionsFunc.bind(e),e._options=Object.create({},{width:{get:function(){return a},set:function(t){a=t}},height:{get:function(){return s},set:function(t){s=t}},showLegend:{get:function(){return l},set:function(t){l=t}},yDomain1:{get:function(){return n},set:function(t){n=t}},yDomain2:{get:function(){return i},set:function(t){i=t}},noData:{get:function(){return u},set:function(t){u=t}},interpolate:{get:function(){return h},set:function(t){h=t}},legendRightAxisHint:{get:function(){return m},set:function(t){m=t}},margin:{get:function(){return r},set:function(t){r.top=void 0!==t.top?t.top:r.top,r.right=void 0!==t.right?t.right:r.right,r.bottom=void 0!==t.bottom?t.bottom:r.bottom,r.left=void 0!==t.left?t.left:r.left}},color:{get:function(){return o},set:function(e){o=t.utils.getColor(e)}},x:{get:function(){return c},set:function(t){c=t,x.x(t),w.x(t),$.x(t),k.x(t),_.x(t),C.x(t),M.x(t),D.x(t)}},y:{get:function(){return d},set:function(t){d=t,x.y(t),w.y(t),$.y(t),k.y(t),M.y(t),D.y(t),_.y(t),C.y(t)}},useVoronoi:{get:function(){return f},set:function(t){f=t,x.useVoronoi(t),w.useVoronoi(t),M.useVoronoi(t),D.useVoronoi(t)}},useInteractiveGuideline:{get:function(){return g},set:function(t){g=t,g&&(x.interactive(!1),x.useVoronoi(!1),w.interactive(!1),w.useVoronoi(!1),M.interactive(!1),M.useVoronoi(!1),D.interactive(!1),D.useVoronoi(!1),$.interactive(!1),k.interactive(!1))}}}),t.utils.initOptions(e),e},t.models.ohlcBar=function(){"use strict";function e(_){return _.each(function(e){c=d3.select(this);var _=t.utils.availableWidth(s,c,a),M=t.utils.availableHeight(l,c,a);t.utils.initSVG(c);var D=_/e[0].values.length*.9;d.domain(n||d3.extent(e[0].values.map(f).concat(b))),d.range(w?r||[.5*_/e[0].values.length,_*(e[0].values.length-.5)/e[0].values.length]:r||[5+D/2,_-D/2-5]),h.domain(i||[d3.min(e[0].values.map(y).concat(x)),d3.max(e[0].values.map(v).concat(x))]).range(o||[M,0]),d.domain()[0]===d.domain()[1]&&d.domain(d.domain()[0]?[d.domain()[0]-.01*d.domain()[0],d.domain()[1]+.01*d.domain()[1]]:[-1,1]),h.domain()[0]===h.domain()[1]&&h.domain(h.domain()[0]?[h.domain()[0]+.01*h.domain()[0],h.domain()[1]-.01*h.domain()[1]]:[-1,1]);var S=d3.select(this).selectAll("g.nv-wrap.nv-ohlcBar").data([e[0].values]),T=S.enter().append("g").attr("class","nvd3 nv-wrap nv-ohlcBar"),A=T.append("defs"),E=T.append("g"),O=S.select("g");E.append("g").attr("class","nv-ticks"),S.attr("transform","translate("+a.left+","+a.top+")"),c.on("click",function(t,e){C.chartClick({data:t,index:e,pos:d3.event,id:u})}),A.append("clipPath").attr("id","nv-chart-clip-path-"+u).append("rect"),S.select("#nv-chart-clip-path-"+u+" rect").attr("width",_).attr("height",M),O.attr("clip-path",$?"url(#nv-chart-clip-path-"+u+")":"");var N=S.select(".nv-ticks").selectAll(".nv-tick").data(function(t){return t});N.exit().remove(),N.enter().append("path").attr("class",function(t,e,n){return(g(t,e)>m(t,e)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+n+"-"+e}).attr("d",function(t,e){return"m0,0l0,"+(h(g(t,e))-h(v(t,e)))+"l"+-D/2+",0l"+D/2+",0l0,"+(h(y(t,e))-h(g(t,e)))+"l0,"+(h(m(t,e))-h(y(t,e)))+"l"+D/2+",0l"+-D/2+",0z"}).attr("transform",function(t,e){return"translate("+d(f(t,e))+","+h(v(t,e))+")"}).attr("fill",function(){return k[0]}).attr("stroke",function(){return k[0]}).attr("x",0).attr("y",function(t,e){return h(Math.max(0,p(t,e)))}).attr("height",function(t,e){return Math.abs(h(p(t,e))-h(0))}),N.attr("class",function(t,e,n){return(g(t,e)>m(t,e)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+n+"-"+e}),d3.transition(N).attr("transform",function(t,e){return"translate("+d(f(t,e))+","+h(v(t,e))+")"}).attr("d",function(t,n){var i=_/e[0].values.length*.9;return"m0,0l0,"+(h(g(t,n))-h(v(t,n)))+"l"+-i/2+",0l"+i/2+",0l0,"+(h(y(t,n))-h(g(t,n)))+"l0,"+(h(m(t,n))-h(y(t,n)))+"l"+i/2+",0l"+-i/2+",0z"})}),e}var n,i,r,o,a={top:0,right:0,bottom:0,left:0},s=null,l=null,u=Math.floor(1e4*Math.random()),c=null,d=d3.scale.linear(),h=d3.scale.linear(),f=function(t){return t.x},p=function(t){return t.y},g=function(t){return t.open},m=function(t){return t.close},v=function(t){return t.high},y=function(t){return t.low},b=[],x=[],w=!1,$=!0,k=t.utils.defaultColor(),_=!1,C=d3.dispatch("stateChange","changeState","renderEnd","chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove");return e.highlightPoint=function(t,n){e.clearHighlights(),c.select(".nv-ohlcBar .nv-tick-0-"+t).classed("hover",n)},e.clearHighlights=function(){c.select(".nv-ohlcBar .nv-tick.hover").classed("hover",!1)},e.dispatch=C,e.options=t.utils.optionsFunc.bind(e),e._options=Object.create({},{width:{get:function(){return s},set:function(t){s=t}},height:{get:function(){return l},set:function(t){l=t}},xScale:{get:function(){return d},set:function(t){d=t}},yScale:{get:function(){return h},set:function(t){h=t}},xDomain:{get:function(){return n},set:function(t){n=t}},yDomain:{get:function(){return i},set:function(t){i=t}},xRange:{get:function(){return r},set:function(t){r=t}},yRange:{get:function(){return o},set:function(t){o=t}},forceX:{get:function(){return b},set:function(t){b=t}},forceY:{get:function(){return x},set:function(t){x=t}},padData:{get:function(){return w},set:function(t){w=t}},clipEdge:{get:function(){return $},set:function(t){$=t}},id:{get:function(){return u},set:function(t){u=t}},interactive:{get:function(){return _},set:function(t){_=t}},x:{get:function(){return f},set:function(t){f=t}},y:{get:function(){return p},set:function(t){p=t}},open:{get:function(){return g()},set:function(t){g=t}},close:{get:function(){return m()},set:function(t){m=t}},high:{get:function(){return v},set:function(t){v=t}},low:{get:function(){return y},set:function(t){y=t}},margin:{get:function(){return a},set:function(t){a.top=void 0!=t.top?t.top:a.top,a.right=void 0!=t.right?t.right:a.right,a.bottom=void 0!=t.bottom?t.bottom:a.bottom,a.left=void 0!=t.left?t.left:a.left
}},color:{get:function(){return k},set:function(e){k=t.utils.getColor(e)}}}),t.utils.initOptions(e),e},t.models.parallelCoordinates=function(){"use strict";function e(D){return M.reset(),D.each(function(e){function M(t){return k(p.map(function(e){if(isNaN(t.values[e.key])||isNaN(parseFloat(t.values[e.key]))||z){var n=d[e.key].domain(),i=d[e.key].range(),r=n[0]-(n[1]-n[0])/9;if(w.indexOf(e.key)<0){var o=d3.scale.linear().domain([r,n[1]]).range([u-12,i[1]]);d[e.key].brush.y(o),w.push(e.key)}if(isNaN(t.values[e.key])||isNaN(parseFloat(t.values[e.key])))return[c(e.key),d[e.key](r)]}return void 0!==U&&(w.length>0||z?(U.style("display","inline"),Y.style("display","inline")):(U.style("display","none"),Y.style("display","none"))),[c(e.key),d[e.key](t.values[e.key])]}))}function D(t){y.forEach(function(e){var n=d[e.dimension].brush.y().domain();e.hasOnlyNaN&&(e.extent[1]=(d[e.dimension].domain()[1]-n[0])*(e.extent[1]-e.extent[0])/(L[e.dimension]-e.extent[0])+n[0]),e.hasNaN&&(e.extent[0]=n[0]),t&&d[e.dimension].brush.extent(e.extent)}),r.select(".nv-brushBackground").each(function(t){d3.select(this).call(d[t.key].brush)}).selectAll("rect").attr("x",-8).attr("width",16),E()}function S(){m===!1&&(m=!0,D(!0))}function T(){Q=g.filter(function(t){return!d[t].brush.empty()}),J=Q.map(function(t){return d[t].brush.extent()}),y=[],Q.forEach(function(t,e){y[e]={dimension:t,extent:J[e],hasNaN:!1,hasOnlyNaN:!1}}),b=[],n.style("display",function(t){var e=Q.every(function(e,n){return(isNaN(t.values[e])||isNaN(parseFloat(t.values[e])))&&J[n][0]==d[e].brush.y().domain()[0]?!0:J[n][0]<=t.values[e]&&t.values[e]<=J[n][1]&&!isNaN(parseFloat(t.values[e]))});return e&&b.push(t),e?null:"none"}),E(),C.brush({filters:y,active:b})}function A(){var t=Q.length>0?!0:!1;y.forEach(function(t){t.extent[0]===d[t.dimension].brush.y().domain()[0]&&w.indexOf(t.dimension)>=0&&(t.hasNaN=!0),t.extent[1]<d[t.dimension].domain()[0]&&(t.hasOnlyNaN=!0)}),C.brushEnd(b,t)}function E(){r.select(".nv-axis").each(function(t){var e=y.filter(function(e){return e.dimension==t.key});R[t.key]=d[t.key].domain(),0!=e.length&&m&&(R[t.key]=[],e[0].extent[1]>d[t.key].domain()[0]&&(R[t.key]=[e[0].extent[1]]),e[0].extent[0]>=d[t.key].domain()[0]&&R[t.key].push(e[0].extent[0])),d3.select(this).call(_.scale(d[t.key]).tickFormat(t.format).tickValues(R[t.key]))})}function O(t){x[t.key]=this.parentNode.__origin__=c(t.key),i.attr("visibility","hidden")}function N(t){x[t.key]=Math.min(l,Math.max(0,this.parentNode.__origin__+=d3.event.x)),n.attr("d",M),p.sort(function(t,e){return P(t.key)-P(e.key)}),p.forEach(function(t,e){return t.currentPosition=e}),c.domain(p.map(function(t){return t.key})),r.attr("transform",function(t){return"translate("+P(t.key)+")"})}function I(t){delete this.parentNode.__origin__,delete x[t.key],d3.select(this.parentNode).attr("transform","translate("+c(t.key)+")"),n.attr("d",M),i.attr("d",M).attr("visibility",null),C.dimensionsOrder(p)}function P(t){var e=x[t];return null==e?c(t):e}var H=d3.select(this);if(l=t.utils.availableWidth(a,H,o),u=t.utils.availableHeight(s,H,o),t.utils.initSVG(H),void 0===e[0].values){var F=[];e.forEach(function(t){var e={},n=Object.keys(t);n.forEach(function(n){"name"!==n&&(e[n]=t[n])}),F.push({key:t.name,values:e})}),e=F}var W=e.map(function(t){return t.values});0===b.length&&(b=e),g=f.sort(function(t,e){return t.currentPosition-e.currentPosition}).map(function(t){return t.key}),p=f.filter(function(t){return!t.disabled}),c.rangePoints([0,l],1).domain(p.map(function(t){return t.key}));var L={},z=!1,R=[];g.forEach(function(t){var e=d3.extent(W,function(e){return+e[t]}),n=e[0],i=e[1],r=!1;(isNaN(n)||isNaN(i))&&(r=!0,n=0,i=0),n===i&&(n-=1,i+=1);var o=y.filter(function(e){return e.dimension==t});0!==o.length&&(r?(n=d[t].domain()[0],i=d[t].domain()[1]):!o[0].hasOnlyNaN&&m?(n=n>o[0].extent[0]?o[0].extent[0]:n,i=i<o[0].extent[1]?o[0].extent[1]:i):o[0].hasNaN&&(i=i<o[0].extent[1]?o[0].extent[1]:i,L[t]=d[t].domain()[1],z=!0)),d[t]=d3.scale.linear().domain([n,i]).range([.9*(u-12),0]),w=[],d[t].brush=d3.svg.brush().y(d[t]).on("brushstart",S).on("brush",T).on("brushend",A)});var j=H.selectAll("g.nv-wrap.nv-parallelCoordinates").data([e]),q=j.enter().append("g").attr("class","nvd3 nv-wrap nv-parallelCoordinates"),V=q.append("g"),B=j.select("g");V.append("g").attr("class","nv-parallelCoordinates background"),V.append("g").attr("class","nv-parallelCoordinates foreground"),V.append("g").attr("class","nv-parallelCoordinates missingValuesline"),j.attr("transform","translate("+o.left+","+o.top+")"),k.interpolate("cardinal").tension($),_.orient("left");var U,Y,G=d3.behavior.drag().on("dragstart",O).on("drag",N).on("dragend",I),X=c.range()[1]-c.range()[0];if(!isNaN(X)){var K=[0+X/2,u-12,l-X/2,u-12];U=j.select(".missingValuesline").selectAll("line").data([K]),U.enter().append("line"),U.exit().remove(),U.attr("x1",function(t){return t[0]}).attr("y1",function(t){return t[1]}).attr("x2",function(t){return t[2]}).attr("y2",function(t){return t[3]}),Y=j.select(".missingValuesline").selectAll("text").data([h]),Y.append("text").data([h]),Y.enter().append("text"),Y.exit().remove(),Y.attr("y",u).attr("x",l-92-X/2).text(function(t){return t})}i=j.select(".background").selectAll("path").data(e),i.enter().append("path"),i.exit().remove(),i.attr("d",M),n=j.select(".foreground").selectAll("path").data(e),n.enter().append("path"),n.exit().remove(),n.attr("d",M).style("stroke-width",function(t){return isNaN(t.strokeWidth)&&(t.strokeWidth=1),t.strokeWidth}).attr("stroke",function(t,e){return t.color||v(t,e)}),n.on("mouseover",function(t,e){d3.select(this).classed("hover",!0).style("stroke-width",t.strokeWidth+2+"px").style("stroke-opacity",1),C.elementMouseover({label:t.name,color:t.color||v(t,e),values:t.values,dimensions:p})}),n.on("mouseout",function(t,e){d3.select(this).classed("hover",!1).style("stroke-width",t.strokeWidth+"px").style("stroke-opacity",.7),C.elementMouseout({label:t.name,index:e})}),n.on("mousemove",function(){C.elementMousemove()}),n.on("click",function(t){C.elementClick({id:t.id})}),r=B.selectAll(".dimension").data(p);var Z=r.enter().append("g").attr("class","nv-parallelCoordinates dimension");r.attr("transform",function(t){return"translate("+c(t.key)+",0)"}),Z.append("g").attr("class","nv-axis"),Z.append("text").attr("class","nv-label").style("cursor","move").attr("dy","-1em").attr("text-anchor","middle").on("mouseover",function(t){C.elementMouseover({label:t.tooltip||t.key,color:t.color})}).on("mouseout",function(t){C.elementMouseout({label:t.tooltip})}).on("mousemove",function(){C.elementMousemove()}).call(G),Z.append("g").attr("class","nv-brushBackground"),r.exit().remove(),r.select(".nv-label").text(function(t){return t.key}),D(m);var Q=g.filter(function(t){return!d[t].brush.empty()}),J=Q.map(function(t){return d[t].brush.extent()}),te=b.slice(0);b=[],n.style("display",function(t){var e=Q.every(function(e,n){return(isNaN(t.values[e])||isNaN(parseFloat(t.values[e])))&&J[n][0]==d[e].brush.y().domain()[0]?!0:J[n][0]<=t.values[e]&&t.values[e]<=J[n][1]&&!isNaN(parseFloat(t.values[e]))});return e&&b.push(t),e?null:"none"}),(y.length>0||!t.utils.arrayEquals(b,te))&&C.activeChanged(b)}),e}var n,i,r,o={top:30,right:0,bottom:10,left:0},a=null,s=null,l=null,u=null,c=d3.scale.ordinal(),d={},h="undefined values",f=[],p=[],g=[],m=!0,v=t.utils.defaultColor(),y=[],b=[],x=[],w=[],$=1,k=d3.svg.line(),_=d3.svg.axis(),C=d3.dispatch("brushstart","brush","brushEnd","dimensionsOrder","stateChange","elementClick","elementMouseover","elementMouseout","elementMousemove","renderEnd","activeChanged"),M=t.utils.renderWatch(C);return e.dispatch=C,e.options=t.utils.optionsFunc.bind(e),e._options=Object.create({},{width:{get:function(){return a},set:function(t){a=t}},height:{get:function(){return s},set:function(t){s=t}},dimensionData:{get:function(){return f},set:function(t){f=t}},displayBrush:{get:function(){return m},set:function(t){m=t}},filters:{get:function(){return y},set:function(t){y=t}},active:{get:function(){return b},set:function(t){b=t}},lineTension:{get:function(){return $},set:function(t){$=t}},undefinedValuesLabel:{get:function(){return h},set:function(t){h=t}},dimensions:{get:function(){return f.map(function(t){return t.key})},set:function(e){t.deprecated("dimensions","use dimensionData instead"),e.forEach(0===f.length?function(t){f.push({key:t})}:function(t,e){f[e].key=t})}},dimensionNames:{get:function(){return f.map(function(t){return t.key})},set:function(e){t.deprecated("dimensionNames","use dimensionData instead"),g=[],e.forEach(0===f.length?function(t){f.push({key:t})}:function(t,e){f[e].key=t})}},dimensionFormats:{get:function(){return f.map(function(t){return t.format})},set:function(e){t.deprecated("dimensionFormats","use dimensionData instead"),e.forEach(0===f.length?function(t){f.push({format:t})}:function(t,e){f[e].format=t})}},margin:{get:function(){return o},set:function(t){o.top=void 0!==t.top?t.top:o.top,o.right=void 0!==t.right?t.right:o.right,o.bottom=void 0!==t.bottom?t.bottom:o.bottom,o.left=void 0!==t.left?t.left:o.left}},color:{get:function(){return v},set:function(e){v=t.utils.getColor(e)}}}),t.utils.initOptions(e),e},t.models.parallelCoordinatesChart=function(){"use strict";function e(r){return v.reset(),v.models(n),r.each(function(r){var u=d3.select(this);t.utils.initSVG(u);var p=t.utils.availableWidth(a,u,o),g=t.utils.availableHeight(s,u,o);if(e.update=function(){u.call(e)},e.container=this,c.setter(b(d),e.update).getter(y(d)).update(),c.disabled=d.map(function(t){return!!t.disabled}),d=d.map(function(t){return t.disabled=!!t.disabled,t}),d.forEach(function(t,e){t.originalPosition=isNaN(t.originalPosition)?e:t.originalPosition,t.currentPosition=isNaN(t.currentPosition)?e:t.currentPosition}),!f){var v;f={};for(v in c)f[v]=c[v]instanceof Array?c[v].slice(0):c[v]}if(!r||!r.length)return t.utils.noData(e,u),e;u.selectAll(".nv-noData").remove();var x=u.selectAll("g.nv-wrap.nv-parallelCoordinatesChart").data([r]),w=x.enter().append("g").attr("class","nvd3 nv-wrap nv-parallelCoordinatesChart").append("g"),$=x.select("g");w.append("g").attr("class","nv-parallelCoordinatesWrap"),w.append("g").attr("class","nv-legendWrap"),$.select("rect").attr("width",p).attr("height",g>0?g:0),l?(i.width(p).color(function(){return"rgb(188,190,192)"}),$.select(".nv-legendWrap").datum(d.sort(function(t,e){return t.originalPosition-e.originalPosition})).call(i),o.top!=i.height()&&(o.top=i.height(),g=t.utils.availableHeight(s,u,o)),x.select(".nv-legendWrap").attr("transform","translate( 0 ,"+-o.top+")")):$.select(".nv-legendWrap").selectAll("*").remove(),x.attr("transform","translate("+o.left+","+o.top+")"),n.width(p).height(g).dimensionData(d).displayBrush(h);var k=$.select(".nv-parallelCoordinatesWrap ").datum(r);k.transition().call(n),n.dispatch.on("brushEnd",function(t,e){e?(h=!0,m.brushEnd(t)):h=!1}),i.dispatch.on("stateChange",function(t){for(var n in t)c[n]=t[n];m.stateChange(c),e.update()}),n.dispatch.on("dimensionsOrder",function(){d.sort(function(t,e){return t.currentPosition-e.currentPosition});var t=!1;d.forEach(function(e,n){e.currentPosition=n,e.currentPosition!==e.originalPosition&&(t=!0)}),m.dimensionsOrder(d,t)}),m.on("changeState",function(t){"undefined"!=typeof t.disabled&&(d.forEach(function(e,n){e.disabled=t.disabled[n]}),c.disabled=t.disabled),e.update()})}),v.renderEnd("parraleleCoordinateChart immediate"),e}var n=t.models.parallelCoordinates(),i=t.models.legend(),r=t.models.tooltip(),o=(t.models.tooltip(),{top:0,right:0,bottom:0,left:0}),a=null,s=null,l=!0,u=t.utils.defaultColor(),c=t.utils.state(),d=[],h=!0,f=null,p=null,g="undefined",m=d3.dispatch("dimensionsOrder","brushEnd","stateChange","changeState","renderEnd"),v=t.utils.renderWatch(m),y=function(t){return function(){return{active:t.map(function(t){return!t.disabled})}}},b=function(t){return function(e){void 0!==e.active&&t.forEach(function(t,n){t.disabled=!e.active[n]})}};return r.contentGenerator(function(t){var e='<table><thead><tr><td class="legend-color-guide"><div style="background-color:'+t.color+'"></div></td><td><strong>'+t.key+"</strong></td></tr></thead>";return 0!==t.series.length&&(e+='<tbody><tr><td height ="10px"></td></tr>',t.series.forEach(function(t){e=e+'<tr><td class="legend-color-guide"><div style="background-color:'+t.color+'"></div></td><td class="key">'+t.key+'</td><td class="value">'+t.value+"</td></tr>"}),e+="</tbody>"),e+="</table>"}),n.dispatch.on("elementMouseover.tooltip",function(t){var e={key:t.label,color:t.color,series:[]};t.values&&(Object.keys(t.values).forEach(function(n){var i=t.dimensions.filter(function(t){return t.key===n})[0];if(i){var r;r=isNaN(t.values[n])||isNaN(parseFloat(t.values[n]))?g:i.format(t.values[n]),e.series.push({idx:i.currentPosition,key:n,value:r,color:i.color})}}),e.series.sort(function(t,e){return t.idx-e.idx})),r.data(e).hidden(!1)}),n.dispatch.on("elementMouseout.tooltip",function(){r.hidden(!0)}),n.dispatch.on("elementMousemove.tooltip",function(){r()}),e.dispatch=m,e.parallelCoordinates=n,e.legend=i,e.tooltip=r,e.options=t.utils.optionsFunc.bind(e),e._options=Object.create({},{width:{get:function(){return a},set:function(t){a=t}},height:{get:function(){return s},set:function(t){s=t}},showLegend:{get:function(){return l},set:function(t){l=t}},defaultState:{get:function(){return f},set:function(t){f=t}},dimensionData:{get:function(){return d},set:function(t){d=t}},displayBrush:{get:function(){return h},set:function(t){h=t}},noData:{get:function(){return p},set:function(t){p=t}},nanValue:{get:function(){return g},set:function(t){g=t}},margin:{get:function(){return o},set:function(t){o.top=void 0!==t.top?t.top:o.top,o.right=void 0!==t.right?t.right:o.right,o.bottom=void 0!==t.bottom?t.bottom:o.bottom,o.left=void 0!==t.left?t.left:o.left}},color:{get:function(){return u},set:function(e){u=t.utils.getColor(e),i.color(u),n.color(u)}}}),t.utils.inheritOptions(e,n),t.utils.initOptions(e),e},t.models.pie=function(){"use strict";function e(A){return T.reset(),A.each(function(e){function A(t,e){t.endAngle=isNaN(t.endAngle)?0:t.endAngle,t.startAngle=isNaN(t.startAngle)?0:t.startAngle,g||(t.innerRadius=0);var n=d3.interpolate(this._current,t);return this._current=n(0),function(t){return D[e](n(t))}}var E=i-n.left-n.right,O=r-n.top-n.bottom,N=Math.min(E,O)/2,I=[],P=[];if(l=d3.select(this),0===C.length)for(var H=N-N/5,F=_*N,W=0;W<e[0].length;W++)I.push(H),P.push(F);else v?(I=C.map(function(t){return(t.outer-t.outer/5)*N}),P=C.map(function(t){return(t.inner-t.inner/5)*N}),_=d3.min(C.map(function(t){return t.inner-t.inner/5}))):(I=C.map(function(t){return t.outer*N}),P=C.map(function(t){return t.inner*N}),_=d3.min(C.map(function(t){return t.inner})));t.utils.initSVG(l);var L=l.selectAll(".nv-wrap.nv-pie").data(e),z=L.enter().append("g").attr("class","nvd3 nv-wrap nv-pie nv-chart-"+s),R=z.append("g"),j=L.select("g"),q=R.append("g").attr("class","nv-pie");R.append("g").attr("class","nv-pieLabels"),L.attr("transform","translate("+n.left+","+n.top+")"),j.select(".nv-pie").attr("transform","translate("+E/2+","+O/2+")"),j.select(".nv-pieLabels").attr("transform","translate("+E/2+","+O/2+")"),l.on("click",function(t,e){M.chartClick({data:t,index:e,pos:d3.event,id:s})}),D=[],S=[];for(var W=0;W<e[0].length;W++){var V=d3.svg.arc().outerRadius(I[W]),B=d3.svg.arc().outerRadius(I[W]+5);x!==!1&&(V.startAngle(x),B.startAngle(x)),$!==!1&&(V.endAngle($),B.endAngle($)),g&&(V.innerRadius(P[W]),B.innerRadius(P[W])),V.cornerRadius&&k&&(V.cornerRadius(k),B.cornerRadius(k)),D.push(V),S.push(B)}var U=d3.layout.pie().sort(null).value(function(t){return t.disabled?0:a(t)});U.padAngle&&w&&U.padAngle(w),g&&m&&(q.append("text").attr("class","nv-pie-title"),L.select(".nv-pie-title").style("text-anchor","middle").text(function(){return m}).style("font-size",Math.min(E,O)*_*2/(m.length+2)+"px").attr("dy","0.35em").attr("transform",function(){return"translate(0, "+y+")"}));var Y=L.select(".nv-pie").selectAll(".nv-slice").data(U),G=L.select(".nv-pieLabels").selectAll(".nv-label").data(U);Y.exit().remove(),G.exit().remove();var X=Y.enter().append("g");X.attr("class","nv-slice"),X.on("mouseover",function(t,e){d3.select(this).classed("hover",!0),v&&d3.select(this).select("path").transition().duration(70).attr("d",S[e]),M.elementMouseover({data:t.data,index:e,color:d3.select(this).style("fill"),percent:(t.endAngle-t.startAngle)/(2*Math.PI)})}),X.on("mouseout",function(t,e){d3.select(this).classed("hover",!1),v&&d3.select(this).select("path").transition().duration(50).attr("d",D[e]),M.elementMouseout({data:t.data,index:e})}),X.on("mousemove",function(t,e){M.elementMousemove({data:t.data,index:e})}),X.on("click",function(t,e){var n=this;M.elementClick({data:t.data,index:e,color:d3.select(this).style("fill"),event:d3.event,element:n})}),X.on("dblclick",function(t,e){M.elementDblClick({data:t.data,index:e,color:d3.select(this).style("fill")})}),Y.attr("fill",function(t,e){return u(t.data,e)}),Y.attr("stroke",function(t,e){return u(t.data,e)});X.append("path").each(function(t){this._current=t});if(Y.select("path").transition().attr("d",function(t,e){return D[e](t)}).attrTween("d",A),d){for(var K=[],W=0;W<e[0].length;W++)K.push(D[W]),h?g&&(K[W]=d3.svg.arc().outerRadius(D[W].outerRadius()),x!==!1&&K[W].startAngle(x),$!==!1&&K[W].endAngle($)):g||K[W].innerRadius(0);G.enter().append("g").classed("nv-label",!0).each(function(t){var e=d3.select(this);e.attr("transform",function(t,e){if(b){t.outerRadius=I[e]+10,t.innerRadius=I[e]+15;var n=(t.startAngle+t.endAngle)/2*(180/Math.PI);return(t.startAngle+t.endAngle)/2<Math.PI?n-=90:n+=90,"translate("+K[e].centroid(t)+") rotate("+n+")"}return t.outerRadius=N+10,t.innerRadius=N+15,"translate("+K[e].centroid(t)+")"}),e.append("rect").style("stroke","#fff").style("fill","#fff").attr("rx",3).attr("ry",3),e.append("text").style("text-anchor",b?(t.startAngle+t.endAngle)/2<Math.PI?"start":"end":"middle").style("fill","#000")});var Z={},Q=14,J=140,te=function(t){return Math.floor(t[0]/J)*J+","+Math.floor(t[1]/Q)*Q},ee=function(t){return(t.endAngle-t.startAngle)/(2*Math.PI)};G.watchTransition(T,"pie labels").attr("transform",function(t,e){if(b){t.outerRadius=I[e]+10,t.innerRadius=I[e]+15;var n=(t.startAngle+t.endAngle)/2*(180/Math.PI);return(t.startAngle+t.endAngle)/2<Math.PI?n-=90:n+=90,"translate("+K[e].centroid(t)+") rotate("+n+")"}t.outerRadius=N+10,t.innerRadius=N+15;var i=K[e].centroid(t),r=ee(t);if(t.value&&r>=p){var o=te(i);Z[o]&&(i[1]-=Q),Z[te(i)]=!0}return"translate("+i+")"}),G.select(".nv-label text").style("text-anchor",function(t){return b?(t.startAngle+t.endAngle)/2<Math.PI?"start":"end":"middle"}).text(function(t,e){var n=ee(t),i="";if(!t.value||p>n)return"";if("function"==typeof f)i=f(t,e,{key:o(t.data),value:a(t.data),percent:c(n)});else switch(f){case"key":i=o(t.data);break;case"value":i=c(a(t.data));break;case"percent":i=d3.format("%")(n)}return i})}}),T.renderEnd("pie immediate"),e}var n={top:0,right:0,bottom:0,left:0},i=500,r=500,o=function(t){return t.x},a=function(t){return t.y},s=Math.floor(1e4*Math.random()),l=null,u=t.utils.defaultColor(),c=d3.format(",.2f"),d=!0,h=!1,f="key",p=.02,g=!1,m=!1,v=!0,y=0,b=!1,x=!1,w=!1,$=!1,k=0,_=.5,C=[],M=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),D=[],S=[],T=t.utils.renderWatch(M);return e.dispatch=M,e.options=t.utils.optionsFunc.bind(e),e._options=Object.create({},{arcsRadius:{get:function(){return C},set:function(t){C=t}},width:{get:function(){return i},set:function(t){i=t}},height:{get:function(){return r},set:function(t){r=t}},showLabels:{get:function(){return d},set:function(t){d=t}},title:{get:function(){return m},set:function(t){m=t}},titleOffset:{get:function(){return y},set:function(t){y=t}},labelThreshold:{get:function(){return p},set:function(t){p=t}},valueFormat:{get:function(){return c},set:function(t){c=t}},x:{get:function(){return o},set:function(t){o=t}},id:{get:function(){return s},set:function(t){s=t}},endAngle:{get:function(){return $},set:function(t){$=t}},startAngle:{get:function(){return x},set:function(t){x=t}},padAngle:{get:function(){return w},set:function(t){w=t}},cornerRadius:{get:function(){return k},set:function(t){k=t}},donutRatio:{get:function(){return _},set:function(t){_=t}},labelsOutside:{get:function(){return h},set:function(t){h=t}},labelSunbeamLayout:{get:function(){return b},set:function(t){b=t}},donut:{get:function(){return g},set:function(t){g=t}},growOnHover:{get:function(){return v},set:function(t){v=t}},pieLabelsOutside:{get:function(){return h},set:function(e){h=e,t.deprecated("pieLabelsOutside","use labelsOutside instead")}},donutLabelsOutside:{get:function(){return h},set:function(e){h=e,t.deprecated("donutLabelsOutside","use labelsOutside instead")}},labelFormat:{get:function(){return c},set:function(e){c=e,t.deprecated("labelFormat","use valueFormat instead")}},margin:{get:function(){return n},set:function(t){n.top="undefined"!=typeof t.top?t.top:n.top,n.right="undefined"!=typeof t.right?t.right:n.right,n.bottom="undefined"!=typeof t.bottom?t.bottom:n.bottom,n.left="undefined"!=typeof t.left?t.left:n.left}},y:{get:function(){return a},set:function(t){a=d3.functor(t)}},color:{get:function(){return u},set:function(e){u=t.utils.getColor(e)}},labelType:{get:function(){return f},set:function(t){f=t||"key"}}}),t.utils.initOptions(e),e},t.models.pieChart=function(){"use strict";function e(r){return v.reset(),v.models(n),r.each(function(r){var l=d3.select(this);t.utils.initSVG(l);var d=t.utils.availableWidth(a,l,o),p=t.utils.availableHeight(s,l,o);if(e.update=function(){l.transition().call(e)},e.container=this,h.setter(b(r),e.update).getter(y(r)).update(),h.disabled=r.map(function(t){return!!t.disabled}),!f){var g;f={};for(g in h)f[g]=h[g]instanceof Array?h[g].slice(0):h[g]}if(!r||!r.length)return t.utils.noData(e,l),e;l.selectAll(".nv-noData").remove();var v=l.selectAll("g.nv-wrap.nv-pieChart").data([r]),x=v.enter().append("g").attr("class","nvd3 nv-wrap nv-pieChart").append("g"),w=v.select("g");if(x.append("g").attr("class","nv-pieWrap"),x.append("g").attr("class","nv-legendWrap"),u){if("top"===c)i.width(d).key(n.x()),v.select(".nv-legendWrap").datum(r).call(i),o.top!=i.height()&&(o.top=i.height(),p=t.utils.availableHeight(s,l,o)),v.select(".nv-legendWrap").attr("transform","translate(0,"+-o.top+")");else if("right"===c){var $=t.models.legend().width();$>d/2&&($=d/2),i.height(p).key(n.x()),i.width($),d-=i.width(),v.select(".nv-legendWrap").datum(r).call(i).attr("transform","translate("+d+",0)")}}else w.select(".nv-legendWrap").selectAll("*").remove();v.attr("transform","translate("+o.left+","+o.top+")"),n.width(d).height(p);var k=w.select(".nv-pieWrap").datum([r]);d3.transition(k).call(n),i.dispatch.on("stateChange",function(t){for(var n in t)h[n]=t[n];m.stateChange(h),e.update()}),m.on("changeState",function(t){"undefined"!=typeof t.disabled&&(r.forEach(function(e,n){e.disabled=t.disabled[n]}),h.disabled=t.disabled),e.update()})}),v.renderEnd("pieChart immediate"),e}var n=t.models.pie(),i=t.models.legend(),r=t.models.tooltip(),o={top:30,right:20,bottom:20,left:20},a=null,s=null,l=!1,u=!0,c="top",d=t.utils.defaultColor(),h=t.utils.state(),f=null,p=null,g=250,m=d3.dispatch("stateChange","changeState","renderEnd");r.duration(0).headerEnabled(!1).valueFormatter(function(t,e){return n.valueFormat()(t,e)});var v=t.utils.renderWatch(m),y=function(t){return function(){return{active:t.map(function(t){return!t.disabled})}}},b=function(t){return function(e){void 0!==e.active&&t.forEach(function(t,n){t.disabled=!e.active[n]})}};return n.dispatch.on("elementMouseover.tooltip",function(t){t.series={key:e.x()(t.data),value:e.y()(t.data),color:t.color,percent:t.percent},l||(delete t.percent,delete t.series.percent),r.data(t).hidden(!1)}),n.dispatch.on("elementMouseout.tooltip",function(){r.hidden(!0)}),n.dispatch.on("elementMousemove.tooltip",function(){r()}),e.legend=i,e.dispatch=m,e.pie=n,e.tooltip=r,e.options=t.utils.optionsFunc.bind(e),e._options=Object.create({},{width:{get:function(){return a},set:function(t){a=t}},height:{get:function(){return s},set:function(t){s=t}},noData:{get:function(){return p},set:function(t){p=t}},showTooltipPercent:{get:function(){return l},set:function(t){l=t}},showLegend:{get:function(){return u},set:function(t){u=t}},legendPosition:{get:function(){return c},set:function(t){c=t}},defaultState:{get:function(){return f},set:function(t){f=t}},color:{get:function(){return d},set:function(t){d=t,i.color(d),n.color(d)}},duration:{get:function(){return g},set:function(t){g=t,v.reset(g)}},margin:{get:function(){return o},set:function(t){o.top=void 0!==t.top?t.top:o.top,o.right=void 0!==t.right?t.right:o.right,o.bottom=void 0!==t.bottom?t.bottom:o.bottom,o.left=void 0!==t.left?t.left:o.left}}}),t.utils.inheritOptions(e,n),t.utils.initOptions(e),e},t.models.scatter=function(){"use strict";function e(t){var e,n;return e=l=l||{},n=t[0].series,e=e[n]=e[n]||{},n=t[1],e=e[n]=e[n]||{}}function n(t){var n,i,r=t[0],o=e(t),a=!1;for(n=1;n<arguments.length;n++)i=arguments[n],o[i]===r[i]&&o.hasOwnProperty(i)||(o[i]=r[i],a=!0);return a}function i(e){return U.reset(),e.each(function(e){function l(){if(B=!1,!C)return!1;if(R===!0){var n=d3.merge(e.map(function(e,n){return e.values.map(function(e,i){var r=y(e,i),o=b(e,i);return[t.utils.NaNtoZero(g(r))+1e-4*Math.random(),t.utils.NaNtoZero(m(o))+1e-4*Math.random(),n,i,e]}).filter(function(t,e){return M(t[4],e)})}));if(0==n.length)return!1;n.length<3&&(n.push([g.range()[0]-20,m.range()[0]-20,null,null]),n.push([g.range()[1]+20,m.range()[1]+20,null,null]),n.push([g.range()[0]-20,m.range()[0]+20,null,null]),n.push([g.range()[1]+20,m.range()[1]-20,null,null]));var i=d3.geom.polygon([[-10,-10],[-10,d+10],[c+10,d+10],[c+10,-10]]),r=d3.geom.voronoi(n).map(function(t,e){return{data:i.clip(t),series:n[e][2],point:n[e][3]}});J.select(".nv-point-paths").selectAll("path").remove();var o=J.select(".nv-point-paths").selectAll("path").data(r),a=o.enter().append("svg:path").attr("d",function(t){return t&&t.data&&0!==t.data.length?"M"+t.data.join(",")+"Z":"M 0 0"}).attr("id",function(t,e){return"nv-path-"+e}).attr("clip-path",function(t,e){return"url(#nv-clip-"+f+"-"+e+")"});if(E&&a.style("fill",d3.rgb(230,230,230)).style("fill-opacity",.4).style("stroke-opacity",1).style("stroke",d3.rgb(200,200,200)),A){J.select(".nv-point-clips").selectAll("*").remove();{var s=J.select(".nv-point-clips").selectAll("clipPath").data(n);s.enter().append("svg:clipPath").attr("id",function(t,e){return"nv-clip-"+f+"-"+e}).append("svg:circle").attr("cx",function(t){return t[0]}).attr("cy",function(t){return t[1]}).attr("r",O)}}var l=function(t,n){if(B)return 0;var i=e[t.series];if(void 0!==i){var r=i.values[t.point];r.color=h(i,t.series),r.x=y(r),r.y=b(r);var o=p.node().getBoundingClientRect(),a=window.pageYOffset||document.documentElement.scrollTop,s=window.pageXOffset||document.documentElement.scrollLeft,l={left:g(y(r,t.point))+o.left+s+u.left+10,top:m(b(r,t.point))+o.top+a+u.top+10};n({point:r,series:i,pos:l,relativePos:[g(y(r,t.point))+u.left,m(b(r,t.point))+u.top],seriesIndex:t.series,pointIndex:t.point})}};o.on("click",function(t){l(t,z.elementClick)}).on("dblclick",function(t){l(t,z.elementDblClick)}).on("mouseover",function(t){l(t,z.elementMouseover)}).on("mouseout",function(t){l(t,z.elementMouseout)})}else J.select(".nv-groups").selectAll(".nv-group").selectAll(".nv-point").on("click",function(t,n){if(B||!e[t.series])return 0;var i=e[t.series],r=i.values[n];z.elementClick({point:r,series:i,pos:[g(y(r,n))+u.left,m(b(r,n))+u.top],relativePos:[g(y(r,n))+u.left,m(b(r,n))+u.top],seriesIndex:t.series,pointIndex:n})}).on("dblclick",function(t,n){if(B||!e[t.series])return 0;var i=e[t.series],r=i.values[n];z.elementDblClick({point:r,series:i,pos:[g(y(r,n))+u.left,m(b(r,n))+u.top],relativePos:[g(y(r,n))+u.left,m(b(r,n))+u.top],seriesIndex:t.series,pointIndex:n})}).on("mouseover",function(t,n){if(B||!e[t.series])return 0;var i=e[t.series],r=i.values[n];z.elementMouseover({point:r,series:i,pos:[g(y(r,n))+u.left,m(b(r,n))+u.top],relativePos:[g(y(r,n))+u.left,m(b(r,n))+u.top],seriesIndex:t.series,pointIndex:n,color:h(t,n)})}).on("mouseout",function(t,n){if(B||!e[t.series])return 0;var i=e[t.series],r=i.values[n];z.elementMouseout({point:r,series:i,pos:[g(y(r,n))+u.left,m(b(r,n))+u.top],relativePos:[g(y(r,n))+u.left,m(b(r,n))+u.top],seriesIndex:t.series,pointIndex:n,color:h(t,n)})})}p=d3.select(this);var j=t.utils.availableWidth(c,p,u),G=t.utils.availableHeight(d,p,u);t.utils.initSVG(p),e.forEach(function(t,e){t.values.forEach(function(t){t.series=e})});var X=i.yScale().name===d3.scale.log().name?!0:!1,K=N&&I&&F?[]:d3.merge(e.map(function(t){return t.values.map(function(t,e){return{x:y(t,e),y:b(t,e),size:x(t,e)}})}));if(g.domain(N||d3.extent(K.map(function(t){return t.x}).concat($))),g.range(D&&e[0]?P||[(j*S+j)/(2*e[0].values.length),j-j*(1+S)/(2*e[0].values.length)]:P||[0,j]),X){var Z=d3.min(K.map(function(t){return 0!==t.y?t.y:void 0}));m.clamp(!0).domain(I||d3.extent(K.map(function(t){return 0!==t.y?t.y:.1*Z}).concat(k))).range(H||[G,0])}else m.domain(I||d3.extent(K.map(function(t){return t.y}).concat(k))).range(H||[G,0]);v.domain(F||d3.extent(K.map(function(t){return t.size}).concat(_))).range(W||Y),L=g.domain()[0]===g.domain()[1]||m.domain()[0]===m.domain()[1],g.domain()[0]===g.domain()[1]&&g.domain(g.domain()[0]?[g.domain()[0]-.01*g.domain()[0],g.domain()[1]+.01*g.domain()[1]]:[-1,1]),m.domain()[0]===m.domain()[1]&&m.domain(m.domain()[0]?[m.domain()[0]-.01*m.domain()[0],m.domain()[1]+.01*m.domain()[1]]:[-1,1]),isNaN(g.domain()[0])&&g.domain([-1,1]),isNaN(m.domain()[0])&&m.domain([-1,1]),r=r||g,o=o||m,a=a||v;var Q=g(1)!==r(1)||m(1)!==o(1)||v(1)!==a(1),J=p.selectAll("g.nv-wrap.nv-scatter").data([e]),te=J.enter().append("g").attr("class","nvd3 nv-wrap nv-scatter nv-chart-"+f),ee=te.append("defs"),ne=te.append("g"),ie=J.select("g");J.classed("nv-single-point",L),ne.append("g").attr("class","nv-groups"),ne.append("g").attr("class","nv-point-paths"),te.append("g").attr("class","nv-point-clips"),J.attr("transform","translate("+u.left+","+u.top+")"),ee.append("clipPath").attr("id","nv-edge-clip-"+f).append("rect"),J.select("#nv-edge-clip-"+f+" rect").attr("width",j).attr("height",G>0?G:0),ie.attr("clip-path",T?"url(#nv-edge-clip-"+f+")":""),B=!0;var re=J.select(".nv-groups").selectAll(".nv-group").data(function(t){return t},function(t){return t.key});re.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),re.exit().remove(),re.attr("class",function(t,e){return(t.classed||"")+" nv-group nv-series-"+e}).classed("nv-noninteractive",!C).classed("hover",function(t){return t.hover}),re.watchTransition(U,"scatter: groups").style("fill",function(t,e){return h(t,e)}).style("stroke",function(t,e){return h(t,e)}).style("stroke-opacity",1).style("fill-opacity",.5);var oe=re.selectAll("path.nv-point").data(function(t){return t.values.map(function(t,e){return[t,e]}).filter(function(t,e){return M(t[0],e)})});if(oe.enter().append("path").attr("class",function(t){return"nv-point nv-point-"+t[1]}).style("fill",function(t){return t.color}).style("stroke",function(t){return t.color}).attr("transform",function(e){return"translate("+t.utils.NaNtoZero(r(y(e[0],e[1])))+","+t.utils.NaNtoZero(o(b(e[0],e[1])))+")"}).attr("d",t.utils.symbol().type(function(t){return w(t[0])}).size(function(t){return v(x(t[0],t[1]))})),oe.exit().remove(),re.exit().selectAll("path.nv-point").watchTransition(U,"scatter exit").attr("transform",function(e){return"translate("+t.utils.NaNtoZero(g(y(e[0],e[1])))+","+t.utils.NaNtoZero(m(b(e[0],e[1])))+")"}).remove(),oe.filter(function(t){return Q||n(t,"x","y")}).watchTransition(U,"scatter points").attr("transform",function(e){return"translate("+t.utils.NaNtoZero(g(y(e[0],e[1])))+","+t.utils.NaNtoZero(m(b(e[0],e[1])))+")"}),oe.filter(function(t){return Q||n(t,"shape","size")}).watchTransition(U,"scatter points").attr("d",t.utils.symbol().type(function(t){return w(t[0])
}).size(function(t){return v(x(t[0],t[1]))})),V){var ae=re.selectAll(".nv-label").data(function(t){return t.values.map(function(t,e){return[t,e]}).filter(function(t,e){return M(t[0],e)})});ae.enter().append("text").style("fill",function(t){return t.color}).style("stroke-opacity",0).style("fill-opacity",1).attr("transform",function(e){var n=t.utils.NaNtoZero(r(y(e[0],e[1])))+Math.sqrt(v(x(e[0],e[1]))/Math.PI)+2;return"translate("+n+","+t.utils.NaNtoZero(o(b(e[0],e[1])))+")"}).text(function(t){return t[0].label}),ae.exit().remove(),re.exit().selectAll("path.nv-label").watchTransition(U,"scatter exit").attr("transform",function(e){var n=t.utils.NaNtoZero(g(y(e[0],e[1])))+Math.sqrt(v(x(e[0],e[1]))/Math.PI)+2;return"translate("+n+","+t.utils.NaNtoZero(m(b(e[0],e[1])))+")"}).remove(),ae.each(function(t){d3.select(this).classed("nv-label",!0).classed("nv-label-"+t[1],!1).classed("hover",!1)}),ae.watchTransition(U,"scatter labels").attr("transform",function(e){var n=t.utils.NaNtoZero(g(y(e[0],e[1])))+Math.sqrt(v(x(e[0],e[1]))/Math.PI)+2;return"translate("+n+","+t.utils.NaNtoZero(m(b(e[0],e[1])))+")"})}q?(clearTimeout(s),s=setTimeout(l,q)):l(),r=g.copy(),o=m.copy(),a=v.copy()}),U.renderEnd("scatter immediate"),i}var r,o,a,s,l,u={top:0,right:0,bottom:0,left:0},c=null,d=null,h=t.utils.defaultColor(),f=Math.floor(1e5*Math.random()),p=null,g=d3.scale.linear(),m=d3.scale.linear(),v=d3.scale.linear(),y=function(t){return t.x},b=function(t){return t.y},x=function(t){return t.size||1},w=function(t){return t.shape||"circle"},$=[],k=[],_=[],C=!0,M=function(t){return!t.notActive},D=!1,S=.1,T=!1,A=!0,E=!1,O=function(){return 25},N=null,I=null,P=null,H=null,F=null,W=null,L=!1,z=d3.dispatch("elementClick","elementDblClick","elementMouseover","elementMouseout","renderEnd"),R=!0,j=250,q=300,V=!1,B=!1,U=t.utils.renderWatch(z,j),Y=[16,256];return i.dispatch=z,i.options=t.utils.optionsFunc.bind(i),i._calls=new function(){this.clearHighlights=function(){return t.dom.write(function(){p.selectAll(".nv-point.hover").classed("hover",!1)}),null},this.highlightPoint=function(e,n,i){t.dom.write(function(){p.select(".nv-groups").selectAll(".nv-series-"+e).selectAll(".nv-point-"+n).classed("hover",i)})}},z.on("elementMouseover.point",function(t){C&&i._calls.highlightPoint(t.seriesIndex,t.pointIndex,!0)}),z.on("elementMouseout.point",function(t){C&&i._calls.highlightPoint(t.seriesIndex,t.pointIndex,!1)}),i._options=Object.create({},{width:{get:function(){return c},set:function(t){c=t}},height:{get:function(){return d},set:function(t){d=t}},xScale:{get:function(){return g},set:function(t){g=t}},yScale:{get:function(){return m},set:function(t){m=t}},pointScale:{get:function(){return v},set:function(t){v=t}},xDomain:{get:function(){return N},set:function(t){N=t}},yDomain:{get:function(){return I},set:function(t){I=t}},pointDomain:{get:function(){return F},set:function(t){F=t}},xRange:{get:function(){return P},set:function(t){P=t}},yRange:{get:function(){return H},set:function(t){H=t}},pointRange:{get:function(){return W},set:function(t){W=t}},forceX:{get:function(){return $},set:function(t){$=t}},forceY:{get:function(){return k},set:function(t){k=t}},forcePoint:{get:function(){return _},set:function(t){_=t}},interactive:{get:function(){return C},set:function(t){C=t}},pointActive:{get:function(){return M},set:function(t){M=t}},padDataOuter:{get:function(){return S},set:function(t){S=t}},padData:{get:function(){return D},set:function(t){D=t}},clipEdge:{get:function(){return T},set:function(t){T=t}},clipVoronoi:{get:function(){return A},set:function(t){A=t}},clipRadius:{get:function(){return O},set:function(t){O=t}},showVoronoi:{get:function(){return E},set:function(t){E=t}},id:{get:function(){return f},set:function(t){f=t}},interactiveUpdateDelay:{get:function(){return q},set:function(t){q=t}},showLabels:{get:function(){return V},set:function(t){V=t}},x:{get:function(){return y},set:function(t){y=d3.functor(t)}},y:{get:function(){return b},set:function(t){b=d3.functor(t)}},pointSize:{get:function(){return x},set:function(t){x=d3.functor(t)}},pointShape:{get:function(){return w},set:function(t){w=d3.functor(t)}},margin:{get:function(){return u},set:function(t){u.top=void 0!==t.top?t.top:u.top,u.right=void 0!==t.right?t.right:u.right,u.bottom=void 0!==t.bottom?t.bottom:u.bottom,u.left=void 0!==t.left?t.left:u.left}},duration:{get:function(){return j},set:function(t){j=t,U.reset(j)}},color:{get:function(){return h},set:function(e){h=t.utils.getColor(e)}},useVoronoi:{get:function(){return R},set:function(t){R=t,R===!1&&(A=!1)}}}),t.utils.initOptions(i),i},t.models.scatterChart=function(){"use strict";function e(C){return A.reset(),A.models(n),b&&A.models(i),x&&A.models(r),m&&A.models(a),v&&A.models(s),C.each(function(C){h=d3.select(this),t.utils.initSVG(h);var N=t.utils.availableWidth(c,h,u),I=t.utils.availableHeight(d,h,u);if(e.update=function(){0===M?h.call(e):h.transition().duration(M).call(e)},e.container=this,$.setter(O(C),e.update).getter(E(C)).update(),$.disabled=C.map(function(t){return!!t.disabled}),!k){var P;k={};for(P in $)k[P]=$[P]instanceof Array?$[P].slice(0):$[P]}if(!(C&&C.length&&C.filter(function(t){return t.values.length}).length))return t.utils.noData(e,h),A.renderEnd("scatter immediate"),e;h.selectAll(".nv-noData").remove(),p=n.xScale(),g=n.yScale();var H=h.selectAll("g.nv-wrap.nv-scatterChart").data([C]),F=H.enter().append("g").attr("class","nvd3 nv-wrap nv-scatterChart nv-chart-"+n.id()),W=F.append("g"),L=H.select("g");if(W.append("rect").attr("class","nvd3 nv-background").style("pointer-events","none"),W.append("g").attr("class","nv-x nv-axis"),W.append("g").attr("class","nv-y nv-axis"),W.append("g").attr("class","nv-scatterWrap"),W.append("g").attr("class","nv-regressionLinesWrap"),W.append("g").attr("class","nv-distWrap"),W.append("g").attr("class","nv-legendWrap"),w&&L.select(".nv-y.nv-axis").attr("transform","translate("+N+",0)"),y){var z=N;o.width(z),H.select(".nv-legendWrap").datum(C).call(o),u.top!=o.height()&&(u.top=o.height(),I=t.utils.availableHeight(d,h,u)),H.select(".nv-legendWrap").attr("transform","translate(0,"+-u.top+")")}else L.select(".nv-legendWrap").selectAll("*").remove();H.attr("transform","translate("+u.left+","+u.top+")"),n.width(N).height(I).color(C.map(function(t,e){return t.color=t.color||f(t,e),t.color}).filter(function(t,e){return!C[e].disabled})).showLabels(D),H.select(".nv-scatterWrap").datum(C.filter(function(t){return!t.disabled})).call(n),H.select(".nv-regressionLinesWrap").attr("clip-path","url(#nv-edge-clip-"+n.id()+")");var R=H.select(".nv-regressionLinesWrap").selectAll(".nv-regLines").data(function(t){return t});R.enter().append("g").attr("class","nv-regLines");var j=R.selectAll(".nv-regLine").data(function(t){return[t]});j.enter().append("line").attr("class","nv-regLine").style("stroke-opacity",0),j.filter(function(t){return t.intercept&&t.slope}).watchTransition(A,"scatterPlusLineChart: regline").attr("x1",p.range()[0]).attr("x2",p.range()[1]).attr("y1",function(t){return g(p.domain()[0]*t.slope+t.intercept)}).attr("y2",function(t){return g(p.domain()[1]*t.slope+t.intercept)}).style("stroke",function(t,e,n){return f(t,n)}).style("stroke-opacity",function(t){return t.disabled||"undefined"==typeof t.slope||"undefined"==typeof t.intercept?0:1}),b&&(i.scale(p)._ticks(t.utils.calcTicksX(N/100,C)).tickSize(-I,0),L.select(".nv-x.nv-axis").attr("transform","translate(0,"+g.range()[0]+")").call(i)),x&&(r.scale(g)._ticks(t.utils.calcTicksY(I/36,C)).tickSize(-N,0),L.select(".nv-y.nv-axis").call(r)),m&&(a.getData(n.x()).scale(p).width(N).color(C.map(function(t,e){return t.color||f(t,e)}).filter(function(t,e){return!C[e].disabled})),W.select(".nv-distWrap").append("g").attr("class","nv-distributionX"),L.select(".nv-distributionX").attr("transform","translate(0,"+g.range()[0]+")").datum(C.filter(function(t){return!t.disabled})).call(a)),v&&(s.getData(n.y()).scale(g).width(I).color(C.map(function(t,e){return t.color||f(t,e)}).filter(function(t,e){return!C[e].disabled})),W.select(".nv-distWrap").append("g").attr("class","nv-distributionY"),L.select(".nv-distributionY").attr("transform","translate("+(w?N:-s.size())+",0)").datum(C.filter(function(t){return!t.disabled})).call(s)),o.dispatch.on("stateChange",function(t){for(var n in t)$[n]=t[n];_.stateChange($),e.update()}),_.on("changeState",function(t){"undefined"!=typeof t.disabled&&(C.forEach(function(e,n){e.disabled=t.disabled[n]}),$.disabled=t.disabled),e.update()}),n.dispatch.on("elementMouseout.tooltip",function(t){l.hidden(!0),h.select(".nv-chart-"+n.id()+" .nv-series-"+t.seriesIndex+" .nv-distx-"+t.pointIndex).attr("y1",0),h.select(".nv-chart-"+n.id()+" .nv-series-"+t.seriesIndex+" .nv-disty-"+t.pointIndex).attr("x2",s.size())}),n.dispatch.on("elementMouseover.tooltip",function(t){h.select(".nv-series-"+t.seriesIndex+" .nv-distx-"+t.pointIndex).attr("y1",t.relativePos[1]-I),h.select(".nv-series-"+t.seriesIndex+" .nv-disty-"+t.pointIndex).attr("x2",t.relativePos[0]+a.size()),l.data(t).hidden(!1)}),S=p.copy(),T=g.copy()}),A.renderEnd("scatter with line immediate"),e}var n=t.models.scatter(),i=t.models.axis(),r=t.models.axis(),o=t.models.legend(),a=t.models.distribution(),s=t.models.distribution(),l=t.models.tooltip(),u={top:30,right:20,bottom:50,left:75},c=null,d=null,h=null,f=t.utils.defaultColor(),p=n.xScale(),g=n.yScale(),m=!1,v=!1,y=!0,b=!0,x=!0,w=!1,$=t.utils.state(),k=null,_=d3.dispatch("stateChange","changeState","renderEnd"),C=null,M=250,D=!1;n.xScale(p).yScale(g),i.orient("bottom").tickPadding(10),r.orient(w?"right":"left").tickPadding(10),a.axis("x"),s.axis("y"),l.headerFormatter(function(t,e){return i.tickFormat()(t,e)}).valueFormatter(function(t,e){return r.tickFormat()(t,e)});var S,T,A=t.utils.renderWatch(_,M),E=function(t){return function(){return{active:t.map(function(t){return!t.disabled})}}},O=function(t){return function(e){void 0!==e.active&&t.forEach(function(t,n){t.disabled=!e.active[n]})}};return e.dispatch=_,e.scatter=n,e.legend=o,e.xAxis=i,e.yAxis=r,e.distX=a,e.distY=s,e.tooltip=l,e.options=t.utils.optionsFunc.bind(e),e._options=Object.create({},{width:{get:function(){return c},set:function(t){c=t}},height:{get:function(){return d},set:function(t){d=t}},container:{get:function(){return h},set:function(t){h=t}},showDistX:{get:function(){return m},set:function(t){m=t}},showDistY:{get:function(){return v},set:function(t){v=t}},showLegend:{get:function(){return y},set:function(t){y=t}},showXAxis:{get:function(){return b},set:function(t){b=t}},showYAxis:{get:function(){return x},set:function(t){x=t}},defaultState:{get:function(){return k},set:function(t){k=t}},noData:{get:function(){return C},set:function(t){C=t}},duration:{get:function(){return M},set:function(t){M=t}},showLabels:{get:function(){return D},set:function(t){D=t}},margin:{get:function(){return u},set:function(t){u.top=void 0!==t.top?t.top:u.top,u.right=void 0!==t.right?t.right:u.right,u.bottom=void 0!==t.bottom?t.bottom:u.bottom,u.left=void 0!==t.left?t.left:u.left}},rightAlignYAxis:{get:function(){return w},set:function(t){w=t,r.orient(t?"right":"left")}},color:{get:function(){return f},set:function(e){f=t.utils.getColor(e),o.color(f),a.color(f),s.color(f)}}}),t.utils.inheritOptions(e,n),t.utils.initOptions(e),e},t.models.sparkline=function(){"use strict";function e(c){return b.reset(),c.each(function(e){var c=s-a.left-a.right,y=l-a.top-a.bottom;u=d3.select(this),t.utils.initSVG(u),d.domain(n||d3.extent(e,f)).range(r||[0,c]),h.domain(i||d3.extent(e,p)).range(o||[y,0]);{var b=u.selectAll("g.nv-wrap.nv-sparkline").data([e]),x=b.enter().append("g").attr("class","nvd3 nv-wrap nv-sparkline");x.append("g"),b.select("g")}b.attr("transform","translate("+a.left+","+a.top+")");var w=b.selectAll("path").data(function(t){return[t]});w.enter().append("path"),w.exit().remove(),w.style("stroke",function(t,e){return t.color||g(t,e)}).attr("d",d3.svg.line().x(function(t,e){return d(f(t,e))}).y(function(t,e){return h(p(t,e))}));var $=b.selectAll("circle.nv-point").data(function(t){function e(e){if(-1!=e){var n=t[e];return n.pointIndex=e,n}return null}var n=t.map(function(t,e){return p(t,e)}),i=e(n.lastIndexOf(h.domain()[1])),r=e(n.indexOf(h.domain()[0])),o=e(n.length-1);return[m?r:null,m?i:null,v?o:null].filter(function(t){return null!=t})});$.enter().append("circle"),$.exit().remove(),$.attr("cx",function(t){return d(f(t,t.pointIndex))}).attr("cy",function(t){return h(p(t,t.pointIndex))}).attr("r",2).attr("class",function(t){return f(t,t.pointIndex)==d.domain()[1]?"nv-point nv-currentValue":p(t,t.pointIndex)==h.domain()[0]?"nv-point nv-minValue":"nv-point nv-maxValue"})}),b.renderEnd("sparkline immediate"),e}var n,i,r,o,a={top:2,right:0,bottom:2,left:0},s=400,l=32,u=null,c=!0,d=d3.scale.linear(),h=d3.scale.linear(),f=function(t){return t.x},p=function(t){return t.y},g=t.utils.getColor(["#000"]),m=!0,v=!0,y=d3.dispatch("renderEnd"),b=t.utils.renderWatch(y);return e.options=t.utils.optionsFunc.bind(e),e._options=Object.create({},{width:{get:function(){return s},set:function(t){s=t}},height:{get:function(){return l},set:function(t){l=t}},xDomain:{get:function(){return n},set:function(t){n=t}},yDomain:{get:function(){return i},set:function(t){i=t}},xRange:{get:function(){return r},set:function(t){r=t}},yRange:{get:function(){return o},set:function(t){o=t}},xScale:{get:function(){return d},set:function(t){d=t}},yScale:{get:function(){return h},set:function(t){h=t}},animate:{get:function(){return c},set:function(t){c=t}},showMinMaxPoints:{get:function(){return m},set:function(t){m=t}},showCurrentPoint:{get:function(){return v},set:function(t){v=t}},x:{get:function(){return f},set:function(t){f=d3.functor(t)}},y:{get:function(){return p},set:function(t){p=d3.functor(t)}},margin:{get:function(){return a},set:function(t){a.top=void 0!==t.top?t.top:a.top,a.right=void 0!==t.right?t.right:a.right,a.bottom=void 0!==t.bottom?t.bottom:a.bottom,a.left=void 0!==t.left?t.left:a.left}},color:{get:function(){return g},set:function(e){g=t.utils.getColor(e)}}}),e.dispatch=y,t.utils.initOptions(e),e},t.models.sparklinePlus=function(){"use strict";function e(g){return v.reset(),v.models(r),g.each(function(g){function m(){if(!u){var t=C.selectAll(".nv-hoverValue").data(l),e=t.enter().append("g").attr("class","nv-hoverValue").style("stroke-opacity",0).style("fill-opacity",0);t.exit().transition().duration(250).style("stroke-opacity",0).style("fill-opacity",0).remove(),t.attr("transform",function(t){return"translate("+n(r.x()(g[t],t))+",0)"}).transition().duration(250).style("stroke-opacity",1).style("fill-opacity",1),l.length&&(e.append("line").attr("x1",0).attr("y1",-o.top).attr("x2",0).attr("y2",x),e.append("text").attr("class","nv-xValue").attr("x",-6).attr("y",-o.top).attr("text-anchor","end").attr("dy",".9em"),C.select(".nv-hoverValue .nv-xValue").text(c(r.x()(g[l[0]],l[0]))),e.append("text").attr("class","nv-yValue").attr("x",6).attr("y",-o.top).attr("text-anchor","start").attr("dy",".9em"),C.select(".nv-hoverValue .nv-yValue").text(d(r.y()(g[l[0]],l[0]))))}}function v(){function t(t,e){for(var n=Math.abs(r.x()(t[0],0)-e),i=0,o=0;o<t.length;o++)Math.abs(r.x()(t[o],o)-e)<n&&(n=Math.abs(r.x()(t[o],o)-e),i=o);return i}if(!u){var e=d3.mouse(this)[0]-o.left;l=[t(g,Math.round(n.invert(e)))],m()}}var y=d3.select(this);t.utils.initSVG(y);var b=t.utils.availableWidth(a,y,o),x=t.utils.availableHeight(s,y,o);if(e.update=function(){y.call(e)},e.container=this,!g||!g.length)return t.utils.noData(e,y),e;y.selectAll(".nv-noData").remove();var w=r.y()(g[g.length-1],g.length-1);n=r.xScale(),i=r.yScale();var $=y.selectAll("g.nv-wrap.nv-sparklineplus").data([g]),k=$.enter().append("g").attr("class","nvd3 nv-wrap nv-sparklineplus"),_=k.append("g"),C=$.select("g");_.append("g").attr("class","nv-sparklineWrap"),_.append("g").attr("class","nv-valueWrap"),_.append("g").attr("class","nv-hoverArea"),$.attr("transform","translate("+o.left+","+o.top+")");var M=C.select(".nv-sparklineWrap");if(r.width(b).height(x),M.call(r),h){var D=C.select(".nv-valueWrap"),S=D.selectAll(".nv-currentValue").data([w]);S.enter().append("text").attr("class","nv-currentValue").attr("dx",p?-8:8).attr("dy",".9em").style("text-anchor",p?"end":"start"),S.attr("x",b+(p?o.right:0)).attr("y",f?function(t){return i(t)}:0).style("fill",r.color()(g[g.length-1],g.length-1)).text(d(w))}_.select(".nv-hoverArea").append("rect").on("mousemove",v).on("click",function(){u=!u}).on("mouseout",function(){l=[],m()}),C.select(".nv-hoverArea rect").attr("transform",function(){return"translate("+-o.left+","+-o.top+")"}).attr("width",b+o.left+o.right).attr("height",x+o.top)}),v.renderEnd("sparklinePlus immediate"),e}var n,i,r=t.models.sparkline(),o={top:15,right:100,bottom:10,left:50},a=null,s=null,l=[],u=!1,c=d3.format(",r"),d=d3.format(",.2f"),h=!0,f=!0,p=!1,g=null,m=d3.dispatch("renderEnd"),v=t.utils.renderWatch(m);return e.dispatch=m,e.sparkline=r,e.options=t.utils.optionsFunc.bind(e),e._options=Object.create({},{width:{get:function(){return a},set:function(t){a=t}},height:{get:function(){return s},set:function(t){s=t}},xTickFormat:{get:function(){return c},set:function(t){c=t}},yTickFormat:{get:function(){return d},set:function(t){d=t}},showLastValue:{get:function(){return h},set:function(t){h=t}},alignValue:{get:function(){return f},set:function(t){f=t}},rightAlignValue:{get:function(){return p},set:function(t){p=t}},noData:{get:function(){return g},set:function(t){g=t}},margin:{get:function(){return o},set:function(t){o.top=void 0!==t.top?t.top:o.top,o.right=void 0!==t.right?t.right:o.right,o.bottom=void 0!==t.bottom?t.bottom:o.bottom,o.left=void 0!==t.left?t.left:o.left}}}),t.utils.inheritOptions(e,r),t.utils.initOptions(e),e},t.models.stackedArea=function(){"use strict";function e(f){return w.reset(),w.models(y),f.each(function(f){var b=o-r.left-r.right,$=a-r.top-r.bottom;u=d3.select(this),t.utils.initSVG(u),n=y.xScale(),i=y.yScale();var k=f;f.forEach(function(t,e){t.seriesIndex=e,t.values=t.values.map(function(t,n){return t.index=n,t.seriesIndex=e,t})});var _=f.filter(function(t){return!t.disabled});f=d3.layout.stack().order(g).offset(p).values(function(t){return t.values}).x(c).y(d).out(function(t,e,n){t.display={y:n,y0:e}})(_);var C=u.selectAll("g.nv-wrap.nv-stackedarea").data([f]),M=C.enter().append("g").attr("class","nvd3 nv-wrap nv-stackedarea"),D=M.append("defs"),S=M.append("g"),T=C.select("g");S.append("g").attr("class","nv-areaWrap"),S.append("g").attr("class","nv-scatterWrap"),C.attr("transform","translate("+r.left+","+r.top+")"),0==y.forceY().length&&y.forceY().push(0),y.width(b).height($).x(c).y(function(t){return void 0!==t.display?t.display.y+t.display.y0:void 0}).color(f.map(function(t){return t.color=t.color||s(t,t.seriesIndex),t.color}));var A=T.select(".nv-scatterWrap").datum(f);A.call(y),D.append("clipPath").attr("id","nv-edge-clip-"+l).append("rect"),C.select("#nv-edge-clip-"+l+" rect").attr("width",b).attr("height",$),T.attr("clip-path",v?"url(#nv-edge-clip-"+l+")":"");var E=d3.svg.area().defined(h).x(function(t,e){return n(c(t,e))}).y0(function(t){return i(t.display.y0)}).y1(function(t){return i(t.display.y+t.display.y0)}).interpolate(m),O=d3.svg.area().defined(h).x(function(t,e){return n(c(t,e))}).y0(function(t){return i(t.display.y0)}).y1(function(t){return i(t.display.y0)}),N=T.select(".nv-areaWrap").selectAll("path.nv-area").data(function(t){return t});N.enter().append("path").attr("class",function(t,e){return"nv-area nv-area-"+e}).attr("d",function(t){return O(t.values,t.seriesIndex)}).on("mouseover",function(t){d3.select(this).classed("hover",!0),x.areaMouseover({point:t,series:t.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:t.seriesIndex})}).on("mouseout",function(t){d3.select(this).classed("hover",!1),x.areaMouseout({point:t,series:t.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:t.seriesIndex})}).on("click",function(t){d3.select(this).classed("hover",!1),x.areaClick({point:t,series:t.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:t.seriesIndex})}),N.exit().remove(),N.style("fill",function(t){return t.color||s(t,t.seriesIndex)}).style("stroke",function(t){return t.color||s(t,t.seriesIndex)}),N.watchTransition(w,"stackedArea path").attr("d",function(t,e){return E(t.values,e)}),y.dispatch.on("elementMouseover.area",function(t){T.select(".nv-chart-"+l+" .nv-area-"+t.seriesIndex).classed("hover",!0)}),y.dispatch.on("elementMouseout.area",function(t){T.select(".nv-chart-"+l+" .nv-area-"+t.seriesIndex).classed("hover",!1)}),e.d3_stackedOffset_stackPercent=function(t){var e,n,i,r=t.length,o=t[0].length,a=[];for(n=0;o>n;++n){for(e=0,i=0;e<k.length;e++)i+=d(k[e].values[n]);if(i)for(e=0;r>e;e++)t[e][n][1]/=i;else for(e=0;r>e;e++)t[e][n][1]=0}for(n=0;o>n;++n)a[n]=0;return a}}),w.renderEnd("stackedArea immediate"),e}var n,i,r={top:0,right:0,bottom:0,left:0},o=960,a=500,s=t.utils.defaultColor(),l=Math.floor(1e5*Math.random()),u=null,c=function(t){return t.x},d=function(t){return t.y},h=function(t,e){return!isNaN(d(t,e))&&null!==d(t,e)},f="stack",p="zero",g="default",m="linear",v=!1,y=t.models.scatter(),b=250,x=d3.dispatch("areaClick","areaMouseover","areaMouseout","renderEnd","elementClick","elementMouseover","elementMouseout");y.pointSize(2.2).pointDomain([2.2,2.2]);var w=t.utils.renderWatch(x,b);return e.dispatch=x,e.scatter=y,y.dispatch.on("elementClick",function(){x.elementClick.apply(this,arguments)}),y.dispatch.on("elementMouseover",function(){x.elementMouseover.apply(this,arguments)}),y.dispatch.on("elementMouseout",function(){x.elementMouseout.apply(this,arguments)}),e.interpolate=function(t){return arguments.length?(m=t,e):m},e.duration=function(t){return arguments.length?(b=t,w.reset(b),y.duration(b),e):b},e.dispatch=x,e.scatter=y,e.options=t.utils.optionsFunc.bind(e),e._options=Object.create({},{width:{get:function(){return o},set:function(t){o=t}},height:{get:function(){return a},set:function(t){a=t}},defined:{get:function(){return h},set:function(t){h=t}},clipEdge:{get:function(){return v},set:function(t){v=t}},offset:{get:function(){return p},set:function(t){p=t}},order:{get:function(){return g},set:function(t){g=t}},interpolate:{get:function(){return m},set:function(t){m=t}},x:{get:function(){return c},set:function(t){c=d3.functor(t)}},y:{get:function(){return d},set:function(t){d=d3.functor(t)}},margin:{get:function(){return r},set:function(t){r.top=void 0!==t.top?t.top:r.top,r.right=void 0!==t.right?t.right:r.right,r.bottom=void 0!==t.bottom?t.bottom:r.bottom,r.left=void 0!==t.left?t.left:r.left}},color:{get:function(){return s},set:function(e){s=t.utils.getColor(e)}},style:{get:function(){return f},set:function(t){switch(f=t){case"stack":e.offset("zero"),e.order("default");break;case"stream":e.offset("wiggle"),e.order("inside-out");break;case"stream-center":e.offset("silhouette"),e.order("inside-out");break;case"expand":e.offset("expand"),e.order("default");break;case"stack_percent":e.offset(e.d3_stackedOffset_stackPercent),e.order("default")}}},duration:{get:function(){return b},set:function(t){b=t,w.reset(b),y.duration(b)}}}),t.utils.inheritOptions(e,y),t.utils.initOptions(e),e},t.models.stackedAreaChart=function(){"use strict";function e(c){return P.reset(),P.models(r),y&&P.models(o),b&&P.models(a),c.each(function(c){function D(){y&&G.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+V+")").transition().duration(O).call(o)}function P(){if(b){if("expand"===r.style()||"stack_percent"===r.style()){var t=a.tickFormat();N&&t===L||(N=t),a.tickFormat(L)}else N&&(a.tickFormat(N),N=null);G.select(".nv-focus .nv-y.nv-axis").transition().duration(0).call(a)}}function z(t){var e=G.select(".nv-focus .nv-stackedWrap").datum(c.filter(function(t){return!t.disabled}).map(function(e){return{key:e.key,area:e.area,classed:e.classed,values:e.values.filter(function(e,n){return r.x()(e,n)>=t[0]&&r.x()(e,n)<=t[1]}),disableTooltip:e.disableTooltip}}));e.transition().duration(O).call(r),D(),P()}var R=d3.select(this),j=this;t.utils.initSVG(R);var q=t.utils.availableWidth(f,R,h),V=t.utils.availableHeight(p,R,h)-(w?d.height():0);if(e.update=function(){R.transition().duration(O).call(e)},e.container=this,C.setter(W(c),e.update).getter(F(c)).update(),C.disabled=c.map(function(t){return!!t.disabled}),!M){var B;M={};for(B in C)M[B]=C[B]instanceof Array?C[B].slice(0):C[B]}if(!(c&&c.length&&c.filter(function(t){return t.values.length}).length))return t.utils.noData(e,R),e;R.selectAll(".nv-noData").remove(),n=r.xScale(),i=r.yScale();var U=R.selectAll("g.nv-wrap.nv-stackedAreaChart").data([c]),Y=U.enter().append("g").attr("class","nvd3 nv-wrap nv-stackedAreaChart").append("g"),G=U.select("g");Y.append("g").attr("class","nv-legendWrap"),Y.append("g").attr("class","nv-controlsWrap");var X=Y.append("g").attr("class","nv-focus");X.append("g").attr("class","nv-background").append("rect"),X.append("g").attr("class","nv-x nv-axis"),X.append("g").attr("class","nv-y nv-axis"),X.append("g").attr("class","nv-stackedWrap"),X.append("g").attr("class","nv-interactive");Y.append("g").attr("class","nv-focusWrap");if(v){var K=m?q-T:q;s.width(K),G.select(".nv-legendWrap").datum(c).call(s),h.top!=s.height()&&(h.top=s.height(),V=t.utils.availableHeight(p,R,h)-(w?d.height():0)),G.select(".nv-legendWrap").attr("transform","translate("+(q-K)+","+-h.top+")")}else G.select(".nv-legendWrap").selectAll("*").remove();if(m){var Z=[{key:E.stacked||"Stacked",metaKey:"Stacked",disabled:"stack"!=r.style(),style:"stack"},{key:E.stream||"Stream",metaKey:"Stream",disabled:"stream"!=r.style(),style:"stream"},{key:E.expanded||"Expanded",metaKey:"Expanded",disabled:"expand"!=r.style(),style:"expand"},{key:E.stack_percent||"Stack %",metaKey:"Stack_Percent",disabled:"stack_percent"!=r.style(),style:"stack_percent"}];T=A.length/3*260,Z=Z.filter(function(t){return-1!==A.indexOf(t.metaKey)}),l.width(T).color(["#444","#444","#444"]),G.select(".nv-controlsWrap").datum(Z).call(l),h.top!=Math.max(l.height(),s.height())&&(h.top=Math.max(l.height(),s.height()),V=t.utils.availableHeight(p,R,h)),G.select(".nv-controlsWrap").attr("transform","translate(0,"+-h.top+")")}else G.select(".nv-controlsWrap").selectAll("*").remove();U.attr("transform","translate("+h.left+","+h.top+")"),x&&G.select(".nv-y.nv-axis").attr("transform","translate("+q+",0)"),$&&(u.width(q).height(V).margin({left:h.left,top:h.top}).svgContainer(R).xScale(n),U.select(".nv-interactive").call(u)),G.select(".nv-focus .nv-background rect").attr("width",q).attr("height",V),r.width(q).height(V).color(c.map(function(t,e){return t.color||g(t,e)}).filter(function(t,e){return!c[e].disabled}));var Q=G.select(".nv-focus .nv-stackedWrap").datum(c.filter(function(t){return!t.disabled}));if(y&&o.scale(n)._ticks(t.utils.calcTicksX(q/100,c)).tickSize(-V,0),b){var J;J="wiggle"===r.offset()?0:t.utils.calcTicksY(V/36,c),a.scale(i)._ticks(J).tickSize(-q,0)}if(w){d.width(q),G.select(".nv-focusWrap").attr("transform","translate(0,"+(V+h.bottom+d.margin().top)+")").datum(c.filter(function(t){return!t.disabled})).call(d);var te=d.brush.empty()?d.xDomain():d.brush.extent();null!==te&&z(te)}else Q.transition().call(r),D(),P();r.dispatch.on("areaClick.toggle",function(t){c.forEach(1===c.filter(function(t){return!t.disabled}).length?function(t){t.disabled=!1}:function(e,n){e.disabled=n!=t.seriesIndex}),C.disabled=c.map(function(t){return!!t.disabled}),S.stateChange(C),e.update()}),s.dispatch.on("stateChange",function(t){for(var n in t)C[n]=t[n];S.stateChange(C),e.update()}),l.dispatch.on("legendClick",function(t){t.disabled&&(Z=Z.map(function(t){return t.disabled=!0,t}),t.disabled=!1,r.style(t.style),C.style=r.style(),S.stateChange(C),e.update())}),u.dispatch.on("elementMousemove",function(n){r.clearHighlights();var i,o,a,s=[],l=0,d=!0;if(c.filter(function(t,e){return t.seriesIndex=e,!t.disabled}).forEach(function(u,c){o=t.interactiveBisect(u.values,n.pointXValue,e.x());var h=u.values[o],f=e.y()(h,o);if(null!=f&&r.highlightPoint(c,o,!0),"undefined"!=typeof h){"undefined"==typeof i&&(i=h),"undefined"==typeof a&&(a=e.xScale()(e.x()(h,o)));var p="expand"==r.style()?h.display.y:e.y()(h,o);s.push({key:u.key,value:p,color:g(u,u.seriesIndex),point:h}),k&&"expand"!=r.style()&&null!=p&&(l+=p,d=!1)}}),s.reverse(),s.length>2){var h=e.yScale().invert(n.mouseY),f=null;s.forEach(function(t,e){h=Math.abs(h);var n=Math.abs(t.point.display.y0),i=Math.abs(t.point.display.y);return h>=n&&i+n>=h?void(f=e):void 0}),null!=f&&(s[f].highlight=!0)}k&&"expand"!=r.style()&&s.length>=2&&!d&&s.push({key:_,value:l,total:!0});var p=e.x()(i,o),m=u.tooltip.valueFormatter();"expand"===r.style()||"stack_percent"===r.style()?(I||(I=m),m=d3.format(".1%")):I&&(m=I,I=null),u.tooltip.chartContainer(j.parentNode).valueFormatter(m).data({value:p,series:s})(),u.renderGuideLine(a)}),u.dispatch.on("elementMouseout",function(){r.clearHighlights()}),d.dispatch.on("onBrush",function(t){z(t)}),S.on("changeState",function(t){"undefined"!=typeof t.disabled&&c.length===t.disabled.length&&(c.forEach(function(e,n){e.disabled=t.disabled[n]}),C.disabled=t.disabled),"undefined"!=typeof t.style&&(r.style(t.style),H=t.style),e.update()})}),P.renderEnd("stacked Area chart immediate"),e}var n,i,r=t.models.stackedArea(),o=t.models.axis(),a=t.models.axis(),s=t.models.legend(),l=t.models.legend(),u=t.interactiveGuideline(),c=t.models.tooltip(),d=t.models.focus(t.models.stackedArea()),h={top:30,right:25,bottom:50,left:60},f=null,p=null,g=t.utils.defaultColor(),m=!0,v=!0,y=!0,b=!0,x=!1,w=!1,$=!1,k=!0,_="TOTAL",C=t.utils.state(),M=null,D=null,S=d3.dispatch("stateChange","changeState","renderEnd"),T=250,A=["Stacked","Stream","Expanded"],E={},O=250;C.style=r.style(),o.orient("bottom").tickPadding(7),a.orient(x?"right":"left"),c.headerFormatter(function(t,e){return o.tickFormat()(t,e)}).valueFormatter(function(t,e){return a.tickFormat()(t,e)}),u.tooltip.headerFormatter(function(t,e){return o.tickFormat()(t,e)}).valueFormatter(function(t,e){return null==t?"N/A":a.tickFormat()(t,e)});var N=null,I=null;l.updateState(!1);var P=t.utils.renderWatch(S),H=r.style(),F=function(t){return function(){return{active:t.map(function(t){return!t.disabled}),style:r.style()}}},W=function(t){return function(e){void 0!==e.style&&(H=e.style),void 0!==e.active&&t.forEach(function(t,n){t.disabled=!e.active[n]})}},L=d3.format("%");return r.dispatch.on("elementMouseover.tooltip",function(t){t.point.x=r.x()(t.point),t.point.y=r.y()(t.point),c.data(t).hidden(!1)}),r.dispatch.on("elementMouseout.tooltip",function(){c.hidden(!0)}),e.dispatch=S,e.stacked=r,e.legend=s,e.controls=l,e.xAxis=o,e.x2Axis=d.xAxis,e.yAxis=a,e.y2Axis=d.yAxis,e.interactiveLayer=u,e.tooltip=c,e.focus=d,e.dispatch=S,e.options=t.utils.optionsFunc.bind(e),e._options=Object.create({},{width:{get:function(){return f},set:function(t){f=t}},height:{get:function(){return p},set:function(t){p=t}},showLegend:{get:function(){return v},set:function(t){v=t}},showXAxis:{get:function(){return y},set:function(t){y=t}},showYAxis:{get:function(){return b},set:function(t){b=t}},defaultState:{get:function(){return M},set:function(t){M=t}},noData:{get:function(){return D},set:function(t){D=t}},showControls:{get:function(){return m},set:function(t){m=t}},controlLabels:{get:function(){return E},set:function(t){E=t}},controlOptions:{get:function(){return A},set:function(t){A=t}},showTotalInTooltip:{get:function(){return k},set:function(t){k=t}},totalLabel:{get:function(){return _},set:function(t){_=t}},focusEnable:{get:function(){return w},set:function(t){w=t}},focusHeight:{get:function(){return d.height()},set:function(t){d.height(t)}},brushExtent:{get:function(){return d.brushExtent()},set:function(t){d.brushExtent(t)}},margin:{get:function(){return h},set:function(t){h.top=void 0!==t.top?t.top:h.top,h.right=void 0!==t.right?t.right:h.right,h.bottom=void 0!==t.bottom?t.bottom:h.bottom,h.left=void 0!==t.left?t.left:h.left}},focusMargin:{get:function(){return d.margin},set:function(t){d.margin.top=void 0!==t.top?t.top:d.margin.top,d.margin.right=void 0!==t.right?t.right:d.margin.right,d.margin.bottom=void 0!==t.bottom?t.bottom:d.margin.bottom,d.margin.left=void 0!==t.left?t.left:d.margin.left
}},duration:{get:function(){return O},set:function(t){O=t,P.reset(O),r.duration(O),o.duration(O),a.duration(O)}},color:{get:function(){return g},set:function(e){g=t.utils.getColor(e),s.color(g),r.color(g),d.color(g)}},x:{get:function(){return r.x()},set:function(t){r.x(t),d.x(t)}},y:{get:function(){return r.y()},set:function(t){r.y(t),d.y(t)}},rightAlignYAxis:{get:function(){return x},set:function(t){x=t,a.orient(x?"right":"left")}},useInteractiveGuideline:{get:function(){return $},set:function(t){$=!!t,e.interactive(!t),e.useVoronoi(!t),r.scatter.interactive(!t)}}}),t.utils.inheritOptions(e,r),t.utils.initOptions(e),e},t.models.stackedAreaWithFocusChart=function(){return t.models.stackedAreaChart().margin({bottom:30}).focusEnable(!0)},t.models.sunburst=function(){"use strict";function e(t){var e=n(t);return e>90?180:0}function n(t){var e=Math.max(0,Math.min(2*Math.PI,A(t.x))),n=Math.max(0,Math.min(2*Math.PI,A(t.x+t.dx))),i=(e+n)/2*(180/Math.PI)-90;return i}function i(t){var e=Math.max(0,Math.min(2*Math.PI,A(t.x))),n=Math.max(0,Math.min(2*Math.PI,A(t.x+t.dx))),i=n-e;return i>_}function r(t,e){var n=d3.interpolate(A.domain(),[c.x,c.x+c.dx]),i=d3.interpolate(E.domain(),[c.y,1]),r=d3.interpolate(E.range(),[c.y?20:0,f]);return 0===e?function(){return I(t)}:function(e){return A.domain(n(e)),E.domain(i(e)).range(r(e)),I(t)}}function o(t){var e=d3.interpolate({x:t.x0,dx:t.dx0,y:t.y0,dy:t.dy0},t);return function(n){var i=e(n);return t.x0=i.x,t.dx0=i.dx,t.y0=i.y,t.dy0=i.dy,I(i)}}function a(t){var e=M(t);N[e]||(N[e]={});var n=N[e];n.dx=t.dx,n.x=t.x,n.dy=t.dy,n.y=t.y}function s(t){t.forEach(function(t){var e=M(t),n=N[e];n?(t.dx0=n.dx,t.x0=n.x,t.dy0=n.dy,t.y0=n.y):(t.dx0=t.dx,t.x0=t.x,t.dy0=t.dy,t.y0=t.y),a(t)})}function l(t){var o=x.selectAll("text"),a=x.selectAll("path");o.transition().attr("opacity",0),c=t,a.transition().duration(S).attrTween("d",r).each("end",function(r){if(r.x>=t.x&&r.x<t.x+t.dx&&r.depth>=t.depth){var o=d3.select(this.parentNode),a=o.select("text");a.transition().duration(S).text(function(t){return k(t)}).attr("opacity",function(t){return i(t)?1:0}).attr("transform",function(){var i=this.getBBox().width;if(0===r.depth)return"translate("+i/2*-1+",0)";if(r.depth===t.depth)return"translate("+(E(r.y)+5)+",0)";var o=n(r),a=e(r);return 0===a?"rotate("+o+")translate("+(E(r.y)+5)+",0)":"rotate("+o+")translate("+(E(r.y)+i+5)+",0)rotate("+a+")"})}})}function u(r){return P.reset(),r.each(function(r){x=d3.select(this),d=t.utils.availableWidth(g,x,p),h=t.utils.availableHeight(m,x,p),f=Math.min(d,h)/2,E.range([0,f]);var a=x.select("g.nvd3.nv-wrap.nv-sunburst");a[0][0]||(a=x.append("g").attr("class","nvd3 nv-wrap nv-sunburst nv-chart-"+b).attr("transform","translate("+d/2+","+h/2+")")),x.on("click",function(t,e){T.chartClick({data:t,index:e,pos:d3.event,id:b})}),O.value(y[v]||y.count);var u=O.nodes(r[0]).reverse();s(u);var c=a.selectAll(".arc-container").data(u,M),_=c.enter().append("g").attr("class","arc-container");_.append("path").attr("d",I).style("fill",function(t){return t.color?t.color:w(D?(t.children?t:t.parent).name:t.name)}).style("stroke","#FFF").on("click",l).on("mouseover",function(t){d3.select(this).classed("hover",!0).style("opacity",.8),T.elementMouseover({data:t,color:d3.select(this).style("fill")})}).on("mouseout",function(t){d3.select(this).classed("hover",!1).style("opacity",1),T.elementMouseout({data:t})}).on("mousemove",function(t){T.elementMousemove({data:t})}),c.each(function(){d3.select(this).select("path").transition().duration(S).attrTween("d",o)}),$&&(c.selectAll("text").remove(),c.append("text").text(function(t){return k(t)}).transition().duration(S).attr("opacity",function(t){return i(t)?1:0}).attr("transform",function(t){var i=this.getBBox().width;if(0===t.depth)return"rotate(0)translate("+i/2*-1+",0)";var r=n(t),o=e(t);return 0===o?"rotate("+r+")translate("+(E(t.y)+5)+",0)":"rotate("+r+")translate("+(E(t.y)+i+5)+",0)rotate("+o+")"})),l(u[u.length-1]),c.exit().transition().duration(S).attr("opacity",0).each("end",function(t){var e=M(t);N[e]=void 0}).remove()}),P.renderEnd("sunburst immediate"),u}var c,d,h,f,p={top:0,right:0,bottom:0,left:0},g=600,m=600,v="count",y={count:function(){return 1},value:function(t){return t.value||t.size},size:function(t){return t.value||t.size}},b=Math.floor(1e4*Math.random()),x=null,w=t.utils.defaultColor(),$=!1,k=function(t){return"count"===v?t.name+" #"+t.value:t.name+" "+(t.value||t.size)},_=.02,C=function(t,e){return t.name>e.name},M=function(t){return t.name},D=!0,S=500,T=d3.dispatch("chartClick","elementClick","elementDblClick","elementMousemove","elementMouseover","elementMouseout","renderEnd"),A=d3.scale.linear().range([0,2*Math.PI]),E=d3.scale.sqrt(),O=d3.layout.partition().sort(C),N={},I=d3.svg.arc().startAngle(function(t){return Math.max(0,Math.min(2*Math.PI,A(t.x)))}).endAngle(function(t){return Math.max(0,Math.min(2*Math.PI,A(t.x+t.dx)))}).innerRadius(function(t){return Math.max(0,E(t.y))}).outerRadius(function(t){return Math.max(0,E(t.y+t.dy))}),P=t.utils.renderWatch(T);return u.dispatch=T,u.options=t.utils.optionsFunc.bind(u),u._options=Object.create({},{width:{get:function(){return g},set:function(t){g=t}},height:{get:function(){return m},set:function(t){m=t}},mode:{get:function(){return v},set:function(t){v=t}},id:{get:function(){return b},set:function(t){b=t}},duration:{get:function(){return S},set:function(t){S=t}},groupColorByParent:{get:function(){return D},set:function(t){D=!!t}},showLabels:{get:function(){return $},set:function(t){$=!!t}},labelFormat:{get:function(){return k},set:function(t){k=t}},labelThreshold:{get:function(){return _},set:function(t){_=t}},sort:{get:function(){return C},set:function(t){C=t}},key:{get:function(){return M},set:function(t){M=t}},margin:{get:function(){return p},set:function(t){p.top=void 0!=t.top?t.top:p.top,p.right=void 0!=t.right?t.right:p.right,p.bottom=void 0!=t.bottom?t.bottom:p.bottom,p.left=void 0!=t.left?t.left:p.left}},color:{get:function(){return w},set:function(e){w=t.utils.getColor(e)}}}),t.utils.initOptions(u),u},t.models.sunburstChart=function(){"use strict";function e(i){return h.reset(),h.models(n),i.each(function(i){var s=d3.select(this);t.utils.initSVG(s);var l=t.utils.availableWidth(o,s,r),u=t.utils.availableHeight(a,s,r);return e.update=function(){0===c?s.call(e):s.transition().duration(c).call(e)},e.container=s,i&&i.length?(s.selectAll(".nv-noData").remove(),n.width(l).height(u),void s.call(n)):(t.utils.noData(e,s),e)}),h.renderEnd("sunburstChart immediate"),e}var n=t.models.sunburst(),i=t.models.tooltip(),r={top:30,right:20,bottom:20,left:20},o=null,a=null,s=t.utils.defaultColor(),l=(Math.round(1e5*Math.random()),null),u=null,c=250,d=d3.dispatch("stateChange","changeState","renderEnd"),h=t.utils.renderWatch(d);return i.duration(0).headerEnabled(!1).valueFormatter(function(t){return t}),n.dispatch.on("elementMouseover.tooltip",function(t){t.series={key:t.data.name,value:t.data.value||t.data.size,color:t.color},i.data(t).hidden(!1)}),n.dispatch.on("elementMouseout.tooltip",function(){i.hidden(!0)}),n.dispatch.on("elementMousemove.tooltip",function(){i()}),e.dispatch=d,e.sunburst=n,e.tooltip=i,e.options=t.utils.optionsFunc.bind(e),e._options=Object.create({},{noData:{get:function(){return u},set:function(t){u=t}},defaultState:{get:function(){return l},set:function(t){l=t}},color:{get:function(){return s},set:function(t){s=t,n.color(s)}},duration:{get:function(){return c},set:function(t){c=t,h.reset(c),n.duration(c)}},margin:{get:function(){return r},set:function(t){r.top=void 0!==t.top?t.top:r.top,r.right=void 0!==t.right?t.right:r.right,r.bottom=void 0!==t.bottom?t.bottom:r.bottom,r.left=void 0!==t.left?t.left:r.left}}}),t.utils.inheritOptions(e,n),t.utils.initOptions(e),e},t.version="1.8.3-dev"}(),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(t){"use strict";var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),/* ========================================================================
 * Bootstrap: transition.js v3.3.2
 * http://getbootstrap.com/javascript/#transitions
 * ========================================================================
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * ======================================================================== */
+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in e)if(void 0!==t.style[n])return{end:e[n]};return!1}t.fn.emulateTransitionEnd=function(e){var n=!1,i=this;t(this).one("bsTransitionEnd",function(){n=!0});var r=function(){n||t(i).trigger(t.support.transition.end)};return setTimeout(r,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){return t(e.target).is(this)?e.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),/* ========================================================================
 * Bootstrap: alert.js v3.3.2
 * http://getbootstrap.com/javascript/#alerts
 * ========================================================================
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * ======================================================================== */
+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),r=n.data("bs.alert");r||n.data("bs.alert",r=new i(this)),"string"==typeof e&&r[e].call(n)})}var n='[data-dismiss="alert"]',i=function(e){t(e).on("click",n,this.close)};i.VERSION="3.3.2",i.TRANSITION_DURATION=150,i.prototype.close=function(e){function n(){a.detach().trigger("closed.bs.alert").remove()}var r=t(this),o=r.attr("data-target");o||(o=r.attr("href"),o=o&&o.replace(/.*(?=#[^\s]*$)/,""));var a=t(o);e&&e.preventDefault(),a.length||(a=r.closest(".alert")),a.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(a.removeClass("in"),t.support.transition&&a.hasClass("fade")?a.one("bsTransitionEnd",n).emulateTransitionEnd(i.TRANSITION_DURATION):n())};var r=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=i,t.fn.alert.noConflict=function(){return t.fn.alert=r,this},t(document).on("click.bs.alert.data-api",n,i.prototype.close)}(jQuery),/* ========================================================================
 * Bootstrap: button.js v3.3.2
 * http://getbootstrap.com/javascript/#buttons
 * ========================================================================
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * ======================================================================== */
+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.button"),o="object"==typeof e&&e;r||i.data("bs.button",r=new n(this,o)),"toggle"==e?r.toggle():e&&r.setState(e)})}var n=function(e,i){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,i),this.isLoading=!1};n.VERSION="3.3.2",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(e){var n="disabled",i=this.$element,r=i.is("input")?"val":"html",o=i.data();e+="Text",null==o.resetText&&i.data("resetText",i[r]()),setTimeout(t.proxy(function(){i[r](null==o[e]?this.options[e]:o[e]),"loadingText"==e?(this.isLoading=!0,i.addClass(n).attr(n,n)):this.isLoading&&(this.isLoading=!1,i.removeClass(n).removeAttr(n))},this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var n=this.$element.find("input");"radio"==n.prop("type")&&(n.prop("checked")&&this.$element.hasClass("active")?t=!1:e.find(".active").removeClass("active")),t&&n.prop("checked",!this.$element.hasClass("active")).trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));t&&this.$element.toggleClass("active")};var i=t.fn.button;t.fn.button=e,t.fn.button.Constructor=n,t.fn.button.noConflict=function(){return t.fn.button=i,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(n){var i=t(n.target);i.hasClass("btn")||(i=i.closest(".btn")),e.call(i,"toggle"),n.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery),/* ========================================================================
 * Bootstrap: carousel.js v3.3.2
 * http://getbootstrap.com/javascript/#carousel
 * ========================================================================
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * ======================================================================== */
+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.carousel"),o=t.extend({},n.DEFAULTS,i.data(),"object"==typeof e&&e),a="string"==typeof e?e:o.slide;r||i.data("bs.carousel",r=new n(this,o)),"number"==typeof e?r.to(e):a?r[a]():o.interval&&r.pause().cycle()})}var n=function(e,n){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=this.sliding=this.interval=this.$active=this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};n.VERSION="3.3.2",n.TRANSITION_DURATION=600,n.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},n.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},n.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},n.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},n.prototype.getItemForDirection=function(t,e){var n=this.getItemIndex(e),i="prev"==t&&0===n||"next"==t&&n==this.$items.length-1;if(i&&!this.options.wrap)return e;var r="prev"==t?-1:1,o=(n+r)%this.$items.length;return this.$items.eq(o)},n.prototype.to=function(t){var e=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));return t>this.$items.length-1||0>t?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",this.$items.eq(t))},n.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},n.prototype.next=function(){return this.sliding?void 0:this.slide("next")},n.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},n.prototype.slide=function(e,i){var r=this.$element.find(".item.active"),o=i||this.getItemForDirection(e,r),a=this.interval,s="next"==e?"left":"right",l=this;if(o.hasClass("active"))return this.sliding=!1;var u=o[0],c=t.Event("slide.bs.carousel",{relatedTarget:u,direction:s});if(this.$element.trigger(c),!c.isDefaultPrevented()){if(this.sliding=!0,a&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var d=t(this.$indicators.children()[this.getItemIndex(o)]);d&&d.addClass("active")}var h=t.Event("slid.bs.carousel",{relatedTarget:u,direction:s});return t.support.transition&&this.$element.hasClass("slide")?(o.addClass(e),o[0].offsetWidth,r.addClass(s),o.addClass(s),r.one("bsTransitionEnd",function(){o.removeClass([e,s].join(" ")).addClass("active"),r.removeClass(["active",s].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(h)},0)}).emulateTransitionEnd(n.TRANSITION_DURATION)):(r.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(h)),a&&this.cycle(),this}};var i=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=n,t.fn.carousel.noConflict=function(){return t.fn.carousel=i,this};var r=function(n){var i,r=t(this),o=t(r.attr("data-target")||(i=r.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,""));if(o.hasClass("carousel")){var a=t.extend({},o.data(),r.data()),s=r.attr("data-slide-to");s&&(a.interval=!1),e.call(o,a),s&&o.data("bs.carousel").to(s),n.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",r).on("click.bs.carousel.data-api","[data-slide-to]",r),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var n=t(this);e.call(n,n.data())})})}(jQuery),/* ========================================================================
 * Bootstrap: collapse.js v3.3.2
 * http://getbootstrap.com/javascript/#collapse
 * ========================================================================
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * ======================================================================== */
+function(t){"use strict";function e(e){var n,i=e.attr("data-target")||(n=e.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return t(i)}function n(e){return this.each(function(){var n=t(this),r=n.data("bs.collapse"),o=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e);!r&&o.toggle&&"show"==e&&(o.toggle=!1),r||n.data("bs.collapse",r=new i(this,o)),"string"==typeof e&&r[e]()})}var i=function(e,n){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,n),this.$trigger=t(this.options.trigger).filter('[href="#'+e.id+'"], [data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};i.VERSION="3.3.2",i.TRANSITION_DURATION=350,i.DEFAULTS={toggle:!0,trigger:'[data-toggle="collapse"]'},i.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},i.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,r=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(r&&r.length&&(e=r.data("bs.collapse"),e&&e.transitioning))){var o=t.Event("show.bs.collapse");if(this.$element.trigger(o),!o.isDefaultPrevented()){r&&r.length&&(n.call(r,"hide"),e||r.data("bs.collapse",null));var a=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[a](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var s=function(){this.$element.removeClass("collapsing").addClass("collapse in")[a](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return s.call(this);var l=t.camelCase(["scroll",a].join("-"));this.$element.one("bsTransitionEnd",t.proxy(s,this)).emulateTransitionEnd(i.TRANSITION_DURATION)[a](this.$element[0][l])}}}},i.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var r=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[n](0).one("bsTransitionEnd",t.proxy(r,this)).emulateTransitionEnd(i.TRANSITION_DURATION):r.call(this)}}},i.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},i.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(n,i){var r=t(i);this.addAriaAndCollapsedClass(e(r),r)},this)).end()},i.prototype.addAriaAndCollapsedClass=function(t,e){var n=t.hasClass("in");t.attr("aria-expanded",n),e.toggleClass("collapsed",!n).attr("aria-expanded",n)};var r=t.fn.collapse;t.fn.collapse=n,t.fn.collapse.Constructor=i,t.fn.collapse.noConflict=function(){return t.fn.collapse=r,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(i){var r=t(this);r.attr("data-target")||i.preventDefault();var o=e(r),a=o.data("bs.collapse"),s=a?"toggle":t.extend({},r.data(),{trigger:this});n.call(o,s)})}(jQuery),/* ========================================================================
 * Bootstrap: dropdown.js v3.3.2
 * http://getbootstrap.com/javascript/#dropdowns
 * ========================================================================
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * ======================================================================== */
+function(t){"use strict";function e(e){e&&3===e.which||(t(r).remove(),t(o).each(function(){var i=t(this),r=n(i),o={relatedTarget:this};r.hasClass("open")&&(r.trigger(e=t.Event("hide.bs.dropdown",o)),e.isDefaultPrevented()||(i.attr("aria-expanded","false"),r.removeClass("open").trigger("hidden.bs.dropdown",o)))}))}function n(e){var n=e.attr("data-target");n||(n=e.attr("href"),n=n&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i=n&&t(n);return i&&i.length?i:e.parent()}function i(e){return this.each(function(){var n=t(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new a(this)),"string"==typeof e&&i[e].call(n)})}var r=".dropdown-backdrop",o='[data-toggle="dropdown"]',a=function(e){t(e).on("click.bs.dropdown",this.toggle)};a.VERSION="3.3.2",a.prototype.toggle=function(i){var r=t(this);if(!r.is(".disabled, :disabled")){var o=n(r),a=o.hasClass("open");if(e(),!a){"ontouchstart"in document.documentElement&&!o.closest(".navbar-nav").length&&t('<div class="dropdown-backdrop"/>').insertAfter(t(this)).on("click",e);var s={relatedTarget:this};if(o.trigger(i=t.Event("show.bs.dropdown",s)),i.isDefaultPrevented())return;r.trigger("focus").attr("aria-expanded","true"),o.toggleClass("open").trigger("shown.bs.dropdown",s)}return!1}},a.prototype.keydown=function(e){if(/(38|40|27|32)/.test(e.which)&&!/input|textarea/i.test(e.target.tagName)){var i=t(this);if(e.preventDefault(),e.stopPropagation(),!i.is(".disabled, :disabled")){var r=n(i),a=r.hasClass("open");if(!a&&27!=e.which||a&&27==e.which)return 27==e.which&&r.find(o).trigger("focus"),i.trigger("click");var s=" li:not(.divider):visible a",l=r.find('[role="menu"]'+s+', [role="listbox"]'+s);if(l.length){var u=l.index(e.target);38==e.which&&u>0&&u--,40==e.which&&u<l.length-1&&u++,~u||(u=0),l.eq(u).trigger("focus")}}}};var s=t.fn.dropdown;t.fn.dropdown=i,t.fn.dropdown.Constructor=a,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=s,this},t(document).on("click.bs.dropdown.data-api",e).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",o,a.prototype.toggle).on("keydown.bs.dropdown.data-api",o,a.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="menu"]',a.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="listbox"]',a.prototype.keydown)}(jQuery),/* ========================================================================
 * Bootstrap: modal.js v3.3.2
 * http://getbootstrap.com/javascript/#modals
 * ========================================================================
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * ======================================================================== */
+function(t){"use strict";function e(e,i){return this.each(function(){var r=t(this),o=r.data("bs.modal"),a=t.extend({},n.DEFAULTS,r.data(),"object"==typeof e&&e);o||r.data("bs.modal",o=new n(this,a)),"string"==typeof e?o[e](i):a.show&&o.show(i)})}var n=function(e,n){this.options=n,this.$body=t(document.body),this.$element=t(e),this.$backdrop=this.isShown=null,this.scrollbarWidth=0,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};n.VERSION="3.3.2",n.TRANSITION_DURATION=300,n.BACKDROP_TRANSITION_DURATION=150,n.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},n.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},n.prototype.show=function(e){var i=this,r=t.Event("show.bs.modal",{relatedTarget:e});this.$element.trigger(r),this.isShown||r.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.backdrop(function(){var r=t.support.transition&&i.$element.hasClass("fade");i.$element.parent().length||i.$element.appendTo(i.$body),i.$element.show().scrollTop(0),i.options.backdrop&&i.adjustBackdrop(),i.adjustDialog(),r&&i.$element[0].offsetWidth,i.$element.addClass("in").attr("aria-hidden",!1),i.enforceFocus();var o=t.Event("shown.bs.modal",{relatedTarget:e});r?i.$element.find(".modal-dialog").one("bsTransitionEnd",function(){i.$element.trigger("focus").trigger(o)}).emulateTransitionEnd(n.TRANSITION_DURATION):i.$element.trigger("focus").trigger(o)}))},n.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(n.TRANSITION_DURATION):this.hideModal())},n.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},n.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",t.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},n.prototype.resize=function(){this.isShown?t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this)):t(window).off("resize.bs.modal")},n.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},n.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},n.prototype.backdrop=function(e){var i=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var o=t.support.transition&&r;if(this.$backdrop=t('<div class="modal-backdrop '+r+'" />').prependTo(this.$element).on("click.dismiss.bs.modal",t.proxy(function(t){t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),o&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;o?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var a=function(){i.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",a).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):a()}else e&&e()},n.prototype.handleUpdate=function(){this.options.backdrop&&this.adjustBackdrop(),this.adjustDialog()},n.prototype.adjustBackdrop=function(){this.$backdrop.css("height",0).css("height",this.$element[0].scrollHeight)},n.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},n.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},n.prototype.checkScrollbar=function(){this.bodyIsOverflowing=document.body.scrollHeight>document.documentElement.clientHeight,this.scrollbarWidth=this.measureScrollbar()},n.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.bodyIsOverflowing&&this.$body.css("padding-right",t+this.scrollbarWidth)},n.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},n.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var i=t.fn.modal;t.fn.modal=e,t.fn.modal.Constructor=n,t.fn.modal.noConflict=function(){return t.fn.modal=i,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(n){var i=t(this),r=i.attr("href"),o=t(i.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),a=o.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(r)&&r},o.data(),i.data());i.is("a")&&n.preventDefault(),o.one("show.bs.modal",function(t){t.isDefaultPrevented()||o.one("hidden.bs.modal",function(){i.is(":visible")&&i.trigger("focus")})}),e.call(o,a,this)})}(jQuery),/* ========================================================================
 * Bootstrap: tooltip.js v3.3.2
 * http://getbootstrap.com/javascript/#tooltip
 * Inspired by the original jQuery.tipsy by Jason Frame
 * ========================================================================
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * ======================================================================== */
+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.tooltip"),o="object"==typeof e&&e;(r||"destroy"!=e)&&(r||i.data("bs.tooltip",r=new n(this,o)),"string"==typeof e&&r[e]())})}var n=function(t,e){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",t,e)};n.VERSION="3.3.2",n.TRANSITION_DURATION=150,n.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},n.prototype.init=function(e,n,i){this.enabled=!0,this.type=e,this.$element=t(n),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&t(this.options.viewport.selector||this.options.viewport);for(var r=this.options.trigger.split(" "),o=r.length;o--;){var a=r[o];if("click"==a)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=a){var s="hover"==a?"mouseenter":"focusin",l="hover"==a?"mouseleave":"focusout";this.$element.on(s+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},n.prototype.getDelegateOptions=function(){var e={},n=this.getDefaults();return this._options&&t.each(this._options,function(t,i){n[t]!=i&&(e[t]=i)}),e},n.prototype.enter=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return n&&n.$tip&&n.$tip.is(":visible")?void(n.hoverState="in"):(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),clearTimeout(n.timeout),n.hoverState="in",n.options.delay&&n.options.delay.show?void(n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)):n.show())},n.prototype.leave=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),clearTimeout(n.timeout),n.hoverState="out",n.options.delay&&n.options.delay.hide?void(n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)):n.hide()},n.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var i=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!i)return;var r=this,o=this.tip(),a=this.getUID(this.type);this.setContent(),o.attr("id",a),this.$element.attr("aria-describedby",a),this.options.animation&&o.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,u=l.test(s);u&&(s=s.replace(l,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?o.appendTo(this.options.container):o.insertAfter(this.$element);var c=this.getPosition(),d=o[0].offsetWidth,h=o[0].offsetHeight;if(u){var f=s,p=this.options.container?t(this.options.container):this.$element.parent(),g=this.getPosition(p);s="bottom"==s&&c.bottom+h>g.bottom?"top":"top"==s&&c.top-h<g.top?"bottom":"right"==s&&c.right+d>g.width?"left":"left"==s&&c.left-d<g.left?"right":s,o.removeClass(f).addClass(s)}var m=this.getCalculatedOffset(s,c,d,h);this.applyPlacement(m,s);var v=function(){var t=r.hoverState;r.$element.trigger("shown.bs."+r.type),r.hoverState=null,"out"==t&&r.leave(r)};t.support.transition&&this.$tip.hasClass("fade")?o.one("bsTransitionEnd",v).emulateTransitionEnd(n.TRANSITION_DURATION):v()}},n.prototype.applyPlacement=function(e,n){var i=this.tip(),r=i[0].offsetWidth,o=i[0].offsetHeight,a=parseInt(i.css("margin-top"),10),s=parseInt(i.css("margin-left"),10);isNaN(a)&&(a=0),isNaN(s)&&(s=0),e.top=e.top+a,e.left=e.left+s,t.offset.setOffset(i[0],t.extend({using:function(t){i.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),i.addClass("in");var l=i[0].offsetWidth,u=i[0].offsetHeight;"top"==n&&u!=o&&(e.top=e.top+o-u);var c=this.getViewportAdjustedDelta(n,e,l,u);c.left?e.left+=c.left:e.top+=c.top;var d=/top|bottom/.test(n),h=d?2*c.left-r+l:2*c.top-o+u,f=d?"offsetWidth":"offsetHeight";i.offset(e),this.replaceArrow(h,i[0][f],d)},n.prototype.replaceArrow=function(t,e,n){this.arrow().css(n?"left":"top",50*(1-t/e)+"%").css(n?"top":"left","")},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(e){function i(){"in"!=r.hoverState&&o.detach(),r.$element.removeAttr("aria-describedby").trigger("hidden.bs."+r.type),e&&e()}var r=this,o=this.tip(),a=t.Event("hide.bs."+this.type);return this.$element.trigger(a),a.isDefaultPrevented()?void 0:(o.removeClass("in"),t.support.transition&&this.$tip.hasClass("fade")?o.one("bsTransitionEnd",i).emulateTransitionEnd(n.TRANSITION_DURATION):i(),this.hoverState=null,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(e){e=e||this.$element;var n=e[0],i="BODY"==n.tagName,r=n.getBoundingClientRect();null==r.width&&(r=t.extend({},r,{width:r.right-r.left,height:r.bottom-r.top}));var o=i?{top:0,left:0}:e.offset(),a={scroll:i?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},s=i?{width:t(window).width(),height:t(window).height()}:null;return t.extend({},r,a,s,o)},n.prototype.getCalculatedOffset=function(t,e,n,i){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-n/2}:"top"==t?{top:e.top-i,left:e.left+e.width/2-n/2}:"left"==t?{top:e.top+e.height/2-i/2,left:e.left-n}:{top:e.top+e.height/2-i/2,left:e.left+e.width}},n.prototype.getViewportAdjustedDelta=function(t,e,n,i){var r={top:0,left:0};if(!this.$viewport)return r;var o=this.options.viewport&&this.options.viewport.padding||0,a=this.getPosition(this.$viewport);if(/right|left/.test(t)){var s=e.top-o-a.scroll,l=e.top+o-a.scroll+i;s<a.top?r.top=a.top-s:l>a.top+a.height&&(r.top=a.top+a.height-l)}else{var u=e.left-o,c=e.left+o+n;u<a.left?r.left=a.left-u:c>a.width&&(r.left=a.left+a.width-c)}return r},n.prototype.getTitle=function(){var t,e=this.$element,n=this.options;return t=e.attr("data-original-title")||("function"==typeof n.title?n.title.call(e[0]):n.title)},n.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},n.prototype.tip=function(){return this.$tip=this.$tip||t(this.options.template)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},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(e){var n=this;e&&(n=t(e.currentTarget).data("bs."+this.type),n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n))),n.tip().hasClass("in")?n.leave(n):n.enter(n)},n.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type)})};var i=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=n,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=i,this}}(jQuery),/* ========================================================================
 * Bootstrap: popover.js v3.3.2
 * http://getbootstrap.com/javascript/#popovers
 * ========================================================================
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * ======================================================================== */
+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.popover"),o="object"==typeof e&&e;(r||"destroy"!=e)&&(r||i.data("bs.popover",r=new n(this,o)),"string"==typeof e&&r[e]())})}var n=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");n.VERSION="3.3.2",n.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),n.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),n.prototype.constructor=n,n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),n=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof n?"html":"append":"text"](n),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},n.prototype.hasContent=function(){return this.getTitle()||this.getContent()},n.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)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},n.prototype.tip=function(){return this.$tip||(this.$tip=t(this.options.template)),this.$tip};var i=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=n,t.fn.popover.noConflict=function(){return t.fn.popover=i,this}}(jQuery),/* ========================================================================
 * Bootstrap: scrollspy.js v3.3.2
 * http://getbootstrap.com/javascript/#scrollspy
 * ========================================================================
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * ======================================================================== */
+function(t){"use strict";function e(n,i){var r=t.proxy(this.process,this);this.$body=t("body"),this.$scrollElement=t(t(n).is("body")?window:n),this.options=t.extend({},e.DEFAULTS,i),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",r),this.refresh(),this.process()}function n(n){return this.each(function(){var i=t(this),r=i.data("bs.scrollspy"),o="object"==typeof n&&n;r||i.data("bs.scrollspy",r=new e(this,o)),"string"==typeof n&&r[n]()})}e.VERSION="3.3.2",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e="offset",n=0;t.isWindow(this.$scrollElement[0])||(e="position",n=this.$scrollElement.scrollTop()),this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight();var i=this;this.$body.find(this.selector).map(function(){var i=t(this),r=i.data("target")||i.attr("href"),o=/^#./.test(r)&&t(r);return o&&o.length&&o.is(":visible")&&[[o[e]().top+n,r]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){i.offsets.push(this[0]),i.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),i=this.options.offset+n-this.$scrollElement.height(),r=this.offsets,o=this.targets,a=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),e>=i)return a!=(t=o[o.length-1])&&this.activate(t);if(a&&e<r[0])return this.activeTarget=null,this.clear();for(t=r.length;t--;)a!=o[t]&&e>=r[t]&&(!r[t+1]||e<=r[t+1])&&this.activate(o[t])},e.prototype.activate=function(e){this.activeTarget=e,this.clear();var n=this.selector+'[data-target="'+e+'"],'+this.selector+'[href="'+e+'"]',i=t(n).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate.bs.scrollspy")},e.prototype.clear=function(){t(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var i=t.fn.scrollspy;t.fn.scrollspy=n,t.fn.scrollspy.Constructor=e,t.fn.scrollspy.noConflict=function(){return t.fn.scrollspy=i,this},t(window).on("load.bs.scrollspy.data-api",function(){t('[data-spy="scroll"]').each(function(){var e=t(this);n.call(e,e.data())})})}(jQuery),/* ========================================================================
 * Bootstrap: tab.js v3.3.2
 * http://getbootstrap.com/javascript/#tabs
 * ========================================================================
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * ======================================================================== */
+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.tab");r||i.data("bs.tab",r=new n(this)),"string"==typeof e&&r[e]()})}var n=function(e){this.element=t(e)};n.VERSION="3.3.2",n.TRANSITION_DURATION=150,n.prototype.show=function(){var e=this.element,n=e.closest("ul:not(.dropdown-menu)"),i=e.data("target");if(i||(i=e.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var r=n.find(".active:last a"),o=t.Event("hide.bs.tab",{relatedTarget:e[0]}),a=t.Event("show.bs.tab",{relatedTarget:r[0]});if(r.trigger(o),e.trigger(a),!a.isDefaultPrevented()&&!o.isDefaultPrevented()){var s=t(i);this.activate(e.closest("li"),n),this.activate(s,s.parent(),function(){r.trigger({type:"hidden.bs.tab",relatedTarget:e[0]}),e.trigger({type:"shown.bs.tab",relatedTarget:r[0]})})}}},n.prototype.activate=function(e,i,r){function o(){a.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),s?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu")&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),r&&r()}var a=i.find("> .active"),s=r&&t.support.transition&&(a.length&&a.hasClass("fade")||!!i.find("> .fade").length);a.length&&s?a.one("bsTransitionEnd",o).emulateTransitionEnd(n.TRANSITION_DURATION):o(),a.removeClass("in")};var i=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=n,t.fn.tab.noConflict=function(){return t.fn.tab=i,this};var r=function(n){n.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',r).on("click.bs.tab.data-api",'[data-toggle="pill"]',r)}(jQuery),/* ========================================================================
 * Bootstrap: affix.js v3.3.2
 * http://getbootstrap.com/javascript/#affix
 * ========================================================================
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * ======================================================================== */
+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.affix"),o="object"==typeof e&&e;r||i.data("bs.affix",r=new n(this,o)),"string"==typeof e&&r[e]()})}var n=function(e,i){this.options=t.extend({},n.DEFAULTS,i),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};n.VERSION="3.3.2",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getState=function(t,e,n,i){var r=this.$target.scrollTop(),o=this.$element.offset(),a=this.$target.height();if(null!=n&&"top"==this.affixed)return n>r?"top":!1;if("bottom"==this.affixed)return null!=n?r+this.unpin<=o.top?!1:"bottom":t-i>=r+a?!1:"bottom";var s=null==this.affixed,l=s?r:o.top,u=s?a:e;return null!=n&&n>=r?"top":null!=i&&l+u>=t-i?"bottom":!1},n.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(n.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},n.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),i=this.options.offset,r=i.top,o=i.bottom,a=t("body").height();"object"!=typeof i&&(o=r=i),"function"==typeof r&&(r=i.top(this.$element)),"function"==typeof o&&(o=i.bottom(this.$element));var s=this.getState(a,e,r,o);if(this.affixed!=s){null!=this.unpin&&this.$element.css("top","");var l="affix"+(s?"-"+s:""),u=t.Event(l+".bs.affix");if(this.$element.trigger(u),u.isDefaultPrevented())return;this.affixed=s,this.unpin="bottom"==s?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==s&&this.$element.offset({top:a-e-o})}};var i=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=n,t.fn.affix.noConflict=function(){return t.fn.affix=i,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var n=t(this),i=n.data();i.offset=i.offset||{},null!=i.offsetBottom&&(i.offset.bottom=i.offsetBottom),null!=i.offsetTop&&(i.offset.top=i.offsetTop),e.call(n,i)})})}(jQuery),/*
 * angular-ui-bootstrap
 * http://angular-ui.github.io/bootstrap/

 * Version: 0.12.1 - 2015-02-20
 * License: MIT
 */
angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.transition","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.bindHtml","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.dropdown","ui.bootstrap.modal","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["template/accordion/accordion-group.html","template/accordion/accordion.html","template/alert/alert.html","template/carousel/carousel.html","template/carousel/slide.html","template/datepicker/datepicker.html","template/datepicker/day.html","template/datepicker/month.html","template/datepicker/popup.html","template/datepicker/year.html","template/modal/backdrop.html","template/modal/window.html","template/pagination/pager.html","template/pagination/pagination.html","template/tooltip/tooltip-html-unsafe-popup.html","template/tooltip/tooltip-popup.html","template/popover/popover.html","template/progressbar/bar.html","template/progressbar/progress.html","template/progressbar/progressbar.html","template/rating/rating.html","template/tabs/tab.html","template/tabs/tabset.html","template/timepicker/timepicker.html","template/typeahead/typeahead-match.html","template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.transition",[]).factory("$transition",["$q","$timeout","$rootScope",function(t,e,n){function i(t){for(var e in t)if(void 0!==o.style[e])return t[e]}var r=function(i,o,a){a=a||{};var s=t.defer(),l=r[a.animation?"animationEndEventName":"transitionEndEventName"],u=function(){n.$apply(function(){i.unbind(l,u),s.resolve(i)})};return l&&i.bind(l,u),e(function(){angular.isString(o)?i.addClass(o):angular.isFunction(o)?o(i):angular.isObject(o)&&i.css(o),l||s.resolve(i)}),s.promise.cancel=function(){l&&i.unbind(l,u),s.reject("Transition cancelled")},s.promise},o=document.createElement("trans"),a={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"},s={WebkitTransition:"webkitAnimationEnd",MozTransition:"animationend",OTransition:"oAnimationEnd",transition:"animationend"};return r.transitionEndEventName=i(a),r.animationEndEventName=i(s),r}]),angular.module("ui.bootstrap.collapse",["ui.bootstrap.transition"]).directive("collapse",["$transition",function(t){return{link:function(e,n,i){function r(e){function i(){u===r&&(u=void 0)}var r=t(n,e);return u&&u.cancel(),u=r,r.then(i,i),r}function o(){c?(c=!1,a()):(n.removeClass("collapse").addClass("collapsing"),r({height:n[0].scrollHeight+"px"}).then(a))}function a(){n.removeClass("collapsing"),n.addClass("collapse in"),n.css({height:"auto"})}function s(){if(c)c=!1,l(),n.css({height:0});else{n.css({height:n[0].scrollHeight+"px"});{n[0].offsetWidth}n.removeClass("collapse in").addClass("collapsing"),r({height:0}).then(l)}}function l(){n.removeClass("collapsing"),n.addClass("collapse")}var u,c=!0;e.$watch(i.collapse,function(t){t?s():o()})}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("accordionConfig",{closeOthers:!0}).controller("AccordionController",["$scope","$attrs","accordionConfig",function(t,e,n){this.groups=[],this.closeOthers=function(i){var r=angular.isDefined(e.closeOthers)?t.$eval(e.closeOthers):n.closeOthers;r&&angular.forEach(this.groups,function(t){t!==i&&(t.isOpen=!1)})},this.addGroup=function(t){var e=this;this.groups.push(t),t.$on("$destroy",function(){e.removeGroup(t)})},this.removeGroup=function(t){var e=this.groups.indexOf(t);-1!==e&&this.groups.splice(e,1)}}]).directive("accordion",function(){return{restrict:"EA",controller:"AccordionController",transclude:!0,replace:!1,templateUrl:"template/accordion/accordion.html"}}).directive("accordionGroup",function(){return{require:"^accordion",restrict:"EA",transclude:!0,replace:!0,templateUrl:"template/accordion/accordion-group.html",scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(t){this.heading=t}},link:function(t,e,n,i){i.addGroup(t),t.$watch("isOpen",function(e){e&&i.closeOthers(t)}),t.toggleOpen=function(){t.isDisabled||(t.isOpen=!t.isOpen)}}}}).directive("accordionHeading",function(){return{restrict:"EA",transclude:!0,template:"",replace:!0,require:"^accordionGroup",link:function(t,e,n,i,r){i.setHeading(r(t,function(){}))}}}).directive("accordionTransclude",function(){return{require:"^accordionGroup",link:function(t,e,n,i){t.$watch(function(){return i[n.accordionTransclude]},function(t){t&&(e.html(""),e.append(t))})}}}),angular.module("ui.bootstrap.alert",[]).controller("AlertController",["$scope","$attrs",function(t,e){t.closeable="close"in e,this.close=t.close}]).directive("alert",function(){return{restrict:"EA",controller:"AlertController",templateUrl:"template/alert/alert.html",transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}).directive("dismissOnTimeout",["$timeout",function(t){return{require:"alert",link:function(e,n,i,r){t(function(){r.close()},parseInt(i.dismissOnTimeout,10))}}}]),angular.module("ui.bootstrap.bindHtml",[]).directive("bindHtmlUnsafe",function(){return function(t,e,n){e.addClass("ng-binding").data("$binding",n.bindHtmlUnsafe),t.$watch(n.bindHtmlUnsafe,function(t){e.html(t||"")})}}),angular.module("ui.bootstrap.buttons",[]).constant("buttonConfig",{activeClass:"active",toggleEvent:"click"}).controller("ButtonsController",["buttonConfig",function(t){this.activeClass=t.activeClass||"active",this.toggleEvent=t.toggleEvent||"click"}]).directive("btnRadio",function(){return{require:["btnRadio","ngModel"],controller:"ButtonsController",link:function(t,e,n,i){var r=i[0],o=i[1];o.$render=function(){e.toggleClass(r.activeClass,angular.equals(o.$modelValue,t.$eval(n.btnRadio)))},e.bind(r.toggleEvent,function(){var i=e.hasClass(r.activeClass);(!i||angular.isDefined(n.uncheckable))&&t.$apply(function(){o.$setViewValue(i?null:t.$eval(n.btnRadio)),o.$render()})})}}}).directive("btnCheckbox",function(){return{require:["btnCheckbox","ngModel"],controller:"ButtonsController",link:function(t,e,n,i){function r(){return a(n.btnCheckboxTrue,!0)}function o(){return a(n.btnCheckboxFalse,!1)}function a(e,n){var i=t.$eval(e);return angular.isDefined(i)?i:n}var s=i[0],l=i[1];l.$render=function(){e.toggleClass(s.activeClass,angular.equals(l.$modelValue,r()))},e.bind(s.toggleEvent,function(){t.$apply(function(){l.$setViewValue(e.hasClass(s.activeClass)?o():r()),l.$render()})})}}}),angular.module("ui.bootstrap.carousel",["ui.bootstrap.transition"]).controller("CarouselController",["$scope","$timeout","$interval","$transition",function(t,e,n,i){function r(){o();var e=+t.interval;!isNaN(e)&&e>0&&(s=n(a,e))}function o(){s&&(n.cancel(s),s=null)}function a(){var e=+t.interval;l&&!isNaN(e)&&e>0?t.next():t.pause()}var s,l,u=this,c=u.slides=t.slides=[],d=-1;u.currentSlide=null;var h=!1;u.select=t.select=function(n,o){function a(){if(!h){if(u.currentSlide&&angular.isString(o)&&!t.noTransition&&n.$element){n.$element.addClass(o);{n.$element[0].offsetWidth}angular.forEach(c,function(t){angular.extend(t,{direction:"",entering:!1,leaving:!1,active:!1})}),angular.extend(n,{direction:o,active:!0,entering:!0}),angular.extend(u.currentSlide||{},{direction:o,leaving:!0}),t.$currentTransition=i(n.$element,{}),function(e,n){t.$currentTransition.then(function(){s(e,n)},function(){s(e,n)})}(n,u.currentSlide)}else s(n,u.currentSlide);u.currentSlide=n,d=l,r()}}function s(e,n){angular.extend(e,{direction:"",active:!0,leaving:!1,entering:!1}),angular.extend(n||{},{direction:"",active:!1,leaving:!1,entering:!1}),t.$currentTransition=null}var l=c.indexOf(n);void 0===o&&(o=l>d?"next":"prev"),n&&n!==u.currentSlide&&(t.$currentTransition?(t.$currentTransition.cancel(),e(a)):a())},t.$on("$destroy",function(){h=!0}),u.indexOfSlide=function(t){return c.indexOf(t)},t.next=function(){var e=(d+1)%c.length;return t.$currentTransition?void 0:u.select(c[e],"next")},t.prev=function(){var e=0>d-1?c.length-1:d-1;return t.$currentTransition?void 0:u.select(c[e],"prev")},t.isActive=function(t){return u.currentSlide===t},t.$watch("interval",r),t.$on("$destroy",o),t.play=function(){l||(l=!0,r())},t.pause=function(){t.noPause||(l=!1,o())},u.addSlide=function(e,n){e.$element=n,c.push(e),1===c.length||e.active?(u.select(c[c.length-1]),1==c.length&&t.play()):e.active=!1},u.removeSlide=function(t){var e=c.indexOf(t);c.splice(e,1),c.length>0&&t.active?u.select(e>=c.length?c[e-1]:c[e]):d>e&&d--}}]).directive("carousel",[function(){return{restrict:"EA",transclude:!0,replace:!0,controller:"CarouselController",require:"carousel",templateUrl:"template/carousel/carousel.html",scope:{interval:"=",noTransition:"=",noPause:"="}}}]).directive("slide",function(){return{require:"^carousel",restrict:"EA",transclude:!0,replace:!0,templateUrl:"template/carousel/slide.html",scope:{active:"=?"},link:function(t,e,n,i){i.addSlide(t,e),t.$on("$destroy",function(){i.removeSlide(t)}),t.$watch("active",function(e){e&&i.select(t)})}}}),angular.module("ui.bootstrap.dateparser",[]).service("dateParser",["$locale","orderByFilter",function(t,e){function n(t){var n=[],i=t.split("");return angular.forEach(r,function(e,r){var o=t.indexOf(r);if(o>-1){t=t.split(""),i[o]="("+e.regex+")",t[o]="$";for(var a=o+1,s=o+r.length;s>a;a++)i[a]="",t[a]="$";t=t.join(""),n.push({index:o,apply:e.apply})}}),{regex:new RegExp("^"+i.join("")+"$"),map:e(n,"index")}}function i(t,e,n){return 1===e&&n>28?29===n&&(t%4===0&&t%100!==0||t%400===0):3===e||5===e||8===e||10===e?31>n:!0}this.parsers={};var r={yyyy:{regex:"\\d{4}",apply:function(t){this.year=+t}},yy:{regex:"\\d{2}",apply:function(t){this.year=+t+2e3}},y:{regex:"\\d{1,4}",apply:function(t){this.year=+t}},MMMM:{regex:t.DATETIME_FORMATS.MONTH.join("|"),apply:function(e){this.month=t.DATETIME_FORMATS.MONTH.indexOf(e)}},MMM:{regex:t.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(e){this.month=t.DATETIME_FORMATS.SHORTMONTH.indexOf(e)}},MM:{regex:"0[1-9]|1[0-2]",apply:function(t){this.month=t-1}},M:{regex:"[1-9]|1[0-2]",apply:function(t){this.month=t-1}},dd:{regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(t){this.date=+t}},d:{regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(t){this.date=+t}},EEEE:{regex:t.DATETIME_FORMATS.DAY.join("|")},EEE:{regex:t.DATETIME_FORMATS.SHORTDAY.join("|")}};this.parse=function(e,r){if(!angular.isString(e)||!r)return e;r=t.DATETIME_FORMATS[r]||r,this.parsers[r]||(this.parsers[r]=n(r));var o=this.parsers[r],a=o.regex,s=o.map,l=e.match(a);if(l&&l.length){for(var u,c={year:1900,month:0,date:1,hours:0},d=1,h=l.length;h>d;d++){var f=s[d-1];f.apply&&f.apply.call(c,l[d])}return i(c.year,c.month,c.date)&&(u=new Date(c.year,c.month,c.date,c.hours)),u}}}]),angular.module("ui.bootstrap.position",[]).factory("$position",["$document","$window",function(t,e){function n(t,n){return t.currentStyle?t.currentStyle[n]:e.getComputedStyle?e.getComputedStyle(t)[n]:t.style[n]}function i(t){return"static"===(n(t,"position")||"static")}var r=function(e){for(var n=t[0],r=e.offsetParent||n;r&&r!==n&&i(r);)r=r.offsetParent;return r||n};return{position:function(e){var n=this.offset(e),i={top:0,left:0},o=r(e[0]);o!=t[0]&&(i=this.offset(angular.element(o)),i.top+=o.clientTop-o.scrollTop,i.left+=o.clientLeft-o.scrollLeft);var a=e[0].getBoundingClientRect();return{width:a.width||e.prop("offsetWidth"),height:a.height||e.prop("offsetHeight"),top:n.top-i.top,left:n.left-i.left}},offset:function(n){var i=n[0].getBoundingClientRect();return{width:i.width||n.prop("offsetWidth"),height:i.height||n.prop("offsetHeight"),top:i.top+(e.pageYOffset||t[0].documentElement.scrollTop),left:i.left+(e.pageXOffset||t[0].documentElement.scrollLeft)}},positionElements:function(t,e,n,i){var r,o,a,s,l=n.split("-"),u=l[0],c=l[1]||"center";r=i?this.offset(t):this.position(t),o=e.prop("offsetWidth"),a=e.prop("offsetHeight");var d={center:function(){return r.left+r.width/2-o/2},left:function(){return r.left},right:function(){return r.left+r.width}},h={center:function(){return r.top+r.height/2-a/2},top:function(){return r.top},bottom:function(){return r.top+r.height}};switch(u){case"right":s={top:h[c](),left:d[u]()};break;case"left":s={top:h[c](),left:r.left-o};break;case"bottom":s={top:h[u](),left:d[c]()};break;default:s={top:r.top-a,left:d[c]()}}return s}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.position"]).constant("datepickerConfig",{formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",datepickerMode:"day",minMode:"day",maxMode:"year",showWeeks:!0,startingDay:0,yearRange:20,minDate:null,maxDate:null}).controller("DatepickerController",["$scope","$attrs","$parse","$interpolate","$timeout","$log","dateFilter","datepickerConfig",function(t,e,n,i,r,o,a,s){var l=this,u={$setViewValue:angular.noop};this.modes=["day","month","year"],angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","minMode","maxMode","showWeeks","startingDay","yearRange"],function(n,r){l[n]=angular.isDefined(e[n])?8>r?i(e[n])(t.$parent):t.$parent.$eval(e[n]):s[n]}),angular.forEach(["minDate","maxDate"],function(i){e[i]?t.$parent.$watch(n(e[i]),function(t){l[i]=t?new Date(t):null,l.refreshView()}):l[i]=s[i]?new Date(s[i]):null}),t.datepickerMode=t.datepickerMode||s.datepickerMode,t.uniqueId="datepicker-"+t.$id+"-"+Math.floor(1e4*Math.random()),this.activeDate=angular.isDefined(e.initDate)?t.$parent.$eval(e.initDate):new Date,t.isActive=function(e){return 0===l.compare(e.date,l.activeDate)?(t.activeDateId=e.uid,!0):!1},this.init=function(t){u=t,u.$render=function(){l.render()}},this.render=function(){if(u.$modelValue){var t=new Date(u.$modelValue),e=!isNaN(t);e?this.activeDate=t:o.error('Datepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.'),u.$setValidity("date",e)}this.refreshView()},this.refreshView=function(){if(this.element){this._refreshView();var t=u.$modelValue?new Date(u.$modelValue):null;u.$setValidity("date-disabled",!t||this.element&&!this.isDisabled(t))}},this.createDateObject=function(t,e){var n=u.$modelValue?new Date(u.$modelValue):null;return{date:t,label:a(t,e),selected:n&&0===this.compare(t,n),disabled:this.isDisabled(t),current:0===this.compare(t,new Date)}},this.isDisabled=function(n){return this.minDate&&this.compare(n,this.minDate)<0||this.maxDate&&this.compare(n,this.maxDate)>0||e.dateDisabled&&t.dateDisabled({date:n,mode:t.datepickerMode})},this.split=function(t,e){for(var n=[];t.length>0;)n.push(t.splice(0,e));return n},t.select=function(e){if(t.datepickerMode===l.minMode){var n=u.$modelValue?new Date(u.$modelValue):new Date(0,0,0,0,0,0,0);n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),u.$setViewValue(n),u.$render()}else l.activeDate=e,t.datepickerMode=l.modes[l.modes.indexOf(t.datepickerMode)-1]},t.move=function(t){var e=l.activeDate.getFullYear()+t*(l.step.years||0),n=l.activeDate.getMonth()+t*(l.step.months||0);l.activeDate.setFullYear(e,n,1),l.refreshView()},t.toggleMode=function(e){e=e||1,t.datepickerMode===l.maxMode&&1===e||t.datepickerMode===l.minMode&&-1===e||(t.datepickerMode=l.modes[l.modes.indexOf(t.datepickerMode)+e])},t.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var c=function(){r(function(){l.element[0].focus()},0,!1)};t.$on("datepicker.focus",c),t.keydown=function(e){var n=t.keys[e.which];if(n&&!e.shiftKey&&!e.altKey)if(e.preventDefault(),e.stopPropagation(),"enter"===n||"space"===n){if(l.isDisabled(l.activeDate))return;t.select(l.activeDate),c()}else!e.ctrlKey||"up"!==n&&"down"!==n?(l.handleKeyDown(n,e),l.refreshView()):(t.toggleMode("up"===n?1:-1),c())}}]).directive("datepicker",function(){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/datepicker.html",scope:{datepickerMode:"=?",dateDisabled:"&"},require:["datepicker","?^ngModel"],controller:"DatepickerController",link:function(t,e,n,i){var r=i[0],o=i[1];o&&r.init(o)}}}).directive("daypicker",["dateFilter",function(t){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/day.html",require:"^datepicker",link:function(e,n,i,r){function o(t,e){return 1!==e||t%4!==0||t%100===0&&t%400!==0?l[e]:29}function a(t,e){var n=new Array(e),i=new Date(t),r=0;for(i.setHours(12);e>r;)n[r++]=new Date(i),i.setDate(i.getDate()+1);return n}function s(t){var e=new Date(t);e.setDate(e.getDate()+4-(e.getDay()||7));var n=e.getTime();return e.setMonth(0),e.setDate(1),Math.floor(Math.round((n-e)/864e5)/7)+1}e.showWeeks=r.showWeeks,r.step={months:1},r.element=n;var l=[31,28,31,30,31,30,31,31,30,31,30,31];r._refreshView=function(){var n=r.activeDate.getFullYear(),i=r.activeDate.getMonth(),o=new Date(n,i,1),l=r.startingDay-o.getDay(),u=l>0?7-l:-l,c=new Date(o);u>0&&c.setDate(-u+1);for(var d=a(c,42),h=0;42>h;h++)d[h]=angular.extend(r.createDateObject(d[h],r.formatDay),{secondary:d[h].getMonth()!==i,uid:e.uniqueId+"-"+h});e.labels=new Array(7);for(var f=0;7>f;f++)e.labels[f]={abbr:t(d[f].date,r.formatDayHeader),full:t(d[f].date,"EEEE")};if(e.title=t(r.activeDate,r.formatDayTitle),e.rows=r.split(d,7),e.showWeeks){e.weekNumbers=[];for(var p=s(e.rows[0][0].date),g=e.rows.length;e.weekNumbers.push(p++)<g;);}},r.compare=function(t,e){return new Date(t.getFullYear(),t.getMonth(),t.getDate())-new Date(e.getFullYear(),e.getMonth(),e.getDate())},r.handleKeyDown=function(t){var e=r.activeDate.getDate();if("left"===t)e-=1;else if("up"===t)e-=7;else if("right"===t)e+=1;else if("down"===t)e+=7;else if("pageup"===t||"pagedown"===t){var n=r.activeDate.getMonth()+("pageup"===t?-1:1);r.activeDate.setMonth(n,1),e=Math.min(o(r.activeDate.getFullYear(),r.activeDate.getMonth()),e)}else"home"===t?e=1:"end"===t&&(e=o(r.activeDate.getFullYear(),r.activeDate.getMonth()));r.activeDate.setDate(e)},r.refreshView()}}}]).directive("monthpicker",["dateFilter",function(t){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/month.html",require:"^datepicker",link:function(e,n,i,r){r.step={years:1},r.element=n,r._refreshView=function(){for(var n=new Array(12),i=r.activeDate.getFullYear(),o=0;12>o;o++)n[o]=angular.extend(r.createDateObject(new Date(i,o,1),r.formatMonth),{uid:e.uniqueId+"-"+o});e.title=t(r.activeDate,r.formatMonthTitle),e.rows=r.split(n,3)},r.compare=function(t,e){return new Date(t.getFullYear(),t.getMonth())-new Date(e.getFullYear(),e.getMonth())},r.handleKeyDown=function(t){var e=r.activeDate.getMonth();if("left"===t)e-=1;else if("up"===t)e-=3;else if("right"===t)e+=1;else if("down"===t)e+=3;else if("pageup"===t||"pagedown"===t){var n=r.activeDate.getFullYear()+("pageup"===t?-1:1);r.activeDate.setFullYear(n)}else"home"===t?e=0:"end"===t&&(e=11);r.activeDate.setMonth(e)},r.refreshView()}}}]).directive("yearpicker",["dateFilter",function(){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/year.html",require:"^datepicker",link:function(t,e,n,i){function r(t){return parseInt((t-1)/o,10)*o+1}var o=i.yearRange;i.step={years:o},i.element=e,i._refreshView=function(){for(var e=new Array(o),n=0,a=r(i.activeDate.getFullYear());o>n;n++)e[n]=angular.extend(i.createDateObject(new Date(a+n,0,1),i.formatYear),{uid:t.uniqueId+"-"+n});t.title=[e[0].label,e[o-1].label].join(" - "),t.rows=i.split(e,5)},i.compare=function(t,e){return t.getFullYear()-e.getFullYear()},i.handleKeyDown=function(t){var e=i.activeDate.getFullYear();"left"===t?e-=1:"up"===t?e-=5:"right"===t?e+=1:"down"===t?e+=5:"pageup"===t||"pagedown"===t?e+=("pageup"===t?-1:1)*i.step.years:"home"===t?e=r(i.activeDate.getFullYear()):"end"===t&&(e=r(i.activeDate.getFullYear())+o-1),i.activeDate.setFullYear(e)},i.refreshView()}}}]).constant("datepickerPopupConfig",{datepickerPopup:"yyyy-MM-dd",currentText:"Today",clearText:"Clear",closeText:"Done",closeOnDateSelection:!0,appendToBody:!1,showButtonBar:!0}).directive("datepickerPopup",["$compile","$parse","$document","$position","dateFilter","dateParser","datepickerPopupConfig",function(t,e,n,i,r,o,a){return{restrict:"EA",require:"ngModel",scope:{isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&"},link:function(s,l,u,c){function d(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}function h(t){if(t){if(angular.isDate(t)&&!isNaN(t))return c.$setValidity("date",!0),t;if(angular.isString(t)){var e=o.parse(t,f)||new Date(t);return isNaN(e)?void c.$setValidity("date",!1):(c.$setValidity("date",!0),e)}return void c.$setValidity("date",!1)}return c.$setValidity("date",!0),null}var f,p=angular.isDefined(u.closeOnDateSelection)?s.$parent.$eval(u.closeOnDateSelection):a.closeOnDateSelection,g=angular.isDefined(u.datepickerAppendToBody)?s.$parent.$eval(u.datepickerAppendToBody):a.appendToBody;s.showButtonBar=angular.isDefined(u.showButtonBar)?s.$parent.$eval(u.showButtonBar):a.showButtonBar,s.getText=function(t){return s[t+"Text"]||a[t+"Text"]},u.$observe("datepickerPopup",function(t){f=t||a.datepickerPopup,c.$render()});var m=angular.element("<div datepicker-popup-wrap><div datepicker></div></div>");m.attr({"ng-model":"date","ng-change":"dateSelection()"});var v=angular.element(m.children()[0]);u.datepickerOptions&&angular.forEach(s.$parent.$eval(u.datepickerOptions),function(t,e){v.attr(d(e),t)}),s.watchData={},angular.forEach(["minDate","maxDate","datepickerMode"],function(t){if(u[t]){var n=e(u[t]);if(s.$parent.$watch(n,function(e){s.watchData[t]=e}),v.attr(d(t),"watchData."+t),"datepickerMode"===t){var i=n.assign;s.$watch("watchData."+t,function(t,e){t!==e&&i(s.$parent,t)})}}}),u.dateDisabled&&v.attr("date-disabled","dateDisabled({ date: date, mode: mode })"),c.$parsers.unshift(h),s.dateSelection=function(t){angular.isDefined(t)&&(s.date=t),c.$setViewValue(s.date),c.$render(),p&&(s.isOpen=!1,l[0].focus())},l.bind("input change keyup",function(){s.$apply(function(){s.date=c.$modelValue})}),c.$render=function(){var t=c.$viewValue?r(c.$viewValue,f):"";l.val(t),s.date=h(c.$modelValue)};var y=function(t){s.isOpen&&t.target!==l[0]&&s.$apply(function(){s.isOpen=!1})},b=function(t){s.keydown(t)};l.bind("keydown",b),s.keydown=function(t){27===t.which?(t.preventDefault(),t.stopPropagation(),s.close()):40!==t.which||s.isOpen||(s.isOpen=!0)},s.$watch("isOpen",function(t){t?(s.$broadcast("datepicker.focus"),s.position=g?i.offset(l):i.position(l),s.position.top=s.position.top+l.prop("offsetHeight"),n.bind("click",y)):n.unbind("click",y)}),s.select=function(t){if("today"===t){var e=new Date;angular.isDate(c.$modelValue)?(t=new Date(c.$modelValue),t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate())):t=new Date(e.setHours(0,0,0,0))}s.dateSelection(t)},s.close=function(){s.isOpen=!1,l[0].focus()};var x=t(m)(s);m.remove(),g?n.find("body").append(x):l.after(x),s.$on("$destroy",function(){x.remove(),l.unbind("keydown",b),n.unbind("click",y)})}}}]).directive("datepickerPopupWrap",function(){return{restrict:"EA",replace:!0,transclude:!0,templateUrl:"template/datepicker/popup.html",link:function(t,e){e.bind("click",function(t){t.preventDefault(),t.stopPropagation()})}}}),angular.module("ui.bootstrap.dropdown",[]).constant("dropdownConfig",{openClass:"open"}).service("dropdownService",["$document",function(t){var e=null;this.open=function(r){e||(t.bind("click",n),t.bind("keydown",i)),e&&e!==r&&(e.isOpen=!1),e=r},this.close=function(r){e===r&&(e=null,t.unbind("click",n),t.unbind("keydown",i))};var n=function(t){if(e){var n=e.getToggleElement();t&&n&&n[0].contains(t.target)||e.$apply(function(){e.isOpen=!1})}},i=function(t){27===t.which&&(e.focusToggleElement(),n())}}]).controller("DropdownController",["$scope","$attrs","$parse","dropdownConfig","dropdownService","$animate",function(t,e,n,i,r,o){var a,s=this,l=t.$new(),u=i.openClass,c=angular.noop,d=e.onToggle?n(e.onToggle):angular.noop;this.init=function(i){s.$element=i,e.isOpen&&(a=n(e.isOpen),c=a.assign,t.$watch(a,function(t){l.isOpen=!!t}))},this.toggle=function(t){return l.isOpen=arguments.length?!!t:!l.isOpen},this.isOpen=function(){return l.isOpen},l.getToggleElement=function(){return s.toggleElement},l.focusToggleElement=function(){s.toggleElement&&s.toggleElement[0].focus()},l.$watch("isOpen",function(e,n){o[e?"addClass":"removeClass"](s.$element,u),e?(l.focusToggleElement(),r.open(l)):r.close(l),c(t,e),angular.isDefined(e)&&e!==n&&d(t,{open:!!e})}),t.$on("$locationChangeSuccess",function(){l.isOpen=!1}),t.$on("$destroy",function(){l.$destroy()})}]).directive("dropdown",function(){return{controller:"DropdownController",link:function(t,e,n,i){i.init(e)}}}).directive("dropdownToggle",function(){return{require:"?^dropdown",link:function(t,e,n,i){if(i){i.toggleElement=e;var r=function(r){r.preventDefault(),e.hasClass("disabled")||n.disabled||t.$apply(function(){i.toggle()})};e.bind("click",r),e.attr({"aria-haspopup":!0,"aria-expanded":!1}),t.$watch(i.isOpen,function(t){e.attr("aria-expanded",!!t)}),t.$on("$destroy",function(){e.unbind("click",r)})}}}}),angular.module("ui.bootstrap.modal",["ui.bootstrap.transition"]).factory("$$stackedMap",function(){return{createNew:function(){var t=[];return{add:function(e,n){t.push({key:e,value:n})},get:function(e){for(var n=0;n<t.length;n++)if(e==t[n].key)return t[n]},keys:function(){for(var e=[],n=0;n<t.length;n++)e.push(t[n].key);return e},top:function(){return t[t.length-1]},remove:function(e){for(var n=-1,i=0;i<t.length;i++)if(e==t[i].key){n=i;break}return t.splice(n,1)[0]},removeTop:function(){return t.splice(t.length-1,1)[0]},length:function(){return t.length}}}}}).directive("modalBackdrop",["$timeout",function(t){return{restrict:"EA",replace:!0,templateUrl:"template/modal/backdrop.html",link:function(e,n,i){e.backdropClass=i.backdropClass||"",e.animate=!1,t(function(){e.animate=!0})}}}]).directive("modalWindow",["$modalStack","$timeout",function(t,e){return{restrict:"EA",scope:{index:"@",animate:"="},replace:!0,transclude:!0,templateUrl:function(t,e){return e.templateUrl||"template/modal/window.html"},link:function(n,i,r){i.addClass(r.windowClass||""),n.size=r.size,e(function(){n.animate=!0,i[0].querySelectorAll("[autofocus]").length||i[0].focus()}),n.close=function(e){var n=t.getTop();n&&n.value.backdrop&&"static"!=n.value.backdrop&&e.target===e.currentTarget&&(e.preventDefault(),e.stopPropagation(),t.dismiss(n.key,"backdrop click"))}}}}]).directive("modalTransclude",function(){return{link:function(t,e,n,i,r){r(t.$parent,function(t){e.empty(),e.append(t)})}}}).factory("$modalStack",["$transition","$timeout","$document","$compile","$rootScope","$$stackedMap",function(t,e,n,i,r,o){function a(){for(var t=-1,e=f.keys(),n=0;n<e.length;n++)f.get(e[n]).value.backdrop&&(t=n);return t}function s(t){var e=n.find("body").eq(0),i=f.get(t).value;f.remove(t),u(i.modalDomEl,i.modalScope,300,function(){i.modalScope.$destroy(),e.toggleClass(h,f.length()>0),l()})}function l(){if(c&&-1==a()){var t=d;u(c,d,150,function(){t.$destroy(),t=null}),c=void 0,d=void 0}}function u(n,i,r,o){function a(){a.done||(a.done=!0,n.remove(),o&&o())}i.animate=!1;var s=t.transitionEndEventName;if(s){var l=e(a,r);n.bind(s,function(){e.cancel(l),a(),i.$apply()})}else e(a)}var c,d,h="modal-open",f=o.createNew(),p={};return r.$watch(a,function(t){d&&(d.index=t)}),n.bind("keydown",function(t){var e;27===t.which&&(e=f.top(),e&&e.value.keyboard&&(t.preventDefault(),r.$apply(function(){p.dismiss(e.key,"escape key press")})))}),p.open=function(t,e){f.add(t,{deferred:e.deferred,modalScope:e.scope,backdrop:e.backdrop,keyboard:e.keyboard});var o=n.find("body").eq(0),s=a();if(s>=0&&!c){d=r.$new(!0),d.index=s;var l=angular.element("<div modal-backdrop></div>");l.attr("backdrop-class",e.backdropClass),c=i(l)(d),o.append(c)}var u=angular.element("<div modal-window></div>");u.attr({"template-url":e.windowTemplateUrl,"window-class":e.windowClass,size:e.size,index:f.length()-1,animate:"animate"}).html(e.content);var p=i(u)(e.scope);f.top().value.modalDomEl=p,o.append(p),o.addClass(h)},p.close=function(t,e){var n=f.get(t);n&&(n.value.deferred.resolve(e),s(t))},p.dismiss=function(t,e){var n=f.get(t);n&&(n.value.deferred.reject(e),s(t))},p.dismissAll=function(t){for(var e=this.getTop();e;)this.dismiss(e.key,t),e=this.getTop()},p.getTop=function(){return f.top()},p}]).provider("$modal",function(){var t={options:{backdrop:!0,keyboard:!0},$get:["$injector","$rootScope","$q","$http","$templateCache","$controller","$modalStack",function(e,n,i,r,o,a,s){function l(t){return t.template?i.when(t.template):r.get(angular.isFunction(t.templateUrl)?t.templateUrl():t.templateUrl,{cache:o}).then(function(t){return t.data})}function u(t){var n=[];return angular.forEach(t,function(t){(angular.isFunction(t)||angular.isArray(t))&&n.push(i.when(e.invoke(t)))}),n}var c={};return c.open=function(e){var r=i.defer(),o=i.defer(),c={result:r.promise,opened:o.promise,close:function(t){s.close(c,t)},dismiss:function(t){s.dismiss(c,t)}};if(e=angular.extend({},t.options,e),e.resolve=e.resolve||{},!e.template&&!e.templateUrl)throw new Error("One of template or templateUrl options is required.");var d=i.all([l(e)].concat(u(e.resolve)));return d.then(function(t){var i=(e.scope||n).$new();i.$close=c.close,i.$dismiss=c.dismiss;var o,l={},u=1;e.controller&&(l.$scope=i,l.$modalInstance=c,angular.forEach(e.resolve,function(e,n){l[n]=t[u++]}),o=a(e.controller,l),e.controllerAs&&(i[e.controllerAs]=o)),s.open(c,{scope:i,deferred:r,content:t[0],backdrop:e.backdrop,keyboard:e.keyboard,backdropClass:e.backdropClass,windowClass:e.windowClass,windowTemplateUrl:e.windowTemplateUrl,size:e.size})},function(t){r.reject(t)}),d.then(function(){o.resolve(!0)},function(){o.reject(!1)}),c},c}]};return t}),angular.module("ui.bootstrap.pagination",[]).controller("PaginationController",["$scope","$attrs","$parse",function(t,e,n){var i=this,r={$setViewValue:angular.noop},o=e.numPages?n(e.numPages).assign:angular.noop;this.init=function(o,a){r=o,this.config=a,r.$render=function(){i.render()},e.itemsPerPage?t.$parent.$watch(n(e.itemsPerPage),function(e){i.itemsPerPage=parseInt(e,10),t.totalPages=i.calculateTotalPages()}):this.itemsPerPage=a.itemsPerPage},this.calculateTotalPages=function(){var e=this.itemsPerPage<1?1:Math.ceil(t.totalItems/this.itemsPerPage);return Math.max(e||0,1)},this.render=function(){t.page=parseInt(r.$viewValue,10)||1},t.selectPage=function(e){t.page!==e&&e>0&&e<=t.totalPages&&(r.$setViewValue(e),r.$render())},t.getText=function(e){return t[e+"Text"]||i.config[e+"Text"]},t.noPrevious=function(){return 1===t.page},t.noNext=function(){return t.page===t.totalPages},t.$watch("totalItems",function(){t.totalPages=i.calculateTotalPages()}),t.$watch("totalPages",function(e){o(t.$parent,e),t.page>e?t.selectPage(e):r.$render()})}]).constant("paginationConfig",{itemsPerPage:10,boundaryLinks:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0}).directive("pagination",["$parse","paginationConfig",function(t,e){return{restrict:"EA",scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@"},require:["pagination","?ngModel"],controller:"PaginationController",templateUrl:"template/pagination/pagination.html",replace:!0,link:function(n,i,r,o){function a(t,e,n){return{number:t,text:e,active:n}}function s(t,e){var n=[],i=1,r=e,o=angular.isDefined(c)&&e>c;o&&(d?(i=Math.max(t-Math.floor(c/2),1),r=i+c-1,r>e&&(r=e,i=r-c+1)):(i=(Math.ceil(t/c)-1)*c+1,r=Math.min(i+c-1,e)));for(var s=i;r>=s;s++){var l=a(s,s,s===t);n.push(l)}if(o&&!d){if(i>1){var u=a(i-1,"...",!1);n.unshift(u)}if(e>r){var h=a(r+1,"...",!1);n.push(h)}}return n}var l=o[0],u=o[1];if(u){var c=angular.isDefined(r.maxSize)?n.$parent.$eval(r.maxSize):e.maxSize,d=angular.isDefined(r.rotate)?n.$parent.$eval(r.rotate):e.rotate;n.boundaryLinks=angular.isDefined(r.boundaryLinks)?n.$parent.$eval(r.boundaryLinks):e.boundaryLinks,n.directionLinks=angular.isDefined(r.directionLinks)?n.$parent.$eval(r.directionLinks):e.directionLinks,l.init(u,e),r.maxSize&&n.$parent.$watch(t(r.maxSize),function(t){c=parseInt(t,10),l.render()
});var h=l.render;l.render=function(){h(),n.page>0&&n.page<=n.totalPages&&(n.pages=s(n.page,n.totalPages))}}}}}]).constant("pagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("pager",["pagerConfig",function(t){return{restrict:"EA",scope:{totalItems:"=",previousText:"@",nextText:"@"},require:["pager","?ngModel"],controller:"PaginationController",templateUrl:"template/pagination/pager.html",replace:!0,link:function(e,n,i,r){var o=r[0],a=r[1];a&&(e.align=angular.isDefined(i.align)?e.$parent.$eval(i.align):t.align,o.init(a,t))}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.bindHtml"]).provider("$tooltip",function(){function t(t){var e=/[A-Z]/g,n="-";return t.replace(e,function(t,e){return(e?n:"")+t.toLowerCase()})}var e={placement:"top",animation:!0,popupDelay:0},n={mouseenter:"mouseleave",click:"click",focus:"blur"},i={};this.options=function(t){angular.extend(i,t)},this.setTriggers=function(t){angular.extend(n,t)},this.$get=["$window","$compile","$timeout","$document","$position","$interpolate",function(r,o,a,s,l,u){return function(r,c,d){function h(t){var e=t||f.trigger||d,i=n[e]||e;return{show:e,hide:i}}var f=angular.extend({},e,i),p=t(r),g=u.startSymbol(),m=u.endSymbol(),v="<div "+p+'-popup title="'+g+"title"+m+'" content="'+g+"content"+m+'" placement="'+g+"placement"+m+'" animation="animation" is-open="isOpen"></div>';return{restrict:"EA",compile:function(){var t=o(v);return function(e,n,i){function o(){T.isOpen?d():u()}function u(){(!S||e.$eval(i[c+"Enable"]))&&(y(),T.popupDelay?C||(C=a(p,T.popupDelay,!1),C.then(function(t){t()})):p()())}function d(){e.$apply(function(){g()})}function p(){return C=null,_&&(a.cancel(_),_=null),T.content?(m(),$.css({top:0,left:0,display:"block"}),T.$digest(),A(),T.isOpen=!0,T.$digest(),A):angular.noop}function g(){T.isOpen=!1,a.cancel(C),C=null,T.animation?_||(_=a(v,500)):v()}function m(){$&&v(),k=T.$new(),$=t(k,function(t){M?s.find("body").append(t):n.after(t)})}function v(){_=null,$&&($.remove(),$=null),k&&(k.$destroy(),k=null)}function y(){b(),x()}function b(){var t=i[c+"Placement"];T.placement=angular.isDefined(t)?t:f.placement}function x(){var t=i[c+"PopupDelay"],e=parseInt(t,10);T.popupDelay=isNaN(e)?f.popupDelay:e}function w(){var t=i[c+"Trigger"];E(),D=h(t),D.show===D.hide?n.bind(D.show,o):(n.bind(D.show,u),n.bind(D.hide,d))}var $,k,_,C,M=angular.isDefined(f.appendToBody)?f.appendToBody:!1,D=h(void 0),S=angular.isDefined(i[c+"Enable"]),T=e.$new(!0),A=function(){var t=l.positionElements(n,$,T.placement,M);t.top+="px",t.left+="px",$.css(t)};T.isOpen=!1,i.$observe(r,function(t){T.content=t,!t&&T.isOpen&&g()}),i.$observe(c+"Title",function(t){T.title=t});var E=function(){n.unbind(D.show,u),n.unbind(D.hide,d)};w();var O=e.$eval(i[c+"Animation"]);T.animation=angular.isDefined(O)?!!O:f.animation;var N=e.$eval(i[c+"AppendToBody"]);M=angular.isDefined(N)?N:M,M&&e.$on("$locationChangeSuccess",function(){T.isOpen&&g()}),e.$on("$destroy",function(){a.cancel(_),a.cancel(C),E(),v(),T=null})}}}}}]}).directive("tooltipPopup",function(){return{restrict:"EA",replace:!0,scope:{content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-popup.html"}}).directive("tooltip",["$tooltip",function(t){return t("tooltip","tooltip","mouseenter")}]).directive("tooltipHtmlUnsafePopup",function(){return{restrict:"EA",replace:!0,scope:{content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-html-unsafe-popup.html"}}).directive("tooltipHtmlUnsafe",["$tooltip",function(t){return t("tooltipHtmlUnsafe","tooltip","mouseenter")}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("popoverPopup",function(){return{restrict:"EA",replace:!0,scope:{title:"@",content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover.html"}}).directive("popover",["$tooltip",function(t){return t("popover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("progressConfig",{animate:!0,max:100}).controller("ProgressController",["$scope","$attrs","progressConfig",function(t,e,n){var i=this,r=angular.isDefined(e.animate)?t.$parent.$eval(e.animate):n.animate;this.bars=[],t.max=angular.isDefined(e.max)?t.$parent.$eval(e.max):n.max,this.addBar=function(e,n){r||n.css({transition:"none"}),this.bars.push(e),e.$watch("value",function(n){e.percent=+(100*n/t.max).toFixed(2)}),e.$on("$destroy",function(){n=null,i.removeBar(e)})},this.removeBar=function(t){this.bars.splice(this.bars.indexOf(t),1)}}]).directive("progress",function(){return{restrict:"EA",replace:!0,transclude:!0,controller:"ProgressController",require:"progress",scope:{},templateUrl:"template/progressbar/progress.html"}}).directive("bar",function(){return{restrict:"EA",replace:!0,transclude:!0,require:"^progress",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/bar.html",link:function(t,e,n,i){i.addBar(t,e)}}}).directive("progressbar",function(){return{restrict:"EA",replace:!0,transclude:!0,controller:"ProgressController",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/progressbar.html",link:function(t,e,n,i){i.addBar(t,angular.element(e.children()[0]))}}}),angular.module("ui.bootstrap.rating",[]).constant("ratingConfig",{max:5,stateOn:null,stateOff:null}).controller("RatingController",["$scope","$attrs","ratingConfig",function(t,e,n){var i={$setViewValue:angular.noop};this.init=function(r){i=r,i.$render=this.render,this.stateOn=angular.isDefined(e.stateOn)?t.$parent.$eval(e.stateOn):n.stateOn,this.stateOff=angular.isDefined(e.stateOff)?t.$parent.$eval(e.stateOff):n.stateOff;var o=angular.isDefined(e.ratingStates)?t.$parent.$eval(e.ratingStates):new Array(angular.isDefined(e.max)?t.$parent.$eval(e.max):n.max);t.range=this.buildTemplateObjects(o)},this.buildTemplateObjects=function(t){for(var e=0,n=t.length;n>e;e++)t[e]=angular.extend({index:e},{stateOn:this.stateOn,stateOff:this.stateOff},t[e]);return t},t.rate=function(e){!t.readonly&&e>=0&&e<=t.range.length&&(i.$setViewValue(e),i.$render())},t.enter=function(e){t.readonly||(t.value=e),t.onHover({value:e})},t.reset=function(){t.value=i.$viewValue,t.onLeave()},t.onKeydown=function(e){/(37|38|39|40)/.test(e.which)&&(e.preventDefault(),e.stopPropagation(),t.rate(t.value+(38===e.which||39===e.which?1:-1)))},this.render=function(){t.value=i.$viewValue}}]).directive("rating",function(){return{restrict:"EA",require:["rating","ngModel"],scope:{readonly:"=?",onHover:"&",onLeave:"&"},controller:"RatingController",templateUrl:"template/rating/rating.html",replace:!0,link:function(t,e,n,i){var r=i[0],o=i[1];o&&r.init(o)}}}),angular.module("ui.bootstrap.tabs",[]).controller("TabsetController",["$scope",function(t){var e=this,n=e.tabs=t.tabs=[];e.select=function(t){angular.forEach(n,function(e){e.active&&e!==t&&(e.active=!1,e.onDeselect())}),t.active=!0,t.onSelect()},e.addTab=function(t){n.push(t),1===n.length?t.active=!0:t.active&&e.select(t)},e.removeTab=function(t){var r=n.indexOf(t);if(t.active&&n.length>1&&!i){var o=r==n.length-1?r-1:r+1;e.select(n[o])}n.splice(r,1)};var i;t.$on("$destroy",function(){i=!0})}]).directive("tabset",function(){return{restrict:"EA",transclude:!0,replace:!0,scope:{type:"@"},controller:"TabsetController",templateUrl:"template/tabs/tabset.html",link:function(t,e,n){t.vertical=angular.isDefined(n.vertical)?t.$parent.$eval(n.vertical):!1,t.justified=angular.isDefined(n.justified)?t.$parent.$eval(n.justified):!1}}}).directive("tab",["$parse",function(t){return{require:"^tabset",restrict:"EA",replace:!0,templateUrl:"template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},compile:function(e,n,i){return function(e,n,r,o){e.$watch("active",function(t){t&&o.select(e)}),e.disabled=!1,r.disabled&&e.$parent.$watch(t(r.disabled),function(t){e.disabled=!!t}),e.select=function(){e.disabled||(e.active=!0)},o.addTab(e),e.$on("$destroy",function(){o.removeTab(e)}),e.$transcludeFn=i}}}}]).directive("tabHeadingTransclude",[function(){return{restrict:"A",require:"^tab",link:function(t,e){t.$watch("headingElement",function(t){t&&(e.html(""),e.append(t))})}}}]).directive("tabContentTransclude",function(){function t(t){return t.tagName&&(t.hasAttribute("tab-heading")||t.hasAttribute("data-tab-heading")||"tab-heading"===t.tagName.toLowerCase()||"data-tab-heading"===t.tagName.toLowerCase())}return{restrict:"A",require:"^tabset",link:function(e,n,i){var r=e.$eval(i.tabContentTransclude);r.$transcludeFn(r.$parent,function(e){angular.forEach(e,function(e){t(e)?r.headingElement=e:n.append(e)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("timepickerConfig",{hourStep:1,minuteStep:1,showMeridian:!0,meridians:null,readonlyInput:!1,mousewheel:!0}).controller("TimepickerController",["$scope","$attrs","$parse","$log","$locale","timepickerConfig",function(t,e,n,i,r,o){function a(){var e=parseInt(t.hours,10),n=t.showMeridian?e>0&&13>e:e>=0&&24>e;return n?(t.showMeridian&&(12===e&&(e=0),t.meridian===g[1]&&(e+=12)),e):void 0}function s(){var e=parseInt(t.minutes,10);return e>=0&&60>e?e:void 0}function l(t){return angular.isDefined(t)&&t.toString().length<2?"0"+t:t}function u(t){c(),p.$setViewValue(new Date(f)),d(t)}function c(){p.$setValidity("time",!0),t.invalidHours=!1,t.invalidMinutes=!1}function d(e){var n=f.getHours(),i=f.getMinutes();t.showMeridian&&(n=0===n||12===n?12:n%12),t.hours="h"===e?n:l(n),t.minutes="m"===e?i:l(i),t.meridian=f.getHours()<12?g[0]:g[1]}function h(t){var e=new Date(f.getTime()+6e4*t);f.setHours(e.getHours(),e.getMinutes()),u()}var f=new Date,p={$setViewValue:angular.noop},g=angular.isDefined(e.meridians)?t.$parent.$eval(e.meridians):o.meridians||r.DATETIME_FORMATS.AMPMS;this.init=function(n,i){p=n,p.$render=this.render;var r=i.eq(0),a=i.eq(1),s=angular.isDefined(e.mousewheel)?t.$parent.$eval(e.mousewheel):o.mousewheel;s&&this.setupMousewheelEvents(r,a),t.readonlyInput=angular.isDefined(e.readonlyInput)?t.$parent.$eval(e.readonlyInput):o.readonlyInput,this.setupInputEvents(r,a)};var m=o.hourStep;e.hourStep&&t.$parent.$watch(n(e.hourStep),function(t){m=parseInt(t,10)});var v=o.minuteStep;e.minuteStep&&t.$parent.$watch(n(e.minuteStep),function(t){v=parseInt(t,10)}),t.showMeridian=o.showMeridian,e.showMeridian&&t.$parent.$watch(n(e.showMeridian),function(e){if(t.showMeridian=!!e,p.$error.time){var n=a(),i=s();angular.isDefined(n)&&angular.isDefined(i)&&(f.setHours(n),u())}else d()}),this.setupMousewheelEvents=function(e,n){var i=function(t){t.originalEvent&&(t=t.originalEvent);var e=t.wheelDelta?t.wheelDelta:-t.deltaY;return t.detail||e>0};e.bind("mousewheel wheel",function(e){t.$apply(i(e)?t.incrementHours():t.decrementHours()),e.preventDefault()}),n.bind("mousewheel wheel",function(e){t.$apply(i(e)?t.incrementMinutes():t.decrementMinutes()),e.preventDefault()})},this.setupInputEvents=function(e,n){if(t.readonlyInput)return t.updateHours=angular.noop,void(t.updateMinutes=angular.noop);var i=function(e,n){p.$setViewValue(null),p.$setValidity("time",!1),angular.isDefined(e)&&(t.invalidHours=e),angular.isDefined(n)&&(t.invalidMinutes=n)};t.updateHours=function(){var t=a();angular.isDefined(t)?(f.setHours(t),u("h")):i(!0)},e.bind("blur",function(){!t.invalidHours&&t.hours<10&&t.$apply(function(){t.hours=l(t.hours)})}),t.updateMinutes=function(){var t=s();angular.isDefined(t)?(f.setMinutes(t),u("m")):i(void 0,!0)},n.bind("blur",function(){!t.invalidMinutes&&t.minutes<10&&t.$apply(function(){t.minutes=l(t.minutes)})})},this.render=function(){var t=p.$modelValue?new Date(p.$modelValue):null;isNaN(t)?(p.$setValidity("time",!1),i.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(t&&(f=t),c(),d())},t.incrementHours=function(){h(60*m)},t.decrementHours=function(){h(60*-m)},t.incrementMinutes=function(){h(v)},t.decrementMinutes=function(){h(-v)},t.toggleMeridian=function(){h(720*(f.getHours()<12?1:-1))}}]).directive("timepicker",function(){return{restrict:"EA",require:["timepicker","?^ngModel"],controller:"TimepickerController",replace:!0,scope:{},templateUrl:"template/timepicker/timepicker.html",link:function(t,e,n,i){var r=i[0],o=i[1];o&&r.init(o,e.find("input"))}}}),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.position","ui.bootstrap.bindHtml"]).factory("typeaheadParser",["$parse",function(t){var e=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(n){var i=n.match(e);if(!i)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+n+'".');return{itemName:i[3],source:t(i[4]),viewMapper:t(i[2]||i[1]),modelMapper:t(i[1])}}}}]).directive("typeahead",["$compile","$parse","$q","$timeout","$document","$position","typeaheadParser",function(t,e,n,i,r,o,a){var s=[9,13,27,38,40];return{require:"ngModel",link:function(l,u,c,d){var h,f=l.$eval(c.typeaheadMinLength)||1,p=l.$eval(c.typeaheadWaitMs)||0,g=l.$eval(c.typeaheadEditable)!==!1,m=e(c.typeaheadLoading).assign||angular.noop,v=e(c.typeaheadOnSelect),y=c.typeaheadInputFormatter?e(c.typeaheadInputFormatter):void 0,b=c.typeaheadAppendToBody?l.$eval(c.typeaheadAppendToBody):!1,x=l.$eval(c.typeaheadFocusFirst)!==!1,w=e(c.ngModel).assign,$=a.parse(c.typeahead),k=l.$new();l.$on("$destroy",function(){k.$destroy()});var _="typeahead-"+k.$id+"-"+Math.floor(1e4*Math.random());u.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":_});var C=angular.element("<div typeahead-popup></div>");C.attr({id:_,matches:"matches",active:"activeIdx",select:"select(activeIdx)",query:"query",position:"position"}),angular.isDefined(c.typeaheadTemplateUrl)&&C.attr("template-url",c.typeaheadTemplateUrl);var M=function(){k.matches=[],k.activeIdx=-1,u.attr("aria-expanded",!1)},D=function(t){return _+"-option-"+t};k.$watch("activeIdx",function(t){0>t?u.removeAttr("aria-activedescendant"):u.attr("aria-activedescendant",D(t))});var S=function(t){var e={$viewValue:t};m(l,!0),n.when($.source(l,e)).then(function(n){var i=t===d.$viewValue;if(i&&h)if(n.length>0){k.activeIdx=x?0:-1,k.matches.length=0;for(var r=0;r<n.length;r++)e[$.itemName]=n[r],k.matches.push({id:D(r),label:$.viewMapper(k,e),model:n[r]});k.query=t,k.position=b?o.offset(u):o.position(u),k.position.top=k.position.top+u.prop("offsetHeight"),u.attr("aria-expanded",!0)}else M();i&&m(l,!1)},function(){M(),m(l,!1)})};M(),k.query=void 0;var T,A=function(t){T=i(function(){S(t)},p)},E=function(){T&&i.cancel(T)};d.$parsers.unshift(function(t){return h=!0,t&&t.length>=f?p>0?(E(),A(t)):S(t):(m(l,!1),E(),M()),g?t:t?void d.$setValidity("editable",!1):(d.$setValidity("editable",!0),t)}),d.$formatters.push(function(t){var e,n,i={};return y?(i.$model=t,y(l,i)):(i[$.itemName]=t,e=$.viewMapper(l,i),i[$.itemName]=void 0,n=$.viewMapper(l,i),e!==n?e:t)}),k.select=function(t){var e,n,r={};r[$.itemName]=n=k.matches[t].model,e=$.modelMapper(l,r),w(l,e),d.$setValidity("editable",!0),v(l,{$item:n,$model:e,$label:$.viewMapper(l,r)}),M(),i(function(){u[0].focus()},0,!1)},u.bind("keydown",function(t){0!==k.matches.length&&-1!==s.indexOf(t.which)&&(-1!=k.activeIdx||13!==t.which&&9!==t.which)&&(t.preventDefault(),40===t.which?(k.activeIdx=(k.activeIdx+1)%k.matches.length,k.$digest()):38===t.which?(k.activeIdx=(k.activeIdx>0?k.activeIdx:k.matches.length)-1,k.$digest()):13===t.which||9===t.which?k.$apply(function(){k.select(k.activeIdx)}):27===t.which&&(t.stopPropagation(),M(),k.$digest()))}),u.bind("blur",function(){h=!1});var O=function(t){u[0]!==t.target&&(M(),k.$digest())};r.bind("click",O),l.$on("$destroy",function(){r.unbind("click",O),b&&N.remove()});var N=t(C)(k);b?r.find("body").append(N):u.after(N)}}}]).directive("typeaheadPopup",function(){return{restrict:"EA",scope:{matches:"=",query:"=",active:"=",position:"=",select:"&"},replace:!0,templateUrl:"template/typeahead/typeahead-popup.html",link:function(t,e,n){t.templateUrl=n.templateUrl,t.isOpen=function(){return t.matches.length>0},t.isActive=function(e){return t.active==e},t.selectActive=function(e){t.active=e},t.selectMatch=function(e){t.select({activeIdx:e})}}}}).directive("typeaheadMatch",["$http","$templateCache","$compile","$parse",function(t,e,n,i){return{restrict:"EA",scope:{index:"=",match:"=",query:"="},link:function(r,o,a){var s=i(a.templateUrl)(r.$parent)||"template/typeahead/typeahead-match.html";t.get(s,{cache:e}).success(function(t){o.replaceWith(n(t.trim())(r))})}}}]).filter("typeaheadHighlight",function(){function t(t){return t.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}return function(e,n){return n?(""+e).replace(new RegExp(t(n),"gi"),"<strong>$&</strong>"):e}}),angular.module("template/accordion/accordion-group.html",[]).run(["$templateCache",function(t){t.put("template/accordion/accordion-group.html",'<div class="panel panel-default">\n  <div class="panel-heading">\n    <h4 class="panel-title">\n      <a href class="accordion-toggle" ng-click="toggleOpen()" accordion-transclude="heading"><span ng-class="{\'text-muted\': isDisabled}">{{heading}}</span></a>\n    </h4>\n  </div>\n  <div class="panel-collapse" collapse="!isOpen">\n	  <div class="panel-body" ng-transclude></div>\n  </div>\n</div>\n')}]),angular.module("template/accordion/accordion.html",[]).run(["$templateCache",function(t){t.put("template/accordion/accordion.html",'<div class="panel-group" ng-transclude></div>')}]),angular.module("template/alert/alert.html",[]).run(["$templateCache",function(t){t.put("template/alert/alert.html",'<div class="alert" ng-class="[\'alert-\' + (type || \'warning\'), closeable ? \'alert-dismissable\' : null]" role="alert">\n    <button ng-show="closeable" type="button" class="close" ng-click="close()">\n        <span aria-hidden="true">&times;</span>\n        <span class="sr-only">Close</span>\n    </button>\n    <div ng-transclude></div>\n</div>\n')}]),angular.module("template/carousel/carousel.html",[]).run(["$templateCache",function(t){t.put("template/carousel/carousel.html",'<div ng-mouseenter="pause()" ng-mouseleave="play()" class="carousel" ng-swipe-right="prev()" ng-swipe-left="next()">\n    <ol class="carousel-indicators" ng-show="slides.length > 1">\n        <li ng-repeat="slide in slides track by $index" ng-class="{active: isActive(slide)}" ng-click="select(slide)"></li>\n    </ol>\n    <div class="carousel-inner" ng-transclude></div>\n    <a class="left carousel-control" ng-click="prev()" ng-show="slides.length > 1"><span class="glyphicon glyphicon-chevron-left"></span></a>\n    <a class="right carousel-control" ng-click="next()" ng-show="slides.length > 1"><span class="glyphicon glyphicon-chevron-right"></span></a>\n</div>\n')}]),angular.module("template/carousel/slide.html",[]).run(["$templateCache",function(t){t.put("template/carousel/slide.html","<div ng-class=\"{\n    'active': leaving || (active && !entering),\n    'prev': (next || active) && direction=='prev',\n    'next': (next || active) && direction=='next',\n    'right': direction=='prev',\n    'left': direction=='next'\n  }\" class=\"item text-center\" ng-transclude></div>\n")}]),angular.module("template/datepicker/datepicker.html",[]).run(["$templateCache",function(t){t.put("template/datepicker/datepicker.html",'<div ng-switch="datepickerMode" role="application" ng-keydown="keydown($event)">\n  <daypicker ng-switch-when="day" tabindex="0"></daypicker>\n  <monthpicker ng-switch-when="month" tabindex="0"></monthpicker>\n  <yearpicker ng-switch-when="year" tabindex="0"></yearpicker>\n</div>')}]),angular.module("template/datepicker/day.html",[]).run(["$templateCache",function(t){t.put("template/datepicker/day.html",'<table role="grid" aria-labelledby="{{uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n  <thead>\n    <tr>\n      <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n      <th colspan="{{5 + showWeeks}}"><button id="{{uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>\n      <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n    </tr>\n    <tr>\n      <th ng-show="showWeeks" class="text-center"></th>\n      <th ng-repeat="label in labels track by $index" class="text-center"><small aria-label="{{label.full}}">{{label.abbr}}</small></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr ng-repeat="row in rows track by $index">\n      <td ng-show="showWeeks" class="text-center h6"><em>{{ weekNumbers[$index] }}</em></td>\n      <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{dt.uid}}" aria-disabled="{{!!dt.disabled}}">\n        <button type="button" style="width:100%;" class="btn btn-default btn-sm" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="{\'text-muted\': dt.secondary, \'text-info\': dt.current}">{{dt.label}}</span></button>\n      </td>\n    </tr>\n  </tbody>\n</table>\n')}]),angular.module("template/datepicker/month.html",[]).run(["$templateCache",function(t){t.put("template/datepicker/month.html",'<table role="grid" aria-labelledby="{{uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n  <thead>\n    <tr>\n      <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n      <th><button id="{{uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>\n      <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr ng-repeat="row in rows track by $index">\n      <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{dt.uid}}" aria-disabled="{{!!dt.disabled}}">\n        <button type="button" style="width:100%;" class="btn btn-default" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="{\'text-info\': dt.current}">{{dt.label}}</span></button>\n      </td>\n    </tr>\n  </tbody>\n</table>\n')}]),angular.module("template/datepicker/popup.html",[]).run(["$templateCache",function(t){t.put("template/datepicker/popup.html",'<ul class="dropdown-menu" ng-style="{display: (isOpen && \'block\') || \'none\', top: position.top+\'px\', left: position.left+\'px\'}" ng-keydown="keydown($event)">\n	<li ng-transclude></li>\n	<li ng-if="showButtonBar" style="padding:10px 9px 2px">\n		<span class="btn-group pull-left">\n			<button type="button" class="btn btn-sm btn-info" ng-click="select(\'today\')">{{ getText(\'current\') }}</button>\n			<button type="button" class="btn btn-sm btn-danger" ng-click="select(null)">{{ getText(\'clear\') }}</button>\n		</span>\n		<button type="button" class="btn btn-sm btn-success pull-right" ng-click="close()">{{ getText(\'close\') }}</button>\n	</li>\n</ul>\n')}]),angular.module("template/datepicker/year.html",[]).run(["$templateCache",function(t){t.put("template/datepicker/year.html",'<table role="grid" aria-labelledby="{{uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n  <thead>\n    <tr>\n      <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n      <th colspan="3"><button id="{{uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>\n      <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr ng-repeat="row in rows track by $index">\n      <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{dt.uid}}" aria-disabled="{{!!dt.disabled}}">\n        <button type="button" style="width:100%;" class="btn btn-default" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="{\'text-info\': dt.current}">{{dt.label}}</span></button>\n      </td>\n    </tr>\n  </tbody>\n</table>\n')}]),angular.module("template/modal/backdrop.html",[]).run(["$templateCache",function(t){t.put("template/modal/backdrop.html",'<div class="modal-backdrop fade {{ backdropClass }}"\n     ng-class="{in: animate}"\n     ng-style="{\'z-index\': 1040 + (index && 1 || 0) + index*10}"\n></div>\n')}]),angular.module("template/modal/window.html",[]).run(["$templateCache",function(t){t.put("template/modal/window.html",'<div tabindex="-1" role="dialog" class="modal fade" ng-class="{in: animate}" ng-style="{\'z-index\': 1050 + index*10, display: \'block\'}" ng-click="close($event)">\n    <div class="modal-dialog" ng-class="{\'modal-sm\': size == \'sm\', \'modal-lg\': size == \'lg\'}"><div class="modal-content" modal-transclude></div></div>\n</div>')}]),angular.module("template/pagination/pager.html",[]).run(["$templateCache",function(t){t.put("template/pagination/pager.html",'<ul class="pager">\n  <li ng-class="{disabled: noPrevious(), previous: align}"><a href ng-click="selectPage(page - 1)">{{getText(\'previous\')}}</a></li>\n  <li ng-class="{disabled: noNext(), next: align}"><a href ng-click="selectPage(page + 1)">{{getText(\'next\')}}</a></li>\n</ul>')}]),angular.module("template/pagination/pagination.html",[]).run(["$templateCache",function(t){t.put("template/pagination/pagination.html",'<ul class="pagination">\n  <li ng-if="boundaryLinks" ng-class="{disabled: noPrevious()}"><a href ng-click="selectPage(1)">{{getText(\'first\')}}</a></li>\n  <li ng-if="directionLinks" ng-class="{disabled: noPrevious()}"><a href ng-click="selectPage(page - 1)">{{getText(\'previous\')}}</a></li>\n  <li ng-repeat="page in pages track by $index" ng-class="{active: page.active}"><a href ng-click="selectPage(page.number)">{{page.text}}</a></li>\n  <li ng-if="directionLinks" ng-class="{disabled: noNext()}"><a href ng-click="selectPage(page + 1)">{{getText(\'next\')}}</a></li>\n  <li ng-if="boundaryLinks" ng-class="{disabled: noNext()}"><a href ng-click="selectPage(totalPages)">{{getText(\'last\')}}</a></li>\n</ul>')}]),angular.module("template/tooltip/tooltip-html-unsafe-popup.html",[]).run(["$templateCache",function(t){t.put("template/tooltip/tooltip-html-unsafe-popup.html",'<div class="tooltip {{placement}}" ng-class="{ in: isOpen(), fade: animation() }">\n  <div class="tooltip-arrow"></div>\n  <div class="tooltip-inner" bind-html-unsafe="content"></div>\n</div>\n')}]),angular.module("template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(t){t.put("template/tooltip/tooltip-popup.html",'<div class="tooltip {{placement}}" ng-class="{ in: isOpen(), fade: animation() }">\n  <div class="tooltip-arrow"></div>\n  <div class="tooltip-inner" ng-bind="content"></div>\n</div>\n')}]),angular.module("template/popover/popover.html",[]).run(["$templateCache",function(t){t.put("template/popover/popover.html",'<div class="popover {{placement}}" ng-class="{ in: isOpen(), fade: animation() }">\n  <div class="arrow"></div>\n\n  <div class="popover-inner">\n      <h3 class="popover-title" ng-bind="title" ng-show="title"></h3>\n      <div class="popover-content" ng-bind="content"></div>\n  </div>\n</div>\n')}]),angular.module("template/progressbar/bar.html",[]).run(["$templateCache",function(t){t.put("template/progressbar/bar.html",'<div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: percent + \'%\'}" aria-valuetext="{{percent | number:0}}%" ng-transclude></div>')}]),angular.module("template/progressbar/progress.html",[]).run(["$templateCache",function(t){t.put("template/progressbar/progress.html",'<div class="progress" ng-transclude></div>')}]),angular.module("template/progressbar/progressbar.html",[]).run(["$templateCache",function(t){t.put("template/progressbar/progressbar.html",'<div class="progress">\n  <div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: percent + \'%\'}" aria-valuetext="{{percent | number:0}}%" ng-transclude></div>\n</div>')}]),angular.module("template/rating/rating.html",[]).run(["$templateCache",function(t){t.put("template/rating/rating.html",'<span ng-mouseleave="reset()" ng-keydown="onKeydown($event)" tabindex="0" role="slider" aria-valuemin="0" aria-valuemax="{{range.length}}" aria-valuenow="{{value}}">\n    <i ng-repeat="r in range track by $index" ng-mouseenter="enter($index + 1)" ng-click="rate($index + 1)" class="glyphicon" ng-class="$index < value && (r.stateOn || \'glyphicon-star\') || (r.stateOff || \'glyphicon-star-empty\')">\n        <span class="sr-only">({{ $index < value ? \'*\' : \' \' }})</span>\n    </i>\n</span>')}]),angular.module("template/tabs/tab.html",[]).run(["$templateCache",function(t){t.put("template/tabs/tab.html",'<li ng-class="{active: active, disabled: disabled}">\n  <a href ng-click="select()" tab-heading-transclude>{{heading}}</a>\n</li>\n')}]),angular.module("template/tabs/tabset.html",[]).run(["$templateCache",function(t){t.put("template/tabs/tabset.html",'<div>\n  <ul class="nav nav-{{type || \'tabs\'}}" ng-class="{\'nav-stacked\': vertical, \'nav-justified\': justified}" ng-transclude></ul>\n  <div class="tab-content">\n    <div class="tab-pane" \n         ng-repeat="tab in tabs" \n         ng-class="{active: tab.active}"\n         tab-content-transclude="tab">\n    </div>\n  </div>\n</div>\n')}]),angular.module("template/timepicker/timepicker.html",[]).run(["$templateCache",function(t){t.put("template/timepicker/timepicker.html",'<table>\n	<tbody>\n		<tr class="text-center">\n			<td><a ng-click="incrementHours()" class="btn btn-link"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n			<td>&nbsp;</td>\n			<td><a ng-click="incrementMinutes()" class="btn btn-link"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n			<td ng-show="showMeridian"></td>\n		</tr>\n		<tr>\n			<td style="width:50px;" class="form-group" ng-class="{\'has-error\': invalidHours}">\n				<input type="text" ng-model="hours" ng-change="updateHours()" class="form-control text-center" ng-mousewheel="incrementHours()" ng-readonly="readonlyInput" maxlength="2">\n			</td>\n			<td>:</td>\n			<td style="width:50px;" class="form-group" ng-class="{\'has-error\': invalidMinutes}">\n				<input type="text" ng-model="minutes" ng-change="updateMinutes()" class="form-control text-center" ng-readonly="readonlyInput" maxlength="2">\n			</td>\n			<td ng-show="showMeridian"><button type="button" class="btn btn-default text-center" ng-click="toggleMeridian()">{{meridian}}</button></td>\n		</tr>\n		<tr class="text-center">\n			<td><a ng-click="decrementHours()" class="btn btn-link"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n			<td>&nbsp;</td>\n			<td><a ng-click="decrementMinutes()" class="btn btn-link"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n			<td ng-show="showMeridian"></td>\n		</tr>\n	</tbody>\n</table>\n')}]),angular.module("template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(t){t.put("template/typeahead/typeahead-match.html",'<a tabindex="-1" bind-html-unsafe="match.label | typeaheadHighlight:query"></a>')
}]),angular.module("template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(t){t.put("template/typeahead/typeahead-popup.html",'<ul class="dropdown-menu" ng-show="isOpen()" ng-style="{top: position.top+\'px\', left: position.left+\'px\'}" style="display: block;" role="listbox" aria-hidden="{{!isOpen()}}">\n    <li ng-repeat="match in matches track by $index" ng-class="{active: isActive($index) }" ng-mouseenter="selectActive($index)" ng-click="selectMatch($index)" role="option" id="{{match.id}}">\n        <div typeahead-match index="$index" match="match" query="query" template-url="templateUrl"></div>\n    </li>\n</ul>\n')}]),/*! jQuery UI - v1.11.4 - 2015-03-11
* http://jqueryui.com
* Includes: core.js, widget.js, mouse.js, position.js, accordion.js, autocomplete.js, button.js, datepicker.js, dialog.js, draggable.js, droppable.js, effect.js, effect-blind.js, effect-bounce.js, effect-clip.js, effect-drop.js, effect-explode.js, effect-fade.js, effect-fold.js, effect-highlight.js, effect-puff.js, effect-pulsate.js, effect-scale.js, effect-shake.js, effect-size.js, effect-slide.js, effect-transfer.js, menu.js, progressbar.js, resizable.js, selectable.js, selectmenu.js, slider.js, sortable.js, spinner.js, tabs.js, tooltip.js
* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){function e(e,i){var r,o,a,s=e.nodeName.toLowerCase();return"area"===s?(r=e.parentNode,o=r.name,e.href&&o&&"map"===r.nodeName.toLowerCase()?(a=t("img[usemap='#"+o+"']")[0],!!a&&n(a)):!1):(/^(input|select|textarea|button|object)$/.test(s)?!e.disabled:"a"===s?e.href||i:i)&&n(e)}function n(e){return t.expr.filters.visible(e)&&!t(e).parents().addBack().filter(function(){return"hidden"===t.css(this,"visibility")}).length}function i(t){for(var e,n;t.length&&t[0]!==document;){if(e=t.css("position"),("absolute"===e||"relative"===e||"fixed"===e)&&(n=parseInt(t.css("zIndex"),10),!isNaN(n)&&0!==n))return n;t=t.parent()}return 0}function r(){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","Friday","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},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=o(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function o(e){var n="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(n,"mouseout",function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).delegate(n,"mouseover",a)}function a(){t.datepicker._isDisabledDatepicker(v.inline?v.dpDiv.parent()[0]:v.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))}function s(e,n){t.extend(e,n);for(var i in n)null==n[i]&&(e[i]=n[i]);return e}/*!
 * jQuery UI Spinner 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/spinner/
 */
function l(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}/*!
 * jQuery UI Core 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/category/ui-core/
 */
t.ui=t.ui||{},t.extend(t.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({scrollParent:function(e){var n=this.css("position"),i="absolute"===n,r=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return i&&"static"===e.css("position")?!1:r.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==n&&o.length?o:t(this[0].ownerDocument||document)},uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(n){return!!t.data(n,e)}}):function(e,n,i){return!!t.data(e,i[3])},focusable:function(n){return e(n,!isNaN(t.attr(n,"tabindex")))},tabbable:function(n){var i=t.attr(n,"tabindex"),r=isNaN(i);return(r||i>=0)&&e(n,!r)}}),t("<a>").outerWidth(1).jquery||t.each(["Width","Height"],function(e,n){function i(e,n,i,o){return t.each(r,function(){n-=parseFloat(t.css(e,"padding"+this))||0,i&&(n-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(n-=parseFloat(t.css(e,"margin"+this))||0)}),n}var r="Width"===n?["Left","Right"]:["Top","Bottom"],o=n.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+n]=function(e){return void 0===e?a["inner"+n].call(this):this.each(function(){t(this).css(o,i(this,e)+"px")})},t.fn["outer"+n]=function(e,r){return"number"!=typeof e?a["outer"+n].call(this,e):this.each(function(){t(this).css(o,i(this,e,!0,r)+"px")})}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=function(e){return function(n){return arguments.length?e.call(this,t.camelCase(n)):e.call(this)}}(t.fn.removeData)),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),t.fn.extend({focus:function(e){return function(n,i){return"number"==typeof n?this.each(function(){var e=this;setTimeout(function(){t(e).focus(),i&&i.call(e)},n)}):e.apply(this,arguments)}}(t.fn.focus),disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(e){if(void 0!==e)return this.css("zIndex",e);if(this.length)for(var n,i,r=t(this[0]);r.length&&r[0]!==document;){if(n=r.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(i=parseInt(r.css("zIndex"),10),!isNaN(i)&&0!==i))return i;r=r.parent()}return 0}}),t.ui.plugin={add:function(e,n,i){var r,o=t.ui[e].prototype;for(r in i)o.plugins[r]=o.plugins[r]||[],o.plugins[r].push([n,i[r]])},call:function(t,e,n,i){var r,o=t.plugins[e];if(o&&(i||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(r=0;r<o.length;r++)t.options[o[r][0]]&&o[r][1].apply(t.element,n)}};/*!
 * jQuery UI Widget 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/jQuery.widget/
 */
var u=0,c=Array.prototype.slice;t.cleanData=function(e){return function(n){var i,r,o;for(o=0;null!=(r=n[o]);o++)try{i=t._data(r,"events"),i&&i.remove&&t(r).triggerHandler("remove")}catch(a){}e(n)}}(t.cleanData),t.widget=function(e,n,i){var r,o,a,s,l={},u=e.split(".")[0];return e=e.split(".")[1],r=u+"-"+e,i||(i=n,n=t.Widget),t.expr[":"][r.toLowerCase()]=function(e){return!!t.data(e,r)},t[u]=t[u]||{},o=t[u][e],a=t[u][e]=function(t,e){return this._createWidget?void(arguments.length&&this._createWidget(t,e)):new a(t,e)},t.extend(a,o,{version:i.version,_proto:t.extend({},i),_childConstructors:[]}),s=new n,s.options=t.widget.extend({},s.options),t.each(i,function(e,i){return t.isFunction(i)?void(l[e]=function(){var t=function(){return n.prototype[e].apply(this,arguments)},r=function(t){return n.prototype[e].apply(this,t)};return function(){var e,n=this._super,o=this._superApply;return this._super=t,this._superApply=r,e=i.apply(this,arguments),this._super=n,this._superApply=o,e}}()):void(l[e]=i)}),a.prototype=t.widget.extend(s,{widgetEventPrefix:o?s.widgetEventPrefix||e:e},l,{constructor:a,namespace:u,widgetName:e,widgetFullName:r}),o?(t.each(o._childConstructors,function(e,n){var i=n.prototype;t.widget(i.namespace+"."+i.widgetName,a,n._proto)}),delete o._childConstructors):n._childConstructors.push(a),t.widget.bridge(e,a),a},t.widget.extend=function(e){for(var n,i,r=c.call(arguments,1),o=0,a=r.length;a>o;o++)for(n in r[o])i=r[o][n],r[o].hasOwnProperty(n)&&void 0!==i&&(e[n]=t.isPlainObject(i)?t.isPlainObject(e[n])?t.widget.extend({},e[n],i):t.widget.extend({},i):i);return e},t.widget.bridge=function(e,n){var i=n.prototype.widgetFullName||e;t.fn[e]=function(r){var o="string"==typeof r,a=c.call(arguments,1),s=this;return o?this.each(function(){var n,o=t.data(this,i);return"instance"===r?(s=o,!1):o?t.isFunction(o[r])&&"_"!==r.charAt(0)?(n=o[r].apply(o,a),n!==o&&void 0!==n?(s=n&&n.jquery?s.pushStack(n.get()):n,!1):void 0):t.error("no such method '"+r+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+r+"'")}):(a.length&&(r=t.widget.extend.apply(null,[r].concat(a))),this.each(function(){var e=t.data(this,i);e?(e.option(r||{}),e._init&&e._init()):t.data(this,i,new n(r,this))})),s}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,n){n=t(n||this.defaultElement||this)[0],this.element=t(n),this.uuid=u++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),n!==this&&(t.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===n&&this.destroy()}}),this.document=t(n.style?n.ownerDocument:n.document||n),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(t.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:t.noop,widget:function(){return this.element},option:function(e,n){var i,r,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},i=e.split("."),e=i.shift(),i.length){for(r=a[e]=t.widget.extend({},this.options[e]),o=0;o<i.length-1;o++)r[i[o]]=r[i[o]]||{},r=r[i[o]];if(e=i.pop(),1===arguments.length)return void 0===r[e]?null:r[e];r[e]=n}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=n}return this._setOptions(a),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",!!e),e&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(e,n,i){var r,o=this;"boolean"!=typeof e&&(i=n,n=e,e=!1),i?(n=r=t(n),this.bindings=this.bindings.add(n)):(i=n,n=this.element,r=this.widget()),t.each(i,function(i,a){function s(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(s.guid=a.guid=a.guid||s.guid||t.guid++);var l=i.match(/^([\w:-]*)\s*(.*)$/),u=l[1]+o.eventNamespace,c=l[2];c?r.delegate(c,u,s):n.bind(u,s)})},_off:function(e,n){n=(n||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(n).undelegate(n),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function n(){return("string"==typeof t?i[t]:t).apply(i,arguments)}var i=this;return setTimeout(n,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,n,i){var r,o,a=this.options[e];if(i=i||{},n=t.Event(n),n.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),n.target=this.element[0],o=n.originalEvent)for(r in o)r in n||(n[r]=o[r]);return this.element.trigger(n,i),!(t.isFunction(a)&&a.apply(this.element[0],[n].concat(i))===!1||n.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,n){t.Widget.prototype["_"+e]=function(i,r,o){"string"==typeof r&&(r={effect:r});var a,s=r?r===!0||"number"==typeof r?n:r.effect||n:e;r=r||{},"number"==typeof r&&(r={duration:r}),a=!t.isEmptyObject(r),r.complete=o,r.delay&&i.delay(r.delay),a&&t.effects&&t.effects.effect[s]?i[e](r):s!==e&&i[s]?i[s](r.duration,r.easing,o):i.queue(function(n){t(this)[e](),o&&o.call(i[0]),n()})}});var d=(t.widget,!1);t(document).mouseup(function(){d=!1});t.widget("ui.mouse",{version:"1.11.4",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(n){return!0===t.data(n.target,e.widgetName+".preventClickEvent")?(t.removeData(n.target,e.widgetName+".preventClickEvent"),n.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!d){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var n=this,i=1===e.which,r="string"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return i&&!r&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){n.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return n._mouseMove(t)},this._mouseUpDelegate=function(t){return n._mouseUp(t)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),d=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button)return this._mouseUp(e);if(!e.which)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),d=!1,!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 UI Position 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/position/
 */
!function(){function e(t,e,n){return[parseFloat(t[0])*(f.test(t[0])?e/100:1),parseFloat(t[1])*(f.test(t[1])?n/100:1)]}function n(e,n){return parseInt(t.css(e,n),10)||0}function i(e){var n=e[0];return 9===n.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(n)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:n.preventDefault?{width:0,height:0,offset:{top:n.pageY,left:n.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var r,o,a=Math.max,s=Math.abs,l=Math.round,u=/left|center|right/,c=/top|center|bottom/,d=/[\+\-]\d+(\.[\d]+)?%?/,h=/^\w+/,f=/%$/,p=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==r)return r;var e,n,i=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=i.children()[0];return t("body").append(i),e=o.offsetWidth,i.css("overflow","scroll"),n=o.offsetWidth,e===n&&(n=i[0].clientWidth),i.remove(),r=e-n},getScrollInfo:function(e){var n=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),i=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),r="scroll"===n||"auto"===n&&e.width<e.element[0].scrollWidth,o="scroll"===i||"auto"===i&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:r?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var n=t(e||window),i=t.isWindow(n[0]),r=!!n[0]&&9===n[0].nodeType;return{element:n,isWindow:i,isDocument:r,offset:n.offset()||{left:0,top:0},scrollLeft:n.scrollLeft(),scrollTop:n.scrollTop(),width:i||r?n.width():n.outerWidth(),height:i||r?n.height():n.outerHeight()}}},t.fn.position=function(r){if(!r||!r.of)return p.apply(this,arguments);r=t.extend({},r);var f,g,m,v,y,b,x=t(r.of),w=t.position.getWithinInfo(r.within),$=t.position.getScrollInfo(w),k=(r.collision||"flip").split(" "),_={};return b=i(x),x[0].preventDefault&&(r.at="left top"),g=b.width,m=b.height,v=b.offset,y=t.extend({},v),t.each(["my","at"],function(){var t,e,n=(r[this]||"").split(" ");1===n.length&&(n=u.test(n[0])?n.concat(["center"]):c.test(n[0])?["center"].concat(n):["center","center"]),n[0]=u.test(n[0])?n[0]:"center",n[1]=c.test(n[1])?n[1]:"center",t=d.exec(n[0]),e=d.exec(n[1]),_[this]=[t?t[0]:0,e?e[0]:0],r[this]=[h.exec(n[0])[0],h.exec(n[1])[0]]}),1===k.length&&(k[1]=k[0]),"right"===r.at[0]?y.left+=g:"center"===r.at[0]&&(y.left+=g/2),"bottom"===r.at[1]?y.top+=m:"center"===r.at[1]&&(y.top+=m/2),f=e(_.at,g,m),y.left+=f[0],y.top+=f[1],this.each(function(){var i,u,c=t(this),d=c.outerWidth(),h=c.outerHeight(),p=n(this,"marginLeft"),b=n(this,"marginTop"),C=d+p+n(this,"marginRight")+$.width,M=h+b+n(this,"marginBottom")+$.height,D=t.extend({},y),S=e(_.my,c.outerWidth(),c.outerHeight());"right"===r.my[0]?D.left-=d:"center"===r.my[0]&&(D.left-=d/2),"bottom"===r.my[1]?D.top-=h:"center"===r.my[1]&&(D.top-=h/2),D.left+=S[0],D.top+=S[1],o||(D.left=l(D.left),D.top=l(D.top)),i={marginLeft:p,marginTop:b},t.each(["left","top"],function(e,n){t.ui.position[k[e]]&&t.ui.position[k[e]][n](D,{targetWidth:g,targetHeight:m,elemWidth:d,elemHeight:h,collisionPosition:i,collisionWidth:C,collisionHeight:M,offset:[f[0]+S[0],f[1]+S[1]],my:r.my,at:r.at,within:w,elem:c})}),r.using&&(u=function(t){var e=v.left-D.left,n=e+g-d,i=v.top-D.top,o=i+m-h,l={target:{element:x,left:v.left,top:v.top,width:g,height:m},element:{element:c,left:D.left,top:D.top,width:d,height:h},horizontal:0>n?"left":e>0?"right":"center",vertical:0>o?"top":i>0?"bottom":"middle"};d>g&&s(e+n)<g&&(l.horizontal="center"),h>m&&s(i+o)<m&&(l.vertical="middle"),l.important=a(s(e),s(n))>a(s(i),s(o))?"horizontal":"vertical",r.using.call(this,t,l)}),c.offset(t.extend(D,{using:u}))})},t.ui.position={fit:{left:function(t,e){var n,i=e.within,r=i.isWindow?i.scrollLeft:i.offset.left,o=i.width,s=t.left-e.collisionPosition.marginLeft,l=r-s,u=s+e.collisionWidth-o-r;e.collisionWidth>o?l>0&&0>=u?(n=t.left+l+e.collisionWidth-o-r,t.left+=l-n):t.left=u>0&&0>=l?r:l>u?r+o-e.collisionWidth:r:l>0?t.left+=l:u>0?t.left-=u:t.left=a(t.left-s,t.left)},top:function(t,e){var n,i=e.within,r=i.isWindow?i.scrollTop:i.offset.top,o=e.within.height,s=t.top-e.collisionPosition.marginTop,l=r-s,u=s+e.collisionHeight-o-r;e.collisionHeight>o?l>0&&0>=u?(n=t.top+l+e.collisionHeight-o-r,t.top+=l-n):t.top=u>0&&0>=l?r:l>u?r+o-e.collisionHeight:r:l>0?t.top+=l:u>0?t.top-=u:t.top=a(t.top-s,t.top)}},flip:{left:function(t,e){var n,i,r=e.within,o=r.offset.left+r.scrollLeft,a=r.width,l=r.isWindow?r.scrollLeft:r.offset.left,u=t.left-e.collisionPosition.marginLeft,c=u-l,d=u+e.collisionWidth-a-l,h="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,f="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,p=-2*e.offset[0];0>c?(n=t.left+h+f+p+e.collisionWidth-a-o,(0>n||n<s(c))&&(t.left+=h+f+p)):d>0&&(i=t.left-e.collisionPosition.marginLeft+h+f+p-l,(i>0||s(i)<d)&&(t.left+=h+f+p))},top:function(t,e){var n,i,r=e.within,o=r.offset.top+r.scrollTop,a=r.height,l=r.isWindow?r.scrollTop:r.offset.top,u=t.top-e.collisionPosition.marginTop,c=u-l,d=u+e.collisionHeight-a-l,h="top"===e.my[1],f=h?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,p="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(i=t.top+f+p+g+e.collisionHeight-a-o,(0>i||i<s(c))&&(t.top+=f+p+g)):d>0&&(n=t.top-e.collisionPosition.marginTop+f+p+g-l,(n>0||s(n)<d)&&(t.top+=f+p+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,n,i,r,a,s=document.getElementsByTagName("body")[0],l=document.createElement("div");e=document.createElement(s?"div":"body"),i={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},s&&t.extend(i,{position:"absolute",left:"-1000px",top:"-1000px"});for(a in i)e.style[a]=i[a];e.appendChild(l),n=s||document.documentElement,n.insertBefore(e,n.firstChild),l.style.cssText="position: absolute; left: 10.7432222px;",r=t(l).offset().left,o=r>10&&11>r,e.innerHTML="",n.removeChild(e)}()}();t.ui.position,t.widget("ui.accordion",{version:"1.11.4",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},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),e.collapsible||e.active!==!1&&null!=e.active||(e.active=0),this._processPanels(),e.active<0&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t()}},_createIcons:function(){var e=this.options.icons;e&&(t("<span>").addClass("ui-accordion-header-icon ui-icon "+e.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(e.header).addClass(e.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-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?void this._activate(e):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),void("disabled"===t&&(this.element.toggleClass("ui-state-disabled",!!e).attr("aria-disabled",e),this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!e))))},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var n=t.ui.keyCode,i=this.headers.length,r=this.headers.index(e.target),o=!1;switch(e.keyCode){case n.RIGHT:case n.DOWN:o=this.headers[(r+1)%i];break;case n.LEFT:case n.UP:o=this.headers[(r-1+i)%i];break;case n.SPACE:case n.ENTER:this._eventHandler(e);break;case n.HOME:o=this.headers[0];break;case n.END:o=this.headers[i-1]}o&&(t(e.target).attr("tabIndex",-1),t(o).attr("tabIndex",0),o.focus(),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().focus()},refresh:function(){var e=this.options;this._processPanels(),e.active===!1&&e.collapsible===!0||!this.headers.length?(e.active=!1,this.active=t()):e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all"),this.panels=this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide(),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var e,n=this.options,i=n.heightStyle,r=this.element.parent();this.active=this._findActive(n.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(){var e=t(this),n=e.uniqueId().attr("id"),i=e.next(),r=i.uniqueId().attr("id");e.attr("aria-controls",r),i.attr("aria-labelledby",n)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(n.event),"fill"===i?(e=r.height(),this.element.siblings(":visible").each(function(){var n=t(this),i=n.css("position");"absolute"!==i&&"fixed"!==i&&(e-=n.outerHeight(!0))}),this.headers.each(function(){e-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,e-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===i&&(e=0,this.headers.next().each(function(){e=Math.max(e,t(this).css("height","").height())}).height(e))},_activate:function(e){var n=this._findActive(e)[0];n!==this.active[0]&&(n=n||this.active[0],this._eventHandler({target:n,currentTarget:n,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var n={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){n[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,n),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var n=this.options,i=this.active,r=t(e.currentTarget),o=r[0]===i[0],a=o&&n.collapsible,s=a?t():r.next(),l=i.next(),u={oldHeader:i,oldPanel:l,newHeader:a?t():r,newPanel:s};e.preventDefault(),o&&!n.collapsible||this._trigger("beforeActivate",e,u)===!1||(n.active=a?!1:this.headers.index(r),this.active=o?t():r,this._toggle(u),i.removeClass("ui-accordion-header-active ui-state-active"),n.icons&&i.children(".ui-accordion-header-icon").removeClass(n.icons.activeHeader).addClass(n.icons.header),o||(r.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),n.icons&&r.children(".ui-accordion-header-icon").removeClass(n.icons.header).addClass(n.icons.activeHeader),r.next().addClass("ui-accordion-content-active")))},_toggle:function(e){var n=e.newPanel,i=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=n,this.prevHide=i,this.options.animate?this._animate(n,i,e):(i.hide(),n.show(),this._toggleComplete(e)),i.attr({"aria-hidden":"true"}),i.prev().attr({"aria-selected":"false","aria-expanded":"false"}),n.length&&i.length?i.prev().attr({tabIndex:-1,"aria-expanded":"false"}):n.length&&this.headers.filter(function(){return 0===parseInt(t(this).attr("tabIndex"),10)}).attr("tabIndex",-1),n.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,e,n){var i,r,o,a=this,s=0,l=t.css("box-sizing"),u=t.length&&(!e.length||t.index()<e.index()),c=this.options.animate||{},d=u&&c.down||c,h=function(){a._toggleComplete(n)};return"number"==typeof d&&(o=d),"string"==typeof d&&(r=d),r=r||d.easing||c.easing,o=o||d.duration||c.duration,e.length?t.length?(i=t.show().outerHeight(),e.animate(this.hideProps,{duration:o,easing:r,step:function(t,e){e.now=Math.round(t)}}),void t.hide().animate(this.showProps,{duration:o,easing:r,complete:h,step:function(t,n){n.now=Math.round(t),"height"!==n.prop?"content-box"===l&&(s+=n.now):"content"!==a.options.heightStyle&&(n.now=Math.round(i-e.outerHeight()-s),s=0)}})):e.animate(this.hideProps,o,r,h):t.animate(this.showProps,o,r,h)},_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)}}),t.widget("ui.menu",{version:"1.11.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 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").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var n=t(e.target);!this.mouseHandled&&n.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),n.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&t(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var n=t(e.currentTarget);n.siblings(".ui-state-active").removeClass("ui-state-active"),this.focus(e,n)}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var n=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,n)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&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-menu-icons ui-front").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").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){var n,i,r,o,a=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:a=!1,i=this.previousFilter||"",r=String.fromCharCode(e.keyCode),o=!1,clearTimeout(this.filterTimer),r===i?o=!0:r=i+r,n=this._filterMenuItems(r),n=o&&-1!==n.index(this.active.next())?this.active.nextAll(".ui-menu-item"):n,n.length||(r=String.fromCharCode(e.keyCode),n=this._filterMenuItems(r)),n.length?(this.focus(e,n),this.previousFilter=r,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.is("[aria-haspopup='true']")?this.expand(t):this.select(t))},refresh:function(){var e,n,i=this,r=this.options.icons.submenu,o=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),o.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),n=e.parent(),i=t("<span>").addClass("ui-menu-icon ui-icon "+r).data("ui-menu-submenu-carat",!0);n.attr("aria-haspopup","true").prepend(i),e.attr("aria-labelledby",n.attr("id"))}),e=o.add(this.element),n=e.find(this.options.items),n.not(".ui-menu-item").each(function(){var e=t(this);i._isDivider(e)&&e.addClass("ui-widget-content ui-menu-divider")}),n.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),n.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.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),"disabled"===t&&this.element.toggleClass("ui-state-disabled",!!e).attr("aria-disabled",e),this._super(t,e)},focus:function(t,e){var n,i;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),i=this.active.addClass("ui-state-focus").removeClass("ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),n=e.children(".ui-menu"),n.length&&t&&/^mouse/.test(t.type)&&this._startOpening(n),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var n,i,r,o,a,s;this._hasScroll()&&(n=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,i=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,r=e.offset().top-this.activeMenu.offset().top-n-i,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),s=e.outerHeight(),0>r?this.activeMenu.scrollTop(o+r):r+s>a&&this.activeMenu.scrollTop(o+r-a+s))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.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(e){var n=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(n)},collapseAll:function(e,n){clearTimeout(this.timer),this.timer=this._delay(function(){var i=n?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));i.length||(i=this.element),this._close(i),this.blur(e),this.activeMenu=i},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(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},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 ").find(this.options.items).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,n){var i;this.active&&(i="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),i&&i.length&&this.active||(i=this.activeMenu.find(this.options.items)[e]()),this.focus(n,i)},nextPage:function(e){var n,i,r;return this.active?void(this.isLastItem()||(this._hasScroll()?(i=this.active.offset().top,r=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return n=t(this),n.offset().top-i-r<0}),this.focus(e,n)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]()))):void this.next(e)},previousPage:function(e){var n,i,r;return this.active?void(this.isFirstItem()||(this._hasScroll()?(i=this.active.offset().top,r=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return n=t(this),n.offset().top-i+r>0}),this.focus(e,n)):this.focus(e,this.activeMenu.find(this.options.items).first()))):void this.next(e)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var n={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,n)},_filterMenuItems:function(e){var n=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),i=new RegExp("^"+n,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return i.test(t.trim(t(this).text()))})}});/*!
 * jQuery UI Autocomplete 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/autocomplete/
 */
t.widget("ui.autocomplete",{version:"1.11.4",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},requestIndex:0,pending:0,_create:function(){var e,n,i,r=this.element[0].nodeName.toLowerCase(),o="textarea"===r,a="input"===r;this.isMultiLine=o?!0:a?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(r){if(this.element.prop("readOnly"))return e=!0,i=!0,void(n=!0);e=!1,i=!1,n=!1;var o=t.ui.keyCode;switch(r.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",r);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",r);break;case o.UP:e=!0,this._keyEvent("previous",r);break;case o.DOWN:e=!0,this._keyEvent("next",r);break;case o.ENTER:this.menu.active&&(e=!0,r.preventDefault(),this.menu.select(r));break;case o.TAB:this.menu.active&&this.menu.select(r);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(r),r.preventDefault());break;default:n=!0,this._searchTimeout(r)}},keypress:function(i){if(e)return e=!1,void((!this.isMultiLine||this.menu.element.is(":visible"))&&i.preventDefault());if(!n){var r=t.ui.keyCode;switch(i.keyCode){case r.PAGE_UP:this._move("previousPage",i);break;case r.PAGE_DOWN:this._move("nextPage",i);break;case r.UP:this._keyEvent("previous",i);break;case r.DOWN:this._keyEvent("next",i)}}},input:function(t){return i?(i=!1,void t.preventDefault()):void this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(t),void this._change(t))}}),this._initSource(),this.menu=t("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var n=this.menu.element[0];t(e.target).closest(".ui-menu-item").length||this._delay(function(){var e=this;this.document.one("mousedown",function(i){i.target===e.element[0]||i.target===n||t.contains(n,i.target)||e.close()})})},menufocus:function(e,n){var i,r;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),void this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)})):(r=n.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:r})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(r.value),i=n.item.attr("aria-label")||r.value,void(i&&t.trim(i).length&&(this.liveRegion.children().hide(),t("<div>").text(i).appendTo(this.liveRegion))))},menuselect:function(t,e){var n=e.item.data("ui-autocomplete-item"),i=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=i,this._delay(function(){this.previous=i,this.selectedItem=n})),!1!==this._trigger("select",t,{item:n})&&this._value(n.value),this.term=this._value(),this.close(t),this.selectedItem=n}}),this.liveRegion=t("<span>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body),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 e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,n,i=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(n,i){i(t.ui.autocomplete.filter(e,n.term))}):"string"==typeof this.options.source?(n=this.options.source,this.source=function(e,r){i.xhr&&i.xhr.abort(),i.xhr=t.ajax({url:n,data:e,dataType:"json",success:function(t){r(t)},error:function(){r([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),n=this.menu.element.is(":visible"),i=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;(!e||e&&!n&&!i)&&(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):this._trigger("search",e)!==!1?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.requestIndex;return t.proxy(function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__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(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var n=this.menu.element.empty();this._renderMenu(n,e),this.isNewMenu=!0,this.menu.refresh(),n.show(),this._resizeMenu(),n.position(t.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(e,n){var i=this;t.each(n,function(t,n){i._renderItemData(e,n)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,n){return t("<li>").text(n.label).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e):void 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())}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,n){var i=new RegExp(t.ui.autocomplete.escapeRegex(n),"i");return t.grep(e,function(t){return i.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var n;this._superApply(arguments),this.options.disabled||this.cancelSearch||(n=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("<div>").text(n).appendTo(this.liveRegion))}});var h,f=(t.ui.autocomplete,"ui-button ui-widget ui-state-default ui-corner-all"),p="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",g=function(){var e=t(this);setTimeout(function(){e.find(":ui-button").button("refresh")},1)},m=function(e){var n=e.name,i=e.form,r=t([]);return n&&(n=n.replace(/'/g,"\\'"),r=i?t(i).find("[name='"+n+"'][type=radio]"):t("[name='"+n+"'][type=radio]",e.ownerDocument).filter(function(){return!this.form})),r};t.widget("ui.button",{version:"1.11.4",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,g),"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,n=this.options,i="checkbox"===this.type||"radio"===this.type,r=i?"":"ui-state-active";null===n.label&&(n.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(f).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){n.disabled||this===h&&t(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){n.disabled||t(this).removeClass(r)}).bind("click"+this.eventNamespace,function(t){n.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}}),i&&this.element.bind("change"+this.eventNamespace,function(){e.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return n.disabled?!1:void 0}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(n.disabled)return!1;t(this).addClass("ui-state-active"),e.buttonElement.attr("aria-pressed","true");var i=e.element[0];m(i).not(i).map(function(){return t(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return n.disabled?!1:(t(this).addClass("ui-state-active"),h=this,void e.document.one("mouseup",function(){h=null}))}).bind("mouseup"+this.eventNamespace,function(){return n.disabled?!1:void t(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(e){return n.disabled?!1:void((e.keyCode===t.ui.keyCode.SPACE||e.keyCode===t.ui.keyCode.ENTER)&&t(this).addClass("ui-state-active"))}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){t(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(e){e.keyCode===t.ui.keyCode.SPACE&&t(this).click()})),this._setOption("disabled",n.disabled),this._resetButton()},_determineButtonType:function(){var t,e,n;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"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"),n=this.element.is(":checked"),n&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",n)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(f+" ui-state-active "+p).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(t,e){return this._super(t,e),"disabled"===t?(this.widget().toggleClass("ui-state-disabled",!!e),this.element.prop("disabled",!!e),void(e&&this.buttonElement.removeClass("checkbox"===this.type||"radio"===this.type?"ui-state-focus":"ui-state-focus ui-state-active"))):void this._resetButton()},refresh:function(){var e=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");e!==this.options.disabled&&this._setOption("disabled",e),"radio"===this.type?m(this.element[0]).each(function(){t(this).is(":checked")?t(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):t(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)return void(this.options.label&&this.element.val(this.options.label));var e=this.buttonElement.removeClass(p),n=t("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),i=this.options.icons,r=i.primary&&i.secondary,o=[];i.primary||i.secondary?(this.options.text&&o.push("ui-button-text-icon"+(r?"s":i.primary?"-primary":"-secondary")),i.primary&&e.prepend("<span class='ui-button-icon-primary ui-icon "+i.primary+"'></span>"),i.secondary&&e.append("<span class='ui-button-icon-secondary ui-icon "+i.secondary+"'></span>"),this.options.text||(o.push(r?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||e.attr("title",t.trim(n)))):o.push("ui-button-text-only"),e.addClass(o.join(" "))}}),t.widget("ui.buttonset",{version:"1.11.4",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 e="rtl"===this.element.css("direction"),n=this.element.find(this.options.items),i=n.filter(":ui-button");n.not(":ui-button").button(),i.button("refresh"),this.buttons=n.map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(e?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(e?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}});t.ui.button;/*!
 * jQuery UI Datepicker 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/datepicker/
 */
t.extend(t.ui,{datepicker:{version:"1.11.4"}});var v;t.extend(r.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return s(this._defaults,t||{}),this},_attachDatepicker:function(e,n){var i,r,o;i=e.nodeName.toLowerCase(),r="div"===i||"span"===i,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),r),o.settings=t.extend({},n||{}),"input"===i?this._connectDatepicker(e,o):r&&this._inlineDatepicker(e,o)},_newInst:function(e,n){var i=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:i,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:n,dpDiv:n?o(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,n){var i=t(e);n.append=t([]),n.trigger=t([]),i.hasClass(this.markerClassName)||(this._attachments(i,n),i.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(n),t.data(e,"datepicker",n),n.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,n){var i,r,o,a=this._get(n,"appendText"),s=this._get(n,"isRTL");n.append&&n.append.remove(),a&&(n.append=t("<span class='"+this._appendClass+"'>"+a+"</span>"),e[s?"before":"after"](n.append)),e.unbind("focus",this._showDatepicker),n.trigger&&n.trigger.remove(),i=this._get(n,"showOn"),("focus"===i||"both"===i)&&e.focus(this._showDatepicker),("button"===i||"both"===i)&&(r=this._get(n,"buttonText"),o=this._get(n,"buttonImage"),n.trigger=t(this._get(n,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:r,title:r}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:r,title:r}):r)),e[s?"before":"after"](n.trigger),n.trigger.click(function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,n,i,r,o=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(n=0,i=0,r=0;r<t.length;r++)t[r].length>n&&(n=t[r].length,i=r);return i},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(e,n){var i=t(e);i.hasClass(this.markerClassName)||(i.addClass(this.markerClassName).append(n.dpDiv),t.data(e,"datepicker",n),this._setDate(n,this._getDefaultDate(n),!0),this._updateDatepicker(n),this._updateAlternate(n),n.settings.disabled&&this._disableDatepicker(e),n.dpDiv.css("display","block"))},_dialogDatepicker:function(e,n,i,r,o){var a,l,u,c,d,h=this._dialogInst;return h||(this.uuid+=1,a="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+a+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),t("body").append(this._dialogInput),h=this._dialogInst=this._newInst(this._dialogInput,!1),h.settings={},t.data(this._dialogInput[0],"datepicker",h)),s(h.settings,r||{}),n=n&&n.constructor===Date?this._formatDate(h,n):n,this._dialogInput.val(n),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(l=document.documentElement.clientWidth,u=document.documentElement.clientHeight,c=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+c,u/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),h.settings.onSelect=i,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],"datepicker",h),this},_destroyDatepicker:function(e){var n,i=t(e),r=t.data(e,"datepicker");i.hasClass(this.markerClassName)&&(n=e.nodeName.toLowerCase(),t.removeData(e,"datepicker"),"input"===n?(r.append.remove(),r.trigger.remove(),i.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===n||"span"===n)&&i.removeClass(this.markerClassName).empty(),v===r&&(v=null))},_enableDatepicker:function(e){var n,i,r=t(e),o=t.data(e,"datepicker");r.hasClass(this.markerClassName)&&(n=e.nodeName.toLowerCase(),"input"===n?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===n||"span"===n)&&(i=r.children("."+this._inlineClass),i.children().removeClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var n,i,r=t(e),o=t.data(e,"datepicker");r.hasClass(this.markerClassName)&&(n=e.nodeName.toLowerCase(),"input"===n?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===n||"span"===n)&&(i=r.children("."+this._inlineClass),i.children().addClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.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(e){try{return t.data(e,"datepicker")}catch(n){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,n,i){var r,o,a,l,u=this._getInst(e);return 2===arguments.length&&"string"==typeof n?"defaults"===n?t.extend({},t.datepicker._defaults):u?"all"===n?t.extend({},u.settings):this._get(u,n):null:(r=n||{},"string"==typeof n&&(r={},r[n]=i),void(u&&(this._curInst===u&&this._hideDatepicker(),o=this._getDateDatepicker(e,!0),a=this._getMinMaxDate(u,"min"),l=this._getMinMaxDate(u,"max"),s(u.settings,r),null!==a&&void 0!==r.dateFormat&&void 0===r.minDate&&(u.settings.minDate=this._formatDate(u,a)),null!==l&&void 0!==r.dateFormat&&void 0===r.maxDate&&(u.settings.maxDate=this._formatDate(u,l)),"disabled"in r&&(r.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(t(e),u),this._autoSize(u),this._setDate(u,o),this._updateAlternate(u),this._updateDatepicker(u))))},_changeDatepicker:function(t,e,n){this._optionDatepicker(t,e,n)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var n=this._getInst(t);n&&(this._setDate(n,e),this._updateDatepicker(n),this._updateAlternate(n))},_getDateDatepicker:function(t,e){var n=this._getInst(t);return n&&!n.inline&&this._setDateFromField(n,e),n?this._getDate(n):null},_doKeyDown:function(e){var n,i,r,o=t.datepicker._getInst(e.target),a=!0,s=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),a=!1;break;case 13:return r=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv),r[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,r[0]),n=t.datepicker._get(o,"onSelect"),n?(i=t.datepicker._formatDate(o),n.apply(o.input?o.input[0]:null,[i,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),a=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,s?1:-1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,s?-1:1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||e.metaKey;break;default:a=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):a=!1;a&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var n,i,r=t.datepicker._getInst(e.target);return t.datepicker._get(r,"constrainInput")?(n=t.datepicker._possibleChars(t.datepicker._get(r,"dateFormat")),i=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||" ">i||!n||n.indexOf(i)>-1):void 0},_doKeyUp:function(e){var n,i=t.datepicker._getInst(e.target);if(i.input.val()!==i.lastVal)try{n=t.datepicker.parseDate(t.datepicker._get(i,"dateFormat"),i.input?i.input.val():null,t.datepicker._getFormatConfig(i)),n&&(t.datepicker._setDateFromField(i),t.datepicker._updateAlternate(i),t.datepicker._updateDatepicker(i))}catch(r){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var n,r,o,a,l,u,c;n=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==n&&(t.datepicker._curInst.dpDiv.stop(!0,!0),n&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),r=t.datepicker._get(n,"beforeShow"),o=r?r.apply(e,[e,n]):{},o!==!1&&(s(n.settings,o),n.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(n),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),a=!1,t(e).parents().each(function(){return a|="fixed"===t(this).css("position"),!a}),l={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,n.dpDiv.empty(),n.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(n),l=t.datepicker._checkOffset(n,l,a),n.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":a?"fixed":"absolute",display:"none",left:l.left+"px",top:l.top+"px"}),n.inline||(u=t.datepicker._get(n,"showAnim"),c=t.datepicker._get(n,"duration"),n.dpDiv.css("z-index",i(t(e))+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[u]?n.dpDiv.show(u,t.datepicker._get(n,"showOptions"),c):n.dpDiv[u||"show"](u?c:null),t.datepicker._shouldFocusInput(n)&&n.input.focus(),t.datepicker._curInst=n))}},_updateDatepicker:function(e){this.maxRows=4,v=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var n,i=this._getNumberOfMonths(e),r=i[1],o=17,s=e.dpDiv.find("."+this._dayOverClass+" a");s.length>0&&a.apply(s.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),r>1&&e.dpDiv.addClass("ui-datepicker-multi-"+r).css("width",o*r+"em"),e.dpDiv[(1!==i[0]||1!==i[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.focus(),e.yearshtml&&(n=e.yearshtml,setTimeout(function(){n===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),n=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,n,i){var r=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),a=e.input?e.input.outerWidth():0,s=e.input?e.input.outerHeight():0,l=document.documentElement.clientWidth+(i?0:t(document).scrollLeft()),u=document.documentElement.clientHeight+(i?0:t(document).scrollTop());return n.left-=this._get(e,"isRTL")?r-a:0,n.left-=i&&n.left===e.input.offset().left?t(document).scrollLeft():0,n.top-=i&&n.top===e.input.offset().top+s?t(document).scrollTop():0,n.left-=Math.min(n.left,n.left+r>l&&l>r?Math.abs(n.left+r-l):0),n.top-=Math.min(n.top,n.top+o>u&&u>o?Math.abs(o+s):0),n},_findPos:function(e){for(var n,i=this._getInst(e),r=this._get(i,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[r?"previousSibling":"nextSibling"];return n=t(e).offset(),[n.left,n.top]},_hideDatepicker:function(e){var n,i,r,o,a=this._curInst;!a||e&&a!==t.data(e,"datepicker")||this._datepickerShowing&&(n=this._get(a,"showAnim"),i=this._get(a,"duration"),r=function(){t.datepicker._tidyDialog(a)},t.effects&&(t.effects.effect[n]||t.effects[n])?a.dpDiv.hide(n,t.datepicker._get(a,"showOptions"),i,r):a.dpDiv["slideDown"===n?"slideUp":"fadeIn"===n?"fadeOut":"hide"](n?i:null,r),n||r(),this._datepickerShowing=!1,o=this._get(a,"onClose"),o&&o.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var n=t(e.target),i=t.datepicker._getInst(n[0]);(n[0].id!==t.datepicker._mainDivId&&0===n.parents("#"+t.datepicker._mainDivId).length&&!n.hasClass(t.datepicker.markerClassName)&&!n.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||n.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==i)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,n,i){var r=t(e),o=this._getInst(r[0]);this._isDisabledDatepicker(r[0])||(this._adjustInstDate(o,n+("M"===i?this._get(o,"showCurrentAtPos"):0),i),this._updateDatepicker(o))},_gotoToday:function(e){var n,i=t(e),r=this._getInst(i[0]);this._get(r,"gotoCurrent")&&r.currentDay?(r.selectedDay=r.currentDay,r.drawMonth=r.selectedMonth=r.currentMonth,r.drawYear=r.selectedYear=r.currentYear):(n=new Date,r.selectedDay=n.getDate(),r.drawMonth=r.selectedMonth=n.getMonth(),r.drawYear=r.selectedYear=n.getFullYear()),this._notifyChange(r),this._adjustDate(i)},_selectMonthYear:function(e,n,i){var r=t(e),o=this._getInst(r[0]);o["selected"+("M"===i?"Month":"Year")]=o["draw"+("M"===i?"Month":"Year")]=parseInt(n.options[n.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(r)},_selectDay:function(e,n,i,r){var o,a=t(e);t(r).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||(o=this._getInst(a[0]),o.selectedDay=o.currentDay=t("a",r).html(),o.selectedMonth=o.currentMonth=n,o.selectedYear=o.currentYear=i,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var n=t(e);this._selectDate(n,"")},_selectDate:function(e,n){var i,r=t(e),o=this._getInst(r[0]);n=null!=n?n:this._formatDate(o),o.input&&o.input.val(n),this._updateAlternate(o),i=this._get(o,"onSelect"),i?i.apply(o.input?o.input[0]:null,[n,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var n,i,r,o=this._get(e,"altField");o&&(n=this._get(e,"altFormat")||this._get(e,"dateFormat"),i=this._getDate(e),r=this.formatDate(n,i,this._getFormatConfig(e)),t(o).each(function(){t(this).val(r)}))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,n=new Date(t.getTime());return n.setDate(n.getDate()+4-(n.getDay()||7)),e=n.getTime(),n.setMonth(0),n.setDate(1),Math.floor(Math.round((e-n)/864e5)/7)+1},parseDate:function(e,n,i){if(null==e||null==n)throw"Invalid arguments";if(n="object"==typeof n?n.toString():n+"",""===n)return null;var r,o,a,s,l=0,u=(i?i.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof u?u:(new Date).getFullYear()%100+parseInt(u,10),d=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,h=(i?i.dayNames:null)||this._defaults.dayNames,f=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,p=(i?i.monthNames:null)||this._defaults.monthNames,g=-1,m=-1,v=-1,y=-1,b=!1,x=function(t){var n=r+1<e.length&&e.charAt(r+1)===t;return n&&r++,n},w=function(t){var e=x(t),i="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,r="y"===t?i:1,o=new RegExp("^\\d{"+r+","+i+"}"),a=n.substring(l).match(o);if(!a)throw"Missing number at position "+l;return l+=a[0].length,parseInt(a[0],10)},$=function(e,i,r){var o=-1,a=t.map(x(e)?r:i,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(a,function(t,e){var i=e[1];return n.substr(l,i.length).toLowerCase()===i.toLowerCase()?(o=e[0],l+=i.length,!1):void 0}),-1!==o)return o+1;throw"Unknown name at position "+l},k=function(){if(n.charAt(l)!==e.charAt(r))throw"Unexpected literal at position "+l;l++};for(r=0;r<e.length;r++)if(b)"'"!==e.charAt(r)||x("'")?k():b=!1;else switch(e.charAt(r)){case"d":v=w("d");break;case"D":$("D",d,h);break;case"o":y=w("o");break;case"m":m=w("m");break;case"M":m=$("M",f,p);break;case"y":g=w("y");break;case"@":s=new Date(w("@")),g=s.getFullYear(),m=s.getMonth()+1,v=s.getDate();break;case"!":s=new Date((w("!")-this._ticksTo1970)/1e4),g=s.getFullYear(),m=s.getMonth()+1,v=s.getDate();break;case"'":x("'")?k():b=!0;break;default:k()}if(l<n.length&&(a=n.substr(l),!/^\s+/.test(a)))throw"Extra/unparsed characters found in date: "+a;if(-1===g?g=(new Date).getFullYear():100>g&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c>=g?0:-100)),y>-1)for(m=1,v=y;;){if(o=this._getDaysInMonth(g,m-1),o>=v)break;m++,v-=o}if(s=this._daylightSavingAdjust(new Date(g,m-1,v)),s.getFullYear()!==g||s.getMonth()+1!==m||s.getDate()!==v)throw"Invalid date";return s},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(t,e,n){if(!e)return"";var i,r=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,o=(n?n.dayNames:null)||this._defaults.dayNames,a=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,s=(n?n.monthNames:null)||this._defaults.monthNames,l=function(e){var n=i+1<t.length&&t.charAt(i+1)===e;return n&&i++,n},u=function(t,e,n){var i=""+e;if(l(t))for(;i.length<n;)i="0"+i;return i},c=function(t,e,n,i){return l(t)?i[e]:n[e]},d="",h=!1;if(e)for(i=0;i<t.length;i++)if(h)"'"!==t.charAt(i)||l("'")?d+=t.charAt(i):h=!1;else switch(t.charAt(i)){case"d":d+=u("d",e.getDate(),2);break;case"D":d+=c("D",e.getDay(),r,o);break;case"o":d+=u("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":d+=u("m",e.getMonth()+1,2);break;case"M":d+=c("M",e.getMonth(),a,s);break;case"y":d+=l("y")?e.getFullYear():(e.getYear()%100<10?"0":"")+e.getYear()%100;break;case"@":d+=e.getTime();break;case"!":d+=1e4*e.getTime()+this._ticksTo1970;break;case"'":l("'")?d+="'":h=!0;break;default:d+=t.charAt(i)}return d},_possibleChars:function(t){var e,n="",i=!1,r=function(n){var i=e+1<t.length&&t.charAt(e+1)===n;return i&&e++,i};for(e=0;e<t.length;e++)if(i)"'"!==t.charAt(e)||r("'")?n+=t.charAt(e):i=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":n+="0123456789";break;case"D":case"M":return null;case"'":r("'")?n+="'":i=!0;break;default:n+=t.charAt(e)}return n},_get:function(t,e){return void 0!==t.settings[e]?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var n=this._get(t,"dateFormat"),i=t.lastVal=t.input?t.input.val():null,r=this._getDefaultDate(t),o=r,a=this._getFormatConfig(t);try{o=this.parseDate(n,i,a)||r}catch(s){i=e?"":i}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=i?o.getDate():0,t.currentMonth=i?o.getMonth():0,t.currentYear=i?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,n,i){var r=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},o=function(n){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),n,t.datepicker._getFormatConfig(e))}catch(i){}for(var r=(n.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=r.getFullYear(),a=r.getMonth(),s=r.getDate(),l=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,u=l.exec(n);u;){switch(u[2]||"d"){case"d":case"D":s+=parseInt(u[1],10);break;case"w":case"W":s+=7*parseInt(u[1],10);break;case"m":case"M":a+=parseInt(u[1],10),s=Math.min(s,t.datepicker._getDaysInMonth(o,a));break;case"y":case"Y":o+=parseInt(u[1],10),s=Math.min(s,t.datepicker._getDaysInMonth(o,a))}u=l.exec(n)}return new Date(o,a,s)},a=null==n||""===n?i:"string"==typeof n?o(n):"number"==typeof n?isNaN(n)?i:r(n):new Date(n.getTime());return a=a&&"Invalid Date"===a.toString()?i:a,a&&(a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)),this._daylightSavingAdjust(a)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,n){var i=!e,r=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(),r===t.selectedMonth&&o===t.selectedYear||n||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(i?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var n=this._get(e,"stepMonths"),i="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(i,-n,"M")},next:function(){t.datepicker._adjustDate(i,+n,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(i)},selectDay:function(){return t.datepicker._selectDay(i,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(i,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(i,this,"Y"),!1}};t(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,n,i,r,o,a,s,l,u,c,d,h,f,p,g,m,v,y,b,x,w,$,k,_,C,M,D,S,T,A,E,O,N,I,P,H,F,W,L,z=new Date,R=this._daylightSavingAdjust(new Date(z.getFullYear(),z.getMonth(),z.getDate())),j=this._get(t,"isRTL"),q=this._get(t,"showButtonPanel"),V=this._get(t,"hideIfNoPrevNext"),B=this._get(t,"navigationAsDateFormat"),U=this._getNumberOfMonths(t),Y=this._get(t,"showCurrentAtPos"),G=this._get(t,"stepMonths"),X=1!==U[0]||1!==U[1],K=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),Z=this._getMinMaxDate(t,"min"),Q=this._getMinMaxDate(t,"max"),J=t.drawMonth-Y,te=t.drawYear;if(0>J&&(J+=12,te--),Q)for(e=this._daylightSavingAdjust(new Date(Q.getFullYear(),Q.getMonth()-U[0]*U[1]+1,Q.getDate())),e=Z&&Z>e?Z:e;this._daylightSavingAdjust(new Date(te,J,1))>e;)J--,0>J&&(J=11,te--);for(t.drawMonth=J,t.drawYear=te,n=this._get(t,"prevText"),n=B?this.formatDate(n,this._daylightSavingAdjust(new Date(te,J-G,1)),this._getFormatConfig(t)):n,i=this._canAdjustMonth(t,-1,te,J)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(j?"e":"w")+"'>"+n+"</span></a>":V?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(j?"e":"w")+"'>"+n+"</span></a>",r=this._get(t,"nextText"),r=B?this.formatDate(r,this._daylightSavingAdjust(new Date(te,J+G,1)),this._getFormatConfig(t)):r,o=this._canAdjustMonth(t,1,te,J)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+r+"'><span class='ui-icon ui-icon-circle-triangle-"+(j?"w":"e")+"'>"+r+"</span></a>":V?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+r+"'><span class='ui-icon ui-icon-circle-triangle-"+(j?"w":"e")+"'>"+r+"</span></a>",a=this._get(t,"currentText"),s=this._get(t,"gotoCurrent")&&t.currentDay?K:R,a=B?this.formatDate(a,s,this._getFormatConfig(t)):a,l=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>",u=q?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(j?l:"")+(this._isInRange(t,s)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+a+"</button>":"")+(j?"":l)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,d=this._get(t,"showWeek"),h=this._get(t,"dayNames"),f=this._get(t,"dayNamesMin"),p=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),v=this._get(t,"showOtherMonths"),y=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),x="",$=0;$<U[0];$++){for(k="",this.maxRows=4,_=0;_<U[1];_++){if(C=this._daylightSavingAdjust(new Date(te,J,t.selectedDay)),M=" ui-corner-all",D="",X){if(D+="<div class='ui-datepicker-group",U[1]>1)switch(_){case 0:D+=" ui-datepicker-group-first",M=" ui-corner-"+(j?"right":"left");break;case U[1]-1:D+=" ui-datepicker-group-last",M=" ui-corner-"+(j?"left":"right");break;default:D+=" ui-datepicker-group-middle",M=""}D+="'>"}for(D+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+M+"'>"+(/all|left/.test(M)&&0===$?j?o:i:"")+(/all|right/.test(M)&&0===$?j?i:o:"")+this._generateMonthYearHeader(t,J,te,Z,Q,$>0||_>0,p,g)+"</div><table class='ui-datepicker-calendar'><thead><tr>",S=d?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;7>w;w++)T=(w+c)%7,S+="<th scope='col'"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+h[T]+"'>"+f[T]+"</span></th>";for(D+=S+"</tr></thead><tbody>",A=this._getDaysInMonth(te,J),te===t.selectedYear&&J===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,A)),E=(this._getFirstDayOfMonth(te,J)-c+7)%7,O=Math.ceil((E+A)/7),N=X&&this.maxRows>O?this.maxRows:O,this.maxRows=N,I=this._daylightSavingAdjust(new Date(te,J,1-E)),P=0;N>P;P++){for(D+="<tr>",H=d?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(I)+"</td>":"",w=0;7>w;w++)F=m?m.apply(t.input?t.input[0]:null,[I]):[!0,""],W=I.getMonth()!==J,L=W&&!y||!F[0]||Z&&Z>I||Q&&I>Q,H+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(W?" ui-datepicker-other-month":"")+(I.getTime()===C.getTime()&&J===t.selectedMonth&&t._keyEvent||b.getTime()===I.getTime()&&b.getTime()===C.getTime()?" "+this._dayOverClass:"")+(L?" "+this._unselectableClass+" ui-state-disabled":"")+(W&&!v?"":" "+F[1]+(I.getTime()===K.getTime()?" "+this._currentClass:"")+(I.getTime()===R.getTime()?" ui-datepicker-today":""))+"'"+(W&&!v||!F[2]?"":" title='"+F[2].replace(/'/g,"&#39;")+"'")+(L?"":" data-handler='selectDay' data-event='click' data-month='"+I.getMonth()+"' data-year='"+I.getFullYear()+"'")+">"+(W&&!v?"&#xa0;":L?"<span class='ui-state-default'>"+I.getDate()+"</span>":"<a class='ui-state-default"+(I.getTime()===R.getTime()?" ui-state-highlight":"")+(I.getTime()===K.getTime()?" ui-state-active":"")+(W?" ui-priority-secondary":"")+"' href='#'>"+I.getDate()+"</a>")+"</td>",I.setDate(I.getDate()+1),I=this._daylightSavingAdjust(I);D+=H+"</tr>"}J++,J>11&&(J=0,te++),D+="</tbody></table>"+(X?"</div>"+(U[0]>0&&_===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),k+=D}x+=k}return x+=u,t._keyEvent=!1,x},_generateMonthYearHeader:function(t,e,n,i,r,o,a,s){var l,u,c,d,h,f,p,g,m=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),y=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",x="";if(o||!m)x+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(l=i&&i.getFullYear()===n,u=r&&r.getFullYear()===n,x+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!l||c>=i.getMonth())&&(!u||c<=r.getMonth())&&(x+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+s[c]+"</option>");x+="</select>"}if(y||(b+=x+(!o&&m&&v?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!v)b+="<span class='ui-datepicker-year'>"+n+"</span>";else{for(d=this._get(t,"yearRange").split(":"),h=(new Date).getFullYear(),f=function(t){var e=t.match(/c[+\-].*/)?n+parseInt(t.substring(1),10):t.match(/[+\-].*/)?h+parseInt(t,10):parseInt(t,10);return isNaN(e)?h:e},p=f(d[0]),g=Math.max(p,f(d[1]||"")),p=i?Math.max(p,i.getFullYear()):p,g=r?Math.min(g,r.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";g>=p;p++)t.yearshtml+="<option value='"+p+"'"+(p===n?" selected='selected'":"")+">"+p+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),y&&(b+=(!o&&m&&v?"":"&#xa0;")+x),b+="</div>"},_adjustInstDate:function(t,e,n){var i=t.drawYear+("Y"===n?e:0),r=t.drawMonth+("M"===n?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(i,r))+("D"===n?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(i,r,o)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),("M"===n||"Y"===n)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var n=this._getMinMaxDate(t,"min"),i=this._getMinMaxDate(t,"max"),r=n&&n>e?n:e;return i&&r>i?i:r},_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()},_canAdjustMonth:function(t,e,n,i){var r=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(n,i+(0>e?e:r[0]*r[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var n,i,r=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),a=null,s=null,l=this._get(t,"yearRange");return l&&(n=l.split(":"),i=(new Date).getFullYear(),a=parseInt(n[0],10),s=parseInt(n[1],10),n[0].match(/[+\-].*/)&&(a+=i),n[1].match(/[+\-].*/)&&(s+=i)),(!r||e.getTime()>=r.getTime())&&(!o||e.getTime()<=o.getTime())&&(!a||e.getFullYear()>=a)&&(!s||e.getFullYear()<=s)},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,n,i){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var r=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(i,n,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));
return this.formatDate(this._get(t,"dateFormat"),r,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).mousedown(t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var n=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(n)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(n)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(n))},t.datepicker=new r,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.11.4";t.datepicker;/*!
 * jQuery UI Draggable 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/draggable/
 */
t.widget("ui.draggable",t.ui.mouse,{version:"1.11.4",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&&this._setPositionRelative(),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?void(this.destroyOnClear=!0):(this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._removeHandleClassName(),void this._mouseDestroy())},_mouseCapture:function(e){var n=this.options;return this._blurActiveElement(e),this.helper||n.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(this._blockFrames(n.iframeFix===!0?"iframe":n.iframeFix),!0):!1)},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map(function(){var e=t(this);return t("<div>").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var n=this.document[0];if(this.handleElement.is(e.target))try{n.activeElement&&"body"!==n.activeElement.nodeName.toLowerCase()&&t(n.activeElement).blur()}catch(i){}},_mouseStart:function(e){var n=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===t(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,n.cursorAt&&this._adjustOffsetFromHelper(n.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!n.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._normalizeRightBottom(),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,n){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!n){var i=this._uiHash();if(this._trigger("drag",e,i)===!1)return this._mouseUp({}),!1;this.position=i.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var n=this,i=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(i=t.ui.ddmanager.drop(this,e)),this.dropped&&(i=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!i||"valid"===this.options.revert&&i||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,i)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){n._trigger("stop",e)!==!1&&n._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.focus(),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this.handleElement.addClass("ui-draggable-handle")},_removeHandleClassName:function(){this.handleElement.removeClass("ui-draggable-handle")},_createHelper:function(e){var n=this.options,i=t.isFunction(n.helper),r=i?t(n.helper.apply(this.element[0],[e])):"clone"===n.helper?this.element.clone().removeAttr("id"):this.element;return r.parents("body").length||r.appendTo("parent"===n.appendTo?this.element[0].parentNode:n.appendTo),i&&r[0]===this.element[0]&&this._setPositionRelative(),r[0]===this.element[0]||/(fixed|absolute)/.test(r.css("position"))||r.css("position","absolute"),r},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),n=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==n&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?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 e,n,i,r=this.options,o=this.document[0];return this.relativeContainer=null,r.containment?"window"===r.containment?void(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===r.containment?void(this.containment=[0,0,t(o).width()-this.helperProportions.width-this.margins.left,(t(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):r.containment.constructor===Array?void(this.containment=r.containment):("parent"===r.containment&&(r.containment=this.helper[0].parentNode),n=t(r.containment),i=n[0],void(i&&(e=/(scroll|auto)/.test(n.css("overflow")),this.containment=[(parseInt(n.css("borderLeftWidth"),10)||0)+(parseInt(n.css("paddingLeft"),10)||0),(parseInt(n.css("borderTopWidth"),10)||0)+(parseInt(n.css("paddingTop"),10)||0),(e?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(n.css("borderRightWidth"),10)||0)-(parseInt(n.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(n.css("borderBottomWidth"),10)||0)-(parseInt(n.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=n))):void(this.containment=null)},_convertPositionTo:function(t,e){e||(e=this.position);var n="absolute"===t?1:-1,i=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.offset.scroll.top:i?0:this.offset.scroll.top)*n,left:e.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.offset.scroll.left:i?0:this.offset.scroll.left)*n}},_generatePosition:function(t,e){var n,i,r,o,a=this.options,s=this._isRootNode(this.scrollParent[0]),l=t.pageX,u=t.pageY;return s&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(i=this.relativeContainer.offset(),n=[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]):n=this.containment,t.pageX-this.offset.click.left<n[0]&&(l=n[0]+this.offset.click.left),t.pageY-this.offset.click.top<n[1]&&(u=n[1]+this.offset.click.top),t.pageX-this.offset.click.left>n[2]&&(l=n[2]+this.offset.click.left),t.pageY-this.offset.click.top>n[3]&&(u=n[3]+this.offset.click.top)),a.grid&&(r=a.grid[1]?this.originalPageY+Math.round((u-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,u=n?r-this.offset.click.top>=n[1]||r-this.offset.click.top>n[3]?r:r-this.offset.click.top>=n[1]?r-a.grid[1]:r+a.grid[1]:r,o=a.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,l=n?o-this.offset.click.left>=n[0]||o-this.offset.click.left>n[2]?o:o-this.offset.click.left>=n[0]?o-a.grid[0]:o+a.grid[0]:o),"y"===a.axis&&(l=this.originalPageX),"x"===a.axis&&(u=this.originalPageY)),{top:u-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:s?0: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,this.destroyOnClear&&this.destroy()},_normalizeRightBottom:function(){"y"!==this.options.axis&&"auto"!==this.helper.css("right")&&(this.helper.width(this.helper.width()),this.helper.css("right","auto")),"x"!==this.options.axis&&"auto"!==this.helper.css("bottom")&&(this.helper.height(this.helper.height()),this.helper.css("bottom","auto"))},_trigger:function(e,n,i){return i=i||this._uiHash(),t.ui.plugin.call(this,e,[n,i,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),i.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,n,i)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,n,i){var r=t.extend({},n,{item:i.element});i.sortables=[],t(i.options.connectToSortable).each(function(){var n=t(this).sortable("instance");n&&!n.options.disabled&&(i.sortables.push(n),n.refreshPositions(),n._trigger("activate",e,r))})},stop:function(e,n,i){var r=t.extend({},n,{item:i.element});i.cancelHelperRemoval=!1,t.each(i.sortables,function(){var t=this;t.isOver?(t.isOver=0,i.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,r))})},drag:function(e,n,i){t.each(i.sortables,function(){var r=!1,o=this;o.positionAbs=i.positionAbs,o.helperProportions=i.helperProportions,o.offset.click=i.offset.click,o._intersectsWith(o.containerCache)&&(r=!0,t.each(i.sortables,function(){return this.positionAbs=i.positionAbs,this.helperProportions=i.helperProportions,this.offset.click=i.offset.click,this!==o&&this._intersectsWith(this.containerCache)&&t.contains(o.element[0],this.element[0])&&(r=!1),r})),r?(o.isOver||(o.isOver=1,i._parent=n.helper.parent(),o.currentItem=n.helper.appendTo(o.element).data("ui-sortable-item",!0),o.options._helper=o.options.helper,o.options.helper=function(){return n.helper[0]},e.target=o.currentItem[0],o._mouseCapture(e,!0),o._mouseStart(e,!0,!0),o.offset.click.top=i.offset.click.top,o.offset.click.left=i.offset.click.left,o.offset.parent.left-=i.offset.parent.left-o.offset.parent.left,o.offset.parent.top-=i.offset.parent.top-o.offset.parent.top,i._trigger("toSortable",e),i.dropped=o.element,t.each(i.sortables,function(){this.refreshPositions()}),i.currentItem=i.element,o.fromOutside=i),o.currentItem&&(o._mouseDrag(e),n.position=o.position)):o.isOver&&(o.isOver=0,o.cancelHelperRemoval=!0,o.options._revert=o.options.revert,o.options.revert=!1,o._trigger("out",e,o._uiHash(o)),o._mouseStop(e,!0),o.options.revert=o.options._revert,o.options.helper=o.options._helper,o.placeholder&&o.placeholder.remove(),n.helper.appendTo(i._parent),i._refreshOffsets(e),n.position=i._generatePosition(e,!0),i._trigger("fromSortable",e),i.dropped=!1,t.each(i.sortables,function(){this.refreshPositions()}))})}}),t.ui.plugin.add("draggable","cursor",{start:function(e,n,i){var r=t("body"),o=i.options;r.css("cursor")&&(o._cursor=r.css("cursor")),r.css("cursor",o.cursor)},stop:function(e,n,i){var r=i.options;r._cursor&&t("body").css("cursor",r._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,n,i){var r=t(n.helper),o=i.options;r.css("opacity")&&(o._opacity=r.css("opacity")),r.css("opacity",o.opacity)},stop:function(e,n,i){var r=i.options;r._opacity&&t(n.helper).css("opacity",r._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,n){n.scrollParentNotHidden||(n.scrollParentNotHidden=n.helper.scrollParent(!1)),n.scrollParentNotHidden[0]!==n.document[0]&&"HTML"!==n.scrollParentNotHidden[0].tagName&&(n.overflowOffset=n.scrollParentNotHidden.offset())},drag:function(e,n,i){var r=i.options,o=!1,a=i.scrollParentNotHidden[0],s=i.document[0];a!==s&&"HTML"!==a.tagName?(r.axis&&"x"===r.axis||(i.overflowOffset.top+a.offsetHeight-e.pageY<r.scrollSensitivity?a.scrollTop=o=a.scrollTop+r.scrollSpeed:e.pageY-i.overflowOffset.top<r.scrollSensitivity&&(a.scrollTop=o=a.scrollTop-r.scrollSpeed)),r.axis&&"y"===r.axis||(i.overflowOffset.left+a.offsetWidth-e.pageX<r.scrollSensitivity?a.scrollLeft=o=a.scrollLeft+r.scrollSpeed:e.pageX-i.overflowOffset.left<r.scrollSensitivity&&(a.scrollLeft=o=a.scrollLeft-r.scrollSpeed))):(r.axis&&"x"===r.axis||(e.pageY-t(s).scrollTop()<r.scrollSensitivity?o=t(s).scrollTop(t(s).scrollTop()-r.scrollSpeed):t(window).height()-(e.pageY-t(s).scrollTop())<r.scrollSensitivity&&(o=t(s).scrollTop(t(s).scrollTop()+r.scrollSpeed))),r.axis&&"y"===r.axis||(e.pageX-t(s).scrollLeft()<r.scrollSensitivity?o=t(s).scrollLeft(t(s).scrollLeft()-r.scrollSpeed):t(window).width()-(e.pageX-t(s).scrollLeft())<r.scrollSensitivity&&(o=t(s).scrollLeft(t(s).scrollLeft()+r.scrollSpeed)))),o!==!1&&t.ui.ddmanager&&!r.dropBehaviour&&t.ui.ddmanager.prepareOffsets(i,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,n,i){var r=i.options;i.snapElements=[],t(r.snap.constructor!==String?r.snap.items||":data(ui-draggable)":r.snap).each(function(){var e=t(this),n=e.offset();this!==i.element[0]&&i.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:n.top,left:n.left})})},drag:function(e,n,i){var r,o,a,s,l,u,c,d,h,f,p=i.options,g=p.snapTolerance,m=n.offset.left,v=m+i.helperProportions.width,y=n.offset.top,b=y+i.helperProportions.height;for(h=i.snapElements.length-1;h>=0;h--)l=i.snapElements[h].left-i.margins.left,u=l+i.snapElements[h].width,c=i.snapElements[h].top-i.margins.top,d=c+i.snapElements[h].height,l-g>v||m>u+g||c-g>b||y>d+g||!t.contains(i.snapElements[h].item.ownerDocument,i.snapElements[h].item)?(i.snapElements[h].snapping&&i.options.snap.release&&i.options.snap.release.call(i.element,e,t.extend(i._uiHash(),{snapItem:i.snapElements[h].item})),i.snapElements[h].snapping=!1):("inner"!==p.snapMode&&(r=Math.abs(c-b)<=g,o=Math.abs(d-y)<=g,a=Math.abs(l-v)<=g,s=Math.abs(u-m)<=g,r&&(n.position.top=i._convertPositionTo("relative",{top:c-i.helperProportions.height,left:0}).top),o&&(n.position.top=i._convertPositionTo("relative",{top:d,left:0}).top),a&&(n.position.left=i._convertPositionTo("relative",{top:0,left:l-i.helperProportions.width}).left),s&&(n.position.left=i._convertPositionTo("relative",{top:0,left:u}).left)),f=r||o||a||s,"outer"!==p.snapMode&&(r=Math.abs(c-y)<=g,o=Math.abs(d-b)<=g,a=Math.abs(l-m)<=g,s=Math.abs(u-v)<=g,r&&(n.position.top=i._convertPositionTo("relative",{top:c,left:0}).top),o&&(n.position.top=i._convertPositionTo("relative",{top:d-i.helperProportions.height,left:0}).top),a&&(n.position.left=i._convertPositionTo("relative",{top:0,left:l}).left),s&&(n.position.left=i._convertPositionTo("relative",{top:0,left:u-i.helperProportions.width}).left)),!i.snapElements[h].snapping&&(r||o||a||s||f)&&i.options.snap.snap&&i.options.snap.snap.call(i.element,e,t.extend(i._uiHash(),{snapItem:i.snapElements[h].item})),i.snapElements[h].snapping=r||o||a||s||f)}}),t.ui.plugin.add("draggable","stack",{start:function(e,n,i){var r,o=i.options,a=t.makeArray(t(o.stack)).sort(function(e,n){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(n).css("zIndex"),10)||0)});a.length&&(r=parseInt(t(a[0]).css("zIndex"),10)||0,t(a).each(function(e){t(this).css("zIndex",r+e)}),this.css("zIndex",r+a.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,n,i){var r=t(n.helper),o=i.options;r.css("zIndex")&&(o._zIndex=r.css("zIndex")),r.css("zIndex",o.zIndex)},stop:function(e,n,i){var r=i.options;r._zIndex&&t(n.helper).css("zIndex",r._zIndex)}});t.ui.draggable;/*!
 * jQuery UI Resizable 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/resizable/
 */
t.widget("ui.resizable",t.ui.mouse,{version:"1.11.4",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},_num:function(t){return parseInt(t,10)||0},_isNumber:function(t){return!isNaN(parseInt(t,10))},_hasScroll:function(e,n){if("hidden"===t(e).css("overflow"))return!1;var i=n&&"left"===n?"scrollLeft":"scrollTop",r=!1;return e[i]>0?!0:(e[i]=1,r=e[i]>0,e[i]=0,r)},_create:function(){var e,n,i,r,o,a=this,s=this.options;if(this.element.addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!s.aspectRatio,aspectRatio:s.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:s.helper||s.ghost||s.animate?s.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("<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.resizable("instance")),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=s.handles||(t(".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=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},n=0;n<e.length;n++)i=t.trim(e[n]),o="ui-resizable-"+i,r=t("<div class='ui-resizable-handle "+o+"'></div>"),r.css({zIndex:s.zIndex}),"se"===i&&r.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[i]=".ui-resizable-"+i,this.element.append(r);this._renderAxis=function(e){var n,i,r,o;e=e||this.element;for(n in this.handles)this.handles[n].constructor===String?this.handles[n]=this.element.children(this.handles[n]).first().show():(this.handles[n].jquery||this.handles[n].nodeType)&&(this.handles[n]=t(this.handles[n]),this._on(this.handles[n],{mousedown:a._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=t(this.handles[n],this.element),o=/sw|ne|nw|se|n|s/.test(n)?i.outerHeight():i.outerWidth(),r=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join(""),e.css(r,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[n])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.mouseover(function(){a.resizing||(this.className&&(r=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=r&&r[1]?r[1]:"se")}),s.autoHide&&(this._handles.hide(),t(this.element).addClass("ui-resizable-autohide").mouseenter(function(){s.disabled||(t(this).removeClass("ui-resizable-autohide"),a._handles.show())}).mouseleave(function(){s.disabled||a.resizing||(t(this).addClass("ui-resizable-autohide"),a._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,n=function(e){t(e).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(n(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),n(this.originalElement),this},_mouseCapture:function(e){var n,i,r=!1;for(n in this.handles)i=t(this.handles[n])[0],(i===e.target||t.contains(i,e.target))&&(r=!0);return!this.options.disabled&&r},_mouseStart:function(e){var n,i,r,o=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),n=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),o.containment&&(n+=t(o.containment).scrollLeft()||0,i+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:n,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:n,top:i},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,r=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===r?this.axis+"-resize":r),a.addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var n,i,r=this.originalMousePosition,o=this.axis,a=e.pageX-r.left||0,s=e.pageY-r.top||0,l=this._change[o];return this._updatePrevProperties(),l?(n=l.apply(this,[e,a,s]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(n=this._updateRatio(n,e)),n=this._respectSize(n,e),this._updateCache(n),this._propagate("resize",e),i=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(i)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(e){this.resizing=!1;var n,i,r,o,a,s,l,u=this.options,c=this;return this._helper&&(n=this._proportionallyResizeElements,i=n.length&&/textarea/i.test(n[0].nodeName),r=i&&this._hasScroll(n[0],"left")?0:c.sizeDiff.height,o=i?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-r},s=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,l=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null,u.animate||this.element.css(t.extend(a,{top:l,left:s})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!u.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,n,i,r,o,a=this.options;o={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,i=o.minWidth/this.aspectRatio,n=o.maxHeight*this.aspectRatio,r=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),i>o.minHeight&&(o.minHeight=i),n<o.maxWidth&&(o.maxWidth=n),r<o.maxHeight&&(o.maxHeight=r)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,n=this.size,i=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===i&&(t.left=e.left+(n.width-t.width),t.top=null),"nw"===i&&(t.top=e.top+(n.height-t.height),t.left=e.left+(n.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,n=this.axis,i=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,r=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,s=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,u=/sw|nw|w/.test(n),c=/nw|ne|n/.test(n);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),i&&(t.width=e.maxWidth),r&&(t.height=e.maxHeight),o&&u&&(t.left=s-e.minWidth),i&&u&&(t.left=s-e.maxWidth),a&&c&&(t.top=l-e.minHeight),r&&c&&(t.top=l-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},_getPaddingPlusBorderDimensions:function(t){for(var e=0,n=[],i=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],r=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];4>e;e++)n[e]=parseInt(i[e],10)||0,n[e]+=parseInt(r[e],10)||0;return{height:n[0]+n[2],width:n[1]+n[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,n=this.helper||this.element;e<this._proportionallyResizeElements.length;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:n.height()-this.outerDimensions.height||0,width:n.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,n=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<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:++n.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 n=this.originalSize,i=this.originalPosition;return{left:i.left+e,width:n.width-e}},n:function(t,e,n){var i=this.originalSize,r=this.originalPosition;return{top:r.top+n,height:i.height-n}},s:function(t,e,n){return{height:this.originalSize.height+n}},se:function(e,n,i){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,n,i]))},sw:function(e,n,i){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,n,i]))},ne:function(e,n,i){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,n,i]))},nw:function(e,n,i){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,n,i]))}},_propagate:function(e,n){t.ui.plugin.call(this,e,[n,this.ui()]),"resize"!==e&&this._trigger(e,n,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}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var n=t(this).resizable("instance"),i=n.options,r=n._proportionallyResizeElements,o=r.length&&/textarea/i.test(r[0].nodeName),a=o&&n._hasScroll(r[0],"left")?0:n.sizeDiff.height,s=o?0:n.sizeDiff.width,l={width:n.size.width-s,height:n.size.height-a},u=parseInt(n.element.css("left"),10)+(n.position.left-n.originalPosition.left)||null,c=parseInt(n.element.css("top"),10)+(n.position.top-n.originalPosition.top)||null;n.element.animate(t.extend(l,c&&u?{top:c,left:u}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var i={width:parseInt(n.element.css("width"),10),height:parseInt(n.element.css("height"),10),top:parseInt(n.element.css("top"),10),left:parseInt(n.element.css("left"),10)};r&&r.length&&t(r[0]).css({width:i.width,height:i.height}),n._updateCache(i),n._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,n,i,r,o,a,s,l=t(this).resizable("instance"),u=l.options,c=l.element,d=u.containment,h=d instanceof t?d.get(0):/parent/.test(d)?c.parent().get(0):d;h&&(l.containerElement=t(h),/document/.test(d)||d===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(h),n=[],t(["Top","Right","Left","Bottom"]).each(function(t,i){n[t]=l._num(e.css("padding"+i))}),l.containerOffset=e.offset(),l.containerPosition=e.position(),l.containerSize={height:e.innerHeight()-n[3],width:e.innerWidth()-n[1]},i=l.containerOffset,r=l.containerSize.height,o=l.containerSize.width,a=l._hasScroll(h,"left")?h.scrollWidth:o,s=l._hasScroll(h)?h.scrollHeight:r,l.parentData={element:h,left:i.left,top:i.top,width:a,height:s}))},resize:function(e){var n,i,r,o,a=t(this).resizable("instance"),s=a.options,l=a.containerOffset,u=a.position,c=a._aspectRatio||e.shiftKey,d={top:0,left:0},h=a.containerElement,f=!0;h[0]!==document&&/static/.test(h.css("position"))&&(d=l),u.left<(a._helper?l.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-l.left:a.position.left-d.left),c&&(a.size.height=a.size.width/a.aspectRatio,f=!1),a.position.left=s.helper?l.left:0),u.top<(a._helper?l.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-l.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,f=!1),a.position.top=a._helper?l.top:0),r=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),r&&o?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),n=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-d.left:a.offset.left-l.left)),i=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-d.top:a.offset.top-l.top)),n+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-n,c&&(a.size.height=a.size.width/a.aspectRatio,f=!1)),i+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-i,c&&(a.size.width=a.size.height*a.aspectRatio,f=!1)),f||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),n=e.options,i=e.containerOffset,r=e.containerPosition,o=e.containerElement,a=t(e.helper),s=a.offset(),l=a.outerWidth()-e.sizeDiff.width,u=a.outerHeight()-e.sizeDiff.height;e._helper&&!n.animate&&/relative/.test(o.css("position"))&&t(this).css({left:s.left-r.left-i.left,width:l,height:u}),e._helper&&!n.animate&&/static/.test(o.css("position"))&&t(this).css({left:s.left-r.left-i.left,width:l,height:u})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),n=e.options;t(n.alsoResize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10)})})},resize:function(e,n){var i=t(this).resizable("instance"),r=i.options,o=i.originalSize,a=i.originalPosition,s={height:i.size.height-o.height||0,width:i.size.width-o.width||0,top:i.position.top-a.top||0,left:i.position.left-a.left||0};t(r.alsoResize).each(function(){var e=t(this),i=t(this).data("ui-resizable-alsoresize"),r={},o=e.parents(n.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var n=(i[e]||0)+(s[e]||0);n&&n>=0&&(r[e]=n||null)}),e.css(r)})},stop:function(){t(this).removeData("resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),n=e.options,i=e.size;e.ghost=e.originalElement.clone(),e.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 n.ghost?n.ghost:""),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,n=t(this).resizable("instance"),i=n.options,r=n.size,o=n.originalSize,a=n.originalPosition,s=n.axis,l="number"==typeof i.grid?[i.grid,i.grid]:i.grid,u=l[0]||1,c=l[1]||1,d=Math.round((r.width-o.width)/u)*u,h=Math.round((r.height-o.height)/c)*c,f=o.width+d,p=o.height+h,g=i.maxWidth&&i.maxWidth<f,m=i.maxHeight&&i.maxHeight<p,v=i.minWidth&&i.minWidth>f,y=i.minHeight&&i.minHeight>p;i.grid=l,v&&(f+=u),y&&(p+=c),g&&(f-=u),m&&(p-=c),/^(se|s|e)$/.test(s)?(n.size.width=f,n.size.height=p):/^(ne)$/.test(s)?(n.size.width=f,n.size.height=p,n.position.top=a.top-h):/^(sw)$/.test(s)?(n.size.width=f,n.size.height=p,n.position.left=a.left-d):((0>=p-c||0>=f-u)&&(e=n._getPaddingPlusBorderDimensions(this)),p-c>0?(n.size.height=p,n.position.top=a.top-h):(p=c-e.height,n.size.height=p,n.position.top=a.top+o.height-p),f-u>0?(n.size.width=f,n.position.left=a.left-d):(f=u-e.width,n.size.width=f,n.position.left=a.left+o.width-f))}});t.ui.resizable,t.widget("ui.dialog",{version:"1.11.4",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(e){var n=t(this).css(e).offset().top;0>n&&t(this).css("top",e.top-n)}},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},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_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&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._untrackInstance(),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),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:t.noop,enable:t.noop,close:function(e){var n,i=this;if(this._isOpen&&this._trigger("beforeClose",e)!==!1){if(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),!this.opener.filter(":focusable").focus().length)try{n=this.document[0].activeElement,n&&"body"!==n.nodeName.toLowerCase()&&t(n).blur()}catch(r){}this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,n){var i=!1,r=this.uiDialog.siblings(".ui-front:visible").map(function(){return+t(this).css("z-index")}).get(),o=Math.max.apply(null,r);return o>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",o+1),i=!0),i&&!n&&this._trigger("focus",e),i},open:function(){var e=this;return this._isOpen?void(this._moveToTop()&&this._focusTabbable()):(this._isOpen=!0,this.opener=t(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._makeFocusTarget(),void this._trigger("open"))},_focusTabbable:function(){var t=this._focusedElement;t||(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(e){function n(){var e=this.document[0].activeElement,n=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);n||this._focusTabbable()}e.preventDefault(),n.call(this),this._delay(n)},_createWrapper:function(){this.uiDialog=t("<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(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),void this.close(e);if(e.keyCode===t.ui.keyCode.TAB&&!e.isDefaultPrevented()){var n=this.uiDialog.find(":tabbable"),i=n.filter(":first"),r=n.filter(":last");e.target!==r[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==i[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(this._delay(function(){r.focus()}),e.preventDefault()):(this._delay(function(){i.focus()}),e.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 e;this.uiDialogTitlebar=t("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=t("<button type='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)}}),e=t("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(e),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title||t.html("&#160;"),t.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var e=this,n=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(n)||t.isArray(n)&&!n.length?void this.uiDialog.removeClass("ui-dialog-buttons"):(t.each(n,function(n,i){var r,o;i=t.isFunction(i)?{click:i,text:n}:i,i=t.extend({type:"button"},i),r=i.click,i.click=function(){r.apply(e.element[0],arguments)},o={icons:i.icons,text:i.showText},delete i.icons,delete i.showText,t("<button></button>",i).button(o).appendTo(e.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),void this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var n=this,i=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(i,r){t(this).addClass("ui-dialog-dragging"),n._blockFrames(),n._trigger("dragStart",i,e(r))},drag:function(t,i){n._trigger("drag",t,e(i))},stop:function(r,o){var a=o.offset.left-n.document.scrollLeft(),s=o.offset.top-n.document.scrollTop();i.position={my:"left top",at:"left"+(a>=0?"+":"")+a+" top"+(s>=0?"+":"")+s,of:n.window},t(this).removeClass("ui-dialog-dragging"),n._unblockFrames(),n._trigger("dragStop",r,e(o))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var n=this,i=this.options,r=i.resizable,o=this.uiDialog.css("position"),a="string"==typeof r?r:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:i.maxWidth,maxHeight:i.maxHeight,minWidth:i.minWidth,minHeight:this._minHeight(),handles:a,start:function(i,r){t(this).addClass("ui-dialog-resizing"),n._blockFrames(),n._trigger("resizeStart",i,e(r))},resize:function(t,i){n._trigger("resize",t,e(i))},stop:function(r,o){var a=n.uiDialog.offset(),s=a.left-n.document.scrollLeft(),l=a.top-n.document.scrollTop();i.height=n.uiDialog.height(),i.width=n.uiDialog.width(),i.position={my:"left top",at:"left"+(s>=0?"+":"")+s+" top"+(l>=0?"+":"")+l,of:n.window},t(this).removeClass("ui-dialog-resizing"),n._unblockFrames(),n._trigger("resizeStop",r,e(o))}}).css("position",o)},_trackFocus:function(){this._on(this.widget(),{focusin:function(e){this._makeFocusTarget(),this._focusedElement=t(e.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var e=this._trackingInstances(),n=t.inArray(this,e);-1!==n&&e.splice(n,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||(t=[],this.document.data("ui-dialog-instances",t)),t},_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(e){var n=this,i=!1,r={};t.each(e,function(t,e){n._setOption(t,e),t in n.sizeRelatedOptions&&(i=!0),t in n.resizableRelatedOptions&&(r[t]=e)}),i&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",r)},_setOption:function(t,e){var n,i,r=this.uiDialog;"dialogClass"===t&&r.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&&(n=r.is(":data(ui-draggable)"),n&&!e&&r.draggable("destroy"),!n&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&(i=r.is(":data(ui-resizable)"),i&&!e&&r.resizable("destroy"),i&&"string"==typeof e&&r.resizable("option","handles",e),i||e===!1||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,n,i=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),i.minWidth>i.width&&(i.width=i.minWidth),t=this.uiDialog.css({height:"auto",width:i.width}).outerHeight(),e=Math.max(0,i.minHeight-t),n="number"==typeof i.maxHeight?Math.max(0,i.maxHeight-t):"none","auto"===i.height?this.element.css({minHeight:e,maxHeight:n,height:"auto"}):this.element.height(Math.max(0,i.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 e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return t(e.target).closest(".ui-dialog").length?!0:!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=!0;this._delay(function(){e=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(t){e||this._allowInteraction(t)||(t.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=t("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var t=this.document.data("ui-dialog-overlays")-1;t?this.document.data("ui-dialog-overlays",t):this.document.unbind("focusin").removeData("ui-dialog-overlays"),this.overlay.remove(),this.overlay=null}}});/*!
 * jQuery UI Droppable 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/droppable/
 */
t.widget("ui.droppable",{version:"1.11.4",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 e,n=this.options,i=n.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(i)?i:function(t){return t.is(i)},this.proportions=function(){return arguments.length?void(e=arguments[0]):e?e:e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(n.scope),n.addClasses&&this.element.addClass("ui-droppable")},_addToManager:function(e){t.ui.ddmanager.droppables[e]=t.ui.ddmanager.droppables[e]||[],t.ui.ddmanager.droppables[e].push(this)},_splice:function(t){for(var e=0;e<t.length;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var e=t.ui.ddmanager.droppables[this.options.scope];this._splice(e),this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(e,n){if("accept"===e)this.accept=t.isFunction(n)?n:function(t){return t.is(n)};else if("scope"===e){var i=t.ui.ddmanager.droppables[this.options.scope];this._splice(i),this._addToManager(n)}this._super(e,n)},_activate:function(e){var n=t.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),n&&this._trigger("activate",e,this.ui(n))},_deactivate:function(e){var n=t.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),n&&this._trigger("deactivate",e,this.ui(n))},_over:function(e){var n=t.ui.ddmanager.current;n&&(n.currentItem||n.element)[0]!==this.element[0]&&this.accept.call(this.element[0],n.currentItem||n.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",e,this.ui(n)))},_out:function(e){var n=t.ui.ddmanager.current;n&&(n.currentItem||n.element)[0]!==this.element[0]&&this.accept.call(this.element[0],n.currentItem||n.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",e,this.ui(n)))},_drop:function(e,n){var i=n||t.ui.ddmanager.current,r=!1;return i&&(i.currentItem||i.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var n=t(this).droppable("instance");return n.options.greedy&&!n.options.disabled&&n.options.scope===i.options.scope&&n.accept.call(n.element[0],i.currentItem||i.element)&&t.ui.intersect(i,t.extend(n,{offset:n.element.offset()}),n.options.tolerance,e)?(r=!0,!1):void 0}),r?!1: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",e,this.ui(i)),this.element):!1):!1},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}}}),t.ui.intersect=function(){function t(t,e,n){return t>=e&&e+n>t}return function(e,n,i,r){if(!n.offset)return!1;var o=(e.positionAbs||e.position.absolute).left+e.margins.left,a=(e.positionAbs||e.position.absolute).top+e.margins.top,s=o+e.helperProportions.width,l=a+e.helperProportions.height,u=n.offset.left,c=n.offset.top,d=u+n.proportions().width,h=c+n.proportions().height;switch(i){case"fit":return o>=u&&d>=s&&a>=c&&h>=l;case"intersect":return u<o+e.helperProportions.width/2&&s-e.helperProportions.width/2<d&&c<a+e.helperProportions.height/2&&l-e.helperProportions.height/2<h;case"pointer":return t(r.pageY,c,n.proportions().height)&&t(r.pageX,u,n.proportions().width);case"touch":return(a>=c&&h>=a||l>=c&&h>=l||c>a&&l>h)&&(o>=u&&d>=o||s>=u&&d>=s||u>o&&s>d);default:return!1}}}(),t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,n){var i,r,o=t.ui.ddmanager.droppables[e.options.scope]||[],a=n?n.type:null,s=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(i=0;i<o.length;i++)if(!(o[i].options.disabled||e&&!o[i].accept.call(o[i].element[0],e.currentItem||e.element))){for(r=0;r<s.length;r++)if(s[r]===o[i].element[0]){o[i].proportions().height=0;continue t}o[i].visible="none"!==o[i].element.css("display"),o[i].visible&&("mousedown"===a&&o[i]._activate.call(o[i],n),o[i].offset=o[i].element.offset(),o[i].proportions({width:o[i].element[0].offsetWidth,height:o[i].element[0].offsetHeight}))}},drop:function(e,n){var i=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance,n)&&(i=this._drop.call(this,n)||i),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,n)))}),i},dragStart:function(e,n){e.element.parentsUntil("body").bind("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,n)})},drag:function(e,n){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,n),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var i,r,o,a=t.ui.intersect(e,this,this.options.tolerance,n),s=!a&&this.isover?"isout":a&&!this.isover?"isover":null;s&&(this.options.greedy&&(r=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return t(this).droppable("instance").options.scope===r}),o.length&&(i=t(o[0]).droppable("instance"),i.greedyChild="isover"===s)),i&&"isover"===s&&(i.isover=!1,i.isout=!0,i._out.call(i,n)),this[s]=!0,this["isout"===s?"isover":"isout"]=!1,this["isover"===s?"_over":"_out"].call(this,n),i&&"isout"===s&&(i.isout=!1,i.isover=!0,i._over.call(i,n)))}})},dragStop:function(e,n){e.element.parentsUntil("body").unbind("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,n)}};var y=(t.ui.droppable,"ui-effects-"),b=t;t.effects={effect:{}},/*!
 * jQuery Color Animations v2.1.2
 * https://github.com/jquery/jquery-color
 *
 * Copyright 2014 jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * Date: Wed Jan 16 08:47:09 2013 -0600
 */
function(t,e){function n(t,e,n){var i=d[e.type]||{};return null==t?n||!e.def?null:e.def:(t=i.floor?~~t:parseFloat(t),isNaN(t)?e.def:i.mod?(t+i.mod)%i.mod:0>t?0:i.max<t?i.max:t)}function i(e){var n=u(),i=n._rgba=[];return e=e.toLowerCase(),p(l,function(t,r){var o,a=r.re.exec(e),s=a&&r.parse(a),l=r.space||"rgba";return s?(o=n[l](s),n[c[l].cache]=o[c[l].cache],i=n._rgba=o._rgba,!1):void 0}),i.length?("0,0,0,0"===i.join()&&t.extend(i,o.transparent),n):o[e]}function r(t,e,n){return n=(n+1)%1,1>6*n?t+(e-t)*n*6:1>2*n?e:2>3*n?t+(e-t)*(2/3-n)*6:t}var o,a="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",s=/^([\-+])=\s*(\d+\.?\d*)/,l=[{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]]}}],u=t.Color=function(e,n,i,r){return new t.Color.fn.parse(e,n,i,r)},c={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"}}}},d={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},h=u.support={},f=t("<p>")[0],p=t.each;f.style.cssText="background-color:rgba(1,1,1,.5)",h.rgba=f.style.backgroundColor.indexOf("rgba")>-1,p(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),u.fn=t.extend(u.prototype,{parse:function(r,a,s,l){if(r===e)return this._rgba=[null,null,null,null],this;(r.jquery||r.nodeType)&&(r=t(r).css(a),a=e);var d=this,h=t.type(r),f=this._rgba=[];return a!==e&&(r=[r,a,s,l],h="array"),"string"===h?this.parse(i(r)||o._default):"array"===h?(p(c.rgba.props,function(t,e){f[e.idx]=n(r[e.idx],e)}),this):"object"===h?(r instanceof u?p(c,function(t,e){r[e.cache]&&(d[e.cache]=r[e.cache].slice())}):p(c,function(e,i){var o=i.cache;p(i.props,function(t,e){if(!d[o]&&i.to){if("alpha"===t||null==r[t])return;d[o]=i.to(d._rgba)}d[o][e.idx]=n(r[t],e,!0)}),d[o]&&t.inArray(null,d[o].slice(0,3))<0&&(d[o][3]=1,i.from&&(d._rgba=i.from(d[o])))}),this):void 0},is:function(t){var e=u(t),n=!0,i=this;return p(c,function(t,r){var o,a=e[r.cache];return a&&(o=i[r.cache]||r.to&&r.to(i._rgba)||[],p(r.props,function(t,e){return null!=a[e.idx]?n=a[e.idx]===o[e.idx]:void 0})),n}),n},_space:function(){var t=[],e=this;return p(c,function(n,i){e[i.cache]&&t.push(n)}),t.pop()},transition:function(t,e){var i=u(t),r=i._space(),o=c[r],a=0===this.alpha()?u("transparent"):this,s=a[o.cache]||o.to(a._rgba),l=s.slice();return i=i[o.cache],p(o.props,function(t,r){var o=r.idx,a=s[o],u=i[o],c=d[r.type]||{};null!==u&&(null===a?l[o]=u:(c.mod&&(u-a>c.mod/2?a+=c.mod:a-u>c.mod/2&&(a-=c.mod)),l[o]=n((u-a)*e+a,r)))}),this[r](l)},blend:function(e){if(1===this._rgba[3])return this;var n=this._rgba.slice(),i=n.pop(),r=u(e)._rgba;return u(t.map(n,function(t,e){return(1-i)*r[e]+i*t}))},toRgbaString:function(){var e="rgba(",n=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===n[3]&&(n.pop(),e="rgb("),e+n.join()+")"},toHslaString:function(){var e="hsla(",n=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===n[3]&&(n.pop(),e="hsl("),e+n.join()+")"},toHexString:function(e){var n=this._rgba.slice(),i=n.pop();return e&&n.push(~~(255*i)),"#"+t.map(n,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),u.fn.parse.prototype=u.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=t[3],s=Math.max(i,r,o),l=Math.min(i,r,o),u=s-l,c=s+l,d=.5*c;return e=l===s?0:i===s?60*(r-o)/u+360:r===s?60*(o-i)/u+120:60*(i-r)/u+240,n=0===u?0:.5>=d?u/c:u/(2-c),[Math.round(e)%360,n,d,null==a?1:a]},c.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,n=t[1],i=t[2],o=t[3],a=.5>=i?i*(1+n):i+n-i*n,s=2*i-a;return[Math.round(255*r(s,a,e+1/3)),Math.round(255*r(s,a,e)),Math.round(255*r(s,a,e-1/3)),o]},p(c,function(i,r){var o=r.props,a=r.cache,l=r.to,c=r.from;u.fn[i]=function(i){if(l&&!this[a]&&(this[a]=l(this._rgba)),i===e)return this[a].slice();var r,s=t.type(i),d="array"===s||"object"===s?i:arguments,h=this[a].slice();return p(o,function(t,e){var i=d["object"===s?t:e.idx];null==i&&(i=h[e.idx]),h[e.idx]=n(i,e)}),c?(r=u(c(h)),r[a]=h,r):u(h)},p(o,function(e,n){u.fn[e]||(u.fn[e]=function(r){var o,a=t.type(r),l="alpha"===e?this._hsla?"hsla":"rgba":i,u=this[l](),c=u[n.idx];return"undefined"===a?c:("function"===a&&(r=r.call(this,c),a=t.type(r)),null==r&&n.empty?this:("string"===a&&(o=s.exec(r),o&&(r=c+parseFloat(o[2])*("+"===o[1]?1:-1))),u[n.idx]=r,this[l](u)))})})}),u.hook=function(e){var n=e.split(" ");p(n,function(e,n){t.cssHooks[n]={set:function(e,r){var o,a,s="";if("transparent"!==r&&("string"!==t.type(r)||(o=i(r)))){if(r=u(o||r),!h.rgba&&1!==r._rgba[3]){for(a="backgroundColor"===n?e.parentNode:e;(""===s||"transparent"===s)&&a&&a.style;)try{s=t.css(a,"backgroundColor"),a=a.parentNode}catch(l){}r=r.blend(s&&"transparent"!==s?s:"_default")}r=r.toRgbaString()}try{e.style[n]=r}catch(l){}}},t.fx.step[n]=function(e){e.colorInit||(e.start=u(e.elem,n),e.end=u(e.end),e.colorInit=!0),t.cssHooks[n].set(e.elem,e.start.transition(e.end,e.pos))}})},u.hook(a),t.cssHooks.borderColor={expand:function(t){var e={};return p(["Top","Right","Bottom","Left"],function(n,i){e["border"+i+"Color"]=t}),e}},o=t.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"}}(b),function(){function e(e){var n,i,r=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(r&&r.length&&r[0]&&r[r[0]])for(i=r.length;i--;)n=r[i],"string"==typeof r[n]&&(o[t.camelCase(n)]=r[n]);else for(n in r)"string"==typeof r[n]&&(o[n]=r[n]);return o}function n(e,n){var i,o,a={};for(i in n)o=n[i],e[i]!==o&&(r[i]||(t.fx.step[i]||!isNaN(parseFloat(o)))&&(a[i]=o));return a}var i=["add","remove","toggle"],r={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,n){t.fx.step[n]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(b.style(t.elem,n,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(r,o,a,s){var l=t.speed(o,a,s);return this.queue(function(){var o,a=t(this),s=a.attr("class")||"",u=l.children?a.find("*").addBack():a;u=u.map(function(){var n=t(this);return{el:n,start:e(this)}}),o=function(){t.each(i,function(t,e){r[e]&&a[e+"Class"](r[e])})},o(),u=u.map(function(){return this.end=e(this.el[0]),this.diff=n(this.start,this.end),this}),a.attr("class",s),u=u.map(function(){var e=this,n=t.Deferred(),i=t.extend({},l,{queue:!1,complete:function(){n.resolve(e)}});return this.el.animate(this.diff,i),n.promise()}),t.when.apply(t,u.get()).done(function(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),l.complete.call(a[0])})})},t.fn.extend({addClass:function(e){return function(n,i,r,o){return i?t.effects.animateClass.call(this,{add:n},i,r,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(n,i,r,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:n},i,r,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(n,i,r,o,a){return"boolean"==typeof i||void 0===i?r?t.effects.animateClass.call(this,i?{add:n}:{remove:n},r,o,a):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:n},i,r,o)}}(t.fn.toggleClass),switchClass:function(e,n,i,r,o){return t.effects.animateClass.call(this,{add:n,remove:e},i,r,o)}})}(),function(){function e(e,n,i,r){return t.isPlainObject(e)&&(n=e,e=e.effect),e={effect:e},null==n&&(n={}),t.isFunction(n)&&(r=n,i=null,n={}),("number"==typeof n||t.fx.speeds[n])&&(r=i,i=n,n={}),t.isFunction(i)&&(r=i,i=null),n&&t.extend(e,n),i=i||n.duration,e.duration=t.fx.off?0:"number"==typeof i?i:i in t.fx.speeds?t.fx.speeds[i]:t.fx.speeds._default,e.complete=r||n.complete,e}function n(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}t.extend(t.effects,{version:"1.11.4",save:function(t,e){for(var n=0;n<e.length;n++)null!==e[n]&&t.data(y+e[n],t[0].style[e[n]])},restore:function(t,e){var n,i;for(i=0;i<e.length;i++)null!==e[i]&&(n=t.data(y+e[i]),void 0===n&&(n=""),t.css(e[i],n))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var n,i;switch(t[0]){case"top":n=0;break;case"middle":n=.5;break;case"bottom":n=1;break;default:n=t[0]/e.height}switch(t[1]){case"left":i=0;break;case"center":i=.5;break;case"right":i=1;break;default:i=t[1]/e.width}return{x:i,y:n}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var n={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},i=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),r={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(a){o=document.body}return e.wrap(i),(e[0]===o||t.contains(e[0],o))&&t(o).focus(),i=e.parent(),"static"===e.css("position")?(i.css({position:"relative"}),e.css({position:"relative"})):(t.extend(n,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,i){n[i]=e.css(i),isNaN(parseInt(n[i],10))&&(n[i]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(r),i.css(n).show()},removeWrapper:function(e){var n=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===n||t.contains(e[0],n))&&t(n).focus()),e},setTransition:function(e,n,i,r){return r=r||{},t.each(n,function(t,n){var o=e.cssUnit(n);o[0]>0&&(r[n]=o[0]*i+o[1])}),r}}),t.fn.extend({effect:function(){function n(e){function n(){t.isFunction(o)&&o.call(r[0]),t.isFunction(e)&&e()}var r=t(this),o=i.complete,s=i.mode;(r.is(":hidden")?"hide"===s:"show"===s)?(r[s](),n()):a.call(r[0],i,n)}var i=e.apply(this,arguments),r=i.mode,o=i.queue,a=t.effects.effect[i.effect];return t.fx.off||!a?r?this[r](i.duration,i.complete):this.each(function(){i.complete&&i.complete.call(this)}):o===!1?this.each(n):this.queue(o||"fx",n)},show:function(t){return function(i){if(n(i))return t.apply(this,arguments);var r=e.apply(this,arguments);return r.mode="show",this.effect.call(this,r)}}(t.fn.show),hide:function(t){return function(i){if(n(i))return t.apply(this,arguments);var r=e.apply(this,arguments);return r.mode="hide",this.effect.call(this,r)}}(t.fn.hide),toggle:function(t){return function(i){if(n(i)||"boolean"==typeof i)return t.apply(this,arguments);var r=e.apply(this,arguments);return r.mode="toggle",this.effect.call(this,r)}}(t.fn.toggle),cssUnit:function(e){var n=this.css(e),i=[];return t.each(["em","px","%","pt"],function(t,e){n.indexOf(e)>0&&(i=[parseFloat(n),e])}),i}})}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,n){e[n]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{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,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,n){t.easing["easeIn"+e]=n,t.easing["easeOut"+e]=function(t){return 1-n(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?n(2*t)/2:1-n(-2*t+2)/2}})}();t.effects,t.effects.effect.blind=function(e,n){var i,r,o,a=t(this),s=/up|down|vertical/,l=/up|left|vertical|horizontal/,u=["position","top","bottom","left","right","height","width"],c=t.effects.setMode(a,e.mode||"hide"),d=e.direction||"up",h=s.test(d),f=h?"height":"width",p=h?"top":"left",g=l.test(d),m={},v="show"===c;a.parent().is(".ui-effects-wrapper")?t.effects.save(a.parent(),u):t.effects.save(a,u),a.show(),i=t.effects.createWrapper(a).css({overflow:"hidden"}),r=i[f](),o=parseFloat(i.css(p))||0,m[f]=v?r:0,g||(a.css(h?"bottom":"right",0).css(h?"top":"left","auto").css({position:"absolute"}),m[p]=v?o:r+o),v&&(i.css(f,0),g||i.css(p,o+r)),i.animate(m,{duration:e.duration,easing:e.easing,queue:!1,complete:function(){"hide"===c&&a.hide(),t.effects.restore(a,u),t.effects.removeWrapper(a),n()}})},t.effects.effect.bounce=function(e,n){var i,r,o,a=t(this),s=["position","top","bottom","left","right","height","width"],l=t.effects.setMode(a,e.mode||"effect"),u="hide"===l,c="show"===l,d=e.direction||"up",h=e.distance,f=e.times||5,p=2*f+(c||u?1:0),g=e.duration/p,m=e.easing,v="up"===d||"down"===d?"top":"left",y="up"===d||"left"===d,b=a.queue(),x=b.length;for((c||u)&&s.push("opacity"),t.effects.save(a,s),a.show(),t.effects.createWrapper(a),h||(h=a["top"===v?"outerHeight":"outerWidth"]()/3),c&&(o={opacity:1},o[v]=0,a.css("opacity",0).css(v,y?2*-h:2*h).animate(o,g,m)),u&&(h/=Math.pow(2,f-1)),o={},o[v]=0,i=0;f>i;i++)r={},r[v]=(y?"-=":"+=")+h,a.animate(r,g,m).animate(o,g,m),h=u?2*h:h/2;u&&(r={opacity:0},r[v]=(y?"-=":"+=")+h,a.animate(r,g,m)),a.queue(function(){u&&a.hide(),t.effects.restore(a,s),t.effects.removeWrapper(a),n()}),x>1&&b.splice.apply(b,[1,0].concat(b.splice(x,p+1))),a.dequeue()},t.effects.effect.clip=function(e,n){var i,r,o,a=t(this),s=["position","top","bottom","left","right","height","width"],l=t.effects.setMode(a,e.mode||"hide"),u="show"===l,c=e.direction||"vertical",d="vertical"===c,h=d?"height":"width",f=d?"top":"left",p={};t.effects.save(a,s),a.show(),i=t.effects.createWrapper(a).css({overflow:"hidden"}),r="IMG"===a[0].tagName?i:a,o=r[h](),u&&(r.css(h,0),r.css(f,o/2)),p[h]=u?o:0,p[f]=u?0:o/2,r.animate(p,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){u||a.hide(),t.effects.restore(a,s),t.effects.removeWrapper(a),n()}})},t.effects.effect.drop=function(e,n){var i,r=t(this),o=["position","top","bottom","left","right","opacity","height","width"],a=t.effects.setMode(r,e.mode||"hide"),s="show"===a,l=e.direction||"left",u="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l?"pos":"neg",d={opacity:s?1:0};t.effects.save(r,o),r.show(),t.effects.createWrapper(r),i=e.distance||r["top"===u?"outerHeight":"outerWidth"](!0)/2,s&&r.css("opacity",0).css(u,"pos"===c?-i:i),d[u]=(s?"pos"===c?"+=":"-=":"pos"===c?"-=":"+=")+i,r.animate(d,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&r.hide(),t.effects.restore(r,o),t.effects.removeWrapper(r),n()}})},t.effects.effect.explode=function(e,n){function i(){b.push(this),b.length===d*h&&r()}function r(){f.css({visibility:"visible"}),t(b).remove(),g||f.hide(),n()}var o,a,s,l,u,c,d=e.pieces?Math.round(Math.sqrt(e.pieces)):3,h=d,f=t(this),p=t.effects.setMode(f,e.mode||"hide"),g="show"===p,m=f.show().css("visibility","hidden").offset(),v=Math.ceil(f.outerWidth()/h),y=Math.ceil(f.outerHeight()/d),b=[];for(o=0;d>o;o++)for(l=m.top+o*y,c=o-(d-1)/2,a=0;h>a;a++)s=m.left+a*v,u=a-(h-1)/2,f.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-a*v,top:-o*y}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:y,left:s+(g?u*v:0),top:l+(g?c*y:0),opacity:g?0:1}).animate({left:s+(g?0:u*v),top:l+(g?0:c*y),opacity:g?1:0},e.duration||500,e.easing,i)},t.effects.effect.fade=function(e,n){var i=t(this),r=t.effects.setMode(i,e.mode||"toggle");i.animate({opacity:r},{queue:!1,duration:e.duration,easing:e.easing,complete:n})},t.effects.effect.fold=function(e,n){var i,r,o=t(this),a=["position","top","bottom","left","right","height","width"],s=t.effects.setMode(o,e.mode||"hide"),l="show"===s,u="hide"===s,c=e.size||15,d=/([0-9]+)%/.exec(c),h=!!e.horizFirst,f=l!==h,p=f?["width","height"]:["height","width"],g=e.duration/2,m={},v={};t.effects.save(o,a),o.show(),i=t.effects.createWrapper(o).css({overflow:"hidden"}),r=f?[i.width(),i.height()]:[i.height(),i.width()],d&&(c=parseInt(d[1],10)/100*r[u?0:1]),l&&i.css(h?{height:0,width:c}:{height:c,width:0}),m[p[0]]=l?r[0]:c,v[p[1]]=l?r[1]:0,i.animate(m,g,e.easing).animate(v,g,e.easing,function(){u&&o.hide(),t.effects.restore(o,a),t.effects.removeWrapper(o),n()})},t.effects.effect.highlight=function(e,n){var i=t(this),r=["backgroundImage","backgroundColor","opacity"],o=t.effects.setMode(i,e.mode||"show"),a={backgroundColor:i.css("backgroundColor")};"hide"===o&&(a.opacity=0),t.effects.save(i,r),i.show().css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(a,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&i.hide(),t.effects.restore(i,r),n()}})},t.effects.effect.size=function(e,n){var i,r,o,a=t(this),s=["position","top","bottom","left","right","width","height","overflow","opacity"],l=["position","top","bottom","left","right","overflow","opacity"],u=["width","height","overflow"],c=["fontSize"],d=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],h=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],f=t.effects.setMode(a,e.mode||"effect"),p=e.restore||"effect"!==f,g=e.scale||"both",m=e.origin||["middle","center"],v=a.css("position"),y=p?s:l,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===f&&a.show(),i={height:a.height(),width:a.width(),outerHeight:a.outerHeight(),outerWidth:a.outerWidth()},"toggle"===e.mode&&"show"===f?(a.from=e.to||b,a.to=e.from||i):(a.from=e.from||("show"===f?b:i),a.to=e.to||("hide"===f?b:i)),o={from:{y:a.from.height/i.height,x:a.from.width/i.width},to:{y:a.to.height/i.height,x:a.to.width/i.width}},("box"===g||"both"===g)&&(o.from.y!==o.to.y&&(y=y.concat(d),a.from=t.effects.setTransition(a,d,o.from.y,a.from),a.to=t.effects.setTransition(a,d,o.to.y,a.to)),o.from.x!==o.to.x&&(y=y.concat(h),a.from=t.effects.setTransition(a,h,o.from.x,a.from),a.to=t.effects.setTransition(a,h,o.to.x,a.to))),("content"===g||"both"===g)&&o.from.y!==o.to.y&&(y=y.concat(c).concat(u),a.from=t.effects.setTransition(a,c,o.from.y,a.from),a.to=t.effects.setTransition(a,c,o.to.y,a.to)),t.effects.save(a,y),a.show(),t.effects.createWrapper(a),a.css("overflow","hidden").css(a.from),m&&(r=t.effects.getBaseline(m,i),a.from.top=(i.outerHeight-a.outerHeight())*r.y,a.from.left=(i.outerWidth-a.outerWidth())*r.x,a.to.top=(i.outerHeight-a.to.outerHeight)*r.y,a.to.left=(i.outerWidth-a.to.outerWidth)*r.x),a.css(a.from),("content"===g||"both"===g)&&(d=d.concat(["marginTop","marginBottom"]).concat(c),h=h.concat(["marginLeft","marginRight"]),u=s.concat(d).concat(h),a.find("*[width]").each(function(){var n=t(this),i={height:n.height(),width:n.width(),outerHeight:n.outerHeight(),outerWidth:n.outerWidth()};p&&t.effects.save(n,u),n.from={height:i.height*o.from.y,width:i.width*o.from.x,outerHeight:i.outerHeight*o.from.y,outerWidth:i.outerWidth*o.from.x},n.to={height:i.height*o.to.y,width:i.width*o.to.x,outerHeight:i.height*o.to.y,outerWidth:i.width*o.to.x},o.from.y!==o.to.y&&(n.from=t.effects.setTransition(n,d,o.from.y,n.from),n.to=t.effects.setTransition(n,d,o.to.y,n.to)),o.from.x!==o.to.x&&(n.from=t.effects.setTransition(n,h,o.from.x,n.from),n.to=t.effects.setTransition(n,h,o.to.x,n.to)),n.css(n.from),n.animate(n.to,e.duration,e.easing,function(){p&&t.effects.restore(n,u)})})),a.animate(a.to,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){0===a.to.opacity&&a.css("opacity",a.from.opacity),"hide"===f&&a.hide(),t.effects.restore(a,y),p||("static"===v?a.css({position:"relative",top:a.to.top,left:a.to.left}):t.each(["top","left"],function(t,e){a.css(e,function(e,n){var i=parseInt(n,10),r=t?a.to.left:a.to.top;return"auto"===n?r+"px":i+r+"px"})})),t.effects.removeWrapper(a),n()}})},t.effects.effect.scale=function(e,n){var i=t(this),r=t.extend(!0,{},e),o=t.effects.setMode(i,e.mode||"effect"),a=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"hide"===o?0:100),s=e.direction||"both",l=e.origin,u={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()},c={y:"horizontal"!==s?a/100:1,x:"vertical"!==s?a/100:1};r.effect="size",r.queue=!1,r.complete=n,"effect"!==o&&(r.origin=l||["middle","center"],r.restore=!0),r.from=e.from||("show"===o?{height:0,width:0,outerHeight:0,outerWidth:0}:u),r.to={height:u.height*c.y,width:u.width*c.x,outerHeight:u.outerHeight*c.y,outerWidth:u.outerWidth*c.x},r.fade&&("show"===o&&(r.from.opacity=0,r.to.opacity=1),"hide"===o&&(r.from.opacity=1,r.to.opacity=0)),i.effect(r)},t.effects.effect.puff=function(e,n){var i=t(this),r=t.effects.setMode(i,e.mode||"hide"),o="hide"===r,a=parseInt(e.percent,10)||150,s=a/100,l={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};t.extend(e,{effect:"scale",queue:!1,fade:!0,mode:r,complete:n,percent:o?a:100,from:o?l:{height:l.height*s,width:l.width*s,outerHeight:l.outerHeight*s,outerWidth:l.outerWidth*s}}),i.effect(e)},t.effects.effect.pulsate=function(e,n){var i,r=t(this),o=t.effects.setMode(r,e.mode||"show"),a="show"===o,s="hide"===o,l=a||"hide"===o,u=2*(e.times||5)+(l?1:0),c=e.duration/u,d=0,h=r.queue(),f=h.length;for((a||!r.is(":visible"))&&(r.css("opacity",0).show(),d=1),i=1;u>i;i++)r.animate({opacity:d},c,e.easing),d=1-d;r.animate({opacity:d},c,e.easing),r.queue(function(){s&&r.hide(),n()}),f>1&&h.splice.apply(h,[1,0].concat(h.splice(f,u+1))),r.dequeue()},t.effects.effect.shake=function(e,n){var i,r=t(this),o=["position","top","bottom","left","right","height","width"],a=t.effects.setMode(r,e.mode||"effect"),s=e.direction||"left",l=e.distance||20,u=e.times||3,c=2*u+1,d=Math.round(e.duration/c),h="up"===s||"down"===s?"top":"left",f="up"===s||"left"===s,p={},g={},m={},v=r.queue(),y=v.length;for(t.effects.save(r,o),r.show(),t.effects.createWrapper(r),p[h]=(f?"-=":"+=")+l,g[h]=(f?"+=":"-=")+2*l,m[h]=(f?"-=":"+=")+2*l,r.animate(p,d,e.easing),i=1;u>i;i++)r.animate(g,d,e.easing).animate(m,d,e.easing);r.animate(g,d,e.easing).animate(p,d/2,e.easing).queue(function(){"hide"===a&&r.hide(),t.effects.restore(r,o),t.effects.removeWrapper(r),n()}),y>1&&v.splice.apply(v,[1,0].concat(v.splice(y,c+1))),r.dequeue()},t.effects.effect.slide=function(e,n){var i,r=t(this),o=["position","top","bottom","left","right","width","height"],a=t.effects.setMode(r,e.mode||"show"),s="show"===a,l=e.direction||"left",u="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l,d={};t.effects.save(r,o),r.show(),i=e.distance||r["top"===u?"outerHeight":"outerWidth"](!0),t.effects.createWrapper(r).css({overflow:"hidden"}),s&&r.css(u,c?isNaN(i)?"-"+i:-i:i),d[u]=(s?c?"+=":"-=":c?"-=":"+=")+i,r.animate(d,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&r.hide(),t.effects.restore(r,o),t.effects.removeWrapper(r),n()}})},t.effects.effect.transfer=function(e,n){var i=t(this),r=t(e.to),o="fixed"===r.css("position"),a=t("body"),s=o?a.scrollTop():0,l=o?a.scrollLeft():0,u=r.offset(),c={top:u.top-s,left:u.left-l,height:r.innerHeight(),width:r.innerWidth()},d=i.offset(),h=t("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(e.className).css({top:d.top-s,left:d.left-l,height:i.innerHeight(),width:i.innerWidth(),position:o?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){h.remove(),n()})},t.widget("ui.progressbar",{version:"1.11.4",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=t("<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){return void 0===t?this.options.value:(this.options.value=this._constrainedValue(t),void this._refreshValue())},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1: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)),"disabled"===t&&this.element.toggleClass("ui-state-disabled",!!e).attr("aria-disabled",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 e=this.options.value,n=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(n.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}}),t.widget("ui.selectable",t.ui.mouse,{version:"1.11.4",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 e,n=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e=t(n.options.filter,n.element[0]),e.addClass("ui-selectee"),e.each(function(){var e=t(this),n=e.offset();t.data(this,"selectable-item",{element:this,$element:e,left:n.left,top:n.top,right:n.left+e.outerWidth(),bottom:n.top+e.outerHeight(),startselected:!1,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=e.addClass("ui-selectee"),this._mouseInit(),this.helper=t("<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(e){var n=this,i=this.options;this.opos=[e.pageX,e.pageY],this.options.disabled||(this.selectees=t(i.filter,this.element[0]),this._trigger("start",e),t(i.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),i.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var i=t.data(this,"selectable-item");i.startselected=!0,e.metaKey||e.ctrlKey||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,n._trigger("unselecting",e,{unselecting:i.element}))}),t(e.target).parents().addBack().each(function(){var i,r=t.data(this,"selectable-item");return r?(i=!e.metaKey&&!e.ctrlKey||!r.$element.hasClass("ui-selected"),r.$element.removeClass(i?"ui-unselecting":"ui-selected").addClass(i?"ui-selecting":"ui-unselecting"),r.unselecting=!i,r.selecting=i,r.selected=i,i?n._trigger("selecting",e,{selecting:r.element}):n._trigger("unselecting",e,{unselecting:r.element}),!1):void 0}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var n,i=this,r=this.options,o=this.opos[0],a=this.opos[1],s=e.pageX,l=e.pageY;return o>s&&(n=s,s=o,o=n),a>l&&(n=l,l=a,a=n),this.helper.css({left:o,top:a,width:s-o,height:l-a}),this.selectees.each(function(){var n=t.data(this,"selectable-item"),u=!1;n&&n.element!==i.element[0]&&("touch"===r.tolerance?u=!(n.left>s||n.right<o||n.top>l||n.bottom<a):"fit"===r.tolerance&&(u=n.left>o&&n.right<s&&n.top>a&&n.bottom<l),u?(n.selected&&(n.$element.removeClass("ui-selected"),n.selected=!1),n.unselecting&&(n.$element.removeClass("ui-unselecting"),n.unselecting=!1),n.selecting||(n.$element.addClass("ui-selecting"),n.selecting=!0,i._trigger("selecting",e,{selecting:n.element}))):(n.selecting&&((e.metaKey||e.ctrlKey)&&n.startselected?(n.$element.removeClass("ui-selecting"),n.selecting=!1,n.$element.addClass("ui-selected"),n.selected=!0):(n.$element.removeClass("ui-selecting"),n.selecting=!1,n.startselected&&(n.$element.addClass("ui-unselecting"),n.unselecting=!0),i._trigger("unselecting",e,{unselecting:n.element}))),n.selected&&(e.metaKey||e.ctrlKey||n.startselected||(n.$element.removeClass("ui-selected"),n.selected=!1,n.$element.addClass("ui-unselecting"),n.unselecting=!0,i._trigger("unselecting",e,{unselecting:n.element})))))}),!1}},_mouseStop:function(e){var n=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var i=t.data(this,"selectable-item");i.$element.removeClass("ui-unselecting"),i.unselecting=!1,i.startselected=!1,n._trigger("unselected",e,{unselected:i.element})}),t(".ui-selecting",this.element[0]).each(function(){var i=t.data(this,"selectable-item");i.$element.removeClass("ui-selecting").addClass("ui-selected"),i.selecting=!1,i.selected=!0,i.startselected=!0,n._trigger("selected",e,{selected:i.element})}),this._trigger("stop",e),this.helper.remove(),!1}}),t.widget("ui.selectmenu",{version:"1.11.4",defaultElement:"<select>",options:{appendTo:null,disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:null,change:null,close:null,focus:null,open:null,select:null},_create:function(){var t=this.element.uniqueId().attr("id");this.ids={element:t,button:t+"-button",menu:t+"-menu"},this._drawButton(),this._drawMenu(),this.options.disabled&&this.disable()},_drawButton:function(){var e=this;this.label=t("label[for='"+this.ids.element+"']").attr("for",this.ids.button),this._on(this.label,{click:function(t){this.button.focus(),t.preventDefault()}}),this.element.hide(),this.button=t("<span>",{"class":"ui-selectmenu-button ui-widget ui-state-default ui-corner-all",tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true"}).insertAfter(this.element),t("<span>",{"class":"ui-icon "+this.options.icons.button}).prependTo(this.button),this.buttonText=t("<span>",{"class":"ui-selectmenu-text"}).appendTo(this.button),this._setText(this.buttonText,this.element.find("option:selected").text()),this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){e.menuItems||e._refreshMenu()}),this._hoverable(this.button),this._focusable(this.button)},_drawMenu:function(){var e=this;this.menu=t("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=t("<div>",{"class":"ui-selectmenu-menu ui-front"}).append(this.menu).appendTo(this._appendTo()),this.menuInstance=this.menu.menu({role:"listbox",select:function(t,n){t.preventDefault(),e._setSelection(),e._select(n.item.data("ui-selectmenu-item"),t)
},focus:function(t,n){var i=n.item.data("ui-selectmenu-item");null!=e.focusIndex&&i.index!==e.focusIndex&&(e._trigger("focus",t,{item:i}),e.isOpen||e._select(i,t)),e.focusIndex=i.index,e.button.attr("aria-activedescendant",e.menuItems.eq(i.index).attr("id"))}}).menu("instance"),this.menu.addClass("ui-corner-bottom").removeClass("ui-corner-all"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this._setText(this.buttonText,this._getSelectedItem().text()),this.options.width||this._resizeButton()},_refreshMenu:function(){this.menu.empty();var t,e=this.element.find("option");e.length&&(this._parseOptions(e),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup"),t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){this.options.disabled||(this.menuItems?(this.menu.find(".ui-state-focus").removeClass("ui-state-focus"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t))},_position:function(){this.menuWrap.position(t.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderMenu:function(e,n){var i=this,r="";t.each(n,function(n,o){o.optgroup!==r&&(t("<li>",{"class":"ui-selectmenu-optgroup ui-menu-divider"+(o.element.parent("optgroup").prop("disabled")?" ui-state-disabled":""),text:o.optgroup}).appendTo(e),r=o.optgroup),i._renderItemData(e,o)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(e,n){var i=t("<li>");return n.disabled&&i.addClass("ui-state-disabled"),this._setText(i,n.label),i.appendTo(e)},_setText:function(t,e){e?t.text(e):t.html("&#160;")},_move:function(t,e){var n,i,r=".ui-menu-item";this.isOpen?n=this.menuItems.eq(this.focusIndex):(n=this.menuItems.eq(this.element[0].selectedIndex),r+=":not(.ui-state-disabled)"),i="first"===t||"last"===t?n["first"===t?"prevAll":"nextAll"](r).eq(-1):n[t+"All"](r).eq(0),i.length&&this.menuInstance.focus(e,i)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex)},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&(window.getSelection?(t=window.getSelection(),t.removeAllRanges(),t.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(e){this.isOpen&&(t(e.target).closest(".ui-selectmenu-menu, #"+this.ids.button).length||this.close(e))}},_buttonEvents:{mousedown:function(){var t;window.getSelection?(t=window.getSelection(),t.rangeCount&&(this.range=t.getRangeAt(0))):this.range=document.selection.createRange()},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(e){var n=!0;switch(e.keyCode){case t.ui.keyCode.TAB:case t.ui.keyCode.ESCAPE:this.close(e),n=!1;break;case t.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(e);break;case t.ui.keyCode.UP:e.altKey?this._toggle(e):this._move("prev",e);break;case t.ui.keyCode.DOWN:e.altKey?this._toggle(e):this._move("next",e);break;case t.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(e):this._toggle(e);break;case t.ui.keyCode.LEFT:this._move("prev",e);break;case t.ui.keyCode.RIGHT:this._move("next",e);break;case t.ui.keyCode.HOME:case t.ui.keyCode.PAGE_UP:this._move("first",e);break;case t.ui.keyCode.END:case t.ui.keyCode.PAGE_DOWN:this._move("last",e);break;default:this.menu.trigger(e),n=!1}n&&e.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex);e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var n=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this._setText(this.buttonText,t.label),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==n&&this._trigger("change",e,{item:t}),this.close(e)},_setAria:function(t){var e=this.menuItems.eq(t.index).attr("id");this.button.attr({"aria-labelledby":e,"aria-activedescendant":e}),this.menu.attr("aria-activedescendant",e)},_setOption:function(t,e){"icons"===t&&this.button.find("span.ui-icon").removeClass(this.options.icons.button).addClass(e.button),this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"disabled"===t&&(this.menuInstance.option("disabled",e),this.button.toggleClass("ui-state-disabled",e).attr("aria-disabled",e),this.element.prop("disabled",e),e?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)),"width"===t&&this._resizeButton()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_toggleAttr:function(){this.button.toggleClass("ui-corner-top",this.isOpen).toggleClass("ui-corner-all",!this.isOpen).attr("aria-expanded",this.isOpen),this.menuWrap.toggleClass("ui-selectmenu-open",this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;t||(t=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(t)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){return{disabled:this.element.prop("disabled")}},_parseOptions:function(e){var n=[];e.each(function(e,i){var r=t(i),o=r.parent("optgroup");n.push({element:r,index:e,value:r.val(),label:r.text(),optgroup:o.attr("label")||"",disabled:o.prop("disabled")||r.prop("disabled")})}),this.items=n},_destroy:function(){this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.label.attr("for",this.ids.element)}}),t.widget("ui.slider",t.ui.mouse,{version:"1.11.4",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},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),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 e,n,i=this.options,r=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),o="<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>",a=[];for(n=i.values&&i.values.length||1,r.length>n&&(r.slice(n).remove(),r=r.slice(0,n)),e=r.length;n>e;e++)a.push(o);this.handles=r.add(t(a.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,n="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.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=t("<div></div>").appendTo(this.element),n="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(n+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&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(e){var n,i,r,o,a,s,l,u,c=this,d=this.options;return d.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),n={x:e.pageX,y:e.pageY},i=this._normValueFromMouse(n),r=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var n=Math.abs(i-c.values(e));(r>n||r===n&&(e===c._lastChangedValue||c.values(e)===d.min))&&(r=n,o=t(this),a=e)}),s=this._start(e,a),s===!1?!1:(this._mouseSliding=!0,this._handleIndex=a,o.addClass("ui-state-active").focus(),l=o.offset(),u=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=u?{left:0,top:0}:{left:e.pageX-l.left-o.width()/2,top:e.pageY-l.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,i),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},n=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,n),!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,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,n,i,r,o;return"horizontal"===this.orientation?(e=this.elementSize.width,n=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,n=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),i=n/e,i>1&&(i=1),0>i&&(i=0),"vertical"===this.orientation&&(i=1-i),r=this._valueMax()-this._valueMin(),o=this._valueMin()+i*r,this._trimAlignValue(o)},_start:function(t,e){var n={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(n.value=this.values(e),n.values=this.values()),this._trigger("start",t,n)},_slide:function(t,e,n){var i,r,o;this.options.values&&this.options.values.length?(i=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&n>i||1===e&&i>n)&&(n=i),n!==this.values(e)&&(r=this.values(),r[e]=n,o=this._trigger("slide",t,{handle:this.handles[e],value:n,values:r}),i=this.values(e?0:1),o!==!1&&this.values(e,n))):n!==this.value()&&(o=this._trigger("slide",t,{handle:this.handles[e],value:n}),o!==!1&&this.value(n))},_stop:function(t,e){var n={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(n.value=this.values(e),n.values=this.values()),this._trigger("stop",t,n)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var n={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(n.value=this.values(e),n.values=this.values()),this._lastChangedValue=e,this._trigger("change",t,n)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),void this._change(null,0)):this._value()},values:function(e,n){var i,r,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(n),this._refreshValue(),void this._change(null,e);if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(i=this.options.values,r=arguments[0],o=0;o<i.length;o+=1)i[o]=this._trimAlignValue(r[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,n){var i,r=0;switch("range"===e&&this.options.range===!0&&("min"===n?(this.options.value=this._values(0),this.options.values=null):"max"===n&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(r=this.options.values.length),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!n),this._super(e,n),e){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue(),this.handles.css("horizontal"===n?"bottom":"left","");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;r>i;i+=1)this._change(null,i);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),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,n,i;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(n=this.options.values.slice(),i=0;i<n.length;i+=1)n[i]=this._trimAlignValue(n[i]);return n}return[]},_trimAlignValue:function(t){if(t<=this._valueMin())return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,n=(t-this._valueMin())%e,i=t-n;return 2*Math.abs(n)>=e&&(i+=n>0?e:-e),parseFloat(i.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),n=this.options.step,i=Math.floor(+(t-e).toFixed(this._precision())/n)*n;t=i+e,this.max=parseFloat(t.toFixed(this._precision()))},_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(),n=e.indexOf(".");return-1===n?0:e.length-n-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshValue:function(){var e,n,i,r,o,a=this.options.range,s=this.options,l=this,u=this._animateOff?!1:s.animate,c={};this.options.values&&this.options.values.length?this.handles.each(function(i){n=(l.values(i)-l._valueMin())/(l._valueMax()-l._valueMin())*100,c["horizontal"===l.orientation?"left":"bottom"]=n+"%",t(this).stop(1,1)[u?"animate":"css"](c,s.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===i&&l.range.stop(1,1)[u?"animate":"css"]({left:n+"%"},s.animate),1===i&&l.range[u?"animate":"css"]({width:n-e+"%"},{queue:!1,duration:s.animate})):(0===i&&l.range.stop(1,1)[u?"animate":"css"]({bottom:n+"%"},s.animate),1===i&&l.range[u?"animate":"css"]({height:n-e+"%"},{queue:!1,duration:s.animate}))),e=n}):(i=this.value(),r=this._valueMin(),o=this._valueMax(),n=o!==r?(i-r)/(o-r)*100:0,c["horizontal"===this.orientation?"left":"bottom"]=n+"%",this.handle.stop(1,1)[u?"animate":"css"](c,s.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({width:n+"%"},s.animate),"max"===a&&"horizontal"===this.orientation&&this.range[u?"animate":"css"]({width:100-n+"%"},{queue:!1,duration:s.animate}),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({height:n+"%"},s.animate),"max"===a&&"vertical"===this.orientation&&this.range[u?"animate":"css"]({height:100-n+"%"},{queue:!1,duration:s.animate}))},_handleEvents:{keydown:function(e){var n,i,r,o,a=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(e.target).addClass("ui-state-active"),n=this._start(e,a),n===!1))return}switch(o=this.options.step,i=r=this.options.values&&this.options.values.length?this.values(a):this.value(),e.keyCode){case t.ui.keyCode.HOME:r=this._valueMin();break;case t.ui.keyCode.END:r=this._valueMax();break;case t.ui.keyCode.PAGE_UP:r=this._trimAlignValue(i+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:r=this._trimAlignValue(i-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(i===this._valueMax())return;r=this._trimAlignValue(i+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i===this._valueMin())return;r=this._trimAlignValue(i-o)}this._slide(e,a,r)},keyup:function(e){var n=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,n),this._change(e,n),t(e.target).removeClass("ui-state-active"))}}}),t.widget("ui.sortable",t.ui.mouse,{version:"1.11.4",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},_isOverAxis:function(t,e,n){return t>=e&&e+n>t},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle"),t.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,n){var i=null,r=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(i=t(this),!1):void 0}),t.data(e.target,o.widgetName+"-item")===o&&(i=t(e.target)),i&&(!this.options.handle||n||(t(this.options.handle,i).find("*").addBack().each(function(){this===e.target&&(r=!0)}),r))?(this.currentItem=i,this._removeCurrentsFromItems(),!0):!1)},_mouseStart:function(e,n,i){var r,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),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},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.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(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedStylesheet=t("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(r=this.containers.length-1;r>=0;r--)this.containers[r]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var n,i,r,o,a=this.options,s=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=s=this.scrollParent[0].scrollTop+a.scrollSpeed:e.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=s=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=s=this.scrollParent[0].scrollLeft+a.scrollSpeed:e.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=s=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(e.pageY-this.document.scrollTop()<a.scrollSensitivity?s=this.document.scrollTop(this.document.scrollTop()-a.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<a.scrollSensitivity&&(s=this.document.scrollTop(this.document.scrollTop()+a.scrollSpeed)),e.pageX-this.document.scrollLeft()<a.scrollSensitivity?s=this.document.scrollLeft(this.document.scrollLeft()-a.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<a.scrollSensitivity&&(s=this.document.scrollLeft(this.document.scrollLeft()+a.scrollSpeed))),s!==!1&&t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),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"),n=this.items.length-1;n>=0;n--)if(i=this.items[n],r=i.item[0],o=this._intersectsWithPointer(i),o&&i.instance===this.currentContainer&&r!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==r&&!t.contains(this.placeholder[0],r)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],r):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(i))break;this._rearrange(e,i),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,n){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var i=this,r=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=r.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(a.top=r.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){i._clear(e)})}else this._clear(e,n);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 e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].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(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var n=this._getItemsAsjQuery(e&&e.connected),i=[];return e=e||{},t(n).each(function(){var n=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);n&&i.push((e.key||n[1]+"[]")+"="+(e.key&&e.expression?n[1]:n[2]))}),!i.length&&e.key&&i.push(e.key+"="),i.join("&")},toArray:function(e){var n=this._getItemsAsjQuery(e&&e.connected),i=[];return e=e||{},n.each(function(){i.push(t(e.item||this).attr(e.attribute||"id")||"")}),i},_intersectsWith:function(t){var e=this.positionAbs.left,n=e+this.helperProportions.width,i=this.positionAbs.top,r=i+this.helperProportions.height,o=t.left,a=o+t.width,s=t.top,l=s+t.height,u=this.offset.click.top,c=this.offset.click.left,d="x"===this.options.axis||i+u>s&&l>i+u,h="y"===this.options.axis||e+c>o&&a>e+c,f=d&&h;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?f:o<e+this.helperProportions.width/2&&n-this.helperProportions.width/2<a&&s<i+this.helperProportions.height/2&&r-this.helperProportions.height/2<l},_intersectsWithPointer:function(t){var e="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),n="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width),i=e&&n,r=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return i?this.floating?o&&"right"===o||"down"===r?2:1:r&&("down"===r?2:1):!1},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),n=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),i=this._getDragVerticalDirection(),r=this._getDragHorizontalDirection();return this.floating&&r?"right"===r&&n||"left"===r&&!n:i&&("down"===i&&e||"up"===i&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function n(){s.push(this)}var i,r,o,a,s=[],l=[],u=this._connectWith();if(u&&e)for(i=u.length-1;i>=0;i--)for(o=t(u[i],this.document[0]),r=o.length-1;r>=0;r--)a=t.data(o[r],this.widgetFullName),a&&a!==this&&!a.options.disabled&&l.push([t.isFunction(a.options.items)?a.options.items.call(a.element):t(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);for(l.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=l.length-1;i>=0;i--)l[i][0].each(n);return t(s)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var n=0;n<e.length;n++)if(e[n]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var n,i,r,o,a,s,l,u,c=this.items,d=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],h=this._connectWith();if(h&&this.ready)for(n=h.length-1;n>=0;n--)for(r=t(h[n],this.document[0]),i=r.length-1;i>=0;i--)o=t.data(r[i],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(d.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(n=d.length-1;n>=0;n--)for(a=d[n][1],s=d[n][0],i=0,u=s.length;u>i;i++)l=t(s[i]),l.data(this.widgetName+"-item",a),c.push({item:l,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.floating=this.items.length?"x"===this.options.axis||this._isFloating(this.items[0].item):!1,this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var n,i,r,o;for(n=this.items.length-1;n>=0;n--)i=this.items[n],i.instance!==this.currentContainer&&this.currentContainer&&i.item[0]!==this.currentItem[0]||(r=this.options.toleranceElement?t(this.options.toleranceElement,i.item):i.item,e||(i.width=r.outerWidth(),i.height=r.outerHeight()),o=r.offset(),i.left=o.left,i.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(n=this.containers.length-1;n>=0;n--)o=this.containers[n].element.offset(),this.containers[n].containerCache.left=o.left,this.containers[n].containerCache.top=o.top,this.containers[n].containerCache.width=this.containers[n].element.outerWidth(),this.containers[n].containerCache.height=this.containers[n].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var n,i=e.options;i.placeholder&&i.placeholder.constructor!==String||(n=i.placeholder,i.placeholder={element:function(){var i=e.currentItem[0].nodeName.toLowerCase(),r=t("<"+i+">",e.document[0]).addClass(n||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tbody"===i?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(r)):"tr"===i?e._createTrPlaceholder(e.currentItem,r):"img"===i&&r.attr("src",e.currentItem.attr("src")),n||r.css("visibility","hidden"),r},update:function(t,r){(!n||i.forcePlaceholderSize)&&(r.height()||r.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),r.width()||r.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(i.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),i.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,n){var i=this;e.children().each(function(){t("<td>&#160;</td>",i.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(n)})},_contactContainers:function(e){var n,i,r,o,a,s,l,u,c,d,h=null,f=null;for(n=this.containers.length-1;n>=0;n--)if(!t.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(h&&t.contains(this.containers[n].element[0],h.element[0]))continue;h=this.containers[n],f=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",e,this._uiHash(this)),this.containers[n].containerCache.over=0);if(h)if(1===this.containers.length)this.containers[f].containerCache.over||(this.containers[f]._trigger("over",e,this._uiHash(this)),this.containers[f].containerCache.over=1);else{for(r=1e4,o=null,c=h.floating||this._isFloating(this.currentItem),a=c?"left":"top",s=c?"width":"height",d=c?"clientX":"clientY",i=this.items.length-1;i>=0;i--)t.contains(this.containers[f].element[0],this.items[i].item[0])&&this.items[i].item[0]!==this.currentItem[0]&&(l=this.items[i].item.offset()[a],u=!1,e[d]-l>this.items[i][s]/2&&(u=!0),Math.abs(e[d]-l)<r&&(r=Math.abs(e[d]-l),o=this.items[i],this.direction=u?"up":"down"));
if(!o&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[f])return void(this.currentContainer.containerCache.over||(this.containers[f]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1));o?this._rearrange(e,o,null,!0):this._rearrange(e,null,this.containers[f].element,!0),this._trigger("change",e,this._uiHash()),this.containers[f]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[f],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[f]._trigger("over",e,this._uiHash(this)),this.containers[f].containerCache.over=1}},_createHelper:function(e){var n=this.options,i=t.isFunction(n.helper)?t(n.helper.apply(this.element[0],[e,this.currentItem])):"clone"===n.helper?this.currentItem.clone():this.currentItem;return i.parents("body").length||t("parent"!==n.appendTo?n.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||n.forceHelperSize)&&i.width(this.currentItem.width()),(!i[0].style.height||n.forceHelperSize)&&i.height(this.currentItem.height()),i},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){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()}}return{top:0,left:0}},_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 e,n,i,r=this.options;"parent"===r.containment&&(r.containment=this.helper[0].parentNode),("document"===r.containment||"window"===r.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===r.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===r.containment?this.document.width():this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(r.containment)||(e=t(r.containment)[0],n=t(r.containment).offset(),i="hidden"!==t(e).css("overflow"),this.containment=[n.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,n.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,n.left+(i?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,n.top+(i?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,n){n||(n=this.position);var i="absolute"===e?1:-1,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(r[0].tagName);return{top:n.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:r.scrollTop())*i,left:n.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:r.scrollLeft())*i}},_generatePosition:function(e){var n,i,r=this.options,o=e.pageX,a=e.pageY,s="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(s[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),r.grid&&(n=this.originalPageY+Math.round((a-this.originalPageY)/r.grid[1])*r.grid[1],a=this.containment?n-this.offset.click.top>=this.containment[1]&&n-this.offset.click.top<=this.containment[3]?n:n-this.offset.click.top>=this.containment[1]?n-r.grid[1]:n+r.grid[1]:n,i=this.originalPageX+Math.round((o-this.originalPageX)/r.grid[0])*r.grid[0],o=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-r.grid[0]:i+r.grid[0]:i)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:s.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:s.scrollLeft())}},_rearrange:function(t,e,n,i){n?n[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 r=this.counter;this._delay(function(){r===this.counter&&this.refreshPositions(!i)})},_clear:function(t,e){function n(t,e,n){return function(i){n._trigger(t,i,e._uiHash(e))}}this.reverting=!1;var i,r=[];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&&r.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||r.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(r.push(function(t){this._trigger("remove",t,this._uiHash())}),r.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),r.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)e||r.push(n("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(r.push(n("out",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,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(i=0;i<r.length;i++)r[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var n=e||this;return{helper:n.helper,placeholder:n.placeholder||t([]),position:n.position,originalPosition:n.originalPosition,offset:n.positionAbs,item:n.currentItem,sender:e?e.element:null}}}),t.widget("ui.spinner",{version:"1.11.4",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._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 e={},n=this.element;return t.each(["min","max","step"],function(t,i){var r=n.attr(i);void 0!==r&&r.length&&(e[i]=r)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(this._stop(),this._refresh(),void(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((e>0?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(e){function n(){var t=this.element[0]===this.document[0].activeElement;t||(this.element.focus(),this.previous=i,this._delay(function(){this.previous=i}))}var i;i=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),e.preventDefault(),n.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,n.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:void this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e):void 0},"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())&&t.height()>0&&t.height(t.height()),this.options.disabled&&this.disable()},_keydown:function(e){var n=this.options,i=t.ui.keyCode;switch(e.keyCode){case i.UP:return this._repeat(null,1,e),!0;case i.DOWN:return this._repeat(null,-1,e),!0;case i.PAGE_UP:return this._repeat(null,n.page,e),!0;case i.PAGE_DOWN:return this._repeat(null,-n.page,e),!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+"'>&#9650;</span></a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon "+this.options.icons.down+"'>&#9660;</span></a>"},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,n){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,n)},t),this._spin(e*this.options.step,n)},_spin:function(t,e){var n=this.value()||0;this.counter||(this.counter=1),n=this._adjustValue(n+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:n})===!1||(this._value(n),this.counter++)},_increment:function(e){var n=this.options.incremental;return n?t.isFunction(n)?n(e):Math.floor(e*e*e/5e4-e*e/500+17*e/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(),n=e.indexOf(".");return-1===n?0:e.length-n-1},_adjustValue:function(t){var e,n,i=this.options;return e=null!==i.min?i.min:0,n=t-e,n=Math.round(n/i.step)*i.step,t=e+n,t=parseFloat(t.toFixed(this._precision())),null!==i.max&&t>i.max?i.max:null!==i.min&&t<i.min?i.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 n=this._parse(this.element.val());return this.options[t]=e,void this.element.val(this._format(n))}("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&&(this.widget().toggleClass("ui-state-disabled",!!e),this.element.prop("disabled",!!e),this.buttons.button(e?"disable":"enable"))},_setOptions:l(function(t){this._super(t)}),_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())})},isValid:function(){var t=this.value();return null===t?!1:t===this._adjustValue(t)},_value:function(t,e){var n;""!==t&&(n=this._parse(t),null!==n&&(e||(n=this._adjustValue(n)),t=this._format(n))),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:l(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:l(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:l(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:l(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?void l(this._value).call(this,t):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),t.widget("ui.tabs",{version:"1.11.4",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var t=/#.*$/;return function(e){var n,i;e=e.cloneNode(!1),n=e.href.replace(t,""),i=location.href.replace(t,"");try{n=decodeURIComponent(n)}catch(r){}try{i=decodeURIComponent(i)}catch(r){}return e.hash.length>1&&n===i}}(),_create:function(){var e=this,n=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",n.collapsible),this._processTabs(),n.active=this._initialActive(),t.isArray(n.disabled)&&(n.disabled=t.unique(n.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(n.active):t(),this._refresh(),this.active.length&&this.load(n.active)},_initialActive:function(){var e=this.options.active,n=this.options.collapsible,i=location.hash.substring(1);return null===e&&(i&&this.tabs.each(function(n,r){return t(r).attr("aria-controls")===i?(e=n,!1):void 0}),null===e&&(e=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===e||-1===e)&&(e=this.tabs.length?0:!1)),e!==!1&&(e=this.tabs.index(this.tabs.eq(e)),-1===e&&(e=n?!1:0)),!n&&e===!1&&this.anchors.length&&(e=0),e},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(e){var n=t(this.document[0].activeElement).closest("li"),i=this.tabs.index(n),r=!0;if(!this._handlePageNav(e)){switch(e.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:i++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:r=!1,i--;break;case t.ui.keyCode.END:i=this.anchors.length-1;break;case t.ui.keyCode.HOME:i=0;break;case t.ui.keyCode.SPACE:return e.preventDefault(),clearTimeout(this.activating),void this._activate(i);case t.ui.keyCode.ENTER:return e.preventDefault(),clearTimeout(this.activating),void this._activate(i===this.options.active?!1:i);default:return}e.preventDefault(),clearTimeout(this.activating),i=this._focusNextTab(i,r),e.ctrlKey||e.metaKey||(n.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(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.focus())},_handlePageNav:function(e){return e.altKey&&e.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):e.altKey&&e.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(e,n){function i(){return e>r&&(e=0),0>e&&(e=r),e}for(var r=this.tabs.length-1;-1!==t.inArray(i(),this.options.disabled);)e=n?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).focus(),t},_setOption:function(t,e){return"active"===t?void this._activate(e):"disabled"===t?void this._setupDisabled(e):(this._super(t,e),"collapsible"===t&&(this.element.toggleClass("ui-tabs-collapsible",e),e||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(e),void("heightStyle"===t&&this._setupHeightStyle(e)))},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,n=this.tablist.children(":has(a[href])");e.disabled=t.map(n.filter(".ui-state-disabled"),function(t){return n.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),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","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this,n=this.tabs,i=this.anchors,r=this.panels;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist").delegate("> li","mousedown"+this.eventNamespace,function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),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 t("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=t(),this.anchors.each(function(n,i){var r,o,a,s=t(i).uniqueId().attr("id"),l=t(i).closest("li"),u=l.attr("aria-controls");e._isLocal(i)?(r=i.hash,a=r.substring(1),o=e.element.find(e._sanitizeSelector(r))):(a=l.attr("aria-controls")||t({}).uniqueId()[0].id,r="#"+a,o=e.element.find(r),o.length||(o=e._createPanel(a),o.insertAfter(e.panels[n-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),u&&l.data("ui-tabs-aria-controls",u),l.attr({"aria-controls":a,"aria-labelledby":s}),o.attr("aria-labelledby",s)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel"),n&&(this._off(n.not(this.tabs)),this._off(i.not(this.anchors)),this._off(r.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(e){t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1);for(var n,i=0;n=this.tabs[i];i++)e===!0||-1!==t.inArray(i,e)?t(n).addClass("ui-state-disabled").attr("aria-disabled","true"):t(n).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=e},_setupEvents:function(e){var n={};e&&t.each(e.split(" "),function(t,e){n[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,n),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var n,i=this.element.parent();"fill"===e?(n=i.height(),n-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),i=e.css("position");"absolute"!==i&&"fixed"!==i&&(n-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){n-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,n-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(n=0,this.panels.each(function(){n=Math.max(n,t(this).height("").height())}).height(n))},_eventHandler:function(e){var n=this.options,i=this.active,r=t(e.currentTarget),o=r.closest("li"),a=o[0]===i[0],s=a&&n.collapsible,l=s?t():this._getPanelForTab(o),u=i.length?this._getPanelForTab(i):t(),c={oldTab:i,oldPanel:u,newTab:s?t():o,newPanel:l};e.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||a&&!n.collapsible||this._trigger("beforeActivate",e,c)===!1||(n.active=s?!1:this.tabs.index(o),this.active=a?t():o,this.xhr&&this.xhr.abort(),u.length||l.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),l.length&&this.load(this.tabs.index(o),e),this._toggle(e,c))},_toggle:function(e,n){function i(){o.running=!1,o._trigger("activate",e,n)}function r(){n.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),a.length&&o.options.show?o._show(a,o.options.show,i):(a.show(),i())}var o=this,a=n.newPanel,s=n.oldPanel;this.running=!0,s.length&&this.options.hide?this._hide(s,this.options.hide,function(){n.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r()}):(n.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),s.hide(),r()),s.attr("aria-hidden","true"),n.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),a.length&&s.length?n.oldTab.attr("tabIndex",-1):a.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),a.attr("aria-hidden","false"),n.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(e){var n,i=this._findActive(e);i[0]!==this.active[0]&&(i.length||(i=this.active),n=i.find(".ui-tabs-anchor")[0],this._eventHandler({target:n,currentTarget:n,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_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.tablist.unbind(this.eventNamespace),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(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 e=t(this),n=e.data("ui-tabs-aria-controls");n?e.attr("aria-controls",n).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(e){var n=this.options.disabled;n!==!1&&(void 0===e?n=!1:(e=this._getIndex(e),n=t.isArray(n)?t.map(n,function(t){return t!==e?t:null}):t.map(this.tabs,function(t,n){return n!==e?n:null})),this._setupDisabled(n))},disable:function(e){var n=this.options.disabled;if(n!==!0){if(void 0===e)n=!0;else{if(e=this._getIndex(e),-1!==t.inArray(e,n))return;n=t.isArray(n)?t.merge([e],n).sort():[e]}this._setupDisabled(n)}},load:function(e,n){e=this._getIndex(e);var i=this,r=this.tabs.eq(e),o=r.find(".ui-tabs-anchor"),a=this._getPanelForTab(r),s={tab:r,panel:a},l=function(t,e){"abort"===e&&i.panels.stop(!1,!0),r.removeClass("ui-tabs-loading"),a.removeAttr("aria-busy"),t===i.xhr&&delete i.xhr};this._isLocal(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,n,s)),this.xhr&&"canceled"!==this.xhr.statusText&&(r.addClass("ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.done(function(t,e,r){setTimeout(function(){a.html(t),i._trigger("load",n,s),l(r,e)},1)}).fail(function(t,e){setTimeout(function(){l(t,e)},1)})))},_ajaxSettings:function(e,n,i){var r=this;return{url:e.attr("href"),beforeSend:function(e,o){return r._trigger("beforeLoad",n,t.extend({jqXHR:e,ajaxSettings:o},i))}}},_getPanelForTab:function(e){var n=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+n))}}),t.widget("ui.tooltip",{version:"1.11.4",options:{content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).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},_addDescribedBy:function(e,n){var i=(e.attr("aria-describedby")||"").split(/\s+/);i.push(n),e.data("ui-tooltip-id",n).attr("aria-describedby",t.trim(i.join(" ")))},_removeDescribedBy:function(e){var n=e.data("ui-tooltip-id"),i=(e.attr("aria-describedby")||"").split(/\s+/),r=t.inArray(n,i);-1!==r&&i.splice(r,1),e.removeData("ui-tooltip-id"),i=t.trim(i.join(" ")),i?e.attr("aria-describedby",i):e.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable(),this.liveRegion=t("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body)},_setOption:function(e,n){var i=this;return"disabled"===e?(this[n?"_disable":"_enable"](),void(this.options[e]=n)):(this._super(e,n),void("content"===e&&t.each(this.tooltips,function(t,e){i._updateContent(e.element)})))},_disable:function(){var e=this;t.each(this.tooltips,function(n,i){var r=t.Event("blur");r.target=r.currentTarget=i.element[0],e.close(r,!0)}),this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.is("[title]")&&e.data("ui-tooltip-title",e.attr("title")).removeAttr("title")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))})},open:function(e){var n=this,i=t(e?e.target:this.element).closest(this.options.items);i.length&&!i.data("ui-tooltip-id")&&(i.attr("title")&&i.data("ui-tooltip-title",i.attr("title")),i.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&i.parents().each(function(){var e,i=t(this);i.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,n.close(e,!0)),i.attr("title")&&(i.uniqueId(),n.parents[this.id]={element:this,title:i.attr("title")},i.attr("title",""))}),this._registerCloseHandlers(e,i),this._updateContent(i,e))},_updateContent:function(t,e){var n,i=this.options.content,r=this,o=e?e.type:null;return"string"==typeof i?this._open(e,t,i):(n=i.call(t[0],function(n){r._delay(function(){t.data("ui-tooltip-open")&&(e&&(e.type=o),this._open(e,t,n))})}),void(n&&this._open(e,t,n)))},_open:function(e,n,i){function r(t){u.of=t,a.is(":hidden")||a.position(u)}var o,a,s,l,u=t.extend({},this.options.position);if(i){if(o=this._find(n))return void o.tooltip.find(".ui-tooltip-content").html(i);n.is("[title]")&&(e&&"mouseover"===e.type?n.attr("title",""):n.removeAttr("title")),o=this._tooltip(n),a=o.tooltip,this._addDescribedBy(n,a.attr("id")),a.find(".ui-tooltip-content").html(i),this.liveRegion.children().hide(),i.clone?(l=i.clone(),l.removeAttr("id").find("[id]").removeAttr("id")):l=i,t("<div>").html(l).appendTo(this.liveRegion),this.options.track&&e&&/^mouse/.test(e.type)?(this._on(this.document,{mousemove:r}),r(e)):a.position(t.extend({of:n},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.show&&this.options.show.delay&&(s=this.delayedShow=setInterval(function(){a.is(":visible")&&(r(u.of),clearInterval(s))},t.fx.interval)),this._trigger("open",e,{tooltip:a})}},_registerCloseHandlers:function(e,n){var i={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var i=t.Event(e);i.currentTarget=n[0],this.close(i,!0)}}};n[0]!==this.element[0]&&(i.remove=function(){this._removeTooltip(this._find(n).tooltip)}),e&&"mouseover"!==e.type||(i.mouseleave="close"),e&&"focusin"!==e.type||(i.focusout="close"),this._on(!0,n,i)},close:function(e){var n,i=this,r=t(e?e.currentTarget:this.element),o=this._find(r);return o?(n=o.tooltip,void(o.closing||(clearInterval(this.delayedShow),r.data("ui-tooltip-title")&&!r.attr("title")&&r.attr("title",r.data("ui-tooltip-title")),this._removeDescribedBy(r),o.hiding=!0,n.stop(!0),this._hide(n,this.options.hide,function(){i._removeTooltip(t(this))}),r.removeData("ui-tooltip-open"),this._off(r,"mouseleave focusout keyup"),r[0]!==this.element[0]&&this._off(r,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,n){t(n.element).attr("title",n.title),delete i.parents[e]
}),o.closing=!0,this._trigger("close",e,{tooltip:n}),o.hiding||(o.closing=!1)))):void r.removeData("ui-tooltip-open")},_tooltip:function(e){var n=t("<div>").attr("role","tooltip").addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||"")),i=n.uniqueId().attr("id");return t("<div>").addClass("ui-tooltip-content").appendTo(n),n.appendTo(this.document[0].body),this.tooltips[i]={element:e,tooltip:n}},_find:function(t){var e=t.data("ui-tooltip-id");return e?this.tooltips[e]:null},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_destroy:function(){var e=this;t.each(this.tooltips,function(n,i){var r=t.Event("blur"),o=i.element;r.target=r.currentTarget=o[0],e.close(r,!0),t("#"+n).remove(),o.data("ui-tooltip-title")&&(o.attr("title")||o.attr("title",o.data("ui-tooltip-title")),o.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}})}),/**
 * angular-ui-sortable - This directive allows you to jQueryUI Sortable.
 * @version v0.13.4 - 2015-06-07
 * @link http://angular-ui.github.com
 * @license MIT
 */
function(t,e,n){"use strict";e.module("ui.sortable",[]).value("uiSortableConfig",{}).directive("uiSortable",["uiSortableConfig","$timeout","$log",function(t,i,r){return{require:"?ngModel",scope:{ngModel:"=",uiSortable:"="},link:function(o,a,s,l){function u(t,e){return e&&"function"==typeof e?function(){t.apply(this,arguments),e.apply(this,arguments)}:t}function c(t){var e=t.data("ui-sortable");return e&&"object"==typeof e&&"ui-sortable"===e.widgetFullName?e:null}function d(t,e){var n=t.sortable("option","helper");return"clone"===n||"function"==typeof n&&e.item.sortable.isCustomHelperUsed()}function h(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}function f(t,e){for(var n=null,i=0;i<t.length;i++){var r=t[i];if(r.element[0]===e[0]){n=r.scope;break}}return n}function p(t,e){e.item.sortable._destroy()}var g,m={},v={"ui-floating":n},y={receive:null,remove:null,start:null,stop:null,update:null},b={helper:null};return e.extend(m,v,t,o.uiSortable),e.element.fn&&e.element.fn.jquery?(l?(o.$watch("ngModel.length",function(){i(function(){c(a)&&a.sortable("refresh")},0,!1)}),y.start=function(t,i){if("auto"===m["ui-floating"]){var r=i.item.siblings(),o=c(e.element(t.target));o.floating=h(r)}i.item.sortable={model:l.$modelValue[i.item.index()],index:i.item.index(),source:i.item.parent(),sourceModel:l.$modelValue,cancel:function(){i.item.sortable._isCanceled=!0},isCanceled:function(){return i.item.sortable._isCanceled},isCustomHelperUsed:function(){return!!i.item.sortable._isCustomHelperUsed},_isCanceled:!1,_isCustomHelperUsed:i.item.sortable._isCustomHelperUsed,_destroy:function(){e.forEach(i.item.sortable,function(t,e){i.item.sortable[e]=n})}}},y.activate=function(t,n){g=a.contents();var i=a.sortable("option","placeholder");if(i&&i.element&&"function"==typeof i.element){var r=i.element();r=e.element(r);var s=a.find('[class="'+r.attr("class")+'"]:not([ng-repeat], [data-ng-repeat])');g=g.not(s)}var l=n.item.sortable._connectedSortables||[];l.push({element:a,scope:o}),n.item.sortable._connectedSortables=l},y.update=function(t,e){if(!e.item.sortable.received){e.item.sortable.dropindex=e.item.index();var n=e.item.parent();e.item.sortable.droptarget=n;var i=f(e.item.sortable._connectedSortables,n);e.item.sortable.droptargetModel=i.ngModel,a.sortable("cancel")}d(a,e)&&!e.item.sortable.received&&"parent"===a.sortable("option","appendTo")&&(g=g.not(g.last())),g.appendTo(a),e.item.sortable.received&&(g=null),e.item.sortable.received&&!e.item.sortable.isCanceled()&&o.$apply(function(){l.$modelValue.splice(e.item.sortable.dropindex,0,e.item.sortable.moved)})},y.stop=function(t,e){!e.item.sortable.received&&"dropindex"in e.item.sortable&&!e.item.sortable.isCanceled()?o.$apply(function(){l.$modelValue.splice(e.item.sortable.dropindex,0,l.$modelValue.splice(e.item.sortable.index,1)[0])}):"dropindex"in e.item.sortable&&!e.item.sortable.isCanceled()||d(a,e)||g.appendTo(a),g=null},y.receive=function(t,e){e.item.sortable.received=!0},y.remove=function(t,e){"dropindex"in e.item.sortable||(a.sortable("cancel"),e.item.sortable.cancel()),e.item.sortable.isCanceled()||o.$apply(function(){e.item.sortable.moved=l.$modelValue.splice(e.item.sortable.index,1)[0]})},b.helper=function(t){return t&&"function"==typeof t?function(e,n){var i=t.apply(this,arguments);return n.sortable._isCustomHelperUsed=n!==i,i}:t},o.$watch("uiSortable",function(t){var n=c(a);n&&e.forEach(t,function(t,e){return e in v?("ui-floating"!==e||t!==!1&&t!==!0||(n.floating=t),void(m[e]=t)):(y[e]?("stop"===e&&(t=u(t,function(){o.$apply()}),t=u(t,p)),t=u(y[e],t)):b[e]&&(t=b[e](t)),m[e]=t,void a.sortable("option",e,t))})},!0),e.forEach(y,function(t,e){m[e]=u(t,m[e]),"stop"===e&&(m[e]=u(m[e],p))})):r.info("ui.sortable: ngModel not provided!",a),void a.sortable(m)):void r.error("ui.sortable: jQuery should be included before AngularJS!")}}}])}(window,window.angular),function(){function t(t,e){if(t!==e){var n=t===t,i=e===e;if(t>e||!n||"undefined"==typeof t&&i)return 1;if(e>t||!i||"undefined"==typeof e&&n)return-1}return 0}function e(t,e,n){if(e!==e)return h(t,n);for(var i=(n||0)-1,r=t.length;++i<r;)if(t[i]===e)return i;return-1}function n(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}function i(t){return"string"==typeof t?t:null==t?"":t+""}function r(t){return t.charCodeAt(0)}function o(t,e){for(var n=-1,i=t.length;++n<i&&e.indexOf(t.charAt(n))>-1;);return n}function a(t,e){for(var n=t.length;n--&&e.indexOf(t.charAt(n))>-1;);return n}function s(e,n){return t(e.criteria,n.criteria)||e.index-n.index}function l(e,n){for(var i=-1,r=e.criteria,o=n.criteria,a=r.length;++i<a;){var s=t(r[i],o[i]);if(s)return s}return e.index-n.index}function u(t){return We[t]}function c(t){return Le[t]}function d(t){return"\\"+je[t]}function h(t,e,n){for(var i=t.length,r=n?e||i:(e||0)-1;n?r--:++r<i;){var o=t[r];if(o!==o)return r}return-1}function f(t){return t&&"object"==typeof t||!1}function p(t){return 160>=t&&t>=9&&13>=t||32==t||160==t||5760==t||6158==t||t>=8192&&(8202>=t||8232==t||8233==t||8239==t||8287==t||12288==t||65279==t)}function g(t,e){for(var n=-1,i=t.length,r=-1,o=[];++n<i;)t[n]===e&&(t[n]=z,o[++r]=n);return o}function m(t,e){for(var n,i=-1,r=t.length,o=-1,a=[];++i<r;){var s=t[i],l=e?e(s,i,t):s;i&&n===l||(n=l,a[++o]=s)}return a}function v(t){for(var e=-1,n=t.length;++e<n&&p(t.charCodeAt(e)););return e}function y(t){for(var e=t.length;e--&&p(t.charCodeAt(e)););return e}function b(t){return ze[t]}function x(p){function Y(t){if(f(t)&&!js(t)){if(t instanceof Z)return t;if(Ua.call(t,"__wrapped__"))return new Z(t.__wrapped__,t.__chain__,Ze(t.__actions__))}return new Z(t)}function Z(t,e,n){this.__actions__=n||[],this.__chain__=!!e,this.__wrapped__=t}function J(t){this.actions=null,this.dir=1,this.dropCount=0,this.filtered=!1,this.iteratees=null,this.takeCount=$s,this.views=null,this.wrapped=t}function We(){var t=this.actions,e=this.iteratees,n=this.views,i=new J(this.wrapped);return i.actions=t?Ze(t):null,i.dir=this.dir,i.dropCount=this.dropCount,i.filtered=this.filtered,i.iteratees=e?Ze(e):null,i.takeCount=this.takeCount,i.views=n?Ze(n):null,i}function Le(){if(this.filtered){var t=new J(this);t.dir=-1,t.filtered=!0}else t=this.clone(),t.dir*=-1;return t}function ze(){var t=this.wrapped.value();if(!js(t))return Yn(t,this.actions);var e=this.dir,n=0>e,i=mi(0,t.length,this.views),r=i.start,o=i.end,a=o-r,s=this.dropCount,l=ms(a,this.takeCount-s),u=n?o:r-1,c=this.iteratees,d=c?c.length:0,h=0,f=[];t:for(;a--&&l>h;){u+=e;for(var p=-1,g=t[u];++p<d;){var m=c[p],v=m.iteratee,y=v(g,u,t),b=m.type;if(b==F)g=y;else if(!y){if(b==H)continue t;break t}}s?s--:f[h++]=g}return f}function Re(){this.__data__={}}function je(t){return this.has(t)&&delete this.__data__[t]}function Ve(t){return"__proto__"==t?w:this.__data__[t]}function Be(t){return"__proto__"!=t&&Ua.call(this.__data__,t)}function Ue(t,e){return"__proto__"!=t&&(this.__data__[t]=e),this}function Ye(t){var e=t?t.length:0;for(this.data={hash:hs(null),set:new os};e--;)this.push(t[e])}function Xe(t,e){var n=t.data,i="string"==typeof e||wo(e)?n.set.has(e):n.hash[e];return i?0:-1}function Ke(t){var e=this.data;"string"==typeof t||wo(t)?e.set.add(t):e.hash[t]=!0}function Ze(t,e){var n=-1,i=t.length;for(e||(e=Ea(i));++n<i;)e[n]=t[n];return e}function Qe(t,e){for(var n=-1,i=t.length;++n<i&&e(t[n],n,t)!==!1;);return t}function Je(t,e){for(var n=t.length;n--&&e(t[n],n,t)!==!1;);return t}function tn(t,e){for(var n=-1,i=t.length;++n<i;)if(!e(t[n],n,t))return!1;return!0}function en(t,e){for(var n=-1,i=t.length,r=-1,o=[];++n<i;){var a=t[n];e(a,n,t)&&(o[++r]=a)}return o}function nn(t,e){for(var n=-1,i=t.length,r=Ea(i);++n<i;)r[n]=e(t[n],n,t);return r}function rn(t){for(var e=-1,n=t.length,i=ws;++e<n;){var r=t[e];r>i&&(i=r)}return i}function on(t){for(var e=-1,n=t.length,i=$s;++e<n;){var r=t[e];i>r&&(i=r)}return i}function an(t,e,n,i){var r=-1,o=t.length;for(i&&o&&(n=t[++r]);++r<o;)n=e(n,t[r],r,t);return n}function sn(t,e,n,i){var r=t.length;for(i&&r&&(n=t[--r]);r--;)n=e(n,t[r],r,t);return n}function ln(t,e){for(var n=-1,i=t.length;++n<i;)if(e(t[n],n,t))return!0;return!1}function un(t,e){return"undefined"==typeof t?e:t}function cn(t,e,n,i){return"undefined"!=typeof t&&Ua.call(i,n)?t:e}function dn(t,e,n){var i=Us(e);if(!n)return fn(e,t,i);for(var r=-1,o=i.length;++r<o;){var a=i[r],s=t[a],l=n(s,e[a],a,t,e);(l===l?l===s:s!==s)&&("undefined"!=typeof s||a in t)||(t[a]=l)}return t}function hn(t,e){for(var n=-1,i=t.length,r=ki(i),o=e.length,a=Ea(o);++n<o;){var s=e[n];r?(s=parseFloat(s),a[n]=wi(s,i)?t[s]:w):a[n]=t[s]}return a}function fn(t,e,n){n||(n=e,e={});for(var i=-1,r=n.length;++i<r;){var o=n[i];e[o]=t[o]}return e}function pn(t,e){for(var n=-1,i=e.length;++n<i;){var r=e[n];t[r]=ui(t[r],k,t)}return t}function gn(t,e,n){var i=typeof t;return"function"==i?"undefined"!=typeof e&&xi(t)?Kn(t,e,n):t:null==t?wa:"object"==i?Hn(t):Ln(t+"")}function mn(t,e,n,i,r,o,a){var s;if(n&&(s=r?n(t,i,r):n(t)),"undefined"!=typeof s)return s;if(!wo(t))return t;var l=js(t);if(l){if(s=vi(t),!e)return Ze(t,s)}else{var u=Ga.call(t),c=u==U;if(u!=X&&u!=R&&(!c||r))return He[u]?bi(t,u,e):r?t:{};if(s=yi(c?{}:t),!e)return fn(t,s,Us(t))}o||(o=[]),a||(a=[]);for(var d=o.length;d--;)if(o[d]==t)return a[d];return o.push(t),a.push(s),(l?Qe:Sn)(t,function(i,r){s[r]=mn(i,e,n,r,t,o,a)}),s}function vn(t,e,n,i){if(!xo(t))throw new za(L);return as(function(){t.apply(w,qn(n,i))},e)}function yn(t,n){var i=t?t.length:0,r=[];if(!i)return r;var o=-1,a=gi(),s=a==e,l=s&&n.length>=200&&Os(n),u=n.length;l&&(a=Xe,s=!1,n=l);t:for(;++o<i;){var c=t[o];if(s&&c===c){for(var d=u;d--;)if(n[d]===c)continue t;r.push(c)}else a(n,c)<0&&r.push(c)}return r}function bn(t,e){var n=t?t.length:0;if(!ki(n))return Sn(t,e);for(var i=-1,r=Oi(t);++i<n&&e(r[i],i,r)!==!1;);return t}function xn(t,e){var n=t?t.length:0;if(!ki(n))return Tn(t,e);for(var i=Oi(t);n--&&e(i[n],n,i)!==!1;);return t}function wn(t,e){var n=!0;return bn(t,function(t,i,r){return n=!!e(t,i,r)}),n}function $n(t,e){var n=[];return bn(t,function(t,i,r){e(t,i,r)&&n.push(t)}),n}function kn(t,e,n,i){var r;return n(t,function(t,n,o){return e(t,n,o)?(r=i?n:t,!1):void 0}),r}function _n(t,e,n,i){for(var r=(i||0)-1,o=t.length,a=-1,s=[];++r<o;){var l=t[r];if(f(l)&&ki(l.length)&&(js(l)||fo(l))){e&&(l=_n(l,e,n));var u=-1,c=l.length;for(s.length+=c;++u<c;)s[++a]=l[u]}else n||(s[++a]=l)}return s}function Cn(t,e,n){for(var i=-1,r=Oi(t),o=n(t),a=o.length;++i<a;){var s=o[i];if(e(r[s],s,r)===!1)break}return t}function Mn(t,e,n){for(var i=Oi(t),r=n(t),o=r.length;o--;){var a=r[o];if(e(i[a],a,i)===!1)break}return t}function Dn(t,e){return Cn(t,e,Vo)}function Sn(t,e){return Cn(t,e,Us)}function Tn(t,e){return Mn(t,e,Us)}function An(t,e){for(var n=-1,i=e.length,r=-1,o=[];++n<i;){var a=e[n];xo(t[a])&&(o[++r]=a)}return o}function En(t,e,n){var i=-1,r="function"==typeof e,o=t?t.length:0,a=ki(o)?Ea(o):[];return bn(t,function(t){var o=r?e:null!=t&&t[e];a[++i]=o?o.apply(t,n):w}),a}function On(t,e,n,i,r,o){if(t===e)return 0!==t||1/t==1/e;var a=typeof t,s=typeof e;return"function"!=a&&"object"!=a&&"function"!=s&&"object"!=s||null==t||null==e?t!==t&&e!==e:Nn(t,e,On,n,i,r,o)}function Nn(t,e,n,i,r,o,a){var s=js(t),l=js(e),u=j,c=j;s||(u=Ga.call(t),u==R?u=X:u!=X&&(s=To(t))),l||(c=Ga.call(e),c==R?c=X:c!=X&&(l=To(e)));var d=u==X,h=c==X,f=u==c;if(f&&!s&&!d)return di(t,e,u);var p=d&&Ua.call(t,"__wrapped__"),g=h&&Ua.call(e,"__wrapped__");if(p||g)return n(p?t.value():t,g?e.value():e,i,r,o,a);if(!f)return!1;o||(o=[]),a||(a=[]);for(var m=o.length;m--;)if(o[m]==t)return a[m]==e;o.push(t),a.push(e);var v=(s?ci:hi)(t,e,n,i,r,o,a);return o.pop(),a.pop(),v}function In(t,e,n,i,r){var o=e.length;if(null==t)return!o;for(var a=-1,s=!r;++a<o;)if(s&&i[a]?n[a]!==t[e[a]]:!Ua.call(t,e[a]))return!1;for(a=-1;++a<o;){var l=e[a];if(s&&i[a])var u=Ua.call(t,l);else{var c=t[l],d=n[a];u=r?r(c,d,l):w,"undefined"==typeof u&&(u=On(d,c,r,!0))}if(!u)return!1}return!0}function Pn(t,e){var n=[];return bn(t,function(t,i,r){n.push(e(t,i,r))}),n}function Hn(t){var e=Us(t),n=e.length;if(1==n){var i=e[0],r=t[i];if(_i(r))return function(t){return null!=t&&r===t[i]&&Ua.call(t,i)}}for(var o=Ea(n),a=Ea(n);n--;)r=t[e[n]],o[n]=r,a[n]=_i(r);return function(t){return In(t,e,o,a)}}function Fn(t,e,n,i,r){var o=ki(e.length)&&(js(e)||To(e));return(o?Qe:Sn)(e,function(e,a,s){if(f(e))return i||(i=[]),r||(r=[]),Wn(t,s,a,Fn,n,i,r);var l=t[a],u=n?n(l,e,a,t,s):w,c="undefined"==typeof u;c&&(u=e),!o&&"undefined"==typeof u||!c&&(u===u?u===l:l!==l)||(t[a]=u)}),t}function Wn(t,e,n,i,r,o,a){for(var s=o.length,l=e[n];s--;)if(o[s]==l)return void(t[n]=a[s]);var u=t[n],c=r?r(u,l,n,t,e):w,d="undefined"==typeof c;d&&(c=l,ki(l.length)&&(js(l)||To(l))?c=js(u)?u:u?Ze(u):[]:Vs(l)||fo(l)?c=fo(u)?Oo(u):Vs(u)?u:{}:d=!1),o.push(l),a.push(c),d?t[n]=i(c,l,r,o,a):(c===c?c!==u:u===u)&&(t[n]=c)}function Ln(t){return function(e){return null==e?w:e[t]}}function zn(e,n){var i=n.length,r=hn(e,n);for(n.sort(t);i--;){var o=parseFloat(n[i]);if(o!=a&&wi(o)){var a=o;ss.call(e,o,1)}}return r}function Rn(t,e){return t+es(xs()*(e-t+1))}function jn(t,e,n,i,r){return r(t,function(t,r,o){n=i?(i=!1,t):e(n,t,r,o)}),n}function qn(t,e,n){var i=-1,r=t.length;e=null==e?0:+e||0,0>e&&(e=-e>r?0:r+e),n="undefined"==typeof n||n>r?r:+n||0,0>n&&(n+=r),r=e>n?0:n-e>>>0,e>>>=0;for(var o=Ea(r);++i<r;)o[i]=t[i+e];return o}function Vn(t,e){var n;return bn(t,function(t,i,r){return n=e(t,i,r),!n}),!!n}function Bn(t,n){var i=-1,r=gi(),o=t.length,a=r==e,s=a&&o>=200,l=s&&Os(),u=[];l?(r=Xe,a=!1):(s=!1,l=n?[]:u);t:for(;++i<o;){var c=t[i],d=n?n(c,i,t):c;if(a&&c===c){for(var h=l.length;h--;)if(l[h]===d)continue t;n&&l.push(d),u.push(c)}else r(l,d)<0&&((n||s)&&l.push(d),u.push(c))}return u}function Un(t,e){for(var n=-1,i=e.length,r=Ea(i);++n<i;)r[n]=t[e[n]];return r}function Yn(t,e){var n=t;n instanceof J&&(n=n.value());for(var i=-1,r=e.length;++i<r;){var o=[n],a=e[i];is.apply(o,a.args),n=a.func.apply(a.thisArg,o)}return n}function Gn(t,e,n){var i=0,r=t?t.length:i;if("number"==typeof e&&e===e&&Cs>=r){for(;r>i;){var o=i+r>>>1,a=t[o];(n?e>=a:e>a)?i=o+1:r=o}return r}return Xn(t,e,wa,n)}function Xn(t,e,n,i){e=n(e);for(var r=0,o=t?t.length:0,a=e!==e,s="undefined"==typeof e;o>r;){var l=es((r+o)/2),u=n(t[l]),c=u===u;if(a)var d=c||i;else d=s?c&&(i||"undefined"!=typeof u):i?e>=u:e>u;d?r=l+1:o=l}return ms(o,_s)}function Kn(t,e,n){if("function"!=typeof t)return wa;if("undefined"==typeof e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,i,r){return t.call(e,n,i,r)};case 4:return function(n,i,r,o){return t.call(e,n,i,r,o)};case 5:return function(n,i,r,o,a){return t.call(e,n,i,r,o,a)}}return function(){return t.apply(e,arguments)}}function Zn(t){return Qa.call(t,0)}function Qn(t,e,n){for(var i=n.length,r=-1,o=gs(t.length-i,0),a=-1,s=e.length,l=Ea(o+s);++a<s;)l[a]=e[a];for(;++r<i;)l[n[r]]=t[r];for(;o--;)l[a++]=t[r++];return l}function Jn(t,e,n){for(var i=-1,r=n.length,o=-1,a=gs(t.length-r,0),s=-1,l=e.length,u=Ea(a+l);++o<a;)u[o]=t[o];for(var c=o;++s<l;)u[c+s]=e[s];for(;++i<r;)u[c+n[i]]=t[o++];return u}function ti(t,e){return function(n,i,r){var o=e?e():{};if(i=pi(i,r,3),js(n))for(var a=-1,s=n.length;++a<s;){var l=n[a];t(o,l,i(l,a,n),n)}else bn(n,function(e,n,r){t(o,e,i(e,n,r),r)});return o}}function ei(t){return function(){var e=arguments.length,n=arguments[0];if(2>e||null==n)return n;if(e>3&&$i(arguments[1],arguments[2],arguments[3])&&(e=2),e>3&&"function"==typeof arguments[e-2])var i=Kn(arguments[--e-1],arguments[e--],5);else e>2&&"function"==typeof arguments[e-1]&&(i=arguments[--e]);for(var r=0;++r<e;){var o=arguments[r];o&&t(n,o,i)}return n}}function ni(t,e){function n(){return(this instanceof n?i:t).apply(e,arguments)}var i=ri(t);return n}function ii(t){return function(e){for(var n=-1,i=va(ea(e)),r=i.length,o="";++n<r;)o=t(o,i[n],n);return o}}function ri(t){return function(){var e=As(t.prototype),n=t.apply(e,arguments);return wo(n)?n:e}}function oi(t,e){return function(n,i,o){o&&$i(n,i,o)&&(i=null);var a=pi(),s=null==i;if(a===gn&&s||(s=!1,i=a(i,o,3)),s){var l=js(n);if(l||!So(n))return t(l?n:Ei(n));i=r}return fi(n,i,e)}}function ai(t,e,n,i,r,o,a,s,l,u){function c(){for(var x=arguments.length,w=x,$=Ea(x);w--;)$[w]=arguments[w];if(i&&($=Qn($,i,r)),o&&($=Jn($,o,a)),p||v){var C=c.placeholder,M=g($,C);if(x-=M.length,u>x){var D=s?Ze(s):null,A=gs(u-x,0),E=p?M:null,O=p?null:M,N=p?$:null,I=p?null:$;e|=p?S:T,e&=~(p?T:S),m||(e&=~(k|_));var P=ai(t,e,n,N,E,I,O,D,l,A);return P.placeholder=C,P}}var H=h?n:this;return f&&(t=H[b]),s&&($=Si($,s)),d&&l<$.length&&($.length=l),(this instanceof c?y||ri(t):t).apply(H,$)}var d=e&E,h=e&k,f=e&_,p=e&M,m=e&C,v=e&D,y=!f&&ri(t),b=t;return c}function si(t,e,n){var i=t.length;if(e=+e,i>=e||!fs(e))return"";var r=e-i;return n=null==n?" ":n+"",ua(n,Ja(r/n.length)).slice(0,r)}function li(t,e,n,i){function r(){for(var e=-1,s=arguments.length,l=-1,u=i.length,c=Ea(s+u);++l<u;)c[l]=i[l];for(;s--;)c[l++]=arguments[++e];return(this instanceof r?a:t).apply(o?n:this,c)}var o=e&k,a=ri(t);return r}function ui(t,e,n,i,r,o,a,s){var l=e&_;if(!l&&!xo(t))throw new za(L);var u=i?i.length:0;if(u||(e&=~(S|T),i=r=null),u-=r?r.length:0,e&T){var c=i,d=r;i=r=null}var h=!l&&Ns(t),f=[t,e,n,i,r,c,d,o,a,s];if(h&&h!==!0&&(Ci(f,h),e=f[1],s=f[9]),f[9]=null==s?l?0:t.length:gs(s-u,0)||0,e==k)var p=ni(f[0],f[2]);else p=e!=S&&e!=(k|S)||f[4].length?ai.apply(null,f):li.apply(null,f);var g=h?Es:Is;return g(p,f)}function ci(t,e,n,i,r,o,a){var s=-1,l=t.length,u=e.length,c=!0;if(l!=u&&!(r&&u>l))return!1;for(;c&&++s<l;){var d=t[s],h=e[s];if(c=w,i&&(c=r?i(h,d,s):i(d,h,s)),"undefined"==typeof c)if(r)for(var f=u;f--&&(h=e[f],!(c=d&&d===h||n(d,h,i,r,o,a))););else c=d&&d===h||n(d,h,i,r,o,a)}return!!c}function di(t,e,n){switch(n){case q:case V:return+t==+e;case B:return t.name==e.name&&t.message==e.message;case G:return t!=+t?e!=+e:0==t?1/t==1/e:t==+e;case K:case Q:return t==e+""}return!1}function hi(t,e,n,i,r,o,a){var s=Us(t),l=s.length,u=Us(e),c=u.length;if(l!=c&&!r)return!1;for(var d,h=-1;++h<l;){var f=s[h],p=Ua.call(e,f);if(p){var g=t[f],m=e[f];p=w,i&&(p=r?i(m,g,f):i(g,m,f)),"undefined"==typeof p&&(p=g&&g===m||n(g,m,i,r,o,a))}if(!p)return!1;d||(d="constructor"==f)}if(!d){var v=t.constructor,y=e.constructor;if(v!=y&&"constructor"in t&&"constructor"in e&&!("function"==typeof v&&v instanceof v&&"function"==typeof y&&y instanceof y))return!1}return!0}function fi(t,e,n){var i=n?$s:ws,r=i,o=r;return bn(t,function(t,a,s){var l=e(t,a,s);((n?r>l:l>r)||l===i&&l===o)&&(r=l,o=t)}),o}function pi(t,e,n){var i=Y.callback||ba;return i=i===ba?gn:i,n?i(t,e,n):i}function gi(t,n,i){var r=Y.indexOf||Bi;return r=r===Bi?e:r,t?r(t,n,i):r}function mi(t,e,n){for(var i=-1,r=n?n.length:0;++i<r;){var o=n[i],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=ms(e,t+a);break;case"takeRight":t=gs(t,e-a)}}return{start:t,end:e}}function vi(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Ua.call(t,"index")&&(n.index=t.index,n.input=t.input),n}function yi(t){var e=t.constructor;return"function"==typeof e&&e instanceof e||(e=Fa),new e}function bi(t,e,n){var i=t.constructor;switch(e){case te:return Zn(t);case q:case V:return new i(+t);case ee:case ne:case ie:case re:case oe:case ae:case se:case le:case ue:var r=t.buffer;return new i(n?Zn(r):r,t.byteOffset,t.length);case G:case Q:return new i(t);case K:var o=new i(t.source,we.exec(t));o.lastIndex=t.lastIndex}return o}function xi(t){var e=Y.support,n=!(e.funcNames?t.name:e.funcDecomp);if(!n){var i=Va.call(t);e.funcNames||(n=!$e.test(i)),n||(n=Te.test(i)||_o(t),Es(t,n))}return n}function wi(t,e){return t=+t,e=null==e?Ds:e,t>-1&&t%1==0&&e>t}function $i(t,e,n){if(!wo(n))return!1;var i=typeof e;if("number"==i)var r=n.length,o=ki(r)&&wi(e,r);else o="string"==i&&e in n;return o&&n[e]===t}function ki(t){return"number"==typeof t&&t>-1&&t%1==0&&Ds>=t}function _i(t){return t===t&&(0===t?1/t>0:!wo(t))}function Ci(t,e){var n=t[1],i=e[1],r=n|i,o=E|A,a=k|_,s=o|a|C|D,l=n&E&&!(i&E),u=n&A&&!(i&A),c=(u?t:e)[7],d=(l?t:e)[8],h=!(n>=A&&i>a||n>a&&i>=A),f=r>=o&&s>=r&&(A>n||(u||l)&&c.length<=d);if(!h&&!f)return t;i&k&&(t[2]=e[2],r|=n&k?0:C);var p=e[3];if(p){var m=t[3];t[3]=m?Qn(m,p,e[4]):Ze(p),t[4]=m?g(t[3],z):Ze(e[4])}return p=e[5],p&&(m=t[5],t[5]=m?Jn(m,p,e[6]):Ze(p),t[6]=m?g(t[5],z):Ze(e[6])),p=e[7],p&&(t[7]=Ze(p)),i&E&&(t[8]=null==t[8]?e[8]:ms(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=r,t}function Mi(t,e){t=Oi(t);for(var n=-1,i=e.length,r={};++n<i;){var o=e[n];o in t&&(r[o]=t[o])}return r}function Di(t,e){var n={};return Dn(t,function(t,i,r){e(t,i,r)&&(n[i]=t)}),n}function Si(t,e){for(var n=t.length,i=ms(e.length,n),r=Ze(t);i--;){var o=e[i];t[i]=wi(o,n)?r[o]:w}return t}function Ti(t){{var e;Y.support}if(!f(t)||Ga.call(t)!=X||!Ua.call(t,"constructor")&&(e=t.constructor,"function"==typeof e&&!(e instanceof e)))return!1;var n;return Dn(t,function(t,e){n=e}),"undefined"==typeof n||Ua.call(t,n)}function Ai(t){for(var e=Vo(t),n=e.length,i=n&&t.length,r=Y.support,o=i&&ki(i)&&(js(t)||r.nonEnumArgs&&fo(t)),a=-1,s=[];++a<n;){var l=e[a];(o&&wi(l,i)||Ua.call(t,l))&&s.push(l)}return s}function Ei(t){return null==t?[]:ki(t.length)?wo(t)?t:Fa(t):Zo(t)}function Oi(t){return wo(t)?t:Fa(t)}function Ni(t,e,n){e=(n?$i(t,e,n):null==e)?1:gs(+e||1,1);for(var i=0,r=t?t.length:0,o=-1,a=Ea(Ja(r/e));r>i;)a[++o]=qn(t,i,i+=e);return a}function Ii(t){for(var e=-1,n=t?t.length:0,i=-1,r=[];++e<n;){var o=t[e];o&&(r[++i]=o)}return r}function Pi(){for(var t=-1,e=arguments.length;++t<e;){var n=arguments[t];if(js(n)||fo(n))break}return yn(n,_n(arguments,!1,!0,++t))}function Hi(t,e,n){var i=t?t.length:0;return i?((n?$i(t,e,n):null==e)&&(e=1),qn(t,0>e?0:e)):[]}function Fi(t,e,n){var i=t?t.length:0;return i?((n?$i(t,e,n):null==e)&&(e=1),e=i-(+e||0),qn(t,0,0>e?0:e)):[]}function Wi(t,e,n){var i=t?t.length:0;if(!i)return[];for(e=pi(e,n,3);i--&&e(t[i],i,t););return qn(t,0,i+1)}function Li(t,e,n){var i=t?t.length:0;if(!i)return[];var r=-1;for(e=pi(e,n,3);++r<i&&e(t[r],r,t););return qn(t,r)}function zi(t,e,n){var i=-1,r=t?t.length:0;for(e=pi(e,n,3);++i<r;)if(e(t[i],i,t))return i;return-1}function Ri(t,e,n){var i=t?t.length:0;for(e=pi(e,n,3);i--;)if(e(t[i],i,t))return i;return-1}function ji(t){return t?t[0]:w}function qi(t,e,n){var i=t?t.length:0;return n&&$i(t,e,n)&&(e=!1),i?_n(t,e):[]}function Vi(t){var e=t?t.length:0;return e?_n(t,!0):[]}function Bi(t,n,i){var r=t?t.length:0;if(!r)return-1;if("number"==typeof i)i=0>i?gs(r+i,0):i||0;else if(i){var o=Gn(t,n),a=t[o];return(n===n?n===a:a!==a)?o:-1}return e(t,n,i)}function Ui(t){return Fi(t,1)}function Yi(){for(var t=[],n=-1,i=arguments.length,r=[],o=gi(),a=o==e;++n<i;){var s=arguments[n];(js(s)||fo(s))&&(t.push(s),r.push(a&&s.length>=120&&Os(n&&s)))}i=t.length;var l=t[0],u=-1,c=l?l.length:0,d=[],h=r[0];t:for(;++u<c;)if(s=l[u],(h?Xe(h,s):o(d,s))<0){for(n=i;--n;){var f=r[n];if((f?Xe(f,s):o(t[n],s))<0)continue t}h&&h.push(s),d.push(s)}return d}function Gi(t){var e=t?t.length:0;return e?t[e-1]:w}function Xi(t,e,n){var i=t?t.length:0;if(!i)return-1;var r=i;if("number"==typeof n)r=(0>n?gs(i+n,0):ms(n||0,i-1))+1;else if(n){r=Gn(t,e,!0)-1;var o=t[r];return(e===e?e===o:o!==o)?r:-1}if(e!==e)return h(t,r,!0);for(;r--;)if(t[r]===e)return r;return-1}function Ki(){var t=arguments[0];if(!t||!t.length)return t;for(var e=0,n=gi(),i=arguments.length;++e<i;)for(var r=0,o=arguments[e];(r=n(t,o,r))>-1;)ss.call(t,r,1);return t}function Zi(t){return zn(t||[],_n(arguments,!1,!1,1))}function Qi(t,e,n){var i=-1,r=t?t.length:0,o=[];for(e=pi(e,n,3);++i<r;){var a=t[i];e(a,i,t)&&(o.push(a),ss.call(t,i--,1),r--)}return o}function Ji(t){return Hi(t,1)}function tr(t,e,n){var i=t?t.length:0;return i?(n&&"number"!=typeof n&&$i(t,e,n)&&(e=0,n=i),qn(t,e,n)):[]}function er(t,e,n,i){var r=pi(n);return r===gn&&null==n?Gn(t,e):Xn(t,e,r(n,i,1))}function nr(t,e,n,i){var r=pi(n);return r===gn&&null==n?Gn(t,e,!0):Xn(t,e,r(n,i,1),!0)}function ir(t,e,n){var i=t?t.length:0;return i?((n?$i(t,e,n):null==e)&&(e=1),qn(t,0,0>e?0:e)):[]}function rr(t,e,n){var i=t?t.length:0;return i?((n?$i(t,e,n):null==e)&&(e=1),e=i-(+e||0),qn(t,0>e?0:e)):[]}function or(t,e,n){var i=t?t.length:0;if(!i)return[];for(e=pi(e,n,3);i--&&e(t[i],i,t););return qn(t,i+1)}function ar(t,e,n){var i=t?t.length:0;if(!i)return[];var r=-1;for(e=pi(e,n,3);++r<i&&e(t[r],r,t););return qn(t,0,r)}function sr(){return Bn(_n(arguments,!1,!0))}function lr(t,n,i,r){var o=t?t.length:0;if(!o)return[];"boolean"!=typeof n&&null!=n&&(r=i,i=$i(t,n,r)?null:n,n=!1);var a=pi();return(a!==gn||null!=i)&&(i=a(i,r,3)),n&&gi()==e?m(t,i):Bn(t,i)}function ur(t){for(var e=-1,n=(t&&t.length&&rn(nn(t,Ba)))>>>0,i=Ea(n);++e<n;)i[e]=nn(t,Ln(e));return i}function cr(t){return yn(t,qn(arguments,1))}function dr(){for(var t=-1,e=arguments.length;++t<e;){var n=arguments[t];if(js(n)||fo(n))var i=i?yn(i,n).concat(yn(n,i)):n}return i?Bn(i):[]}function hr(){for(var t=arguments.length,e=Ea(t);t--;)e[t]=arguments[t];return ur(e)}function fr(t,e){var n=-1,i=t?t.length:0,r={};for(!i||e||js(t[0])||(e=[]);++n<i;){var o=t[n];e?r[o]=e[n]:o&&(r[o[0]]=o[1])}return r}function pr(t){var e=Y(t);return e.__chain__=!0,e}function gr(t,e,n){return e.call(n,t),t}function mr(t,e,n){return e.call(n,t)}function vr(){return pr(this)}function yr(){var t=this.__wrapped__;return t instanceof J?(this.__actions__.length&&(t=new J(this)),new Z(t.reverse())):this.thru(function(t){return t.reverse()})}function br(){return this.value()+""}function xr(){return Yn(this.__wrapped__,this.__actions__)}function wr(t){var e=t?t.length:0;return ki(e)&&(t=Ei(t)),hn(t,_n(arguments,!1,!1,1))}function $r(t,e,n){var i=t?t.length:0;return ki(i)||(t=Zo(t),i=t.length),i?(n="number"==typeof n?0>n?gs(i+n,0):n||0:0,"string"==typeof t||!js(t)&&So(t)?i>n&&t.indexOf(e,n)>-1:gi(t,e,n)>-1):!1}function kr(t,e,n){var i=js(t)?tn:wn;return("function"!=typeof e||"undefined"!=typeof n)&&(e=pi(e,n,3)),i(t,e)}function _r(t,e,n){var i=js(t)?en:$n;return e=pi(e,n,3),i(t,e)}function Cr(t,e,n){if(js(t)){var i=zi(t,e,n);return i>-1?t[i]:w}return e=pi(e,n,3),kn(t,e,bn)}function Mr(t,e,n){return e=pi(e,n,3),kn(t,e,xn)}function Dr(t,e){return Cr(t,Hn(e))}function Sr(t,e,n){return"function"==typeof e&&"undefined"==typeof n&&js(t)?Qe(t,e):bn(t,Kn(e,n,3))}function Tr(t,e,n){return"function"==typeof e&&"undefined"==typeof n&&js(t)?Je(t,e):xn(t,Kn(e,n,3))}function Ar(t,e){return En(t,e,qn(arguments,2))}function Er(t,e,n){var i=js(t)?nn:Pn;return e=pi(e,n,3),i(t,e)}function Or(t,e){return Er(t,Ln(e+""))}function Nr(t,e,n,i){var r=js(t)?an:jn;return r(t,pi(e,i,4),n,arguments.length<3,bn)}function Ir(t,e,n,i){var r=js(t)?sn:jn;return r(t,pi(e,i,4),n,arguments.length<3,xn)}function Pr(t,e,n){var i=js(t)?en:$n;return e=pi(e,n,3),i(t,function(t,n,i){return!e(t,n,i)})}function Hr(t,e,n){if(n?$i(t,e,n):null==e){t=Ei(t);var i=t.length;return i>0?t[Rn(0,i-1)]:w}var r=Fr(t);return r.length=ms(0>e?0:+e||0,r.length),r}function Fr(t){t=Ei(t);for(var e=-1,n=t.length,i=Ea(n);++e<n;){var r=Rn(0,e);e!=r&&(i[e]=i[r]),i[r]=t[e]}return i}function Wr(t){var e=t?t.length:0;return ki(e)?e:Us(t).length}function Lr(t,e,n){var i=js(t)?ln:Vn;return("function"!=typeof e||"undefined"!=typeof n)&&(e=pi(e,n,3)),i(t,e)}function zr(t,e,i){var r=-1,o=t?t.length:0,a=ki(o)?Ea(o):[];return i&&$i(t,e,i)&&(e=null),e=pi(e,i,3),bn(t,function(t,n,i){a[++r]={criteria:e(t,n,i),index:r,value:t}}),n(a,s)}function Rr(t){var e=arguments;e.length>3&&$i(e[1],e[2],e[3])&&(e=[t,e[1]]);var i=-1,r=t?t.length:0,o=_n(e,!1,!1,1),a=ki(r)?Ea(r):[];return bn(t,function(t){for(var e=o.length,n=Ea(e);e--;)n[e]=null==t?w:t[o[e]];a[++i]={criteria:n,index:i,value:t}}),n(a,l)}function jr(t,e){return _r(t,Hn(e))}function qr(t,e){if(!xo(e)){if(!xo(t))throw new za(L);var n=t;t=e,e=n}return t=fs(t=+t)?t:0,function(){return--t<1?e.apply(this,arguments):void 0}}function Vr(t,e,n){return n&&$i(t,e,n)&&(e=null),e=t&&null==e?t.length:gs(+e||0,0),ui(t,E,null,null,null,null,e)}function Br(t,e){var n;if(!xo(e)){if(!xo(t))throw new za(L);var i=t;t=e,e=i}return function(){return--t>0?n=e.apply(this,arguments):e=null,n}}function Ur(t,e){var n=k;if(arguments.length>2){var i=qn(arguments,2),r=g(i,Ur.placeholder);n|=S}return ui(t,n,e,i,r)}function Yr(t){return pn(t,arguments.length>1?_n(arguments,!1,!1,1):Ro(t))}function Gr(t,e){var n=k|_;if(arguments.length>2){var i=qn(arguments,2),r=g(i,Gr.placeholder);n|=S}return ui(e,n,t,i,r)}function Xr(t,e,n){n&&$i(t,e,n)&&(e=null);var i=ui(t,M,null,null,null,null,null,e);return i.placeholder=Xr.placeholder,i}function Kr(t,e,n){n&&$i(t,e,n)&&(e=null);var i=ui(t,D,null,null,null,null,null,e);return i.placeholder=Kr.placeholder,i}function Zr(t,e,n){function i(){h&&ts(h),l&&ts(l),l=h=f=w}function r(){var n=e-(Rs()-c);if(0>=n||n>e){l&&ts(l);var i=f;l=h=f=w,i&&(p=Rs(),u=t.apply(d,s),h||l||(s=d=null))}else h=as(r,n)}function o(){h&&ts(h),l=h=f=w,(m||g!==e)&&(p=Rs(),u=t.apply(d,s),h||l||(s=d=null))}function a(){if(s=arguments,c=Rs(),d=this,f=m&&(h||!v),g===!1)var n=v&&!h;else{l||v||(p=c);var i=g-(c-p),a=0>=i||i>g;a?(l&&(l=ts(l)),p=c,u=t.apply(d,s)):l||(l=as(o,i))}return a&&h?h=ts(h):h||e===g||(h=as(r,e)),n&&(a=!0,u=t.apply(d,s)),!a||h||l||(s=d=null),u}var s,l,u,c,d,h,f,p=0,g=!1,m=!0;if(!xo(t))throw new za(L);if(e=0>e?0:e,n===!0){var v=!0;m=!1}else wo(n)&&(v=n.leading,g="maxWait"in n&&gs(+n.maxWait||0,e),m="trailing"in n?n.trailing:m);return a.cancel=i,a}function Qr(t){return vn(t,1,arguments,1)}function Jr(t,e){return vn(t,e,arguments,2)}function to(){var t=arguments,e=t.length;if(!e)return function(){};if(!tn(t,xo))throw new za(L);return function(){for(var n=0,i=t[n].apply(this,arguments);++n<e;)i=t[n].call(this,i);return i}}function eo(){var t=arguments,e=t.length-1;if(0>e)return function(){};if(!tn(t,xo))throw new za(L);return function(){for(var n=e,i=t[n].apply(this,arguments);n--;)i=t[n].call(this,i);return i}}function no(t,e){if(!xo(t)||e&&!xo(e))throw new za(L);var n=function(){var i=n.cache,r=e?e.apply(this,arguments):arguments[0];if(i.has(r))return i.get(r);var o=t.apply(this,arguments);return i.set(r,o),o};return n.cache=new no.Cache,n}function io(t){if(!xo(t))throw new za(L);return function(){return!t.apply(this,arguments)}}function ro(t){return Br(t,2)}function oo(t){var e=qn(arguments,1),n=g(e,oo.placeholder);return ui(t,S,null,e,n)}function ao(t){var e=qn(arguments,1),n=g(e,ao.placeholder);return ui(t,T,null,e,n)}function so(t){var e=_n(arguments,!1,!1,1);return ui(t,A,null,null,null,e)}function lo(t,e,n){var i=!0,r=!0;if(!xo(t))throw new za(L);return n===!1?i=!1:wo(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),Fe.leading=i,Fe.maxWait=+e,Fe.trailing=r,Zr(t,e,Fe)}function uo(t,e){return e=null==e?wa:e,ui(e,S,null,[t],[])}function co(t,e,n,i){return"boolean"!=typeof e&&null!=e&&(i=n,n=$i(t,e,i)?null:e,e=!1),n="function"==typeof n&&Kn(n,i,1),mn(t,e,n)}function ho(t,e,n){return e="function"==typeof e&&Kn(e,n,1),mn(t,!0,e)}function fo(t){var e=f(t)?t.length:w;return ki(e)&&Ga.call(t)==R||!1}function po(t){return t===!0||t===!1||f(t)&&Ga.call(t)==q||!1}function go(t){return f(t)&&Ga.call(t)==V||!1}function mo(t){return t&&1===t.nodeType&&f(t)&&Ga.call(t).indexOf("Element")>-1||!1}function vo(t){if(null==t)return!0;var e=t.length;return ki(e)&&(js(t)||So(t)||fo(t)||f(t)&&xo(t.splice))?!e:!Us(t).length}function yo(t,e,n,i){if(n="function"==typeof n&&Kn(n,i,3),!n&&_i(t)&&_i(e))return t===e;var r=n?n(t,e):w;return"undefined"==typeof r?On(t,e,n):!!r}function bo(t){return f(t)&&"string"==typeof t.message&&Ga.call(t)==B||!1}function xo(t){return"function"==typeof t||!1}function wo(t){var e=typeof t;return"function"==e||t&&"object"==e||!1}function $o(t,e,n,i){var r=Us(e),o=r.length;if(n="function"==typeof n&&Kn(n,i,3),!n&&1==o){var a=r[0],s=e[a];if(_i(s))return null!=t&&s===t[a]&&Ua.call(t,a)}for(var l=Ea(o),u=Ea(o);o--;)s=l[o]=e[r[o]],u[o]=_i(s);return In(t,r,l,u,n)}function ko(t){return Mo(t)&&t!=+t}function _o(t){return null==t?!1:Ga.call(t)==U?Ka.test(Va.call(t)):f(t)&&_e.test(t)||!1}function Co(t){return null===t}function Mo(t){return"number"==typeof t||f(t)&&Ga.call(t)==G||!1}function Do(t){return f(t)&&Ga.call(t)==K||!1}function So(t){return"string"==typeof t||f(t)&&Ga.call(t)==Q||!1
}function To(t){return f(t)&&ki(t.length)&&Pe[Ga.call(t)]||!1}function Ao(t){return"undefined"==typeof t}function Eo(t){var e=t?t.length:0;return ki(e)?e?Ze(t):[]:Zo(t)}function Oo(t){return fn(t,Vo(t))}function No(t,e,n){var i=As(t);return n&&$i(t,e,n)&&(e=null),e?fn(e,i,Us(e)):i}function Io(t){if(null==t)return t;var e=Ze(arguments);return e.push(un),Bs.apply(w,e)}function Po(t,e,n){return e=pi(e,n,3),kn(t,e,Sn,!0)}function Ho(t,e,n){return e=pi(e,n,3),kn(t,e,Tn,!0)}function Fo(t,e,n){return("function"!=typeof e||"undefined"!=typeof n)&&(e=Kn(e,n,3)),Cn(t,e,Vo)}function Wo(t,e,n){return e=Kn(e,n,3),Mn(t,e,Vo)}function Lo(t,e,n){return("function"!=typeof e||"undefined"!=typeof n)&&(e=Kn(e,n,3)),Sn(t,e)}function zo(t,e,n){return e=Kn(e,n,3),Mn(t,e,Us)}function Ro(t){return An(t,Vo(t))}function jo(t,e){return t?Ua.call(t,e):!1}function qo(t,e,n){n&&$i(t,e,n)&&(e=null);for(var i=-1,r=Us(t),o=r.length,a={};++i<o;){var s=r[i],l=t[s];e?Ua.call(a,l)?a[l].push(s):a[l]=[s]:a[l]=s}return a}function Vo(t){if(null==t)return[];wo(t)||(t=Fa(t));var e=t.length;e=e&&ki(e)&&(js(t)||Ts.nonEnumArgs&&fo(t))&&e||0;for(var n=t.constructor,i=-1,r="function"==typeof n&&n.prototype==t,o=Ea(e),a=e>0;++i<e;)o[i]=i+"";for(var s in t)a&&wi(s,e)||"constructor"==s&&(r||!Ua.call(t,s))||o.push(s);return o}function Bo(t,e,n){var i={};return e=pi(e,n,3),Sn(t,function(t,n,r){i[n]=e(t,n,r)}),i}function Uo(t,e,n){if(null==t)return{};if("function"!=typeof e){var i=nn(_n(arguments,!1,!1,1),La);return Mi(t,yn(Vo(t),i))}return e=Kn(e,n,3),Di(t,function(t,n,i){return!e(t,n,i)})}function Yo(t){for(var e=-1,n=Us(t),i=n.length,r=Ea(i);++e<i;){var o=n[e];r[e]=[o,t[o]]}return r}function Go(t,e,n){return null==t?{}:"function"==typeof e?Di(t,Kn(e,n,3)):Mi(t,_n(arguments,!1,!1,1))}function Xo(t,e,n){var i=null==t?w:t[e];return"undefined"==typeof i&&(i=n),xo(i)?i.call(t):i}function Ko(t,e,n,i){var r=js(t)||To(t);if(e=pi(e,i,4),null==n)if(r||wo(t)){var o=t.constructor;n=r?js(t)?new o:[]:As("function"==typeof o&&o.prototype)}else n={};return(r?Qe:Sn)(t,function(t,i,r){return e(n,t,i,r)}),n}function Zo(t){return Un(t,Us(t))}function Qo(t){return Un(t,Vo(t))}function Jo(t,e,n){n&&$i(t,e,n)&&(e=n=null);var i=null==t,r=null==e;if(null==n&&(r&&"boolean"==typeof t?(n=t,t=1):"boolean"==typeof e&&(n=e,r=!0)),i&&r&&(e=1,r=!1),t=+t||0,r?(e=t,t=0):e=+e||0,n||t%1||e%1){var o=xs();return ms(t+o*(e-t+parseFloat("1e-"+((o+"").length-1))),e)}return Rn(t,e)}function ta(t){return t=i(t),t&&t.charAt(0).toUpperCase()+t.slice(1)}function ea(t){return t=i(t),t&&t.replace(Ce,u)}function na(t,e,n){t=i(t),e+="";var r=t.length;return n=("undefined"==typeof n?r:ms(0>n?0:+n||0,r))-e.length,n>=0&&t.indexOf(e,n)==n}function ia(t){return t=i(t),t&&me.test(t)?t.replace(pe,c):t}function ra(t){return t=i(t),t&&Se.test(t)?t.replace(De,"\\$&"):t}function oa(t,e,n){t=i(t),e=+e;var r=t.length;if(r>=e||!fs(e))return t;var o=(e-r)/2,a=es(o),s=Ja(o);return n=si("",s,n),n.slice(0,a)+t+n}function aa(t,e,n){return t=i(t),t&&si(t,e,n)+t}function sa(t,e,n){return t=i(t),t&&t+si(t,e,n)}function la(t,e,n){return n&&$i(t,e,n)&&(e=0),bs(t,e)}function ua(t,e){var n="";if(t=i(t),e=+e,1>e||!t||!fs(e))return n;do e%2&&(n+=t),e=es(e/2),t+=t;while(e);return n}function ca(t,e,n){return t=i(t),n=null==n?0:ms(0>n?0:+n||0,t.length),t.lastIndexOf(e,n)==n}function da(t,e,n){var r=Y.templateSettings;n&&$i(t,e,n)&&(e=n=null),t=i(t),e=dn(dn({},n||e),r,cn);var o,a,s=dn(dn({},e.imports),r.imports,cn),l=Us(s),u=Un(s,l),c=0,h=e.interpolate||Me,f="__p += '",p=Wa((e.escape||Me).source+"|"+h.source+"|"+(h===be?xe:Me).source+"|"+(e.evaluate||Me).source+"|$","g"),g="//# sourceURL="+("sourceURL"in e?e.sourceURL:"lodash.templateSources["+ ++Ie+"]")+"\n";t.replace(p,function(e,n,i,r,s,l){return i||(i=r),f+=t.slice(c,l).replace(Ae,d),n&&(o=!0,f+="' +\n__e("+n+") +\n'"),s&&(a=!0,f+="';\n"+s+";\n__p += '"),i&&(f+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),c=l+e.length,e}),f+="';\n";var m=e.variable;m||(f="with (obj) {\n"+f+"\n}\n"),f=(a?f.replace(ce,""):f).replace(de,"$1").replace(he,"$1;"),f="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var v=ya(function(){return Ia(l,g+"return "+f).apply(w,u)});if(v.source=f,bo(v))throw v;return v}function ha(t,e,n){var r=t;return(t=i(t))?(n?$i(r,e,n):null==e)?t.slice(v(t),y(t)+1):(e+="",t.slice(o(t,e),a(t,e)+1)):t}function fa(t,e,n){var r=t;return t=i(t),t?t.slice((n?$i(r,e,n):null==e)?v(t):o(t,e+"")):t}function pa(t,e,n){var r=t;return t=i(t),t?(n?$i(r,e,n):null==e)?t.slice(0,y(t)+1):t.slice(0,a(t,e+"")+1):t}function ga(t,e,n){n&&$i(t,e,n)&&(e=null);var r=O,o=N;if(null!=e)if(wo(e)){var a="separator"in e?e.separator:a;r="length"in e?+e.length||0:r,o="omission"in e?i(e.omission):o}else r=+e||0;if(t=i(t),r>=t.length)return t;var s=r-o.length;if(1>s)return o;var l=t.slice(0,s);if(null==a)return l+o;if(Do(a)){if(t.slice(s).search(a)){var u,c,d=t.slice(0,s);for(a.global||(a=Wa(a.source,(we.exec(a)||"")+"g")),a.lastIndex=0;u=a.exec(d);)c=u.index;l=l.slice(0,null==c?s:c)}}else if(t.indexOf(a,s)!=s){var h=l.lastIndexOf(a);h>-1&&(l=l.slice(0,h))}return l+o}function ma(t){return t=i(t),t&&ge.test(t)?t.replace(fe,b):t}function va(t,e,n){return n&&$i(t,e,n)&&(e=null),t=i(t),t.match(e||Ee)||[]}function ya(t){try{return t()}catch(e){return bo(e)?e:Na(e)}}function ba(t,e,n){return n&&$i(t,e,n)&&(e=null),f(t)?$a(t):gn(t,e)}function xa(t){return function(){return t}}function wa(t){return t}function $a(t){return Hn(mn(t,!0))}function ka(t,e,n){if(null==n){var i=wo(e),r=i&&Us(e),o=r&&r.length&&An(e,r);(o?o.length:i)||(o=!1,n=e,e=t,t=this)}o||(o=An(e,Us(e)));var a=!0,s=-1,l=xo(t),u=o.length;n===!1?a=!1:wo(n)&&"chain"in n&&(a=n.chain);for(;++s<u;){var c=o[s],d=e[c];t[c]=d,l&&(t.prototype[c]=function(e){return function(){var n=this.__chain__;if(a||n){var i=t(this.__wrapped__);return(i.__actions__=Ze(this.__actions__)).push({func:e,args:arguments,thisArg:t}),i.__chain__=n,i}var r=[this.value()];return is.apply(r,arguments),e.apply(t,r)}}(d))}return t}function _a(){return p._=Xa,this}function Ca(){}function Ma(t){return Ln(t+"")}function Da(t){return function(e){return null==t?w:t[e]}}function Sa(t,e,n){n&&$i(t,e,n)&&(e=n=null),t=+t||0,n=null==n?1:+n||0,null==e?(e=t,t=0):e=+e||0;for(var i=-1,r=gs(Ja((e-t)/(n||1)),0),o=Ea(r);++i<r;)o[i]=t,t+=n;return o}function Ta(t,e,n){if(t=+t,1>t||!fs(t))return[];var i=-1,r=Ea(ms(t,ks));for(e=Kn(e,n,1);++i<t;)ks>i?r[i]=e(i):e(i);return r}function Aa(t){var e=++Ya;return i(t)+e}p=p?Ge.defaults(qe.Object(),p,Ge.pick(qe,Ne)):qe;var Ea=p.Array,Oa=p.Date,Na=p.Error,Ia=p.Function,Pa=p.Math,Ha=p.Number,Fa=p.Object,Wa=p.RegExp,La=p.String,za=p.TypeError,Ra=Ea.prototype,ja=Fa.prototype,qa=(qa=p.window)&&qa.document,Va=Ia.prototype.toString,Ba=Ln("length"),Ua=ja.hasOwnProperty,Ya=0,Ga=ja.toString,Xa=p._,Ka=Wa("^"+ra(Ga).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Za=_o(Za=p.ArrayBuffer)&&Za,Qa=_o(Qa=Za&&new Za(0).slice)&&Qa,Ja=Pa.ceil,ts=p.clearTimeout,es=Pa.floor,ns=_o(ns=Fa.getPrototypeOf)&&ns,is=Ra.push,rs=ja.propertyIsEnumerable,os=_o(os=p.Set)&&os,as=p.setTimeout,ss=Ra.splice,ls=_o(ls=p.Uint8Array)&&ls,us=(Ra.unshift,_o(us=p.WeakMap)&&us),cs=function(){try{var t=_o(t=p.Float64Array)&&t,e=new t(new Za(10),0,1)&&t}catch(n){}return e}(),ds=_o(ds=Ea.isArray)&&ds,hs=_o(hs=Fa.create)&&hs,fs=p.isFinite,ps=_o(ps=Fa.keys)&&ps,gs=Pa.max,ms=Pa.min,vs=_o(vs=Oa.now)&&vs,ys=_o(ys=Ha.isFinite)&&ys,bs=p.parseInt,xs=Pa.random,ws=Ha.NEGATIVE_INFINITY,$s=Ha.POSITIVE_INFINITY,ks=Pa.pow(2,32)-1,_s=ks-1,Cs=ks>>>1,Ms=cs?cs.BYTES_PER_ELEMENT:0,Ds=Pa.pow(2,53)-1,Ss=us&&new us,Ts=Y.support={};!function(){Ts.funcDecomp=!_o(p.WinRTError)&&Te.test(x),Ts.funcNames="string"==typeof Ia.name;try{Ts.dom=11===qa.createDocumentFragment().nodeType}catch(t){Ts.dom=!1}try{Ts.nonEnumArgs=!rs.call(arguments,1)}catch(t){Ts.nonEnumArgs=!0}}(0,0),Y.templateSettings={escape:ve,evaluate:ye,interpolate:be,variable:"",imports:{_:Y}};var As=function(){function t(){}return function(e){if(wo(e)){t.prototype=e;var n=new t;t.prototype=null}return n||p.Object()}}(),Es=Ss?function(t,e){return Ss.set(t,e),t}:wa;Qa||(Zn=Za&&ls?function(t){var e=t.byteLength,n=cs?es(e/Ms):0,i=n*Ms,r=new Za(e);if(n){var o=new cs(r,0,n);o.set(new cs(t,0,n))}return e!=i&&(o=new ls(r,i),o.set(new ls(t,i))),r}:xa(null));var Os=hs&&os?function(t){return new Ye(t)}:xa(null),Ns=Ss?function(t){return Ss.get(t)}:Ca,Is=function(){var t=0,e=0;return function(n,i){var r=Rs(),o=P-(r-e);if(e=r,o>0){if(++t>=I)return n}else t=0;return Es(n,i)}}(),Ps=ti(function(t,e,n){Ua.call(t,n)?++t[n]:t[n]=1}),Hs=ti(function(t,e,n){Ua.call(t,n)?t[n].push(e):t[n]=[e]}),Fs=ti(function(t,e,n){t[n]=e}),Ws=oi(rn),Ls=oi(on,!0),zs=ti(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]}),Rs=vs||function(){return(new Oa).getTime()},js=ds||function(t){return f(t)&&ki(t.length)&&Ga.call(t)==j||!1};Ts.dom||(mo=function(t){return t&&1===t.nodeType&&f(t)&&!Vs(t)||!1});var qs=ys||function(t){return"number"==typeof t&&fs(t)};(xo(/x/)||ls&&!xo(ls))&&(xo=function(t){return Ga.call(t)==U});var Vs=ns?function(t){if(!t||Ga.call(t)!=X)return!1;var e=t.valueOf,n=_o(e)&&(n=ns(e))&&ns(n);return n?t==n||ns(t)==n:Ti(t)}:Ti,Bs=ei(dn),Us=ps?function(t){if(t)var e=t.constructor,n=t.length;return"function"==typeof e&&e.prototype===t||"function"!=typeof t&&n&&ki(n)?Ai(t):wo(t)?ps(t):[]}:Ai,Ys=ei(Fn),Gs=ii(function(t,e,n){return e=e.toLowerCase(),t+(n?e.charAt(0).toUpperCase()+e.slice(1):e)}),Xs=ii(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()});8!=bs(Oe+"08")&&(la=function(t,e,n){return(n?$i(t,e,n):null==e)?e=0:e&&(e=+e),t=ha(t),bs(t,e||(ke.test(t)?16:10))});var Ks=ii(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}),Zs=ii(function(t,e,n){return t+(n?" ":"")+(e.charAt(0).toUpperCase()+e.slice(1))});return Z.prototype=Y.prototype,Re.prototype["delete"]=je,Re.prototype.get=Ve,Re.prototype.has=Be,Re.prototype.set=Ue,Ye.prototype.push=Ke,no.Cache=Re,Y.after=qr,Y.ary=Vr,Y.assign=Bs,Y.at=wr,Y.before=Br,Y.bind=Ur,Y.bindAll=Yr,Y.bindKey=Gr,Y.callback=ba,Y.chain=pr,Y.chunk=Ni,Y.compact=Ii,Y.constant=xa,Y.countBy=Ps,Y.create=No,Y.curry=Xr,Y.curryRight=Kr,Y.debounce=Zr,Y.defaults=Io,Y.defer=Qr,Y.delay=Jr,Y.difference=Pi,Y.drop=Hi,Y.dropRight=Fi,Y.dropRightWhile=Wi,Y.dropWhile=Li,Y.filter=_r,Y.flatten=qi,Y.flattenDeep=Vi,Y.flow=to,Y.flowRight=eo,Y.forEach=Sr,Y.forEachRight=Tr,Y.forIn=Fo,Y.forInRight=Wo,Y.forOwn=Lo,Y.forOwnRight=zo,Y.functions=Ro,Y.groupBy=Hs,Y.indexBy=Fs,Y.initial=Ui,Y.intersection=Yi,Y.invert=qo,Y.invoke=Ar,Y.keys=Us,Y.keysIn=Vo,Y.map=Er,Y.mapValues=Bo,Y.matches=$a,Y.memoize=no,Y.merge=Ys,Y.mixin=ka,Y.negate=io,Y.omit=Uo,Y.once=ro,Y.pairs=Yo,Y.partial=oo,Y.partialRight=ao,Y.partition=zs,Y.pick=Go,Y.pluck=Or,Y.property=Ma,Y.propertyOf=Da,Y.pull=Ki,Y.pullAt=Zi,Y.range=Sa,Y.rearg=so,Y.reject=Pr,Y.remove=Qi,Y.rest=Ji,Y.shuffle=Fr,Y.slice=tr,Y.sortBy=zr,Y.sortByAll=Rr,Y.take=ir,Y.takeRight=rr,Y.takeRightWhile=or,Y.takeWhile=ar,Y.tap=gr,Y.throttle=lo,Y.thru=mr,Y.times=Ta,Y.toArray=Eo,Y.toPlainObject=Oo,Y.transform=Ko,Y.union=sr,Y.uniq=lr,Y.unzip=ur,Y.values=Zo,Y.valuesIn=Qo,Y.where=jr,Y.without=cr,Y.wrap=uo,Y.xor=dr,Y.zip=hr,Y.zipObject=fr,Y.backflow=eo,Y.collect=Er,Y.compose=eo,Y.each=Sr,Y.eachRight=Tr,Y.extend=Bs,Y.iteratee=ba,Y.methods=Ro,Y.object=fr,Y.select=_r,Y.tail=Ji,Y.unique=lr,ka(Y,Y),Y.attempt=ya,Y.camelCase=Gs,Y.capitalize=ta,Y.clone=co,Y.cloneDeep=ho,Y.deburr=ea,Y.endsWith=na,Y.escape=ia,Y.escapeRegExp=ra,Y.every=kr,Y.find=Cr,Y.findIndex=zi,Y.findKey=Po,Y.findLast=Mr,Y.findLastIndex=Ri,Y.findLastKey=Ho,Y.findWhere=Dr,Y.first=ji,Y.has=jo,Y.identity=wa,Y.includes=$r,Y.indexOf=Bi,Y.isArguments=fo,Y.isArray=js,Y.isBoolean=po,Y.isDate=go,Y.isElement=mo,Y.isEmpty=vo,Y.isEqual=yo,Y.isError=bo,Y.isFinite=qs,Y.isFunction=xo,Y.isMatch=$o,Y.isNaN=ko,Y.isNative=_o,Y.isNull=Co,Y.isNumber=Mo,Y.isObject=wo,Y.isPlainObject=Vs,Y.isRegExp=Do,Y.isString=So,Y.isTypedArray=To,Y.isUndefined=Ao,Y.kebabCase=Xs,Y.last=Gi,Y.lastIndexOf=Xi,Y.max=Ws,Y.min=Ls,Y.noConflict=_a,Y.noop=Ca,Y.now=Rs,Y.pad=oa,Y.padLeft=aa,Y.padRight=sa,Y.parseInt=la,Y.random=Jo,Y.reduce=Nr,Y.reduceRight=Ir,Y.repeat=ua,Y.result=Xo,Y.runInContext=x,Y.size=Wr,Y.snakeCase=Ks,Y.some=Lr,Y.sortedIndex=er,Y.sortedLastIndex=nr,Y.startCase=Zs,Y.startsWith=ca,Y.template=da,Y.trim=ha,Y.trimLeft=fa,Y.trimRight=pa,Y.trunc=ga,Y.unescape=ma,Y.uniqueId=Aa,Y.words=va,Y.all=kr,Y.any=Lr,Y.contains=$r,Y.detect=Cr,Y.foldl=Nr,Y.foldr=Ir,Y.head=ji,Y.include=$r,Y.inject=Nr,ka(Y,function(){var t={};return Sn(Y,function(e,n){Y.prototype[n]||(t[n]=e)}),t}(),!1),Y.sample=Hr,Y.prototype.sample=function(t){return this.__chain__||null!=t?this.thru(function(e){return Hr(e,t)}):Hr(this.value())},Y.VERSION=$,Qe(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){Y[t].placeholder=Y}),Qe(["filter","map","takeWhile"],function(t,e){var n=e==H;J.prototype[t]=function(t,i){var r=this.clone(),o=r.filtered,a=r.iteratees||(r.iteratees=[]);return r.filtered=o||n||e==W&&r.dir<0,a.push({iteratee:pi(t,i,3),type:e}),r}}),Qe(["drop","take"],function(t,e){var n=t+"Count",i=t+"While";J.prototype[t]=function(i){i=null==i?1:gs(+i||0,0);var r=this.clone();if(r.filtered){var o=r[n];r[n]=e?ms(o,i):o+i}else{var a=r.views||(r.views=[]);a.push({size:i,type:t+(r.dir<0?"Right":"")})}return r},J.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()},J.prototype[t+"RightWhile"]=function(t,e){return this.reverse()[i](t,e).reverse()}}),Qe(["first","last"],function(t,e){var n="take"+(e?"Right":"");J.prototype[t]=function(){return this[n](1).value()[0]}}),Qe(["initial","rest"],function(t,e){var n="drop"+(e?"":"Right");J.prototype[t]=function(){return this[n](1)}}),Qe(["pluck","where"],function(t,e){var n=e?"filter":"map",i=e?Hn:Ln;J.prototype[t]=function(t){return this[n](i(e?t:t+""))}}),J.prototype.dropWhile=function(t,e){var n,i,r=this.dir<0;return t=pi(t,e,3),this.filter(function(e,o,a){return n=n&&(r?i>o:o>i),i=o,n||(n=!t(e,o,a))})},J.prototype.reject=function(t,e){return t=pi(t,e,3),this.filter(function(e,n,i){return!t(e,n,i)})},J.prototype.slice=function(t,e){t=null==t?0:+t||0;var n=0>t?this.takeRight(-t):this.drop(t);return"undefined"!=typeof e&&(e=+e||0,n=0>e?n.dropRight(-e):n.take(e-t)),n},Sn(J.prototype,function(t,e){var n=Y[e],i=/^(?:first|last)$/.test(e);Y.prototype[e]=function(){var e=this.__wrapped__,r=arguments,o=this.__chain__,a=!!this.__actions__.length,s=e instanceof J,l=s&&!a;if(i&&!o)return l?t.call(e):n.call(Y,this.value());var u=function(t){var e=[t];return is.apply(e,r),n.apply(Y,e)};if(s||js(e)){var c=l?e:new J(this),d=t.apply(c,r);if(!i&&(a||d.actions)){var h=d.actions||(d.actions=[]);h.push({func:mr,args:[u],thisArg:Y})}return new Z(d,o)}return this.thru(u)}}),Qe(["concat","join","pop","push","shift","sort","splice","unshift"],function(t){var e=Ra[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:join|pop|shift)$/.test(t);Y.prototype[t]=function(){var t=arguments;return i&&!this.__chain__?e.apply(this.value(),t):this[n](function(n){return e.apply(n,t)})}}),J.prototype.clone=We,J.prototype.reverse=Le,J.prototype.value=ze,Y.prototype.chain=vr,Y.prototype.reverse=yr,Y.prototype.toString=br,Y.prototype.toJSON=Y.prototype.valueOf=Y.prototype.value=xr,Y.prototype.collect=Y.prototype.map,Y.prototype.head=Y.prototype.first,Y.prototype.select=Y.prototype.filter,Y.prototype.tail=Y.prototype.rest,Y}var w,$="3.1.0",k=1,_=2,C=4,M=8,D=16,S=32,T=64,A=128,E=256,O=30,N="...",I=150,P=16,H=0,F=1,W=2,L="Expected a function",z="__lodash_placeholder__",R="[object Arguments]",j="[object Array]",q="[object Boolean]",V="[object Date]",B="[object Error]",U="[object Function]",Y="[object Map]",G="[object Number]",X="[object Object]",K="[object RegExp]",Z="[object Set]",Q="[object String]",J="[object WeakMap]",te="[object ArrayBuffer]",ee="[object Float32Array]",ne="[object Float64Array]",ie="[object Int8Array]",re="[object Int16Array]",oe="[object Int32Array]",ae="[object Uint8Array]",se="[object Uint8ClampedArray]",le="[object Uint16Array]",ue="[object Uint32Array]",ce=/\b__p \+= '';/g,de=/\b(__p \+=) '' \+/g,he=/(__e\(.*?\)|\b__t\)) \+\n'';/g,fe=/&(?:amp|lt|gt|quot|#39|#96);/g,pe=/[&<>"'`]/g,ge=RegExp(fe.source),me=RegExp(pe.source),ve=/<%-([\s\S]+?)%>/g,ye=/<%([\s\S]+?)%>/g,be=/<%=([\s\S]+?)%>/g,xe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,we=/\w*$/,$e=/^\s*function[ \n\r\t]+\w/,ke=/^0[xX]/,_e=/^\[object .+?Constructor\]$/,Ce=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Me=/($^)/,De=/[.*+?^${}()|[\]\/\\]/g,Se=RegExp(De.source),Te=/\bthis\b/,Ae=/['\n\r\u2028\u2029\\]/g,Ee=function(){var t="[A-Z\\xc0-\\xd6\\xd8-\\xde]",e="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(t+"{2,}(?="+t+e+")|"+t+"?"+e+"|"+t+"+|[0-9]+","g")}(),Oe=" 	\f ﻿\n\r\u2028\u2029 ᠎             　",Ne=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","document","isFinite","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","window","WinRTError"],Ie=-1,Pe={};Pe[ee]=Pe[ne]=Pe[ie]=Pe[re]=Pe[oe]=Pe[ae]=Pe[se]=Pe[le]=Pe[ue]=!0,Pe[R]=Pe[j]=Pe[te]=Pe[q]=Pe[V]=Pe[B]=Pe[U]=Pe[Y]=Pe[G]=Pe[X]=Pe[K]=Pe[Z]=Pe[Q]=Pe[J]=!1;var He={};He[R]=He[j]=He[te]=He[q]=He[V]=He[ee]=He[ne]=He[ie]=He[re]=He[oe]=He[G]=He[X]=He[K]=He[Q]=He[ae]=He[se]=He[le]=He[ue]=!0,He[B]=He[U]=He[Y]=He[Z]=He[J]=!1;var Fe={leading:!1,maxWait:0,trailing:!1},We={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Le={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},ze={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},Re={"function":!0,object:!0},je={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},qe=Re[typeof window]&&window!==(this&&this.window)?window:this,Ve=Re[typeof exports]&&exports&&!exports.nodeType&&exports,Be=Re[typeof module]&&module&&!module.nodeType&&module,Ue=Ve&&Be&&"object"==typeof global&&global;!Ue||Ue.global!==Ue&&Ue.window!==Ue&&Ue.self!==Ue||(qe=Ue);var Ye=Be&&Be.exports===Ve&&Ve,Ge=x();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(qe._=Ge,define(function(){return Ge})):Ve&&Be?Ye?(Be.exports=Ge)._=Ge:Ve._=Ge:qe._=Ge}.call(this),angular.module("ui.dashboard",["ui.bootstrap","ui.sortable"]),angular.module("ui.dashboard").directive("dashboard",["WidgetModel","WidgetDefCollection","$modal","DashboardState","$log",function(t,e,n,i,r){return{restrict:"A",templateUrl:function(t,e){return e.templateUrl?e.templateUrl:"components/directives/dashboard/dashboard.html"},scope:!0,controller:["$scope","$attrs",function(t,e){var n={stringifyStorage:!0,hideWidgetSettings:!1,hideWidgetClose:!1,settingsModalOptions:{templateUrl:"components/directives/dashboard/widget-settings-template.html",controller:"WidgetSettingsCtrl"},onSettingsClose:function(t,e){jQuery.extend(!0,e,t)},onSettingsDismiss:function(t){r.info("widget settings were dismissed. Reason: ",t)}};t.options=t.$eval(e.dashboard),t.options.settingsModalOptions=t.options.settingsModalOptions||{},_.each(["settingsModalOptions"],function(e){t.options[e]=t.options[e]||{},_.defaults(t.options[e],n[e])}),_.defaults(t.options,n);var i={stop:function(){t.saveDashboard()},handle:".widget-header",distance:5};t.sortableOptions=angular.extend({},i,t.options.sortableOptions||{})}],link:function(r){function o(t){r.options.unsavedChangeCount=0,t&&t.length?r.loadWidgets(t):r.defaultWidgets?r.loadWidgets(r.defaultWidgets):r.clear(!0)}r.defaultWidgets=r.options.defaultWidgets,r.widgetDefs=new e(r.options.widgetDefinitions);var a=1;r.dashboardState=new i(r.options.storage,r.options.storageId,r.options.storageHash,r.widgetDefs,r.options.stringifyStorage),r.addWidget=function(e,n){"string"==typeof e&&(e={name:e});var i=r.widgetDefs.getByName(e.name);if(!i)throw"Widget "+e.name+" is not found.";e.title||i.title||(e.title="Widget "+a++);var o=new t(i,e);return r.widgets.push(o),n||r.saveDashboard(),o},r.removeWidget=function(t){r.widgets.splice(_.indexOf(r.widgets,t),1),r.saveDashboard()},r.openWidgetSettings=function(t){var e=_.defaults({scope:r},t.settingsModalOptions,r.options.settingsModalOptions);e.resolve={widget:function(){return t}};var i=n.open(e),o=t.onSettingsClose||r.options.onSettingsClose,a=t.onSettingsDismiss||r.options.onSettingsDismiss;i.result.then(function(e){o(e,t,r),r.$emit("widgetChanged",t)},function(t){a(t,r)})},r.clear=function(t){r.widgets=[],t!==!0&&r.saveDashboard()},r.addWidgetInternal=function(t,e){t.preventDefault(),r.addWidget(e)},r.saveDashboard=function(t){r.options.explicitSave?(angular.isNumber(r.options.unsavedChangeCount)||(r.options.unsavedChangeCount=0),t?(r.options.unsavedChangeCount=0,r.dashboardState.save(r.widgets)):++r.options.unsavedChangeCount):r.dashboardState.save(r.widgets)},r.externalSaveDashboard=function(){r.saveDashboard(!0)},r.loadWidgets=function(t){r.savedWidgetDefs=t,r.clear(!0),_.each(t,function(t){r.addWidget(t,!0)})},r.resetWidgetsToDefault=function(){r.loadWidgets(r.defaultWidgets),r.saveDashboard()};var s=r.dashboardState.load();angular.isArray(s)?o(s):s&&angular.isObject(s)&&angular.isFunction(s.then)?s.then(o,o):o(),r.options.addWidget=r.addWidget,r.options.loadWidgets=r.loadWidgets,r.options.saveDashboard=r.externalSaveDashboard,r.options.removeWidget=r.removeWidget,r.options.openWidgetSettings=r.openWidgetSettings,r.$on("widgetChanged",function(t){t.stopPropagation(),r.saveDashboard()})}}}]),angular.module("ui.dashboard").run(["$templateCache",function(t){t.put("components/directives/dashboard/altDashboard.html",'<div>\n    <div class="btn-toolbar" ng-if="!options.hideToolbar">\n        <div class="btn-group" ng-if="!options.widgetButtons">\n            <span class="dropdown" on-toggle="toggled(open)">\n              <button type="button" class="btn btn-primary dropdown-toggle" ng-disabled="disabled">\n                Button dropdown <span class="caret"></span>\n              </button>\n              <ul class="dropdown-menu" role="menu">\n                <li ng-repeat="widget in widgetDefs">\n                  <a href="#" ng-click="addWidgetInternal($event, widget);" class="dropdown-toggle">{{widget.name}}</a>\n                </li>\n              </ul>\n            </span>\n        </div>\n\n        <div class="btn-group" ng-if="options.widgetButtons">\n            <button ng-repeat="widget in widgetDefs"\n                    ng-click="addWidgetInternal($event, widget);" type="button" class="btn btn-primary">\n                {{widget.name}}\n            </button>\n        </div>\n\n        <button class="btn btn-warning" ng-click="resetWidgetsToDefault()">Default Widgets</button>\n\n        <button ng-if="options.storage && options.explicitSave" ng-click="options.saveDashboard()" class="btn btn-success" ng-hide="!options.unsavedChangeCount">{{ !options.unsavedChangeCount ? "Alternative - No Changes" : "Save" }}</button>\n\n        <button ng-click="clear();" ng-hide="!widgets.length" type="button" class="btn btn-info">Clear</button>\n    </div>\n\n    <div ui-sortable="sortableOptions" ng-model="widgets" class="dashboard-widget-area">\n        <div ng-repeat="widget in widgets" ng-style="widget.style" class="widget-container" widget>\n            <div class="widget panel panel-default">\n                <div class="widget-header panel-heading">\n                    <h3 class="panel-title">\n                        <span class="widget-title" ng-dblclick="editTitle(widget)" ng-hide="widget.editingTitle">{{widget.title}}</span>\n                        <form action="" class="widget-title" ng-show="widget.editingTitle" ng-submit="saveTitleEdit(widget)">\n                            <input type="text" ng-model="widget.title" class="form-control">\n                        </form>\n                        <span class="label label-primary" ng-if="!options.hideWidgetName">{{widget.name}}</span>\n                        <span ng-click="removeWidget(widget);" class="glyphicon glyphicon-remove" ng-if="!options.hideWidgetClose"></span>\n                        <span ng-click="openWidgetSettings(widget);" class="glyphicon glyphicon-cog" ng-if="!options.hideWidgetSettings"></span>\n                    </h3>\n                </div>\n                <div class="panel-body widget-content"></div>\n                <div class="widget-ew-resizer" ng-mousedown="grabResizer($event)"></div>\n            </div>\n        </div>\n    </div>\n</div>\n'),t.put("components/directives/dashboard/dashboard.html",'<div>\n    <div class="btn-toolbar" ng-if="!options.hideToolbar">\n        <div class="btn-group" ng-if="!options.widgetButtons">\n            <span class="dropdown" on-toggle="toggled(open)">\n              <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">\n                Button dropdown <span class="caret"></span>\n              </button>\n              <ul class="dropdown-menu" role="menu">\n                <li ng-repeat="widget in widgetDefs">\n                  <a href="#" ng-click="addWidgetInternal($event, widget);" class="dropdown-toggle"><span class="label label-primary">{{widget.name}}</span></a>\n                </li>\n              </ul>\n            </span>\n    </div>\n        <div class="btn-group" ng-if="options.widgetButtons">\n            <button ng-repeat="widget in widgetDefs"\n                    ng-click="addWidgetInternal($event, widget);" type="button" class="btn btn-primary">\n                {{widget.name}}\n            </button>\n        </div>\n\n        <button class="btn btn-warning" ng-click="resetWidgetsToDefault()">Default Widgets</button>\n\n        <button ng-if="options.storage && options.explicitSave" ng-click="options.saveDashboard()" class="btn btn-success" ng-disabled="!options.unsavedChangeCount">{{ !options.unsavedChangeCount ? "all saved" : "save changes (" + options.unsavedChangeCount + ")" }}</button>\n\n        <button ng-click="clear();" type="button" class="btn btn-info">Clear</button>\n    </div>\n\n    <div ui-sortable="sortableOptions" ng-model="widgets" class="dashboard-widget-area">\n        <div ng-repeat="widget in widgets" ng-style="widget.containerStyle" class="widget-container" widget>\n            <div class="widget panel panel-default">\n                <div class="widget-header panel-heading">\n                    <h3 class="panel-title">\n                        <span class="widget-title" ng-dblclick="editTitle(widget)" ng-hide="widget.editingTitle">{{widget.title}}</span>\n                        <form action="" class="widget-title" ng-show="widget.editingTitle" ng-submit="saveTitleEdit(widget)">\n                            <input type="text" ng-model="widget.title" class="form-control">\n                        </form>\n                        <span class="label label-primary" ng-if="!options.hideWidgetName">{{widget.name}}</span>\n                        <span ng-click="removeWidget(widget);" class="glyphicon glyphicon-remove" ng-if="!options.hideWidgetClose"></span>\n                        <span ng-click="openWidgetSettings(widget);" class="glyphicon glyphicon-cog" ng-if="!options.hideWidgetSettings"></span>\n                        <span ng-click="widget.contentStyle.display = widget.contentStyle.display === \'none\' ? \'block\' : \'none\'" class="glyphicon" ng-class="{\'glyphicon-plus\': widget.contentStyle.display === \'none\', \'glyphicon-minus\': widget.contentStyle.display !== \'none\' }"></span>\n                    </h3>\n                </div>\n                <div class="panel-body widget-content" ng-style="widget.contentStyle"></div>\n                <div class="widget-ew-resizer" ng-mousedown="grabResizer($event)"></div>\n                <div ng-if="widget.enableVerticalResize" class="widget-s-resizer" ng-mousedown="grabSouthResizer($event)"></div>\n            </div>\n        </div>\n    </div>\n</div>'),t.put("components/directives/dashboard/widget-settings-template.html",'<div class="modal-header">\n    <button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="cancel()">&times;</button>\n  <h3>Widget Options <small>{{widget.title}}</small></h3>\n</div>\n\n<div class="modal-body">\n    <form name="form" novalidate class="form-horizontal">\n        <div class="form-group">\n            <label for="widgetTitle" class="col-sm-2 control-label">Title</label>\n            <div class="col-sm-10">\n                <input type="text" class="form-control" name="widgetTitle" ng-model="result.title">\n            </div>\n        </div>\n        <div ng-if="widget.settingsModalOptions.partialTemplateUrl"\n             ng-include="widget.settingsModalOptions.partialTemplateUrl"></div>\n    </form>\n</div>\n\n<div class="modal-footer">\n    <button type="button" class="btn btn-default" ng-click="cancel()">Cancel</button>\n    <button type="button" class="btn btn-primary" ng-click="ok()">OK</button>\n</div>'),t.put("components/directives/dashboardLayouts/SaveChangesModal.html",'<div class="modal-header">\n    <button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="cancel()">&times;</button>\n  <h3>Unsaved Changes to "{{layout.title}}"</h3>\n</div>\n\n<div class="modal-body">\n    <p>You have {{layout.dashboard.unsavedChangeCount}} unsaved changes on this dashboard. Would you like to save them?</p>\n</div>\n\n<div class="modal-footer">\n    <button type="button" class="btn btn-default" ng-click="cancel()">Don\'t Save</button>\n    <button type="button" class="btn btn-primary" ng-click="ok()">Save</button>\n</div>'),t.put("components/directives/dashboardLayouts/dashboardLayouts.html",'<ul ui-sortable="sortableOptions" ng-model="layouts" class="nav nav-tabs layout-tabs">\n    <li ng-repeat="layout in layouts" ng-class="{ active: layout.active }">\n        <a ng-click="makeLayoutActive(layout)">\n            <span ng-dblclick="editTitle(layout)" ng-show="!layout.editingTitle">{{layout.title}}</span>\n            <form action="" class="layout-title" ng-show="layout.editingTitle" ng-submit="saveTitleEdit(layout)">\n                <input type="text" ng-model="layout.title" class="form-control" data-layout="{{layout.id}}">\n            </form>\n            <span ng-if="!layout.locked" ng-click="removeLayout(layout)" class="glyphicon glyphicon-remove remove-layout-icon"></span>\n            <!-- <span class="glyphicon glyphicon-pencil"></span> -->\n            <!-- <span class="glyphicon glyphicon-remove"></span> -->\n        </a>\n    </li>\n    <li>\n        <a ng-click="createNewLayout()">\n            <span class="glyphicon glyphicon-plus"></span>\n        </a>\n    </li>\n</ul>\n<div ng-repeat="layout in layouts | filter:isActive" dashboard="layout.dashboard" template-url="components/directives/dashboard/dashboard.html"></div>')}]),angular.module("ui.dashboard").directive("widget",["$injector",function(t){return{controller:"DashboardWidgetCtrl",link:function(e){var n=e.widget,i=n.dataModelType;if(i){var r;if(angular.isFunction(i))r=i;else{if(!angular.isString(i))throw new Error("widget dataModelType should be function or string");t.invoke([i,function(t){r=t}])}var o;o=n.dataModelArgs?new r(n.dataModelArgs):new r,n.dataModel=o,o.setup(n,e),o.init(),e.$on("$destroy",_.bind(o.destroy,o))}e.compileTemplate(),e.$emit("widgetAdded",n)}}}]),angular.module("ui.dashboard").controller("DashboardWidgetCtrl",["$scope","$element","$compile","$window","$timeout",function(t,e,n,i,r){t.status={isopen:!1},t.makeTemplateString=function(){var e=t.widget,n="";
return e.templateUrl?n="<div ng-include=\"'"+e.templateUrl+"'\"></div>":e.template?n=e.template:(n="<div "+e.directive,e.dataAttrName&&(e.attrs=e.attrs||{},e.attrs[e.dataAttrName]="widgetData"),e.attrs&&(e.attrs[e.directive]&&(n+='="'+e.attrs[e.directive]+'"'),_.each(e.attrs,function(t,i){i!==e.directive&&(n+=" "+i+'="'+t+'"')})),n+="></div>"),n},t.grabResizer=function(n){var r=t.widget,o=e.find(".widget");if(1===n.which){n.stopPropagation(),n.originalEvent.preventDefault();var a=n.clientX,s=o.width(),l=o.height(),u=r.containerStyle.width,c=r.widthUnits,d=parseFloat(u),h=angular.element('<div class="widget-resizer-marquee" style="height: '+l+"px; width: "+s+'px;"></div>');o.append(h);var f=d/s,p=function(t){var e=t.clientX,n=e-a,i=s+n;h.css("width",i+"px")},g=function(e){jQuery(i).off("mousemove",p),h.remove();var n=e.clientX,o=n-a,s=Math.round(o*f*100)/100,l=1*d+s;r.setWidth(l,c),t.$emit("widgetChanged",r),t.$apply(),t.$broadcast("widgetResized",{width:l})};jQuery(i).on("mousemove",p).one("mouseup",g)}},t.grabSouthResizer=function(n){var r=e.find(".widget");if(1===n.which){n.stopPropagation(),n.originalEvent.preventDefault();var o=n.clientY,a=r.width(),s=r.height(),l=angular.element('<div class="widget-resizer-marquee" style="height: '+s+"px; width: "+a+'px;"></div>');r.append(l);var u=function(t){var e=t.clientY,n=e-o,i=s+n;l.css("height",i+"px")},c=function(e){jQuery(i).off("mousemove",u),l.remove();var n=e.clientY,a=n-o,s=r.find(".widget-content"),c=a,d=parseInt(s.css("height"),10),h=d+c;t.widget.setHeight(h+"px"),t.$emit("widgetChanged",t.widget),t.$apply(),t.$broadcast("widgetResized",{height:h})};jQuery(i).on("mousemove",u).one("mouseup",c)}},t.editTitle=function(t){var n=e.find(".widget");t.editingTitle=!0,r(function(){n.find("form.widget-title input:eq(0)").focus()[0].setSelectionRange(0,9999)})},t.saveTitleEdit=function(e){e.editingTitle=!1,t.$emit("widgetChanged",e)},t.compileTemplate=function(){var i=t.findWidgetContainer(e),r=t.makeTemplateString(),o=angular.element(r);i.empty(),i.append(o),n(o)(t)},t.findWidgetContainer=function(t){return t.find(".widget-content")}}]),angular.module("ui.dashboard").directive("dashboardLayouts",["LayoutStorage","$timeout","$modal",function(t,e,n){return{scope:!0,templateUrl:function(t,e){return e.templateUrl?e.templateUrl:"components/directives/dashboardLayouts/dashboardLayouts.html"},link:function(i,r,o){i.options=i.$eval(o.dashboardLayouts);var a=new t(i.options);i.layouts=a.layouts,i.createNewLayout=function(){var t={title:"Custom",defaultWidgets:i.options.defaultWidgets||[]};return a.add(t),i.makeLayoutActive(t),a.save(),t},i.removeLayout=function(t){a.remove(t),a.save()},i.makeLayoutActive=function(t){var e=a.getActiveLayout();if(e&&e.dashboard.unsavedChangeCount){var r=n.open({templateUrl:"template/SaveChangesModal.html",resolve:{layout:function(){return t}},controller:"SaveChangesModalCtrl"});r.result.then(function(){e.dashboard.saveDashboard(),i._makeLayoutActive(t)},function(){i._makeLayoutActive(t)})}else i._makeLayoutActive(t)},i._makeLayoutActive=function(t){angular.forEach(i.layouts,function(e){e.active=e!==t?!1:!0}),a.save()},i.isActive=function(t){return!!t.active},i.editTitle=function(t){if(!t.locked){var n=r.find('input[data-layout="'+t.id+'"]');t.editingTitle=!0,e(function(){n.focus()[0].setSelectionRange(0,9999)})}},i.saveTitleEdit=function(t){t.editingTitle=!1,a.save()},i.options.saveLayouts=function(){a.save(!0)},i.options.addWidget=function(){var t=a.getActiveLayout();t&&t.dashboard.addWidget.apply(t.dashboard,arguments)},i.options.loadWidgets=function(){var t=a.getActiveLayout();t&&t.dashboard.loadWidgets.apply(t.dashboard,arguments)},i.options.saveDashboard=function(){var t=a.getActiveLayout();t&&t.dashboard.saveDashboard.apply(t.dashboard,arguments)};var s={stop:function(){i.options.saveLayouts()},distance:5};i.sortableOptions=angular.extend({},s,i.options.sortableOptions||{})}}}]),angular.module("ui.dashboard").controller("SaveChangesModalCtrl",["$scope","$modalInstance","layout",function(t,e,n){t.layout=n,t.ok=function(){e.close()},t.cancel=function(){e.dismiss()}}]),angular.module("ui.dashboard").controller("WidgetSettingsCtrl",["$scope","$modalInstance","widget",function(t,e,n){t.widget=n,t.result=jQuery.extend(!0,{},n),t.ok=function(){e.close(t.result)},t.cancel=function(){e.dismiss("cancel")}}]),angular.module("ui.dashboard").factory("WidgetModel",["$log",function(t){function e(){return{title:"Widget",style:{},size:{},enableVerticalResize:!0,containerStyle:{width:"33%"},contentStyle:{}}}function n(t,n){angular.extend(this,e(),_.merge(angular.copy(t),n)),this.updateContainerStyle(this.style),this.templateUrl||this.template||this.directive||(this.directive=t.name),this.size&&_.has(this.size,"height")&&this.setHeight(this.size.height),this.style&&_.has(this.style,"width")&&this.setWidth(this.style.width),this.size&&_.has(this.size,"width")&&this.setWidth(this.size.width)}return n.prototype={setWidth:function(e,n){return e=e.toString(),n=n||e.replace(/^[-\.\d]+/,"")||"%",this.widthUnits=n,e=parseFloat(e),0>e||isNaN(e)?(t.warn("malhar-angular-dashboard: setWidth was called when width was "+e),!1):("%"===n&&(e=Math.min(100,e),e=Math.max(0,e)),this.containerStyle.width=e+""+n,this.updateSize(this.containerStyle),!0)},setHeight:function(t){this.contentStyle.height=t,this.updateSize(this.contentStyle)},setStyle:function(t){this.style=t,this.updateContainerStyle(t)},updateSize:function(t){angular.extend(this.size,t)},updateContainerStyle:function(t){angular.extend(this.containerStyle,t)},serialize:function(){return _.pick(this,["title","name","style","size","dataModelOptions","attrs","storageHash"])}},n}]),angular.module("ui.dashboard").factory("WidgetDefCollection",function(){function t(t){return"function"==typeof t?new t:t}function e(e){e=e.map(t),this.push.apply(this,e);var n={};_.each(e,function(t){n[t.name]=t}),this.map=n}return e.prototype=Object.create(Array.prototype),e.prototype.getByName=function(t){return this.map[t]},e.prototype.add=function(e){e=t(e),this.push(e),this.map[e.name]=e},e}),angular.module("ui.dashboard").factory("WidgetDataModel",function(){function t(){}return t.prototype={setup:function(t,e){this.dataAttrName=t.dataAttrName,this.dataModelOptions=t.dataModelOptions,this.widgetScope=e},updateScope:function(t){this.widgetScope.widgetData=t},init:function(){},destroy:function(){}},t}),angular.module("ui.dashboard").factory("LayoutStorage",function(){function t(t){var n={storage:e,storageHash:"",stringifyStorage:!0};angular.extend(n,t),angular.extend(t,n),this.id=t.storageId,this.storage=t.storage,this.storageHash=t.storageHash,this.stringifyStorage=t.stringifyStorage,this.widgetDefinitions=t.widgetDefinitions,this.defaultLayouts=t.defaultLayouts,this.lockDefaultLayouts=t.lockDefaultLayouts,this.widgetButtons=t.widgetButtons,this.explicitSave=t.explicitSave,this.defaultWidgets=t.defaultWidgets,this.settingsModalOptions=t.settingsModalOptions,this.onSettingsClose=t.onSettingsClose,this.onSettingsDismiss=t.onSettingsDismiss,this.options=t,this.options.unsavedChangeCount=0,this.layouts=[],this.states={},this.load(),this._ensureActiveLayout()}var e={setItem:function(){},getItem:function(){},removeItem:function(){}};return t.prototype={add:function(t){angular.isArray(t)||(t=[t]);var e=this;angular.forEach(t,function(t){t.dashboard=t.dashboard||{},t.dashboard.storage=e,t.dashboard.storageId=t.id=e._getLayoutId.call(e,t),t.dashboard.widgetDefinitions=t.widgetDefinitions||e.widgetDefinitions,t.dashboard.stringifyStorage=!1,t.dashboard.defaultWidgets=t.defaultWidgets||e.defaultWidgets,t.dashboard.widgetButtons=e.widgetButtons,t.dashboard.explicitSave=e.explicitSave,t.dashboard.settingsModalOptions=e.settingsModalOptions,t.dashboard.onSettingsClose=e.onSettingsClose,t.dashboard.onSettingsDismiss=e.onSettingsDismiss,e.layouts.push(t)})},remove:function(t){var e=this.layouts.indexOf(t);if(e>=0&&(this.layouts.splice(e,1),delete this.states[t.id],t.active&&this.layouts.length)){var n=e>0?e-1:0;this.layouts[n].active=!0}},save:function(){var t={layouts:this._serializeLayouts(),states:this.states,storageHash:this.storageHash};this.stringifyStorage&&(t=JSON.stringify(t)),this.storage.setItem(this.id,t),this.options.unsavedChangeCount=0},load:function(){var t=this.storage.getItem(this.id);this.clear(),t?angular.isObject(t)&&angular.isFunction(t.then)?this._handleAsyncLoad(t):this._handleSyncLoad(t):this._addDefaultLayouts()},clear:function(){this.layouts=[],this.states={}},setItem:function(t,e){this.states[t]=e,this.save()},getItem:function(t){return this.states[t]},removeItem:function(t){delete this.states[t],this.save()},getActiveLayout:function(){for(var t=this.layouts.length,e=0;t>e;e++){var n=this.layouts[e];if(n.active)return n}return!1},_addDefaultLayouts:function(){var t=this,e=this.lockDefaultLayouts?{locked:!0}:{};angular.forEach(this.defaultLayouts,function(n){t.add(angular.extend(_.clone(e),n))})},_serializeLayouts:function(){var t=[];return angular.forEach(this.layouts,function(e){t.push({title:e.title,id:e.id,active:e.active,locked:e.locked,defaultWidgets:e.dashboard.defaultWidgets})}),t},_handleSyncLoad:function(t){var e;if(this.stringifyStorage)try{e=JSON.parse(t)}catch(n){return void this._addDefaultLayouts()}else e=t;return this.storageHash!==e.storageHash?void this._addDefaultLayouts():(this.states=e.states,void this.add(e.layouts))},_handleAsyncLoad:function(t){var e=this;t.then(angular.bind(e,this._handleSyncLoad),angular.bind(e,this._addDefaultLayouts))},_ensureActiveLayout:function(){for(var t=0;t<this.layouts.length;t++){var e=this.layouts[t];if(e.active)return}this.layouts[0]&&(this.layouts[0].active=!0)},_getLayoutId:function(t){if(t.id)return t.id;for(var e=0,n=0;n<this.layouts.length;n++){var i=this.layouts[n].id;e=Math.max(e,1*i)}return e+1}},t}),angular.module("ui.dashboard").factory("DashboardState",["$log","$q",function(t,e){function n(t,e,n,i,r){this.storage=t,this.id=e,this.hash=n,this.widgetDefinitions=i,this.stringify=r}return n.prototype={save:function(t){if(!this.storage)return!0;var e=_.map(t,function(t){return t.serialize()}),n={widgets:e,hash:this.hash};return this.stringify&&(n=JSON.stringify(n)),this.storage.setItem(this.id,n),!0},load:function(){if(!this.storage)return null;var t;return t=this.storage.getItem(this.id),t?angular.isObject(t)&&angular.isFunction(t.then)?this._handleAsyncLoad(t):this._handleSyncLoad(t):null},_handleSyncLoad:function(e){var n,i=[];if(!e)return null;if(this.stringify)try{n=JSON.parse(e)}catch(r){return t.warn("Serialized dashboard state was malformed and could not be parsed: ",e),null}else n=e;if(n.hash!==this.hash)return t.info("Serialized dashboard from storage was stale (old hash: "+n.hash+", new hash: "+this.hash+")"),this.storage.removeItem(this.id),null;for(var o=n.widgets,a=0;a<o.length;a++){var s=o[a],l=this.widgetDefinitions.getByName(s.name);l?l.hasOwnProperty("storageHash")&&l.storageHash!==s.storageHash?t.info('Widget Definition Object with name "'+s.name+'" was found but the storageHash property on the widget definition is different from that on the serialized widget loaded from storage. hash from storage: "'+s.storageHash+'", hash from WDO: "'+l.storageHash+'"'):i.push(s):t.warn('Widget with name "'+s.name+'" was not found in given widget definition objects')}return i},_handleAsyncLoad:function(t){var n=this,i=e.defer();return t.then(function(t){var e=n._handleSyncLoad(t);e?i.resolve(e):i.reject(e)},function(t){i.reject(t)}),i.promise}},n}]),/**
 * @license AngularJS v1.3.17
 * (c) 2010-2014 Google, Inc. http://angularjs.org
 * License: MIT
 */
function(t,e){"use strict";function n(){function t(t,n){return e.extend(Object.create(t),n)}function n(t,e){var n=e.caseInsensitiveMatch,i={originalPath:t,regexp:t},r=i.keys=[];return t=t.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(t,e,n,i){var o="?"===i?i:null,a="*"===i?i:null;return r.push({name:n,optional:!!o}),e=e||"",""+(o?"":e)+"(?:"+(o?e:"")+(a&&"(.+?)"||"([^/]+)")+(o||"")+")"+(o||"")}).replace(/([\/$\*])/g,"\\$1"),i.regexp=new RegExp("^"+t+"$",n?"i":""),i}var i={};this.when=function(t,r){var o=e.copy(r);if(e.isUndefined(o.reloadOnSearch)&&(o.reloadOnSearch=!0),e.isUndefined(o.caseInsensitiveMatch)&&(o.caseInsensitiveMatch=this.caseInsensitiveMatch),i[t]=e.extend(o,t&&n(t,o)),t){var a="/"==t[t.length-1]?t.substr(0,t.length-1):t+"/";i[a]=e.extend({redirectTo:t},n(a,o))}return this},this.caseInsensitiveMatch=!1,this.otherwise=function(t){return"string"==typeof t&&(t={redirectTo:t}),this.when(null,t),this},this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce",function(n,r,o,a,l,u,c){function d(t,e){var n=e.keys,i={};if(!e.regexp)return null;var r=e.regexp.exec(t);if(!r)return null;for(var o=1,a=r.length;a>o;++o){var s=n[o-1],l=r[o];s&&l&&(i[s.name]=l)}return i}function h(t){var i=b.current;m=p(),v=m&&i&&m.$$route===i.$$route&&e.equals(m.pathParams,i.pathParams)&&!m.reloadOnSearch&&!y,v||!i&&!m||n.$broadcast("$routeChangeStart",m,i).defaultPrevented&&t&&t.preventDefault()}function f(){var t=b.current,i=m;v?(t.params=i.params,e.copy(t.params,o),n.$broadcast("$routeUpdate",t)):(i||t)&&(y=!1,b.current=i,i&&i.redirectTo&&(e.isString(i.redirectTo)?r.path(g(i.redirectTo,i.params)).search(i.params).replace():r.url(i.redirectTo(i.pathParams,r.path(),r.search())).replace()),a.when(i).then(function(){if(i){var t,n,r=e.extend({},i.resolve);return e.forEach(r,function(t,n){r[n]=e.isString(t)?l.get(t):l.invoke(t,null,null,n)}),e.isDefined(t=i.template)?e.isFunction(t)&&(t=t(i.params)):e.isDefined(n=i.templateUrl)&&(e.isFunction(n)&&(n=n(i.params)),e.isDefined(n)&&(i.loadedTemplateUrl=c.valueOf(n),t=u(n))),e.isDefined(t)&&(r.$template=t),a.all(r)}}).then(function(r){i==b.current&&(i&&(i.locals=r,e.copy(i.params,o)),n.$broadcast("$routeChangeSuccess",i,t))},function(e){i==b.current&&n.$broadcast("$routeChangeError",i,t,e)}))}function p(){var n,o;return e.forEach(i,function(i){!o&&(n=d(r.path(),i))&&(o=t(i,{params:e.extend({},r.search(),n),pathParams:n}),o.$$route=i)}),o||i[null]&&t(i[null],{params:{},pathParams:{}})}function g(t,n){var i=[];return e.forEach((t||"").split(":"),function(t,e){if(0===e)i.push(t);else{var r=t.match(/(\w+)(?:[?*])?(.*)/),o=r[1];i.push(n[o]),i.push(r[2]||""),delete n[o]}}),i.join("")}var m,v,y=!1,b={routes:i,reload:function(){y=!0,n.$evalAsync(function(){h(),f()})},updateParams:function(t){if(!this.current||!this.current.$$route)throw s("norout","Tried updating route when with no current route");t=e.extend({},this.current.params,t),r.path(g(this.current.$$route.originalPath,t)),r.search(t)}};return n.$on("$locationChangeStart",h),n.$on("$locationChangeSuccess",f),b}]}function i(){this.$get=function(){return{}}}function r(t,n,i){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(r,o,a,s,l){function u(){f&&(i.cancel(f),f=null),d&&(d.$destroy(),d=null),h&&(f=i.leave(h),f.then(function(){f=null}),h=null)}function c(){var a=t.current&&t.current.locals,s=a&&a.$template;if(e.isDefined(s)){var c=r.$new(),f=t.current,m=l(c,function(t){i.enter(t,null,h||o).then(function(){!e.isDefined(p)||p&&!r.$eval(p)||n()}),u()});h=m,d=f.scope=c,d.$emit("$viewContentLoaded"),d.$eval(g)}else u()}var d,h,f,p=a.autoscroll,g=a.onload||"";r.$on("$routeChangeSuccess",c),c()}}}function o(t,e,n){return{restrict:"ECA",priority:-400,link:function(i,r){var o=n.current,a=o.locals;r.html(a.$template);var s=t(r.contents());if(o.controller){a.$scope=i;var l=e(o.controller,a);o.controllerAs&&(i[o.controllerAs]=l),r.data("$ngControllerController",l),r.children().data("$ngControllerController",l)}s(i)}}}var a=e.module("ngRoute",["ng"]).provider("$route",n),s=e.$$minErr("ngRoute");a.provider("$routeParams",i),a.directive("ngView",r),a.directive("ngView",o),r.$inject=["$route","$anchorScroll","$animate"],o.$inject=["$compile","$controller","$route"]}(window,window.angular),/*
 * angular-ui-bootstrap
 * http://angular-ui.github.io/bootstrap/

 * Version: 0.12.1 - 2015-02-20
 * License: MIT
 */
angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.transition","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.bindHtml","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.dropdown","ui.bootstrap.modal","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["template/accordion/accordion-group.html","template/accordion/accordion.html","template/alert/alert.html","template/carousel/carousel.html","template/carousel/slide.html","template/datepicker/datepicker.html","template/datepicker/day.html","template/datepicker/month.html","template/datepicker/popup.html","template/datepicker/year.html","template/modal/backdrop.html","template/modal/window.html","template/pagination/pager.html","template/pagination/pagination.html","template/tooltip/tooltip-html-unsafe-popup.html","template/tooltip/tooltip-popup.html","template/popover/popover.html","template/progressbar/bar.html","template/progressbar/progress.html","template/progressbar/progressbar.html","template/rating/rating.html","template/tabs/tab.html","template/tabs/tabset.html","template/timepicker/timepicker.html","template/typeahead/typeahead-match.html","template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.transition",[]).factory("$transition",["$q","$timeout","$rootScope",function(t,e,n){function i(t){for(var e in t)if(void 0!==o.style[e])return t[e]}var r=function(i,o,a){a=a||{};var s=t.defer(),l=r[a.animation?"animationEndEventName":"transitionEndEventName"],u=function(){n.$apply(function(){i.unbind(l,u),s.resolve(i)})};return l&&i.bind(l,u),e(function(){angular.isString(o)?i.addClass(o):angular.isFunction(o)?o(i):angular.isObject(o)&&i.css(o),l||s.resolve(i)}),s.promise.cancel=function(){l&&i.unbind(l,u),s.reject("Transition cancelled")},s.promise},o=document.createElement("trans"),a={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"},s={WebkitTransition:"webkitAnimationEnd",MozTransition:"animationend",OTransition:"oAnimationEnd",transition:"animationend"};return r.transitionEndEventName=i(a),r.animationEndEventName=i(s),r}]),angular.module("ui.bootstrap.collapse",["ui.bootstrap.transition"]).directive("collapse",["$transition",function(t){return{link:function(e,n,i){function r(e){function i(){u===r&&(u=void 0)}var r=t(n,e);return u&&u.cancel(),u=r,r.then(i,i),r}function o(){c?(c=!1,a()):(n.removeClass("collapse").addClass("collapsing"),r({height:n[0].scrollHeight+"px"}).then(a))}function a(){n.removeClass("collapsing"),n.addClass("collapse in"),n.css({height:"auto"})}function s(){if(c)c=!1,l(),n.css({height:0});else{n.css({height:n[0].scrollHeight+"px"});{n[0].offsetWidth}n.removeClass("collapse in").addClass("collapsing"),r({height:0}).then(l)}}function l(){n.removeClass("collapsing"),n.addClass("collapse")}var u,c=!0;e.$watch(i.collapse,function(t){t?s():o()})}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("accordionConfig",{closeOthers:!0}).controller("AccordionController",["$scope","$attrs","accordionConfig",function(t,e,n){this.groups=[],this.closeOthers=function(i){var r=angular.isDefined(e.closeOthers)?t.$eval(e.closeOthers):n.closeOthers;r&&angular.forEach(this.groups,function(t){t!==i&&(t.isOpen=!1)})},this.addGroup=function(t){var e=this;this.groups.push(t),t.$on("$destroy",function(){e.removeGroup(t)})},this.removeGroup=function(t){var e=this.groups.indexOf(t);-1!==e&&this.groups.splice(e,1)}}]).directive("accordion",function(){return{restrict:"EA",controller:"AccordionController",transclude:!0,replace:!1,templateUrl:"template/accordion/accordion.html"}}).directive("accordionGroup",function(){return{require:"^accordion",restrict:"EA",transclude:!0,replace:!0,templateUrl:"template/accordion/accordion-group.html",scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(t){this.heading=t}},link:function(t,e,n,i){i.addGroup(t),t.$watch("isOpen",function(e){e&&i.closeOthers(t)}),t.toggleOpen=function(){t.isDisabled||(t.isOpen=!t.isOpen)}}}}).directive("accordionHeading",function(){return{restrict:"EA",transclude:!0,template:"",replace:!0,require:"^accordionGroup",link:function(t,e,n,i,r){i.setHeading(r(t,function(){}))}}}).directive("accordionTransclude",function(){return{require:"^accordionGroup",link:function(t,e,n,i){t.$watch(function(){return i[n.accordionTransclude]},function(t){t&&(e.html(""),e.append(t))})}}}),angular.module("ui.bootstrap.alert",[]).controller("AlertController",["$scope","$attrs",function(t,e){t.closeable="close"in e,this.close=t.close}]).directive("alert",function(){return{restrict:"EA",controller:"AlertController",templateUrl:"template/alert/alert.html",transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}).directive("dismissOnTimeout",["$timeout",function(t){return{require:"alert",link:function(e,n,i,r){t(function(){r.close()},parseInt(i.dismissOnTimeout,10))}}}]),angular.module("ui.bootstrap.bindHtml",[]).directive("bindHtmlUnsafe",function(){return function(t,e,n){e.addClass("ng-binding").data("$binding",n.bindHtmlUnsafe),t.$watch(n.bindHtmlUnsafe,function(t){e.html(t||"")})}}),angular.module("ui.bootstrap.buttons",[]).constant("buttonConfig",{activeClass:"active",toggleEvent:"click"}).controller("ButtonsController",["buttonConfig",function(t){this.activeClass=t.activeClass||"active",this.toggleEvent=t.toggleEvent||"click"}]).directive("btnRadio",function(){return{require:["btnRadio","ngModel"],controller:"ButtonsController",link:function(t,e,n,i){var r=i[0],o=i[1];o.$render=function(){e.toggleClass(r.activeClass,angular.equals(o.$modelValue,t.$eval(n.btnRadio)))},e.bind(r.toggleEvent,function(){var i=e.hasClass(r.activeClass);(!i||angular.isDefined(n.uncheckable))&&t.$apply(function(){o.$setViewValue(i?null:t.$eval(n.btnRadio)),o.$render()})})}}}).directive("btnCheckbox",function(){return{require:["btnCheckbox","ngModel"],controller:"ButtonsController",link:function(t,e,n,i){function r(){return a(n.btnCheckboxTrue,!0)}function o(){return a(n.btnCheckboxFalse,!1)}function a(e,n){var i=t.$eval(e);return angular.isDefined(i)?i:n}var s=i[0],l=i[1];l.$render=function(){e.toggleClass(s.activeClass,angular.equals(l.$modelValue,r()))},e.bind(s.toggleEvent,function(){t.$apply(function(){l.$setViewValue(e.hasClass(s.activeClass)?o():r()),l.$render()})})}}}),angular.module("ui.bootstrap.carousel",["ui.bootstrap.transition"]).controller("CarouselController",["$scope","$timeout","$interval","$transition",function(t,e,n,i){function r(){o();var e=+t.interval;!isNaN(e)&&e>0&&(s=n(a,e))}function o(){s&&(n.cancel(s),s=null)}function a(){var e=+t.interval;l&&!isNaN(e)&&e>0?t.next():t.pause()}var s,l,u=this,c=u.slides=t.slides=[],d=-1;u.currentSlide=null;var h=!1;u.select=t.select=function(n,o){function a(){if(!h){if(u.currentSlide&&angular.isString(o)&&!t.noTransition&&n.$element){n.$element.addClass(o);{n.$element[0].offsetWidth}angular.forEach(c,function(t){angular.extend(t,{direction:"",entering:!1,leaving:!1,active:!1})}),angular.extend(n,{direction:o,active:!0,entering:!0}),angular.extend(u.currentSlide||{},{direction:o,leaving:!0}),t.$currentTransition=i(n.$element,{}),function(e,n){t.$currentTransition.then(function(){s(e,n)},function(){s(e,n)})}(n,u.currentSlide)}else s(n,u.currentSlide);u.currentSlide=n,d=l,r()}}function s(e,n){angular.extend(e,{direction:"",active:!0,leaving:!1,entering:!1}),angular.extend(n||{},{direction:"",active:!1,leaving:!1,entering:!1}),t.$currentTransition=null}var l=c.indexOf(n);void 0===o&&(o=l>d?"next":"prev"),n&&n!==u.currentSlide&&(t.$currentTransition?(t.$currentTransition.cancel(),e(a)):a())},t.$on("$destroy",function(){h=!0}),u.indexOfSlide=function(t){return c.indexOf(t)},t.next=function(){var e=(d+1)%c.length;return t.$currentTransition?void 0:u.select(c[e],"next")},t.prev=function(){var e=0>d-1?c.length-1:d-1;return t.$currentTransition?void 0:u.select(c[e],"prev")},t.isActive=function(t){return u.currentSlide===t},t.$watch("interval",r),t.$on("$destroy",o),t.play=function(){l||(l=!0,r())},t.pause=function(){t.noPause||(l=!1,o())},u.addSlide=function(e,n){e.$element=n,c.push(e),1===c.length||e.active?(u.select(c[c.length-1]),1==c.length&&t.play()):e.active=!1},u.removeSlide=function(t){var e=c.indexOf(t);c.splice(e,1),c.length>0&&t.active?u.select(e>=c.length?c[e-1]:c[e]):d>e&&d--}}]).directive("carousel",[function(){return{restrict:"EA",transclude:!0,replace:!0,controller:"CarouselController",require:"carousel",templateUrl:"template/carousel/carousel.html",scope:{interval:"=",noTransition:"=",noPause:"="}}}]).directive("slide",function(){return{require:"^carousel",restrict:"EA",transclude:!0,replace:!0,templateUrl:"template/carousel/slide.html",scope:{active:"=?"},link:function(t,e,n,i){i.addSlide(t,e),t.$on("$destroy",function(){i.removeSlide(t)}),t.$watch("active",function(e){e&&i.select(t)})}}}),angular.module("ui.bootstrap.dateparser",[]).service("dateParser",["$locale","orderByFilter",function(t,e){function n(t){var n=[],i=t.split("");return angular.forEach(r,function(e,r){var o=t.indexOf(r);if(o>-1){t=t.split(""),i[o]="("+e.regex+")",t[o]="$";for(var a=o+1,s=o+r.length;s>a;a++)i[a]="",t[a]="$";t=t.join(""),n.push({index:o,apply:e.apply})}}),{regex:new RegExp("^"+i.join("")+"$"),map:e(n,"index")}}function i(t,e,n){return 1===e&&n>28?29===n&&(t%4===0&&t%100!==0||t%400===0):3===e||5===e||8===e||10===e?31>n:!0}this.parsers={};var r={yyyy:{regex:"\\d{4}",apply:function(t){this.year=+t}},yy:{regex:"\\d{2}",apply:function(t){this.year=+t+2e3}},y:{regex:"\\d{1,4}",apply:function(t){this.year=+t}},MMMM:{regex:t.DATETIME_FORMATS.MONTH.join("|"),apply:function(e){this.month=t.DATETIME_FORMATS.MONTH.indexOf(e)}},MMM:{regex:t.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(e){this.month=t.DATETIME_FORMATS.SHORTMONTH.indexOf(e)}},MM:{regex:"0[1-9]|1[0-2]",apply:function(t){this.month=t-1}},M:{regex:"[1-9]|1[0-2]",apply:function(t){this.month=t-1}},dd:{regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(t){this.date=+t}},d:{regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(t){this.date=+t}},EEEE:{regex:t.DATETIME_FORMATS.DAY.join("|")},EEE:{regex:t.DATETIME_FORMATS.SHORTDAY.join("|")}};this.parse=function(e,r){if(!angular.isString(e)||!r)return e;r=t.DATETIME_FORMATS[r]||r,this.parsers[r]||(this.parsers[r]=n(r));var o=this.parsers[r],a=o.regex,s=o.map,l=e.match(a);if(l&&l.length){for(var u,c={year:1900,month:0,date:1,hours:0},d=1,h=l.length;h>d;d++){var f=s[d-1];f.apply&&f.apply.call(c,l[d])}return i(c.year,c.month,c.date)&&(u=new Date(c.year,c.month,c.date,c.hours)),u}}}]),angular.module("ui.bootstrap.position",[]).factory("$position",["$document","$window",function(t,e){function n(t,n){return t.currentStyle?t.currentStyle[n]:e.getComputedStyle?e.getComputedStyle(t)[n]:t.style[n]}function i(t){return"static"===(n(t,"position")||"static")}var r=function(e){for(var n=t[0],r=e.offsetParent||n;r&&r!==n&&i(r);)r=r.offsetParent;return r||n};return{position:function(e){var n=this.offset(e),i={top:0,left:0},o=r(e[0]);o!=t[0]&&(i=this.offset(angular.element(o)),i.top+=o.clientTop-o.scrollTop,i.left+=o.clientLeft-o.scrollLeft);var a=e[0].getBoundingClientRect();return{width:a.width||e.prop("offsetWidth"),height:a.height||e.prop("offsetHeight"),top:n.top-i.top,left:n.left-i.left}},offset:function(n){var i=n[0].getBoundingClientRect();return{width:i.width||n.prop("offsetWidth"),height:i.height||n.prop("offsetHeight"),top:i.top+(e.pageYOffset||t[0].documentElement.scrollTop),left:i.left+(e.pageXOffset||t[0].documentElement.scrollLeft)}},positionElements:function(t,e,n,i){var r,o,a,s,l=n.split("-"),u=l[0],c=l[1]||"center";r=i?this.offset(t):this.position(t),o=e.prop("offsetWidth"),a=e.prop("offsetHeight");var d={center:function(){return r.left+r.width/2-o/2},left:function(){return r.left},right:function(){return r.left+r.width}},h={center:function(){return r.top+r.height/2-a/2},top:function(){return r.top},bottom:function(){return r.top+r.height}};switch(u){case"right":s={top:h[c](),left:d[u]()};break;case"left":s={top:h[c](),left:r.left-o};break;case"bottom":s={top:h[u](),left:d[c]()};break;default:s={top:r.top-a,left:d[c]()}}return s}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.position"]).constant("datepickerConfig",{formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",datepickerMode:"day",minMode:"day",maxMode:"year",showWeeks:!0,startingDay:0,yearRange:20,minDate:null,maxDate:null}).controller("DatepickerController",["$scope","$attrs","$parse","$interpolate","$timeout","$log","dateFilter","datepickerConfig",function(t,e,n,i,r,o,a,s){var l=this,u={$setViewValue:angular.noop};this.modes=["day","month","year"],angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","minMode","maxMode","showWeeks","startingDay","yearRange"],function(n,r){l[n]=angular.isDefined(e[n])?8>r?i(e[n])(t.$parent):t.$parent.$eval(e[n]):s[n]}),angular.forEach(["minDate","maxDate"],function(i){e[i]?t.$parent.$watch(n(e[i]),function(t){l[i]=t?new Date(t):null,l.refreshView()}):l[i]=s[i]?new Date(s[i]):null}),t.datepickerMode=t.datepickerMode||s.datepickerMode,t.uniqueId="datepicker-"+t.$id+"-"+Math.floor(1e4*Math.random()),this.activeDate=angular.isDefined(e.initDate)?t.$parent.$eval(e.initDate):new Date,t.isActive=function(e){return 0===l.compare(e.date,l.activeDate)?(t.activeDateId=e.uid,!0):!1},this.init=function(t){u=t,u.$render=function(){l.render()}},this.render=function(){if(u.$modelValue){var t=new Date(u.$modelValue),e=!isNaN(t);e?this.activeDate=t:o.error('Datepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.'),u.$setValidity("date",e)}this.refreshView()},this.refreshView=function(){if(this.element){this._refreshView();var t=u.$modelValue?new Date(u.$modelValue):null;u.$setValidity("date-disabled",!t||this.element&&!this.isDisabled(t))}},this.createDateObject=function(t,e){var n=u.$modelValue?new Date(u.$modelValue):null;return{date:t,label:a(t,e),selected:n&&0===this.compare(t,n),disabled:this.isDisabled(t),current:0===this.compare(t,new Date)}},this.isDisabled=function(n){return this.minDate&&this.compare(n,this.minDate)<0||this.maxDate&&this.compare(n,this.maxDate)>0||e.dateDisabled&&t.dateDisabled({date:n,mode:t.datepickerMode})},this.split=function(t,e){for(var n=[];t.length>0;)n.push(t.splice(0,e));return n},t.select=function(e){if(t.datepickerMode===l.minMode){var n=u.$modelValue?new Date(u.$modelValue):new Date(0,0,0,0,0,0,0);n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),u.$setViewValue(n),u.$render()}else l.activeDate=e,t.datepickerMode=l.modes[l.modes.indexOf(t.datepickerMode)-1]},t.move=function(t){var e=l.activeDate.getFullYear()+t*(l.step.years||0),n=l.activeDate.getMonth()+t*(l.step.months||0);l.activeDate.setFullYear(e,n,1),l.refreshView()},t.toggleMode=function(e){e=e||1,t.datepickerMode===l.maxMode&&1===e||t.datepickerMode===l.minMode&&-1===e||(t.datepickerMode=l.modes[l.modes.indexOf(t.datepickerMode)+e])},t.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var c=function(){r(function(){l.element[0].focus()},0,!1)};t.$on("datepicker.focus",c),t.keydown=function(e){var n=t.keys[e.which];if(n&&!e.shiftKey&&!e.altKey)if(e.preventDefault(),e.stopPropagation(),"enter"===n||"space"===n){if(l.isDisabled(l.activeDate))return;t.select(l.activeDate),c()}else!e.ctrlKey||"up"!==n&&"down"!==n?(l.handleKeyDown(n,e),l.refreshView()):(t.toggleMode("up"===n?1:-1),c())}}]).directive("datepicker",function(){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/datepicker.html",scope:{datepickerMode:"=?",dateDisabled:"&"},require:["datepicker","?^ngModel"],controller:"DatepickerController",link:function(t,e,n,i){var r=i[0],o=i[1];o&&r.init(o)}}}).directive("daypicker",["dateFilter",function(t){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/day.html",require:"^datepicker",link:function(e,n,i,r){function o(t,e){return 1!==e||t%4!==0||t%100===0&&t%400!==0?l[e]:29}function a(t,e){var n=new Array(e),i=new Date(t),r=0;for(i.setHours(12);e>r;)n[r++]=new Date(i),i.setDate(i.getDate()+1);return n}function s(t){var e=new Date(t);e.setDate(e.getDate()+4-(e.getDay()||7));var n=e.getTime();return e.setMonth(0),e.setDate(1),Math.floor(Math.round((n-e)/864e5)/7)+1}e.showWeeks=r.showWeeks,r.step={months:1},r.element=n;var l=[31,28,31,30,31,30,31,31,30,31,30,31];r._refreshView=function(){var n=r.activeDate.getFullYear(),i=r.activeDate.getMonth(),o=new Date(n,i,1),l=r.startingDay-o.getDay(),u=l>0?7-l:-l,c=new Date(o);u>0&&c.setDate(-u+1);for(var d=a(c,42),h=0;42>h;h++)d[h]=angular.extend(r.createDateObject(d[h],r.formatDay),{secondary:d[h].getMonth()!==i,uid:e.uniqueId+"-"+h});e.labels=new Array(7);for(var f=0;7>f;f++)e.labels[f]={abbr:t(d[f].date,r.formatDayHeader),full:t(d[f].date,"EEEE")};if(e.title=t(r.activeDate,r.formatDayTitle),e.rows=r.split(d,7),e.showWeeks){e.weekNumbers=[];for(var p=s(e.rows[0][0].date),g=e.rows.length;e.weekNumbers.push(p++)<g;);}},r.compare=function(t,e){return new Date(t.getFullYear(),t.getMonth(),t.getDate())-new Date(e.getFullYear(),e.getMonth(),e.getDate())},r.handleKeyDown=function(t){var e=r.activeDate.getDate();if("left"===t)e-=1;else if("up"===t)e-=7;else if("right"===t)e+=1;else if("down"===t)e+=7;else if("pageup"===t||"pagedown"===t){var n=r.activeDate.getMonth()+("pageup"===t?-1:1);r.activeDate.setMonth(n,1),e=Math.min(o(r.activeDate.getFullYear(),r.activeDate.getMonth()),e)}else"home"===t?e=1:"end"===t&&(e=o(r.activeDate.getFullYear(),r.activeDate.getMonth()));r.activeDate.setDate(e)},r.refreshView()}}}]).directive("monthpicker",["dateFilter",function(t){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/month.html",require:"^datepicker",link:function(e,n,i,r){r.step={years:1},r.element=n,r._refreshView=function(){for(var n=new Array(12),i=r.activeDate.getFullYear(),o=0;12>o;o++)n[o]=angular.extend(r.createDateObject(new Date(i,o,1),r.formatMonth),{uid:e.uniqueId+"-"+o});e.title=t(r.activeDate,r.formatMonthTitle),e.rows=r.split(n,3)},r.compare=function(t,e){return new Date(t.getFullYear(),t.getMonth())-new Date(e.getFullYear(),e.getMonth())},r.handleKeyDown=function(t){var e=r.activeDate.getMonth();if("left"===t)e-=1;else if("up"===t)e-=3;else if("right"===t)e+=1;else if("down"===t)e+=3;else if("pageup"===t||"pagedown"===t){var n=r.activeDate.getFullYear()+("pageup"===t?-1:1);r.activeDate.setFullYear(n)}else"home"===t?e=0:"end"===t&&(e=11);r.activeDate.setMonth(e)},r.refreshView()}}}]).directive("yearpicker",["dateFilter",function(){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/year.html",require:"^datepicker",link:function(t,e,n,i){function r(t){return parseInt((t-1)/o,10)*o+1}var o=i.yearRange;i.step={years:o},i.element=e,i._refreshView=function(){for(var e=new Array(o),n=0,a=r(i.activeDate.getFullYear());o>n;n++)e[n]=angular.extend(i.createDateObject(new Date(a+n,0,1),i.formatYear),{uid:t.uniqueId+"-"+n});t.title=[e[0].label,e[o-1].label].join(" - "),t.rows=i.split(e,5)},i.compare=function(t,e){return t.getFullYear()-e.getFullYear()},i.handleKeyDown=function(t){var e=i.activeDate.getFullYear();"left"===t?e-=1:"up"===t?e-=5:"right"===t?e+=1:"down"===t?e+=5:"pageup"===t||"pagedown"===t?e+=("pageup"===t?-1:1)*i.step.years:"home"===t?e=r(i.activeDate.getFullYear()):"end"===t&&(e=r(i.activeDate.getFullYear())+o-1),i.activeDate.setFullYear(e)},i.refreshView()}}}]).constant("datepickerPopupConfig",{datepickerPopup:"yyyy-MM-dd",currentText:"Today",clearText:"Clear",closeText:"Done",closeOnDateSelection:!0,appendToBody:!1,showButtonBar:!0}).directive("datepickerPopup",["$compile","$parse","$document","$position","dateFilter","dateParser","datepickerPopupConfig",function(t,e,n,i,r,o,a){return{restrict:"EA",require:"ngModel",scope:{isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&"},link:function(s,l,u,c){function d(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}function h(t){if(t){if(angular.isDate(t)&&!isNaN(t))return c.$setValidity("date",!0),t;if(angular.isString(t)){var e=o.parse(t,f)||new Date(t);return isNaN(e)?void c.$setValidity("date",!1):(c.$setValidity("date",!0),e)}return void c.$setValidity("date",!1)}return c.$setValidity("date",!0),null}var f,p=angular.isDefined(u.closeOnDateSelection)?s.$parent.$eval(u.closeOnDateSelection):a.closeOnDateSelection,g=angular.isDefined(u.datepickerAppendToBody)?s.$parent.$eval(u.datepickerAppendToBody):a.appendToBody;s.showButtonBar=angular.isDefined(u.showButtonBar)?s.$parent.$eval(u.showButtonBar):a.showButtonBar,s.getText=function(t){return s[t+"Text"]||a[t+"Text"]},u.$observe("datepickerPopup",function(t){f=t||a.datepickerPopup,c.$render()});var m=angular.element("<div datepicker-popup-wrap><div datepicker></div></div>");m.attr({"ng-model":"date","ng-change":"dateSelection()"});var v=angular.element(m.children()[0]);u.datepickerOptions&&angular.forEach(s.$parent.$eval(u.datepickerOptions),function(t,e){v.attr(d(e),t)}),s.watchData={},angular.forEach(["minDate","maxDate","datepickerMode"],function(t){if(u[t]){var n=e(u[t]);if(s.$parent.$watch(n,function(e){s.watchData[t]=e}),v.attr(d(t),"watchData."+t),"datepickerMode"===t){var i=n.assign;s.$watch("watchData."+t,function(t,e){t!==e&&i(s.$parent,t)})}}}),u.dateDisabled&&v.attr("date-disabled","dateDisabled({ date: date, mode: mode })"),c.$parsers.unshift(h),s.dateSelection=function(t){angular.isDefined(t)&&(s.date=t),c.$setViewValue(s.date),c.$render(),p&&(s.isOpen=!1,l[0].focus())},l.bind("input change keyup",function(){s.$apply(function(){s.date=c.$modelValue})}),c.$render=function(){var t=c.$viewValue?r(c.$viewValue,f):"";l.val(t),s.date=h(c.$modelValue)};var y=function(t){s.isOpen&&t.target!==l[0]&&s.$apply(function(){s.isOpen=!1})},b=function(t){s.keydown(t)};l.bind("keydown",b),s.keydown=function(t){27===t.which?(t.preventDefault(),t.stopPropagation(),s.close()):40!==t.which||s.isOpen||(s.isOpen=!0)},s.$watch("isOpen",function(t){t?(s.$broadcast("datepicker.focus"),s.position=g?i.offset(l):i.position(l),s.position.top=s.position.top+l.prop("offsetHeight"),n.bind("click",y)):n.unbind("click",y)}),s.select=function(t){if("today"===t){var e=new Date;angular.isDate(c.$modelValue)?(t=new Date(c.$modelValue),t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate())):t=new Date(e.setHours(0,0,0,0))}s.dateSelection(t)},s.close=function(){s.isOpen=!1,l[0].focus()};var x=t(m)(s);m.remove(),g?n.find("body").append(x):l.after(x),s.$on("$destroy",function(){x.remove(),l.unbind("keydown",b),n.unbind("click",y)})}}}]).directive("datepickerPopupWrap",function(){return{restrict:"EA",replace:!0,transclude:!0,templateUrl:"template/datepicker/popup.html",link:function(t,e){e.bind("click",function(t){t.preventDefault(),t.stopPropagation()})}}}),angular.module("ui.bootstrap.dropdown",[]).constant("dropdownConfig",{openClass:"open"}).service("dropdownService",["$document",function(t){var e=null;this.open=function(r){e||(t.bind("click",n),t.bind("keydown",i)),e&&e!==r&&(e.isOpen=!1),e=r},this.close=function(r){e===r&&(e=null,t.unbind("click",n),t.unbind("keydown",i))};var n=function(t){if(e){var n=e.getToggleElement();t&&n&&n[0].contains(t.target)||e.$apply(function(){e.isOpen=!1})}},i=function(t){27===t.which&&(e.focusToggleElement(),n())}}]).controller("DropdownController",["$scope","$attrs","$parse","dropdownConfig","dropdownService","$animate",function(t,e,n,i,r,o){var a,s=this,l=t.$new(),u=i.openClass,c=angular.noop,d=e.onToggle?n(e.onToggle):angular.noop;this.init=function(i){s.$element=i,e.isOpen&&(a=n(e.isOpen),c=a.assign,t.$watch(a,function(t){l.isOpen=!!t}))},this.toggle=function(t){return l.isOpen=arguments.length?!!t:!l.isOpen},this.isOpen=function(){return l.isOpen},l.getToggleElement=function(){return s.toggleElement},l.focusToggleElement=function(){s.toggleElement&&s.toggleElement[0].focus()},l.$watch("isOpen",function(e,n){o[e?"addClass":"removeClass"](s.$element,u),e?(l.focusToggleElement(),r.open(l)):r.close(l),c(t,e),angular.isDefined(e)&&e!==n&&d(t,{open:!!e})}),t.$on("$locationChangeSuccess",function(){l.isOpen=!1}),t.$on("$destroy",function(){l.$destroy()})}]).directive("dropdown",function(){return{controller:"DropdownController",link:function(t,e,n,i){i.init(e)}}}).directive("dropdownToggle",function(){return{require:"?^dropdown",link:function(t,e,n,i){if(i){i.toggleElement=e;var r=function(r){r.preventDefault(),e.hasClass("disabled")||n.disabled||t.$apply(function(){i.toggle()})};e.bind("click",r),e.attr({"aria-haspopup":!0,"aria-expanded":!1}),t.$watch(i.isOpen,function(t){e.attr("aria-expanded",!!t)}),t.$on("$destroy",function(){e.unbind("click",r)})}}}}),angular.module("ui.bootstrap.modal",["ui.bootstrap.transition"]).factory("$$stackedMap",function(){return{createNew:function(){var t=[];return{add:function(e,n){t.push({key:e,value:n})},get:function(e){for(var n=0;n<t.length;n++)if(e==t[n].key)return t[n]},keys:function(){for(var e=[],n=0;n<t.length;n++)e.push(t[n].key);return e},top:function(){return t[t.length-1]},remove:function(e){for(var n=-1,i=0;i<t.length;i++)if(e==t[i].key){n=i;break}return t.splice(n,1)[0]},removeTop:function(){return t.splice(t.length-1,1)[0]},length:function(){return t.length}}}}}).directive("modalBackdrop",["$timeout",function(t){return{restrict:"EA",replace:!0,templateUrl:"template/modal/backdrop.html",link:function(e,n,i){e.backdropClass=i.backdropClass||"",e.animate=!1,t(function(){e.animate=!0})}}}]).directive("modalWindow",["$modalStack","$timeout",function(t,e){return{restrict:"EA",scope:{index:"@",animate:"="},replace:!0,transclude:!0,templateUrl:function(t,e){return e.templateUrl||"template/modal/window.html"},link:function(n,i,r){i.addClass(r.windowClass||""),n.size=r.size,e(function(){n.animate=!0,i[0].querySelectorAll("[autofocus]").length||i[0].focus()}),n.close=function(e){var n=t.getTop();n&&n.value.backdrop&&"static"!=n.value.backdrop&&e.target===e.currentTarget&&(e.preventDefault(),e.stopPropagation(),t.dismiss(n.key,"backdrop click"))}}}}]).directive("modalTransclude",function(){return{link:function(t,e,n,i,r){r(t.$parent,function(t){e.empty(),e.append(t)})}}}).factory("$modalStack",["$transition","$timeout","$document","$compile","$rootScope","$$stackedMap",function(t,e,n,i,r,o){function a(){for(var t=-1,e=f.keys(),n=0;n<e.length;n++)f.get(e[n]).value.backdrop&&(t=n);return t}function s(t){var e=n.find("body").eq(0),i=f.get(t).value;f.remove(t),u(i.modalDomEl,i.modalScope,300,function(){i.modalScope.$destroy(),e.toggleClass(h,f.length()>0),l()})}function l(){if(c&&-1==a()){var t=d;u(c,d,150,function(){t.$destroy(),t=null}),c=void 0,d=void 0}}function u(n,i,r,o){function a(){a.done||(a.done=!0,n.remove(),o&&o())}i.animate=!1;var s=t.transitionEndEventName;if(s){var l=e(a,r);n.bind(s,function(){e.cancel(l),a(),i.$apply()})}else e(a)}var c,d,h="modal-open",f=o.createNew(),p={};return r.$watch(a,function(t){d&&(d.index=t)}),n.bind("keydown",function(t){var e;27===t.which&&(e=f.top(),e&&e.value.keyboard&&(t.preventDefault(),r.$apply(function(){p.dismiss(e.key,"escape key press")})))}),p.open=function(t,e){f.add(t,{deferred:e.deferred,modalScope:e.scope,backdrop:e.backdrop,keyboard:e.keyboard});var o=n.find("body").eq(0),s=a();if(s>=0&&!c){d=r.$new(!0),d.index=s;var l=angular.element("<div modal-backdrop></div>");l.attr("backdrop-class",e.backdropClass),c=i(l)(d),o.append(c)}var u=angular.element("<div modal-window></div>");u.attr({"template-url":e.windowTemplateUrl,"window-class":e.windowClass,size:e.size,index:f.length()-1,animate:"animate"}).html(e.content);var p=i(u)(e.scope);f.top().value.modalDomEl=p,o.append(p),o.addClass(h)},p.close=function(t,e){var n=f.get(t);n&&(n.value.deferred.resolve(e),s(t))},p.dismiss=function(t,e){var n=f.get(t);n&&(n.value.deferred.reject(e),s(t))},p.dismissAll=function(t){for(var e=this.getTop();e;)this.dismiss(e.key,t),e=this.getTop()},p.getTop=function(){return f.top()},p}]).provider("$modal",function(){var t={options:{backdrop:!0,keyboard:!0},$get:["$injector","$rootScope","$q","$http","$templateCache","$controller","$modalStack",function(e,n,i,r,o,a,s){function l(t){return t.template?i.when(t.template):r.get(angular.isFunction(t.templateUrl)?t.templateUrl():t.templateUrl,{cache:o}).then(function(t){return t.data})}function u(t){var n=[];return angular.forEach(t,function(t){(angular.isFunction(t)||angular.isArray(t))&&n.push(i.when(e.invoke(t)))}),n}var c={};return c.open=function(e){var r=i.defer(),o=i.defer(),c={result:r.promise,opened:o.promise,close:function(t){s.close(c,t)},dismiss:function(t){s.dismiss(c,t)}};if(e=angular.extend({},t.options,e),e.resolve=e.resolve||{},!e.template&&!e.templateUrl)throw new Error("One of template or templateUrl options is required.");var d=i.all([l(e)].concat(u(e.resolve)));return d.then(function(t){var i=(e.scope||n).$new();i.$close=c.close,i.$dismiss=c.dismiss;var o,l={},u=1;e.controller&&(l.$scope=i,l.$modalInstance=c,angular.forEach(e.resolve,function(e,n){l[n]=t[u++]}),o=a(e.controller,l),e.controllerAs&&(i[e.controllerAs]=o)),s.open(c,{scope:i,deferred:r,content:t[0],backdrop:e.backdrop,keyboard:e.keyboard,backdropClass:e.backdropClass,windowClass:e.windowClass,windowTemplateUrl:e.windowTemplateUrl,size:e.size})},function(t){r.reject(t)}),d.then(function(){o.resolve(!0)},function(){o.reject(!1)}),c},c}]};return t}),angular.module("ui.bootstrap.pagination",[]).controller("PaginationController",["$scope","$attrs","$parse",function(t,e,n){var i=this,r={$setViewValue:angular.noop},o=e.numPages?n(e.numPages).assign:angular.noop;this.init=function(o,a){r=o,this.config=a,r.$render=function(){i.render()},e.itemsPerPage?t.$parent.$watch(n(e.itemsPerPage),function(e){i.itemsPerPage=parseInt(e,10),t.totalPages=i.calculateTotalPages()}):this.itemsPerPage=a.itemsPerPage},this.calculateTotalPages=function(){var e=this.itemsPerPage<1?1:Math.ceil(t.totalItems/this.itemsPerPage);return Math.max(e||0,1)},this.render=function(){t.page=parseInt(r.$viewValue,10)||1},t.selectPage=function(e){t.page!==e&&e>0&&e<=t.totalPages&&(r.$setViewValue(e),r.$render())},t.getText=function(e){return t[e+"Text"]||i.config[e+"Text"]},t.noPrevious=function(){return 1===t.page},t.noNext=function(){return t.page===t.totalPages},t.$watch("totalItems",function(){t.totalPages=i.calculateTotalPages()}),t.$watch("totalPages",function(e){o(t.$parent,e),t.page>e?t.selectPage(e):r.$render()})}]).constant("paginationConfig",{itemsPerPage:10,boundaryLinks:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0}).directive("pagination",["$parse","paginationConfig",function(t,e){return{restrict:"EA",scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@"},require:["pagination","?ngModel"],controller:"PaginationController",templateUrl:"template/pagination/pagination.html",replace:!0,link:function(n,i,r,o){function a(t,e,n){return{number:t,text:e,active:n}}function s(t,e){var n=[],i=1,r=e,o=angular.isDefined(c)&&e>c;o&&(d?(i=Math.max(t-Math.floor(c/2),1),r=i+c-1,r>e&&(r=e,i=r-c+1)):(i=(Math.ceil(t/c)-1)*c+1,r=Math.min(i+c-1,e)));for(var s=i;r>=s;s++){var l=a(s,s,s===t);n.push(l)}if(o&&!d){if(i>1){var u=a(i-1,"...",!1);n.unshift(u)}if(e>r){var h=a(r+1,"...",!1);n.push(h)}}return n}var l=o[0],u=o[1];if(u){var c=angular.isDefined(r.maxSize)?n.$parent.$eval(r.maxSize):e.maxSize,d=angular.isDefined(r.rotate)?n.$parent.$eval(r.rotate):e.rotate;n.boundaryLinks=angular.isDefined(r.boundaryLinks)?n.$parent.$eval(r.boundaryLinks):e.boundaryLinks,n.directionLinks=angular.isDefined(r.directionLinks)?n.$parent.$eval(r.directionLinks):e.directionLinks,l.init(u,e),r.maxSize&&n.$parent.$watch(t(r.maxSize),function(t){c=parseInt(t,10),l.render()
});var h=l.render;l.render=function(){h(),n.page>0&&n.page<=n.totalPages&&(n.pages=s(n.page,n.totalPages))}}}}}]).constant("pagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("pager",["pagerConfig",function(t){return{restrict:"EA",scope:{totalItems:"=",previousText:"@",nextText:"@"},require:["pager","?ngModel"],controller:"PaginationController",templateUrl:"template/pagination/pager.html",replace:!0,link:function(e,n,i,r){var o=r[0],a=r[1];a&&(e.align=angular.isDefined(i.align)?e.$parent.$eval(i.align):t.align,o.init(a,t))}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.bindHtml"]).provider("$tooltip",function(){function t(t){var e=/[A-Z]/g,n="-";return t.replace(e,function(t,e){return(e?n:"")+t.toLowerCase()})}var e={placement:"top",animation:!0,popupDelay:0},n={mouseenter:"mouseleave",click:"click",focus:"blur"},i={};this.options=function(t){angular.extend(i,t)},this.setTriggers=function(t){angular.extend(n,t)},this.$get=["$window","$compile","$timeout","$document","$position","$interpolate",function(r,o,a,s,l,u){return function(r,c,d){function h(t){var e=t||f.trigger||d,i=n[e]||e;return{show:e,hide:i}}var f=angular.extend({},e,i),p=t(r),g=u.startSymbol(),m=u.endSymbol(),v="<div "+p+'-popup title="'+g+"title"+m+'" content="'+g+"content"+m+'" placement="'+g+"placement"+m+'" animation="animation" is-open="isOpen"></div>';return{restrict:"EA",compile:function(){var t=o(v);return function(e,n,i){function o(){T.isOpen?d():u()}function u(){(!S||e.$eval(i[c+"Enable"]))&&(y(),T.popupDelay?C||(C=a(p,T.popupDelay,!1),C.then(function(t){t()})):p()())}function d(){e.$apply(function(){g()})}function p(){return C=null,_&&(a.cancel(_),_=null),T.content?(m(),$.css({top:0,left:0,display:"block"}),T.$digest(),A(),T.isOpen=!0,T.$digest(),A):angular.noop}function g(){T.isOpen=!1,a.cancel(C),C=null,T.animation?_||(_=a(v,500)):v()}function m(){$&&v(),k=T.$new(),$=t(k,function(t){M?s.find("body").append(t):n.after(t)})}function v(){_=null,$&&($.remove(),$=null),k&&(k.$destroy(),k=null)}function y(){b(),x()}function b(){var t=i[c+"Placement"];T.placement=angular.isDefined(t)?t:f.placement}function x(){var t=i[c+"PopupDelay"],e=parseInt(t,10);T.popupDelay=isNaN(e)?f.popupDelay:e}function w(){var t=i[c+"Trigger"];E(),D=h(t),D.show===D.hide?n.bind(D.show,o):(n.bind(D.show,u),n.bind(D.hide,d))}var $,k,_,C,M=angular.isDefined(f.appendToBody)?f.appendToBody:!1,D=h(void 0),S=angular.isDefined(i[c+"Enable"]),T=e.$new(!0),A=function(){var t=l.positionElements(n,$,T.placement,M);t.top+="px",t.left+="px",$.css(t)};T.isOpen=!1,i.$observe(r,function(t){T.content=t,!t&&T.isOpen&&g()}),i.$observe(c+"Title",function(t){T.title=t});var E=function(){n.unbind(D.show,u),n.unbind(D.hide,d)};w();var O=e.$eval(i[c+"Animation"]);T.animation=angular.isDefined(O)?!!O:f.animation;var N=e.$eval(i[c+"AppendToBody"]);M=angular.isDefined(N)?N:M,M&&e.$on("$locationChangeSuccess",function(){T.isOpen&&g()}),e.$on("$destroy",function(){a.cancel(_),a.cancel(C),E(),v(),T=null})}}}}}]}).directive("tooltipPopup",function(){return{restrict:"EA",replace:!0,scope:{content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-popup.html"}}).directive("tooltip",["$tooltip",function(t){return t("tooltip","tooltip","mouseenter")}]).directive("tooltipHtmlUnsafePopup",function(){return{restrict:"EA",replace:!0,scope:{content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-html-unsafe-popup.html"}}).directive("tooltipHtmlUnsafe",["$tooltip",function(t){return t("tooltipHtmlUnsafe","tooltip","mouseenter")}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("popoverPopup",function(){return{restrict:"EA",replace:!0,scope:{title:"@",content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover.html"}}).directive("popover",["$tooltip",function(t){return t("popover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("progressConfig",{animate:!0,max:100}).controller("ProgressController",["$scope","$attrs","progressConfig",function(t,e,n){var i=this,r=angular.isDefined(e.animate)?t.$parent.$eval(e.animate):n.animate;this.bars=[],t.max=angular.isDefined(e.max)?t.$parent.$eval(e.max):n.max,this.addBar=function(e,n){r||n.css({transition:"none"}),this.bars.push(e),e.$watch("value",function(n){e.percent=+(100*n/t.max).toFixed(2)}),e.$on("$destroy",function(){n=null,i.removeBar(e)})},this.removeBar=function(t){this.bars.splice(this.bars.indexOf(t),1)}}]).directive("progress",function(){return{restrict:"EA",replace:!0,transclude:!0,controller:"ProgressController",require:"progress",scope:{},templateUrl:"template/progressbar/progress.html"}}).directive("bar",function(){return{restrict:"EA",replace:!0,transclude:!0,require:"^progress",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/bar.html",link:function(t,e,n,i){i.addBar(t,e)}}}).directive("progressbar",function(){return{restrict:"EA",replace:!0,transclude:!0,controller:"ProgressController",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/progressbar.html",link:function(t,e,n,i){i.addBar(t,angular.element(e.children()[0]))}}}),angular.module("ui.bootstrap.rating",[]).constant("ratingConfig",{max:5,stateOn:null,stateOff:null}).controller("RatingController",["$scope","$attrs","ratingConfig",function(t,e,n){var i={$setViewValue:angular.noop};this.init=function(r){i=r,i.$render=this.render,this.stateOn=angular.isDefined(e.stateOn)?t.$parent.$eval(e.stateOn):n.stateOn,this.stateOff=angular.isDefined(e.stateOff)?t.$parent.$eval(e.stateOff):n.stateOff;var o=angular.isDefined(e.ratingStates)?t.$parent.$eval(e.ratingStates):new Array(angular.isDefined(e.max)?t.$parent.$eval(e.max):n.max);t.range=this.buildTemplateObjects(o)},this.buildTemplateObjects=function(t){for(var e=0,n=t.length;n>e;e++)t[e]=angular.extend({index:e},{stateOn:this.stateOn,stateOff:this.stateOff},t[e]);return t},t.rate=function(e){!t.readonly&&e>=0&&e<=t.range.length&&(i.$setViewValue(e),i.$render())},t.enter=function(e){t.readonly||(t.value=e),t.onHover({value:e})},t.reset=function(){t.value=i.$viewValue,t.onLeave()},t.onKeydown=function(e){/(37|38|39|40)/.test(e.which)&&(e.preventDefault(),e.stopPropagation(),t.rate(t.value+(38===e.which||39===e.which?1:-1)))},this.render=function(){t.value=i.$viewValue}}]).directive("rating",function(){return{restrict:"EA",require:["rating","ngModel"],scope:{readonly:"=?",onHover:"&",onLeave:"&"},controller:"RatingController",templateUrl:"template/rating/rating.html",replace:!0,link:function(t,e,n,i){var r=i[0],o=i[1];o&&r.init(o)}}}),angular.module("ui.bootstrap.tabs",[]).controller("TabsetController",["$scope",function(t){var e=this,n=e.tabs=t.tabs=[];e.select=function(t){angular.forEach(n,function(e){e.active&&e!==t&&(e.active=!1,e.onDeselect())}),t.active=!0,t.onSelect()},e.addTab=function(t){n.push(t),1===n.length?t.active=!0:t.active&&e.select(t)},e.removeTab=function(t){var r=n.indexOf(t);if(t.active&&n.length>1&&!i){var o=r==n.length-1?r-1:r+1;e.select(n[o])}n.splice(r,1)};var i;t.$on("$destroy",function(){i=!0})}]).directive("tabset",function(){return{restrict:"EA",transclude:!0,replace:!0,scope:{type:"@"},controller:"TabsetController",templateUrl:"template/tabs/tabset.html",link:function(t,e,n){t.vertical=angular.isDefined(n.vertical)?t.$parent.$eval(n.vertical):!1,t.justified=angular.isDefined(n.justified)?t.$parent.$eval(n.justified):!1}}}).directive("tab",["$parse",function(t){return{require:"^tabset",restrict:"EA",replace:!0,templateUrl:"template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},compile:function(e,n,i){return function(e,n,r,o){e.$watch("active",function(t){t&&o.select(e)}),e.disabled=!1,r.disabled&&e.$parent.$watch(t(r.disabled),function(t){e.disabled=!!t}),e.select=function(){e.disabled||(e.active=!0)},o.addTab(e),e.$on("$destroy",function(){o.removeTab(e)}),e.$transcludeFn=i}}}}]).directive("tabHeadingTransclude",[function(){return{restrict:"A",require:"^tab",link:function(t,e){t.$watch("headingElement",function(t){t&&(e.html(""),e.append(t))})}}}]).directive("tabContentTransclude",function(){function t(t){return t.tagName&&(t.hasAttribute("tab-heading")||t.hasAttribute("data-tab-heading")||"tab-heading"===t.tagName.toLowerCase()||"data-tab-heading"===t.tagName.toLowerCase())}return{restrict:"A",require:"^tabset",link:function(e,n,i){var r=e.$eval(i.tabContentTransclude);r.$transcludeFn(r.$parent,function(e){angular.forEach(e,function(e){t(e)?r.headingElement=e:n.append(e)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("timepickerConfig",{hourStep:1,minuteStep:1,showMeridian:!0,meridians:null,readonlyInput:!1,mousewheel:!0}).controller("TimepickerController",["$scope","$attrs","$parse","$log","$locale","timepickerConfig",function(t,e,n,i,r,o){function a(){var e=parseInt(t.hours,10),n=t.showMeridian?e>0&&13>e:e>=0&&24>e;return n?(t.showMeridian&&(12===e&&(e=0),t.meridian===g[1]&&(e+=12)),e):void 0}function s(){var e=parseInt(t.minutes,10);return e>=0&&60>e?e:void 0}function l(t){return angular.isDefined(t)&&t.toString().length<2?"0"+t:t}function u(t){c(),p.$setViewValue(new Date(f)),d(t)}function c(){p.$setValidity("time",!0),t.invalidHours=!1,t.invalidMinutes=!1}function d(e){var n=f.getHours(),i=f.getMinutes();t.showMeridian&&(n=0===n||12===n?12:n%12),t.hours="h"===e?n:l(n),t.minutes="m"===e?i:l(i),t.meridian=f.getHours()<12?g[0]:g[1]}function h(t){var e=new Date(f.getTime()+6e4*t);f.setHours(e.getHours(),e.getMinutes()),u()}var f=new Date,p={$setViewValue:angular.noop},g=angular.isDefined(e.meridians)?t.$parent.$eval(e.meridians):o.meridians||r.DATETIME_FORMATS.AMPMS;this.init=function(n,i){p=n,p.$render=this.render;var r=i.eq(0),a=i.eq(1),s=angular.isDefined(e.mousewheel)?t.$parent.$eval(e.mousewheel):o.mousewheel;s&&this.setupMousewheelEvents(r,a),t.readonlyInput=angular.isDefined(e.readonlyInput)?t.$parent.$eval(e.readonlyInput):o.readonlyInput,this.setupInputEvents(r,a)};var m=o.hourStep;e.hourStep&&t.$parent.$watch(n(e.hourStep),function(t){m=parseInt(t,10)});var v=o.minuteStep;e.minuteStep&&t.$parent.$watch(n(e.minuteStep),function(t){v=parseInt(t,10)}),t.showMeridian=o.showMeridian,e.showMeridian&&t.$parent.$watch(n(e.showMeridian),function(e){if(t.showMeridian=!!e,p.$error.time){var n=a(),i=s();angular.isDefined(n)&&angular.isDefined(i)&&(f.setHours(n),u())}else d()}),this.setupMousewheelEvents=function(e,n){var i=function(t){t.originalEvent&&(t=t.originalEvent);var e=t.wheelDelta?t.wheelDelta:-t.deltaY;return t.detail||e>0};e.bind("mousewheel wheel",function(e){t.$apply(i(e)?t.incrementHours():t.decrementHours()),e.preventDefault()}),n.bind("mousewheel wheel",function(e){t.$apply(i(e)?t.incrementMinutes():t.decrementMinutes()),e.preventDefault()})},this.setupInputEvents=function(e,n){if(t.readonlyInput)return t.updateHours=angular.noop,void(t.updateMinutes=angular.noop);var i=function(e,n){p.$setViewValue(null),p.$setValidity("time",!1),angular.isDefined(e)&&(t.invalidHours=e),angular.isDefined(n)&&(t.invalidMinutes=n)};t.updateHours=function(){var t=a();angular.isDefined(t)?(f.setHours(t),u("h")):i(!0)},e.bind("blur",function(){!t.invalidHours&&t.hours<10&&t.$apply(function(){t.hours=l(t.hours)})}),t.updateMinutes=function(){var t=s();angular.isDefined(t)?(f.setMinutes(t),u("m")):i(void 0,!0)},n.bind("blur",function(){!t.invalidMinutes&&t.minutes<10&&t.$apply(function(){t.minutes=l(t.minutes)})})},this.render=function(){var t=p.$modelValue?new Date(p.$modelValue):null;isNaN(t)?(p.$setValidity("time",!1),i.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(t&&(f=t),c(),d())},t.incrementHours=function(){h(60*m)},t.decrementHours=function(){h(60*-m)},t.incrementMinutes=function(){h(v)},t.decrementMinutes=function(){h(-v)},t.toggleMeridian=function(){h(720*(f.getHours()<12?1:-1))}}]).directive("timepicker",function(){return{restrict:"EA",require:["timepicker","?^ngModel"],controller:"TimepickerController",replace:!0,scope:{},templateUrl:"template/timepicker/timepicker.html",link:function(t,e,n,i){var r=i[0],o=i[1];o&&r.init(o,e.find("input"))}}}),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.position","ui.bootstrap.bindHtml"]).factory("typeaheadParser",["$parse",function(t){var e=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(n){var i=n.match(e);if(!i)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+n+'".');return{itemName:i[3],source:t(i[4]),viewMapper:t(i[2]||i[1]),modelMapper:t(i[1])}}}}]).directive("typeahead",["$compile","$parse","$q","$timeout","$document","$position","typeaheadParser",function(t,e,n,i,r,o,a){var s=[9,13,27,38,40];return{require:"ngModel",link:function(l,u,c,d){var h,f=l.$eval(c.typeaheadMinLength)||1,p=l.$eval(c.typeaheadWaitMs)||0,g=l.$eval(c.typeaheadEditable)!==!1,m=e(c.typeaheadLoading).assign||angular.noop,v=e(c.typeaheadOnSelect),y=c.typeaheadInputFormatter?e(c.typeaheadInputFormatter):void 0,b=c.typeaheadAppendToBody?l.$eval(c.typeaheadAppendToBody):!1,x=l.$eval(c.typeaheadFocusFirst)!==!1,w=e(c.ngModel).assign,$=a.parse(c.typeahead),k=l.$new();l.$on("$destroy",function(){k.$destroy()});var _="typeahead-"+k.$id+"-"+Math.floor(1e4*Math.random());u.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":_});var C=angular.element("<div typeahead-popup></div>");C.attr({id:_,matches:"matches",active:"activeIdx",select:"select(activeIdx)",query:"query",position:"position"}),angular.isDefined(c.typeaheadTemplateUrl)&&C.attr("template-url",c.typeaheadTemplateUrl);var M=function(){k.matches=[],k.activeIdx=-1,u.attr("aria-expanded",!1)},D=function(t){return _+"-option-"+t};k.$watch("activeIdx",function(t){0>t?u.removeAttr("aria-activedescendant"):u.attr("aria-activedescendant",D(t))});var S=function(t){var e={$viewValue:t};m(l,!0),n.when($.source(l,e)).then(function(n){var i=t===d.$viewValue;if(i&&h)if(n.length>0){k.activeIdx=x?0:-1,k.matches.length=0;for(var r=0;r<n.length;r++)e[$.itemName]=n[r],k.matches.push({id:D(r),label:$.viewMapper(k,e),model:n[r]});k.query=t,k.position=b?o.offset(u):o.position(u),k.position.top=k.position.top+u.prop("offsetHeight"),u.attr("aria-expanded",!0)}else M();i&&m(l,!1)},function(){M(),m(l,!1)})};M(),k.query=void 0;var T,A=function(t){T=i(function(){S(t)},p)},E=function(){T&&i.cancel(T)};d.$parsers.unshift(function(t){return h=!0,t&&t.length>=f?p>0?(E(),A(t)):S(t):(m(l,!1),E(),M()),g?t:t?void d.$setValidity("editable",!1):(d.$setValidity("editable",!0),t)}),d.$formatters.push(function(t){var e,n,i={};return y?(i.$model=t,y(l,i)):(i[$.itemName]=t,e=$.viewMapper(l,i),i[$.itemName]=void 0,n=$.viewMapper(l,i),e!==n?e:t)}),k.select=function(t){var e,n,r={};r[$.itemName]=n=k.matches[t].model,e=$.modelMapper(l,r),w(l,e),d.$setValidity("editable",!0),v(l,{$item:n,$model:e,$label:$.viewMapper(l,r)}),M(),i(function(){u[0].focus()},0,!1)},u.bind("keydown",function(t){0!==k.matches.length&&-1!==s.indexOf(t.which)&&(-1!=k.activeIdx||13!==t.which&&9!==t.which)&&(t.preventDefault(),40===t.which?(k.activeIdx=(k.activeIdx+1)%k.matches.length,k.$digest()):38===t.which?(k.activeIdx=(k.activeIdx>0?k.activeIdx:k.matches.length)-1,k.$digest()):13===t.which||9===t.which?k.$apply(function(){k.select(k.activeIdx)}):27===t.which&&(t.stopPropagation(),M(),k.$digest()))}),u.bind("blur",function(){h=!1});var O=function(t){u[0]!==t.target&&(M(),k.$digest())};r.bind("click",O),l.$on("$destroy",function(){r.unbind("click",O),b&&N.remove()});var N=t(C)(k);b?r.find("body").append(N):u.after(N)}}}]).directive("typeaheadPopup",function(){return{restrict:"EA",scope:{matches:"=",query:"=",active:"=",position:"=",select:"&"},replace:!0,templateUrl:"template/typeahead/typeahead-popup.html",link:function(t,e,n){t.templateUrl=n.templateUrl,t.isOpen=function(){return t.matches.length>0},t.isActive=function(e){return t.active==e},t.selectActive=function(e){t.active=e},t.selectMatch=function(e){t.select({activeIdx:e})}}}}).directive("typeaheadMatch",["$http","$templateCache","$compile","$parse",function(t,e,n,i){return{restrict:"EA",scope:{index:"=",match:"=",query:"="},link:function(r,o,a){var s=i(a.templateUrl)(r.$parent)||"template/typeahead/typeahead-match.html";t.get(s,{cache:e}).success(function(t){o.replaceWith(n(t.trim())(r))})}}}]).filter("typeaheadHighlight",function(){function t(t){return t.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}return function(e,n){return n?(""+e).replace(new RegExp(t(n),"gi"),"<strong>$&</strong>"):e}}),angular.module("template/accordion/accordion-group.html",[]).run(["$templateCache",function(t){t.put("template/accordion/accordion-group.html",'<div class="panel panel-default">\n  <div class="panel-heading">\n    <h4 class="panel-title">\n      <a href class="accordion-toggle" ng-click="toggleOpen()" accordion-transclude="heading"><span ng-class="{\'text-muted\': isDisabled}">{{heading}}</span></a>\n    </h4>\n  </div>\n  <div class="panel-collapse" collapse="!isOpen">\n	  <div class="panel-body" ng-transclude></div>\n  </div>\n</div>\n')}]),angular.module("template/accordion/accordion.html",[]).run(["$templateCache",function(t){t.put("template/accordion/accordion.html",'<div class="panel-group" ng-transclude></div>')}]),angular.module("template/alert/alert.html",[]).run(["$templateCache",function(t){t.put("template/alert/alert.html",'<div class="alert" ng-class="[\'alert-\' + (type || \'warning\'), closeable ? \'alert-dismissable\' : null]" role="alert">\n    <button ng-show="closeable" type="button" class="close" ng-click="close()">\n        <span aria-hidden="true">&times;</span>\n        <span class="sr-only">Close</span>\n    </button>\n    <div ng-transclude></div>\n</div>\n')}]),angular.module("template/carousel/carousel.html",[]).run(["$templateCache",function(t){t.put("template/carousel/carousel.html",'<div ng-mouseenter="pause()" ng-mouseleave="play()" class="carousel" ng-swipe-right="prev()" ng-swipe-left="next()">\n    <ol class="carousel-indicators" ng-show="slides.length > 1">\n        <li ng-repeat="slide in slides track by $index" ng-class="{active: isActive(slide)}" ng-click="select(slide)"></li>\n    </ol>\n    <div class="carousel-inner" ng-transclude></div>\n    <a class="left carousel-control" ng-click="prev()" ng-show="slides.length > 1"><span class="glyphicon glyphicon-chevron-left"></span></a>\n    <a class="right carousel-control" ng-click="next()" ng-show="slides.length > 1"><span class="glyphicon glyphicon-chevron-right"></span></a>\n</div>\n')}]),angular.module("template/carousel/slide.html",[]).run(["$templateCache",function(t){t.put("template/carousel/slide.html","<div ng-class=\"{\n    'active': leaving || (active && !entering),\n    'prev': (next || active) && direction=='prev',\n    'next': (next || active) && direction=='next',\n    'right': direction=='prev',\n    'left': direction=='next'\n  }\" class=\"item text-center\" ng-transclude></div>\n")}]),angular.module("template/datepicker/datepicker.html",[]).run(["$templateCache",function(t){t.put("template/datepicker/datepicker.html",'<div ng-switch="datepickerMode" role="application" ng-keydown="keydown($event)">\n  <daypicker ng-switch-when="day" tabindex="0"></daypicker>\n  <monthpicker ng-switch-when="month" tabindex="0"></monthpicker>\n  <yearpicker ng-switch-when="year" tabindex="0"></yearpicker>\n</div>')}]),angular.module("template/datepicker/day.html",[]).run(["$templateCache",function(t){t.put("template/datepicker/day.html",'<table role="grid" aria-labelledby="{{uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n  <thead>\n    <tr>\n      <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n      <th colspan="{{5 + showWeeks}}"><button id="{{uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>\n      <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n    </tr>\n    <tr>\n      <th ng-show="showWeeks" class="text-center"></th>\n      <th ng-repeat="label in labels track by $index" class="text-center"><small aria-label="{{label.full}}">{{label.abbr}}</small></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr ng-repeat="row in rows track by $index">\n      <td ng-show="showWeeks" class="text-center h6"><em>{{ weekNumbers[$index] }}</em></td>\n      <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{dt.uid}}" aria-disabled="{{!!dt.disabled}}">\n        <button type="button" style="width:100%;" class="btn btn-default btn-sm" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="{\'text-muted\': dt.secondary, \'text-info\': dt.current}">{{dt.label}}</span></button>\n      </td>\n    </tr>\n  </tbody>\n</table>\n')}]),angular.module("template/datepicker/month.html",[]).run(["$templateCache",function(t){t.put("template/datepicker/month.html",'<table role="grid" aria-labelledby="{{uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n  <thead>\n    <tr>\n      <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n      <th><button id="{{uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>\n      <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr ng-repeat="row in rows track by $index">\n      <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{dt.uid}}" aria-disabled="{{!!dt.disabled}}">\n        <button type="button" style="width:100%;" class="btn btn-default" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="{\'text-info\': dt.current}">{{dt.label}}</span></button>\n      </td>\n    </tr>\n  </tbody>\n</table>\n')}]),angular.module("template/datepicker/popup.html",[]).run(["$templateCache",function(t){t.put("template/datepicker/popup.html",'<ul class="dropdown-menu" ng-style="{display: (isOpen && \'block\') || \'none\', top: position.top+\'px\', left: position.left+\'px\'}" ng-keydown="keydown($event)">\n	<li ng-transclude></li>\n	<li ng-if="showButtonBar" style="padding:10px 9px 2px">\n		<span class="btn-group pull-left">\n			<button type="button" class="btn btn-sm btn-info" ng-click="select(\'today\')">{{ getText(\'current\') }}</button>\n			<button type="button" class="btn btn-sm btn-danger" ng-click="select(null)">{{ getText(\'clear\') }}</button>\n		</span>\n		<button type="button" class="btn btn-sm btn-success pull-right" ng-click="close()">{{ getText(\'close\') }}</button>\n	</li>\n</ul>\n')}]),angular.module("template/datepicker/year.html",[]).run(["$templateCache",function(t){t.put("template/datepicker/year.html",'<table role="grid" aria-labelledby="{{uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n  <thead>\n    <tr>\n      <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n      <th colspan="3"><button id="{{uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>\n      <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr ng-repeat="row in rows track by $index">\n      <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{dt.uid}}" aria-disabled="{{!!dt.disabled}}">\n        <button type="button" style="width:100%;" class="btn btn-default" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="{\'text-info\': dt.current}">{{dt.label}}</span></button>\n      </td>\n    </tr>\n  </tbody>\n</table>\n')}]),angular.module("template/modal/backdrop.html",[]).run(["$templateCache",function(t){t.put("template/modal/backdrop.html",'<div class="modal-backdrop fade {{ backdropClass }}"\n     ng-class="{in: animate}"\n     ng-style="{\'z-index\': 1040 + (index && 1 || 0) + index*10}"\n></div>\n')}]),angular.module("template/modal/window.html",[]).run(["$templateCache",function(t){t.put("template/modal/window.html",'<div tabindex="-1" role="dialog" class="modal fade" ng-class="{in: animate}" ng-style="{\'z-index\': 1050 + index*10, display: \'block\'}" ng-click="close($event)">\n    <div class="modal-dialog" ng-class="{\'modal-sm\': size == \'sm\', \'modal-lg\': size == \'lg\'}"><div class="modal-content" modal-transclude></div></div>\n</div>')}]),angular.module("template/pagination/pager.html",[]).run(["$templateCache",function(t){t.put("template/pagination/pager.html",'<ul class="pager">\n  <li ng-class="{disabled: noPrevious(), previous: align}"><a href ng-click="selectPage(page - 1)">{{getText(\'previous\')}}</a></li>\n  <li ng-class="{disabled: noNext(), next: align}"><a href ng-click="selectPage(page + 1)">{{getText(\'next\')}}</a></li>\n</ul>')}]),angular.module("template/pagination/pagination.html",[]).run(["$templateCache",function(t){t.put("template/pagination/pagination.html",'<ul class="pagination">\n  <li ng-if="boundaryLinks" ng-class="{disabled: noPrevious()}"><a href ng-click="selectPage(1)">{{getText(\'first\')}}</a></li>\n  <li ng-if="directionLinks" ng-class="{disabled: noPrevious()}"><a href ng-click="selectPage(page - 1)">{{getText(\'previous\')}}</a></li>\n  <li ng-repeat="page in pages track by $index" ng-class="{active: page.active}"><a href ng-click="selectPage(page.number)">{{page.text}}</a></li>\n  <li ng-if="directionLinks" ng-class="{disabled: noNext()}"><a href ng-click="selectPage(page + 1)">{{getText(\'next\')}}</a></li>\n  <li ng-if="boundaryLinks" ng-class="{disabled: noNext()}"><a href ng-click="selectPage(totalPages)">{{getText(\'last\')}}</a></li>\n</ul>')}]),angular.module("template/tooltip/tooltip-html-unsafe-popup.html",[]).run(["$templateCache",function(t){t.put("template/tooltip/tooltip-html-unsafe-popup.html",'<div class="tooltip {{placement}}" ng-class="{ in: isOpen(), fade: animation() }">\n  <div class="tooltip-arrow"></div>\n  <div class="tooltip-inner" bind-html-unsafe="content"></div>\n</div>\n')}]),angular.module("template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(t){t.put("template/tooltip/tooltip-popup.html",'<div class="tooltip {{placement}}" ng-class="{ in: isOpen(), fade: animation() }">\n  <div class="tooltip-arrow"></div>\n  <div class="tooltip-inner" ng-bind="content"></div>\n</div>\n')}]),angular.module("template/popover/popover.html",[]).run(["$templateCache",function(t){t.put("template/popover/popover.html",'<div class="popover {{placement}}" ng-class="{ in: isOpen(), fade: animation() }">\n  <div class="arrow"></div>\n\n  <div class="popover-inner">\n      <h3 class="popover-title" ng-bind="title" ng-show="title"></h3>\n      <div class="popover-content" ng-bind="content"></div>\n  </div>\n</div>\n')}]),angular.module("template/progressbar/bar.html",[]).run(["$templateCache",function(t){t.put("template/progressbar/bar.html",'<div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: percent + \'%\'}" aria-valuetext="{{percent | number:0}}%" ng-transclude></div>')}]),angular.module("template/progressbar/progress.html",[]).run(["$templateCache",function(t){t.put("template/progressbar/progress.html",'<div class="progress" ng-transclude></div>')}]),angular.module("template/progressbar/progressbar.html",[]).run(["$templateCache",function(t){t.put("template/progressbar/progressbar.html",'<div class="progress">\n  <div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: percent + \'%\'}" aria-valuetext="{{percent | number:0}}%" ng-transclude></div>\n</div>')}]),angular.module("template/rating/rating.html",[]).run(["$templateCache",function(t){t.put("template/rating/rating.html",'<span ng-mouseleave="reset()" ng-keydown="onKeydown($event)" tabindex="0" role="slider" aria-valuemin="0" aria-valuemax="{{range.length}}" aria-valuenow="{{value}}">\n    <i ng-repeat="r in range track by $index" ng-mouseenter="enter($index + 1)" ng-click="rate($index + 1)" class="glyphicon" ng-class="$index < value && (r.stateOn || \'glyphicon-star\') || (r.stateOff || \'glyphicon-star-empty\')">\n        <span class="sr-only">({{ $index < value ? \'*\' : \' \' }})</span>\n    </i>\n</span>')}]),angular.module("template/tabs/tab.html",[]).run(["$templateCache",function(t){t.put("template/tabs/tab.html",'<li ng-class="{active: active, disabled: disabled}">\n  <a href ng-click="select()" tab-heading-transclude>{{heading}}</a>\n</li>\n')}]),angular.module("template/tabs/tabset.html",[]).run(["$templateCache",function(t){t.put("template/tabs/tabset.html",'<div>\n  <ul class="nav nav-{{type || \'tabs\'}}" ng-class="{\'nav-stacked\': vertical, \'nav-justified\': justified}" ng-transclude></ul>\n  <div class="tab-content">\n    <div class="tab-pane" \n         ng-repeat="tab in tabs" \n         ng-class="{active: tab.active}"\n         tab-content-transclude="tab">\n    </div>\n  </div>\n</div>\n')}]),angular.module("template/timepicker/timepicker.html",[]).run(["$templateCache",function(t){t.put("template/timepicker/timepicker.html",'<table>\n	<tbody>\n		<tr class="text-center">\n			<td><a ng-click="incrementHours()" class="btn btn-link"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n			<td>&nbsp;</td>\n			<td><a ng-click="incrementMinutes()" class="btn btn-link"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n			<td ng-show="showMeridian"></td>\n		</tr>\n		<tr>\n			<td style="width:50px;" class="form-group" ng-class="{\'has-error\': invalidHours}">\n				<input type="text" ng-model="hours" ng-change="updateHours()" class="form-control text-center" ng-mousewheel="incrementHours()" ng-readonly="readonlyInput" maxlength="2">\n			</td>\n			<td>:</td>\n			<td style="width:50px;" class="form-group" ng-class="{\'has-error\': invalidMinutes}">\n				<input type="text" ng-model="minutes" ng-change="updateMinutes()" class="form-control text-center" ng-readonly="readonlyInput" maxlength="2">\n			</td>\n			<td ng-show="showMeridian"><button type="button" class="btn btn-default text-center" ng-click="toggleMeridian()">{{meridian}}</button></td>\n		</tr>\n		<tr class="text-center">\n			<td><a ng-click="decrementHours()" class="btn btn-link"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n			<td>&nbsp;</td>\n			<td><a ng-click="decrementMinutes()" class="btn btn-link"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n			<td ng-show="showMeridian"></td>\n		</tr>\n	</tbody>\n</table>\n')}]),angular.module("template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(t){t.put("template/typeahead/typeahead-match.html",'<a tabindex="-1" bind-html-unsafe="match.label | typeaheadHighlight:query"></a>')
}]),angular.module("template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(t){t.put("template/typeahead/typeahead-popup.html",'<ul class="dropdown-menu" ng-show="isOpen()" ng-style="{top: position.top+\'px\', left: position.left+\'px\'}" style="display: block;" role="listbox" aria-hidden="{{!isOpen()}}">\n    <li ng-repeat="match in matches track by $index" ng-class="{active: isActive($index) }" ng-mouseenter="selectActive($index)" ng-click="selectMatch($index)" role="option" id="{{match.id}}">\n        <div typeahead-match index="$index" match="match" query="query" template-url="templateUrl"></div>\n    </li>\n</ul>\n')}]);