/*eslint-disable no-unused-vars*/
/*!
 * jQuery JavaScript Library v3.1.0
 * https://jquery.com/
 *
 * Includes Sizzle.js
 * https://sizzlejs.com/
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license
 * https://jquery.org/license
 *
 * Date: 2016-07-07T21:44Z
 */
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";function n(e,t){t=t||J;var n=t.createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}function i(e){var t=!!e&&"length"in e&&e.length,n=he.type(e);return"function"!==n&&!he.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function r(e,t,n){if(he.isFunction(t))return he.grep(e,function(e,i){return!!t.call(e,i,e)!==n});if(t.nodeType)return he.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(xe.test(t))return he.filter(t,e,n);t=he.filter(t,e)}return he.grep(e,function(e){return re.call(t,e)>-1!==n&&1===e.nodeType})}function o(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function a(e){var t={};return he.each(e.match(ke)||[],function(e,n){t[n]=!0}),t}function s(e){return e}function l(e){throw e}function u(e,t,n){var i;try{e&&he.isFunction(i=e.promise)?i.call(e).done(t).fail(n):e&&he.isFunction(i=e.then)?i.call(e,t,n):t.call(void 0,e)}catch(e){n.call(void 0,e)}}function c(){J.removeEventListener("DOMContentLoaded",c),e.removeEventListener("load",c),he.ready()}function f(){this.expando=he.expando+f.uid++}function h(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(Re,"-$&").toLowerCase(),n=e.getAttribute(i),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:$e.test(n)?JSON.parse(n):n)}catch(r){}Le.set(e,t,n)}else n=void 0;return n}function d(e,t,n,i){var r,o=1,a=20,s=i?function(){return i.cur()}:function(){return he.css(e,t,"")},l=s(),u=n&&n[3]||(he.cssNumber[t]?"":"px"),c=(he.cssNumber[t]||"px"!==u&&+l)&&Fe.exec(he.css(e,t));if(c&&c[3]!==u){u=u||c[3],n=n||[],c=+l||1;do o=o||".5",c/=o,he.style(e,t,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 p(e){var t,n=e.ownerDocument,i=e.nodeName,r=ze[i];return r?r:(t=n.body.appendChild(n.createElement(i)),r=he.css(t,"display"),t.parentNode.removeChild(t),"none"===r&&(r="block"),ze[i]=r,r)}function g(e,t){for(var n,i,r=[],o=0,a=e.length;o<a;o++)i=e[o],i.style&&(n=i.style.display,t?("none"===n&&(r[o]=De.get(i,"display")||null,r[o]||(i.style.display="")),""===i.style.display&&je(i)&&(r[o]=p(i))):"none"!==n&&(r[o]="none",De.set(i,"display",n)));for(o=0;o<a;o++)null!=r[o]&&(e[o].style.display=r[o]);return e}function m(e,t){var n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&he.nodeName(e,t)?he.merge([e],n):n}function v(e,t){for(var n=0,i=e.length;n<i;n++)De.set(e[n],"globalEval",!t||De.get(t[n],"globalEval"))}function y(e,t,n,i,r){for(var o,a,s,l,u,c,f=t.createDocumentFragment(),h=[],d=0,p=e.length;d<p;d++)if(o=e[d],o||0===o)if("object"===he.type(o))he.merge(h,o.nodeType?[o]:o);else if(Ge.test(o)){for(a=a||f.appendChild(t.createElement("div")),s=(qe.exec(o)||["",""])[1].toLowerCase(),l=Ye[s]||Ye._default,a.innerHTML=l[1]+he.htmlPrefilter(o)+l[2],c=l[0];c--;)a=a.lastChild;he.merge(h,a.childNodes),a=f.firstChild,a.textContent=""}else h.push(t.createTextNode(o));for(f.textContent="",d=0;o=h[d++];)if(i&&he.inArray(o,i)>-1)r&&r.push(o);else if(u=he.contains(o.ownerDocument,o),a=m(f.appendChild(o),"script"),u&&v(a),n)for(c=0;o=a[c++];)We.test(o.type||"")&&n.push(o);return f}function b(){return!0}function _(){return!1}function E(){try{return J.activeElement}catch(e){}}function x(e,t,n,i,r,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(i=i||n,n=void 0);for(s in t)x(e,s,n,i,t[s],o);return e}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=_;else if(!r)return e;return 1===o&&(a=r,r=function(e){return he().off(e),a.apply(this,arguments)},r.guid=a.guid||(a.guid=he.guid++)),e.each(function(){he.event.add(this,t,r,i,n)})}function w(e,t){return he.nodeName(e,"table")&&he.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e:e}function T(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function S(e){var t=tt.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function A(e,t){var n,i,r,o,a,s,l,u;if(1===t.nodeType){if(De.hasData(e)&&(o=De.access(e),a=De.set(t,o),u=o.events)){delete a.handle,a.events={};for(r in u)for(n=0,i=u[r].length;n<i;n++)he.event.add(t,r,u[r][n])}Le.hasData(e)&&(s=Le.access(e),l=he.extend({},s),Le.set(t,l))}}function C(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Be.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function k(e,t,i,r){t=ne.apply([],t);var o,a,s,l,u,c,f=0,h=e.length,d=h-1,p=t[0],g=he.isFunction(p);if(g||h>1&&"string"==typeof p&&!ce.checkClone&&et.test(p))return e.each(function(n){var o=e.eq(n);g&&(t[0]=p.call(this,n,o.html())),k(o,t,i,r)});if(h&&(o=y(t,e[0].ownerDocument,!1,e,r),a=o.firstChild,1===o.childNodes.length&&(o=a),a||r)){for(s=he.map(m(o,"script"),T),l=s.length;f<h;f++)u=o,f!==d&&(u=he.clone(u,!0,!0),l&&he.merge(s,m(u,"script"))),i.call(e[f],u,f);if(l)for(c=s[s.length-1].ownerDocument,he.map(s,S),f=0;f<l;f++)u=s[f],We.test(u.type||"")&&!De.access(u,"globalEval")&&he.contains(c,u)&&(u.src?he._evalUrl&&he._evalUrl(u.src):n(u.textContent.replace(nt,""),c))}return e}function O(e,t,n){for(var i,r=t?he.filter(t,e):e,o=0;null!=(i=r[o]);o++)n||1!==i.nodeType||he.cleanData(m(i)),i.parentNode&&(n&&he.contains(i.ownerDocument,i)&&v(m(i,"script")),i.parentNode.removeChild(i));return e}function I(e,t,n){var i,r,o,a,s=e.style;return n=n||ot(e),n&&(a=n.getPropertyValue(t)||n[t],""!==a||he.contains(e.ownerDocument,e)||(a=he.style(e,t)),!ce.pixelMarginRight()&&rt.test(a)&&it.test(t)&&(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 N(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function M(e){if(e in ct)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=ut.length;n--;)if(e=ut[n]+t,e in ct)return e}function D(e,t,n){var i=Fe.exec(t);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):t}function L(e,t,n,i,r){for(var o=n===(i?"border":"content")?4:"width"===t?1:0,a=0;o<4;o+=2)"margin"===n&&(a+=he.css(e,n+Ue[o],!0,r)),i?("content"===n&&(a-=he.css(e,"padding"+Ue[o],!0,r)),"margin"!==n&&(a-=he.css(e,"border"+Ue[o]+"Width",!0,r))):(a+=he.css(e,"padding"+Ue[o],!0,r),"padding"!==n&&(a+=he.css(e,"border"+Ue[o]+"Width",!0,r)));return a}function $(e,t,n){var i,r=!0,o=ot(e),a="border-box"===he.css(e,"boxSizing",!1,o);if(e.getClientRects().length&&(i=e.getBoundingClientRect()[t]),i<=0||null==i){if(i=I(e,t,o),(i<0||null==i)&&(i=e.style[t]),rt.test(i))return i;r=a&&(ce.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+L(e,t,n||(a?"border":"content"),r,o)+"px"}function R(e,t,n,i,r){return new R.prototype.init(e,t,n,i,r)}function P(){ht&&(e.requestAnimationFrame(P),he.fx.tick())}function F(){return e.setTimeout(function(){ft=void 0}),ft=he.now()}function U(e,t){var n,i=0,r={height:e};for(t=t?1:0;i<4;i+=2-t)n=Ue[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function j(e,t,n){for(var i,r=(B.tweeners[t]||[]).concat(B.tweeners["*"]),o=0,a=r.length;o<a;o++)if(i=r[o].call(n,t,e))return i}function H(e,t,n){var i,r,o,a,s,l,u,c,f="width"in t||"height"in t,h=this,d={},p=e.style,m=e.nodeType&&je(e),v=De.get(e,"fxshow");n.queue||(a=he._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,h.always(function(){h.always(function(){a.unqueued--,he.queue(e,"fx").length||a.empty.fire()})}));for(i in t)if(r=t[i],dt.test(r)){if(delete t[i],o=o||"toggle"===r,r===(m?"hide":"show")){if("show"!==r||!v||void 0===v[i])continue;m=!0}d[i]=v&&v[i]||he.style(e,i)}if(l=!he.isEmptyObject(t),l||!he.isEmptyObject(d)){f&&1===e.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],u=v&&v.display,null==u&&(u=De.get(e,"display")),c=he.css(e,"display"),"none"===c&&(u?c=u:(g([e],!0),u=e.style.display||u,c=he.css(e,"display"),g([e]))),("inline"===c||"inline-block"===c&&null!=u)&&"none"===he.css(e,"float")&&(l||(h.done(function(){p.display=u}),null==u&&(c=p.display,u="none"===c?"":c)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",h.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]})),l=!1;for(i in d)l||(v?"hidden"in v&&(m=v.hidden):v=De.access(e,"fxshow",{display:u}),o&&(v.hidden=!m),m&&g([e],!0),h.done(function(){m||g([e]),De.remove(e,"fxshow");for(i in d)he.style(e,i,d[i])})),l=j(m?v[i]:0,i,h),i in v||(v[i]=l.start,m&&(l.end=l.start,l.start=0))}}function z(e,t){var n,i,r,o,a;for(n in e)if(i=he.camelCase(n),r=t[i],o=e[n],he.isArray(o)&&(r=o[1],o=e[n]=o[0]),n!==i&&(e[i]=o,delete e[n]),a=he.cssHooks[i],a&&"expand"in a){o=a.expand(o),delete e[i];for(n in o)n in e||(e[n]=o[n],t[n]=r)}else t[i]=r}function B(e,t,n){var i,r,o=0,a=B.prefilters.length,s=he.Deferred().always(function(){delete l.elem}),l=function(){if(r)return!1;for(var t=ft||F(),n=Math.max(0,u.startTime+u.duration-t),i=n/u.duration||0,o=1-i,a=0,l=u.tweens.length;a<l;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),o<1&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:he.extend({},t),opts:he.extend(!0,{specialEasing:{},easing:he.easing._default},n),originalProperties:t,originalOptions:n,startTime:ft||F(),duration:n.duration,tweens:[],createTween:function(t,n){var i=he.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(i),i},stop:function(t){var n=0,i=t?u.tweens.length:0;if(r)return this;for(r=!0;n<i;n++)u.tweens[n].run(1);return t?(s.notifyWith(e,[u,1,0]),s.resolveWith(e,[u,t])):s.rejectWith(e,[u,t]),this}}),c=u.props;for(z(c,u.opts.specialEasing);o<a;o++)if(i=B.prefilters[o].call(u,e,c,u.opts))return he.isFunction(i.stop)&&(he._queueHooks(u.elem,u.opts.queue).stop=he.proxy(i.stop,i)),i;return he.map(c,j,u),he.isFunction(u.opts.start)&&u.opts.start.call(e,u),he.fx.timer(he.extend(l,{elem:e,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 q(e){return e.getAttribute&&e.getAttribute("class")||""}function W(e,t,n,i){var r;if(he.isArray(t))he.each(t,function(t,r){n||At.test(e)?i(e,r):W(e+"["+("object"==typeof r&&null!=r?t:"")+"]",r,n,i)});else if(n||"object"!==he.type(t))i(e,t);else for(r in t)W(e+"["+r+"]",t[r],n,i)}function Y(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,r=0,o=t.toLowerCase().match(ke)||[];if(he.isFunction(n))for(;i=o[r++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function G(e,t,n,i){function r(s){var l;return o[s]=!0,he.each(e[s]||[],function(e,s){var u=s(t,n,i);return"string"!=typeof u||a||o[u]?a?!(l=u):void 0:(t.dataTypes.unshift(u),r(u),!1)}),l}var o={},a=e===Ft;return r(t.dataTypes[0])||!o["*"]&&r("*")}function X(e,t){var n,i,r=he.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((r[n]?e:i||(i={}))[n]=t[n]);return i&&he.extend(!0,e,i),e}function V(e,t,n){for(var i,r,o,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=e.mimeType||t.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]||e.converters[r+" "+l[0]]){o=r;break}a||(a=r)}o=o||a}if(o)return o!==l[0]&&l.unshift(o),n[o]}function K(e,t,n,i){var r,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.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&&e["throws"])t=a(t);else try{t=a(t)}catch(f){return{state:"parsererror",error:a?f:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}function Z(e){return he.isWindow(e)?e:9===e.nodeType&&e.defaultView}var Q=[],J=e.document,ee=Object.getPrototypeOf,te=Q.slice,ne=Q.concat,ie=Q.push,re=Q.indexOf,oe={},ae=oe.toString,se=oe.hasOwnProperty,le=se.toString,ue=le.call(Object),ce={},fe="3.1.0",he=function(e,t){return new he.fn.init(e,t)},de=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,pe=/^-ms-/,ge=/-([a-z])/g,me=function(e,t){return t.toUpperCase()};he.fn=he.prototype={jquery:fe,constructor:he,length:0,toArray:function(){return te.call(this)},get:function(e){return null!=e?e<0?this[e+this.length]:this[e]:te.call(this)},pushStack:function(e){var t=he.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return he.each(this,e)},map:function(e){return this.pushStack(he.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(te.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:ie,sort:Q.sort,splice:Q.splice},he.extend=he.fn.extend=function(){var e,t,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||he.isFunction(a)||(a={}),s===l&&(a=this,s--);s<l;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],i=e[t],a!==i&&(u&&i&&(he.isPlainObject(i)||(r=he.isArray(i)))?(r?(r=!1,o=n&&he.isArray(n)?n:[]):o=n&&he.isPlainObject(n)?n:{},a[t]=he.extend(u,o,i)):void 0!==i&&(a[t]=i));return a},he.extend({expando:"jQuery"+(fe+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===he.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=he.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==ae.call(e))&&(!(t=ee(e))||(n=se.call(t,"constructor")&&t.constructor,"function"==typeof n&&le.call(n)===ue))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?oe[ae.call(e)]||"object":typeof e},globalEval:function(e){n(e)},camelCase:function(e){return e.replace(pe,"ms-").replace(ge,me)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var n,r=0;if(i(e))for(n=e.length;r<n&&t.call(e[r],r,e[r])!==!1;r++);else for(r in e)if(t.call(e[r],r,e[r])===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(de,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(i(Object(e))?he.merge(n,"string"==typeof e?[e]:e):ie.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:re.call(t,e,n)},merge:function(e,t){for(var n=+t.length,i=0,r=e.length;i<n;i++)e[r++]=t[i];return e.length=r,e},grep:function(e,t,n){for(var i,r=[],o=0,a=e.length,s=!n;o<a;o++)i=!t(e[o],o),i!==s&&r.push(e[o]);return r},map:function(e,t,n){var r,o,a=0,s=[];if(i(e))for(r=e.length;a<r;a++)o=t(e[a],a,n),null!=o&&s.push(o);else for(a in e)o=t(e[a],a,n),null!=o&&s.push(o);return ne.apply([],s)},guid:1,proxy:function(e,t){var n,i,r;if("string"==typeof t&&(n=e[t],t=e,e=n),he.isFunction(e))return i=te.call(arguments,2),r=function(){return e.apply(t||this,i.concat(te.call(arguments)))},r.guid=e.guid=e.guid||he.guid++,r},now:Date.now,support:ce}),"function"==typeof Symbol&&(he.fn[Symbol.iterator]=Q[Symbol.iterator]),he.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){oe["[object "+t+"]"]=t.toLowerCase()});var ve=/*!
 * Sizzle CSS Selector Engine v2.3.0
 * https://sizzlejs.com/
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license
 * http://jquery.org/license
 *
 * Date: 2016-01-04
 */
function(e){function t(e,t,n,i){var r,o,a,s,l,u,c,h=t&&t.ownerDocument,p=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==p&&9!==p&&11!==p)return n;if(!i&&((t?t.ownerDocument||t:H)!==D&&M(t),t=t||D,$)){if(11!==p&&(l=ve.exec(e)))if(r=l[1]){if(9===p){if(!(a=t.getElementById(r)))return n;if(a.id===r)return n.push(a),n}else if(h&&(a=h.getElementById(r))&&U(t,a)&&a.id===r)return n.push(a),n}else{if(l[2])return Q.apply(n,t.getElementsByTagName(e)),n;if((r=l[3])&&x.getElementsByClassName&&t.getElementsByClassName)return Q.apply(n,t.getElementsByClassName(r)),n}if(x.qsa&&!Y[e+" "]&&(!R||!R.test(e))){if(1!==p)h=t,c=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(Ee,xe):t.setAttribute("id",s=j),u=A(e),o=u.length;o--;)u[o]="#"+s+" "+d(u[o]);c=u.join(","),h=ye.test(e)&&f(t.parentNode)||t}if(c)try{return Q.apply(n,h.querySelectorAll(c)),n}catch(g){}finally{s===j&&t.removeAttribute("id")}}}return k(e.replace(se,"$1"),t,n,i)}function n(){function e(n,i){return t.push(n+" ")>w.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function i(e){return e[j]=!0,e}function r(e){var t=D.createElement("fieldset");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),i=n.length;i--;)w.attrHandle[n[i]]=t}function a(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function u(e){return function(t){return"label"in t&&t.disabled===e||"form"in t&&t.disabled===e||"form"in t&&t.disabled===!1&&(t.isDisabled===e||t.isDisabled!==!e&&("label"in t||!Te(t))!==e)}}function c(e){return i(function(t){return t=+t,i(function(n,i){for(var r,o=e([],n.length,t),a=o.length;a--;)n[r=o[a]]&&(n[r]=!(i[r]=n[r]))})})}function f(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function h(){}function d(e){for(var t=0,n=e.length,i="";t<n;t++)i+=e[t].value;return i}function p(e,t,n){var i=t.dir,r=t.next,o=r||i,a=n&&"parentNode"===o,s=B++;return t.first?function(t,n,r){for(;t=t[i];)if(1===t.nodeType||a)return e(t,n,r)}:function(t,n,l){var u,c,f,h=[z,s];if(l){for(;t=t[i];)if((1===t.nodeType||a)&&e(t,n,l))return!0}else for(;t=t[i];)if(1===t.nodeType||a)if(f=t[j]||(t[j]={}),c=f[t.uniqueID]||(f[t.uniqueID]={}),r&&r===t.nodeName.toLowerCase())t=t[i]||t;else{if((u=c[o])&&u[0]===z&&u[1]===s)return h[2]=u[2];if(c[o]=h,h[2]=e(t,n,l))return!0}}}function g(e){return e.length>1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function m(e,n,i){for(var r=0,o=n.length;r<o;r++)t(e,n[r],i);return i}function v(e,t,n,i,r){for(var o,a=[],s=0,l=e.length,u=null!=t;s<l;s++)(o=e[s])&&(n&&!n(o,i,r)||(a.push(o),u&&t.push(s)));return a}function y(e,t,n,r,o,a){return r&&!r[j]&&(r=y(r)),o&&!o[j]&&(o=y(o,a)),i(function(i,a,s,l){var u,c,f,h=[],d=[],p=a.length,g=i||m(t||"*",s.nodeType?[s]:s,[]),y=!e||!i&&t?g:v(g,h,e,s,l),b=n?o||(i?e:p||r)?[]:a:y;if(n&&n(y,b,s,l),r)for(u=v(b,d),r(u,[],s,l),c=u.length;c--;)(f=u[c])&&(b[d[c]]=!(y[d[c]]=f));if(i){if(o||e){if(o){for(u=[],c=b.length;c--;)(f=b[c])&&u.push(y[c]=f);o(null,b=[],u,l)}for(c=b.length;c--;)(f=b[c])&&(u=o?ee(i,f):h[c])>-1&&(i[u]=!(a[u]=f))}}else b=v(b===a?b.splice(p,b.length):b),o?o(null,a,b,l):Q.apply(a,b)})}function b(e){for(var t,n,i,r=e.length,o=w.relative[e[0].type],a=o||w.relative[" "],s=o?1:0,l=p(function(e){return e===t},a,!0),u=p(function(e){return ee(t,e)>-1},a,!0),c=[function(e,n,i){var r=!o&&(i||n!==O)||((t=n).nodeType?l(e,n,i):u(e,n,i));return t=null,r}];s<r;s++)if(n=w.relative[e[s].type])c=[p(g(c),n)];else{if(n=w.filter[e[s].type].apply(null,e[s].matches),n[j]){for(i=++s;i<r&&!w.relative[e[i].type];i++);return y(s>1&&g(c),s>1&&d(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,s<i&&b(e.slice(s,i)),i<r&&b(e=e.slice(i)),i<r&&d(e))}c.push(n)}return g(c)}function _(e,n){var r=n.length>0,o=e.length>0,a=function(i,a,s,l,u){var c,f,h,d=0,p="0",g=i&&[],m=[],y=O,b=i||o&&w.find.TAG("*",u),_=z+=null==y?1:Math.random()||.1,E=b.length;for(u&&(O=a===D||a||u);p!==E&&null!=(c=b[p]);p++){if(o&&c){for(f=0,a||c.ownerDocument===D||(M(c),s=!$);h=e[f++];)if(h(c,a||D,s)){l.push(c);break}u&&(z=_)}r&&((c=!h&&c)&&d--,i&&g.push(c))}if(d+=p,r&&p!==d){for(f=0;h=n[f++];)h(g,m,a,s);if(i){if(d>0)for(;p--;)g[p]||m[p]||(m[p]=K.call(l));m=v(m)}Q.apply(l,m),u&&!i&&m.length>0&&d+n.length>1&&t.uniqueSort(l)}return u&&(z=_,O=y),g};return r?i(a):a}var E,x,w,T,S,A,C,k,O,I,N,M,D,L,$,R,P,F,U,j="sizzle"+1*new Date,H=e.document,z=0,B=0,q=n(),W=n(),Y=n(),G=function(e,t){return e===t&&(N=!0),0},X={}.hasOwnProperty,V=[],K=V.pop,Z=V.push,Q=V.push,J=V.slice,ee=function(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1},te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",ie="(?:\\\\.|[\\w-]|[^\0-\\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"),fe=new RegExp(oe),he=new RegExp("^"+ie+"$"),de={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("^(?:"+te+")$","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=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),_e=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},Ee=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,xe=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},we=function(){M()},Te=p(function(e){return e.disabled===!0},{dir:"parentNode",next:"legend"});try{Q.apply(V=J.call(H.childNodes),H.childNodes),V[H.childNodes.length].nodeType}catch(Se){Q={apply:V.length?function(e,t){Z.apply(e,J.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}x=t.support={},S=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},M=t.setDocument=function(e){var t,n,i=e?e.ownerDocument||e:H;return i!==D&&9===i.nodeType&&i.documentElement?(D=i,L=D.documentElement,$=!S(D),H!==D&&(n=D.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",we,!1):n.attachEvent&&n.attachEvent("onunload",we)),x.attributes=r(function(e){return e.className="i",!e.getAttribute("className")}),x.getElementsByTagName=r(function(e){return e.appendChild(D.createComment("")),!e.getElementsByTagName("*").length}),x.getElementsByClassName=me.test(D.getElementsByClassName),x.getById=r(function(e){return L.appendChild(e).id=j,!D.getElementsByName||!D.getElementsByName(j).length}),x.getById?(w.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&$){var n=t.getElementById(e);return n?[n]:[]}},w.filter.ID=function(e){var t=e.replace(be,_e);return function(e){return e.getAttribute("id")===t}}):(delete w.find.ID,w.filter.ID=function(e){var t=e.replace(be,_e);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),w.find.TAG=x.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):x.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],r=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},w.find.CLASS=x.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&$)return t.getElementsByClassName(e)},P=[],R=[],(x.qsa=me.test(D.querySelectorAll))&&(r(function(e){L.appendChild(e).innerHTML="<a id='"+j+"'></a><select id='"+j+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&R.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||R.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+j+"-]").length||R.push("~="),e.querySelectorAll(":checked").length||R.push(":checked"),e.querySelectorAll("a#"+j+"+*").length||R.push(".#.+[+~]")}),r(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=D.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&R.push("name"+ne+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&R.push(":enabled",":disabled"),L.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&R.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),R.push(",.*:")})),(x.matchesSelector=me.test(F=L.matches||L.webkitMatchesSelector||L.mozMatchesSelector||L.oMatchesSelector||L.msMatchesSelector))&&r(function(e){x.disconnectedMatch=F.call(e,"*"),F.call(e,"[s!='']:x"),P.push("!=",oe)}),R=R.length&&new RegExp(R.join("|")),P=P.length&&new RegExp(P.join("|")),t=me.test(L.compareDocumentPosition),U=t||me.test(L.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},G=t?function(e,t){if(e===t)return N=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!x.sortDetached&&t.compareDocumentPosition(e)===n?e===D||e.ownerDocument===H&&U(H,e)?-1:t===D||t.ownerDocument===H&&U(H,t)?1:I?ee(I,e)-ee(I,t):0:4&n?-1:1)}:function(e,t){if(e===t)return N=!0,0;var n,i=0,r=e.parentNode,o=t.parentNode,s=[e],l=[t];if(!r||!o)return e===D?-1:t===D?1:r?-1:o?1:I?ee(I,e)-ee(I,t):0;if(r===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;s[i]===l[i];)i++;return i?a(s[i],l[i]):s[i]===H?-1:l[i]===H?1:0},D):D},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==D&&M(e),n=n.replace(ce,"='$1']"),x.matchesSelector&&$&&!Y[n+" "]&&(!P||!P.test(n))&&(!R||!R.test(n)))try{var i=F.call(e,n);if(i||x.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(r){}return t(n,D,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==D&&M(e),U(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==D&&M(e);var n=w.attrHandle[t.toLowerCase()],i=n&&X.call(w.attrHandle,t.toLowerCase())?n(e,t,!$):void 0;return void 0!==i?i:x.attributes||!$?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.escape=function(e){return(e+"").replace(Ee,xe)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],i=0,r=0;if(N=!x.detectDuplicates,I=!x.sortStable&&e.slice(0),e.sort(G),N){for(;t=e[r++];)t===e[r]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return I=null,e},T=t.getText=function(e){var t,n="",i=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=T(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i++];)n+=T(t);return n},w=t.selectors={cacheLength:50,createPseudo:i,match:de,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(be,_e),e[3]=(e[3]||e[4]||e[5]||"").replace(be,_e),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return de.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&fe.test(n)&&(t=A(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(be,_e).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=q[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&q(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,i){return function(r){var o=t.attr(r,e);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+"-"))}},CHILD:function(e,t,n,i,r){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var u,c,f,h,d,p,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s,b=!1;if(m){if(o){for(;g;){for(h=t;h=h[g];)if(s?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;p=g="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?m.firstChild:m.lastChild],a&&y){for(h=m,f=h[j]||(h[j]={}),c=f[h.uniqueID]||(f[h.uniqueID]={}),u=c[e]||[],d=u[0]===z&&u[1],b=d&&u[2],h=d&&m.childNodes[d];h=++d&&h&&h[g]||(b=d=0)||p.pop();)if(1===h.nodeType&&++b&&h===t){c[e]=[z,d,b];break}}else if(y&&(h=t,f=h[j]||(h[j]={}),c=f[h.uniqueID]||(f[h.uniqueID]={}),u=c[e]||[],d=u[0]===z&&u[1],b=d),b===!1)for(;(h=++d&&h&&h[g]||(b=d=0)||p.pop())&&((s?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++b||(y&&(f=h[j]||(h[j]={}),c=f[h.uniqueID]||(f[h.uniqueID]={}),c[e]=[z,b]),h!==t)););return b-=r,b===i||b%i===0&&b/i>=0}}},PSEUDO:function(e,n){var r,o=w.pseudos[e]||w.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[j]?o(n):o.length>1?(r=[e,e,"",n],w.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,r=o(e,n),a=r.length;a--;)i=ee(e,r[a]),e[i]=!(t[i]=r[a])}):function(e){return o(e,0,r)}):o}},pseudos:{not:i(function(e){var t=[],n=[],r=C(e.replace(se,"$1"));return r[j]?i(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:i(function(e){return function(n){return t(e,n).length>0}}),contains:i(function(e){return e=e.replace(be,_e),function(t){return(t.textContent||t.innerText||T(t)).indexOf(e)>-1}}),lang:i(function(e){return he.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(be,_e).toLowerCase(),function(t){var n;do if(n=$?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===L},focus:function(e){return e===D.activeElement&&(!D.hasFocus||D.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:u(!1),disabled:u(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return pe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[n<0?n+t:n]}),even:c(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:c(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:c(function(e,t,n){for(var i=n<0?n+t:n;--i>=0;)e.push(i);return e}),gt:c(function(e,t,n){for(var i=n<0?n+t:n;++i<t;)e.push(i);return e})}},w.pseudos.nth=w.pseudos.eq;for(E in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[E]=s(E);for(E in{submit:!0,reset:!0})w.pseudos[E]=l(E);return h.prototype=w.filters=w.pseudos,w.setFilters=new h,A=t.tokenize=function(e,n){var i,r,o,a,s,l,u,c=W[e+" "];if(c)return n?0:c.slice(0);for(s=e,l=[],u=w.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 w.filter)!(r=de[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?t.error(e):W(e,l).slice(0)},C=t.compile=function(e,t){var n,i=[],r=[],o=Y[e+" "];if(!o){for(t||(t=A(e)),n=t.length;n--;)o=b(t[n]),o[j]?i.push(o):r.push(o);o=Y(e,_(r,i)),o.selector=e}return o},k=t.select=function(e,t,n,i){var r,o,a,s,l,u="function"==typeof e&&e,c=!i&&A(e=u.selector||e);if(n=n||[],1===c.length){if(o=c[0]=c[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&x.getById&&9===t.nodeType&&$&&w.relative[o[1].type]){if(t=(w.find.ID(a.matches[0].replace(be,_e),t)||[])[0],!t)return n;u&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(r=de.needsContext.test(e)?0:o.length;r--&&(a=o[r],!w.relative[s=a.type]);)if((l=w.find[s])&&(i=l(a.matches[0].replace(be,_e),ye.test(o[0].type)&&f(t.parentNode)||t))){if(o.splice(r,1),e=i.length&&d(o),!e)return Q.apply(n,i),n;break}}return(u||C(e,c))(i,t,!$,n,!t||ye.test(e)&&f(t.parentNode)||t),n},x.sortStable=j.split("").sort(G).join("")===j,x.detectDuplicates=!!N,M(),x.sortDetached=r(function(e){return 1&e.compareDocumentPosition(D.createElement("fieldset"))}),r(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),x.attributes&&r(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),r(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var i;if(!n)return e[t]===!0?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(e);he.find=ve,he.expr=ve.selectors,he.expr[":"]=he.expr.pseudos,he.uniqueSort=he.unique=ve.uniqueSort,he.text=ve.getText,he.isXMLDoc=ve.isXML,he.contains=ve.contains,he.escapeSelector=ve.escape;var ye=function(e,t,n){for(var i=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&he(e).is(n))break;i.push(e)}return i},be=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},_e=he.expr.match.needsContext,Ee=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,xe=/^.[^:#\[\.,]*$/;he.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?he.find.matchesSelector(i,e)?[i]:[]:he.find.matches(e,he.grep(t,function(e){return 1===e.nodeType}))},he.fn.extend({find:function(e){var t,n,i=this.length,r=this;if("string"!=typeof e)return this.pushStack(he(e).filter(function(){for(t=0;t<i;t++)if(he.contains(r[t],this))return!0}));for(n=this.pushStack([]),t=0;t<i;t++)he.find(e,r[t],n);return i>1?he.uniqueSort(n):n},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&_e.test(e)?he(e):e||[],!1).length}});var we,Te=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,Se=he.fn.init=function(e,t,n){var i,r;if(!e)return this;if(n=n||we,"string"==typeof e){if(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:Te.exec(e),!i||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof he?t[0]:t,he.merge(this,he.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:J,!0)),Ee.test(i[1])&&he.isPlainObject(t))for(i in t)he.isFunction(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return r=J.getElementById(i[2]),r&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):he.isFunction(e)?void 0!==n.ready?n.ready(e):e(he):he.makeArray(e,this)};Se.prototype=he.fn,we=he(J);var Ae=/^(?:parents|prev(?:Until|All))/,Ce={children:!0,contents:!0,next:!0,prev:!0};he.fn.extend({has:function(e){var t=he(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(he.contains(this,t[e]))return!0})},closest:function(e,t){var n,i=0,r=this.length,o=[],a="string"!=typeof e&&he(e);if(!_e.test(e))for(;i<r;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&he.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?he.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?re.call(he(e),this[0]):re.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(he.uniqueSort(he.merge(this.get(),he(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),he.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return ye(e,"parentNode")},parentsUntil:function(e,t,n){return ye(e,"parentNode",n)},next:function(e){return o(e,"nextSibling")},prev:function(e){return o(e,"previousSibling")},nextAll:function(e){return ye(e,"nextSibling")},prevAll:function(e){return ye(e,"previousSibling")},nextUntil:function(e,t,n){return ye(e,"nextSibling",n)},prevUntil:function(e,t,n){return ye(e,"previousSibling",n)},siblings:function(e){return be((e.parentNode||{}).firstChild,e)},children:function(e){return be(e.firstChild)},contents:function(e){return e.contentDocument||he.merge([],e.childNodes)}},function(e,t){he.fn[e]=function(n,i){var r=he.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=he.filter(i,r)),this.length>1&&(Ce[e]||he.uniqueSort(r),Ae.test(e)&&r.reverse()),this.pushStack(r)}});var ke=/\S+/g;he.Callbacks=function(e){e="string"==typeof e?a(e):he.extend({},e);var t,n,i,r,o=[],s=[],l=-1,u=function(){for(r=e.once,i=t=!0;s.length;l=-1)for(n=s.shift();++l<o.length;)o[l].apply(n[0],n[1])===!1&&e.stopOnFalse&&(l=o.length,n=!1);e.memory||(n=!1),t=!1,r&&(o=n?[]:"")},c={add:function(){return o&&(n&&!t&&(l=o.length-1,s.push(n)),function i(t){he.each(t,function(t,n){he.isFunction(n)?e.unique&&c.has(n)||o.push(n):n&&n.length&&"string"!==he.type(n)&&i(n)})}(arguments),n&&!t&&u()),this},remove:function(){return he.each(arguments,function(e,t){for(var n;(n=he.inArray(t,o,n))>-1;)o.splice(n,1),n<=l&&l--}),this},has:function(e){return e?he.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return r=s=[],o=n="",this},disabled:function(){return!o},lock:function(){return r=s=[],n||t||(o=n=""),this},locked:function(){return!!r},fireWith:function(e,n){return r||(n=n||[],n=[e,n.slice?n.slice():n],s.push(n),t||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},he.extend({Deferred:function(t){var n=[["notify","progress",he.Callbacks("memory"),he.Callbacks("memory"),2],["resolve","done",he.Callbacks("once memory"),he.Callbacks("once memory"),0,"resolved"],["reject","fail",he.Callbacks("once memory"),he.Callbacks("once memory"),1,"rejected"]],i="pending",r={state:function(){return i},always:function(){return o.done(arguments).fail(arguments),this},"catch":function(e){return r.then(null,e)},pipe:function(){var e=arguments;return he.Deferred(function(t){he.each(n,function(n,i){var r=he.isFunction(e[i[4]])&&e[i[4]];o[i[1]](function(){var e=r&&r.apply(this,arguments);e&&he.isFunction(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[i[0]+"With"](this,r?[e]:arguments)})}),e=null}).promise()},then:function(t,i,r){function o(t,n,i,r){return function(){var u=this,c=arguments,f=function(){var e,f;if(!(t<a)){if(e=i.apply(u,c),e===n.promise())throw new TypeError("Thenable self-resolution");f=e&&("object"==typeof e||"function"==typeof e)&&e.then,he.isFunction(f)?r?f.call(e,o(a,n,s,r),o(a,n,l,r)):(a++,f.call(e,o(a,n,s,r),o(a,n,l,r),o(a,n,s,n.notifyWith))):(i!==s&&(u=void 0,c=[e]),(r||n.resolveWith)(u,c))}},h=r?f:function(){try{f()}catch(e){he.Deferred.exceptionHook&&he.Deferred.exceptionHook(e,h.stackTrace),t+1>=a&&(i!==l&&(u=void 0,c=[e]),n.rejectWith(u,c))}};t?h():(he.Deferred.getStackHook&&(h.stackTrace=he.Deferred.getStackHook()),e.setTimeout(h))}}var a=0;return he.Deferred(function(e){n[0][3].add(o(0,e,he.isFunction(r)?r:s,e.notifyWith)),n[1][3].add(o(0,e,he.isFunction(t)?t:s)),n[2][3].add(o(0,e,he.isFunction(i)?i:l))}).promise()},promise:function(e){return null!=e?he.extend(e,r):r}},o={};return he.each(n,function(e,t){var a=t[2],s=t[5];r[t[1]]=a.add,s&&a.add(function(){i=s},n[3-e][2].disable,n[0][2].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith}),r.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,i=Array(n),r=te.call(arguments),o=he.Deferred(),a=function(e){return function(n){i[e]=this,r[e]=arguments.length>1?te.call(arguments):n,--t||o.resolveWith(i,r)}};if(t<=1&&(u(e,o.done(a(n)).resolve,o.reject),"pending"===o.state()||he.isFunction(r[n]&&r[n].then)))return o.then();for(;n--;)u(r[n],a(n),o.reject);return o.promise()}});var Oe=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;he.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&Oe.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},he.readyException=function(t){e.setTimeout(function(){throw t})};var Ie=he.Deferred();he.fn.ready=function(e){return Ie.then(e)["catch"](function(e){he.readyException(e)}),this},he.extend({isReady:!1,readyWait:1,holdReady:function(e){e?he.readyWait++:he.ready(!0)},ready:function(e){(e===!0?--he.readyWait:he.isReady)||(he.isReady=!0,e!==!0&&--he.readyWait>0||Ie.resolveWith(J,[he]))}}),he.ready.then=Ie.then,"complete"===J.readyState||"loading"!==J.readyState&&!J.documentElement.doScroll?e.setTimeout(he.ready):(J.addEventListener("DOMContentLoaded",c),e.addEventListener("load",c));var Ne=function(e,t,n,i,r,o,a){var s=0,l=e.length,u=null==n;if("object"===he.type(n)){r=!0;for(s in n)Ne(e,t,s,n[s],!0,o,a)}else if(void 0!==i&&(r=!0,he.isFunction(i)||(a=!0),u&&(a?(t.call(e,i),t=null):(u=t,t=function(e,t,n){return u.call(he(e),n)})),t))for(;s<l;s++)t(e[s],n,a?i:i.call(e[s],s,t(e[s],n)));return r?e:u?t.call(e):l?t(e[0],n):o},Me=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};f.uid=1,f.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Me(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var i,r=this.cache(e);if("string"==typeof t)r[he.camelCase(t)]=n;else for(i in t)r[he.camelCase(i)]=t[i];return r},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][he.camelCase(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,i=e[this.expando];if(void 0!==i){if(void 0!==t){he.isArray(t)?t=t.map(he.camelCase):(t=he.camelCase(t),t=t in i?[t]:t.match(ke)||[]),n=t.length;for(;n--;)delete i[t[n]]}(void 0===t||he.isEmptyObject(i))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!he.isEmptyObject(t)}};var De=new f,Le=new f,$e=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Re=/[A-Z]/g;he.extend({hasData:function(e){return Le.hasData(e)||De.hasData(e)},data:function(e,t,n){return Le.access(e,t,n)},removeData:function(e,t){Le.remove(e,t)},_data:function(e,t,n){return De.access(e,t,n)},_removeData:function(e,t){De.remove(e,t)}}),he.fn.extend({data:function(e,t){var n,i,r,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(r=Le.get(o),1===o.nodeType&&!De.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&(i=a[n].name,0===i.indexOf("data-")&&(i=he.camelCase(i.slice(5)),h(o,i,r[i])));De.set(o,"hasDataAttrs",!0)}return r}return"object"==typeof e?this.each(function(){Le.set(this,e)}):Ne(this,function(t){var n;if(o&&void 0===t){if(n=Le.get(o,e),void 0!==n)return n;if(n=h(o,e),void 0!==n)return n}else this.each(function(){Le.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Le.remove(this,e)})}}),he.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=De.get(e,t),n&&(!i||he.isArray(n)?i=De.access(e,t,he.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=he.queue(e,t),i=n.length,r=n.shift(),o=he._queueHooks(e,t),a=function(){he.dequeue(e,t)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete o.stop,r.call(e,a,o)),!i&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return De.get(e,n)||De.access(e,n,{empty:he.Callbacks("once memory").add(function(){De.remove(e,[t+"queue",n])})})}}),he.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?he.queue(this[0],e):void 0===t?this:this.each(function(){var n=he.queue(this,e,t);he._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&he.dequeue(this,e)})},dequeue:function(e){return this.each(function(){he.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,r=he.Deferred(),o=this,a=this.length,s=function(){--i||r.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)n=De.get(o[a],e+"queueHooks"),n&&n.empty&&(i++,n.empty.add(s));return s(),r.promise(t)}});var Pe=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Fe=new RegExp("^(?:([+-])=|)("+Pe+")([a-z%]*)$","i"),Ue=["Top","Right","Bottom","Left"],je=function(e,t){return e=t||e,"none"===e.style.display||""===e.style.display&&he.contains(e.ownerDocument,e)&&"none"===he.css(e,"display")},He=function(e,t,n,i){var r,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];r=n.apply(e,i||[]);for(o in t)e.style[o]=a[o];return r},ze={};he.fn.extend({show:function(){return g(this,!0)},hide:function(){return g(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){je(this)?he(this).show():he(this).hide()})}});var Be=/^(?:checkbox|radio)$/i,qe=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,We=/^$|\/(?:java|ecma)script/i,Ye={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,"",""]};Ye.optgroup=Ye.option,Ye.tbody=Ye.tfoot=Ye.colgroup=Ye.caption=Ye.thead,Ye.th=Ye.td;var Ge=/<|&#?\w+;/;!function(){var e=J.createDocumentFragment(),t=e.appendChild(J.createElement("div")),n=J.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),ce.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",ce.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue;
}();var Xe=J.documentElement,Ve=/^key/,Ke=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ze=/^([^.]*)(?:\.(.+)|)/;he.event={global:{},add:function(e,t,n,i,r){var o,a,s,l,u,c,f,h,d,p,g,m=De.get(e);if(m)for(n.handler&&(o=n,n=o.handler,r=o.selector),r&&he.find.matchesSelector(Xe,r),n.guid||(n.guid=he.guid++),(l=m.events)||(l=m.events={}),(a=m.handle)||(a=m.handle=function(t){return"undefined"!=typeof he&&he.event.triggered!==t.type?he.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(ke)||[""],u=t.length;u--;)s=Ze.exec(t[u])||[],d=g=s[1],p=(s[2]||"").split(".").sort(),d&&(f=he.event.special[d]||{},d=(r?f.delegateType:f.bindType)||d,f=he.event.special[d]||{},c=he.extend({type:d,origType:g,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&he.expr.match.needsContext.test(r),namespace:p.join(".")},o),(h=l[d])||(h=l[d]=[],h.delegateCount=0,f.setup&&f.setup.call(e,i,p,a)!==!1||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),r?h.splice(h.delegateCount++,0,c):h.push(c),he.event.global[d]=!0)},remove:function(e,t,n,i,r){var o,a,s,l,u,c,f,h,d,p,g,m=De.hasData(e)&&De.get(e);if(m&&(l=m.events)){for(t=(t||"").match(ke)||[""],u=t.length;u--;)if(s=Ze.exec(t[u])||[],d=g=s[1],p=(s[2]||"").split(".").sort(),d){for(f=he.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,h=l[d]||[],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--,f.remove&&f.remove.call(e,c));a&&!h.length&&(f.teardown&&f.teardown.call(e,p,m.handle)!==!1||he.removeEvent(e,d,m.handle),delete l[d])}else for(d in l)he.event.remove(e,d+t[u],n,i,!0);he.isEmptyObject(l)&&De.remove(e,"handle events")}},dispatch:function(e){var t,n,i,r,o,a,s=he.event.fix(e),l=new Array(arguments.length),u=(De.get(this,"events")||{})[s.type]||[],c=he.event.special[s.type]||{};for(l[0]=s,t=1;t<arguments.length;t++)l[t]=arguments[t];if(s.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,s)!==!1){for(a=he.event.handlers.call(this,s,u),t=0;(r=a[t++])&&!s.isPropagationStopped();)for(s.currentTarget=r.elem,n=0;(o=r.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!s.rnamespace.test(o.namespace)||(s.handleObj=o,s.data=o.data,i=((he.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,l),void 0!==i&&(s.result=i)===!1&&(s.preventDefault(),s.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,i,r,o,a=[],s=t.delegateCount,l=e.target;if(s&&l.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(i=[],n=0;n<s;n++)o=t[n],r=o.selector+" ",void 0===i[r]&&(i[r]=o.needsContext?he(r,this).index(l)>-1:he.find(r,this,null,[l]).length),i[r]&&i.push(o);i.length&&a.push({elem:l,handlers:i})}return s<t.length&&a.push({elem:this,handlers:t.slice(s)}),a},addProp:function(e,t){Object.defineProperty(he.Event.prototype,e,{enumerable:!0,configurable:!0,get:he.isFunction(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[he.expando]?e:new he.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==E()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===E()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&he.nodeName(this,"input"))return this.click(),!1},_default:function(e){return he.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},he.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},he.Event=function(e,t){return this instanceof he.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValue===!1?b:_,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&he.extend(this,t),this.timeStamp=e&&e.timeStamp||he.now(),void(this[he.expando]=!0)):new he.Event(e,t)},he.Event.prototype={constructor:he.Event,isDefaultPrevented:_,isPropagationStopped:_,isImmediatePropagationStopped:_,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=b,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=b,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=b,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},he.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&Ve.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Ke.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},he.event.addProp),he.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){he.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=this,r=e.relatedTarget,o=e.handleObj;return r&&(r===i||he.contains(i,r))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),he.fn.extend({on:function(e,t,n,i){return x(this,e,t,n,i)},one:function(e,t,n,i){return x(this,e,t,n,i,1)},off:function(e,t,n){var i,r;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,he(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(r in e)this.off(r,t,e[r]);return this}return t!==!1&&"function"!=typeof t||(n=t,t=void 0),n===!1&&(n=_),this.each(function(){he.event.remove(this,e,n,t)})}});var Qe=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Je=/<script|<style|<link/i,et=/checked\s*(?:[^=]|=\s*.checked.)/i,tt=/^true\/(.*)/,nt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;he.extend({htmlPrefilter:function(e){return e.replace(Qe,"<$1></$2>")},clone:function(e,t,n){var i,r,o,a,s=e.cloneNode(!0),l=he.contains(e.ownerDocument,e);if(!(ce.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||he.isXMLDoc(e)))for(a=m(s),o=m(e),i=0,r=o.length;i<r;i++)C(o[i],a[i]);if(t)if(n)for(o=o||m(e),a=a||m(s),i=0,r=o.length;i<r;i++)A(o[i],a[i]);else A(e,s);return a=m(s,"script"),a.length>0&&v(a,!l&&m(e,"script")),s},cleanData:function(e){for(var t,n,i,r=he.event.special,o=0;void 0!==(n=e[o]);o++)if(Me(n)){if(t=n[De.expando]){if(t.events)for(i in t.events)r[i]?he.event.remove(n,i):he.removeEvent(n,i,t.handle);n[De.expando]=void 0}n[Le.expando]&&(n[Le.expando]=void 0)}}}),he.fn.extend({detach:function(e){return O(this,e,!0)},remove:function(e){return O(this,e)},text:function(e){return Ne(this,function(e){return void 0===e?he.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return k(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=w(this,e);t.appendChild(e)}})},prepend:function(){return k(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=w(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return k(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return k(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(he.cleanData(m(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return he.clone(this,e,t)})},html:function(e){return Ne(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Je.test(e)&&!Ye[(qe.exec(e)||["",""])[1].toLowerCase()]){e=he.htmlPrefilter(e);try{for(;n<i;n++)t=this[n]||{},1===t.nodeType&&(he.cleanData(m(t,!1)),t.innerHTML=e);t=0}catch(r){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return k(this,arguments,function(t){var n=this.parentNode;he.inArray(this,e)<0&&(he.cleanData(m(this)),n&&n.replaceChild(t,this))},e)}}),he.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){he.fn[e]=function(e){for(var n,i=[],r=he(e),o=r.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),he(r[a])[t](n),ie.apply(i,n.get());return this.pushStack(i)}});var it=/^margin/,rt=new RegExp("^("+Pe+")(?!px)[a-z%]+$","i"),ot=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)};!function(){function t(){if(s){s.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",s.innerHTML="",Xe.appendChild(a);var t=e.getComputedStyle(s);n="1%"!==t.top,o="2px"===t.marginLeft,i="4px"===t.width,s.style.marginRight="50%",r="4px"===t.marginRight,Xe.removeChild(a),s=null}}var n,i,r,o,a=J.createElement("div"),s=J.createElement("div");s.style&&(s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",ce.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),he.extend(ce,{pixelPosition:function(){return t(),n},boxSizingReliable:function(){return t(),i},pixelMarginRight:function(){return t(),r},reliableMarginLeft:function(){return t(),o}}))}();var at=/^(none|table(?!-c[ea]).+)/,st={position:"absolute",visibility:"hidden",display:"block"},lt={letterSpacing:"0",fontWeight:"400"},ut=["Webkit","Moz","ms"],ct=J.createElement("div").style;he.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=I(e,"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(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,o,a,s=he.camelCase(t),l=e.style;return t=he.cssProps[s]||(he.cssProps[s]=M(s)||s),a=he.cssHooks[t]||he.cssHooks[s],void 0===n?a&&"get"in a&&void 0!==(r=a.get(e,!1,i))?r:l[t]:(o=typeof n,"string"===o&&(r=Fe.exec(n))&&r[1]&&(n=d(e,t,r),o="number"),null!=n&&n===n&&("number"===o&&(n+=r&&r[3]||(he.cssNumber[s]?"":"px")),ce.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,i))||(l[t]=n)),void 0)}},css:function(e,t,n,i){var r,o,a,s=he.camelCase(t);return t=he.cssProps[s]||(he.cssProps[s]=M(s)||s),a=he.cssHooks[t]||he.cssHooks[s],a&&"get"in a&&(r=a.get(e,!0,n)),void 0===r&&(r=I(e,t,i)),"normal"===r&&t in lt&&(r=lt[t]),""===n||n?(o=parseFloat(r),n===!0||isFinite(o)?o||0:r):r}}),he.each(["height","width"],function(e,t){he.cssHooks[t]={get:function(e,n,i){if(n)return!at.test(he.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?$(e,t,i):He(e,st,function(){return $(e,t,i)})},set:function(e,n,i){var r,o=i&&ot(e),a=i&&L(e,t,i,"border-box"===he.css(e,"boxSizing",!1,o),o);return a&&(r=Fe.exec(n))&&"px"!==(r[3]||"px")&&(e.style[t]=n,n=he.css(e,t)),D(e,n,a)}}}),he.cssHooks.marginLeft=N(ce.reliableMarginLeft,function(e,t){if(t)return(parseFloat(I(e,"marginLeft"))||e.getBoundingClientRect().left-He(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),he.each({margin:"",padding:"",border:"Width"},function(e,t){he.cssHooks[e+t]={expand:function(n){for(var i=0,r={},o="string"==typeof n?n.split(" "):[n];i<4;i++)r[e+Ue[i]+t]=o[i]||o[i-2]||o[0];return r}},it.test(e)||(he.cssHooks[e+t].set=D)}),he.fn.extend({css:function(e,t){return Ne(this,function(e,t,n){var i,r,o={},a=0;if(he.isArray(t)){for(i=ot(e),r=t.length;a<r;a++)o[t[a]]=he.css(e,t[a],!1,i);return o}return void 0!==n?he.style(e,t,n):he.css(e,t)},e,t,arguments.length>1)}}),he.Tween=R,R.prototype={constructor:R,init:function(e,t,n,i,r,o){this.elem=e,this.prop=n,this.easing=r||he.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=o||(he.cssNumber[n]?"":"px")},cur:function(){var e=R.propHooks[this.prop];return e&&e.get?e.get(this):R.propHooks._default.get(this)},run:function(e){var t,n=R.propHooks[this.prop];return this.options.duration?this.pos=t=he.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):R.propHooks._default.set(this),this}},R.prototype.init.prototype=R.prototype,R.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=he.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){he.fx.step[e.prop]?he.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[he.cssProps[e.prop]]&&!he.cssHooks[e.prop]?e.elem[e.prop]=e.now:he.style(e.elem,e.prop,e.now+e.unit)}}},R.propHooks.scrollTop=R.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},he.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},he.fx=R.prototype.init,he.fx.step={};var ft,ht,dt=/^(?:toggle|show|hide)$/,pt=/queueHooks$/;he.Animation=he.extend(B,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return d(n.elem,e,Fe.exec(t),n),n}]},tweener:function(e,t){he.isFunction(e)?(t=e,e=["*"]):e=e.match(ke);for(var n,i=0,r=e.length;i<r;i++)n=e[i],B.tweeners[n]=B.tweeners[n]||[],B.tweeners[n].unshift(t)},prefilters:[H],prefilter:function(e,t){t?B.prefilters.unshift(e):B.prefilters.push(e)}}),he.speed=function(e,t,n){var i=e&&"object"==typeof e?he.extend({},e):{complete:n||!n&&t||he.isFunction(e)&&e,duration:e,easing:n&&t||t&&!he.isFunction(t)&&t};return he.fx.off||J.hidden?i.duration=0:i.duration="number"==typeof i.duration?i.duration:i.duration in he.fx.speeds?he.fx.speeds[i.duration]:he.fx.speeds._default,null!=i.queue&&i.queue!==!0||(i.queue="fx"),i.old=i.complete,i.complete=function(){he.isFunction(i.old)&&i.old.call(this),i.queue&&he.dequeue(this,i.queue)},i},he.fn.extend({fadeTo:function(e,t,n,i){return this.filter(je).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var r=he.isEmptyObject(e),o=he.speed(t,n,i),a=function(){var t=B(this,he.extend({},e),o);(r||De.get(this,"finish"))&&t.stop(!0)};return a.finish=a,r||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,r=null!=e&&e+"queueHooks",o=he.timers,a=De.get(this);if(r)a[r]&&a[r].stop&&i(a[r]);else for(r in a)a[r]&&a[r].stop&&pt.test(r)&&i(a[r]);for(r=o.length;r--;)o[r].elem!==this||null!=e&&o[r].queue!==e||(o[r].anim.stop(n),t=!1,o.splice(r,1));!t&&n||he.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=De.get(this),i=n[e+"queue"],r=n[e+"queueHooks"],o=he.timers,a=i?i.length:0;for(n.finish=!0,he.queue(this,e,[]),r&&r.stop&&r.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),he.each(["toggle","show","hide"],function(e,t){var n=he.fn[t];he.fn[t]=function(e,i,r){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(U(t,!0),e,i,r)}}),he.each({slideDown:U("show"),slideUp:U("hide"),slideToggle:U("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){he.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),he.timers=[],he.fx.tick=function(){var e,t=0,n=he.timers;for(ft=he.now();t<n.length;t++)e=n[t],e()||n[t]!==e||n.splice(t--,1);n.length||he.fx.stop(),ft=void 0},he.fx.timer=function(e){he.timers.push(e),e()?he.fx.start():he.timers.pop()},he.fx.interval=13,he.fx.start=function(){ht||(ht=e.requestAnimationFrame?e.requestAnimationFrame(P):e.setInterval(he.fx.tick,he.fx.interval))},he.fx.stop=function(){e.cancelAnimationFrame?e.cancelAnimationFrame(ht):e.clearInterval(ht),ht=null},he.fx.speeds={slow:600,fast:200,_default:400},he.fn.delay=function(t,n){return t=he.fx?he.fx.speeds[t]||t:t,n=n||"fx",this.queue(n,function(n,i){var r=e.setTimeout(n,t);i.stop=function(){e.clearTimeout(r)}})},function(){var e=J.createElement("input"),t=J.createElement("select"),n=t.appendChild(J.createElement("option"));e.type="checkbox",ce.checkOn=""!==e.value,ce.optSelected=n.selected,e=J.createElement("input"),e.value="t",e.type="radio",ce.radioValue="t"===e.value}();var gt,mt=he.expr.attrHandle;he.fn.extend({attr:function(e,t){return Ne(this,he.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){he.removeAttr(this,e)})}}),he.extend({attr:function(e,t,n){var i,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?he.prop(e,t,n):(1===o&&he.isXMLDoc(e)||(r=he.attrHooks[t.toLowerCase()]||(he.expr.match.bool.test(t)?gt:void 0)),void 0!==n?null===n?void he.removeAttr(e,t):r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):r&&"get"in r&&null!==(i=r.get(e,t))?i:(i=he.find.attr(e,t),null==i?void 0:i))},attrHooks:{type:{set:function(e,t){if(!ce.radioValue&&"radio"===t&&he.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i=0,r=t&&t.match(ke);if(r&&1===e.nodeType)for(;n=r[i++];)e.removeAttribute(n)}}),gt={set:function(e,t,n){return t===!1?he.removeAttr(e,n):e.setAttribute(n,n),n}},he.each(he.expr.match.bool.source.match(/\w+/g),function(e,t){var n=mt[t]||he.find.attr;mt[t]=function(e,t,i){var r,o,a=t.toLowerCase();return i||(o=mt[a],mt[a]=r,r=null!=n(e,t,i)?a:null,mt[a]=o),r}});var vt=/^(?:input|select|textarea|button)$/i,yt=/^(?:a|area)$/i;he.fn.extend({prop:function(e,t){return Ne(this,he.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[he.propFix[e]||e]})}}),he.extend({prop:function(e,t,n){var i,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&he.isXMLDoc(e)||(t=he.propFix[t]||t,r=he.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=he.find.attr(e,"tabindex");return t?parseInt(t,10):vt.test(e.nodeName)||yt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),ce.optSelected||(he.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),he.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){he.propFix[this.toLowerCase()]=this});var bt=/[\t\r\n\f]/g;he.fn.extend({addClass:function(e){var t,n,i,r,o,a,s,l=0;if(he.isFunction(e))return this.each(function(t){he(this).addClass(e.call(this,t,q(this)))});if("string"==typeof e&&e)for(t=e.match(ke)||[];n=this[l++];)if(r=q(n),i=1===n.nodeType&&(" "+r+" ").replace(bt," ")){for(a=0;o=t[a++];)i.indexOf(" "+o+" ")<0&&(i+=o+" ");s=he.trim(i),r!==s&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,i,r,o,a,s,l=0;if(he.isFunction(e))return this.each(function(t){he(this).removeClass(e.call(this,t,q(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(ke)||[];n=this[l++];)if(r=q(n),i=1===n.nodeType&&(" "+r+" ").replace(bt," ")){for(a=0;o=t[a++];)for(;i.indexOf(" "+o+" ")>-1;)i=i.replace(" "+o+" "," ");s=he.trim(i),r!==s&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):he.isFunction(e)?this.each(function(n){he(this).toggleClass(e.call(this,n,q(this),t),t)}):this.each(function(){var t,i,r,o;if("string"===n)for(i=0,r=he(this),o=e.match(ke)||[];t=o[i++];)r.hasClass(t)?r.removeClass(t):r.addClass(t);else void 0!==e&&"boolean"!==n||(t=q(this),t&&De.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||e===!1?"":De.get(this,"__className__")||""))})},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&(" "+q(n)+" ").replace(bt," ").indexOf(t)>-1)return!0;return!1}});var _t=/\r/g,Et=/[\x20\t\r\n\f]+/g;he.fn.extend({val:function(e){var t,n,i,r=this[0];{if(arguments.length)return i=he.isFunction(e),this.each(function(n){var r;1===this.nodeType&&(r=i?e.call(this,n,he(this).val()):e,null==r?r="":"number"==typeof r?r+="":he.isArray(r)&&(r=he.map(r,function(e){return null==e?"":e+""})),t=he.valHooks[this.type]||he.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))});if(r)return t=he.valHooks[r.type]||he.valHooks[r.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:(n=r.value,"string"==typeof n?n.replace(_t,""):null==n?"":n)}}}),he.extend({valHooks:{option:{get:function(e){var t=he.find.attr(e,"value");return null!=t?t:he.trim(he.text(e)).replace(Et," ")}},select:{get:function(e){for(var t,n,i=e.options,r=e.selectedIndex,o="select-one"===e.type,a=o?null:[],s=o?r+1:i.length,l=r<0?s:o?r:0;l<s;l++)if(n=i[l],(n.selected||l===r)&&!n.disabled&&(!n.parentNode.disabled||!he.nodeName(n.parentNode,"optgroup"))){if(t=he(n).val(),o)return t;a.push(t)}return a},set:function(e,t){for(var n,i,r=e.options,o=he.makeArray(t),a=r.length;a--;)i=r[a],(i.selected=he.inArray(he.valHooks.option.get(i),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),he.each(["radio","checkbox"],function(){he.valHooks[this]={set:function(e,t){if(he.isArray(t))return e.checked=he.inArray(he(e).val(),t)>-1}},ce.checkOn||(he.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var xt=/^(?:focusinfocus|focusoutblur)$/;he.extend(he.event,{trigger:function(t,n,i,r){var o,a,s,l,u,c,f,h=[i||J],d=se.call(t,"type")?t.type:t,p=se.call(t,"namespace")?t.namespace.split("."):[];if(a=s=i=i||J,3!==i.nodeType&&8!==i.nodeType&&!xt.test(d+he.event.triggered)&&(d.indexOf(".")>-1&&(p=d.split("."),d=p.shift(),p.sort()),u=d.indexOf(":")<0&&"on"+d,t=t[he.expando]?t:new he.Event(d,"object"==typeof t&&t),t.isTrigger=r?2:3,t.namespace=p.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:he.makeArray(n,[t]),f=he.event.special[d]||{},r||!f.trigger||f.trigger.apply(i,n)!==!1)){if(!r&&!f.noBubble&&!he.isWindow(i)){for(l=f.delegateType||d,xt.test(l+d)||(a=a.parentNode);a;a=a.parentNode)h.push(a),s=a;s===(i.ownerDocument||J)&&h.push(s.defaultView||s.parentWindow||e)}for(o=0;(a=h[o++])&&!t.isPropagationStopped();)t.type=o>1?l:f.bindType||d,c=(De.get(a,"events")||{})[t.type]&&De.get(a,"handle"),c&&c.apply(a,n),c=u&&a[u],c&&c.apply&&Me(a)&&(t.result=c.apply(a,n),t.result===!1&&t.preventDefault());return t.type=d,r||t.isDefaultPrevented()||f._default&&f._default.apply(h.pop(),n)!==!1||!Me(i)||u&&he.isFunction(i[d])&&!he.isWindow(i)&&(s=i[u],s&&(i[u]=null),he.event.triggered=d,i[d](),he.event.triggered=void 0,s&&(i[u]=s)),t.result}},simulate:function(e,t,n){var i=he.extend(new he.Event,n,{type:e,isSimulated:!0});he.event.trigger(i,null,t)}}),he.fn.extend({trigger:function(e,t){return this.each(function(){he.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return he.event.trigger(e,t,n,!0)}}),he.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){he.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),he.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),ce.focusin="onfocusin"in e,ce.focusin||he.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){he.event.simulate(t,e.target,he.event.fix(e))};he.event.special[t]={setup:function(){var i=this.ownerDocument||this,r=De.access(i,t);r||i.addEventListener(e,n,!0),De.access(i,t,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this,r=De.access(i,t)-1;r?De.access(i,t,r):(i.removeEventListener(e,n,!0),De.remove(i,t))}}});var wt=e.location,Tt=he.now(),St=/\?/;he.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(i){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||he.error("Invalid XML: "+t),n};var At=/\[\]$/,Ct=/\r?\n/g,kt=/^(?:submit|button|image|reset|file)$/i,Ot=/^(?:input|select|textarea|keygen)/i;he.param=function(e,t){var n,i=[],r=function(e,t){var n=he.isFunction(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(he.isArray(e)||e.jquery&&!he.isPlainObject(e))he.each(e,function(){r(this.name,this.value)});else for(n in e)W(n,e[n],t,r);return i.join("&")},he.fn.extend({serialize:function(){return he.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=he.prop(this,"elements");return e?he.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!he(this).is(":disabled")&&Ot.test(this.nodeName)&&!kt.test(e)&&(this.checked||!Be.test(e))}).map(function(e,t){var n=he(this).val();return null==n?null:he.isArray(n)?he.map(n,function(e){return{name:t.name,value:e.replace(Ct,"\r\n")}}):{name:t.name,value:n.replace(Ct,"\r\n")}}).get()}});var It=/%20/g,Nt=/#.*$/,Mt=/([?&])_=[^&]*/,Dt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Lt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,$t=/^(?:GET|HEAD)$/,Rt=/^\/\//,Pt={},Ft={},Ut="*/".concat("*"),jt=J.createElement("a");jt.href=wt.href,he.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:wt.href,type:"GET",isLocal:Lt.test(wt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ut,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":JSON.parse,"text xml":he.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?X(X(e,he.ajaxSettings),t):X(he.ajaxSettings,e)},ajaxPrefilter:Y(Pt),ajaxTransport:Y(Ft),ajax:function(t,n){function i(t,n,i,s){var u,h,d,_,E,x=n;c||(c=!0,l&&e.clearTimeout(l),r=void 0,a=s||"",w.readyState=t>0?4:0,u=t>=200&&t<300||304===t,i&&(_=V(p,w,i)),_=K(p,_,w,u),u?(p.ifModified&&(E=w.getResponseHeader("Last-Modified"),E&&(he.lastModified[o]=E),E=w.getResponseHeader("etag"),E&&(he.etag[o]=E)),204===t||"HEAD"===p.type?x="nocontent":304===t?x="notmodified":(x=_.state,h=_.data,d=_.error,u=!d)):(d=x,!t&&x||(x="error",t<0&&(t=0))),w.status=t,w.statusText=(n||x)+"",u?v.resolveWith(g,[h,x,w]):v.rejectWith(g,[w,x,d]),w.statusCode(b),b=void 0,f&&m.trigger(u?"ajaxSuccess":"ajaxError",[w,p,u?h:d]),y.fireWith(g,[w,x]),f&&(m.trigger("ajaxComplete",[w,p]),--he.active||he.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var r,o,a,s,l,u,c,f,h,d,p=he.ajaxSetup({},n),g=p.context||p,m=p.context&&(g.nodeType||g.jquery)?he(g):he.event,v=he.Deferred(),y=he.Callbacks("once memory"),b=p.statusCode||{},_={},E={},x="canceled",w={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s)for(s={};t=Dt.exec(a);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(e,t){return null==c&&(e=E[e.toLowerCase()]=E[e.toLowerCase()]||e,_[e]=t),this},overrideMimeType:function(e){return null==c&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)w.always(e[w.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||x;return r&&r.abort(t),i(0,t),this}};if(v.promise(w),p.url=((t||p.url||wt.href)+"").replace(Rt,wt.protocol+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(ke)||[""],null==p.crossDomain){u=J.createElement("a");try{u.href=p.url,u.href=u.href,p.crossDomain=jt.protocol+"//"+jt.host!=u.protocol+"//"+u.host}catch(T){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=he.param(p.data,p.traditional)),G(Pt,p,n,w),c)return w;f=he.event&&p.global,f&&0===he.active++&&he.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!$t.test(p.type),o=p.url.replace(Nt,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(It,"+")):(d=p.url.slice(o.length),p.data&&(o+=(St.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(o=o.replace(Mt,""),d=(St.test(o)?"&":"?")+"_="+Tt++ +d),p.url=o+d),p.ifModified&&(he.lastModified[o]&&w.setRequestHeader("If-Modified-Since",he.lastModified[o]),he.etag[o]&&w.setRequestHeader("If-None-Match",he.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&w.setRequestHeader("Content-Type",p.contentType),w.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Ut+"; q=0.01":""):p.accepts["*"]);for(h in p.headers)w.setRequestHeader(h,p.headers[h]);if(p.beforeSend&&(p.beforeSend.call(g,w,p)===!1||c))return w.abort();if(x="abort",y.add(p.complete),w.done(p.success),w.fail(p.error),r=G(Ft,p,n,w)){if(w.readyState=1,f&&m.trigger("ajaxSend",[w,p]),c)return w;p.async&&p.timeout>0&&(l=e.setTimeout(function(){w.abort("timeout")},p.timeout));try{c=!1,r.send(_,i)}catch(T){if(c)throw T;i(-1,T)}}else i(-1,"No Transport");return w},getJSON:function(e,t,n){return he.get(e,t,n,"json")},getScript:function(e,t){return he.get(e,void 0,t,"script")}}),he.each(["get","post"],function(e,t){he[t]=function(e,n,i,r){return he.isFunction(n)&&(r=r||i,i=n,n=void 0),he.ajax(he.extend({url:e,type:t,dataType:r,data:n,success:i},he.isPlainObject(e)&&e))}}),he._evalUrl=function(e){return he.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},he.fn.extend({wrapAll:function(e){var t;return this[0]&&(he.isFunction(e)&&(e=e.call(this[0])),t=he(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return he.isFunction(e)?this.each(function(t){he(this).wrapInner(e.call(this,t))}):this.each(function(){var t=he(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=he.isFunction(e);return this.each(function(n){he(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){he(this).replaceWith(this.childNodes)}),this}}),he.expr.pseudos.hidden=function(e){return!he.expr.pseudos.visible(e)},he.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},he.ajaxSettings.xhr=function(){
try{return new e.XMLHttpRequest}catch(t){}};var Ht={0:200,1223:204},zt=he.ajaxSettings.xhr();ce.cors=!!zt&&"withCredentials"in zt,ce.ajax=zt=!!zt,he.ajaxTransport(function(t){var n,i;if(ce.cors||zt&&!t.crossDomain)return{send:function(r,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(a in r)s.setRequestHeader(a,r[a]);n=function(e){return function(){n&&(n=i=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Ht[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&&e.setTimeout(function(){n&&i()})},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(l){if(n)throw l}},abort:function(){n&&n()}}}),he.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),he.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return he.globalEval(e),e}}}),he.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),he.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(i,r){t=he("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&r("error"===e.type?404:200,e.type)}),J.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Bt=[],qt=/(=)\?(?=&|$)|\?\?/;he.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Bt.pop()||he.expando+"_"+Tt++;return this[e]=!0,e}}),he.ajaxPrefilter("json jsonp",function(t,n,i){var r,o,a,s=t.jsonp!==!1&&(qt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&qt.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return r=t.jsonpCallback=he.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(qt,"$1"+r):t.jsonp!==!1&&(t.url+=(St.test(t.url)?"&":"?")+t.jsonp+"="+r),t.converters["script json"]=function(){return a||he.error(r+" was not called"),a[0]},t.dataTypes[0]="json",o=e[r],e[r]=function(){a=arguments},i.always(function(){void 0===o?he(e).removeProp(r):e[r]=o,t[r]&&(t.jsonpCallback=n.jsonpCallback,Bt.push(r)),a&&he.isFunction(o)&&o(a[0]),a=o=void 0}),"script"}),ce.createHTMLDocument=function(){var e=J.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),he.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var i,r,o;return t||(ce.createHTMLDocument?(t=J.implementation.createHTMLDocument(""),i=t.createElement("base"),i.href=J.location.href,t.head.appendChild(i)):t=J),r=Ee.exec(e),o=!n&&[],r?[t.createElement(r[1])]:(r=y([e],t,o),o&&o.length&&he(o).remove(),he.merge([],r.childNodes))},he.fn.load=function(e,t,n){var i,r,o,a=this,s=e.indexOf(" ");return s>-1&&(i=he.trim(e.slice(s)),e=e.slice(0,s)),he.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(r="POST"),a.length>0&&he.ajax({url:e,type:r||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(i?he("<div>").append(he.parseHTML(e)).find(i):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},he.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){he.fn[t]=function(e){return this.on(t,e)}}),he.expr.pseudos.animated=function(e){return he.grep(he.timers,function(t){return e===t.elem}).length},he.offset={setOffset:function(e,t,n){var i,r,o,a,s,l,u,c=he.css(e,"position"),f=he(e),h={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=he.css(e,"top"),l=he.css(e,"left"),u=("absolute"===c||"fixed"===c)&&(o+l).indexOf("auto")>-1,u?(i=f.position(),a=i.top,r=i.left):(a=parseFloat(o)||0,r=parseFloat(l)||0),he.isFunction(t)&&(t=t.call(e,n,he.extend({},s))),null!=t.top&&(h.top=t.top-s.top+a),null!=t.left&&(h.left=t.left-s.left+r),"using"in t?t.using.call(e,h):f.css(h)}},he.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){he.offset.setOffset(this,e,t)});var t,n,i,r,o=this[0];if(o)return o.getClientRects().length?(i=o.getBoundingClientRect(),i.width||i.height?(r=o.ownerDocument,n=Z(r),t=r.documentElement,{top:i.top+n.pageYOffset-t.clientTop,left:i.left+n.pageXOffset-t.clientLeft}):i):{top:0,left:0}},position:function(){if(this[0]){var e,t,n=this[0],i={top:0,left:0};return"fixed"===he.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),he.nodeName(e[0],"html")||(i=e.offset()),i={top:i.top+he.css(e[0],"borderTopWidth",!0),left:i.left+he.css(e[0],"borderLeftWidth",!0)}),{top:t.top-i.top-he.css(n,"marginTop",!0),left:t.left-i.left-he.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===he.css(e,"position");)e=e.offsetParent;return e||Xe})}}),he.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;he.fn[e]=function(i){return Ne(this,function(e,i,r){var o=Z(e);return void 0===r?o?o[t]:e[i]:void(o?o.scrollTo(n?o.pageXOffset:r,n?r:o.pageYOffset):e[i]=r)},e,i,arguments.length)}}),he.each(["top","left"],function(e,t){he.cssHooks[t]=N(ce.pixelPosition,function(e,n){if(n)return n=I(e,t),rt.test(n)?he(e).position()[t]+"px":n})}),he.each({Height:"height",Width:"width"},function(e,t){he.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){he.fn[i]=function(r,o){var a=arguments.length&&(n||"boolean"!=typeof r),s=n||(r===!0||o===!0?"margin":"border");return Ne(this,function(t,n,r){var o;return he.isWindow(t)?0===i.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===r?he.css(t,n,s):he.style(t,n,r,s)},t,a?r:void 0,a)}})}),he.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),he.parseJSON=JSON.parse,"function"==typeof define&&define.amd&&define("jquery",[],function(){return he});var Wt=e.jQuery,Yt=e.$;return he.noConflict=function(t){return e.$===he&&(e.$=Yt),t&&e.jQuery===he&&(e.jQuery=Wt),he},t||(e.jQuery=e.$=he),he}),/*! jQuery UI - v1.12.0 - 2016-07-08
* http://jqueryui.com
* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js
* Copyright jQuery Foundation and other contributors; Licensed MIT */
function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e){function t(e){for(var t=e.css("visibility");"inherit"===t;)e=e.parent(),t=e.css("visibility");return"hidden"!==t}function n(e){for(var t,n;e.length&&e[0]!==document;){if(t=e.css("position"),("absolute"===t||"relative"===t||"fixed"===t)&&(n=parseInt(e.css("zIndex"),10),!isNaN(n)&&0!==n))return n;e=e.parent()}return 0}function i(){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},e.extend(this._defaults,this.regional[""]),this.regional.en=e.extend(!0,{},this.regional[""]),this.regional["en-US"]=e.extend(!0,{},this.regional.en),this.dpDiv=r(e("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function r(t){var n="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.on("mouseout",n,function(){e(this).removeClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!==-1&&e(this).removeClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!==-1&&e(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",n,o)}function o(){e.datepicker._isDisabledDatepicker(m.inline?m.dpDiv.parent()[0]:m.input[0])||(e(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),e(this).addClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!==-1&&e(this).addClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!==-1&&e(this).addClass("ui-datepicker-next-hover"))}function a(t,n){e.extend(t,n);for(var i in n)null==n[i]&&(t[i]=n[i]);return t}/*!
 * jQuery UI Spinner 1.12.0
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */
function s(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}e.ui=e.ui||{};var l=(e.ui.version="1.12.0",0),u=Array.prototype.slice;e.cleanData=function(t){return function(n){var i,r,o;for(o=0;null!=(r=n[o]);o++)try{i=e._data(r,"events"),i&&i.remove&&e(r).triggerHandler("remove")}catch(a){}t(n)}}(e.cleanData),e.widget=function(t,n,i){var r,o,a,s={},l=t.split(".")[0];t=t.split(".")[1];var u=l+"-"+t;return i||(i=n,n=e.Widget),e.isArray(i)&&(i=e.extend.apply(null,[{}].concat(i))),e.expr[":"][u.toLowerCase()]=function(t){return!!e.data(t,u)},e[l]=e[l]||{},r=e[l][t],o=e[l][t]=function(e,t){return this._createWidget?void(arguments.length&&this._createWidget(e,t)):new o(e,t)},e.extend(o,r,{version:i.version,_proto:e.extend({},i),_childConstructors:[]}),a=new n,a.options=e.widget.extend({},a.options),e.each(i,function(t,i){return e.isFunction(i)?void(s[t]=function(){function e(){return n.prototype[t].apply(this,arguments)}function r(e){return n.prototype[t].apply(this,e)}return function(){var t,n=this._super,o=this._superApply;return this._super=e,this._superApply=r,t=i.apply(this,arguments),this._super=n,this._superApply=o,t}}()):void(s[t]=i)}),o.prototype=e.widget.extend(a,{widgetEventPrefix:r?a.widgetEventPrefix||t:t},s,{constructor:o,namespace:l,widgetName:t,widgetFullName:u}),r?(e.each(r._childConstructors,function(t,n){var i=n.prototype;e.widget(i.namespace+"."+i.widgetName,o,n._proto)}),delete r._childConstructors):n._childConstructors.push(o),e.widget.bridge(t,o),o},e.widget.extend=function(t){for(var n,i,r=u.call(arguments,1),o=0,a=r.length;o<a;o++)for(n in r[o])i=r[o][n],r[o].hasOwnProperty(n)&&void 0!==i&&(e.isPlainObject(i)?t[n]=e.isPlainObject(t[n])?e.widget.extend({},t[n],i):e.widget.extend({},i):t[n]=i);return t},e.widget.bridge=function(t,n){var i=n.prototype.widgetFullName||t;e.fn[t]=function(r){var o="string"==typeof r,a=u.call(arguments,1),s=this;return o?this.each(function(){var n,o=e.data(this,i);return"instance"===r?(s=o,!1):o?e.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):e.error("no such method '"+r+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+r+"'")}):(a.length&&(r=e.widget.extend.apply(null,[r].concat(a))),this.each(function(){var t=e.data(this,i);t?(t.option(r||{}),t._init&&t._init()):e.data(this,i,new n(r,this))})),s}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,n){n=e(n||this.defaultElement||this)[0],this.element=e(n),this.uuid=l++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),this.classesElementLookup={},n!==this&&(e.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===n&&this.destroy()}}),this.document=e(n.style?n.ownerDocument:n.document||n),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){var t=this;this._destroy(),e.each(this.classesElementLookup,function(e,n){t._removeClass(n,e)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:e.noop,widget:function(){return this.element},option:function(t,n){var i,r,o,a=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(a={},i=t.split("."),t=i.shift(),i.length){for(r=a[t]=e.widget.extend({},this.options[t]),o=0;o<i.length-1;o++)r[i[o]]=r[i[o]]||{},r=r[i[o]];if(t=i.pop(),1===arguments.length)return void 0===r[t]?null:r[t];r[t]=n}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];a[t]=n}return this._setOptions(a),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return"classes"===e&&this._setOptionClasses(t),this.options[e]=t,"disabled"===e&&this._setOptionDisabled(t),this},_setOptionClasses:function(t){var n,i,r;for(n in t)r=this.classesElementLookup[n],t[n]!==this.options.classes[n]&&r&&r.length&&(i=e(r.get()),this._removeClass(r,n),i.addClass(this._classes({element:i,keys:n,classes:t,add:!0})))},_setOptionDisabled:function(e){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!e),e&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(t){function n(n,o){var a,s;for(s=0;s<n.length;s++)a=r.classesElementLookup[n[s]]||e(),a=e(t.add?e.unique(a.get().concat(t.element.get())):a.not(t.element).get()),r.classesElementLookup[n[s]]=a,i.push(n[s]),o&&t.classes[n[s]]&&i.push(t.classes[n[s]])}var i=[],r=this;return t=e.extend({element:this.element,classes:this.options.classes||{}},t),t.keys&&n(t.keys.match(/\S+/g)||[],!0),t.extra&&n(t.extra.match(/\S+/g)||[]),i.join(" ")},_removeClass:function(e,t,n){return this._toggleClass(e,t,n,!1)},_addClass:function(e,t,n){return this._toggleClass(e,t,n,!0)},_toggleClass:function(e,t,n,i){i="boolean"==typeof i?i:n;var r="string"==typeof e||null===e,o={extra:r?t:n,keys:r?e:t,element:r?this.element:e,add:i};return o.element.toggleClass(this._classes(o),i),this},_on:function(t,n,i){var r,o=this;"boolean"!=typeof t&&(i=n,n=t,t=!1),i?(n=r=e(n),this.bindings=this.bindings.add(n)):(i=n,n=this.element,r=this.widget()),e.each(i,function(i,a){function s(){if(t||o.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled"))return("string"==typeof a?o[a]:a).apply(o,arguments)}"string"!=typeof a&&(s.guid=a.guid=a.guid||s.guid||e.guid++);var l=i.match(/^([\w:-]*)\s*(.*)$/),u=l[1]+o.eventNamespace,c=l[2];c?r.on(u,c,s):n.on(u,s)})},_off:function(t,n){n=(n||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(n).off(n),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){function n(){return("string"==typeof e?i[e]:e).apply(i,arguments)}var i=this;return setTimeout(n,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(e(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(e(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(e(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(e(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,n,i){var r,o,a=this.options[t];if(i=i||{},n=e.Event(n),n.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).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),!(e.isFunction(a)&&a.apply(this.element[0],[n].concat(i))===!1||n.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,n){e.Widget.prototype["_"+t]=function(i,r,o){"string"==typeof r&&(r={effect:r});var a,s=r?r===!0||"number"==typeof r?n:r.effect||n:t;r=r||{},"number"==typeof r&&(r={duration:r}),a=!e.isEmptyObject(r),r.complete=o,r.delay&&i.delay(r.delay),a&&e.effects&&e.effects.effect[s]?i[t](r):s!==t&&i[s]?i[s](r.duration,r.easing,o):i.queue(function(n){e(this)[t](),o&&o.call(i[0]),n()})}});e.widget;/*!
 * jQuery UI Position 1.12.0
 * 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 t(e,t,n){return[parseFloat(e[0])*(d.test(e[0])?t/100:1),parseFloat(e[1])*(d.test(e[1])?n/100:1)]}function n(t,n){return parseInt(e.css(t,n),10)||0}function i(t){var n=t[0];return 9===n.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(n)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:n.preventDefault?{width:0,height:0,offset:{top:n.pageY,left:n.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}var r,o,a=Math.max,s=Math.abs,l=Math.round,u=/left|center|right/,c=/top|center|bottom/,f=/[\+\-]\d+(\.[\d]+)?%?/,h=/^\w+/,d=/%$/,p=e.fn.position;o=function(){var t=e("<div>").css("position","absolute").appendTo("body").offset({top:1.5,left:1.5}),n=1.5===t.offset().top;return t.remove(),o=function(){return n},n},e.position={scrollbarWidth:function(){if(void 0!==r)return r;var t,n,i=e("<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 e("body").append(i),t=o.offsetWidth,i.css("overflow","scroll"),n=o.offsetWidth,t===n&&(n=i[0].clientWidth),i.remove(),r=t-n},getScrollInfo:function(t){var n=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),r="scroll"===n||"auto"===n&&t.width<t.element[0].scrollWidth,o="scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight;return{width:o?e.position.scrollbarWidth():0,height:r?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var n=e(t||window),i=e.isWindow(n[0]),r=!!n[0]&&9===n[0].nodeType,o=!i&&!r;return{element:n,isWindow:i,isDocument:r,offset:o?e(t).offset():{left:0,top:0},scrollLeft:n.scrollLeft(),scrollTop:n.scrollTop(),width:n.outerWidth(),height:n.outerHeight()}}},e.fn.position=function(r){if(!r||!r.of)return p.apply(this,arguments);r=e.extend({},r);var d,g,m,v,y,b,_=e(r.of),E=e.position.getWithinInfo(r.within),x=e.position.getScrollInfo(E),w=(r.collision||"flip").split(" "),T={};return b=i(_),_[0].preventDefault&&(r.at="left top"),g=b.width,m=b.height,v=b.offset,y=e.extend({},v),e.each(["my","at"],function(){var e,t,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",e=f.exec(n[0]),t=f.exec(n[1]),T[this]=[e?e[0]:0,t?t[0]:0],r[this]=[h.exec(n[0])[0],h.exec(n[1])[0]]}),1===w.length&&(w[1]=w[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),d=t(T.at,g,m),y.left+=d[0],y.top+=d[1],this.each(function(){var i,u,c=e(this),f=c.outerWidth(),h=c.outerHeight(),p=n(this,"marginLeft"),b=n(this,"marginTop"),S=f+p+n(this,"marginRight")+x.width,A=h+b+n(this,"marginBottom")+x.height,C=e.extend({},y),k=t(T.my,c.outerWidth(),c.outerHeight());"right"===r.my[0]?C.left-=f:"center"===r.my[0]&&(C.left-=f/2),"bottom"===r.my[1]?C.top-=h:"center"===r.my[1]&&(C.top-=h/2),C.left+=k[0],C.top+=k[1],o()||(C.left=l(C.left),C.top=l(C.top)),i={marginLeft:p,marginTop:b},e.each(["left","top"],function(t,n){e.ui.position[w[t]]&&e.ui.position[w[t]][n](C,{targetWidth:g,targetHeight:m,elemWidth:f,elemHeight:h,collisionPosition:i,collisionWidth:S,collisionHeight:A,offset:[d[0]+k[0],d[1]+k[1]],my:r.my,at:r.at,within:E,elem:c})}),r.using&&(u=function(e){var t=v.left-C.left,n=t+g-f,i=v.top-C.top,o=i+m-h,l={target:{element:_,left:v.left,top:v.top,width:g,height:m},element:{element:c,left:C.left,top:C.top,width:f,height:h},horizontal:n<0?"left":t>0?"right":"center",vertical:o<0?"top":i>0?"bottom":"middle"};g<f&&s(t+n)<g&&(l.horizontal="center"),m<h&&s(i+o)<m&&(l.vertical="middle"),a(s(t),s(n))>a(s(i),s(o))?l.important="horizontal":l.important="vertical",r.using.call(this,e,l)}),c.offset(e.extend(C,{using:u}))})},e.ui.position={fit:{left:function(e,t){var n,i=t.within,r=i.isWindow?i.scrollLeft:i.offset.left,o=i.width,s=e.left-t.collisionPosition.marginLeft,l=r-s,u=s+t.collisionWidth-o-r;t.collisionWidth>o?l>0&&u<=0?(n=e.left+l+t.collisionWidth-o-r,e.left+=l-n):u>0&&l<=0?e.left=r:l>u?e.left=r+o-t.collisionWidth:e.left=r:l>0?e.left+=l:u>0?e.left-=u:e.left=a(e.left-s,e.left)},top:function(e,t){var n,i=t.within,r=i.isWindow?i.scrollTop:i.offset.top,o=t.within.height,s=e.top-t.collisionPosition.marginTop,l=r-s,u=s+t.collisionHeight-o-r;t.collisionHeight>o?l>0&&u<=0?(n=e.top+l+t.collisionHeight-o-r,e.top+=l-n):u>0&&l<=0?e.top=r:l>u?e.top=r+o-t.collisionHeight:e.top=r:l>0?e.top+=l:u>0?e.top-=u:e.top=a(e.top-s,e.top)}},flip:{left:function(e,t){var n,i,r=t.within,o=r.offset.left+r.scrollLeft,a=r.width,l=r.isWindow?r.scrollLeft:r.offset.left,u=e.left-t.collisionPosition.marginLeft,c=u-l,f=u+t.collisionWidth-a-l,h="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,d="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,p=-2*t.offset[0];c<0?(n=e.left+h+d+p+t.collisionWidth-a-o,(n<0||n<s(c))&&(e.left+=h+d+p)):f>0&&(i=e.left-t.collisionPosition.marginLeft+h+d+p-l,(i>0||s(i)<f)&&(e.left+=h+d+p))},top:function(e,t){var n,i,r=t.within,o=r.offset.top+r.scrollTop,a=r.height,l=r.isWindow?r.scrollTop:r.offset.top,u=e.top-t.collisionPosition.marginTop,c=u-l,f=u+t.collisionHeight-a-l,h="top"===t.my[1],d=h?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,p="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,g=-2*t.offset[1];c<0?(i=e.top+d+p+g+t.collisionHeight-a-o,(i<0||i<s(c))&&(e.top+=d+p+g)):f>0&&(n=e.top-t.collisionPosition.marginTop+d+p+g-l,(n>0||s(n)<f)&&(e.top+=d+p+g))}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}}}();var c=(e.ui.position,e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}}):function(t,n,i){return!!e.data(t,i[3])}}),e.fn.extend({disableSelection:function(){var e="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(e+".ui-disableSelection",function(e){e.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}}),"ui-effects-"),f="ui-effects-style",h="ui-effects-animated",d=e;e.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(e,t){function n(e,t,n){var i=f[t.type]||{};return null==e?n||!t.def?null:t.def:(e=i.floor?~~e:parseFloat(e),isNaN(e)?t.def:i.mod?(e+i.mod)%i.mod:0>e?0:i.max<e?i.max:e)}function i(t){var n=u(),i=n._rgba=[];return t=t.toLowerCase(),p(l,function(e,r){var o,a=r.re.exec(t),s=a&&r.parse(a),l=r.space||"rgba";if(s)return o=n[l](s),n[c[l].cache]=o[c[l].cache],i=n._rgba=o._rgba,!1}),i.length?("0,0,0,0"===i.join()&&e.extend(i,o.transparent),n):o[t]}function r(e,t,n){return n=(n+1)%1,6*n<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}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(e){return[e[1],e[2],e[3],e[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[2.55*e[1],2.55*e[2],2.55*e[3],e[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(e){return[e[1],e[2]/100,e[3]/100,e[4]]}}],u=e.Color=function(t,n,i,r){return new e.Color.fn.parse(t,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"}}}},f={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},h=u.support={},d=e("<p>")[0],p=e.each;d.style.cssText="background-color:rgba(1,1,1,.5)",h.rgba=d.style.backgroundColor.indexOf("rgba")>-1,p(c,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),u.fn=e.extend(u.prototype,{parse:function(r,a,s,l){if(r===t)return this._rgba=[null,null,null,null],this;(r.jquery||r.nodeType)&&(r=e(r).css(a),a=t);var f=this,h=e.type(r),d=this._rgba=[];return a!==t&&(r=[r,a,s,l],h="array"),"string"===h?this.parse(i(r)||o._default):"array"===h?(p(c.rgba.props,function(e,t){d[t.idx]=n(r[t.idx],t)}),this):"object"===h?(r instanceof u?p(c,function(e,t){r[t.cache]&&(f[t.cache]=r[t.cache].slice())}):p(c,function(t,i){var o=i.cache;p(i.props,function(e,t){if(!f[o]&&i.to){if("alpha"===e||null==r[e])return;f[o]=i.to(f._rgba)}f[o][t.idx]=n(r[e],t,!0)}),f[o]&&e.inArray(null,f[o].slice(0,3))<0&&(f[o][3]=1,i.from&&(f._rgba=i.from(f[o])))}),this):void 0},is:function(e){var t=u(e),n=!0,i=this;return p(c,function(e,r){var o,a=t[r.cache];return a&&(o=i[r.cache]||r.to&&r.to(i._rgba)||[],p(r.props,function(e,t){if(null!=a[t.idx])return n=a[t.idx]===o[t.idx]})),n}),n},_space:function(){var e=[],t=this;return p(c,function(n,i){t[i.cache]&&e.push(n)}),e.pop()},transition:function(e,t){var i=u(e),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(e,r){var o=r.idx,a=s[o],u=i[o],c=f[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)*t+a,r)))}),this[r](l)},blend:function(t){if(1===this._rgba[3])return this;var n=this._rgba.slice(),i=n.pop(),r=u(t)._rgba;return u(e.map(n,function(e,t){return(1-i)*r[t]+i*e}))},toRgbaString:function(){var t="rgba(",n=e.map(this._rgba,function(e,t){return null==e?t>2?1:0:e});return 1===n[3]&&(n.pop(),t="rgb("),t+n.join()+")"},toHslaString:function(){var t="hsla(",n=e.map(this.hsla(),function(e,t){return null==e&&(e=t>2?1:0),t&&t<3&&(e=Math.round(100*e)+"%"),e});return 1===n[3]&&(n.pop(),t="hsl("),t+n.join()+")"},toHexString:function(t){var n=this._rgba.slice(),i=n.pop();return t&&n.push(~~(255*i)),"#"+e.map(n,function(e){return e=(e||0).toString(16),1===e.length?"0"+e:e}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),u.fn.parse.prototype=u.fn,c.hsla.to=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t,n,i=e[0]/255,r=e[1]/255,o=e[2]/255,a=e[3],s=Math.max(i,r,o),l=Math.min(i,r,o),u=s-l,c=s+l,f=.5*c;return t=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:f<=.5?u/c:u/(2-c),[Math.round(t)%360,n,f,null==a?1:a]},c.hsla.from=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t=e[0]/360,n=e[1],i=e[2],o=e[3],a=i<=.5?i*(1+n):i+n-i*n,s=2*i-a;return[Math.round(255*r(s,a,t+1/3)),Math.round(255*r(s,a,t)),Math.round(255*r(s,a,t-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===t)return this[a].slice();var r,s=e.type(i),f="array"===s||"object"===s?i:arguments,h=this[a].slice();return p(o,function(e,t){var i=f["object"===s?e:t.idx];null==i&&(i=h[t.idx]),h[t.idx]=n(i,t)}),c?(r=u(c(h)),r[a]=h,r):u(h)},p(o,function(t,n){u.fn[t]||(u.fn[t]=function(r){var o,a=e.type(r),l="alpha"===t?this._hsla?"hsla":"rgba":i,u=this[l](),c=u[n.idx];return"undefined"===a?c:("function"===a&&(r=r.call(this,c),a=e.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(t){var n=t.split(" ");p(n,function(t,n){e.cssHooks[n]={set:function(t,r){var o,a,s="";if("transparent"!==r&&("string"!==e.type(r)||(o=i(r)))){if(r=u(o||r),!h.rgba&&1!==r._rgba[3]){for(a="backgroundColor"===n?t.parentNode:t;(""===s||"transparent"===s)&&a&&a.style;)try{s=e.css(a,"backgroundColor"),a=a.parentNode}catch(l){}r=r.blend(s&&"transparent"!==s?s:"_default")}r=r.toRgbaString()}try{t.style[n]=r}catch(l){}}},e.fx.step[n]=function(t){t.colorInit||(t.start=u(t.elem,n),t.end=u(t.end),t.colorInit=!0),e.cssHooks[n].set(t.elem,t.start.transition(t.end,t.pos))}})},u.hook(a),e.cssHooks.borderColor={expand:function(e){var t={};return p(["Top","Right","Bottom","Left"],function(n,i){t["border"+i+"Color"]=e}),t}},o=e.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"}}(d),function(){function t(t){var n,i,r=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,o={};if(r&&r.length&&r[0]&&r[r[0]])for(i=r.length;i--;)n=r[i],"string"==typeof r[n]&&(o[e.camelCase(n)]=r[n]);else for(n in r)"string"==typeof r[n]&&(o[n]=r[n]);return o}function n(t,n){var i,o,a={};for(i in n)o=n[i],t[i]!==o&&(r[i]||!e.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};e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,n){e.fx.step[n]=function(e){("none"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(d.style(e.elem,n,e.end),e.setAttr=!0)}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e.effects.animateClass=function(r,o,a,s){var l=e.speed(o,a,s);return this.queue(function(){var o,a=e(this),s=a.attr("class")||"",u=l.children?a.find("*").addBack():a;u=u.map(function(){var n=e(this);return{el:n,start:t(this)}}),o=function(){e.each(i,function(e,t){r[t]&&a[t+"Class"](r[t])})},o(),u=u.map(function(){return this.end=t(this.el[0]),this.diff=n(this.start,this.end),this}),a.attr("class",s),u=u.map(function(){var t=this,n=e.Deferred(),i=e.extend({},l,{queue:!1,complete:function(){n.resolve(t)}});return this.el.animate(this.diff,i),n.promise()}),e.when.apply(e,u.get()).done(function(){o(),e.each(arguments,function(){var t=this.el;e.each(this.diff,function(e){t.css(e,"")})}),l.complete.call(a[0])})})},e.fn.extend({addClass:function(t){return function(n,i,r,o){return i?e.effects.animateClass.call(this,{add:n},i,r,o):t.apply(this,arguments)}}(e.fn.addClass),removeClass:function(t){return function(n,i,r,o){return arguments.length>1?e.effects.animateClass.call(this,{remove:n},i,r,o):t.apply(this,arguments)}}(e.fn.removeClass),toggleClass:function(t){return function(n,i,r,o,a){return"boolean"==typeof i||void 0===i?r?e.effects.animateClass.call(this,i?{add:n}:{remove:n},r,o,a):t.apply(this,arguments):e.effects.animateClass.call(this,{toggle:n},i,r,o)}}(e.fn.toggleClass),switchClass:function(t,n,i,r,o){return e.effects.animateClass.call(this,{add:n,remove:t},i,r,o)}})}(),function(){function t(t,n,i,r){return e.isPlainObject(t)&&(n=t,t=t.effect),t={effect:t},null==n&&(n={}),e.isFunction(n)&&(r=n,i=null,n={}),("number"==typeof n||e.fx.speeds[n])&&(r=i,i=n,n={}),e.isFunction(i)&&(r=i,i=null),n&&e.extend(t,n),i=i||n.duration,t.duration=e.fx.off?0:"number"==typeof i?i:i in e.fx.speeds?e.fx.speeds[i]:e.fx.speeds._default,t.complete=r||n.complete,t}function n(t){return!(t&&"number"!=typeof t&&!e.fx.speeds[t])||("string"==typeof t&&!e.effects.effect[t]||(!!e.isFunction(t)||"object"==typeof t&&!t.effect))}function i(e,t){var n=t.outerWidth(),i=t.outerHeight(),r=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,o=r.exec(e)||["",0,n,i,0];return{top:parseFloat(o[1])||0,right:"auto"===o[2]?n:parseFloat(o[2]),bottom:"auto"===o[3]?i:parseFloat(o[3]),left:parseFloat(o[4])||0}}e.expr&&e.expr.filters&&e.expr.filters.animated&&(e.expr.filters.animated=function(t){return function(n){return!!e(n).data(h)||t(n)}}(e.expr.filters.animated)),e.uiBackCompat!==!1&&e.extend(e.effects,{save:function(e,t){for(var n=0,i=t.length;n<i;n++)null!==t[n]&&e.data(c+t[n],e[0].style[t[n]])},restore:function(e,t){for(var n,i=0,r=t.length;i<r;i++)null!==t[i]&&(n=e.data(c+t[i]),e.css(t[i],n))},setMode:function(e,t){return"toggle"===t&&(t=e.is(":hidden")?"show":"hide"),t},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var n={width:t.outerWidth(!0),height:t.outerHeight(!0),"float":t.css("float")},i=e("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),r={width:t.width(),height:t.height()},o=document.activeElement;try{o.id}catch(a){o=document.body}return t.wrap(i),(t[0]===o||e.contains(t[0],o))&&e(o).trigger("focus"),i=t.parent(),"static"===t.css("position")?(i.css({position:"relative"}),t.css({position:"relative"})):(e.extend(n,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],function(e,i){n[i]=t.css(i),isNaN(parseInt(n[i],10))&&(n[i]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(r),i.css(n).show()},removeWrapper:function(t){var n=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===n||e.contains(t[0],n))&&e(n).trigger("focus")),t}}),e.extend(e.effects,{version:"1.12.0",define:function(t,n,i){return i||(i=n,n="effect"),e.effects.effect[t]=i,e.effects.effect[t].mode=n,i},scaledDimensions:function(e,t,n){if(0===t)return{height:0,width:0,outerHeight:0,outerWidth:0};var i="horizontal"!==n?(t||100)/100:1,r="vertical"!==n?(t||100)/100:1;return{height:e.height()*r,width:e.width()*i,outerHeight:e.outerHeight()*r,outerWidth:e.outerWidth()*i}},clipToBox:function(e){return{width:e.clip.right-e.clip.left,height:e.clip.bottom-e.clip.top,left:e.clip.left,top:e.clip.top}},unshift:function(e,t,n){var i=e.queue();t>1&&i.splice.apply(i,[1,0].concat(i.splice(t,n))),e.dequeue()},saveStyle:function(e){e.data(f,e[0].style.cssText)},restoreStyle:function(e){e[0].style.cssText=e.data(f)||"",e.removeData(f)},mode:function(e,t){var n=e.is(":hidden");return"toggle"===t&&(t=n?"show":"hide"),(n?"hide"===t:"show"===t)&&(t="none"),t},getBaseline:function(e,t){var n,i;switch(e[0]){case"top":n=0;break;case"middle":n=.5;break;case"bottom":n=1;break;default:n=e[0]/t.height}switch(e[1]){case"left":i=0;break;case"center":i=.5;break;case"right":i=1;break;default:i=e[1]/t.width}return{x:i,y:n}},createPlaceholder:function(t){var n,i=t.css("position"),r=t.position();return t.css({marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()),/^(static|relative)/.test(i)&&(i="absolute",n=e("<"+t[0].nodeName+">").insertAfter(t).css({display:/^(inline|ruby)/.test(t.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight"),"float":t.css("float")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"),t.data(c+"placeholder",n)),t.css({position:i,left:r.left,top:r.top}),n},removePlaceholder:function(e){var t=c+"placeholder",n=e.data(t);n&&(n.remove(),e.removeData(t))},cleanUp:function(t){e.effects.restoreStyle(t),e.effects.removePlaceholder(t)},setTransition:function(t,n,i,r){return r=r||{},e.each(n,function(e,n){var o=t.cssUnit(n);o[0]>0&&(r[n]=o[0]*i+o[1])}),r}}),e.fn.extend({effect:function(){function n(t){function n(){s.removeData(h),e.effects.cleanUp(s),"hide"===i.mode&&s.hide(),a()}function a(){e.isFunction(l)&&l.call(s[0]),e.isFunction(t)&&t()}var s=e(this);i.mode=c.shift(),e.uiBackCompat===!1||o?"none"===i.mode?(s[u](),a()):r.call(s[0],i,n):(s.is(":hidden")?"hide"===u:"show"===u)?(s[u](),a()):r.call(s[0],i,a)}var i=t.apply(this,arguments),r=e.effects.effect[i.effect],o=r.mode,a=i.queue,s=a||"fx",l=i.complete,u=i.mode,c=[],f=function(t){var n=e(this),i=e.effects.mode(n,u)||o;n.data(h,!0),c.push(i),o&&("show"===i||i===o&&"hide"===i)&&n.show(),o&&"none"===i||e.effects.saveStyle(n),e.isFunction(t)&&t()};return e.fx.off||!r?u?this[u](i.duration,l):this.each(function(){l&&l.call(this)}):a===!1?this.each(f).each(n):this.queue(s,f).queue(s,n)},show:function(e){return function(i){if(n(i))return e.apply(this,arguments);var r=t.apply(this,arguments);return r.mode="show",this.effect.call(this,r)}}(e.fn.show),hide:function(e){return function(i){if(n(i))return e.apply(this,arguments);var r=t.apply(this,arguments);return r.mode="hide",this.effect.call(this,r)}}(e.fn.hide),toggle:function(e){return function(i){if(n(i)||"boolean"==typeof i)return e.apply(this,arguments);var r=t.apply(this,arguments);return r.mode="toggle",this.effect.call(this,r)}}(e.fn.toggle),cssUnit:function(t){var n=this.css(t),i=[];return e.each(["em","px","%","pt"],function(e,t){n.indexOf(t)>0&&(i=[parseFloat(n),t])}),i},cssClip:function(e){return e?this.css("clip","rect("+e.top+"px "+e.right+"px "+e.bottom+"px "+e.left+"px)"):i(this.css("clip"),this)},transfer:function(t,n){var i=e(this),r=e(t.to),o="fixed"===r.css("position"),a=e("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()},f=i.offset(),h=e("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(t.className).css({top:f.top-s,left:f.left-l,height:i.innerHeight(),width:i.innerWidth(),position:o?"fixed":"absolute"}).animate(c,t.duration,t.easing,function(){h.remove(),e.isFunction(n)&&n()})}}),e.fx.step.clip=function(t){t.clipInit||(t.start=e(t.elem).cssClip(),"string"==typeof t.end&&(t.end=i(t.end,t.elem)),t.clipInit=!0),e(t.elem).cssClip({top:t.pos*(t.end.top-t.start.top)+t.start.top,right:t.pos*(t.end.right-t.start.right)+t.start.right,bottom:t.pos*(t.end.bottom-t.start.bottom)+t.start.bottom,left:t.pos*(t.end.left-t.start.left)+t.start.left})}}(),function(){var t={};e.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,n){t[n]=function(t){return Math.pow(t,e+2)}}),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,n=4;e<((t=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*t-2)/22-e,2)}}),e.each(t,function(t,n){e.easing["easeIn"+t]=n,e.easing["easeOut"+t]=function(e){return 1-n(1-e)},e.easing["easeInOut"+t]=function(e){return e<.5?n(2*e)/2:1-n(e*-2+2)/2}})}();var p,p=e.effects;e.effects.define("blind","hide",function(t,n){var i={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},r=e(this),o=t.direction||"up",a=r.cssClip(),s={clip:e.extend({},a)},l=e.effects.createPlaceholder(r);s.clip[i[o][0]]=s.clip[i[o][1]],"show"===t.mode&&(r.cssClip(s.clip),l&&l.css(e.effects.clipToBox(s)),s.clip=a),l&&l.animate(e.effects.clipToBox(s),t.duration,t.easing),r.animate(s,{queue:!1,duration:t.duration,easing:t.easing,complete:n})}),e.effects.define("bounce",function(t,n){var i,r,o,a=e(this),s=t.mode,l="hide"===s,u="show"===s,c=t.direction||"up",f=t.distance,h=t.times||5,d=2*h+(u||l?1:0),p=t.duration/d,g=t.easing,m="up"===c||"down"===c?"top":"left",v="up"===c||"left"===c,y=0,b=a.queue().length;for(e.effects.createPlaceholder(a),o=a.css(m),f||(f=a["top"===m?"outerHeight":"outerWidth"]()/3),u&&(r={opacity:1},r[m]=o,a.css("opacity",0).css(m,v?2*-f:2*f).animate(r,p,g)),l&&(f/=Math.pow(2,h-1)),r={},r[m]=o;y<h;y++)i={},i[m]=(v?"-=":"+=")+f,a.animate(i,p,g).animate(r,p,g),f=l?2*f:f/2;l&&(i={opacity:0},i[m]=(v?"-=":"+=")+f,a.animate(i,p,g)),a.queue(n),e.effects.unshift(a,b,d+1)}),e.effects.define("clip","hide",function(t,n){var i,r={},o=e(this),a=t.direction||"vertical",s="both"===a,l=s||"horizontal"===a,u=s||"vertical"===a;i=o.cssClip(),r.clip={top:u?(i.bottom-i.top)/2:i.top,right:l?(i.right-i.left)/2:i.right,bottom:u?(i.bottom-i.top)/2:i.bottom,left:l?(i.right-i.left)/2:i.left},e.effects.createPlaceholder(o),"show"===t.mode&&(o.cssClip(r.clip),r.clip=i),o.animate(r,{queue:!1,duration:t.duration,easing:t.easing,complete:n})}),e.effects.define("drop","hide",function(t,n){var i,r=e(this),o=t.mode,a="show"===o,s=t.direction||"left",l="up"===s||"down"===s?"top":"left",u="up"===s||"left"===s?"-=":"+=",c="+="===u?"-=":"+=",f={opacity:0};e.effects.createPlaceholder(r),i=t.distance||r["top"===l?"outerHeight":"outerWidth"](!0)/2,f[l]=u+i,a&&(r.css(f),f[l]=c+i,f.opacity=1),r.animate(f,{queue:!1,duration:t.duration,easing:t.easing,complete:n})}),e.effects.define("explode","hide",function(t,n){function i(){b.push(this),b.length===f*h&&r()}function r(){d.css({visibility:"visible"}),e(b).remove(),n()}var o,a,s,l,u,c,f=t.pieces?Math.round(Math.sqrt(t.pieces)):3,h=f,d=e(this),p=t.mode,g="show"===p,m=d.show().css("visibility","hidden").offset(),v=Math.ceil(d.outerWidth()/h),y=Math.ceil(d.outerHeight()/f),b=[];for(o=0;o<f;o++)for(l=m.top+o*y,c=o-(f-1)/2,a=0;a<h;a++)s=m.left+a*v,u=a-(h-1)/2,d.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},t.duration||500,t.easing,i)}),e.effects.define("fade","toggle",function(t,n){var i="show"===t.mode;e(this).css("opacity",i?0:1).animate({opacity:i?1:0},{queue:!1,duration:t.duration,easing:t.easing,complete:n})}),e.effects.define("fold","hide",function(t,n){var i=e(this),r=t.mode,o="show"===r,a="hide"===r,s=t.size||15,l=/([0-9]+)%/.exec(s),u=!!t.horizFirst,c=u?["right","bottom"]:["bottom","right"],f=t.duration/2,h=e.effects.createPlaceholder(i),d=i.cssClip(),p={clip:e.extend({},d)},g={clip:e.extend({},d)},m=[d[c[0]],d[c[1]]],v=i.queue().length;l&&(s=parseInt(l[1],10)/100*m[a?0:1]),p.clip[c[0]]=s,g.clip[c[0]]=s,g.clip[c[1]]=0,o&&(i.cssClip(g.clip),h&&h.css(e.effects.clipToBox(g)),g.clip=d),i.queue(function(n){h&&h.animate(e.effects.clipToBox(p),f,t.easing).animate(e.effects.clipToBox(g),f,t.easing),n()}).animate(p,f,t.easing).animate(g,f,t.easing).queue(n),e.effects.unshift(i,v,4)}),e.effects.define("highlight","show",function(t,n){var i=e(this),r={backgroundColor:i.css("backgroundColor")};"hide"===t.mode&&(r.opacity=0),e.effects.saveStyle(i),i.css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(r,{queue:!1,duration:t.duration,easing:t.easing,complete:n})}),e.effects.define("size",function(t,n){var i,r,o,a=e(this),s=["fontSize"],l=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],u=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],c=t.mode,f="effect"!==c,h=t.scale||"both",d=t.origin||["middle","center"],p=a.css("position"),g=a.position(),m=e.effects.scaledDimensions(a),v=t.from||m,y=t.to||e.effects.scaledDimensions(a,0);e.effects.createPlaceholder(a),"show"===c&&(o=v,v=y,y=o),r={from:{y:v.height/m.height,x:v.width/m.width},to:{y:y.height/m.height,x:y.width/m.width}},"box"!==h&&"both"!==h||(r.from.y!==r.to.y&&(v=e.effects.setTransition(a,l,r.from.y,v),y=e.effects.setTransition(a,l,r.to.y,y)),r.from.x!==r.to.x&&(v=e.effects.setTransition(a,u,r.from.x,v),y=e.effects.setTransition(a,u,r.to.x,y))),"content"!==h&&"both"!==h||r.from.y!==r.to.y&&(v=e.effects.setTransition(a,s,r.from.y,v),y=e.effects.setTransition(a,s,r.to.y,y)),d&&(i=e.effects.getBaseline(d,m),v.top=(m.outerHeight-v.outerHeight)*i.y+g.top,v.left=(m.outerWidth-v.outerWidth)*i.x+g.left,y.top=(m.outerHeight-y.outerHeight)*i.y+g.top,y.left=(m.outerWidth-y.outerWidth)*i.x+g.left),a.css(v),"content"!==h&&"both"!==h||(l=l.concat(["marginTop","marginBottom"]).concat(s),u=u.concat(["marginLeft","marginRight"]),a.find("*[width]").each(function(){var n=e(this),i=e.effects.scaledDimensions(n),o={height:i.height*r.from.y,width:i.width*r.from.x,outerHeight:i.outerHeight*r.from.y,outerWidth:i.outerWidth*r.from.x},a={height:i.height*r.to.y,width:i.width*r.to.x,outerHeight:i.height*r.to.y,outerWidth:i.width*r.to.x};r.from.y!==r.to.y&&(o=e.effects.setTransition(n,l,r.from.y,o),a=e.effects.setTransition(n,l,r.to.y,a)),r.from.x!==r.to.x&&(o=e.effects.setTransition(n,u,r.from.x,o),a=e.effects.setTransition(n,u,r.to.x,a)),f&&e.effects.saveStyle(n),n.css(o),n.animate(a,t.duration,t.easing,function(){f&&e.effects.restoreStyle(n)})})),a.animate(y,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){var t=a.offset();0===y.opacity&&a.css("opacity",v.opacity),f||(a.css("position","static"===p?"relative":p).offset(t),e.effects.saveStyle(a)),n()}})}),e.effects.define("scale",function(t,n){var i=e(this),r=t.mode,o=parseInt(t.percent,10)||(0===parseInt(t.percent,10)?0:"effect"!==r?0:100),a=e.extend(!0,{from:e.effects.scaledDimensions(i),to:e.effects.scaledDimensions(i,o,t.direction||"both"),origin:t.origin||["middle","center"]},t);t.fade&&(a.from.opacity=1,a.to.opacity=0),e.effects.effect.size.call(this,a,n)}),e.effects.define("puff","hide",function(t,n){var i=e.extend(!0,{},t,{fade:!0,percent:parseInt(t.percent,10)||150});e.effects.effect.scale.call(this,i,n)}),e.effects.define("pulsate","show",function(t,n){var i=e(this),r=t.mode,o="show"===r,a="hide"===r,s=o||a,l=2*(t.times||5)+(s?1:0),u=t.duration/l,c=0,f=1,h=i.queue().length;for(!o&&i.is(":visible")||(i.css("opacity",0).show(),c=1);f<l;f++)i.animate({opacity:c},u,t.easing),c=1-c;i.animate({opacity:c},u,t.easing),i.queue(n),e.effects.unshift(i,h,l+1)}),e.effects.define("shake",function(t,n){var i=1,r=e(this),o=t.direction||"left",a=t.distance||20,s=t.times||3,l=2*s+1,u=Math.round(t.duration/l),c="up"===o||"down"===o?"top":"left",f="up"===o||"left"===o,h={},d={},p={},g=r.queue().length;for(e.effects.createPlaceholder(r),h[c]=(f?"-=":"+=")+a,d[c]=(f?"+=":"-=")+2*a,p[c]=(f?"-=":"+=")+2*a,r.animate(h,u,t.easing);i<s;i++)r.animate(d,u,t.easing).animate(p,u,t.easing);r.animate(d,u,t.easing).animate(h,u/2,t.easing).queue(n),e.effects.unshift(r,g,l+1)}),e.effects.define("slide","show",function(t,n){var i,r,o=e(this),a={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},s=t.mode,l=t.direction||"left",u="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l,f=t.distance||o["top"===u?"outerHeight":"outerWidth"](!0),h={};e.effects.createPlaceholder(o),i=o.cssClip(),r=o.position()[u],h[u]=(c?-1:1)*f+r,h.clip=o.cssClip(),h.clip[a[l][1]]=h.clip[a[l][0]],"show"===s&&(o.cssClip(h.clip),o.css(u,h[u]),h.clip=i,h[u]=r),o.animate(h,{queue:!1,duration:t.duration,easing:t.easing,complete:n})});e.uiBackCompat!==!1&&(p=e.effects.define("transfer",function(t,n){e(this).transfer(t,n)}));/*!
 * jQuery UI Focusable 1.12.0
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */
e.ui.focusable=function(n,i){var r,o,a,s,l,u=n.nodeName.toLowerCase();return"area"===u?(r=n.parentNode,o=r.name,!(!n.href||!o||"map"!==r.nodeName.toLowerCase())&&(a=e("img[usemap='#"+o+"']"),a.length>0&&a.is(":visible"))):(/^(input|select|textarea|button|object)$/.test(u)?(s=!n.disabled,s&&(l=e(n).closest("fieldset")[0],l&&(s=!l.disabled))):s="a"===u?n.href||i:i,s&&e(n).is(":visible")&&t(e(n)))},e.extend(e.expr[":"],{focusable:function(t){return e.ui.focusable(t,null!=e.attr(t,"tabindex"))}});e.ui.focusable,e.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):e(this[0].form)},e.ui.formResetMixin={_formResetHandler:function(){var t=e(this);setTimeout(function(){var n=t.data("ui-form-reset-instances");e.each(n,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var e=this.form.data("ui-form-reset-instances")||[];e.length||this.form.on("reset.ui-form-reset",this._formResetHandler),e.push(this),this.form.data("ui-form-reset-instances",e)}},_unbindFormResetHandler:function(){if(this.form.length){var t=this.form.data("ui-form-reset-instances");t.splice(e.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}};/*!
 * jQuery UI Support for jQuery core 1.7.x 1.12.0
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 */
"1.7"===e.fn.jquery.substring(0,3)&&(e.each(["Width","Height"],function(t,n){function i(t,n,i,o){return e.each(r,function(){n-=parseFloat(e.css(t,"padding"+this))||0,i&&(n-=parseFloat(e.css(t,"border"+this+"Width"))||0),o&&(n-=parseFloat(e.css(t,"margin"+this))||0)}),n}var r="Width"===n?["Left","Right"]:["Top","Bottom"],o=n.toLowerCase(),a={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+n]=function(t){return void 0===t?a["inner"+n].call(this):this.each(function(){e(this).css(o,i(this,t)+"px")})},e.fn["outer"+n]=function(t,r){return"number"!=typeof t?a["outer"+n].call(this,t):this.each(function(){e(this).css(o,i(this,t,!0,r)+"px")})}}),e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))});/*!
 * jQuery UI Keycode 1.12.0
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */
e.ui.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},e.ui.escapeSelector=function(){var e=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g;return function(t){return t.replace(e,"\\$1")}}(),e.fn.labels=function(){var t,n,i,r,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(r=this.eq(0).parents("label"),i=this.attr("id"),i&&(t=this.eq(0).parents().last(),o=t.add(t.length?t.siblings():this.siblings()),n="label[for='"+e.ui.escapeSelector(i)+"']",r=r.add(o.find(n).addBack(n))),this.pushStack(r))},e.fn.scrollParent=function(t){var n=this.css("position"),i="absolute"===n,r=t?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var t=e(this);return(!i||"static"!==t.css("position"))&&r.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==n&&o.length?o:e(this[0].ownerDocument||document)},e.extend(e.expr[":"],{tabbable:function(t){var n=e.attr(t,"tabindex"),i=null!=n;return(!i||n>=0)&&e.ui.focusable(t,i)}}),e.fn.extend({uniqueId:function(){var e=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}}),e.widget("ui.accordion",{version:"1.12.0",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},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 t=this.options;this.prevShow=this.prevHide=e(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),t.collapsible||t.active!==!1&&null!=t.active||(t.active=0),this._processPanels(),t.active<0&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():e()}},_createIcons:function(){var t,n,i=this.options.icons;i&&(t=e("<span>"),this._addClass(t,"ui-accordion-header-icon","ui-icon "+i.header),t.prependTo(this.headers),n=this.active.children(".ui-accordion-header-icon"),this._removeClass(n,i.header)._addClass(n,null,i.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),e=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){return"active"===e?void this._activate(t):("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||this.options.active!==!1||this._activate(0),void("icons"===e&&(this._destroyIcons(),t&&this._createIcons())))},_setOptionDisabled:function(e){this._super(e),this.element.attr("aria-disabled",e),this._toggleClass(null,"ui-state-disabled",!!e),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!e)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var n=e.ui.keyCode,i=this.headers.length,r=this.headers.index(t.target),o=!1;switch(t.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(t);break;case n.HOME:o=this.headers[0];break;case n.END:o=this.headers[i-1]}o&&(e(t.target).attr("tabIndex",-1),e(o).attr("tabIndex",0),e(o).trigger("focus"),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().trigger("focus")},refresh:function(){var t=this.options;this._processPanels(),t.active===!1&&t.collapsible===!0||!this.headers.length?(t.active=!1,this.active=e()):t.active===!1?this._activate(0):this.active.length&&!e.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=e()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var e=this.headers,t=this.panels;this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),t&&(this._off(e.not(this.headers)),this._off(t.not(this.panels)))},_refresh:function(){var t,n=this.options,i=n.heightStyle,r=this.element.parent();this.active=this._findActive(n.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var t=e(this),n=t.uniqueId().attr("id"),i=t.next(),r=i.uniqueId().attr("id");t.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?(t=r.height(),this.element.siblings(":visible").each(function(){var n=e(this),i=n.css("position");"absolute"!==i&&"fixed"!==i&&(t-=n.outerHeight(!0))}),this.headers.each(function(){t-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,t-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===i&&(t=0,this.headers.next().each(function(){var n=e(this).is(":visible");n||e(this).show(),t=Math.max(t,e(this).css("height","").height()),n||e(this).hide()}).height(t))},_activate:function(t){var n=this._findActive(t)[0];n!==this.active[0]&&(n=n||this.active[0],this._eventHandler({target:n,currentTarget:n,preventDefault:e.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):e()},_setupEvents:function(t){var n={keydown:"_keydown"};t&&e.each(t.split(" "),function(e,t){n[t]="_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(t){var n,i,r=this.options,o=this.active,a=e(t.currentTarget),s=a[0]===o[0],l=s&&r.collapsible,u=l?e():a.next(),c=o.next(),f={oldHeader:o,oldPanel:c,newHeader:l?e():a,newPanel:u};t.preventDefault(),s&&!r.collapsible||this._trigger("beforeActivate",t,f)===!1||(r.active=!l&&this.headers.index(a),this.active=s?e():a,this._toggle(f),this._removeClass(o,"ui-accordion-header-active","ui-state-active"),r.icons&&(n=o.children(".ui-accordion-header-icon"),this._removeClass(n,null,r.icons.activeHeader)._addClass(n,null,r.icons.header)),s||(this._removeClass(a,"ui-accordion-header-collapsed")._addClass(a,"ui-accordion-header-active","ui-state-active"),r.icons&&(i=a.children(".ui-accordion-header-icon"),this._removeClass(i,null,r.icons.header)._addClass(i,null,r.icons.activeHeader)),this._addClass(a.next(),"ui-accordion-content-active")))},_toggle:function(t){var n=t.newPanel,i=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=n,this.prevHide=i,this.options.animate?this._animate(n,i,t):(i.hide(),n.show(),this._toggleComplete(t)),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(e(this).attr("tabIndex"),10)}).attr("tabIndex",-1),n.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(e,t,n){var i,r,o,a=this,s=0,l=e.css("box-sizing"),u=e.length&&(!t.length||e.index()<t.index()),c=this.options.animate||{},f=u&&c.down||c,h=function(){a._toggleComplete(n)};return"number"==typeof f&&(o=f),"string"==typeof f&&(r=f),r=r||f.easing||c.easing,o=o||f.duration||c.duration,t.length?e.length?(i=e.show().outerHeight(),t.animate(this.hideProps,{duration:o,easing:r,step:function(e,t){t.now=Math.round(e)}}),void e.hide().animate(this.showProps,{duration:o,easing:r,complete:h,step:function(e,n){n.now=Math.round(e),"height"!==n.prop?"content-box"===l&&(s+=n.now):"content"!==a.options.heightStyle&&(n.now=Math.round(i-t.outerHeight()-s),s=0)}})):t.animate(this.hideProps,o,r,h):e.animate(this.showProps,o,r,h)},_toggleComplete:function(e){var t=e.oldPanel,n=t.prev();this._removeClass(t,"ui-accordion-content-active"),this._removeClass(n,"ui-accordion-header-active")._addClass(n,"ui-accordion-header-collapsed"),t.length&&(t.parent()[0].className=t.parent()[0].className),this._trigger("activate",null,e)}}),e.ui.safeActiveElement=function(e){var t;try{t=e.activeElement}catch(n){t=e.body}return t||(t=e.body),t.nodeName||(t=e.body),t},e.widget("ui.menu",{version:"1.12.0",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(e){e.preventDefault()},"click .ui-menu-item":function(t){var n=e(t.target),i=e(e.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&n.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),n.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&i.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(t){if(!this.previousFilter){var n=e(t.target).closest(".ui-menu-item"),i=e(t.currentTarget);n[0]===i[0]&&(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(t,i))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var n=this.active||this.element.find(this.options.items).eq(0);t||this.focus(e,n)},blur:function(t){this._delay(function(){var n=!e.contains(this.element[0],e.ui.safeActiveElement(this.document[0]));n&&this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){this._closeOnDocumentClick(e)&&this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){var t=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),n=t.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),n.children().each(function(){var t=e(this);t.data("ui-menu-submenu-caret")&&t.remove()})},_keydown:function(t){var n,i,r,o,a=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:a=!1,i=this.previousFilter||"",r=String.fromCharCode(t.keyCode),o=!1,clearTimeout(this.filterTimer),r===i?o=!0:r=i+r,n=this._filterMenuItems(r),n=o&&n.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):n,n.length||(r=String.fromCharCode(t.keyCode),n=this._filterMenuItems(r)),n.length?(this.focus(t,n),this.previousFilter=r,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&t.preventDefault()},_activate:function(e){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(e):this.select(e))},refresh:function(){var t,n,i,r,o,a=this,s=this.options.icons.submenu,l=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),i=l.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=e(this),n=t.prev(),i=e("<span>").data("ui-menu-submenu-caret",!0);a._addClass(i,"ui-menu-icon","ui-icon "+s),n.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",n.attr("id"))}),this._addClass(i,"ui-menu","ui-widget ui-widget-content ui-front"),t=l.add(this.element),n=t.find(this.options.items),n.not(".ui-menu-item").each(function(){var t=e(this);a._isDivider(t)&&a._addClass(t,"ui-menu-divider","ui-widget-content")}),r=n.not(".ui-menu-item, .ui-menu-divider"),o=r.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(r,"ui-menu-item")._addClass(o,"ui-menu-item-wrapper"),n.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){if("icons"===e){var n=this.element.find(".ui-menu-icon");this._removeClass(n,null,this.options.icons.submenu)._addClass(n,null,t.submenu)}this._super(e,t)},_setOptionDisabled:function(e){this._super(e),this.element.attr("aria-disabled",String(e)),this._toggleClass(null,"ui-state-disabled",!!e)},focus:function(e,t){var n,i,r;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),i=this.active.children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),r=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(r,null,"ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),n=t.children(".ui-menu"),n.length&&e&&/^mouse/.test(e.type)&&this._startOpening(n),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var n,i,r,o,a,s;this._hasScroll()&&(n=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,i=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,r=t.offset().top-this.activeMenu.offset().top-n-i,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),s=t.outerHeight(),r<0?this.activeMenu.scrollTop(o+r):r+s>a&&this.activeMenu.scrollTop(o+r-a+s))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",e,{item:this.active}),this.active=null)},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(t){var n=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(n)},collapseAll:function(t,n){clearTimeout(this.timer),this.timer=this._delay(function(){var i=n?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));i.length||(i=this.element),this._close(i),this.blur(t),this._removeClass(i.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=i},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(t){return!e(t.target).closest(".ui-menu").length},_isDivider:function(e){return!/[^\-\u2014\u2013\s]/.test(e.text())},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},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(e,t,n){var i;this.active&&(i="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0)),i&&i.length&&this.active||(i=this.activeMenu.find(this.options.items)[t]()),this.focus(n,i)},nextPage:function(t){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=e(this),n.offset().top-i-r<0}),this.focus(t,n)):this.focus(t,this.activeMenu.find(this.options.items)[this.active?"last":"first"]()))):void this.next(t)},previousPage:function(t){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=e(this),n.offset().top-i+r>0}),this.focus(t,n)):this.focus(t,this.activeMenu.find(this.options.items).first()))):void this.next(t)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||e(t.target).closest(".ui-menu-item");var n={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,n)},_filterMenuItems:function(t){var n=t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),i=new RegExp("^"+n,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return i.test(e.trim(e(this).children(".ui-menu-item-wrapper").text()))})}});/*!
 * jQuery UI Autocomplete 1.12.0
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */
e.widget("ui.autocomplete",{version:"1.12.0",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 t,n,i,r=this.element[0].nodeName.toLowerCase(),o="textarea"===r,a="input"===r;this.isMultiLine=o||!a&&this._isContentEditable(this.element),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(r){if(this.element.prop("readOnly"))return t=!0,i=!0,void(n=!0);t=!1,i=!1,n=!1;var o=e.ui.keyCode;switch(r.keyCode){case o.PAGE_UP:t=!0,this._move("previousPage",r);break;case o.PAGE_DOWN:t=!0,this._move("nextPage",r);break;case o.UP:t=!0,this._keyEvent("previous",r);break;case o.DOWN:t=!0,this._keyEvent("next",r);break;case o.ENTER:this.menu.active&&(t=!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(t)return t=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||i.preventDefault());if(!n){var r=e.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(e){return i?(i=!1,void e.preventDefault()):void this._searchTimeout(e)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(e),void this._change(e))}}),this._initSource(),this.menu=e("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==e.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(t,n){var i,r;return this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type))?(this.menu.blur(),void this.document.one("mousemove",function(){e(t.target).trigger(t.originalEvent)})):(r=n.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:r})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(r.value),i=n.item.attr("aria-label")||r.value,void(i&&e.trim(i).length&&(this.liveRegion.children().hide(),e("<div>").text(i).appendTo(this.liveRegion))))},menuselect:function(t,n){var i=n.item.data("ui-autocomplete-item"),r=this.previous;this.element[0]!==e.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=r,this._delay(function(){this.previous=r,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=e("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(t){var n=this.menu.element[0];return t.target===this.element[0]||t.target===n||e.contains(n,t.target)},_closeOnClickOutside:function(e){this._isEventTargetInWidget(e)||this.close()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front, dialog")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,n,i=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(n,i){i(e.ui.autocomplete.filter(t,n.term))}):"string"==typeof this.options.source?(n=this.options.source,this.source=function(t,r){i.xhr&&i.xhr.abort(),i.xhr=e.ajax({url:n,data:t,dataType:"json",success:function(e){r(e)},error:function(){r([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),n=this.menu.element.is(":visible"),i=e.altKey||e.ctrlKey||e.metaKey||e.shiftKey;t&&(!t||n||i)||(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):this._trigger("search",t)!==!1?this._search(e):void 0},_search:function(e){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var t=++this.requestIndex;return e.proxy(function(e){t===this.requestIndex&&this.__response(e),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")},this)},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return"string"==typeof t?{label:t,value:t}:e.extend({},t,{label:t.label||t.value,value:t.value||t.label})})},_suggest:function(t){var n=this.menu.element.empty();this._renderMenu(n,t),this.isNewMenu=!0,this.menu.refresh(),n.show(),this._resizeMenu(),n.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,n){var i=this;e.each(n,function(e,n){i._renderItemData(t,n)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(t,n){return e("<li>").append(e("<div>").text(n.label)).appendTo(t)},_move:function(e,t){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[e](t):void this.search(null,t)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(e,t),t.preventDefault())},_isContentEditable:function(e){if(!e.length)return!1;var t=e.prop("contentEditable");return"inherit"===t?this._isContentEditable(e.parent()):"true"===t}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,n){var i=new RegExp(e.ui.autocomplete.escapeRegex(n),"i");return e.grep(t,function(e){return i.test(e.label||e.value||e)})}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var n;this._superApply(arguments),this.options.disabled||this.cancelSearch||(n=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.children().hide(),e("<div>").text(n).appendTo(this.liveRegion))}});var g=(e.ui.autocomplete,/ui-corner-([a-z]){2,6}/g);e.widget("ui.controlgroup",{version:"1.12.0",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var t=this,n=[];e.each(this.options.items,function(i,r){var o,a={};if(r)return"controlgroupLabel"===i?(o=t.element.find(r),o.each(function(){var t=e(this);t.children(".ui-controlgroup-label-contents").length||t.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),t._addClass(o,null,"ui-widget ui-widget-content ui-state-default"),void(n=n.concat(o.get()))):void(e.fn[i]&&(t["_"+i+"Options"]&&(a=t["_"+i+"Options"]("middle")),t.element.find(r).each(function(){var r=e(this),o=r[i]("instance"),s=e.widget.extend({},a);if("button"!==i||!r.parent(".ui-spinner").length){o||(o=r[i]()[i]("instance")),o&&(s.classes=t._resolveClassesValues(s.classes,o)),r[i](s);var l=r[i]("widget");e.data(l[0],"ui-controlgroup-data",o?o:r[i]("instance")),n.push(l[0])}})))}),this.childWidgets=e(e.unique(n)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(t){this.childWidgets.each(function(){var n=e(this),i=n.data("ui-controlgroup-data");i&&i[t]&&i[t]()})},_updateCornerClass:function(e,t){var n="ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all",i=this._buildSimpleOptions(t,"label").classes.label;this._removeClass(e,null,n),this._addClass(e,null,i)},_buildSimpleOptions:function(e,t){var n="vertical"===this.options.direction,i={classes:{}};return i.classes[t]={middle:"",first:"ui-corner-"+(n?"top":"left"),last:"ui-corner-"+(n?"bottom":"right"),only:"ui-corner-all"}[e],i},_spinnerOptions:function(e){var t=this._buildSimpleOptions(e,"ui-spinner");return t.classes["ui-spinner-up"]="",t.classes["ui-spinner-down"]="",t},_buttonOptions:function(e){return this._buildSimpleOptions(e,"ui-button")},_checkboxradioOptions:function(e){return this._buildSimpleOptions(e,"ui-checkboxradio-label")},_selectmenuOptions:function(e){var t="vertical"===this.options.direction;return{width:!!t&&"auto",classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(t?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(t?"top":"left")},last:{"ui-selectmenu-button-open":t?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(t?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[e]}},_resolveClassesValues:function(t,n){var i={};return e.each(t,function(e){var r=n.options.classes[e]||"";r=r.replace(g,"").trim(),i[e]=(r+" "+t[e]).replace(/\s+/g," ")}),i},_setOption:function(e,t){return"direction"===e&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(e,t),"disabled"===e?void this._callChildMethod(t?"disable":"enable"):void this.refresh()},refresh:function(){var t,n=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),t=this.childWidgets,this.options.onlyVisible&&(t=t.filter(":visible")),t.length&&(e.each(["first","last"],function(e,i){var r=t[i]().data("ui-controlgroup-data");if(r&&n["_"+r.widgetName+"Options"]){var o=n["_"+r.widgetName+"Options"](1===t.length?"only":i);o.classes=n._resolveClassesValues(o.classes,r),r.element[r.widgetName](o)}else n._updateCornerClass(t[i](),i)}),this._callChildMethod("refresh"))}});/*!
 * jQuery UI Checkboxradio 1.12.0
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */
e.widget("ui.checkboxradio",[e.ui.formResetMixin,{version:"1.12.0",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var t,n,i=this,r=this._super()||{};return this._readType(),n=this.element.labels(),this.label=e(n[n.length-1]),this.label.length||e.error("No label found for checkboxradio widget"),this.originalLabel="",this.label.contents().not(this.element).each(function(){i.originalLabel+=3===this.nodeType?e(this).text():this.outerHTML}),this.originalLabel&&(r.label=this.originalLabel),t=this.element[0].disabled,null!=t&&(r.disabled=t),r},_create:function(){var e=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),e&&(this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this.icon&&this._addClass(this.icon,null,"ui-state-hover")),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var t=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===t&&/radio|checkbox/.test(this.type)||e.error("Can't create checkboxradio on element.nodeName="+t+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var t,n=this.element[0].name,i="input[name='"+e.ui.escapeSelector(n)+"']";return n?(t=this.form.length?e(this.form[0].elements).filter(i):e(i).filter(function(){return 0===e(this).form().length}),t.not(this.element)):e([])},_toggleClasses:function(){var t=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",t)._toggleClass(this.icon,null,"ui-icon-blank",!t),"radio"===this.type&&this._getRadioGroup().each(function(){var t=e(this).checkboxradio("instance");t&&t._removeClass(t.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(e,t){if("label"!==e||t)return this._super(e,t),"disabled"===e?(this._toggleClass(this.label,null,"ui-state-disabled",t),void(this.element[0].disabled=t)):void this.refresh()},_updateIcon:function(t){var n="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=e("<span>"),this.iconSpace=e("<span> </span>"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(n+=t?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,t?"ui-icon-blank":"ui-icon-check")):n+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",n),t||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){this.label.contents().not(this.element.add(this.icon).add(this.iconSpace)).remove(),this.label.append(this.options.label)},refresh:function(){var e=this.element[0].checked,t=this.element[0].disabled;this._updateIcon(e),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),null!==this.options.label&&this._updateLabel(),t!==this.options.disabled&&this._setOptions({disabled:t})}}]);e.ui.checkboxradio;/*!
 * jQuery UI Button 1.12.0
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */
e.widget("ui.button",{version:"1.12.0",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var e,t=this._super()||{};return this.isInput=this.element.is("input"),e=this.element[0].disabled,null!=e&&(t.disabled=e),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(t.label=this.originalLabel),t},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(t){t.keyCode===e.ui.keyCode.SPACE&&(t.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(t,n){var i="iconPosition"!==t,r=i?this.options.iconPosition:n,o="top"===r||"bottom"===r;this.icon?i&&this._removeClass(this.icon,null,this.options.icon):(this.icon=e("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),i&&this._addClass(this.icon,null,n),this._attachIcon(r),o?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=e("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(r))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(e){this.icon[/^(?:end|bottom)/.test(e)?"before":"after"](this.iconSpace)},_attachIcon:function(e){this.element[/^(?:end|bottom)/.test(e)?"append":"prepend"](this.icon)},_setOptions:function(e){var t=void 0===e.showLabel?this.options.showLabel:e.showLabel,n=void 0===e.icon?this.options.icon:e.icon;t||n||(e.showLabel=!0),this._super(e)},_setOption:function(e,t){"icon"===e&&(t?this._updateIcon(e,t):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===e&&this._updateIcon(e,t),"showLabel"===e&&(this._toggleClass("ui-button-icon-only",null,!t),this._updateTooltip()),"label"===e&&(this.isInput?this.element.val(t):(this.element.html(t),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(e,t),"disabled"===e&&(this._toggleClass(null,"ui-state-disabled",t),this.element[0].disabled=t,t&&this.element.blur())},refresh:function(){var e=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");e!==this.options.disabled&&this._setOptions({disabled:e}),this._updateTooltip()}}),e.uiBackCompat!==!1&&(e.widget("ui.button",e.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(e,t){return"text"===e?void this._super("showLabel",t):("showLabel"===e&&(this.options.text=t),"icon"===e&&(this.options.icons.primary=t),"icons"===e&&(t.primary?(this._super("icon",t.primary),this._super("iconPosition","beginning")):t.secondary&&(this._super("icon",t.secondary),this._super("iconPosition","end"))),void this._superApply(arguments))}}),e.fn.button=function(t){return function(){return!this.length||this.length&&"INPUT"!==this[0].tagName||this.length&&"INPUT"===this[0].tagName&&"checkbox"!==this.attr("type")&&"radio"!==this.attr("type")?t.apply(this,arguments):(e.ui.checkboxradio||e.error("Checkboxradio widget missing"),0===arguments.length?this.checkboxradio({icon:!1}):this.checkboxradio.apply(this,arguments))}}(e.fn.button),e.fn.buttonset=function(){return e.ui.controlgroup||e.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))});e.ui.button;/*!
 * jQuery UI Datepicker 1.12.0
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */
e.extend(e.ui,{datepicker:{version:"1.12.0"}});var m;e.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return a(this._defaults,e||{}),this},_attachDatepicker:function(t,n){var i,r,o;i=t.nodeName.toLowerCase(),r="div"===i||"span"===i,t.id||(this.uuid+=1,t.id="dp"+this.uuid),o=this._newInst(e(t),r),o.settings=e.extend({},n||{}),"input"===i?this._connectDatepicker(t,o):r&&this._inlineDatepicker(t,o)},_newInst:function(t,n){var i=t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:i,input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:n,dpDiv:n?r(e("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,n){var i=e(t);n.append=e([]),n.trigger=e([]),i.hasClass(this.markerClassName)||(this._attachments(i,n),i.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(n),e.data(t,"datepicker",n),n.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,n){var i,r,o,a=this._get(n,"appendText"),s=this._get(n,"isRTL");n.append&&n.append.remove(),a&&(n.append=e("<span class='"+this._appendClass+"'>"+a+"</span>"),t[s?"before":"after"](n.append)),t.off("focus",this._showDatepicker),n.trigger&&n.trigger.remove(),i=this._get(n,"showOn"),"focus"!==i&&"both"!==i||t.on("focus",this._showDatepicker),"button"!==i&&"both"!==i||(r=this._get(n,"buttonText"),o=this._get(n,"buttonImage"),n.trigger=e(this._get(n,"buttonImageOnly")?e("<img/>").addClass(this._triggerClass).attr({src:o,alt:r,title:r}):e("<button type='button'></button>").addClass(this._triggerClass).html(o?e("<img/>").attr({src:o,alt:r,title:r}):r)),t[s?"before":"after"](n.trigger),n.trigger.on("click",function(){return e.datepicker._datepickerShowing&&e.datepicker._lastInput===t[0]?e.datepicker._hideDatepicker():e.datepicker._datepickerShowing&&e.datepicker._lastInput!==t[0]?(e.datepicker._hideDatepicker(),e.datepicker._showDatepicker(t[0])):e.datepicker._showDatepicker(t[0]),!1}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,n,i,r,o=new Date(2009,11,20),a=this._get(e,"dateFormat");a.match(/[DM]/)&&(t=function(e){for(n=0,i=0,r=0;r<e.length;r++)e[r].length>n&&(n=e[r].length,i=r);return i},o.setMonth(t(this._get(e,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(t(this._get(e,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),e.input.attr("size",this._formatDate(e,o).length)}},_inlineDatepicker:function(t,n){var i=e(t);i.hasClass(this.markerClassName)||(i.addClass(this.markerClassName).append(n.dpDiv),e.data(t,"datepicker",n),this._setDate(n,this._getDefaultDate(n),!0),this._updateDatepicker(n),this._updateAlternate(n),n.settings.disabled&&this._disableDatepicker(t),n.dpDiv.css("display","block"))},_dialogDatepicker:function(t,n,i,r,o){var s,l,u,c,f,h=this._dialogInst;return h||(this.uuid+=1,s="dp"+this.uuid,this._dialogInput=e("<input type='text' id='"+s+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),e("body").append(this._dialogInput),h=this._dialogInst=this._newInst(this._dialogInput,!1),h.settings={},e.data(this._dialogInput[0],"datepicker",h)),a(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,f=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+c,u/2-150+f]),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]),e.blockUI&&e.blockUI(this.dpDiv),e.data(this._dialogInput[0],"datepicker",h),this},_destroyDatepicker:function(t){var n,i=e(t),r=e.data(t,"datepicker");i.hasClass(this.markerClassName)&&(n=t.nodeName.toLowerCase(),e.removeData(t,"datepicker"),"input"===n?(r.append.remove(),r.trigger.remove(),i.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):"div"!==n&&"span"!==n||i.removeClass(this.markerClassName).empty(),m===r&&(m=null))},_enableDatepicker:function(t){var n,i,r=e(t),o=e.data(t,"datepicker");r.hasClass(this.markerClassName)&&(n=t.nodeName.toLowerCase(),"input"===n?(t.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=e.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var n,i,r=e(t),o=e.data(t,"datepicker");r.hasClass(this.markerClassName)&&(n=t.nodeName.toLowerCase(),"input"===n?(t.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=e.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;t<this._disabledInputs.length;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(t){try{return e.data(t,"datepicker")}catch(n){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(t,n,i){var r,o,s,l,u=this._getInst(t);return 2===arguments.length&&"string"==typeof n?"defaults"===n?e.extend({},e.datepicker._defaults):u?"all"===n?e.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(t,!0),s=this._getMinMaxDate(u,"min"),l=this._getMinMaxDate(u,"max"),a(u.settings,r),null!==s&&void 0!==r.dateFormat&&void 0===r.minDate&&(u.settings.minDate=this._formatDate(u,s)),null!==l&&void 0!==r.dateFormat&&void 0===r.maxDate&&(u.settings.maxDate=this._formatDate(u,l)),"disabled"in r&&(r.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(e(t),u),this._autoSize(u),this._setDate(u,o),this._updateAlternate(u),this._updateDatepicker(u))))},_changeDatepicker:function(e,t,n){this._optionDatepicker(e,t,n)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var n=this._getInst(e);n&&(this._setDate(n,t),this._updateDatepicker(n),this._updateAlternate(n))},_getDateDatepicker:function(e,t){var n=this._getInst(e);return n&&!n.inline&&this._setDateFromField(n,t),n?this._getDate(n):null},_doKeyDown:function(t){var n,i,r,o=e.datepicker._getInst(t.target),a=!0,s=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,e.datepicker._datepickerShowing)switch(t.keyCode){case 9:e.datepicker._hideDatepicker(),a=!1;break;case 13:return r=e("td."+e.datepicker._dayOverClass+":not(."+e.datepicker._currentClass+")",o.dpDiv),r[0]&&e.datepicker._selectDay(t.target,o.selectedMonth,o.selectedYear,r[0]),n=e.datepicker._get(o,"onSelect"),n?(i=e.datepicker._formatDate(o),n.apply(o.input?o.input[0]:null,[i,o])):e.datepicker._hideDatepicker(),!1;case 27:e.datepicker._hideDatepicker();break;case 33:e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(o,"stepBigMonths"):-e.datepicker._get(o,"stepMonths"),"M");break;case 34:e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(o,"stepBigMonths"):+e.datepicker._get(o,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&e.datepicker._clearDate(t.target),a=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&e.datepicker._gotoToday(t.target),a=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,s?1:-1,"D"),a=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(o,"stepBigMonths"):-e.datepicker._get(o,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,-7,"D"),a=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,s?-1:1,"D"),a=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(o,"stepBigMonths"):+e.datepicker._get(o,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,7,"D"),a=t.ctrlKey||t.metaKey;break;default:a=!1}else 36===t.keyCode&&t.ctrlKey?e.datepicker._showDatepicker(this):a=!1;a&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var n,i,r=e.datepicker._getInst(t.target);if(e.datepicker._get(r,"constrainInput"))return n=e.datepicker._possibleChars(e.datepicker._get(r,"dateFormat")),i=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||i<" "||!n||n.indexOf(i)>-1},_doKeyUp:function(t){var n,i=e.datepicker._getInst(t.target);if(i.input.val()!==i.lastVal)try{n=e.datepicker.parseDate(e.datepicker._get(i,"dateFormat"),i.input?i.input.val():null,e.datepicker._getFormatConfig(i)),n&&(e.datepicker._setDateFromField(i),e.datepicker._updateAlternate(i),e.datepicker._updateDatepicker(i))}catch(r){}return!0},_showDatepicker:function(t){if(t=t.target||t,"input"!==t.nodeName.toLowerCase()&&(t=e("input",t.parentNode)[0]),!e.datepicker._isDisabledDatepicker(t)&&e.datepicker._lastInput!==t){var i,r,o,s,l,u,c;i=e.datepicker._getInst(t),e.datepicker._curInst&&e.datepicker._curInst!==i&&(e.datepicker._curInst.dpDiv.stop(!0,!0),i&&e.datepicker._datepickerShowing&&e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])),r=e.datepicker._get(i,"beforeShow"),o=r?r.apply(t,[t,i]):{},o!==!1&&(a(i.settings,o),i.lastVal=null,e.datepicker._lastInput=t,e.datepicker._setDateFromField(i),e.datepicker._inDialog&&(t.value=""),e.datepicker._pos||(e.datepicker._pos=e.datepicker._findPos(t),e.datepicker._pos[1]+=t.offsetHeight),s=!1,e(t).parents().each(function(){return s|="fixed"===e(this).css("position"),!s}),l={left:e.datepicker._pos[0],top:e.datepicker._pos[1]},e.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),e.datepicker._updateDatepicker(i),l=e.datepicker._checkOffset(i,l,s),i.dpDiv.css({position:e.datepicker._inDialog&&e.blockUI?"static":s?"fixed":"absolute",display:"none",left:l.left+"px",top:l.top+"px"}),i.inline||(u=e.datepicker._get(i,"showAnim"),c=e.datepicker._get(i,"duration"),i.dpDiv.css("z-index",n(e(t))+1),e.datepicker._datepickerShowing=!0,e.effects&&e.effects.effect[u]?i.dpDiv.show(u,e.datepicker._get(i,"showOptions"),c):i.dpDiv[u||"show"](u?c:null),e.datepicker._shouldFocusInput(i)&&i.input.trigger("focus"),e.datepicker._curInst=i))}},_updateDatepicker:function(t){this.maxRows=4,m=t,t.dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t);var n,i=this._getNumberOfMonths(t),r=i[1],a=17,s=t.dpDiv.find("."+this._dayOverClass+" a");s.length>0&&o.apply(s.get(0)),t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),r>1&&t.dpDiv.addClass("ui-datepicker-multi-"+r).css("width",a*r+"em"),t.dpDiv[(1!==i[0]||1!==i[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===e.datepicker._curInst&&e.datepicker._datepickerShowing&&e.datepicker._shouldFocusInput(t)&&t.input.trigger("focus"),t.yearshtml&&(n=t.yearshtml,setTimeout(function(){n===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml),n=t.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(t,n,i){var r=t.dpDiv.outerWidth(),o=t.dpDiv.outerHeight(),a=t.input?t.input.outerWidth():0,s=t.input?t.input.outerHeight():0,l=document.documentElement.clientWidth+(i?0:e(document).scrollLeft()),u=document.documentElement.clientHeight+(i?0:e(document).scrollTop());return n.left-=this._get(t,"isRTL")?r-a:0,n.left-=i&&n.left===t.input.offset().left?e(document).scrollLeft():0,n.top-=i&&n.top===t.input.offset().top+s?e(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(t){for(var n,i=this._getInst(t),r=this._get(i,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||e.expr.filters.hidden(t));)t=t[r?"previousSibling":"nextSibling"];return n=e(t).offset(),[n.left,n.top]},_hideDatepicker:function(t){var n,i,r,o,a=this._curInst;!a||t&&a!==e.data(t,"datepicker")||this._datepickerShowing&&(n=this._get(a,"showAnim"),i=this._get(a,"duration"),r=function(){e.datepicker._tidyDialog(a)},e.effects&&(e.effects.effect[n]||e.effects[n])?a.dpDiv.hide(n,e.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"}),e.blockUI&&(e.unblockUI(),e("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(e.datepicker._curInst){var n=e(t.target),i=e.datepicker._getInst(n[0]);(n[0].id===e.datepicker._mainDivId||0!==n.parents("#"+e.datepicker._mainDivId).length||n.hasClass(e.datepicker.markerClassName)||n.closest("."+e.datepicker._triggerClass).length||!e.datepicker._datepickerShowing||e.datepicker._inDialog&&e.blockUI)&&(!n.hasClass(e.datepicker.markerClassName)||e.datepicker._curInst===i)||e.datepicker._hideDatepicker()}},_adjustDate:function(t,n,i){var r=e(t),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(t){var n,i=e(t),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(t,n,i){var r=e(t),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(t,n,i,r){var o,a=e(t);e(r).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||(o=this._getInst(a[0]),o.selectedDay=o.currentDay=e("a",r).html(),o.selectedMonth=o.currentMonth=n,o.selectedYear=o.currentYear=i,this._selectDate(t,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(t){var n=e(t);this._selectDate(n,"")},_selectDate:function(t,n){var i,r=e(t),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.trigger("focus"),this._lastInput=null)},_updateAlternate:function(t){var n,i,r,o=this._get(t,"altField");o&&(n=this._get(t,"altFormat")||this._get(t,"dateFormat"),i=this._getDate(t),r=this.formatDate(n,i,this._getFormatConfig(t)),e(o).val(r))},noWeekends:function(e){var t=e.getDay();return[t>0&&t<6,""]},iso8601Week:function(e){var t,n=new Date(e.getTime());return n.setDate(n.getDate()+4-(n.getDay()||7)),t=n.getTime(),n.setMonth(0),n.setDate(1),Math.floor(Math.round((t-n)/864e5)/7)+1},parseDate:function(t,n,i){if(null==t||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),f=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,h=(i?i.dayNames:null)||this._defaults.dayNames,d=(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,_=function(e){var n=r+1<t.length&&t.charAt(r+1)===e;return n&&r++,n},E=function(e){var t=_(e),i="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,r="y"===e?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)},x=function(t,i,r){var o=-1,a=e.map(_(t)?r:i,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(e.each(a,function(e,t){var i=t[1];if(n.substr(l,i.length).toLowerCase()===i.toLowerCase())return o=t[0],l+=i.length,!1}),o!==-1)return o+1;throw"Unknown name at position "+l},w=function(){if(n.charAt(l)!==t.charAt(r))throw"Unexpected literal at position "+l;l++};for(r=0;r<t.length;r++)if(b)"'"!==t.charAt(r)||_("'")?w():b=!1;else switch(t.charAt(r)){case"d":v=E("d");break;case"D":x("D",f,h);break;case"o":y=E("o");break;case"m":m=E("m");break;case"M":m=x("M",d,p);break;case"y":g=E("y");break;case"@":s=new Date(E("@")),g=s.getFullYear(),m=s.getMonth()+1,v=s.getDate();break;case"!":s=new Date((E("!")-this._ticksTo1970)/1e4),g=s.getFullYear(),m=s.getMonth()+1,v=s.getDate();break;case"'":_("'")?w():b=!0;break;default:w()}if(l<n.length&&(a=n.substr(l),!/^\s+/.test(a)))throw"Extra/unparsed characters found in date: "+a;if(g===-1?g=(new Date).getFullYear():g<100&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(g<=c?0:-100)),y>-1)for(m=1,v=y;;){if(o=this._getDaysInMonth(g,m-1),v<=o)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(e,t,n){if(!t)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(t){var n=i+1<e.length&&e.charAt(i+1)===t;return n&&i++,n},u=function(e,t,n){var i=""+t;if(l(e))for(;i.length<n;)i="0"+i;return i},c=function(e,t,n,i){return l(e)?i[t]:n[t]},f="",h=!1;if(t)for(i=0;i<e.length;i++)if(h)"'"!==e.charAt(i)||l("'")?f+=e.charAt(i):h=!1;else switch(e.charAt(i)){case"d":f+=u("d",t.getDate(),2);break;case"D":f+=c("D",t.getDay(),r,o);break;case"o":f+=u("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":f+=u("m",t.getMonth()+1,2);break;case"M":f+=c("M",t.getMonth(),a,s);break;case"y":f+=l("y")?t.getFullYear():(t.getFullYear()%100<10?"0":"")+t.getFullYear()%100;break;case"@":f+=t.getTime();break;case"!":f+=1e4*t.getTime()+this._ticksTo1970;break;case"'":l("'")?f+="'":h=!0;break;default:f+=e.charAt(i)}return f},_possibleChars:function(e){var t,n="",i=!1,r=function(n){var i=t+1<e.length&&e.charAt(t+1)===n;return i&&t++,i};for(t=0;t<e.length;t++)if(i)"'"!==e.charAt(t)||r("'")?n+=e.charAt(t):i=!1;else switch(e.charAt(t)){case"d":case"m":case"y":case"@":n+="0123456789";break;case"D":case"M":return null;case"'":r("'")?n+="'":i=!0;break;default:n+=e.charAt(t)}return n},_get:function(e,t){return void 0!==e.settings[t]?e.settings[t]:this._defaults[t]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var n=this._get(e,"dateFormat"),i=e.lastVal=e.input?e.input.val():null,r=this._getDefaultDate(e),o=r,a=this._getFormatConfig(e);try{o=this.parseDate(n,i,a)||r}catch(s){i=t?"":i}e.selectedDay=o.getDate(),e.drawMonth=e.selectedMonth=o.getMonth(),e.drawYear=e.selectedYear=o.getFullYear(),e.currentDay=i?o.getDate():0,e.currentMonth=i?o.getMonth():0,e.currentYear=i?o.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(t,n,i){var r=function(e){var t=new Date;return t.setDate(t.getDate()+e),t},o=function(n){try{return e.datepicker.parseDate(e.datepicker._get(t,"dateFormat"),n,e.datepicker._getFormatConfig(t))}catch(i){}for(var r=(n.toLowerCase().match(/^c/)?e.datepicker._getDate(t):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,e.datepicker._getDaysInMonth(o,a));break;case"y":case"Y":o+=parseInt(u[1],10),s=Math.min(s,e.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(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,n){var i=!t,r=e.selectedMonth,o=e.selectedYear,a=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=a.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=a.getMonth(),e.drawYear=e.selectedYear=e.currentYear=a.getFullYear(),r===e.selectedMonth&&o===e.selectedYear||n||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(i?"":this._formatDate(e))},_getDate:function(e){var t=!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return t},_attachHandlers:function(t){var n=this._get(t,"stepMonths"),i="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){e.datepicker._adjustDate(i,-n,"M")},next:function(){e.datepicker._adjustDate(i,+n,"M")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(i)},selectDay:function(){return e.datepicker._selectDay(i,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return e.datepicker._selectMonthYear(i,this,"M"),!1},selectYear:function(){return e.datepicker._selectMonthYear(i,this,"Y"),!1}};e(this).on(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,n,i,r,o,a,s,l,u,c,f,h,d,p,g,m,v,y,b,_,E,x,w,T,S,A,C,k,O,I,N,M,D,L,$,R,P,F,U,j=new Date,H=this._daylightSavingAdjust(new Date(j.getFullYear(),j.getMonth(),j.getDate())),z=this._get(e,"isRTL"),B=this._get(e,"showButtonPanel"),q=this._get(e,"hideIfNoPrevNext"),W=this._get(e,"navigationAsDateFormat"),Y=this._getNumberOfMonths(e),G=this._get(e,"showCurrentAtPos"),X=this._get(e,"stepMonths"),V=1!==Y[0]||1!==Y[1],K=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),Z=this._getMinMaxDate(e,"min"),Q=this._getMinMaxDate(e,"max"),J=e.drawMonth-G,ee=e.drawYear;if(J<0&&(J+=12,ee--),Q)for(t=this._daylightSavingAdjust(new Date(Q.getFullYear(),Q.getMonth()-Y[0]*Y[1]+1,Q.getDate())),t=Z&&t<Z?Z:t;this._daylightSavingAdjust(new Date(ee,J,1))>t;)J--,J<0&&(J=11,ee--);for(e.drawMonth=J,e.drawYear=ee,n=this._get(e,"prevText"),n=W?this.formatDate(n,this._daylightSavingAdjust(new Date(ee,J-X,1)),this._getFormatConfig(e)):n,i=this._canAdjustMonth(e,-1,ee,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-"+(z?"e":"w")+"'>"+n+"</span></a>":q?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(z?"e":"w")+"'>"+n+"</span></a>",r=this._get(e,"nextText"),r=W?this.formatDate(r,this._daylightSavingAdjust(new Date(ee,J+X,1)),this._getFormatConfig(e)):r,o=this._canAdjustMonth(e,1,ee,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-"+(z?"w":"e")+"'>"+r+"</span></a>":q?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+r+"'><span class='ui-icon ui-icon-circle-triangle-"+(z?"w":"e")+"'>"+r+"</span></a>",a=this._get(e,"currentText"),s=this._get(e,"gotoCurrent")&&e.currentDay?K:H,a=W?this.formatDate(a,s,this._getFormatConfig(e)):a,l=e.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(e,"closeText")+"</button>",u=B?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(z?l:"")+(this._isInRange(e,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>":"")+(z?"":l)+"</div>":"",c=parseInt(this._get(e,"firstDay"),10),c=isNaN(c)?0:c,f=this._get(e,"showWeek"),h=this._get(e,"dayNames"),d=this._get(e,"dayNamesMin"),p=this._get(e,"monthNames"),g=this._get(e,"monthNamesShort"),m=this._get(e,"beforeShowDay"),v=this._get(e,"showOtherMonths"),y=this._get(e,"selectOtherMonths"),b=this._getDefaultDate(e),_="",x=0;x<Y[0];x++){for(w="",this.maxRows=4,T=0;T<Y[1];T++){if(S=this._daylightSavingAdjust(new Date(ee,J,e.selectedDay)),A=" ui-corner-all",C="",V){if(C+="<div class='ui-datepicker-group",Y[1]>1)switch(T){case 0:C+=" ui-datepicker-group-first",A=" ui-corner-"+(z?"right":"left");break;case Y[1]-1:C+=" ui-datepicker-group-last",A=" ui-corner-"+(z?"left":"right");break;default:C+=" ui-datepicker-group-middle",A=""}C+="'>"}for(C+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+A+"'>"+(/all|left/.test(A)&&0===x?z?o:i:"")+(/all|right/.test(A)&&0===x?z?i:o:"")+this._generateMonthYearHeader(e,J,ee,Z,Q,x>0||T>0,p,g)+"</div><table class='ui-datepicker-calendar'><thead><tr>",k=f?"<th class='ui-datepicker-week-col'>"+this._get(e,"weekHeader")+"</th>":"",E=0;E<7;E++)O=(E+c)%7,k+="<th scope='col'"+((E+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+h[O]+"'>"+d[O]+"</span></th>";for(C+=k+"</tr></thead><tbody>",I=this._getDaysInMonth(ee,J),ee===e.selectedYear&&J===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,I)),N=(this._getFirstDayOfMonth(ee,J)-c+7)%7,M=Math.ceil((N+I)/7),D=V&&this.maxRows>M?this.maxRows:M,this.maxRows=D,L=this._daylightSavingAdjust(new Date(ee,J,1-N)),$=0;$<D;$++){for(C+="<tr>",R=f?"<td class='ui-datepicker-week-col'>"+this._get(e,"calculateWeek")(L)+"</td>":"",E=0;E<7;E++)P=m?m.apply(e.input?e.input[0]:null,[L]):[!0,""],F=L.getMonth()!==J,U=F&&!y||!P[0]||Z&&L<Z||Q&&L>Q,R+="<td class='"+((E+c+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(L.getTime()===S.getTime()&&J===e.selectedMonth&&e._keyEvent||b.getTime()===L.getTime()&&b.getTime()===S.getTime()?" "+this._dayOverClass:"")+(U?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!v?"":" "+P[1]+(L.getTime()===K.getTime()?" "+this._currentClass:"")+(L.getTime()===H.getTime()?" ui-datepicker-today":""))+"'"+(F&&!v||!P[2]?"":" title='"+P[2].replace(/'/g,"&#39;")+"'")+(U?"":" data-handler='selectDay' data-event='click' data-month='"+L.getMonth()+"' data-year='"+L.getFullYear()+"'")+">"+(F&&!v?"&#xa0;":U?"<span class='ui-state-default'>"+L.getDate()+"</span>":"<a class='ui-state-default"+(L.getTime()===H.getTime()?" ui-state-highlight":"")+(L.getTime()===K.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#'>"+L.getDate()+"</a>")+"</td>",L.setDate(L.getDate()+1),L=this._daylightSavingAdjust(L);C+=R+"</tr>"}J++,J>11&&(J=0,ee++),C+="</tbody></table>"+(V?"</div>"+(Y[0]>0&&T===Y[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),w+=C}_+=w}return _+=u,e._keyEvent=!1,_},_generateMonthYearHeader:function(e,t,n,i,r,o,a,s){var l,u,c,f,h,d,p,g,m=this._get(e,"changeMonth"),v=this._get(e,"changeYear"),y=this._get(e,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",_="";if(o||!m)_+="<span class='ui-datepicker-month'>"+a[t]+"</span>";else{for(l=i&&i.getFullYear()===n,u=r&&r.getFullYear()===n,_+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;c<12;c++)(!l||c>=i.getMonth())&&(!u||c<=r.getMonth())&&(_+="<option value='"+c+"'"+(c===t?" selected='selected'":"")+">"+s[c]+"</option>");_+="</select>"}if(y||(b+=_+(!o&&m&&v?"":"&#xa0;")),!e.yearshtml)if(e.yearshtml="",o||!v)b+="<span class='ui-datepicker-year'>"+n+"</span>";else{for(f=this._get(e,"yearRange").split(":"),h=(new Date).getFullYear(),d=function(e){var t=e.match(/c[+\-].*/)?n+parseInt(e.substring(1),10):e.match(/[+\-].*/)?h+parseInt(e,10):parseInt(e,10);return isNaN(t)?h:t},p=d(f[0]),g=Math.max(p,d(f[1]||"")),p=i?Math.max(p,i.getFullYear()):p,g=r?Math.min(g,r.getFullYear()):g,e.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";p<=g;p++)e.yearshtml+="<option value='"+p+"'"+(p===n?" selected='selected'":"")+">"+p+"</option>";e.yearshtml+="</select>",b+=e.yearshtml,e.yearshtml=null}return b+=this._get(e,"yearSuffix"),y&&(b+=(!o&&m&&v?"":"&#xa0;")+_),b+="</div>"},_adjustInstDate:function(e,t,n){var i=e.selectedYear+("Y"===n?t:0),r=e.selectedMonth+("M"===n?t:0),o=Math.min(e.selectedDay,this._getDaysInMonth(i,r))+("D"===n?t:0),a=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(i,r,o)));e.selectedDay=a.getDate(),e.drawMonth=e.selectedMonth=a.getMonth(),e.drawYear=e.selectedYear=a.getFullYear(),"M"!==n&&"Y"!==n||this._notifyChange(e)},_restrictMinMax:function(e,t){var n=this._getMinMaxDate(e,"min"),i=this._getMinMaxDate(e,"max"),r=n&&t<n?n:t;return i&&r>i?i:r},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,n,i){var r=this._getNumberOfMonths(e),o=this._daylightSavingAdjust(new Date(n,i+(t<0?t:r[0]*r[1]),1));return t<0&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(e,o)},_isInRange:function(e,t){var n,i,r=this._getMinMaxDate(e,"min"),o=this._getMinMaxDate(e,"max"),a=null,s=null,l=this._get(e,"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||t.getTime()>=r.getTime())&&(!o||t.getTime()<=o.getTime())&&(!a||t.getFullYear()>=a)&&(!s||t.getFullYear()<=s)},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,n,i){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var r=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(i,n,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));
return this.formatDate(this._get(e,"dateFormat"),r,this._getFormatConfig(e))}}),e.fn.datepicker=function(t){if(!this.length)return this;e.datepicker.initialized||(e(document).on("mousedown",e.datepicker._checkExternalClick),e.datepicker.initialized=!0),0===e("#"+e.datepicker._mainDivId).length&&e("body").append(e.datepicker.dpDiv);var n=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(n)):this.each(function(){"string"==typeof t?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this].concat(n)):e.datepicker._attachDatepicker(this,t)}):e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(n))},e.datepicker=new i,e.datepicker.initialized=!1,e.datepicker.uuid=(new Date).getTime(),e.datepicker.version="1.12.0";var v=(e.datepicker,e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),!1);e(document).on("mouseup",function(){v=!1});e.widget("ui.mouse",{version:"1.12.0",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.on("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).on("click."+this.widgetName,function(n){if(!0===e.data(n.target,t.widgetName+".preventClickEvent"))return e.removeData(n.target,t.widgetName+".preventClickEvent"),n.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!v){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var n=this,i=1===t.which,r=!("string"!=typeof this.options.cancel||!t.target.nodeName)&&e(t.target).closest(this.options.cancel).length;return!(i&&!r&&this._mouseCapture(t))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){n.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(t)!==!1,!this._mouseStarted)?(t.preventDefault(),!0):(!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return n._mouseMove(e)},this._mouseUpDelegate=function(e){return n._mouseUp(e)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),v=!0,!0))}},_mouseMove:function(t){if(this._mouseMoved){if(e.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button)return this._mouseUp(t);if(!t.which)if(t.originalEvent.altKey||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,v=!1,t.preventDefault()},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),e.ui.plugin={add:function(t,n,i){var r,o=e.ui[t].prototype;for(r in i)o.plugins[r]=o.plugins[r]||[],o.plugins[r].push([n,i[r]])},call:function(e,t,n,i){var r,o=e.plugins[t];if(o&&(i||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(r=0;r<o.length;r++)e.options[o[r][0]]&&o[r][1].apply(e.element,n)}},e.ui.safeBlur=function(t){t&&"body"!==t.nodeName.toLowerCase()&&e(t).trigger("blur")};/*!
 * jQuery UI Draggable 1.12.0
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */
e.widget("ui.draggable",e.ui.mouse,{version:"1.12.0",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._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(e,t){this._super(e,t),"handle"===e&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?void(this.destroyOnClear=!0):(this._removeHandleClassName(),void this._mouseDestroy())},_mouseCapture:function(t){var n=this.options;return this._blurActiveElement(t),!(this.helper||n.disabled||e(t.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(t),!!this.handle&&(this._blockFrames(n.iframeFix===!0?"iframe":n.iframeFix),!0))},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=e(this);return e("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var n=e.ui.safeActiveElement(this.document[0]),i=e(t.target);this._getHandle(t)&&i.closest(n).length||e.ui.safeBlur(n)},_mouseStart:function(t){var n=this.options;return this.helper=this._createHelper(t),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.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"===e(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,n.cursorAt&&this._adjustOffsetFromHelper(n.cursorAt),this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(e){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:e.pageX-this.offset.left,top:e.pageY-this.offset.top}},_mouseDrag:function(t,n){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!n){var i=this._uiHash();if(this._trigger("drag",t,i)===!1)return this._mouseUp(new e.Event("mouseup",t)),!1;this.position=i.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var n=this,i=!1;return e.ui.ddmanager&&!this.options.dropBehaviour&&(i=e.ui.ddmanager.drop(this,t)),this.dropped&&(i=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!i||"valid"===this.options.revert&&i||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,i)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){n._trigger("stop",t)!==!1&&n._clear()}):this._trigger("stop",t)!==!1&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.trigger("focus"),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new e.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(t){return!this.options.handle||!!e(t.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(t){var n=this.options,i=e.isFunction(n.helper),r=i?e(n.helper.apply(this.element[0],[t])):"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(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(e){return/(html|body)/i.test(e.tagName)||e===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),n=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==n&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var e=this.element.position(),t=this._isRootNode(this.scrollParent[0]);return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+(t?0:this.scrollParent.scrollTop()),left:e.left-(parseInt(this.helper.css("left"),10)||0)+(t?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,n,i,r=this.options,o=this.document[0];return this.relativeContainer=null,r.containment?"window"===r.containment?void(this.containment=[e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,e(window).scrollLeft()+e(window).width()-this.helperProportions.width-this.margins.left,e(window).scrollTop()+(e(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===r.containment?void(this.containment=[0,0,e(o).width()-this.helperProportions.width-this.margins.left,(e(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=e(r.containment),i=n[0],void(i&&(t=/(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),(t?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,(t?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(e,t){t||(t=this.position);var n="absolute"===e?1:-1,i=this._isRootNode(this.scrollParent[0]);return{top:t.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:t.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(e,t){var n,i,r,o,a=this.options,s=this._isRootNode(this.scrollParent[0]),l=e.pageX,u=e.pageY;return s&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(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,e.pageX-this.offset.click.left<n[0]&&(l=n[0]+this.offset.click.left),e.pageY-this.offset.click.top<n[1]&&(u=n[1]+this.offset.click.top),e.pageX-this.offset.click.left>n[2]&&(l=n[2]+this.offset.click.left),e.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._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(t,n,i){return i=i||this._uiHash(),e.ui.plugin.call(this,t,[n,i,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),i.offset=this.positionAbs),e.Widget.prototype._trigger.call(this,t,n,i)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,n,i){var r=e.extend({},n,{item:i.element});i.sortables=[],e(i.options.connectToSortable).each(function(){var n=e(this).sortable("instance");n&&!n.options.disabled&&(i.sortables.push(n),n.refreshPositions(),n._trigger("activate",t,r))})},stop:function(t,n,i){var r=e.extend({},n,{item:i.element});i.cancelHelperRemoval=!1,e.each(i.sortables,function(){var e=this;e.isOver?(e.isOver=0,i.cancelHelperRemoval=!0,e.cancelHelperRemoval=!1,e._storedCSS={position:e.placeholder.css("position"),top:e.placeholder.css("top"),left:e.placeholder.css("left")},e._mouseStop(t),e.options.helper=e.options._helper):(e.cancelHelperRemoval=!0,e._trigger("deactivate",t,r))})},drag:function(t,n,i){e.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,e.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)&&e.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]},t.target=o.currentItem[0],o._mouseCapture(t,!0),o._mouseStart(t,!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",t),i.dropped=o.element,e.each(i.sortables,function(){this.refreshPositions()}),i.currentItem=i.element,o.fromOutside=i),o.currentItem&&(o._mouseDrag(t),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",t,o._uiHash(o)),o._mouseStop(t,!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(t),n.position=i._generatePosition(t,!0),i._trigger("fromSortable",t),i.dropped=!1,e.each(i.sortables,function(){this.refreshPositions()}))})}}),e.ui.plugin.add("draggable","cursor",{start:function(t,n,i){var r=e("body"),o=i.options;r.css("cursor")&&(o._cursor=r.css("cursor")),r.css("cursor",o.cursor)},stop:function(t,n,i){var r=i.options;r._cursor&&e("body").css("cursor",r._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,n,i){var r=e(n.helper),o=i.options;r.css("opacity")&&(o._opacity=r.css("opacity")),r.css("opacity",o.opacity)},stop:function(t,n,i){var r=i.options;r._opacity&&e(n.helper).css("opacity",r._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(e,t,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(t,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-t.pageY<r.scrollSensitivity?a.scrollTop=o=a.scrollTop+r.scrollSpeed:t.pageY-i.overflowOffset.top<r.scrollSensitivity&&(a.scrollTop=o=a.scrollTop-r.scrollSpeed)),r.axis&&"y"===r.axis||(i.overflowOffset.left+a.offsetWidth-t.pageX<r.scrollSensitivity?a.scrollLeft=o=a.scrollLeft+r.scrollSpeed:t.pageX-i.overflowOffset.left<r.scrollSensitivity&&(a.scrollLeft=o=a.scrollLeft-r.scrollSpeed))):(r.axis&&"x"===r.axis||(t.pageY-e(s).scrollTop()<r.scrollSensitivity?o=e(s).scrollTop(e(s).scrollTop()-r.scrollSpeed):e(window).height()-(t.pageY-e(s).scrollTop())<r.scrollSensitivity&&(o=e(s).scrollTop(e(s).scrollTop()+r.scrollSpeed))),r.axis&&"y"===r.axis||(t.pageX-e(s).scrollLeft()<r.scrollSensitivity?o=e(s).scrollLeft(e(s).scrollLeft()-r.scrollSpeed):e(window).width()-(t.pageX-e(s).scrollLeft())<r.scrollSensitivity&&(o=e(s).scrollLeft(e(s).scrollLeft()+r.scrollSpeed)))),o!==!1&&e.ui.ddmanager&&!r.dropBehaviour&&e.ui.ddmanager.prepareOffsets(i,t)}}),e.ui.plugin.add("draggable","snap",{start:function(t,n,i){var r=i.options;i.snapElements=[],e(r.snap.constructor!==String?r.snap.items||":data(ui-draggable)":r.snap).each(function(){var t=e(this),n=t.offset();this!==i.element[0]&&i.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:n.top,left:n.left})})},drag:function(t,n,i){var r,o,a,s,l,u,c,f,h,d,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,f=c+i.snapElements[h].height,v<l-g||m>u+g||b<c-g||y>f+g||!e.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,t,e.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(f-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:f,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)),d=r||o||a||s,"outer"!==p.snapMode&&(r=Math.abs(c-y)<=g,o=Math.abs(f-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:f-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||d)&&i.options.snap.snap&&i.options.snap.snap.call(i.element,t,e.extend(i._uiHash(),{snapItem:i.snapElements[h].item})),i.snapElements[h].snapping=r||o||a||s||d)}}),e.ui.plugin.add("draggable","stack",{start:function(t,n,i){var r,o=i.options,a=e.makeArray(e(o.stack)).sort(function(t,n){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(n).css("zIndex"),10)||0)});a.length&&(r=parseInt(e(a[0]).css("zIndex"),10)||0,e(a).each(function(t){e(this).css("zIndex",r+t)}),this.css("zIndex",r+a.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,n,i){var r=e(n.helper),o=i.options;r.css("zIndex")&&(o._zIndex=r.css("zIndex")),r.css("zIndex",o.zIndex)},stop:function(t,n,i){var r=i.options;r._zIndex&&e(n.helper).css("zIndex",r._zIndex)}});e.ui.draggable;/*!
 * jQuery UI Resizable 1.12.0
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */
e.widget("ui.resizable",e.ui.mouse,{version:"1.12.0",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},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(e){return parseFloat(e)||0},_isNumber:function(e){return!isNaN(parseFloat(e))},_hasScroll:function(t,n){if("hidden"===e(t).css("overflow"))return!1;var i=n&&"left"===n?"scrollLeft":"scrollTop",r=!1;return t[i]>0||(t[i]=1,r=t[i]>0,t[i]=0,r)},_create:function(){var t,n=this.options,i=this;this._addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!n.aspectRatio,aspectRatio:n.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:n.helper||n.ghost||n.animate?n.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(e("<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,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",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(t),this._proportionallyResize()),this._setupHandles(),n.autoHide&&e(this.element).on("mouseenter",function(){n.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){n.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,n=function(t){e(t).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(n(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),n(this.originalElement),this},_setOption:function(e,t){switch(this._super(e,t),e){case"handles":this._removeHandles(),this._setupHandles()}},_setupHandles:function(){var t,n,i,r,o,a=this.options,s=this;if(this.handles=a.handles||(e(".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=e(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split(","),this.handles={},n=0;n<i.length;n++)t=e.trim(i[n]),r="ui-resizable-"+t,o=e("<div>"),this._addClass(o,"ui-resizable-handle "+r),o.css({zIndex:a.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.append(o);this._renderAxis=function(t){var n,i,r,o;t=t||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]=e(this.handles[n]),this._on(this.handles[n],{mousedown:s._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=e(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(""),t.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.on("mouseover",function(){s.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),s.axis=o&&o[1]?o[1]:"se")}),a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(t){var n,i,r=!1;for(n in this.handles)i=e(this.handles[n])[0],(i===t.target||e.contains(i,t.target))&&(r=!0);return!this.options.disabled&&r},_mouseStart:function(t){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+=e(o.containment).scrollLeft()||0,i+=e(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:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,r=e(".ui-resizable-"+this.axis).css("cursor"),e("body").css("cursor","auto"===r?this.axis+"-resize":r),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var n,i,r=this.originalMousePosition,o=this.axis,a=t.pageX-r.left||0,s=t.pageY-r.top||0,l=this._change[o];return this._updatePrevProperties(),!!l&&(n=l.apply(this,[t,a,s]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(n=this._updateRatio(n,t)),n=this._respectSize(n,t),this._updateCache(n),this._propagate("resize",t),i=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),e.isEmptyObject(i)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges()),!1)},_mouseStop:function(t){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=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,l=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,u.animate||this.element.css(e.extend(a,{top:l,left:s})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!u.animate&&this._proportionallyResize()),e("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),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 e={};return this.position.top!==this.prevPosition.top&&(e.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(e.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(e.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(e.height=this.size.height+"px"),this.helper.css(e),e},_updateVirtualBoundaries:function(e){var t,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||e)&&(t=o.minHeight*this.aspectRatio,i=o.minWidth/this.aspectRatio,n=o.maxHeight*this.aspectRatio,r=o.maxWidth/this.aspectRatio,t>o.minWidth&&(o.minWidth=t),i>o.minHeight&&(o.minHeight=i),n<o.maxWidth&&(o.maxWidth=n),r<o.maxHeight&&(o.maxHeight=r)),this._vBoundaries=o},_updateCache:function(e){this.offset=this.helper.offset(),this._isNumber(e.left)&&(this.position.left=e.left),this._isNumber(e.top)&&(this.position.top=e.top),this._isNumber(e.height)&&(this.size.height=e.height),this._isNumber(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=this.position,n=this.size,i=this.axis;return this._isNumber(e.height)?e.width=e.height*this.aspectRatio:this._isNumber(e.width)&&(e.height=e.width/this.aspectRatio),"sw"===i&&(e.left=t.left+(n.width-e.width),e.top=null),"nw"===i&&(e.top=t.top+(n.height-e.height),e.left=t.left+(n.width-e.width)),e},_respectSize:function(e){var t=this._vBoundaries,n=this.axis,i=this._isNumber(e.width)&&t.maxWidth&&t.maxWidth<e.width,r=this._isNumber(e.height)&&t.maxHeight&&t.maxHeight<e.height,o=this._isNumber(e.width)&&t.minWidth&&t.minWidth>e.width,a=this._isNumber(e.height)&&t.minHeight&&t.minHeight>e.height,s=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,u=/sw|nw|w/.test(n),c=/nw|ne|n/.test(n);return o&&(e.width=t.minWidth),a&&(e.height=t.minHeight),i&&(e.width=t.maxWidth),r&&(e.height=t.maxHeight),o&&u&&(e.left=s-t.minWidth),i&&u&&(e.left=s-t.maxWidth),a&&c&&(e.top=l-t.minHeight),r&&c&&(e.top=l-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_getPaddingPlusBorderDimensions:function(e){for(var t=0,n=[],i=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],r=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];t<4;t++)n[t]=parseFloat(i[t])||0,n[t]+=parseFloat(r[t])||0;return{height:n[0]+n[2],width:n[1]+n[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var e,t=0,n=this.helper||this.element;t<this._proportionallyResizeElements.length;t++)e=this._proportionallyResizeElements[t],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(e)),e.css({height:n.height()-this.outerDimensions.height||0,width:n.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,n=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||e("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),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(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var n=this.originalSize,i=this.originalPosition;return{left:i.left+t,width:n.width-t}},n:function(e,t,n){var i=this.originalSize,r=this.originalPosition;return{top:r.top+n,height:i.height-n}},s:function(e,t,n){return{height:this.originalSize.height+n}},se:function(t,n,i){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,n,i]))},sw:function(t,n,i){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,n,i]))},ne:function(t,n,i){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,n,i]))},nw:function(t,n,i){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,n,i]))}},_propagate:function(t,n){e.ui.plugin.call(this,t,[n,this.ui()]),"resize"!==t&&this._trigger(t,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}}}),e.ui.plugin.add("resizable","animate",{stop:function(t){var n=e(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=parseFloat(n.element.css("left"))+(n.position.left-n.originalPosition.left)||null,c=parseFloat(n.element.css("top"))+(n.position.top-n.originalPosition.top)||null;n.element.animate(e.extend(l,c&&u?{top:c,left:u}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var i={width:parseFloat(n.element.css("width")),height:parseFloat(n.element.css("height")),top:parseFloat(n.element.css("top")),left:parseFloat(n.element.css("left"))};r&&r.length&&e(r[0]).css({width:i.width,height:i.height}),n._updateCache(i),n._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(){var t,n,i,r,o,a,s,l=e(this).resizable("instance"),u=l.options,c=l.element,f=u.containment,h=f instanceof e?f.get(0):/parent/.test(f)?c.parent().get(0):f;h&&(l.containerElement=e(h),/document/.test(f)||f===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}):(t=e(h),n=[],e(["Top","Right","Left","Bottom"]).each(function(e,i){n[e]=l._num(t.css("padding"+i))}),l.containerOffset=t.offset(),l.containerPosition=t.position(),l.containerSize={height:t.innerHeight()-n[3],width:t.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(t){var n,i,r,o,a=e(this).resizable("instance"),s=a.options,l=a.containerOffset,u=a.position,c=a._aspectRatio||t.shiftKey,f={top:0,left:0},h=a.containerElement,d=!0;h[0]!==document&&/static/.test(h.css("position"))&&(f=l),u.left<(a._helper?l.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-l.left:a.position.left-f.left),c&&(a.size.height=a.size.width/a.aspectRatio,d=!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,d=!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-f.left:a.offset.left-l.left)),i=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-f.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,d=!1)),i+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-i,c&&(a.size.width=a.size.height*a.aspectRatio,d=!1)),d||(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 t=e(this).resizable("instance"),n=t.options,i=t.containerOffset,r=t.containerPosition,o=t.containerElement,a=e(t.helper),s=a.offset(),l=a.outerWidth()-t.sizeDiff.width,u=a.outerHeight()-t.sizeDiff.height;t._helper&&!n.animate&&/relative/.test(o.css("position"))&&e(this).css({left:s.left-r.left-i.left,width:l,height:u}),t._helper&&!n.animate&&/static/.test(o.css("position"))&&e(this).css({left:s.left-r.left-i.left,width:l,height:u})}}),e.ui.plugin.add("resizable","alsoResize",{start:function(){var t=e(this).resizable("instance"),n=t.options;e(n.alsoResize).each(function(){var t=e(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.width()),height:parseFloat(t.height()),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,n){var i=e(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};e(r.alsoResize).each(function(){var t=e(this),i=e(this).data("ui-resizable-alsoresize"),r={},o=t.parents(n.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(o,function(e,t){var n=(i[t]||0)+(s[t]||0);n&&n>=0&&(r[t]=n||null)}),t.css(r)})},stop:function(){e(this).removeData("ui-resizable-alsoresize")}}),e.ui.plugin.add("resizable","ghost",{start:function(){var t=e(this).resizable("instance"),n=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:n.height,width:n.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),e.uiBackCompat!==!1&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(){var t,n=e(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,f=Math.round((r.width-o.width)/u)*u,h=Math.round((r.height-o.height)/c)*c,d=o.width+f,p=o.height+h,g=i.maxWidth&&i.maxWidth<d,m=i.maxHeight&&i.maxHeight<p,v=i.minWidth&&i.minWidth>d,y=i.minHeight&&i.minHeight>p;i.grid=l,v&&(d+=u),y&&(p+=c),g&&(d-=u),m&&(p-=c),/^(se|s|e)$/.test(s)?(n.size.width=d,n.size.height=p):/^(ne)$/.test(s)?(n.size.width=d,n.size.height=p,n.position.top=a.top-h):/^(sw)$/.test(s)?(n.size.width=d,n.size.height=p,n.position.left=a.left-f):((p-c<=0||d-u<=0)&&(t=n._getPaddingPlusBorderDimensions(this)),p-c>0?(n.size.height=p,n.position.top=a.top-h):(p=c-t.height,n.size.height=p,n.position.top=a.top+o.height-p),d-u>0?(n.size.width=d,n.position.left=a.left-f):(d=u-t.width,n.size.width=d,n.position.left=a.left+o.width-d))}});e.ui.resizable;/*!
 * jQuery UI Dialog 1.12.0
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */
e.widget("ui.dialog",{version:"1.12.0",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var n=e(this).css(t).offset().top;n<0&&e(this).css("top",t.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"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&e.fn.draggable&&this._makeDraggable(),this.options.resizable&&e.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?e(t):this.document.find(t||"body").eq(0)},_destroy:function(){var e,t=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),e=t.parent.children().eq(t.index),e.length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:e.noop,enable:e.noop,close:function(t){var n=this;this._isOpen&&this._trigger("beforeClose",t)!==!1&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||e.ui.safeBlur(e.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){n._trigger("close",t)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,n){var i=!1,r=this.uiDialog.siblings(".ui-front:visible").map(function(){return+e(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",t),i},open:function(){var t=this;return this._isOpen?void(this._moveToTop()&&this._focusTabbable()):(this._isOpen=!0,this.opener=e(e.ui.safeActiveElement(this.document[0])),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(){t._focusTabbable(),t._trigger("focus")}),this._makeFocusTarget(),void this._trigger("open"))},_focusTabbable:function(){var e=this._focusedElement;e||(e=this.element.find("[autofocus]")),e.length||(e=this.element.find(":tabbable")),e.length||(e=this.uiDialogButtonPane.find(":tabbable")),e.length||(e=this.uiDialogTitlebarClose.filter(":tabbable")),e.length||(e=this.uiDialog),e.eq(0).trigger("focus")},_keepFocus:function(t){function n(){var t=e.ui.safeActiveElement(this.document[0]),n=this.uiDialog[0]===t||e.contains(this.uiDialog[0],t);n||this._focusTabbable()}t.preventDefault(),n.call(this),this._delay(n)},_createWrapper:function(){this.uiDialog=e("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===e.ui.keyCode.ESCAPE)return t.preventDefault(),void this.close(t);if(t.keyCode===e.ui.keyCode.TAB&&!t.isDefaultPrevented()){var n=this.uiDialog.find(":tabbable"),i=n.filter(":first"),r=n.filter(":last");t.target!==r[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==i[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(this._delay(function(){r.trigger("focus")}),t.preventDefault()):(this._delay(function(){i.trigger("focus")}),t.preventDefault())}},mousedown:function(e){this._moveToTop(e)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=e("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(t){e(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=e("<button type='button'></button>").button({label:e("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(e){e.preventDefault(),this.close(e)}}),t=e("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(t,"ui-dialog-title"),this._title(t),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(e){this.options.title?e.text(this.options.title):e.html("&#160;")},_createButtonPane:function(){this.uiDialogButtonPane=e("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=e("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var t=this,n=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),e.isEmptyObject(n)||e.isArray(n)&&!n.length?void this._removeClass(this.uiDialog,"ui-dialog-buttons"):(e.each(n,function(n,i){var r,o;i=e.isFunction(i)?{click:i,text:n}:i,i=e.extend({type:"button"},i),r=i.click,o={icon:i.icon,iconPosition:i.iconPosition,showLabel:i.showLabel},delete i.click,delete i.icon,delete i.iconPosition,delete i.showLabel,e("<button></button>",i).button(o).appendTo(t.uiButtonSet).on("click",function(){r.apply(t.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),void this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function t(e){return{position:e.position,offset:e.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){n._addClass(e(this),"ui-dialog-dragging"),n._blockFrames(),n._trigger("dragStart",i,t(r))},drag:function(e,i){n._trigger("drag",e,t(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},n._removeClass(e(this),"ui-dialog-dragging"),n._unblockFrames(),n._trigger("dragStop",r,t(o))}})},_makeResizable:function(){function t(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.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){n._addClass(e(this),"ui-dialog-resizing"),n._blockFrames(),n._trigger("resizeStart",i,t(r))},resize:function(e,i){n._trigger("resize",e,t(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},n._removeClass(e(this),"ui-dialog-resizing"),n._unblockFrames(),n._trigger("resizeStop",r,t(o))}}).css("position",o)},_trackFocus:function(){this._on(this.widget(),{focusin:function(t){this._makeFocusTarget(),this._focusedElement=e(t.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var t=this._trackingInstances(),n=e.inArray(this,t);n!==-1&&t.splice(n,1)},_trackingInstances:function(){var e=this.document.data("ui-dialog-instances");return e||(e=[],this.document.data("ui-dialog-instances",e)),e},_minHeight:function(){var e=this.options;return"auto"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(){var e=this.uiDialog.is(":visible");e||this.uiDialog.show(),this.uiDialog.position(this.options.position),e||this.uiDialog.hide()},_setOptions:function(t){var n=this,i=!1,r={};e.each(t,function(e,t){n._setOption(e,t),e in n.sizeRelatedOptions&&(i=!0),e in n.resizableRelatedOptions&&(r[e]=t)}),i&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",r)},_setOption:function(t,n){var i,r,o=this.uiDialog;"disabled"!==t&&(this._super(t,n),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:e("<a>").text(""+this.options.closeText).html()}),"draggable"===t&&(i=o.is(":data(ui-draggable)"),i&&!n&&o.draggable("destroy"),!i&&n&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&(r=o.is(":data(ui-resizable)"),r&&!n&&o.resizable("destroy"),r&&"string"==typeof n&&o.resizable("option","handles",n),r||n===!1||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var e,t,n,i=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),i.minWidth>i.width&&(i.width=i.minWidth),e=this.uiDialog.css({height:"auto",width:i.width}).outerHeight(),t=Math.max(0,i.minHeight-e),n="number"==typeof i.maxHeight?Math.max(0,i.maxHeight-e):"none","auto"===i.height?this.element.css({minHeight:t,maxHeight:n,height:"auto"}):this.element.height(Math.max(0,i.height-e)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=e(this);return e("<div>").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return!!e(t.target).closest(".ui-dialog").length||!!e(t.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var t=!0;this._delay(function(){t=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(e){t||this._allowInteraction(e)||(e.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=e("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),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 e=this.document.data("ui-dialog-overlays")-1;e?this.document.data("ui-dialog-overlays",e):(this._off(this.document,"focusin"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),e.uiBackCompat!==!1&&e.widget("ui.dialog",e.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(e,t){"dialogClass"===e&&this.uiDialog.removeClass(this.options.dialogClass).addClass(t),this._superApply(arguments)}});e.ui.dialog;/*!
 * jQuery UI Droppable 1.12.0
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */
e.widget("ui.droppable",{version:"1.12.0",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,n=this.options,i=n.accept;this.isover=!1,this.isout=!0,this.accept=e.isFunction(i)?i:function(e){return e.is(i)},this.proportions=function(){return arguments.length?void(t=arguments[0]):t?t:t={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(n.scope),n.addClasses&&this._addClass("ui-droppable")},_addToManager:function(t){e.ui.ddmanager.droppables[t]=e.ui.ddmanager.droppables[t]||[],e.ui.ddmanager.droppables[t].push(this)},_splice:function(e){for(var t=0;t<e.length;t++)e[t]===this&&e.splice(t,1)},_destroy:function(){var t=e.ui.ddmanager.droppables[this.options.scope];this._splice(t)},_setOption:function(t,n){if("accept"===t)this.accept=e.isFunction(n)?n:function(e){return e.is(n)};else if("scope"===t){var i=e.ui.ddmanager.droppables[this.options.scope];this._splice(i),this._addToManager(n)}this._super(t,n)},_activate:function(t){var n=e.ui.ddmanager.current;this._addActiveClass(),n&&this._trigger("activate",t,this.ui(n))},_deactivate:function(t){var n=e.ui.ddmanager.current;this._removeActiveClass(),n&&this._trigger("deactivate",t,this.ui(n))},_over:function(t){var n=e.ui.ddmanager.current;n&&(n.currentItem||n.element)[0]!==this.element[0]&&this.accept.call(this.element[0],n.currentItem||n.element)&&(this._addHoverClass(),this._trigger("over",t,this.ui(n)))},_out:function(t){var n=e.ui.ddmanager.current;n&&(n.currentItem||n.element)[0]!==this.element[0]&&this.accept.call(this.element[0],n.currentItem||n.element)&&(this._removeHoverClass(),this._trigger("out",t,this.ui(n)))},_drop:function(t,n){var i=n||e.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=e(this).droppable("instance");if(n.options.greedy&&!n.options.disabled&&n.options.scope===i.options.scope&&n.accept.call(n.element[0],i.currentItem||i.element)&&y(i,e.extend(n,{offset:n.element.offset()}),n.options.tolerance,t))return r=!0,!1}),!r&&(!!this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",t,this.ui(i)),this.element)))},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});var y=e.ui.intersect=function(){function e(e,t,n){return e>=t&&e<t+n}return function(t,n,i,r){if(!n.offset)return!1;var o=(t.positionAbs||t.position.absolute).left+t.margins.left,a=(t.positionAbs||t.position.absolute).top+t.margins.top,s=o+t.helperProportions.width,l=a+t.helperProportions.height,u=n.offset.left,c=n.offset.top,f=u+n.proportions().width,h=c+n.proportions().height;switch(i){case"fit":return u<=o&&s<=f&&c<=a&&l<=h;case"intersect":return u<o+t.helperProportions.width/2&&s-t.helperProportions.width/2<f&&c<a+t.helperProportions.height/2&&l-t.helperProportions.height/2<h;case"pointer":return e(r.pageY,c,n.proportions().height)&&e(r.pageX,u,n.proportions().width);case"touch":return(a>=c&&a<=h||l>=c&&l<=h||a<c&&l>h)&&(o>=u&&o<=f||s>=u&&s<=f||o<u&&s>f);default:return!1}}}();e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,n){var i,r,o=e.ui.ddmanager.droppables[t.options.scope]||[],a=n?n.type:null,s=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(i=0;i<o.length;i++)if(!(o[i].options.disabled||t&&!o[i].accept.call(o[i].element[0],t.currentItem||t.element))){for(r=0;r<s.length;r++)if(s[r]===o[i].element[0]){o[i].proportions().height=0;continue e}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(t,n){var i=!1;return e.each((e.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&y(t,this,this.options.tolerance,n)&&(i=this._drop.call(this,n)||i),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,n)))}),i},dragStart:function(t,n){t.element.parentsUntil("body").on("scroll.droppable",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,n)})},drag:function(t,n){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,n),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var i,r,o,a=y(t,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 e(this).droppable("instance").options.scope===r}),o.length&&(i=e(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(t,n){t.element.parentsUntil("body").off("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,n)}},e.uiBackCompat!==!1&&e.widget("ui.droppable",e.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}});e.ui.droppable,e.widget("ui.progressbar",{version:"1.12.0",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=e("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(e){return void 0===e?this.options.value:(this.options.value=this._constrainedValue(e),void this._refreshValue())},_constrainedValue:function(e){return void 0===e&&(e=this.options.value),this.indeterminate=e===!1,"number"!=typeof e&&(e=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,e))},_setOptions:function(e){var t=e.value;delete e.value,this._super(e),this.options.value=this._constrainedValue(t),this._refreshValue()},_setOption:function(e,t){"max"===e&&(t=Math.max(this.min,t)),this._super(e,t)},_setOptionDisabled:function(e){this._super(e),this.element.attr("aria-disabled",e),this._toggleClass(null,"ui-state-disabled",!!e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var t=this.options.value,n=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).width(n.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,t===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=e("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":t}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==t&&(this.oldValue=t,this._trigger("change")),t===this.options.max&&this._trigger("complete")}}),e.widget("ui.selectable",e.ui.mouse,{version:"1.12.0",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var t=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){t.elementPos=e(t.element[0]).offset(),t.selectees=e(t.options.filter,t.element[0]),t._addClass(t.selectees,"ui-selectee"),t.selectees.each(function(){var n=e(this),i=n.offset(),r={left:i.left-t.elementPos.left,top:i.top-t.elementPos.top};e.data(this,"selectable-item",{element:this,$element:n,left:r.left,top:r.top,right:r.left+n.outerWidth(),bottom:r.top+n.outerHeight(),startselected:!1,selected:n.hasClass("ui-selected"),selecting:n.hasClass("ui-selecting"),unselecting:n.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=e("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(t){var n=this,i=this.options;this.opos=[t.pageX,t.pageY],this.elementPos=e(this.element[0]).offset(),this.options.disabled||(this.selectees=e(i.filter,this.element[0]),this._trigger("start",t),e(i.appendTo).append(this.helper),this.helper.css({left:t.pageX,top:t.pageY,width:0,height:0}),i.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var i=e.data(this,"selectable-item");i.startselected=!0,t.metaKey||t.ctrlKey||(n._removeClass(i.$element,"ui-selected"),i.selected=!1,n._addClass(i.$element,"ui-unselecting"),i.unselecting=!0,n._trigger("unselecting",t,{unselecting:i.element}))}),e(t.target).parents().addBack().each(function(){var i,r=e.data(this,"selectable-item");if(r)return i=!t.metaKey&&!t.ctrlKey||!r.$element.hasClass("ui-selected"),n._removeClass(r.$element,i?"ui-unselecting":"ui-selected")._addClass(r.$element,i?"ui-selecting":"ui-unselecting"),r.unselecting=!i,r.selecting=i,r.selected=i,i?n._trigger("selecting",t,{selecting:r.element}):n._trigger("unselecting",t,{unselecting:r.element}),!1}))},_mouseDrag:function(t){if(this.dragged=!0,!this.options.disabled){var n,i=this,r=this.options,o=this.opos[0],a=this.opos[1],s=t.pageX,l=t.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=e.data(this,"selectable-item"),u=!1,c={};n&&n.element!==i.element[0]&&(c.left=n.left+i.elementPos.left,c.right=n.right+i.elementPos.left,c.top=n.top+i.elementPos.top,c.bottom=n.bottom+i.elementPos.top,"touch"===r.tolerance?u=!(c.left>s||c.right<o||c.top>l||c.bottom<a):"fit"===r.tolerance&&(u=c.left>o&&c.right<s&&c.top>a&&c.bottom<l),u?(n.selected&&(i._removeClass(n.$element,"ui-selected"),n.selected=!1),n.unselecting&&(i._removeClass(n.$element,"ui-unselecting"),n.unselecting=!1),n.selecting||(i._addClass(n.$element,"ui-selecting"),n.selecting=!0,i._trigger("selecting",t,{selecting:n.element}))):(n.selecting&&((t.metaKey||t.ctrlKey)&&n.startselected?(i._removeClass(n.$element,"ui-selecting"),n.selecting=!1,i._addClass(n.$element,"ui-selected"),n.selected=!0):(i._removeClass(n.$element,"ui-selecting"),n.selecting=!1,n.startselected&&(i._addClass(n.$element,"ui-unselecting"),n.unselecting=!0),i._trigger("unselecting",t,{unselecting:n.element}))),n.selected&&(t.metaKey||t.ctrlKey||n.startselected||(i._removeClass(n.$element,"ui-selected"),n.selected=!1,i._addClass(n.$element,"ui-unselecting"),n.unselecting=!0,i._trigger("unselecting",t,{unselecting:n.element})))))}),!1}},_mouseStop:function(t){var n=this;return this.dragged=!1,e(".ui-unselecting",this.element[0]).each(function(){var i=e.data(this,"selectable-item");n._removeClass(i.$element,"ui-unselecting"),i.unselecting=!1,i.startselected=!1,n._trigger("unselected",t,{unselected:i.element})}),e(".ui-selecting",this.element[0]).each(function(){var i=e.data(this,"selectable-item");n._removeClass(i.$element,"ui-selecting")._addClass(i.$element,"ui-selected"),i.selecting=!1,i.selected=!0,i.startselected=!0,n._trigger("selected",t,{selected:i.element})}),this._trigger("stop",t),this.helper.remove(),!1}}),e.widget("ui.selectmenu",[e.ui.formResetMixin,{version:"1.12.0",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,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._bindFormResetHandler(),this._rendered=!1,this.menuItems=e()},_drawButton:function(){var t,n=this,i=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(e){this.button.focus(),e.preventDefault()}}),this.element.hide(),this.button=e("<span>",{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",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),t=e("<span>").appendTo(this.button),this._addClass(t,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(i).appendTo(this.button),this.options.width!==!1&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){n._rendered||n._refreshMenu()})},_drawMenu:function(){var t=this;this.menu=e("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=e("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(e,n){e.preventDefault(),t._setSelection(),t._select(n.item.data("ui-selectmenu-item"),e)},focus:function(e,n){var i=n.item.data("ui-selectmenu-item");null!=t.focusIndex&&i.index!==t.focusIndex&&(t._trigger("focus",e,{item:i}),t.isOpen||t._select(i,e)),t.focusIndex=i.index,t.button.attr("aria-activedescendant",t.menuItems.eq(i.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var e,t=this.element.find("option");this.menu.empty(),this._parseOptions(t),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,t.length&&(e=this._getSelectedItem(),this.menuInstance.focus(null,e),this._setAria(e.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(e){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",e)))},_position:function(){this.menuWrap.position(e.extend({of:this.button},this.options.position))},close:function(e){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",e))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(t){var n=e("<span>");return this._setText(n,t.label),this._addClass(n,"ui-selectmenu-text"),n},_renderMenu:function(t,n){var i=this,r="";e.each(n,function(n,o){var a;o.optgroup!==r&&(a=e("<li>",{text:o.optgroup}),i._addClass(a,"ui-selectmenu-optgroup","ui-menu-divider"+(o.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),a.appendTo(t),r=o.optgroup),i._renderItemData(t,o)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-selectmenu-item",t)},_renderItem:function(t,n){var i=e("<li>"),r=e("<div>",{title:n.element.attr("title")});return n.disabled&&this._addClass(i,null,"ui-state-disabled"),this._setText(r,n.label),i.append(r).appendTo(t)},_setText:function(e,t){t?e.text(t):e.html("&#160;")},_move:function(e,t){var n,i,r=".ui-menu-item";this.isOpen?n=this.menuItems.eq(this.focusIndex).parent("li"):(n=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),r+=":not(.ui-state-disabled)"),i="first"===e||"last"===e?n["first"===e?"prevAll":"nextAll"](r).eq(-1):n[e+"All"](r).eq(0),i.length&&this.menuInstance.focus(t,i)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(e){this[this.isOpen?"close":"open"](e)},_setSelection:function(){var e;this.range&&(window.getSelection?(e=window.getSelection(),e.removeAllRanges(),e.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(t){this.isOpen&&(e(t.target).closest(".ui-selectmenu-menu, #"+e.ui.escapeSelector(this.ids.button)).length||this.close(t))}},_buttonEvents:{mousedown:function(){var e;window.getSelection?(e=window.getSelection(),e.rangeCount&&(this.range=e.getRangeAt(0))):this.range=document.selection.createRange()},click:function(e){this._setSelection(),this._toggle(e)},keydown:function(t){var n=!0;switch(t.keyCode){case e.ui.keyCode.TAB:case e.ui.keyCode.ESCAPE:this.close(t),n=!1;break;case e.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(t);break;case e.ui.keyCode.UP:t.altKey?this._toggle(t):this._move("prev",t);break;case e.ui.keyCode.DOWN:t.altKey?this._toggle(t):this._move("next",t);break;case e.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(t):this._toggle(t);break;case e.ui.keyCode.LEFT:this._move("prev",t);break;case e.ui.keyCode.RIGHT:this._move("next",t);break;case e.ui.keyCode.HOME:case e.ui.keyCode.PAGE_UP:this._move("first",t);break;case e.ui.keyCode.END:case e.ui.keyCode.PAGE_DOWN:this._move("last",t);break;default:this.menu.trigger(t),n=!1}n&&t.preventDefault()}},_selectFocusedItem:function(e){var t=this.menuItems.eq(this.focusIndex).parent("li");t.hasClass("ui-state-disabled")||this._select(t.data("ui-selectmenu-item"),e)},_select:function(e,t){var n=this.element[0].selectedIndex;this.element[0].selectedIndex=e.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(e)),this._setAria(e),this._trigger("select",t,{item:e}),e.index!==n&&this._trigger("change",t,{item:e}),this.close(t)},_setAria:function(e){var t=this.menuItems.eq(e.index).attr("id");this.button.attr({"aria-labelledby":t,"aria-activedescendant":t}),this.menu.attr("aria-activedescendant",t)},_setOption:function(e,t){if("icons"===e){var n=this.button.find("span.ui-icon");this._removeClass(n,null,this.options.icons.button)._addClass(n,null,t.button)}this._super(e,t),"appendTo"===e&&this.menuWrap.appendTo(this._appendTo()),"width"===e&&this._resizeButton()},_setOptionDisabled:function(e){this._super(e),this.menuInstance.option("disabled",e),this.button.attr("aria-disabled",e),this._toggleClass(this.button,null,"ui-state-disabled",e),this.element.prop("disabled",e),e?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front, dialog")),t.length||(t=this.document[0].body),t},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var e=this.options.width;return e===!1?void this.button.css("width",""):(null===e&&(e=this.element.show().outerWidth(),this.element.hide()),void this.button.outerWidth(e))},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var e=this._super();return e.disabled=this.element.prop("disabled"),e},_parseOptions:function(t){var n=this,i=[];t.each(function(t,r){i.push(n._parseOption(e(r),t))}),this.items=i},_parseOption:function(e,t){var n=e.parent("optgroup");return{element:e,index:t,value:e.val(),label:e.text(),optgroup:n.attr("label")||"",disabled:n.prop("disabled")||e.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),e.widget("ui.slider",e.ui.mouse,{version:"1.12.0",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},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._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,n,i=this.options,r=this.element.find(".ui-slider-handle"),o="<span tabindex='0'></span>",a=[];for(n=i.values&&i.values.length||1,r.length>n&&(r.slice(n).remove(),r=r.slice(0,n)),t=r.length;t<n;t++)a.push(o);this.handles=r.add(e(a.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(t){e(this).data("ui-slider-handle-index",t)})},_createRange:function(){var t=this.options;t.range?(t.range===!0&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:e.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=e("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==t.range&&"max"!==t.range||this._addClass(this.range,"ui-slider-range-"+t.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._mouseDestroy()},_mouseCapture:function(t){var n,i,r,o,a,s,l,u,c=this,f=this.options;return!f.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),n={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(n),r=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var n=Math.abs(i-c.values(t));(r>n||r===n&&(t===c._lastChangedValue||c.values(t)===f.min))&&(r=n,o=e(this),a=t)}),s=this._start(t,a),s!==!1&&(this._mouseSliding=!0,this._handleIndex=a,this._addClass(o,null,"ui-state-active"),o.trigger("focus"),l=o.offset(),u=!e(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=u?{left:0,top:0}:{left:t.pageX-l.left-o.width()/2,top:t.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(t,a,i),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},n=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,n),!1},_mouseStop:function(e){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,n,i,r,o;return"horizontal"===this.orientation?(t=this.elementSize.width,n=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,n=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),i=n/t,i>1&&(i=1),i<0&&(i=0),"vertical"===this.orientation&&(i=1-i),r=this._valueMax()-this._valueMin(),o=this._valueMin()+i*r,this._trimAlignValue(o)},_uiHash:function(e,t,n){var i={handle:this.handles[e],handleIndex:e,value:void 0!==t?t:this.value()};return this._hasMultipleValues()&&(i.value=void 0!==t?t:this.values(e),i.values=n||this.values()),i},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(e,t){return this._trigger("start",e,this._uiHash(t))},_slide:function(e,t,n){var i,r,o=this.value(),a=this.values();this._hasMultipleValues()&&(r=this.values(t?0:1),o=this.values(t),2===this.options.values.length&&this.options.range===!0&&(n=0===t?Math.min(r,n):Math.max(r,n)),a[t]=n),n!==o&&(i=this._trigger("slide",e,this._uiHash(t,n,a)),i!==!1&&(this._hasMultipleValues()?this.values(t,n):this.value(n)))},_stop:function(e,t){this._trigger("stop",e,this._uiHash(t))},_change:function(e,t){this._keySliding||this._mouseSliding||(this._lastChangedValue=t,this._trigger("change",e,this._uiHash(t)))},value:function(e){return arguments.length?(this.options.value=this._trimAlignValue(e),this._refreshValue(),void this._change(null,0)):this._value()},values:function(t,n){var i,r,o;if(arguments.length>1)return this.options.values[t]=this._trimAlignValue(n),this._refreshValue(),void this._change(null,t);if(!arguments.length)return this._values();if(!e.isArray(arguments[0]))return this._hasMultipleValues()?this._values(t):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(t,n){var i,r=0;switch("range"===t&&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)),e.isArray(this.options.values)&&(r=this.options.values.length),this._super(t,n),t){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(n),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=r-1;i>=0;i--)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}},_setOptionDisabled:function(e){this._super(e),this._toggleClass(null,"ui-state-disabled",!!e)},_value:function(){var e=this.options.value;return e=this._trimAlignValue(e)},_values:function(e){var t,n,i;if(arguments.length)return t=this.options.values[e],t=this._trimAlignValue(t);if(this._hasMultipleValues()){for(n=this.options.values.slice(),i=0;i<n.length;i+=1)n[i]=this._trimAlignValue(n[i]);return n}return[]},_trimAlignValue:function(e){if(e<=this._valueMin())return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,n=(e-this._valueMin())%t,i=e-n;return 2*Math.abs(n)>=t&&(i+=n>0?t:-t),parseFloat(i.toFixed(5))},_calculateNewMax:function(){var e=this.options.max,t=this._valueMin(),n=this.options.step,i=Math.round((e-t)/n)*n;e=i+t,e>this.options.max&&(e-=n),this.max=parseFloat(e.toFixed(this._precision()))},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=e.toString(),n=t.indexOf(".");return n===-1?0:t.length-n-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(e){"vertical"===e&&this.range.css({width:"",left:""}),"horizontal"===e&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var t,n,i,r,o,a=this.options.range,s=this.options,l=this,u=!this._animateOff&&s.animate,c={};this._hasMultipleValues()?this.handles.each(function(i){n=(l.values(i)-l._valueMin())/(l._valueMax()-l._valueMin())*100,c["horizontal"===l.orientation?"left":"bottom"]=n+"%",e(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-t+"%"},{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-t+"%"},{queue:!1,duration:s.animate}))),t=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.stop(1,1)[u?"animate":"css"]({width:100-n+"%"},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.stop(1,1)[u?"animate":"css"]({height:100-n+"%"},s.animate))},_handleEvents:{keydown:function(t){var n,i,r,o,a=e(t.target).data("ui-slider-handle-index");switch(t.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(t.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(e(t.target),null,"ui-state-active"),n=this._start(t,a),n===!1))return}switch(o=this.options.step,i=r=this._hasMultipleValues()?this.values(a):this.value(),t.keyCode){case e.ui.keyCode.HOME:r=this._valueMin();break;case e.ui.keyCode.END:r=this._valueMax();break;case e.ui.keyCode.PAGE_UP:r=this._trimAlignValue(i+(this._valueMax()-this._valueMin())/this.numPages);break;case e.ui.keyCode.PAGE_DOWN:r=this._trimAlignValue(i-(this._valueMax()-this._valueMin())/this.numPages);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(i===this._valueMax())return;r=this._trimAlignValue(i+o);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(i===this._valueMin())return;r=this._trimAlignValue(i-o)}this._slide(t,a,r)},keyup:function(t){var n=e(t.target).data("ui-slider-handle-index");
this._keySliding&&(this._keySliding=!1,this._stop(t,n),this._change(t,n),this._removeClass(e(t.target),null,"ui-state-active"))}}}),e.widget("ui.sortable",e.ui.mouse,{version:"1.12.0",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(e,t,n){return e>=t&&e<t+n},_isFloating:function(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(e,t){this._super(e,t),"handle"===e&&this._setHandleClassName()},_setHandleClassName:function(){var t=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),e.each(this.items,function(){t._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,n){var i=null,r=!1,o=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(t),e(t.target).parents().each(function(){if(e.data(this,o.widgetName+"-item")===o)return i=e(this),!1}),e.data(t.target,o.widgetName+"-item")===o&&(i=e(t.target)),!!i&&(!(this.options.handle&&!n&&(e(this.options.handle,i).find("*").addBack().each(function(){this===t.target&&(r=!0)}),!r))&&(this.currentItem=i,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(t,n,i){var r,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,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=e("<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",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(r=this.containers.length-1;r>=0;r--)this.containers[r]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!a.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var n,i,r,o,a=this.options,s=!1;for(this.position=this._generatePosition(t),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-t.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=s=this.scrollParent[0].scrollTop+a.scrollSpeed:t.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=s=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=s=this.scrollParent[0].scrollLeft+a.scrollSpeed:t.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=s=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(t.pageY-this.document.scrollTop()<a.scrollSensitivity?s=this.document.scrollTop(this.document.scrollTop()-a.scrollSpeed):this.window.height()-(t.pageY-this.document.scrollTop())<a.scrollSensitivity&&(s=this.document.scrollTop(this.document.scrollTop()+a.scrollSpeed)),t.pageX-this.document.scrollLeft()<a.scrollSensitivity?s=this.document.scrollLeft(this.document.scrollLeft()-a.scrollSpeed):this.window.width()-(t.pageX-this.document.scrollLeft())<a.scrollSensitivity&&(s=this.document.scrollLeft(this.document.scrollLeft()+a.scrollSpeed))),s!==!1&&e.ui.ddmanager&&!a.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),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||e.contains(this.placeholder[0],r)||"semi-dynamic"===this.options.type&&e.contains(this.element[0],r))){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(i))break;this._rearrange(t,i),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,n){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),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,e(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){i._clear(t)})}else this._clear(t,n);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var n=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},e(n).each(function(){var n=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);n&&i.push((t.key||n[1]+"[]")+"="+(t.key&&t.expression?n[1]:n[2]))}),!i.length&&t.key&&i.push(t.key+"="),i.join("&")},toArray:function(t){var n=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},n.each(function(){i.push(e(t.item||this).attr(t.attribute||"id")||"")}),i},_intersectsWith:function(e){var t=this.positionAbs.left,n=t+this.helperProportions.width,i=this.positionAbs.top,r=i+this.helperProportions.height,o=e.left,a=o+e.width,s=e.top,l=s+e.height,u=this.offset.click.top,c=this.offset.click.left,f="x"===this.options.axis||i+u>s&&i+u<l,h="y"===this.options.axis||t+c>o&&t+c<a,d=f&&h;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?d:o<t+this.helperProportions.width/2&&n-this.helperProportions.width/2<a&&s<i+this.helperProportions.height/2&&r-this.helperProportions.height/2<l},_intersectsWithPointer:function(e){var t,n,i="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height),r="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width),o=i&&r;return!!o&&(t=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection(),this.floating?"right"===n||"down"===t?2:1:t&&("down"===t?2:1))},_intersectsWithSides:function(e){var t=this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),n=this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),i=this._getDragVerticalDirection(),r=this._getDragHorizontalDirection();return this.floating&&r?"right"===r&&n||"left"===r&&!n:i&&("down"===i&&t||"up"===i&&!t)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){function n(){s.push(this)}var i,r,o,a,s=[],l=[],u=this._connectWith();if(u&&t)for(i=u.length-1;i>=0;i--)for(o=e(u[i],this.document[0]),r=o.length-1;r>=0;r--)a=e.data(o[r],this.widgetFullName),a&&a!==this&&!a.options.disabled&&l.push([e.isFunction(a.options.items)?a.options.items.call(a.element):e(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);for(l.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(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 e(s)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,function(e){for(var n=0;n<t.length;n++)if(t[n]===e.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var n,i,r,o,a,s,l,u,c=this.items,f=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],h=this._connectWith();if(h&&this.ready)for(n=h.length-1;n>=0;n--)for(r=e(h[n],this.document[0]),i=r.length-1;i>=0;i--)o=e.data(r[i],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(f.push([e.isFunction(o.options.items)?o.options.items.call(o.element[0],t,{item:this.currentItem}):e(o.options.items,o.element),o]),this.containers.push(o));for(n=f.length-1;n>=0;n--)for(a=f[n][1],s=f[n][0],i=0,u=s.length;i<u;i++)l=e(s[i]),l.data(this.widgetName+"-item",a),c.push({item:l,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(t){this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),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?e(this.options.toleranceElement,i.item):i.item,t||(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(t){t=t||this;var n,i=t.options;i.placeholder&&i.placeholder.constructor!==String||(n=i.placeholder,i.placeholder={element:function(){var i=t.currentItem[0].nodeName.toLowerCase(),r=e("<"+i+">",t.document[0]);return t._addClass(r,"ui-sortable-placeholder",n||t.currentItem[0].className)._removeClass(r,"ui-sortable-helper"),"tbody"===i?t._createTrPlaceholder(t.currentItem.find("tr").eq(0),e("<tr>",t.document[0]).appendTo(r)):"tr"===i?t._createTrPlaceholder(t.currentItem,r):"img"===i&&r.attr("src",t.currentItem.attr("src")),n||r.css("visibility","hidden"),r},update:function(e,r){n&&!i.forcePlaceholderSize||(r.height()||r.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),r.width()||r.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}}),t.placeholder=e(i.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),i.placeholder.update(t,t.placeholder)},_createTrPlaceholder:function(t,n){var i=this;t.children().each(function(){e("<td>&#160;</td>",i.document[0]).attr("colspan",e(this).attr("colspan")||1).appendTo(n)})},_contactContainers:function(t){var n,i,r,o,a,s,l,u,c,f,h=null,d=null;for(n=this.containers.length-1;n>=0;n--)if(!e.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(h&&e.contains(this.containers[n].element[0],h.element[0]))continue;h=this.containers[n],d=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",t,this._uiHash(this)),this.containers[n].containerCache.over=0);if(h)if(1===this.containers.length)this.containers[d].containerCache.over||(this.containers[d]._trigger("over",t,this._uiHash(this)),this.containers[d].containerCache.over=1);else{for(r=1e4,o=null,c=h.floating||this._isFloating(this.currentItem),a=c?"left":"top",s=c?"width":"height",f=c?"pageX":"pageY",i=this.items.length-1;i>=0;i--)e.contains(this.containers[d].element[0],this.items[i].item[0])&&this.items[i].item[0]!==this.currentItem[0]&&(l=this.items[i].item.offset()[a],u=!1,t[f]-l>this.items[i][s]/2&&(u=!0),Math.abs(t[f]-l)<r&&(r=Math.abs(t[f]-l),o=this.items[i],this.direction=u?"up":"down"));if(!o&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[d])return void(this.currentContainer.containerCache.over||(this.containers[d]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1));o?this._rearrange(t,o,null,!0):this._rearrange(t,null,this.containers[d].element,!0),this._trigger("change",t,this._uiHash()),this.containers[d]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[d],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[d]._trigger("over",t,this._uiHash(this)),this.containers[d].containerCache.over=1}},_createHelper:function(t){var n=this.options,i=e.isFunction(n.helper)?e(n.helper.apply(this.element[0],[t,this.currentItem])):"clone"===n.helper?this.currentItem.clone():this.currentItem;return i.parents("body").length||e("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(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.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 t,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.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(r.containment)||(t=e(r.containment)[0],n=e(r.containment).offset(),i="hidden"!==e(t).css("overflow"),this.containment=[n.left+(parseInt(e(t).css("borderLeftWidth"),10)||0)+(parseInt(e(t).css("paddingLeft"),10)||0)-this.margins.left,n.top+(parseInt(e(t).css("borderTopWidth"),10)||0)+(parseInt(e(t).css("paddingTop"),10)||0)-this.margins.top,n.left+(i?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(e(t).css("borderLeftWidth"),10)||0)-(parseInt(e(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,n.top+(i?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(e(t).css("borderTopWidth"),10)||0)-(parseInt(e(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,n){n||(n=this.position);var i="absolute"===t?1:-1,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&e.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(t){var n,i,r=this.options,o=t.pageX,a=t.pageY,s="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&e.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&&(t.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),t.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(e,t,n,i){n?n[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.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(e,t){function n(e,t,n){return function(i){n._trigger(e,i,t._uiHash(t))}}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),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!t&&r.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||r.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(t||(r.push(function(e){this._trigger("remove",e,this._uiHash())}),r.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),r.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)t||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,t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!t){for(i=0;i<r.length;i++)r[i].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){e.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(t){var n=t||this;return{helper:n.helper,placeholder:n.placeholder||e([]),position:n.position,originalPosition:n.originalPosition,offset:n.positionAbs,item:n.currentItem,sender:t?t.element:null}}});e.widget("ui.spinner",{version:"1.12.0",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},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 t=this._super(),n=this.element;return e.each(["min","max","step"],function(e,i){var r=n.attr(i);null!=r&&r.length&&(t[i]=r)}),t},_events:{keydown:function(e){this._start(e)&&this._keydown(e)&&e.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(e){return this.cancelBlur?void delete this.cancelBlur:(this._stop(),this._refresh(),void(this.previous!==this.element.val()&&this._trigger("change",e)))},mousewheel:function(e,t){if(t){if(!this.spinning&&!this._start(e))return!1;this._spin((t>0?1:-1)*this.options.step,e),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(e)},100),e.preventDefault()}},"mousedown .ui-spinner-button":function(t){function n(){var t=this.element[0]===e.ui.safeActiveElement(this.document[0]);t||(this.element.trigger("focus"),this.previous=i,this._delay(function(){this.previous=i}))}var i;i=this.element[0]===e.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),t.preventDefault(),n.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,n.call(this)}),this._start(t)!==!1&&this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){if(e(t.currentTarget).hasClass("ui-state-active"))return this._start(t)!==!1&&void this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&this.uiSpinner.height()>0&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(t){var n=this.options,i=e.ui.keyCode;switch(t.keyCode){case i.UP:return this._repeat(null,1,t),!0;case i.DOWN:return this._repeat(null,-1,t),!0;case i.PAGE_UP:return this._repeat(null,n.page,t),!0;case i.PAGE_DOWN:return this._repeat(null,-n.page,t),!0}return!1},_start:function(e){return!(!this.spinning&&this._trigger("start",e)===!1)&&(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(e,t,n){e=e||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,t,n)},e),this._spin(t*this.options.step,n)},_spin:function(e,t){var n=this.value()||0;this.counter||(this.counter=1),n=this._adjustValue(n+e*this._increment(this.counter)),this.spinning&&this._trigger("spin",t,{value:n})===!1||(this._value(n),this.counter++)},_increment:function(t){var n=this.options.incremental;return n?e.isFunction(n)?n(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=e.toString(),n=t.indexOf(".");return n===-1?0:t.length-n-1},_adjustValue:function(e){var t,n,i=this.options;return t=null!==i.min?i.min:0,n=e-t,n=Math.round(n/i.step)*i.step,e=t+n,e=parseFloat(e.toFixed(this._precision())),null!==i.max&&e>i.max?i.max:null!==i.min&&e<i.min?i.min:e},_stop:function(e){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",e))},_setOption:function(e,t){var n,i,r;return"culture"===e||"numberFormat"===e?(n=this._parse(this.element.val()),this.options[e]=t,void this.element.val(this._format(n))):("max"!==e&&"min"!==e&&"step"!==e||"string"==typeof t&&(t=this._parse(t)),"icons"===e&&(i=this.buttons.first().find(".ui-icon"),this._removeClass(i,null,this.options.icons.up),this._addClass(i,null,t.up),r=this.buttons.last().find(".ui-icon"),this._removeClass(r,null,this.options.icons.down),this._addClass(r,null,t.down)),void this._super(e,t))},_setOptionDisabled:function(e){this._super(e),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!e),this.element.prop("disabled",!!e),this.buttons.button(e?"disable":"enable")},_setOptions:s(function(e){this._super(e)}),_parse:function(e){return"string"==typeof e&&""!==e&&(e=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(e,10,this.options.culture):+e),""===e||isNaN(e)?null:e},_format:function(e){return""===e?"":window.Globalize&&this.options.numberFormat?Globalize.format(e,this.options.numberFormat,this.options.culture):e},_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 e=this.value();return null!==e&&e===this._adjustValue(e)},_value:function(e,t){var n;""!==e&&(n=this._parse(e),null!==n&&(t||(n=this._adjustValue(n)),e=this._format(n))),this.element.val(e),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:s(function(e){this._stepUp(e)}),_stepUp:function(e){this._start()&&(this._spin((e||1)*this.options.step),this._stop())},stepDown:s(function(e){this._stepDown(e)}),_stepDown:function(e){this._start()&&(this._spin((e||1)*-this.options.step),this._stop())},pageUp:s(function(e){this._stepUp((e||1)*this.options.page)}),pageDown:s(function(e){this._stepDown((e||1)*this.options.page)}),value:function(e){return arguments.length?void s(this._value).call(this,e):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),e.uiBackCompat!==!1&&e.widget("ui.spinner",e.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}});e.ui.spinner;/*!
 * jQuery UI Tabs 1.12.0
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */
e.widget("ui.tabs",{version:"1.12.0",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var e=/#.*$/;return function(t){var n,i;n=t.href.replace(e,""),i=location.href.replace(e,"");try{n=decodeURIComponent(n)}catch(r){}try{i=decodeURIComponent(i)}catch(r){}return t.hash.length>1&&n===i}}(),_create:function(){var t=this,n=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,n.collapsible),this._processTabs(),n.active=this._initialActive(),e.isArray(n.disabled)&&(n.disabled=e.unique(n.disabled.concat(e.map(this.tabs.filter(".ui-state-disabled"),function(e){return t.tabs.index(e)}))).sort()),this.options.active!==!1&&this.anchors.length?this.active=this._findActive(n.active):this.active=e(),this._refresh(),this.active.length&&this.load(n.active)},_initialActive:function(){var t=this.options.active,n=this.options.collapsible,i=location.hash.substring(1);return null===t&&(i&&this.tabs.each(function(n,r){if(e(r).attr("aria-controls")===i)return t=n,!1}),null===t&&(t=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),null!==t&&t!==-1||(t=!!this.tabs.length&&0)),t!==!1&&(t=this.tabs.index(this.tabs.eq(t)),t===-1&&(t=!n&&0)),!n&&t===!1&&this.anchors.length&&(t=0),t},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):e()}},_tabKeydown:function(t){var n=e(e.ui.safeActiveElement(this.document[0])).closest("li"),i=this.tabs.index(n),r=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:i++;break;case e.ui.keyCode.UP:case e.ui.keyCode.LEFT:r=!1,i--;break;case e.ui.keyCode.END:i=this.anchors.length-1;break;case e.ui.keyCode.HOME:i=0;break;case e.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),void this._activate(i);case e.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),void this._activate(i!==this.options.active&&i);default:return}t.preventDefault(),clearTimeout(this.activating),i=this._focusNextTab(i,r),t.ctrlKey||t.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(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===e.ui.keyCode.UP&&(t.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(t){return t.altKey&&t.keyCode===e.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===e.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,n){function i(){return t>r&&(t=0),t<0&&(t=r),t}for(var r=this.tabs.length-1;e.inArray(i(),this.options.disabled)!==-1;)t=n?t+1:t-1;return t},_focusNextTab:function(e,t){return e=this._findNextTab(e,t),this.tabs.eq(e).trigger("focus"),e},_setOption:function(e,t){return"active"===e?void this._activate(t):(this._super(e,t),"collapsible"===e&&(this._toggleClass("ui-tabs-collapsible",null,t),t||this.options.active!==!1||this._activate(0)),"event"===e&&this._setupEvents(t),void("heightStyle"===e&&this._setupHeightStyle(t)))},_sanitizeSelector:function(e){return e?e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,n=this.tablist.children(":has(a[href])");t.disabled=e.map(n.filter(".ui-state-disabled"),function(e){return n.index(e)}),this._processTabs(),t.active!==!1&&this.anchors.length?this.active.length&&!e.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=e()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=e()),this._refresh()},_refresh:function(){this._setOptionDisabled(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.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var t=this,n=this.tabs,i=this.anchors,r=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(t){e(this).is(".ui-state-disabled")&&t.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){e(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return e("a",this)[0]}).attr({role:"presentation",tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=e(),this.anchors.each(function(n,i){var r,o,a,s=e(i).uniqueId().attr("id"),l=e(i).closest("li"),u=l.attr("aria-controls");t._isLocal(i)?(r=i.hash,a=r.substring(1),o=t.element.find(t._sanitizeSelector(r))):(a=l.attr("aria-controls")||e({}).uniqueId()[0].id,r="#"+a,o=t.element.find(r),o.length||(o=t._createPanel(a),o.insertAfter(t.panels[n-1]||t.tablist)),o.attr("aria-live","polite")),o.length&&(t.panels=t.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.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),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(t){return e("<div>").attr("id",t).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(t){var n,i,r;for(e.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1),r=0;i=this.tabs[r];r++)n=e(i),t===!0||e.inArray(r,t)!==-1?(n.attr("aria-disabled","true"),this._addClass(n,null,"ui-state-disabled")):(n.removeAttr("aria-disabled"),this._removeClass(n,null,"ui-state-disabled"));this.options.disabled=t,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,t===!0)},_setupEvents:function(t){var n={};t&&e.each(t.split(" "),function(e,t){n[t]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(e){e.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(t){var n,i=this.element.parent();"fill"===t?(n=i.height(),n-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=e(this),i=t.css("position");"absolute"!==i&&"fixed"!==i&&(n-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){n-=e(this).outerHeight(!0)}),this.panels.each(function(){e(this).height(Math.max(0,n-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===t&&(n=0,this.panels.each(function(){n=Math.max(n,e(this).height("").height())}).height(n))},_eventHandler:function(t){var n=this.options,i=this.active,r=e(t.currentTarget),o=r.closest("li"),a=o[0]===i[0],s=a&&n.collapsible,l=s?e():this._getPanelForTab(o),u=i.length?this._getPanelForTab(i):e(),c={oldTab:i,oldPanel:u,newTab:s?e():o,newPanel:l};t.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||a&&!n.collapsible||this._trigger("beforeActivate",t,c)===!1||(n.active=!s&&this.tabs.index(o),this.active=a?e():o,this.xhr&&this.xhr.abort(),u.length||l.length||e.error("jQuery UI Tabs: Mismatching fragment identifier."),l.length&&this.load(this.tabs.index(o),t),this._toggle(t,c))},_toggle:function(t,n){function i(){o.running=!1,o._trigger("activate",t,n)}function r(){o._addClass(n.newTab.closest("li"),"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(){o._removeClass(n.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),r()}):(this._removeClass(n.oldTab.closest("li"),"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===e(this).attr("tabIndex")}).attr("tabIndex",-1),a.attr("aria-hidden","false"),n.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var n,i=this._findActive(t);i[0]!==this.active[0]&&(i.length||(i=this.active),n=i.find(".ui-tabs-anchor")[0],this._eventHandler({target:n,currentTarget:n,preventDefault:e.noop}))},_findActive:function(t){return t===!1?e():this.tabs.eq(t)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+e.ui.escapeSelector(t)+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){e.data(this,"ui-tabs-destroy")?e(this).remove():e(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var t=e(this),n=t.data("ui-tabs-aria-controls");n?t.attr("aria-controls",n).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(t){var n=this.options.disabled;n!==!1&&(void 0===t?n=!1:(t=this._getIndex(t),n=e.isArray(n)?e.map(n,function(e){return e!==t?e:null}):e.map(this.tabs,function(e,n){return n!==t?n:null})),this._setOptionDisabled(n))},disable:function(t){var n=this.options.disabled;if(n!==!0){if(void 0===t)n=!0;else{if(t=this._getIndex(t),e.inArray(t,n)!==-1)return;n=e.isArray(n)?e.merge([t],n).sort():[t]}this._setOptionDisabled(n)}},load:function(t,n){t=this._getIndex(t);var i=this,r=this.tabs.eq(t),o=r.find(".ui-tabs-anchor"),a=this._getPanelForTab(r),s={tab:r,panel:a},l=function(e,t){"abort"===t&&i.panels.stop(!1,!0),i._removeClass(r,"ui-tabs-loading"),a.removeAttr("aria-busy"),e===i.xhr&&delete i.xhr};this._isLocal(o[0])||(this.xhr=e.ajax(this._ajaxSettings(o,n,s)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(r,"ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.done(function(e,t,r){setTimeout(function(){a.html(e),i._trigger("load",n,s),l(r,t)},1)}).fail(function(e,t){setTimeout(function(){l(e,t)},1)})))},_ajaxSettings:function(t,n,i){var r=this;return{url:t.attr("href"),beforeSend:function(t,o){return r._trigger("beforeLoad",n,e.extend({jqXHR:t,ajaxSettings:o},i))}}},_getPanelForTab:function(t){var n=e(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+n))}}),e.uiBackCompat!==!1&&e.widget("ui.tabs",e.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}});e.ui.tabs;/*!
 * jQuery UI Tooltip 1.12.0
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */
e.widget("ui.tooltip",{version:"1.12.0",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var t=e(this).attr("title")||"";return e("<a>").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(t,n){var i=(t.attr("aria-describedby")||"").split(/\s+/);i.push(n),t.data("ui-tooltip-id",n).attr("aria-describedby",e.trim(i.join(" ")))},_removeDescribedBy:function(t){var n=t.data("ui-tooltip-id"),i=(t.attr("aria-describedby")||"").split(/\s+/),r=e.inArray(n,i);r!==-1&&i.splice(r,1),t.removeData("ui-tooltip-id"),i=e.trim(i.join(" ")),i?t.attr("aria-describedby",i):t.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=e("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=e([])},_setOption:function(t,n){var i=this;this._super(t,n),"content"===t&&e.each(this.tooltips,function(e,t){i._updateContent(t.element)})},_setOptionDisabled:function(e){this[e?"_disable":"_enable"]()},_disable:function(){var t=this;e.each(this.tooltips,function(n,i){var r=e.Event("blur");r.target=r.currentTarget=i.element[0],t.close(r,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var t=e(this);if(t.is("[title]"))return t.data("ui-tooltip-title",t.attr("title")).removeAttr("title")}))},_enable:function(){this.disabledTitles.each(function(){var t=e(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))}),this.disabledTitles=e([])},open:function(t){var n=this,i=e(t?t.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),t&&"mouseover"===t.type&&i.parents().each(function(){var t,i=e(this);i.data("ui-tooltip-open")&&(t=e.Event("blur"),t.target=t.currentTarget=this,n.close(t,!0)),i.attr("title")&&(i.uniqueId(),n.parents[this.id]={element:this,title:i.attr("title")},i.attr("title",""))}),this._registerCloseHandlers(t,i),this._updateContent(i,t))},_updateContent:function(e,t){var n,i=this.options.content,r=this,o=t?t.type:null;return"string"==typeof i||i.nodeType||i.jquery?this._open(t,e,i):(n=i.call(e[0],function(n){r._delay(function(){e.data("ui-tooltip-open")&&(t&&(t.type=o),this._open(t,e,n))})}),void(n&&this._open(t,e,n)))},_open:function(t,n,i){function r(e){u.of=e,a.is(":hidden")||a.position(u)}var o,a,s,l,u=e.extend({},this.options.position);if(i){if(o=this._find(n))return void o.tooltip.find(".ui-tooltip-content").html(i);n.is("[title]")&&(t&&"mouseover"===t.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(),l=e("<div>").html(a.find(".ui-tooltip-content").html()),l.removeAttr("name").find("[name]").removeAttr("name"),l.removeAttr("id").find("[id]").removeAttr("id"),l.appendTo(this.liveRegion),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:r}),r(t)):a.position(e.extend({of:n},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(s=this.delayedShow=setInterval(function(){a.is(":visible")&&(r(u.of),clearInterval(s))},e.fx.interval)),this._trigger("open",t,{tooltip:a})}},_registerCloseHandlers:function(t,n){var i={keyup:function(t){if(t.keyCode===e.ui.keyCode.ESCAPE){var i=e.Event(t);i.currentTarget=n[0],this.close(i,!0)}}};n[0]!==this.element[0]&&(i.remove=function(){this._removeTooltip(this._find(n).tooltip)}),t&&"mouseover"!==t.type||(i.mouseleave="close"),t&&"focusin"!==t.type||(i.focusout="close"),this._on(!0,n,i)},close:function(t){var n,i=this,r=e(t?t.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(e(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"),t&&"mouseleave"===t.type&&e.each(this.parents,function(t,n){e(n.element).attr("title",n.title),delete i.parents[t]}),o.closing=!0,this._trigger("close",t,{tooltip:n}),o.hiding||(o.closing=!1)))):void r.removeData("ui-tooltip-open")},_tooltip:function(t){var n=e("<div>").attr("role","tooltip"),i=e("<div>").appendTo(n),r=n.uniqueId().attr("id");return this._addClass(i,"ui-tooltip-content"),this._addClass(n,"ui-tooltip","ui-widget ui-widget-content"),n.appendTo(this._appendTo(t)),this.tooltips[r]={element:t,tooltip:n}},_find:function(e){var t=e.data("ui-tooltip-id");return t?this.tooltips[t]:null},_removeTooltip:function(e){e.remove(),delete this.tooltips[e.attr("id")]},_appendTo:function(e){var t=e.closest(".ui-front, dialog");return t.length||(t=this.document[0].body),t},_destroy:function(){var t=this;e.each(this.tooltips,function(n,i){var r=e.Event("blur"),o=i.element;r.target=r.currentTarget=o[0],t.close(r,!0),e("#"+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()}}),e.uiBackCompat!==!1&&e.widget("ui.tooltip",e.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var e=this._superApply(arguments);return this.options.tooltipClass&&e.tooltip.addClass(this.options.tooltipClass),e}});e.ui.tooltip}),/**
 * @license AngularJS v1.5.8
 * (c) 2010-2016 Google, Inc. http://angularjs.org
 * License: MIT
 */
function(e){"use strict";function t(e,t){return t=t||Error,function(){var n,i,r=2,o=arguments,a=o[0],s="["+(e?e+":":"")+a+"] ",l=o[1];for(s+=l.replace(/\{\d+\}/g,function(e){var t=+e.slice(1,-1),n=t+r;return n<o.length?ye(o[n]):e}),s+="\nhttp://errors.angularjs.org/1.5.8/"+(e?e+"/":"")+a,i=r,n="?";i<o.length;i++,n="&")s+=n+"p"+(i-r)+"="+encodeURIComponent(ye(o[i]));return new t(s)}}function n(e){if(null==e||A(e))return!1;if(Vi(e)||E(e)||Fi&&e instanceof Fi)return!0;var t="length"in Object(e)&&e.length;return x(t)&&(t>=0&&(t-1 in e||e instanceof Array)||"function"==typeof e.item)}function i(e,t,r){var o,a;if(e)if(T(e))for(o in e)"prototype"==o||"length"==o||"name"==o||e.hasOwnProperty&&!e.hasOwnProperty(o)||t.call(r,e[o],o,e);else if(Vi(e)||n(e)){var s="object"!=typeof e;for(o=0,a=e.length;o<a;o++)(s||o in e)&&t.call(r,e[o],o,e)}else if(e.forEach&&e.forEach!==i)e.forEach(t,r,e);else if(_(e))for(o in e)t.call(r,e[o],o,e);else if("function"==typeof e.hasOwnProperty)for(o in e)e.hasOwnProperty(o)&&t.call(r,e[o],o,e);else for(o in e)Mi.call(e,o)&&t.call(r,e[o],o,e);return e}function r(e,t,n){for(var i=Object.keys(e).sort(),r=0;r<i.length;r++)t.call(n,e[i[r]],i[r]);return i}function o(e){return function(t,n){e(n,t)}}function a(){return++Xi}function s(e,t){t?e.$$hashKey=t:delete e.$$hashKey}function l(e,t,n){for(var i=e.$$hashKey,r=0,o=t.length;r<o;++r){var a=t[r];if(b(a)||T(a))for(var u=Object.keys(a),c=0,f=u.length;c<f;c++){var h=u[c],d=a[h];n&&b(d)?w(d)?e[h]=new Date(d.valueOf()):S(d)?e[h]=new RegExp(d):d.nodeName?e[h]=d.cloneNode(!0):$(d)?e[h]=d.clone():(b(e[h])||(e[h]=Vi(d)?[]:{}),l(e[h],[d],!0)):e[h]=d}}return s(e,i),e}function u(e){return l(e,Hi.call(arguments,1),!1)}function c(e){return l(e,Hi.call(arguments,1),!0)}function f(e){return parseInt(e,10)}function h(e,t){return u(Object.create(e),t)}function d(){}function p(e){return e}function g(e){return function(){return e}}function m(e){return T(e.toString)&&e.toString!==qi}function v(e){return"undefined"==typeof e}function y(e){return"undefined"!=typeof e}function b(e){return null!==e&&"object"==typeof e}function _(e){return null!==e&&"object"==typeof e&&!Wi(e)}function E(e){return"string"==typeof e}function x(e){return"number"==typeof e}function w(e){return"[object Date]"===qi.call(e)}function T(e){return"function"==typeof e}function S(e){return"[object RegExp]"===qi.call(e)}function A(e){return e&&e.window===e}function C(e){return e&&e.$evalAsync&&e.$watch}function k(e){return"[object File]"===qi.call(e)}function O(e){return"[object FormData]"===qi.call(e)}function I(e){return"[object Blob]"===qi.call(e)}function N(e){return"boolean"==typeof e}function M(e){return e&&T(e.then)}function D(e){return e&&x(e.length)&&Ki.test(qi.call(e))}function L(e){return"[object ArrayBuffer]"===qi.call(e)}function $(e){return!(!e||!(e.nodeName||e.prop&&e.attr&&e.find))}function R(e){var t,n={},i=e.split(",");for(t=0;t<i.length;t++)n[i[t]]=!0;return n}function P(e){return Di(e.nodeName||e[0]&&e[0].nodeName)}function F(e,t){var n=e.indexOf(t);return n>=0&&e.splice(n,1),n}function U(e,t){function n(e,t){var n,i=t.$$hashKey;if(Vi(e))for(var o=0,a=e.length;o<a;o++)t.push(r(e[o]));else if(_(e))for(n in e)t[n]=r(e[n]);else if(e&&"function"==typeof e.hasOwnProperty)for(n in e)e.hasOwnProperty(n)&&(t[n]=r(e[n]));else for(n in e)Mi.call(e,n)&&(t[n]=r(e[n]));return s(t,i),t}function r(e){if(!b(e))return e;var t=a.indexOf(e);if(t!==-1)return l[t];if(A(e)||C(e))throw Yi("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");var i=!1,r=o(e);return void 0===r&&(r=Vi(e)?[]:Object.create(Wi(e)),i=!0),a.push(e),l.push(r),i?n(e,r):r}function o(e){switch(qi.call(e)){case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Float32Array]":case"[object Float64Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return new e.constructor(r(e.buffer),e.byteOffset,e.length);case"[object ArrayBuffer]":if(!e.slice){var t=new ArrayBuffer(e.byteLength);return new Uint8Array(t).set(new Uint8Array(e)),t}return e.slice(0);case"[object Boolean]":case"[object Number]":case"[object String]":case"[object Date]":return new e.constructor(e.valueOf());case"[object RegExp]":var n=new RegExp(e.source,e.toString().match(/[^\/]*$/)[0]);return n.lastIndex=e.lastIndex,n;case"[object Blob]":return new e.constructor([e],{type:e.type})}if(T(e.cloneNode))return e.cloneNode(!0)}var a=[],l=[];if(t){if(D(t)||L(t))throw Yi("cpta","Can't copy! TypedArray destination cannot be mutated.");if(e===t)throw Yi("cpi","Can't copy! Source and destination are identical.");return Vi(t)?t.length=0:i(t,function(e,n){"$$hashKey"!==n&&delete t[n]}),a.push(e),l.push(t),n(e,t)}return r(e)}function j(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!==e&&t!==t)return!0;var n,i,r,o=typeof e,a=typeof t;if(o==a&&"object"==o){if(!Vi(e)){if(w(e))return!!w(t)&&j(e.getTime(),t.getTime());if(S(e))return!!S(t)&&e.toString()==t.toString();if(C(e)||C(t)||A(e)||A(t)||Vi(t)||w(t)||S(t))return!1;r=pe();for(i in e)if("$"!==i.charAt(0)&&!T(e[i])){if(!j(e[i],t[i]))return!1;r[i]=!0}for(i in t)if(!(i in r)&&"$"!==i.charAt(0)&&y(t[i])&&!T(t[i]))return!1;return!0}if(!Vi(t))return!1;if((n=e.length)==t.length){for(i=0;i<n;i++)if(!j(e[i],t[i]))return!1;return!0}}return!1}function H(e,t,n){return e.concat(Hi.call(t,n))}function z(e,t){return Hi.call(e,t||0)}function B(e,t){var n=arguments.length>2?z(arguments,2):[];return!T(t)||t instanceof RegExp?t:n.length?function(){return arguments.length?t.apply(e,H(n,arguments,0)):t.apply(e,n)}:function(){return arguments.length?t.apply(e,arguments):t.call(e)}}function q(t,n){var i=n;return"string"==typeof t&&"$"===t.charAt(0)&&"$"===t.charAt(1)?i=void 0:A(n)?i="$WINDOW":n&&e.document===n?i="$DOCUMENT":C(n)&&(i="$SCOPE"),i}function W(e,t){if(!v(e))return x(t)||(t=t?2:null),JSON.stringify(e,q,t)}function Y(e){return E(e)?JSON.parse(e):e}function G(e,t){e=e.replace(tr,"");var n=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return isNaN(n)?t:n}function X(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function V(e,t,n){n=n?-1:1;var i=e.getTimezoneOffset(),r=G(t,i);return X(e,n*(r-i))}function K(e){e=Fi(e).clone();try{e.empty()}catch(t){}var n=Fi("<div>").append(e).html();try{return e[0].nodeType===sr?Di(n):n.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(e,t){return"<"+Di(t)})}catch(t){return Di(n)}}function Z(e){try{return decodeURIComponent(e)}catch(t){}}function Q(e){var t={};return i((e||"").split("&"),function(e){var n,i,r;e&&(i=e=e.replace(/\+/g,"%20"),n=e.indexOf("="),n!==-1&&(i=e.substring(0,n),r=e.substring(n+1)),i=Z(i),y(i)&&(r=!y(r)||Z(r),Mi.call(t,i)?Vi(t[i])?t[i].push(r):t[i]=[t[i],r]:t[i]=r))}),t}function J(e){var t=[];return i(e,function(e,n){Vi(e)?i(e,function(e){t.push(te(n,!0)+(e===!0?"":"="+te(e,!0)))}):t.push(te(n,!0)+(e===!0?"":"="+te(e,!0)))}),t.length?t.join("&"):""}function ee(e){return te(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function te(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,t?"%20":"+")}function ne(e,t){var n,i,r=nr.length;for(i=0;i<r;++i)if(n=nr[i]+t,E(n=e.getAttribute(n)))return n;return null}function ie(e,t){var n,r,o={};i(nr,function(t){var i=t+"app";!n&&e.hasAttribute&&e.hasAttribute(i)&&(n=e,r=e.getAttribute(i))}),i(nr,function(t){var i,o=t+"app";!n&&(i=e.querySelector("["+o.replace(":","\\:")+"]"))&&(n=i,r=i.getAttribute(o))}),n&&(o.strictDi=null!==ne(n,"strict-di"),t(n,r?[r]:[],o))}function re(t,n,r){b(r)||(r={});var o={strictDi:!1};r=u(o,r);var a=function(){if(t=Fi(t),t.injector()){var i=t[0]===e.document?"document":K(t);throw Yi("btstrpd","App already bootstrapped with this element '{0}'",i.replace(/</,"&lt;").replace(/>/,"&gt;"))}n=n||[],n.unshift(["$provide",function(e){e.value("$rootElement",t)}]),r.debugInfoEnabled&&n.push(["$compileProvider",function(e){e.debugInfoEnabled(!0)}]),n.unshift("ng");var o=it(n,r.strictDi);return o.invoke(["$rootScope","$rootElement","$compile","$injector",function(e,t,n,i){e.$apply(function(){t.data("$injector",i),n(t)(e)})}]),o},s=/^NG_ENABLE_DEBUG_INFO!/,l=/^NG_DEFER_BOOTSTRAP!/;return e&&s.test(e.name)&&(r.debugInfoEnabled=!0,e.name=e.name.replace(s,"")),e&&!l.test(e.name)?a():(e.name=e.name.replace(l,""),Gi.resumeBootstrap=function(e){return i(e,function(e){n.push(e)}),a()},void(T(Gi.resumeDeferredBootstrap)&&Gi.resumeDeferredBootstrap()))}function oe(){e.name="NG_ENABLE_DEBUG_INFO!"+e.name,e.location.reload()}function ae(e){var t=Gi.element(e).injector();if(!t)throw Yi("test","no injector found for element argument to getTestability");return t.get("$$testability")}function se(e,t){return t=t||"_",e.replace(ir,function(e,n){return(n?t:"")+e.toLowerCase()})}function le(){var t;if(!rr){var n=er();Ui=v(n)?e.jQuery:n?e[n]:void 0,Ui&&Ui.fn.on?(Fi=Ui,u(Ui.fn,{scope:Ar.scope,isolateScope:Ar.isolateScope,controller:Ar.controller,injector:Ar.injector,inheritedData:Ar.inheritedData}),t=Ui.cleanData,Ui.cleanData=function(e){for(var n,i,r=0;null!=(i=e[r]);r++)n=Ui._data(i,"events"),n&&n.$destroy&&Ui(i).triggerHandler("$destroy");t(e)}):Fi=Oe,Gi.element=Fi,rr=!0}}function ue(e,t,n){if(!e)throw Yi("areq","Argument '{0}' is {1}",t||"?",n||"required");return e}function ce(e,t,n){return n&&Vi(e)&&(e=e[e.length-1]),ue(T(e),t,"not a function, got "+(e&&"object"==typeof e?e.constructor.name||"Object":typeof e)),e}function fe(e,t){if("hasOwnProperty"===e)throw Yi("badname","hasOwnProperty is not a valid {0} name",t)}function he(e,t,n){if(!t)return e;for(var i,r=t.split("."),o=e,a=r.length,s=0;s<a;s++)i=r[s],e&&(e=(o=e)[i]);return!n&&T(e)?B(o,e):e}function de(e){for(var t,n=e[0],i=e[e.length-1],r=1;n!==i&&(n=n.nextSibling);r++)(t||e[r]!==n)&&(t||(t=Fi(Hi.call(e,0,r))),t.push(n));return t||e}function pe(){return Object.create(null)}function ge(e){function n(e,t,n){return e[t]||(e[t]=n())}var i=t("$injector"),r=t("ng"),o=n(e,"angular",Object);return o.$$minErr=o.$$minErr||t,n(o,"module",function(){var e={};return function(t,o,a){var s=function(e,t){if("hasOwnProperty"===e)throw r("badname","hasOwnProperty is not a valid {0} name",t)};return s(t,"module"),o&&e.hasOwnProperty(t)&&(e[t]=null),n(e,t,function(){function e(e,t,n,i){return i||(i=r),function(){return i[n||"push"]([e,t,arguments]),c}}function n(e,n){return function(i,o){return o&&T(o)&&(o.$$moduleName=t),r.push([e,n,arguments]),c}}if(!o)throw i("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.",t);var r=[],s=[],l=[],u=e("$injector","invoke","push",s),c={_invokeQueue:r,_configBlocks:s,_runBlocks:l,requires:o,name:t,provider:n("$provide","provider"),factory:n("$provide","factory"),service:n("$provide","service"),value:e("$provide","value"),constant:e("$provide","constant","unshift"),decorator:n("$provide","decorator"),animation:n("$animateProvider","register"),filter:n("$filterProvider","register"),controller:n("$controllerProvider","register"),directive:n("$compileProvider","directive"),component:n("$compileProvider","component"),config:u,run:function(e){return l.push(e),this}};return a&&u(a),c})}})}function me(e,t){if(Vi(e)){t=t||[];for(var n=0,i=e.length;n<i;n++)t[n]=e[n]}else if(b(e)){t=t||{};for(var r in e)"$"===r.charAt(0)&&"$"===r.charAt(1)||(t[r]=e[r])}return t||e}function ve(e){var t=[];return JSON.stringify(e,function(e,n){if(n=q(e,n),b(n)){if(t.indexOf(n)>=0)return"...";t.push(n)}return n})}function ye(e){return"function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):v(e)?"undefined":"string"!=typeof e?ve(e):e}function be(n){u(n,{bootstrap:re,copy:U,extend:u,merge:c,equals:j,element:Fi,forEach:i,injector:it,noop:d,bind:B,toJson:W,fromJson:Y,identity:p,isUndefined:v,isDefined:y,isString:E,isFunction:T,isObject:b,isNumber:x,isElement:$,isArray:Vi,version:fr,isDate:w,lowercase:Di,uppercase:Li,callbacks:{$$counter:0},getTestability:ae,$$minErr:t,$$csp:Ji,reloadWithDebugInfo:oe}),(ji=ge(e))("ng",["ngLocale"],["$provide",function(e){e.provider({$$sanitizeUri:Sn}),e.provider("$compile",pt).directive({a:$o,input:ea,textarea:ea,form:jo,script:Va,select:Qa,style:es,option:Ja,ngBind:ia,ngBindHtml:oa,ngBindTemplate:ra,ngClass:sa,ngClassEven:ua,ngClassOdd:la,ngCloak:ca,ngController:fa,ngForm:Ho,ngHide:za,ngIf:pa,ngInclude:ga,ngInit:va,ngNonBindable:Da,ngPluralize:Pa,ngRepeat:Fa,ngShow:Ha,ngStyle:Ba,ngSwitch:qa,ngSwitchWhen:Wa,ngSwitchDefault:Ya,ngOptions:Ra,ngTransclude:Xa,ngModel:Ia,ngList:ya,ngChange:aa,pattern:ns,ngPattern:ns,required:ts,ngRequired:ts,minlength:rs,ngMinlength:rs,maxlength:is,ngMaxlength:is,ngValue:na,ngModelOptions:Ma}).directive({ngInclude:ma}).directive(Ro).directive(ha),e.provider({$anchorScroll:rt,$animate:zr,$animateCss:Wr,$$animateJs:jr,$$animateQueue:Hr,$$AnimateRunner:qr,$$animateAsyncRun:Br,$browser:ct,$cacheFactory:ft,$controller:_t,$document:Et,$exceptionHandler:xt,$filter:Un,$$forceReflow:Zr,$interpolate:Rt,$interval:Pt,$http:Mt,$httpParamSerializer:Tt,$httpParamSerializerJQLike:St,$httpBackend:Lt,$xhrFactory:Dt,$jsonpCallbacks:ao,$location:Qt,$log:Jt,$parse:bn,$rootScope:Tn,$q:_n,$$q:En,$sce:On,$sceDelegate:kn,$sniffer:In,$templateCache:ht,$templateRequest:Nn,$$testability:Mn,$timeout:Dn,$window:Rn,$$rAF:wn,$$jqLite:Ke,$$HashMap:Ir,$$cookieReader:Fn})}])}function _e(){return++dr}function Ee(e){return e.replace(mr,function(e,t,n,i){return i?n.toUpperCase():n}).replace(vr,"Moz$1")}function xe(e){return!Er.test(e)}function we(e){var t=e.nodeType;return t===or||!t||t===ur}function Te(e){for(var t in hr[e.ng339])return!0;return!1}function Se(e){for(var t=0,n=e.length;t<n;t++)De(e[t])}function Ae(e,t){var n,r,o,a,s=t.createDocumentFragment(),l=[];if(xe(e))l.push(t.createTextNode(e));else{for(n=s.appendChild(t.createElement("div")),r=(xr.exec(e)||["",""])[1].toLowerCase(),o=Tr[r]||Tr._default,n.innerHTML=o[1]+e.replace(wr,"<$1></$2>")+o[2],a=o[0];a--;)n=n.lastChild;l=H(l,n.childNodes),n=s.firstChild,n.textContent=""}return s.textContent="",s.innerHTML="",i(l,function(e){s.appendChild(e)}),s}function Ce(t,n){n=n||e.document;var i;return(i=_r.exec(t))?[n.createElement(i[1])]:(i=Ae(t,n))?i.childNodes:[]}function ke(e,t){var n=e.parentNode;n&&n.replaceChild(t,e),t.appendChild(e)}function Oe(e){if(e instanceof Oe)return e;var t;if(E(e)&&(e=Zi(e),t=!0),!(this instanceof Oe)){if(t&&"<"!=e.charAt(0))throw br("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new Oe(e)}t?Ue(this,Ce(e)):Ue(this,e)}function Ie(e){return e.cloneNode(!0)}function Ne(e,t){if(t||De(e),e.querySelectorAll)for(var n=e.querySelectorAll("*"),i=0,r=n.length;i<r;i++)De(n[i])}function Me(e,t,n,r){if(y(r))throw br("offargs","jqLite#off() does not support the `selector` argument");var o=Le(e),a=o&&o.events,s=o&&o.handle;if(s)if(t){var l=function(t){var i=a[t];y(n)&&F(i||[],n),y(n)&&i&&i.length>0||(gr(e,t,s),delete a[t])};i(t.split(" "),function(e){l(e),yr[e]&&l(yr[e])})}else for(t in a)"$destroy"!==t&&gr(e,t,s),delete a[t]}function De(e,t){var n=e.ng339,i=n&&hr[n];if(i){if(t)return void delete i.data[t];i.handle&&(i.events.$destroy&&i.handle({},"$destroy"),Me(e)),delete hr[n],e.ng339=void 0}}function Le(e,t){var n=e.ng339,i=n&&hr[n];return t&&!i&&(e.ng339=n=_e(),i=hr[n]={events:{},data:{},handle:void 0}),i}function $e(e,t,n){if(we(e)){var i=y(n),r=!i&&t&&!b(t),o=!t,a=Le(e,!r),s=a&&a.data;if(i)s[t]=n;else{if(o)return s;if(r)return s&&s[t];u(s,t)}}}function Re(e,t){return!!e.getAttribute&&(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")>-1}function Pe(e,t){t&&e.setAttribute&&i(t.split(" "),function(t){e.setAttribute("class",Zi((" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+Zi(t)+" "," ")))})}function Fe(e,t){if(t&&e.setAttribute){var n=(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");i(t.split(" "),function(e){e=Zi(e),n.indexOf(" "+e+" ")===-1&&(n+=e+" ")}),e.setAttribute("class",Zi(n))}}function Ue(e,t){if(t)if(t.nodeType)e[e.length++]=t;else{var n=t.length;if("number"==typeof n&&t.window!==t){if(n)for(var i=0;i<n;i++)e[e.length++]=t[i]}else e[e.length++]=t}}function je(e,t){return He(e,"$"+(t||"ngController")+"Controller")}function He(e,t,n){e.nodeType==ur&&(e=e.documentElement);for(var i=Vi(t)?t:[t];e;){for(var r=0,o=i.length;r<o;r++)if(y(n=Fi.data(e,i[r])))return n;e=e.parentNode||e.nodeType===cr&&e.host}}function ze(e){for(Ne(e,!0);e.firstChild;)e.removeChild(e.firstChild)}function Be(e,t){t||Ne(e);var n=e.parentNode;n&&n.removeChild(e)}function qe(t,n){n=n||e,"complete"===n.document.readyState?n.setTimeout(t):Fi(n).on("load",t)}function We(e,t){var n=Cr[t.toLowerCase()];return n&&kr[P(e)]&&n}function Ye(e){return Or[e]}function Ge(e,t){var n=function(n,i){n.isDefaultPrevented=function(){return n.defaultPrevented};var r=t[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};var s=r.specialHandlerWrapper||Xe;o>1&&(r=me(r));for(var l=0;l<o;l++)n.isImmediatePropagationStopped()||s(e,n,r[l])}};return n.elem=e,n}function Xe(e,t,n){n.call(e,t)}function Ve(e,t,n){var i=t.relatedTarget;i&&(i===e||Sr.call(e,i))||n.call(e,t)}function Ke(){this.$get=function(){return u(Oe,{hasClass:function(e,t){return e.attr&&(e=e[0]),Re(e,t)},addClass:function(e,t){return e.attr&&(e=e[0]),Fe(e,t)},removeClass:function(e,t){return e.attr&&(e=e[0]),Pe(e,t)}})}}function Ze(e,t){var n=e&&e.$$hashKey;if(n)return"function"==typeof n&&(n=e.$$hashKey()),n;var i=typeof e;return n="function"==i||"object"==i&&null!==e?e.$$hashKey=i+":"+(t||a)():i+":"+e}function Qe(e,t){if(t){var n=0;this.nextUid=function(){return++n}}i(e,this.put,this)}function Je(e){return Function.prototype.toString.call(e)+" "}function et(e){var t=Je(e).replace($r,""),n=t.match(Nr)||t.match(Mr);return n}function tt(e){var t=et(e);return t?"function("+(t[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function nt(e,t,n){var r,o,a;if("function"==typeof e){if(!(r=e.$inject)){if(r=[],e.length){if(t)throw E(n)&&n||(n=e.name||tt(e)),Rr("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",n);o=et(e),i(o[1].split(Dr),function(e){e.replace(Lr,function(e,t,n){r.push(n)})})}e.$inject=r}}else Vi(e)?(a=e.length-1,ce(e[a],"fn"),r=e.slice(0,a)):ce(e,"fn",!0);return r}function it(e,t){function n(e){return function(t,n){return b(t)?void i(t,o(e)):e(t,n)}}function r(e,t){if(fe(e,"service"),(T(t)||Vi(t))&&(t=w.instantiate(t)),!t.$get)throw Rr("pget","Provider '{0}' must define $get factory method.",e);return x[e+m]=t}function a(e,t){return function(){var n=C.invoke(t,this);if(v(n))throw Rr("undef","Provider '{0}' must return a value from $get factory method.",e);return n}}function s(e,t,n){return r(e,{$get:n!==!1?a(e,t):t})}function l(e,t){return s(e,["$injector",function(e){return e.instantiate(t)}])}function u(e,t){return s(e,g(t),!1)}function c(e,t){fe(e,"constant"),x[e]=t,S[e]=t}function f(e,t){var n=w.get(e+m),i=n.$get;n.$get=function(){var e=C.invoke(i,n);return C.invoke(t,null,{$delegate:e})}}function h(e){ue(v(e)||Vi(e),"modulesToLoad","not an array");var t,n=[];return i(e,function(e){function i(e){var t,n;for(t=0,n=e.length;t<n;t++){var i=e[t],r=w.get(i[0]);r[i[1]].apply(r,i[2])}}if(!_.get(e)){_.put(e,!0);try{E(e)?(t=ji(e),n=n.concat(h(t.requires)).concat(t._runBlocks),i(t._invokeQueue),i(t._configBlocks)):T(e)?n.push(w.invoke(e)):Vi(e)?n.push(w.invoke(e)):ce(e,"module")}catch(r){throw Vi(e)&&(e=e[e.length-1]),r.message&&r.stack&&r.stack.indexOf(r.message)==-1&&(r=r.message+"\n"+r.stack),Rr("modulerr","Failed to instantiate module {0} due to:\n{1}",e,r.stack||r.message||r)}}}),n}function d(e,n){function i(t,i){if(e.hasOwnProperty(t)){if(e[t]===p)throw Rr("cdep","Circular dependency found: {0}",t+" <- "+y.join(" <- "));return e[t]}try{return y.unshift(t),e[t]=p,e[t]=n(t,i)}catch(r){throw e[t]===p&&delete e[t],r}finally{y.shift()}}function r(e,n,r){for(var o=[],a=it.$$annotate(e,t,r),s=0,l=a.length;s<l;s++){var u=a[s];if("string"!=typeof u)throw Rr("itkn","Incorrect injection token! Expected service name as string, got {0}",u);o.push(n&&n.hasOwnProperty(u)?n[u]:i(u,r))}return o}function o(e){return!(Pi<=11)&&("function"==typeof e&&/^(?:class\b|constructor\()/.test(Je(e)))}function a(e,t,n,i){"string"==typeof n&&(i=n,n=null);var a=r(e,n,i);return Vi(e)&&(e=e[e.length-1]),o(e)?(a.unshift(null),new(Function.prototype.bind.apply(e,a))):e.apply(t,a)}function s(e,t,n){var i=Vi(e)?e[e.length-1]:e,o=r(e,t,n);return o.unshift(null),new(Function.prototype.bind.apply(i,o))}return{invoke:a,instantiate:s,get:i,annotate:it.$$annotate,has:function(t){return x.hasOwnProperty(t+m)||e.hasOwnProperty(t)}}}t=t===!0;var p={},m="Provider",y=[],_=new Qe([],(!0)),x={$provide:{provider:n(r),factory:n(s),service:n(l),value:n(u),constant:n(c),decorator:f}},w=x.$injector=d(x,function(e,t){throw Gi.isString(t)&&y.push(t),Rr("unpr","Unknown provider: {0}",y.join(" <- "))}),S={},A=d(S,function(e,t){var n=w.get(e+m,t);return C.invoke(n.$get,n,void 0,e)}),C=A;x["$injector"+m]={$get:g(A)};var k=h(e);return C=A.get("$injector"),C.strictDi=t,i(k,function(e){e&&C.invoke(e)}),C}function rt(){var e=!0;this.disableAutoScrolling=function(){e=!1},this.$get=["$window","$location","$rootScope",function(t,n,i){function r(e){var t=null;return Array.prototype.some.call(e,function(e){if("a"===P(e))return t=e,!0}),t}function o(){var e=s.yOffset;if(T(e))e=e();else if($(e)){var n=e[0],i=t.getComputedStyle(n);e="fixed"!==i.position?0:n.getBoundingClientRect().bottom}else x(e)||(e=0);return e}function a(e){if(e){e.scrollIntoView();var n=o();if(n){var i=e.getBoundingClientRect().top;t.scrollBy(0,i-n)}}else t.scrollTo(0,0)}function s(e){e=E(e)?e:n.hash();var t;e?(t=l.getElementById(e))?a(t):(t=r(l.getElementsByName(e)))?a(t):"top"===e&&a(null):a(null)}var l=t.document;return e&&i.$watch(function(){return n.hash()},function(e,t){e===t&&""===e||qe(function(){i.$evalAsync(s)})}),s}]}function ot(e,t){return e||t?e?t?(Vi(e)&&(e=e.join(" ")),Vi(t)&&(t=t.join(" ")),e+" "+t):e:t:""}function at(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.nodeType===Fr)return n}}function st(e){E(e)&&(e=e.split(" "));var t=pe();return i(e,function(e){e.length&&(t[e]=!0)}),t}function lt(e){return b(e)?e:{}}function ut(e,t,n,r){function o(e){try{e.apply(null,z(arguments,1))}finally{if(y--,0===y)for(;b.length;)try{b.pop()()}catch(t){n.error(t)}}}function a(e){var t=e.indexOf("#");return t===-1?"":e.substr(t)}function s(){T=null,l(),u()}function l(){_=S(),_=v(_)?null:_,j(_,k)&&(_=k),k=_}function u(){x===c.url()&&E===_||(x=c.url(),E=_,i(A,function(e){e(c.url(),_)}))}var c=this,f=e.location,h=e.history,p=e.setTimeout,g=e.clearTimeout,m={};c.isMock=!1;var y=0,b=[];c.$$completeOutstandingRequest=o,c.$$incOutstandingRequestCount=function(){y++},c.notifyWhenNoOutstandingRequests=function(e){0===y?e():b.push(e)};var _,E,x=f.href,w=t.find("base"),T=null,S=r.history?function(){try{return h.state}catch(e){}}:d;l(),E=_,c.url=function(t,n,i){if(v(i)&&(i=null),f!==e.location&&(f=e.location),h!==e.history&&(h=e.history),t){var o=E===i;if(x===t&&(!r.history||o))return c;var s=x&&Bt(x)===Bt(t);return x=t,E=i,!r.history||s&&o?(s||(T=t),n?f.replace(t):s?f.hash=a(t):f.href=t,f.href!==t&&(T=t)):(h[n?"replaceState":"pushState"](i,"",t),l(),E=_),T&&(T=t),c}return T||f.href.replace(/%27/g,"'")},c.state=function(){return _};var A=[],C=!1,k=null;c.onUrlChange=function(t){return C||(r.history&&Fi(e).on("popstate",s),Fi(e).on("hashchange",s),C=!0),A.push(t),t},c.$$applicationDestroyed=function(){Fi(e).off("hashchange popstate",s)},c.$$checkUrlChange=u,c.baseHref=function(){var e=w.attr("href");return e?e.replace(/^(https?\:)?\/\/[^\/]*/,""):""},c.defer=function(e,t){var n;return y++,n=p(function(){delete m[n],o(e)},t||0),m[n]=!0,n},c.defer.cancel=function(e){return!!m[e]&&(delete m[e],g(e),o(d),!0)}}function ct(){this.$get=["$window","$log","$sniffer","$document",function(e,t,n,i){return new ut(e,i,t,n)}]}function ft(){this.$get=function(){function e(e,i){function r(e){e!=h&&(d?d==e&&(d=e.n):d=e,o(e.n,e.p),o(e,h),h=e,h.n=null)}function o(e,t){e!=t&&(e&&(e.p=t),t&&(t.n=e))}if(e in n)throw t("$cacheFactory")("iid","CacheId '{0}' is already taken!",e);var a=0,s=u({},i,{id:e}),l=pe(),c=i&&i.capacity||Number.MAX_VALUE,f=pe(),h=null,d=null;return n[e]={put:function(e,t){if(!v(t)){if(c<Number.MAX_VALUE){var n=f[e]||(f[e]={key:e});r(n)}return e in l||a++,l[e]=t,a>c&&this.remove(d.key),t}},get:function(e){if(c<Number.MAX_VALUE){var t=f[e];if(!t)return;r(t)}return l[e]},remove:function(e){if(c<Number.MAX_VALUE){var t=f[e];if(!t)return;t==h&&(h=t.p),t==d&&(d=t.n),o(t.n,t.p),delete f[e]}e in l&&(delete l[e],a--)},removeAll:function(){l=pe(),a=0,f=pe(),h=d=null},destroy:function(){l=null,s=null,f=null,delete n[e]},info:function(){return u({},s,{size:a})}}}var n={};return e.info=function(){var e={};return i(n,function(t,n){e[n]=t.info()}),e},e.get=function(e){return n[e]},e}}function ht(){this.$get=["$cacheFactory",function(e){return e("templates")}]}function dt(){}function pt(t,n){function r(e,t,n){var r=/^\s*([@&<]|=(\*?))(\??)\s*(\w*)\s*$/,o=pe();return i(e,function(e,i){if(e in A)return void(o[i]=A[e]);var a=e.match(r);if(!a)throw Yr("iscp","Invalid {3} for directive '{0}'. Definition: {... {1}: '{2}' ...}",t,i,e,n?"controller bindings definition":"isolate scope definition");o[i]={mode:a[1][0],collection:"*"===a[2],optional:"?"===a[3],attrName:a[4]||i},a[4]&&(A[e]=o[i])}),o}function a(e,t){var n={isolateScope:null,bindToController:null};if(b(e.scope)&&(e.bindToController===!0?(n.bindToController=r(e.scope,t,!0),n.isolateScope={}):n.isolateScope=r(e.scope,t,!1)),b(e.bindToController)&&(n.bindToController=r(e.bindToController,t,!0)),b(n.bindToController)){var i=e.controller,o=e.controllerAs;if(!i)throw Yr("noctrl","Cannot bind to controller without directive '{0}'s controller.",t);if(!bt(i,o))throw Yr("noident","Cannot bind to controller without identifier for directive '{0}'.",t)}return n}function s(e){var t=e.charAt(0);if(!t||t!==Di(t))throw Yr("baddir","Directive/Component name '{0}' is invalid. The first character must be a lowercase letter",e);if(e!==e.trim())throw Yr("baddir","Directive/Component name '{0}' is invalid. The name should not contain leading or trailing whitespaces",e)}function l(e){var t=e.require||e.controller&&e.name;return!Vi(t)&&b(t)&&i(t,function(e,n){var i=e.match(w),r=e.substring(i[0].length);r||(t[n]=i[0]+n)}),t}var c={},f="Directive",m=/^\s*directive\:\s*([\w\-]+)\s+(.*)$/,_=/(([\w\-]+)(?:\:([^;]+))?;?)/,x=R("ngSrc,ngSrcset,src,srcset"),w=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,S=/^(on[a-z]+|formaction)$/,A=pe();this.directive=function I(e,n){return fe(e,"directive"),E(e)?(s(e),ue(n,"directiveFactory"),c.hasOwnProperty(e)||(c[e]=[],t.factory(e+f,["$injector","$exceptionHandler",function(t,n){var r=[];return i(c[e],function(i,o){try{var a=t.invoke(i);T(a)?a={compile:g(a)}:!a.compile&&a.link&&(a.compile=g(a.link)),a.priority=a.priority||0,a.index=o,a.name=a.name||e,a.require=l(a),a.restrict=a.restrict||"EA",a.$$moduleName=i.$$moduleName,r.push(a)}catch(s){n(s)}}),r}])),c[e].push(n)):i(e,o(I)),this},this.component=function(e,t){function n(e){function n(t){return T(t)||Vi(t)?function(n,i){return e.invoke(t,this,{$element:n,$attrs:i})}:t}var o=t.template||t.templateUrl?t.template:"",a={controller:r,controllerAs:bt(t.controller)||t.controllerAs||"$ctrl",template:n(o),templateUrl:n(t.templateUrl),transclude:t.transclude,scope:{},bindToController:t.bindings||{},restrict:"E",require:t.require};return i(t,function(e,t){"$"===t.charAt(0)&&(a[t]=e)}),a}var r=t.controller||function(){};return i(t,function(e,t){"$"===t.charAt(0)&&(n[t]=e,T(r)&&(r[t]=e))}),n.$inject=["$injector"],this.directive(e,n)},this.aHrefSanitizationWhitelist=function(e){return y(e)?(n.aHrefSanitizationWhitelist(e),this):n.aHrefSanitizationWhitelist()},this.imgSrcSanitizationWhitelist=function(e){return y(e)?(n.imgSrcSanitizationWhitelist(e),this):n.imgSrcSanitizationWhitelist()};var k=!0;this.debugInfoEnabled=function(e){return y(e)?(k=e,this):k};var O=10;this.onChangesTtl=function(e){return arguments.length?(O=e,this):O},this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$sce","$animate","$$sanitizeUri",function(t,n,r,o,s,l,g,A,I,M){function D(){try{if(!--we)throw be=void 0,Yr("infchng","{0} $onChanges() iterations reached. Aborting!\n",O);g.$apply(function(){for(var e=[],t=0,n=be.length;t<n;++t)try{be[t]()}catch(i){e.push(i)}if(be=void 0,e.length)throw e})}finally{we++}}function L(e,t){if(t){var n,i,r,o=Object.keys(t);for(n=0,i=o.length;n<i;n++)r=o[n],this[r]=t[r]}else this.$attr={};this.$$element=e}function $(e,t,n){Ee.innerHTML="<span "+t+">";var i=Ee.firstChild.attributes,r=i[0];i.removeNamedItem(r.name),r.value=n,e.attributes.setNamedItem(r)}function R(e,t){try{e.addClass(t)}catch(n){}}function U(t,n,i,r,o){t instanceof Fi||(t=Fi(t));for(var a=/\S+/,s=0,l=t.length;s<l;s++){var u=t[s];u.nodeType===sr&&u.nodeValue.match(a)&&ke(u,t[s]=e.document.createElement("span"))}var c=q(t,n,t,i,r,o);U.$$addScopeClass(t);var f=null;return function(e,n,i){ue(e,"scope"),o&&o.needsNewScope&&(e=e.$parent.$new()),i=i||{};var r=i.parentBoundTranscludeFn,a=i.transcludeControllers,s=i.futureParentElement;r&&r.$$boundTransclude&&(r=r.$$boundTransclude),f||(f=H(s));var l;if(l="html"!==f?Fi(fe(f,Fi("<div>").append(t).html())):n?Ar.clone.call(t):t,a)for(var u in a)l.data("$"+u+"Controller",a[u].instance);return U.$$addScopeInfo(l,e),n&&n(l,e),c&&c(e,l,l,r),l}}function H(e){var t=e&&e[0];return t&&"foreignobject"!==P(t)&&qi.call(t).match(/SVG/)?"svg":"html"}function q(e,t,n,i,r,o){function a(e,n,i,r){var o,a,s,l,u,c,f,h,g;if(d){var m=n.length;for(g=new Array(m),u=0;u<p.length;u+=3)f=p[u],g[f]=n[f]}else g=n;for(u=0,c=p.length;u<c;)s=g[p[u++]],o=p[u++],a=p[u++],o?(o.scope?(l=e.$new(),U.$$addScopeInfo(Fi(s),l)):l=e,h=o.transcludeOnThisElement?W(e,o.transclude,r):!o.templateOnThisElement&&r?r:!r&&t?W(e,t):null,o(a,l,s,i,h)):a&&a(e,s.childNodes,void 0,r)}for(var s,l,u,c,f,h,d,p=[],g=0;g<e.length;g++)s=new L,l=Y(e[g],[],s,0===g?i:void 0,r),u=l.length?Q(l,e[g],s,t,n,null,[],[],o):null,u&&u.scope&&U.$$addScopeClass(s.$$element),f=u&&u.terminal||!(c=e[g].childNodes)||!c.length?null:q(c,u?(u.transcludeOnThisElement||!u.templateOnThisElement)&&u.transclude:t),(u||f)&&(p.push(g,u,f),h=!0,d=d||u),o=null;return h?a:null}function W(e,t,n){function i(i,r,o,a,s){return i||(i=e.$new(!1,s),i.$$transcluded=!0),t(i,r,{parentBoundTranscludeFn:n,transcludeControllers:o,futureParentElement:a})}var r=i.$$slots=pe();for(var o in t.$$slots)t.$$slots[o]?r[o]=W(e,t.$$slots[o],n):r[o]=null;return i}function Y(e,t,n,i,r){var o,a,s=e.nodeType,l=n.$attr;switch(s){case or:ne(t,mt(P(e)),"E",i,r);for(var u,c,f,h,d,p,g=e.attributes,m=0,v=g&&g.length;m<v;m++){var y=!1,x=!1;u=g[m],c=u.name,d=Zi(u.value),h=mt(c),(p=Ce.test(h))&&(c=c.replace(Xr,"").substr(8).replace(/_(.)/g,function(e,t){return t.toUpperCase()}));var w=h.match(Oe);w&&ie(w[1])&&(y=c,x=c.substr(0,c.length-5)+"end",c=c.substr(0,c.length-6)),f=mt(c.toLowerCase()),l[f]=c,!p&&n.hasOwnProperty(f)||(n[f]=d,We(e,f)&&(n[f]=!0)),de(e,t,d,f,p),ne(t,f,"A",i,r,y,x)}if(a=e.className,b(a)&&(a=a.animVal),E(a)&&""!==a)for(;o=_.exec(a);)f=mt(o[2]),ne(t,f,"C",i,r)&&(n[f]=Zi(o[3])),a=a.substr(o.index+o[0].length);break;case sr:if(11===Pi)for(;e.parentNode&&e.nextSibling&&e.nextSibling.nodeType===sr;)e.nodeValue=e.nodeValue+e.nextSibling.nodeValue,e.parentNode.removeChild(e.nextSibling);ce(t,e.nodeValue);break;case lr:G(e,t,n,i,r)}return t.sort(ae),t}function G(e,t,n,i,r){try{var o=m.exec(e.nodeValue);if(o){var a=mt(o[1]);
ne(t,a,"M",i,r)&&(n[a]=Zi(o[2]))}}catch(s){}}function X(e,t,n){var i=[],r=0;if(t&&e.hasAttribute&&e.hasAttribute(t)){do{if(!e)throw Yr("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",t,n);e.nodeType==or&&(e.hasAttribute(t)&&r++,e.hasAttribute(n)&&r--),i.push(e),e=e.nextSibling}while(r>0)}else i.push(e);return Fi(i)}function V(e,t,n){return function(i,r,o,a,s){return r=X(r[0],t,n),e(i,r,o,a,s)}}function Z(e,t,n,i,r,o){var a;return e?U(t,n,i,r,o):function(){return a||(a=U(t,n,i,r,o),t=n=o=null),a.apply(this,arguments)}}function Q(e,t,n,o,a,s,l,c,f){function h(e,t,n,i){e&&(n&&(e=V(e,n,i)),e.require=p.require,e.directiveName=g,(S===p||p.$$isolateScope)&&(e=me(e,{isolateScope:!0})),l.push(e)),t&&(n&&(t=V(t,n,i)),t.require=p.require,t.directiveName=g,(S===p||p.$$isolateScope)&&(t=me(t,{isolateScope:!0})),c.push(t))}function d(e,o,a,s,f){function h(e,t,n,i){var r;if(C(e)||(i=n,n=t,t=e,e=void 0),N&&(r=_),n||(n=N?k.parent():k),!i)return f(e,t,r,n,F);var o=f.$$slots[i];if(o)return o(e,t,r,n,F);if(v(o))throw Yr("noslot",'No parent directive that requires a transclusion with slot name "{0}". Element: {1}',i,K(k))}var d,p,g,m,y,_,E,k,O,I;t===a?(O=n,k=n.$$element):(k=Fi(a),O=new L(k,n)),y=o,S?m=o.$new(!0):x&&(y=o.$parent),f&&(E=h,E.$$boundTransclude=f,E.isSlotFilled=function(e){return!!f.$$slots[e]}),w&&(_=ee(k,O,E,w,m,o,S)),S&&(U.$$addScopeInfo(k,m,!0,!(A&&(A===S||A===S.$$originalDirective))),U.$$addScopeClass(k,!0),m.$$isolateBindings=S.$$isolateBindings,I=ye(o,O,m,m.$$isolateBindings,S),I.removeWatches&&m.$on("$destroy",I.removeWatches));for(var M in _){var D=w[M],$=_[M],R=D.$$bindings.bindToController;$.identifier&&R?$.bindingInfo=ye(y,O,$.instance,R,D):$.bindingInfo={};var P=$();P!==$.instance&&($.instance=P,k.data("$"+D.name+"Controller",P),$.bindingInfo.removeWatches&&$.bindingInfo.removeWatches(),$.bindingInfo=ye(y,O,$.instance,R,D))}for(i(w,function(e,t){var n=e.require;e.bindToController&&!Vi(n)&&b(n)&&u(_[t].instance,J(t,n,k,_))}),i(_,function(e){var t=e.instance;if(T(t.$onChanges))try{t.$onChanges(e.bindingInfo.initialChanges)}catch(n){r(n)}if(T(t.$onInit))try{t.$onInit()}catch(n){r(n)}T(t.$doCheck)&&(y.$watch(function(){t.$doCheck()}),t.$doCheck()),T(t.$onDestroy)&&y.$on("$destroy",function(){t.$onDestroy()})}),d=0,p=l.length;d<p;d++)g=l[d],ve(g,g.isolateScope?m:o,k,O,g.require&&J(g.directiveName,g.require,k,_),E);var F=o;for(S&&(S.template||null===S.templateUrl)&&(F=m),e&&e(F,a.childNodes,void 0,f),d=c.length-1;d>=0;d--)g=c[d],ve(g,g.isolateScope?m:o,k,O,g.require&&J(g.directiveName,g.require,k,_),E);i(_,function(e){var t=e.instance;T(t.$postLink)&&t.$postLink()})}f=f||{};for(var p,g,m,y,_,E=-Number.MAX_VALUE,x=f.newScopeDirective,w=f.controllerDirectives,S=f.newIsolateScopeDirective,A=f.templateDirective,k=f.nonTlbTranscludeDirective,O=!1,I=!1,N=f.hasElementTranscludeDirective,M=n.$$element=Fi(t),D=s,$=o,R=!1,F=!1,j=0,H=e.length;j<H;j++){p=e[j];var q=p.$$start,W=p.$$end;if(q&&(M=X(t,q,W)),m=void 0,E>p.priority)break;if((_=p.scope)&&(p.templateUrl||(b(_)?(le("new/isolated scope",S||x,p,M),S=p):le("new/isolated scope",S,p,M)),x=x||p),g=p.name,!R&&(p.replace&&(p.templateUrl||p.template)||p.transclude&&!p.$$tlb)){for(var G,Q=j+1;G=e[Q++];)if(G.transclude&&!G.$$tlb||G.replace&&(G.templateUrl||G.template)){F=!0;break}R=!0}if(!p.templateUrl&&p.controller&&(_=p.controller,w=w||pe(),le("'"+g+"' controller",w[g],p,M),w[g]=p),_=p.transclude)if(O=!0,p.$$tlb||(le("transclusion",k,p,M),k=p),"element"==_)N=!0,E=p.priority,m=M,M=n.$$element=Fi(U.$$createComment(g,n[g])),t=M[0],ge(a,z(m),t),m[0].$$parentNode=m[0].parentNode,$=Z(F,m,o,E,D&&D.name,{nonTlbTranscludeDirective:k});else{var ne=pe();if(m=Fi(Ie(t)).contents(),b(_)){m=[];var ie=pe(),ae=pe();i(_,function(e,t){var n="?"===e.charAt(0);e=n?e.substring(1):e,ie[e]=t,ne[t]=null,ae[t]=n}),i(M.contents(),function(e){var t=ie[mt(P(e))];t?(ae[t]=!0,ne[t]=ne[t]||[],ne[t].push(e)):m.push(e)}),i(ae,function(e,t){if(!e)throw Yr("reqslot","Required transclusion slot `{0}` was not filled.",t)});for(var se in ne)ne[se]&&(ne[se]=Z(F,ne[se],o))}M.empty(),$=Z(F,m,o,void 0,void 0,{needsNewScope:p.$$isolateScope||p.$$newScope}),$.$$slots=ne}if(p.template)if(I=!0,le("template",A,p,M),A=p,_=T(p.template)?p.template(M,n):p.template,_=Ae(_),p.replace){if(D=p,m=xe(_)?[]:yt(fe(p.templateNamespace,Zi(_))),t=m[0],1!=m.length||t.nodeType!==or)throw Yr("tplrt","Template for directive '{0}' must have exactly one root element. {1}",g,"");ge(a,M,t);var ue={$attr:{}},ce=Y(t,[],ue),he=e.splice(j+1,e.length-(j+1));(S||x)&&te(ce,S,x),e=e.concat(ce).concat(he),re(n,ue),H=e.length}else M.html(_);if(p.templateUrl)I=!0,le("template",A,p,M),A=p,p.replace&&(D=p),d=oe(e.splice(j,e.length-j),M,n,a,O&&$,l,c,{controllerDirectives:w,newScopeDirective:x!==p&&x,newIsolateScopeDirective:S,templateDirective:A,nonTlbTranscludeDirective:k}),H=e.length;else if(p.compile)try{y=p.compile(M,n,$);var de=p.$$originalDirective||p;T(y)?h(null,B(de,y),q,W):y&&h(B(de,y.pre),B(de,y.post),q,W)}catch(be){r(be,K(M))}p.terminal&&(d.terminal=!0,E=Math.max(E,p.priority))}return d.scope=x&&x.scope===!0,d.transcludeOnThisElement=O,d.templateOnThisElement=I,d.transclude=$,f.hasElementTranscludeDirective=N,d}function J(e,t,n,r){var o;if(E(t)){var a=t.match(w),s=t.substring(a[0].length),l=a[1]||a[3],u="?"===a[2];if("^^"===l?n=n.parent():(o=r&&r[s],o=o&&o.instance),!o){var c="$"+s+"Controller";o=l?n.inheritedData(c):n.data(c)}if(!o&&!u)throw Yr("ctreq","Controller '{0}', required by directive '{1}', can't be found!",s,e)}else if(Vi(t)){o=[];for(var f=0,h=t.length;f<h;f++)o[f]=J(e,t[f],n,r)}else b(t)&&(o={},i(t,function(t,i){o[i]=J(e,t,n,r)}));return o||null}function ee(e,t,n,i,r,o,a){var s=pe();for(var u in i){var c=i[u],f={$scope:c===a||c.$$isolateScope?r:o,$element:e,$attrs:t,$transclude:n},h=c.controller;"@"==h&&(h=t[c.name]);var d=l(h,f,!0,c.controllerAs);s[c.name]=d,e.data("$"+c.name+"Controller",d.instance)}return s}function te(e,t,n){for(var i=0,r=e.length;i<r;i++)e[i]=h(e[i],{$$isolateScope:t,$$newScope:n})}function ne(e,n,i,o,s,l,u){if(n===s)return null;var d=null;if(c.hasOwnProperty(n))for(var p,g=t.get(n+f),m=0,y=g.length;m<y;m++)try{if(p=g[m],(v(o)||o>p.priority)&&p.restrict.indexOf(i)!=-1){if(l&&(p=h(p,{$$start:l,$$end:u})),!p.$$bindings){var _=p.$$bindings=a(p,p.name);b(_.isolateScope)&&(p.$$isolateBindings=_.isolateScope)}e.push(p),d=p}}catch(E){r(E)}return d}function ie(e){if(c.hasOwnProperty(e))for(var n,i=t.get(e+f),r=0,o=i.length;r<o;r++)if(n=i[r],n.multiElement)return!0;return!1}function re(e,t){var n=t.$attr,r=e.$attr;e.$$element;i(e,function(i,r){"$"!=r.charAt(0)&&(t[r]&&t[r]!==i&&(i+=("style"===r?";":" ")+t[r]),e.$set(r,i,!0,n[r]))}),i(t,function(t,i){e.hasOwnProperty(i)||"$"===i.charAt(0)||(e[i]=t,"class"!==i&&"style"!==i&&(r[i]=n[i]))})}function oe(e,t,n,r,a,s,l,u){var c,f,d=[],p=t[0],g=e.shift(),m=h(g,{templateUrl:null,transclude:null,replace:null,$$originalDirective:g}),v=T(g.templateUrl)?g.templateUrl(t,n):g.templateUrl,y=g.templateNamespace;return t.empty(),o(v).then(function(o){var h,_,E,x;if(o=Ae(o),g.replace){if(E=xe(o)?[]:yt(fe(y,Zi(o))),h=E[0],1!=E.length||h.nodeType!==or)throw Yr("tplrt","Template for directive '{0}' must have exactly one root element. {1}",g.name,v);_={$attr:{}},ge(r,t,h);var w=Y(h,[],_);b(g.scope)&&te(w,!0),e=w.concat(e),re(n,_)}else h=p,t.html(o);for(e.unshift(m),c=Q(e,h,n,a,t,g,s,l,u),i(r,function(e,n){e==h&&(r[n]=t[0])}),f=q(t[0].childNodes,a);d.length;){var T=d.shift(),S=d.shift(),A=d.shift(),C=d.shift(),k=t[0];if(!T.$$destroyed){if(S!==p){var O=S.className;u.hasElementTranscludeDirective&&g.replace||(k=Ie(h)),ge(A,Fi(S),k),R(Fi(k),O)}x=c.transcludeOnThisElement?W(T,c.transclude,C):C,c(f,T,k,r,x)}}d=null}),function(e,t,n,i,r){var o=r;t.$$destroyed||(d?d.push(t,n,i,o):(c.transcludeOnThisElement&&(o=W(t,c.transclude,r)),c(f,t,n,i,o)))}}function ae(e,t){var n=t.priority-e.priority;return 0!==n?n:e.name!==t.name?e.name<t.name?-1:1:e.index-t.index}function le(e,t,n,i){function r(e){return e?" (module: "+e+")":""}if(t)throw Yr("multidir","Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}",t.name,r(t.$$moduleName),n.name,r(n.$$moduleName),e,K(i))}function ce(e,t){var i=n(t,!0);i&&e.push({priority:0,compile:function(e){var t=e.parent(),n=!!t.length;return n&&U.$$addBindingClass(t),function(e,t){var r=t.parent();n||U.$$addBindingClass(r),U.$$addBindingInfo(r,i.expressions),e.$watch(i,function(e){t[0].nodeValue=e})}}})}function fe(t,n){switch(t=Di(t||"html")){case"svg":case"math":var i=e.document.createElement("div");return i.innerHTML="<"+t+">"+n+"</"+t+">",i.childNodes[0].childNodes;default:return n}}function he(e,t){if("srcdoc"==t)return A.HTML;var n=P(e);return"xlinkHref"==t||"form"==n&&"action"==t||"img"!=n&&("src"==t||"ngSrc"==t)?A.RESOURCE_URL:void 0}function de(e,t,i,r,o){var a=he(e,r);o=x[r]||o;var s=n(i,!0,a,o);if(s){if("multiple"===r&&"select"===P(e))throw Yr("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",K(e));t.push({priority:100,compile:function(){return{pre:function(e,t,l){var u=l.$$observers||(l.$$observers=pe());if(S.test(r))throw Yr("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!==i&&(s=c&&n(c,!0,a,o),i=c),s&&(l[r]=s(e),(u[r]||(u[r]=[])).$$inter=!0,(l.$$observers&&l.$$observers[r].$$scope||e).$watch(s,function(e,t){"class"===r&&e!=t?l.$updateClass(e,t):l.$set(r,e)}))}}}})}}function ge(t,n,i){var r,o,a=n[0],s=n.length,l=a.parentNode;if(t)for(r=0,o=t.length;r<o;r++)if(t[r]==a){t[r++]=i;for(var u=r,c=u+s-1,f=t.length;u<f;u++,c++)c<f?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.document.createDocumentFragment();for(r=0;r<s;r++)h.appendChild(n[r]);for(Fi.hasData(a)&&(Fi.data(i,Fi.data(a)),Fi(a).off("$destroy")),Fi.cleanData(h.querySelectorAll("*")),r=1;r<s;r++)delete n[r];n[0]=i,n.length=1}function me(e,t){return u(function(){return e.apply(null,arguments)},e,t)}function ve(e,t,n,i,o,a){try{e(t,n,i,o,a)}catch(s){r(s,K(n))}}function ye(e,t,r,o,a){function l(t,n,i){T(r.$onChanges)&&n!==i&&(be||(e.$$postDigest(D),be=[]),c||(c={},be.push(u)),c[t]&&(i=c[t].previousValue),c[t]=new gt(i,n))}function u(){r.$onChanges(c),c=void 0}var c,f=[],h={};return i(o,function(i,o){var u,c,p,g,m,v=i.attrName,y=i.optional,b=i.mode;switch(b){case"@":y||Mi.call(t,v)||(r[o]=t[v]=void 0),t.$observe(v,function(e){if(E(e)||N(e)){var t=r[o];l(o,e,t),r[o]=e}}),t.$$observers[v].$$scope=e,u=t[v],E(u)?r[o]=n(u)(e):N(u)&&(r[o]=u),h[o]=new gt(Gr,r[o]);break;case"=":if(!Mi.call(t,v)){if(y)break;t[v]=void 0}if(y&&!t[v])break;c=s(t[v]),g=c.literal?j:function(e,t){return e===t||e!==e&&t!==t},p=c.assign||function(){throw u=r[o]=c(e),Yr("nonassign","Expression '{0}' in attribute '{1}' used with directive '{2}' is non-assignable!",t[v],v,a.name)},u=r[o]=c(e);var _=function(t){return g(t,r[o])||(g(t,u)?p(e,t=r[o]):r[o]=t),u=t};_.$stateful=!0,m=i.collection?e.$watchCollection(t[v],_):e.$watch(s(t[v],_),null,c.literal),f.push(m);break;case"<":if(!Mi.call(t,v)){if(y)break;t[v]=void 0}if(y&&!t[v])break;c=s(t[v]);var x=r[o]=c(e);h[o]=new gt(Gr,r[o]),m=e.$watch(c,function(e,t){if(t===e){if(t===x)return;t=x}l(o,e,t),r[o]=e},c.literal),f.push(m);break;case"&":if(c=t.hasOwnProperty(v)?s(t[v]):d,c===d&&y)break;r[o]=function(t){return c(e,t)}}}),{initialChanges:h,removeWatches:f.length&&function(){for(var e=0,t=f.length;e<t;++e)f[e]()}}}var be,_e=/^\w/,Ee=e.document.createElement("div"),we=O;L.prototype={$normalize:mt,$addClass:function(e){e&&e.length>0&&I.addClass(this.$$element,e)},$removeClass:function(e){e&&e.length>0&&I.removeClass(this.$$element,e)},$updateClass:function(e,t){var n=vt(e,t);n&&n.length&&I.addClass(this.$$element,n);var i=vt(t,e);i&&i.length&&I.removeClass(this.$$element,i)},$set:function(e,t,n,o){var a,s=this.$$element[0],l=We(s,e),u=Ye(e),c=e;if(l?(this.$$element.prop(e,t),o=l):u&&(this[u]=t,c=u),this[e]=t,o?this.$attr[e]=o:(o=this.$attr[e],o||(this.$attr[e]=o=se(e,"-"))),a=P(this.$$element),"a"===a&&("href"===e||"xlinkHref"===e)||"img"===a&&"src"===e)this[e]=t=M(t,"src"===e);else if("img"===a&&"srcset"===e&&y(t)){for(var f="",h=Zi(t),d=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,p=/\s/.test(h)?d:/(,)/,g=h.split(p),m=Math.floor(g.length/2),b=0;b<m;b++){var _=2*b;f+=M(Zi(g[_]),!0),f+=" "+Zi(g[_+1])}var E=Zi(g[2*b]).split(/\s/);f+=M(Zi(E[0]),!0),2===E.length&&(f+=" "+Zi(E[1])),this[e]=t=f}n!==!1&&(null===t||v(t)?this.$$element.removeAttr(o):_e.test(o)?this.$$element.attr(o,t):$(this.$$element[0],o,t));var x=this.$$observers;x&&i(x[c],function(e){try{e(t)}catch(n){r(n)}})},$observe:function(e,t){var n=this,i=n.$$observers||(n.$$observers=pe()),r=i[e]||(i[e]=[]);return r.push(t),g.$evalAsync(function(){r.$$inter||!n.hasOwnProperty(e)||v(n[e])||t(n[e])}),function(){F(r,t)}}};var Te=n.startSymbol(),Se=n.endSymbol(),Ae="{{"==Te&&"}}"==Se?p:function(e){return e.replace(/\{\{/g,Te).replace(/}}/g,Se)},Ce=/^ngAttr[A-Z]/,Oe=/^(.+)Start$/;return U.$$addBindingInfo=k?function(e,t){var n=e.data("$binding")||[];Vi(t)?n=n.concat(t):n.push(t),e.data("$binding",n)}:d,U.$$addBindingClass=k?function(e){R(e,"ng-binding")}:d,U.$$addScopeInfo=k?function(e,t,n,i){var r=n?i?"$isolateScopeNoTemplate":"$isolateScope":"$scope";e.data(r,t)}:d,U.$$addScopeClass=k?function(e,t){R(e,t?"ng-isolate-scope":"ng-scope")}:d,U.$$createComment=function(t,n){var i="";return k&&(i=" "+(t||"")+": ",n&&(i+=n+" ")),e.document.createComment(i)},U}]}function gt(e,t){this.previousValue=e,this.currentValue=t}function mt(e){return Ee(e.replace(Xr,""))}function vt(e,t){var n="",i=e.split(/\s+/),r=t.split(/\s+/);e:for(var o=0;o<i.length;o++){for(var a=i[o],s=0;s<r.length;s++)if(a==r[s])continue e;n+=(n.length>0?" ":"")+a}return n}function yt(e){e=Fi(e);var t=e.length;if(t<=1)return e;for(;t--;){var n=e[t];n.nodeType===lr&&zi.call(e,t,1)}return e}function bt(e,t){if(t&&E(t))return t;if(E(e)){var n=Kr.exec(e);if(n)return n[3]}}function _t(){var e={},n=!1;this.has=function(t){return e.hasOwnProperty(t)},this.register=function(t,n){fe(t,"controller"),b(t)?u(e,t):e[t]=n},this.allowGlobals=function(){n=!0},this.$get=["$injector","$window",function(i,r){function o(e,n,i,r){if(!e||!b(e.$scope))throw t("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",r,n);e.$scope[n]=i}return function(t,a,s,l){var c,f,h,d;if(s=s===!0,l&&E(l)&&(d=l),E(t)){if(f=t.match(Kr),!f)throw Vr("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",t);h=f[1],d=d||f[3],t=e.hasOwnProperty(h)?e[h]:he(a.$scope,h,!0)||(n?he(r,h,!0):void 0),ce(t,h,!0)}if(s){var p=(Vi(t)?t[t.length-1]:t).prototype;c=Object.create(p||null),d&&o(a,d,c,h||t.name);var g;return g=u(function(){var e=i.invoke(t,c,a,h);return e!==c&&(b(e)||T(e))&&(c=e,d&&o(a,d,c,h||t.name)),c},{instance:c,identifier:d})}return c=i.instantiate(t,a,h),d&&o(a,d,c,h||t.name),c}}]}function Et(){this.$get=["$window",function(e){return Fi(e.document)}]}function xt(){this.$get=["$log",function(e){return function(t,n){e.error.apply(e,arguments)}}]}function wt(e){return b(e)?w(e)?e.toISOString():W(e):e}function Tt(){this.$get=function(){return function(e){if(!e)return"";var t=[];return r(e,function(e,n){null===e||v(e)||(Vi(e)?i(e,function(e){t.push(te(n)+"="+te(wt(e)))}):t.push(te(n)+"="+te(wt(e))))}),t.join("&")}}}function St(){this.$get=function(){return function(e){function t(e,o,a){null===e||v(e)||(Vi(e)?i(e,function(e,n){t(e,o+"["+(b(e)?n:"")+"]")}):b(e)&&!w(e)?r(e,function(e,n){t(e,o+(a?"":"[")+n+(a?"":"]"))}):n.push(te(o)+"="+te(wt(e))))}if(!e)return"";var n=[];return t(e,"",!0),n.join("&")}}}function At(e,t){if(E(e)){var n=e.replace(no,"").trim();if(n){var i=t("Content-Type");(i&&0===i.indexOf(Qr)||Ct(n))&&(e=Y(n))}}return e}function Ct(e){var t=e.match(eo);return t&&to[t[0]].test(e)}function kt(e){function t(e,t){e&&(r[e]=r[e]?r[e]+", "+t:t)}var n,r=pe();return E(e)?i(e.split("\n"),function(e){n=e.indexOf(":"),t(Di(Zi(e.substr(0,n))),Zi(e.substr(n+1)))}):b(e)&&i(e,function(e,n){t(Di(n),Zi(e))}),r}function Ot(e){var t;return function(n){if(t||(t=kt(e)),n){var i=t[Di(n)];return void 0===i&&(i=null),i}return t}}function It(e,t,n,r){return T(r)?r(e,t,n):(i(r,function(i){e=i(e,t,n)}),e)}function Nt(e){return 200<=e&&e<300}function Mt(){var e=this.defaults={transformResponse:[At],transformRequest:[function(e){return!b(e)||k(e)||I(e)||O(e)?e:W(e)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:me(Jr),put:me(Jr),patch:me(Jr)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},n=!1;this.useApplyAsync=function(e){return y(e)?(n=!!e,this):n};var r=!0;this.useLegacyPromiseExtensions=function(e){return y(e)?(r=!!e,this):r};var o=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(a,s,l,c,f,h){function d(n){function o(e,t){for(var n=0,i=t.length;n<i;){var r=t[n++],o=t[n++];e=e.then(r,o)}return t.length=0,e}function a(e,t){var n,r={};return i(e,function(e,i){T(e)?(n=e(t),null!=n&&(r[i]=n)):r[i]=e}),r}function s(t){var n,i,r,o=e.headers,s=u({},t.headers);o=u({},o.common,o[Di(t.method)]);e:for(n in o){i=Di(n);for(r in s)if(Di(r)===i)continue e;s[n]=o[n]}return a(s,me(t))}function l(t){var n=t.headers,r=It(t.data,Ot(n),void 0,t.transformRequest);return v(r)&&i(n,function(e,t){"content-type"===Di(t)&&delete n[t]}),v(t.withCredentials)&&!v(e.withCredentials)&&(t.withCredentials=e.withCredentials),m(t,r).then(c,c)}function c(e){var t=u({},e);return t.data=It(e.data,e.headers,e.status,d.transformResponse),Nt(e.status)?t:f.reject(t)}if(!b(n))throw t("$http")("badreq","Http request configuration must be an object.  Received: {0}",n);if(!E(n.url))throw t("$http")("badreq","Http request configuration url must be a string.  Received: {0}",n.url);var d=u({method:"get",transformRequest:e.transformRequest,transformResponse:e.transformResponse,paramSerializer:e.paramSerializer},n);d.headers=s(n),d.method=Li(d.method),d.paramSerializer=E(d.paramSerializer)?h.get(d.paramSerializer):d.paramSerializer;var p=[],g=[],y=f.when(d);return i(w,function(e){(e.request||e.requestError)&&p.unshift(e.request,e.requestError),(e.response||e.responseError)&&g.push(e.response,e.responseError)}),y=o(y,p),y=y.then(l),y=o(y,g),r?(y.success=function(e){return ce(e,"fn"),y.then(function(t){e(t.data,t.status,t.headers,d)}),y},y.error=function(e){return ce(e,"fn"),y.then(null,function(t){e(t.data,t.status,t.headers,d)}),y}):(y.success=ro("success"),y.error=ro("error")),y}function p(e){i(arguments,function(e){d[e]=function(t,n){return d(u({},n||{},{method:e,url:t}))}})}function g(e){i(arguments,function(e){d[e]=function(t,n,i){return d(u({},i||{},{method:e,url:t,data:n}))}})}function m(t,r){function o(e){if(e){var t={};return i(e,function(e,i){t[i]=function(t){function i(){e(t)}n?c.$applyAsync(i):c.$$phase?i():c.$apply(i)}}),t}}function l(e,t,i,r){function o(){u(t,e,i,r)}g&&(Nt(e)?g.put(S,[e,t,kt(i),r]):g.remove(S)),n?c.$applyAsync(o):(o(),c.$$phase||c.$apply())}function u(e,n,i,r){n=n>=-1?n:0,(Nt(n)?E.resolve:E.reject)({data:e,status:n,headers:Ot(i),config:t,statusText:r})}function h(e){u(e.data,e.status,me(e.headers()),e.statusText)}function p(){var e=d.pendingRequests.indexOf(t);e!==-1&&d.pendingRequests.splice(e,1)}var g,m,E=f.defer(),w=E.promise,T=t.headers,S=_(t.url,t.paramSerializer(t.params));if(d.pendingRequests.push(t),w.then(p,p),!t.cache&&!e.cache||t.cache===!1||"GET"!==t.method&&"JSONP"!==t.method||(g=b(t.cache)?t.cache:b(e.cache)?e.cache:x),g&&(m=g.get(S),y(m)?M(m)?m.then(h,h):Vi(m)?u(m[1],m[0],me(m[2]),m[3]):u(m,200,{},"OK"):g.put(S,w)),v(m)){var A=$n(t.url)?s()[t.xsrfCookieName||e.xsrfCookieName]:void 0;A&&(T[t.xsrfHeaderName||e.xsrfHeaderName]=A),a(t.method,S,r,l,T,t.timeout,t.withCredentials,t.responseType,o(t.eventHandlers),o(t.uploadEventHandlers))}return w}function _(e,t){return t.length>0&&(e+=(e.indexOf("?")==-1?"?":"&")+t),e}var x=l("$http");e.paramSerializer=E(e.paramSerializer)?h.get(e.paramSerializer):e.paramSerializer;var w=[];return i(o,function(e){w.unshift(E(e)?h.get(e):h.invoke(e))}),d.pendingRequests=[],p("get","delete","head","jsonp"),g("post","put","patch"),d.defaults=e,d}]}function Dt(){this.$get=function(){return function(){return new e.XMLHttpRequest}}}function Lt(){this.$get=["$browser","$jsonpCallbacks","$document","$xhrFactory",function(e,t,n,i){return $t(e,i,e.defer,t,n[0])}]}function $t(e,t,n,r,o){function a(e,t,n){e=e.replace("JSON_CALLBACK",t);var i=o.createElement("script"),a=null;return i.type="text/javascript",i.src=e,i.async=!0,a=function(e){gr(i,"load",a),gr(i,"error",a),o.body.removeChild(i),i=null;var s=-1,l="unknown";e&&("load"!==e.type||r.wasCalled(t)||(e={type:"error"}),l=e.type,s="error"===e.type?404:200),n&&n(s,l)},pr(i,"load",a),pr(i,"error",a),o.body.appendChild(i),a}return function(o,s,l,u,c,f,h,p,g,m){function b(){x&&x(),w&&w.abort()}function _(t,i,r,o,a){y(A)&&n.cancel(A),x=w=null,t(i,r,o,a),e.$$completeOutstandingRequest(d)}if(e.$$incOutstandingRequestCount(),s=s||e.url(),"jsonp"===Di(o))var E=r.createCallback(s),x=a(s,E,function(e,t){var n=200===e&&r.getResponse(E);_(u,e,n,"",t),r.removeCallback(E)});else{var w=t(o,s);w.open(o,s,!0),i(c,function(e,t){y(e)&&w.setRequestHeader(t,e)}),w.onload=function(){var e=w.statusText||"",t="response"in w?w.response:w.responseText,n=1223===w.status?204:w.status;0===n&&(n=t?200:"file"==Ln(s).protocol?404:0),_(u,n,t,w.getAllResponseHeaders(),e)};var T=function(){_(u,-1,null,null,"")};if(w.onerror=T,w.onabort=T,i(g,function(e,t){w.addEventListener(t,e)}),i(m,function(e,t){w.upload.addEventListener(t,e)}),h&&(w.withCredentials=!0),p)try{w.responseType=p}catch(S){if("json"!==p)throw S}w.send(v(l)?null:l)}if(f>0)var A=n(b,f);else M(f)&&f.then(b)}}function Rt(){var e="{{",t="}}";this.startSymbol=function(t){return t?(e=t,this):e},this.endSymbol=function(e){return e?(t=e,this):t},this.$get=["$parse","$exceptionHandler","$sce",function(n,i,r){function o(e){return"\\\\\\"+e}function a(n){return n.replace(d,e).replace(p,t)}function s(e){if(null==e)return"";switch(typeof e){case"string":break;case"number":e=""+e;break;default:e=W(e)}return e}function l(e,t,n,i){var r;return r=e.$watch(function(e){return r(),i(e)},t,n)}function c(o,c,d,p){function m(e){try{return e=M(e),p&&!y(e)?e:s(e)}catch(t){i(oo.interr(o,t))}}if(!o.length||o.indexOf(e)===-1){var b;if(!c){var _=a(o);b=g(_),b.exp=o,b.expressions=[],b.$$watchDelegate=l}return b}p=!!p;for(var E,x,w,S=0,A=[],C=[],k=o.length,O=[],I=[];S<k;){if((E=o.indexOf(e,S))==-1||(x=o.indexOf(t,E+f))==-1){S!==k&&O.push(a(o.substring(S)));break}S!==E&&O.push(a(o.substring(S,E))),w=o.substring(E+f,x),A.push(w),C.push(n(w,m)),S=x+h,I.push(O.length),O.push("")}if(d&&O.length>1&&oo.throwNoconcat(o),!c||A.length){var N=function(e){for(var t=0,n=A.length;t<n;t++){if(p&&v(e[t]))return;O[I[t]]=e[t]}return O.join("")},M=function(e){return d?r.getTrusted(d,e):r.valueOf(e)};return u(function(e){var t=0,n=A.length,r=new Array(n);try{for(;t<n;t++)r[t]=C[t](e);return N(r)}catch(a){i(oo.interr(o,a))}},{exp:o,expressions:A,$$watchDelegate:function(e,t){var n;return e.$watchGroup(C,function(i,r){var o=N(i);T(t)&&t.call(this,o,i!==r?n:o,e),n=o})}})}}var f=e.length,h=t.length,d=new RegExp(e.replace(/./g,o),"g"),p=new RegExp(t.replace(/./g,o),"g");return c.startSymbol=function(){return e},c.endSymbol=function(){return t},c}]}function Pt(){this.$get=["$rootScope","$window","$q","$$q","$browser",function(e,t,n,i,r){function o(o,s,l,u){function c(){f?o.apply(null,h):o(g)}var f=arguments.length>4,h=f?z(arguments,4):[],d=t.setInterval,p=t.clearInterval,g=0,m=y(u)&&!u,v=(m?i:n).defer(),b=v.promise;return l=y(l)?l:0,b.$$intervalId=d(function(){m?r.defer(c):e.$evalAsync(c),v.notify(g++),l>0&&g>=l&&(v.resolve(g),p(b.$$intervalId),delete a[b.$$intervalId]),m||e.$apply()},s),a[b.$$intervalId]=v,b}var a={};return o.cancel=function(e){return!!(e&&e.$$intervalId in a)&&(a[e.$$intervalId].reject("canceled"),t.clearInterval(e.$$intervalId),delete a[e.$$intervalId],!0)},o}]}function Ft(e){for(var t=e.split("/"),n=t.length;n--;)t[n]=ee(t[n]);return t.join("/")}function Ut(e,t){var n=Ln(e);t.$$protocol=n.protocol,t.$$host=n.hostname,t.$$port=f(n.port)||lo[n.protocol]||null}function jt(e,t){var n="/"!==e.charAt(0);n&&(e="/"+e);var i=Ln(e);t.$$path=decodeURIComponent(n&&"/"===i.pathname.charAt(0)?i.pathname.substring(1):i.pathname),t.$$search=Q(i.search),t.$$hash=decodeURIComponent(i.hash),t.$$path&&"/"!=t.$$path.charAt(0)&&(t.$$path="/"+t.$$path)}function Ht(e,t){return 0===e.lastIndexOf(t,0)}function zt(e,t){if(Ht(t,e))return t.substr(e.length)}function Bt(e){var t=e.indexOf("#");return t==-1?e:e.substr(0,t)}function qt(e){return e.replace(/(#.+)|#$/,"$1")}function Wt(e){return e.substr(0,Bt(e).lastIndexOf("/")+1)}function Yt(e){return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function Gt(e,t,n){this.$$html5=!0,n=n||"",Ut(e,this),this.$$parse=function(e){var n=zt(t,e);if(!E(n))throw uo("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',e,t);jt(n,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var e=J(this.$$search),n=this.$$hash?"#"+ee(this.$$hash):"";this.$$url=Ft(this.$$path)+(e?"?"+e:"")+n,this.$$absUrl=t+this.$$url.substr(1)},this.$$parseLinkUrl=function(i,r){if(r&&"#"===r[0])return this.hash(r.slice(1)),!0;var o,a,s;return y(o=zt(e,i))?(a=o,s=y(o=zt(n,o))?t+(zt("/",o)||o):e+a):y(o=zt(t,i))?s=t+o:t==i+"/"&&(s=t),s&&this.$$parse(s),!!s}}function Xt(e,t,n){Ut(e,this),this.$$parse=function(i){function r(e,t,n){var i,r=/^\/[A-Z]:(\/.*)/;return Ht(t,n)&&(t=t.replace(n,"")),r.exec(t)?e:(i=r.exec(e),i?i[1]:e)}var o,a=zt(e,i)||zt(t,i);v(a)||"#"!==a.charAt(0)?this.$$html5?o=a:(o="",v(a)&&(e=i,this.replace())):(o=zt(n,a),v(o)&&(o=a)),jt(o,this),this.$$path=r(this.$$path,o,e),this.$$compose()},this.$$compose=function(){var t=J(this.$$search),i=this.$$hash?"#"+ee(this.$$hash):"";this.$$url=Ft(this.$$path)+(t?"?"+t:"")+i,this.$$absUrl=e+(this.$$url?n+this.$$url:"")},this.$$parseLinkUrl=function(t,n){return Bt(e)==Bt(t)&&(this.$$parse(t),!0)}}function Vt(e,t,n){this.$$html5=!0,Xt.apply(this,arguments),this.$$parseLinkUrl=function(i,r){if(r&&"#"===r[0])return this.hash(r.slice(1)),!0;var o,a;return e==Bt(i)?o=i:(a=zt(t,i))?o=e+n+a:t===i+"/"&&(o=t),o&&this.$$parse(o),!!o},this.$$compose=function(){var t=J(this.$$search),i=this.$$hash?"#"+ee(this.$$hash):"";this.$$url=Ft(this.$$path)+(t?"?"+t:"")+i,this.$$absUrl=e+n+this.$$url}}function Kt(e){return function(){return this[e]}}function Zt(e,t){return function(n){return v(n)?this[e]:(this[e]=t(n),this.$$compose(),this)}}function Qt(){var e="",t={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(t){return y(t)?(e=t,this):e},this.html5Mode=function(e){return N(e)?(t.enabled=e,this):b(e)?(N(e.enabled)&&(t.enabled=e.enabled),N(e.requireBase)&&(t.requireBase=e.requireBase),N(e.rewriteLinks)&&(t.rewriteLinks=e.rewriteLinks),this):t},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(n,i,r,o,a){function s(e,t,n){var r=u.url(),o=u.$$state;try{i.url(e,t,n),u.$$state=i.state()}catch(a){throw u.url(r),u.$$state=o,a}}function l(e,t){n.$broadcast("$locationChangeSuccess",u.absUrl(),e,u.$$state,t)}var u,c,f,h=i.baseHref(),d=i.url();if(t.enabled){if(!h&&t.requireBase)throw uo("nobase","$location in HTML5 mode requires a <base> tag to be present!");f=Yt(d)+(h||"/"),c=r.history?Gt:Vt}else f=Bt(d),c=Xt;var p=Wt(f);u=new c(f,p,"#"+e),u.$$parseLinkUrl(d,d),u.$$state=i.state();var g=/^\s*(javascript|mailto):/i;o.on("click",function(e){if(t.rewriteLinks&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&2!=e.which&&2!=e.button){for(var r=Fi(e.target);"a"!==P(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=Ln(s.animVal).href),g.test(s)||!s||r.attr("target")||e.isDefaultPrevented()||u.$$parseLinkUrl(s,l)&&(e.preventDefault(),u.absUrl()!=i.url()&&(n.$apply(),a.angular["ff-684208-preventDefault"]=!0))}}),qt(u.absUrl())!=qt(d)&&i.url(u.absUrl(),!0);var m=!0;return i.onUrlChange(function(e,t){return v(zt(p,e))?void(a.location.href=e):(n.$evalAsync(function(){var i,r=u.absUrl(),o=u.$$state;e=qt(e),u.$$parse(e),u.$$state=t,i=n.$broadcast("$locationChangeStart",e,r,t,o).defaultPrevented,u.absUrl()===e&&(i?(u.$$parse(r),u.$$state=o,s(r,!1,o)):(m=!1,l(r,o)))}),void(n.$$phase||n.$digest()))}),n.$watch(function(){var e=qt(i.url()),t=qt(u.absUrl()),o=i.state(),a=u.$$replace,c=e!==t||u.$$html5&&r.history&&o!==u.$$state;(m||c)&&(m=!1,n.$evalAsync(function(){var t=u.absUrl(),i=n.$broadcast("$locationChangeStart",t,e,u.$$state,o).defaultPrevented;u.absUrl()===t&&(i?(u.$$parse(e),u.$$state=o):(c&&s(t,a,o===u.$$state?null:u.$$state),l(e,o)))})),u.$$replace=!1}),u}]}function Jt(){var e=!0,t=this;this.debugEnabled=function(t){return y(t)?(e=t,this):e},this.$get=["$window",function(n){function r(e){return e instanceof Error&&(e.stack?e=e.message&&e.stack.indexOf(e.message)===-1?"Error: "+e.message+"\n"+e.stack:e.stack:e.sourceURL&&(e=e.message+"\n"+e.sourceURL+":"+e.line)),e}function o(e){var t=n.console||{},o=t[e]||t.log||d,a=!1;try{a=!!o.apply}catch(s){}return a?function(){var e=[];return i(arguments,function(t){e.push(r(t))}),o.apply(t,e)}:function(e,t){o(e,null==t?"":t)}}return{log:o("log"),info:o("info"),warn:o("warn"),error:o("error"),debug:function(){var n=o("debug");return function(){e&&n.apply(t,arguments)}}()}}]}function en(e,t){if("__defineGetter__"===e||"__defineSetter__"===e||"__lookupGetter__"===e||"__lookupSetter__"===e||"__proto__"===e)throw fo("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",t);return e}function tn(e){return e+""}function nn(e,t){if(e){if(e.constructor===e)throw fo("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e.window===e)throw fo("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",t);if(e.children&&(e.nodeName||e.prop&&e.attr&&e.find))throw fo("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",t);if(e===Object)throw fo("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",t)}return e}function rn(e,t){if(e){if(e.constructor===e)throw fo("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e===ho||e===po||e===go)throw fo("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",t)}}function on(e,t){if(e&&(e===(0).constructor||e===(!1).constructor||e==="".constructor||e==={}.constructor||e===[].constructor||e===Function.constructor))throw fo("isecaf","Assigning to a constructor is disallowed! Expression: {0}",t)}function an(e,t){return"undefined"!=typeof e?e:t}function sn(e,t){return"undefined"==typeof e?t:"undefined"==typeof t?e:e+t}function ln(e,t){var n=e(t);return!n.$stateful}function un(e,t){var n,r;switch(e.type){case bo.Program:n=!0,i(e.body,function(e){un(e.expression,t),n=n&&e.expression.constant}),e.constant=n;break;case bo.Literal:e.constant=!0,e.toWatch=[];break;case bo.UnaryExpression:un(e.argument,t),e.constant=e.argument.constant,e.toWatch=e.argument.toWatch;break;case bo.BinaryExpression:un(e.left,t),un(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.left.toWatch.concat(e.right.toWatch);break;case bo.LogicalExpression:un(e.left,t),un(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.constant?[]:[e];break;case bo.ConditionalExpression:un(e.test,t),un(e.alternate,t),un(e.consequent,t),e.constant=e.test.constant&&e.alternate.constant&&e.consequent.constant,e.toWatch=e.constant?[]:[e];break;case bo.Identifier:e.constant=!1,e.toWatch=[e];break;case bo.MemberExpression:un(e.object,t),e.computed&&un(e.property,t),e.constant=e.object.constant&&(!e.computed||e.property.constant),e.toWatch=[e];break;case bo.CallExpression:
n=!!e.filter&&ln(t,e.callee.name),r=[],i(e.arguments,function(e){un(e,t),n=n&&e.constant,e.constant||r.push.apply(r,e.toWatch)}),e.constant=n,e.toWatch=e.filter&&ln(t,e.callee.name)?r:[e];break;case bo.AssignmentExpression:un(e.left,t),un(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=[e];break;case bo.ArrayExpression:n=!0,r=[],i(e.elements,function(e){un(e,t),n=n&&e.constant,e.constant||r.push.apply(r,e.toWatch)}),e.constant=n,e.toWatch=r;break;case bo.ObjectExpression:n=!0,r=[],i(e.properties,function(e){un(e.value,t),n=n&&e.value.constant&&!e.computed,e.value.constant||r.push.apply(r,e.value.toWatch)}),e.constant=n,e.toWatch=r;break;case bo.ThisExpression:e.constant=!1,e.toWatch=[];break;case bo.LocalsExpression:e.constant=!1,e.toWatch=[]}}function cn(e){if(1==e.length){var t=e[0].expression,n=t.toWatch;return 1!==n.length?n:n[0]!==t?n:void 0}}function fn(e){return e.type===bo.Identifier||e.type===bo.MemberExpression}function hn(e){if(1===e.body.length&&fn(e.body[0].expression))return{type:bo.AssignmentExpression,left:e.body[0].expression,right:{type:bo.NGValueParameter},operator:"="}}function dn(e){return 0===e.body.length||1===e.body.length&&(e.body[0].expression.type===bo.Literal||e.body[0].expression.type===bo.ArrayExpression||e.body[0].expression.type===bo.ObjectExpression)}function pn(e){return e.constant}function gn(e,t){this.astBuilder=e,this.$filter=t}function mn(e,t){this.astBuilder=e,this.$filter=t}function vn(e){return"constructor"==e}function yn(e){return T(e.valueOf)?e.valueOf():Eo.call(e)}function bn(){var e,t,n=pe(),r=pe(),o={"true":!0,"false":!1,"null":null,undefined:void 0};this.addLiteral=function(e,t){o[e]=t},this.setIdentifierFns=function(n,i){return e=n,t=i,this},this.$get=["$filter",function(a){function s(e,t,i){var o,s,u;switch(i=i||_,typeof e){case"string":e=e.trim(),u=e;var m=i?r:n;if(o=m[u],!o){":"===e.charAt(0)&&":"===e.charAt(1)&&(s=!0,e=e.substring(2));var y=i?b:v,E=new yo(y),x=new _o(E,a,y);o=x.parse(e),o.constant?o.$$watchDelegate=p:s?o.$$watchDelegate=o.literal?h:f:o.inputs&&(o.$$watchDelegate=c),i&&(o=l(o)),m[u]=o}return g(o,t);case"function":return g(e,t);default:return g(d,t)}}function l(e){function t(t,n,i,r){var o=_;_=!0;try{return e(t,n,i,r)}finally{_=o}}if(!e)return e;t.$$watchDelegate=e.$$watchDelegate,t.assign=l(e.assign),t.constant=e.constant,t.literal=e.literal;for(var n=0;e.inputs&&n<e.inputs.length;++n)e.inputs[n]=l(e.inputs[n]);return t.inputs=e.inputs,t}function u(e,t){return null==e||null==t?e===t:("object"!=typeof e||(e=yn(e),"object"!=typeof e))&&(e===t||e!==e&&t!==t)}function c(e,t,n,i,r){var o,a=i.inputs;if(1===a.length){var s=u;return a=a[0],e.$watch(function(e){var t=a(e);return u(t,s)||(o=i(e,void 0,void 0,[t]),s=t&&yn(t)),o},t,n,r)}for(var l=[],c=[],f=0,h=a.length;f<h;f++)l[f]=u,c[f]=null;return e.$watch(function(e){for(var t=!1,n=0,r=a.length;n<r;n++){var s=a[n](e);(t||(t=!u(s,l[n])))&&(c[n]=s,l[n]=s&&yn(s))}return t&&(o=i(e,void 0,void 0,c)),o},t,n,r)}function f(e,t,n,i){var r,o;return r=e.$watch(function(e){return i(e)},function(e,n,i){o=e,T(t)&&t.apply(this,arguments),y(e)&&i.$$postDigest(function(){y(o)&&r()})},n)}function h(e,t,n,r){function o(e){var t=!0;return i(e,function(e){y(e)||(t=!1)}),t}var a,s;return a=e.$watch(function(e){return r(e)},function(e,n,i){s=e,T(t)&&t.call(this,e,n,i),o(e)&&i.$$postDigest(function(){o(s)&&a()})},n)}function p(e,t,n,i){var r;return r=e.$watch(function(e){return r(),i(e)},t,n)}function g(e,t){if(!t)return e;var n=e.$$watchDelegate,i=!1,r=n!==h&&n!==f,o=r?function(n,r,o,a){var s=i&&a?a[0]:e(n,r,o,a);return t(s,n,r)}:function(n,i,r,o){var a=e(n,i,r,o),s=t(a,n,i);return y(a)?s:a};return e.$$watchDelegate&&e.$$watchDelegate!==c?o.$$watchDelegate=e.$$watchDelegate:t.$stateful||(o.$$watchDelegate=c,i=!e.inputs,o.inputs=e.inputs?e.inputs:[e]),o}var m=Ji().noUnsafeEval,v={csp:m,expensiveChecks:!1,literals:U(o),isIdentifierStart:T(e)&&e,isIdentifierContinue:T(t)&&t},b={csp:m,expensiveChecks:!0,literals:U(o),isIdentifierStart:T(e)&&e,isIdentifierContinue:T(t)&&t},_=!1;return s.$$runningExpensiveChecks=function(){return _},s}]}function _n(){this.$get=["$rootScope","$exceptionHandler",function(e,t){return xn(function(t){e.$evalAsync(t)},t)}]}function En(){this.$get=["$browser","$exceptionHandler",function(e,t){return xn(function(t){e.defer(t)},t)}]}function xn(e,n){function r(){this.$$state={status:0}}function o(e,t){return function(n){t.call(e,n)}}function a(e){var t,i,r;r=e.pending,e.processScheduled=!1,e.pending=void 0;for(var o=0,a=r.length;o<a;++o){i=r[o][0],t=r[o][e.status];try{T(t)?i.resolve(t(e.value)):1===e.status?i.resolve(e.value):i.reject(e.value)}catch(s){i.reject(s),n(s)}}}function s(t){!t.processScheduled&&t.pending&&(t.processScheduled=!0,e(function(){a(t)}))}function l(){this.promise=new r}function c(e){var t=new l,n=0,r=Vi(e)?[]:{};return i(e,function(e,i){n++,y(e).then(function(e){r.hasOwnProperty(i)||(r[i]=e,--n||t.resolve(r))},function(e){r.hasOwnProperty(i)||t.reject(e)})}),0===n&&t.resolve(r),t.promise}function f(e){var t=d();return i(e,function(e){y(e).then(t.resolve,t.reject)}),t.promise}var h=t("$q",TypeError),d=function(){var e=new l;return e.resolve=o(e,e.resolve),e.reject=o(e,e.reject),e.notify=o(e,e.notify),e};u(r.prototype,{then:function(e,t,n){if(v(e)&&v(t)&&v(n))return this;var i=new l;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([i,e,t,n]),this.$$state.status>0&&s(this.$$state),i.promise},"catch":function(e){return this.then(null,e)},"finally":function(e,t){return this.then(function(t){return m(t,!0,e)},function(t){return m(t,!1,e)},t)}}),u(l.prototype,{resolve:function(e){this.promise.$$state.status||(e===this.promise?this.$$reject(h("qcycle","Expected promise to be resolved with value other than itself '{0}'",e)):this.$$resolve(e))},$$resolve:function(e){function t(e){l||(l=!0,a.$$resolve(e))}function i(e){l||(l=!0,a.$$reject(e))}var r,a=this,l=!1;try{(b(e)||T(e))&&(r=e&&e.then),T(r)?(this.promise.$$state.status=-1,r.call(e,t,i,o(this,this.notify))):(this.promise.$$state.value=e,this.promise.$$state.status=1,s(this.promise.$$state))}catch(u){i(u),n(u)}},reject:function(e){this.promise.$$state.status||this.$$reject(e)},$$reject:function(e){this.promise.$$state.value=e,this.promise.$$state.status=2,s(this.promise.$$state)},notify:function(t){var i=this.promise.$$state.pending;this.promise.$$state.status<=0&&i&&i.length&&e(function(){for(var e,r,o=0,a=i.length;o<a;o++){r=i[o][0],e=i[o][3];try{r.notify(T(e)?e(t):t)}catch(s){n(s)}}})}});var p=function(e){var t=new l;return t.reject(e),t.promise},g=function(e,t){var n=new l;return t?n.resolve(e):n.reject(e),n.promise},m=function(e,t,n){var i=null;try{T(n)&&(i=n())}catch(r){return g(r,!1)}return M(i)?i.then(function(){return g(e,t)},function(e){return g(e,!1)}):g(e,t)},y=function(e,t,n,i){var r=new l;return r.resolve(e),r.promise.then(t,n,i)},_=y,E=function(e){function t(e){i.resolve(e)}function n(e){i.reject(e)}if(!T(e))throw h("norslvr","Expected resolverFn, got '{0}'",e);var i=new l;return e(t,n),i.promise};return E.prototype=r.prototype,E.defer=d,E.reject=p,E.when=y,E.resolve=_,E.all=c,E.race=f,E}function wn(){this.$get=["$window","$timeout",function(e,t){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame,i=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.webkitCancelRequestAnimationFrame,r=!!n,o=r?function(e){var t=n(e);return function(){i(t)}}:function(e){var n=t(e,16.66,!1);return function(){t.cancel(n)}};return o.supported=r,o}]}function Tn(){function e(e){function t(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$id=a(),this.$$ChildScope=null}return t.prototype=e,t}var r=10,o=t("$rootScope"),s=null,l=null;this.digestTtl=function(e){return arguments.length&&(r=e),r},this.$get=["$exceptionHandler","$parse","$browser",function(t,u,c){function f(e){e.currentScope.$$destroyed=!0}function h(e){9===Pi&&(e.$$childHead&&h(e.$$childHead),e.$$nextSibling&&h(e.$$nextSibling)),e.$parent=e.$$nextSibling=e.$$prevSibling=e.$$childHead=e.$$childTail=e.$root=e.$$watchers=null}function p(){this.$id=a(),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.$$watchersCount=0,this.$$isolateBindings=null}function g(e){if(S.$$phase)throw o("inprog","{0} already in progress",S.$$phase);S.$$phase=e}function m(){S.$$phase=null}function y(e,t){do e.$$watchersCount+=t;while(e=e.$parent)}function _(e,t,n){do e.$$listenerCount[n]-=t,0===e.$$listenerCount[n]&&delete e.$$listenerCount[n];while(e=e.$parent)}function E(){}function x(){for(;k.length;)try{k.shift()()}catch(e){t(e)}l=null}function w(){null===l&&(l=c.defer(function(){S.$apply(x)}))}p.prototype={constructor:p,$new:function(t,n){var i;return n=n||this,t?(i=new p,i.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=e(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,(t||n!=this)&&i.$on("$destroy",f),i},$watch:function(e,t,n,i){var r=u(e);if(r.$$watchDelegate)return r.$$watchDelegate(this,t,n,r,e);var o=this,a=o.$$watchers,l={fn:t,last:E,get:r,exp:i||e,eq:!!n};return s=null,T(t)||(l.fn=d),a||(a=o.$$watchers=[]),a.unshift(l),y(this,1),function(){F(a,l)>=0&&y(o,-1),s=null}},$watchGroup:function(e,t){function n(){l=!1,u?(u=!1,t(o,o,s)):t(o,r,s)}var r=new Array(e.length),o=new Array(e.length),a=[],s=this,l=!1,u=!0;if(!e.length){var c=!0;return s.$evalAsync(function(){c&&t(o,o,s)}),function(){c=!1}}return 1===e.length?this.$watch(e[0],function(e,n,i){o[0]=e,r[0]=n,t(o,e===n?o:r,i)}):(i(e,function(e,t){var i=s.$watch(e,function(e,i){o[t]=e,r[t]=i,l||(l=!0,s.$evalAsync(n))});a.push(i)}),function(){for(;a.length;)a.shift()()})},$watchCollection:function(e,t){function i(e){o=e;var t,i,r,s,l;if(!v(o)){if(b(o))if(n(o)){a!==d&&(a=d,m=a.length=0,f++),t=o.length,m!==t&&(f++,a.length=m=t);for(var u=0;u<t;u++)l=a[u],s=o[u],r=l!==l&&s!==s,r||l===s||(f++,a[u]=s)}else{a!==p&&(a=p={},m=0,f++),t=0;for(i in o)Mi.call(o,i)&&(t++,s=o[i],l=a[i],i in a?(r=l!==l&&s!==s,r||l===s||(f++,a[i]=s)):(m++,a[i]=s,f++));if(m>t){f++;for(i in a)Mi.call(o,i)||(m--,delete a[i])}}else a!==o&&(a=o,f++);return f}}function r(){if(g?(g=!1,t(o,o,l)):t(o,s,l),c)if(b(o))if(n(o)){s=new Array(o.length);for(var e=0;e<o.length;e++)s[e]=o[e]}else{s={};for(var i in o)Mi.call(o,i)&&(s[i]=o[i])}else s=o}i.$stateful=!0;var o,a,s,l=this,c=t.length>1,f=0,h=u(e,i),d=[],p={},g=!0,m=0;return this.$watch(h,r)},$digest:function(){var e,n,i,a,u,f,h,d,p,v,y,b,_=r,w=this,k=[];g("$digest"),c.$$checkUrlChange(),this===S&&null!==l&&(c.defer.cancel(l),x()),s=null;do{d=!1,v=w;for(var I=0;I<A.length;I++){try{b=A[I],b.scope.$eval(b.expression,b.locals)}catch(N){t(N)}s=null}A.length=0;e:do{if(f=v.$$watchers)for(h=f.length;h--;)try{if(e=f[h])if(u=e.get,(n=u(v))===(i=e.last)||(e.eq?j(n,i):"number"==typeof n&&"number"==typeof i&&isNaN(n)&&isNaN(i))){if(e===s){d=!1;break e}}else d=!0,s=e,e.last=e.eq?U(n,null):n,a=e.fn,a(n,i===E?n:i,v),_<5&&(y=4-_,k[y]||(k[y]=[]),k[y].push({msg:T(e.exp)?"fn: "+(e.exp.name||e.exp.toString()):e.exp,newVal:n,oldVal:i}))}catch(N){t(N)}if(!(p=v.$$watchersCount&&v.$$childHead||v!==w&&v.$$nextSibling))for(;v!==w&&!(p=v.$$nextSibling);)v=v.$parent}while(v=p);if((d||A.length)&&!_--)throw m(),o("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",r,k)}while(d||A.length);for(m();O<C.length;)try{C[O++]()}catch(N){t(N)}C.length=O=0},$destroy:function(){if(!this.$$destroyed){var e=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0,this===S&&c.$$applicationDestroyed(),y(this,-this.$$watchersCount);for(var t in this.$$listenerCount)_(this,this.$$listenerCount[t],t);e&&e.$$childHead==this&&(e.$$childHead=this.$$nextSibling),e&&e.$$childTail==this&&(e.$$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=d,this.$on=this.$watch=this.$watchGroup=function(){return d},this.$$listeners={},this.$$nextSibling=null,h(this)}},$eval:function(e,t){return u(e)(this,t)},$evalAsync:function(e,t){S.$$phase||A.length||c.defer(function(){A.length&&S.$digest()}),A.push({scope:this,expression:u(e),locals:t})},$$postDigest:function(e){C.push(e)},$apply:function(e){try{g("$apply");try{return this.$eval(e)}finally{m()}}catch(n){t(n)}finally{try{S.$digest()}catch(n){throw t(n),n}}},$applyAsync:function(e){function t(){n.$eval(e)}var n=this;e&&k.push(t),e=u(e),w()},$on:function(e,t){var n=this.$$listeners[e];n||(this.$$listeners[e]=n=[]),n.push(t);var i=this;do i.$$listenerCount[e]||(i.$$listenerCount[e]=0),i.$$listenerCount[e]++;while(i=i.$parent);var r=this;return function(){var i=n.indexOf(t);i!==-1&&(n[i]=null,_(r,1,e))}},$emit:function(e,n){var i,r,o,a=[],s=this,l=!1,u={name:e,targetScope:s,stopPropagation:function(){l=!0},preventDefault:function(){u.defaultPrevented=!0},defaultPrevented:!1},c=H([u],arguments,1);do{for(i=s.$$listeners[e]||a,u.currentScope=s,r=0,o=i.length;r<o;r++)if(i[r])try{i[r].apply(null,c)}catch(f){t(f)}else i.splice(r,1),r--,o--;if(l)return u.currentScope=null,u;s=s.$parent}while(s);return u.currentScope=null,u},$broadcast:function(e,n){var i=this,r=i,o=i,a={name:e,targetScope:i,preventDefault:function(){a.defaultPrevented=!0},defaultPrevented:!1};if(!i.$$listenerCount[e])return a;for(var s,l,u,c=H([a],arguments,1);r=o;){for(a.currentScope=r,s=r.$$listeners[e]||[],l=0,u=s.length;l<u;l++)if(s[l])try{s[l].apply(null,c)}catch(f){t(f)}else s.splice(l,1),l--,u--;if(!(o=r.$$listenerCount[e]&&r.$$childHead||r!==i&&r.$$nextSibling))for(;r!==i&&!(o=r.$$nextSibling);)r=r.$parent}return a.currentScope=null,a}};var S=new p,A=S.$$asyncQueue=[],C=S.$$postDigestQueue=[],k=S.$$applyAsyncQueue=[],O=0;return S}]}function Sn(){var e=/^\s*(https?|ftp|mailto|tel|file):/,t=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(t){return y(t)?(e=t,this):e},this.imgSrcSanitizationWhitelist=function(e){return y(e)?(t=e,this):t},this.$get=function(){return function(n,i){var r,o=i?t:e;return r=Ln(n).href,""===r||r.match(o)?n:"unsafe:"+r}}}function An(e){if("self"===e)return e;if(E(e)){if(e.indexOf("***")>-1)throw xo("iwcard","Illegal sequence *** in string matcher.  String: {0}",e);return e=Qi(e).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+e+"$")}if(S(e))return new RegExp("^"+e.source+"$");throw xo("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function Cn(e){var t=[];return y(e)&&i(e,function(e){t.push(An(e))}),t}function kn(){this.SCE_CONTEXTS=wo;var e=["self"],t=[];this.resourceUrlWhitelist=function(t){return arguments.length&&(e=Cn(t)),e},this.resourceUrlBlacklist=function(e){return arguments.length&&(t=Cn(e)),t},this.$get=["$injector",function(n){function i(e,t){return"self"===e?$n(t):!!e.exec(t.href)}function r(n){var r,o,a=Ln(n.toString()),s=!1;for(r=0,o=e.length;r<o;r++)if(i(e[r],a)){s=!0;break}if(s)for(r=0,o=t.length;r<o;r++)if(i(t[r],a)){s=!1;break}return s}function o(e){var t=function(e){this.$$unwrapTrustedValue=function(){return e}};return e&&(t.prototype=new e),t.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},t.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},t}function a(e,t){var n=f.hasOwnProperty(e)?f[e]:null;if(!n)throw xo("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",e,t);if(null===t||v(t)||""===t)return t;if("string"!=typeof t)throw xo("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",e);return new n(t)}function s(e){return e instanceof c?e.$$unwrapTrustedValue():e}function l(e,t){if(null===t||v(t)||""===t)return t;var n=f.hasOwnProperty(e)?f[e]:null;if(n&&t instanceof n)return t.$$unwrapTrustedValue();if(e===wo.RESOURCE_URL){if(r(t))return t;throw xo("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy.  URL: {0}",t.toString())}if(e===wo.HTML)return u(t);throw xo("unsafe","Attempting to use an unsafe value in a safe context.")}var u=function(e){throw xo("unsafe","Attempting to use an unsafe value in a safe context.")};n.has("$sanitize")&&(u=n.get("$sanitize"));var c=o(),f={};return f[wo.HTML]=o(c),f[wo.CSS]=o(c),f[wo.URL]=o(c),f[wo.JS]=o(c),f[wo.RESOURCE_URL]=o(f[wo.URL]),{trustAs:a,getTrusted:l,valueOf:s}}]}function On(){var e=!0;this.enabled=function(t){return arguments.length&&(e=!!t),e},this.$get=["$parse","$sceDelegate",function(t,n){if(e&&Pi<8)throw xo("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 r=me(wo);r.isEnabled=function(){return e},r.trustAs=n.trustAs,r.getTrusted=n.getTrusted,r.valueOf=n.valueOf,e||(r.trustAs=r.getTrusted=function(e,t){return t},r.valueOf=p),r.parseAs=function(e,n){var i=t(n);return i.literal&&i.constant?i:t(n,function(t){return r.getTrusted(e,t)})};var o=r.parseAs,a=r.getTrusted,s=r.trustAs;return i(wo,function(e,t){var n=Di(t);r[Ee("parse_as_"+n)]=function(t){return o(e,t)},r[Ee("get_trusted_"+n)]=function(t){return a(e,t)},r[Ee("trust_as_"+n)]=function(t){return s(e,t)}}),r}]}function In(){this.$get=["$window","$document",function(e,t){var n,i,r={},o=e.chrome&&e.chrome.app&&e.chrome.app.runtime,a=!o&&e.history&&e.history.pushState,s=f((/android (\d+)/.exec(Di((e.navigator||{}).userAgent))||[])[1]),l=/Boxee/i.test((e.navigator||{}).userAgent),u=t[0]||{},c=/^(Moz|webkit|ms)(?=[A-Z])/,h=u.body&&u.body.style,d=!1,p=!1;if(h){for(var g in h)if(i=c.exec(g)){n=i[0],n=n[0].toUpperCase()+n.substr(1);break}n||(n="WebkitOpacity"in h&&"webkit"),d=!!("transition"in h||n+"Transition"in h),p=!!("animation"in h||n+"Animation"in h),!s||d&&p||(d=E(h.webkitTransition),p=E(h.webkitAnimation))}return{history:!(!a||s<4||l),hasEvent:function(e){if("input"===e&&Pi<=11)return!1;if(v(r[e])){var t=u.createElement("div");r[e]="on"+e in t}return r[e]},csp:Ji(),vendorPrefix:n,transitions:d,animations:p,android:s}}]}function Nn(){var e;this.httpOptions=function(t){return t?(e=t,this):e},this.$get=["$templateCache","$http","$q","$sce",function(t,n,i,r){function o(a,s){function l(e){if(!s)throw To("tpload","Failed to load template: {0} (HTTP status: {1} {2})",a,e.status,e.statusText);return i.reject(e)}o.totalPendingRequests++,E(a)&&!v(t.get(a))||(a=r.getTrustedResourceUrl(a));var c=n.defaults&&n.defaults.transformResponse;return Vi(c)?c=c.filter(function(e){return e!==At}):c===At&&(c=null),n.get(a,u({cache:t,transformResponse:c},e))["finally"](function(){o.totalPendingRequests--}).then(function(e){return t.put(a,e.data),e.data},l)}return o.totalPendingRequests=0,o}]}function Mn(){this.$get=["$rootScope","$browser","$location",function(e,t,n){var r={};return r.findBindings=function(e,t,n){var r=e.getElementsByClassName("ng-binding"),o=[];return i(r,function(e){var r=Gi.element(e).data("$binding");r&&i(r,function(i){if(n){var r=new RegExp("(^|\\s)"+Qi(t)+"(\\s|\\||$)");r.test(i)&&o.push(e)}else i.indexOf(t)!=-1&&o.push(e)})}),o},r.findModels=function(e,t,n){for(var i=["ng-","data-ng-","ng\\:"],r=0;r<i.length;++r){var o=n?"=":"*=",a="["+i[r]+"model"+o+'"'+t+'"]',s=e.querySelectorAll(a);if(s.length)return s}},r.getLocation=function(){return n.url()},r.setLocation=function(t){t!==n.url()&&(n.url(t),e.$digest())},r.whenStable=function(e){t.notifyWhenNoOutstandingRequests(e)},r}]}function Dn(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(e,t,n,i,r){function o(o,s,l){T(o)||(l=s,s=o,o=d);var u,c=z(arguments,3),f=y(l)&&!l,h=(f?i:n).defer(),p=h.promise;return u=t.defer(function(){try{h.resolve(o.apply(null,c))}catch(t){h.reject(t),r(t)}finally{delete a[p.$$timeoutId]}f||e.$apply()},s),p.$$timeoutId=u,a[u]=h,p}var a={};return o.cancel=function(e){return!!(e&&e.$$timeoutId in a)&&(a[e.$$timeoutId].reject("canceled"),delete a[e.$$timeoutId],t.defer.cancel(e.$$timeoutId))},o}]}function Ln(e){var t=e;return Pi&&(So.setAttribute("href",t),t=So.href),So.setAttribute("href",t),{href:So.href,protocol:So.protocol?So.protocol.replace(/:$/,""):"",host:So.host,search:So.search?So.search.replace(/^\?/,""):"",hash:So.hash?So.hash.replace(/^#/,""):"",hostname:So.hostname,port:So.port,pathname:"/"===So.pathname.charAt(0)?So.pathname:"/"+So.pathname}}function $n(e){var t=E(e)?Ln(e):e;return t.protocol===Ao.protocol&&t.host===Ao.host}function Rn(){this.$get=g(e)}function Pn(e){function t(e){try{return decodeURIComponent(e)}catch(t){return e}}var n=e[0]||{},i={},r="";return function(){var e,o,a,s,l,u=n.cookie||"";if(u!==r)for(r=u,e=r.split("; "),i={},a=0;a<e.length;a++)o=e[a],s=o.indexOf("="),s>0&&(l=t(o.substring(0,s)),v(i[l])&&(i[l]=t(o.substring(s+1))));return i}}function Fn(){this.$get=Pn}function Un(e){function t(r,o){if(b(r)){var a={};return i(r,function(e,n){a[n]=t(n,e)}),a}return e.factory(r+n,o)}var n="Filter";this.register=t,this.$get=["$injector",function(e){return function(t){return e.get(t+n)}}],t("currency",qn),t("date",oi),t("filter",jn),t("json",ai),t("limitTo",si),t("lowercase",Do),t("number",Wn),t("orderBy",ui),t("uppercase",Lo)}function jn(){return function(e,i,r,o){if(!n(e)){if(null==e)return e;throw t("filter")("notarray","Expected array but received: {0}",e)}o=o||"$";var a,s,l=Bn(i);switch(l){case"function":a=i;break;case"boolean":case"null":case"number":case"string":s=!0;case"object":a=Hn(i,r,o,s);break;default:return e}return Array.prototype.filter.call(e,a)}}function Hn(e,t,n,i){var r,o=b(e)&&n in e;return t===!0?t=j:T(t)||(t=function(e,t){return!v(e)&&(null===e||null===t?e===t:!(b(t)||b(e)&&!m(e))&&(e=Di(""+e),t=Di(""+t),e.indexOf(t)!==-1))}),r=function(r){return o&&!b(r)?zn(r,e[n],t,n,!1):zn(r,e,t,n,i)}}function zn(e,t,n,i,r,o){var a=Bn(e),s=Bn(t);if("string"===s&&"!"===t.charAt(0))return!zn(e,t.substring(1),n,i,r);if(Vi(e))return e.some(function(e){return zn(e,t,n,i,r)});switch(a){case"object":var l;if(r){for(l in e)if("$"!==l.charAt(0)&&zn(e[l],t,n,i,!0))return!0;return!o&&zn(e,t,n,i,!1)}if("object"===s){for(l in t){var u=t[l];if(!T(u)&&!v(u)){var c=l===i,f=c?e:e[l];if(!zn(f,u,n,i,c,c))return!1}}return!0}return n(e,t);case"function":return!1;default:return n(e,t)}}function Bn(e){return null===e?"null":typeof e}function qn(e){var t=e.NUMBER_FORMATS;return function(e,n,i){return v(n)&&(n=t.CURRENCY_SYM),v(i)&&(i=t.PATTERNS[1].maxFrac),null==e?e:Xn(e,t.PATTERNS[1],t.GROUP_SEP,t.DECIMAL_SEP,i).replace(/\u00A4/g,n)}}function Wn(e){var t=e.NUMBER_FORMATS;return function(e,n){return null==e?e:Xn(e,t.PATTERNS[0],t.GROUP_SEP,t.DECIMAL_SEP,n)}}function Yn(e){var t,n,i,r,o,a=0;for((n=e.indexOf(ko))>-1&&(e=e.replace(ko,"")),(i=e.search(/e/i))>0?(n<0&&(n=i),n+=+e.slice(i+1),e=e.substring(0,i)):n<0&&(n=e.length),i=0;e.charAt(i)==Oo;i++);if(i==(o=e.length))t=[0],n=1;else{for(o--;e.charAt(o)==Oo;)o--;for(n-=i,t=[],r=0;i<=o;i++,r++)t[r]=+e.charAt(i)}return n>Co&&(t=t.splice(0,Co-1),a=n-1,n=1),{d:t,e:a,i:n}}function Gn(e,t,n,i){var r=e.d,o=r.length-e.i;t=v(t)?Math.min(Math.max(n,o),i):+t;var a=t+e.i,s=r[a];if(a>0){r.splice(Math.max(e.i,a));for(var l=a;l<r.length;l++)r[l]=0}else{o=Math.max(0,o),e.i=1,r.length=Math.max(1,a=t+1),r[0]=0;for(var u=1;u<a;u++)r[u]=0}if(s>=5)if(a-1<0){for(var c=0;c>a;c--)r.unshift(0),e.i++;r.unshift(1),e.i++}else r[a-1]++;for(;o<Math.max(0,t);o++)r.push(0);var f=r.reduceRight(function(e,t,n,i){return t+=e,i[n]=t%10,Math.floor(t/10)},0);f&&(r.unshift(f),e.i++)}function Xn(e,t,n,i,r){if(!E(e)&&!x(e)||isNaN(e))return"";var o,a=!isFinite(e),s=!1,l=Math.abs(e)+"",u="";if(a)u="∞";else{o=Yn(l),Gn(o,r,t.minFrac,t.maxFrac);var c=o.d,f=o.i,h=o.e,d=[];for(s=c.reduce(function(e,t){return e&&!t},!0);f<0;)c.unshift(0),f++;f>0?d=c.splice(f,c.length):(d=c,c=[0]);var p=[];for(c.length>=t.lgSize&&p.unshift(c.splice(-t.lgSize,c.length).join(""));c.length>t.gSize;)p.unshift(c.splice(-t.gSize,c.length).join(""));c.length&&p.unshift(c.join("")),u=p.join(n),d.length&&(u+=i+d.join("")),h&&(u+="e+"+h)}return e<0&&!s?t.negPre+u+t.negSuf:t.posPre+u+t.posSuf}function Vn(e,t,n,i){var r="";for((e<0||i&&e<=0)&&(i?e=-e+1:(e=-e,r="-")),e=""+e;e.length<t;)e=Oo+e;return n&&(e=e.substr(e.length-t)),r+e}function Kn(e,t,n,i,r){return n=n||0,function(o){var a=o["get"+e]();return(n>0||a>-n)&&(a+=n),0===a&&n==-12&&(a=12),Vn(a,t,i,r)}}function Zn(e,t,n){return function(i,r){var o=i["get"+e](),a=(n?"STANDALONE":"")+(t?"SHORT":""),s=Li(a+e);return r[s][o]}}function Qn(e,t,n){var i=-1*n,r=i>=0?"+":"";return r+=Vn(Math[i>0?"floor":"ceil"](i/60),2)+Vn(Math.abs(i%60),2)}function Jn(e){var t=new Date(e,0,1).getDay();return new Date(e,0,(t<=4?5:12)-t)}function ei(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+(4-e.getDay()))}function ti(e){return function(t){var n=Jn(t.getFullYear()),i=ei(t),r=+i-+n,o=1+Math.round(r/6048e5);return Vn(o,e)}}function ni(e,t){return e.getHours()<12?t.AMPMS[0]:t.AMPMS[1]}function ii(e,t){return e.getFullYear()<=0?t.ERAS[0]:t.ERAS[1]}function ri(e,t){return e.getFullYear()<=0?t.ERANAMES[0]:t.ERANAMES[1]}function oi(e){function t(e){var t;if(t=e.match(n)){var i=new Date(0),r=0,o=0,a=t[8]?i.setUTCFullYear:i.setFullYear,s=t[8]?i.setUTCHours:i.setHours;t[9]&&(r=f(t[9]+t[10]),o=f(t[9]+t[11])),a.call(i,f(t[1]),f(t[2])-1,f(t[3]));var l=f(t[4]||0)-r,u=f(t[5]||0)-o,c=f(t[6]||0),h=Math.round(1e3*parseFloat("0."+(t[7]||0)));return s.call(i,l,u,c,h),i}return e}var n=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(n,r,o){var a,s,l="",u=[];if(r=r||"mediumDate",r=e.DATETIME_FORMATS[r]||r,E(n)&&(n=Mo.test(n)?f(n):t(n)),x(n)&&(n=new Date(n)),!w(n)||!isFinite(n.getTime()))return n;for(;r;)s=No.exec(r),s?(u=H(u,s,1),r=u.pop()):(u.push(r),r=null);var c=n.getTimezoneOffset();return o&&(c=G(o,c),n=V(n,o,!0)),i(u,function(t){a=Io[t],l+=a?a(n,e.DATETIME_FORMATS,c):"''"===t?"'":t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}}function ai(){return function(e,t){return v(t)&&(t=2),W(e,t)}}function si(){return function(e,t,i){return t=Math.abs(Number(t))===1/0?Number(t):f(t),isNaN(t)?e:(x(e)&&(e=e.toString()),n(e)?(i=!i||isNaN(i)?0:f(i),i=i<0?Math.max(0,e.length+i):i,t>=0?li(e,i,i+t):0===i?li(e,t,e.length):li(e,Math.max(0,i+t),i)):e)}}function li(e,t,n){return E(e)?e.slice(t,n):Hi.call(e,t,n)}function ui(e){function i(t){return t.map(function(t){var n=1,i=p;if(T(t))i=t;else if(E(t)&&("+"!=t.charAt(0)&&"-"!=t.charAt(0)||(n="-"==t.charAt(0)?-1:1,t=t.substring(1)),""!==t&&(i=e(t),i.constant))){var r=i();i=function(e){return e[r]}}return{get:i,descending:n}})}function r(e){switch(typeof e){case"number":case"boolean":case"string":return!0;default:return!1}}function o(e){return T(e.valueOf)&&(e=e.valueOf(),r(e))?e:m(e)&&(e=e.toString(),r(e))?e:e}function a(e,t){var n=typeof e;return null===e?(n="string",e="null"):"object"===n&&(e=o(e)),{value:e,type:n,index:t}}function s(e,t){var n=0,i=e.type,r=t.type;if(i===r){var o=e.value,a=t.value;"string"===i?(o=o.toLowerCase(),a=a.toLowerCase()):"object"===i&&(b(o)&&(o=e.index),b(a)&&(a=t.index)),o!==a&&(n=o<a?-1:1)}else n=i<r?-1:1;return n}return function(e,r,o,l){function u(e,t){return{value:e,tieBreaker:{value:t,type:"number",index:t},predicateValues:f.map(function(n){return a(n.get(e),t)})}}function c(e,t){for(var n=0,i=f.length;n<i;n++){var r=d(e.predicateValues[n],t.predicateValues[n]);if(r)return r*f[n].descending*h}return d(e.tieBreaker,t.tieBreaker)*h}if(null==e)return e;if(!n(e))throw t("orderBy")("notarray","Expected array but received: {0}",e);Vi(r)||(r=[r]),0===r.length&&(r=["+"]);var f=i(r),h=o?-1:1,d=T(l)?l:s,p=Array.prototype.map.call(e,u);return p.sort(c),e=p.map(function(e){return e.value})}}function ci(e){return T(e)&&(e={link:e}),e.restrict=e.restrict||"AC",g(e)}function fi(e,t){e.$name=t}function hi(e,t,n,r,o){var a=this,s=[];a.$error={},a.$$success={},a.$pending=void 0,a.$name=o(t.name||t.ngForm||"")(n),a.$dirty=!1,a.$pristine=!0,a.$valid=!0,a.$invalid=!1,a.$submitted=!1,a.$$parentForm=Po,a.$rollbackViewValue=function(){i(s,function(e){e.$rollbackViewValue()})},a.$commitViewValue=function(){i(s,function(e){e.$commitViewValue()})},a.$addControl=function(e){fe(e.$name,"input"),s.push(e),e.$name&&(a[e.$name]=e),e.$$parentForm=a},a.$$renameControl=function(e,t){var n=e.$name;a[n]===e&&delete a[n],a[t]=e,e.$name=t},a.$removeControl=function(e){e.$name&&a[e.$name]===e&&delete a[e.$name],i(a.$pending,function(t,n){a.$setValidity(n,null,e)}),i(a.$error,function(t,n){a.$setValidity(n,null,e)}),i(a.$$success,function(t,n){a.$setValidity(n,null,e)}),F(s,e),e.$$parentForm=Po},Ci({ctrl:this,$element:e,set:function(e,t,n){var i=e[t];if(i){var r=i.indexOf(n);r===-1&&i.push(n)}else e[t]=[n]},unset:function(e,t,n){var i=e[t];i&&(F(i,n),0===i.length&&delete e[t])},$animate:r}),a.$setDirty=function(){r.removeClass(e,Ea),r.addClass(e,xa),a.$dirty=!0,a.$pristine=!1,a.$$parentForm.$setDirty()},a.$setPristine=function(){r.setClass(e,Ea,xa+" "+Fo),a.$dirty=!1,a.$pristine=!0,a.$submitted=!1,i(s,function(e){e.$setPristine()})},a.$setUntouched=function(){i(s,function(e){e.$setUntouched()})},a.$setSubmitted=function(){r.addClass(e,Fo),a.$submitted=!0,a.$$parentForm.$setSubmitted()}}function di(e){e.$formatters.push(function(t){return e.$isEmpty(t)?t:t.toString()})}function pi(e,t,n,i,r,o){gi(e,t,n,i,r,o),di(i)}function gi(e,t,n,i,r,o){var a=Di(t[0].type);if(!r.android){var s=!1;t.on("compositionstart",function(){s=!0}),t.on("compositionend",function(){s=!1,u()})}var l,u=function(e){if(l&&(o.defer.cancel(l),l=null),!s){var r=t.val(),u=e&&e.type;"password"===a||n.ngTrim&&"false"===n.ngTrim||(r=Zi(r)),(i.$viewValue!==r||""===r&&i.$$hasNativeValidators)&&i.$setViewValue(r,u)}};if(r.hasEvent("input"))t.on("input",u);else{var c=function(e,t,n){l||(l=o.defer(function(){l=null,t&&t.value===n||u(e)}))};t.on("keydown",function(e){var t=e.keyCode;91===t||15<t&&t<19||37<=t&&t<=40||c(e,this,this.value)}),r.hasEvent("paste")&&t.on("paste cut",c)}t.on("change",u),Qo[a]&&i.$$hasNativeValidators&&a===n.type&&t.on(Zo,function(e){if(!l){var t=this[Ni],n=t.badInput,i=t.typeMismatch;l=o.defer(function(){l=null,t.badInput===n&&t.typeMismatch===i||u(e)})}}),i.$render=function(){var e=i.$isEmpty(i.$viewValue)?"":i.$viewValue;t.val()!==e&&t.val(e)}}function mi(e,t){if(w(e))return e;if(E(e)){Xo.lastIndex=0;var n=Xo.exec(e);if(n){var i=+n[1],r=+n[2],o=0,a=0,s=0,l=0,u=Jn(i),c=7*(r-1);return t&&(o=t.getHours(),a=t.getMinutes(),s=t.getSeconds(),l=t.getMilliseconds()),new Date(i,0,u.getDate()+c,o,a,s,l)}}return NaN}function vi(e,t){return function(n,r){var o,a;if(w(n))return n;if(E(n)){if('"'==n.charAt(0)&&'"'==n.charAt(n.length-1)&&(n=n.substring(1,n.length-1)),zo.test(n))return new Date(n);if(e.lastIndex=0,o=e.exec(n))return o.shift(),a=r?{yyyy:r.getFullYear(),MM:r.getMonth()+1,dd:r.getDate(),HH:r.getHours(),mm:r.getMinutes(),ss:r.getSeconds(),sss:r.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},i(o,function(e,n){n<t.length&&(a[t[n]]=+e)}),new Date(a.yyyy,a.MM-1,a.dd,a.HH,a.mm,a.ss||0,1e3*a.sss||0)}return NaN}}function yi(e,t,n,i){return function(r,o,a,s,l,u,c){function f(e){return e&&!(e.getTime&&e.getTime()!==e.getTime())}function h(e){return y(e)&&!w(e)?n(e)||void 0:e}bi(r,o,a,s),gi(r,o,a,s,l,u);var d,p=s&&s.$options&&s.$options.timezone;if(s.$$parserName=e,s.$parsers.push(function(e){if(s.$isEmpty(e))return null;if(t.test(e)){var i=n(e,d);return p&&(i=V(i,p)),i}}),s.$formatters.push(function(e){if(e&&!w(e))throw ka("datefmt","Expected `{0}` to be a date",e);return f(e)?(d=e,d&&p&&(d=V(d,p,!0)),c("date")(e,i,p)):(d=null,"")}),y(a.min)||a.ngMin){var g;s.$validators.min=function(e){return!f(e)||v(g)||n(e)>=g},a.$observe("min",function(e){
g=h(e),s.$validate()})}if(y(a.max)||a.ngMax){var m;s.$validators.max=function(e){return!f(e)||v(m)||n(e)<=m},a.$observe("max",function(e){m=h(e),s.$validate()})}}}function bi(e,t,n,i){var r=t[0],o=i.$$hasNativeValidators=b(r.validity);o&&i.$parsers.push(function(e){var n=t.prop(Ni)||{};return n.badInput||n.typeMismatch?void 0:e})}function _i(e,t,n,i,r,o){if(bi(e,t,n,i),gi(e,t,n,i,r,o),i.$$parserName="number",i.$parsers.push(function(e){return i.$isEmpty(e)?null:Wo.test(e)?parseFloat(e):void 0}),i.$formatters.push(function(e){if(!i.$isEmpty(e)){if(!x(e))throw ka("numfmt","Expected `{0}` to be a number",e);e=e.toString()}return e}),y(n.min)||n.ngMin){var a;i.$validators.min=function(e){return i.$isEmpty(e)||v(a)||e>=a},n.$observe("min",function(e){y(e)&&!x(e)&&(e=parseFloat(e)),a=x(e)&&!isNaN(e)?e:void 0,i.$validate()})}if(y(n.max)||n.ngMax){var s;i.$validators.max=function(e){return i.$isEmpty(e)||v(s)||e<=s},n.$observe("max",function(e){y(e)&&!x(e)&&(e=parseFloat(e)),s=x(e)&&!isNaN(e)?e:void 0,i.$validate()})}}function Ei(e,t,n,i,r,o){gi(e,t,n,i,r,o),di(i),i.$$parserName="url",i.$validators.url=function(e,t){var n=e||t;return i.$isEmpty(n)||Bo.test(n)}}function xi(e,t,n,i,r,o){gi(e,t,n,i,r,o),di(i),i.$$parserName="email",i.$validators.email=function(e,t){var n=e||t;return i.$isEmpty(n)||qo.test(n)}}function wi(e,t,n,i){v(n.name)&&t.attr("name",a());var r=function(e){t[0].checked&&i.$setViewValue(n.value,e&&e.type)};t.on("click",r),i.$render=function(){var e=n.value;t[0].checked=e==i.$viewValue},n.$observe("value",i.$render)}function Ti(e,t,n,i,r){var o;if(y(i)){if(o=e(i),!o.constant)throw ka("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",n,i);return o(t)}return r}function Si(e,t,n,i,r,o,a,s){var l=Ti(s,e,"ngTrueValue",n.ngTrueValue,!0),u=Ti(s,e,"ngFalseValue",n.ngFalseValue,!1),c=function(e){i.$setViewValue(t[0].checked,e&&e.type)};t.on("click",c),i.$render=function(){t[0].checked=i.$viewValue},i.$isEmpty=function(e){return e===!1},i.$formatters.push(function(e){return j(e,l)}),i.$parsers.push(function(e){return e?l:u})}function Ai(e,t){return e="ngClass"+e,["$animate",function(n){function r(e,t){var n=[];e:for(var i=0;i<e.length;i++){for(var r=e[i],o=0;o<t.length;o++)if(r==t[o])continue e;n.push(r)}return n}function o(e){var t=[];return Vi(e)?(i(e,function(e){t=t.concat(o(e))}),t):E(e)?e.split(" "):b(e)?(i(e,function(e,n){e&&(t=t.concat(n.split(" ")))}),t):e}return{restrict:"AC",link:function(a,s,l){function u(e){var t=f(e,1);l.$addClass(t)}function c(e){var t=f(e,-1);l.$removeClass(t)}function f(e,t){var n=s.data("$classCounts")||pe(),r=[];return i(e,function(e){(t>0||n[e])&&(n[e]=(n[e]||0)+t,n[e]===+(t>0)&&r.push(e))}),s.data("$classCounts",n),r.join(" ")}function h(e,t){var i=r(t,e),o=r(e,t);i=f(i,1),o=f(o,-1),i&&i.length&&n.addClass(s,i),o&&o.length&&n.removeClass(s,o)}function d(e){if(t===!0||(1&a.$index)===t){var n=o(e||[]);if(p){if(!j(e,p)){var i=o(p);h(i,n)}}else u(n)}p=Vi(e)?e.map(function(e){return me(e)}):me(e)}var p;a.$watch(l[e],d,!0),l.$observe("class",function(t){d(a.$eval(l[e]))}),"ngClass"!==e&&a.$watch("$index",function(n,i){var r=1&n;if(r!==(1&i)){var s=o(a.$eval(l[e]));r===t?u(s):c(s)}})}}}]}function Ci(e){function t(e,t,s){v(t)?n("$pending",e,s):i("$pending",e,s),N(t)?t?(c(a.$error,e,s),u(a.$$success,e,s)):(u(a.$error,e,s),c(a.$$success,e,s)):(c(a.$error,e,s),c(a.$$success,e,s)),a.$pending?(r(Sa,!0),a.$valid=a.$invalid=void 0,o("",null)):(r(Sa,!1),a.$valid=ki(a.$error),a.$invalid=!a.$valid,o("",a.$valid));var l;l=a.$pending&&a.$pending[e]?void 0:!a.$error[e]&&(!!a.$$success[e]||null),o(e,l),a.$$parentForm.$setValidity(e,l,a)}function n(e,t,n){a[e]||(a[e]={}),u(a[e],t,n)}function i(e,t,n){a[e]&&c(a[e],t,n),ki(a[e])&&(a[e]=void 0)}function r(e,t){t&&!l[e]?(f.addClass(s,e),l[e]=!0):!t&&l[e]&&(f.removeClass(s,e),l[e]=!1)}function o(e,t){e=e?"-"+se(e,"-"):"",r(ba+e,t===!0),r(_a+e,t===!1)}var a=e.ctrl,s=e.$element,l={},u=e.set,c=e.unset,f=e.$animate;l[_a]=!(l[ba]=s.hasClass(ba)),a.$setValidity=t}function ki(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function Oi(e){e[0].hasAttribute("selected")&&(e[0].selected=!0)}var Ii=/^\/(.+)\/([a-z]*)$/,Ni="validity",Mi=Object.prototype.hasOwnProperty,Di=function(e){return E(e)?e.toLowerCase():e},Li=function(e){return E(e)?e.toUpperCase():e},$i=function(e){return E(e)?e.replace(/[A-Z]/g,function(e){return String.fromCharCode(32|e.charCodeAt(0))}):e},Ri=function(e){return E(e)?e.replace(/[a-z]/g,function(e){return String.fromCharCode(e.charCodeAt(0)&-33)}):e};"i"!=="I".toLowerCase()&&(Di=$i,Li=Ri);var Pi,Fi,Ui,ji,Hi=[].slice,zi=[].splice,Bi=[].push,qi=Object.prototype.toString,Wi=Object.getPrototypeOf,Yi=t("ng"),Gi=e.angular||(e.angular={}),Xi=0;Pi=e.document.documentMode,d.$inject=[],p.$inject=[];var Vi=Array.isArray,Ki=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/,Zi=function(e){return E(e)?e.trim():e},Qi=function(e){return e.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},Ji=function(){function t(){try{return new Function(""),!1}catch(e){return!0}}if(!y(Ji.rules)){var n=e.document.querySelector("[ng-csp]")||e.document.querySelector("[data-ng-csp]");if(n){var i=n.getAttribute("ng-csp")||n.getAttribute("data-ng-csp");Ji.rules={noUnsafeEval:!i||i.indexOf("no-unsafe-eval")!==-1,noInlineStyle:!i||i.indexOf("no-inline-style")!==-1}}else Ji.rules={noUnsafeEval:t(),noInlineStyle:!1}}return Ji.rules},er=function(){if(y(er.name_))return er.name_;var t,n,i,r,o=nr.length;for(n=0;n<o;++n)if(i=nr[n],t=e.document.querySelector("["+i.replace(":","\\:")+"jq]")){r=t.getAttribute(i+"jq");break}return er.name_=r},tr=/:/g,nr=["ng-","data-ng-","ng:","x-ng-"],ir=/[A-Z]/g,rr=!1,or=1,ar=2,sr=3,lr=8,ur=9,cr=11,fr={full:"1.5.8",major:1,minor:5,dot:8,codeName:"arbitrary-fallbacks"};Oe.expando="ng339";var hr=Oe.cache={},dr=1,pr=function(e,t,n){e.addEventListener(t,n,!1)},gr=function(e,t,n){e.removeEventListener(t,n,!1)};Oe._data=function(e){return this.cache[e[this.expando]]||{}};var mr=/([\:\-\_]+(.))/g,vr=/^moz([A-Z])/,yr={mouseleave:"mouseout",mouseenter:"mouseover"},br=t("jqLite"),_r=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Er=/<|&#?\w+;/,xr=/<([\w:-]+)/,wr=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,Tr={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,"",""]};Tr.optgroup=Tr.option,Tr.tbody=Tr.tfoot=Tr.colgroup=Tr.caption=Tr.thead,Tr.th=Tr.td;var Sr=e.Node.prototype.contains||function(e){return!!(16&this.compareDocumentPosition(e))},Ar=Oe.prototype={ready:function(t){function n(){i||(i=!0,t())}var i=!1;"complete"===e.document.readyState?e.setTimeout(n):(this.on("DOMContentLoaded",n),Oe(e).on("load",n))},toString:function(){var e=[];return i(this,function(t){e.push(""+t)}),"["+e.join(", ")+"]"},eq:function(e){return Fi(e>=0?this[e]:this[this.length+e])},length:0,push:Bi,sort:[].sort,splice:[].splice},Cr={};i("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(e){Cr[Di(e)]=e});var kr={};i("input,select,option,textarea,button,form,details".split(","),function(e){kr[e]=!0});var Or={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};i({data:$e,removeData:De,hasData:Te,cleanData:Se},function(e,t){Oe[t]=e}),i({data:$e,inheritedData:He,scope:function(e){return Fi.data(e,"$scope")||He(e.parentNode||e,["$isolateScope","$scope"])},isolateScope:function(e){return Fi.data(e,"$isolateScope")||Fi.data(e,"$isolateScopeNoTemplate")},controller:je,injector:function(e){return He(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:Re,css:function(e,t,n){return t=Ee(t),y(n)?void(e.style[t]=n):e.style[t]},attr:function(e,t,n){var i=e.nodeType;if(i!==sr&&i!==ar&&i!==lr){var r=Di(t);if(Cr[r]){if(!y(n))return e[t]||(e.attributes.getNamedItem(t)||d).specified?r:void 0;n?(e[t]=!0,e.setAttribute(t,r)):(e[t]=!1,e.removeAttribute(r))}else if(y(n))e.setAttribute(t,n);else if(e.getAttribute){var o=e.getAttribute(t,2);return null===o?void 0:o}}},prop:function(e,t,n){return y(n)?void(e[t]=n):e[t]},text:function(){function e(e,t){if(v(t)){var n=e.nodeType;return n===or||n===sr?e.textContent:""}e.textContent=t}return e.$dv="",e}(),val:function(e,t){if(v(t)){if(e.multiple&&"select"===P(e)){var n=[];return i(e.options,function(e){e.selected&&n.push(e.value||e.text)}),0===n.length?null:n}return e.value}e.value=t},html:function(e,t){return v(t)?e.innerHTML:(Ne(e,!0),void(e.innerHTML=t))},empty:ze},function(e,t){Oe.prototype[t]=function(t,n){var i,r,o=this.length;if(e!==ze&&v(2==e.length&&e!==Re&&e!==je?t:n)){if(b(t)){for(i=0;i<o;i++)if(e===$e)e(this[i],t);else for(r in t)e(this[i],r,t[r]);return this}for(var a=e.$dv,s=v(a)?Math.min(o,1):o,l=0;l<s;l++){var u=e(this[l],t,n);a=a?a+u:u}return a}for(i=0;i<o;i++)e(this[i],t,n);return this}}),i({removeData:De,on:function(e,t,n,i){if(y(i))throw br("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(we(e)){var r=Le(e,!0),o=r.events,a=r.handle;a||(a=r.handle=Ge(e,o));for(var s=t.indexOf(" ")>=0?t.split(" "):[t],l=s.length,u=function(t,i,r){var s=o[t];s||(s=o[t]=[],s.specialHandlerWrapper=i,"$destroy"===t||r||pr(e,t,a)),s.push(n)};l--;)t=s[l],yr[t]?(u(yr[t],Ve),u(t,void 0,!0)):u(t)}},off:Me,one:function(e,t,n){e=Fi(e),e.on(t,function i(){e.off(t,n),e.off(t,i)}),e.on(t,n)},replaceWith:function(e,t){var n,r=e.parentNode;Ne(e),i(new Oe(t),function(t){n?r.insertBefore(t,n.nextSibling):r.replaceChild(t,e),n=t})},children:function(e){var t=[];return i(e.childNodes,function(e){e.nodeType===or&&t.push(e)}),t},contents:function(e){return e.contentDocument||e.childNodes||[]},append:function(e,t){var n=e.nodeType;if(n===or||n===cr){t=new Oe(t);for(var i=0,r=t.length;i<r;i++){var o=t[i];e.appendChild(o)}}},prepend:function(e,t){if(e.nodeType===or){var n=e.firstChild;i(new Oe(t),function(t){e.insertBefore(t,n)})}},wrap:function(e,t){ke(e,Fi(t).eq(0).clone()[0])},remove:Be,detach:function(e){Be(e,!0)},after:function(e,t){var n=e,i=e.parentNode;t=new Oe(t);for(var r=0,o=t.length;r<o;r++){var a=t[r];i.insertBefore(a,n.nextSibling),n=a}},addClass:Fe,removeClass:Pe,toggleClass:function(e,t,n){t&&i(t.split(" "),function(t){var i=n;v(i)&&(i=!Re(e,t)),(i?Fe:Pe)(e,t)})},parent:function(e){var t=e.parentNode;return t&&t.nodeType!==cr?t:null},next:function(e){return e.nextElementSibling},find:function(e,t){return e.getElementsByTagName?e.getElementsByTagName(t):[]},clone:Ie,triggerHandler:function(e,t,n){var r,o,a,s=t.type||t,l=Le(e),c=l&&l.events,f=c&&c[s];f&&(r={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented===!0},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return this.immediatePropagationStopped===!0},stopPropagation:d,type:s,target:e},t.type&&(r=u(r,t)),o=me(f),a=n?[r].concat(n):[r],i(o,function(t){r.isImmediatePropagationStopped()||t.apply(e,a)}))}},function(e,t){Oe.prototype[t]=function(t,n,i){for(var r,o=0,a=this.length;o<a;o++)v(r)?(r=e(this[o],t,n,i),y(r)&&(r=Fi(r))):Ue(r,e(this[o],t,n,i));return y(r)?r:this},Oe.prototype.bind=Oe.prototype.on,Oe.prototype.unbind=Oe.prototype.off}),Qe.prototype={put:function(e,t){this[Ze(e,this.nextUid)]=t},get:function(e){return this[Ze(e,this.nextUid)]},remove:function(e){var t=this[e=Ze(e,this.nextUid)];return delete this[e],t}};var Ir=[function(){this.$get=[function(){return Qe}]}],Nr=/^([^\(]+?)=>/,Mr=/^[^\(]*\(\s*([^\)]*)\)/m,Dr=/,/,Lr=/^\s*(_?)(\S+?)\1\s*$/,$r=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Rr=t("$injector");it.$$annotate=nt;var Pr=t("$animate"),Fr=1,Ur="ng-animate",jr=function(){this.$get=d},Hr=function(){var e=new Qe,t=[];this.$get=["$$AnimateRunner","$rootScope",function(n,r){function o(e,t,n){var r=!1;return t&&(t=E(t)?t.split(" "):Vi(t)?t:[],i(t,function(t){t&&(r=!0,e[t]=n)})),r}function a(){i(t,function(t){var n=e.get(t);if(n){var r=st(t.attr("class")),o="",a="";i(n,function(e,t){var n=!!r[t];e!==n&&(e?o+=(o.length?" ":"")+t:a+=(a.length?" ":"")+t)}),i(t,function(e){o&&Fe(e,o),a&&Pe(e,a)}),e.remove(t)}}),t.length=0}function s(n,i,s){var l=e.get(n)||{},u=o(l,i,!0),c=o(l,s,!1);(u||c)&&(e.put(n,l),t.push(n),1===t.length&&r.$$postDigest(a))}return{enabled:d,on:d,off:d,pin:d,push:function(e,t,i,r){r&&r(),i=i||{},i.from&&e.css(i.from),i.to&&e.css(i.to),(i.addClass||i.removeClass)&&s(e,i.addClass,i.removeClass);var o=new n;return o.complete(),o}}}]},zr=["$provide",function(e){var t=this;this.$$registeredAnimations=Object.create(null),this.register=function(n,i){if(n&&"."!==n.charAt(0))throw Pr("notcsel","Expecting class selector starting with '.' got '{0}'.",n);var r=n+"-animation";t.$$registeredAnimations[n.substr(1)]=r,e.factory(r,i)},this.classNameFilter=function(e){if(1===arguments.length&&(this.$$classNameFilter=e instanceof RegExp?e:null,this.$$classNameFilter)){var t=new RegExp("(\\s+|\\/)"+Ur+"(\\s+|\\/)");if(t.test(this.$$classNameFilter.toString()))throw Pr("nongcls",'$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.',Ur)}return this.$$classNameFilter},this.$get=["$$animateQueue",function(e){function t(e,t,n){if(n){var i=at(n);!i||i.parentNode||i.previousElementSibling||(n=null)}n?n.after(e):t.prepend(e)}return{on:e.on,off:e.off,pin:e.pin,enabled:e.enabled,cancel:function(e){e.end&&e.end()},enter:function(n,i,r,o){return i=i&&Fi(i),r=r&&Fi(r),i=i||r.parent(),t(n,i,r),e.push(n,"enter",lt(o))},move:function(n,i,r,o){return i=i&&Fi(i),r=r&&Fi(r),i=i||r.parent(),t(n,i,r),e.push(n,"move",lt(o))},leave:function(t,n){return e.push(t,"leave",lt(n),function(){t.remove()})},addClass:function(t,n,i){return i=lt(i),i.addClass=ot(i.addclass,n),e.push(t,"addClass",i)},removeClass:function(t,n,i){return i=lt(i),i.removeClass=ot(i.removeClass,n),e.push(t,"removeClass",i)},setClass:function(t,n,i,r){return r=lt(r),r.addClass=ot(r.addClass,n),r.removeClass=ot(r.removeClass,i),e.push(t,"setClass",r)},animate:function(t,n,i,r,o){return o=lt(o),o.from=o.from?u(o.from,n):n,o.to=o.to?u(o.to,i):i,r=r||"ng-inline-animate",o.tempClasses=ot(o.tempClasses,r),e.push(t,"animate",o)}}}]}],Br=function(){this.$get=["$$rAF",function(e){function t(t){n.push(t),n.length>1||e(function(){for(var e=0;e<n.length;e++)n[e]();n=[]})}var n=[];return function(){var e=!1;return t(function(){e=!0}),function(n){e?n():t(n)}}}]},qr=function(){this.$get=["$q","$sniffer","$$animateAsyncRun","$document","$timeout",function(e,t,n,r,o){function a(e){this.setHost(e);var t=n(),i=function(e){o(e,0,!1)};this._doneCallbacks=[],this._tick=function(e){var n=r[0];n&&n.hidden?i(e):t(e)},this._state=0}var s=0,l=1,u=2;return a.chain=function(e,t){function n(){return i===e.length?void t(!0):void e[i](function(e){return e===!1?void t(!1):(i++,void n())})}var i=0;n()},a.all=function(e,t){function n(n){o=o&&n,++r===e.length&&t(o)}var r=0,o=!0;i(e,function(e){e.done(n)})},a.prototype={setHost:function(e){this.host=e||{}},done:function(e){this._state===u?e():this._doneCallbacks.push(e)},progress:d,getPromise:function(){if(!this.promise){var t=this;this.promise=e(function(e,n){t.done(function(t){t===!1?n():e()})})}return this.promise},then:function(e,t){return this.getPromise().then(e,t)},"catch":function(e){return this.getPromise()["catch"](e)},"finally":function(e){return this.getPromise()["finally"](e)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&&this.host.resume()},end:function(){this.host.end&&this.host.end(),this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel(),this._resolve(!1)},complete:function(e){var t=this;t._state===s&&(t._state=l,t._tick(function(){t._resolve(e)}))},_resolve:function(e){this._state!==u&&(i(this._doneCallbacks,function(t){t(e)}),this._doneCallbacks.length=0,this._state=u)}},a}]},Wr=function(){this.$get=["$$rAF","$q","$$AnimateRunner",function(e,t,n){return function(t,i){function r(){return e(function(){o(),s||l.complete(),s=!0}),l}function o(){a.addClass&&(t.addClass(a.addClass),a.addClass=null),a.removeClass&&(t.removeClass(a.removeClass),a.removeClass=null),a.to&&(t.css(a.to),a.to=null)}var a=i||{};a.$$prepared||(a=U(a)),a.cleanupStyles&&(a.from=a.to=null),a.from&&(t.css(a.from),a.from=null);var s,l=new n;return{start:r,end:r}}}]},Yr=t("$compile"),Gr=new dt;pt.$inject=["$provide","$$sanitizeUriProvider"],gt.prototype.isFirstChange=function(){return this.previousValue===Gr};var Xr=/^((?:x|data)[\:\-_])/i,Vr=t("$controller"),Kr=/^(\S+)(\s+as\s+([\w$]+))?$/,Zr=function(){this.$get=["$document",function(e){return function(t){return t?!t.nodeType&&t instanceof Fi&&(t=t[0]):t=e[0].body,t.offsetWidth+1}}]},Qr="application/json",Jr={"Content-Type":Qr+";charset=utf-8"},eo=/^\[|^\{(?!\{)/,to={"[":/]$/,"{":/}$/},no=/^\)\]\}',?\n/,io=t("$http"),ro=function(e){return function(){throw io("legacy","The method `{0}` on the promise returned from `$http` has been disabled.",e)}},oo=Gi.$interpolateMinErr=t("$interpolate");oo.throwNoconcat=function(e){throw oo("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",e)},oo.interr=function(e,t){return oo("interr","Can't interpolate: {0}\n{1}",e,t.toString())};var ao=function(){this.$get=["$window",function(e){function t(e){var t=function(e){t.data=e,t.called=!0};return t.id=e,t}var n=e.angular.callbacks,i={};return{createCallback:function(e){var r="_"+(n.$$counter++).toString(36),o="angular.callbacks."+r,a=t(r);return i[o]=n[r]=a,o},wasCalled:function(e){return i[e].called},getResponse:function(e){return i[e].data},removeCallback:function(e){var t=i[e];delete n[t.id],delete i[e]}}}]},so=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,lo={http:80,https:443,ftp:21},uo=t("$location"),co={$$absUrl:"",$$html5:!1,$$replace:!1,absUrl:Kt("$$absUrl"),url:function(e){if(v(e))return this.$$url;var t=so.exec(e);return(t[1]||""===e)&&this.path(decodeURIComponent(t[1])),(t[2]||t[1]||""===e)&&this.search(t[3]||""),this.hash(t[5]||""),this},protocol:Kt("$$protocol"),host:Kt("$$host"),port:Kt("$$port"),path:Zt("$$path",function(e){return e=null!==e?e.toString():"","/"==e.charAt(0)?e:"/"+e}),search:function(e,t){switch(arguments.length){case 0:return this.$$search;case 1:if(E(e)||x(e))e=e.toString(),this.$$search=Q(e);else{if(!b(e))throw uo("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");e=U(e,{}),i(e,function(t,n){null==t&&delete e[n]}),this.$$search=e}break;default:v(t)||null===t?delete this.$$search[e]:this.$$search[e]=t}return this.$$compose(),this},hash:Zt("$$hash",function(e){return null!==e?e.toString():""}),replace:function(){return this.$$replace=!0,this}};i([Vt,Xt,Gt],function(e){e.prototype=Object.create(co),e.prototype.state=function(t){if(!arguments.length)return this.$$state;if(e!==Gt||!this.$$html5)throw uo("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=v(t)?null:t,this}});var fo=t("$parse"),ho=Function.prototype.call,po=Function.prototype.apply,go=Function.prototype.bind,mo=pe();i("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(e){mo[e]=!0});var vo={n:"\n",f:"\f",r:"\r",t:"\t",v:"\x0B","'":"'",'"':'"'},yo=function(e){this.options=e};yo.prototype={constructor:yo,lex:function(e){for(this.text=e,this.index=0,this.tokens=[];this.index<this.text.length;){var t=this.text.charAt(this.index);if('"'===t||"'"===t)this.readString(t);else if(this.isNumber(t)||"."===t&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdentifierStart(this.peekMultichar()))this.readIdent();else if(this.is(t,"(){}[].,;:?"))this.tokens.push({index:this.index,text:t}),this.index++;else if(this.isWhitespace(t))this.index++;else{var n=t+this.peek(),i=n+this.peek(2),r=mo[t],o=mo[n],a=mo[i];if(r||o||a){var s=a?i:o?n:t;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(e,t){return t.indexOf(e)!==-1},peek:function(e){var t=e||1;return this.index+t<this.text.length&&this.text.charAt(this.index+t)},isNumber:function(e){return"0"<=e&&e<="9"&&"string"==typeof e},isWhitespace:function(e){return" "===e||"\r"===e||"\t"===e||"\n"===e||"\x0B"===e||" "===e},isIdentifierStart:function(e){return this.options.isIdentifierStart?this.options.isIdentifierStart(e,this.codePointAt(e)):this.isValidIdentifierStart(e)},isValidIdentifierStart:function(e){return"a"<=e&&e<="z"||"A"<=e&&e<="Z"||"_"===e||"$"===e},isIdentifierContinue:function(e){return this.options.isIdentifierContinue?this.options.isIdentifierContinue(e,this.codePointAt(e)):this.isValidIdentifierContinue(e)},isValidIdentifierContinue:function(e,t){return this.isValidIdentifierStart(e,t)||this.isNumber(e)},codePointAt:function(e){return 1===e.length?e.charCodeAt(0):(e.charCodeAt(0)<<10)+e.charCodeAt(1)-56613888},peekMultichar:function(){var e=this.text.charAt(this.index),t=this.peek();if(!t)return e;var n=e.charCodeAt(0),i=t.charCodeAt(0);return n>=55296&&n<=56319&&i>=56320&&i<=57343?e+t:e},isExpOperator:function(e){return"-"===e||"+"===e||this.isNumber(e)},throwError:function(e,t,n){n=n||this.index;var i=y(t)?"s "+t+"-"+this.index+" ["+this.text.substring(t,n)+"]":" "+n;throw fo("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",e,i,this.text)},readNumber:function(){for(var e="",t=this.index;this.index<this.text.length;){var n=Di(this.text.charAt(this.index));if("."==n||this.isNumber(n))e+=n;else{var i=this.peek();if("e"==n&&this.isExpOperator(i))e+=n;else if(this.isExpOperator(n)&&i&&this.isNumber(i)&&"e"==e.charAt(e.length-1))e+=n;else{if(!this.isExpOperator(n)||i&&this.isNumber(i)||"e"!=e.charAt(e.length-1))break;this.throwError("Invalid exponent")}}this.index++}this.tokens.push({index:t,text:e,constant:!0,value:Number(e)})},readIdent:function(){var e=this.index;for(this.index+=this.peekMultichar().length;this.index<this.text.length;){var t=this.peekMultichar();if(!this.isIdentifierContinue(t))break;this.index+=t.length}this.tokens.push({index:e,text:this.text.slice(e,this.index),identifier:!0})},readString:function(e){var t=this.index;this.index++;for(var n="",i=e,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=vo[o];n+=s||o}r=!1}else if("\\"===o)r=!0;else{if(o===e)return this.index++,void this.tokens.push({index:t,text:i,constant:!0,value:n});n+=o}this.index++}this.throwError("Unterminated quote",t)}};var bo=function(e,t){this.lexer=e,this.options=t};bo.Program="Program",bo.ExpressionStatement="ExpressionStatement",bo.AssignmentExpression="AssignmentExpression",bo.ConditionalExpression="ConditionalExpression",bo.LogicalExpression="LogicalExpression",bo.BinaryExpression="BinaryExpression",bo.UnaryExpression="UnaryExpression",bo.CallExpression="CallExpression",bo.MemberExpression="MemberExpression",bo.Identifier="Identifier",bo.Literal="Literal",bo.ArrayExpression="ArrayExpression",bo.Property="Property",bo.ObjectExpression="ObjectExpression",bo.ThisExpression="ThisExpression",bo.LocalsExpression="LocalsExpression",bo.NGValueParameter="NGValueParameter",bo.prototype={ast:function(e){this.text=e,this.tokens=this.lexer.lex(e);var t=this.program();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),t},program:function(){for(var e=[];;)if(this.tokens.length>0&&!this.peek("}",")",";","]")&&e.push(this.expressionStatement()),!this.expect(";"))return{type:bo.Program,body:e}},expressionStatement:function(){return{type:bo.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var e,t=this.expression();e=this.expect("|");)t=this.filter(t);return t},expression:function(){return this.assignment()},assignment:function(){var e=this.ternary();return this.expect("=")&&(e={type:bo.AssignmentExpression,left:e,right:this.assignment(),operator:"="}),e},ternary:function(){var e,t,n=this.logicalOR();return this.expect("?")&&(e=this.expression(),this.consume(":"))?(t=this.expression(),{type:bo.ConditionalExpression,test:n,alternate:e,consequent:t}):n},logicalOR:function(){for(var e=this.logicalAND();this.expect("||");)e={type:bo.LogicalExpression,operator:"||",left:e,right:this.logicalAND()};return e},logicalAND:function(){for(var e=this.equality();this.expect("&&");)e={type:bo.LogicalExpression,operator:"&&",left:e,right:this.equality()};return e},equality:function(){for(var e,t=this.relational();e=this.expect("==","!=","===","!==");)t={type:bo.BinaryExpression,operator:e.text,left:t,right:this.relational()};return t},relational:function(){for(var e,t=this.additive();e=this.expect("<",">","<=",">=");)t={type:bo.BinaryExpression,operator:e.text,left:t,right:this.additive()};return t},additive:function(){for(var e,t=this.multiplicative();e=this.expect("+","-");)t={type:bo.BinaryExpression,operator:e.text,left:t,right:this.multiplicative()};return t},multiplicative:function(){for(var e,t=this.unary();e=this.expect("*","/","%");)t={type:bo.BinaryExpression,operator:e.text,left:t,right:this.unary()};return t},unary:function(){var e;return(e=this.expect("+","-","!"))?{type:bo.UnaryExpression,operator:e.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var e;this.expect("(")?(e=this.filterChain(),this.consume(")")):this.expect("[")?e=this.arrayDeclaration():this.expect("{")?e=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?e=U(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?e={type:bo.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?e=this.identifier():this.peek().constant?e=this.constant():this.throwError("not a primary expression",this.peek());for(var t;t=this.expect("(","[",".");)"("===t.text?(e={type:bo.CallExpression,callee:e,arguments:this.parseArguments()},this.consume(")")):"["===t.text?(e={type:bo.MemberExpression,object:e,property:this.expression(),computed:!0},this.consume("]")):"."===t.text?e={type:bo.MemberExpression,object:e,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return e},filter:function(e){for(var t=[e],n={type:bo.CallExpression,callee:this.identifier(),arguments:t,filter:!0};this.expect(":");)t.push(this.expression());return n},parseArguments:function(){var e=[];if(")"!==this.peekToken().text)do e.push(this.filterChain());while(this.expect(","));return e},identifier:function(){var e=this.consume();return e.identifier||this.throwError("is not a valid identifier",e),{type:bo.Identifier,name:e.text}},constant:function(){return{type:bo.Literal,value:this.consume().value}},arrayDeclaration:function(){var e=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;e.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:bo.ArrayExpression,elements:e}},object:function(){var e,t=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;e={type:bo.Property,kind:"init"},this.peek().constant?(e.key=this.constant(),e.computed=!1,this.consume(":"),e.value=this.expression()):this.peek().identifier?(e.key=this.identifier(),e.computed=!1,this.peek(":")?(this.consume(":"),e.value=this.expression()):e.value=e.key):this.peek("[")?(this.consume("["),e.key=this.expression(),this.consume("]"),e.computed=!0,this.consume(":"),e.value=this.expression()):this.throwError("invalid key",this.peek()),t.push(e)}while(this.expect(","));return this.consume("}"),{type:bo.ObjectExpression,properties:t}},throwError:function(e,t){throw fo("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",t.text,e,t.index+1,this.text,this.text.substring(t.index))},consume:function(e){if(0===this.tokens.length)throw fo("ueoe","Unexpected end of expression: {0}",this.text);var t=this.expect(e);return t||this.throwError("is unexpected, expecting ["+e+"]",this.peek()),t},peekToken:function(){if(0===this.tokens.length)throw fo("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(e,t,n,i){return this.peekAhead(0,e,t,n,i)},peekAhead:function(e,t,n,i,r){if(this.tokens.length>e){var o=this.tokens[e],a=o.text;if(a===t||a===n||a===i||a===r||!t&&!n&&!i&&!r)return o}return!1},expect:function(e,t,n,i){var r=this.peek(e,t,n,i);return!!r&&(this.tokens.shift(),r)},selfReferential:{"this":{type:bo.ThisExpression},$locals:{type:bo.LocalsExpression}}},gn.prototype={compile:function(e,t){var n=this,r=this.astBuilder.ast(e);this.state={nextId:0,filters:{},expensiveChecks:t,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},un(r,n.$filter);var o,a="";if(this.stage="assign",o=hn(r)){this.state.computing="assign";var s=this.nextId();this.recurse(o,s),this.return_(s),a="fn.assign="+this.generateFunction("assign","s,v,l")}var l=cn(r.body);n.stage="inputs",i(l,function(e,t){var i="fn"+t;n.state[i]={vars:[],body:[],own:{}},n.state.computing=i;var r=n.nextId();n.recurse(e,r),n.return_(r),n.state.inputs.push(i),e.watchId=t}),this.state.computing="fn",this.stage="main",this.recurse(r);var u='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+a+this.watchFns()+"return fn;",c=new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",u)(this.$filter,en,nn,rn,tn,on,an,sn,e);return this.state=this.stage=void 0,c.literal=dn(r),c.constant=pn(r),c},USE:"use",STRICT:"strict",watchFns:function(){var e=[],t=this.state.inputs,n=this;return i(t,function(t){e.push("var "+t+"="+n.generateFunction(t,"s"))}),t.length&&e.push("fn.inputs=["+t.join(",")+"];"),e.join("")},generateFunction:function(e,t){return"function("+t+"){"+this.varsPrefix(e)+this.body(e)+"};"},filterPrefix:function(){var e=[],t=this;return i(this.state.filters,function(n,i){e.push(n+"=$filter("+t.escape(i)+")")}),e.length?"var "+e.join(",")+";":""},varsPrefix:function(e){return this.state[e].vars.length?"var "+this.state[e].vars.join(",")+";":""},body:function(e){return this.state[e].body.join("")},recurse:function(e,t,n,r,o,a){var s,l,u,c,f,h=this;if(r=r||d,!a&&y(e.watchId))return t=t||this.nextId(),void this.if_("i",this.lazyAssign(t,this.computedMember("i",e.watchId)),this.lazyRecurse(e,t,n,r,o,!0));switch(e.type){case bo.Program:i(e.body,function(t,n){h.recurse(t.expression,void 0,void 0,function(e){l=e}),n!==e.body.length-1?h.current().body.push(l,";"):h.return_(l)});break;case bo.Literal:c=this.escape(e.value),this.assign(t,c),r(c);break;case bo.UnaryExpression:this.recurse(e.argument,void 0,void 0,function(e){l=e}),c=e.operator+"("+this.ifDefined(l,0)+")",this.assign(t,c),r(c);break;case bo.BinaryExpression:this.recurse(e.left,void 0,void 0,function(e){s=e}),this.recurse(e.right,void 0,void 0,function(e){l=e}),c="+"===e.operator?this.plus(s,l):"-"===e.operator?this.ifDefined(s,0)+e.operator+this.ifDefined(l,0):"("+s+")"+e.operator+"("+l+")",this.assign(t,c),r(c);break;case bo.LogicalExpression:t=t||this.nextId(),h.recurse(e.left,t),h.if_("&&"===e.operator?t:h.not(t),h.lazyRecurse(e.right,t)),r(t);break;case bo.ConditionalExpression:t=t||this.nextId(),h.recurse(e.test,t),h.if_(t,h.lazyRecurse(e.alternate,t),h.lazyRecurse(e.consequent,t)),r(t);break;case bo.Identifier:t=t||this.nextId(),n&&(n.context="inputs"===h.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",e.name)+"?l:s"),n.computed=!1,n.name=e.name),en(e.name),h.if_("inputs"===h.stage||h.not(h.getHasOwnProperty("l",e.name)),function(){
h.if_("inputs"===h.stage||"s",function(){o&&1!==o&&h.if_(h.not(h.nonComputedMember("s",e.name)),h.lazyAssign(h.nonComputedMember("s",e.name),"{}")),h.assign(t,h.nonComputedMember("s",e.name))})},t&&h.lazyAssign(t,h.nonComputedMember("l",e.name))),(h.state.expensiveChecks||vn(e.name))&&h.addEnsureSafeObject(t),r(t);break;case bo.MemberExpression:s=n&&(n.context=this.nextId())||this.nextId(),t=t||this.nextId(),h.recurse(e.object,s,void 0,function(){h.if_(h.notNull(s),function(){o&&1!==o&&h.addEnsureSafeAssignContext(s),e.computed?(l=h.nextId(),h.recurse(e.property,l),h.getStringValue(l),h.addEnsureSafeMemberName(l),o&&1!==o&&h.if_(h.not(h.computedMember(s,l)),h.lazyAssign(h.computedMember(s,l),"{}")),c=h.ensureSafeObject(h.computedMember(s,l)),h.assign(t,c),n&&(n.computed=!0,n.name=l)):(en(e.property.name),o&&1!==o&&h.if_(h.not(h.nonComputedMember(s,e.property.name)),h.lazyAssign(h.nonComputedMember(s,e.property.name),"{}")),c=h.nonComputedMember(s,e.property.name),(h.state.expensiveChecks||vn(e.property.name))&&(c=h.ensureSafeObject(c)),h.assign(t,c),n&&(n.computed=!1,n.name=e.property.name))},function(){h.assign(t,"undefined")}),r(t)},!!o);break;case bo.CallExpression:t=t||this.nextId(),e.filter?(l=h.filter(e.callee.name),u=[],i(e.arguments,function(e){var t=h.nextId();h.recurse(e,t),u.push(t)}),c=l+"("+u.join(",")+")",h.assign(t,c),r(t)):(l=h.nextId(),s={},u=[],h.recurse(e.callee,l,s,function(){h.if_(h.notNull(l),function(){h.addEnsureSafeFunction(l),i(e.arguments,function(e){h.recurse(e,h.nextId(),void 0,function(e){u.push(h.ensureSafeObject(e))})}),s.name?(h.state.expensiveChecks||h.addEnsureSafeObject(s.context),c=h.member(s.context,s.name,s.computed)+"("+u.join(",")+")"):c=l+"("+u.join(",")+")",c=h.ensureSafeObject(c),h.assign(t,c)},function(){h.assign(t,"undefined")}),r(t)}));break;case bo.AssignmentExpression:if(l=this.nextId(),s={},!fn(e.left))throw fo("lval","Trying to assign a value to a non l-value");this.recurse(e.left,void 0,s,function(){h.if_(h.notNull(s.context),function(){h.recurse(e.right,l),h.addEnsureSafeObject(h.member(s.context,s.name,s.computed)),h.addEnsureSafeAssignContext(s.context),c=h.member(s.context,s.name,s.computed)+e.operator+l,h.assign(t,c),r(t||c)})},1);break;case bo.ArrayExpression:u=[],i(e.elements,function(e){h.recurse(e,h.nextId(),void 0,function(e){u.push(e)})}),c="["+u.join(",")+"]",this.assign(t,c),r(c);break;case bo.ObjectExpression:u=[],f=!1,i(e.properties,function(e){e.computed&&(f=!0)}),f?(t=t||this.nextId(),this.assign(t,"{}"),i(e.properties,function(e){e.computed?(s=h.nextId(),h.recurse(e.key,s)):s=e.key.type===bo.Identifier?e.key.name:""+e.key.value,l=h.nextId(),h.recurse(e.value,l),h.assign(h.member(t,s,e.computed),l)})):(i(e.properties,function(t){h.recurse(t.value,e.constant?void 0:h.nextId(),void 0,function(e){u.push(h.escape(t.key.type===bo.Identifier?t.key.name:""+t.key.value)+":"+e)})}),c="{"+u.join(",")+"}",this.assign(t,c)),r(t||c);break;case bo.ThisExpression:this.assign(t,"s"),r("s");break;case bo.LocalsExpression:this.assign(t,"l"),r("l");break;case bo.NGValueParameter:this.assign(t,"v"),r("v")}},getHasOwnProperty:function(e,t){var n=e+"."+t,i=this.current().own;return i.hasOwnProperty(n)||(i[n]=this.nextId(!1,e+"&&("+this.escape(t)+" in "+e+")")),i[n]},assign:function(e,t){if(e)return this.current().body.push(e,"=",t,";"),e},filter:function(e){return this.state.filters.hasOwnProperty(e)||(this.state.filters[e]=this.nextId(!0)),this.state.filters[e]},ifDefined:function(e,t){return"ifDefined("+e+","+this.escape(t)+")"},plus:function(e,t){return"plus("+e+","+t+")"},return_:function(e){this.current().body.push("return ",e,";")},if_:function(e,t,n){if(e===!0)t();else{var i=this.current().body;i.push("if(",e,"){"),t(),i.push("}"),n&&(i.push("else{"),n(),i.push("}"))}},not:function(e){return"!("+e+")"},notNull:function(e){return e+"!=null"},nonComputedMember:function(e,t){var n=/[$_a-zA-Z][$_a-zA-Z0-9]*/,i=/[^$_a-zA-Z0-9]/g;return n.test(t)?e+"."+t:e+'["'+t.replace(i,this.stringEscapeFn)+'"]'},computedMember:function(e,t){return e+"["+t+"]"},member:function(e,t,n){return n?this.computedMember(e,t):this.nonComputedMember(e,t)},addEnsureSafeObject:function(e){this.current().body.push(this.ensureSafeObject(e),";")},addEnsureSafeMemberName:function(e){this.current().body.push(this.ensureSafeMemberName(e),";")},addEnsureSafeFunction:function(e){this.current().body.push(this.ensureSafeFunction(e),";")},addEnsureSafeAssignContext:function(e){this.current().body.push(this.ensureSafeAssignContext(e),";")},ensureSafeObject:function(e){return"ensureSafeObject("+e+",text)"},ensureSafeMemberName:function(e){return"ensureSafeMemberName("+e+",text)"},ensureSafeFunction:function(e){return"ensureSafeFunction("+e+",text)"},getStringValue:function(e){this.assign(e,"getStringValue("+e+")")},ensureSafeAssignContext:function(e){return"ensureSafeAssignContext("+e+",text)"},lazyRecurse:function(e,t,n,i,r,o){var a=this;return function(){a.recurse(e,t,n,i,r,o)}},lazyAssign:function(e,t){var n=this;return function(){n.assign(e,t)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)},escape:function(e){if(E(e))return"'"+e.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(x(e))return e.toString();if(e===!0)return"true";if(e===!1)return"false";if(null===e)return"null";if("undefined"==typeof e)return"undefined";throw fo("esc","IMPOSSIBLE")},nextId:function(e,t){var n="v"+this.state.nextId++;return e||this.current().vars.push(n+(t?"="+t:"")),n},current:function(){return this.state[this.state.computing]}},mn.prototype={compile:function(e,t){var n=this,r=this.astBuilder.ast(e);this.expression=e,this.expensiveChecks=t,un(r,n.$filter);var o,a;(o=hn(r))&&(a=this.recurse(o));var s,l=cn(r.body);l&&(s=[],i(l,function(e,t){var i=n.recurse(e);e.input=i,s.push(i),e.watchId=t}));var u=[];i(r.body,function(e){u.push(n.recurse(e.expression))});var c=0===r.body.length?d:1===r.body.length?u[0]:function(e,t){var n;return i(u,function(i){n=i(e,t)}),n};return a&&(c.assign=function(e,t,n){return a(e,n,t)}),s&&(c.inputs=s),c.literal=dn(r),c.constant=pn(r),c},recurse:function(e,t,n){var r,o,a,s=this;if(e.input)return this.inputs(e.input,e.watchId);switch(e.type){case bo.Literal:return this.value(e.value,t);case bo.UnaryExpression:return o=this.recurse(e.argument),this["unary"+e.operator](o,t);case bo.BinaryExpression:return r=this.recurse(e.left),o=this.recurse(e.right),this["binary"+e.operator](r,o,t);case bo.LogicalExpression:return r=this.recurse(e.left),o=this.recurse(e.right),this["binary"+e.operator](r,o,t);case bo.ConditionalExpression:return this["ternary?:"](this.recurse(e.test),this.recurse(e.alternate),this.recurse(e.consequent),t);case bo.Identifier:return en(e.name,s.expression),s.identifier(e.name,s.expensiveChecks||vn(e.name),t,n,s.expression);case bo.MemberExpression:return r=this.recurse(e.object,!1,!!n),e.computed||(en(e.property.name,s.expression),o=e.property.name),e.computed&&(o=this.recurse(e.property)),e.computed?this.computedMember(r,o,t,n,s.expression):this.nonComputedMember(r,o,s.expensiveChecks,t,n,s.expression);case bo.CallExpression:return a=[],i(e.arguments,function(e){a.push(s.recurse(e))}),e.filter&&(o=this.$filter(e.callee.name)),e.filter||(o=this.recurse(e.callee,!0)),e.filter?function(e,n,i,r){for(var s=[],l=0;l<a.length;++l)s.push(a[l](e,n,i,r));var u=o.apply(void 0,s,r);return t?{context:void 0,name:void 0,value:u}:u}:function(e,n,i,r){var l,u=o(e,n,i,r);if(null!=u.value){nn(u.context,s.expression),rn(u.value,s.expression);for(var c=[],f=0;f<a.length;++f)c.push(nn(a[f](e,n,i,r),s.expression));l=nn(u.value.apply(u.context,c),s.expression)}return t?{value:l}:l};case bo.AssignmentExpression:return r=this.recurse(e.left,!0,1),o=this.recurse(e.right),function(e,n,i,a){var l=r(e,n,i,a),u=o(e,n,i,a);return nn(l.value,s.expression),on(l.context),l.context[l.name]=u,t?{value:u}:u};case bo.ArrayExpression:return a=[],i(e.elements,function(e){a.push(s.recurse(e))}),function(e,n,i,r){for(var o=[],s=0;s<a.length;++s)o.push(a[s](e,n,i,r));return t?{value:o}:o};case bo.ObjectExpression:return a=[],i(e.properties,function(e){e.computed?a.push({key:s.recurse(e.key),computed:!0,value:s.recurse(e.value)}):a.push({key:e.key.type===bo.Identifier?e.key.name:""+e.key.value,computed:!1,value:s.recurse(e.value)})}),function(e,n,i,r){for(var o={},s=0;s<a.length;++s)a[s].computed?o[a[s].key(e,n,i,r)]=a[s].value(e,n,i,r):o[a[s].key]=a[s].value(e,n,i,r);return t?{value:o}:o};case bo.ThisExpression:return function(e){return t?{value:e}:e};case bo.LocalsExpression:return function(e,n){return t?{value:n}:n};case bo.NGValueParameter:return function(e,n,i){return t?{value:i}:i}}},"unary+":function(e,t){return function(n,i,r,o){var a=e(n,i,r,o);return a=y(a)?+a:0,t?{value:a}:a}},"unary-":function(e,t){return function(n,i,r,o){var a=e(n,i,r,o);return a=y(a)?-a:0,t?{value:a}:a}},"unary!":function(e,t){return function(n,i,r,o){var a=!e(n,i,r,o);return t?{value:a}:a}},"binary+":function(e,t,n){return function(i,r,o,a){var s=e(i,r,o,a),l=t(i,r,o,a),u=sn(s,l);return n?{value:u}:u}},"binary-":function(e,t,n){return function(i,r,o,a){var s=e(i,r,o,a),l=t(i,r,o,a),u=(y(s)?s:0)-(y(l)?l:0);return n?{value:u}:u}},"binary*":function(e,t,n){return function(i,r,o,a){var s=e(i,r,o,a)*t(i,r,o,a);return n?{value:s}:s}},"binary/":function(e,t,n){return function(i,r,o,a){var s=e(i,r,o,a)/t(i,r,o,a);return n?{value:s}:s}},"binary%":function(e,t,n){return function(i,r,o,a){var s=e(i,r,o,a)%t(i,r,o,a);return n?{value:s}:s}},"binary===":function(e,t,n){return function(i,r,o,a){var s=e(i,r,o,a)===t(i,r,o,a);return n?{value:s}:s}},"binary!==":function(e,t,n){return function(i,r,o,a){var s=e(i,r,o,a)!==t(i,r,o,a);return n?{value:s}:s}},"binary==":function(e,t,n){return function(i,r,o,a){var s=e(i,r,o,a)==t(i,r,o,a);return n?{value:s}:s}},"binary!=":function(e,t,n){return function(i,r,o,a){var s=e(i,r,o,a)!=t(i,r,o,a);return n?{value:s}:s}},"binary<":function(e,t,n){return function(i,r,o,a){var s=e(i,r,o,a)<t(i,r,o,a);return n?{value:s}:s}},"binary>":function(e,t,n){return function(i,r,o,a){var s=e(i,r,o,a)>t(i,r,o,a);return n?{value:s}:s}},"binary<=":function(e,t,n){return function(i,r,o,a){var s=e(i,r,o,a)<=t(i,r,o,a);return n?{value:s}:s}},"binary>=":function(e,t,n){return function(i,r,o,a){var s=e(i,r,o,a)>=t(i,r,o,a);return n?{value:s}:s}},"binary&&":function(e,t,n){return function(i,r,o,a){var s=e(i,r,o,a)&&t(i,r,o,a);return n?{value:s}:s}},"binary||":function(e,t,n){return function(i,r,o,a){var s=e(i,r,o,a)||t(i,r,o,a);return n?{value:s}:s}},"ternary?:":function(e,t,n,i){return function(r,o,a,s){var l=e(r,o,a,s)?t(r,o,a,s):n(r,o,a,s);return i?{value:l}:l}},value:function(e,t){return function(){return t?{context:void 0,name:void 0,value:e}:e}},identifier:function(e,t,n,i,r){return function(o,a,s,l){var u=a&&e in a?a:o;i&&1!==i&&u&&!u[e]&&(u[e]={});var c=u?u[e]:void 0;return t&&nn(c,r),n?{context:u,name:e,value:c}:c}},computedMember:function(e,t,n,i,r){return function(o,a,s,l){var u,c,f=e(o,a,s,l);return null!=f&&(u=t(o,a,s,l),u=tn(u),en(u,r),i&&1!==i&&(on(f),f&&!f[u]&&(f[u]={})),c=f[u],nn(c,r)),n?{context:f,name:u,value:c}:c}},nonComputedMember:function(e,t,n,i,r,o){return function(a,s,l,u){var c=e(a,s,l,u);r&&1!==r&&(on(c),c&&!c[t]&&(c[t]={}));var f=null!=c?c[t]:void 0;return(n||vn(t))&&nn(f,o),i?{context:c,name:t,value:f}:f}},inputs:function(e,t){return function(n,i,r,o){return o?o[t]:e(n,i,r)}}};var _o=function(e,t,n){this.lexer=e,this.$filter=t,this.options=n,this.ast=new bo(e,n),this.astCompiler=n.csp?new mn(this.ast,t):new gn(this.ast,t)};_o.prototype={constructor:_o,parse:function(e){return this.astCompiler.compile(e,this.options.expensiveChecks)}};var Eo=Object.prototype.valueOf,xo=t("$sce"),wo={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},To=t("$compile"),So=e.document.createElement("a"),Ao=Ln(e.location.href);Pn.$inject=["$document"],Un.$inject=["$provide"];var Co=22,ko=".",Oo="0";qn.$inject=["$locale"],Wn.$inject=["$locale"];var Io={yyyy:Kn("FullYear",4,0,!1,!0),yy:Kn("FullYear",2,0,!0,!0),y:Kn("FullYear",1,0,!1,!0),MMMM:Zn("Month"),MMM:Zn("Month",!0),MM:Kn("Month",2,1),M:Kn("Month",1,1),LLLL:Zn("Month",!1,!0),dd:Kn("Date",2),d:Kn("Date",1),HH:Kn("Hours",2),H:Kn("Hours",1),hh:Kn("Hours",2,-12),h:Kn("Hours",1,-12),mm:Kn("Minutes",2),m:Kn("Minutes",1),ss:Kn("Seconds",2),s:Kn("Seconds",1),sss:Kn("Milliseconds",3),EEEE:Zn("Day"),EEE:Zn("Day",!0),a:ni,Z:Qn,ww:ti(2),w:ti(1),G:ii,GG:ii,GGG:ii,GGGG:ri},No=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,Mo=/^\-?\d+$/;oi.$inject=["$locale"];var Do=g(Di),Lo=g(Li);ui.$inject=["$parse"];var $o=g({restrict:"E",compile:function(e,t){if(!t.href&&!t.xlinkHref)return function(e,t){if("a"===t[0].nodeName.toLowerCase()){var n="[object SVGAnimatedString]"===qi.call(t.prop("href"))?"xlink:href":"href";t.on("click",function(e){t.attr(n)||e.preventDefault()})}}}}),Ro={};i(Cr,function(e,t){function n(e,n,r){e.$watch(r[i],function(e){r.$set(t,!!e)})}if("multiple"!=e){var i=mt("ng-"+t),r=n;"checked"===e&&(r=function(e,t,r){r.ngModel!==r[i]&&n(e,t,r)}),Ro[i]=function(){return{restrict:"A",priority:100,link:r}}}}),i(Or,function(e,t){Ro[t]=function(){return{priority:100,link:function(e,n,i){if("ngPattern"===t&&"/"==i.ngPattern.charAt(0)){var r=i.ngPattern.match(Ii);if(r)return void i.$set("ngPattern",new RegExp(r[1],r[2]))}e.$watch(i[t],function(e){i.$set(t,e)})}}}}),i(["src","srcset","href"],function(e){var t=mt("ng-"+e);Ro[t]=function(){return{priority:99,link:function(n,i,r){var o=e,a=e;"href"===e&&"[object SVGAnimatedString]"===qi.call(i.prop("href"))&&(a="xlinkHref",r.$attr[a]="xlink:href",o=null),r.$observe(t,function(t){return t?(r.$set(a,t),void(Pi&&o&&i.prop(o,r[a]))):void("href"===e&&r.$set(a,null))})}}}});var Po={$addControl:d,$$renameControl:fi,$removeControl:d,$setValidity:d,$setDirty:d,$setPristine:d,$setSubmitted:d},Fo="ng-submitted";hi.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Uo=function(e){return["$timeout","$parse",function(t,n){function i(e){return""===e?n('this[""]').assign:n(e).assign||d}var r={name:"form",restrict:e?"EAC":"E",require:["form","^^?form"],controller:hi,compile:function(n,r){n.addClass(Ea).addClass(ba);var o=r.name?"name":!(!e||!r.ngForm)&&"ngForm";return{pre:function(e,n,r,a){var s=a[0];if(!("action"in r)){var l=function(t){e.$apply(function(){s.$commitViewValue(),s.$setSubmitted()}),t.preventDefault()};pr(n[0],"submit",l),n.on("$destroy",function(){t(function(){gr(n[0],"submit",l)},0,!1)})}var c=a[1]||s.$$parentForm;c.$addControl(s);var f=o?i(s.$name):d;o&&(f(e,s),r.$observe(o,function(t){s.$name!==t&&(f(e,void 0),s.$$parentForm.$$renameControl(s,t),(f=i(s.$name))(e,s))})),n.on("$destroy",function(){s.$$parentForm.$removeControl(s),f(e,void 0),u(s,Po)})}}}};return r}]},jo=Uo(),Ho=Uo(!0),zo=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,Bo=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+\])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,qo=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+\/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+\/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/,Wo=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,Yo=/^(\d{4,})-(\d{2})-(\d{2})$/,Go=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Xo=/^(\d{4,})-W(\d\d)$/,Vo=/^(\d{4,})-(\d\d)$/,Ko=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Zo="keydown wheel mousedown",Qo=pe();i("date,datetime-local,month,time,week".split(","),function(e){Qo[e]=!0});var Jo={text:pi,date:yi("date",Yo,vi(Yo,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":yi("datetimelocal",Go,vi(Go,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:yi("time",Ko,vi(Ko,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:yi("week",Xo,mi,"yyyy-Www"),month:yi("month",Vo,vi(Vo,["yyyy","MM"]),"yyyy-MM"),number:_i,url:Ei,email:xi,radio:wi,checkbox:Si,hidden:d,button:d,submit:d,reset:d,file:d},ea=["$browser","$sniffer","$filter","$parse",function(e,t,n,i){return{restrict:"E",require:["?ngModel"],link:{pre:function(r,o,a,s){s[0]&&(Jo[Di(a.type)]||Jo.text)(r,o,a,s[0],t,e,n,i)}}}}],ta=/^(true|false|\d+)$/,na=function(){return{restrict:"A",priority:100,compile:function(e,t){return ta.test(t.ngValue)?function(e,t,n){n.$set("value",e.$eval(n.ngValue))}:function(e,t,n){e.$watch(n.ngValue,function(e){n.$set("value",e)})}}}},ia=["$compile",function(e){return{restrict:"AC",compile:function(t){return e.$$addBindingClass(t),function(t,n,i){e.$$addBindingInfo(n,i.ngBind),n=n[0],t.$watch(i.ngBind,function(e){n.textContent=v(e)?"":e})}}}}],ra=["$interpolate","$compile",function(e,t){return{compile:function(n){return t.$$addBindingClass(n),function(n,i,r){var o=e(i.attr(r.$attr.ngBindTemplate));t.$$addBindingInfo(i,o.expressions),i=i[0],r.$observe("ngBindTemplate",function(e){i.textContent=v(e)?"":e})}}}}],oa=["$sce","$parse","$compile",function(e,t,n){return{restrict:"A",compile:function(i,r){var o=t(r.ngBindHtml),a=t(r.ngBindHtml,function(t){return e.valueOf(t)});return n.$$addBindingClass(i),function(t,i,r){n.$$addBindingInfo(i,r.ngBindHtml),t.$watch(a,function(){var n=o(t);i.html(e.getTrustedHtml(n)||"")})}}}}],aa=g({restrict:"A",require:"ngModel",link:function(e,t,n,i){i.$viewChangeListeners.push(function(){e.$eval(n.ngChange)})}}),sa=Ai("",!0),la=Ai("Odd",0),ua=Ai("Even",1),ca=ci({compile:function(e,t){t.$set("ngCloak",void 0),e.removeClass("ng-cloak")}}),fa=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],ha={},da={blur:!0,focus:!0};i("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(e){var t=mt("ng-"+e);ha[t]=["$parse","$rootScope",function(n,i){return{restrict:"A",compile:function(r,o){var a=n(o[t],null,!0);return function(t,n){n.on(e,function(n){var r=function(){a(t,{$event:n})};da[e]&&i.$$phase?t.$evalAsync(r):t.$apply(r)})}}}}]});var pa=["$animate","$compile",function(e,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++]=t.$$createComment("end ngIf",r.ngIf),s={clone:n},e.enter(n,i.parent(),i)}):(u&&(u.remove(),u=null),l&&(l.$destroy(),l=null),s&&(u=de(s.clone),e.leave(u).then(function(){u=null}),s=null))})}}}],ga=["$templateRequest","$anchorScroll","$animate",function(e,t,n){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Gi.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 f,h,d,p=0,g=function(){h&&(h.remove(),h=null),f&&(f.$destroy(),f=null),d&&(n.leave(d).then(function(){h=null}),h=d,d=null)};i.$watch(o,function(o){var l=function(){!y(s)||s&&!i.$eval(s)||t()},h=++p;o?(e(o,!0).then(function(e){if(!i.$$destroyed&&h===p){var t=i.$new();u.template=e;var s=c(t,function(e){g(),n.enter(e,null,r).then(l)});f=t,d=s,f.$emit("$includeContentLoaded",o),i.$eval(a)}},function(){i.$$destroyed||h===p&&(g(),i.$emit("$includeContentError",o))}),i.$emit("$includeContentRequested",o)):(g(),u.template=null)})}}}}],ma=["$compile",function(t){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(n,i,r,o){return qi.call(i[0]).match(/SVG/)?(i.empty(),void t(Ae(o.template,e.document).childNodes)(n,function(e){i.append(e)},{futureParentElement:i})):(i.html(o.template),void t(i.contents())(n))}}}],va=ci({priority:450,compile:function(){return{pre:function(e,t,n){e.$eval(n.ngInit)}}}}),ya=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(e,t,n,r){var o=t.attr(n.$attr.ngList)||", ",a="false"!==n.ngTrim,s=a?Zi(o):o,l=function(e){if(!v(e)){var t=[];return e&&i(e.split(s),function(e){e&&t.push(a?Zi(e):e)}),t}};r.$parsers.push(l),r.$formatters.push(function(e){if(Vi(e))return e.join(o)}),r.$isEmpty=function(e){return!e||!e.length}}}},ba="ng-valid",_a="ng-invalid",Ea="ng-pristine",xa="ng-dirty",wa="ng-untouched",Ta="ng-touched",Sa="ng-pending",Aa="ng-empty",Ca="ng-not-empty",ka=t("ngModel"),Oa=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(e,t,n,r,o,a,s,l,u,c){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=void 0,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=void 0,this.$name=c(n.name||"",!1)(e),this.$$parentForm=Po;var f,h=o(n.ngModel),p=h.assign,g=h,m=p,b=null,_=this;this.$$setOptions=function(e){if(_.$options=e,e&&e.getterSetter){var t=o(n.ngModel+"()"),i=o(n.ngModel+"($$$p)");g=function(e){var n=h(e);return T(n)&&(n=t(e)),n},m=function(e,t){T(h(e))?i(e,{$$$p:t}):p(e,t)}}else if(!h.assign)throw ka("nonassign","Expression '{0}' is non-assignable. Element: {1}",n.ngModel,K(r))},this.$render=d,this.$isEmpty=function(e){return v(e)||""===e||null===e||e!==e},this.$$updateEmptyClasses=function(e){_.$isEmpty(e)?(a.removeClass(r,Ca),a.addClass(r,Aa)):(a.removeClass(r,Aa),a.addClass(r,Ca))};var E=0;Ci({ctrl:this,$element:r,set:function(e,t){e[t]=!0},unset:function(e,t){delete e[t]},$animate:a}),this.$setPristine=function(){_.$dirty=!1,_.$pristine=!0,a.removeClass(r,xa),a.addClass(r,Ea)},this.$setDirty=function(){_.$dirty=!0,_.$pristine=!1,a.removeClass(r,Ea),a.addClass(r,xa),_.$$parentForm.$setDirty()},this.$setUntouched=function(){_.$touched=!1,_.$untouched=!0,a.setClass(r,wa,Ta)},this.$setTouched=function(){_.$touched=!0,_.$untouched=!1,a.setClass(r,Ta,wa)},this.$rollbackViewValue=function(){s.cancel(b),_.$viewValue=_.$$lastCommittedViewValue,_.$render()},this.$validate=function(){if(!x(_.$modelValue)||!isNaN(_.$modelValue)){var e=_.$$lastCommittedViewValue,t=_.$$rawModelValue,n=_.$valid,i=_.$modelValue,r=_.$options&&_.$options.allowInvalid;_.$$runValidators(t,e,function(e){r||n===e||(_.$modelValue=e?t:void 0,_.$modelValue!==i&&_.$$writeModelToScope())})}},this.$$runValidators=function(e,t,n){function r(){var e=_.$$parserName||"parse";return v(f)?(s(e,null),!0):(f||(i(_.$validators,function(e,t){s(t,null)}),i(_.$asyncValidators,function(e,t){s(t,null)})),s(e,f),f)}function o(){var n=!0;return i(_.$validators,function(i,r){var o=i(e,t);n=n&&o,s(r,o)}),!!n||(i(_.$asyncValidators,function(e,t){s(t,null)}),!1)}function a(){var n=[],r=!0;i(_.$asyncValidators,function(i,o){var a=i(e,t);if(!M(a))throw ka("nopromise","Expected asynchronous validator to return a promise but got '{0}' instead.",a);s(o,void 0),n.push(a.then(function(){s(o,!0)},function(){r=!1,s(o,!1)}))}),n.length?u.all(n).then(function(){l(r)},d):l(!0)}function s(e,t){c===E&&_.$setValidity(e,t)}function l(e){c===E&&n(e)}E++;var c=E;return r()&&o()?void a():void l(!1)},this.$commitViewValue=function(){var e=_.$viewValue;s.cancel(b),(_.$$lastCommittedViewValue!==e||""===e&&_.$$hasNativeValidators)&&(_.$$updateEmptyClasses(e),_.$$lastCommittedViewValue=e,_.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function t(){_.$modelValue!==o&&_.$$writeModelToScope()}var n=_.$$lastCommittedViewValue,i=n;if(f=!v(i)||void 0)for(var r=0;r<_.$parsers.length;r++)if(i=_.$parsers[r](i),v(i)){f=!1;break}x(_.$modelValue)&&isNaN(_.$modelValue)&&(_.$modelValue=g(e));var o=_.$modelValue,a=_.$options&&_.$options.allowInvalid;_.$$rawModelValue=i,a&&(_.$modelValue=i,t()),_.$$runValidators(i,_.$$lastCommittedViewValue,function(e){a||(_.$modelValue=e?i:void 0,t())})},this.$$writeModelToScope=function(){m(e,_.$modelValue),i(_.$viewChangeListeners,function(e){try{e()}catch(n){t(n)}})},this.$setViewValue=function(e,t){_.$viewValue=e,_.$options&&!_.$options.updateOnDefault||_.$$debounceViewValueCommit(t)},this.$$debounceViewValueCommit=function(t){var n,i=0,r=_.$options;r&&y(r.debounce)&&(n=r.debounce,x(n)?i=n:x(n[t])?i=n[t]:x(n["default"])&&(i=n["default"])),s.cancel(b),i?b=s(function(){_.$commitViewValue()},i):l.$$phase?_.$commitViewValue():e.$apply(function(){_.$commitViewValue()})},e.$watch(function(){var t=g(e);if(t!==_.$modelValue&&(_.$modelValue===_.$modelValue||t===t)){_.$modelValue=_.$$rawModelValue=t,f=void 0;for(var n=_.$formatters,i=n.length,r=t;i--;)r=n[i](r);_.$viewValue!==r&&(_.$$updateEmptyClasses(r),_.$viewValue=_.$$lastCommittedViewValue=r,_.$render(),_.$$runValidators(t,r,d))}return t})}],Ia=["$rootScope",function(e){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:Oa,priority:1,compile:function(t){return t.addClass(Ea).addClass(wa).addClass(ba),{pre:function(e,t,n,i){var r=i[0],o=i[1]||r.$$parentForm;r.$$setOptions(i[2]&&i[2].$options),o.$addControl(r),n.$observe("name",function(e){r.$name!==e&&r.$$parentForm.$$renameControl(r,e)}),e.$on("$destroy",function(){r.$$parentForm.$removeControl(r)})},post:function(t,n,i,r){var o=r[0];o.$options&&o.$options.updateOn&&n.on(o.$options.updateOn,function(e){o.$$debounceViewValueCommit(e&&e.type)}),n.on("blur",function(){o.$touched||(e.$$phase?t.$evalAsync(o.$setTouched):t.$apply(o.$setTouched))})}}}}}],Na=/(\s+|^)default(\s+|$)/,Ma=function(){return{restrict:"A",controller:["$scope","$attrs",function(e,t){var n=this;this.$options=U(e.$eval(t.ngModelOptions)),y(this.$options.updateOn)?(this.$options.updateOnDefault=!1,this.$options.updateOn=Zi(this.$options.updateOn.replace(Na,function(){return n.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}},Da=ci({terminal:!0,priority:1e3}),La=t("ngOptions"),$a=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\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]+?))?$/,Ra=["$compile","$document","$parse",function(t,r,o){function a(e,t,i){function r(e,t,n,i,r){this.selectValue=e,this.viewValue=t,this.label=n,this.group=i,this.disabled=r}function a(e){var t;if(!u&&n(e))t=e;else{t=[];for(var i in e)e.hasOwnProperty(i)&&"$"!==i.charAt(0)&&t.push(i)}return t}var s=e.match($a);if(!s)throw La("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",e,K(t));var l=s[5]||s[7],u=s[6],c=/ as /.test(s[0])&&s[1],f=s[9],h=o(s[2]?s[1]:l),d=c&&o(c),p=d||h,g=f&&o(f),m=f?function(e,t){return g(i,t)}:function(e){return Ze(e)},v=function(e,t){return m(e,w(e,t))},y=o(s[2]||s[1]),b=o(s[3]||""),_=o(s[4]||""),E=o(s[8]),x={},w=u?function(e,t){return x[u]=t,x[l]=e,x}:function(e){return x[l]=e,x};return{trackBy:f,getTrackByValue:v,getWatchables:o(E,function(e){var t=[];e=e||[];for(var n=a(e),r=n.length,o=0;o<r;o++){var l=e===n?o:n[o],u=e[l],c=w(u,l),f=m(u,c);if(t.push(f),s[2]||s[1]){var h=y(i,c);t.push(h)}if(s[4]){var d=_(i,c);t.push(d)}}return t}),getOptions:function(){for(var e=[],t={},n=E(i)||[],o=a(n),s=o.length,l=0;l<s;l++){var u=n===o?l:o[l],c=n[u],h=w(c,u),d=p(i,h),g=m(d,h),x=y(i,h),T=b(i,h),S=_(i,h),A=new r(g,d,x,T,S);e.push(A),t[g]=A}return{items:e,selectValueMap:t,getOptionFromViewValue:function(e){return t[v(e)]},getViewValueFromOption:function(e){return f?Gi.copy(e.viewValue):e.viewValue}}}}}function s(e,n,o,s){function c(e,t){var n=l.cloneNode(!1);t.appendChild(n),f(e,n)}function f(e,t){e.element=t,t.disabled=e.disabled,e.label!==t.label&&(t.label=e.label,t.textContent=e.label),e.value!==t.value&&(t.value=e.selectValue)}function h(){var e=w&&p.readValue();if(w)for(var t=w.items.length-1;t>=0;t--){var i=w.items[t];Be(y(i.group)?i.element.parentNode:i.element)}w=T.getOptions();var r={};if(E&&n.prepend(d),w.items.forEach(function(e){var t;y(e.group)?(t=r[e.group],t||(t=u.cloneNode(!1),S.appendChild(t),t.label=null===e.group?"null":e.group,r[e.group]=t),c(e,t)):c(e,S)}),n[0].appendChild(S),g.$render(),!g.$isEmpty(e)){var o=p.readValue(),a=T.trackBy||m;(a?j(e,o):e===o)||(g.$setViewValue(o),g.$render())}}for(var d,p=s[0],g=s[1],m=o.multiple,v=0,b=n.children(),_=b.length;v<_;v++)if(""===b[v].value){d=b.eq(v);break}var E=!!d,x=Fi(l.cloneNode(!1));x.val("?");var w,T=a(o.ngOptions,n,e),S=r[0].createDocumentFragment(),A=function(){E||n.prepend(d),n.val(""),d.prop("selected",!0),d.attr("selected",!0)},C=function(){E||d.remove()},k=function(){n.prepend(x),n.val("?"),x.prop("selected",!0),x.attr("selected",!0)},O=function(){x.remove()};m?(g.$isEmpty=function(e){return!e||0===e.length},p.writeValue=function(e){w.items.forEach(function(e){e.element.selected=!1}),e&&e.forEach(function(e){var t=w.getOptionFromViewValue(e);t&&(t.element.selected=!0)})},p.readValue=function(){var e=n.val()||[],t=[];return i(e,function(e){var n=w.selectValueMap[e];n&&!n.disabled&&t.push(w.getViewValueFromOption(n))}),t},T.trackBy&&e.$watchCollection(function(){if(Vi(g.$viewValue))return g.$viewValue.map(function(e){return T.getTrackByValue(e)})},function(){g.$render()})):(p.writeValue=function(e){var t=w.getOptionFromViewValue(e);t?(n[0].value!==t.selectValue&&(O(),C(),n[0].value=t.selectValue,t.element.selected=!0),t.element.setAttribute("selected","selected")):null===e||E?(O(),A()):(C(),k())},p.readValue=function(){var e=w.selectValueMap[n.val()];return e&&!e.disabled?(C(),O(),w.getViewValueFromOption(e)):null},T.trackBy&&e.$watch(function(){return T.getTrackByValue(g.$viewValue)},function(){g.$render()})),E?(d.remove(),t(d)(e),d.removeClass("ng-scope")):d=Fi(l.cloneNode(!1)),n.empty(),h(),e.$watchCollection(T.getWatchables,h)}var l=e.document.createElement("option"),u=e.document.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","ngModel"],link:{pre:function(e,t,n,i){i[0].registerOption=d},post:s}}}],Pa=["$locale","$interpolate","$log",function(e,t,n){var r=/{}/g,o=/^when(Minus)?(.+)$/;return{link:function(a,s,l){function u(e){s.text(e||"")}var c,f=l.count,h=l.$attr.when&&s.attr(l.$attr.when),p=l.offset||0,g=a.$eval(h)||{},m={},y=t.startSymbol(),b=t.endSymbol(),_=y+f+"-"+p+b,E=Gi.noop;i(l,function(e,t){var n=o.exec(t);if(n){var i=(n[1]?"-":"")+Di(n[2]);g[i]=s.attr(l.$attr[t])}}),i(g,function(e,n){m[n]=t(e.replace(r,_))}),a.$watch(f,function(t){var i=parseFloat(t),r=isNaN(i);if(r||i in g||(i=e.pluralCat(i-p)),i!==c&&!(r&&x(c)&&isNaN(c))){E();var o=m[i];v(o)?(null!=t&&n.debug("ngPluralize: no rule defined for '"+i+"' in "+h),E=d,u()):E=a.$watch(o,u),c=i}})}}}],Fa=["$parse","$animate","$compile",function(e,r,o){var a="$$NG_REMOVED",s=t("ngRepeat"),l=function(e,t,n,i,r,o,a){e[n]=i,r&&(e[r]=o),e.$index=t,e.$first=0===t,e.$last=t===a-1,e.$middle=!(e.$first||e.$last),e.$odd=!(e.$even=0===(1&t))},u=function(e){return e.clone[0]},c=function(e){return e.clone[e.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(t,f){var h=f.ngRepeat,d=o.$$createComment("end ngRepeat",h),p=h.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!p)throw s("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",h);var g=p[1],m=p[2],v=p[3],y=p[4];if(p=g.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/),!p)throw s("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",g);var b=p[3]||p[1],_=p[2];if(v&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(v)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(v)))throw s("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",v);var E,x,w,T,S={$id:Ze};return y?E=e(y):(w=function(e,t){return Ze(t)},T=function(e){return e}),function(e,t,o,f,p){E&&(x=function(t,n,i){return _&&(S[_]=t),S[b]=n,S.$index=i,E(e,S)});var g=pe();e.$watchCollection(m,function(o){var f,m,y,E,S,A,C,k,O,I,N,M,D=t[0],L=pe();if(v&&(e[v]=o),n(o))O=o,
k=x||w;else{k=x||T,O=[];for(var $ in o)Mi.call(o,$)&&"$"!==$.charAt(0)&&O.push($)}for(E=O.length,N=new Array(E),f=0;f<E;f++)if(S=o===O?f:O[f],A=o[S],C=k(S,A,f),g[C])I=g[C],delete g[C],L[C]=I,N[f]=I;else{if(L[C])throw i(N,function(e){e&&e.scope&&(g[e.id]=e)}),s("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",h,C,A);N[f]={id:C,scope:void 0,clone:void 0},L[C]=!0}for(var R in g){if(I=g[R],M=de(I.clone),r.leave(M),M[0].parentNode)for(f=0,m=M.length;f<m;f++)M[f][a]=!0;I.scope.$destroy()}for(f=0;f<E;f++)if(S=o===O?f:O[f],A=o[S],I=N[f],I.scope){y=D;do y=y.nextSibling;while(y&&y[a]);u(I)!=y&&r.move(de(I.clone),null,D),D=c(I),l(I.scope,f,b,A,_,S,E)}else p(function(e,t){I.scope=t;var n=d.cloneNode(!1);e[e.length++]=n,r.enter(e,null,D),D=n,I.clone=e,L[I.id]=I,l(I.scope,f,b,A,_,S,E)});g=L})}}}}],Ua="ng-hide",ja="ng-hide-animate",Ha=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,i){t.$watch(i.ngShow,function(t){e[t?"removeClass":"addClass"](n,Ua,{tempClasses:ja})})}}}],za=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,i){t.$watch(i.ngHide,function(t){e[t?"addClass":"removeClass"](n,Ua,{tempClasses:ja})})}}}],Ba=ci(function(e,t,n){e.$watch(n.ngStyle,function(e,n){n&&e!==n&&i(n,function(e,n){t.css(n,"")}),e&&t.css(e)},!0)}),qa=["$animate","$compile",function(e,t){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(n,r,o,a){var s=o.ngSwitch||o.on,l=[],u=[],c=[],f=[],h=function(e,t){return function(){e.splice(t,1)}};n.$watch(s,function(n){var r,o;for(r=0,o=c.length;r<o;++r)e.cancel(c[r]);for(c.length=0,r=0,o=f.length;r<o;++r){var s=de(u[r].clone);f[r].$destroy();var d=c[r]=e.leave(s);d.then(h(c,r))}u.length=0,f.length=0,(l=a.cases["!"+n]||a.cases["?"])&&i(l,function(n){n.transclude(function(i,r){f.push(r);var o=n.element;i[i.length++]=t.$$createComment("end ngSwitchWhen");var a={clone:i};u.push(a),e.enter(i,o.parent(),o)})})})}}}],Wa=ci({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,i,r){i.cases["!"+n.ngSwitchWhen]=i.cases["!"+n.ngSwitchWhen]||[],i.cases["!"+n.ngSwitchWhen].push({transclude:r,element:t})}}),Ya=ci({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,i,r){i.cases["?"]=i.cases["?"]||[],i.cases["?"].push({transclude:r,element:t})}}),Ga=t("ngTransclude"),Xa=["$compile",function(e){return{restrict:"EAC",terminal:!0,compile:function(t){var n=e(t.contents());return t.empty(),function(e,t,i,r,o){function a(e,n){e.length?t.append(e):(s(),n.$destroy())}function s(){n(e,function(e){t.append(e)})}if(!o)throw Ga("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",K(t));i.ngTransclude===i.$attr.ngTransclude&&(i.ngTransclude="");var l=i.ngTransclude||i.ngTranscludeSlot;o(a,null,l),l&&!o.isSlotFilled(l)&&s()}}}}],Va=["$templateCache",function(e){return{restrict:"E",terminal:!0,compile:function(t,n){if("text/ng-template"==n.type){var i=n.id,r=t[0].text;e.put(i,r)}}}}],Ka={$setViewValue:d,$render:d},Za=["$element","$scope",function(t,n){var i=this,r=new Qe;i.ngModelCtrl=Ka,i.unknownOption=Fi(e.document.createElement("option")),i.renderUnknownOption=function(e){var n="? "+Ze(e)+" ?";i.unknownOption.val(n),t.prepend(i.unknownOption),t.val(n)},n.$on("$destroy",function(){i.renderUnknownOption=d}),i.removeUnknownOption=function(){i.unknownOption.parent()&&i.unknownOption.remove()},i.readValue=function(){return i.removeUnknownOption(),t.val()},i.writeValue=function(e){i.hasOption(e)?(i.removeUnknownOption(),t.val(e),""===e&&i.emptyOption.prop("selected",!0)):null==e&&i.emptyOption?(i.removeUnknownOption(),t.val("")):i.renderUnknownOption(e)},i.addOption=function(e,t){if(t[0].nodeType!==lr){fe(e,'"option value"'),""===e&&(i.emptyOption=t);var n=r.get(e)||0;r.put(e,n+1),i.ngModelCtrl.$render(),Oi(t)}},i.removeOption=function(e){var t=r.get(e);t&&(1===t?(r.remove(e),""===e&&(i.emptyOption=void 0)):r.put(e,t-1))},i.hasOption=function(e){return!!r.get(e)},i.registerOption=function(e,t,n,r,o){if(r){var a;n.$observe("value",function(e){y(a)&&i.removeOption(a),a=e,i.addOption(e,t)})}else o?e.$watch(o,function(e,r){n.$set("value",e),r!==e&&i.removeOption(r),i.addOption(e,t)}):i.addOption(n.value,t);t.on("$destroy",function(){i.removeOption(n.value),i.ngModelCtrl.$render()})}}],Qa=function(){function e(e,t,n,r){var o=r[1];if(o){var a=r[0];if(a.ngModelCtrl=o,t.on("change",function(){e.$apply(function(){o.$setViewValue(a.readValue())})}),n.multiple){a.readValue=function(){var e=[];return i(t.find("option"),function(t){t.selected&&e.push(t.value)}),e},a.writeValue=function(e){var n=new Qe(e);i(t.find("option"),function(e){e.selected=y(n.get(e.value))})};var s,l=NaN;e.$watch(function(){l!==o.$viewValue||j(s,o.$viewValue)||(s=me(o.$viewValue),o.$render()),l=o.$viewValue}),o.$isEmpty=function(e){return!e||0===e.length}}}}function t(e,t,n,i){var r=i[1];if(r){var o=i[0];r.$render=function(){o.writeValue(r.$viewValue)}}}return{restrict:"E",require:["select","?ngModel"],controller:Za,priority:1,link:{pre:e,post:t}}},Ja=["$interpolate",function(e){return{restrict:"E",priority:100,compile:function(t,n){if(y(n.value))var i=e(n.value,!0);else{var r=e(t.text(),!0);r||n.$set("value",t.text())}return function(e,t,n){var o="$selectController",a=t.parent(),s=a.data(o)||a.parent().data(o);s&&s.registerOption(e,t,n,i,r)}}}}],es=g({restrict:"E",terminal:!1}),ts=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,i){i&&(n.required=!0,i.$validators.required=function(e,t){return!n.required||!i.$isEmpty(t)},n.$observe("required",function(){i.$validate()}))}}},ns=function(){return{restrict:"A",require:"?ngModel",link:function(e,n,i,r){if(r){var o,a=i.ngPattern||i.pattern;i.$observe("pattern",function(e){if(E(e)&&e.length>0&&(e=new RegExp("^"+e+"$")),e&&!e.test)throw t("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",a,e,K(n));o=e||void 0,r.$validate()}),r.$validators.pattern=function(e,t){return r.$isEmpty(t)||v(o)||o.test(t)}}}}},is=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,i){if(i){var r=-1;n.$observe("maxlength",function(e){var t=f(e);r=isNaN(t)?-1:t,i.$validate()}),i.$validators.maxlength=function(e,t){return r<0||i.$isEmpty(t)||t.length<=r}}}}},rs=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,i){if(i){var r=0;n.$observe("minlength",function(e){r=f(e)||0,i.$validate()}),i.$validators.minlength=function(e,t){return i.$isEmpty(t)||t.length>=r}}}}};return e.angular.bootstrap?void(e.console&&console.log("WARNING: Tried to load angular more than once.")):(le(),be(Gi),Gi.module("ngLocale",[],["$provide",function(e){function t(e){e+="";var t=e.indexOf(".");return t==-1?0:e.length-t-1}function n(e,n){var i=n;void 0===i&&(i=Math.min(t(e),3));var r=Math.pow(10,i),o=(e*r|0)%r;return{v:i,f:o}}var i={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};e.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],SHORTDAY:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SHORTMONTH:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],STANDALONEMONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-¤",negSuf:"",posPre:"¤",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(e,t){var r=0|e,o=n(e,t);return 1==r&&0==o.v?i.ONE:i.OTHER}})}]),void Fi(e.document).ready(function(){ie(e.document,re)}))}(window),!window.angular.$$csp().noInlineStyle&&window.angular.element(document.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;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>'),/**
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to
 * deal in the Software without restriction, including without limitation the
 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 * sell copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */
/**
 * Implementing Drag and Drop functionality in AngularJS is easier than ever.
 * Demo: http://codef0rmer.github.com/angular-dragdrop/
 *
 * @version 1.0.13
 *
 * (c) 2013 Amit Gharat a.k.a codef0rmer <amit.2006.it@gmail.com> - amitgharat.wordpress.com
 */
function(e,t,n,i){"use strict";var r=t.module("ngDragDrop",[]).service("ngDragDropService",["$timeout","$parse","$q",function(o,a,s){this.draggableScope=null,this.droppableScope=null,n("head").prepend('<style type="text/css">@charset "UTF-8";.angular-dragdrop-hide{display: none !important;}</style>'),this.callEventCallback=function(e,t,i,r){function o(t){var i=t.indexOf("(")!==-1?t.indexOf("("):t.length,r=t.lastIndexOf(")")!==-1?t.lastIndexOf(")"):t.length,o=t.substring(i+1,r),s=t.indexOf(".")!==-1?t.substr(0,t.indexOf(".")):null;return s=e[s]&&"function"==typeof e[s].constructor?s:null,{callback:t.substring(s&&s.length+1||0,i),args:n.map(o&&o.split(",")||[],function(t){return[a(t)(e)]}),constructor:s}}if(t){var s=o(t),l=s.callback,u=s.constructor,c=[i,r].concat(s.args);return(e[l]||e[u][l]).apply(e[l]?e:e[u],c)}},this.invokeDrop=function(e,a,l,u){var c,f,h,d="",p="",g={},m={},v=null,y={},b={},_=null,E=this.droppableScope,x=this.draggableScope,w=null,T=[];d=e.ngattr("ng-model"),p=a.ngattr("ng-model"),c=x.$eval(d),f=E.$eval(p),_=a.find("[jqyoui-draggable]:last,[data-jqyoui-draggable]:last"),m=E.$eval(a.attr("jqyoui-droppable")||a.attr("data-jqyoui-droppable"))||[],g=x.$eval(e.attr("jqyoui-draggable")||e.attr("data-jqyoui-draggable"))||[],g.index=this.fixIndex(x,g,c),m.index=this.fixIndex(E,m,f),v=t.isArray(c)?g.index:null,y=t.isArray(c)?c[v]:c,g.deepCopy&&(y=t.copy(y)),b=t.isArray(f)&&m&&m.index!==i?f[m.index]:t.isArray(f)?{}:f,m.deepCopy&&(b=t.copy(b)),g.beforeDrop&&T.push(this.callEventCallback(x,g.beforeDrop,l,u)),s.all(T).then(t.bind(this,function(){if(g.insertInline&&d===p){if(g.index>m.index){h=c[g.index];for(var i=g.index;i>m.index;i--)f[i]=t.copy(f[i-1]),f[i-1]={},f[i][g.direction]="left";f[m.index]=h}else{h=c[g.index];for(var i=g.index;i<m.index;i++)f[i]=t.copy(f[i+1]),f[i+1]={},f[i][g.direction]="right";f[m.index]=h}this.callEventCallback(E,m.onDrop,l,u)}else g.animate===!0?(w=e.clone(),w.css({position:"absolute"}).css(e.offset()),n("body").append(w),e.addClass("angular-dragdrop-hide"),this.move(w,_.length>0?_:a,null,"fast",m,function(){w.remove()}),this.move(_.length>0&&!m.multiple?_:[],e.parent("[jqyoui-droppable],[data-jqyoui-droppable]"),r.startXY,"fast",m,t.bind(this,function(){o(t.bind(this,function(){e.css({position:"relative",left:"",top:""}).removeClass("angular-dragdrop-hide"),_.css({position:"relative",left:"",top:"",display:"none"===_.css("display")?"":_.css("display")}),this.mutateDraggable(x,m,g,d,p,b,e),this.mutateDroppable(E,m,g,p,y,v),this.callEventCallback(E,m.onDrop,l,u)}))}))):o(t.bind(this,function(){this.mutateDraggable(x,m,g,d,p,b,e),this.mutateDroppable(E,m,g,p,y,v),this.callEventCallback(E,m.onDrop,l,u)}))}))["finally"](t.bind(this,function(){this.restore(e)}))},this.move=function(t,n,r,o,a,s){if(0===t.length)return s&&e.setTimeout(function(){s()},300),!1;var l=t.css("z-index"),u=t[a.containment||"offset"](),c=n.css("display"),f=n.hasClass("ng-hide"),h=n.hasClass("angular-dragdrop-hide");null===r&&n.length>0&&((n.attr("jqyoui-draggable")||n.attr("data-jqyoui-draggable"))!==i&&n.ngattr("ng-model")!==i&&n.is(":visible")&&a&&a.multiple?(r=n[a.containment||"offset"](),a.stack===!1?r.left+=n.outerWidth(!0):r.top+=n.outerHeight(!0)):(f&&n.removeClass("ng-hide"),h&&n.removeClass("angular-dragdrop-hide"),r=n.css({visibility:"hidden",display:"block"})[a.containment||"offset"](),n.css({visibility:"",display:c}))),t.css({position:"absolute","z-index":9999}).css(u).animate(r,o,function(){f&&n.addClass("ng-hide"),h&&n.addClass("angular-dragdrop-hide"),t.css("z-index",l),s&&s()})},this.mutateDroppable=function(e,n,i,r,o,s){var l=e.$eval(r);e.dndDragItem=o,t.isArray(l)?(n&&n.index>=0?l[n.index]=o:l.push(o),i&&i.placeholder===!0&&(l[l.length-1].jqyoui_pos=s)):(a(r+" = dndDragItem")(e),i&&i.placeholder===!0&&(l.jqyoui_pos=s))},this.mutateDraggable=function(e,n,r,o,s,l,u){var c=t.equals(l,{})||!l,f=e.$eval(o);e.dndDropItem=l,r&&r.placeholder?"keep"!=r.placeholder&&(t.isArray(f)&&r.index!==i?f[r.index]=l:a(o+" = dndDropItem")(e)):t.isArray(f)?c?r&&r.placeholder!==!0&&"keep"!==r.placeholder&&f.splice(r.index,1):f[r.index]=l:(a(o+" = dndDropItem")(e),e.$parent&&a(o+" = dndDropItem")(e.$parent)),this.restore(u)},this.restore=function(e){e.css({"z-index":"",left:"",top:""})},this.fixIndex=function(e,n,r){if(n.applyFilter&&t.isArray(r)&&r.length>0){var o=e[n.applyFilter](),a=o[n.index],s=i;return r.forEach(function(e,n){t.equals(e,a)&&(s=n)}),s}return n.index}}]).directive("jqyouiDraggable",["ngDragDropService",function(e){return{require:"?jqyouiDroppable",restrict:"A",link:function(i,o,a){var s,l,u,c,f=n(o),h=function(o,h){o?(s=i.$eval(f.attr("jqyoui-draggable")||f.attr("data-jqyoui-draggable"))||{},l=i.$eval(a.jqyouiOptions)||{},f.draggable({disabled:!1}).draggable(l).draggable({start:function(t,o){e.draggableScope=i,u=n(l.helper?o.helper:this).css("z-index"),n(l.helper?o.helper:this).css("z-index",9999),r.startXY=n(this)[s.containment||"offset"](),e.callEventCallback(i,s.onStart,t,o)},stop:function(t,r){n(l.helper?r.helper:this).css("z-index",u),e.callEventCallback(i,s.onStop,t,r)},drag:function(t,n){e.callEventCallback(i,s.onDrag,t,n)}})):f.draggable({disabled:!0}),c&&t.isDefined(o)&&(t.equals(a.drag,"true")||t.equals(a.drag,"false"))&&(c(),c=null)};c=i.$watch(function(){return i.$eval(a.drag)},h),h(),f.on("$destroy",function(){f.draggable({disabled:!0}).draggable("destroy")})}}}]).directive("jqyouiDroppable",["ngDragDropService","$q",function(e,i){return{restrict:"A",priority:1,link:function(r,o,a){var s,l,u,c=n(o),f=function(o,f){o?(s=r.$eval(n(c).attr("jqyoui-droppable")||n(c).attr("data-jqyoui-droppable"))||{},l=r.$eval(a.jqyouiOptions)||{},c.droppable({disabled:!1}).droppable(l).droppable({over:function(t,n){e.callEventCallback(r,s.onOver,t,n)},out:function(t,n){e.callEventCallback(r,s.onOut,t,n)},drop:function(o,u){var c=null;c=s.beforeDrop?e.callEventCallback(r,s.beforeDrop,o,u):function(){var e=i.defer();return e.resolve(),e.promise}(),c.then(t.bind(this,function(){n(u.draggable).ngattr("ng-model")&&a.ngModel?(e.droppableScope=r,e.invokeDrop(n(u.draggable),n(this),o,u)):e.callEventCallback(r,s.onDrop,o,u)}),function(){u.draggable.animate({left:"",top:""},l.revertDuration||0)})}})):c.droppable({disabled:!0}),u&&t.isDefined(o)&&(t.equals(a.drop,"true")||t.equals(a.drop,"false"))&&(u(),u=null)};u=r.$watch(function(){return r.$eval(a.drop)},f),f(),c.on("$destroy",function(){c.droppable({disabled:!0}).droppable("destroy")})}}}]);n.fn.ngattr=function(e,t){var n=this[0];return n.getAttribute(e)||n.getAttribute("data-"+e)}}(window,window.angular,window.jQuery),function(e){return e.module("ngOrderObjectBy",[]).filter("orderObjectBy",function(){return function(t,n,i){function r(e){return!isNaN(parseFloat(e))&&isFinite(e)}function o(e,t){return e[t]}var a=[];return e.forEach(t,function(e,t){e.key=t,a.push(e)}),a.sort(function(e,t){var i,a=n.split(".").reduce(o,e),s=n.split(".").reduce(o,t);return r(a)&&r(s)&&(a=Number(a),s=Number(s)),i=a===s?0:a>s?1:-1}),i&&a.reverse(),a}})}(angular),/*
 * angular-tooltips
 * 1.0.10
 * 
 * Angular.js tooltips module.
 * http://720kb.github.io/angular-tooltips
 * 
 * MIT license
 * Sat Apr 30 2016
 */
!function(e,t){"use strict";var n="tooltips",i=function(){var e=[],n=0,i=function(i){i-n>=15?(e.forEach(function(e){e()}),n=i):t.console.log("Skipped!")},r=function(){t.requestAnimationFrame(i)},o=function(t){t&&e.push(t)};return{add:function(n){e.length||t.addEventListener("resize",r),o(n)}}}(),r=function(e){var t={};return e.removeAttr(n),void 0!==e.attr("tooltip-template")&&(t["tooltip-template"]=e.attr("tooltip-template"),e.removeAttr("tooltip-template")),void 0!==e.attr("tooltip-template-url")&&(t["tooltip-template-url"]=e.attr("tooltip-template-url"),e.removeAttr("tooltip-template-url")),void 0!==e.attr("tooltip-controller")&&(t["tooltip-controller"]=e.attr("tooltip-controller"),e.removeAttr("tooltip-controller")),void 0!==e.attr("tooltip-side")&&(t["tooltip-side"]=e.attr("tooltip-side"),e.removeAttr("tooltip-side")),void 0!==e.attr("tooltip-show-trigger")&&(t["tooltip-show-trigger"]=e.attr("tooltip-show-trigger"),e.removeAttr("tooltip-show-trigger")),void 0!==e.attr("tooltip-hide-trigger")&&(t["tooltip-hide-trigger"]=e.attr("tooltip-hide-trigger"),e.removeAttr("tooltip-hide-trigger")),void 0!==e.attr("tooltip-smart")&&(t["tooltip-smart"]=e.attr("tooltip-smart"),e.removeAttr("tooltip-smart")),void 0!==e.attr("tooltip-class")&&(t["tooltip-class"]=e.attr("tooltip-class"),e.removeAttr("tooltip-class")),void 0!==e.attr("tooltip-close-button")&&(t["tooltip-close-button"]=e.attr("tooltip-close-button"),e.removeAttr("tooltip-close-button")),void 0!==e.attr("tooltip-size")&&(t["tooltip-size"]=e.attr("tooltip-size"),e.removeAttr("tooltip-size")),void 0!==e.attr("tooltip-speed")&&(t["tooltip-speed"]=e.attr("tooltip-speed"),e.removeAttr("tooltip-speed")),t},o=function(e){return t.getComputedStyle?t.getComputedStyle(e,""):e.currentStyle?e.currentStyle:void 0},a=function(n){for(var i,r,o=t.document.querySelectorAll("._exradicated-tooltip"),a=0,s=o.length;s>a;a+=1)if(i=o.item(a),i&&(r=e.element(i),r.data("_tooltip-parent")&&r.data("_tooltip-parent")===n))return r},s=function(e){var t=a(e);t&&t.remove()},l=function(e){if(e){var n=e[0].getBoundingClientRect();return(n.top<0||n.top>t.document.body.offsetHeight||n.left<0||n.left>t.document.body.offsetWidth||n.bottom<0||n.bottom>t.document.body.offsetHeight||n.right<0||n.right>t.document.body.offsetWidth)&&(e.css({top:"",left:"",bottom:"",right:""}),!0)}throw new Error("You must provide a position")},u=function(){var e={side:"top",showTrigger:"mouseover",hideTrigger:"mouseleave","class":"",smart:!1,closeButton:!1,size:"",speed:"steady"};return{configure:function(t){var n,i=Object.keys(e),r=0;if(t)for(;r<i.length;r+=1)n=i[r],n&&t[n]&&(e[n]=t[n])},$get:function(){return e}}},c=["$log","$http","$compile","$timeout","$controller","$injector","tooltipsConf",function(n,u,c,f,h,d,p){var g=function(n,d,g,m,v){if(g.tooltipTemplate&&g.tooltipTemplateUrl)throw new Error("You can not define tooltip-template and tooltip-template-url together");if(!g.tooltipTemplateUrl&&!g.tooltipTemplate&&g.tooltipController)throw new Error("You can not have a controller without a template or templateUrl defined");var y,b="_"+p.side,_=p.showTrigger,E=p.hideTrigger,x=p.size,w="_"+p.speed;g.tooltipSide=g.tooltipSide||p.side,g.tooltipShowTrigger=g.tooltipShowTrigger||p.showTrigger,g.tooltipHideTrigger=g.tooltipHideTrigger||p.hideTrigger,g.tooltipClass=g.tooltipClass||p["class"],g.tooltipSmart="true"===g.tooltipSmart||p.smart,g.tooltipCloseButton=g.tooltipCloseButton||p.closeButton.toString(),g.tooltipSize=g.tooltipSize||p.size,g.tooltipSpeed=g.tooltipSpeed||p.speed,g.tooltipAppendToBody="true"===g.tooltipAppendToBody,v(n,function(n,p){var m=r(n),v=e.element(t.document.createElement("tooltip")),T=e.element(t.document.createElement("tip-cont")),S=e.element(t.document.createElement("tip")),A=e.element(t.document.createElement("tip-tip")),C=e.element(t.document.createElement("span")),k=e.element(t.document.createElement("tip-arrow")),O=function(){return T.html()},I=function(e){void 0!==e&&T[0].getClientRects().length>1?v.addClass("_multiline"):v.removeClass("_multiline")},N=function(n){if(S.addClass("_hidden"),g.tooltipSmart)switch(g.tooltipSide){case"top":l(S)&&(v.removeClass("_top"),v.addClass("_left"),l(S)&&(v.removeClass("_left"),v.addClass("_bottom"),l(S)&&(v.removeClass("_bottom"),v.addClass("_right"),l(S)&&(v.removeClass("_right"),v.addClass("_top")))));break;case"left":l(S)&&(v.removeClass("_left"),v.addClass("_bottom"),l(S)&&(v.removeClass("_bottom"),v.addClass("_right"),l(S)&&(v.removeClass("_right"),v.addClass("_top"),l(S)&&(v.removeClass("_top"),v.addClass("_left")))));break;case"bottom":l(S)&&(v.removeClass("_bottom"),v.addClass("_left"),l(S)&&(v.removeClass("_left"),v.addClass("_top"),l(S)&&(v.removeClass("_top"),v.addClass("_right"),l(S)&&(v.removeClass("_right"),v.addClass("_bottom")))));break;case"right":l(S)&&(v.removeClass("_right"),v.addClass("_top"),l(S)&&(v.removeClass("_top"),v.addClass("_left"),l(S)&&(v.removeClass("_left"),v.addClass("_bottom"),l(S)&&(v.removeClass("_bottom"),v.addClass("_right")))));break;default:throw new Error("Position not supported")}if(g.tooltipAppendToBody){var i,r,a,u,c,f=o(A[0]),h=o(k[0]),d=o(S[0]),p=S[0].getBoundingClientRect(),m=e.copy(S),y=0,b=f.length,_=0,E=h.length,x=0,w=d.length,T={},C={},O={};for(S.removeClass("_hidden"),m.removeClass("_hidden"),m.data("_tooltip-parent",v),s(v);b>y;y+=1)i=f[y],i&&f.getPropertyValue(i)&&(T[i]=f.getPropertyValue(i));for(;E>_;_+=1)i=h[_],i&&h.getPropertyValue(i)&&(O[i]=h.getPropertyValue(i));for(;w>x;x+=1)i=d[x],i&&"position"!==i&&"display"!==i&&"opacity"!==i&&"z-index"!==i&&"bottom"!==i&&"height"!==i&&"left"!==i&&"right"!==i&&"top"!==i&&"width"!==i&&d.getPropertyValue(i)&&(C[i]=d.getPropertyValue(i));r=t.parseInt(d.getPropertyValue("padding-top"),10),a=t.parseInt(d.getPropertyValue("padding-bottom"),10),u=t.parseInt(d.getPropertyValue("padding-left"),10),c=t.parseInt(d.getPropertyValue("padding-right"),10),C.top=p.top+t.scrollY+"px",C.left=p.left+t.scrollX+"px",C.height=p.height-(r+a)+"px",C.width=p.width-(u+c)+"px",m.css(C),m.children().css(T),m.children().next().css(O),n&&"true"!==g.tooltipHidden&&(m.addClass("_exradicated-tooltip"),e.element(t.document.body).append(m))}else S.removeClass("_hidden"),n&&"true"!==g.tooltipHidden&&v.addClass("active")},M=function(){g.tooltipAppendToBody?s(v):v.removeClass("active")},D=function ie(e){var t,n=e.parent();e[0]&&(e[0].scrollHeight>e[0].clientHeight||e[0].scrollWidth>e[0].clientWidth)&&e.on("scroll",function(){var e=this;t&&f.cancel(t),t=f(function(){var t=a(v),n=v[0].getBoundingClientRect(),i=e.getBoundingClientRect();n.top<i.top||n.bottom>i.bottom||n.left<i.left||n.right>i.right?s(v):t&&N(!0)})}),n&&n.length&&ie(n)},L=function(e){e?(v.removeClass("_force-hidden"),A.empty(),A.append(C),A.append(e),f(function(){N()})):(A.empty(),v.addClass("_force-hidden"))},$=function(e){e?u.get(e).then(function(e){e&&e.data&&(v.removeClass("_force-hidden"),A.empty(),A.append(C),A.append(c(e.data)(p)),f(function(){N()}))}):(A.empty(),v.addClass("_force-hidden"))},R=function(e){e&&(b&&v.removeAttr("_"+b),v.addClass("_"+e),b=e)},P=function(e){e&&(_&&v.off(_),v.on(e,N),_=e)},F=function(e){e&&(E&&v.off(E),v.on(e,M),E=e)},U=function(e){e&&(y&&S.removeClass(y),S.addClass(e),y=e)},j=function(){"boolean"!=typeof g.tooltipSmart&&(g.tooltipSmart="true"===g.tooltipSmart)},H=function(e){var t="true"===e;t?(C.on("click",M),C.css("display","block")):(C.off("click"),C.css("display","none"))},z=function(t){if(t){var n,i=h(t,{$scope:p}),r=p.$new(!1,p),o=t.indexOf("as");o>=0?(n=t.substr(o+3),r[n]=i):e.extend(r,i),A.replaceWith(c(A)(r)),J()}},B=function(e){e&&(x&&A.removeClass("_"+x),A.addClass("_"+e),x=e)},q=function(e){e&&(w&&v.removeClass("_"+w),v.addClass("_"+e),w=e)},W=g.$observe("tooltipTemplate",L),Y=g.$observe("tooltipTemplateUrl",$),G=g.$observe("tooltipSide",R),X=g.$observe("tooltipShowTrigger",P),V=g.$observe("tooltipHideTrigger",F),K=g.$observe("tooltipClass",U),Z=g.$observe("tooltipSmart",j),Q=g.$observe("tooltipCloseButton",H),J=g.$observe("tooltipController",z),ee=g.$observe("tooltipSize",B),te=g.$observe("tooltipSpeed",q),ne=p.$watch(O,I);C.attr({id:"close-button"}),C.html("&times;"),S.addClass("_hidden"),A.append(C),A.append(g.tooltipTemplate),S.append(A),S.append(k),T.append(n),v.attr(m),v.addClass("tooltips"),v.append(T),v.append(S),d.after(v),g.tooltipAppendToBody&&(i.add(function(){D(v)}),D(v)),i.add(function(){I(),N()}),f(function(){N(),S.removeClass("_hidden"),v.addClass("_ready")}),p.$on("$destroy",function(){W(),Y(),G(),X(),V(),K(),Z(),Q(),ee(),te(),ne(),n.off(g.tooltipShowTrigger+" "+g.tooltipHideTrigger)})})};return{restrict:"A",transclude:"element",priority:1,terminal:!0,link:g}}];e.module("720kb.tooltips",[]).provider(n+"Conf",u).directive(n,c)}(angular,window),function(){"use strict";function e(e){return e instanceof RegExp}function t(e){return e&&e.window===e}function n(e){return e&&e.$evalAsync&&e.$watch}function i(r,o){if(r===o)return{isEqual:!0,unequalVariable:"",stringDiff:!1,o1:r,o2:o};if(null===r||null===o)return{isEqual:!1,unequalVariable:"",stringDiff:!1,o1:r,o2:o};if(r!==r&&o!==o)return{isEqual:!0,unequalVariable:"",stringDiff:!1,o1:r,o2:o};var a,s,c,f=typeof r,d=typeof o;if(f==d){if("string"==f&&r!=o)return{isEqual:!1,unequalVariable:"",stringDiff:!0,o1:r,o2:o};if("object"==f){if(!u(r)){if(h(r))return{isEqual:h(o)&&r.getTime()==o.getTime(),unequalVariable:"",stringDiff:!1,o1:r,o2:o};if(e(r)&&e(o))return{isEqual:r.toString()==o.toString(),unequalVariable:"",stringDiff:!1,o1:r,o2:o};if(n(r)||n(o)||t(r)||t(o)||u(o))return{isEqual:!1,unequalVariable:"",stringDiff:!1,o1:r,o2:o};c={};var p={isEqual:!0,unequalVariable:"",stringDiff:!1,o1:r,o2:o};for(s in r)if("$"!==s.charAt(0)&&!l(r[s])){var g=i(r[s],o[s]);if(!g.isEqual){if(g.unequalVariable="."+String(s)+g.unequalVariable,!g.stringDiff)return g;p=g}c[s]=!0}for(s in o)if(!c.hasOwnProperty(s)&&"$"!==s.charAt(0)&&void 0!==o[s]&&!l(o[s]))return{isEqual:!1,unequalVariable:"",stringDiff:!1,o1:r,o2:o};return p}if(!u(o))return{isEqual:!1,unequalVariable:"",stringDiff:!1,o1:r,o2:o};if((a=r.length)==o.length){var p={isEqual:!0,unequalVariable:"",stringDiff:!1,o1:r,o2:o};for(s=0;s<a;s++){var g=i(r[s],o[s]);if(!g.isEqual){if(g.unequalVariable="["+String(s)+"]"+g.unequalVariable,!g.stringDiff)return g;p=g}}return p}}}return{isEqual:!1,unequalVariable:"",stringDiff:!1,o1:r,o2:o}}function r(e,t){if(e&&t){var n,i;e.length>t.length?(i=e.split(""),n=t.split("")):(n=e.split(""),i=t.split(""));for(var r,o=0,a=[],s=0;s<n.length&&o<i.length;s++){for(r="";n[s]!=i[o]&&o<i.length;)r+=i[o],o++;r&&a.push(r),n[s]==i[o]&&o++}var l=s==n.length;if(o<i.length){for(r="";o<i.length;)r+=i[o],o++;a.push(r)}}else var l=!1,a=[];return{areSimilar:l,differences:a}}function o(e){var t=/\s/g;if(1!=e.length)return!1;for(var n in e[0])if(e[0][n].match(t))return!1;return!0}var a=15,s=(angular.isDefined,angular.isUndefined),l=angular.isFunction,u=angular.isArray,c=angular.isString,f=angular.isObject,h=angular.isDate,d=(angular.forEach,angular.copy),p=angular.bind;angular.module("Chronicle",[]).service("Chronicle",["$rootScope","$parse",function(e,t){this.record=function(e,t,n,i){var r=new h(e,t,n,i);return r};var h=function(e,i,r,o){if(!c(e))throw new Error("Watch variable that is not a string was passed to Chronicle.");if(this.watchVar=e,this.parsedWatchVar=t(e),s(this.parsedWatchVar(i)))throw new Error(e+", the watch variable passed to Chronicle, is not defined in the given scope.");if(s(i))throw new Error("Undefined scope passed to Chronicle.");if(n(i))this.isScope=!0;else{if(!f(i))throw new Error("Incorrect scope type passed to Chronicle.");this.isScope=!1}if(this.scope=i,r!==!0&&"true"!==r?this.stringHandling=!1:this.stringHandling=!0,this.parsedNoWatchVars=[],u(o))for(var a in o){if(!c(o[a]))throw new Error("Not all passed 'no watch' variables are in string format");if(this.parsedNoWatchVars.push(t(o[a])),s(this.parsedNoWatchVars[a](i)))throw new Error(o[a]+", a 'no watch' variable passed to Chronicle, is not defined in the given scope")}else if(c(o)){if(this.parsedNoWatchVars.push(t(o)),s(this.parsedNoWatchVars[0](i)))throw new Error(o+", the 'no watch' variable passed to Chronicle, is not defined in the given scope")}else if(!s(o))throw new Error("Incorect type for 'no watch' variables");this.archive=[],this.onAdjustFunctions=[],this.onRedoFunctions=[],this.onUndoFunctions=[],this.currArchivePos=null,this.addWatch()};h.prototype.addOnAdjustFunction=function(e){if(!l(e))throw new Error("Function added to run on adjustment is not a function");this.onAdjustFunctions.push(e)},h.prototype.removeOnAdjustFunction=function(e){this.onAdjustFunctions.splice(this.onAdjustFunctions.indexOf(e),1)},h.prototype.addOnUndoFunction=function(e){if(!l(e))throw new Error("Function added to run on undo is not a function");this.onUndoFunctions.push(e)},h.prototype.removeOnUndoFunction=function(e){this.onUndoFunctions.splice(this.onUndoFunctions.indexOf(e),1)},h.prototype.addOnRedoFunction=function(e){if(!l(e))throw new Error("Function added to run on redo is not a function");this.onRedoFunctions.push(e)},h.prototype.removeOnRedoFunction=function(e){this.onRedoFunctions.splice(this.onRedoFunctions.indexOf(e),1)},h.prototype.undo=function(){if(this.canUndo()){this.currArchivePos-=1,this.revert(this.currArchivePos);for(var e=0;e<this.onUndoFunctions.length;e++)this.onUndoFunctions[e]();return!0}return!1},h.prototype.redo=function(){if(this.canRedo()){this.currArchivePos+=1,this.revert(this.currArchivePos);for(var e=0;e<this.onRedoFunctions.length;e++)this.onRedoFunctions[e]();return!0}return!1},h.prototype.revert=function(e){this.parsedWatchVar.assign(this.scope,d(this.archive[e].watchVar));for(var t=0;t<this.parsedNoWatchVars.length;t++)this.parsedNoWatchVars[t].assign(this.scope,d(this.archive[e].noWatchVars[t]))},h.prototype.canRedo=function(){return this.currArchivePos<this.archive.length-1},h.prototype.canUndo=function(){return this.currArchivePos>0},h.prototype.addToArchive=function(){var e=!1;if(this.archive.length){var n=i(this.parsedWatchVar(this.scope),this.archive[this.currArchivePos].watchVar);if(!n.isEqual){e=!0;var s=t(this.watchVar+n.unequalVariable);if(this.stringHandling&&n.stringDiff){var l=!1,u=r(n.o1,n.o2);if(u.areSimilar&&this.archive[this.currArchivePos].parsedUnequalVariable==s){var l=o(u.differences);"string"!=typeof t("watchVar"+n.unequalVariable)(this.archive[this.currArchivePos-1])?l=!1:l&&Math.abs(t("watchVar"+n.unequalVariable)(this.archive[this.currArchivePos-1]).length-t("watchVar"+n.unequalVariable)(this.archive[this.currArchivePos]).length)>=a&&(l=!1)}}}}else e=!0;e&&this.newEntry(l,s)},h.prototype.newEntry=function(e,t){var n={};n.noWatchVars=[],n.parsedUnequalVariable=t,n.watchVar=d(this.parsedWatchVar(this.scope));for(var i=0;i<this.parsedNoWatchVars.length;i++)n.noWatchVars.push(d(this.parsedNoWatchVars[i](this.scope)));if(this.archive.length-1>this.currArchivePos){var r=this.archive.length-this.currArchivePos-1;this.archive.splice(this.currArchivePos+1,r)}for(e&&this.archive.splice(this.currArchivePos,1),this.archive.push(n),this.currArchivePos=this.archive.length-1,i=0;i<this.onAdjustFunctions.length;i++)this.onAdjustFunctions[i]()},h.prototype.addWatch=function(){var t=this;t.isScope?t.cancelWatch=t.scope.$watch(t.watchVar,function(){t.addToArchive.apply(t)},!0):t.cancelWatch=e.$watch(p(t,function(){return t.parsedWatchVar(t.scope)}),function(){t.addToArchive.apply(t)},!0)}}])}(),/**
 * Angular Google Analytics - Easy tracking for your AngularJS application
 * @version v1.1.7 - 2016-03-25
 * @link http://github.com/revolunet/angular-google-analytics
 * @author Julien Bouquillon <julien@revolunet.com> (https://github.com/revolunet)
 * @contributors Julien Bouquillon (https://github.com/revolunet),Justin Saunders (https://github.com/justinsa),Chris Esplin (https://github.com/deltaepsilon),Adam Misiorny (https://github.com/adam187)
 * @license MIT License, http://www.opensource.org/licenses/MIT
 */
!function(e,t){"use strict";"function"==typeof define&&define.amd?define(["angular"],t):"object"==typeof module&&module.exports?module.exports=t(require("angular")):t(e.angular)}(this,function(e,t){"use strict";return e.module("angular-google-analytics",[]).provider("Analytics",function(){var n,i,r,o,a,s=!0,l="auto",u=!1,c=!1,f="USD",h=!1,d=!1,p=!1,g=!1,m=!1,v=!1,y=!1,b=!1,_=!1,E=!1,x=!1,w="$routeChangeSuccess",T=!1,S=!1,A=!1,C="",k=!0,O=!1;this.log=[],this.offlineQueue=[],this.setAccount=function(i){return n=e.isUndefined(i)||i===!1?t:e.isArray(i)?i:e.isObject(i)?[i]:[{tracker:i,trackEvent:!0}],this},this.trackPages=function(e){return k=!!e,this},this.trackPrefix=function(e){return C=e,this},this.setDomainName=function(e){return r=e,this},this.useDisplayFeatures=function(e){return p=!!e,this},this.useAnalytics=function(e){return s=!!e,this},this.useEnhancedLinkAttribution=function(e){return y=!!e,this},this.useCrossDomainLinker=function(e){return c=!!e,this},this.setCrossLinkDomains=function(e){return i=e,this},this.setPageEvent=function(e){return w=e,this},this.setCookieConfig=function(e){return l=e,this},this.useECommerce=function(e,t){return m=!!e,v=!!t,this},this.setCurrency=function(e){return f=e,this},this.setRemoveRegExp=function(e){return e instanceof RegExp&&(a=e),this},this.setExperimentId=function(e){return o=e,this},this.ignoreFirstPageLoad=function(e){return b=!!e,this},this.trackUrlParams=function(e){return O=!!e,this},this.disableAnalytics=function(e){return g=!!e,this},this.setHybridMobileSupport=function(e){return E=!!e,this},this.startOffline=function(e){return x=!!e,x===!0&&this.delayScriptTag(!0),this},this.delayScriptTag=function(e){return d=!!e,this},this.logAllCalls=function(e){return _=!!e,this},this.enterTestMode=function(){return S=!0,this},this.enterDebugMode=function(e){return h=!0,A=!!e,this},this.readFromRoute=function(e){return T=!!e,this},this.$get=["$document","$location","$log","$rootScope","$window","$injector",function(I,N,M,D,L,$){var R=this,P=function(t,n){return e.isObject(n)&&e.isDefined(n[t])},F=function(e,t,n){return P(e,t)&&t[e]===n},U=function(t,n){return e.isString(n)?n+"."+t:P("name",n)?n.name+"."+t:t},j={};T&&($.has("$route")?j=$.get("$route"):M.warn("$route service is not available. Make sure you have included ng-route in your application dependencies."));var H=function(){if(T&&j.current&&"pageTrack"in j.current)return j.current.pageTrack;var e=O?N.url():N.path();return a?e.replace(a,""):e},z=function(){var t={utm_source:"campaignSource",utm_medium:"campaignMedium",utm_term:"campaignTerm",utm_content:"campaignContent",utm_campaign:"campaignName"},n={};return e.forEach(N.search(),function(i,r){var o=t[r];e.isDefined(o)&&(n[o]=i)}),n},B=function(e,t,n,i,r,o,a,s,l){var u={};return e&&(u.id=e),t&&(u.affiliation=t),n&&(u.revenue=n),i&&(u.tax=i),r&&(u.shipping=r),o&&(u.coupon=o),a&&(u.list=a),s&&(u.step=s),l&&(u.option=l),u},q=function(e){!s&&L._gaq&&"function"==typeof e&&e()},W=function(){var e=Array.prototype.slice.call(arguments);return x===!0?void R.offlineQueue.push([W,e]):(L._gaq||(L._gaq=[]),_===!0&&R._log.apply(R,e),void L._gaq.push(e))},Y=function(e){s&&L.ga&&"function"==typeof e&&e()},G=function(){var e=Array.prototype.slice.call(arguments);return x===!0?void R.offlineQueue.push([G,e]):"function"!=typeof L.ga?void R._log("warn","ga function not set on window"):(_===!0&&R._log.apply(R,e),void L.ga.apply(null,e))},X=function(e){var t=Array.prototype.slice.call(arguments,1),i=t[0],r=[];return"function"==typeof e?n.forEach(function(t){e(t)&&r.push(t)}):r=n,0===r.length?void G.apply(R,t):void r.forEach(function(e){P("select",e)&&"function"==typeof e.select&&!e.select(t)||(t[0]=U(i,e),G.apply(R,t))})};return this._log=function(){var e=Array.prototype.slice.call(arguments);if(e.length>0){if(e.length>1)switch(e[0]){case"debug":case"error":case"info":case"log":case"warn":M[e[0]](e.slice(1))}R.log.push(e)}},this._createScriptTag=function(){if(!n||n.length<1)return void R._log("warn","No account id set to create script tag");if(n.length>1&&(R._log("warn","Multiple trackers are not supported with ga.js. Using first tracker only"),n=n.slice(0,1)),u===!0)return void R._log("warn","ga.js or analytics.js script tag already created");g===!0&&(R._log("info","Analytics disabled: "+n[0].tracker),L["ga-disable-"+n[0].tracker]=!0),W("_setAccount",n[0].tracker),r&&W("_setDomainName",r),y&&W("_require","inpage_linkid","//www.google-analytics.com/plugins/ga/inpage_linkid.js"),k&&!b&&(a?W("_trackPageview",H()):W("_trackPageview"));var e,t=I[0];return e=p===!0?("https:"===t.location.protocol?"https://":"http://")+"stats.g.doubleclick.net/dc.js":("https:"===t.location.protocol?"https://ssl":"http://www")+".google-analytics.com/ga.js",S!==!0?!function(){var n=t.createElement("script");n.type="text/javascript",n.async=!0,n.src=e;var i=t.getElementsByTagName("script")[0];i.parentNode.insertBefore(n,i)}():R._log("inject",e),u=!0,!0},this._createAnalyticsScriptTag=function(){if(!n)return void R._log("warn","No account id set to create analytics script tag");if(u===!0)return void R._log("warn","ga.js or analytics.js script tag already created");g===!0&&n.forEach(function(e){R._log("info","Analytics disabled: "+e.tracker),L["ga-disable-"+e.tracker]=!0});var t=I[0],r=E===!0?"https:":"",a=r+"//www.google-analytics.com/"+(h?"analytics_debug.js":"analytics.js");if(S!==!0?!function(e,t,n,i,r,o,a){e.GoogleAnalyticsObject=r,e[r]=e[r]||function(){(e[r].q=e[r].q||[]).push(arguments)},e[r].l=1*new Date,o=t.createElement(n),a=t.getElementsByTagName(n)[0],o.async=1,o.src=i,a.parentNode.insertBefore(o,a)}(window,t,"script",a,"ga"):("function"!=typeof L.ga&&(L.ga=function(){}),R._log("inject",a)),A&&(L.ga_debug={trace:!0}),n.forEach(function(t){t.crossDomainLinker=P("crossDomainLinker",t)?t.crossDomainLinker:c,t.crossLinkDomains=P("crossLinkDomains",t)?t.crossLinkDomains:i,t.displayFeatures=P("displayFeatures",t)?t.displayFeatures:p,t.enhancedLinkAttribution=P("enhancedLinkAttribution",t)?t.enhancedLinkAttribution:y,t.set=P("set",t)?t.set:{},t.trackEcommerce=P("trackEcommerce",t)?t.trackEcommerce:m,t.trackEvent=!!P("trackEvent",t)&&t.trackEvent;var n={};P("fields",t)?n=t.fields:P("cookieConfig",t)?e.isString(t.cookieConfig)?n.cookieDomain=t.cookieConfig:n=t.cookieConfig:e.isString(l)?n.cookieDomain=l:l&&(n=l),t.crossDomainLinker===!0&&(n.allowLinker=!0),P("name",t)&&(n.name=t.name),t.fields=n,G("create",t.tracker,t.fields),E===!0&&G(U("set",t),"checkProtocolTask",null);for(var r in t.set)t.set.hasOwnProperty(r)&&G(U("set",t),r,t.set[r]);t.crossDomainLinker===!0&&(G(U("require",t),"linker"),e.isDefined(t.crossLinkDomains)&&G(U("linker:autoLink",t),t.crossLinkDomains)),t.displayFeatures&&G(U("require",t),"displayfeatures"),t.trackEcommerce&&(v?(G(U("require",t),"ec"),G(U("set",t),"&cu",f)):G(U("require",t),"ecommerce")),t.enhancedLinkAttribution&&G(U("require",t),"linkid"),k&&!b&&G(U("send",t),"pageview",C+H())}),o){var s=t.createElement("script"),d=t.getElementsByTagName("script")[0];s.src=r+"//www.google-analytics.com/cx/api.js?experiment="+o,d.parentNode.insertBefore(s,d)}return u=!0,!0},this._ecommerceEnabled=function(e,t){var n=m&&!v;return e===!0&&n===!1&&(m&&v?R._log("warn",t+" is not available when Enhanced Ecommerce is enabled with analytics.js"):R._log("warn","Ecommerce must be enabled to use "+t+" with analytics.js")),n},this._enhancedEcommerceEnabled=function(e,t){var n=m&&v;return e===!0&&n===!1&&R._log("warn","Enhanced Ecommerce must be enabled to use "+t+" with analytics.js"),n},this._trackPage=function(n,i,r){n=n?n:H(),i=i?i:I[0].title,q(function(){W("_set","title",i),W("_trackPageview",C+n)}),Y(function(){var o={page:C+n,title:i};e.extend(o,z()),e.isObject(r)&&e.extend(o,r),X(t,"send","pageview",o)})},this._trackEvent=function(t,n,i,r,o,a){q(function(){W("_trackEvent",t,n,i,r,!!o)}),Y(function(){var s={},l=function(e){return F("trackEvent",e,!0)};e.isDefined(o)&&(s.nonInteraction=!!o),e.isObject(a)&&e.extend(s,a),e.isDefined(s.page)||(s.page=H()),X(l,"send","event",t,n,i,r,s)})},this._addTrans=function(e,t,n,i,r,o,a,s,l){q(function(){W("_addTrans",e,t,n,i,r,o,a,s)}),Y(function(){if(R._ecommerceEnabled(!0,"addTrans")){var o=function(e){return F("trackEcommerce",e,!0)};X(o,"ecommerce:addTransaction",{id:e,affiliation:t,revenue:n,tax:i,shipping:r,currency:l||"USD"})}})},this._addItem=function(e,t,n,i,r,o){q(function(){W("_addItem",e,t,n,i,r,o)}),Y(function(){if(R._ecommerceEnabled(!0,"addItem")){var a=function(e){return F("trackEcommerce",e,!0)};X(a,"ecommerce:addItem",{id:e,name:n,sku:t,category:i,price:r,quantity:o})}})},this._trackTrans=function(){q(function(){W("_trackTrans")}),Y(function(){if(R._ecommerceEnabled(!0,"trackTrans")){var e=function(e){return F("trackEcommerce",e,!0)};X(e,"ecommerce:send")}})},this._clearTrans=function(){Y(function(){if(R._ecommerceEnabled(!0,"clearTrans")){var e=function(e){return F("trackEcommerce",e,!0)};X(e,"ecommerce:clear")}})},this._addProduct=function(t,n,i,r,o,a,s,l,u,c){q(function(){W("_addProduct",t,n,i,r,o,a,s,l,u)}),Y(function(){if(R._enhancedEcommerceEnabled(!0,"addProduct")){var f=function(e){return F("trackEcommerce",e,!0)},h={id:t,name:n,category:i,brand:r,variant:o,price:a,quantity:s,coupon:l,position:u};e.isObject(c)&&e.extend(h,c),X(f,"ec:addProduct",h)}})},this._addImpression=function(e,t,n,i,r,o,a,s){q(function(){W("_addImpression",e,t,n,i,r,o,a,s)}),Y(function(){if(R._enhancedEcommerceEnabled(!0,"addImpression")){var l=function(e){return F("trackEcommerce",e,!0)};X(l,"ec:addImpression",{id:e,name:t,category:r,brand:i,variant:o,list:n,position:a,price:s})}})},this._addPromo=function(e,t,n,i){q(function(){W("_addPromo",e,t,n,i)}),Y(function(){if(R._enhancedEcommerceEnabled(!0,"addPromo")){var r=function(e){return F("trackEcommerce",e,!0)};X(r,"ec:addPromo",{id:e,name:t,creative:n,position:i})}})},this._setAction=function(e,t){q(function(){W("_setAction",e,t)}),Y(function(){if(R._enhancedEcommerceEnabled(!0,"setAction")){var n=function(e){return F("trackEcommerce",e,!0)};X(n,"ec:setAction",e,t)}})},this._trackTransaction=function(e,t,n,i,r,o,a,s,l){this._setAction("purchase",B(e,t,n,i,r,o,a,s,l))},this._trackRefund=function(e){this._setAction("refund",B(e))},this._trackCheckOut=function(e,t){this._setAction("checkout",B(null,null,null,null,null,null,null,e,t))},this._trackDetail=function(){this._setAction("detail"),this._pageView()},this._trackCart=function(e,t){-1!==["add","remove"].indexOf(e)&&(this._setAction(e,{list:t}),this._trackEvent("UX","click",e+("add"===e?" to cart":" from cart")))},this._promoClick=function(e){this._setAction("promo_click"),this._trackEvent("Internal Promotions","click",e)},this._productClick=function(e){this._setAction("click",B(null,null,null,null,null,null,e,null,null)),this._trackEvent("UX","click",e)},this._pageView=function(e){Y(function(){G(U("send",e),"pageview")})},this._send=function(){var e=Array.prototype.slice.call(arguments);e.unshift("send"),Y(function(){G.apply(R,e)})},this._set=function(e,t,n){Y(function(){G(U("set",n),e,t)})},this._trackTimings=function(e,n,i,r){Y(function(){X(t,"send","timing",e,n,i,r)})},this._trackException=function(e,n){Y(function(){X(t,"send","exception",{exDescription:e,exFatal:!!n})})},d||(s?this._createAnalyticsScriptTag():this._createScriptTag()),k&&D.$on(w,function(){(!T||j.current&&j.current.templateUrl&&!j.current.doNotTrack)&&R._trackPage()}),{log:R.log,offlineQueue:R.offlineQueue,configuration:{accounts:n,universalAnalytics:s,crossDomainLinker:c,crossLinkDomains:i,currency:f,debugMode:h,delayScriptTag:d,disableAnalytics:g,displayFeatures:p,domainName:r,ecommerce:R._ecommerceEnabled(),enhancedEcommerce:R._enhancedEcommerceEnabled(),enhancedLinkAttribution:y,experimentId:o,hybridMobileSupport:E,ignoreFirstPageLoad:b,logAllCalls:_,pageEvent:w,readFromRoute:T,removeRegExp:a,testMode:S,traceDebuggingMode:A,trackPrefix:C,trackRoutes:k,trackUrlParams:O},getUrl:H,setCookieConfig:R._setCookieConfig,getCookieConfig:function(){return l},createAnalyticsScriptTag:function(e){return e&&(l=e),R._createAnalyticsScriptTag()},createScriptTag:function(){return R._createScriptTag()},offline:function(e){if(e===!0&&x===!1&&(x=!0),e===!1&&x===!0)for(x=!1;R.offlineQueue.length>0;){var t=R.offlineQueue.shift();t[0].apply(R,t[1])}return x},trackPage:function(e,t,n){R._trackPage.apply(R,arguments)},trackEvent:function(e,t,n,i,r,o){R._trackEvent.apply(R,arguments)},addTrans:function(e,t,n,i,r,o,a,s,l){R._addTrans.apply(R,arguments)},addItem:function(e,t,n,i,r,o){R._addItem.apply(R,arguments)},trackTrans:function(){R._trackTrans.apply(R,arguments)},clearTrans:function(){R._clearTrans.apply(R,arguments)},addProduct:function(e,t,n,i,r,o,a,s,l,u){R._addProduct.apply(R,arguments)},addPromo:function(e,t,n,i){R._addPromo.apply(R,arguments)},addImpression:function(e,t,n,i,r,o,a,s){R._addImpression.apply(R,arguments)},productClick:function(e){R._productClick.apply(R,arguments)},promoClick:function(e){R._promoClick.apply(R,arguments)},trackDetail:function(){R._trackDetail.apply(R,arguments)},trackCart:function(e,t){R._trackCart.apply(R,arguments)},trackCheckout:function(e,t){R._trackCheckOut.apply(R,arguments)},trackTimings:function(e,t,n,i){R._trackTimings.apply(R,arguments)},trackTransaction:function(e,t,n,i,r,o,a,s,l){R._trackTransaction.apply(R,arguments)},trackException:function(e,t){R._trackException.apply(R,arguments)},setAction:function(e,t){R._setAction.apply(R,arguments)},pageView:function(){R._pageView.apply(R,arguments)},send:function(e){R._send.apply(R,arguments)},set:function(e,t,n){R._set.apply(R,arguments)}}}]}).directive("gaTrackEvent",["Analytics","$parse",function(e,t){return{restrict:"A",link:function(n,i,r){var o=t(r.gaTrackEvent);i.bind("click",function(){r.gaTrackEventIf&&!n.$eval(r.gaTrackEventIf)||o.length>1&&e.trackEvent.apply(e,o(n))})}}}]),e.module("angular-google-analytics")}),/**
 * An Angular module that gives you access to the browsers local storage
 * @version v0.2.6 - 2016-03-16
 * @link https://github.com/grevory/angular-local-storage
 * @author grevory <greg@gregpike.ca>
 * @license MIT License, http://www.opensource.org/licenses/MIT
 */
function(e,t){var n=t.isDefined,i=t.isUndefined,r=t.isNumber,o=t.isObject,a=t.isArray,s=t.extend,l=t.toJson;t.module("LocalStorageModule",[]).provider("localStorageService",function(){this.prefix="ls",this.storageType="localStorage",this.cookie={expiry:30,path:"/"},this.notify={setItem:!0,removeItem:!1},this.setPrefix=function(e){return this.prefix=e,this},this.setStorageType=function(e){return this.storageType=e,this},this.setStorageCookie=function(e,t){return this.cookie.expiry=e,this.cookie.path=t,this},this.setStorageCookieDomain=function(e){return this.cookie.domain=e,this},this.setNotify=function(e,t){return this.notify={setItem:e,removeItem:t},this},this.$get=["$rootScope","$window","$document","$parse",function(e,t,u,c){var f,h=this,d=h.prefix,p=h.cookie,g=h.notify,m=h.storageType;u?u[0]&&(u=u[0]):u=document,"."!==d.substr(-1)&&(d=d?d+".":"");var v=function(e){return d+e},y=function(){try{var n=m in t&&null!==t[m],i=v("__"+Math.round(1e7*Math.random()));return n&&(f=t[m],f.setItem(i,""),f.removeItem(i)),n}catch(r){return m="cookie",e.$broadcast("LocalStorageModule.notification.error",r.message),!1}}(),b=function(t,n){if(n=i(n)?null:l(n),!y||"cookie"===h.storageType)return y||e.$broadcast("LocalStorageModule.notification.warning","LOCAL_STORAGE_NOT_SUPPORTED"),g.setItem&&e.$broadcast("LocalStorageModule.notification.setitem",{key:t,newvalue:n,storageType:"cookie"}),S(t,n);try{f&&f.setItem(v(t),n),g.setItem&&e.$broadcast("LocalStorageModule.notification.setitem",{key:t,newvalue:n,storageType:h.storageType})}catch(r){return e.$broadcast("LocalStorageModule.notification.error",r.message),S(t,n)}return!0},_=function(t){if(!y||"cookie"===h.storageType)return y||e.$broadcast("LocalStorageModule.notification.warning","LOCAL_STORAGE_NOT_SUPPORTED"),A(t);var n=f?f.getItem(v(t)):null;if(!n||"null"===n)return null;try{return JSON.parse(n)}catch(i){return n}},E=function(){var t,n;for(t=0;t<arguments.length;t++)if(n=arguments[t],y&&"cookie"!==h.storageType)try{f.removeItem(v(n)),g.removeItem&&e.$broadcast("LocalStorageModule.notification.removeitem",{key:n,storageType:h.storageType})}catch(i){e.$broadcast("LocalStorageModule.notification.error",i.message),C(n)}else y||e.$broadcast("LocalStorageModule.notification.warning","LOCAL_STORAGE_NOT_SUPPORTED"),g.removeItem&&e.$broadcast("LocalStorageModule.notification.removeitem",{key:n,storageType:"cookie"}),C(n)},x=function(){if(!y)return e.$broadcast("LocalStorageModule.notification.warning","LOCAL_STORAGE_NOT_SUPPORTED"),[];var t=d.length,n=[];for(var i in f)if(i.substr(0,t)===d)try{n.push(i.substr(t))}catch(r){return e.$broadcast("LocalStorageModule.notification.error",r.Description),[]}return n},w=function(t){var n=d?new RegExp("^"+d):new RegExp,i=t?new RegExp(t):new RegExp;if(!y||"cookie"===h.storageType)return y||e.$broadcast("LocalStorageModule.notification.warning","LOCAL_STORAGE_NOT_SUPPORTED"),k();var r=d.length;for(var o in f)if(n.test(o)&&i.test(o.substr(r)))try{E(o.substr(r))}catch(a){return e.$broadcast("LocalStorageModule.notification.error",a.message),k()}return!0},T=function(){try{return t.navigator.cookieEnabled||"cookie"in u&&(u.cookie.length>0||(u.cookie="test").indexOf.call(u.cookie,"test")>-1)}catch(n){return e.$broadcast("LocalStorageModule.notification.error",n.message),!1}}(),S=function(t,n,s){if(i(n))return!1;if((a(n)||o(n))&&(n=l(n)),!T)return e.$broadcast("LocalStorageModule.notification.error","COOKIES_NOT_SUPPORTED"),!1;try{var c="",f=new Date,h="";if(null===n?(f.setTime(f.getTime()+-864e5),c="; expires="+f.toGMTString(),n=""):r(s)&&0!==s?(f.setTime(f.getTime()+24*s*60*60*1e3),c="; expires="+f.toGMTString()):0!==p.expiry&&(f.setTime(f.getTime()+24*p.expiry*60*60*1e3),c="; expires="+f.toGMTString()),t){var d="; path="+p.path;p.domain&&(h="; domain="+p.domain),u.cookie=v(t)+"="+encodeURIComponent(n)+c+d+h}}catch(g){return e.$broadcast("LocalStorageModule.notification.error",g.message),!1}return!0},A=function(t){if(!T)return e.$broadcast("LocalStorageModule.notification.error","COOKIES_NOT_SUPPORTED"),!1;for(var n=u.cookie&&u.cookie.split(";")||[],i=0;i<n.length;i++){for(var r=n[i];" "===r.charAt(0);)r=r.substring(1,r.length);if(0===r.indexOf(v(t)+"=")){var o=decodeURIComponent(r.substring(d.length+t.length+1,r.length));try{return JSON.parse(o)}catch(a){return o}}}return null},C=function(e){S(e,null)},k=function(){for(var e=null,t=d.length,n=u.cookie.split(";"),i=0;i<n.length;i++){for(e=n[i];" "===e.charAt(0);)e=e.substring(1,e.length);var r=e.substring(t,e.indexOf("="));C(r)}},O=function(){return m},I=function(e,t,i,r){r=r||t;var a=_(r);return null===a&&n(i)?a=i:o(a)&&o(i)&&(a=s(a,i)),c(t).assign(e,a),e.$watch(t,function(e){b(r,e)},o(e[t]))},N=function(){for(var e=0,n=t[m],i=0;i<n.length;i++)0===n.key(i).indexOf(d)&&e++;return e};return{isSupported:y,getStorageType:O,set:b,add:b,get:_,keys:x,remove:E,clearAll:w,bind:I,deriveKey:v,length:N,cookie:{isSupported:T,set:S,add:S,get:A,remove:C,clearAll:k}}}]})}(window,window.angular),/**
 * @license AngularJS v1.5.8
 * (c) 2010-2016 Google, Inc. http://angularjs.org
 * License: MIT
 */
function(e,t){"use strict";function n(e){var t;if(t=e.match(l)){var n=new Date(0),r=0,o=0;return t[9]&&(r=i(t[9]+t[10]),o=i(t[9]+t[11])),n.setUTCFullYear(i(t[1]),i(t[2])-1,i(t[3])),n.setUTCHours(i(t[4]||0)-r,i(t[5]||0)-o,i(t[6]||0),i(t[7]||0)),n}return e}function i(e){return parseInt(e,10)}function r(e,t,n){var i="";for(e<0&&(i="-",e=-e),e=""+e;e.length<t;)e="0"+e;return n&&(e=e.substr(e.length-t)),i+e}function o(e,n,i,r){function o(e,n,i,r){return t.isFunction(e)?e:function(){return t.isNumber(e)?[e,n,i,r]:[200,e,n,i]}}function l(e,o,a,l,u,c,m,v,y,b){function _(e){return t.isString(e)||t.isFunction(e)||e instanceof RegExp?e:t.toJson(e)}function E(t){function i(){var n=t.response(e,o,a,u,t.params(o));x.$$respHeaders=n[2],l(g(n[0]),g(n[1]),x.getAllResponseHeaders(),g(n[3]||""))}function s(){for(var e=0,t=d.length;e<t;e++)if(d[e]===i){d.splice(e,1),l(-1,void 0,"");break}}return!r&&c&&(c.then?c.then(s):n(s,c)),i}var x=new s,w=h[0],T=!1;if(x.$$events=y,x.upload.$$events=b,w&&w.match(e,o)){if(!w.matchData(a))throw new Error("Expected "+w+" with different data\nEXPECTED: "+_(w.data)+"\nGOT:      "+a);if(!w.matchHeaders(u))throw new Error("Expected "+w+" with different headers\nEXPECTED: "+_(w.headers)+"\nGOT:      "+_(u));if(h.shift(),w.response)return void d.push(E(w));T=!0}for(var S,A=-1;S=f[++A];)if(S.match(e,o,a,u||{})){if(S.response)(r?r.defer:p)(E(S));else{if(!S.passThrough)throw new Error("No response defined !");i(e,o,a,l,u,c,m,v,y,b)}return}throw T?new Error("No response defined !"):new Error("Unexpected request: "+e+" "+o+"\n"+(w?"Expected "+w:"No more request expected"))}function u(e){var n={regexp:e},i=n.keys=[];return e&&t.isString(e)?(e=e.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(e,t,n,r){var o="?"===r?r:null,a="*"===r?r:null;return i.push({name:n,optional:!!o}),t=t||"",""+(o?"":t)+"(?:"+(o?t:"")+(a&&"(.+?)"||"([^/]+)")+(o||"")+")"+(o||"")}).replace(/([\/$\*])/g,"\\$1"),n.regexp=new RegExp("^"+e,"i"),n):n}function c(e){t.forEach(["GET","DELETE","JSONP","HEAD"],function(t){l[e+t]=function(n,i,r){return l[e](t,n,void 0,i,r)}}),t.forEach(["PUT","POST","PATCH"],function(t){l[e+t]=function(n,i,r,o){return l[e](t,n,i,r,o)}})}var f=[],h=[],d=[],p=t.bind(d,d.push),g=t.copy;return l.when=function(e,t,n,i,s){var l=new a(e,t,n,i,s),u={respond:function(e,t,n,i){return l.passThrough=void 0,l.response=o(e,t,n,i),u}};return r&&(u.passThrough=function(){return l.response=void 0,l.passThrough=!0,u}),f.push(l),u},c("when"),l.whenRoute=function(e,t){var n=u(t);return l.when(e,n.regexp,void 0,void 0,n.keys)},l.expect=function(e,t,n,i,r){var s=new a(e,t,n,i,r),l={respond:function(e,t,n,i){return s.response=o(e,t,n,i),l}};return h.push(s),l},c("expect"),l.expectRoute=function(e,t){var n=u(t);return l.expect(e,n.regexp,void 0,void 0,n.keys)},l.flush=function(n,i){if(i!==!1&&e.$digest(),!d.length)throw new Error("No pending request to flush !");if(t.isDefined(n)&&null!==n)for(;n--;){if(!d.length)throw new Error("No more pending request to flush !");d.shift()()}else for(;d.length;)d.shift()();l.verifyNoOutstandingExpectation(i)},l.verifyNoOutstandingExpectation=function(t){if(t!==!1&&e.$digest(),h.length)throw new Error("Unsatisfied requests: "+h.join(", "))},l.verifyNoOutstandingRequest=function(){if(d.length)throw new Error("Unflushed requests: "+d.length)},l.resetExpectations=function(){h.length=0,d.length=0},l}function a(e,n,i,r,o){function a(e){var t=e.slice(e.indexOf("?")+1).split("&");return t.sort()}function s(e){return n.slice(0,n.indexOf("?"))==e.slice(0,e.indexOf("?"))&&a(n).join()==a(e).join()}this.data=i,this.headers=r,this.match=function(n,i,r,o){return e==n&&(!!this.matchUrl(i)&&(!(t.isDefined(r)&&!this.matchData(r))&&!(t.isDefined(o)&&!this.matchHeaders(o))))},this.matchUrl=function(e){return!n||(t.isFunction(n.test)?n.test(e):t.isFunction(n)?n(e):n==e||s(e))},this.matchHeaders=function(e){return!!t.isUndefined(r)||(t.isFunction(r)?r(e):t.equals(r,e))},this.matchData=function(e){return!!t.isUndefined(i)||(i&&t.isFunction(i.test)?i.test(e):i&&t.isFunction(i)?i(e):i&&!t.isString(i)?t.equals(t.fromJson(t.toJson(i)),t.fromJson(e)):i==e)},this.toString=function(){return e+" "+n},this.params=function(e){function i(){var i={};if(!n||!t.isFunction(n.test)||!o||0===o.length)return i;var r=n.exec(e);if(!r)return i;for(var a=1,s=r.length;a<s;++a){var l=o[a-1],u=r[a];l&&u&&(i[l.name||l]=u)}return i}function r(){var n,i,r={},o=e.indexOf("?")>-1?e.substring(e.indexOf("?")+1):"";return t.forEach(o.split("&"),function(e){if(e&&(n=e.replace(/\+/g,"%20").split("="),i=a(n[0]),t.isDefined(i))){var o=!t.isDefined(n[1])||a(n[1]);hasOwnProperty.call(r,i)?t.isArray(r[i])?r[i].push(o):r[i]=[r[i],o]:r[i]=o}}),r}function a(e){try{return decodeURIComponent(e)}catch(t){}}return t.extend(r(),i())}}function s(){s.$$lastInstance=this,this.open=function(e,t,n){this.$$method=e,this.$$url=t,this.$$async=n,this.$$reqHeaders={},this.$$respHeaders={}},this.send=function(e){this.$$data=e},this.setRequestHeader=function(e,t){this.$$reqHeaders[e]=t},this.getResponseHeader=function(e){var n=this.$$respHeaders[e];return n?n:(e=t.lowercase(e),(n=this.$$respHeaders[e])?n:(n=void 0,t.forEach(this.$$respHeaders,function(i,r){n||t.lowercase(r)!=e||(n=i)}),n))},this.getAllResponseHeaders=function(){var e=[];return t.forEach(this.$$respHeaders,function(t,n){e.push(n+": "+t)}),e.join("\n")},this.abort=t.noop,this.$$events={},this.addEventListener=function(e,n){t.isUndefined(this.$$events[e])&&(this.$$events[e]=[]),this.$$events[e].push(n)},this.upload={$$events:{},addEventListener:this.addEventListener}}t.mock={},t.mock.$BrowserProvider=function(){this.$get=function(){return new t.mock.$Browser}},t.mock.$Browser=function(){var e=this;this.isMock=!0,e.$$url="http://server/",e.$$lastUrl=e.$$url,e.pollFns=[],e.$$completeOutstandingRequest=t.noop,e.$$incOutstandingRequestCount=t.noop,e.onUrlChange=function(t){return e.pollFns.push(function(){e.$$lastUrl===e.$$url&&e.$$state===e.$$lastState||(e.$$lastUrl=e.$$url,e.$$lastState=e.$$state,t(e.$$url,e.$$state))}),t},e.$$applicationDestroyed=t.noop,e.$$checkUrlChange=t.noop,e.deferredFns=[],e.deferredNextId=0,e.defer=function(t,n){return n=n||0,e.deferredFns.push({time:e.defer.now+n,fn:t,id:e.deferredNextId}),e.deferredFns.sort(function(e,t){return e.time-t.time}),e.deferredNextId++},e.defer.now=0,e.defer.cancel=function(n){var i;return t.forEach(e.deferredFns,function(e,t){e.id===n&&(i=t)}),!!t.isDefined(i)&&(e.deferredFns.splice(i,1),!0)},e.defer.flush=function(n){var i;if(t.isDefined(n))i=e.defer.now+n;else{if(!e.deferredFns.length)throw new Error("No deferred tasks to be flushed");i=e.deferredFns[e.deferredFns.length-1].time}for(;e.deferredFns.length&&e.deferredFns[0].time<=i;)e.defer.now=e.deferredFns[0].time,e.deferredFns.shift().fn();e.defer.now=i},e.$$baseHref="/",e.baseHref=function(){return this.$$baseHref}},t.mock.$Browser.prototype={poll:function(){t.forEach(this.pollFns,function(e){e()})},url:function(e,n,i){return t.isUndefined(i)&&(i=null),e?(this.$$url=e,this.$$state=t.copy(i),this):this.$$url},state:function(){return this.$$state},notifyWhenNoOutstandingRequests:function(e){e()}},t.mock.$ExceptionHandlerProvider=function(){var e;this.mode=function(t){switch(t){case"log":case"rethrow":var n=[];e=function(e){if(1==arguments.length?n.push(e):n.push([].slice.call(arguments,0)),"rethrow"===t)throw e},e.errors=n;break;default:throw new Error("Unknown mode '"+t+"', only 'log'/'rethrow' modes are allowed!")}},this.$get=function(){return e},this.mode("rethrow")},t.mock.$LogProvider=function(){function e(e,t,n){return e.concat(Array.prototype.slice.call(t,n))}var n=!0;this.debugEnabled=function(e){return t.isDefined(e)?(n=e,this):n},this.$get=function(){var i={log:function(){i.log.logs.push(e([],arguments,0))},warn:function(){i.warn.logs.push(e([],arguments,0))},info:function(){i.info.logs.push(e([],arguments,0))},error:function(){i.error.logs.push(e([],arguments,0))},debug:function(){n&&i.debug.logs.push(e([],arguments,0))}};return i.reset=function(){i.log.logs=[],i.info.logs=[],i.warn.logs=[],i.error.logs=[],i.debug.logs=[]},i.assertEmpty=function(){var e=[];if(t.forEach(["error","warn","info","log","debug"],function(n){t.forEach(i[n].logs,function(i){t.forEach(i,function(t){e.push("MOCK $log ("+n+"): "+String(t)+"\n"+(t.stack||""))})})}),e.length)throw e.unshift("Expected $log to be empty! Either a message was logged unexpectedly, or an expected log message was not checked and removed:"),e.push(""),new Error(e.join("\n---------\n"))},i.reset(),i}},t.mock.$IntervalProvider=function(){this.$get=["$browser","$rootScope","$q","$$q",function(e,n,i,r){var o=[],a=0,s=0,l=function(l,u,c,f){function h(){if(v.notify(g++),c>0&&g>=c){var i;v.resolve(g),t.forEach(o,function(e,t){e.id===y.$$intervalId&&(i=t)}),t.isDefined(i)&&o.splice(i,1)}m?e.defer.flush():n.$apply()}var d=arguments.length>4,p=d?Array.prototype.slice.call(arguments,4):[],g=0,m=t.isDefined(f)&&!f,v=(m?r:i).defer(),y=v.promise;return c=t.isDefined(c)?c:0,y.then(null,null,d?function(){l.apply(null,p)}:l),y.$$intervalId=a,o.push({nextTime:s+u,delay:u,fn:h,id:a,deferred:v}),o.sort(function(e,t){return e.nextTime-t.nextTime}),a++,y};return l.cancel=function(e){if(!e)return!1;var n;return t.forEach(o,function(t,i){t.id===e.$$intervalId&&(n=i)}),!!t.isDefined(n)&&(o[n].deferred.reject("canceled"),o.splice(n,1),!0)},l.flush=function(e){for(s+=e;o.length&&o[0].nextTime<=s;){var t=o[0];t.fn(),t.nextTime+=t.delay,o.sort(function(e,t){return e.nextTime-t.nextTime})}return e},l}]};var l=/^(-?\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?:\:?(\d\d)(?:\:?(\d\d)(?:\.(\d{3}))?)?)?(Z|([+-])(\d\d):?(\d\d)))?$/;t.mock.TzDate=function(e,i){var o=new Date(0);if(t.isString(i)){var a=i;if(o.origDate=n(i),i=o.origDate.getTime(),isNaN(i))throw{name:"Illegal Argument",message:"Arg '"+a+"' passed into TzDate constructor is not a valid date string"}}else o.origDate=new Date(i);var s=new Date(i).getTimezoneOffset();o.offsetDiff=60*s*1e3-1e3*e*60*60,o.date=new Date(i+o.offsetDiff),o.getTime=function(){return o.date.getTime()-o.offsetDiff},o.toLocaleDateString=function(){return o.date.toLocaleDateString()},o.getFullYear=function(){return o.date.getFullYear()},o.getMonth=function(){return o.date.getMonth()},o.getDate=function(){return o.date.getDate()},o.getHours=function(){return o.date.getHours()},o.getMinutes=function(){return o.date.getMinutes()},o.getSeconds=function(){return o.date.getSeconds()},o.getMilliseconds=function(){return o.date.getMilliseconds()},o.getTimezoneOffset=function(){return 60*e},o.getUTCFullYear=function(){return o.origDate.getUTCFullYear()},o.getUTCMonth=function(){return o.origDate.getUTCMonth()},o.getUTCDate=function(){return o.origDate.getUTCDate()},o.getUTCHours=function(){return o.origDate.getUTCHours()},o.getUTCMinutes=function(){return o.origDate.getUTCMinutes()},o.getUTCSeconds=function(){return o.origDate.getUTCSeconds()},o.getUTCMilliseconds=function(){return o.origDate.getUTCMilliseconds()},o.getDay=function(){return o.date.getDay()},o.toISOString&&(o.toISOString=function(){return r(o.origDate.getUTCFullYear(),4)+"-"+r(o.origDate.getUTCMonth()+1,2)+"-"+r(o.origDate.getUTCDate(),2)+"T"+r(o.origDate.getUTCHours(),2)+":"+r(o.origDate.getUTCMinutes(),2)+":"+r(o.origDate.getUTCSeconds(),2)+"."+r(o.origDate.getUTCMilliseconds(),3)+"Z"});var l=["getUTCDay","getYear","setDate","setFullYear","setHours","setMilliseconds","setMinutes","setMonth","setSeconds","setTime","setUTCDate","setUTCFullYear","setUTCHours","setUTCMilliseconds","setUTCMinutes","setUTCMonth","setUTCSeconds","setYear","toDateString","toGMTString","toJSON","toLocaleFormat","toLocaleString","toLocaleTimeString","toSource","toString","toTimeString","toUTCString","valueOf"];return t.forEach(l,function(e){o[e]=function(){throw new Error("Method '"+e+"' is not implemented in the TzDate mock")}}),o},t.mock.TzDate.prototype=Date.prototype,t.mock.animate=t.module("ngAnimateMock",["ng"]).config(["$provide",function(e){e.factory("$$forceReflow",function(){function e(){e.totalReflows++}return e.totalReflows=0,e}),e.factory("$$animateAsyncRun",function(){var e=[],t=function(){return function(t){e.push(t)}};return t.flush=function(){if(0===e.length)return!1;for(var t=0;t<e.length;t++)e[t]();return e=[],!0},t}),e.decorator("$$animateJs",["$delegate",function(e){var t=[],n=function(){var n=e.apply(e,arguments);return n&&t.push(n),n};return n.$closeAndFlush=function(){t.forEach(function(e){e.end()}),t=[]},n}]),e.decorator("$animateCss",["$delegate",function(e){var t=[],n=function(n,i){var r=e(n,i);return t.push(r),r};return n.$closeAndFlush=function(){t.forEach(function(e){e.end()}),t=[]},n}]),e.decorator("$animate",["$delegate","$timeout","$browser","$$rAF","$animateCss","$$animateJs","$$forceReflow","$$animateAsyncRun","$rootScope",function(e,n,i,r,o,a,s,l,u){var c={queue:[],cancel:e.cancel,on:e.on,off:e.off,pin:e.pin,get reflows(){return s.totalReflows},enabled:e.enabled,closeAndFlush:function(){this.flush(!0),o.$closeAndFlush(),a.$closeAndFlush(),this.flush()},flush:function(e){u.$digest();var t,n=!1;do t=!1,r.queue.length&&(r.flush(),t=n=!0),l.flush()&&(t=n=!0);while(t);if(!n&&!e)throw new Error("No pending animations ready to be closed or flushed");u.$digest()}};return t.forEach(["animate","enter","leave","move","addClass","removeClass","setClass"],function(t){c[t]=function(){return c.queue.push({event:t,element:arguments[0],options:arguments[arguments.length-1],args:arguments}),e[t].apply(e,arguments)}}),c}])}]),t.mock.dump=function(e){function n(e){var r;return t.isElement(e)?(e=t.element(e),r=t.element("<div></div>"),t.forEach(e,function(e){r.append(t.element(e).clone())}),r=r.html()):t.isArray(e)?(r=[],t.forEach(e,function(e){r.push(n(e))}),r="[ "+r.join(", ")+" ]"):r=t.isObject(e)?t.isFunction(e.$eval)&&t.isFunction(e.$apply)?i(e):e instanceof Error?e.stack||""+e.name+": "+e.message:t.toJson(e,!0):String(e),r}function i(e,n){n=n||"  ";var r=[n+"Scope("+e.$id+"): {"];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&!o.match(/^(\$|this)/)&&r.push("  "+o+": "+t.toJson(e[o]));for(var a=e.$$childHead;a;)r.push(i(a,n+"  ")),a=a.$$nextSibling;return r.push("}"),r.join("\n"+n)}return n(e)},t.mock.$HttpBackendProvider=function(){this.$get=["$rootScope","$timeout",o]},t.mock.$TimeoutDecorator=["$delegate","$browser",function(e,n){function i(e){var n=[];return t.forEach(e,function(e){n.push("{id: "+e.id+", time: "+e.time+"}")}),n.join(", ")}return e.flush=function(e){n.defer.flush(e)},e.verifyNoPendingTasks=function(){if(n.deferredFns.length)throw new Error("Deferred tasks to flush ("+n.deferredFns.length+"): "+i(n.deferredFns))},e}],t.mock.$RAFDecorator=["$delegate",function(e){var t=function(e){var n=t.queue.length;return t.queue.push(e),function(){t.queue.splice(n,1)}};return t.queue=[],t.supported=e.supported,t.flush=function(){if(0===t.queue.length)throw new Error("No rAF callbacks present");for(var e=t.queue.length,n=0;n<e;n++)t.queue[n]();t.queue=t.queue.slice(n)},t}];var u;t.mock.$RootElementProvider=function(){this.$get=["$injector",function(e){return u=t.element("<div ng-app></div>").data("$injector",e)}]},t.mock.$ControllerDecorator=["$delegate",function(e){return function(n,i,r,o){if(r&&"object"==typeof r){var a=e(n,i,!0,o);t.extend(a.instance,r);var s=a();return s!==a.instance&&t.extend(s,r),s}return e(n,i,r,o)}}],t.mock.$ComponentControllerProvider=["$compileProvider",function(e){this.$get=["$controller","$injector","$rootScope",function(e,t,n){return function(i,r,o,a){var s=t.get(i+"Directive"),l=s.filter(function(e){return e.controller&&e.controllerAs&&"E"===e.restrict});if(0===l.length)throw new Error("No component found");if(l.length>1)throw new Error("Too many components found");var u=l[0];return r=r||{},r.$scope=r.$scope||n.$new(!0),e(u.controller,r,o,a||u.controllerAs)}}]}],t.module("ngMock",["ng"]).provider({$browser:t.mock.$BrowserProvider,$exceptionHandler:t.mock.$ExceptionHandlerProvider,$log:t.mock.$LogProvider,$interval:t.mock.$IntervalProvider,$httpBackend:t.mock.$HttpBackendProvider,$rootElement:t.mock.$RootElementProvider,$componentController:t.mock.$ComponentControllerProvider}).config(["$provide",function(e){e.decorator("$timeout",t.mock.$TimeoutDecorator),e.decorator("$$rAF",t.mock.$RAFDecorator),e.decorator("$rootScope",t.mock.$RootScopeDecorator),e.decorator("$controller",t.mock.$ControllerDecorator)}]),t.module("ngMockE2E",["ng"]).config(["$provide",function(e){e.value("$httpBackend",t.injector(["ng"]).get("$httpBackend")),e.decorator("$httpBackend",t.mock.e2e.$httpBackendDecorator)}]),t.mock.e2e={},t.mock.e2e.$httpBackendDecorator=["$rootScope","$timeout","$delegate","$browser",o],t.mock.$RootScopeDecorator=["$delegate",function(e){function t(){for(var e,t=0,n=[this.$$childHead];n.length;)for(e=n.shift();e;)t+=1,n.push(e.$$childHead),e=e.$$nextSibling;return t}function n(){for(var e,t=this.$$watchers?this.$$watchers.length:0,n=[this.$$childHead];n.length;)for(e=n.shift();e;)t+=e.$$watchers?e.$$watchers.length:0,n.push(e.$$childHead),e=e.$$nextSibling;return t}var i=Object.getPrototypeOf(e);return i.$countChildScopes=t,i.$countWatchers=n,e}],!function(n){function i(){this.shared=!1,this.sharedError=null,this.cleanupAfterEach=function(){return!this.shared||this.sharedError}}if(n){var r=null,o=new i,a=[],l=function(){return!!r};t.mock.$$annotate=t.injector.$$annotate,t.injector.$$annotate=function(e){return"function"!=typeof e||e.$inject||a.push(e),t.mock.$$annotate.apply(this,arguments)};var c=e.module=t.mock.module=function(){function e(){if(r.$injector)throw new Error("Injector already created, can not register a module!");var e,i=r.$modules||(r.$modules=[]);t.forEach(n,function(n){e=t.isObject(n)&&!t.isArray(n)?["$provide",function(e){t.forEach(n,function(t,n){e.value(n,t)})}]:n,r.$providerInjector?r.$providerInjector.invoke(e):i.push(e)})}var n=Array.prototype.slice.call(arguments,0);return l()?e():e};c.$$beforeAllHook=e.before||e.beforeAll,c.$$afterAllHook=e.after||e.afterAll,c.$$currentSpec=function(e){return 0===arguments.length?e:void(r=e)},c.sharedInjector=function(){if(!c.$$beforeAllHook||!c.$$afterAllHook)throw Error("sharedInjector() cannot be used unless your test runner defines beforeAll/afterAll");var e=!1;c.$$beforeAllHook(function(){if(o.shared)throw o.sharedError=Error("sharedInjector() cannot be called inside a context that has already called sharedInjector()"),o.sharedError;e=!0,r=this,o.shared=!0}),c.$$afterAllHook(function(){e?(o=new i,c.$$cleanup()):o.sharedError=null})},c.$$beforeEach=function(){if(o.shared&&r&&r!=this){var e=r;r=this,t.forEach(["$injector","$modules","$providerInjector","$injectorStrict"],function(t){r[t]=e[t],e[t]=null})}else r=this,u=null,a=[]},c.$$afterEach=function(){o.cleanupAfterEach()&&c.$$cleanup()},c.$$cleanup=function(){var e=r.$injector;if(a.forEach(function(e){delete e.$inject}),t.forEach(r.$modules,function(e){e&&e.$$hashKey&&(e.$$hashKey=void 0)}),r.$injector=null,r.$modules=null,r.$providerInjector=null,r=null,e){var n=e.get("$rootElement"),i=n&&n[0],o=u?[u[0]]:[];!i||u&&i===u[0]||o.push(i),t.element.cleanData(o);var l=e.get("$rootScope");l&&l.$destroy&&l.$destroy()}t.forEach(t.element.fragments,function(e,n){delete t.element.fragments[n]}),s.$$lastInstance=null,t.forEach(t.callbacks,function(e,n){delete t.callbacks[n]}),t.callbacks.$$counter=0},(e.beforeEach||e.setup)(c.$$beforeEach),(e.afterEach||e.teardown)(c.$$afterEach);var f=function(e,t){this.message=e.message,this.name=e.name,e.line&&(this.line=e.line),e.sourceId&&(this.sourceId=e.sourceId),e.stack&&t&&(this.stack=e.stack+"\n"+t.stack),e.stackArray&&(this.stackArray=e.stackArray)};f.prototype=Error.prototype,e.inject=t.mock.inject=function(){function e(){var e=r.$modules||[],o=!!r.$injectorStrict;e.unshift(["$injector",function(e){r.$providerInjector=e}]),e.unshift("ngMock"),e.unshift("ng");var a=r.$injector;a||(o&&t.forEach(e,function(e){"function"==typeof e&&t.injector.$$annotate(e)}),a=r.$injector=t.injector(e,o),r.$injectorStrict=o);for(var s=0,l=n.length;s<l;s++){r.$injectorStrict&&a.annotate(n[s]);try{a.invoke(n[s]||t.noop,this)}catch(u){if(u.stack&&i)throw new f(u,i);throw u}finally{i=null}}}var n=Array.prototype.slice.call(arguments,0),i=new Error("Declaration Location");if(!i.stack)try{throw i}catch(o){}return l()?e.call(r):e},t.mock.inject.strictDi=function(e){function t(){if(e!==r.$injectorStrict){if(r.$injector)throw new Error("Injector already created, can not modify strict annotations");r.$injectorStrict=e}}return e=!arguments.length||!!e,l()?t():t}}}(e.jasmine||e.mocha)}(window,window.angular),/**
 * @license AngularJS v1.5.8
 * (c) 2010-2016 Google, Inc. http://angularjs.org
 * License: MIT
 */
function(e,t){"use strict";function n(){function n(e,t){var n,i={},r=e.split(",");for(n=0;n<r.length;n++)i[t?l(r[n]):r[n]]=!0;return i}function i(t,n){null===t||void 0===t?t="":"string"!=typeof t&&(t=""+t),y.innerHTML=t;var i=5;do{if(0===i)throw h("uinput","Failed to sanitize html because the input is unstable");i--,e.document.documentMode&&m(y),t=y.innerHTML,y.innerHTML=t}while(t!==y.innerHTML);for(var r=y.firstChild;r;){switch(r.nodeType){case 1:n.start(r.nodeName.toLowerCase(),d(r.attributes));break;case 3:n.chars(r.textContent)}var o;if(!(o=r.firstChild)&&(1==r.nodeType&&n.end(r.nodeName.toLowerCase()),o=r.nextSibling,!o))for(;null==o&&(r=r.parentNode,r!==y);)o=r.nextSibling,1==r.nodeType&&n.end(r.nodeName.toLowerCase());r=o}for(;r=y.firstChild;)y.removeChild(r)}function d(e){for(var t={},n=0,i=e.length;n<i;n++){var r=e[n];t[r.name]=r.value}return t}function p(e){return e.replace(/&/g,"&amp;").replace(b,function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1);return"&#"+(1024*(t-55296)+(n-56320)+65536)+";"}).replace(_,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function g(e,t){var n=!1,i=r(e,e.push);return{start:function(e,r){e=l(e),!n&&k[e]&&(n=e),n||O[e]!==!0||(i("<"),i(e),a(r,function(n,r){var o=l(r),a="img"===e&&"src"===o||"background"===o;D[o]!==!0||I[o]===!0&&!t(n,a)||(i(" "),i(r),i('="'),i(p(n)),i('"'))}),i(">"))},end:function(e){e=l(e),n||O[e]!==!0||E[e]===!0||(i("</"),i(e),i(">")),e==n&&(n=!1)},chars:function(e){n||i(p(e))}}}function m(t){if(t.nodeType===e.Node.ELEMENT_NODE)for(var n=t.attributes,i=0,r=n.length;i<r;i++){var o=n[i],a=o.name.toLowerCase();"xmlns:ns1"!==a&&0!==a.lastIndexOf("ns1:",0)||(t.removeAttributeNode(o),i--,r--)}var s=t.firstChild;s&&m(s),s=t.nextSibling,s&&m(s)}var v=!1;this.$get=["$$sanitizeUri",function(e){return v&&o(O,C),function(t){var n=[];return c(t,f(n,function(t,n){return!/^unsafe:/.test(e(t,n))})),n.join("")}}],this.enableSvg=function(e){return s(e)?(v=e,this):v},r=t.bind,o=t.extend,a=t.forEach,s=t.isDefined,l=t.lowercase,u=t.noop,c=i,f=g;var y,b=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,_=/([^\#-~ |!])/g,E=n("area,br,col,hr,img,wbr"),x=n("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),w=n("rp,rt"),T=o({},w,x),S=o({},x,n("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul")),A=o({},w,n("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),C=n("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan"),k=n("script,style"),O=o({},E,S,A,T),I=n("background,cite,href,longdesc,src,xlink:href"),N=n("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width"),M=n("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",!0),D=o({},I,M,N);!function(e){var t;if(!e.document||!e.document.implementation)throw h("noinert","Can't create an inert html document");t=e.document.implementation.createHTMLDocument("inert");var n=t.documentElement||t.getDocumentElement(),i=n.getElementsByTagName("body");if(1===i.length)y=i[0];else{var r=t.createElement("html");y=t.createElement("body"),r.appendChild(y),t.appendChild(r)}}(e)}function i(e){var t=[],n=f(t,u);return n.chars(e),t.join("")}var r,o,a,s,l,u,c,f,h=t.$$minErr("$sanitize");t.module("ngSanitize",[]).provider("$sanitize",n),t.module("ngSanitize").filter("linky",["$sanitize",function(e){var n=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,r=/^mailto:/i,o=t.$$minErr("linky"),a=t.isDefined,s=t.isFunction,l=t.isObject,u=t.isString;return function(t,c,f){function h(e){e&&b.push(i(e))}function d(e,t){var n,i=v(e);b.push("<a ");for(n in i)b.push(n+'="'+i[n]+'" ');!a(c)||"target"in i||b.push('target="',c,'" '),b.push('href="',e.replace(/"/g,"&quot;"),'">'),h(t),b.push("</a>")}if(null==t||""===t)return t;if(!u(t))throw o("notstring","Expected string but received: {0}",t);for(var p,g,m,v=s(f)?f:l(f)?function(){return f}:function(){return{}},y=t,b=[];p=y.match(n);)g=p[0],p[2]||p[4]||(g=(p[3]?"http://":"mailto:")+g),m=p.index,h(y.substr(0,m)),d(g,p[0].replace(r,"")),y=y.substring(m+p[0].length);return h(y),e(b.join(""))}}])}(window,window.angular),function(e,t){"use strict";function n(e){if(!("clientX"in e||"clientY"in e)){var t=e.touches||e.originalEvent.touches;t&&t.length&&(e.clientX=t[0].clientX,e.clientY=t[0].clientY),e.preventDefault()}}function i(e){if(e=e[0],e.previousElementSibling)return t.element(e.previousElementSibling);for(var n=e.previousSibling;null!=n&&1!=n.nodeType;)n=n.previousSibling;return t.element(n)}function r(e,t){var n=i(e);n.length>0?n.after(t):e.parent().prepend(t)}function o(e,n){if(e instanceof t.element&&(e=e[0]),null!==l)return e[l](n)}var a=t.module("angular-sortable-view",[]);a.directive("svRoot",[function(){function e(e,t,n){return n?e.x-t.x<0:e.y-t.y<0}function t(e){return a[e]}function n(e){delete a[e]}var i,a=Object.create(null);return{restrict:"A",controller:["$scope","$attrs","$interpolate","$parse",function(s,l,u,c){var f=u(l.svRoot)(s)||s.$id;a[f]||(a[f]=[]);var h,d,p,g,m,v,y=!1,b=c(l.svOnSort);l.svOnStart=l.$$element[0].attributes["sv-on-start"],l.svOnStart=l.svOnStart&&l.svOnStart.value,l.svOnStop=l.$$element[0].attributes["sv-on-stop"],l.svOnStop=l.svOnStop&&l.svOnStop.value;var _=c(l.svOnStart),E=c(l.svOnStop);if(this.sortingInProgress=function(){return i},l.svGrid){if(y="true"===l.svGrid||"false"!==l.svGrid&&null,null===y)throw"Invalid value of sv-grid attribute"}else s.$watchCollection(function(){return t(f)},function(e){y=!1;var t=e.filter(function(e){return!e.container}).map(function(e){return{part:e.getPart().id,y:e.element[0].getBoundingClientRect().top}}),n=Object.create(null);t.forEach(function(e){n[e.part]?n[e.part].push(e.y):n[e.part]=[e.y]}),Object.keys(n).forEach(function(e){n[e].sort(),n[e].forEach(function(t,i){i<n[e].length-1&&t>0&&t===n[e][i+1]&&(y=!0)})})});this.$moveUpdate=function(n,a,l,u,c,b,E){var x=l[0].getBoundingClientRect();"element"===n.tolerance&&(a={x:~~(x.left+x.width/2),y:~~(x.top+x.height/2)}),i=!0,h=[],d||(c?(d=c.clone(),d.removeClass("ng-hide")):(d=u.clone(),d.addClass("sv-visibility-hidden"),d.addClass("sv-placeholder"),d.css({height:x.height+"px",width:x.width+"px"})),u.after(d),u.addClass("ng-hide"),m=u,p=n,g=l,_(s,{$helper:{element:g},$part:b.model(b.scope),$index:E,$item:b.model(b.scope)[E]}),s.$root&&s.$root.$$phase||s.$apply()),g[0].reposition({x:a.x+document.body.scrollLeft-a.offset.x*x.width,y:a.y+document.body.scrollTop-a.offset.y*x.height}),t(f).forEach(function(t,i){if(null==n.containment||o(t.element,n.containment)||o(t.element,n.containment+" *")){var r=t.element[0].getBoundingClientRect(),s={x:~~(r.left+r.width/2),y:~~(r.top+r.height/2)};t.container||!t.element[0].scrollHeight&&!t.element[0].scrollWidth||h.push({element:t.element,q:(s.x-a.x)*(s.x-a.x)+(s.y-a.y)*(s.y-a.y),view:t.getPart(),targetIndex:t.getIndex(),after:e(s,a,y)}),t.container&&!t.element[0].querySelector("[sv-element]:not(.sv-placeholder):not(.sv-source)")&&h.push({element:t.element,q:(s.x-a.x)*(s.x-a.x)+(s.y-a.y)*(s.y-a.y),view:t.getPart(),targetIndex:0,container:!0})}});var w=d[0].getBoundingClientRect(),T={x:~~(w.left+w.width/2),y:~~(w.top+w.height/2)};h.push({q:(T.x-a.x)*(T.x-a.x)+(T.y-a.y)*(T.y-a.y),element:d,placeholder:!0}),h.sort(function(e,t){return e.q-t.q}),h.forEach(function(e,t){0!==t||e.placeholder||e.container?0===t&&e.container?(v=e,e.element.append(d)):e.element.removeClass("sv-candidate"):(v=e,e.element.addClass("sv-candidate"),e.after?e.element.after(d):r(e.element,d))})},this.$drop=function(e,t,n){function r(){if(i=!1,d.remove(),g.remove(),m.removeClass("ng-hide"),h=void 0,d=void 0,n=void 0,g=void 0,m=void 0,E(s,{$part:e.model(e.scope),$index:t,$item:e.model(e.scope)[t]}),v){v.element.removeClass("sv-candidate");var r=e.model(e.scope).splice(t,1),o=v.targetIndex;v.view===e&&v.targetIndex>t&&o--,v.after&&o++,v.view.model(v.view.scope).splice(o,0,r[0]),v.view===e&&t===o||b(s,{$partTo:v.view.model(v.view.scope),$partFrom:e.model(e.scope),$item:r[0],$indexTo:o,$indexFrom:t})}v=void 0,s.$root&&s.$root.$$phase||s.$apply()}if(d)if(n.revert){var o=d[0].getBoundingClientRect(),a=g[0].getBoundingClientRect(),l=Math.sqrt(Math.pow(a.top-o.top,2)+Math.pow(a.left-o.left,2)),u=+n.revert*l/200;u=Math.min(u,+n.revert),["-webkit-","-moz-","-ms-","-o-",""].forEach(function(e){"undefined"!=typeof g[0].style[e+"transition"]&&(g[0].style[e+"transition"]="all "+u+"ms ease")}),setTimeout(r,u),g.css({top:o.top+document.body.scrollTop+"px",left:o.left+document.body.scrollLeft+"px"})}else r()},this.addToSortableElements=function(e){t(f).push(e)},this.removeFromSortableElements=function(e){var i=t(f),r=i.indexOf(e);r>-1&&(i.splice(r,1),0===i.length&&n(f))}}]}}]),a.directive("svPart",["$parse",function(e){return{restrict:"A",require:"^svRoot",controller:["$scope",function(e){e.$ctrl=this,this.getPart=function(){return e.part},this.$drop=function(t,n){e.$sortableRoot.$drop(e.part,t,n)}}],scope:!0,link:function(t,n,i,r){if(!i.svPart)throw new Error("no model provided");var o=e(i.svPart);if(!o.assign)throw new Error("model not assignable");t.part={id:t.$id,element:n,model:o,scope:t},t.$sortableRoot=r;var a={element:n,getPart:t.$ctrl.getPart,container:!0};r.addToSortableElements(a),t.$on("$destroy",function(){r.removeFromSortableElements(a)})}}}]),a.directive("svElement",["$parse",function(e){return{restrict:"A",require:["^svPart","^svRoot"],controller:["$scope",function(e){e.$ctrl=this}],link:function(i,r,o,a){function s(s){function l(e){n(e),d||(r.parent().prepend(m),d=!0),a[1].$moveUpdate(c,{x:e.clientX,y:e.clientY,offset:b},m,r,h,a[0].getPart(),i.$index)}if(n(s),!a[1].sortingInProgress()&&(0==s.button||"mousedown"!==s.type)){d=!1;var c=e(o.svElement)(i);if(c=t.extend({},{tolerance:"pointer",revert:200,containment:"html"},c),c.containment)var g=u.call(r,c.containment)[0].getBoundingClientRect();var m,v=r,y=r[0].getBoundingClientRect();f||(f=a[0].helper),h||(h=a[0].placeholder),f?(m=f.clone(),m.removeClass("ng-hide"),m.css({left:y.left+document.body.scrollLeft+"px",top:y.top+document.body.scrollTop+"px"}),v.addClass("sv-visibility-hidden")):(m=v.clone(),m.addClass("sv-helper").css({left:y.left+document.body.scrollLeft+"px",top:y.top+document.body.scrollTop+"px",width:y.width+"px"})),m[0].reposition=function(e){var t=e.x,n=e.y,i=m[0].getBoundingClientRect(),r=document.body;g&&(n<g.top+r.scrollTop&&(n=g.top+r.scrollTop),n+i.height>g.top+r.scrollTop+g.height&&(n=g.top+r.scrollTop+g.height-i.height),t<g.left+r.scrollLeft&&(t=g.left+r.scrollLeft),t+i.width>g.left+r.scrollLeft+g.width&&(t=g.left+r.scrollLeft+g.width-i.width)),this.style.left=t-r.scrollLeft+"px",this.style.top=n-r.scrollTop+"px"};var b={x:(s.clientX-y.left)/y.width,y:(s.clientY-y.top)/y.height};p.addClass("sv-sorting-in-progress"),p.on("mousemove touchmove",l).on("mouseup touchend touchcancel",function _(e){p.off("mousemove touchmove",l),p.off("mouseup touchend",_),p.removeClass("sv-sorting-in-progress"),d&&a[0].$drop(i.$index,c),r.removeClass("sv-visibility-hidden")})}}var l={element:r,getPart:a[0].getPart,getIndex:function(){return i.$index}};a[1].addToSortableElements(l),i.$on("$destroy",function(){a[1].removeFromSortableElements(l)});var c=r;c.on("mousedown touchstart",s),i.$watch("$ctrl.handle",function(e){e&&(c.off("mousedown touchstart",s),c=e,c.on("mousedown touchstart",s))});var f;i.$watch("$ctrl.helper",function(e){e&&(f=e)});var h;i.$watch("$ctrl.placeholder",function(e){e&&(h=e)});var d,p=(t.element(document.body),t.element(document.documentElement))}}}]),a.directive("svHandle",function(){return{require:"?^svElement",link:function(e,t,n,i){i&&(i.handle=t.add(i.handle))}}}),a.directive("svHelper",function(){return{require:["?^svPart","?^svElement"],link:function(e,t,n,i){t.addClass("sv-helper").addClass("ng-hide"),i[1]?i[1].helper=t:i[0]&&(i[0].helper=t)}}}),a.directive("svPlaceholder",function(){return{require:["?^svPart","?^svElement"],link:function(e,t,n,i){t.addClass("sv-placeholder").addClass("ng-hide"),i[1]?i[1].placeholder=t:i[0]&&(i[0].placeholder=t)}}}),t.element(document.head).append(["<style>.sv-helper{position: fixed !important;z-index: 99999;margin: 0 !important;}.sv-candidate{}.sv-placeholder{}.sv-sorting-in-progress{-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;}.sv-visibility-hidden{visibility: hidden !important;opacity: 0 !important;}</style>"].join(""));var s=document.documentElement,l=s.matches?"matches":s.matchesSelector?"matchesSelector":s.webkitMatches?"webkitMatches":s.webkitMatchesSelector?"webkitMatchesSelector":s.msMatches?"msMatches":s.msMatchesSelector?"msMatchesSelector":s.mozMatches?"mozMatches":s.mozMatchesSelector?"mozMatchesSelector":null;if(null==l)throw"This browser doesn't support the HTMLElement.matches method";var u=t.element.prototype.closest||function(e){for(var n=this[0].parentNode;n!==document.documentElement&&!n[l](e);)n=n.parentNode;return n[l](e)?t.element(n):t.element()};"function"!=typeof t.element.prototype.add&&(t.element.prototype.add=function(e){var n,i=t.element();for(e=t.element(e),n=0;n<this.length;n++)i.push(this[n]);for(n=0;n<e.length;n++)i.push(e[n]);return i})}(window,window.angular),/**
 * @license AngularJS v1.5.8
 * (c) 2010-2016 Google, Inc. http://angularjs.org
 * License: MIT
 */
function(e,t){"use strict";function n(e){return t.lowercase(e.nodeName||e[0]&&e[0].nodeName)}function i(e,n){var i=!1,r=!1;this.ngClickOverrideEnabled=function(o){return t.isDefined(o)?(o&&!r&&(r=!0,a.$$moduleName="ngTouch",n.directive("ngClick",a),e.decorator("ngClickDirective",["$delegate",function(e){if(i)e.shift();else for(var t=e.length-1;t>=0;){if("ngTouch"===e[t].$$moduleName){e.splice(t,1);break}t--}return e}])),i=o,this):i},this.$get=function(){return{ngClickOverrideEnabled:function(){return i}}}}function r(e,n,i){o.directive(e,["$parse","$swipe",function(r,o){var a=75,s=.3,l=30;return function(u,c,f){function h(e){if(!d)return!1;var t=Math.abs(e.y-d.y),i=(e.x-d.x)*n;return p&&t<a&&i>0&&i>l&&t/i<s}var d,p,g=r(f[e]),m=["touch"];t.isDefined(f.ngSwipeDisableMouse)||m.push("mouse"),o.bind(c,{start:function(e,t){d=e,p=!0},cancel:function(e){p=!1},end:function(e,t){h(e)&&u.$apply(function(){c.triggerHandler(i),g(u,{$event:t})})}},m)}}])}var o=t.module("ngTouch",[]);o.provider("$touch",i),i.$inject=["$provide","$compileProvider"],o.factory("$swipe",[function(){function e(e){var t=e.originalEvent||e,n=t.touches&&t.touches.length?t.touches:[t],i=t.changedTouches&&t.changedTouches[0]||n[0];return{x:i.clientX,y:i.clientY}}function n(e,n){var i=[];return t.forEach(e,function(e){var t=r[e][n];t&&i.push(t)}),i.join(" ")}var i=10,r={mouse:{start:"mousedown",move:"mousemove",end:"mouseup"},touch:{start:"touchstart",move:"touchmove",end:"touchend",cancel:"touchcancel"},pointer:{start:"pointerdown",move:"pointermove",end:"pointerup",cancel:"pointercancel"}};return{bind:function(t,r,o){var a,s,l,u,c=!1;o=o||["mouse","touch","pointer"],t.on(n(o,"start"),function(t){l=e(t),c=!0,a=0,s=0,u=l,r.start&&r.start(l,t)});var f=n(o,"cancel");f&&t.on(f,function(e){c=!1,r.cancel&&r.cancel(e)}),t.on(n(o,"move"),function(t){if(c&&l){var n=e(t);if(a+=Math.abs(n.x-u.x),s+=Math.abs(n.y-u.y),u=n,!(a<i&&s<i))return s>a?(c=!1,void(r.cancel&&r.cancel(t))):(t.preventDefault(),void(r.move&&r.move(n,t)))}}),t.on(n(o,"end"),function(t){c&&(c=!1,r.end&&r.end(e(t),t))})}}}]);var a=["$parse","$timeout","$rootElement",function(e,i,r){function o(e,t,n,i){return Math.abs(e-n)<m&&Math.abs(t-i)<m}function a(e,t,n){for(var i=0;i<e.length;i+=2)if(o(e[i],e[i+1],t,n))return e.splice(i,i+2),!0;return!1}function s(e){if(!(Date.now()-c>g)){var t=e.touches&&e.touches.length?e.touches:[e],i=t[0].clientX,r=t[0].clientY;i<1&&r<1||h&&h[0]===i&&h[1]===r||(h&&(h=null),"label"===n(e.target)&&(h=[i,r]),a(f,i,r)||(e.stopPropagation(),e.preventDefault(),e.target&&e.target.blur&&e.target.blur()))}}function l(e){var t=e.touches&&e.touches.length?e.touches:[e],n=t[0].clientX,r=t[0].clientY;f.push(n,r),i(function(){for(var e=0;e<f.length;e+=2)if(f[e]==n&&f[e+1]==r)return void f.splice(e,e+2)},g,!1)}function u(e,t){f||(r[0].addEventListener("click",s,!0),r[0].addEventListener("touchstart",l,!0),f=[]),c=Date.now(),a(f,e,t)}var c,f,h,d=750,p=12,g=2500,m=25,v="ng-click-active";return function(n,i,r){function o(){h=!1,i.removeClass(v)}var a,s,l,c,f=e(r.ngClick),h=!1;i.on("touchstart",function(e){h=!0,a=e.target?e.target:e.srcElement,3==a.nodeType&&(a=a.parentNode),i.addClass(v),s=Date.now();var t=e.originalEvent||e,n=t.touches&&t.touches.length?t.touches:[t],r=n[0];l=r.clientX,c=r.clientY}),i.on("touchcancel",function(e){o()}),i.on("touchend",function(e){var n=Date.now()-s,f=e.originalEvent||e,g=f.changedTouches&&f.changedTouches.length?f.changedTouches:f.touches&&f.touches.length?f.touches:[f],m=g[0],v=m.clientX,y=m.clientY,b=Math.sqrt(Math.pow(v-l,2)+Math.pow(y-c,2));h&&n<d&&b<p&&(u(v,y),a&&a.blur(),t.isDefined(r.disabled)&&r.disabled!==!1||i.triggerHandler("click",[e])),o()}),i.onclick=function(e){},i.on("click",function(e,t){n.$apply(function(){f(n,{$event:t||e})})}),i.on("mousedown",function(e){i.addClass(v)}),i.on("mousemove mouseup",function(e){i.removeClass(v)})}}];r("ngSwipeLeft",-1,"swipeleft"),r("ngSwipeRight",1,"swiperight")}(window,window.angular),angular.module("angular-websql",[]).factory("$webSql",["$q",function(e){return{openDatabase:function(t,n,i,r){try{var o=openDatabase(t,n,i,r);if("undefined"==typeof openDatabase)throw"Browser does not support web sql";return{executeQuery:function(t,n){var i=e.defer();return o.transaction(function(e){e.executeSql(t,n,function(e,t){i.resolve(t)},function(e,t){console.log("There has been an error: "+t.message),i.reject()})}),i.promise},insert:function(e,t,n){var i="boolean"==typeof n&&n?"INSERT OR REPLACE":"INSERT";i+=" INTO `{tableName}` ({fields}) VALUES({values});";var r="",o="",a=[];for(var s in t)r+=Object.keys(t)[Object.keys(t).length-1]==s?"`"+s+"`":"`"+s+"`, ",o+=Object.keys(t)[Object.keys(t).length-1]==s?"?":"?, ",a.push(t[s]);return this.executeQuery(this.replace(i,{"{tableName}":e,"{fields}":r,"{values}":o}),a)},update:function(e,t,n){var i="UPDATE `{tableName}` SET {update} WHERE {where}; ",r="",o=[];for(var a in t)r+=Object.keys(t)[Object.keys(t).length-1]==a?"`"+a+"`= ?":"`"+a+"`= ?,",o.push(t[a]);var s=this.whereClause(n);return this.executeQuery(this.replace(i,{"{tableName}":e,"{update}":r,"{where}":s.w}),o.concat(s.p))},del:function(e,t){var n="DELETE FROM `{tableName}` WHERE {where}; ",i=this.whereClause(t);return this.executeQuery(this.replace(n,{"{tableName}":e,"{where}":i.w}),i.p)},select:function(e,t){var n="SELECT * FROM `{tableName}` WHERE {where}; ",i=this.whereClause(t);return this.executeQuery(this.replace(n,{"{tableName}":e,"{where}":i.w}),i.p)},selectAll:function(e){return this.executeQuery("SELECT * FROM `"+e+"`; ",[])},whereClause:function(e){var t="",n=[];for(var i in e)"undefined"==typeof e[i]||"object"==typeof e[i]||"string"!=typeof e[i]||e[i].match(/NULL/gi)?"undefined"!=typeof e[i]&&"object"!=typeof e[i]&&"number"==typeof e[i]?n.push(e[i]):"undefined"==typeof e[i].value||"object"!=typeof e[i]||"number"!=typeof e[i].value&&e[i].value.match(/NULL/gi)||n.push(e[i].value):n.push(e[i]),t+="object"==typeof e[i]?"undefined"==typeof e[i].union?"string"==typeof e[i].value&&e[i].value.match(/NULL/gi)?"`"+i+"` "+e[i].value:"undefined"!=typeof e[i].operator?"`"+i+"` "+e[i].operator+" ? ":"`"+i+"` = ?":"string"==typeof e[i].value&&e[i].value.match(/NULL/gi)?"`"+i+"` "+e[i].value+" "+e[i].union+" ":"undefined"!=typeof e[i].operator?"`"+i+"` "+e[i].operator+" ? "+e[i].union+" ":"`"+i+"` = ? "+e[i].union+" ":"string"==typeof e[i]&&e[i].match(/NULL/gi)?"`"+i+"` "+e[i]:"`"+i+"` = ?";return{w:t,p:n}},replace:function(e,t){for(var n in t)e=e.replace(new RegExp(n,"ig"),t[n]);return e},createTable:function(e,t){var n="CREATE TABLE IF NOT EXISTS `{tableName}` ({fields}); ",i=[],r="";for(var o in t){var a="{type} {null}";r+="`"+o+"` ","undefined"==typeof t[o]["null"]&&(t[o]["null"]="NULL");for(var s in t[o])a=a.replace(new RegExp("{"+s+"}","ig"),t[o][s]);r+=a,"undefined"!=typeof t[o]["default"]&&(r+=" DEFAULT "+t[o]["default"]),"undefined"!=typeof t[o].primary&&(r+=" PRIMARY KEY"),"undefined"!=typeof t[o].auto_increment&&(r+=" AUTOINCREMENT"),Object.keys(t)[Object.keys(t).length-1]!=o&&(r+=","),"undefined"!=typeof t[o].primary&&t[o].primary&&i.push(o)}var l={tableName:e,fields:r};for(var u in l)n=n.replace(new RegExp("{"+u+"}","ig"),l[u]);return this.executeQuery(n,[])},dropTable:function(e){return this.executeQuery("DROP TABLE IF EXISTS `"+e+"`; ",[])}}}catch(a){console.error(a)}}}}]),/*!
 * ZeroClipboard
 * The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie and a JavaScript interface.
 * Copyright (c) 2009-2014 Jon Rohan, James M. Greene
 * Licensed MIT
 * http://zeroclipboard.org/
 * v2.2.0
 */
function(e,t){"use strict";var n,i,r,o=e,a=o.document,s=o.navigator,l=o.setTimeout,u=o.clearTimeout,c=o.setInterval,f=o.clearInterval,h=o.getComputedStyle,d=o.encodeURIComponent,p=o.ActiveXObject,g=o.Error,m=o.Number.parseInt||o.parseInt,v=o.Number.parseFloat||o.parseFloat,y=o.Number.isNaN||o.isNaN,b=o.Date.now,_=o.Object.keys,E=o.Object.defineProperty,x=o.Object.prototype.hasOwnProperty,w=o.Array.prototype.slice,T=function(){var e=function(e){return e};if("function"==typeof o.wrap&&"function"==typeof o.unwrap)try{var t=a.createElement("div"),n=o.unwrap(t);1===t.nodeType&&n&&1===n.nodeType&&(e=o.unwrap)}catch(i){}return e}(),S=function(e){return w.call(e,0)},A=function(){var e,n,i,r,o,a,s=S(arguments),l=s[0]||{};for(e=1,n=s.length;e<n;e++)if(null!=(i=s[e]))for(r in i)x.call(i,r)&&(o=l[r],a=i[r],l!==a&&a!==t&&(l[r]=a));return l},C=function(e){var t,n,i,r;if("object"!=typeof e||null==e||"number"==typeof e.nodeType)t=e;else if("number"==typeof e.length)for(t=[],n=0,i=e.length;n<i;n++)x.call(e,n)&&(t[n]=C(e[n]));else{t={};for(r in e)x.call(e,r)&&(t[r]=C(e[r]))}return t},k=function(e,t){for(var n={},i=0,r=t.length;i<r;i++)t[i]in e&&(n[t[i]]=e[t[i]]);return n},O=function(e,t){var n={};for(var i in e)t.indexOf(i)===-1&&(n[i]=e[i]);return n},I=function(e){if(e)for(var t in e)x.call(e,t)&&delete e[t];return e},N=function(e,t){if(e&&1===e.nodeType&&e.ownerDocument&&t&&(1===t.nodeType&&t.ownerDocument&&t.ownerDocument===e.ownerDocument||9===t.nodeType&&!t.ownerDocument&&t===e.ownerDocument))do{if(e===t)return!0;e=e.parentNode}while(e);return!1},M=function(e){var t;return"string"==typeof e&&e&&(t=e.split("#")[0].split("?")[0],t=e.slice(0,e.lastIndexOf("/")+1)),t},D=function(e){var t,n;return"string"==typeof e&&e&&(n=e.match(/^(?:|[^:@]*@|.+\)@(?=http[s]?|file)|.+?\s+(?: at |@)(?:[^:\(]+ )*[\(]?)((?:http[s]?|file):\/\/[\/]?.+?\/[^:\)]*?)(?::\d+)(?::\d+)?/),n&&n[1]?t=n[1]:(n=e.match(/\)@((?:http[s]?|file):\/\/[\/]?.+?\/[^:\)]*?)(?::\d+)(?::\d+)?/),n&&n[1]&&(t=n[1]))),t},L=function(){var e,t;try{throw new g}catch(n){t=n}return t&&(e=t.sourceURL||t.fileName||D(t.stack)),e},$=function(){var e,n,i;if(a.currentScript&&(e=a.currentScript.src))return e;if(n=a.getElementsByTagName("script"),1===n.length)return n[0].src||t;if("readyState"in n[0])for(i=n.length;i--;)if("interactive"===n[i].readyState&&(e=n[i].src))return e;return"loading"===a.readyState&&(e=n[n.length-1].src)?e:(e=L())?e:t},R=function(){var e,n,i,r=a.getElementsByTagName("script");for(e=r.length;e--;){if(!(i=r[e].src)){n=null;break}if(i=M(i),null==n)n=i;else if(n!==i){n=null;break}}return n||t},P=function(){var e=M($())||R()||"";return e+"ZeroClipboard.swf"},F=function(){return null==e.opener&&(!!e.top&&e!=e.top||!!e.parent&&e!=e.parent)}(),U={bridge:null,version:"0.0.0",pluginType:"unknown",disabled:null,outdated:null,sandboxed:null,unavailable:null,degraded:null,deactivated:null,overdue:null,ready:null},j="11.0.0",H={},z={},B=null,q=0,W=0,Y={ready:"Flash communication is established",error:{"flash-disabled":"Flash is disabled or not installed. May also be attempting to run Flash in a sandboxed iframe, which is impossible.","flash-outdated":"Flash is too outdated to support ZeroClipboard","flash-sandboxed":"Attempting to run Flash in a sandboxed iframe, which is impossible","flash-unavailable":"Flash is unable to communicate bidirectionally with JavaScript","flash-degraded":"Flash is unable to preserve data fidelity when communicating with JavaScript","flash-deactivated":"Flash is too outdated for your browser and/or is configured as click-to-activate.\nThis may also mean that the ZeroClipboard SWF object could not be loaded, so please check your `swfPath` configuration and/or network connectivity.\nMay also be attempting to run Flash in a sandboxed iframe, which is impossible.","flash-overdue":"Flash communication was established but NOT within the acceptable time limit","version-mismatch":"ZeroClipboard JS version number does not match ZeroClipboard SWF version number","clipboard-error":"At least one error was thrown while ZeroClipboard was attempting to inject your data into the clipboard","config-mismatch":"ZeroClipboard configuration does not match Flash's reality","swf-not-found":"The ZeroClipboard SWF object could not be loaded, so please check your `swfPath` configuration and/or network connectivity"}},G=["flash-unavailable","flash-degraded","flash-overdue","version-mismatch","config-mismatch","clipboard-error"],X=["flash-disabled","flash-outdated","flash-sandboxed","flash-unavailable","flash-degraded","flash-deactivated","flash-overdue"],V=new RegExp("^flash-("+X.map(function(e){return e.replace(/^flash-/,"")}).join("|")+")$"),K=new RegExp("^flash-("+X.slice(1).map(function(e){return e.replace(/^flash-/,"")}).join("|")+")$"),Z={swfPath:P(),trustedDomains:e.location.host?[e.location.host]:[],cacheBust:!0,forceEnhancedClipboard:!1,flashLoadTimeout:3e4,autoActivate:!0,bubbleEvents:!0,containerId:"global-zeroclipboard-html-bridge",containerClass:"global-zeroclipboard-container",swfObjectId:"global-zeroclipboard-flash-bridge",hoverClass:"zeroclipboard-is-hover",activeClass:"zeroclipboard-is-active",forceHandCursor:!1,title:null,zIndex:999999999},Q=function(e){if("object"==typeof e&&null!==e)for(var t in e)if(x.call(e,t))if(/^(?:forceHandCursor|title|zIndex|bubbleEvents)$/.test(t))Z[t]=e[t];else if(null==U.bridge)if("containerId"===t||"swfObjectId"===t){if(!de(e[t]))throw new Error("The specified `"+t+"` value is not valid as an HTML4 Element ID");Z[t]=e[t]}else Z[t]=e[t];{if("string"!=typeof e||!e)return C(Z);if(x.call(Z,e))return Z[e]}},J=function(){return We(),{browser:k(s,["userAgent","platform","appName"]),flash:O(U,["bridge"]),zeroclipboard:{version:Ge.version,config:Ge.config()}}},ee=function(){return!!(U.disabled||U.outdated||U.sandboxed||U.unavailable||U.degraded||U.deactivated)},te=function(e,i){var r,o,a,s={};if("string"==typeof e&&e)a=e.toLowerCase().split(/\s+/);else if("object"==typeof e&&e&&"undefined"==typeof i)for(r in e)x.call(e,r)&&"string"==typeof r&&r&&"function"==typeof e[r]&&Ge.on(r,e[r]);if(a&&a.length){for(r=0,o=a.length;r<o;r++)e=a[r].replace(/^on/,""),s[e]=!0,H[e]||(H[e]=[]),H[e].push(i);if(s.ready&&U.ready&&Ge.emit({type:"ready"}),s.error){for(r=0,o=X.length;r<o;r++)if(U[X[r].replace(/^flash-/,"")]===!0){Ge.emit({type:"error",name:X[r]});break}n!==t&&Ge.version!==n&&Ge.emit({type:"error",name:"version-mismatch",jsVersion:Ge.version,swfVersion:n})}}return Ge},ne=function(e,t){var n,i,r,o,a;if(0===arguments.length)o=_(H);else if("string"==typeof e&&e)o=e.split(/\s+/);else if("object"==typeof e&&e&&"undefined"==typeof t)for(n in e)x.call(e,n)&&"string"==typeof n&&n&&"function"==typeof e[n]&&Ge.off(n,e[n]);if(o&&o.length)for(n=0,i=o.length;n<i;n++)if(e=o[n].toLowerCase().replace(/^on/,""),a=H[e],a&&a.length)if(t)for(r=a.indexOf(t);r!==-1;)a.splice(r,1),r=a.indexOf(t,r);else a.length=0;return Ge},ie=function(e){var t;return t="string"==typeof e&&e?C(H[e])||null:C(H)},re=function(e){var t,n,i;if(e=pe(e),e&&!Ee(e))return"ready"===e.type&&U.overdue===!0?Ge.emit({type:"error",name:"flash-overdue"}):(t=A({},e),be.call(this,t),"copy"===e.type&&(i=Oe(z),n=i.data,B=i.formatMap),n)},oe=function(){var e=U.sandboxed;if(We(),"boolean"!=typeof U.ready&&(U.ready=!1),U.sandboxed!==e&&U.sandboxed===!0)U.ready=!1,Ge.emit({type:"error",name:"flash-sandboxed"});else if(!Ge.isFlashUnusable()&&null===U.bridge){var t=Z.flashLoadTimeout;"number"==typeof t&&t>=0&&(q=l(function(){"boolean"!=typeof U.deactivated&&(U.deactivated=!0),U.deactivated===!0&&Ge.emit({type:"error",name:"flash-deactivated"})},t)),U.overdue=!1,Ce()}},ae=function(){Ge.clearData(),Ge.blur(),Ge.emit("destroy"),ke(),Ge.off()},se=function(e,t){var n;if("object"==typeof e&&e&&"undefined"==typeof t)n=e,Ge.clearData();else{if("string"!=typeof e||!e)return;n={},n[e]=t}for(var i in n)"string"==typeof i&&i&&x.call(n,i)&&"string"==typeof n[i]&&n[i]&&(z[i]=n[i])},le=function(e){"undefined"==typeof e?(I(z),B=null):"string"==typeof e&&x.call(z,e)&&delete z[e]},ue=function(e){return"undefined"==typeof e?C(z):"string"==typeof e&&x.call(z,e)?z[e]:void 0},ce=function(e){if(e&&1===e.nodeType){i&&(Pe(i,Z.activeClass),i!==e&&Pe(i,Z.hoverClass)),i=e,Re(e,Z.hoverClass);var t=e.getAttribute("title")||Z.title;if("string"==typeof t&&t){var n=Ae(U.bridge);n&&n.setAttribute("title",t)}var r=Z.forceHandCursor===!0||"pointer"===Fe(e,"cursor");Be(r),ze()}},fe=function(){var e=Ae(U.bridge);e&&(e.removeAttribute("title"),e.style.left="0px",e.style.top="-9999px",e.style.width="1px",e.style.height="1px"),i&&(Pe(i,Z.hoverClass),Pe(i,Z.activeClass),i=null)},he=function(){return i||null},de=function(e){return"string"==typeof e&&e&&/^[A-Za-z][A-Za-z0-9_:\-\.]*$/.test(e)},pe=function(e){var t;if("string"==typeof e&&e?(t=e,e={}):"object"==typeof e&&e&&"string"==typeof e.type&&e.type&&(t=e.type),t){t=t.toLowerCase(),!e.target&&(/^(copy|aftercopy|_click)$/.test(t)||"error"===t&&"clipboard-error"===e.name)&&(e.target=r),A(e,{type:t,target:e.target||i||null,relatedTarget:e.relatedTarget||null,currentTarget:U&&U.bridge||null,timeStamp:e.timeStamp||b()||null});var n=Y[e.type];return"error"===e.type&&e.name&&n&&(n=n[e.name]),n&&(e.message=n),"ready"===e.type&&A(e,{target:null,version:U.version}),"error"===e.type&&(V.test(e.name)&&A(e,{target:null,minimumVersion:j}),K.test(e.name)&&A(e,{version:U.version})),"copy"===e.type&&(e.clipboardData={setData:Ge.setData,clearData:Ge.clearData}),"aftercopy"===e.type&&(e=Ie(e,B)),e.target&&!e.relatedTarget&&(e.relatedTarget=ge(e.target)),me(e)}},ge=function(e){var t=e&&e.getAttribute&&e.getAttribute("data-clipboard-target");return t?a.getElementById(t):null},me=function(e){if(e&&/^_(?:click|mouse(?:over|out|down|up|move))$/.test(e.type)){var n=e.target,i="_mouseover"===e.type&&e.relatedTarget?e.relatedTarget:t,r="_mouseout"===e.type&&e.relatedTarget?e.relatedTarget:t,s=Ue(n),l=o.screenLeft||o.screenX||0,u=o.screenTop||o.screenY||0,c=a.body.scrollLeft+a.documentElement.scrollLeft,f=a.body.scrollTop+a.documentElement.scrollTop,h=s.left+("number"==typeof e._stageX?e._stageX:0),d=s.top+("number"==typeof e._stageY?e._stageY:0),p=h-c,g=d-f,m=l+p,v=u+g,y="number"==typeof e.movementX?e.movementX:0,b="number"==typeof e.movementY?e.movementY:0;delete e._stageX,delete e._stageY,A(e,{srcElement:n,fromElement:i,toElement:r,screenX:m,screenY:v,pageX:h,pageY:d,clientX:p,clientY:g,x:p,y:g,movementX:y,movementY:b,offsetX:0,offsetY:0,layerX:0,layerY:0})}return e},ve=function(e){var t=e&&"string"==typeof e.type&&e.type||"";return!/^(?:(?:before)?copy|destroy)$/.test(t)},ye=function(e,t,n,i){i?l(function(){e.apply(t,n)},0):e.apply(t,n)},be=function(e){if("object"==typeof e&&e&&e.type){var t=ve(e),n=H["*"]||[],i=H[e.type]||[],r=n.concat(i);if(r&&r.length){var a,s,l,u,c,f=this;for(a=0,s=r.length;a<s;a++)l=r[a],u=f,"string"==typeof l&&"function"==typeof o[l]&&(l=o[l]),"object"==typeof l&&l&&"function"==typeof l.handleEvent&&(u=l,l=l.handleEvent),"function"==typeof l&&(c=A({},e),ye(l,u,[c],t))}return this}},_e=function(e){var t=null;return(F===!1||e&&"error"===e.type&&e.name&&G.indexOf(e.name)!==-1)&&(t=!1),t},Ee=function(e){var t=e.target||i||null,o="swf"===e._source;switch(delete e._source,e.type){case"error":var a="flash-sandboxed"===e.name||_e(e);"boolean"==typeof a&&(U.sandboxed=a),X.indexOf(e.name)!==-1?A(U,{disabled:"flash-disabled"===e.name,outdated:"flash-outdated"===e.name,unavailable:"flash-unavailable"===e.name,degraded:"flash-degraded"===e.name,deactivated:"flash-deactivated"===e.name,overdue:"flash-overdue"===e.name,ready:!1}):"version-mismatch"===e.name&&(n=e.swfVersion,A(U,{disabled:!1,outdated:!1,unavailable:!1,degraded:!1,deactivated:!1,overdue:!1,ready:!1})),He();break;case"ready":n=e.swfVersion;var s=U.deactivated===!0;A(U,{disabled:!1,outdated:!1,sandboxed:!1,unavailable:!1,degraded:!1,deactivated:!1,overdue:s,ready:!s}),He();break;case"beforecopy":r=t;break;case"copy":var l,u,c=e.relatedTarget;!z["text/html"]&&!z["text/plain"]&&c&&(u=c.value||c.outerHTML||c.innerHTML)&&(l=c.value||c.textContent||c.innerText)?(e.clipboardData.clearData(),e.clipboardData.setData("text/plain",l),u!==l&&e.clipboardData.setData("text/html",u)):!z["text/plain"]&&e.target&&(l=e.target.getAttribute("data-clipboard-text"))&&(e.clipboardData.clearData(),e.clipboardData.setData("text/plain",l));break;case"aftercopy":xe(e),Ge.clearData(),t&&t!==$e()&&t.focus&&t.focus();break;case"_mouseover":Ge.focus(t),Z.bubbleEvents===!0&&o&&(t&&t!==e.relatedTarget&&!N(e.relatedTarget,t)&&we(A({},e,{type:"mouseenter",bubbles:!1,cancelable:!1})),we(A({},e,{type:"mouseover"})));break;case"_mouseout":Ge.blur(),Z.bubbleEvents===!0&&o&&(t&&t!==e.relatedTarget&&!N(e.relatedTarget,t)&&we(A({},e,{type:"mouseleave",bubbles:!1,cancelable:!1})),we(A({},e,{type:"mouseout"})));break;case"_mousedown":Re(t,Z.activeClass),Z.bubbleEvents===!0&&o&&we(A({},e,{type:e.type.slice(1)}));break;case"_mouseup":Pe(t,Z.activeClass),Z.bubbleEvents===!0&&o&&we(A({},e,{type:e.type.slice(1)}));break;case"_click":r=null,Z.bubbleEvents===!0&&o&&we(A({},e,{type:e.type.slice(1)}));break;case"_mousemove":Z.bubbleEvents===!0&&o&&we(A({},e,{type:e.type.slice(1)}))}if(/^_(?:click|mouse(?:over|out|down|up|move))$/.test(e.type))return!0},xe=function(e){if(e.errors&&e.errors.length>0){var t=C(e);A(t,{type:"error",name:"clipboard-error"}),delete t.success,l(function(){Ge.emit(t)},0)}},we=function(e){if(e&&"string"==typeof e.type&&e){var t,n=e.target||null,i=n&&n.ownerDocument||a,r={view:i.defaultView||o,canBubble:!0,cancelable:!0,detail:"click"===e.type?1:0,button:"number"==typeof e.which?e.which-1:"number"==typeof e.button?e.button:i.createEvent?0:1},s=A(r,e);n&&i.createEvent&&n.dispatchEvent&&(s=[s.type,s.canBubble,s.cancelable,s.view,s.detail,s.screenX,s.screenY,s.clientX,s.clientY,s.ctrlKey,s.altKey,s.shiftKey,s.metaKey,s.button,s.relatedTarget],t=i.createEvent("MouseEvents"),t.initMouseEvent&&(t.initMouseEvent.apply(t,s),t._source="js",n.dispatchEvent(t)))}},Te=function(){var e=Z.flashLoadTimeout;if("number"==typeof e&&e>=0){var t=Math.min(1e3,e/10),n=Z.swfObjectId+"_fallbackContent";W=c(function(){var e=a.getElementById(n);je(e)&&(He(),U.deactivated=null,Ge.emit({type:"error",name:"swf-not-found"}))},t)}},Se=function(){var e=a.createElement("div");return e.id=Z.containerId,e.className=Z.containerClass,e.style.position="absolute",e.style.left="0px",e.style.top="-9999px",e.style.width="1px",e.style.height="1px",e.style.zIndex=""+qe(Z.zIndex),e},Ae=function(e){for(var t=e&&e.parentNode;t&&"OBJECT"===t.nodeName&&t.parentNode;)t=t.parentNode;return t||null},Ce=function(){var e,t=U.bridge,n=Ae(t);if(!t){var i=Le(o.location.host,Z),r="never"===i?"none":"all",s=Me(A({jsVersion:Ge.version},Z)),l=Z.swfPath+Ne(Z.swfPath,Z);n=Se();var u=a.createElement("div");n.appendChild(u),a.body.appendChild(n);var c=a.createElement("div"),f="activex"===U.pluginType;c.innerHTML='<object id="'+Z.swfObjectId+'" name="'+Z.swfObjectId+'" width="100%" height="100%" '+(f?'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"':'type="application/x-shockwave-flash" data="'+l+'"')+">"+(f?'<param name="movie" value="'+l+'"/>':"")+'<param name="allowScriptAccess" value="'+i+'"/><param name="allowNetworking" value="'+r+'"/><param name="menu" value="false"/><param name="wmode" value="transparent"/><param name="flashvars" value="'+s+'"/><div id="'+Z.swfObjectId+'_fallbackContent">&nbsp;</div></object>',t=c.firstChild,c=null,T(t).ZeroClipboard=Ge,n.replaceChild(t,u),Te()}return t||(t=a[Z.swfObjectId],t&&(e=t.length)&&(t=t[e-1]),!t&&n&&(t=n.firstChild)),U.bridge=t||null,t},ke=function(){var e=U.bridge;if(e){var i=Ae(e);i&&("activex"===U.pluginType&&"readyState"in e?(e.style.display="none",function r(){if(4===e.readyState){for(var t in e)"function"==typeof e[t]&&(e[t]=null);e.parentNode&&e.parentNode.removeChild(e),i.parentNode&&i.parentNode.removeChild(i)}else l(r,10)}()):(e.parentNode&&e.parentNode.removeChild(e),i.parentNode&&i.parentNode.removeChild(i))),He(),U.ready=null,U.bridge=null,U.deactivated=null,n=t}},Oe=function(e){var t={},n={};if("object"==typeof e&&e){for(var i in e)if(i&&x.call(e,i)&&"string"==typeof e[i]&&e[i])switch(i.toLowerCase()){case"text/plain":case"text":case"air:text":case"flash:text":t.text=e[i],n.text=i;break;case"text/html":case"html":case"air:html":case"flash:html":t.html=e[i],n.html=i;break;case"application/rtf":case"text/rtf":case"rtf":case"richtext":case"air:rtf":case"flash:rtf":t.rtf=e[i],n.rtf=i}return{data:t,formatMap:n}}},Ie=function(e,t){if("object"!=typeof e||!e||"object"!=typeof t||!t)return e;var n={};for(var i in e)if(x.call(e,i))if("errors"===i){n[i]=e[i]?e[i].slice():[];for(var r=0,o=n[i].length;r<o;r++)n[i][r].format=t[n[i][r].format]}else if("success"!==i&&"data"!==i)n[i]=e[i];else{n[i]={};var a=e[i];for(var s in a)s&&x.call(a,s)&&x.call(t,s)&&(n[i][t[s]]=a[s])}return n},Ne=function(e,t){var n=null==t||t&&t.cacheBust===!0;return n?(e.indexOf("?")===-1?"?":"&")+"noCache="+b():""},Me=function(e){var t,n,i,r,a="",s=[];if(e.trustedDomains&&("string"==typeof e.trustedDomains?r=[e.trustedDomains]:"object"==typeof e.trustedDomains&&"length"in e.trustedDomains&&(r=e.trustedDomains)),r&&r.length)for(t=0,n=r.length;t<n;t++)if(x.call(r,t)&&r[t]&&"string"==typeof r[t]){if(i=De(r[t]),!i)continue;if("*"===i){s.length=0,s.push(i);break}s.push.apply(s,[i,"//"+i,o.location.protocol+"//"+i])}return s.length&&(a+="trustedOrigins="+d(s.join(","))),e.forceEnhancedClipboard===!0&&(a+=(a?"&":"")+"forceEnhancedClipboard=true"),"string"==typeof e.swfObjectId&&e.swfObjectId&&(a+=(a?"&":"")+"swfObjectId="+d(e.swfObjectId)),"string"==typeof e.jsVersion&&e.jsVersion&&(a+=(a?"&":"")+"jsVersion="+d(e.jsVersion)),a},De=function(e){if(null==e||""===e)return null;if(e=e.replace(/^\s+|\s+$/g,""),""===e)return null;var t=e.indexOf("//");e=t===-1?e:e.slice(t+2);var n=e.indexOf("/");return e=n===-1?e:t===-1||0===n?null:e.slice(0,n),e&&".swf"===e.slice(-4).toLowerCase()?null:e||null},Le=function(){var e=function(e){var t,n,i,r=[];if("string"==typeof e&&(e=[e]),"object"!=typeof e||!e||"number"!=typeof e.length)return r;for(t=0,n=e.length;t<n;t++)if(x.call(e,t)&&(i=De(e[t]))){if("*"===i){r.length=0,r.push("*");break}r.indexOf(i)===-1&&r.push(i)}return r};return function(t,n){var i=De(n.swfPath);null===i&&(i=t);var r=e(n.trustedDomains),o=r.length;if(o>0){if(1===o&&"*"===r[0])return"always";if(r.indexOf(t)!==-1)return 1===o&&t===i?"sameDomain":"always"}return"never"}}(),$e=function(){try{return a.activeElement}catch(e){return null}},Re=function(e,t){var n,i,r,o=[];if("string"==typeof t&&t&&(o=t.split(/\s+/)),e&&1===e.nodeType&&o.length>0)if(e.classList)for(n=0,i=o.length;n<i;n++)e.classList.add(o[n]);else if(e.hasOwnProperty("className")){for(r=" "+e.className+" ",n=0,i=o.length;n<i;n++)r.indexOf(" "+o[n]+" ")===-1&&(r+=o[n]+" ");e.className=r.replace(/^\s+|\s+$/g,"")}return e},Pe=function(e,t){var n,i,r,o=[];if("string"==typeof t&&t&&(o=t.split(/\s+/)),e&&1===e.nodeType&&o.length>0)if(e.classList&&e.classList.length>0)for(n=0,i=o.length;n<i;n++)e.classList.remove(o[n]);else if(e.className){for(r=(" "+e.className+" ").replace(/[\r\n\t]/g," "),n=0,i=o.length;n<i;n++)r=r.replace(" "+o[n]+" "," ");e.className=r.replace(/^\s+|\s+$/g,"")}return e},Fe=function(e,t){var n=h(e,null).getPropertyValue(t);return"cursor"!==t||n&&"auto"!==n||"A"!==e.nodeName?n:"pointer"},Ue=function(e){var t={left:0,top:0,width:0,height:0};if(e.getBoundingClientRect){var n=e.getBoundingClientRect(),i=o.pageXOffset,r=o.pageYOffset,s=a.documentElement.clientLeft||0,l=a.documentElement.clientTop||0,u=0,c=0;if("relative"===Fe(a.body,"position")){var f=a.body.getBoundingClientRect(),h=a.documentElement.getBoundingClientRect();u=f.left-h.left||0,c=f.top-h.top||0}t.left=n.left+i-s-u,t.top=n.top+r-l-c,t.width="width"in n?n.width:n.right-n.left,t.height="height"in n?n.height:n.bottom-n.top}return t},je=function(e){if(!e)return!1;var t=h(e,null),n=v(t.height)>0,i=v(t.width)>0,r=v(t.top)>=0,o=v(t.left)>=0,a=n&&i&&r&&o,s=a?null:Ue(e),l="none"!==t.display&&"collapse"!==t.visibility&&(a||!!s&&(n||s.height>0)&&(i||s.width>0)&&(r||s.top>=0)&&(o||s.left>=0));return l},He=function(){u(q),q=0,f(W),W=0},ze=function(){var e;if(i&&(e=Ae(U.bridge))){var t=Ue(i);A(e.style,{width:t.width+"px",height:t.height+"px",top:t.top+"px",left:t.left+"px",zIndex:""+qe(Z.zIndex)})}},Be=function(e){U.ready===!0&&(U.bridge&&"function"==typeof U.bridge.setHandCursor?U.bridge.setHandCursor(e):U.ready=!1)},qe=function(e){if(/^(?:auto|inherit)$/.test(e))return e;var t;return"number"!=typeof e||y(e)?"string"==typeof e&&(t=qe(m(e,10))):t=e,"number"==typeof t?t:"auto"},We=function(t){var n,i,r,o=U.sandboxed,a=null;if(t=t===!0,F===!1)a=!1;else{try{i=e.frameElement||null}catch(s){r={name:s.name,message:s.message}}if(i&&1===i.nodeType&&"IFRAME"===i.nodeName)try{a=i.hasAttribute("sandbox")}catch(s){a=null}else{try{n=document.domain||null}catch(s){n=null}(null===n||r&&"SecurityError"===r.name&&/(^|[\s\(\[@])sandbox(es|ed|ing|[\s\.,!\)\]@]|$)/.test(r.message.toLowerCase()))&&(a=!0)}}return U.sandboxed=a,o===a||t||Ye(p),a},Ye=function(e){function t(e){var t=e.match(/[\d]+/g);return t.length=3,t.join(".")}function n(e){return!!e&&(e=e.toLowerCase())&&(/^(pepflashplayer\.dll|libpepflashplayer\.so|pepperflashplayer\.plugin)$/.test(e)||"chrome.plugin"===e.slice(-13))}function i(e){e&&(l=!0,e.version&&(f=t(e.version)),!f&&e.description&&(f=t(e.description)),e.filename&&(c=n(e.filename)))}var r,o,a,l=!1,u=!1,c=!1,f="";if(s.plugins&&s.plugins.length)r=s.plugins["Shockwave Flash"],i(r),s.plugins["Shockwave Flash 2.0"]&&(l=!0,f="2.0.0.11");else if(s.mimeTypes&&s.mimeTypes.length)a=s.mimeTypes["application/x-shockwave-flash"],r=a&&a.enabledPlugin,i(r);else if("undefined"!=typeof e){u=!0;try{o=new e("ShockwaveFlash.ShockwaveFlash.7"),l=!0,f=t(o.GetVariable("$version"))}catch(h){try{o=new e("ShockwaveFlash.ShockwaveFlash.6"),l=!0,f="6.0.21"}catch(d){try{o=new e("ShockwaveFlash.ShockwaveFlash"),l=!0,f=t(o.GetVariable("$version"))}catch(p){u=!1}}}}U.disabled=l!==!0,U.outdated=f&&v(f)<v(j),U.version=f||"0.0.0",U.pluginType=c?"pepper":u?"activex":l?"netscape":"unknown"};Ye(p),We(!0);var Ge=function(){return this instanceof Ge?void("function"==typeof Ge._createClient&&Ge._createClient.apply(this,S(arguments))):new Ge};E(Ge,"version",{value:"2.2.0",writable:!1,configurable:!0,enumerable:!0}),Ge.config=function(){return Q.apply(this,S(arguments))},Ge.state=function(){return J.apply(this,S(arguments))},Ge.isFlashUnusable=function(){return ee.apply(this,S(arguments))},Ge.on=function(){return te.apply(this,S(arguments))},Ge.off=function(){return ne.apply(this,S(arguments))},Ge.handlers=function(){return ie.apply(this,S(arguments))},Ge.emit=function(){return re.apply(this,S(arguments))},Ge.create=function(){return oe.apply(this,S(arguments))},Ge.destroy=function(){return ae.apply(this,S(arguments))},Ge.setData=function(){return se.apply(this,S(arguments))},Ge.clearData=function(){return le.apply(this,S(arguments))},Ge.getData=function(){return ue.apply(this,S(arguments))},Ge.focus=Ge.activate=function(){return ce.apply(this,S(arguments))},Ge.blur=Ge.deactivate=function(){return fe.apply(this,S(arguments))},Ge.activeElement=function(){return he.apply(this,S(arguments))};var Xe=0,Ve={},Ke=0,Ze={},Qe={};A(Z,{autoActivate:!0});var Je=function(e){var t=this;t.id=""+Xe++,Ve[t.id]={instance:t,elements:[],handlers:{}},e&&t.clip(e),Ge.on("*",function(e){return t.emit(e)}),Ge.on("destroy",function(){t.destroy()}),Ge.create()},et=function(e,i){var r,o,a,s={},l=Ve[this.id],u=l&&l.handlers;if(!l)throw new Error("Attempted to add new listener(s) to a destroyed ZeroClipboard client instance");if("string"==typeof e&&e)a=e.toLowerCase().split(/\s+/);else if("object"==typeof e&&e&&"undefined"==typeof i)for(r in e)x.call(e,r)&&"string"==typeof r&&r&&"function"==typeof e[r]&&this.on(r,e[r]);if(a&&a.length){for(r=0,o=a.length;r<o;r++)e=a[r].replace(/^on/,""),s[e]=!0,u[e]||(u[e]=[]),u[e].push(i);if(s.ready&&U.ready&&this.emit({type:"ready",client:this}),s.error){for(r=0,o=X.length;r<o;r++)if(U[X[r].replace(/^flash-/,"")]){this.emit({type:"error",name:X[r],client:this});break}n!==t&&Ge.version!==n&&this.emit({type:"error",name:"version-mismatch",jsVersion:Ge.version,swfVersion:n})}}return this},tt=function(e,t){var n,i,r,o,a,s=Ve[this.id],l=s&&s.handlers;if(!l)return this;if(0===arguments.length)o=_(l);else if("string"==typeof e&&e)o=e.split(/\s+/);else if("object"==typeof e&&e&&"undefined"==typeof t)for(n in e)x.call(e,n)&&"string"==typeof n&&n&&"function"==typeof e[n]&&this.off(n,e[n]);if(o&&o.length)for(n=0,i=o.length;n<i;n++)if(e=o[n].toLowerCase().replace(/^on/,""),a=l[e],a&&a.length)if(t)for(r=a.indexOf(t);r!==-1;)a.splice(r,1),r=a.indexOf(t,r);else a.length=0;return this},nt=function(e){var t=null,n=Ve[this.id]&&Ve[this.id].handlers;return n&&(t="string"==typeof e&&e?n[e]?n[e].slice(0):[]:C(n)),t},it=function(e){if(lt.call(this,e)){"object"==typeof e&&e&&"string"==typeof e.type&&e.type&&(e=A({},e));var t=A({},pe(e),{client:this});ut.call(this,t)}return this},rt=function(e){if(!Ve[this.id])throw new Error("Attempted to clip element(s) to a destroyed ZeroClipboard client instance");e=ct(e);for(var t=0;t<e.length;t++)if(x.call(e,t)&&e[t]&&1===e[t].nodeType){e[t].zcClippingId?Ze[e[t].zcClippingId].indexOf(this.id)===-1&&Ze[e[t].zcClippingId].push(this.id):(e[t].zcClippingId="zcClippingId_"+Ke++,Ze[e[t].zcClippingId]=[this.id],Z.autoActivate===!0&&ft(e[t]));var n=Ve[this.id]&&Ve[this.id].elements;n.indexOf(e[t])===-1&&n.push(e[t])}return this},ot=function(e){var t=Ve[this.id];if(!t)return this;var n,i=t.elements;e="undefined"==typeof e?i.slice(0):ct(e);for(var r=e.length;r--;)if(x.call(e,r)&&e[r]&&1===e[r].nodeType){for(n=0;(n=i.indexOf(e[r],n))!==-1;)i.splice(n,1);var o=Ze[e[r].zcClippingId];if(o){for(n=0;(n=o.indexOf(this.id,n))!==-1;)o.splice(n,1);0===o.length&&(Z.autoActivate===!0&&ht(e[r]),delete e[r].zcClippingId)}}return this},at=function(){var e=Ve[this.id];return e&&e.elements?e.elements.slice(0):[]},st=function(){Ve[this.id]&&(this.unclip(),this.off(),delete Ve[this.id])},lt=function(e){if(!e||!e.type)return!1;if(e.client&&e.client!==this)return!1;var t=Ve[this.id],n=t&&t.elements,i=!!n&&n.length>0,r=!e.target||i&&n.indexOf(e.target)!==-1,o=e.relatedTarget&&i&&n.indexOf(e.relatedTarget)!==-1,a=e.client&&e.client===this;return!(!t||!(r||o||a))},ut=function(e){var t=Ve[this.id];if("object"==typeof e&&e&&e.type&&t){var n=ve(e),i=t&&t.handlers["*"]||[],r=t&&t.handlers[e.type]||[],a=i.concat(r);if(a&&a.length){var s,l,u,c,f,h=this;for(s=0,l=a.length;s<l;s++)u=a[s],c=h,"string"==typeof u&&"function"==typeof o[u]&&(u=o[u]),"object"==typeof u&&u&&"function"==typeof u.handleEvent&&(c=u,u=u.handleEvent),"function"==typeof u&&(f=A({},e),ye(u,c,[f],n))}}},ct=function(e){return"string"==typeof e&&(e=[]),"number"!=typeof e.length?[e]:e},ft=function(e){if(e&&1===e.nodeType){var t=function(e){(e||(e=o.event))&&("js"!==e._source&&(e.stopImmediatePropagation(),e.preventDefault()),delete e._source)},n=function(n){(n||(n=o.event))&&(t(n),Ge.focus(e))};e.addEventListener("mouseover",n,!1),e.addEventListener("mouseout",t,!1),e.addEventListener("mouseenter",t,!1),e.addEventListener("mouseleave",t,!1),e.addEventListener("mousemove",t,!1),Qe[e.zcClippingId]={mouseover:n,mouseout:t,mouseenter:t,mouseleave:t,mousemove:t}}},ht=function(e){if(e&&1===e.nodeType){var t=Qe[e.zcClippingId];if("object"==typeof t&&t){for(var n,i,r=["move","leave","enter","out","over"],o=0,a=r.length;o<a;o++)n="mouse"+r[o],i=t[n],"function"==typeof i&&e.removeEventListener(n,i,!1);delete Qe[e.zcClippingId]}}};Ge._createClient=function(){Je.apply(this,S(arguments))},Ge.prototype.on=function(){return et.apply(this,S(arguments))},Ge.prototype.off=function(){return tt.apply(this,S(arguments))},Ge.prototype.handlers=function(){return nt.apply(this,S(arguments))},Ge.prototype.emit=function(){return it.apply(this,S(arguments))},Ge.prototype.clip=function(){return rt.apply(this,S(arguments))},Ge.prototype.unclip=function(){return ot.apply(this,S(arguments))},Ge.prototype.elements=function(){return at.apply(this,S(arguments))},Ge.prototype.destroy=function(){return st.apply(this,S(arguments))},Ge.prototype.setText=function(e){if(!Ve[this.id])throw new Error("Attempted to set pending clipboard data from a destroyed ZeroClipboard client instance");return Ge.setData("text/plain",e),this},Ge.prototype.setHtml=function(e){if(!Ve[this.id])throw new Error("Attempted to set pending clipboard data from a destroyed ZeroClipboard client instance");return Ge.setData("text/html",e),this},Ge.prototype.setRichText=function(e){if(!Ve[this.id])throw new Error("Attempted to set pending clipboard data from a destroyed ZeroClipboard client instance");return Ge.setData("application/rtf",e),this},Ge.prototype.setData=function(){if(!Ve[this.id])throw new Error("Attempted to set pending clipboard data from a destroyed ZeroClipboard client instance");return Ge.setData.apply(this,S(arguments)),this},Ge.prototype.clearData=function(){if(!Ve[this.id])throw new Error("Attempted to clear pending clipboard data from a destroyed ZeroClipboard client instance");return Ge.clearData.apply(this,S(arguments)),this},Ge.prototype.getData=function(){if(!Ve[this.id])throw new Error("Attempted to get pending clipboard data from a destroyed ZeroClipboard client instance");return Ge.getData.apply(this,S(arguments))},"function"==typeof define&&define.amd?define(function(){return Ge}):"object"==typeof module&&module&&"object"==typeof module.exports&&module.exports?module.exports=Ge:e.ZeroClipboard=Ge}(function(){return this||window}()),angular.module("zeroclipboard",[]).provider("uiZeroclipConfig",function(){var e={buttonClass:"",swfPath:"ZeroClipboard.swf",trustedDomains:[window.location.host],cacheBust:!0,forceHandCursor:!1,zIndex:999999999,debug:!0,title:null,autoActivate:!0,flashLoadTimeout:3e4,hoverClass:"zeroclipboard-is-hover",activeClass:"zeroclipboard-is-active"},t=!0;this.setZcConf=function(t){angular.extend(e,t)},this.setOverrideConfig=function(e){t=e},this.$get=function(){return{zeroclipConfig:e,overrideConfig:t}}}).directive("uiZeroclip",["$document","$window","uiZeroclipConfig",function(e,t,n){var i=n.zeroclipConfig||{},r=t.ZeroClipboard;return{scope:{onCopied:"&zeroclipCopied",onError:"&?zeroclipOnError",onBeforeCopy:"&?zeroclipOnBeforeCopy",client:"=?uiZeroclip",value:"=zeroclipModel",text:"@zeroclipText"},link:function(e,t,o){var a,s=t[0];n.overrideConfig&&r.config(i),angular.isFunction(r)&&(e.client=new r(s)),e.$watch("value",function(e){void 0!==e&&t.attr("data-clipboard-text",e)}),e.$watch("text",function(e){t.attr("data-clipboard-text",e)}),e.client.on("aftercopy",a=function(t){e.$apply(function(){e.onCopied({$event:t})})}),e.client.on("error",function(t){e.onError&&e.$apply(function(){e.onError({$event:t})}),r.destroy()}),e.client.on("beforecopy",function(t){e.onBeforeCopy&&e.$apply(function(){e.onBeforeCopy({$event:t})})}),e.$on("$destroy",function(){e.client.off("complete",a),e.client=null,t.off(),r.destroy()})}}}]),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.cql=e()}}(function(){var e;return function t(e,n,i){function r(a,s){if(!n[a]){if(!e[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[a]={exports:{}};e[a][0].call(c.exports,function(t){var n=e[a][1][t];return r(n?n:t)},c,c.exports,t,e,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(e,t,n){},{}],2:[function(t,n,i){!function(t,r){"object"==typeof i&&"undefined"!=typeof n?r(i):"function"==typeof e&&e.amd?e("d3-time",["exports"],r):r(t.d3_time={})}(this,function(e){"use strict";function t(e,n,i,a){function s(t){return e(t=new Date((+t))),
t}return s.floor=s,s.round=function(t){var i=new Date((+t)),r=new Date(t-1);return e(i),e(r),n(r,1),t-i<r-t?i:r},s.ceil=function(t){return e(t=new Date(t-1)),n(t,1),t},s.offset=function(e,t){return n(e=new Date((+e)),null==t?1:Math.floor(t)),e},s.range=function(t,i,r){var o=[];if(t=new Date(t-1),i=new Date((+i)),r=null==r?1:Math.floor(r),!(t<i&&r>0))return o;for(n(t,1),e(t),t<i&&o.push(new Date((+t)));n(t,r),e(t),t<i;)o.push(new Date((+t)));return o},s.filter=function(i){return t(function(t){for(;e(t),!i(t);)t.setTime(t-1)},function(e,t){for(;--t>=0;)for(;n(e,1),!i(e););})},i&&(s.count=function(t,n){return r.setTime(+t),o.setTime(+n),e(r),e(o),Math.floor(i(r,o))},s.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?s.filter(a?function(t){return a(t)%e===0}:function(t){return s.count(0,t)%e===0}):s:null}),s}function n(e){return t(function(t){t.setHours(0,0,0,0),t.setDate(t.getDate()-(t.getDay()+7-e)%7)},function(e,t){e.setDate(e.getDate()+7*t)},function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/6048e5})}function i(e){return t(function(t){t.setUTCHours(0,0,0,0),t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7)},function(e,t){e.setUTCDate(e.getUTCDate()+7*t)},function(e,t){return(t-e)/6048e5})}var r=new Date,o=new Date,a=t(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});a.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?t(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):a:null};var s=t(function(e){e.setMilliseconds(0)},function(e,t){e.setTime(+e+1e3*t)},function(e,t){return(t-e)/1e3},function(e){return e.getSeconds()}),l=t(function(e){e.setSeconds(0,0)},function(e,t){e.setTime(+e+6e4*t)},function(e,t){return(t-e)/6e4},function(e){return e.getMinutes()}),u=t(function(e){e.setMinutes(0,0,0)},function(e,t){e.setTime(+e+36e5*t)},function(e,t){return(t-e)/36e5},function(e){return e.getHours()}),c=t(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5},function(e){return e.getDate()-1}),f=n(0),h=n(1),d=n(2),p=n(3),g=n(4),m=n(5),v=n(6),y=t(function(e){e.setHours(0,0,0,0),e.setDate(1)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())},function(e){return e.getMonth()}),b=t(function(e){e.setHours(0,0,0,0),e.setMonth(0,1)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()}),_=t(function(e){e.setUTCMilliseconds(0)},function(e,t){e.setTime(+e+1e3*t)},function(e,t){return(t-e)/1e3},function(e){return e.getUTCSeconds()}),E=t(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+6e4*t)},function(e,t){return(t-e)/6e4},function(e){return e.getUTCMinutes()}),x=t(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+36e5*t)},function(e,t){return(t-e)/36e5},function(e){return e.getUTCHours()}),w=t(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/864e5},function(e){return e.getUTCDate()-1}),T=i(0),S=i(1),A=i(2),C=i(3),k=i(4),O=i(5),I=i(6),N=t(function(e){e.setUTCHours(0,0,0,0),e.setUTCDate(1)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())},function(e){return e.getUTCMonth()}),M=t(function(e){e.setUTCHours(0,0,0,0),e.setUTCMonth(0,1)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()}),D=a.range,L=s.range,$=l.range,R=u.range,P=c.range,F=f.range,U=h.range,j=d.range,H=p.range,z=g.range,B=m.range,q=v.range,W=f.range,Y=y.range,G=b.range,X=a,V=D,K=_.range,Z=E.range,Q=x.range,J=w.range,ee=T.range,te=S.range,ne=A.range,ie=C.range,re=k.range,oe=O.range,ae=I.range,se=T.range,le=N.range,ue=M.range,ce="0.1.1";e.version=ce,e.milliseconds=D,e.seconds=L,e.minutes=$,e.hours=R,e.days=P,e.sundays=F,e.mondays=U,e.tuesdays=j,e.wednesdays=H,e.thursdays=z,e.fridays=B,e.saturdays=q,e.weeks=W,e.months=Y,e.years=G,e.utcMillisecond=X,e.utcMilliseconds=V,e.utcSeconds=K,e.utcMinutes=Z,e.utcHours=Q,e.utcDays=J,e.utcSundays=ee,e.utcMondays=te,e.utcTuesdays=ne,e.utcWednesdays=ie,e.utcThursdays=re,e.utcFridays=oe,e.utcSaturdays=ae,e.utcWeeks=se,e.utcMonths=le,e.utcYears=ue,e.millisecond=a,e.second=s,e.minute=l,e.hour=u,e.day=c,e.sunday=f,e.monday=h,e.tuesday=d,e.wednesday=p,e.thursday=g,e.friday=m,e.saturday=v,e.week=f,e.month=y,e.year=b,e.utcSecond=_,e.utcMinute=E,e.utcHour=x,e.utcDay=w,e.utcSunday=T,e.utcMonday=S,e.utcTuesday=A,e.utcWednesday=C,e.utcThursday=k,e.utcFriday=O,e.utcSaturday=I,e.utcWeek=T,e.utcMonth=N,e.utcYear=M,e.interval=t})},{}],3:[function(e,t,n){function i(e){if(!e)throw Error("Missing binning options.");var t,n,i,s,l,u,c,f=e.maxbins||15,h=e.base||10,d=Math.log(h),p=e.div||[5,2],g=e.min,m=e.max,v=m-g;if(e.step)t=e.step;else if(e.steps)t=e.steps[Math.min(e.steps.length-1,r(e.steps,v/f,0,e.steps.length))];else{for(n=Math.ceil(Math.log(f)/d),i=e.minstep||0,t=Math.max(i,Math.pow(h,Math.round(Math.log(v)/d)-n));Math.ceil(v/t)>f;)t*=h;for(u=0;u<p.length;++u)l=t/p[u],l>=i&&v/l<=f&&(t=l)}return l=Math.log(t),s=l>=0?0:~~(-l/d)+1,c=Math.pow(h,-s-1),g=Math.min(g,Math.floor(g/t+c)*t),m=Math.ceil(m/t)*t,{start:g,stop:m,step:t,unit:{precision:s},value:o,index:a}}function r(e,t,n,i){for(;n<i;){var r=n+i>>>1;u.cmp(e[r],t)<0?n=r+1:i=r}return n}function o(e){return this.step*Math.floor(e/this.step+f)}function a(e){return Math.floor((e-this.start)/this.step+f)}function s(e){return this.unit.date(o.call(this,e))}function l(e){return a.call(this,this.unit.unit(e))}var u=e("../util"),c=e("../time"),f=1e-15;i.date=function(e){if(!e)throw Error("Missing date binning options.");var t=e.utc?c.utc:c,n=e.min,r=e.max,o=e.maxbins||20,a=e.minbins||4,u=+r-+n,f=e.unit?t[e.unit]:t.find(u,a,o),h=i({min:null!=f.min?f.min:f.unit(n),max:null!=f.max?f.max:f.unit(r),maxbins:o,minstep:f.minstep,steps:f.step});return h.unit=f,h.index=l,e.raw||(h.value=s),h},t.exports=i},{"../time":7,"../util":8}],4:[function(e,t,n){var i=e("./util"),r=t.exports;r.repeat=function(e,t){var n,i=Array(t);for(n=0;n<t;++n)i[n]=e;return i},r.zeros=function(e){return r.repeat(0,e)},r.range=function(e,t,n){if(arguments.length<3&&(n=1,arguments.length<2&&(t=e,e=0)),(t-e)/n==1/0)throw new Error("Infinite range");var i,r=[],o=-1;if(n<0)for(;(i=e+n*++o)>t;)r.push(i);else for(;(i=e+n*++o)<t;)r.push(i);return r},r.random={},r.random.uniform=function(e,t){void 0===t&&(t=void 0===e?1:e,e=0);var n=t-e,i=function(){return e+n*Math.random()};return i.samples=function(e){return r.zeros(e).map(i)},i.pdf=function(i){return i>=e&&i<=t?1/n:0},i.cdf=function(i){return i<e?0:i>t?1:(i-e)/n},i.icdf=function(t){return t>=0&&t<=1?e+t*n:NaN},i},r.random.integer=function(e,t){void 0===t&&(t=e,e=0);var n=t-e,i=function(){return e+Math.floor(n*Math.random())};return i.samples=function(e){return r.zeros(e).map(i)},i.pdf=function(i){return i===Math.floor(i)&&i>=e&&i<t?1/n:0},i.cdf=function(i){var r=Math.floor(i);return r<e?0:r>=t?1:(r-e+1)/n},i.icdf=function(t){return t>=0&&t<=1?e-1+Math.floor(t*n):NaN},i},r.random.normal=function(e,t){e=e||0,t=t||1;var n,i=function(){var i,r,o=0,a=0;if(void 0!==n)return o=n,n=void 0,o;do o=2*Math.random()-1,a=2*Math.random()-1,i=o*o+a*a;while(0===i||i>1);return r=Math.sqrt(-2*Math.log(i)/i),n=e+a*r*t,e+o*r*t};return i.samples=function(e){return r.zeros(e).map(i)},i.pdf=function(n){var i=Math.exp(Math.pow(n-e,2)/(-2*Math.pow(t,2)));return 1/(t*Math.sqrt(2*Math.PI))*i},i.cdf=function(n){var i,r=(n-e)/t,o=Math.abs(r);if(o>37)i=0;else{var a,s=Math.exp(-o*o/2);o<7.07106781186547?(a=.0352624965998911*o+.700383064443688,a=a*o+6.37396220353165,a=a*o+33.912866078383,a=a*o+112.079291497871,a=a*o+221.213596169931,a=a*o+220.206867912376,i=s*a,a=.0883883476483184*o+1.75566716318264,a=a*o+16.064177579207,a=a*o+86.7807322029461,a=a*o+296.564248779674,a=a*o+637.333633378831,a=a*o+793.826512519948,a=a*o+440.413735824752,i/=a):(a=o+.65,a=o+4/a,a=o+3/a,a=o+2/a,a=o+1/a,i=s/a/2.506628274631)}return r>0?1-i:i},i.icdf=function(n){if(n<=0||n>=1)return NaN;var i=2*n-1,r=8*(Math.PI-3)/(3*Math.PI*(4-Math.PI)),o=2/(Math.PI*r)+Math.log(1-Math.pow(i,2))/2,a=Math.log(1-i*i)/r,s=(i>0?1:-1)*Math.sqrt(Math.sqrt(o*o-a)-o);return e+t*Math.SQRT2*s},i},r.random.bootstrap=function(e,t){var n=e.filter(i.isValid),o=n.length,a=t?r.random.normal(0,t):null,s=function(){return n[~~(Math.random()*o)]+(a?a():0)};return s.samples=function(e){return r.zeros(e).map(s)},s}},{"./util":8}],5:[function(e,t,n){function i(e,t){return t?void(e[u]=t):e&&e[u]||null}function r(e,t){e=l.array(e),t=l.$(t);var n,i,r;if(e[u]&&(n=t(e[u]),l.isString(n)))return n;for(i=0,r=e.length;!l.isValid(n)&&i<r;++i)n=t?t(e[i]):e[i];return l.isDate(n)?"date":l.isNumber(n)?"number":l.isBoolean(n)?"boolean":l.isString(n)?"string":null}function o(e,t){if(e.length)return t=t||l.keys(e[0]),t.reduce(function(t,n){return t[n]=r(e,n),t},{})}function a(e,t){e=l.array(e),t=l.$(t);var n,i,r,o=["boolean","integer","number","date"];for(n=0;n<e.length;++n){for(r=t?t(e[n]):e[n],i=0;i<o.length;++i)l.isValid(r)&&!f[o[i]](r)&&(o.splice(i,1),i-=1);if(0===o.length)return"string"}return o[0]}function s(e,t){return t=t||l.keys(e[0]),t.reduce(function(t,n){return t[n]=a(e,n),t},{})}var l=e("../util"),u="__types__",c={"boolean":l["boolean"],integer:l.number,number:l.number,date:l.date,string:function(e){return""===e?null:e}},f={"boolean":function(e){return"true"===e||"false"===e||l.isBoolean(e)},integer:function(e){return f.number(e)&&(e=+e)===~~e},number:function(e){return!isNaN(+e)&&!l.isDate(e)},date:function(e){return!isNaN(Date.parse(e))}};r.annotation=i,r.all=o,r.infer=a,r.inferAll=s,r.parsers=c,t.exports=r},{"../util":8}],6:[function(e,t,n){function i(e,t,n){var i=e&&e.nullh||0,r=l.random.normal(0,1),o=u.mean(t,n),a=u.stdev(t,n)/Math.sqrt(u.count.valid(t,n));if(0===a)return o-i===0?1:0;var s=(o-i)/a;return 2*r.cdf(-Math.abs(s))}function r(e,t,n,i){var r,o=i?t.map(a.$(n)):t,s=i?t.map(a.$(i)):n,l=u.count(o),c=u.count(s),f=Array();if(l!==c)throw Error("Array lengths must match.");for(r=0;r<l;++r)a.isValid(o[r])&&a.isValid(s[r])&&f.push(o[r]-s[r]);return u.z.test(f,e&&e.nullh||0)}function o(e,t,n,i){var r=i?t.map(a.$(n)):t,o=i?t.map(a.$(i)):n,s=u.count.valid(r),c=u.count.valid(o),f=l.random.normal(0,1),h=u.mean(r)-u.mean(o)-(e&&e.nullh||0),d=Math.sqrt(u.variance(r)/s+u.variance(o)/c);if(0===d)return 0===h?1:0;var p=h/d;return 2*f.cdf(-Math.abs(p))}var a=e("./util"),s=e("./import/type"),l=e("./generate"),u=t.exports;u.unique=function(e,t,n){t=a.$(t),n=n||[];var i,r,o,s={};for(r=0,o=e.length;r<o;++r)i=t?t(e[r]):e[r],i in s||(s[i]=1,n.push(i));return n},u.count=function(e){return e&&e.length||0},u.count.valid=function(e,t){t=a.$(t);var n,i,r,o=0;for(i=0,r=e.length;i<r;++i)n=t?t(e[i]):e[i],a.isValid(n)&&(o+=1);return o},u.count.missing=function(e,t){t=a.$(t);var n,i,r,o=0;for(i=0,r=e.length;i<r;++i)n=t?t(e[i]):e[i],null==n&&(o+=1);return o},u.count.distinct=function(e,t){t=a.$(t);var n,i,r,o={},s=0;for(i=0,r=e.length;i<r;++i)n=t?t(e[i]):e[i],n in o||(o[n]=1,s+=1);return s},u.count.map=function(e,t){t=a.$(t);var n,i,r,o={};for(i=0,r=e.length;i<r;++i)n=t?t(e[i]):e[i],o[n]=n in o?o[n]+1:1;return o},u.median=function(e,t){return t&&(e=e.map(a.$(t))),e=e.filter(a.isValid).sort(a.cmp),u.quantile(e,.5)},u.quartile=function(e,t){t&&(e=e.map(a.$(t))),e=e.filter(a.isValid).sort(a.cmp);var n=u.quantile;return[n(e,.25),n(e,.5),n(e,.75)]},u.quantile=function(e,t,n){void 0===n&&(n=t,t=a.identity),t=a.$(t);var i=(e.length-1)*n+1,r=Math.floor(i),o=+t(e[r-1]),s=i-r;return s?o+s*(t(e[r])-o):o},u.sum=function(e,t){t=a.$(t);for(var n,i=0,r=0,o=e.length;r<o;++r)n=t?t(e[r]):e[r],a.isValid(n)&&(i+=n);return i},u.mean=function(e,t){t=a.$(t);var n,i,r,o,s,l=0;for(i=0,o=0,r=e.length;i<r;++i)s=t?t(e[i]):e[i],a.isValid(s)&&(n=s-l,l+=n/++o);return l},u.mean.geometric=function(e,t){t=a.$(t);var n,i,r,o,s=1;for(o=0,n=0,i=e.length;o<i;++o)if(r=t?t(e[o]):e[o],a.isValid(r)){if(r<=0)throw Error("Geometric mean only defined for positive values.");s*=r,++n}return s=n>0?Math.pow(s,1/n):0},u.mean.harmonic=function(e,t){t=a.$(t);var n,i,r,o,s=0;for(o=0,n=0,i=e.length;o<i;++o)r=t?t(e[o]):e[o],a.isValid(r)&&(s+=1/r,++n);return n/s},u.variance=function(e,t){if(t=a.$(t),!a.isArray(e)||e.length<2)return 0;var n,i,r,o,s=0,l=0;for(i=0,r=0;i<e.length;++i)o=t?t(e[i]):e[i],a.isValid(o)&&(n=o-s,s+=n/++r,l+=n*(o-s));return l/=r-1},u.stdev=function(e,t){return Math.sqrt(u.variance(e,t))},u.modeskew=function(e,t){var n=u.mean(e,t),i=u.median(e,t),r=u.stdev(e,t);return 0===r?0:(n-i)/r},u.min=function(e,t){return u.extent(e,t)[0]},u.max=function(e,t){return u.extent(e,t)[1]},u.extent=function(e,t){t=a.$(t);var n,i,r,o,s=e.length;for(o=0;o<s;++o)if(r=t?t(e[o]):e[o],a.isValid(r)){n=i=r;break}for(;o<s;++o)r=t?t(e[o]):e[o],a.isValid(r)&&(r<n&&(n=r),r>i&&(i=r));return[n,i]},u.extent.index=function(e,t){t=a.$(t);var n,i,r,o,s=-1,l=-1,u=e.length;for(o=0;o<u;++o)if(r=t?t(e[o]):e[o],a.isValid(r)){n=i=r,s=l=o;break}for(;o<u;++o)r=t?t(e[o]):e[o],a.isValid(r)&&(r<n&&(n=r,s=o),r>i&&(i=r,l=o));return[s,l]},u.dot=function(e,t,n){var i,r,o=0;if(n)for(t=a.$(t),n=a.$(n),i=0;i<e.length;++i)r=t(e[i])*n(e[i]),r===r&&(o+=r);else{if(e.length!==t.length)throw Error("Array lengths must match.");for(i=0;i<e.length;++i)r=e[i]*t[i],r===r&&(o+=r)}return o},u.dist=function(e,t,n,i){var r,o,s=a.isFunction(n)||a.isString(n),l=e,u=s?e:t,c=s?i:n,f=2===c||null==c,h=e.length,d=0;for(s&&(t=a.$(t),n=a.$(n)),o=0;o<h;++o)r=s?t(l[o])-n(u[o]):l[o]-u[o],d+=f?r*r:Math.pow(Math.abs(r),c);return f?Math.sqrt(d):Math.pow(d,1/c)},u.cohensd=function(e,t,n){var i=n?e.map(a.$(t)):e,r=n?e.map(a.$(n)):t,o=u.mean(i),s=u.mean(r),l=u.count.valid(i),c=u.count.valid(r);if(l+c-2<=0)return 0;var f=u.variance(i),h=u.variance(r),d=Math.sqrt(((l-1)*f+(c-1)*h)/(l+c-2));return 0===d?0:(o-s)/d},u.covariance=function(e,t,n){var i,r,o,s,l,c=n?e.map(a.$(t)):e,f=n?e.map(a.$(n)):t,h=c.length,d=u.mean(c),p=u.mean(f),g=0,m=0;if(h!==f.length)throw Error("Input lengths must match.");for(i=0;i<h;++i)if(r=c[i],s=a.isValid(r),o=f[i],l=a.isValid(o),s&&l)g+=(r-d)*(o-p),++m;else if(s||l)throw Error("Valid values must align.");return g/(m-1)},u.rank=function(e,t){t=a.$(t)||a.identity;var n,i,r,o=e.map(function(e,n){return{idx:n,val:t(e)}}).sort(a.comparator("val")),s=e.length,l=Array(s),u=-1,c={};for(n=0;n<s;++n){if(i=o[n].val,u<0&&c===i)u=n-1;else if(u>-1&&c!==i){for(r=1+(n-1+u)/2;u<n;++u)l[o[u].idx]=r;u=-1}l[o[n].idx]=n+1,c=i}if(u>-1)for(r=1+(s-1+u)/2;u<s;++u)l[o[u].idx]=r;return l},u.cor=function(e,t,n){var i=n;n=i?e.map(a.$(n)):t,t=i?e.map(a.$(t)):e;var r=u.dot(t,n),o=u.mean(t),s=u.mean(n),l=u.stdev(t),c=u.stdev(n),f=e.length;return(r-f*o*s)/((f-1)*l*c)},u.cor.rank=function(e,t,n){var i,r,o,a=n?u.rank(e,t):u.rank(e),s=n?u.rank(e,n):u.rank(t),l=e.length;for(i=0,r=0;i<l;++i)o=a[i]-s[i],r+=o*o;return 1-6*r/(l*(l*l-1))},u.cor.dist=function(e,t,n){var i,r,o,s,l=n?e.map(a.$(t)):e,c=n?e.map(a.$(n)):t,f=u.dist.mat(l),h=u.dist.mat(c),d=f.length;for(i=0,r=0,o=0,s=0;i<d;++i)r+=f[i]*f[i],o+=h[i]*h[i],s+=f[i]*h[i];return Math.sqrt(s/Math.sqrt(r*o))},u.linearRegression=function(e,t,n){var i,r,o=n?e.map(a.$(t)):e,s=n?e.map(a.$(n)):t,l=o.length,c=u.covariance(o,s),f=u.stdev(o),h=u.stdev(s),d=c/(f*f),p=u.mean(s)-d*u.mean(o),g={slope:d,intercept:p,R:c/(f*h),rss:0};for(r=0;r<l;++r)a.isValid(o[r])&&a.isValid(s[r])&&(i=d*o[r]+p-s[r],g.rss+=i*i);return g},u.bootstrap={},u.bootstrap.ci=function(e,t,n,i,r){var o,s,c,f,h,d,p;for(a.isFunction(t)||a.isString(t)?(o=e.map(a.$(t)),s=n,c=i,f=r):(o=e,s=t,c=n,f=i),s=s?+s:1e3,c=c||.05,h=l.random.bootstrap(o,f),p=0,d=Array(s);p<s;++p)d[p]=u.mean(h.samples(o.length));return d.sort(a.numcmp),[u.quantile(d,c/2),u.quantile(d,1-c/2)]},u.z={},u.z.ci=function(e,t,n){var i=e,r=t;(a.isFunction(t)||a.isString(t))&&(i=e.map(a.$(t)),r=n),r=r||.05;var o=.05===r?1.96:l.random.normal(0,1).icdf(1-r/2),s=u.mean(i),c=u.stdev(i)/Math.sqrt(u.count.valid(i));return[s-o*c,s+o*c]},u.z.test=function(e,t,n,s){return a.isFunction(n)||a.isString(n)?(s&&s.paired?r:o)(s,e,t,n):a.isArray(t)?(n&&n.paired?r:o)(n,e,t):a.isFunction(t)||a.isString(t)?i(n,e,t):i(t,e)},u.dist.mat=function(e){var t,n,i,r=e.length,o=r*r,a=Array(o),s=l.zeros(r),u=0;for(n=0;n<r;++n)for(a[n*r+n]=0,i=n+1;i<r;++i)a[n*r+i]=t=Math.abs(e[n]-e[i]),a[i*r+n]=t,s[n]+=t,s[i]+=t;for(n=0;n<r;++n)u+=s[n],s[n]/=r;for(u/=o,n=0;n<r;++n)for(i=n;i<r;++i)a[n*r+i]+=u-s[n]-s[i],a[i*r+n]=a[n*r+i];return a},u.entropy=function(e,t){t=a.$(t);var n,i,r=0,o=0,s=e.length;for(n=0;n<s;++n)r+=t?t(e[n]):e[n];if(0===r)return 0;for(n=0;n<s;++n)i=(t?t(e[n]):e[n])/r,i&&(o+=i*Math.log(i));return-o/Math.LN2},u.mutual=function(e,t,n,i){var r,o,s,l=i?e.map(a.$(t)):e,u=i?e.map(a.$(n)):t,c=i?e.map(a.$(i)):n,f={},h={},d=c.length,p=0,g=0,m=0;for(s=0;s<d;++s)f[l[s]]=0,h[u[s]]=0;for(s=0;s<d;++s)f[l[s]]+=c[s],h[u[s]]+=c[s],p+=c[s];for(o=1/(p*Math.LN2),s=0;s<d;++s)0!==c[s]&&(r=p*c[s]/(f[l[s]]*h[u[s]]),g+=c[s]*o*Math.log(r),m+=c[s]*o*Math.log(c[s]/p));return[g,1+g/m]},u.mutual.info=function(e,t,n,i){return u.mutual(e,t,n,i)[0]},u.mutual.dist=function(e,t,n,i){return u.mutual(e,t,n,i)[1]},u.profile=function(e,t){var n,i,r,o,l,c=0,f=0,h=0,d=0,p=null,g=null,m=0,v=[],y={};for(r=0;r<e.length;++r)o=t?t(e[r]):e[r],y[o]=o in y?y[o]+1:(d+=1,1),null==o?++h:a.isValid(o)&&(l="string"==typeof o?o.length:o,(null===p||l<p)&&(p=l),(null===g||l>g)&&(g=l),n=l-c,c+=n/++f,m+=n*(l-c),v.push(l));return m/=f-1,i=Math.sqrt(m),v.sort(a.cmp),{type:s(e,t),unique:y,count:e.length,valid:f,missing:h,distinct:d,min:p,max:g,mean:c,stdev:i,median:o=u.quantile(v,.5),q1:u.quantile(v,.25),q3:u.quantile(v,.75),modeskew:0===i?0:(c-o)/i}},u.summary=function(e,t){t=t||a.keys(e[0]);var n=t.map(function(t){var n=u.profile(e,a.$(t));return n.field=t,n});return n.__summary__=!0,n}},{"./generate":4,"./import/type":5,"./util":8}],7:[function(e,t,n){function i(e){return u.setTime(+e),u}function r(e,t,n,i,r,o){var a={type:e,date:t,unit:n};return i?a.step=i:a.minstep=1,null!=r&&(a.min=r),null!=o&&(a.max=o),a}function o(e,t,n,i,o,a){return r(e,function(e){return t.offset(n,e)},function(e){return t.count(n,e)},i,o,a)}function a(e,t,n,i){var r,o,a,s=p[0];for(r=1,o=p.length;r<o;++r)if(s=p[r],t>s[0]){if(a=t/s[0],a>i)return e[p[r-1][1]];if(a>=n)return e[s[1]]}return e[p[o-1][1]]}function s(e){var t,n,i={};for(t=0,n=e.length;t<n;++t)i[e[t].type]=e[t];return i.find=function(t,n,i){return a(e,t,n,i)},i}var l=e("d3-time"),u=new Date,c=new Date(0,0,1).setFullYear(0),f=new Date(Date.UTC(0,0,1)).setUTCFullYear(0),h=[o("second",l.second,c),o("minute",l.minute,c),o("hour",l.hour,c),o("day",l.day,c,[1,7]),o("month",l.month,c,[1,3,6]),o("year",l.year,c),r("seconds",function(e){return new Date(1970,0,1,0,0,e)},function(e){return i(e).getSeconds()},null,0,59),r("minutes",function(e){return new Date(1970,0,1,0,e)},function(e){return i(e).getMinutes()},null,0,59),r("hours",function(e){return new Date(1970,0,1,e)},function(e){return i(e).getHours()},null,0,23),r("weekdays",function(e){return new Date(1970,0,4+e)},function(e){return i(e).getDay()},[1],0,6),r("dates",function(e){return new Date(1970,0,e)},function(e){return i(e).getDate()},[1],1,31),r("months",function(e){return new Date(1970,e%12,1)},function(e){return i(e).getMonth()},[1],0,11)],d=[o("second",l.utcSecond,f),o("minute",l.utcMinute,f),o("hour",l.utcHour,f),o("day",l.utcDay,f,[1,7]),o("month",l.utcMonth,f,[1,3,6]),o("year",l.utcYear,f),r("seconds",function(e){return new Date(Date.UTC(1970,0,1,0,0,e))},function(e){return i(e).getUTCSeconds()},null,0,59),r("minutes",function(e){return new Date(Date.UTC(1970,0,1,0,e))},function(e){return i(e).getUTCMinutes()},null,0,59),r("hours",function(e){return new Date(Date.UTC(1970,0,1,e))},function(e){return i(e).getUTCHours()},null,0,23),r("weekdays",function(e){return new Date(Date.UTC(1970,0,4+e))},function(e){return i(e).getUTCDay()},[1],0,6),r("dates",function(e){return new Date(Date.UTC(1970,0,e))},function(e){return i(e).getUTCDate()},[1],1,31),r("months",function(e){return new Date(Date.UTC(1970,e%12,1))},function(e){return i(e).getUTCMonth()},[1],0,11)],p=[[31536e6,5],[7776e6,4],[2592e6,4],[12096e5,3],[6048e5,3],[1728e5,3],[864e5,3],[432e5,2],[216e5,2],[108e5,2],[36e5,2],[18e5,1],[9e5,1],[3e5,1],[6e4,1],[3e4,0],[15e3,0],[5e3,0],[1e3,0]];t.exports=s(h),t.exports.utc=s(d)},{"d3-time":2}],8:[function(e,t,n){(function(e){function n(e,t){var n,i="";for(n=0;n<e;++n)i+=t;return i}function i(e,t,n){var i=0,r=e.split(l);return e=n?(r=r.reverse()).filter(function(e){return i+=e.length,i<=t}).reverse():r.filter(function(e){return i+=e.length,i<=t}),e.length?e.join("").trim():r[0].slice(0,t)}var r=t.exports,o="__name__";r.namedfunc=function(e,t){return t[o]=e,t},r.name=function(e){return null==e?null:e[o]},r.identity=function(e){return e},r["true"]=r.namedfunc("true",function(){return!0}),r["false"]=r.namedfunc("false",function(){return!1}),r.duplicate=function(e){return JSON.parse(JSON.stringify(e))},r.equal=function(e,t){return JSON.stringify(e)===JSON.stringify(t)},r.extend=function(e){for(var t,n,i=1,r=arguments.length;i<r;++i){t=arguments[i];for(n in t)e[n]=t[n]}return e},r.length=function(e){return null!=e&&null!=e.length?e.length:null},r.keys=function(e){var t,n=[];for(t in e)n.push(t);return n},r.vals=function(e){var t,n=[];for(t in e)n.push(e[t]);return n},r.toMap=function(e,t){return(t=r.$(t))?e.reduce(function(e,n){return e[t(n)]=1,e},{}):e.reduce(function(e,t){return e[t]=1,e},{})},r.keystr=function(e){var t=e.length;if(!t)return"";for(var n=String(e[0]),i=1;i<t;++i)n+="|"+String(e[i]);return n};var a=Object.prototype.toString;r.isObject=function(e){return e===Object(e)},r.isFunction=function(e){return"[object Function]"===a.call(e)},r.isString=function(e){return"string"==typeof value||"[object String]"===a.call(e)},r.isArray=Array.isArray||function(e){return"[object Array]"===a.call(e)},r.isNumber=function(e){return"number"==typeof e||"[object Number]"===a.call(e)},r.isBoolean=function(e){return e===!0||e===!1||"[object Boolean]"==a.call(e)},r.isDate=function(e){return"[object Date]"===a.call(e)},r.isValid=function(e){return null!=e&&e===e},r.isBuffer="function"==typeof e&&e.isBuffer||r["false"],r.number=function(e){return null==e||""===e?null:+e},r["boolean"]=function(e){return null==e||""===e?null:"false"!==e&&!!e},r.date=function(e,t){var n=t?t:Date;return null==e||""===e?null:n.parse(e)},r.array=function(e){return null!=e?r.isArray(e)?e:[e]:[]},r.str=function(e){return r.isArray(e)?"["+e.map(r.str)+"]":r.isObject(e)||r.isString(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e};var s=/\[(.*?)\]|[^.\[]+/g;r.field=function(e){return String(e).match(s).map(function(e){return"["!==e[0]?e:"'"!==e[1]&&'"'!==e[1]?e.slice(1,-1):e.slice(2,-2).replace(/\\(["'])/g,"$1")})},r.accessor=function(e){return null==e||r.isFunction(e)?e:r.namedfunc(e,Function("x","return x["+r.field(e).map(r.str).join("][")+"];"))},r.$=r.accessor,r.mutator=function(e){var t;return r.isString(e)&&(t=r.field(e)).length>1?function(e,n){for(var i=0;i<t.length-1;++i)e=e[t[i]];e[t[i]]=n}:function(t,n){t[e]=n}},r.$func=function(e,t){return function(n){n=r.$(n)||r.identity;var i=e+(r.name(n)?"_"+r.name(n):"");return r.namedfunc(i,function(e){return t(n(e))})}},r.$valid=r.$func("valid",r.isValid),r.$length=r.$func("length",r.length),r.$in=function(e,t){e=r.$(e);var n=r.isArray(t)?r.toMap(t):t;return function(t){return!!n[e(t)]}},r.comparator=function(e){var t=[];return void 0===e&&(e=[]),e=r.array(e).map(function(e){var n=1;return"-"===e[0]?(n=-1,e=e.slice(1)):"+"===e[0]&&(n=1,e=e.slice(1)),t.push(n),r.accessor(e)}),function(n,i){var r,o,a,s,l;for(r=0,o=e.length;r<o;++r){if(a=e[r],s=a(n),l=a(i),s<l)return-1*t[r];if(s>l)return t[r]}return 0}},r.cmp=function(e,t){return e<t?-1:e>t?1:e>=t?0:null===e?-1:null===t?1:NaN},r.numcmp=function(e,t){return e-t},r.stablesort=function(e,t,n){var i=e.reduce(function(e,t,i){return e[n(t)]=i,e},{});return e.sort(function(e,r){var o=t(e),a=t(r);return o<a?-1:o>a?1:i[n(e)]-i[n(r)]}),e},r.permute=function(e){for(var t,n,i=e.length;i;)n=Math.floor(Math.random()*i--),t=e[i],e[i]=e[n],e[n]=t},r.pad=function(e,t,i,r){r=r||" ";var o=t-e.length;if(o<=0)return e;switch(i){case"left":return n(o,r)+e;case"middle":case"center":return n(Math.floor(o/2),r)+e+n(Math.ceil(o/2),r);default:return e+n(o,r)}},r.truncate=function(e,t,n,r,o){var a=e.length;if(a<=t)return e;o=void 0!==o?String(o):"…";var s=Math.max(0,t-o.length);switch(n){case"left":return o+(r?i(e,s,1):e.slice(a-s));case"middle":case"center":var l=Math.ceil(s/2),u=Math.floor(s/2);return(r?i(e,l):e.slice(0,l))+o+(r?i(e,u,1):e.slice(a-u));default:return(r?i(e,s):e.slice(0,s))+o}};var l=/([\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u2028\u2029\u3000\uFEFF])/}).call(this,e("buffer").Buffer)},{buffer:1}],9:[function(e,t,n){"use strict";var i=e("vega-lite/src/channel"),r=e("vega-lite/src/aggregate"),o=e("vega-lite/src/mark"),a=e("vega-lite/src/scale"),s=e("vega-lite/src/sort"),l=e("vega-lite/src/timeunit"),u=e("vega-lite/src/type"),c=e("./property");n.DEFAULT_QUERY_CONFIG={verbose:!1,defaultSpecConfig:{overlay:{line:!0},scale:{useRawDomain:!0}},propertyPrecedence:c.DEFAULT_PROPERTY_PRECEDENCE,marks:[o.Mark.POINT,o.Mark.BAR,o.Mark.LINE,o.Mark.AREA,o.Mark.TICK],channels:[i.X,i.Y,i.ROW,i.COLUMN,i.SIZE,i.COLOR],aggregates:[void 0,r.AggregateOp.MEAN],timeUnits:[void 0,l.TimeUnit.YEAR,l.TimeUnit.MONTH,l.TimeUnit.DATE,l.TimeUnit.MINUTES,l.TimeUnit.SECONDS],types:[u.Type.NOMINAL,u.Type.ORDINAL,u.Type.QUANTITATIVE,u.Type.TEMPORAL],maxBinsList:[5,10,20],axisAxisColors:[void 0],axisAxisWidths:[void 0],axisLayers:["front","back"],axisOffsets:[void 0],axisOrients:[void 0],axisGridColors:[void 0],axisGridDashes:[void 0],axisGridOpacities:[void 0],axisGridWidths:[void 0],axisFormats:[void 0],axisLabelAngles:[void 0],axisLabelMaxLengths:[void 0],axisSubDivides:[void 0],axisTicks:[void 0],axisTickColors:[void 0],axisTickLabelColors:[void 0],axisTickLabelFonts:[void 0],axisTickLabelFontSizes:[void 0],axisTickPaddings:[void 0],axisTickSizes:[void 0],axisTickSizeMajors:[void 0],axisTickSizeMinors:[void 0],axisTickSizeEnds:[void 0],axisTickWidths:[void 0],axisValuesList:[void 0],axisTitles:[void 0],axisTitleColors:[void 0],axisTitleFonts:[void 0],axisTitleFontWeights:[void 0],axisTitleFontSizes:[void 0],axisTitleOffsets:[void 0],axisTitleMaxLengths:[void 0],axisCharacterWidths:[void 0],legendOrients:["left","right"],legendOffsets:[void 0],legendValuesList:[void 0],legendFormats:[void 0],legendLabelAligns:[void 0],legendLabelBaselines:[void 0],legendLabelColors:[void 0],legendLabelFonts:[void 0],legendLabelFontSizes:[void 0],legendSymbolColors:[void 0],legendSymbolShapes:[void 0],legendSymbolSizes:[void 0],legendSymbolStrokeWidths:[void 0],legendTitles:[void 0],legendTitleColors:[void 0],legendTitleFonts:[void 0],legendTitleFontSizes:[void 0],legendTitleFontWeights:[void 0],sorts:[s.SortOrder.ASCENDING,s.SortOrder.DESCENDING],sortOps:[r.AggregateOp.MIN,r.AggregateOp.MEAN],sortOrders:[s.SortOrder.ASCENDING,s.SortOrder.DESCENDING],scaleBandSizes:[17,21],scaleDomains:[void 0],scaleExponents:[1],scaleRanges:[void 0],scaleTypes:[void 0,a.ScaleType.LOG],numberOrdinalProportion:.05,numberOrdinalLimit:50,constraintManuallySpecifiedValue:!1,autoAddCount:!1,hasAppropriateGraphicTypeForMark:!0,omitAggregate:!1,omitAggregatePlotWithDimensionOnlyOnFacet:!0,omitAggregatePlotWithoutDimension:!1,omitBarLineAreaWithOcclusion:!0,omitBarTickWithSize:!0,omitMultipleNonPositionalChannels:!0,omitNonSumStack:!0,omitRaw:!1,omitRawContinuousFieldForAggregatePlot:!0,omitRepeatedField:!0,omitNonPositionalOrFacetOverPositionalChannels:!0,omitTableWithOcclusionIfAutoAddCount:!0,omitVerticalDotPlot:!1,preferredBinAxis:i.Channel.X,preferredTemporalAxis:i.Channel.X,preferredOrdinalAxis:i.Channel.Y,preferredNominalAxis:i.Channel.Y,preferredFacet:i.Channel.ROW,maxCardinalityForCategoricalColor:20,maxCardinalityForFacet:20,maxCardinalityForShape:6,timeUnitShouldHaveVariation:!0,typeMatchesSchemaType:!0,smallBandSizeForHighCardinalityOrFacet:{maxCardinality:10,bandSize:12},nominalColorScaleForHighCardinality:{maxCardinality:10,palette:"category20"},xAxisOnTopForHighYCardinalityWithoutColumn:{maxCardinality:30},maxGoodCardinalityForFacet:5,maxGoodCardinalityForColor:7}},{"./property":21,"vega-lite/src/aggregate":42,"vega-lite/src/channel":45,"vega-lite/src/mark":50,"vega-lite/src/scale":51,"vega-lite/src/sort":52,"vega-lite/src/timeunit":54,"vega-lite/src/type":55}],10:[function(e,t,n){"use strict";var i=function(){function e(e){this.constraint=e}return e.prototype.name=function(){return this.constraint.name},e.prototype.description=function(){return this.constraint.description},e.prototype.properties=function(){return this.constraint.properties},e.prototype.strict=function(){return this.constraint.strict},e}();n.AbstractConstraintModel=i},{}],11:[function(e,t,n){"use strict";var i=e("./encoding"),r=e("./spec");n.encoding=i,n.spec=r},{"./encoding":12,"./spec":13}],12:[function(e,t,n){"use strict";function i(e,t,i,r,o,a){for(var s=n.ENCODING_CONSTRAINTS_BY_PROPERTY[e]||[],l=r.getEncodingQueryByIndex(i),u=0;u<s.length;u++){var c=s[u];if(c.strict()||a[c.name()]){var f=c.satisfy(l,o,a);if(!f){var h="(enc) "+c.name();return a.verbose&&console.log(h+" failed with "+r.toShorthand()+" for "+t.name),h}}}return null}var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},o=e("vega-lite/src/channel"),a=e("vega-lite/src/scale"),s=e("vega-lite/src/type"),l=e("./base"),u=e("../property"),c=e("../enumspec"),f=e("../schema"),h=e("../util"),d=e("../query/encoding"),p=function(e){function t(t){e.call(this,t)}return r(t,e),t.prototype.hasAllRequiredPropertiesSpecific=function(e){return h.every(this.constraint.properties,function(t){var n=u.getNestedEncodingProperty(t);if(n){var i=n.parent,r=n.child;return!e[i]||!c.isEnumSpec(e[i][r])}return!e[t]||!c.isEnumSpec(e[t])})},t.prototype.satisfy=function(e,t,n){return!this.constraint.allowEnumSpecForProperties&&!this.hasAllRequiredPropertiesSpecific(e)||this.constraint.satisfy(e,t,n)},t}(l.AbstractConstraintModel);n.EncodingConstraintModel=p,n.ENCODING_CONSTRAINTS=[{name:"aggregateOpSupportedByType",description:"Aggregate function should be supported by data type.",properties:[u.Property.TYPE,u.Property.AGGREGATE],allowEnumSpecForProperties:!1,strict:!0,satisfy:function(e,t,n){return!e.aggregate||e.type!==s.Type.ORDINAL&&e.type!==s.Type.NOMINAL}},{name:"binAppliedForQuantitative",description:"bin should be applied to quantitative field only.",properties:[u.Property.TYPE,u.Property.BIN],allowEnumSpecForProperties:!1,strict:!0,satisfy:function(e,t,n){return!e.bin||e.type===s.Type.QUANTITATIVE}},{name:"channelSupportsRole",description:"encoding channel should support the role of the field",properties:[u.Property.CHANNEL,u.Property.TYPE,u.Property.BIN,u.Property.TIMEUNIT],allowEnumSpecForProperties:!0,strict:!0,satisfy:function(e,t,n){if(c.isEnumSpec(e.channel))return!0;var i=o.getSupportedRole(e.channel);return d.isDimension(e)?i.dimension:!d.isMeasure(e)||i.measure}},{name:"omitScaleZeroWithBinnedField",description:"Do not use scale zero with binned field",properties:[u.Property.SCALE,u.Property.SCALE_ZERO,u.Property.BIN],allowEnumSpecForProperties:!1,strict:!0,satisfy:function(e,t,n){return!e.bin||!e.scale||e.scale.zero!==!0}},{name:"onlyOneTypeOfFunction",description:"Only of of aggregate, autoCount, timeUnit, or bin should be applied at the same time.",properties:[u.Property.AGGREGATE,u.Property.AUTOCOUNT,u.Property.TIMEUNIT,u.Property.BIN],allowEnumSpecForProperties:!0,strict:!0,satisfy:function(e,t,n){var i=(!c.isEnumSpec(e.aggregate)&&e.aggregate?1:0)+(!c.isEnumSpec(e.autoCount)&&e.autoCount?1:0)+(!c.isEnumSpec(e.bin)&&e.bin?1:0)+(!c.isEnumSpec(e.timeUnit)&&e.timeUnit?1:0);
return i<=1}},{name:"timeUnitAppliedForTemporal",description:"Time unit should be applied to temporal field only.",properties:[u.Property.TYPE,u.Property.TIMEUNIT],allowEnumSpecForProperties:!1,strict:!0,satisfy:function(e,t,n){return!e.timeUnit||e.type===s.Type.TEMPORAL}},{name:"timeUnitShouldHaveVariation",description:"A particular time unit should be applied only if they produce unique values.",properties:[u.Property.TIMEUNIT,u.Property.TYPE],allowEnumSpecForProperties:!1,strict:!1,satisfy:function(e,t,n){return!e.timeUnit||e.type!==s.Type.TEMPORAL||t.timeUnitHasVariation(e)}},{name:"scalePropertiesSupportedByScaleType",description:"Scale properties must be supported by correct scale type",properties:u.SCALE_PROPERTIES.concat([u.Property.SCALE,u.Property.TYPE]),allowEnumSpecForProperties:!0,strict:!0,satisfy:function(e,t,n){if(e.scale){var i=e.scale,r=d.scaleType(e);if(void 0===r)return!0;for(var o in i)if(u.SUPPORTED_SCALE_PROPERTY_INDEX[o]&&!h.contains(u.SUPPORTED_SCALE_PROPERTY_INDEX[o],r))return!1}return!0}},{name:"typeMatchesPrimitiveType",description:"Data type should be supported by field's primitive type.",properties:[u.Property.FIELD,u.Property.TYPE],allowEnumSpecForProperties:!1,strict:!0,satisfy:function(e,t,n){var i=t.primitiveType(e.field),r=e.type;switch(i){case f.PrimitiveType.BOOLEAN:case f.PrimitiveType.STRING:return r!==s.Type.QUANTITATIVE&&r!==s.Type.TEMPORAL;case f.PrimitiveType.NUMBER:case f.PrimitiveType.INTEGER:return r!==s.Type.TEMPORAL;case f.PrimitiveType.DATE:return r===s.Type.TEMPORAL;case null:return!1}throw new Error("Not implemented")}},{name:"typeMatchesSchemaType",description:"Enumerated data type of a field should match the field's type in the schema.",properties:[u.Property.FIELD,u.Property.TYPE],allowEnumSpecForProperties:!1,strict:!1,satisfy:function(e,t,n){return t.type(e.field)===e.type}},{name:"maxCardinalityForCategoricalColor",description:"Categorical channel should not have too high cardinality",properties:[u.Property.CHANNEL,u.Property.FIELD],allowEnumSpecForProperties:!1,strict:!1,satisfy:function(e,t,n){return e.channel!==o.Channel.COLOR||e.type!==s.Type.NOMINAL||t.cardinality(e)<=n.maxCardinalityForCategoricalColor}},{name:"maxCardinalityForFacet",description:"Row/column channel should not have too high cardinality",properties:[u.Property.CHANNEL,u.Property.FIELD,u.Property.BIN,u.Property.TIMEUNIT],allowEnumSpecForProperties:!1,strict:!1,satisfy:function(e,t,n){return e.channel!==o.Channel.ROW&&e.channel!==o.Channel.COLUMN||t.cardinality(e)<=n.maxCardinalityForFacet}},{name:"maxCardinalityForShape",description:"Shape channel should not have too high cardinality",properties:[u.Property.CHANNEL,u.Property.FIELD,u.Property.BIN,u.Property.TIMEUNIT],allowEnumSpecForProperties:!1,strict:!1,satisfy:function(e,t,n){return e.channel!==o.Channel.SHAPE||t.cardinality(e)<=n.maxCardinalityForShape}},{name:"dataTypeAndFunctionMatchScaleType",description:"Scale type must match data type",properties:[u.Property.TYPE,u.Property.SCALE,u.Property.SCALE_TYPE,u.Property.TIMEUNIT,u.Property.BIN],allowEnumSpecForProperties:!1,strict:!0,satisfy:function(e,t,n){if(e.scale){var i=e.type,r=d.scaleType(e);if(h.contains([s.Type.ORDINAL,s.Type.NOMINAL],i))return h.contains([a.ScaleType.ORDINAL,void 0],r);if(i===s.Type.TEMPORAL)return e.timeUnit?h.contains([a.ScaleType.TIME,a.ScaleType.UTC,a.ScaleType.ORDINAL,void 0],r):h.contains([a.ScaleType.TIME,a.ScaleType.UTC,void 0],r);if(i===s.Type.QUANTITATIVE)return e.bin?h.contains([a.ScaleType.LINEAR,void 0],r):h.contains([a.ScaleType.LOG,a.ScaleType.POW,a.ScaleType.SQRT,a.ScaleType.QUANTILE,a.ScaleType.QUANTIZE,a.ScaleType.LINEAR,void 0],r)}return!0}}].map(function(e){return new p(e)}),n.ENCODING_CONSTRAINT_INDEX=n.ENCODING_CONSTRAINTS.reduce(function(e,t){return e[t.name()]=t,e},{}),n.ENCODING_CONSTRAINTS_BY_PROPERTY=n.ENCODING_CONSTRAINTS.reduce(function(e,t){return t.properties().forEach(function(n){e[n]=e[n]||[],e[n].push(t)}),e},{}),n.checkEncoding=i},{"../enumspec":16,"../property":21,"../query/encoding":22,"../schema":34,"../util":36,"./base":10,"vega-lite/src/channel":45,"vega-lite/src/scale":51,"vega-lite/src/type":55}],13:[function(e,t,n){"use strict";function i(e,t,i,r,o){for(var a=n.SPEC_CONSTRAINTS_BY_PROPERTY[e]||[],s=0;s<a.length;s++){var l=a[s];if(l.strict()||o[l.name()]){var u=l.satisfy(i,r,o);if(!u){var c="(spec) "+l.name();return o.verbose&&console.log(c+" failed with "+i.toShorthand()+" for "+t.name),c}}}return null}var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},o=e("vega-lite/src/aggregate"),a=e("vega-lite/src/channel"),s=e("vega-lite/src/mark"),l=e("vega-lite/src/scale"),u=e("vega-lite/src/type"),c=e("./base"),f=e("../enumspec"),h=e("../property"),d=e("../query/encoding"),p=e("../util"),g=e("../query/encoding"),m=a.NONSPATIAL_CHANNELS.reduce(function(e,t){return e[t]=!0,e},{}),v=function(e){function t(t){e.call(this,t)}return r(t,e),t.prototype.hasAllRequiredPropertiesSpecific=function(e){return p.every(this.constraint.properties,function(t){if(t===h.Property.MARK)return!f.isEnumSpec(e.getMark());var n=h.getNestedEncodingProperty(t);if(n){var i=n.parent,r=n.child;return p.every(e.getEncodings(),function(e){return!e[i]||!f.isEnumSpec(e[i][r])})}if(!h.isEncodingProperty(t))throw new Error("UNIMPLEMENTED");return p.every(e.getEncodings(),function(e){return!e[t]||!f.isEnumSpec(e[t])})})},t.prototype.satisfy=function(e,t,n){return!this.constraint.allowEnumSpecForProperties&&!this.hasAllRequiredPropertiesSpecific(e)||this.constraint.satisfy(e,t,n)},t}(c.AbstractConstraintModel);n.SpecConstraintModel=v,n.SPEC_CONSTRAINTS=[{name:"noRepeatedChannel",description:"Each encoding channel should only be used once.",properties:[h.Property.CHANNEL],allowEnumSpecForProperties:!0,strict:!0,satisfy:function(e,t,n){var i={};return p.every(e.getEncodings(),function(e){return!!f.isEnumSpec(e.channel)||!i[e.channel]&&(i[e.channel]=!0,!0)})}},{name:"alwaysIncludeZeroInScaleWithBarMark",description:"Do not recommend bar mark if scale does not start at zero",properties:[h.Property.MARK,h.Property.SCALE,h.Property.SCALE_ZERO,h.Property.CHANNEL,h.Property.TYPE],allowEnumSpecForProperties:!1,strict:!0,satisfy:function(e,t,n){var i=e.getMark(),r=e.getEncodings();if(i===s.Mark.BAR)for(var o=0,l=r;o<l.length;o++){var c=l[o];if((c.channel===a.Channel.X||c.channel===a.Channel.Y)&&c.type===u.Type.QUANTITATIVE&&c.scale&&c.scale.zero===!1)return!1}return!0}},{name:"autoAddCount",description:"Automatically adding count only for plots with only ordinal, binned quantitative, or temporal with timeunit fields.",properties:[h.Property.BIN,h.Property.TIMEUNIT,h.Property.TYPE,h.Property.AUTOCOUNT],allowEnumSpecForProperties:!0,strict:!1,satisfy:function(e,t,n){var i=p.some(e.getEncodings(),function(e){return e.autoCount===!0});if(i)return p.every(e.getEncodings(),function(e){if(void 0!==e.autoCount)return!0;switch(e.type){case u.Type.QUANTITATIVE:return!!e.bin;case u.Type.TEMPORAL:return!!e.timeUnit;case u.Type.ORDINAL:case u.Type.NOMINAL:return!0}throw new Error("Unsupported Type")});var r=p.every(e.enumSpecIndex.encodingIndicesByProperty.autoCount,function(t){return!f.isEnumSpec(e.getEncodingQueryByIndex(t).autoCount)});return!r||p.some(e.getEncodings(),function(e){return e.type===u.Type.QUANTITATIVE?e.autoCount!==!1&&(!e.bin||f.isEnumSpec(e.bin)):e.type===u.Type.TEMPORAL&&(!e.timeUnit||f.isEnumSpec(e.timeUnit))})}},{name:"channelPermittedByMarkType",description:"Each encoding channel should be supported by the mark type",properties:[h.Property.CHANNEL,h.Property.MARK],allowEnumSpecForProperties:!0,strict:!0,satisfy:function(e,t,n){var i=e.getMark();return!!f.isEnumSpec(i)||p.every(e.getEncodings(),function(e){return!!f.isEnumSpec(e.channel)||a.supportMark(e.channel,i)})}},{name:"hasAllRequiredChannelsForMark",description:"All required channels for the specified mark should be specified",properties:[h.Property.CHANNEL,h.Property.MARK],allowEnumSpecForProperties:!1,strict:!0,satisfy:function(e,t,n){var i=e.getMark();switch(i){case s.Mark.AREA:case s.Mark.LINE:return e.channelUsed(a.Channel.X)&&e.channelUsed(a.Channel.Y);case s.Mark.TEXT:return e.channelUsed(a.Channel.TEXT);case s.Mark.BAR:case s.Mark.CIRCLE:case s.Mark.SQUARE:case s.Mark.TICK:case s.Mark.RULE:return e.channelUsed(a.Channel.X)||e.channelUsed(a.Channel.Y);case s.Mark.POINT:return!e.enumSpecIndex.hasProperty(h.Property.CHANNEL)||e.channelUsed(a.Channel.X)||e.channelUsed(a.Channel.Y)}throw new Error("hasAllRequiredChannelsForMark not implemented for mark"+i)}},{name:"omitAggregate",description:"Omit aggregate plots.",properties:[h.Property.AGGREGATE,h.Property.AUTOCOUNT],allowEnumSpecForProperties:!0,strict:!1,satisfy:function(e,t,n){return!e.isAggregate()}},{name:"omitAggregatePlotWithDimensionOnlyOnFacet",description:"All required channels for the specified mark should be specified",properties:[h.Property.CHANNEL,h.Property.AGGREGATE,h.Property.AUTOCOUNT],allowEnumSpecForProperties:!1,strict:!1,satisfy:function(e,t,n){if(e.isAggregate()){var i=!1,r=!1,o=!1;if(e.specQuery.encodings.forEach(function(t,n){t.autoCount!==!1&&(t.aggregate||t.autoCount||(r=!0,p.contains([a.Channel.ROW,a.Channel.COLUMN],t.channel)?e.enumSpecIndex.hasEncodingProperty(n,h.Property.CHANNEL)&&(o=!0):i=!0))}),r&&!i&&(o||n.constraintManuallySpecifiedValue))return!1}return!0}},{name:"omitAggregatePlotWithoutDimension",description:"Aggregate plots without dimension should be omitted",properties:[h.Property.AGGREGATE,h.Property.AUTOCOUNT,h.Property.BIN,h.Property.TIMEUNIT,h.Property.TYPE],allowEnumSpecForProperties:!1,strict:!1,satisfy:function(e,t,n){return!e.isAggregate()||p.some(e.getEncodings(),function(e){return!!d.isDimension(e)})}},{name:"omitBarLineAreaWithOcclusion",description:"Don't use bar, line or area to visualize raw plot as they often lead to occlusion.",properties:[h.Property.MARK,h.Property.AGGREGATE,h.Property.AUTOCOUNT],allowEnumSpecForProperties:!1,strict:!1,satisfy:function(e,t,n){return!p.contains([s.Mark.BAR,s.Mark.LINE,s.Mark.AREA],e.getMark())||e.isAggregate()}},{name:"omitBarTickWithSize",description:"Do not map field to size channel with bar and tick mark",properties:[h.Property.CHANNEL,h.Property.MARK],allowEnumSpecForProperties:!0,strict:!1,satisfy:function(e,t,n){var i=e.getMark();if(p.contains([s.Mark.TICK,s.Mark.BAR],i)&&e.channelUsed(a.Channel.SIZE)){if(n.constraintManuallySpecifiedValue)return!1;for(var r=e.specQuery.encodings,o=0;o<r.length;o++){var l=r[o];if(l.channel===a.Channel.SIZE)return!e.enumSpecIndex.hasEncodingProperty(o,h.Property.CHANNEL)}}return!0}},{name:"omitBarAreaForLogScale",description:"Do not use bar and area mark for x and y's log scale",properties:[h.Property.MARK,h.Property.CHANNEL,h.Property.SCALE,h.Property.SCALE_TYPE,h.Property.TYPE],allowEnumSpecForProperties:!1,strict:!0,satisfy:function(e,t,n){var i=e.getMark(),r=e.getEncodings();if(i===s.Mark.AREA||i===s.Mark.BAR)for(var o=0,u=r;o<u.length;o++){var c=u[o];if((c.channel===a.Channel.X||c.channel===a.Channel.Y)&&c.scale){var f=g.scaleType(c);if(f===l.ScaleType.LOG)return!1}}return!0}},{name:"omitMultipleNonPositionalChannels",description:"Unless manually specified, do not use multiple non-positional encoding channel to avoid over-encoding.",properties:[h.Property.CHANNEL],allowEnumSpecForProperties:!0,strict:!1,satisfy:function(e,t,n){for(var i=e.specQuery.encodings,r=0,o=!1,a=0;a<i.length;a++){var s=i[a];if(s.autoCount!==!1){var l=s.channel;if(!f.isEnumSpec(l)&&m[l]&&(r+=1,e.enumSpecIndex.hasEncodingProperty(a,h.Property.CHANNEL)&&(o=!0),r>1&&(o||n.constraintManuallySpecifiedValue)))return!1}}return!0}},{name:"omitNonPositionalOrFacetOverPositionalChannels",description:"Do not use non-positional channels unless all positional channels are used",properties:[h.Property.CHANNEL],allowEnumSpecForProperties:!1,strict:!1,satisfy:function(e,t,n){for(var i=e.specQuery.encodings,r=!1,o=!1,s=!1,l=!1,u=0;u<i.length;u++){var c=i[u];if(c.autoCount!==!1){var d=c.channel;d===a.Channel.X?s=!0:d===a.Channel.Y?l=!0:f.isEnumSpec(d)||(r=!0,e.enumSpecIndex.hasEncodingProperty(u,h.Property.CHANNEL)&&(o=!0))}}return!(o||n.constraintManuallySpecifiedValue&&r)||s&&l}},{name:"omitRaw",description:"Omit raw plots.",properties:[h.Property.AGGREGATE,h.Property.AUTOCOUNT],allowEnumSpecForProperties:!1,strict:!1,satisfy:function(e,t,n){return!!e.isAggregate()}},{name:"omitRawContinuousFieldForAggregatePlot",description:"Aggregate plot should not use raw continuous field as group by values. (Quantitative should be binned. Temporal should have time unit.)",properties:[h.Property.AGGREGATE,h.Property.AUTOCOUNT,h.Property.TIMEUNIT,h.Property.BIN,h.Property.TYPE],allowEnumSpecForProperties:!0,strict:!1,satisfy:function(e,t,n){if(e.isAggregate())for(var i=e.specQuery.encodings,r=0;r<i.length;r++){var o=i[r];if(o.autoCount!==!1){if(o.type===u.Type.TEMPORAL&&!o.timeUnit&&(e.enumSpecIndex.hasEncodingProperty(r,h.Property.TIMEUNIT)||n.constraintManuallySpecifiedValue))return!1;if(o.type===u.Type.QUANTITATIVE&&!o.bin&&!o.aggregate&&!o.autoCount){if(e.enumSpecIndex.hasEncodingProperty(r,h.Property.BIN)||e.enumSpecIndex.hasEncodingProperty(r,h.Property.AGGREGATE)||e.enumSpecIndex.hasEncodingProperty(r,h.Property.AUTOCOUNT))return!1;if(n.constraintManuallySpecifiedValue)return!1}}}return!0}},{name:"omitRawDetail",description:"Do not use detail channel with raw plot.",properties:[h.Property.CHANNEL,h.Property.AGGREGATE,h.Property.AUTOCOUNT],allowEnumSpecForProperties:!1,strict:!0,satisfy:function(e,t,n){return!!e.isAggregate()||p.every(e.specQuery.encodings,function(t,i){return t.autoCount===!1||(t.channel!==a.Channel.DETAIL||!e.enumSpecIndex.hasEncodingProperty(i,h.Property.CHANNEL)&&!n.constraintManuallySpecifiedValue)})}},{name:"omitRepeatedField",description:"Each field should be mapped to only one channel",properties:[h.Property.FIELD],allowEnumSpecForProperties:!0,strict:!1,satisfy:function(e,t,n){var i={};return p.every(e.getEncodings(),function(e){return!(e.field&&!f.isEnumSpec(e.field))||!i[e.field]&&(i[e.field]=!0,!0)})}},{name:"omitVerticalDotPlot",description:"Do not output vertical dot plot.",properties:[h.Property.CHANNEL],allowEnumSpecForProperties:!0,strict:!1,satisfy:function(e,t,n){var i=e.getEncodings();return 1!==i.length||i[0].channel!==a.Channel.Y}},{name:"hasAppropriateGraphicTypeForMark",description:"Has appropriate graphic type for mark",properties:[h.Property.CHANNEL,h.Property.MARK,h.Property.TYPE,h.Property.TIMEUNIT,h.Property.BIN,h.Property.AGGREGATE,h.Property.AUTOCOUNT],allowEnumSpecForProperties:!1,strict:!1,satisfy:function(e,t,n){var i=e.getMark();switch(i){case s.Mark.AREA:case s.Mark.LINE:if(e.isAggregate()){var r=e.getEncodingQueryByChannel(a.Channel.X),o=e.getEncodingQueryByChannel(a.Channel.Y),l=r&&g.isMeasure(r),c=o&&g.isMeasure(o);return r&&o&&l!==c&&!(!l&&r.type===u.Type.NOMINAL)&&!(!c&&o.type===u.Type.NOMINAL)}return!0;case s.Mark.TEXT:return!0;case s.Mark.BAR:case s.Mark.TICK:return!e.channelUsed(a.Channel.SIZE)&&e.isMeasure(a.Channel.X)!==e.isMeasure(a.Channel.Y);case s.Mark.CIRCLE:case s.Mark.POINT:case s.Mark.SQUARE:case s.Mark.RULE:return!0}throw new Error("hasAllRequiredChannelsForMark not implemented for mark"+i)}},{name:"omitNonLinearScaleTypeWithStack",description:"Stacked plot should only use linear scale",properties:[h.Property.CHANNEL,h.Property.MARK,h.Property.AGGREGATE,h.Property.AUTOCOUNT,h.Property.SCALE,h.Property.SCALE_TYPE,h.Property.TYPE],allowEnumSpecForProperties:!1,strict:!0,satisfy:function(e,t,n){var i=e.stack();if(i)for(var r=0,o=e.getEncodings();r<o.length;r++){var s=o[r];if((s.aggregate||s.autoCount===!0)&&s.type===u.Type.QUANTITATIVE&&p.contains([a.Channel.X,a.Channel.Y],s.channel)&&g.scaleType(s)!==l.ScaleType.LINEAR)return!1}return!0}},{name:"omitNonSumStack",description:"Stacked plot should use summative aggregation such as sum, count, or distinct",properties:[h.Property.CHANNEL,h.Property.MARK,h.Property.AGGREGATE,h.Property.AUTOCOUNT],allowEnumSpecForProperties:!1,strict:!1,satisfy:function(e,t,n){var i=e.stack();if(i){var r=e.getEncodingQueryByChannel(i.fieldChannel);return p.contains(o.SUM_OPS,r.aggregate)||!!r.autoCount}return!0}},{name:"omitTableWithOcclusionIfAutoAddCount",description:"Plots without aggregation or autocount where x and y are both dimensions should be omitted if autoAddCount is enabled as they often lead to occlusion",properties:[h.Property.CHANNEL,h.Property.TYPE,h.Property.TIMEUNIT,h.Property.BIN,h.Property.AGGREGATE,h.Property.AUTOCOUNT],allowEnumSpecForProperties:!1,strict:!1,satisfy:function(e,t,n){return!(n.autoAddCount&&e.isDimension(a.Channel.X)&&e.isDimension(a.Channel.Y)&&!e.isAggregate())}}].map(function(e){return new v(e)}),n.SPEC_CONSTRAINT_INDEX=n.SPEC_CONSTRAINTS.reduce(function(e,t){return e[t.name()]=t,e},{}),n.SPEC_CONSTRAINTS_BY_PROPERTY=n.SPEC_CONSTRAINTS.reduce(function(e,t){return t.properties().forEach(function(n){e[n]=e[n]||[],e[n].push(t)}),e},{}),n.checkSpec=i},{"../enumspec":16,"../property":21,"../query/encoding":22,"../util":36,"./base":10,"vega-lite/src/aggregate":42,"vega-lite/src/channel":45,"vega-lite/src/mark":50,"vega-lite/src/scale":51,"vega-lite/src/type":55}],14:[function(e,t,n){"use strict";n.version="0.5.3";var i=e("./util");n.constraint=e("./constraint/constraint"),n.enumerate=e("./enumerator"),n.enumSpec=e("./enumspec");var r=e("./generate");n.generate=r.generate,n.model=e("./model"),n.nest=e("./nest"),n.property=e("./property");var o=e("./query/query"),a=e("./query/query");n.query=i.extend(a.query,o),n.ranking=e("./ranking/ranking"),n.schema=e("./schema"),n.util=e("./util")},{"./constraint/constraint":11,"./enumerator":15,"./enumspec":16,"./generate":18,"./model":19,"./nest":20,"./property":21,"./query/query":24,"./ranking/ranking":33,"./schema":34,"./util":36}],15:[function(e,t,n){"use strict";function i(e){return function(t,n,i){return function(a,s){function l(c){if(c===u.length)return void a.push(s.duplicate());var f=u[c],h=t.encodings[f][e],d=s.getEncodingQueryByIndex(f),p=s.getEncodingProperty(f,e);d.autoCount!==!1&&p?(h["enum"].forEach(function(t){null===t&&(t=void 0),s.setEncodingProperty(f,e,t,h);var a=r.checkEncoding(e,h,f,s,n,i);if(!a){var u=o.checkSpec(e,h,s,n,i);u||l(c+1)}}),s.resetEncodingProperty(f,e,h)):l(c+1)}var u=t.encodingIndicesByProperty[e];return l(0),a}}}var r=e("./constraint/encoding"),o=e("./constraint/spec"),a=e("./property");n.ENUMERATOR_INDEX={},n.ENUMERATOR_INDEX[a.Property.MARK]=function(e,t,n){return function(i,r){var s=r.getMark();return s["enum"].forEach(function(s){r.setMark(s);var l=o.checkSpec(a.Property.MARK,e.mark,r,t,n);l||i.push(r.duplicate())}),r.resetMark(),i}},a.ENCODING_PROPERTIES.forEach(function(e){n.ENUMERATOR_INDEX[e]=i(e)}),a.NESTED_ENCODING_PROPERTIES.forEach(function(e){n.ENUMERATOR_INDEX[e.property]=i(e.property)}),n.EncodingPropertyGeneratorFactory=i},{"./constraint/encoding":12,"./constraint/spec":13,"./property":21}],16:[function(e,t,n){"use strict";function i(e){return e===n.SHORT_ENUM_SPEC||void 0!==e&&(!!e["enum"]||!!e.name)&&!o.isArray(e)}function r(e,t,i){return o.extend({},{name:t,"enum":i},e===n.SHORT_ENUM_SPEC?{}:e)}var o=e("./util");!function(e){e[e.ENUMSPEC="?"]="ENUMSPEC"}(n.ShortEnumSpec||(n.ShortEnumSpec={}));var a=n.ShortEnumSpec;n.SHORT_ENUM_SPEC=a.ENUMSPEC,n.isEnumSpec=i,n.initEnumSpec=r},{"./util":36}],17:[function(e,t,n){"use strict";var i=e("./property"),r=e("./util"),o=function(){function e(){this._mark=void 0,this._encodings={},this._encodingIndicesByProperty={}}return e.prototype.setEncodingProperty=function(e,t,n){var i=this._encodings,r=i[e]=i[e]||{};r[t]=n;var o=this._encodingIndicesByProperty;return(o[t]=o[t]||[]).push(e),this},e.prototype.hasEncodingProperty=function(e,t){return!!(this._encodings[e]||{})[t]},e.prototype.hasProperty=function(e){if(i.isEncodingProperty(e))return!!this.encodingIndicesByProperty[e];if(e===i.Property.MARK)return!!this.mark;throw new Error("Unimplemented for property "+e)},e.prototype.isEmpty=function(){return!this.mark&&0===r.keys(this.encodingIndicesByProperty).length},e.prototype.setMark=function(e){return this._mark=e,this},Object.defineProperty(e.prototype,"mark",{get:function(){return this._mark},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"encodings",{get:function(){return this._encodings},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"encodingIndicesByProperty",{get:function(){return this._encodingIndicesByProperty},enumerable:!0,configurable:!0}),e}();n.EnumSpecIndex=o},{"./property":21,"./util":36}],18:[function(e,t,n){"use strict";function i(e,t,n){void 0===n&&(n=o.DEFAULT_QUERY_CONFIG);var i=a.SpecQueryModel.build(e,t,n),l=i.enumSpecIndex,u=[i];return n.propertyPrecedence.forEach(function(e){if(l.hasProperty(e)){var i=r.ENUMERATOR_INDEX[e](l,t,n);u=u.reduce(i,[])}}),null!==n.nominalColorScaleForHighCardinality||null!==n.smallBandSizeForHighCardinalityOrFacet||null!==n.xAxisOnTopForHighYCardinalityWithoutColumn?s.stylize(u,t,n):u}var r=e("../src/enumerator"),o=e("./config"),a=e("./model"),s=e("./stylize");n.generate=i},{"../src/enumerator":15,"./config":9,"./model":19,"./stylize":35}],19:[function(e,t,n){"use strict";function i(e){switch(e){case s.Property.MARK:return"m";case s.Property.CHANNEL:return"c";case s.Property.AGGREGATE:return"a";case s.Property.AUTOCOUNT:return"#";case s.Property.BIN:return"b";case s.Property.BIN_MAXBINS:return"b-mb";case s.Property.SORT:return"so";case s.Property.SORT_FIELD:return"so-f";case s.Property.SORT_OP:return"so-op";case s.Property.SORT_ORDER:return"so-or";case s.Property.SCALE:return"s";case s.Property.SCALE_BANDSIZE:return"s-bs";case s.Property.SCALE_CLAMP:return"s-c";case s.Property.SCALE_DOMAIN:return"s-d";case s.Property.SCALE_EXPONENT:return"s-e";case s.Property.SCALE_NICE:return"s-n";case s.Property.SCALE_RANGE:return"s-ra";case s.Property.SCALE_ROUND:return"s-r";case s.Property.SCALE_TYPE:return"s-t";case s.Property.SCALE_USERAWDOMAIN:return"s-u";case s.Property.SCALE_ZERO:return"s-z";case s.Property.AXIS:return"ax";case s.Property.AXIS_AXISCOLOR:return"ax-ac";case s.Property.AXIS_AXISWIDTH:return"ax-aw";case s.Property.AXIS_LAYER:return"ax-lay";case s.Property.AXIS_OFFSET:return"ax-of";case s.Property.AXIS_ORIENT:return"ax-or";case s.Property.AXIS_GRID:return"ax-g";case s.Property.AXIS_GRIDCOLOR:return"ax-gc";case s.Property.AXIS_GRIDDASH:return"ax-gd";case s.Property.AXIS_GRIDOPACITY:return"ax-go";case s.Property.AXIS_GRIDWIDTH:return"ax-gw";case s.Property.AXIS_LABELS:return"ax-lab";case s.Property.AXIS_FORMAT:return"ax-f";case s.Property.AXIS_LABELANGLE:return"ax-laba";case s.Property.AXIS_LABELMAXLENGTH:return"ax-labm";case s.Property.AXIS_SHORTTIMELABELS:return"ax-stl";case s.Property.AXIS_SUBDIVIDE:return"ax-sub";case s.Property.AXIS_TICKS:return"ax-t";case s.Property.AXIS_TICKCOLOR:return"ax-tc";case s.Property.AXIS_TICKLABELCOLOR:return"ax-tlc";case s.Property.AXIS_TICKLABELFONT:return"ax-tlf";case s.Property.AXIS_TICKLABELFONTSIZE:return"ax-tlfs";case s.Property.AXIS_TICKPADDING:return"ax-tp";case s.Property.AXIS_TICKSIZE:return"ax-ts";case s.Property.AXIS_TICKSIZEMAJOR:return"ax-tsma";case s.Property.AXIS_TICKSIZEMINOR:return"ax-tsmi";case s.Property.AXIS_TICKSIZEEND:return"ax-tse";case s.Property.AXIS_TICKWIDTH:return"ax-tw";case s.Property.AXIS_VALUES:return"ax-v";case s.Property.AXIS_TITLE:return"ax-ti";case s.Property.AXIS_TITLECOLOR:return"ax-tic";case s.Property.AXIS_TITLEFONT:return"ax-tif";case s.Property.AXIS_TITLEFONTSIZE:return"ax-tifs";case s.Property.AXIS_TITLEFONTWEIGHT:return"ax-tifw";case s.Property.AXIS_TITLEOFFSET:return"ax-tio";case s.Property.AXIS_TITLEMAXLENGTH:return"ax-timl";case s.Property.AXIS_CHARACTERWIDTH:return"ax-cw";case s.Property.LEGEND:return"l";case s.Property.LEGEND_ORIENT:return"l-or";case s.Property.LEGEND_OFFSET:return"l-of";case s.Property.LEGEND_VALUES:return"l-v";case s.Property.LEGEND_FORMAT:return"l-f";case s.Property.LEGEND_LABELALIGN:return"l-la";case s.Property.LEGEND_LABELBASELINE:return"l-lb";case s.Property.LEGEND_LABELCOLOR:return"l-lc";case s.Property.LEGEND_LABELFONT:return"l-lf";case s.Property.LEGEND_LABELFONTSIZE:return"l-lfs";case s.Property.LEGEND_SHORTTIMELABELS:return"l-stl";case s.Property.LEGEND_SYMBOLCOLOR:return"l-syc";case s.Property.LEGEND_SYMBOLSHAPE:return"l-sysh";case s.Property.LEGEND_SYMBOLSIZE:return"l-sysi";case s.Property.LEGEND_SYMBOLSTROKEWIDTH:return"l-sysw";case s.Property.LEGEND_TITLE:return"l-ti";case s.Property.LEGEND_TITLECOLOR:return"l-tic";case s.Property.LEGEND_TITLEFONT:return"l-tif";case s.Property.LEGEND_TITLEFONTSIZE:return"l-tifs";case s.Property.LEGEND_TITLEFONTWEIGHT:return"l-tifw";case s.Property.TIMEUNIT:return"tu";case s.Property.FIELD:return"f";case s.Property.TYPE:return"t"}throw new Error("Default name undefined")}function r(e,t,n){switch(e){case s.Property.FIELD:case s.Property.SORT_FIELD:return t.fields();case s.Property.AXIS:case s.Property.AXIS_GRID:case s.Property.AXIS_LABELS:case s.Property.AXIS_SHORTTIMELABELS:case s.Property.BIN:case s.Property.LEGEND:case s.Property.LEGEND_SHORTTIMELABELS:case s.Property.SCALE:case s.Property.SCALE_CLAMP:case s.Property.SCALE_NICE:case s.Property.SCALE_ROUND:case s.Property.SCALE_USERAWDOMAIN:case s.Property.SCALE_ZERO:case s.Property.AUTOCOUNT:return[!1,!0];case s.Property.AGGREGATE:return n.aggregates;case s.Property.AXIS_AXISCOLOR:return n.axisAxisColors;case s.Property.AXIS_AXISWIDTH:return n.axisAxisWidths;case s.Property.AXIS_LAYER:return n.axisLayers;case s.Property.AXIS_OFFSET:return n.axisOffsets;case s.Property.AXIS_ORIENT:return n.axisOrients;case s.Property.AXIS_GRIDCOLOR:return n.axisGridColors;case s.Property.AXIS_GRIDDASH:return n.axisGridDashes;case s.Property.AXIS_GRIDOPACITY:return n.axisGridOpacities;case s.Property.AXIS_GRIDWIDTH:return n.axisGridWidths;case s.Property.AXIS_FORMAT:return n.axisFormats;case s.Property.AXIS_LABELANGLE:return n.axisLabelAngles;case s.Property.AXIS_LABELMAXLENGTH:return n.axisLabelMaxLengths;case s.Property.AXIS_SUBDIVIDE:return n.axisSubDivides;case s.Property.AXIS_TICKS:return n.axisTicks;case s.Property.AXIS_TICKCOLOR:return n.axisTickColors;case s.Property.AXIS_TICKLABELCOLOR:return n.axisTickLabelColors;case s.Property.AXIS_TICKLABELFONT:return n.axisTickLabelFonts;case s.Property.AXIS_TICKLABELFONTSIZE:return n.axisTickLabelFontSizes;case s.Property.AXIS_TICKPADDING:return n.axisTickPaddings;case s.Property.AXIS_TICKSIZE:return n.axisTickSizes;case s.Property.AXIS_TICKSIZEMAJOR:return n.axisTickSizeMajors;case s.Property.AXIS_TICKSIZEMINOR:return n.axisTickSizeMinors;case s.Property.AXIS_TICKSIZEEND:return n.axisTickSizeEnds;case s.Property.AXIS_TICKWIDTH:return n.axisTickWidths;case s.Property.AXIS_VALUES:return n.axisValuesList;case s.Property.AXIS_TITLE:return n.axisTitles;case s.Property.AXIS_TITLECOLOR:return n.axisTitleColors;case s.Property.AXIS_TITLEFONT:return n.axisTitleFonts;case s.Property.AXIS_TITLEFONTWEIGHT:return n.axisTitleFontWeights;case s.Property.AXIS_TITLEFONTSIZE:return n.axisTitleFontSizes;case s.Property.AXIS_TITLEOFFSET:return n.axisTitleOffsets;case s.Property.AXIS_TITLEMAXLENGTH:return n.axisTitleMaxLengths;case s.Property.AXIS_CHARACTERWIDTH:return n.axisCharacterWidths;case s.Property.BIN_MAXBINS:return n.maxBinsList;case s.Property.CHANNEL:return n.channels;case s.Property.MARK:return n.marks;case s.Property.LEGEND_ORIENT:return n.legendOrients;case s.Property.LEGEND_OFFSET:return n.legendOffsets;case s.Property.LEGEND_VALUES:return n.legendValuesList;case s.Property.LEGEND_FORMAT:return n.legendFormats;case s.Property.LEGEND_LABELALIGN:return n.legendLabelAligns;case s.Property.LEGEND_LABELBASELINE:return n.legendLabelBaselines;case s.Property.LEGEND_LABELCOLOR:return n.legendLabelColors;case s.Property.LEGEND_LABELFONT:return n.legendLabelFonts;case s.Property.LEGEND_LABELFONTSIZE:return n.legendLabelFontSizes;case s.Property.LEGEND_SYMBOLCOLOR:return n.legendSymbolColors;case s.Property.LEGEND_SYMBOLSHAPE:return n.legendSymbolShapes;case s.Property.LEGEND_SYMBOLSIZE:return n.legendSymbolSizes;case s.Property.LEGEND_SYMBOLSTROKEWIDTH:return n.legendSymbolStrokeWidths;case s.Property.LEGEND_TITLE:return n.legendTitles;case s.Property.LEGEND_TITLECOLOR:return n.legendTitleColors;case s.Property.LEGEND_TITLEFONT:return n.legendTitleFonts;case s.Property.LEGEND_TITLEFONTSIZE:return n.legendTitleFontSizes;case s.Property.LEGEND_TITLEFONTWEIGHT:return n.legendTitleFontWeights;case s.Property.SORT:return n.sorts;case s.Property.SORT_OP:return n.sortOps;case s.Property.SORT_ORDER:return n.sortOrders;case s.Property.SCALE_BANDSIZE:return n.scaleBandSizes;case s.Property.SCALE_DOMAIN:return n.scaleDomains;case s.Property.SCALE_EXPONENT:return n.scaleExponents;case s.Property.SCALE_RANGE:return n.scaleRanges;case s.Property.SCALE_TYPE:return n.scaleTypes;case s.Property.TIMEUNIT:return n.timeUnits;case s.Property.TYPE:return n.types}throw new Error("No default enumValues for "+e)}var o=e("vega-lite/src/aggregate"),a=e("vega-lite/src/type"),s=e("./property"),l=e("./enumspec"),u=e("./enumspecindex"),c=e("./query/spec"),f=e("./query/encoding"),h=e("./query/shorthand"),d=e("./util");n.getDefaultName=i,n.getDefaultEnumValues=r;var p=function(){function e(e,t,n,i,r){this._rankingScore={},this._spec=e,this._channelCount=e.encodings.reduce(function(e,t){return l.isEnumSpec(t.channel)||t.autoCount===!1||(e[t.channel]=1),e},{}),this._enumSpecIndex=t,this._enumSpecAssignment=r,this._opt=i,this._schema=n}return e.build=function(t,n,o){var c=new u.EnumSpecIndex;if(l.isEnumSpec(t.mark)){var f=i(s.Property.MARK);t.mark=l.initEnumSpec(t.mark,f,o.marks),c.setMark(t.mark)}if(t.encodings.forEach(function(e,t){void 0!==e.autoCount&&(console.warn("A field with autoCount should not be included as autoCount meant to be an internal object."),e.type=a.Type.QUANTITATIVE),void 0===e.type&&(e.type=l.SHORT_ENUM_SPEC),s.ENCODING_PROPERTIES.forEach(function(a){if(l.isEnumSpec(e[a])){var s=i(a)+t,u=r(a,n,o),f=e[a]=l.initEnumSpec(e[a],s,u);c.setEncodingProperty(t,a,f)}}),s.NESTED_ENCODING_PROPERTIES.forEach(function(a){var s=e[a.parent];if(s){var u=a.property,f=a.child;if(l.isEnumSpec(s[f])){var h=i(u)+t,d=r(u,n,o),p=s[f]=l.initEnumSpec(s[f],h,d);c.setEncodingProperty(t,u,p)}}})}),o.autoAddCount){var h={channel:{name:i(s.Property.CHANNEL)+t.encodings.length,"enum":r(s.Property.CHANNEL,n,o)},autoCount:{name:i(s.Property.AUTOCOUNT)+t.encodings.length,"enum":[!1,!0]},type:a.Type.QUANTITATIVE};t.encodings.push(h);var d=t.encodings.length-1;c.setEncodingProperty(d,s.Property.CHANNEL,h.channel),c.setEncodingProperty(d,s.Property.AUTOCOUNT,h.autoCount)}return new e(t,c,n,o,{})},Object.defineProperty(e.prototype,"enumSpecIndex",{get:function(){return this._enumSpecIndex},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return this._schema},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"specQuery",{get:function(){return this._spec},enumerable:!0,configurable:!0}),e.prototype.duplicate=function(){return new e(d.duplicate(this._spec),this._enumSpecIndex,this._schema,this._opt,d.duplicate(this._enumSpecAssignment))},e.prototype.setMark=function(e){var t=this._spec.mark.name;this._enumSpecAssignment[t]=this._spec.mark=e},e.prototype.resetMark=function(){var e=this._spec.mark=this._enumSpecIndex.mark;delete this._enumSpecAssignment[e.name]},e.prototype.getMark=function(){return this._spec.mark},e.prototype.getEncodingProperty=function(e,t){var n=this._spec.encodings[e],i=s.getNestedEncodingProperty(t);return i?n[i.parent][i.child]:n[t]},e.prototype.setEncodingProperty=function(e,t,n,i){var r=this._spec.encodings[e],o=s.getNestedEncodingProperty(t);t===s.Property.CHANNEL&&r.channel&&!l.isEnumSpec(r.channel)&&this._channelCount[r.channel]--,o?r[o.parent][o.child]=n:s.hasNestedProperty(t)&&n===!0?r[t]=d.extend({},r[t],{
"enum":void 0,name:void 0}):r[t]=n,this._enumSpecAssignment[i.name]=n,t===s.Property.CHANNEL&&(this._channelCount[n]=(this._channelCount[n]||0)+1)},e.prototype.resetEncodingProperty=function(e,t,n){var i=this._spec.encodings[e],r=s.getNestedEncodingProperty(t);t===s.Property.CHANNEL&&this._channelCount[i.channel]--,r?i[r.parent][r.child]=n:i[t]=n,delete this._enumSpecAssignment[n.name]},e.prototype.channelUsed=function(e){return this._channelCount[e]>0},e.prototype.stack=function(){return c.stack(this._spec)},e.prototype.getEncodings=function(){return this._spec.encodings.filter(function(e){return e.autoCount!==!1})},e.prototype.getEncodingQueryByChannel=function(e){for(var t=0;t<this._spec.encodings.length;t++)if(this._spec.encodings[t].channel===e)return this._spec.encodings[t]},e.prototype.getEncodingQueryByIndex=function(e){return this._spec.encodings[e]},e.prototype.isDimension=function(e){var t=this.getEncodingQueryByChannel(e);return t&&f.isDimension(t)},e.prototype.isMeasure=function(e){var t=this.getEncodingQueryByChannel(e);return t&&f.isMeasure(t)},e.prototype.isAggregate=function(){return c.isAggregate(this._spec)},e.prototype.toShorthand=function(){return h.spec(this._spec)},e.prototype._encoding=function(){for(var e={},t=0;t<this._spec.encodings.length;t++){var n=this._spec.encodings[t],i={};if(n.autoCount===!0)i.aggregate=o.AggregateOp.COUNT,i.field="*",i.type=a.Type.QUANTITATIVE;else if(n.autoCount===!1)continue;if(l.isEnumSpec(n.channel))return null;for(var r=[s.Property.AGGREGATE,s.Property.BIN,s.Property.TIMEUNIT,s.Property.FIELD,s.Property.TYPE,s.Property.SCALE,s.Property.SORT,s.Property.AXIS,s.Property.LEGEND],u=0;u<r.length;u++){var c=r[u];if(l.isEnumSpec(n[c]))return null;void 0!==n[c]&&(h.PROPERTY_SUPPORTED_CHANNELS[c]&&!h.PROPERTY_SUPPORTED_CHANNELS[c][n.channel]||(i[c]=n[c]))}i.bin===!1&&delete i.bin,e[n.channel]=i}return e},e.prototype.toSpec=function(e){if(l.isEnumSpec(this._spec.mark))return null;var t={};return e=e||this._spec.data,e&&(t.data=e),this._spec.transform&&(t.transform=this._spec.transform),t.mark=this._spec.mark,t.encoding=this._encoding(),null===t.encoding?null:((this._spec.config||this._opt.defaultSpecConfig)&&(t.config=d.extend({},this._opt.defaultSpecConfig,this._spec.config)),t)},e.prototype.getRankingScore=function(e){return this._rankingScore[e]},e.prototype.setRankingScore=function(e,t){this._rankingScore[e]=t},e}();n.SpecQueryModel=p;var g=function(){function e(e,t,n,i,r){void 0===e&&(e=""),void 0===t&&(t=""),void 0===n&&(n=[]),void 0===i&&(i=void 0),void 0===r&&(r=void 0),this._name=e,this._path=t,this._items=n,this._groupBy=i,this._orderGroupBy=r}return e.prototype.getTopSpecQueryModel=function(){var t=this._items[0];return t instanceof e?t.getTopSpecQueryModel():t},Object.defineProperty(e.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return this._items},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"groupBy",{get:function(){return this._groupBy},set:function(e){this._groupBy=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"orderGroupBy",{get:function(){return this._orderGroupBy},set:function(e){this._orderGroupBy=e},enumerable:!0,configurable:!0}),e}();n.SpecQueryModelGroup=g},{"./enumspec":16,"./enumspecindex":17,"./property":21,"./query/encoding":22,"./query/shorthand":25,"./query/spec":26,"./util":36,"vega-lite/src/aggregate":42,"vega-lite/src/type":55}],20:[function(e,t,n){"use strict";function i(e,t){g[e]=t}function r(e,t){if(t.nest){for(var n=new c.SpecQueryModelGroup,i={},r=[],o=[],a=[],s=function(e){r.push(e>0?f.duplicate(r[e-1]):{}),o.push(e>0?f.duplicate(o[e-1]):{});var n=t.nest[e].groupBy;if(l.isArray(n)){n.forEach(function(t){h.isExtendedGroupBy(t)?(r[e][t.property]=!0,o[e][t.property]=t.replace):r[e][t]=!0});var i=f.keys(o[e]).reduce(function(t,n){return t[n]=d.getReplacer(o[e][n]),t},{});a.push(i)}},u=0;u<t.nest.length;u++)s(u);return e.forEach(function(e){for(var o="",s=n,u=0;u<t.nest.length;u++){var f=s.groupBy=t.nest[u].groupBy;s.orderGroupBy=t.nest[u].orderGroupBy;var h=l.isArray(f)?d.spec(e.specQuery,r[u],a[u]):g[f](e);o+="/"+h,i[o]||(i[o]=new c.SpecQueryModelGroup(h,o,[]),s.items.push(i[o])),s=i[o]}s.items.push(e)}),n}return new c.SpecQueryModelGroup("","",e)}function o(e){if(u.isEnumSpec(e))return u.SHORT_ENUM_SPEC+"";var t=e;switch(t){case s.Channel.X:case s.Channel.Y:return"xy";case s.Channel.ROW:case s.Channel.COLUMN:return"facet";case s.Channel.COLOR:case s.Channel.SIZE:case s.Channel.SHAPE:case s.Channel.OPACITY:return"non-xy";case s.Channel.TEXT:case s.Channel.DETAIL:case s.Channel.PATH:case s.Channel.ORDER:return t+"";default:return console.warn("channel type not implemented for "+t),t+""}}function a(e){var t=p.stack(e.specQuery);return t?"stack="+t.offset+"|":""}var s=e("vega-lite/src/channel"),l=e("datalib/src/util"),u=e("./enumspec"),c=e("./model"),f=e("./util"),h=e("./query/groupby"),d=e("./query/shorthand"),p=e("./query/spec"),g={};n.registerKeyFn=i,n.FIELD="field",n.FIELD_TRANSFORM="fieldTransform",n.ENCODING="encoding",n.TRANSPOSE="transpose",n.SPEC="spec",n.nest=r,i(n.FIELD,function(e){return e.getEncodings().map(function(e){return e.field}).filter(function(e){return e&&"*"!==e}).sort().join("|")}),i(n.FIELD_TRANSFORM,function(e){return e.getEncodings().map(function(e){return d.fieldDef(e)}).sort().join("|")}),i(n.ENCODING,function(e){return a(e)+e.getEncodings().map(function(e){var t=d.fieldDef(e);return o(e.channel)+":"+t}).sort().join("|")}),i(n.TRANSPOSE,function(e){return e.getMark()+"|"+a(e)+e.getEncodings().map(function(e){var t=d.fieldDef(e),n=e.channel===s.Channel.X||e.channel===s.Channel.Y?"xy":e.channel===s.Channel.ROW||e.channel===s.Channel.COLUMN?"facet":e.channel;return n+":"+t}).sort().join("|")}),i(n.SPEC,function(e){return JSON.stringify(e.specQuery)})},{"./enumspec":16,"./model":19,"./query/groupby":23,"./query/shorthand":25,"./query/spec":26,"./util":36,"datalib/src/util":8,"vega-lite/src/channel":45}],21:[function(e,t,n){"use strict";function i(e){switch(e){case u.BIN:case u.SCALE:case u.SORT:case u.AXIS:case u.LEGEND:return!0;case u.MARK:case u.FILTER:case u.CALCULATE:case u.FILTERINVALID:case u.STACK:case u.CHANNEL:case u.AGGREGATE:case u.AUTOCOUNT:case u.TIMEUNIT:case u.FIELD:case u.TYPE:case u.BIN_MAXBINS:case u.SCALE_BANDSIZE:case u.SCALE_CLAMP:case u.SCALE_DOMAIN:case u.SCALE_EXPONENT:case u.SCALE_NICE:case u.SCALE_RANGE:case u.SCALE_ROUND:case u.SCALE_TYPE:case u.SCALE_USERAWDOMAIN:case u.SCALE_ZERO:case u.AXIS_AXISCOLOR:case u.AXIS_AXISWIDTH:case u.AXIS_LAYER:case u.AXIS_OFFSET:case u.AXIS_ORIENT:case u.AXIS_GRID:case u.AXIS_GRIDCOLOR:case u.AXIS_GRIDDASH:case u.AXIS_GRIDOPACITY:case u.AXIS_GRIDWIDTH:case u.AXIS_LABELS:case u.AXIS_FORMAT:case u.AXIS_LABELANGLE:case u.AXIS_LABELMAXLENGTH:case u.AXIS_SHORTTIMELABELS:case u.AXIS_TICKS:case u.AXIS_SUBDIVIDE:case u.AXIS_TICKCOLOR:case u.AXIS_TICKLABELCOLOR:case u.AXIS_TICKLABELFONT:case u.AXIS_TICKLABELFONTSIZE:case u.AXIS_TICKPADDING:case u.AXIS_TICKSIZE:case u.AXIS_TICKSIZEMAJOR:case u.AXIS_TICKSIZEMINOR:case u.AXIS_TICKSIZEEND:case u.AXIS_TICKWIDTH:case u.AXIS_VALUES:case u.AXIS_TITLE:case u.AXIS_TITLECOLOR:case u.AXIS_TITLEFONT:case u.AXIS_TITLEFONTSIZE:case u.AXIS_TITLEFONTWEIGHT:case u.AXIS_CHARACTERWIDTH:case u.AXIS_TITLEMAXLENGTH:case u.AXIS_TITLEOFFSET:case u.LEGEND_ORIENT:case u.LEGEND_OFFSET:case u.LEGEND_VALUES:case u.LEGEND_FORMAT:case u.LEGEND_LABELALIGN:case u.LEGEND_LABELBASELINE:case u.LEGEND_LABELCOLOR:case u.LEGEND_LABELFONT:case u.LEGEND_LABELFONTSIZE:case u.LEGEND_SHORTTIMELABELS:case u.LEGEND_SYMBOLCOLOR:case u.LEGEND_SYMBOLSHAPE:case u.LEGEND_SYMBOLSIZE:case u.LEGEND_SYMBOLSTROKEWIDTH:case u.LEGEND_TITLE:case u.LEGEND_TITLECOLOR:case u.LEGEND_TITLEFONT:case u.LEGEND_TITLEFONTSIZE:case u.LEGEND_TITLEFONTWEIGHT:return!1}throw new Error("hasNestedProperty undefined for property "+e)}function r(e){return void 0!==h[e]}function o(e){return c[e]}function a(e){return f[e]}function s(e){return e in c}var l=e("vega-lite/src/scale");!function(e){e[e.MARK="mark"]="MARK",e[e.FILTER="filter"]="FILTER",e[e.CALCULATE="calculate"]="CALCULATE",e[e.FILTERINVALID="filterInvalid"]="FILTERINVALID",e[e.STACK="stack"]="STACK",e[e.CHANNEL="channel"]="CHANNEL",e[e.AGGREGATE="aggregate"]="AGGREGATE",e[e.AUTOCOUNT="autoCount"]="AUTOCOUNT",e[e.BIN="bin"]="BIN",e[e.BIN_MAXBINS="binMaxBins"]="BIN_MAXBINS",e[e.TIMEUNIT="timeUnit"]="TIMEUNIT",e[e.FIELD="field"]="FIELD",e[e.TYPE="type"]="TYPE",e[e.SORT="sort"]="SORT",e[e.SORT_FIELD="sortField"]="SORT_FIELD",e[e.SORT_OP="sortOp"]="SORT_OP",e[e.SORT_ORDER="sortOrder"]="SORT_ORDER",e[e.SCALE="scale"]="SCALE",e[e.SCALE_BANDSIZE="scaleBandSize"]="SCALE_BANDSIZE",e[e.SCALE_CLAMP="scaleClamp"]="SCALE_CLAMP",e[e.SCALE_DOMAIN="scaleDomain"]="SCALE_DOMAIN",e[e.SCALE_EXPONENT="scaleExponent"]="SCALE_EXPONENT",e[e.SCALE_NICE="scaleNice"]="SCALE_NICE",e[e.SCALE_RANGE="scaleRange"]="SCALE_RANGE",e[e.SCALE_ROUND="scaleRound"]="SCALE_ROUND",e[e.SCALE_TYPE="scaleType"]="SCALE_TYPE",e[e.SCALE_USERAWDOMAIN="scaleUseRawDomain"]="SCALE_USERAWDOMAIN",e[e.SCALE_ZERO="scaleZero"]="SCALE_ZERO",e[e.AXIS="axis"]="AXIS",e[e.AXIS_AXISCOLOR="axisAxisColor"]="AXIS_AXISCOLOR",e[e.AXIS_AXISWIDTH="axisAxisWidth"]="AXIS_AXISWIDTH",e[e.AXIS_LAYER="axisLayer"]="AXIS_LAYER",e[e.AXIS_OFFSET="axisOffset"]="AXIS_OFFSET",e[e.AXIS_ORIENT="axisOrient"]="AXIS_ORIENT",e[e.AXIS_GRID="axisGrid"]="AXIS_GRID",e[e.AXIS_GRIDCOLOR="axisGridColor"]="AXIS_GRIDCOLOR",e[e.AXIS_GRIDDASH="axisGridDash"]="AXIS_GRIDDASH",e[e.AXIS_GRIDOPACITY="axisGridOpacity"]="AXIS_GRIDOPACITY",e[e.AXIS_GRIDWIDTH="axisGridWidth"]="AXIS_GRIDWIDTH",e[e.AXIS_LABELS="axisLabels"]="AXIS_LABELS",e[e.AXIS_FORMAT="axisFormat"]="AXIS_FORMAT",e[e.AXIS_LABELANGLE="axisLabelAngle"]="AXIS_LABELANGLE",e[e.AXIS_LABELMAXLENGTH="axisLabelMaxLength"]="AXIS_LABELMAXLENGTH",e[e.AXIS_SHORTTIMELABELS="axisShortTimeLabels"]="AXIS_SHORTTIMELABELS",e[e.AXIS_SUBDIVIDE="axisSubdivide"]="AXIS_SUBDIVIDE",e[e.AXIS_TICKS="axisTicks"]="AXIS_TICKS",e[e.AXIS_TICKCOLOR="axisTickColor"]="AXIS_TICKCOLOR",e[e.AXIS_TICKLABELCOLOR="axisTickLabelColor"]="AXIS_TICKLABELCOLOR",e[e.AXIS_TICKLABELFONT="axisTickLabelFont"]="AXIS_TICKLABELFONT",e[e.AXIS_TICKLABELFONTSIZE="axisTickLabelFontSize"]="AXIS_TICKLABELFONTSIZE",e[e.AXIS_TICKPADDING="axisTickPadding"]="AXIS_TICKPADDING",e[e.AXIS_TICKSIZE="axisTickSize"]="AXIS_TICKSIZE",e[e.AXIS_TICKSIZEMAJOR="axisTickSizeMajor"]="AXIS_TICKSIZEMAJOR",e[e.AXIS_TICKSIZEMINOR="axisTickSizeMinor"]="AXIS_TICKSIZEMINOR",e[e.AXIS_TICKSIZEEND="axisTickSizeEnd"]="AXIS_TICKSIZEEND",e[e.AXIS_TICKWIDTH="axisTickWidth"]="AXIS_TICKWIDTH",e[e.AXIS_VALUES="axisValues"]="AXIS_VALUES",e[e.AXIS_TITLE="axisTitle"]="AXIS_TITLE",e[e.AXIS_TITLECOLOR="axisTitleColor"]="AXIS_TITLECOLOR",e[e.AXIS_TITLEFONT="axisTitleFont"]="AXIS_TITLEFONT",e[e.AXIS_TITLEFONTSIZE="axisTitleFontSize"]="AXIS_TITLEFONTSIZE",e[e.AXIS_TITLEFONTWEIGHT="axisTitleFontWeight"]="AXIS_TITLEFONTWEIGHT",e[e.AXIS_TITLEOFFSET="axisTitleOffset"]="AXIS_TITLEOFFSET",e[e.AXIS_TITLEMAXLENGTH="axisTitleMaxLength"]="AXIS_TITLEMAXLENGTH",e[e.AXIS_CHARACTERWIDTH="axisCharacterWidth"]="AXIS_CHARACTERWIDTH",e[e.LEGEND="legend"]="LEGEND",e[e.LEGEND_ORIENT="legendOrient"]="LEGEND_ORIENT",e[e.LEGEND_OFFSET="legendOffset"]="LEGEND_OFFSET",e[e.LEGEND_VALUES="legendValues"]="LEGEND_VALUES",e[e.LEGEND_FORMAT="legendFormat"]="LEGEND_FORMAT",e[e.LEGEND_LABELALIGN="legendLabelAlign"]="LEGEND_LABELALIGN",e[e.LEGEND_LABELBASELINE="legendLabelBaseline"]="LEGEND_LABELBASELINE",e[e.LEGEND_LABELCOLOR="legendLabelColor"]="LEGEND_LABELCOLOR",e[e.LEGEND_LABELFONT="legendLabelFont"]="LEGEND_LABELFONT",e[e.LEGEND_LABELFONTSIZE="legendLabelFontSize"]="LEGEND_LABELFONTSIZE",e[e.LEGEND_SHORTTIMELABELS="legendShortTimeLabels"]="LEGEND_SHORTTIMELABELS",e[e.LEGEND_SYMBOLCOLOR="legendSymbolColor"]="LEGEND_SYMBOLCOLOR",e[e.LEGEND_SYMBOLSHAPE="legendSymbolShape"]="LEGEND_SYMBOLSHAPE",e[e.LEGEND_SYMBOLSIZE="legendSymbolSize"]="LEGEND_SYMBOLSIZE",e[e.LEGEND_SYMBOLSTROKEWIDTH="legendSymbolStrokeWidth"]="LEGEND_SYMBOLSTROKEWIDTH",e[e.LEGEND_TITLE="legendTitle"]="LEGEND_TITLE",e[e.LEGEND_TITLECOLOR="legendTitleColor"]="LEGEND_TITLECOLOR",e[e.LEGEND_TITLEFONT="legendTitleFont"]="LEGEND_TITLEFONT",e[e.LEGEND_TITLEFONTSIZE="legendTitleFontSize"]="LEGEND_TITLEFONTSIZE",e[e.LEGEND_TITLEFONTWEIGHT="legendTitleFontWeight"]="LEGEND_TITLEFONTWEIGHT"}(n.Property||(n.Property={}));var u=n.Property;n.hasNestedProperty=i,n.ENCODING_PROPERTIES=[u.CHANNEL,u.BIN,u.BIN_MAXBINS,u.TIMEUNIT,u.AGGREGATE,u.AUTOCOUNT,u.FIELD,u.TYPE,u.SORT,u.SORT_FIELD,u.SORT_OP,u.SORT_ORDER,u.SCALE,u.SCALE_BANDSIZE,u.SCALE_CLAMP,u.SCALE_DOMAIN,u.SCALE_EXPONENT,u.SCALE_NICE,u.SCALE_RANGE,u.SCALE_ROUND,u.SCALE_TYPE,u.SCALE_USERAWDOMAIN,u.SCALE_ZERO,u.AXIS,u.AXIS_AXISCOLOR,u.AXIS_AXISWIDTH,u.AXIS_CHARACTERWIDTH,u.AXIS_FORMAT,u.AXIS_GRID,u.AXIS_GRIDCOLOR,u.AXIS_GRIDDASH,u.AXIS_GRIDOPACITY,u.AXIS_GRIDWIDTH,u.AXIS_LABELANGLE,u.AXIS_LABELMAXLENGTH,u.AXIS_LABELS,u.AXIS_LAYER,u.AXIS_OFFSET,u.AXIS_ORIENT,u.AXIS_SHORTTIMELABELS,u.AXIS_SUBDIVIDE,u.AXIS_TICKCOLOR,u.AXIS_TICKLABELCOLOR,u.AXIS_TICKLABELFONT,u.AXIS_TICKLABELFONTSIZE,u.AXIS_TICKPADDING,u.AXIS_TICKS,u.AXIS_TICKSIZE,u.AXIS_TICKSIZEEND,u.AXIS_TICKSIZEMAJOR,u.AXIS_TICKSIZEMINOR,u.AXIS_TICKWIDTH,u.AXIS_TITLE,u.AXIS_TITLECOLOR,u.AXIS_TITLEFONT,u.AXIS_TITLEFONTSIZE,u.AXIS_TITLEFONTWEIGHT,u.AXIS_TITLEMAXLENGTH,u.AXIS_TITLEOFFSET,u.AXIS_VALUES,u.LEGEND,u.LEGEND_ORIENT,u.LEGEND_OFFSET,u.LEGEND_VALUES,u.LEGEND_FORMAT,u.LEGEND_LABELALIGN,u.LEGEND_LABELBASELINE,u.LEGEND_LABELCOLOR,u.LEGEND_LABELFONT,u.LEGEND_LABELFONTSIZE,u.LEGEND_SHORTTIMELABELS,u.LEGEND_SYMBOLCOLOR,u.LEGEND_SYMBOLSHAPE,u.LEGEND_SYMBOLSIZE,u.LEGEND_SYMBOLSTROKEWIDTH,u.LEGEND_TITLE,u.LEGEND_TITLECOLOR,u.LEGEND_TITLEFONT,u.LEGEND_TITLEFONTSIZE,u.LEGEND_TITLEFONTWEIGHT],n.DEFAULT_PROPERTY_PRECEDENCE=[u.TYPE,u.FIELD,u.BIN,u.TIMEUNIT,u.AGGREGATE,u.AUTOCOUNT,u.SORT,u.SORT_FIELD,u.SORT_OP,u.SORT_ORDER,u.BIN_MAXBINS,u.CHANNEL,u.MARK,u.SCALE,u.AXIS,u.LEGEND,u.SCALE_BANDSIZE,u.SCALE_CLAMP,u.SCALE_DOMAIN,u.SCALE_EXPONENT,u.SCALE_NICE,u.SCALE_RANGE,u.SCALE_ROUND,u.SCALE_TYPE,u.SCALE_USERAWDOMAIN,u.SCALE_ZERO,u.AXIS_AXISCOLOR,u.AXIS_AXISWIDTH,u.AXIS_CHARACTERWIDTH,u.AXIS_FORMAT,u.AXIS_GRID,u.AXIS_GRIDCOLOR,u.AXIS_GRIDDASH,u.AXIS_GRIDOPACITY,u.AXIS_GRIDWIDTH,u.AXIS_LABELANGLE,u.AXIS_LABELMAXLENGTH,u.AXIS_LABELS,u.AXIS_LAYER,u.AXIS_OFFSET,u.AXIS_ORIENT,u.AXIS_SHORTTIMELABELS,u.AXIS_SUBDIVIDE,u.AXIS_TICKCOLOR,u.AXIS_TICKLABELCOLOR,u.AXIS_TICKLABELFONT,u.AXIS_TICKLABELFONTSIZE,u.AXIS_TICKPADDING,u.AXIS_TICKS,u.AXIS_TICKSIZE,u.AXIS_TICKSIZEEND,u.AXIS_TICKSIZEMAJOR,u.AXIS_TICKSIZEMINOR,u.AXIS_TICKWIDTH,u.AXIS_TITLE,u.AXIS_TITLECOLOR,u.AXIS_TITLEFONT,u.AXIS_TITLEFONTSIZE,u.AXIS_TITLEFONTWEIGHT,u.AXIS_TITLEMAXLENGTH,u.AXIS_TITLEOFFSET,u.AXIS_VALUES,u.LEGEND_ORIENT,u.LEGEND_OFFSET,u.LEGEND_VALUES,u.LEGEND_FORMAT,u.LEGEND_LABELALIGN,u.LEGEND_LABELBASELINE,u.LEGEND_LABELCOLOR,u.LEGEND_LABELFONT,u.LEGEND_LABELFONTSIZE,u.LEGEND_SHORTTIMELABELS,u.LEGEND_SYMBOLCOLOR,u.LEGEND_SYMBOLSHAPE,u.LEGEND_SYMBOLSIZE,u.LEGEND_SYMBOLSTROKEWIDTH,u.LEGEND_TITLE,u.LEGEND_TITLECOLOR,u.LEGEND_TITLEFONT,u.LEGEND_TITLEFONTSIZE,u.LEGEND_TITLEFONTWEIGHT],n.NESTED_ENCODING_PROPERTIES=[{property:u.BIN_MAXBINS,parent:"bin",child:"maxbins"},{property:u.SORT_FIELD,parent:"sort",child:"field"},{property:u.SORT_OP,parent:"sort",child:"op"},{property:u.SORT_ORDER,parent:"sort",child:"order"},{property:u.SCALE_BANDSIZE,parent:"scale",child:"bandSize"},{property:u.SCALE_CLAMP,parent:"scale",child:"clamp"},{property:u.SCALE_DOMAIN,parent:"scale",child:"domain"},{property:u.SCALE_EXPONENT,parent:"scale",child:"exponent"},{property:u.SCALE_NICE,parent:"scale",child:"nice"},{property:u.SCALE_RANGE,parent:"scale",child:"range"},{property:u.SCALE_ROUND,parent:"scale",child:"round"},{property:u.SCALE_TYPE,parent:"scale",child:"type"},{property:u.SCALE_USERAWDOMAIN,parent:"scale",child:"useRawDomain"},{property:u.SCALE_ZERO,parent:"scale",child:"zero"},{property:u.AXIS_AXISCOLOR,parent:"axis",child:"axisColor"},{property:u.AXIS_AXISWIDTH,parent:"axis",child:"axisWidth"},{property:u.AXIS_LAYER,parent:"axis",child:"layer"},{property:u.AXIS_OFFSET,parent:"axis",child:"offset"},{property:u.AXIS_ORIENT,parent:"axis",child:"orient"},{property:u.AXIS_GRID,parent:"axis",child:"grid"},{property:u.AXIS_GRIDCOLOR,parent:"axis",child:"gridColor"},{property:u.AXIS_GRIDDASH,parent:"axis",child:"gridDash"},{property:u.AXIS_GRIDOPACITY,parent:"axis",child:"gridOpacity"},{property:u.AXIS_GRIDWIDTH,parent:"axis",child:"gridWidth"},{property:u.AXIS_LABELS,parent:"axis",child:"labels"},{property:u.AXIS_FORMAT,parent:"axis",child:"format"},{property:u.AXIS_LABELANGLE,parent:"axis",child:"labelAngle"},{property:u.AXIS_LABELMAXLENGTH,parent:"axis",child:"labelMaxLength"},{property:u.AXIS_SHORTTIMELABELS,parent:"axis",child:"shortTimeLabels"},{property:u.AXIS_TICKS,parent:"axis",child:"ticks"},{property:u.AXIS_SUBDIVIDE,parent:"axis",child:"subdivide"},{property:u.AXIS_TICKCOLOR,parent:"axis",child:"tickColor"},{property:u.AXIS_TICKLABELCOLOR,parent:"axis",child:"tickLabelColor"},{property:u.AXIS_TICKLABELFONT,parent:"axis",child:"tickLabelFont"},{property:u.AXIS_TICKLABELFONTSIZE,parent:"axis",child:"tickLabelFontSize"},{property:u.AXIS_TICKPADDING,parent:"axis",child:"tickPadding"},{property:u.AXIS_TICKSIZE,parent:"axis",child:"tickSize"},{property:u.AXIS_TICKSIZEMAJOR,parent:"axis",child:"tickSizeMajor"},{property:u.AXIS_TICKSIZEMINOR,parent:"axis",child:"tickSizeMinor"},{property:u.AXIS_TICKSIZEEND,parent:"axis",child:"tickSizeEnd"},{property:u.AXIS_TICKWIDTH,parent:"axis",child:"tickWidth"},{property:u.AXIS_VALUES,parent:"axis",child:"values"},{property:u.AXIS_TITLE,parent:"axis",child:"title"},{property:u.AXIS_TITLECOLOR,parent:"axis",child:"titleColor"},{property:u.AXIS_TITLEFONT,parent:"axis",child:"titleFont"},{property:u.AXIS_TITLEFONTSIZE,parent:"axis",child:"titleFontSize"},{property:u.AXIS_TITLEFONTWEIGHT,parent:"axis",child:"titleFontWeight"},{property:u.AXIS_CHARACTERWIDTH,parent:"axis",child:"characterWidth"},{property:u.AXIS_TITLEMAXLENGTH,parent:"axis",child:"titleMaxLength"},{property:u.AXIS_TITLEOFFSET,parent:"axis",child:"titleOffset"},{property:u.LEGEND_ORIENT,parent:"legend",child:"orient"},{property:u.LEGEND_OFFSET,parent:"legend",child:"offset"},{property:u.LEGEND_VALUES,parent:"legend",child:"values"},{property:u.LEGEND_FORMAT,parent:"legend",child:"format"},{property:u.LEGEND_LABELALIGN,parent:"legend",child:"labelAlign"},{property:u.LEGEND_LABELBASELINE,parent:"legend",child:"labelBaseline"},{property:u.LEGEND_LABELFONT,parent:"legend",child:"labelFont"},{property:u.LEGEND_LABELFONTSIZE,parent:"legend",child:"labelFontSize"},{property:u.LEGEND_SHORTTIMELABELS,parent:"legend",child:"shortTimeLabels"},{property:u.LEGEND_SYMBOLCOLOR,parent:"legend",child:"symbolColor"},{property:u.LEGEND_SYMBOLSHAPE,parent:"legend",child:"symbolShape"},{property:u.LEGEND_SYMBOLSIZE,parent:"legend",child:"symbolSize"},{property:u.LEGEND_SYMBOLSTROKEWIDTH,parent:"legend",child:"symbolStrokeWidth"},{property:u.LEGEND_TITLE,parent:"legend",child:"title"},{property:u.LEGEND_TITLECOLOR,parent:"legend",child:"titleColor"},{property:u.LEGEND_TITLEFONT,parent:"legend",child:"titleFont"},{property:u.LEGEND_TITLEFONTSIZE,parent:"legend",child:"titleFontSize"},{property:u.LEGEND_TITLEFONTWEIGHT,parent:"legend",child:"titleFontWeight"}];var c=n.NESTED_ENCODING_PROPERTIES.reduce(function(e,t){return e[t.property]=t,e},{}),f=n.NESTED_ENCODING_PROPERTIES.reduce(function(e,t){var n=t.parent;return n in e||(e[n]=[]),e[t.parent].push(t),e},{});n.SCALE_PROPERTIES=f.scale.map(function(e){return e.property});var h=n.ENCODING_PROPERTIES.reduce(function(e,t){return e[t]=t,e},{});n.isEncodingProperty=r,n.getNestedEncodingProperty=o,n.getNestedEncodingPropertyChildren=a,n.isNestedEncodingProperty=s;var d=[{property:"bandSize",supportedScaleType:[l.ScaleType.ORDINAL]},{property:"clamp",supportedScaleType:[l.ScaleType.LINEAR,l.ScaleType.LOG,l.ScaleType.POW,l.ScaleType.TIME,l.ScaleType.UTC]},{property:"domain",supportedScaleType:[l.ScaleType.LINEAR,l.ScaleType.LOG,l.ScaleType.POW,l.ScaleType.QUANTILE,l.ScaleType.QUANTIZE,l.ScaleType.ORDINAL,l.ScaleType.SQRT,l.ScaleType.TIME,l.ScaleType.UTC]},{property:"exponent",supportedScaleType:[l.ScaleType.LOG,l.ScaleType.POW,l.ScaleType.SQRT]},{property:"nice",supportedScaleType:[l.ScaleType.LINEAR,l.ScaleType.LOG,l.ScaleType.POW,l.ScaleType.TIME,l.ScaleType.UTC]},{property:"range",supportedScaleType:[l.ScaleType.LINEAR,l.ScaleType.LOG,l.ScaleType.POW,l.ScaleType.QUANTILE,l.ScaleType.QUANTIZE,l.ScaleType.ORDINAL,l.ScaleType.SQRT,l.ScaleType.TIME,l.ScaleType.UTC]},{property:"round",supportedScaleType:[l.ScaleType.LINEAR,l.ScaleType.LOG,l.ScaleType.POW,l.ScaleType.SQRT,l.ScaleType.TIME,l.ScaleType.UTC]},{property:"useRawDomain",supportedScaleType:[l.ScaleType.LINEAR,l.ScaleType.LOG,l.ScaleType.POW,l.ScaleType.QUANTILE,l.ScaleType.QUANTIZE,l.ScaleType.ORDINAL,l.ScaleType.SQRT,l.ScaleType.TIME,l.ScaleType.UTC]},{property:"zero",supportedScaleType:[l.ScaleType.LINEAR,l.ScaleType.POW,l.ScaleType.SQRT]}];n.SUPPORTED_SCALE_PROPERTY_INDEX=d.reduce(function(e,t){var n=t.property;return e[n]=t.supportedScaleType,e},{})},{"vega-lite/src/scale":51}],22:[function(e,t,n){"use strict";function i(e){return c.contains([l.Type.NOMINAL,l.Type.ORDINAL],e.type)||!u.isEnumSpec(e.bin)&&!!e.bin||!u.isEnumSpec(e.timeUnit)&&!!e.timeUnit}function r(e){return e.type===l.Type.QUANTITATIVE&&!e.bin||e.type===l.Type.TEMPORAL&&!e.timeUnit}function o(e){var t=e.scale===!0||e.scale===u.SHORT_ENUM_SPEC?{}:e.scale,n=e.type,i=e.timeUnit;if(t&&void 0!==t.type)return t.type;if(!u.isEnumSpec(n)){if(n===l.Type.QUANTITATIVE)return a.ScaleType.LINEAR;if(n===l.Type.ORDINAL||n===l.Type.NOMINAL)return a.ScaleType.ORDINAL;if(n===l.Type.TEMPORAL){if(void 0!==i){if(u.isEnumSpec(i))return;return s.defaultScaleType(i)}return a.ScaleType.TIME}throw new Error("Unsupported type: "+n+" in scaleType")}}var a=e("vega-lite/src/scale"),s=e("vega-lite/src/timeunit"),l=e("vega-lite/src/type"),u=e("../enumspec"),c=e("../util");n.isDimension=i,n.isMeasure=r,n.scaleType=o},{"../enumspec":16,"../util":36,"vega-lite/src/scale":51,"vega-lite/src/timeunit":54,"vega-lite/src/type":55}],23:[function(e,t,n){"use strict";function i(e){return o.isObject(e)&&!!e.property}function r(e){return o.isArray(e)?e.map(function(e){if(i(e)){if(e.replace){var t=a.keys(e.replace).reduce(function(t,n){var i=e.replace[n];return(t[i]=t[i]||[]).push(n),t},{});return e.property+"["+a.keys(t).map(function(e){var n=t[e].sort();return n.join(",")+"=>"+e}).join(";")+"]"}return e.property}return e}).join(","):e}var o=e("datalib/src/util"),a=e("../util");n.REPLACE_BLANK_FIELDS={"*":""},n.REPLACE_XY_CHANNELS={x:"xy",y:"xy"},n.REPLACE_FACET_CHANNELS={row:"facet",column:"facet"},n.REPLACE_MARK_STYLE_CHANNELS={color:"style",opacity:"style",shape:"style",size:"style"},n.isExtendedGroupBy=i,n.toString=r},{"../util":36,"datalib/src/util":8}],24:[function(e,t,n){"use strict";function i(e,t,n){e=u.extend({},r(e),{config:u.extend({},o.DEFAULT_QUERY_CONFIG,n,e.config)});var i=a.generate(e.spec,t,e.config),c=s.nest(i,e),f=l.rank(c,e,t,0);return{query:e,result:f}}function r(e){if(e.groupBy){var t={groupBy:e.groupBy};e.orderBy&&(t.orderGroupBy=e.orderBy);var n={spec:u.duplicate(e.spec),nest:[t]};return e.chooseBy&&(n.chooseBy=e.chooseBy),e.config&&(n.config=e.config),n}return u.duplicate(e)}var o=e("../config"),a=e("../generate"),s=e("../nest"),l=e("../ranking/ranking"),u=e("../util");n.encoding=e("./encoding"),n.groupBy=e("./groupby"),n.shorthand=e("./shorthand"),n.spec=e("./spec"),n.transform=e("./transform"),n.query=i,n.normalize=r},{"../config":9,"../generate":18,"../nest":20,"../ranking/ranking":33,"../util":36,"./encoding":22,"./groupby":23,"./shorthand":25,"./spec":26,"./transform":27}],25:[function(e,t,n){"use strict";function i(e){return function(t){return void 0!==e[t]?e[t]:t}}function r(e,t){return g.isEnumSpec(e)?g.SHORT_ENUM_SPEC:t?t(e):e}function o(e,t,i){void 0===t&&(t=n.INCLUDE_ALL),void 0===i&&(i={});var r=p.fromSpec(e);return a(r)}function a(e,t,i){void 0===t&&(t=n.INCLUDE_ALL),void 0===i&&(i={});var o=[];if(t[m.Property.MARK]&&o.push(r(e.mark,i[m.Property.MARK])),e.transform&&(t[m.Property.CALCULATE]&&void 0!==e.transform.calculate&&o.push("calculate:"+l(e.transform.calculate)),t[m.Property.FILTER]&&void 0!==e.transform.filter&&o.push("filter:"+s(e.transform.filter)),t[m.Property.FILTERINVALID]&&void 0!==e.transform.filterInvalid&&o.push("filterInvalid:"+e.transform.filterInvalid)),t[m.Property.STACK]){var a=p.stack(e);if(a){var f=v.extend({},t,{type:!1}),h=c(a.fieldEncQ,f,i),d=c(a.groupByEncQ,f,i);o.push("stack={field:"+h+","+(d?"by:"+d+",":"")+"offset:"+a.offset+"}")}}return o.push(e.encodings.reduce(function(e,n){if(n.autoCount!==!1){var r=u(n,t,i);r&&e.push(r)}return e},[]).sort().join("|")),o.join("|")}function s(e){if(e instanceof Array){var t=e.map(s);return t.length>1?"("+t.join(") && (")+")":t[0]}return"string"==typeof e?e:f.expression(e)}function l(e){return e.map(function(e){return"{"+e.field+":"+e.expr+"}"}).join(",")}function u(e,t,i){void 0===t&&(t=n.INCLUDE_ALL),void 0===i&&(i={});var o=[];t[m.Property.CHANNEL]&&o.push(r(e.channel,i[m.Property.CHANNEL]));var a=c(e,t,i);return a&&o.push(a),o.join(":")}function c(e,t,i){void 0===t&&(t=n.INCLUDE_ALL),void 0===i&&(i={});var o=null,a=[];if(t[m.Property.AGGREGATE]&&e.autoCount===!1)return"-";if(t[m.Property.AGGREGATE]&&e.aggregate&&!g.isEnumSpec(e.aggregate))o=r(e.aggregate,i[m.Property.AGGREGATE]);else if(t[m.Property.AGGREGATE]&&e.autoCount&&!g.isEnumSpec(e.autoCount))o=r("count",i[m.Property.AGGREGATE]);else if(t[m.Property.TIMEUNIT]&&e.timeUnit&&!g.isEnumSpec(e.timeUnit))o=r(e.timeUnit,i[m.Property.TIMEUNIT]);else if(t[m.Property.BIN]&&e.bin&&!g.isEnumSpec(e.bin))o="bin",t[m.Property.BIN_MAXBINS]&&e.bin.maxbins&&a.push({key:"maxbins",value:r(e.bin.maxbins,i[m.Property.BIN_MAXBINS])});else for(var s=0,l=[m.Property.AGGREGATE,m.Property.AUTOCOUNT,m.Property.TIMEUNIT,m.Property.BIN];s<l.length;s++){var u=l[s];if(t[u]&&e[u]&&g.isEnumSpec(e[u])){o=g.SHORT_ENUM_SPEC+"";break}}for(var c=function(o){if(!g.isEnumSpec(e.channel)&&!n.PROPERTY_SUPPORTED_CHANNELS[o][e.channel])return"continue";if(t[o])if(e[o]&&!g.isEnumSpec(e[o]))if(d.isString(e[o]))a.push({key:o+"",value:e[o]});else{var s=m.getNestedEncodingPropertyChildren(o),l=s.reduce(function(n,a){return t[a.property]&&void 0!==e[o][a.child]&&(n[a.child]=r(e[o][a.child],i[a.property])),n},{});v.keys(l).length>0&&a.push({key:o+"",value:JSON.stringify(l)})}else e[o]!==!1&&null!==e[o]||a.push({key:o+"",value:!1})},f=0,p=[m.Property.SCALE,m.Property.SORT,m.Property.AXIS,m.Property.LEGEND];f<p.length;f++){var y=p[f];c(y)}var b=t[m.Property.FIELD]?r(e.field||"*",i[m.Property.FIELD]):"...";if(t[m.Property.TYPE]){var _=((e.type||h.Type.QUANTITATIVE)+"").substr(0,1);b+=","+r(_,i[m.Property.TYPE])}return b+=a.map(function(e){return","+e.key+"="+e.value}).join(""),o?o+"("+b+")":b}var f=e("vega-lite/src/filter"),h=e("vega-lite/src/type"),d=e("datalib/src/util"),p=e("./spec"),g=e("../enumspec"),m=e("../property"),v=e("../util");n.getReplacer=i,n.value=r,n.INCLUDE_ALL=m.DEFAULT_PROPERTY_PRECEDENCE.concat([m.Property.CALCULATE,m.Property.FILTER,m.Property.FILTERINVALID,m.Property.STACK]).reduce(function(e,t){return e[t]=!0,e},{}),n.vlSpec=o,n.PROPERTY_SUPPORTED_CHANNELS={axis:{x:!0,y:!0,row:!0,column:!0},legend:{color:!0,opacity:!0,size:!0,shape:!0},scale:{x:!0,y:!0,color:!0,opacity:!0,row:!0,column:!0,size:!0,shape:!0},sort:{x:!0,y:!0,path:!0,order:!0}},n.spec=a,n.filter=s,n.calculate=l,n.encoding=u,n.fieldDef=c},{"../enumspec":16,"../property":21,"../util":36,"./spec":26,"datalib/src/util":8,"vega-lite/src/filter":49,"vega-lite/src/type":55}],26:[function(e,t,n){"use strict";function i(e){return f.extend(e.data?{data:e.data}:{},e.transform?{transform:e.transform}:{},{mark:e.mark,encodings:f.keys(e.encoding).map(function(t){for(var n={channel:t},i=e.encoding[t],r=0,o=c.ENCODING_PROPERTIES;r<o.length;r++){var a=o[r];c.isNestedEncodingProperty(a)||void 0===i[a]||(n[a]=i[a]),f.contains([c.Property.SCALE,c.Property.AXIS,c.Property.LEGEND],a)&&null===n[a]&&(n[a]=!1)}return n})},e.config?{config:e.config}:{})}function r(e){return f.some(e.encodings,function(e){return!u.isEnumSpec(e.aggregate)&&!!e.aggregate||e.autoCount===!0})}function o(e){var t=e.config,n=t&&t.mark?t.mark.stacked:void 0;if(f.contains([l.StackOffset.NONE,null,!1],n))return null;if(!f.contains([s.BAR,s.AREA],e.mark))return null;if(!r(e))return null;var i=e.encodings.reduce(function(e,t){return f.contains(a.STACK_GROUP_CHANNELS,t.channel)&&!t.aggregate&&e.push(t.channel),e},[]);if(0===i.length)return null;var o=e.encodings.reduce(function(e,t){return e||(t.channel===a.Channel.X?t:null)},null),u=e.encodings.reduce(function(e,t){return e||(t.channel===a.Channel.Y?t:null)},null),c=!(!o||!o.aggregate&&!o.autoCount),h=!(!u||!u.aggregate&&!u.autoCount);return c!==h?{groupbyChannel:c?u?a.Y:null:o?a.X:null,groupByEncQ:c?u:o,fieldChannel:c?a.X:a.Y,fieldEncQ:c?o:u,stackByChannels:i,offset:n||l.StackOffset.ZERO}:null}var a=e("vega-lite/src/channel"),s=e("vega-lite/src/mark"),l=e("vega-lite/src/stack"),u=e("../enumspec"),c=e("../property"),f=e("../util");n.fromSpec=i,n.isAggregate=r,n.stack=o},{"../enumspec":16,"../property":21,"../util":36,"vega-lite/src/channel":45,"vega-lite/src/mark":50,"vega-lite/src/stack":53}],27:[function(e,t,n){"use strict"},{}],28:[function(e,t,n){"use strict";function i(e,t,n){var i=r(e,t,n);return{score:i.score,features:[i]}}function r(e,t,i){var r=e.getEncodings();if(e.isAggregate()){var u=function(e){return e.type===a.Type.QUANTITATIVE&&!e.bin&&!e.aggregate&&!e.autoCount||e.type===a.Type.TEMPORAL&&!e.timeUnit};return s.some(r,u)?{type:n.name,score:.1,feature:"Aggregate with raw continuous"}:s.some(r,l.isDimension)?s.some(r,function(e){return e.aggregate===o.AggregateOp.COUNT})?{type:n.name,score:.8,feature:"Aggregate with count"}:{type:n.name,score:.9,feature:"Aggregate without count"}:{type:n.name,score:.3,feature:"Aggregate without dimension"}}return s.some(r,l.isMeasure)?{type:n.name,score:1,feature:"Raw with measure"}:{type:n.name,score:.2,feature:"Raw without measure"}}var o=e("vega-lite/src/aggregate"),a=e("vega-lite/src/type"),s=e("../util"),l=e("../query/encoding");n.name="aggregationQuality",n.score=i},{"../query/encoding":22,"../util":36,"vega-lite/src/aggregate":42,"vega-lite/src/type":55}],29:[function(e,t,n){"use strict";var i,r=e("vega-lite/src/channel"),o=e("../../config"),a=e("../../query/shorthand"),s=e("../../util"),l=e("./effectiveness"),u=e("./type");!function(e){function t(){var e={},t={x:0,y:0,size:-.55,color:-.6,opacity:-.75,text:-.775,row:-.8,column:-.8,shape:-2.5,detail:-3};[u.Q,u.BIN_Q,u.T,u.TIMEUNIT_T,u.TIMEUNIT_O,u.O].forEach(function(i){s.keys(t).forEach(function(r){e[n(i,r)]=t[r]})}),[u.BIN_Q,u.TIMEUNIT_T,u.TIMEUNIT_O,u.O].forEach(function(t){[r.Channel.ROW,r.Channel.COLUMN].forEach(function(i){e[n(t,i)]+=.15})});var i={x:0,y:0,color:-.6,shape:-.65,row:-.7,column:-.7,text:-.8,size:-1.8,detail:-2,opacity:-2.1};return s.keys(i).forEach(function(t){e[n(u.N,t)]=i[t]}),e}function n(e,t){return e+"_"+t}function i(t,i,r){var o=t.getEncodings().reduce(function(e,t){var n=a.fieldDef(t);return(e[n]=e[n]||[]).push(t),e},{}),c=[];return s.forEach(o,function(t){var i=t.reduce(function(t,i){var r=u.getExtendedType(i),o=n(r,i.channel),a=l.getFeatureScore(e.TYPE_CHANNEL,o);return null===t||a.score>t.score?a:t},null);c.push(i)}),c}e.TYPE_CHANNEL="typeChannel",e.init=t,e.featurize=n,e.getScore=i}(i=n.TypeChannelScore||(n.TypeChannelScore={}));var c;!function(e){function t(e){void 0===e&&(e={}),e=s.extend({},o.DEFAULT_QUERY_CONFIG,e);var t={},n=[{feature:u.BIN_Q,opt:"preferredBinAxis"},{feature:u.T,opt:"preferredTemporalAxis"},{feature:u.TIMEUNIT_T,opt:"preferredTemporalAxis"},{feature:u.TIMEUNIT_O,opt:"preferredTemporalAxis"},{feature:u.O,opt:"preferredOrdinalAxis"
},{feature:u.N,opt:"preferredNominalAxis"}];return n.forEach(function(n){e[n.opt]===r.Channel.X?t[n.feature+"_"+r.Channel.Y]=-.01:e[n.opt]===r.Channel.Y&&(t[n.feature+"_"+r.Channel.X]=-.01)}),t}function n(e,t){return e+"_"+t}function i(t,i,r){return t.getEncodings().reduce(function(t,i){var r=u.getExtendedType(i),o=n(r,i.channel),a=l.getFeatureScore(e.PREFERRED_AXIS,o);return a&&t.push(a),t},[])}e.PREFERRED_AXIS="preferredAxis",e.init=t,e.featurize=n,e.getScore=i}(c=n.PreferredAxisScore||(n.PreferredAxisScore={}));var f;!function(e){function t(e){e=s.extend({},o.DEFAULT_QUERY_CONFIG,e);var t={};return e.preferredFacet===r.Channel.ROW?t[r.Channel.COLUMN]=-.01:e.preferredFacet===r.Channel.COLUMN&&(t[r.Channel.ROW]=-.01),t}function n(t,n,i){return t.getEncodings().reduce(function(t,n){var i=l.getFeatureScore(e.PREFERRED_FACET,n.channel);return i&&t.push(i),t},[])}e.PREFERRED_FACET="preferredFacet",e.init=t,e.getScore=n}(f=n.PreferredFacetScore||(n.PreferredFacetScore={}));var h;!function(e){function t(){return{bar_size:-2,tick_size:-2}}function n(t,n,i){var r=t.getMark();return t.getEncodings().reduce(function(t,n){var i=r+"_"+n.channel,o=l.getFeatureScore(e.MARK_CHANNEL,i);return o&&t.push(o),t},[])}e.MARK_CHANNEL="markChannel",e.init=t,e.getScore=n}(h=n.MarkChannelScore||(n.MarkChannelScore={}));var d;!function(e){function t(){return{row:-2,column:-2,color:0,opacity:0,size:0,shape:0}}function n(t,n,i){return t.isAggregate()&&t.getEncodings().reduce(function(t,n){if(!n.aggregate&&!n.autoCount){var i=l.getFeatureScore(e.DIMENSION,n.channel+"");if(i.score>t.score)return i}return t},{type:e.DIMENSION,feature:"No Dimension",score:-5}),[]}e.DIMENSION="dimension",e.init=t,e.getScore=n}(d=n.DimensionScore||(n.DimensionScore={}))},{"../../config":9,"../../query/shorthand":25,"../../util":36,"./effectiveness":30,"./type":32,"vega-lite/src/channel":45}],30:[function(e,t,n){"use strict";function i(e,t){var i=n.FEATURE_INDEX[e][t];return void 0!==i?{score:i,type:e,feature:t}:null}function r(e){l.push(e),n.FEATURE_INDEX[e.type]=e.init()}function o(e,t,n){var i=l.reduce(function(i,r){var o=r.getScore(e,t,n);return i.concat(o)},[]);return{score:i.reduce(function(e,t){return e+t.score},0),features:i}}var a=e("./channel"),s=e("./mark");n.FEATURE_INDEX={};var l=[];n.getFeatureScore=i,n.addFeatureFactory=r,r({type:a.TypeChannelScore.TYPE_CHANNEL,init:a.TypeChannelScore.init,getScore:a.TypeChannelScore.getScore}),r({type:a.PreferredAxisScore.PREFERRED_AXIS,init:a.PreferredAxisScore.init,getScore:a.PreferredAxisScore.getScore}),r({type:a.PreferredFacetScore.PREFERRED_FACET,init:a.PreferredFacetScore.init,getScore:a.PreferredFacetScore.getScore}),r({type:a.MarkChannelScore.MARK_CHANNEL,init:a.MarkChannelScore.init,getScore:a.MarkChannelScore.getScore}),r({type:s.MarkScore.MARK_SCORE,init:s.MarkScore.init,getScore:s.MarkScore.getScore}),Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=o},{"./channel":29,"./mark":31}],31:[function(e,t,n){"use strict";var i,r=e("vega-lite/src/channel"),o=e("vega-lite/src/mark"),a=e("../../util"),s=e("./effectiveness"),l=e("./type");!function(e){function t(e,t,n,i){return e+"_"+t+"_"+n+"_"+i}function n(){var e=[l.Q,l.T],n=[l.BIN_Q,l.TIMEUNIT_O,l.O,l.N],i=n.concat([l.NONE]),r={};return e.forEach(function(n){e.forEach(function(e){var i={point:0,text:-.2,tick:-.5,rect:-1,bar:-2,line:-2,area:-2,rule:-2.5};a.forEach(i,function(i,o){var a=t(n,e,!0,o);r[a]=i});var o={point:0,text:-.2,tick:-.5,bar:-2,line:-2,area:-2,rule:-2.5};a.forEach(o,function(i,o){var a=t(n,e,!1,o);r[a]=i})})}),e.forEach(function(e){i.forEach(function(n){var i={tick:0,point:-.2,text:-.5,bar:-2,line:-2,area:-2,rule:-2.5};a.forEach(i,function(i,o){var a=t(e,n,!0,o);r[a]=i;var s=t(n,e,!0,o);r[s]=i})}),[l.TIMEUNIT_T].forEach(function(n){var i={point:0,text:-.5,tick:-1,bar:-2,line:-2,area:-2,rule:-2.5};a.forEach(i,function(i,o){var a=t(e,n,!0,o);r[a]=i;var s=t(n,e,!0,o);r[s]=i})}),[l.NONE,l.N,l.O].forEach(function(n){var i={bar:0,point:-.2,tick:-.25,text:-.3,line:-2,area:-2,rule:-2.5};a.forEach(i,function(i,o){var a=t(e,n,!1,o);r[a]=i;var s=t(n,e,!1,o);r[s]=i})}),[l.BIN_Q].forEach(function(n){var i={bar:0,point:-.2,tick:-.25,text:-.3,line:-.5,area:-.5,rule:-2.5};a.forEach(i,function(i,o){var a=t(e,n,!1,o);r[a]=i;var s=t(n,e,!1,o);r[s]=i})}),[l.TIMEUNIT_T,l.TIMEUNIT_O].forEach(function(n){var i={line:0,area:-.1,bar:-.2,point:-.3,tick:-.35,text:-.4,rule:-2.5};a.forEach(i,function(i,o){var a=t(e,n,!1,o);r[a]=i;var s=t(n,e,!1,o);r[s]=i})})}),[l.TIMEUNIT_T].forEach(function(e){[l.TIMEUNIT_T].forEach(function(n){var i={point:0,rect:-.1,text:-.5,tick:-1,bar:-2,line:-2,area:-2,rule:-2.5};a.forEach(i,function(i,o){var a=t(e,n,!0,o);r[a]=i}),a.forEach(i,function(i,o){var a=t(e,n,!1,o);r[a]=i})}),i.forEach(function(n){var i={tick:0,point:-.2,text:-.5,rect:-1,bar:-2,line:-2,area:-2,rule:-2.5};a.forEach(i,function(i,o){var a=t(e,n,!0,o);r[a]=i}),a.forEach(i,function(i,o){var a=t(n,e,!0,o);r[a]=i}),a.forEach(i,function(i,o){var a=t(e,n,!1,o);r[a]=i}),a.forEach(i,function(i,o){var a=t(n,e,!1,o);r[a]=i})})}),i.forEach(function(e){i.forEach(function(n){var i={point:0,rect:0,text:-.1,tick:-1,bar:-2,line:-2,area:-2,rule:-2.5};a.forEach(i,function(i,o){var a=t(e,n,!0,o);r[a]=i}),a.forEach(i,function(i,o){var a=t(e,n,!1,o);r[a]=i})})}),r}function i(t,n,i){var a=t.getMark();a!==o.Mark.CIRCLE&&a!==o.Mark.SQUARE||(a=o.Mark.POINT);var u=t.getEncodingQueryByChannel(r.Channel.X),c=u?l.getExtendedType(u):l.NONE,f=t.getEncodingQueryByChannel(r.Channel.Y),h=f?l.getExtendedType(f):l.NONE,d=!t.isAggregate(),p=c+"_"+h+"_"+d+"_"+a,g=s.getFeatureScore(e.MARK_SCORE,p);return[g]}e.MARK_SCORE="markScore",e.featurize=t,e.init=n,e.getScore=i}(i=n.MarkScore||(n.MarkScore={}))},{"../../util":36,"./effectiveness":30,"./type":32,"vega-lite/src/channel":45,"vega-lite/src/mark":50}],32:[function(e,t,n){"use strict";function i(e){return e.bin?s.BIN_Q:e.timeUnit?a.scaleType(e)===r.ScaleType.ORDINAL?s.TIMEUNIT_O:s.TIMEUNIT_T:e.type}var r=e("vega-lite/src/scale"),o=e("vega-lite/src/type"),a=e("../../query/encoding");!function(e){e[e.Q=o.Type.QUANTITATIVE]="Q",e[e.BIN_Q="bin_"+o.Type.QUANTITATIVE]="BIN_Q",e[e.T=o.Type.TEMPORAL]="T",e[e.TIMEUNIT_T="timeUnit_time"]="TIMEUNIT_T",e[e.TIMEUNIT_O="timeUnit_"+o.Type.ORDINAL]="TIMEUNIT_O",e[e.O=o.Type.ORDINAL]="O",e[e.N=o.Type.NOMINAL]="N",e[e.NONE="-"]="NONE"}(n.ExtendedType||(n.ExtendedType={}));var s=n.ExtendedType;n.Q=s.Q,n.BIN_Q=s.BIN_Q,n.T=s.T,n.TIMEUNIT_T=s.TIMEUNIT_T,n.TIMEUNIT_O=s.TIMEUNIT_O,n.O=s.O,n.N=s.N,n.NONE=s.NONE,n.getExtendedType=i},{"../../query/encoding":22,"vega-lite/src/scale":51,"vega-lite/src/type":55}],33:[function(e,t,n){"use strict";function i(e,t){c[e]=t}function r(e){return c[e]}function o(e,t,n,i){return t.nest&&i!==t.nest.length?(e.items.forEach(function(e){o(e,t,n,i+1)}),t.nest[i].orderGroupBy&&e.items.sort(l(t.nest[i].orderGroupBy,n,t.config))):(t.orderBy||t.chooseBy)&&(e.items.sort(s(t.orderBy||t.chooseBy,n,t.config)),t.chooseBy&&e.items.length>0&&e.items.splice(1)),e}function a(e,t,n,i){if(void 0!==e.getRankingScore(t))return e.getRankingScore(t);var o=r(t),a=o(e,n,i);return e.setRankingScore(t,a),a}function s(e,t,n){return function(i,r){return e instanceof Array?u(e,i,r,t,n):a(r,e,t,n).score-a(i,e,t,n).score}}function l(e,t,n){return function(i,r){var o=i.getTopSpecQueryModel(),s=r.getTopSpecQueryModel();return e instanceof Array?u(e,o,s,t,n):a(s,e,t,n).score-a(o,e,t,n).score}}function u(e,t,n,i,r){for(var o=0;o<e.length;o++){var s=a(n,e[o],i,r).score-a(t,e[o],i,r).score;if(0!==s)return s}return 0}n.effectiveness=e("./effectiveness/effectiveness"),n.aggregation=e("./aggregation");var c={};n.register=i,n.get=r,n.rank=o,n.getScore=a,n.comparatorFactory=s,n.groupComparatorFactory=l,n.EFFECTIVENESS="effectiveness",i(n.EFFECTIVENESS,n.effectiveness["default"]),i(n.aggregation.name,n.aggregation.score)},{"./aggregation":28,"./effectiveness/effectiveness":30}],34:[function(e,t,n){"use strict";function i(e,t){var n=h({min:t.min,max:t.max,maxbins:e}),i=p.extend({},t);return i.unique=o(n,t.unique),i.distinct=(n.stop-n.start)/n.step,i.min=n.start,i.max=n.stop,i}function r(e,t){var n=p.extend({},t),i={};return p.keys(t.unique).forEach(function(n){var r,o="null"===n?null:new Date(n);r=null===o?null:isNaN(o.getTime())?"Invalid Date":(e===u.TimeUnit.DAY?o.getDay():u.convert(e,o)).toString(),i[r]=(i[r]||0)+t.unique[n]}),n.unique=i,n.distinct=p.keys(i).length,n}function o(e,t){var n={};for(var i in t){var r=void 0;r=null===i?null:isNaN(Number(i))?NaN:e.value(Number(i)),n[r]=(n[r]||0)+t[i]}return n}function a(e,t){return t.reduce(function(t,n){return e[n]?t+1:t},0)}var s=e("vega-lite/src/type"),l=e("vega-lite/src/bin"),u=e("vega-lite/src/timeunit"),c=e("datalib/src/stats"),f=e("datalib/src/import/type"),h=e("datalib/src/bins/bins"),d=e("./config"),p=e("./util"),g=function(){function e(e){this._fieldSchemas=e,this._fieldSchemaIndex=e.reduce(function(e,t){return e[t.field]=t,e},{})}return e.build=function(t,n){void 0===n&&(n={}),n=p.extend({},d.DEFAULT_QUERY_CONFIG,n);var o=c.summary(t),a=f.inferAll(t),l=o.map(function(e){var i,r=e.field,o=a[r],l=e.distinct;if(o===m.NUMBER)i=s.Type.QUANTITATIVE;else if(o===m.INTEGER)i=l<n.numberOrdinalLimit&&l/e.count<n.numberOrdinalProportion?e.max-e.min===l-1&&p.contains([0,1],e.min)?s.Type.NOMINAL:s.Type.ORDINAL:s.Type.QUANTITATIVE;else if(o===m.DATE){i=s.Type.TEMPORAL,e.min=new Date(t[0][r]),e.max=new Date(t[0][r]);for(var u=0;u<t.length;u++){var c=new Date(t[u][r]).getTime();c<e.min.getTime()&&(e.min=new Date(c)),c>e.max.getTime()&&(e.max=new Date(c))}}else i=s.Type.NOMINAL;return{field:r,type:i,primitiveType:o,stats:e,timeStats:{},binStats:{}}}),u={nominal:0,ordinal:1,temporal:2,quantitative:3};l.sort(function(e,t){return u[e.type]<u[t.type]?-1:u[e.type]>u[t.type]?1:e.field.localeCompare(t.field)});for(var h=0,g=l;h<g.length;h++){var v=g[h];if(v.type===s.Type.QUANTITATIVE)for(var y=0,b=n.maxBinsList;y<b.length;y++){var _=b[y];v.binStats[_]=i(_,v.stats)}else if(v.type===s.Type.TEMPORAL)for(var E=0,x=n.timeUnits;E<x.length;E++){var w=x[E];void 0!==w&&(v.timeStats[w]=r(w,v.stats))}}return new e(l)},e.prototype.fields=function(){return this._fieldSchemas.map(function(e){return e.field})},Object.defineProperty(e.prototype,"fieldSchemas",{get:function(){return this._fieldSchemas},enumerable:!0,configurable:!0}),e.prototype.primitiveType=function(e){return this._fieldSchemaIndex[e]?this._fieldSchemaIndex[e].primitiveType:null},e.prototype.type=function(e){return this._fieldSchemaIndex[e]?this._fieldSchemaIndex[e].type:null},e.prototype.cardinality=function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n=!1);var o=this._fieldSchemaIndex[e.field];if(e.aggregate||e.autoCount)return 1;if(e.bin){var s;s="boolean"==typeof e.bin?{maxbins:l.autoMaxBins(e.channel)}:e.bin;var c=s.maxbins;return o.binStats[c]||(o.binStats[c]=i(c,o.stats)),o.binStats[c].distinct}if(e.timeUnit){if(t)switch(e.timeUnit){case u.TimeUnit.SECONDS:return 60;case u.TimeUnit.MINUTES:return 60;case u.TimeUnit.HOURS:return 24;case u.TimeUnit.DAY:return 7;case u.TimeUnit.DATE:return 31;case u.TimeUnit.MONTH:return 12;case u.TimeUnit.QUARTER:return 4;case u.TimeUnit.MILLISECONDS:return 1e3}var f=e.timeUnit,h=o.timeStats;return h[f]||(h[f]=r(e.timeUnit,o.stats)),n?h[f].distinct-a(h[f].unique,["Invalid Date",null]):h[f].distinct}return o?n?o.stats.distinct-a(o.stats.unique,[NaN,null]):o.stats.distinct:null},e.prototype.timeUnitHasVariation=function(e){if(e.timeUnit){if(e.timeUnit===u.TimeUnit.DAY){var t=p.extend({},e,{timeUnit:u.TimeUnit.DATE});if(this.cardinality(t,!1,!0)<=1)return!1}for(var n=e.timeUnit,i=0,r=u.SINGLE_TIMEUNITS;i<r.length;i++){var o=r[i];if(u.containsTimeUnit(n,o)&&(e.timeUnit=o,this.cardinality(e,!1,!0)<=1))return!1}return!0}},e.prototype.domain=function(e){var t=this._fieldSchemaIndex[e.field],n=p.keys(t.stats.unique);return t.type===s.Type.QUANTITATIVE||t.primitiveType===m.DATE?n=[t.stats.min,t.stats.max]:t.primitiveType!==m.INTEGER&&t.primitiveType!==m.NUMBER||(n=n.map(function(e){return+e})),n.sort()},e.prototype.stats=function(e){var t=this._fieldSchemaIndex[e.field];return t?t.stats:null},e}();n.Schema=g,function(e){e[e.STRING="string"]="STRING",e[e.NUMBER="number"]="NUMBER",e[e.INTEGER="integer"]="INTEGER",e[e.BOOLEAN="boolean"]="BOOLEAN",e[e.DATE="date"]="DATE"}(n.PrimitiveType||(n.PrimitiveType={}));var m=n.PrimitiveType},{"./config":9,"./util":36,"datalib/src/bins/bins":3,"datalib/src/import/type":5,"datalib/src/stats":6,"vega-lite/src/bin":44,"vega-lite/src/timeunit":54,"vega-lite/src/type":55}],35:[function(e,t,n){"use strict";function i(e,t,n){var i={};return e=e.map(function(e){return n.smallBandSizeForHighCardinalityOrFacet&&(e=r(e,t,i,n)),n.nominalColorScaleForHighCardinality&&(e=o(e,t,i,n)),n.xAxisOnTopForHighYCardinalityWithoutColumn&&(e=a(e,t,i,n)),e})}function r(e,t,n,i){[l.Channel.ROW,l.Channel.Y,l.Channel.COLUMN,l.Channel.X].forEach(function(t){n[t]=e.getEncodingQueryByChannel(t)});var r=n[l.Channel.Y];void 0!==r&&(n[l.Channel.ROW]||t.cardinality(r)>i.smallBandSizeForHighCardinalityOrFacet.maxCardinality)&&(void 0===r.scale&&(r.scale={}),r.scale&&h.contains([u.ScaleType.ORDINAL,void 0],f.scaleType(r))&&(r.scale.bandSize||(r.scale.bandSize=12)));var o=n[l.Channel.X];return void 0!==o&&(n[l.Channel.COLUMN]||t.cardinality(o)>i.smallBandSizeForHighCardinalityOrFacet.maxCardinality)&&(void 0===o.scale&&(o.scale={}),o.scale&&h.contains([u.ScaleType.ORDINAL,void 0],f.scaleType(o))&&(o.scale.bandSize||(o.scale.bandSize=12))),e}function o(e,t,n,i){n[l.Channel.COLOR]=e.getEncodingQueryByChannel(l.Channel.COLOR);var r=n[l.Channel.COLOR];return void 0!==r&&r.type===c.Type.NOMINAL&&t.cardinality(r)>i.nominalColorScaleForHighCardinality.maxCardinality&&(void 0===r.scale&&(r.scale={}),r.scale&&(r.scale.range||(r.scale.range=i.nominalColorScaleForHighCardinality.palette))),e}function a(e,t,n,i){if([l.Channel.COLUMN,l.Channel.X,l.Channel.Y].forEach(function(t){n[t]=e.getEncodingQueryByChannel(t)}),void 0===n[l.Channel.COLUMN]){var r=n[l.Channel.X],o=n[l.Channel.Y];void 0!==o&&o.field&&f.scaleType(o)===u.ScaleType.ORDINAL&&void 0!==r&&t.cardinality(o)>i.xAxisOnTopForHighYCardinalityWithoutColumn.maxCardinality&&(void 0===r.axis&&(r.axis={}),r.axis&&!r.axis.orient&&(r.axis.orient=s.AxisOrient.TOP))}return e}var s=e("vega-lite/src/axis"),l=e("vega-lite/src/channel"),u=e("vega-lite/src/scale"),c=e("vega-lite/src/type"),f=e("./query/encoding"),h=e("./util");n.stylize=i,n.smallBandSizeForHighCardinalityOrFacet=r,n.nominalColorScaleForHighCardinality=o,n.xAxisOnTopForHighYCardinalityWithoutColumn=a},{"./query/encoding":22,"./util":36,"vega-lite/src/axis":43,"vega-lite/src/channel":45,"vega-lite/src/scale":51,"vega-lite/src/type":55}],36:[function(e,t,n){"use strict";function i(e,t){return e.indexOf(t)!==-1}function r(e,t){var n,i=0;for(n in e)if(!t(e[n],n,i++))return!1;return!0}function o(e,t,n){if(e.forEach)e.forEach.call(n,t);else for(var i in e)t.call(n,e[i],i,e)}function a(e,t){var n,i=0;for(n in e)if(t(e[n],n,i++))return!0;return!1}function s(e,t){return e.map(function(e){return u.isArray(e)?s(e,t):t(e)})}function l(e,t){return e.filter(function(e){return!i(t,e)})}var u=e("datalib/src/util"),c=e("datalib/src/util");n.keys=c.keys,n.duplicate=c.duplicate,n.extend=c.extend,n.isObject=c.isObject,n.isArray=c.isArray,n.contains=i,n.every=r,n.forEach=o,n.some=a,n.nestedMap=s,n.without=l},{"datalib/src/util":8}],37:[function(e,t,n){(function(e){function n(e,t){var n,i="";for(n=0;n<e;++n)i+=t;return i}function i(e,t,n){var i=0,r=e.split(l);return e=n?(r=r.reverse()).filter(function(e){return i+=e.length,i<=t}).reverse():r.filter(function(e){return i+=e.length,i<=t}),e.length?e.join("").trim():r[0].slice(0,t)}var r=t.exports,o="__name__";r.namedfunc=function(e,t){return t[o]=e,t},r.name=function(e){return null==e?null:e[o]},r.identity=function(e){return e},r["true"]=r.namedfunc("true",function(){return!0}),r["false"]=r.namedfunc("false",function(){return!1}),r.duplicate=function(e){return JSON.parse(JSON.stringify(e))},r.equal=function(e,t){return JSON.stringify(e)===JSON.stringify(t)},r.extend=function(e){for(var t,n,i=1,r=arguments.length;i<r;++i){t=arguments[i];for(n in t)e[n]=t[n]}return e},r.length=function(e){return null!=e&&null!=e.length?e.length:null},r.keys=function(e){var t,n=[];for(t in e)n.push(t);return n},r.vals=function(e){var t,n=[];for(t in e)n.push(e[t]);return n},r.toMap=function(e,t){return(t=r.$(t))?e.reduce(function(e,n){return e[t(n)]=1,e},{}):e.reduce(function(e,t){return e[t]=1,e},{})},r.keystr=function(e){var t=e.length;if(!t)return"";for(var n=String(e[0]),i=1;i<t;++i)n+="|"+String(e[i]);return n};var a=Object.prototype.toString;r.isObject=function(e){return e===Object(e)},r.isFunction=function(e){return"[object Function]"===a.call(e)},r.isString=function(e){return"string"==typeof value||"[object String]"===a.call(e)},r.isArray=Array.isArray||function(e){return"[object Array]"===a.call(e)},r.isNumber=function(e){return"number"==typeof e||"[object Number]"===a.call(e)},r.isBoolean=function(e){return e===!0||e===!1||"[object Boolean]"==a.call(e)},r.isDate=function(e){return"[object Date]"===a.call(e)},r.isValid=function(e){return null!=e&&e===e},r.isBuffer="function"==typeof e&&e.isBuffer||r["false"],r.number=function(e){return null==e||""===e?null:+e},r["boolean"]=function(e){return null==e||""===e?null:"false"!==e&&!!e},r.date=function(e,t){var n=t?t:Date;return null==e||""===e?null:n.parse(e)},r.array=function(e){return null!=e?r.isArray(e)?e:[e]:[]},r.str=function(e){return r.isArray(e)?"["+e.map(r.str)+"]":r.isObject(e)||r.isString(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e};var s=/\[(.*?)\]|[^.\[]+/g;r.field=function(e){return String(e).match(s).map(function(e){return"["!==e[0]?e:"'"!==e[1]&&'"'!==e[1]?e.slice(1,-1):e.slice(2,-2).replace(/\\(["'])/g,"$1")})},r.accessor=function(e){return null==e||r.isFunction(e)?e:r.namedfunc(e,Function("x","return x["+r.field(e).map(r.str).join("][")+"];"))},r.$=r.accessor,r.mutator=function(e){var t;return r.isString(e)&&(t=r.field(e)).length>1?function(e,n){for(var i=0;i<t.length-1;++i)e=e[t[i]];e[t[i]]=n}:function(t,n){t[e]=n}},r.$func=function(e,t){return function(n){n=r.$(n)||r.identity;var i=e+(r.name(n)?"_"+r.name(n):"");return r.namedfunc(i,function(e){return t(n(e))})}},r.$valid=r.$func("valid",r.isValid),r.$length=r.$func("length",r.length),r.$in=function(e,t){e=r.$(e);var n=r.isArray(t)?r.toMap(t):t;return function(t){return!!n[e(t)]}},r.comparator=function(e){var t=[];return void 0===e&&(e=[]),e=r.array(e).map(function(e){var n=1;return"-"===e[0]?(n=-1,e=e.slice(1)):"+"===e[0]&&(n=1,e=e.slice(1)),t.push(n),r.accessor(e)}),function(n,i){var o,a,s,l;for(o=0,a=e.length;o<a;++o)if(s=e[o],l=r.cmp(s(n),s(i)))return l*t[o];return 0}},r.cmp=function(e,t){return(e<t||null==e)&&null!=t?-1:(e>t||null==t)&&null!=e?1:(t=t instanceof Date?+t:t,(e=e instanceof Date?+e:e)!==e&&t===t?-1:t!==t&&e===e?1:0)},r.numcmp=function(e,t){return e-t},r.stablesort=function(e,t,n){var i=e.reduce(function(e,t,i){return e[n(t)]=i,e},{});return e.sort(function(e,r){var o=t(e),a=t(r);return o<a?-1:o>a?1:i[n(e)]-i[n(r)]}),e},r.permute=function(e){for(var t,n,i=e.length;i;)n=Math.floor(Math.random()*i--),t=e[i],e[i]=e[n],e[n]=t},r.pad=function(e,t,i,r){r=r||" ";var o=t-e.length;if(o<=0)return e;switch(i){case"left":return n(o,r)+e;case"middle":case"center":return n(Math.floor(o/2),r)+e+n(Math.ceil(o/2),r);default:return e+n(o,r)}},r.truncate=function(e,t,n,r,o){var a=e.length;if(a<=t)return e;o=void 0!==o?String(o):"…";var s=Math.max(0,t-o.length);switch(n){case"left":return o+(r?i(e,s,1):e.slice(a-s));case"middle":case"center":var l=Math.ceil(s/2),u=Math.floor(s/2);return(r?i(e,l):e.slice(0,l))+o+(r?i(e,u,1):e.slice(a-u));default:return(r?i(e,s):e.slice(0,s))+o}};var l=/([\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u2028\u2029\u3000\uFEFF])/}).call(this,e("buffer").Buffer)},{buffer:1}],38:[function(e,t,n){var i="undefined"!=typeof JSON?JSON:e("jsonify");t.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var n=t.space||"";"number"==typeof n&&(n=Array(n+1).join(" "));var a="boolean"==typeof t.cycles&&t.cycles,s=t.replacer||function(e,t){return t},l=t.cmp&&function(e){return function(t){return function(n,i){var r={key:n,value:t[n]},o={key:i,value:t[i]};return e(r,o)}}}(t.cmp),u=[];return function c(e,t,f,h){var d=n?"\n"+new Array(h+1).join(n):"",p=n?": ":":";if(f&&f.toJSON&&"function"==typeof f.toJSON&&(f=f.toJSON()),f=s.call(e,t,f),void 0!==f){if("object"!=typeof f||null===f)return i.stringify(f);if(r(f)){for(var g=[],m=0;m<f.length;m++){var v=c(f,m,f[m],h+1)||i.stringify(null);g.push(d+n+v)}return"["+g.join(",")+d+"]"}if(u.indexOf(f)!==-1){if(a)return i.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}u.push(f);for(var y=o(f).sort(l&&l(f)),g=[],m=0;m<y.length;m++){var t=y[m],b=c(f,t,f[t],h+1);if(b){var _=i.stringify(t)+p+b;g.push(d+n+_)}}return u.splice(u.indexOf(f),1),"{"+g.join(",")+d+"}"}}({"":e},"",e,0)};var r=Array.isArray||function(e){return"[object Array]"==={}.toString.call(e)},o=Object.keys||function(e){var t=Object.prototype.hasOwnProperty||function(){return!0},n=[];for(var i in e)t.call(e,i)&&n.push(i);return n}},{jsonify:39}],39:[function(e,t,n){n.parse=e("./lib/parse"),n.stringify=e("./lib/stringify")},{"./lib/parse":40,"./lib/stringify":41}],40:[function(e,t,n){var i,r,o,a,s={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},l=function(e){throw{name:"SyntaxError",message:e,at:i,text:o}},u=function(e){return e&&e!==r&&l("Expected '"+e+"' instead of '"+r+"'"),r=o.charAt(i),i+=1,r},c=function(){var e,t="";for("-"===r&&(t="-",u("-"));r>="0"&&r<="9";)t+=r,u();if("."===r)for(t+=".";u()&&r>="0"&&r<="9";)t+=r;if("e"===r||"E"===r)for(t+=r,u(),"-"!==r&&"+"!==r||(t+=r,u());r>="0"&&r<="9";)t+=r,u();return e=+t,isFinite(e)?e:void l("Bad number")},f=function(){var e,t,n,i="";if('"'===r)for(;u();){if('"'===r)return u(),i;if("\\"===r)if(u(),"u"===r){for(n=0,t=0;t<4&&(e=parseInt(u(),16),isFinite(e));t+=1)n=16*n+e;i+=String.fromCharCode(n)}else{if("string"!=typeof s[r])break;i+=s[r]}else i+=r}l("Bad string")},h=function(){for(;r&&r<=" ";)u()},d=function(){switch(r){case"t":return u("t"),u("r"),u("u"),u("e"),!0;case"f":return u("f"),u("a"),u("l"),u("s"),u("e"),!1;case"n":return u("n"),u("u"),u("l"),u("l"),null}l("Unexpected '"+r+"'")},p=function(){var e=[];if("["===r){if(u("["),h(),"]"===r)return u("]"),e;for(;r;){if(e.push(a()),h(),"]"===r)return u("]"),e;u(","),h()}}l("Bad array")},g=function(){var e,t={};if("{"===r){if(u("{"),h(),"}"===r)return u("}"),t;for(;r;){if(e=f(),h(),u(":"),Object.hasOwnProperty.call(t,e)&&l('Duplicate key "'+e+'"'),t[e]=a(),h(),"}"===r)return u("}"),t;u(","),h()}}l("Bad object")};a=function(){switch(h(),r){case"{":return g();case"[":return p();case'"':return f();case"-":return c();default:return r>="0"&&r<="9"?c():d()}},t.exports=function(e,t){var n;return o=e,i=0,r=" ",n=a(),h(),r&&l("Syntax error"),"function"==typeof t?function s(e,n){var i,r,o=e[n];if(o&&"object"==typeof o)for(i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r=s(o,i),void 0!==r?o[i]=r:delete o[i]);return t.call(e,n,o)}({"":n},""):n}},{}],41:[function(e,t,n){function i(e){return l.lastIndex=0,l.test(e)?'"'+e.replace(l,function(e){var t=u[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function r(e,t){var n,l,u,c,f,h=o,d=t[e];switch(d&&"object"==typeof d&&"function"==typeof d.toJSON&&(d=d.toJSON(e)),"function"==typeof s&&(d=s.call(t,e,d)),typeof d){case"string":return i(d);case"number":return isFinite(d)?String(d):"null";case"boolean":case"null":return String(d);case"object":if(!d)return"null";if(o+=a,f=[],"[object Array]"===Object.prototype.toString.apply(d)){for(c=d.length,n=0;n<c;n+=1)f[n]=r(n,d)||"null";return u=0===f.length?"[]":o?"[\n"+o+f.join(",\n"+o)+"\n"+h+"]":"["+f.join(",")+"]",o=h,u}if(s&&"object"==typeof s)for(c=s.length,n=0;n<c;n+=1)l=s[n],"string"==typeof l&&(u=r(l,d),u&&f.push(i(l)+(o?": ":":")+u));else for(l in d)Object.prototype.hasOwnProperty.call(d,l)&&(u=r(l,d),u&&f.push(i(l)+(o?": ":":")+u));return u=0===f.length?"{}":o?"{\n"+o+f.join(",\n"+o)+"\n"+h+"}":"{"+f.join(",")+"}",o=h,u}}var o,a,s,l=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,u={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};t.exports=function(e,t,n){var i;if(o="",a="","number"==typeof n)for(i=0;i<n;i+=1)a+=" ";else"string"==typeof n&&(a=n);if(s=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return r("",{"":e})}},{}],42:[function(e,t,n){"use strict";!function(e){e[e.VALUES="values"]="VALUES",e[e.COUNT="count"]="COUNT",e[e.VALID="valid"]="VALID",e[e.MISSING="missing"]="MISSING",e[e.DISTINCT="distinct"]="DISTINCT",e[e.SUM="sum"]="SUM",e[e.MEAN="mean"]="MEAN",e[e.AVERAGE="average"]="AVERAGE",e[e.VARIANCE="variance"]="VARIANCE",e[e.VARIANCEP="variancep"]="VARIANCEP",e[e.STDEV="stdev"]="STDEV",e[e.STDEVP="stdevp"]="STDEVP",e[e.MEDIAN="median"]="MEDIAN",e[e.Q1="q1"]="Q1",e[e.Q3="q3"]="Q3",e[e.MODESKEW="modeskew"]="MODESKEW",e[e.MIN="min"]="MIN",e[e.MAX="max"]="MAX",e[e.ARGMIN="argmin"]="ARGMIN",e[e.ARGMAX="argmax"]="ARGMAX"}(n.AggregateOp||(n.AggregateOp={}));var i=n.AggregateOp;n.AGGREGATE_OPS=[i.VALUES,i.COUNT,i.VALID,i.MISSING,i.DISTINCT,i.SUM,i.MEAN,i.AVERAGE,i.VARIANCE,i.VARIANCEP,i.STDEV,i.STDEVP,i.MEDIAN,i.Q1,i.Q3,i.MODESKEW,i.MIN,i.MAX,i.ARGMIN,i.ARGMAX],n.SUM_OPS=[i.COUNT,i.SUM,i.DISTINCT],n.SHARED_DOMAIN_OPS=[i.MEAN,i.AVERAGE,i.STDEV,i.STDEVP,i.MEDIAN,i.Q1,i.Q3,i.MIN,i.MAX]},{}],43:[function(e,t,n){"use strict";!function(e){e[e.TOP="top"]="TOP",e[e.RIGHT="right"]="RIGHT",e[e.LEFT="left"]="LEFT",e[e.BOTTOM="bottom"]="BOTTOM"}(n.AxisOrient||(n.AxisOrient={}));n.AxisOrient;n.defaultAxisConfig={offset:void 0,grid:void 0,labels:!0,labelMaxLength:25,tickSize:void 0,characterWidth:6},n.defaultFacetAxisConfig={axisWidth:0,labels:!0,grid:!1,tickSize:0}},{}],44:[function(e,t,n){"use strict";function i(e){switch(e){case r.ROW:case r.COLUMN:case r.SIZE:case r.SHAPE:return 6;default:return 10}}var r=e("./channel");n.autoMaxBins=i},{"./channel":45}],45:[function(e,t,n){"use strict";function i(e,t){return!!r(e)[t]}function r(e){switch(e){case n.X:case n.Y:case n.COLOR:case n.DETAIL:case n.ORDER:case n.OPACITY:case n.ROW:case n.COLUMN:return{point:!0,tick:!0,rule:!0,circle:!0,square:!0,bar:!0,line:!0,area:!0,text:!0};case n.X2:case n.Y2:return{rule:!0,bar:!0,area:!0};case n.SIZE:return{point:!0,tick:!0,rule:!0,circle:!0,square:!0,bar:!0,text:!0};case n.SHAPE:return{point:!0};case n.TEXT:return{text:!0};case n.PATH:return{line:!0}}return{}}function o(e){switch(e){case n.X:case n.Y:case n.COLOR:case n.OPACITY:case n.LABEL:case n.DETAIL:return{measure:!0,dimension:!0};case n.ROW:case n.COLUMN:case n.SHAPE:return{measure:!1,dimension:!0};case n.X2:case n.Y2:case n.SIZE:case n.TEXT:return{measure:!0,dimension:!1};case n.PATH:return{measure:!1,dimension:!0}}throw new Error("Invalid encoding channel"+e)}function a(e){return!s.contains([n.DETAIL,n.PATH,n.TEXT,n.LABEL,n.ORDER],e)}var s=e("./util");!function(e){e[e.X="x"]="X",e[e.Y="y"]="Y",e[e.X2="x2"]="X2",e[e.Y2="y2"]="Y2",e[e.ROW="row"]="ROW",e[e.COLUMN="column"]="COLUMN",e[e.SHAPE="shape"]="SHAPE",e[e.SIZE="size"]="SIZE",e[e.COLOR="color"]="COLOR",e[e.TEXT="text"]="TEXT",e[e.DETAIL="detail"]="DETAIL",e[e.LABEL="label"]="LABEL",e[e.PATH="path"]="PATH",e[e.ORDER="order"]="ORDER",e[e.OPACITY="opacity"]="OPACITY"}(n.Channel||(n.Channel={}));var l=n.Channel;n.X=l.X,n.Y=l.Y,n.X2=l.X2,n.Y2=l.Y2,n.ROW=l.ROW,n.COLUMN=l.COLUMN,n.SHAPE=l.SHAPE,n.SIZE=l.SIZE,n.COLOR=l.COLOR,n.TEXT=l.TEXT,n.DETAIL=l.DETAIL,n.LABEL=l.LABEL,n.PATH=l.PATH,n.ORDER=l.ORDER,n.OPACITY=l.OPACITY,n.CHANNELS=[n.X,n.Y,n.X2,n.Y2,n.ROW,n.COLUMN,n.SIZE,n.SHAPE,n.COLOR,n.PATH,n.ORDER,n.OPACITY,n.TEXT,n.DETAIL,n.LABEL],n.UNIT_CHANNELS=s.without(n.CHANNELS,[n.ROW,n.COLUMN]),n.UNIT_SCALE_CHANNELS=s.without(n.UNIT_CHANNELS,[n.PATH,n.ORDER,n.DETAIL,n.TEXT,n.LABEL,n.X2,n.Y2]),n.NONSPATIAL_CHANNELS=s.without(n.UNIT_CHANNELS,[n.X,n.Y,n.X2,n.Y2]),n.NONSPATIAL_SCALE_CHANNELS=s.without(n.UNIT_SCALE_CHANNELS,[n.X,n.Y,n.X2,n.Y2]),n.STACK_GROUP_CHANNELS=[n.COLOR,n.DETAIL,n.ORDER,n.OPACITY,n.SIZE],n.supportMark=i,n.getSupportedMark=r,n.getSupportedRole=o,n.hasScale=a},{"./util":56}],46:[function(e,t,n){"use strict";function i(e){return!!(e.year||e.quarter||e.month||e.date||e.day||e.hours||e.minutes||e.seconds||e.milliseconds)}function r(e){return l.isNumber(e)?e-1+"":(console.warn("Potentially invalid quarter",e),e)}function o(e){if(l.isNumber(e))return e-1+"";var t=e.toLowerCase(),i=n.MONTHS.indexOf(t);if(i!==-1)return i+"";var r=t.substr(0,3),o=n.SHORT_MONTHS.indexOf(r);return o!==-1?o+"":(console.warn("Potentially invalid month",e),e)}function a(e){if(l.isNumber(e))return e%7+"";var t=e.toLowerCase(),i=n.DAYS.indexOf(t);if(i!==-1)return i+"";var r=t.substr(0,3),o=n.SHORT_DAYS.indexOf(r);return o!==-1?o+"":(console.warn("Potentially invalid day",e),e)}function s(e,t){void 0===t&&(t=!1);var n=[];if(t&&void 0!==e.day)for(var i=0,s=["year","quarter","month","date"];i<s.length;i++){var u=s[i];if(void 0!==e[u]){console.warn("Dropping day from datetime",JSON.stringify(e),"as day cannot be combined with",u),e=l.duplicate(e),delete e.day;break}}if(void 0!==e.year?n.push(e.year):void 0!==e.day?n.push(2006):n.push(0),void 0!==e.month){var c=t?o(e.month):e.month;n.push(c)}else if(void 0!==e.quarter){var f=t?r(e.quarter):e.quarter;n.push(f+"*3")}else n.push(0);if(void 0!==e.date)n.push(e.date);else if(void 0!==e.day){var h=t?a(e.day):e.day;n.push(h+"+1")}else n.push(1);for(var d=0,p=["hours","minutes","seconds","milliseconds"];d<p.length;d++){var g=p[d];void 0!==e[g]?n.push(e[g]):n.push(0)}return"datetime("+n.join(", ")+")"}var l=e("./util");n.isDateTime=i,n.MONTHS=["january","february","march","april","may","june","july","august","september","october","november","december"],n.SHORT_MONTHS=n.MONTHS.map(function(e){return e.substr(0,3)}),n.DAYS=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],n.SHORT_DAYS=n.DAYS.map(function(e){return e.substr(0,3)}),n.dateTimeExpr=s},{"./util":56}],47:[function(e,t,n){"use strict";function i(e){var t=0;return e.color&&t++,e.opacity&&t++,e.size&&t++,e.shape&&t++,t}function r(e){return g.CHANNELS.filter(function(t){return o(e,t)})}function o(e,t){var n=e&&e[t];return n&&(void 0!==n.field||m.isArray(n)&&n.length>0)}function a(e){return m.some(g.CHANNELS,function(t){return!(!o(e,t)||!e[t].aggregate)})}function s(e){return e&&(!!e.x&&!!e.x2||!!e.y&&!!e.y2)}function l(e){var t=[];return g.CHANNELS.forEach(function(n){o(e,n)&&(m.isArray(e[n])?e[n].forEach(function(e){t.push(e)}):t.push(e[n]))}),t}function u(e,t,n){c(g.CHANNELS,e,t,n)}function c(e,t,n,i){var r=0;e.forEach(function(e){o(t,e)&&(m.isArray(t[e])?t[e].forEach(function(t){n.call(i,t,e,r++)}):n.call(i,t[e],e,r++))})}function f(e,t,n){return h(g.CHANNELS,e,t,n)}function h(e,t,n,i){var r=[];return e.forEach(function(e){o(t,e)&&(m.isArray(t[e])?t[e].forEach(function(t){r.push(n.call(i,t,e))}):r.push(n.call(i,t[e],e)))}),r}function d(e,t,n,i){return p(g.CHANNELS,e,t,n,i)}function p(e,t,n,i,r){var a=i;return g.CHANNELS.forEach(function(e){o(t,e)&&(m.isArray(t[e])?t[e].forEach(function(t){a=n.call(r,a,t,e)}):a=n.call(r,a,t[e],e))}),a}var g=e("./channel"),m=e("./util");n.countRetinal=i,n.channels=r,n.has=o,n.isAggregate=a,n.isRanged=s,n.fieldDefs=l,n.forEach=u,n.channelMappingForEach=c,n.map=f,n.channelMappingMap=h,n.reduce=d,n.channelMappingReduce=p},{"./channel":45,"./util":56}],48:[function(e,t,n){"use strict";function i(e,t){void 0===t&&(t={});var n=e.field,i=t.prefix,r=t.suffix;if(l(e))n="count";else{var o=t.fn;t.nofn||(e.bin?(o="bin",r=t.binSuffix||(t.scaleType===f.ScaleType.ORDINAL?"range":"start")):!t.noAggregate&&e.aggregate?o=String(e.aggregate):e.timeUnit&&(o=String(e.timeUnit))),
o&&(n=o+"_"+n)}return r&&(n=n+"_"+r),i&&(n=i+"_"+n),t.datum&&(n='datum["'+n+'"]'),n}function r(e){return!!d.contains([h.NOMINAL,h.ORDINAL],e.type)||(!!e.bin||e.type===h.TEMPORAL&&!!e.timeUnit)}function o(e){return e&&e.field&&r(e)}function a(e){return e&&e.field&&!r(e)}function s(){return{field:"*",aggregate:c.AggregateOp.COUNT,type:h.QUANTITATIVE}}function l(e){return e.aggregate===c.AggregateOp.COUNT}function u(e,t){if(null!=e.title)return e.title;if(l(e))return t.countTitle;var n=e.aggregate||e.timeUnit||e.bin&&"bin";return n?n.toString().toUpperCase()+"("+e.field+")":e.field}var c=e("./aggregate"),f=e("./scale"),h=e("./type"),d=e("./util");n.field=i,n.isDimension=o,n.isMeasure=a,n.count=s,n.isCount=l,n.title=u},{"./aggregate":42,"./scale":51,"./type":55,"./util":56}],49:[function(e,t,n){"use strict";function i(e){return e&&!!e.field&&void 0!==e.equal}function r(e){return!!(e&&e.field&&f.isArray(e.range)&&2===e.range.length)}function o(e){return e&&!!e.field&&(f.isArray(e.oneOf)||f.isArray(e["in"]))}function a(e){if(f.isString(e))return e;var t=e.timeUnit?"time("+c.fieldExpr(e.timeUnit,e.field)+")":u.field(e,{datum:!0});if(i(e))return t+"==="+s(e.equal,e.timeUnit);if(o(e)){var n=e.oneOf||e["in"];return"indexof(["+n.map(function(t){return s(t,e.timeUnit)}).join(",")+"], "+t+") !== -1"}if(r(e)){var a=e.range[0],l=e.range[1];if(null!==a&&null!==l)return"inrange("+t+", "+s(a,e.timeUnit)+", "+s(l,e.timeUnit)+")";if(null!==a)return t+" >= "+a;if(null!==l)return t+" <= "+l}}function s(e,t){if(l.isDateTime(e)){var n=l.dateTimeExpr(e,!0);return"time("+n+")"}if(c.isSingleTimeUnit(t)){var i={};i[t]=e;var n=l.dateTimeExpr(i,!0);return"time("+n+")"}return JSON.stringify(e)}var l=e("./datetime"),u=e("./fielddef"),c=e("./timeunit"),f=e("./util");n.isEqualFilter=i,n.isRangeFilter=r,n.isOneOfFilter=o,n.expression=a},{"./datetime":46,"./fielddef":48,"./timeunit":54,"./util":56}],50:[function(e,t,n){"use strict";!function(e){e[e.AREA="area"]="AREA",e[e.BAR="bar"]="BAR",e[e.LINE="line"]="LINE",e[e.POINT="point"]="POINT",e[e.TEXT="text"]="TEXT",e[e.TICK="tick"]="TICK",e[e.RULE="rule"]="RULE",e[e.CIRCLE="circle"]="CIRCLE",e[e.SQUARE="square"]="SQUARE",e[e.ERRORBAR="errorBar"]="ERRORBAR"}(n.Mark||(n.Mark={}));var i=n.Mark;n.AREA=i.AREA,n.BAR=i.BAR,n.LINE=i.LINE,n.POINT=i.POINT,n.TEXT=i.TEXT,n.TICK=i.TICK,n.RULE=i.RULE,n.CIRCLE=i.CIRCLE,n.SQUARE=i.SQUARE,n.ERRORBAR=i.ERRORBAR,n.PRIMITIVE_MARKS=[n.AREA,n.BAR,n.LINE,n.POINT,n.TEXT,n.TICK,n.RULE,n.CIRCLE,n.SQUARE]},{}],51:[function(e,t,n){"use strict";!function(e){e[e.LINEAR="linear"]="LINEAR",e[e.LOG="log"]="LOG",e[e.POW="pow"]="POW",e[e.SQRT="sqrt"]="SQRT",e[e.QUANTILE="quantile"]="QUANTILE",e[e.QUANTIZE="quantize"]="QUANTIZE",e[e.ORDINAL="ordinal"]="ORDINAL",e[e.TIME="time"]="TIME",e[e.UTC="utc"]="UTC"}(n.ScaleType||(n.ScaleType={}));n.ScaleType;!function(e){e[e.SECOND="second"]="SECOND",e[e.MINUTE="minute"]="MINUTE",e[e.HOUR="hour"]="HOUR",e[e.DAY="day"]="DAY",e[e.WEEK="week"]="WEEK",e[e.MONTH="month"]="MONTH",e[e.YEAR="year"]="YEAR"}(n.NiceTime||(n.NiceTime={}));n.NiceTime;!function(e){e[e.FIT="fit"]="FIT"}(n.BandSize||(n.BandSize={}));var i=n.BandSize;n.BANDSIZE_FIT=i.FIT,n.defaultScaleConfig={round:!0,textBandWidth:90,bandSize:21,padding:.1,useRawDomain:!1,opacity:[.3,.8],nominalColorRange:"category10",sequentialColorRange:["#AFC6A3","#09622A"],shapeRange:"shapes",fontSizeRange:[8,40],ruleSizeRange:[1,5],tickSizeRange:[1,20]},n.defaultFacetScaleConfig={round:!0,padding:16}},{}],52:[function(e,t,n){"use strict";function i(e){return!!e&&!!e.field&&!!e.op}!function(e){e[e.ASCENDING="ascending"]="ASCENDING",e[e.DESCENDING="descending"]="DESCENDING",e[e.NONE="none"]="NONE"}(n.SortOrder||(n.SortOrder={}));n.SortOrder;n.isSortField=i},{}],53:[function(e,t,n){"use strict";function i(e,t,n){var i=n&&n.mark?n.mark.stacked:void 0;if(s.contains([l.NONE,null,!1],i))return null;if(!s.contains([a.BAR,a.AREA],e))return null;if(!o.isAggregate(t))return null;var u=r.STACK_GROUP_CHANNELS.reduce(function(e,n){return o.has(t,n)&&!t[n].aggregate&&e.push(n),e},[]);if(0===u.length)return null;var c=o.has(t,r.X),f=o.has(t,r.Y),h=c&&!!t.x.aggregate,d=f&&!!t.y.aggregate;return h!==d?{groupbyChannel:h?f?r.Y:null:c?r.X:null,fieldChannel:h?r.X:r.Y,stackByChannels:u,offset:i||l.ZERO}:null}var r=e("./channel"),o=e("./encoding"),a=e("./mark"),s=e("./util");!function(e){e[e.ZERO="zero"]="ZERO",e[e.CENTER="center"]="CENTER",e[e.NORMALIZE="normalize"]="NORMALIZE",e[e.NONE="none"]="NONE"}(n.StackOffset||(n.StackOffset={}));var l=n.StackOffset;n.stack=i},{"./channel":45,"./encoding":47,"./mark":50,"./util":56}],54:[function(e,t,n){"use strict";function i(e){return!!v[e]}function r(e,t){var i=new Date(0,0,1,0,0,0,0);return n.SINGLE_TIMEUNITS.forEach(function(n){if(a(e,n))switch(n){case m.DAY:throw new Error("Cannot convert to TimeUnits containing 'day'");case m.YEAR:i.setFullYear(t.getFullYear());break;case m.QUARTER:i.setMonth(3*Math.floor(t.getMonth()/3));break;case m.MONTH:i.setMonth(t.getMonth());break;case m.DATE:i.setDate(t.getDate());break;case m.HOURS:i.setHours(t.getHours());break;case m.MINUTES:i.setMinutes(t.getMinutes());break;case m.SECONDS:i.setSeconds(t.getSeconds());break;case m.MILLISECONDS:i.setMilliseconds(t.getMilliseconds())}}),i}function o(e){return!!y[e]}function a(e,t){var n=e.toString(),i=t.toString(),r=n.indexOf(i);return r>-1&&(t!==m.SECONDS||0===r||"i"!==n.charAt(r-1))}function s(e){switch(e){case m.HOURS:case m.DAY:case m.MONTH:case m.QUARTER:return p.ScaleType.ORDINAL}return p.ScaleType.TIME}function l(e,t){function i(e){return e===m.QUARTER?"floor(month("+r+")/3)":e+"("+r+")"}var r='datum["'+t+'"]',o=n.SINGLE_TIMEUNITS.reduce(function(t,n){return a(e,n)&&(t[n]=i(n)),t},{});return o.day&&g.keys(o).length>1&&(console.warn('Time unit "'+e+'" is not supported. We are replacing it with ',(e+"").replace("day","date")+"."),delete o.day,o.date=i(m.DATE)),d.dateTimeExpr(o)}function u(e,t){if(g.contains([h.ROW,h.COLUMN,h.SHAPE,h.COLOR],t))return null;switch(e){case m.SECONDS:return g.range(0,60);case m.MINUTES:return g.range(0,60);case m.HOURS:return g.range(0,24);case m.DAY:return g.range(0,7);case m.DATE:return g.range(1,32);case m.MONTH:return g.range(0,12);case m.QUARTER:return[0,3,6,9]}return null}function c(e){if(e)return a(e,m.SECONDS)?"second":a(e,m.MINUTES)?"minute":a(e,m.HOURS)?"hour":a(e,m.DAY)||a(e,m.DATE)?"day":a(e,m.MONTH)?"month":a(e,m.YEAR)?"year":void 0}function f(e,t,n){if(e){var i=[];a(e,m.YEAR)&&i.push(n?"%y":"%Y"),a(e,m.QUARTER)&&i.push("'}}Q{{"+t+" | quarter}}{{"+t+" | time:'"),a(e,m.MONTH)&&i.push(n?"%b":"%B"),a(e,m.DAY)?i.push(n?"%a":"%A"):a(e,m.DATE)&&i.push("%d");var r=[];a(e,m.HOURS)&&r.push("%H"),a(e,m.MINUTES)&&r.push("%M"),a(e,m.SECONDS)&&r.push("%S"),a(e,m.MILLISECONDS)&&r.push("%L");var o=[];if(i.length>0&&o.push(i.join("-")),r.length>0&&o.push(r.join(":")),o.length>0){var s="{{"+t+" | time:'"+o.join(" ")+"'}}",l=t.replace(/(\[|\])/g,"\\$1");return s.replace(new RegExp("{{"+l+" \\| time:''}}","g"),"")}}}var h=e("./channel"),d=e("./datetime"),p=e("./scale"),g=e("./util");!function(e){e[e.YEAR="year"]="YEAR",e[e.MONTH="month"]="MONTH",e[e.DAY="day"]="DAY",e[e.DATE="date"]="DATE",e[e.HOURS="hours"]="HOURS",e[e.MINUTES="minutes"]="MINUTES",e[e.SECONDS="seconds"]="SECONDS",e[e.MILLISECONDS="milliseconds"]="MILLISECONDS",e[e.YEARMONTH="yearmonth"]="YEARMONTH",e[e.YEARMONTHDATE="yearmonthdate"]="YEARMONTHDATE",e[e.YEARMONTHDATEHOURS="yearmonthdatehours"]="YEARMONTHDATEHOURS",e[e.YEARMONTHDATEHOURSMINUTES="yearmonthdatehoursminutes"]="YEARMONTHDATEHOURSMINUTES",e[e.YEARMONTHDATEHOURSMINUTESSECONDS="yearmonthdatehoursminutesseconds"]="YEARMONTHDATEHOURSMINUTESSECONDS",e[e.HOURSMINUTES="hoursminutes"]="HOURSMINUTES",e[e.HOURSMINUTESSECONDS="hoursminutesseconds"]="HOURSMINUTESSECONDS",e[e.MINUTESSECONDS="minutesseconds"]="MINUTESSECONDS",e[e.SECONDSMILLISECONDS="secondsmilliseconds"]="SECONDSMILLISECONDS",e[e.QUARTER="quarter"]="QUARTER",e[e.YEARQUARTER="yearquarter"]="YEARQUARTER",e[e.QUARTERMONTH="quartermonth"]="QUARTERMONTH",e[e.YEARQUARTERMONTH="yearquartermonth"]="YEARQUARTERMONTH"}(n.TimeUnit||(n.TimeUnit={}));var m=n.TimeUnit;n.SINGLE_TIMEUNITS=[m.YEAR,m.QUARTER,m.MONTH,m.DAY,m.DATE,m.HOURS,m.MINUTES,m.SECONDS,m.MILLISECONDS];var v=n.SINGLE_TIMEUNITS.reduce(function(e,t){return e[t]=!0,e},{});n.isSingleTimeUnit=i,n.convert=r,n.MULTI_TIMEUNITS=[m.YEARQUARTER,m.YEARQUARTERMONTH,m.YEARMONTH,m.YEARMONTHDATE,m.YEARMONTHDATEHOURS,m.YEARMONTHDATEHOURSMINUTES,m.YEARMONTHDATEHOURSMINUTESSECONDS,m.QUARTERMONTH,m.HOURSMINUTES,m.HOURSMINUTESSECONDS,m.MINUTESSECONDS,m.SECONDSMILLISECONDS];var y=n.MULTI_TIMEUNITS.reduce(function(e,t){return e[t]=!0,e},{});n.isMultiTimeUnit=o,n.TIMEUNITS=n.SINGLE_TIMEUNITS.concat(n.MULTI_TIMEUNITS),n.containsTimeUnit=a,n.defaultScaleType=s,n.fieldExpr=l,n.rawDomain=u,n.smallestUnit=c,n.template=f},{"./channel":45,"./datetime":46,"./scale":51,"./util":56}],55:[function(e,t,n){"use strict";function i(e){var t=e;return n.TYPE_FROM_SHORT_TYPE[t.toUpperCase()]||t.toLowerCase()}!function(e){e[e.QUANTITATIVE="quantitative"]="QUANTITATIVE",e[e.ORDINAL="ordinal"]="ORDINAL",e[e.TEMPORAL="temporal"]="TEMPORAL",e[e.NOMINAL="nominal"]="NOMINAL"}(n.Type||(n.Type={}));var r=n.Type;n.QUANTITATIVE=r.QUANTITATIVE,n.ORDINAL=r.ORDINAL,n.TEMPORAL=r.TEMPORAL,n.NOMINAL=r.NOMINAL,n.SHORT_TYPE={quantitative:"Q",temporal:"T",nominal:"N",ordinal:"O"},n.TYPE_FROM_SHORT_TYPE={Q:n.QUANTITATIVE,T:n.TEMPORAL,O:n.ORDINAL,N:n.NOMINAL},n.getFullName=i},{}],56:[function(e,t,n){"use strict";function i(e,t){var n={};return t.forEach(function(t){e.hasOwnProperty(t)&&(n[t]=e[t])}),n}function r(e,t,n){if(arguments.length<3&&(n=1,arguments.length<2&&(t=e,e=0)),(t-e)/n===1/0)throw new Error("Infinite range");var i,r=[],o=-1;if(n<0)for(;(i=e+n*++o)>t;)r.push(i);else for(;(i=e+n*++o)<t;)r.push(i);return r}function o(e,t){var n=T.duplicate(e);return t.forEach(function(e){delete n[e]}),n}function a(e){return S.isString(e)||S.isNumber(e)||S.isBoolean(e)?String(e):x(e)}function s(e,t){return e.indexOf(t)>-1}function l(e,t){return e.filter(function(e){return!s(t,e)})}function u(e,t){return e.concat(l(t,e))}function c(e,t,n){if(e.forEach)e.forEach.call(n,t);else for(var i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i,e)}function f(e,t,n,i){if(e.reduce)return e.reduce.call(i,t,n);for(var r in e)e.hasOwnProperty(r)&&(n=t.call(i,n,e[r],r,e));return n}function h(e,t,n){if(e.map)return e.map.call(n,t);var i=[];for(var r in e)e.hasOwnProperty(r)&&i.push(t.call(n,e[r],r,e));return i}function d(e,t){for(var n=0,i=0;i<e.length;i++)if(t(e[i],i,n++))return!0;return!1}function p(e,t){for(var n=0,i=0;i<e.length;i++)if(!t(e[i],i,n++))return!1;return!0}function g(e){return[].concat.apply([],e)}function m(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var i=0;i<t.length;i++)e=v(e,t[i]);return e}function v(e,t){if("object"!=typeof t||null===t)return e;for(var n in t)t.hasOwnProperty(n)&&void 0!==t[n]&&("object"!=typeof t[n]||null===t[n]?e[n]=t[n]:"object"!=typeof e[n]||null===e[n]?e[n]=m(t[n].constructor===Array?[]:{},t[n]):m(e[n],t[n]));return e}function y(e,t){var n,i,r,o=[],a={};for(i=0,r=e.length;i<r;++i)n=t?t(e[i]):e[i],n in a||(a[n]=1,o.push(e[i]));return o}function b(e){console.warn("[VL Warning]",e)}function _(e){console.error("[VL Error]",e)}function E(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t[n]&&e[n]&&t[n]!==e[n])return!0;return!1}var x=e("json-stable-stringify"),w=e("datalib/src/util");n.keys=w.keys,n.extend=w.extend,n.duplicate=w.duplicate,n.isArray=w.isArray,n.vals=w.vals,n.truncate=w.truncate,n.toMap=w.toMap,n.isObject=w.isObject,n.isString=w.isString,n.isNumber=w.isNumber,n.isBoolean=w.isBoolean;var T=e("datalib/src/util"),S=e("datalib/src/util");n.pick=i,n.range=r,n.omit=o,n.hash=a,n.contains=s,n.without=l,n.union=u,n.forEach=c,n.reduce=f,n.map=h,n.some=d,n.every=p,n.flatten=g,n.mergeDeep=m,n.unique=y,n.warning=b,n.error=_,n.differ=E},{"datalib/src/util":37,"json-stable-stringify":38}]},{},[14])(14)}),/*! tether 1.3.4 */
function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t(require,exports,module):e.Tether=t()}(this,function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e){var t=e.getBoundingClientRect(),n={};for(var i in t)n[i]=t[i];if(e.ownerDocument!==document){var o=e.ownerDocument.defaultView.frameElement;if(o){var a=r(o);n.top+=a.top,n.bottom+=a.top,n.left+=a.left,n.right+=a.left}}return n}function o(e){var t=getComputedStyle(e)||{},n=t.position,i=[];if("fixed"===n)return[e];for(var r=e;(r=r.parentNode)&&r&&1===r.nodeType;){var o=void 0;try{o=getComputedStyle(r)}catch(a){}if("undefined"==typeof o||null===o)return i.push(r),i;var s=o,l=s.overflow,u=s.overflowX,c=s.overflowY;/(auto|scroll)/.test(l+c+u)&&("absolute"!==n||["relative","absolute","fixed"].indexOf(o.position)>=0)&&i.push(r)}return i.push(e.ownerDocument.body),e.ownerDocument!==document&&i.push(e.ownerDocument.defaultView),i}function a(){S&&document.body.removeChild(S),S=null}function s(e){var t=void 0;e===document?(t=document,e=document.documentElement):t=e.ownerDocument;var n=t.documentElement,i=r(e),o=k();return i.top-=o.top,i.left-=o.left,"undefined"==typeof i.width&&(i.width=document.body.scrollWidth-i.left-i.right),"undefined"==typeof i.height&&(i.height=document.body.scrollHeight-i.top-i.bottom),i.top=i.top-n.clientTop,i.left=i.left-n.clientLeft,i.right=t.body.clientWidth-i.width-i.left,i.bottom=t.body.clientHeight-i.height-i.top,i}function l(e){return e.offsetParent||document.documentElement}function u(){var e=document.createElement("div");e.style.width="100%",e.style.height="200px";var t=document.createElement("div");c(t.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),t.appendChild(e),document.body.appendChild(t);var n=e.offsetWidth;t.style.overflow="scroll";var i=e.offsetWidth;n===i&&(i=t.clientWidth),document.body.removeChild(t);var r=n-i;return{width:r,height:r}}function c(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=[];return Array.prototype.push.apply(t,arguments),t.slice(1).forEach(function(t){if(t)for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}),e}function f(e,t){if("undefined"!=typeof e.classList)t.split(" ").forEach(function(t){t.trim()&&e.classList.remove(t)});else{var n=new RegExp("(^| )"+t.split(" ").join("|")+"( |$)","gi"),i=p(e).replace(n," ");g(e,i)}}function h(e,t){if("undefined"!=typeof e.classList)t.split(" ").forEach(function(t){t.trim()&&e.classList.add(t)});else{f(e,t);var n=p(e)+(" "+t);g(e,n)}}function d(e,t){if("undefined"!=typeof e.classList)return e.classList.contains(t);var n=p(e);return new RegExp("(^| )"+t+"( |$)","gi").test(n)}function p(e){return e.className instanceof e.ownerDocument.defaultView.SVGAnimatedString?e.className.baseVal:e.className}function g(e,t){e.setAttribute("class",t)}function m(e,t,n){n.forEach(function(n){t.indexOf(n)===-1&&d(e,n)&&f(e,n)}),t.forEach(function(t){d(e,t)||h(e,t)})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function y(e,t){var n=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return e+n>=t&&t>=e-n}function b(){return"undefined"!=typeof performance&&"undefined"!=typeof performance.now?performance.now():+new Date}function _(){for(var e={top:0,left:0},t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];return n.forEach(function(t){var n=t.top,i=t.left;"string"==typeof n&&(n=parseFloat(n,10)),"string"==typeof i&&(i=parseFloat(i,10)),e.top+=n,e.left+=i}),e}function E(e,t){return"string"==typeof e.left&&e.left.indexOf("%")!==-1&&(e.left=parseFloat(e.left,10)/100*t.width),"string"==typeof e.top&&e.top.indexOf("%")!==-1&&(e.top=parseFloat(e.top,10)/100*t.height),e}function x(e,t){return"scrollParent"===t?t=e.scrollParents[0]:"window"===t&&(t=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),t===document&&(t=t.documentElement),"undefined"!=typeof t.nodeType&&!function(){var e=t,n=s(t),i=n,r=getComputedStyle(t);if(t=[i.left,i.top,n.width+i.left,n.height+i.top],e.ownerDocument!==document){var o=e.ownerDocument.defaultView;t[0]+=o.pageXOffset,t[1]+=o.pageYOffset,t[2]+=o.pageXOffset,t[3]+=o.pageYOffset}X.forEach(function(e,n){e=e[0].toUpperCase()+e.substr(1),"Top"===e||"Left"===e?t[n]+=parseFloat(r["border"+e+"Width"]):t[n]-=parseFloat(r["border"+e+"Width"])})}(),t}var w=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),T=void 0;"undefined"==typeof T&&(T={modules:[]});var S=null,A=function(){var e=0;return function(){return++e}}(),C={},k=function(){var e=S;e||(e=document.createElement("div"),e.setAttribute("data-tether-id",A()),c(e.style,{top:0,left:0,position:"absolute"}),document.body.appendChild(e),S=e);var t=e.getAttribute("data-tether-id");return"undefined"==typeof C[t]&&(C[t]=r(e),I(function(){delete C[t]})),C[t]},O=[],I=function(e){O.push(e)},N=function(){for(var e=void 0;e=O.pop();)e()},M=function(){function e(){i(this,e)}return w(e,[{key:"on",value:function(e,t,n){var i=!(arguments.length<=3||void 0===arguments[3])&&arguments[3];"undefined"==typeof this.bindings&&(this.bindings={}),"undefined"==typeof this.bindings[e]&&(this.bindings[e]=[]),this.bindings[e].push({handler:t,ctx:n,once:i})}},{key:"once",value:function(e,t,n){this.on(e,t,n,!0)}},{key:"off",value:function(e,t){if("undefined"!=typeof this.bindings&&"undefined"!=typeof this.bindings[e])if("undefined"==typeof t)delete this.bindings[e];else for(var n=0;n<this.bindings[e].length;)this.bindings[e][n].handler===t?this.bindings[e].splice(n,1):++n}},{key:"trigger",value:function(e){if("undefined"!=typeof this.bindings&&this.bindings[e]){for(var t=0,n=arguments.length,i=Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];for(;t<this.bindings[e].length;){var o=this.bindings[e][t],a=o.handler,s=o.ctx,l=o.once,u=s;"undefined"==typeof u&&(u=this),a.apply(u,i),l?this.bindings[e].splice(t,1):++t}}}}]),e}();T.Utils={getActualBoundingClientRect:r,getScrollParents:o,getBounds:s,getOffsetParent:l,extend:c,addClass:h,removeClass:f,hasClass:d,updateClasses:m,defer:I,flush:N,uniqueId:A,Evented:M,getScrollBarSize:u,removeUtilElements:a};var D=function(){function e(e,t){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);i=!0);}catch(l){r=!0,o=l}finally{try{!i&&s["return"]&&s["return"]()}finally{if(r)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),w=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),L=function(e,t,n){for(var i=!0;i;){var r=e,o=t,a=n;i=!1,null===r&&(r=Function.prototype);var s=Object.getOwnPropertyDescriptor(r,o);if(void 0!==s){if("value"in s)return s.value;var l=s.get;if(void 0===l)return;return l.call(a)}var u=Object.getPrototypeOf(r);if(null===u)return;e=u,t=o,n=a,i=!0,s=u=void 0}};if("undefined"==typeof T)throw new Error("You must include the utils.js file before tether.js");var $=T.Utils,o=$.getScrollParents,s=$.getBounds,l=$.getOffsetParent,c=$.extend,h=$.addClass,f=$.removeClass,m=$.updateClasses,I=$.defer,N=$.flush,u=$.getScrollBarSize,a=$.removeUtilElements,R=function(){if("undefined"==typeof document)return"";for(var e=document.createElement("div"),t=["transform","WebkitTransform","OTransform","MozTransform","msTransform"],n=0;n<t.length;++n){var i=t[n];if(void 0!==e.style[i])return i}}(),P=[],F=function(){P.forEach(function(e){e.position(!1)}),N()};!function(){var e=null,t=null,n=null,i=function r(){return"undefined"!=typeof t&&t>16?(t=Math.min(t-16,250),void(n=setTimeout(r,250))):void("undefined"!=typeof e&&b()-e<10||(null!=n&&(clearTimeout(n),n=null),e=b(),F(),t=b()-e))};"undefined"!=typeof window&&"undefined"!=typeof window.addEventListener&&["resize","scroll","touchmove"].forEach(function(e){window.addEventListener(e,i)})}();var U={center:"center",left:"right",right:"left"},j={middle:"middle",top:"bottom",bottom:"top"},H={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},z=function(e,t){var n=e.left,i=e.top;return"auto"===n&&(n=U[t.left]),"auto"===i&&(i=j[t.top]),{left:n,top:i}},B=function(e){var t=e.left,n=e.top;return"undefined"!=typeof H[e.left]&&(t=H[e.left]),"undefined"!=typeof H[e.top]&&(n=H[e.top]),{left:t,top:n}},q=function(e){var t=e.split(" "),n=D(t,2),i=n[0],r=n[1];return{top:i,left:r}},W=q,Y=function(e){function t(e){var n=this;i(this,t),L(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.position=this.position.bind(this),P.push(this),this.history=[],this.setOptions(e,!1),T.modules.forEach(function(e){"undefined"!=typeof e.initialize&&e.initialize.call(n)}),this.position()}return v(t,e),w(t,[{key:"getClass",value:function(){var e=arguments.length<=0||void 0===arguments[0]?"":arguments[0],t=this.options.classes;return"undefined"!=typeof t&&t[e]?this.options.classes[e]:this.options.classPrefix?this.options.classPrefix+"-"+e:e}},{key:"setOptions",value:function(e){var t=this,n=arguments.length<=1||void 0===arguments[1]||arguments[1],i={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"};this.options=c(i,e);var r=this.options,a=r.element,s=r.target,l=r.targetModifier;if(this.element=a,this.target=s,this.targetModifier=l,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach(function(e){if("undefined"==typeof t[e])throw new Error("Tether Error: Both element and target must be defined");"undefined"!=typeof t[e].jquery?t[e]=t[e][0]:"string"==typeof t[e]&&(t[e]=document.querySelector(t[e]))}),h(this.element,this.getClass("element")),this.options.addTargetClasses!==!1&&h(this.target,this.getClass("target")),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=W(this.options.targetAttachment),this.attachment=W(this.options.attachment),this.offset=q(this.options.offset),this.targetOffset=q(this.options.targetOffset),"undefined"!=typeof this.scrollParents&&this.disable(),"scroll-handle"===this.targetModifier?this.scrollParents=[this.target]:this.scrollParents=o(this.target),this.options.enabled!==!1&&this.enable(n)}},{key:"getTargetBounds",value:function(){if("undefined"==typeof this.targetModifier)return s(this.target);if("visible"===this.targetModifier){if(this.target===document.body)return{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth};var e=s(this.target),t={height:e.height,width:e.width,top:e.top,left:e.left};return t.height=Math.min(t.height,e.height-(pageYOffset-e.top)),t.height=Math.min(t.height,e.height-(e.top+e.height-(pageYOffset+innerHeight))),t.height=Math.min(innerHeight,t.height),t.height-=2,t.width=Math.min(t.width,e.width-(pageXOffset-e.left)),t.width=Math.min(t.width,e.width-(e.left+e.width-(pageXOffset+innerWidth))),t.width=Math.min(innerWidth,t.width),t.width-=2,t.top<pageYOffset&&(t.top=pageYOffset),t.left<pageXOffset&&(t.left=pageXOffset),t}if("scroll-handle"===this.targetModifier){var e=void 0,n=this.target;n===document.body?(n=document.documentElement,e={left:pageXOffset,top:pageYOffset,height:innerHeight,width:innerWidth}):e=s(n);var i=getComputedStyle(n),r=n.scrollWidth>n.clientWidth||[i.overflow,i.overflowX].indexOf("scroll")>=0||this.target!==document.body,o=0;r&&(o=15);var a=e.height-parseFloat(i.borderTopWidth)-parseFloat(i.borderBottomWidth)-o,t={width:15,height:.975*a*(a/n.scrollHeight),left:e.left+e.width-parseFloat(i.borderLeftWidth)-15},l=0;a<408&&this.target===document.body&&(l=-11e-5*Math.pow(a,2)-.00727*a+22.58),this.target!==document.body&&(t.height=Math.max(t.height,24));var u=this.target.scrollTop/(n.scrollHeight-a);return t.top=u*(a-t.height-l)+e.top+parseFloat(i.borderTopWidth),this.target===document.body&&(t.height=Math.max(t.height,24)),t}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(e,t){return"undefined"==typeof this._cache&&(this._cache={}),"undefined"==typeof this._cache[e]&&(this._cache[e]=t.call(this)),this._cache[e]}},{key:"enable",value:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]||arguments[0];this.options.addTargetClasses!==!1&&h(this.target,this.getClass("enabled")),h(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParents.forEach(function(t){t!==e.target.ownerDocument&&t.addEventListener("scroll",e.position)}),t&&this.position()}},{key:"disable",value:function(){var e=this;f(this.target,this.getClass("enabled")),f(this.element,this.getClass("enabled")),this.enabled=!1,"undefined"!=typeof this.scrollParents&&this.scrollParents.forEach(function(t){t.removeEventListener("scroll",e.position)})}},{key:"destroy",value:function(){var e=this;this.disable(),P.forEach(function(t,n){t===e&&P.splice(n,1)}),0===P.length&&a()}},{key:"updateAttachClasses",value:function(e,t){var n=this;e=e||this.attachment,t=t||this.targetAttachment;var i=["left","top","bottom","right","middle","center"];"undefined"!=typeof this._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),"undefined"==typeof this._addAttachClasses&&(this._addAttachClasses=[]);var r=this._addAttachClasses;e.top&&r.push(this.getClass("element-attached")+"-"+e.top),e.left&&r.push(this.getClass("element-attached")+"-"+e.left),t.top&&r.push(this.getClass("target-attached")+"-"+t.top),t.left&&r.push(this.getClass("target-attached")+"-"+t.left);var o=[];i.forEach(function(e){o.push(n.getClass("element-attached")+"-"+e),o.push(n.getClass("target-attached")+"-"+e)}),I(function(){"undefined"!=typeof n._addAttachClasses&&(m(n.element,n._addAttachClasses,o),n.options.addTargetClasses!==!1&&m(n.target,n._addAttachClasses,o),delete n._addAttachClasses)})}},{key:"position",value:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]||arguments[0];if(this.enabled){this.clearCache();var n=z(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,n);var i=this.cache("element-bounds",function(){return s(e.element)}),r=i.width,o=i.height;if(0===r&&0===o&&"undefined"!=typeof this.lastSize){var a=this.lastSize;r=a.width,o=a.height}else this.lastSize={width:r,height:o};var c=this.cache("target-bounds",function(){return e.getTargetBounds()}),f=c,h=E(B(this.attachment),{width:r,height:o}),d=E(B(n),f),p=E(this.offset,{width:r,height:o}),g=E(this.targetOffset,f);h=_(h,p),d=_(d,g);for(var m=c.left+d.left-h.left,v=c.top+d.top-h.top,y=0;y<T.modules.length;++y){var b=T.modules[y],x=b.position.call(this,{left:m,top:v,targetAttachment:n,targetPos:c,elementPos:i,offset:h,targetOffset:d,manualOffset:p,manualTargetOffset:g,scrollbarSize:C,attachment:this.attachment});if(x===!1)return!1;"undefined"!=typeof x&&"object"==typeof x&&(v=x.top,m=x.left)}var w={page:{top:v,left:m},viewport:{top:v-pageYOffset,bottom:pageYOffset-v-o+innerHeight,left:m-pageXOffset,right:pageXOffset-m-r+innerWidth}},S=this.target.ownerDocument,A=S.defaultView,C=void 0;return S.body.scrollWidth>A.innerWidth&&(C=this.cache("scrollbar-size",u),w.viewport.bottom-=C.height),S.body.scrollHeight>A.innerHeight&&(C=this.cache("scrollbar-size",u),w.viewport.right-=C.width),["","static"].indexOf(S.body.style.position)!==-1&&["","static"].indexOf(S.body.parentElement.style.position)!==-1||(w.page.bottom=S.body.scrollHeight-v-o,w.page.right=S.body.scrollWidth-m-r),"undefined"!=typeof this.options.optimizations&&this.options.optimizations.moveElement!==!1&&"undefined"==typeof this.targetModifier&&!function(){var t=e.cache("target-offsetparent",function(){return l(e.target)}),n=e.cache("target-offsetparent-bounds",function(){return s(t)}),i=getComputedStyle(t),r=n,o={};if(["Top","Left","Bottom","Right"].forEach(function(e){o[e.toLowerCase()]=parseFloat(i["border"+e+"Width"])}),n.right=S.body.scrollWidth-n.left-r.width+o.right,n.bottom=S.body.scrollHeight-n.top-r.height+o.bottom,w.page.top>=n.top+o.top&&w.page.bottom>=n.bottom&&w.page.left>=n.left+o.left&&w.page.right>=n.right){var a=t.scrollTop,u=t.scrollLeft;w.offset={top:w.page.top-n.top+a-o.top,left:w.page.left-n.left+u-o.left}}}(),this.move(w),this.history.unshift(w),this.history.length>3&&this.history.pop(),t&&N(),!0}}},{key:"move",value:function(e){var t=this;if("undefined"!=typeof this.element.parentNode){var n={};for(var i in e){n[i]={};for(var r in e[i]){for(var o=!1,a=0;a<this.history.length;++a){var s=this.history[a];if("undefined"!=typeof s[i]&&!y(s[i][r],e[i][r])){o=!0;break}}o||(n[i][r]=!0)}}var u={top:"",left:"",right:"",bottom:""},f=function(e,n){var i="undefined"!=typeof t.options.optimizations,r=i?t.options.optimizations.gpu:null;if(r!==!1){var o=void 0,a=void 0;e.top?(u.top=0,o=n.top):(u.bottom=0,o=-n.bottom),e.left?(u.left=0,a=n.left):(u.right=0,a=-n.right),u[R]="translateX("+Math.round(a)+"px) translateY("+Math.round(o)+"px)","msTransform"!==R&&(u[R]+=" translateZ(0)")}else e.top?u.top=n.top+"px":u.bottom=n.bottom+"px",e.left?u.left=n.left+"px":u.right=n.right+"px"},h=!1;if((n.page.top||n.page.bottom)&&(n.page.left||n.page.right)?(u.position="absolute",f(n.page,e.page)):(n.viewport.top||n.viewport.bottom)&&(n.viewport.left||n.viewport.right)?(u.position="fixed",f(n.viewport,e.viewport)):"undefined"!=typeof n.offset&&n.offset.top&&n.offset.left?!function(){u.position="absolute";var i=t.cache("target-offsetparent",function(){return l(t.target)});l(t.element)!==i&&I(function(){t.element.parentNode.removeChild(t.element),i.appendChild(t.element)}),f(n.offset,e.offset),h=!0}():(u.position="absolute",f({top:!0,left:!0},e.page)),!h){for(var d=!0,p=this.element.parentNode;p&&1===p.nodeType&&"BODY"!==p.tagName;){if("static"!==getComputedStyle(p).position){d=!1;break}p=p.parentNode}d||(this.element.parentNode.removeChild(this.element),this.element.ownerDocument.body.appendChild(this.element))}var g={},m=!1;for(var r in u){var v=u[r],b=this.element.style[r];b!==v&&(m=!0,g[r]=v)}m&&I(function(){c(t.element.style,g),t.trigger("repositioned")})}}}]),t}(M);Y.modules=[],T.position=F;var G=c(Y,T),D=function(){function e(e,t){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);i=!0);}catch(l){r=!0,o=l}finally{try{!i&&s["return"]&&s["return"]()}finally{if(r)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),$=T.Utils,s=$.getBounds,c=$.extend,m=$.updateClasses,I=$.defer,X=["left","top","right","bottom"];T.modules.push({position:function(e){var t=this,n=e.top,i=e.left,r=e.targetAttachment;if(!this.options.constraints)return!0;var o=this.cache("element-bounds",function(){return s(t.element)}),a=o.height,l=o.width;if(0===l&&0===a&&"undefined"!=typeof this.lastSize){var u=this.lastSize;l=u.width,a=u.height}var f=this.cache("target-bounds",function(){return t.getTargetBounds()}),h=f.height,d=f.width,p=[this.getClass("pinned"),this.getClass("out-of-bounds")];this.options.constraints.forEach(function(e){var t=e.outOfBoundsClass,n=e.pinnedClass;t&&p.push(t),n&&p.push(n)}),p.forEach(function(e){["left","top","right","bottom"].forEach(function(t){p.push(e+"-"+t)})});var g=[],v=c({},r),y=c({},this.attachment);return this.options.constraints.forEach(function(e){var o=e.to,s=e.attachment,u=e.pin;"undefined"==typeof s&&(s="");var c=void 0,f=void 0;if(s.indexOf(" ")>=0){var p=s.split(" "),m=D(p,2);f=m[0],c=m[1]}else c=f=s;var b=x(t,o);"target"!==f&&"both"!==f||(n<b[1]&&"top"===v.top&&(n+=h,v.top="bottom"),n+a>b[3]&&"bottom"===v.top&&(n-=h,v.top="top")),"together"===f&&("top"===v.top&&("bottom"===y.top&&n<b[1]?(n+=h,v.top="bottom",n+=a,y.top="top"):"top"===y.top&&n+a>b[3]&&n-(a-h)>=b[1]&&(n-=a-h,v.top="bottom",y.top="bottom")),"bottom"===v.top&&("top"===y.top&&n+a>b[3]?(n-=h,v.top="top",n-=a,y.top="bottom"):"bottom"===y.top&&n<b[1]&&n+(2*a-h)<=b[3]&&(n+=a-h,v.top="top",y.top="top")),"middle"===v.top&&(n+a>b[3]&&"top"===y.top?(n-=a,y.top="bottom"):n<b[1]&&"bottom"===y.top&&(n+=a,y.top="top"))),"target"!==c&&"both"!==c||(i<b[0]&&"left"===v.left&&(i+=d,v.left="right"),i+l>b[2]&&"right"===v.left&&(i-=d,v.left="left")),"together"===c&&(i<b[0]&&"left"===v.left?"right"===y.left?(i+=d,v.left="right",i+=l,y.left="left"):"left"===y.left&&(i+=d,v.left="right",i-=l,y.left="right"):i+l>b[2]&&"right"===v.left?"left"===y.left?(i-=d,v.left="left",i-=l,y.left="right"):"right"===y.left&&(i-=d,v.left="left",i+=l,y.left="left"):"center"===v.left&&(i+l>b[2]&&"left"===y.left?(i-=l,y.left="right"):i<b[0]&&"right"===y.left&&(i+=l,y.left="left"))),"element"!==f&&"both"!==f||(n<b[1]&&"bottom"===y.top&&(n+=a,y.top="top"),n+a>b[3]&&"top"===y.top&&(n-=a,y.top="bottom")),"element"!==c&&"both"!==c||(i<b[0]&&("right"===y.left?(i+=l,y.left="left"):"center"===y.left&&(i+=l/2,y.left="left")),i+l>b[2]&&("left"===y.left?(i-=l,y.left="right"):"center"===y.left&&(i-=l/2,y.left="right"))),"string"==typeof u?u=u.split(",").map(function(e){return e.trim()}):u===!0&&(u=["top","left","right","bottom"]),u=u||[];var _=[],E=[];n<b[1]&&(u.indexOf("top")>=0?(n=b[1],_.push("top")):E.push("top")),n+a>b[3]&&(u.indexOf("bottom")>=0?(n=b[3]-a,_.push("bottom")):E.push("bottom")),i<b[0]&&(u.indexOf("left")>=0?(i=b[0],_.push("left")):E.push("left")),i+l>b[2]&&(u.indexOf("right")>=0?(i=b[2]-l,_.push("right")):E.push("right")),_.length&&!function(){var e=void 0;e="undefined"!=typeof t.options.pinnedClass?t.options.pinnedClass:t.getClass("pinned"),g.push(e),_.forEach(function(t){g.push(e+"-"+t)})}(),E.length&&!function(){var e=void 0;e="undefined"!=typeof t.options.outOfBoundsClass?t.options.outOfBoundsClass:t.getClass("out-of-bounds"),g.push(e),E.forEach(function(t){g.push(e+"-"+t)})}(),(_.indexOf("left")>=0||_.indexOf("right")>=0)&&(y.left=v.left=!1),(_.indexOf("top")>=0||_.indexOf("bottom")>=0)&&(y.top=v.top=!1),v.top===r.top&&v.left===r.left&&y.top===t.attachment.top&&y.left===t.attachment.left||(t.updateAttachClasses(y,v),t.trigger("update",{attachment:y,targetAttachment:v}))}),I(function(){t.options.addTargetClasses!==!1&&m(t.target,g,p),m(t.element,g,p)}),{top:n,left:i}}});var $=T.Utils,s=$.getBounds,m=$.updateClasses,I=$.defer;T.modules.push({position:function(e){var t=this,n=e.top,i=e.left,r=this.cache("element-bounds",function(){return s(t.element)}),o=r.height,a=r.width,l=this.getTargetBounds(),u=n+o,c=i+a,f=[];n<=l.bottom&&u>=l.top&&["left","right"].forEach(function(e){var t=l[e];t!==i&&t!==c||f.push(e)}),i<=l.right&&c>=l.left&&["top","bottom"].forEach(function(e){var t=l[e];t!==n&&t!==u||f.push(e)});var h=[],d=[],p=["left","top","right","bottom"];return h.push(this.getClass("abutted")),p.forEach(function(e){h.push(t.getClass("abutted")+"-"+e)}),f.length&&d.push(this.getClass("abutted")),f.forEach(function(e){d.push(t.getClass("abutted")+"-"+e)}),I(function(){t.options.addTargetClasses!==!1&&m(t.target,d,h),m(t.element,d,h)}),!0}});var D=function(){function e(e,t){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);i=!0);}catch(l){r=!0,o=l}finally{try{!i&&s["return"]&&s["return"]()}finally{if(r)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();return T.modules.push({position:function(e){var t=e.top,n=e.left;if(this.options.shift){var i=this.options.shift;"function"==typeof this.options.shift&&(i=this.options.shift.call(this,{top:t,left:n}));var r=void 0,o=void 0;if("string"==typeof i){i=i.split(" "),i[1]=i[1]||i[0];var a=i,s=D(a,2);r=s[0],o=s[1],r=parseFloat(r,10),o=parseFloat(o,10)}else r=i.top,o=i.left;return t+=r,n+=o,{top:t,left:n}}}}),G}),/*! tether-drop 1.4.1 */
function(e,t){"function"==typeof define&&define.amd?define(["tether"],t):"object"==typeof exports?module.exports=t(require("tether")):e.Drop=t(e.Tether)}(this,function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function i(e){var t=e.split(" "),n=s(t,2),i=n[0],r=n[1];if(["left","right"].indexOf(i)>=0){var o=[r,i];i=o[0],r=o[1]}return[i,r].join(" ")}function r(e,t){for(var n=void 0,i=[];(n=e.indexOf(t))!==-1;)i.push(e.splice(n,1));return i}function o(){var s=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],c=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return new(a.apply(b,[null].concat(t)))};f(c,{createContext:o,drops:[],defaults:{}});var v={classPrefix:"drop",defaults:{position:"bottom left",openOn:"click",beforeClose:null,constrainToScrollParent:!0,constrainToWindow:!0,classes:"",remove:!1,openDelay:0,closeDelay:50,focusDelay:null,blurDelay:null,hoverOpenDelay:null,hoverCloseDelay:null,tetherOptions:{}}};f(c,v,s),f(c.defaults,v.defaults,s.defaults),"undefined"==typeof x[c.classPrefix]&&(x[c.classPrefix]=[]),c.updateBodyClasses=function(){for(var e=!1,t=x[c.classPrefix],n=t.length,i=0;i<n;++i)if(t[i].isOpened()){e=!0;break}e?h(document.body,c.classPrefix+"-open"):d(document.body,c.classPrefix+"-open")};var b=function(o){function a(e){if(t(this,a),u(Object.getPrototypeOf(a.prototype),"constructor",this).call(this),this.options=f({},c.defaults,e),this.target=this.options.target,"undefined"==typeof this.target)throw new Error("Drop Error: You must provide a target.");var n="data-"+c.classPrefix,i=this.target.getAttribute(n);i&&null==this.options.content&&(this.options.content=i);for(var r=["position","openOn"],o=0;o<r.length;++o){var s=this.target.getAttribute(n+"-"+r[o]);s&&null==this.options[r[o]]&&(this.options[r[o]]=s)}this.options.classes&&this.options.addTargetClasses!==!1&&h(this.target,this.options.classes),c.drops.push(this),x[c.classPrefix].push(this),this._boundEvents=[],this.bindMethods(),this.setupElements(),this.setupEvents(),this.setupTether()}return n(a,o),l(a,[{key:"_on",value:function(e,t,n){this._boundEvents.push({element:e,event:t,handler:n}),e.addEventListener(t,n)}},{key:"bindMethods",value:function(){this.transitionEndHandler=this._transitionEndHandler.bind(this)}},{key:"setupElements",value:function(){var e=this;if(this.drop=document.createElement("div"),h(this.drop,c.classPrefix),this.options.classes&&h(this.drop,this.options.classes),this.content=document.createElement("div"),h(this.content,c.classPrefix+"-content"),"function"==typeof this.options.content){var t=function(){var t=e.options.content.call(e,e);if("string"==typeof t)e.content.innerHTML=t;else{if("object"!=typeof t)throw new Error("Drop Error: Content function should return a string or HTMLElement.");e.content.innerHTML="",e.content.appendChild(t)}};t(),this.on("open",t.bind(this))}else"object"==typeof this.options.content?this.content.appendChild(this.options.content):this.content.innerHTML=this.options.content;this.drop.appendChild(this.content)}},{key:"setupTether",value:function(){var t=this.options.position.split(" ");t[0]=E[t[0]],t=t.join(" ");var n=[];this.options.constrainToScrollParent?n.push({to:"scrollParent",pin:"top, bottom",attachment:"together none"}):n.push({to:"scrollParent"}),this.options.constrainToWindow!==!1?n.push({to:"window",attachment:"together"}):n.push({to:"window"});var r={element:this.drop,target:this.target,attachment:i(t),targetAttachment:i(this.options.position),classPrefix:c.classPrefix,offset:"0 0",targetOffset:"0 0",enabled:!1,constraints:n,addTargetClasses:this.options.addTargetClasses};this.options.tetherOptions!==!1&&(this.tether=new e(f({},r,this.options.tetherOptions)))}},{key:"setupEvents",value:function(){var e=this;if(this.options.openOn){if("always"===this.options.openOn)return void setTimeout(this.open.bind(this));var t=this.options.openOn.split(" ");if(t.indexOf("click")>=0)for(var n=function(t){e.toggle(t),t.preventDefault()},i=function(t){e.isOpened()&&(t.target===e.drop||e.drop.contains(t.target)||t.target===e.target||e.target.contains(t.target)||e.close(t))},r=0;r<m.length;++r){var o=m[r];this._on(this.target,o,n),this._on(document,o,i)}var a=null,s=null,l=function(t){null!==s?clearTimeout(s):a=setTimeout(function(){e.open(t),a=null},("focus"===t.type?e.options.focusDelay:e.options.hoverOpenDelay)||e.options.openDelay)},u=function(t){null!==a?clearTimeout(a):s=setTimeout(function(){e.close(t),s=null},("blur"===t.type?e.options.blurDelay:e.options.hoverCloseDelay)||e.options.closeDelay)};t.indexOf("hover")>=0&&(this._on(this.target,"mouseover",l),this._on(this.drop,"mouseover",l),this._on(this.target,"mouseout",u),this._on(this.drop,"mouseout",u)),t.indexOf("focus")>=0&&(this._on(this.target,"focus",l),this._on(this.drop,"focus",l),this._on(this.target,"blur",u),this._on(this.drop,"blur",u))}}},{key:"isOpened",value:function(){if(this.drop)return p(this.drop,c.classPrefix+"-open")}},{key:"toggle",value:function(e){this.isOpened()?this.close(e):this.open(e)}},{key:"open",value:function(e){var t=this;this.isOpened()||(this.drop.parentNode||document.body.appendChild(this.drop),"undefined"!=typeof this.tether&&this.tether.enable(),h(this.drop,c.classPrefix+"-open"),h(this.drop,c.classPrefix+"-open-transitionend"),setTimeout(function(){t.drop&&h(t.drop,c.classPrefix+"-after-open")}),"undefined"!=typeof this.tether&&this.tether.position(),this.trigger("open"),c.updateBodyClasses())}},{key:"_transitionEndHandler",value:function(e){e.target===e.currentTarget&&(p(this.drop,c.classPrefix+"-open")||d(this.drop,c.classPrefix+"-open-transitionend"),this.drop.removeEventListener(y,this.transitionEndHandler))}},{key:"beforeCloseHandler",value:function(e){var t=!0;return this.isClosing||"function"!=typeof this.options.beforeClose||(this.isClosing=!0,t=this.options.beforeClose(e,this)!==!1),this.isClosing=!1,t}},{key:"close",value:function(e){this.isOpened()&&this.beforeCloseHandler(e)&&(d(this.drop,c.classPrefix+"-open"),d(this.drop,c.classPrefix+"-after-open"),this.drop.addEventListener(y,this.transitionEndHandler),this.trigger("close"),"undefined"!=typeof this.tether&&this.tether.disable(),c.updateBodyClasses(),this.options.remove&&this.remove(e))}},{key:"remove",value:function(e){this.close(e),this.drop.parentNode&&this.drop.parentNode.removeChild(this.drop)}},{key:"position",value:function(){this.isOpened()&&"undefined"!=typeof this.tether&&this.tether.position()}},{key:"destroy",value:function(){this.remove(),"undefined"!=typeof this.tether&&this.tether.destroy();for(var e=0;e<this._boundEvents.length;++e){var t=this._boundEvents[e],n=t.element,i=t.event,o=t.handler;n.removeEventListener(i,o)}this._boundEvents=[],this.tether=null,this.drop=null,this.content=null,this.target=null,r(x[c.classPrefix],this),r(c.drops,this)}}]),a}(g);return c}var a=Function.prototype.bind,s=function(){function e(e,t){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);i=!0);}catch(l){r=!0,o=l}finally{try{!i&&s["return"]&&s["return"]()}finally{if(r)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=function(e,t,n){for(var i=!0;i;){var r=e,o=t,a=n;i=!1,null===r&&(r=Function.prototype);var s=Object.getOwnPropertyDescriptor(r,o);if(void 0!==s){if("value"in s)return s.value;var l=s.get;if(void 0===l)return;return l.call(a)}var u=Object.getPrototypeOf(r);if(null===u)return;e=u,t=o,n=a,i=!0,s=u=void 0}},c=e.Utils,f=c.extend,h=c.addClass,d=c.removeClass,p=c.hasClass,g=c.Evented,m=["click"];"ontouchstart"in document.documentElement&&m.push("touchstart");var v={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"},y="";for(var b in v)if({}.hasOwnProperty.call(v,b)){var _=document.createElement("p");"undefined"!=typeof _.style[b]&&(y=v[b])}var E={left:"right",right:"left",top:"bottom",bottom:"top",middle:"middle",center:"center"},x={},w=o();return document.addEventListener("DOMContentLoaded",function(){w.updateBodyClasses()}),w}),function(){var e,t,n,i,r,o,a,s,l,u,c,f,h,d,p;n=Math.floor,u=Math.min,t=function(e,t){return e<t?-1:e>t?1:0},l=function(e,i,r,o,a){var s;if(null==r&&(r=0),null==a&&(a=t),r<0)throw new Error("lo must be non-negative");for(null==o&&(o=e.length);r<o;)s=n((r+o)/2),a(i,e[s])<0?o=s:r=s+1;return[].splice.apply(e,[r,r-r].concat(i)),i},o=function(e,n,i){return null==i&&(i=t),e.push(n),d(e,0,e.length-1,i)},r=function(e,n){var i,r;return null==n&&(n=t),i=e.pop(),e.length?(r=e[0],e[0]=i,p(e,0,n)):r=i,r},s=function(e,n,i){var r;return null==i&&(i=t),r=e[0],e[0]=n,p(e,0,i),r},a=function(e,n,i){var r;return null==i&&(i=t),e.length&&i(e[0],n)<0&&(r=[e[0],n],n=r[0],e[0]=r[1],p(e,0,i)),n},i=function(e,i){var r,o,a,s,l,u;for(null==i&&(i=t),s=function(){u=[];for(var t=0,i=n(e.length/2);0<=i?t<i:t>i;0<=i?t++:t--)u.push(t);return u}.apply(this).reverse(),l=[],o=0,a=s.length;o<a;o++)r=s[o],l.push(p(e,r,i));return l},h=function(e,n,i){var r;if(null==i&&(i=t),r=e.indexOf(n),r!==-1)return d(e,0,r,i),p(e,r,i)},c=function(e,n,r){var o,s,l,u,c;if(null==r&&(r=t),s=e.slice(0,n),!s.length)return s;for(i(s,r),c=e.slice(n),l=0,u=c.length;l<u;l++)o=c[l],a(s,o,r);return s.sort(r).reverse()},f=function(e,n,o){var a,s,c,f,h,d,p,g,m,v;if(null==o&&(o=t),10*n<=e.length){if(f=e.slice(0,n).sort(o),!f.length)return f;for(c=f[f.length-1],g=e.slice(n),h=0,p=g.length;h<p;h++)a=g[h],o(a,c)<0&&(l(f,a,0,null,o),f.pop(),c=f[f.length-1]);return f}for(i(e,o),v=[],s=d=0,m=u(n,e.length);0<=m?d<m:d>m;s=0<=m?++d:--d)v.push(r(e,o));return v},d=function(e,n,i,r){var o,a,s;for(null==r&&(r=t),o=e[i];i>n&&(s=i-1>>1,a=e[s],r(o,a)<0);)e[i]=a,i=s;return e[i]=o},p=function(e,n,i){var r,o,a,s,l;for(null==i&&(i=t),o=e.length,l=n,a=e[n],r=2*n+1;r<o;)s=r+1,s<o&&!(i(e[r],e[s])<0)&&(r=s),e[n]=e[r],n=r,r=2*n+1;return e[n]=a,d(e,l,n,i)},e=function(){function e(e){this.cmp=null!=e?e:t,this.nodes=[]}return e.push=o,e.pop=r,e.replace=s,e.pushpop=a,e.heapify=i,e.updateItem=h,e.nlargest=c,e.nsmallest=f,e.prototype.push=function(e){return o(this.nodes,e,this.cmp)},e.prototype.pop=function(){return r(this.nodes,this.cmp)},e.prototype.peek=function(){return this.nodes[0]},e.prototype.contains=function(e){return this.nodes.indexOf(e)!==-1},e.prototype.replace=function(e){return s(this.nodes,e,this.cmp)},e.prototype.pushpop=function(e){return a(this.nodes,e,this.cmp)},e.prototype.heapify=function(){return i(this.nodes,this.cmp)},e.prototype.updateItem=function(e){return h(this.nodes,e,this.cmp)},e.prototype.clear=function(){return this.nodes=[]},e.prototype.empty=function(){return 0===this.nodes.length},e.prototype.size=function(){return this.nodes.length},e.prototype.clone=function(){var t;return t=new e,t.nodes=this.nodes.slice(0),t},e.prototype.toArray=function(){return this.nodes.slice(0)},e.prototype.insert=e.prototype.push,e.prototype.top=e.prototype.peek,e.prototype.front=e.prototype.peek,e.prototype.has=e.prototype.contains,e.prototype.copy=e.prototype.clone,e}(),function(e,t){return"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():e.Heap=t()}(this,function(){return e})}.call(this),function(){function e(e,t){return e.set(t[0],t[1]),e}function t(e,t){return e.add(t),e}function n(e,t,n){var i=n.length;switch(i){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function i(e,t,n,i){for(var r=-1,o=e.length;++r<o;){var a=e[r];t(i,a,n(a),e)}return i}function r(e,t){for(var n=-1,i=e.length,r=-1,o=t.length,a=Array(i+o);++n<i;)a[n]=e[n];for(;++r<o;)a[n++]=t[r];return a}function o(e,t){for(var n=-1,i=e.length;++n<i&&t(e[n],n,e)!==!1;);return e}function a(e,t){for(var n=e.length;n--&&t(e[n],n,e)!==!1;);return e}function s(e,t){for(var n=-1,i=e.length;++n<i;)if(!t(e[n],n,e))return!1;return!0}function l(e,t){for(var n=-1,i=e.length,r=-1,o=[];++n<i;){var a=e[n];t(a,n,e)&&(o[++r]=a)}return o}function u(e,t){return!!e.length&&b(e,t,0)>-1}function c(e,t,n){for(var i=-1,r=e.length;++i<r;)if(n(t,e[i]))return!0;return!1}function f(e,t){for(var n=-1,i=e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r}function h(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}function d(e,t,n,i){var r=-1,o=e.length;for(i&&o&&(n=e[++r]);++r<o;)n=t(n,e[r],r,e);return n}function p(e,t,n,i){var r=e.length;for(i&&r&&(n=e[--r]);r--;)n=t(n,e[r],r,e);return n}function g(e,t){for(var n=-1,i=e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}function m(e,t,n){for(var i=-1,r=e.length;++i<r;){var o=e[i],a=t(o);if(null!=a&&(s===G?a===a:n(a,s)))var s=a,l=o}return l}function v(e,t,n,i){var r;return n(e,function(e,n,o){if(t(e,n,o))return r=i?n:e,!1}),r}function y(e,t,n){for(var i=e.length,r=n?i:-1;n?r--:++r<i;)if(t(e[r],r,e))return r;return-1}function b(e,t,n){if(t!==t)return R(e,n);for(var i=n-1,r=e.length;++i<r;)if(e[i]===t)return i;return-1}function _(e,t,n,i,r){return r(e,function(e,r,o){n=i?(i=!1,e):t(n,e,r,o)}),n}function E(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function x(e,t){for(var n,i=-1,r=e.length;++i<r;){var o=t(e[i]);o!==G&&(n=n===G?o:n+o)}return n}function w(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}function T(e,t){return f(t,function(t){return[t,e[t]]})}function S(e){return function(t){return e(t)}}function A(e,t){return f(t,function(t){return e[t]})}function C(e,t){for(var n=-1,i=e.length;++n<i&&b(t,e[n],0)>-1;);return n}function k(e,t){for(var n=e.length;n--&&b(t,e[n],0)>-1;);return n}function O(e){return e&&e.Object===Object?e:null}function I(e,t){if(e!==t){var n=null===e,i=e===G,r=e===e,o=null===t,a=t===G,s=t===t;if(e>t&&!o||!r||n&&!a&&s||i&&s)return 1;if(e<t&&!n||!s||o&&!i&&r||a&&r)return-1}return 0}function N(e,t,n){for(var i=-1,r=e.criteria,o=t.criteria,a=r.length,s=n.length;++i<a;){var l=I(r[i],o[i]);if(l){if(i>=s)return l;var u=n[i];return l*("desc"==u?-1:1)}}return e.index-t.index}function M(e,t){for(var n=e.length,i=0;n--;)e[n]===t&&i++;return i}function D(e){return yn[e]}function L(e){return bn[e]}function $(e){return"\\"+xn[e]}function R(e,t,n){for(var i=e.length,r=t+(n?0:-1);n?r--:++r<i;){var o=e[r];if(o!==o)return r}return-1}function P(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}function F(e,t){return e="number"==typeof e||wt.test(e)?+e:-1,t=null==t?ye:t,e>-1&&e%1==0&&e<t}function U(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function j(e){var t=-1,n=Array(e.size);return e.forEach(function(e,i){n[++t]=[i,e]}),n}function H(e,t){for(var n=-1,i=e.length,r=-1,o=[];++n<i;){var a=e[n];a!==t&&a!==Te||(e[n]=Te,o[++r]=n)}return o}function z(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function B(e){if(!e||!cn.test(e))return e.length;for(var t=un.lastIndex=0;un.test(e);)t++;return t}function q(e){return e.match(un)}function W(e){return _n[e]}function Y(O){function wt(e){if(Ua(e)&&!Ec(e)&&!(e instanceof Ot)){if(e instanceof kt)return e;if(ql.call(e,"__wrapped__"))return Dr(e)}return new kt(e)}function Ct(){}function kt(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=G}function Ot(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ee,this.__views__=[]}function It(){var e=new Ot(this.__wrapped__);return e.__actions__=Fi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Fi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Fi(this.__views__),e}function Nt(){if(this.__filtered__){var e=new Ot(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function Mt(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ec(e),i=t<0,r=n?e.length:0,o=mr(0,r,this.__views__),a=o.start,s=o.end,l=s-a,u=i?s:a-1,c=this.__iteratees__,f=c.length,h=0,d=gu(l,this.__takeCount__);if(!n||r<fe||r==l&&d==l)return Ai(e,this.__actions__);var p=[];e:for(;l--&&h<d;){u+=t;for(var g=-1,m=e[u];++g<f;){var v=c[g],y=v.iteratee,b=v.type,_=y(m);if(b==de)m=_;else if(!_){if(b==he)continue e;break e}}p[h++]=m}return p}function Dt(){}function Lt(e,t){return Rt(e,t)&&delete e[t]}function $t(e,t){if(xu){var n=e[t];return n===me?G:n}return ql.call(e,t)?e[t]:G}function Rt(e,t){return xu?e[t]!==G:ql.call(e,t)}function Pt(e,t,n){e[t]=xu&&n===G?me:n}function Ft(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Ut(){this.__data__={hash:new Dt,map:bu?new bu:[],string:new Dt}}function jt(e){var t=this.__data__;return Tr(e)?Lt("string"==typeof e?t.string:t.hash,e):bu?t.map["delete"](e):Jt(t.map,e)}function Ht(e){var t=this.__data__;return Tr(e)?$t("string"==typeof e?t.string:t.hash,e):bu?t.map.get(e):en(t.map,e)}function zt(e){var t=this.__data__;return Tr(e)?Rt("string"==typeof e?t.string:t.hash,e):bu?t.map.has(e):tn(t.map,e)}function Bt(e,t){var n=this.__data__;return Tr(e)?Pt("string"==typeof e?n.string:n.hash,e,t):bu?n.map.set(e,t):rn(n.map,e,t),this}function qt(e){var t=-1,n=e?e.length:0;for(this.__data__=new Ft;++t<n;)this.push(e[t])}function Wt(e,t){var n=e.__data__;if(Tr(t)){var i=n.__data__,r="string"==typeof t?i.string:i.hash;return r[t]===me}return n.has(t)}function Yt(e){var t=this.__data__;if(Tr(e)){var n=t.__data__,i="string"==typeof e?n.string:n.hash;i[e]=me}else t.set(e,me)}function Gt(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Xt(){this.__data__={array:[],map:null}}function Vt(e){var t=this.__data__,n=t.array;return n?Jt(n,e):t.map["delete"](e)}function Kt(e){var t=this.__data__,n=t.array;return n?en(n,e):t.map.get(e)}function Zt(e){var t=this.__data__,n=t.array;return n?tn(n,e):t.map.has(e)}function Qt(e,t){var n=this.__data__,i=n.array;i&&(i.length<fe-1?rn(i,e,t):(n.array=null,n.map=new Ft(i)));var r=n.map;return r&&r.set(e,t),this}function Jt(e,t){var n=nn(e,t);if(n<0)return!1;var i=e.length-1;return n==i?e.pop():lu.call(e,n,1),!0}function en(e,t){var n=nn(e,t);return n<0?G:e[n][1]}function tn(e,t){return nn(e,t)>-1}function nn(e,t){for(var n=e.length;n--;)if(_a(e[n][0],t))return n;return-1}function rn(e,t,n){var i=nn(e,t);i<0?e.push([t,n]):e[i][1]=n}function on(e,t,n,i){return e===G||_a(e,zl[n])&&!ql.call(i,n)?t:e}function an(e,t,n){(n===G||_a(e[t],n))&&("number"!=typeof t||n!==G||t in e)||(e[t]=n)}function sn(e,t,n){var i=e[t];ql.call(e,t)&&_a(i,n)&&(n!==G||t in e)||(e[t]=n)}function un(e,t,n,i){return Nu(e,function(e,r,o){t(i,e,n(e),o)}),i}function yn(e,t){return e&&Ui(t,Ss(t),e)}function bn(e,t){for(var n=-1,i=null==e,r=t.length,o=Array(r);++n<r;)o[n]=i?G:xs(e,t[n]);return o}function _n(e){return Aa(e)?e:[]}function En(e){return"function"==typeof e?e:pl}function xn(e){return Ec(e)?e:Mr(e)}function Sn(e,t,n){return e===e&&(n!==G&&(e=e<=n?e:n),t!==G&&(e=e>=t?e:t)),e}function An(e,t,n,i,r,a){var s;if(n&&(s=r?n(e,i,r,a):n(e)),s!==G)return s;if(!Fa(e))return e;var l=Ec(e);if(l){if(s=yr(e),!t)return Fi(e,s)}else{var u=gr(e),c=u==Ie||u==Ne;if(xc(e))return Oi(e,t);if(u==Le||u==Se||c&&!r){if(P(e))return r?e:{};if(s=br(c?{}:e),!t)return Hi(e,yn(s,e))}else{if(!vn[u])return r?e:{};s=_r(e,u,t)}}a||(a=new Gt);var f=a.get(e);return f?f:(a.set(e,s),(l?o:Un)(e,function(i,r){sn(s,r,An(i,t,n,r,e,a))}),l?s:Hi(e,s))}function kn(e){var t=Ss(e),n=t.length;return function(i){if(null==i)return!n;for(var r=n;r--;){var o=t[r],a=e[o],s=i[o];if(s===G&&!(o in Object(i))||!a(s))return!1}return!0}}function On(e){return Fa(e)?ou(e):{}}function In(e,t,n){if("function"!=typeof e)throw new jl(ge);return su(function(){e.apply(G,n)},t)}function Nn(e,t,n,i){var r=-1,o=u,a=!0,s=e.length,l=[],h=t.length;if(!s)return l;n&&(t=f(t,S(n))),i?(o=c,a=!1):t.length>=fe&&(o=Wt,a=!1,t=new qt(t));e:for(;++r<s;){var d=e[r],p=n?n(d):d;if(a&&p===p){for(var g=h;g--;)if(t[g]===p)continue e;l.push(d)}else o(t,p,i)||l.push(d)}return l}function Ln(e,t){var n=!0;return Nu(e,function(e,i,r){return n=!!t(e,i,r)}),n}function $n(e,t,n,i){var r=e.length;for(n=ss(n),n<0&&(n=-n>r?0:r+n),i=i===G||i>r?r:ss(i),i<0&&(i+=r),i=n>i?0:ls(i);n<i;)e[n++]=t;return e}function Rn(e,t){var n=[];return Nu(e,function(e,i,r){t(e,i,r)&&n.push(e)}),n}function Pn(e,t,n,i){i||(i=[]);for(var r=-1,o=e.length;++r<o;){var a=e[r];t>0&&Aa(a)&&(n||Ec(a)||wa(a))?t>1?Pn(a,t-1,n,i):h(i,a):n||(i[i.length]=a)}return i}function Fn(e,t){return null==e?e:Du(e,t,As)}function Un(e,t){return e&&Du(e,t,Ss)}function jn(e,t){return e&&Lu(e,t,Ss)}function Hn(e,t){return l(t,function(t){return $a(e[t])})}function zn(e,t){t=wr(t,e)?[t+""]:xn(t);for(var n=0,i=t.length;null!=e&&n<i;)e=e[t[n++]];return n&&n==i?e:G}function Bn(e,t){return ql.call(e,t)||"object"==typeof e&&t in e&&null===nu(e)}function qn(e,t){return t in Object(e)}function Wn(e,t,n){return e>=gu(t,n)&&e<pu(t,n)}function Yn(e,t,n){for(var i=n?c:u,r=e.length,o=r,a=Array(r),s=[];o--;){var l=e[o];o&&t&&(l=f(l,S(t))),a[o]=!n&&(t||l.length>=120)?new qt(o&&l):G}l=e[0];var h=-1,d=l.length,p=a[0];e:for(;++h<d;){var g=l[h],m=t?t(g):g;if(!(p?Wt(p,m):i(s,m,n))){for(var o=r;--o;){var v=a[o];if(!(v?Wt(v,m):i(e[o],m,n)))continue e}p&&p.push(m),s.push(g)}}return s}function Gn(e,t,n,i){return Un(e,function(e,r,o){t(i,n(e),r,o)}),i}function Xn(e,t,i){wr(t,e)||(t=xn(t),e=Ir(e,t),t=Zr(t));var r=null==e?e:e[t];return null==r?G:n(r,e,i)}function Vn(e,t,n,i,r){return e===t||(null==e||null==t||!Fa(e)&&!Ua(t)?e!==e&&t!==t:Kn(e,t,Vn,n,i,r))}function Kn(e,t,n,i,r,o){var a=Ec(e),s=Ec(t),l=Ae,u=Ae;a||(l=gr(e),l==Se?l=Le:l!=Le&&(a=es(e))),s||(u=gr(t),u==Se?u=Le:u!=Le&&(s=es(t)));var c=l==Le&&!P(e),f=u==Le&&!P(t),h=l==u;if(h&&!a&&!c)return lr(e,t,l,n,i,r);var d=r&ae;if(!d){var p=c&&ql.call(e,"__wrapped__"),g=f&&ql.call(t,"__wrapped__");if(p||g)return n(p?e.value():e,g?t.value():t,i,r,o)}return!!h&&(o||(o=new Gt),(a?sr:ur)(e,t,n,i,r,o))}function Zn(e,t,n,i){var r=n.length,o=r,a=!i;if(null==e)return!o;for(e=Object(e);r--;){var s=n[r];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++r<o;){s=n[r];var l=s[0],u=e[l],c=s[1];if(a&&s[2]){if(u===G&&!(l in e))return!1}else{var f=new Gt,h=i?i(u,c,l,e,t,f):G;if(!(h===G?Vn(c,u,i,oe|ae,f):h))return!1}}return!0}function Qn(e){var t=typeof e;return"function"==t?e:null==e?pl:"object"==t?Ec(e)?ii(e[0],e[1]):ni(e):xl(e)}function Jn(e){return du(Object(e))}function ei(e){e=null==e?e:Object(e);var t=[];for(var n in e)t.push(n);return t}function ti(e,t){var n=-1,i=Sa(e)?Array(e.length):[];return Nu(e,function(e,r,o){i[++n]=t(e,r,o)}),i}function ni(e){var t=hr(e);if(1==t.length&&t[0][2]){var n=t[0][0],i=t[0][1];return function(e){return null!=e&&(e[n]===i&&(i!==G||n in Object(e)))}}return function(n){return n===e||Zn(n,e,t)}}function ii(e,t){return function(n){var i=xs(n,e);return i===G&&i===t?Ts(n,e):Vn(t,i,G,oe|ae)}}function ri(e,t,n,i,r){if(e!==t){var a=Ec(t)||es(t)?G:As(t);o(a||t,function(o,s){if(a&&(s=o,o=t[s]),Fa(o))r||(r=new Gt),oi(e,t,s,n,ri,i,r);else{var l=i?i(e[s],o,s+"",e,t,r):G;l===G&&(l=o),an(e,s,l)}})}}function oi(e,t,n,i,r,o,a){var s=e[n],l=t[n],u=a.get(l);if(u)return void an(e,n,u);var c=o?o(s,l,n+"",e,t,a):G,f=c===G;f&&(c=l,Ec(l)||es(l)?Ec(s)?c=s:Aa(s)?c=Fi(s):(f=!1,c=An(l,!0)):Xa(l)||wa(l)?wa(s)?c=cs(s):!Fa(s)||i&&$a(s)?(f=!1,c=An(l,!0)):c=s:f=!1),a.set(l,c),f&&r(c,l,i,o,a),an(e,n,c)}function ai(e,t,n){var i=-1,r=fr();t=f(t.length?t:Array(1),function(e){return r(e)});var o=ti(e,function(e,n,r){var o=f(t,function(t){return t(e)});return{criteria:o,index:++i,value:e}});return E(o,function(e,t){return N(e,t,n)})}function si(e,t){return e=Object(e),d(t,function(t,n){return n in e&&(t[n]=e[n]),t},{})}function li(e,t){var n={};return Fn(e,function(e,i){t(e,i)&&(n[i]=e)}),n}function ui(e){return function(t){return null==t?G:t[e]}}function ci(e){return function(t){return zn(t,e)}}function fi(e,t){return hi(e,t)}function hi(e,t,n){var i=-1,r=t.length,o=e;for(n&&(o=f(e,function(e){return n(e)}));++i<r;)for(var a=0,s=t[i],l=n?n(s):s;(a=b(o,l,a))>-1;)o!==e&&lu.call(o,a,1),lu.call(e,a,1);return e}function di(e,t){for(var n=e?t.length:0,i=n-1;n--;){var r=t[n];if(i==n||r!=o){var o=r;if(F(r))lu.call(e,r,1);else if(wr(r,e))delete e[r];else{var a=xn(r),s=Ir(e,a);null!=s&&delete s[Zr(a)]}}}return e}function pi(e,t){return e+cu(vu()*(t-e+1))}function gi(e,t,n,i){for(var r=-1,o=pu(uu((t-e)/(n||1)),0),a=Array(o);o--;)a[i?o:++r]=e,e+=n;return a}function mi(e,t,n,i){t=wr(t,e)?[t+""]:xn(t);for(var r=-1,o=t.length,a=o-1,s=e;null!=s&&++r<o;){var l=t[r];if(Fa(s)){var u=n;if(r!=a){var c=s[l];u=i?i(c,l,s):G,u===G&&(u=null==c?F(t[r+1])?[]:{}:c)}sn(s,l,u)}s=s[l]}return e}function vi(e,t,n){var i=-1,r=e.length;t<0&&(t=-t>r?0:r+t),n=n>r?r:n,n<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(r);++i<r;)o[i]=e[i+t];return o}function yi(e,t){var n;return Nu(e,function(e,i,r){return n=t(e,i,r),!n}),!!n}function bi(e,t,n){var i=0,r=e?e.length:i;if("number"==typeof t&&t===t&&r<=we){for(;i<r;){var o=i+r>>>1,a=e[o];(n?a<=t:a<t)&&null!==a?i=o+1:r=o}return r}return _i(e,t,pl,n)}function _i(e,t,n,i){t=n(t);for(var r=0,o=e?e.length:0,a=t!==t,s=null===t,l=t===G;r<o;){var u=cu((r+o)/2),c=n(e[u]),f=c!==G,h=c===c;if(a)var d=h||i;else d=s?h&&f&&(i||null!=c):l?h&&(i||f):null!=c&&(i?c<=t:c<t);d?r=u+1:o=u}return gu(o,xe)}function Ei(e){return xi(e)}function xi(e,t){for(var n=0,i=e.length,r=e[0],o=t?t(r):r,a=o,s=0,l=[r];++n<i;)r=e[n],o=t?t(r):r,_a(o,a)||(a=o,l[++s]=r);return l}function wi(e,t,n){var i=-1,r=u,o=e.length,a=!0,s=[],l=s;if(n)a=!1,r=c;else if(o>=fe){var f=t?null:Ru(e);if(f)return z(f);a=!1,r=Wt,l=new qt}else l=t?[]:s;e:for(;++i<o;){var h=e[i],d=t?t(h):h;if(a&&d===d){for(var p=l.length;p--;)if(l[p]===d)continue e;t&&l.push(d),s.push(h)}else r(l,d,n)||(l!==s&&l.push(d),s.push(h))}return s}function Ti(e,t){t=wr(t,e)?[t+""]:xn(t),e=Ir(e,t);var n=Zr(t);return null==e||!ws(e,n)||delete e[n]}function Si(e,t,n,i){for(var r=e.length,o=i?r:-1;(i?o--:++o<r)&&t(e[o],o,e););return n?vi(e,i?0:o,i?o+1:r):vi(e,i?o+1:0,i?r:o)}function Ai(e,t){var n=e;return n instanceof Ot&&(n=n.value()),d(t,function(e,t){return t.func.apply(t.thisArg,h([e],t.args))},n)}function Ci(e,t,n){for(var i=-1,r=e.length;++i<r;)var o=o?h(Nn(o,e[i],t,n),Nn(e[i],o,t,n)):e[i];return o&&o.length?wi(o,t,n):[]}function ki(e,t,n){for(var i=-1,r=e.length,o=t.length,a={};++i<r;)n(a,e[i],i<o?t[i]:G);return a}function Oi(e,t){if(t)return e.slice();var n=e.constructor,i=new n(e.length);return e.copy(i),i}function Ii(e){var t=e.constructor,n=new t(e.byteLength),i=new Jl(n);return i.set(new Jl(e)),n}function Ni(t){var n=t.constructor;return d(j(t),e,new n)}function Mi(e){var t=e.constructor,n=new t(e.source,vt.exec(e));return n.lastIndex=e.lastIndex,n}function Di(e){var n=e.constructor;return d(z(e),t,new n)}function Li(e){return Ql?Object(ku.call(e)):{}}function $i(e,t){var n=e.buffer,i=t?Ii(n):n,r=e.constructor;return new r(i,e.byteOffset,e.length)}function Ri(e,t,n,i){for(var r=-1,o=e.length,a=n.length,s=-1,l=t.length,u=pu(o-a,0),c=Array(l+u),f=!i;++s<l;)c[s]=t[s];for(;++r<a;)(f||r<o)&&(c[n[r]]=e[r]);for(;u--;)c[s++]=e[r++];return c}function Pi(e,t,n,i){for(var r=-1,o=e.length,a=-1,s=n.length,l=-1,u=t.length,c=pu(o-s,0),f=Array(c+u),h=!i;++r<c;)f[r]=e[r];for(var d=r;++l<u;)f[d+l]=t[l];for(;++a<s;)(h||r<o)&&(f[d+n[a]]=e[r++]);return f}function Fi(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n<i;)t[n]=e[n];return t}function Ui(e,t,n){return ji(e,t,n)}function ji(e,t,n,i){n||(n={});for(var r=-1,o=t.length;++r<o;){var a=t[r],s=i?i(n[a],e[a],a,n,e):e[a];sn(n,a,s)}return n}function Hi(e,t){return Ui(e,Uu(e),t)}function zi(e,t){return function(n,r){var o=Ec(n)?i:un,a=t?t():{};return o(n,e,fr(r),a)}}function Bi(e){return ca(function(t,n){var i=-1,r=n.length,o=r>1?n[r-1]:G,a=r>2?n[2]:G;for(o="function"==typeof o?(r--,o):G,a&&xr(n[0],n[1],a)&&(o=r<3?G:o,r=1),t=Object(t);++i<r;){var s=n[i];s&&e(t,s,i,o)}return t})}function qi(e,t){return function(n,i){if(null==n)return n;if(!Sa(n))return e(n,i);for(var r=n.length,o=t?r:-1,a=Object(n);(t?o--:++o<r)&&i(a[o],o,a)!==!1;);return n}}function Wi(e){return function(t,n,i){for(var r=-1,o=Object(t),a=i(t),s=a.length;s--;){var l=a[e?s:++r];if(n(o[l],l,o)===!1)break}return t}}function Yi(e,t,n){function i(){var t=this&&this!==Mn&&this instanceof i?o:e;return t.apply(r?n:this,arguments)}var r=t&V,o=Vi(e);return i}function Gi(e){return function(t){t=hs(t);var n=cn.test(t)?q(t):G,i=n?n[0]:t.charAt(0),r=n?n.slice(1).join(""):t.slice(1);return i[e]()+r}}function Xi(e){return function(t){return d(cl(qs(t)),e,"")}}function Vi(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=On(e.prototype),i=e.apply(n,t);return Fa(i)?i:n}}function Ki(e,t,i){function r(){for(var a=arguments.length,s=Array(a),l=a,u=pr(r);l--;)s[l]=arguments[l];var c=a<3&&s[0]!==u&&s[a-1]!==u?[]:H(s,u);if(a-=c.length,a<i)return rr(e,t,Qi,r.placeholder,G,s,c,G,G,i-a);var f=this&&this!==Mn&&this instanceof r?o:e;return n(f,this,s)}var o=Vi(e);return r}function Zi(e){return ca(function(t){t=Pn(t,1);var n=t.length,i=n,r=kt.prototype.thru;for(e&&t.reverse();i--;){var o=t[i];if("function"!=typeof o)throw new jl(ge);if(r&&!a&&"wrapper"==cr(o))var a=new kt([],(!0))}for(i=a?i:n;++i<n;){o=t[i];var s=cr(o),l="wrapper"==s?Pu(o):G;a=l&&Sr(l[0])&&l[1]==(ne|Q|ee|ie)&&!l[4].length&&1==l[9]?a[cr(l[0])].apply(a,l[3]):1==o.length&&Sr(o)?a[s]():a.thru(o)}return function(){var e=arguments,i=e[0];if(a&&1==e.length&&Ec(i)&&i.length>=fe)return a.plant(i).value();for(var r=0,o=n?t[r].apply(this,e):i;++r<n;)o=t[r].call(this,o);return o}})}function Qi(e,t,n,i,r,o,a,s,l,u){function c(){for(var v=arguments.length,y=v,b=Array(v);y--;)b[y]=arguments[y];if(p)var _=pr(c),E=M(b,_);if(i&&(b=Ri(b,i,r,p)),o&&(b=Pi(b,o,a,p)),v-=E,p&&v<u){var x=H(b,_);return rr(e,t,Qi,c.placeholder,n,b,x,s,l,u-v)}var w=h?n:this,T=d?w[e]:e;return v=b.length,s?b=Nr(b,s):g&&v>1&&b.reverse(),f&&l<v&&(b.length=l),this&&this!==Mn&&this instanceof c&&(T=m||Vi(T)),T.apply(w,b)}var f=t&ne,h=t&V,d=t&K,p=t&(Q|J),g=t&re,m=d?G:Vi(e);return c}function Ji(e,t){return function(n,i){return Gn(n,e,t(i),{})}}function er(e){return ca(function(t){return t=f(Pn(t,1),fr()),ca(function(i){var r=this;return e(t,function(e){return n(e,r,i)})})})}function tr(e,t,n){t=ss(t);var i=B(e);if(!t||i>=t)return"";var r=t-i;n=n===G?" ":n+"";var o=Qs(n,uu(r/B(n)));return cn.test(n)?q(o).slice(0,r).join(""):o.slice(0,r)}function nr(e,t,i,r){function o(){for(var t=-1,l=arguments.length,u=-1,c=r.length,f=Array(c+l),h=this&&this!==Mn&&this instanceof o?s:e;++u<c;)f[u]=r[u];for(;l--;)f[u++]=arguments[++t];return n(h,a?i:this,f)}var a=t&V,s=Vi(e);return o}function ir(e){return function(t,n,i){return i&&"number"!=typeof i&&xr(t,n,i)&&(n=i=G),t=us(t),t=t===t?t:0,n===G?(n=t,t=0):n=us(n)||0,i=i===G?t<n?1:-1:us(i)||0,gi(t,n,i,e)}}function rr(e,t,n,i,r,o,a,s,l,u){var c=t&Q,f=s?Fi(s):G,h=c?a:G,d=c?G:a,p=c?o:G,g=c?G:o;t|=c?ee:te,t&=~(c?te:ee),t&Z||(t&=~(V|K));var m=[e,t,r,p,h,g,d,f,l,u],v=n.apply(G,m);return Sr(e)&&ju(v,m),v.placeholder=i,v}function or(e){var t=Fl[e];return function(e,n){if(e=us(e),n=ss(n)){var i=(hs(e)+"e").split("e"),r=t(i[0]+"e"+(+i[1]+n));
return i=(hs(r)+"e").split("e"),+(i[0]+"e"+(+i[1]-n))}return t(e)}}function ar(e,t,n,i,r,o,a,s){var l=t&K;if(!l&&"function"!=typeof e)throw new jl(ge);var u=i?i.length:0;if(u||(t&=~(ee|te),i=r=G),a=a===G?a:pu(ss(a),0),s=s===G?s:ss(s),u-=r?r.length:0,t&te){var c=i,f=r;i=r=G}var h=l?G:Pu(e),d=[e,t,n,i,r,c,f,o,a,s];if(h&&kr(d,h),e=d[0],t=d[1],n=d[2],i=d[3],r=d[4],s=d[9]=null==d[9]?l?0:e.length:pu(d[9]-u,0),!s&&t&(Q|J)&&(t&=~(Q|J)),t&&t!=V)p=t==Q||t==J?Ki(e,t,s):t!=ee&&t!=(V|ee)||r.length?Qi.apply(G,d):nr(e,t,n,i);else var p=Yi(e,t,n);var g=h?$u:ju;return g(p,d)}function sr(e,t,n,i,r,o){var a=-1,s=r&ae,l=r&oe,u=e.length,c=t.length;if(u!=c&&!(s&&c>u))return!1;var f=o.get(e);if(f)return f==t;var h=!0;for(o.set(e,t);++a<u;){var d=e[a],p=t[a];if(i)var m=s?i(p,d,a,t,e,o):i(d,p,a,e,t,o);if(m!==G){if(m)continue;h=!1;break}if(l){if(!g(t,function(e){return d===e||n(d,e,i,r,o)})){h=!1;break}}else if(d!==p&&!n(d,p,i,r,o)){h=!1;break}}return o["delete"](e),h}function lr(e,t,n,i,r,o){switch(n){case He:return!(e.byteLength!=t.byteLength||!i(new Jl(e),new Jl(t)));case Ce:case ke:return+e==+t;case Oe:return e.name==t.name&&e.message==t.message;case De:return e!=+e?t!=+t:e==+t;case $e:case Pe:return e==t+"";case Me:var a=j;case Re:var s=o&ae;return a||(a=z),(s||e.size==t.size)&&i(a(e),a(t),r,o|oe);case Fe:return!!Ql&&ku.call(e)==ku.call(t)}return!1}function ur(e,t,n,i,r,o){var a=r&ae,s=Ss(e),l=s.length,u=Ss(t),c=u.length;if(l!=c&&!a)return!1;for(var f=l;f--;){var h=s[f];if(!(a?h in t:Bn(t,h)))return!1}var d=o.get(e);if(d)return d==t;var p=!0;o.set(e,t);for(var g=a;++f<l;){h=s[f];var m=e[h],v=t[h];if(i)var y=a?i(v,m,h,t,e,o):i(m,v,h,e,t,o);if(!(y===G?m===v||n(m,v,i,r,o):y)){p=!1;break}g||(g="constructor"==h)}if(p&&!g){var b=e.constructor,_=t.constructor;b!=_&&"constructor"in e&&"constructor"in t&&!("function"==typeof b&&b instanceof b&&"function"==typeof _&&_ instanceof _)&&(p=!1)}return o["delete"](e),p}function cr(e){for(var t=e.name+"",n=Iu[t],i=ql.call(Iu,t)?n.length:0;i--;){var r=n[i],o=r.func;if(null==o||o==e)return r.name}return t}function fr(){var e=wt.iteratee||gl;return e=e===gl?Qn:e,arguments.length?e(arguments[0],arguments[1]):e}function hr(e){for(var t=Ls(e),n=t.length;n--;)t[n][2]=Cr(t[n][1]);return t}function dr(e,t){var n=null==e?G:e[t];return qa(n)?n:G}function pr(e){var t=ql.call(wt,"placeholder")?wt:e;return t.placeholder}function gr(e){return Gl.call(e)}function mr(e,t,n){for(var i=-1,r=n.length;++i<r;){var o=n[i],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=gu(t,e+a);break;case"takeRight":e=pu(e,t-a)}}return{start:e,end:t}}function vr(e,t,n){if(null==e)return!1;var i=n(e,t);i||wr(t)||(t=xn(t),e=Ir(e,t),null!=e&&(t=Zr(t),i=n(e,t)));var r=e?e.length:G;return i||!!r&&Pa(r)&&F(t,r)&&(Ec(e)||Qa(e)||wa(e))}function yr(e){var t=e.length,n=e.constructor(t);return t&&"string"==typeof e[0]&&ql.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function br(e){return $a(e.constructor)&&!Ar(e)?On(nu(e)):{}}function _r(e,t,n){var i=e.constructor;switch(t){case He:return Ii(e);case Ce:case ke:return new i((+e));case ze:case Be:case qe:case We:case Ye:case Ge:case Xe:case Ve:case Ke:return $i(e,n);case Me:return Ni(e);case De:case Pe:return new i(e);case $e:return Mi(e);case Re:return Di(e);case Fe:return Li(e)}}function Er(e){var t=e?e.length:G;return Pa(t)&&(Ec(e)||Qa(e)||wa(e))?w(t,String):null}function xr(e,t,n){if(!Fa(n))return!1;var i=typeof t;return!!("number"==i?Sa(n)&&F(t,n.length):"string"==i&&t in n)&&_a(n[t],e)}function wr(e,t){return"number"==typeof e||!Ec(e)&&(lt.test(e)||!st.test(e)||null!=t&&e in Object(t))}function Tr(e){var t=typeof e;return"number"==t||"boolean"==t||"string"==t&&"__proto__"!=e||null==e}function Sr(e){var t=cr(e),n=wt[t];if("function"!=typeof n||!(t in Ot.prototype))return!1;if(e===n)return!0;var i=Pu(n);return!!i&&e===i[0]}function Ar(e){var t=e&&e.constructor,n=$a(t)&&t.prototype||zl;return e===n}function Cr(e){return e===e&&!Fa(e)}function kr(e,t){var n=e[1],i=t[1],r=n|i,o=r<(V|K|ne),a=i==ne&&n==Q||i==ne&&n==ie&&e[7].length<=t[8]||i==(ne|ie)&&t[7].length<=t[8]&&n==Q;if(!o&&!a)return e;i&V&&(e[2]=t[2],r|=n&V?0:Z);var s=t[3];if(s){var l=e[3];e[3]=l?Ri(l,s,t[4]):Fi(s),e[4]=l?H(e[3],Te):Fi(t[4])}return s=t[5],s&&(l=e[5],e[5]=l?Pi(l,s,t[6]):Fi(s),e[6]=l?H(e[5],Te):Fi(t[6])),s=t[7],s&&(e[7]=Fi(s)),i&ne&&(e[8]=null==e[8]?t[8]:gu(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=r,e}function Or(e,t,n,i,r,o){return Fa(e)&&Fa(t)&&(o.set(t,e),ri(e,t,G,Or,o)),e}function Ir(e,t){return 1==t.length?e:xs(e,vi(t,0,-1))}function Nr(e,t){for(var n=e.length,i=gu(t.length,n),r=Fi(e);i--;){var o=t[i];e[i]=F(o,n)?r[o]:G}return e}function Mr(e){var t=[];return hs(e).replace(ut,function(e,n,i,r){t.push(i?r.replace(gt,"$1"):n||e)}),t}function Dr(e){if(e instanceof Ot)return e.clone();var t=new kt(e.__wrapped__,e.__chain__);return t.__actions__=Fi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function Lr(e,t){t=pu(ss(t),0);var n=e?e.length:0;if(!n||t<1)return[];for(var i=0,r=-1,o=Array(uu(n/t));i<n;)o[++r]=vi(e,i,i+=t);return o}function $r(e){for(var t=-1,n=e?e.length:0,i=-1,r=[];++t<n;){var o=e[t];o&&(r[++i]=o)}return r}function Rr(e,t,n){var i=e?e.length:0;return i?(t=n||t===G?1:ss(t),vi(e,t<0?0:t,i)):[]}function Pr(e,t,n){var i=e?e.length:0;return i?(t=n||t===G?1:ss(t),t=i-t,vi(e,0,t<0?0:t)):[]}function Fr(e,t){return e&&e.length?Si(e,fr(t,3),!0,!0):[]}function Ur(e,t){return e&&e.length?Si(e,fr(t,3),!0):[]}function jr(e,t,n,i){var r=e?e.length:0;return r?(n&&"number"!=typeof n&&xr(e,t,n)&&(n=0,i=r),$n(e,t,n,i)):[]}function Hr(e,t){return e&&e.length?y(e,fr(t,3)):-1}function zr(e,t){return e&&e.length?y(e,fr(t,3),!0):-1}function Br(e){var t=e?e.length:0;return t?Pn(e,1):[]}function qr(e){var t=e?e.length:0;return t?Pn(e,ve):[]}function Wr(e,t){var n=e?e.length:0;return n?(t=t===G?1:ss(t),Pn(e,t)):[]}function Yr(e){for(var t=-1,n=e?e.length:0,i={};++t<n;){var r=e[t];i[r[0]]=r[1]}return i}function Gr(e){return e?e[0]:G}function Xr(e,t,n){var i=e?e.length:0;return i?(n=ss(n),n<0&&(n=pu(i+n,0)),b(e,t,n)):-1}function Vr(e){return Pr(e,1)}function Kr(e,t){return e?hu.call(e,t):""}function Zr(e){var t=e?e.length:0;return t?e[t-1]:G}function Qr(e,t,n){var i=e?e.length:0;if(!i)return-1;var r=i;if(n!==G&&(r=ss(n),r=(r<0?pu(i+r,0):gu(r,i-1))+1),t!==t)return R(e,r,!0);for(;r--;)if(e[r]===t)return r;return-1}function Jr(e,t){return e&&e.length&&t&&t.length?fi(e,t):e}function eo(e,t,n){return e&&e.length&&t&&t.length?hi(e,t,fr(n)):e}function to(e,t){var n=[];if(!e||!e.length)return n;var i=-1,r=[],o=e.length;for(t=fr(t,3);++i<o;){var a=e[i];t(a,i,e)&&(n.push(a),r.push(i))}return di(e,r),n}function no(e){return e?yu.call(e):e}function io(e,t,n){var i=e?e.length:0;return i?(n&&"number"!=typeof n&&xr(e,t,n)?(t=0,n=i):(t=null==t?0:ss(t),n=n===G?i:ss(n)),vi(e,t,n)):[]}function ro(e,t){return bi(e,t)}function oo(e,t,n){return _i(e,t,fr(n))}function ao(e,t){var n=e?e.length:0;if(n){var i=bi(e,t);if(i<n&&_a(e[i],t))return i}return-1}function so(e,t){return bi(e,t,!0)}function lo(e,t,n){return _i(e,t,fr(n),!0)}function uo(e,t){var n=e?e.length:0;if(n){var i=bi(e,t,!0)-1;if(_a(e[i],t))return i}return-1}function co(e){return e&&e.length?Ei(e):[]}function fo(e,t){return e&&e.length?xi(e,fr(t)):[]}function ho(e){return Rr(e,1)}function po(e,t,n){return e&&e.length?(t=n||t===G?1:ss(t),vi(e,0,t<0?0:t)):[]}function go(e,t,n){var i=e?e.length:0;return i?(t=n||t===G?1:ss(t),t=i-t,vi(e,t<0?0:t,i)):[]}function mo(e,t){return e&&e.length?Si(e,fr(t,3),!1,!0):[]}function vo(e,t){return e&&e.length?Si(e,fr(t,3)):[]}function yo(e){return e&&e.length?wi(e):[]}function bo(e,t){return e&&e.length?wi(e,fr(t)):[]}function _o(e,t){return e&&e.length?wi(e,G,t):[]}function Eo(e){if(!e||!e.length)return[];var t=0;return e=l(e,function(e){if(Aa(e))return t=pu(e.length,t),!0}),w(t,function(t){return f(e,ui(t))})}function xo(e,t){if(!e||!e.length)return[];var i=Eo(e);return null==t?i:f(i,function(e){return n(t,G,e)})}function wo(e,t){return ki(e||[],t||[],sn)}function To(e,t){return ki(e||[],t||[],mi)}function So(e){var t=wt(e);return t.__chain__=!0,t}function Ao(e,t){return t(e),e}function Co(e,t){return t(e)}function ko(){return So(this)}function Oo(){return new kt(this.value(),this.__chain__)}function Io(e){return this.map(e).flatten()}function No(){this.__values__===G&&(this.__values__=as(this.value()));var e=this.__index__>=this.__values__.length,t=e?G:this.__values__[this.__index__++];return{done:e,value:t}}function Mo(){return this}function Do(e){for(var t,n=this;n instanceof Ct;){var i=Dr(n);i.__index__=0,i.__values__=G,t?r.__wrapped__=i:t=i;var r=i;n=n.__wrapped__}return r.__wrapped__=e,t}function Lo(){var e=this.__wrapped__;if(e instanceof Ot){var t=e;return this.__actions__.length&&(t=new Ot(this)),t=t.reverse(),t.__actions__.push({func:Co,args:[no],thisArg:G}),new kt(t,this.__chain__)}return this.thru(no)}function $o(){return Ai(this.__wrapped__,this.__actions__)}function Ro(e,t,n){var i=Ec(e)?s:Ln;return n&&xr(e,t,n)&&(t=G),i(e,fr(t,3))}function Po(e,t){var n=Ec(e)?l:Rn;return n(e,fr(t,3))}function Fo(e,t){if(t=fr(t,3),Ec(e)){var n=y(e,t);return n>-1?e[n]:G}return v(e,t,Nu)}function Uo(e,t){if(t=fr(t,3),Ec(e)){var n=y(e,t,!0);return n>-1?e[n]:G}return v(e,t,Mu)}function jo(e,t){return Pn(qo(e,t),1)}function Ho(e,t){return"function"==typeof t&&Ec(e)?o(e,t):Nu(e,En(t))}function zo(e,t){return"function"==typeof t&&Ec(e)?a(e,t):Mu(e,En(t))}function Bo(e,t,n,i){e=Sa(e)?e:Fs(e),n=n&&!i?ss(n):0;var r=e.length;return n<0&&(n=pu(r+n,0)),Qa(e)?n<=r&&e.indexOf(t,n)>-1:!!r&&b(e,t,n)>-1}function qo(e,t){var n=Ec(e)?f:ti;return n(e,fr(t,3))}function Wo(e,t,n,i){return null==e?[]:(Ec(t)||(t=null==t?[]:[t]),n=i?G:n,Ec(n)||(n=null==n?[]:[n]),ai(e,t,n))}function Yo(e,t,n){var i=Ec(e)?d:_,r=arguments.length<3;return i(e,fr(t,4),n,r,Nu)}function Go(e,t,n){var i=Ec(e)?p:_,r=arguments.length<3;return i(e,fr(t,4),n,r,Mu)}function Xo(e,t){var n=Ec(e)?l:Rn;return t=fr(t,3),n(e,function(e,n,i){return!t(e,n,i)})}function Vo(e){var t=Sa(e)?e:Fs(e),n=t.length;return n>0?t[pi(0,n-1)]:G}function Ko(e,t){var n=-1,i=as(e),r=i.length,o=r-1;for(t=Sn(ss(t),0,r);++n<t;){var a=pi(n,o),s=i[a];i[a]=i[n],i[n]=s}return i.length=t,i}function Zo(e){return Ko(e,Ee)}function Qo(e){if(null==e)return 0;if(Sa(e)){var t=e.length;return t&&Qa(e)?B(e):t}return Ss(e).length}function Jo(e,t,n){var i=Ec(e)?g:yi;return n&&xr(e,t,n)&&(t=G),i(e,fr(t,3))}function ea(e,t){if("function"!=typeof t)throw new jl(ge);return e=ss(e),function(){if(--e<1)return t.apply(this,arguments)}}function ta(e,t,n){return t=n?G:t,t=e&&null==t?e.length:t,ar(e,ne,G,G,G,G,t)}function na(e,t){var n;if("function"!=typeof t)throw new jl(ge);return e=ss(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=G),n}}function ia(e,t,n){t=n?G:t;var i=ar(e,Q,G,G,G,G,G,t);return i.placeholder=ia.placeholder,i}function ra(e,t,n){t=n?G:t;var i=ar(e,J,G,G,G,G,G,t);return i.placeholder=ra.placeholder,i}function oa(e,t,n){function i(){p&&eu(p),c&&eu(c),m=0,u=c=d=p=g=G}function r(t,n){n&&eu(n),c=p=g=G,t&&(m=hc(),f=e.apply(d,u),p||c||(u=d=G))}function o(){var e=t-(hc()-h);e<=0||e>t?r(g,c):p=su(o,e)}function a(){return(p&&g||c&&b)&&(f=e.apply(d,u)),i(),f}function s(){r(b,p)}function l(){if(u=arguments,h=hc(),d=this,g=b&&(p||!v),y===!1)var n=v&&!p;else{m||c||v||(m=h);var i=y-(h-m),r=(i<=0||i>y)&&(v||c);r?(c&&(c=eu(c)),m=h,f=e.apply(d,u)):c||(c=su(s,i))}return r&&p?p=eu(p):p||t===y||(p=su(o,t)),n&&(r=!0,f=e.apply(d,u)),!r||p||c||(u=d=G),f}var u,c,f,h,d,p,g,m=0,v=!1,y=!1,b=!0;if("function"!=typeof e)throw new jl(ge);return t=us(t)||0,Fa(n)&&(v=!!n.leading,y="maxWait"in n&&pu(us(n.maxWait)||0,t),b="trailing"in n?!!n.trailing:b),l.cancel=i,l.flush=a,l}function aa(e){return ar(e,re)}function sa(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new jl(ge);var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var a=e.apply(this,i);return n.cache=o.set(r,a),a};return n.cache=new sa.Cache,n}function la(e){if("function"!=typeof e)throw new jl(ge);return function(){return!e.apply(this,arguments)}}function ua(e){return na(2,e)}function ca(e,t){if("function"!=typeof e)throw new jl(ge);return t=pu(t===G?e.length-1:ss(t),0),function(){for(var i=arguments,r=-1,o=pu(i.length-t,0),a=Array(o);++r<o;)a[r]=i[t+r];switch(t){case 0:return e.call(this,a);case 1:return e.call(this,i[0],a);case 2:return e.call(this,i[0],i[1],a)}var s=Array(t+1);for(r=-1;++r<t;)s[r]=i[r];return s[t]=a,n(e,this,s)}}function fa(e,t){if("function"!=typeof e)throw new jl(ge);return t=t===G?0:pu(ss(t),0),ca(function(i){var r=i[t],o=i.slice(0,t);return r&&h(o,r),n(e,this,o)})}function ha(e,t,n){var i=!0,r=!0;if("function"!=typeof e)throw new jl(ge);return Fa(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),oa(e,t,{leading:i,maxWait:t,trailing:r})}function da(e){return ta(e,1)}function pa(e,t){return t=null==t?pl:t,yc(t,e)}function ga(){if(!arguments.length)return[];var e=arguments[0];return Ec(e)?e:[e]}function ma(e){return An(e)}function va(e,t){return An(e,!1,t)}function ya(e){return An(e,!0)}function ba(e,t){return An(e,!0,t)}function _a(e,t){return e===t||e!==e&&t!==t}function Ea(e,t){return e>t}function xa(e,t){return e>=t}function wa(e){return Aa(e)&&ql.call(e,"callee")&&(!au.call(e,"callee")||Gl.call(e)==Se)}function Ta(e){return Ua(e)&&Gl.call(e)==He}function Sa(e){return null!=e&&!("function"==typeof e&&$a(e))&&Pa(Fu(e))}function Aa(e){return Ua(e)&&Sa(e)}function Ca(e){return e===!0||e===!1||Ua(e)&&Gl.call(e)==Ce}function ka(e){return Ua(e)&&Gl.call(e)==ke}function Oa(e){return!!e&&1===e.nodeType&&Ua(e)&&!Xa(e)}function Ia(e){if(Sa(e)&&(Ec(e)||Qa(e)||$a(e.splice)||wa(e)))return!e.length;for(var t in e)if(ql.call(e,t))return!1;return!0}function Na(e,t){return Vn(e,t)}function Ma(e,t,n){n="function"==typeof n?n:G;var i=n?n(e,t):G;return i===G?Vn(e,t,n):!!i}function Da(e){return!!Ua(e)&&(Gl.call(e)==Oe||"string"==typeof e.message&&"string"==typeof e.name)}function La(e){return"number"==typeof e&&fu(e)}function $a(e){var t=Fa(e)?Gl.call(e):"";return t==Ie||t==Ne}function Ra(e){return"number"==typeof e&&e==ss(e)}function Pa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=ye}function Fa(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Ua(e){return!!e&&"object"==typeof e}function ja(e){return Ua(e)&&gr(e)==Me}function Ha(e,t){return e===t||Zn(e,t,hr(t))}function za(e,t,n){return n="function"==typeof n?n:G,Zn(e,t,hr(t),n)}function Ba(e){return Ga(e)&&e!=+e}function qa(e){return null!=e&&($a(e)?Vl.test(Bl.call(e)):Ua(e)&&(P(e)?Vl:Et).test(e))}function Wa(e){return null===e}function Ya(e){return null==e}function Ga(e){return"number"==typeof e||Ua(e)&&Gl.call(e)==De}function Xa(e){if(!Ua(e)||Gl.call(e)!=Le||P(e))return!1;var t=nu(e);if(null===t)return!0;var n=t.constructor;return"function"==typeof n&&n instanceof n&&Bl.call(n)==Yl}function Va(e){return Fa(e)&&Gl.call(e)==$e}function Ka(e){return Ra(e)&&e>=-ye&&e<=ye}function Za(e){return Ua(e)&&gr(e)==Re}function Qa(e){return"string"==typeof e||!Ec(e)&&Ua(e)&&Gl.call(e)==Pe}function Ja(e){return"symbol"==typeof e||Ua(e)&&Gl.call(e)==Fe}function es(e){return Ua(e)&&Pa(e.length)&&!!mn[Gl.call(e)]}function ts(e){return e===G}function ns(e){return Ua(e)&&gr(e)==Ue}function is(e){return Ua(e)&&Gl.call(e)==je}function rs(e,t){return e<t}function os(e,t){return e<=t}function as(e){if(!e)return[];if(Sa(e))return Qa(e)?q(e):Fi(e);if(ru&&e[ru])return U(e[ru]());var t=gr(e),n=t==Me?j:t==Re?z:Fs;return n(e)}function ss(e){if(!e)return 0===e?e:0;if(e=us(e),e===ve||e===-ve){var t=e<0?-1:1;return t*be}var n=e%1;return e===e?n?e-n:e:0}function ls(e){return e?Sn(ss(e),0,Ee):0}function us(e){if(Fa(e)){var t=$a(e.valueOf)?e.valueOf():e;e=Fa(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(ht,"");var n=_t.test(e);return n||xt.test(e)?Tn(e.slice(2),n?2:8):bt.test(e)?_e:+e}function cs(e){return Ui(e,As(e))}function fs(e){return Sn(ss(e),-ye,ye)}function hs(e){if("string"==typeof e)return e;if(null==e)return"";if(Ja(e))return Ql?Ou.call(e):"";var t=e+"";return"0"==t&&1/e==-ve?"-0":t}function ds(e,t){var n=On(e);return t?yn(n,t):n}function ps(e,t){return v(e,fr(t,3),Un,!0)}function gs(e,t){return v(e,fr(t,3),jn,!0)}function ms(e,t){return null==e?e:Du(e,En(t),As)}function vs(e,t){return null==e?e:Lu(e,En(t),As)}function ys(e,t){return e&&Un(e,En(t))}function bs(e,t){return e&&jn(e,En(t))}function _s(e){return null==e?[]:Hn(e,Ss(e))}function Es(e){return null==e?[]:Hn(e,As(e))}function xs(e,t,n){var i=null==e?G:zn(e,t);return i===G?n:i}function ws(e,t){return vr(e,t,Bn)}function Ts(e,t){return vr(e,t,qn)}function Ss(e){var t=Ar(e);if(!t&&!Sa(e))return Jn(e);var n=Er(e),i=!!n,r=n||[],o=r.length;for(var a in e)!Bn(e,a)||i&&("length"==a||F(a,o))||t&&"constructor"==a||r.push(a);return r}function As(e){for(var t=-1,n=Ar(e),i=ei(e),r=i.length,o=Er(e),a=!!o,s=o||[],l=s.length;++t<r;){var u=i[t];a&&("length"==u||F(u,l))||"constructor"==u&&(n||!ql.call(e,u))||s.push(u)}return s}function Cs(e,t){var n={};return t=fr(t,3),Un(e,function(e,i,r){n[t(e,i,r)]=e}),n}function ks(e,t){var n={};return t=fr(t,3),Un(e,function(e,i,r){n[i]=t(e,i,r)}),n}function Os(e,t){return t=fr(t),li(e,function(e,n){return!t(e,n)})}function Is(e,t){return null==e?{}:li(e,fr(t))}function Ns(e,t,n){if(wr(t,e))i=null==e?G:e[t];else{t=xn(t);var i=xs(e,t);e=Ir(e,t)}return i===G&&(i=n),$a(i)?i.call(e):i}function Ms(e,t,n){return null==e?e:mi(e,t,n)}function Ds(e,t,n,i){return i="function"==typeof i?i:G,null==e?e:mi(e,t,n,i)}function Ls(e){return T(e,Ss(e))}function $s(e){return T(e,As(e))}function Rs(e,t,n){var i=Ec(e)||es(e);if(t=fr(t,4),null==n)if(i||Fa(e)){var r=e.constructor;n=i?Ec(e)?new r:[]:$a(r)?On(nu(e)):{}}else n={};return(i?o:Un)(e,function(e,i,r){return t(n,e,i,r)}),n}function Ps(e,t){return null==e||Ti(e,t)}function Fs(e){return e?A(e,Ss(e)):[]}function Us(e){return null==e?[]:A(e,As(e))}function js(e,t,n){return n===G&&(n=t,t=G),n!==G&&(n=us(n),n=n===n?n:0),t!==G&&(t=us(t),t=t===t?t:0),Sn(us(e),t,n)}function Hs(e,t,n){return t=us(t)||0,n===G?(n=t,t=0):n=us(n)||0,e=us(e),Wn(e,t,n)}function zs(e,t,n){if(n&&"boolean"!=typeof n&&xr(e,t,n)&&(t=n=G),n===G&&("boolean"==typeof t?(n=t,t=G):"boolean"==typeof e&&(n=e,e=G)),e===G&&t===G?(e=0,t=1):(e=us(e)||0,t===G?(t=e,e=0):t=us(t)||0),e>t){var i=e;e=t,t=i}if(n||e%1||t%1){var r=vu();return gu(e+r*(t-e+wn("1e-"+((r+"").length-1))),t)}return pi(e,t)}function Bs(e){return Hc(hs(e).toLowerCase())}function qs(e){return e=hs(e),e&&e.replace(Tt,D).replace(ln,"")}function Ws(e,t,n){e=hs(e),t="string"==typeof t?t:t+"";var i=e.length;return n=n===G?i:Sn(ss(n),0,i),n-=t.length,n>=0&&e.indexOf(t,n)==n}function Ys(e){return e=hs(e),e&&it.test(e)?e.replace(tt,L):e}function Gs(e){return e=hs(e),e&&ft.test(e)?e.replace(ct,"\\$&"):e}function Xs(e,t,n){e=hs(e),t=ss(t);var i=B(e);if(!t||i>=t)return e;var r=(t-i)/2,o=cu(r),a=uu(r);return tr("",o,n)+e+tr("",a,n)}function Vs(e,t,n){return e=hs(e),e+tr(e,t,n)}function Ks(e,t,n){return e=hs(e),tr(e,t,n)+e}function Zs(e,t,n){return n||null==t?t=0:t&&(t=+t),e=hs(e).replace(ht,""),mu(e,t||(yt.test(e)?16:10))}function Qs(e,t){e=hs(e),t=ss(t);var n="";if(!e||t<1||t>ye)return n;do t%2&&(n+=e),t=cu(t/2),e+=e;while(t);return n}function Js(){var e=arguments,t=hs(e[0]);return e.length<3?t:t.replace(e[1],e[2])}function el(e,t,n){return hs(e).split(t,n)}function tl(e,t,n){return e=hs(e),n=Sn(ss(n),0,e.length),e.lastIndexOf(t,n)==n}function nl(e,t,n){var i=wt.templateSettings;n&&xr(e,t,n)&&(t=G),e=hs(e),t=Sc({},t,i,on);var r,o,a=Sc({},t.imports,i.imports,on),s=Ss(a),l=A(a,s),u=0,c=t.interpolate||St,f="__p += '",h=Ul((t.escape||St).source+"|"+c.source+"|"+(c===at?mt:St).source+"|"+(t.evaluate||St).source+"|$","g"),d="//# sourceURL="+("sourceURL"in t?t.sourceURL:"lodash.templateSources["+ ++gn+"]")+"\n";e.replace(h,function(t,n,i,a,s,l){return i||(i=a),f+=e.slice(u,l).replace(At,$),n&&(r=!0,f+="' +\n__e("+n+") +\n'"),s&&(o=!0,f+="';\n"+s+";\n__p += '"),i&&(f+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),u=l+t.length,t}),f+="';\n";var p=t.variable;p||(f="with (obj) {\n"+f+"\n}\n"),f=(o?f.replace(Ze,""):f).replace(Qe,"$1").replace(Je,"$1;"),f="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(r?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var g=Wc(function(){return Function(s,d+"return "+f).apply(G,l)});if(g.source=f,Da(g))throw g;return g}function il(e){return hs(e).toLowerCase()}function rl(e){return hs(e).toUpperCase()}function ol(e,t,n){if(e=hs(e),!e)return e;if(n||t===G)return e.replace(ht,"");if(t+="",!t)return e;var i=q(e),r=q(t);return i.slice(C(i,r),k(i,r)+1).join("")}function al(e,t,n){if(e=hs(e),!e)return e;if(n||t===G)return e.replace(pt,"");if(t+="",!t)return e;var i=q(e);return i.slice(0,k(i,q(t))+1).join("")}function sl(e,t,n){if(e=hs(e),!e)return e;if(n||t===G)return e.replace(dt,"");if(t+="",!t)return e;var i=q(e);return i.slice(C(i,q(t))).join("")}function ll(e,t){var n=se,i=le;if(Fa(t)){var r="separator"in t?t.separator:r;n="length"in t?ss(t.length):n,i="omission"in t?hs(t.omission):i}e=hs(e);var o=e.length;if(cn.test(e)){var a=q(e);o=a.length}if(n>=o)return e;var s=n-B(i);if(s<1)return i;var l=a?a.slice(0,s).join(""):e.slice(0,s);if(r===G)return l+i;if(a&&(s+=l.length-s),Va(r)){if(e.slice(s).search(r)){var u,c=l;for(r.global||(r=Ul(r.source,hs(vt.exec(r))+"g")),r.lastIndex=0;u=r.exec(c);)var f=u.index;l=l.slice(0,f===G?s:f)}}else if(e.indexOf(r,s)!=s){var h=l.lastIndexOf(r);h>-1&&(l=l.slice(0,h))}return l+i}function ul(e){return e=hs(e),e&&nt.test(e)?e.replace(et,W):e}function cl(e,t,n){return e=hs(e),t=n?G:t,t===G&&(t=dn.test(e)?hn:fn),e.match(t)||[]}function fl(e){var t=e?e.length:0,i=fr();return e=t?f(e,function(e){if("function"!=typeof e[1])throw new jl(ge);return[i(e[0]),e[1]]}):[],ca(function(i){for(var r=-1;++r<t;){var o=e[r];if(n(o[0],this,i))return n(o[1],this,i)}})}function hl(e){return kn(An(e,!0))}function dl(e){return function(){return e}}function pl(e){return e}function gl(e){return Qn("function"==typeof e?e:An(e,!0))}function ml(e){return ni(An(e,!0))}function vl(e,t){return ii(e,An(t,!0))}function yl(e,t,n){var i=Ss(t),r=Hn(t,i);null!=n||Fa(t)&&(r.length||!i.length)||(n=t,t=e,e=this,r=Hn(t,Ss(t)));var a=!(Fa(n)&&"chain"in n)||n.chain,s=$a(e);return o(r,function(n){var i=t[n];e[n]=i,s&&(e.prototype[n]=function(){var t=this.__chain__;if(a||t){var n=e(this.__wrapped__),r=n.__actions__=Fi(this.__actions__);return r.push({func:i,args:arguments,thisArg:e}),n.__chain__=t,n}return i.apply(e,h([this.value()],arguments))})}),e}function bl(){return Mn._===this&&(Mn._=Xl),this}function _l(){}function El(e){return e=ss(e),function(){return arguments[e]}}function xl(e){return wr(e)?ui(e):ci(e)}function wl(e){return function(t){return null==e?G:zn(e,t)}}function Tl(e,t){if(e=ss(e),e<1||e>ye)return[];var n=Ee,i=gu(e,Ee);t=En(t),e-=Ee;for(var r=w(i,t);++n<e;)t(n);return r}function Sl(e){return Ec(e)?f(e,String):Mr(e)}function Al(e){var t=++Wl;return hs(e)+t}function Cl(e,t){var n;return e===G&&t===G?0:(e!==G&&(n=e),t!==G&&(n=n===G?t:n+t),n)}function kl(e){return e&&e.length?m(e,pl,Ea):G}function Ol(e,t){return e&&e.length?m(e,fr(t),Ea):G}function Il(e){return Ll(e)/(e?e.length:0)}function Nl(e){return e&&e.length?m(e,pl,rs):G}function Ml(e,t){return e&&e.length?m(e,fr(t),rs):G}function Dl(e,t){var n;return e===G&&t===G?0:(e!==G&&(n=e),t!==G&&(n=n===G?t:n-t),n)}function Ll(e){return e&&e.length?x(e,pl):0}function $l(e,t){return e&&e.length?x(e,fr(t)):0}O=O?Dn.defaults({},O,Dn.pick(Mn,pn)):Mn;var Rl=O.Date,Pl=O.Error,Fl=O.Math,Ul=O.RegExp,jl=O.TypeError,Hl=O.Array.prototype,zl=O.Object.prototype,Bl=O.Function.prototype.toString,ql=zl.hasOwnProperty,Wl=0,Yl=Bl.call(Object),Gl=zl.toString,Xl=Mn._,Vl=Ul("^"+Bl.call(ql).replace(ct,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Kl=Cn?O.Buffer:G,Zl=O.Reflect,Ql=O.Symbol,Jl=O.Uint8Array,eu=O.clearTimeout,tu=Zl?Zl.enumerate:G,nu=Object.getPrototypeOf,iu=Object.getOwnPropertySymbols,ru="symbol"==typeof(ru=Ql&&Ql.iterator)?ru:G,ou=Object.create,au=zl.propertyIsEnumerable,su=O.setTimeout,lu=Hl.splice,uu=Fl.ceil,cu=Fl.floor,fu=O.isFinite,hu=Hl.join,du=Object.keys,pu=Fl.max,gu=Fl.min,mu=O.parseInt,vu=Fl.random,yu=Hl.reverse,bu=dr(O,"Map"),_u=dr(O,"Set"),Eu=dr(O,"WeakMap"),xu=dr(Object,"create"),wu=Eu&&new Eu,Tu=bu?Bl.call(bu):"",Su=_u?Bl.call(_u):"",Au=Eu?Bl.call(Eu):"",Cu=Ql?Ql.prototype:G,ku=Ql?Cu.valueOf:G,Ou=Ql?Cu.toString:G,Iu={};wt.templateSettings={escape:rt,evaluate:ot,interpolate:at,variable:"",imports:{_:wt}};var Nu=qi(Un),Mu=qi(jn,!0),Du=Wi(),Lu=Wi(!0);tu&&!au.call({valueOf:1},"valueOf")&&(ei=function(e){return U(tu(e))});var $u=wu?function(e,t){return wu.set(e,t),e}:pl,Ru=_u&&2===new _u([1,2]).size?function(e){return new _u(e)}:_l,Pu=wu?function(e){return wu.get(e)}:_l,Fu=ui("length"),Uu=iu||function(){return[]};(bu&&gr(new bu)!=Me||_u&&gr(new _u)!=Re||Eu&&gr(new Eu)!=Ue)&&(gr=function(e){var t=Gl.call(e),n=t==Le?e.constructor:null,i="function"==typeof n?Bl.call(n):"";if(i)switch(i){case Tu:return Me;case Su:return Re;case Au:return Ue}return t});var ju=function(){var e=0,t=0;return function(n,i){var r=hc(),o=ce-(r-t);if(t=r,o>0){if(++e>=ue)return n}else e=0;return $u(n,i)}}(),Hu=ca(function(e,t){return Ec(e)||(e=null==e?[]:[Object(e)]),t=Pn(t,1),r(e,t)}),zu=ca(function(e,t){return Aa(e)?Nn(e,Pn(t,1,!0)):[]}),Bu=ca(function(e,t){var n=Zr(t);return Aa(n)&&(n=G),Aa(e)?Nn(e,Pn(t,1,!0),fr(n)):[]}),qu=ca(function(e,t){var n=Zr(t);return Aa(n)&&(n=G),Aa(e)?Nn(e,Pn(t,1,!0),G,n):[]}),Wu=ca(function(e){var t=f(e,_n);return t.length&&t[0]===e[0]?Yn(t):[]}),Yu=ca(function(e){var t=Zr(e),n=f(e,_n);return t===Zr(n)?t=G:n.pop(),n.length&&n[0]===e[0]?Yn(n,fr(t)):[]}),Gu=ca(function(e){var t=Zr(e),n=f(e,_n);return t===Zr(n)?t=G:n.pop(),n.length&&n[0]===e[0]?Yn(n,G,t):[]}),Xu=ca(Jr),Vu=ca(function(e,t){t=f(Pn(t,1),String);var n=bn(e,t);return di(e,t.sort(I)),n}),Ku=ca(function(e){return wi(Pn(e,1,!0))}),Zu=ca(function(e){var t=Zr(e);return Aa(t)&&(t=G),wi(Pn(e,1,!0),fr(t))}),Qu=ca(function(e){var t=Zr(e);return Aa(t)&&(t=G),wi(Pn(e,1,!0),G,t)}),Ju=ca(function(e,t){return Aa(e)?Nn(e,t):[]}),ec=ca(function(e){return Ci(l(e,Aa))}),tc=ca(function(e){var t=Zr(e);return Aa(t)&&(t=G),Ci(l(e,Aa),fr(t))}),nc=ca(function(e){var t=Zr(e);return Aa(t)&&(t=G),Ci(l(e,Aa),G,t)}),ic=ca(Eo),rc=ca(function(e){var t=e.length,n=t>1?e[t-1]:G;return n="function"==typeof n?(e.pop(),n):G,xo(e,n)}),oc=ca(function(e){e=Pn(e,1);var t=e.length,n=t?e[0]:0,i=this.__wrapped__,r=function(t){return bn(t,e)};return!(t>1||this.__actions__.length)&&i instanceof Ot&&F(n)?(i=i.slice(n,+n+(t?1:0)),i.__actions__.push({func:Co,args:[r],thisArg:G}),new kt(i,this.__chain__).thru(function(e){return t&&!e.length&&e.push(G),e})):this.thru(r)}),ac=zi(function(e,t,n){ql.call(e,n)?++e[n]:e[n]=1}),sc=zi(function(e,t,n){ql.call(e,n)?e[n].push(t):e[n]=[t]}),lc=ca(function(e,t,i){var r=-1,o="function"==typeof t,a=wr(t),s=Sa(e)?Array(e.length):[];return Nu(e,function(e){var l=o?t:a&&null!=e?e[t]:G;s[++r]=l?n(l,e,i):Xn(e,t,i)}),s}),uc=zi(function(e,t,n){e[n]=t}),cc=zi(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),fc=ca(function(e,t){if(null==e)return[];var n=t.length;return n>1&&xr(e,t[0],t[1])?t=[]:n>2&&xr(t[0],t[1],t[2])&&(t.length=1),ai(e,Pn(t,1),[])}),hc=Rl.now,dc=ca(function(e,t,n){var i=V;if(n.length){var r=H(n,pr(dc));i|=ee}return ar(e,i,t,n,r)}),pc=ca(function(e,t,n){var i=V|K;if(n.length){var r=H(n,pr(pc));i|=ee}return ar(t,i,e,n,r)}),gc=ca(function(e,t){return In(e,1,t)}),mc=ca(function(e,t,n){return In(e,us(t)||0,n)}),vc=ca(function(e,t){t=f(Pn(t,1),fr());var i=t.length;return ca(function(r){for(var o=-1,a=gu(r.length,i);++o<a;)r[o]=t[o].call(this,r[o]);return n(e,this,r)})}),yc=ca(function(e,t){var n=H(t,pr(yc));return ar(e,ee,G,t,n)}),bc=ca(function(e,t){var n=H(t,pr(bc));return ar(e,te,G,t,n)}),_c=ca(function(e,t){return ar(e,ie,G,G,G,Pn(t,1))}),Ec=Array.isArray,xc=Kl?function(e){return e instanceof Kl}:dl(!1),wc=Bi(function(e,t){Ui(t,Ss(t),e)}),Tc=Bi(function(e,t){Ui(t,As(t),e)}),Sc=Bi(function(e,t,n,i){ji(t,As(t),e,i)}),Ac=Bi(function(e,t,n,i){ji(t,Ss(t),e,i)}),Cc=ca(function(e,t){return bn(e,Pn(t,1))}),kc=ca(function(e){return e.push(G,on),n(Sc,G,e)}),Oc=ca(function(e){return e.push(G,Or),n(Lc,G,e)}),Ic=Ji(function(e,t,n){e[t]=n},dl(pl)),Nc=Ji(function(e,t,n){ql.call(e,t)?e[t].push(n):e[t]=[n]},fr),Mc=ca(Xn),Dc=Bi(function(e,t,n){ri(e,t,n)}),Lc=Bi(function(e,t,n,i){ri(e,t,n,i)}),$c=ca(function(e,t){return null==e?{}:(t=f(Pn(t,1),String),si(e,Nn(As(e),t)))}),Rc=ca(function(e,t){return null==e?{}:si(e,Pn(t,1))}),Pc=Xi(function(e,t,n){return t=t.toLowerCase(),e+(n?Bs(t):t)}),Fc=Xi(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Uc=Xi(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),jc=Gi("toLowerCase"),Hc=Gi("toUpperCase"),zc=Xi(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),Bc=Xi(function(e,t,n){return e+(n?" ":"")+Bs(t)}),qc=Xi(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Wc=ca(function(e,t){try{return n(e,G,t)}catch(i){return Da(i)?i:new Pl(i)}}),Yc=ca(function(e,t){return o(Pn(t,1),function(t){e[t]=dc(e[t],e)}),e}),Gc=Zi(),Xc=Zi(!0),Vc=ca(function(e,t){return function(n){return Xn(n,e,t)}}),Kc=ca(function(e,t){return function(n){return Xn(e,n,t)}}),Zc=er(f),Qc=er(s),Jc=er(g),ef=ir(),tf=ir(!0),nf=or("ceil"),rf=or("floor"),of=or("round");return wt.prototype=Ct.prototype,kt.prototype=On(Ct.prototype),kt.prototype.constructor=kt,Ot.prototype=On(Ct.prototype),Ot.prototype.constructor=Ot,Dt.prototype=xu?xu(null):zl,Ft.prototype.clear=Ut,Ft.prototype["delete"]=jt,Ft.prototype.get=Ht,Ft.prototype.has=zt,Ft.prototype.set=Bt,qt.prototype.push=Yt,Gt.prototype.clear=Xt,Gt.prototype["delete"]=Vt,Gt.prototype.get=Kt,Gt.prototype.has=Zt,Gt.prototype.set=Qt,sa.Cache=Ft,wt.after=ea,wt.ary=ta,wt.assign=wc,wt.assignIn=Tc,wt.assignInWith=Sc,wt.assignWith=Ac,wt.at=Cc,wt.before=na,wt.bind=dc,wt.bindAll=Yc,wt.bindKey=pc,wt.castArray=ga,wt.chain=So,wt.chunk=Lr,wt.compact=$r,wt.concat=Hu,wt.cond=fl,wt.conforms=hl,wt.constant=dl,wt.countBy=ac,wt.create=ds,wt.curry=ia,wt.curryRight=ra,wt.debounce=oa,wt.defaults=kc,wt.defaultsDeep=Oc,wt.defer=gc,wt.delay=mc,wt.difference=zu,wt.differenceBy=Bu,wt.differenceWith=qu,wt.drop=Rr,wt.dropRight=Pr,wt.dropRightWhile=Fr,wt.dropWhile=Ur,wt.fill=jr,wt.filter=Po,wt.flatMap=jo,wt.flatten=Br,wt.flattenDeep=qr,wt.flattenDepth=Wr,wt.flip=aa,wt.flow=Gc,wt.flowRight=Xc,wt.fromPairs=Yr,wt.functions=_s,wt.functionsIn=Es,wt.groupBy=sc,wt.initial=Vr,wt.intersection=Wu,wt.intersectionBy=Yu,wt.intersectionWith=Gu,wt.invert=Ic,wt.invertBy=Nc,wt.invokeMap=lc,wt.iteratee=gl,wt.keyBy=uc,wt.keys=Ss,wt.keysIn=As,wt.map=qo,wt.mapKeys=Cs,wt.mapValues=ks,wt.matches=ml,wt.matchesProperty=vl,wt.memoize=sa,wt.merge=Dc,wt.mergeWith=Lc,wt.method=Vc,wt.methodOf=Kc,wt.mixin=yl,wt.negate=la,wt.nthArg=El,wt.omit=$c,wt.omitBy=Os,wt.once=ua,wt.orderBy=Wo,wt.over=Zc,wt.overArgs=vc,wt.overEvery=Qc,wt.overSome=Jc,wt.partial=yc,wt.partialRight=bc,wt.partition=cc,wt.pick=Rc,wt.pickBy=Is,wt.property=xl,wt.propertyOf=wl,wt.pull=Xu,wt.pullAll=Jr,wt.pullAllBy=eo,wt.pullAt=Vu,wt.range=ef,wt.rangeRight=tf,wt.rearg=_c,wt.reject=Xo,wt.remove=to,wt.rest=ca,wt.reverse=no,wt.sampleSize=Ko,wt.set=Ms,wt.setWith=Ds,wt.shuffle=Zo,wt.slice=io,wt.sortBy=fc,wt.sortedUniq=co,wt.sortedUniqBy=fo,wt.split=el,wt.spread=fa,wt.tail=ho,wt.take=po,wt.takeRight=go,wt.takeRightWhile=mo,wt.takeWhile=vo,wt.tap=Ao,wt.throttle=ha,wt.thru=Co,wt.toArray=as,wt.toPairs=Ls,wt.toPairsIn=$s,wt.toPath=Sl,wt.toPlainObject=cs,wt.transform=Rs,wt.unary=da,wt.union=Ku,wt.unionBy=Zu,wt.unionWith=Qu,wt.uniq=yo,wt.uniqBy=bo,wt.uniqWith=_o,wt.unset=Ps,wt.unzip=Eo,wt.unzipWith=xo,wt.values=Fs,wt.valuesIn=Us,wt.without=Ju,wt.words=cl,wt.wrap=pa,wt.xor=ec,wt.xorBy=tc,wt.xorWith=nc,wt.zip=ic,wt.zipObject=wo,wt.zipObjectDeep=To,wt.zipWith=rc,wt.extend=Tc,wt.extendWith=Sc,yl(wt,wt),wt.add=Cl,wt.attempt=Wc,wt.camelCase=Pc,
wt.capitalize=Bs,wt.ceil=nf,wt.clamp=js,wt.clone=ma,wt.cloneDeep=ya,wt.cloneDeepWith=ba,wt.cloneWith=va,wt.deburr=qs,wt.endsWith=Ws,wt.eq=_a,wt.escape=Ys,wt.escapeRegExp=Gs,wt.every=Ro,wt.find=Fo,wt.findIndex=Hr,wt.findKey=ps,wt.findLast=Uo,wt.findLastIndex=zr,wt.findLastKey=gs,wt.floor=rf,wt.forEach=Ho,wt.forEachRight=zo,wt.forIn=ms,wt.forInRight=vs,wt.forOwn=ys,wt.forOwnRight=bs,wt.get=xs,wt.gt=Ea,wt.gte=xa,wt.has=ws,wt.hasIn=Ts,wt.head=Gr,wt.identity=pl,wt.includes=Bo,wt.indexOf=Xr,wt.inRange=Hs,wt.invoke=Mc,wt.isArguments=wa,wt.isArray=Ec,wt.isArrayBuffer=Ta,wt.isArrayLike=Sa,wt.isArrayLikeObject=Aa,wt.isBoolean=Ca,wt.isBuffer=xc,wt.isDate=ka,wt.isElement=Oa,wt.isEmpty=Ia,wt.isEqual=Na,wt.isEqualWith=Ma,wt.isError=Da,wt.isFinite=La,wt.isFunction=$a,wt.isInteger=Ra,wt.isLength=Pa,wt.isMap=ja,wt.isMatch=Ha,wt.isMatchWith=za,wt.isNaN=Ba,wt.isNative=qa,wt.isNil=Ya,wt.isNull=Wa,wt.isNumber=Ga,wt.isObject=Fa,wt.isObjectLike=Ua,wt.isPlainObject=Xa,wt.isRegExp=Va,wt.isSafeInteger=Ka,wt.isSet=Za,wt.isString=Qa,wt.isSymbol=Ja,wt.isTypedArray=es,wt.isUndefined=ts,wt.isWeakMap=ns,wt.isWeakSet=is,wt.join=Kr,wt.kebabCase=Fc,wt.last=Zr,wt.lastIndexOf=Qr,wt.lowerCase=Uc,wt.lowerFirst=jc,wt.lt=rs,wt.lte=os,wt.max=kl,wt.maxBy=Ol,wt.mean=Il,wt.min=Nl,wt.minBy=Ml,wt.noConflict=bl,wt.noop=_l,wt.now=hc,wt.pad=Xs,wt.padEnd=Vs,wt.padStart=Ks,wt.parseInt=Zs,wt.random=zs,wt.reduce=Yo,wt.reduceRight=Go,wt.repeat=Qs,wt.replace=Js,wt.result=Ns,wt.round=of,wt.runInContext=Y,wt.sample=Vo,wt.size=Qo,wt.snakeCase=zc,wt.some=Jo,wt.sortedIndex=ro,wt.sortedIndexBy=oo,wt.sortedIndexOf=ao,wt.sortedLastIndex=so,wt.sortedLastIndexBy=lo,wt.sortedLastIndexOf=uo,wt.startCase=Bc,wt.startsWith=tl,wt.subtract=Dl,wt.sum=Ll,wt.sumBy=$l,wt.template=nl,wt.times=Tl,wt.toInteger=ss,wt.toLength=ls,wt.toLower=il,wt.toNumber=us,wt.toSafeInteger=fs,wt.toString=hs,wt.toUpper=rl,wt.trim=ol,wt.trimEnd=al,wt.trimStart=sl,wt.truncate=ll,wt.unescape=ul,wt.uniqueId=Al,wt.upperCase=qc,wt.upperFirst=Hc,wt.each=Ho,wt.eachRight=zo,wt.first=Gr,yl(wt,function(){var e={};return Un(wt,function(t,n){ql.call(wt.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),wt.VERSION=X,o(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){wt[e].placeholder=wt}),o(["drop","take"],function(e,t){Ot.prototype[e]=function(n){var i=this.__filtered__;if(i&&!t)return new Ot(this);n=n===G?1:pu(ss(n),0);var r=this.clone();return i?r.__takeCount__=gu(n,r.__takeCount__):r.__views__.push({size:gu(n,Ee),type:e+(r.__dir__<0?"Right":"")}),r},Ot.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),o(["filter","map","takeWhile"],function(e,t){var n=t+1,i=n==he||n==pe;Ot.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:fr(e,3),type:n}),t.__filtered__=t.__filtered__||i,t}}),o(["head","last"],function(e,t){var n="take"+(t?"Right":"");Ot.prototype[e]=function(){return this[n](1).value()[0]}}),o(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");Ot.prototype[e]=function(){return this.__filtered__?new Ot(this):this[n](1)}}),Ot.prototype.compact=function(){return this.filter(pl)},Ot.prototype.find=function(e){return this.filter(e).head()},Ot.prototype.findLast=function(e){return this.reverse().find(e)},Ot.prototype.invokeMap=ca(function(e,t){return"function"==typeof e?new Ot(this):this.map(function(n){return Xn(n,e,t)})}),Ot.prototype.reject=function(e){return e=fr(e,3),this.filter(function(t){return!e(t)})},Ot.prototype.slice=function(e,t){e=ss(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Ot(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==G&&(t=ss(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},Ot.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Ot.prototype.toArray=function(){return this.take(Ee)},Un(Ot.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),r=wt[i?"take"+("last"==t?"Right":""):t],o=i||/^find/.test(t);r&&(wt.prototype[t]=function(){var t=this.__wrapped__,a=i?[1]:arguments,s=t instanceof Ot,l=a[0],u=s||Ec(t),c=function(e){var t=r.apply(wt,h([e],a));return i&&f?t[0]:t};u&&n&&"function"==typeof l&&1!=l.length&&(s=u=!1);var f=this.__chain__,d=!!this.__actions__.length,p=o&&!f,g=s&&!d;if(!o&&u){t=g?t:new Ot(this);var m=e.apply(t,a);return m.__actions__.push({func:Co,args:[c],thisArg:G}),new kt(m,f)}return p&&g?e.apply(this,a):(m=this.thru(c),p?i?m.value()[0]:m.value():m)})}),o(["pop","push","shift","sort","splice","unshift"],function(e){var t=Hl[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);wt.prototype[e]=function(){var e=arguments;return i&&!this.__chain__?t.apply(this.value(),e):this[n](function(n){return t.apply(n,e)})}}),Un(Ot.prototype,function(e,t){var n=wt[t];if(n){var i=n.name+"",r=Iu[i]||(Iu[i]=[]);r.push({name:t,func:n})}}),Iu[Qi(G,K).name]=[{name:"wrapper",func:G}],Ot.prototype.clone=It,Ot.prototype.reverse=Nt,Ot.prototype.value=Mt,wt.prototype.at=oc,wt.prototype.chain=ko,wt.prototype.commit=Oo,wt.prototype.flatMap=Io,wt.prototype.next=No,wt.prototype.plant=Do,wt.prototype.reverse=Lo,wt.prototype.toJSON=wt.prototype.valueOf=wt.prototype.value=$o,ru&&(wt.prototype[ru]=Mo),wt}var G,X="4.5.1",V=1,K=2,Z=4,Q=8,J=16,ee=32,te=64,ne=128,ie=256,re=512,oe=1,ae=2,se=30,le="...",ue=150,ce=16,fe=200,he=1,de=2,pe=3,ge="Expected a function",me="__lodash_hash_undefined__",ve=1/0,ye=9007199254740991,be=1.7976931348623157e308,_e=NaN,Ee=4294967295,xe=Ee-1,we=Ee>>>1,Te="__lodash_placeholder__",Se="[object Arguments]",Ae="[object Array]",Ce="[object Boolean]",ke="[object Date]",Oe="[object Error]",Ie="[object Function]",Ne="[object GeneratorFunction]",Me="[object Map]",De="[object Number]",Le="[object Object]",$e="[object RegExp]",Re="[object Set]",Pe="[object String]",Fe="[object Symbol]",Ue="[object WeakMap]",je="[object WeakSet]",He="[object ArrayBuffer]",ze="[object Float32Array]",Be="[object Float64Array]",qe="[object Int8Array]",We="[object Int16Array]",Ye="[object Int32Array]",Ge="[object Uint8Array]",Xe="[object Uint8ClampedArray]",Ve="[object Uint16Array]",Ke="[object Uint32Array]",Ze=/\b__p \+= '';/g,Qe=/\b(__p \+=) '' \+/g,Je=/(__e\(.*?\)|\b__t\)) \+\n'';/g,et=/&(?:amp|lt|gt|quot|#39|#96);/g,tt=/[&<>"'`]/g,nt=RegExp(et.source),it=RegExp(tt.source),rt=/<%-([\s\S]+?)%>/g,ot=/<%([\s\S]+?)%>/g,at=/<%=([\s\S]+?)%>/g,st=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,lt=/^\w*$/,ut=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,ct=/[\\^$.*+?()[\]{}|]/g,ft=RegExp(ct.source),ht=/^\s+|\s+$/g,dt=/^\s+/,pt=/\s+$/,gt=/\\(\\)?/g,mt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,vt=/\w*$/,yt=/^0x/i,bt=/^[-+]0x[0-9a-f]+$/i,_t=/^0b[01]+$/i,Et=/^\[object .+?Constructor\]$/,xt=/^0o[0-7]+$/i,wt=/^(?:0|[1-9]\d*)$/,Tt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,St=/($^)/,At=/['\n\r\u2028\u2029\\]/g,Ct="\\ud800-\\udfff",kt="\\u0300-\\u036f\\ufe20-\\ufe23",Ot="\\u20d0-\\u20f0",It="\\u2700-\\u27bf",Nt="a-z\\xdf-\\xf6\\xf8-\\xff",Mt="\\xac\\xb1\\xd7\\xf7",Dt="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Lt="\\u2018\\u2019\\u201c\\u201d",$t=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Rt="A-Z\\xc0-\\xd6\\xd8-\\xde",Pt="\\ufe0e\\ufe0f",Ft=Mt+Dt+Lt+$t,Ut="["+Ct+"]",jt="["+Ft+"]",Ht="["+kt+Ot+"]",zt="\\d+",Bt="["+It+"]",qt="["+Nt+"]",Wt="[^"+Ct+Ft+zt+It+Nt+Rt+"]",Yt="\\ud83c[\\udffb-\\udfff]",Gt="(?:"+Ht+"|"+Yt+")",Xt="[^"+Ct+"]",Vt="(?:\\ud83c[\\udde6-\\uddff]){2}",Kt="[\\ud800-\\udbff][\\udc00-\\udfff]",Zt="["+Rt+"]",Qt="\\u200d",Jt="(?:"+qt+"|"+Wt+")",en="(?:"+Zt+"|"+Wt+")",tn=Gt+"?",nn="["+Pt+"]?",rn="(?:"+Qt+"(?:"+[Xt,Vt,Kt].join("|")+")"+nn+tn+")*",on=nn+tn+rn,an="(?:"+[Bt,Vt,Kt].join("|")+")"+on,sn="(?:"+[Xt+Ht+"?",Ht,Vt,Kt,Ut].join("|")+")",ln=RegExp(Ht,"g"),un=RegExp(Yt+"(?="+Yt+")|"+sn+on,"g"),cn=RegExp("["+Qt+Ct+kt+Ot+Pt+"]"),fn=/[a-zA-Z0-9]+/g,hn=RegExp([Zt+"?"+qt+"+(?="+[jt,Zt,"$"].join("|")+")",en+"+(?="+[jt,Zt+Jt,"$"].join("|")+")",Zt+"?"+Jt+"+",Zt+"+",zt,an].join("|"),"g"),dn=/[a-z][A-Z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,pn=["Array","Buffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Reflect","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],gn=-1,mn={};mn[ze]=mn[Be]=mn[qe]=mn[We]=mn[Ye]=mn[Ge]=mn[Xe]=mn[Ve]=mn[Ke]=!0,mn[Se]=mn[Ae]=mn[He]=mn[Ce]=mn[ke]=mn[Oe]=mn[Ie]=mn[Me]=mn[De]=mn[Le]=mn[$e]=mn[Re]=mn[Pe]=mn[Ue]=!1;var vn={};vn[Se]=vn[Ae]=vn[He]=vn[Ce]=vn[ke]=vn[ze]=vn[Be]=vn[qe]=vn[We]=vn[Ye]=vn[Me]=vn[De]=vn[Le]=vn[$e]=vn[Re]=vn[Pe]=vn[Fe]=vn[Ge]=vn[Xe]=vn[Ve]=vn[Ke]=!0,vn[Oe]=vn[Ie]=vn[Ue]=!1;var yn={"À":"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"},bn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},_n={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},En={"function":!0,object:!0},xn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},wn=parseFloat,Tn=parseInt,Sn=En[typeof exports]&&exports&&!exports.nodeType?exports:G,An=En[typeof module]&&module&&!module.nodeType?module:G,Cn=An&&An.exports===Sn?Sn:G,kn=O(Sn&&An&&"object"==typeof global&&global),On=O(En[typeof self]&&self),In=O(En[typeof window]&&window),Nn=O(En[typeof this]&&this),Mn=kn||In!==(Nn&&Nn.window)&&In||On||Nn||Function("return this")(),Dn=Y();(In||On||{})._=Dn,"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return Dn}):Sn&&An?(Cn&&((An.exports=Dn)._=Dn),Sn._=Dn):Mn._=Dn}.call(this),/*!
	Papa Parse
	v4.1.2
	https://github.com/mholt/PapaParse
*/
function(e){"use strict";function t(t,n){if(n=n||{},n.worker&&T.WORKERS_SUPPORTED){var i=c();return i.userStep=n.step,i.userChunk=n.chunk,i.userComplete=n.complete,i.userError=n.error,n.step=v(n.step),n.chunk=v(n.chunk),n.complete=v(n.complete),n.error=v(n.error),delete n.worker,void i.postMessage({input:t,config:n,workerId:i.id})}var s=null;return"string"==typeof t?s=n.download?new r(n):new a(n):(e.File&&t instanceof File||t instanceof Object)&&(s=new o(n)),s.stream(t)}function n(e,t){function n(){"object"==typeof t&&("string"==typeof t.delimiter&&1==t.delimiter.length&&T.BAD_DELIMITERS.indexOf(t.delimiter)==-1&&(l=t.delimiter),("boolean"==typeof t.quotes||t.quotes instanceof Array)&&(s=t.quotes),"string"==typeof t.newline&&(u=t.newline))}function i(e){if("object"!=typeof e)return[];var t=[];for(var n in e)t.push(n);return t}function r(e,t){var n="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var i=e instanceof Array&&e.length>0,r=!(t[0]instanceof Array);if(i){for(var a=0;a<e.length;a++)a>0&&(n+=l),n+=o(e[a],a);t.length>0&&(n+=u)}for(var s=0;s<t.length;s++){for(var c=i?e.length:t[s].length,f=0;f<c;f++){f>0&&(n+=l);var h=i&&r?e[f]:f;n+=o(t[s][h],f)}s<t.length-1&&(n+=u)}return n}function o(e,t){if("undefined"==typeof e||null===e)return"";e=e.toString().replace(/"/g,'""');var n="boolean"==typeof s&&s||s instanceof Array&&s[t]||a(e,T.BAD_DELIMITERS)||e.indexOf(l)>-1||" "==e.charAt(0)||" "==e.charAt(e.length-1);return n?'"'+e+'"':e}function a(e,t){for(var n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return!0;return!1}var s=!1,l=",",u="\r\n";if(n(),"string"==typeof e&&(e=JSON.parse(e)),e instanceof Array){if(!e.length||e[0]instanceof Array)return r(null,e);if("object"==typeof e[0])return r(i(e[0]),e)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),e.data instanceof Array&&(e.fields||(e.fields=e.data[0]instanceof Array?e.fields:i(e.data[0])),e.data[0]instanceof Array||"object"==typeof e.data[0]||(e.data=[e.data])),r(e.fields||[],e.data||[]);throw"exception: Unable to serialize unrecognized input"}function i(t){function n(e){var t=g(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new s(t),this._handle.streamer=this,this._config=t}this._handle=null,this._paused=!1,this._finished=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},n.call(this,t),this.parseChunk=function(t){if(this.isFirstChunk&&v(this._config.beforeFirstChunk)){var n=this._config.beforeFirstChunk(t);void 0!==n&&(t=n)}this.isFirstChunk=!1;var i=this._partialLine+t;this._partialLine="";var r=this._handle.parse(i,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var o=r.meta.cursor;this._finished||(this._partialLine=i.substring(o-this._baseIndex),this._baseIndex=o),r&&r.data&&(this._rowCount+=r.data.length);var a=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(_)e.postMessage({results:r,workerId:T.WORKER_ID,finished:a});else if(v(this._config.chunk)){if(this._config.chunk(r,this._handle),this._paused)return;r=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(r.data),this._completeResults.errors=this._completeResults.errors.concat(r.errors),this._completeResults.meta=r.meta),!a||!v(this._config.complete)||r&&r.meta.aborted||this._config.complete(this._completeResults),a||r&&r.meta.paused||this._nextChunk(),r}},this._sendError=function(t){v(this._config.error)?this._config.error(t):_&&this._config.error&&e.postMessage({workerId:T.WORKER_ID,error:t,finished:!1})}}function r(e){function t(e){var t=e.getResponseHeader("Content-Range");return parseInt(t.substr(t.lastIndexOf("/")+1))}e=e||{},e.chunkSize||(e.chunkSize=T.RemoteChunkSize),i.call(this,e);var n;b?this._nextChunk=function(){this._readChunk(),this._chunkLoaded()}:this._nextChunk=function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)return void this._chunkLoaded();if(n=new XMLHttpRequest,b||(n.onload=m(this._chunkLoaded,this),n.onerror=m(this._chunkError,this)),n.open("GET",this._input,!b),this._config.chunkSize){var e=this._start+this._config.chunkSize-1;n.setRequestHeader("Range","bytes="+this._start+"-"+e),n.setRequestHeader("If-None-Match","webkit-no-cache")}try{n.send()}catch(t){this._chunkError(t.message)}b&&0==n.status?this._chunkError():this._start+=this._config.chunkSize},this._chunkLoaded=function(){if(4==n.readyState){if(n.status<200||n.status>=400)return void this._chunkError();this._finished=!this._config.chunkSize||this._start>t(n),this.parseChunk(n.responseText)}},this._chunkError=function(e){var t=n.statusText||e;this._sendError(t)}}function o(e){e=e||{},e.chunkSize||(e.chunkSize=T.LocalChunkSize),i.call(this,e);var t,n,r="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,r?(t=new FileReader,t.onload=m(this._chunkLoaded,this),t.onerror=m(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var i=Math.min(this._start+this._config.chunkSize,this._input.size);e=n.call(e,this._start,i)}var o=t.readAsText(e,this._config.encoding);r||this._chunkLoaded({target:{result:o}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function a(e){e=e||{},i.call(this,e);var t,n;this.stream=function(e){return t=e,n=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e=this._config.chunkSize,t=e?n.substr(0,e):n;return n=e?n.substr(e):"",this._finished=!n,this.parseChunk(t)}}}function s(e){function t(){if(E&&h&&(u("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+T.DefaultDelimiter+"'"),h=!1),e.skipEmptyLines)for(var t=0;t<E.data.length;t++)1==E.data[t].length&&""==E.data[t][0]&&E.data.splice(t--,1);return n()&&i(),r()}function n(){return e.header&&0==_.length}function i(){if(E){for(var e=0;n()&&e<E.data.length;e++)for(var t=0;t<E.data[e].length;t++)_.push(E.data[e][t]);E.data.splice(0,1)}}function r(){if(!E||!e.header&&!e.dynamicTyping)return E;for(var t=0;t<E.data.length;t++){for(var n={},i=0;i<E.data[t].length;i++){if(e.dynamicTyping){var r=E.data[t][i];"true"==r||"TRUE"==r?E.data[t][i]=!0:"false"==r||"FALSE"==r?E.data[t][i]=!1:E.data[t][i]=s(r)}e.header&&(i>=_.length?(n.__parsed_extra||(n.__parsed_extra=[]),n.__parsed_extra.push(E.data[t][i])):n[_[i]]=E.data[t][i])}e.header&&(E.data[t]=n,i>_.length?u("FieldMismatch","TooManyFields","Too many fields: expected "+_.length+" fields but parsed "+i,t):i<_.length&&u("FieldMismatch","TooFewFields","Too few fields: expected "+_.length+" fields but parsed "+i,t))}return e.header&&E.meta&&(E.meta.fields=_),E}function o(t){for(var n,i,r,o=[",","\t","|",";",T.RECORD_SEP,T.UNIT_SEP],a=0;a<o.length;a++){var s=o[a],u=0,c=0;r=void 0;for(var f=new l({delimiter:s,preview:10}).parse(t),h=0;h<f.data.length;h++){var d=f.data[h].length;c+=d,"undefined"!=typeof r?d>1&&(u+=Math.abs(d-r),r=d):r=d}f.data.length>0&&(c/=f.data.length),("undefined"==typeof i||u<i)&&c>1.99&&(i=u,n=s)}return e.delimiter=n,{successful:!!n,bestDelimiter:n}}function a(e){e=e.substr(0,1048576);var t=e.split("\r");if(1==t.length)return"\n";for(var n=0,i=0;i<t.length;i++)"\n"==t[i][0]&&n++;return n>=t.length/2?"\r\n":"\r"}function s(e){var t=d.test(e);return t?parseFloat(e):e}function u(e,t,n,i){E.errors.push({type:e,code:t,message:n,row:i})}var c,f,h,d=/^\s*-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?\s*$/i,p=this,m=0,y=!1,b=!1,_=[],E={data:[],errors:[],meta:{}};if(v(e.step)){var x=e.step;e.step=function(i){if(E=i,n())t();else{if(t(),0==E.data.length)return;m+=i.data.length,e.preview&&m>e.preview?f.abort():x(E,p)}}}this.parse=function(n,i,r){if(e.newline||(e.newline=a(n)),h=!1,!e.delimiter){var s=o(n);s.successful?e.delimiter=s.bestDelimiter:(h=!0,e.delimiter=T.DefaultDelimiter),E.meta.delimiter=e.delimiter}var u=g(e);return e.preview&&e.header&&u.preview++,c=n,f=new l(u),E=f.parse(c,i,r),t(),y?{meta:{paused:!0}}:E||{meta:{paused:!1}}},this.paused=function(){return y},this.pause=function(){y=!0,f.abort(),c=c.substr(f.getCharIndex())},this.resume=function(){y=!1,p.streamer.parseChunk(c)},this.aborted=function(){return b},this.abort=function(){b=!0,f.abort(),E.meta.aborted=!0,v(e.complete)&&e.complete(E),c=""}}function l(e){e=e||{};var t=e.delimiter,n=e.newline,i=e.comments,r=e.step,o=e.preview,a=e.fastMode;if(("string"!=typeof t||T.BAD_DELIMITERS.indexOf(t)>-1)&&(t=","),i===t)throw"Comment character same as delimiter";i===!0?i="#":("string"!=typeof i||T.BAD_DELIMITERS.indexOf(i)>-1)&&(i=!1),"\n"!=n&&"\r"!=n&&"\r\n"!=n&&(n="\n");var s=0,l=!1;this.parse=function(e,u,c){function f(e){E.push(e),T=s}function h(t){return c?p():("undefined"==typeof t&&(t=e.substr(s)),w.push(t),s=m,f(w),_&&g(),p())}function d(t){s=t,f(w),w=[],k=e.indexOf(n,s)}function p(e){return{data:E,errors:x,meta:{delimiter:t,linebreak:n,aborted:l,truncated:!!e,cursor:T+(u||0)}}}function g(){r(p()),E=[],x=[]}if("string"!=typeof e)throw"Input must be a string";var m=e.length,v=t.length,y=n.length,b=i.length,_="function"==typeof r;s=0;var E=[],x=[],w=[],T=0;if(!e)return p();if(a||a!==!1&&e.indexOf('"')===-1){for(var S=e.split(n),A=0;A<S.length;A++){var w=S[A];if(s+=w.length,A!==S.length-1)s+=n.length;else if(c)return p();if(!i||w.substr(0,b)!=i){if(_){if(E=[],f(w.split(t)),g(),l)return p()}else f(w.split(t));if(o&&A>=o)return E=E.slice(0,o),p(!0)}}return p()}for(var C=e.indexOf(t,s),k=e.indexOf(n,s);;)if('"'!=e[s])if(i&&0===w.length&&e.substr(s,b)===i){if(k==-1)return p();s=k+y,k=e.indexOf(n,s),C=e.indexOf(t,s)}else if(C!==-1&&(C<k||k===-1))w.push(e.substring(s,C)),s=C+v,C=e.indexOf(t,s);else{if(k===-1)break;if(w.push(e.substring(s,k)),d(k+y),_&&(g(),l))return p();if(o&&E.length>=o)return p(!0)}else{var O=s;for(s++;;){var O=e.indexOf('"',O+1);if(O===-1)return c||x.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:E.length,index:s}),h();if(O===m-1){var I=e.substring(s,O).replace(/""/g,'"');return h(I)}if('"'!=e[O+1]){if(e[O+1]==t){w.push(e.substring(s,O).replace(/""/g,'"')),s=O+1+v,C=e.indexOf(t,s),k=e.indexOf(n,s);break}if(e.substr(O+1,y)===n){if(w.push(e.substring(s,O).replace(/""/g,'"')),d(O+1+y),C=e.indexOf(t,s),_&&(g(),l))return p();if(o&&E.length>=o)return p(!0);break}}else O++}}return h()},this.abort=function(){l=!0},this.getCharIndex=function(){return s}}function u(){var e=document.getElementsByTagName("script");return e.length?e[e.length-1].src:""}function c(){if(!T.WORKERS_SUPPORTED)return!1;if(!E&&null===T.SCRIPT_PATH)throw new Error("Script path cannot be determined automatically when Papa Parse is loaded asynchronously. You need to set Papa.SCRIPT_PATH manually.");var t=T.SCRIPT_PATH||y;t+=(t.indexOf("?")!==-1?"&":"?")+"papaworker";var n=new e.Worker(t);return n.onmessage=f,n.id=w++,x[n.id]=n,n}function f(e){var t=e.data,n=x[t.workerId],i=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var r=function(){i=!0,h(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},o={abort:r,pause:d,resume:d};if(v(n.userStep)){for(var a=0;a<t.results.data.length&&(n.userStep({data:[t.results.data[a]],errors:t.results.errors,meta:t.results.meta},o),!i);a++);delete t.results}else v(n.userChunk)&&(n.userChunk(t.results,o,t.file),delete t.results)}t.finished&&!i&&h(t.workerId,t.results)}function h(e,t){var n=x[e];v(n.userComplete)&&n.userComplete(t),n.terminate(),delete x[e]}function d(){throw"Not implemented."}function p(t){var n=t.data;if("undefined"==typeof T.WORKER_ID&&n&&(T.WORKER_ID=n.workerId),"string"==typeof n.input)e.postMessage({workerId:T.WORKER_ID,results:T.parse(n.input,n.config),finished:!0});else if(e.File&&n.input instanceof File||n.input instanceof Object){var i=T.parse(n.input,n.config);i&&e.postMessage({workerId:T.WORKER_ID,results:i,finished:!0})}}function g(e){if("object"!=typeof e)return e;var t=e instanceof Array?[]:{};for(var n in e)t[n]=g(e[n]);return t}function m(e,t){return function(){e.apply(t,arguments)}}function v(e){return"function"==typeof e}var y,b=!e.document&&!!e.postMessage,_=b&&/(\?|&)papaworker(=|&|$)/.test(e.location.search),E=!1,x={},w=0,T={};if(T.parse=t,T.unparse=n,T.RECORD_SEP=String.fromCharCode(30),T.UNIT_SEP=String.fromCharCode(31),T.BYTE_ORDER_MARK="\ufeff",T.BAD_DELIMITERS=["\r","\n",'"',T.BYTE_ORDER_MARK],T.WORKERS_SUPPORTED=!b&&!!e.Worker,T.SCRIPT_PATH=null,T.LocalChunkSize=10485760,T.RemoteChunkSize=5242880,T.DefaultDelimiter=",",T.Parser=l,T.ParserHandle=s,T.NetworkStreamer=r,T.FileStreamer=o,T.StringStreamer=a,"undefined"!=typeof module&&module.exports?module.exports=T:v(e.define)&&e.define.amd?define(function(){return T}):e.Papa=T,e.jQuery){var S=e.jQuery;S.fn.parse=function(t){function n(){if(0==a.length)return void(v(t.complete)&&t.complete());var e=a[0];if(v(t.before)){var n=t.before(e.file,e.inputElem);if("object"==typeof n){if("abort"==n.action)return void i("AbortError",e.file,e.inputElem,n.reason);if("skip"==n.action)return void r();"object"==typeof n.config&&(e.instanceConfig=S.extend(e.instanceConfig,n.config))}else if("skip"==n)return void r()}var o=e.instanceConfig.complete;e.instanceConfig.complete=function(t){v(o)&&o(t,e.file,e.inputElem),r()},T.parse(e.file,e.instanceConfig)}function i(e,n,i,r){v(t.error)&&t.error({name:e},n,i,r)}function r(){a.splice(0,1),n()}var o=t.config||{},a=[];return this.each(function(t){var n="INPUT"==S(this).prop("tagName").toUpperCase()&&"file"==S(this).attr("type").toLowerCase()&&e.FileReader;if(!n||!this.files||0==this.files.length)return!0;for(var i=0;i<this.files.length;i++)a.push({file:this.files[i],inputElem:this,instanceConfig:S.extend({},o)})}),n(),this}}_?e.onmessage=p:T.WORKERS_SUPPORTED&&(y=u(),document.body?document.addEventListener("DOMContentLoaded",function(){E=!0},!0):E=!0),r.prototype=Object.create(i.prototype),r.prototype.constructor=r,o.prototype=Object.create(i.prototype),o.prototype.constructor=o,a.prototype=Object.create(a.prototype),a.prototype.constructor=a}("undefined"!=typeof window?window:this),!function(){function e(e){return e&&(e.ownerDocument||e.document||e).documentElement}function t(e){return e&&(e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView)}function n(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function i(e){return null===e?NaN:+e}function r(e){return!isNaN(e)}function o(e){return{left:function(t,n,i,r){for(arguments.length<3&&(i=0),arguments.length<4&&(r=t.length);i<r;){var o=i+r>>>1;e(t[o],n)<0?i=o+1:r=o}return i},right:function(t,n,i,r){for(arguments.length<3&&(i=0),arguments.length<4&&(r=t.length);i<r;){var o=i+r>>>1;e(t[o],n)>0?r=o:i=o+1}return i}}}function a(e){return e.length}function s(e){for(var t=1;e*t%1;)t*=10;return t}function l(e,t){for(var n in t)Object.defineProperty(e.prototype,n,{value:t[n],enumerable:!1})}function u(){this._=Object.create(null)}function c(e){return(e+="")===Ea||e[0]===xa?xa+e:e}function f(e){return(e+="")[0]===xa?e.slice(1):e}function h(e){return c(e)in this._}function d(e){return(e=c(e))in this._&&delete this._[e]}function p(){var e=[];for(var t in this._)e.push(f(t));return e}function g(){var e=0;for(var t in this._)++e;return e}function m(){for(var e in this._)return!1;return!0}function v(){this._=Object.create(null)}function y(e){return e}function b(e,t,n){return function(){var i=n.apply(t,arguments);return i===t?e:i}}function _(e,t){if(t in e)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var n=0,i=wa.length;n<i;++n){var r=wa[n]+t;if(r in e)return r}}function E(){}function x(){}function w(e){function t(){for(var t,i=n,r=-1,o=i.length;++r<o;)(t=i[r].on)&&t.apply(this,arguments);return e}var n=[],i=new u;return t.on=function(t,r){var o,a=i.get(t);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(t)),r&&n.push(i.set(t,{on:r})),e)},t}function T(){la.event.preventDefault()}function S(){for(var e,t=la.event;e=t.sourceEvent;)t=e;return t}function A(e){for(var t=new x,n=0,i=arguments.length;++n<i;)t[arguments[n]]=w(t);return t.of=function(n,i){return function(r){try{var o=r.sourceEvent=la.event;r.target=e,la.event=r,t[r.type].apply(n,i)}finally{la.event=o}}},t}function C(e){return Sa(e,Oa),e}function k(e){return"function"==typeof e?e:function(){return Aa(e,this)}}function O(e){return"function"==typeof e?e:function(){return Ca(e,this)}}function I(e,t){function n(){this.removeAttribute(e)}function i(){this.removeAttributeNS(e.space,e.local)}function r(){this.setAttribute(e,t)}function o(){this.setAttributeNS(e.space,e.local,t)}function a(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}function s(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}return e=la.ns.qualify(e),null==t?e.local?i:n:"function"==typeof t?e.local?s:a:e.local?o:r}function N(e){return e.trim().replace(/\s+/g," ")}function M(e){return new RegExp("(?:^|\\s+)"+la.requote(e)+"(?:\\s+|$)","g")}function D(e){return(e+"").trim().split(/^|\s+/)}function L(e,t){function n(){for(var n=-1;++n<r;)e[n](this,t)}function i(){for(var n=-1,i=t.apply(this,arguments);++n<r;)e[n](this,i)}e=D(e).map($);var r=e.length;return"function"==typeof t?i:n}function $(e){var t=M(e);return function(n,i){if(r=n.classList)return i?r.add(e):r.remove(e);var r=n.getAttribute("class")||"";i?(t.lastIndex=0,t.test(r)||n.setAttribute("class",N(r+" "+e))):n.setAttribute("class",N(r.replace(t," ")))}}function R(e,t,n){function i(){this.style.removeProperty(e)}function r(){this.style.setProperty(e,t,n)}function o(){var i=t.apply(this,arguments);null==i?this.style.removeProperty(e):this.style.setProperty(e,i,n)}return null==t?i:"function"==typeof t?o:r}function P(e,t){function n(){delete this[e]}function i(){this[e]=t}function r(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}return null==t?n:"function"==typeof t?r:i}function F(e){function t(){var t=this.ownerDocument,n=this.namespaceURI;return n===Ia&&t.documentElement.namespaceURI===Ia?t.createElement(e):t.createElementNS(n,e)}function n(){return this.ownerDocument.createElementNS(e.space,e.local)}return"function"==typeof e?e:(e=la.ns.qualify(e)).local?n:t}function U(){var e=this.parentNode;e&&e.removeChild(this)}function j(e){return{__data__:e}}function H(e){return function(){return ka(this,e)}}function z(e){return arguments.length||(e=n),function(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}}function B(e,t){for(var n=0,i=e.length;n<i;n++)for(var r,o=e[n],a=0,s=o.length;a<s;a++)(r=o[a])&&t(r,a,n);return e}function q(e){return Sa(e,Ma),e}function W(e){var t,n;return function(i,r,o){var a,s=e[o].update,l=s.length;for(o!=n&&(n=o,t=0),r>=t&&(t=r+1);!(a=s[t])&&++t<l;);return a}}function Y(e,t,n){function i(){var t=this[a];t&&(this.removeEventListener(e,t,t.$),delete this[a])}function r(){var r=l(t,ca(arguments));i.call(this),this.addEventListener(e,this[a]=r,r.$=n),r._=t}function o(){var t,n=new RegExp("^__on([^.]+)"+la.requote(e)+"$");for(var i in this)if(t=i.match(n)){var r=this[i];this.removeEventListener(t[1],r,r.$),delete this[i]}}var a="__on"+e,s=e.indexOf("."),l=G;s>0&&(e=e.slice(0,s));var u=Da.get(e);return u&&(e=u,l=X),s?t?r:i:t?E:o}function G(e,t){return function(n){var i=la.event;la.event=n,t[0]=this.__data__;try{e.apply(this,t)}finally{la.event=i}}}function X(e,t){var n=G(e,t);return function(e){var t=this,i=e.relatedTarget;i&&(i===t||8&i.compareDocumentPosition(t))||n.call(t,e)}}function V(n){var i=".dragsuppress-"+ ++$a,r="click"+i,o=la.select(t(n)).on("touchmove"+i,T).on("dragstart"+i,T).on("selectstart"+i,T);if(null==La&&(La=!("onselectstart"in n)&&_(n.style,"userSelect")),La){var a=e(n).style,s=a[La];a[La]="none"}return function(e){if(o.on(i,null),La&&(a[La]=s),e){var t=function(){o.on(r,null)};o.on(r,function(){T(),t()},!0),setTimeout(t,0)}}}function K(e,n){n.changedTouches&&(n=n.changedTouches[0]);var i=e.ownerSVGElement||e;if(i.createSVGPoint){var r=i.createSVGPoint();if(Ra<0){var o=t(e);if(o.scrollX||o.scrollY){i=la.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var a=i[0][0].getScreenCTM();Ra=!(a.f||a.e),i.remove()}}return Ra?(r.x=n.pageX,r.y=n.pageY):(r.x=n.clientX,r.y=n.clientY),r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}var s=e.getBoundingClientRect();return[n.clientX-s.left-e.clientLeft,n.clientY-s.top-e.clientTop]}function Z(){return la.event.changedTouches[0].identifier}function Q(e){return e>0?1:e<0?-1:0}function J(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(t[1]-e[1])*(n[0]-e[0])}function ee(e){return e>1?0:e<-1?Ua:Math.acos(e)}function te(e){return e>1?za:e<-1?-za:Math.asin(e)}function ne(e){return((e=Math.exp(e))-1/e)/2}function ie(e){return((e=Math.exp(e))+1/e)/2}function re(e){return((e=Math.exp(2*e))-1)/(e+1)}function oe(e){return(e=Math.sin(e/2))*e}function ae(){}function se(e,t,n){return this instanceof se?(this.h=+e,this.s=+t,void(this.l=+n)):arguments.length<2?e instanceof se?new se(e.h,e.s,e.l):Ee(""+e,xe,se):new se(e,t,n)}function le(e,t,n){function i(e){return e>360?e-=360:e<0&&(e+=360),e<60?o+(a-o)*e/60:e<180?a:e<240?o+(a-o)*(240-e)/60:o}function r(e){return Math.round(255*i(e))}var o,a;return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)?0:t<0?0:t>1?1:t,n=n<0?0:n>1?1:n,a=n<=.5?n*(1+t):n+t-n*t,o=2*n-a,new ve(r(e+120),r(e),r(e-120))}function ue(e,t,n){return this instanceof ue?(this.h=+e,this.c=+t,void(this.l=+n)):arguments.length<2?e instanceof ue?new ue(e.h,e.c,e.l):e instanceof fe?de(e.l,e.a,e.b):de((e=we((e=la.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new ue(e,t,n)}function ce(e,t,n){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new fe(n,Math.cos(e*=Ba)*t,Math.sin(e)*t)}function fe(e,t,n){return this instanceof fe?(this.l=+e,this.a=+t,void(this.b=+n)):arguments.length<2?e instanceof fe?new fe(e.l,e.a,e.b):e instanceof ue?ce(e.h,e.c,e.l):we((e=ve(e)).r,e.g,e.b):new fe(e,t,n)}function he(e,t,n){var i=(e+16)/116,r=i+t/500,o=i-n/200;return r=pe(r)*es,i=pe(i)*ts,o=pe(o)*ns,new ve(me(3.2404542*r-1.5371385*i-.4985314*o),me(-.969266*r+1.8760108*i+.041556*o),me(.0556434*r-.2040259*i+1.0572252*o))}function de(e,t,n){return e>0?new ue(Math.atan2(n,t)*qa,Math.sqrt(t*t+n*n),e):new ue(NaN,NaN,e)}function pe(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function ge(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function me(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function ve(e,t,n){return this instanceof ve?(this.r=~~e,this.g=~~t,void(this.b=~~n)):arguments.length<2?e instanceof ve?new ve(e.r,e.g,e.b):Ee(""+e,ve,le):new ve(e,t,n)}function ye(e){return new ve(e>>16,e>>8&255,255&e)}function be(e){return ye(e)+""}function _e(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function Ee(e,t,n){var i,r,o,a=0,s=0,l=0;if(i=/([a-z]+)\((.*)\)/.exec(e=e.toLowerCase()))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 t(Se(r[0]),Se(r[1]),Se(r[2]))}return(o=os.get(e))?t(o.r,o.g,o.b):(null==e||"#"!==e.charAt(0)||isNaN(o=parseInt(e.slice(1),16))||(4===e.length?(a=(3840&o)>>4,a=a>>4|a,s=240&o,s=s>>4|s,l=15&o,l=l<<4|l):7===e.length&&(a=(16711680&o)>>16,s=(65280&o)>>8,l=255&o)),t(a,s,l))}function xe(e,t,n){var i,r,o=Math.min(e/=255,t/=255,n/=255),a=Math.max(e,t,n),s=a-o,l=(a+o)/2;return s?(r=l<.5?s/(a+o):s/(2-a-o),i=e==a?(t-n)/s+(t<n?6:0):t==a?(n-e)/s+2:(e-t)/s+4,i*=60):(i=NaN,r=l>0&&l<1?0:i),new se(i,r,l)}function we(e,t,n){e=Te(e),t=Te(t),n=Te(n);var i=ge((.4124564*e+.3575761*t+.1804375*n)/es),r=ge((.2126729*e+.7151522*t+.072175*n)/ts),o=ge((.0193339*e+.119192*t+.9503041*n)/ns);return fe(116*r-16,500*(i-r),200*(r-o))}function Te(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Se(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}function Ae(e){return"function"==typeof e?e:function(){return e}}function Ce(e){return function(t,n,i){return 2===arguments.length&&"function"==typeof n&&(i=n,n=null),ke(t,n,e,i)}}function ke(e,t,n,i){function r(){var e,t=l.status;if(!t&&Ie(l)||t>=200&&t<300||304===t){try{e=n.call(o,l)}catch(i){return void a.error.call(o,i)}a.load.call(o,e)}else a.error.call(o,l)}var o={},a=la.dispatch("beforesend","progress","load","error"),s={},l=new XMLHttpRequest,u=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(e)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=r:l.onreadystatechange=function(){l.readyState>3&&r()},l.onprogress=function(e){var t=la.event;la.event=e;try{a.progress.call(o,l)}finally{la.event=t}},o.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?s[e]:(null==t?delete s[e]:s[e]=t+"",o)},o.mimeType=function(e){return arguments.length?(t=null==e?null:e+"",o):t},o.responseType=function(e){return arguments.length?(u=e,o):u},o.response=function(e){return n=e,o},["get","post"].forEach(function(e){o[e]=function(){return o.send.apply(o,[e].concat(ca(arguments)))}}),o.send=function(n,i,r){if(2===arguments.length&&"function"==typeof i&&(r=i,i=null),l.open(n,e,!0),null==t||"accept"in s||(s.accept=t+",*/*"),l.setRequestHeader)for(var c in s)l.setRequestHeader(c,s[c]);return null!=t&&l.overrideMimeType&&l.overrideMimeType(t),null!=u&&(l.responseType=u),null!=r&&o.on("error",r).on("load",function(e){r(null,e)}),a.beforesend.call(o,l),l.send(null==i?null:i),o},o.abort=function(){return l.abort(),o},la.rebind(o,a,"on"),null==i?o:o.get(Oe(i))}function Oe(e){return 1===e.length?function(t,n){e(null==t?n:null)}:e}function Ie(e){var t=e.responseType;return t&&"text"!==t?e.response:e.responseText}function Ne(e,t,n){var i=arguments.length;i<2&&(t=0),i<3&&(n=Date.now());var r=n+t,o={c:e,t:r,n:null};return ss?ss.n=o:as=o,ss=o,ls||(us=clearTimeout(us),ls=1,cs(Me)),o}function Me(){var e=De(),t=Le()-e;t>24?(isFinite(t)&&(clearTimeout(us),us=setTimeout(Me,t)),ls=0):(ls=1,cs(Me))}function De(){for(var e=Date.now(),t=as;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function Le(){for(var e,t=as,n=1/0;t;)t.c?(t.t<n&&(n=t.t),t=(e=t).n):t=e?e.n=t.n:as=t.n;return ss=e,n}function $e(e,t){return t-(e?Math.ceil(Math.log(e)/Math.LN10):1)}function Re(e,t){var n=Math.pow(10,3*_a(8-t));return{scale:t>8?function(e){return e/n}:function(e){return e*n},symbol:e}}function Pe(e){var t=e.decimal,n=e.thousands,i=e.grouping,r=e.currency,o=i&&n?function(e,t){for(var r=e.length,o=[],a=0,s=i[0],l=0;r>0&&s>0&&(l+s+1>t&&(s=Math.max(1,t-l)),o.push(e.substring(r-=s,r+s)),!((l+=s+1)>t));)s=i[a=(a+1)%i.length];return o.reverse().join(n)}:y;return function(e){var n=hs.exec(e),i=n[1]||" ",a=n[2]||">",s=n[3]||"-",l=n[4]||"",u=n[5],c=+n[6],f=n[7],h=n[8],d=n[9],p=1,g="",m="",v=!1,y=!0;switch(h&&(h=+h.substring(1)),(u||"0"===i&&"="===a)&&(u=i="0",a="="),d){case"n":f=!0,d="g";break;case"%":p=100,m="%",d="f";break;case"p":p=100,m="%",d="r";break;case"b":case"o":case"x":case"X":"#"===l&&(g="0"+d.toLowerCase());case"c":y=!1;case"d":v=!0,h=0;break;case"s":p=-1,d="r"}"$"===l&&(g=r[0],m=r[1]),"r"!=d||h||(d="g"),null!=h&&("g"==d?h=Math.max(1,Math.min(21,h)):"e"!=d&&"f"!=d||(h=Math.max(0,Math.min(20,h)))),d=ds.get(d)||Fe;var b=u&&f;return function(e){var n=m;if(v&&e%1)return"";var r=e<0||0===e&&1/e<0?(e=-e,"-"):"-"===s?"":s;if(p<0){var l=la.formatPrefix(e,h);e=l.scale(e),n=l.symbol+m}else e*=p;e=d(e,h);var _,E,x=e.lastIndexOf(".");if(x<0){var w=y?e.lastIndexOf("e"):-1;w<0?(_=e,E=""):(_=e.substring(0,w),E=e.substring(w))}else _=e.substring(0,x),E=t+e.substring(x+1);!u&&f&&(_=o(_,1/0));var T=g.length+_.length+E.length+(b?0:r.length),S=T<c?new Array(T=c-T+1).join(i):"";return b&&(_=o(S+_,S.length?c-E.length:1/0)),r+=g,e=_+E,("<"===a?r+e+S:">"===a?S+r+e:"^"===a?S.substring(0,T>>=1)+r+e+S.substring(T):r+(b?e:S+e))+n}}}function Fe(e){return e+""}function Ue(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function je(e,t,n){function i(t){var n=e(t),i=o(n,1);return t-n<i-t?n:i}function r(n){return t(n=e(new gs(n-1)),1),n}function o(e,n){return t(e=new gs((+e)),n),e}function a(e,i,o){var a=r(e),s=[];if(o>1)for(;a<i;)n(a)%o||s.push(new Date((+a))),t(a,1);else for(;a<i;)s.push(new Date((+a))),t(a,1);return s}function s(e,t,n){try{gs=Ue;var i=new Ue;return i._=e,a(i,t,n)}finally{gs=Date}}e.floor=e,e.round=i,e.ceil=r,e.offset=o,e.range=a;var l=e.utc=He(e);return l.floor=l,l.round=He(i),l.ceil=He(r),l.offset=He(o),l.range=s,e}function He(e){return function(t,n){try{gs=Ue;var i=new Ue;return i._=t,e(i,n)._}finally{gs=Date}}}function ze(e){function t(e){function t(t){for(var n,r,o,a=[],s=-1,l=0;++s<i;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(r=vs[n=e.charAt(++s)])&&(n=e.charAt(++s)),(o=k[n])&&(n=o(t,null==r?"e"===n?" ":"0":r)),a.push(n),l=s+1);return a.push(e.slice(l,s)),a.join("")}var i=e.length;return t.parse=function(t){var i={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},r=n(i,e,t,0);if(r!=t.length)return null;"p"in i&&(i.H=i.H%12+12*i.p);var o=null!=i.Z&&gs!==Ue,a=new(o?Ue:gs);return"j"in i?a.setFullYear(i.y,0,i.j):"W"in i||"U"in i?("w"in i||(i.w="W"in i?1:0),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},t.toString=function(){return e},t}function n(e,t,n,i){for(var r,o,a,s=0,l=t.length,u=n.length;s<l;){if(i>=u)return-1;if(r=t.charCodeAt(s++),37===r){if(a=t.charAt(s++),o=O[a in vs?t.charAt(s++):a],!o||(i=o(e,n,i))<0)return-1}else if(r!=n.charCodeAt(i++))return-1}return i}function i(e,t,n){x.lastIndex=0;var i=x.exec(t.slice(n));return i?(e.w=w.get(i[0].toLowerCase()),n+i[0].length):-1}function r(e,t,n){_.lastIndex=0;var i=_.exec(t.slice(n));return i?(e.w=E.get(i[0].toLowerCase()),n+i[0].length):-1}function o(e,t,n){A.lastIndex=0;var i=A.exec(t.slice(n));return i?(e.m=C.get(i[0].toLowerCase()),n+i[0].length):-1}function a(e,t,n){T.lastIndex=0;var i=T.exec(t.slice(n));return i?(e.m=S.get(i[0].toLowerCase()),n+i[0].length):-1}function s(e,t,i){return n(e,k.c.toString(),t,i)}function l(e,t,i){return n(e,k.x.toString(),t,i)}function u(e,t,i){return n(e,k.X.toString(),t,i)}function c(e,t,n){var i=b.get(t.slice(n,n+=2).toLowerCase());return null==i?-1:(e.p=i,n)}var f=e.dateTime,h=e.date,d=e.time,p=e.periods,g=e.days,m=e.shortDays,v=e.months,y=e.shortMonths;t.utc=function(e){function n(e){try{gs=Ue;var t=new gs;return t._=e,i(t)}finally{gs=Date}}var i=t(e);return n.parse=function(e){try{gs=Ue;var t=i.parse(e);return t&&t._}finally{gs=Date}},n.toString=i.toString,n},t.multi=t.utc.multi=lt;var b=la.map(),_=qe(g),E=We(g),x=qe(m),w=We(m),T=qe(v),S=We(v),A=qe(y),C=We(y);p.forEach(function(e,t){b.set(e.toLowerCase(),t)});var k={a:function(e){return m[e.getDay()]},A:function(e){return g[e.getDay()]},b:function(e){return y[e.getMonth()]},B:function(e){return v[e.getMonth()]},c:t(f),d:function(e,t){return Be(e.getDate(),t,2)},e:function(e,t){return Be(e.getDate(),t,2)},H:function(e,t){return Be(e.getHours(),t,2)},I:function(e,t){return Be(e.getHours()%12||12,t,2)},j:function(e,t){return Be(1+ps.dayOfYear(e),t,3)},L:function(e,t){return Be(e.getMilliseconds(),t,3)},m:function(e,t){return Be(e.getMonth()+1,t,2)},M:function(e,t){return Be(e.getMinutes(),t,2)},p:function(e){return p[+(e.getHours()>=12)]},S:function(e,t){return Be(e.getSeconds(),t,2)},U:function(e,t){return Be(ps.sundayOfYear(e),t,2)},w:function(e){return e.getDay()},W:function(e,t){return Be(ps.mondayOfYear(e),t,2)},x:t(h),X:t(d),y:function(e,t){return Be(e.getFullYear()%100,t,2)},Y:function(e,t){
return Be(e.getFullYear()%1e4,t,4)},Z:at,"%":function(){return"%"}},O={a:i,A:r,b:o,B:a,c:s,d:et,e:et,H:nt,I:nt,j:tt,L:ot,m:Je,M:it,p:c,S:rt,U:Ge,w:Ye,W:Xe,x:l,X:u,y:Ke,Y:Ve,Z:Ze,"%":st};return t}function Be(e,t,n){var i=e<0?"-":"",r=(i?-e:e)+"",o=r.length;return i+(o<n?new Array(n-o+1).join(t)+r:r)}function qe(e){return new RegExp("^(?:"+e.map(la.requote).join("|")+")","i")}function We(e){for(var t=new u,n=-1,i=e.length;++n<i;)t.set(e[n].toLowerCase(),n);return t}function Ye(e,t,n){ys.lastIndex=0;var i=ys.exec(t.slice(n,n+1));return i?(e.w=+i[0],n+i[0].length):-1}function Ge(e,t,n){ys.lastIndex=0;var i=ys.exec(t.slice(n));return i?(e.U=+i[0],n+i[0].length):-1}function Xe(e,t,n){ys.lastIndex=0;var i=ys.exec(t.slice(n));return i?(e.W=+i[0],n+i[0].length):-1}function Ve(e,t,n){ys.lastIndex=0;var i=ys.exec(t.slice(n,n+4));return i?(e.y=+i[0],n+i[0].length):-1}function Ke(e,t,n){ys.lastIndex=0;var i=ys.exec(t.slice(n,n+2));return i?(e.y=Qe(+i[0]),n+i[0].length):-1}function Ze(e,t,n){return/^[+-]\d{4}$/.test(t=t.slice(n,n+5))?(e.Z=-t,n+5):-1}function Qe(e){return e+(e>68?1900:2e3)}function Je(e,t,n){ys.lastIndex=0;var i=ys.exec(t.slice(n,n+2));return i?(e.m=i[0]-1,n+i[0].length):-1}function et(e,t,n){ys.lastIndex=0;var i=ys.exec(t.slice(n,n+2));return i?(e.d=+i[0],n+i[0].length):-1}function tt(e,t,n){ys.lastIndex=0;var i=ys.exec(t.slice(n,n+3));return i?(e.j=+i[0],n+i[0].length):-1}function nt(e,t,n){ys.lastIndex=0;var i=ys.exec(t.slice(n,n+2));return i?(e.H=+i[0],n+i[0].length):-1}function it(e,t,n){ys.lastIndex=0;var i=ys.exec(t.slice(n,n+2));return i?(e.M=+i[0],n+i[0].length):-1}function rt(e,t,n){ys.lastIndex=0;var i=ys.exec(t.slice(n,n+2));return i?(e.S=+i[0],n+i[0].length):-1}function ot(e,t,n){ys.lastIndex=0;var i=ys.exec(t.slice(n,n+3));return i?(e.L=+i[0],n+i[0].length):-1}function at(e){var t=e.getTimezoneOffset(),n=t>0?"-":"+",i=_a(t)/60|0,r=_a(t)%60;return n+Be(i,"0",2)+Be(r,"0",2)}function st(e,t,n){bs.lastIndex=0;var i=bs.exec(t.slice(n,n+1));return i?n+i[0].length:-1}function lt(e){for(var t=e.length,n=-1;++n<t;)e[n][0]=this(e[n][0]);return function(t){for(var n=0,i=e[n];!i[1](t);)i=e[++n];return i[0](t)}}function ut(){}function ct(e,t,n){var i=n.s=e+t,r=i-e,o=i-r;n.t=e-o+(t-r)}function ft(e,t){e&&ws.hasOwnProperty(e.type)&&ws[e.type](e,t)}function ht(e,t,n){var i,r=-1,o=e.length-n;for(t.lineStart();++r<o;)i=e[r],t.point(i[0],i[1],i[2]);t.lineEnd()}function dt(e,t){var n=-1,i=e.length;for(t.polygonStart();++n<i;)ht(e[n],t,1);t.polygonEnd()}function pt(){function e(e,t){e*=Ba,t=t*Ba/2+Ua/4;var n=e-i,a=n>=0?1:-1,s=a*n,l=Math.cos(t),u=Math.sin(t),c=o*u,f=r*l+c*Math.cos(s),h=c*a*Math.sin(s);Ss.add(Math.atan2(h,f)),i=e,r=l,o=u}var t,n,i,r,o;As.point=function(a,s){As.point=e,i=(t=a)*Ba,r=Math.cos(s=(n=s)*Ba/2+Ua/4),o=Math.sin(s)},As.lineEnd=function(){e(t,n)}}function gt(e){var t=e[0],n=e[1],i=Math.cos(n);return[i*Math.cos(t),i*Math.sin(t),Math.sin(n)]}function mt(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function vt(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function yt(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function bt(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function _t(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function Et(e){return[Math.atan2(e[1],e[0]),te(e[2])]}function xt(e,t){return _a(e[0]-t[0])<Pa&&_a(e[1]-t[1])<Pa}function wt(e,t){e*=Ba;var n=Math.cos(t*=Ba);Tt(n*Math.cos(e),n*Math.sin(e),Math.sin(t))}function Tt(e,t,n){++Cs,Os+=(e-Os)/Cs,Is+=(t-Is)/Cs,Ns+=(n-Ns)/Cs}function St(){function e(e,r){e*=Ba;var o=Math.cos(r*=Ba),a=o*Math.cos(e),s=o*Math.sin(e),l=Math.sin(r),u=Math.atan2(Math.sqrt((u=n*l-i*s)*u+(u=i*a-t*l)*u+(u=t*s-n*a)*u),t*a+n*s+i*l);ks+=u,Ms+=u*(t+(t=a)),Ds+=u*(n+(n=s)),Ls+=u*(i+(i=l)),Tt(t,n,i)}var t,n,i;Fs.point=function(r,o){r*=Ba;var a=Math.cos(o*=Ba);t=a*Math.cos(r),n=a*Math.sin(r),i=Math.sin(o),Fs.point=e,Tt(t,n,i)}}function At(){Fs.point=wt}function Ct(){function e(e,t){e*=Ba;var n=Math.cos(t*=Ba),a=n*Math.cos(e),s=n*Math.sin(e),l=Math.sin(t),u=r*l-o*s,c=o*a-i*l,f=i*s-r*a,h=Math.sqrt(u*u+c*c+f*f),d=i*a+r*s+o*l,p=h&&-ee(d)/h,g=Math.atan2(h,d);$s+=p*u,Rs+=p*c,Ps+=p*f,ks+=g,Ms+=g*(i+(i=a)),Ds+=g*(r+(r=s)),Ls+=g*(o+(o=l)),Tt(i,r,o)}var t,n,i,r,o;Fs.point=function(a,s){t=a,n=s,Fs.point=e,a*=Ba;var l=Math.cos(s*=Ba);i=l*Math.cos(a),r=l*Math.sin(a),o=Math.sin(s),Tt(i,r,o)},Fs.lineEnd=function(){e(t,n),Fs.lineEnd=At,Fs.point=wt}}function kt(e,t){function n(n,i){return n=e(n,i),t(n[0],n[1])}return e.invert&&t.invert&&(n.invert=function(n,i){return n=t.invert(n,i),n&&e.invert(n[0],n[1])}),n}function Ot(){return!0}function It(e,t,n,i,r){var o=[],a=[];if(e.forEach(function(e){if(!((t=e.length-1)<=0)){var t,n=e[0],i=e[t];if(xt(n,i)){r.lineStart();for(var s=0;s<t;++s)r.point((n=e[s])[0],n[1]);return void r.lineEnd()}var l=new Mt(n,e,null,(!0)),u=new Mt(n,null,l,(!1));l.o=u,o.push(l),a.push(u),l=new Mt(i,e,null,(!1)),u=new Mt(i,null,l,(!0)),l.o=u,o.push(l),a.push(u)}}),a.sort(t),Nt(o),Nt(a),o.length){for(var s=0,l=n,u=a.length;s<u;++s)a[s].e=l=!l;for(var c,f,h=o[0];;){for(var d=h,p=!0;d.v;)if((d=d.n)===h)return;c=d.z,r.lineStart();do{if(d.v=d.o.v=!0,d.e){if(p)for(var s=0,u=c.length;s<u;++s)r.point((f=c[s])[0],f[1]);else i(d.x,d.n.x,1,r);d=d.n}else{if(p){c=d.p.z;for(var s=c.length-1;s>=0;--s)r.point((f=c[s])[0],f[1])}else i(d.x,d.p.x,-1,r);d=d.p}d=d.o,c=d.z,p=!p}while(!d.v);r.lineEnd()}}}function Nt(e){if(t=e.length){for(var t,n,i=0,r=e[0];++i<t;)r.n=n=e[i],n.p=r,r=n;r.n=n=e[0],n.p=r}}function Mt(e,t,n,i){this.x=e,this.z=t,this.o=n,this.e=i,this.v=!1,this.n=this.p=null}function Dt(e,t,n,i){return function(r,o){function a(t,n){var i=r(t,n);e(t=i[0],n=i[1])&&o.point(t,n)}function s(e,t){var n=r(e,t);m.point(n[0],n[1])}function l(){y.point=s,m.lineStart()}function u(){y.point=a,m.lineEnd()}function c(e,t){g.push([e,t]);var n=r(e,t);_.point(n[0],n[1])}function f(){_.lineStart(),g=[]}function h(){c(g[0][0],g[0][1]),_.lineEnd();var e,t=_.clean(),n=b.buffer(),i=n.length;if(g.pop(),p.push(g),g=null,i)if(1&t){e=n[0];var r,i=e.length-1,a=-1;if(i>0){for(E||(o.polygonStart(),E=!0),o.lineStart();++a<i;)o.point((r=e[a])[0],r[1]);o.lineEnd()}}else i>1&&2&t&&n.push(n.pop().concat(n.shift())),d.push(n.filter(Lt))}var d,p,g,m=t(o),v=r.invert(i[0],i[1]),y={point:a,lineStart:l,lineEnd:u,polygonStart:function(){y.point=c,y.lineStart=f,y.lineEnd=h,d=[],p=[]},polygonEnd:function(){y.point=a,y.lineStart=l,y.lineEnd=u,d=la.merge(d);var e=jt(v,p);d.length?(E||(o.polygonStart(),E=!0),It(d,Rt,e,n,o)):e&&(E||(o.polygonStart(),E=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),E&&(o.polygonEnd(),E=!1),d=p=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}},b=$t(),_=t(b),E=!1;return y}}function Lt(e){return e.length>1}function $t(){var e,t=[];return{lineStart:function(){t.push(e=[])},point:function(t,n){e.push([t,n])},lineEnd:E,buffer:function(){var n=t;return t=[],e=null,n},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Rt(e,t){return((e=e.x)[0]<0?e[1]-za-Pa:za-e[1])-((t=t.x)[0]<0?t[1]-za-Pa:za-t[1])}function Pt(e){var t,n=NaN,i=NaN,r=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(o,a){var s=o>0?Ua:-Ua,l=_a(o-n);_a(l-Ua)<Pa?(e.point(n,i=(i+a)/2>0?za:-za),e.point(r,i),e.lineEnd(),e.lineStart(),e.point(s,i),e.point(o,i),t=0):r!==s&&l>=Ua&&(_a(n-r)<Pa&&(n-=r*Pa),_a(o-s)<Pa&&(o-=s*Pa),i=Ft(n,i,o,a),e.point(r,i),e.lineEnd(),e.lineStart(),e.point(s,i),t=0),e.point(n=o,i=a),r=s},lineEnd:function(){e.lineEnd(),n=i=NaN},clean:function(){return 2-t}}}function Ft(e,t,n,i){var r,o,a=Math.sin(e-n);return _a(a)>Pa?Math.atan((Math.sin(t)*(o=Math.cos(i))*Math.sin(n)-Math.sin(i)*(r=Math.cos(t))*Math.sin(e))/(r*o*a)):(t+i)/2}function Ut(e,t,n,i){var r;if(null==e)r=n*za,i.point(-Ua,r),i.point(0,r),i.point(Ua,r),i.point(Ua,0),i.point(Ua,-r),i.point(0,-r),i.point(-Ua,-r),i.point(-Ua,0),i.point(-Ua,r);else if(_a(e[0]-t[0])>Pa){var o=e[0]<t[0]?Ua:-Ua;r=n*o/2,i.point(-o,r),i.point(0,r),i.point(o,r)}else i.point(t[0],t[1])}function jt(e,t){var n=e[0],i=e[1],r=[Math.sin(n),-Math.cos(n),0],o=0,a=0;Ss.reset();for(var s=0,l=t.length;s<l;++s){var u=t[s],c=u.length;if(c)for(var f=u[0],h=f[0],d=f[1]/2+Ua/4,p=Math.sin(d),g=Math.cos(d),m=1;;){m===c&&(m=0),e=u[m];var v=e[0],y=e[1]/2+Ua/4,b=Math.sin(y),_=Math.cos(y),E=v-h,x=E>=0?1:-1,w=x*E,T=w>Ua,S=p*b;if(Ss.add(Math.atan2(S*x*Math.sin(w),g*_+S*Math.cos(w))),o+=T?E+x*ja:E,T^h>=n^v>=n){var A=vt(gt(f),gt(e));_t(A);var C=vt(r,A);_t(C);var k=(T^E>=0?-1:1)*te(C[2]);(i>k||i===k&&(A[0]||A[1]))&&(a+=T^E>=0?1:-1)}if(!m++)break;h=v,p=b,g=_,f=e}}return(o<-Pa||o<Pa&&Ss<-Pa)^1&a}function Ht(e){function t(e,t){return Math.cos(e)*Math.cos(t)>o}function n(e){var n,o,l,u,c;return{lineStart:function(){u=l=!1,c=1},point:function(f,h){var d,p=[f,h],g=t(f,h),m=a?g?0:r(f,h):g?r(f+(f<0?Ua:-Ua),h):0;if(!n&&(u=l=g)&&e.lineStart(),g!==l&&(d=i(n,p),(xt(n,d)||xt(p,d))&&(p[0]+=Pa,p[1]+=Pa,g=t(p[0],p[1]))),g!==l)c=0,g?(e.lineStart(),d=i(p,n),e.point(d[0],d[1])):(d=i(n,p),e.point(d[0],d[1]),e.lineEnd()),n=d;else if(s&&n&&a^g){var v;m&o||!(v=i(p,n,!0))||(c=0,a?(e.lineStart(),e.point(v[0][0],v[0][1]),e.point(v[1][0],v[1][1]),e.lineEnd()):(e.point(v[1][0],v[1][1]),e.lineEnd(),e.lineStart(),e.point(v[0][0],v[0][1])))}!g||n&&xt(n,p)||e.point(p[0],p[1]),n=p,l=g,o=m},lineEnd:function(){l&&e.lineEnd(),n=null},clean:function(){return c|(u&&l)<<1}}}function i(e,t,n){var i=gt(e),r=gt(t),a=[1,0,0],s=vt(i,r),l=mt(s,s),u=s[0],c=l-u*u;if(!c)return!n&&e;var f=o*l/c,h=-o*u/c,d=vt(a,s),p=bt(a,f),g=bt(s,h);yt(p,g);var m=d,v=mt(p,m),y=mt(m,m),b=v*v-y*(mt(p,p)-1);if(!(b<0)){var _=Math.sqrt(b),E=bt(m,(-v-_)/y);if(yt(E,p),E=Et(E),!n)return E;var x,w=e[0],T=t[0],S=e[1],A=t[1];T<w&&(x=w,w=T,T=x);var C=T-w,k=_a(C-Ua)<Pa,O=k||C<Pa;if(!k&&A<S&&(x=S,S=A,A=x),O?k?S+A>0^E[1]<(_a(E[0]-w)<Pa?S:A):S<=E[1]&&E[1]<=A:C>Ua^(w<=E[0]&&E[0]<=T)){var I=bt(m,(-v+_)/y);return yt(I,p),[E,Et(I)]}}}function r(t,n){var i=a?e:Ua-e,r=0;return t<-i?r|=1:t>i&&(r|=2),n<-i?r|=4:n>i&&(r|=8),r}var o=Math.cos(e),a=o>0,s=_a(o)>Pa,l=gn(e,6*Ba);return Dt(t,n,l,a?[0,-e]:[-Ua,e-Ua])}function zt(e,t,n,i){return function(r){var o,a=r.a,s=r.b,l=a.x,u=a.y,c=s.x,f=s.y,h=0,d=1,p=c-l,g=f-u;if(o=e-l,p||!(o>0)){if(o/=p,p<0){if(o<h)return;o<d&&(d=o)}else if(p>0){if(o>d)return;o>h&&(h=o)}if(o=n-l,p||!(o<0)){if(o/=p,p<0){if(o>d)return;o>h&&(h=o)}else if(p>0){if(o<h)return;o<d&&(d=o)}if(o=t-u,g||!(o>0)){if(o/=g,g<0){if(o<h)return;o<d&&(d=o)}else if(g>0){if(o>d)return;o>h&&(h=o)}if(o=i-u,g||!(o<0)){if(o/=g,g<0){if(o>d)return;o>h&&(h=o)}else if(g>0){if(o<h)return;o<d&&(d=o)}return h>0&&(r.a={x:l+h*p,y:u+h*g}),d<1&&(r.b={x:l+d*p,y:u+d*g}),r}}}}}}function Bt(e,t,n,i){function r(i,r){return _a(i[0]-e)<Pa?r>0?0:3:_a(i[0]-n)<Pa?r>0?2:1:_a(i[1]-t)<Pa?r>0?1:0:r>0?3:2}function o(e,t){return a(e.x,t.x)}function a(e,t){var n=r(e,1),i=r(t,1);return n!==i?n-i:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}return function(s){function l(e){for(var t=0,n=m.length,i=e[1],r=0;r<n;++r)for(var o,a=1,s=m[r],l=s.length,u=s[0];a<l;++a)o=s[a],u[1]<=i?o[1]>i&&J(u,o,e)>0&&++t:o[1]<=i&&J(u,o,e)<0&&--t,u=o;return 0!==t}function u(o,s,l,u){var c=0,f=0;if(null==o||(c=r(o,l))!==(f=r(s,l))||a(o,s)<0^l>0){do u.point(0===c||3===c?e:n,c>1?i:t);while((c=(c+l+4)%4)!==f)}else u.point(s[0],s[1])}function c(r,o){return e<=r&&r<=n&&t<=o&&o<=i}function f(e,t){c(e,t)&&s.point(e,t)}function h(){O.point=p,m&&m.push(v=[]),T=!0,w=!1,E=x=NaN}function d(){g&&(p(y,b),_&&w&&C.rejoin(),g.push(C.buffer())),O.point=f,w&&s.lineEnd()}function p(e,t){e=Math.max(-js,Math.min(js,e)),t=Math.max(-js,Math.min(js,t));var n=c(e,t);if(m&&v.push([e,t]),T)y=e,b=t,_=n,T=!1,n&&(s.lineStart(),s.point(e,t));else if(n&&w)s.point(e,t);else{var i={a:{x:E,y:x},b:{x:e,y:t}};k(i)?(w||(s.lineStart(),s.point(i.a.x,i.a.y)),s.point(i.b.x,i.b.y),n||s.lineEnd(),S=!1):n&&(s.lineStart(),s.point(e,t),S=!1)}E=e,x=t,w=n}var g,m,v,y,b,_,E,x,w,T,S,A=s,C=$t(),k=zt(e,t,n,i),O={point:f,lineStart:h,lineEnd:d,polygonStart:function(){s=C,g=[],m=[],S=!0},polygonEnd:function(){s=A,g=la.merge(g);var t=l([e,i]),n=S&&t,r=g.length;(n||r)&&(s.polygonStart(),n&&(s.lineStart(),u(null,null,1,s),s.lineEnd()),r&&It(g,o,t,u,s),s.polygonEnd()),g=m=v=null}};return O}}function qt(e){var t=0,n=Ua/3,i=sn(e),r=i(t,n);return r.parallels=function(e){return arguments.length?i(t=e[0]*Ua/180,n=e[1]*Ua/180):[t/Ua*180,n/Ua*180]},r}function Wt(e,t){function n(e,t){var n=Math.sqrt(o-2*r*Math.sin(t))/r;return[n*Math.sin(e*=r),a-n*Math.cos(e)]}var i=Math.sin(e),r=(i+Math.sin(t))/2,o=1+i*(2*r-i),a=Math.sqrt(o)/r;return n.invert=function(e,t){var n=a-t;return[Math.atan2(e,n)/r,te((o-(e*e+n*n)*r*r)/(2*r))]},n}function Yt(){function e(e,t){zs+=r*e-i*t,i=e,r=t}var t,n,i,r;Gs.point=function(o,a){Gs.point=e,t=i=o,n=r=a},Gs.lineEnd=function(){e(t,n)}}function Gt(e,t){e<Bs&&(Bs=e),e>Ws&&(Ws=e),t<qs&&(qs=t),t>Ys&&(Ys=t)}function Xt(){function e(e,t){a.push("M",e,",",t,o)}function t(e,t){a.push("M",e,",",t),s.point=n}function n(e,t){a.push("L",e,",",t)}function i(){s.point=e}function r(){a.push("Z")}var o=Vt(4.5),a=[],s={point:e,lineStart:function(){s.point=t},lineEnd:i,polygonStart:function(){s.lineEnd=r},polygonEnd:function(){s.lineEnd=i,s.point=e},pointRadius:function(e){return o=Vt(e),s},result:function(){if(a.length){var e=a.join("");return a=[],e}}};return s}function Vt(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function Kt(e,t){Os+=e,Is+=t,++Ns}function Zt(){function e(e,i){var r=e-t,o=i-n,a=Math.sqrt(r*r+o*o);Ms+=a*(t+e)/2,Ds+=a*(n+i)/2,Ls+=a,Kt(t=e,n=i)}var t,n;Vs.point=function(i,r){Vs.point=e,Kt(t=i,n=r)}}function Qt(){Vs.point=Kt}function Jt(){function e(e,t){var n=e-i,o=t-r,a=Math.sqrt(n*n+o*o);Ms+=a*(i+e)/2,Ds+=a*(r+t)/2,Ls+=a,a=r*e-i*t,$s+=a*(i+e),Rs+=a*(r+t),Ps+=3*a,Kt(i=e,r=t)}var t,n,i,r;Vs.point=function(o,a){Vs.point=e,Kt(t=i=o,n=r=a)},Vs.lineEnd=function(){e(t,n)}}function en(e){function t(t,n){e.moveTo(t+a,n),e.arc(t,n,a,0,ja)}function n(t,n){e.moveTo(t,n),s.point=i}function i(t,n){e.lineTo(t,n)}function r(){s.point=t}function o(){e.closePath()}var a=4.5,s={point:t,lineStart:function(){s.point=n},lineEnd:r,polygonStart:function(){s.lineEnd=o},polygonEnd:function(){s.lineEnd=r,s.point=t},pointRadius:function(e){return a=e,s},result:E};return s}function tn(e){function t(e){return(s?i:n)(e)}function n(t){return on(t,function(n,i){n=e(n,i),t.point(n[0],n[1])})}function i(t){function n(n,i){n=e(n,i),t.point(n[0],n[1])}function i(){b=NaN,T.point=o,t.lineStart()}function o(n,i){var o=gt([n,i]),a=e(n,i);r(b,_,y,E,x,w,b=a[0],_=a[1],y=n,E=o[0],x=o[1],w=o[2],s,t),t.point(b,_)}function a(){T.point=n,t.lineEnd()}function l(){i(),T.point=u,T.lineEnd=c}function u(e,t){o(f=e,h=t),d=b,p=_,g=E,m=x,v=w,T.point=o}function c(){r(b,_,y,E,x,w,d,p,f,g,m,v,s,t),T.lineEnd=a,a()}var f,h,d,p,g,m,v,y,b,_,E,x,w,T={point:n,lineStart:i,lineEnd:a,polygonStart:function(){t.polygonStart(),T.lineStart=l},polygonEnd:function(){t.polygonEnd(),T.lineStart=i}};return T}function r(t,n,i,s,l,u,c,f,h,d,p,g,m,v){var y=c-t,b=f-n,_=y*y+b*b;if(_>4*o&&m--){var E=s+d,x=l+p,w=u+g,T=Math.sqrt(E*E+x*x+w*w),S=Math.asin(w/=T),A=_a(_a(w)-1)<Pa||_a(i-h)<Pa?(i+h)/2:Math.atan2(x,E),C=e(A,S),k=C[0],O=C[1],I=k-t,N=O-n,M=b*I-y*N;(M*M/_>o||_a((y*I+b*N)/_-.5)>.3||s*d+l*p+u*g<a)&&(r(t,n,i,s,l,u,k,O,A,E/=T,x/=T,w,m,v),v.point(k,O),r(k,O,A,E,x,w,c,f,h,d,p,g,m,v))}}var o=.5,a=Math.cos(30*Ba),s=16;return t.precision=function(e){return arguments.length?(s=(o=e*e)>0&&16,t):Math.sqrt(o)},t}function nn(e){var t=tn(function(t,n){return e([t*qa,n*qa])});return function(e){return ln(t(e))}}function rn(e){this.stream=e}function on(e,t){return{point:t,sphere:function(){e.sphere()},lineStart:function(){e.lineStart()},lineEnd:function(){e.lineEnd()},polygonStart:function(){e.polygonStart()},polygonEnd:function(){e.polygonEnd()}}}function an(e){return sn(function(){return e})()}function sn(e){function t(e){return e=s(e[0]*Ba,e[1]*Ba),[e[0]*h+l,u-e[1]*h]}function n(e){return e=s.invert((e[0]-l)/h,(u-e[1])/h),e&&[e[0]*qa,e[1]*qa]}function i(){s=kt(a=fn(v,b,_),o);var e=o(g,m);return l=d-e[0]*h,u=p+e[1]*h,r()}function r(){return c&&(c.valid=!1,c=null),t}var o,a,s,l,u,c,f=tn(function(e,t){return e=o(e,t),[e[0]*h+l,u-e[1]*h]}),h=150,d=480,p=250,g=0,m=0,v=0,b=0,_=0,E=Us,x=y,w=null,T=null;return t.stream=function(e){return c&&(c.valid=!1),c=ln(E(a,f(x(e)))),c.valid=!0,c},t.clipAngle=function(e){return arguments.length?(E=null==e?(w=e,Us):Ht((w=+e)*Ba),r()):w},t.clipExtent=function(e){return arguments.length?(T=e,x=e?Bt(e[0][0],e[0][1],e[1][0],e[1][1]):y,r()):T},t.scale=function(e){return arguments.length?(h=+e,i()):h},t.translate=function(e){return arguments.length?(d=+e[0],p=+e[1],i()):[d,p]},t.center=function(e){return arguments.length?(g=e[0]%360*Ba,m=e[1]%360*Ba,i()):[g*qa,m*qa]},t.rotate=function(e){return arguments.length?(v=e[0]%360*Ba,b=e[1]%360*Ba,_=e.length>2?e[2]%360*Ba:0,i()):[v*qa,b*qa,_*qa]},la.rebind(t,f,"precision"),function(){return o=e.apply(this,arguments),t.invert=o.invert&&n,i()}}function ln(e){return on(e,function(t,n){e.point(t*Ba,n*Ba)})}function un(e,t){return[e,t]}function cn(e,t){return[e>Ua?e-ja:e<-Ua?e+ja:e,t]}function fn(e,t,n){return e?t||n?kt(dn(e),pn(t,n)):dn(e):t||n?pn(t,n):cn}function hn(e){return function(t,n){return t+=e,[t>Ua?t-ja:t<-Ua?t+ja:t,n]}}function dn(e){var t=hn(e);return t.invert=hn(-e),t}function pn(e,t){function n(e,t){var n=Math.cos(t),s=Math.cos(e)*n,l=Math.sin(e)*n,u=Math.sin(t),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(e),r=Math.sin(e),o=Math.cos(t),a=Math.sin(t);return n.invert=function(e,t){var n=Math.cos(t),s=Math.cos(e)*n,l=Math.sin(e)*n,u=Math.sin(t),c=u*o-l*a;return[Math.atan2(l*o+u*a,s*i+c*r),te(c*i-s*r)]},n}function gn(e,t){var n=Math.cos(e),i=Math.sin(e);return function(r,o,a,s){var l=a*t;null!=r?(r=mn(n,r),o=mn(n,o),(a>0?r<o:r>o)&&(r+=a*ja)):(r=e+a*ja,o=e-.5*l);for(var u,c=r;a>0?c>o:c<o;c-=l)s.point((u=Et([n,-i*Math.cos(c),-i*Math.sin(c)]))[0],u[1])}}function mn(e,t){var n=gt(t);n[0]-=e,_t(n);var i=ee(-n[1]);return((-n[2]<0?-i:i)+2*Math.PI-Pa)%(2*Math.PI)}function vn(e,t,n){var i=la.range(e,t-Pa,n).concat(t);return function(e){return i.map(function(t){return[e,t]})}}function yn(e,t,n){var i=la.range(e,t-Pa,n).concat(t);return function(e){return i.map(function(t){return[t,e]})}}function bn(e){return e.source}function _n(e){return e.target}function En(e,t,n,i){var r=Math.cos(t),o=Math.sin(t),a=Math.cos(i),s=Math.sin(i),l=r*Math.cos(e),u=r*Math.sin(e),c=a*Math.cos(n),f=a*Math.sin(n),h=2*Math.asin(Math.sqrt(oe(i-t)+r*a*oe(n-e))),d=1/Math.sin(h),p=h?function(e){var t=Math.sin(e*=h)*d,n=Math.sin(h-e)*d,i=n*l+t*c,r=n*u+t*f,a=n*o+t*s;return[Math.atan2(r,i)*qa,Math.atan2(a,Math.sqrt(i*i+r*r))*qa]}:function(){return[e*qa,t*qa]};return p.distance=h,p}function xn(){function e(e,r){var o=Math.sin(r*=Ba),a=Math.cos(r),s=_a((e*=Ba)-t),l=Math.cos(s);Ks+=Math.atan2(Math.sqrt((s=a*Math.sin(s))*s+(s=i*o-n*a*l)*s),n*o+i*a*l),t=e,n=o,i=a}var t,n,i;Zs.point=function(r,o){t=r*Ba,n=Math.sin(o*=Ba),i=Math.cos(o),Zs.point=e},Zs.lineEnd=function(){Zs.point=Zs.lineEnd=E}}function wn(e,t){function n(t,n){var i=Math.cos(t),r=Math.cos(n),o=e(i*r);return[o*r*Math.sin(t),o*Math.sin(n)]}return n.invert=function(e,n){var i=Math.sqrt(e*e+n*n),r=t(i),o=Math.sin(r),a=Math.cos(r);return[Math.atan2(e*o,i*a),Math.asin(i&&n*o/i)]},n}function Tn(e,t){function n(e,t){a>0?t<-za+Pa&&(t=-za+Pa):t>za-Pa&&(t=za-Pa);var n=a/Math.pow(r(t),o);return[n*Math.sin(o*e),a-n*Math.cos(o*e)]}var i=Math.cos(e),r=function(e){return Math.tan(Ua/4+e/2)},o=e===t?Math.sin(e):Math.log(i/Math.cos(t))/Math.log(r(t)/r(e)),a=i*Math.pow(r(e),o)/o;return o?(n.invert=function(e,t){var n=a-t,i=Q(o)*Math.sqrt(e*e+n*n);return[Math.atan2(e,n)/o,2*Math.atan(Math.pow(a/i,1/o))-za]},n):An}function Sn(e,t){function n(e,t){var n=o-t;return[n*Math.sin(r*e),o-n*Math.cos(r*e)]}var i=Math.cos(e),r=e===t?Math.sin(e):(i-Math.cos(t))/(t-e),o=i/r+e;return _a(r)<Pa?un:(n.invert=function(e,t){var n=o-t;return[Math.atan2(e,n)/r,o-Q(r)*Math.sqrt(e*e+n*n)]},n)}function An(e,t){return[e,Math.log(Math.tan(Ua/4+t/2))]}function Cn(e){var t,n=an(e),i=n.scale,r=n.translate,o=n.clipExtent;return n.scale=function(){var e=i.apply(n,arguments);return e===n?t?n.clipExtent(null):n:e},n.translate=function(){var e=r.apply(n,arguments);return e===n?t?n.clipExtent(null):n:e},n.clipExtent=function(e){var a=o.apply(n,arguments);if(a===n){if(t=null==e){var s=Ua*i(),l=r();o([[l[0]-s,l[1]-s],[l[0]+s,l[1]+s]])}}else t&&(a=null);return a},n.clipExtent(null)}function kn(e,t){return[Math.log(Math.tan(Ua/4+t/2)),-e]}function On(e){return e[0]}function In(e){return e[1]}function Nn(e){for(var t=e.length,n=[0,1],i=2,r=2;r<t;r++){for(;i>1&&J(e[n[i-2]],e[n[i-1]],e[r])<=0;)--i;n[i++]=r}return n.slice(0,i)}function Mn(e,t){return e[0]-t[0]||e[1]-t[1]}function Dn(e,t,n){return(n[0]-t[0])*(e[1]-t[1])<(n[1]-t[1])*(e[0]-t[0])}function Ln(e,t,n,i){var r=e[0],o=n[0],a=t[0]-r,s=i[0]-o,l=e[1],u=n[1],c=t[1]-l,f=i[1]-u,h=(s*(l-u)-f*(r-o))/(f*a-s*c);return[r+h*a,l+h*c]}function $n(e){var t=e[0],n=e[e.length-1];return!(t[0]-n[0]||t[1]-n[1])}function Rn(){ii(this),this.edge=this.site=this.circle=null}function Pn(e){var t=ul.pop()||new Rn;return t.site=e,t}function Fn(e){Xn(e),al.remove(e),ul.push(e),ii(e)}function Un(e){var t=e.circle,n=t.x,i=t.cy,r={x:n,y:i},o=e.P,a=e.N,s=[e];Fn(e);for(var l=o;l.circle&&_a(n-l.circle.x)<Pa&&_a(i-l.circle.cy)<Pa;)o=l.P,s.unshift(l),Fn(l),l=o;s.unshift(l),Xn(l);for(var u=a;u.circle&&_a(n-u.circle.x)<Pa&&_a(i-u.circle.cy)<Pa;)a=u.N,s.push(u),Fn(u),u=a;s.push(u),Xn(u);var c,f=s.length;for(c=1;c<f;++c)u=s[c],l=s[c-1],ei(u.edge,l.site,u.site,r);l=s[0],u=s[f-1],u.edge=Qn(l.site,u.site,null,r),Gn(l),Gn(u)}function jn(e){for(var t,n,i,r,o=e.x,a=e.y,s=al._;s;)if(i=Hn(s,a)-o,i>Pa)s=s.L;else{if(r=o-zn(s,a),!(r>Pa)){i>-Pa?(t=s.P,n=s):r>-Pa?(t=s,n=s.N):t=n=s;break}if(!s.R){t=s;break}s=s.R}var l=Pn(e);if(al.insert(t,l),t||n){if(t===n)return Xn(t),n=Pn(t.site),al.insert(l,n),l.edge=n.edge=Qn(t.site,l.site),Gn(t),void Gn(n);if(!n)return void(l.edge=Qn(t.site,l.site));Xn(t),Xn(n);var u=t.site,c=u.x,f=u.y,h=e.x-c,d=e.y-f,p=n.site,g=p.x-c,m=p.y-f,v=2*(h*m-d*g),y=h*h+d*d,b=g*g+m*m,_={x:(m*y-d*b)/v+c,y:(h*b-g*y)/v+f};ei(n.edge,u,p,_),l.edge=Qn(u,e,null,_),n.edge=Qn(e,p,null,_),Gn(t),Gn(n)}}function Hn(e,t){var n=e.site,i=n.x,r=n.y,o=r-t;if(!o)return i;var a=e.P;if(!a)return-(1/0);n=a.site;var s=n.x,l=n.y,u=l-t;if(!u)return s;var c=s-i,f=1/o-1/u,h=c/u;return f?(-h+Math.sqrt(h*h-2*f*(c*c/(-2*u)-l+u/2+r-o/2)))/f+i:(i+s)/2}function zn(e,t){var n=e.N;if(n)return Hn(n,t);var i=e.site;return i.y===t?i.x:1/0}function Bn(e){this.site=e,this.edges=[]}function qn(e){for(var t,n,i,r,o,a,s,l,u,c,f=e[0][0],h=e[1][0],d=e[0][1],p=e[1][1],g=ol,m=g.length;m--;)if(o=g[m],o&&o.prepare())for(s=o.edges,l=s.length,a=0;a<l;)c=s[a].end(),i=c.x,r=c.y,u=s[++a%l].start(),t=u.x,n=u.y,(_a(i-t)>Pa||_a(r-n)>Pa)&&(s.splice(a,0,new ti(Jn(o.site,c,_a(i-f)<Pa&&p-r>Pa?{x:f,y:_a(t-f)<Pa?n:p}:_a(r-p)<Pa&&h-i>Pa?{x:_a(n-p)<Pa?t:h,y:p}:_a(i-h)<Pa&&r-d>Pa?{x:h,y:_a(t-h)<Pa?n:d}:_a(r-d)<Pa&&i-f>Pa?{x:_a(n-d)<Pa?t:f,y:d}:null),o.site,null)),++l)}function Wn(e,t){return t.angle-e.angle}function Yn(){ii(this),this.x=this.y=this.arc=this.site=this.cy=null}function Gn(e){var t=e.P,n=e.N;if(t&&n){var i=t.site,r=e.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,f=o.y-s,h=2*(l*f-u*c);if(!(h>=-Fa)){var d=l*l+u*u,p=c*c+f*f,g=(f*d-u*p)/h,m=(l*p-c*d)/h,f=m+s,v=cl.pop()||new Yn;v.arc=e,v.site=r,v.x=g+a,v.y=f+Math.sqrt(g*g+m*m),v.cy=f,e.circle=v;for(var y=null,b=ll._;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}ll.insert(y,v),y||(sl=v)}}}}function Xn(e){var t=e.circle;t&&(t.P||(sl=t.N),ll.remove(t),cl.push(t),ii(t),e.circle=null)}function Vn(e){for(var t,n=rl,i=zt(e[0][0],e[0][1],e[1][0],e[1][1]),r=n.length;r--;)t=n[r],(!Kn(t,e)||!i(t)||_a(t.a.x-t.b.x)<Pa&&_a(t.a.y-t.b.y)<Pa)&&(t.a=t.b=null,n.splice(r,1))}function Kn(e,t){var n=e.b;if(n)return!0;var i,r,o=e.a,a=t[0][0],s=t[1][0],l=t[0][1],u=t[1][1],c=e.l,f=e.r,h=c.x,d=c.y,p=f.x,g=f.y,m=(h+p)/2,v=(d+g)/2;if(g===d){if(m<a||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-d),r=v-i*m,i<-1||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(d<g){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 e.a=o,e.b=n,!0}function Zn(e,t){this.l=e,this.r=t,this.a=this.b=null}function Qn(e,t,n,i){var r=new Zn(e,t);return rl.push(r),n&&ei(r,e,t,n),i&&ei(r,t,e,i),ol[e.i].edges.push(new ti(r,e,t)),ol[t.i].edges.push(new ti(r,t,e)),r}function Jn(e,t,n){var i=new Zn(e,null);return i.a=t,i.b=n,rl.push(i),i}function ei(e,t,n,i){e.a||e.b?e.l===n?e.b=i:e.a=i:(e.a=i,e.l=t,e.r=n)}function ti(e,t,n){var i=e.a,r=e.b;this.edge=e,this.site=t,this.angle=n?Math.atan2(n.y-t.y,n.x-t.x):e.l===t?Math.atan2(r.x-i.x,i.y-r.y):Math.atan2(i.x-r.x,r.y-i.y)}function ni(){this._=null}function ii(e){e.U=e.C=e.L=e.R=e.P=e.N=null}function ri(e,t){var n=t,i=t.R,r=n.U;r?r.L===n?r.L=i:r.R=i:e._=i,i.U=r,n.U=i,n.R=i.L,n.R&&(n.R.U=n),i.L=n}function oi(e,t){var n=t,i=t.L,r=n.U;r?r.L===n?r.L=i:r.R=i:e._=i,i.U=r,n.U=i,n.L=i.R,n.L&&(n.L.U=n),i.R=n}function ai(e){for(;e.L;)e=e.L;return e}function si(e,t){var n,i,r,o=e.sort(li).pop();for(rl=[],ol=new Array(e.length),al=new ni,ll=new ni;;)if(r=sl,o&&(!r||o.y<r.y||o.y===r.y&&o.x<r.x))o.x===n&&o.y===i||(ol[o.i]=new Bn(o),jn(o),n=o.x,i=o.y),o=e.pop();else{if(!r)break;Un(r.arc)}t&&(Vn(t),qn(t));var a={cells:ol,edges:rl};return al=ll=rl=ol=null,a}function li(e,t){return t.y-e.y||t.x-e.x}function ui(e,t,n){return(e.x-n.x)*(t.y-e.y)-(e.x-t.x)*(n.y-e.y)}function ci(e){return e.x}function fi(e){return e.y}function hi(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function di(e,t,n,i,r,o){if(!e(t,n,i,r,o)){var a=.5*(n+r),s=.5*(i+o),l=t.nodes;l[0]&&di(e,l[0],n,i,a,s),l[1]&&di(e,l[1],a,i,r,s),l[2]&&di(e,l[2],n,s,a,o),l[3]&&di(e,l[3],a,s,r,o)}}function pi(e,t,n,i,r,o,a){var s,l=1/0;return function u(e,c,f,h,d){if(!(c>o||f>a||h<i||d<r)){if(p=e.point){var p,g=t-e.x,m=n-e.y,v=g*g+m*m;if(v<l){var y=Math.sqrt(l=v);i=t-y,r=n-y,o=t+y,a=n+y,s=p}}for(var b=e.nodes,_=.5*(c+h),E=.5*(f+d),x=t>=_,w=n>=E,T=w<<1|x,S=T+4;T<S;++T)if(e=b[3&T])switch(3&T){case 0:u(e,c,f,_,E);break;case 1:u(e,_,f,h,E);break;case 2:u(e,c,E,_,d);break;case 3:u(e,_,E,h,d)}}}(e,i,r,o,a),s}function gi(e,t){e=la.rgb(e),t=la.rgb(t);var n=e.r,i=e.g,r=e.b,o=t.r-n,a=t.g-i,s=t.b-r;return function(e){return"#"+_e(Math.round(n+o*e))+_e(Math.round(i+a*e))+_e(Math.round(r+s*e))}}function mi(e,t){var n,i={},r={};for(n in e)n in t?i[n]=bi(e[n],t[n]):r[n]=e[n];for(n in t)n in e||(r[n]=t[n]);return function(e){for(n in i)r[n]=i[n](e);return r}}function vi(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function yi(e,t){var n,i,r,o=hl.lastIndex=dl.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=hl.exec(e))&&(i=dl.exec(t));)(r=i.index)>o&&(r=t.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:vi(n,i)})),o=dl.lastIndex;return o<t.length&&(r=t.slice(o),s[a]?s[a]+=r:s[++a]=r),s.length<2?l[0]?(t=l[0].x,function(e){return t(e)+""}):function(){return t}:(t=l.length,function(e){for(var n,i=0;i<t;++i)s[(n=l[i]).i]=n.x(e);return s.join("")})}function bi(e,t){for(var n,i=la.interpolators.length;--i>=0&&!(n=la.interpolators[i](e,t)););return n}function _i(e,t){var n,i=[],r=[],o=e.length,a=t.length,s=Math.min(e.length,t.length);for(n=0;n<s;++n)i.push(bi(e[n],t[n]));for(;n<o;++n)r[n]=e[n];for(;n<a;++n)r[n]=t[n];return function(e){for(n=0;n<s;++n)r[n]=i[n](e);return r}}function Ei(e){return function(t){return t<=0?0:t>=1?1:e(t)}}function xi(e){return function(t){return 1-e(1-t)}}function wi(e){return function(t){return.5*(t<.5?e(2*t):2-e(2-2*t))}}function Ti(e){return e*e}function Si(e){return e*e*e}function Ai(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,n=t*e;return 4*(e<.5?n:3*(e-t)+n-.75)}function Ci(e){return function(t){return Math.pow(t,e)}}function ki(e){return 1-Math.cos(e*za)}function Oi(e){return Math.pow(2,10*(e-1))}function Ii(e){return 1-Math.sqrt(1-e*e)}function Ni(e,t){var n;return arguments.length<2&&(t=.45),arguments.length?n=t/ja*Math.asin(1/e):(e=1,n=t/4),function(i){return 1+e*Math.pow(2,-10*i)*Math.sin((i-n)*ja/t)}}function Mi(e){return e||(e=1.70158),function(t){return t*t*((e+1)*t-e)}}function Di(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function Li(e,t){e=la.hcl(e),t=la.hcl(t);var n=e.h,i=e.c,r=e.l,o=t.h-n,a=t.c-i,s=t.l-r;return isNaN(a)&&(a=0,i=isNaN(i)?t.c:i),isNaN(o)?(o=0,n=isNaN(n)?t.h:n):o>180?o-=360:o<-180&&(o+=360),function(e){return ce(n+o*e,i+a*e,r+s*e)+""}}function $i(e,t){e=la.hsl(e),t=la.hsl(t);var n=e.h,i=e.s,r=e.l,o=t.h-n,a=t.s-i,s=t.l-r;return isNaN(a)&&(a=0,i=isNaN(i)?t.s:i),isNaN(o)?(o=0,n=isNaN(n)?t.h:n):o>180?o-=360:o<-180&&(o+=360),function(e){return le(n+o*e,i+a*e,r+s*e)+""}}function Ri(e,t){e=la.lab(e),t=la.lab(t);var n=e.l,i=e.a,r=e.b,o=t.l-n,a=t.a-i,s=t.b-r;return function(e){return he(n+o*e,i+a*e,r+s*e)+""}}function Pi(e,t){return t-=e,function(n){return Math.round(e+t*n)}}function Fi(e){var t=[e.a,e.b],n=[e.c,e.d],i=ji(t),r=Ui(t,n),o=ji(Hi(n,t,-r))||0;t[0]*n[1]<n[0]*t[1]&&(t[0]*=-1,t[1]*=-1,i*=-1,r*=-1),this.rotate=(i?Math.atan2(t[1],t[0]):Math.atan2(-n[0],n[1]))*qa,this.translate=[e.e,e.f],this.scale=[i,o],this.skew=o?Math.atan2(r,o)*qa:0}function Ui(e,t){return e[0]*t[0]+e[1]*t[1]}function ji(e){var t=Math.sqrt(Ui(e,e));return t&&(e[0]/=t,e[1]/=t),t}function Hi(e,t,n){return e[0]+=n*t[0],e[1]+=n*t[1],e}function zi(e){return e.length?e.pop()+",":""}function Bi(e,t,n,i){if(e[0]!==t[0]||e[1]!==t[1]){var r=n.push("translate(",null,",",null,")");i.push({i:r-4,x:vi(e[0],t[0])},{i:r-2,x:vi(e[1],t[1])})}else(t[0]||t[1])&&n.push("translate("+t+")")}function qi(e,t,n,i){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),i.push({i:n.push(zi(n)+"rotate(",null,")")-2,x:vi(e,t)})):t&&n.push(zi(n)+"rotate("+t+")")}function Wi(e,t,n,i){e!==t?i.push({i:n.push(zi(n)+"skewX(",null,")")-2,x:vi(e,t)}):t&&n.push(zi(n)+"skewX("+t+")")}function Yi(e,t,n,i){if(e[0]!==t[0]||e[1]!==t[1]){var r=n.push(zi(n)+"scale(",null,",",null,")");i.push({i:r-4,x:vi(e[0],t[0])},{i:r-2,x:vi(e[1],t[1])})}else 1===t[0]&&1===t[1]||n.push(zi(n)+"scale("+t+")")}function Gi(e,t){var n=[],i=[];return e=la.transform(e),t=la.transform(t),Bi(e.translate,t.translate,n,i),qi(e.rotate,t.rotate,n,i),Wi(e.skew,t.skew,n,i),Yi(e.scale,t.scale,n,i),e=t=null,function(e){for(var t,r=-1,o=i.length;++r<o;)n[(t=i[r]).i]=t.x(e);return n.join("")}}function Xi(e,t){return t=(t-=e=+e)||1/t,function(n){return(n-e)/t}}function Vi(e,t){return t=(t-=e=+e)||1/t,function(n){return Math.max(0,Math.min(1,(n-e)/t))}}function Ki(e){for(var t=e.source,n=e.target,i=Qi(t,n),r=[t];t!==i;)t=t.parent,r.push(t);for(var o=r.length;n!==i;)r.splice(o,0,n),n=n.parent;return r}function Zi(e){for(var t=[],n=e.parent;null!=n;)t.push(e),e=n,n=n.parent;return t.push(e),t}function Qi(e,t){if(e===t)return e;for(var n=Zi(e),i=Zi(t),r=n.pop(),o=i.pop(),a=null;r===o;)a=r,r=n.pop(),o=i.pop();return a}function Ji(e){e.fixed|=2}function er(e){e.fixed&=-7}function tr(e){e.fixed|=4,e.px=e.x,e.py=e.y}function nr(e){e.fixed&=-5}function ir(e,t,n){var i=0,r=0;if(e.charge=0,!e.leaf)for(var o,a=e.nodes,s=a.length,l=-1;++l<s;)o=a[l],null!=o&&(ir(o,t,n),e.charge+=o.charge,i+=o.charge*o.cx,r+=o.charge*o.cy);if(e.point){e.leaf||(e.point.x+=Math.random()-.5,e.point.y+=Math.random()-.5);var u=t*n[e.point.index];e.charge+=e.pointCharge=u,i+=u*e.point.x,r+=u*e.point.y}e.cx=i/e.charge,e.cy=r/e.charge}function rr(e,t){return la.rebind(e,t,"sort","children","value"),e.nodes=e,e.links=cr,e}function or(e,t){for(var n=[e];null!=(e=n.pop());)if(t(e),(r=e.children)&&(i=r.length))for(var i,r;--i>=0;)n.push(r[i])}function ar(e,t){for(var n=[e],i=[];null!=(e=n.pop());)if(i.push(e),(o=e.children)&&(r=o.length))for(var r,o,a=-1;++a<r;)n.push(o[a]);
for(;null!=(e=i.pop());)t(e)}function sr(e){return e.children}function lr(e){return e.value}function ur(e,t){return t.value-e.value}function cr(e){return la.merge(e.map(function(e){return(e.children||[]).map(function(t){return{source:e,target:t}})}))}function fr(e){return e.x}function hr(e){return e.y}function dr(e,t,n){e.y0=t,e.y=n}function pr(e){return la.range(e.length)}function gr(e){for(var t=-1,n=e[0].length,i=[];++t<n;)i[t]=0;return i}function mr(e){for(var t,n=1,i=0,r=e[0][1],o=e.length;n<o;++n)(t=e[n][1])>r&&(i=n,r=t);return i}function vr(e){return e.reduce(yr,0)}function yr(e,t){return e+t[1]}function br(e,t){return _r(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function _r(e,t){for(var n=-1,i=+e[0],r=(e[1]-i)/t,o=[];++n<=t;)o[n]=r*n+i;return o}function Er(e){return[la.min(e),la.max(e)]}function xr(e,t){return e.value-t.value}function wr(e,t){var n=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=n,n._pack_prev=t}function Tr(e,t){e._pack_next=t,t._pack_prev=e}function Sr(e,t){var n=t.x-e.x,i=t.y-e.y,r=e.r+t.r;return.999*r*r>n*n+i*i}function Ar(e){function t(e){c=Math.min(e.x-e.r,c),f=Math.max(e.x+e.r,f),h=Math.min(e.y-e.r,h),d=Math.max(e.y+e.r,d)}if((n=e.children)&&(u=n.length)){var n,i,r,o,a,s,l,u,c=1/0,f=-(1/0),h=1/0,d=-(1/0);if(n.forEach(Cr),i=n[0],i.x=-i.r,i.y=0,t(i),u>1&&(r=n[1],r.x=r.r,r.y=0,t(r),u>2))for(o=n[2],Ir(i,r,o),t(o),wr(i,o),i._pack_prev=o,wr(o,r),r=i._pack_next,a=3;a<u;a++){Ir(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(Sr(s,o)){p=1;break}if(1==p)for(l=i._pack_prev;l!==s._pack_prev&&!Sr(l,o);l=l._pack_prev,m++);p?(g<m||g==m&&r.r<i.r?Tr(i,r=s):Tr(i=l,r),a--):(wr(i,o),r=o,t(o))}var v=(c+f)/2,y=(h+d)/2,b=0;for(a=0;a<u;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));e.r=b,n.forEach(kr)}}function Cr(e){e._pack_next=e._pack_prev=e}function kr(e){delete e._pack_next,delete e._pack_prev}function Or(e,t,n,i){var r=e.children;if(e.x=t+=i*e.x,e.y=n+=i*e.y,e.r*=i,r)for(var o=-1,a=r.length;++o<a;)Or(r[o],t,n,i)}function Ir(e,t,n){var i=e.r+n.r,r=t.x-e.x,o=t.y-e.y;if(i&&(r||o)){var a=t.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=e.x+l*r+u*o,n.y=e.y+l*o-u*r}else n.x=e.x+i,n.y=e.y}function Nr(e,t){return e.parent==t.parent?1:2}function Mr(e){var t=e.children;return t.length?t[0]:e.t}function Dr(e){var t,n=e.children;return(t=n.length)?n[t-1]:e.t}function Lr(e,t,n){var i=n/(t.i-e.i);t.c-=i,t.s+=n,e.c+=i,t.z+=n,t.m+=n}function $r(e){for(var t,n=0,i=0,r=e.children,o=r.length;--o>=0;)t=r[o],t.z+=n,t.m+=n,n+=t.s+(i+=t.c)}function Rr(e,t,n){return e.a.parent===t.parent?e.a:n}function Pr(e){return 1+la.max(e,function(e){return e.y})}function Fr(e){return e.reduce(function(e,t){return e+t.x},0)/e.length}function Ur(e){var t=e.children;return t&&t.length?Ur(t[0]):e}function jr(e){var t,n=e.children;return n&&(t=n.length)?jr(n[t-1]):e}function Hr(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function zr(e,t){var n=e.x+t[3],i=e.y+t[0],r=e.dx-t[1]-t[3],o=e.dy-t[0]-t[2];return r<0&&(n+=r/2,r=0),o<0&&(i+=o/2,o=0),{x:n,y:i,dx:r,dy:o}}function Br(e){var t=e[0],n=e[e.length-1];return t<n?[t,n]:[n,t]}function qr(e){return e.rangeExtent?e.rangeExtent():Br(e.range())}function Wr(e,t,n,i){var r=n(e[0],e[1]),o=i(t[0],t[1]);return function(e){return o(r(e))}}function Yr(e,t){var n,i=0,r=e.length-1,o=e[i],a=e[r];return a<o&&(n=i,i=r,r=n,n=o,o=a,a=n),e[i]=t.floor(o),e[r]=t.ceil(a),e}function Gr(e){return e?{floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}}:Tl}function Xr(e,t,n,i){var r=[],o=[],a=0,s=Math.min(e.length,t.length)-1;for(e[s]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<=s;)r.push(n(e[a-1],e[a])),o.push(i(t[a-1],t[a]));return function(t){var n=la.bisect(e,t,1,s)-1;return o[n](r[n](t))}}function Vr(e,t,n,i){function r(){var r=Math.min(e.length,t.length)>2?Xr:Wr,l=i?Vi:Xi;return a=r(e,t,l,n),s=r(t,e,l,bi),o}function o(e){return a(e)}var a,s;return o.invert=function(e){return s(e)},o.domain=function(t){return arguments.length?(e=t.map(Number),r()):e},o.range=function(e){return arguments.length?(t=e,r()):t},o.rangeRound=function(e){return o.range(e).interpolate(Pi)},o.clamp=function(e){return arguments.length?(i=e,r()):i},o.interpolate=function(e){return arguments.length?(n=e,r()):n},o.ticks=function(t){return Jr(e,t)},o.tickFormat=function(t,n){return eo(e,t,n)},o.nice=function(t){return Zr(e,t),r()},o.copy=function(){return Vr(e,t,n,i)},r()}function Kr(e,t){return la.rebind(e,t,"range","rangeRound","interpolate","clamp")}function Zr(e,t){return Yr(e,Gr(Qr(e,t)[2])),Yr(e,Gr(Qr(e,t)[2])),e}function Qr(e,t){null==t&&(t=10);var n=Br(e),i=n[1]-n[0],r=Math.pow(10,Math.floor(Math.log(i/t)/Math.LN10)),o=t/i*r;return o<=.15?r*=10:o<=.35?r*=5:o<=.75&&(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 Jr(e,t){return la.range.apply(la,Qr(e,t))}function eo(e,t,n){var i=Qr(e,t);if(n){var r=hs.exec(n);if(r.shift(),"s"===r[8]){var o=la.formatPrefix(Math.max(_a(i[0]),_a(i[1])));return r[7]||(r[7]="."+to(o.scale(i[2]))),r[8]="f",n=la.format(r.join("")),function(e){return n(o.scale(e))+o.symbol}}r[7]||(r[7]="."+no(r[8],i)),n=r.join("")}else n=",."+to(i[2])+"f";return la.format(n)}function to(e){return-Math.floor(Math.log(e)/Math.LN10+.01)}function no(e,t){var n=to(t[2]);return e in Sl?Math.abs(n-to(Math.max(_a(t[0]),_a(t[1]))))+ +("e"!==e):n-2*("%"===e)}function io(e,t,n,i){function r(e){return(n?Math.log(e<0?0:e):-Math.log(e>0?0:-e))/Math.log(t)}function o(e){return n?Math.pow(t,e):-Math.pow(t,-e)}function a(t){return e(r(t))}return a.invert=function(t){return o(e.invert(t))},a.domain=function(t){return arguments.length?(n=t[0]>=0,e.domain((i=t.map(Number)).map(r)),a):i},a.base=function(n){return arguments.length?(t=+n,e.domain(i.map(r)),a):t},a.nice=function(){var t=Yr(i.map(r),n?Math:Cl);return e.domain(t),i=t.map(o),a},a.ticks=function(){var e=Br(i),a=[],s=e[0],l=e[1],u=Math.floor(r(s)),c=Math.ceil(r(l)),f=t%1?2:t;if(isFinite(c-u)){if(n){for(;u<c;u++)for(var h=1;h<f;h++)a.push(o(u)*h);a.push(o(u))}else for(a.push(o(u));u++<c;)for(var h=f-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(e,n){if(!arguments.length)return Al;arguments.length<2?n=Al:"function"!=typeof n&&(n=la.format(n));var i=Math.max(1,t*e/a.ticks().length);return function(e){var a=e/o(Math.round(r(e)));return a*t<t-.5&&(a*=t),a<=i?n(e):""}},a.copy=function(){return io(e.copy(),t,n,i)},Kr(a,e)}function ro(e,t,n){function i(t){return e(r(t))}var r=oo(t),o=oo(1/t);return i.invert=function(t){return o(e.invert(t))},i.domain=function(t){return arguments.length?(e.domain((n=t.map(Number)).map(r)),i):n},i.ticks=function(e){return Jr(n,e)},i.tickFormat=function(e,t){return eo(n,e,t)},i.nice=function(e){return i.domain(Zr(n,e))},i.exponent=function(a){return arguments.length?(r=oo(t=a),o=oo(1/t),e.domain(n.map(r)),i):t},i.copy=function(){return ro(e.copy(),t,n)},Kr(i,e)}function oo(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function ao(e,t){function n(n){return o[((r.get(n)||("range"===t.t?r.set(n,e.push(n)):NaN))-1)%o.length]}function i(t,n){return la.range(e.length).map(function(e){return t+n*e})}var r,o,a;return n.domain=function(i){if(!arguments.length)return e;e=[],r=new u;for(var o,a=-1,s=i.length;++a<s;)r.has(o=i[a])||r.set(o,e.push(o));return n[t.t].apply(n,t.a)},n.range=function(e){return arguments.length?(o=e,a=0,t={t:"range",a:arguments},n):o},n.rangePoints=function(r,s){arguments.length<2&&(s=0);var l=r[0],u=r[1],c=e.length<2?(l=(l+u)/2,0):(u-l)/(e.length-1+s);return o=i(l+c*s/2,c),a=0,t={t:"rangePoints",a:arguments},n},n.rangeRoundPoints=function(r,s){arguments.length<2&&(s=0);var l=r[0],u=r[1],c=e.length<2?(l=u=Math.round((l+u)/2),0):(u-l)/(e.length-1+s)|0;return o=i(l+Math.round(c*s/2+(u-l-(e.length-1+s)*c)/2),c),a=0,t={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],f=r[1-u],h=(f-c)/(e.length-s+2*l);return o=i(c+h*l,h),u&&o.reverse(),a=h*(1-s),t={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],f=r[1-u],h=Math.floor((f-c)/(e.length-s+2*l));return o=i(c+Math.round((f-c-(e.length-s)*h)/2),h),u&&o.reverse(),a=Math.round(h*(1-s)),t={t:"rangeRoundBands",a:arguments},n},n.rangeBand=function(){return a},n.rangeExtent=function(){return Br(t.a[0])},n.copy=function(){return ao(e,t)},n.domain(e)}function so(e,t){function o(){var n=0,i=t.length;for(s=[];++n<i;)s[n-1]=la.quantile(e,n/i);return a}function a(e){if(!isNaN(e=+e))return t[la.bisect(s,e)]}var s;return a.domain=function(t){return arguments.length?(e=t.map(i).filter(r).sort(n),o()):e},a.range=function(e){return arguments.length?(t=e,o()):t},a.quantiles=function(){return s},a.invertExtent=function(n){return n=t.indexOf(n),n<0?[NaN,NaN]:[n>0?s[n-1]:e[0],n<s.length?s[n]:e[e.length-1]]},a.copy=function(){return so(e,t)},o()}function lo(e,t,n){function i(t){return n[Math.max(0,Math.min(a,Math.floor(o*(t-e))))]}function r(){return o=n.length/(t-e),a=n.length-1,i}var o,a;return i.domain=function(n){return arguments.length?(e=+n[0],t=+n[n.length-1],r()):[e,t]},i.range=function(e){return arguments.length?(n=e,r()):n},i.invertExtent=function(t){return t=n.indexOf(t),t=t<0?NaN:t/o+e,[t,t+1/o]},i.copy=function(){return lo(e,t,n)},r()}function uo(e,t){function n(n){if(n<=n)return t[la.bisect(e,n)]}return n.domain=function(t){return arguments.length?(e=t,n):e},n.range=function(e){return arguments.length?(t=e,n):t},n.invertExtent=function(n){return n=t.indexOf(n),[e[n-1],e[n]]},n.copy=function(){return uo(e,t)},n}function co(e){function t(e){return+e}return t.invert=t,t.domain=t.range=function(n){return arguments.length?(e=n.map(t),t):e},t.ticks=function(t){return Jr(e,t)},t.tickFormat=function(t,n){return eo(e,t,n)},t.copy=function(){return co(e)},t}function fo(){return 0}function ho(e){return e.innerRadius}function po(e){return e.outerRadius}function go(e){return e.startAngle}function mo(e){return e.endAngle}function vo(e){return e&&e.padAngle}function yo(e,t,n,i){return(e-n)*t-(t-i)*e>0?0:1}function bo(e,t,n,i,r){var o=e[0]-t[0],a=e[1]-t[1],s=(r?i:-i)/Math.sqrt(o*o+a*a),l=s*a,u=-s*o,c=e[0]+l,f=e[1]+u,h=t[0]+l,d=t[1]+u,p=(c+h)/2,g=(f+d)/2,m=h-c,v=d-f,y=m*m+v*v,b=n-i,_=c*d-h*f,E=(v<0?-1:1)*Math.sqrt(Math.max(0,b*b*y-_*_)),x=(_*v-m*E)/y,w=(-_*m-v*E)/y,T=(_*v+m*E)/y,S=(-_*m+v*E)/y,A=x-p,C=w-g,k=T-p,O=S-g;return A*A+C*C>k*k+O*O&&(x=T,w=S),[[x-l,w-u],[x*n/b,w*n/b]]}function _o(e){function t(t){function a(){u.push("M",o(e(c),s))}for(var l,u=[],c=[],f=-1,h=t.length,d=Ae(n),p=Ae(i);++f<h;)r.call(this,l=t[f],f)?c.push([+d.call(this,l,f),+p.call(this,l,f)]):c.length&&(a(),c=[]);return c.length&&a(),u.length?u.join(""):null}var n=On,i=In,r=Ot,o=Eo,a=o.key,s=.7;return t.x=function(e){return arguments.length?(n=e,t):n},t.y=function(e){return arguments.length?(i=e,t):i},t.defined=function(e){return arguments.length?(r=e,t):r},t.interpolate=function(e){return arguments.length?(a="function"==typeof e?o=e:(o=Dl.get(e)||Eo).key,t):a},t.tension=function(e){return arguments.length?(s=e,t):s},t}function Eo(e){return e.length>1?e.join("L"):e+"Z"}function xo(e){return e.join("L")+"Z"}function wo(e){for(var t=0,n=e.length,i=e[0],r=[i[0],",",i[1]];++t<n;)r.push("H",(i[0]+(i=e[t])[0])/2,"V",i[1]);return n>1&&r.push("H",i[0]),r.join("")}function To(e){for(var t=0,n=e.length,i=e[0],r=[i[0],",",i[1]];++t<n;)r.push("V",(i=e[t])[1],"H",i[0]);return r.join("")}function So(e){for(var t=0,n=e.length,i=e[0],r=[i[0],",",i[1]];++t<n;)r.push("H",(i=e[t])[0],"V",i[1]);return r.join("")}function Ao(e,t){return e.length<4?Eo(e):e[1]+Oo(e.slice(1,-1),Io(e,t))}function Co(e,t){return e.length<3?xo(e):e[0]+Oo((e.push(e[0]),e),Io([e[e.length-2]].concat(e,[e[1]]),t))}function ko(e,t){return e.length<3?Eo(e):e[0]+Oo(e,Io(e,t))}function Oo(e,t){if(t.length<1||e.length!=t.length&&e.length!=t.length+2)return Eo(e);var n=e.length!=t.length,i="",r=e[0],o=e[1],a=t[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=e[1],l=2),t.length>1){s=t[1],o=e[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<t.length;u++,l++)o=e[l],s=t[u],i+="S"+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1]}if(n){var c=e[l];i+="Q"+(o[0]+2*s[0]/3)+","+(o[1]+2*s[1]/3)+","+c[0]+","+c[1]}return i}function Io(e,t){for(var n,i=[],r=(1-t)/2,o=e[0],a=e[1],s=1,l=e.length;++s<l;)n=o,o=a,a=e[s],i.push([r*(a[0]-n[0]),r*(a[1]-n[1])]);return i}function No(e){if(e.length<3)return Eo(e);var t=1,n=e.length,i=e[0],r=i[0],o=i[1],a=[r,r,r,(i=e[1])[0]],s=[o,o,o,i[1]],l=[r,",",o,"L",$o(Rl,a),",",$o(Rl,s)];for(e.push(e[n-1]);++t<=n;)i=e[t],a.shift(),a.push(i[0]),s.shift(),s.push(i[1]),Ro(l,a,s);return e.pop(),l.push("L",i),l.join("")}function Mo(e){if(e.length<4)return Eo(e);for(var t,n=[],i=-1,r=e.length,o=[0],a=[0];++i<3;)t=e[i],o.push(t[0]),a.push(t[1]);for(n.push($o(Rl,o)+","+$o(Rl,a)),--i;++i<r;)t=e[i],o.shift(),o.push(t[0]),a.shift(),a.push(t[1]),Ro(n,o,a);return n.join("")}function Do(e){for(var t,n,i=-1,r=e.length,o=r+4,a=[],s=[];++i<4;)n=e[i%r],a.push(n[0]),s.push(n[1]);for(t=[$o(Rl,a),",",$o(Rl,s)],--i;++i<o;)n=e[i%r],a.shift(),a.push(n[0]),s.shift(),s.push(n[1]),Ro(t,a,s);return t.join("")}function Lo(e,t){var n=e.length-1;if(n)for(var i,r,o=e[0][0],a=e[0][1],s=e[n][0]-o,l=e[n][1]-a,u=-1;++u<=n;)i=e[u],r=u/n,i[0]=t*i[0]+(1-t)*(o+r*s),i[1]=t*i[1]+(1-t)*(a+r*l);return No(e)}function $o(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function Ro(e,t,n){e.push("C",$o(Ll,t),",",$o(Ll,n),",",$o($l,t),",",$o($l,n),",",$o(Rl,t),",",$o(Rl,n))}function Po(e,t){return(t[1]-e[1])/(t[0]-e[0])}function Fo(e){for(var t=0,n=e.length-1,i=[],r=e[0],o=e[1],a=i[0]=Po(r,o);++t<n;)i[t]=(a+(a=Po(r=o,o=e[t+1])))/2;return i[t]=a,i}function Uo(e){for(var t,n,i,r,o=[],a=Fo(e),s=-1,l=e.length-1;++s<l;)t=Po(e[s],e[s+1]),_a(t)<Pa?a[s]=a[s+1]=0:(n=a[s]/t,i=a[s+1]/t,r=n*n+i*i,r>9&&(r=3*t/Math.sqrt(r),a[s]=r*n,a[s+1]=r*i));for(s=-1;++s<=l;)r=(e[Math.min(l,s+1)][0]-e[Math.max(0,s-1)][0])/(6*(1+a[s]*a[s])),o.push([r||0,a[s]*r||0]);return o}function jo(e){return e.length<3?Eo(e):e[0]+Oo(e,Uo(e))}function Ho(e){for(var t,n,i,r=-1,o=e.length;++r<o;)t=e[r],n=t[0],i=t[1]-za,t[0]=n*Math.cos(i),t[1]=n*Math.sin(i);return e}function zo(e){function t(t){function l(){g.push("M",s(e(v),f),c,u(e(m.reverse()),f),"Z")}for(var h,d,p,g=[],m=[],v=[],y=-1,b=t.length,_=Ae(n),E=Ae(r),x=n===i?function(){return d}:Ae(i),w=r===o?function(){return p}:Ae(o);++y<b;)a.call(this,h=t[y],y)?(m.push([d=+_.call(this,h,y),p=+E.call(this,h,y)]),v.push([+x.call(this,h,y),+w.call(this,h,y)])):m.length&&(l(),m=[],v=[]);return m.length&&l(),g.length?g.join(""):null}var n=On,i=On,r=0,o=In,a=Ot,s=Eo,l=s.key,u=s,c="L",f=.7;return t.x=function(e){return arguments.length?(n=i=e,t):i},t.x0=function(e){return arguments.length?(n=e,t):n},t.x1=function(e){return arguments.length?(i=e,t):i},t.y=function(e){return arguments.length?(r=o=e,t):o},t.y0=function(e){return arguments.length?(r=e,t):r},t.y1=function(e){return arguments.length?(o=e,t):o},t.defined=function(e){return arguments.length?(a=e,t):a},t.interpolate=function(e){return arguments.length?(l="function"==typeof e?s=e:(s=Dl.get(e)||Eo).key,u=s.reverse||s,c=s.closed?"M":"L",t):l},t.tension=function(e){return arguments.length?(f=e,t):f},t}function Bo(e){return e.radius}function qo(e){return[e.x,e.y]}function Wo(e){return function(){var t=e.apply(this,arguments),n=t[0],i=t[1]-za;return[n*Math.cos(i),n*Math.sin(i)]}}function Yo(){return 64}function Go(){return"circle"}function Xo(e){var t=Math.sqrt(e/Ua);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Vo(e){return function(){var t,n,i;(t=this[e])&&(i=t[n=t.active])&&(i.timer.c=null,i.timer.t=NaN,--t.count?delete t[n]:delete this[e],t.active+=.5,i.event&&i.event.interrupt.call(this,this.__data__,i.index))}}function Ko(e,t,n){return Sa(e,Bl),e.namespace=t,e.id=n,e}function Zo(e,t,n,i){var r=e.id,o=e.namespace;return B(e,"function"==typeof n?function(e,a,s){e[o][r].tween.set(t,i(n.call(e,e.__data__,a,s)))}:(n=i(n),function(e){e[o][r].tween.set(t,n)}))}function Qo(e){return null==e&&(e=""),function(){this.textContent=e}}function Jo(e){return null==e?"__transition__":"__transition_"+e+"__"}function ea(e,t,n,i,r){function o(e){var t=g.delay;return c.t=t+l,t<=e?a(e-t):void(c.c=a)}function a(n){var r=p.active,o=p[r];o&&(o.timer.c=null,o.timer.t=NaN,--p.count,delete p[r],o.event&&o.event.interrupt.call(e,e.__data__,o.index));for(var a in p)if(+a<i){var u=p[a];u.timer.c=null,u.timer.t=NaN,--p.count,delete p[a]}c.c=s,Ne(function(){return c.c&&s(n||1)&&(c.c=null,c.t=NaN),1},0,l),p.active=i,g.event&&g.event.start.call(e,e.__data__,t),d=[],g.tween.forEach(function(n,i){(i=i.call(e,e.__data__,t))&&d.push(i)}),h=g.ease,f=g.duration}function s(r){for(var o=r/f,a=h(o),s=d.length;s>0;)d[--s].call(e,a);if(o>=1)return g.event&&g.event.end.call(e,e.__data__,t),--p.count?delete p[i]:delete e[n],1}var l,c,f,h,d,p=e[n]||(e[n]={active:0,count:0}),g=p[i];g||(l=r.time,c=Ne(o,0,l),g=p[i]={tween:new u,time:l,timer:c,delay:r.delay,duration:r.duration,ease:r.ease,index:t},r=null,++p.count)}function ta(e,t,n){e.attr("transform",function(e){var i=t(e);return"translate("+(isFinite(i)?i:n(e))+",0)"})}function na(e,t,n){e.attr("transform",function(e){var i=t(e);return"translate(0,"+(isFinite(i)?i:n(e))+")"})}function ia(e){return e.toISOString()}function ra(e,t,n){function i(t){return e(t)}function r(e,n){var i=e[1]-e[0],r=i/n,o=la.bisect(Ql,r);return o==Ql.length?[t.year,Qr(e.map(function(e){return e/31536e6}),n)[2]]:o?t[r/Ql[o-1]<Ql[o]/r?o-1:o]:[tu,Qr(e,n)[2]]}return i.invert=function(t){return oa(e.invert(t))},i.domain=function(t){return arguments.length?(e.domain(t),i):e.domain().map(oa)},i.nice=function(e,t){function n(n){return!isNaN(n)&&!e.range(n,oa(+n+1),t).length}var o=i.domain(),a=Br(o),s=null==e?r(a,10):"number"==typeof e&&r(a,e);return s&&(e=s[0],t=s[1]),i.domain(Yr(o,t>1?{floor:function(t){for(;n(t=e.floor(t));)t=oa(t-1);return t},ceil:function(t){for(;n(t=e.ceil(t));)t=oa(+t+1);return t}}:e))},i.ticks=function(e,t){var n=Br(i.domain()),o=null==e?r(n,10):"number"==typeof e?r(n,e):!e.range&&[{range:e},t];return o&&(e=o[0],t=o[1]),e.range(n[0],oa(+n[1]+1),t<1?1:t)},i.tickFormat=function(){return n},i.copy=function(){return ra(e.copy(),t,n)},Kr(i,e)}function oa(e){return new Date(e)}function aa(e){return JSON.parse(e.responseText)}function sa(e){var t=fa.createRange();return t.selectNode(fa.body),t.createContextualFragment(e.responseText)}var la={version:"3.5.17"},ua=[].slice,ca=function(e){return ua.call(e)},fa=this.document;if(fa)try{ca(fa.documentElement.childNodes)[0].nodeType}catch(ha){ca=function(e){for(var t=e.length,n=new Array(t);t--;)n[t]=e[t];return n}}if(Date.now||(Date.now=function(){return+new Date}),fa)try{fa.createElement("DIV").style.setProperty("opacity",0,"")}catch(da){var pa=this.Element.prototype,ga=pa.setAttribute,ma=pa.setAttributeNS,va=this.CSSStyleDeclaration.prototype,ya=va.setProperty;pa.setAttribute=function(e,t){ga.call(this,e,t+"")},pa.setAttributeNS=function(e,t,n){ma.call(this,e,t,n+"")},va.setProperty=function(e,t,n){ya.call(this,e,t+"",n)}}la.ascending=n,la.descending=function(e,t){return t<e?-1:t>e?1:t>=e?0:NaN},la.min=function(e,t){var n,i,r=-1,o=e.length;if(1===arguments.length){for(;++r<o;)if(null!=(i=e[r])&&i>=i){n=i;break}for(;++r<o;)null!=(i=e[r])&&n>i&&(n=i)}else{for(;++r<o;)if(null!=(i=t.call(e,e[r],r))&&i>=i){n=i;break}for(;++r<o;)null!=(i=t.call(e,e[r],r))&&n>i&&(n=i)}return n},la.max=function(e,t){var n,i,r=-1,o=e.length;if(1===arguments.length){for(;++r<o;)if(null!=(i=e[r])&&i>=i){n=i;break}for(;++r<o;)null!=(i=e[r])&&i>n&&(n=i)}else{for(;++r<o;)if(null!=(i=t.call(e,e[r],r))&&i>=i){n=i;break}for(;++r<o;)null!=(i=t.call(e,e[r],r))&&i>n&&(n=i)}return n},la.extent=function(e,t){var n,i,r,o=-1,a=e.length;if(1===arguments.length){for(;++o<a;)if(null!=(i=e[o])&&i>=i){n=r=i;break}for(;++o<a;)null!=(i=e[o])&&(n>i&&(n=i),r<i&&(r=i))}else{for(;++o<a;)if(null!=(i=t.call(e,e[o],o))&&i>=i){n=r=i;break}for(;++o<a;)null!=(i=t.call(e,e[o],o))&&(n>i&&(n=i),r<i&&(r=i))}return[n,r]},la.sum=function(e,t){var n,i=0,o=e.length,a=-1;if(1===arguments.length)for(;++a<o;)r(n=+e[a])&&(i+=n);else for(;++a<o;)r(n=+t.call(e,e[a],a))&&(i+=n);return i},la.mean=function(e,t){var n,o=0,a=e.length,s=-1,l=a;if(1===arguments.length)for(;++s<a;)r(n=i(e[s]))?o+=n:--l;else for(;++s<a;)r(n=i(t.call(e,e[s],s)))?o+=n:--l;if(l)return o/l},la.quantile=function(e,t){var n=(e.length-1)*t+1,i=Math.floor(n),r=+e[i-1],o=n-i;return o?r+o*(e[i]-r):r},la.median=function(e,t){var o,a=[],s=e.length,l=-1;if(1===arguments.length)for(;++l<s;)r(o=i(e[l]))&&a.push(o);else for(;++l<s;)r(o=i(t.call(e,e[l],l)))&&a.push(o);if(a.length)return la.quantile(a.sort(n),.5)},la.variance=function(e,t){var n,o,a=e.length,s=0,l=0,u=-1,c=0;if(1===arguments.length)for(;++u<a;)r(n=i(e[u]))&&(o=n-s,s+=o/++c,l+=o*(n-s));else for(;++u<a;)r(n=i(t.call(e,e[u],u)))&&(o=n-s,s+=o/++c,l+=o*(n-s));if(c>1)return l/(c-1)},la.deviation=function(){var e=la.variance.apply(this,arguments);return e?Math.sqrt(e):e};var ba=o(n);la.bisectLeft=ba.left,la.bisect=la.bisectRight=ba.right,la.bisector=function(e){return o(1===e.length?function(t,i){return n(e(t),i)}:e)},la.shuffle=function(e,t,n){(o=arguments.length)<3&&(n=e.length,o<2&&(t=0));for(var i,r,o=n-t;o;)r=Math.random()*o--|0,i=e[o+t],e[o+t]=e[r+t],e[r+t]=i;return e},la.permute=function(e,t){for(var n=t.length,i=new Array(n);n--;)i[n]=e[t[n]];return i},la.pairs=function(e){for(var t,n=0,i=e.length-1,r=e[0],o=new Array(i<0?0:i);n<i;)o[n]=[t=r,r=e[++n]];return o},la.transpose=function(e){if(!(r=e.length))return[];for(var t=-1,n=la.min(e,a),i=new Array(n);++t<n;)for(var r,o=-1,s=i[t]=new Array(r);++o<r;)s[o]=e[o][t];return i},la.zip=function(){return la.transpose(arguments)},la.keys=function(e){var t=[];for(var n in e)t.push(n);return t},la.values=function(e){var t=[];for(var n in e)t.push(e[n]);return t},la.entries=function(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t},la.merge=function(e){for(var t,n,i,r=e.length,o=-1,a=0;++o<r;)a+=e[o].length;for(n=new Array(a);--r>=0;)for(i=e[r],t=i.length;--t>=0;)n[--a]=i[t];return n};var _a=Math.abs;la.range=function(e,t,n){if(arguments.length<3&&(n=1,arguments.length<2&&(t=e,e=0)),(t-e)/n===1/0)throw new Error("infinite range");var i,r=[],o=s(_a(n)),a=-1;if(e*=o,t*=o,n*=o,n<0)for(;(i=e+n*++a)>t;)r.push(i/o);else for(;(i=e+n*++a)<t;)r.push(i/o);return r},la.map=function(e,t){var n=new u;if(e instanceof u)e.forEach(function(e,t){n.set(e,t)});else if(Array.isArray(e)){var i,r=-1,o=e.length;if(1===arguments.length)for(;++r<o;)n.set(r,e[r]);else for(;++r<o;)n.set(t.call(e,i=e[r],r),i)}else for(var a in e)n.set(a,e[a]);return n};var Ea="__proto__",xa="\0";l(u,{has:h,get:function(e){return this._[c(e)]},set:function(e,t){return this._[c(e)]=t},remove:d,keys:p,values:function(){var e=[];for(var t in this._)e.push(this._[t]);return e},entries:function(){var e=[];for(var t in this._)e.push({key:f(t),value:this._[t]});return e},size:g,empty:m,forEach:function(e){for(var t in this._)e.call(this,f(t),this._[t])}}),la.nest=function(){function e(t,a,s){if(s>=o.length)return i?i.call(r,a):n?a.sort(n):a;for(var l,c,f,h,d=-1,p=a.length,g=o[s++],m=new u;++d<p;)(h=m.get(l=g(c=a[d])))?h.push(c):m.set(l,[c]);return t?(c=t(),f=function(n,i){c.set(n,e(t,i,s))}):(c={},f=function(n,i){c[n]=e(t,i,s)}),m.forEach(f),c}function t(e,n){if(n>=o.length)return e;var i=[],r=a[n++];return e.forEach(function(e,r){i.push({key:e,values:t(r,n)})}),r?i.sort(function(e,t){return r(e.key,t.key)}):i}var n,i,r={},o=[],a=[];return r.map=function(t,n){return e(n,t,0)},r.entries=function(n){return t(e(la.map,n,0),0)},r.key=function(e){return o.push(e),r},r.sortKeys=function(e){return a[o.length-1]=e,r},r.sortValues=function(e){return n=e,r},r.rollup=function(e){return i=e,r},r},la.set=function(e){var t=new v;if(e)for(var n=0,i=e.length;n<i;++n)t.add(e[n]);return t},l(v,{has:h,add:function(e){return this._[c(e+="")]=!0,e},remove:d,values:p,size:g,empty:m,forEach:function(e){for(var t in this._)e.call(this,f(t))}}),la.behavior={},la.rebind=function(e,t){for(var n,i=1,r=arguments.length;++i<r;)e[n=arguments[i]]=b(e,t,t[n]);return e};var wa=["webkit","ms","moz","Moz","o","O"];la.dispatch=function(){for(var e=new x,t=-1,n=arguments.length;++t<n;)e[arguments[t]]=w(e);return e},x.prototype.on=function(e,t){var n=e.indexOf("."),i="";if(n>=0&&(i=e.slice(n+1),e=e.slice(0,n)),e)return arguments.length<2?this[e].on(i):this[e].on(i,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(i,null);return this}},la.event=null,la.requote=function(e){return e.replace(Ta,"\\$&")};var Ta=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,Sa={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)e[n]=t[n]},Aa=function(e,t){return t.querySelector(e)},Ca=function(e,t){return t.querySelectorAll(e)},ka=function(e,t){var n=e.matches||e[_(e,"matchesSelector")];return(ka=function(e,t){return n.call(e,t)})(e,t)};"function"==typeof Sizzle&&(Aa=function(e,t){return Sizzle(e,t)[0]||null},Ca=Sizzle,ka=Sizzle.matchesSelector),la.selection=function(){return la.select(fa.documentElement)};var Oa=la.selection.prototype=[];Oa.select=function(e){var t,n,i,r,o=[];e=k(e);for(var a=-1,s=this.length;++a<s;){o.push(t=[]),t.parentNode=(i=this[a]).parentNode;for(var l=-1,u=i.length;++l<u;)(r=i[l])?(t.push(n=e.call(r,r.__data__,l,a)),n&&"__data__"in r&&(n.__data__=r.__data__)):t.push(null)}return C(o)},Oa.selectAll=function(e){var t,n,i=[];e=O(e);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(t=ca(e.call(n,n.__data__,s,r))),t.parentNode=n);return C(i)};var Ia="http://www.w3.org/1999/xhtml",Na={svg:"http://www.w3.org/2000/svg",xhtml:Ia,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};la.ns={prefix:Na,qualify:function(e){var t=e.indexOf(":"),n=e;return t>=0&&"xmlns"!==(n=e.slice(0,t))&&(e=e.slice(t+1)),Na.hasOwnProperty(n)?{space:Na[n],local:e}:e}},Oa.attr=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node();return e=la.ns.qualify(e),e.local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(t in e)this.each(I(t,e[t]));return this}return this.each(I(e,t))},Oa.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node(),i=(e=D(e)).length,r=-1;if(t=n.classList){for(;++r<i;)if(!t.contains(e[r]))return!1}else for(t=n.getAttribute("class");++r<i;)if(!M(e[r]).test(t))return!1;return!0}for(t in e)this.each(L(t,e[t]));return this}return this.each(L(e,t))},Oa.style=function(e,n,i){var r=arguments.length;if(r<3){if("string"!=typeof e){r<2&&(n="");for(i in e)this.each(R(i,e[i],n));return this}if(r<2){var o=this.node();return t(o).getComputedStyle(o,null).getPropertyValue(e)}i=""}return this.each(R(e,n,i))},Oa.property=function(e,t){if(arguments.length<2){if("string"==typeof e)return this.node()[e];for(t in e)this.each(P(t,e[t]));return this}return this.each(P(e,t))},Oa.text=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}:null==e?function(){this.textContent=""}:function(){this.textContent=e}):this.node().textContent},Oa.html=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}:null==e?function(){this.innerHTML=""}:function(){this.innerHTML=e}):this.node().innerHTML},Oa.append=function(e){return e=F(e),this.select(function(){return this.appendChild(e.apply(this,arguments))})},Oa.insert=function(e,t){return e=F(e),t=k(t),this.select(function(){return this.insertBefore(e.apply(this,arguments),t.apply(this,arguments)||null)})},Oa.remove=function(){return this.each(U)},Oa.data=function(e,t){function n(e,n){var i,r,o,a=e.length,f=n.length,h=Math.min(a,f),d=new Array(f),p=new Array(f),g=new Array(a);if(t){var m,v=new u,y=new Array(a);for(i=-1;++i<a;)(r=e[i])&&(v.has(m=t.call(r,r.__data__,i))?g[i]=r:v.set(m,r),y[i]=m);for(i=-1;++i<f;)(r=v.get(m=t.call(n,o=n[i],i)))?r!==!0&&(d[i]=r,r.__data__=o):p[i]=j(o),v.set(m,!0);for(i=-1;++i<a;)i in y&&v.get(y[i])!==!0&&(g[i]=e[i])}else{for(i=-1;++i<h;)r=e[i],o=n[i],r?(r.__data__=o,d[i]=r):p[i]=j(o);for(;i<f;++i)p[i]=j(n[i]);for(;i<a;++i)g[i]=e[i]}p.update=d,p.parentNode=d.parentNode=g.parentNode=e.parentNode,s.push(p),l.push(d),c.push(g)}var i,r,o=-1,a=this.length;if(!arguments.length){for(e=new Array(a=(i=this[0]).length);++o<a;)(r=i[o])&&(e[o]=r.__data__);return e}var s=q([]),l=C([]),c=C([]);if("function"==typeof e)for(;++o<a;)n(i=this[o],e.call(i,i.parentNode.__data__,o));else for(;++o<a;)n(i=this[o],e);return l.enter=function(){return s},l.exit=function(){return c},l},Oa.datum=function(e){return arguments.length?this.property("__data__",e):this.property("__data__")},Oa.filter=function(e){var t,n,i,r=[];"function"!=typeof e&&(e=H(e));for(var o=0,a=this.length;o<a;o++){r.push(t=[]),t.parentNode=(n=this[o]).parentNode;for(var s=0,l=n.length;s<l;s++)(i=n[s])&&e.call(i,i.__data__,s,o)&&t.push(i)}return C(r)},Oa.order=function(){for(var e=-1,t=this.length;++e<t;)for(var n,i=this[e],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},Oa.sort=function(e){e=z.apply(this,arguments);for(var t=-1,n=this.length;++t<n;)this[t].sort(e);return this.order()},Oa.each=function(e){return B(this,function(t,n,i){e.call(t,t.__data__,n,i)})},Oa.call=function(e){var t=ca(arguments);return e.apply(t[0]=this,t),this},Oa.empty=function(){return!this.node()},Oa.node=function(){for(var e=0,t=this.length;e<t;e++)for(var n=this[e],i=0,r=n.length;i<r;i++){var o=n[i];if(o)return o}return null},Oa.size=function(){var e=0;return B(this,function(){++e}),e};var Ma=[];la.selection.enter=q,la.selection.enter.prototype=Ma,Ma.append=Oa.append,Ma.empty=Oa.empty,Ma.node=Oa.node,Ma.call=Oa.call,Ma.size=Oa.size,Ma.select=function(e){for(var t,n,i,r,o,a=[],s=-1,l=this.length;++s<l;){i=(r=this[s]).update,a.push(t=[]),t.parentNode=r.parentNode;for(var u=-1,c=r.length;++u<c;)(o=r[u])?(t.push(i[u]=n=e.call(r.parentNode,o.__data__,u,s)),n.__data__=o.__data__):t.push(null)}return C(a)},Ma.insert=function(e,t){return arguments.length<2&&(t=W(this)),Oa.insert.call(this,e,t)},la.select=function(t){var n;return"string"==typeof t?(n=[Aa(t,fa)],n.parentNode=fa.documentElement):(n=[t],n.parentNode=e(t)),C([n])},la.selectAll=function(e){var t;return"string"==typeof e?(t=ca(Ca(e,fa)),t.parentNode=fa.documentElement):(t=ca(e),t.parentNode=null),C([t])},Oa.on=function(e,t,n){var i=arguments.length;if(i<3){if("string"!=typeof e){i<2&&(t=!1);for(n in e)this.each(Y(n,e[n],t));return this}if(i<2)return(i=this.node()["__on"+e])&&i._;n=!1}return this.each(Y(e,t,n))};var Da=la.map({mouseenter:"mouseover",mouseleave:"mouseout"});fa&&Da.forEach(function(e){"on"+e in fa&&Da.remove(e)});var La,$a=0;la.mouse=function(e){return K(e,S())};var Ra=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;la.touch=function(e,t,n){if(arguments.length<3&&(n=t,t=S().changedTouches),t)for(var i,r=0,o=t.length;r<o;++r)if((i=t[r]).identifier===n)return K(e,i)},la.behavior.drag=function(){function e(){this.on("mousedown.drag",o).on("touchstart.drag",a)}function n(e,t,n,o,a){return function(){function s(){var e,n,i=t(h,g);i&&(e=i[0]-b[0],n=i[1]-b[1],p|=e|n,b=i,d({type:"drag",x:i[0]+u[0],y:i[1]+u[1],dx:e,dy:n}))}function l(){t(h,g)&&(v.on(o+m,null).on(a+m,null),y(p),d({type:"dragend"}))}var u,c=this,f=la.event.target.correspondingElement||la.event.target,h=c.parentNode,d=i.of(c,arguments),p=0,g=e(),m=".drag"+(null==g?"":"-"+g),v=la.select(n(f)).on(o+m,s).on(a+m,l),y=V(f),b=t(h,g);r?(u=r.apply(c,arguments),u=[u.x-b[0],u.y-b[1]]):u=[0,0],d({type:"dragstart"})}}var i=A(e,"drag","dragstart","dragend"),r=null,o=n(E,la.mouse,t,"mousemove","mouseup"),a=n(Z,la.touch,y,"touchmove","touchend");
return e.origin=function(t){return arguments.length?(r=t,e):r},la.rebind(e,i,"on")},la.touches=function(e,t){return arguments.length<2&&(t=S().touches),t?ca(t).map(function(t){var n=K(e,t);return n.identifier=t.identifier,n}):[]};var Pa=1e-6,Fa=Pa*Pa,Ua=Math.PI,ja=2*Ua,Ha=ja-Pa,za=Ua/2,Ba=Ua/180,qa=180/Ua,Wa=Math.SQRT2,Ya=2,Ga=4;la.interpolateZoom=function(e,t){var n,i,r=e[0],o=e[1],a=e[2],s=t[0],l=t[1],u=t[2],c=s-r,f=l-o,h=c*c+f*f;if(h<Fa)i=Math.log(u/a)/Wa,n=function(e){return[r+e*c,o+e*f,a*Math.exp(Wa*e*i)]};else{var d=Math.sqrt(h),p=(u*u-a*a+Ga*h)/(2*a*Ya*d),g=(u*u-a*a-Ga*h)/(2*u*Ya*d),m=Math.log(Math.sqrt(p*p+1)-p),v=Math.log(Math.sqrt(g*g+1)-g);i=(v-m)/Wa,n=function(e){var t=e*i,n=ie(m),s=a/(Ya*d)*(n*re(Wa*t+m)-ne(m));return[r+s*c,o+s*f,a*n/ie(Wa*t+m)]}}return n.duration=1e3*i,n},la.behavior.zoom=function(){function e(e){e.on(N,f).on(Va+".zoom",d).on("dblclick.zoom",p).on(L,h)}function n(e){return[(e[0]-S.x)/S.k,(e[1]-S.y)/S.k]}function i(e){return[e[0]*S.k+S.x,e[1]*S.k+S.y]}function r(e){S.k=Math.max(k[0],Math.min(k[1],e))}function o(e,t){t=i(t),S.x+=e[0]-t[0],S.y+=e[1]-t[1]}function a(t,n,i,a){t.__chart__={x:S.x,y:S.y,k:S.k},r(Math.pow(2,a)),o(m=n,i),t=la.select(t),O>0&&(t=t.transition().duration(O)),t.call(e.event)}function s(){E&&E.domain(_.range().map(function(e){return(e-S.x)/S.k}).map(_.invert)),w&&w.domain(x.range().map(function(e){return(e-S.y)/S.k}).map(x.invert))}function l(e){I++||e({type:"zoomstart"})}function u(e){s(),e({type:"zoom",scale:S.k,translate:[S.x,S.y]})}function c(e){--I||(e({type:"zoomend"}),m=null)}function f(){function e(){s=1,o(la.mouse(r),h),u(a)}function i(){f.on(M,null).on(D,null),d(s),c(a)}var r=this,a=$.of(r,arguments),s=0,f=la.select(t(r)).on(M,e).on(D,i),h=n(la.mouse(r)),d=V(r);zl.call(r),l(a)}function h(){function e(){var e=la.touches(p);return d=S.k,e.forEach(function(e){e.identifier in m&&(m[e.identifier]=n(e))}),e}function t(){var t=la.event.target;la.select(t).on(_,i).on(E,s),x.push(t);for(var n=la.event.changedTouches,r=0,o=n.length;r<o;++r)m[n[r].identifier]=null;var l=e(),u=Date.now();if(1===l.length){if(u-b<500){var c=l[0];a(p,c,m[c.identifier],Math.floor(Math.log(S.k)/Math.LN2)+1),T()}b=u}else if(l.length>1){var c=l[0],f=l[1],h=c[0]-f[0],d=c[1]-f[1];v=h*h+d*d}}function i(){var e,t,n,i,a=la.touches(p);zl.call(p);for(var s=0,l=a.length;s<l;++s,i=null)if(n=a[s],i=m[n.identifier]){if(t)break;e=n,t=i}if(i){var c=(c=n[0]-e[0])*c+(c=n[1]-e[1])*c,f=v&&Math.sqrt(c/v);e=[(e[0]+n[0])/2,(e[1]+n[1])/2],t=[(t[0]+i[0])/2,(t[1]+i[1])/2],r(f*d)}b=null,o(e,t),u(g)}function s(){if(la.event.touches.length){for(var t=la.event.changedTouches,n=0,i=t.length;n<i;++n)delete m[t[n].identifier];for(var r in m)return void e()}la.selectAll(x).on(y,null),w.on(N,f).on(L,h),A(),c(g)}var d,p=this,g=$.of(p,arguments),m={},v=0,y=".zoom-"+la.event.changedTouches[0].identifier,_="touchmove"+y,E="touchend"+y,x=[],w=la.select(p),A=V(p);t(),l(g),w.on(N,null).on(L,t)}function d(){var e=$.of(this,arguments);y?clearTimeout(y):(zl.call(this),g=n(m=v||la.mouse(this)),l(e)),y=setTimeout(function(){y=null,c(e)},50),T(),r(Math.pow(2,.002*Xa())*S.k),o(m,g),u(e)}function p(){var e=la.mouse(this),t=Math.log(S.k)/Math.LN2;a(this,e,n(e),la.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}var g,m,v,y,b,_,E,x,w,S={x:0,y:0,k:1},C=[960,500],k=Ka,O=250,I=0,N="mousedown.zoom",M="mousemove.zoom",D="mouseup.zoom",L="touchstart.zoom",$=A(e,"zoomstart","zoom","zoomend");return Va||(Va="onwheel"in fa?(Xa=function(){return-la.event.deltaY*(la.event.deltaMode?120:1)},"wheel"):"onmousewheel"in fa?(Xa=function(){return la.event.wheelDelta},"mousewheel"):(Xa=function(){return-la.event.detail},"MozMousePixelScroll")),e.event=function(e){e.each(function(){var e=$.of(this,arguments),t=S;jl?la.select(this).transition().each("start.zoom",function(){S=this.__chart__||{x:0,y:0,k:1},l(e)}).tween("zoom:zoom",function(){var n=C[0],i=C[1],r=m?m[0]:n/2,o=m?m[1]:i/2,a=la.interpolateZoom([(r-S.x)/S.k,(o-S.y)/S.k,n/S.k],[(r-t.x)/t.k,(o-t.y)/t.k,n/t.k]);return function(t){var i=a(t),s=n/i[2];this.__chart__=S={x:r-i[0]*s,y:o-i[1]*s,k:s},u(e)}}).each("interrupt.zoom",function(){c(e)}).each("end.zoom",function(){c(e)}):(this.__chart__=S,l(e),u(e),c(e))})},e.translate=function(t){return arguments.length?(S={x:+t[0],y:+t[1],k:S.k},s(),e):[S.x,S.y]},e.scale=function(t){return arguments.length?(S={x:S.x,y:S.y,k:null},r(+t),s(),e):S.k},e.scaleExtent=function(t){return arguments.length?(k=null==t?Ka:[+t[0],+t[1]],e):k},e.center=function(t){return arguments.length?(v=t&&[+t[0],+t[1]],e):v},e.size=function(t){return arguments.length?(C=t&&[+t[0],+t[1]],e):C},e.duration=function(t){return arguments.length?(O=+t,e):O},e.x=function(t){return arguments.length?(E=t,_=t.copy(),S={x:0,y:0,k:1},e):E},e.y=function(t){return arguments.length?(w=t,x=t.copy(),S={x:0,y:0,k:1},e):w},la.rebind(e,$,"on")};var Xa,Va,Ka=[0,1/0];la.color=ae,ae.prototype.toString=function(){return this.rgb()+""},la.hsl=se;var Za=se.prototype=new ae;Za.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),new se(this.h,this.s,this.l/e)},Za.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new se(this.h,this.s,e*this.l)},Za.rgb=function(){return le(this.h,this.s,this.l)},la.hcl=ue;var Qa=ue.prototype=new ae;Qa.brighter=function(e){return new ue(this.h,this.c,Math.min(100,this.l+Ja*(arguments.length?e:1)))},Qa.darker=function(e){return new ue(this.h,this.c,Math.max(0,this.l-Ja*(arguments.length?e:1)))},Qa.rgb=function(){return ce(this.h,this.c,this.l).rgb()},la.lab=fe;var Ja=18,es=.95047,ts=1,ns=1.08883,is=fe.prototype=new ae;is.brighter=function(e){return new fe(Math.min(100,this.l+Ja*(arguments.length?e:1)),this.a,this.b)},is.darker=function(e){return new fe(Math.max(0,this.l-Ja*(arguments.length?e:1)),this.a,this.b)},is.rgb=function(){return he(this.l,this.a,this.b)},la.rgb=ve;var rs=ve.prototype=new ae;rs.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,n=this.g,i=this.b,r=30;return t||n||i?(t&&t<r&&(t=r),n&&n<r&&(n=r),i&&i<r&&(i=r),new ve(Math.min(255,t/e),Math.min(255,n/e),Math.min(255,i/e))):new ve(r,r,r)},rs.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new ve(e*this.r,e*this.g,e*this.b)},rs.hsl=function(){return xe(this.r,this.g,this.b)},rs.toString=function(){return"#"+_e(this.r)+_e(this.g)+_e(this.b)};var os=la.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});os.forEach(function(e,t){os.set(e,ye(t))}),la.functor=Ae,la.xhr=Ce(y),la.dsv=function(e,t){function n(e,n,o){arguments.length<3&&(o=n,n=null);var a=ke(e,t,null==n?i:r(n),o);return a.row=function(e){return arguments.length?a.response(null==(n=e)?i:r(e)):n},a}function i(e){return n.parse(e.responseText)}function r(e){return function(t){return n.parse(t.responseText,e)}}function o(t){return t.map(a).join(e)}function a(e){return s.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}var s=new RegExp('["'+e+"\n]"),l=e.charCodeAt(0);return n.parse=function(e,t){var i;return n.parseRows(e,function(e,n){if(i)return i(e,n-1);var r=new Function("d","return {"+e.map(function(e,t){return JSON.stringify(e)+": d["+t+"]"}).join(",")+"}");i=t?function(e,n){return t(r(e),n)}:r})},n.parseRows=function(e,t){function n(){if(c>=u)return a;if(r)return r=!1,o;var t=c;if(34===e.charCodeAt(t)){for(var n=t;n++<u;)if(34===e.charCodeAt(n)){if(34!==e.charCodeAt(n+1))break;++n}c=n+2;var i=e.charCodeAt(n+1);return 13===i?(r=!0,10===e.charCodeAt(n+2)&&++c):10===i&&(r=!0),e.slice(t+1,n).replace(/""/g,'"')}for(;c<u;){var i=e.charCodeAt(c++),s=1;if(10===i)r=!0;else if(13===i)r=!0,10===e.charCodeAt(c)&&(++c,++s);else if(i!==l)continue;return e.slice(t,c-s)}return e.slice(t)}for(var i,r,o={},a={},s=[],u=e.length,c=0,f=0;(i=n())!==a;){for(var h=[];i!==o&&i!==a;)h.push(i),i=n();t&&null==(h=t(h,f++))||s.push(h)}return s},n.format=function(t){if(Array.isArray(t[0]))return n.formatRows(t);var i=new v,r=[];return t.forEach(function(e){for(var t in e)i.has(t)||r.push(i.add(t))}),[r.map(a).join(e)].concat(t.map(function(t){return r.map(function(e){return a(t[e])}).join(e)})).join("\n")},n.formatRows=function(e){return e.map(o).join("\n")},n},la.csv=la.dsv(",","text/csv"),la.tsv=la.dsv("\t","text/tab-separated-values");var as,ss,ls,us,cs=this[_(this,"requestAnimationFrame")]||function(e){setTimeout(e,17)};la.timer=function(){Ne.apply(this,arguments)},la.timer.flush=function(){De(),Le()},la.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)};var fs=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(Re);la.formatPrefix=function(e,t){var n=0;return(e=+e)&&(e<0&&(e*=-1),t&&(e=la.round(e,$e(e,t))),n=1+Math.floor(1e-12+Math.log(e)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),fs[8+n/3]};var hs=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,ds=la.map({b:function(e){return e.toString(2)},c:function(e){return String.fromCharCode(e)},o:function(e){return e.toString(8)},x:function(e){return e.toString(16)},X:function(e){return e.toString(16).toUpperCase()},g:function(e,t){return e.toPrecision(t)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},r:function(e,t){return(e=la.round(e,$e(e,t))).toFixed(Math.max(0,Math.min(20,$e(e*(1+1e-15),t))))}}),ps=la.time={},gs=Date;Ue.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(){ms.setUTCDate.apply(this._,arguments)},setDay:function(){ms.setUTCDay.apply(this._,arguments)},setFullYear:function(){ms.setUTCFullYear.apply(this._,arguments)},setHours:function(){ms.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){ms.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){ms.setUTCMinutes.apply(this._,arguments)},setMonth:function(){ms.setUTCMonth.apply(this._,arguments)},setSeconds:function(){ms.setUTCSeconds.apply(this._,arguments)},setTime:function(){ms.setTime.apply(this._,arguments)}};var ms=Date.prototype;ps.year=je(function(e){return e=ps.day(e),e.setMonth(0,1),e},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e){return e.getFullYear()}),ps.years=ps.year.range,ps.years.utc=ps.year.utc.range,ps.day=je(function(e){var t=new gs(2e3,0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t},function(e,t){e.setDate(e.getDate()+t)},function(e){return e.getDate()-1}),ps.days=ps.day.range,ps.days.utc=ps.day.utc.range,ps.dayOfYear=function(e){var t=ps.year(e);return Math.floor((e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(e,t){t=7-t;var n=ps[e]=je(function(e){return(e=ps.day(e)).setDate(e.getDate()-(e.getDay()+t)%7),e},function(e,t){e.setDate(e.getDate()+7*Math.floor(t))},function(e){var n=ps.year(e).getDay();return Math.floor((ps.dayOfYear(e)+(n+t)%7)/7)-(n!==t)});ps[e+"s"]=n.range,ps[e+"s"].utc=n.utc.range,ps[e+"OfYear"]=function(e){var n=ps.year(e).getDay();return Math.floor((ps.dayOfYear(e)+(n+t)%7)/7)}}),ps.week=ps.sunday,ps.weeks=ps.sunday.range,ps.weeks.utc=ps.sunday.utc.range,ps.weekOfYear=ps.sundayOfYear;var vs={"-":"",_:" ",0:"0"},ys=/^\s*\d+/,bs=/^%/;la.locale=function(e){return{numberFormat:Pe(e),timeFormat:ze(e)}};var _s=la.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"]});la.format=_s.numberFormat,la.geo={},ut.prototype={s:0,t:0,add:function(e){ct(e,this.t,Es),ct(Es.s,this.s,this),this.s?this.t+=Es.t:this.s=Es.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var Es=new ut;la.geo.stream=function(e,t){e&&xs.hasOwnProperty(e.type)?xs[e.type](e,t):ft(e,t)};var xs={Feature:function(e,t){ft(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,i=-1,r=n.length;++i<r;)ft(n[i].geometry,t)}},ws={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,i=-1,r=n.length;++i<r;)e=n[i],t.point(e[0],e[1],e[2])},LineString:function(e,t){ht(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,i=-1,r=n.length;++i<r;)ht(n[i],t,0)},Polygon:function(e,t){dt(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,i=-1,r=n.length;++i<r;)dt(n[i],t)},GeometryCollection:function(e,t){for(var n=e.geometries,i=-1,r=n.length;++i<r;)ft(n[i],t)}};la.geo.area=function(e){return Ts=0,la.geo.stream(e,As),Ts};var Ts,Ss=new ut,As={sphere:function(){Ts+=4*Ua},point:E,lineStart:E,lineEnd:E,polygonStart:function(){Ss.reset(),As.lineStart=pt},polygonEnd:function(){var e=2*Ss;Ts+=e<0?4*Ua+e:e,As.lineStart=As.lineEnd=As.point=E}};la.geo.bounds=function(){function e(e,t){b.push(_=[c=e,h=e]),t<f&&(f=t),t>d&&(d=t)}function t(t,n){var i=gt([t*Ba,n*Ba]);if(v){var r=vt(v,i),o=[r[1],-r[0],0],a=vt(o,r);_t(a),a=Et(a);var l=t-p,u=l>0?1:-1,g=a[0]*qa*u,m=_a(l)>180;if(m^(u*p<g&&g<u*t)){var y=a[1]*qa;y>d&&(d=y)}else if(g=(g+360)%360-180,m^(u*p<g&&g<u*t)){var y=-a[1]*qa;y<f&&(f=y)}else n<f&&(f=n),n>d&&(d=n);m?t<p?s(c,t)>s(c,h)&&(h=t):s(t,h)>s(c,h)&&(c=t):h>=c?(t<c&&(c=t),t>h&&(h=t)):t>p?s(c,t)>s(c,h)&&(h=t):s(t,h)>s(c,h)&&(c=t)}else e(t,n);v=i,p=t}function n(){E.point=t}function i(){_[0]=c,_[1]=h,E.point=e,v=null}function r(e,n){if(v){var i=e-p;y+=_a(i)>180?i+(i>0?360:-360):i}else g=e,m=n;As.point(e,n),t(e,n)}function o(){As.lineStart()}function a(){r(g,m),As.lineEnd(),_a(y)>Pa&&(c=-(h=180)),_[0]=c,_[1]=h,v=null}function s(e,t){return(t-=e)<0?t+360:t}function l(e,t){return e[0]-t[0]}function u(e,t){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}var c,f,h,d,p,g,m,v,y,b,_,E={point:e,lineStart:n,lineEnd:i,polygonStart:function(){E.point=r,E.lineStart=o,E.lineEnd=a,y=0,As.polygonStart()},polygonEnd:function(){As.polygonEnd(),E.point=e,E.lineStart=n,E.lineEnd=i,Ss<0?(c=-(h=180),f=-(d=90)):y>Pa?d=90:y<-Pa&&(f=-90),_[0]=c,_[1]=h}};return function(e){d=h=-(c=f=1/0),b=[],la.geo.stream(e,E);var t=b.length;if(t){b.sort(l);for(var n,i=1,r=b[0],o=[r];i<t;++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),t=o.length-1,i=0,r=o[t];i<=t;r=n,++i)n=o[i],(a=s(r[1],n[0]))>p&&(p=a,c=n[0],h=r[1])}return b=_=null,c===1/0||f===1/0?[[NaN,NaN],[NaN,NaN]]:[[c,f],[h,d]]}}(),la.geo.centroid=function(e){Cs=ks=Os=Is=Ns=Ms=Ds=Ls=$s=Rs=Ps=0,la.geo.stream(e,Fs);var t=$s,n=Rs,i=Ps,r=t*t+n*n+i*i;return r<Fa&&(t=Ms,n=Ds,i=Ls,ks<Pa&&(t=Os,n=Is,i=Ns),r=t*t+n*n+i*i,r<Fa)?[NaN,NaN]:[Math.atan2(n,t)*qa,te(i/Math.sqrt(r))*qa]};var Cs,ks,Os,Is,Ns,Ms,Ds,Ls,$s,Rs,Ps,Fs={sphere:E,point:wt,lineStart:St,lineEnd:At,polygonStart:function(){Fs.lineStart=Ct},polygonEnd:function(){Fs.lineStart=St}},Us=Dt(Ot,Pt,Ut,[-Ua,-Ua/2]),js=1e9;la.geo.clipExtent=function(){var e,t,n,i,r,o,a={stream:function(e){return r&&(r.valid=!1),r=o(e),r.valid=!0,r},extent:function(s){return arguments.length?(o=Bt(e=+s[0][0],t=+s[0][1],n=+s[1][0],i=+s[1][1]),r&&(r.valid=!1,r=null),a):[[e,t],[n,i]]}};return a.extent([[0,0],[960,500]])},(la.geo.conicEqualArea=function(){return qt(Wt)}).raw=Wt,la.geo.albers=function(){return la.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},la.geo.albersUsa=function(){function e(e){var o=e[0],a=e[1];return t=null,n(o,a),t||(i(o,a),t)||r(o,a),t}var t,n,i,r,o=la.geo.albers(),a=la.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=la.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(e,n){t=[e,n]}};return e.invert=function(e){var t=o.scale(),n=o.translate(),i=(e[0]-n[0])/t,r=(e[1]-n[1])/t;return(r>=.12&&r<.234&&i>=-.425&&i<-.214?a:r>=.166&&r<.234&&i>=-.214&&i<-.115?s:o).invert(e)},e.stream=function(e){var t=o.stream(e),n=a.stream(e),i=s.stream(e);return{point:function(e,r){t.point(e,r),n.point(e,r),i.point(e,r)},sphere:function(){t.sphere(),n.sphere(),i.sphere()},lineStart:function(){t.lineStart(),n.lineStart(),i.lineStart()},lineEnd:function(){t.lineEnd(),n.lineEnd(),i.lineEnd()},polygonStart:function(){t.polygonStart(),n.polygonStart(),i.polygonStart()},polygonEnd:function(){t.polygonEnd(),n.polygonEnd(),i.polygonEnd()}}},e.precision=function(t){return arguments.length?(o.precision(t),a.precision(t),s.precision(t),e):o.precision()},e.scale=function(t){return arguments.length?(o.scale(t),a.scale(.35*t),s.scale(t),e.translate(o.translate())):o.scale()},e.translate=function(t){if(!arguments.length)return o.translate();var u=o.scale(),c=+t[0],f=+t[1];return n=o.translate(t).clipExtent([[c-.455*u,f-.238*u],[c+.455*u,f+.238*u]]).stream(l).point,i=a.translate([c-.307*u,f+.201*u]).clipExtent([[c-.425*u+Pa,f+.12*u+Pa],[c-.214*u-Pa,f+.234*u-Pa]]).stream(l).point,r=s.translate([c-.205*u,f+.212*u]).clipExtent([[c-.214*u+Pa,f+.166*u+Pa],[c-.115*u-Pa,f+.234*u-Pa]]).stream(l).point,e},e.scale(1070)};var Hs,zs,Bs,qs,Ws,Ys,Gs={point:E,lineStart:E,lineEnd:E,polygonStart:function(){zs=0,Gs.lineStart=Yt},polygonEnd:function(){Gs.lineStart=Gs.lineEnd=Gs.point=E,Hs+=_a(zs/2)}},Xs={point:Gt,lineStart:E,lineEnd:E,polygonStart:E,polygonEnd:E},Vs={point:Kt,lineStart:Zt,lineEnd:Qt,polygonStart:function(){Vs.lineStart=Jt},polygonEnd:function(){Vs.point=Kt,Vs.lineStart=Zt,Vs.lineEnd=Qt}};la.geo.path=function(){function e(e){return e&&("function"==typeof s&&o.pointRadius(+s.apply(this,arguments)),a&&a.valid||(a=r(o)),la.geo.stream(e,a)),o.result()}function t(){return a=null,e}var n,i,r,o,a,s=4.5;return e.area=function(e){return Hs=0,la.geo.stream(e,r(Gs)),Hs},e.centroid=function(e){return Os=Is=Ns=Ms=Ds=Ls=$s=Rs=Ps=0,la.geo.stream(e,r(Vs)),Ps?[$s/Ps,Rs/Ps]:Ls?[Ms/Ls,Ds/Ls]:Ns?[Os/Ns,Is/Ns]:[NaN,NaN]},e.bounds=function(e){return Ws=Ys=-(Bs=qs=1/0),la.geo.stream(e,r(Xs)),[[Bs,qs],[Ws,Ys]]},e.projection=function(e){return arguments.length?(r=(n=e)?e.stream||nn(e):y,t()):n},e.context=function(e){return arguments.length?(o=null==(i=e)?new Xt:new en(e),"function"!=typeof s&&o.pointRadius(s),t()):i},e.pointRadius=function(t){return arguments.length?(s="function"==typeof t?t:(o.pointRadius(+t),+t),e):s},e.projection(la.geo.albersUsa()).context(null)},la.geo.transform=function(e){return{stream:function(t){var n=new rn(t);for(var i in e)n[i]=e[i];return n}}},rn.prototype={point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},la.geo.projection=an,la.geo.projectionMutator=sn,(la.geo.equirectangular=function(){return an(un)}).raw=un.invert=un,la.geo.rotation=function(e){function t(t){return t=e(t[0]*Ba,t[1]*Ba),t[0]*=qa,t[1]*=qa,t}return e=fn(e[0]%360*Ba,e[1]*Ba,e.length>2?e[2]*Ba:0),t.invert=function(t){return t=e.invert(t[0]*Ba,t[1]*Ba),t[0]*=qa,t[1]*=qa,t},t},cn.invert=un,la.geo.circle=function(){function e(){var e="function"==typeof i?i.apply(this,arguments):i,t=fn(-e[0]*Ba,-e[1]*Ba,0).invert,r=[];return n(null,null,1,{point:function(e,n){r.push(e=t(e,n)),e[0]*=qa,e[1]*=qa}}),{type:"Polygon",coordinates:[r]}}var t,n,i=[0,0],r=6;return e.origin=function(t){return arguments.length?(i=t,e):i},e.angle=function(i){return arguments.length?(n=gn((t=+i)*Ba,r*Ba),e):t},e.precision=function(i){return arguments.length?(n=gn(t*Ba,(r=+i)*Ba),e):r},e.angle(90)},la.geo.distance=function(e,t){var n,i=(t[0]-e[0])*Ba,r=e[1]*Ba,o=t[1]*Ba,a=Math.sin(i),s=Math.cos(i),l=Math.sin(r),u=Math.cos(r),c=Math.sin(o),f=Math.cos(o);return Math.atan2(Math.sqrt((n=f*a)*n+(n=u*c-l*f*s)*n),l*c+u*f*s)},la.geo.graticule=function(){function e(){return{type:"MultiLineString",coordinates:t()}}function t(){return la.range(Math.ceil(o/m)*m,r,m).map(h).concat(la.range(Math.ceil(u/v)*v,l,v).map(d)).concat(la.range(Math.ceil(i/p)*p,n,p).filter(function(e){return _a(e%m)>Pa}).map(c)).concat(la.range(Math.ceil(s/g)*g,a,g).filter(function(e){return _a(e%v)>Pa}).map(f))}var n,i,r,o,a,s,l,u,c,f,h,d,p=10,g=p,m=90,v=360,y=2.5;return e.lines=function(){return t().map(function(e){return{type:"LineString",coordinates:e}})},e.outline=function(){return{type:"Polygon",coordinates:[h(o).concat(d(l).slice(1),h(r).reverse().slice(1),d(u).reverse().slice(1))]}},e.extent=function(t){return arguments.length?e.majorExtent(t).minorExtent(t):e.minorExtent()},e.majorExtent=function(t){return arguments.length?(o=+t[0][0],r=+t[1][0],u=+t[0][1],l=+t[1][1],o>r&&(t=o,o=r,r=t),u>l&&(t=u,u=l,l=t),e.precision(y)):[[o,u],[r,l]]},e.minorExtent=function(t){return arguments.length?(i=+t[0][0],n=+t[1][0],s=+t[0][1],a=+t[1][1],i>n&&(t=i,i=n,n=t),s>a&&(t=s,s=a,a=t),e.precision(y)):[[i,s],[n,a]]},e.step=function(t){return arguments.length?e.majorStep(t).minorStep(t):e.minorStep()},e.majorStep=function(t){return arguments.length?(m=+t[0],v=+t[1],e):[m,v]},e.minorStep=function(t){return arguments.length?(p=+t[0],g=+t[1],e):[p,g]},e.precision=function(t){return arguments.length?(y=+t,c=vn(s,a,90),f=yn(i,n,y),h=vn(u,l,90),d=yn(o,r,y),e):y},e.majorExtent([[-180,-90+Pa],[180,90-Pa]]).minorExtent([[-180,-80-Pa],[180,80+Pa]])},la.geo.greatArc=function(){function e(){return{type:"LineString",coordinates:[t||i.apply(this,arguments),n||r.apply(this,arguments)]}}var t,n,i=bn,r=_n;return e.distance=function(){return la.geo.distance(t||i.apply(this,arguments),n||r.apply(this,arguments))},e.source=function(n){return arguments.length?(i=n,t="function"==typeof n?null:n,e):i},e.target=function(t){return arguments.length?(r=t,n="function"==typeof t?null:t,e):r},e.precision=function(){return arguments.length?e:0},e},la.geo.interpolate=function(e,t){return En(e[0]*Ba,e[1]*Ba,t[0]*Ba,t[1]*Ba)},la.geo.length=function(e){return Ks=0,la.geo.stream(e,Zs),Ks};var Ks,Zs={sphere:E,point:E,lineStart:xn,lineEnd:E,polygonStart:E,polygonEnd:E},Qs=wn(function(e){return Math.sqrt(2/(1+e))},function(e){return 2*Math.asin(e/2)});(la.geo.azimuthalEqualArea=function(){return an(Qs)}).raw=Qs;var Js=wn(function(e){var t=Math.acos(e);return t&&t/Math.sin(t)},y);(la.geo.azimuthalEquidistant=function(){return an(Js)}).raw=Js,(la.geo.conicConformal=function(){return qt(Tn)}).raw=Tn,(la.geo.conicEquidistant=function(){return qt(Sn)}).raw=Sn;var el=wn(function(e){return 1/e},Math.atan);(la.geo.gnomonic=function(){return an(el)}).raw=el,An.invert=function(e,t){return[e,2*Math.atan(Math.exp(t))-za]},(la.geo.mercator=function(){return Cn(An)}).raw=An;var tl=wn(function(){return 1},Math.asin);(la.geo.orthographic=function(){return an(tl)}).raw=tl;var nl=wn(function(e){return 1/(1+e)},function(e){return 2*Math.atan(e)});(la.geo.stereographic=function(){return an(nl)}).raw=nl,kn.invert=function(e,t){return[-t,2*Math.atan(Math.exp(e))-za]},(la.geo.transverseMercator=function(){var e=Cn(kn),t=e.center,n=e.rotate;return e.center=function(e){return e?t([-e[1],e[0]]):(e=t(),[e[1],-e[0]])},e.rotate=function(e){return e?n([e[0],e[1],e.length>2?e[2]+90:90]):(e=n(),[e[0],e[1],e[2]-90])},n([0,0,90])}).raw=kn,la.geom={},la.geom.hull=function(e){function t(e){if(e.length<3)return[];var t,r=Ae(n),o=Ae(i),a=e.length,s=[],l=[];for(t=0;t<a;t++)s.push([+r.call(this,e[t],t),+o.call(this,e[t],t),t]);for(s.sort(Mn),t=0;t<a;t++)l.push([s[t][0],-s[t][1]]);var u=Nn(s),c=Nn(l),f=c[0]===u[0],h=c[c.length-1]===u[u.length-1],d=[];for(t=u.length-1;t>=0;--t)d.push(e[s[u[t]][2]]);for(t=+f;t<c.length-h;++t)d.push(e[s[c[t]][2]]);return d}var n=On,i=In;return arguments.length?t(e):(t.x=function(e){return arguments.length?(n=e,t):n},t.y=function(e){return arguments.length?(i=e,t):i},t)},la.geom.polygon=function(e){return Sa(e,il),e};var il=la.geom.polygon.prototype=[];il.area=function(){for(var e,t=-1,n=this.length,i=this[n-1],r=0;++t<n;)e=i,i=this[t],r+=e[1]*i[0]-e[0]*i[1];return.5*r},il.centroid=function(e){var t,n,i=-1,r=this.length,o=0,a=0,s=this[r-1];for(arguments.length||(e=-1/(6*this.area()));++i<r;)t=s,s=this[i],n=t[0]*s[1]-s[0]*t[1],o+=(t[0]+s[0])*n,a+=(t[1]+s[1])*n;return[o*e,a*e]},il.clip=function(e){for(var t,n,i,r,o,a,s=$n(e),l=-1,u=this.length-$n(this),c=this[u-1];++l<u;){for(t=e.slice(),e.length=0,r=this[l],o=t[(i=t.length-s)-1],n=-1;++n<i;)a=t[n],Dn(a,c,r)?(Dn(o,c,r)||e.push(Ln(o,a,c,r)),e.push(a)):Dn(o,c,r)&&e.push(Ln(o,a,c,r)),o=a;s&&e.push(e[0]),c=r}return e};var rl,ol,al,sl,ll,ul=[],cl=[];Bn.prototype.prepare=function(){for(var e,t=this.edges,n=t.length;n--;)e=t[n].edge,e.b&&e.a||t.splice(n,1);return t.sort(Wn),t.length},ti.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}},ni.prototype={insert:function(e,t){var n,i,r;if(e){if(t.P=e,t.N=e.N,e.N&&(e.N.P=t),e.N=t,e.R){for(e=e.R;e.L;)e=e.L;e.L=t}else e.R=t;n=e}else this._?(e=ai(this._),t.P=null,t.N=e,e.P=e.L=t,n=e):(t.P=t.N=null,this._=t,n=null);for(t.L=t.R=null,t.U=n,t.C=!0,e=t;n&&n.C;)i=n.U,n===i.L?(r=i.R,r&&r.C?(n.C=r.C=!1,i.C=!0,e=i):(e===n.R&&(ri(this,n),e=n,n=e.U),n.C=!1,i.C=!0,oi(this,i))):(r=i.L,r&&r.C?(n.C=r.C=!1,i.C=!0,e=i):(e===n.L&&(oi(this,n),e=n,n=e.U),n.C=!1,i.C=!0,ri(this,i))),n=e.U;this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P),e.P&&(e.P.N=e.N),e.N=e.P=null;var t,n,i,r=e.U,o=e.L,a=e.R;if(n=o?a?ai(a):o:a,r?r.L===e?r.L=n:r.R=n:this._=n,o&&a?(i=n.C,n.C=e.C,n.L=o,o.U=n,n!==a?(r=n.U,n.U=e.U,e=n.R,r.L=e,n.R=a,a.U=n):(n.U=r,r=n,e=n.R)):(i=e.C,e=n),e&&(e.U=r),!i){if(e&&e.C)return void(e.C=!1);do{if(e===this._)break;if(e===r.L){if(t=r.R,t.C&&(t.C=!1,r.C=!0,ri(this,r),t=r.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,oi(this,t),t=r.R),t.C=r.C,r.C=t.R.C=!1,ri(this,r),e=this._;break}}else if(t=r.L,t.C&&(t.C=!1,r.C=!0,oi(this,r),t=r.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,ri(this,t),t=r.L),t.C=r.C,r.C=t.L.C=!1,oi(this,r),e=this._;break}t.C=!0,e=r,r=r.U}while(!e.C);e&&(e.C=!1)}}},la.geom.voronoi=function(e){function t(e){var t=new Array(e.length),i=s[0][0],r=s[0][1],o=s[1][0],a=s[1][1];return si(n(e),s).cells.forEach(function(n,s){var l=n.edges,u=n.site,c=t[s]=l.length?l.map(function(e){var t=e.start();return[t.x,t.y]}):u.x>=i&&u.x<=o&&u.y>=r&&u.y<=a?[[i,a],[o,a],[o,r],[i,r]]:[];c.point=e[s]}),t}function n(e){return e.map(function(e,t){return{x:Math.round(o(e,t)/Pa)*Pa,y:Math.round(a(e,t)/Pa)*Pa,i:t}})}var i=On,r=In,o=i,a=r,s=fl;return e?t(e):(t.links=function(e){return si(n(e)).edges.filter(function(e){return e.l&&e.r}).map(function(t){return{source:e[t.l.i],target:e[t.r.i]}})},t.triangles=function(e){var t=[];return si(n(e)).cells.forEach(function(n,i){for(var r,o,a=n.site,s=n.edges.sort(Wn),l=-1,u=s.length,c=s[u-1].edge,f=c.l===a?c.r:c.l;++l<u;)r=c,o=f,c=s[l].edge,f=c.l===a?c.r:c.l,i<o.i&&i<f.i&&ui(a,o,f)<0&&t.push([e[i],e[o.i],e[f.i]])}),t},t.x=function(e){return arguments.length?(o=Ae(i=e),t):i},t.y=function(e){return arguments.length?(a=Ae(r=e),t):r},t.clipExtent=function(e){return arguments.length?(s=null==e?fl:e,t):s===fl?null:s},t.size=function(e){return arguments.length?t.clipExtent(e&&[[0,0],e]):s===fl?null:s&&s[1]},t)};var fl=[[-1e6,-1e6],[1e6,1e6]];la.geom.delaunay=function(e){return la.geom.voronoi().triangles(e)},la.geom.quadtree=function(e,t,n,i,r){function o(e){function o(e,t,n,i,r,o,a,s){if(!isNaN(n)&&!isNaN(i))if(e.leaf){var l=e.x,c=e.y;if(null!=l)if(_a(l-n)+_a(c-i)<.01)u(e,t,n,i,r,o,a,s);else{var f=e.point;e.x=e.y=e.point=null,u(e,f,l,c,r,o,a,s),u(e,t,n,i,r,o,a,s)}else e.x=n,e.y=i,e.point=t}else u(e,t,n,i,r,o,a,s)}function u(e,t,n,i,r,a,s,l){var u=.5*(r+s),c=.5*(a+l),f=n>=u,h=i>=c,d=h<<1|f;e.leaf=!1,e=e.nodes[d]||(e.nodes[d]=hi()),f?r=u:s=u,h?a=c:l=c,o(e,t,n,i,r,a,s,l)}var c,f,h,d,p,g,m,v,y,b=Ae(s),_=Ae(l);if(null!=t)g=t,m=n,v=i,y=r;else if(v=y=-(g=m=1/0),f=[],h=[],p=e.length,a)for(d=0;d<p;++d)c=e[d],c.x<g&&(g=c.x),c.y<m&&(m=c.y),c.x>v&&(v=c.x),c.y>y&&(y=c.y),f.push(c.x),h.push(c.y);else for(d=0;d<p;++d){var E=+b(c=e[d],d),x=+_(c,d);E<g&&(g=E),x<m&&(m=x),E>v&&(v=E),x>y&&(y=x),f.push(E),h.push(x)}var w=v-g,T=y-m;w>T?y=m+w:v=g+T;var S=hi();if(S.add=function(e){o(S,e,+b(e,++d),+_(e,d),g,m,v,y)},S.visit=function(e){di(e,S,g,m,v,y)},S.find=function(e){return pi(S,e[0],e[1],g,m,v,y)},d=-1,null==t){for(;++d<p;)o(S,e[d],f[d],h[d],g,m,v,y);--d}else e.forEach(S.add);return f=h=e=c=null,S}var a,s=On,l=In;return(a=arguments.length)?(s=ci,l=fi,3===a&&(r=n,i=t,n=t=0),o(e)):(o.x=function(e){return arguments.length?(s=e,o):s},o.y=function(e){return arguments.length?(l=e,o):l},o.extent=function(e){return arguments.length?(null==e?t=n=i=r=null:(t=+e[0][0],n=+e[0][1],i=+e[1][0],r=+e[1][1]),o):null==t?null:[[t,n],[i,r]]},o.size=function(e){return arguments.length?(null==e?t=n=i=r=null:(t=n=0,i=+e[0],r=+e[1]),o):null==t?null:[i-t,r-n]},o)},la.interpolateRgb=gi,la.interpolateObject=mi,la.interpolateNumber=vi,
la.interpolateString=yi;var hl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,dl=new RegExp(hl.source,"g");la.interpolate=bi,la.interpolators=[function(e,t){var n=typeof t;return("string"===n?os.has(t.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(t)?gi:yi:t instanceof ae?gi:Array.isArray(t)?_i:"object"===n&&isNaN(t)?mi:vi)(e,t)}],la.interpolateArray=_i;var pl=function(){return y},gl=la.map({linear:pl,poly:Ci,quad:function(){return Ti},cubic:function(){return Si},sin:function(){return ki},exp:function(){return Oi},circle:function(){return Ii},elastic:Ni,back:Mi,bounce:function(){return Di}}),ml=la.map({"in":y,out:xi,"in-out":wi,"out-in":function(e){return wi(xi(e))}});la.ease=function(e){var t=e.indexOf("-"),n=t>=0?e.slice(0,t):e,i=t>=0?e.slice(t+1):"in";return n=gl.get(n)||pl,i=ml.get(i)||y,Ei(i(n.apply(null,ua.call(arguments,1))))},la.interpolateHcl=Li,la.interpolateHsl=$i,la.interpolateLab=Ri,la.interpolateRound=Pi,la.transform=function(e){var t=fa.createElementNS(la.ns.prefix.svg,"g");return(la.transform=function(e){if(null!=e){t.setAttribute("transform",e);var n=t.transform.baseVal.consolidate()}return new Fi(n?n.matrix:vl)})(e)},Fi.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var vl={a:1,b:0,c:0,d:1,e:0,f:0};la.interpolateTransform=Gi,la.layout={},la.layout.bundle=function(){return function(e){for(var t=[],n=-1,i=e.length;++n<i;)t.push(Ki(e[n]));return t}},la.layout.chord=function(){function e(){var e,u,f,h,d,p={},g=[],m=la.range(o),v=[];for(n=[],i=[],e=0,h=-1;++h<o;){for(u=0,d=-1;++d<o;)u+=r[h][d];g.push(u),v.push(la.range(o)),e+=u}for(a&&m.sort(function(e,t){return a(g[e],g[t])}),s&&v.forEach(function(e,t){e.sort(function(e,n){return s(r[t][e],r[t][n])})}),e=(ja-c*o)/e,u=0,h=-1;++h<o;){for(f=u,d=-1;++d<o;){var y=m[h],b=v[y][d],_=r[y][b],E=u,x=u+=_*e;p[y+"-"+b]={index:y,subindex:b,startAngle:E,endAngle:x,value:_}}i[y]={index:y,startAngle:f,endAngle:u,value:g[y]},u+=c}for(h=-1;++h<o;)for(d=h-1;++d<o;){var w=p[h+"-"+d],T=p[d+"-"+h];(w.value||T.value)&&n.push(w.value<T.value?{source:T,target:w}:{source:w,target:T})}l&&t()}function t(){n.sort(function(e,t){return l((e.source.value+e.target.value)/2,(t.source.value+t.target.value)/2)})}var n,i,r,o,a,s,l,u={},c=0;return u.matrix=function(e){return arguments.length?(o=(r=e)&&r.length,n=i=null,u):r},u.padding=function(e){return arguments.length?(c=e,n=i=null,u):c},u.sortGroups=function(e){return arguments.length?(a=e,n=i=null,u):a},u.sortSubgroups=function(e){return arguments.length?(s=e,n=null,u):s},u.sortChords=function(e){return arguments.length?(l=e,n&&t(),u):l},u.chords=function(){return n||e(),n},u.groups=function(){return i||e(),i},u},la.layout.force=function(){function e(e){return function(t,n,i,r){if(t.point!==e){var o=t.cx-e.x,a=t.cy-e.y,s=r-n,l=o*o+a*a;if(s*s/v<l){if(l<g){var u=t.charge/l;e.px-=o*u,e.py-=a*u}return!0}if(t.point&&l&&l<g){var u=t.pointCharge/l;e.px-=o*u,e.py-=a*u}}return!t.charge}}function t(e){e.px=la.event.x,e.py=la.event.y,l.resume()}var n,i,r,o,a,s,l={},u=la.dispatch("start","tick","end"),c=[1,1],f=.9,h=yl,d=bl,p=-30,g=_l,m=.1,v=.64,b=[],_=[];return l.tick=function(){if((r*=.99)<.005)return n=null,u.end({type:"end",alpha:r=0}),!0;var t,i,l,h,d,g,v,y,E,x=b.length,w=_.length;for(i=0;i<w;++i)l=_[i],h=l.source,d=l.target,y=d.x-h.x,E=d.y-h.y,(g=y*y+E*E)&&(g=r*a[i]*((g=Math.sqrt(g))-o[i])/g,y*=g,E*=g,d.x-=y*(v=h.weight+d.weight?h.weight/(h.weight+d.weight):.5),d.y-=E*v,h.x+=y*(v=1-v),h.y+=E*v);if((v=r*m)&&(y=c[0]/2,E=c[1]/2,i=-1,v))for(;++i<x;)l=b[i],l.x+=(y-l.x)*v,l.y+=(E-l.y)*v;if(p)for(ir(t=la.geom.quadtree(b),r,s),i=-1;++i<x;)(l=b[i]).fixed||t.visit(e(l));for(i=-1;++i<x;)l=b[i],l.fixed?(l.x=l.px,l.y=l.py):(l.x-=(l.px-(l.px=l.x))*f,l.y-=(l.py-(l.py=l.y))*f);u.tick({type:"tick",alpha:r})},l.nodes=function(e){return arguments.length?(b=e,l):b},l.links=function(e){return arguments.length?(_=e,l):_},l.size=function(e){return arguments.length?(c=e,l):c},l.linkDistance=function(e){return arguments.length?(h="function"==typeof e?e:+e,l):h},l.distance=l.linkDistance,l.linkStrength=function(e){return arguments.length?(d="function"==typeof e?e:+e,l):d},l.friction=function(e){return arguments.length?(f=+e,l):f},l.charge=function(e){return arguments.length?(p="function"==typeof e?e:+e,l):p},l.chargeDistance=function(e){return arguments.length?(g=e*e,l):Math.sqrt(g)},l.gravity=function(e){return arguments.length?(m=+e,l):m},l.theta=function(e){return arguments.length?(v=e*e,l):Math.sqrt(v)},l.alpha=function(e){return arguments.length?(e=+e,r?e>0?r=e:(n.c=null,n.t=NaN,n=null,u.end({type:"end",alpha:r=0})):e>0&&(u.start({type:"start",alpha:r=e}),n=Ne(l.tick)),l):r},l.start=function(){function e(e,i){if(!n){for(n=new Array(r),l=0;l<r;++l)n[l]=[];for(l=0;l<u;++l){var o=_[l];n[o.source.index].push(o.target),n[o.target.index].push(o.source)}}for(var a,s=n[t],l=-1,c=s.length;++l<c;)if(!isNaN(a=s[l][e]))return a;return Math.random()*i}var t,n,i,r=b.length,u=_.length,f=c[0],g=c[1];for(t=0;t<r;++t)(i=b[t]).index=t,i.weight=0;for(t=0;t<u;++t)i=_[t],"number"==typeof i.source&&(i.source=b[i.source]),"number"==typeof i.target&&(i.target=b[i.target]),++i.source.weight,++i.target.weight;for(t=0;t<r;++t)i=b[t],isNaN(i.x)&&(i.x=e("x",f)),isNaN(i.y)&&(i.y=e("y",g)),isNaN(i.px)&&(i.px=i.x),isNaN(i.py)&&(i.py=i.y);if(o=[],"function"==typeof h)for(t=0;t<u;++t)o[t]=+h.call(this,_[t],t);else for(t=0;t<u;++t)o[t]=h;if(a=[],"function"==typeof d)for(t=0;t<u;++t)a[t]=+d.call(this,_[t],t);else for(t=0;t<u;++t)a[t]=d;if(s=[],"function"==typeof p)for(t=0;t<r;++t)s[t]=+p.call(this,b[t],t);else for(t=0;t<r;++t)s[t]=p;return l.resume()},l.resume=function(){return l.alpha(.1)},l.stop=function(){return l.alpha(0)},l.drag=function(){return i||(i=la.behavior.drag().origin(y).on("dragstart.force",Ji).on("drag.force",t).on("dragend.force",er)),arguments.length?void this.on("mouseover.force",tr).on("mouseout.force",nr).call(i):i},la.rebind(l,u,"on")};var yl=20,bl=1,_l=1/0;la.layout.hierarchy=function(){function e(r){var o,a=[r],s=[];for(r.depth=0;null!=(o=a.pop());)if(s.push(o),(u=n.call(e,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(e,o,o.depth)||0),delete o.children;return ar(r,function(e){var n,r;t&&(n=e.children)&&n.sort(t),i&&(r=e.parent)&&(r.value+=e.value)}),s}var t=ur,n=sr,i=lr;return e.sort=function(n){return arguments.length?(t=n,e):t},e.children=function(t){return arguments.length?(n=t,e):n},e.value=function(t){return arguments.length?(i=t,e):i},e.revalue=function(t){return i&&(or(t,function(e){e.children&&(e.value=0)}),ar(t,function(t){var n;t.children||(t.value=+i.call(e,t,t.depth)||0),(n=t.parent)&&(n.value+=t.value)})),t},e},la.layout.partition=function(){function e(t,n,i,r){var o=t.children;if(t.x=n,t.y=t.depth*r,t.dx=i,t.dy=r,o&&(a=o.length)){var a,s,l,u=-1;for(i=t.value?i/t.value:0;++u<a;)e(s=o[u],n,l=s.value*i,r),n+=l}}function t(e){var n=e.children,i=0;if(n&&(r=n.length))for(var r,o=-1;++o<r;)i=Math.max(i,t(n[o]));return 1+i}function n(n,o){var a=i.call(this,n,o);return e(a[0],0,r[0],r[1]/t(a[0])),a}var i=la.layout.hierarchy(),r=[1,1];return n.size=function(e){return arguments.length?(r=e,n):r},rr(n,i)},la.layout.pie=function(){function e(a){var s,l=a.length,u=a.map(function(n,i){return+t.call(e,n,i)}),c=+("function"==typeof i?i.apply(this,arguments):i),f=("function"==typeof r?r.apply(this,arguments):r)-c,h=Math.min(Math.abs(f)/l,+("function"==typeof o?o.apply(this,arguments):o)),d=h*(f<0?-1:1),p=la.sum(u),g=p?(f-l*d)/p:0,m=la.range(l),v=[];return null!=n&&m.sort(n===El?function(e,t){return u[t]-u[e]}:function(e,t){return n(a[e],a[t])}),m.forEach(function(e){v[e]={data:a[e],value:s=u[e],startAngle:c,endAngle:c+=s*g+d,padAngle:h}}),v}var t=Number,n=El,i=0,r=ja,o=0;return e.value=function(n){return arguments.length?(t=n,e):t},e.sort=function(t){return arguments.length?(n=t,e):n},e.startAngle=function(t){return arguments.length?(i=t,e):i},e.endAngle=function(t){return arguments.length?(r=t,e):r},e.padAngle=function(t){return arguments.length?(o=t,e):o},e};var El={};la.layout.stack=function(){function e(s,l){if(!(h=s.length))return s;var u=s.map(function(n,i){return t.call(e,n,i)}),c=u.map(function(t){return t.map(function(t,n){return[o.call(e,t,n),a.call(e,t,n)]})}),f=n.call(e,c,l);u=la.permute(u,f),c=la.permute(c,f);var h,d,p,g,m=i.call(e,c,l),v=u[0].length;for(p=0;p<v;++p)for(r.call(e,u[0][p],g=m[p],c[0][p][1]),d=1;d<h;++d)r.call(e,u[d][p],g+=c[d-1][p][1],c[d][p][1]);return s}var t=y,n=pr,i=gr,r=dr,o=fr,a=hr;return e.values=function(n){return arguments.length?(t=n,e):t},e.order=function(t){return arguments.length?(n="function"==typeof t?t:xl.get(t)||pr,e):n},e.offset=function(t){return arguments.length?(i="function"==typeof t?t:wl.get(t)||gr,e):i},e.x=function(t){return arguments.length?(o=t,e):o},e.y=function(t){return arguments.length?(a=t,e):a},e.out=function(t){return arguments.length?(r=t,e):r},e};var xl=la.map({"inside-out":function(e){var t,n,i=e.length,r=e.map(mr),o=e.map(vr),a=la.range(i).sort(function(e,t){return r[e]-r[t]}),s=0,l=0,u=[],c=[];for(t=0;t<i;++t)n=a[t],s<l?(s+=o[n],u.push(n)):(l+=o[n],c.push(n));return c.reverse().concat(u)},reverse:function(e){return la.range(e.length).reverse()},"default":pr}),wl=la.map({silhouette:function(e){var t,n,i,r=e.length,o=e[0].length,a=[],s=0,l=[];for(n=0;n<o;++n){for(t=0,i=0;t<r;t++)i+=e[t][n][1];i>s&&(s=i),a.push(i)}for(n=0;n<o;++n)l[n]=(s-a[n])/2;return l},wiggle:function(e){var t,n,i,r,o,a,s,l,u,c=e.length,f=e[0],h=f.length,d=[];for(d[0]=l=u=0,n=1;n<h;++n){for(t=0,r=0;t<c;++t)r+=e[t][n][1];for(t=0,o=0,s=f[n][0]-f[n-1][0];t<c;++t){for(i=0,a=(e[t][n][1]-e[t][n-1][1])/(2*s);i<t;++i)a+=(e[i][n][1]-e[i][n-1][1])/s;o+=a*e[t][n][1]}d[n]=l-=r?o/r*s:0,l<u&&(u=l)}for(n=0;n<h;++n)d[n]-=u;return d},expand:function(e){var t,n,i,r=e.length,o=e[0].length,a=1/r,s=[];for(n=0;n<o;++n){for(t=0,i=0;t<r;t++)i+=e[t][n][1];if(i)for(t=0;t<r;t++)e[t][n][1]/=i;else for(t=0;t<r;t++)e[t][n][1]=a}for(n=0;n<o;++n)s[n]=0;return s},zero:gr});la.layout.histogram=function(){function e(e,o){for(var a,s,l=[],u=e.map(n,this),c=i.call(this,u,o),f=r.call(this,c,u,o),o=-1,h=u.length,d=f.length-1,p=t?1:1/h;++o<d;)a=l[o]=[],a.dx=f[o+1]-(a.x=f[o]),a.y=0;if(d>0)for(o=-1;++o<h;)s=u[o],s>=c[0]&&s<=c[1]&&(a=l[la.bisect(f,s,1,d)-1],a.y+=p,a.push(e[o]));return l}var t=!0,n=Number,i=Er,r=br;return e.value=function(t){return arguments.length?(n=t,e):n},e.range=function(t){return arguments.length?(i=Ae(t),e):i},e.bins=function(t){return arguments.length?(r="number"==typeof t?function(e){return _r(e,t)}:Ae(t),e):r},e.frequency=function(n){return arguments.length?(t=!!n,e):t},e},la.layout.pack=function(){function e(e,o){var a=n.call(this,e,o),s=a[0],l=r[0],u=r[1],c=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(s.x=s.y=0,ar(s,function(e){e.r=+c(e.value)}),ar(s,Ar),i){var f=i*(t?1:Math.max(2*s.r/l,2*s.r/u))/2;ar(s,function(e){e.r+=f}),ar(s,Ar),ar(s,function(e){e.r-=f})}return Or(s,l/2,u/2,t?1:1/Math.max(2*s.r/l,2*s.r/u)),a}var t,n=la.layout.hierarchy().sort(xr),i=0,r=[1,1];return e.size=function(t){return arguments.length?(r=t,e):r},e.radius=function(n){return arguments.length?(t=null==n||"function"==typeof n?n:+n,e):t},e.padding=function(t){return arguments.length?(i=+t,e):i},rr(e,n)},la.layout.tree=function(){function e(e,r){var c=a.call(this,e,r),f=c[0],h=t(f);if(ar(h,n),h.parent.m=-h.z,or(h,i),u)or(f,o);else{var d=f,p=f,g=f;or(f,function(e){e.x<d.x&&(d=e),e.x>p.x&&(p=e),e.depth>g.depth&&(g=e)});var m=s(d,p)/2-d.x,v=l[0]/(p.x+s(p,d)/2+m),y=l[1]/(g.depth||1);or(f,function(e){e.x=(e.x+m)*v,e.y=e.depth*y})}return c}function t(e){for(var t,n={A:null,children:[e]},i=[n];null!=(t=i.pop());)for(var r,o=t.children,a=0,s=o.length;a<s;++a)i.push((o[a]=r={_:o[a],parent:t,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(e){var t=e.children,n=e.parent.children,i=e.i?n[e.i-1]:null;if(t.length){$r(e);var o=(t[0].z+t[t.length-1].z)/2;i?(e.z=i.z+s(e._,i._),e.m=e.z-o):e.z=o}else i&&(e.z=i.z+s(e._,i._));e.parent.A=r(e,i,e.parent.A||n[0])}function i(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function r(e,t,n){if(t){for(var i,r=e,o=e,a=t,l=r.parent.children[0],u=r.m,c=o.m,f=a.m,h=l.m;a=Dr(a),r=Mr(r),a&&r;)l=Mr(l),o=Dr(o),o.a=e,i=a.z+f-r.z-u+s(a._,r._),i>0&&(Lr(Rr(a,e,n),e,i),u+=i,c+=i),f+=a.m,u+=r.m,h+=l.m,c+=o.m;a&&!Dr(o)&&(o.t=a,o.m+=f-c),r&&!Mr(l)&&(l.t=r,l.m+=u-h,n=e)}return n}function o(e){e.x*=l[0],e.y=e.depth*l[1]}var a=la.layout.hierarchy().sort(null).value(null),s=Nr,l=[1,1],u=null;return e.separation=function(t){return arguments.length?(s=t,e):s},e.size=function(t){return arguments.length?(u=null==(l=t)?o:null,e):u?null:l},e.nodeSize=function(t){return arguments.length?(u=null==(l=t)?null:o,e):u?l:null},rr(e,a)},la.layout.cluster=function(){function e(e,o){var a,s=t.call(this,e,o),l=s[0],u=0;ar(l,function(e){var t=e.children;t&&t.length?(e.x=Fr(t),e.y=Pr(t)):(e.x=a?u+=n(e,a):0,e.y=0,a=e)});var c=Ur(l),f=jr(l),h=c.x-n(c,f)/2,d=f.x+n(f,c)/2;return ar(l,r?function(e){e.x=(e.x-l.x)*i[0],e.y=(l.y-e.y)*i[1]}:function(e){e.x=(e.x-h)/(d-h)*i[0],e.y=(1-(l.y?e.y/l.y:1))*i[1]}),s}var t=la.layout.hierarchy().sort(null).value(null),n=Nr,i=[1,1],r=!1;return e.separation=function(t){return arguments.length?(n=t,e):n},e.size=function(t){return arguments.length?(r=null==(i=t),e):r?null:i},e.nodeSize=function(t){return arguments.length?(r=null!=(i=t),e):r?i:null},rr(e,t)},la.layout.treemap=function(){function e(e,t){for(var n,i,r=-1,o=e.length;++r<o;)i=(n=e[r]).value*(t<0?0:t),n.area=isNaN(i)||i<=0?0:i}function t(n){var o=n.children;if(o&&o.length){var a,s,l,u=f(n),c=[],h=o.slice(),p=1/0,g="slice"===d?u.dx:"dice"===d?u.dy:"slice-dice"===d?1&n.depth?u.dy:u.dx:Math.min(u.dx,u.dy);for(e(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"!==d||(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(t)}}function n(t){var i=t.children;if(i&&i.length){var o,a=f(t),s=i.slice(),l=[];for(e(s,a.dx*a.dy/t.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(e,t){for(var n,i=e.area,r=0,o=1/0,a=-1,s=e.length;++a<s;)(n=e[a].area)&&(n<o&&(o=n),n>r&&(r=n));return i*=i,t*=t,i?Math.max(t*r*p/i,i/(t*o*p)):1/0}function r(e,t,n,i){var r,o=-1,a=e.length,s=n.x,u=n.y,c=t?l(e.area/t):0;if(t==n.dx){for((i||c>n.dy)&&(c=n.dy);++o<a;)r=e[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=e[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=o.y=0,o.value?(o.dx=u[0],o.dy=u[1]):o.dx=o.dy=0,a&&s.revalue(o),e([o],o.dx*o.dy/o.value),(a?n:t)(o),h&&(a=r),r}var a,s=la.layout.hierarchy(),l=Math.round,u=[1,1],c=null,f=Hr,h=!1,d="squarify",p=.5*(1+Math.sqrt(5));return o.size=function(e){return arguments.length?(u=e,o):u},o.padding=function(e){function t(t){var n=e.call(o,t,t.depth);return null==n?Hr(t):zr(t,"number"==typeof n?[n,n,n,n]:n)}function n(t){return zr(t,e)}if(!arguments.length)return c;var i;return f=null==(c=e)?Hr:"function"==(i=typeof e)?t:"number"===i?(e=[e,e,e,e],n):n,o},o.round=function(e){return arguments.length?(l=e?Math.round:Number,o):l!=Number},o.sticky=function(e){return arguments.length?(h=e,a=null,o):h},o.ratio=function(e){return arguments.length?(p=e,o):p},o.mode=function(e){return arguments.length?(d=e+"",o):d},rr(o,s)},la.random={normal:function(e,t){var n=arguments.length;return n<2&&(t=1),n<1&&(e=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 e+t*n*Math.sqrt(-2*Math.log(r)/r)}},logNormal:function(){var e=la.random.normal.apply(la,arguments);return function(){return Math.exp(e())}},bates:function(e){var t=la.random.irwinHall(e);return function(){return t()/e}},irwinHall:function(e){return function(){for(var t=0,n=0;n<e;n++)t+=Math.random();return t}}},la.scale={};var Tl={floor:y,ceil:y};la.scale.linear=function(){return Vr([0,1],[0,1],bi,!1)};var Sl={s:1,g:1,p:1,r:1,e:1};la.scale.log=function(){return io(la.scale.linear().domain([0,1]),10,!0,[1,10])};var Al=la.format(".0e"),Cl={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};la.scale.pow=function(){return ro(la.scale.linear(),1,[0,1])},la.scale.sqrt=function(){return la.scale.pow().exponent(.5)},la.scale.ordinal=function(){return ao([],{t:"range",a:[[]]})},la.scale.category10=function(){return la.scale.ordinal().range(kl)},la.scale.category20=function(){return la.scale.ordinal().range(Ol)},la.scale.category20b=function(){return la.scale.ordinal().range(Il)},la.scale.category20c=function(){return la.scale.ordinal().range(Nl)};var kl=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(be),Ol=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(be),Il=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(be),Nl=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(be);la.scale.quantile=function(){return so([],[])},la.scale.quantize=function(){return lo(0,1,[0,1])},la.scale.threshold=function(){return uo([.5],[0,1])},la.scale.identity=function(){return co([0,1])},la.svg={},la.svg.arc=function(){function e(){var e=Math.max(0,+n.apply(this,arguments)),u=Math.max(0,+i.apply(this,arguments)),c=a.apply(this,arguments)-za,f=s.apply(this,arguments)-za,h=Math.abs(f-c),d=c>f?0:1;if(u<e&&(p=u,u=e,e=p),h>=Ha)return t(u,d)+(e?t(e,1-d):"")+"Z";var p,g,m,v,y,b,_,E,x,w,T,S,A=0,C=0,k=[];if((v=(+l.apply(this,arguments)||0)/2)&&(m=o===Ml?Math.sqrt(e*e+u*u):+o.apply(this,arguments),d||(C*=-1),u&&(C=te(m/u*Math.sin(v))),e&&(A=te(m/e*Math.sin(v)))),u){y=u*Math.cos(c+C),b=u*Math.sin(c+C),_=u*Math.cos(f-C),E=u*Math.sin(f-C);var O=Math.abs(f-c-2*C)<=Ua?0:1;if(C&&yo(y,b,_,E)===d^O){var I=(c+f)/2;y=u*Math.cos(I),b=u*Math.sin(I),_=E=null}}else y=b=0;if(e){x=e*Math.cos(f-A),w=e*Math.sin(f-A),T=e*Math.cos(c+A),S=e*Math.sin(c+A);var N=Math.abs(c-f+2*A)<=Ua?0:1;if(A&&yo(x,w,T,S)===1-d^N){var M=(c+f)/2;x=e*Math.cos(M),w=e*Math.sin(M),T=S=null}}else x=w=0;if(h>Pa&&(p=Math.min(Math.abs(u-e)/2,+r.apply(this,arguments)))>.001){g=e<u^d?0:1;var D=p,L=p;if(h<Ua){var $=null==T?[x,w]:null==_?[y,b]:Ln([y,b],[T,S],[_,E],[x,w]),R=y-$[0],P=b-$[1],F=_-$[0],U=E-$[1],j=1/Math.sin(Math.acos((R*F+P*U)/(Math.sqrt(R*R+P*P)*Math.sqrt(F*F+U*U)))/2),H=Math.sqrt($[0]*$[0]+$[1]*$[1]);L=Math.min(p,(e-H)/(j-1)),D=Math.min(p,(u-H)/(j+1))}if(null!=_){var z=bo(null==T?[x,w]:[T,S],[y,b],u,D,d),B=bo([_,E],[x,w],u,D,d);p===D?k.push("M",z[0],"A",D,",",D," 0 0,",g," ",z[1],"A",u,",",u," 0 ",1-d^yo(z[1][0],z[1][1],B[1][0],B[1][1]),",",d," ",B[1],"A",D,",",D," 0 0,",g," ",B[0]):k.push("M",z[0],"A",D,",",D," 0 1,",g," ",B[0])}else k.push("M",y,",",b);if(null!=T){var q=bo([y,b],[T,S],e,-L,d),W=bo([x,w],null==_?[y,b]:[_,E],e,-L,d);p===L?k.push("L",W[0],"A",L,",",L," 0 0,",g," ",W[1],"A",e,",",e," 0 ",d^yo(W[1][0],W[1][1],q[1][0],q[1][1]),",",1-d," ",q[1],"A",L,",",L," 0 0,",g," ",q[0]):k.push("L",W[0],"A",L,",",L," 0 0,",g," ",q[0])}else k.push("L",x,",",w)}else k.push("M",y,",",b),null!=_&&k.push("A",u,",",u," 0 ",O,",",d," ",_,",",E),k.push("L",x,",",w),null!=T&&k.push("A",e,",",e," 0 ",N,",",1-d," ",T,",",S);return k.push("Z"),k.join("")}function t(e,t){return"M0,"+e+"A"+e+","+e+" 0 1,"+t+" 0,"+-e+"A"+e+","+e+" 0 1,"+t+" 0,"+e}var n=ho,i=po,r=fo,o=Ml,a=go,s=mo,l=vo;return e.innerRadius=function(t){return arguments.length?(n=Ae(t),e):n},e.outerRadius=function(t){return arguments.length?(i=Ae(t),e):i},e.cornerRadius=function(t){return arguments.length?(r=Ae(t),e):r},e.padRadius=function(t){return arguments.length?(o=t==Ml?Ml:Ae(t),e):o},e.startAngle=function(t){return arguments.length?(a=Ae(t),e):a},e.endAngle=function(t){return arguments.length?(s=Ae(t),e):s},e.padAngle=function(t){return arguments.length?(l=Ae(t),e):l},e.centroid=function(){var e=(+n.apply(this,arguments)+ +i.apply(this,arguments))/2,t=(+a.apply(this,arguments)+ +s.apply(this,arguments))/2-za;return[Math.cos(t)*e,Math.sin(t)*e]},e};var Ml="auto";la.svg.line=function(){return _o(y)};var Dl=la.map({linear:Eo,"linear-closed":xo,step:wo,"step-before":To,"step-after":So,basis:No,"basis-open":Mo,"basis-closed":Do,bundle:Lo,cardinal:ko,"cardinal-open":Ao,"cardinal-closed":Co,monotone:jo});Dl.forEach(function(e,t){t.key=e,t.closed=/-closed$/.test(e)});var Ll=[0,2/3,1/3,0],$l=[0,1/3,2/3,0],Rl=[0,1/6,2/3,1/6];la.svg.line.radial=function(){var e=_o(Ho);return e.radius=e.x,delete e.x,e.angle=e.y,delete e.y,e},To.reverse=So,So.reverse=To,la.svg.area=function(){return zo(y)},la.svg.area.radial=function(){var e=zo(Ho);return e.radius=e.x,delete e.x,e.innerRadius=e.x0,delete e.x0,e.outerRadius=e.x1,delete e.x1,e.angle=e.y,delete e.y,e.startAngle=e.y0,delete e.y0,e.endAngle=e.y1,delete e.y1,e},la.svg.chord=function(){function e(e,s){var l=t(this,o,e,s),u=t(this,a,e,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 t(e,t,n,i){var r=t.call(e,n,i),o=s.call(e,r,i),a=l.call(e,r,i)-za,c=u.call(e,r,i)-za;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(e,t){return e.a0==t.a0&&e.a1==t.a1}function i(e,t,n){return"A"+e+","+e+" 0 "+ +(n>Ua)+",1 "+t}function r(e,t,n,i){return"Q 0,0 "+i}var o=bn,a=_n,s=Bo,l=go,u=mo;return e.radius=function(t){return arguments.length?(s=Ae(t),e):s},e.source=function(t){return arguments.length?(o=Ae(t),e):o},e.target=function(t){return arguments.length?(a=Ae(t),e):a},e.startAngle=function(t){return arguments.length?(l=Ae(t),e):l},e.endAngle=function(t){return arguments.length?(u=Ae(t),e):u},e},la.svg.diagonal=function(){function e(e,r){var o=t.call(this,e,r),a=n.call(this,e,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 t=bn,n=_n,i=qo;return e.source=function(n){return arguments.length?(t=Ae(n),e):t},e.target=function(t){return arguments.length?(n=Ae(t),e):n},e.projection=function(t){return arguments.length?(i=t,e):i},e},la.svg.diagonal.radial=function(){var e=la.svg.diagonal(),t=qo,n=e.projection;return e.projection=function(e){return arguments.length?n(Wo(t=e)):t},e},la.svg.symbol=function(){function e(e,i){return(Pl.get(t.call(this,e,i))||Xo)(n.call(this,e,i))}var t=Go,n=Yo;return e.type=function(n){return arguments.length?(t=Ae(n),e):t},e.size=function(t){return arguments.length?(n=Ae(t),e):n},e};var Pl=la.map({circle:Xo,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*Ul)),n=t*Ul;return"M0,"+-t+"L"+n+",0 0,"+t+" "+-n+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/Fl),n=t*Fl/2;return"M0,"+n+"L"+t+","+-n+" "+-t+","+-n+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/Fl),n=t*Fl/2;return"M0,"+-n+"L"+t+","+n+" "+-t+","+n+"Z"}});la.svg.symbolTypes=Pl.keys();var Fl=Math.sqrt(3),Ul=Math.tan(30*Ba);Oa.transition=function(e){for(var t,n,i=jl||++ql,r=Jo(e),o=[],a=Hl||{time:Date.now(),ease:Ai,delay:0,duration:250},s=-1,l=this.length;++s<l;){o.push(t=[]);for(var u=this[s],c=-1,f=u.length;++c<f;)(n=u[c])&&ea(n,c,r,i,a),t.push(n)}return Ko(o,r,i)},Oa.interrupt=function(e){return this.each(null==e?zl:Vo(Jo(e)))};var jl,Hl,zl=Vo(Jo()),Bl=[],ql=0;Bl.call=Oa.call,Bl.empty=Oa.empty,Bl.node=Oa.node,Bl.size=Oa.size,la.transition=function(e,t){return e&&e.transition?jl?e.transition(t):e:la.selection().transition(e)},la.transition.prototype=Bl,Bl.select=function(e){var t,n,i,r=this.id,o=this.namespace,a=[];e=k(e);for(var s=-1,l=this.length;++s<l;){a.push(t=[]);for(var u=this[s],c=-1,f=u.length;++c<f;)(i=u[c])&&(n=e.call(i,i.__data__,c,s))?("__data__"in i&&(n.__data__=i.__data__),ea(n,c,o,r,i[o][r]),t.push(n)):t.push(null)}return Ko(a,o,r)},Bl.selectAll=function(e){var t,n,i,r,o,a=this.id,s=this.namespace,l=[];e=O(e);for(var u=-1,c=this.length;++u<c;)for(var f=this[u],h=-1,d=f.length;++h<d;)if(i=f[h]){o=i[s][a],n=e.call(i,i.__data__,h,u),l.push(t=[]);for(var p=-1,g=n.length;++p<g;)(r=n[p])&&ea(r,p,s,a,o),t.push(r)}return Ko(l,s,a)},Bl.filter=function(e){var t,n,i,r=[];"function"!=typeof e&&(e=H(e));for(var o=0,a=this.length;o<a;o++){r.push(t=[]);for(var n=this[o],s=0,l=n.length;s<l;s++)(i=n[s])&&e.call(i,i.__data__,s,o)&&t.push(i)}return Ko(r,this.namespace,this.id)},Bl.tween=function(e,t){var n=this.id,i=this.namespace;return arguments.length<2?this.node()[i][n].tween.get(e):B(this,null==t?function(t){t[i][n].tween.remove(e)}:function(r){r[i][n].tween.set(e,t)})},Bl.attr=function(e,t){function n(){this.removeAttribute(s)}function i(){this.removeAttributeNS(s.space,s.local)}function r(e){return null==e?n:(e+="",function(){var t,n=this.getAttribute(s);return n!==e&&(t=a(n,e),function(e){this.setAttribute(s,t(e))})})}function o(e){return null==e?i:(e+="",function(){var t,n=this.getAttributeNS(s.space,s.local);return n!==e&&(t=a(n,e),function(e){this.setAttributeNS(s.space,s.local,t(e))})})}if(arguments.length<2){for(t in e)this.attr(t,e[t]);return this}var a="transform"==e?Gi:bi,s=la.ns.qualify(e);return Zo(this,"attr."+e,t,s.local?o:r)},Bl.attrTween=function(e,t){function n(e,n){var i=t.call(this,e,n,this.getAttribute(r));return i&&function(e){this.setAttribute(r,i(e))}}function i(e,n){var i=t.call(this,e,n,this.getAttributeNS(r.space,r.local));return i&&function(e){this.setAttributeNS(r.space,r.local,i(e))}}var r=la.ns.qualify(e);return this.tween("attr."+e,r.local?i:n)},Bl.style=function(e,n,i){function r(){this.style.removeProperty(e)}function o(n){return null==n?r:(n+="",function(){var r,o=t(this).getComputedStyle(this,null).getPropertyValue(e);return o!==n&&(r=bi(o,n),function(t){this.style.setProperty(e,r(t),i)})})}var a=arguments.length;if(a<3){if("string"!=typeof e){a<2&&(n="");for(i in e)this.style(i,e[i],n);return this}i=""}return Zo(this,"style."+e,n,o)},Bl.styleTween=function(e,n,i){function r(r,o){var a=n.call(this,r,o,t(this).getComputedStyle(this,null).getPropertyValue(e));return a&&function(t){this.style.setProperty(e,a(t),i)}}return arguments.length<3&&(i=""),this.tween("style."+e,r)},Bl.text=function(e){return Zo(this,"text",e,Qo)},Bl.remove=function(){var e=this.namespace;return this.each("end.transition",function(){var t;this[e].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Bl.ease=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].ease:("function"!=typeof e&&(e=la.ease.apply(la,arguments)),B(this,function(i){i[n][t].ease=e}))},Bl.delay=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].delay:B(this,"function"==typeof e?function(i,r,o){i[n][t].delay=+e.call(i,i.__data__,r,o)}:(e=+e,function(i){i[n][t].delay=e}))},Bl.duration=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].duration:B(this,"function"==typeof e?function(i,r,o){i[n][t].duration=Math.max(1,e.call(i,i.__data__,r,o))}:(e=Math.max(1,e),function(i){i[n][t].duration=e}))},Bl.each=function(e,t){var n=this.id,i=this.namespace;if(arguments.length<2){var r=Hl,o=jl;try{jl=n,B(this,function(t,r,o){Hl=t[i][n],e.call(t,t.__data__,r,o)})}finally{Hl=r,jl=o}}else B(this,function(r){var o=r[i][n];(o.event||(o.event=la.dispatch("start","end","interrupt"))).on(e,t)});return this},Bl.transition=function(){for(var e,t,n,i,r=this.id,o=++ql,a=this.namespace,s=[],l=0,u=this.length;l<u;l++){s.push(e=[]);for(var t=this[l],c=0,f=t.length;c<f;c++)(n=t[c])&&(i=n[a][r],ea(n,c,a,o,{time:i.time,ease:i.ease,delay:i.delay+i.duration,duration:i.duration})),e.push(n)}return Ko(s,a,o)},la.svg.axis=function(){function e(e){e.each(function(){var e,u=la.select(this),c=this.__chart__||n,f=this.__chart__=n.copy(),h=null==l?f.ticks?f.ticks.apply(f,s):f.domain():l,d=null==t?f.tickFormat?f.tickFormat.apply(f,s):y:t,p=u.selectAll(".tick").data(h,f),g=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Pa),m=la.transition(p.exit()).style("opacity",Pa).remove(),v=la.transition(p.order()).style("opacity",1),b=Math.max(r,0)+a,_=qr(f),E=u.selectAll(".domain").data([0]),x=(E.enter().append("path").attr("class","domain"),la.transition(E));g.append("line"),g.append("text");var w,T,S,A,C=g.select("line"),k=v.select("line"),O=p.select("text").text(d),I=g.select("text"),N=v.select("text"),M="top"===i||"left"===i?-1:1;if("bottom"===i||"top"===i?(e=ta,w="x",S="y",T="x2",A="y2",O.attr("dy",M<0?"0em":".71em").style("text-anchor","middle"),x.attr("d","M"+_[0]+","+M*o+"V0H"+_[1]+"V"+M*o)):(e=na,w="y",S="x",T="y2",A="x2",O.attr("dy",".32em").style("text-anchor",M<0?"end":"start"),x.attr("d","M"+M*o+","+_[0]+"H0V"+_[1]+"H"+M*o)),C.attr(A,M*r),I.attr(S,M*b),k.attr(T,0).attr(A,M*r),N.attr(w,0).attr(S,M*b),f.rangeBand){var D=f,L=D.rangeBand()/2;c=f=function(e){return D(e)+L}}else c.rangeBand?c=f:m.call(e,f,c);g.call(e,c,f),v.call(e,f,f)})}var t,n=la.scale.linear(),i=Wl,r=6,o=6,a=3,s=[10],l=null;return e.scale=function(t){return arguments.length?(n=t,e):n},e.orient=function(t){return arguments.length?(i=t in Yl?t+"":Wl,e):i},e.ticks=function(){return arguments.length?(s=ca(arguments),e):s},e.tickValues=function(t){return arguments.length?(l=t,e):l},e.tickFormat=function(n){return arguments.length?(t=n,e):t},e.tickSize=function(t){var n=arguments.length;return n?(r=+t,o=+arguments[n-1],e):r},e.innerTickSize=function(t){return arguments.length?(r=+t,e):r},e.outerTickSize=function(t){return arguments.length?(o=+t,e):o},e.tickPadding=function(t){return arguments.length?(a=+t,e):a},e.tickSubdivide=function(){return arguments.length&&e},e};var Wl="bottom",Yl={top:1,right:1,bottom:1,left:1};la.svg.brush=function(){function e(t){t.each(function(){var t=la.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",o).on("touchstart.brush",o),a=t.selectAll(".background").data([0]);a.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var s=t.selectAll(".resize").data(g,y);s.exit().remove(),s.enter().append("g").attr("class",function(e){return"resize "+e}).style("cursor",function(e){return Gl[e]}).append("rect").attr("x",function(e){return/[ew]$/.test(e)?-3:null}).attr("y",function(e){return/^[ns]/.test(e)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),s.style("display",e.empty()?"none":null);var l,f=la.transition(t),h=la.transition(a);u&&(l=qr(u),h.attr("x",l[0]).attr("width",l[1]-l[0]),i(f)),c&&(l=qr(c),h.attr("y",l[0]).attr("height",l[1]-l[0]),r(f)),n(f)})}function n(e){e.selectAll(".resize").attr("transform",function(e){return"translate("+f[+/e$/.test(e)]+","+h[+/^s/.test(e)]+")"})}function i(e){e.select(".extent").attr("x",f[0]),e.selectAll(".extent,.n>rect,.s>rect").attr("width",f[1]-f[0])}function r(e){e.select(".extent").attr("y",h[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function o(){function o(){32==la.event.keyCode&&(O||(b=null,N[0]-=f[1],N[1]-=h[1],O=2),T())}function g(){32==la.event.keyCode&&2==O&&(N[0]+=f[1],N[1]+=h[1],O=0,T())}function m(){var e=la.mouse(E),t=!1;_&&(e[0]+=_[0],e[1]+=_[1]),O||(la.event.altKey?(b||(b=[(f[0]+f[1])/2,(h[0]+h[1])/2]),
N[0]=f[+(e[0]<b[0])],N[1]=h[+(e[1]<b[1])]):b=null),C&&v(e,u,0)&&(i(S),t=!0),k&&v(e,c,1)&&(r(S),t=!0),t&&(n(S),w({type:"brush",mode:O?"move":"resize"}))}function v(e,t,n){var i,r,o=qr(t),l=o[0],u=o[1],c=N[n],g=n?h:f,m=g[1]-g[0];if(O&&(l-=c,u-=m+c),i=(n?p:d)?Math.max(l,Math.min(u,e[n])):e[n],O?r=(i+=c)+m:(b&&(c=Math.max(l,Math.min(u,2*b[n]-i))),c<i?(r=i,i=c):r=c),g[0]!=i||g[1]!=r)return n?s=null:a=null,g[0]=i,g[1]=r,!0}function y(){m(),S.style("pointer-events","all").selectAll(".resize").style("display",e.empty()?"none":null),la.select("body").style("cursor",null),M.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),I(),w({type:"brushend"})}var b,_,E=this,x=la.select(la.event.target),w=l.of(E,arguments),S=la.select(E),A=x.datum(),C=!/^(n|s)$/.test(A)&&u,k=!/^(e|w)$/.test(A)&&c,O=x.classed("extent"),I=V(E),N=la.mouse(E),M=la.select(t(E)).on("keydown.brush",o).on("keyup.brush",g);if(la.event.changedTouches?M.on("touchmove.brush",m).on("touchend.brush",y):M.on("mousemove.brush",m).on("mouseup.brush",y),S.interrupt().selectAll("*").interrupt(),O)N[0]=f[0]-N[0],N[1]=h[0]-N[1];else if(A){var D=+/w$/.test(A),L=+/^n/.test(A);_=[f[1-D]-N[0],h[1-L]-N[1]],N[0]=f[D],N[1]=h[L]}else la.event.altKey&&(b=N.slice());S.style("pointer-events","none").selectAll(".resize").style("display",null),la.select("body").style("cursor",x.style("cursor")),w({type:"brushstart"}),m()}var a,s,l=A(e,"brushstart","brush","brushend"),u=null,c=null,f=[0,0],h=[0,0],d=!0,p=!0,g=Xl[0];return e.event=function(e){e.each(function(){var e=l.of(this,arguments),t={x:f,y:h,i:a,j:s},n=this.__chart__||t;this.__chart__=t,jl?la.select(this).transition().each("start.brush",function(){a=n.i,s=n.j,f=n.x,h=n.y,e({type:"brushstart"})}).tween("brush:brush",function(){var n=_i(f,t.x),i=_i(h,t.y);return a=s=null,function(r){f=t.x=n(r),h=t.y=i(r),e({type:"brush",mode:"resize"})}}).each("end.brush",function(){a=t.i,s=t.j,e({type:"brush",mode:"resize"}),e({type:"brushend"})}):(e({type:"brushstart"}),e({type:"brush",mode:"resize"}),e({type:"brushend"}))})},e.x=function(t){return arguments.length?(u=t,g=Xl[!u<<1|!c],e):u},e.y=function(t){return arguments.length?(c=t,g=Xl[!u<<1|!c],e):c},e.clamp=function(t){return arguments.length?(u&&c?(d=!!t[0],p=!!t[1]):u?d=!!t:c&&(p=!!t),e):u&&c?[d,p]:u?d:c?p:null},e.extent=function(t){var n,i,r,o,l;return arguments.length?(u&&(n=t[0],i=t[1],c&&(n=n[0],i=i[0]),a=[n,i],u.invert&&(n=u(n),i=u(i)),i<n&&(l=n,n=i,i=l),n==f[0]&&i==f[1]||(f=[n,i])),c&&(r=t[0],o=t[1],u&&(r=r[1],o=o[1]),s=[r,o],c.invert&&(r=c(r),o=c(o)),o<r&&(l=r,r=o,o=l),r==h[0]&&o==h[1]||(h=[r,o])),e):(u&&(a?(n=a[0],i=a[1]):(n=f[0],i=f[1],u.invert&&(n=u.invert(n),i=u.invert(i)),i<n&&(l=n,n=i,i=l))),c&&(s?(r=s[0],o=s[1]):(r=h[0],o=h[1],c.invert&&(r=c.invert(r),o=c.invert(o)),o<r&&(l=r,r=o,o=l))),u&&c?[[n,r],[i,o]]:u?[n,i]:c&&[r,o])},e.clear=function(){return e.empty()||(f=[0,0],h=[0,0],a=s=null),e},e.empty=function(){return!!u&&f[0]==f[1]||!!c&&h[0]==h[1]},la.rebind(e,l,"on")};var Gl={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Xl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Vl=ps.format=_s.timeFormat,Kl=Vl.utc,Zl=Kl("%Y-%m-%dT%H:%M:%S.%LZ");Vl.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?ia:Zl,ia.parse=function(e){var t=new Date(e);return isNaN(t)?null:t},ia.toString=Zl.toString,ps.second=je(function(e){return new gs(1e3*Math.floor(e/1e3))},function(e,t){e.setTime(e.getTime()+1e3*Math.floor(t))},function(e){return e.getSeconds()}),ps.seconds=ps.second.range,ps.seconds.utc=ps.second.utc.range,ps.minute=je(function(e){return new gs(6e4*Math.floor(e/6e4))},function(e,t){e.setTime(e.getTime()+6e4*Math.floor(t))},function(e){return e.getMinutes()}),ps.minutes=ps.minute.range,ps.minutes.utc=ps.minute.utc.range,ps.hour=je(function(e){var t=e.getTimezoneOffset()/60;return new gs(36e5*(Math.floor(e/36e5-t)+t))},function(e,t){e.setTime(e.getTime()+36e5*Math.floor(t))},function(e){return e.getHours()}),ps.hours=ps.hour.range,ps.hours.utc=ps.hour.utc.range,ps.month=je(function(e){return e=ps.day(e),e.setDate(1),e},function(e,t){e.setMonth(e.getMonth()+t)},function(e){return e.getMonth()}),ps.months=ps.month.range,ps.months.utc=ps.month.utc.range;var Ql=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Jl=[[ps.second,1],[ps.second,5],[ps.second,15],[ps.second,30],[ps.minute,1],[ps.minute,5],[ps.minute,15],[ps.minute,30],[ps.hour,1],[ps.hour,3],[ps.hour,6],[ps.hour,12],[ps.day,1],[ps.day,2],[ps.week,1],[ps.month,1],[ps.month,3],[ps.year,1]],eu=Vl.multi([[".%L",function(e){return e.getMilliseconds()}],[":%S",function(e){return e.getSeconds()}],["%I:%M",function(e){return e.getMinutes()}],["%I %p",function(e){return e.getHours()}],["%a %d",function(e){return e.getDay()&&1!=e.getDate()}],["%b %d",function(e){return 1!=e.getDate()}],["%B",function(e){return e.getMonth()}],["%Y",Ot]]),tu={range:function(e,t,n){return la.range(Math.ceil(e/n)*n,+t,n).map(oa)},floor:y,ceil:y};Jl.year=ps.year,ps.scale=function(){return ra(la.scale.linear(),Jl,eu)};var nu=Jl.map(function(e){return[e[0].utc,e[1]]}),iu=Kl.multi([[".%L",function(e){return e.getUTCMilliseconds()}],[":%S",function(e){return e.getUTCSeconds()}],["%I:%M",function(e){return e.getUTCMinutes()}],["%I %p",function(e){return e.getUTCHours()}],["%a %d",function(e){return e.getUTCDay()&&1!=e.getUTCDate()}],["%b %d",function(e){return 1!=e.getUTCDate()}],["%B",function(e){return e.getUTCMonth()}],["%Y",Ot]]);nu.year=ps.year.utc,ps.scale.utc=function(){return ra(la.scale.linear(),nu,iu)},la.text=Ce(function(e){return e.responseText}),la.json=function(e,t){return ke(e,"application/json",aa,t)},la.html=function(e,t){return ke(e,"text/html",sa,t)},la.xml=Ce(function(e){return e.responseXML}),"function"==typeof define&&define.amd?(this.d3=la,define(la)):"object"==typeof module&&module.exports?module.exports=la:this.d3=la}(),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.vg=e()}}(function(){var e;return function t(e,n,i){function r(a,s){if(!n[a]){if(!e[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[a]={exports:{}};e[a][0].call(c.exports,function(t){var n=e[a][1][t];return r(n?n:t)},c,c.exports,t,e,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(e,t,n){t.exports={version:"2.6.3",dataflow:e("vega-dataflow"),parse:e("./src/parse/"),scene:{Bounder:e("./src/scene/Bounder"),Builder:e("./src/scene/Builder"),Encoder:e("./src/scene/Encoder"),GroupBuilder:e("./src/scene/GroupBuilder"),visit:e("./src/scene/visit")},transforms:e("./src/transforms"),Transform:e("./src/transforms/Transform"),BatchTransform:e("./src/transforms/BatchTransform"),Parameter:e("./src/transforms/Parameter"),schema:e("./src/core/schema"),config:e("./src/core/config"),util:e("./src/util"),logging:e("vega-logging"),debug:e("vega-logging").debug}},{"./src/core/config":91,"./src/core/schema":92,"./src/parse/":97,"./src/scene/Bounder":109,"./src/scene/Builder":110,"./src/scene/Encoder":111,"./src/scene/GroupBuilder":112,"./src/scene/visit":117,"./src/transforms":145,"./src/transforms/BatchTransform":119,"./src/transforms/Parameter":135,"./src/transforms/Transform":140,"./src/util":148,"vega-dataflow":41,"vega-logging":48}],2:[function(e,t,n){},{}],3:[function(t,n,i){!function(t,r){"object"==typeof i&&"undefined"!=typeof n?r(i):"function"==typeof e&&e.amd?e(["exports"],r):r(t.d3_dsv={})}(this,function(e){"use strict";function t(e){return new o(e)}function n(e){return new Function("d","return {"+e.map(function(e,t){return JSON.stringify(e)+": d["+t+"]"}).join(",")+"}")}function i(e,t){var i=n(e);return function(n,r){return t(i(n),r,e)}}function r(e){var t=Object.create(null),n=[];return e.forEach(function(e){for(var i in e)i in t||n.push(t[i]=i)}),n}function o(e){function t(t){return t.map(o).join(e)}function o(e){return a.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}var a=new RegExp('["'+e+"\n]"),s=e.charCodeAt(0);this.parse=function(e,t){var r,o,a=this.parseRows(e,function(e,a){return r?r(e,a-1):(o=e,void(r=t?i(e,t):n(e)))});return a.columns=o,a},this.parseRows=function(e,t){function n(){if(c>=u)return a;if(r)return r=!1,o;var t,n=c;if(34===e.charCodeAt(n)){for(var i=n;i++<u;)if(34===e.charCodeAt(i)){if(34!==e.charCodeAt(i+1))break;++i}return c=i+2,t=e.charCodeAt(i+1),13===t?(r=!0,10===e.charCodeAt(i+2)&&++c):10===t&&(r=!0),e.slice(n+1,i).replace(/""/g,'"')}for(;c<u;){var l=1;if(t=e.charCodeAt(c++),10===t)r=!0;else if(13===t)r=!0,10===e.charCodeAt(c)&&(++c,++l);else if(t!==s)continue;return e.slice(n,c-l)}return e.slice(n)}for(var i,r,o={},a={},l=[],u=e.length,c=0,f=0;(i=n())!==a;){for(var h=[];i!==o&&i!==a;)h.push(i),i=n();t&&null==(h=t(h,f++))||l.push(h)}return l},this.format=function(t,n){return null==n&&(n=r(t)),[n.map(o).join(e)].concat(t.map(function(t){return n.map(function(e){return o(t[e])}).join(e)})).join("\n")},this.formatRows=function(e){return e.map(t).join("\n")}}t.prototype=o.prototype;var a=t(","),s=t("\t"),l="0.1.14";e.version=l,e.dsv=t,e.csv=a,e.tsv=s})},{}],4:[function(t,n,i){!function(t,r){"object"==typeof i&&"undefined"!=typeof n?r(i):"function"==typeof e&&e.amd?e("d3-format",["exports"],r):r(t.d3_format={})}(this,function(e){"use strict";function t(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,i=e.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+e.slice(n+1)]}function n(e){return e=t(Math.abs(e)),e?e[1]:NaN}function i(e,t){return function(n,i){for(var r=n.length,o=[],a=0,s=e[0],l=0;r>0&&s>0&&(l+s+1>i&&(s=Math.max(1,i-l)),o.push(n.substring(r-=s,r+s)),!((l+=s+1)>i));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function r(e,n){var i=t(e,n);if(!i)return e+"";var r=i[0],o=i[1],a=o-(p=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,s=r.length;return a===s?r:a>s?r+new Array(a-s+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+t(e,Math.max(0,n+a-1))[0]}function o(e,n){var i=t(e,n);if(!i)return e+"";var r=i[0],o=i[1];return o<0?"0."+new Array((-o)).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}function a(e,t){e=e.toPrecision(t);e:for(var n,i=e.length,r=1,o=-1;r<i;++r)switch(e[r]){case".":o=n=r;break;case"0":0===o&&(o=r),n=r;break;case"e":break e;default:o>0&&(o=0)}return o>0?e.slice(0,o)+e.slice(n+1):e}function s(e){return new l(e)}function l(e){if(!(t=m.exec(e)))throw new Error("invalid format: "+e);var t,n=t[1]||" ",i=t[2]||">",r=t[3]||"-",o=t[4]||"",a=!!t[5],s=t[6]&&+t[6],l=!!t[7],u=t[8]&&+t[8].slice(1),c=t[9]||"";"n"===c?(l=!0,c="g"):g[c]||(c=""),(a||"0"===n&&"="===i)&&(a=!0,n="0",i="="),this.fill=n,this.align=i,this.sign=r,this.symbol=o,this.zero=a,this.width=s,this.comma=l,this.precision=u,this.type=c}function u(e){return e}function c(e){function t(e){e=s(e);var t=e.fill,n=e.align,i=e.sign,r=e.symbol,u=e.zero,c=e.width,f=e.comma,h=e.precision,d=e.type,m="$"===r?a[0]:"#"===r&&/[boxX]/.test(d)?"0"+d.toLowerCase():"",y="$"===r?a[1]:/[%p]/.test(d)?"%":"",b=g[d],_=!d||/[defgprs%]/.test(d);return h=null==h?d?6:12:/[gprs]/.test(d)?Math.max(1,Math.min(21,h)):Math.max(0,Math.min(20,h)),function(e){var r=m,a=y;if("c"===d)a=b(e)+a,e="";else{e=+e;var s=(e<0||1/e<0)&&(e*=-1,!0);if(e=b(e,h),s){var g,E=-1,x=e.length;for(s=!1;++E<x;)if(g=e.charCodeAt(E),48<g&&g<58||"x"===d&&96<g&&g<103||"X"===d&&64<g&&g<71){s=!0;break}}if(r=(s?"("===i?i:"-":"-"===i||"("===i?"":i)+r,a=a+("s"===d?v[8+p/3]:"")+(s&&"("===i?")":""),_)for(var g,E=-1,x=e.length;++E<x;)if(g=e.charCodeAt(E),48>g||g>57){a=(46===g?l+e.slice(E+1):e.slice(E))+a,e=e.slice(0,E);break}}f&&!u&&(e=o(e,1/0));var w=r.length+e.length+a.length,T=w<c?new Array(c-w+1).join(t):"";switch(f&&u&&(e=o(T+e,T.length?c-a.length:1/0),T=""),n){case"<":return r+e+a+T;case"=":return r+T+e+a;case"^":return T.slice(0,w=T.length>>1)+r+e+a+T.slice(w)}return T+r+e+a}}function r(e,i){var r=t((e=s(e),e.type="f",e)),o=3*Math.max(-8,Math.min(8,Math.floor(n(i)/3))),a=Math.pow(10,-o),l=v[8+o/3];return function(e){return r(a*e)+l}}var o=e.grouping&&e.thousands?i(e.grouping,e.thousands):u,a=e.currency,l=e.decimal;return{format:t,formatPrefix:r}}function f(e){return Math.max(0,-n(Math.abs(e)))}function h(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(n(t)/3)))-n(Math.abs(e)))}function d(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,n(t)-n(e))+1}var p,g={"":a,"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return o(100*e,t)},r:o,s:r,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}},m=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;l.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+this.type};var v=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],y=c({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),b=c({decimal:",",thousands:".",grouping:[3],currency:[""," €"]}),_=c({decimal:",",thousands:" ",grouping:[3],currency:[""," Kč"]}),E=c({decimal:",",thousands:"'",grouping:[3],currency:[""," CHF"]}),x=c({decimal:",",thousands:".",grouping:[3],currency:[""," €"]}),w=c({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),T=c({decimal:".",thousands:",",grouping:[3],currency:["£",""]}),S=c({decimal:",",thousands:".",grouping:[3],currency:[""," €"]}),A=c({decimal:",",thousands:" ",grouping:[3],currency:[""," €"]}),C=c({decimal:",",thousands:" ",grouping:[3],currency:["","$"]}),k=c({decimal:",",thousands:".",grouping:[3],currency:[""," €"]}),O=c({decimal:".",thousands:",",grouping:[3],currency:["₪",""]}),I=c({decimal:",",thousands:" ",grouping:[3],currency:[""," Ft"]}),N=c({decimal:",",thousands:".",grouping:[3],currency:["€",""]}),M=c({decimal:".",thousands:",",grouping:[3],currency:["","円"]}),D=c({decimal:".",thousands:",",grouping:[3],currency:["₩",""]}),L=c({decimal:",",thousands:".",grouping:[3],currency:[""," ден."]}),$=c({decimal:",",thousands:".",grouping:[3],currency:["€ ",""]}),R=c({decimal:",",thousands:".",grouping:[3],currency:["","zł"]}),P=c({decimal:",",thousands:".",grouping:[3],currency:["R$",""]}),F=c({decimal:",",thousands:" ",grouping:[3],currency:[""," руб."]}),U=c({decimal:",",thousands:" ",grouping:[3],currency:["","SEK"]}),j=c({decimal:".",thousands:",",grouping:[3],currency:["¥",""]}),H=y.format,z=y.formatPrefix,B="0.4.2";e.version=B,e.format=H,e.formatPrefix=z,e.locale=c,e.localeCaEs=b,e.localeCsCz=_,e.localeDeCh=E,e.localeDeDe=x,e.localeEnCa=w,e.localeEnGb=T,e.localeEnUs=y,e.localeEsEs=S,e.localeFiFi=A,e.localeFrCa=C,e.localeFrFr=k,e.localeHeIl=O,e.localeHuHu=I,e.localeItIt=N,e.localeJaJp=M,e.localeKoKr=D,e.localeMkMk=L,e.localeNlNl=$,e.localePlPl=R,e.localePtBr=P,e.localeRuRu=F,e.localeSvSe=U,e.localeZhCn=j,e.formatSpecifier=s,e.precisionFixed=f,e.precisionPrefix=h,e.precisionRound=d})},{}],5:[function(t,n,i){!function(r,o){"object"==typeof i&&"undefined"!=typeof n?o(i,t("d3-time")):"function"==typeof e&&e.amd?e("d3-time-format",["exports","d3-time"],o):o(r.d3_time_format={},r.d3_time)}(this,function(e,t){"use strict";function n(e){if(0<=e.y&&e.y<100){var t=new Date((-1),e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function i(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function r(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}function o(e){function t(e,t){return function(n){var i,r,o,a=[],s=-1,l=0,u=e.length;for(n instanceof Date||(n=new Date((+n)));++s<u;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(r=ee[i=e.charAt(++s)])?i=e.charAt(++s):r="e"===i?" ":"0",(o=t[i])&&(i=o(n,r)),a.push(i),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function o(e,t){return function(n){var o=r(1900),s=a(o,e,n+="",0);if(s!=n.length)return null;if("p"in o&&(o.H=o.H%12+12*o.p),"W"in o||"U"in o){"w"in o||(o.w="W"in o?1:0);var l="Z"in o?i(r(o.y)).getUTCDay():t(r(o.y)).getDay();o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(l+5)%7:o.w+7*o.U-(l+6)%7}return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,i(o)):t(o)}}function a(e,t,n,i){for(var r,o,a=0,s=t.length,l=n.length;a<s;){if(i>=l)return-1;if(r=t.charCodeAt(a++),37===r){if(r=t.charAt(a++),o=Pe[r in ee?t.charAt(a++):r],!o||(i=o(e,n,i))<0)return-1}else if(r!=n.charCodeAt(i++))return-1}return i}function s(e,t,n){var i=Se.exec(t.slice(n));return i?(e.p=Ae[i[0].toLowerCase()],n+i[0].length):-1}function J(e,t,n){var i=Oe.exec(t.slice(n));return i?(e.w=Ie[i[0].toLowerCase()],n+i[0].length):-1}function te(e,t,n){var i=Ce.exec(t.slice(n));return i?(e.w=ke[i[0].toLowerCase()],n+i[0].length):-1}function ne(e,t,n){var i=De.exec(t.slice(n));return i?(e.m=Le[i[0].toLowerCase()],n+i[0].length):-1}function ie(e,t,n){var i=Ne.exec(t.slice(n));return i?(e.m=Me[i[0].toLowerCase()],n+i[0].length):-1}function re(e,t,n){return a(e,ve,t,n)}function oe(e,t,n){return a(e,ye,t,n)}function ae(e,t,n){return a(e,be,t,n)}function se(e){return xe[e.getDay()]}function le(e){return Ee[e.getDay()]}function ue(e){return Te[e.getMonth()]}function ce(e){return we[e.getMonth()]}function fe(e){return _e[+(e.getHours()>=12)]}function he(e){return xe[e.getUTCDay()]}function de(e){return Ee[e.getUTCDay()]}function pe(e){return Te[e.getUTCMonth()]}function ge(e){return we[e.getUTCMonth()]}function me(e){return _e[+(e.getUTCHours()>=12)]}var ve=e.dateTime,ye=e.date,be=e.time,_e=e.periods,Ee=e.days,xe=e.shortDays,we=e.months,Te=e.shortMonths,Se=l(_e),Ae=u(_e),Ce=l(Ee),ke=u(Ee),Oe=l(xe),Ie=u(xe),Ne=l(we),Me=u(we),De=l(Te),Le=u(Te),$e={a:se,A:le,b:ue,B:ce,c:null,d:T,e:T,H:S,I:A,j:C,L:k,m:O,M:I,p:fe,S:N,U:M,w:D,W:L,x:null,X:null,y:$,Y:R,Z:P,"%":Q},Re={a:he,A:de,b:pe,B:ge,c:null,d:F,e:F,H:U,I:j,j:H,L:z,m:B,M:q,p:me,S:W,U:Y,w:G,W:X,x:null,X:null,y:V,Y:K,Z:Z,"%":Q},Pe={a:J,A:te,b:ne,B:ie,c:re,d:v,e:v,H:b,I:b,j:y,L:x,m:m,M:_,p:s,S:E,U:f,w:c,W:h,x:oe,X:ae,y:p,Y:d,Z:g,"%":w};return $e.x=t(ye,$e),$e.X=t(be,$e),$e.c=t(ve,$e),Re.x=t(ye,Re),Re.X=t(be,Re),Re.c=t(ve,Re),{format:function(e){var i=t(e+="",$e);return i.parse=o(e,n),i.toString=function(){return e},i},utcFormat:function(e){var n=t(e+="",Re);return n.parse=o(e,i),n.toString=function(){return e},n}}}function a(e,t,n){var i=e<0?"-":"",r=(i?-e:e)+"",o=r.length;return i+(o<n?new Array(n-o+1).join(t)+r:r)}function s(e){return e.replace(ie,"\\$&")}function l(e){return new RegExp("^(?:"+e.map(s).join("|")+")","i")}function u(e){for(var t={},n=-1,i=e.length;++n<i;)t[e[n].toLowerCase()]=n;return t}function c(e,t,n){var i=te.exec(t.slice(n,n+1));return i?(e.w=+i[0],n+i[0].length):-1}function f(e,t,n){var i=te.exec(t.slice(n));return i?(e.U=+i[0],n+i[0].length):-1}function h(e,t,n){var i=te.exec(t.slice(n));return i?(e.W=+i[0],n+i[0].length):-1}function d(e,t,n){var i=te.exec(t.slice(n,n+4));return i?(e.y=+i[0],n+i[0].length):-1}function p(e,t,n){var i=te.exec(t.slice(n,n+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function g(e,t,n){var i=/^(Z)|([+-]\d\d)(?:\:?(\d\d))?/.exec(t.slice(n,n+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function m(e,t,n){var i=te.exec(t.slice(n,n+2));return i?(e.m=i[0]-1,n+i[0].length):-1}function v(e,t,n){var i=te.exec(t.slice(n,n+2));return i?(e.d=+i[0],n+i[0].length):-1}function y(e,t,n){var i=te.exec(t.slice(n,n+3));return i?(e.m=0,e.d=+i[0],n+i[0].length):-1}function b(e,t,n){var i=te.exec(t.slice(n,n+2));return i?(e.H=+i[0],n+i[0].length):-1}function _(e,t,n){var i=te.exec(t.slice(n,n+2));return i?(e.M=+i[0],n+i[0].length):-1}function E(e,t,n){var i=te.exec(t.slice(n,n+2));return i?(e.S=+i[0],n+i[0].length):-1}function x(e,t,n){var i=te.exec(t.slice(n,n+3));return i?(e.L=+i[0],n+i[0].length):-1}function w(e,t,n){var i=ne.exec(t.slice(n,n+1));return i?n+i[0].length:-1}function T(e,t){return a(e.getDate(),t,2)}function S(e,t){return a(e.getHours(),t,2)}function A(e,t){return a(e.getHours()%12||12,t,2)}function C(e,n){return a(1+t.day.count(t.year(e),e),n,3)}function k(e,t){return a(e.getMilliseconds(),t,3)}function O(e,t){return a(e.getMonth()+1,t,2)}function I(e,t){return a(e.getMinutes(),t,2)}function N(e,t){return a(e.getSeconds(),t,2)}function M(e,n){return a(t.sunday.count(t.year(e),e),n,2)}function D(e){return e.getDay()}function L(e,n){return a(t.monday.count(t.year(e),e),n,2)}function $(e,t){return a(e.getFullYear()%100,t,2)}function R(e,t){return a(e.getFullYear()%1e4,t,4)}function P(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+a(t/60|0,"0",2)+a(t%60,"0",2)}function F(e,t){return a(e.getUTCDate(),t,2)}function U(e,t){return a(e.getUTCHours(),t,2)}function j(e,t){return a(e.getUTCHours()%12||12,t,2)}function H(e,n){return a(1+t.utcDay.count(t.utcYear(e),e),n,3)}function z(e,t){return a(e.getUTCMilliseconds(),t,3)}function B(e,t){return a(e.getUTCMonth()+1,t,2)}function q(e,t){return a(e.getUTCMinutes(),t,2)}function W(e,t){return a(e.getUTCSeconds(),t,2)}function Y(e,n){return a(t.utcSunday.count(t.utcYear(e),e),n,2)}function G(e){return e.getUTCDay()}function X(e,n){return a(t.utcMonday.count(t.utcYear(e),e),n,2)}function V(e,t){return a(e.getUTCFullYear()%100,t,2)}function K(e,t){return a(e.getUTCFullYear()%1e4,t,4)}function Z(){return"+0000"}function Q(){return"%"}function J(e){return e.toISOString()}var ee={"-":"",_:" ",0:"0"},te=/^\s*\d+/,ne=/^%/,ie=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,re=o({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"]}),oe=o({dateTime:"%A, %e de %B de %Y, %X",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["diumenge","dilluns","dimarts","dimecres","dijous","divendres","dissabte"],shortDays:["dg.","dl.","dt.","dc.","dj.","dv.","ds."],months:["gener","febrer","març","abril","maig","juny","juliol","agost","setembre","octubre","novembre","desembre"],shortMonths:["gen.","febr.","març","abr.","maig","juny","jul.","ag.","set.","oct.","nov.","des."]}),ae=o({dateTime:"%A, der %e. %B %Y, %X",date:"%d.%m.%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],shortDays:["So","Mo","Di","Mi","Do","Fr","Sa"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],shortMonths:["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"]}),se=o({dateTime:"%A, der %e. %B %Y, %X",date:"%d.%m.%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],shortDays:["So","Mo","Di","Mi","Do","Fr","Sa"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],shortMonths:["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"]}),le=o({dateTime:"%a %b %e %X %Y",date:"%Y-%m-%d",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"]}),ue=o({dateTime:"%a %e %b %X %Y",date:"%d/%m/%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"]}),ce=o({dateTime:"%A, %e de %B de %Y, %X",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],shortDays:["dom","lun","mar","mié","jue","vie","sáb"],months:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],shortMonths:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"]}),fe=o({dateTime:"%A, %-d. %Bta %Y klo %X",date:"%-d.%-m.%Y",time:"%H:%M:%S",periods:["a.m.","p.m."],days:["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"],shortDays:["Su","Ma","Ti","Ke","To","Pe","La"],months:["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu"],shortMonths:["Tammi","Helmi","Maalis","Huhti","Touko","Kesä","Heinä","Elo","Syys","Loka","Marras","Joulu"]}),he=o({dateTime:"%a %e %b %Y %X",date:"%Y-%m-%d",time:"%H:%M:%S",periods:["",""],days:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],shortDays:["dim","lun","mar","mer","jeu","ven","sam"],months:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],shortMonths:["jan","fév","mar","avr","mai","jui","jul","aoû","sep","oct","nov","déc"]}),de=o({dateTime:"%A, le %e %B %Y, %X",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],shortDays:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],months:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],shortMonths:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."]}),pe=o({dateTime:"%A, %e ב%B %Y %X",date:"%d.%m.%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["ראשון","שני","שלישי","רביעי","חמישי","שישי","שבת"],shortDays:["א׳","ב׳","ג׳","ד׳","ה׳","ו׳","ש׳"],months:["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"],shortMonths:["ינו׳","פבר׳","מרץ","אפר׳","מאי","יוני","יולי","אוג׳","ספט׳","אוק׳","נוב׳","דצמ׳"]}),ge=o({dateTime:"%Y. %B %-e., %A %X",date:"%Y. %m. %d.",time:"%H:%M:%S",periods:["de.","du."],days:["vasárnap","hétfő","kedd","szerda","csütörtök","péntek","szombat"],shortDays:["V","H","K","Sze","Cs","P","Szo"],months:["január","február","március","április","május","június","július","augusztus","szeptember","október","november","december"],shortMonths:["jan.","feb.","már.","ápr.","máj.","jún.","júl.","aug.","szept.","okt.","nov.","dec."]}),me=o({dateTime:"%A %e %B %Y, %X",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"],shortDays:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],shortMonths:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"]}),ve=o({dateTime:"%Y %b %e %a %X",date:"%Y/%m/%d",time:"%H:%M:%S",periods:["AM","PM"],days:["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],shortDays:["日","月","火","水","木","金","土"],months:["睦月","如月","弥生","卯月","皐月","水無月","文月","葉月","長月","神無月","霜月","師走"],shortMonths:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"]}),ye=o({dateTime:"%Y/%m/%d %a %X",date:"%Y/%m/%d",time:"%H:%M:%S",periods:["오전","오후"],days:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],shortDays:["일","월","화","수","목","금","토"],months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],shortMonths:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]}),be=o({dateTime:"%A, %e %B %Y г. %X",date:"%d.%m.%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["недела","понеделник","вторник","среда","четврток","петок","сабота"],shortDays:["нед","пон","вто","сре","чет","пет","саб"],months:["јануари","февруари","март","април","мај","јуни","јули","август","септември","октомври","ноември","декември"],shortMonths:["јан","фев","мар","апр","мај","јун","јул","авг","сеп","окт","ное","дек"]}),_e=o({dateTime:"%a %e %B %Y %T",date:"%d-%m-%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],shortDays:["zo","ma","di","wo","do","vr","za"],months:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],shortMonths:["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec"]}),Ee=o({dateTime:"%A, %e %B %Y, %X",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota"],shortDays:["Niedz.","Pon.","Wt.","Śr.","Czw.","Pt.","Sob."],months:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"],shortMonths:["Stycz.","Luty","Marz.","Kwie.","Maj","Czerw.","Lipc.","Sierp.","Wrz.","Paźdz.","Listop.","Grudz."]}),xe=o({dateTime:"%A, %e de %B de %Y. %X",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"],shortDays:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],shortMonths:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"]}),we=o({dateTime:"%A, %e %B %Y г. %X",date:"%d.%m.%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"],shortDays:["вс","пн","вт","ср","чт","пт","сб"],months:["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"],shortMonths:["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек"]}),Te=o({dateTime:"%A den %d %B %Y %X",date:"%Y-%m-%d",time:"%H:%M:%S",periods:["fm","em"],days:["Söndag","Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag"],shortDays:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"],months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],shortMonths:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"]}),Se=o({dateTime:"%a %b %e %X %Y",date:"%Y/%-m/%-d",time:"%H:%M:%S",periods:["上午","下午"],days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],shortDays:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],shortMonths:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]}),Ae="%Y-%m-%dT%H:%M:%S.%LZ";J.parse=function(e){var t=new Date(e);return isNaN(t)?null:t},J.toString=function(){return Ae};var Ce=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?J:re.utcFormat(Ae),ke=re.format,Oe=re.utcFormat,Ie="0.2.1";e.version=Ie,e.format=ke,e.utcFormat=Oe,e.locale=o,e.localeCaEs=oe,e.localeDeCh=ae,e.localeDeDe=se,e.localeEnCa=le,e.localeEnGb=ue,e.localeEnUs=re,e.localeEsEs=ce,e.localeFiFi=fe,e.localeFrCa=he,e.localeFrFr=de,e.localeHeIl=pe,e.localeHuHu=ge,e.localeItIt=me,e.localeJaJp=ve,e.localeKoKr=ye,e.localeMkMk=be,e.localeNlNl=_e,e.localePlPl=Ee,e.localePtBr=xe,e.localeRuRu=we,
e.localeSvSe=Te,e.localeZhCn=Se,e.isoFormat=Ce})},{"d3-time":6}],6:[function(t,n,i){!function(t,r){"object"==typeof i&&"undefined"!=typeof n?r(i):"function"==typeof e&&e.amd?e("d3-time",["exports"],r):r(t.d3_time={})}(this,function(e){"use strict";function t(e,n,i,a){function s(t){return e(t=new Date((+t))),t}return s.floor=s,s.round=function(t){var i=new Date((+t)),r=new Date(t-1);return e(i),e(r),n(r,1),t-i<r-t?i:r},s.ceil=function(t){return e(t=new Date(t-1)),n(t,1),t},s.offset=function(e,t){return n(e=new Date((+e)),null==t?1:Math.floor(t)),e},s.range=function(t,i,r){var o=[];if(t=new Date(t-1),i=new Date((+i)),r=null==r?1:Math.floor(r),!(t<i&&r>0))return o;for(n(t,1),e(t),t<i&&o.push(new Date((+t)));n(t,r),e(t),t<i;)o.push(new Date((+t)));return o},s.filter=function(i){return t(function(t){for(;e(t),!i(t);)t.setTime(t-1)},function(e,t){for(;--t>=0;)for(;n(e,1),!i(e););})},i&&(s.count=function(t,n){return r.setTime(+t),o.setTime(+n),e(r),e(o),Math.floor(i(r,o))},s.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?s.filter(a?function(t){return a(t)%e===0}:function(t){return s.count(0,t)%e===0}):s:null}),s}function n(e){return t(function(t){t.setHours(0,0,0,0),t.setDate(t.getDate()-(t.getDay()+7-e)%7)},function(e,t){e.setDate(e.getDate()+7*t)},function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/6048e5})}function i(e){return t(function(t){t.setUTCHours(0,0,0,0),t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7)},function(e,t){e.setUTCDate(e.getUTCDate()+7*t)},function(e,t){return(t-e)/6048e5})}var r=new Date,o=new Date,a=t(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});a.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?t(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):a:null};var s=t(function(e){e.setMilliseconds(0)},function(e,t){e.setTime(+e+1e3*t)},function(e,t){return(t-e)/1e3},function(e){return e.getSeconds()}),l=t(function(e){e.setSeconds(0,0)},function(e,t){e.setTime(+e+6e4*t)},function(e,t){return(t-e)/6e4},function(e){return e.getMinutes()}),u=t(function(e){e.setMinutes(0,0,0)},function(e,t){e.setTime(+e+36e5*t)},function(e,t){return(t-e)/36e5},function(e){return e.getHours()}),c=t(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5},function(e){return e.getDate()-1}),f=n(0),h=n(1),d=n(2),p=n(3),g=n(4),m=n(5),v=n(6),y=t(function(e){e.setHours(0,0,0,0),e.setDate(1)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())},function(e){return e.getMonth()}),b=t(function(e){e.setHours(0,0,0,0),e.setMonth(0,1)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()}),_=t(function(e){e.setUTCMilliseconds(0)},function(e,t){e.setTime(+e+1e3*t)},function(e,t){return(t-e)/1e3},function(e){return e.getUTCSeconds()}),E=t(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+6e4*t)},function(e,t){return(t-e)/6e4},function(e){return e.getUTCMinutes()}),x=t(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+36e5*t)},function(e,t){return(t-e)/36e5},function(e){return e.getUTCHours()}),w=t(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/864e5},function(e){return e.getUTCDate()-1}),T=i(0),S=i(1),A=i(2),C=i(3),k=i(4),O=i(5),I=i(6),N=t(function(e){e.setUTCHours(0,0,0,0),e.setUTCDate(1)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())},function(e){return e.getUTCMonth()}),M=t(function(e){e.setUTCHours(0,0,0,0),e.setUTCMonth(0,1)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()}),D=a.range,L=s.range,$=l.range,R=u.range,P=c.range,F=f.range,U=h.range,j=d.range,H=p.range,z=g.range,B=m.range,q=v.range,W=f.range,Y=y.range,G=b.range,X=a,V=D,K=_.range,Z=E.range,Q=x.range,J=w.range,ee=T.range,te=S.range,ne=A.range,ie=C.range,re=k.range,oe=O.range,ae=I.range,se=T.range,le=N.range,ue=M.range,ce="0.1.1";e.version=ce,e.milliseconds=D,e.seconds=L,e.minutes=$,e.hours=R,e.days=P,e.sundays=F,e.mondays=U,e.tuesdays=j,e.wednesdays=H,e.thursdays=z,e.fridays=B,e.saturdays=q,e.weeks=W,e.months=Y,e.years=G,e.utcMillisecond=X,e.utcMilliseconds=V,e.utcSeconds=K,e.utcMinutes=Z,e.utcHours=Q,e.utcDays=J,e.utcSundays=ee,e.utcMondays=te,e.utcTuesdays=ne,e.utcWednesdays=ie,e.utcThursdays=re,e.utcFridays=oe,e.utcSaturdays=ae,e.utcWeeks=se,e.utcMonths=le,e.utcYears=ue,e.millisecond=a,e.second=s,e.minute=l,e.hour=u,e.day=c,e.sunday=f,e.monday=h,e.tuesday=d,e.wednesday=p,e.thursday=g,e.friday=m,e.saturday=v,e.week=f,e.month=y,e.year=b,e.utcSecond=_,e.utcMinute=E,e.utcHour=x,e.utcDay=w,e.utcSunday=T,e.utcMonday=S,e.utcTuesday=A,e.utcWednesday=C,e.utcThursday=k,e.utcFriday=O,e.utcSaturday=I,e.utcWeek=T,e.utcMonth=N,e.utcYear=M,e.interval=t})},{}],7:[function(e,t,n){var i=e("./util"),r=e("./time"),o=r.utc,a=t.exports;a.$year=i.$func("year",r.year.unit),a.$month=i.$func("month",r.months.unit),a.$date=i.$func("date",r.dates.unit),a.$day=i.$func("day",r.weekdays.unit),a.$hour=i.$func("hour",r.hours.unit),a.$minute=i.$func("minute",r.minutes.unit),a.$second=i.$func("second",r.seconds.unit),a.$utcYear=i.$func("utcYear",o.year.unit),a.$utcMonth=i.$func("utcMonth",o.months.unit),a.$utcDate=i.$func("utcDate",o.dates.unit),a.$utcDay=i.$func("utcDay",o.weekdays.unit),a.$utcHour=i.$func("utcHour",o.hours.unit),a.$utcMinute=i.$func("utcMinute",o.minutes.unit),a.$utcSecond=i.$func("utcSecond",o.seconds.unit)},{"./time":29,"./util":30}],8:[function(e,t,n){function i(){this._cells={},this._aggr=[],this._stream=!1}function r(e){if(o.isArray(e))return e;if(null==e)return[];var t,n,i=[];for(t in e)n=o.array(e[t]),i.push({name:t,ops:n});return i}var o=e("../util"),a=e("./measures"),s=e("./collector"),l=i.Flags={ADD_CELL:1,MOD_CELL:2},u=i.prototype;u.stream=function(e){return null==e?this._stream:(this._stream=!!e,this._aggr=[],this)},u.key=function(e){return null==e?this._key:(this._key=o.$(e),this)},u.groupby=function(e){return this._dims=o.array(e).map(function(e,t){if(e=o.isString(e)?{name:e,get:o.$(e)}:o.isFunction(e)?{name:o.name(e)||e.name||"_"+t,get:e}:e.name&&o.isFunction(e.get)?e:null,null==e)throw"Invalid groupby argument: "+e;return e}),this.clear()},u.summarize=function(e){e=r(e),this._count=!0;var t,n,i,s,l,u,c,f=this._aggr=[];for(i=0;i<e.length;++i){for(s=0,t=[],n=e[i];s<n.ops.length;++s)l=n.ops[s],"count"!==l&&(this._count=!1),u=n.as&&n.as[s]||l+("*"===n.name?"":"_"+n.name),t.push(a[l](u));c=n.get&&o.$(n.get)||("*"===n.name?o.identity:o.$(n.name)),f.push({name:n.name,measures:a.create(t,this._stream,c,this._assign)})}return this.clear()},u.count=function(){return this.summarize({"*":"count"})},u._assign=function(e,t,n){e[t]=n},u.clear=function(){return this._cells={},this},u._cellkey=function(e){var t,n=this._dims,i=n.length,r=String(n[0].get(e));for(t=1;t<i;++t)r+="|"+n[t].get(e);return r},u._cell=function(e){var t=this._dims.length?this._cellkey(e):"";return this._cells[t]||(this._cells[t]=this._newcell(e,t))},u._newcell=function(e,t){var n,i={num:0,tuple:this._newtuple(e,t),flag:l.ADD_CELL,aggs:{}},r=this._aggr;for(n=0;n<r.length;++n)i.aggs[r[n].name]=new r[n].measures(i,i.tuple);return i.collect&&(i.data=new s(this._key)),i},u._newtuple=function(e){var t,n,i=this._dims,r={};for(t=0,n=i.length;t<n;++t)r[i[t].name]=i[t].get(e);return this._ingest(r)},u._ingest=o.identity,u._add=function(e){var t,n=this._cell(e),i=this._aggr;if(n.num+=1,!this._count)for(n.collect&&n.data.add(e),t=0;t<i.length;++t)n.aggs[i[t].name].add(e);n.flag|=l.MOD_CELL,this._on_add&&this._on_add(e,n)},u._rem=function(e){var t,n=this._cell(e),i=this._aggr;if(n.num-=1,!this._count)for(n.collect&&n.data.rem(e),t=0;t<i.length;++t)n.aggs[i[t].name].rem(e);n.flag|=l.MOD_CELL,this._on_rem&&this._on_rem(e,n)},u._mod=function(e,t){var n,i=this._cell(t),r=this._cell(e),a=this._aggr;for(i!==r?(i.num-=1,r.num+=1,i.collect&&i.data.rem(t),r.collect&&r.data.add(e)):i.collect&&!o.isObject(e)&&(i.data.rem(t),i.data.add(e)),n=0;n<a.length;++n)i.aggs[a[n].name].rem(t),r.aggs[a[n].name].add(e);i.flag|=l.MOD_CELL,r.flag|=l.MOD_CELL,this._on_mod&&this._on_mod(e,t,i,r)},u._markMod=function(e){var t=this._cell(e);t.flag|=l.MOD_CELL},u.result=function(){var e,t,n,i=[],r=this._aggr;for(n in this._cells){if(e=this._cells[n],e.num>0){for(e.collect&&e.data.values(),t=0;t<r.length;++t)e.aggs[r[t].name].set();i.push(e.tuple)}else delete this._cells[n];e.flag=0}return this._rems=!1,i},u.changes=function(e){var t,n,i,r,o=e||{add:[],rem:[],mod:[]},a=this._aggr;for(r in this._cells){for(t=this._cells[r],n=t.flag,t.collect&&t.data.values(),i=0;i<a.length;++i)t.aggs[a[i].name].set();t.num<=0?(o.rem.push(t.tuple),delete this._cells[r],this._on_drop&&this._on_drop(t)):(this._on_keep&&this._on_keep(t),n&l.ADD_CELL?o.add.push(t.tuple):n&l.MOD_CELL&&o.mod.push(t.tuple)),t.flag=0}return this._rems=!1,o},u.execute=function(e){return this.clear().insert(e).result()},u.insert=function(e){this._consolidate();for(var t=0;t<e.length;++t)this._add(e[t]);return this},u.remove=function(e){if(!this._stream)throw"Aggregator not configured for streaming removes. Call stream(true) prior to calling summarize.";for(var t=0;t<e.length;++t)this._rem(e[t]);return this._rems=!0,this},u._consolidate=function(){if(this._rems){for(var e in this._cells)this._cells[e].collect&&this._cells[e].data.values();this._rems=!1}},t.exports=i},{"../util":30,"./collector":9,"./measures":11}],9:[function(e,t,n){function i(e){this._add=[],this._rem=[],this._key=e||null,this._last=null}var r=e("../util"),o=e("../stats"),a="__dl_rem__",s=i.prototype;s.add=function(e){this._add.push(e)},s.rem=function(e){this._rem.push(e)},s.values=function(){if(this._get=null,0===this._rem.length)return this._add;var e,t,n,i,s=this._add,l=this._rem,u=this._key,c=Array(s.length-l.length);if(r.isObject(l[0]))if(u)for(i=r.toMap(l,u),e=0,t=0,n=s.length;e<n;++e)i.hasOwnProperty(u(s[e]))||(c[t++]=s[e]);else{for(e=0,n=l.length;e<n;++e)l[e][a]=1;for(e=0,t=0,n=s.length;e<n;++e)s[e][a]||(c[t++]=s[e]);for(e=0,n=l.length;e<n;++e)delete l[e][a]}else for(i=o.count.map(l),e=0,t=0,n=s.length;e<n;++e)i[s[e]]>0?i[s[e]]-=1:c[t++]=s[e];return this._rem=[],this._add=c},s.extent=function(e){if(this._get!==e||!this._ext){var t=this.values(),n=o.extent.index(t,e);this._ext=[t[n[0]],t[n[1]]],this._get=e}return this._ext},s.argmin=function(e){return this.extent(e)[0]},s.argmax=function(e){return this.extent(e)[1]},s.min=function(e){var t=this.extent(e)[0];return null!=t?e(t):+(1/0)},s.max=function(e){var t=this.extent(e)[1];return null!=t?e(t):-(1/0)},s.quartile=function(e){return this._get===e&&this._q||(this._q=o.quartile(this.values(),e),this._get=e),this._q},s.q1=function(e){return this.quartile(e)[0]},s.q2=function(e){return this.quartile(e)[1]},s.q3=function(e){return this.quartile(e)[2]},t.exports=i},{"../stats":27,"../util":30}],10:[function(e,t,n){var i=e("../util"),r=e("./aggregator");t.exports=function(){var e=[].reduce.call(arguments,function(e,t){return e.concat(i.array(t))},[]);return(new r).groupby(e).summarize({"*":"values"})}},{"../util":30,"./aggregator":8}],11:[function(e,t,n){function i(e){return function(t){var n=a.extend({init:"",add:"",rem:"",idx:0},e);return n.out=t||e.name,n}}function r(e,t){function n(e,i){function r(t){e[t]||n(e,e[t]=s[t]())}return i.req&&i.req.forEach(r),t&&i.str&&i.str.forEach(r),e}var i=e.reduce(n,e.reduce(function(e,t){return e[t.name]=t,e},{}));return a.vals(i).sort(function(e,t){return e.idx-t.idx})}function o(t,n,i,o){var s=r(t,n),l="this.cell = cell; this.tuple = t; this.valid = 0; this.missing = 0;",u="if (v==null) this.missing++; if (!this.isValid(v)) return; ++this.valid;",c="if (v==null) this.missing--; if (!this.isValid(v)) return; --this.valid;",f="var t = this.tuple; var cell = this.cell;";return s.forEach(function(e){e.idx<0?(l=e.init+l,u=e.add+u,c=e.rem+c):(l+=e.init,u+=e.add,c+=e.rem)}),t.slice().sort(function(e,t){return e.idx-t.idx}).forEach(function(e){f+="this.assign(t,'"+e.out+"',"+e.set+");"}),f+="return t;",l=Function("cell","t",l),l.prototype.assign=o,l.prototype.add=Function("t","var v = this.get(t);"+u),l.prototype.rem=Function("t","var v = this.get(t);"+c),l.prototype.set=Function(f),l.prototype.get=i,l.prototype.distinct=e("../stats").count.distinct,l.prototype.isValid=a.isValid,l.fields=t.map(a.$("out")),l}var a=e("../util"),s={values:i({name:"values",init:"cell.collect = true;",set:"cell.data.values()",idx:-1}),count:i({name:"count",set:"cell.num"}),missing:i({name:"missing",set:"this.missing"}),valid:i({name:"valid",set:"this.valid"}),sum:i({name:"sum",init:"this.sum = 0;",add:"this.sum += v;",rem:"this.sum -= v;",set:"this.sum"}),mean:i({name:"mean",init:"this.mean = 0;",add:"var d = v - this.mean; this.mean += d / this.valid;",rem:"var d = v - this.mean; this.mean -= this.valid ? d / this.valid : this.mean;",set:"this.mean"}),average:i({name:"average",set:"this.mean",req:["mean"],idx:1}),variance:i({name:"variance",init:"this.dev = 0;",add:"this.dev += d * (v - this.mean);",rem:"this.dev -= d * (v - this.mean);",set:"this.valid > 1 ? this.dev / (this.valid-1) : 0",req:["mean"],idx:1}),variancep:i({name:"variancep",set:"this.valid > 1 ? this.dev / this.valid : 0",req:["variance"],idx:2}),stdev:i({name:"stdev",set:"this.valid > 1 ? Math.sqrt(this.dev / (this.valid-1)) : 0",req:["variance"],idx:2}),stdevp:i({name:"stdevp",set:"this.valid > 1 ? Math.sqrt(this.dev / this.valid) : 0",req:["variance"],idx:2}),stderr:i({name:"stderr",set:"this.valid > 1 ? Math.sqrt(this.dev / (this.valid * (this.valid-1))) : 0",req:["variance"],idx:2}),median:i({name:"median",set:"cell.data.q2(this.get)",req:["values"],idx:3}),q1:i({name:"q1",set:"cell.data.q1(this.get)",req:["values"],idx:3}),q3:i({name:"q3",set:"cell.data.q3(this.get)",req:["values"],idx:3}),distinct:i({name:"distinct",set:"this.distinct(cell.data.values(), this.get)",req:["values"],idx:3}),argmin:i({name:"argmin",add:"if (v < this.min) this.argmin = t;",rem:"if (v <= this.min) this.argmin = null;",set:"this.argmin = this.argmin || cell.data.argmin(this.get)",req:["min"],str:["values"],idx:3}),argmax:i({name:"argmax",add:"if (v > this.max) this.argmax = t;",rem:"if (v >= this.max) this.argmax = null;",set:"this.argmax = this.argmax || cell.data.argmax(this.get)",req:["max"],str:["values"],idx:3}),min:i({name:"min",init:"this.min = +Infinity;",add:"if (v < this.min) this.min = v;",rem:"if (v <= this.min) this.min = NaN;",set:"this.min = (isNaN(this.min) ? cell.data.min(this.get) : this.min)",str:["values"],idx:4}),max:i({name:"max",init:"this.max = -Infinity;",add:"if (v > this.max) this.max = v;",rem:"if (v >= this.max) this.max = NaN;",set:"this.max = (isNaN(this.max) ? cell.data.max(this.get) : this.max)",str:["values"],idx:4}),modeskew:i({name:"modeskew",set:"this.dev===0 ? 0 : (this.mean - cell.data.q2(this.get)) / Math.sqrt(this.dev/(this.valid-1))",req:["mean","variance","median"],idx:5})};s.create=o,t.exports=s},{"../stats":27,"../util":30}],12:[function(e,t,n){function i(e){if(!e)throw Error("Missing binning options.");var t,n,i,s,l,u,c,f=e.maxbins||15,h=e.base||10,d=Math.log(h),p=e.div||[5,2],g=e.min,m=e.max,v=m-g;if(e.step)t=e.step;else if(e.steps)t=e.steps[Math.min(e.steps.length-1,r(e.steps,v/f,0,e.steps.length))];else{for(n=Math.ceil(Math.log(f)/d),i=e.minstep||0,t=Math.max(i,Math.pow(h,Math.round(Math.log(v)/d)-n));Math.ceil(v/t)>f;)t*=h;for(u=0;u<p.length;++u)l=t/p[u],l>=i&&v/l<=f&&(t=l)}return l=Math.log(t),s=l>=0?0:~~(-l/d)+1,c=Math.pow(h,-s-1),g=Math.min(g,Math.floor(g/t+c)*t),m=Math.ceil(m/t)*t,{start:g,stop:m,step:t,unit:{precision:s},value:o,index:a}}function r(e,t,n,i){for(;n<i;){var r=n+i>>>1;u.cmp(e[r],t)<0?n=r+1:i=r}return n}function o(e){return this.step*Math.floor(e/this.step+f)}function a(e){return Math.floor((e-this.start)/this.step+f)}function s(e){return this.unit.date(o.call(this,e))}function l(e){return a.call(this,this.unit.unit(e))}var u=e("../util"),c=e("../time"),f=1e-15;i.date=function(e){if(!e)throw Error("Missing date binning options.");var t=e.utc?c.utc:c,n=e.min,r=e.max,o=e.maxbins||20,a=e.minbins||4,u=+r-+n,f=e.unit?t[e.unit]:t.find(u,a,o),h=i({min:null!=f.min?f.min:f.unit(n),max:null!=f.max?f.max:f.unit(r),maxbins:o,minstep:f.minstep,steps:f.step});return h.unit=f,h.index=l,e.raw||(h.value=s),h},t.exports=i},{"../time":29,"../util":30}],13:[function(e,t,n){function i(e,t,n){n=a(e,t,n);var i=o(n);return i?h.$func("bin",i.unit.unit?function(e){return i.value(i.unit.unit(e))}:function(e){return i.value(e)})(n.accessor):n.accessor||h.identity}function r(e,t,n){n=a(e,t,n);var i=o(n);return i?s(e,n.accessor,i):l(e,n.accessor,n&&n.sort)}function o(e){var t=e.type,n=null;return(null==t||p[t])&&("integer"===t&&null==e.minstep&&(e.minstep=1),n="date"===t?u.date(e):u(e)),n}function a(){var e=arguments,t=0,n=h.isArray(e[t])?e[t++]:null,i=h.isFunction(e[t])||h.isString(e[t])?h.$(e[t++]):null,r=h.extend({},e[t]);if(n&&(r.type=r.type||f(n,i),p[r.type])){var o=d.extent(n,i);r=h.extend({min:o[0],max:o[1]},r)}return i&&(r.accessor=i),r}function s(e,t,n){for(var i,r,o=c.range(n.start,n.stop+n.step/2,n.step).map(function(e){return{value:n.value(e),count:0}}),a=0;a<e.length;++a)if(i=t?t(e[a]):e[a],h.isValid(i)){if(r=n.index(i),r<0||r>=o.length||!isFinite(r))continue;o[r].count+=1}return o.bins=n,o}function l(e,t,n){var i=d.unique(e,t),r=d.count.map(e,t);return i.map(function(e){return{value:e,count:r[e]}}).sort(h.comparator(n?"-count":"+value"))}var u=e("./bins"),c=e("../generate"),f=e("../import/type"),h=e("../util"),d=e("../stats"),p={integer:1,number:1,date:1};t.exports={$bin:i,histogram:r}},{"../generate":16,"../import/type":25,"../stats":27,"../util":30,"./bins":12}],14:[function(e,t,n){function i(e,t){t=s.extend({separator:" ",minwidth:8,maxwidth:15},t);var n=t.fields||s.keys(e[0]),i=l.all(e);if(t.start||t.limit){var r=t.start||0,o=t.limit?r+t.limit:e.length;e=e.slice(r,o)}var a=n.map(function(n){var r=f[i[n]]||"",o=c("{{"+n+r+"}}"),a=u.max(e,function(e){return o(e).length});return a=Math.max(Math.min(n.length,t.minwidth),a),t.maxwidth>0?Math.min(a,t.maxwidth):a}),d=n.map(function(e,t){return s.truncate(s.pad(e,a[t],"center"),a[t])}).join(t.separator),p=c(n.map(function(e,t){return"{{"+e+(f[i[e]]||"")+("|pad:"+a[t]+","+(h[i[e]]||"right"))+("|truncate:"+a[t])+"}}"}).join(t.separator));return d+"\n"+e.map(p).join("\n")}function r(e){e=e?e.__summary__?e:u.summary(e):this;var t,n,i=[];for(t=0,n=e.length;t<n;++t)i.push("-- "+e[t].field+" --"),"string"===e[t].type||e[t].distinct<10?i.push(a(e[t])):i.push(o(e[t])),i.push("");return i.join("\n")}function o(e){return["valid:    "+e.valid,"missing:  "+e.missing,"distinct: "+e.distinct,"min:      "+e.min,"max:      "+e.max,"median:   "+e.median,"mean:     "+e.mean,"stdev:    "+e.stdev,"modeskew: "+e.modeskew].join("\n")}function a(e){var t=["valid:    "+e.valid,"missing:  "+e.missing,"distinct: "+e.distinct,"top values: "],n=e.unique,i=s.keys(n).sort(function(e,t){return n[t]-n[e]}).slice(0,6).map(function(e){return" '"+e+"' ("+n[e]+")"});return t.concat(i).join("\n")}var s=e("./util"),l=e("./import/type"),u=e("./stats"),c=e("./template");t.exports={table:i,summary:r};var f={date:'|time:"%m/%d/%Y %H:%M:%S"',number:'|number:".4f"',integer:'|number:"d"'},h={number:"left",integer:"left"}},{"./import/type":25,"./stats":27,"./template":28,"./util":30}],15:[function(e,t,n){function i(e){return e.length>4&&"locale"+(e[0].toUpperCase()+e[1].toLowerCase()+e[3].toUpperCase()+e[4].toLowerCase())}function r(e){var t=E.isString(e)?T[i(e)]:T.locale(e);if(null==t)throw Error("Unrecognized locale: "+e);S=t}function o(e){var t=E.isString(e)?w[i(e)]:w.locale(e);if(null==t)throw Error("Unrecognized locale: "+e);A=t,v=y=b=_=null}function a(e,t){e.length||(e=[0]),null==t&&(t=10);var n=e[0],i=e[e.length-1];i<n&&(a=i,i=n,n=a);var r=i-n||(t=1,n||i||1),o=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),a=r/t/o;return a>=k?o*=10:a>=O?o*=5:a>=I&&(o*=2),[Math.ceil(n/o)*o,Math.floor(i/o)*o+o/2,o]}function s(e,t){return function(n){var i=e(n),r=i.indexOf(t);if(r<0)return i;for(var o=l(i,r),a=o<i.length?i.slice(o):"";--o>r;)if("0"!==i[o]){++o;break}return i.slice(0,o)+a}}function l(e,t){var n,i=e.lastIndexOf("e");if(i>0)return i;for(i=e.length;--i>t;)if(n=e.charCodeAt(i),n>=48&&n<=57)return i+1}function u(e){var t=S.format(".1f")(1)[1];switch(null==e&&(e=","),e=T.formatSpecifier(e),null==e.precision&&(e.precision=12),e.type){case"%":e.precision-=2;break;case"e":e.precision-=1}return s(S.format(e),t)}function c(e,t,n){var i=a(e,t);switch(null==n&&(n=",f"),n=T.formatSpecifier(n),n.type){case"s":var r=Math.max(Math.abs(i[0]),Math.abs(i[1]));return null==n.precision&&(n.precision=T.precisionPrefix(i[2],r)),S.formatPrefix(n,r);case"":case"e":case"g":case"p":case"r":null==n.precision&&(n.precision=T.precisionRound(i[2],Math.max(Math.abs(i[0]),Math.abs(i[1])))-("e"===n.type));break;case"f":case"%":null==n.precision&&(n.precision=T.precisionFixed(i[2])-2*("%"===n.type))}return S.format(n)}function f(){var e=A.format,t=e(".%L"),n=e(":%S"),i=e("%I:%M"),r=e("%I %p"),o=e("%a %d"),a=e("%b %d"),s=e("%B"),l=e("%Y");return function(e){var u=+e;return(x.second(e)<u?t:x.minute(e)<u?n:x.hour(e)<u?i:x.day(e)<u?r:x.month(e)<u?x.week(e)<u?o:a:x.year(e)<u?s:l)(e)}}function h(){var e=A.utcFormat,t=e(".%L"),n=e(":%S"),i=e("%I:%M"),r=e("%I %p"),o=e("%a %d"),a=e("%b %d"),s=e("%B"),l=e("%Y");return function(e){var u=+e;return(x.utcSecond(e)<u?t:x.utcMinute(e)<u?n:x.utcHour(e)<u?i:x.utcDay(e)<u?r:x.utcMonth(e)<u?x.utcWeek(e)<u?o:a:x.utcYear(e)<u?s:l)(e)}}function d(e,t){var n=t?y||(y=A.format("%b")):v||(v=A.format("%B"));return C.setMonth(e),n(C)}function p(e,t){var n=t?_||(_=A.format("%a")):b||(b=A.format("%A"));return C.setMonth(0),C.setDate(2+e),n(C)}function g(e){return Math.floor(e.getMonth()/3)+1}function m(e){return Math.floor(e.getUTCMonth()/3)+1}var v,y,b,_,E=e("./util"),x=e("d3-time"),w=e("d3-time-format"),T=e("d3-format"),S=T,A=w,C=new Date(2e3,0,1);t.exports={numberLocale:r,number:function(e){return S.format(e)},numberPrefix:function(e,t){return S.formatPrefix(e,t)},timeLocale:o,time:function(e){return A.format(e)},utc:function(e){return A.utcFormat(e)},locale:function(e){r(e),o(e)},auto:{number:u,linear:c,time:function(){return f()},utc:function(){return h()}},month:d,day:p,quarter:g,utcQuarter:m};var k=Math.sqrt(50),O=Math.sqrt(10),I=Math.sqrt(2)},{"./util":30,"d3-format":4,"d3-time":6,"d3-time-format":5}],16:[function(e,t,n){var i=e("./util"),r=t.exports;r.repeat=function(e,t){var n,i=Array(t);for(n=0;n<t;++n)i[n]=e;return i},r.zeros=function(e){return r.repeat(0,e)},r.range=function(e,t,n){if(arguments.length<3&&(n=1,arguments.length<2&&(t=e,e=0)),(t-e)/n==1/0)throw new Error("Infinite range");var i,r=[],o=-1;if(n<0)for(;(i=e+n*++o)>t;)r.push(i);else for(;(i=e+n*++o)<t;)r.push(i);return r},r.random={},r.random.uniform=function(e,t){void 0===t&&(t=void 0===e?1:e,e=0);var n=t-e,i=function(){return e+n*Math.random()};return i.samples=function(e){return r.zeros(e).map(i)},i.pdf=function(i){return i>=e&&i<=t?1/n:0},i.cdf=function(i){return i<e?0:i>t?1:(i-e)/n},i.icdf=function(t){return t>=0&&t<=1?e+t*n:NaN},i},r.random.integer=function(e,t){void 0===t&&(t=e,e=0);var n=t-e,i=function(){return e+Math.floor(n*Math.random())};return i.samples=function(e){return r.zeros(e).map(i)},i.pdf=function(i){return i===Math.floor(i)&&i>=e&&i<t?1/n:0},i.cdf=function(i){var r=Math.floor(i);return r<e?0:r>=t?1:(r-e+1)/n},i.icdf=function(t){return t>=0&&t<=1?e-1+Math.floor(t*n):NaN},i},r.random.normal=function(e,t){e=e||0,t=t||1;var n,i=function(){var i,r,o=0,a=0;if(void 0!==n)return o=n,n=void 0,o;do o=2*Math.random()-1,a=2*Math.random()-1,i=o*o+a*a;while(0===i||i>1);return r=Math.sqrt(-2*Math.log(i)/i),n=e+a*r*t,e+o*r*t};return i.samples=function(e){return r.zeros(e).map(i)},i.pdf=function(n){var i=Math.exp(Math.pow(n-e,2)/(-2*Math.pow(t,2)));return 1/(t*Math.sqrt(2*Math.PI))*i},i.cdf=function(n){var i,r=(n-e)/t,o=Math.abs(r);if(o>37)i=0;else{var a,s=Math.exp(-o*o/2);o<7.07106781186547?(a=.0352624965998911*o+.700383064443688,a=a*o+6.37396220353165,a=a*o+33.912866078383,a=a*o+112.079291497871,a=a*o+221.213596169931,a=a*o+220.206867912376,i=s*a,a=.0883883476483184*o+1.75566716318264,a=a*o+16.064177579207,a=a*o+86.7807322029461,a=a*o+296.564248779674,a=a*o+637.333633378831,a=a*o+793.826512519948,a=a*o+440.413735824752,i/=a):(a=o+.65,a=o+4/a,a=o+3/a,a=o+2/a,a=o+1/a,i=s/a/2.506628274631)}return r>0?1-i:i},i.icdf=function(n){if(n<=0||n>=1)return NaN;var i=2*n-1,r=8*(Math.PI-3)/(3*Math.PI*(4-Math.PI)),o=2/(Math.PI*r)+Math.log(1-Math.pow(i,2))/2,a=Math.log(1-i*i)/r,s=(i>0?1:-1)*Math.sqrt(Math.sqrt(o*o-a)-o);return e+t*Math.SQRT2*s},i},r.random.bootstrap=function(e,t){var n=e.filter(i.isValid),o=n.length,a=t?r.random.normal(0,t):null,s=function(){return n[~~(Math.random()*o)]+(a?a():0)};return s.samples=function(e){return r.zeros(e).map(s)},s}},{"./util":30}],17:[function(e,t,n){function i(e,t){if(e){var n=t.header;e=(n?n.join(t.delimiter)+"\n":"")+e}return o.dsv(t.delimiter).parse(e)}var r=e("../../util"),o=e("d3-dsv");i.delimiter=function(e){var t={delimiter:e};return function(e,n){return i(e,n?r.extend(n,t):t)}},t.exports=i},{"../../util":30,"d3-dsv":3}],18:[function(e,t,n){var i=e("./dsv");t.exports={json:e("./json"),topojson:e("./topojson"),treejson:e("./treejson"),dsv:i,csv:i.delimiter(","),tsv:i.delimiter("\t")}},{"./dsv":17,"./json":19,"./topojson":20,"./treejson":21}],19:[function(e,t,n){var i=e("../../util");t.exports=function(e,t){var n=i.isObject(e)&&!i.isBuffer(e)?e:JSON.parse(e);return t&&t.property&&(n=i.accessor(t.property)(n)),n}},{"../../util":30}],20:[function(e,t,n){var i=e("./json"),r=function(e,t){var n=r.topojson;if(null==n)throw Error("TopoJSON library not loaded.");var o,a=i(e,t);if(t&&t.feature){if(o=a.objects[t.feature])return n.feature(a,o).features;throw Error("Invalid TopoJSON object: "+t.feature)}if(t&&t.mesh){if(o=a.objects[t.mesh])return[n.mesh(a,a.objects[t.mesh])];throw Error("Invalid TopoJSON object: "+t.mesh)}throw Error("Missing TopoJSON feature or mesh parameter.")};r.topojson=e("topojson"),t.exports=r},{"./json":19,topojson:31}],21:[function(e,t,n){function i(e,t){function n(e,t){e[r]=t,o.push(e);var a=e[i];if(a)for(var s=0;s<a.length;++s)n(a[s],e)}var i=t&&t.children||"children",r=t&&t.parent||"parent",o=[];return n(e,null),o.root=e,o}var r=e("./json");t.exports=function(e,t){return i(r(e,t),t)}},{"./json":19}],22:[function(e,t,n){function i(t){var n=t.url;if(!n&&t.file)return d+t.file;if(t.baseURL&&!h.test(n)&&(c(n,"/")||"/"===t.baseURL[t.baseURL.length-1]||(n="/"+n),n=t.baseURL+n),!r.useXHR&&c(n,"//")&&(n=(t.defaultProtocol||"http")+":"+n),t.domainWhiteList){var i,o;if(r.useXHR){var a=document.createElement("a");a.href=n,""===a.host&&(a.href=a.href),i=a.hostname.toLowerCase(),o=window.location.hostname}else{var s=e("url").parse(n);i=s.hostname,o=null}if(o!==i){var l=t.domainWhiteList.some(function(e){var t=i.length-e.length;return e===i||t>1&&"."===i[t-1]&&i.lastIndexOf(e)===t});if(!l)throw"URL is not whitelisted: "+n}}return n}function r(e,t){return r.loader(e,t)}function o(e,t){var n,i=t||function(e){throw e};try{n=r.sanitizeUrl(e)}catch(o){return void i(o)}return n?r.useXHR?r.xhr(n,e,t):c(n,d)?r.file(n.slice(d.length),e,t):n.indexOf("://")<0?r.file(n,e,t):r.http(n,e,t):void i("Invalid URL: "+e.url)}function a(e){var t=e.responseType;return t&&"text"!==t?e.response:e.responseText}function s(e,t,n){function i(){var e=s.status;!e&&a(s)||e>=200&&e<300||304===e?n(null,s.responseText):n(s,null)}var o=!!n,s=new XMLHttpRequest;if("undefined"==typeof XDomainRequest||"withCredentials"in s||!/^(http(s)?:)?\/\//.test(e)||(s=new XDomainRequest),o&&("onload"in s?s.onload=s.onerror=i:s.onreadystatechange=function(){s.readyState>3&&i()}),s.open("GET",e,o),s.setRequestHeader){var l=f.extend({},r.headers,t.headers);for(var u in l)s.setRequestHeader(u,l[u])}if(s.send(),!o&&a(s))return s.responseText}function l(t,n,i){var r=e("fs");return i?void r.readFile(t,i):r.readFileSync(t,"utf8")}function u(t,n,i){var o=f.extend({},r.headers,n.headers),a={url:t,encoding:null,gzip:!0,headers:o};return i?void e("request")(a,function(e,t,n){e||200!==t.statusCode?(e=e||"Load failed with response code "+t.statusCode+".",i(e,null)):i(null,n)}):e("sync-request")("GET",t,a).getBody()}function c(e,t){return null!=e&&0===e.lastIndexOf(t,0)}var f=e("../util"),h=/^([A-Za-z]+:)?\/\//,d="file://";r.loader=o,r.sanitizeUrl=i,r.xhr=s,r.file=l,r.http=u,r.useXHR="undefined"!=typeof XMLHttpRequest,r.headers={},t.exports=r},{"../util":30,fs:2,request:2,"sync-request":2,url:2}],23:[function(e,t,n){function i(e,t){var n=t&&t.type||"json";return e=s[n](e,t),t&&t.parse&&r(e,t.parse),e}function r(e,t){var n,i,r,s,u,c,f=e.length;for(t="auto"===t?a.inferAll(e):o.duplicate(t),n=o.keys(t),i=n.map(function(e){var n=t[e];if(n&&0===n.indexOf("date:")){var i=n.split(/:(.+)?/,2),r=i[1];if(!("'"===r[0]&&"'"===r[r.length-1]||'"'===r[0]&&'"'===r[r.length-1]))throw Error("Format pattern must be quoted: "+r);return r=r.slice(1,-1),r=l(r),function(e){return r.parse(e)}}if(!a.parsers[n])throw Error("Illegal format pattern: "+e+":"+n);return a.parsers[n]}),s=0,c=n.length;s<f;++s)for(r=e[s],u=0;u<c;++u)r[n[u]]=i[u](r[n[u]]);a.annotation(e,t)}var o=e("../util"),a=e("./type"),s=e("./formats"),l=e("../format").time;i.formats=s,t.exports=i},{"../format":15,"../util":30,"./formats":18,"./type":25}],24:[function(e,t,n){var i=e("../util"),r=e("./load"),o=e("./read");t.exports=i.keys(o.formats).reduce(function(e,t){return e[t]=function(e,n,a){i.isString(e)&&(e={url:e}),2===arguments.length&&i.isFunction(n)&&(a=n,n=void 0),n=i.extend({parse:"auto"},n),n.type=t;var s=r(e,a?function(e,t){if(e)return void a(e,null);try{t=o(t,n),a(null,t)}catch(i){a(i,null)}}:void 0);if(!a)return o(s,n)},e},{})},{"../util":30,"./load":22,"./read":23}],25:[function(e,t,n){function i(e,t){return t?void(e[u]=t):e&&e[u]||null}function r(e,t){e=l.array(e),t=l.$(t);var n,i,r;if(e[u]&&(n=t(e[u]),l.isString(n)))return n;for(i=0,r=e.length;!l.isValid(n)&&i<r;++i)n=t?t(e[i]):e[i];return l.isDate(n)?"date":l.isNumber(n)?"number":l.isBoolean(n)?"boolean":l.isString(n)?"string":null}function o(e,t){if(e.length)return t=t||l.keys(e[0]),t.reduce(function(t,n){return t[n]=r(e,n),t},{})}function a(e,t){e=l.array(e),t=l.$(t);var n,i,r,o=["boolean","integer","number","date"];for(n=0;n<e.length;++n){for(r=t?t(e[n]):e[n],i=0;i<o.length;++i)l.isValid(r)&&!f[o[i]](r)&&(o.splice(i,1),i-=1);if(0===o.length)return"string"}return o[0]}function s(e,t){return t=t||l.keys(e[0]),t.reduce(function(t,n){return t[n]=a(e,n),t},{})}var l=e("../util"),u="__types__",c={"boolean":l["boolean"],integer:l.number,number:l.number,date:l.date,string:function(e){return null==e||""===e?null:e+""}},f={"boolean":function(e){return"true"===e||"false"===e||l.isBoolean(e)},integer:function(e){return f.number(e)&&(e=+e)===~~e},number:function(e){return!isNaN(+e)&&!l.isDate(e)},date:function(e){return!isNaN(Date.parse(e))}};r.annotation=i,r.all=o,r.infer=a,r.inferAll=s,r.parsers=c,t.exports=r},{"../util":30}],26:[function(e,t,n){var i=e("./util"),r={version:"1.7.2",load:e("./import/load"),read:e("./import/read"),type:e("./import/type"),Aggregator:e("./aggregate/aggregator"),groupby:e("./aggregate/groupby"),bins:e("./bins/bins"),$bin:e("./bins/histogram").$bin,histogram:e("./bins/histogram").histogram,format:e("./format"),template:e("./template"),time:e("./time")};i.extend(r,i),i.extend(r,e("./accessor")),i.extend(r,e("./generate")),i.extend(r,e("./stats")),i.extend(r,e("./import/readers")),i.extend(r.format,e("./format-tables")),r.print={table:r.format.table,summary:r.format.summary},t.exports=r},{"./accessor":7,"./aggregate/aggregator":8,
"./aggregate/groupby":10,"./bins/bins":12,"./bins/histogram":13,"./format":15,"./format-tables":14,"./generate":16,"./import/load":22,"./import/read":23,"./import/readers":24,"./import/type":25,"./stats":27,"./template":28,"./time":29,"./util":30}],27:[function(e,t,n){function i(e,t,n){var i=e&&e.nullh||0,r=l.random.normal(0,1),o=u.mean(t,n),a=u.stdev(t,n)/Math.sqrt(u.count.valid(t,n));if(0===a)return o-i===0?1:0;var s=(o-i)/a;return 2*r.cdf(-Math.abs(s))}function r(e,t,n,i){var r,o=i?t.map(a.$(n)):t,s=i?t.map(a.$(i)):n,l=u.count(o),c=u.count(s),f=Array();if(l!==c)throw Error("Array lengths must match.");for(r=0;r<l;++r)a.isValid(o[r])&&a.isValid(s[r])&&f.push(o[r]-s[r]);return u.z.test(f,e&&e.nullh||0)}function o(e,t,n,i){var r=i?t.map(a.$(n)):t,o=i?t.map(a.$(i)):n,s=u.count.valid(r),c=u.count.valid(o),f=l.random.normal(0,1),h=u.mean(r)-u.mean(o)-(e&&e.nullh||0),d=Math.sqrt(u.variance(r)/s+u.variance(o)/c);if(0===d)return 0===h?1:0;var p=h/d;return 2*f.cdf(-Math.abs(p))}var a=e("./util"),s=e("./import/type"),l=e("./generate"),u=t.exports;u.unique=function(e,t,n){t=a.$(t),n=n||[];var i,r,o,s={};for(r=0,o=e.length;r<o;++r)i=t?t(e[r]):e[r],i in s||(s[i]=1,n.push(i));return n},u.count=function(e){return e&&e.length||0},u.count.valid=function(e,t){t=a.$(t);var n,i,r,o=0;for(i=0,r=e.length;i<r;++i)n=t?t(e[i]):e[i],a.isValid(n)&&(o+=1);return o},u.count.missing=function(e,t){t=a.$(t);var n,i,r,o=0;for(i=0,r=e.length;i<r;++i)n=t?t(e[i]):e[i],null==n&&(o+=1);return o},u.count.distinct=function(e,t){t=a.$(t);var n,i,r,o={},s=0;for(i=0,r=e.length;i<r;++i)n=t?t(e[i]):e[i],n in o||(o[n]=1,s+=1);return s},u.count.map=function(e,t){t=a.$(t);var n,i,r,o={};for(i=0,r=e.length;i<r;++i)n=t?t(e[i]):e[i],o[n]=n in o?o[n]+1:1;return o},u.median=function(e,t){return t&&(e=e.map(a.$(t))),e=e.filter(a.isValid).sort(a.cmp),u.quantile(e,.5)},u.quartile=function(e,t){t&&(e=e.map(a.$(t))),e=e.filter(a.isValid).sort(a.cmp);var n=u.quantile;return[n(e,.25),n(e,.5),n(e,.75)]},u.quantile=function(e,t,n){void 0===n&&(n=t,t=a.identity),t=a.$(t);var i=(e.length-1)*n+1,r=Math.floor(i),o=+t(e[r-1]),s=i-r;return s?o+s*(t(e[r])-o):o},u.sum=function(e,t){t=a.$(t);for(var n,i=0,r=0,o=e.length;r<o;++r)n=t?t(e[r]):e[r],a.isValid(n)&&(i+=n);return i},u.mean=function(e,t){t=a.$(t);var n,i,r,o,s,l=0;for(i=0,o=0,r=e.length;i<r;++i)s=t?t(e[i]):e[i],a.isValid(s)&&(n=s-l,l+=n/++o);return l},u.mean.geometric=function(e,t){t=a.$(t);var n,i,r,o,s=1;for(o=0,n=0,i=e.length;o<i;++o)if(r=t?t(e[o]):e[o],a.isValid(r)){if(r<=0)throw Error("Geometric mean only defined for positive values.");s*=r,++n}return s=n>0?Math.pow(s,1/n):0},u.mean.harmonic=function(e,t){t=a.$(t);var n,i,r,o,s=0;for(o=0,n=0,i=e.length;o<i;++o)r=t?t(e[o]):e[o],a.isValid(r)&&(s+=1/r,++n);return n/s},u.variance=function(e,t){if(t=a.$(t),!a.isArray(e)||e.length<2)return 0;var n,i,r,o,s=0,l=0;for(i=0,r=0;i<e.length;++i)o=t?t(e[i]):e[i],a.isValid(o)&&(n=o-s,s+=n/++r,l+=n*(o-s));return l/=r-1},u.stdev=function(e,t){return Math.sqrt(u.variance(e,t))},u.modeskew=function(e,t){var n=u.mean(e,t),i=u.median(e,t),r=u.stdev(e,t);return 0===r?0:(n-i)/r},u.min=function(e,t){return u.extent(e,t)[0]},u.max=function(e,t){return u.extent(e,t)[1]},u.extent=function(e,t){t=a.$(t);var n,i,r,o,s=e.length;for(o=0;o<s;++o)if(r=t?t(e[o]):e[o],a.isValid(r)){n=i=r;break}for(;o<s;++o)r=t?t(e[o]):e[o],a.isValid(r)&&(r<n&&(n=r),r>i&&(i=r));return[n,i]},u.extent.index=function(e,t){t=a.$(t);var n,i,r,o,s=-1,l=-1,u=e.length;for(o=0;o<u;++o)if(r=t?t(e[o]):e[o],a.isValid(r)){n=i=r,s=l=o;break}for(;o<u;++o)r=t?t(e[o]):e[o],a.isValid(r)&&(r<n&&(n=r,s=o),r>i&&(i=r,l=o));return[s,l]},u.dot=function(e,t,n){var i,r,o=0;if(n)for(t=a.$(t),n=a.$(n),i=0;i<e.length;++i)r=t(e[i])*n(e[i]),r===r&&(o+=r);else{if(e.length!==t.length)throw Error("Array lengths must match.");for(i=0;i<e.length;++i)r=e[i]*t[i],r===r&&(o+=r)}return o},u.dist=function(e,t,n,i){var r,o,s=a.isFunction(n)||a.isString(n),l=e,u=s?e:t,c=s?i:n,f=2===c||null==c,h=e.length,d=0;for(s&&(t=a.$(t),n=a.$(n)),o=0;o<h;++o)r=s?t(l[o])-n(u[o]):l[o]-u[o],d+=f?r*r:Math.pow(Math.abs(r),c);return f?Math.sqrt(d):Math.pow(d,1/c)},u.cohensd=function(e,t,n){var i=n?e.map(a.$(t)):e,r=n?e.map(a.$(n)):t,o=u.mean(i),s=u.mean(r),l=u.count.valid(i),c=u.count.valid(r);if(l+c-2<=0)return 0;var f=u.variance(i),h=u.variance(r),d=Math.sqrt(((l-1)*f+(c-1)*h)/(l+c-2));return 0===d?0:(o-s)/d},u.covariance=function(e,t,n){var i,r,o,s,l,c=n?e.map(a.$(t)):e,f=n?e.map(a.$(n)):t,h=c.length,d=u.mean(c),p=u.mean(f),g=0,m=0;if(h!==f.length)throw Error("Input lengths must match.");for(i=0;i<h;++i)if(r=c[i],s=a.isValid(r),o=f[i],l=a.isValid(o),s&&l)g+=(r-d)*(o-p),++m;else if(s||l)throw Error("Valid values must align.");return g/(m-1)},u.rank=function(e,t){t=a.$(t)||a.identity;var n,i,r,o=e.map(function(e,n){return{idx:n,val:t(e)}}).sort(a.comparator("val")),s=e.length,l=Array(s),u=-1,c={};for(n=0;n<s;++n){if(i=o[n].val,u<0&&c===i)u=n-1;else if(u>-1&&c!==i){for(r=1+(n-1+u)/2;u<n;++u)l[o[u].idx]=r;u=-1}l[o[n].idx]=n+1,c=i}if(u>-1)for(r=1+(s-1+u)/2;u<s;++u)l[o[u].idx]=r;return l},u.cor=function(e,t,n){var i=n;n=i?e.map(a.$(n)):t,t=i?e.map(a.$(t)):e;var r=u.dot(t,n),o=u.mean(t),s=u.mean(n),l=u.stdev(t),c=u.stdev(n),f=e.length;return(r-f*o*s)/((f-1)*l*c)},u.cor.rank=function(e,t,n){var i,r,o,a=n?u.rank(e,t):u.rank(e),s=n?u.rank(e,n):u.rank(t),l=e.length;for(i=0,r=0;i<l;++i)o=a[i]-s[i],r+=o*o;return 1-6*r/(l*(l*l-1))},u.cor.dist=function(e,t,n){var i,r,o,s,l=n?e.map(a.$(t)):e,c=n?e.map(a.$(n)):t,f=u.dist.mat(l),h=u.dist.mat(c),d=f.length;for(i=0,r=0,o=0,s=0;i<d;++i)r+=f[i]*f[i],o+=h[i]*h[i],s+=f[i]*h[i];return Math.sqrt(s/Math.sqrt(r*o))},u.linearRegression=function(e,t,n){var i,r,o=n?e.map(a.$(t)):e,s=n?e.map(a.$(n)):t,l=o.length,c=u.covariance(o,s),f=u.stdev(o),h=u.stdev(s),d=c/(f*f),p=u.mean(s)-d*u.mean(o),g={slope:d,intercept:p,R:c/(f*h),rss:0};for(r=0;r<l;++r)a.isValid(o[r])&&a.isValid(s[r])&&(i=d*o[r]+p-s[r],g.rss+=i*i);return g},u.bootstrap={},u.bootstrap.ci=function(e,t,n,i,r){var o,s,c,f,h,d,p;for(a.isFunction(t)||a.isString(t)?(o=e.map(a.$(t)),s=n,c=i,f=r):(o=e,s=t,c=n,f=i),s=s?+s:1e3,c=c||.05,h=l.random.bootstrap(o,f),p=0,d=Array(s);p<s;++p)d[p]=u.mean(h.samples(o.length));return d.sort(a.numcmp),[u.quantile(d,c/2),u.quantile(d,1-c/2)]},u.z={},u.z.ci=function(e,t,n){var i=e,r=t;(a.isFunction(t)||a.isString(t))&&(i=e.map(a.$(t)),r=n),r=r||.05;var o=.05===r?1.96:l.random.normal(0,1).icdf(1-r/2),s=u.mean(i),c=u.stdev(i)/Math.sqrt(u.count.valid(i));return[s-o*c,s+o*c]},u.z.test=function(e,t,n,s){return a.isFunction(n)||a.isString(n)?(s&&s.paired?r:o)(s,e,t,n):a.isArray(t)?(n&&n.paired?r:o)(n,e,t):a.isFunction(t)||a.isString(t)?i(n,e,t):i(t,e)},u.dist.mat=function(e){var t,n,i,r=e.length,o=r*r,a=Array(o),s=l.zeros(r),u=0;for(n=0;n<r;++n)for(a[n*r+n]=0,i=n+1;i<r;++i)a[n*r+i]=t=Math.abs(e[n]-e[i]),a[i*r+n]=t,s[n]+=t,s[i]+=t;for(n=0;n<r;++n)u+=s[n],s[n]/=r;for(u/=o,n=0;n<r;++n)for(i=n;i<r;++i)a[n*r+i]+=u-s[n]-s[i],a[i*r+n]=a[n*r+i];return a},u.entropy=function(e,t){t=a.$(t);var n,i,r=0,o=0,s=e.length;for(n=0;n<s;++n)r+=t?t(e[n]):e[n];if(0===r)return 0;for(n=0;n<s;++n)i=(t?t(e[n]):e[n])/r,i&&(o+=i*Math.log(i));return-o/Math.LN2},u.mutual=function(e,t,n,i){var r,o,s,l=i?e.map(a.$(t)):e,u=i?e.map(a.$(n)):t,c=i?e.map(a.$(i)):n,f={},h={},d=c.length,p=0,g=0,m=0;for(s=0;s<d;++s)f[l[s]]=0,h[u[s]]=0;for(s=0;s<d;++s)f[l[s]]+=c[s],h[u[s]]+=c[s],p+=c[s];for(o=1/(p*Math.LN2),s=0;s<d;++s)0!==c[s]&&(r=p*c[s]/(f[l[s]]*h[u[s]]),g+=c[s]*o*Math.log(r),m+=c[s]*o*Math.log(c[s]/p));return[g,1+g/m]},u.mutual.info=function(e,t,n,i){return u.mutual(e,t,n,i)[0]},u.mutual.dist=function(e,t,n,i){return u.mutual(e,t,n,i)[1]},u.profile=function(e,t){var n,i,r,o,l,c=0,f=0,h=0,d=0,p=null,g=null,m=0,v=[],y={};for(r=0;r<e.length;++r)o=t?t(e[r]):e[r],y[o]=o in y?y[o]+1:(d+=1,1),null==o?++h:a.isValid(o)&&(l="string"==typeof o?o.length:o,(null===p||l<p)&&(p=l),(null===g||l>g)&&(g=l),n=l-c,c+=n/++f,m+=n*(l-c),v.push(l));return m/=f-1,i=Math.sqrt(m),v.sort(a.cmp),{type:s(e,t),unique:y,count:e.length,valid:f,missing:h,distinct:d,min:p,max:g,mean:c,stdev:i,median:o=u.quantile(v,.5),q1:u.quantile(v,.25),q3:u.quantile(v,.75),modeskew:0===i?0:(c-o)/i}},u.summary=function(e,t){t=t||a.keys(e[0]);var n=t.map(function(t){var n=u.profile(e,a.$(t));return n.field=t,n});return n.__summary__=!0,n}},{"./generate":16,"./import/type":25,"./util":30}],28:[function(e,t,n){function i(e){var t=r(e,"d");return t="var __t; return "+t+";",new Function("d",t).bind(f)}function r(e,t,n){t=t||"obj";var i=0,r="'",s=h;return e.replace(s,function(s,l,u){return r+=e.slice(i,u).replace(m,a),i=u+s.length,l&&(r+="'\n+((__t=("+o(l,t,n)+"))==null?'':__t)+\n'"),s}),r+"'"}function o(e,t,n){function r(e){return e=e||"",f?(f=!1,h="String("+h+")"+e):h+=e,h}function o(){return"(typeof "+h+'==="number"?new Date('+h+"):"+h+")"}function a(e){var t=_[0];if(!("'"===t[0]&&"'"===t[t.length-1]||'"'===t[0]&&'"'===t[t.length-1]))throw Error("Format pattern must be quoted: "+t);t=t.slice(1,-1),v=s(t,e),f=!1;var n="number"===e?h:o();h="this.formats["+v+"]("+n+")"}var l=e.match(d),c=l.shift().trim(),f=!0;n&&(n[c]=1);for(var h=i.property(t,c),g=0;g<l.length;++g){var m,v,y,b=l[g],_=null;switch((m=b.indexOf(":"))>0&&(b=b.slice(0,m),_=l[g].slice(m+1).match(p).map(function(e){return e.trim()})),b=b.trim()){case"length":r(".length");break;case"lower":r(".toLowerCase()");break;case"upper":r(".toUpperCase()");break;case"lower-locale":r(".toLocaleLowerCase()");break;case"upper-locale":r(".toLocaleUpperCase()");break;case"trim":r(".trim()");break;case"left":v=u.number(_[0]),r(".slice(0,"+v+")");break;case"right":v=u.number(_[0]),r(".slice(-"+v+")");break;case"mid":v=u.number(_[0]),y=v+u.number(_[1]),r(".slice(+"+v+","+y+")");break;case"slice":v=u.number(_[0]),r(".slice("+v+(_.length>1?","+u.number(_[1]):"")+")");break;case"truncate":v=u.number(_[0]),y=_[1],y="left"!==y&&"middle"!==y&&"center"!==y?"right":y,h="this.truncate("+r()+","+v+",'"+y+"')";break;case"pad":v=u.number(_[0]),y=_[1],y="left"!==y&&"middle"!==y&&"center"!==y?"right":y,h="this.pad("+r()+","+v+",'"+y+"')";break;case"number":a("number");break;case"time":a("time");break;case"time-utc":a("utc");break;case"month":h="this.month("+h+")";break;case"month-abbrev":h="this.month("+h+",true)";break;case"day":h="this.day("+h+")";break;case"day-abbrev":h="this.day("+h+",true)";break;case"quarter":h="this.quarter("+h+")";break;case"quarter-utc":h="this.utcQuarter("+h+")";break;default:throw Error("Unrecognized template filter: "+b)}}return h}function a(e){return"\\"+g[e]}function s(e,t){var n=t+":"+e;if(null==f.format_map[n]){var i=c[t](e),r=f.formats.length;return f.formats.push(i),f.format_map[n]=r,r}return f.format_map[n]}function l(e,t){return f.formats[s(e,t)]}var u=e("./util"),c=e("./format"),f={formats:[],format_map:{},truncate:u.truncate,pad:u.pad,day:c.day,month:c.month,quarter:c.quarter,utcQuarter:c.utcQuarter};i.source=r,i.context=f,i.format=l,t.exports=i,i.clearFormatCache=function(){f.formats=[],f.format_map={}},i.property=function(e,t){var n=u.field(t).map(u.str).join("][");return e+"["+n+"]"};var h=/\{\{(.+?)\}\}|$/g,d=/(?:"[^"]*"|\'[^\']*\'|[^\|"]+|[^\|\']+)+/g,p=/(?:"[^"]*"|\'[^\']*\'|[^,"]+|[^,\']+)+/g,g={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},m=/\\|'|\r|\n|\u2028|\u2029/g},{"./format":15,"./util":30}],29:[function(e,t,n){function i(e){return u.setTime(+e),u}function r(e,t,n,i,r,o){var a={type:e,date:t,unit:n};return i?a.step=i:a.minstep=1,null!=r&&(a.min=r),null!=o&&(a.max=o),a}function o(e,t,n,i,o,a){return r(e,function(e){return t.offset(n,e)},function(e){return t.count(n,e)},i,o,a)}function a(e,t,n,i){var r,o,a,s=p[0];for(r=1,o=p.length;r<o;++r)if(s=p[r],t>s[0]){if(a=t/s[0],a>i)return e[p[r-1][1]];if(a>=n)return e[s[1]]}return e[p[o-1][1]]}function s(e){var t,n,i={};for(t=0,n=e.length;t<n;++t)i[e[t].type]=e[t];return i.find=function(t,n,i){return a(e,t,n,i)},i}var l=e("d3-time"),u=new Date,c=new Date(0,0,1).setFullYear(0),f=new Date(Date.UTC(0,0,1)).setUTCFullYear(0),h=[o("second",l.second,c),o("minute",l.minute,c),o("hour",l.hour,c),o("day",l.day,c,[1,7]),o("month",l.month,c,[1,3,6]),o("year",l.year,c),r("seconds",function(e){return new Date(1970,0,1,0,0,e)},function(e){return i(e).getSeconds()},null,0,59),r("minutes",function(e){return new Date(1970,0,1,0,e)},function(e){return i(e).getMinutes()},null,0,59),r("hours",function(e){return new Date(1970,0,1,e)},function(e){return i(e).getHours()},null,0,23),r("weekdays",function(e){return new Date(1970,0,4+e)},function(e){return i(e).getDay()},[1],0,6),r("dates",function(e){return new Date(1970,0,e)},function(e){return i(e).getDate()},[1],1,31),r("months",function(e){return new Date(1970,e%12,1)},function(e){return i(e).getMonth()},[1],0,11)],d=[o("second",l.utcSecond,f),o("minute",l.utcMinute,f),o("hour",l.utcHour,f),o("day",l.utcDay,f,[1,7]),o("month",l.utcMonth,f,[1,3,6]),o("year",l.utcYear,f),r("seconds",function(e){return new Date(Date.UTC(1970,0,1,0,0,e))},function(e){return i(e).getUTCSeconds()},null,0,59),r("minutes",function(e){return new Date(Date.UTC(1970,0,1,0,e))},function(e){return i(e).getUTCMinutes()},null,0,59),r("hours",function(e){return new Date(Date.UTC(1970,0,1,e))},function(e){return i(e).getUTCHours()},null,0,23),r("weekdays",function(e){return new Date(Date.UTC(1970,0,4+e))},function(e){return i(e).getUTCDay()},[1],0,6),r("dates",function(e){return new Date(Date.UTC(1970,0,e))},function(e){return i(e).getUTCDate()},[1],1,31),r("months",function(e){return new Date(Date.UTC(1970,e%12,1))},function(e){return i(e).getUTCMonth()},[1],0,11)],p=[[31536e6,5],[7776e6,4],[2592e6,4],[12096e5,3],[6048e5,3],[1728e5,3],[864e5,3],[432e5,2],[216e5,2],[108e5,2],[36e5,2],[18e5,1],[9e5,1],[3e5,1],[6e4,1],[3e4,0],[15e3,0],[5e3,0],[1e3,0]];t.exports=s(h),t.exports.utc=s(d)},{"d3-time":6}],30:[function(e,t,n){(function(e){function n(e,t){var n,i="";for(n=0;n<e;++n)i+=t;return i}function i(e,t,n){var i=0,r=e.split(l);return e=n?(r=r.reverse()).filter(function(e){return i+=e.length,i<=t}).reverse():r.filter(function(e){return i+=e.length,i<=t}),e.length?e.join("").trim():r[0].slice(0,t)}var r=t.exports,o="__name__";r.namedfunc=function(e,t){return t[o]=e,t},r.name=function(e){return null==e?null:e[o]},r.identity=function(e){return e},r["true"]=r.namedfunc("true",function(){return!0}),r["false"]=r.namedfunc("false",function(){return!1}),r.duplicate=function(e){return JSON.parse(JSON.stringify(e))},r.equal=function(e,t){return JSON.stringify(e)===JSON.stringify(t)},r.extend=function(e){for(var t,n,i=1,r=arguments.length;i<r;++i){t=arguments[i];for(n in t)e[n]=t[n]}return e},r.length=function(e){return null!=e&&null!=e.length?e.length:null},r.keys=function(e){var t,n=[];for(t in e)n.push(t);return n},r.vals=function(e){var t,n=[];for(t in e)n.push(e[t]);return n},r.toMap=function(e,t){return(t=r.$(t))?e.reduce(function(e,n){return e[t(n)]=1,e},{}):e.reduce(function(e,t){return e[t]=1,e},{})},r.keystr=function(e){var t=e.length;if(!t)return"";for(var n=String(e[0]),i=1;i<t;++i)n+="|"+String(e[i]);return n};var a=Object.prototype.toString;r.isObject=function(e){return e===Object(e)},r.isFunction=function(e){return"[object Function]"===a.call(e)},r.isString=function(e){return"string"==typeof value||"[object String]"===a.call(e)},r.isArray=Array.isArray||function(e){return"[object Array]"===a.call(e)},r.isNumber=function(e){return"number"==typeof e||"[object Number]"===a.call(e)},r.isBoolean=function(e){return e===!0||e===!1||"[object Boolean]"==a.call(e)},r.isDate=function(e){return"[object Date]"===a.call(e)},r.isValid=function(e){return null!=e&&e===e},r.isBuffer="function"==typeof e&&e.isBuffer||r["false"],r.number=function(e){return null==e||""===e?null:+e},r["boolean"]=function(e){return null==e||""===e?null:"false"!==e&&!!e},r.date=function(e,t){var n=t?t:Date;return null==e||""===e?null:n.parse(e)},r.array=function(e){return null!=e?r.isArray(e)?e:[e]:[]},r.str=function(e){return r.isArray(e)?"["+e.map(r.str)+"]":r.isObject(e)||r.isString(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e};var s=/\[(.*?)\]|[^.\[]+/g;r.field=function(e){return String(e).match(s).map(function(e){return"["!==e[0]?e:"'"!==e[1]&&'"'!==e[1]?e.slice(1,-1):e.slice(2,-2).replace(/\\(["'])/g,"$1")})},r.accessor=function(e){return null==e||r.isFunction(e)?e:r.namedfunc(e,Function("x","return x["+r.field(e).map(r.str).join("][")+"];"))},r.$=r.accessor,r.mutator=function(e){var t;return r.isString(e)&&(t=r.field(e)).length>1?function(e,n){for(var i=0;i<t.length-1;++i)e=e[t[i]];e[t[i]]=n}:function(t,n){t[e]=n}},r.$func=function(e,t){return function(n){n=r.$(n)||r.identity;var i=e+(r.name(n)?"_"+r.name(n):"");return r.namedfunc(i,function(e){return t(n(e))})}},r.$valid=r.$func("valid",r.isValid),r.$length=r.$func("length",r.length),r.$in=function(e,t){e=r.$(e);var n=r.isArray(t)?r.toMap(t):t;return function(t){return!!n[e(t)]}},r.comparator=function(e){var t=[];return void 0===e&&(e=[]),e=r.array(e).map(function(e){var n=1;return"-"===e[0]?(n=-1,e=e.slice(1)):"+"===e[0]&&(n=1,e=e.slice(1)),t.push(n),r.accessor(e)}),function(n,i){var o,a,s,l;for(o=0,a=e.length;o<a;++o)if(s=e[o],l=r.cmp(s(n),s(i)))return l*t[o];return 0}},r.cmp=function(e,t){return(e<t||null==e)&&null!=t?-1:(e>t||null==t)&&null!=e?1:(t=t instanceof Date?+t:t,(e=e instanceof Date?+e:e)!==e&&t===t?-1:t!==t&&e===e?1:0)},r.numcmp=function(e,t){return e-t},r.stablesort=function(e,t,n){var i=e.reduce(function(e,t,i){return e[n(t)]=i,e},{});return e.sort(function(e,r){var o=t(e),a=t(r);return o<a?-1:o>a?1:i[n(e)]-i[n(r)]}),e},r.permute=function(e){for(var t,n,i=e.length;i;)n=Math.floor(Math.random()*i--),t=e[i],e[i]=e[n],e[n]=t},r.pad=function(e,t,i,r){r=r||" ";var o=t-e.length;if(o<=0)return e;switch(i){case"left":return n(o,r)+e;case"middle":case"center":return n(Math.floor(o/2),r)+e+n(Math.ceil(o/2),r);default:return e+n(o,r)}},r.truncate=function(e,t,n,r,o){var a=e.length;if(a<=t)return e;o=void 0!==o?String(o):"…";var s=Math.max(0,t-o.length);switch(n){case"left":return o+(r?i(e,s,1):e.slice(a-s));case"middle":case"center":var l=Math.ceil(s/2),u=Math.floor(s/2);return(r?i(e,l):e.slice(0,l))+o+(r?i(e,u,1):e.slice(a-u));default:return(r?i(e,s):e.slice(0,s))+o}};var l=/([\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u2028\u2029\u3000\uFEFF])/}).call(this,e("buffer").Buffer)},{buffer:2}],31:[function(t,n,i){!function(t,r){"object"==typeof i&&"undefined"!=typeof n?r(i):"function"==typeof e&&e.amd?e(["exports"],r):r(t.topojson=t.topojson||{})}(this,function(e){"use strict";function t(){}function n(e){if(!e)return t;var n,i,r=e.scale[0],o=e.scale[1],a=e.translate[0],s=e.translate[1];return function(e,t){t||(n=i=0),e[0]=(n+=e[0])*r+a,e[1]=(i+=e[1])*o+s}}function i(e){if(!e)return t;var n,i,r=e.scale[0],o=e.scale[1],a=e.translate[0],s=e.translate[1];return function(e,t){t||(n=i=0);var l=Math.round((e[0]-a)/r),u=Math.round((e[1]-s)/o);e[0]=l-n,e[1]=u-i,n=l,i=u}}function r(e,t){for(var n,i=e.length,r=i-t;r<--i;)n=e[r],e[r++]=e[i],e[i]=n}function o(e,t){for(var n=0,i=e.length;n<i;){var r=n+i>>>1;e[r]<t?n=r+1:i=r}return n}function a(e,t){return"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map(function(t){return s(e,t)})}:s(e,t)}function s(e,t){var n={type:"Feature",id:t.id,properties:t.properties||{},geometry:l(e,t)};return null==t.id&&delete n.id,n}function l(e,t){function i(e,t){t.length&&t.pop();for(var n,i=f[e<0?~e:e],o=0,a=i.length;o<a;++o)t.push(n=i[o].slice()),c(n,o);e<0&&r(t,a)}function o(e){return e=e.slice(),c(e,0),e}function a(e){for(var t=[],n=0,r=e.length;n<r;++n)i(e[n],t);return t.length<2&&t.push(t[0].slice()),t}function s(e){for(var t=a(e);t.length<4;)t.push(t[0].slice());return t}function l(e){return e.map(s)}function u(e){var t=e.type;return"GeometryCollection"===t?{type:t,geometries:e.geometries.map(u)}:t in h?{type:t,coordinates:h[t](e)}:null}var c=n(e.transform),f=e.arcs,h={Point:function(e){return o(e.coordinates)},MultiPoint:function(e){return e.coordinates.map(o)},LineString:function(e){return a(e.arcs)},MultiLineString:function(e){return e.arcs.map(a)},Polygon:function(e){return l(e.arcs)},MultiPolygon:function(e){return e.arcs.map(l)}};return u(t)}function u(e,t){function n(t){var n,i=e.arcs[t<0?~t:t],r=i[0];return e.transform?(n=[0,0],i.forEach(function(e){n[0]+=e[0],n[1]+=e[1]})):n=i[i.length-1],t<0?[n,r]:[r,n]}function i(e,t){for(var n in e){var i=e[n];delete t[i.start],delete i.start,delete i.end,i.forEach(function(e){r[e<0?~e:e]=1}),s.push(i)}}var r={},o={},a={},s=[],l=-1;return t.forEach(function(n,i){var r,o=e.arcs[n<0?~n:n];o.length<3&&!o[1][0]&&!o[1][1]&&(r=t[++l],t[l]=n,t[i]=r)}),t.forEach(function(e){var t,i,r=n(e),s=r[0],l=r[1];if(t=a[s])if(delete a[t.end],t.push(e),t.end=l,i=o[l]){delete o[i.start];var u=i===t?t:t.concat(i);o[u.start=t.start]=a[u.end=i.end]=u}else o[t.start]=a[t.end]=t;else if(t=o[l])if(delete o[t.start],t.unshift(e),t.start=s,i=a[s]){delete a[i.end];var c=i===t?t:i.concat(t);o[c.start=i.start]=a[c.end=t.end]=c}else o[t.start]=a[t.end]=t;else t=[e],o[t.start=s]=a[t.end=l]=t}),i(a,o),i(o,a),t.forEach(function(e){r[e<0?~e:e]||s.push([e])}),s}function c(e){return l(e,f.apply(this,arguments))}function f(e,t,n){function i(e){var t=e<0?~e:e;(c[t]||(c[t]=[])).push({i:e,g:l})}function r(e){e.forEach(i)}function o(e){e.forEach(r)}function a(e){"GeometryCollection"===e.type?e.geometries.forEach(a):e.type in f&&(l=e,f[e.type](e.arcs))}var s=[];if(arguments.length>1){var l,c=[],f={LineString:r,MultiLineString:o,Polygon:o,MultiPolygon:function(e){e.forEach(o)}};a(t),c.forEach(arguments.length<3?function(e){s.push(e[0].i)}:function(e){n(e[0].g,e[e.length-1].g)&&s.push(e[0].i)})}else for(var h=0,d=e.arcs.length;h<d;++h)s.push(h);return{type:"MultiLineString",arcs:u(e,s)}}function h(e){var t=e[0],n=e[1],i=e[2];return Math.abs((t[0]-i[0])*(n[1]-t[1])-(t[0]-n[0])*(i[1]-t[1]))}function d(e){for(var t,n=-1,i=e.length,r=e[i-1],o=0;++n<i;)t=r,r=e[n],o+=t[0]*r[1]-t[1]*r[0];return o/2}function p(e){return l(e,g.apply(this,arguments))}function g(e,t){function n(e){e.forEach(function(t){t.forEach(function(t){(r[t=t<0?~t:t]||(r[t]=[])).push(e)})}),o.push(e)}function i(t){return Math.abs(d(l(e,{type:"Polygon",arcs:[t]}).coordinates[0]))}var r={},o=[],a=[];return t.forEach(function(e){"Polygon"===e.type?n(e.arcs):"MultiPolygon"===e.type&&e.arcs.forEach(n)}),o.forEach(function(e){if(!e._){var t=[],n=[e];for(e._=1,a.push(t);e=n.pop();)t.push(e),e.forEach(function(e){e.forEach(function(e){r[e<0?~e:e].forEach(function(e){e._||(e._=1,n.push(e))})})})}}),o.forEach(function(e){delete e._}),{type:"MultiPolygon",arcs:a.map(function(t){var n,o=[];if(t.forEach(function(e){e.forEach(function(e){e.forEach(function(e){r[e<0?~e:e].length<2&&o.push(e)})})}),o=u(e,o),(n=o.length)>1)for(var a,s,l=1,c=i(o[0]);l<n;++l)(a=i(o[l]))>c&&(s=o[0],o[0]=o[l],o[l]=s,c=a);return o})}}function m(e){function t(e,t){e.forEach(function(e){e<0&&(e=~e);var n=r[e];n?n.push(t):r[e]=[t]})}function n(e,n){e.forEach(function(e){t(e,n)})}function i(e,t){"GeometryCollection"===e.type?e.geometries.forEach(function(e){i(e,t)}):e.type in s&&s[e.type](e.arcs,t)}var r={},a=e.map(function(){return[]}),s={LineString:t,MultiLineString:n,Polygon:n,MultiPolygon:function(e,t){e.forEach(function(e){n(e,t)})}};e.forEach(i);for(var l in r)for(var u=r[l],c=u.length,f=0;f<c;++f)for(var h=f+1;h<c;++h){var d,p=u[f],g=u[h];(d=a[p])[l=o(d,g)]!==g&&d.splice(l,0,g),(d=a[g])[l=o(d,p)]!==p&&d.splice(l,0,p)}return a}function v(e,t){return e[1][2]-t[1][2]}function y(){function e(e,t){for(;t>0;){var n=(t+1>>1)-1,r=i[n];if(v(e,r)>=0)break;i[r._=t]=r,i[e._=t=n]=e}}function t(e,t){for(;;){var n=t+1<<1,o=n-1,a=t,s=i[a];if(o<r&&v(i[o],s)<0&&(s=i[a=o]),n<r&&v(i[n],s)<0&&(s=i[a=n]),a===t)break;i[s._=t]=s,i[e._=t=a]=e}}var n={},i=[],r=0;return n.push=function(t){return e(i[t._=r]=t,r++),r},n.pop=function(){if(!(r<=0)){var e,n=i[0];return--r>0&&(e=i[r],t(i[e._=0]=e,0)),n}},n.remove=function(n){var o,a=n._;if(i[a]===n)return a!==--r&&(o=i[r],(v(o,n)<0?e:t)(i[o._=a]=o,a)),a},n}function b(e,t){function r(e){s.remove(e),e[1][2]=t(e),s.push(e)}var o=n(e.transform),a=i(e.transform),s=y();return t||(t=h),e.arcs.forEach(function(e){var n,i,l,u,c=[],f=0;for(i=0,l=e.length;i<l;++i)u=e[i],o(e[i]=[u[0],u[1],1/0],i);for(i=1,l=e.length-1;i<l;++i)n=e.slice(i-1,i+2),n[1][2]=t(n),c.push(n),s.push(n);for(i=0,l=c.length;i<l;++i)n=c[i],n.previous=c[i-1],n.next=c[i+1];for(;n=s.pop();){var h=n.previous,d=n.next;n[1][2]<f?n[1][2]=f:f=n[1][2],h&&(h.next=d,h[2]=n[2],r(h)),d&&(d.previous=h,d[0]=n[0],r(d))}e.forEach(a)}),e}var _="1.6.26";e.version=_,e.mesh=c,e.meshArcs=f,e.merge=p,e.mergeArcs=g,e.feature=a,e.neighbors=m,e.presimplify=b})},{}],32:[function(e,t,n){function i(e,t){var n={};return r(e,n),n.add=[],n.mod=[],n.rem=[],n.reflow=t,n}function r(e,t){t.stamp=e?e.stamp:0,t.sort=e?e.sort:null,t.facet=e?e.facet:null,t.trans=e?e.trans:null,t.dirty=e?e.dirty:[],t.request=e?e.request:null;for(var n,i=0,r=o.length;i<r;++i)t[n=o[i]]=e?e[n]:{}}var o=e("./Dependencies").ALL;t.exports={create:i,copy:r}},{"./Dependencies":35}],33:[function(e,t,n){function i(e){a.init.call(this,e),this._data=[],this.router(!0).collector(!0)}var r=e("vega-logging"),o=e("./Tuple"),a=e("./Node").prototype,s=e("./ChangeSet"),l=i.prototype=Object.create(a);l.constructor=i,l.data=function(){return this._data},l.evaluate=function(e){r.debug(e,["collecting"]);var t=s.create(e);return e.rem.length&&(this._data=o.idFilter(this._data,e.rem),t.rem=e.rem.slice(0)),e.add.length&&(this._data=this._data.concat(e.add),t.add=e.add.slice(0)),e.mod.length&&(t.mod=e.mod.slice(0)),e.sort&&this._data.sort(e.sort),e.reflow&&(t.mod=t.mod.concat(o.idFilter(this._data,t.add,t.mod,t.rem)),t.reflow=!1),t},t.exports=i},{"./ChangeSet":32,"./Node":38,"./Tuple":40,"vega-logging":48}],34:[function(e,t,n){function i(e,t,n){this._graph=e,this._name=t,this._data=[],this._source=null,this._facet=n,this._input=u.create(),this._output=null,this._indexes={},this._indexFields=[],this._inputNode=null,this._outputNode=null,this._pipeline=null,this._collector=null,this._mutates=!1}function r(e){var t=new h(e._graph).router(!0).collector(!0);return t.data=function(){return e._data},t.evaluate=function(t){l.debug(t,["input",e._name]);var n,i=e._input,r=u.create(t);for(n in i.fields)r.fields[n]=1;return i.rem.length&&(e._data=f.idFilter(e._data,i.rem)),i.add.length&&(e._data=e._data.concat(i.add)),i.sort&&e._data.sort(i.sort),t.reflow&&(i.mod=i.mod.concat(f.idFilter(e._data,i.add,i.mod,i.rem))),e._input=u.create(),r.add=i.add,r.mod=i.mod,r.rem=i.rem,r.facet=e._facet,r},t}function o(e){function t(t){var n,i,r,o,a,l,u=e._indexFields;for(n=0;n<u.length;++n){for(o=u[n],a=e._indexes[o],r=s.$(o),i=0;i<t.add.length;++i)l=r(t.add[i]),f.prev_init(t.add[i]),a[l]=(a[l]||0)+1;for(i=0;i<t.rem.length;++i)l=r(t.rem[i]),a[l]=(a[l]||0)-1;for(i=0;i<t.mod.length;++i)l=r(t.mod[i]._prev),a[l]=(a[l]||0)-1,l=r(t.mod[i]),a[l]=(a[l]||0)+1}}var n=new h(e._graph).router(!0).reflows(!0).collector(!0);return n.data=function(){return e._collector?e._collector.data():e._data},n.evaluate=function(n){l.debug(n,["output",e._name]),t(n);var i=u.create(n,!0);return e._facet&&(e._facet.values=e.values(),n.facet=null),e._output=n,i.data[e._name]=1,i},n}function a(e){var t=new h(e._graph).router(!0);return t.evaluate=function(t){if(e.mutates()){var n=e._srcMap||(e._srcMap={}),i=u.create(t);return i.add=t.add.map(function(e){return n[e._id]=f.derive(e)}),i.mod=t.mod.map(function(e){return f.rederive(e,n[e._id])}),i.rem=t.rem.map(function(e){var t=n[e._id];return n[e._id]=null,t}),e._input=i}return e._input=t},t}var s=e("datalib"),l=e("vega-logging"),u=e("./ChangeSet"),c=e("./Collector"),f=e("./Tuple"),h=e("./Node"),d=i.prototype;d.name=function(e){return arguments.length?(this._name=e,this):this._name},d.source=function(e){return arguments.length?this._source=this._graph.data(e):this._source},d.insert=function(e){return this._input.add=this._input.add.concat(e.map(f.ingest)),this},d.remove=function(e){var t=this._data.filter(e);return this._input.rem=this._input.rem.concat(t),this},d.update=function(e,t,n){var i=this._input.mod,r=f.idMap(i);return this._input.fields[t]=1,this._data.filter(e).forEach(function(e){var o=e[t],a=n(e);o!==a&&(f.set(e,t,a),1!==r[e._id]&&(i.push(e),r[e._id]=1))}),this},d.values=function(e){return arguments.length?(this._input.rem=this._data.slice(),e&&this.insert(e),this):this._collector.data()},d.mutates=function(e){return arguments.length?(this._mutates=this._mutates||e,this):this._mutates},d.last=function(){return this._output},d.fire=function(e){return e&&(this._input=e),this._graph.propagate(this._input,this._pipeline[0]),this},d.pipeline=function(e){if(!arguments.length)return this._pipeline;var t,n=this._graph;return e.unshift(this._inputNode=r(this)),t=n.preprocess(e),t.router&&e.push(t.collector=new c(n)),e.push(this._outputNode=o(this)),this._collector=t.collector,this._mutates=!!t.mutates,n.connect(this._pipeline=e),this},d.synchronize=function(){return this._graph.synchronize(this._pipeline),this},d.getIndex=function(e){var t,n,i,r,o=this.values(),a=this._indexes,l=this._indexFields,u=s.$(e);if(!a[e])for(a[e]=t={},l.push(e),n=0,i=o.length;n<i;++n)r=u(o[n]),t[r]=(t[r]||0)+1,f.prev_init(o[n]);return a[e]},d.listener=function(){return a(this).addListener(this._inputNode)},d.addListener=function(e){return e instanceof i?this._collector.addListener(e.listener()):this._outputNode.addListener(e),this},d.removeListener=function(e){this._outputNode.removeListener(e)},d.listeners=function(e){return(e?this._collector:this._outputNode).listeners()},t.exports=i},{"./ChangeSet":32,"./Collector":33,"./Node":38,"./Tuple":40,datalib:26,"vega-logging":48}],35:[function(e,t,n){var i=t.exports={ALL:["data","fields","scales","signals"]};i.ALL.forEach(function(e){i[e.toUpperCase()]=e})},{}],36:[function(e,t,n){function i(){}var r=e("datalib"),o=e("vega-logging"),a=e("./Heap"),s=e("./ChangeSet"),l=e("./DataSource"),u=e("./Collector"),c=e("./Tuple"),f=e("./Signal"),h=e("./Dependencies"),d=i.prototype;d.init=function(){this._stamp=0,this._rank=0,this._data={},this._signals={},this._requestedIndexes={},this.doNotPropagate={}},d.rank=function(){return++this._rank},d.values=function(e,t,n){var i,o,a=e===h.SIGNALS?this._signals:this._data,s=void 0!==t?t:r.keys(a);if(Array.isArray(s)){for(i=n||{},o=0;o<s.length;++o)i[s[o]]=a[s[o]].values();return i}return a[s].values()},d.dataValues=function(e){return this.values(h.DATA,e)},d.signalValues=function(e){return this.values(h.SIGNALS,e)},d.data=function(e,t,n){var i=this._data;if(arguments.length)return 1===arguments.length?i[e]:i[e]=new l(this,e,n).pipeline(t);var r,o=[];for(r in i)o.push(i[r]);return o},d.signal=function(e,t){if(1===arguments.length){var n=this;return Array.isArray(e)?e.map(function(e){return n._signals[e]}):this._signals[e]}return this._signals[e]=new f(this,e,t)},d.signalRef=function(e){Array.isArray(e)||(e=r.field(e));var t=this.signal(e[0]).value();if(e.length>1)for(var n=1,i=e.length;n<i;++n)t=t[e[n]];return t},d.requestIndex=function(e,t){var n=this._requestedIndexes,i=n[e]||(n[e]={});return i[t]=!0,this},d.buildIndexes=function(){var e,t,n,i,o,a,s,l,u=this._requestedIndexes,c=r.keys(u);for(e=0,t=c.length;e<t;++e){if(a=this.data(o=c[e]),!a)throw Error("Data source "+r.str(o)+" does not exist.");for(s=r.keys(u[o]),n=0,i=s.length;n<i;++n)null!==(l=s[n])&&(a.getIndex(l),u[o][l]=null)}return this},d.propagate=function(e,t,n,i){var r,o,l,u,c,h,d,p,g={},m=new a(function(e,t){return e._qrank-t._qrank});if(e.stamp)throw Error("Pulse already has a non-zero stamp.");for(e.stamp=n||++this._stamp,g[t._id]=e,m.push(t.qrank(!0));m.size()>0;)if(t=m.peek(),p=t instanceof f,e=g[t._id],t.rank()!==t.qrank())m.replace(t.qrank(!0));else if(m.pop(),g[t._id]=null,r=t._listeners,(!p||p&&!i)&&(e=this.evaluate(e,t)),e!==this.doNotPropagate)for(!e.reflow&&t.reflows()&&(e=s.create(e,!0)),h=0,d=r.length;h<d;++h)if(o=r[h],
void 0!==(l=g[o._id])){if(null===l)throw Error("Already propagated to node.");if(l===e)continue;if(u=e.add.length||e.mod.length||e.rem.length,c=l.add.length||l.mod.length||l.rem.length,u&&c)throw Error("Multiple changeset pulses to same node");g[o._id]=u?e:l,g[o._id].reflow=e.reflow||l.reflow}else m.push(o.qrank(!0)),g[o._id]=e;return this.done(e)},d.done=function(e){o.debug(e,["bookkeeping"]);for(var t in e.data)this.data(t).synchronize();return this},d.preprocess=function(e){for(var t,n,i,r,o=this,a=0,s=0;s<e.length;++s)t=e[s],t.batch()&&!t._collector&&(n||!i?(t=new u(o),e.splice(s,0,t),n=!1):t._collector=i),(r=t.collector())&&(i=t),n=n||t.router()&&!r,a=a||t.mutates(),t.produces()&&(e.splice(s+1,0,new u(o)),n=!1);return{router:n,collector:i,mutates:a}},d.connect=function(e){var t,n,i,o,a,s,l,u,c,f;for(a=0,s=e.length;a<s;++a){for(n=e[a],n.collector()&&(t=n),i=n.dependency(h.DATA),l=0,u=i.length;l<u;++l){if(!(c=this.data(f=i[l])))throw new Error("Unknown data source "+r.str(f));c.addListener(t)}for(o=n.dependency(h.SIGNALS),l=0,u=o.length;l<u;++l){if(!(c=this.signal(f=o[l])))throw new Error("Unknown signal "+r.str(f));c.addListener(t)}a>0&&e[a-1].addListener(n)}return e},d.disconnect=function(e){var t,n,i,r,o,a,s,l;for(o=0,a=e.length;o<a;++o){for(n=e[o],n.collector()&&(t=n),i=n.dependency(h.DATA),s=0,l=i.length;s<l;++s)this.data(i[s]).removeListener(t);for(r=n.dependency(h.SIGNALS),s=0,l=r.length;s<l;++s)this.signal(r[s]).removeListener(t);n.disconnect()}return e},d.synchronize=function(e){var t,n,i,r,o,a,s,l,u={};for(i=0,r=e.length;i<r;++i)if(t=e[i],t.collector())for(o=0,n=t.data(),a=n.length;o<a;++o)l=(s=n[o])._id,u[l]||(c.prev_update(s),u[l]=1);return this},d.reevaluate=function(e,t){var n=e.reflow&&t.last()>=e.stamp,i=t.router()||e.add.length||e.rem.length;return i||!n||t.reevaluate(e)},d.evaluate=function(e,t){return this.reevaluate(e,t)?(e=t.evaluate(e),t.last(e.stamp),e):e},t.exports=i},{"./ChangeSet":32,"./Collector":33,"./DataSource":34,"./Dependencies":35,"./Heap":37,"./Signal":39,"./Tuple":40,datalib:26,"vega-logging":48}],37:[function(e,t,n){function i(e){this.cmp=e,this.nodes=[]}function r(e,t,n,i){var r,o,a;for(r=e[n];n>t&&(a=n-1>>1,o=e[a],i(r,o)<0);)e[n]=o,n=a;return e[n]=r}function o(e,t,n){for(var i,o=t,a=e.length,s=e[t],l=2*t+1;l<a;)i=l+1,i<a&&n(e[l],e[i])>=0&&(l=i),e[t]=e[l],t=l,l=2*t+1;return e[t]=s,r(e,o,t,n)}var a=i.prototype;a.size=function(){return this.nodes.length},a.clear=function(){return this.nodes=[],this},a.peek=function(){return this.nodes[0]},a.push=function(e){var t=this.nodes;return t.push(e),r(t,0,t.length-1,this.cmp)},a.pop=function(){var e,t=this.nodes,n=t.pop();return t.length?(e=t[0],t[0]=n,o(t,0,this.cmp)):e=n,e},a.replace=function(e){var t=this.nodes,n=t[0];return t[0]=e,o(t,0,this.cmp),n},a.pushpop=function(e){var t=this.nodes,n=t[0];return t.length&&this.cmp(n,e)<0&&(t[0]=e,e=n,o(t,0,this.cmp)),e},t.exports=i},{}],38:[function(e,t,n){function i(e){e&&this.init(e)}var r=e("./Dependencies").ALL,o=0,a=i.Flags={Router:1,Collector:2,Produces:4,Mutates:8,Reflows:16,Batch:32},s=i.prototype;s.init=function(e){this._id=++o,this._graph=e,this._rank=e.rank(),this._qrank=null,this._stamp=0,this._listeners=[],this._listeners._ids={},this._deps={};for(var t=0,n=r.length;t<n;++t)this._deps[r[t]]=[];return this._flags=0,this},s.rank=function(){return this._rank},s.rerank=function(){for(var e,t=this._graph,n=[this];n.length;)e=n.shift(),e._rank=t.rank(),n.unshift.apply(n,e.listeners());return this},s.qrank=function(){return arguments.length?(this._qrank=this._rank,this):this._qrank},s.last=function(e){return arguments.length?(this._stamp=e,this):this._stamp},s._setf=function(e,t){return t?this._flags|=e:this._flags&=~e,this},s.router=function(e){return arguments.length?this._setf(a.Router,e):this._flags&a.Router},s.collector=function(e){return arguments.length?this._setf(a.Collector,e):this._flags&a.Collector},s.produces=function(e){return arguments.length?this._setf(a.Produces,e):this._flags&a.Produces},s.mutates=function(e){return arguments.length?this._setf(a.Mutates,e):this._flags&a.Mutates},s.reflows=function(e){return arguments.length?this._setf(a.Reflows,e):this._flags&a.Reflows},s.batch=function(e){return arguments.length?this._setf(a.Batch,e):this._flags&a.Batch},s.dependency=function(e,t){var n=this._deps[e],i=n._names||(n._names={});if(1===arguments.length)return n;if(null===t)n.splice(0,n.length),n._names={};else if(Array.isArray(t))for(var r,o=0,a=t.length;o<a;++o)r=t[o],i[r]||(n.push(r),i[r]=1);else{if(i[t])return this;n.push(t),i[t]=1}return this},s.listeners=function(){return this._listeners},s.addListener=function(e){if(!(e instanceof i))throw Error("Listener is not a Node");return this._listeners._ids[e._id]?this:(this._listeners.push(e),this._listeners._ids[e._id]=1,this._rank>e._rank&&e.rerank(),this)},s.removeListener=function(e){if(!this._listeners._ids[e._id])return!1;var t=this._listeners.indexOf(e),n=t>=0;return n&&(this._listeners.splice(t,1),this._listeners._ids[e._id]=null),n},s.disconnect=function(){this._listeners=[],this._listeners._ids={}},s.evaluate=function(e){return e},s.reevaluate=function(e){var t,n,i,o,a,s;for(i=0,o=r.length;i<o;++i)for(t=r[i],n=this._deps[t],a=0,s=n.length;a<s;++a)if(e[t][n[a]])return!0;return!1},i.reset=function(){o=0},t.exports=i},{"./Dependencies":35}],39:[function(e,t,n){function i(e,t,n){return a.init.call(this,e),this._name=t,this._value=n,this._verbose=!1,this._handlers=[],this}var r=e("./ChangeSet"),o=e("./Node"),a=o.prototype,s=i.prototype=Object.create(a);s.constructor=i,s.name=function(){return this._name},s.value=function(e){return arguments.length?(this._value=e,this):this._value},s.values=s.value,s.verbose=function(e){return arguments.length?(this._verbose=!!e,this):this._verbose},s.evaluate=function(e){return e.signals[this._name]?e:this._graph.doNotPropagate},s.fire=function(e){e||(e=r.create(null,!0)),e.signals[this._name]=1,this._graph.propagate(e,this)},s.on=function(e){var t=this,n=new o(this._graph);return n.evaluate=function(n){return e(t.name(),t.value()),n},this._handlers.push({handler:e,node:n}),this.addListener(n)},s.off=function(e){var t,n,i=this._handlers;for(t=i.length;--t>=0;)e&&i[t].handler!==e||(n=i.splice(t,1)[0],this.removeListener(n.node));return this},t.exports=i},{"./ChangeSet":32,"./Node":38}],40:[function(e,t,n){function i(e){return e=e===Object(e)?e:{data:e},e._id=++a,e._prev&&(e._prev=null),e}function r(e,t){t=t||{};for(var n=0,i=e.length;n<i;++n)t[e[n]._id]=1;return t}function o(e,t){t=t||{};for(var n in e)"_prev"!==n&&"_id"!==n&&(t[n]=e[n]);return t}var a=0;t.exports={ingest:i,idMap:r,derive:function(e){return i(o(e))},rederive:function(e,t){return o(e,t)},set:function(e,t,n){return e[t]===n?0:(e[t]=n,1)},prev:function(e){return e._prev||e},prev_init:function(e){e._prev||(e._prev={_id:e._id})},prev_update:function(e){var t,n,i=e._prev;if(i)for(t in e)"_prev"!==t&&"_id"!==t&&(i[t]=(n=e[t])instanceof Object&&n._prev?n._prev:n)},reset:function(){a=0},idFilter:function(e){for(var t={},n=arguments.length;--n>0;)r(arguments[n],t);return e.filter(function(e){return!t[e._id]})}}},{}],41:[function(e,t,n){t.exports={ChangeSet:e("./ChangeSet"),Collector:e("./Collector"),DataSource:e("./DataSource"),Dependencies:e("./Dependencies"),Graph:e("./Graph"),Node:e("./Node"),Signal:e("./Signal"),Tuple:e("./Tuple"),debug:e("vega-logging").debug}},{"./ChangeSet":32,"./Collector":33,"./DataSource":34,"./Dependencies":35,"./Graph":36,"./Node":38,"./Signal":39,"./Tuple":40,"vega-logging":48}],42:[function(e,t,n){t.exports=function(){"use strict";function e(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n}function t(e,n,i,r){this.message=e,this.expected=n,this.found=i,this.location=r,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t)}function n(e){function n(t){var n,i,r=pt[t];if(r)return r;for(n=t-1;!pt[n];)n--;for(r=pt[n],r={line:r.line,column:r.column,seenCR:r.seenCR};n<t;)i=e.charAt(n),"\n"===i?(r.seenCR||r.line++,r.column=1,r.seenCR=!1):"\r"===i||"\u2028"===i||"\u2029"===i?(r.line++,r.column=1,r.seenCR=!0):(r.column++,r.seenCR=!1),n++;return pt[t]=r,r}function i(e,t){var i=n(e),r=n(t);return{start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:r.line,column:r.column}}}function r(e){ht<gt||(ht>gt&&(gt=ht,mt=[]),mt.push(e))}function o(e,n,i,r){function o(e){var t=1;for(e.sort(function(e,t){return e.description<t.description?-1:e.description>t.description?1:0});t<e.length;)e[t-1]===e[t]?e.splice(t,1):t++}function a(e,t){function n(e){function t(e){return e.charCodeAt(0).toString(16).toUpperCase()}return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E\x0F]/g,function(e){return"\\x0"+t(e)}).replace(/[\x10-\x1F\x80-\xFF]/g,function(e){return"\\x"+t(e)}).replace(/[\u0100-\u0FFF]/g,function(e){return"\\u0"+t(e)}).replace(/[\u1000-\uFFFF]/g,function(e){return"\\u"+t(e)})}var i,r,o,a=new Array(e.length);for(o=0;o<e.length;o++)a[o]=e[o].description;return i=e.length>1?a.slice(0,-1).join(", ")+" or "+a[e.length-1]:a[0],r=t?'"'+n(t)+'"':"end of input","Expected "+i+" but "+r+" found."}return null!==n&&o(n),new t(null!==e?e:a(n,i),n,i,r)}function a(){var e;return e=s()}function s(){var t,n,i,o,a,u;return t=ht,n=l(),n!==_?(i=v(),i!==_?(44===e.charCodeAt(ht)?(o=w,ht++):(o=_,0===vt&&r(T)),o!==_?(a=v(),a!==_?(u=s(),u!==_?(dt=t,n=S(n,u),t=n):(ht=t,t=_)):(ht=t,t=_)):(ht=t,t=_)):(ht=t,t=_)):(ht=t,t=_),t===_&&(t=ht,n=l(),n!==_&&(dt=t,n=A(n)),t=n),t}function l(){var t,n,i,o,a,s,c,f,h,d,p,g,m,y;return t=ht,91===e.charCodeAt(ht)?(n=C,ht++):(n=_,0===vt&&r(k)),n!==_?(i=v(),i!==_?(o=u(),o!==_?(a=v(),a!==_?(44===e.charCodeAt(ht)?(s=w,ht++):(s=_,0===vt&&r(T)),s!==_?(c=v(),c!==_?(f=u(),f!==_?(h=v(),h!==_?(93===e.charCodeAt(ht)?(d=O,ht++):(d=_,0===vt&&r(I)),d!==_?(p=v(),p!==_?(62===e.charCodeAt(ht)?(g=N,ht++):(g=_,0===vt&&r(M)),g!==_?(m=v(),m!==_?(y=l(),y!==_?(dt=t,n=D(o,f,y),t=n):(ht=t,t=_)):(ht=t,t=_)):(ht=t,t=_)):(ht=t,t=_)):(ht=t,t=_)):(ht=t,t=_)):(ht=t,t=_)):(ht=t,t=_)):(ht=t,t=_)):(ht=t,t=_)):(ht=t,t=_)):(ht=t,t=_)):(ht=t,t=_),t===_&&(t=u()),t}function u(){var e,t,n,i;if(e=ht,t=c(),t!==_){if(n=[],i=d(),i!==_)for(;i!==_;)n.push(i),i=d();else n=_;n!==_?(dt=e,t=L(t,n),e=t):(ht=e,e=_)}else ht=e,e=_;return e===_&&(e=ht,t=c(),t!==_&&(dt=e,t=$(t)),e=t),e}function c(){var t,n,i,o,a;return t=ht,40===e.charCodeAt(ht)?(n=R,ht++):(n=_,0===vt&&r(P)),n!==_?(i=s(),i!==_?(41===e.charCodeAt(ht)?(o=F,ht++):(o=_,0===vt&&r(U)),o!==_?(dt=t,n=j(i),t=n):(ht=t,t=_)):(ht=t,t=_)):(ht=t,t=_),t===_&&(t=ht,64===e.charCodeAt(ht)?(n=H,ht++):(n=_,0===vt&&r(z)),n!==_?(i=p(),i!==_?(58===e.charCodeAt(ht)?(o=B,ht++):(o=_,0===vt&&r(q)),o!==_?(a=h(),a!==_?(dt=t,n=W(i,a),t=n):(ht=t,t=_)):(ht=t,t=_)):(ht=t,t=_)):(ht=t,t=_),t===_&&(t=ht,n=f(),n!==_?(58===e.charCodeAt(ht)?(i=B,ht++):(i=_,0===vt&&r(q)),i!==_?(o=h(),o!==_?(dt=t,n=Y(n,o),t=n):(ht=t,t=_)):(ht=t,t=_)):(ht=t,t=_),t===_&&(t=ht,n=g(),n!==_?(58===e.charCodeAt(ht)?(i=B,ht++):(i=_,0===vt&&r(q)),i!==_?(o=h(),o!==_?(dt=t,n=G(n,o),t=n):(ht=t,t=_)):(ht=t,t=_)):(ht=t,t=_),t===_&&(t=ht,n=h(),n!==_&&(dt=t,n=X(n)),t=n,t===_&&(t=ht,n=p(),n!==_&&(dt=t,n=V(n)),t=n))))),t}function f(){var t;return e.substr(ht,4)===K?(t=K,ht+=4):(t=_,0===vt&&r(Z)),t===_&&(e.substr(ht,6)===Q?(t=Q,ht+=6):(t=_,0===vt&&r(J)),t===_&&(e.substr(ht,4)===ee?(t=ee,ht+=4):(t=_,0===vt&&r(te)),t===_&&(e.substr(ht,3)===ne?(t=ne,ht+=3):(t=_,0===vt&&r(ie)),t===_&&(e.substr(ht,4)===re?(t=re,ht+=4):(t=_,0===vt&&r(oe)),t===_&&(e.substr(ht,4)===ae?(t=ae,ht+=4):(t=_,0===vt&&r(se)),t===_&&(e.substr(ht,4)===le?(t=le,ht+=4):(t=_,0===vt&&r(ue)),t===_&&(e.substr(ht,5)===ce?(t=ce,ht+=5):(t=_,0===vt&&r(fe)),t===_&&(e.substr(ht,4)===he?(t=he,ht+=4):(t=_,0===vt&&r(de)),t===_&&(e.substr(ht,5)===pe?(t=pe,ht+=5):(t=_,0===vt&&r(ge))))))))))),t}function h(){var t;return e.substr(ht,9)===me?(t=me,ht+=9):(t=_,0===vt&&r(ve)),t===_&&(e.substr(ht,7)===ye?(t=ye,ht+=7):(t=_,0===vt&&r(be)),t===_&&(e.substr(ht,5)===_e?(t=_e,ht+=5):(t=_,0===vt&&r(Ee)),t===_&&(e.substr(ht,8)===xe?(t=xe,ht+=8):(t=_,0===vt&&r(we)),t===_&&(e.substr(ht,5)===Te?(t=Te,ht+=5):(t=_,0===vt&&r(Se)),t===_&&(e.substr(ht,7)===Ae?(t=Ae,ht+=7):(t=_,0===vt&&r(Ce)),t===_&&(e.substr(ht,8)===ke?(t=ke,ht+=8):(t=_,0===vt&&r(Oe)),t===_&&(e.substr(ht,5)===Ie?(t=Ie,ht+=5):(t=_,0===vt&&r(Ne)),t===_&&(e.substr(ht,10)===Me?(t=Me,ht+=10):(t=_,0===vt&&r(De)),t===_&&(e.substr(ht,9)===Le?(t=Le,ht+=9):(t=_,0===vt&&r($e)),t===_&&(e.substr(ht,8)===Re?(t=Re,ht+=8):(t=_,0===vt&&r(Pe)),t===_&&(e.substr(ht,9)===Fe?(t=Fe,ht+=9):(t=_,0===vt&&r(Ue)),t===_&&(e.substr(ht,10)===je?(t=je,ht+=10):(t=_,0===vt&&r(He)),t===_&&(e.substr(ht,10)===ze?(t=ze,ht+=10):(t=_,0===vt&&r(Be)),t===_&&(e.substr(ht,9)===qe?(t=qe,ht+=9):(t=_,0===vt&&r(We)),t===_&&(e.substr(ht,8)===Ye?(t=Ye,ht+=8):(t=_,0===vt&&r(Ge)),t===_&&(e.substr(ht,9)===Xe?(t=Xe,ht+=9):(t=_,0===vt&&r(Ve)),t===_&&(e.substr(ht,8)===Ke?(t=Ke,ht+=8):(t=_,0===vt&&r(Ze)),t===_&&(e.substr(ht,9)===Qe?(t=Qe,ht+=9):(t=_,0===vt&&r(Je)))))))))))))))))))),t}function d(){var t,n,i,o;return t=ht,91===e.charCodeAt(ht)?(n=C,ht++):(n=_,0===vt&&r(k)),n!==_?(i=m(),i!==_?(93===e.charCodeAt(ht)?(o=O,ht++):(o=_,0===vt&&r(I)),o!==_?(dt=t,n=et(i),t=n):(ht=t,t=_)):(ht=t,t=_)):(ht=t,t=_),t}function p(){var t,n,i;if(t=ht,n=[],tt.test(e.charAt(ht))?(i=e.charAt(ht),ht++):(i=_,0===vt&&r(nt)),i!==_)for(;i!==_;)n.push(i),tt.test(e.charAt(ht))?(i=e.charAt(ht),ht++):(i=_,0===vt&&r(nt));else n=_;return n!==_&&(dt=t,n=it(n)),t=n}function g(){var t,n,i;if(t=ht,n=[],rt.test(e.charAt(ht))?(i=e.charAt(ht),ht++):(i=_,0===vt&&r(ot)),i!==_)for(;i!==_;)n.push(i),rt.test(e.charAt(ht))?(i=e.charAt(ht),ht++):(i=_,0===vt&&r(ot));else n=_;return n!==_&&(dt=t,n=at(n)),t=n}function m(){var t,n,i;if(t=ht,n=[],st.test(e.charAt(ht))?(i=e.charAt(ht),ht++):(i=_,0===vt&&r(lt)),i!==_)for(;i!==_;)n.push(i),st.test(e.charAt(ht))?(i=e.charAt(ht),ht++):(i=_,0===vt&&r(lt));else n=_;return n!==_&&(dt=t,n=ut(n)),t=n}function v(){var t,n;for(t=[],ct.test(e.charAt(ht))?(n=e.charAt(ht),ht++):(n=_,0===vt&&r(ft));n!==_;)t.push(n),ct.test(e.charAt(ht))?(n=e.charAt(ht),ht++):(n=_,0===vt&&r(ft));return t}var y,b=arguments.length>1?arguments[1]:{},_={},E={start:a},x=a,w=",",T={type:"literal",value:",",description:'","'},S=function(e,t){return[e].concat(t)},A=function(e){return[e]},C="[",k={type:"literal",value:"[",description:'"["'},O="]",I={type:"literal",value:"]",description:'"]"'},N=">",M={type:"literal",value:">",description:'">"'},D=function(e,t,n){return{start:e,middle:n,end:t,str:"["+e.str+", "+t.str+"] > "+n.str}},L=function(e,t){return e.filters=t,e.str+=t.map(function(e){return"["+e+"]"}).join(""),e},$=function(e){return e},R="(",P={type:"literal",value:"(",description:'"("'},F=")",U={type:"literal",value:")",description:'")"'},j=function(e){return{stream:e,str:"("+e.map(function(e){return e.str}).join(", ")+")"}},H="@",z={type:"literal",value:"@",description:'"@"'},B=":",q={type:"literal",value:":",description:'":"'},W=function(e,t){return{event:t,name:e,str:"@"+e+":"+t}},Y=function(e,t){return{event:t,mark:e,str:e+":"+t}},G=function(e,t){return{event:t,target:e,str:e+":"+t}},X=function(e){return{event:e,str:e}},V=function(e){return{signal:e,str:e}},K="rect",Z={type:"literal",value:"rect",description:'"rect"'},Q="symbol",J={type:"literal",value:"symbol",description:'"symbol"'},ee="path",te={type:"literal",value:"path",description:'"path"'},ne="arc",ie={type:"literal",value:"arc",description:'"arc"'},re="area",oe={type:"literal",value:"area",description:'"area"'},ae="line",se={type:"literal",value:"line",description:'"line"'},le="rule",ue={type:"literal",value:"rule",description:'"rule"'},ce="image",fe={type:"literal",value:"image",description:'"image"'},he="text",de={type:"literal",value:"text",description:'"text"'},pe="group",ge={type:"literal",value:"group",description:'"group"'},me="mousedown",ve={type:"literal",value:"mousedown",description:'"mousedown"'},ye="mouseup",be={type:"literal",value:"mouseup",description:'"mouseup"'},_e="click",Ee={type:"literal",value:"click",description:'"click"'},xe="dblclick",we={type:"literal",value:"dblclick",description:'"dblclick"'},Te="wheel",Se={type:"literal",value:"wheel",description:'"wheel"'},Ae="keydown",Ce={type:"literal",value:"keydown",description:'"keydown"'},ke="keypress",Oe={type:"literal",value:"keypress",description:'"keypress"'},Ie="keyup",Ne={type:"literal",value:"keyup",description:'"keyup"'},Me="mousewheel",De={type:"literal",value:"mousewheel",description:'"mousewheel"'},Le="mousemove",$e={type:"literal",value:"mousemove",description:'"mousemove"'},Re="mouseout",Pe={type:"literal",value:"mouseout",description:'"mouseout"'},Fe="mouseover",Ue={type:"literal",value:"mouseover",description:'"mouseover"'},je="mouseenter",He={type:"literal",value:"mouseenter",description:'"mouseenter"'},ze="touchstart",Be={type:"literal",value:"touchstart",description:'"touchstart"'},qe="touchmove",We={type:"literal",value:"touchmove",description:'"touchmove"'},Ye="touchend",Ge={type:"literal",value:"touchend",description:'"touchend"'},Xe="dragenter",Ve={type:"literal",value:"dragenter",description:'"dragenter"'},Ke="dragover",Ze={type:"literal",value:"dragover",description:'"dragover"'},Qe="dragleave",Je={type:"literal",value:"dragleave",description:'"dragleave"'},et=function(e){return e},tt=/^[a-zA-Z0-9_\-]/,nt={type:"class",value:"[a-zA-Z0-9_-]",description:"[a-zA-Z0-9_-]"},it=function(e){return e.join("")},rt=/^[a-zA-Z0-9\-_  #.>+~[\]=|\^$*]/,ot={type:"class",value:"[a-zA-Z0-9-_  #\\.\\>\\+~\\[\\]=|\\^\\$\\*]",description:"[a-zA-Z0-9-_  #\\.\\>\\+~\\[\\]=|\\^\\$\\*]"},at=function(e){return e.join("")},st=/^['"a-zA-Z0-9_().><=! \t-&|~]/,lt={type:"class",value:"['\"a-zA-Z0-9_\\(\\)\\.\\>\\<\\=\\! \\t-&|~]",description:"['\"a-zA-Z0-9_\\(\\)\\.\\>\\<\\=\\! \\t-&|~]"},ut=function(e){return e.join("")},ct=/^[ \t\r\n]/,ft={type:"class",value:"[ \\t\\r\\n]",description:"[ \\t\\r\\n]"},ht=0,dt=0,pt=[{line:1,column:1,seenCR:!1}],gt=0,mt=[],vt=0;if("startRule"in b){if(!(b.startRule in E))throw new Error("Can't start parsing from rule \""+b.startRule+'".');x=E[b.startRule]}if(y=x(),y!==_&&ht===e.length)return y;throw y!==_&&ht<e.length&&r({type:"end",description:"end of input"}),o(null,mt,gt<e.length?e.charAt(gt):null,gt<e.length?i(gt,gt+1):i(gt,gt))}return e(t,Error),{SyntaxError:t,parse:n}}()},{}],43:[function(e,t,n){function i(e){var t,n,i={};for(t=0,n=e.length;t<n;++t)i[e[t]]=1;return i}function r(e){var t,n=[];for(t in e)n.push(t);return n}t.exports=function(t){function n(e){var t={code:o(e),globals:r(p),fields:r(g),dataSources:r(m),defs:l};return p={},g={},m={},t}function o(e){if("string"==typeof e)return e;var t=y[e.type];if(null==t)throw new Error("Unsupported type: "+e.type);return t(e)}t=t||{};var a=t.constants||e("./constants"),s=(t.functions||e("./functions"))(o),l=t.functionDefs?t.functionDefs(o):{},u=t.idWhiteList?i(t.idWhiteList):null,c=t.idBlackList?i(t.idBlackList):null,f=0,h=t.fieldVar||"datum",d=t.globalVar||"signals",p={},g={},m={},v="function"==typeof d?d:function(e){return d+'["'+e+'"]'},y={Literal:function(e){return e.raw},Identifier:function(e){var t=e.name;if(f>0)return t;if(a.hasOwnProperty(t))return a[t];if(u)return u.hasOwnProperty(t)?t:(p[t]=1,v(t));if(c&&c.hasOwnProperty(t))throw new Error("Illegal identifier: "+t);return t},Program:function(e){return e.body.map(o).join("\n")},MemberExpression:function(e){var t=!e.computed,n=o(e.object);t&&(f+=1);var i=o(e.property);return n===h&&(g[i]=1),t&&(f-=1),n+(t?"."+i:"["+i+"]")},CallExpression:function(e){if("Identifier"!==e.callee.type)throw new Error("Illegal callee type: "+e.callee.type);var t=e.callee.name,n=e.arguments,i=s.hasOwnProperty(t)&&s[t];if(!i)throw new Error("Unrecognized function: "+t);return i instanceof Function?i(n,p,g,m):i+"("+n.map(o).join(",")+")"},ArrayExpression:function(e){return"["+e.elements.map(o).join(",")+"]"},BinaryExpression:function(e){return"("+o(e.left)+e.operator+o(e.right)+")"},UnaryExpression:function(e){return"("+e.operator+o(e.argument)+")"},ConditionalExpression:function(e){return"("+o(e.test)+"?"+o(e.consequent)+":"+o(e.alternate)+")"},LogicalExpression:function(e){return"("+o(e.left)+e.operator+o(e.right)+")"},ObjectExpression:function(e){return"{"+e.properties.map(o).join(",")+"}"},Property:function(e){f+=1;var t=o(e.key);return f-=1,t+":"+o(e.value)},ExpressionStatement:function(e){return o(e.expression)}};return n.functions=s,n.functionDefs=l,n.constants=a,n}},{"./constants":44,"./functions":45}],44:[function(e,t,n){t.exports={NaN:"NaN",E:"Math.E",LN2:"Math.LN2",LN10:"Math.LN10",LOG2E:"Math.LOG2E",LOG10E:"Math.LOG10E",PI:"Math.PI",SQRT1_2:"Math.SQRT1_2",SQRT2:"Math.SQRT2"}},{}],45:[function(e,t,n){t.exports=function(e){function t(t,n,i,r){var o=e(n[0]);return i&&(o=i+"("+o+")",0===i.lastIndexOf("new ",0)&&(o="("+o+")")),o+"."+t+(r<0?"":0===r?"()":"("+n.slice(1).map(e).join(",")+")")}function n(e,n,i){return function(r){return t(e,r,n,i)}}var i="new Date",r="String",o="RegExp";return{isNaN:"isNaN",isFinite:"isFinite",abs:"Math.abs",acos:"Math.acos",asin:"Math.asin",atan:"Math.atan",atan2:"Math.atan2",ceil:"Math.ceil",cos:"Math.cos",exp:"Math.exp",floor:"Math.floor",log:"Math.log",max:"Math.max",min:"Math.min",pow:"Math.pow",random:"Math.random",round:"Math.round",sin:"Math.sin",sqrt:"Math.sqrt",tan:"Math.tan",clamp:function(t){if(t.length<3)throw new Error("Missing arguments to clamp function.");if(t.length>3)throw new Error("Too many arguments to clamp function.");var n=t.map(e);return"Math.max("+n[1]+", Math.min("+n[2]+","+n[0]+"))"},now:"Date.now",utc:"Date.UTC",datetime:i,date:n("getDate",i,0),day:n("getDay",i,0),year:n("getFullYear",i,0),month:n("getMonth",i,0),hours:n("getHours",i,0),minutes:n("getMinutes",i,0),seconds:n("getSeconds",i,0),milliseconds:n("getMilliseconds",i,0),time:n("getTime",i,0),timezoneoffset:n("getTimezoneOffset",i,0),utcdate:n("getUTCDate",i,0),utcday:n("getUTCDay",i,0),utcyear:n("getUTCFullYear",i,0),utcmonth:n("getUTCMonth",i,0),utchours:n("getUTCHours",i,0),utcminutes:n("getUTCMinutes",i,0),utcseconds:n("getUTCSeconds",i,0),utcmilliseconds:n("getUTCMilliseconds",i,0),length:n("length",null,-1),indexof:n("indexOf",null),lastindexof:n("lastIndexOf",null),parseFloat:"parseFloat",parseInt:"parseInt",upper:n("toUpperCase",r,0),lower:n("toLowerCase",r,0),slice:n("slice",r),substring:n("substring",r),replace:n("replace",r),regexp:o,test:n("test",o),"if":function(t){if(t.length<3)throw new Error("Missing arguments to if function.");if(t.length>3)throw new Error("Too many arguments to if function.");var n=t.map(e);return n[0]+"?"+n[1]+":"+n[2]}}}},{}],46:[function(e,t,n){var i=e("./parser"),r=e("./codegen"),o=t.exports={parse:function(e,t){return i.parse("("+e+")",t)},code:function(e){return r(e)},compiler:function(e,t){e=e.slice();var n=r(t),i=e.length,a=function(t){var r=n(o.parse(t));e[i]='"use strict"; return ('+r.code+");";var a=Function.apply(null,e);return r.fn=e.length>8?function(){return a.apply(r,arguments)}:function(e,t,n,i,o,s,l){return a.call(r,e,t,n,i,o,s,l)},r};return a.codegen=n,a},functions:e("./functions"),constants:e("./constants")}},{"./codegen":43,"./constants":44,"./functions":45,"./parser":47}],47:[function(e,t,n){/*
  The following expression parser is based on Esprima (http://esprima.org/).
  Original header comment and license for Esprima is included here:

  Copyright (C) 2013 Ariya Hidayat <ariya.hidayat@gmail.com>
  Copyright (C) 2013 Thaddee Tyl <thaddee.tyl@gmail.com>
  Copyright (C) 2013 Mathias Bynens <mathias@qiwi.be>
  Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com>
  Copyright (C) 2012 Mathias Bynens <mathias@qiwi.be>
  Copyright (C) 2012 Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl>
  Copyright (C) 2012 Kris Kowal <kris.kowal@cixar.com>
  Copyright (C) 2012 Yusuke Suzuki <utatane.tea@gmail.com>
  Copyright (C) 2012 Arpad Borsos <arpad.borsos@googlemail.com>
  Copyright (C) 2011 Ariya Hidayat <ariya.hidayat@gmail.com>

  Redistribution and use in source and binary forms, with or without
  modification, are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in the
      documentation and/or other materials provided with the distribution.

  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
t.exports=function(){"use strict";function e(e,t){if(!e)throw new Error("ASSERT: "+t)}function t(e){return e>=48&&e<=57}function n(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function i(e){return"01234567".indexOf(e)>=0}function r(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0}function o(e){return 10===e||13===e||8232===e||8233===e}function a(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&Te.NonAsciiIdentifierStart.test(String.fromCharCode(e))}function s(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&Te.NonAsciiIdentifierPart.test(String.fromCharCode(e))}function l(e){switch(e){case"class":case"enum":case"export":case"extends":case"import":case"super":return!0;default:return!1}}function u(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}}function c(e){if(Ae&&u(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function f(){var e,t;for(t=0===Ce;Ce<Ie;)if(e=Se.charCodeAt(Ce),r(e))++Ce;else{if(!o(e))break;++Ce,13===e&&10===Se.charCodeAt(Ce)&&++Ce,++ke,Oe=Ce,t=!0}}function h(e){var t,i,r,o=0;for(i="u"===e?4:2,t=0;t<i;++t){if(!(Ce<Ie&&n(Se[Ce])))return"";r=Se[Ce++],o=16*o+"0123456789abcdef".indexOf(r.toLowerCase())}return String.fromCharCode(o)}function d(){var e,t,i,r;for(e=Se[Ce],t=0,"}"===e&&U({},we.UnexpectedToken,"ILLEGAL");Ce<Ie&&(e=Se[Ce++],n(e));)t=16*t+"0123456789abcdef".indexOf(e.toLowerCase());return(t>1114111||"}"!==e)&&U({},we.UnexpectedToken,"ILLEGAL"),t<=65535?String.fromCharCode(t):(i=(t-65536>>10)+55296,r=(t-65536&1023)+56320,String.fromCharCode(i,r))}function p(){var e,t;for(e=Se.charCodeAt(Ce++),t=String.fromCharCode(e),92===e&&(117!==Se.charCodeAt(Ce)&&U({},we.UnexpectedToken,"ILLEGAL"),++Ce,e=h("u"),e&&"\\"!==e&&a(e.charCodeAt(0))||U({},we.UnexpectedToken,"ILLEGAL"),t=e);Ce<Ie&&(e=Se.charCodeAt(Ce),s(e));)++Ce,t+=String.fromCharCode(e),92===e&&(t=t.substr(0,t.length-1),117!==Se.charCodeAt(Ce)&&U({},we.UnexpectedToken,"ILLEGAL"),++Ce,e=h("u"),e&&"\\"!==e&&s(e.charCodeAt(0))||U({},we.UnexpectedToken,"ILLEGAL"),t+=e);return t}function g(){var e,t;for(e=Ce++;Ce<Ie;){if(t=Se.charCodeAt(Ce),92===t)return Ce=e,p();if(!s(t))break;++Ce}return Se.slice(e,Ce)}function m(){var e,t,n;return e=Ce,t=92===Se.charCodeAt(Ce)?p():g(),n=1===t.length?be.Identifier:c(t)?be.Keyword:"null"===t?be.NullLiteral:"true"===t||"false"===t?be.BooleanLiteral:be.Identifier,{type:n,value:t,lineNumber:ke,lineStart:Oe,start:e,end:Ce}}function v(){var e,t,n,i,r=Ce,o=Se.charCodeAt(Ce),a=Se[Ce];switch(o){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++Ce,De.tokenize&&(40===o?De.openParenToken=De.tokens.length:123===o&&(De.openCurlyToken=De.tokens.length)),{type:be.Punctuator,value:String.fromCharCode(o),lineNumber:ke,lineStart:Oe,start:r,end:Ce};default:if(e=Se.charCodeAt(Ce+1),61===e)switch(o){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return Ce+=2,{type:be.Punctuator,value:String.fromCharCode(o)+String.fromCharCode(e),lineNumber:ke,lineStart:Oe,start:r,end:Ce};case 33:case 61:return Ce+=2,61===Se.charCodeAt(Ce)&&++Ce,{type:be.Punctuator,value:Se.slice(r,Ce),lineNumber:ke,lineStart:Oe,start:r,end:Ce}}}return i=Se.substr(Ce,4),">>>="===i?(Ce+=4,{type:be.Punctuator,value:i,lineNumber:ke,lineStart:Oe,start:r,end:Ce}):(n=i.substr(0,3),">>>"===n||"<<="===n||">>="===n?(Ce+=3,{type:be.Punctuator,value:n,lineNumber:ke,lineStart:Oe,start:r,end:Ce}):(t=n.substr(0,2),a===t[1]&&"+-<>&|".indexOf(a)>=0||"=>"===t?(Ce+=2,{type:be.Punctuator,value:t,lineNumber:ke,lineStart:Oe,start:r,end:Ce}):"<>=!+-*%&|^/".indexOf(a)>=0?(++Ce,{type:be.Punctuator,value:a,lineNumber:ke,lineStart:Oe,start:r,end:Ce}):void U({},we.UnexpectedToken,"ILLEGAL")))}function y(e){for(var t="";Ce<Ie&&n(Se[Ce]);)t+=Se[Ce++];return 0===t.length&&U({},we.UnexpectedToken,"ILLEGAL"),a(Se.charCodeAt(Ce))&&U({},we.UnexpectedToken,"ILLEGAL"),{type:be.NumericLiteral,value:parseInt("0x"+t,16),lineNumber:ke,lineStart:Oe,start:e,end:Ce}}function b(e){for(var n="0"+Se[Ce++];Ce<Ie&&i(Se[Ce]);)n+=Se[Ce++];return(a(Se.charCodeAt(Ce))||t(Se.charCodeAt(Ce)))&&U({},we.UnexpectedToken,"ILLEGAL"),{type:be.NumericLiteral,value:parseInt(n,8),octal:!0,lineNumber:ke,lineStart:Oe,start:e,end:Ce}}function _(){var n,r,o;if(o=Se[Ce],e(t(o.charCodeAt(0))||"."===o,"Numeric literal must start with a decimal digit or a decimal point"),r=Ce,n="","."!==o){if(n=Se[Ce++],o=Se[Ce],"0"===n){if("x"===o||"X"===o)return++Ce,y(r);if(i(o))return b(r);o&&t(o.charCodeAt(0))&&U({},we.UnexpectedToken,"ILLEGAL")}for(;t(Se.charCodeAt(Ce));)n+=Se[Ce++];o=Se[Ce]}if("."===o){for(n+=Se[Ce++];t(Se.charCodeAt(Ce));)n+=Se[Ce++];o=Se[Ce]}if("e"===o||"E"===o)if(n+=Se[Ce++],o=Se[Ce],"+"!==o&&"-"!==o||(n+=Se[Ce++]),t(Se.charCodeAt(Ce)))for(;t(Se.charCodeAt(Ce));)n+=Se[Ce++];else U({},we.UnexpectedToken,"ILLEGAL");return a(Se.charCodeAt(Ce))&&U({},we.UnexpectedToken,"ILLEGAL"),{type:be.NumericLiteral,value:parseFloat(n),lineNumber:ke,lineStart:Oe,start:r,end:Ce}}function E(){var t,n,r,a,s,l,u,c,f="",p=!1;for(u=ke,c=Oe,t=Se[Ce],e("'"===t||'"'===t,"String literal must starts with a quote"),n=Ce,++Ce;Ce<Ie;){if(r=Se[Ce++],r===t){t="";break}if("\\"===r)if(r=Se[Ce++],r&&o(r.charCodeAt(0)))++ke,"\r"===r&&"\n"===Se[Ce]&&++Ce,Oe=Ce;else switch(r){case"u":case"x":"{"===Se[Ce]?(++Ce,f+=d()):(l=Ce,s=h(r),s?f+=s:(Ce=l,f+=r));break;case"n":f+="\n";break;case"r":f+="\r";break;case"t":f+="\t";break;case"b":f+="\b";break;case"f":f+="\f";break;case"v":f+="\x0B";break;default:i(r)?(a="01234567".indexOf(r),0!==a&&(p=!0),Ce<Ie&&i(Se[Ce])&&(p=!0,a=8*a+"01234567".indexOf(Se[Ce++]),"0123".indexOf(r)>=0&&Ce<Ie&&i(Se[Ce])&&(a=8*a+"01234567".indexOf(Se[Ce++]))),f+=String.fromCharCode(a)):f+=r}else{if(o(r.charCodeAt(0)))break;f+=r}}return""!==t&&U({},we.UnexpectedToken,"ILLEGAL"),{type:be.StringLiteral,value:f,octal:p,startLineNumber:u,startLineStart:c,lineNumber:ke,lineStart:Oe,start:n,end:Ce}}function x(e,t){var n,i=e;t.indexOf("u")>=0&&(i=i.replace(/\\u\{([0-9a-fA-F]+)\}/g,function(e,t){return parseInt(t,16)<=1114111?"x":void U({},we.InvalidRegExp)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{n=new RegExp(i)}catch(r){U({},we.InvalidRegExp)}try{return new RegExp(e,t)}catch(o){return null}}function w(){var t,n,i,r,a;for(t=Se[Ce],e("/"===t,"Regular expression literal must start with a slash"),n=Se[Ce++],i=!1,r=!1;Ce<Ie;)if(t=Se[Ce++],n+=t,"\\"===t)t=Se[Ce++],o(t.charCodeAt(0))&&U({},we.UnterminatedRegExp),n+=t;else if(o(t.charCodeAt(0)))U({},we.UnterminatedRegExp);else if(i)"]"===t&&(i=!1);else{if("/"===t){r=!0;break}"["===t&&(i=!0)}return r||U({},we.UnterminatedRegExp),a=n.substr(1,n.length-2),{value:a,literal:n}}function T(){var e,t,n,i;for(t="",n="";Ce<Ie&&(e=Se[Ce],s(e.charCodeAt(0)));)if(++Ce,"\\"===e&&Ce<Ie)if(e=Se[Ce],"u"===e){if(++Ce,i=Ce,e=h("u"))for(n+=e,t+="\\u";i<Ce;++i)t+=Se[i];else Ce=i,n+="u",t+="\\u";j({},we.UnexpectedToken,"ILLEGAL")}else t+="\\",j({},we.UnexpectedToken,"ILLEGAL");else n+=e,t+=e;return{value:n,literal:t}}function S(){var e,t,n,i;return Ne=null,f(),e=Ce,t=w(),n=T(),i=x(t.value,n.value),De.tokenize?{type:be.RegularExpression,value:i,regex:{pattern:t.value,flags:n.value},lineNumber:ke,lineStart:Oe,start:e,end:Ce}:{literal:t.literal+n.literal,value:i,regex:{pattern:t.value,flags:n.value},start:e,end:Ce}}function A(){var e,t,n,i;return f(),e=Ce,t={start:{line:ke,column:Ce-Oe}},n=S(),t.end={line:ke,column:Ce-Oe},De.tokenize||(De.tokens.length>0&&(i=De.tokens[De.tokens.length-1],i.range[0]===e&&"Punctuator"===i.type&&("/"!==i.value&&"/="!==i.value||De.tokens.pop())),De.tokens.push({type:"RegularExpression",value:n.literal,regex:n.regex,range:[e,Ce],loc:t})),n}function C(e){return e.type===be.Identifier||e.type===be.Keyword||e.type===be.BooleanLiteral||e.type===be.NullLiteral}function k(){var e,t;if(e=De.tokens[De.tokens.length-1],!e)return A();if("Punctuator"===e.type){if("]"===e.value)return v();if(")"===e.value)return t=De.tokens[De.openParenToken-1],!t||"Keyword"!==t.type||"if"!==t.value&&"while"!==t.value&&"for"!==t.value&&"with"!==t.value?v():A();if("}"===e.value){if(De.tokens[De.openCurlyToken-3]&&"Keyword"===De.tokens[De.openCurlyToken-3].type){if(t=De.tokens[De.openCurlyToken-4],!t)return v()}else{if(!De.tokens[De.openCurlyToken-4]||"Keyword"!==De.tokens[De.openCurlyToken-4].type)return v();if(t=De.tokens[De.openCurlyToken-5],!t)return A()}return v()}return A()}return"Keyword"===e.type&&"this"!==e.value?A():v()}function O(){var e;return f(),Ce>=Ie?{type:be.EOF,lineNumber:ke,lineStart:Oe,start:Ce,end:Ce}:(e=Se.charCodeAt(Ce),a(e)?m():40===e||41===e||59===e?v():39===e||34===e?E():46===e?t(Se.charCodeAt(Ce+1))?_():v():t(e)?_():De.tokenize&&47===e?k():v())}function I(){var e,t,n,i;return f(),e={start:{line:ke,column:Ce-Oe}},t=O(),e.end={line:ke,column:Ce-Oe},t.type!==be.EOF&&(n=Se.slice(t.start,t.end),i={type:_e[t.type],value:n,range:[t.start,t.end],loc:e},t.regex&&(i.regex={pattern:t.regex.pattern,flags:t.regex.flags}),De.tokens.push(i)),t}function N(){var e;return e=Ne,Ce=e.end,ke=e.lineNumber,Oe=e.lineStart,Ne="undefined"!=typeof De.tokens?I():O(),Ce=e.end,ke=e.lineNumber,Oe=e.lineStart,e}function M(){var e,t,n;e=Ce,t=ke,n=Oe,Ne="undefined"!=typeof De.tokens?I():O(),Ce=e,ke=t,Oe=n}function D(){this.line=ke,this.column=Ce-Oe}function L(){this.start=new D,this.end=null}function $(e){e.type===be.StringLiteral?this.start={line:e.startLineNumber,column:e.start-e.startLineStart}:this.start={line:e.lineNumber,column:e.start-e.lineStart},this.end=null}function R(){Ce=Ne.start,Ne.type===be.StringLiteral?(ke=Ne.startLineNumber,Oe=Ne.startLineStart):(ke=Ne.lineNumber,Oe=Ne.lineStart),De.range&&(this.range=[Ce,0]),De.loc&&(this.loc=new L)}function P(e){De.range&&(this.range=[e.start,0]),De.loc&&(this.loc=new $(e))}function F(){var e,t,n,i;return e=Ce,t=ke,n=Oe,f(),i=ke!==t,Ce=e,ke=t,Oe=n,i}function U(t,n){var i,r=Array.prototype.slice.call(arguments,2),o=n.replace(/%(\d)/g,function(t,n){return e(n<r.length,"Message reference must be in range"),r[n]});throw"number"==typeof t.lineNumber?(i=new Error("Line "+t.lineNumber+": "+o),i.index=t.start,i.lineNumber=t.lineNumber,i.column=t.start-Oe+1):(i=new Error("Line "+ke+": "+o),i.index=Ce,i.lineNumber=ke,i.column=Ce-Oe+1),i.description=o,i}function j(){try{U.apply(null,arguments)}catch(e){if(!De.errors)throw e;De.errors.push(e)}}function H(e){if(e.type===be.EOF&&U(e,we.UnexpectedEOS),e.type===be.NumericLiteral&&U(e,we.UnexpectedNumber),e.type===be.StringLiteral&&U(e,we.UnexpectedString),e.type===be.Identifier&&U(e,we.UnexpectedIdentifier),e.type===be.Keyword){if(l(e.value))U(e,we.UnexpectedReserved);else if(Ae&&u(e.value))return void j(e,we.StrictReservedWord);U(e,we.UnexpectedToken,e.value)}U(e,we.UnexpectedToken,e.value)}function z(e){var t=N();t.type===be.Punctuator&&t.value===e||H(t)}function B(e){if(De.errors){var t=Ne;t.type!==be.Punctuator&&t.value!==e?j(t,we.UnexpectedToken,t.value):N()}else z(e)}function q(e){return Ne.type===be.Punctuator&&Ne.value===e}function W(e){return Ne.type===be.Keyword&&Ne.value===e}function Y(){var e;return 59===Se.charCodeAt(Ce)||q(";")?void N():(e=ke,f(),void(ke===e&&(Ne.type===be.EOF||q("}")||H(Ne))))}function G(){var e=[],t=new R;for(z("[");!q("]");)q(",")?(N(),e.push(null)):(e.push(ue()),q("]")||z(","));return N(),t.finishArrayExpression(e)}function X(){var e,t=new R;return e=N(),e.type===be.StringLiteral||e.type===be.NumericLiteral?(Ae&&e.octal&&j(e,we.StrictOctalLiteral),t.finishLiteral(e)):t.finishIdentifier(e.value)}function V(){var e,t,n,i,r=new R;return e=Ne,e.type===be.Identifier?(n=X(),z(":"),i=ue(),r.finishProperty("init",n,i)):e.type!==be.EOF&&e.type!==be.Punctuator?(t=X(),z(":"),i=ue(),r.finishProperty("init",t,i)):void H(e)}function K(){var e,t,n,i,r=[],o={},a=String,s=new R;for(z("{");!q("}");)e=V(),t=e.key.type===Ee.Identifier?e.key.name:a(e.key.value),i="init"===e.kind?xe.Data:"get"===e.kind?xe.Get:xe.Set,n="$"+t,Object.prototype.hasOwnProperty.call(o,n)?(o[n]===xe.Data?Ae&&i===xe.Data?j({},we.StrictDuplicateProperty):i!==xe.Data&&j({},we.AccessorDataProperty):i===xe.Data?j({},we.AccessorDataProperty):o[n]&i&&j({},we.AccessorGetSet),o[n]|=i):o[n]=i,r.push(e),q("}")||B(",");return z("}"),s.finishObjectExpression(r)}function Z(){var e;return z("("),++Me.parenthesisCount,e=ce(),z(")"),e}function Q(){var e,t,n,i;if(q("("))return Z();if(q("["))return G();if(q("{"))return K();if(e=Ne.type,i=new R,e===be.Identifier||Le[Ne.value])n=i.finishIdentifier(N().value);else if(e===be.StringLiteral||e===be.NumericLiteral)Ae&&Ne.octal&&j(Ne,we.StrictOctalLiteral),n=i.finishLiteral(N());else{if(e===be.Keyword)throw new Error("Disabled.");e===be.BooleanLiteral?(t=N(),t.value="true"===t.value,n=i.finishLiteral(t)):e===be.NullLiteral?(t=N(),t.value=null,n=i.finishLiteral(t)):q("/")||q("/=")?(n="undefined"!=typeof De.tokens?i.finishLiteral(A()):i.finishLiteral(S()),M()):H(N())}return n}function J(){var e=[];if(z("("),!q(")"))for(;Ce<Ie&&(e.push(ue()),!q(")"));)B(",");return z(")"),e}function ee(){var e,t=new R;return e=N(),C(e)||H(e),t.finishIdentifier(e.value)}function te(){return z("."),ee()}function ne(){var e;return z("["),e=ce(),z("]"),e}function ie(){var e,t,n,i,r=Me.allowIn;for(i=Ne,Me.allowIn=!0,e=Q();;)if(q("."))n=te(),e=new P(i).finishMemberExpression(".",e,n);else if(q("("))t=J(),e=new P(i).finishCallExpression(e,t);else{if(!q("["))break;n=ne(),e=new P(i).finishMemberExpression("[",e,n)}return Me.allowIn=r,e}function re(){var e=ie();if(Ne.type===be.Punctuator&&(q("++")||q("--"))&&!F())throw new Error("Disabled.");return e}function oe(){var e,t,n;if(Ne.type!==be.Punctuator&&Ne.type!==be.Keyword)t=re();else{if(q("++")||q("--"))throw new Error("Disabled.");if(q("+")||q("-")||q("~")||q("!"))n=Ne,e=N(),t=oe(),t=new P(n).finishUnaryExpression(e.value,t);else{if(W("delete")||W("void")||W("typeof"))throw new Error("Disabled.");t=re()}}return t}function ae(e,t){var n=0;if(e.type!==be.Punctuator&&e.type!==be.Keyword)return 0;switch(e.value){case"||":n=1;break;case"&&":n=2;break;case"|":n=3;break;case"^":n=4;break;case"&":n=5;break;case"==":case"!=":case"===":case"!==":n=6;break;case"<":case">":case"<=":case">=":case"instanceof":n=7;break;case"in":n=t?7:0;break;case"<<":case">>":case">>>":n=8;break;case"+":case"-":n=9;break;case"*":case"/":case"%":n=11}return n}function se(){var e,t,n,i,r,o,a,s,l,u;if(e=Ne,l=oe(),i=Ne,r=ae(i,Me.allowIn),0===r)return l;for(i.prec=r,N(),t=[e,Ne],a=oe(),o=[l,i,a];(r=ae(Ne,Me.allowIn))>0;){for(;o.length>2&&r<=o[o.length-2].prec;)a=o.pop(),s=o.pop().value,l=o.pop(),t.pop(),n=new P(t[t.length-1]).finishBinaryExpression(s,l,a),o.push(n);i=N(),i.prec=r,o.push(i),t.push(Ne),n=oe(),o.push(n)}for(u=o.length-1,n=o[u],t.pop();u>1;)n=new P(t.pop()).finishBinaryExpression(o[u-1].value,o[u-2],n),u-=2;return n}function le(){var e,t,n,i,r;return r=Ne,e=se(),q("?")&&(N(),t=Me.allowIn,Me.allowIn=!0,n=ue(),Me.allowIn=t,z(":"),i=ue(),e=new P(r).finishConditionalExpression(e,n,i)),e}function ue(){var e,t,n,i;return e=Me.parenthesisCount,i=Ne,t=Ne,n=le()}function ce(){var e=ue();if(q(","))throw new Error("Disabled.");return e}function fe(e){var t=ce();return Y(),e.finishExpressionStatement(t)}function he(){var e,t,n=Ne.type;if(n===be.EOF&&H(Ne),n===be.Punctuator&&"{"===Ne.value)throw new Error("Disabled.");if(t=new R,n===be.Punctuator)switch(Ne.value){case";":throw new Error("Disabled.");case"(":return fe(t)}else if(n===be.Keyword)throw new Error("Disabled.");return e=ce(),Y(),t.finishExpressionStatement(e)}function de(){if(Ne.type===be.Keyword)switch(Ne.value){case"const":case"let":throw new Error("Disabled.");case"function":throw new Error("Disabled.");default:return he()}if(Ne.type!==be.EOF)return he()}function pe(){for(var e,t,n,i,r=[];Ce<Ie&&(t=Ne,t.type===be.StringLiteral)&&(e=de(),r.push(e),e.expression.type===Ee.Literal);)n=Se.slice(t.start+1,t.end-1),"use strict"===n?(Ae=!0,i&&j(i,we.StrictOctalLiteral)):!i&&t.octal&&(i=t);for(;Ce<Ie&&(e=de(),"undefined"!=typeof e);)r.push(e);return r}function ge(){var e,t;return f(),M(),t=new R,Ae=!0,e=pe(),t.finishProgram(e)}function me(){var e,t,n,i=[];for(e=0;e<De.tokens.length;++e)t=De.tokens[e],n={type:t.type,value:t.value},t.regex&&(n.regex={pattern:t.regex.pattern,flags:t.regex.flags}),De.range&&(n.range=t.range),De.loc&&(n.loc=t.loc),i.push(n);De.tokens=i}function ve(e,t){var n,i;n=String,"string"==typeof e||e instanceof String||(e=n(e)),Se=e,Ce=0,ke=Se.length>0?1:0,Oe=0,Ie=Se.length,Ne=null,Me={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},De={},t=t||{},t.tokens=!0,De.tokens=[],De.tokenize=!0,De.openParenToken=-1,De.openCurlyToken=-1,De.range="boolean"==typeof t.range&&t.range,De.loc="boolean"==typeof t.loc&&t.loc,"boolean"==typeof t.tolerant&&t.tolerant&&(De.errors=[]);try{if(M(),Ne.type===be.EOF)return De.tokens;for(N();Ne.type!==be.EOF;)try{N()}catch(r){if(De.errors){De.errors.push(r);break}throw r}me(),i=De.tokens,"undefined"!=typeof De.errors&&(i.errors=De.errors)}catch(o){throw o}finally{De={}}return i}function ye(e,t){var n,i;i=String,"string"==typeof e||e instanceof String||(e=i(e)),Se=e,Ce=0,ke=Se.length>0?1:0,Oe=0,Ie=Se.length,Ne=null,Me={allowIn:!0,labelSet:{},parenthesisCount:0,inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},De={},"undefined"!=typeof t&&(De.range="boolean"==typeof t.range&&t.range,De.loc="boolean"==typeof t.loc&&t.loc,De.loc&&null!==t.source&&void 0!==t.source&&(De.source=i(t.source)),"boolean"==typeof t.tokens&&t.tokens&&(De.tokens=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(De.errors=[]));try{n=ge(),"undefined"!=typeof De.tokens&&(me(),n.tokens=De.tokens),"undefined"!=typeof De.errors&&(n.errors=De.errors)}catch(r){throw r}finally{De={}}return n}var be,_e,Ee,xe,we,Te,Se,Ae,Ce,ke,Oe,Ie,Ne,Me,De;be={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9},_e={},_e[be.BooleanLiteral]="Boolean",_e[be.EOF]="<end>",_e[be.Identifier]="Identifier",_e[be.Keyword]="Keyword",_e[be.NullLiteral]="Null",_e[be.NumericLiteral]="Numeric",_e[be.Punctuator]="Punctuator",_e[be.StringLiteral]="String",_e[be.RegularExpression]="RegularExpression",Ee={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",BinaryExpression:"BinaryExpression",CallExpression:"CallExpression",ConditionalExpression:"ConditionalExpression",ExpressionStatement:"ExpressionStatement",Identifier:"Identifier",Literal:"Literal",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",UnaryExpression:"UnaryExpression"},xe={Data:1,Get:2,Set:4},we={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode"},Te={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢲऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ﬀ-ﬆﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼＡ-Ｚａ-ｚｦ-ﾾￂ-ￇￊ-ￏￒ-ￗￚ-ￜ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԯԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠ-ࢲࣤ-ॣ०-९ॱ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఀ-ఃఅ-ఌఎ-ఐఒ-నప-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಁ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲഁ-ഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟ෦-෯ෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤞᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧ᪰-᪽ᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶ᳸᳹ᴀ-᷵᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚝꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꧠ-ꧾꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ﬀ-ﬆﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︭︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ０-９Ａ-Ｚ＿ａ-ｚｦ-ﾾￂ-ￇￊ-ￏￒ-ￗￚ-ￜ]")},P.prototype=R.prototype={finish:function(){De.range&&(this.range[1]=Ce),De.loc&&(this.loc.end=new D,De.source&&(this.loc.source=De.source))},finishArrayExpression:function(e){return this.type=Ee.ArrayExpression,this.elements=e,this.finish(),this},finishAssignmentExpression:function(e,t,n){return this.type=Ee.AssignmentExpression,this.operator=e,this.left=t,this.right=n,this.finish(),this},finishBinaryExpression:function(e,t,n){return this.type="||"===e||"&&"===e?Ee.LogicalExpression:Ee.BinaryExpression,this.operator=e,this.left=t,this.right=n,this.finish(),this},finishCallExpression:function(e,t){return this.type=Ee.CallExpression,this.callee=e,this.arguments=t,this.finish(),this},finishConditionalExpression:function(e,t,n){return this.type=Ee.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=n,this.finish(),this},finishExpressionStatement:function(e){return this.type=Ee.ExpressionStatement,this.expression=e,this.finish(),this},finishIdentifier:function(e){return this.type=Ee.Identifier,this.name=e,this.finish(),this},finishLiteral:function(e){return this.type=Ee.Literal,this.value=e.value,this.raw=Se.slice(e.start,e.end),e.regex&&("//"==this.raw&&(this.raw="/(?:)/"),this.regex=e.regex),this.finish(),this},finishMemberExpression:function(e,t,n){return this.type=Ee.MemberExpression,this.computed="["===e,this.object=t,this.property=n,this.finish(),this},finishObjectExpression:function(e){return this.type=Ee.ObjectExpression,this.properties=e,this.finish(),this},finishProgram:function(e){return this.type=Ee.Program,this.body=e,this.finish(),this},finishProperty:function(e,t,n){return this.type=Ee.Property,this.key=t,this.value=n,this.kind=e,this.finish(),this},finishUnaryExpression:function(e,t){return this.type=Ee.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0,this.finish(),this}};var Le={"if":1,"this":1};return{tokenize:ve,parse:ye}}()},{}],48:[function(e,t,n){function i(e){console.log("[Vega Log]",e)}function r(e){console.error("[Vega Err]",e)}function o(e,t){if(o.enable){var n=Function.prototype.bind.call(console.log,console),i={prevTime:Date.now()-a,stamp:e.stamp};e.add&&(i.add=e.add.length,i.mod=e.mod.length,i.rem=e.rem.length,i.reflow=!!e.reflow),n.apply(console,(t.push(JSON.stringify(i)),t)),a=Date.now()}}var a=Date.now();t.exports={log:i,error:r,debug:(o.enable=!1,o)}},{}],49:[function(e,t,n){t.exports={path:e("./path"),render:e("./render"),Item:e("./util/Item"),bound:e("./util/bound"),Bounds:e("./util/Bounds"),canvas:e("./util/canvas"),Gradient:e("./util/Gradient"),toJSON:e("./util/scene").toJSON,fromJSON:e("./util/scene").fromJSON}},{"./path":51,"./render":71,"./util/Bounds":77,"./util/Gradient":79,"./util/Item":81,"./util/bound":82,"./util/canvas":83,"./util/scene":85}],50:[function(e,t,n){function i(e,t,n,i,r,a,l,u,c){var f=s.call(arguments);if(o[f])return o[f];var h=l*(Math.PI/180),d=Math.sin(h),p=Math.cos(h);n=Math.abs(n),i=Math.abs(i);var g=p*(u-e)*.5+d*(c-t)*.5,m=p*(c-t)*.5-d*(u-e)*.5,v=g*g/(n*n)+m*m/(i*i);v>1&&(v=Math.sqrt(v),n*=v,i*=v);var y=p/n,b=d/n,_=-d/i,E=p/i,x=y*u+b*c,w=_*u+E*c,T=y*e+b*t,S=_*e+E*t,A=(T-x)*(T-x)+(S-w)*(S-w),C=1/A-.25;C<0&&(C=0);var k=Math.sqrt(C);a==r&&(k=-k);var O=.5*(x+T)-k*(S-w),I=.5*(w+S)+k*(T-x),N=Math.atan2(w-I,x-O),M=Math.atan2(S-I,T-O),D=M-N;D<0&&1===a?D+=2*Math.PI:D>0&&0===a&&(D-=2*Math.PI);for(var L=Math.ceil(Math.abs(D/(.5*Math.PI+.001))),$=[],R=0;R<L;++R){var P=N+R*D/L,F=N+(R+1)*D/L;$[R]=[O,I,P,F,n,i,d,p]}return o[f]=$}function r(e){var t=s.call(e);if(a[t])return a[t];var n=e[0],i=e[1],r=e[2],o=e[3],l=e[4],u=e[5],c=e[6],f=e[7],h=f*l,d=-c*u,p=c*l,g=f*u,m=Math.cos(r),v=Math.sin(r),y=Math.cos(o),b=Math.sin(o),_=.5*(o-r),E=Math.sin(.5*_),x=8/3*E*E/Math.sin(_),w=n+m-x*v,T=i+v+x*m,S=n+y,A=i+b,C=S+x*b,k=A-x*y;return a[t]=[h*w+d*T,p*w+g*T,h*C+d*k,p*C+g*k,h*S+d*A,p*S+g*A]}var o={},a={},s=[].join;t.exports={segments:i,bezier:r,cache:{segments:o,bezier:a}}},{}],51:[function(e,t,n){t.exports={parse:e("./parse"),render:e("./render")}},{"./parse":52,"./render":53}],52:[function(e,t,n){var i={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7},r=[/([MLHVCSQTAZmlhvcsqtaz])/g,/###/,/(\d)([-+])/g,/\s|,|###/];t.exports=function(e){var t,n,o,a,s,l,u,c,f,h,d,p=[];for(t=e.slice().replace(r[0],"###$1").split(r[1]).slice(1),c=0,h=t.length;c<h;++c){for(n=t[c],o=n.slice(1).trim().replace(r[2],"$1###$2").split(r[3]),l=n.charAt(0),a=[l],f=0,d=o.length;f<d;++f)(s=+o[f])===s&&a.push(s);if(u=i[l.toLowerCase()],a.length-1>u)for(f=1,d=a.length;f<d;f+=u)p.push([l].concat(a.slice(f,f+u)));else p.push(a)}return p}},{}],53:[function(e,t,n){function i(e,t,n,i){for(var o=r.segments(i[5],i[6],i[0],i[1],i[3],i[4],i[2],t,n),a=0;a<o.length;++a){var s=r.bezier(o[a]);e.bezierCurveTo.apply(e,s)}}var r=e("./arc");t.exports=function(e,t,n,r){var o,a,s,l,u,c=null,f=0,h=0,d=0,p=0;null==n&&(n=0),null==r&&(r=0),e.beginPath();for(var g=0,m=t.length;g<m;++g){switch(o=t[g],o[0]){case"l":f+=o[1],h+=o[2],e.lineTo(f+n,h+r);break;case"L":f=o[1],h=o[2],e.lineTo(f+n,h+r);break;case"h":f+=o[1],e.lineTo(f+n,h+r);break;case"H":f=o[1],e.lineTo(f+n,h+r);break;case"v":h+=o[1],e.lineTo(f+n,h+r);break;case"V":h=o[1],e.lineTo(f+n,h+r);break;case"m":f+=o[1],h+=o[2],e.moveTo(f+n,h+r);break;case"M":f=o[1],h=o[2],e.moveTo(f+n,h+r);break;case"c":a=f+o[5],s=h+o[6],d=f+o[3],p=h+o[4],e.bezierCurveTo(f+o[1]+n,h+o[2]+r,d+n,p+r,a+n,s+r),f=a,h=s;break;case"C":f=o[5],h=o[6],d=o[3],p=o[4],e.bezierCurveTo(o[1]+n,o[2]+r,d+n,p+r,f+n,h+r);break;case"s":a=f+o[3],s=h+o[4],d=2*f-d,p=2*h-p,e.bezierCurveTo(d+n,p+r,f+o[1]+n,h+o[2]+r,a+n,s+r),d=f+o[1],p=h+o[2],f=a,h=s;break;case"S":a=o[3],s=o[4],d=2*f-d,p=2*h-p,e.bezierCurveTo(d+n,p+r,o[1]+n,o[2]+r,a+n,s+r),f=a,h=s,d=o[1],p=o[2];break;case"q":a=f+o[3],s=h+o[4],d=f+o[1],p=h+o[2],e.quadraticCurveTo(d+n,p+r,a+n,s+r),f=a,h=s;break;case"Q":a=o[3],s=o[4],e.quadraticCurveTo(o[1]+n,o[2]+r,a+n,s+r),f=a,h=s,d=o[1],p=o[2];break;case"t":a=f+o[1],s=h+o[2],null===c[0].match(/[QqTt]/)?(d=f,p=h):"t"===c[0]?(d=2*f-l,p=2*h-u):"q"===c[0]&&(d=2*f-d,p=2*h-p),l=d,u=p,e.quadraticCurveTo(d+n,p+r,a+n,s+r),f=a,h=s,d=f+o[1],p=h+o[2];break;case"T":a=o[1],s=o[2],d=2*f-d,p=2*h-p,e.quadraticCurveTo(d+n,p+r,a+n,s+r),f=a,h=s;break;case"a":i(e,f+n,h+r,[o[1],o[2],o[3],o[4],o[5],o[6]+f+n,o[7]+h+r]),f+=o[6],h+=o[7];break;case"A":i(e,f+n,h+r,[o[1],o[2],o[3],o[4],o[5],o[6]+n,o[7]+r]),f=o[6],h=o[7];break;case"z":case"Z":e.closePath()}c=o}}},{"./arc":50}],54:[function(e,t,n){function i(){this._active=null,this._handlers={}}var r=i.prototype;r.initialize=function(e,t,n){return this._el=e,this._obj=n||null,this.padding(t)},r.element=function(){return this._el},r.padding=function(e){return this._padding=e||{top:0,left:0,bottom:0,right:0},this},r.scene=function(e){return arguments.length?(this._scene=e,this):this._scene},r.on=function(){},r.off=function(){},r.handlers=function(){var e,t=this._handlers,n=[];for(e in t)n.push.apply(n,t[e]);return n},r.eventName=function(e){var t=e.indexOf(".");return t<0?e:e.slice(0,t)},t.exports=i},{}],55:[function(e,t,n){function i(){this._el=null,this._bgcolor=null}var r=i.prototype;r.initialize=function(e,t,n,i){return this._el=e,this.resize(t,n,i)},r.element=function(){return this._el},r.scene=function(){return this._el&&this._el.firstChild},r.background=function(e){return 0===arguments.length?this._bgcolor:(this._bgcolor=e,this)},r.resize=function(e,t,n){return this._width=e,this._height=t,this._padding=n||{top:0,left:0,bottom:0,right:0},this},r.render=function(){return this},t.exports=i},{}],56:[function(e,t,n){function i(){s.call(this),this._down=null,this._touch=null,this._first=!0}function r(e,t,n){return function(i){var r=this._active,o=this.pickEvent(i);o===r?this.fire(e,i):(this.fire(n,i),this._active=o,this.fire(t,i),this.fire(e,i))}}function o(e){return function(t){this.fire(e,t),this._active=null}}var a=e("../../util/dom"),s=e("../Handler"),l=e("./marks"),u=s.prototype,c=i.prototype=Object.create(u);c.constructor=i,c.initialize=function(e,t,n){var i=this._canvas=a.find(e,"canvas");if(i){var r=this;this.events.forEach(function(e){i.addEventListener(e,function(t){c[e]?c[e].call(r,t):r.fire(e,t)})})}return u.initialize.call(this,e,t,n)},c.canvas=function(){return this._canvas},c.context=function(){return this._canvas.getContext("2d")},c.events=["keydown","keypress","keyup","dragenter","dragleave","dragover","mousedown","mouseup","mousemove","mouseout","mouseover","click","dblclick","wheel","mousewheel","touchstart","touchmove","touchend"],c.DOMMouseScroll=function(e){
this.fire("mousewheel",e)},c.mousemove=r("mousemove","mouseover","mouseout"),c.dragover=r("dragover","dragenter","dragleave"),c.mouseout=o("mouseout"),c.dragleave=o("dragleave"),c.mousedown=function(e){this._down=this._active,this.fire("mousedown",e)},c.click=function(e){this._down===this._active&&(this.fire("click",e),this._down=null)},c.touchstart=function(e){this._touch=this.pickEvent(e.changedTouches[0]),this._first&&(this._active=this._touch,this._first=!1),this.fire("touchstart",e,!0)},c.touchmove=function(e){this.fire("touchmove",e,!0)},c.touchend=function(e){this.fire("touchend",e,!0),this._touch=null},c.fire=function(e,t,n){var i,r,o=n?this._touch:this._active,a=this._handlers[e];if(a)for(t.vegaType=e,i=0,r=a.length;i<r;++i)a[i].handler.call(this._obj,t,o)},c.on=function(e,t){var n=this.eventName(e),i=this._handlers;return(i[n]||(i[n]=[])).push({type:e,handler:t}),this},c.off=function(e,t){var n,i=this.eventName(e),r=this._handlers[i];if(r){for(n=r.length;--n>=0;)r[n].type===e&&(t&&r[n].handler!==t||r.splice(n,1));return this}},c.pickEvent=function(e){var t,n,i=this._canvas.getBoundingClientRect(),r=this._padding;return this.pick(this._scene,t=e.clientX-i.left,n=e.clientY-i.top,t-r.left,n-r.top)},c.pick=function(e,t,n,i,r){var o=this.context(),a=l[e.marktype];return a.pick.call(this,o,e,t,n,i,r)},t.exports=i},{"../../util/dom":84,"../Handler":54,"./marks":63}],57:[function(e,t,n){function i(e){c.call(this),this._loader=new l(e)}function r(e,t){if(!t)return null;var n,i,r,a,l,u=new s;for(n=0,i=t.length;n<i;++n)r=t[n],a=r.mark,l=a.group,r=f[a.marktype].nested?a:r,u.union(o(r.bounds,l)),r["bounds:prev"]&&u.union(o(r["bounds:prev"],l));return u.round(),e.beginPath(),e.rect(u.x1,u.y1,u.width(),u.height()),e.clip(),u}function o(e,t){if(null==t)return e;for(var n=e.clone();null!=t;t=t.mark.group)n.translate(t.x||0,t.y||0);return n}var a=e("../../util/dom"),s=e("../../util/Bounds"),l=e("../../util/ImageLoader"),u=e("../../util/canvas"),c=e("../Renderer"),f=e("./marks");i.RETINA=!0;var h=c.prototype,d=i.prototype=Object.create(h);d.constructor=i,d.initialize=function(e,t,n,i){return this._canvas=u.instance(t,n),e&&(a.clear(e,0).appendChild(this._canvas),this._canvas.setAttribute("class","marks")),h.initialize.call(this,e,t,n,i)},d.resize=function(e,t,n){return h.resize.call(this,e,t,n),u.resize(this._canvas,this._width,this._height,this._padding,i.RETINA),this},d.canvas=function(){return this._canvas},d.context=function(){return this._canvas?this._canvas.getContext("2d"):null},d.pendingImages=function(){return this._loader.pending()},d.render=function(e,t){var n,i=this.context(),o=this._padding,a=this._width+o.left+o.right,s=this._height+o.top+o.bottom;return this._scene=e,i.save(),n=r(i,t),this.clear(-o.left,-o.top,a,s),this.draw(i,e,n),i.restore(),this._scene=null,this},d.draw=function(e,t,n){var i=f[t.marktype];i.draw.call(this,e,t,n)},d.clear=function(e,t,n,i){var r=this.context();r.clearRect(e,t,n,i),null!=this._bgcolor&&(r.fillStyle=this._bgcolor,r.fillRect(e,t,n,i))},d.loadImage=function(e){var t=this,n=this._scene;return this._loader.loadImage(e,function(){t.renderAsync(n)})},d.renderAsync=function(e){var t=this;t._async_id&&clearTimeout(t._async_id),t._async_id=setTimeout(function(){t.render(e),delete t._async_id},10)},t.exports=i},{"../../util/Bounds":77,"../../util/ImageLoader":80,"../../util/canvas":83,"../../util/dom":84,"../Renderer":55,"./marks":63}],58:[function(e,t,n){t.exports={Handler:e("./CanvasHandler"),Renderer:e("./CanvasRenderer")}},{"./CanvasHandler":56,"./CanvasRenderer":57}],59:[function(e,t,n){function i(e,t){var n=t.x||0,i=t.y||0,r=t.innerRadius||0,a=t.outerRadius||0,s=(t.startAngle||0)-o,l=(t.endAngle||0)-o;e.beginPath(),0===r?e.moveTo(n,i):e.arc(n,i,r,s,l,0),e.arc(n,i,a,l,s,1),e.closePath()}var r=e("./util"),o=Math.PI/2;t.exports={draw:r.drawAll(i),pick:r.pickPath(i)}},{"./util":70}],60:[function(e,t,n){function i(e,t){var n=t[0],i=n.pathCache||(n.pathCache=a(l(t)));s(e,i)}function r(e,t,n,i,r,o){var a=t.items,s=t.bounds;return!a||!a.length||s&&!s.contains(r,o)?null:(null!=e.pixelratio&&1!==e.pixelratio&&(n*=e.pixelratio,i*=e.pixelratio),u(e,a,n,i)?a[0]:null)}var o=e("./util"),a=e("../../../path/parse"),s=e("../../../path/render"),l=e("../../../util/svg").path.area,u=o.testPath(i);t.exports={draw:o.drawOne(i),pick:r,nested:!0}},{"../../../path/parse":52,"../../../path/render":53,"../../../util/svg":86,"./util":70}],61:[function(e,t,n){function i(e,t,n){if(t.items&&t.items.length){var i,r,s,l,u,c,f,h,d,p,g,m,v,y=t.items,b=this;for(p=0,g=y.length;p<g;++p){for(i=y[p],s=i.axisItems||a,r=i.items||a,l=i.legendItems||a,u=i.x||0,c=i.y||0,f=i.width||0,h=i.height||0,(i.stroke||i.fill)&&(d=null==i.opacity?1:i.opacity,d>0&&(i.fill&&o.fill(e,i,d)&&e.fillRect(u,c,f,h),i.stroke&&o.stroke(e,i,d)&&e.strokeRect(u,c,f,h))),e.save(),e.translate(u,c),i.clip&&(e.beginPath(),e.rect(0,0,f,h),e.clip()),n&&n.translate(-u,-c),m=0,v=s.length;m<v;++m)"back"===s[m].layer&&b.draw(e,s[m],n);for(m=0,v=r.length;m<v;++m)b.draw(e,r[m],n);for(m=0,v=s.length;m<v;++m)"back"!==s[m].layer&&b.draw(e,s[m],n);for(m=0,v=l.length;m<v;++m)b.draw(e,l[m],n);n&&n.translate(u,c),e.restore()}}}function r(e,t,n,i,r,o){if(t.bounds&&!t.bounds.contains(r,o))return null;var s,l,u,c,f,h,d,p,g,m,v,y=t.items||a;for(g=y.length;--g>=0;)if(l=y[g],v=l.bounds,!v||v.contains(r,o)){for(u=l.axisItems||a,c=l.items||a,f=l.legendItems||a,d=l.x||0,p=l.y||0,e.save(),e.translate(d,p),d=r-d,p=o-p,m=f.length;--m>=0;)if(s=f[m],s.interactive!==!1&&(h=this.pick(s,n,i,d,p)))return e.restore(),h;for(m=u.length;--m>=0;)if(s=u[m],s.interactive!==!1&&"back"!==s.layer&&(h=this.pick(s,n,i,d,p)))return e.restore(),h;for(m=c.length;--m>=0;)if(s=c[m],s.interactive!==!1&&(h=this.pick(s,n,i,d,p)))return e.restore(),h;for(m=u.length;--m>=0;)if(s=u[m],s.interative!==!1&&"back"===s.layer&&(h=this.pick(s,n,i,d,p)))return e.restore(),h;if(e.restore(),t.interactive!==!1&&(l.fill||l.stroke)&&d>=0&&d<=l.width&&p>=0&&p<=l.height)return l}return null}var o=e("./util"),a=[];t.exports={draw:i,pick:r}},{"./util":70}],62:[function(e,t,n){function i(e,t,n){if(t.items&&t.items.length)for(var i,r=this,o=t.items,a=0,s=o.length;a<s;++a)if(i=o[a],!n||n.intersects(i.bounds)){i.image&&i.image.url===i.url||(i.image=r.loadImage(i.url),i.image.url=i.url);var l,u=i.x||0,c=i.y||0,f=i.width||i.image&&i.image.width||0,h=i.height||i.image&&i.image.height||0;u-="center"===i.align?f/2:"right"===i.align?f:0,c-="middle"===i.baseline?h/2:"bottom"===i.baseline?h:0,i.image.loaded&&(e.globalAlpha=null!=(l=i.opacity)?l:1,e.drawImage(i.image,u,c,f,h))}}var r=e("./util");t.exports={draw:i,pick:r.pick()}},{"./util":70}],63:[function(e,t,n){t.exports={arc:e("./arc"),area:e("./area"),group:e("./group"),image:e("./image"),line:e("./line"),path:e("./path"),rect:e("./rect"),rule:e("./rule"),symbol:e("./symbol"),text:e("./text")}},{"./arc":59,"./area":60,"./group":61,"./image":62,"./line":64,"./path":65,"./rect":66,"./rule":67,"./symbol":68,"./text":69}],64:[function(e,t,n){function i(e,t){var n=t[0],i=n.pathCache||(n.pathCache=a(l(t)));s(e,i)}function r(e,t,n,i,r,o){var a=t.items,s=t.bounds;return!a||!a.length||s&&!s.contains(r,o)?null:(null!=e.pixelratio&&1!==e.pixelratio&&(n*=e.pixelratio,i*=e.pixelratio),u(e,a,n,i)?a[0]:null)}var o=e("./util"),a=e("../../../path/parse"),s=e("../../../path/render"),l=e("../../../util/svg").path.line,u=o.testPath(i,!1);t.exports={draw:o.drawOne(i),pick:r,nested:!0}},{"../../../path/parse":52,"../../../path/render":53,"../../../util/svg":86,"./util":70}],65:[function(e,t,n){function i(e,t){if(null==t.path)return!0;var n=t.pathCache||(t.pathCache=o(t.path));a(e,n,t.x,t.y)}var r=e("./util"),o=e("../../../path/parse"),a=e("../../../path/render");t.exports={draw:r.drawAll(i),pick:r.pickPath(i)}},{"../../../path/parse":52,"../../../path/render":53,"./util":70}],66:[function(e,t,n){function i(e,t,n){if(t.items&&t.items.length)for(var i,o,a,s,l,u,c=t.items,f=0,h=c.length;f<h;++f)i=c[f],n&&!n.intersects(i.bounds)||(o=null==i.opacity?1:i.opacity,0!==o&&(a=i.x||0,s=i.y||0,l=i.width||0,u=i.height||0,i.fill&&r.fill(e,i,o)&&e.fillRect(a,s,l,u),i.stroke&&r.stroke(e,i,o)&&e.strokeRect(a,s,l,u)))}var r=e("./util");t.exports={draw:i,pick:r.pick()}},{"./util":70}],67:[function(e,t,n){function i(e,t,n){if(t.items&&t.items.length)for(var i,r,o,s,l,u,c=t.items,f=0,h=c.length;f<h;++f)i=c[f],n&&!n.intersects(i.bounds)||(r=null==i.opacity?1:i.opacity,0!==r&&(o=i.x||0,s=i.y||0,l=null!=i.x2?i.x2:o,u=null!=i.y2?i.y2:s,i.stroke&&a.stroke(e,i,r)&&(e.beginPath(),e.moveTo(o,s),e.lineTo(l,u),e.stroke())))}function r(e,t){var n=t.x||0,i=t.y||0,r=null!=t.x2?t.x2:n,o=null!=t.y2?t.y2:i,a=t.strokeWidth,s=t.strokeCap;e.lineWidth=null!=a?a:1,e.lineCap=null!=s?s:"butt",e.beginPath(),e.moveTo(n,i),e.lineTo(r,o)}function o(e,t,n,i){return!!e.isPointInStroke&&(r(e,t),e.isPointInStroke(n,i))}var a=e("./util");t.exports={draw:i,pick:a.pick(o)}},{"./util":70}],68:[function(e,t,n){function i(e,t){var n,i,o,c,f=null!=t.size?t.size:100,h=t.x,d=t.y;if(e.beginPath(),null==t.shape||"circle"===t.shape)return n=Math.sqrt(f/Math.PI),e.arc(h,d,n,0,2*Math.PI,0),void e.closePath();switch(t.shape){case"cross":n=Math.sqrt(f/5)/2,i=3*n,e.moveTo(h-i,d-n),e.lineTo(h-n,d-n),e.lineTo(h-n,d-i),e.lineTo(h+n,d-i),e.lineTo(h+n,d-n),e.lineTo(h+i,d-n),e.lineTo(h+i,d+n),e.lineTo(h+n,d+n),e.lineTo(h+n,d+i),e.lineTo(h-n,d+i),e.lineTo(h-n,d+n),e.lineTo(h-i,d+n);break;case"diamond":c=Math.sqrt(f/(2*u)),o=c*u,e.moveTo(h,d-c),e.lineTo(h+o,d),e.lineTo(h,d+c),e.lineTo(h-o,d);break;case"square":i=Math.sqrt(f),n=i/2,e.rect(h-n,d-n,i,i);break;case"triangle-down":o=Math.sqrt(f/l),c=o*l/2,e.moveTo(h,d+c),e.lineTo(h+o,d-c),e.lineTo(h-o,d-c);break;case"triangle-up":o=Math.sqrt(f/l),c=o*l/2,e.moveTo(h,d-c),e.lineTo(h+o,d+c),e.lineTo(h-o,d+c);break;default:var p=r(a(t.shape),f);s(e,p,h,d)}e.closePath()}function r(e,t){var n,i,r,o,a,s=Math.sqrt(t);for(n=0,i=e.length;n<i;++n)for(a=e[n],r=1,o=a.length;r<o;++r)a[r]*=s;return e}var o=e("./util"),a=e("../../../path/parse"),s=e("../../../path/render"),l=Math.sqrt(3),u=Math.tan(30*Math.PI/180);t.exports={draw:o.drawAll(i),pick:o.pickPath(i)}},{"../../../path/parse":52,"../../../path/render":53,"./util":70}],69:[function(e,t,n){function i(e,t,n){if(t.items&&t.items.length)for(var i,r,o,a,u,c,f,h=t.items,d=0,p=h.length;d<p;++d)i=h[d],n&&!n.intersects(i.bounds)||(f=s.value(i.text),f&&(r=null==i.opacity?1:i.opacity,0!==r&&(e.font=s.font(i),e.textAlign=i.align||"left",o=i.x||0,a=i.y||0,(u=i.radius)&&(c=(i.theta||0)-Math.PI/2,o+=u*Math.cos(c),a+=u*Math.sin(c)),i.angle&&(e.save(),e.translate(o,a),e.rotate(i.angle*Math.PI/180),o=a=0),o+=i.dx||0,a+=(i.dy||0)+s.offset(i),i.fill&&l.fill(e,i,r)&&e.fillText(f,o,a),i.stroke&&l.stroke(e,i,r)&&e.strokeText(f,o,a),i.angle&&e.restore())))}function r(e,t,n,i,r,o){if(t.fontSize<=0)return!1;if(!t.angle)return!0;var s=a(t,u,!0),l=-t.angle*Math.PI/180,c=Math.cos(l),f=Math.sin(l),h=t.x,d=t.y,p=c*r-f*o+(h-h*c+d*f),g=f*r+c*o+(d-h*f-d*c);return s.contains(p,g)}var o=e("../../../util/Bounds"),a=e("../../../util/bound").text,s=e("../../../util/text"),l=e("./util"),u=new o;t.exports={draw:i,pick:l.pick(r)}},{"../../../util/Bounds":77,"../../../util/bound":82,"../../../util/text":87,"./util":70}],70:[function(e,t,n){function i(e,t,n,i){if(!e(t,i)){var r=null==n.opacity?1:n.opacity;0!==r&&(n.fill&&c(t,n,r)&&t.fill(),n.stroke&&f(t,n,r)&&t.stroke())}}function r(e,t,n,r){var o,a,s;for(o=0,a=n.items.length;o<a;++o)s=n.items[o],r&&!r.intersects(s.bounds)||i(e,t,s,s)}function o(e){return function(t,n,i){r(e,t,n,i)}}function a(e){return function(t,n,r){n.items.length&&(r&&!r.intersects(n.bounds)||i(e,t,n.items[0],n.items))}}function s(e){return e||(e=p),function(t,n,i,r,o,a){if(!n.items.length)return null;var s,l,u;for(null!=t.pixelratio&&1!==t.pixelratio&&(i*=t.pixelratio,r*=t.pixelratio),u=n.items.length;--u>=0;)if(s=n.items[u],l=s.bounds,(!l||l.contains(o,a))&&l&&e(t,s,i,r,o,a))return s;return null}}function l(e,t){return function(n,i,r,o){var a,s,l=Array.isArray(i)?i[0]:i,u=null==t?l.fill:t,c=l.stroke&&n.isPointInStroke;return c&&(a=l.strokeWidth,s=l.strokeCap,n.lineWidth=null!=a?a:1,n.lineCap=null!=s?s:"butt"),!e(n,i)&&(u&&n.isPointInPath(r,o)||c&&n.isPointInStroke(r,o))}}function u(e){return s(l(e))}function c(e,t,n){return n*=null==t.fillOpacity?1:t.fillOpacity,n>0&&(e.globalAlpha=n,e.fillStyle=h(e,t,t.fill),!0)}function f(e,t,n){var i,r=null!=(r=t.strokeWidth)?r:1;return!(r<=0)&&(n*=null==t.strokeOpacity?1:t.strokeOpacity,n>0&&(e.globalAlpha=n,e.strokeStyle=h(e,t,t.stroke),e.lineWidth=r,e.lineCap=null!=(i=t.strokeCap)?i:"butt",e.vgLineDash(t.strokeDash||null),e.vgLineDashOffset(t.strokeDashOffset||0),!0))}function h(e,t,n){return n.id?d(e,n,t.bounds):n}function d(e,t,n){var i,r,o=n.width(),a=n.height(),s=n.x1+t.x1*o,l=n.y1+t.y1*a,u=n.x1+t.x2*o,c=n.y1+t.y2*a,f=e.createLinearGradient(s,l,u,c),h=t.stops;for(i=0,r=h.length;i<r;++i)f.addColorStop(h[i].offset,h[i].color);return f}var p=function(){return!0};t.exports={drawOne:a,drawAll:o,pick:s,pickPath:u,testPath:l,stroke:f,fill:c,color:h,gradient:d}},{}],71:[function(e,t,n){t.exports={canvas:e("./canvas"),svg:e("./svg")}},{"./canvas":58,"./svg":75}],72:[function(e,t,n){function i(){o.call(this)}var r=e("../../util/dom"),o=e("../Handler"),a=o.prototype,s=i.prototype=Object.create(a);s.constructor=i,s.initialize=function(e,t,n){return this._svg=r.find(e,"svg"),a.initialize.call(this,e,t,n)},s.svg=function(){return this._svg},s.listener=function(e){var t=this;return function(n){var i=n.target,r=i.__data__;n.vegaType=n.type,r=Array.isArray(r)?r[0]:r,e.call(t._obj,n,r)}},s.on=function(e,t){var n=this.eventName(e),i=this._svg,r=this._handlers,o={type:e,handler:t,listener:this.listener(t)};return(r[n]||(r[n]=[])).push(o),i.addEventListener(n,o.listener),this},s.off=function(e,t){var n,i=this.eventName(e),r=this._svg,o=this._handlers[i];if(o){for(n=o.length;--n>=0;)(o[n].type===e&&!t||o[n].handler===t)&&(r.removeEventListener(i,o[n].listener),o.splice(n,1));return this}},t.exports=i},{"../../util/dom":84,"../Handler":54}],73:[function(e,t,n){function i(e){f.call(this),this._loader=new c(e),this._dirtyID=0}function r(e,t,n){var i,r,o;for(e=d.child(e,n,"linearGradient",g),e.setAttribute("id",t.id),e.setAttribute("x1",t.x1),e.setAttribute("x2",t.x2),e.setAttribute("y1",t.y1),e.setAttribute("y2",t.y2),i=0,r=t.stops.length;i<r;++i)o=d.child(e,i,"stop",g),o.setAttribute("offset",t.stops[i].offset),o.setAttribute("stop-color",t.stops[i].color);d.clear(e,i)}function o(e,t,n){var i;e=d.child(e,n,"clipPath",g),e.setAttribute("id",t.id),i=d.child(e,0,"rect",g),i.setAttribute("x",0),i.setAttribute("y",0),i.setAttribute("width",t.width),i.setAttribute("height",t.height)}function a(e,t){for(;e&&e.dirty!==t;e=e.mark.group){if(e.dirty=t,!e.mark||e.mark.dirty===t)return;e.mark.dirty=t}}function s(e,t,n,i,r){var o=d.child(e,i,t.tag,g,null,r);if(o.__data__=n,o.__values__={fill:"default"},"g"===t.tag){var a=d.child(o,0,"rect",g,"background");a.__data__=n}return n._svg=o}function l(e,t,n){t!==_[e]&&(null!=t?n?b.setAttributeNS(n,e,t):b.setAttribute(e,t):n?b.removeAttributeNS(n,e):b.removeAttribute(e),_[e]=t)}function u(){return"undefined"!=typeof window?window.location.href:""}var c=e("../../util/ImageLoader"),f=e("../Renderer"),h=e("../../util/text"),d=e("../../util/dom"),p=e("../../util/svg"),g=p.metadata.xmlns,m=e("./marks"),v=f.prototype,y=i.prototype=Object.create(v);y.constructor=i,y.initialize=function(e,t,n,i){return e&&(this._svg=d.child(e,0,"svg",g,"marks"),d.clear(e,1),this._root=d.child(this._svg,0,"g",g),d.clear(this._svg,1)),this._defs={clip_id:1,gradient:{},clipping:{}},this.background(this._bgcolor),v.initialize.call(this,e,t,n,i)},y.background=function(e){return arguments.length&&this._svg&&this._svg.style.setProperty("background-color",e),v.background.apply(this,arguments)},y.resize=function(e,t,n){if(v.resize.call(this,e,t,n),this._svg){var i=this._width,r=this._height,o=this._padding;this._svg.setAttribute("width",i+o.left+o.right),this._svg.setAttribute("height",r+o.top+o.bottom),this._root.setAttribute("transform","translate("+o.left+","+o.top+")")}return this},y.svg=function(){if(!this._svg)return null;var e={"class":"marks",width:this._width+this._padding.left+this._padding.right,height:this._height+this._padding.top+this._padding.bottom};for(var t in p.metadata)e[t]=p.metadata[t];return d.openTag("svg",e)+this._svg.innerHTML+d.closeTag("svg")},y.imageURL=function(e){return this._loader.imageURL(e)},y.render=function(e,t){return this._dirtyCheck(t)&&(this._dirtyAll&&this._resetDefs(),this.draw(this._root,e,-1),d.clear(this._root,1)),this.updateDefs(),this},y.draw=function(e,t,n){this.drawMark(e,t,n,m[t.marktype])},y.updateDefs=function(){var e,t=this._svg,n=this._defs,i=n.el,a=0;for(e in n.gradient)i||(i=n.el=d.child(t,0,"defs",g)),r(i,n.gradient[e],a++);for(e in n.clipping)i||(i=n.el=d.child(t,0,"defs",g)),o(i,n.clipping[e],a++);i&&(0===a?(t.removeChild(i),n.el=null):d.clear(i,a))},y._resetDefs=function(){var e=this._defs;e.clip_id=1,e.gradient={},e.clipping={}},y.isDirty=function(e){return this._dirtyAll||e.dirty===this._dirtyID},y._dirtyCheck=function(e){if(this._dirtyAll=!0,!e)return!0;var t,n,i,r,o,s,l,u=++this._dirtyID;for(o=0,s=e.length;o<s;++o)t=e[o],n=t.mark,n.marktype!==i&&(i=n.marktype,r=m[i]),"exit"!==t.status?(t=r.nest?n.items[0]:t,t._update!==u&&(t._svg?this._update(r,t._svg,t):(this._dirtyAll=!1,a(t,u)),t._update=u)):t._svg&&(r.nest&&t.mark.items.length?(this._update(r,t._svg,t.mark.items[0]),l=t.mark.items[0],l._svg=t._svg,l._update=u):d.remove(t._svg),t._svg=null);return!this._dirtyAll},y.drawMark=function(e,t,n,i){if(this.isDirty(t)){var r,o,a,l,u,c,f=i.nest?t.items&&t.items.length?[t.items[0]]:[]:t.items||[],h=t.interactive===!1?"none":null,p="g"===i.tag,m=d.cssClass(t);for(r=d.child(e,n+1,"g",g,m),r.setAttribute("class",m),t._svg=r,!p&&h&&r.style.setProperty("pointer-events",h),o=0,a=f.length;o<a;++o)this.isDirty(u=f[o])&&(c=!(this._dirtyAll||u._svg),l=s(r,i,u,o,c),this._update(i,l,u),p&&(c&&(this._dirtyAll=!0),this._recurse(l,u),c&&(this._dirtyAll=!1)));return d.clear(r,o),r}},y._recurse=function(e,t){var n,i,r=t.items||[],o=t.legendItems||[],a=t.axisItems||[],s=0;for(n=0,i=a.length;n<i;++n)"back"===a[n].layer&&this.drawMark(e,a[n],s++,m.group);for(n=0,i=r.length;n<i;++n)this.draw(e,r[n],s++);for(n=0,i=a.length;n<i;++n)"back"!==a[n].layer&&this.drawMark(e,a[n],s++,m.group);for(n=0,i=o.length;n<i;++n)this.drawMark(e,o[n],s++,m.group);d.clear(e,1+s)};var b=null,_=null,E={group:function(e,t,n){b=t.childNodes[0],_=t.__values__,e.background(l,n,this);var i=n.mark.interactive===!1?"none":null;i!==_.events&&(b.style.setProperty("pointer-events",i),_.events=i)},text:function(e,t,n){var i=h.value(n.text);i!==_.text&&(t.textContent=i,_.text=i),i=h.font(n),i!==_.font&&(t.style.setProperty("font",i),_.font=i)}};y._update=function(e,t,n){b=t,_=t.__values__,e.attr(l,n,this);var i=E[e.type];i&&i(e,t,n),this.style(b,n)},y.style=function(e,t){if(null!=t){var n,i,r,o,a;for(n=0,i=p.styleProperties.length;n<i;++n)r=p.styleProperties[n],a=t[r],a!==_[r]&&(o=p.styles[r],null==a?"fill"===o?e.style.setProperty(o,"none"):e.style.removeProperty(o):(a.id&&(this._defs.gradient[a.id]=a,a="url("+u()+"#"+a.id+")"),e.style.setProperty(o,a+"")),_[r]=a)}},t.exports=i},{"../../util/ImageLoader":80,"../../util/dom":84,"../../util/svg":86,"../../util/text":87,"../Renderer":55,"./marks":76}],74:[function(e,t,n){function i(e){s.call(this),this._loader=new l(e),this._text={head:"",root:"",foot:"",defs:"",body:""},this._defs={clip_id:1,gradient:{},clipping:{}}}function r(e,t,n,i){v[i||e]=t}function o(e,t,n,i){if(null==e)return"";var r,o,a,s,l,f="";for("bgrect"===n&&t.interactive===!1&&(f+="pointer-events: none;"),"text"===n&&(f+="font: "+c.font(e)+";"),r=0,o=u.styleProperties.length;r<o;++r)a=u.styleProperties[r],s=u.styles[a],l=e[a],null==l?"fill"===s&&(f+=(f.length?" ":"")+"fill: none;"):(l.id&&(i.gradient[l.id]=l,l="url(#"+l.id+")"),f+=(f.length?" ":"")+s+": "+l+";");return f?'style="'+f+'"':null}function a(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}var s=e("../Renderer"),l=e("../../util/ImageLoader"),u=e("../../util/svg"),c=e("../../util/text"),f=e("../../util/dom"),h=f.openTag,d=f.closeTag,p=e("./marks"),g=s.prototype,m=i.prototype=Object.create(g);m.constructor=i,m.resize=function(e,t,n){g.resize.call(this,e,t,n);var i=this._padding,r=this._text,o={"class":"marks",width:this._width+i.left+i.right,height:this._height+i.top+i.bottom};for(var a in u.metadata)o[a]=u.metadata[a];return r.head=h("svg",o),r.root=h("g",{transform:"translate("+i.left+","+i.top+")"}),r.foot=d("g")+d("svg"),this},m.svg=function(){var e=this._text;return e.head+e.defs+e.root+e.body+e.foot},m.render=function(e){return this._text.body=this.mark(e),this._text.defs=this.buildDefs(),this},m.reset=function(){return this._defs.clip_id=0,this},m.buildDefs=function(){var e,t,n,i,r=this._defs,o="";for(t in r.gradient){for(n=r.gradient[t],i=n.stops,o+=h("linearGradient",{id:t,x1:n.x1,x2:n.x2,y1:n.y1,y2:n.y2}),e=0;e<i.length;++e)o+=h("stop",{offset:i[e].offset,"stop-color":i[e].color})+d("stop");o+=d("linearGradient")}for(t in r.clipping)n=r.clipping[t],o+=h("clipPath",{id:t}),o+=h("rect",{x:0,y:0,width:n.width,height:n.height})+d("rect"),o+=d("clipPath");return o.length>0?h("defs")+o+d("defs"):""},m.imageURL=function(e){return this._loader.imageURL(e)};var v;m.attributes=function(e,t){return v={},e(r,t,this),v},m.mark=function(e){var t,n,i,r=p[e.marktype],s=r.tag,l=r.attr,u=r.nest||!1,g=u?e.items&&e.items.length?[e.items[0]]:[]:e.items||[],m=this._defs,v="";for("g"!==s&&e.interactive===!1&&(t='style="pointer-events: none;"'),v+=h("g",{"class":f.cssClass(e)},t),n=0;n<g.length;++n)i=g[n],t="g"!==s?o(i,e,s,m):null,v+=h(s,this.attributes(l,i),t),"text"===s?v+=a(c.value(i.text)):"g"===s&&(v+=h("rect",this.attributes(r.background,i),o(i,e,"bgrect",m))+d("rect"),v+=this.markGroup(i)),v+=d(s);return v+d("g")},m.markGroup=function(e){var t,n,i="",r=e.axisItems||[],o=e.items||[],a=e.legendItems||[];for(t=0,n=r.length;t<n;++t)"back"===r[t].layer&&(i+=this.mark(r[t]));for(t=0,n=o.length;t<n;++t)i+=this.mark(o[t]);for(t=0,n=r.length;t<n;++t)"back"!==r[t].layer&&(i+=this.mark(r[t]));for(t=0,n=a.length;t<n;++t)i+=this.mark(a[t]);return i},t.exports=i},{"../../util/ImageLoader":80,"../../util/dom":84,"../../util/svg":86,"../../util/text":87,"../Renderer":55,"./marks":76}],75:[function(e,t,n){t.exports={Handler:e("./SVGHandler"),Renderer:e("./SVGRenderer"),string:{Renderer:e("./SVGStringRenderer")}}},{"./SVGHandler":72,"./SVGRenderer":73,"./SVGStringRenderer":74}],76:[function(e,t,n){function i(e){return r(e.x||0,e.y||0)}function r(e,t){return"translate("+e+","+t+")"}var o=e("../../util/text"),a=e("../../util/svg"),s=a.symbolTypes,l=a.textAlign,u=a.path;t.exports={arc:{tag:"path",type:"arc",attr:function(e,t){e("transform",i(t)),e("d",u.arc(t))}},area:{tag:"path",type:"area",nest:!0,attr:function(e,t){var n=t.mark.items;n.length&&e("d",u.area(n))}},group:{tag:"g",type:"group",attr:function(e,t,n){var r,o,a=null;e("transform",i(t)),t.clip&&(r=n._defs,a=t.clip_id||(t.clip_id="clip"+r.clip_id++),o=r.clipping[a]||(r.clipping[a]={id:a}),o.width=t.width||0,o.height=t.height||0),e("clip-path",a?"url(#"+a+")":null)},background:function(e,t){e("class","background"),e("width",t.width||0),e("height",t.height||0)}},image:{tag:"image",type:"image",attr:function(e,t,n){var i=t.x||0,o=t.y||0,a=t.width||0,s=t.height||0,l=n.imageURL(t.url);i-="center"===t.align?a/2:"right"===t.align?a:0,o-="middle"===t.baseline?s/2:"bottom"===t.baseline?s:0,e("href",l,"http://www.w3.org/1999/xlink","xlink:href"),e("transform",r(i,o)),e("width",a),e("height",s)}},line:{tag:"path",type:"line",nest:!0,attr:function(e,t){var n=t.mark.items;n.length&&e("d",u.line(n))}},path:{tag:"path",type:"path",attr:function(e,t){e("transform",i(t)),e("d",t.path)}},rect:{tag:"rect",type:"rect",nest:!1,attr:function(e,t){e("transform",i(t)),e("width",t.width||0),e("height",t.height||0)}},rule:{tag:"line",type:"rule",attr:function(e,t){e("transform",i(t)),e("x2",null!=t.x2?t.x2-(t.x||0):0),e("y2",null!=t.y2?t.y2-(t.y||0):0)}},symbol:{tag:"path",type:"symbol",attr:function(e,t){var n=!t.shape||s[t.shape]?u.symbol(t):u.resize(t.shape,t.size);e("transform",i(t)),e("d",n)}},text:{tag:"text",type:"text",nest:!1,attr:function(e,t){var n,i=t.dx||0,a=(t.dy||0)+o.offset(t),s=t.x||0,u=t.y||0,c=t.angle||0,f=t.radius||0;f&&(n=(t.theta||0)-Math.PI/2,s+=f*Math.cos(n),u+=f*Math.sin(n)),e("text-anchor",l[t.align]||"start"),c?(n=r(s,u)+" rotate("+c+")",(i||a)&&(n+=" "+r(i,a))):n=r(s+i,u+a),e("transform",n)}}}},{"../../util/svg":86,"../../util/text":87}],77:[function(e,t,n){function i(e){this.clear(),e&&this.union(e)}var r=i.prototype;r.clone=function(){return new i(this)},r.clear=function(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},r.set=function(e,t,n,i){return this.x1=e,this.y1=t,this.x2=n,this.y2=i,this},r.add=function(e,t){return e<this.x1&&(this.x1=e),t<this.y1&&(this.y1=t),e>this.x2&&(this.x2=e),t>this.y2&&(this.y2=t),this},r.expand=function(e){return this.x1-=e,this.y1-=e,this.x2+=e,this.y2+=e,this},r.round=function(){return this.x1=Math.floor(this.x1),this.y1=Math.floor(this.y1),this.x2=Math.ceil(this.x2),this.y2=Math.ceil(this.y2),this},r.translate=function(e,t){return this.x1+=e,this.x2+=e,this.y1+=t,this.y2+=t,this},r.rotate=function(e,t,n){var i=Math.cos(e),r=Math.sin(e),o=t-t*i+n*r,a=n-t*r-n*i,s=this.x1,l=this.x2,u=this.y1,c=this.y2;return this.clear().add(i*s-r*u+o,r*s+i*u+a).add(i*s-r*c+o,r*s+i*c+a).add(i*l-r*u+o,r*l+i*u+a).add(i*l-r*c+o,r*l+i*c+a)},r.union=function(e){return e.x1<this.x1&&(this.x1=e.x1),e.y1<this.y1&&(this.y1=e.y1),e.x2>this.x2&&(this.x2=e.x2),e.y2>this.y2&&(this.y2=e.y2),this},r.encloses=function(e){return e&&this.x1<=e.x1&&this.x2>=e.x2&&this.y1<=e.y1&&this.y2>=e.y2},r.alignsWith=function(e){return e&&(this.x1==e.x1||this.x2==e.x2||this.y1==e.y1||this.y2==e.y2)},r.intersects=function(e){return e&&!(this.x2<e.x1||this.x1>e.x2||this.y2<e.y1||this.y1>e.y2)},r.contains=function(e,t){return!(e<this.x1||e>this.x2||t<this.y1||t>this.y2)},r.width=function(){return this.x2-this.x1},r.height=function(){return this.y2-this.y1},t.exports=i},{}],78:[function(e,t,n){t.exports=function(e){function t(){}function n(t,n){e.add(t,n)}return{bounds:function(t){return arguments.length?(e=t,this):e},beginPath:t,closePath:t,moveTo:n,lineTo:n,quadraticCurveTo:function(t,n,i,r){e.add(t,n),e.add(i,r)},bezierCurveTo:function(t,n,i,r,o,a){e.add(t,n),e.add(i,r),e.add(o,a)}}}},{}],79:[function(e,t,n){function i(e){this.id="gradient_"+r++,this.type=e||"linear",this.stops=[],this.x1=0,this.x2=1,this.y1=0,this.y2=0}var r=0,o=i.prototype;o.stop=function(e,t){return this.stops.push({offset:e,color:t}),this},t.exports=i},{}],80:[function(e,t,n){(function(n){function i(e){this._pending=0,this._config=e||i.Config}function r(e,t){var n=a.sanitizeUrl(this.params(e));if(!n)return t&&t(e,null),null;var i=this,r=new Image;return i._pending+=1,r.onload=function(){i._pending-=1,r.loaded=!0,t&&t(null,r)},r.src=n,r}function o(e,t){var i=this,r=new("undefined"!=typeof window?window.canvas:"undefined"!=typeof n?n.canvas:null).Image;return i._pending+=1,a(this.params(e),function(e,n){return i._pending-=1,e?(t&&t(e,null),null):(r.src=n,r.loaded=!0,void(t&&t(null,r)))}),r}var a=e("datalib/src/import/load");i.Config=null;var s=i.prototype;s.pending=function(){return this._pending},s.params=function(e){var t,n={url:e};for(t in this._config)n[t]=this._config[t];return n},s.imageURL=function(e){return a.sanitizeUrl(this.params(e))},s.loadImage=function(e,t){return a.useXHR?r.call(this,e,t):o.call(this,e,t)},t.exports=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"datalib/src/import/load":22}],81:[function(e,t,n){function i(e){this.mark=e}var r=i.prototype;r.hasPropertySet=function(e){var t=this.mark.def.properties;return t&&null!=t[e]},r.cousin=function(e,t){if(0===e)return this;e=e||-1;var n=this.mark,i=n.group,r=null==t?n.items.indexOf(this):t,o=i.items.indexOf(n)+e;return i.items[o].items[r]},r.sibling=function(e){if(0===e)return this;e=e||-1;var t=this.mark,n=t.items.indexOf(this)+e;return t.items[n]},r.remove=function(){var e=this,t=e.mark.items,n=t.indexOf(e);return n>=0&&(n===t.length-1?t.pop():t.splice(n,1)),e},r.touch=function(){this.pathCache&&(this.pathCache=null)},t.exports=i},{}],82:[function(e,t,n){function i(){return N||(N=_.instance(1,1).getContext("2d"))}function r(e,t){return e.stroke&&0!==e.opacity&&0!==e.stokeOpacity&&t.expand(null!=e.strokeWidth?e.strokeWidth:1),t}function o(e,t,n,i,o){return null==t?n.set(0,0,0,0):(S(M.bounds(n),t,i,o),r(e,n)),n}function a(e,t){var n=e.path?e.pathCache||(e.pathCache=T(e.path)):null;return o(e,n,t,e.x,e.y)}function s(e,t){if(0===e.items.length)return t;var n=e.items,i=n[0],r=i.pathCache||(i.pathCache=T(A(n)));return o(i,r,t)}function l(e,t){if(0===e.items.length)return t;var n=e.items,i=n[0],r=i.pathCache||(i.pathCache=T(C(n)));return o(i,r,t)}function u(e,t){var n,i;return r(e,t.set(n=e.x||0,i=e.y||0,n+e.width||0,i+e.height||0))}function c(e,t){var n=e.x||0,i=e.y||0,r=e.width||0,o=e.height||0;return n-="center"===e.align?r/2:"right"===e.align?r:0,i-="middle"===e.baseline?o/2:"bottom"===e.baseline?o:0,t.set(n,i,n+r,i+o)}function f(e,t){var n,i;return r(e,t.set(n=e.x||0,i=e.y||0,null!=e.x2?e.x2:n,null!=e.y2?e.y2:i))}function h(e,t){var n,i,o,a,s,l,u,c,f,h=e.x||0,d=e.y||0,p=e.innerRadius||0,g=e.outerRadius||0,m=(e.startAngle||0)-k,v=(e.endAngle||0)-k,y=1/0,b=-(1/0),_=1/0,E=-(1/0),x=[m,v],w=m-m%k;for(i=0;i<4&&w<v;++i,w+=k)x.push(w);for(i=0,o=x.length;i<o;++i)n=x[i],a=Math.cos(n),l=p*a,c=g*a,s=Math.sin(n),u=p*s,f=g*s,y=Math.min(y,l,c),b=Math.max(b,l,c),_=Math.min(_,u,f),E=Math.max(E,u,f);return r(e,t.set(h+y,d+_,h+b,d+E))}function d(e,t){var n,i,o,a,s=null!=e.size?e.size:100,l=e.x||0,u=e.y||0;switch(e.shape){case"cross":i=3*Math.sqrt(s/5)/2,t.set(l-i,u-i,l+i,u+i);break;case"diamond":a=Math.sqrt(s/(2*I)),o=a*I,t.set(l-o,u-a,l+o,u+a);break;case"square":i=Math.sqrt(s),n=i/2,t.set(l-n,u-n,l+n,u+n);break;case"triangle-down":o=Math.sqrt(s/O),a=o*O/2,t.set(l-o,u-a,l+o,u+a);break;case"triangle-up":o=Math.sqrt(s/O),a=o*O/2,t.set(l-o,u-a,l+o,u+a);break;default:n=Math.sqrt(s/Math.PI),t.set(l-n,u-n,l+n,u+n)}return r(e,t)}function p(e,t,n){var r,o,a=i(),s=x.size(e),l=e.align,u=e.radius||0,c=e.x||0,f=e.y||0,h=e.dx||0,d=(e.dy||0)+x.offset(e)-Math.round(.8*s);return u&&(o=(e.theta||0)-Math.PI/2,c+=u*Math.cos(o),f+=u*Math.sin(o)),a.font=x.font(e),r=a.measureText(x.value(e.text)).width,"center"===l?h-=r/2:"right"===l&&(h-=r),t.set(h+=c,d+=f,h+r,d+s),e.angle&&!n&&t.rotate(e.angle*Math.PI/180,c,f),t.expand(n?0:1)}function g(e,t,n){var i,o,a=e.axisItems||[],s=e.items||[],l=e.legendItems||[];if(!e.clip){for(i=0,o=a.length;i<o;++i)t.union(a[i].bounds);for(i=0,o=s.length;i<o;++i)s[i].bounds&&t.union(s[i].bounds);if(n)for(i=0,o=l.length;i<o;++i)t.union(l[i].bounds)}return(e.clip||e.width||e.height)&&r(e,t.add(0,0).add(e.width||0,e.height||0)),t.translate(e.x||0,e.y||0)}function m(e,t,n){var i=e.mark.marktype;t=t||D[i],t.nest&&(e=e.mark);var r=e.bounds,o=e["bounds:prev"]||(e["bounds:prev"]=new b);return r?(o.clear().union(r),r.clear()):e.bounds=new b,t(e,e.bounds,n),r||o.clear().union(e.bounds),e.bounds}function v(e,t,n){var i,r,o,a,s=e.marktype,l=D[s],u=e.items,c=u&&u.length;if(l.nest)return o=c?u[0]:(L.mark=e,L),a=m(o,l,n),t=t&&t.union(a)||a;if(t=t||e.bounds&&e.bounds.clear()||new b,c)for(i=0,r=u.length;i<r;++i)t.union(m(u[i],l,n));return e.bounds=t}var y=e("./BoundsContext"),b=e("./Bounds"),_=e("./canvas"),E=e("./svg"),x=e("./text"),w=e("../path"),T=w.parse,S=w.render,A=E.path.area,C=E.path.line,k=Math.PI/2,O=Math.sqrt(3),I=Math.tan(30*Math.PI/180),N=null,M=y(),D={group:g,symbol:d,image:c,rect:u,rule:f,arc:h,text:p,path:a,area:s,line:l};D.area.nest=!0,D.line.nest=!0;var L={mark:null};t.exports={
mark:v,item:m,text:p,group:g}},{"../path":51,"./Bounds":77,"./BoundsContext":78,"./canvas":83,"./svg":86,"./text":87}],83:[function(e,t,n){(function(e){function n(t,n){t=t||1,n=n||1;var i;if("undefined"!=typeof document&&document.createElement)i=document.createElement("canvas"),i.width=t,i.height=n;else{var r="undefined"!=typeof window?window.canvas:"undefined"!=typeof e?e.canvas:null;if(!r.prototype)return null;i=new r(t,n)}return o(i)}function i(e,t,n,i,o){var a=this._ctx=e.getContext("2d"),s=1;return e.width=t+i.left+i.right,e.height=n+i.top+i.bottom,o&&"undefined"!=typeof HTMLElement&&e instanceof HTMLElement&&(a.pixelratio=s=r(e)||1),a.setTransform(s,0,0,s,s*i.left,s*i.top),e}function r(e){var t=e.getContext("2d"),n=window&&window.devicePixelRatio||1,i=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1,r=n/i;if(n!==i){var o=e.width,a=e.height;e.width=o*r,e.height=a*r,e.style.width=o+"px",e.style.height=a+"px"}return r}function o(e){var t=e.getContext("2d");if(!t.vgLineDash){var n=function(){},i=[];return t.setLineDash?(t.vgLineDash=function(e){this.setLineDash(e||i)},t.vgLineDashOffset=function(e){this.lineDashOffset=e}):void 0!==t.webkitLineDash?(t.vgLineDash=function(e){this.webkitLineDash=e||i},t.vgLineDashOffset=function(e){this.webkitLineDashOffset=e}):void 0!==t.mozDash?(t.vgLineDash=function(e){this.mozDash=e},t.vgLineDashOffset=n):(t.vgLineDash=n,t.vgLineDashOffset=n),e}}t.exports={instance:n,resize:i,lineDash:o}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],84:[function(e,t,n){function i(e,t,n){return n?e.createElementNS(n,t):e.createElement(t)}function r(e){if(e){var t=e.parentNode;t&&(t.removeChild(e),t.childNodes&&t.childNodes.length||r(t))}}t.exports={find:function(e,t){t=t.toLowerCase();for(var n=0,i=e.childNodes.length;n<i;++n)if(e.childNodes[n].tagName.toLowerCase()===t)return e.childNodes[n]},child:function(e,t,n,r,o,a){var s,l;return s=l=e.childNodes[t],(!s||a||s.tagName.toLowerCase()!==n.toLowerCase()||o&&s.getAttribute("class")!=o)&&(s=i(e.ownerDocument,n,r),e.insertBefore(s,l||null),o&&s.setAttribute("class",o)),s},clear:function(e,t){for(var n=e.childNodes.length;n>t;)e.removeChild(e.childNodes[--n]);return e},remove:r,cssClass:function(e){return"mark-"+e.marktype+(e.name?" "+e.name:"")},openTag:function(e,t,n){var i,r,o="<"+e;if(t)for(i in t)r=t[i],null!=r&&(o+=" "+i+'="'+r+'"');return n&&(o+=" "+n),o+">"},closeTag:function(e){return"</"+e+">"}}},{}],85:[function(e,t,n){function i(e,t){return JSON.stringify(e,l,t)}function r(e){var t="string"==typeof e?JSON.parse(e):e;return o(t)}function o(e){var t,n,i,r,l,u=e.marktype;for(i=0,r=s.length;i<r;++i)if(l=e[s[i]])for(t=0,n=l.length;t<n;++t)l[t][u?"mark":"group"]=e,u&&"group"!==u||o(l[t]);return u&&a.mark(e),e}var a=e("../util/bound"),s=["items","axisItems","legendItems"],l=["marktype","name","interactive","clip","items","axisItems","legendItems","layer","x","y","width","height","align","baseline","fill","fillOpacity","opacity","stroke","strokeOpacity","strokeWidth","strokeCap","strokeDash","strokeDashOffset","startAngle","endAngle","innerRadius","outerRadius","interpolate","tension","orient","url","path","x2","y2","size","shape","text","angle","theta","radius","dx","dy","font","fontSize","fontWeight","fontStyle","fontVariant"];t.exports={toJSON:i,fromJSON:r}},{"../util/bound":82}],86:[function(e,t,n){(function(n){function i(e){return e.x||0}function r(e){return e.y||0}function o(e){return(e.x||0)+(e.width||0)}function a(e){return(e.y||0)+(e.height||0)}function s(e){return null==e.size?100:e.size}function l(e){return e.shape||"circle"}var u=e("datalib"),c=("undefined"!=typeof window?window.d3:"undefined"!=typeof n?n.d3:null).svg,f=e("../path/parse"),h=c.area().x(i).y1(r).y0(a),d=c.area().y(r).x1(i).x0(o),p=c.line().x(i).y(r);t.exports={metadata:{version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},path:{arc:c.arc(),symbol:c.symbol().type(l).size(s),area:function(e){var t=e[0];return("horizontal"===t.orient?d:h).interpolate(t.interpolate||"linear").tension(t.tension||.7)(e)},line:function(e){var t=e[0];return p.interpolate(t.interpolate||"linear").tension(t.tension||.7)(e)},resize:function(e,t){var n,i,r,o,a,s,l,u=f(e),c="";for(t=Math.sqrt(t),o=0,a=u.length;o<a;++o)for(n=u[o],s=0,l=n.length;s<l&&"Z"!==n[s];++s)(i=+n[s])===i&&(r=e.indexOf(i),c+=e.substring(0,r)+i*t,e=e.substring(r+(i+"").length));return c+"Z"}},symbolTypes:u.toMap(c.symbolTypes),textAlign:{left:"start",center:"middle",right:"end"},textBaseline:{top:"before-edge",bottom:"after-edge",middle:"central"},styles:{fill:"fill",fillOpacity:"fill-opacity",stroke:"stroke",strokeWidth:"stroke-width",strokeOpacity:"stroke-opacity",strokeCap:"stroke-linecap",strokeDash:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",opacity:"opacity"},styleProperties:["fill","fillOpacity","stroke","strokeWidth","strokeOpacity","strokeCap","strokeDash","strokeDashOffset","opacity"]}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../path/parse":52,datalib:26}],87:[function(e,t,n){function i(e){return null!=e.fontSize?e.fontSize:11}t.exports={size:i,value:function(e){return null!=e?String(e):""},font:function(e,t){var n=e.font;return t&&n&&(n=String(n).replace(/\"/g,"'")),""+(e.fontStyle?e.fontStyle+" ":"")+(e.fontVariant?e.fontVariant+" ":"")+(e.fontWeight?e.fontWeight+" ":"")+i(e)+"px "+(n||"sans-serif")},offset:function(e){var t=e.baseline,n=i(e);return Math.round("top"===t?.93*n:"middle"===t?.3*n:"bottom"===t?-.21*n:0)}}},{}],88:[function(e,t,n){function i(e,t,n){s.call(this,e,t,n),this._type="canvas",this._renderers={canvas:o,svg:a}}var r=e("vega-scenegraph").render,o=r.canvas,a=r.svg.string,s=e("./View"),l=i.prototype=new s;l.renderer=function(e){return e&&(this._type=e),s.prototype.renderer.apply(this,arguments)},l.canvas=function(){return"canvas"===this._type?this._renderer.canvas():null},l.canvasAsync=function(e){function t(){0===n.pendingImages()?(i.render(),e(i.canvas())):setTimeout(t,10)}var n=this._renderer,i=this;return"canvas"!==this._type?null:void(n.pendingImages()>0?t():e(this.canvas()))},l.svg=function(){return"svg"===this._type?this._renderer.svg():null},l.initialize=function(){var e=this._width,t=this._height,n=this._bgcolor,i=this._padding,r=this.model().config();return this._viewport&&(e=this._viewport[0]-(i?i.left+i.right:0),t=this._viewport[1]-(i?i.top+i.bottom:0)),this._renderer=(this._renderer||new this._io.Renderer(r.load)).initialize(null,e,t,i).background(n),this},t.exports=i},{"./View":90,"vega-scenegraph":49}],89:[function(e,t,n){function i(e){this._defs={},this._predicates={},this._scene=null,this._groups=null,this._node=null,this._builder=null,this._reset={axes:!1,legends:!1},this.config(e),this.expr=h(this),l.init.call(this)}function r(e){var t=this,n={};return o.isArray(e)?(e.forEach(function(e){n[e]=t._predicates[e]}),n):this._predicates[e]}var o=e("datalib"),a=e("vega-dataflow"),s=a.ChangeSet,l=a.Graph.prototype,u=a.Node,c=e("../scene/GroupBuilder"),f=e("../scene/visit"),h=e("../parse/expr"),d=e("./config"),p=i.prototype=Object.create(l);p.constructor=i,p.defs=function(e){return arguments.length?(this._defs=e,this):this._defs},p.config=function(e){if(!arguments.length)return this._config;this._config=Object.create(d);for(var t in e){var n=e[t],i=this._config[t];o.isObject(n)&&o.isObject(i)?this._config[t]=o.extend({},i,n):this._config[t]=n}return this},p.width=function(e){return this._defs&&(this._defs.width=e),this._defs&&this._defs.marks&&(this._defs.marks.width=e),this._scene&&(this._scene.items[0].width=e,this._scene.items[0]._dirty=!0),this._reset.axes=!0,this},p.height=function(e){return this._defs&&(this._defs.height=e),this._defs&&this._defs.marks&&(this._defs.marks.height=e),this._scene&&(this._scene.items[0].height=e,this._scene.items[0]._dirty=!0),this._reset.axes=!0,this},p.node=function(){return this._node||(this._node=new u(this))},p.data=function(){var e=l.data.apply(this,arguments);return arguments.length>1&&this.node().addListener(e.pipeline()[0]),e},p.predicate=function(e,t){return 1===arguments.length?r.call(this,e):this._predicates[e]=t},p.predicates=function(){return this._predicates},p.scene=function(e){if(!arguments.length)return this._scene;this._builder&&(this.node().removeListener(this._builder),this._builder._groupBuilder.disconnect());var t=this,n=this._builder=new u(this);return n.evaluate=function(i){if(n._groupBuilder)return i;var r=n._groupBuilder=new c(t,t._defs.marks,t._scene={}),o=r.pipeline();return t._groups={},this.addListener(r.connect()),o[o.length-1].addListener(e),i},this.addListener(n),this},p.group=function(e,t){var n=this._groups;return 1===arguments.length?n[e]:(n[e]=t,this)},p.reset=function(){return this._scene&&this._reset.axes&&(f(this._scene,function(e){e.axes&&e.axes.forEach(function(e){e.reset()})}),this._reset.axes=!1),this._scene&&this._reset.legends&&(f(this._scene,function(e){e.legends&&e.legends.forEach(function(e){e.reset()})}),this._reset.legends=!1),this},p.addListener=function(e){this.node().addListener(e)},p.removeListener=function(e){this.node().removeListener(e)},p.fire=function(e){e||(e=s.create()),this.propagate(e,this.node())},t.exports=i},{"../parse/expr":96,"../scene/GroupBuilder":112,"../scene/visit":117,"./config":91,datalib:26,"vega-dataflow":41}],90:[function(e,t,n){(function(n){function i(e,t,n){this._el=null,this._model=null,this._width=this.__width=t||500,this._height=this.__height=n||300,this._bgcolor=null,this._cursor=!0,this._autopad=1,this._padding={top:0,left:0,bottom:0,right:0},this._viewport=null,this._renderer=null,this._handler=null,this._streamer=null,this._skipSignals=!1,this._changeset=null,this._repaint=!0,this._renderers=c,this._io=null,this._api={}}function r(e){var t=this,n=this._model.data(e);if(!n)return f.error('Data source "'+e+'" is not defined.');var i=n.pipeline()[0],r=this._streamer,o={};return this._api[e]?this._api[e]:(o.insert=function(a){return n.insert(l.duplicate(a)),r.addListener(i),t._changeset.data[e]=1,o},o.update=function(){return r.addListener(i),t._changeset.data[e]=1,n.update.apply(n,arguments),o},o.remove=function(){return r.addListener(i),t._changeset.data[e]=1,n.remove.apply(n,arguments),o},o.values=function(){return n.values()},this._api[e]=o)}function o(e,t){var n=this._changeset,i=this._model.signal(e);return i?(this._streamer.addListener(i.value(t)),n.signals[e]=1,void(n.reflow=!0)):f.error('Signal "'+e+'" is not defined.')}function a(){var e=this;return e._renderNode=new u.Node(e._model).router(!0),e._renderNode.evaluate=function(t){f.debug(t,["rendering"]);var n=e._model.scene(),i=e._handler;return i&&i.scene&&i.scene(n),t.trans?t.trans.start(function(t){e._renderer.render(n,t)}):e._repaint?e._renderer.render(n):t.dirty.length&&e._renderer.render(n,t.dirty),t.dirty.length&&(t.dirty.forEach(function(e){e._dirty=!1}),n.items[0]._dirty=!1),e._repaint=e._skipSignals=!1,t},e._model.scene(e._renderNode),!0}var s="undefined"!=typeof window?window.d3:"undefined"!=typeof n?n.d3:null,l=e("datalib"),u=e("vega-dataflow"),c=e("vega-scenegraph").render,f=e("vega-logging"),h=u.Dependencies,d=e("../parse/streams"),p=e("../scene/Encoder"),g=e("../scene/Transition"),m=i.prototype;m.model=function(e){return arguments.length?(this._model!==e&&(this._model=e,this._streamer=new u.Node(e),this._streamer._rank=-1,this._changeset=u.ChangeSet.create(),this._handler&&this._handler.model(e)),this):this._model},m.data=function(e){var t=this;return arguments.length?l.isString(e)?r.call(t,e):(l.isObject(e)&&l.keys(e).forEach(function(n){var i=r.call(t,n);e[n](i)}),this):t._model.values()};var v=l.toMap(["width","height","padding"]);m.signal=function(e,t,n){var i,r,a=this._model;if(!arguments.length)return a.values(h.SIGNALS);if(1===arguments.length&&l.isString(e))return a.values(h.SIGNALS,e);l.isObject(e)?(r=e,n=t):(r={},r[e]=t);for(i in r)v[i]?this[i](r[i]):o.call(this,i,r[i]);return this._skipSignals=n,this},m.width=function(e){return arguments.length?(this.__width!==e&&(this._width=this.__width=e,this.model().width(e),this.initialize(),this._strict&&(this._autopad=1),o.call(this,"width",e)),this):this.__width},m.height=function(e){return arguments.length?(this.__height!==e&&(this._height=this.__height=e,this.model().height(e),this.initialize(),this._strict&&(this._autopad=1),o.call(this,"height",e)),this):this.__height},m.background=function(e){return arguments.length?(this._bgcolor!==e&&(this._bgcolor=e,this.initialize()),this):this._bgcolor},m.padding=function(e){return arguments.length?(this._padding!==e&&(l.isString(e)?(this._autopad=1,this._padding={top:0,left:0,bottom:0,right:0},this._strict="strict"===e):(this._autopad=0,this._padding=e,this._strict=!1),this._renderer&&this._renderer.resize(this._width,this._height,this._padding),this._handler&&this._handler.padding(this._padding),o.call(this,"padding",this._padding)),this._repaint=!0,this):this._padding},m.autopad=function(e){if(this._autopad<1)return this;this._autopad=0;var t=this.model().scene().bounds,n=this._padding,i=this.model().config(),r=i.autopadInset,a=t.x1<0?Math.ceil(-t.x1)+r:0,s=t.y1<0?Math.ceil(-t.y1)+r:0,l=t.x2>this._width?Math.ceil(+t.x2-this._width)+r:0;return t=t.y2>this._height?Math.ceil(+t.y2-this._height)+r:0,n={left:a,top:s,right:l,bottom:t},this._strict?(this._autopad=0,this._padding=n,this._width=Math.max(0,this.__width-(a+l)),this._height=Math.max(0,this.__height-(s+t)),this._model.width(this._width).height(this._height).reset(),o.call(this,"width",this._width),o.call(this,"height",this._height),o.call(this,"padding",n),this.initialize().update({props:"enter"}).update({props:"update"})):this.padding(n).update(e),this},m.viewport=function(e){return arguments.length?(this._viewport!==e&&(this._viewport=e,this.initialize()),this):this._viewport},m.renderer=function(e){if(!arguments.length)return this._renderer;if(this._renderers[e])e=this._renderers[e];else{if(l.isString(e))throw new Error("Unknown renderer: "+e);if(!e)throw new Error("No renderer specified")}return this._io!==e&&(this._io=e,this._renderer=null,this.initialize(),this._build&&this.render()),this},m.initialize=function(e){var t,n=this,i=n._width,r=n._height,o=n._padding,a=n._bgcolor,l=this.model().config();return arguments.length&&null!==e||(e=this._el?this._el.parentNode:null)?(s.select(e).select("div.vega").remove(),this._el=e=s.select(e).append("div").attr("class","vega").style("position","relative").node(),n._viewport&&s.select(e).style("width",(n._viewport[0]||i)+"px").style("height",(n._viewport[1]||r)+"px").style("overflow","auto"),c.canvas.Renderer.RETINA=l.render.retina,n._renderer=(n._renderer||new this._io.Renderer(l.load)).initialize(e,i,r,o).background(a),t=n._handler,n._handler=(new this._io.Handler).initialize(e,o,n),t?t.handlers().forEach(function(e){n._handler.on(e.type,e.handler)}):n._detach=d(this),this._repaint=!0,this):this},m.destroy=function(){this._detach&&this._detach()},m.update=function(e){e=e||{};var t=this,n=this._model,i=this._streamer,r=this._changeset,o=e.duration?new g(e.duration,e.ease):null;if(o&&(r.trans=o),void 0!==e.props){if(l.keys(r.data).length>0)throw Error("New data values are not reflected in the visualization. Please call view.update() before updating a specified property set.");r.reflow=!0,r.request=e.props}var s=t._build;return t._build=t._build||a.call(this),e.items&&s?(p.update(n,e.trans,e.props,e.items,r.dirty),t._renderNode.evaluate(r)):i.listeners().length&&s?(this._repaint&&i.addListener(n.node()),n.propagate(r,i,null,this._skipSignals),i.disconnect()):n.fire(r),t._changeset=u.ChangeSet.create(),t.autopad(e)},m.toImageURL=function(e){var t,n=this;switch(e||"png"){case"canvas":case"png":t=c.canvas.Renderer;break;case"svg":t=c.svg.string.Renderer;break;default:throw Error("Unrecognized renderer type: "+e)}var i=c.canvas.Renderer.RETINA;c.canvas.Renderer.RETINA=!1;var r=new t(n._model.config.load).initialize(null,n._width,n._height,n._padding).background(n._bgcolor).render(n._model.scene());if(c.canvas.Renderer.RETINA=i,"svg"===e){var o=new Blob([r.svg()],{type:"image/svg+xml"});return window.URL.createObjectURL(o)}return r.canvas().toDataURL("image/png")},m.render=function(e){return this._renderer.render(this._model.scene(),e),this},m.on=function(){return this._handler.on.apply(this._handler,arguments),this},m.onSignal=function(e,t){var n=this._model.signal(e);return n?n.on(t):f.error('Signal "'+e+'" is not defined.'),this},m.off=function(){return this._handler.off.apply(this._handler,arguments),this},m.offSignal=function(e,t){var n=this._model.signal(e);return n?n.off(t):f.error('Signal "'+e+'" is not defined.'),this},i.factory=function(t){var n=e("./HeadlessView");return function(e){e=e||{};var r=t.defs(),o=(e.el?new i:new n).model(t).renderer(e.renderer||"canvas").width(r.width).height(r.height).background(r.background).padding(r.padding).viewport(r.viewport).initialize(e.el);return e.data&&o.data(e.data),e.el&&(e.hover!==!1&&o.on("mouseover",function(e,t){t&&t.hasPropertySet("hover")&&this.update({props:"hover",items:t})}).on("mouseout",function(e,t){t&&t.hasPropertySet("hover")&&this.update({props:"update",items:t})}),e.cursor!==!1&&o.onSignal("cursor",function(e,t){var n=s.select("body");l.isString(t)?(o._cursor="default"===t,n.style("cursor",t)):l.isObject(t)&&o._cursor&&n.style("cursor",t["default"])})),o}},t.exports=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../parse/streams":107,"../scene/Encoder":111,"../scene/Transition":114,"./HeadlessView":88,datalib:26,"vega-dataflow":41,"vega-logging":48,"vega-scenegraph":49}],91:[function(e,t,n){(function(e){var n="undefined"!=typeof window?window.d3:"undefined"!=typeof e?e.d3:null,i={};i.load={baseURL:"",domainWhiteList:!1},i.autopadInset=5,i.scale={time:n.time.scale,utc:n.time.scale.utc},i.render={retina:!0},i.scene={fill:void 0,fillOpacity:void 0,stroke:void 0,strokeOpacity:void 0,strokeWidth:void 0,strokeDash:void 0,strokeDashOffset:void 0},i.axis={layer:"back",ticks:10,padding:3,axisColor:"#000",axisWidth:1,gridColor:"#000",gridOpacity:.15,tickColor:"#000",tickLabelColor:"#000",tickWidth:1,tickSize:6,tickLabelFontSize:11,tickLabelFont:"sans-serif",titleColor:"#000",titleFont:"sans-serif",titleFontSize:11,titleFontWeight:"bold",titleOffset:"auto",titleOffsetAutoMin:30,titleOffsetAutoMax:1e4,titleOffsetAutoMargin:4},i.legend={orient:"right",offset:20,padding:3,margin:2,gradientStrokeColor:"#888",gradientStrokeWidth:1,gradientHeight:16,gradientWidth:100,labelColor:"#000",labelFontSize:10,labelFont:"sans-serif",labelAlign:"left",labelBaseline:"middle",labelOffset:8,symbolShape:"circle",symbolSize:50,symbolColor:"#888",symbolStrokeWidth:1,titleColor:"#000",titleFont:"sans-serif",titleFontSize:11,titleFontWeight:"bold"},i.color={rgb:[128,128,128],lab:[50,0,0],hcl:[0,0,50],hsl:[0,0,.5]},i.range={category10:n.scale.category10().range(),category20:n.scale.category20().range(),category20b:n.scale.category20b().range(),category20c:n.scale.category20c().range(),shapes:["circle","cross","diamond","square","triangle-down","triangle-up"]},t.exports=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],92:[function(e,t,n){function i(e,t,n){var i=e.schema;i&&(i.refs&&r.extend(n.refs,i.refs),i.defs&&r.extend(n.defs,i.defs))}var r=e("datalib"),o=e("../parse"),a=e("../scene/Scale"),s=e("./config");t.exports=function(e){var t=null;return e=e||{},e.url?t=r.json(r.extend({url:e.url},s.load)):(t={$schema:"http://json-schema.org/draft-04/schema#",title:"Vega Visualization Specification Language",defs:{},refs:{},$ref:"#/defs/spec"},r.keys(o).forEach(function(n){i(o[n],e,t)}),i(a,e,t)),e.properties&&r.keys(e.properties).forEach(function(n){t.defs.propset.properties[n]={$ref:"#/refs/"+e.properties[n]+"Value"}}),e.propertySets&&r.keys(e.propertySets).forEach(function(e){t.defs.mark.properties.properties.properties[e]={$ref:"#/defs/propset"}}),t}},{"../parse":97,"../scene/Scale":113,"./config":91,datalib:26}],93:[function(e,t,n){function i(e,t,n,i){var a=o(e);(t||[]).forEach(function(t,o){n[o]=n[o]||s(e,a[t.type]),r(a[t.type],t,o,n[o],i)})}function r(e,t,n,i,r){var o;void 0!==t.scale&&i.scale(o=r.scale(t.scale));var s=e.grid;a.isObject(s)&&(e.grid=void 0!==s[o.type]?s[o.type]:s["default"]),i.orient(l(t,e,"orient",u[t.type])),i.offset(l(t,e,"offset",0)),i.layer(l(t,e,"layer","front")),i.grid(l(t,e,"grid",!1)),i.title(t.title||null),i.titleOffset(l(t,e,"titleOffset")),i.tickValues(t.values||null),i.tickFormat(t.format||null),i.tickFormatType(t.formatType||null),i.tickSubdivide(t.subdivide||0),i.tickPadding(l(t,e,"tickPadding",e.padding));var c=l(t,e,"tickSize"),f=[c,c,c];f[0]=l(t,e,"tickSizeMajor",f[0]),f[1]=l(t,e,"tickSizeMinor",f[1]),f[2]=l(t,e,"tickSizeEnd",f[2]),f.length&&i.tickSize.apply(i,f),i.tickCount(l(t,e,"ticks"));var h=t.properties;h&&h.ticks?(i.majorTickProperties(h.majorTicks?a.extend({},h.ticks,h.majorTicks):h.ticks),i.minorTickProperties(h.minorTicks?a.extend({},h.ticks,h.minorTicks):h.ticks)):(i.majorTickProperties(h&&h.majorTicks||{}),i.minorTickProperties(h&&h.minorTicks||{})),i.tickLabelProperties(h&&h.labels||{}),i.titleProperties(h&&h.title||{}),i.gridLineProperties(h&&h.grid||{}),i.domainProperties(h&&h.axis||{})}function o(e){var t=e.config(),n=t.axis;return{x:a.extend(a.duplicate(n),t.axis_x),y:a.extend(a.duplicate(n),t.axis_y)}}var a=e("datalib"),s=e("../scene/axis"),l=e("../util/theme-val"),u={x:"bottom",y:"left",top:"top",bottom:"bottom",left:"left",right:"right"};t.exports=i},{"../scene/axis":115,"../util/theme-val":149,datalib:26}],94:[function(e,t,n){(function(e){function n(e){return null==e?null:i.rgb(e)+""}var i="undefined"!=typeof window?window.d3:"undefined"!=typeof e?e.d3:null;t.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],95:[function(e,t,n){function i(e,t,n){function a(e,t){o.error("PARSE DATA FAILED: "+t.name+" "+e),u=-1,n(e)}function s(t){return function(i,o){if(i)a(i,t);else if(u>0)try{e.data(t.name).values(r.read(o,t.format)),0===--u&&n()}catch(s){a(s,t)}}}var l=e.config(),u=0;return(t||[]).forEach(function(t){t.url&&(u+=1,r.load(r.extend({url:t.url},l.load),s(t)));try{i.datasource(e,t)}catch(n){a(n,t)}}),0===u&&setTimeout(n,1),t}var r=e("datalib"),o=e("vega-logging"),a=e("./transforms"),s=e("./modify");i.datasource=function(e,t){var n=(t.transform||[]).map(function(t){return a(e,t)}),i=(t.modify||[]).map(function(n){return s(e,n,t)}),o=e.data(t.name,i.concat(n));return t.values?o.values(r.read(t.values,t.format)):t.source&&(o.source(t.source).addListener(o),e.removeListener(o.pipeline()[0])),o},t.exports=i},{"./modify":101,"./transforms":108,datalib:26,"vega-logging":48}],96:[function(e,t,n){function i(e){return function(t){t=t.map(e);var n=t.length;if(n<1||n>2)throw Error("open takes exactly 1 or 2 arguments.");return"this.defs.open(this.model, "+t[0]+(n>1?","+t[1]:"")+")"}}function r(e,t,n){if("undefined"==typeof window||!window||!window.open)throw Error("Open function can only be invoked in a browser.");var i=p.extend({type:"open",url:t,name:n},e.config().load),r=p.load.sanitizeUrl(i);if(!r)throw Error("Invalid URL: "+i.url);window.open(r,n)}function o(e,t){return function(n){n=n.map(e);var i=n.length;if(i<2||i>3)throw Error("scale takes exactly 2 or 3 arguments.");return"this.defs.scale(this.model, "+t+", "+n[0]+","+n[1]+(i>2?","+n[2]:"")+")"}}function a(e,t,n,i,r){if(r&&r.scale||(r=r&&r.mark?r.mark.group:e.scene().items[0]),e.group(r._id)!==r)throw Error('Scope for scale "'+n+'" is not a valid group item.');var o=r.scale(n);return o?t?o.invert(i):o(i):i}function s(e,t,n,i){var r=t,o=n;return t>n&&(r=n,o=t),i?r<e&&o>e:r<=e&&o>=e}function l(e){return function(t,n,i,r){var o;if(3!==t.length)throw Error("indata takes 3 arguments.");if("Literal"!==t[0].type)throw Error("Data source name must be a literal for indata.");return o=t[0].value,r[o]=1,"Literal"===t[2].type&&l.model.requestIndex(o,t[2].value),t=t.map(e),"this.defs.indata(this.model,"+t[0]+","+t[1]+","+t[2]+")"}}function u(e,t,n,i){var r=e.data(t),o=r.getIndex(i);return o[n]>0}function c(e,t){return g.format(e,"number")(t)}function f(e,t){return g.format(e,"time")(t)}function h(e,t){return g.format(e,"utc")(t)}function d(e){return function(t){l.model=e;var n=y(t);return n.model=e,n.sig=e?e._signals:{},n}}var p=e("datalib"),g=p.template,m=e("vega-expression"),v=["datum","parent","event","signals"],y=m.compiler(v,{idWhiteList:v,fieldVar:v[0],globalVar:function(e){return"this.sig["+p.str(e)+"]._value"},functions:function(e){var t=m.functions(e);return t.eventItem="event.vg.getItem",t.eventGroup="event.vg.getGroup",t.eventX="event.vg.getX",t.eventY="event.vg.getY",t.open=i(e),t.scale=o(e,!1),t.iscale=o(e,!0),t.inrange="this.defs.inrange",t.indata=l(e),t.format="this.defs.format",t.timeFormat="this.defs.timeFormat",t.utcFormat="this.defs.utcFormat",t},functionDefs:function(){return{scale:a,inrange:s,indata:u,format:c,timeFormat:f,utcFormat:h,open:r}}});d.scale=a,d.codegen=y.codegen,t.exports=d},{datalib:26,"vega-expression":46}],97:[function(e,t,n){t.exports={axes:e("./axes"),background:e("./background"),data:e("./data"),events:e("vega-event-selector"),expr:e("./expr"),legends:e("./legends"),mark:e("./mark"),marks:e("./marks"),modify:e("./modify"),padding:e("./padding"),predicates:e("./predicates"),properties:e("./properties"),signals:e("./signals"),spec:e("./spec"),streams:e("./streams"),transforms:e("./transforms")}},{"./axes":93,"./background":94,"./data":95,"./expr":96,"./legends":98,"./mark":99,"./marks":100,"./modify":101,"./padding":102,"./predicates":103,"./properties":104,"./signals":105,"./spec":106,"./streams":107,"./transforms":108,"vega-event-selector":42}],98:[function(e,t,n){function i(e,t,n,i){(t||[]).forEach(function(t,a){n[a]=n[a]||o(e),r(t,a,n[a],i)})}function r(e,t,n,i){n.size(e.size?i.scale(e.size):null),n.shape(e.shape?i.scale(e.shape):null),n.fill(e.fill?i.scale(e.fill):null),n.stroke(e.stroke?i.scale(e.stroke):null),n.opacity(e.opacity?i.scale(e.opacity):null),e.orient&&n.orient(e.orient),null!=e.offset&&n.offset(e.offset),n.title(e.title||null),n.values(e.values||null),n.format(void 0!==e.format?e.format:null),n.formatType(e.formatType||null);var r=e.properties;n.titleProperties(r&&r.title||{}),n.labelProperties(r&&r.labels||{}),n.legendProperties(r&&r.legend||{}),n.symbolProperties(r&&r.symbols||{}),n.gradientProperties(r&&r.gradient||{})}var o=e("../scene/legend");t.exports=i},{"../scene/legend":116}],99:[function(e,t,n){function i(e,t,n){var a=t.properties||n&&(t.properties={}),s=a.enter||n&&(a.enter={}),l=t.marks,u=e.config().marks||{};if(n){"symbol"===t.type&&!s.size&&u.symbolSize&&(s.size={value:u.symbolSize});var c={arc:"fill",area:"fill",rect:"fill",symbol:"fill",text:"fill",line:"stroke",path:"stroke",rule:"stroke"},f=c[t.type];!s[f]&&u.color&&(s[f]={value:u.color})}return r.keys(a).forEach(function(n){a[n]=o(e,t.type,a[n])}),t.delay&&(t.delay=o(e,t.type,{delay:t.delay})),l&&(t.marks=l.map(function(t){return i(e,t,!0)})),t}var r=e("datalib"),o=e("./properties");t.exports=i},{"./properties":104,datalib:26}],100:[function(e,t,n){function i(e,t,n,i){return{type:"group",width:n,height:i,properties:r(t.scene||{},e),scales:t.scales||[],axes:t.axes||[],legends:t.legends||[],marks:(t.marks||[]).map(function(t){return o(e,t,!0)})}}function r(e,t){var n,i,r,o,l,u=t.config().scene,c={};for(n=0,i=r=s.length;n<i;++n)o=s[n],void 0!==(l=e[o])?c[o]=l.signal?l:{value:l}:u[o]?c[o]={value:u[o]}:--r;return r?{update:a(t,"group",c)}:{}}var o=e("./mark"),a=e("./properties"),s=["fill","fillOpacity","stroke","strokeOpacity","strokeWidth","strokeDash","strokeDashOffset"];t.exports=i},{"./mark":99,"./properties":104}],101:[function(e,t,n){function i(e,t,n,i){var r,o,a,s,l=!0,u=e.length;for(r=n.length-1;r>=0;--r){for(o=0;o<u;++o)if(a=e[o],s=t&&a(t)||t,a(n[r])!==s){l=!1;break}l&&i.push.apply(i,n.splice(r,1)),l=!0}}function r(e,t,n){var i=c.ingest(t);e.add.push(i),n._data.push(i)}function o(e,t,n){var o=t.signal?a.field(t.signal):null,l=o?o[0]:null,p=t.predicate?e.predicate(t.predicate.name||t.predicate):null,g=t.test?e.expr(t.test):null,m=null===p&&null===g,v=t.type===h.CLEAR,y=a.array(t.field||"data"),b=y.map(a.accessor),_=y.map(a.mutator),E=new u(e).router(v);return E.evaluate=function(u){var E,x;if(null!==p&&(E=e.values(f.DATA,p.data||d),x=e.values(f.SIGNALS,p.signals||d),m=p.call(p,{},E,x,e._predicates)),null!==g&&(x=e.values(f.SIGNALS,g.globals||d),m=g.fn()),s.debug(u,[t.type+"ing",m]),!m||!v&&!u.signals[l])return u;var w,T=o?e.signalRef(t.signal):null,S=e.data(n.name),A=null,C=[],k=[],O=0;return a.isObject(T)?(w=T,t.field||(y=a.keys(w),b=y.map(a.accessor),_=y.map(a.mutator))):(w={},_.forEach(function(e){e(w,T)})),t.type===h.INSERT?r(u,w,S):t.type===h.REMOVE?(i(b,T,u.mod,u.rem),i(b,T,u.add,k),i(b,T,S._data,k)):t.type===h.UPSERT?(u.mod.forEach(function(e){var t=b.every(function(t){return t(e)===t(w)});t&&(a.extend(e,w),O+=1)}),0===O&&r(u,w,S)):t.type===h.TOGGLE?(i(b,T,u.mod,k),u.rem.push.apply(u.rem,k),i(b,T,u.add,C),C.length||k.length?S._data=S._data.filter(function(e){return k.indexOf(e)<0&&C.indexOf(e)<0}):(u.add.push(A=c.ingest(w)),S._data.push(A))):t.type===h.CLEAR&&(u.rem.push.apply(u.rem,u.mod.splice(0)),u.add.splice(0),S._data.splice(0)),y.forEach(function(e){u.fields[e]=1}),u},l&&E.dependency(f.SIGNALS,l),p&&(E.dependency(f.DATA,p.data),E.dependency(f.SIGNALS,p.signals)),g&&(E.dependency(f.SIGNALS,g.globals),E.dependency(f.DATA,g.dataSources)),E}var a=e("datalib"),s=e("vega-logging"),l=e("vega-dataflow"),u=l.Node,c=l.Tuple,f=l.Dependencies,h={INSERT:"insert",REMOVE:"remove",UPSERT:"upsert",TOGGLE:"toggle",CLEAR:"clear"},d=[];t.exports=o},{datalib:26,"vega-dataflow":41,"vega-logging":48}],102:[function(e,t,n){function i(e){return null==e?"auto":r.isObject(e)?e:r.isNumber(e)?{top:e,left:e,right:e,bottom:e}:"strict"===e?e:"auto"}var r=e("datalib");t.exports=i},{datalib:26}],103:[function(e,t,n){function i(e,t){return(t||[]).forEach(function(t){var n=f[t.type](e,t),i=Function("args","db","signals","predicates",n.code);i.root=function(){return e.scene().items[0]},i.nullScale=h,i.isFunction=c.isFunction,i.signals=n.signals,i.data=n.data,e.predicate(t.name,i)}),t}function r(e,t){var n=c.field(e),i="signals["+n.map(c.str).join("][")+"]";return t[n[0]]=1,i}function o(e,t){function n(e){s[e]=1}function i(e){l[e]=1}var o=[],a=[],s={},l={};return c.array(t).forEach(function(t,l){var u="o"+l,f="";if(void 0!==t.value)f=c.str(t.value);else if(t.arg)f="args["+c.str(t.arg)+"]";else if(t.signal)f=r(t.signal,s);else if(t.predicate){var h=t.predicate,d=h&&(h.name||h),p=e.predicate(d),g="predicates["+c.str(d)+"]";p.signals.forEach(n),p.data.forEach(i),c.isObject(h)&&c.keys(h).forEach(function(e){if("name"!==e){var t=h[e];f+="args["+c.str(e)+"] = ",t.signal?f+=r(t.signal,s):t.arg&&(f+="args["+c.str(t.arg)+"]"),f+=", "}}),f+=g+".call("+g+", args, db, signals, predicates)"}o.push(u),a.push(u+"=("+f+")")}),{code:"var "+o.join(", ")+";\n"+a.join(";\n")+";\n",signals:c.keys(s),data:c.keys(l)}}function a(e,t){var n=o(e,t.operands);return"="===t.type&&(t.type="=="),n.code+="o0 = o0 instanceof Date ? o0.getTime() : o0;\no1 = o1 instanceof Date ? o1.getTime() : o1;\n",{code:n.code+"return "+["o0","o1"].join(t.type)+";",signals:n.signals,data:n.data}}function s(e,t){for(var n=o(e,t.operands),i=[],r=0,a=t.operands.length;i.push("o"+r++)<a;);return"and"===t.type?t.type="&&":"or"===t.type&&(t.type="||"),{code:n.code+"return "+i.join(t.type)+";",signals:n.signals,data:n.data}}function l(e,t){var n=[t.item],i="";t.range&&n.push.apply(n,t.range),t.scale&&(i=u(t.scale,n));var r=o(e,n);if(i=r.code+i+"\n  var ordSet = null;\n",t.data){var a=c.field(t.field).map(c.str);
i+="var where = function(d) { return d["+a.join("][")+"] == o0 };\n",i+="return db["+c.str(t.data)+"].filter(where).length > 0;"}else t.range&&(t.scale&&(i+="if (scale.length == 2) {\n  ordSet = scale(o1, o2);\n} else {\n  o1 = scale(o1);\no2 = scale(o2);\n}"),i+="return ordSet !== null ? ordSet.indexOf(o0) !== -1 :\n  o1 < o2 ? o1 <= o0 && o0 <= o2 : o2 <= o0 && o0 <= o1;");return{code:i,signals:r.signals,data:r.data.concat(t.data?[t.data]:[])}}function u(e,t){var n="var scale = ",i=t.length;return c.isString(e)?(t.push({value:e}),n+="this.root().scale(o"+i+")"):e.arg?(t.push(e),n+="o"+i):e.name&&(t.push(c.isString(e.name)?{value:e.name}:e.name),n+="(this.isFunction(o"+i+") ? o"+i+" : ",e.scope?(t.push(e.scope),n+="((o"+(i+1)+".scale || this.root().scale)(o"+i+") || this.nullScale)"):n+="this.root().scale(o"+i+")",n+=")"),e.invert===!0&&(n+=".invert"),n+";\n"}var c=e("datalib"),f={"=":a,"==":a,"!=":a,">":a,">=":a,"<":a,"<=":a,and:s,"&&":s,or:s,"||":s,"in":l},h=function(){return 0};h.invert=h,t.exports=i},{datalib:26}],104:[function(e,t,n){(function(n){function i(e,t,n){function i(e){if(null!=v[e]){var t,n,i=d.array(v[e]);for(t=0,n=i.length;t<n;++t)w[e][i[t]]=1}}function r(e){var t=(e.parent?"parent_":"group_")+e.level;w._nRefs[t]=e}var u,c,f,v,y=e.config(),b="",_=d.keys(n),E=[],x={},w={signals:{},scales:{},data:{},fields:{},nested:[],_nRefs:{},reflow:!1};for(b+="var o = trans ? {} : item, d=0, exprs=this.exprs, set=this.tpl.set, tmpl=signals||{}, t;\ntmpl.datum  = item.datum;\ntmpl.group  = group;\ntmpl.parent = group.datum;\n",a(e,y,n),u=0,c=_.length;u<c;++u)v=n[f=_[u]],b+=u>0?"\n  ":"  ",v.rule?(v=s(e,f,v.rule,E),b+="\n  "+v.code):d.isArray(v)?(v=s(e,f,v,E),b+="\n  "+v.code):(v=l(y,f,v),b+="d += set(o, "+d.str(f)+", "+v.val+");"),x[f]=!0,m.forEach(i),w.reflow=w.reflow||v.reflow,v.nested.length&&v.nested.forEach(r);d.keys(w._nRefs).forEach(function(e){w.nested.push(w._nRefs[e])}),w.nested.sort(function(e,t){return e=e.level,t=t.level,e<t?-1:e>t?1:e>=t?0:NaN}),x.x2&&(x.x?(b+="\n  if (o.x > o.x2) { \n    t = o.x;\n    d += set(o, 'x', o.x2);\n    d += set(o, 'x2', t); \n  };",b+="\n  d += set(o, 'width', (o.x2 - o.x));"):b+=x.width?"\n  d += set(o, 'x', (o.x2 - o.width));":"\n  d += set(o, 'x', o.x2);"),x.xc&&(b+=x.width?"\n  d += set(o, 'x', (o.xc - o.width/2));":"\n  d += set(o, 'x', o.xc);"),x.y2&&(x.y?(b+="\n  if (o.y > o.y2) { \n    t = o.y;\n    d += set(o, 'y', o.y2);\n    d += set(o, 'y2', t);\n  };",b+="\n  d += set(o, 'height', (o.y2 - o.y));"):b+=x.height?"\n  d += set(o, 'y', (o.y2 - o.height));":"\n  d += set(o, 'y', o.y2);"),x.yc&&(b+=x.height?"\n  d += set(o, 'y', (o.yc - o.height/2));":"\n  d += set(o, 'y', o.yc);"),o(t,x)&&(b+="\n  d += (item.touch(), 1);"),b+="\n  if (trans) trans.interpolate(item, o);",b+="\n  return d > 0;";try{var T=Function("item","group","trans","db","signals","predicates",b);return T.tpl=g,T.exprs=E,T.util=d,T.d3=h,d.extend(T,d.template.context),{encode:T,signals:d.keys(w.signals),scales:d.keys(w.scales),data:d.keys(w.data),fields:d.keys(w.fields),nested:w.nested,reflow:w.reflow}}catch(S){p.error(S),p.log(b)}}function r(e,t){return d.isObject(e)||(e={reflow:!1,nested:[]},m.forEach(function(t){e[t]=[]})),d.isObject(t)&&(e.reflow=e.reflow||t.reflow,e.nested.push.apply(e.nested,t.nested),m.forEach(function(n){e[n].push.apply(e[n],t[n])})),e}function o(e,t){return t.path||("area"===e||"line"===e)&&(t.x||t.x2||t.width||t.y||t.y2||t.height||t.tension||t.interpolate)}function a(e,t,n){var i,r,o=n.shape,a=0;if(o&&(i=o.value)){for(t.shape&&t.shape[i]&&(i=t.shape[i]),o="";null!==(r=v.exec(i));)o+=i.substring(a,r.index),o+=e.expr(r[1]).fn(),a=v.lastIndex;n.shape.value=o+i.substring(a)}}function s(e,t,n,i){var o=e.config(),a=r(),s=[],u="";return(n||[]).forEach(function(c,f){var h=l(o,t,c);if(r(a,h),c.test){var p=e.expr(c.test);a.signals.push.apply(a.signals,p.globals),a.data.push.apply(a.data,p.dataSources),u+="if (exprs["+i.length+"](item.datum, item.mark.group.datum, null)) {\n    d += set(o, "+d.str(t)+", "+h.val+");",u+=n[f+1]?"\n  } else ":"  }",i.push(p.fn)}else{var g=c.predicate,m=g&&(g.name||g),v=e.predicate(m),y="predicates["+d.str(m)+"]",b=[],_=t+"_arg"+f;d.isObject(g)&&d.keys(g).forEach(function(e){if("name"!==e){var t=l(o,f,g[e],!0);b.push(d.str(e)+": "+t.val),r(a,t)}}),m?(a.signals.push.apply(a.signals,v.signals),a.data.push.apply(a.data,v.data),s.push(_+" = {\n    "+b.join(",\n    ")+"\n  }"),u+="if ("+y+".call("+y+","+_+", db, signals, predicates)) {\n    d += set(o, "+d.str(t)+", "+h.val+");",u+=n[f+1]?"\n  } else ":"  }"):u+="{\n    d += set(o, "+d.str(t)+", "+h.val+");\n  }\n"}}),s.length&&(u="var "+s.join(",\n      ")+";\n  "+u),a.code=u,a}function l(e,t,n,i){if(null==n)return null;if("fill"===t||"stroke"===t){if(n.c)return u(e,"hcl",n.h,n.c,n.l);if(n.h||n.s)return u(e,"hsl",n.h,n.s,n.l);if(n.l||n.a)return u(e,"lab",n.l,n.a,n.b);if(n.r||n.g||n.b)return u(e,"rgb",n.r,n.g,n.b)}var o=null,a=null,s=r(),l=null,h=null,p=null,g={};return void 0!==n.template&&(o=d.template.source(n.template,"tmpl",g),d.keys(g).forEach(function(e){var t=d.field(e),n=t.shift();"parent"===n||"group"===n?s.nested.push({parent:"parent"===n,group:"group"===n,level:1}):"datum"===n?s.fields.push(t[0]):s.signals.push(n)})),void 0!==n.value&&(o=d.str(n.value)),void 0!==n.signal&&(l=d.field(n.signal),o="signals["+l.map(d.str).join("][")+"]",s.signals.push(l.shift())),void 0!==n.field&&(n.field=d.isString(n.field)?{datum:n.field}:n.field,h=c(n.field),o=h.val,r(s,h)),void 0!==n.scale&&(p=f(n.scale),a=p.val,r(s,p),s.scales.push(n.scale.name||n.scale),null!==o||n.band||n.mult||n.offset||!i?o=a+(n.band?".rangeBand()":"("+(null!==o?o:"item.datum.data")+")"):i&&(o=a)),o="("+(n.mult?d.number(n.mult)+" * ":"")+o+")"+(n.offset?" + "+d.number(n.offset):""),s.val=o,s}function u(e,t,n,i,o){var a=n?l(e,"",n):e.color[t][0],s=i?l(e,"",i):e.color[t][1],u=o?l(e,"",o):e.color[t][2],c=r();[a,s,u].forEach(function(e){d.isArray||r(c,e)});var f="(this.d3."+t+"("+[a.val,s.val,u.val].join(",")+') + "")';return c.val=f,c}function c(e){if(d.isString(e))return{val:d.field(e).map(d.str).join("][")};var t=e.level||1,n=(e.group||e.parent)&&t,i=n?Array(t).join("group.mark."):"",o=c(e.datum||e.group||e.parent||e.signal),a=o.val,s=r(null,o);return e.datum?(a="item.datum["+a+"]",s.fields.push(e.datum)):e.group?(a=i+"group["+a+"]",s.nested.push({level:t,group:!0})):e.parent?(a=i+"group.datum["+a+"]",s.nested.push({level:t,parent:!0})):e.signal&&(a="signals["+a+"]",s.signals.push(d.field(e.signal)[0]),s.reflow=!0),s.val=a,s}function f(e){var t=null,n=null,i=r();return t=d.isString(e)?d.str(e):e.name?d.isString(e.name)?d.str(e.name):(n=c(e.name)).val:(n=c(e)).val,t="(item.mark._scaleRefs["+t+"] = 1, group.scale("+t+"))",e.invert&&(t+=".invert"),n&&n.nested.forEach(function(e){e.scale=!0}),n?(n.val=t,n):(i.val=t,i)}var h="undefined"!=typeof window?window.d3:"undefined"!=typeof n?n.d3:null,d=e("datalib"),p=e("vega-logging"),g=e("vega-dataflow").Tuple,m=["signals","scales","data","fields"],v=/{{(.*?)}}/g;t.exports=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{datalib:26,"vega-dataflow":41,"vega-logging":48}],105:[function(e,t,n){function i(e,t){return(t||[]).forEach(function(t){if(l.indexOf(t.name)!==-1)throw Error('Signal name "'+t.name+'" is a reserved keyword ('+l.join(", ")+").");var n=e.signal(t.name,t.init).verbose(t.verbose);t.init&&t.init.expr&&(t.init.expr=e.expr(t.init.expr),n.value(r(e,t.init))),t.expr&&(t.expr=e.expr(t.expr),n.evaluate=function(i){var o=r(e,t),a=i.signals;return(o!==n.value()||n.verbose())&&(n.value(o),a[t.name]=1),a[t.name]?i:e.doNotPropagate},n.dependency(s,t.expr.globals),t.expr.globals.forEach(function(t){e.signal(t).addListener(n)}))}),t}function r(e,t){var n=t.expr,r=n.fn();return t.scale?i.scale(e,t,r):r}var o=e("datalib"),a=e("./expr"),s=e("vega-dataflow").Dependencies.SIGNALS,l=["datum","event","signals","width","height","padding"].concat(o.keys(a.codegen.functions));i.scale=function(e,t,n,i,r){var s,l=t.scale,u=l.name||l.signal||l,c=l.scope;return c&&(c.signal?c=e.signalRef(c.signal):o.isString(c)&&(s=l._expr=l._expr||e.expr(c),c=s.fn(i,r))),a.scale(e,l.invert,u,n,c)},t.exports=i},{"./expr":96,datalib:26,"vega-dataflow":41}],106:[function(e,t,n){function i(t){function n(t){try{t=r.duplicate(t);var n=e("./"),o=a(t,c,"width",500),s=a(t,c,"height",500),l=n.padding(a(t,c,"padding")),f=a(t,c,"background");p.signal("width",o),p.signal("height",s),p.signal("padding",l),i(t),p.defs({width:o,height:s,padding:l,viewport:t.viewport||null,background:n.background(f),signals:n.signals(p,t.signals),predicates:n.predicates(p,t.predicates),marks:n.marks(p,t,o,s),data:n.data(p,t.data,u)})}catch(h){u(h)}}function i(e){var t,n=e.signals||(e.signals=[]);n.some(function(e){return"cursor"===e.name&&(t=e,!0)}),t||n.push(t={name:"cursor",streams:[]}),t.init=t.init||{},t.streams.unshift({type:"mousemove",expr:"eventItem().cursor === cursor.default ? cursor : {default: eventItem().cursor}"})}function u(e){var t;e?o.error(e):t=g(p.buildIndexes()),d&&(d.length>1?d(e,t):e||d(t),d=null)}var c,f=arguments.length,h=2,d=arguments[f-1],p=new s,g=l.factory;if(f>h&&r.isFunction(arguments[f-h])&&(g=arguments[f-h],++h),f>h&&r.isObject(arguments[f-h])&&p.config(arguments[f-h]),c=p.config(),r.isObject(t))n(t);else if(r.isString(t)){var m=r.extend({url:t},c.load);r.json(m,function(e,t){e?u("SPECIFICATION LOAD FAILED: "+e):n(t)})}else u("INVALID SPECIFICATION: Must be a valid JSON object or URL.")}var r=e("datalib"),o=e("vega-logging"),a=e("../util/theme-val"),s=e("../core/Model"),l=e("../core/View");t.exports=i},{"../core/Model":89,"../core/View":90,"../util/theme-val":149,"./":97,datalib:26,"vega-logging":48}],107:[function(e,t,n){(function(n){function i(e){function t(t,n){var i,o,a,s=r.mouse((r.event=t,e.renderer().scene())),l=e.padding(),u={};if(n)for(i=n.mark,o="group"===i.marktype?n:i.group,a=n;null!=a;a=a.mark.group)a.mark.def.name&&(u[a.mark.def.name]=a);u.root=e.model().scene().items[0],t.vg=Object.create(f),t.vg.group=o,t.vg.item=n||{},t.vg.name=u,t.vg.x=s[0]-l.left,t.vg.y=s[1]-l.top}function n(e,t,n,i,r){function o(e){return!e.fn(n,i,r)}var s,u,c,f,h=e.handlers[t],d=e.nodes[t],p=a.ChangeSet.create(null,!0),m=!1;for(u=0,c=h.length;u<c;++u)f=h[u],m=f.filters.some(o),m||(s=f.exp.fn(n,i,r),f.spec.scale&&(s=l.scale(g,f.spec,s,n,r)),(s!==f.signal.value()||f.signal.verbose())&&(f.signal.value(s),p.signals[f.signal.name()]=1));g.propagate(p,d)}function i(e,t,n,r){t.forEach(function(t){t.event?h(e,t,n,r):t.signal?d(e,t,n,r):t.start?p(e,t,n,r):t.stream&&(t.filters&&t.stream.forEach(function(e){e.filters=o.array(e.filters).concat(t.filters)}),i(e,t.stream,n,r))})}function h(e,t,n,i){var r=t.event,s=t.name,l=t.mark,u=t.target,c=o.array(t.filters),f=u?E:_,h=u?u+":"+r:r,d=f.nodes[h]||(f.nodes[h]=new a.Node(g)),p=f.handlers[h]||(f.handlers[h]=[]);s?c.push('!!event.vg.name["'+s+'"]'):l&&c.push("event.vg.item.mark && event.vg.item.mark.marktype==="+o.str(l)),p.push({signal:e,exp:n,spec:i,filters:c.map(function(e){return g.expr(e)})}),d.addListener(e)}function d(e,t,n,i){var r=e.name(),o=g.signal(r+c,null);o.evaluate=function(o){if(!o.signals[t.signal])return g.doNotPropagate;var a=n.fn();return i.scale&&(a=l.scale(g,i,a)),(a!==e.value()||e.verbose())&&(e.value(a),o.signals[r]=1,o.reflow=!0),o},o.dependency(a.Dependencies.SIGNALS,t.signal),o.addListener(e),g.signal(t.signal).addListener(o)}function p(e,t,n,r){var o=e.name(),a=o+u,s=t.middle,l=s.filters||(s.filters=[]),c=g.signal(a)||g.signal(a,!1);i(c,[t.start],m,{}),i(c,[t.end],v,{}),l.push(c.name()),i(e,[t.middle],n,r)}var g=e.model(),m=g.expr("true"),v=g.expr("false"),y=g.defs().signals,b={handlers:{},nodes:{}},_=o.duplicate(b),E=o.duplicate(b);return o.array(y).forEach(function(e){var t=g.signal(e.name);e.expr||o.array(e.streams).forEach(function(e){var n=s.parse(e.type),r=g.expr(e.expr);i(t,n,r,e)})}),o.keys(_.handlers).forEach(function(i){e.on(i,function(e,r){e.preventDefault(),t(e,r),n(_,i,r&&r.datum||{},r&&r.mark&&r.mark.group&&r.mark.group.datum||{},e)})}),o.keys(E.handlers).forEach(function(e){function i(i){t(i),n(E,e,r.select(this).datum(),this.parentNode&&r.select(this.parentNode).datum(),i)}if("undefined"!=typeof window){for(var o=E.handlers[e],a=e.split(":"),s="window"===a[0]?[window]:window.document.querySelectorAll(a[0]),l=0;l<s.length;++l)s[l].addEventListener(a[1],i);o.elements=s,o.listener=i}}),E.detach=function(){o.keys(E.handlers).forEach(function(e){for(var t=E.handlers[e],n=e.split(":"),i=o.array(t.elements),r=0;r<i.length;++r)i[r].removeEventListener(n[1],t.listener)})},E.detach}var r="undefined"!=typeof window?window.d3:"undefined"!=typeof n?n.d3:null,o=e("datalib"),a=e("vega-dataflow"),s=e("vega-event-selector"),l=e("./signals"),u="_vgGATEKEEPER",c="_vgEVALUATOR",f={getItem:function(){return this.item},getGroup:function(e){var t=e?this.name[e]:this.group,n=t&&t.mark,i=n&&(n.interactive||void 0===n.interactive);return i?t:{}},getXY:function(e){var t={x:this.x,y:this.y};for("string"==typeof e&&(e=this.name[e]);e;e=e.mark&&e.mark.group)t.x-=e.x||0,t.y-=e.y||0;return t},getX:function(e){return this.getXY(e).x},getY:function(e){return this.getXY(e).y}};t.exports=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./signals":105,datalib:26,"vega-dataflow":41,"vega-event-selector":42}],108:[function(e,t,n){function i(e,t){var n,i=o[t.type];if(!i)throw new Error('"'+t.type+'" is not a valid transformation');return n=new i(e),t.output&&n.output(t.output),r.keys(t).forEach(function(e){"type"!==e&&"output"!==e&&n.param(e,t[e])}),n}var r=e("datalib"),o=e("../transforms/index");t.exports=i},{"../transforms/index":145,datalib:26}],109:[function(e,t,n){function i(e,t){return this._mark=t,s.prototype.init.call(this,e).router(!0).reflows(!0).mutates(!0)}var r=e("datalib"),o=e("vega-dataflow"),a=e("vega-scenegraph"),s=o.Node,l=e("vega-logging"),u=a.bound,c=a.Bounds,f=e("./Encoder"),h=i.prototype=new s;h.evaluate=function(e){l.debug(e,["bounds",this._mark.marktype]);var t,n,i,a,s,h,d=this._mark,p=d.marktype,g="group"===p,m=d.items,v=r.array(d.def.legends).length>0,y=d.bounds,b=!y||e.rem.length;if("line"===p||"area"===p)u.mark(d,null,g&&!v);else if(e.add.forEach(function(e){u.item(e),b=b||y&&!y.encloses(e.bounds)}),e.mod.forEach(function(e){b=b||y&&y.alignsWith(e.bounds),u.item(e)}),b)for(y=d.bounds&&d.bounds.clear()||(d.bounds=new c),t=0,n=m.length;t<n;++t)y.union(m[t].bounds);if(g&&v){for(t=0,n=m.length;t<n;++t)for(s=m[t],s._legendPositions=null,i=0,a=s.legendItems.length;i<a;++i)h=s.legendItems[i],f.update(this._graph,e.trans,"legendPosition",h.items,e.dirty),u.mark(h,null,!1);u.mark(d,null,!0)}return o.ChangeSet.create(e,!0)},t.exports=i},{"./Encoder":111,datalib:26,"vega-dataflow":41,"vega-logging":48,"vega-scenegraph":49}],110:[function(e,t,n){function i(){return arguments.length?this.init.apply(this,arguments):this}function r(){var e,t,n,i,r,o,a,s=this._def.from,l=s.mark;if(l)i=this.sibling(l),e=i._isSuper?i:i._bounder,t=["vg",this._parent_id,l,e.listeners(!0).length].join("_"),n={name:t,transform:s.transform,modify:s.modify};else{if(e=this._graph.data(this._from),!e)throw Error('Data source "'+this._from+'" is not defined.');t=["vg",this._from,this._def.type,e.listeners(!0).length].join("_"),n={name:t,source:this._from,transform:s.transform,modify:s.modify}}this._from=t,this._ds=b.datasource(this._graph,n),l?(a=new h(this._graph).addListener(this._ds.listener()),a.evaluate=function(e){var t=g.create(e),n=i._output;return t.add=n.add,t.mod=n.mod,t.rem=n.rem,t},e.addListener(a)):(r=this._ds.source().last(),o=g.create(r),o.add=r.add,o.mod=r.mod,o.rem=r.rem,o.stamp=null,this._graph.propagate(o,this._ds.listener(),r.stamp))}function o(){var e=p.ingest(new c(this._mark));return this._def.width&&p.set(e,"width",this._def.width),this._def.height&&p.set(e,"height",this._def.height),e}function a(e,t,n,i,r){var a,l,u,c,f,h,d,g=s(this._def.key||(i?"_id":null)),m=this._mark.items||[],v=i?e.rem:m,y=p.idMap(!i||r?n:e.mod),b=[];for(a=0,u=v.length;a<u;++a)c=v[a]===m[a]?m[a]:g?this._map[g(v[a])]:v[a],c.status=_.EXIT;for(a=0,u=n.length;a<u;++a)f=n[a],c=g?this._map[l=g(f)]:m[a],h=!c&&(c=o.call(this),!0),c.status=h?_.ENTER:_.UPDATE,d=!h&&c.datum!==f,c.datum=f,g&&(p.set(c,"key",l),this._map[l]=c),h?t.add.push(c):(d||y[f._id])&&t.mod.push(c),b.push(c);for(a=0,u=v.length;a<u;++a)c=v[a]===m[a]?m[a]:g?this._map[l=g(v[a])]:v[a],c.status===_.EXIT&&(c._dirty=!0,e.dirty.push(c),b.push(c),t.rem.push(c),g&&(this._map[l]=null));return this._mark.items=b,t}function s(e){if(null==e)return null;var t=l.array(e).map(l.accessor);return function(e){for(var n="",i=0,r=t.length;i<r;++i)i>0&&(n+="|"),n+=String(t[i](e));return n}}var l=e("datalib"),u=e("vega-logging"),c=e("vega-scenegraph").Item,f=e("vega-dataflow"),h=f.Node,d=f.Dependencies,p=f.Tuple,g=f.ChangeSet,m={},v=e("./Encoder"),y=e("./Bounder"),b=e("../parse/data"),_=i.STATUS={ENTER:"enter",UPDATE:"update",EXIT:"exit"},E=1,x=2,w=i.prototype=new h;w.init=function(e,t,n,i,o,a){return h.prototype.init.call(this,e).router(!0).collector(!0),this._def=t,this._mark=n,this._from=(t.from?t.from.data:null)||a,this._ds=l.isString(this._from)?e.data(this._from):null,this._map={},this._status=null,n.def=t,n.marktype=t.type,n.interactive=t.interactive!==!1,n.items=[],l.isValid(t.name)&&(n.name=t.name),this._parent=i,this._parent_id=o,t.from&&(t.from.mark||t.from.transform||t.from.modify)&&r.call(this),this._isSuper="group"!==this._def.type,this._encoder=new v(this._graph,this._mark,this),this._bounder=new y(this._graph,this._mark),this._output=null,this._ds&&this._encoder.dependency(d.DATA,this._from),this.dependency(d.DATA,this._encoder.dependency(d.DATA)),this.dependency(d.SCALES,this._encoder.dependency(d.SCALES)),this.dependency(d.SIGNALS,this._encoder.dependency(d.SIGNALS)),this},w.ds=function(){return this._ds},w.parent=function(){return this._parent},w.encoder=function(){return this._encoder},w.pipeline=function(){return[this]},w.connect=function(){var e=this;return this._graph.connect(this.pipeline()),this._encoder._scales.forEach(function(t){(t=e._parent.scale(t))&&t.addListener(e)}),this._parent&&(this._isSuper?this.addListener(this._parent._collector):this._bounder.addListener(this._parent._collector)),this._status=E,this},w.disconnect=function(){function e(e){for(var n,i=0,r=e.length;i<r;++i)(n=t._parent.scale(e[i]))&&n.removeListener(t)}var t=this;return this._listeners.length?(h.prototype.disconnect.call(this),this._graph.disconnect(this.pipeline()),e(this._encoder._scales),e(l.keys(this._mark._scaleRefs)),this._status=x,this):this},w.sibling=function(e){return this._parent.child(e,this._parent_id)},w.evaluate=function(e){u.debug(e,["building",this._from||this._def.from,this._def.type]);var t,n,i,r,o=this,s=this._mark.def,c=s.properties||{},f=c.update||{},h=g.create(e);if(this._ds){if(i=h.data[r=this._ds.name()],h.data[r]=null,t=this._encoder.reevaluate(h),h.data[r]=i,n=this._ds.last(),!n)throw Error("Builder evaluated before backing DataSource.");n.stamp>this._stamp?a.call(this,n,h,this._ds.values(),!0,t):t&&(h.mod=this._mark.items.slice())}else i=l.isFunction(this._def.from)?this._def.from():[m],a.call(this,e,h,i);return this._output=h=this._graph.evaluate(h,this._encoder),f.nested&&f.nested.length&&this._status===E&&l.keys(this._mark._scaleRefs).forEach(function(e){var t=o._parent.scale(e);t&&(t.addListener(o),o.dependency(d.SCALES,e),o._encoder.dependency(d.SCALES,e))}),this._isSuper&&(h.mod=h.mod.filter(function(e){return e._dirty}),h=this._graph.evaluate(h,this._bounder)),h},t.exports=i},{"../parse/data":95,"./Bounder":109,"./Encoder":111,datalib:26,"vega-dataflow":41,"vega-logging":48,"vega-scenegraph":49}],111:[function(e,t,n){function i(e,t,n){var i=t.def.properties||{},r=i.enter,o=i.update,a=i.exit;c.prototype.init.call(this,e),this._mark=t,this._builder=n;var s=this._scales=[];return r&&s.push.apply(s,r.scales),o&&(this.dependency(f.DATA,o.data),this.dependency(f.SIGNALS,o.signals),this.dependency(f.FIELDS,o.fields),this.dependency(f.SCALES,o.scales),s.push.apply(s,o.scales)),a&&s.push.apply(s,a.scales),this.mutates(!0)}function r(e,t,n,i){var r,o,a,s=n.add.length;return(r=i.enter)&&(o=r[e]).length&&s&&(a=t.values(e,o,a=a||{})),(r=i.exit)&&(o=r[e]).length&&n.rem.length&&(a=t.values(e,o,a=a||{})),(r=i.update)&&(o=r[e]).length&&(s||n.mod.length)&&(a=t.values(e,o,a=a||{})),a||d}function o(e,t,n,i,r,o,a){var s=e.encode,l=t._dirty,u=s.call(s,t,t.mark.group||t,n,i,r,o);t._dirty=u||l,u&&!l&&a.push(t)}function a(){for(var e,t,n,i=this._mark.def.properties.update.nested,r=this._builder,o=0,a=0,s=i.length;a<s;++a)if(e=i[a],!e.scale){for(;o<e.level;++o)r=r.parent(),t=r.ds();if(n=(e.group?r.encoder():t.last())._stamp,n>this._stamp)return!0}return!1}var s=e("datalib"),l=e("vega-logging"),u=e("vega-dataflow"),c=u.Node,f=u.Dependencies,h=e("vega-scenegraph").bound,d={},p=i.prototype=new c;p.evaluate=function(t){l.debug(t,["encoding",this._mark.def.type]);var n,i,a,s,u=this._graph,c=this._mark.def.properties||{},h=this._mark.items,p=c.enter,g=c.update,m=c.exit,v=t.dirty,y=u.predicates(),b=t.request,_=this._mark.group,E=_&&(_.mark.axis||_.mark.legend),x=d,w=d;if(b&&!E){if((s=c[b])&&t.mod.length)for(x=s.data?u.values(f.DATA,s.data):null,w=s.signals?u.values(f.SIGNALS,s.signals):null,n=0,i=t.mod.length;n<i;++n)a=t.mod[n],o.call(this,s,a,t.trans,x,w,y,v);return t}for(x=r(f.DATA,u,t,c),w=r(f.SIGNALS,u,t,c),n=0,i=t.rem.length;n<i;++n)a=t.rem[n],m&&o.call(this,m,a,t.trans,x,w,y,v),t.trans&&!m?t.trans.interpolate(a,d):t.trans||h.pop();var T=e("./Builder").STATUS.UPDATE;for(n=0,i=t.add.length;n<i;++n)a=t.add[n],p&&o.call(this,p,a,t.trans,x,w,y,v),g&&o.call(this,g,a,t.trans,x,w,y,v),a.status=T;if(g)for(n=0,i=t.mod.length;n<i;++n)a=t.mod[n],o.call(this,g,a,t.trans,x,w,y,v);return t},p.reevaluate=function(e){var t=this._mark.def,n=t.properties||{},i=s.isFunction(t.from)||t.orient||e.request||c.prototype.reevaluate.call(this,e);return i||!!n.update&&a.call(this)},i.update=function(e,t,n,i,r){i=s.array(i);var a,l,u,c,d,p=e.predicates(),g=e.values(f.DATA),m=e.values(f.SIGNALS);for(a=0,l=i.length;a<l;++a)u=i[a],c=u.mark.def.properties,d=c&&c[n],d&&(o.call(null,d,u,t,g,m,p,r),h.item(u))},t.exports=i},{"./Builder":110,datalib:26,"vega-dataflow":41,"vega-logging":48,"vega-scenegraph":49}],112:[function(e,t,n){function i(){return this._children={},this._scaler=null,this._recursor=null,this._scales={},this.scale=o.bind(this),arguments.length?this.init.apply(this,arguments):this}function r(e){function t(e){e.type!=E.MARK||e.inline||void 0===m._graph.data(e.from)||m._recursor.removeListener(e.builder)}function n(t){var n=t.scale();e.scales[n.scaleName]&&t.reset().def()}function i(t){var n=t.size()||t.shape()||t.fill()||t.stroke()||t.opacity();e.scales[n.scaleName]&&t.reset().def()}function r(e){m._recursor.removeListener(e.builder),e.builder.disconnect()}var o,a,f,h,d,p,g,m=this,v=c.array(this._def.marks).length>0,y=c.array(this._def.axes).length>0,b=c.array(this._def.legends).length>0,_=!1;for(o=0,h=e.add.length;o<h;++o)d=e.add[o],v&&s.call(this,e,d),y&&l.call(this,e,d),b&&u.call(this,e,d);for(o=e.add.length-1;o>=0;--o)for(d=e.add[o],a=this._children[d._id].length-1;a>=0;--a)f=this._children[d._id][a],f.builder.connect(),p=f.builder.pipeline(),g=f.builder._def,_=g.type!==E.GROUP,_=_&&void 0!==this._graph.data(f.from),_=_&&1===p[p.length-1].listeners().length,_=_&&g.from&&!g.from.mark,f.inline=_,_?this._graph.evaluate(e,f.builder):this._recursor.addListener(f.builder);for(o=0,h=e.mod.length;o<h;++o)d=e.mod[o],v&&m._children[d._id].forEach(t),y&&d.axes.forEach(n),b&&d.legends.forEach(i);for(o=0,h=e.rem.length;o<h;++o)d=e.rem[o],m._children[d._id].forEach(r),delete m._children[d._id];return e}function o(e,t){var n=this,i=null;if(2===arguments.length)return n._scales[e]=t,t;for(;null==i&&(i=n._scales[e],n=n.mark?n.mark.group:n._parent););return i}function a(e,t){m.debug(e,["building group",t._id]),t._scales=t._scales||{},t.scale=o.bind(t),t.items=t.items||[],this._children[t._id]=this._children[t._id]||[],t.axes=t.axes||[],t.axisItems=t.axisItems||[],t.legends=t.legends||[],t.legendItems=t.legendItems||[],this._graph.group(t._id,t)}function s(e,t){m.debug(e,["building children marks #"+t._id]);var n,r,o,a,s,l,u=this._def.marks;for(a=0,s=u.length;a<s;++a)n=u[a],r=n.from||{},o=t.datum._facetID,t.items[a]={group:t,_scaleRefs:{}},l=n.type===E.GROUP?new i:new v,l.init(this._graph,n,t.items[a],this,t._id,o),this._children[t._id].push({builder:l,from:r.data||(r.mark?"vg_"+t._id+"_"+r.mark:o),type:E.MARK})}function l(e,t){var n=t.axes,r=t.axisItems,o=this;b(this._graph,this._def.axes,n,t),n.forEach(function(e,n){var a=o._def.axes[n].scale,s=e.def(),l=null;r[n]={group:t,axis:e,layer:s.layer},l=s.type===E.GROUP?new i:new v,l.init(o._graph,s,r[n],o).dependency(d.SCALES,a),o._children[t._id].push({builder:l,type:E.AXIS,scale:a})})}function u(e,t){var n=t.legends,r=t.legendItems,o=this;_(this._graph,this._def.legends,n,t),n.forEach(function(e,n){var a=e.size()||e.shape()||e.fill()||e.stroke()||e.opacity(),s=e.def(),l=null;r[n]={group:t,legend:e},l=s.type===E.GROUP?new i:new v,l.init(o._graph,s,r[n],o).dependency(d.SCALES,a),o._children[t._id].push({builder:l,type:E.LEGEND,scale:a})})}var c=e("datalib"),f=e("vega-dataflow"),h=f.Node,d=f.Dependencies,p=f.Tuple,g=f.Collector,m=e("vega-logging"),v=e("./Builder"),y=e("./Scale"),b=e("../parse/axes"),_=e("../parse/legends"),E=i.TYPES={GROUP:"group",MARK:"mark",AXIS:"axis",LEGEND:"legend"},x=i.prototype=new v;x.init=function(e,t){var n,i=this;this._scaler=new h(e),(t.scales||[]).forEach(function(t){t=i.scale(n=t.name,new y(e,t,i)),i.scale(n+":prev",t),i._scaler.addListener(t)}),this._recursor=new h(e),this._recursor.evaluate=r.bind(this);var o=(t.axes||[]).reduce(function(e,t){return e[t.scale]=1,e},{});return o=(t.legends||[]).reduce(function(e,t){return e[t.size||t.shape||t.fill||t.stroke||t.opacity]=1,e},o),this._recursor.dependency(d.SCALES,c.keys(o)),this._collector=new g(e),v.prototype.init.apply(this,arguments)},x.evaluate=function(){var e=v.prototype.evaluate.apply(this,arguments),t=this._graph,n=this,i=this._scales,r=this._mark.items;if(e.mod.length<r.length){var o=c.keys(i).some(function(t){return i[t].reevaluate(e)});!o&&this._def.axes&&(o=this._def.axes.reduce(function(t,n){return t||e.scales[n.scale]},!1)),!o&&this._def.legends&&(o=this._def.legends.reduce(function(t,n){return t||e.scales[n.size||n.shape||n.fill||n.stroke]},!1)),o&&(e.mod=e.mod.concat(p.idFilter(r,e.mod,e.add,e.rem)))}return e.add.forEach(function(t){a.call(n,e,t)}),e.rem.forEach(function(e){t.group(e._id,null)}),e},x.pipeline=function(){return[this,this._scaler,this._recursor,this._collector,this._bounder]},x.disconnect=function(){var e=this;return c.keys(e._children).forEach(function(t){e._children[t].forEach(function(t){e._recursor.removeListener(t.builder),t.builder.disconnect()})}),e._children={},v.prototype.disconnect.call(this)},x.child=function(e,t){for(var n,i=this._children[t],r=0,o=i.length;r<o&&(n=i[r],n.type!=E.MARK||n.builder._def.name!=e);++r);return n.builder},t.exports=i},{"../parse/axes":93,"../parse/legends":98,"./Builder":110,"./Scale":113,datalib:26,"vega-dataflow":41,"vega-logging":48}],113:[function(e,t,n){(function(n){function i(e,t,n){return this._def=t,this._parent=n,this._updated=!1,w.prototype.init.call(this,e).reflows(!0)}function r(e){var t=this._def.name,n=t+":prev",i=o.call(this,e.scale(t)),r=i.type===C.ORDINAL?a:l,s=y.call(this,e);return r.call(this,i,s,e),e.scale(t,i),e.scale(n,e.scale(n)||i),i}function o(e){var t=this._graph.config(),n=this._def.type||C.LINEAR;if(!e||n!==e.type){var i=t.scale[n]||b.scale[n];if(!i)throw Error("Unrecognized scale type: "+n);(e=i()).type=e.type||n,e.scaleName=this._def.name,e._prev={}}return e}function a(e,t,n){var i,r,o=this._def,a=e._prev,l=!1,u=m.call(this,o.padding)||0,c=null==o.outerPadding?u:m.call(this,o.outerPadding),f=o.points&&m.call(this,o.points),h=m.call(this,o.round)||null==o.round,d=!0;if(_.isObject(o.range)&&!_.isArray(o.range)&&(l=!0,t=g.call(this,k.RANGE,o.range,e,n)),i=g.call(this,k.DOMAIN,o.domain,e,n),i&&!_.equal(a.domain,i)&&(e.domain(i),a.domain=i,this._updated=!0),!_.equal(a.range,t)){if(o.bandSize){var p,v=m.call(this,o.bandSize),y=i.length,b=o.points?u*v:u*v*(y-1)+2*c;t[0]>t[1]?(p=t[1]||0,t=[p+(v*y+b),p]):(p=t[0]||0,t=[p,p+(v*y+b)]),o.reverse&&(t=t.reverse())}r="string"==typeof t[0],r||t.length>2||1===t.length||l?(e.range(t),d=!1):f&&h?e.rangeRoundPoints(t,u):f?e.rangePoints(t,u):h?e.rangeRoundBands(t,u,c):e.rangeBands(t,u,c),a.range=t,this._updated=!0}!e.invert&&d&&s(e)}function s(e){e.invert=function(t,n){var i=e.range(),r=i[0]<i[1],o=r?N:M;if(1===arguments.length){if(!_.isNumber(t))throw Error("Ordinal scale inversion is only supported for numeric input ("+t+").");return e.domain()[o(i,t)]}if(2===arguments.length){if(!_.isNumber(t)||!_.isNumber(n))throw Error("Extents to ordinal invert are not numbers ("+t+", "+n+").");var a,s=e.domain(),l=o(i,t),u=o(i,n),c=i.length-1;return u<l&&(a=l,l=u,u=l),l<0&&(l=0),u>c&&(u=c),(r?_.range(l,u+1):_.range(u,l-1,-1)).map(function(e){return s[e]})}}}function l(e,t,n){var i,r,o=this._def,a=e._prev,s=m.call(this,o.round),l=m.call(this,o.exponent),u=m.call(this,o.clamp),c=m.call(this,o.nice);i=o.type===C.QUANTILE?g.call(this,k.DOMAIN,o.domain,e,n):v.call(this,e,n),i&&!_.equal(a.domain,i)&&(e.domain(i),a.domain=i,this._updated=!0),"height"===m.call(this,o.range)&&(t=t.reverse()),t&&!_.equal(a.range,t)&&(e[s&&e.rangeRound?"rangeRound":"range"](t),a.range=t,this._updated=!0),l&&o.type===C.POWER&&e.exponent(l),u&&e.clamp(!0),c&&(o.type===C.TIME?(r=b.time[c],r||x.error("Unrecognized interval: "+r),e.nice(r)):e.nice())}function u(e){return e.type===C.ORDINAL||e.type===C.QUANTILE}function c(e){return e.fields||_.array(e)}function f(e){return e.some(function(e){return!e.data||e.data&&_.array(e.field).some(function(e){return e.parent})})}function h(e,t){return _.array(e.field).map(function(e){return e.parent?_.accessor(e.parent)(t.datum):e})}function d(e,t){var n=c(e);return 1==n.length&&1==_.array(n[0].field).length?S.TYPES.TUPLE:u(t)&&_.isObject(e.sort)?S.TYPES.MULTI:S.TYPES.VALUE}function p(e,t,n,i){var r=c(t),o=f(r),a=d(t,n),s=u(n),l=t.sort,p="_"+e,g=h(r[0],i);if(n[p]||this[p])return n[p]||this[p];var m,v,y=new S(this._graph).type(a);return o?n[p]=y:this[p]=y,s?a===S.TYPES.VALUE?(m=[{name:k.GROUPBY,get:_.identity}],v={"*":k.COUNT}):a===S.TYPES.TUPLE?(m=[{name:k.GROUPBY,get:_.$(g[0])}],v=_.isObject(l)?[{field:k.VALUE,get:_.$(l.field),ops:[l.op]}]:{"*":k.COUNT}):(m=k.GROUPBY,v=[{field:k.VALUE,ops:[l.op]}]):(m=[],v=[{field:k.VALUE,get:a==S.TYPES.TUPLE?_.$(g[0]):_.identity,ops:[k.MIN,k.MAX],as:[k.MIN,k.MAX]}]),y.param("groupby",m).param("summarize",v),y._lastUpdate=-1,y}function g(e,t,n,i){function r(e){w.dependency(T.SIGNALS,e)}if(null==t)return[];if(_.isArray(t))return t.map(m.bind(this));var o,a,s,l,g,v,y,b,E,x,w=this,A=this._graph,C=c(t),O=f(C),I=d(t,n),N=p.apply(this,arguments),M=t.sort,D=u(n);if(O||!O&&N._lastUpdate<this._stamp){for(o=0,a=C.length;o<a;++o)if(g=C[o],E=g.data||i.datum._facetID,b=A.data(E).last(),!(b.stamp<=this._stamp)){for(v=h(g,i),s=0,l=v.length;s<l;++s)y=v[s],I===S.TYPES.VALUE?N.accessors(null,y):I===S.TYPES.MULTI&&N.accessors(y,g.sort||M.field),N.evaluate(b);this.dependency(T.DATA,E),N.dependency(T.SIGNALS).forEach(r)}N._lastUpdate=this._stamp,b=N.aggr().result(),D?(_.isObject(M)?(x=M.op+"_"+k.VALUE,x=_.comparator(x)):M===!0&&(x=_.comparator(k.GROUPBY)),x&&(b=b.sort(x)),N._values=b.map(function(e){return e[k.GROUPBY]})):(b=b[0],N._values=_.isValid(b)?[b[k.MIN],b[k.MAX]]:[])}return N._values}function m(e){if(!e||!e.signal)return e;var t,n=e.signal;return this.dependency(T.SIGNALS,(t=_.field(n))[0]),this._graph.signalRef(t)}function v(e,t){var n,i,r=this._def,o=[null,null];return void 0!==r.domain&&(o=_.isObject(r.domain)?g.call(this,k.DOMAIN,r.domain,e,t):o),i=o.length-1,void 0!==r.domainMin&&(_.isObject(r.domainMin)?r.domainMin.signal?o[0]=_.isValid(n=m.call(this,r.domainMin))?n:o[0]:o[0]=g.call(this,k.DOMAIN+k.MIN,r.domainMin,e,t)[0]:o[0]=r.domainMin),
void 0!==r.domainMax&&(_.isObject(r.domainMax)?r.domainMax.signal?o[i]=_.isValid(n=m.call(this,r.domainMax))?n:o[i]:o[i]=g.call(this,k.DOMAIN+k.MAX,r.domainMax,e,t)[1]:o[i]=r.domainMax),r.type===C.LOG||r.type===C.TIME||!r.zero&&void 0!==r.zero||(o[0]=Math.min(0,o[0]),o[i]=Math.max(0,o[i])),o}function y(e){var t=this._def,n=this._graph.config(),i=m.call(this,t.range),r=[null,null];if(void 0!==i)if("string"==typeof i)if(A[i])r=[0,e[i]];else{if(!n.range[i])return x.error("Unrecogized range: "+i),r;r=n.range[i]}else if(_.isArray(i))r=_.duplicate(i).map(m.bind(this));else{if(_.isObject(i))return null;r=[0,i]}if(void 0!==t.rangeMin&&(r[0]=t.rangeMin.signal?m.call(this,t.rangeMin):t.rangeMin),void 0!==t.rangeMax&&(r[r.length-1]=t.rangeMax.signal?m.call(this,t.rangeMax):t.rangeMax),void 0!==t.reverse){var o=m.call(this,t.reverse);_.isObject(o)&&(o=_.accessor(o.field)(e.datum)),o&&(r=r.reverse())}return r}var b="undefined"!=typeof window?window.d3:"undefined"!=typeof n?n.d3:null,_=e("datalib"),E=e("vega-dataflow"),x=e("vega-logging"),w=E.Node,T=E.Dependencies,S=e("../transforms/Aggregate"),A={width:1,height:1},C={LINEAR:"linear",ORDINAL:"ordinal",LOG:"log",POWER:"pow",SQRT:"sqrt",TIME:"time",TIME_UTC:"utc",QUANTILE:"quantile",QUANTIZE:"quantize",THRESHOLD:"threshold"},k={DOMAIN:"domain",RANGE:"range",COUNT:"count",GROUPBY:"groupby",MIN:"min",MAX:"max",VALUE:"value",ASC:"asc",DESC:"desc"},O=i.prototype=new w;O.evaluate=function(e){var t=this,n=function(e){r.call(t,e)};return this._updated=!1,e.add.forEach(n),e.mod.forEach(n),this._updated&&(e.scales[this._def.name]=1,x.debug(e,["scale",this._def.name])),E.ChangeSet.create(e,!0)},O.dependency=function(e,t){if(2==arguments.length){var n=e===T.DATA?"data":"signal";t=_.array(t);for(var i=0,r=t.length;i<r;++i)this._graph[n](t[i]).addListener(this._parent)}return w.prototype.dependency.call(this,e,t)};var I=b.bisector(_.numcmp).right,N=function(e,t){return I(e,t)-1},M=b.bisector(function(e,t){return-1*_.numcmp(e,t)}).left;t.exports=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../transforms/Aggregate":118,datalib:26,"vega-dataflow":41,"vega-logging":48}],114:[function(e,t,n){(function(n){function i(e,t){this.duration=e||500,this.ease=t&&o.ease(t)||o.ease("cubic-in-out"),this.updates={next:null}}function r(e){for(var t,n,i,r,o,s,u=this.updates,c=u,f=c.next,h=this.duration,d=!0;null!=f;c=f,f=c.next)if(t=f.item,n=t.delay||0,i=(e-n)/h,i<0)d=!1;else{for(i>1&&(i=1),r=f.ease(i),o=0,s=f.length;o<s;++o)t[f[o].property]=f[o](r);t.touch(),a.item(t),1===i?(f.remove&&(t.status=l.EXIT,t.remove()),c.next=f.next,f=c):d=!1}return this.callback(),d}var o="undefined"!=typeof window?window.d3:"undefined"!=typeof n?n.d3:null,a=e("vega-scenegraph").bound,s=e("vega-dataflow").Tuple,l=e("./Builder").STATUS,u=i.prototype,c={text:1,url:1};u.interpolate=function(e,t){var n,i,r,a,u=null;for(n in t)i=e[n],r=t[n],i!==r&&(c[n]||void 0===i?s.set(e,n,r):"number"!=typeof i||isFinite(i)?(a=o.interpolate(i,r),a.property=n,(u||(u=[])).push(a)):s.set(e,n,r));return null===u&&e.status===l.EXIT&&(u=[]),null!=u&&(u.item=e,u.ease=e.mark.ease||this.ease,u.next=this.updates.next,this.updates.next=u),this},u.start=function(e){for(var t=this,n=t.updates,i=n.next;null!=i;n=i,i=n.next)i.item.status===l.EXIT&&(i.item.status=l.UPDATE,i.remove=!0);t.callback=e,o.timer(function(e){return r.call(t,e)})},t.exports=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./Builder":110,"vega-dataflow":41,"vega-scenegraph":49}],115:[function(e,t,n){function i(e,t){function n(){O.type=null}function i(e){return{data:e}}function o(e){var t=P||(S.ticks?S.ticks(H):S.domain()),n=r(S,t,j).map(i);return t=t.map(function(t){return t=i(t),t.label=e(t.data),t}),[t,n]}function w(e){var n=e.orient,i=e.marks[5].properties.update,r=i.encode,o=t.titleOffsetAutoMin,a=t.titleOffsetAutoMax,s=t.titleOffsetAutoMargin;i.encode=function(e,t,i,l,u,c){var f=r.call(r,e,t,i,l,u,c),h="bottom"===n||"top"===n?"y":"x";if(null!=Y[h])return f;_.clear().union(t.items[3].bounds).union(t.items[4].bounds);var d=i?{}:e,p="left"===n||"right"===n?"width":"height",g="top"===n||"left"===n?-1:1,m=~~(_[p]()+e.fontSize/2+s);return v.set(d,h,g*Math.min(Math.max(o,m),a)),i&&i.interpolate(e,d),!0}}function T(n){var i,r,o;n.type===E?(i={scale:n.scaleName,offset:.5+n.rangeBand()/2},r=i):(i={scale:n.scaleName,offset:.5},r={scale:n.scaleName+":prev",offset:.5}),o=a(n),m.extend(X.gridLines,h(t)),m.extend(X.majorTicks,h(t)),m.extend(X.minorTicks,h(t)),m.extend(X.tickLabels,d(t)),m.extend(X.domain,g(t)),m.extend(X.title,p(t)),X.gridLines.properties.enter.stroke={value:t.gridColor},X.gridLines.properties.enter.strokeOpacity={value:t.gridOpacity},X.gridLines.properties.enter.strokeWidth={value:t.gridWidth},X.gridLines.properties.enter.strokeDash={value:t.gridDash},l(A,X.gridLines,r,i,1/0,n,t,C),l(A,X.majorTicks,r,i,D,n,t),l(A,X.minorTicks,r,i,L,n,t),s(A,X.tickLabels,r,i,D,R),c(A,X.domain,o,$),u(A,X.title,o,+k||-1),m.extend(X.gridLines.properties.update,z),m.extend(X.majorTicks.properties.update,q),m.extend(X.minorTicks.properties.update,W),m.extend(X.tickLabels.properties.update,B),m.extend(X.domain.properties.update,G),m.extend(X.title.properties.update,Y);var v=[X.gridLines,X.majorTicks,X.minorTicks,X.tickLabels,X.domain,X.title];m.extend(O,{type:"group",interactive:!1,properties:{enter:{encode:f,scales:[n.scaleName],signals:[],data:[]},update:{encode:f,scales:[n.scaleName],signals:[],data:[]}}}),O.marks=v.map(function(t){return y(e,t)})}var S,A=t.orient,C=0,k=t.titleOffset,O={},I="front",N=!1,M=null,D=t.tickSize,L=t.tickSize,$=t.tickSize,R=t.tickPadding||t.padding,P=null,F=null,U=null,j=0,H=t.ticks,z={},B={},q={},W={},Y={},G={},X={gridLines:{},majorTicks:{},minorTicks:{},tickLabels:{},domain:{},title:{}},V={};return V.def=function(){O.type||T(S);var e=b.getTickFormat(S,H,U,F),t=o(e),n=M?[M].map(i):[];return O.marks[0].from=function(){return N?t[0]:[]},O.marks[1].from=function(){return t[0]},O.marks[2].from=function(){return t[1]},O.marks[3].from=O.marks[1].from,O.marks[4].from=function(){return[1]},O.marks[5].from=function(){return n},O.offset=C,O.orient=A,O.layer=I,"auto"===k&&w(O),O},V.scale=function(e){return arguments.length?(S!==e&&(S=e,n()),V):S},V.orient=function(e){return arguments.length?(A!==e&&(A=e in x?e+"":t.orient,n()),V):A},V.title=function(e){return arguments.length?(M!==e&&(M=e,n()),V):M},V.tickCount=function(e){return arguments.length?(H=e,V):H},V.tickValues=function(e){return arguments.length?(P=e,V):P},V.tickFormat=function(e){return arguments.length?(F!==e&&(F=e,n()),V):F},V.tickFormatType=function(e){return arguments.length?(U!==e&&(U=e,n()),V):U},V.tickSize=function(e,t){if(!arguments.length)return D;var i=arguments.length-1,r=+e,o=i>1?+t:D,a=i>0?+arguments[i]:D;return D===r&&L===o&&$===a||n(),D=r,L=o,$=a,V},V.tickSubdivide=function(e){return arguments.length?(j=+e,V):j},V.offset=function(e){return arguments.length?(C=m.isObject(e)?e:+e,V):C},V.tickPadding=function(e){return arguments.length?(R!==+e&&(R=+e,n()),V):R},V.titleOffset=function(e){return arguments.length?(k!==e&&(k=e,n()),V):k},V.layer=function(e){return arguments.length?(I!==e&&(I=e,n()),V):I},V.grid=function(e){return arguments.length?(N!==e&&(N=e,n()),V):N},V.gridLineProperties=function(e){return arguments.length?(z!==e&&(z=e),V):z},V.majorTickProperties=function(e){return arguments.length?(q!==e&&(q=e),V):q},V.minorTickProperties=function(e){return arguments.length?(W!==e&&(W=e),V):W},V.tickLabelProperties=function(e){return arguments.length?(B!==e&&(B=e),V):B},V.titleProperties=function(e){return arguments.length?(Y!==e&&(Y=e),V):Y},V.domainProperties=function(e){return arguments.length?(G!==e&&(G=e),V):G},V.reset=function(){return n(),V},V}function r(e,t,n){var i=[];if(n&&t.length>1){for(var r,a,s=o(e.domain()),l=-1,u=t.length,c=(t[1]-t[0])/++n;++l<u;)for(r=n;--r>0;)(a=+t[l]-r*c)>=s[0]&&i.push(a);for(--l,r=0;++r<n&&(a=+t[l]+r*c)<s[1];)i.push(a)}return i}function o(e){var t=e[0],n=e[e.length-1];return t<n?[t,n]:[n,t]}function a(e){return e.rangeExtent?e.rangeExtent():o(e.range())}function s(e,t,n,i,r,o){r=Math.max(r,0)+o,"left"!==e&&"top"!==e||(r*=-1),"top"===e||"bottom"===e?(m.extend(t.properties.enter,{x:n,y:{value:r}}),m.extend(t.properties.update,{x:i,y:{value:r},align:{value:"center"},baseline:{value:T[e]}})):(m.extend(t.properties.enter,{x:{value:r},y:n}),m.extend(t.properties.update,{x:{value:r},y:i,align:{value:w[e]},baseline:{value:"middle"}}))}function l(e,t,n,i,r,o,a,s){var l="left"===e||"top"===e?-1:1;if(r=r===1/0?"top"===e||"bottom"===e?{field:{group:"height",level:2},mult:-l,offset:s*-l}:{field:{group:"width",level:2},mult:-l,offset:s*-l}:{value:l*r,offset:s},"between"===a.tickPlacement&&o.type===E){var u=o.range(),c=.5+(o.rangeBand()||(u[1]-u[0])/2);i=n=m.duplicate(i),i.offset=n.offset=c}"top"===e||"bottom"===e?(m.extend(t.properties.enter,{x:n,y:{value:0},y2:r}),m.extend(t.properties.update,{x:i,y:{value:0},y2:r}),m.extend(t.properties.exit,{x:i})):(m.extend(t.properties.enter,{x:{value:0},x2:r,y:n}),m.extend(t.properties.update,{x:{value:0},x2:r,y:i}),m.extend(t.properties.exit,{y:i}))}function u(e,t,n,i){var r=t.properties.update,o=~~((n[0]+n[1])/2),a="top"===e||"left"===e?-1:1;"bottom"===e||"top"===e?(r.x={value:o},r.angle={value:0},i>=0&&(r.y={value:a*i})):(r.y={value:o},r.angle={value:"left"===e?-90:90},i>=0&&(r.x={value:a*i}))}function c(e,t,n,i){var r;"top"!==e&&"left"!==e||(i=-1*i),r="bottom"===e||"top"===e?"M"+n[0]+","+i+"V0H"+n[1]+"V"+i:"M"+i+","+n[0]+"H0V"+n[1]+"H"+i,t.properties.update.path={value:r}}function f(e,t,n){var i=n?{}:e,r=e.mark.def.offset,o=e.mark.def.orient,a=t.width,s=t.height;if(m.isArray(r)){var l=r[0],u=r[1];switch(o){case"left":v.set(i,"x",-l),v.set(i,"y",u);break;case"right":v.set(i,"x",a+l),v.set(i,"y",u);break;case"bottom":v.set(i,"x",l),v.set(i,"y",s+u);break;case"top":v.set(i,"x",l),v.set(i,"y",-u);break;default:v.set(i,"x",l),v.set(i,"y",u)}}else switch(m.isObject(r)&&(r=-t.scale(r.scale)(r.value)),o){case"left":v.set(i,"x",-r),v.set(i,"y",0);break;case"right":v.set(i,"x",a+r),v.set(i,"y",0);break;case"bottom":v.set(i,"x",0),v.set(i,"y",s+r);break;case"top":v.set(i,"x",0),v.set(i,"y",-r);break;default:v.set(i,"x",0),v.set(i,"y",0)}return n&&n.interpolate(e,i),!0}function h(e){return{type:"rule",interactive:!1,key:"data",properties:{enter:{stroke:{value:e.tickColor},strokeWidth:{value:e.tickWidth},opacity:{value:1e-6}},exit:{opacity:{value:1e-6}},update:{opacity:{value:1}}}}}function d(e){return{type:"text",interactive:!0,key:"data",properties:{enter:{fill:{value:e.tickLabelColor},font:{value:e.tickLabelFont},fontSize:{value:e.tickLabelFontSize},opacity:{value:1e-6},text:{field:"label"}},exit:{opacity:{value:1e-6}},update:{opacity:{value:1}}}}}function p(e){return{type:"text",interactive:!0,properties:{enter:{font:{value:e.titleFont},fontSize:{value:e.titleFontSize},fontWeight:{value:e.titleFontWeight},fill:{value:e.titleColor},align:{value:"center"},baseline:{value:"middle"},text:{field:"data"}},update:{}}}}function g(e){return{type:"path",interactive:!1,properties:{enter:{x:{value:.5},y:{value:.5},stroke:{value:e.axisColor},strokeWidth:{value:e.axisWidth}},update:{}}}}var m=e("datalib"),v=e("vega-dataflow").Tuple,y=e("../parse/mark"),b=e("../util"),_=new(e("vega-scenegraph").Bounds),E="ordinal",x={top:1,right:1,bottom:1,left:1},w={bottom:"center",top:"center",left:"right",right:"left"},T={bottom:"top",top:"bottom",left:"middle",right:"middle"};t.exports=i},{"../parse/mark":99,"../util":148,datalib:26,"vega-dataflow":41,"vega-scenegraph":49}],116:[function(e,t,n){(function(n){function i(e){function t(){q.type=null}function n(e,t){return{data:e,index:t}}function i(e){return"ordinal"===e||"quantize"===e||"quantile"===e||"threshold"===e}function y(e){var t,i,r,o=b(x,w,T,S,A),a=(null==k?e.ticks?e.ticks.apply(e,R):e.domain():k).map(n),s=m.getTickFormat(e,a.length,I,O),l=5,u=f.range(a.length);x?(i=a.map(function(e){return Math.sqrt(x(e.data))}),r=f.max(i),i=i.reduce(function(e,t,n,i){return n>0&&(e[n]=e[n-1]+i[n-1]/2+l),e[n]+=t/2,e},[0]).map(Math.round)):(r=Math.round(Math.sqrt(M.symbolSize)),i=C||(t=H.fontSize)&&t.value+l||M.labelFontSize+l,i=u.map(function(e,t){return Math.round(r/2+t*i)}));var c,d=$;N&&(c=j.fontSize,d+=5+(c&&c.value||M.titleFontSize));for(var p=0,g=i.length;p<g;++p)i[p]+=d;o.scales=o.scales||[{}],h.extend(o.scales[0],{name:"legend",type:"ordinal",points:!0,domain:u,range:i});var v=(N?[N]:[]).map(n);return a.forEach(function(e){e.label=s(e.data),e.offset=r}),o.marks[0].from=function(){return v},o.marks[1].from=function(){return a},o.marks[2].from=o.marks[1].from,o}function b(t,n,i,u,c){var f=h.extend(z.titles,a(M)),d=h.extend(z.symbols,s(M)),m=h.extend(z.labels,l(M));return o(d,t,n,i,u,c),h.extend(f.properties.update,j),h.extend(d.properties.update,F),h.extend(m.properties.update,H),f.properties.enter.x.value+=$,f.properties.enter.y.value+=$,m.properties.enter.x.offset+=$+1,d.properties.enter.x.offset=$+1,m.properties.update.x.offset+=$+1,d.properties.update.x.offset=$+1,h.extend(q,{type:"group",interactive:!1,properties:{enter:p(e,"group",P),legendPosition:{encode:r.bind(null,M),signals:[],scales:[],data:[],fields:[]}}}),q.marks=[f,d,m].map(function(t){return g(e,t)}),q}function _(e){var t=E(e),i=e.domain(),r=(null==k?i:k).map(n),o=U.width&&U.width.value||M.gradientWidth,a=m.getTickFormat(e,r.length,I,O);t.scales=t.scales||[{}];var s=h.extend(t.scales[0],{name:"legend",type:e.type,round:!0,zero:!1,domain:[i[0],i[i.length-1]],range:[$,o+$]});"pow"===e.type&&(s.exponent=e.exponent());var l=(N?[N]:[]).map(n);return r.forEach(function(e,t){e.label=a(e.data),e.align=t==r.length-1?"right":0===t?"left":"center"}),t.marks[0].from=function(){return l},t.marks[1].from=function(){return[1]},t.marks[2].from=function(){return r},t}function E(t){var n=h.extend(z.titles,a(M)),i=h.extend(z.gradient,u(M)),o=h.extend(z.labels,c(M)),s=new d,l=t.domain(),f=l[0],m=l[l.length-1],v=t.copy().domain([f,m]).range([0,1]),y="linear"!==t.type&&t.ticks?t.ticks.call(t,15):l;f!==y[0]&&y.unshift(f),m!==y[y.length-1]&&y.push(m);for(var b=0,_=y.length;b<_;++b)s.stop(v(y[b]),t(y[b]));i.properties.enter.fill={value:s},h.extend(n.properties.update,j),h.extend(i.properties.update,U),h.extend(o.properties.update,H);var E=i.properties,x=U.height,w=x&&x.value||E.enter.height.value;if(o.properties.enter.y.value=w,o.properties.update.y.value=w,N){var T=n.properties,S=j.fontSize,A=4+(S&&S.value||T.enter.fontSize.value);i.properties.enter.y.value+=A,o.properties.enter.y.value+=A,i.properties.update.y.value+=A,o.properties.update.y.value+=A}return n.properties.enter.x.value+=$,n.properties.enter.y.value+=$,i.properties.enter.x.value+=$,i.properties.enter.y.value+=$,o.properties.enter.y.value+=$,i.properties.update.x.value+=$,i.properties.update.y.value+=$,o.properties.update.y.value+=$,h.extend(q,{type:"group",interactive:!1,properties:{enter:p(e,"group",P),legendPosition:{encode:r.bind(null,M),signals:[],scales:[],data:[],fields:[]}}}),q.marks=[n,i,o].map(function(t){return g(e,t)}),q}var x=null,w=null,T=null,S=null,A=null,C=null,k=null,O=null,I=null,N=null,M=e.config().legend,D=M.orient,L=M.offset,$=M.padding,R=[5],P={},F={},U={},j={},H={},z={titles:{},symbols:{},labels:{},gradient:{}},B={},q={};return B.def=function(){var e=x||w||T||S||A;return q.type||(q=e!==T&&e!==S||i(e.type)?y(e):_(e)),q.orient=D,q.offset=L,q.padding=$,q.margin=M.margin,q},B.size=function(e){return arguments.length?(x!==e&&(x=e,t()),B):x},B.shape=function(e){return arguments.length?(w!==e&&(w=e,t()),B):w},B.fill=function(e){return arguments.length?(T!==e&&(T=e,t()),B):T},B.stroke=function(e){return arguments.length?(S!==e&&(S=e,t()),B):S},B.opacity=function(e){return arguments.length?(A!==e&&(A=e,t()),B):A},B.title=function(e){return arguments.length?(N!==e&&(N=e,t()),B):N},B.format=function(e){return arguments.length?(O!==e&&(O=e,t()),B):O},B.formatType=function(e){return arguments.length?(I!==e&&(I=e,t()),B):I},B.spacing=function(e){return arguments.length?(C!==+e&&(C=+e,t()),B):C},B.orient=function(e){return arguments.length?(D=e in v?e+"":M.orient,B):D},B.offset=function(e){return arguments.length?(L=+e,B):L},B.values=function(e){return arguments.length?(k=e,B):k},B.legendProperties=function(e){return arguments.length?(P=e,B):P},B.symbolProperties=function(e){return arguments.length?(F=e,B):F},B.gradientProperties=function(e){return arguments.length?(U=e,B):U},B.labelProperties=function(e){return arguments.length?(H=e,B):H},B.titleProperties=function(e){return arguments.length?(j=e,B):j},B.reset=function(){return t(),B},B}function r(e,t,n,i,r,o,a){var s,l=i?{}:t,u=t.mark.def,c=u.offset,f=u.orient,h=2*u.padding,d="left"===f?0:n.width,p=~~t.bounds.width()+(t.width?0:h),g=~~t.bounds.height()+(t.height?0:h),m=n._legendPositions||(n._legendPositions={right:.5,left:.5});if(l.x=.5,l.y=.5,l.width=p,l.height=g,"left"===f||"right"===f){l.y=m[f],m[f]+=g+u.margin;var y=n.axes,b=n.axisItems,_=v[f];for(s=0;s<y.length;++s)y[s].orient()===f&&(d=Math.max(d,Math.abs(b[s].bounds[_])))}switch(f){case"left":l.x-=d+c+p;break;case"right":l.x+=d+c;break;case"top-left":l.x+=c,l.y+=c;break;case"top-right":l.x+=n.width-p-c,l.y+=c;break;case"bottom-left":l.x+=c,l.y+=n.height-g-c;break;case"bottom-right":l.x+=n.width-p-c,l.y+=n.height-g-c}var E=e.baseline,x=0;for(s=0;s<n.legendItems.length;s++){var w=n.legendItems[s];x+=w.bounds.height()+(t.height?0:h)}"middle"===E?l.y+=c+n.height/2-x/2:"bottom"===E&&(l.y+=c+n.height-x),i&&i.interpolate(t,l);var T=t.mark.def.properties.enter.encode;return T.call(T,t,n,i,r,o,a),!0}function o(e,t,n,i,r,o){var a=e.properties.enter,s=e.properties.update;t&&(a.size=s.size={scale:t.scaleName,field:"data"}),n&&(a.shape=s.shape={scale:n.scaleName,field:"data"}),i&&(a.fill=s.fill={scale:i.scaleName,field:"data"}),r&&(a.stroke=s.stroke={scale:r.scaleName,field:"data"}),o&&(s.opacity={scale:o.scaleName,field:"data"})}function a(e){return{type:"text",interactive:!1,key:"data",properties:{enter:{x:{value:0},y:{value:0},fill:{value:e.titleColor},font:{value:e.titleFont},fontSize:{value:e.titleFontSize},fontWeight:{value:e.titleFontWeight},baseline:{value:"top"},text:{field:"data"},opacity:{value:1e-6}},exit:{opacity:{value:1e-6}},update:{opacity:{value:1}}}}}function s(e){return{type:"symbol",interactive:!1,key:"data",properties:{enter:{x:{field:"offset",mult:.5},y:{scale:"legend",field:"index"},shape:{value:e.symbolShape},size:{value:e.symbolSize},stroke:{value:e.symbolColor},strokeWidth:{value:e.symbolStrokeWidth},opacity:{value:1e-6}},exit:{opacity:{value:1e-6}},update:{x:{field:"offset",mult:.5},y:{scale:"legend",field:"index"},opacity:{value:1}}}}}function l(e){return{type:"text",interactive:!1,key:"data",properties:{enter:{x:{field:"offset",offset:5},y:{scale:"legend",field:"index"},fill:{value:e.labelColor},font:{value:e.labelFont},fontSize:{value:e.labelFontSize},align:{value:e.labelAlign},baseline:{value:e.labelBaseline},text:{field:"label"},opacity:{value:1e-6}},exit:{opacity:{value:1e-6}},update:{opacity:{value:1},x:{field:"offset",offset:5},y:{scale:"legend",field:"index"}}}}}function u(e){return{type:"rect",interactive:!1,properties:{enter:{x:{value:0},y:{value:0},width:{value:e.gradientWidth},height:{value:e.gradientHeight},stroke:{value:e.gradientStrokeColor},strokeWidth:{value:e.gradientStrokeWidth},opacity:{value:1e-6}},exit:{opacity:{value:1e-6}},update:{x:{value:0},y:{value:0},opacity:{value:1}}}}}function c(e){return{type:"text",interactive:!1,key:"data",properties:{enter:{x:{scale:"legend",field:"data"},y:{value:20},dy:{value:2},fill:{value:e.labelColor},font:{value:e.labelFont},fontSize:{value:e.labelFontSize},align:{field:"align"},baseline:{value:"top"},text:{field:"label"},opacity:{value:1e-6}},exit:{opacity:{value:1e-6}},update:{x:{scale:"legend",field:"data"},y:{value:20},opacity:{value:1}}}}}var f="undefined"!=typeof window?window.d3:"undefined"!=typeof n?n.d3:null,h=e("datalib"),d=e("vega-scenegraph").Gradient,p=e("../parse/properties"),g=e("../parse/mark"),m=e("../util"),v={left:"x1",right:"x2","top-left":"x1","top-right":"x2","bottom-left":"x1","bottom-right":"x2"};t.exports=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../parse/mark":99,"../parse/properties":104,"../util":148,datalib:26,"vega-scenegraph":49}],117:[function(e,t,n){t.exports=function i(e,t){var n,r,o,a,s;if(t(e))return!0;var l=["items","axisItems","legendItems"];for(o=0,a=l.length;o<a;++o)if(s=e[l[o]])for(n=0,r=s.length;n<r;++n)if(i(s[n],t))return!0}},{}],118:[function(e,t,n){function i(e){return f.prototype.init.call(this,e),f.addParameters(this,{groupby:{type:"array<field>"},summarize:{type:"custom",set:function(e){function t(e){e.signal&&(u[e.signal]=1)}var n,i,r,a,s,l,u={},f=this._transform;if(!o.isArray(a=e)){a=[];for(s in e)l=o.array(e[s]),a.push({field:s,ops:l})}for(n=0,i=a.length;n<i;++n)r=a[n],r.field.signal&&(u[r.field.signal]=1),o.array(r.ops).forEach(t),o.array(r.as).forEach(t);return f._fields=a,f._aggr=null,f.dependency(c.SIGNALS,o.keys(u)),f}}}),this._aggr=null,this._input=null,this._args=null,this._fields=[],this._out=[],this._type=p.TUPLE,this._acc={groupby:o["true"],value:o["true"]},this.router(!0).produces(!0)}function r(e){var t,n,i,r,o,a,s,l=[];for(o=e._dims,t=0,n=o.length;t<n;++t)l.push(o[t].name);for(a=e._aggr,t=0,n=a.length;t<n;++t)for(s=a[t].measures.fields,i=0,r=s.length;i<r;++i)l.push(s[i]);return l}var o=e("datalib"),a=e("vega-dataflow"),s=e("vega-logging"),l=a.ChangeSet,u=a.Tuple,c=a.Dependencies,f=e("./Transform"),h=e("./Facetor"),d=i.prototype=Object.create(f.prototype);d.constructor=i;var p=i.TYPES={VALUE:1,TUPLE:2,MULTI:3};i.VALID_OPS=["values","count","valid","missing","distinct","sum","mean","average","variance","variancep","stdev","stdevp","median","q1","q3","modeskew","min","max","argmin","argmax"],d.type=function(e){return this._type=e,this},d.accessors=function(e,t){var n=this._acc;n.groupby=o.$(e)||o["true"],n.value=o.$(t)||o["true"]},d.aggr=function(){if(this._aggr)return this._aggr;var e=this._graph,t=!1,n=[],i=this.param("groupby").field,a=function(t){return t.signal?e.signalRef(t.signal):t},s=this._fields.map(function(e){var i={name:a(e.field),as:o.array(e.as),ops:o.array(a(e.ops)).map(a),get:e.get};return t=t||null!=i.get,n.push(i.name),i});i.forEach(function(e){e.get&&(t=!0),n.push(e.name||e)}),this._args=t||!s.length?null:n,s.length||(s={"*":"values"});var l=this._aggr=(new h).groupby(i).stream(!0).summarize(s);return this._out=r(l),this._type!==p.VALUE&&l.key("_id"),l},d.transform=function(e,t){s.debug(e,["aggregate"]);var n,i,r,o,a,c=l.create(e),f=this.aggr(),h=this._out,d=this._args,g=!0,m=u.prev;if(t&&(c.rem.push.apply(c.rem,f.result()),f.clear(),this._aggr=null,f=this.aggr()),this._type===p.TUPLE)n=function(e){f._add(e),u.prev_init(e)},i=function(e){f._rem(m(e))},r=function(e){f._mod(e,m(e))},o=function(e){f._markMod(e,m(e))};else{var v=this._acc.groupby,y=this._acc.value,b=this._type===p.VALUE?y:function(e){return{_id:e._id,groupby:v(e),value:y(e)}};n=function(e){f._add(b(e)),u.prev_init(e)},i=function(e){f._rem(b(m(e)))},r=function(e){f._mod(b(e),b(m(e)))},o=function(e){f._mark(b(e),b(m(e)))}}if(e.add.forEach(n),t)e.mod.forEach(n);else{if(e.rem.forEach(i),d)for(a=0,g=!1;a<d.length;++a)if(e.fields[d[a]]){g=!0;break}e.mod.forEach(g?r:o)}for(a=0;a<h.length;++a)c.fields[h[a]]=1;return f._input=e,f.changes(c)},t.exports=i},{"./Facetor":124,"./Transform":140,datalib:26,"vega-dataflow":41,"vega-logging":48}],119:[function(e,t,n){function i(){this._collector=null}var r=e("./Transform").prototype,o=i.prototype=Object.create(r);o.constructor=i,o.init=function(e){return r.init.call(this,e),this.batch(!0)},o.transform=function(e,t){return this.batchTransform(e,this._collector.data(),t)},o.batchTransform=function(){},t.exports=i},{"./Transform":140}],120:[function(e,t,n){function i(e){return l.prototype.init.call(this,e),s.addParameters(this,{field:{type:"field"},min:{type:"value"},max:{type:"value"},base:{type:"value","default":10},maxbins:{type:"value","default":20},step:{type:"value"},steps:{type:"value"},minstep:{type:"value"},div:{type:"array<value>","default":[5,2]}}),this._output={start:"bin_start",end:"bin_end",mid:"bin_mid"},this.mutates(!0)}var r=e("datalib"),o=e("vega-dataflow").Tuple,a=e("vega-logging"),s=e("./Transform"),l=e("./BatchTransform"),u=i.prototype=Object.create(l.prototype);u.constructor=i,u.extent=function(e){var t,n=[this.param("min"),this.param("max")];return null!=n[0]&&null!=n[1]||(t=r.extent(e,this.param("field").accessor),null==n[0]&&(n[0]=t[0]),null==n[1]&&(n[1]=t[1])),n},u.batchTransform=function(e,t){function n(e){var t=f(e);t=null==t?null:d.start+p*~~((t-d.start)/p),o.set(e,s.start,t),o.set(e,s.end,t+p),o.set(e,s.mid,t+p/2)}a.debug(e,["binning"]);var i=this.extent(t),s=this._output,l=this.param("step"),u=this.param("steps"),c=this.param("minstep"),f=this.param("field").accessor,h={min:i[0],max:i[1],base:this.param("base"),maxbins:this.param("maxbins"),div:this.param("div")};l&&(h.step=l),u&&(h.steps=u),c&&(h.minstep=c);var d=r.bins(h),p=d.step;return e.add.forEach(n),e.mod.forEach(n),e.rem.forEach(n),e.fields[s.start]=1,e.fields[s.end]=1,e.fields[s.mid]=1,e},t.exports=i},{"./BatchTransform":119,"./Transform":140,datalib:26,"vega-dataflow":41,"vega-logging":48}],121:[function(e,t,n){function i(e){return s.prototype.init.call(this,e),s.addParameters(this,{field:{type:"field","default":"data"},pattern:{type:"value","default":"[\\w']+"},"case":{type:"value","default":"lower"},stopwords:{type:"value","default":""}}),this._output={text:"text",count:"count"},this.router(!0).produces(!0)}var r=e("vega-dataflow"),o=r.Tuple,a=e("vega-logging"),s=e("./Transform"),l=i.prototype=Object.create(s.prototype);l.constructor=i,l.transform=function(e,t){function n(e){return o.prev_init(e),r(e)}function i(e){return r(o.prev(e))}a.debug(e,["countpattern"]);var r=this.param("field").accessor,s=this.param("pattern"),l=this.param("stopwords"),u=!1;return this._stop!==l&&(this._stop=l,this._stop_re=new RegExp("^"+l+"$","i"),t=!0),this._pattern!==s&&(this._pattern=s,this._match=new RegExp(this._pattern,"g"),t=!0),t&&(this._counts={}),this._add(e.add,n),t||this._rem(e.rem,i),(t||(u=e.fields[r.field]))&&(u&&this._rem(e.mod,i),this._add(e.mod,n)),this._changeset(e)},l._changeset=function(e){var t,n,i,a=this._counts,s=this._tuples||(this._tuples={}),l=r.ChangeSet.create(e),u=this._output;for(t in a)n=s[t],i=a[t]||0,!n&&i?(s[t]=n=o.ingest({}),n[u.text]=t,n[u.count]=i,l.add.push(n)):0===i?(n&&l.rem.push(n),delete a[t],delete s[t]):n[u.count]!==i&&(o.set(n,u.count,i),l.mod.push(n));return l},l._tokenize=function(e){switch(this.param("case")){case"upper":e=e.toUpperCase();break;case"lower":e=e.toLowerCase()}return e.match(this._match)},l._add=function(e,t){var n,i,r,o,a=this._counts,s=this._stop_re;for(r=0;r<e.length;++r)for(n=this._tokenize(t(e[r])),i=0;i<n.length;++i)s.test(o=n[i])||(a[o]=1+(a[o]||0))},l._rem=function(e,t){var n,i,r,o,a=this._counts,s=this._stop_re;for(r=0;r<e.length;++r)for(n=this._tokenize(t(e[r])),i=0;i<n.length;++i)s.test(o=n[i])||(a[o]-=1)},t.exports=i},{"./Transform":140,"vega-dataflow":41,"vega-logging":48}],122:[function(e,t,n){function i(e){return m.prototype.init.call(this,e),g.addParameters(this,{"with":{type:"data"},diagonal:{type:"value","default":"true"},filter:{type:"expr"}}),this._output={left:"a",right:"b"},this._lastWith=null,this._cids={},this._cache={},this.router(!0).produces(!0)}function r(e,t){var n=this._cache,i=n[e._id]||(n[e._id]={c:[],f:!1});i.c.push(t)}function o(e,t,n){return e?t._id+"_"+n._id:n._id+"_"+t._id}function a(e,t,n,i,a,s,l){for(var u,c,f=this._output,h=this._cache,p=this._cids,g=e.add,m=!1,v=0,y=n.length,b={};v<y;++v)u=n[v],c=o(t,l,u),p[c]||(l._id!==u._id||i)&&(d.set(b,f.left,t?l:u),d.set(b,f.right,t?u:l),!a||a(b)?(g.push(b=d.ingest(b)),r.call(this,l,b),l._id!==u._id&&r.call(this,u,b),s[b._id]=1,p[c]=!0,b={}):(h[u._id]&&(h[u._id].f=!0),m=!0));h[l._id]&&(h[l._id].f=m)}function s(e,t,n,i,r,s,l,u){var c,f,h,d,p,g=this._output,m=this._cache,v=this._cids,y=m[u._id],b=y&&y.c,_=!y||y.f,E=e.mod,x=e.rem;if(b)for(c=b.length-1;c>=0;--c)if(f=b[c],d=u===f[g.left],h=d?f[g.right]:f[g.left],p=o(d,u,h),m[h._id])if(!r||r(f)){if(s[f._id])continue;E.push(f),s[f._id]=1}else l[f._id]||x.push.apply(x,b.splice(c,1)),l[f._id]=1,v[p]=!1,y.f=!0;else v[p]=!1,b.splice(c,1);r&&_&&a.call(this,e,t,n,i,r,s,u)}function l(e,t,n,i){var r,a,s,l,u,c=this._output,f=this._cache[i._id],h=this._cids,d=e.rem;if(f){for(r=0,a=f.c.length;r<a;++r)s=f.c[r],u=i===s[c.left],l=u?s[c.right]:s[c.left],h[o(u,i,l)]=!1,n[s._id]||(d.push(s),n[s._id]=1);this._cache[i._id]=null}}function u(e,t){var n,i,r,o,a,s,l=this._cache,u=c.keys(l),f=e.rem;for(n=0,i=u.length;n<i;++n)for(a=l[u[n]],r=0,o=a.c.length;r<o;++r)s=a.c[r],t[s._id]||(f.push(s),t[s._id]=1);this._cache={},this._cids={},this._lastWith=null}var c=e("datalib"),f=e("vega-dataflow"),h=f.ChangeSet,d=f.Tuple,p=e("vega-logging"),g=e("./Transform"),m=e("./BatchTransform"),v=i.prototype=Object.create(m.prototype);v.constructor=i,v.batchTransform=function(e,t,n){p.debug(e,["crossing"]);var i=this.param("with"),r=this.param("diagonal"),o=this._output,c=this.param("filter")||null,f=!i.name,d=f?e:i.source.last(),g=f?t:i.source.values(),m=h.create(e),v={},y={};return n?(u.call(this,m,y),t.forEach(a.bind(this,m,!0,g,r,c,v)),this._lastWith=d.stamp):(e.rem.forEach(l.bind(this,m,!0,y)),e.add.forEach(a.bind(this,m,!0,g,r,c,v)),d.stamp>this._lastWith&&(d.rem.forEach(l.bind(this,m,!1,y)),d.add.forEach(a.bind(this,m,!1,t,r,c,v)),d.mod.forEach(s.bind(this,m,!1,t,r,c,v,y)),this._lastWith=d.stamp),e.mod.forEach(s.bind(this,m,!0,g,r,c,v,y))),m.fields[o.left]=1,m.fields[o.right]=1,m},t.exports=i},{"./BatchTransform":119,"./Transform":140,datalib:26,"vega-dataflow":41,"vega-logging":48}],123:[function(e,t,n){function i(t){return r.addParameters(this,{transform:{type:"custom",set:function(e){return this._transform._pipeline=e,this._transform},get:function(){var t=e("../parse/transforms"),n=this._transform;return n._pipeline.map(function(e){return t(n._graph,e)})}}}),this._pipeline=[],o.call(this,t)}var r=e("./Transform"),o=e("./Aggregate"),a=i.prototype=Object.create(o.prototype);a.constructor=i,a.aggr=function(){return o.prototype.aggr.call(this).facet(this)},a.transform=function(e,t){var n=o.prototype.transform.call(this,e,t);return e.add.length&&this.listeners()[0].rerank(),n},t.exports=i},{"../parse/transforms":108,"./Aggregate":118,"./Transform":140}],124:[function(e,t,n){function i(){a.call(this),this._facet=null,this._facetID=++f}function r(e){c.debug({},["disconnecting cell",this.tuple._id]);var t=this.ds.pipeline();e.removeListener(t[0]),e._graph.removeListener(t[0]),e._graph.disconnect(t)}var o=e("datalib"),a=o.Aggregator,s=a.prototype,l=e("vega-dataflow"),u=l.Tuple,c=e("vega-logging"),f=0,h=i.prototype=Object.create(s);h.constructor=i,h.facet=function(e){return arguments.length?(this._facet=e,this):this._facet},h._ingest=function(e){return u.ingest(e,null)},h._assign=u.set,h._newcell=function(e,t){var n=s._newcell.call(this,e,t),i=this._facet;if(i){var o=i._graph,a=n.tuple,l=i.param("transform");n.ds=o.data(a._facetID,l,a),n.disconnect=r,i.addListener(l[0])}return n},h._newtuple=function(e,t){var n=s._newtuple.call(this,e);return this._facet&&(u.set(n,"key",t),u.set(n,"_facetID",this._facetID+"_"+t)),n},h.clear=function(){if(this._facet)for(var e in this._cells)this._cells[e].disconnect(this._facet);return s.clear.call(this)},h._on_add=function(e,t){this._facet&&t.ds._input.add.push(e)},h._on_rem=function(e,t){this._facet&&t.ds._input.rem.push(e)},h._on_mod=function(e,t,n,i){this._facet&&(n===i?n.ds._input.mod.push(e):(n.ds._input.rem.push(e),i.ds._input.add.push(e)))},h._on_drop=function(e){this._facet&&e.disconnect(this._facet)},h._on_keep=function(e){this._facet&&l.ChangeSet.copy(this._input,e.ds._input);
},t.exports=i},{datalib:26,"vega-dataflow":41,"vega-logging":48}],125:[function(e,t,n){function i(e){return a.prototype.init.call(this,e),a.addParameters(this,{test:{type:"expr"}}),this._skip={},this.router(!0)}var r=e("vega-dataflow"),o=e("vega-logging"),a=e("./Transform"),s=i.prototype=Object.create(a.prototype);s.constructor=i,s.transform=function(e){o.debug(e,["filtering"]);var t=r.ChangeSet.create(e),n=this._skip,i=this.param("test");return e.rem.forEach(function(e){1!==n[e._id]?t.rem.push(e):n[e._id]=0}),e.add.forEach(function(e){i(e)?t.add.push(e):n[e._id]=1}),e.mod.forEach(function(e){var r=i(e),o=1===n[e._id];r&&o?(n[e._id]=0,t.add.push(e)):r&&!o?t.mod.push(e):!r&&o||(t.rem.push(e),n[e._id]=1)}),t},t.exports=i},{"./Transform":140,"vega-dataflow":41,"vega-logging":48}],126:[function(e,t,n){function i(e){return s.prototype.init.call(this,e),s.addParameters(this,{fields:{type:"array<field>"}}),this._output={key:"key",value:"value"},this._cache={},this.router(!0).produces(!0)}var r=e("vega-dataflow"),o=r.Tuple,a=e("vega-logging"),s=e("./Transform"),l=i.prototype=Object.create(s.prototype);l.constructor=i,l._reset=function(e,t){for(var n in this._cache)t.rem.push.apply(t.rem,this._cache[n]);this._cache={}},l._tuple=function(e,t,n){var i=this._cache[e._id]||(this._cache[e._id]=Array(n));return i[t]?o.rederive(e,i[t]):i[t]=o.derive(e)},l._fn=function(e,t,n){var i,r,a,s,l,u;for(i=0,a=e.length;i<a;++i)for(l=e[i],r=0,s=t.field.length;r<s;++r)u=this._tuple(l,r,s),o.set(u,this._output.key,t.field[r]),o.set(u,this._output.value,t.accessor[r](l)),n.push(u)},l.transform=function(e,t){a.debug(e,["folding"]);var n=this,i=this.param("fields"),o=r.ChangeSet.create(e);return t&&this._reset(e,o),this._fn(e.add,i,o.add),this._fn(e.mod,i,t?o.add:o.mod),e.rem.forEach(function(e){o.rem.push.apply(o.rem,n._cache[e._id]),n._cache[e._id]=null}),(e.add.length||e.rem.length||i.field.some(function(t){return!!e.fields[t]}))&&(o.fields[this._output.key]=1,o.fields[this._output.value]=1),o},t.exports=i},{"./Transform":140,"vega-dataflow":41,"vega-logging":48}],127:[function(e,t,n){(function(n){function i(t){return u.prototype.init.call(this,t),this._prev=null,this._interactive=!1,this._setup=!0,this._nodes=[],this._links=[],this._layout=r.layout.force(),u.addParameters(this,{size:{type:"array<value>","default":e("./screen").size},bound:{type:"value","default":!0},links:{type:"data"},linkStrength:{type:"value","default":1},linkDistance:{type:"value","default":20},charge:{type:"value","default":-30},chargeDistance:{type:"value","default":1/0},friction:{type:"value","default":.9},theta:{type:"value","default":.8},gravity:{type:"value","default":.1},alpha:{type:"value","default":.1},iterations:{type:"value","default":500},interactive:{type:"value","default":this._interactive},active:{type:"value","default":this._prev},fixed:{type:"data"}}),this._output={x:"layout_x",y:"layout_y"},this.mutates(!0)}var r="undefined"!=typeof window?window.d3:"undefined"!=typeof n?n.d3:null,o=e("vega-dataflow"),a=o.Tuple,s=o.ChangeSet,l=e("vega-logging"),u=e("./Transform"),c=i.prototype=Object.create(u.prototype);c.constructor=i,c.transform=function(e,t){l.debug(e,["force"]),t-=e.signals.active?1:0;var n=this.param("interactive"),i=this.param("links").source,r=i.last(),o=this.param("active"),s=this._output,u=this._layout,c=this._nodes,f=this._links;if(r.stamp<e.stamp&&(r=null),this.configure(e,r,n,t),!n){for(var h=this.param("iterations"),d=0;d<h;++d)u.tick();u.stop()}return this.update(o),(t||o!==this._prev&&o&&o.update)&&u.alpha(this.param("alpha")),o!==this._prev&&(this._prev=o),e.rem.length&&u.nodes(this._nodes=a.idFilter(c,e.rem)),r&&r.rem.length&&u.links(this._links=a.idFilter(f,r.rem)),e.fields[s.x]=1,e.fields[s.y]=1,e},c.configure=function(e,t,n,i){var r=this._layout,o=this._setup||e.add.length||t&&t.add.length||n!==this._interactive||this.param("charge")!==r.charge()||this.param("linkStrength")!==r.linkStrength()||this.param("linkDistance")!==r.linkDistance();if((o||i)&&r.size(this.param("size")).chargeDistance(this.param("chargeDistance")).theta(this.param("theta")).gravity(this.param("gravity")).friction(this.param("friction")),o){this._setup=!1,this._interactive=n;var a,l,u=this,c=this._graph,f=this._nodes,h=this._links;for(a=e.add,l=0;l<a.length;++l)f.push({tuple:a[l]});if(t)for(a=t.add,l=0;l<a.length;++l)h.push({tuple:a[l],source:f[a[l].source],target:f[a[l].target]});var d=n?function(){c.propagate(s.create(null,!0),u)}:null;r.linkStrength(this.param("linkStrength")).linkDistance(this.param("linkDistance")).charge(this.param("charge")).nodes(f).links(h).on("tick",d).start().alpha(this.param("alpha"))}},c.update=function(e){var t,n,i,r,o,s,l=this._output,u=this.param("bound"),c=this.param("fixed"),f=this.param("size"),h=this._nodes,d={};if(c&&c.source)for(c=c.source.values(),n=0,i=c.length;n<i;++n)d[c[n].id]=1;for(n=0;n<h.length;++n)i=h[n],r=i.tuple,t=r._id,e&&e.id===t?(i.fixed=1,e.update&&(i.x=i.px=e.x,i.y=i.py=e.y)):i.fixed=d[t]||0,o=u?Math.max(0,Math.min(i.x,f[0])):i.x,s=u?Math.max(0,Math.min(i.y,f[1])):i.y,a.set(r,l.x,o),a.set(r,l.y,s)},t.exports=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./Transform":140,"./screen":146,"vega-dataflow":41,"vega-logging":48}],128:[function(e,t,n){function i(e){return s.prototype.init.call(this,e),s.addParameters(this,{field:{type:"value"},expr:{type:"expr"}}),this.mutates(!0)}var r=e("vega-dataflow"),o=r.Tuple,a=e("vega-logging"),s=e("./Transform"),l=i.prototype=Object.create(s.prototype);l.constructor=i,l.transform=function(e){function t(e){o.set(e,n,i(e)),r=!0}a.debug(e,["formulating"]);var n=this.param("field"),i=this.param("expr"),r=!1;return e.add.forEach(t),this.reevaluate(e)&&e.mod.forEach(t),r&&(e.fields[n]=1),e},t.exports=i},{"./Transform":140,"vega-dataflow":41,"vega-logging":48}],129:[function(e,t,n){(function(n){function i(e){return l.prototype.init.call(this,e),l.addParameters(this,i.Parameters),l.addParameters(this,{lon:{type:"field"},lat:{type:"field"}}),this._output={x:"layout_x",y:"layout_y"},this.mutates(!0)}var r="undefined"!=typeof window?window.d3:"undefined"!=typeof n?n.d3:null,o=e("datalib"),a=e("vega-dataflow").Tuple,s=e("vega-logging"),l=e("./Transform");i.Parameters={projection:{type:"value","default":"mercator"},center:{type:"array<value>"},translate:{type:"array<value>","default":e("./screen").center},rotate:{type:"array<value>"},scale:{type:"value"},precision:{type:"value"},clipAngle:{type:"value"},clipExtent:{type:"value"}},i.d3Projection=function(){var e,t,n,a=this.param("projection"),s=i.Parameters;a!==this._mode&&(this._mode=a,this._projection=r.geo[a]()),e=this._projection;for(t in s)"projection"!==t&&e[t]&&(n=this.param(t),void 0===n||o.isArray(n)&&0===n.length||n!==e[t]()&&e[t](n));return e};var u=i.prototype=Object.create(l.prototype);u.constructor=i,u.transform=function(e){function t(e){var t=[r(e),o(e)],i=l(t)||[null,null];a.set(e,n.x,i[0]),a.set(e,n.y,i[1])}s.debug(e,["geo"]);var n=this._output,r=this.param("lon").accessor,o=this.param("lat").accessor,l=i.d3Projection.call(this);return e.add.forEach(t),this.reevaluate(e)&&(e.mod.forEach(t),e.rem.forEach(t)),e.fields[n.x]=1,e.fields[n.y]=1,e},t.exports=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./Transform":140,"./screen":146,datalib:26,"vega-dataflow":41,"vega-logging":48}],130:[function(e,t,n){(function(n){function i(e){return u.prototype.init.call(this,e),u.addParameters(this,l.Parameters),u.addParameters(this,{field:{type:"field","default":null}}),this._output={path:"layout_path"},this.mutates(!0)}var r="undefined"!=typeof window?window.d3:"undefined"!=typeof n?n.d3:null,o=e("datalib"),a=e("vega-dataflow").Tuple,s=e("vega-logging"),l=e("./Geo"),u=e("./Transform"),c=i.prototype=Object.create(u.prototype);c.constructor=i,c.transform=function(e){function t(e){a.set(e,n.path,c(i(e)))}s.debug(e,["geopath"]);var n=this._output,i=this.param("field").accessor||o.identity,u=l.d3Projection.call(this),c=r.geo.path().projection(u);return e.add.forEach(t),this.reevaluate(e)&&(e.mod.forEach(t),e.rem.forEach(t)),e.fields[n.path]=1,e},t.exports=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./Geo":129,"./Transform":140,datalib:26,"vega-dataflow":41,"vega-logging":48}],131:[function(e,t,n){(function(n){function i(t){return u.prototype.init.call(this,t),l.addParameters(this,{sort:{type:"array<field>","default":null},children:{type:"field","default":"children"},parent:{type:"field","default":"parent"},field:{type:"value","default":null},mode:{type:"value","default":"tidy"},size:{type:"array<value>","default":e("./screen").size},nodesize:{type:"array<value>","default":null},orient:{type:"value","default":"cartesian"}}),this._mode=null,this._output={x:"layout_x",y:"layout_y",width:"layout_width",height:"layout_height",depth:"layout_depth"},this.mutates(!0)}var r="undefined"!=typeof window?window.d3:"undefined"!=typeof n?n.d3:null,o=e("datalib"),a=e("vega-dataflow").Tuple,s=e("vega-logging"),l=e("./Transform"),u=e("./BatchTransform"),c="partition",f={cartesian:function(e,t){return e.parent===t.parent?1:2},radial:function(e,t){return(e.parent===t.parent?1:2)/e.depth}},h=i.prototype=Object.create(u.prototype);h.constructor=i,h.batchTransform=function(e,t){s.debug(e,["hierarchy layout"]);var n=this._layout,i=this._output,l=this.param("mode"),u=this.param("sort"),h=this.param("nodesize"),d=this.param("parent").accessor,p=t.filter(function(e){return null===d(e)})[0];return l!==this._mode&&(this._mode=l,"tidy"===l&&(l="tree"),n=this._layout=r.layout[l]()),e.fields[i.x]=1,e.fields[i.y]=1,e.fields[i.depth]=1,l===c?(e.fields[i.width]=1,e.fields[i.height]=1,n.value(this.param("field").accessor)):n.separation(f[this.param("orient")]),h.length&&l!==c?n.nodeSize(h):n.size(this.param("size")),n.sort(u.field.length?o.comparator(u.field):null).children(this.param("children").accessor).nodes(p),t.forEach(function(e){a.set(e,i.x,e.x),a.set(e,i.y,e.y),a.set(e,i.depth,e.depth),l===c&&(a.set(e,i.width,e.dx),a.set(e,i.height,e.dy))}),e},t.exports=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./BatchTransform":119,"./Transform":140,"./screen":146,datalib:26,"vega-dataflow":41,"vega-logging":48}],132:[function(e,t,n){function i(e){return c.prototype.init.call(this,e),u.addParameters(this,{groupby:{type:"array<field>"},orderby:{type:"array<field>"},field:{type:"field"},method:{type:"value","default":"value"},value:{type:"value","default":0}}),this.router(!0).produces(!0)}function r(e,t,n,i){var r,o={_imputed:!0};for(r=0;r<t.length;++r)o[e[r]]=t[r];for(r=0;r<i.length;++r)o[n[r]]=i[r];return l.ingest(o)}function o(e,t,n){var i,r,o,s,l,u,c,f,h=[],d=function(e){return e(o)},p=function(e){return o=e,n.map(d)};for(u=h.domain=a.unique(e,p),f=u.length,c=u.reduce(function(e,t,n){return e[t]={value:t,index:n},e},{}),i={},r=0;r<e.length;++r)o=e[r],s=null==t?[]:t.map(d),l=i[s]||(h.push(i[s]=Array(f)),i[s].values=s,i[s]),l[c[p(o)].index]=o;return h}var a=e("datalib"),s=e("vega-logging"),l=e("vega-dataflow").Tuple,u=e("./Transform"),c=e("./BatchTransform"),f=i.prototype=Object.create(c.prototype);f.constructor=i,f.batchTransform=function(e,t){function n(e){return null==e?null:y(e)}s.debug(e,["imputing"]);var i,l,u,c,f,h,d=this.param("groupby"),p=this.param("orderby"),g=this.param("method"),m=this.param("value"),v=this.param("field"),y=v.accessor,b=v.field,_=this._imputed||[],E=[],x=o(t,d.accessor,p.accessor),w=x.domain;for(u=0,f=x.length;u<f;++u)for(i=x[u],"value"!==g&&(m=a[g](i,n)),l=0,c=i.length;l<c;++l)null==i[l]&&(h=r(d.field,i.values,p.field,w[l]),h[b]=m,E.push(h));for(l=0,c=E.length;l<c;++l)e.add.push(E[l]);for(l=0,c=_.length;l<c;++l)e.rem.push(_[l]);return this._imputed=E,e},t.exports=i},{"./BatchTransform":119,"./Transform":140,datalib:26,"vega-dataflow":41,"vega-logging":48}],133:[function(e,t,n){function i(e){return p.prototype.init.call(this,e),p.addParameters(this,{sourceX:{type:"field","default":"_source.layout_x"},sourceY:{type:"field","default":"_source.layout_y"},targetX:{type:"field","default":"_target.layout_x"},targetY:{type:"field","default":"_target.layout_y"},tension:{type:"value","default":.2},shape:{type:"value","default":"line"}}),this._output={path:"layout_path"},this.mutates(!0)}function r(e,t,n,i){return"M"+e+","+t+"L"+n+","+i}function o(e,t,n,i,r){var o=n-e,a=i-t,s=r*(o+a),l=r*(a-o);return"M"+e+","+t+"C"+(e+s)+","+(t+l)+" "+(n+l)+","+(i-s)+" "+n+","+i}function a(e,t,n,i){return"M"+e+","+t+"V"+i+"H"+n}function s(e,t,n,i){return"M"+e+","+t+"H"+n+"V"+i}function l(e,t,n,i){var r=Math.cos(e),o=Math.sin(e),a=Math.cos(n),s=Math.sin(n),l=Math.abs(n-e)>Math.PI?n<=e:n>e;return"M"+t*r+","+t*o+"A"+t+","+t+" 0 0,"+(l?1:0)+" "+t*a+","+t*s+"L"+i*a+","+i*s}function u(e,t,n,i){var r=(e+n)/2;return"M"+e+","+t+"C"+r+","+t+" "+r+","+i+" "+n+","+i}function c(e,t,n,i){var r=(t+i)/2;return"M"+e+","+t+"C"+e+","+r+" "+n+","+r+" "+n+","+i}function f(e,t,n,i){var r=Math.cos(e),o=Math.sin(e),a=Math.cos(n),s=Math.sin(n),l=(t+i)/2;return"M"+t*r+","+t*o+"C"+l*r+","+l*o+" "+l*a+","+l*s+" "+i*a+","+i*s}var h=e("vega-dataflow").Tuple,d=e("vega-logging"),p=e("./Transform"),g=i.prototype=Object.create(p.prototype);g.constructor=i;var m={line:r,curve:o,cornerX:a,cornerY:s,cornerR:l,diagonalX:u,diagonalY:c,diagonalR:f};g.transform=function(e){function t(e){var t=i(r(e),o(e),a(e),s(e),l);h.set(e,n.path,t)}d.debug(e,["linkpath"]);var n=this._output,i=m[this.param("shape")]||m.line,r=this.param("sourceX").accessor,o=this.param("sourceY").accessor,a=this.param("targetX").accessor,s=this.param("targetY").accessor,l=this.param("tension");return e.add.forEach(t),this.reevaluate(e)&&(e.mod.forEach(t),e.rem.forEach(t)),e.fields[n.path]=1,e},t.exports=i},{"./Transform":140,"vega-dataflow":41,"vega-logging":48}],134:[function(e,t,n){function i(e){return a.prototype.init.call(this,e),a.addParameters(this,{on:{type:"data"},onKey:{type:"field","default":null},as:{type:"array<value>"},keys:{type:"array<field>","default":["data"]},"default":{type:"value"}}),this.mutates(!0)}var r=e("vega-dataflow").Tuple,o=e("vega-logging"),a=e("./Transform"),s=i.prototype=Object.create(a.prototype);s.constructor=i,s.transform=function(e,t){function n(e){for(var t=0;t<d.length;++t){var n=m[d[t](e)]||g;r.set(e,p[t],n)}}o.debug(e,["lookup"]);var i,a,s=this.param("on"),l=s.source.last(),u=s.source.values(),c=this.param("onKey"),f=c.field,h=this.param("keys"),d=h.accessor,p=this.param("as"),g=this.param("default"),m=this._lut;if(null==m||this._on!==f||f&&l.fields[f]||l.add.length||l.rem.length){if(f)for(c=c.accessor,m={},i=0;i<u.length;++i)m[c(a=u[i])]=a;else m=u;this._lut=m,this._on=f,t=!0}e.add.forEach(n);var v=h.field.some(function(t){return e.fields[t]});return(v||t)&&(e.mod.forEach(n),e.rem.forEach(n)),p.forEach(function(t){e.fields[t]=1}),e},t.exports=i},{"./Transform":140,"vega-dataflow":41,"vega-logging":48}],135:[function(e,t,n){function i(e,t,n){this._name=e,this._type=t,this._transform=n,this._value=[],this._accessors=[],this._resolution=!1,this._signals=[]}function r(){var e=s.test(this._type),t=l.test(this._type),n=u.test(this._type),i=e?this._value:this._value[0],r=e?this._accessors:this._accessors[0];return!o.isValid(r)&&f.test(this._type)?i:t?{name:i,source:r}:n?{field:i,accessor:r}:i}var o=e("datalib"),a=e("vega-dataflow").Dependencies,s=/array/i,l=/data/i,u=/field/i,c=/expr/i,f=/value/i,h=i.prototype;h.get=function(){var e,t,n,i,a,s=this._transform._graph,c=l.test(this._type),f=u.test(this._type);if(!this._resolution)return r.call(this);if(c)return this._accessors=this._value.map(function(e){return s.data(e)}),r.call(this);for(e=0,t=this._signals.length;e<t;++e)n=this._signals[e],i=n.index,a=n.value(s),f&&(this._accessors[i]=this._value[i]!=a?o.accessor(a):this._accessors[i]),this._value[i]=a;return r.call(this)},h.set=function(e){var t=this,n=t._transform._graph,i=c.test(this._type),r=l.test(this._type),s=u.test(this._type);return t._signals=[],this._value=o.array(e).map(function(e,l){var u;return o.isString(e)?i?(u=n.expr(e),t._transform.dependency(a.FIELDS,u.fields),t._transform.dependency(a.SIGNALS,u.globals),t._transform.dependency(a.DATA,u.dataSources),u.fn):(s?(t._accessors[l]=o.accessor(e),t._transform.dependency(a.FIELDS,o.field(e))):r&&(t._resolution=!0,t._transform.dependency(a.DATA,e)),e):void 0!==e.value?e.value:void 0!==e.field?(t._accessors[l]=o.accessor(e.field),t._transform.dependency(a.FIELDS,o.field(e.field)),e.field):void 0!==e.signal?(t._resolution=!0,t._transform.dependency(a.SIGNALS,o.field(e.signal)[0]),t._signals.push({index:l,value:function(t){return t.signalRef(e.signal)}}),e.signal):void 0!==e.expr?(t._resolution=!0,u=n.expr(e.expr),t._transform.dependency(a.SIGNALS,u.globals),t._signals.push({index:l,value:function(){return u.fn()}}),e.expr):e}),t._transform},t.exports=i},{datalib:26,"vega-dataflow":41}],136:[function(e,t,n){function i(e){return u.prototype.init.call(this,e),l.addParameters(this,{field:{type:"field","default":null},startAngle:{type:"value","default":0},endAngle:{type:"value","default":2*Math.PI},sort:{type:"value","default":!1}}),this._output={start:"layout_start",end:"layout_end",mid:"layout_mid"},this.mutates(!0)}function r(){return 1}var o=e("datalib"),a=e("vega-dataflow").Tuple,s=e("vega-logging"),l=e("./Transform"),u=e("./BatchTransform"),c=i.prototype=Object.create(u.prototype);c.constructor=i,c.batchTransform=function(e,t){s.debug(e,["pie"]);var n,i,l,u=this._output,c=this.param("field").accessor||r,f=this.param("startAngle"),h=this.param("endAngle"),d=this.param("sort"),p=t.map(c),g=f,m=(h-f)/o.sum(p),v=o.range(t.length);for(d&&v.sort(function(e,t){return p[e]-p[t]}),n=0;n<v.length;++n)i=t[v[n]],l=p[v[n]],a.set(i,u.start,g),a.set(i,u.mid,g+.5*l*m),a.set(i,u.end,g+=l*m);return e.fields[u.start]=1,e.fields[u.end]=1,e.fields[u.mid]=1,e},t.exports=i},{"./BatchTransform":119,"./Transform":140,datalib:26,"vega-dataflow":41,"vega-logging":48}],137:[function(e,t,n){function i(e){return s.prototype.init.call(this,e),a.addParameters(this,{field:{type:"field","default":null},normalize:{type:"value","default":!1}}),this._output={rank:"rank"},this.mutates(!0)}var r=e("vega-dataflow").Tuple,o=e("vega-logging"),a=e("./Transform"),s=e("./BatchTransform"),l=i.prototype=Object.create(s.prototype);l.constructor=i,l.batchTransform=function(e,t){o.debug(e,["rank"]);var n,i,a,s,l=this._output.rank,u=this.param("normalize"),c=this.param("field").accessor,f={},h=t.length;if(c)for(n=0,i=0;n<h;++n)a=t[n],f[s=c(a)]=f[s]||(f[s]=++i);for(n=0;n<h&&(a=t[n]);++n)c&&(s=c(a))?r.set(a,l,u?f[s]/i:f[s]):r.set(a,l,u?(n+1)/h:n+1);return e.fields[l]=1,e},t.exports=i},{"./BatchTransform":119,"./Transform":140,"vega-dataflow":41,"vega-logging":48}],138:[function(e,t,n){function i(e){a.prototype.init.call(this,e),a.addParameters(this,{by:{type:"array<field>"}}),this.router(!0)}var r=e("datalib"),o=e("vega-logging"),a=e("./Transform"),s=i.prototype=Object.create(a.prototype);s.constructor=i,s.transform=function(e){return o.debug(e,["sorting"]),(e.add.length||e.mod.length||e.rem.length)&&(e.sort=r.comparator(this.param("by").field)),e},t.exports=i},{"./Transform":140,datalib:26,"vega-logging":48}],139:[function(e,t,n){function i(e){return u.prototype.init.call(this,e),l.addParameters(this,{groupby:{type:"array<field>"},sortby:{type:"array<field>"},field:{type:"field"},offset:{type:"value","default":"zero"}}),this._output={start:"layout_start",end:"layout_end",mid:"layout_mid"},this.mutates(!0)}function r(e,t,n,i){var r,o,a,s,l,u,c,f=[],h=function(e){return e(a)};if(null==t)f.push(e.slice());else for(r={},o=0;o<e.length;++o)a=e[o],s=t.map(h),l=r[s]||(f.push(r[s]=[]),r[s]),l.push(a);for(s=0,c=0;s<f.length;++s){for(l=f[s],o=0,u=0;o<l.length;++o)u+=i(l[o]);l.sum=u,u>c&&(c=u),null!=n&&l.sort(n)}return f.max=c,f}var o=e("datalib"),a=e("vega-dataflow").Tuple,s=e("vega-logging"),l=e("./Transform"),u=e("./BatchTransform"),c=i.prototype=Object.create(u.prototype);c.constructor=i,c.batchTransform=function(e,t){s.debug(e,["stacking"]);for(var n=this.param("groupby").accessor,i=o.comparator(this.param("sortby").field),l=this.param("field").accessor,u=this.param("offset"),c=this._output,f=r(t,n,i,l),h=0,d=f.max;h<f.length;++h){var p,g,m,v=f[h],y=v.sum,b="center"===u?(d-y)/2:0,_="normalize"===u?1/y:1,E=b,x=0;for(p=0;p<v.length;++p)g=v[p],m=E,x+=l(g),E=_*x+b,a.set(g,c.start,m),a.set(g,c.end,E),a.set(g,c.mid,.5*(m+E))}return e.fields[c.start]=1,e.fields[c.end]=1,e.fields[c.mid]=1,e},t.exports=i},{"./BatchTransform":119,"./Transform":140,datalib:26,"vega-dataflow":41,"vega-logging":48}],140:[function(e,t,n){function i(e){e&&o.init.call(this,e)}var r=e("vega-dataflow"),o=r.Node.prototype,a=r.Dependencies,s=e("./Parameter");i.addParameters=function(e,t){e._parameters=e._parameters||{};for(var n in t){var i=t[n],r=new s(n,i.type,e);e._parameters[n]=r,"custom"===i.type&&(i.set&&(r.set=i.set.bind(r)),i.get&&(r.get=i.get.bind(r))),i.hasOwnProperty("default")&&r.set(i["default"])}};var l=i.prototype=Object.create(o);l.constructor=i,l.param=function(e,t){var n=this._parameters[e];return void 0===n?this:1===arguments.length?n.get():n.set(t)},l.transform=function(e){return e},l.evaluate=function(e){var t=this._stamp<e.stamp&&this.dependency(a.SIGNALS).reduce(function(t,n){return t+=e.signals[n]?1:0},0);return this.transform(e,t)},l.output=function(e){for(var t in this._output)void 0!==e[t]&&(this._output[t]=e[t]);return this},t.exports=i},{"./Parameter":135,"vega-dataflow":41}],141:[function(e,t,n){function i(e){return l.prototype.init.call(this,e),s.addParameters(this,{groupby:{type:"array<field>"}}),this._output={children:"children",parent:"parent"},this.router(!0).produces(!0)}var r=e("datalib"),o=e("vega-dataflow").Tuple,a=e("vega-logging"),s=e("./Transform"),l=e("./BatchTransform"),u=i.prototype=Object.create(l.prototype);u.constructor=i,u.batchTransform=function(e,t){function n(e,t,i){var r=h[e].execute(i);t[u]=r,r.forEach(function(i){i[c]=t,p.push(o.ingest(i)),e+1<l.length?n(e+1,i,i[u]):i[u].forEach(function(e){e[c]=i})})}a.debug(e,["treeifying"]);var i,s,l=this.param("groupby").field,u=this._output.children,c=this._output.parent,f=[{name:"*",ops:["values"],as:[u]}],h=l.map(function(e){return r.groupby(e).summarize(f)}),d=this._internal||[],p=[],g=o.ingest({});for(g[c]=null,p.push(g),n(0,g,t),i=0,s=p.length;i<s;++i)e.add.push(p[i]);for(i=0,s=d.length;i<s;++i)e.rem.push(d[i]);return this._internal=p,e},t.exports=i},{"./BatchTransform":119,"./Transform":140,datalib:26,"vega-dataflow":41,"vega-logging":48}],142:[function(e,t,n){(function(n){function i(t){return u.prototype.init.call(this,t),l.addParameters(this,{sort:{type:"array<field>","default":["-value"]},children:{type:"field","default":"children"},parent:{type:"field","default":"parent"},field:{type:"field","default":"value"},size:{type:"array<value>","default":e("./screen").size},round:{type:"value","default":!0},sticky:{type:"value","default":!1},ratio:{type:"value","default":c},padding:{type:"value","default":null},mode:{type:"value","default":"squarify"}}),this._layout=r.layout.treemap(),this._output={x:"layout_x",y:"layout_y",width:"layout_width",height:"layout_height",depth:"layout_depth"},this.mutates(!0)}var r="undefined"!=typeof window?window.d3:"undefined"!=typeof n?n.d3:null,o=e("datalib"),a=e("vega-dataflow").Tuple,s=e("vega-logging"),l=e("./Transform"),u=e("./BatchTransform"),c=.5*(1+Math.sqrt(5)),f=i.prototype=Object.create(u.prototype);f.constructor=i,f.batchTransform=function(e,t){s.debug(e,["treemap"]);var n=this._layout,i=this._output,r=this.param("sticky"),l=this.param("parent").accessor,u=t.filter(function(e){return null===l(e)})[0];return n.sticky()!==r&&n.sticky(r),n.sort(o.comparator(this.param("sort").field)).children(this.param("children").accessor).value(this.param("field").accessor).size(this.param("size")).round(this.param("round")).ratio(this.param("ratio")).padding(this.param("padding")).mode(this.param("mode")).nodes(u),t.forEach(function(e){a.set(e,i.x,e.x),a.set(e,i.y,e.y),a.set(e,i.width,e.dx),a.set(e,i.height,e.dy),a.set(e,i.depth,e.depth)}),e.fields[i.x]=1,e.fields[i.y]=1,e.fields[i.width]=1,e.fields[i.height]=1,e.fields[i.depth]=1,e},t.exports=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./BatchTransform":119,"./Transform":140,"./screen":146,datalib:26,"vega-dataflow":41,"vega-logging":48}],143:[function(e,t,n){(function(n){function i(t){return l.prototype.init.call(this,t),s.addParameters(this,{clipExtent:{type:"array<value>","default":e("./screen").extent},x:{type:"field","default":"layout_x"},y:{type:"field","default":"layout_y"}}),this._layout=r.geom.voronoi(),this._output={path:"layout_path"},this.mutates(!0)}var r="undefined"!=typeof window?window.d3:"undefined"!=typeof n?n.d3:null,o=e("vega-dataflow/src/Tuple"),a=e("vega-logging"),s=e("./Transform"),l=e("./BatchTransform"),u=i.prototype=Object.create(l.prototype);u.constructor=i,u.batchTransform=function(e,t){a.debug(e,["voronoi"]);for(var n=this._output.path,i=this._layout.clipExtent(this.param("clipExtent")).x(this.param("x").accessor).y(this.param("y").accessor)(t),r=0;r<t.length;++r)i[r]&&o.set(t[r],n,"M"+i[r].join("L")+"Z");return e.fields[n]=1,e},t.exports=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./BatchTransform":119,"./Transform":140,"./screen":146,"vega-dataflow/src/Tuple":40,"vega-logging":48}],144:[function(e,t,n){(function(n){function i(t){return d.prototype.init.call(this,t),h.addParameters(this,{size:{type:"array<value>","default":e("./screen").size},text:{type:"field","default":"data"},rotate:{type:"field|value","default":0},font:{type:"field|value","default":{value:"sans-serif"}},fontSize:{type:"field|value","default":14},fontStyle:{type:"field|value","default":{value:"normal"}},fontWeight:{type:"field|value","default":{value:"normal"}},fontScale:{type:"array<value>","default":[10,50]},padding:{type:"value","default":1},spiral:{type:"value","default":"archimedean"}}),this._layout=l().canvas(u.instance),this._output={x:"layout_x",y:"layout_y",font:"layout_font",fontSize:"layout_fontSize",fontStyle:"layout_fontStyle",fontWeight:"layout_fontWeight",rotate:"layout_rotate"},this.mutates(!0)}function r(e){return e&&e.accessor||e}function o(e){var t=Object.create(e);return t._tuple=e,t}var a=e("datalib"),s="undefined"!=typeof window?window.d3:"undefined"!=typeof n?n.d3:null,l="undefined"!=typeof window?window.d3.layout.cloud:"undefined"!=typeof n?n.d3.layout.cloud:null,u=e("vega-scenegraph").canvas,c=e("vega-dataflow/src/Tuple"),f=e("vega-logging"),h=e("./Transform"),d=e("./BatchTransform"),p=i.prototype=Object.create(d.prototype);p.constructor=i,p.batchTransform=function(e,t){f.debug(e,["wordcloud"]);var n,i,l=this._layout,u=this._output,h=this.param("fontSize"),d=h.accessor&&this.param("fontScale");h=h.accessor||s.functor(h),d.length&&(i=s.scale.sqrt().domain(a.extent(t,n=h)).range(d),h=function(e){return i(n(e))}),l.size(this.param("size")).text(r(this.param("text"))).padding(this.param("padding")).spiral(this.param("spiral")).rotate(r(this.param("rotate"))).font(r(this.param("font"))).fontStyle(r(this.param("fontStyle"))).fontWeight(r(this.param("fontWeight"))).fontSize(h).words(t.map(o)).on("end",function(e){var t,n,i,r,o=l.size(),a=o[0]>>1,s=o[1]>>1;for(i=0,r=e.length;i<r;++i)t=e[i],n=t._tuple,c.set(n,u.x,t.x+a),c.set(n,u.y,t.y+s),c.set(n,u.font,t.font),c.set(n,u.fontSize,t.size),c.set(n,u.fontStyle,t.style),c.set(n,u.fontWeight,t.weight),c.set(n,u.rotate,t.rotate)}).start();for(var p in u)e.fields[u[p]]=1;return e},t.exports=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./BatchTransform":119,"./Transform":140,"./screen":146,datalib:26,"vega-dataflow/src/Tuple":40,"vega-logging":48,"vega-scenegraph":49}],145:[function(e,t,n){t.exports={aggregate:e("./Aggregate"),bin:e("./Bin"),cross:e("./Cross"),countpattern:e("./CountPattern"),linkpath:e("./LinkPath"),facet:e("./Facet"),filter:e("./Filter"),fold:e("./Fold"),force:e("./Force"),formula:e("./Formula"),geo:e("./Geo"),geopath:e("./GeoPath"),hierarchy:e("./Hierarchy"),impute:e("./Impute"),lookup:e("./Lookup"),pie:e("./Pie"),rank:e("./Rank"),sort:e("./Sort"),stack:e("./Stack"),treeify:e("./Treeify"),treemap:e("./Treemap"),voronoi:e("./Voronoi"),wordcloud:e("./Wordcloud")}},{"./Aggregate":118,"./Bin":120,"./CountPattern":121,"./Cross":122,"./Facet":123,"./Filter":125,"./Fold":126,"./Force":127,"./Formula":128,"./Geo":129,"./GeoPath":130,"./Hierarchy":131,"./Impute":132,"./LinkPath":133,"./Lookup":134,"./Pie":136,"./Rank":137,"./Sort":138,"./Stack":139,"./Treeify":141,"./Treemap":142,"./Voronoi":143,"./Wordcloud":144}],146:[function(e,t,n){t.exports={size:[{signal:"width"},{signal:"height"}],mid:[{expr:"width/2"},{expr:"height/2"}],extent:[{expr:"[-padding.left, -padding.top]"},{expr:"[width+padding.right, height+padding.bottom]"}]}},{}],147:[function(e,t,n){function i(e,t,n,i){var o=n||r(e);return a(e,t,o,i)}function r(e){switch(e.type){case l:return l;case u:return u;case f:return c;default:return h}}function o(e,t,n,i){function r(e){return(t[0]<0?-Math.log(e>0?0:-e):Math.log(e<0?0:e))/Math.log(s)}function o(e){return t[0]<0?-Math.pow(s,-e):Math.pow(s,e)}if(null==n)return i;var a,s=e.base(),l=Math.min(s,e.ticks().length/n),u=t[0]>0?(a=1e-12,Math.ceil):(a=-1e-12,Math.floor);return function(e){return o(u(r(e)+a))/e>=l?i(e):""}}function a(e,t,n,i){var r,a=s.format,c="log"===e.type;switch(n){case h:return r=e.domain(),c?o(e,r,t,a.auto.number(i||null)):a.auto.linear(r,t,i||null);case l:return(i?a:a.auto).time(i);case u:return(i?a:a.auto).utc(i);default:return String}}var s=e("datalib"),l="time",u="utc",c="string",f="ordinal",h="number";t.exports={getTickFormat:i}},{datalib:26}],148:[function(e,t,n){var i=e("datalib"),r={};i.extend(r,e("./format")),t.exports=i.extend(r,i)},{"./format":147,datalib:26}],149:[function(e,t,n){t.exports=function(e,t,n,i){return void 0!==e[n]?e[n]:void 0!==t&&void 0!==t[n]?t[n]:void 0!==i?i:void 0}},{}]},{},[1])(1)}),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.vl=e()}}(function(){var e;return function t(e,n,i){function r(a,s){if(!n[a]){if(!e[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[a]={exports:{}};e[a][0].call(c.exports,function(t){var n=e[a][1][t];return r(n?n:t)},c,c.exports,t,e,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(e,t,n){},{}],2:[function(t,n,i){!function(t,r){"object"==typeof i&&"undefined"!=typeof n?r(i):"function"==typeof e&&e.amd?e("d3-time",["exports"],r):r(t.d3_time={})}(this,function(e){"use strict";function t(e,n,i,a){function s(t){return e(t=new Date((+t))),t}return s.floor=s,s.round=function(t){var i=new Date((+t)),r=new Date(t-1);return e(i),e(r),n(r,1),t-i<r-t?i:r},s.ceil=function(t){return e(t=new Date(t-1)),n(t,1),t},s.offset=function(e,t){return n(e=new Date((+e)),null==t?1:Math.floor(t)),e},s.range=function(t,i,r){var o=[];if(t=new Date(t-1),i=new Date((+i)),r=null==r?1:Math.floor(r),!(t<i&&r>0))return o;for(n(t,1),e(t),t<i&&o.push(new Date((+t)));n(t,r),e(t),t<i;)o.push(new Date((+t)));return o},s.filter=function(i){return t(function(t){for(;e(t),!i(t);)t.setTime(t-1)},function(e,t){for(;--t>=0;)for(;n(e,1),!i(e););})},i&&(s.count=function(t,n){return r.setTime(+t),o.setTime(+n),e(r),e(o),Math.floor(i(r,o));
},s.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?s.filter(a?function(t){return a(t)%e===0}:function(t){return s.count(0,t)%e===0}):s:null}),s}function n(e){return t(function(t){t.setHours(0,0,0,0),t.setDate(t.getDate()-(t.getDay()+7-e)%7)},function(e,t){e.setDate(e.getDate()+7*t)},function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/6048e5})}function i(e){return t(function(t){t.setUTCHours(0,0,0,0),t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7)},function(e,t){e.setUTCDate(e.getUTCDate()+7*t)},function(e,t){return(t-e)/6048e5})}var r=new Date,o=new Date,a=t(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});a.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?t(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):a:null};var s=t(function(e){e.setMilliseconds(0)},function(e,t){e.setTime(+e+1e3*t)},function(e,t){return(t-e)/1e3},function(e){return e.getSeconds()}),l=t(function(e){e.setSeconds(0,0)},function(e,t){e.setTime(+e+6e4*t)},function(e,t){return(t-e)/6e4},function(e){return e.getMinutes()}),u=t(function(e){e.setMinutes(0,0,0)},function(e,t){e.setTime(+e+36e5*t)},function(e,t){return(t-e)/36e5},function(e){return e.getHours()}),c=t(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5},function(e){return e.getDate()-1}),f=n(0),h=n(1),d=n(2),p=n(3),g=n(4),m=n(5),v=n(6),y=t(function(e){e.setHours(0,0,0,0),e.setDate(1)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())},function(e){return e.getMonth()}),b=t(function(e){e.setHours(0,0,0,0),e.setMonth(0,1)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()}),_=t(function(e){e.setUTCMilliseconds(0)},function(e,t){e.setTime(+e+1e3*t)},function(e,t){return(t-e)/1e3},function(e){return e.getUTCSeconds()}),E=t(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+6e4*t)},function(e,t){return(t-e)/6e4},function(e){return e.getUTCMinutes()}),x=t(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+36e5*t)},function(e,t){return(t-e)/36e5},function(e){return e.getUTCHours()}),w=t(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/864e5},function(e){return e.getUTCDate()-1}),T=i(0),S=i(1),A=i(2),C=i(3),k=i(4),O=i(5),I=i(6),N=t(function(e){e.setUTCHours(0,0,0,0),e.setUTCDate(1)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())},function(e){return e.getUTCMonth()}),M=t(function(e){e.setUTCHours(0,0,0,0),e.setUTCMonth(0,1)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()}),D=a.range,L=s.range,$=l.range,R=u.range,P=c.range,F=f.range,U=h.range,j=d.range,H=p.range,z=g.range,B=m.range,q=v.range,W=f.range,Y=y.range,G=b.range,X=a,V=D,K=_.range,Z=E.range,Q=x.range,J=w.range,ee=T.range,te=S.range,ne=A.range,ie=C.range,re=k.range,oe=O.range,ae=I.range,se=T.range,le=N.range,ue=M.range,ce="0.1.1";e.version=ce,e.milliseconds=D,e.seconds=L,e.minutes=$,e.hours=R,e.days=P,e.sundays=F,e.mondays=U,e.tuesdays=j,e.wednesdays=H,e.thursdays=z,e.fridays=B,e.saturdays=q,e.weeks=W,e.months=Y,e.years=G,e.utcMillisecond=X,e.utcMilliseconds=V,e.utcSeconds=K,e.utcMinutes=Z,e.utcHours=Q,e.utcDays=J,e.utcSundays=ee,e.utcMondays=te,e.utcTuesdays=ne,e.utcWednesdays=ie,e.utcThursdays=re,e.utcFridays=oe,e.utcSaturdays=ae,e.utcWeeks=se,e.utcMonths=le,e.utcYears=ue,e.millisecond=a,e.second=s,e.minute=l,e.hour=u,e.day=c,e.sunday=f,e.monday=h,e.tuesday=d,e.wednesday=p,e.thursday=g,e.friday=m,e.saturday=v,e.week=f,e.month=y,e.year=b,e.utcSecond=_,e.utcMinute=E,e.utcHour=x,e.utcDay=w,e.utcSunday=T,e.utcMonday=S,e.utcTuesday=A,e.utcWednesday=C,e.utcThursday=k,e.utcFriday=O,e.utcSaturday=I,e.utcWeek=T,e.utcMonth=N,e.utcYear=M,e.interval=t})},{}],3:[function(e,t,n){function i(e){if(!e)throw Error("Missing binning options.");var t,n,i,s,l,u,c,f=e.maxbins||15,h=e.base||10,d=Math.log(h),p=e.div||[5,2],g=e.min,m=e.max,v=m-g;if(e.step)t=e.step;else if(e.steps)t=e.steps[Math.min(e.steps.length-1,r(e.steps,v/f,0,e.steps.length))];else{for(n=Math.ceil(Math.log(f)/d),i=e.minstep||0,t=Math.max(i,Math.pow(h,Math.round(Math.log(v)/d)-n));Math.ceil(v/t)>f;)t*=h;for(u=0;u<p.length;++u)l=t/p[u],l>=i&&v/l<=f&&(t=l)}return l=Math.log(t),s=l>=0?0:~~(-l/d)+1,c=Math.pow(h,-s-1),g=Math.min(g,Math.floor(g/t+c)*t),m=Math.ceil(m/t)*t,{start:g,stop:m,step:t,unit:{precision:s},value:o,index:a}}function r(e,t,n,i){for(;n<i;){var r=n+i>>>1;u.cmp(e[r],t)<0?n=r+1:i=r}return n}function o(e){return this.step*Math.floor(e/this.step+f)}function a(e){return Math.floor((e-this.start)/this.step+f)}function s(e){return this.unit.date(o.call(this,e))}function l(e){return a.call(this,this.unit.unit(e))}var u=e("../util"),c=e("../time"),f=1e-15;i.date=function(e){if(!e)throw Error("Missing date binning options.");var t=e.utc?c.utc:c,n=e.min,r=e.max,o=e.maxbins||20,a=e.minbins||4,u=+r-+n,f=e.unit?t[e.unit]:t.find(u,a,o),h=i({min:null!=f.min?f.min:f.unit(n),max:null!=f.max?f.max:f.unit(r),maxbins:o,minstep:f.minstep,steps:f.step});return h.unit=f,h.index=l,e.raw||(h.value=s),h},t.exports=i},{"../time":5,"../util":6}],4:[function(e,t,n){var i=e("./util"),r=t.exports;r.repeat=function(e,t){var n,i=Array(t);for(n=0;n<t;++n)i[n]=e;return i},r.zeros=function(e){return r.repeat(0,e)},r.range=function(e,t,n){if(arguments.length<3&&(n=1,arguments.length<2&&(t=e,e=0)),(t-e)/n==1/0)throw new Error("Infinite range");var i,r=[],o=-1;if(n<0)for(;(i=e+n*++o)>t;)r.push(i);else for(;(i=e+n*++o)<t;)r.push(i);return r},r.random={},r.random.uniform=function(e,t){void 0===t&&(t=void 0===e?1:e,e=0);var n=t-e,i=function(){return e+n*Math.random()};return i.samples=function(e){return r.zeros(e).map(i)},i.pdf=function(i){return i>=e&&i<=t?1/n:0},i.cdf=function(i){return i<e?0:i>t?1:(i-e)/n},i.icdf=function(t){return t>=0&&t<=1?e+t*n:NaN},i},r.random.integer=function(e,t){void 0===t&&(t=e,e=0);var n=t-e,i=function(){return e+Math.floor(n*Math.random())};return i.samples=function(e){return r.zeros(e).map(i)},i.pdf=function(i){return i===Math.floor(i)&&i>=e&&i<t?1/n:0},i.cdf=function(i){var r=Math.floor(i);return r<e?0:r>=t?1:(r-e+1)/n},i.icdf=function(t){return t>=0&&t<=1?e-1+Math.floor(t*n):NaN},i},r.random.normal=function(e,t){e=e||0,t=t||1;var n,i=function(){var i,r,o=0,a=0;if(void 0!==n)return o=n,n=void 0,o;do o=2*Math.random()-1,a=2*Math.random()-1,i=o*o+a*a;while(0===i||i>1);return r=Math.sqrt(-2*Math.log(i)/i),n=e+a*r*t,e+o*r*t};return i.samples=function(e){return r.zeros(e).map(i)},i.pdf=function(n){var i=Math.exp(Math.pow(n-e,2)/(-2*Math.pow(t,2)));return 1/(t*Math.sqrt(2*Math.PI))*i},i.cdf=function(n){var i,r=(n-e)/t,o=Math.abs(r);if(o>37)i=0;else{var a,s=Math.exp(-o*o/2);o<7.07106781186547?(a=.0352624965998911*o+.700383064443688,a=a*o+6.37396220353165,a=a*o+33.912866078383,a=a*o+112.079291497871,a=a*o+221.213596169931,a=a*o+220.206867912376,i=s*a,a=.0883883476483184*o+1.75566716318264,a=a*o+16.064177579207,a=a*o+86.7807322029461,a=a*o+296.564248779674,a=a*o+637.333633378831,a=a*o+793.826512519948,a=a*o+440.413735824752,i/=a):(a=o+.65,a=o+4/a,a=o+3/a,a=o+2/a,a=o+1/a,i=s/a/2.506628274631)}return r>0?1-i:i},i.icdf=function(n){if(n<=0||n>=1)return NaN;var i=2*n-1,r=8*(Math.PI-3)/(3*Math.PI*(4-Math.PI)),o=2/(Math.PI*r)+Math.log(1-Math.pow(i,2))/2,a=Math.log(1-i*i)/r,s=(i>0?1:-1)*Math.sqrt(Math.sqrt(o*o-a)-o);return e+t*Math.SQRT2*s},i},r.random.bootstrap=function(e,t){var n=e.filter(i.isValid),o=n.length,a=t?r.random.normal(0,t):null,s=function(){return n[~~(Math.random()*o)]+(a?a():0)};return s.samples=function(e){return r.zeros(e).map(s)},s}},{"./util":6}],5:[function(e,t,n){function i(e){return u.setTime(+e),u}function r(e,t,n,i,r,o){var a={type:e,date:t,unit:n};return i?a.step=i:a.minstep=1,null!=r&&(a.min=r),null!=o&&(a.max=o),a}function o(e,t,n,i,o,a){return r(e,function(e){return t.offset(n,e)},function(e){return t.count(n,e)},i,o,a)}function a(e,t,n,i){var r,o,a,s=p[0];for(r=1,o=p.length;r<o;++r)if(s=p[r],t>s[0]){if(a=t/s[0],a>i)return e[p[r-1][1]];if(a>=n)return e[s[1]]}return e[p[o-1][1]]}function s(e){var t,n,i={};for(t=0,n=e.length;t<n;++t)i[e[t].type]=e[t];return i.find=function(t,n,i){return a(e,t,n,i)},i}var l=e("d3-time"),u=new Date,c=new Date(0,0,1).setFullYear(0),f=new Date(Date.UTC(0,0,1)).setUTCFullYear(0),h=[o("second",l.second,c),o("minute",l.minute,c),o("hour",l.hour,c),o("day",l.day,c,[1,7]),o("month",l.month,c,[1,3,6]),o("year",l.year,c),r("seconds",function(e){return new Date(1970,0,1,0,0,e)},function(e){return i(e).getSeconds()},null,0,59),r("minutes",function(e){return new Date(1970,0,1,0,e)},function(e){return i(e).getMinutes()},null,0,59),r("hours",function(e){return new Date(1970,0,1,e)},function(e){return i(e).getHours()},null,0,23),r("weekdays",function(e){return new Date(1970,0,4+e)},function(e){return i(e).getDay()},[1],0,6),r("dates",function(e){return new Date(1970,0,e)},function(e){return i(e).getDate()},[1],1,31),r("months",function(e){return new Date(1970,e%12,1)},function(e){return i(e).getMonth()},[1],0,11)],d=[o("second",l.utcSecond,f),o("minute",l.utcMinute,f),o("hour",l.utcHour,f),o("day",l.utcDay,f,[1,7]),o("month",l.utcMonth,f,[1,3,6]),o("year",l.utcYear,f),r("seconds",function(e){return new Date(Date.UTC(1970,0,1,0,0,e))},function(e){return i(e).getUTCSeconds()},null,0,59),r("minutes",function(e){return new Date(Date.UTC(1970,0,1,0,e))},function(e){return i(e).getUTCMinutes()},null,0,59),r("hours",function(e){return new Date(Date.UTC(1970,0,1,e))},function(e){return i(e).getUTCHours()},null,0,23),r("weekdays",function(e){return new Date(Date.UTC(1970,0,4+e))},function(e){return i(e).getUTCDay()},[1],0,6),r("dates",function(e){return new Date(Date.UTC(1970,0,e))},function(e){return i(e).getUTCDate()},[1],1,31),r("months",function(e){return new Date(Date.UTC(1970,e%12,1))},function(e){return i(e).getUTCMonth()},[1],0,11)],p=[[31536e6,5],[7776e6,4],[2592e6,4],[12096e5,3],[6048e5,3],[1728e5,3],[864e5,3],[432e5,2],[216e5,2],[108e5,2],[36e5,2],[18e5,1],[9e5,1],[3e5,1],[6e4,1],[3e4,0],[15e3,0],[5e3,0],[1e3,0]];t.exports=s(h),t.exports.utc=s(d)},{"d3-time":2}],6:[function(e,t,n){(function(e){function n(e,t){var n,i="";for(n=0;n<e;++n)i+=t;return i}function i(e,t,n){var i=0,r=e.split(l);return e=n?(r=r.reverse()).filter(function(e){return i+=e.length,i<=t}).reverse():r.filter(function(e){return i+=e.length,i<=t}),e.length?e.join("").trim():r[0].slice(0,t)}var r=t.exports,o="__name__";r.namedfunc=function(e,t){return t[o]=e,t},r.name=function(e){return null==e?null:e[o]},r.identity=function(e){return e},r["true"]=r.namedfunc("true",function(){return!0}),r["false"]=r.namedfunc("false",function(){return!1}),r.duplicate=function(e){return JSON.parse(JSON.stringify(e))},r.equal=function(e,t){return JSON.stringify(e)===JSON.stringify(t)},r.extend=function(e){for(var t,n,i=1,r=arguments.length;i<r;++i){t=arguments[i];for(n in t)e[n]=t[n]}return e},r.length=function(e){return null!=e&&null!=e.length?e.length:null},r.keys=function(e){var t,n=[];for(t in e)n.push(t);return n},r.vals=function(e){var t,n=[];for(t in e)n.push(e[t]);return n},r.toMap=function(e,t){return(t=r.$(t))?e.reduce(function(e,n){return e[t(n)]=1,e},{}):e.reduce(function(e,t){return e[t]=1,e},{})},r.keystr=function(e){var t=e.length;if(!t)return"";for(var n=String(e[0]),i=1;i<t;++i)n+="|"+String(e[i]);return n};var a=Object.prototype.toString;r.isObject=function(e){return e===Object(e)},r.isFunction=function(e){return"[object Function]"===a.call(e)},r.isString=function(e){return"string"==typeof value||"[object String]"===a.call(e)},r.isArray=Array.isArray||function(e){return"[object Array]"===a.call(e)},r.isNumber=function(e){return"number"==typeof e||"[object Number]"===a.call(e)},r.isBoolean=function(e){return e===!0||e===!1||"[object Boolean]"==a.call(e)},r.isDate=function(e){return"[object Date]"===a.call(e)},r.isValid=function(e){return null!=e&&e===e},r.isBuffer="function"==typeof e&&e.isBuffer||r["false"],r.number=function(e){return null==e||""===e?null:+e},r["boolean"]=function(e){return null==e||""===e?null:"false"!==e&&!!e},r.date=function(e,t){var n=t?t:Date;return null==e||""===e?null:n.parse(e)},r.array=function(e){return null!=e?r.isArray(e)?e:[e]:[]},r.str=function(e){return r.isArray(e)?"["+e.map(r.str)+"]":r.isObject(e)||r.isString(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e};var s=/\[(.*?)\]|[^.\[]+/g;r.field=function(e){return String(e).match(s).map(function(e){return"["!==e[0]?e:"'"!==e[1]&&'"'!==e[1]?e.slice(1,-1):e.slice(2,-2).replace(/\\(["'])/g,"$1")})},r.accessor=function(e){return null==e||r.isFunction(e)?e:r.namedfunc(e,Function("x","return x["+r.field(e).map(r.str).join("][")+"];"))},r.$=r.accessor,r.mutator=function(e){var t;return r.isString(e)&&(t=r.field(e)).length>1?function(e,n){for(var i=0;i<t.length-1;++i)e=e[t[i]];e[t[i]]=n}:function(t,n){t[e]=n}},r.$func=function(e,t){return function(n){n=r.$(n)||r.identity;var i=e+(r.name(n)?"_"+r.name(n):"");return r.namedfunc(i,function(e){return t(n(e))})}},r.$valid=r.$func("valid",r.isValid),r.$length=r.$func("length",r.length),r.$in=function(e,t){e=r.$(e);var n=r.isArray(t)?r.toMap(t):t;return function(t){return!!n[e(t)]}},r.comparator=function(e){var t=[];return void 0===e&&(e=[]),e=r.array(e).map(function(e){var n=1;return"-"===e[0]?(n=-1,e=e.slice(1)):"+"===e[0]&&(n=1,e=e.slice(1)),t.push(n),r.accessor(e)}),function(n,i){var o,a,s,l;for(o=0,a=e.length;o<a;++o)if(s=e[o],l=r.cmp(s(n),s(i)))return l*t[o];return 0}},r.cmp=function(e,t){return(e<t||null==e)&&null!=t?-1:(e>t||null==t)&&null!=e?1:(t=t instanceof Date?+t:t,(e=e instanceof Date?+e:e)!==e&&t===t?-1:t!==t&&e===e?1:0)},r.numcmp=function(e,t){return e-t},r.stablesort=function(e,t,n){var i=e.reduce(function(e,t,i){return e[n(t)]=i,e},{});return e.sort(function(e,r){var o=t(e),a=t(r);return o<a?-1:o>a?1:i[n(e)]-i[n(r)]}),e},r.permute=function(e){for(var t,n,i=e.length;i;)n=Math.floor(Math.random()*i--),t=e[i],e[i]=e[n],e[n]=t},r.pad=function(e,t,i,r){r=r||" ";var o=t-e.length;if(o<=0)return e;switch(i){case"left":return n(o,r)+e;case"middle":case"center":return n(Math.floor(o/2),r)+e+n(Math.ceil(o/2),r);default:return e+n(o,r)}},r.truncate=function(e,t,n,r,o){var a=e.length;if(a<=t)return e;o=void 0!==o?String(o):"…";var s=Math.max(0,t-o.length);switch(n){case"left":return o+(r?i(e,s,1):e.slice(a-s));case"middle":case"center":var l=Math.ceil(s/2),u=Math.floor(s/2);return(r?i(e,l):e.slice(0,l))+o+(r?i(e,u,1):e.slice(a-u));default:return(r?i(e,s):e.slice(0,s))+o}};var l=/([\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u2028\u2029\u3000\uFEFF])/}).call(this,e("buffer").Buffer)},{buffer:1}],7:[function(e,t,n){var i="undefined"!=typeof JSON?JSON:e("jsonify");t.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var n=t.space||"";"number"==typeof n&&(n=Array(n+1).join(" "));var a="boolean"==typeof t.cycles&&t.cycles,s=t.replacer||function(e,t){return t},l=t.cmp&&function(e){return function(t){return function(n,i){var r={key:n,value:t[n]},o={key:i,value:t[i]};return e(r,o)}}}(t.cmp),u=[];return function c(e,t,f,h){var d=n?"\n"+new Array(h+1).join(n):"",p=n?": ":":";if(f&&f.toJSON&&"function"==typeof f.toJSON&&(f=f.toJSON()),f=s.call(e,t,f),void 0!==f){if("object"!=typeof f||null===f)return i.stringify(f);if(r(f)){for(var g=[],m=0;m<f.length;m++){var v=c(f,m,f[m],h+1)||i.stringify(null);g.push(d+n+v)}return"["+g.join(",")+d+"]"}if(u.indexOf(f)!==-1){if(a)return i.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}u.push(f);for(var y=o(f).sort(l&&l(f)),g=[],m=0;m<y.length;m++){var t=y[m],b=c(f,t,f[t],h+1);if(b){var _=i.stringify(t)+p+b;g.push(d+n+_)}}return u.splice(u.indexOf(f),1),"{"+g.join(",")+d+"}"}}({"":e},"",e,0)};var r=Array.isArray||function(e){return"[object Array]"==={}.toString.call(e)},o=Object.keys||function(e){var t=Object.prototype.hasOwnProperty||function(){return!0},n=[];for(var i in e)t.call(e,i)&&n.push(i);return n}},{jsonify:8}],8:[function(e,t,n){n.parse=e("./lib/parse"),n.stringify=e("./lib/stringify")},{"./lib/parse":9,"./lib/stringify":10}],9:[function(e,t,n){var i,r,o,a,s={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},l=function(e){throw{name:"SyntaxError",message:e,at:i,text:o}},u=function(e){return e&&e!==r&&l("Expected '"+e+"' instead of '"+r+"'"),r=o.charAt(i),i+=1,r},c=function(){var e,t="";for("-"===r&&(t="-",u("-"));r>="0"&&r<="9";)t+=r,u();if("."===r)for(t+=".";u()&&r>="0"&&r<="9";)t+=r;if("e"===r||"E"===r)for(t+=r,u(),"-"!==r&&"+"!==r||(t+=r,u());r>="0"&&r<="9";)t+=r,u();return e=+t,isFinite(e)?e:void l("Bad number")},f=function(){var e,t,n,i="";if('"'===r)for(;u();){if('"'===r)return u(),i;if("\\"===r)if(u(),"u"===r){for(n=0,t=0;t<4&&(e=parseInt(u(),16),isFinite(e));t+=1)n=16*n+e;i+=String.fromCharCode(n)}else{if("string"!=typeof s[r])break;i+=s[r]}else i+=r}l("Bad string")},h=function(){for(;r&&r<=" ";)u()},d=function(){switch(r){case"t":return u("t"),u("r"),u("u"),u("e"),!0;case"f":return u("f"),u("a"),u("l"),u("s"),u("e"),!1;case"n":return u("n"),u("u"),u("l"),u("l"),null}l("Unexpected '"+r+"'")},p=function(){var e=[];if("["===r){if(u("["),h(),"]"===r)return u("]"),e;for(;r;){if(e.push(a()),h(),"]"===r)return u("]"),e;u(","),h()}}l("Bad array")},g=function(){var e,t={};if("{"===r){if(u("{"),h(),"}"===r)return u("}"),t;for(;r;){if(e=f(),h(),u(":"),Object.hasOwnProperty.call(t,e)&&l('Duplicate key "'+e+'"'),t[e]=a(),h(),"}"===r)return u("}"),t;u(","),h()}}l("Bad object")};a=function(){switch(h(),r){case"{":return g();case"[":return p();case'"':return f();case"-":return c();default:return r>="0"&&r<="9"?c():d()}},t.exports=function(e,t){var n;return o=e,i=0,r=" ",n=a(),h(),r&&l("Syntax error"),"function"==typeof t?function s(e,n){var i,r,o=e[n];if(o&&"object"==typeof o)for(i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r=s(o,i),void 0!==r?o[i]=r:delete o[i]);return t.call(e,n,o)}({"":n},""):n}},{}],10:[function(e,t,n){function i(e){return l.lastIndex=0,l.test(e)?'"'+e.replace(l,function(e){var t=u[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function r(e,t){var n,l,u,c,f,h=o,d=t[e];switch(d&&"object"==typeof d&&"function"==typeof d.toJSON&&(d=d.toJSON(e)),"function"==typeof s&&(d=s.call(t,e,d)),typeof d){case"string":return i(d);case"number":return isFinite(d)?String(d):"null";case"boolean":case"null":return String(d);case"object":if(!d)return"null";if(o+=a,f=[],"[object Array]"===Object.prototype.toString.apply(d)){for(c=d.length,n=0;n<c;n+=1)f[n]=r(n,d)||"null";return u=0===f.length?"[]":o?"[\n"+o+f.join(",\n"+o)+"\n"+h+"]":"["+f.join(",")+"]",o=h,u}if(s&&"object"==typeof s)for(c=s.length,n=0;n<c;n+=1)l=s[n],"string"==typeof l&&(u=r(l,d),u&&f.push(i(l)+(o?": ":":")+u));else for(l in d)Object.prototype.hasOwnProperty.call(d,l)&&(u=r(l,d),u&&f.push(i(l)+(o?": ":":")+u));return u=0===f.length?"{}":o?"{\n"+o+f.join(",\n"+o)+"\n"+h+"}":"{"+f.join(",")+"}",o=h,u}}var o,a,s,l=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,u={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};t.exports=function(e,t,n){var i;if(o="",a="","number"==typeof n)for(i=0;i<n;i+=1)a+=" ";else"string"==typeof n&&(a=n);if(s=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return r("",{"":e})}},{}],11:[function(e,t,n){"use strict";!function(e){e[e.VALUES="values"]="VALUES",e[e.COUNT="count"]="COUNT",e[e.VALID="valid"]="VALID",e[e.MISSING="missing"]="MISSING",e[e.DISTINCT="distinct"]="DISTINCT",e[e.SUM="sum"]="SUM",e[e.MEAN="mean"]="MEAN",e[e.AVERAGE="average"]="AVERAGE",e[e.VARIANCE="variance"]="VARIANCE",e[e.VARIANCEP="variancep"]="VARIANCEP",e[e.STDEV="stdev"]="STDEV",e[e.STDEVP="stdevp"]="STDEVP",e[e.MEDIAN="median"]="MEDIAN",e[e.Q1="q1"]="Q1",e[e.Q3="q3"]="Q3",e[e.MODESKEW="modeskew"]="MODESKEW",e[e.MIN="min"]="MIN",e[e.MAX="max"]="MAX",e[e.ARGMIN="argmin"]="ARGMIN",e[e.ARGMAX="argmax"]="ARGMAX"}(n.AggregateOp||(n.AggregateOp={}));var i=n.AggregateOp;n.AGGREGATE_OPS=[i.VALUES,i.COUNT,i.VALID,i.MISSING,i.DISTINCT,i.SUM,i.MEAN,i.AVERAGE,i.VARIANCE,i.VARIANCEP,i.STDEV,i.STDEVP,i.MEDIAN,i.Q1,i.Q3,i.MODESKEW,i.MIN,i.MAX,i.ARGMIN,i.ARGMAX],n.SUM_OPS=[i.COUNT,i.SUM,i.DISTINCT],n.SHARED_DOMAIN_OPS=[i.MEAN,i.AVERAGE,i.STDEV,i.STDEVP,i.MEDIAN,i.Q1,i.Q3,i.MIN,i.MAX]},{}],12:[function(e,t,n){"use strict";!function(e){e[e.TOP="top"]="TOP",e[e.RIGHT="right"]="RIGHT",e[e.LEFT="left"]="LEFT",e[e.BOTTOM="bottom"]="BOTTOM"}(n.AxisOrient||(n.AxisOrient={}));n.AxisOrient;n.defaultAxisConfig={offset:void 0,grid:void 0,labels:!0,labelMaxLength:25,tickSize:void 0,characterWidth:6},n.defaultFacetAxisConfig={axisWidth:0,labels:!0,grid:!1,tickSize:0}},{}],13:[function(e,t,n){"use strict";function i(e){switch(e){case r.ROW:case r.COLUMN:case r.SIZE:case r.SHAPE:return 6;default:return 10}}var r=e("./channel");n.autoMaxBins=i},{"./channel":14}],14:[function(e,t,n){"use strict";function i(e,t){return!!r(e)[t]}function r(e){switch(e){case n.X:case n.Y:case n.COLOR:case n.DETAIL:case n.ORDER:case n.OPACITY:case n.ROW:case n.COLUMN:return{point:!0,tick:!0,rule:!0,circle:!0,square:!0,bar:!0,line:!0,area:!0,text:!0};case n.X2:case n.Y2:return{rule:!0,bar:!0,area:!0};case n.SIZE:return{point:!0,tick:!0,rule:!0,circle:!0,square:!0,bar:!0,text:!0};case n.SHAPE:return{point:!0};case n.TEXT:return{text:!0};case n.PATH:return{line:!0}}return{}}function o(e){switch(e){case n.X:case n.Y:case n.COLOR:case n.OPACITY:case n.LABEL:case n.DETAIL:return{measure:!0,dimension:!0};case n.ROW:case n.COLUMN:case n.SHAPE:return{measure:!1,dimension:!0};case n.X2:case n.Y2:case n.SIZE:case n.TEXT:return{measure:!0,dimension:!1};case n.PATH:return{measure:!1,dimension:!0}}throw new Error("Invalid encoding channel"+e)}function a(e){return!s.contains([n.DETAIL,n.PATH,n.TEXT,n.LABEL,n.ORDER],e)}var s=e("./util");!function(e){e[e.X="x"]="X",e[e.Y="y"]="Y",e[e.X2="x2"]="X2",e[e.Y2="y2"]="Y2",e[e.ROW="row"]="ROW",e[e.COLUMN="column"]="COLUMN",e[e.SHAPE="shape"]="SHAPE",e[e.SIZE="size"]="SIZE",e[e.COLOR="color"]="COLOR",e[e.TEXT="text"]="TEXT",e[e.DETAIL="detail"]="DETAIL",e[e.LABEL="label"]="LABEL",e[e.PATH="path"]="PATH",e[e.ORDER="order"]="ORDER",e[e.OPACITY="opacity"]="OPACITY"}(n.Channel||(n.Channel={}));var l=n.Channel;n.X=l.X,n.Y=l.Y,n.X2=l.X2,n.Y2=l.Y2,n.ROW=l.ROW,n.COLUMN=l.COLUMN,n.SHAPE=l.SHAPE,n.SIZE=l.SIZE,n.COLOR=l.COLOR,n.TEXT=l.TEXT,n.DETAIL=l.DETAIL,n.LABEL=l.LABEL,n.PATH=l.PATH,n.ORDER=l.ORDER,n.OPACITY=l.OPACITY,n.CHANNELS=[n.X,n.Y,n.X2,n.Y2,n.ROW,n.COLUMN,n.SIZE,n.SHAPE,n.COLOR,n.PATH,n.ORDER,n.OPACITY,n.TEXT,n.DETAIL,n.LABEL],n.UNIT_CHANNELS=s.without(n.CHANNELS,[n.ROW,n.COLUMN]),n.UNIT_SCALE_CHANNELS=s.without(n.UNIT_CHANNELS,[n.PATH,n.ORDER,n.DETAIL,n.TEXT,n.LABEL,n.X2,n.Y2]),n.NONSPATIAL_CHANNELS=s.without(n.UNIT_CHANNELS,[n.X,n.Y,n.X2,n.Y2]),n.NONSPATIAL_SCALE_CHANNELS=s.without(n.UNIT_SCALE_CHANNELS,[n.X,n.Y,n.X2,n.Y2]),n.STACK_GROUP_CHANNELS=[n.COLOR,n.DETAIL,n.ORDER,n.OPACITY,n.SIZE],n.supportMark=i,n.getSupportedMark=r,n.getSupportedRole=o,n.hasScale=a},{"./util":64}],15:[function(e,t,n){"use strict";function i(e,t){return t.reduce(function(t,n){return e.axis(n)&&(t[n]=o(n,e)),t},{})}function r(e,t){var i=e===y.COLUMN,r=e===y.ROW,o=i?"x":r?"y":e,a={type:o,scale:t.scaleName(e),grid:!0,tickSize:0,properties:{labels:{text:{value:""}},axis:{stroke:{value:"transparent"}}}},s=t.axis(e);["layer","ticks","values","subdivide"].forEach(function(i){var r,o=(r=n[i])?r(t,e,a):s[i];void 0!==o&&(a[i]=o)});var l=t.axis(e).properties||{};return["grid"].forEach(function(n){var i=w[n]?w[n](t,e,l[n]||{},a):l[n];void 0!==i&&E.keys(i).length>0&&(a.properties=a.properties||{},a.properties[n]=i)}),a}function o(e,t){var i=e===y.COLUMN,r=e===y.ROW,o=i?"x":r?"y":e,a=t.axis(e),s={type:o,scale:t.scaleName(e)};["format","grid","layer","offset","orient","tickSize","ticks","tickSizeEnd","title","titleOffset","tickPadding","tickSize","tickSizeMajor","tickSizeMinor","values","subdivide"].forEach(function(i){var r,o=(r=n[i])?r(t,e,s):a[i];void 0!==o&&(s[i]=o)});var l=t.axis(e).properties||{};return["axis","labels","grid","title","ticks","majorTicks","minorTicks"].forEach(function(n){var i=w[n]?w[n](t,e,l[n]||{},s):l[n];void 0!==i&&E.keys(i).length>0&&(s.properties=s.properties||{},s.properties[n]=i)}),s}function a(e,t){return x.numberFormat(e.fieldDef(t),e.axis(t).format,e.config())}function s(e,t){return e.axis(t).offset}function l(e,t){var n=e.axis(t).grid;return void 0!==n?n:!e.isOrdinalScale(t)&&!e.fieldDef(t).bin}function u(e,t){if(t!==y.ROW&&t!==y.COLUMN)return l(e,t)&&(t===y.Y||t===y.X)&&!(e.parent()&&e.parent().isFacet())}function c(e,t,n){var i=e.axis(t).layer;return void 0!==i?i:n.grid?"back":void 0}function f(e,t){var n=e.axis(t).orient;return n?n:t===y.COLUMN?v.AxisOrient.TOP:void 0}function h(e,t){var n=e.axis(t).ticks;return void 0!==n?n:t!==y.X||e.fieldDef(t).bin?void 0:5}function d(e,t){var n=e.axis(t).tickSize;if(void 0!==n)return n}function p(e,t){var n=e.axis(t).tickSizeEnd;if(void 0!==n)return n}function g(e,t){var n=e.axis(t);if(void 0!==n.title)return n.title;var i,r=b.title(e.fieldDef(t),e.config());if(n.titleMaxLength)i=n.titleMaxLength;else if(t!==y.X||e.isOrdinalScale(y.X)){if(t===y.Y&&!e.isOrdinalScale(y.Y)){var o=e;i=o.config().cell.height/e.axis(y.Y).characterWidth}}else{var o=e;i=o.config().cell.width/e.axis(y.X).characterWidth}return i?E.truncate(r,i):r}function m(e,t){var n=e.axis(t).titleOffset;if(void 0!==n)return n}var v=e("../axis"),y=e("../channel"),b=e("../fielddef"),_=e("../type"),E=e("../util"),x=e("./common");n.parseAxisComponent=i,n.parseInnerAxis=r,n.parseAxis=o,n.format=a,n.offset=s,n.gridShow=l,n.grid=u,n.layer=c,n.orient=f,n.ticks=h,n.tickSize=d,n.tickSizeEnd=p,n.title=g,n.titleOffset=m;var w;!function(e){function t(e,t,n){var i=e.axis(t);return E.extend(void 0!==i.axisColor?{stroke:{value:i.axisColor}}:{},void 0!==i.axisWidth?{strokeWidth:{value:i.axisWidth}}:{},n||{})}function n(e,t,n){var i=e.axis(t);return E.extend(void 0!==i.gridColor?{stroke:{value:i.gridColor}}:{},void 0!==i.gridOpacity?{strokeOpacity:{value:i.gridOpacity}}:{},void 0!==i.gridWidth?{strokeWidth:{value:i.gridWidth}}:{},void 0!==i.gridDash?{strokeDashOffset:{value:i.gridDash}}:{},n||{})}function i(e,t,n,i){var r=e.fieldDef(t),o=e.axis(t),a=e.config();return o.labels?(E.contains([_.NOMINAL,_.ORDINAL],r.type)&&o.labelMaxLength?n=E.extend({text:{template:'{{ datum["data"] | truncate:'+o.labelMaxLength+" }}"}},n||{}):r.type===_.TEMPORAL&&(n=E.extend({text:{template:x.timeTemplate('datum["data"]',r.timeUnit,o.format,o.shortTimeLabels,a)}},n)),void 0!==o.labelAngle?n.angle={value:o.labelAngle}:t!==y.X||!b.isDimension(r)&&r.type!==_.TEMPORAL||(n.angle={value:270}),void 0!==o.labelAlign?n.align={value:o.labelAlign}:n.angle&&(270===n.angle.value?n.align={value:"top"===i.orient?"left":"x"===i.type?"right":"center"}:90===n.angle.value&&(n.align={value:"center"})),void 0!==o.labelBaseline?n.baseline={value:o.labelBaseline}:n.angle&&(270===n.angle.value?n.baseline={value:"x"===i.type?"middle":"bottom"}:90===n.angle.value&&(n.baseline={value:"bottom"})),void 0!==o.tickLabelColor&&(n.stroke={value:o.tickLabelColor}),void 0!==o.tickLabelFont&&(n.font={value:o.tickLabelFont}),void 0!==o.tickLabelFontSize&&(n.fontSize={value:o.tickLabelFontSize}),0===E.keys(n).length?void 0:n):E.extend({text:""},n)}function r(e,t,n){var i=e.axis(t);return E.extend(void 0!==i.tickColor?{stroke:{value:i.tickColor}}:{},void 0!==i.tickWidth?{strokeWidth:{value:i.tickWidth}}:{},n||{})}function o(e,t,n){var i=e.axis(t);return E.extend(void 0!==i.titleColor?{stroke:{value:i.titleColor}}:{},void 0!==i.titleFont?{font:{value:i.titleFont}}:{},void 0!==i.titleFontSize?{fontSize:{value:i.titleFontSize}}:{},void 0!==i.titleFontWeight?{fontWeight:{value:i.titleFontWeight}}:{},n||{})}e.axis=t,e.grid=n,e.labels=i,e.ticks=r,e.title=o}(w=n.properties||(n.properties={}))},{"../axis":12,"../channel":14,"../fielddef":52,"../type":63,"../util":64,"./common":16}],16:[function(e,t,n){"use strict";function i(e,t,n){return _.isFacetSpec(e)?new m.FacetModel(e,t,n):_.isLayerSpec(e)?new v.LayerModel(e,t,n):_.isUnitSpec(e)?new b.UnitModel(e,t,n):(console.error("Invalid spec."),null)}function r(e,t){var i=t.config().mark.filled,r=t.fieldDef(f.COLOR),o=t.fieldDef(f.OPACITY);i?a(e,t,n.FILL_CONFIG):a(e,t,n.STROKE_CONFIG);var s,l;t.has(f.COLOR)?s={scale:t.scaleName(f.COLOR),field:t.field(f.COLOR,r.type===p.ORDINAL?{prefix:"rank"}:{})}:r&&r.value&&(s={value:r.value}),t.has(f.OPACITY)?l={scale:t.scaleName(f.OPACITY),field:t.field(f.OPACITY,o.type===p.ORDINAL?{prefix:"rank"}:{})}:o&&o.value&&(l={value:o.value}),void 0!==s?i?e.fill=s:e.stroke=s:e[i?"fill":"stroke"]=e[i?"fill":"stroke"]||{value:t.config().mark.color},!e.fill&&g.contains([c.BAR,c.POINT,c.CIRCLE,c.SQUARE],t.mark())&&(e.fill={value:"transparent"}),void 0!==l&&(e.opacity=l)}function o(e,t,n){return n.forEach(function(n){var i=t[n];void 0!==i&&(e[n]={value:i})}),e}function a(e,t,n){return o(e,t.config().mark,n)}function s(e,t,n){if(e.type===p.QUANTITATIVE&&!e.bin)return t||n.numberFormat}function l(e){return(e.sort===d.SortOrder.DESCENDING?"-":"")+h.field(e,{binSuffix:"mid"})}function u(e,t,n,i,r){if(!t||n){var o=n||r.timeFormat;return"{{"+e+" | time:'"+o+"'}}"}return y.template(t,e,i)}var c=e("../mark"),f=e("../channel"),h=e("../fielddef"),d=e("../sort"),p=e("../type"),g=e("../util"),m=e("./facet"),v=e("./layer"),y=e("../timeunit"),b=e("./unit"),_=e("../spec");n.buildModel=i,n.STROKE_CONFIG=["stroke","strokeWidth","strokeDash","strokeDashOffset","strokeOpacity","opacity"],n.FILL_CONFIG=["fill","fillOpacity","opacity"],n.FILL_STROKE_CONFIG=g.union(n.STROKE_CONFIG,n.FILL_CONFIG),n.applyColorAndOpacity=r,n.applyConfig=o,n.applyMarkConfig=a,n.numberFormat=s,n.sortField=l,n.timeTemplate=u},{"../channel":14,"../fielddef":52,"../mark":55,"../sort":58,"../spec":59,"../timeunit":61,"../type":63,"../util":64,"./facet":32,"./layer":33,"./unit":46}],17:[function(e,t,n){"use strict";function i(e){var t=s.normalize(e),n=u.buildModel(t,null,"");return n.parse(),r(n)}function r(e){var t=e.config(),n=l.extend({width:1,height:1,padding:"auto"},t.viewport?{viewport:t.viewport}:{},t.background?{background:t.background}:{},{data:[].concat(e.assembleData([]),e.assembleLayout([])),marks:[o(e)]});return{spec:n}}function o(e){var t=l.extend({name:e.name("root"),type:"group"},e.description()?{description:e.description()}:{},{from:{data:a.LAYOUT},properties:{update:l.extend({width:{field:"width"},height:{field:"height"}},e.assembleParentGroupProperties(e.config().cell))}});return l.extend(t,e.assembleGroup())}var a=e("../data"),s=e("../spec"),l=e("../util"),u=e("./common");n.compile=i,n.assembleRootGroup=o},{"../data":48,"../spec":59,"../util":64,"./common":16}],18:[function(e,t,n){"use strict";function i(e,t,n){return c.extend(["filled","opacity","orient","align"].reduce(function(i,a){var l=n.mark[a];switch(a){case"filled":void 0===l&&(i[a]=e!==u.POINT&&e!==u.LINE&&e!==u.RULE);break;case"opacity":void 0===l&&(c.contains([u.POINT,u.TICK,u.CIRCLE,u.SQUARE],e)&&(s.isAggregate(t)&&!s.has(t,o.DETAIL)||(i[a]=.7)),e===u.AREA&&(i[a]=.7));break;case"orient":i[a]=r(e,t,n.mark);break;case"align":void 0===l&&(i[a]=s.has(t,o.X)?"center":"right")}return i},{}),n.mark)}function r(e,t,n){switch(void 0===n&&(n={}),e){case u.POINT:case u.CIRCLE:case u.SQUARE:case u.TEXT:return}var i=l.isMeasure(t.x)||l.isMeasure(t.x2),r=l.isMeasure(t.y)||l.isMeasure(t.y2),o=t.y&&t.y2,s=t.x&&t.x2;
switch(e){case u.TICK:return i&&!r?a.Orient.VERTICAL:a.Orient.HORIZONTAL;case u.RULE:if(s)return a.Orient.HORIZONTAL;if(o)return a.Orient.VERTICAL;if(t.y)return a.Orient.HORIZONTAL;if(t.x)return a.Orient.VERTICAL;return;case u.BAR:case u.AREA:if(o)return a.Orient.VERTICAL;if(s)return a.Orient.HORIZONTAL;case u.LINE:return i&&!r?a.Orient.HORIZONTAL:a.Orient.VERTICAL}return console.warn("orient unimplemented for mark",e),a.Orient.VERTICAL}var o=e("../channel"),a=e("../config"),s=e("../encoding"),l=e("../fielddef"),u=e("../mark"),c=e("../util");n.initMarkConfig=i,n.orient=r},{"../channel":14,"../config":47,"../encoding":50,"../fielddef":52,"../mark":55,"../util":64}],19:[function(e,t,n){"use strict";var i,r=e("../../bin"),o=e("../../channel"),a=e("../../fielddef"),s=e("../../util");!function(e){function t(e){return e.reduce(function(t,n,i){var l=e.fieldDef(i).bin;if(l){var u=s.extend({type:"bin",field:n.field,output:{start:a.field(n,{binSuffix:"start"}),mid:a.field(n,{binSuffix:"mid"}),end:a.field(n,{binSuffix:"end"})}},"boolean"==typeof l?{}:l);u.maxbins||u.step||(u.maxbins=r.autoMaxBins(i));var c=[u],f=e.isOrdinalScale(i)||i===o.COLOR;f&&c.push({type:"formula",field:a.field(n,{binSuffix:"range"}),expr:a.field(n,{datum:!0,binSuffix:"start"})+" + '-' + "+a.field(n,{datum:!0,binSuffix:"end"})});var h=s.hash(l)+"_"+n.field+"oc:"+f;t[h]=c}return t},{})}function n(e){var n=t(e),i=e.child().component.data;return i.source||(s.extend(n,i.bin),delete i.bin),n}function i(e){var n=t(e);return e.children().forEach(function(e){var t=e.component.data;t.source||(s.extend(n,t.bin),delete t.bin)}),n}function l(e){return s.flatten(s.vals(e.bin))}e.parseUnit=t,e.parseFacet=n,e.parseLayer=i,e.assemble=l}(i=n.bin||(n.bin={}))},{"../../bin":13,"../../channel":14,"../../fielddef":52,"../../util":64}],20:[function(e,t,n){"use strict";var i,r=e("../../channel"),o=e("../../type"),a=e("../../util");!function(e){function t(e){var t={};return e.has(r.COLOR)&&e.fieldDef(r.COLOR).type===o.ORDINAL&&(t[e.field(r.COLOR)]=[{type:"sort",by:e.field(r.COLOR)},{type:"rank",field:e.field(r.COLOR),output:{rank:e.field(r.COLOR,{prefix:"rank"})}}]),t}function n(e){var t=e.child().component.data;if(!t.source){var n=t.colorRank;return delete t.colorRank,n}return{}}function i(e){var t={};return e.children().forEach(function(e){var n=e.component.data;n.source||(a.extend(t,n.colorRank),delete n.colorRank)}),t}function s(e){return a.flatten(a.vals(e.colorRank))}e.parseUnit=t,e.parseFacet=n,e.parseLayer=i,e.assemble=s}(i=n.colorRank||(n.colorRank={}))},{"../../channel":14,"../../type":63,"../../util":64}],21:[function(e,t,n){"use strict";function i(e){return{formatParse:u.formatParse.parseUnit(e),nullFilter:c.nullFilter.parseUnit(e),filter:f.filter.parseUnit(e),nonPositiveFilter:p.nonPositiveFilter.parseUnit(e),source:l.source.parseUnit(e),bin:h.bin.parseUnit(e),calculate:d.formula.parseUnit(e),timeUnit:v.timeUnit.parseUnit(e),timeUnitDomain:y.timeUnitDomain.parseUnit(e),summary:g.summary.parseUnit(e),stackScale:m.stackScale.parseUnit(e),colorRank:b.colorRank.parseUnit(e)}}function r(e){return{formatParse:u.formatParse.parseFacet(e),nullFilter:c.nullFilter.parseFacet(e),filter:f.filter.parseFacet(e),nonPositiveFilter:p.nonPositiveFilter.parseFacet(e),source:l.source.parseFacet(e),bin:h.bin.parseFacet(e),calculate:d.formula.parseFacet(e),timeUnit:v.timeUnit.parseFacet(e),timeUnitDomain:y.timeUnitDomain.parseFacet(e),summary:g.summary.parseFacet(e),stackScale:m.stackScale.parseFacet(e),colorRank:b.colorRank.parseFacet(e)}}function o(e){return{filter:f.filter.parseLayer(e),formatParse:u.formatParse.parseLayer(e),nullFilter:c.nullFilter.parseLayer(e),nonPositiveFilter:p.nonPositiveFilter.parseLayer(e),source:l.source.parseLayer(e),bin:h.bin.parseLayer(e),calculate:d.formula.parseLayer(e),timeUnit:v.timeUnit.parseLayer(e),timeUnitDomain:y.timeUnitDomain.parseLayer(e),summary:g.summary.parseLayer(e),stackScale:m.stackScale.parseLayer(e),colorRank:b.colorRank.parseLayer(e)}}function a(e,t){var n=e.component.data,i=l.source.assemble(e,n);if(i&&t.push(i),g.summary.assemble(n,e).forEach(function(e){t.push(e)}),t.length>0){var r=t[t.length-1],o=b.colorRank.assemble(n);o.length>0&&(r.transform=(r.transform||[]).concat(o));var a=p.nonPositiveFilter.assemble(n);a.length>0&&(r.transform=(r.transform||[]).concat(a))}else{if(s.keys(n.colorRank).length>0)throw new Error("Invalid colorRank not merged");if(s.keys(n.nonPositiveFilter).length>0)throw new Error("Invalid nonPositiveFilter not merged")}var u=m.stackScale.assemble(n);return u&&t.push(u),y.timeUnitDomain.assemble(n).forEach(function(e){t.push(e)}),t}var s=e("../../util"),l=e("./source"),u=e("./formatparse"),c=e("./nullfilter"),f=e("./filter"),h=e("./bin"),d=e("./formula"),p=e("./nonpositivenullfilter"),g=e("./summary"),m=e("./stackscale"),v=e("./timeunit"),y=e("./timeunitdomain"),b=e("./colorrank");n.parseUnitData=i,n.parseFacetData=r,n.parseLayerData=o,n.assembleData=a},{"../../util":64,"./bin":19,"./colorrank":20,"./filter":22,"./formatparse":23,"./formula":24,"./nonpositivenullfilter":25,"./nullfilter":26,"./source":27,"./stackscale":28,"./summary":29,"./timeunit":30,"./timeunitdomain":31}],22:[function(e,t,n){"use strict";var i,r=e("../../filter"),o=e("../../util");!function(e){function t(e){var t=e.transform().filter;return o.isArray(t)?"("+t.map(function(e){return r.expression(e)}).filter(function(e){return void 0!==e}).join(") && (")+")":t?r.expression(t):void 0}function n(e){var n=t(e),i=e.child().component.data;return!i.source&&i.filter&&(n=(n?n+" && ":"")+i.filter,delete i.filter),n}function i(e){var n=t(e);return e.children().forEach(function(t){var i=t.component.data;e.compatibleSource(t)&&i.filter&&i.filter===n&&delete i.filter}),n}function a(e){var t=e.filter;return t?[{type:"filter",test:t}]:[]}e.parse=t,e.parseUnit=t,e.parseFacet=n,e.parseLayer=i,e.assemble=a}(i=n.filter||(n.filter={}))},{"../../filter":53,"../../util":64}],23:[function(e,t,n){"use strict";var i,r=e("../../fielddef"),o=e("../../type"),a=e("../../util");!function(e){function t(e){var t=(e.transform().calculate||[]).reduce(function(e,t){return e[t.field]=!0,e},{}),n={};return e.forEach(function(e){if(e.type===o.TEMPORAL)n[e.field]="date";else if(e.type===o.QUANTITATIVE){if(r.isCount(e)||t[e.field])return;n[e.field]="number"}}),n}function n(e){var n=t(e),i=e.child().component.data;return!i.source&&i.formatParse&&(a.extend(n,i.formatParse),delete i.formatParse),n}function i(e){var n=t(e);return e.children().forEach(function(t){var i=t.component.data;e.compatibleSource(t)&&!a.differ(i.formatParse,n)&&(a.extend(n,i.formatParse),delete i.formatParse)}),n}e.parseUnit=t,e.parseFacet=n,e.parseLayer=i}(i=n.formatParse||(n.formatParse={}))},{"../../fielddef":52,"../../type":63,"../../util":64}],24:[function(e,t,n){"use strict";var i,r=e("../../util");!function(e){function t(e){return(e.transform().calculate||[]).reduce(function(e,t){return e[r.hash(t)]=t,e},{})}function n(e){var n=t(e),i=e.child().component.data;return i.source||(r.extend(n,i.calculate),delete i.calculate),n}function i(e){var n=t(e);return e.children().forEach(function(e){var t=e.component.data;!t.source&&t.calculate&&(r.extend(n||{},t.calculate),delete t.calculate)}),n}function o(e){return r.vals(e.calculate).reduce(function(e,t){return e.push(r.extend({type:"formula"},t)),e},[])}e.parseUnit=t,e.parseFacet=n,e.parseLayer=i,e.assemble=o}(i=n.formula||(n.formula={}))},{"../../util":64}],25:[function(e,t,n){"use strict";var i,r=e("../../scale"),o=e("../../util");!function(e){function t(e){return e.channels().reduce(function(t,n){var i=e.scale(n);return e.field(n)&&i?(t[e.field(n)]=i.type===r.ScaleType.LOG,t):t},{})}function n(e){var t=e.child().component.data;if(!t.source){var n=t.nonPositiveFilter;return delete t.nonPositiveFilter,n}return{}}function i(e){var t={};return e.children().forEach(function(n){var i=n.component.data;e.compatibleSource(n)&&!o.differ(i.nonPositiveFilter,t)&&(o.extend(t,i.nonPositiveFilter),delete i.nonPositiveFilter)}),t}function a(e){return o.keys(e.nonPositiveFilter).filter(function(t){return e.nonPositiveFilter[t]}).map(function(e){return{type:"filter",test:'datum["'+e+'"] > 0'}})}e.parseUnit=t,e.parseFacet=n,e.parseLayer=i,e.assemble=a}(i=n.nonPositiveFilter||(n.nonPositiveFilter={}))},{"../../scale":56,"../../util":64}],26:[function(e,t,n){"use strict";var i,r=e("../../type"),o=e("../../util"),a={nominal:!1,ordinal:!1,quantitative:!0,temporal:!0};!function(e){function t(e){var t=e.transform(),n=t.filterInvalid;return void 0===n&&void 0!==t.filterNull&&(n=t.filterNull,console.warn("filterNull is deprecated. Please use filterInvalid instead.")),e.reduce(function(e,t){return"*"!==t.field&&(n||void 0===n&&t.field&&a[t.type]?e[t.field]=t:e[t.field]=null),e},{})}function n(e){var n=t(e),i=e.child().component.data;return i.source||(o.extend(n,i.nullFilter),delete i.nullFilter),n}function i(e){var n=t(e);return e.children().forEach(function(t){var i=t.component.data;e.compatibleSource(t)&&!o.differ(i.nullFilter,n)&&(o.extend(n,i.nullFilter),delete i.nullFilter)}),n}function s(e){var t=o.keys(e.nullFilter).reduce(function(t,n){var i=e.nullFilter[n];return null!==i&&(t.push('datum["'+i.field+'"] !== null'),o.contains([r.QUANTITATIVE,r.TEMPORAL],i.type)&&t.push('!isNaN(datum["'+i.field+'"])')),t},[]);return t.length>0?[{type:"filter",test:t.join(" && ")}]:[]}e.parseUnit=t,e.parseFacet=n,e.parseLayer=i,e.assemble=s}(i=n.nullFilter||(n.nullFilter={}))},{"../../type":63,"../../util":64}],27:[function(e,t,n){"use strict";var i,r=e("../../data"),o=e("../../util"),a=e("./nullfilter"),s=e("./filter"),l=e("./bin"),u=e("./formula"),c=e("./timeunit");!function(e){function t(e){var t=e.data();if(t){var n={name:e.dataName(r.SOURCE)};if(t.values&&t.values.length>0)n.values=t.values,n.format={type:"json"};else if(t.url){n.url=t.url;var i=/(?:\.([^.]+))?$/.exec(n.url)[1];o.contains(["json","csv","tsv","topojson"],i)||(i="json");var a=t.format||{},s=a.type||t.formatType;n.format=o.extend({type:s?s:i},a.property?{property:a.property}:{},a.feature?{feature:a.feature}:a.mesh?{mesh:a.mesh}:{})}return n}if(!e.parent())return{name:e.dataName(r.SOURCE)}}function n(e){var n=t(e);return e.child().component.data.source||e.child().renameData(e.child().dataName(r.SOURCE),e.dataName(r.SOURCE)),n}function i(e){var n=t(e);return e.children().forEach(function(t){var n=t.component.data;if(e.compatibleSource(t)){var i=!n.filter&&!n.formatParse&&!n.nullFilter;i?(t.renameData(t.dataName(r.SOURCE),e.dataName(r.SOURCE)),delete n.source):n.source={name:t.dataName(r.SOURCE),source:e.dataName(r.SOURCE)}}}),n}function f(e,t){if(t.source){var n=t.source;return t.formatParse&&(t.source.format=t.source.format||{},t.source.format.parse=t.formatParse),n.transform=[].concat(a.nullFilter.assemble(t),u.formula.assemble(t),s.filter.assemble(t),l.bin.assemble(t),c.timeUnit.assemble(t)),n}return null}e.parseUnit=t,e.parseFacet=n,e.parseLayer=i,e.assemble=f}(i=n.source||(n.source={}))},{"../../data":48,"../../util":64,"./bin":19,"./filter":22,"./formula":24,"./nullfilter":26,"./timeunit":30}],28:[function(e,t,n){"use strict";var i,r=e("../../data"),o=e("../../fielddef"),a=e("../../util");!function(e){function t(e){var t=e.stack();if(t){var n=t.groupbyChannel,i=t.fieldChannel,o=[],s=e.field(n);return s&&o.push(s),{name:e.dataName(r.STACKED_SCALE),source:e.dataName(r.SUMMARY),transform:[a.extend({type:"aggregate",summarize:[{ops:["sum"],field:e.field(i)}]},o.length>0?{groupby:o}:{})]}}return null}function n(e){var t=e.child(),n=t.component.data;if(!n.source&&n.stackScale){var i=n.stackScale,a=e.dataName(r.STACKED_SCALE);return t.renameData(i.name,a),i.name=a,i.source=e.dataName(r.SUMMARY),i.transform[0].groupby=e.reduce(function(e,t){return e.push(o.field(t)),e},i.transform[0].groupby),delete n.stackScale,i}return null}function i(e){return null}function s(e){return e.stackScale}e.parseUnit=t,e.parseFacet=n,e.parseLayer=i,e.assemble=s}(i=n.stackScale||(n.stackScale={}))},{"../../data":48,"../../fielddef":52,"../../util":64}],29:[function(e,t,n){"use strict";var i,r=e("../../aggregate"),o=e("../../data"),a=e("../../fielddef"),s=e("../../util");!function(e){function t(e,t){return t.bin?(e[a.field(t,{binSuffix:"start"})]=!0,e[a.field(t,{binSuffix:"mid"})]=!0,e[a.field(t,{binSuffix:"end"})]=!0,e[a.field(t,{binSuffix:"range"})]=!0):e[a.field(t)]=!0,e}function n(e){var n={},i={};return e.forEach(function(e,o){e.aggregate?e.aggregate===r.AggregateOp.COUNT?(i["*"]=i["*"]||{},i["*"].count=!0):(i[e.field]=i[e.field]||{},i[e.field][e.aggregate]=!0):t(n,e)}),[{name:e.dataName(o.SUMMARY),dimensions:n,measures:i}]}function i(e){var n=e.child().component.data;if(!n.source&&n.summary){var i=n.summary.map(function(n){n.dimensions=e.reduce(t,n.dimensions);var i=n.name.substr(e.child().name("").length);return e.child().renameData(n.name,i),n.name=i,n});return delete n.summary,i}return[]}function l(e,t){for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];for(var r in i)i.hasOwnProperty(r)&&(n in e?e[n][r]=!0:e[n]={op:!0})}}function u(e){var t={};return e.children().forEach(function(n){var i=n.component.data;!i.source&&i.summary&&i.summary.forEach(function(r){var a=s.hash(r.dimensions);a in t?l(t[a].measures,r.measures):(r.name=e.dataName(o.SUMMARY)+"_"+s.keys(t).length,t[a]=r),n.renameData(n.dataName(o.SUMMARY),t[a].name),delete i.summary})}),s.vals(t)}function c(e,t){return e.summary?e.summary.reduce(function(e,n){var i=n.dimensions,r=n.measures,a=s.keys(i),l=s.reduce(r,function(e,t,n){return e[n]=s.keys(t),e},{});return s.keys(r).length>0&&e.push({name:n.name,source:t.dataName(o.SOURCE),transform:[{type:"aggregate",groupby:a,summarize:l}]}),e},[]):[]}e.parseUnit=n,e.parseFacet=i,e.parseLayer=u,e.assemble=c}(i=n.summary||(n.summary={}))},{"../../aggregate":11,"../../data":48,"../../fielddef":52,"../../util":64}],30:[function(e,t,n){"use strict";var i,r=e("../../fielddef"),o=e("../../timeunit"),a=e("../../type"),s=e("../../util");!function(e){function t(e){return e.reduce(function(e,t,n){if(t.type===a.TEMPORAL&&t.timeUnit){var i=r.field(t);e[i]={type:"formula",field:r.field(t),expr:o.fieldExpr(t.timeUnit,t.field)}}return e},{})}function n(e){var n=t(e),i=e.child().component.data;return i.source||(s.extend(n,i.timeUnit),delete i.timeUnit),n}function i(e){var n=t(e);return e.children().forEach(function(e){var t=e.component.data;t.source||(s.extend(n,t.timeUnit),delete t.timeUnit)}),n}function l(e){return s.vals(e.timeUnit)}e.parseUnit=t,e.parseFacet=n,e.parseLayer=i,e.assemble=l}(i=n.timeUnit||(n.timeUnit={}))},{"../../fielddef":52,"../../timeunit":61,"../../type":63,"../../util":64}],31:[function(e,t,n){"use strict";var i,r=e("../../datetime"),o=e("../../timeunit"),a=e("../../util");!function(e){function t(e){return e.reduce(function(e,t,n){if(t.timeUnit){var i=o.rawDomain(t.timeUnit,n);i&&(e[t.timeUnit]=!0)}return e},{})}function n(e){return a.extend(t(e),e.child().component.data.timeUnitDomain)}function i(e){return a.extend(t(e),e.children().forEach(function(e){return e.component.data.timeUnitDomain}))}function s(e){return a.keys(e.timeUnitDomain).reduce(function(e,t){var n=t,i=o.rawDomain(n,null);if(i){var a={};a[n]='datum["data"]',e.push({name:n,values:i,transform:[{type:"formula",field:"date",expr:r.dateTimeExpr(a)}]})}return e},[])}e.parseUnit=t,e.parseFacet=n,e.parseLayer=i,e.assemble=s}(i=n.timeUnitDomain||(n.timeUnitDomain={}))},{"../../datetime":49,"../../timeunit":61,"../../util":64}],32:[function(e,t,n){"use strict";function i(e){var t=e.child(),n=y.extend({},t.config().cell,t.config().facet.cell);return y.extend({x:e.has(f.COLUMN)?{scale:e.scaleName(f.COLUMN),field:e.field(f.COLUMN),offset:e.scale(f.COLUMN).padding/2}:{value:e.config().facet.scale.padding/2},y:e.has(f.ROW)?{scale:e.scaleName(f.ROW),field:e.field(f.ROW),offset:e.scale(f.ROW).padding/2}:{value:e.config().facet.scale.padding/2},width:{field:{parent:e.child().sizeName("width")}},height:{field:{parent:e.child().sizeName("height")}}},t.assembleParentGroupProperties(n))}function r(e,t){var n=null,i=e.child();return i.has(t)&&i.axis(t)&&(n=t===f.X?o(e):a(e),i.axis(t)&&b.gridShow(i,t)?i.component.axis[t]=b.parseInnerAxis(t,i):delete i.component.axis[t]),n}function o(e){var t=e.has(f.COLUMN);return y.extend({name:e.name("x-axes"),type:"group"},t?{from:{data:e.dataTable(),transform:[{type:"aggregate",groupby:[e.field(f.COLUMN)],summarize:{"*":["count"]}}]}}:{},{properties:{update:{width:{field:{parent:e.child().sizeName("width")}},height:{field:{group:"height"}},x:t?{scale:e.scaleName(f.COLUMN),field:e.field(f.COLUMN),offset:e.scale(f.COLUMN).padding/2}:{value:e.config().facet.scale.padding/2}}},axes:[b.parseAxis(f.X,e.child())]})}function a(e){var t=e.has(f.ROW);return y.extend({name:e.name("y-axes"),type:"group"},t?{from:{data:e.dataTable(),transform:[{type:"aggregate",groupby:[e.field(f.ROW)],summarize:{"*":["count"]}}]}}:{},{properties:{update:{width:{field:{group:"width"}},height:{field:{parent:e.child().sizeName("height")}},y:t?{scale:e.scaleName(f.ROW),field:e.field(f.ROW),offset:e.scale(f.ROW).padding/2}:{value:e.config().facet.scale.padding/2}}},axes:[b.parseAxis(f.Y,e.child())]})}function s(e){var t=e.config().facet.grid,n={name:e.name("row-grid"),type:"rule",from:{data:e.dataTable(),transform:[{type:"facet",groupby:[e.field(f.ROW)]}]},properties:{update:{y:{scale:e.scaleName(f.ROW),field:e.field(f.ROW)},x:{value:0,offset:-t.offset},x2:{field:{group:"width"},offset:t.offset},stroke:{value:t.color},strokeOpacity:{value:t.opacity},strokeWidth:{value:.5}}}};return[n,{name:e.name("row-grid-end"),type:"rule",properties:{update:{y:{field:{group:"height"}},x:{value:0,offset:-t.offset},x2:{field:{group:"width"},offset:t.offset},stroke:{value:t.color},strokeOpacity:{value:t.opacity},strokeWidth:{value:.5}}}}]}function l(e){var t=e.config().facet.grid,n={name:e.name("column-grid"),type:"rule",from:{data:e.dataTable(),transform:[{type:"facet",groupby:[e.field(f.COLUMN)]}]},properties:{update:{x:{scale:e.scaleName(f.COLUMN),field:e.field(f.COLUMN)},y:{value:0,offset:-t.offset},y2:{field:{group:"height"},offset:t.offset},stroke:{value:t.color},strokeOpacity:{value:t.opacity},strokeWidth:{value:.5}}}};return[n,{name:e.name("column-grid-end"),type:"rule",properties:{update:{x:{field:{group:"width"}},y:{value:0,offset:-t.offset},y2:{field:{group:"height"},offset:t.offset},stroke:{value:t.color},strokeOpacity:{value:t.opacity},strokeWidth:{value:.5}}}}]}var u=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},c=e("../axis"),f=e("../channel"),h=e("../config"),d=e("../data"),p=e("../encoding"),g=e("../fielddef"),m=e("../scale"),v=e("../type"),y=e("../util"),b=e("./axis"),_=e("./common"),E=e("./data/data"),x=e("./layout"),w=e("./model"),T=e("./scale"),S=function(e){function t(t,n,i){e.call(this,t,n,i);var r=this._config=this._initConfig(t.config,n),o=this._child=_.buildModel(t.spec,this,this.name("child")),a=this._facet=this._initFacet(t.facet);this._scale=this._initScale(a,r,o),this._axis=this._initAxis(a,r,o)}return u(t,e),t.prototype._initConfig=function(e,t){return y.mergeDeep(y.duplicate(h.defaultConfig),e,t?t.config():{})},t.prototype._initFacet=function(e){e=y.duplicate(e);var t=this;return p.channelMappingForEach(this.channels(),e,function(e,n){g.isDimension(e)||t.addWarning(n+" encoding should be ordinal."),e.type&&(e.type=v.getFullName(e.type))}),e},t.prototype._initScale=function(e,t,n){return[f.ROW,f.COLUMN].reduce(function(i,r){if(e[r]){var o=e[r].scale||{};i[r]=y.extend({type:m.ScaleType.ORDINAL,round:t.facet.scale.round,padding:r===f.ROW&&n.has(f.Y)||r===f.COLUMN&&n.has(f.X)?t.facet.scale.padding:0},o)}return i},{})},t.prototype._initAxis=function(e,t,n){return[f.ROW,f.COLUMN].reduce(function(i,r){if(e[r]){var o=e[r].axis;if(o!==!1){var a=i[r]=y.extend({},t.facet.axis,o===!0?{}:o||{});if(r===f.ROW){var s=n.axis(f.Y);s&&s.orient!==c.AxisOrient.RIGHT&&!a.orient&&(a.orient=c.AxisOrient.RIGHT),n.has(f.X)&&!a.labelAngle&&(a.labelAngle=a.orient===c.AxisOrient.RIGHT?90:270)}}}return i},{})},t.prototype.facet=function(){return this._facet},t.prototype.has=function(e){return!!this._facet[e]},t.prototype.child=function(){return this._child},t.prototype.hasSummary=function(){for(var e=this.component.data.summary,t=0;t<e.length;t++)if(y.keys(e[t].measures).length>0)return!0;return!1},t.prototype.dataTable=function(){return(this.hasSummary()?d.SUMMARY:d.SOURCE)+""},t.prototype.fieldDef=function(e){return this.facet()[e]},t.prototype.stack=function(){return null},t.prototype.parseData=function(){this.child().parseData(),this.component.data=E.parseFacetData(this)},t.prototype.parseSelectionData=function(){},t.prototype.parseLayoutData=function(){this.child().parseLayoutData(),this.component.layout=x.parseFacetLayout(this)},t.prototype.parseScale=function(){var e=this.child(),t=this;e.parseScale();var n=this.component.scale=T.parseScaleComponent(this);y.keys(e.component.scale).forEach(function(i){n[i]=e.component.scale[i],y.vals(n[i]).forEach(function(n){var i=n.name.substr(e.name("").length),r=t.scaleName(i);e.renameScale(n.name,r),n.name=r}),delete e.component.scale[i]})},t.prototype.parseMark=function(){this.child().parseMark(),this.component.mark=y.extend({name:this.name("cell"),type:"group",from:y.extend(this.dataTable()?{data:this.dataTable()}:{},{transform:[{type:"facet",groupby:[].concat(this.has(f.ROW)?[this.field(f.ROW)]:[],this.has(f.COLUMN)?[this.field(f.COLUMN)]:[])}]}),properties:{update:i(this)}},this.child().assembleGroup())},t.prototype.parseAxis=function(){this.child().parseAxis(),this.component.axis=b.parseAxisComponent(this,[f.ROW,f.COLUMN])},t.prototype.parseAxisGroup=function(){var e=r(this,f.X),t=r(this,f.Y);this.component.axisGroup=y.extend(e?{x:e}:{},t?{y:t}:{})},t.prototype.parseGridGroup=function(){var e=this.child();this.component.gridGroup=y.extend(!e.has(f.X)&&this.has(f.COLUMN)?{column:l(this)}:{},!e.has(f.Y)&&this.has(f.ROW)?{row:s(this)}:{})},t.prototype.parseLegend=function(){this.child().parseLegend(),this.component.legend=this._child.component.legend,this._child.component.legend={}},t.prototype.assembleParentGroupProperties=function(){return null},t.prototype.assembleData=function(e){return E.assembleData(this,e),this._child.assembleData(e)},t.prototype.assembleLayout=function(e){return this._child.assembleLayout(e),x.assembleLayout(this,e)},t.prototype.assembleMarks=function(){return[].concat(y.vals(this.component.axisGroup),y.flatten(y.vals(this.component.gridGroup)),this.component.mark)},t.prototype.channels=function(){return[f.ROW,f.COLUMN]},t.prototype.mapping=function(){return this.facet()},t.prototype.isFacet=function(){return!0},t}(w.Model);n.FacetModel=S},{"../axis":12,"../channel":14,"../config":47,"../data":48,"../encoding":50,"../fielddef":52,"../scale":56,"../type":63,"../util":64,"./axis":15,"./common":16,"./data/data":21,"./layout":34,"./model":44,"./scale":45}],33:[function(e,t,n){"use strict";var i=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},r=e("../util"),o=e("../config"),a=e("./data/data"),s=e("./layout"),l=e("./model"),u=e("./common"),c=e("../vega.schema"),f=function(e){function t(t,n,i){var r=this;e.call(this,t,n,i),this._config=this._initConfig(t.config,n),this._children=t.layers.map(function(e,t){return u.buildModel(e,r,r.name("layer_"+t))})}return i(t,e),t.prototype._initConfig=function(e,t){return r.mergeDeep(r.duplicate(o.defaultConfig),e,t?t.config():{})},t.prototype.has=function(e){return!1},t.prototype.children=function(){return this._children},t.prototype.isOrdinalScale=function(e){return this._children[0].isOrdinalScale(e)},t.prototype.dataTable=function(){return this._children[0].dataTable()},t.prototype.fieldDef=function(e){return null},t.prototype.stack=function(){return null},t.prototype.parseData=function(){this._children.forEach(function(e){e.parseData()}),this.component.data=a.parseLayerData(this)},t.prototype.parseSelectionData=function(){},t.prototype.parseLayoutData=function(){this._children.forEach(function(e,t){e.parseLayoutData()}),this.component.layout=s.parseLayerLayout(this)},t.prototype.parseScale=function(){var e=this,t=this.component.scale={};this._children.forEach(function(n){n.parseScale(),r.keys(n.component.scale).forEach(function(i){var o=n.component.scale[i];if(o){var a=t[i];if(a&&a.main){var s=a.main.domain,l=o.main.domain;if(r.isArray(s))r.isArray(o.main.domain)?a.main.domain=s.concat(l):e.addWarning("custom domain scale cannot be unioned with default field-based domain");else{var u=c.isUnionedDomain(s)?s.fields:[s];r.isArray(l)&&e.addWarning("custom domain scale cannot be unioned with default field-based domain");var f=c.isDataRefDomain(l)?u.concat([l]):c.isUnionedDomain(l)?u.concat(l.fields):u;f=r.unique(f,r.hash),f.length>1?a.main.domain={fields:f}:a.main.domain=f[0]}a.colorLegend=a.colorLegend?a.colorLegend:o.colorLegend,a.binColorLegend=a.binColorLegend?a.binColorLegend:o.binColorLegend}else t[i]=o;r.vals(o).forEach(function(t){var i=t.name.substr(n.name("").length),r=e.scaleName(i);n.renameScale(t.name,r),t.name=r}),delete o[i]}})})},t.prototype.parseMark=function(){this._children.forEach(function(e){e.parseMark()})},t.prototype.parseAxis=function(){var e=this.component.axis={};this._children.forEach(function(t){t.parseAxis(),r.keys(t.component.axis).forEach(function(n){e[n]||(e[n]=t.component.axis[n])})})},t.prototype.parseAxisGroup=function(){return null},t.prototype.parseGridGroup=function(){return null},t.prototype.parseLegend=function(){var e=this.component.legend={};this._children.forEach(function(t){t.parseLegend(),r.keys(t.component.legend).forEach(function(n){e[n]||(e[n]=t.component.legend[n])})})},t.prototype.assembleParentGroupProperties=function(){return null},t.prototype.assembleData=function(e){return a.assembleData(this,e),this._children.forEach(function(t){t.assembleData(e)}),e},t.prototype.assembleLayout=function(e){return this._children.forEach(function(t){t.assembleLayout(e)}),s.assembleLayout(this,e)},t.prototype.assembleMarks=function(){return r.flatten(this._children.map(function(e){return e.assembleMarks()}))},t.prototype.channels=function(){return[]},t.prototype.mapping=function(){return null},t.prototype.isLayer=function(){return!0},t.prototype.compatibleSource=function(e){var t=this.data(),n=e.component.data,i=!n.source||t&&t.url===n.source.url;return i},t}(l.Model);n.LayerModel=f},{"../config":47,"../util":64,"../vega.schema":66,"./common":16,"./data/data":21,"./layout":34,"./model":44}],34:[function(e,t,n){"use strict";function i(e,t){var n=e.component.layout;if(!n.width&&!n.height)return t;var i=v.keys(v.extend(n.width.distinct,n.height.distinct)),r=n.width.formula.concat(n.height.formula).map(function(e){return v.extend({type:"formula"},e)});return[i.length>0?{name:e.dataName(g.LAYOUT),source:e.dataTable(),transform:[{type:"aggregate",summarize:i.map(function(e){return{field:e,ops:["distinct"]}})}].concat(r)}:{name:e.dataName(g.LAYOUT),values:[{}],transform:r}]}function r(e){return{width:o(e,p.X),height:o(e,p.Y)}}function o(e,t){var n=e.config().cell,i=t===p.X?n.width:n.height;return{distinct:h(e,t),formula:[{field:e.channelSizeName(t),expr:a(e,t,i)}]}}function a(e,t,n){if(e.scale(t)){if(e.isOrdinalScale(t)){var i=e.scale(t);return"("+d(e,t)+" + "+i.padding+") * "+i.bandSize}return n+""}return e.mark()===y.TEXT&&t===p.X?e.config().scale.textBandWidth+"":e.config().scale.bandSize+""}function s(e){return{width:l(e,p.COLUMN),height:l(e,p.ROW)}}function l(e,t){var n=e.child().component.layout,i=t===p.ROW?"height":"width",r=n[i],o=v.extend(h(e,t),r.distinct),a=r.formula.concat([{field:e.channelSizeName(t),expr:u(e,t,e.child().channelSizeName(t))}]);return delete n[i],{distinct:o,formula:a}}function u(e,t,n){var i=e.scale(t);return e.has(t)?'(datum["'+n+'"] + '+i.padding+") * "+d(e,t):'datum["'+n+'"] + '+e.config().facet.scale.padding}function c(e){return{width:f(e,p.X),height:f(e,p.Y)}}function f(e,t){var n=e.children()[0].component.layout,i=t===p.Y?"height":"width",r=n[i],o=r.distinct,a=[{field:e.channelSizeName(t),expr:r.formula[0].expr}];return e.children().forEach(function(e){delete e.component.layout[i]}),{distinct:o,formula:a}}function h(e,t){if(e.has(t)&&e.isOrdinalScale(t)){var n=e.scale(t);if(n.type===m.ScaleType.ORDINAL&&!(n.domain instanceof Array)){var i=e.field(t),r={};return r[i]=!0,r}}return{}}function d(e,t){var n=e.scale(t);if(n.domain instanceof Array)return n.domain.length;var i=e.fieldDef(t).timeUnit,r=i?b.rawDomain(i,t):null;return null!==r?r.length:e.field(t,{datum:!0,prefix:"distinct"})}var p=e("../channel"),g=e("../data"),m=e("../scale"),v=e("../util"),y=e("../mark"),b=e("../timeunit");n.assembleLayout=i,n.parseUnitLayout=r,n.parseFacetLayout=s,n.parseLayerLayout=c},{"../channel":14,"../data":48,"../mark":55,"../scale":56,"../timeunit":61,"../util":64}],35:[function(e,t,n){"use strict";function i(e){return[l.COLOR,l.SIZE,l.SHAPE,l.OPACITY].reduce(function(t,n){return e.legend(n)&&(t[n]=o(e,n)),t},{})}function r(e,t){switch(t){case l.COLOR:var n=e.fieldDef(l.COLOR),i=e.scaleName(s(n)?p.COLOR_LEGEND:l.COLOR);return e.config().mark.filled?{fill:i}:{stroke:i};case l.SIZE:return{size:e.scaleName(l.SIZE)};case l.SHAPE:return{shape:e.scaleName(l.SHAPE)};case l.OPACITY:return{opacity:e.scaleName(l.OPACITY)}}return null}function o(e,t){var n=e.fieldDef(t),i=e.legend(t),o=e.config(),s=r(e,t);s.title=a(i,n,o);var l=d.numberFormat(n,i.format,o);l&&(s.format=l),["offset","orient","values"].forEach(function(e){var t=i[e];void 0!==t&&(s[e]=t)});var u="boolean"!=typeof i&&i.properties||{};return["title","symbols","legend","labels"].forEach(function(i){var r=g[i]?g[i](n,u[i],e,t):u[i];void 0!==r&&h.keys(r).length>0&&(s.properties=s.properties||{},s.properties[i]=r)}),s}function a(e,t,n){return"boolean"!=typeof e&&e.title?e.title:u.title(t,n)}function s(e){return e.type===f.ORDINAL||e.bin||e.timeUnit}var l=e("../channel"),u=e("../fielddef"),c=e("../mark"),f=e("../type"),h=e("../util"),d=e("./common"),p=e("./scale");n.parseLegendComponent=i,n.parseLegend=o,n.title=a,n.useColorLegendScale=s;var g;!function(e){function t(e,t,n,i){var r={},o=n.mark(),a=n.legend(i);switch(o){case c.BAR:case c.TICK:case c.TEXT:r.shape={value:"square"};break;case c.CIRCLE:case c.SQUARE:r.shape={value:o};break;case c.POINT:case c.LINE:case c.AREA:}var u=n.config(),f=u.mark.filled,p=i===l.COLOR?h.without(d.FILL_STROKE_CONFIG,[f?"fill":"stroke","strokeDash","strokeDashOffset"]):h.without(d.FILL_STROKE_CONFIG,["strokeDash","strokeDashOffset"]);p=h.without(p,["strokeDash","strokeDashOffset"]),d.applyMarkConfig(r,n,p),f&&(r.strokeWidth={value:0}),i===l.OPACITY&&delete r.opacity;var g;return n.has(l.COLOR)&&i===l.COLOR?s(e)&&(g={scale:n.scaleName(l.COLOR),field:"data"}):n.fieldDef(l.COLOR).value&&(g={value:n.fieldDef(l.COLOR).value}),void 0!==g?f?r.fill=g:r.stroke=g:i!==l.COLOR&&(r[f?"fill":"stroke"]=r[f?"fill":"stroke"]||{value:u.mark.color}),void 0!==a.symbolColor?r.fill={value:a.symbolColor}:void 0===r.fill&&(void 0!==u.mark.fill?r.fill={value:u.mark.fill}:void 0!==u.mark.stroke&&(r.stroke={value:u.mark.stroke})),void 0!==a.symbolShape?r.shape={value:a.symbolShape}:void 0!==u.mark.shape&&(r.shape={value:u.mark.shape}),void 0!==a.symbolSize&&(r.size={value:a.symbolSize}),void 0!==a.symbolStrokeWidth&&(r.strokeWidth={value:a.symbolStrokeWidth}),r=h.extend(r,t||{}),h.keys(r).length>0?r:void 0}function n(e,t,n,i){var r=n.legend(i),o=n.config(),a={};return i===l.COLOR&&(e.type===f.ORDINAL?t=h.extend({text:{scale:n.scaleName(p.COLOR_LEGEND),field:"data"}},t||{}):e.bin?t=h.extend({text:{scale:n.scaleName(p.COLOR_LEGEND_LABEL),field:"data"}},t||{}):e.type===f.TEMPORAL&&(t=h.extend({text:{template:d.timeTemplate('datum["data"]',e.timeUnit,r.format,r.shortTimeLabels,o)}},t||{}))),void 0!==r.labelAlign&&(a.align={
value:r.labelAlign}),void 0!==r.labelColor&&(a.stroke={value:r.labelColor}),void 0!==r.labelFont&&(a.font={value:r.labelFont}),void 0!==r.labelFontSize&&(a.fontSize={value:r.labelFontSize}),void 0!==r.labelBaseline&&(a.baseline={value:r.labelBaseline}),a=h.extend(a,t||{}),h.keys(a).length>0?a:void 0}function i(e,t,n,i){var r=n.legend(i),o={};return void 0!==r.titleColor&&(o.stroke={value:r.titleColor}),void 0!==r.titleFont&&(o.font={value:r.titleFont}),void 0!==r.titleFontSize&&(o.fontSize={value:r.titleFontSize}),void 0!==r.titleFontWeight&&(o.fontWeight={value:r.titleFontWeight}),o=h.extend(o,t||{}),h.keys(o).length>0?o:void 0}e.symbols=t,e.labels=n,e.title=i}(g=n.properties||(n.properties={}))},{"../channel":14,"../fielddef":52,"../mark":55,"../type":63,"../util":64,"./common":16,"./scale":45}],36:[function(e,t,n){"use strict";var i,r=e("../../channel"),o=e("../../config"),a=e("../../fielddef"),s=e("../common");!function(e){function t(){return"area"}function n(e){var t={},n=e.config(),o=n.mark.orient;t.orient={value:o};var a=e.stack();t.x=i(e.encoding().x,e.scaleName(r.X),o,a),t.y=u(e.encoding().y,e.scaleName(r.Y),o,a);var f=l(e.encoding().x,e.encoding().x2,e.scaleName(r.X),o,a);f&&(t.x2=f);var h=c(e.encoding().y,e.encoding().y2,e.scaleName(r.Y),o,a);return h&&(t.y2=h),s.applyColorAndOpacity(t,e),s.applyMarkConfig(t,e,["interpolate","tension"]),t}function i(e,t,n,i){return i&&r.X===i.fieldChannel?{scale:t,field:a.field(e,{suffix:"start"})}:a.isMeasure(e)?n===o.Orient.HORIZONTAL?e&&e.field?{scale:t,field:a.field(e)}:{scale:t,value:0}:{scale:t,field:a.field(e)}:a.isDimension(e)?{scale:t,field:a.field(e,{binSuffix:"mid"})}:void 0}function l(e,t,n,i,s){if(i===o.Orient.HORIZONTAL){if(s&&r.X===s.fieldChannel)return{scale:n,field:a.field(e,{suffix:"end"})};if(t){if(t.field)return{scale:n,field:a.field(t)};if(t.value)return{scale:n,value:t.value}}return{scale:n,value:0}}}function u(e,t,n,i){return i&&r.Y===i.fieldChannel?{scale:t,field:a.field(e,{suffix:"start"})}:a.isMeasure(e)?n!==o.Orient.HORIZONTAL?e&&e.field?{scale:t,field:a.field(e)}:{field:{group:"height"}}:{scale:t,field:a.field(e)}:a.isDimension(e)?{scale:t,field:a.field(e,{binSuffix:"mid"})}:void 0}function c(e,t,n,i,s){if(i!==o.Orient.HORIZONTAL){if(s&&r.Y===s.fieldChannel)return{scale:n,field:a.field(e,{suffix:"end"})};if(t){if(t.field)return{scale:n,field:a.field(t)};if(t.value)return{scale:n,value:t.value}}return{scale:n,value:0}}}function f(e){}e.markType=t,e.properties=n,e.x=i,e.x2=l,e.y=u,e.y2=c,e.labels=f}(i=n.area||(n.area={}))},{"../../channel":14,"../../config":47,"../../fielddef":52,"../common":16}],37:[function(e,t,n){"use strict";var i,r=e("../../channel"),o=e("../../config"),a=e("../../fielddef"),s=e("../../scale"),l=e("../common");!function(e){function t(){return"rect"}function n(e){var t={},n=e.config().mark.orient,u=e.stack(),c=e.encoding().x,f=e.encoding().x2,h=a.isMeasure(c)||a.isMeasure(f);u&&r.X===u.fieldChannel?(t.x={scale:e.scaleName(r.X),field:e.field(r.X,{suffix:"start"})},t.x2={scale:e.scaleName(r.X),field:e.field(r.X,{suffix:"end"})}):h?n===o.Orient.HORIZONTAL?(e.has(r.X)?t.x={scale:e.scaleName(r.X),field:e.field(r.X)}:t.x={scale:e.scaleName(r.X),value:0},e.has(r.X2)?t.x2={scale:e.scaleName(r.X),field:e.field(r.X2)}:e.scale(r.X).type===s.ScaleType.LOG?t.x2={value:0}:t.x2={scale:e.scaleName(r.X),value:0}):(t.xc={scale:e.scaleName(r.X),field:e.field(r.X)},t.width={value:i(e,r.X)}):e.fieldDef(r.X).bin?e.has(r.SIZE)&&n!==o.Orient.HORIZONTAL?(t.xc={scale:e.scaleName(r.X),field:e.field(r.X,{binSuffix:"mid"})},t.width={scale:e.scaleName(r.SIZE),field:e.field(r.SIZE)}):(t.x={scale:e.scaleName(r.X),field:e.field(r.X,{binSuffix:"start"}),offset:1},t.x2={scale:e.scaleName(r.X),field:e.field(r.X,{binSuffix:"end"})}):(e.has(r.X)?t.xc={scale:e.scaleName(r.X),field:e.field(r.X)}:t.x={value:0,offset:2},t.width=e.has(r.SIZE)&&n!==o.Orient.HORIZONTAL?{scale:e.scaleName(r.SIZE),field:e.field(r.SIZE)}:{value:i(e,r.X)});var d=e.encoding().y,p=e.encoding().y2,g=a.isMeasure(d)||a.isMeasure(p);return u&&r.Y===u.fieldChannel?(t.y={scale:e.scaleName(r.Y),field:e.field(r.Y,{suffix:"start"})},t.y2={scale:e.scaleName(r.Y),field:e.field(r.Y,{suffix:"end"})}):g?n!==o.Orient.HORIZONTAL?(e.has(r.Y)?t.y={scale:e.scaleName(r.Y),field:e.field(r.Y)}:t.y={scale:e.scaleName(r.Y),value:0},e.has(r.Y2)?t.y2={scale:e.scaleName(r.Y),field:e.field(r.Y2)}:e.scale(r.Y).type===s.ScaleType.LOG?t.y2={field:{group:"height"}}:t.y2={scale:e.scaleName(r.Y),value:0}):(t.yc={scale:e.scaleName(r.Y),field:e.field(r.Y)},t.height={value:i(e,r.Y)}):e.fieldDef(r.Y).bin?e.has(r.SIZE)&&n===o.Orient.HORIZONTAL?(t.yc={scale:e.scaleName(r.Y),field:e.field(r.Y,{binSuffix:"mid"})},t.height={scale:e.scaleName(r.SIZE),field:e.field(r.SIZE)}):(t.y={scale:e.scaleName(r.Y),field:e.field(r.Y,{binSuffix:"start"})},t.y2={scale:e.scaleName(r.Y),field:e.field(r.Y,{binSuffix:"end"}),offset:1}):(e.has(r.Y)?t.yc={scale:e.scaleName(r.Y),field:e.field(r.Y)}:t.y2={field:{group:"height"},offset:-1},t.height=e.has(r.SIZE)&&n===o.Orient.HORIZONTAL?{scale:e.scaleName(r.SIZE),field:e.field(r.SIZE)}:{value:i(e,r.Y)}),l.applyColorAndOpacity(t,e),t}function i(e,t){var n=e.fieldDef(r.SIZE);if(n&&void 0!==n.value)return n.value;var i=e.config().mark;return i.barSize?i.barSize:e.isOrdinalScale(t)?e.scale(t).bandSize-1:e.has(t)?i.barThinSize:e.config().scale.bandSize-1}function u(e){}e.markType=t,e.properties=n,e.labels=u}(i=n.bar||(n.bar={}))},{"../../channel":14,"../../config":47,"../../fielddef":52,"../../scale":56,"../common":16}],38:[function(e,t,n){"use strict";var i,r=e("../../channel"),o=e("../../fielddef"),a=e("../common");!function(e){function t(){return"line"}function n(e){var t={},n=e.config();t.x=i(e.encoding().x,e.scaleName(r.X),n),t.y=s(e.encoding().y,e.scaleName(r.Y),n);var o=l(e.encoding().size,n);return o&&(t.strokeWidth=o),a.applyColorAndOpacity(t,e),a.applyMarkConfig(t,e,["interpolate","tension"]),t}function i(e,t,n){return e&&e.field?{scale:t,field:o.field(e,{binSuffix:"mid"})}:{value:0}}function s(e,t,n){return e&&e.field?{scale:t,field:o.field(e,{binSuffix:"mid"})}:{field:{group:"height"}}}function l(e,t){return e&&void 0!==e.value?{value:e.value}:{value:t.mark.lineSize}}function u(e){}e.markType=t,e.properties=n,e.labels=u}(i=n.line||(n.line={}))},{"../../channel":14,"../../fielddef":52,"../common":16}],39:[function(e,t,n){"use strict";function i(e){return b.contains([v.LINE,v.AREA],e.mark())?r(e):o(e)}function r(e){var t=e.mark(),n=e.parent()&&e.parent().isFacet(),i={data:e.dataTable()},r=l(e),o=[{name:e.name("marks"),type:k[t].markType(),from:b.extend(n||r.length>0?{}:i,{transform:[{type:"sort",by:s(e)}]}),properties:{update:k[t].properties(e)}}];if(r.length>0){var c={type:"facet",groupby:r},f=t===v.AREA&&e.stack()?u(e,!0).concat(c):[].concat(c,e.has(d.ORDER)?[{type:"sort",by:a(e)}]:[]);return[{name:e.name("pathgroup"),type:"group",from:b.extend(n?{}:i,{transform:f}),properties:{update:{width:{field:{group:"width"}},height:{field:{group:"height"}}}},marks:o}]}return o}function o(e){var t=e.mark(),n=e.parent()&&e.parent().isFacet(),i={data:e.dataTable()},r=[];if(t===v.TEXT&&e.has(d.COLOR)&&e.config().mark.applyColorToBackground&&!e.has(d.X)&&!e.has(d.Y)&&r.push(b.extend({name:e.name("background"),type:"rect"},n?{}:{from:i},{properties:{update:A.text.background(e)}})),r.push(b.extend({name:e.name("marks"),type:k[t].markType()},!n||e.stack()||e.has(d.ORDER)?{from:b.extend(n?{}:i,e.stack()?{transform:u(e,!1)}:e.has(d.ORDER)?{transform:[{type:"sort",by:a(e)}]}:{})}:{},{properties:{update:k[t].properties(e)}})),e.has(d.LABEL)&&k[t].labels){var o=k[t].labels(e);void 0!==o&&r.push(b.extend({name:e.name("label"),type:"text"},n?{}:{from:i},{properties:{update:o}}))}return r}function a(e){if(e.has(d.ORDER)){var t=e.encoding().order;return t instanceof Array?t.map(x.sortField):x.sortField(t)}return null}function s(e){if(e.mark()===v.LINE&&e.has(d.PATH)){var t=e.encoding().path;return t instanceof Array?t.map(x.sortField):x.sortField(t)}return"-"+e.field(e.config().mark.orient===p.Orient.HORIZONTAL?d.Y:d.X,{binSuffix:"mid"})}function l(e){return[d.COLOR,d.DETAIL,d.OPACITY,d.SHAPE].reduce(function(t,n){return e.has(n)&&!e.fieldDef(n).aggregate&&t.push(e.field(n)),t},[])}function u(e,t){var n=c(e);return t?[f(e,n),h(e,n)]:[h(e,n)]}function c(e){var t=e.encoding();return d.STACK_GROUP_CHANNELS.reduce(function(n,i){var r=t[i];if(g.has(t,i))if(b.isArray(r))r.forEach(function(e){n.push(m.field(e))});else{var o=r,a=e.scale(i),s=m.field(o,{binSuffix:a&&a.type===y.ScaleType.ORDINAL?"range":"start"});s&&n.push(s)}return n},[])}function f(e,t){var n=e.stack();return{type:"impute",field:e.field(n.fieldChannel),groupby:t,orderby:[e.field(n.groupbyChannel,{binSuffix:"mid"})],method:"value",value:0}}function h(e,t){var n=e.stack(),i=e.encoding(),r=e.has(d.ORDER)?(b.isArray(i[d.ORDER])?i[d.ORDER]:[i[d.ORDER]]).map(x.sortField):t.map(function(e){return"-"+e}),o=e.field(n.fieldChannel),a={type:"stack",groupby:[e.field(n.groupbyChannel,{binSuffix:"mid"})||"undefined"],field:e.field(n.fieldChannel),sortby:r,output:{start:o+"_start",end:o+"_end"}};return n.offset&&(a.offset=n.offset),a}var d=e("../../channel"),p=e("../../config"),g=e("../../encoding"),m=e("../../fielddef"),v=e("../../mark"),y=e("../../scale"),b=e("../../util"),_=e("./area"),E=e("./bar"),x=e("../common"),w=e("./line"),T=e("./point"),S=e("./rule"),A=e("./text"),C=e("./tick"),k={area:_.area,bar:E.bar,line:w.line,point:T.point,text:A.text,tick:C.tick,rule:S.rule,circle:T.circle,square:T.square};n.parseMark=i},{"../../channel":14,"../../config":47,"../../encoding":50,"../../fielddef":52,"../../mark":55,"../../scale":56,"../../util":64,"../common":16,"./area":36,"./bar":37,"./line":38,"./point":40,"./rule":41,"./text":42,"./tick":43}],40:[function(e,t,n){"use strict";var i,r=e("../../channel"),o=e("../../fielddef"),a=e("../common");!function(e){function t(){return"symbol"}function n(e,t){var n={},o=e.config();return n.x=i(e.encoding().x,e.scaleName(r.X),o),n.y=s(e.encoding().y,e.scaleName(r.Y),o),n.size=l(e.encoding().size,e.scaleName(r.SIZE),e.scale(r.SIZE),o),n.shape=u(e.encoding().shape,e.scaleName(r.SHAPE),e.scale(r.SHAPE),o,t),a.applyColorAndOpacity(n,e),n}function i(e,t,n){return e&&e.field?{scale:t,field:o.field(e,{binSuffix:"mid"})}:{value:n.scale.bandSize/2}}function s(e,t,n){return e&&e.field?{scale:t,field:o.field(e,{binSuffix:"mid"})}:{value:n.scale.bandSize/2}}function l(e,t,n,i){if(e){if(e.field)return{scale:t,field:o.field(e,{scaleType:n.type})};if(void 0!==e.value)return{value:e.value}}return{value:i.mark.size}}function u(e,t,n,i,r){if(r)return{value:r};if(e){if(e.field)return{scale:t,field:o.field(e,{scaleType:n.type})};if(e.value)return{value:e.value}}return{value:i.mark.shape}}e.markType=t,e.properties=n}(i=n.point||(n.point={}));var s;!function(e){function t(){return"symbol"}function n(e){return i.properties(e,"circle")}function r(e){}e.markType=t,e.properties=n,e.labels=r}(s=n.circle||(n.circle={}));var l;!function(e){function t(){return"symbol"}function n(e){return i.properties(e,"square")}function r(e){}e.markType=t,e.properties=n,e.labels=r}(l=n.square||(n.square={}))},{"../../channel":14,"../../fielddef":52,"../common":16}],41:[function(e,t,n){"use strict";var i,r=e("../../channel"),o=e("../../config"),a=e("../common");!function(e){function t(){return"rule"}function n(e){var t={};return e.config().mark.orient===o.Orient.VERTICAL?(e.has(r.X)?t.x={scale:e.scaleName(r.X),field:e.field(r.X,{binSuffix:"mid"})}:t.x={value:0},e.has(r.Y)?t.y={scale:e.scaleName(r.Y),field:e.field(r.Y,{binSuffix:"mid"})}:t.y={field:{group:"height"}},e.has(r.Y2)?t.y2={scale:e.scaleName(r.Y),field:e.field(r.Y2,{binSuffix:"mid"})}:t.y2={value:0}):(e.has(r.Y)?t.y={scale:e.scaleName(r.Y),field:e.field(r.Y,{binSuffix:"mid"})}:t.y={value:0},e.has(r.X)?t.x={scale:e.scaleName(r.X),field:e.field(r.X,{binSuffix:"mid"})}:t.x={value:0},e.has(r.X2)?t.x2={scale:e.scaleName(r.X),field:e.field(r.X2,{binSuffix:"mid"})}:t.x2={field:{group:"width"}}),a.applyColorAndOpacity(t,e),e.has(r.SIZE)?t.strokeWidth={scale:e.scaleName(r.SIZE),field:e.field(r.SIZE)}:t.strokeWidth={value:i(e)},t}function i(e){var t=e.fieldDef(r.SIZE);return t&&void 0!==t.value?t.value:e.config().mark.ruleSize}function s(e){}e.markType=t,e.properties=n,e.labels=s}(i=n.rule||(n.rule={}))},{"../../channel":14,"../../config":47,"../common":16}],42:[function(e,t,n){"use strict";var i,r=e("../../channel"),o=e("../common"),a=e("../../fielddef"),s=e("../../type");!function(e){function t(){return"text"}function n(e){return{x:{value:0},y:{value:0},width:{field:{group:"width"}},height:{field:{group:"height"}},fill:{scale:e.scaleName(r.COLOR),field:e.field(r.COLOR,e.fieldDef(r.COLOR).type===s.ORDINAL?{prefix:"rank"}:{})}}}function i(e){var t={};o.applyMarkConfig(t,e,["angle","align","baseline","dx","dy","font","fontWeight","fontStyle","radius","theta","text"]);var n=e.config(),i=e.fieldDef(r.TEXT);if(t.x=l(e.encoding().x,e.scaleName(r.X),n,i),t.y=u(e.encoding().y,e.scaleName(r.Y),n),t.fontSize=c(e.encoding().size,e.scaleName(r.SIZE),n),t.text=f(e.encoding().text,e.scaleName(r.TEXT),n),!e.config().mark.applyColorToBackground||e.has(r.X)||e.has(r.Y))o.applyColorAndOpacity(t,e);else{t.fill={value:"black"};var a=e.config().mark.opacity;a&&(t.opacity={value:a})}return t}function l(e,t,n,i){return e&&e.field?{scale:t,field:a.field(e,{binSuffix:"mid"})}:i&&i.type===s.QUANTITATIVE?{field:{group:"width"},offset:-5}:{value:n.scale.textBandWidth/2}}function u(e,t,n){return e&&e.field?{scale:t,field:a.field(e,{binSuffix:"mid"})}:{value:n.scale.bandSize/2}}function c(e,t,n){if(e){if(e.field)return{scale:t,field:a.field(e)};if(e.value)return{value:e.value}}return{value:n.mark.fontSize}}function f(e,t,n){if(e){if(e.field){if(s.QUANTITATIVE===e.type){var i=o.numberFormat(e,n.mark.format,n),r="number"+(i?":'"+i+"'":"");return{template:"{{"+a.field(e,{datum:!0})+" | "+r+"}}"}}return s.TEMPORAL===e.type?{template:o.timeTemplate(a.field(e,{datum:!0}),e.timeUnit,n.mark.format,n.mark.shortTimeLabels,n)}:{field:e.field}}if(e.value)return{value:e.value}}return{value:n.mark.text}}e.markType=t,e.background=n,e.properties=i}(i=n.text||(n.text={}))},{"../../channel":14,"../../fielddef":52,"../../type":63,"../common":16}],43:[function(e,t,n){"use strict";var i,r=e("../../channel"),o=e("../../config"),a=e("../../fielddef"),s=e("../common");!function(e){function t(){return"rect"}function n(e){var t={},n=e.config();return t.xc=i(e.encoding().x,e.scaleName(r.X),n),t.yc=l(e.encoding().y,e.scaleName(r.Y),n),n.mark.orient===o.Orient.HORIZONTAL?(t.width=u(e.encoding().size,e.scaleName(r.SIZE),n,(e.scale(r.X)||{}).bandSize),t.height={value:n.mark.tickThickness}):(t.width={value:n.mark.tickThickness},t.height=u(e.encoding().size,e.scaleName(r.SIZE),n,(e.scale(r.Y)||{}).bandSize)),s.applyColorAndOpacity(t,e),t}function i(e,t,n){if(e){if(e.field)return{scale:t,field:a.field(e,{binSuffix:"mid"})};if(e.value)return{value:e.value}}return{value:n.scale.bandSize/2}}function l(e,t,n){if(e){if(e.field)return{scale:t,field:a.field(e,{binSuffix:"mid"})};if(e.value)return{value:e.value}}return{value:n.scale.bandSize/2}}function u(e,t,n,i){if(e){if(e.field)return{scale:t,field:e.field};if(void 0!==e.value)return{value:e.value}}if(n.mark.tickSize)return{value:n.mark.tickSize};var r=void 0!==i?i:n.scale.bandSize;return{value:r/1.5}}function c(e){}e.markType=t,e.properties=n,e.labels=c}(i=n.tick||(n.tick={}))},{"../../channel":14,"../../config":47,"../../fielddef":52,"../common":16}],44:[function(e,t,n){"use strict";var i=e("../channel"),r=e("../encoding"),o=e("../fielddef"),a=e("../scale"),s=e("../util"),l=function(){function e(){this._nameMap={}}return e.prototype.rename=function(e,t){this._nameMap[e]=t},e.prototype.get=function(e){for(;this._nameMap[e];)e=this._nameMap[e];return e},e}(),u=function(){function e(e,t,n){this._warnings=[],this._parent=t,this._name=e.name||n,this._dataNameMap=t?t._dataNameMap:new l,this._scaleNameMap=t?t._scaleNameMap:new l,this._sizeNameMap=t?t._sizeNameMap:new l,this._data=e.data,this._description=e.description,this._transform=e.transform,this.component={data:null,layout:null,mark:null,scale:null,axis:null,axisGroup:null,gridGroup:null,legend:null}}return e.prototype.parse=function(){this.parseData(),this.parseSelectionData(),this.parseLayoutData(),this.parseScale(),this.parseAxis(),this.parseLegend(),this.parseAxisGroup(),this.parseGridGroup(),this.parseMark()},e.prototype.assembleScales=function(){return s.flatten(s.vals(this.component.scale).map(function(e){var t=[e.main];return e.colorLegend&&t.push(e.colorLegend),e.binColorLegend&&t.push(e.binColorLegend),t}))},e.prototype.assembleAxes=function(){return s.vals(this.component.axis)},e.prototype.assembleLegends=function(){return s.vals(this.component.legend)},e.prototype.assembleGroup=function(){var e={};e.marks=this.assembleMarks();var t=this.assembleScales();t.length>0&&(e.scales=t);var n=this.assembleAxes();n.length>0&&(e.axes=n);var i=this.assembleLegends();return i.length>0&&(e.legends=i),e},e.prototype.reduce=function(e,t,n){return r.channelMappingReduce(this.channels(),this.mapping(),e,t,n)},e.prototype.forEach=function(e,t){r.channelMappingForEach(this.channels(),this.mapping(),e,t)},e.prototype.parent=function(){return this._parent},e.prototype.name=function(e,t){return void 0===t&&(t="_"),(this._name?this._name+t:"")+e},e.prototype.description=function(){return this._description},e.prototype.data=function(){return this._data},e.prototype.renameData=function(e,t){this._dataNameMap.rename(e,t)},e.prototype.dataName=function(e){return this._dataNameMap.get(this.name(String(e)))},e.prototype.renameSize=function(e,t){this._sizeNameMap.rename(e,t)},e.prototype.channelSizeName=function(e){return this.sizeName(e===i.X||e===i.COLUMN?"width":"height")},e.prototype.sizeName=function(e){return this._sizeNameMap.get(this.name(e,"_"))},e.prototype.transform=function(){return this._transform||{}},e.prototype.field=function(e,t){void 0===t&&(t={});var n=this.fieldDef(e);return n.bin&&(t=s.extend({binSuffix:this.scale(e).type===a.ScaleType.ORDINAL?"range":"start"},t)),o.field(n,t)},e.prototype.scale=function(e){return this._scale[e]},e.prototype.isOrdinalScale=function(e){var t=this.scale(e);return t&&t.type===a.ScaleType.ORDINAL},e.prototype.renameScale=function(e,t){this._scaleNameMap.rename(e,t)},e.prototype.scaleName=function(e){return this._scaleNameMap.get(this.name(e+""))},e.prototype.sort=function(e){return(this.mapping()[e]||{}).sort},e.prototype.axis=function(e){return this._axis[e]},e.prototype.legend=function(e){return this._legend[e]},e.prototype.config=function(){return this._config},e.prototype.addWarning=function(e){s.warning(e),this._warnings.push(e)},e.prototype.warnings=function(){return this._warnings},e.prototype.isUnit=function(){return!1},e.prototype.isFacet=function(){return!1},e.prototype.isLayer=function(){return!1},e}();n.Model=u},{"../channel":14,"../encoding":50,"../fielddef":52,"../scale":56,"../util":64}],45:[function(e,t,n){"use strict";function i(e){return e.channels().reduce(function(t,n){if(e.scale(n)){var i=e.fieldDef(n),s={main:r(e,i,n)};n===E.COLOR&&e.legend(E.COLOR)&&(i.type===O.ORDINAL||i.bin||i.timeUnit)&&(s.colorLegend=o(e,i),i.bin&&(s.binColorLegend=a(e,i))),t[n]=s}return t},{})}function r(e,t,i){var r=e.scale(i),o=e.sort(i),a={name:e.scaleName(i),type:r.type};return i===E.X&&e.has(E.X2)?e.has(E.X)?a.domain={fields:[l(r,e,E.X),l(r,e,E.X2)]}:a.domain=l(r,e,E.X2):i===E.Y&&e.has(E.Y2)?e.has(E.Y)?a.domain={fields:[l(r,e,E.Y),l(r,e,E.Y2)]}:a.domain=l(r,e,E.Y2):a.domain=l(r,e,i),I.extend(a,f(r,e,i)),o&&(C.isSortField(o)?o.order:o)===C.SortOrder.DESCENDING&&(a.reverse=!0),["round","clamp","nice","exponent","zero","padding","points"].forEach(function(o){var s=n[o](r,i,t,e);void 0!==s&&(a[o]=s)}),a}function o(e,t){return{name:e.scaleName(n.COLOR_LEGEND),type:A.ScaleType.ORDINAL,domain:{data:e.dataTable(),field:e.field(E.COLOR,t.bin||t.timeUnit?{}:{prefix:"rank"}),sort:!0},range:{data:e.dataTable(),field:e.field(E.COLOR),sort:!0}}}function a(e,t){return{name:e.scaleName(n.COLOR_LEGEND_LABEL),type:A.ScaleType.ORDINAL,domain:{data:e.dataTable(),field:e.field(E.COLOR),sort:!0},range:{data:e.dataTable(),field:T.field(t,{binSuffix:"range"}),sort:{field:e.field(E.COLOR,{binSuffix:"start"}),op:"min"}}}}function s(e,t,n,i){if(!E.hasScale(n))return null;if(I.contains([E.ROW,E.COLUMN,E.SHAPE],n))return e&&void 0!==e.type&&e.type!==A.ScaleType.ORDINAL&&console.warn("Channel",n,"does not work with scale type =",e.type),A.ScaleType.ORDINAL;if(void 0!==e.type)return e.type;switch(t.type){case O.NOMINAL:return A.ScaleType.ORDINAL;case O.ORDINAL:return n===E.COLOR?A.ScaleType.LINEAR:A.ScaleType.ORDINAL;case O.TEMPORAL:return n===E.COLOR?A.ScaleType.TIME:t.timeUnit?N.defaultScaleType(t.timeUnit):A.ScaleType.TIME;case O.QUANTITATIVE:return t.bin?I.contains([E.X,E.Y,E.COLOR],n)?A.ScaleType.LINEAR:A.ScaleType.ORDINAL:A.ScaleType.LINEAR}return null}function l(e,t,n){var i=t.fieldDef(n);if(e.domain)return e.domain;if(i.type===O.TEMPORAL)return N.rawDomain(i.timeUnit,n)?{data:i.timeUnit,field:"date"}:{data:t.dataTable(),field:t.field(n),sort:{field:t.field(n),op:"min"}};var r=t.stack();if(r&&n===r.fieldChannel)return r.offset===k.StackOffset.NORMALIZE?[0,1]:{data:t.dataName(w.STACKED_SCALE),field:t.field(n,{prefix:"sum"})};var o=c(e,t,n),a=u(t,n,e.type);return o?{data:w.SOURCE,field:t.field(n,{noAggregate:!0})}:i.bin?e.type===A.ScaleType.ORDINAL?{data:t.dataTable(),field:t.field(n,{binSuffix:"range"}),sort:{field:t.field(n,{binSuffix:"start"}),op:"min"}}:n===E.COLOR?{data:t.dataTable(),field:t.field(n,{binSuffix:"start"})}:{data:t.dataTable(),field:[t.field(n,{binSuffix:"start"}),t.field(n,{binSuffix:"end"})]}:a?{data:a.op?w.SOURCE:t.dataTable(),field:i.type===O.ORDINAL&&n===E.COLOR?t.field(n,{prefix:"rank"}):t.field(n),sort:a}:{data:t.dataTable(),field:i.type===O.ORDINAL&&n===E.COLOR?t.field(n,{prefix:"rank"}):t.field(n)}}function u(e,t,n){if(n===A.ScaleType.ORDINAL){var i=e.sort(t);return C.isSortField(i)?{op:i.op,field:i.field}:!!I.contains([C.SortOrder.ASCENDING,C.SortOrder.DESCENDING,void 0],i)||void 0}}function c(e,t,n){var i=t.fieldDef(n);return e.useRawDomain&&i.aggregate&&_.SHARED_DOMAIN_OPS.indexOf(i.aggregate)>=0&&(i.type===O.QUANTITATIVE&&!i.bin||i.type===O.TEMPORAL&&I.contains([A.ScaleType.TIME,A.ScaleType.UTC],e.type))}function f(e,t,n){var i=t.fieldDef(n),r=t.config().scale;if(e.type===A.ScaleType.ORDINAL&&e.bandSize&&I.contains([E.X,E.Y],n))return{bandSize:e.bandSize};if(e.range&&!I.contains([E.X,E.Y,E.ROW,E.COLUMN],n))return{range:e.range};switch(n){case E.ROW:return{range:"height"};case E.COLUMN:return{range:"width"}}var o=t;switch(n){case E.X:return{rangeMin:0,rangeMax:o.config().cell.width};case E.Y:return{rangeMin:o.config().cell.height,rangeMax:0};case E.SIZE:if(o.mark()===S.BAR){if(void 0!==r.barSizeRange)return{range:r.barSizeRange};var a=t.config().mark.orient===x.Orient.HORIZONTAL?E.Y:E.X;return{range:[t.config().mark.barThinSize,t.scale(a).bandSize]}}if(o.mark()===S.TEXT)return{range:r.fontSizeRange};if(o.mark()===S.RULE)return{range:r.ruleSizeRange};if(o.mark()===S.TICK)return{range:r.tickSizeRange};if(void 0!==r.pointSizeRange)return{range:r.pointSizeRange};var s=h(o);return{range:[9,(s-2)*(s-2)]};case E.SHAPE:return{range:r.shapeRange};case E.COLOR:return i.type===O.NOMINAL?{range:r.nominalColorRange}:{range:r.sequentialColorRange};case E.OPACITY:return{range:r.opacity}}return{}}function h(e){var t=e.config().scale,n=e.has(E.X),i=e.has(E.Y),r=T.isMeasure(e.encoding().x),o=T.isMeasure(e.encoding().y);return n&&i?r!==o?e.scale(r?E.Y:E.X).bandSize:Math.min(e.scale(E.X).bandSize||t.bandSize,e.scale(E.Y).bandSize||t.bandSize):i?o?e.config().scale.bandSize:e.scale(E.Y).bandSize:n?r?e.config().scale.bandSize:e.scale(E.X).bandSize:e.config().scale.bandSize}function d(e){if(I.contains([A.ScaleType.LINEAR,A.ScaleType.POW,A.ScaleType.SQRT,A.ScaleType.LOG,A.ScaleType.TIME,A.ScaleType.UTC],e.type))return e.clamp}function p(e){if(e.type===A.ScaleType.POW)return e.exponent}function g(e,t,n){if(I.contains([A.ScaleType.LINEAR,A.ScaleType.POW,A.ScaleType.SQRT,A.ScaleType.LOG,A.ScaleType.TIME,A.ScaleType.UTC,A.ScaleType.QUANTIZE],e.type))return void 0!==e.nice?e.nice:I.contains([A.ScaleType.TIME,A.ScaleType.UTC],e.type)?N.smallestUnit(n.timeUnit):I.contains([E.X,E.Y],t)}function m(e,t){if(e.type===A.ScaleType.ORDINAL&&I.contains([E.X,E.Y],t))return e.padding}function v(e,t,n,i){if(e.type===A.ScaleType.ORDINAL&&I.contains([E.X,E.Y],t))return!0}function y(e,t){if(I.contains([E.X,E.Y,E.ROW,E.COLUMN,E.SIZE],t)&&void 0!==e.round)return e.round}function b(e,t,n){if(!I.contains([A.ScaleType.TIME,A.ScaleType.UTC,A.ScaleType.ORDINAL],e.type))return void 0!==e.zero?e.zero:!e.domain&&!n.bin&&I.contains([E.X,E.Y],t)}var _=e("../aggregate"),E=e("../channel"),x=e("../config"),w=e("../data"),T=e("../fielddef"),S=e("../mark"),A=e("../scale"),C=e("../sort"),k=e("../stack"),O=e("../type"),I=e("../util"),N=e("../timeunit");n.COLOR_LEGEND="color_legend",n.COLOR_LEGEND_LABEL="color_legend_label",n.parseScaleComponent=i,n.scaleType=s,n.domain=l,n.domainSort=u,n.rangeMixins=f,n.clamp=d,n.exponent=p,n.nice=g,n.padding=m,n.points=v,n.round=y,n.zero=b},{"../aggregate":11,"../channel":14,"../config":47,"../data":48,"../fielddef":52,"../mark":55,"../scale":56,"../sort":58,"../stack":60,"../timeunit":61,"../type":63,"../util":64}],46:[function(e,t,n){"use strict";var i=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},r=e("../aggregate"),o=e("../channel"),a=e("../config"),s=e("../data"),l=e("../encoding"),u=e("../fielddef"),c=e("../mark"),f=e("../scale"),h=e("../type"),d=e("../util"),p=e("./axis"),g=e("./common"),m=e("./config"),v=e("./data/data"),y=e("./legend"),b=e("./layout"),_=e("./model"),E=e("./mark/mark"),x=e("./scale"),w=e("../stack"),T=function(e){function t(t,n,i){e.call(this,t,n,i);var r=this._mark=t.mark,o=this._encoding=this._initEncoding(r,t.encoding||{}),a=this._config=this._initConfig(t.config,n,r,o);this._scale=this._initScale(r,o,a),this._axis=this._initAxis(o,a),this._legend=this._initLegend(o,a),this._stack=w.stack(r,o,a)}return i(t,e),t.prototype._initEncoding=function(e,t){return t=d.duplicate(t),l.forEach(t,function(t,n){return o.supportMark(n,e)?(t.type&&(t.type=h.getFullName(t.type)),void(n!==o.PATH&&n!==o.ORDER||t.aggregate||t.type!==h.QUANTITATIVE||(t.aggregate=r.AggregateOp.MIN))):(console.warn(n,"dropped as it is incompatible with",e),void delete t.field)}),t},t.prototype._initConfig=function(e,t,n,i){var r=d.mergeDeep(d.duplicate(a.defaultConfig),t?t.config():{},e);return r.mark=m.initMarkConfig(n,i,r),r},t.prototype._initScale=function(e,t,n){return o.UNIT_SCALE_CHANNELS.reduce(function(i,r){if(l.has(t,r)||r===o.X&&l.has(t,o.X2)||r===o.Y&&l.has(t,o.Y2)){var a=t[r],s=(a||{}).scale||{},u=x.scaleType(s,a,r,e);i[r]=d.extend({type:u,round:n.scale.round,padding:n.scale.padding,useRawDomain:n.scale.useRawDomain,bandSize:r===o.X&&u===f.ScaleType.ORDINAL&&e===c.TEXT?n.scale.textBandWidth:n.scale.bandSize},s)}return i},{})},t.prototype._initAxis=function(e,t){return[o.X,o.Y].reduce(function(n,i){if(l.has(e,i)||i===o.X&&l.has(e,o.X2)||i===o.Y&&l.has(e,o.Y2)){var r=(e[i]||{}).axis;r!==!1&&(n[i]=d.extend({},t.axis,r===!0?{}:r||{}))}return n},{})},t.prototype._initLegend=function(e,t){return o.NONSPATIAL_SCALE_CHANNELS.reduce(function(n,i){if(l.has(e,i)){var r=e[i].legend;r!==!1&&(n[i]=d.extend({},t.legend,r===!0?{}:r||{}))}return n},{})},t.prototype.parseData=function(){this.component.data=v.parseUnitData(this)},t.prototype.parseSelectionData=function(){},t.prototype.parseLayoutData=function(){this.component.layout=b.parseUnitLayout(this)},t.prototype.parseScale=function(){this.component.scale=x.parseScaleComponent(this)},t.prototype.parseMark=function(){this.component.mark=E.parseMark(this)},t.prototype.parseAxis=function(){this.component.axis=p.parseAxisComponent(this,[o.X,o.Y])},t.prototype.parseAxisGroup=function(){return null},t.prototype.parseGridGroup=function(){return null},t.prototype.parseLegend=function(){this.component.legend=y.parseLegendComponent(this)},t.prototype.assembleData=function(e){return v.assembleData(this,e)},t.prototype.assembleLayout=function(e){return b.assembleLayout(this,e)},t.prototype.assembleMarks=function(){return this.component.mark},t.prototype.assembleParentGroupProperties=function(e){return g.applyConfig({},e,g.FILL_STROKE_CONFIG.concat(["clip"]))},t.prototype.channels=function(){return o.UNIT_CHANNELS},t.prototype.mapping=function(){return this.encoding()},t.prototype.stack=function(){return this._stack},t.prototype.toSpec=function(e,t){var n,i=d.duplicate(this._encoding);return n={mark:this._mark,encoding:i},e||(n.config=d.duplicate(this._config)),t||(n.data=d.duplicate(this._data)),n},t.prototype.mark=function(){return this._mark},t.prototype.has=function(e){return l.has(this._encoding,e)},t.prototype.encoding=function(){return this._encoding},t.prototype.fieldDef=function(e){return this._encoding[e]||{}},t.prototype.field=function(e,t){void 0===t&&(t={});var n=this.fieldDef(e);return n.bin&&(t=d.extend({binSuffix:this.scale(e).type===f.ScaleType.ORDINAL?"range":"start"},t)),u.field(n,t)},t.prototype.dataTable=function(){return this.dataName(l.isAggregate(this._encoding)?s.SUMMARY:s.SOURCE)},t.prototype.isUnit=function(){return!0},t}(_.Model);n.UnitModel=T},{"../aggregate":11,"../channel":14,"../config":47,"../data":48,"../encoding":50,"../fielddef":52,"../mark":55,"../scale":56,"../stack":60,"../type":63,"../util":64,"./axis":15,"./common":16,"./config":18,"./data/data":21,"./layout":34,"./legend":35,"./mark/mark":39,"./model":44,"./scale":45}],47:[function(e,t,n){"use strict";var i=e("./scale"),r=e("./axis"),o=e("./legend");n.defaultCellConfig={width:200,height:200},n.defaultFacetCellConfig={stroke:"#ccc",strokeWidth:1};var a={color:"#000000",opacity:.4,offset:0};n.defaultFacetConfig={scale:i.defaultFacetScaleConfig,axis:r.defaultFacetAxisConfig,grid:a,cell:n.defaultFacetCellConfig},function(e){e[e.NORMAL="normal"]="NORMAL",e[e.BOLD="bold"]="BOLD"}(n.FontWeight||(n.FontWeight={}));n.FontWeight;!function(e){e[e.CIRCLE="circle"]="CIRCLE",e[e.SQUARE="square"]="SQUARE",e[e.CROSS="cross"]="CROSS",e[e.DIAMOND="diamond"]="DIAMOND",e[e.TRIANGLEUP="triangle-up"]="TRIANGLEUP",e[e.TRIANGLEDOWN="triangle-down"]="TRIANGLEDOWN"}(n.Shape||(n.Shape={}));var s=n.Shape;!function(e){e[e.HORIZONTAL="horizontal"]="HORIZONTAL",e[e.VERTICAL="vertical"]="VERTICAL"}(n.Orient||(n.Orient={}));n.Orient;!function(e){e[e.LEFT="left"]="LEFT",e[e.RIGHT="right"]="RIGHT",e[e.CENTER="center"]="CENTER"}(n.HorizontalAlign||(n.HorizontalAlign={}));n.HorizontalAlign;!function(e){e[e.TOP="top"]="TOP",e[e.MIDDLE="middle"]="MIDDLE",e[e.BOTTOM="bottom"]="BOTTOM"}(n.VerticalAlign||(n.VerticalAlign={}));var l=n.VerticalAlign;!function(e){e[e.NORMAL="normal"]="NORMAL",e[e.ITALIC="italic"]="ITALIC"}(n.FontStyle||(n.FontStyle={}));n.FontStyle;!function(e){e[e.LINEAR="linear"]="LINEAR",e[e.LINEAR_CLOSED="linear-closed"]="LINEAR_CLOSED",e[e.STEP="step"]="STEP",e[e.STEP_BEFORE="step-before"]="STEP_BEFORE",e[e.STEP_AFTER="step-after"]="STEP_AFTER",e[e.BASIS="basis"]="BASIS",e[e.BASIS_OPEN="basis-open"]="BASIS_OPEN",e[e.BASIS_CLOSED="basis-closed"]="BASIS_CLOSED",e[e.CARDINAL="cardinal"]="CARDINAL",e[e.CARDINAL_OPEN="cardinal-open"]="CARDINAL_OPEN",e[e.CARDINAL_CLOSED="cardinal-closed"]="CARDINAL_CLOSED",e[e.BUNDLE="bundle"]="BUNDLE",e[e.MONOTONE="monotone"]="MONOTONE"}(n.Interpolate||(n.Interpolate={}));n.Interpolate;!function(e){e[e.LINE="line"]="LINE",e[e.LINEPOINT="linepoint"]="LINEPOINT",e[e.NONE="none"]="NONE"}(n.AreaOverlay||(n.AreaOverlay={}));n.AreaOverlay;n.defaultOverlayConfig={line:!1,pointStyle:{filled:!0},lineStyle:{}},n.defaultMarkConfig={color:"#4682b4",shape:s.CIRCLE,strokeWidth:2,size:30,barThinSize:2,ruleSize:1,tickThickness:1,
fontSize:10,baseline:l.MIDDLE,text:"Abc",shortTimeLabels:!1,applyColorToBackground:!1},n.defaultConfig={numberFormat:"s",timeFormat:"%Y-%m-%d",countTitle:"Number of Records",cell:n.defaultCellConfig,mark:n.defaultMarkConfig,overlay:n.defaultOverlayConfig,scale:i.defaultScaleConfig,axis:r.defaultAxisConfig,legend:o.defaultLegendConfig,facet:n.defaultFacetConfig}},{"./axis":12,"./legend":54,"./scale":56}],48:[function(e,t,n){"use strict";var i=e("./type");!function(e){e[e.JSON="json"]="JSON",e[e.CSV="csv"]="CSV",e[e.TSV="tsv"]="TSV",e[e.TOPOJSON="topojson"]="TOPOJSON"}(n.DataFormatType||(n.DataFormatType={}));n.DataFormatType;!function(e){e[e.SOURCE="source"]="SOURCE",e[e.SUMMARY="summary"]="SUMMARY",e[e.STACKED_SCALE="stacked_scale"]="STACKED_SCALE",e[e.LAYOUT="layout"]="LAYOUT"}(n.DataTable||(n.DataTable={}));var r=n.DataTable;n.SUMMARY=r.SUMMARY,n.SOURCE=r.SOURCE,n.STACKED_SCALE=r.STACKED_SCALE,n.LAYOUT=r.LAYOUT,n.types={"boolean":i.Type.NOMINAL,number:i.Type.QUANTITATIVE,integer:i.Type.QUANTITATIVE,date:i.Type.TEMPORAL,string:i.Type.NOMINAL}},{"./type":63}],49:[function(e,t,n){"use strict";function i(e){return!!(e.year||e.quarter||e.month||e.date||e.day||e.hours||e.minutes||e.seconds||e.milliseconds)}function r(e){return l.isNumber(e)?e-1+"":(console.warn("Potentially invalid quarter",e),e)}function o(e){if(l.isNumber(e))return e-1+"";var t=e.toLowerCase(),i=n.MONTHS.indexOf(t);if(i!==-1)return i+"";var r=t.substr(0,3),o=n.SHORT_MONTHS.indexOf(r);return o!==-1?o+"":(console.warn("Potentially invalid month",e),e)}function a(e){if(l.isNumber(e))return e%7+"";var t=e.toLowerCase(),i=n.DAYS.indexOf(t);if(i!==-1)return i+"";var r=t.substr(0,3),o=n.SHORT_DAYS.indexOf(r);return o!==-1?o+"":(console.warn("Potentially invalid day",e),e)}function s(e,t){void 0===t&&(t=!1);var n=[];if(t&&void 0!==e.day)for(var i=0,s=["year","quarter","month","date"];i<s.length;i++){var u=s[i];if(void 0!==e[u]){console.warn("Dropping day from datetime",JSON.stringify(e),"as day cannot be combined with",u),e=l.duplicate(e),delete e.day;break}}if(void 0!==e.year?n.push(e.year):void 0!==e.day?n.push(2006):n.push(0),void 0!==e.month){var c=t?o(e.month):e.month;n.push(c)}else if(void 0!==e.quarter){var f=t?r(e.quarter):e.quarter;n.push(f+"*3")}else n.push(0);if(void 0!==e.date)n.push(e.date);else if(void 0!==e.day){var h=t?a(e.day):e.day;n.push(h+"+1")}else n.push(1);for(var d=0,p=["hours","minutes","seconds","milliseconds"];d<p.length;d++){var g=p[d];void 0!==e[g]?n.push(e[g]):n.push(0)}return"datetime("+n.join(", ")+")"}var l=e("./util");n.isDateTime=i,n.MONTHS=["january","february","march","april","may","june","july","august","september","october","november","december"],n.SHORT_MONTHS=n.MONTHS.map(function(e){return e.substr(0,3)}),n.DAYS=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],n.SHORT_DAYS=n.DAYS.map(function(e){return e.substr(0,3)}),n.dateTimeExpr=s},{"./util":64}],50:[function(e,t,n){"use strict";function i(e){var t=0;return e.color&&t++,e.opacity&&t++,e.size&&t++,e.shape&&t++,t}function r(e){return g.CHANNELS.filter(function(t){return o(e,t)})}function o(e,t){var n=e&&e[t];return n&&(void 0!==n.field||m.isArray(n)&&n.length>0)}function a(e){return m.some(g.CHANNELS,function(t){return!(!o(e,t)||!e[t].aggregate)})}function s(e){return e&&(!!e.x&&!!e.x2||!!e.y&&!!e.y2)}function l(e){var t=[];return g.CHANNELS.forEach(function(n){o(e,n)&&(m.isArray(e[n])?e[n].forEach(function(e){t.push(e)}):t.push(e[n]))}),t}function u(e,t,n){c(g.CHANNELS,e,t,n)}function c(e,t,n,i){var r=0;e.forEach(function(e){o(t,e)&&(m.isArray(t[e])?t[e].forEach(function(t){n.call(i,t,e,r++)}):n.call(i,t[e],e,r++))})}function f(e,t,n){return h(g.CHANNELS,e,t,n)}function h(e,t,n,i){var r=[];return e.forEach(function(e){o(t,e)&&(m.isArray(t[e])?t[e].forEach(function(t){r.push(n.call(i,t,e))}):r.push(n.call(i,t[e],e)))}),r}function d(e,t,n,i){return p(g.CHANNELS,e,t,n,i)}function p(e,t,n,i,r){var a=i;return g.CHANNELS.forEach(function(e){o(t,e)&&(m.isArray(t[e])?t[e].forEach(function(t){a=n.call(r,a,t,e)}):a=n.call(r,a,t[e],e))}),a}var g=e("./channel"),m=e("./util");n.countRetinal=i,n.channels=r,n.has=o,n.isAggregate=a,n.isRanged=s,n.fieldDefs=l,n.forEach=u,n.channelMappingForEach=c,n.map=f,n.channelMappingMap=h,n.reduce=d,n.channelMappingReduce=p},{"./channel":14,"./util":64}],51:[function(e,t,n){"use strict"},{}],52:[function(e,t,n){"use strict";function i(e,t){void 0===t&&(t={});var n=e.field,i=t.prefix,r=t.suffix;if(l(e))n="count";else{var o=t.fn;t.nofn||(e.bin?(o="bin",r=t.binSuffix||(t.scaleType===h.ScaleType.ORDINAL?"range":"start")):!t.noAggregate&&e.aggregate?o=String(e.aggregate):e.timeUnit&&(o=String(e.timeUnit))),o&&(n=o+"_"+n)}return r&&(n=n+"_"+r),i&&(n=i+"_"+n),t.datum&&(n='datum["'+n+'"]'),n}function r(e){return g.contains([p.NOMINAL,p.ORDINAL],e.type)||!!e.bin||e.type===p.TEMPORAL&&!!e.timeUnit}function o(e){return e&&e.field&&r(e)}function a(e){return e&&e.field&&!r(e)}function s(){return{field:"*",aggregate:f.AggregateOp.COUNT,type:p.QUANTITATIVE}}function l(e){return e.aggregate===f.AggregateOp.COUNT}function u(e,t,n){void 0===n&&(n={});var i=t[e.field],r=e.type;if(e.bin){var o=e.bin,a="boolean"==typeof o?void 0:o.maxbins;void 0===a&&(a=10);var s=g.getbins(i,a);return(s.stop-s.start)/s.step}if(r===p.TEMPORAL){var l=e.timeUnit;switch(l){case d.TimeUnit.SECONDS:return 60;case d.TimeUnit.MINUTES:return 60;case d.TimeUnit.HOURS:return 24;case d.TimeUnit.DAY:return 7;case d.TimeUnit.DATE:return 31;case d.TimeUnit.MONTH:return 12;case d.TimeUnit.QUARTER:return 4;case d.TimeUnit.YEAR:var u=t["year_"+e.field];return u?u.distinct-(i.missing>0&&n[r]?1:0):null}}return e.aggregate?1:i.distinct-(i.missing>0&&n[r]?1:0)}function c(e,t){if(null!=e.title)return e.title;if(l(e))return t.countTitle;var n=e.aggregate||e.timeUnit||e.bin&&"bin";return n?n.toString().toUpperCase()+"("+e.field+")":e.field}var f=e("./aggregate"),h=e("./scale"),d=e("./timeunit"),p=e("./type"),g=e("./util");n.aggregate={type:"string","enum":f.AGGREGATE_OPS,supportedEnums:{quantitative:f.AGGREGATE_OPS,ordinal:["median","min","max"],nominal:[],temporal:["mean","median","min","max"],"":["count"]},supportedTypes:g.toMap([p.QUANTITATIVE,p.NOMINAL,p.ORDINAL,p.TEMPORAL,""])},n.field=i,n.isDimension=o,n.isMeasure=a,n.count=s,n.isCount=l,n.cardinality=u,n.title=c},{"./aggregate":11,"./scale":56,"./timeunit":61,"./type":63,"./util":64}],53:[function(e,t,n){"use strict";function i(e){return e&&!!e.field&&void 0!==e.equal}function r(e){return!!(e&&e.field&&f.isArray(e.range)&&2===e.range.length)}function o(e){return e&&!!e.field&&f.isArray(e["in"])}function a(e){if(f.isString(e))return e;var t=e.timeUnit?"time("+c.fieldExpr(e.timeUnit,e.field)+")":u.field(e,{datum:!0});if(i(e))return t+"==="+s(e.equal,e.timeUnit);if(o(e))return"indexof(["+e["in"].map(function(t){return s(t,e.timeUnit)}).join(",")+"], "+t+") !== -1";if(r(e)){var n=e.range[0],a=e.range[1];if(null!==n&&null!==a)return"inrange("+t+", "+s(n,e.timeUnit)+", "+s(a,e.timeUnit)+")";if(null!==n)return t+" >= "+n;if(null!==a)return t+" <= "+a}}function s(e,t){if(l.isDateTime(e)){var n=l.dateTimeExpr(e,!0);return"time("+n+")"}if(c.isSingleTimeUnit(t)){var i={};i[t]=e;var n=l.dateTimeExpr(i,!0);return"time("+n+")"}return JSON.stringify(e)}var l=e("./datetime"),u=e("./fielddef"),c=e("./timeunit"),f=e("./util");n.isEqualFilter=i,n.isRangeFilter=r,n.isInFilter=o,n.expression=a},{"./datetime":49,"./fielddef":52,"./timeunit":61,"./util":64}],54:[function(e,t,n){"use strict";n.defaultLegendConfig={orient:void 0,shortTimeLabels:!1}},{}],55:[function(e,t,n){"use strict";!function(e){e[e.AREA="area"]="AREA",e[e.BAR="bar"]="BAR",e[e.LINE="line"]="LINE",e[e.POINT="point"]="POINT",e[e.TEXT="text"]="TEXT",e[e.TICK="tick"]="TICK",e[e.RULE="rule"]="RULE",e[e.CIRCLE="circle"]="CIRCLE",e[e.SQUARE="square"]="SQUARE",e[e.ERRORBAR="errorBar"]="ERRORBAR"}(n.Mark||(n.Mark={}));var i=n.Mark;n.AREA=i.AREA,n.BAR=i.BAR,n.LINE=i.LINE,n.POINT=i.POINT,n.TEXT=i.TEXT,n.TICK=i.TICK,n.RULE=i.RULE,n.CIRCLE=i.CIRCLE,n.SQUARE=i.SQUARE,n.ERRORBAR=i.ERRORBAR,n.PRIMITIVE_MARKS=[n.AREA,n.BAR,n.LINE,n.POINT,n.TEXT,n.TICK,n.RULE,n.CIRCLE,n.SQUARE]},{}],56:[function(e,t,n){"use strict";!function(e){e[e.LINEAR="linear"]="LINEAR",e[e.LOG="log"]="LOG",e[e.POW="pow"]="POW",e[e.SQRT="sqrt"]="SQRT",e[e.QUANTILE="quantile"]="QUANTILE",e[e.QUANTIZE="quantize"]="QUANTIZE",e[e.ORDINAL="ordinal"]="ORDINAL",e[e.TIME="time"]="TIME",e[e.UTC="utc"]="UTC"}(n.ScaleType||(n.ScaleType={}));n.ScaleType;!function(e){e[e.SECOND="second"]="SECOND",e[e.MINUTE="minute"]="MINUTE",e[e.HOUR="hour"]="HOUR",e[e.DAY="day"]="DAY",e[e.WEEK="week"]="WEEK",e[e.MONTH="month"]="MONTH",e[e.YEAR="year"]="YEAR"}(n.NiceTime||(n.NiceTime={}));n.NiceTime;n.defaultScaleConfig={round:!0,textBandWidth:90,bandSize:21,padding:1,useRawDomain:!1,opacity:[.3,.8],nominalColorRange:"category10",sequentialColorRange:["#AFC6A3","#09622A"],shapeRange:"shapes",fontSizeRange:[8,40],ruleSizeRange:[1,5],tickSizeRange:[1,20]},n.defaultFacetScaleConfig={round:!0,padding:16}},{}],57:[function(e,t,n){"use strict";function i(e){return"mark"+n.ASSIGN+e.mark+n.DELIM+o(e.encoding)}function r(e,t,i){var r=e.split(n.DELIM),o=r.shift().split(n.ASSIGN)[1].trim(),s=a(r.join(n.DELIM)),l={mark:p.Mark[o],encoding:s};return void 0!==t&&(l.data=t),void 0!==i&&(l.config=i),l}function o(e){return d.map(e,function(e,t){return t+n.ASSIGN+s(e)}).join(n.DELIM)}function a(e){return e.split(n.DELIM).reduce(function(e,t){var i=t.split(n.ASSIGN),r=i[0].trim(),o=i[1];return e[r]=u(o),e},{})}function s(e){return(e.aggregate?e.aggregate+n.FUNC:"")+(e.timeUnit?e.timeUnit+n.FUNC:"")+(e.bin?"bin"+n.FUNC:"")+(e.field||"")+n.TYPE+h.SHORT_TYPE[e.type]}function l(e,t){return void 0===t&&(t=n.DELIM),e.map(s).join(t)}function u(e){for(var t=e.split(n.TYPE),i={field:t[0].trim(),type:h.TYPE_FROM_SHORT_TYPE[t[1].trim()]},r=0;r<c.AGGREGATE_OPS.length;r++){var o=c.AGGREGATE_OPS[r];if(0===i.field.indexOf(o+"_")){i.field=i.field.substr(o.toString().length+1),o===c.AggregateOp.COUNT&&0===i.field.length&&(i.field="*"),i.aggregate=o;break}}for(var r=0;r<f.TIMEUNITS.length;r++){var a=f.TIMEUNITS[r];if(i.field&&0===i.field.indexOf(a+"_")){i.field=i.field.substr(i.field.length+1),i.timeUnit=a;break}}return i.field&&0===i.field.indexOf("bin_")&&(i.field=i.field.substr(4),i.bin=!0),i}var c=e("./aggregate"),f=e("./timeunit"),h=e("./type"),d=e("./encoding"),p=e("./mark");n.DELIM="|",n.ASSIGN="=",n.TYPE=",",n.FUNC="_",n.shorten=i,n.parse=r,n.shortenEncoding=o,n.parseEncoding=a,n.shortenFieldDef=s,n.shortenFieldDefs=l,n.parseFieldDef=u},{"./aggregate":11,"./encoding":50,"./mark":55,"./timeunit":61,"./type":63}],58:[function(e,t,n){"use strict";function i(e){return!!e&&!!e.field&&!!e.op}!function(e){e[e.ASCENDING="ascending"]="ASCENDING",e[e.DESCENDING="descending"]="DESCENDING",e[e.NONE="none"]="NONE"}(n.SortOrder||(n.SortOrder={}));n.SortOrder;n.isSortField=i},{}],59:[function(e,t,n){"use strict";function i(e){return void 0!==e.facet}function r(e){if(a(e)){var t=b.has(e.encoding,x.ROW),n=b.has(e.encoding,x.COLUMN);return t||n}return!1}function o(e){return!!a(e)&&!r(e)}function a(e){return void 0!==e.mark}function s(e){return void 0!==e.layers}function l(e){return r(e)?u(e):o(e)?c(e):e}function u(e){var t=b.has(e.encoding,x.ROW),n=b.has(e.encoding,x.COLUMN),i=T.duplicate(e.encoding);return delete i.column,delete i.row,T.extend(e.name?{name:e.name}:{},e.description?{description:e.description}:{},{data:e.data},e.transform?{transform:e.transform}:{},{facet:T.extend(t?{row:e.encoding.row}:{},n?{column:e.encoding.column}:{}),spec:c({mark:e.mark,encoding:i})},e.config?{config:e.config}:{})}function c(e){var t=e.config,n=t&&t.overlay,i=n&&e.mark===_.AREA&&T.contains([y.AreaOverlay.LINEPOINT,y.AreaOverlay.LINE],n.area),r=n&&(n.line&&e.mark===_.LINE||n.area===y.AreaOverlay.LINEPOINT&&e.mark===_.AREA);return e.mark===_.ERRORBAR?h(e):b.isRanged(e.encoding)?f(e):v(e)?e:r||i?d(e,r,i):e}function f(e){if(e.encoding){var t=b.has(e.encoding,x.X),n=b.has(e.encoding,x.Y),i=b.has(e.encoding,x.X2),r=b.has(e.encoding,x.Y2);if(i&&!t||r&&!n){var o=T.duplicate(e);return i&&!t&&(o.encoding.x=o.encoding.x2,delete o.encoding.x2),r&&!n&&(o.encoding.y=o.encoding.y2,delete o.encoding.y2),o}}return e}function h(e){var t=T.extend(e.name?{name:e.name}:{},e.description?{description:e.description}:{},e.data?{data:e.data}:{},e.transform?{transform:e.transform}:{},e.config?{config:e.config}:{},{layers:[]});if(!e.encoding)return t;if(e.mark===_.ERRORBAR){var n={mark:_.RULE,encoding:T.extend(e.encoding.x?{x:T.duplicate(e.encoding.x)}:{},e.encoding.y?{y:T.duplicate(e.encoding.y)}:{},e.encoding.x2?{x2:T.duplicate(e.encoding.x2)}:{},e.encoding.y2?{y2:T.duplicate(e.encoding.y2)}:{},{})},i={mark:_.TICK,encoding:T.extend(e.encoding.x?{x:T.duplicate(e.encoding.x)}:{},e.encoding.y?{y:T.duplicate(e.encoding.y)}:{},e.encoding.size?{size:T.duplicate(e.encoding.size)}:{},{})},r={mark:_.TICK,encoding:T.extend({x:e.encoding.x2?T.duplicate(e.encoding.x2):T.duplicate(e.encoding.x),y:e.encoding.y2?T.duplicate(e.encoding.y2):T.duplicate(e.encoding.y)},e.encoding.size?{size:T.duplicate(e.encoding.size)}:{})};t.layers.push(c(n)),t.layers.push(c(i)),t.layers.push(c(r))}return t}function d(e,t,n){var i=["name","description","data","transform"],r=T.omit(e,i.concat("config")),o=T.duplicate(e.config);delete o.overlay;var a=T.extend(T.pick(e,i),{layers:[r]},T.keys(o).length>0?{config:o}:{});if(n){var s=T.duplicate(r);s.mark=_.LINE;var l=T.extend({},y.defaultOverlayConfig.lineStyle,e.config.overlay.lineStyle);T.keys(l).length>0&&(s.config={mark:l}),a.layers.push(s)}if(t){var u=T.duplicate(r);u.mark=_.POINT;var l=T.extend({},y.defaultOverlayConfig.pointStyle,e.config.overlay.pointStyle);T.keys(l).length>0&&(u.config={mark:l}),a.layers.push(u)}return a}function p(e){return w.isAggregate(e.encoding)}function g(e){return w.fieldDefs(e.encoding)}function m(e){return e}function v(e){return null!==E.stack(e.mark,e.encoding,e.config)}var y=e("./config"),b=e("./encoding"),_=e("./mark"),E=e("./stack"),x=e("./channel"),w=e("./encoding"),T=e("./util");n.isFacetSpec=i,n.isExtendedUnitSpec=r,n.isUnitSpec=o,n.isSomeUnitSpec=a,n.isLayerSpec=s,n.normalize=l,n.normalizeExtendedUnitSpec=u,n.normalizeUnitSpec=c,n.normalizeRangedUnitSpec=f,n.normalizeErrorBarUnitSpec=h,n.normalizeOverlay=d,n.alwaysNoOcclusion=p,n.fieldDefs=g,n.getCleanSpec=m,n.isStacked=v},{"./channel":14,"./config":47,"./encoding":50,"./mark":55,"./stack":60,"./util":64}],60:[function(e,t,n){"use strict";function i(e,t,n){var i=n&&n.mark?n.mark.stacked:void 0;if(s.contains([l.NONE,null,!1],i))return null;if(!s.contains([a.BAR,a.AREA],e))return null;if(!o.isAggregate(t))return null;var u=r.STACK_GROUP_CHANNELS.reduce(function(e,n){return o.has(t,n)&&!t[n].aggregate&&e.push(n),e},[]);if(0===u.length)return null;var c=o.has(t,r.X),f=o.has(t,r.Y),h=c&&!!t.x.aggregate,d=f&&!!t.y.aggregate;return h!==d?{groupbyChannel:h?f?r.Y:null:c?r.X:null,fieldChannel:h?r.X:r.Y,stackByChannels:u,offset:i||l.ZERO}:null}var r=e("./channel"),o=e("./encoding"),a=e("./mark"),s=e("./util");!function(e){e[e.ZERO="zero"]="ZERO",e[e.CENTER="center"]="CENTER",e[e.NORMALIZE="normalize"]="NORMALIZE",e[e.NONE="none"]="NONE"}(n.StackOffset||(n.StackOffset={}));var l=n.StackOffset;n.stack=i},{"./channel":14,"./encoding":50,"./mark":55,"./util":64}],61:[function(e,t,n){"use strict";function i(e){return!!v[e]}function r(e,t){var i=new Date(0,0,1,0,0,0,0);return n.SINGLE_TIMEUNITS.forEach(function(n){if(a(e,n))switch(n){case m.DAY:throw new Error("Cannot convert to TimeUnits containing 'day'");case m.YEAR:i.setFullYear(t.getFullYear());break;case m.QUARTER:i.setMonth(3*Math.floor(t.getMonth()/3));break;case m.MONTH:i.setMonth(t.getMonth());break;case m.DATE:i.setDate(t.getDate());break;case m.HOURS:i.setHours(t.getHours());break;case m.MINUTES:i.setMinutes(t.getMinutes());break;case m.SECONDS:i.setSeconds(t.getSeconds());break;case m.MILLISECONDS:i.setMilliseconds(t.getMilliseconds())}}),i}function o(e){return!!y[e]}function a(e,t){var n=e.toString(),i=t.toString(),r=n.indexOf(i);return r>-1&&(t!==m.SECONDS||0===r||"i"!==n.charAt(r-1))}function s(e){switch(e){case m.HOURS:case m.DAY:case m.MONTH:case m.QUARTER:return p.ScaleType.ORDINAL}return p.ScaleType.TIME}function l(e,t){function i(e){return e===m.QUARTER?"floor(month("+r+")/3)":e+"("+r+")"}var r='datum["'+t+'"]',o=n.SINGLE_TIMEUNITS.reduce(function(t,n){return a(e,n)&&(t[n]=i(n)),t},{});return o.day&&g.keys(o).length>1&&(console.warn('Time unit "'+e+'" is not supported. We are replacing it with ',(e+"").replace("day","date")+"."),delete o.day,o.date=i(m.DATE)),d.dateTimeExpr(o)}function u(e,t){if(g.contains([h.ROW,h.COLUMN,h.SHAPE,h.COLOR],t))return null;switch(e){case m.SECONDS:return g.range(0,60);case m.MINUTES:return g.range(0,60);case m.HOURS:return g.range(0,24);case m.DAY:return g.range(0,7);case m.DATE:return g.range(1,32);case m.MONTH:return g.range(0,12);case m.QUARTER:return[0,3,6,9]}return null}function c(e){if(e)return a(e,m.SECONDS)?"second":a(e,m.MINUTES)?"minute":a(e,m.HOURS)?"hour":a(e,m.DAY)||a(e,m.DATE)?"day":a(e,m.MONTH)?"month":a(e,m.YEAR)?"year":void 0}function f(e,t,n){if(e){var i=[];a(e,m.YEAR)&&i.push(n?"%y":"%Y"),a(e,m.QUARTER)&&i.push("'}}Q{{"+t+" | quarter}}{{"+t+" | time:'"),a(e,m.MONTH)&&i.push(n?"%b":"%B"),a(e,m.DAY)?i.push(n?"%a":"%A"):a(e,m.DATE)&&i.push("%d");var r=[];a(e,m.HOURS)&&r.push("%H"),a(e,m.MINUTES)&&r.push("%M"),a(e,m.SECONDS)&&r.push("%S"),a(e,m.MILLISECONDS)&&r.push("%L");var o=[];if(i.length>0&&o.push(i.join("-")),r.length>0&&o.push(r.join(":")),o.length>0){var s="{{"+t+" | time:'"+o.join(" ")+"'}}",l=t.replace(/(\[|\])/g,"\\$1");return s.replace(new RegExp("{{"+l+" \\| time:''}}","g"),"")}}}var h=e("./channel"),d=e("./datetime"),p=e("./scale"),g=e("./util");!function(e){e[e.YEAR="year"]="YEAR",e[e.MONTH="month"]="MONTH",e[e.DAY="day"]="DAY",e[e.DATE="date"]="DATE",e[e.HOURS="hours"]="HOURS",e[e.MINUTES="minutes"]="MINUTES",e[e.SECONDS="seconds"]="SECONDS",e[e.MILLISECONDS="milliseconds"]="MILLISECONDS",e[e.YEARMONTH="yearmonth"]="YEARMONTH",e[e.YEARMONTHDATE="yearmonthdate"]="YEARMONTHDATE",e[e.YEARMONTHDATEHOURS="yearmonthdatehours"]="YEARMONTHDATEHOURS",e[e.YEARMONTHDATEHOURSMINUTES="yearmonthdatehoursminutes"]="YEARMONTHDATEHOURSMINUTES",e[e.YEARMONTHDATEHOURSMINUTESSECONDS="yearmonthdatehoursminutesseconds"]="YEARMONTHDATEHOURSMINUTESSECONDS",e[e.HOURSMINUTES="hoursminutes"]="HOURSMINUTES",e[e.HOURSMINUTESSECONDS="hoursminutesseconds"]="HOURSMINUTESSECONDS",e[e.MINUTESSECONDS="minutesseconds"]="MINUTESSECONDS",e[e.SECONDSMILLISECONDS="secondsmilliseconds"]="SECONDSMILLISECONDS",e[e.QUARTER="quarter"]="QUARTER",e[e.YEARQUARTER="yearquarter"]="YEARQUARTER",e[e.QUARTERMONTH="quartermonth"]="QUARTERMONTH",e[e.YEARQUARTERMONTH="yearquartermonth"]="YEARQUARTERMONTH"}(n.TimeUnit||(n.TimeUnit={}));var m=n.TimeUnit;n.SINGLE_TIMEUNITS=[m.YEAR,m.QUARTER,m.MONTH,m.DAY,m.DATE,m.HOURS,m.MINUTES,m.SECONDS,m.MILLISECONDS];var v=n.SINGLE_TIMEUNITS.reduce(function(e,t){return e[t]=!0,e},{});n.isSingleTimeUnit=i,n.convert=r,n.MULTI_TIMEUNITS=[m.YEARQUARTER,m.YEARQUARTERMONTH,m.YEARMONTH,m.YEARMONTHDATE,m.YEARMONTHDATEHOURS,m.YEARMONTHDATEHOURSMINUTES,m.YEARMONTHDATEHOURSMINUTESSECONDS,m.QUARTERMONTH,m.HOURSMINUTES,m.HOURSMINUTESSECONDS,m.MINUTESSECONDS,m.SECONDSMILLISECONDS];var y=n.MULTI_TIMEUNITS.reduce(function(e,t){return e[t]=!0,e},{});n.isMultiTimeUnit=o,n.TIMEUNITS=n.SINGLE_TIMEUNITS.concat(n.MULTI_TIMEUNITS),n.containsTimeUnit=a,n.defaultScaleType=s,n.fieldExpr=l,n.rawDomain=u,n.smallestUnit=c,n.template=f},{"./channel":14,"./datetime":49,"./scale":56,"./util":64}],62:[function(e,t,n){"use strict"},{}],63:[function(e,t,n){"use strict";function i(e){var t=e;return n.TYPE_FROM_SHORT_TYPE[t.toUpperCase()]||t.toLowerCase()}!function(e){e[e.QUANTITATIVE="quantitative"]="QUANTITATIVE",e[e.ORDINAL="ordinal"]="ORDINAL",e[e.TEMPORAL="temporal"]="TEMPORAL",e[e.NOMINAL="nominal"]="NOMINAL"}(n.Type||(n.Type={}));var r=n.Type;n.QUANTITATIVE=r.QUANTITATIVE,n.ORDINAL=r.ORDINAL,n.TEMPORAL=r.TEMPORAL,n.NOMINAL=r.NOMINAL,n.SHORT_TYPE={quantitative:"Q",temporal:"T",nominal:"N",ordinal:"O"},n.TYPE_FROM_SHORT_TYPE={Q:n.QUANTITATIVE,T:n.TEMPORAL,O:n.ORDINAL,N:n.NOMINAL},n.getFullName=i},{}],64:[function(e,t,n){"use strict";function i(e,t){var n={};return t.forEach(function(t){e.hasOwnProperty(t)&&(n[t]=e[t])}),n}function r(e,t){var n=T.duplicate(e);return t.forEach(function(e){delete n[e]}),n}function o(e){return A.isString(e)||A.isNumber(e)||A.isBoolean(e)?String(e):x(e)}function a(e,t){return e.indexOf(t)>-1}function s(e,t){return e.filter(function(e){return!a(t,e)})}function l(e,t){return e.concat(s(t,e))}function u(e,t,n){if(e.forEach)e.forEach.call(n,t);else for(var i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i,e)}function c(e,t,n,i){if(e.reduce)return e.reduce.call(i,t,n);for(var r in e)e.hasOwnProperty(r)&&(n=t.call(i,n,e[r],r,e));return n}function f(e,t,n){if(e.map)return e.map.call(n,t);var i=[];for(var r in e)e.hasOwnProperty(r)&&i.push(t.call(n,e[r],r,e));return i}function h(e,t){for(var n=0,i=0;i<e.length;i++)if(t(e[i],i,n++))return!0;return!1}function d(e,t){for(var n=0,i=0;i<e.length;i++)if(!t(e[i],i,n++))return!1;return!0}function p(e){return[].concat.apply([],e)}function g(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var i=0;i<t.length;i++)e=m(e,t[i]);return e}function m(e,t){if("object"!=typeof t||null===t)return e;for(var n in t)t.hasOwnProperty(n)&&void 0!==t[n]&&("object"!=typeof t[n]||null===t[n]?e[n]=t[n]:"object"!=typeof e[n]||null===e[n]?e[n]=g(t[n].constructor===Array?[]:{},t[n]):g(e[n],t[n]));return e}function v(e,t){return C({min:e.min,max:e.max,maxbins:t})}function y(e,t){var n,i,r,o=[],a={};for(i=0,r=e.length;i<r;++i)n=t?t(e[i]):e[i],n in a||(a[n]=1,o.push(e[i]));return o}function b(e){console.warn("[VL Warning]",e)}function _(e){console.error("[VL Error]",e)}function E(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t[n]&&e[n]&&t[n]!==e[n])return!0;return!1}var x=e("json-stable-stringify"),w=e("datalib/src/util");n.keys=w.keys,n.extend=w.extend,n.duplicate=w.duplicate,n.isArray=w.isArray,n.vals=w.vals,n.truncate=w.truncate,n.toMap=w.toMap,n.isObject=w.isObject,n.isString=w.isString,n.isNumber=w.isNumber,n.isBoolean=w.isBoolean;var T=e("datalib/src/util"),S=e("datalib/src/generate");n.range=S.range;var A=e("datalib/src/util");n.pick=i,n.omit=r,n.hash=o,n.contains=a,n.without=s,n.union=l,n.forEach=u,n.reduce=c,n.map=f,n.some=h,n.every=d,n.flatten=p,n.mergeDeep=g;var C=e("datalib/src/bins/bins");n.getbins=v,n.unique=y,n.warning=b,n.error=_,n.differ=E},{"datalib/src/bins/bins":3,"datalib/src/generate":4,"datalib/src/util":6,"json-stable-stringify":7}],65:[function(e,t,n){"use strict";function i(e,t,i){void 0===t&&(t=n.DEFAULT_REQUIRED_CHANNEL_MAP),void 0===i&&(i=n.DEFAULT_SUPPORTED_CHANNEL_TYPE);var r=e.mark,a=e.encoding,s=t[r],l=i[r];for(var u in s)if(!(s[u]in a))return'Missing encoding channel "'+s[u]+'" for mark "'+r+'"';for(var c in a)if(!l[c])return'Encoding channel "'+c+'" is not supported by mark type "'+r+'"';return r!==o.BAR||a.x||a.y?null:"Missing both x and y for bar"}var r=e("./util"),o=e("./mark");n.DEFAULT_REQUIRED_CHANNEL_MAP={text:["text"],line:["x","y"],area:["x","y"]},n.DEFAULT_SUPPORTED_CHANNEL_TYPE={bar:r.toMap(["row","column","x","y","size","color","detail"]),line:r.toMap(["row","column","x","y","color","detail"]),area:r.toMap(["row","column","x","y","color","detail"]),tick:r.toMap(["row","column","x","y","color","detail"]),circle:r.toMap(["row","column","x","y","color","size","detail"]),square:r.toMap(["row","column","x","y","color","size","detail"]),point:r.toMap(["row","column","x","y","color","size","detail","shape"]),text:r.toMap(["row","column","size","color","text"])},n.getEncodingMappingError=i},{"./mark":55,"./util":64}],66:[function(e,t,n){"use strict";function i(e){return!o.isArray(e)&&"fields"in e}function r(e){return!o.isArray(e)&&"data"in e}var o=e("./util");n.isUnionedDomain=i,n.isDataRefDomain=r},{"./util":64}],67:[function(e,t,n){"use strict";n.axis=e("./axis"),n.aggregate=e("./aggregate"),n.bin=e("./bin"),n.channel=e("./channel"),n.compile=e("./compile/compile").compile,n.config=e("./config"),n.data=e("./data"),n.datetime=e("./datetime"),n.encoding=e("./encoding"),n.facet=e("./facet"),n.fieldDef=e("./fielddef"),n.legend=e("./legend"),n.mark=e("./mark"),n.scale=e("./scale"),n.shorthand=e("./shorthand"),n.sort=e("./sort"),n.spec=e("./spec"),n.stack=e("./stack"),n.timeUnit=e("./timeunit"),n.transform=e("./transform"),n.type=e("./type"),n.util=e("./util"),n.validate=e("./validate"),n.version="1.1.4"},{"./aggregate":11,"./axis":12,"./bin":13,"./channel":14,"./compile/compile":17,"./config":47,"./data":48,"./datetime":49,"./encoding":50,"./facet":51,"./fielddef":52,"./legend":54,"./mark":55,"./scale":56,"./shorthand":57,"./sort":58,"./spec":59,"./stack":60,"./timeunit":61,"./transform":62,"./type":63,"./util":64,"./validate":65}]},{},[67])(67)}),function(){(function(){function e(t,i){function o(e){if(o[e]!==m)return o[e];var t;if("bug-string-char-index"==e)t="a"!="a"[0];else if("json"==e)t=o("json-stringify")&&o("json-parse");else{var n,r='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==e){var l=i.stringify,c="function"==typeof l&&b;if(c){(n=function(){return 1}).toJSON=n;try{c="0"===l(0)&&"0"===l(new a)&&'""'==l(new s)&&l(y)===m&&l(m)===m&&l()===m&&"1"===l(n)&&"[1]"==l([n])&&"[null]"==l([m])&&"null"==l(null)&&"[null,null,null]"==l([m,y,null])&&l({a:[n,!0,!1,null,"\0\b\n\f\r\t"]})==r&&"1"===l(null,n)&&"[\n 1,\n 2\n]"==l([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==l(new u((-864e13)))&&'"+275760-09-13T00:00:00.000Z"'==l(new u(864e13))&&'"-000001-01-01T00:00:00.000Z"'==l(new u((-621987552e5)))&&'"1969-12-31T23:59:59.999Z"'==l(new u((-1)))}catch(f){c=!1}}t=c}if("json-parse"==e){var h=i.parse;if("function"==typeof h)try{if(0===h("0")&&!h(!1)){n=h(r);var d=5==n.a.length&&1===n.a[0];if(d){try{d=!h('"\t"')}catch(f){}if(d)try{d=1!==h("01")}catch(f){}if(d)try{d=1!==h("1.")}catch(f){}}}}catch(f){d=!1}t=d}}return o[e]=!!t}t||(t=r.Object()),i||(i=r.Object());var a=t.Number||r.Number,s=t.String||r.String,l=t.Object||r.Object,u=t.Date||r.Date,c=t.SyntaxError||r.SyntaxError,f=t.TypeError||r.TypeError,h=t.Math||r.Math,d=t.JSON||r.JSON;"object"==typeof d&&d&&(i.stringify=d.stringify,i.parse=d.parse);var p,g,m,v=l.prototype,y=v.toString,b=new u((-0xc782b5b800cec));try{b=b.getUTCFullYear()==-109252&&0===b.getUTCMonth()&&1===b.getUTCDate()&&10==b.getUTCHours()&&37==b.getUTCMinutes()&&6==b.getUTCSeconds()&&708==b.getUTCMilliseconds()}catch(_){}var E="[object Function]",x="[object Date]",w="[object Number]",T="[object String]",S="[object Array]",A="[object Boolean]",C=o("bug-string-char-index");if(!b)var k=h.floor,O=[0,31,59,90,120,151,181,212,243,273,304,334],I=function(e,t){return O[t]+365*(e-1970)+k((e-1969+(t=+(t>1)))/4)-k((e-1901+t)/100)+k((e-1601+t)/400)};(p=v.hasOwnProperty)||(p=function(e){var t,n={};return(n.__proto__=null,n.__proto__={toString:1},n).toString!=y?p=function(e){var t=this.__proto__,n=e in(this.__proto__=null,this);return this.__proto__=t,n}:(t=n.constructor,p=function(e){var n=(this.constructor||t).prototype;return e in this&&!(e in n&&this[e]===n[e])}),n=null,p.call(this,e)}),g=function(e,t){var i,r,o,a=0;(i=function(){this.valueOf=0}).prototype.valueOf=0,r=new i;for(o in r)p.call(r,o)&&a++;return i=r=null,a?g=2==a?function(e,t){var n,i={},r=y.call(e)==E;for(n in e)r&&"prototype"==n||p.call(i,n)||!(i[n]=1)||!p.call(e,n)||t(n)}:function(e,t){var n,i,r=y.call(e)==E;for(n in e)r&&"prototype"==n||!p.call(e,n)||(i="constructor"===n)||t(n);(i||p.call(e,n="constructor"))&&t(n)}:(r=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],g=function(e,t){var i,o,a=y.call(e)==E,s=!a&&"function"!=typeof e.constructor&&n[typeof e.hasOwnProperty]&&e.hasOwnProperty||p;for(i in e)a&&"prototype"==i||!s.call(e,i)||t(i);for(o=r.length;i=r[--o];s.call(e,i)&&t(i));}),g(e,t)};var N={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},M="000000",D=function(e,t){return(M+(t||0)).slice(-e)},L="\\u00",$=function(e){for(var t='"',n=0,i=e.length,r=!C||i>10,o=r&&(C?e.split(""):e);n<i;n++){var a=e.charCodeAt(n);switch(a){case 8:case 9:case 10:case 12:case 13:case 34:case 92:t+=N[a];break;default:if(a<32){t+=L+D(2,a.toString(16));break}t+=r?o[n]:e.charAt(n)}}return t+'"'},R=function(e,t,n,i,r,o,a,s){var l,u,c,h,d,v,b,_,E,C,O,N,M,L,P,F;s=s||0;try{l=t[e]}catch(U){}if("object"==typeof l&&l)if(u=y.call(l),u!=x||p.call(l,"toJSON"))"function"==typeof l.toJSON&&(u!=w&&u!=T&&u!=S||p.call(l,"toJSON"))&&(l=l.toJSON(e));else if(l>-1/0&&l<1/0){if(I){for(d=k(l/864e5),c=k(d/365.2425)+1970-1;I(c+1,0)<=d;c++);for(h=k((d-I(c,0))/30.42);I(c,h+1)<=d;h++);d=1+d-I(c,h),v=(l%864e5+864e5)%864e5,b=k(v/36e5)%24,_=k(v/6e4)%60,E=k(v/1e3)%60,C=v%1e3}else c=l.getUTCFullYear(),h=l.getUTCMonth(),d=l.getUTCDate(),b=l.getUTCHours(),_=l.getUTCMinutes(),E=l.getUTCSeconds(),C=l.getUTCMilliseconds();l=(c<=0||c>=1e4?(c<0?"-":"+")+D(6,c<0?-c:c):D(4,c))+"-"+D(2,h+1)+"-"+D(2,d)+"T"+D(2,b)+":"+D(2,_)+":"+D(2,E)+"."+D(3,C)+"Z"}else l=null;if(n&&(l=n.call(t,e,l)),null===l)return"null";if(u=y.call(l),u==A)return""+l;if(u==w)return l>-1/0&&l<1/0?""+l:"null";if(u==T)return $(""+l);if("object"==typeof l){for(L=a.length;L--;)if(a[L]===l)throw f();if(a.push(l),O=[],P=o,o+=r,u==S){var F,j=o.length;for(M=0,L=l.length;M<L;M++)N=R(M,l,n,i,r,o,a,s),F=N===m?"null":N,j+=F.length+(M>0?1:0),O.push(F);F=O.length?r&&j>s?"[\n"+o+O.join(",\n"+o)+"\n"+P+"]":"["+O.join(",")+"]":"[]"}else{var j=o.length,M=0;g(i||l,function(e){var t,u=R(e,l,n,i,r,o,a,s);u!==m&&(t=$(e)+":"+(r?" ":"")+u,j+=t.length+(M++>0?1:0),O.push(t))}),F=O.length?r&&j>s?"{\n"+o+O.join(",\n"+o)+"\n"+P+"}":"{"+O.join(",")+"}":"{}"}return a.pop(),F}};if(i.stringify=function(e,t,i,r){var o,a,s,l;if(n[typeof t]&&t)if((l=y.call(t))==E)a=t;else if(l==S){s={};for(var u,c=0,f=t.length;c<f;u=t[c++],l=y.call(u),(l==T||l==w)&&(s[u]=1));}if(i)if((l=y.call(i))==w){if((i-=i%1)>0)for(o="",i>10&&(i=10);o.length<i;o+=" ");}else l==T&&(o=i.length<=10?i:i.slice(0,10));return R("",(u={},u[""]=e,u),a,s,o,"",[],r)},i.compactStringify=function(e,t,n){return i.stringify(e,t,n,60)},!o("json-parse")){var P,F,U=s.fromCharCode,j={92:"\\",34:'"',47:"/",98:"\b",116:"\t",110:"\n",102:"\f",114:"\r"},H=function(){throw P=F=null,c()},z=function(){for(var e,t,n,i,r,o=F,a=o.length;P<a;)switch(r=o.charCodeAt(P)){case 9:case 10:case 13:case 32:P++;break;case 123:case 125:case 91:case 93:case 58:case 44:return e=C?o.charAt(P):o[P],P++,e;case 34:for(e="@",P++;P<a;)if(r=o.charCodeAt(P),r<32)H();else if(92==r)switch(r=o.charCodeAt(++P)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:e+=j[r],P++;break;case 117:for(t=++P,n=P+4;P<n;P++)r=o.charCodeAt(P),r>=48&&r<=57||r>=97&&r<=102||r>=65&&r<=70||H();e+=U("0x"+o.slice(t,P));break;default:H()}else{if(34==r)break;for(r=o.charCodeAt(P),t=P;r>=32&&92!=r&&34!=r;)r=o.charCodeAt(++P);e+=o.slice(t,P)}if(34==o.charCodeAt(P))return P++,e;H();default:if(t=P,45==r&&(i=!0,r=o.charCodeAt(++P)),r>=48&&r<=57){for(48==r&&(r=o.charCodeAt(P+1),r>=48&&r<=57)&&H(),i=!1;P<a&&(r=o.charCodeAt(P),r>=48&&r<=57);P++);if(46==o.charCodeAt(P)){for(n=++P;n<a&&(r=o.charCodeAt(n),r>=48&&r<=57);n++);n==P&&H(),P=n}if(r=o.charCodeAt(P),101==r||69==r){for(r=o.charCodeAt(++P),43!=r&&45!=r||P++,n=P;n<a&&(r=o.charCodeAt(n),r>=48&&r<=57);n++);n==P&&H(),P=n}return+o.slice(t,P)}if(i&&H(),"true"==o.slice(P,P+4))return P+=4,!0;if("false"==o.slice(P,P+5))return P+=5,!1;if("null"==o.slice(P,P+4))return P+=4,null;H()}return"$"},B=function(e){var t,n;if("$"==e&&H(),"string"==typeof e){if("@"==(C?e.charAt(0):e[0]))return e.slice(1);if("["==e){for(t=[];e=z(),"]"!=e;n||(n=!0))n&&(","==e?(e=z(),"]"==e&&H()):H()),","==e&&H(),t.push(B(e));return t}if("{"==e){for(t={};e=z(),"}"!=e;n||(n=!0))n&&(","==e?(e=z(),"}"==e&&H()):H()),","!=e&&"string"==typeof e&&"@"==(C?e.charAt(0):e[0])&&":"==z()||H(),t[e.slice(1)]=B(z());return t;
}H()}return e},q=function(e,t,n){var i=W(e,t,n);i===m?delete e[t]:e[t]=i},W=function(e,t,n){var i,r=e[t];if("object"==typeof r&&r)if(y.call(r)==S)for(i=r.length;i--;)q(r,i,n);else g(r,function(e){q(r,e,n)});return n.call(e,t,r)};i.parse=function(e,t){var n,i;return P=0,F=""+e,n=B(z()),"$"!=z()&&H(),P=F=null,t&&y.call(t)==E?W((i={},i[""]=n,i),"",t):n}}return i.runInContext=e,i}var t="function"==typeof define&&define.amd,n={"function":!0,object:!0},i=n[typeof exports]&&exports&&!exports.nodeType&&exports,r=n[typeof window]&&window||this,o=i&&n[typeof module]&&module&&!module.nodeType&&"object"==typeof global&&global;if(!o||o.global!==o&&o.window!==o&&o.self!==o||(r=o),i&&!t)e(r,i);else{var a=r.JSON,s=r.JSON3,l=!1,u=e(r,r.JSON3={noConflict:function(){return l||(l=!0,r.JSON=a,r.JSON3=s,a=s=null),u}});r.JSON={parse:u.parse,stringify:u.stringify}}t&&define(function(){return u})}).call(this)}(),function(){window.vlSchema={oneOf:[{$ref:"#/definitions/ExtendedUnitSpec",description:"Schema for a unit Vega-Lite specification, with the syntactic sugar extensions:\n\n- `row` and `column` are included in the encoding.\n\n- (Future) label, box plot\n\n\n\nNote: the spec could contain facet."},{$ref:"#/definitions/FacetSpec"},{$ref:"#/definitions/LayerSpec"}],definitions:{ExtendedUnitSpec:{type:"object",properties:{mark:{$ref:"#/definitions/Mark",description:'The mark type.\n\nOne of `"bar"`, `"circle"`, `"square"`, `"tick"`, `"line"`,\n\n`"area"`, `"point"`, `"rule"`, and `"text"`.'},encoding:{$ref:"#/definitions/Encoding",description:"A key-value mapping between encoding channels and definition of fields."},name:{description:"Name of the visualization for later reference.",type:"string"},description:{description:"An optional description of this mark for commenting purpose.\n\nThis property has no effect on the output visualization.",type:"string"},data:{$ref:"#/definitions/Data",description:"An object describing the data source"},transform:{$ref:"#/definitions/Transform",description:"An object describing filter and new field calculation."},config:{$ref:"#/definitions/Config",description:"Configuration object"}},required:["mark"]},Mark:{type:"string","enum":["area","bar","line","point","text","tick","rule","circle","square","errorBar"]},Encoding:{type:"object",properties:{row:{$ref:"#/definitions/PositionChannelDef",description:"Vertical facets for trellis plots."},column:{$ref:"#/definitions/PositionChannelDef",description:"Horizontal facets for trellis plots."},x:{$ref:"#/definitions/PositionChannelDef",description:"X coordinates for `point`, `circle`, `square`,\n\n`line`, `rule`, `text`, and `tick`\n\n(or to width and height for `bar` and `area` marks)."},y:{$ref:"#/definitions/PositionChannelDef",description:"Y coordinates for `point`, `circle`, `square`,\n\n`line`, `rule`, `text`, and `tick`\n\n(or to width and height for `bar` and `area` marks)."},x2:{$ref:"#/definitions/PositionChannelDef",description:"X2 coordinates for ranged `bar`, `rule`, `area`"},y2:{$ref:"#/definitions/PositionChannelDef",description:"Y2 coordinates for ranged `bar`, `rule`, `area`"},color:{$ref:"#/definitions/ChannelDefWithLegend",description:"Color of the marks – either fill or stroke color based on mark type.\n\n(By default, fill color for `area`, `bar`, `tick`, `text`, `circle`, and `square` /\n\nstroke color for `line` and `point`.)"},opacity:{$ref:"#/definitions/ChannelDefWithLegend",description:"Opacity of the marks – either can be a value or in a range."},size:{$ref:"#/definitions/ChannelDefWithLegend",description:"Size of the mark.\n\n- For `point`, `square` and `circle`\n\n– the symbol size, or pixel area of the mark.\n\n- For `bar` and `tick` – the bar and tick's size.\n\n- For `text` – the text's font size.\n\n- Size is currently unsupported for `line` and `area`."},shape:{$ref:"#/definitions/ChannelDefWithLegend",description:'The symbol\'s shape (only for `point` marks). The supported values are\n\n`"circle"` (default), `"square"`, `"cross"`, `"diamond"`, `"triangle-up"`,\n\nor `"triangle-down"`, or else a custom SVG path string.'},detail:{description:"Additional levels of detail for grouping data in aggregate views and\n\nin line and area marks without mapping data to a specific visual channel.",oneOf:[{$ref:"#/definitions/FieldDef",description:"Interface for any kind of FieldDef;\n\nFor simplicity, we do not declare multiple interfaces of FieldDef like\n\nwe do for JSON schema."},{type:"array",items:{$ref:"#/definitions/FieldDef",description:"Interface for any kind of FieldDef;\n\nFor simplicity, we do not declare multiple interfaces of FieldDef like\n\nwe do for JSON schema."}}]},text:{$ref:"#/definitions/FieldDef",description:"Text of the `text` mark."},label:{$ref:"#/definitions/FieldDef"},path:{description:"Order of data points in line marks.",oneOf:[{$ref:"#/definitions/OrderChannelDef"},{type:"array",items:{$ref:"#/definitions/OrderChannelDef"}}]},order:{description:"Layer order for non-stacked marks, or stack order for stacked marks.",oneOf:[{$ref:"#/definitions/OrderChannelDef"},{type:"array",items:{$ref:"#/definitions/OrderChannelDef"}}]}}},PositionChannelDef:{type:"object",properties:{axis:{oneOf:[{type:"boolean"},{$ref:"#/definitions/Axis"}]},scale:{$ref:"#/definitions/Scale"},sort:{oneOf:[{$ref:"#/definitions/SortField"},{$ref:"#/definitions/SortOrder"}]},field:{description:"Name of the field from which to pull a data value.",type:"string"},type:{$ref:"#/definitions/Type",description:'The encoded field\'s type of measurement. This can be either a full type\n\nname (`"quantitative"`, `"temporal"`, `"ordinal"`,  and `"nominal"`)\n\nor an initial character of the type name (`"Q"`, `"T"`, `"O"`, `"N"`).\n\nThis property is case insensitive.'},value:{description:"A constant value in visual domain.",oneOf:[{type:"number"},{type:"string"},{type:"boolean"}]},timeUnit:{$ref:"#/definitions/TimeUnit",description:"Time unit for a `temporal` field  (e.g., `year`, `yearmonth`, `month`, `hour`)."},bin:{description:"Flag for binning a `quantitative` field, or a bin property object\n\nfor binning parameters.",oneOf:[{type:"boolean"},{$ref:"#/definitions/Bin",description:"Binning properties or boolean flag for determining whether to bin data or not."}]},aggregate:{$ref:"#/definitions/AggregateOp",description:"Aggregation function for the field\n\n(e.g., `mean`, `sum`, `median`, `min`, `max`, `count`)."},title:{description:"Title for axis or legend.",type:"string"}}},Axis:{type:"object",properties:{labelAngle:{description:"The rotation angle of the axis labels.",type:"number"},format:{description:"The formatting pattern for axis labels.",type:"string"},orient:{$ref:"#/definitions/AxisOrient",description:"The orientation of the axis. One of top, bottom, left or right. The orientation can be used to further specialize the axis type (e.g., a y axis oriented for the right edge of the chart)."},title:{description:"A title for the axis. Shows field name and its function by default.",type:"string"},values:{type:"array",items:{type:"number"}},axisWidth:{description:"Width of the axis line",type:"number"},layer:{description:"A string indicating if the axis (and any gridlines) should be placed above or below the data marks.",type:"string"},offset:{description:"The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.",type:"number"},axisColor:{description:"Color of axis line.",type:"string"},grid:{description:"A flag indicate if gridlines should be created in addition to ticks. If `grid` is unspecified, the default value is `true` for ROW and COL. For X and Y, the default value is `true` for quantitative and time fields and `false` otherwise.",type:"boolean"},gridColor:{description:"Color of gridlines.",type:"string"},gridDash:{description:"The offset (in pixels) into which to begin drawing with the grid dash array.",type:"array",items:{type:"number"}},gridOpacity:{description:"The stroke opacity of grid (value between [0,1])",type:"number"},gridWidth:{description:"The grid width, in pixels.",type:"number"},labels:{description:"Enable or disable labels.",type:"boolean"},labelAlign:{description:"Text alignment for the Label.",type:"string"},labelBaseline:{description:"Text baseline for the label.",type:"string"},labelMaxLength:{description:"Truncate labels that are too long.",minimum:1,type:"number"},shortTimeLabels:{description:"Whether month and day names should be abbreviated.",type:"boolean"},subdivide:{description:"If provided, sets the number of minor ticks between major ticks (the value 9 results in decimal subdivision). Only applicable for axes visualizing quantitative scales.",type:"number"},ticks:{description:'A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are "nice" (multiples of 2, 5, 10) and lie within the underlying scale\'s range.',minimum:0,type:"number"},tickColor:{description:"The color of the axis's tick.",type:"string"},tickLabelColor:{description:"The color of the tick label, can be in hex color code or regular color name.",type:"string"},tickLabelFont:{description:"The font of the tick label.",type:"string"},tickLabelFontSize:{description:"The font size of label, in pixels.",type:"number"},tickPadding:{description:"The padding, in pixels, between ticks and text labels.",type:"number"},tickSize:{description:"The size, in pixels, of major, minor and end ticks.",minimum:0,type:"number"},tickSizeMajor:{description:"The size, in pixels, of major ticks.",minimum:0,type:"number"},tickSizeMinor:{description:"The size, in pixels, of minor ticks.",minimum:0,type:"number"},tickSizeEnd:{description:"The size, in pixels, of end ticks.",minimum:0,type:"number"},tickWidth:{description:"The width, in pixels, of ticks.",type:"number"},titleColor:{description:"Color of the title, can be in hex color code or regular color name.",type:"string"},titleFont:{description:"Font of the title.",type:"string"},titleFontSize:{description:"Size of the title.",type:"number"},titleFontWeight:{description:"Weight of the title.",type:"string"},titleOffset:{description:"A title offset value for the axis.",type:"number"},titleMaxLength:{description:"Max length for axis title if the title is automatically generated from the field's description. By default, this is automatically based on cell size and characterWidth property.",minimum:0,type:"number"},characterWidth:{description:"Character width for automatically determining title max length.",type:"number"},properties:{description:"Optional mark property definitions for custom axis styling."}}},AxisOrient:{type:"string","enum":["top","right","left","bottom"]},Scale:{type:"object",properties:{type:{$ref:"#/definitions/ScaleType"},domain:{description:"The domain of the scale, representing the set of data values. For quantitative data, this can take the form of a two-element array with minimum and maximum values. For ordinal/categorical data, this may be an array of valid input values.",oneOf:[{type:"array",items:{type:"number"}},{type:"array",items:{type:"string"}}]},range:{description:"The range of the scale, representing the set of visual values. For numeric values, the range can take the form of a two-element array with minimum and maximum values. For ordinal or quantized data, the range may by an array of desired output values, which are mapped to elements in the specified domain. For ordinal scales only, the range can be defined using a DataRef: the range values are then drawn dynamically from a backing data set.",oneOf:[{type:"string"},{type:"array",items:{type:"number"}},{type:"array",items:{type:"string"}}]},round:{description:"If true, rounds numeric output values to integers. This can be helpful for snapping to the pixel grid.",type:"boolean"},bandSize:{minimum:0,type:"number"},padding:{description:"Applies spacing among ordinal elements in the scale range. The actual effect depends on how the scale is configured. If the __points__ parameter is `true`, the padding value is interpreted as a multiple of the spacing between points. A reasonable value is 1.0, such that the first and last point will be offset from the minimum and maximum value by half the distance between points. Otherwise, padding is typically in the range [0, 1] and corresponds to the fraction of space in the range interval to allocate to padding. A value of 0.5 means that the range band width will be equal to the padding width. For more, see the [D3 ordinal scale documentation](https://github.com/mbostock/d3/wiki/Ordinal-Scales).",type:"number"},clamp:{description:"If true, values that exceed the data domain are clamped to either the minimum or maximum range value",type:"boolean"},nice:{description:"If specified, modifies the scale domain to use a more human-friendly value range. If specified as a true boolean, modifies the scale domain to use a more human-friendly number range (e.g., 7 instead of 6.96). If specified as a string, modifies the scale domain to use a more human-friendly value range. For time and utc scale types only, the nice value should be a string indicating the desired time interval.",oneOf:[{type:"boolean"},{$ref:"#/definitions/NiceTime"}]},exponent:{description:"Sets the exponent of the scale transformation. For pow scale types only, otherwise ignored.",type:"number"},zero:{description:"If `true`, ensures that a zero baseline value is included in the scale domain.\n\nDefault value: `true` for `x` and `y` channel if the quantitative field is not binned\n\nand no custom `domain` is provided; `false` otherwise.",type:"boolean"},useRawDomain:{description:'Uses the source data range as scale domain instead of aggregated data for aggregate axis.\n\nThis property only works with aggregate functions that produce values within the raw data domain (`"mean"`, `"average"`, `"stdev"`, `"stdevp"`, `"median"`, `"q1"`, `"q3"`, `"min"`, `"max"`). For other aggregations that produce values outside of the raw data domain (e.g. `"count"`, `"sum"`), this property is ignored.',type:"boolean"}}},ScaleType:{type:"string","enum":["linear","log","pow","sqrt","quantile","quantize","ordinal","time","utc"]},NiceTime:{type:"string","enum":["second","minute","hour","day","week","month","year"]},SortField:{type:"object",properties:{field:{description:"The field name to aggregate over.",type:"string"},op:{$ref:"#/definitions/AggregateOp",description:"The sort aggregation operator"},order:{$ref:"#/definitions/SortOrder"}},required:["field","op"]},AggregateOp:{type:"string","enum":["values","count","valid","missing","distinct","sum","mean","average","variance","variancep","stdev","stdevp","median","q1","q3","modeskew","min","max","argmin","argmax"]},SortOrder:{type:"string","enum":["ascending","descending","none"]},Type:{type:"string","enum":["quantitative","ordinal","temporal","nominal"]},TimeUnit:{type:"string","enum":["year","month","day","date","hours","minutes","seconds","milliseconds","yearmonth","yearmonthdate","yearmonthdatehours","yearmonthdatehoursminutes","yearmonthdatehoursminutesseconds","hoursminutes","hoursminutesseconds","minutesseconds","secondsmilliseconds","quarter","yearquarter","quartermonth","yearquartermonth"]},Bin:{type:"object",properties:{min:{description:"The minimum bin value to consider. If unspecified, the minimum value of the specified field is used.",type:"number"},max:{description:"The maximum bin value to consider. If unspecified, the maximum value of the specified field is used.",type:"number"},base:{description:"The number base to use for automatic bin determination (default is base 10).",type:"number"},step:{description:"An exact step size to use between bins. If provided, options such as maxbins will be ignored.",type:"number"},steps:{description:"An array of allowable step sizes to choose from.",type:"array",items:{type:"number"}},minstep:{description:"A minimum allowable step size (particularly useful for integer values).",type:"number"},div:{description:"Scale factors indicating allowable subdivisions. The default value is [5, 2], which indicates that for base 10 numbers (the default base), the method may consider dividing bin sizes by 5 and/or 2. For example, for an initial step size of 10, the method can check if bin sizes of 2 (= 10/5), 5 (= 10/2), or 1 (= 10/(5*2)) might also satisfy the given constraints.",type:"array",items:{type:"number"}},maxbins:{description:"Maximum number of bins.",minimum:2,type:"number"}}},ChannelDefWithLegend:{type:"object",properties:{legend:{$ref:"#/definitions/Legend"},scale:{$ref:"#/definitions/Scale"},sort:{oneOf:[{$ref:"#/definitions/SortField"},{$ref:"#/definitions/SortOrder"}]},field:{description:"Name of the field from which to pull a data value.",type:"string"},type:{$ref:"#/definitions/Type",description:'The encoded field\'s type of measurement. This can be either a full type\n\nname (`"quantitative"`, `"temporal"`, `"ordinal"`,  and `"nominal"`)\n\nor an initial character of the type name (`"Q"`, `"T"`, `"O"`, `"N"`).\n\nThis property is case insensitive.'},value:{description:"A constant value in visual domain.",oneOf:[{type:"number"},{type:"string"},{type:"boolean"}]},timeUnit:{$ref:"#/definitions/TimeUnit",description:"Time unit for a `temporal` field  (e.g., `year`, `yearmonth`, `month`, `hour`)."},bin:{description:"Flag for binning a `quantitative` field, or a bin property object\n\nfor binning parameters.",oneOf:[{type:"boolean"},{$ref:"#/definitions/Bin",description:"Binning properties or boolean flag for determining whether to bin data or not."}]},aggregate:{$ref:"#/definitions/AggregateOp",description:"Aggregation function for the field\n\n(e.g., `mean`, `sum`, `median`, `min`, `max`, `count`)."},title:{description:"Title for axis or legend.",type:"string"}}},Legend:{type:"object",properties:{format:{description:"An optional formatting pattern for legend labels. Vega uses D3\\'s format pattern.",type:"string"},title:{description:"A title for the legend. (Shows field name and its function by default.)",type:"string"},values:{description:"Explicitly set the visible legend values.",type:"array",items:{}},orient:{description:'The orientation of the legend. One of "left" or "right". This determines how the legend is positioned within the scene. The default is "right".',type:"string"},offset:{description:"The offset, in pixels, by which to displace the legend from the edge of the enclosing group or data rectangle.",type:"number"},padding:{description:"The padding, in pixels, between the lengend and axis.",type:"number"},margin:{description:"The margin around the legend, in pixels",type:"number"},gradientStrokeColor:{description:"The color of the gradient stroke, can be in hex color code or regular color name.",type:"string"},gradientStrokeWidth:{description:"The width of the gradient stroke, in pixels.",type:"number"},gradientHeight:{description:"The height of the gradient, in pixels.",type:"number"},gradientWidth:{description:"The width of the gradient, in pixels.",type:"number"},labelAlign:{description:"The alignment of the legend label, can be left, middle or right.",type:"string"},labelBaseline:{description:"The position of the baseline of legend label, can be top, middle or bottom.",type:"string"},labelColor:{description:"The color of the legend label, can be in hex color code or regular color name.",type:"string"},labelFont:{description:"The font of the lengend label.",type:"string"},labelFontSize:{description:"The font size of lengend lable.",type:"number"},labelOffset:{description:"The offset of the legend label.",type:"number"},shortTimeLabels:{description:"Whether month names and weekday names should be abbreviated.",type:"boolean"},symbolColor:{description:"The color of the legend symbol,",type:"string"},symbolShape:{description:"The shape of the legend symbol, can be the 'circle', 'square', 'cross', 'diamond',\n\n'triangle-up', 'triangle-down', or else a custom SVG path string.",type:"string"},symbolSize:{description:"The size of the lengend symbol, in pixels.",type:"number"},symbolStrokeWidth:{description:"The width of the symbol's stroke.",type:"number"},titleColor:{description:"Optional mark property definitions for custom legend styling.\n\nThe color of the legend title, can be in hex color code or regular color name.",type:"string"},titleFont:{description:"The font of the legend title.",type:"string"},titleFontSize:{description:"The font size of the legend title.",type:"number"},titleFontWeight:{description:"The font weight of the legend title.",type:"string"},properties:{description:"Optional mark property definitions for custom legend styling."}}},FieldDef:{type:"object",properties:{field:{description:"Name of the field from which to pull a data value.",type:"string"},type:{$ref:"#/definitions/Type",description:'The encoded field\'s type of measurement. This can be either a full type\n\nname (`"quantitative"`, `"temporal"`, `"ordinal"`,  and `"nominal"`)\n\nor an initial character of the type name (`"Q"`, `"T"`, `"O"`, `"N"`).\n\nThis property is case insensitive.'},value:{description:"A constant value in visual domain.",oneOf:[{type:"number"},{type:"string"},{type:"boolean"}]},timeUnit:{$ref:"#/definitions/TimeUnit",description:"Time unit for a `temporal` field  (e.g., `year`, `yearmonth`, `month`, `hour`)."},bin:{description:"Flag for binning a `quantitative` field, or a bin property object\n\nfor binning parameters.",oneOf:[{type:"boolean"},{$ref:"#/definitions/Bin",description:"Binning properties or boolean flag for determining whether to bin data or not."}]},aggregate:{$ref:"#/definitions/AggregateOp",description:"Aggregation function for the field\n\n(e.g., `mean`, `sum`, `median`, `min`, `max`, `count`)."},title:{description:"Title for axis or legend.",type:"string"}}},OrderChannelDef:{type:"object",properties:{sort:{$ref:"#/definitions/SortOrder"},field:{description:"Name of the field from which to pull a data value.",type:"string"},type:{$ref:"#/definitions/Type",description:'The encoded field\'s type of measurement. This can be either a full type\n\nname (`"quantitative"`, `"temporal"`, `"ordinal"`,  and `"nominal"`)\n\nor an initial character of the type name (`"Q"`, `"T"`, `"O"`, `"N"`).\n\nThis property is case insensitive.'},value:{description:"A constant value in visual domain.",oneOf:[{type:"number"},{type:"string"},{type:"boolean"}]},timeUnit:{$ref:"#/definitions/TimeUnit",description:"Time unit for a `temporal` field  (e.g., `year`, `yearmonth`, `month`, `hour`)."},bin:{description:"Flag for binning a `quantitative` field, or a bin property object\n\nfor binning parameters.",oneOf:[{type:"boolean"},{$ref:"#/definitions/Bin",description:"Binning properties or boolean flag for determining whether to bin data or not."}]},aggregate:{$ref:"#/definitions/AggregateOp",description:"Aggregation function for the field\n\n(e.g., `mean`, `sum`, `median`, `min`, `max`, `count`)."},title:{description:"Title for axis or legend.",type:"string"}}},Data:{type:"object",properties:{format:{$ref:"#/definitions/DataFormat",description:"An object that specifies the format for the data file or values."},url:{description:"A URL from which to load the data set. Use the format.type property\n\nto ensure the loaded data is correctly parsed.",type:"string"},values:{description:"Pass array of objects instead of a url to a file.",type:"array",items:{}}}},DataFormat:{type:"object",properties:{type:{$ref:"#/definitions/DataFormatType",description:'Type of input data: `"json"`, `"csv"`, `"tsv"`.\n\nThe default format type is determined by the extension of the file url.\n\nIf no extension is detected, `"json"` will be used by default.'},property:{description:'JSON only) The JSON property containing the desired data.\n\nThis parameter can be used when the loaded JSON file may have surrounding structure or meta-data.\n\nFor example `"property": "values.features"` is equivalent to retrieving `json.values.features`\n\nfrom the loaded JSON object.',type:"string"},feature:{description:'The name of the TopoJSON object set to convert to a GeoJSON feature collection.\n\nFor example, in a map of the world, there may be an object set named `"countries"`.\n\nUsing the feature property, we can extract this set and generate a GeoJSON feature object for each country.',type:"string"},mesh:{description:"The name of the TopoJSON object set to convert to a mesh.\n\nSimilar to the `feature` option, `mesh` extracts a named TopoJSON object set.\n\nUnlike the `feature` option, the corresponding geo data is returned as a single, unified mesh instance, not as inidividual GeoJSON features.\n\nExtracting a mesh is useful for more efficiently drawing borders or other geographic elements that you do not need to associate with specific regions such as individual countries, states or counties.",type:"string"}}},DataFormatType:{type:"string","enum":["json","csv","tsv","topojson"]},Transform:{type:"object",properties:{filter:{description:"A string containing the filter Vega expression. Use `datum` to refer to the current data object.",oneOf:[{type:"string"},{$ref:"#/definitions/EqualFilter"},{$ref:"#/definitions/RangeFilter"},{$ref:"#/definitions/InFilter"},{type:"array",items:{oneOf:[{type:"string"},{$ref:"#/definitions/EqualFilter"},{$ref:"#/definitions/RangeFilter"},{$ref:"#/definitions/InFilter"}]}}]},filterInvalid:{description:"Whether to filter invalid values (`null` and `NaN`) from the data. By default (`undefined`), only quantitative and temporal fields are filtered. If set to `true`, all data items with null values are filtered. If `false`, all data items are included.",type:"boolean"},calculate:{description:"Calculate new field(s) using the provided expresssion(s). Calculation are applied before filter.",type:"array",items:{$ref:"#/definitions/Formula",description:"Formula object for calculate."}}}},EqualFilter:{type:"object",properties:{timeUnit:{$ref:"#/definitions/TimeUnit",description:"Time unit for the field to be filtered."},field:{description:"Field to be filtered.",type:"string"},equal:{description:"Value that the field should be equal to.",oneOf:[{type:"string"},{type:"number"},{type:"boolean"},{$ref:"#/definitions/DateTime",description:"Object for defining datetime in Vega-Lite Filter.\n\nIf both month and quarter are provided, month has higher precedence.\n\n`day` cannot be combined with other date.\n\nWe accept string for month and day names."}]}},required:["field","equal"]},DateTime:{type:"object",properties:{year:{description:"Integer value representing the year.",type:"number"},quarter:{description:"Integer value representing the quarter of the year (from 1-4).",type:"number"},month:{description:'One of: (1) integer value representing the month from `1`-`12`. `1` represents January;  (2) case-insensitive month name (e.g., `"January"`);  (3) case-insensitive, 3-character short month name (e.g., `"Jan"`).',oneOf:[{type:"number"},{type:"string"}]},date:{description:"Integer value representing the date from 1-31.",type:"number"},day:{description:'Value representing the day of week.  This can be one of: (1) integer value -- `1` represents Monday; (2) case-insensitive day name (e.g., `"Monday"`);  (3) case-insensitive, 3-character short day name (e.g., `"Mon"`).   <br/> **Warning:** A DateTime definition object with `day`** should not be combined with `year`, `quarter`, `month`, or `date`.',oneOf:[{type:"number"},{type:"string"}]},hours:{description:"Integer value representing the hour of day from 0-23.",type:"number"},minutes:{description:"Integer value representing minute segment of a time from 0-59.",type:"number"},seconds:{description:"Integer value representing second segment of a time from 0-59.",type:"number"},milliseconds:{description:"Integer value representing millisecond segment of a time.",type:"number"}}},RangeFilter:{type:"object",properties:{timeUnit:{$ref:"#/definitions/TimeUnit",description:"time unit for the field to be filtered."},field:{description:"Field to be filtered",type:"string"},range:{description:"Array of inclusive minimum and maximum values\n\nfor a field value of a data item to be included in the filtered data.",maxItems:2,minItems:2,type:"array",items:{oneOf:[{type:"number"},{$ref:"#/definitions/DateTime",description:"Object for defining datetime in Vega-Lite Filter.\n\nIf both month and quarter are provided, month has higher precedence.\n\n`day` cannot be combined with other date.\n\nWe accept string for month and day names."}]}}},required:["field","range"]},InFilter:{type:"object",properties:{timeUnit:{$ref:"#/definitions/TimeUnit",description:"time unit for the field to be filtered."},field:{description:"Field to be filtered",type:"string"},"in":{description:"A set of values that the `field`'s value should be a member of,\n\nfor a data item included in the filtered data.",type:"array",items:{oneOf:[{type:"string"},{type:"number"},{type:"boolean"},{$ref:"#/definitions/DateTime",description:"Object for defining datetime in Vega-Lite Filter.\n\nIf both month and quarter are provided, month has higher precedence.\n\n`day` cannot be combined with other date.\n\nWe accept string for month and day names."}]}}},required:["field","in"]},Formula:{type:"object",properties:{field:{description:"The field in which to store the computed formula value.",type:"string"},expr:{description:"A string containing an expression for the formula. Use the variable `datum` to to refer to the current data object.",type:"string"}},required:["field","expr"]},Config:{type:"object",properties:{viewport:{description:"The width and height of the on-screen viewport, in pixels. If necessary, clipping and scrolling will be applied.",type:"number"},background:{description:'CSS color property to use as background of visualization. Default is `"transparent"`.',type:"string"},numberFormat:{description:'D3 Number format for axis labels and text tables. For example "s" for SI units.',type:"string"},timeFormat:{description:"Default datetime format for axis and legend labels. The format can be set directly on each axis and legend.",type:"string"},countTitle:{description:"Default axis and legend title for count fields.",type:"string"},cell:{$ref:"#/definitions/CellConfig",description:"Cell Config"},mark:{$ref:"#/definitions/MarkConfig",description:"Mark Config"},overlay:{$ref:"#/definitions/OverlayConfig",description:"Mark Overlay Config"},scale:{$ref:"#/definitions/ScaleConfig",description:"Scale Config"},axis:{$ref:"#/definitions/AxisConfig",description:"Axis Config"},legend:{$ref:"#/definitions/LegendConfig",description:"Legend Config"},facet:{$ref:"#/definitions/FacetConfig",description:"Facet Config"}}},CellConfig:{type:"object",properties:{width:{type:"number"},height:{type:"number"},clip:{type:"boolean"},fill:{description:"The fill color.",format:"color",type:"string"},fillOpacity:{description:"The fill opacity (value between [0,1]).",type:"number"},stroke:{description:"The stroke color.",type:"string"},strokeOpacity:{description:"The stroke opacity (value between [0,1]).",type:"number"},strokeWidth:{description:"The stroke width, in pixels.",type:"number"},strokeDash:{description:"An array of alternating stroke, space lengths for creating dashed or dotted lines.",type:"array",items:{type:"number"}},strokeDashOffset:{description:"The offset (in pixels) into which to begin drawing with the stroke dash array.",type:"number"}}},MarkConfig:{type:"object",properties:{filled:{description:'Whether the shape\\\'s color should be used as fill color instead of stroke color.\n\nThis is only applicable for "bar", "point", and "area".\n\nAll marks except "point" marks are filled by default.\n\nSee Mark Documentation (http://vega.github.io/vega-lite/docs/marks.html)\n\nfor usage example.',type:"boolean"},color:{description:"Default color.",format:"color",type:"string"},fill:{description:"Default Fill Color.  This has higher precedence than config.color",format:"color",type:"string"},stroke:{description:"Default Stroke Color.  This has higher precedence than config.color",
format:"color",type:"string"},opacity:{minimum:0,maximum:1,type:"number"},fillOpacity:{minimum:0,maximum:1,type:"number"},strokeOpacity:{minimum:0,maximum:1,type:"number"},strokeWidth:{minimum:0,type:"number"},strokeDash:{description:"An array of alternating stroke, space lengths for creating dashed or dotted lines.",type:"array",items:{type:"number"}},strokeDashOffset:{description:"The offset (in pixels) into which to begin drawing with the stroke dash array.",type:"number"},stacked:{$ref:"#/definitions/StackOffset"},orient:{$ref:"#/definitions/Orient",description:"The orientation of a non-stacked bar, tick, area, and line charts.\n\nThe value is either horizontal (default) or vertical.\n\n- For bar, rule and tick, this determines whether the size of the bar and tick\n\nshould be applied to x or y dimension.\n\n- For area, this property determines the orient property of the Vega output.\n\n- For line, this property determines the sort order of the points in the line\n\nif `config.sortLineBy` is not specified.\n\nFor stacked charts, this is always determined by the orientation of the stack;\n\ntherefore explicitly specified value will be ignored."},interpolate:{$ref:"#/definitions/Interpolate",description:"The line interpolation method to use. One of linear, step-before, step-after, basis, basis-open, cardinal, cardinal-open, monotone."},tension:{description:"Depending on the interpolation type, sets the tension parameter.",type:"number"},lineSize:{description:"Size of line mark.",type:"number"},ruleSize:{description:"Size of rule mark.",type:"number"},barSize:{description:"The size of the bars.  If unspecified, the default size is  `bandSize-1`,\n\nwhich provides 1 pixel offset between bars.",type:"number"},barThinSize:{description:"The size of the bars on continuous scales.",type:"number"},shape:{description:"The symbol shape to use. One of circle (default), square, cross, diamond, triangle-up, or triangle-down, or a custom SVG path.",oneOf:[{$ref:"#/definitions/Shape"},{type:"string"}]},size:{description:"The pixel area each the point. For example: in the case of circles, the radius is determined in part by the square root of the size value.",type:"number"},tickSize:{description:"The width of the ticks.",type:"number"},tickThickness:{description:"Thickness of the tick mark.",type:"number"},align:{$ref:"#/definitions/HorizontalAlign",description:"The horizontal alignment of the text. One of left, right, center."},angle:{description:"The rotation angle of the text, in degrees.",type:"number"},baseline:{$ref:"#/definitions/VerticalAlign",description:"The vertical alignment of the text. One of top, middle, bottom."},dx:{description:"The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.",type:"number"},dy:{description:"The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.",type:"number"},radius:{description:"Polar coordinate radial offset, in pixels, of the text label from the origin determined by the x and y properties.",type:"number"},theta:{description:'Polar coordinate angle, in radians, of the text label from the origin determined by the x and y properties. Values for theta follow the same convention of arc mark startAngle and endAngle properties: angles are measured in radians, with 0 indicating "north".',type:"number"},font:{description:"The typeface to set the text in (e.g., Helvetica Neue).",type:"string"},fontSize:{description:"The font size, in pixels.",type:"number"},fontStyle:{$ref:"#/definitions/FontStyle",description:"The font style (e.g., italic)."},fontWeight:{$ref:"#/definitions/FontWeight",description:"The font weight (e.g., bold)."},format:{description:"The formatting pattern for text value. If not defined, this will be determined automatically.",type:"string"},shortTimeLabels:{description:"Whether month names and weekday names should be abbreviated.",type:"boolean"},text:{description:"Placeholder Text",type:"string"},applyColorToBackground:{description:"Apply color field to background color instead of the text.",type:"boolean"}}},StackOffset:{type:"string","enum":["zero","center","normalize","none"]},Orient:{type:"string","enum":["horizontal","vertical"]},Interpolate:{type:"string","enum":["linear","linear-closed","step","step-before","step-after","basis","basis-open","basis-closed","cardinal","cardinal-open","cardinal-closed","bundle","monotone"]},Shape:{type:"string","enum":["circle","square","cross","diamond","triangle-up","triangle-down"]},HorizontalAlign:{type:"string","enum":["left","right","center"]},VerticalAlign:{type:"string","enum":["top","middle","bottom"]},FontStyle:{type:"string","enum":["normal","italic"]},FontWeight:{type:"string","enum":["normal","bold"]},OverlayConfig:{type:"object",properties:{line:{description:"Whether to overlay line with point.",type:"boolean"},area:{$ref:"#/definitions/AreaOverlay",description:"Type of overlay for area mark (line or linepoint)"},pointStyle:{$ref:"#/definitions/MarkConfig",description:"Default style for the overlayed point."},lineStyle:{$ref:"#/definitions/MarkConfig",description:"Default style for the overlayed point."}}},AreaOverlay:{type:"string","enum":["line","linepoint","none"]},ScaleConfig:{type:"object",properties:{round:{description:"If true, rounds numeric output values to integers.\n\nThis can be helpful for snapping to the pixel grid.\n\n(Only available for `x`, `y`, `size`, `row`, and `column` scales.)",type:"boolean"},textBandWidth:{description:"Default band width for `x` ordinal scale when is mark is `text`.",minimum:0,type:"number"},bandSize:{description:"Default band size for (1) `y` ordinal scale,\n\nand (2) `x` ordinal scale when the mark is not `text`.",minimum:0,type:"number"},opacity:{description:"Default range for opacity.",type:"array",items:{type:"number"}},padding:{description:"Default padding for `x` and `y` ordinal scales.",type:"number"},useRawDomain:{description:'Uses the source data range as scale domain instead of aggregated data for aggregate axis.\n\nThis property only works with aggregate functions that produce values within the raw data domain (`"mean"`, `"average"`, `"stdev"`, `"stdevp"`, `"median"`, `"q1"`, `"q3"`, `"min"`, `"max"`). For other aggregations that produce values outside of the raw data domain (e.g. `"count"`, `"sum"`), this property is ignored.',type:"boolean"},nominalColorRange:{description:"Default range for nominal color scale",oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},sequentialColorRange:{description:"Default range for ordinal / continuous color scale",oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},shapeRange:{description:"Default range for shape",oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},barSizeRange:{description:"Default range for bar size scale",type:"array",items:{type:"number"}},fontSizeRange:{description:"Default range for font size scale",type:"array",items:{type:"number"}},ruleSizeRange:{description:"Default range for rule stroke widths",type:"array",items:{type:"number"}},tickSizeRange:{description:"Default range for tick spans",type:"array",items:{type:"number"}},pointSizeRange:{description:"Default range for bar size scale",type:"array",items:{type:"number"}}}},AxisConfig:{type:"object",properties:{axisWidth:{description:"Width of the axis line",type:"number"},layer:{description:"A string indicating if the axis (and any gridlines) should be placed above or below the data marks.",type:"string"},offset:{description:"The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.",type:"number"},axisColor:{description:"Color of axis line.",type:"string"},grid:{description:"A flag indicate if gridlines should be created in addition to ticks. If `grid` is unspecified, the default value is `true` for ROW and COL. For X and Y, the default value is `true` for quantitative and time fields and `false` otherwise.",type:"boolean"},gridColor:{description:"Color of gridlines.",type:"string"},gridDash:{description:"The offset (in pixels) into which to begin drawing with the grid dash array.",type:"array",items:{type:"number"}},gridOpacity:{description:"The stroke opacity of grid (value between [0,1])",type:"number"},gridWidth:{description:"The grid width, in pixels.",type:"number"},labels:{description:"Enable or disable labels.",type:"boolean"},labelAngle:{description:"The rotation angle of the axis labels.",type:"number"},labelAlign:{description:"Text alignment for the Label.",type:"string"},labelBaseline:{description:"Text baseline for the label.",type:"string"},labelMaxLength:{description:"Truncate labels that are too long.",minimum:1,type:"number"},shortTimeLabels:{description:"Whether month and day names should be abbreviated.",type:"boolean"},subdivide:{description:"If provided, sets the number of minor ticks between major ticks (the value 9 results in decimal subdivision). Only applicable for axes visualizing quantitative scales.",type:"number"},ticks:{description:'A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are "nice" (multiples of 2, 5, 10) and lie within the underlying scale\'s range.',minimum:0,type:"number"},tickColor:{description:"The color of the axis's tick.",type:"string"},tickLabelColor:{description:"The color of the tick label, can be in hex color code or regular color name.",type:"string"},tickLabelFont:{description:"The font of the tick label.",type:"string"},tickLabelFontSize:{description:"The font size of label, in pixels.",type:"number"},tickPadding:{description:"The padding, in pixels, between ticks and text labels.",type:"number"},tickSize:{description:"The size, in pixels, of major, minor and end ticks.",minimum:0,type:"number"},tickSizeMajor:{description:"The size, in pixels, of major ticks.",minimum:0,type:"number"},tickSizeMinor:{description:"The size, in pixels, of minor ticks.",minimum:0,type:"number"},tickSizeEnd:{description:"The size, in pixels, of end ticks.",minimum:0,type:"number"},tickWidth:{description:"The width, in pixels, of ticks.",type:"number"},titleColor:{description:"Color of the title, can be in hex color code or regular color name.",type:"string"},titleFont:{description:"Font of the title.",type:"string"},titleFontSize:{description:"Size of the title.",type:"number"},titleFontWeight:{description:"Weight of the title.",type:"string"},titleOffset:{description:"A title offset value for the axis.",type:"number"},titleMaxLength:{description:"Max length for axis title if the title is automatically generated from the field's description. By default, this is automatically based on cell size and characterWidth property.",minimum:0,type:"number"},characterWidth:{description:"Character width for automatically determining title max length.",type:"number"},properties:{description:"Optional mark property definitions for custom axis styling."}}},LegendConfig:{type:"object",properties:{orient:{description:'The orientation of the legend. One of "left" or "right". This determines how the legend is positioned within the scene. The default is "right".',type:"string"},offset:{description:"The offset, in pixels, by which to displace the legend from the edge of the enclosing group or data rectangle.",type:"number"},padding:{description:"The padding, in pixels, between the lengend and axis.",type:"number"},margin:{description:"The margin around the legend, in pixels",type:"number"},gradientStrokeColor:{description:"The color of the gradient stroke, can be in hex color code or regular color name.",type:"string"},gradientStrokeWidth:{description:"The width of the gradient stroke, in pixels.",type:"number"},gradientHeight:{description:"The height of the gradient, in pixels.",type:"number"},gradientWidth:{description:"The width of the gradient, in pixels.",type:"number"},labelAlign:{description:"The alignment of the legend label, can be left, middle or right.",type:"string"},labelBaseline:{description:"The position of the baseline of legend label, can be top, middle or bottom.",type:"string"},labelColor:{description:"The color of the legend label, can be in hex color code or regular color name.",type:"string"},labelFont:{description:"The font of the lengend label.",type:"string"},labelFontSize:{description:"The font size of lengend lable.",type:"number"},labelOffset:{description:"The offset of the legend label.",type:"number"},shortTimeLabels:{description:"Whether month names and weekday names should be abbreviated.",type:"boolean"},symbolColor:{description:"The color of the legend symbol,",type:"string"},symbolShape:{description:"The shape of the legend symbol, can be the 'circle', 'square', 'cross', 'diamond',\n\n'triangle-up', 'triangle-down', or else a custom SVG path string.",type:"string"},symbolSize:{description:"The size of the lengend symbol, in pixels.",type:"number"},symbolStrokeWidth:{description:"The width of the symbol's stroke.",type:"number"},titleColor:{description:"Optional mark property definitions for custom legend styling.\n\nThe color of the legend title, can be in hex color code or regular color name.",type:"string"},titleFont:{description:"The font of the legend title.",type:"string"},titleFontSize:{description:"The font size of the legend title.",type:"number"},titleFontWeight:{description:"The font weight of the legend title.",type:"string"},properties:{description:"Optional mark property definitions for custom legend styling."}}},FacetConfig:{type:"object",properties:{scale:{$ref:"#/definitions/FacetScaleConfig",description:"Facet Scale Config"},axis:{$ref:"#/definitions/AxisConfig",description:"Facet Axis Config"},grid:{$ref:"#/definitions/FacetGridConfig",description:"Facet Grid Config"},cell:{$ref:"#/definitions/CellConfig",description:"Facet Cell Config"}}},FacetScaleConfig:{type:"object",properties:{round:{type:"boolean"},padding:{type:"number"}}},FacetGridConfig:{type:"object",properties:{color:{format:"color",type:"string"},opacity:{type:"number"},offset:{type:"number"}}},FacetSpec:{type:"object",properties:{facet:{$ref:"#/definitions/Facet"},spec:{oneOf:[{$ref:"#/definitions/LayerSpec"},{$ref:"#/definitions/UnitSpec"}]},name:{description:"Name of the visualization for later reference.",type:"string"},description:{description:"An optional description of this mark for commenting purpose.\n\nThis property has no effect on the output visualization.",type:"string"},data:{$ref:"#/definitions/Data",description:"An object describing the data source"},transform:{$ref:"#/definitions/Transform",description:"An object describing filter and new field calculation."},config:{$ref:"#/definitions/Config",description:"Configuration object"}},required:["facet","spec"]},Facet:{type:"object",properties:{row:{$ref:"#/definitions/PositionChannelDef"},column:{$ref:"#/definitions/PositionChannelDef"}}},LayerSpec:{type:"object",properties:{layers:{description:"Unit specs that will be layered.",type:"array",items:{$ref:"#/definitions/UnitSpec"}},name:{description:"Name of the visualization for later reference.",type:"string"},description:{description:"An optional description of this mark for commenting purpose.\n\nThis property has no effect on the output visualization.",type:"string"},data:{$ref:"#/definitions/Data",description:"An object describing the data source"},transform:{$ref:"#/definitions/Transform",description:"An object describing filter and new field calculation."},config:{$ref:"#/definitions/Config",description:"Configuration object"}},required:["layers"]},UnitSpec:{type:"object",properties:{mark:{$ref:"#/definitions/Mark",description:'The mark type.\n\nOne of `"bar"`, `"circle"`, `"square"`, `"tick"`, `"line"`,\n\n`"area"`, `"point"`, `"rule"`, and `"text"`.'},encoding:{$ref:"#/definitions/UnitEncoding",description:"A key-value mapping between encoding channels and definition of fields."},name:{description:"Name of the visualization for later reference.",type:"string"},description:{description:"An optional description of this mark for commenting purpose.\n\nThis property has no effect on the output visualization.",type:"string"},data:{$ref:"#/definitions/Data",description:"An object describing the data source"},transform:{$ref:"#/definitions/Transform",description:"An object describing filter and new field calculation."},config:{$ref:"#/definitions/Config",description:"Configuration object"}},required:["mark"]},UnitEncoding:{type:"object",properties:{x:{$ref:"#/definitions/PositionChannelDef",description:"X coordinates for `point`, `circle`, `square`,\n\n`line`, `rule`, `text`, and `tick`\n\n(or to width and height for `bar` and `area` marks)."},y:{$ref:"#/definitions/PositionChannelDef",description:"Y coordinates for `point`, `circle`, `square`,\n\n`line`, `rule`, `text`, and `tick`\n\n(or to width and height for `bar` and `area` marks)."},x2:{$ref:"#/definitions/PositionChannelDef",description:"X2 coordinates for ranged `bar`, `rule`, `area`"},y2:{$ref:"#/definitions/PositionChannelDef",description:"Y2 coordinates for ranged `bar`, `rule`, `area`"},color:{$ref:"#/definitions/ChannelDefWithLegend",description:"Color of the marks – either fill or stroke color based on mark type.\n\n(By default, fill color for `area`, `bar`, `tick`, `text`, `circle`, and `square` /\n\nstroke color for `line` and `point`.)"},opacity:{$ref:"#/definitions/ChannelDefWithLegend",description:"Opacity of the marks – either can be a value or in a range."},size:{$ref:"#/definitions/ChannelDefWithLegend",description:"Size of the mark.\n\n- For `point`, `square` and `circle`\n\n– the symbol size, or pixel area of the mark.\n\n- For `bar` and `tick` – the bar and tick's size.\n\n- For `text` – the text's font size.\n\n- Size is currently unsupported for `line` and `area`."},shape:{$ref:"#/definitions/ChannelDefWithLegend",description:'The symbol\'s shape (only for `point` marks). The supported values are\n\n`"circle"` (default), `"square"`, `"cross"`, `"diamond"`, `"triangle-up"`,\n\nor `"triangle-down"`, or else a custom SVG path string.'},detail:{description:"Additional levels of detail for grouping data in aggregate views and\n\nin line and area marks without mapping data to a specific visual channel.",oneOf:[{$ref:"#/definitions/FieldDef",description:"Interface for any kind of FieldDef;\n\nFor simplicity, we do not declare multiple interfaces of FieldDef like\n\nwe do for JSON schema."},{type:"array",items:{$ref:"#/definitions/FieldDef",description:"Interface for any kind of FieldDef;\n\nFor simplicity, we do not declare multiple interfaces of FieldDef like\n\nwe do for JSON schema."}}]},text:{$ref:"#/definitions/FieldDef",description:"Text of the `text` mark."},label:{$ref:"#/definitions/FieldDef"},path:{description:"Order of data points in line marks.",oneOf:[{$ref:"#/definitions/OrderChannelDef"},{type:"array",items:{$ref:"#/definitions/OrderChannelDef"}}]},order:{description:"Layer order for non-stacked marks, or stack order for stacked marks.",oneOf:[{$ref:"#/definitions/OrderChannelDef"},{type:"array",items:{$ref:"#/definitions/OrderChannelDef"}}]}}}},$schema:"http://json-schema.org/draft-04/schema#"}}(),function(){"use strict";angular.module("vlui",["LocalStorageModule","angular-google-analytics","angular-sortable-view","angular-websql"]).constant("_",window._).constant("vl",window.vl).constant("cql",window.cql).constant("vlSchema",window.vlSchema).constant("vg",window.vg).constant("util",window.vg.util).constant("jQuery",window.$).constant("Papa",window.Papa).constant("Blob",window.Blob).constant("URL",window.URL).constant("Drop",window.Drop).constant("Heap",window.Heap).constant("JSON3",window.JSON3.noConflict()).constant("ANY","__ANY__").constant("consts",{addCount:!0,debug:!0,useUrl:!0,logging:!0,logLevel:"INFO",logPrintLevel:"INFO",logToWebSql:!1,defaultConfigSet:"large",appId:"vlui",embeddedData:window.vguiData||void 0,priority:{bookmark:0,popup:0,vislist:1e3},myriaRest:"http://ec2-52-1-38-182.compute-1.amazonaws.com:8753",defaultTimeFn:"year"})}(),function(){angular.module("vlui").run(["$templateCache",function(e){e.put("dataset/addmyriadataset.html",'<div class="add-myria-dataset"><p>Select a dataset from the Myria instance at <input ng-model="myriaRestUrl"><button ng-click="loadDatasets(\'\')">update</button>.</p><form ng-submit="addDataset(myriaDataset)"><div><select name="myria-dataset" id="select-myria-dataset" ng-disabled="disabled" ng-model="myriaDataset" ng-options="optionName(dataset) for dataset in myriaDatasets track by dataset.relationName"><option value="">Select Dataset...</option></select></div><button type="submit">Add dataset</button></form></div>'),e.put("dataset/addurldataset.html",'<div class="add-url-dataset"><p>Add the name of the dataset and the URL to a <b>JSON</b> or <b>CSV</b> (with header) file. Make sure that the formatting is correct and clean the data before adding it. The added dataset is only visible to you.</p><form ng-submit="addFromUrl(addedDataset)"><div class="form-group"><label for="dataset-name">Name</label> <input ng-model="addedDataset.name" id="dataset-name" type="text"></div><div class="form-group"><label for="dataset-url">URL</label> <input ng-model="addedDataset.url" id="dataset-url" type="text"><p>Make sure that you host the file on a server that has <code>Access-Control-Allow-Origin: *</code> set.</p></div><button type="submit">Add dataset</button></form></div>'),e.put("dataset/changeloadeddataset.html",'<div class="change-loaded-dataset"><div ng-if="userData.length"><h3>Uploaded Datasets</h3><ul><li ng-repeat="dataset in userData track by dataset.id" ng-class="{selected: Dataset.currentDataset.id === dataset.id}"><a class="dataset" ng-click="selectDataset(dataset)" ng-disabled="Dataset.currentDataset.id === dataset.id"><i class="fa fa-database"></i> <strong>{{dataset.name}}</strong></a> <span ng-if="dataset.description">{{dataset.description}}</span> <strong ng-if="Dataset.currentDataset === dataset">(selected)</strong></li></ul></div><h3>Explore a Sample Dataset</h3><ul class="loaded-dataset-list"><li ng-repeat="dataset in sampleData track by dataset.id" ng-class="{selected: Dataset.currentDataset.id === dataset.id}"><a class="dataset" ng-click="selectDataset(dataset)" ng-disabled="Dataset.currentDataset.id === dataset.id"><i class="fa fa-database"></i> <strong>{{dataset.name}}</strong></a> <strong ng-if="Dataset.currentDataset === dataset">(selected)</strong> <em ng-if="dataset.description">{{dataset.description}}</em></li></ul></div>'),e.put("dataset/datasetmodal.html",'<modal id="dataset-modal" max-width="800px"><div class="modal-header"><modal-close-button></modal-close-button><h2>Add Dataset</h2></div><div class="modal-main"><tabset><tab heading="Change Dataset"><change-loaded-dataset></change-loaded-dataset></tab><tab heading="Paste or Upload Data"><paste-dataset></paste-dataset></tab><tab heading="From URL"><add-url-dataset></add-url-dataset></tab><tab heading="From Myria"><add-myria-dataset></add-myria-dataset></tab></tabset></div></modal>'),e.put("dataset/datasetselector.html",'<button id="select-data" class="small-button select-data" ng-click="loadDataset();">Change</button>'),e.put("dataset/filedropzone.html",'<div class="dropzone" ng-transclude=""></div>'),e.put("dataset/pastedataset.html",'<div class="paste-data"><file-dropzone dataset="dataset" max-file-size="10" valid-mime-types="[text/csv, text/json, text/tsv]"><div class="upload-data"><div class="form-group"><label for="dataset-file">File</label> <input type="file" id="dataset-file" accept="text/csv,text/tsv"></div><p>Upload a CSV, or paste data in <a href="https://en.wikipedia.org/wiki/Comma-separated_values">CSV</a> format into the fields.</p><div class="dropzone-target"><p>Drop CSV file here</p></div></div><form ng-submit="addDataset()"><div class="form-group"><label for="dataset-name">Name</label> <input type="name" ng-model="dataset.name" id="dataset-name" required=""></div><div class="form-group"><textarea ng-model="dataset.data" ng-model-options="{ updateOn: \'default blur\', debounce: { \'default\': 17, \'blur\': 0 }}" required="">\n      </textarea></div><button type="submit">Add data</button></form></file-dropzone></div>'),e.put("components/alertmessages/alertmessages.html",'<div class="alert-box" ng-show="Alerts.alerts.length > 0"><div class="alert-item" ng-repeat="alert in Alerts.alerts">{{ alert.msg }} <a class="close" ng-click="Alerts.closeAlert($index)">&times;</a></div></div>'),e.put("components/bookmarklist/bookmarklist.html",'<modal id="bookmark-list" ng-if="Bookmarks.isSupported"><div class="modal-header card no-top-margin no-right-margin"><modal-close-button close-action="Bookmarks.logBookmarksClosed()"></modal-close-button><h2 class="no-bottom-margin">Bookmarks ({{ Bookmarks.list.length }})</h2><a class="bookmark-list-util" ng-click="Bookmarks.clear()"><i class="fa fa-trash-o"></i> Clear all</a> <a class="bookmark-list-util" ng-click="Bookmarks.export()"><i class="fa fa-clipboard"></i> Export</a></div><div class="flex-grow-1 scroll-y"><div ng-if="Bookmarks.list.length > 0" class="hflex flex-wrap" sv-root="" sv-part="Bookmarks.list" sv-on-sort="Bookmarks.reorder()"><vl-plot-group ng-repeat="bookmark in Bookmarks.list | orderObjectBy : \'timeAdded\' : false" class="wrapped-vl-plot-group card" list-title="Bookmark" chart="bookmark.chart" field-set="bookmark.chart.fieldSet" show-bookmark="true" show-debug="consts.debug" show-expand="false" always-selected="true" highlighted="highlighted" overflow="true" tooltip="true" priority="consts.priority.bookmark" sv-element=""></vl-plot-group><div sv-placeholder=""></div></div><div class="vis-list-empty" ng-if="Bookmarks.list.length === 0">You have no bookmarks</div></div></modal>'),e.put("components/channelshelf/channelshelf.html",'<div class="shelf-group"><div class="shelf" ng-class="{disabled: disabled || !supportMark(channelId, mark), \'any\': isAnyChannel}"><div class="shelf-label" ng-class="{expanded: propsExpanded}">{{ isAnyChannel ? \'any\' : channelId }}</div><div class="field-drop" ng-model="pills[channelId]" data-drop="!disabled && supportMark(channelId, mark)" jqyoui-droppable="{onDrop:\'fieldDropped\'}" data-jqyoui-options="{activeClass: \'drop-active\'}"><field-info ng-show="encoding[channelId].field" ng-class="{ expanded: funcsExpanded, any: isAnyField, \'enumerated-field\': isEnumeratedField, \'enumerated-channel\': isEnumeratedChannel, highlighted: isHighlighted(channelId) }" field-def="encoding[channelId]" show-type="true" show-caret="true" disable-count-caret="true" popup-content="fieldInfoPopupContent" show-remove="true" remove-action="removeField()" class="selected draggable full-width" data-drag="true" ng-model="pills[channelId]" jqyoui-draggable="{onStart: \'fieldDragStart\', onStop:\'fieldDragStop\'}" data-jqyoui-options="{revert: \'invalid\', helper: \'clone\'}"></field-info><span class="placeholder" ng-if="!encoding[channelId].field">drop a field here</span></div></div><div class="drop-container"><div class="popup-menu shelf-properties shelf-properties-{{channelId}}"></div><div class="popup-menu shelf-functions shelf-functions-{{channelId}}"><function-select ng-if="!preview" field-def="encoding[channelId]" channel-id="channelId"></function-select><div class="mb5" ng-if="allowedTypes.length>1"><h4>Type</h4><label class="type-label" ng-repeat="type in allowedTypes"><input type="radio" ng-value="type" ng-model="encoding[channelId].type"> {{type}}</label></div></div></div></div>'),e.put("components/fieldinfo/fieldinfo.html",'<span class="field-info"><span class="hflex full-width" ng-click="clicked($event)"><span class="type-caret" ng-class="{active: !disableCountCaret || fieldDef.aggregate!==\'count\'}"><i class="fa fa-caret-down" ng-show="showCaret"></i> <span class="type fa {{icon}}" ng-show="showType" title="{{typeName}}"></span></span> <span ng-if="fieldDef.aggregate!==\'count\'" class="field-info-text"><span ng-if="func(fieldDef)" class="field-func" title="{{ func(fieldDef) }}" ng-class="{any: fieldDef._any}">{{ func(fieldDef) }}</span><span class="field-name" ng-class="{hasfunc: func(fieldDef), any: fieldDef._any}">{{ (fieldDef.title || fieldDef.field) | underscore2space }}</span></span> <span ng-if="fieldDef.aggregate===\'count\' || fieldDef.autoCount" class="field-count field-info-text"><span class="field-name">COUNT</span></span> <span class="no-shrink remove" ng-show="showRemove"><a class="remove-field" ng-click="removeAction()"><i class="fa fa-times"></i></a></span> <span class="no-shrink add" ng-show="showAdd"><a class="add-field" ng-click="addAction()"><i class="fa fa-plus"></i></a></span></span></span>'),e.put("components/functionselect/functionselect.html",'<div class="mb5" ng-if="func.list.aboveFold.length > 1 || func.list.aboveFold[0] !== undefined"><h4>Function</h4><div><label class="func-label field-func" ng-repeat="f in func.list.aboveFold" ng-class="{none: !f}"><input type="radio" ng-value="f" ng-model="func.selected" ng-change="selectChanged()"> {{f || \'NONE\'}}</label></div><div ng-show="showAllFunctions"><label class="func-label field-func" ng-class="{\'single-column\': func.isTemporal}" ng-repeat="f in func.list.belowFold"><input type="radio" ng-value="f" ng-model="func.selected" ng-change="selectChanged()"> {{f}}</label></div><div ng-hide="func.isCount || func.list.belowFold.length == 0" class="expand-collapse"><a ng-click="showAllFunctions=!showAllFunctions"><span ng-show="!showAllFunctions">more <i class="fa fa-angle-down" aria-hidden="true"></i></span> <span ng-show="showAllFunctions">less <i class="fa fa-angle-up" aria-hidden="true"></i></span></a></div></div>'),e.put("components/modal/modal.html",'<div class="modal" ng-if="isOpen"><div class="modal-wrapper" style="{{wrapperStyle}}" ng-transclude=""></div></div>'),e.put("components/modal/modalclosebutton.html",'<div class="right"><a ng-click="closeModal()" class="right">Close</a></div>'),e.put("components/propertyeditor/propertyeditor.html",'<div><label class="prop-label" for="{{ id }}"><span class="name" title="{{ propName }}">{{ propName }}</span> <span ng-if="description" class="fa fa-info-circle" tooltips="" tooltip-size="small" tooltip-html="<strong>{{ propName }}</strong><div class=\'tooltip-content\'>{{ description }}</div>" tooltip-side="right"></span></label><form class="inline-block" ng-switch="type + (enum !== undefined ? \'list\' : \'\')"><input id="{{ id }}" ng-switch-when="boolean" type="checkbox" ng-model="group[propName]" ng-hide="automodel.value"><select id="{{ id }}" ng-switch-when="stringlist" ng-model="group[propName]" ng-options="choice for choice in enum track by choice" ng-hide="automodel.value"></select><input id="{{ id }}" ng-switch-when="integer" ng-attr-type="{{ isRange ? \'range\' : \'number\'}}" ng-model="group[propName]" ng-model-options="{debounce: 200}" ng-attr-min="{{min}}" ng-attr-max="{{max}}" ng-hide="automodel.value" ng-attr-title="{{ isRange ? group[propName] : undefined }}"> <input id="{{ id }}" ng-attr-type="{{ role === \'color\' ? \'color\' : \'string\' }}" ng-switch-when="string" ng-model="group[propName]" ng-model-options="{debounce: 500}" ng-hide="automodel.value"> <small ng-if="hasAuto"><label>Auto <input ng-model="automodel.value" type="checkbox"></label></small></form></div>'),e.put("components/schemalist/schemalist.html",'<div class="schema no-top-margin full-width"><schema-list-item ng-repeat="fieldDef in fieldDefs | orderBy : orderBy" field-def="fieldDef" show-add="showAdd"></schema-list-item></div>'),e.put("components/schemalist/schemalistitem.html",'<field-info field-def="fieldDef" show-type="true" show-add="showAdd" class="pill list-item draggable full-width no-right-margin" ng-class="{any: isEnumSpec(fieldDef.field)}" ng-model="pill" ng-dblclick="fieldAdd(fieldDef)" add-action="fieldAdd(fieldDef)" data-drag="true" jqyoui-draggable="{placeholder: \'keep\', deepCopy: true, onStart: \'fieldDragStart\', onStop:\'fieldDragStop\'}" data-jqyoui-options="{revert: \'invalid\', helper: \'clone\'}"></field-info>'),
e.put("components/shelves/shelves.html",'<div class="card shelves no-top-margin no-right-margin abs-100"><a class="right" ng-click="clear()"><i class="fa fa-eraser"></i> Clear</a><h2>Encoding</h2><div class="shelf-pane shelf-encoding-pane full-width"><h3>Positional</h3><channel-shelf channel-id="\'x\'" preview="preview" encoding="spec.encoding" mark="spec.mark"></channel-shelf><channel-shelf channel-id="\'y\'" preview="preview" encoding="spec.encoding" mark="spec.mark"></channel-shelf><channel-shelf channel-id="\'column\'" preview="preview" encoding="spec.encoding" mark="spec.mark" disabled="!spec.encoding.x.field">></channel-shelf><channel-shelf channel-id="\'row\'" preview="preview" encoding="spec.encoding" mark="spec.mark" disabled="!spec.encoding.y.field"></channel-shelf></div><div class="shelf-pane shelf-marks-pane full-width"><div class="right"><select class="markselect" ng-model="spec.mark" ng-class="{auto: spec.mark === ANY}" ng-options="(type === ANY ? \'auto\' : type) for type in (supportAny ? marksWithAny : marks)" ng-change="markChange()"></select></div><h3>Marks</h3><channel-shelf channel-id="\'size\'" preview="preview" encoding="spec.encoding" mark="spec.mark"></channel-shelf><channel-shelf channel-id="\'color\'" preview="preview" encoding="spec.encoding" mark="spec.mark"></channel-shelf><channel-shelf channel-id="\'shape\'" preview="preview" encoding="spec.encoding" mark="spec.mark"></channel-shelf><channel-shelf channel-id="\'detail\'" preview="preview" encoding="spec.encoding" mark="spec.mark"></channel-shelf><channel-shelf channel-id="\'text\'" preview="preview" encoding="spec.encoding" mark="spec.mark"></channel-shelf></div><div class="shelf-pane shelf-any-pane full-width" ng-if="supportAny && !preview"><h3>Automatic</h3><channel-shelf ng-repeat="channelId in anyChannelIds" preview="preview" channel-id="channelId" encoding="spec.encoding" mark="spec.mark"></channel-shelf></div></div>'),e.put("components/tabs/tab.html",'<div ng-if="active" ng-transclude=""></div>'),e.put("components/tabs/tabset.html",'<div class="tab-container"><div><a class="tab" ng-repeat="tab in tabset.tabs" ng-class="{\'active\': tab.active}" ng-click="tabset.showTab(tab)">{{tab.heading}}</a></div><div class="tab-contents" ng-transclude=""></div></div>'),e.put("components/vlplot/vlplot.html",'<div class="vl-plot" id="vis-{{visId}}" ng-class="{ fit: !alwaysScrollable && !overflow && (maxHeight && (!height || height <= maxHeight)) && (maxWidth && (!width || width <= maxWidth)), overflow: alwaysScrollable || overflow || (maxHeight && height && height > maxHeight) || (maxWidth && width && width > maxWidth), scroll: alwaysScrollable || unlocked || hoverFocus }" ng-mousedown="unlocked=!thumbnail" ng-mouseup="unlocked=false" ng-mouseenter="mouseenter()" ng-mouseleave="mouseleave()"><div class="vis-tooltip" ng-show="tooltipActive"><table><tr ng-repeat="p in data"><td class="key">{{p[0]}}</td><td class="value"><b>{{p[1]}}</b></td></tr></table></div></div>'),e.put("components/vlplotgroup/vlplotgroup.html",'<div class="vl-plot-group vflex" ng-dblclick="selectAction()"><div ng-show="showExpand || fieldSet || showTranspose || showBookmark && Bookmarks.isSupported || showToggle" class="vl-plot-group-header no-shrink"><div class="field-set-info" ng-mouseenter="enablePreview()" ng-mouseleave="disablePreview()"><field-info ng-repeat="fieldDef in fieldSet" ng-if="fieldSet && (fieldDef.field || fieldDef.autoCount)" field-def="fieldDef" enum-spec-index="chart.enumSpecIndex" show-type="true" ng-class="{ selected: alwaysSelected || (isSelected && isSelected(fieldDef.field)), unselected: isSelected && !isSelected(fieldDef.field), highlighted: (highlighted||{})[fieldDef.field], \'enumerated-field\': isEnumeratedField(chart, $index), \'enumerated-channel\': isEnumeratedChannel(chart, $index) }" ng-mouseenter="fieldInfoMouseover(fieldDef, $index)" ng-mouseleave="fieldInfoMouseout(fieldDef, $index)"></field-info></div><div style="flex-grow:1"></div><div class="toolbox"><a ng-if="consts.debug && showDebug" class="command debug"><i class="fa fa-wrench" ng-click="shCopied=\'\'; vlCopied=\'\'; vgCopied=\'\';"></i></a><vl-plot-group-popup ng-if="consts.debug && showDebug && renderPopup"></vl-plot-group-popup><a ng-if="showLog && chart.vlSpec && log.support(chart.vlSpec, \'x\')" class="command" title="Toggle X-Scale" ng-click="log.toggle(chart.vlSpec, \'x\')" ng-class="{active: log.active(chart.vlSpec, \'x\')}"><i class="fa fa-long-arrow-right"></i> <small>Log X</small></a> <a ng-if="showLog && chart.vlSpec && log.support(chart.vlSpec, \'y\')" class="command" title="Toggle Y-Scale" ng-click="log.toggle(chart.vlSpec, \'y\')" ng-class="{active: log.active(chart.vlSpec, \'y\')}"><i class="fa fa-long-arrow-up"></i> <small>Log Y</small></a> <a ng-if="showSort && chart.vlSpec && toggleSort.support(chart.vlSpec)" class="command" ng-click="toggleSort.toggle(chart.vlSpec)" title="Sort"><i class="fa sort" ng-class="toggleSortClass(chart.vlSpec)"></i> <small ng-if="showLabel">Sort</small></a> <a ng-if="showFilterNull && chart.vlSpec && toggleFilterNull.support(chart.vlSpec)" class="command" ng-click="toggleFilterNull(chart.vlSpec)" title="Filter Null" ng-class="{active: chart.vlSpec && (chart.vlSpec.transform||{}).filterInvalid}"><i class="fa fa-filter"></i> <small ng-if="showLabel">Filter</small> <small>NULL</small></a> <a ng-if="showTranspose" title="Swap X/Y" class="command" ng-click="transpose()"><i class="fa fa-refresh transpose"></i> <small ng-if="showLabel">Swap X/Y</small></a> <a ng-if="showBookmark && Bookmarks.isSupported" class="command" title="Bookmark" ng-click="toggleBookmark(chart)" ng-class="{disabled: !chart.vlSpec.encoding, active: Bookmarks.isBookmarked(chart.shorthand)}"><i class="fa fa-bookmark"></i> <small ng-if="showLabel">Bookmark</small></a> <a ng-if="showExpand" ng-click="expandAction()" class="command"><i class="fa fa-expand"></i></a> <a ng-if="showSelect" title="Set encoding to this chart" ng-click="selectAction()" class="command select"><i class="fa fa-server"></i></a><div ng-if="showBookmarkAlert" class="bookmark-alert"><div>Remove bookmark?</div><small>Your notes will be lost.</small><div><a ng-click="removeBookmark(chart)"><i class="fa fa-trash-o"></i> remove it</a> <a ng-click="keepBookmark()"><i class="fa fa-bookmark"></i> keep it</a></div></div></div></div><vl-plot class="flex-grow-1" chart="chart" disabled="disabled" is-in-list="isInList" list-title="listTitle" always-scrollable="alwaysScrollable" config-set="{{configSet||\'small\'}}" max-height="maxHeight" max-width="maxWidth" overflow="overflow" priority="priority" rescale="rescale" thumbnail="thumbnail" tooltip="tooltip"></vl-plot><textarea class="annotation" ng-if="Bookmarks.isBookmarked(chart.shorthand)" ng-model="Bookmarks.dict[chart.shorthand].annotation" ng-change="Bookmarks.saveAnnotations(chart.shorthand)" placeholder="notes"></textarea></div>'),e.put("components/vlplotgroup/vlplotgrouppopup.html",'<div class="drop-container"><div class="popup-menu popup-command no-shrink dev-tool"><div class="command debug"><span class="debug">Vl</span> <a class="debug" ui-zeroclip="" zeroclip-copied="vlCopied=\'(Copied)\'" zeroclip-model="chart.cleanSpec | compactJSON">Copy</a> / <a class="debug" ng-click="logCode(\'Vega-Lite\', chart.cleanSpec); vlCopied=\'(Logged)\';">Log</a> <span>{{vlCopied}}</span></div><div class="command debug"><span class="debug">Vg</span> <a class="debug" ui-zeroclip="" zeroclip-copied="vgCopied=\'(Copied)\'" zeroclip-model="chart.vgSpec | compactJSON">Copy</a> / <a class="debug" ng-click="logCode(\'Vega\', chart.vgSpec); vgCopied=\'(Logged)\';">Log</a> <span>{{vgCopied}}</span></div><a class="command debug" ng-href="{{ {type:\'vl\', spec: chart.cleanSpec} | reportUrl }}" target="_blank">Report Bad Render</a> <a ng-click="showFeature=!showFeature" class="command debug">{{chart.score}}</a><div ng-repeat="f in chart.scoreFeatures track by f.reason">[{{f.score}}] {{f.reason}}</div></div></div>'),e.put("components/vlplotgrouplist/vlplotgrouplist.html",'<div class="vl-plot-group-list-container"><div class="vis-list-header" ng-show="listTitle && !hideListTitle"><h3>{{listTitle}}</h3><span class="description"></span></div><div class="vis-list hflex flex-wrap"><vl-plot-group ng-repeat="chart in charts | limitTo: limit" class="wrapped-vl-plot-group card" chart="chart" is-in-list="isInList" list-title="listTitle" enable-pills-preview="enablePillsPreview" field-set="chart.fieldSet" show-bookmark="true" show-debug="consts.debug && consts.debugInList" show-select="true" show-filter-null="true" show-log="true" show-sort="true" overflow="true" tooltip="true" highlighted="Pills.highlighted" select-action="select(chart)" priority="priority + $index"></vl-plot-group></div><a ng-click="increaseLimit()"><div class="vis-list-more" ng-show="limit < charts.length">Load more...</div></a></div>')}])}(),function(){"use strict";angular.module("vlui").directive("addMyriaDataset",["$http","Dataset","consts",function(e,t,n){return{templateUrl:"dataset/addmyriadataset.html",restrict:"E",require:"?^^modal",replace:!0,scope:!0,link:function(i,r,o,a){function s(){a&&a.close()}i.myriaRestUrl=n.myriaRest,i.myriaDatasets=[],i.myriaDataset=null,i.loadDatasets=function(t){return e.get(i.myriaRestUrl+"/dataset/search/?q="+t).then(function(e){i.myriaDatasets=e.data})},i.loadDatasets(""),i.optionName=function(e){return e.userName+":"+e.programName+":"+e.relationName},i.addDataset=function(e){var n={group:"myria",name:e.relationName,url:i.myriaRestUrl+"/dataset/user-"+e.userName+"/program-"+e.programName+"/relation-"+e.relationName+"/data?format=json"};t.type="json",t.dataset=t.add(n),t.update(t.dataset),s()}}}}])}(),function(){"use strict";angular.module("vlui").directive("addUrlDataset",["Dataset","Logger",function(e,t){return{templateUrl:"dataset/addurldataset.html",restrict:"E",require:"?^^modal",replace:!0,scope:!0,link:function(n,i,r,o){function a(){o&&o.close()}n.addedDataset={group:"user"},n.addFromUrl=function(n){t.logInteraction(t.actions.DATASET_NEW_URL,n.url),e.dataset=e.add(n),e.update(e.dataset),a()}}}}])}(),function(){"use strict";angular.module("vlui").filter("inGroup",["_",function(e){return function(t,n){return e.filter(t,{group:n})}}]),angular.module("vlui").directive("changeLoadedDataset",["Dataset","_",function(e,t){return{templateUrl:"dataset/changeloadeddataset.html",restrict:"E",require:"?^^modal",replace:!0,scope:!0,link:function(n,i,r,o){function a(){o&&o.close()}n.Dataset=e,n.userData=t.filter(e.datasets,function(e){return"sample"!==e.group}),n.sampleData=t.filter(e.datasets,{group:"sample"});var s=n.$watch(function(){return e.datasets.length},function(){n.userData=t.filter(e.datasets,function(e){return"sample"!==e.group})});n.selectDataset=function(t){e.update(t),a()},n.$on("$destroy",function(){s()})}}}])}(),function(){"use strict";angular.module("vlui").factory("Dataset",["$http","$q","Alerts","_","util","vl","cql","SampleData","Config","Logger",function(e,t,n,i,r,o,a,s,l,u){function c(e,t){var n=e.fields().map(function(t){return{field:t,type:e.type(t),primitiveType:e.primitiveType(t)}});return n=r.stablesort(n,t||h.fieldOrderBy.typeThenName,h.fieldOrderBy.field),n.push({field:"*",aggregate:o.aggregate.AggregateOp.COUNT,type:o.type.QUANTITATIVE}),n}function f(e,t){h.data=t,h.currentDataset=e,h.schema=a.schema.Schema.build(t),h.dataschema=c(h.schema)}var h={},d=s;h.datasets=d,h.dataset=d[1],h.currentDataset=void 0,h.dataschema=[],h.stats={},h.type=void 0;var p={nominal:0,ordinal:0,geographic:2,temporal:3,quantitative:4};return h.fieldOrderBy={},h.fieldOrderBy.type=function(e){return"count"===e.aggregate?4:p[e.type]},h.fieldOrderBy.typeThenName=function(e){return h.fieldOrderBy.type(e)+"_"+("count"===e.aggregate?"~":e.field.toLowerCase())},h.fieldOrderBy.original=function(){return 0},h.fieldOrderBy.field=function(e){return e.field},h.fieldOrder=h.fieldOrderBy.typeThenName,h.onUpdate=[],h.getUpdate=function(n,o){return n.values?t(function(e,t){h.type=void 0,o(n,n.values),e()}):e.get(n.url,{cache:!0}).then(function(e){var t;i.isObject(e.data)?(t=e.data,h.type="json"):(t=r.read(e.data,{type:"csv"}),h.type="csv"),o(n,t)})},h.update=function(e){var t;return u.logInteraction(u.actions.DATASET_CHANGE,e.name),t=h.getUpdate(e,f),h.onUpdate.forEach(function(e){t=t.then(e)}),t.then(function(){l.updateDataset(e,h.type)}),t},h.add=function(e){return e.id||(e.id=e.url),d.push(e),e},h}])}(),function(){"use strict";angular.module("vlui").directive("datasetModal",function(){return{templateUrl:"dataset/datasetmodal.html",restrict:"E",scope:!1}})}(),function(){"use strict";angular.module("vlui").directive("datasetSelector",["Modals","Logger",function(e,t){return{templateUrl:"dataset/datasetselector.html",restrict:"E",replace:!0,scope:{},link:function(n){n.loadDataset=function(){t.logInteraction(t.actions.DATASET_OPEN),e.open("dataset-modal")}}}}])}(),function(){"use strict";angular.module("vlui").constant("FileReader",window.FileReader).directive("fileDropzone",["Modals","Alerts","FileReader",function(e,t,n){function i(e,t){return!t||e/1024/1024<+t}function r(e,t){return!t||t.indexOf(e)>-1}return{templateUrl:"dataset/filedropzone.html",replace:!0,restrict:"E",transclude:!0,scope:{maxFileSize:"@",validMimeTypes:"@",dataset:"="},link:function(e,o){function a(o){if(!r(o.type,e.validMimeTypes))return void e.$apply(function(){t.add("Invalid file type. File must be one of following types: "+e.validMimeTypes)});if(!i(o.size,e.maxFileSize))return void e.$apply(function(){t.add("File must be smaller than "+e.maxFileSize+" MB")});var a=new n;a.onload=function(t){return e.$apply(function(e){e.dataset.data=t.target.result,e.dataset.name=o.name.replace(/\.\w+$/,"")})},a.onerror=function(){t.add("Error reading file")},a.readAsText(o)}e.dataset=e.dataset||{},o.on("dragover dragenter",function(e){e&&e.preventDefault(),e.originalEvent.dataTransfer.effectAllowed="copy"}),o.on("drop",function(e){e&&e.preventDefault(),a(e.originalEvent.dataTransfer.files[0])}),o.find('input[type="file"]').on("change",function(){a(this.files[0])})}}}])}(),function(){"use strict";angular.module("vlui").directive("pasteDataset",["Dataset","Logger","Config","_","vg",function(e,t,n,i,r){return{templateUrl:"dataset/pastedataset.html",restrict:"E",require:"?^^modal",replace:!0,scope:!0,link:function(n,i,o,a){function s(){a&&a.close()}n.dataset={name:"",data:""},n.addDataset=function(){var i=r.util.read(n.dataset.data,{type:"csv"}),o={id:Date.now(),name:n.dataset.name,values:i,group:"pasted"};t.logInteraction(t.actions.DATASET_NEW_PASTE,o.name),e.dataset=e.add(o),e.update(e.dataset),s()}}}}])}(),function(){"use strict";angular.module("vlui").constant("SampleData",[{name:"Barley",description:"Barley yield by variety across the upper midwest in 1931 and 1932",url:"data/barley.json",id:"barley",group:"sample"},{name:"Cars",description:"Automotive statistics for a variety of car models between 1970 & 1982",url:"data/cars.json",id:"cars",group:"sample"},{name:"Crimea",url:"data/crimea.json",id:"crimea",group:"sample"},{name:"Driving",url:"data/driving.json",id:"driving",group:"sample"},{name:"Iris",url:"data/iris.json",id:"iris",group:"sample"},{name:"Jobs",url:"data/jobs.json",id:"jobs",group:"sample"},{name:"Population",url:"data/population.json",id:"population",group:"sample"},{name:"Movies",url:"data/movies.json",id:"movies",group:"sample"},{name:"Birdstrikes",url:"data/birdstrikes.json",id:"birdstrikes",group:"sample"},{name:"Burtin",url:"data/burtin.json",id:"burtin",group:"sample"},{name:"Campaigns",url:"data/weball26.json",id:"weball26",group:"sample"}])}(),function(){"use strict";angular.module("vlui").directive("alertMessages",["Alerts",function(e){return{templateUrl:"components/alertmessages/alertmessages.html",restrict:"E",scope:{},link:function(t){t.Alerts=e}}}])}(),function(){"use strict";angular.module("vlui").directive("bookmarkList",["Bookmarks","consts",function(e,t){return{templateUrl:"components/bookmarklist/bookmarklist.html",restrict:"E",replace:!0,scope:{highlighted:"="},link:function(n){n.Bookmarks=e,n.consts=t}}}])}(),function(){"use strict";angular.module("vlui").directive("channelShelf",["ANY","Dataset","Pills","_","Drop","Logger","vl","cql","Schema",function(e,t,n,i,r,o,a,s,l){return{templateUrl:"components/channelshelf/channelshelf.html",restrict:"E",replace:!0,scope:{channelId:"<",encoding:"=",mark:"<",preview:"<",disabled:"<"},link:function(u,c){var f;u.allowedCasting={quantitative:[a.type.QUANTITATIVE,a.type.ORDINAL,a.type.NOMINAL],ordinal:[a.type.ORDINAL,a.type.NOMINAL],nominal:[a.type.NOMINAL,a.type.ORDINAL],temporal:[a.type.TEMPORAL,a.type.ORDINAL,a.type.NOMINAL]},u.Dataset=t,u.schema=l.getChannelSchema(u.channelId),u.pills=n.pills,u.isHighlighted=function(e){var t=n.highlighted||{};return t[u.encoding[e].field]||t["f"+e]},u.isAnyChannel=!1,u.isAnyField=!1,u.supportMark=function(t,i){return!!n.isAnyChannel(t)||(i===e||a.channel.supportMark(t,i))},f=new r({content:c.find(".shelf-properties")[0],target:c.find(".shelf-label")[0],position:"bottom left",openOn:"click"}),u.fieldInfoPopupContent=c.find(".shelf-functions")[0],u.removeField=function(){n.remove(u.channelId)},u.fieldDragStart=function(){n.dragStart(n.get(u.channelId),u.channelId)},u.fieldDragStop=function(){n.dragStop()},u.fieldDropped=function(){var e=n.get(u.channelId),t=l.schema.definitions.Type["enum"];i.includes(t,e.type)||s.enumSpec.isEnumSpec(e.type)||(e.type=t[0]),n.dragDrop(u.channelId),o.logInteraction(o.actions.FIELD_DROP,e)};var h=u.$watch("channelId",function(e){u.isAnyChannel=n.isAnyChannel(e)},!0),d=u.$watch("encoding[channelId]",function(e){u.preview?(u.isEnumeratedField=n.isEnumeratedField(u.channelId),u.isEnumeratedChannel=n.isEnumeratedChannel(u.channelId)):(n.set(u.channelId,e?i.cloneDeep(e):{}),u.isAnyField=s.enumSpec.isEnumSpec(e.field))},!0);u.$watchGroup(["allowedCasting[Dataset.schema.type(encoding[channelId].field)]","encoding[channel].aggregate"],function(e){var t=e[0],n=e[1];u.allowedTypes="count"===n?[a.type.QUANTITATIVE]:t}),u.$on("$destroy",function(){f&&f.destroy&&f.destroy(),h(),d()})}}}])}(),function(){"use strict";angular.module("vlui").directive("fieldInfo",["ANY","Drop","vl","cql",function(e,t,n,i){return{templateUrl:"components/fieldinfo/fieldinfo.html",restrict:"E",replace:!0,scope:{fieldDef:"<",showAdd:"<",showCaret:"<",showRemove:"<",showType:"<",popupContent:"<",action:"&",addAction:"&",removeAction:"&",disableCountCaret:"<"},link:function(r,o){function a(t,n){if(i.enumSpec.isEnumSpec(t)){for(var r=null,o=0;o<t["enum"].length;o++){var a=t["enum"][o];if(null===r)r=n[a];else if(r!==n[a])return e}return r}return n[t]}var s;r.vlType=n.type,r.isEnumSpec=i.enumSpec.isEnumSpec,r.typeName=null,r.icon=null,r["null"]=null,r.clicked=function(e){r.action&&e.target!==o.find(".fa-caret-down")[0]&&e.target!==o.find("span.type")[0]&&r.action(e)},r.func=function(e){return e.aggregate||e.timeUnit||e.bin&&"bin"||e._aggregate||e._timeUnit||e._bin&&"bin"||e._any&&"auto"};var l=r.$watch("popupContent",function(e){e&&(s&&s.destroy(),s=new t({content:e,target:o.find(".type-caret")[0],position:"bottom left",openOn:"click"}))}),u={nominal:"text",ordinal:"text-ordinal",quantitative:"number",temporal:"time",geographic:"geo"},c={nominal:"fa-font",ordinal:"fa-font",quantitative:"icon-hash",temporal:"fa-calendar"};c[e]="fa-asterisk";var f=r.$watch("fieldDef",function(e){r.icon=a(e.type,c),r.typeName=a(e.type,u)});r.$on("$destroy",function(){s&&s.destroy&&s.destroy(),l(),f()})}}}])}(),function(){"use strict";angular.module("vlui").directive("functionSelect",["_","consts","vl","Pills","Logger","Dataset",function(e,t,n,i,r,o){return{templateUrl:"components/functionselect/functionselect.html",restrict:"E",scope:{channelId:"<",fieldDef:"="},link:function(a){var s,l="bin",u="count";a.func={selected:void 0,list:{aboveFold:[],belowFold:[]},isTemporal:!1,isCount:!1};var c={aboveFold:[void 0,"year","quarter","month","date","day","hours","minutes","seconds","milliseconds","yearmonthdate"],belowFold:["yearquarter","yearmonth","yearmonthdatehours","yearmonthdatehoursminutes","yearmonthdatehoursminutesseconds","hoursminutes","hoursminutesseconds","minutesseconds","secondsmilliseconds"]},f=function(e){var t=i.get(a.channelId);if(!t)return!0;var n=t.field,r=i.isAnyChannel(a.channelId)?"?":a.channelId;return!e||o.schema.timeUnitHasVariation({field:n,channel:r,timeUnit:e})},h=e.pull(e.concat(c.aboveFold,c.belowFold),void 0),d={aboveFold:[void 0,"bin","min","max","mean","median","sum"],belowFold:["valid","missing","distinct","modeskew","q1","q3","stdev","stdevp","variance","variancep"]},p=e.pull(e.concat(d.aboveFold,d.belowFold,[u]),l,void 0);a.selectChanged=function(){r.logInteraction(r.actions.FUNC_CHANGE,a.func.selected);var t=a.func.selected,o=i.get(a.channelId),s=e.clone(o),u=s?s.type:"",c=u===n.type.QUANTITATIVE,f=u===n.type.TEMPORAL;s&&(s.bin=t===l?{}:void 0,s.aggregate=c&&p.indexOf(t)!==-1?t:void 0,s.timeUnit=f&&h.indexOf(t)!==-1?t:void 0,e.isEqual(o,s)||i.set(a.channelId,s,!0))};var g=a.$watch("fieldDef",function(e){if(e){var i=e.field?e.type:"";e.bin&&(s=e.bin.maxbins);var r=["row","column","shape"].indexOf(a.channelId)!==-1,o=i===n.type.QUANTITATIVE,h=i===n.type.TEMPORAL;if(a.func.isTemporal=h,a.func.isCount="*"===e.field,"*"===e.field&&e.aggregate===u)a.func.list.aboveFold=[u],a.func.list.belowFold=[],a.func.selected=u;else{h?(a.func.list.aboveFold=c.aboveFold.filter(f),a.func.list.belowFold=c.belowFold.filter(f)):o&&(a.func.list.aboveFold=d.aboveFold,a.func.list.belowFold=d.belowFold);var p=r&&o&&l||h&&t.defaultTimeFn||void 0,g=e.bin?"bin":e.aggregate||e.timeUnit;a.func.list.aboveFold.indexOf(g)>=0||a.func.list.belowFold.indexOf(g)>=0?a.func.selected=g:a.func.selected=p}}},!0);a.$on("$destroy",function(){g()})}}}])}(),function(){"use strict";angular.module("vlui").directive("modal",["$document","Modals",function(e,t){return{templateUrl:"components/modal/modal.html",restrict:"E",transclude:!0,scope:{autoOpen:"<",maxWidth:"@"},controller:["$scope",function(e){this.close=function(){e.isOpen=!1}}],link:function(n,i,r){function o(e){27===e.keyCode&&n.isOpen&&(n.isOpen=!1,n.$digest())}var a=r.id;n.maxWidth&&(n.wrapperStyle="max-width:"+n.maxWidth),n.isOpen=n.autoOpen,angular.element(e).on("keydown",o),t.register(a,n),n.$on("$destroy",function(){t.deregister(a)})}}}])}(),function(){"use strict";angular.module("vlui").directive("modalCloseButton",function(){return{templateUrl:"components/modal/modalclosebutton.html",restrict:"E",require:"^^modal",scope:{closeAction:"&"},link:function(e,t,n,i){e.closeModal=function(){i.close(),e.closeAction&&e.closeAction()}}}})}(),function(){"use strict";angular.module("vlui").factory("Modals",["$cacheFactory",function(e){var t=e("modals");return{register:function(e,n){return t.get(e)?void console.error("Cannot register two modals with id "+e):void t.put(e,n)},deregister:function(e){t.remove(e)},open:function(e){var n=t.get(e);return n?void(n.isOpen=!0):void console.error("Unregistered modal id "+e)},close:function(e){var n=t.get(e);return n?void(n.isOpen=!1):void console.error("Unregistered modal id "+e)},empty:function(){t.removeAll()},count:function(){return t.info().size}}}])}(),function(){"use strict";angular.module("vlui").directive("propertyEditor",function(){return{templateUrl:"components/propertyeditor/propertyeditor.html",restrict:"E",scope:{id:"=",type:"=","enum":"=",propName:"=",group:"=",description:"=","default":"=",min:"=",max:"=",role:"="},link:function(e){if(e.hasAuto=void 0===e["default"],e.automodel={value:!1},e.hasAuto){e.automodel.value=void 0===e.group[e.propName];var t=e.$watch("automodel.value",function(){e.automodel.value===!0&&(e.group[e.propName]=void 0)});e.$on("$destroy",function(){t()})}e.isRange=void 0!==e.max&&void 0!==e.min}}})}(),function(){"use strict";angular.module("vlui").directive("schemaList",function(){return{templateUrl:"components/schemalist/schemalist.html",restrict:"E",scope:{orderBy:"<",fieldDefs:"<",showAdd:"<"},replace:!0}})}(),function(){"use strict";angular.module("vlui").directive("schemaListItem",["Pills","cql",function(e,t){return{templateUrl:"components/schemalist/schemalistitem.html",restrict:"E",replace:!1,scope:{fieldDef:"=",showAdd:"<"},link:function(n){n.isEnumSpec=t.enumSpec.isEnumSpec,n.fieldAdd=function(t){e.add(t)},n.fieldDragStart=function(){var t=n.fieldDef;n.pill={field:t.field,title:t.title,type:t.type,aggregate:t.aggregate},e.dragStart(n.pill,null)},n.fieldDragStop=e.dragStop}}}])}(),function(){"use strict";angular.module("vlui").directive("shelves",function(){return{templateUrl:"components/shelves/shelves.html",restrict:"E",scope:{spec:"=",preview:"<",supportAny:"<"},replace:!0,controller:["$scope","ANY","util","vl","Config","Dataset","Logger","Pills",function(e,t,n,i,r,o,a,s){e.ANY=t,e.anyChannelIds=[],e.marks=["point","tick","bar","line","area","text"],e.marksWithAny=[t].concat(e.marks),e.markChange=function(){a.logInteraction(a.actions.MARK_CHANGE,e.spec.mark)},e.transpose=function(){i.spec.transpose(e.spec)},e.clear=function(){a.logInteraction(a.actions.SPEC_CLEAN,e.spec),s.reset()};var l=e.$watch("spec",function(t){e.supportAny&&(e.anyChannelIds=n.keys(t.encoding).reduce(function(e,t){return s.isAnyChannel(t)&&e.push(t),e},[])),e.preview||(a.logInteraction(a.actions.SPEC_CHANGE,t),s.update(t))},!0);e.$on("$destroy",function(){l()})}]}})}(),function(){"use strict";angular.module("vlui").directive("tab",function(){return{templateUrl:"components/tabs/tab.html",restrict:"E",require:"^^tabset",replace:!0,transclude:!0,scope:{heading:"@"},link:function(e,t,n,i){i.addTab(e)}}})}(),function(){"use strict";angular.module("vlui").directive("tabset",function(){return{templateUrl:"components/tabs/tabset.html",restrict:"E",transclude:!0,controller:function(){var e=this;this.tabs=[],this.addTab=function(t){t.active=0===e.tabs.length,e.tabs.push(t)},this.showTab=function(t){e.tabs.forEach(function(e){e.active=e===t})}},controllerAs:"tabset"}})}(),function(){"use strict";angular.module("vlui").directive("vlPlot",["vl","vg","cql","$timeout","$q","Dataset","Config","consts","_","$document","Logger","Heap","$window",function(e,t,n,i,r,o,a,s,l,u,c,f,h){function d(e,t){return e>g||t>g||e*t>m?"svg":"canvas"}var p=0,g=16383.5,m=67108864,v=new f(function(e,t){return e.priority-t.priority}),y=!1;return{templateUrl:"components/vlplot/vlplot.html",restrict:"E",scope:{chart:"=",disabled:"<",isInList:"<",listTitle:"<",alwaysScrollable:"<",configSet:"@",maxHeight:"<",maxWidth:"<",overflow:"<",priority:"<",rescale:"<",thumbnail:"<",tooltip:"<"},replace:!0,link:function(r,f){function g(){if(A){A.off("mouseover"),A.off("mouseout"),A.destroy(),A=null;var e=w();s.debug&&h.views&&delete h.views[e]}}function m(e,n){n&&n.datum&&(I=i(function(){if(!n.datum._facetID){r.tooltipActive=!0,c.logInteraction(c.actions.CHART_TOOLTIP,n.datum,{shorthand:r.chart.shorthand,list:r.listTitle}),r.data=l(n.datum).omit("_prev","_id").toPairs().value().map(function(e){return e[1]=t.util.isNumber(e[1])?M(e[1]):e[1],e}),r.$digest();var i=f.find(".vis-tooltip"),o=angular.element(u),a=i.width(),s=i.height();e.pageY+10+s<o.height()?i.css("top",e.pageY+10):i.css("top",e.pageY-10-s),e.pageX+10+a<o.width()?i.css("left",e.pageX+10):i.css("left",e.pageX-10-a)}},k))}function b(e,t){var n=f.find(".vis-tooltip");n.css("top",null),n.css("left",null),i.cancel(I),I=null,r.tooltipActive&&c.logInteraction(c.actions.CHART_TOOLTIP_END,t.datum,{shorthand:r.chart.shorthand,list:r.listTitle}),r.tooltipActive=!1,r.data=[],r.$digest()}function _(){var n=r.configSet||s.defaultConfigSet||{};if(r.chart.vlSpec){var i=l.cloneDeep(r.chart.vlSpec);return t.util.extend(i.config,a[n]()),e.compile(i).spec}}function E(){return f.find(".vega > :first-child")}function x(){var e=E();if(r.rescale){r.$digest();var t=Math.max(.2,f.width()/r.width);t<1&&e.width(r.width*t).height(r.height*t)}else e.css("transform",null).css("transform-origin",null)}function w(){return r.chart.shorthand||(r.chart.vlSpec?n.query.shorthand.vlSpec(r.chart.vlSpec):"")}function T(){if(v.size()>0){var e=v.pop();e.parse()}else y=!1}function S(e){function n(){if(r.destroyed||r.disabled||r.isInList&&r.chart.fieldSetKey&&!r.isInList(r.chart))return console.log("cancel rendering",a),void T();var n=(new Date).getTime();t.parse.spec(e,function(t,l){if(t)return console.error("error",t),void(N=i(T,1));try{var u=(new Date).getTime();g(),A=l({el:f[0]}),s.useUrl||A.data({raw:o.data}),A.update();var p=A.data("layout").values()[0],v=d(p.width,p.height);"svg"===v&&A.renderer(v);var y=f.find(".vega > :first-child");r.width=y.width(),r.height=y.height(),s.debug&&(h.views=h.views||{},h.views[a]=A),c.logInteraction(c.actions.CHART_RENDER,r.chart.shorthand,{list:r.listTitle}),x();var _=(new Date).getTime();console.log("parse spec",u-n,"charting",_-u,a),r.tooltip&&(A.on("mouseover",m),A.on("mouseout",b))}catch(E){console.error(E,JSON.stringify(e))}finally{N=i(T,1)}})}if(!e)return void(A&&g());r.height=e.height,f||console.error("can not find vis element");var a=w();y?v.push({priority:r.priority||0,parse:n}):(y=!0,n())}var A,C=500,k=250;r.visId=p++;var O=null,I=null,N=null;r.hoverFocus=!1,r.tooltipActive=!1,r.destroyed=!1;var M=t.util.format.number("");r.mouseenter=function(){O=i(function(){c.logInteraction(c.actions.CHART_MOUSEOVER,r.chart.shorthand,{list:r.listTitle}),r.hoverFocus=!r.thumbnail},C)},r.mouseleave=function(){r.hoverFocus&&c.logInteraction(c.actions.CHART_MOUSEOUT,r.chart.shorthand,{list:r.listTitle}),i.cancel(O),O=null,r.hoverFocus=r.unlocked=!1};var D=r.$watch(function(){return l.omit(r.chart.vlSpec,"data")},function(){var e=r.chart.vgSpec=_();r.chart.cleanSpec||(r.chart.cleanSpec=r.chart.vlSpec),S(e)},!0);r.$on("$destroy",function(){console.log("vlplot destroyed"),A&&g(),O&&(i.cancel(O),O=null),I&&(i.cancel(I),I=null),r.destroyed=!0,D()})}}}])}(),function(){"use strict";angular.module("vlui").directive("vlPlotGroup",["Bookmarks","consts","vg","vl","Dataset","Logger","_","Pills","Chart","$timeout",function(e,t,n,i,r,o,a,s,l,u){return{templateUrl:"components/vlplotgroup/vlplotgroup.html",restrict:"E",replace:!0,controller:["$scope","$element",function(e,t){this.getDropTarget=function(){return t.find(".fa-wrench")[0]}}],scope:{chart:"=",disabled:"<",isInList:"<",listTitle:"<",alwaysScrollable:"<",configSet:"@",enablePillsPreview:"<",maxHeight:"<",maxWidth:"<",overflow:"<",priority:"<",rescale:"<",thumbnail:"<",tooltip:"<",fieldSet:"<",showBookmark:"<",showDebug:"<",showExpand:"<",showFilterNull:"<",showLabel:"<",showLog:"<",showSelect:"<",showSort:"<",showTranspose:"<",toggleShelf:"<",alwaysSelected:"<",isSelected:"<",highlighted:"<",expandAction:"&",selectAction:"&"},link:function(c){c.Bookmarks=e,c.consts=t,c.showBookmarkAlert=!1,c.toggleBookmark=function(t){e.isBookmarked(t.shorthand)?c.showBookmarkAlert=!c.showBookmarkAlert:e.add(t,c.listTitle)};var f=null,h=null;c.enablePreview=function(){h=u(function(){c.enablePillsPreview&&s.preview(!0,c.chart,c.listTitle)},500)},c.disablePreview=function(){h&&u.cancel(h),h=null,c.enablePillsPreview&&s.preview(!1,c.chart,c.listTitle)},c.fieldInfoMouseover=function(e,t){f=u(function(){if((c.highlighted||{})[e.field]=!0,c.chart.enumSpecIndex){var n=c.chart.enumSpecIndex;if(n.encodings&&n.encodings[t]&&n.encodings[t].field){var i=n.encodings[t].field.name;(c.highlighted||{})[i]=!0}}o.logInteraction(o.actions.FIELDDEF_HIGHLIGHTED,c.chart.shorthand,{highlightedField:e.field,list:c.listTitle})},500)},c.fieldInfoMouseout=function(e,t){if(f&&u.cancel(f),f=null,(c.highlighted||{})[e.field]&&(o.logInteraction(o.actions.FIELDDEF_UNHIGHLIGHTED,c.chart.shorthand,{highlightedField:e.field,list:c.listTitle}),(c.highlighted||{})[e.field]=!1,c.chart.enumSpecIndex)){var n=c.chart.enumSpecIndex;if(n.encodings&&n.encodings[t]&&n.encodings[t].field){var i=n.encodings[t].field.name;delete(c.highlighted||{})[i]}}},c.isEnumeratedField=function(e,t){return!!(e.enumSpecIndex&&e.enumSpecIndex.encodings&&e.enumSpecIndex.encodings[t])&&e.enumSpecIndex.encodings[t].field;
},c.isEnumeratedChannel=function(e,t){return!!(e.enumSpecIndex&&e.enumSpecIndex.encodings&&e.enumSpecIndex.encodings[t])&&e.enumSpecIndex.encodings[t].channel},c.removeBookmark=function(t){e.remove(t),c.showBookmarkAlert=!1},c.keepBookmark=function(){c.showBookmarkAlert=!1},c.renderPopup=!1,c.initializePopup=a.once(function(){c.renderPopup=!0}),c.logCode=function(e,t){console.log(e+":\n\n",JSON.stringify(t))},c.log={},c.log.support=function(e,t){if(!e)return!1;var n=e.encoding,r=n[t];return r&&r.type===i.type.QUANTITATIVE&&!r.bin},c.log.toggle=function(e,t){if(c.log.support(e,t)){var n=e.encoding[t],i=n.scale=n.scale||{};c.toggleShelf?s.rescale(t,"log"===i.type?"linear":"log"):i.type="log"===i.type?"linear":"log",o.logInteraction(o.actions.LOG_TOGGLE,c.chart.shorthand,{list:c.listTitle})}},c.log.active=function(e,t){if(c.log.support(e,t)){var n=e.encoding[t],i=n.scale;return i&&"log"===i.type}},c.toggleFilterNull=function(e){o.logInteraction(o.actions.NULL_FILTER_TOGGLE,c.chart.shorthand,{list:c.listTitle}),c.toggleShelf?s.toggleFilterInvalid():(e.transform=e.transform||{},e.transform.filterInvalid=e.transform.filterInvalid!==!0||void 0)},c.toggleFilterNull.support=function(e){var t=i.spec.fieldDefs(e);for(var n in t){var o=t[n];if(a.includes([i.type.ORDINAL,i.type.NOMINAL],o.type)&&r.schema.stats(o).missing>0)return!0}return!1};var d=c.toggleSort={};d.modes=["ordinal-ascending","ordinal-descending","quantitative-ascending","quantitative-descending","custom"],d.toggle=function(e){var t=d.mode(e),n=d.modes.indexOf(t),i=(n+1)%(d.modes.length-1),r=d.modes[i];o.logInteraction(o.actions.SORT_TOGGLE,c.chart.shorthand,{currentMode:t,newMode:r,list:c.listTitle});var a=d.channels(e);c.toggleShelf?s.sort(a.ordinal,d.getSort(r,e)):e.encoding[a.ordinal].sort=d.getSort(r,e)},d.getSort=function(e,t){if("ordinal-ascending"===e)return"ascending";if("ordinal-descending"===e)return"descending";var n=d.channels(t),i=t.encoding[n.quantitative];return"quantitative-ascending"===e?{op:i.aggregate,field:i.field,order:"ascending"}:"quantitative-descending"===e?{op:i.aggregate,field:i.field,order:"descending"}:null},d.mode=function(e){var t=d.channels(e),i=e.encoding[t.ordinal].sort;if(void 0===i)return"ordinal-ascending";for(var r=0;r<d.modes.length-1;r++){var o=d.modes[r],s=d.getSort(o,e);if(a.isEqual(i,s))return o}return n.util.isObject(i)&&i.op&&i.field?"custom":(console.error("invalid mode"),null)},d.channels=function(e){return e.encoding.x.type===i.type.NOMINAL||e.encoding.x.type===i.type.ORDINAL?{ordinal:"x",quantitative:"y"}:{ordinal:"y",quantitative:"x"}},d.support=function(e){var t=e.encoding;return!(i.encoding.has(t,"row")||i.encoding.has(t,"column")||!i.encoding.has(t,"x")||!i.encoding.has(t,"y")||!i.encoding.isAggregate(e.encoding))&&(t.x.type!==i.type.NOMINAL&&t.x.type!==i.type.ORDINAL||!i.fieldDef.isMeasure(t.y)?!(t.y.type!==i.type.NOMINAL&&t.y.type!==i.type.ORDINAL||!i.fieldDef.isMeasure(t.x))&&"y":"x")},c.toggleSortClass=function(e){if(!e||!d.support(e))return"invisible";var t=e&&d.channels(e).ordinal,n=e&&d.mode(e),i="x"===t?"sort-x ":"";switch(n){case"ordinal-ascending":return i+"fa-sort-alpha-asc";case"ordinal-descending":return i+"fa-sort-alpha-desc";case"quantitative-ascending":return i+"fa-sort-amount-asc";case"quantitative-descending":return i+"fa-sort-amount-desc";default:return i+"fa-sort"}},c.transpose=function(){o.logInteraction(o.actions.TRANSPOSE_TOGGLE,c.chart.shorthand,{list:c.listTitle}),c.toggleShelf?s.transpose():l.transpose(c.chart.vlSpec)},c.$on("$destroy",function(){c.chart=null})}}}])}(),function(){"use strict";angular.module("vlui").directive("vlPlotGroupPopup",["Drop",function(e){return{templateUrl:"components/vlplotgroup/vlplotgrouppopup.html",restrict:"E",require:"^^vlPlotGroup",scope:!1,link:function(t,n,i,r){var o=new e({content:n.find(".dev-tool")[0],target:r.getDropTarget(),position:"bottom right",openOn:"click",constrainToWindow:!0});t.$on("$destroy",function(){o.destroy()})}}}])}(),function(){"use strict";angular.module("vlui").directive("vlPlotGroupList",["vl","cql","jQuery","consts","_","Logger","Pills","Chart",function(e,t,n,i,r,o,a,s){return{templateUrl:"components/vlplotgrouplist/vlplotgrouplist.html",restrict:"E",replace:!0,scope:{enablePillsPreview:"<",initialLimit:"<",listTitle:"<",hideListTitle:"<",charts:"<",priority:"<",showMore:"<",postSelectAction:"&"},link:function(e){function t(){e.limit+=5,o.logInteraction(o.actions.LOAD_MORE,e.limit,{list:e.listTitle})}function n(t){for(var n=0;n<e.charts.length;n++)if(t.shorthand===e.charts[n].shorthand)return!0;return!1}function r(t){o.logInteraction(o.actions.SPEC_SELECT,t.shorthand,{list:e.listTitle}),a.parse(t.vlSpec),e.postSelectAction&&e.postSelectAction()}e.consts=i,e.limit=e.initialLimit||3,e.getChart=s.getChart,e.increaseLimit=t,e.isInlist=n,e.select=r,e.Pills=a}}}])}(),function(){"use strict";angular.module("vlui").filter("compactJSON",["JSON3",function(e){return function(t){return e.stringify(t,null,"  ",80)}}])}(),function(){"use strict";angular.module("vlui").filter("encodeURI",function(){return function(e){return window.encodeURI(e)}})}(),function(){"use strict";angular.module("vlui").filter("reportUrl",["compactJSONFilter","_","consts",function(e,t,n){function i(n){var i="https://docs.google.com/forms/d/1T9ZA14F3mmzrHR7JJVUKyPXzrMqF54CjLIOjv2E7ZEM/viewform?";if(n.fields){var r=encodeURI(e(t.values(n.fields)));i+="entry.1245199477="+r+"&"}if(n.spec){var o=t.omit(n.spec,"config");o=encodeURI(e(o)),i+="entry.1323680136="+o+"&"}if(n.spec2){var a=t.omit(n.spec2,"config");a=encodeURI(e(a)),i+="entry.853137786="+a+"&"}var s="entry.1940292677=";switch(n.type){case"vl":i+=s+"Visualization+Rendering+(Vegalite)&";break;case"vr":i+=s+"Recommender+Algorithm+(Visrec)&";break;case"fv":i+=s+"Recommender+UI+(FacetedViz)&"}return i}function r(n){var i="https://docs.google.com/forms/d/1xKs-qGaLZEUfbTmhdmSoS13OKOEpuu_NNWE5TAAml_Y/viewform?";if(n.spec){var r=t.omit(n.spec,"config");r=encodeURI(e(r)),i+="entry.1245199477="+r+"&"}return i}return"voyager"===n.appId?i:r}])}(),function(){"use strict";angular.module("vlui").filter("underscore2space",function(){return function(e){return e?e.replace(/_+/g," "):""}})}(),function(){"use strict";angular.module("vlui").service("Alerts",["$timeout","_",function(e,t){var n={};return n.alerts=[],n.add=function(i,r){var o={msg:i};n.alerts.push(o),r&&e(function(){var e=t.findIndex(n.alerts,o);n.closeAlert(e)},r)},n.closeAlert=function(e){n.alerts.splice(e,1)},n}])}(),function(){"use strict";angular.module("vlui").service("Bookmarks",["_","vl","localStorageService","Logger","Dataset",function(e,t,n,i,r){var o=function(){this.list=[],this.dict={},this.isSupported=n.isSupported},a=o.prototype;return a.save=function(){n.set("bookmarkList",this.list)},a.saveAnnotations=function(t){e.find(this.list,function(e){return e.shorthand===t}).chart.annotation=this.dict[t].annotation,this.save()},a["export"]=function(){var t=this.dict,n=[];e.forEach(this.list,function(e){var i=e.chart.vlSpec;i.description=t[e.shorthand].annotation,n.push(i)});var i=window.open();i.document.open(),i.document.write("<html><body><pre>"+JSON.stringify(n,null,2)+"</pre></body></html>"),i.document.close()},a.load=function(){this.list=n.get("bookmarkList")||[];var t=this.dict;e.forEach(this.list,function(n){t[n.shorthand]=e.cloneDeep(n.chart)})},a.clear=function(){this.list.splice(0,this.list.length),this.dict={},this.save(),i.logInteraction(i.actions.BOOKMARK_CLEAR)},a.add=function(t,n){var o=t.shorthand;t.timeAdded=(new Date).getTime(),t.schema=r.schema,this.dict[t.shorthand]=e.cloneDeep(t),this.list.push({shorthand:o,list:n,chart:e.cloneDeep(t)}),this.save(),i.logInteraction(i.actions.BOOKMARK_ADD,o,{list:n})},a.remove=function(e){var t,n=e.shorthand,r=this.list.findIndex(function(e){return e.shorthand===n});r>=0&&(t=this.list.splice(r,1)[0]),delete this.dict[e.shorthand],this.save(),i.logInteraction(i.actions.BOOKMARK_REMOVE,n,{list:(t||{}).list})},a.reorder=function(){this.save()},a.isBookmarked=function(e){return this.dict.hasOwnProperty(e)},a.logBookmarksClosed=function(){i.logInteraction(i.actions.BOOKMARK_CLOSE)},new o}])}(),function(){"use strict";angular.module("vlui").service("Chart",["cql","_",function(e,t){function n(t){if(!t)return{vlSpec:null,fieldSet:null,shorthand:null,enumSpecIndex:null};var n=t instanceof e.model.SpecQueryModelGroup?t.getTopSpecQueryModel():t;return{enumSpecIndex:n.enumSpecIndex,fieldSet:n.specQuery.encodings,vlSpec:n.toSpec(),shorthand:n.toShorthand()}}function i(e){var n=t.clone(e.encoding),i=n.x,r=n.y;n.y=i,n.x=r;var o=n.row,a=n.column;n.row=a,n.column=o,e.encoding=n}var r={getChart:n,transpose:i};return r}])}(),function(){"use strict";angular.module("vlui").factory("Config",function(){var e={};return e.data={},e.config={},e.getConfig=function(){return{}},e.getData=function(){return e.data},e.large=function(){return{cell:{width:400,height:400},facet:{cell:{width:200,height:200}}}},e.small=function(){return{facet:{cell:{width:150,height:150}}}},e.updateDataset=function(t,n){t.values?(e.data.values=t.values,delete e.data.url,e.data.formatType=void 0):(e.data.url=t.url,delete e.data.values,e.data.formatType=n)},e})}(),function(){"use strict";angular.module("vlui").service("Logger",["$location","$window","$webSql","_","consts","Analytics","Papa","Blob","URL",function(e,t,n,i,r,o,a,s,l){var u={};if(u.levels={OFF:{id:"OFF",rank:0},TRACE:{id:"TRACE",rank:1},DEBUG:{id:"DEBUG",rank:2},INFO:{id:"INFO",rank:3},WARN:{id:"WARN",rank:4},ERROR:{id:"ERROR",rank:5},FATAL:{id:"FATAL",rank:6}},u.actions={INITIALIZE:{category:"DATA",id:"INITIALIZE",level:u.levels.DEBUG},UNDO:{category:"DATA",id:"UNDO",level:u.levels.INFO},REDO:{category:"DATA",id:"REDO",level:u.levels.INFO},DATASET_CHANGE:{category:"DATA",id:"DATASET_CHANGE",level:u.levels.INFO},DATASET_OPEN:{category:"DATA",id:"DATASET_OPEN",level:u.levels.INFO},DATASET_NEW_PASTE:{category:"DATA",id:"DATASET_NEW_PASTE",level:u.levels.INFO},DATASET_NEW_URL:{category:"DATA",id:"DATASET_NEW_URL",level:u.levels.INFO},BOOKMARK_ADD:{category:"BOOKMARK",id:"BOOKMARK_ADD",level:u.levels.INFO},BOOKMARK_REMOVE:{category:"BOOKMARK",id:"BOOKMARK_REMOVE",level:u.levels.INFO},BOOKMARK_OPEN:{category:"BOOKMARK",id:"BOOKMARK_OPEN",level:u.levels.INFO},BOOKMARK_CLOSE:{category:"BOOKMARK",id:"BOOKMARK_CLOSE",level:u.levels.INFO},BOOKMARK_CLEAR:{category:"BOOKMARK",id:"BOOKMARK_CLEAR",level:u.levels.INFO},CHART_MOUSEOVER:{category:"CHART",id:"CHART_MOUSEOVER",level:u.levels.DEBUG},CHART_MOUSEOUT:{category:"CHART",id:"CHART_MOUSEOUT",level:u.levels.DEBUG},CHART_RENDER:{category:"CHART",id:"CHART_RENDER",level:u.levels.DEBUG},CHART_EXPOSE:{category:"CHART",id:"CHART_EXPOSE",level:u.levels.DEBUG},CHART_TOOLTIP:{category:"CHART",id:"CHART_TOOLTIP",level:u.levels.DEBUG},CHART_TOOLTIP_END:{category:"CHART",id:"CHART_TOOLTIP_END",level:u.levels.DEBUG},SORT_TOGGLE:{category:"CHART",id:"SORT_TOGGLE",level:u.levels.INFO},MARK_TOGGLE:{category:"CHART",id:"MARK_TOGGLE",level:u.levels.INFO},DRILL_DOWN_OPEN:{category:"CHART",id:"DRILL_DOWN_OPEN",level:u.levels.INFO},DRILL_DOWN_CLOSE:{category:"CHART",id:"DRILL_DOWN_CLOSE",level:u.levels.INFO},LOG_TOGGLE:{category:"CHART",id:"LOG_TOGGLE",level:u.levels.INFO},TRANSPOSE_TOGGLE:{category:"CHART",id:"TRANSPOSE_TOGGLE",level:u.levels.INFO},NULL_FILTER_TOGGLE:{category:"CHART",id:"NULL_FILTER_TOGGLE",level:u.levels.INFO},CLUSTER_SELECT:{category:"CHART",id:"CLUSTER_SELECT",level:u.levels.INFO},LOAD_MORE:{category:"CHART",id:"LOAD_MORE",level:u.levels.INFO},FIELDS_CHANGE:{category:"FIELDS",id:"FIELDS_CHANGE",level:u.levels.INFO},FIELDS_RESET:{category:"FIELDS",id:"FIELDS_RESET",level:u.levels.INFO},FUNC_CHANGE:{category:"FIELDS",id:"FUNC_CHANGE",level:u.levels.INFO},ADD_FIELD:{category:"FIELDS",id:"ADD_FIELD",level:u.levels.INFO},FIELDDEF_HIGHLIGHTED:{category:"FIELDINFO",id:"FIELDDEF_HIGHLIGHTED",level:u.levels.INFO},FIELDDEF_UNHIGHLIGHTED:{category:"FIELDINFO",id:"FIELDDEF_UNHIGHLIGHTED",level:u.levels.INFO},SPEC_CLEAN:{category:"POLESTAR",id:"SPEC_CLEAN",level:u.levels.INFO},SPEC_CHANGE:{category:"POLESTAR",id:"SPEC_CHANGE",level:u.levels.INFO},FIELD_DROP:{category:"POLESTAR",id:"FIELD_DROP",level:u.levels.INFO},MARK_CHANGE:{category:"POLESTAR",id:"MARK_CHANGE",level:u.levels.INFO},SPEC_SELECT:{category:"VOYAGER2",id:"SPEC_SELECT",level:u.levels.INFO},SET_ALTERNATIVES_TYPE:{category:"ALTERNATIVES",id:"SET_ALTERNATIVES_TYPE",level:u.levels.INFO},TOGGLE_SHOW_ALTERNATIVES:{category:"ALTERNATIVES",id:"TOGGLE_SHOW_ALTERNATIVES",level:u.levels.INFO},TOGGLE_HIDE_ALTERNATIVES:{category:"ALTERNATIVES",id:"TOGGLE_HIDE_ALTERNATIVES",level:u.levels.INFO},SPEC_PREVIEW_ENABLED:{category:"PREVIEW",id:"SPEC_PREVIEW_ENABLED",level:u.levels.INFO},SPEC_PREVIEW_DISABLED:{category:"PREVIEW",id:"SPEC_PREVIEW_DISABLED",level:u.levels.INFO}},void 0===t.openDatabase)return console.warn("No websql support and thus no logging."),u.logInteraction=function(){},u;var c=u.userid=e.search().userid;return u.db=n.openDatabase("logs","1.0","Logs",2097152),u.tableName="Logs_"+r.appId,u.createTableIfNotExists=function(){u.db.createTable(u.tableName,{userid:{type:"INTEGER","null":"NOT NULL"},time:{type:"TIMESTAMP","null":"NOT NULL"},actionCategory:{type:"TEXT","null":"NOT NULL"},actionId:{type:"TEXT","null":"NOT NULL"},label:{type:"TEXT","null":"NOT NULL"},data:{type:"TEXT"}})},u.clear=function(){var e=t.confirm("Really clear the logs?");e===!0&&(u.db.dropTable(u.tableName),u.createTableIfNotExists())},u["export"]=function(){u.db.selectAll(u.tableName).then(function(e){if(0===e.rows.length)return void console.warn("No logs");for(var t=[],n=0;n<e.rows.length;n++)t.push(e.rows.item(n));var i=a.unparse(t),r=new s([i],{type:"text/csv"}),o=l.createObjectURL(r),f=angular.element("<a/>");f.attr({href:o,target:"_blank",download:u.tableName+"_"+c+"_"+(new Date).toISOString()+".csv"})[0].click()})},u.logInteraction=function(e,t,n){if(r.logging){var a=n?n.value:void 0;if(e.level.rank>=u.levels[r.logLevel||"INFO"].rank){if(o.trackEvent(e.category,e.id,t,a),r.logToWebSql){var s={userid:c,time:(new Date).toISOString(),actionCategory:e.category,actionId:e.id,label:i.isObject(t)?JSON.stringify(t):t,data:n?JSON.stringify(n):void 0};u.db.insert(u.tableName,s)}e.level.rank>=u.levels[r.logPrintLevel||"INFO"].rank&&console.log("[Logging] ",e.id,t,n)}}},u.createTableIfNotExists(),console.log("app:",r.appId,"started"),u.logInteraction(u.actions.INITIALIZE,r.appId),u}])}(),function(){"use strict";angular.module("vlui").service("Pills",["ANY","util",function(e,t){function n(t){return t&&0===t.indexOf(e)}function i(){for(var n=t.keys(x.pills).filter(function(t){return 0===t.indexOf(e)}),i=0;i<n.length;i++){var r=n[i];if(!x.pills[r].field)return r}throw new Error("No empty any channel available!")}function r(){for(var t=0;x.pills[e+t];)t++;return e+t}function o(e,t,n){x.pills[e]=t,n&&x.listener&&x.listener.set(e,t)}function a(e){return x.pills[e]}function s(e){x.listener&&x.listener.add&&x.listener.add(e)}function l(e){return!(!x.listener||!x.listener.isEnumeratedChannel)&&x.listener.isEnumeratedChannel(e,x.pills[e])}function u(e){return!(!x.listener||!x.listener.isEnumeratedField)&&x.listener.isEnumeratedField(e,x.pills[e])}function c(e){delete x.pills[e],x.listener&&x.listener.remove(e)}function f(e,t){x.listener&&x.listener.sort&&x.listener.sort(e,t)}function h(e,t){x.listener&&x.listener.rescale&&x.listener.rescale(e,t)}function d(){x.listener&&x.listener.toggleFilterInvalid&&x.listener.toggleFilterInvalid()}function p(){x.listener&&x.listener.transpose&&x.listener.transpose()}function g(e){x.listener&&x.listener.parse(e)}function m(e,t,n){x.listener&&x.listener.preview(e,t,n)}function v(e){x.listener&&x.listener.update(e)}function y(){x.listener&&x.listener.reset()}function b(e,t){x.dragging=e,x.cidDragFrom=t}function _(){x.dragging=null}function E(e){x.listener&&x.listener.dragDrop(e,x.cidDragFrom)}var x={isAnyChannel:n,getNextAnyChannelId:r,getEmptyAnyChannelId:i,isEnumeratedChannel:l,isEnumeratedField:u,get:a,dragStart:b,dragStop:_,set:o,remove:c,add:s,rescale:h,sort:f,toggleFilterInvalid:d,transpose:p,parse:g,preview:m,update:v,reset:y,dragDrop:E,pills:{},highlighted:{},dragging:null,cidDragFrom:null,listener:null};return x}])}(),function(){"use strict";angular.module("vlui").factory("Schema",["vg","vl","vlSchema",function(e,t,n){var i={};return i.schema=n,i.getChannelSchema=function(e){var t=null,n=i.schema.definitions.Encoding.properties[e],r=n?n.$ref||n.oneOf[0].$ref:"FieldDef";return t=r.slice(r.lastIndexOf("/")+1),i.schema.definitions[t]},i}])}(),function e(t,n,i){function r(a,s){if(!n[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return r(n?n:e)},c,c.exports,e,t,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(e,t,n){"use strict";t.exports=function(e,t){return e&&0!==e.length?new RegExp((t?"^([^@/:]*\\.)?(":"^(")+e.map(function(e){return e.replace(".","\\.")}).join("|")+")$","i"):{test:function(){return!1}}}},{}],2:[function(e,t,n){"use strict";function i(e,t){var n;if(e&&e.type&&void 0!==e.value){switch(e.type){case"literal":switch(e.datatype){case"http://www.w3.org/2001/XMLSchema#double":case"http://www.w3.org/2001/XMLSchema#float":case"http://www.w3.org/2001/XMLSchema#decimal":case"http://www.w3.org/2001/XMLSchema#integer":case"http://www.w3.org/2001/XMLSchema#long":case"http://www.w3.org/2001/XMLSchema#int":case"http://www.w3.org/2001/XMLSchema#short":case"http://www.w3.org/2001/XMLSchema#nonNegativeInteger":case"http://www.w3.org/2001/XMLSchema#positiveInteger":case"http://www.w3.org/2001/XMLSchema#unsignedLong":case"http://www.w3.org/2001/XMLSchema#unsignedInt":case"http://www.w3.org/2001/XMLSchema#unsignedShort":case"http://www.w3.org/2001/XMLSchema#nonPositiveInteger":case"http://www.w3.org/2001/XMLSchema#negativeInteger":if(n=parseFloat(e.value),n.toString()===e.value)return n;break;case"http://www.opengis.net/ont/geosparql#wktLiteral":if(n=/^Point\(([-0-9.]+) ([-0-9.]+)\)$/.exec(e.value))return[parseFloat(n[1]),parseFloat(n[2])]}break;case"uri":if(n=/^http:\/\/www\.wikidata\.org\/entity\/(Q[1-9][0-9]*)$/.exec(e.value))return n[1]}return t?void 0:e.value}}t.exports=i},{}],3:[function(e,t,n){"use strict";function i(e,t,n,i,r,o,a,s){var l=this;l.isTrusted=n,l.domains=i,l.domainMap=r,l.logger=o,l.objExtender=e.extend,l.parseUrl=a,l.formatUrl=s,l.validators={},e.load.loader=function(n,i){var r,o=i||function(e){throw e};try{r=l.sanitizeUrl(n)}catch(a){return void o(a)}var s=function(e,t){return l.dataParser(e,t,n,i)};return t?e.load.xhr(r,n,s):e.load.http(r,n,s)},e.load.sanitizeUrl=l.sanitizeUrl.bind(l),e.load.file=function(){throw new Error("Disabled")},t?e.load.http=e.load.file:e.load.xhr=e.load.file}var r=e("domain-validator"),o=e("wd-type-parser");t.exports=i,i.prototype.sanitizeHost=function(e){return e=this.domainMap&&this.domainMap[e]||e,this.testHost("https:",e)?{host:e,protocol:"https:"}:this.testHost("http:",e)?{host:e,protocol:"http:"}:void 0},i.prototype.testHost=function(e,t){if(!this.validators[e]){var n=this._getProtocolDomains(e);if(!n)return!1;this.validators[e]=r(n,"https:"===e||"http:"===e)}return this.validators[e].test(t)},i.prototype._getProtocolDomains=function(e){return this.domains[e]||e&&e.length&&":"===e[e.length-1]&&this.domains[e.substring(0,e.length-1)]},i.prototype.sanitizeUrl=function(e){e.url=e.url.replace(/^([a-z]+:)https?:\/\//,"$1//");var t,n=/^\/\//.test(e.url),i=this.parseUrl(e),r=this.sanitizeHost(i.host);if(!r)throw new Error("URL hostname is not whitelisted: "+e.url);if(i.host=r.host,i.protocol||(i.protocol=r.protocol,n=!0),e.graphProtocol=i.protocol,"open"===e.type)switch(t=decodeURIComponent(i.pathname).trim(),i.protocol){case"http:":case"https:":if(!n){if(!/^\/wiki\/.+$/.test(t))throw new Error("wikititle: http(s) links must begin with /wiki/ prefix");t=t.substring("/wiki".length)}e.graphProtocol="wikititle";case"wikititle:":if(0!==Object.keys(i.query).length)throw new Error("wikititle: query parameters are not allowed");if(!/^\/[^|]+$/.test(t))throw new Error("wikititle: invalid title");i.pathname="/wiki/"+encodeURIComponent(t.substring(1).replace(" ","_")),i.protocol=r.protocol;break;default:throw new Error('"open()" action only allows links with wikititle protocol, e.g. wikititle:///My_page')}else switch(i.protocol){case"http:":case"https:":if(!this.isTrusted)throw new Error("HTTP and HTTPS protocols are not supported for untrusted graphs.\nUse wikiraw:, wikiapi:, wikirest:, wikirawupload:, and other protocols.\nSee https://www.mediawiki.org/wiki/Extension:Graph#External_data");break;case"wikiapi:":i.query=this.objExtender(i.query,{format:"json",formatversion:"2"}),i.pathname="/w/api.php",i.protocol=r.protocol,e.addCorsOrigin=!0;break;case"wikirest:":if(!/^\/api\//.test(i.pathname))throw new Error("wikirest: protocol must begin with the /api/ prefix");i.protocol=r.protocol;break;case"wikiraw:":if(t=decodeURIComponent(i.pathname),!/^\/[^|]+$/.test(t))throw new Error("wikiraw: invalid title");i.query={format:"json",formatversion:"2",action:"query",prop:"revisions",rvprop:"content",titles:t.substring(1)},i.pathname="/w/api.php",i.protocol=r.protocol,e.addCorsOrigin=!0;break;case"wikifile:":i.pathname="/wiki/Special:Redirect/file"+i.pathname,i.protocol=r.protocol;break;case"wikirawupload:":this._validateExternalService(i,r,e.url),i.query={};break;case"wikidatasparql:":if(this._validateExternalService(i,r,e.url),!i.query||!i.query.query)throw new Error("wikidatasparql: missing query parameter in: "+e.url);i.query={query:i.query.query},i.pathname="/bigdata/namespace/wdq/sparql",e.headers=this.objExtender(e.headers||{},{Accept:"application/sparql-results+json"});break;case"geoshape:":if(this._validateExternalService(i,r,e.url),!i.query||!i.query.ids&&!i.query.query)throw new Error("geoshape: missing ids or query parameter in: "+e.url);i.pathname="/shape";break;default:throw new Error("Unknown protocol "+e.url)}return this.formatUrl(i,e)},i.prototype._validateExternalService=function(e,t,n){var i=e.protocol,r=this._getProtocolDomains(i);if(!r)throw new Error(i+": protocol is disabled: "+n);if(e.isRelativeHost?(e.host=r[0],e.protocol=this.sanitizeHost(e.host).protocol):e.protocol=t.protocol,!this.testHost(i,e.host))throw new Error(i+": URL must either be relative ("+i+"///...), or use one of the allowed hosts: "+n)},i.prototype.dataParser=function(e,t,n,i){if(e)return void i(e);switch(n.graphProtocol){case"wikiapi:":case"wikiraw:":if(t=JSON.parse(t),t.error)e=new Error("API error: "+JSON.stringify(t.error)),t=void 0;else if(t.warnings&&this.logger("API warnings: "+JSON.stringify(t.warnings)),"wikiraw"===n.graphProtocol)try{t=t.query.pages[0].revisions[0].content}catch(r){t=void 0,e=new Error("Page content not available "+n.url)}break;case"wikidatasparql:":if(t=JSON.parse(t),!t.results||!Array.isArray(t.results.bindings))throw new Error('SPARQL query result does not have "results.bindings"');t=t.results.bindings.map(function(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=o(e[t]));return n})}i(e,t)}},{"domain-validator":1,"wd-type-parser":2}],4:[function(e,t,n){"use strict";function i(e){var t=u.exec(e);return{protocol:t[1]?t[1].toLowerCase():"",slashes:!!t[2],rest:t[3]?t[3]:""}}function r(e,t,n){if(!(this instanceof r))return new r(e,t,n);var u,f,h,d,p,g=l.test(e),m=typeof t,v=this,y=0;for("object"!==m&&"string"!==m&&(n=t,t=null),n&&"function"!=typeof n&&(n=s.parse),t=a(t),p=i(e),v.protocol=p.protocol||t.protocol||"",v.slashes=p.slashes||t.slashes,e=p.rest;y<c.length;y++)f=c[y],u=f[0],d=f[1],u!==u?v[d]=e:"string"==typeof u?~(h=e.indexOf(u))&&("number"==typeof f[2]?(v[d]=e.slice(0,h),e=e.slice(h+f[2])):(v[d]=e.slice(h),e=e.slice(0,h))):(h=u.exec(e))&&(v[d]=h[1],e=e.slice(0,e.length-h[0].length)),v[d]=v[d]||(f[3]||"port"===d&&g?t[d]||"":""),f[4]&&(v[d]=v[d].toLowerCase());n&&(v.query=n(v.query)),o(v.port,v.protocol)||(v.host=v.hostname,v.port=""),v.username=v.password="",v.auth&&(f=v.auth.split(":"),v.username=f[0]||"",v.password=f[1]||""),v.origin=v.protocol&&v.host&&"file:"!==v.protocol?v.protocol+"//"+v.host:"null",v.href=v.toString()}var o=e("requires-port"),a=e("./lolcation"),s=e("querystringify"),l=/^\/(?!\/)/,u=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i,c=[["#","hash"],["?","query"],["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port"],[NaN,"hostname",void 0,1,1]];r.prototype.set=function(e,t,n){var i=this;"query"===e?("string"==typeof t&&t.length&&(t=(n||s.parse)(t)),i[e]=t):"port"===e?(i[e]=t,o(t,i.protocol)?t&&(i.host=i.hostname+":"+t):(i.host=i.hostname,i[e]="")):"hostname"===e?(i[e]=t,i.port&&(t+=":"+i.port),i.host=t):"host"===e?(i[e]=t,/:\d+$/.test(t)?(t=t.split(":"),i.port=t.pop(),i.hostname=t.join(":")):(i.hostname=t,i.port="")):"protocol"===e?(i.protocol=t.toLowerCase(),i.slashes=!n):i[e]=t;for(var r=0;r<c.length;r++){var a=c[r];a[4]&&(i[a[1]]=i[a[1]].toLowerCase())}return i.origin=i.protocol&&i.host&&"file:"!==i.protocol?i.protocol+"//"+i.host:"null",i.href=i.toString(),i},r.prototype.toString=function(e){e&&"function"==typeof e||(e=s.stringify);var t,n=this,i=n.protocol;i&&":"!==i.charAt(i.length-1)&&(i+=":");var r=i+(n.slashes?"//":"");return n.username&&(r+=n.username,n.password&&(r+=":"+n.password),r+="@"),r+=n.host+n.pathname,t="object"==typeof n.query?e(n.query):n.query,t&&(r+="?"!==t.charAt(0)?"?"+t:t),n.hash&&(r+=n.hash),r},r.extractProtocol=i,r.location=a,r.qs=s,t.exports=r},{"./lolcation":5,querystringify:6,"requires-port":7}],5:[function(e,t,n){(function(n){"use strict";var i,r=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,o={hash:1,query:1};t.exports=function(t){t=t||n.location||{},i=i||e("./");var a,s={},l=typeof t;if("blob:"===t.protocol)s=new i(unescape(t.pathname),{});else if("string"===l){s=new i(t,{});for(a in o)delete s[a]}else if("object"===l){for(a in t)a in o||(s[a]=t[a]);void 0===s.slashes&&(s.slashes=r.test(t.href))}return s}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./":4}],6:[function(e,t,n){"use strict";function i(e){for(var t,n=/([^=?&]+)=?([^&]*)/g,i={};t=n.exec(e);i[decodeURIComponent(t[1])]=decodeURIComponent(t[2]));return i}function r(e,t){t=t||"";var n=[];"string"!=typeof t&&(t="?");for(var i in e)o.call(e,i)&&n.push(encodeURIComponent(i)+"="+encodeURIComponent(e[i]));return n.length?t+n.join("&"):""}var o=Object.prototype.hasOwnProperty;n.stringify=r,n.parse=i},{}],7:[function(e,t,n){"use strict";t.exports=function(e,t){if(t=t.split(":")[0],e=+e,!e)return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},{}],8:[function(e,t,n){!function(t,n){"use strict";var i,r=e("graph-shared"),o=e("url-parse");i=new r(n.util,(!0),(!1),{https:["mediawiki.org","wikibooks.org","wikidata.org","wikimedia.org","wikimediafoundation.org","wikinews.org","wikipedia.org","wikiquote.org","wikisource.org","wikiversity.org","wikivoyage.org","wiktionary.org"],http:["wmflabs.org"],wikirawupload:["upload.wikimedia.org","upload.beta.wmflabs.org"],wikidatasparql:["query.wikidata.org","wdqs-test.wmflabs.org"],geoshape:["maps.wikimedia.org"]},(!1),function(e){console.log(e)},function(e){var t=o(e.url,!0);return delete t.port,/^[a-z]+:\/\/\//.test(e.url)&&(t.isRelativeHost=!0),t},function(e,t){return location.host.toLowerCase()===e.host.toLowerCase()?t.headers=n.util.extend(t.headers||{},{"Treat-as-Untrusted":1}):t.addCorsOrigin&&(e.query.origin=location.protocol+"//"+location.host),e.toString()})}(jQuery,vg)},{"graph-shared":3,"url-parse":4}]},{},[8]),!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.ZSchema=e()}}(function(){var e;return function t(e,n,i){function r(a,s){if(!n[a]){if(!e[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[a]={exports:{}};e[a][0].call(c.exports,function(t){var n=e[a][1][t];return r(n?n:t)},c,c.exports,t,e,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(e,t,n){function i(){}var r=t.exports={};r.nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,t="undefined"!=typeof window&&window.MutationObserver,n="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};var i=[];if(t){var r=document.createElement("div"),o=new MutationObserver(function(){var e=i.slice();i.length=0,e.forEach(function(e){e()})});return o.observe(r,{attributes:!0}),function(e){i.length||r.setAttribute("yes","no"),i.push(e)}}return n?(window.addEventListener("message",function(e){var t=e.source;if((t===window||null===t)&&"process-tick"===e.data&&(e.stopPropagation(),i.length>0)){var n=i.shift();n()}},!0),function(e){i.push(e),window.postMessage("process-tick","*")}):function(e){setTimeout(e,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.on=i,r.addListener=i,r.once=i,r.off=i,r.removeListener=i,r.removeAllListeners=i,r.emit=i,r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")}},{}],2:[function(e,t,n){function i(e,t,n){var i=null==e?void 0:r(e,o(t),t+"");return void 0===i?n:i}var r=e("lodash._baseget"),o=e("lodash._topath");t.exports=i},{"lodash._baseget":3,"lodash._topath":4}],3:[function(e,t,n){function i(e,t,n){if(null!=e){void 0!==n&&n in r(e)&&(t=[n]);for(var i=0,o=t.length;null!=e&&o>i;)e=e[t[i++]];return i&&i==o?e:void 0}}function r(e){return o(e)?e:Object(e)}function o(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}t.exports=i},{}],4:[function(e,t,n){function i(e){return null==e?"":e+""}function r(e){if(o(e))return e;var t=[];return i(e).replace(a,function(e,n,i,r){t.push(i?r.replace(s,"$1"):n||e)}),t}var o=e("lodash.isarray"),a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,s=/\\(\\)?/g;t.exports=r},{"lodash.isarray":5}],5:[function(e,t,n){function i(e){return!!e&&"object"==typeof e}function r(e,t){var n=null==e?void 0:e[t];return l(n)?n:void 0}function o(e){return"number"==typeof e&&e>-1&&e%1==0&&y>=e}function a(e){return s(e)&&g.call(e)==c}function s(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function l(e){return null!=e&&(a(e)?m.test(d.call(e)):i(e)&&f.test(e))}var u="[object Array]",c="[object Function]",f=/^\[object .+?Constructor\]$/,h=Object.prototype,d=Function.prototype.toString,p=h.hasOwnProperty,g=h.toString,m=RegExp("^"+d.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),v=r(Array,"isArray"),y=9007199254740991,b=v||function(e){return i(e)&&o(e.length)&&g.call(e)==u};t.exports=b},{}],6:[function(t,n,i){!function(t,r){"undefined"!=typeof i&&"undefined"!=typeof n?n.exports=r():"function"==typeof e&&"object"==typeof e.amd?e(r):this[t]=r()}("validator",function(e){"use strict";function t(e,t){e=e||{};for(var n in t)"undefined"==typeof e[n]&&(e[n]=t[n]);return e}function n(e){var t="(\\"+e.symbol.replace(/\./g,"\\.")+")"+(e.require_symbol?"":"?"),n="-?",i="[1-9]\\d*",r="[1-9]\\d{0,2}(\\"+e.thousands_separator+"\\d{3})*",o=["0",i,r],a="("+o.join("|")+")?",s="(\\"+e.decimal_separator+"\\d{2})?",l=a+s;return e.allow_negatives&&!e.parens_for_negatives&&(e.negative_sign_after_digits?l+=n:e.negative_sign_before_digits&&(l=n+l)),e.allow_negative_sign_placeholder?l="( (?!\\-))?"+l:e.allow_space_after_symbol?l=" ?"+l:e.allow_space_after_digits&&(l+="( (?!$))?"),
e.symbol_after_digits?l+=t:l=t+l,e.allow_negatives&&(e.parens_for_negatives?l="(\\("+l+"\\)|"+l+")":e.negative_sign_before_digits||e.negative_sign_after_digits||(l=n+l)),new RegExp("^(?!-? )(?=.*\\d)"+l+"$")}e={version:"4.0.5"};var i=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,r=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,o=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,a=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i,s=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF\s]*<(.+)>$/i,l=/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/,u=/^[A-Z]{2}[0-9A-Z]{9}[0-9]$/,c=/^(?:[0-9]{9}X|[0-9]{10})$/,f=/^(?:[0-9]{13})$/,h=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/,d=/^[0-9A-F]{1,4}$/i,p={3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,all:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i},g=/^[A-Z]+$/i,m=/^[0-9A-Z]+$/i,v=/^[-+]?[0-9]+$/,y=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,b=/^(?:[-+]?(?:[0-9]+))?(?:\.[0-9]*)?(?:[eE][\+\-]?(?:[0-9]+))?$/,_=/^[0-9A-F]+$/i,E=/^[-+]?([0-9]+|\.[0-9]+|[0-9]+\.[0-9]+)$/,x=/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i,w=/^[\x00-\x7F]+$/,T=/[^\x00-\x7F]/,S=/[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/,A=/[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/,C=/[\uD800-\uDBFF][\uDC00-\uDFFF]/,k=/^(?:[A-Z0-9+\/]{4})*(?:[A-Z0-9+\/]{2}==|[A-Z0-9+\/]{3}=|[A-Z0-9+\/]{4})$/i,O={"zh-CN":/^(\+?0?86\-?)?1[345789]\d{9}$/,"en-ZA":/^(\+?27|0)\d{9}$/,"en-AU":/^(\+?61|0)4\d{8}$/,"en-HK":/^(\+?852\-?)?[569]\d{3}\-?\d{4}$/,"fr-FR":/^(\+?33|0)[67]\d{8}$/,"pt-PT":/^(\+351)?9[1236]\d{7}$/,"el-GR":/^(\+30)?((2\d{9})|(69\d{8}))$/,"en-GB":/^(\+?44|0)7\d{9}$/,"en-US":/^(\+?1)?[2-9]\d{2}[2-9](?!11)\d{6}$/,"en-ZM":/^(\+26)?09[567]\d{7}$/,"ru-RU":/^(\+?7|8)?9\d{9}$/},I=/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/;e.extend=function(t,n){e[t]=function(){var t=Array.prototype.slice.call(arguments);return t[0]=e.toString(t[0]),n.apply(e,t)}},e.init=function(){for(var t in e)"function"==typeof e[t]&&"toString"!==t&&"toDate"!==t&&"extend"!==t&&"init"!==t&&e.extend(t,e[t])},e.toString=function(e){return"object"==typeof e&&null!==e&&e.toString?e=e.toString():null===e||"undefined"==typeof e||isNaN(e)&&!e.length?e="":"string"!=typeof e&&(e+=""),e},e.toDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)?e:(e=Date.parse(e),isNaN(e)?null:new Date(e))},e.toFloat=function(e){return parseFloat(e)},e.toInt=function(e,t){return parseInt(e,t||10)},e.toBoolean=function(e,t){return t?"1"===e||"true"===e:"0"!==e&&"false"!==e&&""!==e},e.equals=function(t,n){return t===e.toString(n)},e.contains=function(t,n){return t.indexOf(e.toString(n))>=0},e.matches=function(e,t,n){return"[object RegExp]"!==Object.prototype.toString.call(t)&&(t=new RegExp(t,n)),t.test(e)};var N={allow_display_name:!1,allow_utf8_local_part:!0,require_tld:!0};e.isEmail=function(n,l){if(l=t(l,N),l.allow_display_name){var u=n.match(s);u&&(n=u[1])}var c=n.split("@"),f=c.pop(),h=c.join("@"),d=f.toLowerCase();if(("gmail.com"===d||"googlemail.com"===d)&&(h=h.replace(/\./g,"").toLowerCase()),!e.isByteLength(h,0,64)||!e.isByteLength(f,0,256))return!1;if(!e.isFQDN(f,{require_tld:l.require_tld}))return!1;if('"'===h[0])return h=h.slice(1,h.length-1),l.allow_utf8_local_part?a.test(h):r.test(h);for(var p=l.allow_utf8_local_part?o:i,g=h.split("."),m=0;m<g.length;m++)if(!p.test(g[m]))return!1;return!0};var M={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1};e.isURL=function(n,i){if(!n||n.length>=2083||/\s/.test(n))return!1;if(0===n.indexOf("mailto:"))return!1;i=t(i,M);var r,o,a,s,l,u,c;if(c=n.split("://"),c.length>1){if(r=c.shift(),i.require_valid_protocol&&-1===i.protocols.indexOf(r))return!1}else{if(i.require_protocol)return!1;i.allow_protocol_relative_urls&&"//"===n.substr(0,2)&&(c[0]=n.substr(2))}return n=c.join("://"),c=n.split("#"),n=c.shift(),c=n.split("?"),n=c.shift(),c=n.split("/"),n=c.shift(),c=n.split("@"),!(c.length>1&&(o=c.shift(),o.indexOf(":")>=0&&o.split(":").length>2))&&(s=c.join("@"),c=s.split(":"),a=c.shift(),!(c.length&&(u=c.join(":"),l=parseInt(u,10),!/^[0-9]+$/.test(u)||0>=l||l>65535))&&(!(!e.isIP(a)&&!e.isFQDN(a,i)&&"localhost"!==a)&&((!i.host_whitelist||-1!==i.host_whitelist.indexOf(a))&&(!i.host_blacklist||-1===i.host_blacklist.indexOf(a)))))},e.isIP=function(t,n){if(n=e.toString(n),!n)return e.isIP(t,4)||e.isIP(t,6);if("4"===n){if(!h.test(t))return!1;var i=t.split(".").sort(function(e,t){return e-t});return i[3]<=255}if("6"===n){var r=t.split(":"),o=!1,a=e.isIP(r[r.length-1],4),s=a?7:8;if(r.length>s)return!1;if("::"===t)return!0;"::"===t.substr(0,2)?(r.shift(),r.shift(),o=!0):"::"===t.substr(t.length-2)&&(r.pop(),r.pop(),o=!0);for(var l=0;l<r.length;++l)if(""===r[l]&&l>0&&l<r.length-1){if(o)return!1;o=!0}else if(a&&l==r.length-1);else if(!d.test(r[l]))return!1;return o?r.length>=1:r.length===s}return!1};var D={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1};e.isFQDN=function(e,n){n=t(n,D),n.allow_trailing_dot&&"."===e[e.length-1]&&(e=e.substring(0,e.length-1));var i=e.split(".");if(n.require_tld){var r=i.pop();if(!i.length||!/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(r))return!1}for(var o,a=0;a<i.length;a++){if(o=i[a],n.allow_underscores){if(o.indexOf("__")>=0)return!1;o=o.replace(/_/g,"")}if(!/^[a-z\u00a1-\uffff0-9-]+$/i.test(o))return!1;if(/[\uff01-\uff5e]/.test(o))return!1;if("-"===o[0]||"-"===o[o.length-1]||o.indexOf("---")>=0)return!1}return!0},e.isBoolean=function(e){return["true","false","1","0"].indexOf(e)>=0},e.isAlpha=function(e){return g.test(e)},e.isAlphanumeric=function(e){return m.test(e)},e.isNumeric=function(e){return v.test(e)},e.isDecimal=function(e){return""!==e&&E.test(e)},e.isHexadecimal=function(e){return _.test(e)},e.isHexColor=function(e){return x.test(e)},e.isLowercase=function(e){return e===e.toLowerCase()},e.isUppercase=function(e){return e===e.toUpperCase()},e.isInt=function(e,t){return t=t||{},y.test(e)&&(!t.hasOwnProperty("min")||e>=t.min)&&(!t.hasOwnProperty("max")||e<=t.max)},e.isFloat=function(e,t){return t=t||{},""!==e&&b.test(e)&&(!t.hasOwnProperty("min")||e>=t.min)&&(!t.hasOwnProperty("max")||e<=t.max)},e.isDivisibleBy=function(t,n){return e.toFloat(t)%e.toInt(n)===0},e.isNull=function(e){return 0===e.length},e.isLength=function(e,t,n){var i=e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g)||[],r=e.length-i.length;return r>=t&&("undefined"==typeof n||n>=r)},e.isByteLength=function(e,t,n){var i=encodeURI(e).split(/%..|./).length-1;return i>=t&&("undefined"==typeof n||n>=i)},e.isUUID=function(e,t){var n=p[t?t:"all"];return n&&n.test(e)},e.isDate=function(e){return!isNaN(Date.parse(e))},e.isAfter=function(t,n){var i=e.toDate(n||new Date),r=e.toDate(t);return!!(r&&i&&r>i)},e.isBefore=function(t,n){var i=e.toDate(n||new Date),r=e.toDate(t);return r&&i&&i>r},e.isIn=function(t,n){var i;if("[object Array]"===Object.prototype.toString.call(n)){var r=[];for(i in n)r[i]=e.toString(n[i]);return r.indexOf(t)>=0}return"object"==typeof n?n.hasOwnProperty(t):!(!n||"function"!=typeof n.indexOf)&&n.indexOf(t)>=0},e.isCreditCard=function(e){var t=e.replace(/[^0-9]+/g,"");if(!l.test(t))return!1;for(var n,i,r,o=0,a=t.length-1;a>=0;a--)n=t.substring(a,a+1),i=parseInt(n,10),r?(i*=2,o+=i>=10?i%10+1:i):o+=i,r=!r;return!(o%10!==0||!t)},e.isISIN=function(e){if(!u.test(e))return!1;for(var t,n,i=e.replace(/[A-Z]/g,function(e){return parseInt(e,36)}),r=0,o=!0,a=i.length-2;a>=0;a--)t=i.substring(a,a+1),n=parseInt(t,10),o?(n*=2,r+=n>=10?n+1:n):r+=n,o=!o;return parseInt(e.substr(e.length-1),10)===(1e4-r)%10},e.isISBN=function(t,n){if(n=e.toString(n),!n)return e.isISBN(t,10)||e.isISBN(t,13);var i,r=t.replace(/[\s-]+/g,""),o=0;if("10"===n){if(!c.test(r))return!1;for(i=0;9>i;i++)o+=(i+1)*r.charAt(i);if(o+="X"===r.charAt(9)?100:10*r.charAt(9),o%11===0)return!!r}else if("13"===n){if(!f.test(r))return!1;var a=[1,3];for(i=0;12>i;i++)o+=a[i%2]*r.charAt(i);if(r.charAt(12)-(10-o%10)%10===0)return!!r}return!1},e.isMobilePhone=function(e,t){return t in O&&O[t].test(e)};var L={symbol:"$",require_symbol:!1,allow_space_after_symbol:!1,symbol_after_digits:!1,allow_negatives:!0,parens_for_negatives:!1,negative_sign_before_digits:!1,negative_sign_after_digits:!1,allow_negative_sign_placeholder:!1,thousands_separator:",",decimal_separator:".",allow_space_after_digits:!1};e.isCurrency=function(e,i){return i=t(i,L),n(i).test(e)},e.isJSON=function(e){try{var t=JSON.parse(e);return!!t&&"object"==typeof t}catch(n){}return!1},e.isMultibyte=function(e){return T.test(e)},e.isAscii=function(e){return w.test(e)},e.isFullWidth=function(e){return S.test(e)},e.isHalfWidth=function(e){return A.test(e)},e.isVariableWidth=function(e){return S.test(e)&&A.test(e)},e.isSurrogatePair=function(e){return C.test(e)},e.isBase64=function(e){return k.test(e)},e.isMongoId=function(t){return e.isHexadecimal(t)&&24===t.length},e.isISO8601=function(e){return I.test(e)},e.ltrim=function(e,t){var n=t?new RegExp("^["+t+"]+","g"):/^\s+/g;return e.replace(n,"")},e.rtrim=function(e,t){var n=t?new RegExp("["+t+"]+$","g"):/\s+$/g;return e.replace(n,"")},e.trim=function(e,t){var n=t?new RegExp("^["+t+"]+|["+t+"]+$","g"):/^\s+|\s+$/g;return e.replace(n,"")},e.escape=function(e){return e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\//g,"&#x2F;").replace(/\`/g,"&#96;")},e.stripLow=function(t,n){var i=n?"\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F":"\\x00-\\x1F\\x7F";return e.blacklist(t,i)},e.whitelist=function(e,t){return e.replace(new RegExp("[^"+t+"]+","g"),"")},e.blacklist=function(e,t){return e.replace(new RegExp("["+t+"]+","g"),"")};var $={lowercase:!0};return e.normalizeEmail=function(n,i){if(i=t(i,$),!e.isEmail(n))return!1;var r=n.split("@",2);if(r[1]=r[1].toLowerCase(),"gmail.com"===r[1]||"googlemail.com"===r[1]){if(r[0]=r[0].toLowerCase().replace(/\./g,""),"+"===r[0][0])return!1;r[0]=r[0].split("+")[0],r[1]="gmail.com"}else i.lowercase&&(r[0]=r[0].toLowerCase());return r.join("@")},e.init(),e})},{}],7:[function(e,t,n){"use strict";t.exports={INVALID_TYPE:"Expected type {0} but found type {1}",INVALID_FORMAT:"Object didn't pass validation for format {0}: {1}",ENUM_MISMATCH:"No enum match for: {0}",ANY_OF_MISSING:"Data does not match any schemas from 'anyOf'",ONE_OF_MISSING:"Data does not match any schemas from 'oneOf'",ONE_OF_MULTIPLE:"Data is valid against more than one schema from 'oneOf'",NOT_PASSED:"Data matches schema from 'not'",ARRAY_LENGTH_SHORT:"Array is too short ({0}), minimum {1}",ARRAY_LENGTH_LONG:"Array is too long ({0}), maximum {1}",ARRAY_UNIQUE:"Array items are not unique (indexes {0} and {1})",ARRAY_ADDITIONAL_ITEMS:"Additional items not allowed",MULTIPLE_OF:"Value {0} is not a multiple of {1}",MINIMUM:"Value {0} is less than minimum {1}",MINIMUM_EXCLUSIVE:"Value {0} is equal or less than exclusive minimum {1}",MAXIMUM:"Value {0} is greater than maximum {1}",MAXIMUM_EXCLUSIVE:"Value {0} is equal or greater than exclusive maximum {1}",OBJECT_PROPERTIES_MINIMUM:"Too few properties defined ({0}), minimum {1}",OBJECT_PROPERTIES_MAXIMUM:"Too many properties defined ({0}), maximum {1}",OBJECT_MISSING_REQUIRED_PROPERTY:"Missing required property: {0}",OBJECT_ADDITIONAL_PROPERTIES:"Additional properties not allowed: {0}",OBJECT_DEPENDENCY_KEY:"Dependency failed - key must exist: {0} (due to key: {1})",MIN_LENGTH:"String is too short ({0} chars), minimum {1}",MAX_LENGTH:"String is too long ({0} chars), maximum {1}",PATTERN:"String does not match pattern {0}: {1}",KEYWORD_TYPE_EXPECTED:"Keyword '{0}' is expected to be of type '{1}'",KEYWORD_UNDEFINED_STRICT:"Keyword '{0}' must be defined in strict mode",KEYWORD_UNEXPECTED:"Keyword '{0}' is not expected to appear in the schema",KEYWORD_MUST_BE:"Keyword '{0}' must be {1}",KEYWORD_DEPENDENCY:"Keyword '{0}' requires keyword '{1}'",KEYWORD_PATTERN:"Keyword '{0}' is not a valid RegExp pattern: {1}",KEYWORD_VALUE_TYPE:"Each element of keyword '{0}' array must be a '{1}'",UNKNOWN_FORMAT:"There is no validation function for format '{0}'",CUSTOM_MODE_FORCE_PROPERTIES:"{0} must define at least one property if present",REF_UNRESOLVED:"Reference has not been resolved during compilation: {0}",UNRESOLVABLE_REFERENCE:"Reference could not be resolved: {0}",SCHEMA_NOT_REACHABLE:"Validator was not able to read schema with uri: {0}",SCHEMA_TYPE_EXPECTED:"Schema is expected to be of type 'object'",SCHEMA_NOT_AN_OBJECT:"Schema is not an object: {0}",ASYNC_TIMEOUT:"{0} asynchronous task(s) have timed out after {1} ms",PARENT_SCHEMA_VALIDATION_FAILED:"Schema failed to validate against its parent schema, see inner errors for details.",REMOTE_NOT_VALID:"Remote reference didn't compile successfully: {0}"}},{}],8:[function(e,t,n){var i=e("validator"),r={date:function(e){if("string"!=typeof e)return!0;var t=/^([0-9]{4})-([0-9]{2})-([0-9]{2})$/.exec(e);return null!==t&&!(t[2]<"01"||t[2]>"12"||t[3]<"01"||t[3]>"31")},"date-time":function(e){if("string"!=typeof e)return!0;var t=e.toLowerCase().split("t");if(!r.date(t[0]))return!1;var n=/^([0-9]{2}):([0-9]{2}):([0-9]{2})(.[0-9]+)?(z|([+-][0-9]{2}:[0-9]{2}))$/.exec(t[1]);return null!==n&&!(n[1]>"23"||n[2]>"59"||n[3]>"59")},email:function(e){return"string"!=typeof e||i.isEmail(e,{require_tld:!0})},hostname:function(e){if("string"!=typeof e)return!0;var t=/^[a-zA-Z](([-0-9a-zA-Z]+)?[0-9a-zA-Z])?(\.[a-zA-Z](([-0-9a-zA-Z]+)?[0-9a-zA-Z])?)*$/.test(e);if(t){if(e.length>255)return!1;for(var n=e.split("."),i=0;i<n.length;i++)if(n[i].length>63)return!1}return t},"host-name":function(e){return r.hostname.call(this,e)},ipv4:function(e){return"string"!=typeof e||i.isIP(e,4)},ipv6:function(e){return"string"!=typeof e||i.isIP(e,6)},regex:function(e){try{return RegExp(e),!0}catch(t){return!1}},uri:function(e){return this.options.strictUris?r["strict-uri"].apply(this,arguments):"string"!=typeof e||RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?").test(e)},"strict-uri":function(e){return"string"!=typeof e||i.isURL(e)}};t.exports=r},{validator:6}],9:[function(e,t,n){"use strict";var i=e("./FormatValidators"),r=e("./Report"),o=e("./Utils"),a={multipleOf:function(e,t,n){"number"==typeof n&&"integer"!==o.whatIs(n/t.multipleOf)&&e.addError("MULTIPLE_OF",[n,t.multipleOf],null,t.description)},maximum:function(e,t,n){"number"==typeof n&&(t.exclusiveMaximum!==!0?n>t.maximum&&e.addError("MAXIMUM",[n,t.maximum],null,t.description):n>=t.maximum&&e.addError("MAXIMUM_EXCLUSIVE",[n,t.maximum],null,t.description))},exclusiveMaximum:function(){},minimum:function(e,t,n){"number"==typeof n&&(t.exclusiveMinimum!==!0?n<t.minimum&&e.addError("MINIMUM",[n,t.minimum],null,t.description):n<=t.minimum&&e.addError("MINIMUM_EXCLUSIVE",[n,t.minimum],null,t.description))},exclusiveMinimum:function(){},maxLength:function(e,t,n){"string"==typeof n&&o.ucs2decode(n).length>t.maxLength&&e.addError("MAX_LENGTH",[n.length,t.maxLength],null,t.description)},minLength:function(e,t,n){"string"==typeof n&&o.ucs2decode(n).length<t.minLength&&e.addError("MIN_LENGTH",[n.length,t.minLength],null,t.description)},pattern:function(e,t,n){"string"==typeof n&&RegExp(t.pattern).test(n)===!1&&e.addError("PATTERN",[t.pattern,n],null,t.description)},additionalItems:function(e,t,n){Array.isArray(n)&&t.additionalItems===!1&&Array.isArray(t.items)&&n.length>t.items.length&&e.addError("ARRAY_ADDITIONAL_ITEMS",null,null,t.description)},items:function(){},maxItems:function(e,t,n){Array.isArray(n)&&n.length>t.maxItems&&e.addError("ARRAY_LENGTH_LONG",[n.length,t.maxItems],null,t.description)},minItems:function(e,t,n){Array.isArray(n)&&n.length<t.minItems&&e.addError("ARRAY_LENGTH_SHORT",[n.length,t.minItems],null,t.description)},uniqueItems:function(e,t,n){if(Array.isArray(n)&&t.uniqueItems===!0){var i=[];o.isUniqueArray(n,i)===!1&&e.addError("ARRAY_UNIQUE",i,null,t.description)}},maxProperties:function(e,t,n){if("object"===o.whatIs(n)){var i=Object.keys(n).length;i>t.maxProperties&&e.addError("OBJECT_PROPERTIES_MAXIMUM",[i,t.maxProperties],null,t.description)}},minProperties:function(e,t,n){if("object"===o.whatIs(n)){var i=Object.keys(n).length;i<t.minProperties&&e.addError("OBJECT_PROPERTIES_MINIMUM",[i,t.minProperties],null,t.description)}},required:function(e,t,n){if("object"===o.whatIs(n))for(var i=t.required.length;i--;){var r=t.required[i];void 0===n[r]&&e.addError("OBJECT_MISSING_REQUIRED_PROPERTY",[r],null,t.description)}},additionalProperties:function(e,t,n){return void 0===t.properties&&void 0===t.patternProperties?a.properties.call(this,e,t,n):void 0},patternProperties:function(e,t,n){return void 0===t.properties?a.properties.call(this,e,t,n):void 0},properties:function(e,t,n){if("object"===o.whatIs(n)){var i=void 0!==t.properties?t.properties:{},r=void 0!==t.patternProperties?t.patternProperties:{};if(t.additionalProperties===!1){var a=Object.keys(n),s=Object.keys(i),l=Object.keys(r);a=o.difference(a,s);for(var u=l.length;u--;)for(var c=RegExp(l[u]),f=a.length;f--;)c.test(a[f])===!0&&a.splice(f,1);if(a.length>0){var h=this.options.assumeAdditional.length;if(h)for(;h--;){var d=a.indexOf(this.options.assumeAdditional[h]);-1!==d&&a.splice(d,1)}a.length>0&&e.addError("OBJECT_ADDITIONAL_PROPERTIES",[a],null,t.description)}}}},dependencies:function(e,t,i){if("object"===o.whatIs(i))for(var r=Object.keys(t.dependencies),a=r.length;a--;){var s=r[a];if(i[s]){var l=t.dependencies[s];if("object"===o.whatIs(l))n.validate.call(this,e,l,i);else for(var u=l.length;u--;){var c=l[u];void 0===i[c]&&e.addError("OBJECT_DEPENDENCY_KEY",[c,s],null,t.description)}}}},"enum":function(e,t,n){for(var i=!1,r=t["enum"].length;r--;)if(o.areEqual(n,t["enum"][r])){i=!0;break}i===!1&&e.addError("ENUM_MISMATCH",[n],null,t.description)},allOf:function(e,t,i){for(var r=t.allOf.length;r--;){var o=n.validate.call(this,e,t.allOf[r],i);if(this.options.breakOnFirstError&&o===!1)break}},anyOf:function(e,t,i){for(var o=[],a=!1,s=t.anyOf.length;s--&&a===!1;){var l=new r(e);o.push(l),a=n.validate.call(this,l,t.anyOf[s],i)}a===!1&&e.addError("ANY_OF_MISSING",void 0,o,t.description)},oneOf:function(e,t,i){for(var o=0,a=[],s=t.oneOf.length;s--;){var l=new r(e,{maxErrors:1});a.push(l),n.validate.call(this,l,t.oneOf[s],i)===!0&&o++}0===o?e.addError("ONE_OF_MISSING",void 0,a,t.description):o>1&&e.addError("ONE_OF_MULTIPLE",null,null,t.description)},not:function(e,t,i){var o=new r(e);n.validate.call(this,o,t.not,i)===!0&&e.addError("NOT_PASSED",null,null,t.description)},definitions:function(){},format:function(e,t,n){var r=i[t.format];"function"==typeof r?2===r.length?e.addAsyncTask(r,[n],function(i){i!==!0&&e.addError("INVALID_FORMAT",[t.format,n],null,t.description)}):r.call(this,n)!==!0&&e.addError("INVALID_FORMAT",[t.format,n],null,t.description):this.options.ignoreUnknownFormats!==!0&&e.addError("UNKNOWN_FORMAT",[t.format],null,t.description)}},s=function(e,t,i){var r=i.length;if(Array.isArray(t.items))for(;r--;)r<t.items.length?(e.path.push(r.toString()),n.validate.call(this,e,t.items[r],i[r]),e.path.pop()):"object"==typeof t.additionalItems&&(e.path.push(r.toString()),n.validate.call(this,e,t.additionalItems,i[r]),e.path.pop());else if("object"==typeof t.items)for(;r--;)e.path.push(r.toString()),n.validate.call(this,e,t.items,i[r]),e.path.pop()},l=function(e,t,i){var r=t.additionalProperties;(r===!0||void 0===r)&&(r={});for(var o=t.properties?Object.keys(t.properties):[],a=t.patternProperties?Object.keys(t.patternProperties):[],s=Object.keys(i),l=s.length;l--;){var u=s[l],c=i[u],f=[];-1!==o.indexOf(u)&&f.push(t.properties[u]);for(var h=a.length;h--;){var d=a[h];RegExp(d).test(u)===!0&&f.push(t.patternProperties[d])}for(0===f.length&&r!==!1&&f.push(r),h=f.length;h--;)e.path.push(u),n.validate.call(this,e,f[h],c),e.path.pop()}};n.validate=function(e,t,n){e.commonErrorMessage="JSON_OBJECT_VALIDATION_FAILED";var i=o.whatIs(t);if("object"!==i)return e.addError("SCHEMA_NOT_AN_OBJECT",[i],null,t.description),!1;var r=Object.keys(t);if(0===r.length)return!0;var u=!1;if(e.rootSchema||(e.rootSchema=t,u=!0),void 0!==t.$ref){for(var c=99;t.$ref&&c>0;){if(!t.__$refResolved){e.addError("REF_UNRESOLVED",[t.$ref],null,t.description);break}if(t.__$refResolved===t)break;t=t.__$refResolved,r=Object.keys(t),c--}if(0===c)throw new Error("Circular dependency by $ref references!")}var f=o.whatIs(n);if(t.type)if("string"==typeof t.type){if(f!==t.type&&("integer"!==f||"number"!==t.type)&&(e.addError("INVALID_TYPE",[t.type,f],null,t.description),this.options.breakOnFirstError))return!1}else if(-1===t.type.indexOf(f)&&("integer"!==f||-1===t.type.indexOf("number"))&&(e.addError("INVALID_TYPE",[t.type,f],null,t.description),this.options.breakOnFirstError))return!1;for(var h=r.length;h--&&!(a[r[h]]&&(a[r[h]].call(this,e,t,n),e.errors.length&&this.options.breakOnFirstError)););return(0===e.errors.length||this.options.breakOnFirstError===!1)&&("array"===f?s.call(this,e,t,n):"object"===f&&l.call(this,e,t,n)),u&&(e.rootSchema=void 0),0===e.errors.length}},{"./FormatValidators":8,"./Report":11,"./Utils":15}],10:[function(e,t,n){"function"!=typeof Number.isFinite&&(Number.isFinite=function(e){return"number"==typeof e&&(e===e&&e!==1/0&&e!==-(1/0))})},{}],11:[function(e,t,n){(function(n){"use strict";function i(e,t){this.parentReport=e instanceof i?e:void 0,this.options=e instanceof i?e.options:e||{},this.reportOptions=t||{},this.errors=[],this.path=[],this.asyncTasks=[]}var r=e("lodash.get"),o=e("./Errors"),a=e("./Utils");i.prototype.isValid=function(){if(this.asyncTasks.length>0)throw new Error("Async tasks pending, can't answer isValid");return 0===this.errors.length},i.prototype.addAsyncTask=function(e,t,n){this.asyncTasks.push([e,t,n])},i.prototype.processAsyncTasks=function(e,t){function i(){n.nextTick(function(){var e=0===u.errors.length,n=e?void 0:u.errors;t(n,e)})}function r(e){return function(t){l||(e(t),0===--a&&i())}}var o=e||2e3,a=this.asyncTasks.length,s=a,l=!1,u=this;if(0===a||this.errors.length>0)return void i();for(;s--;){var c=this.asyncTasks[s];c[0].apply(null,c[1].concat(r(c[2])))}setTimeout(function(){a>0&&(l=!0,u.addError("ASYNC_TIMEOUT",[a,o]),t(u.errors,!1))},o)},i.prototype.getPath=function(){var e=[];return this.parentReport&&(e=e.concat(this.parentReport.path)),e=e.concat(this.path),this.options.reportPathAsArray!==!0&&(e="#/"+e.map(function(e){return a.isAbsoluteUri(e)?"uri("+e+")":e.replace(/\~/g,"~0").replace(/\//g,"~1")}).join("/")),e},i.prototype.getSchemaId=function(){if(!this.rootSchema)return null;var e=[];for(this.parentReport&&(e=e.concat(this.parentReport.path)),e=e.concat(this.path);e.length>0;){var t=r(this.rootSchema,e);if(t&&t.id)return t.id;e.pop()}return this.rootSchema.id},i.prototype.hasError=function(e,t){for(var n=this.errors.length;n--;)if(this.errors[n].code===e){for(var i=!0,r=this.errors[n].params.length;r--;)this.errors[n].params[r]!==t[r]&&(i=!1);if(i)return i}return!1},i.prototype.addError=function(e,t,n,i){if(!(this.errors.length>=this.reportOptions.maxErrors)){if(!e)throw new Error("No errorCode passed into addError()");if(!o[e])throw new Error("No errorMessage known for code "+e);t=t||[];for(var r=t.length,s=o[e];r--;){var l=a.whatIs(t[r]),u="object"===l||"null"===l?JSON.stringify(t[r]):t[r];s=s.replace("{"+r+"}",u)}var c={code:e,params:t,message:s,path:this.getPath(),schemaId:this.getSchemaId()};if(i&&(c.description=i),null!=n){for(Array.isArray(n)||(n=[n]),c.inner=[],r=n.length;r--;)for(var f=n[r],h=f.errors.length;h--;)c.inner.push(f.errors[h]);0===c.inner.length&&(c.inner=void 0)}this.errors.push(c)}},t.exports=i}).call(this,e("_process"))},{"./Errors":7,"./Utils":15,_process:1,"lodash.get":2}],12:[function(e,t,n){"use strict";function i(e){return decodeURIComponent(e).replace(/~[0-1]/g,function(e){return"~1"===e?"/":"~"})}function r(e){var t=e.indexOf("#");return-1===t?e:e.slice(0,t)}function o(e){var t=e.indexOf("#"),n=-1===t?void 0:e.slice(t+1);return n}function a(e,t){if("object"==typeof e&&null!==e){if(!t)return e;if(e.id&&(e.id===t||"#"===e.id[0]&&e.id.substring(1)===t))return e;var n,i;if(Array.isArray(e)){for(n=e.length;n--;)if(i=a(e[n],t))return i}else{var r=Object.keys(e);for(n=r.length;n--;){var o=r[n];if(0!==o.indexOf("__$")&&(i=a(e[o],t)))return i}}}}var s=e("./Report"),l=e("./SchemaCompilation"),u=e("./SchemaValidation"),c=e("./Utils");n.cacheSchemaByUri=function(e,t){var n=r(e);n&&(this.cache[n]=t)},n.removeFromCacheByUri=function(e){var t=r(e);t&&delete this.cache[t]},n.checkCacheForUri=function(e){var t=r(e);return!!t&&null!=this.cache[t]},n.getSchema=function(e,t){return"object"==typeof t&&(t=n.getSchemaByReference.call(this,e,t)),"string"==typeof t&&(t=n.getSchemaByUri.call(this,e,t)),t},n.getSchemaByReference=function(e,t){for(var n=this.referenceCache.length;n--;)if(this.referenceCache[n][0]===t)return this.referenceCache[n][1];var i=c.cloneDeep(t);return this.referenceCache.push([t,i]),i},n.getSchemaByUri=function(e,t,n){var c=r(t),f=o(t),h=c?this.cache[c]:n;if(h&&c){var d=h!==n;if(d){e.path.push(c);var p=new s(e);l.compileSchema.call(this,p,h)&&u.validateSchema.call(this,p,h);var g=p.isValid();if(g||e.addError("REMOTE_NOT_VALID",[t],p),e.path.pop(),!g)return}}if(h&&f)for(var m=f.split("/"),v=0,y=m.length;h&&y>v;v++){var b=i(m[v]);h=0===v?a(h,b):h[b]}return h},n.getRemotePath=r},{"./Report":11,"./SchemaCompilation":13,"./SchemaValidation":14,"./Utils":15}],13:[function(e,t,n){"use strict";function i(e,t){if(l.isAbsoluteUri(t))return t;var n,i=e.join(""),r=l.isAbsoluteUri(i),o=l.isRelativeUri(i),a=l.isRelativeUri(t);r&&a?(n=i.match(/\/[^\/]*$/),n&&(i=i.slice(0,n.index+1))):o&&a?i="":(n=i.match(/[^#\/]+$/),n&&(i=i.slice(0,n.index)));var s=i+t;return s=s.replace(/##/,"#")}function r(e,t,n,o){if(t=t||[],n=n||[],o=o||[],"object"!=typeof e||null===e)return t;"string"==typeof e.id&&n.push(e.id),"string"==typeof e.$ref&&"undefined"==typeof e.__$refResolved&&t.push({ref:i(n,e.$ref),key:"$ref",obj:e,path:o.slice(0)}),"string"==typeof e.$schema&&"undefined"==typeof e.__$schemaResolved&&t.push({ref:i(n,e.$schema),key:"$schema",obj:e,path:o.slice(0)});var a;if(Array.isArray(e))for(a=e.length;a--;)o.push(a.toString()),r(e[a],t,n,o),o.pop();else{var s=Object.keys(e);for(a=s.length;a--;)0!==s[a].indexOf("__$")&&(o.push(s[a]),r(e[s[a]],t,n,o),o.pop())}return"string"==typeof e.id&&n.pop(),t}function o(e,t){for(var n=e.length;n--;)if(e[n].id===t)return e[n];return null}var a=e("./Report"),s=e("./SchemaCache"),l=e("./Utils"),u=function(e,t){for(var i=t.length,r=0;i--;){var o=new a(e),s=n.compileSchema.call(this,o,t[i]);s&&r++,e.errors=e.errors.concat(o.errors)}return r},c=function(e,t){var n,i=0;do{for(var r=e.errors.length;r--;)"UNRESOLVABLE_REFERENCE"===e.errors[r].code&&e.errors.splice(r,1);for(n=i,i=u.call(this,e,t),r=t.length;r--;){var a=t[r];if(a.__$missingReferences){for(var s=a.__$missingReferences.length;s--;){var l=a.__$missingReferences[s],c=o(t,l.ref);c&&(l.obj["__"+l.key+"Resolved"]=c,a.__$missingReferences.splice(s,1))}0===a.__$missingReferences.length&&delete a.__$missingReferences}}}while(i!==t.length&&i!==n);return e.isValid()};n.compileSchema=function(e,t){if(e.commonErrorMessage="SCHEMA_COMPILATION_FAILED","string"==typeof t){var i=s.getSchemaByUri.call(this,e,t);if(!i)return e.addError("SCHEMA_NOT_REACHABLE",[t]),!1;t=i}if(Array.isArray(t))return c.call(this,e,t);if(t.__$compiled&&t.id&&s.checkCacheForUri.call(this,t.id)===!1&&(t.__$compiled=void 0),t.__$compiled)return!0;t.id&&"string"==typeof t.id&&s.cacheSchemaByUri.call(this,t.id,t);var o=!1;e.rootSchema||(e.rootSchema=t,o=!0);var u=e.isValid();delete t.__$missingReferences;for(var f=r.call(this,t),h=f.length;h--;){var d=f[h],p=s.getSchemaByUri.call(this,e,d.ref,t);if(!p){var g=this.getSchemaReader();if(g){var m=g(d.ref);if(m){m.id=d.ref;var v=new a(e);n.compileSchema.call(this,v,m)?p=s.getSchemaByUri.call(this,e,d.ref,t):e.errors=e.errors.concat(v.errors)}}}if(!p){var y=e.hasError("REMOTE_NOT_VALID",[d.ref]),b=l.isAbsoluteUri(d.ref),_=!1,E=this.options.ignoreUnresolvableReferences===!0;b&&(_=s.checkCacheForUri.call(this,d.ref)),y||E&&b||_||(Array.prototype.push.apply(e.path,d.path),e.addError("UNRESOLVABLE_REFERENCE",[d.ref]),e.path=e.path.slice(0,-d.path.length),u&&(t.__$missingReferences=t.__$missingReferences||[],t.__$missingReferences.push(d)))}d.obj["__"+d.key+"Resolved"]=p}var x=e.isValid();return x?t.__$compiled=!0:t.id&&"string"==typeof t.id&&s.removeFromCacheByUri.call(this,t.id),o&&(e.rootSchema=void 0),x}},{"./Report":11,"./SchemaCache":12,"./Utils":15}],14:[function(e,t,n){"use strict";var i=e("./FormatValidators"),r=e("./JsonValidation"),o=e("./Report"),a=e("./Utils"),s={$ref:function(e,t){"string"!=typeof t.$ref&&e.addError("KEYWORD_TYPE_EXPECTED",["$ref","string"])},$schema:function(e,t){"string"!=typeof t.$schema&&e.addError("KEYWORD_TYPE_EXPECTED",["$schema","string"])},multipleOf:function(e,t){"number"!=typeof t.multipleOf?e.addError("KEYWORD_TYPE_EXPECTED",["multipleOf","number"]):t.multipleOf<=0&&e.addError("KEYWORD_MUST_BE",["multipleOf","strictly greater than 0"])},maximum:function(e,t){"number"!=typeof t.maximum&&e.addError("KEYWORD_TYPE_EXPECTED",["maximum","number"])},exclusiveMaximum:function(e,t){"boolean"!=typeof t.exclusiveMaximum?e.addError("KEYWORD_TYPE_EXPECTED",["exclusiveMaximum","boolean"]):void 0===t.maximum&&e.addError("KEYWORD_DEPENDENCY",["exclusiveMaximum","maximum"])},minimum:function(e,t){"number"!=typeof t.minimum&&e.addError("KEYWORD_TYPE_EXPECTED",["minimum","number"])},exclusiveMinimum:function(e,t){"boolean"!=typeof t.exclusiveMinimum?e.addError("KEYWORD_TYPE_EXPECTED",["exclusiveMinimum","boolean"]):void 0===t.minimum&&e.addError("KEYWORD_DEPENDENCY",["exclusiveMinimum","minimum"])},maxLength:function(e,t){"integer"!==a.whatIs(t.maxLength)?e.addError("KEYWORD_TYPE_EXPECTED",["maxLength","integer"]):t.maxLength<0&&e.addError("KEYWORD_MUST_BE",["maxLength","greater than, or equal to 0"])},minLength:function(e,t){"integer"!==a.whatIs(t.minLength)?e.addError("KEYWORD_TYPE_EXPECTED",["minLength","integer"]):t.minLength<0&&e.addError("KEYWORD_MUST_BE",["minLength","greater than, or equal to 0"])},pattern:function(e,t){if("string"!=typeof t.pattern)e.addError("KEYWORD_TYPE_EXPECTED",["pattern","string"]);else try{RegExp(t.pattern)}catch(n){e.addError("KEYWORD_PATTERN",["pattern",t.pattern])}},additionalItems:function(e,t){var i=a.whatIs(t.additionalItems);"boolean"!==i&&"object"!==i?e.addError("KEYWORD_TYPE_EXPECTED",["additionalItems",["boolean","object"]]):"object"===i&&(e.path.push("additionalItems"),n.validateSchema.call(this,e,t.additionalItems),e.path.pop())},items:function(e,t){var i=a.whatIs(t.items);if("object"===i)e.path.push("items"),n.validateSchema.call(this,e,t.items),e.path.pop();else if("array"===i)for(var r=t.items.length;r--;)e.path.push("items"),e.path.push(r.toString()),n.validateSchema.call(this,e,t.items[r]),e.path.pop(),e.path.pop();else e.addError("KEYWORD_TYPE_EXPECTED",["items",["array","object"]]);this.options.forceAdditional===!0&&void 0===t.additionalItems&&Array.isArray(t.items)&&e.addError("KEYWORD_UNDEFINED_STRICT",["additionalItems"]),this.options.assumeAdditional&&void 0===t.additionalItems&&Array.isArray(t.items)&&(t.additionalItems=!1)},maxItems:function(e,t){"number"!=typeof t.maxItems?e.addError("KEYWORD_TYPE_EXPECTED",["maxItems","integer"]):t.maxItems<0&&e.addError("KEYWORD_MUST_BE",["maxItems","greater than, or equal to 0"]);
},minItems:function(e,t){"integer"!==a.whatIs(t.minItems)?e.addError("KEYWORD_TYPE_EXPECTED",["minItems","integer"]):t.minItems<0&&e.addError("KEYWORD_MUST_BE",["minItems","greater than, or equal to 0"])},uniqueItems:function(e,t){"boolean"!=typeof t.uniqueItems&&e.addError("KEYWORD_TYPE_EXPECTED",["uniqueItems","boolean"])},maxProperties:function(e,t){"integer"!==a.whatIs(t.maxProperties)?e.addError("KEYWORD_TYPE_EXPECTED",["maxProperties","integer"]):t.maxProperties<0&&e.addError("KEYWORD_MUST_BE",["maxProperties","greater than, or equal to 0"])},minProperties:function(e,t){"integer"!==a.whatIs(t.minProperties)?e.addError("KEYWORD_TYPE_EXPECTED",["minProperties","integer"]):t.minProperties<0&&e.addError("KEYWORD_MUST_BE",["minProperties","greater than, or equal to 0"])},required:function(e,t){if("array"!==a.whatIs(t.required))e.addError("KEYWORD_TYPE_EXPECTED",["required","array"]);else if(0===t.required.length)e.addError("KEYWORD_MUST_BE",["required","an array with at least one element"]);else{for(var n=t.required.length;n--;)"string"!=typeof t.required[n]&&e.addError("KEYWORD_VALUE_TYPE",["required","string"]);a.isUniqueArray(t.required)===!1&&e.addError("KEYWORD_MUST_BE",["required","an array with unique items"])}},additionalProperties:function(e,t){var i=a.whatIs(t.additionalProperties);"boolean"!==i&&"object"!==i?e.addError("KEYWORD_TYPE_EXPECTED",["additionalProperties",["boolean","object"]]):"object"===i&&(e.path.push("additionalProperties"),n.validateSchema.call(this,e,t.additionalProperties),e.path.pop())},properties:function(e,t){if("object"!==a.whatIs(t.properties))return void e.addError("KEYWORD_TYPE_EXPECTED",["properties","object"]);for(var i=Object.keys(t.properties),r=i.length;r--;){var o=i[r],s=t.properties[o];e.path.push("properties"),e.path.push(o),n.validateSchema.call(this,e,s),e.path.pop(),e.path.pop()}this.options.forceAdditional===!0&&void 0===t.additionalProperties&&e.addError("KEYWORD_UNDEFINED_STRICT",["additionalProperties"]),this.options.assumeAdditional&&void 0===t.additionalProperties&&(t.additionalProperties=!1),this.options.forceProperties===!0&&0===i.length&&e.addError("CUSTOM_MODE_FORCE_PROPERTIES",["properties"])},patternProperties:function(e,t){if("object"!==a.whatIs(t.patternProperties))return void e.addError("KEYWORD_TYPE_EXPECTED",["patternProperties","object"]);for(var i=Object.keys(t.patternProperties),r=i.length;r--;){var o=i[r],s=t.patternProperties[o];try{RegExp(o)}catch(l){e.addError("KEYWORD_PATTERN",["patternProperties",o])}e.path.push("patternProperties"),e.path.push(o.toString()),n.validateSchema.call(this,e,s),e.path.pop(),e.path.pop()}this.options.forceProperties===!0&&0===i.length&&e.addError("CUSTOM_MODE_FORCE_PROPERTIES",["patternProperties"])},dependencies:function(e,t){if("object"!==a.whatIs(t.dependencies))e.addError("KEYWORD_TYPE_EXPECTED",["dependencies","object"]);else for(var i=Object.keys(t.dependencies),r=i.length;r--;){var o=i[r],s=t.dependencies[o],l=a.whatIs(s);if("object"===l)e.path.push("dependencies"),e.path.push(o),n.validateSchema.call(this,e,s),e.path.pop(),e.path.pop();else if("array"===l){var u=s.length;for(0===u&&e.addError("KEYWORD_MUST_BE",["dependencies","not empty array"]);u--;)"string"!=typeof s[u]&&e.addError("KEYWORD_VALUE_TYPE",["dependensices","string"]);a.isUniqueArray(s)===!1&&e.addError("KEYWORD_MUST_BE",["dependencies","an array with unique items"])}else e.addError("KEYWORD_VALUE_TYPE",["dependencies","object or array"])}},"enum":function(e,t){Array.isArray(t["enum"])===!1?e.addError("KEYWORD_TYPE_EXPECTED",["enum","array"]):0===t["enum"].length?e.addError("KEYWORD_MUST_BE",["enum","an array with at least one element"]):a.isUniqueArray(t["enum"])===!1&&e.addError("KEYWORD_MUST_BE",["enum","an array with unique elements"])},type:function(e,t){var n=["array","boolean","integer","number","null","object","string"],i=n.join(","),r=Array.isArray(t.type);if(r){for(var o=t.type.length;o--;)-1===n.indexOf(t.type[o])&&e.addError("KEYWORD_TYPE_EXPECTED",["type",i]);a.isUniqueArray(t.type)===!1&&e.addError("KEYWORD_MUST_BE",["type","an object with unique properties"])}else"string"==typeof t.type?-1===n.indexOf(t.type)&&e.addError("KEYWORD_TYPE_EXPECTED",["type",i]):e.addError("KEYWORD_TYPE_EXPECTED",["type",["string","array"]]);this.options.noEmptyStrings===!0&&("string"===t.type||r&&-1!==t.type.indexOf("string"))&&void 0===t.minLength&&void 0===t["enum"]&&void 0===t.format&&(t.minLength=1),this.options.noEmptyArrays===!0&&("array"===t.type||r&&-1!==t.type.indexOf("array"))&&void 0===t.minItems&&(t.minItems=1),this.options.forceProperties===!0&&("object"===t.type||r&&-1!==t.type.indexOf("object"))&&void 0===t.properties&&void 0===t.patternProperties&&e.addError("KEYWORD_UNDEFINED_STRICT",["properties"]),this.options.forceItems===!0&&("array"===t.type||r&&-1!==t.type.indexOf("array"))&&void 0===t.items&&e.addError("KEYWORD_UNDEFINED_STRICT",["items"]),this.options.forceMinItems===!0&&("array"===t.type||r&&-1!==t.type.indexOf("array"))&&void 0===t.minItems&&e.addError("KEYWORD_UNDEFINED_STRICT",["minItems"]),this.options.forceMaxItems===!0&&("array"===t.type||r&&-1!==t.type.indexOf("array"))&&void 0===t.maxItems&&e.addError("KEYWORD_UNDEFINED_STRICT",["maxItems"]),this.options.forceMinLength===!0&&("string"===t.type||r&&-1!==t.type.indexOf("string"))&&void 0===t.minLength&&void 0===t.format&&void 0===t["enum"]&&void 0===t.pattern&&e.addError("KEYWORD_UNDEFINED_STRICT",["minLength"]),this.options.forceMaxLength===!0&&("string"===t.type||r&&-1!==t.type.indexOf("string"))&&void 0===t.maxLength&&void 0===t.format&&void 0===t["enum"]&&void 0===t.pattern&&e.addError("KEYWORD_UNDEFINED_STRICT",["maxLength"])},allOf:function(e,t){if(Array.isArray(t.allOf)===!1)e.addError("KEYWORD_TYPE_EXPECTED",["allOf","array"]);else if(0===t.allOf.length)e.addError("KEYWORD_MUST_BE",["allOf","an array with at least one element"]);else for(var i=t.allOf.length;i--;)e.path.push("allOf"),e.path.push(i.toString()),n.validateSchema.call(this,e,t.allOf[i]),e.path.pop(),e.path.pop()},anyOf:function(e,t){if(Array.isArray(t.anyOf)===!1)e.addError("KEYWORD_TYPE_EXPECTED",["anyOf","array"]);else if(0===t.anyOf.length)e.addError("KEYWORD_MUST_BE",["anyOf","an array with at least one element"]);else for(var i=t.anyOf.length;i--;)e.path.push("anyOf"),e.path.push(i.toString()),n.validateSchema.call(this,e,t.anyOf[i]),e.path.pop(),e.path.pop()},oneOf:function(e,t){if(Array.isArray(t.oneOf)===!1)e.addError("KEYWORD_TYPE_EXPECTED",["oneOf","array"]);else if(0===t.oneOf.length)e.addError("KEYWORD_MUST_BE",["oneOf","an array with at least one element"]);else for(var i=t.oneOf.length;i--;)e.path.push("oneOf"),e.path.push(i.toString()),n.validateSchema.call(this,e,t.oneOf[i]),e.path.pop(),e.path.pop()},not:function(e,t){"object"!==a.whatIs(t.not)?e.addError("KEYWORD_TYPE_EXPECTED",["not","object"]):(e.path.push("not"),n.validateSchema.call(this,e,t.not),e.path.pop())},definitions:function(e,t){if("object"!==a.whatIs(t.definitions))e.addError("KEYWORD_TYPE_EXPECTED",["definitions","object"]);else for(var i=Object.keys(t.definitions),r=i.length;r--;){var o=i[r],s=t.definitions[o];e.path.push("definitions"),e.path.push(o),n.validateSchema.call(this,e,s),e.path.pop(),e.path.pop()}},format:function(e,t){"string"!=typeof t.format?e.addError("KEYWORD_TYPE_EXPECTED",["format","string"]):void 0===i[t.format]&&this.options.ignoreUnknownFormats!==!0&&e.addError("UNKNOWN_FORMAT",[t.format])},id:function(e,t){"string"!=typeof t.id&&e.addError("KEYWORD_TYPE_EXPECTED",["id","string"])},title:function(e,t){"string"!=typeof t.title&&e.addError("KEYWORD_TYPE_EXPECTED",["title","string"])},description:function(e,t){"string"!=typeof t.description&&e.addError("KEYWORD_TYPE_EXPECTED",["description","string"])},"default":function(){}},l=function(e,t){for(var i=t.length;i--;)n.validateSchema.call(this,e,t[i]);return e.isValid()};n.validateSchema=function(e,t){if(e.commonErrorMessage="SCHEMA_VALIDATION_FAILED",Array.isArray(t))return l.call(this,e,t);if(t.__$validated)return!0;var n=t.$schema&&t.id!==t.$schema;if(n)if(t.__$schemaResolved&&t.__$schemaResolved!==t){var i=new o(e),u=r.validate.call(this,i,t.__$schemaResolved,t);u===!1&&e.addError("PARENT_SCHEMA_VALIDATION_FAILED",null,i)}else this.options.ignoreUnresolvableReferences!==!0&&e.addError("REF_UNRESOLVED",[t.$schema]);if(this.options.noTypeless===!0){if(void 0!==t.type){var c=[];Array.isArray(t.anyOf)&&(c=c.concat(t.anyOf)),Array.isArray(t.oneOf)&&(c=c.concat(t.oneOf)),Array.isArray(t.allOf)&&(c=c.concat(t.allOf)),c.forEach(function(e){e.type||(e.type=t.type)})}void 0===t["enum"]&&void 0===t.type&&void 0===t.anyOf&&void 0===t.oneOf&&void 0===t.not&&void 0===t.$ref&&e.addError("KEYWORD_UNDEFINED_STRICT",["type"])}for(var f=Object.keys(t),h=f.length;h--;){var d=f[h];0!==d.indexOf("__")&&(void 0!==s[d]?s[d].call(this,e,t):n||this.options.noExtraKeywords===!0&&e.addError("KEYWORD_UNEXPECTED",[d]))}if(this.options.pedanticCheck===!0){if(t["enum"]){var p=a.clone(t);for(delete p["enum"],delete p["default"],e.path.push("enum"),h=t["enum"].length;h--;)e.path.push(h.toString()),r.validate.call(this,e,p,t["enum"][h]),e.path.pop();e.path.pop()}t["default"]&&(e.path.push("default"),r.validate.call(this,e,t,t["default"]),e.path.pop())}var g=e.isValid();return g&&(t.__$validated=!0),g}},{"./FormatValidators":8,"./JsonValidation":9,"./Report":11,"./Utils":15}],15:[function(e,t,n){"use strict";n.isAbsoluteUri=function(e){return/^https?:\/\//.test(e)},n.isRelativeUri=function(e){return/.+#/.test(e)},n.whatIs=function(e){var t=typeof e;return"object"===t?null===e?"null":Array.isArray(e)?"array":"object":"number"===t?Number.isFinite(e)?e%1===0?"integer":"number":Number.isNaN(e)?"not-a-number":"unknown-number":t},n.areEqual=function i(e,t){if(e===t)return!0;var r,o;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(o=e.length,r=0;o>r;r++)if(!i(e[r],t[r]))return!1;return!0}if("object"===n.whatIs(e)&&"object"===n.whatIs(t)){var a=Object.keys(e),s=Object.keys(t);if(!i(a,s))return!1;for(o=a.length,r=0;o>r;r++)if(!i(e[a[r]],t[a[r]]))return!1;return!0}return!1},n.isUniqueArray=function(e,t){var i,r,o=e.length;for(i=0;o>i;i++)for(r=i+1;o>r;r++)if(n.areEqual(e[i],e[r]))return t&&t.push(i,r),!1;return!0},n.difference=function(e,t){for(var n=[],i=e.length;i--;)-1===t.indexOf(e[i])&&n.push(e[i]);return n},n.clone=function(e){if("undefined"!=typeof e){if("object"!=typeof e||null===e)return e;var t,n;if(Array.isArray(e))for(t=[],n=e.length;n--;)t[n]=e[n];else{t={};var i=Object.keys(e);for(n=i.length;n--;){var r=i[n];t[r]=e[r]}}return t}},n.cloneDeep=function(e){function t(e){if("object"!=typeof e||null===e)return e;var r,o,a;if(a=n.indexOf(e),-1!==a)return i[a];if(n.push(e),Array.isArray(e))for(r=[],i.push(r),o=e.length;o--;)r[o]=t(e[o]);else{r={},i.push(r);var s=Object.keys(e);for(o=s.length;o--;){var l=s[o];r[l]=t(e[l])}}return r}var n=[],i=[];return t(e)},n.ucs2decode=function(e){for(var t,n,i=[],r=0,o=e.length;o>r;)t=e.charCodeAt(r++),t>=55296&&56319>=t&&o>r?(n=e.charCodeAt(r++),56320==(64512&n)?i.push(((1023&t)<<10)+(1023&n)+65536):(i.push(t),r--)):i.push(t);return i}},{}],16:[function(e,t,n){(function(n){"use strict";function i(e){if(this.cache={},this.referenceCache=[],this.setRemoteReference("http://json-schema.org/draft-04/schema",h),this.setRemoteReference("http://json-schema.org/draft-04/hyper-schema",d),"object"==typeof e){for(var t,n=Object.keys(e),i=n.length;i--;)if(t=n[i],void 0===p[t])throw new Error("Unexpected option passed to constructor: "+t);for(n=Object.keys(p),i=n.length;i--;)t=n[i],void 0===e[t]&&(e[t]=f.clone(p[t]));this.options=e}else this.options=f.clone(p);this.options.strictMode===!0&&(this.options.forceAdditional=!0,this.options.forceItems=!0,this.options.forceMaxLength=!0,this.options.forceProperties=!0,this.options.noExtraKeywords=!0,this.options.noTypeless=!0,this.options.noEmptyStrings=!0,this.options.noEmptyArrays=!0)}e("./Polyfills");var r=e("lodash.get"),o=e("./Report"),a=e("./FormatValidators"),s=e("./JsonValidation"),l=e("./SchemaCache"),u=e("./SchemaCompilation"),c=e("./SchemaValidation"),f=e("./Utils"),h=e("./schemas/schema.json"),d=e("./schemas/hyper-schema.json"),p={asyncTimeout:2e3,forceAdditional:!1,assumeAdditional:!1,forceItems:!1,forceMinItems:!1,forceMaxItems:!1,forceMinLength:!1,forceMaxLength:!1,forceProperties:!1,ignoreUnresolvableReferences:!1,noExtraKeywords:!1,noTypeless:!1,noEmptyStrings:!1,noEmptyArrays:!1,strictUris:!1,strictMode:!1,reportPathAsArray:!1,breakOnFirstError:!0,pedanticCheck:!1,ignoreUnknownFormats:!1};i.prototype.compileSchema=function(e){var t=new o(this.options);return e=l.getSchema.call(this,t,e),u.compileSchema.call(this,t,e),this.lastReport=t,t.isValid()},i.prototype.validateSchema=function(e){if(Array.isArray(e)&&0===e.length)throw new Error(".validateSchema was called with an empty array");var t=new o(this.options);e=l.getSchema.call(this,t,e);var n=u.compileSchema.call(this,t,e);return n&&c.validateSchema.call(this,t,e),this.lastReport=t,t.isValid()},i.prototype.validate=function(e,t,i,a){"function"===f.whatIs(i)&&(a=i,i={}),i||(i={});var h=f.whatIs(t);if("string"!==h&&"object"!==h){var d=new Error("Invalid .validate call - schema must be an string or object but "+h+" was passed!");if(a)return void n.nextTick(function(){a(d,!1)});throw d}var p=!1,g=new o(this.options);if("string"==typeof t){var m=t;if(t=l.getSchema.call(this,g,m),!t)throw new Error("Schema with id '"+m+"' wasn't found in the validator cache!")}else t=l.getSchema.call(this,g,t);var v=!1;p||(v=u.compileSchema.call(this,g,t)),v||(this.lastReport=g,p=!0);var y=!1;if(p||(y=c.validateSchema.call(this,g,t)),y||(this.lastReport=g,p=!0),i.schemaPath&&(g.rootSchema=t,t=r(t,i.schemaPath),!t))throw new Error("Schema path '"+i.schemaPath+"' wasn't found in the schema!");if(p||s.validate.call(this,g,t,e),a)return void g.processAsyncTasks(this.options.asyncTimeout,a);if(g.asyncTasks.length>0)throw new Error("This validation has async tasks and cannot be done in sync mode, please provide callback argument.");return this.lastReport=g,g.isValid()},i.prototype.getLastError=function(){if(0===this.lastReport.errors.length)return null;var e=new Error;return e.name="z-schema validation error",e.message=this.lastReport.commonErrorMessage,e.details=this.lastReport.errors,e},i.prototype.getLastErrors=function(){return this.lastReport&&this.lastReport.errors.length>0?this.lastReport.errors:void 0},i.prototype.getMissingReferences=function(e){e=e||this.lastReport.errors;for(var t=[],n=e.length;n--;){var i=e[n];if("UNRESOLVABLE_REFERENCE"===i.code){var r=i.params[0];-1===t.indexOf(r)&&t.push(r)}i.inner&&(t=t.concat(this.getMissingReferences(i.inner)))}return t},i.prototype.getMissingRemoteReferences=function(){for(var e=this.getMissingReferences(),t=[],n=e.length;n--;){var i=l.getRemotePath(e[n]);i&&-1===t.indexOf(i)&&t.push(i)}return t},i.prototype.setRemoteReference=function(e,t){t="string"==typeof t?JSON.parse(t):f.cloneDeep(t),l.cacheSchemaByUri.call(this,e,t)},i.prototype.getResolvedSchema=function(e){var t=new o(this.options);e=l.getSchema.call(this,t,e),e=f.cloneDeep(e);var n=[],i=function(e){var t,r=f.whatIs(e);if(("object"===r||"array"===r)&&!e.___$visited){if(e.___$visited=!0,n.push(e),e.$ref&&e.__$refResolved){var o=e.__$refResolved,a=e;delete e.$ref,delete e.__$refResolved;for(t in o)o.hasOwnProperty(t)&&(a[t]=o[t])}for(t in e)e.hasOwnProperty(t)&&(0===t.indexOf("__$")?delete e[t]:i(e[t]))}};if(i(e),n.forEach(function(e){delete e.___$visited}),this.lastReport=t,t.isValid())return e;throw this.getLastError()},i.prototype.setSchemaReader=function(e){return i.setSchemaReader(e)},i.prototype.getSchemaReader=function(){return i.schemaReader},i.setSchemaReader=function(e){i.schemaReader=e},i.registerFormat=function(e,t){a[e]=t},i.unregisterFormat=function(e){delete a[e]},i.getRegisteredFormats=function(){return Object.keys(a)},i.getDefaultOptions=function(){return f.cloneDeep(p)},t.exports=i}).call(this,e("_process"))},{"./FormatValidators":8,"./JsonValidation":9,"./Polyfills":10,"./Report":11,"./SchemaCache":12,"./SchemaCompilation":13,"./SchemaValidation":14,"./Utils":15,"./schemas/hyper-schema.json":17,"./schemas/schema.json":18,_process:1,"lodash.get":2}],17:[function(e,t,n){t.exports={$schema:"http://json-schema.org/draft-04/hyper-schema#",id:"http://json-schema.org/draft-04/hyper-schema#",title:"JSON Hyper-Schema",allOf:[{$ref:"http://json-schema.org/draft-04/schema#"}],properties:{additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}]},dependencies:{additionalProperties:{anyOf:[{$ref:"#"},{type:"array"}]}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}]},definitions:{additionalProperties:{$ref:"#"}},patternProperties:{additionalProperties:{$ref:"#"}},properties:{additionalProperties:{$ref:"#"}},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"},links:{type:"array",items:{$ref:"#/definitions/linkDescription"}},fragmentResolution:{type:"string"},media:{type:"object",properties:{type:{description:"A media type, as described in RFC 2046",type:"string"},binaryEncoding:{description:"A content encoding scheme, as described in RFC 2045",type:"string"}}},pathStart:{description:"Instances' URIs must start with this value for this schema to apply to them",type:"string",format:"uri"}},definitions:{schemaArray:{type:"array",items:{$ref:"#"}},linkDescription:{title:"Link Description Object",type:"object",required:["href","rel"],properties:{href:{description:"a URI template, as defined by RFC 6570, with the addition of the $, ( and ) characters for pre-processing",type:"string"},rel:{description:"relation to the target resource of the link",type:"string"},title:{description:"a title for the link",type:"string"},targetSchema:{description:"JSON Schema describing the link target",$ref:"#"},mediaType:{description:"media type (as defined by RFC 2046) describing the link target",type:"string"},method:{description:'method for requesting the target of the link (e.g. for HTTP this might be "GET" or "DELETE")',type:"string"},encType:{description:"The media type in which to submit data along with the request",type:"string","default":"application/json"},schema:{description:"Schema describing the data to submit along with the request",$ref:"#"}}}}}},{}],18:[function(e,t,n){t.exports={id:"http://json-schema.org/draft-04/schema#",$schema:"http://json-schema.org/draft-04/schema#",description:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{"default":0}]},simpleTypes:{"enum":["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},"default":{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean","default":!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean","default":!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],"default":{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],"default":{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean","default":!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],"default":{}},definitions:{type:"object",additionalProperties:{$ref:"#"},"default":{}},properties:{type:"object",additionalProperties:{$ref:"#"},"default":{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},"default":{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},"enum":{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},"default":{}}},{}]},{},[7,8,9,10,11,12,13,14,15,16])(16)});