(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.YASGUI=e()}})(function(){var define,module,exports;return function e(t,n,i){function r(s,a){if(!n[s]){if(!t[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(o)return o(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[s]={exports:{}};t[s][0].call(c.exports,function(e){var n=t[s][1][e];return r(n?n:e)},c,c.exports,e,t,n,i)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function r(e){return 3*e.length/4-i(e)}function o(e){var t,n,r,o,s,a=e.length;o=i(e);s=new f(3*a/4-o);n=o>0?a-4:a;var l=0;for(t=0;t>16&255;s[l++]=r>>8&255;s[l++]=255&r}if(2===o){r=c[e.charCodeAt(t)]<<2|c[e.charCodeAt(t+1)]>>4;s[l++]=255&r}else if(1===o){r=c[e.charCodeAt(t)]<<10|c[e.charCodeAt(t+1)]<<4|c[e.charCodeAt(t+2)]>>2;s[l++]=r>>8&255;s[l++]=255&r}return s}function s(e){return u[e>>18&63]+u[e>>12&63]+u[e>>6&63]+u[63&e]}function a(e,t,n){for(var i,r=[],o=t;oc?c:l+s));if(1===i){t=e[n-1];r+=u[t>>2];r+=u[t<<4&63];r+="=="}else if(2===i){t=(e[n-2]<<8)+e[n-1];r+=u[t>>10];r+=u[t>>4&63];r+=u[t<<2&63];r+="="}o.push(r);return o.join("")}n.byteLength=r;n.toByteArray=o;n.fromByteArray=l;for(var u=[],c=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,d=p.length;h>16)+(t>>16)+(n>>16);return i<<16|65535&n}function i(e,t){return e<>>32-t}function r(e,t,r,o,s,a){return n(i(n(n(t,e),n(o,a)),s),r)}function o(e,t,n,i,o,s,a){return r(t&n|~t&i,e,t,o,s,a)}function s(e,t,n,i,o,s,a){return r(t&i|n&~i,e,t,o,s,a)}function a(e,t,n,i,o,s,a){return r(t^n^i,e,t,o,s,a)}function l(e,t,n,i,o,s,a){return r(n^(t|~i),e,t,o,s,a)}function u(e,t){e[t>>5]|=128<>>9<<4)+14]=t;var i,r,u,c,f,p=1732584193,h=-271733879,d=-1732584194,g=271733878;for(i=0;i>5]>>>t%32&255);return n}function f(e){var t,n=[];n[(e.length>>2)-1]=void 0;for(t=0;t>5]|=(255&e.charCodeAt(t/8))<16&&(r=u(r,8*e.length));for(n=0;n<16;n+=1){o[n]=909522486^r[n];s[n]=1549556828^r[n]}i=u(o.concat(f(t)),512+8*t.length);return c(u(s.concat(i),640))}function d(e){var t,n,i="0123456789abcdef",r="";for(n=0;n>>4&15)+i.charAt(15&t)}return r}function g(e){return unescape(encodeURIComponent(e))}function m(e){return p(g(e))}function v(e){return d(m(e))}function y(e,t){return h(g(e),g(t))}function b(e,t){return d(y(e,t))}function x(e,t,n){return t?n?y(t,e):b(t,e):n?m(e):v(e)}"function"==typeof define&&define.amd?define(function(){return x}):"object"==typeof t&&t.exports?t.exports=x:e.md5=x})(this)},{}],3:[function(e,t,n){},{}],4:[function(e,t,n){arguments[4][3][0].apply(n,arguments)},{dup:3}],5:[function(e,t,n){(function(t){"use strict";function i(){try{var e=new Uint8Array(1);e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}};return 42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}function r(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(r()=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|e}function m(e){+e!=e&&(e=0);return s.alloc(+e)}function v(e,t){if(s.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Z(e).length;default:if(i)return V(e).length;t=(""+t).toLowerCase();i=!0}}function y(e,t,n){var i=!1;(void 0===t||t<0)&&(t=0);if(t>this.length)return"";(void 0===n||n>this.length)&&(n=this.length);if(n<=0)return"";n>>>=0;t>>>=0;if(n<=t)return"";e||(e="utf8");for(;;)switch(e){case"hex":return P(this,t,n);case"utf8":case"utf-8":return I(this,t,n);case"ascii":return R(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return N(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase();i=!0}}function b(e,t,n){var i=e[t];e[t]=e[n];e[n]=i}function x(e,t,n,i,r){if(0===e.length)return-1;if("string"==typeof n){i=n;n=0}else n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648);n=+n;isNaN(n)&&(n=r?0:e.length-1);n<0&&(n=e.length+n);if(n>=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}"string"==typeof t&&(t=s.from(t,i));if(s.isBuffer(t))return 0===t.length?-1:_(e,t,n,i,r);if("number"==typeof t){t=255&t;return s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):_(e,[t],n,i,r)}throw new TypeError("val must be string, number or Buffer")}function _(e,t,n,i,r){function o(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}var s=1,a=e.length,l=t.length;if(void 0!==i){i=String(i).toLowerCase();if("ucs2"===i||"ucs-2"===i||"utf16le"===i||"utf-16le"===i){if(e.length<2||t.length<2)return-1;s=2;a/=2;l/=2;n/=2}}var u;if(r){var c=-1;for(u=n;ua&&(n=a-l);for(u=n;u>=0;u--){for(var f=!0,p=0;pr&&(i=r)}else i=r;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");i>o/2&&(i=o/2);for(var s=0;s239?4:o>223?3:o>191?2:1;if(r+a<=n){var l,u,c,f;switch(a){case 1:o<128&&(s=o);break;case 2:l=e[r+1];if(128===(192&l)){f=(31&o)<<6|63&l;f>127&&(s=f)}break;case 3:l=e[r+1];u=e[r+2];if(128===(192&l)&&128===(192&u)){f=(15&o)<<12|(63&l)<<6|63&u;f>2047&&(f<55296||f>57343)&&(s=f)}break;case 4:l=e[r+1];u=e[r+2];c=e[r+3];if(128===(192&l)&&128===(192&u)&&128===(192&c)){f=(15&o)<<18|(63&l)<<12|(63&u)<<6|63&c;f>65535&&f<1114112&&(s=f)}}}if(null===s){s=65533;a=1}else if(s>65535){s-=65536;i.push(s>>>10&1023|55296);s=56320|1023&s}i.push(s);r+=a}return A(i)}function A(e){var t=e.length;if(t<=ee)return String.fromCharCode.apply(String,e);for(var n="",i=0;ii)&&(n=i);for(var r="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,n,i,r,o){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||te.length)throw new RangeError("Index out of range")}function j(e,t,n,i){t<0&&(t=65535+t+1);for(var r=0,o=Math.min(e.length-n,2);r>>8*(i?r:1-r)}function B(e,t,n,i){t<0&&(t=4294967295+t+1);for(var r=0,o=Math.min(e.length-n,4);r>>8*(i?r:3-r)&255}function q(e,t,n,i,r,o){if(n+i>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function F(e,t,n,i,r){r||q(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38);Q.write(e,t,n,i,23,4);return n+4}function U(e,t,n,i,r){r||q(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308);Q.write(e,t,n,i,52,8);return n+8}function G(e){e=z(e).replace(te,"");if(e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function z(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function H(e){return e<16?"0"+e.toString(16):e.toString(16)}function V(e,t){t=t||1/0;for(var n,i=e.length,r=null,o=[],s=0;s55295&&n<57344){if(!r){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===i){(t-=3)>-1&&o.push(239,191,189);continue}r=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189);r=n;continue}n=(r-55296<<10|n-56320)+65536}else r&&(t-=3)>-1&&o.push(239,191,189);r=null;if(n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function W(e){for(var t=[],n=0;n>8;r=n%256;o.push(r);o.push(i)}return o}function Z(e){return X.toByteArray(G(e))}function $(e,t,n,i){for(var r=0;r=t.length||r>=e.length);++r)t[r+n]=e[r];return r}function K(e){return e!==e}var X=e("base64-js"),Q=e("ieee754"),J=e("isarray");n.Buffer=s;n.SlowBuffer=m;n.INSPECT_MAX_BYTES=50;s.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:i();n.kMaxLength=r();s.poolSize=8192;s._augment=function(e){e.__proto__=s.prototype;return e};s.from=function(e,t,n){return a(null,e,t,n)};if(s.TYPED_ARRAY_SUPPORT){s.prototype.__proto__=Uint8Array.prototype;s.__proto__=Uint8Array;"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})}s.alloc=function(e,t,n){return u(null,e,t,n)};s.allocUnsafe=function(e){return c(null,e)};s.allocUnsafeSlow=function(e){return c(null,e)};s.isBuffer=function(e){return!(null==e||!e._isBuffer)};s.compare=function(e,t){if(!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,r=0,o=Math.min(n,i);r0){e=this.toString("hex",0,t).match(/.{2}/g).join(" ");this.length>t&&(e+=" ... ")}return""};s.prototype.compare=function(e,t,n,i,r){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");void 0===t&&(t=0);void 0===n&&(n=e?e.length:0);void 0===i&&(i=0);void 0===r&&(r=this.length);if(t<0||n>e.length||i<0||r>this.length)throw new RangeError("out of range index");if(i>=r&&t>=n)return 0;if(i>=r)return-1;if(t>=n)return 1;t>>>=0;n>>>=0;i>>>=0;r>>>=0;if(this===e)return 0;for(var o=r-i,a=n-t,l=Math.min(o,a),u=this.slice(i,r),c=e.slice(t,n),f=0;fr)&&(n=r);if(e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return E(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return T(this,e,t,n);case"latin1":case"binary":return S(this,e,t,n);case"base64":return C(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase();o=!0}};s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ee=4096;s.prototype.slice=function(e,t){var n=this.length;e=~~e;t=void 0===t?n:~~t;if(e<0){e+=n;e<0&&(e=0)}else e>n&&(e=n);if(t<0){t+=n;t<0&&(t=0)}else t>n&&(t=n);t0&&(r*=256);)i+=this[e+--t]*r;return i};s.prototype.readUInt8=function(e,t){t||M(e,1,this.length);return this[e]};s.prototype.readUInt16LE=function(e,t){t||M(e,2,this.length);return this[e]|this[e+1]<<8};s.prototype.readUInt16BE=function(e,t){t||M(e,2,this.length);return this[e]<<8|this[e+1]};s.prototype.readUInt32LE=function(e,t){t||M(e,4,this.length);return(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]};s.prototype.readUInt32BE=function(e,t){t||M(e,4,this.length);return 16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])};s.prototype.readIntLE=function(e,t,n){e=0|e;t=0|t;n||M(e,t,this.length);for(var i=this[e],r=1,o=0;++o=r&&(i-=Math.pow(2,8*t));return i};s.prototype.readIntBE=function(e,t,n){e=0|e;t=0|t;n||M(e,t,this.length);for(var i=t,r=1,o=this[e+--i];i>0&&(r*=256);)o+=this[e+--i]*r;r*=128;o>=r&&(o-=Math.pow(2,8*t));return o};s.prototype.readInt8=function(e,t){t||M(e,1,this.length);return 128&this[e]?(255-this[e]+1)*-1:this[e]};s.prototype.readInt16LE=function(e,t){t||M(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n};s.prototype.readInt16BE=function(e,t){t||M(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n};s.prototype.readInt32LE=function(e,t){t||M(e,4,this.length);return this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};s.prototype.readInt32BE=function(e,t){t||M(e,4,this.length);return this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};s.prototype.readFloatLE=function(e,t){t||M(e,4,this.length);return Q.read(this,e,!0,23,4)};s.prototype.readFloatBE=function(e,t){t||M(e,4,this.length);return Q.read(this,e,!1,23,4)};s.prototype.readDoubleLE=function(e,t){t||M(e,8,this.length);return Q.read(this,e,!0,52,8)};s.prototype.readDoubleBE=function(e,t){t||M(e,8,this.length);return Q.read(this,e,!1,52,8)};s.prototype.writeUIntLE=function(e,t,n,i){e=+e;t=0|t;n=0|n;if(!i){var r=Math.pow(2,8*n)-1;D(this,e,t,n,r,0)}var o=1,s=0;this[t]=255&e;for(;++s=0&&(s*=256);)this[t+o]=e/s&255;return t+n};s.prototype.writeUInt8=function(e,t,n){e=+e;t=0|t;n||D(this,e,t,1,255,0);s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e));this[t]=255&e;return t+1};s.prototype.writeUInt16LE=function(e,t,n){e=+e;t=0|t;n||D(this,e,t,2,65535,0);if(s.TYPED_ARRAY_SUPPORT){this[t]=255&e;this[t+1]=e>>>8}else j(this,e,t,!0);return t+2};s.prototype.writeUInt16BE=function(e,t,n){e=+e;t=0|t;n||D(this,e,t,2,65535,0);if(s.TYPED_ARRAY_SUPPORT){this[t]=e>>>8;this[t+1]=255&e}else j(this,e,t,!1);return t+2};s.prototype.writeUInt32LE=function(e,t,n){e=+e;t=0|t;n||D(this,e,t,4,4294967295,0);if(s.TYPED_ARRAY_SUPPORT){this[t+3]=e>>>24;this[t+2]=e>>>16;this[t+1]=e>>>8;this[t]=255&e}else B(this,e,t,!0);return t+4};s.prototype.writeUInt32BE=function(e,t,n){e=+e;t=0|t;n||D(this,e,t,4,4294967295,0);if(s.TYPED_ARRAY_SUPPORT){this[t]=e>>>24;this[t+1]=e>>>16;this[t+2]=e>>>8;this[t+3]=255&e}else B(this,e,t,!1);return t+4};s.prototype.writeIntLE=function(e,t,n,i){e=+e;t=0|t;if(!i){var r=Math.pow(2,8*n-1);D(this,e,t,n,r-1,-r)}var o=0,s=1,a=0;this[t]=255&e;for(;++o>0)-a&255}return t+n};s.prototype.writeIntBE=function(e,t,n,i){e=+e;t=0|t;if(!i){var r=Math.pow(2,8*n-1);D(this,e,t,n,r-1,-r)}var o=n-1,s=1,a=0;this[t+o]=255&e;for(;--o>=0&&(s*=256);){e<0&&0===a&&0!==this[t+o+1]&&(a=1);this[t+o]=(e/s>>0)-a&255}return t+n};s.prototype.writeInt8=function(e,t,n){e=+e;t=0|t;n||D(this,e,t,1,127,-128);s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e));e<0&&(e=255+e+1);this[t]=255&e;return t+1};s.prototype.writeInt16LE=function(e,t,n){e=+e;t=0|t;n||D(this,e,t,2,32767,-32768);if(s.TYPED_ARRAY_SUPPORT){this[t]=255&e;this[t+1]=e>>>8}else j(this,e,t,!0);return t+2};s.prototype.writeInt16BE=function(e,t,n){e=+e;t=0|t;n||D(this,e,t,2,32767,-32768);if(s.TYPED_ARRAY_SUPPORT){this[t]=e>>>8;this[t+1]=255&e}else j(this,e,t,!1);return t+2};s.prototype.writeInt32LE=function(e,t,n){e=+e;t=0|t;n||D(this,e,t,4,2147483647,-2147483648);if(s.TYPED_ARRAY_SUPPORT){this[t]=255&e;this[t+1]=e>>>8;this[t+2]=e>>>16;this[t+3]=e>>>24}else B(this,e,t,!0);return t+4};s.prototype.writeInt32BE=function(e,t,n){e=+e;t=0|t;n||D(this,e,t,4,2147483647,-2147483648);e<0&&(e=4294967295+e+1);if(s.TYPED_ARRAY_SUPPORT){this[t]=e>>>24;this[t+1]=e>>>16;this[t+2]=e>>>8;this[t+3]=255&e}else B(this,e,t,!1);return t+4};s.prototype.writeFloatLE=function(e,t,n){return F(this,e,t,!0,n)};s.prototype.writeFloatBE=function(e,t,n){return F(this,e,t,!1,n)};s.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)};s.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)};s.prototype.copy=function(e,t,n,i){n||(n=0);i||0===i||(i=this.length);t>=e.length&&(t=e.length);t||(t=0);i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length);e.length-t=0;--r)e[r+t]=this[r+n];else if(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(r=0;r>>=0;n=void 0===n?this.length:n>>>0;e||(e=0);var o;if("number"==typeof e)for(o=t;o=0&&a[o.text.charAt(l)]||a[o.text.charAt(++l)];if(!u)return null;var c=">"==u.charAt(1)?1:-1;if(i&&c>0!=(l==t.ch))return null;var f=e.getTokenTypeAt(s(t.line,l+1)),p=n(e,s(t.line,l+(c>0?1:0)),c,f||null,r);return null==p?null:{from:s(t.line,l),to:p&&p.pos,match:p&&p.ch==u.charAt(0),forward:c>0}}function n(e,t,n,i,r){for(var o=r&&r.maxScanLineLength||1e4,l=r&&r.maxScanLines||1e3,u=[],c=r&&r.bracketRegex?r.bracketRegex:/[(){}[\]]/,f=n>0?Math.min(t.line+l,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-l),p=t.line;p!=f;p+=n){var h=e.getLine(p);if(h){var d=n>0?0:h.length-1,g=n>0?h.length:-1;if(!(h.length>o)){p==t.line&&(d=t.ch-(n<0?1:0));for(;d!=g;d+=n){var m=h.charAt(d);if(c.test(m)&&(void 0===i||e.getTokenTypeAt(s(p,d+1))==i)){var v=a[m];if(">"==v.charAt(1)==n>0)u.push(m);else{if(!u.length)return{pos:s(p,d),ch:m};u.pop()}}}}}}return p-n!=(n>0?e.lastLine():e.firstLine())&&null}function i(e,n,i){for(var r=e.state.matchBrackets.maxHighlightLineLength||1e3,a=[],l=e.listSelections(),u=0;u",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},l=null;e.defineOption("matchBrackets",!1,function(t,n,i){i&&i!=e.Init&&t.off("cursorActivity",r);if(n){t.state.matchBrackets="object"==typeof n?n:{};t.on("cursorActivity",r)}});e.defineExtension("matchBrackets",function(){i(this,!0)});e.defineExtension("findMatchingBracket",function(e,n,i){return t(this,e,n,i)});e.defineExtension("scanForBracket",function(e,t,i,r){return n(this,e,t,i,r)})})},{"../../lib/codemirror":17}],10:[function(e,t,n){(function(i){"object"==typeof n&&"object"==typeof t?i(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(e){"use strict";e.registerHelper("fold","brace",function(t,n){function i(i){for(var a=n.ch,l=0;;){var u=a<=0?-1:s.lastIndexOf(i,a-1);if(u!=-1){if(1==l&&ut.lastLine())return null;var i=t.getTokenAt(e.Pos(n,1));/\S/.test(i.string)||(i=t.getTokenAt(e.Pos(n,i.end+1)));if("keyword"!=i.type||"import"!=i.string)return null;for(var r=n,o=Math.min(t.lastLine(),n+10);r<=o;++r){var s=t.getLine(r),a=s.indexOf(";");if(a!=-1)return{startCh:i.end,end:e.Pos(r,a)}}}var r,o=n.line,s=i(o);if(!s||i(o-1)||(r=i(o-2))&&r.end.line==o-1)return null;for(var a=s.end;;){var l=i(a.line+1);if(null==l)break;a=l.end}return{from:t.clipPos(e.Pos(o,s.startCh+1)),to:a}});e.registerHelper("fold","include",function(t,n){function i(n){if(nt.lastLine())return null;var i=t.getTokenAt(e.Pos(n,1));/\S/.test(i.string)||(i=t.getTokenAt(e.Pos(n,i.end+1)));return"meta"==i.type&&"#include"==i.string.slice(0,8)?i.start+8:void 0}var r=n.line,o=i(r);if(null==o||null!=i(r-1))return null;for(var s=r;;){var a=i(s+1);if(null==a)break;++s}return{from:e.Pos(r,o+1),to:t.clipPos(e.Pos(s))}})})},{"../../lib/codemirror":17}],11:[function(e,t,n){(function(i){"object"==typeof n&&"object"==typeof t?i(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(e){"use strict";function t(t,r,o,s){function a(e){var n=l(t,r);if(!n||n.to.line-n.from.linet.firstLine();){r=e.Pos(r.line-1,0);c=a(!1)}if(c&&!c.cleared&&"unfold"!==s){var f=n(t,o);e.on(f,"mousedown",function(t){p.clear();e.e_preventDefault(t)});var p=t.markText(c.from,c.to,{replacedWith:f,clearOnEnter:i(t,o,"clearOnEnter"),__isFold:!0});p.on("clear",function(n,i){e.signal(t,"unfold",t,n,i)});e.signal(t,"fold",t,c.from,c.to)}}function n(e,t){var n=i(e,t,"widget");if("string"==typeof n){var r=document.createTextNode(n);n=document.createElement("span");n.appendChild(r);n.className="CodeMirror-foldmarker"}return n}function i(e,t,n){if(t&&void 0!==t[n])return t[n];var i=e.options.foldOptions;return i&&void 0!==i[n]?i[n]:r[n]}e.newFoldFunction=function(e,n){return function(i,r){t(i,r,{rangeFinder:e,widget:n})}};e.defineExtension("foldCode",function(e,n,i){t(this,e,n,i)});e.defineExtension("isFolded",function(e){for(var t=this.findMarksAt(e),n=0;n=a&&(n=r(o.indicatorOpen))}e.setGutterMarker(t,o.gutter,n);++s})}function s(e){var t=e.getViewport(),n=e.state.foldGutter;if(n){e.operation(function(){o(e,t.from,t.to)});n.from=t.from;n.to=t.to}}function a(e,t,n){var r=e.state.foldGutter;if(r){var o=r.options;if(n==o.gutter){var s=i(e,t);s?s.clear():e.foldCode(f(t,0),o.rangeFinder)}}}function l(e){var t=e.state.foldGutter;if(t){var n=t.options;t.from=t.to=0;clearTimeout(t.changeUpdate);t.changeUpdate=setTimeout(function(){s(e)},n.foldOnChangeTimeSpan||600)}}function u(e){var t=e.state.foldGutter;if(t){var n=t.options;clearTimeout(t.changeUpdate);t.changeUpdate=setTimeout(function(){var n=e.getViewport();t.from==t.to||n.from-t.to>20||t.from-n.to>20?s(e):e.operation(function(){if(n.fromt.to){o(e,t.to,n.to);t.to=n.to}})},n.updateViewportTimeSpan||400)}}function c(e,t){var n=e.state.foldGutter;if(n){var i=t.line;i>=n.from&&i=e.max)){e.ch=0;e.text=e.cm.getLine(++e.line);return!0}}function o(e){if(!(e.line<=e.min)){e.text=e.cm.getLine(--e.line);e.ch=e.text.length;return!0}}function s(e){for(;;){var t=e.text.indexOf(">",e.ch);if(t==-1){if(r(e))continue;return}if(i(e,t+1)){var n=e.text.lastIndexOf("/",t),o=n>-1&&!/\S/.test(e.text.slice(n+1,t));e.ch=t+1;return o?"selfClose":"regular"}e.ch=t+1}}function a(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(t==-1){if(o(e))continue;return}if(i(e,t+1)){g.lastIndex=t;e.ch=t;var n=g.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function l(e){for(;;){g.lastIndex=e.ch;var t=g.exec(e.text);if(!t){if(r(e))continue;return}if(i(e,t.index+1)){e.ch=t.index+t[0].length;return t}e.ch=t.index+1}}function u(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(t==-1){if(o(e))continue;return}if(i(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));e.ch=t+1;return r?"selfClose":"regular"}e.ch=t}}function c(e,t){for(var n=[];;){var i,r=l(e),o=e.line,a=e.ch-(r?r[0].length:0);if(!r||!(i=s(e)))return;if("selfClose"!=i)if(r[1]){for(var u=n.length-1;u>=0;--u)if(n[u]==r[2]){n.length=u;break}if(u<0&&(!t||t==r[2]))return{tag:r[2],from:p(o,a),to:p(e.line,e.ch)}}else n.push(r[2])}}function f(e,t){for(var n=[];;){var i=u(e);if(!i)return;if("selfClose"!=i){var r=e.line,o=e.ch,s=a(e);if(!s)return;if(s[1])n.push(s[2]);else{for(var l=n.length-1;l>=0;--l)if(n[l]==s[2]){n.length=l;break}if(l<0&&(!t||t==s[2]))return{tag:s[2],from:p(e.line,e.ch),to:p(r,o)}}}else a(e)}}var p=e.Pos,h="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",d=h+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",g=new RegExp("<(/?)(["+h+"]["+d+"]*)","g");e.registerHelper("fold","xml",function(e,t){for(var i=new n(e,t.line,0);;){var r,o=l(i);if(!o||i.line!=t.line||!(r=s(i)))return;if(!o[1]&&"selfClose"!=r){var a=p(i.line,i.ch),u=c(i,o[2]);return u&&{from:a,to:u.from}}}});e.findMatchingTag=function(e,i,r){var o=new n(e,i.line,i.ch,r);if(o.text.indexOf(">")!=-1||o.text.indexOf("<")!=-1){var l=s(o),u=l&&p(o.line,o.ch),h=l&&a(o);if(l&&h&&!(t(o,i)>0)){var d={from:p(o.line,o.ch),to:u,tag:h[2]};if("selfClose"==l)return{open:d,close:null,at:"open"};if(h[1])return{open:f(o,h[2]),close:d,at:"close"};o=new n(e,u.line,u.ch,r);return{open:d,close:c(o,h[2]),at:"open"}}}};e.findEnclosingTag=function(e,t,i){for(var r=new n(e,t.line,t.ch,i);;){var o=f(r);if(!o)break;var s=new n(e,t.line,t.ch,i),a=c(s,o.tag);if(a)return{open:o,close:a}}};e.scanForClosingTag=function(e,t,i,r){var o=new n(e,t.line,t.ch,r?{from:0,to:r}:null);return c(o,i)}})},{"../../lib/codemirror":17}],14:[function(e,t,n){(function(i){"object"==typeof n&&"object"==typeof t?i(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(e){"use strict";function t(e,t){this.cm=e;this.options=t;this.widget=null;this.debounce=0;this.tick=0;this.startPos=this.cm.getCursor("start");this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length;var n=this;e.on("cursorActivity",this.activityFunc=function(){n.cursorActivity()})}function n(t,n){var i=e.cmpPos(n.from,t.from);return i>0&&t.to.ch-t.from.ch!=n.to.ch-n.from.ch}function i(e,t,n){var i=e.options.hintOptions,r={};for(var o in g)r[o]=g[o];if(i)for(var o in i)void 0!==i[o]&&(r[o]=i[o]);if(n)for(var o in n)void 0!==n[o]&&(r[o]=n[o]);r.hint.resolve&&(r.hint=r.hint.resolve(e,t));return r}function r(e){return"string"==typeof e?e:e.text}function o(e,t){function n(e,n){var r;r="string"!=typeof n?function(e){return n(e,t)}:i.hasOwnProperty(n)?i[n]:n;o[e]=r}var i={Up:function(){t.moveFocus(-1)},Down:function(){t.moveFocus(1)},PageUp:function(){t.moveFocus(-t.menuSize()+1,!0)},PageDown:function(){t.moveFocus(t.menuSize()-1,!0)},Home:function(){t.setFocus(0)},End:function(){t.setFocus(t.length-1)},Enter:t.pick,Tab:t.pick,Esc:t.close},r=e.options.customKeys,o=r?{}:i;if(r)for(var s in r)r.hasOwnProperty(s)&&n(s,r[s]);var a=e.options.extraKeys;if(a)for(var s in a)a.hasOwnProperty(s)&&n(s,a[s]);return o}function s(e,t){for(;t&&t!=e;){if("LI"===t.nodeName.toUpperCase()&&t.parentNode==e)return t;t=t.parentNode}}function a(t,n){this.completion=t;this.data=n;this.picked=!1;var i=this,a=t.cm,l=this.hints=document.createElement("ul");l.className="CodeMirror-hints";this.selectedHint=n.selectedHint||0;for(var u=n.list,c=0;cl.clientHeight+1,S=a.getScrollInfo();if(w>0){var C=E.bottom-E.top,L=m.top-(m.bottom-E.top);if(L-C>0){l.style.top=(y=m.top-C)+"px";b=!1}else if(C>_){l.style.height=_-5+"px";l.style.top=(y=m.bottom-E.top)+"px";var N=a.getCursor();if(n.from.ch!=N.ch){m=a.cursorCoords(N);l.style.left=(v=m.left)+"px";E=l.getBoundingClientRect()}}}var I=E.right-x;if(I>0){if(E.right-E.left>x){l.style.width=x-5+"px";I-=E.right-E.left-x}l.style.left=(v=m.left-I)+"px"}if(T)for(var A=l.firstChild;A;A=A.nextSibling)A.style.paddingRight=a.display.nativeBarWidth+"px";a.addKeyMap(this.keyMap=o(t,{moveFocus:function(e,t){i.changeActive(i.selectedHint+e,t)},setFocus:function(e){i.changeActive(e)},menuSize:function(){return i.screenAmount()},length:u.length,close:function(){t.close()},pick:function(){i.pick()},data:n}));if(t.options.closeOnUnfocus){var R;a.on("blur",this.onBlur=function(){R=setTimeout(function(){t.close()},100)});a.on("focus",this.onFocus=function(){clearTimeout(R)})}a.on("scroll",this.onScroll=function(){var e=a.getScrollInfo(),n=a.getWrapperElement().getBoundingClientRect(),i=y+S.top-e.top,r=i-(window.pageYOffset||(document.documentElement||document.body).scrollTop);b||(r+=l.offsetHeight);if(r<=n.top||r>=n.bottom)return t.close();l.style.top=i+"px";l.style.left=v+S.left-e.left+"px"});e.on(l,"dblclick",function(e){var t=s(l,e.target||e.srcElement);if(t&&null!=t.hintId){i.changeActive(t.hintId);i.pick()}});e.on(l,"click",function(e){var n=s(l,e.target||e.srcElement);if(n&&null!=n.hintId){i.changeActive(n.hintId);t.options.completeOnSingleClick&&i.pick()}});e.on(l,"mousedown",function(){setTimeout(function(){a.focus()},20)});e.signal(n,"select",u[0],l.firstChild);return!0}function l(e,t){if(!e.somethingSelected())return t;for(var n=[],i=0;i0?t(e):i(r+1)})}var o=l(e,r);i(0)};o.async=!0;o.supportsSelection=!0;return o}return(i=t.getHelper(t.getCursor(),"hintWords"))?function(t){return e.hint.fromList(t,{words:i})}:e.hint.anyword?function(t,n){return e.hint.anyword(t,n)}:function(){}}var f="CodeMirror-hint",p="CodeMirror-hint-active";e.showHint=function(e,t,n){if(!t)return e.showHint(n);n&&n.async&&(t.async=!0);var i={hint:t};if(n)for(var r in n)i[r]=n[r];return e.showHint(i)};e.defineExtension("showHint",function(n){n=i(this,this.getCursor("start"),n);var r=this.listSelections();if(!(r.length>1)){if(this.somethingSelected()){if(!n.hint.supportsSelection)return;for(var o=0;o=this.data.list.length?t=n?this.data.list.length-1:0:t<0&&(t=n?0:this.data.list.length-1);if(this.selectedHint!=t){var i=this.hints.childNodes[this.selectedHint];i.className=i.className.replace(" "+p,"");i=this.hints.childNodes[this.selectedHint=t];i.className+=" "+p;i.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=i.offsetTop+i.offsetHeight-this.hints.clientHeight+3);e.signal(this.data,"select",this.data.list[this.selectedHint],i)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}};e.registerHelper("hint","auto",{resolve:c});e.registerHelper("hint","fromList",function(t,n){var i=t.getCursor(),r=t.getTokenAt(i),o=e.Pos(i.line,r.end);if(r.string&&/\w/.test(r.string[r.string.length-1]))var s=r.string,a=e.Pos(i.line,r.start);else var s="",a=o;for(var l=[],u=0;u,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};e.defineOption("hintOptions",null)})},{"../../lib/codemirror":17}],15:[function(e,t,n){(function(i){"object"==typeof n&&"object"==typeof t?i(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(e){"use strict";e.runMode=function(t,n,i,r){var o=e.getMode(e.defaults,n),s=/MSIE \d/.test(navigator.userAgent),a=s&&(null==document.documentMode||document.documentMode<9);if(i.appendChild){var l=r&&r.tabSize||e.defaults.tabSize,u=i,c=0;u.innerHTML="";i=function(e,t){if("\n"!=e){for(var n="",i=0;;){var r=e.indexOf("\t",i);if(r==-1){n+=e.slice(i);c+=e.length-i;break}c+=r-i;n+=e.slice(i,r);var o=l-c%l;c+=o;for(var s=0;s-1){c=n(l,u,c);return{from:i(o.line,c),to:i(o.line,c+s.length)}}}else{var l=e.getLine(o.line).slice(o.ch),u=a(l),c=u.indexOf(t);if(c>-1){c=n(l,u,c)+o.ch;return{from:i(o.line,c),to:i(o.line,c+s.length)}}}}:this.matches=function(){};else{var u=s.split("\n");this.matches=function(t,n){var r=l.length-1;if(t){if(n.line-(l.length-1)=1;--c,--s)if(l[c]!=a(e.getLine(s)))return;var f=e.getLine(s),p=f.length-u[0].length;if(a(f.slice(p))!=l[0])return;return{from:i(s,p),to:o}}if(!(n.line+(l.length-1)>e.lastLine())){var f=e.getLine(n.line),p=f.length-u[0].length;if(a(f.slice(p))==l[0]){for(var h=i(n.line,p),s=n.line+1,c=1;cn))return i;--i}}}var i=e.Pos;t.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(e){function t(e){var t=i(e,0);n.pos={from:t,to:t};n.atOccurrence=!1;return!1}for(var n=this,r=this.doc.clipPos(e?this.pos.from:this.pos.to);;){if(this.pos=this.matches(e,r)){this.atOccurrence=!0;return this.pos.match||!0}if(e){if(!r.line)return t(0);r=i(r.line-1,this.doc.getLine(r.line-1).length)}else{var o=this.doc.lineCount();if(r.line==o-1)return t(o);r=i(r.line+1,0)}}},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(t,n){if(this.atOccurrence){var r=e.splitLines(t);this.doc.replaceRange(r,this.pos.from,this.pos.to,n);this.pos.to=i(this.pos.from.line+r.length-1,r[r.length-1].length+(1==r.length?this.pos.from.ch:0))}}};e.defineExtension("getSearchCursor",function(e,n,i){return new t(this.doc,e,n,i)});e.defineDocExtension("getSearchCursor",function(e,n,i){return new t(this,e,n,i)});e.defineExtension("selectMatches",function(t,n){for(var i=[],r=this.getSearchCursor(t,this.getCursor("from"),n);r.findNext()&&!(e.cmpPos(r.to(),this.getCursor("to"))>0);)i.push({anchor:r.from(),head:r.to()});i.length&&this.setSelections(i,0)})})},{"../../lib/codemirror":17}],17:[function(e,t,n){(function(e){if("object"==typeof n&&"object"==typeof t)t.exports=e();else{if("function"==typeof define&&define.amd)return define([],e);(this||window).CodeMirror=e()}})(function(){"use strict";function e(n,i){if(!(this instanceof e))return new e(n,i);this.options=i=i?Br(i):{};Br(ts,i,!1);h(i);var r=i.value;"string"==typeof r&&(r=new Ss(r,i.mode,null,i.lineSeparator));this.doc=r;var o=new e.inputStyles[i.inputStyle](this),s=this.display=new t(n,r,o);s.wrapper.CodeMirror=this;u(this);a(this);i.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap");i.autofocus&&!Ao&&s.input.focus();v(this);this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new Rr,keySeq:null,specialChars:null};var l=this;xo&&_o<11&&setTimeout(function(){l.display.input.reset(!0)},20);zt(this);Kr();_t(this);this.curOp.forceUpdate=!0;Xi(this,r);i.autofocus&&!Ao||l.hasFocus()?setTimeout(qr(yn,this),20):bn(this);for(var c in ns)ns.hasOwnProperty(c)&&ns[c](this,i[c],is);E(this);i.finishInit&&i.finishInit(this);for(var f=0;ft.maxLineLength){t.maxLineLength=n;t.maxLine=e}})}function h(e){var t=kr(e.gutters,"CodeMirror-linenumbers");if(t==-1&&e.lineNumbers)e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]);else if(t>-1&&!e.lineNumbers){e.gutters=e.gutters.slice(0);e.gutters.splice(t,1)}}function d(e){var t=e.display,n=t.gutters.offsetWidth,i=Math.round(e.doc.height+He(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:i,scrollHeight:i+We(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function g(e,t,n){this.cm=n;var i=this.vert=zr("div",[zr("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r=this.horiz=zr("div",[zr("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(i);e(r);Rs(i,"scroll",function(){i.clientHeight&&t(i.scrollTop,"vertical")});Rs(r,"scroll",function(){r.clientWidth&&t(r.scrollLeft,"horizontal")});this.checkedZeroWidth=!1;xo&&_o<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function m(){}function v(t){if(t.display.scrollbars){t.display.scrollbars.clear();t.display.scrollbars.addClass&&Qs(t.display.wrapper,t.display.scrollbars.addClass)}t.display.scrollbars=new e.scrollbarModel[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller);Rs(e,"mousedown",function(){t.state.focused&&setTimeout(function(){t.display.input.focus()},0)});e.setAttribute("cm-not-content","true")},function(e,n){"horizontal"==n?sn(t,e):on(t,e)},t);t.display.scrollbars.addClass&&Js(t.display.wrapper,t.display.scrollbars.addClass)}function y(e,t){t||(t=d(e));var n=e.display.barWidth,i=e.display.barHeight;b(e,t);for(var r=0;r<4&&n!=e.display.barWidth||i!=e.display.barHeight;r++){n!=e.display.barWidth&&e.options.lineWrapping&&R(e);b(e,d(e));n=e.display.barWidth;i=e.display.barHeight}}function b(e,t){var n=e.display,i=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=i.right)+"px";n.sizer.style.paddingBottom=(n.barHeight=i.bottom)+"px";n.heightForcer.style.borderBottom=i.bottom+"px solid transparent";if(i.right&&i.bottom){n.scrollbarFiller.style.display="block";n.scrollbarFiller.style.height=i.bottom+"px";n.scrollbarFiller.style.width=i.right+"px"}else n.scrollbarFiller.style.display="";if(i.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter){n.gutterFiller.style.display="block";n.gutterFiller.style.height=i.bottom+"px";n.gutterFiller.style.width=t.gutterWidth+"px"}else n.gutterFiller.style.display=""}function x(e,t,n){var i=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;i=Math.floor(i-ze(e));var r=n&&null!=n.bottom?n.bottom:i+e.wrapper.clientHeight,o=ir(t,i),s=ir(t,r);if(n&&n.ensure){var a=n.ensure.from.line,l=n.ensure.to.line;if(a=s){o=ir(t,rr(Qi(t,l))-e.wrapper.clientHeight);s=l}}return{from:o,to:Math.max(s,o+1)}}function _(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var i=T(t)-t.scroller.scrollLeft+e.doc.scrollLeft,r=t.gutters.offsetWidth,o=i+"px",s=0;s=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Gt(e))return!1;if(E(e)){Bt(e);t.dims=P(e)}var r=i.first+i.size,o=Math.max(t.visible.from-e.options.viewportMargin,i.first),s=Math.min(r,t.visible.to+e.options.viewportMargin);n.viewFroms&&n.viewTo-s<20&&(s=Math.min(r,n.viewTo));if(Bo){o=_i(e.doc,o);s=Ei(e.doc,s)}var a=o!=n.viewFrom||s!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Ut(e,o,s);n.viewOffset=rr(Qi(e.doc,n.viewFrom));e.display.mover.style.top=n.viewOffset+"px";var l=Gt(e);if(!a&&0==l&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=Wr();l>4&&(n.lineDiv.style.display="none");k(e,n.updateLineNumbers,t.dims);l>4&&(n.lineDiv.style.display="");n.renderedView=n.view;u&&Wr()!=u&&u.offsetHeight&&u.focus();Hr(n.cursorDiv);Hr(n.selectionDiv);n.gutters.style.height=n.sizer.style.minHeight=0;if(a){n.lastWrapHeight=t.wrapperHeight;n.lastWrapWidth=t.wrapperWidth;qe(e,400)}n.updateLineNumbers=null;return!0}function N(e,t){for(var n=t.viewport,i=!0;;i=!1){if(!i||!e.options.lineWrapping||t.oldDisplayWidth==Ye(e)){n&&null!=n.top&&(n={top:Math.min(e.doc.height+He(e.display)-Ze(e),n.top)});t.visible=x(e.display,e.doc,n);if(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}if(!L(e,t))break;R(e);var r=d(e);ke(e);y(e,r);A(e,r)}t.signal(e,"update",e);if(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo){t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo);e.display.reportedViewFrom=e.display.viewFrom;e.display.reportedViewTo=e.display.viewTo}}function I(e,t){var n=new S(e,t);if(L(e,n)){R(e);N(e,n);var i=d(e);ke(e);y(e,i);A(e,i);n.finish()}}function A(e,t){e.display.sizer.style.minHeight=t.docHeight+"px";e.display.heightForcer.style.top=t.docHeight+"px";e.display.gutters.style.height=t.docHeight+e.display.barHeight+We(e)+"px"}function R(e){for(var t=e.display,n=t.lineDiv.offsetTop,i=0;i.001||l<-.001){tr(o.line,r);O(o.line);if(o.rest)for(var u=0;u-1&&(p=!1);M(e,f,u,n)}if(p){Hr(f.lineNumber);f.lineNumber.appendChild(document.createTextNode(w(e.options,u)))}a=f.node.nextSibling}else{var h=z(e,f,u,n);s.insertBefore(h,a)}u+=f.size}for(;a;)a=i(a)}function M(e,t,n,i){for(var r=0;r1)if(Uo&&Uo.text.join("\n")==t){if(i.ranges.length%Uo.text.length==0){l=[];for(var u=0;u=0;u--){var c=i.ranges[u],f=c.from(),p=c.to();c.empty()&&(n&&n>0?f=qo(f.line,f.ch-n):e.state.overwrite&&!s?p=qo(p.line,Math.min(Qi(o,p.line).text.length,p.ch+Pr(a).length)):Uo&&Uo.lineWise&&Uo.text.join("\n")==t&&(f=p=qo(f.line,0)));var h=e.curOp.updateInput,d={from:f,to:p,text:l?l[u%l.length]:a,origin:r||(s?"paste":e.state.cutIncoming?"cut":"+input")};Ln(e.doc,d);Sr(e,"inputRead",e,d)}t&&!s&&J(e,t);qn(e);e.curOp.updateInput=h;e.curOp.typing=!0;e.state.pasteIncoming=e.state.cutIncoming=!1}function Q(e,t){var n=e.clipboardData&&e.clipboardData.getData("text/plain");if(n){e.preventDefault();t.isReadOnly()||t.options.disableInput||At(t,function(){X(t,n,0,null,"paste")});return!0}}function J(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,i=n.ranges.length-1;i>=0;i--){var r=n.ranges[i];if(!(r.head.ch>100||i&&n.ranges[i-1].head.line==r.head.line)){var o=e.getModeAt(r.head),s=!1;if(o.electricChars){for(var a=0;a-1){s=Un(e,r.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Qi(e.doc,r.head.line).text.slice(0,r.head.ch))&&(s=Un(e,r.head.line,"smart"));s&&Sr(e,"electricInput",e,r.head.line)}}}function ee(e){for(var t=[],n=[],i=0;i=0){var s=$(o.from(),r.from()),a=Z(o.to(),r.to()),l=o.empty()?r.from()==r.head:o.from()==o.head;i<=t&&--t;e.splice(--i,2,new fe(l?a:s,l?s:a))}}return new ce(e,t)}function he(e,t){return new ce([new fe(e,t||e)],0)}function de(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ge(e,t){if(t.linen?qo(n,Qi(e,n).text.length):me(t,Qi(e,t.line).text.length)}function me(e,t){var n=e.ch;return null==n||n>t?qo(e.line,t):n<0?qo(e.line,0):e}function ve(e,t){return t>=e.first&&t=t.ch:a.to>t.ch))){if(r){ks(l,"beforeCursorEnter");if(l.explicitlyCleared){if(o.markedSpans){--s;continue}break}}if(!l.atomic)continue;if(n){var u,c=l.find(i<0?1:-1);(i<0?l.inclusiveRight:l.inclusiveLeft)&&(c=Pe(e,c,-i,c&&c.line==t.line?o:null));if(c&&c.line==t.line&&(u=Fo(c,n))&&(i<0?u<0:u>0))return Re(e,c,t,i,r)}var f=l.find(i<0?-1:1);(i<0?l.inclusiveLeft:l.inclusiveRight)&&(f=Pe(e,f,i,f.line==t.line?o:null));return f?Re(e,f,t,i,r):null}}return t}function Oe(e,t,n,i,r){var o=i||1,s=Re(e,t,n,o,r)||!r&&Re(e,t,n,o,!0)||Re(e,t,n,-o,r)||!r&&Re(e,t,n,-o,!0);if(!s){e.cantEdit=!0;return qo(e.first,0)}return s}function Pe(e,t,n,i){return n<0&&0==t.ch?t.line>e.first?ge(e,qo(t.line-1)):null:n>0&&t.ch==(i||Qi(e,t.line)).text.length?t.line=e.display.viewTo||a.to().line3){i(h,g.top,null,g.bottom);h=u;g.bottoml.bottom||f.bottom==l.bottom&&f.right>l.right)&&(l=f);h0?t.blinker=setInterval(function(){t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function qe(e,t){e.doc.mode.startState&&e.doc.frontier=e.display.viewTo)){var n=+new Date+e.options.workTime,i=us(t.mode,Ge(e,t.frontier)),r=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(t.frontier>=e.display.viewFrom){var s=o.styles,a=o.text.length>e.options.maxHighlightLength,l=Mi(e,o,a?us(t.mode,i):i,!0);o.styles=l.styles;var u=o.styleClasses,c=l.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var f=!s||s.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),p=0;!f&&pn){qe(e,e.options.workDelay);return!0}});r.length&&At(e,function(){for(var t=0;ts;--a){if(a<=o.first)return o.first;var l=Qi(o,a-1);if(l.stateAfter&&(!n||a<=o.frontier))return a;var u=Us(l.text,null,e.options.tabSize);if(null==r||i>u){r=a-1;i=u}}return r}function Ge(e,t,n){var i=e.doc,r=e.display;if(!i.mode.startState)return!0;var o=Ue(e,t,n),s=o>i.first&&Qi(i,o-1).stateAfter;s=s?us(i.mode,s):cs(i.mode);i.iter(o,t,function(n){ji(e,n.text,s);var a=o==t-1||o%5==0||o>=r.viewFrom&&o2&&o.push((l.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Ke(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var i=0;in)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Xe(e,t){t=bi(t);var n=nr(t),i=e.display.externalMeasured=new kt(e.doc,t,n);i.lineN=n;var r=i.built=qi(e,i);i.text=r.pre;Vr(e.display.lineMeasure,r.pre);return i}function Qe(e,t,n,i){return tt(e,et(e,t),n,i)}function Je(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt){o=u-l;r=o-1;t>=u&&(s="right")}if(null!=r){i=e[a+2];l==u&&n==(i.insertLeft?"left":"right")&&(s=n);if("left"==n&&0==r)for(;a&&e[a-2]==e[a-3]&&e[a-1].insertLeft;){i=e[(a-=3)+2];s="left"}if("right"==n&&r==u-l)for(;a=0&&(n=e[i]).left==n.right;i--);return n}function rt(e,t,n,i){var r,o=nt(t.map,n,i),s=o.node,a=o.start,l=o.end,u=o.collapse;if(3==s.nodeType){for(var c=0;c<4;c++){for(;a&&Gr(t.line.text.charAt(o.coverStart+a));)--a;for(;o.coverStart+l0&&(u=i="right");var f;r=e.options.lineWrapping&&(f=s.getClientRects()).length>1?f["right"==i?f.length-1:0]:s.getBoundingClientRect()}if(xo&&_o<9&&!a&&(!r||!r.left&&!r.right)){var p=s.parentNode.getClientRects()[0];r=p?{left:p.left,right:p.left+xt(e.display),top:p.top,bottom:p.bottom}:Vo}for(var h=r.top-t.rect.top,d=r.bottom-t.rect.top,g=(h+d)/2,m=t.view.measure.heights,c=0;cn.from?s(e-1):s(e,i)}i=i||Qi(e.doc,t.line);r||(r=et(e,i));var l=or(i),u=t.ch;if(!l)return s(u);var c=co(l,u),f=a(u,c);null!=aa&&(f.other=a(u,aa));return f}function gt(e,t){var n=0,t=ge(e.doc,t);e.options.lineWrapping||(n=xt(e.display)*t.ch);var i=Qi(e.doc,t.line),r=rr(i)+ze(e.display);return{left:n,right:n,top:r,bottom:r+i.height}}function mt(e,t,n,i){var r=qo(e,t);r.xRel=i;n&&(r.outside=!0);return r}function vt(e,t,n){var i=e.doc;n+=e.display.viewOffset;if(n<0)return mt(i.first,0,!0,-1);var r=ir(i,n),o=i.first+i.size-1;if(r>o)return mt(i.first+i.size-1,Qi(i,o).text.length,!0,1);t<0&&(t=0);for(var s=Qi(i,r);;){var a=yt(e,s,r,t,n),l=vi(s),u=l&&l.find(0,!0);if(!l||!(a.ch>u.from.ch||a.ch==u.from.ch&&a.xRel>0))return a;r=nr(s=u.to.line)}}function yt(e,t,n,i,r){function o(i){var r=dt(e,qo(n,i),"line",t,u);a=!0;if(s>r.bottom)return r.left-l;if(sm)return mt(n,h,v,1);for(;;){if(c?h==p||h==po(t,p,1):h-p<=1){var y=i0&&y1){var _=tt(e,u,y,"right");if(s<=_.bottom&&s>=_.top&&Math.abs(i-_.right)1?1:0);return E}var w=Math.ceil(f/2),T=p+w;if(c){T=p;for(var S=0;Si){h=T;m=C;(v=a)&&(m+=1e3);f=w}else{p=T;d=C;g=a;f-=w}}}function bt(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Go){Go=zr("pre");for(var t=0;t<49;++t){Go.appendChild(document.createTextNode("x"));Go.appendChild(zr("br"))}Go.appendChild(document.createTextNode("x"))}Vr(e.measure,Go);var n=Go.offsetHeight/50;n>3&&(e.cachedTextHeight=n);Hr(e.measure);return n||1}function xt(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=zr("span","xxxxxxxxxx"),n=zr("pre",[t]);Vr(e.measure,n);var i=t.getBoundingClientRect(),r=(i.right-i.left)/10;r>2&&(e.cachedCharWidth=r);return r||10}function _t(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Yo};Wo?Wo.ops.push(e.curOp):e.curOp.ownsGroup=Wo={ops:[e.curOp],delayedCallbacks:[]}}function Et(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping;e.update=e.mustUpdate&&new S(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Ct(e){e.updatedDisplay=e.mustUpdate&&L(e.cm,e.update)}function Lt(e){var t=e.cm,n=t.display;e.updatedDisplay&&R(t);e.barMeasure=d(t);if(n.maxLineChanged&&!t.options.lineWrapping){e.adjustWidthTo=Qe(t,n.maxLine,n.maxLine.text.length).left+3;t.display.sizerWidth=e.adjustWidthTo;e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+We(t)+t.display.barWidth);e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Ye(t))}(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection(e.focus))}function Nt(e){var t=e.cm;if(null!=e.adjustWidthTo){t.display.sizer.style.minWidth=e.adjustWidthTo+"px";e.maxScrollLeftt)&&(r.updateLineNumbers=t);e.curOp.viewChanged=!0;if(t>=r.viewTo)Bo&&_i(e.doc,t)r.viewFrom)Bt(e);else{r.viewFrom+=i;r.viewTo+=i}else if(t<=r.viewFrom&&n>=r.viewTo)Bt(e);else if(t<=r.viewFrom){var o=Ft(e,n,n+i,1);if(o){r.view=r.view.slice(o.index);r.viewFrom=o.lineN;r.viewTo+=i}else Bt(e)}else if(n>=r.viewTo){var o=Ft(e,t,t,-1);if(o){r.view=r.view.slice(0,o.index);r.viewTo=o.lineN}else Bt(e)}else{var s=Ft(e,t,t,-1),a=Ft(e,n,n+i,1);if(s&&a){r.view=r.view.slice(0,s.index).concat(Mt(e,s.lineN,a.lineN)).concat(r.view.slice(a.index));r.viewTo+=i}else Bt(e)}var l=r.externalMeasured;l&&(n=r.lineN&&t=i.viewTo)){var o=i.view[qt(e,t)];if(null!=o.node){var s=o.changes||(o.changes=[]);kr(s,n)==-1&&s.push(n)}}}function Bt(e){e.display.viewFrom=e.display.viewTo=e.doc.first;e.display.view=[];e.display.viewOffset=0}function qt(e,t){if(t>=e.display.viewTo)return null;t-=e.display.viewFrom;if(t<0)return null;for(var n=e.display.view,i=0;i0){if(o==s.length-1)return null;r=l+s[o].size-t;o++}else r=l-t;t+=r;n+=r}for(;_i(e.doc,n)!=n;){if(o==(i<0?0:s.length-1))return null;n+=i*s[o-(i<0?1:0)].size;o+=i}return{index:o,lineN:n}}function Ut(e,t,n){var i=e.display,r=i.view;if(0==r.length||t>=i.viewTo||n<=i.viewFrom){i.view=Mt(e,t,n);i.viewFrom=t}else{i.viewFrom>t?i.view=Mt(e,t,i.viewFrom).concat(i.view):i.viewFromn&&(i.view=i.view.slice(0,qt(e,n)))}i.viewTo=n}function Gt(e){for(var t=e.display.view,n=0,i=0;i400}var r=e.display;Rs(r.scroller,"mousedown",Rt(e,Zt));xo&&_o<11?Rs(r.scroller,"dblclick",Rt(e,function(t){if(!Lr(e,t)){var n=Yt(e,t);if(n&&!Jt(e,t)&&!Wt(e.display,t)){Ns(t);var i=e.findWordAt(n);xe(e.doc,i.anchor,i.head)}}})):Rs(r.scroller,"dblclick",function(t){Lr(e,t)||Ns(t)});Do||Rs(r.scroller,"contextmenu",function(t){xn(e,t)});var o,s={end:0};Rs(r.scroller,"touchstart",function(t){if(!Lr(e,t)&&!n(t)){clearTimeout(o);var i=+new Date;r.activeTouch={start:i,moved:!1,prev:i-s.end<=300?s:null};if(1==t.touches.length){r.activeTouch.left=t.touches[0].pageX;r.activeTouch.top=t.touches[0].pageY}}});Rs(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)});Rs(r.scroller,"touchend",function(n){var o=r.activeTouch;if(o&&!Wt(r,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var s,a=e.coordsChar(r.activeTouch,"page");s=!o.prev||i(o,o.prev)?new fe(a,a):!o.prev.prev||i(o,o.prev.prev)?e.findWordAt(a):new fe(qo(a.line,0),ge(e.doc,qo(a.line+1,0)));e.setSelection(s.anchor,s.head);e.focus();Ns(n)}t()});Rs(r.scroller,"touchcancel",t);Rs(r.scroller,"scroll",function(){if(r.scroller.clientHeight){on(e,r.scroller.scrollTop);sn(e,r.scroller.scrollLeft,!0);ks(e,"scroll",e)}});Rs(r.scroller,"mousewheel",function(t){an(e,t)});Rs(r.scroller,"DOMMouseScroll",function(t){an(e,t)});Rs(r.wrapper,"scroll",function(){r.wrapper.scrollTop=r.wrapper.scrollLeft=0});r.dragFunctions={enter:function(t){Lr(e,t)||As(t)},over:function(t){if(!Lr(e,t)){nn(e,t);As(t)}},start:function(t){tn(e,t)},drop:Rt(e,en),leave:function(t){Lr(e,t)||rn(e)}};var a=r.input.getField();Rs(a,"keyup",function(t){gn.call(e,t)});Rs(a,"keydown",Rt(e,hn));Rs(a,"keypress",Rt(e,mn));Rs(a,"focus",qr(yn,e));Rs(a,"blur",qr(bn,e))}function Ht(t,n,i){var r=i&&i!=e.Init;if(!n!=!r){var o=t.display.dragFunctions,s=n?Rs:Ps;s(t.display.scroller,"dragstart",o.start);s(t.display.scroller,"dragenter",o.enter);s(t.display.scroller,"dragover",o.over);s(t.display.scroller,"dragleave",o.leave);s(t.display.scroller,"drop",o.drop)}}function Vt(e){var t=e.display;if(t.lastWrapHeight!=t.wrapper.clientHeight||t.lastWrapWidth!=t.wrapper.clientWidth){t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null;t.scrollbarsClipped=!1;e.setSize()}}function Wt(e,t){for(var n=Er(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Yt(e,t,n,i){var r=e.display;if(!n&&"true"==Er(t).getAttribute("cm-not-content"))return null;var o,s,a=r.lineSpace.getBoundingClientRect();try{o=t.clientX-a.left;s=t.clientY-a.top}catch(t){return null}var l,u=vt(e,o,s);if(i&&1==u.xRel&&(l=Qi(e.doc,u.line).text).length==u.ch){var c=Us(l,l.length,e.options.tabSize)-l.length;u=qo(u.line,Math.max(0,Math.round((o-Ve(e.display).left)/xt(e.display))-c))}return u}function Zt(e){var t=this,n=t.display;if(!(Lr(t,e)||n.activeTouch&&n.input.supportsTouch())){n.shift=e.shiftKey;if(Wt(n,e)){if(!Eo){n.scroller.draggable=!1;setTimeout(function(){n.scroller.draggable=!0},100)}}else if(!Jt(t,e)){var i=Yt(t,e);window.focus();switch(wr(e)){case 1:t.state.selectingText?t.state.selectingText(e):i?$t(t,e,i):Er(e)==n.scroller&&Ns(e);break;case 2:Eo&&(t.state.lastMiddleDown=+new Date);i&&xe(t.doc,i);setTimeout(function(){n.input.focus()},20);Ns(e);break;case 3:Do?xn(t,e):vn(t)}}}}function $t(e,t,n){xo?setTimeout(qr(K,e),0):e.curOp.focus=Wr();var i,r=+new Date;if(Ho&&Ho.time>r-400&&0==Fo(Ho.pos,n))i="triple";else if(zo&&zo.time>r-400&&0==Fo(zo.pos,n)){i="double";Ho={time:r,pos:n}}else{i="single";zo={time:r,pos:n}}var o,s=e.doc.sel,a=Ro?t.metaKey:t.ctrlKey;e.options.dragDrop&&ta&&!e.isReadOnly()&&"single"==i&&(o=s.contains(n))>-1&&(Fo((o=s.ranges[o]).from(),n)<0||n.xRel>0)&&(Fo(o.to(),n)>0||n.xRel<0)?Kt(e,t,n,a):Xt(e,t,n,i,a)}function Kt(e,t,n,i){var r=e.display,o=+new Date,s=Rt(e,function(a){Eo&&(r.scroller.draggable=!1);e.state.draggingText=!1;Ps(document,"mouseup",s);Ps(r.scroller,"drop",s);if(Math.abs(t.clientX-a.clientX)+Math.abs(t.clientY-a.clientY)<10){Ns(a);!i&&+new Date-200y&&r.push(new fe(qo(d,y),qo(d,Gs(v,h,o))))}r.length||r.push(new fe(n,n));Ce(u,pe(p.ranges.slice(0,f).concat(r),f),{origin:"*mouse",scroll:!1});e.scrollIntoView(t)}else{var b=c,x=b.anchor,_=t;if("single"!=i){if("double"==i)var E=e.findWordAt(t);else var E=new fe(qo(t.line,0),ge(u,qo(t.line+1,0)));if(Fo(E.anchor,x)>0){_=E.head;x=$(b.from(),E.anchor)}else{_=E.anchor;x=Z(b.to(),E.head)}}var r=p.ranges.slice(0);r[f]=new fe(ge(u,x),_);Ce(u,pe(r,f),qs)}}}function s(t){var n=++y,r=Yt(e,t,!0,"rect"==i);if(r)if(0!=Fo(r,m)){e.curOp.focus=Wr();o(r);var a=x(l,u);(r.line>=a.to||r.linev.bottom?20:0;c&&setTimeout(Rt(e,function(){if(y==n){l.scroller.scrollTop+=c;s(t)}}),50)}}function a(t){e.state.selectingText=!1;y=1/0;Ns(t);l.input.focus();Ps(document,"mousemove",b);Ps(document,"mouseup",_);u.history.lastSelOrigin=null}var l=e.display,u=e.doc;Ns(t);var c,f,p=u.sel,h=p.ranges;if(r&&!t.shiftKey){f=u.sel.contains(n);c=f>-1?h[f]:new fe(n,n)}else{c=u.sel.primary();f=u.sel.primIndex}if(Oo?t.shiftKey&&t.metaKey:t.altKey){i="rect";r||(c=new fe(n,n));n=Yt(e,t,!0,!0);f=-1}else if("double"==i){var d=e.findWordAt(n);c=e.display.shift||u.extend?be(u,c,d.anchor,d.head):d}else if("triple"==i){var g=new fe(qo(n.line,0),ge(u,qo(n.line+1,0)));c=e.display.shift||u.extend?be(u,c,g.anchor,g.head):g}else c=be(u,c,n);if(r)if(f==-1){f=h.length;Ce(u,pe(h.concat([c]),f),{scroll:!1,origin:"*mouse"})}else if(h.length>1&&h[f].empty()&&"single"==i&&!t.shiftKey){Ce(u,pe(h.slice(0,f).concat(h.slice(f+1)),0),{scroll:!1,origin:"*mouse"});p=u.sel}else Ee(u,f,c,qs);else{f=0;Ce(u,new ce([c],0),qs);p=u.sel}var m=n,v=l.wrapper.getBoundingClientRect(),y=0,b=Rt(e,function(e){wr(e)?s(e):a(e)}),_=Rt(e,a);e.state.selectingText=_;Rs(document,"mousemove",b);Rs(document,"mouseup",_)}function Qt(e,t,n,i){try{var r=t.clientX,o=t.clientY}catch(t){return!1}if(r>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;i&&Ns(t);var s=e.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!Ir(e,n))return _r(t);o-=a.top-s.viewOffset;for(var l=0;l=r){var c=ir(e.doc,o),f=e.options.gutters[l];ks(e,n,e,c,f,t);return _r(t)}}}function Jt(e,t){return Qt(e,t,"gutterClick",!0)}function en(e){var t=this;rn(t);if(!Lr(t,e)&&!Wt(t.display,e)){Ns(e);xo&&(Zo=+new Date);var n=Yt(t,e,!0),i=e.dataTransfer.files;if(n&&!t.isReadOnly())if(i&&i.length&&window.FileReader&&window.File)for(var r=i.length,o=Array(r),s=0,a=function(e,i){if(!t.options.allowDropFileTypes||kr(t.options.allowDropFileTypes,e.type)!=-1){var a=new FileReader;a.onload=Rt(t,function(){var e=a.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e="");o[i]=e;if(++s==r){n=ge(t.doc,n);var l={from:n,to:n,text:t.doc.splitLines(o.join(t.doc.lineSeparator())),origin:"paste"};Ln(t.doc,l);Se(t.doc,he(n,es(l)))}});a.readAsText(e)}},l=0;l-1){t.state.draggingText(e);setTimeout(function(){t.display.input.focus()},20);return}try{var o=e.dataTransfer.getData("Text");if(o){if(t.state.draggingText&&!t.state.draggingText.copy)var u=t.listSelections();Le(t.doc,he(n,n));if(u)for(var l=0;ls.clientWidth,l=s.scrollHeight>s.clientHeight;if(i&&a||r&&l){if(r&&Ro&&Eo)e:for(var u=t.target,c=o.view;u!=s;u=u.parentNode)for(var f=0;f=0;--r)Nn(e,{from:i[r].from,to:i[r].to,text:r?[""]:t.text});else Nn(e,t)}function Nn(e,t){if(1!=t.text.length||""!=t.text[0]||0!=Fo(t.from,t.to)){var n=wn(e,t);cr(e,t,n,e.cm?e.cm.curOp.id:NaN);Rn(e,t,n,si(e,t));var i=[];Ki(e,function(e,n){if(!n&&kr(i,e.history)==-1){xr(e.history,t);i.push(e.history)}Rn(e,t,null,si(e,t))})}}function In(e,t,n){if(!e.cm||!e.cm.state.suppressEdits||n){for(var i,r=e.history,o=e.sel,s="undo"==t?r.done:r.undone,a="undo"==t?r.undone:r.done,l=0;l=0;--l){var f=i.changes[l];f.origin=t;if(c&&!Cn(e,f,!1)){s.length=0;return}u.push(ar(e,f));var p=l?wn(e,f):Pr(s);Rn(e,f,p,li(e,f));!l&&e.cm&&e.cm.scrollIntoView({from:f.from,to:es(f)});var h=[];Ki(e,function(e,t){if(!t&&kr(h,e.history)==-1){xr(e.history,f);h.push(e.history)}Rn(e,f,null,li(e,f))})}}}}function An(e,t){if(0!=t){e.first+=t;e.sel=new ce(Mr(e.sel.ranges,function(e){return new fe(qo(e.anchor.line+t,e.anchor.ch),qo(e.head.line+t,e.head.ch))}),e.sel.primIndex);if(e.cm){Dt(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,i=n.viewFrom;ie.lastLine())){if(t.from.lineo&&(t={from:t.from,to:qo(o,Qi(e,o).text.length),text:[t.text[0]],origin:t.origin});t.removed=Ji(e,t.from,t.to);n||(n=wn(e,t));e.cm?On(e.cm,t,i):Yi(e,t,i);Le(e,n,Bs)}}function On(e,t,n){var i=e.doc,r=e.display,s=t.from,a=t.to,l=!1,u=s.line;if(!e.options.lineWrapping){u=nr(bi(Qi(i,s.line)));i.iter(u,a.line+1,function(e){if(e==r.maxLine){l=!0;return!0}})}i.sel.contains(t.from,t.to)>-1&&Nr(e);Yi(i,t,n,o(e));if(!e.options.lineWrapping){i.iter(u,s.line+t.text.length,function(e){var t=f(e);if(t>r.maxLineLength){r.maxLine=e;r.maxLineLength=t;r.maxLineChanged=!0;l=!1}});l&&(e.curOp.updateMaxLine=!0)}i.frontier=Math.min(i.frontier,s.line);qe(e,400);var c=t.text.length-(a.line-s.line)-1;t.full?Dt(e):s.line!=a.line||1!=t.text.length||Wi(e.doc,t)?Dt(e,s.line,a.line+1,c):jt(e,s.line,"text");var p=Ir(e,"changes"),h=Ir(e,"change");if(h||p){var d={from:s,to:a,text:t.text,removed:t.removed,origin:t.origin};h&&Sr(e,"change",e,d);p&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(d)}e.display.selForContextMenu=null}function Pn(e,t,n,i,r){i||(i=n);if(Fo(i,n)<0){var o=i;i=n;n=o}"string"==typeof t&&(t=e.splitLines(t));Ln(e,{from:n,to:i,text:t,origin:r})}function kn(e,t){if(!Lr(e,"scrollCursorIntoView")){var n=e.display,i=n.sizer.getBoundingClientRect(),r=null;t.top+i.top<0?r=!0:t.bottom+i.top>(window.innerHeight||document.documentElement.clientHeight)&&(r=!1);if(null!=r&&!No){var o=zr("div","​",null,"position: absolute; top: "+(t.top-n.viewOffset-ze(e.display))+"px; height: "+(t.bottom-t.top+We(e)+n.barHeight)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(o);o.scrollIntoView(r);e.display.lineSpace.removeChild(o)}}}function Mn(e,t,n,i){null==i&&(i=0);for(var r=0;r<5;r++){var o=!1,s=dt(e,t),a=n&&n!=t?dt(e,n):s,l=jn(e,Math.min(s.left,a.left),Math.min(s.top,a.top)-i,Math.max(s.left,a.left),Math.max(s.bottom,a.bottom)+i),u=e.doc.scrollTop,c=e.doc.scrollLeft;if(null!=l.scrollTop){on(e,l.scrollTop);Math.abs(e.doc.scrollTop-u)>1&&(o=!0)}if(null!=l.scrollLeft){sn(e,l.scrollLeft);Math.abs(e.doc.scrollLeft-c)>1&&(o=!0)}if(!o)break}return s}function Dn(e,t,n,i,r){var o=jn(e,t,n,i,r);null!=o.scrollTop&&on(e,o.scrollTop);null!=o.scrollLeft&&sn(e,o.scrollLeft)}function jn(e,t,n,i,r){var o=e.display,s=bt(e.display);n<0&&(n=0);var a=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,l=Ze(e),u={};r-n>l&&(r=n+l);var c=e.doc.height+He(o),f=nc-s;if(na+l){var h=Math.min(n,(p?c:r)-l);h!=a&&(u.scrollTop=h)}var d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:o.scroller.scrollLeft,g=Ye(e)-(e.options.fixedGutter?o.gutters.offsetWidth:0),m=i-t>g;m&&(i=t+g);t<10?u.scrollLeft=0:tg+d-3&&(u.scrollLeft=i+(m?0:10)-g);return u}function Bn(e,t,n){null==t&&null==n||Fn(e);null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t);null!=n&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+n)}function qn(e){Fn(e);var t=e.getCursor(),n=t,i=t;if(!e.options.lineWrapping){n=t.ch?qo(t.line,t.ch-1):t;i=qo(t.line,t.ch+1)}e.curOp.scrollToPos={from:n,to:i,margin:e.options.cursorScrollMargin,isCursor:!0}}function Fn(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=gt(e,t.from),i=gt(e,t.to),r=jn(e,Math.min(n.left,i.left),Math.min(n.top,i.top)-t.margin,Math.max(n.right,i.right),Math.max(n.bottom,i.bottom)+t.margin);e.scrollTo(r.scrollLeft,r.scrollTop)}}function Un(e,t,n,i){var r,o=e.doc;null==n&&(n="add");"smart"==n&&(o.mode.indent?r=Ge(e,t):n="prev");var s=e.options.tabSize,a=Qi(o,t),l=Us(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var u,c=a.text.match(/^\s*/)[0];if(i||/\S/.test(a.text)){if("smart"==n){u=o.mode.indent(r,a.text.slice(c.length),a.text);if(u==js||u>150){if(!i)return;n="prev"}}}else{u=0;n="not"}"prev"==n?u=t>o.first?Us(Qi(o,t-1).text,null,s):0:"add"==n?u=l+e.options.indentUnit:"subtract"==n?u=l-e.options.indentUnit:"number"==typeof n&&(u=l+n);u=Math.max(0,u);var f="",p=0;if(e.options.indentWithTabs)for(var h=Math.floor(u/s);h;--h){p+=s;f+="\t"}p=0;t--)Pn(e.doc,"",i[t].from,i[t].to,"+delete");qn(e)})}function Hn(e,t,n,i,r){function o(){var t=a+n;if(t=e.first+e.size)return!1;a=t;return c=Qi(e,t)}function s(e){var t=(r?po:ho)(c,l,n,!0);if(null==t){if(e||!o())return!1;l=r?(n<0?oo:ro)(c):n<0?c.text.length:0}else l=t;return!0}var a=t.line,l=t.ch,u=n,c=Qi(e,a);if("char"==i)s();else if("column"==i)s(!0);else if("word"==i||"group"==i)for(var f=null,p="group"==i,h=e.cm&&e.cm.getHelper(t,"wordChars"),d=!0;!(n<0)||s(!d);d=!1){var g=c.text.charAt(l)||"\n",m=Fr(g,h)?"w":p&&"\n"==g?"n":!p||/\s/.test(g)?null:"p";!p||d||m||(m="s");if(f&&f!=m){if(n<0){n=1;s()}break}m&&(f=m);if(n>0&&!s(!d))break}var v=Oe(e,qo(a,l),t,u,!0);Fo(t,v)||(v.hitSide=!0);return v}function Vn(e,t,n,i){var r,o=e.doc,s=t.left;if("page"==i){var a=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);r=t.top+n*(a-(n<0?1.5:.5)*bt(e.display))}else"line"==i&&(r=n>0?t.bottom+3:t.top-3);for(;;){var l=vt(e,s,r);if(!l.outside)break;if(n<0?r<=0:r>=o.height){l.hitSide=!0;break}r+=5*n}return l}function Wn(t,n,i,r){e.defaults[t]=n;i&&(ns[t]=r?function(e,t,n){n!=is&&i(e,t,n)}:i)}function Yn(e){for(var t,n,i,r,o=e.split(/-(?!$)/),e=o[o.length-1],s=0;s0||0==s&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith){o.collapsed=!0;o.widgetNode=zr("span",[o.replacedWith],"CodeMirror-widget");i.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true");i.insertLeft&&(o.widgetNode.insertLeft=!0)}if(o.collapsed){if(yi(e,t.line,t,n,o)||t.line!=n.line&&yi(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Bo=!0}o.addToHistory&&cr(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var a,l=t.line,u=e.cm;e.iter(l,n.line+1,function(e){u&&o.collapsed&&!u.options.lineWrapping&&bi(e)==u.display.maxLine&&(a=!0);o.collapsed&&l!=t.line&&tr(e,0);ii(e,new ei(o,l==t.line?t.ch:null,l==n.line?n.ch:null));++l});o.collapsed&&e.iter(t.line,n.line+1,function(t){wi(e,t)&&tr(t,0)});o.clearOnEnter&&Rs(o,"beforeCursorEnter",function(){o.clear()});if(o.readOnly){jo=!0;(e.history.done.length||e.history.undone.length)&&e.clearHistory()}if(o.collapsed){o.id=++vs;o.atomic=!0}if(u){a&&(u.curOp.updateMaxLine=!0);if(o.collapsed)Dt(u,t.line,n.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var c=t.line;c<=n.line;c++)jt(u,c,"text");o.atomic&&Ie(u.doc);Sr(u,"markerAdded",u,o)}return o}function Kn(e,t,n,i,r){i=Br(i);i.shared=!1;var o=[$n(e,t,n,i,r)],s=o[0],a=i.widgetNode;Ki(e,function(e){a&&(i.widgetNode=a.cloneNode(!0));o.push($n(e,ge(e,t),ge(e,n),i,r));for(var l=0;l=t:o.to>t);(i||(i=[])).push(new ei(s,o.from,l?null:o.to))}}return i}function oi(e,t,n){if(e)for(var i,r=0;r=t:o.to>t);if(a||o.from==t&&"bookmark"==s.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(s.inclusiveLeft?o.from<=t:o.from0&&a)for(var f=0;f0)){var c=[l,1],f=Fo(u.from,a.from),p=Fo(u.to,a.to);(f<0||!s.inclusiveLeft&&!f)&&c.push({from:u.from,to:a.from});(p>0||!s.inclusiveRight&&!p)&&c.push({from:a.to,to:u.to});r.splice.apply(r,c);l+=c.length-1}}return r}function ci(e){var t=e.markedSpans;if(t){for(var n=0;n=0&&f<=0||c<=0&&f>=0)&&(c<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?Fo(u.to,n)>=0:Fo(u.to,n)>0)||c>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?Fo(u.from,i)<=0:Fo(u.from,i)<0)))return!0}}}function bi(e){for(var t;t=mi(e);)e=t.find(-1,!0).line;return e}function xi(e){for(var t,n;t=vi(e);){e=t.find(1,!0).line;(n||(n=[])).push(e)}return n}function _i(e,t){var n=Qi(e,t),i=bi(n);return n==i?t:nr(i)}function Ei(e,t){if(t>e.lastLine())return t;var n,i=Qi(e,t);if(!wi(e,i))return t;for(;n=vi(i);)i=n.find(1,!0).line;return nr(i)+1}function wi(e,t){var n=Bo&&t.markedSpans;if(n)for(var i,r=0;rn.start)return s}throw new Error("Mode "+t.name+" failed to advance stream.")}function Pi(e,t,n,i){function r(e){return{start:f.start,end:f.pos,string:f.current(),type:o||null,state:e?us(s.mode,c):c}}var o,s=e.doc,a=s.mode;t=ge(s,t);var l,u=Qi(s,t.line),c=Ge(e,t.line,n),f=new ms(u.text,e.options.tabSize);i&&(l=[]);for(;(i||f.pose.options.maxHighlightLength){a=!1;s&&ji(e,t,i,f.pos);f.pos=t.length;l=null}else l=Ai(Oi(n,f,i,p),o);if(p){var h=p[0].name;h&&(l="m-"+(l?h+" "+l:h))}if(!a||c!=l){for(;ue&&r.splice(l,1,e,r[l+1],i);l+=2;u=Math.min(e,i)}if(t)if(a.opaque){r.splice(n,l-n,e,"cm-overlay "+t);l=n+2}else for(;ne.options.maxHighlightLength?us(e.doc.mode,i):i);t.stateAfter=i;t.styles=r.styles;r.classes?t.styleClasses=r.classes:t.styleClasses&&(t.styleClasses=null);n===e.doc.frontier&&e.doc.frontier++}return t.styles}function ji(e,t,n,i){var r=e.doc.mode,o=new ms(t,e.options.tabSize);o.start=o.pos=i||0;""==t&&Ri(r,n);for(;!o.eol();){Oi(r,o,n);o.start=o.pos}}function Bi(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?ws:Es;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function qi(e,t){var n=zr("span",null,null,Eo?"padding-right: .1px":null),i={pre:zr("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:(xo||Eo)&&e.getOption("lineWrapping")};t.measure={};for(var r=0;r<=(t.rest?t.rest.length:0);r++){var o,s=r?t.rest[r-1]:t.line;i.pos=0;i.addToken=Ui;Jr(e.display.measure)&&(o=or(s))&&(i.addToken=zi(i.addToken,o));i.map=[];var a=t!=e.display.externalMeasured&&nr(s);Vi(s,i,Di(e,s,a));if(s.styleClasses){s.styleClasses.bgClass&&(i.bgClass=Zr(s.styleClasses.bgClass,i.bgClass||""));s.styleClasses.textClass&&(i.textClass=Zr(s.styleClasses.textClass,i.textClass||""))}0==i.map.length&&i.map.push(0,0,i.content.appendChild(Qr(e.display.measure)));if(0==r){t.measure.map=i.map;t.measure.cache={}}else{(t.measure.maps||(t.measure.maps=[])).push(i.map);(t.measure.caches||(t.measure.caches=[])).push({})}}if(Eo){var l=i.content.lastChild;(/\bcm-tab\b/.test(l.className)||l.querySelector&&l.querySelector(".cm-tab"))&&(i.content.className="cm-tab-wrap-hack")}ks(e,"renderLine",e,t.line,i.pre);i.pre.className&&(i.textClass=Zr(i.pre.className,i.textClass||""));return i}function Fi(e){var t=zr("span","•","cm-invalidchar");t.title="\\u"+e.charCodeAt(0).toString(16);t.setAttribute("aria-label",t.title);return t}function Ui(e,t,n,i,r,o,s){if(t){var a=e.splitSpaces?Gi(t,e.trailingSpace):t,l=e.cm.state.specialChars,u=!1;if(l.test(t))for(var c=document.createDocumentFragment(),f=0;;){l.lastIndex=f;var p=l.exec(t),h=p?p.index-f:t.length-f;if(h){var d=document.createTextNode(a.slice(f,f+h));xo&&_o<9?c.appendChild(zr("span",[d])):c.appendChild(d);e.map.push(e.pos,e.pos+h,d);e.col+=h;e.pos+=h}if(!p)break;f+=h+1;if("\t"==p[0]){var g=e.cm.options.tabSize,m=g-e.col%g,d=c.appendChild(zr("span",Or(m),"cm-tab"));d.setAttribute("role","presentation");d.setAttribute("cm-text","\t");e.col+=m}else if("\r"==p[0]||"\n"==p[0]){var d=c.appendChild(zr("span","\r"==p[0]?"␍":"␤","cm-invalidchar"));d.setAttribute("cm-text",p[0]);e.col+=1}else{var d=e.cm.options.specialCharPlaceholder(p[0]);d.setAttribute("cm-text",p[0]);xo&&_o<9?c.appendChild(zr("span",[d])):c.appendChild(d);e.col+=1}e.map.push(e.pos,e.pos+1,d);e.pos++}else{e.col+=t.length;var c=document.createTextNode(a);e.map.push(e.pos,e.pos+t.length,c);xo&&_o<9&&(u=!0);e.pos+=t.length}e.trailingSpace=32==a.charCodeAt(t.length-1);if(n||i||r||u||s){var v=n||"";i&&(v+=i);r&&(v+=r);var y=zr("span",[c],v,s);o&&(y.title=o);return e.content.appendChild(y)}e.content.appendChild(c)}}function Gi(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,i="",r=0;ru&&p.from<=u)break}if(p.to>=c)return e(n,i,r,o,s,a,l);e(n,i.slice(0,p.to-u),r,o,null,a,l);o=null;i=i.slice(p.to-u);u=p.to}}}function Hi(e,t,n,i){var r=!i&&n.widgetNode;r&&e.map.push(e.pos,e.pos+t,r);if(!i&&e.cm.display.input.needsContentAttribute){r||(r=e.content.appendChild(document.createElement("span")));r.setAttribute("cm-marker",n.id)}if(r){e.cm.display.input.setUneditable(r);e.content.appendChild(r)}e.pos+=t;e.trailingSpace=!1}function Vi(e,t,n){var i=e.markedSpans,r=e.text,o=0;if(i)for(var s,a,l,u,c,f,p,h=r.length,d=0,g=1,m="",v=0;;){if(v==d){l=u=c=f=a="";p=null;v=1/0;for(var y,b=[],x=0;xd||E.collapsed&&_.to==d&&_.from==d)){if(null!=_.to&&_.to!=d&&v>_.to){v=_.to;u=""}E.className&&(l+=" "+E.className);E.css&&(a=(a?a+";":"")+E.css);E.startStyle&&_.from==d&&(c+=" "+E.startStyle);E.endStyle&&_.to==v&&(y||(y=[])).push(E.endStyle,_.to);E.title&&!f&&(f=E.title);E.collapsed&&(!p||di(p.marker,E)<0)&&(p=_)}else _.from>d&&v>_.from&&(v=_.from)}if(y)for(var x=0;x=h)break;for(var w=Math.min(h,v);;){if(m){var T=d+m.length;if(!p){var S=T>w?m.slice(0,w-d):m;t.addToken(t,S,s?s+l:l,c,d+S.length==v?u:"",f,a)}if(T>=w){m=m.slice(w-d);d=w;break}d=T;c=""}m=r.slice(o,o=n[g++]);s=Bi(n[g++],t.cm.options)}}else for(var g=1;g1&&e.remove(a.line+1,d-1);e.insert(a.line+1,g)}Sr(e,"change",e,t)}function Zi(e){this.lines=e;this.parent=null;for(var t=0,n=0;t=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var i=0;;++i){var r=n.children[i],o=r.chunkSize();if(t1&&!e.done[e.done.length-2].ranges){e.done.pop();return Pr(e.done)}}function cr(e,t,n,i){var r=e.history;r.undone.length=0;var o,s=+new Date;if((r.lastOp==i||r.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&r.lastModTime>s-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=ur(r,r.lastOp==i))){var a=Pr(o.changes);0==Fo(t.from,t.to)&&0==Fo(t.from,a.to)?a.to=es(t):o.changes.push(ar(e,t))}else{var l=Pr(r.done);l&&l.ranges||hr(e.sel,r.done);o={changes:[ar(e,t)],generation:r.generation};r.done.push(o);for(;r.done.length>r.undoDepth;){r.done.shift();r.done[0].ranges||r.done.shift()}}r.done.push(n);r.generation=++r.maxGeneration;r.lastModTime=r.lastSelTime=s;r.lastOp=r.lastSelOp=i;r.lastOrigin=r.lastSelOrigin=t.origin;a||ks(e,"historyAdded")}function fr(e,t,n,i){var r=t.charAt(0);return"*"==r||"+"==r&&n.ranges.length==i.ranges.length&&n.somethingSelected()==i.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function pr(e,t,n,i){var r=e.history,o=i&&i.origin;n==r.lastSelOp||o&&r.lastSelOrigin==o&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==o||fr(e,o,Pr(r.done),t))?r.done[r.done.length-1]=t:hr(t,r.done);r.lastSelTime=+new Date;r.lastSelOrigin=o;r.lastSelOp=n;i&&i.clearRedo!==!1&&lr(r.undone)}function hr(e,t){var n=Pr(t);n&&n.ranges&&n.equals(e)||t.push(e)}function dr(e,t,n,i){var r=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,i),function(n){n.markedSpans&&((r||(r=t["spans_"+e.id]={}))[o]=n.markedSpans);++o})}function gr(e){if(!e)return null;for(var t,n=0;n-1){Pr(a)[f]=c[f];delete c[f]}}}}return r}function yr(e,t,n,i){if(n0?i.slice():Os:i||Os}function Sr(e,t){function n(e){return function(){e.apply(null,o)}}var i=Tr(e,t,!1);if(i.length){var r,o=Array.prototype.slice.call(arguments,2);if(Wo)r=Wo.delayedCallbacks;else if(Ms)r=Ms;else{r=Ms=[];setTimeout(Cr,0)}for(var s=0;s0}function Ar(e){e.prototype.on=function(e,t){Rs(this,e,t)};e.prototype.off=function(e,t){Ps(this,e,t)}}function Rr(){this.id=null}function Or(e){for(;zs.length<=e;)zs.push(Pr(zs)+" ");return zs[e]}function Pr(e){return e[e.length-1]}function kr(e,t){for(var n=0;n-1&&Ys(e))||t.test(e):Ys(e)}function Ur(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function Gr(e){return e.charCodeAt(0)>=768&&Zs.test(e)}function zr(e,t,n,i){var r=document.createElement(e);n&&(r.className=n);i&&(r.style.cssText=i);if("string"==typeof t)r.appendChild(document.createTextNode(t));else if(t)for(var o=0;o0;--t)e.removeChild(e.firstChild);return e}function Vr(e,t){return Hr(e).appendChild(t)}function Wr(){for(var e=document.activeElement;e&&e.root&&e.root.activeElement;)e=e.root.activeElement;return e}function Yr(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function Zr(e,t){for(var n=e.split(" "),i=0;i2&&!(xo&&_o<8))}var n=Ks?zr("span","​"):zr("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");n.setAttribute("cm-text","");return n}function Jr(e){if(null!=Xs)return Xs;var t=Vr(e,document.createTextNode("AخA")),n=Vs(t,0,1).getBoundingClientRect(),i=Vs(t,1,2).getBoundingClientRect();Hr(e);return!(!n||n.left==n.right)&&(Xs=i.right-n.right<3)}function eo(e){if(null!=oa)return oa;var t=Vr(e,zr("span","x")),n=t.getBoundingClientRect(),i=Vs(t,0,1).getBoundingClientRect();return oa=Math.abs(n.left-i.left)>1}function to(e,t,n,i){if(!e)return i(t,n,"ltr");for(var r=!1,o=0;ot||t==n&&s.to==t){i(Math.max(s.from,t),Math.min(s.to,n),1==s.level?"rtl":"ltr");r=!0}}r||i(t,n,"ltr")}function no(e){return e.level%2?e.to:e.from}function io(e){return e.level%2?e.from:e.to}function ro(e){var t=or(e);return t?no(t[0]):0}function oo(e){var t=or(e);return t?io(Pr(t)):e.text.length}function so(e,t){var n=Qi(e.doc,t),i=bi(n);i!=n&&(t=nr(i));var r=or(i),o=r?r[0].level%2?oo(i):ro(i):0;return qo(t,o)}function ao(e,t){for(var n,i=Qi(e.doc,t);n=vi(i);){i=n.find(1,!0).line;t=null}var r=or(i),o=r?r[0].level%2?ro(i):oo(i):i.text.length;return qo(null==t?nr(i):t,o)}function lo(e,t){var n=so(e,t.line),i=Qi(e.doc,n.line),r=or(i);if(!r||0==r[0].level){var o=Math.max(0,i.text.search(/\S/)),s=t.line==n.line&&t.ch<=o&&t.ch;return qo(n.line,s?0:o)}return n}function uo(e,t,n){var i=e[0].level;return t==i||n!=i&&tt)return i;if(r.from==t||r.to==t){if(null!=n){if(uo(e,r.level,e[n].level)){r.from!=r.to&&(aa=n);return i}r.from!=r.to&&(aa=i);return n}n=i}}return n}function fo(e,t,n,i){if(!i)return t+n;do t+=n;while(t>0&&Gr(e.text.charAt(t)));return t}function po(e,t,n,i){var r=or(e);if(!r)return ho(e,t,n,i);for(var o=co(r,t),s=r[o],a=fo(e,t,s.level%2?-n:n,i);;){if(a>s.from&&a0==s.level%2?s.to:s.from}s=r[o+=n];if(!s)return null;a=n>0==s.level%2?fo(e,s.to,-1,i):fo(e,s.from,1,i)}}function ho(e,t,n,i){var r=t+n;if(i)for(;r>0&&Gr(e.text.charAt(r));)r+=n;return r<0||r>e.text.length?null:r}var go=navigator.userAgent,mo=navigator.platform,vo=/gecko\/\d/i.test(go),yo=/MSIE \d/.test(go),bo=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(go),xo=yo||bo,_o=xo&&(yo?document.documentMode||6:bo[1]),Eo=/WebKit\//.test(go),wo=Eo&&/Qt\/\d+\.\d+/.test(go),To=/Chrome\//.test(go),So=/Opera\//.test(go),Co=/Apple Computer/.test(navigator.vendor),Lo=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(go),No=/PhantomJS/.test(go),Io=/AppleWebKit/.test(go)&&/Mobile\/\w+/.test(go),Ao=Io||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(go),Ro=Io||/Mac/.test(mo),Oo=/\bCrOS\b/.test(go),Po=/win/i.test(mo),ko=So&&go.match(/Version\/(\d*\.\d*)/);ko&&(ko=Number(ko[1]));if(ko&&ko>=15){So=!1;Eo=!0}var Mo=Ro&&(wo||So&&(null==ko||ko<12.11)),Do=vo||xo&&_o>=9,jo=!1,Bo=!1;g.prototype=Br({update:function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,i=e.nativeBarWidth;if(n){this.vert.style.display="block";this.vert.style.bottom=t?i+"px":"0";var r=e.viewHeight-(t?i:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+r)+"px"}else{this.vert.style.display="";this.vert.firstChild.style.height="0"}if(t){this.horiz.style.display="block";this.horiz.style.right=n?i+"px":"0";this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?i:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+o+"px"}else{this.horiz.style.display="";this.horiz.firstChild.style.width="0"}if(!this.checkedZeroWidth&&e.clientHeight>0){0==i&&this.zeroWidthHack();this.checkedZeroWidth=!0}return{right:n?i:0,bottom:t?i:0}},setScrollLeft:function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e);this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz)},setScrollTop:function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e);this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert)},zeroWidthHack:function(){var e=Ro&&!Lo?"12px":"18px";this.horiz.style.height=this.vert.style.width=e;this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none";this.disableHoriz=new Rr;this.disableVert=new Rr},enableZeroWidthBar:function(e,t){function n(){var i=e.getBoundingClientRect(),r=document.elementFromPoint(i.left+1,i.bottom-1);r!=e?e.style.pointerEvents="none":t.set(1e3,n)}e.style.pointerEvents="auto";t.set(1e3,n)},clear:function(){var e=this.horiz.parentNode;e.removeChild(this.horiz);e.removeChild(this.vert)}},g.prototype);m.prototype=Br({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},m.prototype);e.scrollbarModel={"native":g,"null":m};S.prototype.signal=function(e,t){Ir(e,t)&&this.events.push(arguments)};S.prototype.finish=function(){for(var e=0;e=9&&n.hasSelection&&(n.hasSelection=null);n.poll()});Rs(o,"paste",function(e){if(!Lr(i,e)&&!Q(e,i)){i.state.pasteIncoming=!0;n.fastPoll()}});Rs(o,"cut",t);Rs(o,"copy",t);Rs(e.scroller,"paste",function(t){if(!Wt(e,t)&&!Lr(i,t)){i.state.pasteIncoming=!0;n.focus()}});Rs(e.lineSpace,"selectstart",function(t){Wt(e,t)||Ns(t)});Rs(o,"compositionstart",function(){var e=i.getCursor("from");n.composing&&n.composing.range.clear();n.composing={start:e,range:i.markText(e,i.getCursor("to"),{className:"CodeMirror-composing"})}});Rs(o,"compositionend",function(){if(n.composing){n.poll();n.composing.range.clear();n.composing=null}})},prepareSelection:function(){var e=this.cm,t=e.display,n=e.doc,i=Me(e);if(e.options.moveInputWithCursor){var r=dt(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),s=t.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,r.top+s.top-o.top));i.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,r.left+s.left-o.left))}return i},showSelection:function(e){var t=this.cm,n=t.display;Vr(n.cursorDiv,e.cursors);Vr(n.selectionDiv,e.selection);if(null!=e.teTop){this.wrapper.style.top=e.teTop+"px";this.wrapper.style.left=e.teLeft+"px"}},reset:function(e){if(!this.contextMenuPending){var t,n,i=this.cm,r=i.doc;if(i.somethingSelected()){this.prevInput="";var o=r.sel.primary();t=ra&&(o.to().line-o.from().line>100||(n=i.getSelection()).length>1e3);var s=t?"-":n||i.getSelection();this.textarea.value=s;i.state.focused&&Hs(this.textarea);xo&&_o>=9&&(this.hasSelection=s)}else if(!e){this.prevInput=this.textarea.value="";xo&&_o>=9&&(this.hasSelection=null)}this.inaccurateSelection=t}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!Ao||Wr()!=this.textarea))try{this.textarea.focus()}catch(e){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var e=this;e.pollingFast||e.polling.set(this.cm.options.pollInterval,function(){e.poll();e.cm.state.focused&&e.slowPoll()})},fastPoll:function(){function e(){var i=n.poll();if(i||t){n.pollingFast=!1;n.slowPoll()}else{t=!0;n.polling.set(60,e)}}var t=!1,n=this;n.pollingFast=!0;n.polling.set(20,e)},poll:function(){var e=this.cm,t=this.textarea,n=this.prevInput;if(this.contextMenuPending||!e.state.focused||ia(t)&&!n&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var i=t.value;if(i==n&&!e.somethingSelected())return!1;if(xo&&_o>=9&&this.hasSelection===i||Ro&&/[\uf700-\uf7ff]/.test(i)){e.display.input.reset();return!1}if(e.doc.sel==e.display.selForContextMenu){var r=i.charCodeAt(0);8203!=r||n||(n="​");if(8666==r){this.reset();return this.cm.execCommand("undo")}}for(var o=0,s=Math.min(n.length,i.length);o1e3||i.indexOf("\n")>-1?t.value=a.prevInput="":a.prevInput=i;if(a.composing){a.composing.range.clear();a.composing.range=e.markText(a.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"})}});return!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){xo&&_o>=9&&(this.hasSelection=null);this.fastPoll()},onContextMenu:function(e){function t(){if(null!=s.selectionStart){var e=r.somethingSelected(),t="​"+(e?s.value:"");s.value="⇚";s.value=t;i.prevInput=e?"":"​";s.selectionStart=1;s.selectionEnd=t.length;o.selForContextMenu=r.doc.sel}}function n(){i.contextMenuPending=!1;i.wrapper.style.cssText=f;s.style.cssText=c;xo&&_o<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=l);if(null!=s.selectionStart){(!xo||xo&&_o<9)&&t();var e=0,n=function(){o.selForContextMenu==r.doc.sel&&0==s.selectionStart&&s.selectionEnd>0&&"​"==i.prevInput?Rt(r,fs.selectAll)(r):e++<10?o.detectingSelectAll=setTimeout(n,500):o.input.reset()};o.detectingSelectAll=setTimeout(n,200)}}var i=this,r=i.cm,o=r.display,s=i.textarea,a=Yt(r,e),l=o.scroller.scrollTop;if(a&&!So){var u=r.options.resetSelectionOnContextMenu;u&&r.doc.sel.contains(a)==-1&&Rt(r,Ce)(r.doc,he(a),Bs);var c=s.style.cssText,f=i.wrapper.style.cssText;i.wrapper.style.cssText="position: absolute";var p=i.wrapper.getBoundingClientRect();s.style.cssText="position: absolute; width: 30px; height: 30px; top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px; z-index: 1000; background: "+(xo?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";if(Eo)var h=window.scrollY;o.input.focus();Eo&&window.scrollTo(null,h);o.input.reset();r.somethingSelected()||(s.value=i.prevInput=" ");i.contextMenuPending=!0;o.selForContextMenu=r.doc.sel;clearTimeout(o.detectingSelectAll);xo&&_o>=9&&t();if(Do){As(e);var d=function(){Ps(window,"mouseup",d);setTimeout(n,20)};Rs(window,"mouseup",d)}else setTimeout(n,50)}},readOnlyChanged:function(e){e||this.reset()},setUneditable:Dr,needsContentAttribute:!1},ne.prototype);re.prototype=Br({init:function(e){function t(e){if(!Lr(i,e)){if(i.somethingSelected()){Uo={lineWise:!1,text:i.getSelections()};"cut"==e.type&&i.replaceSelection("",null,"cut")}else{if(!i.options.lineWiseCopyCut)return;var t=ee(i);Uo={lineWise:!0,text:t.text};"cut"==e.type&&i.operation(function(){i.setSelections(t.ranges,0,Bs);i.replaceSelection("",null,"cut")})}if(e.clipboardData&&!Io){e.preventDefault();e.clipboardData.clearData();e.clipboardData.setData("text/plain",Uo.text.join("\n"))}else{var n=ie(),r=n.firstChild;i.display.lineSpace.insertBefore(n,i.display.lineSpace.firstChild);r.value=Uo.text.join("\n");var o=document.activeElement;Hs(r);setTimeout(function(){i.display.lineSpace.removeChild(n);o.focus()},50)}}}var n=this,i=n.cm,r=n.div=e.lineDiv;te(r);Rs(r,"paste",function(e){Lr(i,e)||Q(e,i)});Rs(r,"compositionstart",function(e){var t=e.data;n.composing={sel:i.doc.sel,data:t,startData:t};if(t){var r=i.doc.sel.primary(),o=i.getLine(r.head.line),s=o.indexOf(t,Math.max(0,r.head.ch-t.length));s>-1&&s<=r.head.ch&&(n.composing.sel=he(qo(r.head.line,s),qo(r.head.line,s+t.length)))}});Rs(r,"compositionupdate",function(e){n.composing.data=e.data});Rs(r,"compositionend",function(e){var t=n.composing;if(t){e.data==t.startData||/\u200b/.test(e.data)||(t.data=e.data);setTimeout(function(){t.handled||n.applyComposition(t);n.composing==t&&(n.composing=null)},50)}});Rs(r,"touchstart",function(){n.forceCompositionEnd()});Rs(r,"input",function(){n.composing||!i.isReadOnly()&&n.pollContent()||At(n.cm,function(){Dt(i)})});Rs(r,"copy",t);Rs(r,"cut",t)},prepareSelection:function(){var e=Me(this.cm,!1);e.focus=this.cm.state.focused;return e},showSelection:function(e,t){if(e&&this.cm.display.view.length){(e.focus||t)&&this.showPrimarySelection();this.showMultipleSelections(e)}},showPrimarySelection:function(){var e=window.getSelection(),t=this.cm.doc.sel.primary(),n=ae(this.cm,e.anchorNode,e.anchorOffset),i=ae(this.cm,e.focusNode,e.focusOffset); if(!n||n.bad||!i||i.bad||0!=Fo($(n,i),t.from())||0!=Fo(Z(n,i),t.to())){var r=oe(this.cm,t.from()),o=oe(this.cm,t.to());if(r||o){var s=this.cm.display.view,a=e.rangeCount&&e.getRangeAt(0);if(r){if(!o){var l=s[s.length-1].measure,u=l.maps?l.maps[l.maps.length-1]:l.map;o={node:u[u.length-1],offset:u[u.length-2]-u[u.length-3]}}}else r={node:s[0].measure.map[2],offset:0};try{var c=Vs(r.node,r.offset,o.offset,o.node)}catch(f){}if(c){if(!vo&&this.cm.state.focused){e.collapse(r.node,r.offset);c.collapsed||e.addRange(c)}else{e.removeAllRanges();e.addRange(c)}a&&null==e.anchorNode?e.addRange(a):vo&&this.startGracePeriod()}this.rememberSelection()}}},startGracePeriod:function(){var e=this;clearTimeout(this.gracePeriod);this.gracePeriod=setTimeout(function(){e.gracePeriod=!1;e.selectionChanged()&&e.cm.operation(function(){e.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(e){Vr(this.cm.display.cursorDiv,e.cursors);Vr(this.cm.display.selectionDiv,e.selection)},rememberSelection:function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode;this.lastAnchorOffset=e.anchorOffset;this.lastFocusNode=e.focusNode;this.lastFocusOffset=e.focusOffset},selectionInEditor:function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return $s(this.div,t)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function e(){if(t.cm.state.focused){t.pollSelection();t.polling.set(t.cm.options.pollInterval,e)}}var t=this;this.selectionInEditor()?this.pollSelection():At(this.cm,function(){t.cm.curOp.selectionChanged=!0});this.polling.set(this.cm.options.pollInterval,e)},selectionChanged:function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;this.rememberSelection();var n=ae(t,e.anchorNode,e.anchorOffset),i=ae(t,e.focusNode,e.focusOffset);n&&i&&At(t,function(){Ce(t.doc,he(n,i),Bs);(n.bad||i.bad)&&(t.curOp.selectionChanged=!0)})}},pollContent:function(){var e=this.cm,t=e.display,n=e.doc.sel.primary(),i=n.from(),r=n.to();if(i.linet.viewTo-1)return!1;var o;if(i.line==t.viewFrom||0==(o=qt(e,i.line)))var s=nr(t.view[0].line),a=t.view[0].node;else var s=nr(t.view[o].line),a=t.view[o-1].node.nextSibling;var l=qt(e,r.line);if(l==t.view.length-1)var u=t.viewTo-1,c=t.lineDiv.lastChild;else var u=nr(t.view[l+1].line)-1,c=t.view[l+1].node.previousSibling;for(var f=e.doc.splitLines(ue(e,a,c,s,u)),p=Ji(e.doc,qo(s,0),qo(u,Qi(e.doc,u).text.length));f.length>1&&p.length>1;)if(Pr(f)==Pr(p)){f.pop();p.pop();u--}else{if(f[0]!=p[0])break;f.shift();p.shift();s++}for(var h=0,d=0,g=f[0],m=p[0],v=Math.min(g.length,m.length);h1||f[0]||Fo(_,E)){Pn(e.doc,f,_,E,"+input");return!0}},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){if(this.composing&&!this.composing.handled){this.applyComposition(this.composing);this.composing.handled=!0;this.div.blur();this.div.focus()}},applyComposition:function(e){this.cm.isReadOnly()?Rt(this.cm,Dt)(this.cm):e.data&&e.data!=e.startData&&Rt(this.cm,X)(this.cm,e.data,0,e.sel)},setUneditable:function(e){e.contentEditable="false"},onKeyPress:function(e){e.preventDefault();this.cm.isReadOnly()||Rt(this.cm,X)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0)},readOnlyChanged:function(e){this.div.contentEditable=String("nocursor"!=e)},onContextMenu:Dr,resetPosition:Dr,needsContentAttribute:!0},re.prototype);e.inputStyles={textarea:ne,contenteditable:re};ce.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t=0&&Fo(e,i.to())<=0)return n}return-1}};fe.prototype={from:function(){return $(this.anchor,this.head)},to:function(){return Z(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var Go,zo,Ho,Vo={left:0,right:0,top:0,bottom:0},Wo=null,Yo=0,Zo=0,$o=0,Ko=null;xo?Ko=-.53:vo?Ko=15:To?Ko=-.7:Co&&(Ko=-1/3);var Xo=function(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail);null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta);return{x:t,y:n}};e.wheelEventPixels=function(e){var t=Xo(e);t.x*=Ko;t.y*=Ko;return t};var Qo=new Rr,Jo=null,es=e.changeEnd=function(e){return e.text?qo(e.from.line+e.text.length-1,Pr(e.text).length+(1==e.text.length?e.from.ch:0)):e.to};e.prototype={constructor:e,focus:function(){window.focus();this.display.input.focus()},setOption:function(e,t){var n=this.options,i=n[e];if(n[e]!=t||"mode"==e){n[e]=t;ns.hasOwnProperty(e)&&Rt(this,ns[e])(this,t,i)}},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Zn(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn){Un(this,r.head.line,e,!0);n=r.head.line;i==this.doc.sel.primIndex&&qn(this)}}else{var o=r.from(),s=r.to(),a=Math.max(n,o.line);n=Math.min(this.lastLine(),s.line-(s.ch?0:1))+1;for(var l=a;l0&&Ee(this.doc,i,new fe(o,u[i].to()),Bs)}}}),getTokenAt:function(e,t){return Pi(this,e,t)},getLineTokens:function(e,t){return Pi(this,qo(e),t,!0)},getTokenTypeAt:function(e){e=ge(this.doc,e);var t,n=Di(this,Qi(this.doc,e.line)),i=0,r=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var s=i+r>>1;if((s?n[2*s-1]:0)>=o)r=s;else{if(!(n[2*s+1]r){e=r;i=!0}n=Qi(this.doc,e)}else n=e;return ft(this,n,{top:0,left:0},t||"page").top+(i?this.doc.height-rr(n):0)},defaultTextHeight:function(){return bt(this.display)},defaultCharWidth:function(){return xt(this.display)},setGutterMarker:Ot(function(e,t,n){return Gn(this.doc,e,"gutter",function(e){var i=e.gutterMarkers||(e.gutterMarkers={});i[t]=n;!n&&Ur(i)&&(e.gutterMarkers=null);return!0})}),clearGutter:Ot(function(e){var t=this,n=t.doc,i=n.first;n.iter(function(n){if(n.gutterMarkers&&n.gutterMarkers[e]){n.gutterMarkers[e]=null;jt(t,i,"gutter");Ur(n.gutterMarkers)&&(n.gutterMarkers=null)}++i})}),lineInfo:function(e){if("number"==typeof e){if(!ve(this.doc,e))return null;var t=e;e=Qi(this.doc,e);if(!e)return null}else{var t=nr(e);if(null==t)return null}return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,i,r){var o=this.display;e=dt(this,ge(this.doc,e));var s=e.bottom,a=e.left;t.style.position="absolute";t.setAttribute("cm-ignore-events","true");this.display.input.setUneditable(t);o.sizer.appendChild(t);if("over"==i)s=e.top;else if("above"==i||"near"==i){var l=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==i||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?s=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(s=e.bottom);a+t.offsetWidth>u&&(a=u-t.offsetWidth)}t.style.top=s+"px";t.style.left=t.style.right="";if("right"==r){a=o.sizer.clientWidth-t.offsetWidth;t.style.right="0px"}else{"left"==r?a=0:"middle"==r&&(a=(o.sizer.clientWidth-t.offsetWidth)/2);t.style.left=a+"px"}n&&Dn(this,a,s,a+t.offsetWidth,s+t.offsetHeight)},triggerOnKeyDown:Ot(hn),triggerOnKeyPress:Ot(mn),triggerOnKeyUp:gn,execCommand:function(e){if(fs.hasOwnProperty(e))return fs[e].call(null,this)},triggerElectric:Ot(function(e){J(this,e)}),findPosH:function(e,t,n,i){var r=1;if(t<0){r=-1;t=-t}for(var o=0,s=ge(this.doc,e);o0&&a(n.charAt(i-1));)--i;for(;r.5)&&s(this);ks(this,"refresh",this)}),swapDoc:Ot(function(e){var t=this.doc;t.cm=null;Xi(this,e);lt(this);this.display.input.reset();this.scrollTo(e.scrollLeft,e.scrollTop);this.curOp.forceScroll=!0;Sr(this,"swapDoc",this,t);return t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}};Ar(e);var ts=e.defaults={},ns=e.optionHandlers={},is=e.Init={toString:function(){return"CodeMirror.Init"}};Wn("value","",function(e,t){e.setValue(t)},!0);Wn("mode",null,function(e,t){e.doc.modeOption=t;n(e)},!0);Wn("indentUnit",2,n,!0);Wn("indentWithTabs",!1);Wn("smartIndent",!0);Wn("tabSize",4,function(e){i(e);lt(e);Dt(e)},!0);Wn("lineSeparator",null,function(e,t){e.doc.lineSep=t;if(t){var n=[],i=e.doc.first;e.doc.iter(function(e){for(var r=0;;){var o=e.text.indexOf(t,r);if(o==-1)break;r=o+t.length;n.push(qo(i,o))}i++});for(var r=n.length-1;r>=0;r--)Pn(e.doc,t,n[r],qo(n[r].line,n[r].ch+t.length))}});Wn("specialChars",/[\u0000-\u001f\u007f\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,n,i){t.state.specialChars=new RegExp(n.source+(n.test("\t")?"":"|\t"),"g");i!=e.Init&&t.refresh()});Wn("specialCharPlaceholder",Fi,function(e){e.refresh()},!0);Wn("electricChars",!0);Wn("inputStyle",Ao?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0);Wn("rtlMoveVisually",!Po);Wn("wholeLineUpdateBefore",!0);Wn("theme","default",function(e){a(e);l(e)},!0);Wn("keyMap","default",function(t,n,i){var r=Zn(n),o=i!=e.Init&&Zn(i);o&&o.detach&&o.detach(t,r);r.attach&&r.attach(t,o||null)});Wn("extraKeys",null);Wn("lineWrapping",!1,r,!0);Wn("gutters",[],function(e){h(e.options);l(e)},!0);Wn("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?T(e.display)+"px":"0";e.refresh()},!0);Wn("coverGutterNextToScrollbar",!1,function(e){y(e)},!0);Wn("scrollbarStyle","native",function(e){v(e);y(e);e.display.scrollbars.setScrollTop(e.doc.scrollTop);e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0);Wn("lineNumbers",!1,function(e){h(e.options);l(e)},!0);Wn("firstLineNumber",1,l,!0);Wn("lineNumberFormatter",function(e){return e},l,!0);Wn("showCursorWhenSelecting",!1,ke,!0);Wn("resetSelectionOnContextMenu",!0);Wn("lineWiseCopyCut",!0);Wn("readOnly",!1,function(e,t){if("nocursor"==t){bn(e);e.display.input.blur();e.display.disabled=!0}else e.display.disabled=!1;e.display.input.readOnlyChanged(t)});Wn("disableInput",!1,function(e,t){t||e.display.input.reset()},!0);Wn("dragDrop",!0,Ht);Wn("allowDropFileTypes",null);Wn("cursorBlinkRate",530);Wn("cursorScrollMargin",0);Wn("cursorHeight",1,ke,!0);Wn("singleCursorHeightPerLine",!0,ke,!0);Wn("workTime",100);Wn("workDelay",100);Wn("flattenSpans",!0,i,!0);Wn("addModeClass",!1,i,!0);Wn("pollInterval",100);Wn("undoDepth",200,function(e,t){e.doc.history.undoDepth=t});Wn("historyEventDelay",1250);Wn("viewportMargin",10,function(e){e.refresh()},!0);Wn("maxHighlightLength",1e4,i,!0);Wn("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()});Wn("tabindex",null,function(e,t){e.display.input.getField().tabIndex=t||""});Wn("autofocus",null);var rs=e.modes={},os=e.mimeModes={};e.defineMode=function(t,n){e.defaults.mode||"null"==t||(e.defaults.mode=t);arguments.length>2&&(n.dependencies=Array.prototype.slice.call(arguments,2));rs[t]=n};e.defineMIME=function(e,t){os[e]=t};e.resolveMode=function(t){if("string"==typeof t&&os.hasOwnProperty(t))t=os[t];else if(t&&"string"==typeof t.name&&os.hasOwnProperty(t.name)){var n=os[t.name];"string"==typeof n&&(n={name:n});t=jr(n,t);t.name=n.name}else if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return e.resolveMode("application/xml");return"string"==typeof t?{name:t}:t||{name:"null"}};e.getMode=function(t,n){var n=e.resolveMode(n),i=rs[n.name];if(!i)return e.getMode(t,"text/plain");var r=i(t,n);if(ss.hasOwnProperty(n.name)){var o=ss[n.name];for(var s in o)if(o.hasOwnProperty(s)){r.hasOwnProperty(s)&&(r["_"+s]=r[s]);r[s]=o[s]}}r.name=n.name;n.helperType&&(r.helperType=n.helperType);if(n.modeProps)for(var s in n.modeProps)r[s]=n.modeProps[s];return r};e.defineMode("null",function(){return{token:function(e){e.skipToEnd()}}});e.defineMIME("text/plain","null");var ss=e.modeExtensions={};e.extendMode=function(e,t){var n=ss.hasOwnProperty(e)?ss[e]:ss[e]={};Br(t,n)};e.defineExtension=function(t,n){e.prototype[t]=n};e.defineDocExtension=function(e,t){Ss.prototype[e]=t};e.defineOption=Wn;var as=[];e.defineInitHook=function(e){as.push(e)};var ls=e.helpers={};e.registerHelper=function(t,n,i){ls.hasOwnProperty(t)||(ls[t]=e[t]={_global:[]});ls[t][n]=i};e.registerGlobalHelper=function(t,n,i,r){e.registerHelper(t,n,r);ls[t]._global.push({pred:i,val:r})};var us=e.copyState=function(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var i in t){var r=t[i];r instanceof Array&&(r=r.concat([]));n[i]=r}return n},cs=e.startState=function(e,t,n){return!e.startState||e.startState(t,n)};e.innerMode=function(e,t){for(;e.innerMode;){var n=e.innerMode(t);if(!n||n.mode==e)break;t=n.state;e=n.mode}return n||{mode:e,state:t}};var fs=e.commands={selectAll:function(e){e.setSelection(qo(e.firstLine(),0),qo(e.lastLine()),Bs)},singleSelection:function(e){e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Bs)},killLine:function(e){zn(e,function(t){if(t.empty()){var n=Qi(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0){r=new qo(r.line,r.ch+1);e.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),qo(r.line,r.ch-2),r,"+transpose")}else if(r.line>e.doc.first){var s=Qi(e.doc,r.line-1).text;s&&e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+s.charAt(s.length-1),qo(r.line-1,s.length-1),qo(r.line,1),"+transpose")}}n.push(new fe(r,r))}e.setSelections(n)})},newlineAndIndent:function(e){At(e,function(){for(var t=e.listSelections().length,n=0;n=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.post},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(t>-1){this.pos=t;return!0}},backUp:function(e){this.pos-=e},column:function(){if(this.lastColumnPos0)return null;i&&t!==!1&&(this.pos+=i[0].length);return i}var r=function(e){return n?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);if(r(o)==r(e)){t!==!1&&(this.pos+=e.length);return!0}},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};var vs=0,ys=e.TextMarker=function(e,t){this.lines=[];this.type=t;this.doc=e;this.id=++vs};Ar(ys);ys.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;t&&_t(e);if(Ir(this,"clear")){var n=this.find();n&&Sr(this,"clear",n.from,n.to)}for(var i=null,r=null,o=0;oe.display.maxLineLength){e.display.maxLine=l;e.display.maxLineLength=u;e.display.maxLineChanged=!0}}null!=i&&e&&this.collapsed&&Dt(e,i,r+1);this.lines.length=0;this.explicitlyCleared=!0;if(this.atomic&&this.doc.cantEdit){this.doc.cantEdit=!1;e&&Ie(e.doc)}e&&Sr(e,"markerCleared",e,this);t&&wt(e);this.parent&&this.parent.clear()}};ys.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var n,i,r=0;r1||!(this.children[0]instanceof Zi))){var a=[];this.collapse(a);this.children=[new Zi(a)];this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var s=r.lines.length%25+25,a=s;a10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var i=0;i=0;o--)Ln(this,i[o]);a?Se(this,a):this.cm&&qn(this.cm)}),undo:Pt(function(){In(this,"undo")}),redo:Pt(function(){In(this,"redo")}),undoSelection:Pt(function(){In(this,"undo",!0)}),redoSelection:Pt(function(){In(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,i=0;i=e.ch)&&t.push(r.marker.parent||r.marker)}return t},findMarks:function(e,t,n){e=ge(this,e);t=ge(this,t);var i=[],r=e.line;this.iter(e.line,t.line+1,function(o){var s=o.markedSpans;if(s)for(var a=0;a=l.to||null==l.from&&r!=e.line||null!=l.from&&r==t.line&&l.from>=t.ch||n&&!n(l.marker)||i.push(l.marker.parent||l.marker)}++r});return i},getAllMarks:function(){var e=[];this.iter(function(t){var n=t.markedSpans;if(n)for(var i=0;ie){t=e;return!0}e-=o;++n});return ge(this,qo(n,t))},indexFromPos:function(e){e=ge(this,e);var t=e.ch;if(e.linet&&(t=e.from);null!=e.to&&e.to=t)return s+(t-o);s+=a-o;s+=n-s%n;o=a+1}},Gs=e.findColumn=function(e,t,n){for(var i=0,r=0;;){var o=e.indexOf("\t",i);o==-1&&(o=e.length);var s=o-i;if(o==e.length||r+s>=t)return i+Math.min(s,t-r);r+=o-i;r+=n-r%n;i=o+1;if(r>=t)return i}},zs=[""],Hs=function(e){e.select()};Io?Hs=function(e){e.selectionStart=0;e.selectionEnd=e.value.length}:xo&&(Hs=function(e){try{e.select()}catch(t){}});var Vs,Ws=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Ys=e.isWordChar=function(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||Ws.test(e))},Zs=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;Vs=document.createRange?function(e,t,n,i){var r=document.createRange();r.setEnd(i||e,n);r.setStart(e,t);return r}:function(e,t,n){var i=document.body.createTextRange();try{i.moveToElementText(e.parentNode)}catch(r){return i}i.collapse(!0);i.moveEnd("character",n);i.moveStart("character",t);return i};var $s=e.contains=function(e,t){3==t.nodeType&&(t=t.parentNode);if(e.contains)return e.contains(t);do{11==t.nodeType&&(t=t.host);if(t==e)return!0}while(t=t.parentNode)};xo&&_o<11&&(Wr=function(){try{return document.activeElement}catch(e){return document.body}});var Ks,Xs,Qs=e.rmClass=function(e,t){var n=e.className,i=Yr(t).exec(n);if(i){var r=n.slice(i.index+i[0].length);e.className=n.slice(0,i.index)+(r?i[1]+r:"")}},Js=e.addClass=function(e,t){var n=e.className;Yr(t).test(n)||(e.className+=(n?" ":"")+t)},ea=!1,ta=function(){if(xo&&_o<9)return!1;var e=zr("div");return"draggable"in e||"dragDrop"in e}(),na=e.splitLines=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],i=e.length;t<=i;){var r=e.indexOf("\n",t);r==-1&&(r=e.length);var o=e.slice(t,"\r"==e.charAt(r-1)?r-1:r),s=o.indexOf("\r");if(s!=-1){n.push(o.slice(0,s));t+=s+1}else{n.push(o);t=r+1}}return n}:function(e){return e.split(/\r\n?|\n/)},ia=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(n){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},ra=function(){var e=zr("div");if("oncopy"in e)return!0;e.setAttribute("oncopy","return;");return"function"==typeof e.oncopy}(),oa=null,sa=e.keyNames={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};(function(){for(var e=0;e<10;e++)sa[e+48]=sa[e+96]=String(e);for(var e=65;e<=90;e++)sa[e]=String.fromCharCode(e);for(var e=1;e<=12;e++)sa[e+111]=sa[e+63235]="F"+e})();var aa,la=function(){function e(e){return e<=247?n.charAt(e):1424<=e&&e<=1524?"R":1536<=e&&e<=1773?i.charAt(e-1536):1774<=e&&e<=2220?"r":8192<=e&&e<=8203?"w":8204==e?"b":"L"}function t(e,t,n){this.level=e;this.from=t;this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",i="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,s=/[LRr]/,a=/[Lb1n]/,l=/[1n]/,u="L";return function(n){if(!r.test(n))return!1;for(var i,c=n.length,f=[],p=0;p)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}e.defineMode("javascript",function(n,i){function r(e){for(var t,n=!1,i=!1;null!=(t=e.next());){if(!n){if("/"==t&&!i)return;"["==t?i=!0:i&&"]"==t&&(i=!1)}n=!n&&"\\"==t}}function o(e,t,n){be=e;xe=n;return t}function s(e,n){var i=e.next();if('"'==i||"'"==i){n.tokenize=a(i);return n.tokenize(e,n)}if("."==i&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return o("number","number");if("."==i&&e.match(".."))return o("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(i))return o(i);if("="==i&&e.eat(">"))return o("=>","operator");if("0"==i&&e.eat(/x/i)){e.eatWhile(/[\da-f]/i);return o("number","number")}if("0"==i&&e.eat(/o/i)){e.eatWhile(/[0-7]/i);return o("number","number")}if("0"==i&&e.eat(/b/i)){e.eatWhile(/[01]/i);return o("number","number")}if(/\d/.test(i)){e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return o("number","number")}if("/"==i){if(e.eat("*")){n.tokenize=l;return l(e,n)}if(e.eat("/")){e.skipToEnd();return o("comment","comment")}if(t(e,n,1)){r(e);e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/);return o("regexp","string-2")}e.eatWhile(Ne);return o("operator","operator",e.current())}if("`"==i){n.tokenize=u;return u(e,n)}if("#"==i){e.skipToEnd();return o("error","error")}if(Ne.test(i)){e.eatWhile(Ne);return o("operator","operator",e.current())}if(Ce.test(i)){e.eatWhile(Ce);var s=e.current(),c=Le.propertyIsEnumerable(s)&&Le[s];return c&&"."!=n.lastType?o(c.type,c.style,s):o("variable","variable",s)}}function a(e){return function(t,n){var i,r=!1;if(we&&"@"==t.peek()&&t.match(Ie)){n.tokenize=s;return o("jsonld-keyword","meta")}for(;null!=(i=t.next())&&(i!=e||r);)r=!r&&"\\"==i;r||(n.tokenize=s);return o("string","string")}}function l(e,t){for(var n,i=!1;n=e.next();){if("/"==n&&i){t.tokenize=s;break}i="*"==n}return o("comment","comment")}function u(e,t){for(var n,i=!1;null!=(n=e.next());){if(!i&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=s;break}i=!i&&"\\"==n}return o("quasi","string-2",e.current())}function c(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(n<0)){for(var i=0,r=!1,o=n-1;o>=0;--o){var s=e.string.charAt(o),a=Ae.indexOf(s);if(a>=0&&a<3){if(!i){++o;break}if(0==--i)break}else if(a>=3&&a<6)++i;else if(Ce.test(s))r=!0;else{if(/["'\/]/.test(s))return;if(r&&!i){++o;break}}}r&&!i&&(t.fatArrowAt=o)}}function f(e,t,n,i,r,o){this.indented=e;this.column=t;this.type=n;this.prev=r;this.info=o;null!=i&&(this.align=i)}function p(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var i=e.context;i;i=i.prev)for(var n=i.vars;n;n=n.next)if(n.name==t)return!0}function h(e,t,n,i,r){var o=e.cc;Oe.state=e;Oe.stream=r;Oe.marked=null,Oe.cc=o;Oe.style=t;e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);for(;;){var s=o.length?o.pop():Te?w:E;if(s(n,i)){for(;o.length&&o[o.length-1].lex;)o.pop()();return Oe.marked?Oe.marked:"variable"==n&&p(e,i)?"variable-2":t}}}function d(){for(var e=arguments.length-1;e>=0;e--)Oe.cc.push(arguments[e])}function g(){d.apply(null,arguments);return!0}function m(e){function t(t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}var n=Oe.state;Oe.marked="def";if(n.context){if(t(n.localVars))return;n.localVars={name:e,next:n.localVars}}else{if(t(n.globalVars))return;i.globalVars&&(n.globalVars={name:e,next:n.globalVars})}}function v(){Oe.state.context={prev:Oe.state.context,vars:Oe.state.localVars};Oe.state.localVars=Pe}function y(){Oe.state.localVars=Oe.state.context.vars;Oe.state.context=Oe.state.context.prev}function b(e,t){var n=function(){var n=Oe.state,i=n.indented;if("stat"==n.lexical.type)i=n.lexical.indented;else for(var r=n.lexical;r&&")"==r.type&&r.align;r=r.prev)i=r.indented;n.lexical=new f(i,Oe.stream.column(),e,null,n.lexical,t)};n.lex=!0;return n}function x(){var e=Oe.state;if(e.lexical.prev){")"==e.lexical.type&&(e.indented=e.lexical.indented);e.lexical=e.lexical.prev}}function _(e){function t(n){return n==e?g():";"==e?d():g(t)}return t}function E(e,t){if("var"==e)return g(b("vardef",t.length),$,_(";"),x);if("keyword a"==e)return g(b("form"),w,E,x);if("keyword b"==e)return g(b("form"),E,x);if("{"==e)return g(b("}"),H,x);if(";"==e)return g();if("if"==e){"else"==Oe.state.lexical.info&&Oe.state.cc[Oe.state.cc.length-1]==x&&Oe.state.cc.pop()();return g(b("form"),w,E,x,ee)}return"function"==e?g(se):"for"==e?g(b("form"),te,E,x):"variable"==e?g(b("stat"),j):"switch"==e?g(b("form"),w,b("}","switch"),_("{"),H,x,x):"case"==e?g(w,_(":")):"default"==e?g(_(":")):"catch"==e?g(b("form"),v,_("("),ae,_(")"),E,x,y):"class"==e?g(b("form"),le,x):"export"==e?g(b("stat"),pe,x):"import"==e?g(b("stat"),he,x):"module"==e?g(b("form"),K,b("}"),_("{"),H,x,x):"async"==e?g(E):d(b("stat"),w,_(";"),x)}function w(e){return S(e,!1)}function T(e){return S(e,!0)}function S(e,t){if(Oe.state.fatArrowAt==Oe.stream.start){var n=t?P:O;if("("==e)return g(v,b(")"),G(K,")"),x,_("=>"),n,y);if("variable"==e)return d(v,K,_("=>"),n,y)}var i=t?I:N;return Re.hasOwnProperty(e)?g(i):"function"==e?g(se,i):"keyword c"==e||"async"==e?g(t?L:C):"("==e?g(b(")"),C,_(")"),x,i):"operator"==e||"spread"==e?g(t?T:w):"["==e?g(b("]"),ve,x,i):"{"==e?z(q,"}",null,i):"quasi"==e?d(A,i):"new"==e?g(k(t)):g()}function C(e){return e.match(/[;\}\)\],]/)?d():d(w)}function L(e){return e.match(/[;\}\)\],]/)?d():d(T)}function N(e,t){return","==e?g(w):I(e,t,!1)}function I(e,t,n){var i=0==n?N:I,r=0==n?w:T;return"=>"==e?g(v,n?P:O,y):"operator"==e?/\+\+|--/.test(t)?g(i):"?"==t?g(w,_(":"),r):g(r):"quasi"==e?d(A,i):";"!=e?"("==e?z(T,")","call",i):"."==e?g(B,i):"["==e?g(b("]"),C,_("]"),x,i):void 0:void 0}function A(e,t){return"quasi"!=e?d():"${"!=t.slice(t.length-2)?g(A):g(w,R)}function R(e){if("}"==e){Oe.marked="string-2";Oe.state.tokenize=u;return g(A)}}function O(e){c(Oe.stream,Oe.state);return d("{"==e?E:w)}function P(e){c(Oe.stream,Oe.state);return d("{"==e?E:T)}function k(e){return function(t){return"."==t?g(e?D:M):d(e?T:w)}}function M(e,t){if("target"==t){Oe.marked="keyword";return g(N)}}function D(e,t){if("target"==t){Oe.marked="keyword";return g(I)}}function j(e){return":"==e?g(x,E):d(N,_(";"),x)}function B(e){if("variable"==e){Oe.marked="property";return g()}}function q(e,t){if("async"==e)return g(q);if("variable"==e||"keyword"==Oe.style){Oe.marked="property";return g("get"==t||"set"==t?F:U)}if("number"==e||"string"==e){Oe.marked=we?"property":Oe.style+" property";return g(U)}return"jsonld-keyword"==e?g(U):"modifier"==e?g(q):"["==e?g(w,_("]"),U):"spread"==e?g(w):void 0}function F(e){if("variable"!=e)return d(U);Oe.marked="property";return g(se)}function U(e){return":"==e?g(T):"("==e?d(se):void 0}function G(e,t){function n(i,r){if(","==i){var o=Oe.state.lexical;"call"==o.info&&(o.pos=(o.pos||0)+1);return g(function(n,i){return n==t||i==t?d():d(e)},n)}return i==t||r==t?g():g(_(t))}return function(i,r){return i==t||r==t?g():d(e,n)}}function z(e,t,n){for(var i=3;i"),Z):"["==e?g(_("]"),Z):void 0}function $(){return d(K,V,Q,J)}function K(e,t){if("modifier"==e)return g(K);if("variable"==e){m(t);return g()}return"spread"==e?g(K):"["==e?z(K,"]"):"{"==e?z(X,"}"):void 0}function X(e,t){if("variable"==e&&!Oe.stream.match(/^\s*:/,!1)){m(t);return g(Q)}"variable"==e&&(Oe.marked="property");return"spread"==e?g(K):"}"==e?d():g(_(":"),K,Q)}function Q(e,t){if("="==t)return g(T)}function J(e){if(","==e)return g($)}function ee(e,t){if("keyword b"==e&&"else"==t)return g(b("form","else"),E,x)}function te(e){if("("==e)return g(b(")"),ne,_(")"),x)}function ne(e){return"var"==e?g($,_(";"),re):";"==e?g(re):"variable"==e?g(ie):d(w,_(";"),re)}function ie(e,t){if("in"==t||"of"==t){Oe.marked="keyword";return g(w)}return g(N,re)}function re(e,t){if(";"==e)return g(oe);if("in"==t||"of"==t){Oe.marked="keyword";return g(w)}return d(w,_(";"),oe)}function oe(e){")"!=e&&g(w)}function se(e,t){if("*"==t){Oe.marked="keyword";return g(se)}if("variable"==e){m(t);return g(se)}if("("==e)return g(v,b(")"),G(ae,")"),x,V,E,y)}function ae(e){return"spread"==e?g(ae):d(K,V,W)}function le(e,t){if("variable"==e){m(t);return g(ue)}}function ue(e,t){return"extends"==t?g(w,ue):"{"==e?g(b("}"),ce,x):void 0}function ce(e,t){if("variable"==e||"keyword"==Oe.style){if("static"==t){Oe.marked="keyword";return g(ce)}Oe.marked="property";return"get"==t||"set"==t?g(fe,se,ce):g(se,ce)}if("*"==t){Oe.marked="keyword";return g(ce)}return";"==e?g(ce):"}"==e?g():void 0}function fe(e){if("variable"!=e)return d();Oe.marked="property";return g()}function pe(e,t){if("*"==t){Oe.marked="keyword";return g(me,_(";"))}if("default"==t){Oe.marked="keyword";return g(w,_(";"))}return d(E)}function he(e){return"string"==e?g():d(de,me)}function de(e,t){if("{"==e)return z(de,"}");"variable"==e&&m(t);"*"==t&&(Oe.marked="keyword");return g(ge)}function ge(e,t){if("as"==t){Oe.marked="keyword";return g(de)}}function me(e,t){if("from"==t){Oe.marked="keyword";return g(w)}}function ve(e){return"]"==e?g():d(T,G(T,"]"))}function ye(e,t){return"operator"==e.lastType||","==e.lastType||Ne.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}var be,xe,_e=n.indentUnit,Ee=i.statementIndent,we=i.jsonld,Te=i.json||we,Se=i.typescript,Ce=i.wordCharacters||/[\w$\xa1-\uffff]/,Le=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),i=e("keyword c"),r=e("operator"),o={type:"atom",style:"atom"},s={"if":e("if"),"while":t,"with":t,"else":n,"do":n,"try":n,"finally":n,"return":i,"break":i,"continue":i,"new":e("new"),"delete":i,"throw":i,"debugger":i,"var":e("var"),"const":e("var"),"let":e("var"),"function":e("function"),"catch":e("catch"),"for":e("for"),"switch":e("switch"),"case":e("case"),"default":e("default"),"in":r,"typeof":r,"instanceof":r,"true":o,"false":o,"null":o,undefined:o,NaN:o,Infinity:o,"this":e("this"),"class":e("class"),"super":e("atom"),"yield":i,"export":e("export"),"import":e("import"),"extends":i,await:i,async:e("async")};if(Se){var a={type:"variable",style:"variable-3"},l={"interface":e("class"),"implements":i,namespace:i,module:e("module"),"enum":e("module"),"public":e("modifier"),"private":e("modifier"),"protected":e("modifier"),"abstract":e("modifier"),as:r,string:a,number:a,"boolean":a,any:a};for(var u in l)s[u]=l[u]}return s}(),Ne=/[+\-*&%=<>!?|~^]/,Ie=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Ae="([{}])",Re={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0,"jsonld-keyword":!0},Oe={state:null,column:null,marked:null,cc:null},Pe={name:"this",next:{name:"arguments"}};x.lex=!0;return{startState:function(e){var t={tokenize:s,lastType:"sof",cc:[],lexical:new f((e||0)-_e,0,"block",(!1)),localVars:i.localVars,context:i.localVars&&{vars:i.localVars},indented:e||0};i.globalVars&&"object"==typeof i.globalVars&&(t.globalVars=i.globalVars);return t},token:function(e,t){if(e.sol()){t.lexical.hasOwnProperty("align")||(t.lexical.align=!1);t.indented=e.indentation();c(e,t)}if(t.tokenize!=l&&e.eatSpace())return null;var n=t.tokenize(e,t);if("comment"==be)return n;t.lastType="operator"!=be||"++"!=xe&&"--"!=xe?be:"incdec";return h(t,n,be,xe,e)},indent:function(t,n){if(t.tokenize==l)return e.Pass;if(t.tokenize!=s)return 0;var r=n&&n.charAt(0),o=t.lexical;if(!/^\s*else\b/.test(n))for(var a=t.cc.length-1;a>=0;--a){var u=t.cc[a];if(u==x)o=o.prev;else if(u!=ee)break}"stat"==o.type&&"}"==r&&(o=o.prev);Ee&&")"==o.type&&"stat"==o.prev.type&&(o=o.prev);var c=o.type,f=r==c;return"vardef"==c?o.indented+("operator"==t.lastType||","==t.lastType?o.info+1:0):"form"==c&&"{"==r?o.indented:"form"==c?o.indented+_e:"stat"==c?o.indented+(ye(t,n)?Ee||_e:0):"switch"!=o.info||f||0==i.doubleIndentSwitch?o.align?o.column+(f?0:1):o.indented+(f?0:_e):o.indented+(/^(?:case|default)\b/.test(n)?_e:2*_e)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Te?null:"/*", blockCommentEnd:Te?null:"*/",lineComment:Te?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Te?"json":"javascript",jsonldMode:we,jsonMode:Te,expressionAllowed:t,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=w&&t!=T||e.cc.pop()}}});e.registerHelper("wordChars","javascript",/[\w$]/);e.defineMIME("text/javascript","javascript");e.defineMIME("text/ecmascript","javascript");e.defineMIME("application/javascript","javascript");e.defineMIME("application/x-javascript","javascript");e.defineMIME("application/ecmascript","javascript");e.defineMIME("application/json",{name:"javascript",json:!0});e.defineMIME("application/x-json",{name:"javascript",json:!0});e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0});e.defineMIME("text/typescript",{name:"javascript",typescript:!0});e.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},{"../../lib/codemirror":17}],19:[function(e,t,n){(function(i){"object"==typeof n&&"object"==typeof t?i(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1};e.defineMode("xml",function(i,r){function o(e,t){function n(n){t.tokenize=n;return n(e,t)}var i=e.next();if("<"==i){if(e.eat("!")){if(e.eat("["))return e.match("CDATA[")?n(l("atom","]]>")):null;if(e.match("--"))return n(l("comment","-->"));if(e.match("DOCTYPE",!0,!0)){e.eatWhile(/[\w\._\-]/);return n(u(1))}return null}if(e.eat("?")){e.eatWhile(/[\w\._\-]/);t.tokenize=l("meta","?>");return"meta"}C=e.eat("/")?"closeTag":"openTag";t.tokenize=s;return"tag bracket"}if("&"==i){var r;r=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";");return r?"atom":"error"}e.eatWhile(/[^&<]/);return null}function s(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">")){t.tokenize=o;C=">"==n?"endTag":"selfcloseTag";return"tag bracket"}if("="==n){C="equals";return null}if("<"==n){t.tokenize=o;t.state=h;t.tagName=t.tagStart=null;var i=t.tokenize(e,t);return i?i+" tag error":"tag error"}if(/[\'\"]/.test(n)){t.tokenize=a(n);t.stringStartCol=e.column();return t.tokenize(e,t)}e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);return"word"}function a(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=s;break}return"string"};t.isInAttribute=!0;return t}function l(e,t){return function(n,i){for(;!n.eol();){if(n.match(t)){i.tokenize=o;break}n.next()}return e}}function u(e){return function(t,n){for(var i;null!=(i=t.next());){if("<"==i){n.tokenize=u(e+1);return n.tokenize(t,n)}if(">"==i){if(1==e){n.tokenize=o;break}n.tokenize=u(e-1);return n.tokenize(t,n)}}return"meta"}}function c(e,t,n){this.prev=e.context;this.tagName=t;this.indent=e.indented;this.startOfLine=n;(w.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function f(e){e.context&&(e.context=e.context.prev)}function p(e,t){for(var n;;){if(!e.context)return;n=e.context.tagName;if(!w.contextGrabbers.hasOwnProperty(n)||!w.contextGrabbers[n].hasOwnProperty(t))return;f(e)}}function h(e,t,n){if("openTag"==e){n.tagStart=t.column();return d}return"closeTag"==e?g:h}function d(e,t,n){if("word"==e){n.tagName=t.current();L="tag";return y}L="error";return d}function g(e,t,n){if("word"==e){var i=t.current();n.context&&n.context.tagName!=i&&w.implicitlyClosed.hasOwnProperty(n.context.tagName)&&f(n);if(n.context&&n.context.tagName==i||w.matchClosing===!1){L="tag";return m}L="tag error";return v}L="error";return v}function m(e,t,n){if("endTag"!=e){L="error";return m}f(n);return h}function v(e,t,n){L="error";return m(e,t,n)}function y(e,t,n){if("word"==e){L="attribute";return b}if("endTag"==e||"selfcloseTag"==e){var i=n.tagName,r=n.tagStart;n.tagName=n.tagStart=null;if("selfcloseTag"==e||w.autoSelfClosers.hasOwnProperty(i))p(n,i);else{p(n,i);n.context=new c(n,i,r==n.indented)}return h}L="error";return y}function b(e,t,n){if("equals"==e)return x;w.allowMissing||(L="error");return y(e,t,n)}function x(e,t,n){if("string"==e)return _;if("word"==e&&w.allowUnquoted){L="string";return y}L="error";return y(e,t,n)}function _(e,t,n){return"string"==e?_:y(e,t,n)}var E=i.indentUnit,w={},T=r.htmlMode?t:n;for(var S in T)w[S]=T[S];for(var S in r)w[S]=r[S];var C,L;o.isInText=!0;return{startState:function(e){var t={tokenize:o,state:h,indented:e||0,tagName:null,tagStart:null,context:null};null!=e&&(t.baseIndent=e);return t},token:function(e,t){!t.tagName&&e.sol()&&(t.indented=e.indentation());if(e.eatSpace())return null;C=null;var n=t.tokenize(e,t);if((n||C)&&"comment"!=n){L=null;t.state=t.state(C||n,e,t);L&&(n="error"==L?n+" error":L)}return n},indent:function(t,n,i){var r=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+E;if(r&&r.noIndent)return e.Pass;if(t.tokenize!=s&&t.tokenize!=o)return i?i.match(/^(\s*)/)[0].length:0;if(t.tagName)return w.multilineTagIndentPastTag!==!1?t.tagStart+t.tagName.length+2:t.tagStart+E*(w.multilineTagIndentFactor||1);if(w.alignCDATA&&/$/,blockCommentStart:"",configuration:w.htmlMode?"html":"xml",helperType:w.htmlMode?"html":"xml",skipAttribute:function(e){e.state==x&&(e.state=y)}}});e.defineMIME("text/xml","xml");e.defineMIME("application/xml","xml");e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})})},{"../../lib/codemirror":17}],20:[function(e,t,n){function i(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)+Math.pow(e[2]-t[2],2)}var r=e("color-name"),o={};for(var s in r)r.hasOwnProperty(s)&&(o[r[s]]=s);var a=t.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var l in a)if(a.hasOwnProperty(l)){if(!("channels"in a[l]))throw new Error("missing channels property: "+l);if(!("labels"in a[l]))throw new Error("missing channel labels property: "+l);if(a[l].labels.length!==a[l].channels)throw new Error("channel and label counts mismatch: "+l);var u=a[l].channels,c=a[l].labels;delete a[l].channels;delete a[l].labels;Object.defineProperty(a[l],"channels",{value:u});Object.defineProperty(a[l],"labels",{value:c})}a.rgb.hsl=function(e){var t,n,i,r=e[0]/255,o=e[1]/255,s=e[2]/255,a=Math.min(r,o,s),l=Math.max(r,o,s),u=l-a;l===a?t=0:r===l?t=(o-s)/u:o===l?t=2+(s-r)/u:s===l&&(t=4+(r-o)/u);t=Math.min(60*t,360);t<0&&(t+=360);i=(a+l)/2;n=l===a?0:i<=.5?u/(l+a):u/(2-l-a);return[t,100*n,100*i]};a.rgb.hsv=function(e){var t,n,i,r=e[0],o=e[1],s=e[2],a=Math.min(r,o,s),l=Math.max(r,o,s),u=l-a;n=0===l?0:u/l*1e3/10;l===a?t=0:r===l?t=(o-s)/u:o===l?t=2+(s-r)/u:s===l&&(t=4+(r-o)/u);t=Math.min(60*t,360);t<0&&(t+=360);i=l/255*1e3/10;return[t,n,i]};a.rgb.hwb=function(e){var t=e[0],n=e[1],i=e[2],r=a.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(n,i));i=1-1/255*Math.max(t,Math.max(n,i));return[r,100*o,100*i]};a.rgb.cmyk=function(e){var t,n,i,r,o=e[0]/255,s=e[1]/255,a=e[2]/255;r=Math.min(1-o,1-s,1-a);t=(1-o-r)/(1-r)||0;n=(1-s-r)/(1-r)||0;i=(1-a-r)/(1-r)||0;return[100*t,100*n,100*i,100*r]};a.rgb.keyword=function(e){var t=o[e];if(t)return t;var n,s=1/0;for(var a in r)if(r.hasOwnProperty(a)){var l=r[a],u=i(e,l);if(u.04045?Math.pow((t+.055)/1.055,2.4):t/12.92;n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92;i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92;var r=.4124*t+.3576*n+.1805*i,o=.2126*t+.7152*n+.0722*i,s=.0193*t+.1192*n+.9505*i;return[100*r,100*o,100*s]};a.rgb.lab=function(e){var t,n,i,r=a.rgb.xyz(e),o=r[0],s=r[1],l=r[2];o/=95.047;s/=100;l/=108.883;o=o>.008856?Math.pow(o,1/3):7.787*o+16/116;s=s>.008856?Math.pow(s,1/3):7.787*s+16/116;l=l>.008856?Math.pow(l,1/3):7.787*l+16/116;t=116*s-16;n=500*(o-s);i=200*(s-l);return[t,n,i]};a.hsl.rgb=function(e){var t,n,i,r,o,s=e[0]/360,a=e[1]/100,l=e[2]/100;if(0===a){o=255*l;return[o,o,o]}n=l<.5?l*(1+a):l+a-l*a;t=2*l-n;r=[0,0,0];for(var u=0;u<3;u++){i=s+1/3*-(u-1);i<0&&i++;i>1&&i--;o=6*i<1?t+6*(n-t)*i:2*i<1?n:3*i<2?t+(n-t)*(2/3-i)*6:t;r[u]=255*o}return r};a.hsl.hsv=function(e){var t,n,i=e[0],r=e[1]/100,o=e[2]/100,s=r,a=Math.max(o,.01);o*=2;r*=o<=1?o:2-o;s*=a<=1?a:2-a;n=(o+r)/2;t=0===o?2*s/(a+s):2*r/(o+r);return[i,100*t,100*n]};a.hsv.rgb=function(e){var t=e[0]/60,n=e[1]/100,i=e[2]/100,r=Math.floor(t)%6,o=t-Math.floor(t),s=255*i*(1-n),a=255*i*(1-n*o),l=255*i*(1-n*(1-o));i*=255;switch(r){case 0:return[i,l,s];case 1:return[a,i,s];case 2:return[s,i,l];case 3:return[s,a,i];case 4:return[l,s,i];case 5:return[i,s,a]}};a.hsv.hsl=function(e){var t,n,i,r=e[0],o=e[1]/100,s=e[2]/100,a=Math.max(s,.01);i=(2-o)*s;t=(2-o)*a;n=o*a;n/=t<=1?t:2-t;n=n||0;i/=2;return[r,100*n,100*i]};a.hwb.rgb=function(e){var t,n,i,r,o=e[0]/360,s=e[1]/100,a=e[2]/100,l=s+a;if(l>1){s/=l;a/=l}t=Math.floor(6*o);n=1-a;i=6*o-t;0!==(1&t)&&(i=1-i);r=s+i*(n-s);var u,c,f;switch(t){default:case 6:case 0:u=n;c=r;f=s;break;case 1:u=r;c=n;f=s;break;case 2:u=s;c=n;f=r;break;case 3:u=s;c=r;f=n;break;case 4:u=r;c=s;f=n;break;case 5:u=n;c=s;f=r}return[255*u,255*c,255*f]};a.cmyk.rgb=function(e){var t,n,i,r=e[0]/100,o=e[1]/100,s=e[2]/100,a=e[3]/100;t=1-Math.min(1,r*(1-a)+a);n=1-Math.min(1,o*(1-a)+a);i=1-Math.min(1,s*(1-a)+a);return[255*t,255*n,255*i]};a.xyz.rgb=function(e){var t,n,i,r=e[0]/100,o=e[1]/100,s=e[2]/100;t=3.2406*r+o*-1.5372+s*-.4986;n=r*-.9689+1.8758*o+.0415*s;i=.0557*r+o*-.204+1.057*s;t=t>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t;n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n;i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:12.92*i;t=Math.min(Math.max(0,t),1);n=Math.min(Math.max(0,n),1);i=Math.min(Math.max(0,i),1);return[255*t,255*n,255*i]};a.xyz.lab=function(e){var t,n,i,r=e[0],o=e[1],s=e[2];r/=95.047;o/=100;s/=108.883;r=r>.008856?Math.pow(r,1/3):7.787*r+16/116;o=o>.008856?Math.pow(o,1/3):7.787*o+16/116;s=s>.008856?Math.pow(s,1/3):7.787*s+16/116;t=116*o-16;n=500*(r-o);i=200*(o-s);return[t,n,i]};a.lab.xyz=function(e){var t,n,i,r=e[0],o=e[1],s=e[2];n=(r+16)/116;t=o/500+n;i=n-s/200;var a=Math.pow(n,3),l=Math.pow(t,3),u=Math.pow(i,3);n=a>.008856?a:(n-16/116)/7.787;t=l>.008856?l:(t-16/116)/7.787;i=u>.008856?u:(i-16/116)/7.787;t*=95.047;n*=100;i*=108.883;return[t,n,i]};a.lab.lch=function(e){var t,n,i,r=e[0],o=e[1],s=e[2];t=Math.atan2(s,o);n=360*t/2/Math.PI;n<0&&(n+=360);i=Math.sqrt(o*o+s*s);return[r,i,n]};a.lch.lab=function(e){var t,n,i,r=e[0],o=e[1],s=e[2];i=s/360*2*Math.PI;t=o*Math.cos(i);n=o*Math.sin(i);return[r,t,n]};a.rgb.ansi16=function(e){var t=e[0],n=e[1],i=e[2],r=1 in arguments?arguments[1]:a.rgb.hsv(e)[2];r=Math.round(r/50);if(0===r)return 30;var o=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(t/255));2===r&&(o+=60);return o};a.hsv.ansi16=function(e){return a.rgb.ansi16(a.hsv.rgb(e),e[2])};a.rgb.ansi256=function(e){var t=e[0],n=e[1],i=e[2];if(t===n&&n===i)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;var r=16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5);return r};a.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t){e>50&&(t+=3.5);t=t/10.5*255;return[t,t,t]}var n=.5*(~~(e>50)+1),i=(1&t)*n*255,r=(t>>1&1)*n*255,o=(t>>2&1)*n*255;return[i,r,o]};a.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}e-=16;var n,i=Math.floor(e/36)/5*255,r=Math.floor((n=e%36)/6)/5*255,o=n%6/5*255;return[i,r,o]};a.rgb.hex=function(e){var t=((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2])),n=t.toString(16).toUpperCase();return"000000".substring(n.length)+n};a.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var n=t[0];3===t[0].length&&(n=n.split("").map(function(e){return e+e}).join(""));var i=parseInt(n,16),r=i>>16&255,o=i>>8&255,s=255&i;return[r,o,s]};a.rgb.hcg=function(e){var t,n,i=e[0]/255,r=e[1]/255,o=e[2]/255,s=Math.max(Math.max(i,r),o),a=Math.min(Math.min(i,r),o),l=s-a;t=l<1?a/(1-l):0;n=l<=0?0:s===i?(r-o)/l%6:s===r?2+(o-i)/l:4+(i-r)/l+4;n/=6;n%=1;return[360*n,100*l,100*t]};a.hsl.hcg=function(e){var t=e[1]/100,n=e[2]/100,i=1,r=0;i=n<.5?2*t*n:2*t*(1-n);i<1&&(r=(n-.5*i)/(1-i));return[e[0],100*i,100*r]};a.hsv.hcg=function(e){var t=e[1]/100,n=e[2]/100,i=t*n,r=0;i<1&&(r=(n-i)/(1-i));return[e[0],100*i,100*r]};a.hcg.rgb=function(e){var t=e[0]/360,n=e[1]/100,i=e[2]/100;if(0===n)return[255*i,255*i,255*i];var r=[0,0,0],o=t%1*6,s=o%1,a=1-s,l=0;switch(Math.floor(o)){case 0:r[0]=1;r[1]=s;r[2]=0;break;case 1:r[0]=a;r[1]=1;r[2]=0;break;case 2:r[0]=0;r[1]=1;r[2]=s;break;case 3:r[0]=0;r[1]=a;r[2]=1;break;case 4:r[0]=s;r[1]=0;r[2]=1;break;default:r[0]=1;r[1]=0;r[2]=a}l=(1-n)*i;return[255*(n*r[0]+l),255*(n*r[1]+l),255*(n*r[2]+l)]};a.hcg.hsv=function(e){var t=e[1]/100,n=e[2]/100,i=t+n*(1-t),r=0;i>0&&(r=t/i);return[e[0],100*r,100*i]};a.hcg.hsl=function(e){var t=e[1]/100,n=e[2]/100,i=n*(1-t)+.5*t,r=0;i>0&&i<.5?r=t/(2*i):i>=.5&&i<1&&(r=t/(2*(1-i)));return[e[0],100*r,100*i]};a.hcg.hwb=function(e){var t=e[1]/100,n=e[2]/100,i=t+n*(1-t);return[e[0],100*(i-t),100*(1-i)]};a.hwb.hcg=function(e){var t=e[1]/100,n=e[2]/100,i=1-n,r=i-t,o=0;r<1&&(o=(i-r)/(1-r));return[e[0],100*r,100*o]};a.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};a.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};a.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};a.gray.hsl=a.gray.hsv=function(e){return[0,0,e[0]]};a.gray.hwb=function(e){return[0,100,e[0]]};a.gray.cmyk=function(e){return[0,0,0,e[0]]};a.gray.lab=function(e){return[e[0],0,0]};a.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),n=(t<<16)+(t<<8)+t,i=n.toString(16).toUpperCase();return"000000".substring(i.length)+i};a.rgb.gray=function(e){var t=(e[0]+e[1]+e[2])/3;return[t/255*100]}},{"color-name":23}],21:[function(e,t,n){function i(e){var t=function(t){if(void 0===t||null===t)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));return e(t)};"conversion"in e&&(t.conversion=e.conversion);return t}function r(e){var t=function(t){if(void 0===t||null===t)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var n=e(t);if("object"==typeof n)for(var i=n.length,r=0;r=4&&1!==e[3]&&(t=", "+e[3]);return"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};u.to.keyword=function(e){return a[e.slice(0,3)]}},{"color-name":23,"simple-swizzle":216}],25:[function(e,t,n){"use strict";function i(e,t){if(!(this instanceof i))return new i(e,t);t&&t in h&&(t=null);if(t&&!(t in f))throw new Error("Unknown model: "+t);var n,r;if(e)if(e instanceof i){this.model=e.model;this.color=e.color.slice();this.valpha=e.valpha}else if("string"==typeof e){var o=c.get(e);if(null===o)throw new Error("Unable to parse color from string: "+e);this.model=o.model;r=f[this.model].channels;this.color=o.value.slice(0,r);this.valpha="number"==typeof o.value[r]?o.value[r]:1}else if(e.length){this.model=t||"rgb";r=f[this.model].channels;var s=p.call(e,0,r);this.color=u(s,r);this.valpha="number"==typeof e[r]?e[r]:1}else if("number"==typeof e){e&=16777215;this.model="rgb";this.color=[e>>16&255,e>>8&255,255&e];this.valpha=1}else{this.valpha=1;var a=Object.keys(e);if("alpha"in e){a.splice(a.indexOf("alpha"),1);this.valpha="number"==typeof e.alpha?e.alpha:0}var l=a.sort().join("");if(!(l in d))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=d[l];var m=f[this.model].labels,v=[];for(n=0;nn?(t+.05)/(n+.05):(n+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7.1?"AAA":t>=4.5?"AA":""},dark:function(){var e=this.rgb().color,t=(299*e[0]+587*e[1]+114*e[2])/1e3;return t<128},light:function(){return!this.dark()},negate:function(){for(var e=this.rgb(),t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten:function(e){var t=this.hsl();t.color[2]+=t.color[2]*e;return t},darken:function(e){var t=this.hsl();t.color[2]-=t.color[2]*e;return t},saturate:function(e){var t=this.hsl();t.color[1]+=t.color[1]*e;return t},desaturate:function(e){var t=this.hsl();t.color[1]-=t.color[1]*e;return t},whiten:function(e){var t=this.hwb();t.color[1]+=t.color[1]*e;return t},blacken:function(e){var t=this.hwb();t.color[2]+=t.color[2]*e;return t},grayscale:function(){var e=this.rgb().color,t=.3*e[0]+.59*e[1]+.11*e[2];return i.rgb(t,t,t)},fade:function(e){return this.alpha(this.valpha-this.valpha*e)},opaquer:function(e){return this.alpha(this.valpha+this.valpha*e)},rotate:function(e){var t=this.hsl(),n=t.color[0];n=(n+e)%360;n=n<0?360+n:n;t.color[0]=n;return t},mix:function(e,t){var n=this.rgb(),r=e.rgb(),o=void 0===t?.5:t,s=2*o-1,a=n.alpha()-r.alpha(),l=((s*a===-1?s:(s+a)/(1+s*a))+1)/2,u=1-l;return i.rgb(l*n.red()+u*r.red(),l*n.green()+u*r.green(),l*n.blue()+u*r.blue(),n.alpha()*o+r.alpha()*(1-o))}};Object.keys(f).forEach(function(e){if(h.indexOf(e)===-1){var t=f[e].channels;i.prototype[e]=function(){if(this.model===e)return new i(this);if(arguments.length)return new i(arguments,e);var n="number"==typeof arguments[t]?t:this.valpha;return new i(l(f[this.model][e].raw(this.color)).concat(n),e)};i[e]=function(n){"number"==typeof n&&(n=u(p.call(arguments),t));return new i(n,e)}}});t.exports=i},{"color-convert":21,"color-string":24}],26:[function(e,t,n){!function(){var e={YlGn:{3:["#f7fcb9","#addd8e","#31a354"],4:["#ffffcc","#c2e699","#78c679","#238443"],5:["#ffffcc","#c2e699","#78c679","#31a354","#006837"],6:["#ffffcc","#d9f0a3","#addd8e","#78c679","#31a354","#006837"],7:["#ffffcc","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],8:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],9:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"]},YlGnBu:{3:["#edf8b1","#7fcdbb","#2c7fb8"],4:["#ffffcc","#a1dab4","#41b6c4","#225ea8"],5:["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"],6:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#2c7fb8","#253494"],7:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],8:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],9:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"]},GnBu:{3:["#e0f3db","#a8ddb5","#43a2ca"],4:["#f0f9e8","#bae4bc","#7bccc4","#2b8cbe"],5:["#f0f9e8","#bae4bc","#7bccc4","#43a2ca","#0868ac"],6:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#43a2ca","#0868ac"],7:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],8:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],9:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"]},BuGn:{3:["#e5f5f9","#99d8c9","#2ca25f"],4:["#edf8fb","#b2e2e2","#66c2a4","#238b45"],5:["#edf8fb","#b2e2e2","#66c2a4","#2ca25f","#006d2c"],6:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#2ca25f","#006d2c"],7:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],8:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],9:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"]},PuBuGn:{3:["#ece2f0","#a6bddb","#1c9099"],4:["#f6eff7","#bdc9e1","#67a9cf","#02818a"],5:["#f6eff7","#bdc9e1","#67a9cf","#1c9099","#016c59"],6:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#1c9099","#016c59"],7:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],8:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],9:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"]},PuBu:{3:["#ece7f2","#a6bddb","#2b8cbe"],4:["#f1eef6","#bdc9e1","#74a9cf","#0570b0"],5:["#f1eef6","#bdc9e1","#74a9cf","#2b8cbe","#045a8d"], 6:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#2b8cbe","#045a8d"],7:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],8:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],9:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"]},BuPu:{3:["#e0ecf4","#9ebcda","#8856a7"],4:["#edf8fb","#b3cde3","#8c96c6","#88419d"],5:["#edf8fb","#b3cde3","#8c96c6","#8856a7","#810f7c"],6:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8856a7","#810f7c"],7:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],8:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],9:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"]},RdPu:{3:["#fde0dd","#fa9fb5","#c51b8a"],4:["#feebe2","#fbb4b9","#f768a1","#ae017e"],5:["#feebe2","#fbb4b9","#f768a1","#c51b8a","#7a0177"],6:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#c51b8a","#7a0177"],7:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],8:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],9:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"]},PuRd:{3:["#e7e1ef","#c994c7","#dd1c77"],4:["#f1eef6","#d7b5d8","#df65b0","#ce1256"],5:["#f1eef6","#d7b5d8","#df65b0","#dd1c77","#980043"],6:["#f1eef6","#d4b9da","#c994c7","#df65b0","#dd1c77","#980043"],7:["#f1eef6","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],8:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],9:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"]},OrRd:{3:["#fee8c8","#fdbb84","#e34a33"],4:["#fef0d9","#fdcc8a","#fc8d59","#d7301f"],5:["#fef0d9","#fdcc8a","#fc8d59","#e34a33","#b30000"],6:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#e34a33","#b30000"],7:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],8:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],9:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"]},YlOrRd:{3:["#ffeda0","#feb24c","#f03b20"],4:["#ffffb2","#fecc5c","#fd8d3c","#e31a1c"],5:["#ffffb2","#fecc5c","#fd8d3c","#f03b20","#bd0026"],6:["#ffffb2","#fed976","#feb24c","#fd8d3c","#f03b20","#bd0026"],7:["#ffffb2","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],8:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],9:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"]},YlOrBr:{3:["#fff7bc","#fec44f","#d95f0e"],4:["#ffffd4","#fed98e","#fe9929","#cc4c02"],5:["#ffffd4","#fed98e","#fe9929","#d95f0e","#993404"],6:["#ffffd4","#fee391","#fec44f","#fe9929","#d95f0e","#993404"],7:["#ffffd4","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],8:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],9:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"]},Purples:{3:["#efedf5","#bcbddc","#756bb1"],4:["#f2f0f7","#cbc9e2","#9e9ac8","#6a51a3"],5:["#f2f0f7","#cbc9e2","#9e9ac8","#756bb1","#54278f"],6:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#756bb1","#54278f"],7:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],8:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],9:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"]},Blues:{3:["#deebf7","#9ecae1","#3182bd"],4:["#eff3ff","#bdd7e7","#6baed6","#2171b5"],5:["#eff3ff","#bdd7e7","#6baed6","#3182bd","#08519c"],6:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#3182bd","#08519c"],7:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],8:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],9:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"]},Greens:{3:["#e5f5e0","#a1d99b","#31a354"],4:["#edf8e9","#bae4b3","#74c476","#238b45"],5:["#edf8e9","#bae4b3","#74c476","#31a354","#006d2c"],6:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#31a354","#006d2c"],7:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],8:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],9:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"]},Oranges:{3:["#fee6ce","#fdae6b","#e6550d"],4:["#feedde","#fdbe85","#fd8d3c","#d94701"],5:["#feedde","#fdbe85","#fd8d3c","#e6550d","#a63603"],6:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#e6550d","#a63603"],7:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],8:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],9:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"]},Reds:{3:["#fee0d2","#fc9272","#de2d26"],4:["#fee5d9","#fcae91","#fb6a4a","#cb181d"],5:["#fee5d9","#fcae91","#fb6a4a","#de2d26","#a50f15"],6:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#de2d26","#a50f15"],7:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],8:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],9:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"]},Greys:{3:["#f0f0f0","#bdbdbd","#636363"],4:["#f7f7f7","#cccccc","#969696","#525252"],5:["#f7f7f7","#cccccc","#969696","#636363","#252525"],6:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#636363","#252525"],7:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],8:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],9:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"]},PuOr:{3:["#f1a340","#f7f7f7","#998ec3"],4:["#e66101","#fdb863","#b2abd2","#5e3c99"],5:["#e66101","#fdb863","#f7f7f7","#b2abd2","#5e3c99"],6:["#b35806","#f1a340","#fee0b6","#d8daeb","#998ec3","#542788"],7:["#b35806","#f1a340","#fee0b6","#f7f7f7","#d8daeb","#998ec3","#542788"],8:["#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788"],9:["#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788"],10:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],11:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"]},BrBG:{3:["#d8b365","#f5f5f5","#5ab4ac"],4:["#a6611a","#dfc27d","#80cdc1","#018571"],5:["#a6611a","#dfc27d","#f5f5f5","#80cdc1","#018571"],6:["#8c510a","#d8b365","#f6e8c3","#c7eae5","#5ab4ac","#01665e"],7:["#8c510a","#d8b365","#f6e8c3","#f5f5f5","#c7eae5","#5ab4ac","#01665e"],8:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e"],9:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e"],10:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],11:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"]},PRGn:{3:["#af8dc3","#f7f7f7","#7fbf7b"],4:["#7b3294","#c2a5cf","#a6dba0","#008837"],5:["#7b3294","#c2a5cf","#f7f7f7","#a6dba0","#008837"],6:["#762a83","#af8dc3","#e7d4e8","#d9f0d3","#7fbf7b","#1b7837"],7:["#762a83","#af8dc3","#e7d4e8","#f7f7f7","#d9f0d3","#7fbf7b","#1b7837"],8:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837"],9:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837"],10:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],11:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"]},PiYG:{3:["#e9a3c9","#f7f7f7","#a1d76a"],4:["#d01c8b","#f1b6da","#b8e186","#4dac26"],5:["#d01c8b","#f1b6da","#f7f7f7","#b8e186","#4dac26"],6:["#c51b7d","#e9a3c9","#fde0ef","#e6f5d0","#a1d76a","#4d9221"],7:["#c51b7d","#e9a3c9","#fde0ef","#f7f7f7","#e6f5d0","#a1d76a","#4d9221"],8:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221"],9:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221"],10:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],11:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"]},RdBu:{3:["#ef8a62","#f7f7f7","#67a9cf"],4:["#ca0020","#f4a582","#92c5de","#0571b0"],5:["#ca0020","#f4a582","#f7f7f7","#92c5de","#0571b0"],6:["#b2182b","#ef8a62","#fddbc7","#d1e5f0","#67a9cf","#2166ac"],7:["#b2182b","#ef8a62","#fddbc7","#f7f7f7","#d1e5f0","#67a9cf","#2166ac"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"]},RdGy:{3:["#ef8a62","#ffffff","#999999"],4:["#ca0020","#f4a582","#bababa","#404040"],5:["#ca0020","#f4a582","#ffffff","#bababa","#404040"],6:["#b2182b","#ef8a62","#fddbc7","#e0e0e0","#999999","#4d4d4d"],7:["#b2182b","#ef8a62","#fddbc7","#ffffff","#e0e0e0","#999999","#4d4d4d"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"]},RdYlBu:{3:["#fc8d59","#ffffbf","#91bfdb"],4:["#d7191c","#fdae61","#abd9e9","#2c7bb6"],5:["#d7191c","#fdae61","#ffffbf","#abd9e9","#2c7bb6"],6:["#d73027","#fc8d59","#fee090","#e0f3f8","#91bfdb","#4575b4"],7:["#d73027","#fc8d59","#fee090","#ffffbf","#e0f3f8","#91bfdb","#4575b4"],8:["#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4"],9:["#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"]},Spectral:{3:["#fc8d59","#ffffbf","#99d594"],4:["#d7191c","#fdae61","#abdda4","#2b83ba"],5:["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"],6:["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"],7:["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"],8:["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"],9:["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"],10:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],11:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"]},RdYlGn:{3:["#fc8d59","#ffffbf","#91cf60"],4:["#d7191c","#fdae61","#a6d96a","#1a9641"],5:["#d7191c","#fdae61","#ffffbf","#a6d96a","#1a9641"],6:["#d73027","#fc8d59","#fee08b","#d9ef8b","#91cf60","#1a9850"],7:["#d73027","#fc8d59","#fee08b","#ffffbf","#d9ef8b","#91cf60","#1a9850"],8:["#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850"],9:["#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"]},Accent:{3:["#7fc97f","#beaed4","#fdc086"],4:["#7fc97f","#beaed4","#fdc086","#ffff99"],5:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0"],6:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f"],7:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17"],8:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"]},Dark2:{3:["#1b9e77","#d95f02","#7570b3"],4:["#1b9e77","#d95f02","#7570b3","#e7298a"],5:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e"],6:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02"],7:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d"],8:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"]},Paired:{3:["#a6cee3","#1f78b4","#b2df8a"],4:["#a6cee3","#1f78b4","#b2df8a","#33a02c"],5:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99"],6:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c"],7:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f"],8:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00"],9:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6"],10:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a"],11:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99"],12:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"]},Pastel1:{3:["#fbb4ae","#b3cde3","#ccebc5"],4:["#fbb4ae","#b3cde3","#ccebc5","#decbe4"],5:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6"],6:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc"],7:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd"],8:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec"],9:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Pastel2:{3:["#b3e2cd","#fdcdac","#cbd5e8"],4:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4"],5:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9"],6:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae"],7:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc"],8:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"]},Set1:{3:["#e41a1c","#377eb8","#4daf4a"],4:["#e41a1c","#377eb8","#4daf4a","#984ea3"],5:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00"],6:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33"],7:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628"],8:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf"],9:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"]},Set2:{3:["#66c2a5","#fc8d62","#8da0cb"],4:["#66c2a5","#fc8d62","#8da0cb","#e78ac3"],5:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854"],6:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f"],7:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494"],8:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"]},Set3:{3:["#8dd3c7","#ffffb3","#bebada"],4:["#8dd3c7","#ffffb3","#bebada","#fb8072"],5:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3"],6:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462"],7:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69"],8:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5"],9:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9"],10:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd"],11:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5"],12:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"]}};"function"==typeof define&&define.amd?define(e):"object"==typeof t&&t.exports?t.exports=e:this.colorbrewer=e}()},{}],27:[function(e,t,n){t.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],cool:[{index:0,rgb:[0,255,255]},{index:1,rgb:[255,0,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},{}],28:[function(e,t,n){"use strict";function i(e){var t,n,i,u,c,f,p,h,d,g,m;e||(e={});h=(e.nshades||72)-1;p=e.format||"hex";f=e.colormap;f||(f="jet");if("string"==typeof f){f=f.toLowerCase();if(!a[f])throw Error(f+" not a supported colorscale");c=a[f]}else{if(!Array.isArray(f))throw Error("unsupported colormap option",f);c=f.slice()}if(c.length>h)throw new Error(f+" map requires nshades to be at least size "+c.length);g=Array.isArray(e.alpha)?2!==e.alpha.length?[1,1]:e.alpha.slice():"number"==typeof e.alpha?[e.alpha,e.alpha]:[1,1];t=c.map(function(e){return Math.round(e.index*h)});g[0]=Math.min(Math.max(g[0],0),1);g[1]=Math.min(Math.max(g[1],0),1);var v=c.map(function(e,t){var n=c[t].index,i=c[t].rgb.slice();if(4===i.length&&i[3]>=0&&i[3]<=1)return i;i[3]=g[0]+(g[1]-g[0])*n;return i}),d=[];for(m=0;m=0?(o>=T?10:o>=S?5:o>=C?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(o>=T?10:o>=S?5:o>=C?2:1)}function r(e,t,n){var i=Math.abs(t-e)/Math.max(0,n),r=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),o=i/r;o>=T?r*=10:o>=S?r*=5:o>=C&&(r*=2);return tt?1:e>=t?0:NaN},a=function(e){1===e.length&&(e=t(e));return{left:function(t,n,i,r){null==i&&(i=0);null==r&&(r=t.length);for(;i>>1;e(t[o],n)<0?i=o+1:r=o}return i},right:function(t,n,i,r){null==i&&(i=0);null==r&&(r=t.length);for(;i>>1;e(t[o],n)>0?r=o:i=o+1}return i}}},l=a(s),u=l.right,c=l.left,f=function(e,t){null==t&&(t=n);for(var i=0,r=e.length-1,o=e[0],s=new Array(r<0?0:r);ie?1:t>=e?0:NaN},d=function(e){return null===e?NaN:+e},g=function(e,t){var n,i,r=e.length,o=0,s=-1,a=0,l=0;if(null==t){for(;++s1)return l/(o-1)},m=function(e,t){var n=g(e,t);return n?Math.sqrt(n):n},v=function(e,t){var n,i,r,o=e.length,s=-1;if(null==t){for(;++s=n){i=r=n;for(;++sn&&(i=n);r=n){i=r=n;for(;++sn&&(i=n);r0)return[e];(r=t0){e=Math.ceil(e/a);t=Math.floor(t/a);s=new Array(o=Math.ceil(t-e+1));for(;++lp;)h.pop(),--d;var g,m=new Array(d+1);for(o=0;o<=d;++o){g=m[o]=[];g.x0=o>0?h[o-1]:f;g.x1=o=1)return+n(e[i-1],i-1,e);var i,r=(i-1)*t,o=Math.floor(r),s=+n(e[o],o,e),a=+n(e[o+1],o+1,e);return s+(a-s)*(r-o)}},R=function(e,t,n){e=x.call(e,d).sort(s);return Math.ceil((n-t)/(2*(A(e,.75)-A(e,.25))*Math.pow(e.length,-1/3)))},O=function(e,t,n){return Math.ceil((n-t)/(3.5*m(e)*Math.pow(e.length,-1/3)))},P=function(e,t){var n,i,r=e.length,o=-1;if(null==t){for(;++o=n){i=n;for(;++oi&&(i=n)}}else for(;++o=n){i=n;for(;++oi&&(i=n)}return i; },k=function(e,t){var n,i=e.length,r=i,o=-1,s=0;if(null==t)for(;++o=0;){i=e[r];t=i.length;for(;--t>=0;)n[--s]=i[t]}return n},j=function(e,t){var n,i,r=e.length,o=-1;if(null==t){for(;++o=n){i=n;for(;++on&&(i=n)}}else for(;++o=n){i=n;for(;++on&&(i=n)}return i},B=function(e,t){for(var n=t.length,i=new Array(n);n--;)i[n]=e[t[n]];return i},q=function(e,t){if(n=e.length){var n,i,r=0,o=0,a=e[o];null==t&&(t=s);for(;++rMath.abs(e[1]-te[1])?F=!0:q=!0);te=e;B=!0;y();i()}function i(){var e;D=te[0]-ee[0];j=te[1]-ee[1];switch(z){case x:case b:H&&(D=Math.max($-p,Math.min(X-S,D)),g=p+D,R=S+D);V&&(j=Math.max(K-m,Math.min(Q-P,j)),v=m+j,M=P+j);break;case _:H<0?(D=Math.max($-p,Math.min(X-p,D)),g=p+D,R=S):H>0&&(D=Math.max($-S,Math.min(X-S,D)),g=p,R=S+D);V<0?(j=Math.max(K-m,Math.min(Q-m,j)),v=m+j,M=P):V>0&&(j=Math.max(K-P,Math.min(Q-P,j)),v=m,M=P+j);break;case E:H&&(g=Math.max($,Math.min(X,p-D*H)),R=Math.max($,Math.min(X,S+D*H)));V&&(v=Math.max(K,Math.min(Q,m-j*V)),M=Math.max(K,Math.min(Q,P+j*V)))}if(R0&&(p=g-D);V<0?P=M-j:V>0&&(m=v-j);z=x;re.attr("cursor",C.selection);i()}break;default:return}y()}function u(){switch(r.event.keyCode){case 16:if(J){q=F=J=!1;i()}break;case 18:if(z===E){H<0?S=R:H>0&&(p=g);V<0?P=M:V>0&&(m=v);z=_;i()}break;case 32:if(z===x){if(r.event.altKey){H&&(S=R-D*H,p=g+D*H);V&&(P=M-j*V,m=v+j*V);z=E}else{H<0?S=R:H>0&&(p=g);V<0?P=M:V>0&&(m=v);z=_}re.attr("cursor",C[G]);i()}break;default:return}y()}if(r.event.touches){if(r.event.changedTouches.length=c.length){null!=a&&t.sort(a);return null!=l?l(t):t}for(var s,u,f,p=-1,h=t.length,d=c[i++],g=n(),m=r();++pc.length)return e;var i,r=f[n-1];null!=l&&n>=c.length?i=e.entries():(i=[],e.each(function(e,r){i.push({key:r,values:t(e,n)})}));return null!=r?i.sort(function(e,t){return r(e.key,t.key)}):i}var a,l,u,c=[],f=[];return u={object:function(t){return e(t,0,i,r)},map:function(t){return e(t,0,o,s)},entries:function(n){return t(e(n,0,o,s),0)},key:function(e){c.push(e);return u},sortKeys:function(e){f[c.length-1]=e;return u},sortValues:function(e){a=e;return u},rollup:function(e){l=e;return u}}},f=n.prototype;a.prototype=l.prototype={constructor:a,has:f.has,add:function(e){e+="";this[u+e]=e;return this},remove:f.remove,clear:f.clear,values:f.keys,size:f.size,empty:f.empty,each:f.each};var p=function(e){var t=[];for(var n in e)t.push(n);return t},h=function(e){var t=[];for(var n in e)t.push(e[n]);return t},d=function(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t};e.nest=c;e.set=l;e.map=n;e.keys=p;e.values=h;e.entries=d;Object.defineProperty(e,"__esModule",{value:!0})})},{}],35:[function(e,t,n){(function(e,i){"object"==typeof n&&"undefined"!=typeof t?i(n):"function"==typeof define&&define.amd?define(["exports"],i):i(e.d3=e.d3||{})})(this,function(e){"use strict";function t(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function n(){}function i(e){var t;e=(e+"").trim().toLowerCase();return(t=P.exec(e))?(t=parseInt(t[1],16),new l(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1)):(t=k.exec(e))?r(parseInt(t[1],16)):(t=M.exec(e))?new l(t[1],t[2],t[3],1):(t=D.exec(e))?new l(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=j.exec(e))?o(t[1],t[2],t[3],t[4]):(t=B.exec(e))?o(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=q.exec(e))?u(t[1],t[2]/100,t[3]/100,1):(t=F.exec(e))?u(t[1],t[2]/100,t[3]/100,t[4]):U.hasOwnProperty(e)?r(U[e]):"transparent"===e?new l(NaN,NaN,NaN,0):null}function r(e){return new l(e>>16&255,e>>8&255,255&e,1)}function o(e,t,n,i){i<=0&&(e=t=n=NaN);return new l(e,t,n,i)}function s(e){e instanceof n||(e=i(e));if(!e)return new l;e=e.rgb();return new l(e.r,e.g,e.b,e.opacity)}function a(e,t,n,i){return 1===arguments.length?s(e):new l(e,t,n,null==i?1:i)}function l(e,t,n,i){this.r=+e;this.g=+t;this.b=+n;this.opacity=+i}function u(e,t,n,i){i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN);return new p(e,t,n,i)}function c(e){if(e instanceof p)return new p(e.h,e.s,e.l,e.opacity);e instanceof n||(e=i(e));if(!e)return new p;if(e instanceof p)return e;e=e.rgb();var t=e.r/255,r=e.g/255,o=e.b/255,s=Math.min(t,r,o),a=Math.max(t,r,o),l=NaN,u=a-s,c=(a+s)/2;if(u){l=t===a?(r-o)/u+6*(r0&&c<1?0:l;return new p(l,u,c,e.opacity)}function f(e,t,n,i){return 1===arguments.length?c(e):new p(e,t,n,null==i?1:i)}function p(e,t,n,i){this.h=+e;this.s=+t;this.l=+n;this.opacity=+i}function h(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function d(e){if(e instanceof m)return new m(e.l,e.a,e.b,e.opacity);if(e instanceof w){var t=e.h*G;return new m(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof l||(e=s(e));var n=x(e.r),i=x(e.g),r=x(e.b),o=v((.4124564*n+.3575761*i+.1804375*r)/V),a=v((.2126729*n+.7151522*i+.072175*r)/W),u=v((.0193339*n+.119192*i+.9503041*r)/Y);return new m(116*a-16,500*(o-a),200*(a-u),e.opacity)}function g(e,t,n,i){return 1===arguments.length?d(e):new m(e,t,n,null==i?1:i)}function m(e,t,n,i){this.l=+e;this.a=+t;this.b=+n;this.opacity=+i}function v(e){return e>X?Math.pow(e,1/3):e/K+Z}function y(e){return e>$?e*e*e:K*(e-Z)}function b(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function x(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function _(e){if(e instanceof w)return new w(e.h,e.c,e.l,e.opacity);e instanceof m||(e=d(e));var t=Math.atan2(e.b,e.a)*z;return new w(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function E(e,t,n,i){return 1===arguments.length?_(e):new w(e,t,n,null==i?1:i)}function w(e,t,n,i){this.h=+e;this.c=+t;this.l=+n;this.opacity=+i}function T(e){if(e instanceof C)return new C(e.h,e.s,e.l,e.opacity);e instanceof l||(e=s(e));var t=e.r/255,n=e.g/255,i=e.b/255,r=(oe*i+ie*t-re*n)/(oe+ie-re),o=i-r,a=(ne*(n-r)-ee*o)/te,u=Math.sqrt(a*a+o*o)/(ne*r*(1-r)),c=u?Math.atan2(a,o)*z-120:NaN;return new C(c<0?c+360:c,u,r,e.opacity)}function S(e,t,n,i){return 1===arguments.length?T(e):new C(e,t,n,null==i?1:i)}function C(e,t,n,i){this.h=+e;this.s=+t;this.l=+n;this.opacity=+i}var L=function(e,t,n){e.prototype=t.prototype=n;n.constructor=e},N=.7,I=1/N,A="\\s*([+-]?\\d+)\\s*",R="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",O="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",P=/^#([0-9a-f]{3})$/,k=/^#([0-9a-f]{6})$/,M=new RegExp("^rgb\\("+[A,A,A]+"\\)$"),D=new RegExp("^rgb\\("+[O,O,O]+"\\)$"),j=new RegExp("^rgba\\("+[A,A,A,R]+"\\)$"),B=new RegExp("^rgba\\("+[O,O,O,R]+"\\)$"),q=new RegExp("^hsl\\("+[R,O,O]+"\\)$"),F=new RegExp("^hsla\\("+[R,O,O,R]+"\\)$"),U={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};L(n,i,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}});L(l,a,t(n,{brighter:function(e){e=null==e?I:Math.pow(I,e);return new l(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){e=null==e?N:Math.pow(N,e);return new l(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var e=this.opacity;e=isNaN(e)?1:Math.max(0,Math.min(1,e));return(1===e?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}}));L(p,f,t(n,{brighter:function(e){e=null==e?I:Math.pow(I,e);return new p(this.h,this.s,this.l*e,this.opacity)},darker:function(e){e=null==e?N:Math.pow(N,e);return new p(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*t,r=2*n-i;return new l(h(e>=240?e-240:e+120,r,i),h(e,r,i),h(e<120?e+240:e-120,r,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var G=Math.PI/180,z=180/Math.PI,H=18,V=.95047,W=1,Y=1.08883,Z=4/29,$=6/29,K=3*$*$,X=$*$*$;L(m,g,t(n,{brighter:function(e){return new m(this.l+H*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new m(this.l-H*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;e=W*y(e);t=V*y(t);n=Y*y(n);return new l(b(3.2404542*t-1.5371385*e-.4985314*n),b(-.969266*t+1.8760108*e+.041556*n),b(.0556434*t-.2040259*e+1.0572252*n),this.opacity)}}));L(w,E,t(n,{brighter:function(e){return new w(this.h,this.c,this.l+H*(null==e?1:e),this.opacity)},darker:function(e){return new w(this.h,this.c,this.l-H*(null==e?1:e),this.opacity)},rgb:function(){return d(this).rgb()}}));var Q=-.14861,J=1.78277,ee=-.29227,te=-.90649,ne=1.97294,ie=ne*te,re=ne*J,oe=J*ee-te*Q;L(C,S,t(n,{brighter:function(e){e=null==e?I:Math.pow(I,e);return new C(this.h,this.s,this.l*e,this.opacity)},darker:function(e){e=null==e?N:Math.pow(N,e);return new C(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*G,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),i=Math.cos(e),r=Math.sin(e);return new l(255*(t+n*(Q*i+J*r)),255*(t+n*(ee*i+te*r)),255*(t+n*(ne*i)),this.opacity)}}));e.color=i;e.rgb=a;e.hsl=f;e.lab=g;e.hcl=E;e.cubehelix=S;Object.defineProperty(e,"__esModule",{value:!0})})},{}],36:[function(e,t,n){(function(e,i){"object"==typeof n&&"undefined"!=typeof t?i(n):"function"==typeof define&&define.amd?define(["exports"],i):i(e.d3=e.d3||{})})(this,function(e){"use strict";function t(){for(var e,t=0,i=arguments.length,r={};t=0&&(n=e.slice(i+1),e=e.slice(0,i));if(e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}})}function r(e,t){for(var n,i=0,r=e.length;i0)for(var n,i,r=new Array(n),o=0;oR}N.mouse("drag")}function g(){n.select(n.event.view).on("mousemove.drag mouseup.drag",null);r(n.event.view,E);c();N.mouse("end")}function m(){if(T.apply(this,arguments)){var e,t,r=n.event.changedTouches,o=S.apply(this,arguments),s=r.length;for(e=0;e=c)h=!0;else if((n=e.charCodeAt(f++))===a)d=!0;else if(n===l){d=!0;e.charCodeAt(f)===a&&++f}return e.slice(i+1,t-1).replace(/""/g,'"')}for(;fp+a||id+a||rf.index){var l=p-o.x-o.vx,c=d-o.y-o.vy,v=l*l+c*c;if(ve.r&&(e.r=e[t].r)}function r(){if(a){var t,n,i=a.length;l=new Array(i);for(t=0;t1?(null==t?d.remove(e):d.set(e,a(t)),l):d.get(e)},find:function(t,n,i){var r,o,s,a,l,u=0,c=e.length;null==i?i=1/0:i*=i;for(u=0;u1?(y.on(e,t),l):y.on(e)}}},b=function(){function e(e){var n,l=o.length,f=t.quadtree(o,u,c).visitAfter(i);for(a=e,n=0;n=g)){if(e.data!==s||e.next){0===r&&(r=h(),c+=r*r);0===o&&(o=h(),c+=o*o);c",r=t[3]||"-",o=t[4]||"",s=!!t[5],a=t[6]&&+t[6],l=!!t[7],u=t[8]&&+t[8].slice(1),c=t[9]||"";"n"===c?(l=!0,c="g"):p[c]||(c="");(s||"0"===n&&"="===i)&&(s=!0,n="0",i="=");this.fill=n;this.align=i;this.sign=r;this.symbol=o;this.zero=s;this.width=a;this.comma=l;this.precision=u;this.type=c}function i(t){d=v(t);e.format=d.format;e.formatPrefix=d.formatPrefix;return d}var r,o=function(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)]},s=function(e){return e=o(Math.abs(e)),e?e[1]:NaN},a=function(e,t){return function(n,i){for(var r=n.length,o=[],s=0,a=e[0],l=0;r>0&&a>0;){l+a+1>i&&(a=Math.max(1,i-l));o.push(n.substring(r-=a,r+a));if((l+=a+1)>i)break;a=e[s=(s+1)%e.length]}return o.reverse().join(t)}},l=function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}},u=function(e,t){e=e.toPrecision(t);e:for(var n,i=e.length,r=1,o=-1;r0&&(o=0)}return o>0?e.slice(0,o)+e.slice(n+1):e},c=function(e,t){var n=o(e,t);if(!n)return e+"";var i=n[0],s=n[1],a=s-(r=3*Math.max(-8,Math.min(8,Math.floor(s/3))))+1,l=i.length;return a===l?i:a>l?i+new Array(a-l+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+o(e,Math.max(0,t+a-1))[0]},f=function(e,t){var n=o(e,t);if(!n)return e+"";var i=n[0],r=n[1];return r<0?"0."+new Array((-r)).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")},p={"":u,"%":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 f(100*e,t)},r:f,s:c,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}},h=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;t.prototype=n.prototype;n.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 d,g=function(e){return e},m=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],v=function(e){function n(e){function n(e){var t,n,l,u=x,p=_;if("c"===b){p=E(e)+p;e=""}else{e=+e;var h=e<0;e=E(Math.abs(e),y);h&&0===+e&&(h=!1);u=(h?"("===a?a:"-":"-"===a||"("===a?"":a)+u;p=p+("s"===b?m[8+r/3]:"")+(h&&"("===a?")":"");if(w){t=-1,n=e.length;for(;++tl||l>57){p=(46===l?c+e.slice(t+1):e.slice(t))+p;e=e.slice(0,t);break}}}v&&!d&&(e=o(e,1/0));var T=u.length+e.length+p.length,S=T>1)+u+e+p+S.slice(T);break;default:e=S+u+e+p}return f(e)}e=t(e);var i=e.fill,s=e.align,a=e.sign,l=e.symbol,d=e.zero,g=e.width,v=e.comma,y=e.precision,b=e.type,x="$"===l?u[0]:"#"===l&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",_="$"===l?u[1]:/[%p]/.test(b)?h:"",E=p[b],w=!b||/[defgprs%]/.test(b);y=null==y?b?6:12:/[gprs]/.test(b)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y));n.toString=function(){return e+""};return n}function i(e,i){var r=n((e=t(e),e.type="f",e)),o=3*Math.max(-8,Math.min(8,Math.floor(s(i)/3))),a=Math.pow(10,-o),l=m[8+o/3];return function(e){return r(a*e)+l}}var o=e.grouping&&e.thousands?a(e.grouping,e.thousands):g,u=e.currency,c=e.decimal,f=e.numerals?l(e.numerals):g,h=e.percent||"%";return{format:n,formatPrefix:i}};i({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var y=function(e){return Math.max(0,-s(Math.abs(e)))},b=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(s(t)/3)))-s(Math.abs(e)))},x=function(e,t){e=Math.abs(e),t=Math.abs(t)-e;return Math.max(0,s(t)-s(e))+1};e.formatDefaultLocale=i;e.formatLocale=v;e.formatSpecifier=t;e.precisionFixed=y;e.precisionPrefix=b;e.precisionRound=x;Object.defineProperty(e,"__esModule",{value:!0})})},{}],42:[function(e,t,n){(function(i,r){"object"==typeof n&&"undefined"!=typeof t?r(n,e("d3-array")):"function"==typeof define&&define.amd?define(["exports","d3-array"],r):r(i.d3=i.d3||{},i.d3)})(this,function(e,t){"use strict";function n(){this.reset()}function i(e,t,n){var i=e.s=t+n,r=i-t,o=i-r;e.t=t-o+(n-r)}function r(e){return e>1?0:e<-1?Yt:Math.acos(e)}function o(e){return e>1?Zt:e<-1?-Zt:Math.asin(e)}function s(e){return(e=ln(e/2))*e}function a(){}function l(e,t){e&&hn.hasOwnProperty(e.type)&&hn[e.type](e,t)}function u(e,t,n){var i,r=-1,o=e.length-n;t.lineStart();for(;++r=0?1:-1,r=i*n,o=nn(t),s=ln(t),a=vt*s,l=mt*o+a*nn(r),u=a*i*ln(r);gn.add(tn(u,l));gt=e,mt=o,vt=s}function g(e){return[tn(e[1],e[0]),o(e[2])]}function m(e){var t=e[0],n=e[1],i=nn(n);return[i*nn(t),i*ln(t),ln(n)]}function v(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function y(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 b(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function x(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function _(e){var t=cn(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function E(e,t){Ct.push(Lt=[yt=e,xt=e]);t_t&&(_t=t)}function w(e,t){var n=m([e*Qt,t*Qt]);if(St){var i=y(St,n),r=[i[1],-i[0],0],o=y(r,i);_(o);o=g(o);var s,a=e-Et,l=a>0?1:-1,u=o[0]*Xt*l,c=Jt(a)>180;if(c^(l*Et_t&&(_t=s)}else if(u=(u+360)%360-180,c^(l*Et_t&&(_t=t)}if(c)eI(yt,xt)&&(xt=e):I(e,xt)>I(yt,xt)&&(yt=e);else if(xt>=yt){ext&&(xt=e)}else e>Et?I(yt,e)>I(yt,xt)&&(xt=e):I(e,xt)>I(yt,xt)&&(yt=e)}else Ct.push(Lt=[yt=e,xt=e]);t_t&&(_t=t);St=n,Et=e}function T(){xn.point=w}function S(){Lt[0]=yt,Lt[1]=xt;xn.point=E;St=null}function C(e,t){if(St){var n=e-Et;bn.add(Jt(n)>180?n+(n>0?360:-360):n)}else wt=e,Tt=t;vn.point(e,t);w(e,t)}function L(){vn.lineStart()}function N(){C(wt,Tt);vn.lineEnd();Jt(bn)>Vt&&(yt=-(xt=180));Lt[0]=yt,Lt[1]=xt;St=null}function I(e,t){return(t-=e)<0?t+360:t}function A(e,t){return e[0]-t[0]}function R(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tYt?e-Kt:e<-Yt?e+Kt:e,t]}function z(e,t,n){return(e%=Kt)?t||n?Sn(V(e),W(t,n)):V(e):t||n?W(t,n):G}function H(e){return function(t,n){return t+=e,[t>Yt?t-Kt:t<-Yt?t+Kt:t,n]}}function V(e){var t=H(e);t.invert=H(-e);return t}function W(e,t){function n(e,t){var n=nn(t),l=nn(e)*n,u=ln(e)*n,c=ln(t),f=c*i+l*r;return[tn(u*s-f*a,l*i-c*r),o(f*s+u*a)]}var i=nn(e),r=ln(e),s=nn(t),a=ln(t);n.invert=function(e,t){var n=nn(t),l=nn(e)*n,u=ln(e)*n,c=ln(t),f=c*s-u*a;return[tn(u*s+c*a,l*i+f*r),o(f*i-l*r)]};return n}function Y(e,t,n,i,r,o){if(n){var s=nn(t),a=ln(t),l=i*n;if(null==r){r=t+i*Kt;o=t-l/2}else{r=Z(s,r);o=Z(s,o);(i>0?ro)&&(r+=i*Kt)}for(var u,c=r;i>0?c>o:c1}function Q(e,t){return((e=e.x)[0]<0?e[1]-Zt-Vt:Zt-e[1])-((t=t.x)[0]<0?t[1]-Zt-Vt:Zt-t[1])}function J(e){var t,n=NaN,i=NaN,r=NaN;return{lineStart:function(){e.lineStart();t=1},point:function(o,s){var a=o>0?Yt:-Yt,l=Jt(o-n);if(Jt(l-Yt)0?Zt:-Zt);e.point(r,i);e.lineEnd();e.lineStart();e.point(a,i);e.point(o,i);t=0}else if(r!==a&&l>=Yt){Jt(n-r)Vt?en((ln(t)*(o=nn(i))*ln(n)-ln(i)*(r=nn(t))*ln(e))/(r*o*s)):(t+i)/2}function te(e,t,n,i){var r;if(null==e){r=n*Zt;i.point(-Yt,r);i.point(0,r);i.point(Yt,r);i.point(Yt,0);i.point(Yt,-r);i.point(0,-r);i.point(-Yt,-r);i.point(-Yt,0);i.point(-Yt,r)}else if(Jt(e[0]-t[0])>Vt){var o=e[0]0){do l.point(0===c||3===c?e:i,c>1?r:n);while((c=(c+s+4)%4)!==f)}else l.point(o[0],o[1])}function a(t,r){return Jt(t[0]-e)0?0:3:Jt(t[0]-i)0?2:1:Jt(t[1]-n)0?1:0:r>0?3:2}function l(e,t){return u(e.x,t.x)}function u(e,t){var n=a(e,1),i=a(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(a){function u(e,t){o(e,t)&&L.point(e,t)}function c(){for(var t=0,n=0,i=v.length;nr&&(f-o)*(r-s)>(p-s)*(e-o)&&++t:p<=r&&(f-o)*(r-s)<(p-s)*(e-o)&&--t}return t}function f(){L=N,m=[],v=[],C=!0}function p(){var e=c(),n=C&&e,i=(m=t.merge(m)).length;if(n||i){a.polygonStart();if(n){a.lineStart();s(null,null,1,a);a.lineEnd()}i&&Un(m,l,e,s,a);a.polygonEnd()}L=a,m=v=y=null}function h(){I.point=g;v&&v.push(y=[]);S=!0;T=!1;E=w=NaN}function d(){if(m){g(b,x);_&&T&&N.rejoin();m.push(N.result())}I.point=u;T&&L.lineEnd()}function g(t,s){var a=o(t,s);v&&y.push([t,s]);if(S){b=t,x=s,_=a;S=!1;if(a){L.lineStart();L.point(t,s)}}else if(a&&T)L.point(t,s);else{var l=[E=Math.max($n,Math.min(Zn,E)),w=Math.max($n,Math.min(Zn,w))],u=[t=Math.max($n,Math.min(Zn,t)),s=Math.max($n,Math.min(Zn,s))];if(Yn(l,u,e,n,i,r)){if(!T){L.lineStart();L.point(l[0],l[1])}L.point(u[0],u[1]);a||L.lineEnd();C=!1}else if(a){L.lineStart();L.point(t,s);C=!1}}E=t,w=s,T=a}var m,v,y,b,x,_,E,w,T,S,C,L=a,N=qn(),I={point:u,lineStart:h,lineEnd:d,polygonStart:f,polygonEnd:p};return I}}function ie(){Qn.point=oe;Qn.lineEnd=re}function re(){Qn.point=Qn.lineEnd=a}function oe(e,t){e*=Qt,t*=Qt;Cn=e,Ln=ln(t),Nn=nn(t);Qn.point=se}function se(e,t){e*=Qt,t*=Qt;var n=ln(t),i=nn(t),r=Jt(e-Cn),o=nn(r),s=ln(r),a=i*s,l=Nn*n-Ln*i*o,u=Ln*n+Nn*i*o;Xn.add(tn(cn(a*a+l*l),u));Cn=e,Ln=n,Nn=i}function ae(e,t){return!(!e||!ri.hasOwnProperty(e.type))&&ri[e.type](e,t)}function le(e,t){return 0===ni(e,t)}function ue(e,t){var n=ni(e[0],e[1]),i=ni(e[0],t),r=ni(t,e[1]);return i+r<=n+Vt}function ce(e,t){return!!zn(e.map(fe),pe(t))}function fe(e){return e=e.map(pe),e.pop(),e}function pe(e){return[e[0]*Qt,e[1]*Qt]}function he(e,n,i){var r=t.range(e,n-Vt,i).concat(n);return function(e){return r.map(function(t){return[e,t]})}}function de(e,n,i){var r=t.range(e,n-Vt,i).concat(n);return function(e){return r.map(function(t){return[t,e]})}}function ge(){function e(){return{type:"MultiLineString",coordinates:n()}}function n(){return t.range(rn(s/v)*v,o,v).map(h).concat(t.range(rn(c/y)*y,u,y).map(d)).concat(t.range(rn(r/g)*g,i,g).filter(function(e){return Jt(e%v)>Vt}).map(f)).concat(t.range(rn(l/m)*m,a,m).filter(function(e){return Jt(e%y)>Vt}).map(p))}var i,r,o,s,a,l,u,c,f,p,h,d,g=10,m=g,v=90,y=360,b=2.5;e.lines=function(){return n().map(function(e){return{type:"LineString",coordinates:e}})};e.outline=function(){return{type:"Polygon",coordinates:[h(s).concat(d(u).slice(1),h(o).reverse().slice(1),d(c).reverse().slice(1))]}};e.extent=function(t){return arguments.length?e.extentMajor(t).extentMinor(t):e.extentMinor()};e.extentMajor=function(t){if(!arguments.length)return[[s,c],[o,u]];s=+t[0][0],o=+t[1][0];c=+t[0][1],u=+t[1][1];s>o&&(t=s,s=o,o=t);c>u&&(t=c,c=u,u=t);return e.precision(b)};e.extentMinor=function(t){if(!arguments.length)return[[r,l],[i,a]];r=+t[0][0],i=+t[1][0];l=+t[0][1],a=+t[1][1];r>i&&(t=r,r=i,i=t);l>a&&(t=l,l=a,a=t);return e.precision(b)};e.step=function(t){return arguments.length?e.stepMajor(t).stepMinor(t):e.stepMinor()};e.stepMajor=function(t){if(!arguments.length)return[v,y];v=+t[0],y=+t[1];return e};e.stepMinor=function(t){if(!arguments.length)return[g,m];g=+t[0],m=+t[1];return e};e.precision=function(t){if(!arguments.length)return b;b=+t;f=he(l,a,90);p=de(r,i,b);h=he(c,u,90);d=de(s,o,b);return e};return e.extentMajor([[-180,-90+Vt],[180,90-Vt]]).extentMinor([[-180,-80-Vt],[180,80+Vt]])}function me(){return ge()()}function ve(){ci.point=ye}function ye(e,t){ci.point=be;In=Rn=e,An=On=t}function be(e,t){ui.add(On*e-Rn*t);Rn=e,On=t}function xe(){be(In,An)}function _e(e,t){ehi&&(hi=e);tdi&&(di=t)}function Ee(e,t){mi+=e;vi+=t;++yi}function we(){Si.point=Te}function Te(e,t){Si.point=Se;Ee(Mn=e,Dn=t)}function Se(e,t){var n=e-Mn,i=t-Dn,r=cn(n*n+i*i);bi+=r*(Mn+e)/2;xi+=r*(Dn+t)/2;_i+=r;Ee(Mn=e,Dn=t)}function Ce(){Si.point=Ee}function Le(){Si.point=Ie}function Ne(){Ae(Pn,kn)}function Ie(e,t){Si.point=Ae;Ee(Pn=Mn=e,kn=Dn=t)}function Ae(e,t){var n=e-Mn,i=t-Dn,r=cn(n*n+i*i);bi+=r*(Mn+e)/2;xi+=r*(Dn+t)/2;_i+=r;r=Dn*e-Mn*t;Ei+=r*(Mn+e);wi+=r*(Dn+t);Ti+=3*r;Ee(Mn=e,Dn=t)}function Re(e){this._context=e}function Oe(e,t){Oi.point=Pe;Li=Ii=e,Ni=Ai=t}function Pe(e,t){Ii-=e,Ai-=t;Ri.add(cn(Ii*Ii+Ai*Ai));Ii=e,Ai=t}function ke(){this._string=[]}function Me(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function De(e){return function(t){var n=new je;for(var i in e)n[i]=e[i];n.stream=t;return n}}function je(){}function Be(e,t,n){var i=e.clipExtent&&e.clipExtent();e.scale(150).translate([0,0]);null!=i&&e.clipExtent(null);dn(n,e.stream(gi));t(gi.result());null!=i&&e.clipExtent(i);return e}function qe(e,t,n){return Be(e,function(n){var i=t[1][0]-t[0][0],r=t[1][1]-t[0][1],o=Math.min(i/(n[1][0]-n[0][0]),r/(n[1][1]-n[0][1])),s=+t[0][0]+(i-o*(n[1][0]+n[0][0]))/2,a=+t[0][1]+(r-o*(n[1][1]+n[0][1]))/2;e.scale(150*o).translate([s,a])},n)}function Fe(e,t,n){return qe(e,[[0,0],t],n)}function Ue(e,t,n){return Be(e,function(n){var i=+t,r=i/(n[1][0]-n[0][0]),o=(i-r*(n[1][0]+n[0][0]))/2,s=-r*n[0][1];e.scale(150*r).translate([o,s])},n)}function Ge(e,t,n){return Be(e,function(n){var i=+t,r=i/(n[1][1]-n[0][1]),o=-r*n[0][0],s=(i-r*(n[1][1]+n[0][1]))/2;e.scale(150*r).translate([o,s])},n)}function ze(e){return De({point:function(t,n){t=e(t,n);this.stream.point(t[0],t[1])}})}function He(e,t){function n(i,r,s,a,l,u,c,f,p,h,d,g,m,v){var y=c-i,b=f-r,x=y*y+b*b;if(x>4*t&&m--){var _=a+h,E=l+d,w=u+g,T=cn(_*_+E*E+w*w),S=o(w/=T),C=Jt(Jt(w)-1)t||Jt((y*A+b*R)/x-.5)>.3||a*h+l*d+u*g2?e[2]%360*Qt:0,r()):[_*Xt,E*Xt,w*Xt]};t.precision=function(e){return arguments.length?(I=ji(i,N=e*e),o()):cn(N)};t.fitExtent=function(e,n){return qe(t,e,n)};t.fitSize=function(e,n){return Fe(t,e,n)};t.fitWidth=function(e,n){return Ue(t,e,n)};t.fitHeight=function(e,n){return Ge(t,e,n)};return function(){s=e.apply(this,arguments);t.invert=s.invert&&n;return r()}}function Ze(e){var t=0,n=Yt/3,i=Ye(e),r=i(t,n);r.parallels=function(e){return arguments.length?i(t=e[0]*Qt,n=e[1]*Qt):[t*Xt,n*Xt]};return r}function $e(e){function t(e,t){return[e*n,ln(t)/n]}var n=nn(e);t.invert=function(e,t){return[e/n,o(t*n)]};return t}function Ke(e,t){function n(e,t){var n=cn(s-2*r*ln(t))/r;return[n*ln(e*=r),a-n*nn(e)]}var i=ln(e),r=(i+ln(t))/2;if(Jt(r)0?t<-Zt+Vt&&(t=-Zt+Vt):t>Zt-Vt&&(t=Zt-Vt);var n=o/an(nt(t),r);return[n*ln(r*e),o-n*nn(r*e)]}var i=nn(e),r=e===t?ln(e):sn(i/nn(t))/sn(nt(t)/nt(e)),o=i*an(nt(e),r)/r;if(!r)return et;n.invert=function(e,t){var n=o-t,i=un(r)*cn(e*e+n*n);return[tn(e,Jt(n))/r*un(n),2*en(an(o/i,1/r))-Zt]};return n}function rt(e,t){return[e,t]}function ot(e,t){function n(e,t){var n=o-t,i=r*e;return[n*ln(i),o-n*nn(i)]}var i=nn(e),r=e===t?ln(e):(i-nn(t))/(t-e),o=i/r+e;if(Jt(r)0?1:e<0?-1:0},cn=Math.sqrt,fn=Math.tan,pn={Feature:function(e,t){l(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,i=-1,r=n.length;++iVt?_t=90:bn<-Vt&&(bt=-90);Lt[0]=yt,Lt[1]=xt}},_n=function(e){var t,n,i,r,o,s,a;_t=xt=-(yt=bt=1/0);Ct=[];dn(e,xn);if(n=Ct.length){Ct.sort(A);for(t=1,i=Ct[0],o=[i];tI(i[0],i[1])&&(i[1]=r[1]);I(r[0],i[1])>I(i[0],i[1])&&(i[0]=r[0])}else o.push(i=r)}for(s=-(1/0),n=o.length-1,t=0,i=o[n];t<=n;i=r,++t){r=o[t];(a=I(i[1],r[0]))>s&&(s=a,yt=r[0],xt=i[1])}}Ct=Lt=null;return yt===1/0||bt===1/0?[[NaN,NaN],[NaN,NaN]]:[[yt,bt],[xt,_t]]},En={sphere:a,point:O,lineStart:k,lineEnd:j,polygonStart:function(){En.lineStart=B;En.lineEnd=q},polygonEnd:function(){En.lineStart=k;En.lineEnd=j}},wn=function(e){Nt=It=At=Rt=Ot=Pt=kt=Mt=Dt=jt=Bt=0;dn(e,En);var t=Dt,n=jt,i=Bt,r=t*t+n*n+i*i;if(r2?e[2]*Qt:0);t.invert=function(t){t=e.invert(t[0]*Qt,t[1]*Qt);return t[0]*=Xt,t[1]*=Xt,t};return t},Bn=function(){function e(e,t){n.push(e=i(e,t));e[0]*=Xt,e[1]*=Xt}function t(){var e=r.apply(this,arguments),t=o.apply(this,arguments)*Qt,l=s.apply(this,arguments)*Qt;n=[];i=z(-e[0]*Qt,-e[1]*Qt,0).invert;Y(a,t,l,1);e={type:"Polygon",coordinates:[n]};n=i=null;return e}var n,i,r=Tn([0,0]),o=Tn(90),s=Tn(6),a={point:e};t.center=function(e){return arguments.length?(r="function"==typeof e?e:Tn([+e[0],+e[1]]),t):r};t.radius=function(e){return arguments.length?(o="function"==typeof e?e:Tn(+e),t):o};t.precision=function(e){return arguments.length?(s="function"==typeof e?e:Tn(+e),t):s};return t},qn=function(){var e,t=[];return{point:function(t,n){e.push([t,n])},lineStart:function(){t.push(e=[])},lineEnd:a,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;t=[];e=null;return n}}},Fn=function(e,t){return Jt(e[0]-t[0])=0;--o)r.point((c=u[o])[0],c[1])}else i(p.x,p.p.x,-1,r);p=p.p}p=p.o;u=p.z;h=!h}while(!p.v);r.lineEnd()}}},Gn=pt(),zn=function(e,t){var n=t[0],i=t[1],r=[ln(n),-nn(n),0],s=0,a=0;Gn.reset();for(var l=0,u=e.length;l=0?1:-1,N=L*C,I=N>Yt,A=g*T;Gn.add(tn(A*L*ln(N),v*S+A*nn(N)));s+=I?C+L*Kt:C;if(I^h>=n^E>=n){var R=y(m(p),m(x));_(R);var O=y(r,R);_(O);var P=(I^C>=0?-1:1)*o(O[2]);(i>P||i===P&&(R[0]||R[1]))&&(a+=I^C>=0?1:-1)}}return(s<-Vt||s0){b||(o.polygonStart(),b=!0);o.lineStart();for(e=0;e1&&2&r&&s.push(s.pop().concat(s.shift()));d.push(s.filter(X))}}var h,d,g,m=n(o),v=qn(),y=n(v),b=!1,x={point:s,lineStart:l,lineEnd:u,polygonStart:function(){x.point=c;x.lineStart=f;x.lineEnd=p;d=[];h=[]},polygonEnd:function(){x.point=s;x.lineStart=l;x.lineEnd=u;d=t.merge(d);var e=zn(h,r);if(d.length){b||(o.polygonStart(),b=!0);Un(d,Q,e,i,o)}else if(e){b||(o.polygonStart(),b=!0);o.lineStart();i(null,null,1,o);o.lineEnd()}b&&(o.polygonEnd(),b=!1);d=h=null},sphere:function(){o.polygonStart();o.lineStart();i(null,null,1,o);o.lineEnd();o.polygonEnd()}};return x}},Vn=Hn(function(){return!0},J,te,[-Yt,-Zt]),Wn=function(e){function t(t,n,i,r){Y(r,e,a,i,t,n)}function n(e,t){return nn(e)*nn(t)>s}function i(e){var t,i,s,a,c;return{lineStart:function(){a=s=!1;c=1},point:function(f,p){var h,d=[f,p],g=n(f,p),m=l?g?0:o(f,p):g?o(f+(f<0?Yt:-Yt),p):0;!t&&(a=s=g)&&e.lineStart();if(g!==s){h=r(t,d);if(!h||Fn(t,h)||Fn(d,h)){d[0]+=Vt;d[1]+=Vt;g=n(d[0],d[1])}}if(g!==s){c=0;if(g){e.lineStart();h=r(d,t);e.point(h[0],h[1])}else{h=r(t,d);e.point(h[0],h[1]);e.lineEnd()}t=h}else if(u&&t&&l^g){var v;if(!(m&i)&&(v=r(d,t,!0))){c=0;if(l){e.lineStart();e.point(v[0][0],v[0][1]);e.point(v[1][0],v[1][1]);e.lineEnd()}else{e.point(v[1][0],v[1][1]);e.lineEnd();e.lineStart();e.point(v[0][0],v[0][1])}}}!g||t&&Fn(t,d)||e.point(d[0],d[1]);t=d,s=g,i=m},lineEnd:function(){s&&e.lineEnd();t=null},clean:function(){return c|(a&&s)<<1}}}function r(e,t,n){var i=m(e),r=m(t),o=[1,0,0],a=y(i,r),l=v(a,a),u=a[0],c=l-u*u;if(!c)return!n&&e;var f=s*l/c,p=-s*u/c,h=y(o,a),d=x(o,f),_=x(a,p);b(d,_);var E=h,w=v(d,E),T=v(E,E),S=w*w-T*(v(d,d)-1);if(!(S<0)){var C=cn(S),L=x(E,(-w-C)/T);b(L,d);L=g(L);if(!n)return L;var N,I=e[0],A=t[0],R=e[1],O=t[1];A0^L[1]<(Jt(L[0]-I)Yt^(I<=L[0]&&L[0]<=A)){var D=x(E,(-w+C)/T);b(D,d);return[L,g(D)]}}}function o(t,n){var i=l?e:Yt-e,r=0;t<-i?r|=1:t>i&&(r|=2);n<-i?r|=4:n>i&&(r|=8);return r}var s=nn(e),a=6*Qt,l=s>0,u=Jt(s)>Vt;return Hn(n,i,t,l?[0,-e]:[-Yt,e-Yt])},Yn=function(e,t,n,i,r,o){var s,a=e[0],l=e[1],u=t[0],c=t[1],f=0,p=1,h=u-a,d=c-l;s=n-a;if(h||!(s>0)){s/=h;if(h<0){if(s0){if(s>p)return;s>f&&(f=s)}s=r-a;if(h||!(s<0)){s/=h;if(h<0){if(s>p)return;s>f&&(f=s)}else if(h>0){if(s0)){s/=d;if(d<0){if(s0){if(s>p)return;s>f&&(f=s)}s=o-l;if(d||!(s<0)){s/=d;if(d<0){if(s>p)return;s>f&&(f=s)}else if(d>0){if(s0&&(e[0]=a+f*h,e[1]=l+f*d);p<1&&(t[0]=a+p*h,t[1]=l+p*d);return!0}}}}},Zn=1e9,$n=-Zn,Kn=function(){var e,t,n,i=0,r=0,o=960,s=500;return n={stream:function(n){return e&&t===n?e:e=ne(i,r,o,s)(t=n)},extent:function(a){return arguments.length?(i=+a[0][0],r=+a[0][1],o=+a[1][0],s=+a[1][1],e=t=null,n):[[i,r],[o,s]]}}},Xn=pt(),Qn={sphere:a,point:a,lineStart:ie,lineEnd:a,polygonStart:a,polygonEnd:a},Jn=function(e){Xn.reset();dn(e,Qn);return+Xn},ei=[null,null],ti={type:"LineString",coordinates:ei},ni=function(e,t){ei[0]=e;ei[1]=t;return Jn(ti)},ii={Feature:function(e,t){return ae(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,i=-1,r=n.length;++i=.12&&r<.234&&i>=-.425&&i<-.214?u:r>=.166&&r<.234&&i>=-.214&&i<-.115?c:l).invert(e)};e.stream=function(e){return n&&i===e?n:n=Xe([l.stream(i=e),u.stream(e),c.stream(e)])};e.precision=function(e){if(!arguments.length)return l.precision();l.precision(e),u.precision(e),c.precision(e);return t()};e.scale=function(t){if(!arguments.length)return l.scale();l.scale(t),u.scale(.35*t),c.scale(t);return e.translate(l.translate())};e.translate=function(e){if(!arguments.length)return l.translate();var n=l.scale(),i=+e[0],a=+e[1];r=l.translate(e).clipExtent([[i-.455*n,a-.238*n],[i+.455*n,a+.238*n]]).stream(f);o=u.translate([i-.307*n,a+.201*n]).clipExtent([[i-.425*n+Vt,a+.12*n+Vt],[i-.214*n-Vt,a+.234*n-Vt]]).stream(f);s=c.translate([i-.205*n,a+.212*n]).clipExtent([[i-.214*n+Vt,a+.166*n+Vt],[i-.115*n-Vt,a+.234*n-Vt]]).stream(f);return t()};e.fitExtent=function(t,n){return qe(e,t,n)};e.fitSize=function(t,n){return Fe(e,t,n)};e.fitWidth=function(t,n){return Ue(e,t,n)};e.fitHeight=function(t,n){return Ge(e,t,n)};return e.scale(1070)},Gi=Qe(function(e){return cn(2/(1+e))});Gi.invert=Je(function(e){return 2*o(e/2)});var zi=function(){return We(Gi).scale(124.75).clipAngle(179.999)},Hi=Qe(function(e){return(e=r(e))&&e/ln(e)});Hi.invert=Je(function(e){return e});var Vi=function(){return We(Hi).scale(79.4188).clipAngle(179.999)};et.invert=function(e,t){return[e,2*en(on(t))-Zt]};var Wi=function(){return tt(et).scale(961/Kt)},Yi=function(){return Ze(it).scale(109.5).parallels([30,30])};rt.invert=rt;var Zi=function(){return We(rt).scale(152.63)},$i=function(){return Ze(ot).scale(131.154).center([0,13.9389])};st.invert=Je(en);var Ki=function(){return We(st).scale(144.049).clipAngle(60)},Xi=function(){function e(){r=o=null;return s}var t,n,i,r,o,s,a=1,l=0,u=0,c=1,f=1,p=ai,h=null,d=ai;return s={stream:function(e){return r&&o===e?r:r=p(d(o=e))},postclip:function(r){return arguments.length?(d=r,h=t=n=i=null,e()):d},clipExtent:function(r){return arguments.length?(d=null==r?(h=t=n=i=null,ai):ne(h=+r[0][0],t=+r[0][1],n=+r[1][0],i=+r[1][1]),e()):null==h?null:[[h,t],[n,i]]},scale:function(t){return arguments.length?(p=at((a=+t)*c,a*f,l,u),e()):a},translate:function(t){return arguments.length?(p=at(a*c,a*f,l=+t[0],u=+t[1]),e()):[l,u]},reflectX:function(t){return arguments.length?(p=at(a*(c=t?-1:1),a*f,l,u),e()):c<0},reflectY:function(t){return arguments.length?(p=at(a*c,a*(f=t?-1:1),l,u),e()):f<0},fitExtent:function(e,t){return qe(s,e,t)},fitSize:function(e,t){return Fe(s,e,t)},fitWidth:function(e,t){return Ue(s,e,t)},fitHeight:function(e,t){return Ge(s,e,t)}}};lt.invert=function(e,t){var n,i=t,r=25;do{var o=i*i,s=o*o;i-=n=(i*(1.007226+o*(.015085+s*(-.044475+.028874*o-.005916*s)))-t)/(1.007226+o*(.045255+s*(-.311325+.259866*o-.005916*11*s)))}while(Jt(n)>Vt&&--r>0);return[e/(.8707+(o=i*i)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),i]};var Qi=function(){return We(lt).scale(175.295)};ut.invert=Je(o);var Ji=function(){return We(ut).scale(249.5).clipAngle(90+Vt)};ct.invert=Je(function(e){return 2*en(e)});var er=function(){return We(ct).scale(250).clipAngle(142)};ft.invert=function(e,t){return[-t,2*en(on(e))-Zt]};var tr=function(){var e=tt(ft),t=e.center,n=e.rotate;e.center=function(e){return arguments.length?t([-e[1],e[0]]):(e=t(),[e[1],-e[0]])};e.rotate=function(e){return arguments.length?n([e[0],e[1],e.length>2?e[2]+90:90]):(e=n(),[e[0],e[1],e[2]-90])};return n([0,0,90]).scale(159.155)};e.geoArea=yn;e.geoBounds=_n;e.geoCentroid=wn;e.geoCircle=Bn;e.geoClipAntimeridian=Vn;e.geoClipCircle=Wn;e.geoClipExtent=Kn;e.geoClipRectangle=ne;e.geoContains=oi;e.geoDistance=ni;e.geoGraticule=ge;e.geoGraticule10=me;e.geoInterpolate=si;e.geoLength=Jn;e.geoPath=Pi;e.geoAlbers=Fi;e.geoAlbersUsa=Ui;e.geoAzimuthalEqualArea=zi;e.geoAzimuthalEqualAreaRaw=Gi;e.geoAzimuthalEquidistant=Vi;e.geoAzimuthalEquidistantRaw=Hi;e.geoConicConformal=Yi;e.geoConicConformalRaw=it;e.geoConicEqualArea=qi;e.geoConicEqualAreaRaw=Ke;e.geoConicEquidistant=$i;e.geoConicEquidistantRaw=ot;e.geoEquirectangular=Zi;e.geoEquirectangularRaw=rt;e.geoGnomonic=Ki;e.geoGnomonicRaw=st;e.geoIdentity=Xi;e.geoProjection=We;e.geoProjectionMutator=Ye;e.geoMercator=Wi;e.geoMercatorRaw=et;e.geoNaturalEarth1=Qi;e.geoNaturalEarth1Raw=lt;e.geoOrthographic=Ji;e.geoOrthographicRaw=ut;e.geoStereographic=er;e.geoStereographicRaw=ct;e.geoTransverseMercator=tr;e.geoTransverseMercatorRaw=ft;e.geoRotation=jn;e.geoStream=dn;e.geoTransform=ki;Object.defineProperty(e,"__esModule",{value:!0})})},{"d3-array":30}],43:[function(e,t,n){(function(e,i){"object"==typeof n&&"undefined"!=typeof t?i(n):"function"==typeof define&&define.amd?define(["exports"],i):i(e.d3=e.d3||{})})(this,function(e){"use strict";function t(e,t){return e.parent===t.parent?1:2}function n(e){return e.reduce(i,0)/e.length}function i(e,t){return e+t.x}function r(e){return 1+e.reduce(o,0)}function o(e,t){return Math.max(e,t.y)}function s(e){for(var t;t=e.children;)e=t[0];return e}function a(e){for(var t;t=e.children;)e=t[t.length-1];return e}function l(e){var t=0,n=e.children,i=n&&n.length;if(i)for(;--i>=0;)t+=n[i].value;else t=1;e.value=t}function u(e,t){if(e===t)return e;var n=e.ancestors(),i=t.ancestors(),r=null;e=n.pop();t=i.pop();for(;e===t;){r=e;e=n.pop();t=i.pop()}return r}function c(e,t){var n,i,r,o,s,a=new g(e),l=+e.value&&(a.value=e.value),u=[a];null==t&&(t=p);for(;n=u.pop();){l&&(n.value=+n.data.value);if((r=t(n.data))&&(s=r.length)){n.children=new Array(s);for(o=s-1;o>=0;--o){u.push(i=n.children[o]=new g(r[o]));i.parent=n;i.depth=n.depth+1}}}return a.eachBefore(d)}function f(){return c(this).eachBefore(h)}function p(e){return e.children}function h(e){e.data=e.data.data}function d(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function g(e){this.data=e;this.depth=this.height=0;this.parent=null}function m(e){for(var t,n,i=e.length;i;){n=Math.random()*i--|0;t=e[i];e[i]=e[n];e[n]=t}return e}function v(e,t){var n,i;if(x(t,e))return[t];for(n=0;n0&&n*n>i*i+r*r}function x(e,t){for(var n=0;nn*n+i*i}function L(e){var t=e._,n=e.next._,i=t.r+n.r,r=(t.x*n.r+n.x*t.r)/i,o=(t.y*n.r+n.y*t.r)/i;return r*r+o*o}function N(e){this._=e;this.next=null;this.previous=null}function I(e){if(!(r=e.length))return 0;var t,n,i,r,o,s,a,l,u,c,f;t=e[0],t.x=0,t.y=0;if(!(r>1))return t.r;n=e[1],t.x=-n.r,n.x=t.r,n.y=0;if(!(r>2))return t.r+n.r;S(n,t,i=e[2]);t=new N(t),n=new N(n),i=new N(i);t.next=i.previous=n;n.next=t.previous=i;i.next=n.previous=t;e:for(a=3;a=0;){t=r[o];t.z+=n;t.m+=n;n+=t.s+(i+=t.c)}}function H(e,t,n){return e.a.parent===t.parent?e.a:n}function V(e,t){this._=e;this.parent=null;this.children=null;this.A=null;this.a=this;this.z=0;this.m=0;this.c=0;this.s=0;this.t=null;this.i=t}function W(e){for(var t,n,i,r,o,s=new V(e,0),a=[s];t=a.pop();)if(i=t._.children){t.children=new Array(o=i.length);for(r=o-1;r>=0;--r){a.push(n=t.children[r]=new V(i[r],r));n.parent=t}}(s.parent=new V(null,0)).children=[s];return s}function Y(e,t,n,i,r,o){for(var s,a,l,u,c,f,p,h,d,g,m,v=[],y=t.children,b=0,x=0,_=y.length,E=t.value;b<_;){l=r-n,u=o-i;do c=y[x++].value;while(!c&&x<_);f=p=c;g=Math.max(u/l,l/u)/(E*e);m=c*c*g;d=Math.max(p/m,m/f);for(;x<_;++x){c+=a=y[x].value;ap&&(p=a);m=c*c*g;h=Math.max(p/m,m/f);if(h>d){c-=a;break}d=h}v.push(s={value:c,dice:l=0;--n)r.push(t[n])}return this},Q=function(e){for(var t,n,i,r=this,o=[r],s=[];r=o.pop();){s.push(r),t=r.children;if(t)for(n=0,i=t.length;n=0;)n+=i[r].value;t.value=n})},ee=function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},te=function(e){for(var t=this,n=u(t,e),i=[t];t!==n;){t=t.parent;i.push(t)}for(var r=i.length;e!==n;){i.splice(r,0,e);e=e.parent}return i},ne=function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},ie=function(){var e=[];this.each(function(t){e.push(t)});return e},re=function(){var e=[];this.eachBefore(function(t){t.children||e.push(t)});return e},oe=function(){var e=this,t=[];e.each(function(n){n!==e&&t.push({source:n.parent,target:n})});return t};g.prototype=c.prototype={constructor:g,count:$,each:K,eachAfter:Q,eachBefore:X,sum:J,sort:ee,path:te,ancestors:ne,descendants:ie,leaves:re,links:oe,copy:f};var se=Array.prototype.slice,ae=function(e){for(var t,n,i=0,r=(e=m(se.call(e))).length,o=[];i0)throw new Error("cycle");return o}var t=j,n=B;e.id=function(n){return arguments.length?(t=R(n), e):t};e.parentId=function(t){return arguments.length?(n=R(t),e):n};return e};V.prototype=Object.create(g.prototype);var ye=function(){function e(e){var i=W(e);i.eachAfter(t),i.parent.m=-i.z;i.eachBefore(n);if(l)e.eachBefore(r);else{var u=e,c=e,f=e;e.eachBefore(function(e){e.xc.x&&(c=e);e.depth>f.depth&&(f=e)});var p=u===c?1:o(u,c)/2,h=p-u.x,d=s/(c.x+p+h),g=a/(f.depth||1);e.eachBefore(function(e){e.x=(e.x+h)*d;e.y=e.depth*g})}return e}function t(e){var t=e.children,n=e.parent.children,r=e.i?n[e.i-1]:null;if(t){z(e);var s=(t[0].z+t[t.length-1].z)/2;if(r){e.z=r.z+o(e._,r._);e.m=e.z-s}else e.z=s}else r&&(e.z=r.z+o(e._,r._));e.parent.A=i(e,r,e.parent.A||n[0])}function n(e){e._.x=e.z+e.parent.m;e.m+=e.parent.m}function i(e,t,n){if(t){for(var i,r=e,s=e,a=t,l=r.parent.children[0],u=r.m,c=s.m,f=a.m,p=l.m;a=U(a),r=F(r),a&&r;){l=F(l);s=U(s);s.a=e;i=a.z+f-r.z-u+o(a._,r._);if(i>0){G(H(a,e,n),e,i);u+=i;c+=i}f+=a.m;u+=r.m;p+=l.m;c+=s.m}if(a&&!U(s)){s.t=a;s.m+=f-c}if(r&&!F(l)){l.t=r;l.m+=u-p;n=e}}return n}function r(e){e.x*=s;e.y=e.depth*a}var o=q,s=1,a=1,l=null;e.separation=function(t){return arguments.length?(o=t,e):o};e.size=function(t){return arguments.length?(l=!1,s=+t[0],a=+t[1],e):l?null:[s,a]};e.nodeSize=function(t){return arguments.length?(l=!0,s=+t[0],a=+t[1],e):l?[s,a]:null};return e},be=function(e,t,n,i,r){for(var o,s=e.children,a=-1,l=s.length,u=e.value&&(r-n)/e.value;++a1?e:1)};return t}(xe),Ee=function(){function e(e){e.x0=e.y0=0;e.x1=r;e.y1=o;e.eachBefore(t);s=[0];i&&e.eachBefore(fe);return e}function t(e){var t=s[e.depth],i=e.x0+t,r=e.y0+t,o=e.x1-t,p=e.y1-t;o=t-1){var u=l[e];u.x0=i,u.y0=r;u.x1=s,u.y1=a}else{for(var f=c[e],p=n/2+f,h=e+1,d=t-1;h>>1;c[g]a-r){var y=(i*v+s*m)/n;o(e,h,m,i,r,y,a);o(h,t,v,y,r,s,a)}else{var b=(r*v+a*m)/n;o(e,h,m,i,r,s,b);o(h,t,v,i,b,s,a)}}}var s,a,l=e.children,u=l.length,c=new Array(u+1);for(c[0]=a=s=0;s1?e:1)};return t}(xe);e.cluster=Z;e.hierarchy=c;e.pack=ce;e.packSiblings=le;e.packEnclose=ae;e.partition=he;e.stratify=ve;e.tree=ye;e.treemap=Ee;e.treemapBinary=we;e.treemapDice=pe;e.treemapSlice=be;e.treemapSliceDice=Te;e.treemapSquarify=_e;e.treemapResquarify=Se;Object.defineProperty(e,"__esModule",{value:!0})})},{}],44:[function(e,t,n){(function(i,r){"object"==typeof n&&"undefined"!=typeof t?r(n,e("d3-color")):"function"==typeof define&&define.amd?define(["exports","d3-color"],r):r(i.d3=i.d3||{},i.d3)})(this,function(e,t){"use strict";function n(e,t,n,i,r){var o=e*e,s=o*e;return((1-3*e+3*o-s)*t+(4-6*o+3*s)*n+(1+3*e+3*o-3*s)*i+s*r)/6}function i(e,t){return function(n){return e+n*t}}function r(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}function o(e,t){var n=t-e;return n?i(e,n>180||n<-180?n-360*Math.round(n/360):n):L(isNaN(e)?t:e)}function s(e){return 1===(e=+e)?a:function(t,n){return n-t?r(t,n,e):L(isNaN(t)?n:t)}}function a(e,t){var n=t-e;return n?i(e,n):L(isNaN(e)?t:e)}function l(e){return function(n){var i,r,o=n.length,s=new Array(o),a=new Array(o),l=new Array(o);for(i=0;i180?t+=360:t-e>180&&(e+=360);o.push({i:n.push(r(n)+"rotate(",null,i)-2,x:P(e,t)})}else t&&n.push(r(n)+"rotate("+t+i)}function a(e,t,n,o){e!==t?o.push({i:n.push(r(n)+"skewX(",null,i)-2,x:P(e,t)}):t&&n.push(r(n)+"skewX("+t+i)}function l(e,t,n,i,o,s){if(e!==n||t!==i){var a=o.push(r(o)+"scale(",null,",",null,")");s.push({i:a-4,x:P(e,n)},{i:a-2,x:P(t,i)})}else 1===n&&1===i||o.push(r(o)+"scale("+n+","+i+")")}return function(t,n){var i=[],r=[];t=e(t),n=e(n);o(t.translateX,t.translateY,n.translateX,n.translateY,i,r);s(t.rotate,n.rotate,i,r);a(t.skewX,n.skewX,i,r);l(t.scaleX,t.scaleY,n.scaleX,n.scaleY,i,r);t=n=null;return function(e){for(var t,n=-1,o=r.length;++n=1?(i=1,t-1):Math.floor(i*t),o=e[r],s=e[r+1],a=r>0?e[r-1]:2*o-s,l=ro){r=t.slice(o,r);a[s]?a[s]+=r:a[++s]=r}if((n=n[0])===(i=i[0]))a[s]?a[s]+=i:a[++s]=i;else{a[++s]=null;l.push({i:s,x:P(n,i)})}o=D.lastIndex}if(oo)if(Math.abs(p*u-c*f)>o&&s){var d=n-a,g=r-l,m=u*u+c*c,v=d*d+g*g,y=Math.sqrt(m),b=Math.sqrt(h),x=s*Math.tan((i-Math.acos((m+h-v)/(2*y*b)))/2),_=x/b,E=x/y;Math.abs(_-1)>o&&(this._+="L"+(e+_*f)+","+(t+_*p));this._+="A"+s+","+s+",0,0,"+ +(p*d>f*g)+","+(this._x1=e+E*u)+","+(this._y1=t+E*c)}else this._+="L"+(this._x1=e)+","+(this._y1=t);else;},arc:function(e,t,n,a,l,u){e=+e,t=+t,n=+n;var c=n*Math.cos(a),f=n*Math.sin(a),p=e+c,h=t+f,d=1^u,g=u?a-l:l-a;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+p+","+h:(Math.abs(this._x1-p)>o||Math.abs(this._y1-h)>o)&&(this._+="L"+p+","+h);if(n){g<0&&(g=g%r+r);g>s?this._+="A"+n+","+n+",0,1,"+d+","+(e-c)+","+(t-f)+"A"+n+","+n+",0,1,"+d+","+(this._x1=p)+","+(this._y1=h):g>o&&(this._+="A"+n+","+n+",0,"+ +(g>=i)+","+d+","+(this._x1=e+n*Math.cos(l))+","+(this._y1=t+n*Math.sin(l)))}},rect:function(e,t,n,i){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}};e.path=n;Object.defineProperty(e,"__esModule",{value:!0})})},{}],46:[function(e,t,n){(function(e,i){"object"==typeof n&&"undefined"!=typeof t?i(n):"function"==typeof define&&define.amd?define(["exports"],i):i(e.d3=e.d3||{})})(this,function(e){"use strict";function t(e,t){return e[0]-t[0]||e[1]-t[1]}function n(e){for(var t=e.length,n=[0,1],i=2,r=2;r1&&o(e[n[i-2]],e[n[i-1]],e[r])<=0;)--i;n[i++]=r}return n.slice(0,i)}var i=function(e){for(var t,n=-1,i=e.length,r=e[i-1],o=0;++n=0;--i)f.push(e[o[a[i]][2]]);for(i=+u;ia!=u>a&&s<(l-n)*(a-i)/(u-i)+n&&(c=!c);l=n,u=i}return c},l=function(e){for(var t,n,i=-1,r=e.length,o=e[r-1],s=o[0],a=o[1],l=0;++i=(o=(g+v)/2))?g=o:v=o;(c=n>=(s=(m+y)/2))?m=s:y=s;if(r=h,!(h=h[f=c<<1|u]))return r[f]=d,e}a=+e._x.call(null,h.data);l=+e._y.call(null,h.data);if(t===a&&n===l)return d.next=h,r?r[f]=d:e._root=d,e;do{r=r?r[f]=new Array(4):e._root=new Array(4);(u=t>=(o=(g+v)/2))?g=o:v=o;(c=n>=(s=(m+y)/2))?m=s:y=s}while((f=c<<1|u)===(p=(l>=s)<<1|a>=o));return r[p]=h,r[f]=d,e}function n(e){var n,i,r,o,s=e.length,a=new Array(s),l=new Array(s),u=1/0,c=1/0,f=-(1/0),p=-(1/0);for(i=0;if&&(f=r);op&&(p=o)}fe||e>r||i>t||t>o))return this;var s,a,l=r-n,u=this._root;switch(a=(t<(i+o)/2)<<1|e<(n+r)/2){case 0:do s=new Array(4),s[a]=u,u=s;while(l*=2,r=n+l,o=i+l,e>r||t>o);break;case 1:do s=new Array(4),s[a]=u,u=s;while(l*=2,n=r-l,o=i+l,n>e||t>o);break;case 2:do s=new Array(4),s[a]=u,u=s;while(l*=2,r=n+l,i=o-l,e>r||i>t);break;case 3:do s=new Array(4),s[a]=u,u=s;while(l*=2,n=r-l,i=o-l,n>e||i>t)}this._root&&this._root.length&&(this._root=u)}this._x0=n;this._y0=i;this._x1=r;this._y1=o;return this},f=function(){var e=[];this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)});return e},p=function(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},h=function(e,t,n,i,r){this.node=e;this.x0=t;this.y0=n;this.x1=i;this.y1=r},d=function(e,t,n){var i,r,o,s,a,l,u,c=this._x0,f=this._y0,p=this._x1,d=this._y1,g=[],m=this._root;m&&g.push(new h(m,c,f,p,d));if(null==n)n=1/0;else{c=e-n,f=t-n;p=e+n,d=t+n;n*=n}for(;l=g.pop();)if(!(!(m=l.node)||(r=l.x0)>p||(o=l.y0)>d||(s=l.x1)=y)<<1|e>=v){l=g[g.length-1];g[g.length-1]=g[g.length-1-u];g[g.length-1-u]=l}}else{var b=e-+this._x.call(null,m.data),x=t-+this._y.call(null,m.data),_=b*b+x*x;if(_=(a=(d+m)/2))?d=a:m=a;(c=s>=(l=(g+v)/2))?g=l:v=l;if(!(t=h,h=h[f=c<<1|u]))return this;if(!h.length)break;(t[f+1&3]||t[f+2&3]||t[f+3&3])&&(n=t,p=f)}for(;h.data!==e;)if(!(i=h,h=h.next))return this;(r=h.next)&&delete h.next;if(i)return r?i.next=r:delete i.next,this;if(!t)return this._root=r,this;r?t[f]=r:delete t[f];(h=t[0]||t[1]||t[2]||t[3])&&h===(t[3]||t[2]||t[1]||t[0])&&!h.length&&(n?n[p]=h:this._root=h);return this},m=function(){return this._root},v=function(){var e=0;this.visit(function(t){if(!t.length)do++e;while(t=t.next)});return e},y=function(e){var t,n,i,r,o,s,a=[],l=this._root;l&&a.push(new h(l,this._x0,this._y0,this._x1,this._y1));for(;t=a.pop();)if(!e(l=t.node,i=t.x0,r=t.y0,o=t.x1,s=t.y1)&&l.length){var u=(i+o)/2,c=(r+s)/2;(n=l[3])&&a.push(new h(n,u,c,o,s));(n=l[2])&&a.push(new h(n,i,c,u,s));(n=l[1])&&a.push(new h(n,u,r,o,c));(n=l[0])&&a.push(new h(n,i,r,u,c))}return this},b=function(e){var t,n=[],i=[];this._root&&n.push(new h(this._root,this._x0,this._y0,this._x1,this._y1));for(;t=n.pop();){var r=t.node;if(r.length){var o,s=t.x0,a=t.y0,l=t.x1,u=t.y1,c=(s+l)/2,f=(a+u)/2;(o=r[0])&&n.push(new h(o,s,a,c,f));(o=r[1])&&n.push(new h(o,c,a,l,f));(o=r[2])&&n.push(new h(o,s,f,c,u));(o=r[3])&&n.push(new h(o,c,f,l,u))}i.push(t)}for(;t=i.pop();)e(t.node,t.x0,t.y0,t.x1,t.y1);return this},x=function(e){return arguments.length?(this._x=e,this):this._x},_=function(e){return arguments.length?(this._y=e,this):this._y},E=s.prototype=a.prototype;E.copy=function(){var e,t,n=new a(this._x,this._y,this._x0,this._y0,this._x1,this._y1),i=this._root;if(!i)return n;if(!i.length)return n._root=l(i),n;e=[{source:i,target:n._root=new Array(4)}];for(;i=e.pop();)for(var r=0;r<4;++r)(t=i.source[r])&&(t.length?e.push({source:t,target:i.target[r]=new Array(4)}):i.target[r]=l(t));return n};E.add=u;E.addAll=n;E.cover=c;E.data=f;E.extent=p;E.find=d;E.remove=g;E.removeAll=i;E.root=m;E.size=v;E.visit=y;E.visitAfter=b;E.x=x;E.y=_;e.quadtree=s;Object.defineProperty(e,"__esModule",{value:!0})})},{}],48:[function(e,t,n){(function(e,i){"object"==typeof n&&"undefined"!=typeof t?i(n):"function"==typeof define&&define.amd?define(["exports"],i):i(e.d3=e.d3||{})})(this,function(e){"use strict";function t(e){this._size=e;this._call=this._error=null;this._tasks=[];this._data=[];this._waiting=this._active=this._ended=this._start=0}function n(e){if(!e._start)try{i(e)}catch(t){if(e._tasks[e._ended+e._active-1])o(e,t);else if(!e._data)throw t}}function i(e){for(;e._start=e._waiting&&e._active=0;)if(n=e._tasks[i]){e._tasks[i]=null;if(n.abort)try{n.abort()}catch(t){}}e._active=NaN;s(e)}function s(e){if(!e._active&&e._call){var t=e._data;e._data=void 0;e._call(e._error,t)}}function a(e){if(null==e)e=1/0;else if(!((e=+e)>=1))throw new Error("invalid concurrency");return new t(e)}var l=[].slice,u={};t.prototype=a.prototype={constructor:t,defer:function(e){if("function"!=typeof e)throw new Error("invalid callback");if(this._call)throw new Error("defer after await");if(null!=this._error)return this;var t=l.call(arguments,1);t.push(e);++this._waiting,this._tasks.push(t);n(this);return this},abort:function(){null==this._error&&o(this,new Error("abort"));return this},await:function(e){if("function"!=typeof e)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");this._call=function(t,n){e.apply(null,[t].concat(n))};s(this);return this},awaitAll:function(e){if("function"!=typeof e)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");this._call=e;s(this);return this}};e.queue=a;Object.defineProperty(e,"__esModule",{value:!0})})},{}],49:[function(e,t,n){(function(e,i){"object"==typeof n&&"undefined"!=typeof t?i(n):"function"==typeof define&&define.amd?define(["exports"],i):i(e.d3=e.d3||{})})(this,function(e){"use strict";var t=function(){return Math.random()},n=function l(e){function t(t,n){t=null==t?0:+t;n=null==n?1:+n;1===arguments.length?(n=t,t=0):n-=t;return function(){return e()*n+t}}t.source=l;return t}(t),i=function u(e){function t(t,n){var i,r;t=null==t?0:+t;n=null==n?1:+n;return function(){var o;if(null!=i)o=i,i=null;else do{i=2*e()-1;o=2*e()-1;r=i*i+o*o}while(!r||r>1);return t+n*o*Math.sqrt(-2*Math.log(r)/r)}}t.source=u;return t}(t),r=function c(e){function t(){var t=i.source(e).apply(this,arguments);return function(){return Math.exp(t())}}t.source=c;return t}(t),o=function f(e){function t(t){return function(){for(var n=0,i=0;i=200&&n<300||304===n){if(c)try{t=c.call(o,d)}catch(i){p.call("error",o,i);return}else t=d;p.call("load",o,t)}else p.call("error",o,e)}var o,u,c,f,p=l.dispatch("beforesend","progress","load","error"),h=a.map(),d=new s,g=null,m=null,v=0;"undefined"==typeof XDomainRequest||"withCredentials"in d||!/^(http(s)?:)?\/\//.test(e)||(d=new XDomainRequest);"onload"in d?d.onload=d.onerror=d.ontimeout=n:d.onreadystatechange=function(e){d.readyState>3&&n(e)};d.onprogress=function(e){p.call("progress",o,e)};o={header:function(e,t){e=(e+"").toLowerCase();if(arguments.length<2)return h.get(e);null==t?h.remove(e):h.set(e,t+"");return o},mimeType:function(e){if(!arguments.length)return u;u=null==e?null:e+"";return o},responseType:function(e){if(!arguments.length)return f;f=e;return o},timeout:function(e){if(!arguments.length)return v;v=+e;return o},user:function(e){return arguments.length<1?g:(g=null==e?null:e+"",o)},password:function(e){return arguments.length<1?m:(m=null==e?null:e+"",o)},response:function(e){c=e;return o},get:function(e,t){return o.send("GET",e,t)},post:function(e,t){return o.send("POST",e,t)},send:function(t,n,r){d.open(t,e,!0,g,m);null==u||h.has("accept")||h.set("accept",u+",*/*");d.setRequestHeader&&h.each(function(e,t){d.setRequestHeader(t,e)});null!=u&&d.overrideMimeType&&d.overrideMimeType(u);null!=f&&(d.responseType=f);v>0&&(d.timeout=v);null==r&&"function"==typeof n&&(r=n,n=null);null!=r&&1===r.length&&(r=i(r));null!=r&&o.on("error",r).on("load",function(e){r(null,e)});p.call("beforesend",o,d);d.send(null==n?null:n);return o},abort:function(){d.abort();return o},on:function(){var e=p.on.apply(p,arguments);return e===p?o:e}};if(null!=t){if("function"!=typeof t)throw new Error("invalid callback: "+t);return o.get(t)}return o},f=function(e,t){return function(n,i){var r=c(n).mimeType(e).response(t);if(null!=i){if("function"!=typeof i)throw new Error("invalid callback: "+i);return r.get(i)}return r}},p=f("text/html",function(e){return document.createRange().createContextualFragment(e.responseText)}),h=f("application/json",function(e){return JSON.parse(e.responseText)}),d=f("text/plain",function(e){return e.responseText}),g=f("application/xml",function(e){var t=e.responseXML;if(!t)throw new Error("parse error");return t}),m=function(e,t){return function(n,i,r){arguments.length<3&&(r=i,i=null);var s=c(n).mimeType(e);s.row=function(e){return arguments.length?s.response(o(t,i=e)):i};s.row(i);return r?s.get(r):s}},v=m("text/csv",u.csvParse),y=m("text/tab-separated-values",u.tsvParse);n.request=c;n.html=p;n.json=h;n.text=d;n.xml=g;n.csv=v;n.tsv=y},{"d3-collection":34,"d3-dispatch":36,"d3-dsv":38,xmlhttprequest:252}],51:[function(e,t,n){(function(i,r){"object"==typeof n&&"undefined"!=typeof t?r(n,e("d3-array"),e("d3-collection"),e("d3-interpolate"),e("d3-format"),e("d3-time"),e("d3-time-format"),e("d3-color")):"function"==typeof define&&define.amd?define(["exports","d3-array","d3-collection","d3-interpolate","d3-format","d3-time","d3-time-format","d3-color"],r):r(i.d3=i.d3||{},i.d3,i.d3,i.d3,i.d3,i.d3,i.d3,i.d3)})(this,function(e,t,n,i,r,o,s,a){"use strict";function l(e){function t(t){var n=t+"",s=i.get(n);if(!s){if(o!==z)return o;i.set(n,s=r.push(t))}return e[(s-1)%e.length]}var i=n.map(),r=[],o=z;e=null==e?[]:G.call(e);t.domain=function(e){if(!arguments.length)return r.slice();r=[],i=n.map();for(var o,s,a=-1,l=e.length;++a=n?1:i(e)}}}function d(e){return function(t,n){var i=e(t=+t,n=+n);return function(e){return e<=0?t:e>=1?n:i(e)}}}function g(e,t,n,i){var r=e[0],o=e[1],s=t[0],a=t[1];o2?m:g;s=a=null;return r}function r(t){return(s||(s=o(l,u,f?h(e):e,c)))(+t)}var o,s,a,l=W,u=W,c=i.interpolate,f=!1;r.invert=function(e){return(a||(a=o(u,l,p,f?d(t):t)))(+e)};r.domain=function(e){return arguments.length?(l=U.call(e,V),n()):l.slice()};r.range=function(e){return arguments.length?(u=G.call(e),n()):u.slice()};r.rangeRound=function(e){return u=G.call(e),c=i.interpolateRound,n()};r.clamp=function(e){return arguments.length?(f=!!e,n()):f};r.interpolate=function(e){return arguments.length?(c=e,n()):c};return n()}function b(e){var n=e.domain;e.ticks=function(e){var i=n();return t.ticks(i[0],i[i.length-1],null==e?10:e)};e.tickFormat=function(e,t){return Y(n(),e,t)};e.nice=function(i){null==i&&(i=10);var r,o=n(),s=0,a=o.length-1,l=o[s],u=o[a];if(u0){l=Math.floor(l/r)*r;u=Math.ceil(u/r)*r;r=t.tickIncrement(l,u,i)}else if(r<0){l=Math.ceil(l*r)/r;u=Math.floor(u*r)/r;r=t.tickIncrement(l,u,i)}if(r>0){o[s]=Math.floor(l/r)*r;o[a]=Math.ceil(u/r)*r;n(o)}else if(r<0){o[s]=Math.ceil(l*r)/r;o[a]=Math.floor(u*r)/r;n(o)}return e};return e}function x(){var e=y(p,i.interpolateNumber);e.copy=function(){return v(e,x())};return b(e)}function _(){function e(e){return+e}var t=[0,1];e.invert=e;e.domain=e.range=function(n){return arguments.length?(t=U.call(n,V),e):t.slice()};e.copy=function(){return _().domain(t)};return b(e)}function E(e,t){return(t=Math.log(t/e))?function(n){return Math.log(n/e)/t}:H(t)}function w(e,t){return e<0?function(n){return-Math.pow(-t,n)*Math.pow(-e,1-n)}:function(n){return Math.pow(t,n)*Math.pow(e,1-n)}}function T(e){return isFinite(e)?+("1e"+e):e<0?0:e}function S(e){return 10===e?T:e===Math.E?Math.exp:function(t){return Math.pow(e,t)}}function C(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),function(t){return Math.log(t)/e})}function L(e){return function(t){return-e(-t)}}function N(){function e(){s=C(o),a=S(o);i()[0]<0&&(s=L(s),a=L(a));return n}var n=y(E,w).domain([1,10]),i=n.domain,o=10,s=C(10),a=S(10);n.base=function(t){return arguments.length?(o=+t,e()):o};n.domain=function(t){return arguments.length?(i(t),e()):i()};n.ticks=function(e){ var n,r=i(),l=r[0],u=r[r.length-1];(n=u0)for(;hu)break;m.push(p)}}else for(;h=1;--f){p=c*f;if(!(pu)break;m.push(p)}}}else m=t.ticks(h,d,Math.min(d-h,g)).map(a);return n?m.reverse():m};n.tickFormat=function(e,t){null==t&&(t=10===o?".0e":",");"function"!=typeof t&&(t=r.format(t));if(e===1/0)return t;null==e&&(e=10);var i=Math.max(1,o*e/n.ticks().length);return function(e){var n=e/a(Math.round(s(e)));n*o0?o[t-1]:i[0],t=o?[s[o-1],r]:[s[t-1],s[t]]};e.copy=function(){return P().domain([i,r]).range(a)};return b(e)}function k(){function e(e){if(e<=e)return i[t.bisect(n,e,0,r)]}var n=[.5],i=[0,1],r=1;e.domain=function(t){return arguments.length?(n=G.call(t),r=Math.min(n.length,i.length-1),e):n.slice()};e.range=function(t){return arguments.length?(i=G.call(t),r=Math.min(n.length,i.length-1),e):i.slice()};e.invertExtent=function(e){var t=i.indexOf(e);return[n[t-1],n[t]]};e.copy=function(){return k().domain(n).range(i)};return e}function M(e){return new Date(e)}function D(e){return e instanceof Date?+e:+new Date((+e))}function j(e,n,r,o,s,a,l,u,c){function f(t){return(l(t)1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);pe.h=360*e-100;pe.s=1.5-1.5*t;pe.l=.8-.9*t;return pe+""},de=B(re("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),ge=B(re("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),me=B(re("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),ve=B(re("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));e.scaleBand=u;e.scalePoint=f;e.scaleIdentity=_;e.scaleLinear=x;e.scaleLog=N;e.scaleOrdinal=l;e.scaleImplicit=z;e.scalePow=A;e.scaleSqrt=R;e.scaleQuantile=O;e.scaleQuantize=P;e.scaleThreshold=k;e.scaleTime=ne;e.scaleUtc=ie;e.schemeCategory10=oe;e.schemeCategory20b=se;e.schemeCategory20c=ae;e.schemeCategory20=le;e.interpolateCubehelixDefault=ue;e.interpolateRainbow=he;e.interpolateWarm=ce;e.interpolateCool=fe;e.interpolateViridis=de;e.interpolateMagma=ge;e.interpolateInferno=me;e.interpolatePlasma=ve;e.scaleSequential=q;Object.defineProperty(e,"__esModule",{value:!0})})},{"d3-array":30,"d3-collection":34,"d3-color":35,"d3-format":41,"d3-interpolate":44,"d3-time":55,"d3-time-format":54}],52:[function(e,t,n){(function(e,i){"object"==typeof n&&"undefined"!=typeof t?i(n):"function"==typeof define&&define.amd?define(["exports"],i):i(e.d3=e.d3||{})})(this,function(e){"use strict";function t(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===J&&t.documentElement.namespaceURI===J?t.createElement(e):t.createElementNS(n,e)}}function n(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function i(){return new r}function r(){this._="@"+(++ie).toString(36)}function o(e,t,n){e=s(e,t,n);return function(t){var n=t.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||e.call(this,t)}}function s(t,n,i){return function(r){var o=e.event;e.event=r;try{t.call(this,this.__data__,n,i)}finally{e.event=o}}}function a(e){return e.trim().split(/^|\s+/).map(function(e){var t="",n=e.indexOf(".");n>=0&&(t=e.slice(n+1),e=e.slice(0,n));return{type:e,name:t}})}function l(e){return function(){var t=this.__on;if(t){for(var n,i=0,r=-1,o=t.length;it?1:e>=t?0:NaN}function v(e){return function(){this.removeAttribute(e)}}function y(e){return function(){this.removeAttributeNS(e.space,e.local)}}function b(e,t){return function(){this.setAttribute(e,t)}}function x(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function _(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function E(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function w(e){return function(){this.style.removeProperty(e)}}function T(e,t,n){return function(){this.style.setProperty(e,t,n)}}function S(e,t,n){return function(){var i=t.apply(this,arguments);null==i?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function C(e,t){return e.style.getPropertyValue(t)||Me(e).getComputedStyle(e,null).getPropertyValue(t)}function L(e){return function(){delete this[e]}}function N(e,t){return function(){this[e]=t}}function I(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function A(e){return e.trim().split(/^|\s+/)}function R(e){return e.classList||new O(e)}function O(e){this._node=e;this._names=A(e.getAttribute("class")||"")}function P(e,t){for(var n=R(e),i=-1,r=t.length;++i=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1));return ee.hasOwnProperty(t)?{space:ee[t],local:e}:e},ne=function(e){var i=te(e);return(i.local?n:t)(i)},ie=0;r.prototype=i.prototype={constructor:r,get:function(e){for(var t=this._;!(t in e);)if(!(e=e.parentNode))return;return e[t]},set:function(e,t){return e[this._]=t},remove:function(e){return this._ in e&&delete e[this._]},toString:function(){return this._}};var re=function(e){return function(){return this.matches(e)}};if("undefined"!=typeof document){var oe=document.documentElement;if(!oe.matches){var se=oe.webkitMatchesSelector||oe.msMatchesSelector||oe.mozMatchesSelector||oe.oMatchesSelector;re=function(e){return function(){return se.call(this,e)}}}}var ae=re,le={};e.event=null;if("undefined"!=typeof document){var ue=document.documentElement;"onmouseenter"in ue||(le={mouseenter:"mouseover",mouseleave:"mouseout"})}var ce=function(e,t,n){var i,r,o=a(e+""),s=o.length;if(!(arguments.length<2)){c=t?u:l;null==n&&(n=!1);for(i=0;i=w&&(w=E+1);for(;!(_=y[w])&&++w=0;)if(i=r[o]){s&&s!==i.nextSibling&&s.parentNode.insertBefore(i,s);s=i}return this},Le=function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=m);for(var n=this._groups,i=n.length,r=new Array(i),o=0;o1?this.each((null==t?w:"function"==typeof t?S:T)(e,t,null==n?"":n)):C(this.node(),e)},je=function(e,t){return arguments.length>1?this.each((null==t?L:"function"==typeof t?I:N)(e,t)):this.node()[e]};O.prototype={add:function(e){var t=this._names.indexOf(e);if(t<0){this._names.push(e);this._node.setAttribute("class",this._names.join(" "))}},remove:function(e){var t=this._names.indexOf(e);if(t>=0){this._names.splice(t,1);this._node.setAttribute("class",this._names.join(" "))}},contains:function(e){return this._names.indexOf(e)>=0}};var Be=function(e,t){var n=A(e+"");if(arguments.length<2){for(var i=R(this.node()),r=-1,o=n.length;++r1?0:e<-1?fe:Math.acos(e)}function i(e){return e>=1?pe:e<=-1?-pe:Math.asin(e)}function r(e){return e.innerRadius}function o(e){return e.outerRadius}function s(e){return e.startAngle}function a(e){return e.endAngle}function l(e){return e&&e.padAngle}function u(e,t,n,i,r,o,s,a){var l=n-e,u=i-t,c=s-r,f=a-o,p=(c*(t-o)-f*(e-r))/(f*l-c*u);return[e+p*l,t+p*u]}function c(e,t,n,i,r,o,s){var a=e-n,l=t-i,u=(s?o:-o)/ue(a*a+l*l),c=u*l,f=-u*a,p=e+c,h=t+f,d=n+c,g=i+f,m=(p+d)/2,v=(h+g)/2,y=d-p,b=g-h,x=y*y+b*b,_=r-o,E=p*g-d*h,w=(b<0?-1:1)*ue(se(0,_*_*x-E*E)),T=(E*b-y*w)/x,S=(-E*y-b*w)/x,C=(E*b+y*w)/x,L=(-E*y+b*w)/x,N=T-m,I=S-v,A=C-m,R=L-v;N*N+I*I>A*A+R*R&&(T=C,S=L);return{cx:T,cy:S,x01:-c,y01:-f,x11:T*(r/_-1),y11:S*(r/_-1)}}function f(e){this._context=e}function p(e){return e[0]}function h(e){return e[1]}function d(e){this._curve=e}function g(e){function t(t){return new d(e(t))}t._curve=e;return t}function m(e){var t=e.curve;e.angle=e.x,delete e.x;e.radius=e.y,delete e.y;e.curve=function(e){return arguments.length?t(g(e)):t()._curve};return e}function v(e){return e.source}function y(e){return e.target}function b(e){function n(){var n,l=Se.call(arguments),u=i.apply(this,l),c=r.apply(this,l);a||(a=n=t.path());e(a,+o.apply(this,(l[0]=u,l)),+s.apply(this,l),+o.apply(this,(l[0]=c,l)),+s.apply(this,l));if(n)return a=null,n+""||null}var i=v,r=y,o=p,s=h,a=null;n.source=function(e){return arguments.length?(i=e,n):i};n.target=function(e){return arguments.length?(r=e,n):r};n.x=function(e){return arguments.length?(o="function"==typeof e?e:ne(+e),n):o};n.y=function(e){return arguments.length?(s="function"==typeof e?e:ne(+e),n):s};n.context=function(e){return arguments.length?(a=null==e?null:e,n):a};return n}function x(e,t,n,i,r){e.moveTo(t,n);e.bezierCurveTo(t=(t+i)/2,n,t,r,i,r)}function _(e,t,n,i,r){e.moveTo(t,n);e.bezierCurveTo(t,n=(n+r)/2,i,n,i,r)}function E(e,t,n,i,r){var o=Te(t,n),s=Te(t,n=(n+r)/2),a=Te(i,n),l=Te(i,r);e.moveTo(o[0],o[1]);e.bezierCurveTo(s[0],s[1],a[0],a[1],l[0],l[1])}function w(){return b(x)}function T(){return b(_)}function S(){var e=b(E);e.angle=e.x,delete e.x;e.radius=e.y,delete e.y;return e}function C(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function L(e){this._context=e}function N(e){this._context=e}function I(e){this._context=e}function A(e,t){this._basis=new L(e);this._beta=t}function R(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function O(e,t){this._context=e;this._k=(1-t)/6}function P(e,t){this._context=e;this._k=(1-t)/6}function k(e,t){this._context=e;this._k=(1-t)/6}function M(e,t,n){var i=e._x1,r=e._y1,o=e._x2,s=e._y2;if(e._l01_a>ce){var a=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*a-e._x0*e._l12_2a+e._x2*e._l01_2a)/l;r=(r*a-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>ce){var u=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*u+e._x1*e._l23_2a-t*e._l12_2a)/c;s=(s*u+e._y1*e._l23_2a-n*e._l12_2a)/c}e._context.bezierCurveTo(i,r,o,s,e._x2,e._y2)}function D(e,t){this._context=e;this._alpha=t}function j(e,t){this._context=e;this._alpha=t}function B(e,t){this._context=e;this._alpha=t}function q(e){this._context=e}function F(e){return e<0?-1:1}function U(e,t,n){var i=e._x1-e._x0,r=t-e._x1,o=(e._y1-e._y0)/(i||r<0&&-0),s=(n-e._y1)/(r||i<0&&-0),a=(o*r+s*i)/(i+r);return(F(o)+F(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(a))||0}function G(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function z(e,t,n){var i=e._x0,r=e._y0,o=e._x1,s=e._y1,a=(o-i)/3;e._context.bezierCurveTo(i+a,r+a*t,o-a,s-a*n,o,s)}function H(e){this._context=e}function V(e){this._context=new W(e)}function W(e){this._context=e}function Y(e){return new H(e)}function Z(e){return new V(e)}function $(e){this._context=e}function K(e){var t,n,i=e.length-1,r=new Array(i),o=new Array(i),s=new Array(i);r[0]=0,o[0]=2,s[0]=e[0]+2*e[1];for(t=1;t=0;--t)r[t]=(s[t]-r[t+1])/o[t];o[i-1]=(e[i]+r[i-1])/2;for(t=0;ta;y||(y=e=t.path());sce)if(b>he-ce){y.moveTo(s*oe(a),s*le(a));y.arc(0,0,s,a,l,!x);if(o>ce){y.moveTo(o*oe(l),o*le(l)); y.arc(0,0,o,l,a,x)}}else{var _,E,w=a,T=l,S=a,C=l,L=b,N=b,I=v.apply(this,arguments)/2,A=I>ce&&(d?+d.apply(this,arguments):ue(o*o+s*s)),R=ae(ie(s-o)/2,+h.apply(this,arguments)),O=R,P=R;if(A>ce){var k=i(A/o*le(I)),M=i(A/s*le(I));(L-=2*k)>ce?(k*=x?1:-1,S+=k,C-=k):(L=0,S=C=(a+l)/2);(N-=2*M)>ce?(M*=x?1:-1,w+=M,T-=M):(N=0,w=T=(a+l)/2)}var D=s*oe(w),j=s*le(w),B=o*oe(C),q=o*le(C);if(R>ce){var F=s*oe(T),U=s*le(T),G=o*oe(S),z=o*le(S);if(bce?u(D,j,G,z,F,U,B,q):[B,q],V=D-H[0],W=j-H[1],Y=F-H[0],Z=U-H[1],$=1/le(n((V*Y+W*Z)/(ue(V*V+W*W)*ue(Y*Y+Z*Z)))/2),K=ue(H[0]*H[0]+H[1]*H[1]);O=ae(R,(o-K)/($-1));P=ae(R,(s-K)/($+1))}}if(N>ce)if(P>ce){_=c(G,z,D,j,s,P,x);E=c(F,U,B,q,s,P,x);y.moveTo(_.cx+_.x01,_.cy+_.y01);if(Pce&&L>ce)if(O>ce){_=c(B,q,F,U,o,-O,x);E=c(D,j,G,z,o,-O,x);y.lineTo(_.cx+_.x01,_.cy+_.y01);if(O=f;--p)c.point(v[p],y[p]);c.lineEnd();c.areaEnd()}if(m){v[n]=+i(h,n,e),y[n]=+o(h,n,e);c.point(r?+r(h,n,e):v[n],s?+s(h,n,e):y[n])}}if(d)return c=null,d+""||null}function n(){return me().defined(a).curve(u).context(l)}var i=p,r=null,o=ne(0),s=h,a=ne(!0),l=null,u=ge,c=null;e.x=function(t){return arguments.length?(i="function"==typeof t?t:ne(+t),r=null,e):i};e.x0=function(t){return arguments.length?(i="function"==typeof t?t:ne(+t),e):i};e.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:ne(+t),e):r};e.y=function(t){return arguments.length?(o="function"==typeof t?t:ne(+t),s=null,e):o};e.y0=function(t){return arguments.length?(o="function"==typeof t?t:ne(+t),e):o};e.y1=function(t){return arguments.length?(s=null==t?null:"function"==typeof t?t:ne(+t),e):s};e.lineX0=e.lineY0=function(){return n().x(i).y(o)};e.lineY1=function(){return n().x(i).y(s)};e.lineX1=function(){return n().x(r).y(o)};e.defined=function(t){return arguments.length?(a="function"==typeof t?t:ne(!!t),e):a};e.curve=function(t){return arguments.length?(u=t,null!=l&&(c=u(l)),e):u};e.context=function(t){return arguments.length?(null==t?l=c=null:c=u(l=t),e):l};return e},ye=function(e,t){return te?1:t>=e?0:NaN},be=function(e){return e},xe=function(){function e(e){var a,l,u,c,f,p=e.length,h=0,d=new Array(p),g=new Array(p),m=+r.apply(this,arguments),v=Math.min(he,Math.max(-he,o.apply(this,arguments)-m)),y=Math.min(Math.abs(v)/p,s.apply(this,arguments)),b=y*(v<0?-1:1);for(a=0;a0&&(h+=f);null!=n?d.sort(function(e,t){return n(g[e],g[t])}):null!=i&&d.sort(function(t,n){return i(e[t],e[n])});for(a=0,u=h?(v-p*b)/h:0;a0?f*u:0)+b,g[l]={data:e[l],index:a,value:f,startAngle:m,endAngle:c,padAngle:y};return g}var t=be,n=ye,i=null,r=ne(0),o=ne(he),s=ne(0);e.value=function(n){return arguments.length?(t="function"==typeof n?n:ne(+n),e):t};e.sortValues=function(t){return arguments.length?(n=t,i=null,e):n};e.sort=function(t){return arguments.length?(i=t,n=null,e):i};e.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:ne(+t),e):r};e.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:ne(+t),e):o};e.padAngle=function(t){return arguments.length?(s="function"==typeof t?t:ne(+t),e):s};return e},_e=g(ge);d.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};var Ee=function(){return m(me().curve(_e))},we=function(){var e=ve().curve(_e),t=e.curve,n=e.lineX0,i=e.lineX1,r=e.lineY0,o=e.lineY1;e.angle=e.x,delete e.x;e.startAngle=e.x0,delete e.x0;e.endAngle=e.x1,delete e.x1;e.radius=e.y,delete e.y;e.innerRadius=e.y0,delete e.y0;e.outerRadius=e.y1,delete e.y1;e.lineStartAngle=function(){return m(n())},delete e.lineX0;e.lineEndAngle=function(){return m(i())},delete e.lineX1;e.lineInnerRadius=function(){return m(r())},delete e.lineY0;e.lineOuterRadius=function(){return m(o())},delete e.lineY1;e.curve=function(e){return arguments.length?t(g(e)):t()._curve};return e},Te=function(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]},Se=Array.prototype.slice,Ce={draw:function(e,t){var n=Math.sqrt(t/fe);e.moveTo(n,0);e.arc(0,0,n,0,he)}},Le={draw:function(e,t){var n=Math.sqrt(t/5)/2;e.moveTo(-3*n,-n);e.lineTo(-n,-n);e.lineTo(-n,-3*n);e.lineTo(n,-3*n);e.lineTo(n,-n);e.lineTo(3*n,-n);e.lineTo(3*n,n);e.lineTo(n,n);e.lineTo(n,3*n);e.lineTo(-n,3*n);e.lineTo(-n,n);e.lineTo(-3*n,n);e.closePath()}},Ne=Math.sqrt(1/3),Ie=2*Ne,Ae={draw:function(e,t){var n=Math.sqrt(t/Ie),i=n*Ne;e.moveTo(0,-n);e.lineTo(i,0);e.lineTo(0,n);e.lineTo(-i,0);e.closePath()}},Re=.8908130915292852,Oe=Math.sin(fe/10)/Math.sin(7*fe/10),Pe=Math.sin(he/10)*Oe,ke=-Math.cos(he/10)*Oe,Me={draw:function(e,t){var n=Math.sqrt(t*Re),i=Pe*n,r=ke*n;e.moveTo(0,-n);e.lineTo(i,r);for(var o=1;o<5;++o){var s=he*o/5,a=Math.cos(s),l=Math.sin(s);e.lineTo(l*n,-a*n);e.lineTo(a*i-l*r,l*i+a*r)}e.closePath()}},De={draw:function(e,t){var n=Math.sqrt(t),i=-n/2;e.rect(i,i,n,n)}},je=Math.sqrt(3),Be={draw:function(e,t){var n=-Math.sqrt(t/(3*je));e.moveTo(0,2*n);e.lineTo(-je*n,-n);e.lineTo(je*n,-n);e.closePath()}},qe=-.5,Fe=Math.sqrt(3)/2,Ue=1/Math.sqrt(12),Ge=3*(Ue/2+1),ze={draw:function(e,t){var n=Math.sqrt(t/Ge),i=n/2,r=n*Ue,o=i,s=n*Ue+n,a=-o,l=s;e.moveTo(i,r);e.lineTo(o,s);e.lineTo(a,l);e.lineTo(qe*i-Fe*r,Fe*i+qe*r);e.lineTo(qe*o-Fe*s,Fe*o+qe*s);e.lineTo(qe*a-Fe*l,Fe*a+qe*l);e.lineTo(qe*i+Fe*r,qe*r-Fe*i);e.lineTo(qe*o+Fe*s,qe*s-Fe*o);e.lineTo(qe*a+Fe*l,qe*l-Fe*a);e.closePath()}},He=[Ce,Le,Ae,De,Me,Be,ze],Ve=function(){function e(){var e;r||(r=e=t.path());n.apply(this,arguments).draw(r,+i.apply(this,arguments));if(e)return r=null,e+""||null}var n=ne(Ce),i=ne(64),r=null;e.type=function(t){return arguments.length?(n="function"==typeof t?t:ne(t),e):n};e.size=function(t){return arguments.length?(i="function"==typeof t?t:ne(+t),e):i};e.context=function(t){return arguments.length?(r=null==t?null:t,e):r};return e},We=function(){};L.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN;this._point=0},lineEnd:function(){switch(this._point){case 3:C(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath();this._line=1-this._line},point:function(e,t){e=+e,t=+t;switch(this._point){case 0:this._point=1;this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:C(this,e,t)}this._x0=this._x1,this._x1=e;this._y0=this._y1,this._y1=t}};var Ye=function(e){return new L(e)};N.prototype={areaStart:We,areaEnd:We,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN;this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2);this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3);this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3);this._context.closePath();break;case 3:this.point(this._x2,this._y2);this.point(this._x3,this._y3);this.point(this._x4,this._y4)}},point:function(e,t){e=+e,t=+t;switch(this._point){case 0:this._point=1;this._x2=e,this._y2=t;break;case 1:this._point=2;this._x3=e,this._y3=t;break;case 2:this._point=3;this._x4=e,this._y4=t;this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:C(this,e,t)}this._x0=this._x1,this._x1=e;this._y0=this._y1,this._y1=t}};var Ze=function(e){return new N(e)};I.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN;this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath();this._line=1-this._line},point:function(e,t){e=+e,t=+t;switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:C(this,e,t)}this._x0=this._x1,this._x1=e;this._y0=this._y1,this._y1=t}};var $e=function(e){return new I(e)};A.prototype={lineStart:function(){this._x=[];this._y=[];this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var i,r=e[0],o=t[0],s=e[n]-r,a=t[n]-o,l=-1;++l<=n;){i=l/n;this._basis.point(this._beta*e[l]+(1-this._beta)*(r+i*s),this._beta*t[l]+(1-this._beta)*(o+i*a))}this._x=this._y=null;this._basis.lineEnd()},point:function(e,t){this._x.push(+e);this._y.push(+t)}};var Ke=function vt(e){function t(t){return 1===e?new L(t):new A(t,e)}t.beta=function(e){return vt(+e)};return t}(.85);O.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN;this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:R(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath();this._line=1-this._line},point:function(e,t){e=+e,t=+t;switch(this._point){case 0:this._point=1;this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;this._x1=e,this._y1=t;break;case 2:this._point=3;default:R(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e;this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Xe=function yt(e){function t(t){return new O(t,e)}t.tension=function(e){return yt(+e)};return t}(0);P.prototype={areaStart:We,areaEnd:We,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN;this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3);this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3);this._context.closePath();break;case 3:this.point(this._x3,this._y3);this.point(this._x4,this._y4);this.point(this._x5,this._y5)}},point:function(e,t){e=+e,t=+t;switch(this._point){case 0:this._point=1;this._x3=e,this._y3=t;break;case 1:this._point=2;this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3;this._x5=e,this._y5=t;break;default:R(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e;this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Qe=function bt(e){function t(t){return new P(t,e)}t.tension=function(e){return bt(+e)};return t}(0);k.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN;this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath();this._line=1-this._line},point:function(e,t){e=+e,t=+t;switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:R(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e;this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Je=function xt(e){function t(t){return new k(t,e)}t.tension=function(e){return xt(+e)};return t}(0);D.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN;this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath();this._line=1-this._line},point:function(e,t){e=+e,t=+t;if(this._point){var n=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1;this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:M(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a;this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a;this._x0=this._x1,this._x1=this._x2,this._x2=e;this._y0=this._y1,this._y1=this._y2,this._y2=t}};var et=function _t(e){function t(t){return e?new D(t,e):new O(t,0)}t.alpha=function(e){return _t(+e)};return t}(.5);j.prototype={areaStart:We,areaEnd:We,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN;this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3);this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3);this._context.closePath();break;case 3:this.point(this._x3,this._y3);this.point(this._x4,this._y4);this.point(this._x5,this._y5)}},point:function(e,t){e=+e,t=+t;if(this._point){var n=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1;this._x3=e,this._y3=t;break;case 1:this._point=2;this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3;this._x5=e,this._y5=t;break;default:M(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a;this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a;this._x0=this._x1,this._x1=this._x2,this._x2=e;this._y0=this._y1,this._y1=this._y2,this._y2=t}};var tt=function Et(e){function t(t){return e?new j(t,e):new P(t,0)}t.alpha=function(e){return Et(+e)};return t}(.5);B.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN;this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath();this._line=1-this._line},point:function(e,t){e=+e,t=+t;if(this._point){var n=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:M(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a;this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a;this._x0=this._x1,this._x1=this._x2,this._x2=e;this._y0=this._y1,this._y1=this._y2,this._y2=t}};var nt=function wt(e){function t(t){return e?new B(t,e):new k(t,0)}t.alpha=function(e){return wt(+e)};return t}(.5);q.prototype={areaStart:We,areaEnd:We,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t;this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};var it=function(e){return new q(e)};H.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN;this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:z(this,this._t0,G(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath();this._line=1-this._line},point:function(e,t){var n=NaN;e=+e,t=+t;if(e!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1;this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;z(this,G(this,n=U(this,e,t)),n);break;default:z(this,this._t0,n=U(this,e,t))}this._x0=this._x1,this._x1=e;this._y0=this._y1,this._y1=t;this._t0=n}}};(V.prototype=Object.create(H.prototype)).point=function(e,t){H.prototype.point.call(this,t,e)};W.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,i,r,o){this._context.bezierCurveTo(t,e,i,n,o,r)}};$.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[];this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n){this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]);if(2===n)this._context.lineTo(e[1],t[1]);else for(var i=K(e),r=K(t),o=0,s=1;s=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){e=+e,t=+t;switch(this._point){case 0:this._point=1;this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0){this._context.lineTo(this._x,t);this._context.lineTo(e,t)}else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y);this._context.lineTo(n,t)}}this._x=e,this._y=t}};var ot=function(e){return new X(e,.5)},st=function(e,t){if((r=e.length)>1)for(var n,i,r,o=1,s=e[t[0]],a=s.length;o=0;)n[t]=t;return n},lt=function(){function e(e){var o,s,a=t.apply(this,arguments),l=e.length,u=a.length,c=new Array(u);for(o=0;o0){for(var n,i,r,o=0,s=e[0].length;o1)for(var n,i,r,o,s,a,l=0,u=e[t[0]].length;l=0?(i[0]=o,i[1]=o+=r):r<0?(i[1]=s,i[0]=s+=r):i[0]=o},ft=function(e,t){if((n=e.length)>0){for(var n,i=0,r=e[t[0]],o=r.length;i0&&(i=(n=e[t[0]]).length)>0){for(var n,i,r,o=0,s=1;s53)return null;"w"in u||(u.w=1);if("Z"in u){s=i(r(u.y)),l=s.getUTCDay();s=l>4||0===l?t.utcMonday.ceil(s):t.utcMonday(s);s=t.utcDay.offset(s,7*(u.V-1));u.y=s.getUTCFullYear();u.m=s.getUTCMonth();u.d=s.getUTCDate()+(u.w+6)%7}else{s=n(r(u.y)),l=s.getDay();s=l>4||0===l?t.timeMonday.ceil(s):t.timeMonday(s);s=t.timeDay.offset(s,7*(u.V-1));u.y=s.getFullYear();u.m=s.getMonth();u.d=s.getDate()+(u.w+6)%7}}else if("W"in u||"U"in u){"w"in u||(u.w="u"in u?u.u%7:"W"in u?1:0);l="Z"in u?i(r(u.y)).getUTCDay():n(r(u.y)).getDay();u.m=0;u.d="W"in u?(u.w+6)%7+7*u.W-(l+5)%7:u.w+7*u.U-(l+6)%7}if("Z"in u){u.H+=u.Z/100|0;u.M+=u.Z%100;return i(u)}return n(u)}}function a(e,t,n,i){for(var r,o,s=0,a=t.length,l=n.length;s=l)return-1;r=t.charCodeAt(s++);if(37===r){r=t.charAt(s++);o=Xe[r in me?t.charAt(s++):r];if(!o||(i=o(e,n,i))<0)return-1}else if(r!=n.charCodeAt(i++))return-1}return i}function pe(e,t,n){var i=qe.exec(t.slice(n));return i?(e.p=Fe[i[0].toLowerCase()],n+i[0].length):-1}function he(e,t,n){var i=ze.exec(t.slice(n));return i?(e.w=He[i[0].toLowerCase()],n+i[0].length):-1}function de(e,t,n){var i=Ue.exec(t.slice(n));return i?(e.w=Ge[i[0].toLowerCase()],n+i[0].length):-1}function ge(e,t,n){var i=Ye.exec(t.slice(n));return i?(e.m=Ze[i[0].toLowerCase()],n+i[0].length):-1}function ve(e,t,n){var i=Ve.exec(t.slice(n));return i?(e.m=We[i[0].toLowerCase()],n+i[0].length):-1}function ye(e,t,n){return a(e,Re,t,n)}function be(e,t,n){return a(e,Oe,t,n)}function xe(e,t,n){return a(e,Pe,t,n)}function _e(e){return De[e.getDay()]}function Ee(e){return Me[e.getDay()]}function we(e){return Be[e.getMonth()]}function Te(e){return je[e.getMonth()]}function Se(e){return ke[+(e.getHours()>=12)]}function Ce(e){return De[e.getUTCDay()]}function Le(e){return Me[e.getUTCDay()]}function Ne(e){return Be[e.getUTCMonth()]}function Ie(e){return je[e.getUTCMonth()]}function Ae(e){return ke[+(e.getUTCHours()>=12)]}var Re=e.dateTime,Oe=e.date,Pe=e.time,ke=e.periods,Me=e.days,De=e.shortDays,je=e.months,Be=e.shortMonths,qe=l(ke),Fe=u(ke),Ue=l(Me),Ge=u(Me),ze=l(De),He=u(De),Ve=l(je),We=u(je),Ye=l(Be),Ze=u(Be),$e={a:_e,A:Ee,b:we,B:Te,c:null,d:I,e:I,f:k,H:A,I:R,j:O,L:P,m:M,M:D,p:Se,Q:ce,s:fe,S:j,u:B,U:q,V:F,w:U,W:G,x:null,X:null,y:z,Y:H,Z:V,"%":ue},Ke={a:Ce,A:Le,b:Ne,B:Ie,c:null,d:W,e:W,f:X,H:Y,I:Z,j:$,L:K,m:Q,M:J,p:Ae,Q:ce,s:fe,S:ee,u:te,U:ne,V:ie,w:re,W:oe,x:null,X:null,y:se,Y:ae,Z:le,"%":ue},Xe={a:he,A:de,b:ge,B:ve,c:ye,d:b,e:b,f:S,H:_,I:_,j:x,L:T,m:y,M:E,p:pe,Q:L,s:N,S:w,u:f,U:p,V:h,w:c,W:d,x:be,X:xe,y:m,Y:g,Z:v,"%":C};$e.x=o(Oe,$e);$e.X=o(Pe,$e);$e.c=o(Re,$e);Ke.x=o(Oe,Ke);Ke.X=o(Pe,Ke);Ke.c=o(Re,Ke);return{format:function(e){var t=o(e+="",$e);t.toString=function(){return e};return t},parse:function(e){var t=s(e+="",n);t.toString=function(){return e};return t},utcFormat:function(e){var t=o(e+="",Ke);t.toString=function(){return e};return t},utcParse:function(e){var t=s(e,i);t.toString=function(){return e};return t}}}function s(e,t,n){var i=e<0?"-":"",r=(i?-e:e)+"",o=r.length;return i+(o68?1900:2e3),n+i[0].length):-1}function v(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 y(e,t,n){var i=ve.exec(t.slice(n,n+2));return i?(e.m=i[0]-1,n+i[0].length):-1}function b(e,t,n){var i=ve.exec(t.slice(n,n+2));return i?(e.d=+i[0],n+i[0].length):-1}function x(e,t,n){var i=ve.exec(t.slice(n,n+3));return i?(e.m=0,e.d=+i[0],n+i[0].length):-1}function _(e,t,n){var i=ve.exec(t.slice(n,n+2));return i?(e.H=+i[0],n+i[0].length):-1}function E(e,t,n){var i=ve.exec(t.slice(n,n+2));return i?(e.M=+i[0],n+i[0].length):-1}function w(e,t,n){var i=ve.exec(t.slice(n,n+2));return i?(e.S=+i[0],n+i[0].length):-1}function T(e,t,n){var i=ve.exec(t.slice(n,n+3));return i?(e.L=+i[0],n+i[0].length):-1}function S(e,t,n){var i=ve.exec(t.slice(n,n+6));return i?(e.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function C(e,t,n){var i=ye.exec(t.slice(n,n+1));return i?n+i[0].length:-1}function L(e,t,n){var i=ve.exec(t.slice(n));return i?(e.Q=+i[0],n+i[0].length):-1}function N(e,t,n){var i=ve.exec(t.slice(n));return i?(e.Q=1e3*+i[0],n+i[0].length):-1}function I(e,t){return s(e.getDate(),t,2)}function A(e,t){return s(e.getHours(),t,2)}function R(e,t){return s(e.getHours()%12||12,t,2)}function O(e,n){return s(1+t.timeDay.count(t.timeYear(e),e),n,3)}function P(e,t){return s(e.getMilliseconds(),t,3)}function k(e,t){return P(e,t)+"000"}function M(e,t){return s(e.getMonth()+1,t,2)}function D(e,t){return s(e.getMinutes(),t,2)}function j(e,t){return s(e.getSeconds(),t,2)}function B(e){var t=e.getDay();return 0===t?7:t}function q(e,n){return s(t.timeSunday.count(t.timeYear(e),e),n,2)}function F(e,n){var i=e.getDay();e=i>=4||0===i?t.timeThursday(e):t.timeThursday.ceil(e);return s(t.timeThursday.count(t.timeYear(e),e)+(4===t.timeYear(e).getDay()),n,2)}function U(e){return e.getDay()}function G(e,n){return s(t.timeMonday.count(t.timeYear(e),e),n,2)}function z(e,t){return s(e.getFullYear()%100,t,2)}function H(e,t){return s(e.getFullYear()%1e4,t,4)}function V(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+s(t/60|0,"0",2)+s(t%60,"0",2)}function W(e,t){return s(e.getUTCDate(),t,2)}function Y(e,t){return s(e.getUTCHours(),t,2)}function Z(e,t){return s(e.getUTCHours()%12||12,t,2)}function $(e,n){return s(1+t.utcDay.count(t.utcYear(e),e),n,3)}function K(e,t){return s(e.getUTCMilliseconds(),t,3)}function X(e,t){return K(e,t)+"000"}function Q(e,t){return s(e.getUTCMonth()+1,t,2)}function J(e,t){return s(e.getUTCMinutes(),t,2)}function ee(e,t){return s(e.getUTCSeconds(),t,2)}function te(e){var t=e.getUTCDay();return 0===t?7:t}function ne(e,n){return s(t.utcSunday.count(t.utcYear(e),e),n,2)}function ie(e,n){var i=e.getUTCDay();e=i>=4||0===i?t.utcThursday(e):t.utcThursday.ceil(e);return s(t.utcThursday.count(t.utcYear(e),e)+(4===t.utcYear(e).getUTCDay()),n,2)}function re(e){return e.getUTCDay()}function oe(e,n){return s(t.utcMonday.count(t.utcYear(e),e),n,2)}function se(e,t){return s(e.getUTCFullYear()%100,t,2)}function ae(e,t){return s(e.getUTCFullYear()%1e4,t,4)}function le(){return"+0000"}function ue(){return"%"}function ce(e){return+e}function fe(e){return Math.floor(+e/1e3)}function pe(t){ge=o(t);e.timeFormat=ge.format;e.timeParse=ge.parse;e.utcFormat=ge.utcFormat;e.utcParse=ge.utcParse;return ge}function he(e){return e.toISOString()}function de(e){var t=new Date(e);return isNaN(t)?null:t}var ge,me={"-":"",_:" ",0:"0"},ve=/^\s*\d+/,ye=/^%/,be=/[\\^$*+?|[\]().{}]/g;pe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",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"]});var xe="%Y-%m-%dT%H:%M:%S.%LZ",_e=Date.prototype.toISOString?he:e.utcFormat(xe),Ee=+new Date("2000-01-01T00:00:00.000Z")?de:e.utcParse(xe);e.timeFormatDefaultLocale=pe;e.timeFormatLocale=o;e.isoFormat=_e;e.isoParse=Ee;Object.defineProperty(e,"__esModule",{value:!0})})},{"d3-time":55}],55:[function(e,t,n){(function(e,i){"object"==typeof n&&"undefined"!=typeof t?i(n):"function"==typeof define&&define.amd?define(["exports"],i):i(e.d3=e.d3||{})})(this,function(e){"use strict";function t(e,n,i,s){function a(t){return e(t=new Date((+t))),t}a.floor=a;a.ceil=function(t){return e(t=new Date(t-1)),n(t,1),e(t),t};a.round=function(e){var t=a(e),n=a.ceil(e);return e-t0))return s;do s.push(o=new Date((+t))),n(t,r),e(t);while(o=t)for(;e(t),!i(t);)t.setTime(t-1)},function(e,t){if(e>=e)if(t<0)for(;++t<=0;)for(;n(e,-1),!i(e););else for(;--t>=0;)for(;n(e,1),!i(e););})};if(i){a.count=function(t,n){r.setTime(+t),o.setTime(+n);e(r),e(o);return Math.floor(i(r,o))};a.every=function(e){e=Math.floor(e);return isFinite(e)&&e>0?e>1?a.filter(s?function(t){return s(t)%e===0}:function(t){return a.count(0,t)%e===0}):a:null}}return a}function n(e){return t(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7);t.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+7*t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*u)/p})}function i(e){return t(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7);t.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+7*t)},function(e,t){return(t-e)/p})}var r=new Date,o=new Date,s=t(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});s.every=function(e){e=Math.floor(e);return 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}):s:null};var a=s.range,l=1e3,u=6e4,c=36e5,f=864e5,p=6048e5,h=t(function(e){e.setTime(Math.floor(e/l)*l)},function(e,t){e.setTime(+e+t*l)},function(e,t){return(t-e)/l},function(e){return e.getUTCSeconds()}),d=h.range,g=t(function(e){e.setTime(Math.floor(e/u)*u)},function(e,t){e.setTime(+e+t*u)},function(e,t){return(t-e)/u},function(e){return e.getMinutes()}),m=g.range,v=t(function(e){var t=e.getTimezoneOffset()*u%c;t<0&&(t+=c);e.setTime(Math.floor((+e-t)/c)*c+t)},function(e,t){e.setTime(+e+t*c)},function(e,t){return(t-e)/c},function(e){return e.getHours()}),y=v.range,b=t(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*u)/f},function(e){return e.getDate()-1}),x=b.range,_=n(0),E=n(1),w=n(2),T=n(3),S=n(4),C=n(5),L=n(6),N=_.range,I=E.range,A=w.range,R=T.range,O=S.range,P=C.range,k=L.range,M=t(function(e){e.setDate(1);e.setHours(0,0,0,0)},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()}),D=M.range,j=t(function(e){e.setMonth(0,1);e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});j.every=function(e){return isFinite(e=Math.floor(e))&&e>0?t(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e);t.setMonth(0,1);t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)}):null};var B=j.range,q=t(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*u)},function(e,t){return(t-e)/u},function(e){return e.getUTCMinutes()}),F=q.range,U=t(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*c)},function(e,t){return(t-e)/c},function(e){return e.getUTCHours()}),G=U.range,z=t(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/f},function(e){return e.getUTCDate()-1}),H=z.range,V=i(0),W=i(1),Y=i(2),Z=i(3),$=i(4),K=i(5),X=i(6),Q=V.range,J=W.range,ee=Y.range,te=Z.range,ne=$.range,ie=K.range,re=X.range,oe=t(function(e){e.setUTCDate(1);e.setUTCHours(0,0,0,0)},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()}),se=oe.range,ae=t(function(e){e.setUTCMonth(0,1);e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});ae.every=function(e){return isFinite(e=Math.floor(e))&&e>0?t(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e);t.setUTCMonth(0,1);t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null};var le=ae.range;e.timeInterval=t;e.timeMillisecond=s;e.timeMilliseconds=a;e.utcMillisecond=s;e.utcMilliseconds=a;e.timeSecond=h;e.timeSeconds=d;e.utcSecond=h;e.utcSeconds=d;e.timeMinute=g;e.timeMinutes=m;e.timeHour=v;e.timeHours=y;e.timeDay=b;e.timeDays=x;e.timeWeek=_;e.timeWeeks=N;e.timeSunday=_;e.timeSundays=N;e.timeMonday=E;e.timeMondays=I;e.timeTuesday=w;e.timeTuesdays=A;e.timeWednesday=T;e.timeWednesdays=R;e.timeThursday=S;e.timeThursdays=O;e.timeFriday=C;e.timeFridays=P;e.timeSaturday=L;e.timeSaturdays=k;e.timeMonth=M;e.timeMonths=D;e.timeYear=j;e.timeYears=B;e.utcMinute=q;e.utcMinutes=F;e.utcHour=U;e.utcHours=G;e.utcDay=z;e.utcDays=H;e.utcWeek=V;e.utcWeeks=Q;e.utcSunday=V;e.utcSundays=Q;e.utcMonday=W;e.utcMondays=J;e.utcTuesday=Y;e.utcTuesdays=ee;e.utcWednesday=Z;e.utcWednesdays=te;e.utcThursday=$;e.utcThursdays=ne;e.utcFriday=K;e.utcFridays=ie;e.utcSaturday=X;e.utcSaturdays=re;e.utcMonth=oe;e.utcMonths=se;e.utcYear=ae;e.utcYears=le;Object.defineProperty(e,"__esModule",{value:!0})})},{}],56:[function(e,t,n){(function(e,i){"object"==typeof n&&"undefined"!=typeof t?i(n):"function"==typeof define&&define.amd?define(["exports"],i):i(e.d3=e.d3||{})})(this,function(e){"use strict";function t(){return v||(x(n),v=b.now()+y)}function n(){v=0}function i(){this._call=this._time=this._next=null}function r(e,t,n){var r=new i;r.restart(e,t,n);return r}function o(){t();++p;for(var e,n=c;n;){(e=v-n._time)>=0&&n._call.call(null,e);n=n._next}--p}function s(){v=(m=b.now())+y;p=h=0;try{o()}finally{p=0;l();v=0}}function a(){var e=b.now(),t=e-m;t>g&&(y-=t,m=e)}function l(){for(var e,t,n=c,i=1/0;n;)if(n._call){i>n._time&&(i=n._time);e=n,n=n._next}else{t=n._next,n._next=null;n=e?e._next=t:c=t}f=e;u(i)}function u(e){if(!p){h&&(h=clearTimeout(h));var t=e-v;if(t>24){e<1/0&&(h=setTimeout(s,e-b.now()-y));d&&(d=clearInterval(d))}else{d||(m=b.now(),d=setInterval(a,g));p=1,x(s)}}}var c,f,p=0,h=0,d=0,g=1e3,m=0,v=0,y=0,b="object"==typeof performance&&performance.now?performance:Date,x="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};i.prototype=r.prototype={constructor:i,restart:function(e,n,i){if("function"!=typeof e)throw new TypeError("callback is not a function");i=(null==i?t():+i)+(null==n?0:+n);if(!this._next&&f!==this){f?f._next=this:c=this;f=this}this._call=e;this._time=i;u()},stop:function(){if(this._call){this._call=null;this._time=1/0;u()}}};var _=function(e,t,n){var r=new i;t=null==t?0:+t;r.restart(function(n){r.stop();e(n+t)},t,n);return r},E=function(e,n,r){var o=new i,s=n;if(null==n)return o.restart(e,n,r),o;n=+n,r=null==r?t():+r;o.restart(function a(t){t+=s;o.restart(a,s+=n,r);e(t)},n,r);return o};e.now=t;e.timer=r;e.timerFlush=o;e.timeout=_;e.interval=E;Object.defineProperty(e,"__esModule",{value:!0})})},{}],57:[function(e,t,n){(function(i,r){"object"==typeof n&&"undefined"!=typeof t?r(n,e("d3-selection"),e("d3-dispatch"),e("d3-timer"),e("d3-interpolate"),e("d3-color"),e("d3-ease")):"function"==typeof define&&define.amd?define(["exports","d3-selection","d3-dispatch","d3-timer","d3-interpolate","d3-color","d3-ease"],r):r(i.d3=i.d3||{},i.d3,i.d3,i.d3,i.d3,i.d3,i.d3)})(this,function(e,t,n,i,r,o,s){"use strict";function a(e,t){var n=u(e,t);if(n.state>z)throw new Error("too late; already scheduled");return n}function l(e,t){var n=u(e,t);if(n.state>V)throw new Error("too late; already started");return n}function u(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function c(e,t,n){function r(e){n.state=H;n.timer.restart(o,n.delay,n.time);n.delay<=e&&o(e-n.delay)}function o(r){var c,f,p,h;if(n.state!==H)return a();for(c in u){h=u[c];if(h.name===n.name){if(h.state===W)return i.timeout(o);if(h.state===Y){h.state=$;h.timer.stop();h.on.call("interrupt",e,e.__data__,h.index,h.group);delete u[c]}else if(+c=0&&(e=e.slice(0,t));return!e||"start"===e})}function N(e,t,n){var i,r,o=L(t)?a:l;return function(){var s=o(this,e),a=s.on;a!==i&&(r=(i=a).copy()).on(t,n);s.on=r}}function I(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function A(e,n){var i,r,o;return function(){var s=t.style(this,e),a=(this.style.removeProperty(e),t.style(this,e));return s===a?null:s===i&&a===r?o:o=n(i=s,r=a)}}function R(e){return function(){this.style.removeProperty(e)}}function O(e,n,i){var r,o;return function(){var s=t.style(this,e);return s===i?null:s===r?o:o=n(r=s,i)}}function P(e,n,i){var r,o,s;return function(){var a=t.style(this,e),l=i(this);null==l&&(l=(this.style.removeProperty(e),t.style(this,e)));return a===l?null:a===r&&l===o?s:s=n(r=a,o=l)}}function k(e,t,n){function i(){var i=this,r=t.apply(i,arguments);return r&&function(t){i.style.setProperty(e,r(t),n)}}i._value=t;return i}function M(e){return function(){this.textContent=e}}function D(e){return function(){var t=e(this);this.textContent=null==t?"":t}}function j(e,t,n,i){this._groups=e;this._parents=t;this._name=n;this._id=i}function B(e){return t.selection().transition(e)}function q(){return++ye}function F(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))return xe.time=i.now(),xe;return n}var U=n.dispatch("start","end","interrupt"),G=[],z=0,H=1,V=2,W=3,Y=4,Z=5,$=6,K=function(e,t,n,i,r,o){var s=e.__transition;if(s){if(n in s)return}else e.__transition={};c(e,n,{name:t,index:i,group:r,on:U,tween:G,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:z})},X=function(e,t){var n,i,r,o=e.__transition,s=!0;if(o){t=null==t?null:t+"";for(r in o)if((n=o[r]).name===t){i=n.state>V&&n.stateH&&n.name===t)return new j([[e]],Ee,t,(+i))}return null};e.transition=B;e.active=we;e.interrupt=X;Object.defineProperty(e,"__esModule",{value:!0})})},{"d3-color":35,"d3-dispatch":36,"d3-ease":39,"d3-interpolate":44,"d3-selection":52,"d3-timer":56}],58:[function(e,t,n){(function(e,i){"object"==typeof n&&"undefined"!=typeof t?i(n):"function"==typeof define&&define.amd?define(["exports"],i):i(e.d3=e.d3||{})})(this,function(e){"use strict";function t(e){return e[0]}function n(e){return e[1]}function i(){this._=null}function r(e){e.U=e.C=e.L=e.R=e.P=e.N=null}function o(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 s(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 a(e){for(;e.L;)e=e.L;return e}function l(e,t,n,i){var r=[null,null],o=B.push(r)-1;r.left=e;r.right=t;n&&c(r,e,t,n);i&&c(r,t,e,i);D[e.index].halfedges.push(o);D[t.index].halfedges.push(o);return r}function u(e,t,n){var i=[t,n];i.left=e;return i}function c(e,t,n,i){if(e[0]||e[1])e.left===n?e[1]=i:e[0]=i;else{e[0]=i;e.left=t;e.right=n}}function f(e,t,n,i,r){var o,s=e[0],a=e[1],l=s[0],u=s[1],c=a[0],f=a[1],p=0,h=1,d=c-l,g=f-u;o=t-l;if(d||!(o>0)){o/=d;if(d<0){if(o0){if(o>h)return;o>p&&(p=o)}o=i-l;if(d||!(o<0)){o/=d;if(d<0){if(o>h)return;o>p&&(p=o)}else if(d>0){if(o0)){o/=g;if(g<0){if(o0){if(o>h)return;o>p&&(p=o)}o=r-u;if(g||!(o<0)){o/=g;if(g<0){if(o>h)return;o>p&&(p=o)}else if(g>0){if(o0||h<1))return!0;p>0&&(e[0]=[l+p*d,u+p*g]);h<1&&(e[1]=[l+h*d,u+h*g]);return!0}}}}}function p(e,t,n,i,r){var o=e[1];if(o)return!0;var s,a,l=e[0],u=e.left,c=e.right,f=u[0],p=u[1],h=c[0],d=c[1],g=(f+h)/2,m=(p+d)/2;if(d===p){if(g=i)return;if(f>h){if(l){if(l[1]>=r)return}else l=[g,n];o=[g,r]}else{if(l){if(l[1]1)if(f>h){if(l){if(l[1]>=r)return}else l=[(n-a)/s,n];o=[(r-a)/s,r]}else{if(l){if(l[1]=i)return}else l=[t,s*t+a];o=[i,s*i+a]}else{if(l){if(l[0]U||Math.abs(r[0][1]-r[1][1])>U)||delete B[o]}function d(e){return D[e.index]={site:e,halfedges:[]}}function g(e,t){var n=e.site,i=t.left,r=t.right;n===r&&(r=i,i=n);if(r)return Math.atan2(r[1]-i[1],r[0]-i[0]);n===i?(i=t[1],r=t[0]):(i=t[0],r=t[1]);return Math.atan2(i[0]-r[0],r[1]-i[1])}function m(e,t){return t[+(t.left!==e.site)]}function v(e,t){return t[+(t.left===e.site)]}function y(){for(var e,t,n,i,r=0,o=D.length;rU||Math.abs(y-h)>U){l.splice(a,0,B.push(u(s,d,Math.abs(g-e)U?[e,Math.abs(p-e)U?[Math.abs(h-i)U?[n,Math.abs(p-n)U?[Math.abs(h-t)=-G)){var h=l*l+u*u,d=c*c+f*f,g=(f*h-u*d)/p,m=(l*d-c*h)/p,v=q.pop()||new x;v.arc=e;v.site=r;v.x=g+s;v.y=(v.cy=m+a)+Math.sqrt(g*g+m*m);e.circle=v;for(var y=null,b=j._;b;)if(v.yU)a=a.L;else{r=o-I(a,s);if(!(r>U)){if(i>-U){t=a.P;n=a}else if(r>-U){t=a;n=a.N}else t=n=a;break}if(!a.R){t=a;break}a=a.R}}d(e);var u=T(e);M.insert(t,u);if(t||n)if(t!==n)if(n){E(t);E(n);var f=t.site,p=f[0],h=f[1],g=e[0]-p,m=e[1]-h,v=n.site,y=v[0]-p,b=v[1]-h,x=2*(g*b-m*y),w=g*g+m*m,S=y*y+b*b,C=[(b*w-m*S)/x+p,(g*S-y*w)/x+h];c(n.edge,f,v,C);u.edge=l(f,e,null,C);n.edge=l(e,v,null,C);_(t);_(n)}else u.edge=l(t.site,u.site);else{E(t);n=T(t.site);M.insert(u,n);u.edge=n.edge=l(t.site,u.site);_(t);_(n)}}function N(e,t){var n=e.site,i=n[0],r=n[1],o=r-t;if(!o)return i;var s=e.P;if(!s)return-(1/0);n=s.site;var a=n[0],l=n[1],u=l-t;if(!u)return a;var c=a-i,f=1/o-1/u,p=c/u;return f?(-p+Math.sqrt(p*p-2*f*(c*c/(-2*u)-l+u/2+r-o/2)))/f+i:(i+a)/2}function I(e,t){var n=e.N;if(n)return N(n,t);var i=e.site;return i[1]===t?i[0]:1/0}function A(e,t,n){return(e[0]-n[0])*(t[1]-e[1])-(e[0]-t[0])*(n[1]-e[1])}function R(e,t){return t[1]-e[1]||t[0]-e[0]}function O(e,t){var n,r,o,s=e.sort(R).pop();B=[];D=new Array(e.length);M=new i;j=new i;for(;;){o=k;if(s&&(!o||s[1]=a)return null;var l=e-r.site[0],u=t-r.site[1],c=l*l+u*u;do{r=o.cells[i=s],s=null;r.halfedges.forEach(function(n){var i=o.edges[n],a=i.left;if(a!==r.site&&a||(a=i.right)){var l=e-a[0],u=t-a[1],f=l*l+u*u;fi?(i+r)/2:Math.min(0,i)||Math.max(0,r),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}var m=function(e){return function(){return e}};a.prototype={constructor:a,scale:function(e){return 1===e?this:new a(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new a(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var v=new a(1,0,0);l.prototype=a.prototype;var y=function(){r.event.preventDefault();r.event.stopImmediatePropagation()},b=function(){function e(e){e.property("__zoom",p).on("wheel.zoom",T).on("mousedown.zoom",S).on("dblclick.zoom",C).filter(D).on("touchstart.zoom",L).on("touchmove.zoom",N).on("touchend.zoom touchcancel.zoom",I).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function l(e,t){t=Math.max(j[0],Math.min(j[1],t));return t===e.k?e:new a(t,e.x,e.y)}function b(e,t,n){var i=t[0]-n[0]*e.k,r=t[1]-n[1]*e.k;return i===e.x&&r===e.y?e:new a(e.k,i,r)}function x(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function _(e,t,n){e.on("start.zoom",function(){E(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){E(this,arguments).end()}).tween("zoom",function(){var e=this,i=arguments,r=E(e,i),o=P.apply(e,i),s=n||x(o),l=Math.max(o[1][0]-o[0][0],o[1][1]-o[0][1]),u=e.__zoom,c="function"==typeof t?t.apply(e,i):t,f=F(u.invert(s).concat(l/u.k),c.invert(s).concat(l/c.k));return function(e){if(1===e)e=c;else{var t=f(e),n=l/t[2];e=new a(n,s[0]-t[0]*n,s[1]-t[1]*n)}r.zoom(null,e)}})}function E(e,t){for(var n,i=0,r=U.length;iV}i.zoom("mouse",k(b(i.that.__zoom,i.mouse[0]=r.mouse(i.that),i.mouse[1]),i.extent,B))}function t(){s.on("mousemove.zoom mouseup.zoom",null);n.dragEnable(r.event.view,i.moved);y();i.end()}if(!R&&O.apply(this,arguments)){var i=E(this,arguments),s=r.select(r.event.view).on("mousemove.zoom",e,!0).on("mouseup.zoom",t,!0),a=r.mouse(this),l=r.event.clientX,c=r.event.clientY;n.dragDisable(r.event.view);u();i.mouse=[a,this.__zoom.invert(a)];o.interrupt(this);i.start()}}function C(){if(O.apply(this,arguments)){var t=this.__zoom,n=r.mouse(this),i=t.invert(n),o=t.k*(r.event.shiftKey?.5:2),s=k(b(l(t,o),n,i),P.apply(this,arguments),B); y();q>0?r.select(this).transition().duration(q).call(_,s,n):r.select(this).call(e.transform,s)}}function L(){if(O.apply(this,arguments)){var e,t,n,i,s=E(this,arguments),a=r.event.changedTouches,l=a.length;u();for(t=0;t").css({position:"fixed",top:0,left:e(t).scrollLeft()*-1,height:1,width:1,overflow:"hidden"}).append(e("
").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(e("
").css({width:"100%",height:10}))).appendTo("body"),o=r.children(),s=o.children();i.barWidth=o[0].offsetWidth-o[0].clientWidth;i.bScrollOversize=100===s[0].offsetWidth&&100!==o[0].clientWidth;i.bScrollbarLeft=1!==Math.round(s.offset().left);i.bBounding=!!r[0].getBoundingClientRect().width;r.remove()}e.extend(n.oBrowser,Ze.__browser);n.oScroll.iBarWidth=Ze.__browser.barWidth}function c(e,t,n,r,o,s){var a,l=r,u=!1;if(n!==i){a=n;u=!0}for(;l!==o;)if(e.hasOwnProperty(l)){a=u?t(a,e[l],l,e):e[l];u=!0;l+=s}return a}function f(t,i){var r=Ze.defaults.column,o=t.aoColumns.length,s=e.extend({},Ze.models.oColumn,r,{nTh:i?i:n.createElement("th"),sTitle:r.sTitle?r.sTitle:i?i.innerHTML:"",aDataSort:r.aDataSort?r.aDataSort:[o],mData:r.mData?r.mData:o,idx:o});t.aoColumns.push(s);var a=t.aoPreSearchCols;a[o]=e.extend({},Ze.models.oSearch,a[o]);p(t,o,e(i).data())}function p(t,n,r){var s=t.aoColumns[n],a=t.oClasses,u=e(s.nTh);if(!s.sWidthOrig){s.sWidthOrig=u.attr("width")||null;var c=(u.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);c&&(s.sWidthOrig=c[1])}if(r!==i&&null!==r){l(r);o(Ze.defaults.column,r);r.mDataProp===i||r.mData||(r.mData=r.mDataProp);r.sType&&(s._sManualType=r.sType);r.className&&!r.sClass&&(r.sClass=r.className);r.sClass&&u.addClass(r.sClass);e.extend(s,r);Pe(s,r,"sWidth","sWidthOrig");r.iDataSort!==i&&(s.aDataSort=[r.iDataSort]);Pe(s,r,"aDataSort")}var f=s.mData,p=L(f),h=s.mRender?L(s.mRender):null,d=function(e){return"string"==typeof e&&e.indexOf("@")!==-1};s._bAttrSrc=e.isPlainObject(f)&&(d(f.sort)||d(f.type)||d(f.filter));s._setter=null;s.fnGetData=function(e,t,n){var r=p(e,t,i,n);return h&&t?h(r,t,e,n):r};s.fnSetData=function(e,t,n){return N(f)(e,t,n)};"number"!=typeof f&&(t._rowReadObject=!0);if(!t.oFeatures.bSort){s.bSortable=!1;u.addClass(a.sSortableNone)}var g=e.inArray("asc",s.asSorting)!==-1,m=e.inArray("desc",s.asSorting)!==-1;if(s.bSortable&&(g||m))if(g&&!m){s.sSortingClass=a.sSortableAsc;s.sSortingClassJUI=a.sSortJUIAscAllowed}else if(!g&&m){s.sSortingClass=a.sSortableDesc;s.sSortingClassJUI=a.sSortJUIDescAllowed}else{s.sSortingClass=a.sSortable;s.sSortingClassJUI=a.sSortJUI}else{s.sSortingClass=a.sSortableNone;s.sSortingClassJUI=""}}function h(e){if(e.oFeatures.bAutoWidth!==!1){var t=e.aoColumns;ve(e);for(var n=0,i=t.length;n=0;s--){h=n[s];var g=h.targets!==i?h.targets:h.aTargets;e.isArray(g)||(g=[g]);for(l=0,u=g.length;l=0){for(;d.length<=g[l];)f(t);o(g[l],h)}else if("number"==typeof g[l]&&g[l]<0)o(d.length+g[l],h);else if("string"==typeof g[l])for(c=0,p=d.length;ct&&e[o]--;r!=-1&&n===i&&e.splice(r,1)}function O(e,t,n,r){var o,s,a=e.aoData[t],l=function(n,i){for(;n.childNodes.length;)n.removeChild(n.firstChild);n.innerHTML=T(e,t,i,"display")};if("dom"!==n&&(n&&"auto"!==n||"dom"!==a.src)){var u=a.anCells;if(u)if(r!==i)l(u[r],r);else for(o=0,s=u.length;o").appendTo(a));for(n=0,i=f.length;ntr").attr("role","row");e(a).find(">tr>th, >tr>td").addClass(c.sHeaderTH);e(l).find(">tr>th, >tr>td").addClass(c.sFooterTH);if(null!==l){var p=t.aoFooter[0];for(n=0,i=p.length;n=0;a--)t.aoColumns[a].bVisible||r||d[o].splice(a,1);g.push([])}for(o=0,s=d.length;o=t.fnRecordsDisplay()?0:u;t.iInitDisplayStart=-1}var p=t._iDisplayStart,h=t.fnDisplayEnd();if(t.bDeferLoading){t.bDeferLoading=!1;t.iDraw++;he(t,!1)}else if(c){if(!t.bDestroying&&!H(t))return}else t.iDraw++;if(0!==f.length)for(var d=c?0:p,g=c?t.aoData.length:h,v=d;v",{"class":a?s[0]:""}).append(e("",{valign:"top",colSpan:m(t),"class":t.oClasses.sRowEmpty}).html(E))[0]}je(t,"aoHeaderCallback","header",[e(t.nTHead).children("tr")[0],I(t),p,h,f]);je(t,"aoFooterCallback","footer",[e(t.nTFoot).children("tr")[0],I(t),p,h,f]);var w=e(t.nTBody);w.children().detach();w.append(e(r));je(t,"aoDrawCallback","draw",[t]);t.bSorted=!1;t.bFiltered=!1;t.bDrawing=!1}else he(t,!1)}function q(e,t){var n=e.oFeatures,i=n.bSort,r=n.bFilter;i&&we(e);r?$(e,e.oPreviousSearch):e.aiDisplay=e.aiDisplayMaster.slice();t!==!0&&(e._iDisplayStart=0);e._drawHold=t;B(e);e._drawHold=!1}function F(t){var n=t.oClasses,i=e(t.nTable),r=e("
").insertBefore(i),o=t.oFeatures,s=e("
",{id:t.sTableId+"_wrapper","class":n.sWrapper+(t.nTFoot?"":" "+n.sNoFooter)});t.nHolding=r[0];t.nTableWrapper=s[0];t.nTableReinsertBefore=t.nTable.nextSibling;for(var a,l,u,c,f,p,h=t.sDom.split(""),d=0;d")[0];c=h[d+1];if("'"==c||'"'==c){f="";p=2;for(;h[d+p]!=c;){f+=h[d+p];p++}"H"==f?f=n.sJUIHeader:"F"==f&&(f=n.sJUIFooter);if(f.indexOf(".")!=-1){var g=f.split(".");u.id=g[0].substr(1,g[0].length-1);u.className=g[1]}else"#"==f.charAt(0)?u.id=f.substr(1,f.length-1):u.className=f;d+=p}s.append(u);s=e(u)}else if(">"==l)s=s.parent();else if("l"==l&&o.bPaginate&&o.bLengthChange)a=ue(t);else if("f"==l&&o.bFilter)a=Z(t);else if("r"==l&&o.bProcessing)a=pe(t);else if("t"==l)a=de(t);else if("i"==l&&o.bInfo)a=ie(t);else if("p"==l&&o.bPaginate)a=ce(t);else if(0!==Ze.ext.feature.length)for(var m=Ze.ext.feature,v=0,y=m.length;v',u=o.sSearch;u=u.match(/_INPUT_/)?u.replace("_INPUT_",l):u+l;var c=e("
",{id:a.f?null:r+"_filter","class":i.sFilter}).append(e("
").addClass(n.sLength);t.aanFeatures.l||(f[0].id=i+"_length");f.children().append(t.oLanguage.sLengthMenu.replace("_MENU_",l[0].outerHTML));e("select",f).val(t._iDisplayLength).on("change.DT",function(n){le(t,e(this).val());B(t)});e(t.nTable).on("length.dt.DT",function(n,i,r){t===i&&e("select",f).val(r)});return f[0]}function ce(t){var n=t.sPaginationType,i=Ze.ext.pager[n],r="function"==typeof i,o=function(e){B(e)},s=e("
").addClass(t.oClasses.sPaging+n)[0],a=t.aanFeatures;r||i.fnInit(t,s,o);if(!a.p){s.id=t.sTableId+"_paginate";t.aoDrawCallback.push({fn:function(e){if(r){var t,n,s=e._iDisplayStart,l=e._iDisplayLength,u=e.fnRecordsDisplay(),c=l===-1,f=c?0:Math.ceil(s/l),p=c?1:Math.ceil(u/l),h=i(f,p);for(t=0,n=a.p.length;to&&(i=0)}else if("first"==t)i=0;else if("previous"==t){i=r>=0?i-r:0;i<0&&(i=0)}else"next"==t?i+r",{id:t.aanFeatures.r?null:t.sTableId+"_processing","class":t.oClasses.sProcessing}).html(t.oLanguage.sProcessing).insertBefore(t.nTable)[0]}function he(t,n){t.oFeatures.bProcessing&&e(t.aanFeatures.r).css("display",n?"block":"none"); je(t,null,"processing",[t,n])}function de(t){var n=e(t.nTable);n.attr("role","grid");var i=t.oScroll;if(""===i.sX&&""===i.sY)return t.nTable;var r=i.sX,o=i.sY,s=t.oClasses,a=n.children("caption"),l=a.length?a[0]._captionSide:null,u=e(n[0].cloneNode(!1)),c=e(n[0].cloneNode(!1)),f=n.children("tfoot"),p="
",h=function(e){return e?_e(e):null};f.length||(f=null);var d=e(p,{"class":s.sScrollWrapper}).append(e(p,{"class":s.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:r?h(r):"100%"}).append(e(p,{"class":s.sScrollHeadInner}).css({"box-sizing":"content-box",width:i.sXInner||"100%"}).append(u.removeAttr("id").css("margin-left",0).append("top"===l?a:null).append(n.children("thead"))))).append(e(p,{"class":s.sScrollBody}).css({position:"relative",overflow:"auto",width:h(r)}).append(n));f&&d.append(e(p,{"class":s.sScrollFoot}).css({overflow:"hidden",border:0,width:r?h(r):"100%"}).append(e(p,{"class":s.sScrollFootInner}).append(c.removeAttr("id").css("margin-left",0).append("bottom"===l?a:null).append(n.children("tfoot")))));var g=d.children(),m=g[0],v=g[1],y=f?g[2]:null;r&&e(v).on("scroll.DT",function(e){var t=this.scrollLeft;m.scrollLeft=t;f&&(y.scrollLeft=t)});e(v).css(o&&i.bCollapse?"max-height":"height",o);t.nScrollHead=m;t.nScrollBody=v;t.nScrollFoot=y;t.aoDrawCallback.push({fn:ge,sName:"scrolling"});return d[0]}function ge(t){var n,r,o,s,a,l,u,c,f,p=t.oScroll,g=p.sX,m=p.sXInner,v=p.sY,y=p.iBarWidth,b=e(t.nScrollHead),x=b[0].style,_=b.children("div"),E=_[0].style,w=_.children("table"),T=t.nScrollBody,S=e(T),C=T.style,L=e(t.nScrollFoot),N=L.children("div"),I=N.children("table"),A=e(t.nTHead),R=e(t.nTable),O=R[0],P=O.style,k=t.nTFoot?e(t.nTFoot):null,M=t.oBrowser,D=M.bScrollOversize,j=at(t.aoColumns,"nTh"),B=[],q=[],F=[],U=[],z=function(e){var t=e.style;t.paddingTop="0";t.paddingBottom="0";t.borderTopWidth="0";t.borderBottomWidth="0";t.height=0},H=T.scrollHeight>T.clientHeight;if(t.scrollBarVis===H||t.scrollBarVis===i){t.scrollBarVis=H;R.children("thead, tfoot").remove();if(k){l=k.clone().prependTo(R);r=k.find("tr");s=l.find("tr")}a=A.clone().prependTo(R);n=A.find("tr");o=a.find("tr");a.find("th, td").removeAttr("tabindex");if(!g){C.width="100%";b[0].style.width="100%"}e.each(G(t,a),function(e,n){u=d(t,e);n.style.width=t.aoColumns[u].sWidth});k&&me(function(e){e.style.width=""},s);f=R.outerWidth();if(""===g){P.width="100%";D&&(R.find("tbody").height()>T.offsetHeight||"scroll"==S.css("overflow-y"))&&(P.width=_e(R.outerWidth()-y));f=R.outerWidth()}else if(""!==m){P.width=_e(m);f=R.outerWidth()}me(z,o);me(function(t){F.push(t.innerHTML);B.push(_e(e(t).css("width")))},o);me(function(t,n){e.inArray(t,j)!==-1&&(t.style.width=B[n])},n);e(o).height(0);if(k){me(z,s);me(function(t){U.push(t.innerHTML);q.push(_e(e(t).css("width")))},s);me(function(e,t){e.style.width=q[t]},r);e(s).height(0)}me(function(e,t){e.innerHTML='
'+F[t]+"
";e.style.width=B[t]},o);k&&me(function(e,t){e.innerHTML='
'+U[t]+"
";e.style.width=q[t]},s);if(R.outerWidth()T.offsetHeight||"scroll"==S.css("overflow-y")?f+y:f;D&&(T.scrollHeight>T.offsetHeight||"scroll"==S.css("overflow-y"))&&(P.width=_e(c-y));""!==g&&""===m||Oe(t,1,"Possible column misalignment",6)}else c="100%";C.width=_e(c);x.width=_e(c);k&&(t.nScrollFoot.style.width=_e(c));v||D&&(C.height=_e(O.offsetHeight+y));var V=R.outerWidth();w[0].style.width=_e(V);E.width=_e(V);var W=R.height()>T.clientHeight||"scroll"==S.css("overflow-y"),Y="padding"+(M.bScrollbarLeft?"Left":"Right");E[Y]=W?y+"px":"0px";if(k){I[0].style.width=_e(V);N[0].style.width=_e(V);N[0].style[Y]=W?y+"px":"0px"}R.children("colgroup").insertBefore(R.children("thead"));S.scroll();!t.bSorted&&!t.bFiltered||t._drawHold||(T.scrollTop=0)}else{t.scrollBarVis=H;h(t)}}function me(e,t,n){for(var i,r,o=0,s=0,a=t.length;s").appendTo(C.find("tbody"));C.find("thead, tfoot").remove();C.append(e(n.nTHead).clone()).append(e(n.nTFoot).clone());C.find("tfoot th, tfoot td").css("width","");y=G(n,C.find("thead")[0]);for(i=0;i").css({width:r.sWidthOrig,margin:0,padding:0,border:0,height:1}))}if(n.aoData.length)for(i=0;i").css(c||u?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(C).appendTo(x);if(c&&f)C.width(f);else if(c){C.css("width","auto");C.removeAttr("width");C.width()").css("width",_e(t)).appendTo(i||n.body),o=r[0].offsetWidth;r.remove();return o}function be(t,n){var i=xe(t,n);if(i<0)return null;var r=t.aoData[i];return r.nTr?r.anCells[n]:e("").html(T(t,i,n,"display"))[0]}function xe(e,t){for(var n,i=-1,r=-1,o=0,s=e.aoData.length;oi){i=n.length;r=o}}return r}function _e(e){return null===e?"0px":"number"==typeof e?e<0?"0px":e+"px":e.match(/\d$/)?e+"px":e}function Ee(t){var n,r,o,s,a,l,u,c=[],f=t.aoColumns,p=t.aaSortingFixed,h=e.isPlainObject(p),d=[],g=function(t){t.length&&!e.isArray(t[0])?d.push(t):e.merge(d,t)};e.isArray(p)&&g(p);h&&p.pre&&g(p.pre);g(t.aaSorting);h&&p.post&&g(p.post);for(n=0;ni?1:0;if(0!==a)return"asc"===u.dir?a:-a}n=s[e];i=s[t];return ni?1:0}):c.sort(function(e,t){var n,i,r,u,c,f,p=o.length,h=l[e]._aSortData,d=l[t]._aSortData;for(r=0;ri?1:0})}e.bSorted=!0}function Te(e){for(var t,n,i=e.aoColumns,r=Ee(e),o=e.oLanguage.oAria,s=0,a=i.length;s/g,""),f=l.nTh;f.removeAttribute("aria-sort");if(l.bSortable){if(r.length>0&&r[0].col==s){f.setAttribute("aria-sort","asc"==r[0].dir?"ascending":"descending");n=u[r[0].index+1]||u[0]}else n=u[0];t=c+("asc"===n?o.sSortAscending:o.sSortDescending)}else t=c;f.setAttribute("aria-label",t)}}function Se(t,n,r,o){var s,a=t.aoColumns[n],l=t.aaSorting,u=a.asSorting,c=function(t,n){var r=t._idx;r===i&&(r=e.inArray(t[1],u));return r+10&&n.time<+new Date-1e3*u)r();else if(n.columns&&a.length!==n.columns.length)r();else{t.oLoadedState=e.extend(!0,{},n);if(n.start!==i){t._iDisplayStart=n.start;t.iInitDisplayStart=n.start}n.length!==i&&(t._iDisplayLength=n.length);if(n.order!==i){t.aaSorting=[];e.each(n.order,function(e,n){t.aaSorting.push(n[0]>=a.length?[0,n[1]]:n)})}n.search!==i&&e.extend(t.oPreviousSearch,ne(n.search));if(n.columns)for(o=0,s=n.columns.length;o=n&&(t=n-i);t-=t%i;(i===-1||t<0)&&(t=0);e._iDisplayStart=t}function qe(t,n){var i=t.renderer,r=Ze.ext.renderer[n];return e.isPlainObject(i)&&i[n]?r[i[n]]||r._:"string"==typeof i?r[i]||r._:r._}function Fe(e){return e.oFeatures.bServerSide?"ssp":e.ajax||e.sAjaxSource?"ajax":"dom"}function Ue(e,t){var n=[],i=Ht.numbers_length,r=Math.floor(i/2);if(t<=i)n=ut(0,t);else if(e<=r){n=ut(0,i-2);n.push("ellipsis");n.push(t-1)}else if(e>=t-1-r){n=ut(t-(i-2),t);n.splice(0,0,"ellipsis");n.splice(0,0,0)}else{n=ut(e-r+2,e+r-1);n.push("ellipsis");n.push(t-1);n.splice(0,0,"ellipsis");n.splice(0,0,0)}n.DT_el="span";return n}function Ge(t){e.each({num:function(e){return Vt(e,t)},"num-fmt":function(e){return Vt(e,t,et)},"html-num":function(e){return Vt(e,t,Xe)},"html-num-fmt":function(e){return Vt(e,t,Xe,et)}},function(e,n){He.type.order[e+t+"-pre"]=n;e.match(/^html\-/)&&(He.type.search[e+t]=He.type.search.html)})}function ze(e){return function(){var t=[Re(this[Ze.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return Ze.ext.internal[e].apply(this,t)}}var He,Ve,We,Ye,Ze=function(t){this.$=function(e,t){return this.api(!0).$(e,t)};this._=function(e,t){return this.api(!0).rows(e,t).data()};this.api=function(e){return new Ve(e?Re(this[He.iApiIndex]):this)};this.fnAddData=function(t,n){var r=this.api(!0),o=e.isArray(t)&&(e.isArray(t[0])||e.isPlainObject(t[0]))?r.rows.add(t):r.row.add(t);(n===i||n)&&r.draw();return o.flatten().toArray()};this.fnAdjustColumnSizing=function(e){var t=this.api(!0).columns.adjust(),n=t.settings()[0],r=n.oScroll;e===i||e?t.draw(!1):""===r.sX&&""===r.sY||ge(n)};this.fnClearTable=function(e){var t=this.api(!0).clear();(e===i||e)&&t.draw()};this.fnClose=function(e){this.api(!0).row(e).child.hide()};this.fnDeleteRow=function(e,t,n){var r=this.api(!0),o=r.rows(e),s=o.settings()[0],a=s.aoData[o[0][0]];o.remove();t&&t.call(this,s,a);(n===i||n)&&r.draw();return a};this.fnDestroy=function(e){this.api(!0).destroy(e)};this.fnDraw=function(e){this.api(!0).draw(e)};this.fnFilter=function(e,t,n,r,o,s){var a=this.api(!0);null===t||t===i?a.search(e,n,r,s):a.column(t).search(e,n,r,s);a.draw()};this.fnGetData=function(e,t){var n=this.api(!0);if(e!==i){var r=e.nodeName?e.nodeName.toLowerCase():"";return t!==i||"td"==r||"th"==r?n.cell(e,t).data():n.row(e).data()||null}return n.data().toArray()};this.fnGetNodes=function(e){var t=this.api(!0);return e!==i?t.row(e).node():t.rows().nodes().flatten().toArray()};this.fnGetPosition=function(e){var t=this.api(!0),n=e.nodeName.toUpperCase();if("TR"==n)return t.row(e).index();if("TD"==n||"TH"==n){var i=t.cell(e).index();return[i.row,i.columnVisible,i.column]}return null};this.fnIsOpen=function(e){return this.api(!0).row(e).child.isShown()};this.fnOpen=function(e,t,n){return this.api(!0).row(e).child(t,n).show().child()[0]};this.fnPageChange=function(e,t){var n=this.api(!0).page(e);(t===i||t)&&n.draw(!1)};this.fnSetColumnVis=function(e,t,n){var r=this.api(!0).column(e).visible(t);(n===i||n)&&r.columns.adjust().draw()};this.fnSettings=function(){return Re(this[He.iApiIndex])};this.fnSort=function(e){this.api(!0).order(e).draw()};this.fnSortListener=function(e,t,n){this.api(!0).order.listener(e,t,n)};this.fnUpdate=function(e,t,n,r,o){var s=this.api(!0);n===i||null===n?s.row(t).data(e):s.cell(t,n).data(e);(o===i||o)&&s.columns.adjust();(r===i||r)&&s.draw();return 0};this.fnVersionCheck=He.fnVersionCheck;var n=this,r=t===i,c=this.length;r&&(t={});this.oApi=this.internal=He.internal;for(var h in Ze.ext.internal)h&&(this[h]=ze(h));this.each(function(){var h,d={},g=c>1?ke(d,t,!0):t,m=0,v=this.getAttribute("id"),y=!1,E=Ze.defaults,w=e(this);if("table"==this.nodeName.toLowerCase()){a(E);l(E.column);o(E,E,!0);o(E.column,E.column,!0);o(E,e.extend(g,w.data()));var T=Ze.settings;for(m=0,h=T.length;m").appendTo(w));I.nTHead=r[0];var o=w.children("tbody");0===o.length&&(o=e("").appendTo(w));I.nTBody=o[0];var s=w.children("tfoot");0===s.length&&n.length>0&&(""!==I.oScroll.sX||""!==I.oScroll.sY)&&(s=e("").appendTo(w));if(0===s.length||0===s.children().length)w.addClass(A.sNoFooter);else if(s.length>0){I.nTFoot=s[0];U(I.aoFooter,I.nTFoot)}if(g.aaData)for(m=0;m/g,Qe=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,Je=new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^","-"].join("|\\")+")","g"),et=/[',$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfk]/gi,tt=function(e){return!e||e===!0||"-"===e},nt=function(e){var t=parseInt(e,10);return!isNaN(t)&&isFinite(e)?t:null},it=function(e,t){$e[t]||($e[t]=new RegExp(vt(t),"g"));return"string"==typeof e&&"."!==t?e.replace(/\./g,"").replace($e[t],"."):e},rt=function(e,t,n){var i="string"==typeof e;if(tt(e))return!0;t&&i&&(e=it(e,t));n&&i&&(e=e.replace(et,""));return!isNaN(parseFloat(e))&&isFinite(e)},ot=function(e){return tt(e)||"string"==typeof e},st=function(e,t,n){if(tt(e))return!0;var i=ot(e);return i?!!rt(ft(e),t,n)||null:null},at=function(e,t,n){var r=[],o=0,s=e.length;if(n!==i)for(;o")[0],bt=yt.textContent!==i,xt=/<.*?>/g,_t=Ze.util.throttle,Et=[],wt=Array.prototype,Tt=function(t){var n,i,r=Ze.settings,o=e.map(r,function(e,t){return e.nTable});if(!t)return[];if(t.nTable&&t.oApi)return[t];if(t.nodeName&&"table"===t.nodeName.toLowerCase()){n=e.inArray(t,o);return n!==-1?[r[n]]:null}if(t&&"function"==typeof t.settings)return t.settings().toArray();"string"==typeof t?i=e(t):t instanceof e&&(i=t);return i?i.map(function(t){n=e.inArray(this,o);return n!==-1?r[n]:null}).toArray():void 0};Ve=function(t,n){if(!(this instanceof Ve))return new Ve(t,n);var i=[],r=function(e){var t=Tt(e);t&&(i=i.concat(t))};if(e.isArray(t))for(var o=0,s=t.length;oe?new Ve(t[e],this[e]):null},filter:function(e){var t=[];if(wt.filter)t=wt.filter.call(this,e,this);else for(var n=0,i=this.length;n0)return e[0].json});We("ajax.params()",function(){var e=this.context;if(e.length>0)return e[0].oAjaxData});We("ajax.reload()",function(e,t){return this.iterator("table",function(n){Ct(n,t===!1,e)})});We("ajax.url()",function(t){var n=this.context;if(t===i){if(0===n.length)return i;n=n[0];return n.ajax?e.isPlainObject(n.ajax)?n.ajax.url:n.ajax:n.sAjaxSource}return this.iterator("table",function(n){e.isPlainObject(n.ajax)?n.ajax.url=t:n.ajax=t})});We("ajax.url().load()",function(e,t){return this.iterator("table",function(n){Ct(n,t===!1,e)})});var Lt=function(t,n,r,o,s){var a,l,u,c,f,p,h=[],d=typeof n;n&&"string"!==d&&"function"!==d&&n.length!==i||(n=[n]);for(u=0,c=n.length;u0){e[0]=e[t];e[0].length=1;e.length=1;e.context=[e.context[t]];return e}e.length=0;return e},At=function(t,n){var i,r,o,s=[],a=t.aiDisplay,l=t.aiDisplayMaster,u=n.search,c=n.order,f=n.page;if("ssp"==Fe(t))return"removed"===u?[]:ut(0,l.length);if("current"==f)for(i=t._iDisplayStart,r=t.fnDisplayEnd();i=0&&"applied"==u)&&s.push(i)}return s},Rt=function(t,n,r){var o,s=function(n){var s=nt(n);if(null!==s&&!r)return[s];o||(o=At(t,r));if(null!==s&&e.inArray(s,o)!==-1)return[s];if(null===n||n===i||""===n)return o;if("function"==typeof n)return e.map(o,function(e){var i=t.aoData[e];return n(e,i._aData,i.nTr)?e:null});var a=ct(lt(t.aoData,o,"nTr"));if(n.nodeName){if(n._DT_RowIndex!==i)return[n._DT_RowIndex];if(n._DT_CellIndex)return[n._DT_CellIndex.row];var l=e(n).closest("*[data-dt-row]");return l.length?[l.data("dt-row")]:[]}if("string"==typeof n&&"#"===n.charAt(0)){var u=t.aIds[n.replace(/^#/,"")];if(u!==i)return[u.idx]}return e(a).filter(n).map(function(){return this._DT_RowIndex}).toArray()};return Lt("row",n,s,t,r)};We("rows()",function(t,n){if(t===i)t="";else if(e.isPlainObject(t)){n=t;t=""}n=Nt(n);var r=this.iterator("table",function(e){return Rt(e,t,n)},1);r.selector.rows=t;r.selector.opts=n;return r});We("rows().nodes()",function(){return this.iterator("row",function(e,t){return e.aoData[t].nTr||i},1)});We("rows().data()",function(){return this.iterator(!0,"rows",function(e,t){return lt(e.aoData,t,"_aData")},1)});Ye("rows().cache()","row().cache()",function(e){return this.iterator("row",function(t,n){var i=t.aoData[n];return"search"===e?i._aFilterData:i._aSortData},1)});Ye("rows().invalidate()","row().invalidate()",function(e){return this.iterator("row",function(t,n){O(t,n,e)})});Ye("rows().indexes()","row().index()",function(){return this.iterator("row",function(e,t){ return t},1)});Ye("rows().ids()","row().id()",function(e){for(var t=[],n=this.context,i=0,r=n.length;i0&&t._iRecordsDisplay--;Be(t);var h=t.rowIdFn(p._aData);h!==i&&delete t.aIds[h]});this.iterator("table",function(e){for(var t=0,n=e.aoData.length;t").addClass(i);e("td",l).addClass(i).html(n)[0].colSpan=m(t);o.push(l[0])}};s(i,r);n._details&&n._details.detach();n._details=e(o);n._detailsShow&&n._details.insertAfter(n.nTr)},Pt=function(e,t){var n=e.context;if(n.length){var r=n[0].aoData[t!==i?t:e[0]];if(r&&r._details){r._details.remove();r._detailsShow=i;r._details=i}}},kt=function(e,t){var n=e.context;if(n.length&&e.length){var i=n[0].aoData[e[0]];if(i._details){i._detailsShow=t;t?i._details.insertAfter(i.nTr):i._details.detach();Mt(n[0])}}},Mt=function(e){var t=new Ve(e),n=".dt.DT_details",i="draw"+n,r="column-visibility"+n,o="destroy"+n,s=e.aoData;t.off(i+" "+r+" "+o);if(at(s,"_details").length>0){t.on(i,function(n,i){e===i&&t.rows({page:"current"}).eq(0).each(function(e){var t=s[e];t._detailsShow&&t._details.insertAfter(t.nTr)})});t.on(r,function(t,n,i,r){if(e===n)for(var o,a=m(n),l=0,u=s.length;l=0?a:r.length+a];if("function"==typeof n){var l=At(t,i);return e.map(r,function(e,i){return n(i,Ft(t,i,0,0,l),s[i])?i:null})}var u="string"==typeof n?n.match(qt):"";if(u)switch(u[2]){case"visIdx":case"visible":var c=parseInt(u[1],10);if(c<0){var f=e.map(r,function(e,t){return e.bVisible?t:null});return[f[f.length+c]]}return[d(t,c)];case"name":return e.map(o,function(e,t){return e===u[1]?t:null});default:return[]}if(n.nodeName&&n._DT_CellIndex)return[n._DT_CellIndex.column];var p=e(s).filter(n).map(function(){return e.inArray(this,s)}).toArray();if(p.length||!n.nodeName)return p;var h=e(n).closest("*[data-dt-column]");return h.length?[h.data("dt-column")]:[]};return Lt("column",n,a,t,i)},Gt=function(t,n,r){var o,s,a,l,u=t.aoColumns,c=u[n],f=t.aoData;if(r===i)return c.bVisible;if(c.bVisible!==r){if(r){var p=e.inArray(!0,at(u,"bVisible"),n+1);for(s=0,a=f.length;sn}return!0};Ze.isDataTable=Ze.fnIsDataTable=function(t){var n=e(t).get(0),i=!1;if(t instanceof Ze.Api)return!0;e.each(Ze.settings,function(t,r){var o=r.nScrollHead?e("table",r.nScrollHead)[0]:null,s=r.nScrollFoot?e("table",r.nScrollFoot)[0]:null;r.nTable!==n&&o!==n&&s!==n||(i=!0)});return i};Ze.tables=Ze.fnTables=function(t){var n=!1;if(e.isPlainObject(t)){n=t.api;t=t.visible}var i=e.map(Ze.settings,function(n){if(!t||t&&e(n.nTable).is(":visible"))return n.nTable});return n?new Ve(i):i};Ze.camelToHungarian=o;We("$()",function(t,n){var i=this.rows(n).nodes(),r=e(i);return e([].concat(r.filter(t).toArray(),r.find(t).toArray()))});e.each(["on","one","off"],function(t,n){We(n+"()",function(){var t=Array.prototype.slice.call(arguments);t[0]=e.map(t[0].split(/\s/),function(e){return e.match(/\.dt\b/)?e:e+".dt"}).join(" ");var i=e(this.tables().nodes());i[n].apply(i,t);return this})});We("clear()",function(){return this.iterator("table",function(e){A(e)})});We("settings()",function(){return new Ve(this.context,this.context)});We("init()",function(){var e=this.context;return e.length?e[0].oInit:null});We("data()",function(){return this.iterator("table",function(e){return at(e.aoData,"_aData")}).flatten()});We("destroy()",function(n){n=n||!1;return this.iterator("table",function(i){var r,o=i.nTableWrapper.parentNode,s=i.oClasses,a=i.nTable,l=i.nTBody,u=i.nTHead,c=i.nTFoot,f=e(a),p=e(l),h=e(i.nTableWrapper),d=e.map(i.aoData,function(e){return e.nTr});i.bDestroying=!0;je(i,"aoDestroyCallback","destroy",[i]);n||new Ve(i).columns().visible(!0);h.off(".DT").find(":not(tbody *)").off(".DT");e(t).off(".DT-"+i.sInstance);if(a!=u.parentNode){f.children("thead").detach();f.append(u)}if(c&&a!=c.parentNode){f.children("tfoot").detach();f.append(c)}i.aaSorting=[];i.aaSortingFixed=[];Le(i);e(d).removeClass(i.asStripeClasses.join(" "));e("th, td",u).removeClass(s.sSortable+" "+s.sSortableAsc+" "+s.sSortableDesc+" "+s.sSortableNone);p.children().detach();p.append(d);var g=n?"remove":"detach";f[g]();h[g]();if(!n&&o){o.insertBefore(a,i.nTableReinsertBefore);f.css("width",i.sDestroyWidth).removeClass(s.sTable);r=i.asDestroyStripes.length;r&&p.children().each(function(t){e(this).addClass(i.asDestroyStripes[t%r])})}var m=e.inArray(i,Ze.settings);m!==-1&&Ze.settings.splice(m,1)})});e.each(["column","row","cell"],function(e,t){We(t+"s().every()",function(e){var n=this.selector.opts,r=this;return this.iterator(t,function(o,s,a,l,u){e.call(r[t](s,"cell"===t?a:n,"cell"===t?n:i),s,a,l,u)})})});We("i18n()",function(t,n,r){var o=this.context[0],s=L(t)(o.oLanguage);s===i&&(s=n);r!==i&&e.isPlainObject(s)&&(s=s[r]!==i?s[r]:s._);return s.replace("%d",r)});Ze.version="1.10.16";Ze.settings=[];Ze.models={};Ze.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0};Ze.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1};Ze.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};Ze.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(e){try{return JSON.parse((e.iStateDuration===-1?sessionStorage:localStorage).getItem("DataTables_"+e.sInstance+"_"+location.pathname))}catch(t){}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(e,t){try{(e.iStateDuration===-1?sessionStorage:localStorage).setItem("DataTables_"+e.sInstance+"_"+location.pathname,JSON.stringify(t))}catch(n){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:e.extend({},Ze.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"};r(Ze.defaults);Ze.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};r(Ze.defaults.column);Ze.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:i,oAjaxData:i,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==Fe(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==Fe(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var e=this._iDisplayLength,t=this._iDisplayStart,n=t+e,i=this.aiDisplay.length,r=this.oFeatures,o=r.bPaginate;return r.bServerSide?o===!1||e===-1?t+i:Math.min(t+e,this._iRecordsDisplay):!o||n>i||e===-1?i:n},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null};Ze.ext=He={buttons:{},classes:{},builder:"-source-",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:Ze.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:Ze.version};e.extend(He,{afnFiltering:He.search,aTypes:He.type.detect,ofnSearch:He.type.search,oSort:He.type.order,afnSortData:He.order,aoFeatures:He.feature,oApi:He.internal,oStdClasses:He.classes,oPagination:He.pager});e.extend(Ze.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});var Ht=Ze.ext.pager;e.extend(Ht,{simple:function(e,t){return["previous","next"]},full:function(e,t){return["first","previous","next","last"]},numbers:function(e,t){return[Ue(e,t)]},simple_numbers:function(e,t){return["previous",Ue(e,t),"next"]},full_numbers:function(e,t){return["first","previous",Ue(e,t),"next","last"]},first_last_numbers:function(e,t){return["first",Ue(e,t),"last"]},_numbers:Ue,numbers_length:7});e.extend(!0,Ze.ext.renderer,{pageButton:{_:function(t,r,o,s,a,l){var u,c,f,p=t.oClasses,h=t.oLanguage.oPaginate,d=t.oLanguage.oAria.paginate||{},g=0,m=function(n,i){var r,s,f,v,y=function(e){fe(t,e.data.action,!0)};for(r=0,s=i.length;r").appendTo(n);m(b,v)}else{u=null;c="";switch(v){case"ellipsis":n.append('');break;case"first":u=h.sFirst;c=v+(a>0?"":" "+p.sPageButtonDisabled);break;case"previous":u=h.sPrevious;c=v+(a>0?"":" "+p.sPageButtonDisabled);break;case"next":u=h.sNext;c=v+(a",{"class":p.sPageButton+" "+c,"aria-controls":t.sTableId,"aria-label":d[v],"data-dt-idx":g,tabindex:t.iTabIndex,id:0===o&&"string"==typeof v?t.sTableId+"_"+v:null}).html(u).appendTo(n);Me(f,{action:v},y);g++}}}};try{f=e(r).find(n.activeElement).data("dt-idx")}catch(v){}m(e(r).empty(),s);f!==i&&e(r).find("[data-dt-idx="+f+"]").focus()}}});e.extend(Ze.ext.type.detect,[function(e,t){var n=t.oLanguage.sDecimal;return rt(e,n)?"num"+n:null},function(e,t){if(e&&!(e instanceof Date)&&!Qe.test(e))return null;var n=Date.parse(e);return null!==n&&!isNaN(n)||tt(e)?"date":null},function(e,t){var n=t.oLanguage.sDecimal;return rt(e,n,!0)?"num-fmt"+n:null},function(e,t){var n=t.oLanguage.sDecimal;return st(e,n)?"html-num"+n:null},function(e,t){var n=t.oLanguage.sDecimal;return st(e,n,!0)?"html-num-fmt"+n:null},function(e,t){return tt(e)||"string"==typeof e&&e.indexOf("<")!==-1?"html":null}]);e.extend(Ze.ext.type.search,{html:function(e){return tt(e)?e:"string"==typeof e?e.replace(Ke," ").replace(Xe,""):""},string:function(e){return tt(e)?e:"string"==typeof e?e.replace(Ke," "):e}});var Vt=function(e,t,n,i){if(0!==e&&(!e||"-"===e))return-(1/0);t&&(e=it(e,t));if(e.replace){n&&(e=e.replace(n,""));i&&(e=e.replace(i,""))}return 1*e};e.extend(He.type.order,{"date-pre":function(e){return Date.parse(e)||-(1/0)},"html-pre":function(e){return tt(e)?"":e.replace?e.replace(/<.*?>/g,"").toLowerCase():e+""},"string-pre":function(e){return tt(e)?"":"string"==typeof e?e.toLowerCase():e.toString?e.toString():""},"string-asc":function(e,t){return et?1:0},"string-desc":function(e,t){return et?-1:0}});Ge("");e.extend(!0,Ze.ext.renderer,{header:{_:function(t,n,i,r){e(t.nTable).on("order.dt.DT",function(e,o,s,a){if(t===o){var l=i.idx;n.removeClass(i.sSortingClass+" "+r.sSortAsc+" "+r.sSortDesc).addClass("asc"==a[l]?r.sSortAsc:"desc"==a[l]?r.sSortDesc:i.sSortingClass)}})},jqueryui:function(t,n,i,r){e("
").addClass(r.sSortJUIWrapper).append(n.contents()).append(e("").addClass(r.sSortIcon+" "+i.sSortingClassJUI)).appendTo(n);e(t.nTable).on("order.dt.DT",function(e,o,s,a){if(t===o){var l=i.idx;n.removeClass(r.sSortAsc+" "+r.sSortDesc).addClass("asc"==a[l]?r.sSortAsc:"desc"==a[l]?r.sSortDesc:i.sSortingClass);n.find("span."+r.sSortIcon).removeClass(r.sSortJUIAsc+" "+r.sSortJUIDesc+" "+r.sSortJUI+" "+r.sSortJUIAscAllowed+" "+r.sSortJUIDescAllowed).addClass("asc"==a[l]?r.sSortJUIAsc:"desc"==a[l]?r.sSortJUIDesc:i.sSortingClassJUI)}})}}});var Wt=function(e){return"string"==typeof e?e.replace(//g,">").replace(/"/g,"""):e};Ze.render={number:function(e,t,n,i,r){return{display:function(o){if("number"!=typeof o&&"string"!=typeof o)return o;var s=o<0?"-":"",a=parseFloat(o);if(isNaN(a))return Wt(o);a=a.toFixed(n);o=Math.abs(a);var l=parseInt(o,10),u=n?t+(o-l).toFixed(n).substring(2):"";return s+(i||"")+l.toString().replace(/\B(?=(\d{3})+(?!\d))/g,e)+u+(r||"")}}},text:function(){return{display:Wt}}};e.extend(Ze.ext.internal,{_fnExternApiFunc:ze,_fnBuildAjax:z,_fnAjaxUpdate:H,_fnAjaxParameters:V,_fnAjaxUpdateDraw:W,_fnAjaxDataSrc:Y,_fnAddColumn:f,_fnColumnOptions:p,_fnAdjustColumnSizing:h,_fnVisibleToColumnIndex:d,_fnColumnIndexToVisible:g,_fnVisbleColumns:m,_fnGetColumns:v,_fnColumnTypes:y,_fnApplyColumnDefs:b,_fnHungarianMap:r,_fnCamelToHungarian:o,_fnLanguageCompat:s,_fnBrowserDetect:u,_fnAddData:x,_fnAddTr:_,_fnNodeToDataIndex:E,_fnNodeToColumnIndex:w,_fnGetCellData:T,_fnSetCellData:S,_fnSplitObjNotation:C,_fnGetObjectDataFn:L,_fnSetObjectDataFn:N,_fnGetDataMaster:I,_fnClearTable:A,_fnDeleteIndex:R,_fnInvalidate:O,_fnGetRowElements:P,_fnCreateTr:k,_fnBuildHead:D,_fnDrawHead:j,_fnDraw:B,_fnReDraw:q,_fnAddOptionsHtml:F,_fnDetectHeader:U,_fnGetUniqueThs:G,_fnFeatureHtmlFilter:Z,_fnFilterComplete:$,_fnFilterCustom:K,_fnFilterColumn:X,_fnFilter:Q,_fnFilterCreateSearch:J,_fnEscapeRegex:vt,_fnFilterData:ee,_fnFeatureHtmlInfo:ie,_fnUpdateInfo:re,_fnInfoMacros:oe,_fnInitialise:se,_fnInitComplete:ae,_fnLengthChange:le,_fnFeatureHtmlLength:ue,_fnFeatureHtmlPaginate:ce,_fnPageChange:fe,_fnFeatureHtmlProcessing:pe,_fnProcessingDisplay:he,_fnFeatureHtmlTable:de,_fnScrollDraw:ge,_fnApplyToChildren:me,_fnCalculateColumnWidths:ve,_fnThrottle:_t,_fnConvertToWidth:ye,_fnGetWidestNode:be,_fnGetMaxLenString:xe,_fnStringToCss:_e,_fnSortFlatten:Ee,_fnSort:we,_fnSortAria:Te,_fnSortListener:Se,_fnSortAttachListener:Ce,_fnSortingClasses:Le,_fnSortData:Ne,_fnSaveState:Ie,_fnLoadState:Ae,_fnSettingsFromNode:Re,_fnLog:Oe,_fnMap:Pe,_fnBindAction:Me,_fnCallbackReg:De,_fnCallbackFire:je,_fnLengthOverflow:Be,_fnRenderer:qe,_fnDataSource:Fe,_fnRowAttributes:M,_fnCalculateEnd:function(){}});e.fn.dataTable=Ze;Ze.$=e;e.fn.dataTableSettings=Ze.settings;e.fn.dataTableExt=Ze.ext;e.fn.DataTable=function(t){return e(this).dataTable(t).api()};e.each(Ze,function(t,n){e.fn.DataTable[t]=n});return e.fn.dataTable})},{jquery:73}],62:[function(e,t,n){function i(){this._events=this._events||{};this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function o(e){return"number"==typeof e}function s(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}t.exports=i;i.EventEmitter=i;i.prototype._events=void 0;i.prototype._maxListeners=void 0;i.defaultMaxListeners=10;i.prototype.setMaxListeners=function(e){if(!o(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");this._maxListeners=e;return this};i.prototype.emit=function(e){var t,n,i,o,l,u;this._events||(this._events={});if("error"===e&&(!this._events.error||s(this._events.error)&&!this._events.error.length)){t=arguments[1];if(t instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");c.context=t;throw c}n=this._events[e];if(a(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:o=Array.prototype.slice.call(arguments,1);n.apply(this,o)}else if(s(n)){o=Array.prototype.slice.call(arguments,1);u=n.slice();i=u.length;for(l=0;l0&&this._events[e].length>n){this._events[e].warned=!0;console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length);"function"==typeof console.trace&&console.trace()}}return this};i.prototype.on=i.prototype.addListener;i.prototype.once=function(e,t){function n(){this.removeListener(e,n);if(!i){i=!0;t.apply(this,arguments)}}if(!r(t))throw TypeError("listener must be a function");var i=!1;n.listener=t;this.on(e,n);return this};i.prototype.removeListener=function(e,t){var n,i,o,a;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;n=this._events[e];o=n.length;i=-1;if(n===t||r(n.listener)&&n.listener===t){delete this._events[e];this._events.removeListener&&this.emit("removeListener",e,t)}else if(s(n)){for(a=o;a-- >0;)if(n[a]===t||n[a].listener&&n[a].listener===t){i=a;break}if(i<0)return this;if(1===n.length){n.length=0;delete this._events[e]}else n.splice(i,1);this._events.removeListener&&this.emit("removeListener",e,t)}return this};i.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener){0===arguments.length?this._events={}:this._events[e]&&delete this._events[e];return this}if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);this.removeAllListeners("removeListener");this._events={};return this}n=this._events[e];if(r(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);delete this._events[e];return this};i.prototype.listeners=function(e){var t;t=this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[];return t};i.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0};i.listenerCount=function(e,t){return e.listenerCount(t)}},{}],63:[function(e,t,n){var i=e("http"),r=t.exports;for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o]);r.request=function(e,t){e||(e={});e.scheme="https";e.protocol="https:";return i.request.call(this,e,t)}},{http:230}],64:[function(e,t,n){n.read=function(e,t,n,i,r){var o,s,a=8*r-i-1,l=(1<>1,c=-7,f=n?r-1:0,p=n?-1:1,h=e[t+f];f+=p;o=h&(1<<-c)-1;h>>=-c;c+=a;for(;c>0;o=256*o+e[t+f],f+=p,c-=8);s=o&(1<<-c)-1;o>>=-c;c+=i;for(;c>0;s=256*s+e[t+f],f+=p,c-=8);if(0===o)o=1-u;else{if(o===l)return s?NaN:(h?-1:1)*(1/0);s+=Math.pow(2,i);o-=u}return(h?-1:1)*s*Math.pow(2,o-i)};n.write=function(e,t,n,i,r,o){var s,a,l,u=8*o-r-1,c=(1<>1,p=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,h=i?0:o-1,d=i?1:-1,g=t<0||0===t&&1/t<0?1:0;t=Math.abs(t);if(isNaN(t)||t===1/0){a=isNaN(t)?1:0;s=c}else{s=Math.floor(Math.log(t)/Math.LN2);if(t*(l=Math.pow(2,-s))<1){s--;l*=2}t+=s+f>=1?p/l:p*Math.pow(2,1-f);if(t*l>=2){s++;l/=2}if(s+f>=c){a=0;s=c}else if(s+f>=1){a=(t*l-1)*Math.pow(2,r);s+=f}else{a=t*Math.pow(2,f-1)*Math.pow(2,r);s=0}}for(;r>=8;e[n+h]=255&a,h+=d,a/=256,r-=8);s=s<0;e[n+h]=255&s,h+=d,s/=256,u-=8);e[n+h-d]|=128*g}},{}],65:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype;e.prototype=new n;e.prototype.constructor=e}},{}],66:[function(e,t,n){function i(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function r(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&i(e.slice(0,0))}t.exports=function(e){return null!=e&&(i(e)||r(e)||!!e._isBuffer)}},{}],67:[function(e,t,n){var i=e("jquery");(function(e,t){function n(t,n){var r,o,s,a=t.nodeName.toLowerCase();if("area"===a){r=t.parentNode;o=r.name;if(!t.href||!o||"map"!==r.nodeName.toLowerCase())return!1;s=e("img[usemap=#"+o+"]")[0];return!!s&&i(s)}return(/input|select|textarea|button|object/.test(a)?!t.disabled:"a"===a?t.href||n:n)&&i(t)}function i(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var r=0,o=/^ui-id-\d+$/;e.ui=e.ui||{};e.extend(e.ui,{version:"1.10.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107, NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}});e.fn.extend({focus:function(t){return function(n,i){return"number"==typeof n?this.each(function(){var t=this;setTimeout(function(){e(t).focus();i&&i.call(t)},n)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0);return/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(n){if(n!==t)return this.css("zIndex",n);if(this.length)for(var i,r,o=e(this[0]);o.length&&o[0]!==document;){i=o.css("position");if("absolute"===i||"relative"===i||"fixed"===i){r=parseInt(o.css("zIndex"),10);if(!isNaN(r)&&0!==r)return r}o=o.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++r)})},removeUniqueId:function(){return this.each(function(){o.test(this.id)&&e(this).removeAttr("id")})}});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])},focusable:function(t){return n(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var i=e.attr(t,"tabindex"),r=isNaN(i);return(r||i>=0)&&n(t,!r)}});e("").outerWidth(1).jquery||e.each(["Width","Height"],function(n,i){function r(t,n,i,r){e.each(o,function(){n-=parseFloat(e.css(t,"padding"+this))||0;i&&(n-=parseFloat(e.css(t,"border"+this+"Width"))||0);r&&(n-=parseFloat(e.css(t,"margin"+this))||0)});return n}var o="Width"===i?["Left","Right"]:["Top","Bottom"],s=i.toLowerCase(),a={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+i]=function(n){return n===t?a["inner"+i].call(this):this.each(function(){e(this).css(s,r(this,n)+"px")})};e.fn["outer"+i]=function(t,n){return"number"!=typeof t?a["outer"+i].call(this,t):this.each(function(){e(this).css(s,r(this,t,!0,n)+"px")})}});e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))});e("").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(n){return arguments.length?t.call(this,e.camelCase(n)):t.call(this)}}(e.fn.removeData));e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());e.support.selectstart="onselectstart"in document.createElement("div");e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});e.extend(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){var i,r=e.plugins[t];if(r&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(i=0;i0)return!0;t[i]=1;r=t[i]>0;t[i]=0;return r}})})(i)},{jquery:73}],68:[function(e,t,n){var i=e("jquery");e("./widget");(function(e,t){var n=!1;e(document).mouseup(function(){n=!1});e.widget("ui.mouse",{version:"1.10.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(n){if(!0===e.data(n.target,t.widgetName+".preventClickEvent")){e.removeData(n.target,t.widgetName+".preventClickEvent");n.stopImmediatePropagation();return!1}});this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!n){this._mouseStarted&&this._mouseUp(t);this._mouseDownEvent=t;var i=this,r=1===t.which,o=!("string"!=typeof this.options.cancel||!t.target.nodeName)&&e(t.target).closest(this.options.cancel).length;if(!r||o||!this._mouseCapture(t))return!0;this.mouseDelayMet=!this.options.delay;this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay));if(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)){this._mouseStarted=this._mouseStart(t)!==!1;if(!this._mouseStarted){t.preventDefault();return!0}}!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(e){return i._mouseMove(e)};this._mouseUpDelegate=function(e){return i._mouseUp(e)};e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);t.preventDefault();n=!0;return!0}},_mouseMove:function(t){if(e.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button)return this._mouseUp(t);if(this._mouseStarted){this._mouseDrag(t);return t.preventDefault()}if(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)){this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1;this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)}return!this._mouseStarted},_mouseUp:function(t){e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=!1;t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0);this._mouseStop(t)}return!1},_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}})})(i)},{"./widget":72,jquery:73}],69:[function(e,t,n){var i=e("jquery");(function(e,t){function n(e,t,n){return[parseFloat(e[0])*(h.test(e[0])?t/100:1),parseFloat(e[1])*(h.test(e[1])?n/100:1)]}function i(t,n){return parseInt(e.css(t,n),10)||0}function r(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()}}e.ui=e.ui||{};var o,s=Math.max,a=Math.abs,l=Math.round,u=/left|center|right/,c=/top|center|bottom/,f=/[\+\-]\d+(\.[\d]+)?%?/,p=/^\w+/,h=/%$/,d=e.fn.position;e.position={scrollbarWidth:function(){if(o!==t)return o;var n,i,r=e("
"),s=r.children()[0];e("body").append(r);n=s.offsetWidth;r.css("overflow","scroll");i=s.offsetWidth;n===i&&(i=r[0].clientWidth);r.remove();return o=n-i},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.width0?"right":"center",vertical:o<0?"top":r>0?"bottom":"middle"};hs(a(r),a(o))?l.important="horizontal":l.important="vertical";t.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,a=e.left-t.collisionPosition.marginLeft,l=r-a,u=a+t.collisionWidth-o-r;if(t.collisionWidth>o)if(l>0&&u<=0){n=e.left+l+t.collisionWidth-o-r;e.left+=l-n}else u>0&&l<=0?e.left=r:l>u?e.left=r+o-t.collisionWidth:e.left=r;else l>0?e.left+=l:u>0?e.left-=u:e.left=s(e.left-a,e.left)},top:function(e,t){var n,i=t.within,r=i.isWindow?i.scrollTop:i.offset.top,o=t.within.height,a=e.top-t.collisionPosition.marginTop,l=r-a,u=a+t.collisionHeight-o-r;if(t.collisionHeight>o)if(l>0&&u<=0){n=e.top+l+t.collisionHeight-o-r;e.top+=l-n}else u>0&&l<=0?e.top=r:l>u?e.top=r+o-t.collisionHeight:e.top=r;else l>0?e.top+=l:u>0?e.top-=u:e.top=s(e.top-a,e.top)}},flip:{left:function(e,t){var n,i,r=t.within,o=r.offset.left+r.scrollLeft,s=r.width,l=r.isWindow?r.scrollLeft:r.offset.left,u=e.left-t.collisionPosition.marginLeft,c=u-l,f=u+t.collisionWidth-s-l,p="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,h="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,d=-2*t.offset[0];if(c<0){n=e.left+p+h+d+t.collisionWidth-s-o;(n<0||n0){i=e.left-t.collisionPosition.marginLeft+p+h+d-l;(i>0||a(i)c&&(i<0||i0){n=e.top-t.collisionPosition.marginTop+h+d+g-l;e.top+h+d+g>f&&(n>0||a(n)10&&r<11;t.innerHTML="";n.removeChild(t)})()})(i)},{jquery:73}],70:[function(e,t,n){var i=e("jquery");e("./core");e("./mouse");e("./widget");(function(e,t){function n(e){return parseInt(e,10)||0}function i(e){return!isNaN(parseInt(e,10))}e.widget("ui.resizable",e.ui.mouse,{version:"1.10.4",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var t,n,i,r,o,s=this,a=this.options;this.element.addClass("ui-resizable");e.extend(this,{_aspectRatio:!!a.aspectRatio,aspectRatio:a.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:a.helper||a.ghost||a.animate?a.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){this.element.wrap(e("
").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable"));this.elementIsWrapper=!0;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=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");if(this.handles.constructor===String){"all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw");t=this.handles.split(",");this.handles={};for(n=0;n
");r.css({zIndex:a.zIndex});"se"===i&&r.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[i]=".ui-resizable-"+i;this.element.append(r)}}this._renderAxis=function(t){var n,i,r,o;t=t||this.element;for(n in this.handles){this.handles[n].constructor===String&&(this.handles[n]=e(this.handles[n],this.element).show());if(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()}e(this.handles[n]).length}};this._renderAxis(this.element);this._handles=e(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!s.resizing){this.className&&(r=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i));s.axis=r&&r[1]?r[1]:"se"}});if(a.autoHide){this._handles.hide();e(this.element).addClass("ui-resizable-autohide").mouseenter(function(){if(!a.disabled){e(this).removeClass("ui-resizable-autohide");s._handles.show()}}).mouseleave(function(){if(!a.disabled&&!s.resizing){e(this).addClass("ui-resizable-autohide");s._handles.hide()}})}this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,n=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(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);return this},_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 i,r,o,s=this.options,a=this.element.position(),l=this.element;this.resizing=!0;/absolute/.test(l.css("position"))?l.css({position:"absolute",top:l.css("top"),left:l.css("left")}):l.is(".ui-draggable")&&l.css({position:"absolute",top:a.top,left:a.left});this._renderProxy();i=n(this.helper.css("left"));r=n(this.helper.css("top"));if(s.containment){i+=e(s.containment).scrollLeft()||0;r+=e(s.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:i,top:r};this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:l.width(),height:l.height()};this.originalSize=this._helper?{width:l.outerWidth(),height:l.outerHeight()}:{width:l.width(),height:l.height()};this.originalPosition={left:i,top:r};this.sizeDiff={width:l.outerWidth()-l.width(),height:l.outerHeight()-l.height()};this.originalMousePosition={left:t.pageX,top:t.pageY};this.aspectRatio="number"==typeof s.aspectRatio?s.aspectRatio:this.originalSize.width/this.originalSize.height||1;o=e(".ui-resizable-"+this.axis).css("cursor");e("body").css("cursor","auto"===o?this.axis+"-resize":o);l.addClass("ui-resizable-resizing");this._propagate("start",t);return!0},_mouseDrag:function(t){var n,i=this.helper,r={},o=this.originalMousePosition,s=this.axis,a=this.position.top,l=this.position.left,u=this.size.width,c=this.size.height,f=t.pageX-o.left||0,p=t.pageY-o.top||0,h=this._change[s];if(!h)return!1;n=h.apply(this,[t,f,p]);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);this.position.top!==a&&(r.top=this.position.top+"px");this.position.left!==l&&(r.left=this.position.left+"px");this.size.width!==u&&(r.width=this.size.width+"px");this.size.height!==c&&(r.height=this.size.height+"px");i.css(r);!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();e.isEmptyObject(r)||this._trigger("resize",t,this.ui());return!1},_mouseStop:function(t){this.resizing=!1;var n,i,r,o,s,a,l,u=this.options,c=this;if(this._helper){n=this._proportionallyResizeElements;i=n.length&&/textarea/i.test(n[0].nodeName);r=i&&e.ui.hasScroll(n[0],"left")?0:c.sizeDiff.height;o=i?0:c.sizeDiff.width;s={width:c.helper.width()-o,height:c.helper.height()-r};a=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null;l=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;u.animate||this.element.css(e.extend(s,{top:l,left:a}));c.helper.height(c.size.height);c.helper.width(c.size.width);this._helper&&!u.animate&&this._proportionallyResize()}e("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",t);this._helper&&this.helper.remove();return!1},_updateVirtualBoundaries:function(e){var t,n,r,o,s,a=this.options;s={minWidth:i(a.minWidth)?a.minWidth:0,maxWidth:i(a.maxWidth)?a.maxWidth:1/0,minHeight:i(a.minHeight)?a.minHeight:0,maxHeight:i(a.maxHeight)?a.maxHeight:1/0};if(this._aspectRatio||e){t=s.minHeight*this.aspectRatio;r=s.minWidth/this.aspectRatio;n=s.maxHeight*this.aspectRatio;o=s.maxWidth/this.aspectRatio;t>s.minWidth&&(s.minWidth=t);r>s.minHeight&&(s.minHeight=r);ne.width,a=i(e.height)&&t.minHeight&&t.minHeight>e.height,l=this.originalPosition.left+this.originalSize.width,u=this.position.top+this.size.height,c=/sw|nw|w/.test(n),f=/nw|ne|n/.test(n);s&&(e.width=t.minWidth);a&&(e.height=t.minHeight);r&&(e.width=t.maxWidth);o&&(e.height=t.maxHeight);s&&c&&(e.left=l-t.minWidth);r&&c&&(e.left=l-t.maxWidth);a&&f&&(e.top=u-t.minHeight);o&&f&&(e.top=u-t.maxHeight);e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null;return e},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var e,t,n,i,r,o=this.helper||this.element;for(e=0;e
");this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++n.zIndex});this.helper.appendTo("body").disableSelection()}else 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).data("ui-resizable"),i=n.options,r=n._proportionallyResizeElements,o=r.length&&/textarea/i.test(r[0].nodeName),s=o&&e.ui.hasScroll(r[0],"left")?0:n.sizeDiff.height,a=o?0:n.sizeDiff.width,l={width:n.size.width-a,height:n.size.height-s},u=parseInt(n.element.css("left"),10)+(n.position.left-n.originalPosition.left)||null,c=parseInt(n.element.css("top"),10)+(n.position.top-n.originalPosition.top)||null;n.element.animate(e.extend(l,c&&u?{top:c,left:u}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var i={width:parseInt(n.element.css("width"),10),height:parseInt(n.element.css("height"),10),top:parseInt(n.element.css("top"),10),left:parseInt(n.element.css("left"),10)};r&&r.length&&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,i,r,o,s,a,l,u=e(this).data("ui-resizable"),c=u.options,f=u.element,p=c.containment,h=p instanceof e?p.get(0):/parent/.test(p)?f.parent().get(0):p;if(h){u.containerElement=e(h);if(/document/.test(p)||p===document){u.containerOffset={left:0,top:0};u.containerPosition={left:0,top:0};u.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}}else{t=e(h);i=[];e(["Top","Right","Left","Bottom"]).each(function(e,r){i[e]=n(t.css("padding"+r))});u.containerOffset=t.offset();u.containerPosition=t.position();u.containerSize={height:t.innerHeight()-i[3],width:t.innerWidth()-i[1]};r=u.containerOffset;o=u.containerSize.height;s=u.containerSize.width;a=e.ui.hasScroll(h,"left")?h.scrollWidth:s;l=e.ui.hasScroll(h)?h.scrollHeight:o;u.parentData={element:h,left:r.left,top:r.top,width:a,height:l}}}},resize:function(t){var n,i,r,o,s=e(this).data("ui-resizable"),a=s.options,l=s.containerOffset,u=s.position,c=s._aspectRatio||t.shiftKey,f={top:0,left:0},p=s.containerElement;p[0]!==document&&/static/.test(p.css("position"))&&(f=l);if(u.left<(s._helper?l.left:0)){s.size.width=s.size.width+(s._helper?s.position.left-l.left:s.position.left-f.left);c&&(s.size.height=s.size.width/s.aspectRatio);s.position.left=a.helper?l.left:0}if(u.top<(s._helper?l.top:0)){s.size.height=s.size.height+(s._helper?s.position.top-l.top:s.position.top);c&&(s.size.width=s.size.height*s.aspectRatio);s.position.top=s._helper?l.top:0}s.offset.left=s.parentData.left+s.position.left;s.offset.top=s.parentData.top+s.position.top;n=Math.abs((s._helper?s.offset.left-f.left:s.offset.left-f.left)+s.sizeDiff.width);i=Math.abs((s._helper?s.offset.top-f.top:s.offset.top-l.top)+s.sizeDiff.height);r=s.containerElement.get(0)===s.element.parent().get(0);o=/relative|absolute/.test(s.containerElement.css("position"));r&&o&&(n-=Math.abs(s.parentData.left));if(n+s.size.width>=s.parentData.width){s.size.width=s.parentData.width-n;c&&(s.size.height=s.size.width/s.aspectRatio)}if(i+s.size.height>=s.parentData.height){s.size.height=s.parentData.height-i;c&&(s.size.width=s.size.height*s.aspectRatio)}},stop:function(){var t=e(this).data("ui-resizable"),n=t.options,i=t.containerOffset,r=t.containerPosition,o=t.containerElement,s=e(t.helper),a=s.offset(),l=s.outerWidth()-t.sizeDiff.width,u=s.outerHeight()-t.sizeDiff.height;t._helper&&!n.animate&&/relative/.test(o.css("position"))&&e(this).css({left:a.left-r.left-i.left,width:l,height:u});t._helper&&!n.animate&&/static/.test(o.css("position"))&&e(this).css({left:a.left-r.left-i.left,width:l,height:u})}});e.ui.plugin.add("resizable","alsoResize",{start:function(){var t=e(this).data("ui-resizable"),n=t.options,i=function(t){e(t).each(function(){var t=e(this);t.data("ui-resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})};if("object"!=typeof n.alsoResize||n.alsoResize.parentNode)i(n.alsoResize);else if(n.alsoResize.length){n.alsoResize=n.alsoResize[0];i(n.alsoResize)}else e.each(n.alsoResize,function(e){i(e)})},resize:function(t,n){var i=e(this).data("ui-resizable"),r=i.options,o=i.originalSize,s=i.originalPosition,a={height:i.size.height-o.height||0,width:i.size.width-o.width||0,top:i.position.top-s.top||0,left:i.position.left-s.left||0},l=function(t,i){e(t).each(function(){var t=e(this),r=e(this).data("ui-resizable-alsoresize"),o={},s=i&&i.length?i:t.parents(n.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(s,function(e,t){var n=(r[t]||0)+(a[t]||0);n&&n>=0&&(o[t]=n||null)});t.css(o)})};"object"!=typeof r.alsoResize||r.alsoResize.nodeType?l(r.alsoResize):e.each(r.alsoResize,function(e,t){l(e,t)})},stop:function(){e(this).removeData("resizable-alsoresize")}});e.ui.plugin.add("resizable","ghost",{start:function(){var t=e(this).data("ui-resizable"),n=t.options,i=t.size;t.ghost=t.originalElement.clone();t.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof n.ghost?n.ghost:"");t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).data("ui-resizable");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).data("ui-resizable");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}});e.ui.plugin.add("resizable","grid",{resize:function(){var t=e(this).data("ui-resizable"),n=t.options,i=t.size,r=t.originalSize,o=t.originalPosition,s=t.axis,a="number"==typeof n.grid?[n.grid,n.grid]:n.grid,l=a[0]||1,u=a[1]||1,c=Math.round((i.width-r.width)/l)*l,f=Math.round((i.height-r.height)/u)*u,p=r.width+c,h=r.height+f,d=n.maxWidth&&n.maxWidthp,v=n.minHeight&&n.minHeight>h;n.grid=a;m&&(p+=l);v&&(h+=u);d&&(p-=l);g&&(h-=u);if(/^(se|s|e)$/.test(s)){t.size.width=p;t.size.height=h}else if(/^(ne)$/.test(s)){t.size.width=p;t.size.height=h;t.position.top=o.top-f}else if(/^(sw)$/.test(s)){t.size.width=p;t.size.height=h;t.position.left=o.left-c}else{if(h-u>0){t.size.height=h;t.position.top=o.top-f}else{t.size.height=u;t.position.top=o.top+r.height-u}if(p-l>0){t.size.width=p;t.position.left=o.left-c}else{t.size.width=l;t.position.left=o.left+r.width-l}}}})})(i)},{"./core":67,"./mouse":68,"./widget":72,jquery:73}],71:[function(e,t,n){var i=e("jquery");e("./core");e("./mouse");e("./widget");(function(e,t){function n(e,t,n){return e>t&&e *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var e=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=!!this.items.length&&("x"===e.axis||i(this.items[0].item));this.offset=this.element.offset();this._mouseInit();this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled");this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_setOption:function(t,n){if("disabled"===t){this.options[t]=n;this.widget().toggleClass("ui-sortable-disabled",!!n)}else e.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(t,n){var i=null,r=!1,o=this;if(this.reverting)return!1;if(this.options.disabled||"static"===this.options.type)return!1;this._refreshItems(t);e(t.target).parents().each(function(){if(e.data(this,o.widgetName+"-item")===o){i=e(this);return!1}});e.data(t.target,o.widgetName+"-item")===o&&(i=e(t.target));if(!i)return!1;if(this.options.handle&&!n){ e(this.options.handle,i).find("*").addBack().each(function(){this===t.target&&(r=!0)});if(!r)return!1}this.currentItem=i;this._removeCurrentsFromItems();return!0},_mouseStart:function(t,n,i){var r,o,s=this.options;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;s.cursorAt&&this._adjustOffsetFromHelper(s.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helper[0]!==this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();s.containment&&this._setContainment();if(s.cursor&&"auto"!==s.cursor){o=this.document.find("body");this.storedCursor=o.css("cursor");o.css("cursor",s.cursor);this.storedStylesheet=e("").appendTo(o)}if(s.opacity){this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity"));this.helper.css("opacity",s.opacity)}if(s.zIndex){this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex"));this.helper.css("zIndex",s.zIndex)}this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset());this._trigger("start",t,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!i)for(r=this.containers.length-1;r>=0;r--)this.containers[r]._trigger("activate",t,this._uiHash(this));e.ui.ddmanager&&(e.ui.ddmanager.current=this);e.ui.ddmanager&&!s.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t);this.dragging=!0;this.helper.addClass("ui-sortable-helper");this._mouseDrag(t);return!0},_mouseDrag:function(t){var n,i,r,o,s=this.options,a=!1;this.position=this._generatePosition(t);this.positionAbs=this._convertPositionTo("absolute");this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);if(this.options.scroll){if(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName){this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY=0;n--){i=this.items[n];r=i.item[0];o=this._intersectsWithPointer(i);if(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))){this.direction=1===o?"down":"up";if("pointer"!==this.options.tolerance&&!this._intersectsWithSides(i))break;this._rearrange(t,i);this._trigger("change",t,this._uiHash());break}}this._contactContainers(t);e.ui.ddmanager&&e.ui.ddmanager.drag(this,t);this._trigger("sort",t,this._uiHash());this.lastPositionAbs=this.positionAbs;return!1},_mouseStop:function(t,n){if(t){e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t);if(this.options.revert){var i=this,r=this.placeholder.offset(),o=this.options.axis,s={};o&&"x"!==o||(s.left=r.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft));o&&"y"!==o||(s.top=r.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop));this.reverting=!0;e(this.helper).animate(s,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).removeClass("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));if(this.containers[t].containerCache.over){this.containers[t]._trigger("out",null,this._uiHash(this));this.containers[t].containerCache.over=0}}}if(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)}return this},serialize:function(t){var n=this._getItemsAsjQuery(t&&t.connected),i=[];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+"=");return i.join("&")},toArray:function(t){var n=this._getItemsAsjQuery(t&&t.connected),i=[];t=t||{};n.each(function(){i.push(e(t.item||this).attr(t.attribute||"id")||"")});return 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,s=o+e.width,a=e.top,l=a+e.height,u=this.offset.click.top,c=this.offset.click.left,f="x"===this.options.axis||i+u>a&&i+uo&&t+ce[this.floating?"width":"height"]?h:o0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?"right":"left")},refresh:function(e){this._refreshItems(e);this.refreshPositions();return this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){function n(){a.push(this)}var i,r,o,s,a=[],l=[],u=this._connectWith();if(u&&t)for(i=u.length-1;i>=0;i--){o=e(u[i]);for(r=o.length-1;r>=0;r--){s=e.data(o[r],this.widgetFullName);s&&s!==this&&!s.options.disabled&&l.push([e.isFunction(s.options.items)?s.options.items.call(s.element):e(s.options.items,s.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),s])}}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]);for(i=l.length-1;i>=0;i--)l[i][0].each(n);return e(a)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,function(e){for(var n=0;n=0;n--){r=e(p[n]);for(i=r.length-1;i>=0;i--){o=e.data(r[i],this.widgetFullName);if(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--){s=f[n][1];a=f[n][0];for(i=0,u=a.length;i=0;n--){i=this.items[n];if(i.instance===this.currentContainer||!this.currentContainer||i.item[0]===this.currentItem[0]){r=this.options.toleranceElement?e(this.options.toleranceElement,i.item):i.item;if(!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;if(!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]).addClass(n||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");"tr"===i?t.currentItem.children().each(function(){e(" ",t.document[0]).attr("colspan",e(this).attr("colspan")||1).appendTo(r)}):"img"===i&&r.attr("src",t.currentItem.attr("src"));n||r.css("visibility","hidden");return r},update:function(e,r){if(!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)},_contactContainers:function(t){var r,o,s,a,l,u,c,f,p,h,d=null,g=null;for(r=this.containers.length-1;r>=0;r--)if(!e.contains(this.currentItem[0],this.containers[r].element[0]))if(this._intersectsWith(this.containers[r].containerCache)){if(d&&e.contains(this.containers[r].element[0],d.element[0]))continue;d=this.containers[r];g=r}else if(this.containers[r].containerCache.over){this.containers[r]._trigger("out",t,this._uiHash(this));this.containers[r].containerCache.over=0}if(d)if(1===this.containers.length){if(!this.containers[g].containerCache.over){this.containers[g]._trigger("over",t,this._uiHash(this));this.containers[g].containerCache.over=1}}else{s=1e4;a=null;h=d.floating||i(this.currentItem);l=h?"left":"top";u=h?"width":"height";c=this.positionAbs[l]+this.offset.click[l];for(o=this.items.length-1;o>=0;o--)if(e.contains(this.containers[g].element[0],this.items[o].item[0])&&this.items[o].item[0]!==this.currentItem[0]&&(!h||n(this.positionAbs.top+this.offset.click.top,this.items[o].top,this.items[o].height))){f=this.items[o].item.offset()[l];p=!1;if(Math.abs(f-c)>Math.abs(f+this.items[o][u]-c)){p=!0;f+=this.items[o][u]}if(Math.abs(f-c)this.containment[2]&&(o=this.containment[2]+this.offset.click.left);t.pageY-this.offset.click.top>this.containment[3]&&(s=this.containment[3]+this.offset.click.top)}if(r.grid){n=this.originalPageY+Math.round((s-this.originalPageY)/r.grid[1])*r.grid[1];s=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}}return{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:a.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:a.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=[];!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();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())});if(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))}for(i=this.containers.length-1;i>=0;i--){t||r.push(n("deactivate",this,this.containers[i]));if(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;if(this.cancelHelperRemoval){if(!t){this._trigger("beforeStop",e,this._uiHash());for(i=0;i",options:{disabled:!1,create:null},_createWidget:function(t,i){i=e(i||this.defaultElement||this)[0];this.element=e(i);this.uuid=n++;this.eventNamespace="."+this.widgetName+this.uuid;this.options=e.widget.extend({},this.options,this._getCreateOptions(),t);this.bindings=e();this.hoverable=e();this.focusable=e();if(i!==this){e.data(i,this.widgetFullName,this);this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}});this.document=e(i.style?i.ownerDocument:i.document||i);this.window=e(this.document[0].defaultView||this.document[0].parentWindow)}this._create();this._trigger("create",null,this._getCreateEventData());this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy();this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName));this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled");this.bindings.unbind(this.eventNamespace);this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(n,i){var r,o,s,a=n;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof n){a={};r=n.split(".");n=r.shift();if(r.length){o=a[n]=e.widget.extend({},this.options[n]);for(s=0;s0&&t-1 in e)}function i(e,t,n){if(oe.isFunction(t))return oe.grep(e,function(e,i){return!!t.call(e,i,e)!==n});if(t.nodeType)return oe.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(ge.test(t))return oe.filter(t,e,n);t=oe.filter(t,e)}return oe.grep(e,function(e){return J.call(t,e)>-1!==n})}function r(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function o(e){var t={};oe.each(e.match(_e)||[],function(e,n){t[n]=!0});return t}function s(){$.removeEventListener("DOMContentLoaded",s);e.removeEventListener("load",s);oe.ready()}function a(){this.expando=oe.expando+a.uid++}function l(e,t,n){var i;if(void 0===n&&1===e.nodeType){i="data-"+t.replace(Ne,"-$&").toLowerCase();n=e.getAttribute(i);if("string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:Le.test(n)?oe.parseJSON(n):n)}catch(r){}Ce.set(e,t,n)}else n=void 0}return n}function u(e,t,n,i){var r,o=1,s=20,a=i?function(){return i.cur()}:function(){return oe.css(e,t,"")},l=a(),u=n&&n[3]||(oe.cssNumber[t]?"":"px"),c=(oe.cssNumber[t]||"px"!==u&&+l)&&Ae.exec(oe.css(e,t));if(c&&c[3]!==u){u=u||c[3];n=n||[];c=+l||1;do{o=o||".5";c/=o;oe.style(e,t,c+u)}while(o!==(o=a()/l)&&1!==o&&--s)}if(n){c=+c||+l||0;r=n[1]?c+(n[1]+1)*n[2]:+n[2];if(i){i.unit=u;i.start=c;i.end=r}}return r}function c(e,t){var n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&oe.nodeName(e,t)?oe.merge([e],n):n}function f(e,t){for(var n=0,i=e.length;n-1)r&&r.push(o);else{u=oe.contains(o.ownerDocument,o);s=c(h.appendChild(o),"script");u&&f(s);if(n){p=0;for(;o=s[p++];)Me.test(o.type||"")&&n.push(o)}}return h}function h(){return!0}function d(){return!1}function g(){try{return $.activeElement}catch(e){}}function m(e,t,n,i,r,o){var s,a;if("object"==typeof t){if("string"!=typeof n){i=i||n;n=void 0}for(a in t)m(e,a,n,i,t[a],o);return e}if(null==i&&null==r){r=n;i=n=void 0}else if(null==r)if("string"==typeof n){r=i;i=void 0}else{r=i;i=n;n=void 0}if(r===!1)r=d;else if(!r)return e;if(1===o){s=r;r=function(e){oe().off(e);return s.apply(this,arguments)};r.guid=s.guid||(s.guid=oe.guid++); }return e.each(function(){oe.event.add(this,t,r,i,n)})}function v(e,t){return oe.nodeName(e,"table")&&oe.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function y(e){e.type=(null!==e.getAttribute("type"))+"/"+e.type;return e}function b(e){var t=He.exec(e.type);t?e.type=t[1]:e.removeAttribute("type");return e}function x(e,t){var n,i,r,o,s,a,l,u;if(1===t.nodeType){if(Se.hasData(e)){o=Se.access(e);s=Se.set(t,o);u=o.events;if(u){delete s.handle;s.events={};for(r in u)for(n=0,i=u[r].length;n1&&"string"==typeof g&&!ie.checkClone&&ze.test(g))return e.each(function(r){var o=e.eq(r);m&&(t[0]=g.call(this,r,o.html()));E(o,t,n,i)});if(h){r=p(t,e[0].ownerDocument,!1,e,i);o=r.firstChild;1===r.childNodes.length&&(r=o);if(o||i){s=oe.map(c(r,"script"),y);a=s.length;for(;f")).appendTo(t.documentElement);t=We[0].contentDocument;t.write();t.close();n=T(e,t);We.detach()}Ye[e]=n}return n}function C(e,t,n){var i,r,o,s,a=e.style;n=n||Ke(e);s=n?n.getPropertyValue(t)||n[t]:void 0;""!==s&&void 0!==s||oe.contains(e.ownerDocument,e)||(s=oe.style(e,t));if(n&&!ie.pixelMarginRight()&&$e.test(s)&&Ze.test(t)){i=a.width;r=a.minWidth;o=a.maxWidth;a.minWidth=a.maxWidth=a.width=s;s=n.width;a.width=i;a.minWidth=r;a.maxWidth=o}return void 0!==s?s+"":s}function L(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}function N(e){if(e in it)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=nt.length;n--;){e=nt[n]+t;if(e in it)return e}}function I(e,t,n){var i=Ae.exec(t);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):t}function A(e,t,n,i,r){for(var o=n===(i?"border":"content")?4:"width"===t?1:0,s=0;o<4;o+=2){"margin"===n&&(s+=oe.css(e,n+Re[o],!0,r));if(i){"content"===n&&(s-=oe.css(e,"padding"+Re[o],!0,r));"margin"!==n&&(s-=oe.css(e,"border"+Re[o]+"Width",!0,r))}else{s+=oe.css(e,"padding"+Re[o],!0,r);"padding"!==n&&(s+=oe.css(e,"border"+Re[o]+"Width",!0,r))}}return s}function R(e,t,n){var i=!0,r="width"===t?e.offsetWidth:e.offsetHeight,o=Ke(e),s="border-box"===oe.css(e,"boxSizing",!1,o);if(r<=0||null==r){r=C(e,t,o);(r<0||null==r)&&(r=e.style[t]);if($e.test(r))return r;i=s&&(ie.boxSizingReliable()||r===e.style[t]);r=parseFloat(r)||0}return r+A(e,t,n||(s?"border":"content"),i,o)+"px"}function O(e,t){for(var n,i,r,o=[],s=0,a=e.length;s=0&&n=0},isPlainObject:function(e){var t;if("object"!==oe.type(e)||e.nodeType||oe.isWindow(e))return!1;if(e.constructor&&!ne.call(e,"constructor")&&!ne.call(e.constructor.prototype||{},"isPrototypeOf"))return!1;for(t in e);return void 0===t||ne.call(e,t)},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?ee[te.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;e=oe.trim(e);if(e)if(1===e.indexOf("use strict")){t=$.createElement("script");t.text=e;$.head.appendChild(t).parentNode.removeChild(t)}else n(e)},camelCase:function(e){return e.replace(ae,"ms-").replace(le,ue)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var i,r=0;if(n(e)){i=e.length;for(;rE.cacheLength&&delete e[t.shift()];return e[n+" "]=i}var t=[];return e}function i(e){e[q]=!0;return e}function r(e){var t=O.createElement("div");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--;)E.attrHandle[n[i]]=t}function s(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||Y)-(~e.sourceIndex||Y);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function a(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 i(function(t){t=+t;return i(function(n,i){for(var r,o=e([],n.length,t),s=o.length;s--;)n[r=o[s]]&&(n[r]=!(i[r]=n[r]))})})}function c(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function f(){}function p(e){for(var t=0,n=e.length,i="";t1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function g(e,n,i){for(var r=0,o=n.length;r-1&&(i[u]=!(s[u]=f))}}else{b=m(b===s?b.splice(d,b.length):b);o?o(null,s,b,l):Q.apply(s,b)}})}function y(e){for(var t,n,i,r=e.length,o=E.relative[e[0].type],s=o||E.relative[" "],a=o?1:0,l=h(function(e){return e===t},s,!0),u=h(function(e){return ee(t,e)>-1},s,!0),c=[function(e,n,i){var r=!o&&(i||n!==N)||((t=n).nodeType?l(e,n,i):u(e,n,i));t=null;return r}];a1&&d(c),a>1&&p(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(ae,"$1"),n,a0,o=e.length>0,s=function(i,s,a,l,u){var c,f,p,h=0,d="0",g=i&&[],v=[],y=N,b=i||o&&E.find.TAG("*",u),x=U+=null==y?1:Math.random()||.1,_=b.length;u&&(N=s===O||s||u);for(;d!==_&&null!=(c=b[d]);d++){if(o&&c){f=0;if(!s&&c.ownerDocument!==O){R(c);a=!k}for(;p=e[f++];)if(p(c,s||O,a)){l.push(c);break}u&&(U=x)}if(r){(c=!p&&c)&&h--;i&&g.push(c)}}h+=d;if(r&&d!==h){f=0;for(;p=n[f++];)p(g,v,s,a);if(i){if(h>0)for(;d--;)g[d]||v[d]||(v[d]=K.call(l));v=m(v)}Q.apply(l,v);u&&!i&&v.length>0&&h+n.length>1&&t.uniqueSort(l)}if(u){U=x;N=y}return g};return r?i(s):s}var x,_,E,w,T,S,C,L,N,I,A,R,O,P,k,M,D,j,B,q="sizzle"+1*new Date,F=e.document,U=0,G=0,z=n(),H=n(),V=n(),W=function(e,t){e===t&&(A=!0);return 0},Y=1<<31,Z={}.hasOwnProperty,$=[],K=$.pop,X=$.push,Q=$.push,J=$.slice,ee=function(e,t){for(var n=0,i=e.length;n+~]|"+ne+")"+ne+"*"),ce=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),fe=new RegExp(oe),pe=new RegExp("^"+ie+"$"),he={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")},de=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,me=/^[^{]+\{\s*\[native \w/,ve=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ye=/[+~]/,be=/'|\\/g,xe=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),_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=function(){R()};try{Q.apply($=J.call(F.childNodes),F.childNodes);$[F.childNodes.length].nodeType}catch(we){Q={apply:$.length?function(e,t){X.apply(e,J.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}_=t.support={};T=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName};R=t.setDocument=function(e){var t,n,i=e?e.ownerDocument||e:F;if(i===O||9!==i.nodeType||!i.documentElement)return O;O=i;P=O.documentElement;k=!T(O);(n=O.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Ee,!1):n.attachEvent&&n.attachEvent("onunload",Ee));_.attributes=r(function(e){e.className="i";return!e.getAttribute("className")});_.getElementsByTagName=r(function(e){e.appendChild(O.createComment(""));return!e.getElementsByTagName("*").length});_.getElementsByClassName=me.test(O.getElementsByClassName);_.getById=r(function(e){P.appendChild(e).id=q;return!O.getElementsByName||!O.getElementsByName(q).length});if(_.getById){E.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&k){var n=t.getElementById(e);return n?[n]:[]}};E.filter.ID=function(e){var t=e.replace(xe,_e);return function(e){return e.getAttribute("id")===t}}}else{delete E.find.ID;E.filter.ID=function(e){var t=e.replace(xe,_e);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}}E.find.TAG=_.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):_.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};E.find.CLASS=_.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&k)return t.getElementsByClassName(e)};D=[];M=[];if(_.qsa=me.test(O.querySelectorAll)){r(function(e){P.appendChild(e).innerHTML="";e.querySelectorAll("[msallowcapture^='']").length&&M.push("[*^$]="+ne+"*(?:''|\"\")");e.querySelectorAll("[selected]").length||M.push("\\["+ne+"*(?:value|"+te+")");e.querySelectorAll("[id~="+q+"-]").length||M.push("~=");e.querySelectorAll(":checked").length||M.push(":checked");e.querySelectorAll("a#"+q+"+*").length||M.push(".#.+[+~]")});r(function(e){var t=O.createElement("input");t.setAttribute("type","hidden");e.appendChild(t).setAttribute("name","D");e.querySelectorAll("[name=d]").length&&M.push("name"+ne+"*[*^$|!~]?=");e.querySelectorAll(":enabled").length||M.push(":enabled",":disabled");e.querySelectorAll("*,:x");M.push(",.*:")})}(_.matchesSelector=me.test(j=P.matches||P.webkitMatchesSelector||P.mozMatchesSelector||P.oMatchesSelector||P.msMatchesSelector))&&r(function(e){_.disconnectedMatch=j.call(e,"div");j.call(e,"[s!='']:x");D.push("!=",oe)});M=M.length&&new RegExp(M.join("|"));D=D.length&&new RegExp(D.join("|"));t=me.test(P.compareDocumentPosition);B=t||me.test(P.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};W=t?function(e,t){if(e===t){A=!0;return 0}var n=!e.compareDocumentPosition-!t.compareDocumentPosition;if(n)return n;n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1;return 1&n||!_.sortDetached&&t.compareDocumentPosition(e)===n?e===O||e.ownerDocument===F&&B(F,e)?-1:t===O||t.ownerDocument===F&&B(F,t)?1:I?ee(I,e)-ee(I,t):0:4&n?-1:1}:function(e,t){if(e===t){A=!0;return 0}var n,i=0,r=e.parentNode,o=t.parentNode,a=[e],l=[t];if(!r||!o)return e===O?-1:t===O?1:r?-1:o?1:I?ee(I,e)-ee(I,t):0;if(r===o)return s(e,t);n=e;for(;n=n.parentNode;)a.unshift(n);n=t;for(;n=n.parentNode;)l.unshift(n);for(;a[i]===l[i];)i++;return i?s(a[i],l[i]):a[i]===F?-1:l[i]===F?1:0};return O};t.matches=function(e,n){return t(e,null,null,n)};t.matchesSelector=function(e,n){(e.ownerDocument||e)!==O&&R(e);n=n.replace(ce,"='$1']");if(_.matchesSelector&&k&&!V[n+" "]&&(!D||!D.test(n))&&(!M||!M.test(n)))try{var i=j.call(e,n);if(i||_.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(r){}return t(n,O,null,[e]).length>0};t.contains=function(e,t){(e.ownerDocument||e)!==O&&R(e);return B(e,t)};t.attr=function(e,t){(e.ownerDocument||e)!==O&&R(e);var n=E.attrHandle[t.toLowerCase()],i=n&&Z.call(E.attrHandle,t.toLowerCase())?n(e,t,!k):void 0;return void 0!==i?i:_.attributes||!k?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null};t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};t.uniqueSort=function(e){var t,n=[],i=0,r=0;A=!_.detectDuplicates;I=!_.sortStable&&e.slice(0);e.sort(W);if(A){for(;t=e[r++];)t===e[r]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}I=null;return e};w=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+=w(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i++];)n+=w(t);return n};E=t.selectors={cacheLength:50,createPseudo:i,match:he,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){e[1]=e[1].replace(xe,_e);e[3]=(e[3]||e[4]||e[5]||"").replace(xe,_e);"~="===e[2]&&(e[3]=" "+e[3]+" ");return e.slice(0,4)},CHILD:function(e){e[1]=e[1].toLowerCase();if("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])}else e[3]&&t.error(e[0]);return e},PSEUDO:function(e){var t,n=!e[6]&&e[2];if(he.CHILD.test(e[0]))return null;if(e[3])e[2]=e[4]||e[5]||"";else if(n&&fe.test(n)&&(t=S(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)){e[0]=e[0].slice(0,t);e[2]=n.slice(0,t)}return e.slice(0,3)}},filter:{TAG:function(e){var t=e.replace(xe,_e).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=z[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&z(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);if(null==o)return"!="===n;if(!n)return!0;o+="";return"="===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(se," ")+" ").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),s="last"!==e.slice(-4),a="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var u,c,f,p,h,d,g=o!==s?"nextSibling":"previousSibling",m=t.parentNode,v=a&&t.nodeName.toLowerCase(),y=!l&&!a,b=!1;if(m){if(o){for(;g;){p=t;for(;p=p[g];)if(a?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;d=g="only"===e&&!d&&"nextSibling"}return!0}d=[s?m.firstChild:m.lastChild];if(s&&y){p=m;f=p[q]||(p[q]={});c=f[p.uniqueID]||(f[p.uniqueID]={});u=c[e]||[];h=u[0]===U&&u[1];b=h&&u[2];p=h&&m.childNodes[h];for(;p=++h&&p&&p[g]||(b=h=0)||d.pop();)if(1===p.nodeType&&++b&&p===t){c[e]=[U,h,b];break}}else{if(y){p=t;f=p[q]||(p[q]={});c=f[p.uniqueID]||(f[p.uniqueID]={});u=c[e]||[];h=u[0]===U&&u[1];b=h}if(b===!1)for(;p=++h&&p&&p[g]||(b=h=0)||d.pop();)if((a?p.nodeName.toLowerCase()===v:1===p.nodeType)&&++b){if(y){f=p[q]||(p[q]={});c=f[p.uniqueID]||(f[p.uniqueID]={});c[e]=[U,b]}if(p===t)break}}b-=r;return b===i||b%i===0&&b/i>=0}}},PSEUDO:function(e,n){var r,o=E.pseudos[e]||E.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);if(o[q])return o(n);if(o.length>1){r=[e,e,"",n];return E.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,r=o(e,n),s=r.length;s--;){i=ee(e,r[s]);e[i]=!(t[i]=r[s])}}):function(e){return o(e,0,r)}}return o}},pseudos:{not:i(function(e){var t=[],n=[],r=C(e.replace(ae,"$1"));return r[q]?i(function(e,t,n,i){for(var o,s=r(e,null,i,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))}):function(e,i,o){t[0]=e;r(t,null,o,n);t[0]=null;return!n.pop()}}),has:i(function(e){return function(n){return t(e,n).length>0}}),contains:i(function(e){e=e.replace(xe,_e);return function(t){return(t.textContent||t.innerText||w(t)).indexOf(e)>-1}}),lang:i(function(e){pe.test(e||"")||t.error("unsupported lang: "+e);e=e.replace(xe,_e).toLowerCase();return function(t){var n;do if(n=k?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang")){n=n.toLowerCase();return 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===P},focus:function(e){return e===O.activeElement&&(!O.hasFocus||O.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){e.parentNode&&e.parentNode.selectedIndex;return 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!E.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return de.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:u(function(){return[0]}),last:u(function(e,t){return[t-1]}),eq:u(function(e,t,n){return[n<0?n+t:n]}),even:u(function(e,t){for(var n=0;n=0;)e.push(i);return e}),gt:u(function(e,t,n){for(var i=n<0?n+t:n;++i2&&"ID"===(s=o[0]).type&&_.getById&&9===t.nodeType&&k&&E.relative[o[1].type]){t=(E.find.ID(s.matches[0].replace(xe,_e),t)||[])[0];if(!t)return n;u&&(t=t.parentNode);e=e.slice(o.shift().value.length)}r=he.needsContext.test(e)?0:o.length;for(;r--;){s=o[r];if(E.relative[a=s.type])break;if((l=E.find[a])&&(i=l(s.matches[0].replace(xe,_e),ye.test(o[0].type)&&c(t.parentNode)||t))){o.splice(r,1);e=i.length&&p(o);if(!e){Q.apply(n,i);return n}break}}}(u||C(e,f))(i,t,!k,n,!t||ye.test(e)&&c(t.parentNode)||t);return n};_.sortStable=q.split("").sort(W).join("")===q;_.detectDuplicates=!!A;R();_.sortDetached=r(function(e){return 1&e.compareDocumentPosition(O.createElement("div"))});r(function(e){e.innerHTML="";return"#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)});_.attributes&&r(function(e){e.innerHTML="";e.firstChild.setAttribute("value","");return""===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});return t}(e);oe.find=ce;oe.expr=ce.selectors;oe.expr[":"]=oe.expr.pseudos;oe.uniqueSort=oe.unique=ce.uniqueSort;oe.text=ce.getText;oe.isXMLDoc=ce.isXML;oe.contains=ce.contains;var fe=function(e,t,n){for(var i=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&oe(e).is(n))break;i.push(e)}return i},pe=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n; },he=oe.expr.match.needsContext,de=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,ge=/^.[^:#\[\.,]*$/;oe.filter=function(e,t,n){var i=t[0];n&&(e=":not("+e+")");return 1===t.length&&1===i.nodeType?oe.find.matchesSelector(i,e)?[i]:[]:oe.find.matches(e,oe.grep(t,function(e){return 1===e.nodeType}))};oe.fn.extend({find:function(e){var t,n=this.length,i=[],r=this;if("string"!=typeof e)return this.pushStack(oe(e).filter(function(){for(t=0;t1?oe.unique(i):i);i.selector=this.selector?this.selector+" "+e:e;return i},filter:function(e){return this.pushStack(i(this,e||[],!1))},not:function(e){return this.pushStack(i(this,e||[],!0))},is:function(e){return!!i(this,"string"==typeof e&&he.test(e)?oe(e):e||[],!1).length}});var me,ve=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ye=oe.fn.init=function(e,t,n){var i,r;if(!e)return this;n=n||me;if("string"==typeof e){i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:ve.exec(e);if(!i||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){t=t instanceof oe?t[0]:t;oe.merge(this,oe.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:$,!0));if(de.test(i[1])&&oe.isPlainObject(t))for(i in t)oe.isFunction(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}r=$.getElementById(i[2]);if(r&&r.parentNode){this.length=1;this[0]=r}this.context=$;this.selector=e;return this}if(e.nodeType){this.context=this[0]=e;this.length=1;return this}if(oe.isFunction(e))return void 0!==n.ready?n.ready(e):e(oe);if(void 0!==e.selector){this.selector=e.selector;this.context=e.context}return oe.makeArray(e,this)};ye.prototype=oe.fn;me=oe($);var be=/^(?:parents|prev(?:Until|All))/,xe={children:!0,contents:!0,next:!0,prev:!0};oe.fn.extend({has:function(e){var t=oe(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&oe.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?oe.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?J.call(oe(e),this[0]):J.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(oe.uniqueSort(oe.merge(this.get(),oe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});oe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return fe(e,"parentNode")},parentsUntil:function(e,t,n){return fe(e,"parentNode",n)},next:function(e){return r(e,"nextSibling")},prev:function(e){return r(e,"previousSibling")},nextAll:function(e){return fe(e,"nextSibling")},prevAll:function(e){return fe(e,"previousSibling")},nextUntil:function(e,t,n){return fe(e,"nextSibling",n)},prevUntil:function(e,t,n){return fe(e,"previousSibling",n)},siblings:function(e){return pe((e.parentNode||{}).firstChild,e)},children:function(e){return pe(e.firstChild)},contents:function(e){return e.contentDocument||oe.merge([],e.childNodes)}},function(e,t){oe.fn[e]=function(n,i){var r=oe.map(this,t,n);"Until"!==e.slice(-5)&&(i=n);i&&"string"==typeof i&&(r=oe.filter(i,r));if(this.length>1){xe[e]||oe.uniqueSort(r);be.test(e)&&r.reverse()}return this.pushStack(r)}});var _e=/\S+/g;oe.Callbacks=function(e){e="string"==typeof e?o(e):oe.extend({},e);var t,n,i,r,s=[],a=[],l=-1,u=function(){r=e.once;i=t=!0;for(;a.length;l=-1){n=a.shift();for(;++l-1;){s.splice(n,1);n<=l&&l--}});return this},has:function(e){return e?oe.inArray(e,s)>-1:s.length>0},empty:function(){s&&(s=[]);return this},disable:function(){r=a=[];s=n="";return this},disabled:function(){return!s},lock:function(){r=a=[];n||(s=n="");return this},locked:function(){return!!r},fireWith:function(e,n){if(!r){n=n||[];n=[e,n.slice?n.slice():n];a.push(n);t||u()}return this},fire:function(){c.fireWith(this,arguments);return this},fired:function(){return!!i}};return c};oe.extend({Deferred:function(e){var t=[["resolve","done",oe.Callbacks("once memory"),"resolved"],["reject","fail",oe.Callbacks("once memory"),"rejected"],["notify","progress",oe.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){r.done(arguments).fail(arguments);return this},then:function(){var e=arguments;return oe.Deferred(function(n){oe.each(t,function(t,o){var s=oe.isFunction(e[t])&&e[t];r[o[1]](function(){var e=s&&s.apply(this,arguments);e&&oe.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[o[0]+"With"](this===i?n.promise():this,s?[e]:arguments)})});e=null}).promise()},promise:function(e){return null!=e?oe.extend(e,i):i}},r={};i.pipe=i.then;oe.each(t,function(e,o){var s=o[2],a=o[3];i[o[1]]=s.add;a&&s.add(function(){n=a},t[1^e][2].disable,t[2][2].lock);r[o[0]]=function(){r[o[0]+"With"](this===r?i:this,arguments);return this};r[o[0]+"With"]=s.fireWith});i.promise(r);e&&e.call(r,r);return r},when:function(e){var t,n,i,r=0,o=K.call(arguments),s=o.length,a=1!==s||e&&oe.isFunction(e.promise)?s:0,l=1===a?e:oe.Deferred(),u=function(e,n,i){return function(r){n[e]=this;i[e]=arguments.length>1?K.call(arguments):r;i===t?l.notifyWith(n,i):--a||l.resolveWith(n,i)}};if(s>1){t=new Array(s);n=new Array(s);i=new Array(s);for(;r0)){Ee.resolveWith($,[oe]);if(oe.fn.triggerHandler){oe($).triggerHandler("ready");oe($).off("ready")}}}}});oe.ready.promise=function(t){if(!Ee){Ee=oe.Deferred();if("complete"===$.readyState||"loading"!==$.readyState&&!$.documentElement.doScroll)e.setTimeout(oe.ready);else{$.addEventListener("DOMContentLoaded",s);e.addEventListener("load",s)}}return Ee.promise(t)};oe.ready.promise();var we=function(e,t,n,i,r,o,s){var a=0,l=e.length,u=null==n;if("object"===oe.type(n)){r=!0;for(a in n)we(e,t,a,n[a],!0,o,s)}else if(void 0!==i){r=!0;oe.isFunction(i)||(s=!0);if(u)if(s){t.call(e,i);t=null}else{u=t;t=function(e,t,n){return u.call(oe(e),n)}}if(t)for(;a-1&&void 0!==n&&Ce.set(this,e,t)})}},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Ce.remove(this,e)})}});oe.extend({queue:function(e,t,n){var i;if(e){t=(t||"fx")+"queue";i=Se.get(e,t);n&&(!i||oe.isArray(n)?i=Se.access(e,t,oe.makeArray(n)):i.push(n));return i||[]}},dequeue:function(e,t){t=t||"fx";var n=oe.queue(e,t),i=n.length,r=n.shift(),o=oe._queueHooks(e,t),s=function(){oe.dequeue(e,t)};if("inprogress"===r){r=n.shift();i--}if(r){"fx"===t&&n.unshift("inprogress");delete o.stop;r.call(e,s,o)}!i&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Se.get(e,n)||Se.access(e,n,{empty:oe.Callbacks("once memory").add(function(){Se.remove(e,[t+"queue",n])})})}});oe.fn.extend({queue:function(e,t){var n=2;if("string"!=typeof e){t=e;e="fx";n--}return arguments.length",""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};De.optgroup=De.option;De.tbody=De.tfoot=De.colgroup=De.caption=De.thead;De.th=De.td;var je=/<|&#?\w+;/;(function(){var e=$.createDocumentFragment(),t=e.appendChild($.createElement("div")),n=$.createElement("input");n.setAttribute("type","radio");n.setAttribute("checked","checked");n.setAttribute("name","t");t.appendChild(n);ie.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked;t.innerHTML="";ie.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue})();var Be=/^key/,qe=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Fe=/^([^.]*)(?:\.(.+)|)/;oe.event={global:{},add:function(e,t,n,i,r){var o,s,a,l,u,c,f,p,h,d,g,m=Se.get(e);if(m){if(n.handler){o=n;n=o.handler;r=o.selector}n.guid||(n.guid=oe.guid++);(l=m.events)||(l=m.events={});(s=m.handle)||(s=m.handle=function(t){return"undefined"!=typeof oe&&oe.event.triggered!==t.type?oe.event.dispatch.apply(e,arguments):void 0});t=(t||"").match(_e)||[""];u=t.length;for(;u--;){a=Fe.exec(t[u])||[];h=g=a[1];d=(a[2]||"").split(".").sort();if(h){f=oe.event.special[h]||{};h=(r?f.delegateType:f.bindType)||h;f=oe.event.special[h]||{};c=oe.extend({type:h,origType:g,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&oe.expr.match.needsContext.test(r),namespace:d.join(".")},o);if(!(p=l[h])){p=l[h]=[];p.delegateCount=0;f.setup&&f.setup.call(e,i,d,s)!==!1||e.addEventListener&&e.addEventListener(h,s)}if(f.add){f.add.call(e,c);c.handler.guid||(c.handler.guid=n.guid)}r?p.splice(p.delegateCount++,0,c):p.push(c);oe.event.global[h]=!0}}}},remove:function(e,t,n,i,r){var o,s,a,l,u,c,f,p,h,d,g,m=Se.hasData(e)&&Se.get(e);if(m&&(l=m.events)){t=(t||"").match(_e)||[""];u=t.length;for(;u--;){a=Fe.exec(t[u])||[];h=g=a[1];d=(a[2]||"").split(".").sort();if(h){f=oe.event.special[h]||{};h=(i?f.delegateType:f.bindType)||h;p=l[h]||[];a=a[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)");s=o=p.length;for(;o--;){c=p[o];if((r||g===c.origType)&&(!n||n.guid===c.guid)&&(!a||a.test(c.namespace))&&(!i||i===c.selector||"**"===i&&c.selector)){p.splice(o,1);c.selector&&p.delegateCount--;f.remove&&f.remove.call(e,c)}}if(s&&!p.length){f.teardown&&f.teardown.call(e,d,m.handle)!==!1||oe.removeEvent(e,h,m.handle);delete l[h]}}else for(h in l)oe.event.remove(e,h+t[u],n,i,!0)}oe.isEmptyObject(l)&&Se.remove(e,"handle events")}},dispatch:function(e){e=oe.event.fix(e);var t,n,i,r,o,s=[],a=K.call(arguments),l=(Se.get(this,"events")||{})[e.type]||[],u=oe.event.special[e.type]||{};a[0]=e;e.delegateTarget=this;if(!u.preDispatch||u.preDispatch.call(this,e)!==!1){s=oe.event.handlers.call(this,e,l);t=0;for(;(r=s[t++])&&!e.isPropagationStopped();){e.currentTarget=r.elem;n=0;for(;(o=r.handlers[n++])&&!e.isImmediatePropagationStopped();)if(!e.rnamespace||e.rnamespace.test(o.namespace)){e.handleObj=o;e.data=o.data;i=((oe.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,a);if(void 0!==i&&(e.result=i)===!1){e.preventDefault();e.stopPropagation()}}}u.postDispatch&&u.postDispatch.call(this,e);return e.result}},handlers:function(e,t){var n,i,r,o,s=[],a=t.delegateCount,l=e.target;if(a&&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)){i=[];for(n=0;n-1:oe.find(r,this,null,[l]).length);i[r]&&i.push(o)}i.length&&s.push({elem:l,handlers:i})}a]*)\/>/gi,Ge=/\s*$/g;oe.extend({htmlPrefilter:function(e){return e.replace(Ue,"<$1>")},clone:function(e,t,n){var i,r,o,s,a=e.cloneNode(!0),l=oe.contains(e.ownerDocument,e);if(!(ie.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||oe.isXMLDoc(e))){s=c(a);o=c(e);for(i=0,r=o.length;i0&&f(s,!l&&c(e,"script"));return a},cleanData:function(e){for(var t,n,i,r=oe.event.special,o=0;void 0!==(n=e[o]);o++)if(Te(n)){if(t=n[Se.expando]){if(t.events)for(i in t.events)r[i]?oe.event.remove(n,i):oe.removeEvent(n,i,t.handle);n[Se.expando]=void 0}n[Ce.expando]&&(n[Ce.expando]=void 0)}}});oe.fn.extend({domManip:E,detach:function(e){return w(this,e,!0)},remove:function(e){return w(this,e)},text:function(e){return we(this,function(e){return void 0===e?oe.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 E(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=v(this,e);t.appendChild(e)}})},prepend:function(){return E(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=v(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return E(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return E(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)if(1===e.nodeType){oe.cleanData(c(e,!1));e.textContent=""}return this},clone:function(e,t){e=null!=e&&e;t=null==t?e:t;return this.map(function(){return oe.clone(this,e,t)})},html:function(e){return we(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&&!Ge.test(e)&&!De[(ke.exec(e)||["",""])[1].toLowerCase()]){e=oe.htmlPrefilter(e);try{for(;n1)},show:function(){return O(this,!0)},hide:function(){return O(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Oe(this)?oe(this).show():oe(this).hide()})}});oe.Tween=P;P.prototype={constructor:P,init:function(e,t,n,i,r,o){this.elem=e;this.prop=n;this.easing=r||oe.easing._default;this.options=t;this.start=this.now=this.cur();this.end=i;this.unit=o||(oe.cssNumber[n]?"":"px")},cur:function(){var e=P.propHooks[this.prop];return e&&e.get?e.get(this):P.propHooks._default.get(this)},run:function(e){var t,n=P.propHooks[this.prop];this.options.duration?this.pos=t=oe.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):P.propHooks._default.set(this);return this}};P.prototype.init.prototype=P.prototype;P.propHooks={_default:{get:function(e){var t;if(1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop])return e.elem[e.prop];t=oe.css(e.elem,e.prop,"");return t&&"auto"!==t?t:0},set:function(e){oe.fx.step[e.prop]?oe.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[oe.cssProps[e.prop]]&&!oe.cssHooks[e.prop]?e.elem[e.prop]=e.now:oe.style(e.elem,e.prop,e.now+e.unit)}}};P.propHooks.scrollTop=P.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}};oe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"};oe.fx=P.prototype.init;oe.fx.step={};var rt,ot,st=/^(?:toggle|show|hide)$/,at=/queueHooks$/;oe.Animation=oe.extend(q,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);u(n.elem,e,Ae.exec(t),n);return n}]},tweener:function(e,t){if(oe.isFunction(e)){t=e;e=["*"]}else e=e.match(_e);for(var n,i=0,r=e.length;i1)},removeAttr:function(e){return this.each(function(){oe.removeAttr(this,e)})}});oe.extend({attr:function(e,t,n){var i,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o){if("undefined"==typeof e.getAttribute)return oe.prop(e,t,n);if(1!==o||!oe.isXMLDoc(e)){t=t.toLowerCase();r=oe.attrHooks[t]||(oe.expr.match.bool.test(t)?lt:void 0)}if(void 0!==n){if(null===n){oe.removeAttr(e,t);return}if(r&&"set"in r&&void 0!==(i=r.set(e,n,t)))return i;e.setAttribute(t,n+"");return n}if(r&&"get"in r&&null!==(i=r.get(e,t)))return i;i=oe.find.attr(e,t);return null==i?void 0:i}},attrHooks:{type:{set:function(e,t){if(!ie.radioValue&&"radio"===t&&oe.nodeName(e,"input")){var n=e.value;e.setAttribute("type",t);n&&(e.value=n);return t}}}},removeAttr:function(e,t){var n,i,r=0,o=t&&t.match(_e);if(o&&1===e.nodeType)for(;n=o[r++];){i=oe.propFix[n]||n;oe.expr.match.bool.test(n)&&(e[i]=!1);e.removeAttribute(n)}}});lt={set:function(e,t,n){t===!1?oe.removeAttr(e,n):e.setAttribute(n,n);return n}};oe.each(oe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ut[t]||oe.find.attr;ut[t]=function(e,t,i){var r,o;if(!i){o=ut[t];ut[t]=r;r=null!=n(e,t,i)?t.toLowerCase():null;ut[t]=o}return r}});var ct=/^(?:input|select|textarea|button)$/i,ft=/^(?:a|area)$/i;oe.fn.extend({prop:function(e,t){return we(this,oe.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[oe.propFix[e]||e]})}});oe.extend({prop:function(e,t,n){var i,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o){if(1!==o||!oe.isXMLDoc(e)){t=oe.propFix[t]||t;r=oe.propHooks[t]}return 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=oe.find.attr(e,"tabindex");return t?parseInt(t,10):ct.test(e.nodeName)||ft.test(e.nodeName)&&e.href?0:-1; }}},propFix:{"for":"htmlFor","class":"className"}});ie.optSelected||(oe.propHooks.selected={get:function(e){var t=e.parentNode;t&&t.parentNode&&t.parentNode.selectedIndex;return null},set:function(e){var t=e.parentNode;if(t){t.selectedIndex;t.parentNode&&t.parentNode.selectedIndex}}});oe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){oe.propFix[this.toLowerCase()]=this});var pt=/[\t\r\n\f]/g;oe.fn.extend({addClass:function(e){var t,n,i,r,o,s,a,l=0;if(oe.isFunction(e))return this.each(function(t){oe(this).addClass(e.call(this,t,F(this)))});if("string"==typeof e&&e){t=e.match(_e)||[];for(;n=this[l++];){r=F(n);i=1===n.nodeType&&(" "+r+" ").replace(pt," ");if(i){s=0;for(;o=t[s++];)i.indexOf(" "+o+" ")<0&&(i+=o+" ");a=oe.trim(i);r!==a&&n.setAttribute("class",a)}}}return this},removeClass:function(e){var t,n,i,r,o,s,a,l=0;if(oe.isFunction(e))return this.each(function(t){oe(this).removeClass(e.call(this,t,F(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e){t=e.match(_e)||[];for(;n=this[l++];){r=F(n);i=1===n.nodeType&&(" "+r+" ").replace(pt," ");if(i){s=0;for(;o=t[s++];)for(;i.indexOf(" "+o+" ")>-1;)i=i.replace(" "+o+" "," ");a=oe.trim(i);r!==a&&n.setAttribute("class",a)}}}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):oe.isFunction(e)?this.each(function(n){oe(this).toggleClass(e.call(this,n,F(this),t),t)}):this.each(function(){var t,i,r,o;if("string"===n){i=0;r=oe(this);o=e.match(_e)||[];for(;t=o[i++];)r.hasClass(t)?r.removeClass(t):r.addClass(t)}else if(void 0===e||"boolean"===n){t=F(this);t&&Se.set(this,"__className__",t);this.setAttribute&&this.setAttribute("class",t||e===!1?"":Se.get(this,"__className__")||"")}})},hasClass:function(e){var t,n,i=0;t=" "+e+" ";for(;n=this[i++];)if(1===n.nodeType&&(" "+F(n)+" ").replace(pt," ").indexOf(t)>-1)return!0;return!1}});var ht=/\r/g,dt=/[\x20\t\r\n\f]+/g;oe.fn.extend({val:function(e){var t,n,i,r=this[0];if(arguments.length){i=oe.isFunction(e);return this.each(function(n){var r;if(1===this.nodeType){r=i?e.call(this,n,oe(this).val()):e;null==r?r="":"number"==typeof r?r+="":oe.isArray(r)&&(r=oe.map(r,function(e){return null==e?"":e+""}));t=oe.valHooks[this.type]||oe.valHooks[this.nodeName.toLowerCase()];t&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r)}})}if(r){t=oe.valHooks[r.type]||oe.valHooks[r.nodeName.toLowerCase()];if(t&&"get"in t&&void 0!==(n=t.get(r,"value")))return n;n=r.value;return"string"==typeof n?n.replace(ht,""):null==n?"":n}}});oe.extend({valHooks:{option:{get:function(e){var t=oe.find.attr(e,"value");return null!=t?t:oe.trim(oe.text(e)).replace(dt," ")}},select:{get:function(e){for(var t,n,i=e.options,r=e.selectedIndex,o="select-one"===e.type||r<0,s=o?null:[],a=o?r+1:i.length,l=r<0?a:o?r:0;l-1)&&(n=!0)}n||(e.selectedIndex=-1);return o}}}});oe.each(["radio","checkbox"],function(){oe.valHooks[this]={set:function(e,t){if(oe.isArray(t))return e.checked=oe.inArray(oe(e).val(),t)>-1}};ie.checkOn||(oe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var gt=/^(?:focusinfocus|focusoutblur)$/;oe.extend(oe.event,{trigger:function(t,n,i,r){var o,s,a,l,u,c,f,p=[i||$],h=ne.call(t,"type")?t.type:t,d=ne.call(t,"namespace")?t.namespace.split("."):[];s=a=i=i||$;if(3!==i.nodeType&&8!==i.nodeType&&!gt.test(h+oe.event.triggered)){if(h.indexOf(".")>-1){d=h.split(".");h=d.shift();d.sort()}u=h.indexOf(":")<0&&"on"+h;t=t[oe.expando]?t:new oe.Event(h,"object"==typeof t&&t);t.isTrigger=r?2:3;t.namespace=d.join(".");t.rnamespace=t.namespace?new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;t.result=void 0;t.target||(t.target=i);n=null==n?[t]:oe.makeArray(n,[t]);f=oe.event.special[h]||{};if(r||!f.trigger||f.trigger.apply(i,n)!==!1){if(!r&&!f.noBubble&&!oe.isWindow(i)){l=f.delegateType||h;gt.test(l+h)||(s=s.parentNode);for(;s;s=s.parentNode){p.push(s);a=s}a===(i.ownerDocument||$)&&p.push(a.defaultView||a.parentWindow||e)}o=0;for(;(s=p[o++])&&!t.isPropagationStopped();){t.type=o>1?l:f.bindType||h;c=(Se.get(s,"events")||{})[t.type]&&Se.get(s,"handle");c&&c.apply(s,n);c=u&&s[u];if(c&&c.apply&&Te(s)){t.result=c.apply(s,n);t.result===!1&&t.preventDefault()}}t.type=h;if(!r&&!t.isDefaultPrevented()&&(!f._default||f._default.apply(p.pop(),n)===!1)&&Te(i)&&u&&oe.isFunction(i[h])&&!oe.isWindow(i)){a=i[u];a&&(i[u]=null);oe.event.triggered=h;i[h]();oe.event.triggered=void 0;a&&(i[u]=a)}return t.result}}},simulate:function(e,t,n){var i=oe.extend(new oe.Event,n,{type:e,isSimulated:!0});oe.event.trigger(i,null,t)}});oe.fn.extend({trigger:function(e,t){return this.each(function(){oe.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return oe.event.trigger(e,t,n,!0)}});oe.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){oe.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}});oe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}});ie.focusin="onfocusin"in e;ie.focusin||oe.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){oe.event.simulate(t,e.target,oe.event.fix(e))};oe.event.special[t]={setup:function(){var i=this.ownerDocument||this,r=Se.access(i,t);r||i.addEventListener(e,n,!0);Se.access(i,t,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this,r=Se.access(i,t)-1;if(r)Se.access(i,t,r);else{i.removeEventListener(e,n,!0);Se.remove(i,t)}}}});var mt=e.location,vt=oe.now(),yt=/\?/;oe.parseJSON=function(e){return JSON.parse(e+"")};oe.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}n&&!n.getElementsByTagName("parsererror").length||oe.error("Invalid XML: "+t);return n};var bt=/#.*$/,xt=/([?&])_=[^&]*/,_t=/^(.*?):[ \t]*([^\r\n]*)$/gm,Et=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,wt=/^(?:GET|HEAD)$/,Tt=/^\/\//,St={},Ct={},Lt="*/".concat("*"),Nt=$.createElement("a");Nt.href=mt.href;oe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:mt.href,type:"GET",isLocal:Et.test(mt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Lt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":oe.parseJSON,"text xml":oe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?z(z(e,oe.ajaxSettings),t):z(oe.ajaxSettings,e)},ajaxPrefilter:U(St),ajaxTransport:U(Ct),ajax:function(t,n){function i(t,n,i,a){var u,f,y,b,_,w=n;if(2!==x){x=2;l&&e.clearTimeout(l);r=void 0;s=a||"";E.readyState=t>0?4:0;u=t>=200&&t<300||304===t;i&&(b=H(p,E,i));b=V(p,b,E,u);if(u){if(p.ifModified){_=E.getResponseHeader("Last-Modified");_&&(oe.lastModified[o]=_);_=E.getResponseHeader("etag");_&&(oe.etag[o]=_)}if(204===t||"HEAD"===p.type)w="nocontent";else if(304===t)w="notmodified";else{w=b.state;f=b.data;y=b.error;u=!y}}else{y=w;if(t||!w){w="error";t<0&&(t=0)}}E.status=t;E.statusText=(n||w)+"";u?g.resolveWith(h,[f,w,E]):g.rejectWith(h,[E,w,y]);E.statusCode(v);v=void 0;c&&d.trigger(u?"ajaxSuccess":"ajaxError",[E,p,u?f:y]);m.fireWith(h,[E,w]);if(c){d.trigger("ajaxComplete",[E,p]);--oe.active||oe.event.trigger("ajaxStop")}}}if("object"==typeof t){n=t;t=void 0}n=n||{};var r,o,s,a,l,u,c,f,p=oe.ajaxSetup({},n),h=p.context||p,d=p.context&&(h.nodeType||h.jquery)?oe(h):oe.event,g=oe.Deferred(),m=oe.Callbacks("once memory"),v=p.statusCode||{},y={},b={},x=0,_="canceled",E={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!a){a={};for(;t=_t.exec(s);)a[t[1].toLowerCase()]=t[2]}t=a[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();if(!x){e=b[n]=b[n]||e;y[e]=t}return this},overrideMimeType:function(e){x||(p.mimeType=e);return this},statusCode:function(e){var t;if(e)if(x<2)for(t in e)v[t]=[v[t],e[t]];else E.always(e[E.status]);return this},abort:function(e){var t=e||_;r&&r.abort(t);i(0,t);return this}};g.promise(E).complete=m.add;E.success=E.done;E.error=E.fail;p.url=((t||p.url||mt.href)+"").replace(bt,"").replace(Tt,mt.protocol+"//");p.type=n.method||n.type||p.method||p.type;p.dataTypes=oe.trim(p.dataType||"*").toLowerCase().match(_e)||[""];if(null==p.crossDomain){u=$.createElement("a");try{u.href=p.url;u.href=u.href;p.crossDomain=Nt.protocol+"//"+Nt.host!=u.protocol+"//"+u.host}catch(w){p.crossDomain=!0}}p.data&&p.processData&&"string"!=typeof p.data&&(p.data=oe.param(p.data,p.traditional));G(St,p,n,E);if(2===x)return E;c=oe.event&&p.global;c&&0===oe.active++&&oe.event.trigger("ajaxStart");p.type=p.type.toUpperCase();p.hasContent=!wt.test(p.type);o=p.url;if(!p.hasContent){if(p.data){o=p.url+=(yt.test(o)?"&":"?")+p.data;delete p.data}p.cache===!1&&(p.url=xt.test(o)?o.replace(xt,"$1_="+vt++):o+(yt.test(o)?"&":"?")+"_="+vt++)}if(p.ifModified){oe.lastModified[o]&&E.setRequestHeader("If-Modified-Since",oe.lastModified[o]);oe.etag[o]&&E.setRequestHeader("If-None-Match",oe.etag[o])}(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&E.setRequestHeader("Content-Type",p.contentType);E.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Lt+"; q=0.01":""):p.accepts["*"]);for(f in p.headers)E.setRequestHeader(f,p.headers[f]);if(p.beforeSend&&(p.beforeSend.call(h,E,p)===!1||2===x))return E.abort();_="abort";for(f in{success:1,error:1,complete:1})E[f](p[f]);r=G(Ct,p,n,E);if(r){E.readyState=1;c&&d.trigger("ajaxSend",[E,p]);if(2===x)return E;p.async&&p.timeout>0&&(l=e.setTimeout(function(){E.abort("timeout")},p.timeout));try{x=1;r.send(y,i)}catch(w){if(!(x<2))throw w;i(-1,w)}}else i(-1,"No Transport");return E},getJSON:function(e,t,n){return oe.get(e,t,n,"json")},getScript:function(e,t){return oe.get(e,void 0,t,"script")}});oe.each(["get","post"],function(e,t){oe[t]=function(e,n,i,r){if(oe.isFunction(n)){r=r||i;i=n;n=void 0}return oe.ajax(oe.extend({url:e,type:t,dataType:r,data:n,success:i},oe.isPlainObject(e)&&e))}});oe._evalUrl=function(e){return oe.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})};oe.fn.extend({wrapAll:function(e){var t;if(oe.isFunction(e))return this.each(function(t){oe(this).wrapAll(e.call(this,t))});if(this[0]){t=oe(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)}return this},wrapInner:function(e){return oe.isFunction(e)?this.each(function(t){oe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=oe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=oe.isFunction(e);return this.each(function(n){oe(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){oe.nodeName(this,"body")||oe(this).replaceWith(this.childNodes)}).end()}});oe.expr.filters.hidden=function(e){return!oe.expr.filters.visible(e)};oe.expr.filters.visible=function(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0};var It=/%20/g,At=/\[\]$/,Rt=/\r?\n/g,Ot=/^(?:submit|button|image|reset|file)$/i,Pt=/^(?:input|select|textarea|keygen)/i;oe.param=function(e,t){var n,i=[],r=function(e,t){t=oe.isFunction(t)?t():null==t?"":t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};void 0===t&&(t=oe.ajaxSettings&&oe.ajaxSettings.traditional);if(oe.isArray(e)||e.jquery&&!oe.isPlainObject(e))oe.each(e,function(){r(this.name,this.value)});else for(n in e)W(n,e[n],t,r);return i.join("&").replace(It,"+")};oe.fn.extend({serialize:function(){return oe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=oe.prop(this,"elements");return e?oe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!oe(this).is(":disabled")&&Pt.test(this.nodeName)&&!Ot.test(e)&&(this.checked||!Pe.test(e))}).map(function(e,t){var n=oe(this).val();return null==n?null:oe.isArray(n)?oe.map(n,function(e){return{name:t.name,value:e.replace(Rt,"\r\n")}}):{name:t.name,value:n.replace(Rt,"\r\n")}}).get()}});oe.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(t){}};var kt={0:200,1223:204},Mt=oe.ajaxSettings.xhr();ie.cors=!!Mt&&"withCredentials"in Mt;ie.ajax=Mt=!!Mt;oe.ajaxTransport(function(t){var n,i;if(ie.cors||Mt&&!t.crossDomain)return{send:function(r,o){var s,a=t.xhr();a.open(t.type,t.url,t.async,t.username,t.password);if(t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType);t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(s in r)a.setRequestHeader(s,r[s]);n=function(e){return function(){if(n){n=i=a.onload=a.onerror=a.onabort=a.onreadystatechange=null;"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(kt[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders())}}};a.onload=n();i=a.onerror=n("error");void 0!==a.onabort?a.onabort=i:a.onreadystatechange=function(){4===a.readyState&&e.setTimeout(function(){n&&i()})};n=n("abort");try{a.send(t.hasContent&&t.data||null)}catch(l){if(n)throw l}},abort:function(){n&&n()}}});oe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){oe.globalEval(e);return e}}});oe.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1);e.crossDomain&&(e.type="GET")});oe.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(i,r){t=oe("